@luscii-healthtech/web-ui 0.0.0-alpha.2fcd0e9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (229) hide show
  1. package/README.md +179 -0
  2. package/dist/components/Accordion/Accordion.d.ts +10 -0
  3. package/dist/components/Accordion/AccordionItem.d.ts +9 -0
  4. package/dist/components/AccordionList/AccordionList.d.ts +42 -0
  5. package/dist/components/AccordionList/subcomponents/AccordionListActions.d.ts +18 -0
  6. package/dist/components/Badge/Badge.d.ts +7 -0
  7. package/dist/components/BaseList/BaseList.d.ts +7 -0
  8. package/dist/components/BaseList/BaseList.types.d.ts +55 -0
  9. package/dist/components/BaseList/BaseListEmptyState.d.ts +7 -0
  10. package/dist/components/BaseList/BaseListHeader.d.ts +4 -0
  11. package/dist/components/BaseList/BaseListIcon.d.ts +5 -0
  12. package/dist/components/BaseList/BaseListItem.d.ts +4 -0
  13. package/dist/components/BaseList/DraggableBaseList/DraggableBaseList.d.ts +4 -0
  14. package/dist/components/BaseList/DraggableBaseList/DraggableBaseListItem.d.ts +3 -0
  15. package/dist/components/BaseList/DraggableBaseList/index.d.ts +2 -0
  16. package/dist/components/BaseList/ListSkeleton/ListItemSkeleton.d.ts +2 -0
  17. package/dist/components/BaseList/ListSkeleton/ListSkeleton.d.ts +8 -0
  18. package/dist/components/BaseList/SortableBaseList/SortableBaseList.d.ts +4 -0
  19. package/dist/components/BaseList/SortableBaseList/SortableBaseListItem.d.ts +3 -0
  20. package/dist/components/BaseList/SortableBaseList/index.d.ts +2 -0
  21. package/dist/components/BaseList/index.d.ts +6 -0
  22. package/dist/components/BaseList/utils.d.ts +10 -0
  23. package/dist/components/Breadcrumbs/BreadcrumbItem.d.ts +4 -0
  24. package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +3 -0
  25. package/dist/components/Breadcrumbs/Breadcrumbs.types.d.ts +14 -0
  26. package/dist/components/Breadcrumbs/index.d.ts +2 -0
  27. package/dist/components/Button/Button.d.ts +9 -0
  28. package/dist/components/Button/Button.types.d.ts +32 -0
  29. package/dist/components/Button/ButtonIcon.d.ts +7 -0
  30. package/dist/components/ButtonV2/ButtonProps.type.d.ts +49 -0
  31. package/dist/components/ButtonV2/ButtonV2.d.ts +3 -0
  32. package/dist/components/ButtonV2/PrimaryButton.d.ts +3 -0
  33. package/dist/components/ButtonV2/SecondaryButton.d.ts +3 -0
  34. package/dist/components/ButtonV2/TertiaryButton.d.ts +3 -0
  35. package/dist/components/Card/Card.d.ts +12 -0
  36. package/dist/components/Carousel/Carousel.d.ts +8 -0
  37. package/dist/components/Carousel/GliderContainer.d.ts +7 -0
  38. package/dist/components/CenteredHero/CenteredHero.d.ts +14 -0
  39. package/dist/components/CheckBoxListModal/CheckboxListModal.d.ts +30 -0
  40. package/dist/components/Checkbox/Checkbox.d.ts +64 -0
  41. package/dist/components/CheckboxList/CheckboxGroup.d.ts +3 -0
  42. package/dist/components/CheckboxList/CheckboxList.d.ts +4 -0
  43. package/dist/components/CheckboxList/CheckboxList.types.d.ts +74 -0
  44. package/dist/components/CheckboxList/CheckboxListItem.d.ts +3 -0
  45. package/dist/components/ConfirmationDialog/ConfirmationDialog.d.ts +3 -0
  46. package/dist/components/ConfirmationDialog/ConfirmationDialogChoices.d.ts +7 -0
  47. package/dist/components/ConfirmationDialog/ConfirmationDialogMessage.d.ts +4 -0
  48. package/dist/components/ConfirmationDialog/ConfirmationDialogTitle.d.ts +3 -0
  49. package/dist/components/ConfirmationDialog/types/ConfirmationDialog.types.d.ts +41 -0
  50. package/dist/components/Container/FlexColumn.d.ts +7 -0
  51. package/dist/components/Container/FlexContainer.d.ts +9 -0
  52. package/dist/components/Container/FlexRow.d.ts +7 -0
  53. package/dist/components/Container/types/FlexContainerProps.type.d.ts +26 -0
  54. package/dist/components/Divider/Divider.d.ts +6 -0
  55. package/dist/components/DragHandle/DragHandle.d.ts +7 -0
  56. package/dist/components/DragHandle/DragHandle.types.d.ts +6 -0
  57. package/dist/components/DragHandle/index.d.ts +2 -0
  58. package/dist/components/Dropzone/Dropzone.d.ts +6 -0
  59. package/dist/components/Dropzone/Dropzone.types.d.ts +33 -0
  60. package/dist/components/Dropzone/index.d.ts +2 -0
  61. package/dist/components/EmptyListMessage/EmptyListMessage.d.ts +14 -0
  62. package/dist/components/FilterBar/ActiveFilters.d.ts +9 -0
  63. package/dist/components/FilterBar/FilterBar.d.ts +96 -0
  64. package/dist/components/FilterBar/FilterBar.utils.d.ts +32 -0
  65. package/dist/components/FilterBar/FilterBarProps.type.d.ts +86 -0
  66. package/dist/components/FilterBar/FiltersMenus.d.ts +8 -0
  67. package/dist/components/FilterBar/SortMenu.d.ts +9 -0
  68. package/dist/components/FilterBar/index.d.ts +2 -0
  69. package/dist/components/Form/Form.d.ts +30 -0
  70. package/dist/components/Form/FormFieldCheckbox.d.ts +9 -0
  71. package/dist/components/Form/FormFieldCheckboxList.d.ts +9 -0
  72. package/dist/components/Form/FormFieldErrorMessages.d.ts +8 -0
  73. package/dist/components/Form/FormFieldLabeler.d.ts +8 -0
  74. package/dist/components/Form/FormImagePicker.d.ts +9 -0
  75. package/dist/components/Form/FormInput.d.ts +14 -0
  76. package/dist/components/Form/FormRadioGroup.d.ts +13 -0
  77. package/dist/components/Form/FormSelect.d.ts +10 -0
  78. package/dist/components/Form/FormTextarea.d.ts +14 -0
  79. package/dist/components/Form/form.transformer.d.ts +3 -0
  80. package/dist/components/Form/form.types.d.ts +92 -0
  81. package/dist/components/Icon/Icon.d.ts +17 -0
  82. package/dist/components/Icon/index.d.ts +1 -0
  83. package/dist/components/Icons/AddIcon.d.ts +4 -0
  84. package/dist/components/Icons/AlertsIcon.d.ts +4 -0
  85. package/dist/components/Icons/BellIcon.d.ts +4 -0
  86. package/dist/components/Icons/BluetoothIcon.d.ts +4 -0
  87. package/dist/components/Icons/ChartIcon.d.ts +4 -0
  88. package/dist/components/Icons/ChartLineColoredIcon.d.ts +4 -0
  89. package/dist/components/Icons/ChatBoxIcon.d.ts +4 -0
  90. package/dist/components/Icons/CheckIcon.d.ts +4 -0
  91. package/dist/components/Icons/ChevronDoubleIcon.d.ts +4 -0
  92. package/dist/components/Icons/ChevronDownIcon.d.ts +4 -0
  93. package/dist/components/Icons/ChevronRightIcon.d.ts +4 -0
  94. package/dist/components/Icons/CrossIcon.d.ts +4 -0
  95. package/dist/components/Icons/DeleteIcon.d.ts +4 -0
  96. package/dist/components/Icons/DownArrowIcon.d.ts +4 -0
  97. package/dist/components/Icons/DragIcon.d.ts +4 -0
  98. package/dist/components/Icons/EditIcon.d.ts +4 -0
  99. package/dist/components/Icons/EmptyIcon.d.ts +4 -0
  100. package/dist/components/Icons/EmptyStateDashboardIcon.d.ts +4 -0
  101. package/dist/components/Icons/ExclamationMarkIcon.d.ts +4 -0
  102. package/dist/components/Icons/EyeIcon.d.ts +4 -0
  103. package/dist/components/Icons/EyeIconSlashed.d.ts +4 -0
  104. package/dist/components/Icons/GearColoredIcon.d.ts +4 -0
  105. package/dist/components/Icons/GearIcon.d.ts +4 -0
  106. package/dist/components/Icons/GroupColoredIcon.d.ts +4 -0
  107. package/dist/components/Icons/GroupIcon.d.ts +4 -0
  108. package/dist/components/Icons/HamburgerIcon.d.ts +4 -0
  109. package/dist/components/Icons/HeartIcon.d.ts +4 -0
  110. package/dist/components/Icons/ImageIcon.d.ts +4 -0
  111. package/dist/components/Icons/InfoIcon.d.ts +4 -0
  112. package/dist/components/Icons/LeftArrowIcon.d.ts +4 -0
  113. package/dist/components/Icons/LightBulbIcon.d.ts +4 -0
  114. package/dist/components/Icons/LinkIcon.d.ts +4 -0
  115. package/dist/components/Icons/LockIcon.d.ts +4 -0
  116. package/dist/components/Icons/MessagesIcon.d.ts +4 -0
  117. package/dist/components/Icons/MouseIcon.d.ts +4 -0
  118. package/dist/components/Icons/NotesIcon.d.ts +4 -0
  119. package/dist/components/Icons/PageViewIcon.d.ts +4 -0
  120. package/dist/components/Icons/PinIcon.d.ts +4 -0
  121. package/dist/components/Icons/PrintIcon.d.ts +4 -0
  122. package/dist/components/Icons/RightArrowIcon.d.ts +4 -0
  123. package/dist/components/Icons/SearchCancelIcon.d.ts +4 -0
  124. package/dist/components/Icons/SearchIcon.d.ts +4 -0
  125. package/dist/components/Icons/SmallCircleIcon.d.ts +4 -0
  126. package/dist/components/Icons/SmallDiamondIcon.d.ts +4 -0
  127. package/dist/components/Icons/SmallSquareIcon.d.ts +4 -0
  128. package/dist/components/Icons/SpaceRocketIcon.d.ts +4 -0
  129. package/dist/components/Icons/StarIcon.d.ts +4 -0
  130. package/dist/components/Icons/StatusColoredIcon.d.ts +4 -0
  131. package/dist/components/Icons/WarningIcon.d.ts +4 -0
  132. package/dist/components/Icons/iconWrapper/iconWrapper.d.ts +4 -0
  133. package/dist/components/Icons/iconWrapper/index.d.ts +1 -0
  134. package/dist/components/Icons/index.d.ts +49 -0
  135. package/dist/components/Icons/templates/component.d.ts +3 -0
  136. package/dist/components/Icons/templates/index.d.ts +2 -0
  137. package/dist/components/Icons/types/IconProps.type.d.ts +8 -0
  138. package/dist/components/Image/Image.d.ts +10 -0
  139. package/dist/components/InfoField/InfoField.d.ts +28 -0
  140. package/dist/components/Input/Input.d.ts +57 -0
  141. package/dist/components/Input/SearchInput.d.ts +24 -0
  142. package/dist/components/Link/Link.d.ts +19 -0
  143. package/dist/components/List/List.d.ts +6 -0
  144. package/dist/components/List/List.types.d.ts +19 -0
  145. package/dist/components/List/ListItem.d.ts +4 -0
  146. package/dist/components/List/index.d.ts +5 -0
  147. package/dist/components/LoadingIndicator/LoadingIndicator.d.ts +12 -0
  148. package/dist/components/MediaPicker/ImageCategory.d.ts +14 -0
  149. package/dist/components/MediaPicker/MediaPicker.d.ts +95 -0
  150. package/dist/components/Modal/FullPageModal.d.ts +39 -0
  151. package/dist/components/Modal/FullPageModalHeader.d.ts +13 -0
  152. package/dist/components/Modal/Modal.d.ts +6 -0
  153. package/dist/components/Modal/ModalBase.d.ts +16 -0
  154. package/dist/components/Modal/ModalFooter.d.ts +12 -0
  155. package/dist/components/Modal/ModalHeader.d.ts +6 -0
  156. package/dist/components/Modal/subcomponents/FullPageModalActions.d.ts +18 -0
  157. package/dist/components/NavMenu/NavLayout.d.ts +20 -0
  158. package/dist/components/NavMenu/NavMenu.d.ts +16 -0
  159. package/dist/components/NavMenu/NavMenuContent.d.ts +3 -0
  160. package/dist/components/NavMenu/NavMenuFooter.d.ts +3 -0
  161. package/dist/components/NavMenu/NavMenuHeader.d.ts +3 -0
  162. package/dist/components/NavMenu/NavMenuItem.d.ts +3 -0
  163. package/dist/components/NavMenu/types/NavMenuFooterProps.type.d.ts +5 -0
  164. package/dist/components/NavMenu/types/NavMenuHeaderProps.type.d.ts +5 -0
  165. package/dist/components/NavMenu/types/NavMenuItemProps.type.d.ts +11 -0
  166. package/dist/components/NotificationBanner/NotificationBanner.d.ts +41 -0
  167. package/dist/components/Page/CRUDPage.d.ts +4 -0
  168. package/dist/components/Page/CRUDPage.types.d.ts +32 -0
  169. package/dist/components/Page/index.d.ts +3 -0
  170. package/dist/components/PageHeader/PageHeader.d.ts +4 -0
  171. package/dist/components/PageHeader/PageHeader.types.d.ts +28 -0
  172. package/dist/components/PageHeader/index.d.ts +2 -0
  173. package/dist/components/PaginationMenu/PaginationMenu.d.ts +3 -0
  174. package/dist/components/PaginationMenu/PaginationMenu.types.d.ts +37 -0
  175. package/dist/components/PaginationMenu/PaginationMenu.utils.d.ts +15 -0
  176. package/dist/components/PaginationMenu/PaginationMenuLarge.d.ts +3 -0
  177. package/dist/components/PaginationMenu/PaginationMenuSmall.d.ts +3 -0
  178. package/dist/components/PreviewPhone/PreviewPhone.d.ts +7 -0
  179. package/dist/components/Radio/RadioV2.d.ts +17 -0
  180. package/dist/components/RadioGroup/RadioGroupV2.d.ts +10 -0
  181. package/dist/components/Section/Section.d.ts +25 -0
  182. package/dist/components/Section/SectionItem.d.ts +9 -0
  183. package/dist/components/Section/SectionItemWithContent.d.ts +9 -0
  184. package/dist/components/Section/subcomponents/SectionActions.d.ts +21 -0
  185. package/dist/components/Select/Select.d.ts +46 -0
  186. package/dist/components/Select/SelectDropdownIndicator.d.ts +3 -0
  187. package/dist/components/Select/SelectLoadingIndicator.d.ts +3 -0
  188. package/dist/components/SettingsMenuButton/SettingsMenuButton.d.ts +19 -0
  189. package/dist/components/Spinner/Spinner.d.ts +6 -0
  190. package/dist/components/Steps/Step.d.ts +10 -0
  191. package/dist/components/Steps/Steps.d.ts +10 -0
  192. package/dist/components/TabLinks/TabLinks.d.ts +14 -0
  193. package/dist/components/Tabbar/Tabbar.d.ts +18 -0
  194. package/dist/components/Tabbar/TabbarItem.d.ts +16 -0
  195. package/dist/components/Table/Table.d.ts +16 -0
  196. package/dist/components/Table/Table.types.d.ts +43 -0
  197. package/dist/components/Table/Table.utils.d.ts +3 -0
  198. package/dist/components/Table/TableBody.d.ts +13 -0
  199. package/dist/components/Table/TableBodyRow.d.ts +10 -0
  200. package/dist/components/Table/TableBodyRowDataCell.d.ts +8 -0
  201. package/dist/components/Table/TableFooter.d.ts +8 -0
  202. package/dist/components/Table/TableHeader.d.ts +7 -0
  203. package/dist/components/Tag/Tag.d.ts +17 -0
  204. package/dist/components/Tag/Tag.utils.d.ts +4 -0
  205. package/dist/components/Tag/TagGroup.d.ts +10 -0
  206. package/dist/components/Text/Text.d.ts +115 -0
  207. package/dist/components/TextEditor/TextEditor.d.ts +17 -0
  208. package/dist/components/TextLink/TextLink.d.ts +14 -0
  209. package/dist/components/Textarea/Textarea.d.ts +29 -0
  210. package/dist/components/Timeline/Timeline.d.ts +14 -0
  211. package/dist/components/Timeline/TimelineHeader.d.ts +10 -0
  212. package/dist/components/Timeline/TimelineStep.d.ts +10 -0
  213. package/dist/components/Title/Title.d.ts +17 -0
  214. package/dist/components/Toaster/Toaster.d.ts +17 -0
  215. package/dist/components/Toaster/toast-elements-getter.d.ts +22 -0
  216. package/dist/components/Toaster/toast-progress-animator.d.ts +12 -0
  217. package/dist/components/Toaster/toast.d.ts +12 -0
  218. package/dist/components/ViewItem/ViewItem.d.ts +16 -0
  219. package/dist/index.d.ts +83 -0
  220. package/dist/index.development.js +5682 -0
  221. package/dist/index.development.js.map +1 -0
  222. package/dist/index.js +2 -0
  223. package/dist/index.js.map +1 -0
  224. package/dist/types/general.types.d.ts +8 -0
  225. package/dist/utils/string.utils.d.ts +7 -0
  226. package/dist/web-ui-tailwind.css +2890 -0
  227. package/dist/web-ui.esm.js +2 -0
  228. package/dist/web-ui.esm.js.map +1 -0
  229. package/package.json +159 -0
@@ -0,0 +1,30 @@
1
+ /// <reference types="react" />
2
+ import { type FieldValues, type UseFormMethods as UseFormReturn, DeepPartial, SubmitErrorHandler, SubmitHandler, UnpackNestedValue } from "react-hook-form/dist/index.ie11";
3
+ import { FormFieldConfiguration } from "./form.types";
4
+ export interface GenericFormProps<TFieldValues extends FieldValues> {
5
+ fields: FormFieldConfiguration<TFieldValues>[];
6
+ onValid: SubmitHandler<TFieldValues>;
7
+ onError?: SubmitErrorHandler<TFieldValues>;
8
+ defaultValues?: UnpackNestedValue<DeepPartial<TFieldValues>>;
9
+ }
10
+ /**
11
+ * Create a straight forward Form, which takes away the 'overhead' of react-hook-form.
12
+ *
13
+ * You will probably don't want to use this component for now, given that the button is hardcoded.
14
+ * This is an example for the Form for now, though it could be improved to enforce further unification.
15
+ *
16
+ * TODO: make the buttons configurable.
17
+ */
18
+ export declare function GenericForm<TFieldValues extends FieldValues>({ fields, onValid, onError, defaultValues, }: GenericFormProps<TFieldValues>): JSX.Element;
19
+ export interface FormProps<TFieldValues extends FieldValues> {
20
+ fields: FormFieldConfiguration<TFieldValues>[];
21
+ useFormReturn: UseFormReturn<TFieldValues>;
22
+ }
23
+ /**
24
+ * Creates a Form based on the fields input.
25
+ *
26
+ * Expects the results of the useForm hook to be injected into the useFormReturn parameter.
27
+ *
28
+ * This allows you to use and modify the useFormReturn before injecting it here.
29
+ */
30
+ export declare function Form<TFieldValues extends FieldValues>({ fields, useFormReturn, }: FormProps<TFieldValues>): JSX.Element;
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ import { Control, RegisterOptions } from "react-hook-form/dist/index.ie11";
3
+ import { FieldCheckboxConfiguration, FormFieldLabelerWithFormProps } from "./form.types";
4
+ interface FormCheckboxProps extends FieldCheckboxConfiguration, FormFieldLabelerWithFormProps {
5
+ control: Control;
6
+ rules?: Exclude<RegisterOptions, "valueAsNumber" | "valueAsDate" | "setValueAs">;
7
+ }
8
+ export declare const FormFieldCheckbox: React.ForwardRefExoticComponent<FormCheckboxProps & React.RefAttributes<HTMLInputElement>>;
9
+ export {};
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ import { Control, RegisterOptions } from "react-hook-form/dist/index.ie11";
3
+ import { FieldCheckboxListConfiguration, FormFieldLabelerWithFormProps } from "./form.types";
4
+ interface FormCheckboxListProps extends FieldCheckboxListConfiguration, FormFieldLabelerWithFormProps {
5
+ control: Control;
6
+ rules?: Exclude<RegisterOptions, "valueAsNumber" | "valueAsDate" | "setValueAs">;
7
+ }
8
+ export declare const FormFieldCheckboxList: React.FC<FormCheckboxListProps>;
9
+ export {};
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ import type { FieldErrors } from "react-hook-form";
3
+ interface FormFieldErrorMessages {
4
+ fieldName: string;
5
+ error: FieldErrors;
6
+ }
7
+ export declare const FormFieldErrorMessages: React.FC<FormFieldErrorMessages>;
8
+ export {};
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import { FormFieldLabelerWithFormProps } from "./form.types";
3
+ /**
4
+ * Decorator for any input component. Adds a label and additional information to be shown.
5
+ *
6
+ * Includes the default error handling from react-hook-form.
7
+ */
8
+ export declare function FormFieldLabeler({ name, children, label, fieldRequired, info, fieldErrors, decoratorClassname, }: FormFieldLabelerWithFormProps): JSX.Element;
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ import { Control, RegisterOptions } from "react-hook-form/dist/index.ie11";
3
+ import { ImagePickerFieldConfiguration, FormFieldLabelerWithFormProps } from "./form.types";
4
+ interface FormImagePickerProps extends ImagePickerFieldConfiguration, FormFieldLabelerWithFormProps {
5
+ control: Control;
6
+ rules?: Exclude<RegisterOptions, "valueAsNumber" | "valueAsDate" | "setValueAs">;
7
+ }
8
+ export declare const FormImagePicker: React.ForwardRefExoticComponent<FormImagePickerProps & React.RefAttributes<any>>;
9
+ export {};
@@ -0,0 +1,14 @@
1
+ import React, { HTMLInputTypeAttribute } from "react";
2
+ import { Control, RegisterOptions } from "react-hook-form/dist/index.ie11";
3
+ import { InputProps } from "../Input/Input";
4
+ import { FormFieldLabelerWithFormProps } from "./form.types";
5
+ interface FormInputProps extends Omit<InputProps, "name">, FormFieldLabelerWithFormProps {
6
+ control: Control;
7
+ rules?: Exclude<RegisterOptions, "valueAsNumber" | "valueAsDate" | "setValueAs">;
8
+ type: Extract<HTMLInputTypeAttribute, "email" | "number" | "password" | "text">;
9
+ }
10
+ /**
11
+ * Input field that can be used in any react-hook-form context.
12
+ */
13
+ export declare const FormInput: React.ForwardRefExoticComponent<FormInputProps & React.RefAttributes<HTMLInputElement>>;
14
+ export {};
@@ -0,0 +1,13 @@
1
+ import React from "react";
2
+ import { Control, RegisterOptions } from "react-hook-form/dist/index.ie11";
3
+ import { RadioGroupProps } from "../RadioGroup/RadioGroupV2";
4
+ import { FormFieldLabelerWithFormProps } from "./form.types";
5
+ interface FormRadioGroupProps extends Omit<RadioGroupProps, "isError">, FormFieldLabelerWithFormProps {
6
+ control: Control;
7
+ rules?: Exclude<RegisterOptions, "valueAsNumber" | "valueAsDate" | "setValueAs">;
8
+ }
9
+ /**
10
+ * Radio Group that can be used in any react-hook-form context.
11
+ */
12
+ export declare const FormRadioGroup: React.ForwardRefExoticComponent<FormRadioGroupProps & React.RefAttributes<HTMLInputElement>>;
13
+ export {};
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ import { Control, RegisterOptions } from "react-hook-form/dist/index.ie11";
3
+ import { SelectProps } from "../Select/Select";
4
+ import { FormFieldLabelerWithFormProps } from "./form.types";
5
+ interface FormSelectProps extends Omit<SelectProps, "name">, FormFieldLabelerWithFormProps {
6
+ control: Control;
7
+ rules?: Exclude<RegisterOptions, "valueAsNumber" | "valueAsDate" | "setValueAs">;
8
+ }
9
+ export declare const FormSelect: React.ForwardRefExoticComponent<FormSelectProps & React.RefAttributes<any>>;
10
+ export {};
@@ -0,0 +1,14 @@
1
+ import React from "react";
2
+ import { Control, RegisterOptions } from "react-hook-form/dist/index.ie11";
3
+ import { TextareaProps } from "../Textarea/Textarea";
4
+ import { FieldTextareaConfiguration, FormFieldLabelerWithFormProps } from "./form.types";
5
+ interface FormTextareaProps extends FieldTextareaConfiguration, Omit<TextareaProps, "name">, FormFieldLabelerWithFormProps {
6
+ control: Control;
7
+ rules?: Exclude<RegisterOptions, "valueAsNumber" | "valueAsDate" | "setValueAs">;
8
+ type: "textarea";
9
+ }
10
+ /**
11
+ * Input field that can be used in any react-hook-form context.
12
+ */
13
+ export declare const FormTextarea: React.ForwardRefExoticComponent<FormTextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
14
+ export {};
@@ -0,0 +1,3 @@
1
+ import { FieldErrors, RegisterOptions } from "react-hook-form/dist/index.ie11";
2
+ export declare const hasError: (name?: string, errors?: FieldErrors) => boolean;
3
+ export declare const isRequired: (options?: RegisterOptions) => boolean;
@@ -0,0 +1,92 @@
1
+ import { FieldErrors, FieldName, FieldValues, RegisterOptions } from "react-hook-form/dist/index.ie11";
2
+ import React, { HTMLInputTypeAttribute } from "react";
3
+ import { InputProps } from "../Input/Input";
4
+ import { RadioGroupProps } from "../RadioGroup/RadioGroupV2";
5
+ import { SelectProps } from "../Select/Select";
6
+ import { ImagePickerProps } from "../MediaPicker/MediaPicker";
7
+ import { PartialProperties } from "../../types/general.types";
8
+ import { CheckboxProps } from "../Checkbox/Checkbox";
9
+ import { TextareaProps } from "../Textarea/Textarea";
10
+ import { TitleProps } from "../Title/Title";
11
+ export type AllowedTextInputTypes = Extract<HTMLInputTypeAttribute, "email" | "number" | "password" | "text">;
12
+ export type FormFieldWidth = "sm" | "md" | "lg" | "xl" | "full";
13
+ interface FormFieldBaseConfiguration<TFieldType> extends FormFieldLabelerProps {
14
+ name: FieldName<FieldValues>;
15
+ options?: RegisterOptions;
16
+ fieldProps?: TFieldType;
17
+ }
18
+ export interface FormFieldLabelerProps {
19
+ label?: string;
20
+ info?: string;
21
+ /**
22
+ * allow for custom styling of the labeler component
23
+ */
24
+ decoratorClassname?: string;
25
+ }
26
+ /**
27
+ * This is an empty entry in the field form. To be used
28
+ * when there's logic to add/remove fields from the array.
29
+ *
30
+ * Using this makes life easier and avoids having to splice/push/concat fields.
31
+ */
32
+ interface FieldVoidConfiguration extends Partial<FormFieldBaseConfiguration<never>> {
33
+ type: "void";
34
+ }
35
+ export type FormFieldConfiguration<TFieldValues> = FieldInputConfiguration | FieldSelectConfiguration | FieldImagePickerConfiguration | FieldRadioGroupConfiguration | FieldRowConfiguration<TFieldValues> | FieldCheckboxConfiguration | FieldCheckboxListConfiguration | FieldTextareaConfiguration | FieldTitleConfiguration | FieldVoidConfiguration;
36
+ /**
37
+ * @backwardscompatibility
38
+ * @deprecated - this is an alias for `FormFieldConfiguration`, for backwards compatibility the name can remain for now, but
39
+ * import `FormFieldConfiguration` whenever you need this type in the future.
40
+ */
41
+ export type FormFieldProps<TFieldValues> = FormFieldConfiguration<TFieldValues>;
42
+ export interface FieldRowConfiguration<TFieldValues> extends Record<keyof FormFieldBaseConfiguration<never>, never> {
43
+ type: "row";
44
+ key: string;
45
+ fields: FormFieldConfiguration<TFieldValues>[];
46
+ }
47
+ export interface FieldTitleConfiguration extends FormFieldBaseConfiguration<TitleProps> {
48
+ type: "title";
49
+ }
50
+ export interface FieldInputConfiguration extends FormFieldBaseConfiguration<Omit<InputProps, "name">> {
51
+ type: AllowedTextInputTypes;
52
+ }
53
+ export interface FieldTextareaConfiguration extends FormFieldBaseConfiguration<Omit<TextareaProps, "name">> {
54
+ type: "textarea";
55
+ }
56
+ export interface FieldRadioGroupConfiguration extends FormFieldBaseConfiguration<Omit<RadioGroupProps, "name">> {
57
+ type: "radioGroup";
58
+ }
59
+ export interface FieldSelectConfiguration extends FormFieldBaseConfiguration<SelectProps> {
60
+ type: "select";
61
+ fieldProps: SelectProps;
62
+ }
63
+ export type ImagePickerFieldConfiguration = PartialProperties<Omit<ImagePickerProps, "name">, "handleChange">;
64
+ export interface FieldImagePickerConfiguration extends FormFieldBaseConfiguration<ImagePickerFieldConfiguration> {
65
+ type: "imagePicker";
66
+ fieldProps: ImagePickerFieldConfiguration;
67
+ }
68
+ export interface FieldCheckboxConfiguration extends FormFieldBaseConfiguration<Omit<CheckboxProps, "name" | "type">> {
69
+ type: "checkbox";
70
+ variant?: CheckboxProps["type"];
71
+ }
72
+ /**
73
+ * Omiting `groups` and `onChange` here because these will be handled by
74
+ * the `Control` component from react-hook-form.
75
+ */
76
+ export interface FieldCheckboxListConfiguration extends FormFieldBaseConfiguration<{
77
+ className?: string;
78
+ }> {
79
+ type: "checkboxlist";
80
+ }
81
+ /**
82
+ * This type is the base for every form field component wrapped in the `FormFieldLabeler` and `Control` from `react-form-hook`.
83
+ * This is your baseline for creating a new form field type. For reference, look at FormInput.tsx.
84
+ *
85
+ */
86
+ export interface FormFieldLabelerWithFormProps extends FormFieldLabelerProps {
87
+ name: string;
88
+ fieldErrors: FieldErrors;
89
+ fieldRequired: boolean;
90
+ children?: React.ReactNode;
91
+ }
92
+ export {};
@@ -0,0 +1,17 @@
1
+ import React from "react";
2
+ import { IconProps, IconKey } from "../Icons/types/IconProps.type";
3
+ export declare const Icon: React.FC<{
4
+ name: IconKey;
5
+ } & IconProps>;
6
+ /**
7
+ * This is a temporary component toui-transition the way we pass icons to components.
8
+ * Once all components are passed an IconKey instead of a function component we can replace it with the Icon component.
9
+ *
10
+ * If any expansion or customization must be made for all icons, do it in the iconWrapper.tsx component.
11
+ *
12
+ * @linkcode https://github.com/Luscii/web-ui/blob/main/src/components/Icons/iconWrapper/iconWrapper.tsx
13
+ */
14
+ export declare const IconComponentOrKey: React.FC<{
15
+ name: React.FunctionComponent<IconProps> | IconKey;
16
+ } & IconProps>;
17
+ export default Icon;
@@ -0,0 +1 @@
1
+ export { Icon } from "./Icon";
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { IconProps } from "./types/IconProps.type";
3
+ declare const _default: (props: IconProps) => JSX.Element;
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { IconProps } from "./types/IconProps.type";
3
+ declare const _default: (props: IconProps) => JSX.Element;
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { IconProps } from "./types/IconProps.type";
3
+ declare const _default: (props: IconProps) => JSX.Element;
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { IconProps } from "./types/IconProps.type";
3
+ declare const _default: (props: IconProps) => JSX.Element;
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { IconProps } from "./types/IconProps.type";
3
+ declare const _default: (props: IconProps) => JSX.Element;
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { IconProps } from "./types/IconProps.type";
3
+ declare const _default: (props: IconProps) => JSX.Element;
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { IconProps } from "./types/IconProps.type";
3
+ declare const _default: (props: IconProps) => JSX.Element;
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { IconProps } from "./types/IconProps.type";
3
+ declare const _default: (props: IconProps) => JSX.Element;
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { IconProps } from "./types/IconProps.type";
3
+ declare const _default: (props: IconProps) => JSX.Element;
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { IconProps } from "./types/IconProps.type";
3
+ declare const _default: (props: IconProps) => JSX.Element;
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { IconProps } from "./types/IconProps.type";
3
+ declare const _default: (props: IconProps) => JSX.Element;
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { IconProps } from "./types/IconProps.type";
3
+ declare const _default: (props: IconProps) => JSX.Element;
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { IconProps } from "./types/IconProps.type";
3
+ declare const _default: (props: IconProps) => JSX.Element;
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { IconProps } from "./types/IconProps.type";
3
+ declare const _default: (props: IconProps) => JSX.Element;
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { IconProps } from "./types/IconProps.type";
3
+ declare const _default: (props: IconProps) => JSX.Element;
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { IconProps } from "./types/IconProps.type";
3
+ declare const _default: (props: IconProps) => JSX.Element;
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { IconProps } from "./types/IconProps.type";
3
+ declare const _default: (props: IconProps) => JSX.Element;
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { IconProps } from "./types/IconProps.type";
3
+ declare const _default: (props: IconProps) => JSX.Element;
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { IconProps } from "./types/IconProps.type";
3
+ declare const _default: (props: IconProps) => JSX.Element;
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { IconProps } from "./types/IconProps.type";
3
+ declare const _default: (props: IconProps) => JSX.Element;
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { IconProps } from "./types/IconProps.type";
3
+ declare const _default: (props: IconProps) => JSX.Element;
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { IconProps } from "./types/IconProps.type";
3
+ declare const _default: (props: IconProps) => JSX.Element;
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { IconProps } from "./types/IconProps.type";
3
+ declare const _default: (props: IconProps) => JSX.Element;
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { IconProps } from "./types/IconProps.type";
3
+ declare const _default: (props: IconProps) => JSX.Element;
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { IconProps } from "./types/IconProps.type";
3
+ declare const _default: (props: IconProps) => JSX.Element;
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { IconProps } from "./types/IconProps.type";
3
+ declare const _default: (props: IconProps) => JSX.Element;
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { IconProps } from "./types/IconProps.type";
3
+ declare const _default: (props: IconProps) => JSX.Element;
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { IconProps } from "./types/IconProps.type";
3
+ declare const _default: (props: IconProps) => JSX.Element;
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { IconProps } from "./types/IconProps.type";
3
+ declare const _default: (props: IconProps) => JSX.Element;
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { IconProps } from "./types/IconProps.type";
3
+ declare const _default: (props: IconProps) => JSX.Element;
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { IconProps } from "./types/IconProps.type";
3
+ declare const _default: (props: IconProps) => JSX.Element;
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { IconProps } from "./types/IconProps.type";
3
+ declare const _default: (props: IconProps) => JSX.Element;
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { IconProps } from "./types/IconProps.type";
3
+ declare const _default: (props: IconProps) => JSX.Element;
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { IconProps } from "./types/IconProps.type";
3
+ declare const _default: (props: IconProps) => JSX.Element;
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { IconProps } from "./types/IconProps.type";
3
+ declare const _default: (props: IconProps) => JSX.Element;
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { IconProps } from "./types/IconProps.type";
3
+ declare const _default: (props: IconProps) => JSX.Element;
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { IconProps } from "./types/IconProps.type";
3
+ declare const _default: (props: IconProps) => JSX.Element;
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { IconProps } from "./types/IconProps.type";
3
+ declare const _default: (props: IconProps) => JSX.Element;
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { IconProps } from "./types/IconProps.type";
3
+ declare const _default: (props: IconProps) => JSX.Element;
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { IconProps } from "./types/IconProps.type";
3
+ declare const _default: (props: IconProps) => JSX.Element;
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { IconProps } from "./types/IconProps.type";
3
+ declare const _default: (props: IconProps) => JSX.Element;
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { IconProps } from "./types/IconProps.type";
3
+ declare const _default: (props: IconProps) => JSX.Element;
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { IconProps } from "./types/IconProps.type";
3
+ declare const _default: (props: IconProps) => JSX.Element;
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { IconProps } from "./types/IconProps.type";
3
+ declare const _default: (props: IconProps) => JSX.Element;
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { IconProps } from "./types/IconProps.type";
3
+ declare const _default: (props: IconProps) => JSX.Element;
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { IconProps } from "./types/IconProps.type";
3
+ declare const _default: (props: IconProps) => JSX.Element;
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { IconProps } from "./types/IconProps.type";
3
+ declare const _default: (props: IconProps) => JSX.Element;
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { IconProps } from "./types/IconProps.type";
3
+ declare const _default: (props: IconProps) => JSX.Element;
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { IconProps } from "./types/IconProps.type";
3
+ declare const _default: (props: IconProps) => JSX.Element;
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ import { HTMLAttributes } from "react";
2
+ import { IconProps } from "../types/IconProps.type";
3
+ declare const IconWrapper: (SVGComponent: (props: IconProps & Pick<HTMLAttributes<SVGElement>, "role">) => JSX.Element) => (props: IconProps) => JSX.Element;
4
+ export default IconWrapper;
@@ -0,0 +1 @@
1
+ export { default } from "./iconWrapper";