@luscii-healthtech/web-ui 0.0.0-alpha.00bf0f6

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 (455) hide show
  1. package/README.md +181 -0
  2. package/dist/.storybook/constants.d.ts +18 -0
  3. package/dist/.storybook/decorators.d.ts +31 -0
  4. package/dist/index.development.js +6041 -0
  5. package/dist/index.development.js.map +1 -0
  6. package/dist/index.js +2 -0
  7. package/dist/index.js.map +1 -0
  8. package/dist/src/components/Accordion/Accordion.d.ts +15 -0
  9. package/dist/src/components/Accordion/AccordionItem.d.ts +17 -0
  10. package/dist/src/components/AccordionList/AccordionList.d.ts +51 -0
  11. package/dist/src/components/AccordionList/subcomponents/AccordionListActions.d.ts +18 -0
  12. package/dist/src/components/Alerts/AlertWidget.d.ts +20 -0
  13. package/dist/src/components/AsideLayout/AsideLayout.d.ts +7 -0
  14. package/dist/src/components/Avatar/Avatar.d.ts +53 -0
  15. package/dist/src/components/Avatar/AvatarGroup.d.ts +31 -0
  16. package/dist/src/components/Badge/Badge.d.ts +11 -0
  17. package/dist/src/components/BaseList/BaseList.d.ts +7 -0
  18. package/dist/src/components/BaseList/BaseList.types.d.ts +84 -0
  19. package/dist/src/components/BaseList/BaseListEmptyState.d.ts +7 -0
  20. package/dist/src/components/BaseList/BaseListHeader.d.ts +4 -0
  21. package/dist/src/components/BaseList/BaseListIcon.d.ts +5 -0
  22. package/dist/src/components/BaseList/BaseListItem.d.ts +4 -0
  23. package/dist/src/components/BaseList/DraggableBaseList/DraggableBaseList.d.ts +4 -0
  24. package/dist/src/components/BaseList/DraggableBaseList/DraggableBaseListItem.d.ts +3 -0
  25. package/dist/src/components/BaseList/DraggableBaseList/index.d.ts +2 -0
  26. package/dist/src/components/BaseList/ListSkeleton/ListItemSkeleton.d.ts +1 -0
  27. package/dist/src/components/BaseList/ListSkeleton/ListSkeleton.d.ts +7 -0
  28. package/dist/src/components/BaseList/SortableBaseList/SortableBaseList.d.ts +4 -0
  29. package/dist/src/components/BaseList/SortableBaseList/SortableBaseListItem.d.ts +3 -0
  30. package/dist/src/components/BaseList/SortableBaseList/index.d.ts +2 -0
  31. package/dist/src/components/BaseList/index.d.ts +6 -0
  32. package/dist/src/components/BaseList/utils.d.ts +10 -0
  33. package/dist/src/components/Box/Box.d.ts +39 -0
  34. package/dist/src/components/Breadcrumbs/BreadcrumbItem.d.ts +4 -0
  35. package/dist/src/components/Breadcrumbs/Breadcrumbs.d.ts +3 -0
  36. package/dist/src/components/Breadcrumbs/Breadcrumbs.types.d.ts +25 -0
  37. package/dist/src/components/Breadcrumbs/index.d.ts +2 -0
  38. package/dist/src/components/ButtonV2/ButtonProps.type.d.ts +104 -0
  39. package/dist/src/components/ButtonV2/ButtonV2.d.ts +3 -0
  40. package/dist/src/components/ButtonV2/PrimaryButton.d.ts +3 -0
  41. package/dist/src/components/ButtonV2/PrimaryIconButton.d.ts +3 -0
  42. package/dist/src/components/ButtonV2/SecondaryButton.d.ts +3 -0
  43. package/dist/src/components/ButtonV2/SecondaryIconButton.d.ts +3 -0
  44. package/dist/src/components/ButtonV2/TertiaryButton.d.ts +3 -0
  45. package/dist/src/components/ButtonV2/TertiaryIconButton.d.ts +15 -0
  46. package/dist/src/components/Card/Actions.d.ts +2 -0
  47. package/dist/src/components/Card/Card.d.ts +67 -0
  48. package/dist/src/components/Card/Padding.d.ts +6 -0
  49. package/dist/src/components/Card/Section.d.ts +6 -0
  50. package/dist/src/components/Card/TopBar.d.ts +10 -0
  51. package/dist/src/components/Carousel/Carousel.d.ts +30 -0
  52. package/dist/src/components/CenteredHero/CenteredHero.d.ts +16 -0
  53. package/dist/src/components/ChatBubble/ChatBubble.d.ts +54 -0
  54. package/dist/src/components/CheckBoxListModal/CheckboxListModal.d.ts +35 -0
  55. package/dist/src/components/Checkbox/Checkbox.d.ts +68 -0
  56. package/dist/src/components/CheckboxList/CheckboxGroup.d.ts +7 -0
  57. package/dist/src/components/CheckboxList/CheckboxList.d.ts +10 -0
  58. package/dist/src/components/CheckboxList/CheckboxList.types.d.ts +74 -0
  59. package/dist/src/components/Chip/Chip.d.ts +9 -0
  60. package/dist/src/components/Collapse/Collapse.d.ts +25 -0
  61. package/dist/src/components/ConfirmationDialog/ConfirmationDialog.d.ts +3 -0
  62. package/dist/src/components/ConfirmationDialog/ConfirmationDialogChoices.d.ts +7 -0
  63. package/dist/src/components/ConfirmationDialog/ConfirmationDialogMessage.d.ts +4 -0
  64. package/dist/src/components/ConfirmationDialog/ConfirmationDialogTitle.d.ts +3 -0
  65. package/dist/src/components/ConfirmationDialog/types/ConfirmationDialog.types.d.ts +52 -0
  66. package/dist/src/components/Container/FlexColumn.d.ts +7 -0
  67. package/dist/src/components/Container/FlexContainer.d.ts +9 -0
  68. package/dist/src/components/Container/FlexRow.d.ts +7 -0
  69. package/dist/src/components/Container/types/FlexContainerProps.type.d.ts +26 -0
  70. package/dist/src/components/DatePicker/DatePicker.d.ts +72 -0
  71. package/dist/src/components/DatePicker/LabeledDatePicker.d.ts +9 -0
  72. package/dist/src/components/DetailsDisclosure/DetailsDisclosure.d.ts +81 -0
  73. package/dist/src/components/Divider/Divider.d.ts +36 -0
  74. package/dist/src/components/DragHandle/DragHandle.d.ts +6 -0
  75. package/dist/src/components/DragHandle/DragHandle.types.d.ts +5 -0
  76. package/dist/src/components/DragHandle/index.d.ts +2 -0
  77. package/dist/src/components/Dropdown/Dropdown.d.ts +61 -0
  78. package/dist/src/components/Dropzone/Dropzone.d.ts +6 -0
  79. package/dist/src/components/Dropzone/Dropzone.types.d.ts +33 -0
  80. package/dist/src/components/Dropzone/index.d.ts +2 -0
  81. package/dist/src/components/EmptyListMessage/EmptyListMessage.d.ts +13 -0
  82. package/dist/src/components/FilePreviewModal/FilePreview.d.ts +25 -0
  83. package/dist/src/components/FileUpload/FileUpload.d.ts +32 -0
  84. package/dist/src/components/FilterBar/ActiveFilters.d.ts +9 -0
  85. package/dist/src/components/FilterBar/FilterBar.d.ts +111 -0
  86. package/dist/src/components/FilterBar/FilterBar.utils.d.ts +32 -0
  87. package/dist/src/components/FilterBar/FilterBarProps.type.d.ts +135 -0
  88. package/dist/src/components/FilterBar/FilterMenu.d.ts +10 -0
  89. package/dist/src/components/FilterBar/FiltersMenus.d.ts +11 -0
  90. package/dist/src/components/FilterBar/PresetFiltersMenu.d.ts +9 -0
  91. package/dist/src/components/FilterBar/SortMenu.d.ts +9 -0
  92. package/dist/src/components/FilterBar/index.d.ts +2 -0
  93. package/dist/src/components/FlyOutMenu/FlyOutMenu.d.ts +59 -0
  94. package/dist/src/components/HoverCard/HoverCard.d.ts +40 -0
  95. package/dist/src/components/HoverCard/index.d.ts +1 -0
  96. package/dist/src/components/HoverIndicatorControl/HoverIndicatorControl.d.ts +24 -0
  97. package/dist/src/components/Icon/Icon.d.ts +17 -0
  98. package/dist/src/components/Icon/index.d.ts +1 -0
  99. package/dist/src/components/Icons/AbsentIcon.d.ts +3 -0
  100. package/dist/src/components/Icons/AddNoteIcon.d.ts +3 -0
  101. package/dist/src/components/Icons/AlarmClockIcon.d.ts +3 -0
  102. package/dist/src/components/Icons/AmberAlertIcon.d.ts +3 -0
  103. package/dist/src/components/Icons/ArrowForward.d.ts +3 -0
  104. package/dist/src/components/Icons/AssignIcon.d.ts +3 -0
  105. package/dist/src/components/Icons/AssignedIcon.d.ts +3 -0
  106. package/dist/src/components/Icons/BellIcon.d.ts +3 -0
  107. package/dist/src/components/Icons/BellIconSlashed.d.ts +3 -0
  108. package/dist/src/components/Icons/BluetoothIcon.d.ts +3 -0
  109. package/dist/src/components/Icons/BrushIcon.d.ts +3 -0
  110. package/dist/src/components/Icons/CakeIcon.d.ts +3 -0
  111. package/dist/src/components/Icons/CalendarDayIcon.d.ts +3 -0
  112. package/dist/src/components/Icons/CalendarMonthIcon.d.ts +3 -0
  113. package/dist/src/components/Icons/CalendarRepeatIcon.d.ts +3 -0
  114. package/dist/src/components/Icons/ChartBarsIcon.d.ts +3 -0
  115. package/dist/src/components/Icons/ChartLineAndBarsIcon.d.ts +3 -0
  116. package/dist/src/components/Icons/ChartLineIcon.d.ts +3 -0
  117. package/dist/src/components/Icons/ChatBubbleIcon.d.ts +3 -0
  118. package/dist/src/components/Icons/ChatBubbleWithTextIcon.d.ts +3 -0
  119. package/dist/src/components/Icons/CheckIcon.d.ts +3 -0
  120. package/dist/src/components/Icons/ChevronDoubleIcon.d.ts +3 -0
  121. package/dist/src/components/Icons/ChevronDownIcon.d.ts +3 -0
  122. package/dist/src/components/Icons/ChevronLeftIcon.d.ts +3 -0
  123. package/dist/src/components/Icons/ChevronRightIcon.d.ts +3 -0
  124. package/dist/src/components/Icons/ClockIcon.d.ts +3 -0
  125. package/dist/src/components/Icons/CogwheelIcon.d.ts +3 -0
  126. package/dist/src/components/Icons/CompareIcon.d.ts +3 -0
  127. package/dist/src/components/Icons/CopyToClipboardIcon.d.ts +3 -0
  128. package/dist/src/components/Icons/CrossIcon.d.ts +3 -0
  129. package/dist/src/components/Icons/CrossInCircleIcon.d.ts +3 -0
  130. package/dist/src/components/Icons/CrossInFilledCircleIcon.d.ts +3 -0
  131. package/dist/src/components/Icons/DatabaseIcon.d.ts +3 -0
  132. package/dist/src/components/Icons/DownloadIcon.d.ts +3 -0
  133. package/dist/src/components/Icons/DragIndicatorIcon.d.ts +3 -0
  134. package/dist/src/components/Icons/EarthIcon.d.ts +3 -0
  135. package/dist/src/components/Icons/EmailIcon.d.ts +3 -0
  136. package/dist/src/components/Icons/EmptyIcon.d.ts +3 -0
  137. package/dist/src/components/Icons/ExclamationMarkIcon.d.ts +3 -0
  138. package/dist/src/components/Icons/ExportIcon.d.ts +3 -0
  139. package/dist/src/components/Icons/ExternalLinkIcon.d.ts +3 -0
  140. package/dist/src/components/Icons/EyeClosedIcon.d.ts +3 -0
  141. package/dist/src/components/Icons/EyeOpenIcon.d.ts +3 -0
  142. package/dist/src/components/Icons/FilterIcon.d.ts +3 -0
  143. package/dist/src/components/Icons/FireIcon.d.ts +3 -0
  144. package/dist/src/components/Icons/FirstAidKitIcon.d.ts +3 -0
  145. package/dist/src/components/Icons/FlagIcon.d.ts +3 -0
  146. package/dist/src/components/Icons/FolderIcon.d.ts +3 -0
  147. package/dist/src/components/Icons/ForwardIcon.d.ts +3 -0
  148. package/dist/src/components/Icons/GrayAlertIcon.d.ts +3 -0
  149. package/dist/src/components/Icons/GroupIcon.d.ts +3 -0
  150. package/dist/src/components/Icons/GroupOfThreeIcon.d.ts +3 -0
  151. package/dist/src/components/Icons/HamburgerIcon.d.ts +3 -0
  152. package/dist/src/components/Icons/HandUp.d.ts +3 -0
  153. package/dist/src/components/Icons/HandshakeIcon.d.ts +3 -0
  154. package/dist/src/components/Icons/HeartIcon.d.ts +3 -0
  155. package/dist/src/components/Icons/HeartMinusIcon.d.ts +3 -0
  156. package/dist/src/components/Icons/HomeIcon.d.ts +3 -0
  157. package/dist/src/components/Icons/IdBadgeIcon.d.ts +3 -0
  158. package/dist/src/components/Icons/ImageIcon.d.ts +3 -0
  159. package/dist/src/components/Icons/ImageLibraryIcon.d.ts +3 -0
  160. package/dist/src/components/Icons/InfoIcon.d.ts +3 -0
  161. package/dist/src/components/Icons/LifebuoyIcon.d.ts +3 -0
  162. package/dist/src/components/Icons/LightBulbIcon.d.ts +3 -0
  163. package/dist/src/components/Icons/LinkIcon.d.ts +3 -0
  164. package/dist/src/components/Icons/ListDescIcon.d.ts +3 -0
  165. package/dist/src/components/Icons/ListIcon.d.ts +3 -0
  166. package/dist/src/components/Icons/LockIcon.d.ts +3 -0
  167. package/dist/src/components/Icons/LogInIcon.d.ts +3 -0
  168. package/dist/src/components/Icons/LogOutIcon.d.ts +3 -0
  169. package/dist/src/components/Icons/MessageWithArrowIcon.d.ts +3 -0
  170. package/dist/src/components/Icons/MoreIcon.d.ts +3 -0
  171. package/dist/src/components/Icons/MouseIcon.d.ts +3 -0
  172. package/dist/src/components/Icons/NoteIcon.d.ts +3 -0
  173. package/dist/src/components/Icons/OpenFolderIcon.d.ts +3 -0
  174. package/dist/src/components/Icons/PageIcon.d.ts +3 -0
  175. package/dist/src/components/Icons/PageViewIcon.d.ts +3 -0
  176. package/dist/src/components/Icons/PaperclipIcon.d.ts +3 -0
  177. package/dist/src/components/Icons/PatientIcon.d.ts +3 -0
  178. package/dist/src/components/Icons/PencilIcon.d.ts +3 -0
  179. package/dist/src/components/Icons/PersonIcon.d.ts +3 -0
  180. package/dist/src/components/Icons/PhoneIcon.d.ts +3 -0
  181. package/dist/src/components/Icons/PieChartIcon.d.ts +3 -0
  182. package/dist/src/components/Icons/PinIcon.d.ts +3 -0
  183. package/dist/src/components/Icons/PlusIcon.d.ts +3 -0
  184. package/dist/src/components/Icons/PrinterIcon.d.ts +3 -0
  185. package/dist/src/components/Icons/RedAlertIcon.d.ts +3 -0
  186. package/dist/src/components/Icons/RobotIcon.d.ts +3 -0
  187. package/dist/src/components/Icons/RocketIcon.d.ts +3 -0
  188. package/dist/src/components/Icons/SearchIcon.d.ts +3 -0
  189. package/dist/src/components/Icons/SendIcon.d.ts +3 -0
  190. package/dist/src/components/Icons/ShareIcon.d.ts +3 -0
  191. package/dist/src/components/Icons/SidebarIcon.d.ts +3 -0
  192. package/dist/src/components/Icons/SmallArrowDownIcon.d.ts +3 -0
  193. package/dist/src/components/Icons/SmallArrowUpIcon.d.ts +3 -0
  194. package/dist/src/components/Icons/SmallCircleIcon.d.ts +3 -0
  195. package/dist/src/components/Icons/SmallDiamondIcon.d.ts +3 -0
  196. package/dist/src/components/Icons/SmallSquareIcon.d.ts +3 -0
  197. package/dist/src/components/Icons/SmallUpsideDownTriangleIcon.d.ts +3 -0
  198. package/dist/src/components/Icons/StarFilledIcon.d.ts +3 -0
  199. package/dist/src/components/Icons/StarIcon.d.ts +3 -0
  200. package/dist/src/components/Icons/StopwatchIcon.d.ts +3 -0
  201. package/dist/src/components/Icons/SummaryIcon.d.ts +3 -0
  202. package/dist/src/components/Icons/TadaIcon.d.ts +3 -0
  203. package/dist/src/components/Icons/ThresholdIcon.d.ts +3 -0
  204. package/dist/src/components/Icons/TrashBinIcon.d.ts +3 -0
  205. package/dist/src/components/Icons/TreeIcon.d.ts +3 -0
  206. package/dist/src/components/Icons/UnassignedIcon.d.ts +3 -0
  207. package/dist/src/components/Icons/UnpinIcon.d.ts +3 -0
  208. package/dist/src/components/Icons/UploadIcon.d.ts +3 -0
  209. package/dist/src/components/Icons/VideoIcon.d.ts +3 -0
  210. package/dist/src/components/Icons/iconWrapper/iconWrapper.d.ts +4 -0
  211. package/dist/src/components/Icons/iconWrapper/index.d.ts +1 -0
  212. package/dist/src/components/Icons/index.d.ts +288 -0
  213. package/dist/src/components/Icons/special-icons/AmberAlertColoredIcon.d.ts +3 -0
  214. package/dist/src/components/Icons/special-icons/ChartLineColoredIcon.d.ts +3 -0
  215. package/dist/src/components/Icons/special-icons/CheckFilledColoredIcon.d.ts +3 -0
  216. package/dist/src/components/Icons/special-icons/FlagDeColoredIcon.d.ts +3 -0
  217. package/dist/src/components/Icons/special-icons/FlagFrColoredIcon.d.ts +3 -0
  218. package/dist/src/components/Icons/special-icons/FlagNlColoredIcon.d.ts +3 -0
  219. package/dist/src/components/Icons/special-icons/FlagPtColoredIcon.d.ts +3 -0
  220. package/dist/src/components/Icons/special-icons/FlagUkColoredIcon.d.ts +3 -0
  221. package/dist/src/components/Icons/special-icons/GearColoredIcon.d.ts +3 -0
  222. package/dist/src/components/Icons/special-icons/GrayAlertColoredIcon.d.ts +3 -0
  223. package/dist/src/components/Icons/special-icons/GreenAlertColoredIcon.d.ts +3 -0
  224. package/dist/src/components/Icons/special-icons/GroupColoredIcon.d.ts +3 -0
  225. package/dist/src/components/Icons/special-icons/RedAlertColoredIcon.d.ts +3 -0
  226. package/dist/src/components/Icons/special-icons/StatusActiveColoredIcon.d.ts +3 -0
  227. package/dist/src/components/Icons/special-icons/StatusAddedColoredIcon.d.ts +3 -0
  228. package/dist/src/components/Icons/special-icons/StatusBlockedColoredIcon.d.ts +3 -0
  229. package/dist/src/components/Icons/special-icons/StatusCancelledColoredIcon.d.ts +3 -0
  230. package/dist/src/components/Icons/special-icons/StatusColoredIcon.d.ts +3 -0
  231. package/dist/src/components/Icons/special-icons/StatusStoppedColoredIcon.d.ts +3 -0
  232. package/dist/src/components/Icons/special-icons/index.d.ts +19 -0
  233. package/dist/src/components/Icons/types/IconProps.type.d.ts +18 -0
  234. package/dist/src/components/Image/Image.d.ts +17 -0
  235. package/dist/src/components/InfoField/InfoField.d.ts +28 -0
  236. package/dist/src/components/Input/Input.d.ts +53 -0
  237. package/dist/src/components/Input/LabeledInput.d.ts +23 -0
  238. package/dist/src/components/Input/SearchInput.d.ts +24 -0
  239. package/dist/src/components/Input/StyledInput.d.ts +12 -0
  240. package/dist/src/components/Line/Line.d.ts +14 -0
  241. package/dist/src/components/Link/Link.d.ts +19 -0
  242. package/dist/src/components/List/List.d.ts +6 -0
  243. package/dist/src/components/List/List.types.d.ts +30 -0
  244. package/dist/src/components/List/ListItem.d.ts +4 -0
  245. package/dist/src/components/List/index.d.ts +5 -0
  246. package/dist/src/components/LoadingIndicator/LoadingIndicator.d.ts +11 -0
  247. package/dist/src/components/MediaPicker/ImageCategory.d.ts +14 -0
  248. package/dist/src/components/MediaPicker/MediaPicker.d.ts +91 -0
  249. package/dist/src/components/Modal/FullPageModal.d.ts +41 -0
  250. package/dist/src/components/Modal/FullPageModalHeader.d.ts +13 -0
  251. package/dist/src/components/Modal/Modal.d.ts +11 -0
  252. package/dist/src/components/Modal/ModalBase.d.ts +16 -0
  253. package/dist/src/components/Modal/ModalFooter.d.ts +27 -0
  254. package/dist/src/components/Modal/ModalHeader.d.ts +6 -0
  255. package/dist/src/components/Modal/subcomponents/FullPageModalActions.d.ts +18 -0
  256. package/dist/src/components/ModalDialog/ModalDialog.d.ts +97 -0
  257. package/dist/src/components/NavMenu/NavLayout.d.ts +35 -0
  258. package/dist/src/components/NotificationBanner/NotificationBanner.d.ts +35 -0
  259. package/dist/src/components/Page/CRUDPage.d.ts +4 -0
  260. package/dist/src/components/Page/CRUDPage.types.d.ts +62 -0
  261. package/dist/src/components/Page/Page.d.ts +56 -0
  262. package/dist/src/components/Page/index.d.ts +3 -0
  263. package/dist/src/components/PageHeader/PageHeader.d.ts +4 -0
  264. package/dist/src/components/PageHeader/PageHeader.types.d.ts +46 -0
  265. package/dist/src/components/PageHeader/index.d.ts +2 -0
  266. package/dist/src/components/PaginationMenu/PaginationMenu.d.ts +2 -0
  267. package/dist/src/components/PaginationMenu/PaginationMenu.types.d.ts +62 -0
  268. package/dist/src/components/PaginationMenu/PaginationMenu.utils.d.ts +15 -0
  269. package/dist/src/components/PaginationMenu/PaginationMenuCursor.d.ts +3 -0
  270. package/dist/src/components/PaginationMenu/PaginationMenuLarge.d.ts +3 -0
  271. package/dist/src/components/PaginationMenu/PaginationMenuSmall.d.ts +2 -0
  272. package/dist/src/components/PreviewPhone/PreviewPhone.d.ts +7 -0
  273. package/dist/src/components/PreviewPhone/useWindowDimensions.d.ts +4 -0
  274. package/dist/src/components/Radio/LabeledRadio.d.ts +67 -0
  275. package/dist/src/components/Radio/LabeledRadioGroup.d.ts +23 -0
  276. package/dist/src/components/Radio/Radio.d.ts +25 -0
  277. package/dist/src/components/Radio/RadioV2.d.ts +16 -0
  278. package/dist/src/components/Radio/StyledRadio.d.ts +5 -0
  279. package/dist/src/components/RadioGroup/RadioGroup.d.ts +33 -0
  280. package/dist/src/components/RadioGroup/RadioGroupV2.d.ts +10 -0
  281. package/dist/src/components/Section/Section.d.ts +29 -0
  282. package/dist/src/components/Section/SectionItem.d.ts +9 -0
  283. package/dist/src/components/Section/SectionItemWithContent.d.ts +8 -0
  284. package/dist/src/components/Section/subcomponents/SectionActions.d.ts +21 -0
  285. package/dist/src/components/Section/subcomponents/SectionFooter.d.ts +6 -0
  286. package/dist/src/components/Section/subcomponents/SectionHeader.d.ts +8 -0
  287. package/dist/src/components/Select/LabeledSelect.d.ts +21 -0
  288. package/dist/src/components/Select/Select.d.ts +49 -0
  289. package/dist/src/components/Select/Select.types.d.ts +4 -0
  290. package/dist/src/components/Select/SelectDropdownIndicator.d.ts +3 -0
  291. package/dist/src/components/Select/SelectLoadingIndicator.d.ts +3 -0
  292. package/dist/src/components/Select/StyledSelect.d.ts +10 -0
  293. package/dist/src/components/SettingsMenuButton/SettingsMenuButton.d.ts +19 -0
  294. package/dist/src/components/Skeleton/Skeleton.d.ts +9 -0
  295. package/dist/src/components/Spinner/Spinner.d.ts +6 -0
  296. package/dist/src/components/Stack/Stack.d.ts +49 -0
  297. package/dist/src/components/StatusIndicator/StatusIndicator.d.ts +16 -0
  298. package/dist/src/components/Steps/Step.d.ts +9 -0
  299. package/dist/src/components/Steps/Steps.d.ts +9 -0
  300. package/dist/src/components/StyledLists/StyledBaseList.d.ts +33 -0
  301. package/dist/src/components/StyledLists/StyledOrderedList.d.ts +25 -0
  302. package/dist/src/components/StyledLists/StyledUnorderedList.d.ts +43 -0
  303. package/dist/src/components/Switch/Switch.d.ts +23 -0
  304. package/dist/src/components/Switcher/Switcher.d.ts +26 -0
  305. package/dist/src/components/Switcher/SwitcherItem.d.ts +24 -0
  306. package/dist/src/components/Tabbar/Tabbar.d.ts +20 -0
  307. package/dist/src/components/Tabbar/TabbarItem.d.ts +15 -0
  308. package/dist/src/components/Table/Table.d.ts +52 -0
  309. package/dist/src/components/Table/Table.types.d.ts +41 -0
  310. package/dist/src/components/Table/Table.utils.d.ts +58 -0
  311. package/dist/src/components/Table/TableBody.d.ts +32 -0
  312. package/dist/src/components/Table/TableBodyRowDataCell.d.ts +7 -0
  313. package/dist/src/components/Table/TableFooter.d.ts +7 -0
  314. package/dist/src/components/Table/TableHeader.d.ts +18 -0
  315. package/dist/src/components/Tag/Tag.d.ts +31 -0
  316. package/dist/src/components/Tag/TagGroup.d.ts +23 -0
  317. package/dist/src/components/Text/Text.d.ts +138 -0
  318. package/dist/src/components/TextEditor/TextEditor.d.ts +69 -0
  319. package/dist/src/components/TextLink/TextLink.d.ts +13 -0
  320. package/dist/src/components/Textarea/Textarea.d.ts +29 -0
  321. package/dist/src/components/Timeline/Timeline.d.ts +13 -0
  322. package/dist/src/components/Timeline/TimelineHeader.d.ts +10 -0
  323. package/dist/src/components/Timeline/TimelineStep.d.ts +10 -0
  324. package/dist/src/components/TimelineCard/LoadingState.d.ts +1 -0
  325. package/dist/src/components/TimelineCard/TimelineCard.d.ts +52 -0
  326. package/dist/src/components/TimelineCardLayout/TimelineCardLayout.d.ts +18 -0
  327. package/dist/src/components/Title/PageTitle.d.ts +6 -0
  328. package/dist/src/components/Title/Title.d.ts +41 -0
  329. package/dist/src/components/Toaster/Toaster.d.ts +3 -0
  330. package/dist/src/components/Toaster/ToasterPanel.d.ts +15 -0
  331. package/dist/src/components/Toaster/toast.d.ts +12 -0
  332. package/dist/src/components/Tooltip/Tooltip.d.ts +40 -0
  333. package/dist/src/components/Tooltip/index.d.ts +1 -0
  334. package/dist/src/components/UnorderedList/UnorderedList.d.ts +63 -0
  335. package/dist/src/components/VerticalMenu/VerticalMenu.d.ts +128 -0
  336. package/dist/src/components/WeekdaysPicker/WeekdaysPicker.d.ts +42 -0
  337. package/dist/src/components/forms/shared/HelperAndErrorText.d.ts +13 -0
  338. package/dist/src/components/forms/shared/LabelText.d.ts +5 -0
  339. package/dist/src/context/LocaleContext.d.ts +3 -0
  340. package/dist/src/index.d.ts +126 -0
  341. package/dist/src/system/Elevation.d.ts +9 -0
  342. package/dist/src/system/Locale.d.ts +3 -0
  343. package/dist/src/system/Sizes.d.ts +43 -0
  344. package/dist/src/types/general.types.d.ts +11 -0
  345. package/dist/src/utils/radius.utils.d.ts +37 -0
  346. package/dist/src/utils/responsiveness.utils.d.ts +30 -0
  347. package/dist/src/utils/shadow.utils.d.ts +21 -0
  348. package/dist/src/utils/string.utils.d.ts +7 -0
  349. package/dist/src/utils/useOutsideClick.d.ts +2 -0
  350. package/dist/stories/Accordion.stories.d.ts +24 -0
  351. package/dist/stories/AccordionList.stories.d.ts +109 -0
  352. package/dist/stories/AlertsWidget.stories.d.ts +14 -0
  353. package/dist/stories/AsideLayout.stories.d.ts +22 -0
  354. package/dist/stories/Avatar.stories.d.ts +46 -0
  355. package/dist/stories/Badge.stories.d.ts +21 -0
  356. package/dist/stories/BaseList.stories.d.ts +16 -0
  357. package/dist/stories/Box.stories.d.ts +15 -0
  358. package/dist/stories/Breadcrumbs.stories.d.ts +10 -0
  359. package/dist/stories/Button.stories.d.ts +11 -0
  360. package/dist/stories/CRUDPage.stories.d.ts +15 -0
  361. package/dist/stories/Card.stories.d.ts +43 -0
  362. package/dist/stories/Carousel.stories.d.ts +44 -0
  363. package/dist/stories/CenteredHero.stories.d.ts +14 -0
  364. package/dist/stories/ChatBubble.stories.d.ts +50 -0
  365. package/dist/stories/CheckBoxListModal.stories.d.ts +137 -0
  366. package/dist/stories/Checkbox.stories.d.ts +61 -0
  367. package/dist/stories/CheckboxList.stories.d.ts +23 -0
  368. package/dist/stories/Chip.stories.d.ts +15 -0
  369. package/dist/stories/Collapse.stories.d.ts +25 -0
  370. package/dist/stories/ConfirmationDialog.stories.d.ts +13 -0
  371. package/dist/stories/DatePicker.stories.d.ts +56 -0
  372. package/dist/stories/DetailsDisclosure.stories.d.ts +9506 -0
  373. package/dist/stories/Divider.stories.d.ts +67 -0
  374. package/dist/stories/DragHandle.stories.d.ts +23 -0
  375. package/dist/stories/DraggableAccordionList.stories.d.ts +11 -0
  376. package/dist/stories/DraggableList.stories.d.ts +10 -0
  377. package/dist/stories/Dropdown.stories.d.ts +13 -0
  378. package/dist/stories/Dropzone.stories.d.ts +14 -0
  379. package/dist/stories/EmptyListMessage.stories.d.ts +21 -0
  380. package/dist/stories/FilePreview.stories.d.ts +29 -0
  381. package/dist/stories/FileUpload.stories.d.ts +9 -0
  382. package/dist/stories/FilterBar.stories.d.ts +34 -0
  383. package/dist/stories/FlexContainer.stories.d.ts +13 -0
  384. package/dist/stories/FlyOutMenu.stories.d.ts +15 -0
  385. package/dist/stories/FullPageModal.stories.d.ts +42 -0
  386. package/dist/stories/HoverCard.stories.d.ts +8 -0
  387. package/dist/stories/HoverIndicatorControl.stories.d.ts +31 -0
  388. package/dist/stories/Icon.stories.d.ts +16 -0
  389. package/dist/stories/InfoField.stories.d.ts +35 -0
  390. package/dist/stories/Input.stories.d.ts +26 -0
  391. package/dist/stories/LabeledDatePicker.stories.d.ts +56 -0
  392. package/dist/stories/LabeledInput.stories.d.ts +44 -0
  393. package/dist/stories/LabeledRadio.stories.d.ts +33 -0
  394. package/dist/stories/Line.stories.d.ts +22 -0
  395. package/dist/stories/Link.stories.d.ts +20 -0
  396. package/dist/stories/LinkIcon.stories.d.ts +13 -0
  397. package/dist/stories/List.stories.d.ts +253 -0
  398. package/dist/stories/LoadingIndicator.stories.d.ts +26 -0
  399. package/dist/stories/MediaPicker.stories.d.ts +11 -0
  400. package/dist/stories/Modal.stories.d.ts +119 -0
  401. package/dist/stories/ModalDialog.stories.d.ts +17572 -0
  402. package/dist/stories/NavLayout.stories.d.ts +25 -0
  403. package/dist/stories/NotificationBanner.stories.d.ts +43 -0
  404. package/dist/stories/Page.stories.d.ts +36 -0
  405. package/dist/stories/PageHeader.stories.d.ts +23 -0
  406. package/dist/stories/Pagination.stories.d.ts +18 -0
  407. package/dist/stories/PreviewPhone.stories.d.ts +17 -0
  408. package/dist/stories/PrimaryButton.stories.d.ts +18 -0
  409. package/dist/stories/PrimaryIconButton.stories.d.ts +13 -0
  410. package/dist/stories/Radio.stories.d.ts +28 -0
  411. package/dist/stories/RadioGroup.stories.d.ts +30 -0
  412. package/dist/stories/RadioGroupV2.stories.d.ts +36 -0
  413. package/dist/stories/RadioV2.stories.d.ts +41 -0
  414. package/dist/stories/SearchInput.stories.d.ts +14 -0
  415. package/dist/stories/SecondaryButton.stories.d.ts +15 -0
  416. package/dist/stories/SecondaryIconButton.stories.d.ts +12 -0
  417. package/dist/stories/Section.stories.d.ts +68 -0
  418. package/dist/stories/SectionItem.stories.d.ts +16 -0
  419. package/dist/stories/SectionItemWithContent.stories.d.ts +16 -0
  420. package/dist/stories/Select.stories.d.ts +181 -0
  421. package/dist/stories/SettingsMenuButton.stories.d.ts +98 -0
  422. package/dist/stories/Skeleton.stories.d.ts +19 -0
  423. package/dist/stories/SortableList.stories.d.ts +9 -0
  424. package/dist/stories/Spinner.stories.d.ts +17 -0
  425. package/dist/stories/Stack.stories.d.ts +21 -0
  426. package/dist/stories/StatusIndicator.stories.d.ts +19 -0
  427. package/dist/stories/Step.stories.d.ts +25 -0
  428. package/dist/stories/Steps.stories.d.ts +14 -0
  429. package/dist/stories/StyledOrderedList.stories.d.ts +281 -0
  430. package/dist/stories/StyledUnorderedList.stories.d.ts +285 -0
  431. package/dist/stories/Switch.stories.d.ts +11 -0
  432. package/dist/stories/Switcher.stories.d.ts +40 -0
  433. package/dist/stories/Tabbar.stories.d.ts +8 -0
  434. package/dist/stories/Table.stories.d.ts +3263 -0
  435. package/dist/stories/Tag.stories.d.ts +18 -0
  436. package/dist/stories/TertiaryButton.stories.d.ts +14 -0
  437. package/dist/stories/TertiaryIconButton.stories.d.ts +20 -0
  438. package/dist/stories/Text.stories.d.ts +45 -0
  439. package/dist/stories/TextColors.stories.d.ts +30 -0
  440. package/dist/stories/TextEditor.stories.d.ts +29 -0
  441. package/dist/stories/TextLink.stories.d.ts +13 -0
  442. package/dist/stories/Textarea.stories.d.ts +65 -0
  443. package/dist/stories/Timeline.stories.d.ts +11 -0
  444. package/dist/stories/TimelineCard.stories.d.ts +39 -0
  445. package/dist/stories/TimelineCardLayout.stories.d.ts +40 -0
  446. package/dist/stories/Title.stories.d.ts +19 -0
  447. package/dist/stories/Toaster.stories.d.ts +12 -0
  448. package/dist/stories/Tooltip.stories.d.ts +8 -0
  449. package/dist/stories/UnorderedList.stories.d.ts +40 -0
  450. package/dist/stories/VerticalMenu.stories.d.ts +105 -0
  451. package/dist/stories/WeekdaysPicker.stories.d.ts +40 -0
  452. package/dist/web-ui-tailwind.css +4611 -0
  453. package/dist/web-ui.esm.js +2 -0
  454. package/dist/web-ui.esm.js.map +1 -0
  455. package/package.json +178 -0
@@ -0,0 +1,81 @@
1
+ import type { ReactNode } from "react";
2
+ import { type ComponentProps, type FC } from "react";
3
+ import { Box } from "../Box/Box";
4
+ import { Stack } from "../Stack/Stack";
5
+ type Props = Omit<ComponentProps<typeof Box<"details">>, "as"> & {
6
+ children?: ReactNode;
7
+ /**
8
+ * This attribute enables multiple <details> elements to be connected, with only one open at a time.
9
+ *
10
+ * This allows developers to easily create UI features such as accordions without scripting.
11
+ *
12
+ * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details#name
13
+ */
14
+ name?: string;
15
+ /**
16
+ * Called when the details component opens or closes.
17
+ */
18
+ onToggleDetails?: (
19
+ /**
20
+ * Indicates wether the toggle actions resulted in an open or closed DetailsDisclosure component
21
+ */
22
+ isOpen: boolean) => void;
23
+ } /**
24
+ * Enforce usage of either open or openByDefault through the type system.
25
+ */ & ({
26
+ open?: never;
27
+ /**
28
+ * Used when this component is used as an uncontrolled component.
29
+ *
30
+ * This sets the initial open state after which control is delegated to the component.
31
+ *
32
+ * When using this prop the `open` prop should be omitted.
33
+ */
34
+ openByDefault?: boolean;
35
+ } | {
36
+ /**
37
+ * Passed to the internal `<details />` element.
38
+ *
39
+ * This value should be used to use the component as a controlled component.
40
+ *
41
+ * When using this prop the `openByDefault` prop should be omitted.
42
+ *
43
+ * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details#open
44
+ */
45
+ open?: boolean;
46
+ openByDefault?: never;
47
+ });
48
+ /**
49
+ * The `DetailsDisclosure` component provides a description of which more information can be disclosed when the widget is toggled to its open state.
50
+ *
51
+ * It is a reflection of the `<details><summary /></details>` HTML elements.
52
+ *
53
+ * @example
54
+ *
55
+ * <DetailsDisclosure>
56
+ * <DetailsDisclosure.Summary>Title</DetailsDisclosure.Summary>
57
+ * details content
58
+ * </DetailsDisclosure>
59
+ */
60
+ export declare const DetailsDisclosure: FC<Props> & {
61
+ Summary: typeof Summary;
62
+ };
63
+ type SummaryProps = Omit<ComponentProps<typeof Stack<"summary">>, "as"> & {
64
+ /**
65
+ * When set to true will omit the open indicator which is presented as a chevron by default.
66
+ *
67
+ * Omitting the open indicator allows the implementer to set a custom indicator using the DetailsDisclosure.OpenIndicator component.
68
+ *
69
+ * @default false
70
+ */
71
+ omitOpenIndicator?: boolean;
72
+ };
73
+ export declare const OpenIndicator: FC<{
74
+ component: FC<{
75
+ isOpen: boolean;
76
+ }>;
77
+ }>;
78
+ export declare const Summary: FC<SummaryProps> & {
79
+ OpenIndicator: typeof OpenIndicator;
80
+ };
81
+ export {};
@@ -0,0 +1,36 @@
1
+ import type { ComponentProps, ComponentPropsWithoutRef, FC } from "react";
2
+ import { Stack } from "../Stack/Stack";
3
+ type DividerProps = ComponentPropsWithoutRef<"div"> & {
4
+ dark?: boolean;
5
+ };
6
+ type HrProps = ComponentPropsWithoutRef<"hr"> & {
7
+ /**
8
+ * Request the v2 version of the divider, which has the following benefits:
9
+ * - Uses an `<hr>` tag instead of a `<div>`.
10
+ * - Uses the border color from the design system, and doesn't have a prop
11
+ * to change it.
12
+ * - Doesn't contain any logic about when it should be hidden.
13
+ */
14
+ version: "v2";
15
+ /**
16
+ * The color of the divider. Defaults to "border".
17
+ */
18
+ color?: "divider" | "border" | "high-contrast" | "low-contrast";
19
+ /**
20
+ * The variant of the divider
21
+ *
22
+ * @default "hr"
23
+ */
24
+ variant?: "hr";
25
+ };
26
+ type VerticalFlowDividerProps = ComponentProps<typeof Stack> & {
27
+ version: "v2";
28
+ variant: "vertical-flow";
29
+ };
30
+ type Props = DividerProps | HrProps | VerticalFlowDividerProps | HorizontalFlowDividerProps;
31
+ export declare const Divider: FC<Props>;
32
+ type HorizontalFlowDividerProps = ComponentProps<typeof Stack> & {
33
+ version: "v2";
34
+ variant: "horizontal-flow";
35
+ };
36
+ export {};
@@ -0,0 +1,6 @@
1
+ declare const DragHandle: import("react").ForwardRefExoticComponent<import("react").HTMLAttributes<HTMLButtonElement> & {
2
+ grabbing: boolean;
3
+ disabled?: boolean;
4
+ dataTestId?: string;
5
+ } & import("react").RefAttributes<HTMLButtonElement>>;
6
+ export default DragHandle;
@@ -0,0 +1,5 @@
1
+ export type DragHandleProps = React.HTMLAttributes<HTMLButtonElement> & {
2
+ grabbing: boolean;
3
+ disabled?: boolean;
4
+ dataTestId?: string;
5
+ };
@@ -0,0 +1,2 @@
1
+ export { default } from "./DragHandle";
2
+ export type { DragHandleProps } from "./DragHandle.types";
@@ -0,0 +1,61 @@
1
+ export default Dropdown;
2
+ /**
3
+ * @deprecated
4
+ * This component is very similar to the `Select` component. The `Select` component is more
5
+ * advanced and supports more use cases, so `Select` should be used instead.
6
+ */
7
+ declare class Dropdown extends React.PureComponent<any, any, any> {
8
+ static getDerivedStateFromProps(nextProps: any, prevState: any): any;
9
+ constructor(props: any);
10
+ state: {
11
+ totalItemCount: any;
12
+ isDropdownOpen: boolean;
13
+ highlightIndex: null;
14
+ selectedItem: any;
15
+ items: any;
16
+ };
17
+ componentDidMount(): void;
18
+ componentWillUnmount(): void;
19
+ handleClickOutside: (event: any) => void;
20
+ handleKeyDown: (event: any) => void;
21
+ findItem: (items: any, fieldName: any, fieldValue: any) => any;
22
+ openDropdown: () => void;
23
+ closeDropdown: () => void;
24
+ setSelectedItem: (item: any) => void;
25
+ findSelectedItem: (selectedIndex: any) => Element;
26
+ scrollToHighlightedItem: (selectedIndex: any) => void;
27
+ increaseHighlightIndexIfPossible: () => void;
28
+ decreaseHighlightIndexIfPossible: () => void;
29
+ selectItem: (item: any) => void;
30
+ renderIndividualItem: (item: any) => import("react/jsx-runtime").JSX.Element;
31
+ renderGroupedItems: (item: any) => import("react/jsx-runtime").JSX.Element;
32
+ renderItems: () => import("react/jsx-runtime").JSX.Element;
33
+ dropdownListRef: HTMLDivElement | null | undefined;
34
+ render(): import("react/jsx-runtime").JSX.Element;
35
+ rootRef: HTMLDivElement | null | undefined;
36
+ }
37
+ declare namespace Dropdown {
38
+ namespace propTypes {
39
+ let items: PropTypes.Validator<(NonNullable<PropTypes.InferProps<{
40
+ id: PropTypes.Validator<string>;
41
+ text: PropTypes.Validator<string>;
42
+ key: PropTypes.Validator<string>;
43
+ }> | PropTypes.InferProps<{
44
+ subItems: PropTypes.Validator<(PropTypes.InferProps<{
45
+ id: PropTypes.Validator<string>;
46
+ text: PropTypes.Validator<string>;
47
+ key: PropTypes.Validator<string>;
48
+ }> | null | undefined)[]>;
49
+ title: PropTypes.Requireable<string>;
50
+ groupKey: PropTypes.Validator<string>;
51
+ }> | null | undefined> | null | undefined)[]>;
52
+ let initialSelectedItemId: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
53
+ let placeholder: PropTypes.Requireable<string>;
54
+ let className: PropTypes.Requireable<string>;
55
+ let onItemSelect: PropTypes.Validator<(...args: any[]) => any>;
56
+ let wider: PropTypes.Requireable<boolean>;
57
+ let name: PropTypes.Requireable<string>;
58
+ }
59
+ }
60
+ import React from "react";
61
+ import PropTypes from "prop-types";
@@ -0,0 +1,6 @@
1
+ import { type FC } from "react";
2
+ import "./Dropzone.scss";
3
+ import type { DropzoneProps, DropzonePresentationProps } from "./Dropzone.types";
4
+ export declare const DropzonePresentation: import("react").ForwardRefExoticComponent<Omit<DropzonePresentationProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
5
+ export declare const Dropzone: FC<DropzoneProps>;
6
+ export default Dropzone;
@@ -0,0 +1,33 @@
1
+ import type { ReactNode, Ref } from "react";
2
+ import type { IconKey } from "../Icons/types/IconProps.type";
3
+ export type DropzonePresentationProps = {
4
+ /**
5
+ * Message shown to the user hinting how to use the component
6
+ * Usually something like "Click or Drag"
7
+ */
8
+ message?: string;
9
+ /**
10
+ * @deprecated
11
+ * Dropzones no longer support icons
12
+ */
13
+ icon?: IconKey;
14
+ isHighlighted?: boolean;
15
+ isClickable?: boolean;
16
+ ref?: Ref<HTMLDivElement>;
17
+ children?: ReactNode;
18
+ className?: string;
19
+ dataTestId?: string;
20
+ /**
21
+ * @deprecated
22
+ * use alignMessage instead
23
+ */
24
+ horizontal?: boolean;
25
+ alignMessage?: "left" | "center";
26
+ };
27
+ export type DropzoneProps = Omit<DropzonePresentationProps, "isHighlighted" | "isClickable"> & {
28
+ draggableIdentifier: string | number;
29
+ disabled?: boolean;
30
+ data?: Record<string, unknown>;
31
+ dataTestId?: string;
32
+ onClick?: React.HTMLAttributes<HTMLButtonElement>["onClick"];
33
+ };
@@ -0,0 +1,2 @@
1
+ export { Dropzone, DropzonePresentation } from "./Dropzone";
2
+ export type { DropzoneProps } from "./Dropzone.types";
@@ -0,0 +1,13 @@
1
+ declare const imageSrc: {
2
+ "no-open-alerts": string;
3
+ "search-not-found": string;
4
+ "no-notes-found": string;
5
+ };
6
+ type EmptyListMessageProps = {
7
+ text: string;
8
+ imageName?: keyof typeof imageSrc;
9
+ dataTestId?: string;
10
+ className?: string;
11
+ };
12
+ export declare const EmptyListMessage: ({ text, imageName, dataTestId, className, }: EmptyListMessageProps) => JSX.Element;
13
+ export {};
@@ -0,0 +1,25 @@
1
+ import type { FC, MouseEventHandler } from "react";
2
+ type Props = {
3
+ /**
4
+ * The actual location of the file. Make sure this is an unauthenticated URL, otherwise the download may fail.
5
+ *
6
+ * @example "https://luscii-tst-user-uploaded-files.s3.eu-central-1.amazonaws.com/<patientUuid>/<filename>.<extension>?X-Amz-Expires=60&x-amz-security-token=<token>&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=<credential>&X-Amz-Date=20250402T075801Z&X-Amz-SignedHeaders=host;x-amz-security-token&X-Amz-Signature=<signature>"
7
+ */
8
+ fileUrl: string;
9
+ /**
10
+ * Download URL, if it is different from the fileUrl for previewing.
11
+ * This can be because the fileUrl needs the content-disposition header to be set to attachment for downloading, but
12
+ * this would cause an immediate download instead of a preview for some files, which we don't want.
13
+ *
14
+ * @param fileUrl
15
+ */
16
+ downloadUrl?: string;
17
+ localization: {
18
+ closeButtonLabel: string;
19
+ downloadButtonLabel: string;
20
+ };
21
+ onClose: MouseEventHandler<HTMLElement>;
22
+ onDownload?: MouseEventHandler<HTMLAnchorElement>;
23
+ };
24
+ export declare const FilePreview: FC<Props>;
25
+ export {};
@@ -0,0 +1,32 @@
1
+ import type { FC } from "react";
2
+ export type FileUploadProps = {
3
+ /**
4
+ * The file types that the input should accept.
5
+ */
6
+ accept?: string;
7
+ /**
8
+ * The maximum size of the file in MBs.
9
+ */
10
+ maxFileSize?: number;
11
+ /**
12
+ * The name of the field input.
13
+ */
14
+ name?: string;
15
+ /**
16
+ * The id of the field input.
17
+ * To be used with a `<label htmlFor={id}>`.
18
+ */
19
+ id?: string;
20
+ onChange?: (file: File) => void;
21
+ /**
22
+ * Disallow the user to change the file input value.
23
+ */
24
+ isDisabled?: boolean;
25
+ /**
26
+ * The text to be displayed on the button controlling the file input.
27
+ *
28
+ * @default "Upload a file"
29
+ */
30
+ buttonText: string;
31
+ };
32
+ export declare const FileUpload: FC<FileUploadProps>;
@@ -0,0 +1,9 @@
1
+ import type React from "react";
2
+ import { type CategorizedFilters, type FilterBarLocalization, type OnFilterBarFilterChange } from "./FilterBarProps.type";
3
+ type ActiveFiltersProps = {
4
+ filters: CategorizedFilters;
5
+ onRemoveActiveFilter: OnFilterBarFilterChange;
6
+ localization: Pick<FilterBarLocalization, "filtersLabel" | "removeFilterOptionLabelGetter">;
7
+ };
8
+ export declare const ActiveFilters: React.FC<ActiveFiltersProps>;
9
+ export {};
@@ -0,0 +1,111 @@
1
+ import type { ReactElement } from "react";
2
+ import { type CategorizedFilters, type FilterBarLocalization, type HasSingleSelection, type TransformedPresetFilterOptions, type TransformedSortingOptions } from "./FilterBarProps.type";
3
+ type FilterBarProps<SortableEntity extends object> = {
4
+ /**
5
+ * A list of grouped filters to be displayed in the FilterBar.
6
+ *
7
+ * This is an array with items shaped as:
8
+ * ```ts
9
+ * type CategorizedFilter = {
10
+ * key: string;
11
+ * label: string;
12
+ * options: TransformedFilterOptions;
13
+ * }
14
+ * ```
15
+ *
16
+ * You can choose to manually create this option or use the `getFilterGroups` helper function that will do the same
17
+ * for you based on your data.
18
+ *
19
+ * @example
20
+ *
21
+ * If you decided to use the `getFilterGroups` function:
22
+ *
23
+ *
24
+ * ```ts
25
+ * const items = []; // any list of object you are working with
26
+ *
27
+ * // the list of filter generators, the `filterValuePredicate` will be the displayed
28
+ * // value in the filter dropdown, so you can map and transform it to any custom string if necessary, or use
29
+ * // the value from the object entry
30
+ *
31
+ * const filterGenerators: FilterGenerator<TShirtFromApi>[] = [
32
+ * {
33
+ * id: "brand",
34
+ * label: "Brand",
35
+ * filterValuePredicate: (tshirt) => tshirt.brand,
36
+ * },
37
+ * {
38
+ * id: "size",
39
+ * label: "Size",
40
+ * filterValuePredicate: (tshirt) => tshirt.size,
41
+ * },
42
+ * {
43
+ * id: "color",
44
+ * label: "Color",
45
+ * filterValuePredicate: (tshirt) => tshirt.color,
46
+ * },
47
+ * ];
48
+ *
49
+ * const categorizedFilters = getFilterGroups(items, filterGenerators);
50
+ * ```
51
+ *
52
+ *
53
+ * A compliant entry in the `categorizedFilters` has a shape like the object below:
54
+ *
55
+ *
56
+ * ```json
57
+ * {
58
+ * "key": "color",
59
+ * "label": "Color",
60
+ * "options": [
61
+ * {
62
+ * "isChecked": false,
63
+ * "id": "yellow",
64
+ * "label": "yellow",
65
+ * "value": "yellow"
66
+ * },
67
+ * {
68
+ * "isChecked": false,
69
+ * "id": "red",
70
+ * "label": "red",
71
+ * "value": "red"
72
+ * },
73
+ * {
74
+ * "isChecked": false,
75
+ * "id": "green",
76
+ * "label": "green",
77
+ * "value": "green"
78
+ * }
79
+ * ]
80
+ * }
81
+ *```
82
+ */
83
+ categorizedFilters: CategorizedFilters;
84
+ /**
85
+ * Whether to hide the active filters section when no filters are applied.
86
+ * Works by checking if any of the filters have an `isChecked` value set to `true`.
87
+ *
88
+ * This defaults to `true`.
89
+ */
90
+ hideActiveFiltersWhenEmpty?: boolean;
91
+ /**
92
+ * For more details, see {@link TransformedSortingOptions}.
93
+ */
94
+ onFilterChange: (updatedFilters: CategorizedFilters) => void;
95
+ sortingOptions: TransformedSortingOptions<SortableEntity>;
96
+ onSortingChange?: (updatedSortingOptions: TransformedSortingOptions<SortableEntity>) => void;
97
+ presetFilterOptions?: TransformedPresetFilterOptions<SortableEntity>;
98
+ onPresetFilterChange?: (updatedPresetFilterOptions: TransformedPresetFilterOptions<SortableEntity>) => void;
99
+ /**
100
+ * See {@link FilterBarLocalization}.
101
+ */
102
+ localization: FilterBarLocalization;
103
+ /**
104
+ * Quick way to change the order of the preset filters and sorting options.
105
+ *
106
+ * @default ["presetFilters", "divider", "sorting"]
107
+ */
108
+ menuOrder?: ["presetFilters", "divider", "sorting"] | ["sorting", "divider", "presetFilters"];
109
+ } & HasSingleSelection;
110
+ export declare const FilterBar: <SortableEntity extends object>({ localization, categorizedFilters, sortingOptions, presetFilterOptions, hideActiveFiltersWhenEmpty, menuOrder, ...props }: FilterBarProps<SortableEntity>) => ReactElement | null;
111
+ export {};
@@ -0,0 +1,32 @@
1
+ import { type CategorizedFilters, type FilterGenerator, type TransformedSortingOptions } from "./FilterBarProps.type";
2
+ /**
3
+ * Generates the list of filters based on the data (see this as what you'd like to be filtered in your component).
4
+ *
5
+ * @param dataToGenerateFiltersFrom - The data (list of entities) that will be used to create the filters.
6
+ * @param groupers a list of functions used to create the filters dropdown
7
+ * @returns {CategorisedFilters} a list of filters properly grouped.
8
+ */
9
+ export declare function getFilterGroups<T extends unknown[]>(dataToGenerateFiltersFrom: T, groupers: FilterGenerator<T[number]>[]): CategorizedFilters;
10
+ /**
11
+ *
12
+ * @param filterKey the key of the categorized filter (eg. color, size, brand) - which one of them are you gonna check.
13
+ * @param categorizedFilters the array of categorized filters the FilterBar component needs
14
+ * @param attributeGetter the getter to retrieve the attribute to be filtered on, this allow maximum flexibility on how to process
15
+ * filters on any level of nesting if necessary.
16
+ * @returns a predicate to be used in the filter function
17
+ * @example
18
+ *
19
+ * const sizeFilterPredicate = createFilterPredicate<TShirtFromApi>("size", filtersOptions, (item) => item.meta.size);
20
+ * const filteredBySize = items.filter(sizeFilterPredicate);
21
+ *
22
+ */
23
+ export declare const createFilterPredicate: <T extends object>(filterKey: string, categorizedFilters: CategorizedFilters, attributeGetter: (item: T) => string) => (item: T) => boolean;
24
+ /**
25
+ * Creates a sorting function to be used on a specific object attribute.
26
+ *
27
+ * @param getter the getter function to retrieve the attribute used in the sorting
28
+ * @param order if ascending or descending
29
+ * @returns the sorting comparer function to be used in Array.sort
30
+ */
31
+ export declare const createSortingComparer: <T extends object>(getter: (item: T) => string | number, order?: "asc" | "desc") => ((itemA: T, itemB: T) => number);
32
+ export declare const applySorting: <T extends object[]>(sortable: T, sortingOptions: TransformedSortingOptions<T[number]>) => T;
@@ -0,0 +1,135 @@
1
+ export type HasSingleSelection = {
2
+ /**
3
+ * When `true`, will still allow multiple filters to be added
4
+ * but each filter can only have a single value selected.
5
+ *
6
+ * The checkboxes in the filter list are hidden and you only see a checkmark ✓ on the selected item.
7
+ *
8
+ * `[⚠️ WARNING]` - this doesn't work with the `presetFilterOptions` prop, so do not combine them.
9
+ *
10
+ */
11
+ singleSelection?: boolean;
12
+ };
13
+ /**
14
+ * The object used to create a filter dropdown in the component.
15
+ * This is used based on the dataset passed to FilterBar, so we always calculate the filters
16
+ * looking at the data.
17
+ */
18
+ export type FilterGenerator<SortableEntity> = {
19
+ id: string;
20
+ label: string;
21
+ /**
22
+ *
23
+ * @param data the value from the dataset entry that will be used for the filter
24
+ * @returns the string value for the desired filter
25
+ *
26
+ * @example
27
+ *
28
+ * ```ts
29
+ * {
30
+ id: "brand",
31
+ label: "Brand",
32
+ filterValuePredicate: (tshirt: TShirtFromApi) => tshirt.brand,
33
+ }
34
+ * ```
35
+ * in the above, all unique values from `brand` will be used to populate the `Brand` filter.
36
+ */
37
+ filterValuePredicate: (data: SortableEntity) => string;
38
+ };
39
+ /**
40
+ * Allows customization of labels related to filter.
41
+ *
42
+ */
43
+ export type FilterBarLocalization = {
44
+ /**
45
+ * The string prefix displayed when a sorting value is selected in the menu.
46
+ *
47
+ * @default "Sorted by:"
48
+ * @example
49
+ *
50
+ * `sortedByLabel`: "Sorted by: "
51
+ *
52
+ * Example of sorting options
53
+ * - Name
54
+ * - Email (selected)
55
+ * - Date of birth
56
+ *
57
+ * UI shows: `Sorted by: Email`.
58
+ */
59
+ sortedByLabel: string;
60
+ /**
61
+ * The string for unselected state of the sorting options.
62
+ *
63
+ * @default "Sort"
64
+ */
65
+ sortLabel: string;
66
+ /**
67
+ * The string prefix displayed when a preset filter is selected from the menu.
68
+ *
69
+ * @example "Showing patients with status: "
70
+ *
71
+ * Example of preset filter options
72
+ * - Active
73
+ * - Stopped
74
+ *
75
+ * UI shows: `Showing patients with status: Active`.
76
+ */
77
+ presetFilteredByLabel?: string;
78
+ /**
79
+ * The string for the unselected state of the preset filter.
80
+ *
81
+ * @example "Show by patient status"
82
+ */
83
+ presetFiltersLabel?: string;
84
+ /**
85
+ * The string for the active filters and the mobile filter menu label.
86
+ *
87
+ * @default "Filters"
88
+ */
89
+ filtersLabel: string;
90
+ /**
91
+ * Function for assigning a label to the remove button of an active filter.
92
+ * @param {TransformedFilterOption} activeFilter
93
+ * @default (activeFilter) => `Remove filter ${activeFilter.label}`
94
+ */
95
+ removeFilterOptionLabelGetter?: (activeFilter: TransformedFilterOption) => string;
96
+ };
97
+ export type TransformedFilterOption = {
98
+ id: string;
99
+ label: string;
100
+ value: string;
101
+ isChecked: boolean;
102
+ };
103
+ export type TransformedFilterOptions = TransformedFilterOption[];
104
+ export type CategorizedFilter = {
105
+ key: string;
106
+ label: string;
107
+ options: TransformedFilterOptions;
108
+ };
109
+ export type CategorizedFilters = CategorizedFilter[];
110
+ export type TransformedSortingOption<SortableEntity extends object> = {
111
+ id: string;
112
+ label: string;
113
+ value: string;
114
+ isChecked: boolean;
115
+ sortingCompare: (itemA: SortableEntity, itemB: SortableEntity) => number;
116
+ };
117
+ export type TransformedSortingOptions<SortableEntity extends object> = TransformedSortingOption<SortableEntity>[];
118
+ export type OnFilterBarFilterChange = (params: {
119
+ changedFilterOption: TransformedFilterOption;
120
+ }) => void;
121
+ export type OnFilterBarSortingChange<SortableEntity extends object> = (changedSortingOption: TransformedSortingOption<SortableEntity>) => void;
122
+ export type TransformedPresetFilterOption<SortableEntity extends object> = {
123
+ id: string;
124
+ label: string;
125
+ value: string;
126
+ isChecked: boolean;
127
+ filterFn?: (item: SortableEntity) => boolean;
128
+ };
129
+ export type TransformedPresetFilterOptions<SortableEntity extends object> = TransformedPresetFilterOption<SortableEntity>[];
130
+ export type OnFilterBarPresetFilterChange<SortableEntity extends object> = (changedPresetFilterOption: TransformedPresetFilterOption<SortableEntity>) => void;
131
+ type OnChangeOptionParam = TransformedFilterOption | TransformedSortingOption<object> | TransformedPresetFilterOption<object>;
132
+ export type OnFilterMenuChange = (params: {
133
+ changedFilterOption: OnChangeOptionParam;
134
+ }) => void;
135
+ export {};
@@ -0,0 +1,10 @@
1
+ import { type CategorizedFilter, type OnFilterMenuChange } from "./FilterBarProps.type";
2
+ type Props = {
3
+ alignPopover?: "left" | "right";
4
+ categorizedFilter: CategorizedFilter;
5
+ onFilterOptionChange: OnFilterMenuChange;
6
+ showCheckedAmount?: boolean;
7
+ singleSelection?: boolean;
8
+ };
9
+ export declare const FilterMenu: (props: Props) => import("react/jsx-runtime").JSX.Element;
10
+ export {};
@@ -0,0 +1,11 @@
1
+ import type { FC } from "react";
2
+ import { type CategorizedFilters, type HasSingleSelection, type OnFilterMenuChange } from "./FilterBarProps.type";
3
+ type FiltersMenusProps = {
4
+ filters: CategorizedFilters;
5
+ onFilterOptionChange: OnFilterMenuChange;
6
+ } & HasSingleSelection;
7
+ /**
8
+ * Each of the menu lists on the right side of the `FilterBar` component.
9
+ */
10
+ export declare const FiltersMenus: FC<FiltersMenusProps>;
11
+ export {};
@@ -0,0 +1,9 @@
1
+ import type { ReactNode } from "react";
2
+ import { type FilterBarLocalization, type OnFilterBarPresetFilterChange, type TransformedPresetFilterOptions } from "./FilterBarProps.type";
3
+ type Props<SortableEntity extends object> = {
4
+ localization: FilterBarLocalization;
5
+ presetFilterOptions: TransformedPresetFilterOptions<SortableEntity>;
6
+ onPresetFilterOptionChange: OnFilterBarPresetFilterChange<SortableEntity>;
7
+ };
8
+ export declare const PresetFiltersMenu: <SortableEntity extends object>(props: Props<SortableEntity>) => ReactNode;
9
+ export {};
@@ -0,0 +1,9 @@
1
+ import type { ReactElement } from "react";
2
+ import { type FilterBarLocalization, type OnFilterBarSortingChange, type TransformedSortingOption } from "./FilterBarProps.type";
3
+ type SortMenuProps<SortableEntity extends object> = {
4
+ localization: FilterBarLocalization;
5
+ sortingOptions: TransformedSortingOption<SortableEntity>[];
6
+ onSortOptionChange: OnFilterBarSortingChange<SortableEntity>;
7
+ };
8
+ export declare const SortMenu: <SortableEntity extends object>(props: SortMenuProps<SortableEntity>) => ReactElement | null;
9
+ export {};
@@ -0,0 +1,2 @@
1
+ export { FilterBar } from "./FilterBar";
2
+ export * as FilterBarUtils from "./FilterBar.utils";