@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.
Files changed (229) hide show
  1. package/README.md +179 -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/Badge/Badge.d.ts +7 -0
  7. package/dist/components/BaseList/BaseList.d.ts +7 -0
  8. package/dist/components/BaseList/BaseList.types.d.ts +55 -0
  9. package/dist/components/BaseList/BaseListEmptyState.d.ts +7 -0
  10. package/dist/components/BaseList/BaseListHeader.d.ts +4 -0
  11. package/dist/components/BaseList/BaseListIcon.d.ts +5 -0
  12. package/dist/components/BaseList/BaseListItem.d.ts +4 -0
  13. package/dist/components/BaseList/DraggableBaseList/DraggableBaseList.d.ts +4 -0
  14. package/dist/components/BaseList/DraggableBaseList/DraggableBaseListItem.d.ts +3 -0
  15. package/dist/components/BaseList/DraggableBaseList/index.d.ts +2 -0
  16. package/dist/components/BaseList/ListSkeleton/ListItemSkeleton.d.ts +2 -0
  17. package/dist/components/BaseList/ListSkeleton/ListSkeleton.d.ts +8 -0
  18. package/dist/components/BaseList/SortableBaseList/SortableBaseList.d.ts +4 -0
  19. package/dist/components/BaseList/SortableBaseList/SortableBaseListItem.d.ts +3 -0
  20. package/dist/components/BaseList/SortableBaseList/index.d.ts +2 -0
  21. package/dist/components/BaseList/index.d.ts +6 -0
  22. package/dist/components/BaseList/utils.d.ts +10 -0
  23. package/dist/components/Breadcrumbs/BreadcrumbItem.d.ts +4 -0
  24. package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +3 -0
  25. package/dist/components/Breadcrumbs/Breadcrumbs.types.d.ts +14 -0
  26. package/dist/components/Breadcrumbs/index.d.ts +2 -0
  27. package/dist/components/Button/Button.d.ts +9 -0
  28. package/dist/components/Button/Button.types.d.ts +32 -0
  29. package/dist/components/Button/ButtonIcon.d.ts +7 -0
  30. package/dist/components/ButtonV2/ButtonProps.type.d.ts +49 -0
  31. package/dist/components/ButtonV2/ButtonV2.d.ts +3 -0
  32. package/dist/components/ButtonV2/PrimaryButton.d.ts +3 -0
  33. package/dist/components/ButtonV2/SecondaryButton.d.ts +3 -0
  34. package/dist/components/ButtonV2/TertiaryButton.d.ts +3 -0
  35. package/dist/components/Card/Card.d.ts +12 -0
  36. package/dist/components/Carousel/Carousel.d.ts +8 -0
  37. package/dist/components/Carousel/GliderContainer.d.ts +7 -0
  38. package/dist/components/CenteredHero/CenteredHero.d.ts +14 -0
  39. package/dist/components/CheckBoxListModal/CheckboxListModal.d.ts +30 -0
  40. package/dist/components/Checkbox/Checkbox.d.ts +64 -0
  41. package/dist/components/CheckboxList/CheckboxGroup.d.ts +3 -0
  42. package/dist/components/CheckboxList/CheckboxList.d.ts +4 -0
  43. package/dist/components/CheckboxList/CheckboxList.types.d.ts +74 -0
  44. package/dist/components/CheckboxList/CheckboxListItem.d.ts +3 -0
  45. package/dist/components/ConfirmationDialog/ConfirmationDialog.d.ts +3 -0
  46. package/dist/components/ConfirmationDialog/ConfirmationDialogChoices.d.ts +7 -0
  47. package/dist/components/ConfirmationDialog/ConfirmationDialogMessage.d.ts +4 -0
  48. package/dist/components/ConfirmationDialog/ConfirmationDialogTitle.d.ts +3 -0
  49. package/dist/components/ConfirmationDialog/types/ConfirmationDialog.types.d.ts +41 -0
  50. package/dist/components/Container/FlexColumn.d.ts +7 -0
  51. package/dist/components/Container/FlexContainer.d.ts +9 -0
  52. package/dist/components/Container/FlexRow.d.ts +7 -0
  53. package/dist/components/Container/types/FlexContainerProps.type.d.ts +26 -0
  54. package/dist/components/Divider/Divider.d.ts +6 -0
  55. package/dist/components/DragHandle/DragHandle.d.ts +7 -0
  56. package/dist/components/DragHandle/DragHandle.types.d.ts +6 -0
  57. package/dist/components/DragHandle/index.d.ts +2 -0
  58. package/dist/components/Dropzone/Dropzone.d.ts +6 -0
  59. package/dist/components/Dropzone/Dropzone.types.d.ts +33 -0
  60. package/dist/components/Dropzone/index.d.ts +2 -0
  61. package/dist/components/EmptyListMessage/EmptyListMessage.d.ts +14 -0
  62. package/dist/components/FilterBar/ActiveFilters.d.ts +9 -0
  63. package/dist/components/FilterBar/FilterBar.d.ts +96 -0
  64. package/dist/components/FilterBar/FilterBar.utils.d.ts +32 -0
  65. package/dist/components/FilterBar/FilterBarProps.type.d.ts +86 -0
  66. package/dist/components/FilterBar/FiltersMenus.d.ts +8 -0
  67. package/dist/components/FilterBar/SortMenu.d.ts +9 -0
  68. package/dist/components/FilterBar/index.d.ts +2 -0
  69. package/dist/components/Form/Form.d.ts +30 -0
  70. package/dist/components/Form/FormFieldCheckbox.d.ts +9 -0
  71. package/dist/components/Form/FormFieldCheckboxList.d.ts +9 -0
  72. package/dist/components/Form/FormFieldErrorMessages.d.ts +8 -0
  73. package/dist/components/Form/FormFieldLabeler.d.ts +8 -0
  74. package/dist/components/Form/FormImagePicker.d.ts +9 -0
  75. package/dist/components/Form/FormInput.d.ts +14 -0
  76. package/dist/components/Form/FormRadioGroup.d.ts +13 -0
  77. package/dist/components/Form/FormSelect.d.ts +10 -0
  78. package/dist/components/Form/FormTextarea.d.ts +14 -0
  79. package/dist/components/Form/form.transformer.d.ts +3 -0
  80. package/dist/components/Form/form.types.d.ts +92 -0
  81. package/dist/components/Icon/Icon.d.ts +17 -0
  82. package/dist/components/Icon/index.d.ts +1 -0
  83. package/dist/components/Icons/AddIcon.d.ts +4 -0
  84. package/dist/components/Icons/AlertsIcon.d.ts +4 -0
  85. package/dist/components/Icons/BellIcon.d.ts +4 -0
  86. package/dist/components/Icons/BluetoothIcon.d.ts +4 -0
  87. package/dist/components/Icons/ChartIcon.d.ts +4 -0
  88. package/dist/components/Icons/ChartLineColoredIcon.d.ts +4 -0
  89. package/dist/components/Icons/ChatBoxIcon.d.ts +4 -0
  90. package/dist/components/Icons/CheckIcon.d.ts +4 -0
  91. package/dist/components/Icons/ChevronDoubleIcon.d.ts +4 -0
  92. package/dist/components/Icons/ChevronDownIcon.d.ts +4 -0
  93. package/dist/components/Icons/ChevronRightIcon.d.ts +4 -0
  94. package/dist/components/Icons/CrossIcon.d.ts +4 -0
  95. package/dist/components/Icons/DeleteIcon.d.ts +4 -0
  96. package/dist/components/Icons/DownArrowIcon.d.ts +4 -0
  97. package/dist/components/Icons/DragIcon.d.ts +4 -0
  98. package/dist/components/Icons/EditIcon.d.ts +4 -0
  99. package/dist/components/Icons/EmptyIcon.d.ts +4 -0
  100. package/dist/components/Icons/EmptyStateDashboardIcon.d.ts +4 -0
  101. package/dist/components/Icons/ExclamationMarkIcon.d.ts +4 -0
  102. package/dist/components/Icons/EyeIcon.d.ts +4 -0
  103. package/dist/components/Icons/EyeIconSlashed.d.ts +4 -0
  104. package/dist/components/Icons/GearColoredIcon.d.ts +4 -0
  105. package/dist/components/Icons/GearIcon.d.ts +4 -0
  106. package/dist/components/Icons/GroupColoredIcon.d.ts +4 -0
  107. package/dist/components/Icons/GroupIcon.d.ts +4 -0
  108. package/dist/components/Icons/HamburgerIcon.d.ts +4 -0
  109. package/dist/components/Icons/HeartIcon.d.ts +4 -0
  110. package/dist/components/Icons/ImageIcon.d.ts +4 -0
  111. package/dist/components/Icons/InfoIcon.d.ts +4 -0
  112. package/dist/components/Icons/LeftArrowIcon.d.ts +4 -0
  113. package/dist/components/Icons/LightBulbIcon.d.ts +4 -0
  114. package/dist/components/Icons/LinkIcon.d.ts +4 -0
  115. package/dist/components/Icons/LockIcon.d.ts +4 -0
  116. package/dist/components/Icons/MessagesIcon.d.ts +4 -0
  117. package/dist/components/Icons/MouseIcon.d.ts +4 -0
  118. package/dist/components/Icons/NotesIcon.d.ts +4 -0
  119. package/dist/components/Icons/PageViewIcon.d.ts +4 -0
  120. package/dist/components/Icons/PinIcon.d.ts +4 -0
  121. package/dist/components/Icons/PrintIcon.d.ts +4 -0
  122. package/dist/components/Icons/RightArrowIcon.d.ts +4 -0
  123. package/dist/components/Icons/SearchCancelIcon.d.ts +4 -0
  124. package/dist/components/Icons/SearchIcon.d.ts +4 -0
  125. package/dist/components/Icons/SmallCircleIcon.d.ts +4 -0
  126. package/dist/components/Icons/SmallDiamondIcon.d.ts +4 -0
  127. package/dist/components/Icons/SmallSquareIcon.d.ts +4 -0
  128. package/dist/components/Icons/SpaceRocketIcon.d.ts +4 -0
  129. package/dist/components/Icons/StarIcon.d.ts +4 -0
  130. package/dist/components/Icons/StatusColoredIcon.d.ts +4 -0
  131. package/dist/components/Icons/WarningIcon.d.ts +4 -0
  132. package/dist/components/Icons/iconWrapper/iconWrapper.d.ts +4 -0
  133. package/dist/components/Icons/iconWrapper/index.d.ts +1 -0
  134. package/dist/components/Icons/index.d.ts +49 -0
  135. package/dist/components/Icons/templates/component.d.ts +3 -0
  136. package/dist/components/Icons/templates/index.d.ts +2 -0
  137. package/dist/components/Icons/types/IconProps.type.d.ts +8 -0
  138. package/dist/components/Image/Image.d.ts +10 -0
  139. package/dist/components/InfoField/InfoField.d.ts +28 -0
  140. package/dist/components/Input/Input.d.ts +57 -0
  141. package/dist/components/Input/SearchInput.d.ts +24 -0
  142. package/dist/components/Link/Link.d.ts +19 -0
  143. package/dist/components/List/List.d.ts +6 -0
  144. package/dist/components/List/List.types.d.ts +19 -0
  145. package/dist/components/List/ListItem.d.ts +4 -0
  146. package/dist/components/List/index.d.ts +5 -0
  147. package/dist/components/LoadingIndicator/LoadingIndicator.d.ts +12 -0
  148. package/dist/components/MediaPicker/ImageCategory.d.ts +14 -0
  149. package/dist/components/MediaPicker/MediaPicker.d.ts +95 -0
  150. package/dist/components/Modal/FullPageModal.d.ts +39 -0
  151. package/dist/components/Modal/FullPageModalHeader.d.ts +13 -0
  152. package/dist/components/Modal/Modal.d.ts +6 -0
  153. package/dist/components/Modal/ModalBase.d.ts +16 -0
  154. package/dist/components/Modal/ModalFooter.d.ts +12 -0
  155. package/dist/components/Modal/ModalHeader.d.ts +6 -0
  156. package/dist/components/Modal/subcomponents/FullPageModalActions.d.ts +18 -0
  157. package/dist/components/NavMenu/NavLayout.d.ts +20 -0
  158. package/dist/components/NavMenu/NavMenu.d.ts +16 -0
  159. package/dist/components/NavMenu/NavMenuContent.d.ts +3 -0
  160. package/dist/components/NavMenu/NavMenuFooter.d.ts +3 -0
  161. package/dist/components/NavMenu/NavMenuHeader.d.ts +3 -0
  162. package/dist/components/NavMenu/NavMenuItem.d.ts +3 -0
  163. package/dist/components/NavMenu/types/NavMenuFooterProps.type.d.ts +5 -0
  164. package/dist/components/NavMenu/types/NavMenuHeaderProps.type.d.ts +5 -0
  165. package/dist/components/NavMenu/types/NavMenuItemProps.type.d.ts +11 -0
  166. package/dist/components/NotificationBanner/NotificationBanner.d.ts +41 -0
  167. package/dist/components/Page/CRUDPage.d.ts +4 -0
  168. package/dist/components/Page/CRUDPage.types.d.ts +32 -0
  169. package/dist/components/Page/index.d.ts +3 -0
  170. package/dist/components/PageHeader/PageHeader.d.ts +4 -0
  171. package/dist/components/PageHeader/PageHeader.types.d.ts +28 -0
  172. package/dist/components/PageHeader/index.d.ts +2 -0
  173. package/dist/components/PaginationMenu/PaginationMenu.d.ts +3 -0
  174. package/dist/components/PaginationMenu/PaginationMenu.types.d.ts +37 -0
  175. package/dist/components/PaginationMenu/PaginationMenu.utils.d.ts +15 -0
  176. package/dist/components/PaginationMenu/PaginationMenuLarge.d.ts +3 -0
  177. package/dist/components/PaginationMenu/PaginationMenuSmall.d.ts +3 -0
  178. package/dist/components/PreviewPhone/PreviewPhone.d.ts +7 -0
  179. package/dist/components/Radio/RadioV2.d.ts +17 -0
  180. package/dist/components/RadioGroup/RadioGroupV2.d.ts +10 -0
  181. package/dist/components/Section/Section.d.ts +25 -0
  182. package/dist/components/Section/SectionItem.d.ts +9 -0
  183. package/dist/components/Section/SectionItemWithContent.d.ts +9 -0
  184. package/dist/components/Section/subcomponents/SectionActions.d.ts +21 -0
  185. package/dist/components/Select/Select.d.ts +46 -0
  186. package/dist/components/Select/SelectDropdownIndicator.d.ts +3 -0
  187. package/dist/components/Select/SelectLoadingIndicator.d.ts +3 -0
  188. package/dist/components/SettingsMenuButton/SettingsMenuButton.d.ts +19 -0
  189. package/dist/components/Spinner/Spinner.d.ts +6 -0
  190. package/dist/components/Steps/Step.d.ts +10 -0
  191. package/dist/components/Steps/Steps.d.ts +10 -0
  192. package/dist/components/TabLinks/TabLinks.d.ts +14 -0
  193. package/dist/components/Tabbar/Tabbar.d.ts +18 -0
  194. package/dist/components/Tabbar/TabbarItem.d.ts +16 -0
  195. package/dist/components/Table/Table.d.ts +16 -0
  196. package/dist/components/Table/Table.types.d.ts +43 -0
  197. package/dist/components/Table/Table.utils.d.ts +3 -0
  198. package/dist/components/Table/TableBody.d.ts +13 -0
  199. package/dist/components/Table/TableBodyRow.d.ts +10 -0
  200. package/dist/components/Table/TableBodyRowDataCell.d.ts +8 -0
  201. package/dist/components/Table/TableFooter.d.ts +8 -0
  202. package/dist/components/Table/TableHeader.d.ts +7 -0
  203. package/dist/components/Tag/Tag.d.ts +17 -0
  204. package/dist/components/Tag/Tag.utils.d.ts +4 -0
  205. package/dist/components/Tag/TagGroup.d.ts +10 -0
  206. package/dist/components/Text/Text.d.ts +115 -0
  207. package/dist/components/TextEditor/TextEditor.d.ts +17 -0
  208. package/dist/components/TextLink/TextLink.d.ts +14 -0
  209. package/dist/components/Textarea/Textarea.d.ts +29 -0
  210. package/dist/components/Timeline/Timeline.d.ts +14 -0
  211. package/dist/components/Timeline/TimelineHeader.d.ts +10 -0
  212. package/dist/components/Timeline/TimelineStep.d.ts +10 -0
  213. package/dist/components/Title/Title.d.ts +17 -0
  214. package/dist/components/Toaster/Toaster.d.ts +17 -0
  215. package/dist/components/Toaster/toast-elements-getter.d.ts +22 -0
  216. package/dist/components/Toaster/toast-progress-animator.d.ts +12 -0
  217. package/dist/components/Toaster/toast.d.ts +12 -0
  218. package/dist/components/ViewItem/ViewItem.d.ts +16 -0
  219. package/dist/index.d.ts +83 -0
  220. package/dist/index.development.js +5682 -0
  221. package/dist/index.development.js.map +1 -0
  222. package/dist/index.js +2 -0
  223. package/dist/index.js.map +1 -0
  224. package/dist/types/general.types.d.ts +8 -0
  225. package/dist/utils/string.utils.d.ts +7 -0
  226. package/dist/web-ui-tailwind.css +2890 -0
  227. package/dist/web-ui.esm.js +2 -0
  228. package/dist/web-ui.esm.js.map +1 -0
  229. package/package.json +159 -0
@@ -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">;
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;
@@ -0,0 +1,9 @@
1
+ import React, { SyntheticEvent } from "react";
2
+ import "./SectionItem.scss";
3
+ export interface SectionItemProps {
4
+ className?: string;
5
+ onClick?: (event: SyntheticEvent) => void;
6
+ children?: React.ReactNode;
7
+ }
8
+ export declare const SectionItem: React.FC<SectionItemProps>;
9
+ export default SectionItem;
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ import { SectionItemProps } from "./SectionItem";
3
+ interface SectionItemWithContentProps extends Omit<SectionItemProps, "children"> {
4
+ text: string;
5
+ icon?: string;
6
+ iconClass?: string;
7
+ }
8
+ declare function SectionItemWithContent(props: SectionItemWithContentProps): JSX.Element;
9
+ export default SectionItemWithContent;
@@ -0,0 +1,21 @@
1
+ import React from "react";
2
+ /**
3
+ * Use in the aside of a header section. Spaces out the action
4
+ * components correctly in relation to the styling of the Section component.
5
+ *
6
+ * @usage
7
+ * ```tsx
8
+ * <Section
9
+ * title="My section title"
10
+ * headerAside={
11
+ * <SectionActions>
12
+ * <PrimaryButton />
13
+ * <SecondaryButton />
14
+ * </SectionActions>
15
+ * }
16
+ * >
17
+ * <Text>Content that is shown in the expandable "body" of the section.</Text>
18
+ * </Section>
19
+ * ```
20
+ */
21
+ export declare const SectionActions: React.FC<React.PropsWithChildren>;
@@ -0,0 +1,46 @@
1
+ import { GroupBase, Props } from "react-select";
2
+ import React from "react";
3
+ /**
4
+ * Exceptional case for this file:
5
+ * We use postcss-url to inline and base64 our image assets.
6
+ * But the library can only see as far as css files.
7
+ * When javascript gets in the way (react-select uses a package called `emotion` for styles), postcss-url cannot
8
+ * bundle the svg assets used here, and we end up with some broken style.
9
+ */
10
+ import "./Select.scss";
11
+ import { FormFieldWidth } from "../Form/form.types";
12
+ interface OptionMinimal {
13
+ value: any;
14
+ label?: string;
15
+ }
16
+ export interface SelectProps<Option extends OptionMinimal = OptionMinimal, IsMulti extends boolean = any, Group extends GroupBase<Option> = GroupBase<Option>> extends Props<Option, IsMulti, Group> {
17
+ /**
18
+ * Whether to show the component in error state.
19
+ */
20
+ isError?: boolean;
21
+ /**
22
+ * The maximum width the component will take.
23
+ */
24
+ width?: FormFieldWidth;
25
+ /**
26
+ * REASON: this could be a ticket to fix later on, but react-select has some tricky types to navigate
27
+ * imo there's little to no value spending time on fixing it properly since it already works.
28
+ *
29
+ * This change is protected by policy: https://app.glassfrog.com/organizations/13950/orgnav/policies/12870328
30
+ */
31
+ value?: any;
32
+ }
33
+ /**
34
+ * A wrapper around react-select to style it according to our design specification.
35
+ *
36
+ * In addition, the value is taken out of the option instead of returning the complete option.
37
+ *
38
+ * Care when using grouped options: The value of the options spanning all groups needs to be unique!
39
+ * For instance, if you have an option with value "chocolate" in both the groups "flavor" and "dip", then you get unforeseen errors.
40
+ * This is a problem within react-select itself, not our wrapper.
41
+ *
42
+ * Care when using defaultValue: this still requires the complete Option (instead of the value of the Option).
43
+ * So far there wasn't a use case for this.
44
+ */
45
+ export declare const Select: React.ForwardRefExoticComponent<SelectProps<OptionMinimal, boolean, GroupBase<OptionMinimal>> & React.RefAttributes<unknown>>;
46
+ export {};
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { DropdownIndicatorProps } from "react-select";
3
+ export declare const SelectDropdownIndicator: (props: DropdownIndicatorProps) => JSX.Element;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { LoadingIndicatorProps } from "react-select";
3
+ export declare const SelectLoadingIndicator: (props: LoadingIndicatorProps) => JSX.Element;
@@ -0,0 +1,19 @@
1
+ import React from "react";
2
+ import { IconProps } from "../Icons/types/IconProps.type";
3
+ interface ConfigurationItem<ExtraDataType extends object> {
4
+ itemId: string;
5
+ itemName: string;
6
+ on: boolean;
7
+ /** Additional info that can be used by the parent component */
8
+ extra?: ExtraDataType;
9
+ }
10
+ export interface SettingsMenuButtonProps<ExtraDataType extends object = Record<string, unknown>> {
11
+ configuration: ConfigurationItem<ExtraDataType>[];
12
+ onConfigurationChange: (newConfig: ConfigurationItem<ExtraDataType>) => void;
13
+ shiftMenuTo?: "right" | "right-md" | "left" | "left-md";
14
+ buttonTitle?: string;
15
+ menuTitle?: string;
16
+ iconComponent: React.FunctionComponent<IconProps>;
17
+ }
18
+ export declare const SettingsMenuButton: <ExtraDataType extends object = Record<string, unknown>>(props: SettingsMenuButtonProps<ExtraDataType>) => React.ReactElement;
19
+ export {};
@@ -0,0 +1,6 @@
1
+ import React from "react";
2
+ interface SpinnerProps {
3
+ className?: string;
4
+ }
5
+ export declare const Spinner: (props: SpinnerProps) => React.JSX.Element;
6
+ export {};
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ export interface StepProps {
3
+ title: string;
4
+ stepNumber: number;
5
+ active: boolean;
6
+ localization: {
7
+ step: string;
8
+ };
9
+ }
10
+ export declare const Step: ({ title, stepNumber, active, localization, }: StepProps) => JSX.Element;
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ export interface StepsProps {
3
+ orderedStepTitles: Array<string>;
4
+ currentStep: number;
5
+ className?: string;
6
+ localization: {
7
+ step: string;
8
+ };
9
+ }
10
+ export declare const Steps: ({ orderedStepTitles, currentStep, className, localization, }: StepsProps) => JSX.Element;
@@ -0,0 +1,14 @@
1
+ /// <reference types="react" />
2
+ import { NavigateFn, WindowLocation } from "@reach/router";
3
+ interface TabLinkItem {
4
+ url: URL;
5
+ text: string;
6
+ }
7
+ interface TabLinksProps {
8
+ patientUuid: string;
9
+ items: Array<TabLinkItem>;
10
+ navigate: NavigateFn;
11
+ location: WindowLocation;
12
+ }
13
+ declare const TabLinks: ({ patientUuid, items, navigate, location, }: TabLinksProps) => JSX.Element;
14
+ export default TabLinks;
@@ -0,0 +1,18 @@
1
+ /// <reference types="react" />
2
+ import { TabItemDetails } from "./TabbarItem";
3
+ export interface TabbarProps<T extends object = Record<string, unknown>> {
4
+ tabs?: TabItemDetails<T>[];
5
+ selectedIndex?: number;
6
+ onSelect?: (params: {
7
+ index: number;
8
+ selectedTab: TabItemDetails<T>;
9
+ }) => void;
10
+ className?: string;
11
+ /**
12
+ * If this component is being used on a container that will handle spacing, this option disables the padding, allowing the container to take over spacing.
13
+ */
14
+ withoutPadding?: boolean;
15
+ }
16
+ export { TabItemDetails };
17
+ export declare const Tabbar: <T extends object = Record<string, unknown>>({ tabs, selectedIndex, onSelect, className, withoutPadding, }: TabbarProps<T>) => JSX.Element;
18
+ export default Tabbar;
@@ -0,0 +1,16 @@
1
+ /// <reference types="react" />
2
+ export interface TabItemDetails<T extends object = Record<string, unknown>> {
3
+ title: string | JSX.Element;
4
+ badgeCount?: number;
5
+ isLoading?: boolean;
6
+ dataTestId?: string;
7
+ extra?: T;
8
+ }
9
+ export interface TabbarItemProps<T extends object = Record<string, unknown>> extends TabItemDetails<T> {
10
+ index: number;
11
+ isSelected?: boolean;
12
+ onSelect?: (index: number) => void;
13
+ className?: string;
14
+ }
15
+ declare const TabbarItem: <T extends object = Record<string, unknown>>({ title, index, isSelected, onSelect, className, badgeCount, isLoading, dataTestId, }: TabbarItemProps<T>) => JSX.Element;
16
+ export default TabbarItem;
@@ -0,0 +1,16 @@
1
+ import React from "react";
2
+ import { PaginationMenuProps } from "../PaginationMenu/PaginationMenu.types";
3
+ import { TableFieldConfig } from "./Table.types";
4
+ export interface TableProps<Item> extends React.HTMLAttributes<HTMLTableElement> {
5
+ items?: Item[];
6
+ fieldConfigurations: TableFieldConfig<Item>[];
7
+ emptyRowsText: string;
8
+ emptyFieldContentText?: string;
9
+ isLoading?: boolean;
10
+ showHeader?: boolean;
11
+ paginationMenuProps?: PaginationMenuProps;
12
+ onRowClick?: (item: Item) => void;
13
+ className?: string;
14
+ dataTestId?: string;
15
+ }
16
+ export declare function Table<Item>({ items, fieldConfigurations, emptyRowsText, emptyFieldContentText, isLoading, showHeader, paginationMenuProps, onRowClick, className, dataTestId, ...otherAttributes }: TableProps<Item>): JSX.Element;
@@ -0,0 +1,43 @@
1
+ /// <reference types="react" />
2
+ import { BaseButtonProps } from "../ButtonV2/ButtonProps.type";
3
+ import { TagColorTheme } from "../Tag/Tag";
4
+ type TableFieldConfigBase = {
5
+ key: string;
6
+ headerText?: string;
7
+ onlyShowContentOnHovering?: boolean;
8
+ };
9
+ type TableFieldConfigWithContent<Item> = TableFieldConfigBase & {
10
+ content: (item: Item) => TableFieldContent<Item>;
11
+ render?: never;
12
+ };
13
+ type TableFieldConfigWithComponent<Item> = TableFieldConfigBase & {
14
+ render: (item: Item) => JSX.Element;
15
+ content?: never;
16
+ };
17
+ /**
18
+ * By adding the `content` property, it will use an opinionated layout with the <Text /> and optionally the <Tag /> component.
19
+ * By adding the `render` property, it will render any component returned in the function, based on the item (with type) passed.
20
+ */
21
+ export type TableFieldConfig<Item> = TableFieldConfigWithComponent<Item> | TableFieldConfigWithContent<Item>;
22
+ export type TableFieldContent<Item> = TableFieldText | [TableFieldAction<Item>?, TableFieldAction<Item>?];
23
+ export interface TableFieldText {
24
+ text: string;
25
+ description?: {
26
+ content: string;
27
+ breakAllWord?: boolean;
28
+ };
29
+ breakAllWord?: boolean;
30
+ tag?: {
31
+ text: string;
32
+ color: TagColorTheme;
33
+ };
34
+ }
35
+ export type TableFieldAction<Item> = Pick<BaseButtonProps, "isDisabled" | "title" | "icon"> & {
36
+ key: string;
37
+ /**
38
+ * @param item - the data in the row when this clicked
39
+ * @returns void
40
+ */
41
+ handleClick: (item: Item) => void;
42
+ };
43
+ export {};
@@ -0,0 +1,3 @@
1
+ import { TableFieldText, TableFieldAction, TableFieldContent } from "./Table.types";
2
+ export declare function isTableFieldText<Item>(content: TableFieldContent<Item>): content is TableFieldText;
3
+ export declare function isTableFieldAction<Item>(content: TableFieldContent<Item>): content is [TableFieldAction<Item>?, TableFieldAction<Item>?];
@@ -0,0 +1,13 @@
1
+ /// <reference types="react" />
2
+ import { TableFieldConfig } from "./Table.types";
3
+ export interface TableBody<Item> {
4
+ items?: Item[];
5
+ fieldConfigurations: TableFieldConfig<Item>[];
6
+ emptyItemsText: string;
7
+ emptyFieldContentText?: string;
8
+ isLoading: boolean;
9
+ showEmptyView: boolean;
10
+ onRowClick?: (item: Item) => void;
11
+ className?: string;
12
+ }
13
+ export declare function TableBody<Item>(props: TableBody<Item>): JSX.Element;
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ import { TableFieldConfig } from "./Table.types";
3
+ export interface TableBodyRowProps<Item> {
4
+ item: Item;
5
+ fieldConfigurations: TableFieldConfig<Item>[];
6
+ emptyFieldContentText?: string;
7
+ onClick?: (item: Item) => void;
8
+ className?: string;
9
+ }
10
+ export declare function TableBodyRow<Item>(props: TableBodyRowProps<Item>): JSX.Element;
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import { TableFieldConfig } from "./Table.types";
3
+ export interface TableBodyRowDataCellProps<Item> {
4
+ item: Item;
5
+ fieldConfig: TableFieldConfig<Item>;
6
+ emptyFieldContentText?: string;
7
+ }
8
+ export declare function TableBodyRowDataCell<Item>(props: TableBodyRowDataCellProps<Item>): JSX.Element;
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import { PaginationMenuProps } from "../PaginationMenu/PaginationMenu.types";
3
+ interface TableFooterProps {
4
+ colSpan: number;
5
+ paginationMenuProps: PaginationMenuProps;
6
+ }
7
+ export declare const TableFooter: (props: TableFooterProps) => JSX.Element;
8
+ export {};
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ import { TableFieldConfig } from "./Table.types";
3
+ export interface TableHeaderProps<Item> {
4
+ fieldConfigurations: TableFieldConfig<Item>[];
5
+ className?: string;
6
+ }
7
+ export declare function TableHeader<Item>(props: TableHeaderProps<Item>): JSX.Element;
@@ -0,0 +1,17 @@
1
+ /// <reference types="react" />
2
+ import { TagSize } from "./Tag.utils";
3
+ export declare enum TagColorTheme {
4
+ Red = "red",
5
+ Amber = "amber",
6
+ Green = "green",
7
+ Gray = "gray",
8
+ Blue = "blue"
9
+ }
10
+ export interface TagProps {
11
+ text: string;
12
+ colorTheme?: TagColorTheme;
13
+ size?: TagSize;
14
+ className?: string;
15
+ }
16
+ declare const Tag: ({ text, colorTheme, className, size, }: TagProps) => JSX.Element;
17
+ export default Tag;
@@ -0,0 +1,4 @@
1
+ export declare enum TagSize {
2
+ "small" = "small",
3
+ "base" = "base"
4
+ }
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ import { TagProps } from "./Tag";
3
+ import { TagSize } from "./Tag.utils";
4
+ interface TagGroupProps {
5
+ tags: TagProps[];
6
+ tagSize?: TagSize;
7
+ className?: string;
8
+ }
9
+ declare const TagGroup: ({ tags, tagSize, className, }: TagGroupProps) => JSX.Element;
10
+ export default TagGroup;