@luscii-healthtech/web-ui 2.9.0 → 2.10.2
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/components/Avatar/Avatar.d.ts +11 -11
- package/dist/components/CenteredHero/CenteredHero.d.ts +1 -1
- package/dist/components/Container/types/FlexContainerProps.type.d.ts +3 -2
- package/dist/components/Datepicker/Datepicker.d.ts +12 -11
- package/dist/components/Dropdown/Dropdown.d.ts +17 -7
- package/dist/components/ErrorBlock/ErrorBlock.d.ts +3 -3
- package/dist/components/Form/form.transformer.d.ts +3 -20
- package/dist/components/Form/form.types.d.ts +5 -5
- package/dist/components/InfoBlock/InfoBlock.d.ts +4 -4
- package/dist/components/Input/SearchInput.d.ts +1 -1
- package/dist/components/Line/Line.d.ts +4 -4
- package/dist/components/Menu/Menu.d.ts +6 -0
- package/dist/components/MultiSelect/MultiSelect.d.ts +7 -7
- package/dist/components/Page/CRUDPage.d.ts +13 -13
- package/dist/components/Page/Page.d.ts +13 -13
- package/dist/components/PaginationMenu/PaginationMenu.utils.d.ts +1 -1
- package/dist/components/Radio/Radio.d.ts +5 -1
- package/dist/components/RadioGroup/RadioGroup.d.ts +9 -10
- package/dist/components/Select/LegacySelect.d.ts +8 -9
- package/dist/components/Select/SelectV2.d.ts +1 -1
- package/dist/components/Switcher/Switcher.d.ts +6 -6
- package/dist/components/Switcher/SwitcherItem.d.ts +7 -7
- package/dist/components/Text/LegacyText.d.ts +18 -18
- package/dist/components/TextEditor/TextEditor.d.ts +4 -4
- package/dist/components/Textarea/Textarea.d.ts +16 -16
- package/dist/components/Title/LegacyTitle.d.ts +10 -10
- package/dist/web-ui-tailwind.css +8 -0
- package/dist/web-ui.cjs.development.js +81 -74
- package/dist/web-ui.cjs.development.js.map +1 -1
- package/dist/web-ui.cjs.production.min.js +1 -1
- package/dist/web-ui.cjs.production.min.js.map +1 -1
- package/dist/web-ui.esm.js +81 -74
- package/dist/web-ui.esm.js.map +1 -1
- package/package.json +7 -3
- package/src/assets/add.svg +0 -5
- package/src/assets/add_hover.svg +0 -4
- package/src/assets/arrow-down-icon.svg +0 -3
- package/src/assets/big-menu-icon-hover.svg +0 -6
- package/src/assets/big-menu-icon.svg +0 -6
- package/src/assets/check-cross-icon.svg +0 -7
- package/src/assets/check-icon-primary.svg +0 -5
- package/src/assets/check-icon.svg +0 -3
- package/src/assets/chevron-double.svg +0 -3
- package/src/assets/close.svg +0 -3
- package/src/assets/color-variant-cross.svg +0 -3
- package/src/assets/cross-dark.svg +0 -3
- package/src/assets/delete.svg +0 -4
- package/src/assets/delete_hover.svg +0 -4
- package/src/assets/edit.svg +0 -6
- package/src/assets/edit_hover.svg +0 -6
- package/src/assets/error-icon.svg +0 -7
- package/src/assets/grid-view-icon-active.svg +0 -6
- package/src/assets/grid-view-icon.svg +0 -6
- package/src/assets/groups.svg +0 -3
- package/src/assets/hamburger.svg +0 -5
- package/src/assets/happy-star.svg +0 -9
- package/src/assets/hcps.svg +0 -3
- package/src/assets/indeterminate-icon.svg +0 -3
- package/src/assets/info-icon.svg +0 -6
- package/src/assets/left-arrow-blue.svg +0 -3
- package/src/assets/left-arrow-grey.svg +0 -3
- package/src/assets/list-view-icon-active.svg +0 -3
- package/src/assets/list-view-icon.svg +0 -3
- package/src/assets/loading.svg +0 -16
- package/src/assets/modal-close-icon-active.svg +0 -9
- package/src/assets/modal-close-icon.svg +0 -9
- package/src/assets/no-open-alerts.svg +0 -19
- package/src/assets/patients.svg +0 -3
- package/src/assets/phone-mockup.svg +0 -9
- package/src/assets/programs.svg +0 -3
- package/src/assets/right-arrow-blue.svg +0 -3
- package/src/assets/right-arrow-grey.svg +0 -3
- package/src/assets/search-cancel.svg +0 -3
- package/src/assets/search-not-found.svg +0 -70
- package/src/assets/search.svg +0 -3
- package/src/assets/spinner-gray.svg +0 -6
- package/src/assets/spinner.svg +0 -5
- package/src/assets/starIcon.svg +0 -3
- package/src/assets/success-icon.svg +0 -6
- package/src/components/Accordion/Accordion.tsx +0 -33
- package/src/components/Accordion/AccordionItem.tsx +0 -50
- package/src/components/Avatar/Avatar.js +0 -81
- package/src/components/Avatar/Avatar.scss +0 -153
- package/src/components/Badge/Badge.tsx +0 -23
- package/src/components/Breadcrumbs/Breadcrumbs.tsx +0 -46
- package/src/components/Button/Button.examples.md +0 -46
- package/src/components/Button/Button.tsx +0 -200
- package/src/components/Button/Button.types.ts +0 -41
- package/src/components/Button/ButtonIcon.tsx +0 -42
- package/src/components/ButtonV2/ButtonProps.type.ts +0 -44
- package/src/components/ButtonV2/ButtonV2.tsx +0 -97
- package/src/components/ButtonV2/PrimaryButton.tsx +0 -25
- package/src/components/ButtonV2/SecondaryButton.tsx +0 -26
- package/src/components/ButtonV2/TertiaryButton.tsx +0 -26
- package/src/components/Carousel/Carousel.tsx +0 -52
- package/src/components/Carousel/GliderContainer.scss +0 -13
- package/src/components/Carousel/GliderContainer.tsx +0 -22
- package/src/components/CenteredHero/CenteredHero.tsx +0 -63
- package/src/components/CheckBoxListModal/CheckboxListModal.tsx +0 -180
- package/src/components/Checkbox/Checkbox.scss +0 -125
- package/src/components/Checkbox/Checkbox.tsx +0 -147
- package/src/components/CheckboxList/CheckboxGroup.tsx +0 -120
- package/src/components/CheckboxList/CheckboxList.tsx +0 -46
- package/src/components/CheckboxList/CheckboxList.types.ts +0 -47
- package/src/components/CheckboxList/CheckboxListItem.tsx +0 -54
- package/src/components/ConfirmationDialog/ConfirmationDialog.scss +0 -15
- package/src/components/ConfirmationDialog/ConfirmationDialog.tsx +0 -84
- package/src/components/Container/FlexColumn.tsx +0 -18
- package/src/components/Container/FlexContainer.tsx +0 -46
- package/src/components/Container/FlexRow.tsx +0 -18
- package/src/components/Container/types/FlexContainerProps.type.ts +0 -18
- package/src/components/Datepicker/Datepicker.js +0 -96
- package/src/components/Datepicker/Datepicker.scss +0 -332
- package/src/components/Dropdown/Dropdown.js +0 -416
- package/src/components/Dropdown/Dropdown.scss +0 -83
- package/src/components/EmptyListMessage/EmptyListMessage.tsx +0 -34
- package/src/components/ErrorBlock/ErrorBlock.js +0 -24
- package/src/components/ErrorBlock/ErrorBlock.scss +0 -20
- package/src/components/Form/Form.tsx +0 -138
- package/src/components/Form/FormFieldDecorator.tsx +0 -66
- package/src/components/Form/FormInput.tsx +0 -47
- package/src/components/Form/FormRadioGroup.tsx +0 -23
- package/src/components/Form/FormSelect.tsx +0 -32
- package/src/components/Form/form.transformer.ts +0 -9
- package/src/components/Form/form.types.ts +0 -139
- package/src/components/Icons/AddIcon.tsx +0 -29
- package/src/components/Icons/AlertsIcon.tsx +0 -39
- package/src/components/Icons/BellIcon.tsx +0 -39
- package/src/components/Icons/ChartIcon.tsx +0 -22
- package/src/components/Icons/ChatBoxIcon.tsx +0 -23
- package/src/components/Icons/CheckIcon.tsx +0 -26
- package/src/components/Icons/ChevronDoubleIcon.tsx +0 -25
- package/src/components/Icons/ChevronDownIcon.tsx +0 -20
- package/src/components/Icons/ChevronRightIcon.tsx +0 -20
- package/src/components/Icons/CrossIcon.tsx +0 -24
- package/src/components/Icons/DeleteIcon.tsx +0 -23
- package/src/components/Icons/DownArrowIcon.tsx +0 -23
- package/src/components/Icons/DragIcon.tsx +0 -25
- package/src/components/Icons/DynamicIcon.tsx +0 -25
- package/src/components/Icons/EditIcon.tsx +0 -23
- package/src/components/Icons/EmptyIcon.tsx +0 -29
- package/src/components/Icons/EmptyStateDashboardIcon.tsx +0 -130
- package/src/components/Icons/ExclamationMarkIcon.tsx +0 -23
- package/src/components/Icons/EyeIcon.tsx +0 -23
- package/src/components/Icons/GearIcon.tsx +0 -23
- package/src/components/Icons/GroupIcon.tsx +0 -23
- package/src/components/Icons/HamburgerIcon.tsx +0 -31
- package/src/components/Icons/HeartIcon.tsx +0 -23
- package/src/components/Icons/ImageIcon.tsx +0 -23
- package/src/components/Icons/LeftArrowIcon.tsx +0 -23
- package/src/components/Icons/LightBulbIcon.tsx +0 -31
- package/src/components/Icons/LockIcon.tsx +0 -23
- package/src/components/Icons/MessagesIcon.tsx +0 -23
- package/src/components/Icons/NotesIcon.tsx +0 -23
- package/src/components/Icons/PinIcon.tsx +0 -23
- package/src/components/Icons/PrintIcon.tsx +0 -22
- package/src/components/Icons/RightArrowIcon.tsx +0 -23
- package/src/components/Icons/SearchCancelIcon.tsx +0 -23
- package/src/components/Icons/SearchIcon.tsx +0 -23
- package/src/components/Icons/SmallCircleIcon.tsx +0 -21
- package/src/components/Icons/SmallDiamondIcon.tsx +0 -31
- package/src/components/Icons/SmallSquareIcon.tsx +0 -21
- package/src/components/Icons/SpaceRocketIcon.tsx +0 -23
- package/src/components/Icons/StarIcon.tsx +0 -23
- package/src/components/Icons/WarningIcon.tsx +0 -24
- package/src/components/Icons/types/IconProps.type.ts +0 -5
- package/src/components/InfoBlock/InfoBlock.js +0 -24
- package/src/components/InfoBlock/InfoBlock.scss +0 -20
- package/src/components/InfoField/InfoField.tsx +0 -94
- package/src/components/Input/Input.css +0 -3
- package/src/components/Input/Input.tsx +0 -211
- package/src/components/Input/SearchInput.tsx +0 -24
- package/src/components/Line/Line.js +0 -38
- package/src/components/List/List.scss +0 -23
- package/src/components/List/List.tsx +0 -138
- package/src/components/List/List.types.ts +0 -41
- package/src/components/List/ListItem.tsx +0 -89
- package/src/components/List/ListItemSkeleton.tsx +0 -26
- package/src/components/List/ListSkeleton.scss +0 -5
- package/src/components/List/ListSkeleton.tsx +0 -30
- package/src/components/LoadingIndicator/LoadingIndicator.scss +0 -50
- package/src/components/LoadingIndicator/LoadingIndicator.tsx +0 -46
- package/src/components/Menu/Menu.js +0 -74
- package/src/components/Menu/Menu.scss +0 -27
- package/src/components/Modal/Modal.scss +0 -117
- package/src/components/Modal/Modal.tsx +0 -104
- package/src/components/Modal/ModalWithButtons.tsx +0 -34
- package/src/components/MultiSelect/MultiSelect.js +0 -117
- package/src/components/MultiSelect/MultiSelect.scss +0 -29
- package/src/components/MultiSelect/MultiSelectUtils.js +0 -23
- package/src/components/NavMenu/NavLayout.tsx +0 -40
- package/src/components/NavMenu/NavMenu.tsx +0 -39
- package/src/components/NavMenu/NavMenu.utils.ts +0 -6
- package/src/components/NavMenu/NavMenuContent.tsx +0 -23
- package/src/components/NavMenu/NavMenuItem.tsx +0 -102
- package/src/components/NotificationBanner/NotificationBanner.tsx +0 -104
- package/src/components/Page/CRUDPage.js +0 -123
- package/src/components/Page/CRUDPage.scss +0 -32
- package/src/components/Page/Page.js +0 -102
- package/src/components/Page/Page.scss +0 -59
- package/src/components/PageHeader/PageHeader.tsx +0 -51
- package/src/components/PaginationMenu/PaginationMenu.tsx +0 -47
- package/src/components/PaginationMenu/PaginationMenu.types.ts +0 -46
- package/src/components/PaginationMenu/PaginationMenu.utils.ts +0 -49
- package/src/components/PaginationMenu/PaginationMenuLarge.tsx +0 -96
- package/src/components/PaginationMenu/PaginationMenuSmall.tsx +0 -43
- package/src/components/PreviewPhone/PreviewPhone.tsx +0 -52
- package/src/components/PreviewPhone/useWindowDimensions.js +0 -26
- package/src/components/Radio/Radio.js +0 -102
- package/src/components/Radio/Radio.scss +0 -58
- package/src/components/Radio/RadioV2.css +0 -15
- package/src/components/Radio/RadioV2.tsx +0 -87
- package/src/components/RadioGroup/RadioGroup.js +0 -66
- package/src/components/RadioGroup/RadioGroup.scss +0 -37
- package/src/components/RadioGroup/RadioGroupV2.tsx +0 -35
- package/src/components/Section/Section.scss +0 -74
- package/src/components/Section/Section.tsx +0 -68
- package/src/components/Section/SectionItem.scss +0 -20
- package/src/components/Section/SectionItem.tsx +0 -26
- package/src/components/Section/SectionItemWithContent.tsx +0 -30
- package/src/components/Select/LegacySelect.js +0 -114
- package/src/components/Select/Select.scss +0 -29
- package/src/components/Select/Select.tsx +0 -151
- package/src/components/Select/SelectV2.tsx +0 -171
- package/src/components/Select/options.transformer.ts +0 -36
- package/src/components/Select/select.utils.spec.ts +0 -63
- package/src/components/Select/select.utils.ts +0 -45
- package/src/components/SettingsMenuButton/SettingsMenuButton.tsx +0 -111
- package/src/components/Spinner/Spinner.tsx +0 -23
- package/src/components/Steps/Step.tsx +0 -31
- package/src/components/Steps/Steps.tsx +0 -24
- package/src/components/Switcher/Switcher.js +0 -58
- package/src/components/Switcher/SwitcherItem.js +0 -61
- package/src/components/Switcher/SwitcherItem.scss +0 -67
- package/src/components/TabLinks/TabLinks.tsx +0 -63
- package/src/components/Tabbar/Tabbar.tsx +0 -60
- package/src/components/Tabbar/TabbarItem.tsx +0 -66
- package/src/components/Table/Table.tsx +0 -91
- package/src/components/Table/Table.types.ts +0 -28
- package/src/components/Table/Table.utils.ts +0 -23
- package/src/components/Table/TableBody.tsx +0 -57
- package/src/components/Table/TableBodyRow.tsx +0 -47
- package/src/components/Table/TableBodyRowDataCell.tsx +0 -76
- package/src/components/Table/TableFooter.tsx +0 -21
- package/src/components/Table/TableHeader.tsx +0 -28
- package/src/components/Tag/Tag.tsx +0 -58
- package/src/components/Tag/Tag.utils.ts +0 -4
- package/src/components/Tag/TagGroup.tsx +0 -29
- package/src/components/Text/LegacyText.js +0 -78
- package/src/components/Text/Text.scss +0 -67
- package/src/components/Text/Text.tsx +0 -131
- package/src/components/TextEditor/TextEditor.js +0 -61
- package/src/components/TextEditor/TextEditor.scss +0 -14
- package/src/components/TextEditorV2/TextEditorV2.js +0 -52
- package/src/components/TextEditorV2/TextEditorV2.scss +0 -110
- package/src/components/TextLink/TextLink.tsx +0 -42
- package/src/components/Textarea/Textarea.js +0 -108
- package/src/components/Textarea/Textarea.scss +0 -56
- package/src/components/Timeline/Timeline.tsx +0 -28
- package/src/components/Timeline/TimelineStep.tsx +0 -36
- package/src/components/Title/LegacyTitle.js +0 -64
- package/src/components/Title/Title.scss +0 -6
- package/src/components/Title/Title.tsx +0 -62
- package/src/components/Toaster/Toaster.scss +0 -57
- package/src/components/Toaster/Toaster.tsx +0 -100
- package/src/components/Toaster/toast-elements-getter.ts +0 -72
- package/src/components/Toaster/toast-progress-animator.ts +0 -53
- package/src/components/Toaster/toast.ts +0 -112
- package/src/components/ViewItem/ViewItem.tsx +0 -85
- package/src/custom.d.ts +0 -4
- package/src/index.tsx +0 -170
- package/src/styles/_colors.scss +0 -59
- package/src/styles/_layout.scss +0 -64
- package/src/styles/_shadows.scss +0 -19
- package/src/styles/_skeleton.scss +0 -63
- package/src/styles/_typography.scss +0 -8
- package/src/styles/_utils.scss +0 -45
- package/src/styles/fonts/avenir/3A0AF8_0_0.eot +0 -0
- package/src/styles/fonts/avenir/3A0AF8_0_0.ttf +0 -0
- package/src/styles/fonts/avenir/3A0AF8_0_0.woff +0 -0
- package/src/styles/fonts/avenir/3A0AF8_0_0.woff2 +0 -0
- package/src/styles/fonts/avenir/3A0AF8_1_0.eot +0 -0
- package/src/styles/fonts/avenir/3A0AF8_1_0.ttf +0 -0
- package/src/styles/fonts/avenir/3A0AF8_1_0.woff +0 -0
- package/src/styles/fonts/avenir/3A0AF8_1_0.woff2 +0 -0
- package/src/types/general.types.ts +0 -11
- package/src/utils/useOutsideClick.js +0 -19
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
@import "../../styles/colors";
|
|
2
|
-
|
|
3
|
-
.ql-editor {
|
|
4
|
-
resize: vertical;
|
|
5
|
-
min-height: 10rem;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
.ql-snow.ql-toolbar {
|
|
9
|
-
display: block;
|
|
10
|
-
background: $color-slate-100;
|
|
11
|
-
border-top-left-radius: 0.5em;
|
|
12
|
-
border-top-right-radius: 0.5em;
|
|
13
|
-
margin-top: 0.5em;
|
|
14
|
-
}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import React, { useEffect, useState } from "react";
|
|
2
|
-
import { EditorState, convertToRaw, ContentState } from "draft-js";
|
|
3
|
-
import { Editor } from "react-draft-wysiwyg";
|
|
4
|
-
import draftToHtml from "draftjs-to-html";
|
|
5
|
-
import htmlToDraft from "html-to-draftjs";
|
|
6
|
-
|
|
7
|
-
import "react-draft-wysiwyg/dist/react-draft-wysiwyg.css";
|
|
8
|
-
import "./TextEditorV2.scss";
|
|
9
|
-
|
|
10
|
-
export const TextEditorV2 = ({ defaultValue, onValueChange, locale }) => {
|
|
11
|
-
const [editorState, setEditorState] = useState(EditorState.createEmpty());
|
|
12
|
-
|
|
13
|
-
useEffect(() => {
|
|
14
|
-
const { contentBlocks, entityMap } = htmlToDraft(defaultValue);
|
|
15
|
-
setEditorState(EditorState.createWithContent(ContentState.createFromBlockArray(contentBlocks, entityMap)));
|
|
16
|
-
}, []);
|
|
17
|
-
|
|
18
|
-
const onEditorStateChange = (state) => {
|
|
19
|
-
setEditorState(state);
|
|
20
|
-
onValueChange(draftToHtml(convertToRaw(state.getCurrentContent())));
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
return (
|
|
24
|
-
<div className="editor">
|
|
25
|
-
<Editor
|
|
26
|
-
toolbar={{
|
|
27
|
-
options: ["inline", "list", "link", "textAlign", "history"],
|
|
28
|
-
inline: {
|
|
29
|
-
options: ["bold", "italic", "underline"],
|
|
30
|
-
},
|
|
31
|
-
list: {
|
|
32
|
-
options: ["unordered", "ordered"],
|
|
33
|
-
},
|
|
34
|
-
link: {
|
|
35
|
-
showOpenOptionOnHover: false,
|
|
36
|
-
defaultTargetOption: "_blank",
|
|
37
|
-
},
|
|
38
|
-
}}
|
|
39
|
-
editorState={editorState}
|
|
40
|
-
onEditorStateChange={onEditorStateChange}
|
|
41
|
-
wrapperClassName="mb-6"
|
|
42
|
-
toolbarClassName="border border-solid border-color-border-primary"
|
|
43
|
-
editorClassName="border border-solid border-color-border-primary h-56"
|
|
44
|
-
localization={{
|
|
45
|
-
locale: locale,
|
|
46
|
-
}}
|
|
47
|
-
/>
|
|
48
|
-
</div>
|
|
49
|
-
);
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
export default TextEditorV2;
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
.editor {
|
|
2
|
-
.rdw-editor {
|
|
3
|
-
overflow-y: auto;
|
|
4
|
-
|
|
5
|
-
.rdw-link-modal {
|
|
6
|
-
width: 20rem;
|
|
7
|
-
height: 19rem;
|
|
8
|
-
|
|
9
|
-
.rdw-link-modal-label,
|
|
10
|
-
.rdw-link-modal-target-option {
|
|
11
|
-
font-weight: normal;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.rdw-link-modal-input {
|
|
15
|
-
margin-bottom: 1rem;
|
|
16
|
-
|
|
17
|
-
font-size: 16px;
|
|
18
|
-
font-weight: normal;
|
|
19
|
-
line-height: 21px;
|
|
20
|
-
color: #2d2d2d;
|
|
21
|
-
height: 44px;
|
|
22
|
-
border: 1px solid #cccccc;
|
|
23
|
-
border-radius: 4px;
|
|
24
|
-
outline: none;
|
|
25
|
-
background-color: #ffffff;
|
|
26
|
-
padding: 12px;
|
|
27
|
-
caret-color: #0a78b2;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.rdw-link-modal-buttonsection {
|
|
31
|
-
display: flex;
|
|
32
|
-
flex-direction: row-reverse;
|
|
33
|
-
align-items: center;
|
|
34
|
-
|
|
35
|
-
.rdw-link-modal-btn {
|
|
36
|
-
border-radius: 1.375rem;
|
|
37
|
-
width: 6.5rem;
|
|
38
|
-
height: 2.75rem;
|
|
39
|
-
border: 1px solid #009fe3;
|
|
40
|
-
background-color: transparent;
|
|
41
|
-
color: #009fe3;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.rdw-link-modal-btn:first-child,
|
|
45
|
-
.rdw-link-modal-btn:disabled {
|
|
46
|
-
background: #009fe3;
|
|
47
|
-
color: #ffffff;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.rdw-embedded-modal {
|
|
53
|
-
width: 22rem;
|
|
54
|
-
height: 15rem;
|
|
55
|
-
|
|
56
|
-
.rdw-embedded-modal-link-input,
|
|
57
|
-
.rdw-embedded-modal-size-input {
|
|
58
|
-
font-size: 16px;
|
|
59
|
-
font-weight: normal;
|
|
60
|
-
line-height: 21px;
|
|
61
|
-
color: #2d2d2d;
|
|
62
|
-
height: 44px;
|
|
63
|
-
border: 1px solid #cccccc;
|
|
64
|
-
border-radius: 4px;
|
|
65
|
-
outline: none;
|
|
66
|
-
background-color: #ffffff;
|
|
67
|
-
padding: 12px;
|
|
68
|
-
caret-color: #0a78b2;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.rdw-embedded-modal-link-input {
|
|
72
|
-
width: 100%;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
.rdw-embedded-modal-size-input {
|
|
76
|
-
width: 90%;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
.rdw-embedded-modal-btn-section {
|
|
80
|
-
display: flex;
|
|
81
|
-
flex-direction: row;
|
|
82
|
-
align-items: center;
|
|
83
|
-
|
|
84
|
-
.rdw-embedded-modal-btn {
|
|
85
|
-
border-radius: 1.375rem;
|
|
86
|
-
width: 6.5rem;
|
|
87
|
-
height: 2.75rem;
|
|
88
|
-
border: 1px solid #009fe3;
|
|
89
|
-
background-color: transparent;
|
|
90
|
-
color: #009fe3;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
.rdw-embedded-modal-btn:first-child,
|
|
94
|
-
.rdw-embedded-modal-btn:disabled {
|
|
95
|
-
background: #009fe3;
|
|
96
|
-
color: #ffffff;
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
.rdw-editor-main {
|
|
102
|
-
min-height: 14rem;
|
|
103
|
-
overflow: hidden;
|
|
104
|
-
|
|
105
|
-
.DraftEditor-root {
|
|
106
|
-
margin: 0 12px;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import classNames from "classnames";
|
|
2
|
-
import React from "react";
|
|
3
|
-
|
|
4
|
-
export interface TextLinkProps {
|
|
5
|
-
text: string;
|
|
6
|
-
enabled?: boolean;
|
|
7
|
-
href?: string;
|
|
8
|
-
rel?: string;
|
|
9
|
-
target?: string;
|
|
10
|
-
onClick?: () => void;
|
|
11
|
-
className?: string;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export const TextLink = (props: TextLinkProps): JSX.Element => {
|
|
15
|
-
const className = classNames(
|
|
16
|
-
"text-sm hover:underline",
|
|
17
|
-
{
|
|
18
|
-
"cursor-pointer": props.enabled,
|
|
19
|
-
"cursor-default": !props.enabled,
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
"text-blue-800": props.enabled,
|
|
23
|
-
"text-slate-800": !props.enabled,
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
"hover:text-blue-900": props.enabled,
|
|
27
|
-
"hover:text-slate-900": !props.enabled,
|
|
28
|
-
}
|
|
29
|
-
);
|
|
30
|
-
|
|
31
|
-
return (
|
|
32
|
-
<a
|
|
33
|
-
href={props.href}
|
|
34
|
-
rel={props.rel}
|
|
35
|
-
target={props.target}
|
|
36
|
-
onClick={props.onClick}
|
|
37
|
-
className={classNames(className, props.className)}
|
|
38
|
-
>
|
|
39
|
-
{props.text}
|
|
40
|
-
</a>
|
|
41
|
-
);
|
|
42
|
-
};
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import PropTypes from "prop-types";
|
|
3
|
-
import classNames from "classnames";
|
|
4
|
-
|
|
5
|
-
import "./Textarea.scss";
|
|
6
|
-
|
|
7
|
-
const RESIZE_TYPES = {
|
|
8
|
-
NONE: "none",
|
|
9
|
-
BOTH: "both",
|
|
10
|
-
HORIZONTAL: "horizontal",
|
|
11
|
-
VERTICAL: "vertical",
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
Textarea.propTypes = {
|
|
15
|
-
className: PropTypes.string,
|
|
16
|
-
value: PropTypes.string,
|
|
17
|
-
name: PropTypes.string.isRequired,
|
|
18
|
-
placeholder: PropTypes.string,
|
|
19
|
-
maxLength: PropTypes.number,
|
|
20
|
-
rows: PropTypes.number,
|
|
21
|
-
resizable: PropTypes.oneOf([RESIZE_TYPES.BOTH, RESIZE_TYPES.HORIZONTAL, RESIZE_TYPES.VERTICAL, RESIZE_TYPES.NONE]),
|
|
22
|
-
isDisabled: PropTypes.bool,
|
|
23
|
-
icon: PropTypes.string,
|
|
24
|
-
onChange: PropTypes.func.isRequired,
|
|
25
|
-
onBlur: PropTypes.func,
|
|
26
|
-
onFocus: PropTypes.func,
|
|
27
|
-
onKeyPress: PropTypes.func,
|
|
28
|
-
onKeyDown: PropTypes.func,
|
|
29
|
-
onCtrlEnter: PropTypes.func,
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
function Textarea(props) {
|
|
33
|
-
const {
|
|
34
|
-
className,
|
|
35
|
-
value,
|
|
36
|
-
name,
|
|
37
|
-
placeholder,
|
|
38
|
-
maxLength,
|
|
39
|
-
rows = 4,
|
|
40
|
-
resizable = RESIZE_TYPES.VERTICAL,
|
|
41
|
-
isDisabled = false,
|
|
42
|
-
icon,
|
|
43
|
-
onChange,
|
|
44
|
-
onBlur,
|
|
45
|
-
onFocus,
|
|
46
|
-
onKeyPress,
|
|
47
|
-
onKeyDown,
|
|
48
|
-
onCtrlEnter,
|
|
49
|
-
...otherProps
|
|
50
|
-
} = props;
|
|
51
|
-
|
|
52
|
-
let style;
|
|
53
|
-
|
|
54
|
-
if (icon) {
|
|
55
|
-
style = {
|
|
56
|
-
backgroundImage: `url(${icon})`,
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
return (
|
|
61
|
-
<textarea
|
|
62
|
-
{...otherProps}
|
|
63
|
-
name={name}
|
|
64
|
-
value={value}
|
|
65
|
-
placeholder={placeholder}
|
|
66
|
-
onChange={onChange}
|
|
67
|
-
onBlur={onBlur}
|
|
68
|
-
onFocus={onFocus}
|
|
69
|
-
onKeyPress={onKeyPress}
|
|
70
|
-
onKeyDown={(event) => {
|
|
71
|
-
onKeyDown?.();
|
|
72
|
-
const { ctrlKey, metaKey, key } = event;
|
|
73
|
-
|
|
74
|
-
if ((ctrlKey || metaKey) && key === "Enter") {
|
|
75
|
-
onCtrlEnter?.();
|
|
76
|
-
}
|
|
77
|
-
}}
|
|
78
|
-
maxLength={maxLength}
|
|
79
|
-
rows={rows}
|
|
80
|
-
disabled={isDisabled}
|
|
81
|
-
className={classNames(
|
|
82
|
-
"cweb-textarea",
|
|
83
|
-
className,
|
|
84
|
-
"p-2",
|
|
85
|
-
"border",
|
|
86
|
-
"placeholder-gray-500",
|
|
87
|
-
"text-sm",
|
|
88
|
-
"border-solid",
|
|
89
|
-
"border-input-border",
|
|
90
|
-
"hover:border-input-border-dark",
|
|
91
|
-
"focus:outline-primary",
|
|
92
|
-
"transition-colors",
|
|
93
|
-
"duration-300",
|
|
94
|
-
"w-full",
|
|
95
|
-
"focus:border-primary",
|
|
96
|
-
{
|
|
97
|
-
"has-icon": !!icon,
|
|
98
|
-
resizable: resizable === RESIZE_TYPES.BOTH,
|
|
99
|
-
"resizable-x": resizable === RESIZE_TYPES.HORIZONTAL,
|
|
100
|
-
"resizable-y": resizable === RESIZE_TYPES.VERTICAL,
|
|
101
|
-
}
|
|
102
|
-
)}
|
|
103
|
-
style={style}
|
|
104
|
-
/>
|
|
105
|
-
);
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
export default Textarea;
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
@import "../../styles/colors";
|
|
2
|
-
@import "../../styles/typography";
|
|
3
|
-
@import "../../styles/layout";
|
|
4
|
-
|
|
5
|
-
.cweb-textarea {
|
|
6
|
-
border: 1px solid $color-border;
|
|
7
|
-
border-radius: $default-border-radius;
|
|
8
|
-
outline: none;
|
|
9
|
-
background-color: $color-white;
|
|
10
|
-
|
|
11
|
-
resize: none;
|
|
12
|
-
|
|
13
|
-
&.has-icon {
|
|
14
|
-
background-size: 24px;
|
|
15
|
-
background-position: 10px 10px;
|
|
16
|
-
background-repeat: no-repeat;
|
|
17
|
-
padding-left: 44px;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
&.resizable {
|
|
21
|
-
resize: both;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
&.resizable-x {
|
|
25
|
-
resize: horizontal;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
&.resizable-y {
|
|
29
|
-
resize: vertical;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
&::placeholder {
|
|
33
|
-
color: $color-text-lighter;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
&:-ms-input-placeholder {
|
|
37
|
-
color: $color-placeholder !important;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
&::-ms-input-placeholder {
|
|
41
|
-
color: $color-placeholder;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
&:focus {
|
|
45
|
-
border-color: $color-primary;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
&:disabled {
|
|
49
|
-
cursor: not-allowed;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
&.has-error {
|
|
53
|
-
border: 1px solid $color-negative;
|
|
54
|
-
color: $color-negative;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
|
|
3
|
-
import { SecondaryButton } from "../ButtonV2/SecondaryButton";
|
|
4
|
-
import { BaseButtonProps } from "../ButtonV2/ButtonProps.type";
|
|
5
|
-
|
|
6
|
-
import { TimelineStep, TimelineStepProps } from "./TimelineStep";
|
|
7
|
-
|
|
8
|
-
export interface TimelineProps {
|
|
9
|
-
steps: TimelineStepProps[];
|
|
10
|
-
loadMoreButtonProps?: BaseButtonProps;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export const Timeline = (props: TimelineProps): JSX.Element => (
|
|
14
|
-
<>
|
|
15
|
-
{/* Needs a container around TimelineSteps as last one should be styled differently */}
|
|
16
|
-
<div>
|
|
17
|
-
{props.steps.map(step => <TimelineStep {...step} />)}
|
|
18
|
-
</div>
|
|
19
|
-
{props.loadMoreButtonProps && (
|
|
20
|
-
<SecondaryButton
|
|
21
|
-
className={"mt-6 mx-auto"}
|
|
22
|
-
{...props.loadMoreButtonProps}
|
|
23
|
-
/>
|
|
24
|
-
)}
|
|
25
|
-
</>
|
|
26
|
-
);
|
|
27
|
-
|
|
28
|
-
export default Timeline;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import classNames from "classnames";
|
|
3
|
-
|
|
4
|
-
export interface TimelineStepProps {
|
|
5
|
-
key: string | number;
|
|
6
|
-
type?: "wide" | "base";
|
|
7
|
-
content: React.ReactNode;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export const TimelineStep = ({
|
|
11
|
-
content,
|
|
12
|
-
type,
|
|
13
|
-
}: TimelineStepProps): JSX.Element => {
|
|
14
|
-
const isWideStep = type === "wide";
|
|
15
|
-
const borderClassNames = "ml-4 pl-6 border-blue-800 border-l-2";
|
|
16
|
-
const containerClassNames = classNames("relative", {
|
|
17
|
-
[borderClassNames]: !isWideStep,
|
|
18
|
-
"bg-white rounded-lg overflow-hidden": isWideStep,
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
return (
|
|
22
|
-
<>
|
|
23
|
-
<div className={containerClassNames}>
|
|
24
|
-
{content}
|
|
25
|
-
{!isWideStep && (
|
|
26
|
-
<span className="rounded-lg bg-blue-800 h-4 w-4 absolute top-6 -left-2 -ml-px -mt-px"></span>
|
|
27
|
-
)}
|
|
28
|
-
</div>
|
|
29
|
-
<div className={classNames(borderClassNames, "h-6 last:h-0")} />
|
|
30
|
-
</>
|
|
31
|
-
);
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
TimelineStep.defaultProps = {
|
|
35
|
-
type: "base" as TimelineStepProps["type"],
|
|
36
|
-
};
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import PropTypes from "prop-types";
|
|
3
|
-
import classNames from "classnames";
|
|
4
|
-
|
|
5
|
-
import "./Title.scss";
|
|
6
|
-
|
|
7
|
-
const TITLE_TYPE_OPTIONS = {
|
|
8
|
-
DEFAULT: "default",
|
|
9
|
-
BIG: "big",
|
|
10
|
-
SMALL: "small",
|
|
11
|
-
TINY: "tiny",
|
|
12
|
-
BOLD: "bold",
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
LegacyTitle.propTypes = {
|
|
16
|
-
text: PropTypes.string.isRequired,
|
|
17
|
-
type: PropTypes.oneOf([
|
|
18
|
-
TITLE_TYPE_OPTIONS.DEFAULT,
|
|
19
|
-
TITLE_TYPE_OPTIONS.BIG,
|
|
20
|
-
TITLE_TYPE_OPTIONS.SMALL,
|
|
21
|
-
TITLE_TYPE_OPTIONS.TINY,
|
|
22
|
-
TITLE_TYPE_OPTIONS.BOLD,
|
|
23
|
-
]),
|
|
24
|
-
className: PropTypes.string,
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
function LegacyTitle({ text, type, className = "", ...otherProps }) {
|
|
28
|
-
let ContainerElement;
|
|
29
|
-
|
|
30
|
-
const containerClassName = classNames("cweb-title", className, {
|
|
31
|
-
"type-default": !type || type === TITLE_TYPE_OPTIONS.DEFAULT,
|
|
32
|
-
"type-big": type === TITLE_TYPE_OPTIONS.BIG,
|
|
33
|
-
"type-small": type === TITLE_TYPE_OPTIONS.SMALL,
|
|
34
|
-
"type-tiny": type === TITLE_TYPE_OPTIONS.TINY,
|
|
35
|
-
"type-bold": type === TITLE_TYPE_OPTIONS.BOLD,
|
|
36
|
-
});
|
|
37
|
-
|
|
38
|
-
switch (type) {
|
|
39
|
-
case TITLE_TYPE_OPTIONS.DEFAULT:
|
|
40
|
-
case TITLE_TYPE_OPTIONS.BOLD:
|
|
41
|
-
case TITLE_TYPE_OPTIONS.BIG:
|
|
42
|
-
ContainerElement = "h1";
|
|
43
|
-
break;
|
|
44
|
-
|
|
45
|
-
case TITLE_TYPE_OPTIONS.SMALL:
|
|
46
|
-
case TITLE_TYPE_OPTIONS.TINY:
|
|
47
|
-
ContainerElement = "h3";
|
|
48
|
-
break;
|
|
49
|
-
|
|
50
|
-
default:
|
|
51
|
-
ContainerElement = "h1";
|
|
52
|
-
break;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
return (
|
|
56
|
-
<ContainerElement {...otherProps} className={containerClassName}>
|
|
57
|
-
{text}
|
|
58
|
-
</ContainerElement>
|
|
59
|
-
);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
export default LegacyTitle;
|
|
63
|
-
|
|
64
|
-
export { TITLE_TYPE_OPTIONS };
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import classNames from "classnames";
|
|
2
|
-
import React from "react";
|
|
3
|
-
|
|
4
|
-
import "./Title.scss";
|
|
5
|
-
|
|
6
|
-
export type TitleStyle = "xs" | "sm" | "base" | "lg" | "xl" | "2xl";
|
|
7
|
-
|
|
8
|
-
export interface TextProps {
|
|
9
|
-
text: string;
|
|
10
|
-
type?: TitleStyle; //defaults to "base"
|
|
11
|
-
className?: string;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export const Title = (props: TextProps): JSX.Element => {
|
|
15
|
-
const containerClassName = classNames(
|
|
16
|
-
"title", //this is used to load the correct font from the css
|
|
17
|
-
"font-bold",
|
|
18
|
-
{
|
|
19
|
-
"text-slate-700": !props.className?.match(/\s(text-)/),
|
|
20
|
-
"text-base": props.type === "xs",
|
|
21
|
-
"text-xl": props.type === "sm",
|
|
22
|
-
"text-2xl": props.type === "base",
|
|
23
|
-
"text-3xl": props.type === "lg",
|
|
24
|
-
"text-4xl ": props.type === "xl",
|
|
25
|
-
"text-6xl ": props.type === "2xl",
|
|
26
|
-
},
|
|
27
|
-
props.className
|
|
28
|
-
);
|
|
29
|
-
|
|
30
|
-
let ContainerElement: React.ElementType;
|
|
31
|
-
|
|
32
|
-
switch (props.type) {
|
|
33
|
-
case "sm":
|
|
34
|
-
ContainerElement = "h5";
|
|
35
|
-
break;
|
|
36
|
-
case "base":
|
|
37
|
-
ContainerElement = "h4";
|
|
38
|
-
break;
|
|
39
|
-
case "lg":
|
|
40
|
-
ContainerElement = "h3";
|
|
41
|
-
break;
|
|
42
|
-
case "xl":
|
|
43
|
-
ContainerElement = "h2";
|
|
44
|
-
break;
|
|
45
|
-
case "2xl":
|
|
46
|
-
ContainerElement = "h1";
|
|
47
|
-
break;
|
|
48
|
-
default:
|
|
49
|
-
ContainerElement = "h4";
|
|
50
|
-
break;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
return (
|
|
54
|
-
<ContainerElement className={containerClassName}>
|
|
55
|
-
{props.text}
|
|
56
|
-
</ContainerElement>
|
|
57
|
-
);
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
Title.defaultProps = {
|
|
61
|
-
type: "base",
|
|
62
|
-
};
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
#application-toaster {
|
|
2
|
-
position: fixed;
|
|
3
|
-
left: 50%;
|
|
4
|
-
transform: translate(-50%, 200%);
|
|
5
|
-
bottom: 48px;
|
|
6
|
-
|
|
7
|
-
// https://easings.net/#easeInOutBack
|
|
8
|
-
transition: transform 0.3s cubic-bezier(0.68, -0.6, 0.32, 1.6);
|
|
9
|
-
|
|
10
|
-
&.shelved {
|
|
11
|
-
transform: translate(-50%, 200%);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
&.expanded {
|
|
15
|
-
transform: translate(-50%, 0);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
&.type-success {
|
|
19
|
-
@apply bg-green-50;
|
|
20
|
-
|
|
21
|
-
[data-test-id="toaster-title"] {
|
|
22
|
-
@apply text-green-700;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.failure-icon {
|
|
26
|
-
@apply hidden;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
[data-test-id="toaster-progress-bar-container"] {
|
|
30
|
-
@apply bg-green-50;
|
|
31
|
-
|
|
32
|
-
[data-test-id="toaster-progress-bar"] {
|
|
33
|
-
@apply bg-green-400;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
&.type-failure {
|
|
39
|
-
@apply bg-red-50;
|
|
40
|
-
|
|
41
|
-
[data-test-id="toaster-title"] {
|
|
42
|
-
@apply text-red-700;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.success-icon {
|
|
46
|
-
@apply hidden;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
[data-test-id="toaster-progress-bar-container"] {
|
|
50
|
-
@apply bg-red-50;
|
|
51
|
-
|
|
52
|
-
[data-test-id="toaster-progress-bar"] {
|
|
53
|
-
@apply bg-red-400;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}
|