@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,57 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { TitleProps } from "../Title/Title";
|
|
3
|
+
type TitleAndMaybeActions = {
|
|
4
|
+
title: string;
|
|
5
|
+
/**
|
|
6
|
+
* Spaces and positions the action components correctly in relation to
|
|
7
|
+
* the styling of the card.
|
|
8
|
+
*
|
|
9
|
+
* @usage
|
|
10
|
+
* ```tsx
|
|
11
|
+
* <Card
|
|
12
|
+
* actions={
|
|
13
|
+
* <Card.Actions>
|
|
14
|
+
* <PrimaryButton />
|
|
15
|
+
* <SecondaryButton />
|
|
16
|
+
* </Card.Actions>
|
|
17
|
+
* }
|
|
18
|
+
* />
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
actions: React.ReactNode;
|
|
22
|
+
} | {
|
|
23
|
+
title: undefined;
|
|
24
|
+
actions: undefined;
|
|
25
|
+
} | {
|
|
26
|
+
title?: string;
|
|
27
|
+
/**
|
|
28
|
+
* The `actions` prop can only be used in conjunction with the `title` prop.
|
|
29
|
+
*/
|
|
30
|
+
actions?: never;
|
|
31
|
+
};
|
|
32
|
+
export type Props<C extends React.ElementType> = React.ComponentPropsWithoutRef<C> & {
|
|
33
|
+
as?: C;
|
|
34
|
+
children: React.ReactNode;
|
|
35
|
+
/**
|
|
36
|
+
* Whether or not to add the default padding to the card. Set this
|
|
37
|
+
* to `false` if you want to render something full width inside of the
|
|
38
|
+
* card, like an image or a list. You have access to the `Card.Padding`
|
|
39
|
+
* subcomponent to then add back the default padding wherever needed.
|
|
40
|
+
*
|
|
41
|
+
* @default true
|
|
42
|
+
*/
|
|
43
|
+
padding?: boolean;
|
|
44
|
+
} & TitleAndMaybeActions;
|
|
45
|
+
export declare function Card<C extends React.ElementType = "div">(props: Props<C>): React.JSX.Element;
|
|
46
|
+
export declare namespace Card {
|
|
47
|
+
var Title: (props: TitleProps) => React.JSX.Element;
|
|
48
|
+
var TopBar: typeof import("./TopBar").TopBar;
|
|
49
|
+
var Padding: React.FC<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
50
|
+
children?: React.ReactNode;
|
|
51
|
+
}>;
|
|
52
|
+
var Section: React.FC<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
53
|
+
children?: React.ReactNode;
|
|
54
|
+
}>;
|
|
55
|
+
var Actions: React.FC<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">>;
|
|
56
|
+
}
|
|
57
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
type Props = React.ComponentPropsWithoutRef<"div"> & {
|
|
3
|
+
children?: React.ReactNode;
|
|
4
|
+
};
|
|
5
|
+
export declare function TopBar(props: Props): React.JSX.Element;
|
|
6
|
+
export declare namespace TopBar {
|
|
7
|
+
var Actions: React.FC<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">>;
|
|
8
|
+
}
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ButtonProps } from "../Button/Button.types";
|
|
3
|
+
export type BackgroundColor = "white" | "slate-50";
|
|
4
|
+
export type ImageSize = "small" | "large";
|
|
5
|
+
export interface CenteredHeroProps {
|
|
6
|
+
title: string;
|
|
7
|
+
text: string;
|
|
8
|
+
image: string;
|
|
9
|
+
imageSize?: ImageSize;
|
|
10
|
+
buttons?: ButtonProps[];
|
|
11
|
+
background?: BackgroundColor;
|
|
12
|
+
}
|
|
13
|
+
declare const CenteredHero: ({ title, text, image, buttons, background, imageSize, }: CenteredHeroProps) => JSX.Element;
|
|
14
|
+
export default CenteredHero;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { CheckboxGroupItemProps } from "../CheckboxList/CheckboxList.types";
|
|
3
|
+
export type Item = {
|
|
4
|
+
group?: string;
|
|
5
|
+
isPinned?: boolean;
|
|
6
|
+
} & Pick<CheckboxGroupItemProps, "id" | "label" | "isChecked" | "isDisabled">;
|
|
7
|
+
export interface Group {
|
|
8
|
+
title?: string;
|
|
9
|
+
items: Item[];
|
|
10
|
+
}
|
|
11
|
+
interface CheckboxListModalTexts {
|
|
12
|
+
title: string;
|
|
13
|
+
confirmLabel: string;
|
|
14
|
+
cancelLabel: string;
|
|
15
|
+
searchPlaceHolder?: string;
|
|
16
|
+
emptyState: string;
|
|
17
|
+
}
|
|
18
|
+
export interface CheckboxListModalProps {
|
|
19
|
+
texts: CheckboxListModalTexts;
|
|
20
|
+
initialItems: Array<Item>;
|
|
21
|
+
isLoadingInitialItems?: boolean;
|
|
22
|
+
isOpen: boolean;
|
|
23
|
+
onSave: (newItems: Item[]) => void;
|
|
24
|
+
onCloseClick: () => void;
|
|
25
|
+
filterItem: (item: Item, searchQuery: string) => boolean;
|
|
26
|
+
className?: string;
|
|
27
|
+
hasSearch: boolean;
|
|
28
|
+
}
|
|
29
|
+
export declare const CheckboxListModal: ({ texts, initialItems, isLoadingInitialItems, isOpen, onSave, onCloseClick, filterItem, hasSearch, }: CheckboxListModalProps) => JSX.Element;
|
|
30
|
+
export {};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./Checkbox.scss";
|
|
3
|
+
export interface CheckboxProps {
|
|
4
|
+
/**
|
|
5
|
+
* ID used for semantic targeting, as can be used in attributes like `<label htmlFor="some-id">`.
|
|
6
|
+
*/
|
|
7
|
+
id?: string;
|
|
8
|
+
/**
|
|
9
|
+
* The visible text labeling the checkbox element.
|
|
10
|
+
*/
|
|
11
|
+
text?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Helper text that adds some more information on what the option means, or inform
|
|
14
|
+
* the user about the consequences of the checkbox.
|
|
15
|
+
*
|
|
16
|
+
* Only works if the `renderLabel` prop isn't set.
|
|
17
|
+
*/
|
|
18
|
+
explanation?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Shows a different checkbox variant. `type="switch"` shows a switch-like component
|
|
21
|
+
* without a visual label.
|
|
22
|
+
*/
|
|
23
|
+
type?: "regular" | "switch";
|
|
24
|
+
/**
|
|
25
|
+
* Set the value.
|
|
26
|
+
* Same as `checked` on `<input type="checkbox" />`.
|
|
27
|
+
*/
|
|
28
|
+
isChecked?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Value for when it is not clear if the state of this checkbox
|
|
31
|
+
* is "checked" or not (for hierarchical checkboxes).
|
|
32
|
+
*/
|
|
33
|
+
isIndeterminate?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Disallow the user to change the checkbox value.
|
|
36
|
+
* Same as `disabled` on `<input type="checkbox" />`.
|
|
37
|
+
*/
|
|
38
|
+
isDisabled?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* The name that the value of the checkbox will be associated with.
|
|
41
|
+
* Same as `name` on `<input type="checkbox" />`.
|
|
42
|
+
*/
|
|
43
|
+
name?: string;
|
|
44
|
+
/**
|
|
45
|
+
* This can be used to retrieve the value it is referring to through onChange.
|
|
46
|
+
*/
|
|
47
|
+
value?: string;
|
|
48
|
+
onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
49
|
+
className?: string;
|
|
50
|
+
classNameCheckboxLabel?: string;
|
|
51
|
+
/**
|
|
52
|
+
* Visually show that the currently selected value has an issue the user needs to attend to.
|
|
53
|
+
*/
|
|
54
|
+
error?: boolean;
|
|
55
|
+
innerRef?: React.Ref<HTMLInputElement>;
|
|
56
|
+
/**
|
|
57
|
+
* Renders a completely custom label. Can change its contents or
|
|
58
|
+
* appearance based on the props of the checkbox item.
|
|
59
|
+
*
|
|
60
|
+
* Overrides the `text` prop.
|
|
61
|
+
*/
|
|
62
|
+
renderLabel?: (props: CheckboxProps) => JSX.Element | null;
|
|
63
|
+
}
|
|
64
|
+
export declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
export declare enum CheckboxState {
|
|
2
|
+
CHECKED = "checked",
|
|
3
|
+
INDETERMINATE = "indeterminate",
|
|
4
|
+
UNCHECKED = "unchecked"
|
|
5
|
+
}
|
|
6
|
+
export interface CheckboxListProps {
|
|
7
|
+
/**
|
|
8
|
+
* An array of items to render as checkboxes. Each item can be a single item or a group. When the
|
|
9
|
+
* title isn't specified, the group will render as a non-collapsible list. This is the way to
|
|
10
|
+
* render a regular list of checkboxes.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* Single list of checkboxes without visual grouping.
|
|
14
|
+
*
|
|
15
|
+
* ```tsx
|
|
16
|
+
* const groups = [{
|
|
17
|
+
* items: [
|
|
18
|
+
* {
|
|
19
|
+
* id: "1",
|
|
20
|
+
* label: "Item 1",
|
|
21
|
+
* },
|
|
22
|
+
* {
|
|
23
|
+
* id: "2",
|
|
24
|
+
* label: "Item 2",
|
|
25
|
+
* },
|
|
26
|
+
* ],
|
|
27
|
+
* }]
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
groups: CheckboxGroup[];
|
|
31
|
+
onChange: (event: CheckboxChangeEvent) => void;
|
|
32
|
+
className?: string;
|
|
33
|
+
}
|
|
34
|
+
type WithCollapsible = {
|
|
35
|
+
/**
|
|
36
|
+
* When `false` will prevent the checkbox list from being collapsed (also disabling clicking to expand/collapse)
|
|
37
|
+
* in the component and it will be displayed expanded by default.
|
|
38
|
+
* @default true
|
|
39
|
+
*/
|
|
40
|
+
collapsible?: boolean;
|
|
41
|
+
};
|
|
42
|
+
export type CheckboxGroupProps = CheckboxGroup & {
|
|
43
|
+
onChange: (event: CheckboxChangeEvent) => void;
|
|
44
|
+
className?: string;
|
|
45
|
+
} & WithCollapsible;
|
|
46
|
+
export interface CheckboxGroupItemProps extends CheckboxListItem {
|
|
47
|
+
onChange: (event: CheckboxChangeEvent) => void;
|
|
48
|
+
}
|
|
49
|
+
export interface CheckboxListItem {
|
|
50
|
+
id: string;
|
|
51
|
+
label: string;
|
|
52
|
+
isChecked?: boolean;
|
|
53
|
+
isDisabled?: boolean;
|
|
54
|
+
className?: string;
|
|
55
|
+
}
|
|
56
|
+
export type CheckboxGroup = {
|
|
57
|
+
/**
|
|
58
|
+
* When the title isn't specified, the group will render as a non-collapsible list.
|
|
59
|
+
*/
|
|
60
|
+
title?: string;
|
|
61
|
+
/**
|
|
62
|
+
* The checkbox items to be shown inside of this group.
|
|
63
|
+
*/
|
|
64
|
+
items: CheckboxListItem[];
|
|
65
|
+
/**
|
|
66
|
+
* Whether the group is initially collapsed or not.
|
|
67
|
+
*/
|
|
68
|
+
isCollapsed?: boolean;
|
|
69
|
+
} & WithCollapsible;
|
|
70
|
+
export interface CheckboxChangeEvent {
|
|
71
|
+
id: string;
|
|
72
|
+
newCheckedValue: boolean;
|
|
73
|
+
}
|
|
74
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ConfirmationDialogChoice, ConfirmationDialogProps } from "./types/ConfirmationDialog.types";
|
|
3
|
+
export declare const ConfirmationDialogChoices: React.FC<{
|
|
4
|
+
choices: ConfirmationDialogProps["choices"];
|
|
5
|
+
onChoiceChangeCallback?: (choice: ConfirmationDialogChoice) => void;
|
|
6
|
+
selectedChoice?: ConfirmationDialogChoice;
|
|
7
|
+
}>;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { IconKey, IconProps } from "../../Icons/types/IconProps.type";
|
|
3
|
+
import type { NotificationBannerColor } from "../../NotificationBanner/NotificationBanner";
|
|
4
|
+
interface ConfirmationDialogTexts {
|
|
5
|
+
message: string | string[];
|
|
6
|
+
confirmLabel: string;
|
|
7
|
+
cancelLabel: string;
|
|
8
|
+
}
|
|
9
|
+
export interface ConfirmationDialogChoice<T extends string = string> {
|
|
10
|
+
text: string;
|
|
11
|
+
value: T;
|
|
12
|
+
description?: string;
|
|
13
|
+
displaysInfo?: {
|
|
14
|
+
level: NotificationBannerColor;
|
|
15
|
+
text: string;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
export interface ConfirmationDialogProps {
|
|
19
|
+
texts: ConfirmationDialogTexts;
|
|
20
|
+
isOpen: boolean;
|
|
21
|
+
onCancel: () => void;
|
|
22
|
+
onConfirm: (choice?: ConfirmationDialogChoice) => void;
|
|
23
|
+
isProcessing?: boolean;
|
|
24
|
+
withTitle?: {
|
|
25
|
+
title: string;
|
|
26
|
+
icon?: React.FC<IconProps> | IconKey;
|
|
27
|
+
};
|
|
28
|
+
choices?: {
|
|
29
|
+
defaultChoice?: ConfirmationDialogChoice["value"];
|
|
30
|
+
onChoiceChange: (choice: ConfirmationDialogChoice) => void;
|
|
31
|
+
options: {
|
|
32
|
+
0: ConfirmationDialogChoice;
|
|
33
|
+
1: ConfirmationDialogChoice;
|
|
34
|
+
} & ConfirmationDialogChoice[];
|
|
35
|
+
};
|
|
36
|
+
dataTestId?: string;
|
|
37
|
+
}
|
|
38
|
+
export interface ConfirmationDialogTitleProps {
|
|
39
|
+
title: ConfirmationDialogProps["withTitle"];
|
|
40
|
+
}
|
|
41
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { FlexContainerProps } from "./types/FlexContainerProps.type";
|
|
3
|
+
/**
|
|
4
|
+
* Container to be used for layouting instead of divs around the project.
|
|
5
|
+
* The spacing here has been coded according to our guidelines.
|
|
6
|
+
*/
|
|
7
|
+
export declare const FlexColumn: React.FC<FlexContainerProps>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { FlexContainerBaseProps } from "./types/FlexContainerProps.type";
|
|
3
|
+
/**
|
|
4
|
+
* Container to be used for layouting instead of divs around the project.
|
|
5
|
+
* The spacing here has been coded according to our guidelines.
|
|
6
|
+
*/
|
|
7
|
+
export declare const FlexContainer: React.FC<FlexContainerBaseProps & {
|
|
8
|
+
type: "column" | "row";
|
|
9
|
+
}>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { FlexContainerProps } from "./types/FlexContainerProps.type";
|
|
3
|
+
/**
|
|
4
|
+
* Container to be used for layouting instead of divs around the project.
|
|
5
|
+
* The spacing here has been coded according to our guidelines.
|
|
6
|
+
*/
|
|
7
|
+
export declare const FlexRow: React.FC<FlexContainerProps>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
type Spacing = "tiny" | "none" | "small" | "medium" | "large";
|
|
3
|
+
type FlexContainerBase = {
|
|
4
|
+
alignItems?: "center" | "start" | "end";
|
|
5
|
+
justifyContent?: "center" | "start" | "end" | "between";
|
|
6
|
+
position?: "static" | "fixed" | "absolute" | "relative" | "sticky";
|
|
7
|
+
verticalSpacing?: Spacing;
|
|
8
|
+
horizontalSpacing?: Spacing;
|
|
9
|
+
/**
|
|
10
|
+
* Applies the default padding (`"ui-p-4"`) inside the container.
|
|
11
|
+
*/
|
|
12
|
+
hasPadding?: boolean;
|
|
13
|
+
backgroundColor?: string;
|
|
14
|
+
/**
|
|
15
|
+
* If `true`, will make the flexbox full width and not size itui-relative to its content.
|
|
16
|
+
* @default true
|
|
17
|
+
*/
|
|
18
|
+
stretch?: boolean;
|
|
19
|
+
};
|
|
20
|
+
export type FlexContainerBaseProps = FlexContainerBase & {
|
|
21
|
+
children: React.ReactNode;
|
|
22
|
+
};
|
|
23
|
+
export type FlexContainerProps = Omit<FlexContainerBaseProps, "verticalSpacing" | "horizontalSpacing"> & {
|
|
24
|
+
spacing?: Spacing;
|
|
25
|
+
};
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
declare const DragHandle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLButtonElement> & {
|
|
3
|
+
grabbing: boolean;
|
|
4
|
+
disabled?: boolean | undefined;
|
|
5
|
+
dataTestId?: string | undefined;
|
|
6
|
+
} & React.RefAttributes<HTMLButtonElement>>;
|
|
7
|
+
export default DragHandle;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./Dropzone.scss";
|
|
3
|
+
import type { DropzoneProps, DropzonePresentationProps } from "./Dropzone.types";
|
|
4
|
+
export declare const DropzonePresentation: React.FC<DropzonePresentationProps>;
|
|
5
|
+
export declare const Dropzone: React.FC<DropzoneProps>;
|
|
6
|
+
export default Dropzone;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { 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,14 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const imageSrc: {
|
|
3
|
+
"no-open-alerts": string;
|
|
4
|
+
"search-not-found": string;
|
|
5
|
+
"no-notes-found": string;
|
|
6
|
+
};
|
|
7
|
+
interface EmptyListMessageProps {
|
|
8
|
+
text: string;
|
|
9
|
+
imageName?: keyof typeof imageSrc;
|
|
10
|
+
dataTestId?: string;
|
|
11
|
+
className?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare const EmptyListMessage: ({ text, imageName, dataTestId, className, }: EmptyListMessageProps) => JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { CategorizedFilters, FilterBarLocalization, OnFilterBarFilterChange } from "./FilterBarProps.type";
|
|
3
|
+
type ActiveFiltersProps = {
|
|
4
|
+
filters: CategorizedFilters;
|
|
5
|
+
onRemoveActiveFilter: OnFilterBarFilterChange;
|
|
6
|
+
localization: Pick<FilterBarLocalization, "filtersLabel">;
|
|
7
|
+
};
|
|
8
|
+
export declare const ActiveFilters: React.FC<ActiveFiltersProps>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { ReactElement } from "react";
|
|
2
|
+
import { CategorizedFilters, FilterBarLocalization, 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
|
+
* For more details, see {@link TransformedSortingOptions}.
|
|
86
|
+
*/
|
|
87
|
+
sortingOptions: TransformedSortingOptions<SortableEntity>;
|
|
88
|
+
onFilterChange: (updatedFilters: CategorizedFilters) => void;
|
|
89
|
+
onSortingChange: (updatedSortingOptions: TransformedSortingOptions<SortableEntity>) => void;
|
|
90
|
+
/**
|
|
91
|
+
* See {@link FilterBarLocalization}.
|
|
92
|
+
*/
|
|
93
|
+
localization: FilterBarLocalization;
|
|
94
|
+
};
|
|
95
|
+
export declare const FilterBar: <SortableEntity extends object>({ localization, categorizedFilters, sortingOptions, ...props }: FilterBarProps<SortableEntity>) => ReactElement | null;
|
|
96
|
+
export {};
|