@luscii-healthtech/web-ui 0.0.0-alpha.01cea45

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.
Files changed (256) hide show
  1. package/README.md +238 -0
  2. package/dist/components/Accordion/Accordion.d.ts +10 -0
  3. package/dist/components/Accordion/AccordionItem.d.ts +9 -0
  4. package/dist/components/AccordionList/AccordionList.d.ts +42 -0
  5. package/dist/components/AccordionList/subcomponents/AccordionListActions.d.ts +18 -0
  6. package/dist/components/Avatar/Avatar.d.ts +23 -0
  7. package/dist/components/Badge/Badge.d.ts +7 -0
  8. package/dist/components/BaseList/BaseList.d.ts +7 -0
  9. package/dist/components/BaseList/BaseList.types.d.ts +55 -0
  10. package/dist/components/BaseList/BaseListEmptyState.d.ts +7 -0
  11. package/dist/components/BaseList/BaseListHeader.d.ts +4 -0
  12. package/dist/components/BaseList/BaseListIcon.d.ts +5 -0
  13. package/dist/components/BaseList/BaseListItem.d.ts +4 -0
  14. package/dist/components/BaseList/DraggableBaseList/DraggableBaseList.d.ts +4 -0
  15. package/dist/components/BaseList/DraggableBaseList/DraggableBaseListItem.d.ts +3 -0
  16. package/dist/components/BaseList/DraggableBaseList/index.d.ts +2 -0
  17. package/dist/components/BaseList/ListSkeleton/ListItemSkeleton.d.ts +2 -0
  18. package/dist/components/BaseList/ListSkeleton/ListSkeleton.d.ts +8 -0
  19. package/dist/components/BaseList/SortableBaseList/SortableBaseList.d.ts +4 -0
  20. package/dist/components/BaseList/SortableBaseList/SortableBaseListItem.d.ts +3 -0
  21. package/dist/components/BaseList/SortableBaseList/index.d.ts +2 -0
  22. package/dist/components/BaseList/index.d.ts +6 -0
  23. package/dist/components/BaseList/utils.d.ts +10 -0
  24. package/dist/components/Breadcrumbs/BreadcrumbItem.d.ts +4 -0
  25. package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +3 -0
  26. package/dist/components/Breadcrumbs/Breadcrumbs.types.d.ts +14 -0
  27. package/dist/components/Breadcrumbs/index.d.ts +2 -0
  28. package/dist/components/Button/Button.d.ts +9 -0
  29. package/dist/components/Button/Button.types.d.ts +32 -0
  30. package/dist/components/Button/ButtonIcon.d.ts +7 -0
  31. package/dist/components/ButtonV2/ButtonProps.type.d.ts +49 -0
  32. package/dist/components/ButtonV2/ButtonV2.d.ts +3 -0
  33. package/dist/components/ButtonV2/PrimaryButton.d.ts +3 -0
  34. package/dist/components/ButtonV2/SecondaryButton.d.ts +3 -0
  35. package/dist/components/ButtonV2/TertiaryButton.d.ts +3 -0
  36. package/dist/components/Card/Actions.d.ts +2 -0
  37. package/dist/components/Card/Card.d.ts +57 -0
  38. package/dist/components/Card/Padding.d.ts +6 -0
  39. package/dist/components/Card/Section.d.ts +6 -0
  40. package/dist/components/Card/TopBar.d.ts +9 -0
  41. package/dist/components/Carousel/Carousel.d.ts +8 -0
  42. package/dist/components/Carousel/GliderContainer.d.ts +7 -0
  43. package/dist/components/CenteredHero/CenteredHero.d.ts +14 -0
  44. package/dist/components/CheckBoxListModal/CheckboxListModal.d.ts +30 -0
  45. package/dist/components/Checkbox/Checkbox.d.ts +64 -0
  46. package/dist/components/CheckboxList/CheckboxGroup.d.ts +3 -0
  47. package/dist/components/CheckboxList/CheckboxList.d.ts +4 -0
  48. package/dist/components/CheckboxList/CheckboxList.types.d.ts +74 -0
  49. package/dist/components/ConfirmationDialog/ConfirmationDialog.d.ts +3 -0
  50. package/dist/components/ConfirmationDialog/ConfirmationDialogChoices.d.ts +7 -0
  51. package/dist/components/ConfirmationDialog/ConfirmationDialogMessage.d.ts +4 -0
  52. package/dist/components/ConfirmationDialog/ConfirmationDialogTitle.d.ts +3 -0
  53. package/dist/components/ConfirmationDialog/types/ConfirmationDialog.types.d.ts +41 -0
  54. package/dist/components/Container/FlexColumn.d.ts +7 -0
  55. package/dist/components/Container/FlexContainer.d.ts +9 -0
  56. package/dist/components/Container/FlexRow.d.ts +7 -0
  57. package/dist/components/Container/types/FlexContainerProps.type.d.ts +26 -0
  58. package/dist/components/Divider/Divider.d.ts +6 -0
  59. package/dist/components/DragHandle/DragHandle.d.ts +7 -0
  60. package/dist/components/DragHandle/DragHandle.types.d.ts +6 -0
  61. package/dist/components/DragHandle/index.d.ts +2 -0
  62. package/dist/components/Dropzone/Dropzone.d.ts +6 -0
  63. package/dist/components/Dropzone/Dropzone.types.d.ts +33 -0
  64. package/dist/components/Dropzone/index.d.ts +2 -0
  65. package/dist/components/EmptyListMessage/EmptyListMessage.d.ts +14 -0
  66. package/dist/components/FilterBar/ActiveFilters.d.ts +9 -0
  67. package/dist/components/FilterBar/FilterBar.d.ts +96 -0
  68. package/dist/components/FilterBar/FilterBar.utils.d.ts +32 -0
  69. package/dist/components/FilterBar/FilterBarProps.type.d.ts +86 -0
  70. package/dist/components/FilterBar/FiltersMenus.d.ts +8 -0
  71. package/dist/components/FilterBar/SortMenu.d.ts +9 -0
  72. package/dist/components/FilterBar/index.d.ts +2 -0
  73. package/dist/components/Form/Form.d.ts +30 -0
  74. package/dist/components/Form/FormFieldCheckbox.d.ts +9 -0
  75. package/dist/components/Form/FormFieldCheckboxList.d.ts +9 -0
  76. package/dist/components/Form/FormFieldErrorMessages.d.ts +8 -0
  77. package/dist/components/Form/FormFieldLabeler.d.ts +8 -0
  78. package/dist/components/Form/FormImagePicker.d.ts +9 -0
  79. package/dist/components/Form/FormInput.d.ts +14 -0
  80. package/dist/components/Form/FormRadioGroup.d.ts +13 -0
  81. package/dist/components/Form/FormSelect.d.ts +10 -0
  82. package/dist/components/Form/FormTextarea.d.ts +14 -0
  83. package/dist/components/Form/form.transformer.d.ts +3 -0
  84. package/dist/components/Form/form.types.d.ts +92 -0
  85. package/dist/components/Icon/Icon.d.ts +17 -0
  86. package/dist/components/Icon/index.d.ts +1 -0
  87. package/dist/components/Icons/BellIcon.d.ts +4 -0
  88. package/dist/components/Icons/BluetoothIcon.d.ts +4 -0
  89. package/dist/components/Icons/CalendarDayIcon.d.ts +4 -0
  90. package/dist/components/Icons/CalendarMonthIcon.d.ts +4 -0
  91. package/dist/components/Icons/CalendarRepeatIcon.d.ts +4 -0
  92. package/dist/components/Icons/ChartBarsIcon.d.ts +4 -0
  93. package/dist/components/Icons/ChartLineAndBarsIcon.d.ts +4 -0
  94. package/dist/components/Icons/ChatBubbleIcon.d.ts +4 -0
  95. package/dist/components/Icons/ChatBubbleWithTextIcon.d.ts +4 -0
  96. package/dist/components/Icons/CheckIcon.d.ts +4 -0
  97. package/dist/components/Icons/ChevronDoubleIcon.d.ts +4 -0
  98. package/dist/components/Icons/ChevronDownIcon.d.ts +4 -0
  99. package/dist/components/Icons/ChevronLeftIcon.d.ts +4 -0
  100. package/dist/components/Icons/ChevronRightIcon.d.ts +4 -0
  101. package/dist/components/Icons/ClockIcon.d.ts +4 -0
  102. package/dist/components/Icons/CogwheelIcon.d.ts +4 -0
  103. package/dist/components/Icons/CopyToClipboardIcon.d.ts +4 -0
  104. package/dist/components/Icons/CrossIcon.d.ts +4 -0
  105. package/dist/components/Icons/CrossInCircleIcon.d.ts +4 -0
  106. package/dist/components/Icons/CrossInFilledCircleIcon.d.ts +4 -0
  107. package/dist/components/Icons/DatabaseIcon.d.ts +4 -0
  108. package/dist/components/Icons/DragIndicatorIcon.d.ts +4 -0
  109. package/dist/components/Icons/EmailIcon.d.ts +4 -0
  110. package/dist/components/Icons/EmptyIcon.d.ts +4 -0
  111. package/dist/components/Icons/ExclamationMarkIcon.d.ts +4 -0
  112. package/dist/components/Icons/ExportIcon.d.ts +4 -0
  113. package/dist/components/Icons/EyeClosedIcon.d.ts +4 -0
  114. package/dist/components/Icons/EyeIconSlashed.d.ts +4 -0
  115. package/dist/components/Icons/EyeOpenIcon.d.ts +4 -0
  116. package/dist/components/Icons/FilterIcon.d.ts +4 -0
  117. package/dist/components/Icons/FireIcon.d.ts +4 -0
  118. package/dist/components/Icons/FirstAidKitIcon.d.ts +4 -0
  119. package/dist/components/Icons/FlagIcon.d.ts +4 -0
  120. package/dist/components/Icons/ForwardIcon.d.ts +4 -0
  121. package/dist/components/Icons/GroupIcon.d.ts +4 -0
  122. package/dist/components/Icons/GroupOfThreeIcon.d.ts +4 -0
  123. package/dist/components/Icons/HamburgerIcon.d.ts +4 -0
  124. package/dist/components/Icons/HandshakeIcon.d.ts +4 -0
  125. package/dist/components/Icons/HeartIcon.d.ts +4 -0
  126. package/dist/components/Icons/HomeIcon.d.ts +4 -0
  127. package/dist/components/Icons/ImageIcon.d.ts +4 -0
  128. package/dist/components/Icons/InfoIcon.d.ts +4 -0
  129. package/dist/components/Icons/LifebuoyIcon.d.ts +4 -0
  130. package/dist/components/Icons/LightBulbIcon.d.ts +4 -0
  131. package/dist/components/Icons/LinkIcon.d.ts +4 -0
  132. package/dist/components/Icons/LockIcon.d.ts +4 -0
  133. package/dist/components/Icons/LogOutIcon.d.ts +4 -0
  134. package/dist/components/Icons/MessageWithArrowIcon.d.ts +4 -0
  135. package/dist/components/Icons/MoreIcon.d.ts +4 -0
  136. package/dist/components/Icons/MouseIcon.d.ts +4 -0
  137. package/dist/components/Icons/NoteIcon.d.ts +4 -0
  138. package/dist/components/Icons/PageViewIcon.d.ts +4 -0
  139. package/dist/components/Icons/PatientIcon.d.ts +4 -0
  140. package/dist/components/Icons/PencilIcon.d.ts +4 -0
  141. package/dist/components/Icons/PhoneIcon.d.ts +4 -0
  142. package/dist/components/Icons/PieChartIcon.d.ts +4 -0
  143. package/dist/components/Icons/PinIcon.d.ts +4 -0
  144. package/dist/components/Icons/PlusIcon.d.ts +4 -0
  145. package/dist/components/Icons/PrinterIcon.d.ts +4 -0
  146. package/dist/components/Icons/RobotIcon.d.ts +4 -0
  147. package/dist/components/Icons/RocketIcon.d.ts +4 -0
  148. package/dist/components/Icons/SearchIcon.d.ts +4 -0
  149. package/dist/components/Icons/ShareIcon.d.ts +4 -0
  150. package/dist/components/Icons/SmallCircleIcon.d.ts +4 -0
  151. package/dist/components/Icons/SmallDiamondIcon.d.ts +4 -0
  152. package/dist/components/Icons/SmallSquareIcon.d.ts +4 -0
  153. package/dist/components/Icons/StarIcon.d.ts +4 -0
  154. package/dist/components/Icons/TrashBinIcon.d.ts +4 -0
  155. package/dist/components/Icons/iconWrapper/iconWrapper.d.ts +4 -0
  156. package/dist/components/Icons/iconWrapper/index.d.ts +1 -0
  157. package/dist/components/Icons/index.d.ts +244 -0
  158. package/dist/components/Icons/special-icons/ChartLineColoredIcon.d.ts +4 -0
  159. package/dist/components/Icons/special-icons/GearColoredIcon.d.ts +4 -0
  160. package/dist/components/Icons/special-icons/GroupColoredIcon.d.ts +4 -0
  161. package/dist/components/Icons/special-icons/StatusColoredIcon.d.ts +4 -0
  162. package/dist/components/Icons/special-icons/index.d.ts +4 -0
  163. package/dist/components/Icons/types/IconProps.type.d.ts +8 -0
  164. package/dist/components/Image/Image.d.ts +10 -0
  165. package/dist/components/InfoField/InfoField.d.ts +28 -0
  166. package/dist/components/Input/Input.d.ts +56 -0
  167. package/dist/components/Input/SearchInput.d.ts +24 -0
  168. package/dist/components/Link/Link.d.ts +19 -0
  169. package/dist/components/List/List.d.ts +6 -0
  170. package/dist/components/List/List.types.d.ts +19 -0
  171. package/dist/components/List/ListItem.d.ts +4 -0
  172. package/dist/components/List/index.d.ts +5 -0
  173. package/dist/components/LoadingIndicator/LoadingIndicator.d.ts +12 -0
  174. package/dist/components/MediaPicker/ImageCategory.d.ts +14 -0
  175. package/dist/components/MediaPicker/MediaPicker.d.ts +91 -0
  176. package/dist/components/Modal/FullPageModal.d.ts +41 -0
  177. package/dist/components/Modal/FullPageModalHeader.d.ts +13 -0
  178. package/dist/components/Modal/Modal.d.ts +11 -0
  179. package/dist/components/Modal/ModalBase.d.ts +16 -0
  180. package/dist/components/Modal/ModalFooter.d.ts +12 -0
  181. package/dist/components/Modal/ModalHeader.d.ts +6 -0
  182. package/dist/components/Modal/subcomponents/FullPageModalActions.d.ts +18 -0
  183. package/dist/components/NavMenu/NavLayout.d.ts +35 -0
  184. package/dist/components/NavMenu/NavMenu.d.ts +16 -0
  185. package/dist/components/NavMenu/NavMenuContent.d.ts +3 -0
  186. package/dist/components/NavMenu/NavMenuFooter.d.ts +3 -0
  187. package/dist/components/NavMenu/NavMenuHeader.d.ts +3 -0
  188. package/dist/components/NavMenu/NavMenuItem.d.ts +3 -0
  189. package/dist/components/NavMenu/types/NavMenuFooterProps.type.d.ts +5 -0
  190. package/dist/components/NavMenu/types/NavMenuHeaderProps.type.d.ts +11 -0
  191. package/dist/components/NavMenu/types/NavMenuItemProps.type.d.ts +11 -0
  192. package/dist/components/NotificationBanner/NotificationBanner.d.ts +41 -0
  193. package/dist/components/Page/CRUDPage.d.ts +4 -0
  194. package/dist/components/Page/CRUDPage.types.d.ts +32 -0
  195. package/dist/components/Page/index.d.ts +3 -0
  196. package/dist/components/PageHeader/PageHeader.d.ts +4 -0
  197. package/dist/components/PageHeader/PageHeader.types.d.ts +28 -0
  198. package/dist/components/PageHeader/index.d.ts +2 -0
  199. package/dist/components/PaginationMenu/PaginationMenu.d.ts +3 -0
  200. package/dist/components/PaginationMenu/PaginationMenu.types.d.ts +37 -0
  201. package/dist/components/PaginationMenu/PaginationMenu.utils.d.ts +15 -0
  202. package/dist/components/PaginationMenu/PaginationMenuLarge.d.ts +3 -0
  203. package/dist/components/PaginationMenu/PaginationMenuSmall.d.ts +3 -0
  204. package/dist/components/PreviewPhone/PreviewPhone.d.ts +7 -0
  205. package/dist/components/Radio/RadioV2.d.ts +17 -0
  206. package/dist/components/RadioGroup/RadioGroupV2.d.ts +10 -0
  207. package/dist/components/Section/Section.d.ts +25 -0
  208. package/dist/components/Section/SectionItem.d.ts +9 -0
  209. package/dist/components/Section/SectionItemWithContent.d.ts +9 -0
  210. package/dist/components/Section/subcomponents/SectionActions.d.ts +21 -0
  211. package/dist/components/Select/Select.d.ts +46 -0
  212. package/dist/components/Select/SelectDropdownIndicator.d.ts +3 -0
  213. package/dist/components/Select/SelectLoadingIndicator.d.ts +3 -0
  214. package/dist/components/SettingsMenuButton/SettingsMenuButton.d.ts +19 -0
  215. package/dist/components/Spinner/Spinner.d.ts +6 -0
  216. package/dist/components/Steps/Step.d.ts +10 -0
  217. package/dist/components/Steps/Steps.d.ts +10 -0
  218. package/dist/components/Tabbar/Tabbar.d.ts +18 -0
  219. package/dist/components/Tabbar/TabbarItem.d.ts +16 -0
  220. package/dist/components/Table/Table.d.ts +16 -0
  221. package/dist/components/Table/Table.types.d.ts +42 -0
  222. package/dist/components/Table/Table.utils.d.ts +3 -0
  223. package/dist/components/Table/TableBody.d.ts +13 -0
  224. package/dist/components/Table/TableBodyRow.d.ts +10 -0
  225. package/dist/components/Table/TableBodyRowDataCell.d.ts +8 -0
  226. package/dist/components/Table/TableFooter.d.ts +8 -0
  227. package/dist/components/Table/TableHeader.d.ts +7 -0
  228. package/dist/components/Tag/Tag.d.ts +26 -0
  229. package/dist/components/Tag/TagGroup.d.ts +23 -0
  230. package/dist/components/Text/Text.d.ts +115 -0
  231. package/dist/components/TextEditor/TextEditor.d.ts +53 -0
  232. package/dist/components/TextLink/TextLink.d.ts +14 -0
  233. package/dist/components/Textarea/Textarea.d.ts +33 -0
  234. package/dist/components/Timeline/Timeline.d.ts +14 -0
  235. package/dist/components/Timeline/TimelineHeader.d.ts +10 -0
  236. package/dist/components/Timeline/TimelineStep.d.ts +10 -0
  237. package/dist/components/Title/Title.d.ts +31 -0
  238. package/dist/components/Toaster/Toaster.d.ts +17 -0
  239. package/dist/components/Toaster/toast-elements-getter.d.ts +22 -0
  240. package/dist/components/Toaster/toast-progress-animator.d.ts +12 -0
  241. package/dist/components/Toaster/toast.d.ts +12 -0
  242. package/dist/components/UnorderedList/UnorderedList.d.ts +61 -0
  243. package/dist/components/VerticalMenu/VerticalMenu.d.ts +84 -0
  244. package/dist/components/ViewItem/ViewItem.d.ts +16 -0
  245. package/dist/components/WeekdaysPicker/WeekdaysPicker.d.ts +42 -0
  246. package/dist/index.d.ts +82 -0
  247. package/dist/index.development.js +6063 -0
  248. package/dist/index.development.js.map +1 -0
  249. package/dist/index.js +2 -0
  250. package/dist/index.js.map +1 -0
  251. package/dist/types/general.types.d.ts +8 -0
  252. package/dist/utils/string.utils.d.ts +7 -0
  253. package/dist/web-ui-tailwind.css +3082 -0
  254. package/dist/web-ui.esm.js +2 -0
  255. package/dist/web-ui.esm.js.map +1 -0
  256. package/package.json +165 -0
@@ -0,0 +1,19 @@
1
+ /// <reference types="react" />
2
+ import type { BaseListProps, BaseListItemProps, OnAssetLoadErrorPayload, DraggableBaseListProps, SortableBaseListProps } from "../BaseList/BaseList.types";
3
+ export type ListItemProps = Omit<BaseListItemProps, "onClick"> & {
4
+ handleItemClick?: (e: React.MouseEvent<HTMLLIElement>) => void;
5
+ };
6
+ export type DefaultListProps = Omit<BaseListProps<ListItemProps>, "renderItem" | "itemComponent"> & {
7
+ onDragEnd?: (itemId: string | number, newIndex: number) => void;
8
+ onAssetLoadError?: (payload: OnAssetLoadErrorPayload) => void;
9
+ };
10
+ export type DraggableListProps = DraggableBaseListProps;
11
+ export type SortableListProps = SortableBaseListProps;
12
+ export type SortableListItemProps = SortableListProps["items"][number];
13
+ export type ListProps = ({
14
+ draggableListType: "default";
15
+ } & DefaultListProps) | ({
16
+ draggableListType: "draggable";
17
+ } & DraggableListProps) | ({
18
+ draggableListType: "sortable";
19
+ } & SortableListProps) | DefaultListProps;
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import { ListItemProps } from "./List.types";
3
+ export declare const ListItem: React.FC<ListItemProps>;
4
+ export default ListItem;
@@ -0,0 +1,5 @@
1
+ export { default as List } from "./List";
2
+ export { ListItem } from "./ListItem";
3
+ export type { ListProps, ListItemProps, DraggableListProps, SortableListProps, SortableListItemProps, } from "./List.types";
4
+ export type { OnAssetLoadErrorPayload } from "../BaseList";
5
+ export { getDndListItemProps } from "../BaseList";
@@ -0,0 +1,12 @@
1
+ /// <reference types="react" />
2
+ import { RestPropped } from "../../types/general.types";
3
+ import "./LoadingIndicator.scss";
4
+ export interface LoadingIndicatorProps extends RestPropped {
5
+ asModal?: boolean;
6
+ asSpinner?: boolean;
7
+ className?: string;
8
+ spinnerColor?: "blue" | "gray";
9
+ dataTestId?: string;
10
+ }
11
+ export declare function LoadingIndicator({ asModal, asSpinner, className, spinnerColor, dataTestId, ...restProps }: LoadingIndicatorProps): JSX.Element;
12
+ export default LoadingIndicator;
@@ -0,0 +1,14 @@
1
+ import React, { MouseEventHandler } from "react";
2
+ export interface CategoryProps {
3
+ folder: string;
4
+ key: string;
5
+ }
6
+ interface ImageCategoryProps {
7
+ category: CategoryProps;
8
+ images: string[];
9
+ highlightedImage: string | null;
10
+ handleImageClick: MouseEventHandler<HTMLSpanElement>;
11
+ isTypeCompact: boolean;
12
+ }
13
+ export declare const ImageCategory: (props: ImageCategoryProps) => React.JSX.Element;
14
+ export {};
@@ -0,0 +1,91 @@
1
+ import React from "react";
2
+ import { CategoryProps } from "./ImageCategory";
3
+ export interface TargetProps {
4
+ target: {
5
+ name: string | null | undefined;
6
+ /**
7
+ * It is called imageData, but it can any file that was selected. The name is kept for backwards compatibility for now.
8
+ */
9
+ value: string | null | undefined | {
10
+ imageData: FormData;
11
+ };
12
+ };
13
+ }
14
+ export interface ImagePickerProps {
15
+ name: string;
16
+ images: string[];
17
+ categories: CategoryProps[];
18
+ preselectedImage?: string;
19
+ preselectedMediaType?: "image" | "video";
20
+ /**
21
+ * Array of [valid MIME types](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types).
22
+ *
23
+ * If the media the user tries to upload doesn't match one of the
24
+ * MIME types in this array, an error message will be displayed in
25
+ * the UI.
26
+ *
27
+ * @example
28
+ * ```tsx
29
+ * <MediaPicker acceptedMimeTypes={[ "text/*", "image/jpeg", "video/mp4"]} />
30
+ * ```
31
+ */
32
+ acceptedMimeTypes?: string[];
33
+ /**
34
+ * Maximum file size allowed to be uploaded in MB. If undefined, a default limit of 100mb is applied.
35
+ */
36
+ maxFileSize?: number;
37
+ clearImageIndex?: number;
38
+ type?: "normal" | "compact";
39
+ isDisabled?: boolean;
40
+ handleChange: (target: TargetProps) => void;
41
+ isUploadButtonVisible?: boolean;
42
+ isClearButtonVisible?: boolean;
43
+ isUploading?: boolean;
44
+ isErrorUploading?: boolean;
45
+ localisation: Partial<Record<"openModalButton" | "selectButton" | "error" | "uploadImage" | "clearSelection" | "cancel" | "search" | "unsupportedMediaType" | "modalTitle", string>>;
46
+ }
47
+ export declare const ImagePickerInner: React.FC<ImagePickerProps & {
48
+ innerRef?: React.Ref<HTMLButtonElement>;
49
+ }>;
50
+ export interface MediaPickerProps {
51
+ name: string;
52
+ media: string[];
53
+ categories: CategoryProps[];
54
+ /**
55
+ * If you add preselectedMedia you must also specify preselectedMediaType, especially if it is not an image.
56
+ *
57
+ * @example
58
+ * ```tsx
59
+ * <MediaPicker preselectedMedia="http://www.domain.com/someVideo.mp4" preselectedMediaType="video"/>
60
+ * ```
61
+ */
62
+ preselectedMedia?: string;
63
+ preselectedMediaType?: "image" | "video";
64
+ clearIndex?: number;
65
+ type?: "normal" | "compact";
66
+ /**
67
+ * Array of [valid MIME types](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types).
68
+ *
69
+ * If the media the user tries to upload doesn't match one of the
70
+ * MIME types in this array, an error message will be displayed in
71
+ * the UI.
72
+ *
73
+ * @example
74
+ * ```tsx
75
+ * <MediaPicker acceptedMimeTypes={[ "text/*", "image/jpeg", "video/mp4"]} />
76
+ * ```
77
+ */
78
+ acceptedMimeTypes?: string[];
79
+ /**
80
+ * Maximum file size allowed to be uploaded in MB. If undefined, a default limit of 100mb is applied.
81
+ */
82
+ maxFileSize?: number;
83
+ isDisabled?: boolean;
84
+ onChange: (target: TargetProps) => void;
85
+ isUploadButtonVisible?: boolean;
86
+ isClearButtonVisible?: boolean;
87
+ isUploading?: boolean;
88
+ isErrorUploading?: boolean;
89
+ localisation: Partial<Record<"openModalButton" | "selectButton" | "error" | "upload" | "clearSelection" | "cancel" | "search" | "unsupportedMediaType" | "modalTitle", string>>;
90
+ }
91
+ export declare const MediaPicker: React.ForwardRefExoticComponent<MediaPickerProps & React.RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,41 @@
1
+ import React from "react";
2
+ import ReactModal from "react-modal";
3
+ import { PrimaryButtonProps } from "../ButtonV2/ButtonProps.type";
4
+ import { FullPageModalActions } from "./subcomponents/FullPageModalActions";
5
+ export type FullPageModalProps = {
6
+ children: React.ReactNode;
7
+ isOpen?: boolean;
8
+ title: string;
9
+ dataTestId?: string;
10
+ /**
11
+ * @deprecated
12
+ * Use the `actions` prop to render any button(s)
13
+ * or other component(s) automatically in the correct area.
14
+ *
15
+ * This prop will only render a button when the actions prop is omitted.
16
+ * The actions prop takes precedence over this prop if they're both passed.
17
+ */
18
+ primaryButtonProps?: PrimaryButtonProps;
19
+ /**
20
+ * Render buttons or other action components in the area meant for actions.
21
+ * To correctly space out the actions wrap them in a FullPageModal.Actions component.
22
+ * @usage
23
+ * ```tsx
24
+ * <FullPageModal
25
+ * actions={
26
+ * <FullPageModal.Actions>
27
+ * <PrimaryButton />
28
+ * <SecondaryButton />
29
+ * </FullPageModal.Actions>
30
+ * }
31
+ * />
32
+ */
33
+ actions?: React.ReactNode;
34
+ onCloseClick: (event: React.MouseEvent<Element, MouseEvent> | React.KeyboardEvent<Element>) => void;
35
+ };
36
+ interface StaticComponents {
37
+ Actions: typeof FullPageModalActions;
38
+ setAppElement: typeof ReactModal.setAppElement;
39
+ }
40
+ export declare const FullPageModal: React.FC<FullPageModalProps> & StaticComponents;
41
+ export {};
@@ -0,0 +1,13 @@
1
+ import React from "react";
2
+ import { PrimaryButtonProps } from "../ButtonV2/ButtonProps.type";
3
+ export type FullPageModalHeaderProps = {
4
+ title: string;
5
+ /**
6
+ * @deprecated
7
+ * Use the `actions` prop to render any button(s)
8
+ * or other component(s) automatically in the correct area.
9
+ */
10
+ primaryButtonProps?: PrimaryButtonProps;
11
+ actions?: React.ReactNode;
12
+ };
13
+ export declare const FullPageModalHeader: React.FC<FullPageModalHeaderProps>;
@@ -0,0 +1,11 @@
1
+ import React from "react";
2
+ import ReactModal from "react-modal";
3
+ import { ModalBaseProps } from "./ModalBase";
4
+ export type ModalProps = Omit<ModalBaseProps, "title" | "withExtraMarginTop"> & {
5
+ title: string;
6
+ };
7
+ interface StaticProperties {
8
+ setAppElement: typeof ReactModal.setAppElement;
9
+ }
10
+ export declare const Modal: React.FC<ModalProps> & StaticProperties;
11
+ export {};
@@ -0,0 +1,16 @@
1
+ import React from "react";
2
+ import { ModalHeaderProps } from "./ModalHeader";
3
+ import { ModalFooterProps } from "./ModalFooter";
4
+ export type ModalSize = "small" | "medium" | "wide";
5
+ export type ModalBaseProps = Omit<ModalHeaderProps, "title"> & {
6
+ children: React.ReactNode;
7
+ size?: ModalSize;
8
+ withExtraMarginTop?: boolean;
9
+ withContentPaddingY?: boolean;
10
+ isOpen?: boolean;
11
+ title?: string;
12
+ dataTestId?: string;
13
+ scrollableContent?: boolean;
14
+ onCloseClick: (event: React.MouseEvent<Element, MouseEvent> | React.KeyboardEvent<Element>) => void;
15
+ } & ModalFooterProps;
16
+ export declare const ModalBase: React.FC<ModalBaseProps>;
@@ -0,0 +1,12 @@
1
+ import React from "react";
2
+ import { ButtonWithPendingStateProps, NonPrimaryButtonProps, PrimaryButtonProps } from "../ButtonV2/ButtonProps.type";
3
+ export interface ModalFooterTrailingComponents {
4
+ primaryButtonProps: PrimaryButtonProps;
5
+ secondaryButtonProps?: NonPrimaryButtonProps;
6
+ }
7
+ export type ModalFooterLeadingComponent = string | ButtonWithPendingStateProps;
8
+ export type ModalFooterProps = {
9
+ footerLeadingComponent?: ModalFooterLeadingComponent;
10
+ footerTrailingComponents: ModalFooterTrailingComponents;
11
+ };
12
+ export declare const ModalFooter: React.FC<ModalFooterProps>;
@@ -0,0 +1,6 @@
1
+ import React from "react";
2
+ export type ModalHeaderProps = {
3
+ title: string;
4
+ onCloseClick: (event: React.MouseEvent<HTMLButtonElement>) => void;
5
+ };
6
+ export declare const ModalHeader: React.FC<ModalHeaderProps>;
@@ -0,0 +1,18 @@
1
+ import React from "react";
2
+ /**
3
+ * Use in the actions of a FullPageModal. Spaces out the action
4
+ * components correctly in relation to the styling of the FullPageModal component.
5
+ *
6
+ * @usage
7
+ * ```tsx
8
+ * <FullPageModal
9
+ * actions={
10
+ * <FullPageModal.Actions>
11
+ * <PrimaryButton />
12
+ * <SecondaryButton />
13
+ * </FullPageModal.Actions>
14
+ * }
15
+ * />
16
+ * ```
17
+ */
18
+ export declare const FullPageModalActions: React.FC<React.PropsWithChildren>;
@@ -0,0 +1,35 @@
1
+ import React from "react";
2
+ export interface Props extends React.ComponentPropsWithoutRef<"div"> {
3
+ menu: React.ReactNode;
4
+ /**
5
+ * This property is used everywhere BUT in PatientPages.js, because the layout there works very differently than
6
+ * in the other pages. With JavaScript calculations for heights, etc to make sure everything fits.
7
+ */
8
+ pageHeader?: JSX.Element;
9
+ /**
10
+ * Rendered as the main page content.
11
+ */
12
+ children: React.ReactNode;
13
+ /**
14
+ * If passed will show the patients sidebar.
15
+ */
16
+ patientSidebar?: JSX.Element | null;
17
+ /**
18
+ * Don't show any navigation, for instance when constrained to a single patient.
19
+ */
20
+ isNavDisabled?: boolean;
21
+ /**
22
+ * The patient overview page has some challenges we want to overcome in regards to the multiple scrollable
23
+ * content (the charts and the action bar with alerts, etc).
24
+ *
25
+ * In order to have the setup working on the patient overview page and the rest of the application, we have to
26
+ * programmatically disable/enable if that location will have a normal scrolling mechanism with specific margin/padding,
27
+ * or we will need to let the components take care of that.
28
+ */
29
+ disableScrolling?: boolean;
30
+ /**
31
+ * Whether the layout is rendering in the viewer. Usually the result of the `useInViewer` hook.
32
+ */
33
+ isInViewer?: boolean;
34
+ }
35
+ export declare const NavLayout: React.FC<Props>;
@@ -0,0 +1,16 @@
1
+ /// <reference types="react" />
2
+ import { NavMenuFooterProps } from "./types/NavMenuFooterProps.type";
3
+ import { NavMenuItemProps } from "./types/NavMenuItemProps.type";
4
+ import { NavMenuHeaderProps } from "./types/NavMenuHeaderProps.type";
5
+ export type NavMenuProps = {
6
+ roleItems: NavMenuItemProps[];
7
+ publicItems: NavMenuItemProps[];
8
+ authenticationItems: {
9
+ login: NavMenuItemProps;
10
+ logout: NavMenuItemProps;
11
+ };
12
+ isUserAuthenticated?: boolean;
13
+ navMenuHeaderProps: NavMenuHeaderProps;
14
+ navMenuFooterProps: NavMenuFooterProps;
15
+ };
16
+ export declare function NavMenu(props: NavMenuProps): JSX.Element;
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ import { NavMenuProps } from "./NavMenu";
3
+ export declare const NavMenuContent: React.FC<NavMenuProps>;
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ import { NavMenuFooterProps } from "./types/NavMenuFooterProps.type";
3
+ export declare const NavMenuFooter: React.FC<NavMenuFooterProps>;
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ import { NavMenuHeaderProps } from "./types/NavMenuHeaderProps.type";
3
+ export declare const NavMenuHeader: React.FC<NavMenuHeaderProps>;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { NavMenuItemProps } from "./types/NavMenuItemProps.type";
3
+ export declare const NavMenuItem: (props: NavMenuItemProps) => JSX.Element;
@@ -0,0 +1,5 @@
1
+ export interface NavMenuFooterProps {
2
+ text: string;
3
+ subtext?: string;
4
+ visible?: boolean;
5
+ }
@@ -0,0 +1,11 @@
1
+ /// <reference types="react" />
2
+ export interface NavMenuHeaderProps {
3
+ text: string;
4
+ /**
5
+ * Optional content to be displayed underneath the header text, matching the left spacing and a 4px top padding
6
+ * against the header text.
7
+ */
8
+ belowHeader?: JSX.Element;
9
+ visible?: boolean;
10
+ onClick?: () => void;
11
+ }
@@ -0,0 +1,11 @@
1
+ export type NavMenuItemProps = {
2
+ href?: string;
3
+ linkTo?: string;
4
+ title: string;
5
+ isSelected: boolean;
6
+ img: string;
7
+ imgOnHover: string;
8
+ dataTestId: string;
9
+ isExternal?: boolean;
10
+ trackEvent?: () => void;
11
+ };
@@ -0,0 +1,41 @@
1
+ import React from "react";
2
+ import { IconProps } from "../Icons/types/IconProps.type";
3
+ import "./NotificationBanner.css";
4
+ export type NotificationBannerColor = "base" | "blue" | "red" | "green" | "amber";
5
+ export interface NotificationBannerLinkProps {
6
+ text: string;
7
+ enabled: boolean;
8
+ handleClick?: () => void;
9
+ }
10
+ interface NotificationBannerPropsWithText {
11
+ text?: string;
12
+ linkProps?: NotificationBannerLinkProps;
13
+ children?: never;
14
+ }
15
+ interface NotificationBannerPropsWithChildren {
16
+ children: React.ReactNode;
17
+ text?: never;
18
+ linkProps?: never;
19
+ }
20
+ export type NotificationBannerProps = (NotificationBannerPropsWithChildren | NotificationBannerPropsWithText) & {
21
+ color?: NotificationBannerColor;
22
+ /**
23
+ * The icon can either be one of our icon components or an image url
24
+ */
25
+ icon?: string | React.FunctionComponent<IconProps>;
26
+ className?: string;
27
+ stretch?: boolean;
28
+ /**
29
+ * When stretching the banner, you can also decide if the content should be centered or not.
30
+ */
31
+ centerContent?: boolean;
32
+ noBorder?: null | boolean;
33
+ };
34
+ export declare const NotificationBanner: {
35
+ (props: NotificationBannerProps): JSX.Element;
36
+ defaultProps: {
37
+ color: "base";
38
+ onButtonClick: undefined;
39
+ };
40
+ };
41
+ export {};
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import type { CRUDPageProps } from "./CRUDPage.types";
3
+ declare const CRUDPage: React.FC<CRUDPageProps>;
4
+ export default CRUDPage;
@@ -0,0 +1,32 @@
1
+ /// <reference types="react" />
2
+ import type { BaseButtonProps } from "../ButtonV2/ButtonProps.type";
3
+ import type { PageHeaderProps } from "../PageHeader";
4
+ import type { StepsProps } from "../Steps/Steps";
5
+ type CRUDPageButtonProps = Pick<BaseButtonProps, "onClick" | "text" | "isDisabled">;
6
+ type CRUDPageTitle = {
7
+ text: string;
8
+ icon?: string;
9
+ };
10
+ type CRUDPageHeader = Omit<PageHeaderProps, "navigation" | "isPolling" | "accessories">;
11
+ type CRUDPagePropsWithoutHeaderOrTitle = {
12
+ dataTestId?: string;
13
+ submitButtonProps?: CRUDPageButtonProps;
14
+ cancelButtonProps?: CRUDPageButtonProps;
15
+ className?: string;
16
+ isLoading?: boolean;
17
+ isSubmitting?: boolean;
18
+ children?: React.ReactNode;
19
+ steps?: {
20
+ titles: StepsProps["orderedStepTitles"];
21
+ currentStep: StepsProps["currentStep"];
22
+ localization: StepsProps["localization"];
23
+ };
24
+ };
25
+ export type CRUDPageProps = (CRUDPagePropsWithoutHeaderOrTitle & {
26
+ title: CRUDPageTitle;
27
+ header?: never;
28
+ }) | (CRUDPagePropsWithoutHeaderOrTitle & {
29
+ header: CRUDPageHeader;
30
+ title?: never;
31
+ });
32
+ export {};
@@ -0,0 +1,3 @@
1
+ export { default as Page } from "./Page";
2
+ export { default as CRUDPage } from "./CRUDPage";
3
+ export type { CRUDPageProps } from "./CRUDPage.types";
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import { PageHeaderProps } from "./PageHeader.types";
3
+ declare const PageHeader: React.FC<PageHeaderProps>;
4
+ export default PageHeader;
@@ -0,0 +1,28 @@
1
+ /// <reference types="react" />
2
+ import type { BreadcrumbProps } from "../Breadcrumbs";
3
+ import { NotificationBannerColor } from "../NotificationBanner/NotificationBanner";
4
+ import type { TabbarProps } from "../Tabbar/Tabbar";
5
+ type Nil = null | undefined;
6
+ type WithPageHeaderBanner = {
7
+ banner: Nil | {
8
+ title?: string;
9
+ text: {
10
+ content: string;
11
+ isHTML?: boolean;
12
+ };
13
+ color: NotificationBannerColor;
14
+ noBorder?: boolean | null;
15
+ };
16
+ };
17
+ export type PageHeaderProps = {
18
+ navigation?: Omit<TabbarProps, "withoutPadding">;
19
+ breadcrumbs?: BreadcrumbProps["crumbs"];
20
+ truncateBreadcrumbsAfter?: number;
21
+ dataTestId?: string;
22
+ title: string;
23
+ isPolling?: boolean;
24
+ className?: string;
25
+ contained?: boolean;
26
+ accessories?: React.ReactNode;
27
+ } & WithPageHeaderBanner;
28
+ export {};
@@ -0,0 +1,2 @@
1
+ export { default as PageHeader } from "./PageHeader";
2
+ export type { PageHeaderProps } from "./PageHeader.types";
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { PaginationMenuProps } from "./PaginationMenu.types";
3
+ export declare const PaginationMenu: (props: PaginationMenuProps) => JSX.Element;
@@ -0,0 +1,37 @@
1
+ export interface PaginationMenuProps {
2
+ pageCount: number;
3
+ currentPageNumber: number;
4
+ onChange: OnPaginationChange;
5
+ pageSize?: PageSize;
6
+ localization?: Localization;
7
+ resultCount?: number;
8
+ small?: boolean;
9
+ className?: string;
10
+ }
11
+ export interface PaginationMenuSmallProps {
12
+ pageCount: number;
13
+ currentPageNumber: number;
14
+ onChange: OnPaginationChange;
15
+ pageSize?: PageSize;
16
+ }
17
+ export interface PaginationMenuLargeProps {
18
+ pageCount: number;
19
+ currentPageNumber: number;
20
+ onChange: OnPaginationChange;
21
+ pageSize?: PageSize;
22
+ localization: Localization;
23
+ resultCount?: number;
24
+ }
25
+ export type OnPaginationChange = (pageNumber: number, pageSize?: PageSize) => void;
26
+ export type PageSize = 25 | 50 | 75 | 100;
27
+ export interface Localization {
28
+ display: string;
29
+ page: string;
30
+ previous: string;
31
+ next: string;
32
+ of: string;
33
+ }
34
+ export type Option = {
35
+ value: number;
36
+ label: string;
37
+ };
@@ -0,0 +1,15 @@
1
+ import { Localization, Option, PageSize } from "./PaginationMenu.types";
2
+ export declare const PAGE_SIZE_OPTIONS: {
3
+ label: string;
4
+ value: PageSize;
5
+ }[];
6
+ export declare const getPageNumberOptions: (pageCount: number) => Option[];
7
+ /**
8
+ *
9
+ * @returns When the pageSize and resultCount params are present,
10
+ * this function returns a text indicating the range of elements that are being displayed,
11
+ * otherwise it returns a text indicating the current page and the page count.
12
+ * @example 1-50 of 100
13
+ *
14
+ */
15
+ export declare const getSummaryText: (pageCount: number, currentPageNumber: number, localization: Localization, pageSize?: number, resultCount?: number) => string;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { PaginationMenuLargeProps } from "./PaginationMenu.types";
3
+ export declare const PaginationMenuLarge: (props: PaginationMenuLargeProps) => JSX.Element;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { PaginationMenuSmallProps } from "./PaginationMenu.types";
3
+ export declare const PaginationMenuSmall: (props: PaginationMenuSmallProps) => JSX.Element;
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ interface PreviewPhoneProps {
3
+ className?: string;
4
+ children: React.ReactNode;
5
+ }
6
+ declare const PreviewPhone: ({ className, children, }: PreviewPhoneProps) => JSX.Element;
7
+ export default PreviewPhone;
@@ -0,0 +1,17 @@
1
+ import React from "react";
2
+ import "./RadioV2.css";
3
+ export interface RadioProps extends React.InputHTMLAttributes<HTMLInputElement> {
4
+ name: string;
5
+ value: string | number;
6
+ text?: string;
7
+ info?: string;
8
+ isError?: boolean;
9
+ innerRef?: React.Ref<HTMLInputElement>;
10
+ }
11
+ /**
12
+ * TODO: The CSS styling is all messed up, including isError
13
+ * Warning: don't use this prop before this is resolved
14
+ * Issue to track: https://github.com/Luscii/web-ui/issues/57
15
+ * TODO: remove this comment once this is resolved
16
+ */
17
+ export declare const RadioV2: React.ForwardRefExoticComponent<RadioProps & React.RefAttributes<HTMLInputElement>>;
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ import { RadioProps } from "../Radio/RadioV2";
3
+ export interface RadioGroupProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "name" | "value" | "checked"> {
4
+ name: string;
5
+ isError?: boolean;
6
+ options: Omit<RadioProps, "name">[];
7
+ innerRef?: React.Ref<HTMLInputElement>;
8
+ title?: string;
9
+ }
10
+ export declare const RadioGroupV2: React.ForwardRefExoticComponent<RadioGroupProps & React.RefAttributes<HTMLInputElement>>;
@@ -0,0 +1,25 @@
1
+ import React from "react";
2
+ import { ButtonProps } from "../Button/Button.types";
3
+ import { LoadingIndicatorProps } from "../LoadingIndicator/LoadingIndicator";
4
+ import { RestPropped } from "../../types/general.types";
5
+ import "./Section.scss";
6
+ export interface SectionProps extends RestPropped {
7
+ title?: string;
8
+ /**
9
+ * @deprecated
10
+ * Use the `headerAside` prop to render any button(s)
11
+ * or other component(s) automatically in the correct area.
12
+ */
13
+ buttons?: ButtonProps[];
14
+ footer?: React.ReactNode;
15
+ className?: string;
16
+ isLoading?: boolean;
17
+ loadingIndicatorProps?: LoadingIndicatorProps;
18
+ children?: React.ReactNode;
19
+ /**
20
+ * Rendered opposite of the `title`.
21
+ */
22
+ headerAside?: React.ReactNode;
23
+ }
24
+ export declare function Section({ title, buttons, footer, children, headerAside, className, isLoading, loadingIndicatorProps, ...restProps }: SectionProps): JSX.Element;
25
+ export default Section;