@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,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,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,42 @@
1
+ /// <reference types="react" />
2
+ import { BaseButtonProps } from "../ButtonV2/ButtonProps.type";
3
+ type TableFieldConfigBase = {
4
+ key: string;
5
+ headerText?: string;
6
+ onlyShowContentOnHovering?: boolean;
7
+ };
8
+ type TableFieldConfigWithContent<Item> = TableFieldConfigBase & {
9
+ content: (item: Item) => TableFieldContent<Item>;
10
+ render?: never;
11
+ };
12
+ type TableFieldConfigWithComponent<Item> = TableFieldConfigBase & {
13
+ render: (item: Item) => JSX.Element;
14
+ content?: never;
15
+ };
16
+ /**
17
+ * By adding the `content` property, it will use an opinionated layout with the <Text /> and optionally the <Tag /> component.
18
+ * By adding the `render` property, it will render any component returned in the function, based on the item (with type) passed.
19
+ */
20
+ export type TableFieldConfig<Item> = TableFieldConfigWithComponent<Item> | TableFieldConfigWithContent<Item>;
21
+ export type TableFieldContent<Item> = TableFieldText | [TableFieldAction<Item>?, TableFieldAction<Item>?];
22
+ export interface TableFieldText {
23
+ text: string;
24
+ description?: {
25
+ content: string;
26
+ breakAllWord?: boolean;
27
+ };
28
+ breakAllWord?: boolean;
29
+ tag?: {
30
+ text: string;
31
+ color: "red" | "amber" | "green" | "gray" | "blue";
32
+ };
33
+ }
34
+ export type TableFieldAction<Item> = Pick<BaseButtonProps, "isDisabled" | "title" | "icon"> & {
35
+ key: string;
36
+ /**
37
+ * @param item - the data in the row when this clicked
38
+ * @returns void
39
+ */
40
+ handleClick: (item: Item) => void;
41
+ };
42
+ 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,26 @@
1
+ import React from "react";
2
+ type Color = "red" | "amber" | "green" | "gray" | "blue";
3
+ type Size = "base" | "small";
4
+ interface TagPropsShared extends React.ComponentPropsWithoutRef<"span"> {
5
+ colorTheme?: Color;
6
+ children?: string;
7
+ size?: Size;
8
+ className?: string;
9
+ }
10
+ interface PropsWithChildren extends TagPropsShared {
11
+ children?: string;
12
+ /**
13
+ * @deprecated Use `children` instead
14
+ */
15
+ text?: never;
16
+ }
17
+ interface PropsWithText extends TagPropsShared {
18
+ children?: never;
19
+ /**
20
+ * @deprecated Use `children` instead
21
+ */
22
+ text: string;
23
+ }
24
+ export type Props = PropsWithChildren | PropsWithText;
25
+ export declare const Tag: ({ text, colorTheme, className, size, children, ...rest }: Props) => React.JSX.Element;
26
+ export {};
@@ -0,0 +1,23 @@
1
+ import React from "react";
2
+ import { type Props as TagProps } from "./Tag";
3
+ interface PropsWithTags {
4
+ /**
5
+ * @deprecated Use `children` instead
6
+ */
7
+ tags?: TagProps[];
8
+ /**
9
+ * @deprecated Size of each tag rendered as a child is dictated by this child itself.
10
+ */
11
+ tagSize?: TagProps["size"];
12
+ children?: never;
13
+ }
14
+ interface PropsWithChildren {
15
+ tags?: never;
16
+ tagSize?: never;
17
+ children?: React.ReactNode;
18
+ }
19
+ type Props = (PropsWithTags | PropsWithChildren) & {
20
+ className?: string;
21
+ };
22
+ export declare const TagGroup: ({ children, tags, tagSize, className, }: Props) => React.JSX.Element;
23
+ export {};
@@ -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 ui-antialiased";
13
+ readonly base: "ui-text-sm";
14
+ readonly strong: "ui-text-sm ui-font-semibold ui-antialiased";
15
+ readonly lg: "";
16
+ readonly "lg-strong": "ui-font-semibold ui-antialiased";
17
+ readonly xl: "ui-text-lg";
18
+ readonly "xl-strong": "ui-font-semibold ui-text-lg ui-antialiased";
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-primary";
29
+ readonly current: "ui-text-current";
30
+ };
31
+ declare const allowedHoverColors: {
32
+ readonly "blue-900": "hover:ui-text-primary-dark";
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,53 @@
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
+ /**
8
+ * Which formats to allow in the editor, like "bold" and "italic".
9
+ *
10
+ * This is different from the buttons that are shown in the toolbar,
11
+ * because a user could paste in text that has bold formatting without
12
+ * having a bold button in the toolbar. This prop determines if that is
13
+ * allowed or not.
14
+ *
15
+ * @default
16
+ *
17
+ * ["bold", "italic", "underline", "strike", "list", "link"]
18
+ *
19
+ * @example
20
+ *
21
+ * ["bold", "italic, "color", "code"]
22
+ *
23
+ * See: https://github.com/zenoamaro/react-quill#custom-formats
24
+ */
25
+ formats: TextEditorFormat[];
26
+ /**
27
+ * Which buttons to show in the toolbar, like "bold" and "italic".
28
+ *
29
+ * @default
30
+ * [
31
+ * ["bold", "italic", "underline", "strike"],
32
+ * [{ list: "ordered" }, { list: "bullet" }],
33
+ * ["link"],
34
+ * ]
35
+ *
36
+ * @example
37
+ *
38
+ * [
39
+ * ["bold", "italic", "underline", "strike"],
40
+ * ["link", "video"],
41
+ * ]
42
+ * See: https://github.com/zenoamaro/react-quill#custom-toolbar
43
+ */
44
+ toolbar: TextEditorToolbarOption[][];
45
+ };
46
+ type TextEditorToolbarOption = "bold" | "italic" | "underline" | "strike" | "link" | "video" | {
47
+ list: "ordered";
48
+ } | {
49
+ list: "bullet";
50
+ };
51
+ type TextEditorFormat = "background" | "bold" | "color" | "font" | "code" | "italic" | "link" | "size" | "strike" | "script" | "underline" | "blockquote" | "header" | "list" | "align";
52
+ export declare const TextEditor: React.FC<TextEditorProps>;
53
+ 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,33 @@
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
+ /**
27
+ * @deprecated
28
+ * This prop is currently unused. It might be removed in the future.
29
+ */
30
+ isError?: boolean;
31
+ }
32
+ export declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
33
+ 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,31 @@
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
+ type SharedProps = {
6
+ type?: TitleStyle;
7
+ color?: TextColor;
8
+ className?: string;
9
+ ref?: React.ForwardedRef<HTMLHeadingElement>;
10
+ };
11
+ type WithChildrenProp = React.PropsWithChildren<SharedProps> & {
12
+ /**
13
+ * @deprecated Use children instead
14
+ */
15
+ text?: never;
16
+ };
17
+ type WithTextProp = SharedProps & {
18
+ /**
19
+ * @deprecated Use children instead
20
+ */
21
+ text: string;
22
+ children?: never;
23
+ };
24
+ export type TitleProps = WithChildrenProp | WithTextProp;
25
+ export declare const Title: {
26
+ (props: TitleProps): JSX.Element;
27
+ defaultProps: {
28
+ type: "base";
29
+ };
30
+ };
31
+ export {};