@luscii-healthtech/web-ui 0.0.0-alpha.01cea45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +238 -0
- package/dist/components/Accordion/Accordion.d.ts +10 -0
- package/dist/components/Accordion/AccordionItem.d.ts +9 -0
- package/dist/components/AccordionList/AccordionList.d.ts +42 -0
- package/dist/components/AccordionList/subcomponents/AccordionListActions.d.ts +18 -0
- package/dist/components/Avatar/Avatar.d.ts +23 -0
- package/dist/components/Badge/Badge.d.ts +7 -0
- package/dist/components/BaseList/BaseList.d.ts +7 -0
- package/dist/components/BaseList/BaseList.types.d.ts +55 -0
- package/dist/components/BaseList/BaseListEmptyState.d.ts +7 -0
- package/dist/components/BaseList/BaseListHeader.d.ts +4 -0
- package/dist/components/BaseList/BaseListIcon.d.ts +5 -0
- package/dist/components/BaseList/BaseListItem.d.ts +4 -0
- package/dist/components/BaseList/DraggableBaseList/DraggableBaseList.d.ts +4 -0
- package/dist/components/BaseList/DraggableBaseList/DraggableBaseListItem.d.ts +3 -0
- package/dist/components/BaseList/DraggableBaseList/index.d.ts +2 -0
- package/dist/components/BaseList/ListSkeleton/ListItemSkeleton.d.ts +2 -0
- package/dist/components/BaseList/ListSkeleton/ListSkeleton.d.ts +8 -0
- package/dist/components/BaseList/SortableBaseList/SortableBaseList.d.ts +4 -0
- package/dist/components/BaseList/SortableBaseList/SortableBaseListItem.d.ts +3 -0
- package/dist/components/BaseList/SortableBaseList/index.d.ts +2 -0
- package/dist/components/BaseList/index.d.ts +6 -0
- package/dist/components/BaseList/utils.d.ts +10 -0
- package/dist/components/Breadcrumbs/BreadcrumbItem.d.ts +4 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +3 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.types.d.ts +14 -0
- package/dist/components/Breadcrumbs/index.d.ts +2 -0
- package/dist/components/Button/Button.d.ts +9 -0
- package/dist/components/Button/Button.types.d.ts +32 -0
- package/dist/components/Button/ButtonIcon.d.ts +7 -0
- package/dist/components/ButtonV2/ButtonProps.type.d.ts +49 -0
- package/dist/components/ButtonV2/ButtonV2.d.ts +3 -0
- package/dist/components/ButtonV2/PrimaryButton.d.ts +3 -0
- package/dist/components/ButtonV2/SecondaryButton.d.ts +3 -0
- package/dist/components/ButtonV2/TertiaryButton.d.ts +3 -0
- package/dist/components/Card/Actions.d.ts +2 -0
- package/dist/components/Card/Card.d.ts +57 -0
- package/dist/components/Card/Padding.d.ts +6 -0
- package/dist/components/Card/Section.d.ts +6 -0
- package/dist/components/Card/TopBar.d.ts +9 -0
- package/dist/components/Carousel/Carousel.d.ts +8 -0
- package/dist/components/Carousel/GliderContainer.d.ts +7 -0
- package/dist/components/CenteredHero/CenteredHero.d.ts +14 -0
- package/dist/components/CheckBoxListModal/CheckboxListModal.d.ts +30 -0
- package/dist/components/Checkbox/Checkbox.d.ts +64 -0
- package/dist/components/CheckboxList/CheckboxGroup.d.ts +3 -0
- package/dist/components/CheckboxList/CheckboxList.d.ts +4 -0
- package/dist/components/CheckboxList/CheckboxList.types.d.ts +74 -0
- package/dist/components/ConfirmationDialog/ConfirmationDialog.d.ts +3 -0
- package/dist/components/ConfirmationDialog/ConfirmationDialogChoices.d.ts +7 -0
- package/dist/components/ConfirmationDialog/ConfirmationDialogMessage.d.ts +4 -0
- package/dist/components/ConfirmationDialog/ConfirmationDialogTitle.d.ts +3 -0
- package/dist/components/ConfirmationDialog/types/ConfirmationDialog.types.d.ts +41 -0
- package/dist/components/Container/FlexColumn.d.ts +7 -0
- package/dist/components/Container/FlexContainer.d.ts +9 -0
- package/dist/components/Container/FlexRow.d.ts +7 -0
- package/dist/components/Container/types/FlexContainerProps.type.d.ts +26 -0
- package/dist/components/Divider/Divider.d.ts +6 -0
- package/dist/components/DragHandle/DragHandle.d.ts +7 -0
- package/dist/components/DragHandle/DragHandle.types.d.ts +6 -0
- package/dist/components/DragHandle/index.d.ts +2 -0
- package/dist/components/Dropzone/Dropzone.d.ts +6 -0
- package/dist/components/Dropzone/Dropzone.types.d.ts +33 -0
- package/dist/components/Dropzone/index.d.ts +2 -0
- package/dist/components/EmptyListMessage/EmptyListMessage.d.ts +14 -0
- package/dist/components/FilterBar/ActiveFilters.d.ts +9 -0
- package/dist/components/FilterBar/FilterBar.d.ts +96 -0
- package/dist/components/FilterBar/FilterBar.utils.d.ts +32 -0
- package/dist/components/FilterBar/FilterBarProps.type.d.ts +86 -0
- package/dist/components/FilterBar/FiltersMenus.d.ts +8 -0
- package/dist/components/FilterBar/SortMenu.d.ts +9 -0
- package/dist/components/FilterBar/index.d.ts +2 -0
- package/dist/components/Form/Form.d.ts +30 -0
- package/dist/components/Form/FormFieldCheckbox.d.ts +9 -0
- package/dist/components/Form/FormFieldCheckboxList.d.ts +9 -0
- package/dist/components/Form/FormFieldErrorMessages.d.ts +8 -0
- package/dist/components/Form/FormFieldLabeler.d.ts +8 -0
- package/dist/components/Form/FormImagePicker.d.ts +9 -0
- package/dist/components/Form/FormInput.d.ts +14 -0
- package/dist/components/Form/FormRadioGroup.d.ts +13 -0
- package/dist/components/Form/FormSelect.d.ts +10 -0
- package/dist/components/Form/FormTextarea.d.ts +14 -0
- package/dist/components/Form/form.transformer.d.ts +3 -0
- package/dist/components/Form/form.types.d.ts +92 -0
- package/dist/components/Icon/Icon.d.ts +17 -0
- package/dist/components/Icon/index.d.ts +1 -0
- package/dist/components/Icons/BellIcon.d.ts +4 -0
- package/dist/components/Icons/BluetoothIcon.d.ts +4 -0
- package/dist/components/Icons/CalendarDayIcon.d.ts +4 -0
- package/dist/components/Icons/CalendarMonthIcon.d.ts +4 -0
- package/dist/components/Icons/CalendarRepeatIcon.d.ts +4 -0
- package/dist/components/Icons/ChartBarsIcon.d.ts +4 -0
- package/dist/components/Icons/ChartLineAndBarsIcon.d.ts +4 -0
- package/dist/components/Icons/ChatBubbleIcon.d.ts +4 -0
- package/dist/components/Icons/ChatBubbleWithTextIcon.d.ts +4 -0
- package/dist/components/Icons/CheckIcon.d.ts +4 -0
- package/dist/components/Icons/ChevronDoubleIcon.d.ts +4 -0
- package/dist/components/Icons/ChevronDownIcon.d.ts +4 -0
- package/dist/components/Icons/ChevronLeftIcon.d.ts +4 -0
- package/dist/components/Icons/ChevronRightIcon.d.ts +4 -0
- package/dist/components/Icons/ClockIcon.d.ts +4 -0
- package/dist/components/Icons/CogwheelIcon.d.ts +4 -0
- package/dist/components/Icons/CopyToClipboardIcon.d.ts +4 -0
- package/dist/components/Icons/CrossIcon.d.ts +4 -0
- package/dist/components/Icons/CrossInCircleIcon.d.ts +4 -0
- package/dist/components/Icons/CrossInFilledCircleIcon.d.ts +4 -0
- package/dist/components/Icons/DatabaseIcon.d.ts +4 -0
- package/dist/components/Icons/DragIndicatorIcon.d.ts +4 -0
- package/dist/components/Icons/EmailIcon.d.ts +4 -0
- package/dist/components/Icons/EmptyIcon.d.ts +4 -0
- package/dist/components/Icons/ExclamationMarkIcon.d.ts +4 -0
- package/dist/components/Icons/ExportIcon.d.ts +4 -0
- package/dist/components/Icons/EyeClosedIcon.d.ts +4 -0
- package/dist/components/Icons/EyeIconSlashed.d.ts +4 -0
- package/dist/components/Icons/EyeOpenIcon.d.ts +4 -0
- package/dist/components/Icons/FilterIcon.d.ts +4 -0
- package/dist/components/Icons/FireIcon.d.ts +4 -0
- package/dist/components/Icons/FirstAidKitIcon.d.ts +4 -0
- package/dist/components/Icons/FlagIcon.d.ts +4 -0
- package/dist/components/Icons/ForwardIcon.d.ts +4 -0
- package/dist/components/Icons/GroupIcon.d.ts +4 -0
- package/dist/components/Icons/GroupOfThreeIcon.d.ts +4 -0
- package/dist/components/Icons/HamburgerIcon.d.ts +4 -0
- package/dist/components/Icons/HandshakeIcon.d.ts +4 -0
- package/dist/components/Icons/HeartIcon.d.ts +4 -0
- package/dist/components/Icons/HomeIcon.d.ts +4 -0
- package/dist/components/Icons/ImageIcon.d.ts +4 -0
- package/dist/components/Icons/InfoIcon.d.ts +4 -0
- package/dist/components/Icons/LifebuoyIcon.d.ts +4 -0
- package/dist/components/Icons/LightBulbIcon.d.ts +4 -0
- package/dist/components/Icons/LinkIcon.d.ts +4 -0
- package/dist/components/Icons/LockIcon.d.ts +4 -0
- package/dist/components/Icons/LogOutIcon.d.ts +4 -0
- package/dist/components/Icons/MessageWithArrowIcon.d.ts +4 -0
- package/dist/components/Icons/MoreIcon.d.ts +4 -0
- package/dist/components/Icons/MouseIcon.d.ts +4 -0
- package/dist/components/Icons/NoteIcon.d.ts +4 -0
- package/dist/components/Icons/PageViewIcon.d.ts +4 -0
- package/dist/components/Icons/PatientIcon.d.ts +4 -0
- package/dist/components/Icons/PencilIcon.d.ts +4 -0
- package/dist/components/Icons/PhoneIcon.d.ts +4 -0
- package/dist/components/Icons/PieChartIcon.d.ts +4 -0
- package/dist/components/Icons/PinIcon.d.ts +4 -0
- package/dist/components/Icons/PlusIcon.d.ts +4 -0
- package/dist/components/Icons/PrinterIcon.d.ts +4 -0
- package/dist/components/Icons/RobotIcon.d.ts +4 -0
- package/dist/components/Icons/RocketIcon.d.ts +4 -0
- package/dist/components/Icons/SearchIcon.d.ts +4 -0
- package/dist/components/Icons/ShareIcon.d.ts +4 -0
- package/dist/components/Icons/SmallCircleIcon.d.ts +4 -0
- package/dist/components/Icons/SmallDiamondIcon.d.ts +4 -0
- package/dist/components/Icons/SmallSquareIcon.d.ts +4 -0
- package/dist/components/Icons/StarIcon.d.ts +4 -0
- package/dist/components/Icons/TrashBinIcon.d.ts +4 -0
- package/dist/components/Icons/iconWrapper/iconWrapper.d.ts +4 -0
- package/dist/components/Icons/iconWrapper/index.d.ts +1 -0
- package/dist/components/Icons/index.d.ts +244 -0
- package/dist/components/Icons/special-icons/ChartLineColoredIcon.d.ts +4 -0
- package/dist/components/Icons/special-icons/GearColoredIcon.d.ts +4 -0
- package/dist/components/Icons/special-icons/GroupColoredIcon.d.ts +4 -0
- package/dist/components/Icons/special-icons/StatusColoredIcon.d.ts +4 -0
- package/dist/components/Icons/special-icons/index.d.ts +4 -0
- package/dist/components/Icons/types/IconProps.type.d.ts +8 -0
- package/dist/components/Image/Image.d.ts +10 -0
- package/dist/components/InfoField/InfoField.d.ts +28 -0
- package/dist/components/Input/Input.d.ts +56 -0
- package/dist/components/Input/SearchInput.d.ts +24 -0
- package/dist/components/Link/Link.d.ts +19 -0
- package/dist/components/List/List.d.ts +6 -0
- package/dist/components/List/List.types.d.ts +19 -0
- package/dist/components/List/ListItem.d.ts +4 -0
- package/dist/components/List/index.d.ts +5 -0
- package/dist/components/LoadingIndicator/LoadingIndicator.d.ts +12 -0
- package/dist/components/MediaPicker/ImageCategory.d.ts +14 -0
- package/dist/components/MediaPicker/MediaPicker.d.ts +91 -0
- package/dist/components/Modal/FullPageModal.d.ts +41 -0
- package/dist/components/Modal/FullPageModalHeader.d.ts +13 -0
- package/dist/components/Modal/Modal.d.ts +11 -0
- package/dist/components/Modal/ModalBase.d.ts +16 -0
- package/dist/components/Modal/ModalFooter.d.ts +12 -0
- package/dist/components/Modal/ModalHeader.d.ts +6 -0
- package/dist/components/Modal/subcomponents/FullPageModalActions.d.ts +18 -0
- package/dist/components/NavMenu/NavLayout.d.ts +35 -0
- package/dist/components/NavMenu/NavMenu.d.ts +16 -0
- package/dist/components/NavMenu/NavMenuContent.d.ts +3 -0
- package/dist/components/NavMenu/NavMenuFooter.d.ts +3 -0
- package/dist/components/NavMenu/NavMenuHeader.d.ts +3 -0
- package/dist/components/NavMenu/NavMenuItem.d.ts +3 -0
- package/dist/components/NavMenu/types/NavMenuFooterProps.type.d.ts +5 -0
- package/dist/components/NavMenu/types/NavMenuHeaderProps.type.d.ts +11 -0
- package/dist/components/NavMenu/types/NavMenuItemProps.type.d.ts +11 -0
- package/dist/components/NotificationBanner/NotificationBanner.d.ts +41 -0
- package/dist/components/Page/CRUDPage.d.ts +4 -0
- package/dist/components/Page/CRUDPage.types.d.ts +32 -0
- package/dist/components/Page/index.d.ts +3 -0
- package/dist/components/PageHeader/PageHeader.d.ts +4 -0
- package/dist/components/PageHeader/PageHeader.types.d.ts +28 -0
- package/dist/components/PageHeader/index.d.ts +2 -0
- package/dist/components/PaginationMenu/PaginationMenu.d.ts +3 -0
- package/dist/components/PaginationMenu/PaginationMenu.types.d.ts +37 -0
- package/dist/components/PaginationMenu/PaginationMenu.utils.d.ts +15 -0
- package/dist/components/PaginationMenu/PaginationMenuLarge.d.ts +3 -0
- package/dist/components/PaginationMenu/PaginationMenuSmall.d.ts +3 -0
- package/dist/components/PreviewPhone/PreviewPhone.d.ts +7 -0
- package/dist/components/Radio/RadioV2.d.ts +17 -0
- package/dist/components/RadioGroup/RadioGroupV2.d.ts +10 -0
- package/dist/components/Section/Section.d.ts +25 -0
- package/dist/components/Section/SectionItem.d.ts +9 -0
- package/dist/components/Section/SectionItemWithContent.d.ts +9 -0
- package/dist/components/Section/subcomponents/SectionActions.d.ts +21 -0
- package/dist/components/Select/Select.d.ts +46 -0
- package/dist/components/Select/SelectDropdownIndicator.d.ts +3 -0
- package/dist/components/Select/SelectLoadingIndicator.d.ts +3 -0
- package/dist/components/SettingsMenuButton/SettingsMenuButton.d.ts +19 -0
- package/dist/components/Spinner/Spinner.d.ts +6 -0
- package/dist/components/Steps/Step.d.ts +10 -0
- package/dist/components/Steps/Steps.d.ts +10 -0
- package/dist/components/Tabbar/Tabbar.d.ts +18 -0
- package/dist/components/Tabbar/TabbarItem.d.ts +16 -0
- package/dist/components/Table/Table.d.ts +16 -0
- package/dist/components/Table/Table.types.d.ts +42 -0
- package/dist/components/Table/Table.utils.d.ts +3 -0
- package/dist/components/Table/TableBody.d.ts +13 -0
- package/dist/components/Table/TableBodyRow.d.ts +10 -0
- package/dist/components/Table/TableBodyRowDataCell.d.ts +8 -0
- package/dist/components/Table/TableFooter.d.ts +8 -0
- package/dist/components/Table/TableHeader.d.ts +7 -0
- package/dist/components/Tag/Tag.d.ts +26 -0
- package/dist/components/Tag/TagGroup.d.ts +23 -0
- package/dist/components/Text/Text.d.ts +115 -0
- package/dist/components/TextEditor/TextEditor.d.ts +53 -0
- package/dist/components/TextLink/TextLink.d.ts +14 -0
- package/dist/components/Textarea/Textarea.d.ts +33 -0
- package/dist/components/Timeline/Timeline.d.ts +14 -0
- package/dist/components/Timeline/TimelineHeader.d.ts +10 -0
- package/dist/components/Timeline/TimelineStep.d.ts +10 -0
- package/dist/components/Title/Title.d.ts +31 -0
- package/dist/components/Toaster/Toaster.d.ts +17 -0
- package/dist/components/Toaster/toast-elements-getter.d.ts +22 -0
- package/dist/components/Toaster/toast-progress-animator.d.ts +12 -0
- package/dist/components/Toaster/toast.d.ts +12 -0
- package/dist/components/UnorderedList/UnorderedList.d.ts +61 -0
- package/dist/components/VerticalMenu/VerticalMenu.d.ts +84 -0
- package/dist/components/ViewItem/ViewItem.d.ts +16 -0
- package/dist/components/WeekdaysPicker/WeekdaysPicker.d.ts +42 -0
- package/dist/index.d.ts +82 -0
- package/dist/index.development.js +6063 -0
- package/dist/index.development.js.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/types/general.types.d.ts +8 -0
- package/dist/utils/string.utils.d.ts +7 -0
- package/dist/web-ui-tailwind.css +3082 -0
- package/dist/web-ui.esm.js +2 -0
- package/dist/web-ui.esm.js.map +1 -0
- package/package.json +165 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./Toaster.scss";
|
|
3
|
+
export interface ToasterProps {
|
|
4
|
+
type: "success" | "failure";
|
|
5
|
+
message: string;
|
|
6
|
+
title: string;
|
|
7
|
+
isVisible?: boolean;
|
|
8
|
+
/** if you need to reposition the toaster for whatever reason you can use these props */
|
|
9
|
+
styleOverwrite?: Pick<React.CSSProperties, "top" | "bottom" | "left" | "right">;
|
|
10
|
+
}
|
|
11
|
+
export declare const TOASTER_TYPE_OPTIONS: {
|
|
12
|
+
readonly SUCCESS: "success";
|
|
13
|
+
readonly FAILURE: "failure";
|
|
14
|
+
};
|
|
15
|
+
export type ToasterType = (typeof TOASTER_TYPE_OPTIONS)[keyof typeof TOASTER_TYPE_OPTIONS];
|
|
16
|
+
declare const Toaster: React.VoidFunctionComponent<ToasterProps>;
|
|
17
|
+
export default Toaster;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
interface GetToasterElementsParams {
|
|
3
|
+
timeoutId: NodeJS.Timeout;
|
|
4
|
+
progressBarAnimationFrameHandler: number;
|
|
5
|
+
}
|
|
6
|
+
interface GetToasterElementsReturn {
|
|
7
|
+
toasterElementMessage: HTMLElement;
|
|
8
|
+
toasterProgressBar: HTMLElement;
|
|
9
|
+
toasterElementTitle: HTMLElement;
|
|
10
|
+
toasterElementSuccessIcon: HTMLElement;
|
|
11
|
+
toasterElementFailureIcon: HTMLElement;
|
|
12
|
+
toasterElementContainer: HTMLElement;
|
|
13
|
+
toasterCloseButton: HTMLElement;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
*
|
|
17
|
+
* @param params.timeoutId - the timeoutId (that makes the toaster vanish), in case of a shortcut
|
|
18
|
+
* @param params.progressBarAnimationFrameHandler - animation frame id to be canceled in case of a shortcut
|
|
19
|
+
* @returns a collection of html elements to be manipulated by the animation
|
|
20
|
+
*/
|
|
21
|
+
export declare const getToasterElements: (params: GetToasterElementsParams) => GetToasterElementsReturn;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
interface AnimateProgressParams {
|
|
2
|
+
animationDuration: number;
|
|
3
|
+
progressBarElement: HTMLElement;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Reference: https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame
|
|
7
|
+
* @param params.animationDuration - the amount of seconds theui-duration will take
|
|
8
|
+
* @param params.progressBarElement - the html element for the progress bar
|
|
9
|
+
* @returns the animation frame id
|
|
10
|
+
*/
|
|
11
|
+
export declare const animateProgress: (params: AnimateProgressParams) => number;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
type ToastParams = {
|
|
2
|
+
message: string;
|
|
3
|
+
title?: string;
|
|
4
|
+
showIcon?: boolean;
|
|
5
|
+
type: "success" | "failure";
|
|
6
|
+
} | string;
|
|
7
|
+
export declare const toast: {
|
|
8
|
+
(params: ToastParams): void;
|
|
9
|
+
error(message: string): void;
|
|
10
|
+
info(message: string): void;
|
|
11
|
+
};
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
type Props = React.ComponentPropsWithoutRef<"ul"> & {
|
|
3
|
+
/**
|
|
4
|
+
* @private
|
|
5
|
+
* This prop is for internal logic. Do not use.
|
|
6
|
+
*/
|
|
7
|
+
_DO_NOT_USE_isRoot?: boolean;
|
|
8
|
+
};
|
|
9
|
+
type StaticComponents = {
|
|
10
|
+
Item: typeof Item;
|
|
11
|
+
Padding: typeof Padding;
|
|
12
|
+
/**
|
|
13
|
+
* Sometimes you want to put the sub-list in another component, like this:
|
|
14
|
+
* ```tsx
|
|
15
|
+
* const MySubList = ({ className }: { className?: string }) => (
|
|
16
|
+
* <UList className={className}>
|
|
17
|
+
* <UList.Item>
|
|
18
|
+
* <UList.Padding>
|
|
19
|
+
* <Text>Custom nested list - option A</Text>
|
|
20
|
+
* </UList.Padding>
|
|
21
|
+
* </UList.Item>
|
|
22
|
+
* <UList.Item>
|
|
23
|
+
* <UList.Padding>
|
|
24
|
+
* <Text>Custom nested list - option B</Text>
|
|
25
|
+
* </UList.Padding>
|
|
26
|
+
* </UList.Item>
|
|
27
|
+
* </UList>
|
|
28
|
+
*);
|
|
29
|
+
*```
|
|
30
|
+
*
|
|
31
|
+
* When you do, the `UnorderedList.Item` component won't recognize it as a sub-list, because
|
|
32
|
+
* it only considers the `UnorderedList` component as a sub-list.
|
|
33
|
+
* In case you need your sub-list to be in a separate component, you can use the `UnorderedList.Indent`
|
|
34
|
+
* component to tell the `UnorderedList.Item` component that it should consider the children as a sub-list.
|
|
35
|
+
*
|
|
36
|
+
* The child of `UnorderedList.Indent` should accept a `className` prop for this to work.
|
|
37
|
+
*/
|
|
38
|
+
Indent: typeof Indent;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Component delivering padding. Can be used to apply padding
|
|
42
|
+
* to list item, but also to the content of a list (e.g. the
|
|
43
|
+
* list or sublist title/description).
|
|
44
|
+
*/
|
|
45
|
+
declare const Padding: React.FC<{
|
|
46
|
+
children?: React.ReactNode;
|
|
47
|
+
className?: string;
|
|
48
|
+
}>;
|
|
49
|
+
type ItemProps = React.ComponentPropsWithoutRef<"li"> & {
|
|
50
|
+
/**
|
|
51
|
+
* @private
|
|
52
|
+
* This prop is for internal logic. Do not use.
|
|
53
|
+
*/
|
|
54
|
+
_DO_NOT_USE_index?: number;
|
|
55
|
+
};
|
|
56
|
+
declare const Item: React.FC<ItemProps>;
|
|
57
|
+
export declare const UnorderedList: React.FC<Props> & StaticComponents;
|
|
58
|
+
declare const Indent: React.FC<{
|
|
59
|
+
children?: React.ReactNode;
|
|
60
|
+
}>;
|
|
61
|
+
export { UnorderedList as UList };
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Text } from "../Text/Text";
|
|
3
|
+
import { Divider } from "../Divider/Divider";
|
|
4
|
+
type Props = React.ComponentPropsWithoutRef<"div"> & {
|
|
5
|
+
/**
|
|
6
|
+
* Renders above the menu items, but below the header.
|
|
7
|
+
*/
|
|
8
|
+
title?: string | React.ReactNode;
|
|
9
|
+
/**
|
|
10
|
+
* Renders above everything else.
|
|
11
|
+
*/
|
|
12
|
+
header?: React.ReactNode;
|
|
13
|
+
/**
|
|
14
|
+
* Renders below everything else.
|
|
15
|
+
*/
|
|
16
|
+
footer?: React.ReactNode;
|
|
17
|
+
};
|
|
18
|
+
type StaticComponents = {
|
|
19
|
+
Divider: typeof MenuDivider;
|
|
20
|
+
Item: typeof MenuItem;
|
|
21
|
+
ItemLayout: typeof MenuItemLayout;
|
|
22
|
+
ItemText: typeof MenuItemText;
|
|
23
|
+
ItemPadding: typeof MenuItemPadding;
|
|
24
|
+
NotificationBubble: typeof MenuItemNotificationBubble;
|
|
25
|
+
};
|
|
26
|
+
export declare const VerticalMenu: React.FC<Props> & StaticComponents;
|
|
27
|
+
declare function MenuItemText(props: Readonly<React.ComponentPropsWithoutRef<typeof Text>>): React.JSX.Element;
|
|
28
|
+
type GetClassNameFunction = (args?: {
|
|
29
|
+
/**
|
|
30
|
+
* Whether the item should display as active.
|
|
31
|
+
*/
|
|
32
|
+
isActive?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Your own class name to add to the item.
|
|
35
|
+
*/
|
|
36
|
+
classNameProp?: string;
|
|
37
|
+
}) => string;
|
|
38
|
+
type MenuItemProps = {
|
|
39
|
+
render: (props: {
|
|
40
|
+
/**
|
|
41
|
+
* Returns the "calculated" className for the item.
|
|
42
|
+
*
|
|
43
|
+
* The `VerticalMenu` component will decide which
|
|
44
|
+
* classes should be applied to a menu item to make
|
|
45
|
+
* it appear correctly in the menu. By placing the
|
|
46
|
+
* string of these classes on your own element/component,
|
|
47
|
+
* you allow the `VerticalMenu` component to style your
|
|
48
|
+
* element correctly.
|
|
49
|
+
*/
|
|
50
|
+
getClassName: GetClassNameFunction;
|
|
51
|
+
}) => React.ReactNode;
|
|
52
|
+
children?: never;
|
|
53
|
+
paddingX?: never;
|
|
54
|
+
paddingY?: never;
|
|
55
|
+
} | {
|
|
56
|
+
render?: never;
|
|
57
|
+
children?: React.ReactNode;
|
|
58
|
+
paddingX?: boolean;
|
|
59
|
+
paddingY?: boolean;
|
|
60
|
+
};
|
|
61
|
+
declare function MenuItem(props: MenuItemProps): string | number | boolean | Iterable<React.ReactNode> | React.JSX.Element | null | undefined;
|
|
62
|
+
type MenuItemLayoutProps = {
|
|
63
|
+
icon?: React.ReactNode;
|
|
64
|
+
text?: React.ReactNode;
|
|
65
|
+
className?: string;
|
|
66
|
+
children?: React.ReactNode;
|
|
67
|
+
} & ({
|
|
68
|
+
aside?: React.ReactNode;
|
|
69
|
+
notificationBubbleText?: never;
|
|
70
|
+
} | {
|
|
71
|
+
aside?: never;
|
|
72
|
+
notificationBubbleText?: string;
|
|
73
|
+
});
|
|
74
|
+
declare function MenuItemLayout(props: MenuItemLayoutProps): React.JSX.Element;
|
|
75
|
+
declare function MenuItemPadding(props: Readonly<{
|
|
76
|
+
children?: React.ReactNode;
|
|
77
|
+
className?: string;
|
|
78
|
+
}>): React.JSX.Element;
|
|
79
|
+
declare function MenuItemNotificationBubble(props: Readonly<{
|
|
80
|
+
children?: React.ReactNode;
|
|
81
|
+
className?: string;
|
|
82
|
+
}>): React.JSX.Element;
|
|
83
|
+
declare function MenuDivider(props: React.ComponentPropsWithoutRef<typeof Divider>): React.JSX.Element;
|
|
84
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { TextProps } from "../Text/Text";
|
|
3
|
+
import { RestPropped } from "../../types/general.types";
|
|
4
|
+
import { ButtonProps } from "../Button/Button.types";
|
|
5
|
+
export interface ViewItemProps<AccessoryType extends JSX.Element> extends RestPropped {
|
|
6
|
+
titleProps?: TextProps;
|
|
7
|
+
title?: string;
|
|
8
|
+
titleAccessory?: AccessoryType;
|
|
9
|
+
contentProps?: TextProps[];
|
|
10
|
+
content?: string[];
|
|
11
|
+
defaultContent?: string;
|
|
12
|
+
className?: string;
|
|
13
|
+
buttons?: ButtonProps[];
|
|
14
|
+
}
|
|
15
|
+
export declare function ViewItem<AccessoryType extends JSX.Element>({ titleProps, title, titleAccessory, contentProps, content, defaultContent, className, buttons, ...restProps }: ViewItemProps<AccessoryType>): JSX.Element;
|
|
16
|
+
export default ViewItem;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export declare const weekdayValues: readonly ["monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday"];
|
|
3
|
+
export type Weekday = (typeof weekdayValues)[number];
|
|
4
|
+
/**
|
|
5
|
+
* The previous implementation of this component used the index of the
|
|
6
|
+
* weekday to indicate which days were selected. This function converts
|
|
7
|
+
* the `Weekday` value from the new API to the `number` value of the
|
|
8
|
+
* old API, for ease of migration.
|
|
9
|
+
*/
|
|
10
|
+
declare function weekdayNameToIndex(weekday: Weekday): 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
11
|
+
declare function weekdayNameToIndex(weekdays: Weekday[]): 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
12
|
+
/**
|
|
13
|
+
* The previous implementation of this component used the index of the
|
|
14
|
+
* weekday to indicate which days were selected. This function converts
|
|
15
|
+
* the `number` value from the old API to the `Weekday` value of the
|
|
16
|
+
* new API, for ease of migration.
|
|
17
|
+
*/
|
|
18
|
+
declare function indexToWeekdayName(index: number): Weekday;
|
|
19
|
+
declare function indexToWeekdayName(indexes: number[]): Weekday[];
|
|
20
|
+
export type Props = React.HTMLAttributes<HTMLDivElement> & {
|
|
21
|
+
/**
|
|
22
|
+
* The locale in which the weekday letters are displayed. Also
|
|
23
|
+
* affects the screen reader text.
|
|
24
|
+
*/
|
|
25
|
+
locale: string;
|
|
26
|
+
/**
|
|
27
|
+
* This component is controlled, so it needs to be fed in
|
|
28
|
+
* state. The result of `onChange` can be passed back in here
|
|
29
|
+
* to make the component function as a controlled component.
|
|
30
|
+
*/
|
|
31
|
+
selectedOptions: Weekday[];
|
|
32
|
+
onChange: (weekdayValues: Weekday[]) => void;
|
|
33
|
+
};
|
|
34
|
+
type StaticProperties = {
|
|
35
|
+
weekdayNameToIndex: typeof weekdayNameToIndex;
|
|
36
|
+
indexToWeekdayName: typeof indexToWeekdayName;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* A component that allows the user to select multiple weekdays.
|
|
40
|
+
*/
|
|
41
|
+
export declare const WeekdaysPicker: React.FC<Props> & StaticProperties;
|
|
42
|
+
export {};
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
export { FlexColumn } from "./components/Container/FlexColumn";
|
|
2
|
+
export { FlexRow } from "./components/Container/FlexRow";
|
|
3
|
+
export type { FlexContainerProps } from "./components/Container/types/FlexContainerProps.type";
|
|
4
|
+
export { default as Toaster, TOASTER_TYPE_OPTIONS, } from "./components/Toaster/Toaster";
|
|
5
|
+
export { toast } from "./components/Toaster/toast";
|
|
6
|
+
export { AccordionList, AccordionListItemProps, AccordionListProps, } from "./components/AccordionList/AccordionList";
|
|
7
|
+
export { Modal, ModalProps } from "./components/Modal/Modal";
|
|
8
|
+
export { ModalSize, ModalBaseProps } from "./components/Modal/ModalBase";
|
|
9
|
+
export { ModalHeaderProps } from "./components/Modal/ModalHeader";
|
|
10
|
+
export { ModalFooterProps, ModalFooterLeadingComponent, ModalFooterTrailingComponents, } from "./components/Modal/ModalFooter";
|
|
11
|
+
export { Avatar } from "./components/Avatar/Avatar";
|
|
12
|
+
export { default as Badge } from "./components/Badge/Badge";
|
|
13
|
+
export { BaseButtonProps as NonPrimaryButtonProps, ButtonWithPendingStateProps as PrimaryButtonProps, ButtonDefinition, } from "./components/ButtonV2/ButtonProps.type";
|
|
14
|
+
export { PrimaryButton } from "./components/ButtonV2/PrimaryButton";
|
|
15
|
+
export { SecondaryButton } from "./components/ButtonV2/SecondaryButton";
|
|
16
|
+
export { TertiaryButton } from "./components/ButtonV2/TertiaryButton";
|
|
17
|
+
export { default as Carousel } from "./components/Carousel/Carousel";
|
|
18
|
+
export { default as CenteredHero } from "./components/CenteredHero/CenteredHero";
|
|
19
|
+
export { Checkbox } from "./components/Checkbox/Checkbox";
|
|
20
|
+
export { ConfirmationDialog } from "./components/ConfirmationDialog/ConfirmationDialog";
|
|
21
|
+
export type { ConfirmationDialogChoice, ConfirmationDialogProps, ConfirmationDialogTitleProps, } from "./components/ConfirmationDialog/types/ConfirmationDialog.types";
|
|
22
|
+
export { default as DatePicker } from "./components/Datepicker/Datepicker";
|
|
23
|
+
export { default as Dropdown } from "./components/Dropdown/Dropdown";
|
|
24
|
+
export { EmptyListMessage } from "./components/EmptyListMessage/EmptyListMessage";
|
|
25
|
+
export { InfoField } from "./components/InfoField/InfoField";
|
|
26
|
+
export { default as Input } from "./components/Input/Input";
|
|
27
|
+
export { default as Line } from "./components/Line/Line";
|
|
28
|
+
export { Table, TableProps } from "./components/Table/Table";
|
|
29
|
+
export { TableFieldConfig, TableFieldContent, TableFieldText, TableFieldAction, } from "./components/Table/Table.types";
|
|
30
|
+
export { LoadingIndicator, LoadingIndicatorProps, } from "./components/LoadingIndicator/LoadingIndicator";
|
|
31
|
+
export { default as Menu } from "./components/Menu/Menu";
|
|
32
|
+
export { List, ListItem, ListProps, ListItemProps, DraggableListProps, SortableListProps, SortableListItemProps, OnAssetLoadErrorPayload, getDndListItemProps, } from "./components/List";
|
|
33
|
+
export { CheckboxList, CheckboxListProps, } from "./components/CheckboxList/CheckboxList";
|
|
34
|
+
export { CheckboxListModal, CheckboxListModalProps, } from "./components/CheckBoxListModal/CheckboxListModal";
|
|
35
|
+
export { NavLayout, Props as NavLayoutProps, } from "./components/NavMenu/NavLayout";
|
|
36
|
+
export { NavMenu } from "./components/NavMenu/NavMenu";
|
|
37
|
+
export { NotificationBanner, NotificationBannerColor, NotificationBannerLinkProps, } from "./components/NotificationBanner/NotificationBanner";
|
|
38
|
+
export { Page, CRUDPage, CRUDPageProps } from "./components/Page";
|
|
39
|
+
export { PaginationMenu } from "./components/PaginationMenu/PaginationMenu";
|
|
40
|
+
export { PageSize as PaginationMenuPageSize, OnPaginationChange as OnPaginationMenuChange, Localization as PaginationMenuLocalization, PaginationMenuProps, } from "./components/PaginationMenu/PaginationMenu.types";
|
|
41
|
+
export { default as PreviewPhone } from "./components/PreviewPhone/PreviewPhone";
|
|
42
|
+
export { default as Radio } from "./components/Radio/Radio";
|
|
43
|
+
export { default as RadioGroup } from "./components/RadioGroup/RadioGroup";
|
|
44
|
+
export { RadioProps, RadioV2 } from "./components/Radio/RadioV2";
|
|
45
|
+
export { RadioGroupProps, RadioGroupV2, } from "./components/RadioGroup/RadioGroupV2";
|
|
46
|
+
export { default as Section, SectionProps } from "./components/Section/Section";
|
|
47
|
+
export { default as SectionItemWithContent } from "./components/Section/SectionItemWithContent";
|
|
48
|
+
export { default as SectionItem, SectionItemProps, } from "./components/Section/SectionItem";
|
|
49
|
+
export { SelectProps, Select } from "./components/Select/Select";
|
|
50
|
+
export { SettingsMenuButton } from "./components/SettingsMenuButton/SettingsMenuButton";
|
|
51
|
+
export { Spinner } from "./components/Spinner/Spinner";
|
|
52
|
+
export { Steps } from "./components/Steps/Steps";
|
|
53
|
+
export { default as Switcher } from "./components/Switcher/Switcher";
|
|
54
|
+
export { default as Image } from "./components/Image/Image";
|
|
55
|
+
export { MediaPicker, TargetProps } from "./components/MediaPicker/MediaPicker";
|
|
56
|
+
export { default as Tabbar, TabbarProps, TabItemDetails, } from "./components/Tabbar/Tabbar";
|
|
57
|
+
export { Breadcrumbs, BreadcrumbProps } from "./components/Breadcrumbs";
|
|
58
|
+
export { PageHeader, PageHeaderProps } from "./components/PageHeader";
|
|
59
|
+
export { Tag } from "./components/Tag/Tag";
|
|
60
|
+
export { TagGroup } from "./components/Tag/TagGroup";
|
|
61
|
+
export { Textarea, TextareaProps, ResizeTypes, } from "./components/Textarea/Textarea";
|
|
62
|
+
export { TextEditor } from "./components/TextEditor/TextEditor";
|
|
63
|
+
export { Link } from "./components/Link/Link";
|
|
64
|
+
export { TextLink, TextLinkProps } from "./components/TextLink/TextLink";
|
|
65
|
+
export { Title, TitleStyle } from "./components/Title/Title";
|
|
66
|
+
export { Timeline } from "./components/Timeline/Timeline";
|
|
67
|
+
export { ViewItem, ViewItemProps } from "./components/ViewItem/ViewItem";
|
|
68
|
+
export { UnorderedList, UList } from "./components/UnorderedList/UnorderedList";
|
|
69
|
+
export { default as Text } from "./components/Text/Text";
|
|
70
|
+
export { SearchInput, SearchInputProps } from "./components/Input/SearchInput";
|
|
71
|
+
export { GenericForm, Form, FormProps, GenericFormProps, } from "./components/Form/Form";
|
|
72
|
+
export { Icon } from "./components/Icon";
|
|
73
|
+
export type { IconProps, IconKey, } from "./components/Icons/types/IconProps.type";
|
|
74
|
+
export * from "./components/Icons";
|
|
75
|
+
export { Divider } from "./components/Divider/Divider";
|
|
76
|
+
export { FullPageModal } from "./components/Modal/FullPageModal";
|
|
77
|
+
export { VerticalMenu } from "./components/VerticalMenu/VerticalMenu";
|
|
78
|
+
export { Card, type Props as CardProps } from "./components/Card/Card";
|
|
79
|
+
export { Dropzone, DropzoneProps } from "./components/Dropzone";
|
|
80
|
+
export { FilterBar, FilterBarUtils } from "./components/FilterBar";
|
|
81
|
+
export { type Weekday, WeekdaysPicker, } from "./components/WeekdaysPicker/WeekdaysPicker";
|
|
82
|
+
export { default as DragHandle, DragHandleProps, } from "./components/DragHandle";
|