@fluidattacks/design 1.2.21 → 1.2.22

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 (29) hide show
  1. package/dist/design.js +170 -84
  2. package/dist/design.mjs +2592 -2392
  3. package/dist/src/components/message-banner/index.d.ts +1 -1
  4. package/dist/src/components/notification-sign/index.d.ts +3 -0
  5. package/dist/src/components/notification-sign/styles.d.ts +9 -0
  6. package/dist/src/components/notification-sign/types.d.ts +15 -0
  7. package/dist/src/components/progress-bar/index.d.ts +4 -0
  8. package/dist/src/components/progress-bar/types.d.ts +11 -0
  9. package/dist/src/components/progress-bar/utils.d.ts +2 -0
  10. package/dist/src/components/tabs/fixed-tabs/index.d.ts +3 -0
  11. package/dist/src/components/tabs/index.d.ts +5 -0
  12. package/dist/src/components/tabs/styles.d.ts +4 -3
  13. package/dist/src/components/tabs/tab/index.d.ts +4 -0
  14. package/dist/src/components/tabs/types.d.ts +46 -0
  15. package/dist/src/index.d.ts +2 -0
  16. package/package.json +5 -2
  17. package/dist/src/components/accordion/index.stories.d.ts +0 -7
  18. package/dist/src/components/accordion/platform/index.stories.d.ts +0 -6
  19. package/dist/src/components/button/index.stories.d.ts +0 -10
  20. package/dist/src/components/button/platform/index.stories.d.ts +0 -10
  21. package/dist/src/components/container/index.stories.d.ts +0 -7
  22. package/dist/src/components/grid-layout/index.stories.d.ts +0 -17
  23. package/dist/src/components/language-selector/index.stories.d.ts +0 -8
  24. package/dist/src/components/message-banner/index.stories.d.ts +0 -6
  25. package/dist/src/components/search-bar/index.stories.d.ts +0 -7
  26. package/dist/src/components/search-bar/item-searching/index.stories.d.ts +0 -6
  27. package/dist/src/components/toggle-buttons/index.stories.d.ts +0 -6
  28. package/dist/src/components/tooltip/index.stories.d.ts +0 -8
  29. /package/dist/src/components/{accordion → progress-bar}/styles.d.ts +0 -0
@@ -1,3 +1,3 @@
1
1
  import { IMessageBannerProps } from './types';
2
- declare const MessageBanner: import('react').ForwardRefExoticComponent<Readonly<IMessageBannerProps> & import('react').RefAttributes<unknown>>;
2
+ declare const MessageBanner: ({ message, onClickButton, buttonText, buttonFontWeight, icon, onClose, variant, }: Readonly<IMessageBannerProps>) => JSX.Element;
3
3
  export { MessageBanner };
@@ -0,0 +1,3 @@
1
+ import { INotificationSignProps } from './types';
2
+ declare const NotificationSign: import('react').ForwardRefExoticComponent<Readonly<INotificationSignProps> & import('react').RefAttributes<HTMLDivElement>>;
3
+ export { NotificationSign };
@@ -0,0 +1,9 @@
1
+ import { INotificationSignProps } from './types';
2
+ interface IStyledNotificationSignProps {
3
+ $variant?: INotificationSignProps["variant"];
4
+ }
5
+ declare const NotificationSignButton: 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('../@core').IPaddingModifiable | keyof import('../@core').IMarginModifiable | keyof import('../@core').IPositionModifiable | keyof import('../@core').IBorderModifiable | keyof import('../@core').IDisplayModifiable | keyof import('../@core').ITextModifiable | keyof import('../@core').IInteractionModifiable> & import('../@core').IBorderModifiable & import('../@core').IDisplayModifiable & import('../@core').IInteractionModifiable & import('../@core').IMarginModifiable & import('../@core').IPaddingModifiable & import('../@core').IPositionModifiable & import('../@core').ITextModifiable, "ref"> & {
6
+ ref?: ((instance: HTMLDivElement | null) => void) | import('react').RefObject<HTMLDivElement> | null | undefined;
7
+ }, IStyledNotificationSignProps>> & string;
8
+ declare const NumberIndicator: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
9
+ export { NotificationSignButton, NumberIndicator };
@@ -0,0 +1,15 @@
1
+ import { IPositionModifiable } from '../@core';
2
+ type TVariant = "error" | "warning";
3
+ /**
4
+ * Notification sign component props.
5
+ * @extends IPositionModifiable
6
+ * @property {number} [numberIndicator] The number of notifications.
7
+ * @property {boolean} [show] The visibility of notification sign.
8
+ * @property {TVariant} [variant] The notification custom variant.
9
+ */
10
+ interface INotificationSignProps extends Pick<IPositionModifiable, "left" | "top"> {
11
+ numberIndicator?: number;
12
+ show?: boolean;
13
+ variant?: TVariant;
14
+ }
15
+ export type { INotificationSignProps };
@@ -0,0 +1,4 @@
1
+ import { IProgressBarProps } from './types';
2
+ declare const ProgressBar: ({ progressTime, onComplete, }: Readonly<IProgressBarProps>) => JSX.Element;
3
+ export { ProgressBar };
4
+ export type { IProgressBarProps };
@@ -0,0 +1,11 @@
1
+ import { IDisplayModifiable } from '../@core';
2
+ /**
3
+ * Progress bar component props
4
+ * @property {number} [progressTime] Time to complete.
5
+ * @property {Function} [onComplete] Action when progress complete.
6
+ */
7
+ interface IProgressBarProps extends IDisplayModifiable {
8
+ progressTime?: number;
9
+ onComplete?: () => void;
10
+ }
11
+ export type { IProgressBarProps };
@@ -0,0 +1,2 @@
1
+ declare const getDelay: (progressTime: number) => number;
2
+ export { getDelay };
@@ -0,0 +1,3 @@
1
+ import { IFixedTabsProps } from '../types';
2
+ declare const FixedTabs: ({ items }: Readonly<IFixedTabsProps>) => JSX.Element;
3
+ export { FixedTabs };
@@ -0,0 +1,5 @@
1
+ import { FixedTabs } from './fixed-tabs';
2
+ import { Tab } from './tab';
3
+ import { ITabsProps } from './types';
4
+ declare const Tabs: ({ items, borders, box, }: Readonly<ITabsProps>) => JSX.Element;
5
+ export { FixedTabs, Tabs, Tab };
@@ -1,3 +1,4 @@
1
- declare const StyledTab: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, never>> & string;
2
- declare const StyledTabs: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
3
- export { StyledTab, StyledTabs };
1
+ declare const StyledFixedTab: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
2
+ declare const StyledFixedTabs: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
3
+ declare const TabLink: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react-router-dom').NavLinkProps & import('react').RefAttributes<HTMLAnchorElement>, never>> & string & Omit<import('react').ForwardRefExoticComponent<import('react-router-dom').NavLinkProps & import('react').RefAttributes<HTMLAnchorElement>>, keyof import('react').Component<any, {}, any>>;
4
+ export { StyledFixedTab, StyledFixedTabs, TabLink };
@@ -0,0 +1,4 @@
1
+ import { ITabProps } from '../types';
2
+ declare const Tab: ({ label, id, isActive, link, notificationSign, onClick, tooltip, }: Readonly<ITabProps>) => JSX.Element;
3
+ export type { ITabProps };
4
+ export { Tab };
@@ -0,0 +1,46 @@
1
+ import { INotificationSignProps } from '../notification-sign/types';
2
+ /**
3
+ * Individual tab props.
4
+ * @property {boolean} [isActive] Set the current tab active.
5
+ * @property {Function} [onClick] The handler event on tab click.
6
+ * @property {string | JSX.Element} label The tab title.
7
+ */
8
+ interface IFixedTabProps {
9
+ isActive?: boolean;
10
+ onClick?: (event: Readonly<React.MouseEvent>) => void;
11
+ label: string | JSX.Element;
12
+ }
13
+ /**
14
+ * Fixed tabs component props.
15
+ * ** Note: A maximum of 5 tabs is allowed. **
16
+ * @property {ITabProps[]} items The list of tabs to display.
17
+ */
18
+ interface IFixedTabsProps {
19
+ items: IFixedTabProps[];
20
+ }
21
+ /**
22
+ * Tab component props.
23
+ * @extends IFixedTabProps
24
+ * @property {string} id The id related to the tab.
25
+ * @property {string} link The link to redirect on tab click.
26
+ * @property {INotificationSignProps} [notificationSign] Notification tab details.
27
+ * @property {string} [tooltip] The tooltip text to add.
28
+ */
29
+ interface ITabProps extends IFixedTabProps {
30
+ id: string;
31
+ link: string;
32
+ notificationSign?: INotificationSignProps;
33
+ tooltip?: string;
34
+ }
35
+ /**
36
+ * Tabs component props.
37
+ * @property {ITabProps[]} items The lists of tabs to display.
38
+ * @property {boolean} [borders] Whether to add borders to set of tabs.
39
+ * @property {boolean} [box] Whether to add box container to set of tabs.
40
+ */
41
+ interface ITabsProps {
42
+ items: ITabProps[];
43
+ borders?: boolean;
44
+ box?: boolean;
45
+ }
46
+ export type { IFixedTabsProps, IFixedTabProps, ITabProps, ITabsProps };
@@ -7,7 +7,9 @@ export * from './components/container';
7
7
  export * from './components/icon';
8
8
  export * from './components/language-selector';
9
9
  export * from './components/logo';
10
+ export * from './components/notification-sign';
10
11
  export * from './components/search-bar';
12
+ export * from './components/tabs';
11
13
  export * from './components/toggle-buttons';
12
14
  export * from './components/tooltip';
13
15
  export * from './components/typography';
package/package.json CHANGED
@@ -7,7 +7,6 @@
7
7
  "dependencies": {
8
8
  "@cloudinary/react": "1.13.0",
9
9
  "@cloudinary/url-gen": "1.21.0",
10
- "@floating-ui/react-dom": "2.1.2",
11
10
  "@fortawesome/free-solid-svg-icons": "6.6.0",
12
11
  "@fortawesome/react-fontawesome": "0.2.2",
13
12
  "react": "18.2.0",
@@ -15,6 +14,10 @@
15
14
  "react-tooltip": "5.28.0",
16
15
  "styled-components": "6.1.13"
17
16
  },
17
+ "optionalDependencies": {
18
+ "@floating-ui/react-dom": "2.1.2",
19
+ "react-router-dom": "6.27.0"
20
+ },
18
21
  "devDependencies": {
19
22
  "@storybook/addon-a11y": "8.3.6",
20
23
  "@storybook/addon-essentials": "8.3.6",
@@ -82,7 +85,7 @@
82
85
  "preview": "vite preview",
83
86
  "storybook": "storybook dev"
84
87
  },
85
- "version": "1.2.21",
88
+ "version": "1.2.22",
86
89
  "eslintConfig": {
87
90
  "extends": [
88
91
  "plugin:storybook/recommended"
@@ -1,7 +0,0 @@
1
- import { Meta } from '@storybook/react';
2
- import { IAccordionProps } from './types';
3
- declare const config: Meta;
4
- declare const Default: import('@storybook/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, IAccordionProps>;
5
- declare const Progress: import('@storybook/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, IAccordionProps>;
6
- export { Default, Progress };
7
- export default config;
@@ -1,6 +0,0 @@
1
- import { Meta } from '@storybook/react';
2
- import { IAccordionProps } from '../types';
3
- declare const config: Meta;
4
- declare const Default: import('@storybook/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, IAccordionProps>;
5
- export { Default };
6
- export default config;
@@ -1,10 +0,0 @@
1
- import { Meta } from '@storybook/react';
2
- import { PropsWithChildren } from 'react';
3
- import { IButtonProps } from '.';
4
- declare const config: Meta;
5
- declare const Default: import('@storybook/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, PropsWithChildren<IButtonProps>>;
6
- declare const Secondary: import('@storybook/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, PropsWithChildren<IButtonProps>>;
7
- declare const Ghost: import('@storybook/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, PropsWithChildren<IButtonProps>>;
8
- declare const Link: import('@storybook/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, PropsWithChildren<IButtonProps>>;
9
- export { Default, Secondary, Ghost, Link };
10
- export default config;
@@ -1,10 +0,0 @@
1
- import { Meta } from '@storybook/react';
2
- import { PropsWithChildren } from 'react';
3
- import { IButtonProps } from '..';
4
- declare const config: Meta;
5
- declare const Default: import('@storybook/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, PropsWithChildren<IButtonProps>>;
6
- declare const Secondary: import('@storybook/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, PropsWithChildren<IButtonProps>>;
7
- declare const Tertiary: import('@storybook/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, PropsWithChildren<IButtonProps>>;
8
- declare const Ghost: import('@storybook/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, PropsWithChildren<IButtonProps>>;
9
- export { Default, Secondary, Tertiary, Ghost };
10
- export default config;
@@ -1,7 +0,0 @@
1
- import { Meta, StoryFn } from '@storybook/react';
2
- import { IContainerProps } from './types';
3
- declare const config: Meta;
4
- declare const Default: import('@storybook/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('react').PropsWithChildren<IContainerProps>>;
5
- declare const FlexBox: StoryFn;
6
- export { Default, FlexBox };
7
- export default config;
@@ -1,17 +0,0 @@
1
- import { Meta } from '@storybook/react';
2
- declare const config: Meta;
3
- declare const PlatformLayout: () => JSX.Element;
4
- declare const Large: import('@storybook/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, {
5
- columns: number;
6
- }>;
7
- declare const Medium: import('@storybook/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, {
8
- columns: number;
9
- }>;
10
- declare const Tablet: import('@storybook/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, {
11
- columns: number;
12
- }>;
13
- declare const Mobile: import('@storybook/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, {
14
- columns: number;
15
- }>;
16
- export { PlatformLayout, Large, Medium, Tablet, Mobile };
17
- export default config;
@@ -1,8 +0,0 @@
1
- import { Meta } from '@storybook/react';
2
- import { ILangSelectorProps } from './types';
3
- declare const config: Meta;
4
- declare const Default: import('@storybook/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, ILangSelectorProps>;
5
- declare const FullLanguage: import('@storybook/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, ILangSelectorProps>;
6
- declare const DarkMode: import('@storybook/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, ILangSelectorProps>;
7
- export { Default, FullLanguage, DarkMode };
8
- export default config;
@@ -1,6 +0,0 @@
1
- import { Meta } from '@storybook/react';
2
- import { IMessageBannerProps } from './types';
3
- declare const config: Meta;
4
- declare const Default: import('@storybook/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, IMessageBannerProps>;
5
- export default config;
6
- export { Default };
@@ -1,7 +0,0 @@
1
- import { Meta } from '@storybook/react';
2
- import { ISearchBarProps } from './types';
3
- declare const config: Meta;
4
- declare const Default: import('@storybook/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, ISearchBarProps>;
5
- declare const EmptyState: import('@storybook/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, ISearchBarProps>;
6
- export { Default, EmptyState };
7
- export default config;
@@ -1,6 +0,0 @@
1
- import { Meta } from '@storybook/react';
2
- import { IItemSearchingProps } from '../types';
3
- declare const config: Meta;
4
- declare const Default: import('@storybook/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, IItemSearchingProps>;
5
- export { Default };
6
- export default config;
@@ -1,6 +0,0 @@
1
- import { Meta } from '@storybook/react';
2
- import { IToggleButtonProps } from './types';
3
- declare const config: Meta;
4
- declare const Default: import('@storybook/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, IToggleButtonProps>;
5
- export { Default };
6
- export default config;
@@ -1,8 +0,0 @@
1
- import { Meta } from '@storybook/react';
2
- import { ITooltipProps } from './types';
3
- declare const config: Meta;
4
- declare const Default: import('@storybook/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, ITooltipProps>;
5
- declare const TitleTooltip: import('@storybook/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, ITooltipProps>;
6
- declare const IconTooltip: import('@storybook/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, ITooltipProps>;
7
- export { Default, TitleTooltip, IconTooltip };
8
- export default config;