@fluidattacks/design 1.2.7 → 1.2.8

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.
@@ -1,3 +1,4 @@
1
+ import { IconName } from '@fortawesome/free-solid-svg-icons';
1
2
  import { Property } from 'csstype';
2
3
  type ColorGradient = "01" | "02";
3
4
  type ColorPalette = "25" | "50" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900";
@@ -81,6 +82,7 @@ interface DefaultTheme {
81
82
  }
82
83
  type TSpacing = keyof DefaultTheme["spacing"];
83
84
  type TShadows = keyof DefaultTheme["shadows"];
85
+ type TIconSize = "xl" | "lg" | "md" | "sm" | "xs";
84
86
  interface IPaddingModifiable {
85
87
  padding?: [TSpacing, TSpacing, TSpacing, TSpacing];
86
88
  px?: TSpacing;
@@ -116,6 +118,11 @@ interface IBorderModifiable {
116
118
  borderColor?: string;
117
119
  borderRadius?: string;
118
120
  }
121
+ interface IIconModifiable {
122
+ icon: IconName;
123
+ iconColor?: string;
124
+ iconSize: TIconSize;
125
+ }
119
126
  interface IDisplayModifiable {
120
127
  scroll?: "none" | "x" | "xy" | "y";
121
128
  visibility?: Property.Visibility;
@@ -160,4 +167,4 @@ interface IInteractionModifiable {
160
167
  shadowHover?: TShadows;
161
168
  }
162
169
  type TModifiable = IBorderModifiable & IDisplayModifiable & IInteractionModifiable & IMarginModifiable & IPaddingModifiable & IPositionModifiable & ITextModifiable;
163
- export type { DefaultTheme as ThemeType, TSpacing, IPaddingModifiable, IMarginModifiable, IDisplayModifiable, ITextModifiable, IInteractionModifiable, IPositionModifiable, IBorderModifiable, TModifiable, };
170
+ export type { DefaultTheme as ThemeType, TSpacing, IPaddingModifiable, IMarginModifiable, IDisplayModifiable, IIconModifiable, ITextModifiable, IInteractionModifiable, IPositionModifiable, IBorderModifiable, TIconSize, TModifiable, };
@@ -0,0 +1,5 @@
1
+ import { Meta } from '@storybook/react';
2
+ declare const config: Meta;
3
+ declare const Layout: () => JSX.Element;
4
+ export { Layout };
5
+ export default config;
@@ -0,0 +1,5 @@
1
+ declare const Grid: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
2
+ declare const GridSidebar: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
3
+ declare const GridContent: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
4
+ declare const DebugContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
5
+ export { Grid, GridSidebar, GridContent, DebugContainer };
@@ -1,11 +1,11 @@
1
1
  import { IIconWrapProps } from './types';
2
2
  interface IStyledIconWrapProps {
3
3
  $clickable?: IIconWrapProps["clickable"];
4
- $color?: IIconWrapProps["color"];
4
+ $color?: IIconWrapProps["iconColor"];
5
5
  $hoverColor?: IIconWrapProps["hoverColor"];
6
6
  $disabled?: IIconWrapProps["disabled"];
7
7
  $rotation?: IIconWrapProps["rotation"];
8
- $size: IIconWrapProps["size"];
8
+ $size: IIconWrapProps["iconSize"];
9
9
  }
10
10
  declare const IconWrap: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<Omit<import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, 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"> & {
11
11
  ref?: ((instance: HTMLSpanElement | null) => void) | import('react').RefObject<HTMLSpanElement> | null | undefined;
@@ -1,7 +1,5 @@
1
- import { IconName } from '@fortawesome/free-solid-svg-icons';
2
1
  import { MouseEventHandler } from 'react';
3
- import { IMarginModifiable } from '../@core';
4
- type TSize = "xl" | "lg" | "md" | "sm" | "xs";
2
+ import { IIconModifiable, IMarginModifiable } from '../@core';
5
3
  type TIconType = "fa-brands" | "fa-light" | "fa-regular" | "fa-solid";
6
4
  /**
7
5
  * Icon Wrapper component props.
@@ -14,14 +12,12 @@ type TIconType = "fa-brands" | "fa-light" | "fa-regular" | "fa-solid";
14
12
  * @property {number} [rotation] Rotation degrees to modify icon style.
15
13
  * @property {TSize} size The icon size.
16
14
  */
17
- interface IIconWrapProps extends IMarginModifiable {
15
+ interface IIconWrapProps extends IIconModifiable, IMarginModifiable {
18
16
  clickable?: boolean;
19
- color?: string;
20
17
  hoverColor?: string;
21
18
  onClick?: MouseEventHandler<HTMLSpanElement>;
22
19
  disabled?: boolean;
23
20
  rotation?: number;
24
- size: TSize;
25
21
  }
26
22
  /**
27
23
  * Icon component props.
@@ -32,7 +28,6 @@ interface IIconWrapProps extends IMarginModifiable {
32
28
  */
33
29
  interface IIconProps extends IIconWrapProps {
34
30
  iconClass?: string;
35
- icon: IconName;
36
31
  iconType?: TIconType;
37
32
  }
38
- export type { IIconProps, IIconWrapProps, TSize, TIconType };
33
+ export type { IIconProps, IIconWrapProps, TIconType };
@@ -0,0 +1,4 @@
1
+ import { PropsWithChildren } from 'react';
2
+ import { ITooltipProps } from './types';
3
+ declare const Tooltip: import('react').ForwardRefExoticComponent<Readonly<PropsWithChildren<ITooltipProps>> & import('react').RefAttributes<HTMLDivElement>>;
4
+ export { Tooltip };
@@ -0,0 +1,8 @@
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;
@@ -0,0 +1,7 @@
1
+ declare const TooltipBox: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<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"> & {
2
+ ref?: ((instance: HTMLDivElement | null) => void) | import('react').RefObject<HTMLDivElement> | null | undefined;
3
+ }, never>> & string;
4
+ declare const StyledTooltip: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
5
+ $maxWidth?: string;
6
+ }>> & string;
7
+ export { TooltipBox, StyledTooltip };
@@ -0,0 +1,28 @@
1
+ import { ReactNode } from 'react';
2
+ import { IDisplayModifiable, IIconModifiable } from '../@core';
3
+ type TPlace = "bottom" | "left" | "right" | "top";
4
+ type TEffect = "float" | "solid";
5
+ /**
6
+ * Tooltip component props
7
+ * @extends IIconModifiable
8
+ * @extends IDisplayModifiable
9
+ * @property {boolean} [disabled] If the tooltip icon is disabled.
10
+ * @property {TEffect} [effect] Tooltip visual effect.
11
+ * @property {boolean} [hide] If the tooltip has a hideout event.
12
+ * @property {string} [id] The tooltip id, required for it to work.
13
+ * @property {ReactNode} [nodeTip] The tooltip content when is not plain text.
14
+ * @property {TPlace} [place] Where to locate the tooltip from parent node.
15
+ * @property {string} [tip] The tooltip content, only as string.
16
+ * @property {title} [title] The tooltip title.
17
+ */
18
+ interface ITooltipProps extends IIconModifiable, Pick<IDisplayModifiable, "display" | "height" | "maxWidth" | "width"> {
19
+ disabled?: boolean;
20
+ effect?: TEffect;
21
+ hide?: boolean;
22
+ id?: string;
23
+ nodeTip?: ReactNode;
24
+ place?: TPlace;
25
+ tip?: string;
26
+ title?: string;
27
+ }
28
+ export type { ITooltipProps, TPlace };
@@ -1,6 +1,6 @@
1
1
  import { Property } from 'csstype';
2
- import { IMarginModifiable, IPaddingModifiable, ITextModifiable } from '../@core';
3
2
  import { DefaultTheme } from 'styled-components';
3
+ import { IMarginModifiable, IPaddingModifiable, ITextModifiable } from '../@core';
4
4
  type TSize = keyof DefaultTheme["typography"]["heading"];
5
5
  /**
6
6
  * Typography component props.
@@ -4,4 +4,5 @@ export * from './components/colors';
4
4
  export * from './components/container';
5
5
  export * from './components/icon';
6
6
  export * from './components/logo';
7
+ export * from './components/tooltip';
7
8
  export * from './components/typography';
package/package.json CHANGED
@@ -7,10 +7,12 @@
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",
10
11
  "@fortawesome/free-solid-svg-icons": "6.6.0",
11
12
  "@fortawesome/react-fontawesome": "0.2.2",
12
13
  "react": "18.2.0",
13
14
  "react-dom": "18.2.0",
15
+ "react-tooltip": "5.28.0",
14
16
  "styled-components": "6.1.13"
15
17
  },
16
18
  "devDependencies": {
@@ -24,9 +26,11 @@
24
26
  "@types/react": "18.2.0",
25
27
  "@types/react-dom": "18.2.0",
26
28
  "@vitejs/plugin-react-swc": "3.7.1",
27
- "eslint": "9.11.1",
29
+ "eslint": "9.12.0",
28
30
  "eslint-config-prettier": "9.1.0",
31
+ "eslint-import-resolver-typescript": "3.6.3",
29
32
  "eslint-plugin-functional": "7.0.2",
33
+ "eslint-plugin-import": "2.31.0",
30
34
  "eslint-plugin-jsdoc": "50.3.1",
31
35
  "eslint-plugin-jsx-a11y": "6.10.0",
32
36
  "eslint-plugin-prettier": "5.2.1",
@@ -70,7 +74,7 @@
70
74
  "preview": "vite preview",
71
75
  "storybook": "storybook dev"
72
76
  },
73
- "version": "1.2.7",
77
+ "version": "1.2.8",
74
78
  "eslintConfig": {
75
79
  "extends": [
76
80
  "plugin:storybook/recommended"