@luscii-healthtech/web-ui 0.0.0-alpha.2fcd0e9
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/README.md +179 -0
- package/dist/components/Accordion/Accordion.d.ts +10 -0
- package/dist/components/Accordion/AccordionItem.d.ts +9 -0
- package/dist/components/AccordionList/AccordionList.d.ts +42 -0
- package/dist/components/AccordionList/subcomponents/AccordionListActions.d.ts +18 -0
- package/dist/components/Badge/Badge.d.ts +7 -0
- package/dist/components/BaseList/BaseList.d.ts +7 -0
- package/dist/components/BaseList/BaseList.types.d.ts +55 -0
- package/dist/components/BaseList/BaseListEmptyState.d.ts +7 -0
- package/dist/components/BaseList/BaseListHeader.d.ts +4 -0
- package/dist/components/BaseList/BaseListIcon.d.ts +5 -0
- package/dist/components/BaseList/BaseListItem.d.ts +4 -0
- package/dist/components/BaseList/DraggableBaseList/DraggableBaseList.d.ts +4 -0
- package/dist/components/BaseList/DraggableBaseList/DraggableBaseListItem.d.ts +3 -0
- package/dist/components/BaseList/DraggableBaseList/index.d.ts +2 -0
- package/dist/components/BaseList/ListSkeleton/ListItemSkeleton.d.ts +2 -0
- package/dist/components/BaseList/ListSkeleton/ListSkeleton.d.ts +8 -0
- package/dist/components/BaseList/SortableBaseList/SortableBaseList.d.ts +4 -0
- package/dist/components/BaseList/SortableBaseList/SortableBaseListItem.d.ts +3 -0
- package/dist/components/BaseList/SortableBaseList/index.d.ts +2 -0
- package/dist/components/BaseList/index.d.ts +6 -0
- package/dist/components/BaseList/utils.d.ts +10 -0
- package/dist/components/Breadcrumbs/BreadcrumbItem.d.ts +4 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +3 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.types.d.ts +14 -0
- package/dist/components/Breadcrumbs/index.d.ts +2 -0
- package/dist/components/Button/Button.d.ts +9 -0
- package/dist/components/Button/Button.types.d.ts +32 -0
- package/dist/components/Button/ButtonIcon.d.ts +7 -0
- package/dist/components/ButtonV2/ButtonProps.type.d.ts +49 -0
- package/dist/components/ButtonV2/ButtonV2.d.ts +3 -0
- package/dist/components/ButtonV2/PrimaryButton.d.ts +3 -0
- package/dist/components/ButtonV2/SecondaryButton.d.ts +3 -0
- package/dist/components/ButtonV2/TertiaryButton.d.ts +3 -0
- package/dist/components/Card/Card.d.ts +12 -0
- package/dist/components/Carousel/Carousel.d.ts +8 -0
- package/dist/components/Carousel/GliderContainer.d.ts +7 -0
- package/dist/components/CenteredHero/CenteredHero.d.ts +14 -0
- package/dist/components/CheckBoxListModal/CheckboxListModal.d.ts +30 -0
- package/dist/components/Checkbox/Checkbox.d.ts +64 -0
- package/dist/components/CheckboxList/CheckboxGroup.d.ts +3 -0
- package/dist/components/CheckboxList/CheckboxList.d.ts +4 -0
- package/dist/components/CheckboxList/CheckboxList.types.d.ts +74 -0
- package/dist/components/CheckboxList/CheckboxListItem.d.ts +3 -0
- package/dist/components/ConfirmationDialog/ConfirmationDialog.d.ts +3 -0
- package/dist/components/ConfirmationDialog/ConfirmationDialogChoices.d.ts +7 -0
- package/dist/components/ConfirmationDialog/ConfirmationDialogMessage.d.ts +4 -0
- package/dist/components/ConfirmationDialog/ConfirmationDialogTitle.d.ts +3 -0
- package/dist/components/ConfirmationDialog/types/ConfirmationDialog.types.d.ts +41 -0
- package/dist/components/Container/FlexColumn.d.ts +7 -0
- package/dist/components/Container/FlexContainer.d.ts +9 -0
- package/dist/components/Container/FlexRow.d.ts +7 -0
- package/dist/components/Container/types/FlexContainerProps.type.d.ts +26 -0
- package/dist/components/Divider/Divider.d.ts +6 -0
- package/dist/components/DragHandle/DragHandle.d.ts +7 -0
- package/dist/components/DragHandle/DragHandle.types.d.ts +6 -0
- package/dist/components/DragHandle/index.d.ts +2 -0
- package/dist/components/Dropzone/Dropzone.d.ts +6 -0
- package/dist/components/Dropzone/Dropzone.types.d.ts +33 -0
- package/dist/components/Dropzone/index.d.ts +2 -0
- package/dist/components/EmptyListMessage/EmptyListMessage.d.ts +14 -0
- package/dist/components/FilterBar/ActiveFilters.d.ts +9 -0
- package/dist/components/FilterBar/FilterBar.d.ts +96 -0
- package/dist/components/FilterBar/FilterBar.utils.d.ts +32 -0
- package/dist/components/FilterBar/FilterBarProps.type.d.ts +86 -0
- package/dist/components/FilterBar/FiltersMenus.d.ts +8 -0
- package/dist/components/FilterBar/SortMenu.d.ts +9 -0
- package/dist/components/FilterBar/index.d.ts +2 -0
- package/dist/components/Form/Form.d.ts +30 -0
- package/dist/components/Form/FormFieldCheckbox.d.ts +9 -0
- package/dist/components/Form/FormFieldCheckboxList.d.ts +9 -0
- package/dist/components/Form/FormFieldErrorMessages.d.ts +8 -0
- package/dist/components/Form/FormFieldLabeler.d.ts +8 -0
- package/dist/components/Form/FormImagePicker.d.ts +9 -0
- package/dist/components/Form/FormInput.d.ts +14 -0
- package/dist/components/Form/FormRadioGroup.d.ts +13 -0
- package/dist/components/Form/FormSelect.d.ts +10 -0
- package/dist/components/Form/FormTextarea.d.ts +14 -0
- package/dist/components/Form/form.transformer.d.ts +3 -0
- package/dist/components/Form/form.types.d.ts +92 -0
- package/dist/components/Icon/Icon.d.ts +17 -0
- package/dist/components/Icon/index.d.ts +1 -0
- package/dist/components/Icons/AddIcon.d.ts +4 -0
- package/dist/components/Icons/AlertsIcon.d.ts +4 -0
- package/dist/components/Icons/BellIcon.d.ts +4 -0
- package/dist/components/Icons/BluetoothIcon.d.ts +4 -0
- package/dist/components/Icons/ChartIcon.d.ts +4 -0
- package/dist/components/Icons/ChartLineColoredIcon.d.ts +4 -0
- package/dist/components/Icons/ChatBoxIcon.d.ts +4 -0
- package/dist/components/Icons/CheckIcon.d.ts +4 -0
- package/dist/components/Icons/ChevronDoubleIcon.d.ts +4 -0
- package/dist/components/Icons/ChevronDownIcon.d.ts +4 -0
- package/dist/components/Icons/ChevronRightIcon.d.ts +4 -0
- package/dist/components/Icons/CrossIcon.d.ts +4 -0
- package/dist/components/Icons/DeleteIcon.d.ts +4 -0
- package/dist/components/Icons/DownArrowIcon.d.ts +4 -0
- package/dist/components/Icons/DragIcon.d.ts +4 -0
- package/dist/components/Icons/EditIcon.d.ts +4 -0
- package/dist/components/Icons/EmptyIcon.d.ts +4 -0
- package/dist/components/Icons/EmptyStateDashboardIcon.d.ts +4 -0
- package/dist/components/Icons/ExclamationMarkIcon.d.ts +4 -0
- package/dist/components/Icons/EyeIcon.d.ts +4 -0
- package/dist/components/Icons/EyeIconSlashed.d.ts +4 -0
- package/dist/components/Icons/GearColoredIcon.d.ts +4 -0
- package/dist/components/Icons/GearIcon.d.ts +4 -0
- package/dist/components/Icons/GroupColoredIcon.d.ts +4 -0
- package/dist/components/Icons/GroupIcon.d.ts +4 -0
- package/dist/components/Icons/HamburgerIcon.d.ts +4 -0
- package/dist/components/Icons/HeartIcon.d.ts +4 -0
- package/dist/components/Icons/ImageIcon.d.ts +4 -0
- package/dist/components/Icons/InfoIcon.d.ts +4 -0
- package/dist/components/Icons/LeftArrowIcon.d.ts +4 -0
- package/dist/components/Icons/LightBulbIcon.d.ts +4 -0
- package/dist/components/Icons/LinkIcon.d.ts +4 -0
- package/dist/components/Icons/LockIcon.d.ts +4 -0
- package/dist/components/Icons/MessagesIcon.d.ts +4 -0
- package/dist/components/Icons/MouseIcon.d.ts +4 -0
- package/dist/components/Icons/NotesIcon.d.ts +4 -0
- package/dist/components/Icons/PageViewIcon.d.ts +4 -0
- package/dist/components/Icons/PinIcon.d.ts +4 -0
- package/dist/components/Icons/PrintIcon.d.ts +4 -0
- package/dist/components/Icons/RightArrowIcon.d.ts +4 -0
- package/dist/components/Icons/SearchCancelIcon.d.ts +4 -0
- package/dist/components/Icons/SearchIcon.d.ts +4 -0
- package/dist/components/Icons/SmallCircleIcon.d.ts +4 -0
- package/dist/components/Icons/SmallDiamondIcon.d.ts +4 -0
- package/dist/components/Icons/SmallSquareIcon.d.ts +4 -0
- package/dist/components/Icons/SpaceRocketIcon.d.ts +4 -0
- package/dist/components/Icons/StarIcon.d.ts +4 -0
- package/dist/components/Icons/StatusColoredIcon.d.ts +4 -0
- package/dist/components/Icons/WarningIcon.d.ts +4 -0
- package/dist/components/Icons/iconWrapper/iconWrapper.d.ts +4 -0
- package/dist/components/Icons/iconWrapper/index.d.ts +1 -0
- package/dist/components/Icons/index.d.ts +49 -0
- package/dist/components/Icons/templates/component.d.ts +3 -0
- package/dist/components/Icons/templates/index.d.ts +2 -0
- package/dist/components/Icons/types/IconProps.type.d.ts +8 -0
- package/dist/components/Image/Image.d.ts +10 -0
- package/dist/components/InfoField/InfoField.d.ts +28 -0
- package/dist/components/Input/Input.d.ts +57 -0
- package/dist/components/Input/SearchInput.d.ts +24 -0
- package/dist/components/Link/Link.d.ts +19 -0
- package/dist/components/List/List.d.ts +6 -0
- package/dist/components/List/List.types.d.ts +19 -0
- package/dist/components/List/ListItem.d.ts +4 -0
- package/dist/components/List/index.d.ts +5 -0
- package/dist/components/LoadingIndicator/LoadingIndicator.d.ts +12 -0
- package/dist/components/MediaPicker/ImageCategory.d.ts +14 -0
- package/dist/components/MediaPicker/MediaPicker.d.ts +95 -0
- package/dist/components/Modal/FullPageModal.d.ts +39 -0
- package/dist/components/Modal/FullPageModalHeader.d.ts +13 -0
- package/dist/components/Modal/Modal.d.ts +6 -0
- package/dist/components/Modal/ModalBase.d.ts +16 -0
- package/dist/components/Modal/ModalFooter.d.ts +12 -0
- package/dist/components/Modal/ModalHeader.d.ts +6 -0
- package/dist/components/Modal/subcomponents/FullPageModalActions.d.ts +18 -0
- package/dist/components/NavMenu/NavLayout.d.ts +20 -0
- package/dist/components/NavMenu/NavMenu.d.ts +16 -0
- package/dist/components/NavMenu/NavMenuContent.d.ts +3 -0
- package/dist/components/NavMenu/NavMenuFooter.d.ts +3 -0
- package/dist/components/NavMenu/NavMenuHeader.d.ts +3 -0
- package/dist/components/NavMenu/NavMenuItem.d.ts +3 -0
- package/dist/components/NavMenu/types/NavMenuFooterProps.type.d.ts +5 -0
- package/dist/components/NavMenu/types/NavMenuHeaderProps.type.d.ts +5 -0
- package/dist/components/NavMenu/types/NavMenuItemProps.type.d.ts +11 -0
- package/dist/components/NotificationBanner/NotificationBanner.d.ts +41 -0
- package/dist/components/Page/CRUDPage.d.ts +4 -0
- package/dist/components/Page/CRUDPage.types.d.ts +32 -0
- package/dist/components/Page/index.d.ts +3 -0
- package/dist/components/PageHeader/PageHeader.d.ts +4 -0
- package/dist/components/PageHeader/PageHeader.types.d.ts +28 -0
- package/dist/components/PageHeader/index.d.ts +2 -0
- package/dist/components/PaginationMenu/PaginationMenu.d.ts +3 -0
- package/dist/components/PaginationMenu/PaginationMenu.types.d.ts +37 -0
- package/dist/components/PaginationMenu/PaginationMenu.utils.d.ts +15 -0
- package/dist/components/PaginationMenu/PaginationMenuLarge.d.ts +3 -0
- package/dist/components/PaginationMenu/PaginationMenuSmall.d.ts +3 -0
- package/dist/components/PreviewPhone/PreviewPhone.d.ts +7 -0
- package/dist/components/Radio/RadioV2.d.ts +17 -0
- package/dist/components/RadioGroup/RadioGroupV2.d.ts +10 -0
- package/dist/components/Section/Section.d.ts +25 -0
- package/dist/components/Section/SectionItem.d.ts +9 -0
- package/dist/components/Section/SectionItemWithContent.d.ts +9 -0
- package/dist/components/Section/subcomponents/SectionActions.d.ts +21 -0
- package/dist/components/Select/Select.d.ts +46 -0
- package/dist/components/Select/SelectDropdownIndicator.d.ts +3 -0
- package/dist/components/Select/SelectLoadingIndicator.d.ts +3 -0
- package/dist/components/SettingsMenuButton/SettingsMenuButton.d.ts +19 -0
- package/dist/components/Spinner/Spinner.d.ts +6 -0
- package/dist/components/Steps/Step.d.ts +10 -0
- package/dist/components/Steps/Steps.d.ts +10 -0
- package/dist/components/TabLinks/TabLinks.d.ts +14 -0
- package/dist/components/Tabbar/Tabbar.d.ts +18 -0
- package/dist/components/Tabbar/TabbarItem.d.ts +16 -0
- package/dist/components/Table/Table.d.ts +16 -0
- package/dist/components/Table/Table.types.d.ts +43 -0
- package/dist/components/Table/Table.utils.d.ts +3 -0
- package/dist/components/Table/TableBody.d.ts +13 -0
- package/dist/components/Table/TableBodyRow.d.ts +10 -0
- package/dist/components/Table/TableBodyRowDataCell.d.ts +8 -0
- package/dist/components/Table/TableFooter.d.ts +8 -0
- package/dist/components/Table/TableHeader.d.ts +7 -0
- package/dist/components/Tag/Tag.d.ts +17 -0
- package/dist/components/Tag/Tag.utils.d.ts +4 -0
- package/dist/components/Tag/TagGroup.d.ts +10 -0
- package/dist/components/Text/Text.d.ts +115 -0
- package/dist/components/TextEditor/TextEditor.d.ts +17 -0
- package/dist/components/TextLink/TextLink.d.ts +14 -0
- package/dist/components/Textarea/Textarea.d.ts +29 -0
- package/dist/components/Timeline/Timeline.d.ts +14 -0
- package/dist/components/Timeline/TimelineHeader.d.ts +10 -0
- package/dist/components/Timeline/TimelineStep.d.ts +10 -0
- package/dist/components/Title/Title.d.ts +17 -0
- package/dist/components/Toaster/Toaster.d.ts +17 -0
- package/dist/components/Toaster/toast-elements-getter.d.ts +22 -0
- package/dist/components/Toaster/toast-progress-animator.d.ts +12 -0
- package/dist/components/Toaster/toast.d.ts +12 -0
- package/dist/components/ViewItem/ViewItem.d.ts +16 -0
- package/dist/index.d.ts +83 -0
- package/dist/index.development.js +5682 -0
- package/dist/index.development.js.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/types/general.types.d.ts +8 -0
- package/dist/utils/string.utils.d.ts +7 -0
- package/dist/web-ui-tailwind.css +2890 -0
- package/dist/web-ui.esm.js +2 -0
- package/dist/web-ui.esm.js.map +1 -0
- package/package.json +159 -0
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { RestPropped } from "../../types/general.types";
|
|
3
|
+
import "./Text.css";
|
|
4
|
+
/**
|
|
5
|
+
* One might argue that we're duplicating strings in this file.
|
|
6
|
+
* That's how tailwind expects to detect used classes, so please do not make
|
|
7
|
+
* anything dynamic or try to string concat class names.
|
|
8
|
+
* https://v1.tailwindcss.com/docs/controlling-file-size
|
|
9
|
+
*/
|
|
10
|
+
declare const allowedTextStyles: {
|
|
11
|
+
readonly sm: "ui-text-xs ui-font-medium";
|
|
12
|
+
readonly "sm-strong": "ui-text-xs ui-font-semibold";
|
|
13
|
+
readonly base: "ui-text-sm";
|
|
14
|
+
readonly strong: "ui-text-sm ui-font-semibold";
|
|
15
|
+
readonly lg: "";
|
|
16
|
+
readonly "lg-strong": "ui-font-semibold";
|
|
17
|
+
readonly xl: "ui-text-lg";
|
|
18
|
+
readonly "xl-strong": "ui-font-semibold ui-text-lg";
|
|
19
|
+
};
|
|
20
|
+
export declare const allowedColors: {
|
|
21
|
+
readonly base: "ui-text-slate-800";
|
|
22
|
+
readonly "slate-500": "ui-text-slate-500";
|
|
23
|
+
readonly "slate-200": "ui-text-slate-200";
|
|
24
|
+
readonly red: "ui-text-red-700";
|
|
25
|
+
readonly green: "ui-text-green-700";
|
|
26
|
+
readonly amber: "ui-text-yellow-700";
|
|
27
|
+
readonly white: "ui-text-white";
|
|
28
|
+
readonly "blue-800": "ui-text-blue-800";
|
|
29
|
+
readonly current: "ui-text-current";
|
|
30
|
+
};
|
|
31
|
+
declare const allowedHoverColors: {
|
|
32
|
+
readonly "blue-900": "hover:ui-text-blue-900";
|
|
33
|
+
readonly white: "hover:ui-text-white";
|
|
34
|
+
};
|
|
35
|
+
export type TextColor = keyof typeof allowedColors;
|
|
36
|
+
export type TextHoverColor = keyof typeof allowedHoverColors;
|
|
37
|
+
export type TextStyle = keyof typeof allowedTextStyles;
|
|
38
|
+
export interface TextProps extends RestPropped, React.ComponentPropsWithoutRef<"p"> {
|
|
39
|
+
/**
|
|
40
|
+
* @deprecated
|
|
41
|
+
* Use `children` instead, as you would with a regular `<p>` tag.
|
|
42
|
+
*/
|
|
43
|
+
text?: string;
|
|
44
|
+
/**
|
|
45
|
+
* @deprecated
|
|
46
|
+
* Use `variant` instead. "type" is a word that is too ambiguous and
|
|
47
|
+
* is also often used as an attribute name in HTML.
|
|
48
|
+
*
|
|
49
|
+
* @default "base"
|
|
50
|
+
*/
|
|
51
|
+
type?: TextStyle;
|
|
52
|
+
/**
|
|
53
|
+
* The styling variant of the text.
|
|
54
|
+
*
|
|
55
|
+
* @default "base"
|
|
56
|
+
*/
|
|
57
|
+
variant?: TextStyle;
|
|
58
|
+
/**
|
|
59
|
+
* Changes the component to be rendered inline. This is useful for
|
|
60
|
+
* using this component inside of itself, for example, when you want
|
|
61
|
+
* to render bold text inside of a paragraph rendered by this same component.
|
|
62
|
+
*
|
|
63
|
+
* @default false
|
|
64
|
+
*/
|
|
65
|
+
inline?: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* @default "base"
|
|
68
|
+
*/
|
|
69
|
+
color?: TextColor;
|
|
70
|
+
/**
|
|
71
|
+
* @default "base"
|
|
72
|
+
*/
|
|
73
|
+
hoverColor?: TextHoverColor;
|
|
74
|
+
/**
|
|
75
|
+
* Tailwind class modifier that allows you to apply hover styles on this component
|
|
76
|
+
* based on the styles of its parent.
|
|
77
|
+
* https://tailwindcss.com/docs/hover-focus-and-other-states#styling-based-on-parent-state
|
|
78
|
+
*
|
|
79
|
+
* @deprecated
|
|
80
|
+
* Since this is a Tailwind specific feature we should not expose this to the consumer. We
|
|
81
|
+
* should only use group-hover styles in the components in WebUI instead.
|
|
82
|
+
*/
|
|
83
|
+
hoverInGroup?: boolean;
|
|
84
|
+
className?: string;
|
|
85
|
+
/**
|
|
86
|
+
* Interpret an HTML string as regular markup, instead of rendering it as a string.
|
|
87
|
+
*
|
|
88
|
+
* @default false
|
|
89
|
+
*/
|
|
90
|
+
containsDangerousHtml?: boolean;
|
|
91
|
+
/**
|
|
92
|
+
* With this prop enabled, text won't wrap to the next line but instead
|
|
93
|
+
* will be truncated with an ellipsis.
|
|
94
|
+
*
|
|
95
|
+
* @default false
|
|
96
|
+
*/
|
|
97
|
+
truncate?: boolean;
|
|
98
|
+
/**
|
|
99
|
+
* When `true` will work together with the `truncate` prop
|
|
100
|
+
* and allow a max of two lines when breaking text before applying
|
|
101
|
+
* ellipsis.
|
|
102
|
+
*
|
|
103
|
+
* @default false
|
|
104
|
+
*/
|
|
105
|
+
clampLines?: boolean;
|
|
106
|
+
"data-test-id"?: string;
|
|
107
|
+
}
|
|
108
|
+
export declare const Text: {
|
|
109
|
+
(props: TextProps): JSX.Element;
|
|
110
|
+
defaultProps: {
|
|
111
|
+
variant: "base";
|
|
112
|
+
color: "base";
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
export default Text;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ReactQuillProps } from "react-quill";
|
|
3
|
+
import "react-quill/dist/quill.snow.css";
|
|
4
|
+
import "./TextEditor.scss";
|
|
5
|
+
type TextEditorProps = Pick<ReactQuillProps, "defaultValue" | "placeholder"> & {
|
|
6
|
+
onValueChange: ReactQuillProps["onChange"];
|
|
7
|
+
formats: TextEditorFormat[];
|
|
8
|
+
toolbar: TextEditorToolbarOption[][];
|
|
9
|
+
};
|
|
10
|
+
type TextEditorToolbarOption = "bold" | "italic" | "underline" | "strike" | "link" | "video" | {
|
|
11
|
+
list: "ordered";
|
|
12
|
+
} | {
|
|
13
|
+
list: "bullet";
|
|
14
|
+
};
|
|
15
|
+
type TextEditorFormat = "background" | "bold" | "color" | "font" | "code" | "italic" | "link" | "size" | "strike" | "script" | "underline" | "blockquote" | "header" | "list" | "align";
|
|
16
|
+
export declare const TextEditor: React.FC<TextEditorProps>;
|
|
17
|
+
export default TextEditor;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface TextLinkProps {
|
|
3
|
+
text: string;
|
|
4
|
+
enabled?: boolean;
|
|
5
|
+
href?: string;
|
|
6
|
+
rel?: string;
|
|
7
|
+
target?: string;
|
|
8
|
+
onClick?: () => void;
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* @deprecated Use `Link`.
|
|
13
|
+
*/
|
|
14
|
+
export declare const TextLink: (props: TextLinkProps) => JSX.Element;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React, { ChangeEvent, FocusEvent, KeyboardEvent } from "react";
|
|
2
|
+
import "./Textarea.scss";
|
|
3
|
+
declare const resizeTypes: {
|
|
4
|
+
readonly NONE: "none";
|
|
5
|
+
readonly BOTH: "both";
|
|
6
|
+
readonly HORIZONTAL: "horizontal";
|
|
7
|
+
readonly VERTICAL: "vertical";
|
|
8
|
+
};
|
|
9
|
+
export type ResizeTypes = (typeof resizeTypes)[keyof typeof resizeTypes];
|
|
10
|
+
export interface TextareaProps {
|
|
11
|
+
className?: string;
|
|
12
|
+
value?: string;
|
|
13
|
+
name?: string;
|
|
14
|
+
placeholder?: string;
|
|
15
|
+
maxLength?: number;
|
|
16
|
+
rows?: number;
|
|
17
|
+
resizable?: ResizeTypes;
|
|
18
|
+
isDisabled?: boolean;
|
|
19
|
+
icon?: string;
|
|
20
|
+
onChange: (event: ChangeEvent) => void;
|
|
21
|
+
onBlur?: (event: FocusEvent<HTMLTextAreaElement>) => void;
|
|
22
|
+
onFocus?: (event: FocusEvent<HTMLTextAreaElement>) => void;
|
|
23
|
+
onKeyPress?: (event: KeyboardEvent<HTMLTextAreaElement>) => void;
|
|
24
|
+
onKeyDown?: (event: KeyboardEvent<HTMLTextAreaElement>) => void;
|
|
25
|
+
onCtrlEnter?: () => void;
|
|
26
|
+
isError?: boolean;
|
|
27
|
+
}
|
|
28
|
+
export declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
|
|
29
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { BaseButtonProps } from "../ButtonV2/ButtonProps.type";
|
|
3
|
+
import { CenteredHeroProps } from "../CenteredHero/CenteredHero";
|
|
4
|
+
import { TimelineStepProps } from "./TimelineStep";
|
|
5
|
+
import { TimelineHeaderProps } from "./TimelineHeader";
|
|
6
|
+
export interface TimelineProps {
|
|
7
|
+
headerProps?: TimelineHeaderProps;
|
|
8
|
+
steps: TimelineStepProps[];
|
|
9
|
+
loadMoreButtonProps?: BaseButtonProps;
|
|
10
|
+
dataTestId?: string;
|
|
11
|
+
emptyHeroProps?: CenteredHeroProps;
|
|
12
|
+
}
|
|
13
|
+
export declare const Timeline: ({ headerProps, steps, loadMoreButtonProps, dataTestId, emptyHeroProps, }: TimelineProps) => JSX.Element;
|
|
14
|
+
export default Timeline;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ButtonDefinitionWithKey, ButtonProps } from "../ButtonV2/ButtonProps.type";
|
|
3
|
+
import { type TitleProps } from "../Title/Title";
|
|
4
|
+
export type TimelineHeaderProps = {
|
|
5
|
+
title?: string | TitleProps;
|
|
6
|
+
buttons?: ButtonDefinitionWithKey<ButtonProps>[];
|
|
7
|
+
withBorder?: boolean;
|
|
8
|
+
};
|
|
9
|
+
export declare const TimelineHeader: React.FC<TimelineHeaderProps>;
|
|
10
|
+
export default TimelineHeader;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React, { RefAttributes } from "react";
|
|
2
|
+
import { TextProps } from "../Text/Text";
|
|
3
|
+
export interface TimelineStepProps extends RefAttributes<HTMLDivElement> {
|
|
4
|
+
key: string | number;
|
|
5
|
+
type?: "wide" | "base" | "withoutDot" | "emptyDot";
|
|
6
|
+
title?: string | TextProps;
|
|
7
|
+
content: React.ReactNode;
|
|
8
|
+
dataTestId?: string | number;
|
|
9
|
+
}
|
|
10
|
+
export declare const TimelineStep: React.ForwardRefExoticComponent<Omit<TimelineStepProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./Title.scss";
|
|
3
|
+
import { TextColor } from "../Text/Text";
|
|
4
|
+
export type TitleStyle = "xs" | "sm" | "base" | "lg" | "xl" | "2xl";
|
|
5
|
+
export interface TitleProps {
|
|
6
|
+
text: string;
|
|
7
|
+
type?: TitleStyle;
|
|
8
|
+
color?: TextColor;
|
|
9
|
+
className?: string;
|
|
10
|
+
ref?: React.ForwardedRef<HTMLHeadingElement>;
|
|
11
|
+
}
|
|
12
|
+
export declare const Title: {
|
|
13
|
+
(props: TitleProps): JSX.Element;
|
|
14
|
+
defaultProps: {
|
|
15
|
+
type: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./Toaster.scss";
|
|
3
|
+
export interface ToasterProps {
|
|
4
|
+
type: "success" | "failure";
|
|
5
|
+
message: string;
|
|
6
|
+
title: string;
|
|
7
|
+
isVisible?: boolean;
|
|
8
|
+
/** if you need to reposition the toaster for whatever reason you can use these props */
|
|
9
|
+
styleOverwrite?: Pick<React.CSSProperties, "top" | "bottom" | "left" | "right">;
|
|
10
|
+
}
|
|
11
|
+
export declare const TOASTER_TYPE_OPTIONS: {
|
|
12
|
+
readonly SUCCESS: "success";
|
|
13
|
+
readonly FAILURE: "failure";
|
|
14
|
+
};
|
|
15
|
+
export type ToasterType = (typeof TOASTER_TYPE_OPTIONS)[keyof typeof TOASTER_TYPE_OPTIONS];
|
|
16
|
+
declare const Toaster: React.VoidFunctionComponent<ToasterProps>;
|
|
17
|
+
export default Toaster;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
interface GetToasterElementsParams {
|
|
3
|
+
timeoutId: NodeJS.Timeout;
|
|
4
|
+
progressBarAnimationFrameHandler: number;
|
|
5
|
+
}
|
|
6
|
+
interface GetToasterElementsReturn {
|
|
7
|
+
toasterElementMessage: HTMLElement;
|
|
8
|
+
toasterProgressBar: HTMLElement;
|
|
9
|
+
toasterElementTitle: HTMLElement;
|
|
10
|
+
toasterElementSuccessIcon: HTMLElement;
|
|
11
|
+
toasterElementFailureIcon: HTMLElement;
|
|
12
|
+
toasterElementContainer: HTMLElement;
|
|
13
|
+
toasterCloseButton: HTMLElement;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
*
|
|
17
|
+
* @param params.timeoutId - the timeoutId (that makes the toaster vanish), in case of a shortcut
|
|
18
|
+
* @param params.progressBarAnimationFrameHandler - animation frame id to be canceled in case of a shortcut
|
|
19
|
+
* @returns a collection of html elements to be manipulated by the animation
|
|
20
|
+
*/
|
|
21
|
+
export declare const getToasterElements: (params: GetToasterElementsParams) => GetToasterElementsReturn;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
interface AnimateProgressParams {
|
|
2
|
+
animationDuration: number;
|
|
3
|
+
progressBarElement: HTMLElement;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Reference: https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame
|
|
7
|
+
* @param params.animationDuration - the amount of seconds theui-duration will take
|
|
8
|
+
* @param params.progressBarElement - the html element for the progress bar
|
|
9
|
+
* @returns the animation frame id
|
|
10
|
+
*/
|
|
11
|
+
export declare const animateProgress: (params: AnimateProgressParams) => number;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
type ToastParams = {
|
|
2
|
+
message: string;
|
|
3
|
+
title?: string;
|
|
4
|
+
showIcon?: boolean;
|
|
5
|
+
type: "success" | "failure";
|
|
6
|
+
} | string;
|
|
7
|
+
export declare const toast: {
|
|
8
|
+
(params: ToastParams): void;
|
|
9
|
+
error(message: string): void;
|
|
10
|
+
info(message: string): void;
|
|
11
|
+
};
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { TextProps } from "../Text/Text";
|
|
3
|
+
import { RestPropped } from "../../types/general.types";
|
|
4
|
+
import { ButtonProps } from "../Button/Button.types";
|
|
5
|
+
export interface ViewItemProps<AccessoryType extends JSX.Element> extends RestPropped {
|
|
6
|
+
titleProps?: TextProps;
|
|
7
|
+
title?: string;
|
|
8
|
+
titleAccessory?: AccessoryType;
|
|
9
|
+
contentProps?: TextProps[];
|
|
10
|
+
content?: string[];
|
|
11
|
+
defaultContent?: string;
|
|
12
|
+
className?: string;
|
|
13
|
+
buttons?: ButtonProps[];
|
|
14
|
+
}
|
|
15
|
+
export declare function ViewItem<AccessoryType extends JSX.Element>({ titleProps, title, titleAccessory, contentProps, content, defaultContent, className, buttons, ...restProps }: ViewItemProps<AccessoryType>): JSX.Element;
|
|
16
|
+
export default ViewItem;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
export { FlexColumn } from "./components/Container/FlexColumn";
|
|
2
|
+
export { FlexRow } from "./components/Container/FlexRow";
|
|
3
|
+
export type { FlexContainerProps } from "./components/Container/types/FlexContainerProps.type";
|
|
4
|
+
export { default as Toaster, TOASTER_TYPE_OPTIONS, } from "./components/Toaster/Toaster";
|
|
5
|
+
export { toast } from "./components/Toaster/toast";
|
|
6
|
+
export { AccordionList, AccordionListItemProps, AccordionListProps, } from "./components/AccordionList/AccordionList";
|
|
7
|
+
export { Modal, ModalProps } from "./components/Modal/Modal";
|
|
8
|
+
export { ModalSize, ModalBaseProps } from "./components/Modal/ModalBase";
|
|
9
|
+
export { ModalHeaderProps } from "./components/Modal/ModalHeader";
|
|
10
|
+
export { ModalFooterProps, ModalFooterLeadingComponent, ModalFooterTrailingComponents, } from "./components/Modal/ModalFooter";
|
|
11
|
+
export { default as Avatar } from "./components/Avatar/Avatar";
|
|
12
|
+
export { default as Badge } from "./components/Badge/Badge";
|
|
13
|
+
export { BaseButtonProps as NonPrimaryButtonProps, ButtonWithPendingStateProps as PrimaryButtonProps, ButtonDefinition, } from "./components/ButtonV2/ButtonProps.type";
|
|
14
|
+
export { PrimaryButton } from "./components/ButtonV2/PrimaryButton";
|
|
15
|
+
export { SecondaryButton } from "./components/ButtonV2/SecondaryButton";
|
|
16
|
+
export { TertiaryButton } from "./components/ButtonV2/TertiaryButton";
|
|
17
|
+
export { default as Carousel } from "./components/Carousel/Carousel";
|
|
18
|
+
export { default as CenteredHero } from "./components/CenteredHero/CenteredHero";
|
|
19
|
+
export { Checkbox } from "./components/Checkbox/Checkbox";
|
|
20
|
+
export { ConfirmationDialog } from "./components/ConfirmationDialog/ConfirmationDialog";
|
|
21
|
+
export type { ConfirmationDialogChoice, ConfirmationDialogProps, ConfirmationDialogTitleProps, } from "./components/ConfirmationDialog/types/ConfirmationDialog.types";
|
|
22
|
+
export { default as DatePicker } from "./components/Datepicker/Datepicker";
|
|
23
|
+
export { default as Dropdown } from "./components/Dropdown/Dropdown";
|
|
24
|
+
export { EmptyListMessage } from "./components/EmptyListMessage/EmptyListMessage";
|
|
25
|
+
export { default as ErrorBlock } from "./components/ErrorBlock/ErrorBlock";
|
|
26
|
+
export { default as InfoBlock } from "./components/InfoBlock/InfoBlock";
|
|
27
|
+
export { InfoField } from "./components/InfoField/InfoField";
|
|
28
|
+
export { INPUT_TYPES, default as Input } from "./components/Input/Input";
|
|
29
|
+
export { default as Line } from "./components/Line/Line";
|
|
30
|
+
export { Table, TableProps } from "./components/Table/Table";
|
|
31
|
+
export { TableFieldConfig, TableFieldContent, TableFieldText, TableFieldAction, } from "./components/Table/Table.types";
|
|
32
|
+
export { LoadingIndicator, LoadingIndicatorProps, } from "./components/LoadingIndicator/LoadingIndicator";
|
|
33
|
+
export { default as Menu } from "./components/Menu/Menu";
|
|
34
|
+
export { List, ListItem, ListProps, ListItemProps, DraggableListProps, SortableListProps, SortableListItemProps, OnAssetLoadErrorPayload, getDndListItemProps, } from "./components/List";
|
|
35
|
+
export { CheckboxList, CheckboxListProps, } from "./components/CheckboxList/CheckboxList";
|
|
36
|
+
export { CheckboxListModal, CheckboxListModalProps, } from "./components/CheckBoxListModal/CheckboxListModal";
|
|
37
|
+
export { NavLayout, NavMenuLayoutProps } from "./components/NavMenu/NavLayout";
|
|
38
|
+
export { NavMenu } from "./components/NavMenu/NavMenu";
|
|
39
|
+
export { NotificationBanner, NotificationBannerColor, NotificationBannerLinkProps, } from "./components/NotificationBanner/NotificationBanner";
|
|
40
|
+
export { Page, CRUDPage, CRUDPageProps } from "./components/Page";
|
|
41
|
+
export { PaginationMenu } from "./components/PaginationMenu/PaginationMenu";
|
|
42
|
+
export { PageSize as PaginationMenuPageSize, OnPaginationChange as OnPaginationMenuChange, Localization as PaginationMenuLocalization, PaginationMenuProps, } from "./components/PaginationMenu/PaginationMenu.types";
|
|
43
|
+
export { default as PreviewPhone } from "./components/PreviewPhone/PreviewPhone";
|
|
44
|
+
export { default as Radio } from "./components/Radio/Radio";
|
|
45
|
+
export { default as RadioGroup } from "./components/RadioGroup/RadioGroup";
|
|
46
|
+
export { RadioProps, RadioV2 } from "./components/Radio/RadioV2";
|
|
47
|
+
export { RadioGroupProps, RadioGroupV2, } from "./components/RadioGroup/RadioGroupV2";
|
|
48
|
+
export { default as Section, SectionProps } from "./components/Section/Section";
|
|
49
|
+
export { default as SectionItemWithContent } from "./components/Section/SectionItemWithContent";
|
|
50
|
+
export { default as SectionItem, SectionItemProps, } from "./components/Section/SectionItem";
|
|
51
|
+
export { SelectProps, Select } from "./components/Select/Select";
|
|
52
|
+
export { SettingsMenuButton } from "./components/SettingsMenuButton/SettingsMenuButton";
|
|
53
|
+
export { Spinner } from "./components/Spinner/Spinner";
|
|
54
|
+
export { Steps } from "./components/Steps/Steps";
|
|
55
|
+
export { default as Switcher } from "./components/Switcher/Switcher";
|
|
56
|
+
export { ImagePicker } from "./components/MediaPicker/MediaPicker";
|
|
57
|
+
export { MediaPicker, TargetProps } from "./components/MediaPicker/MediaPicker";
|
|
58
|
+
export { default as Tabbar, TabbarProps, TabItemDetails, } from "./components/Tabbar/Tabbar";
|
|
59
|
+
export { Breadcrumbs, BreadcrumbProps } from "./components/Breadcrumbs";
|
|
60
|
+
export { PageHeader, PageHeaderProps } from "./components/PageHeader";
|
|
61
|
+
export { default as TabLinks } from "./components/TabLinks/TabLinks";
|
|
62
|
+
export { default as Tag } from "./components/Tag/Tag";
|
|
63
|
+
export { default as TagGroup } from "./components/Tag/TagGroup";
|
|
64
|
+
export { Textarea, TextareaProps, ResizeTypes, } from "./components/Textarea/Textarea";
|
|
65
|
+
export { TextEditor } from "./components/TextEditor/TextEditor";
|
|
66
|
+
export { default as TextEditorV2 } from "./components/TextEditorV2/TextEditorV2";
|
|
67
|
+
export { Link } from "./components/Link/Link";
|
|
68
|
+
export { TextLink, TextLinkProps } from "./components/TextLink/TextLink";
|
|
69
|
+
export { Title, TitleStyle } from "./components/Title/Title";
|
|
70
|
+
export { Timeline } from "./components/Timeline/Timeline";
|
|
71
|
+
export { ViewItem, ViewItemProps } from "./components/ViewItem/ViewItem";
|
|
72
|
+
export { default as Text } from "./components/Text/Text";
|
|
73
|
+
export { SearchInput, SearchInputProps } from "./components/Input/SearchInput";
|
|
74
|
+
export { GenericForm, Form, FormProps, GenericFormProps, } from "./components/Form/Form";
|
|
75
|
+
export { Icon } from "./components/Icon";
|
|
76
|
+
export type { IconProps, IconKey, } from "./components/Icons/types/IconProps.type";
|
|
77
|
+
export * from "./components/Icons";
|
|
78
|
+
export { Divider } from "./components/Divider/Divider";
|
|
79
|
+
export { FullPageModal } from "./components/Modal/FullPageModal";
|
|
80
|
+
export { Card, type CardProps } from "./components/Card/Card";
|
|
81
|
+
export { Dropzone, DropzoneProps } from "./components/Dropzone";
|
|
82
|
+
export { FilterBar, FilterBarUtils } from "./components/FilterBar";
|
|
83
|
+
export { default as DragHandle, DragHandleProps, } from "./components/DragHandle";
|