@fluidattacks/design 2.3.0 → 2.5.0

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 (45) hide show
  1. package/dist/index.js +267 -197
  2. package/dist/index.mjs +9970 -9346
  3. package/dist/types/components/card/card-header/index.d.ts +3 -0
  4. package/dist/types/components/card/card-with-image/index.d.ts +4 -0
  5. package/dist/types/components/card/card-with-selector/index.d.ts +3 -0
  6. package/dist/types/components/card/card-with-switch/index.d.ts +3 -0
  7. package/dist/types/components/card/index.d.ts +5 -0
  8. package/dist/types/components/card/types.d.ts +93 -0
  9. package/dist/types/components/confirm-dialog/index.d.ts +11 -0
  10. package/dist/types/components/confirm-dialog/types.d.ts +13 -0
  11. package/dist/types/components/empty-state/empty-button/index.d.ts +8 -0
  12. package/dist/types/components/empty-state/index.d.ts +3 -0
  13. package/dist/types/components/empty-state/styles.d.ts +8 -0
  14. package/dist/types/components/empty-state/types.d.ts +35 -0
  15. package/dist/types/components/file-preview/types.d.ts +1 -1
  16. package/dist/types/components/grid-container/index.d.ts +4 -0
  17. package/dist/types/components/grid-container/styles.d.ts +12 -0
  18. package/dist/types/components/grid-container/types.d.ts +17 -0
  19. package/dist/types/components/group-selector/index.d.ts +3 -0
  20. package/dist/types/components/group-selector/option-container/index.d.ts +4 -0
  21. package/dist/types/components/group-selector/styles.d.ts +7 -0
  22. package/dist/types/components/group-selector/types.d.ts +44 -0
  23. package/dist/types/components/indicator-card/index.d.ts +5 -0
  24. package/dist/types/components/indicator-card/types.d.ts +30 -0
  25. package/dist/types/components/modal/index.d.ts +5 -0
  26. package/dist/types/components/modal/modal-confirm/index.d.ts +3 -0
  27. package/dist/types/components/modal/modal-footer/index.d.ts +3 -0
  28. package/dist/types/components/modal/modal-header/index.d.ts +3 -0
  29. package/dist/types/components/modal/styles.d.ts +16 -0
  30. package/dist/types/components/modal/types.d.ts +87 -0
  31. package/dist/types/components/oauth-selector/index.d.ts +5 -0
  32. package/dist/types/components/oauth-selector/option-container/index.d.ts +3 -0
  33. package/dist/types/components/oauth-selector/types.d.ts +45 -0
  34. package/dist/types/components/pop-up/description/index.d.ts +5 -0
  35. package/dist/types/components/pop-up/index.d.ts +4 -0
  36. package/dist/types/components/pop-up/types.d.ts +58 -0
  37. package/dist/types/components/search/styles.d.ts +1 -3
  38. package/dist/types/components/typography/index.d.ts +2 -1
  39. package/dist/types/components/typography/span/index.d.ts +3 -0
  40. package/dist/types/components/typography/styles.d.ts +3 -1
  41. package/dist/types/components/typography/types.d.ts +4 -0
  42. package/dist/types/hooks/index.d.ts +3 -1
  43. package/dist/types/hooks/use-modal.d.ts +11 -0
  44. package/dist/types/index.d.ts +10 -0
  45. package/package.json +14 -14
@@ -0,0 +1,3 @@
1
+ import type { ICardHeader } from "../types";
2
+ declare const CardHeader: ({ authorEmail, date, description, descriptionColor, id, title, titleColor, textAlign, textSpacing, tooltip, }: Readonly<ICardHeader>) => JSX.Element;
3
+ export { CardHeader };
@@ -0,0 +1,4 @@
1
+ import { PropsWithChildren } from "react";
2
+ import type { ICardWithImageProps } from "../types";
3
+ declare const CardWithImage: ({ alt, authorEmail, date, description, src, children, isEditing, onClick, title, hideDescription, headerType, showMaximize, }: Readonly<PropsWithChildren<ICardWithImageProps>>) => JSX.Element;
4
+ export { CardWithImage };
@@ -0,0 +1,3 @@
1
+ import type { ICardWithSelectorProps } from "../types";
2
+ declare const CardWithSelector: ({ alt, imageId, icon, selectorProps, onClick, title, width, }: Readonly<ICardWithSelectorProps>) => JSX.Element;
3
+ export { CardWithSelector };
@@ -0,0 +1,3 @@
1
+ import type { ICardWithSwitchProps } from "../types";
2
+ declare const CardWithSwitch: ({ id, title, toggles, minWidth, height, }: Readonly<ICardWithSwitchProps>) => JSX.Element;
3
+ export { CardWithSwitch };
@@ -0,0 +1,5 @@
1
+ import { CardHeader } from "./card-header";
2
+ import { CardWithImage } from "./card-with-image";
3
+ import { CardWithSelector } from "./card-with-selector";
4
+ import { CardWithSwitch } from "./card-with-switch";
5
+ export { CardHeader, CardWithImage, CardWithSelector, CardWithSwitch };
@@ -0,0 +1,93 @@
1
+ import { IconName } from "@fortawesome/free-solid-svg-icons";
2
+ import type { Property } from "csstype";
3
+ import type { MouseEventHandler } from "react";
4
+ import type { TSpacing } from "components/@core/types";
5
+ import type { TFileType } from "components/file-preview/types";
6
+ import { IRadioButtonProps } from "components/radio-button/types";
7
+ import { IToggleProps } from "components/toggle/types";
8
+ /**
9
+ * Card component shared props.
10
+ * @interface ISharedProps
11
+ * @property { string } [authorEmail] - Card author email.
12
+ * @property { string } [date] - Card date.
13
+ * @property { string } [description] - Card description.
14
+ * @property { string } [title] - Card title.
15
+ */
16
+ interface ISharedProps {
17
+ authorEmail?: string;
18
+ date?: string;
19
+ description?: string;
20
+ title: string;
21
+ }
22
+ /**
23
+ * Card header component props.
24
+ * @interface ICardHeader
25
+ * @extends ISharedProps
26
+ * @property { string } [textAlign] - Card title text alignment.
27
+ * @property { string } [tooltip] - Card tooltip.
28
+ * @property { string } id - Card id.
29
+ * @property { string } [titleColor] - Card title color.
30
+ * @property { string } [descriptionColor] - Card description color.
31
+ * @property { TSpacing } [textSpacing] - Card text spacing.
32
+ */
33
+ interface ICardHeader extends ISharedProps {
34
+ textAlign?: Property.TextAlign;
35
+ tooltip?: string;
36
+ id: string;
37
+ titleColor?: string;
38
+ descriptionColor?: string;
39
+ textSpacing?: TSpacing;
40
+ }
41
+ /**
42
+ * Card with image component props.
43
+ * @interface ICardWithImageProps
44
+ * @extends ISharedProps
45
+ * @property { string } alt - Card image alt.
46
+ * @property { string } [src] - Card image source.
47
+ * @property { boolean } [isEditing] - Card is editing.
48
+ * @property { boolean } [showMaximize] - Card show maximize.
49
+ * @property { boolean } [hideDescription] - Card hide description.
50
+ * @property { MouseEventHandler<HTMLDivElement> } [onClick] - Card onClick.
51
+ * @property { TFileType } [headerType] - Card header type.
52
+ */
53
+ interface ICardWithImageProps extends ISharedProps {
54
+ alt: string;
55
+ hideDescription?: boolean;
56
+ onClick?: MouseEventHandler<HTMLDivElement>;
57
+ src: string;
58
+ headerType?: TFileType;
59
+ isEditing: boolean;
60
+ showMaximize?: boolean;
61
+ }
62
+ /**
63
+ * Card with switch component props.
64
+ * @interface ICardWithSwitchProps
65
+ * @property { string } [minWidth] - Card min width.
66
+ * @property { string } [height] - Card height.
67
+ * @property { IToggleProps[] } toggles - Card toggles.
68
+ */
69
+ interface ICardWithSwitchProps extends ICardHeader {
70
+ minWidth?: string;
71
+ height?: string;
72
+ toggles: IToggleProps[];
73
+ }
74
+ /**
75
+ * Card with selector component props.
76
+ * @interface ICardWithSelectorProps
77
+ * @extends ISharedProps
78
+ * @property { string } [alt] - Card image alt.
79
+ * @property { string } [imageId] - Card image id.
80
+ * @property { IconName } [icon] - Card icon.
81
+ * @property { Function } [onClick] - Card onClick.
82
+ * @property { IRadioButtonProps } selectorProps - Card selector props.
83
+ * @property { string } [width] - Card width.
84
+ */
85
+ interface ICardWithSelectorProps extends Pick<ISharedProps, "description" | "title"> {
86
+ alt?: string;
87
+ imageId?: string;
88
+ icon?: IconName;
89
+ onClick?: () => void;
90
+ selectorProps: IRadioButtonProps;
91
+ width?: string;
92
+ }
93
+ export type { ICardHeader, ICardWithImageProps, ICardWithSwitchProps, ICardWithSelectorProps, };
@@ -0,0 +1,11 @@
1
+ import React from "react";
2
+ import type { IConfirmDialogProps } from "./types";
3
+ declare const useConfirmDialog: () => {
4
+ confirm: (props: Readonly<IConfirmDialogProps>) => Promise<boolean>;
5
+ ConfirmDialog: React.FC<Readonly<{
6
+ id?: string;
7
+ children?: React.ReactNode;
8
+ }>>;
9
+ };
10
+ export type { IConfirmDialogProps };
11
+ export { useConfirmDialog };
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Confirm dialog component props.
3
+ * @interface IConfirmDialogProps
4
+ * @property { string } [id] - Id of the confirm dialog.
5
+ * @property { React.ReactNode } [message] - Message to display in the confirm dialog.
6
+ * @property { string } title - Title of the confirm dialog.
7
+ */
8
+ interface IConfirmDialogProps {
9
+ id?: string;
10
+ message?: React.ReactNode;
11
+ title: string;
12
+ }
13
+ export type { IConfirmDialogProps };
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ import type { IButtonProps } from "../types";
3
+ import type { TVariant } from "components/button/types";
4
+ declare const EmptyButton: React.FC<Readonly<{
5
+ buttonProps: IButtonProps;
6
+ variant: TVariant;
7
+ }>>;
8
+ export { EmptyButton };
@@ -0,0 +1,3 @@
1
+ import type { IEmptyProps } from "./types";
2
+ declare const EmptyState: ({ cancelButton, confirmButton, description, imageSrc, padding, title, size, }: Readonly<IEmptyProps>) => JSX.Element;
3
+ export { EmptyState };
@@ -0,0 +1,8 @@
1
+ import type { DefaultTheme } from "styled-components";
2
+ interface IEmptyContainerProps {
3
+ $padding: keyof DefaultTheme["spacing"];
4
+ }
5
+ declare const EmptyContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, IEmptyContainerProps>> & string;
6
+ declare const EmptyImageContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
7
+ declare const EmptyButtonContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
8
+ export { EmptyContainer, EmptyImageContainer, EmptyButtonContainer };
@@ -0,0 +1,35 @@
1
+ import type { DefaultTheme } from "styled-components";
2
+ type TSize = "md" | "sm";
3
+ /**
4
+ * Button empty state props.
5
+ * @interface IButtonProps
6
+ * @property { string } text - Button text.
7
+ * @property { Function } [onClick] - Button click handler.
8
+ */
9
+ interface IButtonProps {
10
+ onClick?: () => void;
11
+ text: string;
12
+ }
13
+ /**
14
+ * Empty state component props.
15
+ * @interface IEmptyProps
16
+ * @property { IButtonProps } [cancelButton] - Cancel button props.
17
+ * @property { IButtonProps } [confirmButton] - Confirm button props.
18
+ * @property { string } description - Empty state description.
19
+ * @property { string } imageSrc - Empty state image source.
20
+ * @property { DefaultTheme["spacing"] } [padding] - Empty state padding.
21
+ * @property { string } [question] - Question text.
22
+ * @property { TSize } [size] - Empty state size.
23
+ * @property { string } title - Empty state title.
24
+ */
25
+ interface IEmptyProps {
26
+ cancelButton?: IButtonProps;
27
+ confirmButton?: IButtonProps;
28
+ description: string;
29
+ imageSrc?: string;
30
+ padding?: keyof DefaultTheme["spacing"];
31
+ question?: string;
32
+ size?: TSize;
33
+ title: string;
34
+ }
35
+ export type { IEmptyProps, IButtonProps };
@@ -17,4 +17,4 @@ interface IFilePreviewProps {
17
17
  src: string;
18
18
  width?: string;
19
19
  }
20
- export type { IFilePreviewProps };
20
+ export type { IFilePreviewProps, TFileType };
@@ -0,0 +1,4 @@
1
+ import { PropsWithChildren } from "react";
2
+ import type { IGridContainerProps } from "./types";
3
+ declare const GridContainer: import("react").ForwardRefExoticComponent<Readonly<PropsWithChildren<IGridContainerProps>> & import("react").RefAttributes<HTMLDivElement>>;
4
+ export { GridContainer };
@@ -0,0 +1,12 @@
1
+ import type { IGridContainerProps } from "./types";
2
+ interface IStyledGridProps {
3
+ $xl?: IGridContainerProps["xl"];
4
+ $lg?: IGridContainerProps["lg"];
5
+ $md?: IGridContainerProps["md"];
6
+ $sm?: IGridContainerProps["sm"];
7
+ $gap?: IGridContainerProps["gap"];
8
+ }
9
+ declare const GridContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<Omit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import("components/@core").IPaddingModifiable | keyof import("components/@core").IMarginModifiable | keyof import("components/@core").IPositionModifiable | keyof import("components/@core").IBorderModifiable | keyof import("components/@core").IDisplayModifiable | keyof import("components/@core").ITextModifiable | keyof import("components/@core").IInteractionModifiable> & import("components/@core").IBorderModifiable & import("components/@core").IDisplayModifiable & import("components/@core").IInteractionModifiable & import("components/@core").IMarginModifiable & import("components/@core").IPaddingModifiable & import("components/@core").IPositionModifiable & import("components/@core").ITextModifiable, "ref"> & {
10
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
11
+ }, IStyledGridProps>> & string;
12
+ export { GridContainer };
@@ -0,0 +1,17 @@
1
+ import type { TModifiable } from "components/@core";
2
+ /**
3
+ * Grid container component props.
4
+ * @interface IGridContainerProps
5
+ * @extends TModifiable
6
+ * @property { number } xl - Grid container xl breakpoint.
7
+ * @property { number } lg - Grid container lg breakpoint.
8
+ * @property { number } md - Grid container md breakpoint.
9
+ * @property { number } sm - Grid container sm breakpoint.
10
+ */
11
+ interface IGridContainerProps extends TModifiable {
12
+ xl: number;
13
+ lg: number;
14
+ md: number;
15
+ sm: number;
16
+ }
17
+ export type { IGridContainerProps };
@@ -0,0 +1,3 @@
1
+ import type { IGroupSelectorProps } from "./types";
2
+ declare const GroupSelector: ({ isOpen, items, handleNewOrganization, onSelect, onClose, selectedItem, title, variant, }: Readonly<IGroupSelectorProps>) => JSX.Element;
3
+ export { GroupSelector };
@@ -0,0 +1,4 @@
1
+ import { OptionBoxContainer } from "../styles";
2
+ import type { IOptionProps } from "../types";
3
+ declare const OptionContainer: ({ isSelected, label, onSelect, }: Readonly<IOptionProps>) => JSX.Element;
4
+ export { OptionContainer, OptionBoxContainer };
@@ -0,0 +1,7 @@
1
+ declare const StyledGroupContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
2
+ $itemsLength: number;
3
+ }>> & string;
4
+ declare const OptionBoxContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
5
+ $isSelected?: boolean;
6
+ }>> & string;
7
+ export { StyledGroupContainer, OptionBoxContainer };
@@ -0,0 +1,44 @@
1
+ type TVariant = "organization-selector";
2
+ /**
3
+ * Item handlers.
4
+ * @interface IItemHandlers
5
+ * @property { Function } [handleNewOrganization] - Handle new organization.
6
+ * @property { Function } [onSelect] - Handle select item.
7
+ * @property { Function } [onClose] - Handle close.
8
+ */
9
+ interface IItemHandlers {
10
+ handleNewOrganization?: () => void;
11
+ onSelect?: (itemName: string) => void;
12
+ onClose?: () => void;
13
+ }
14
+ /**
15
+ * Group selector component props.
16
+ * @interface IGroupSelectorProps
17
+ * @extends IItemHandlers
18
+ * @property { boolean } [isOpen] - Group selector is open.
19
+ * @property { {name: string}[] } items - Items to display.
20
+ * @property { string } [selectedItem] - Selected item.
21
+ * @property { string } title - Group selector title.
22
+ * @property { TVariant } [variant] - Group selector variant.
23
+ */
24
+ interface IGroupSelectorProps extends IItemHandlers {
25
+ isOpen?: boolean;
26
+ items: {
27
+ name: string;
28
+ }[];
29
+ selectedItem: string;
30
+ title: string;
31
+ variant?: TVariant;
32
+ }
33
+ /**
34
+ * Option component props.
35
+ * @interface IOptionProps
36
+ * @extends IItemHandlers
37
+ * @property { boolean } [isSelected] - Option is selected.
38
+ * @property { string } label - Option label.
39
+ */
40
+ interface IOptionProps extends IItemHandlers {
41
+ isSelected?: boolean;
42
+ label: string;
43
+ }
44
+ export type { IGroupSelectorProps, IOptionProps, TVariant };
@@ -0,0 +1,5 @@
1
+ import { PropsWithChildren } from "react";
2
+ import type { IIndicatorCardProps } from "./types";
3
+ declare const IndicatorCard: ({ description, height, leftIconName, children, rightIconName, title, tooltipId, tooltipTip, tooltipPlace, variant, width, }: Readonly<PropsWithChildren<IIndicatorCardProps>>) => JSX.Element;
4
+ export type { IIndicatorCardProps };
5
+ export { IndicatorCard };
@@ -0,0 +1,30 @@
1
+ import type { IconName } from "@fortawesome/free-solid-svg-icons";
2
+ import type { TPlace } from "components/tooltip/types";
3
+ type TVariant = "centered" | "left-aligned";
4
+ /**
5
+ * Indicator card component props.
6
+ * @interface IIndicatorCardProps
7
+ * @property { string } [description] - Description of the indicator card.
8
+ * @property { string } [height] - Height of the indicator card.
9
+ * @property { IconName } [leftIconName] - Name of the left icon.
10
+ * @property { IconName } [rightIconName] - Name of the right icon.
11
+ * @property { string } [title] - Title of the indicator card.
12
+ * @property { string } [tooltipId] - Id of the tooltip.
13
+ * @property { string } [tooltipTip] - Tip of the tooltip.
14
+ * @property { TPlace } [tooltipPlace] - Place of the tooltip.
15
+ * @property { TVariant } [variant] - Variant of the indicator card.
16
+ * @property { string } [width] - Width of the indicator card.
17
+ */
18
+ interface IIndicatorCardProps {
19
+ description?: string;
20
+ height?: string;
21
+ leftIconName?: IconName;
22
+ rightIconName?: IconName;
23
+ title?: string;
24
+ tooltipId?: string;
25
+ tooltipTip?: string;
26
+ tooltipPlace?: TPlace;
27
+ variant?: TVariant;
28
+ width?: string;
29
+ }
30
+ export type { IIndicatorCardProps };
@@ -0,0 +1,5 @@
1
+ import { PropsWithChildren } from "react";
2
+ import { ModalConfirm } from "./modal-confirm";
3
+ import type { IModalProps } from "./types";
4
+ declare const Modal: ({ _portal, cancelButton, children, confirmButton, content, description, modalRef, otherActions, onClose, title, size, id, }: Readonly<PropsWithChildren<IModalProps>>) => JSX.Element | null;
5
+ export { Modal, ModalConfirm };
@@ -0,0 +1,3 @@
1
+ import type { IModalConfirmProps } from "../types";
2
+ declare const ModalConfirm: ({ disabled, id, onCancel, onConfirm, txtCancel, txtConfirm, }: Readonly<IModalConfirmProps>) => JSX.Element;
3
+ export { ModalConfirm };
@@ -0,0 +1,3 @@
1
+ import type { IModalFooterProps } from "../types";
2
+ declare const ModalFooter: ({ modalRef, confirmButton, cancelButton, }: Readonly<IModalFooterProps>) => JSX.Element | null;
3
+ export { ModalFooter };
@@ -0,0 +1,3 @@
1
+ import type { IModalHeaderProps } from "../types";
2
+ declare const ModalHeader: ({ title, description, modalRef, otherActions, onClose, }: Readonly<IModalHeaderProps>) => JSX.Element;
3
+ export { ModalHeader };
@@ -0,0 +1,16 @@
1
+ import type { TSize } from "./types";
2
+ declare const ModalWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
3
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
4
+ }>, never>, never>> & string;
5
+ declare const ModalContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
6
+ $size: TSize;
7
+ }>> & string;
8
+ declare const Header: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
9
+ declare const Title: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
10
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
11
+ }>, never>, never>> & string;
12
+ declare const Footer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
13
+ declare const ImageContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
14
+ $framed?: boolean;
15
+ }>> & string;
16
+ export { Header, ModalContainer, Footer, ModalWrapper, ImageContainer, Title };
@@ -0,0 +1,87 @@
1
+ import type { IUseModal } from "hooks";
2
+ type TSize = "lg" | "md" | "sm";
3
+ /**
4
+ * Button props.
5
+ * @interface IButtonProps
6
+ * @property { string } text - The text of the button.
7
+ * @property { Function } [onClick] - The function to call when the button is clicked.
8
+ */
9
+ interface IButtonProps {
10
+ onClick: () => void;
11
+ text: string;
12
+ }
13
+ /**
14
+ * Modal content props.
15
+ * @interface IModalContent
16
+ * @property { string } [imageSrc] - The source of the image.
17
+ * @property { boolean } [imageFramed] - Whether the image is framed.
18
+ * @property { string } [imageText] - The text of the image.
19
+ */
20
+ interface IModalContent {
21
+ imageSrc?: string;
22
+ imageFramed?: boolean;
23
+ imageText?: string;
24
+ }
25
+ /**
26
+ * Modal header component props.
27
+ * @interface IModalHeaderProps
28
+ * @property { React.ReactNode | string } [description] - The description of the modal.
29
+ * @property { IUseModal } [modalRef] - The modal reference.
30
+ * @property { React.ReactNode } [otherActions] - The other actions of the modal.
31
+ * @property { Function } [onClose] - The function to call when the modal is closed.
32
+ * @property { React.ReactNode | string } [title] - The title of the modal.
33
+ */
34
+ interface IModalHeaderProps {
35
+ description?: React.ReactNode | string;
36
+ modalRef: IModalProps["modalRef"];
37
+ otherActions?: React.ReactNode;
38
+ onClose?: () => void;
39
+ title: React.ReactNode | string;
40
+ }
41
+ /**
42
+ * Modal footer component props.
43
+ * @interface IModalFooterProps
44
+ * @property { IButtonProps } [cancelButton] - The cancel button props.
45
+ * @property { IButtonProps } [confirmButton] - The confirm button props.
46
+ * @property { IUseModal } [modalRef] - The modal reference.
47
+ */
48
+ interface IModalFooterProps {
49
+ cancelButton?: IButtonProps;
50
+ confirmButton?: IButtonProps;
51
+ modalRef: IUseModal;
52
+ }
53
+ /**
54
+ * Modal component props.
55
+ * @interface IModalProps
56
+ * @extends IModalHeaderProps
57
+ * @extends IModalFooterProps
58
+ * @property { boolean } [portal] - Whether the modal is a portal.
59
+ * @property { IModalContent } [content] - The modal content.
60
+ * @property { string } [id] - The id of the modal.
61
+ * @property { TSize } [size] - The size of the modal.
62
+ */
63
+ interface IModalProps extends Omit<IModalHeaderProps, "modalRef">, IModalFooterProps {
64
+ _portal?: boolean;
65
+ content?: IModalContent;
66
+ id?: string;
67
+ size: TSize;
68
+ }
69
+ /**
70
+ * Modal confirm props.
71
+ * @interface IModalConfirmProps
72
+ * @property { boolean } [disabled] - Whether the confirm button is disabled.
73
+ * @property { string } [id] - The id of the confirm button.
74
+ * @property { Function } [onCancel] - The function to call when the cancel button is clicked.
75
+ * @property { "submit" | Function } [onConfirm] - The function to call when the confirm button is clicked.
76
+ * @property { string } [txtCancel] - The text of the cancel button.
77
+ * @property { React.ReactNode | string } [txtConfirm] - The text of the confirm button.
78
+ */
79
+ interface IModalConfirmProps {
80
+ disabled?: boolean;
81
+ id?: string;
82
+ onCancel?: () => void;
83
+ onConfirm?: "submit" | (() => void);
84
+ txtCancel?: string;
85
+ txtConfirm?: React.ReactNode | string;
86
+ }
87
+ export type { IModalProps, IModalContent, IModalConfirmProps, IModalFooterProps, IModalHeaderProps, TSize, };
@@ -0,0 +1,5 @@
1
+ import { PropsWithChildren } from "react";
2
+ import { OptionContainer } from "./option-container";
3
+ import type { IOAuthSelectorProps } from "./types";
4
+ declare const OAuthSelector: ({ align, buttonLabel, children, id, manualOption, providers, }: Readonly<PropsWithChildren<IOAuthSelectorProps>>) => JSX.Element;
5
+ export { OAuthSelector, OptionContainer };
@@ -0,0 +1,3 @@
1
+ import type { IOptionContainerProps } from "../types";
2
+ declare const OptionContainer: ({ icon, label, onClick, onlyLabel, provider, }: Readonly<IOptionContainerProps>) => JSX.Element;
3
+ export { OptionContainer };
@@ -0,0 +1,45 @@
1
+ import type { Property } from "csstype";
2
+ import type { MouseEventHandler } from "react";
3
+ import { IIconModifiable } from "components/@core";
4
+ type TOAuthProvider = "Azure" | "Bitbucket" | "GitHub" | "GitLab";
5
+ /**
6
+ * Shared props for OAuth selector.
7
+ * @interface ISharedProps
8
+ * @property {string} [label] - Label to display on the button.
9
+ * @property {Function} onClick - Function to be called when the button is clicked.
10
+ */
11
+ interface ISharedProps {
12
+ label?: string;
13
+ onClick: MouseEventHandler<HTMLOrSVGElement>;
14
+ }
15
+ /**
16
+ * Oauth selector component props.
17
+ * @interface IOAuthSelectorProps
18
+ * @property {string} [align] - Alignment of the button.
19
+ * @property {string} [buttonLabel] - Label to display on the button.
20
+ * @property {string} [id] - Id to be used on the button.
21
+ * @property {ISharedProps} [manualOption] - Object with the label and onClick function for the manual option.
22
+ * @property {Record} [providers] - Object with the providers and their onClick function.
23
+ */
24
+ interface IOAuthSelectorProps {
25
+ align?: Property.AlignItems;
26
+ buttonLabel?: string;
27
+ id?: string;
28
+ manualOption?: ISharedProps;
29
+ providers: Partial<Record<TOAuthProvider, {
30
+ onClick: MouseEventHandler<HTMLOrSVGElement>;
31
+ }>>;
32
+ }
33
+ /**
34
+ * Option container component props.
35
+ * @interface IOptionContainerProps
36
+ * @extends IIconModifiable
37
+ * @extends ISharedProps
38
+ * @property {boolean} [onlyLabel] - Whether to only display the label.
39
+ * @property {TOAuthProvider} [provider] - Provider to display.
40
+ */
41
+ interface IOptionContainerProps extends Partial<Pick<IIconModifiable, "icon">>, ISharedProps {
42
+ onlyLabel?: boolean;
43
+ provider?: TOAuthProvider;
44
+ }
45
+ export type { IOAuthSelectorProps, IOptionContainerProps, TOAuthProvider };
@@ -0,0 +1,5 @@
1
+ declare const Description: ({ description, highlightDescription, }: Readonly<{
2
+ description: string;
3
+ highlightDescription: string[] | string;
4
+ }>) => JSX.Element;
5
+ export { Description };
@@ -0,0 +1,4 @@
1
+ import { PropsWithChildren } from "react";
2
+ import type { IPopUpProps } from "./types";
3
+ declare const PopUp: ({ _portal, cancelButton, darkBackground, children, confirmButton, container, description, highlightDescription, image, maxWidth, title, titleColor, }: Readonly<PropsWithChildren<IPopUpProps>>) => JSX.Element;
4
+ export { PopUp };
@@ -0,0 +1,58 @@
1
+ import type { TVariant } from "components/button/types";
2
+ /**
3
+ * Pop up button props.
4
+ * @interface IButtonProps
5
+ * @property { string } [key] - The name of the button.
6
+ * @property { Function } onClick - The function to call when the button is clicked
7
+ * @property { string } text - The text of the button.
8
+ * @property { TVariant } [variant] - The variant of the button.
9
+ */
10
+ interface IButtonProps {
11
+ key?: string;
12
+ onClick: () => void;
13
+ text: string;
14
+ variant?: TVariant;
15
+ }
16
+ /**
17
+ * Pop up image props.
18
+ * @interface IImageProps
19
+ * @property { string } alt - The alt of the image.
20
+ * @property { string } src - The URL of the image.
21
+ * @property { string } [height] - The height of the image.
22
+ * @property { string } [width] - The weight of the image.
23
+ */
24
+ interface IImageProps {
25
+ alt: string;
26
+ src: string;
27
+ height?: string;
28
+ width?: string;
29
+ }
30
+ /**
31
+ * Pop up component props.
32
+ * @interface IPopUpProps
33
+ * @property { boolean } [_portal] - Whether the pop up should be rendered in a portal.
34
+ * @property { boolean } [darkBackground] - Whether the pop up should have a dark background.
35
+ * @property { IButtonProps } [cancelButton] - The cancel button of the pop up.
36
+ * @property { IButtonProps } [confirmButton] - The confirm button of the pop up.
37
+ * @property { HTMLElement | null } [container] - The container of the pop up.
38
+ * @property { IImageProps } image - The image of the pop up.
39
+ * @property { string } title - The title of the pop up.
40
+ * @property { string } [titleColor] - The color of the title.
41
+ * @property { string } description - The description of the pop up.
42
+ * @property { string[] | string } [highlightDescription] - The highlight description of the pop up.
43
+ * @property { string } [maxWidth] - The max width of the pop up.
44
+ */
45
+ interface IPopUpProps {
46
+ _portal?: boolean;
47
+ darkBackground?: boolean;
48
+ cancelButton?: IButtonProps;
49
+ confirmButton?: IButtonProps;
50
+ container?: HTMLElement | null;
51
+ image: IImageProps;
52
+ title: string;
53
+ titleColor?: string;
54
+ description: string;
55
+ highlightDescription?: string[] | string;
56
+ maxWidth?: string;
57
+ }
58
+ export type { IPopUpProps };
@@ -1,6 +1,4 @@
1
- declare const StyledInput: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, {
2
- $isEmpty: boolean;
3
- }>> & string;
1
+ declare const StyledInput: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, never>> & string;
4
2
  declare const OutlineContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
5
3
  declare const OutlineDropdown: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
6
4
  export { StyledInput, OutlineContainer, OutlineDropdown };
@@ -1,3 +1,4 @@
1
1
  import { Heading } from "./heading";
2
+ import { Span } from "./span";
2
3
  import { Text } from "./text";
3
- export { Heading, Text };
4
+ export { Heading, Text, Span };
@@ -0,0 +1,3 @@
1
+ import type { PropsWithChildren } from "react";
2
+ declare const Span: import("react").ForwardRefExoticComponent<Readonly<PropsWithChildren<import("../types").ITypographyProps>> & import("react").RefAttributes<HTMLParagraphElement>>;
3
+ export { Span };