@fluidattacks/design 1.5.0 → 1.6.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.
@@ -0,0 +1,4 @@
1
+ import { ILittleFlagProps } from './types';
2
+ declare const LittleFlag: ({ bgColor, children, txtDecoration, ml, }: Readonly<ILittleFlagProps>) => JSX.Element;
3
+ export type { ILittleFlagProps };
4
+ export { LittleFlag };
@@ -0,0 +1,6 @@
1
+ interface IStyledLittleFlagProps {
2
+ $bgColor?: string;
3
+ $txtDecoration?: string;
4
+ }
5
+ declare const LittleFlag: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, IStyledLittleFlagProps>> & string;
6
+ export { LittleFlag };
@@ -0,0 +1,15 @@
1
+ type TNums0To7 = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7;
2
+ /**
3
+ * Little flag component props.
4
+ * @interface ILittleFlagProps
5
+ * @extends React.HTMLAttributes<HTMLSpanElement>
6
+ * @property { number } [ml] - The margin left value for the little flag.
7
+ * @property { string } [bgColor] - The background color for the little flag.
8
+ * @property { string } [txtDecoration] - The text decoration for the little flag.
9
+ */
10
+ interface ILittleFlagProps extends Partial<React.HTMLAttributes<HTMLSpanElement>> {
11
+ ml?: TNums0To7;
12
+ bgColor?: string;
13
+ txtDecoration?: string;
14
+ }
15
+ export type { ILittleFlagProps };
@@ -0,0 +1,3 @@
1
+ import { ILottieProps } from './types';
2
+ declare const Lottie: (props: Readonly<ILottieProps>) => JSX.Element;
3
+ export { Lottie };
@@ -0,0 +1,41 @@
1
+ import { ILottieProps } from './types';
2
+ interface IStyledLottieProps extends Partial<ILottieProps> {
3
+ $size?: ILottieProps["size"];
4
+ }
5
+ declare const StyledLottie: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('styled-components').FastOmit<import('styled-components/dist/types').Substitute<Omit<Omit<import('lottie-web').AnimationConfigWithData<"svg">, "container" | "animationData"> & {
6
+ animationData: unknown;
7
+ lottieRef?: import('lottie-light-react').LottieRef;
8
+ onComplete?: import('react').AnimationEventHandler | null;
9
+ onLoopComplete?: import('react').AnimationEventHandler | null;
10
+ onEnterFrame?: import('react').AnimationEventHandler | null;
11
+ onSegmentStart?: import('react').AnimationEventHandler | null;
12
+ onConfigReady?: import('react').AnimationEventHandler | null;
13
+ onDataReady?: import('react').AnimationEventHandler | null;
14
+ onDataFailed?: import('react').AnimationEventHandler | null;
15
+ onLoadedImages?: import('react').AnimationEventHandler | null;
16
+ onDOMLoaded?: import('react').AnimationEventHandler | null;
17
+ onDestroy?: import('react').AnimationEventHandler | null;
18
+ } & Omit<import('react').HTMLProps<HTMLDivElement>, "loop"> & {
19
+ interactivity?: Omit<import('lottie-light-react').InteractivityProps, "lottieObj">;
20
+ }, "ref"> & {
21
+ ref?: ((instance: HTMLDivElement | null) => void) | import('react').RefObject<HTMLDivElement> | null | undefined;
22
+ }, Omit<Omit<import('lottie-web').AnimationConfigWithData<"svg">, "container" | "animationData"> & {
23
+ animationData: unknown;
24
+ lottieRef?: import('lottie-light-react').LottieRef;
25
+ onComplete?: import('react').AnimationEventHandler | null;
26
+ onLoopComplete?: import('react').AnimationEventHandler | null;
27
+ onEnterFrame?: import('react').AnimationEventHandler | null;
28
+ onSegmentStart?: import('react').AnimationEventHandler | null;
29
+ onConfigReady?: import('react').AnimationEventHandler | null;
30
+ onDataReady?: import('react').AnimationEventHandler | null;
31
+ onDataFailed?: import('react').AnimationEventHandler | null;
32
+ onLoadedImages?: import('react').AnimationEventHandler | null;
33
+ onDOMLoaded?: import('react').AnimationEventHandler | null;
34
+ onDestroy?: import('react').AnimationEventHandler | null;
35
+ } & Omit<import('react').HTMLProps<HTMLDivElement>, "loop"> & {
36
+ interactivity?: Omit<import('lottie-light-react').InteractivityProps, "lottieObj">;
37
+ }, "ref"> & {
38
+ ref?: ((instance: HTMLDivElement | null) => void) | import('react').RefObject<HTMLDivElement> | null | undefined;
39
+ }>, never>, IStyledLottieProps>> & string & Omit<(props: import('lottie-light-react').LottieComponentProps) => import('react').ReactElement<any, string | import('react').JSXElementConstructor<any>>, keyof import('react').Component<any, {}, any>>;
40
+ export type { IStyledLottieProps };
41
+ export { StyledLottie };
@@ -0,0 +1,11 @@
1
+ import { LottieComponentProps } from 'lottie-light-react';
2
+ /**
3
+ * Lottie component props.
4
+ * @interface ILottieProps
5
+ * @extends LottieComponentProps
6
+ * @property { number } [size] - The size of the lottie animation. Default is 16px.
7
+ */
8
+ interface ILottieProps extends Partial<Pick<LottieComponentProps, "animationData" | "autoplay" | "className">> {
9
+ size?: number;
10
+ }
11
+ export type { ILottieProps };
@@ -0,0 +1,3 @@
1
+ import { INotificationProps } from './types';
2
+ declare const Notification: ({ description, onClose, title, variant, }: Readonly<INotificationProps>) => JSX.Element;
3
+ export { Notification };
@@ -0,0 +1,7 @@
1
+ import { TNotificationVariant } from './types';
2
+ interface IAlertAndNotifyBoxProps {
3
+ $variant: TNotificationVariant;
4
+ }
5
+ declare const NotificationContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, IAlertAndNotifyBoxProps>> & string;
6
+ declare const IconsContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, IAlertAndNotifyBoxProps>> & string;
7
+ export { IconsContainer, NotificationContainer };
@@ -0,0 +1,16 @@
1
+ type TNotificationVariant = "error" | "info" | "success" | "warning";
2
+ /**
3
+ * Notification component props.
4
+ * @interface INotificationProps
5
+ * @property {string} description - The main content of the notification.
6
+ * @property {string} title - The title of the notification.
7
+ * @property {TNotificationVariant} variant - The notification custom variant.
8
+ * @property { Function } [onClose] - Optional callback function when the notification is closed.
9
+ */
10
+ interface INotificationProps {
11
+ description: string;
12
+ title: string;
13
+ variant: TNotificationVariant;
14
+ onClose?: () => void;
15
+ }
16
+ export type { INotificationProps, TNotificationVariant };
@@ -0,0 +1,4 @@
1
+ import { IconName } from '@fortawesome/free-solid-svg-icons';
2
+ import { TNotificationVariant } from './types';
3
+ declare const getIcon: (variant: TNotificationVariant) => IconName;
4
+ export { getIcon };
@@ -0,0 +1,5 @@
1
+ import { default as React } from 'react';
2
+ import { INumberInputProps } from './types';
3
+ declare const NumberInput: React.ForwardRefExoticComponent<Readonly<INumberInputProps> & React.RefAttributes<HTMLInputElement>>;
4
+ export type { INumberInputProps };
5
+ export { NumberInput };
@@ -0,0 +1,3 @@
1
+ declare const StyledInputContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
2
+ declare const StyledInput: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, never>> & string;
3
+ export { StyledInputContainer, StyledInput };
@@ -0,0 +1,17 @@
1
+ import { InputHTMLAttributes } from 'react';
2
+ /**
3
+ * Number input component props.
4
+ * @interface INumberInputProps
5
+ * @extends InputHTMLAttributes<HTMLInputElement>
6
+ * @property { boolean } [autoUpdate] - Whether the input value should be updated automatically.
7
+ * @property { number } [decimalPlaces] - Number of decimal places to display.
8
+ * @property { Function } [onEnter] - Function to be called when the enter key is pressed.
9
+ * @property { string } [tooltipMessage] - Tooltip message to display when hovering over the input.
10
+ */
11
+ interface INumberInputProps extends InputHTMLAttributes<HTMLInputElement> {
12
+ autoUpdate?: boolean;
13
+ decimalPlaces?: number;
14
+ onEnter: (value?: number) => void;
15
+ tooltipMessage?: string;
16
+ }
17
+ export type { INumberInputProps };
@@ -0,0 +1,3 @@
1
+ import { IStepLapseProps } from './types';
2
+ declare const StepLapse: ({ button: { disabled, text, type, onClick }, steps, }: Readonly<IStepLapseProps>) => JSX.Element;
3
+ export { StepLapse };
@@ -0,0 +1,8 @@
1
+ import { TStepVariant } from './types';
2
+ declare const StepperContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
3
+ declare const StepContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
4
+ declare const StyledButtonsContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
5
+ declare const StyledStepLabel: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {
6
+ $variant: TStepVariant;
7
+ }>> & string;
8
+ export { StyledStepLabel, StyledButtonsContainer, StepContainer, StepperContainer, };
@@ -0,0 +1,44 @@
1
+ import { ButtonHTMLAttributes, ReactNode } from 'react';
2
+ type TStepVariant = "completed" | "current" | "disabled";
3
+ /**
4
+ * Step component props.
5
+ * @interface IStep
6
+ * @property { ReactNode } content - The content to be displayed in the step.
7
+ * @property { boolean } [isDisabledNext] - A flag indicating whether the next button should be disabled.
8
+ * @property { boolean } [isDisabledPrevious] - A flag indicating whether the previous button should be disabled.
9
+ * @property { Function } [nextAction] - The callback function to be executed when the next button is clicked.
10
+ * @property { Function } [previousAction] - The callback function to be executed when the previous button is clicked.
11
+ * @property { string } title - The title of the step.
12
+ */
13
+ interface IStep {
14
+ content: ReactNode;
15
+ isDisabledNext?: boolean;
16
+ isDisabledPrevious?: boolean;
17
+ nextAction?: () => void;
18
+ previousAction?: () => void;
19
+ title: string;
20
+ }
21
+ /**
22
+ * Step lapse button props.
23
+ * @interface IStepLapseButton
24
+ * @extends ButtonHTMLAttributes<HTMLButtonElement>
25
+ * @property { boolean } disabled - Whether the button should be disabled.
26
+ * @property { string } text - Button text.
27
+ * @property { Function } onClick - Callback function to be executed when the button is clicked.
28
+ */
29
+ interface IStepLapseButton extends Pick<ButtonHTMLAttributes<HTMLButtonElement>, "type"> {
30
+ disabled?: boolean;
31
+ text: string;
32
+ onClick?: () => void;
33
+ }
34
+ /**
35
+ * Step lapse component props.
36
+ * @interface IStepLapseProps
37
+ * @property { IStepLapseButton } button - The button to be displayed at the end of the step lapse.
38
+ * @property { IStep[] } steps - The steps to be included in the step lapse.
39
+ */
40
+ interface IStepLapseProps {
41
+ button: IStepLapseButton;
42
+ steps: IStep[];
43
+ }
44
+ export type { IStepLapseProps, TStepVariant };
@@ -0,0 +1,6 @@
1
+ import { Step } from 'react-joyride';
2
+ import { ITourProps } from './types';
3
+ declare const baseStep: Step;
4
+ declare const Tour: ({ run, steps, onFinish }: Readonly<ITourProps>) => JSX.Element;
5
+ export { baseStep, Tour };
6
+ export type { Step };
@@ -0,0 +1,14 @@
1
+ import { Step } from 'react-joyride';
2
+ /**
3
+ * Tour component props.
4
+ * @interface ITourProps
5
+ * @property { Function } [onFinish] - The callback function to be executed when the tour finishes.
6
+ * @property { boolean } run - A flag indicating whether the tour should be run.
7
+ * @property { Step[] } steps - The steps to be included in the tour.
8
+ */
9
+ interface ITourProps {
10
+ onFinish?: () => void;
11
+ run: boolean;
12
+ steps: Step[];
13
+ }
14
+ export type { ITourProps };
@@ -20,10 +20,14 @@ export * from './components/interactive-card';
20
20
  export * from './components/language-selector';
21
21
  export * from './components/link';
22
22
  export * from './components/list-item';
23
+ export * from './components/little-flag';
23
24
  export * from './components/logo';
24
25
  export * from './components/logo-carousel';
26
+ export * from './components/lottie';
25
27
  export * from './components/message-banner';
28
+ export * from './components/notification';
26
29
  export * from './components/notification-sign';
30
+ export * from './components/number-input';
27
31
  export * from './components/progress-bar';
28
32
  export * from './components/radio-button';
29
33
  export * from './components/search-bar';
package/package.json CHANGED
@@ -8,10 +8,12 @@
8
8
  "@cloudinary/url-gen": "1.21.0",
9
9
  "@fortawesome/free-solid-svg-icons": "6.7.1",
10
10
  "@fortawesome/react-fontawesome": "0.2.2",
11
+ "lottie-light-react": "2.4.0",
11
12
  "prismjs": "1.29.0",
12
13
  "react": "18.2.0",
13
14
  "react-dom": "18.2.0",
14
15
  "react-international-phone": "4.3.0",
16
+ "react-joyride": "2.9.3",
15
17
  "react-tooltip": "5.28.0",
16
18
  "styled-components": "6.1.13"
17
19
  },
@@ -96,5 +98,5 @@
96
98
  "test-storybook": "test-storybook"
97
99
  },
98
100
  "types": "dist/src/index.d.ts",
99
- "version": "1.5.0"
101
+ "version": "1.6.0"
100
102
  }