@fluidattacks/design 1.2.6 → 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.
- package/dist/design.js +143 -86
- package/dist/design.mjs +4560 -2784
- package/dist/src/components/@core/styles.d.ts +2 -1
- package/dist/src/components/@core/types.d.ts +9 -1
- package/dist/src/components/container/index.stories.d.ts +7 -0
- package/dist/src/components/container/types.d.ts +1 -1
- package/dist/src/components/grid-layout/index.stories.d.ts +5 -0
- package/dist/src/components/grid-layout/styles.d.ts +5 -0
- package/dist/src/components/icon/index.d.ts +3 -0
- package/dist/src/components/icon/styles.d.ts +14 -0
- package/dist/src/components/icon/types.d.ts +33 -0
- package/dist/src/components/tooltip/index.d.ts +4 -0
- package/dist/src/components/tooltip/index.stories.d.ts +8 -0
- package/dist/src/components/tooltip/styles.d.ts +7 -0
- package/dist/src/components/tooltip/types.d.ts +28 -0
- package/dist/src/components/typography/types.d.ts +1 -1
- package/dist/src/index.d.ts +2 -0
- package/package.json +26 -4
- package/dist/design.js.map +0 -1
- package/dist/design.mjs.map +0 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { TModifiable } from './types';
|
|
2
2
|
declare const BaseComponent: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, TModifiable>> & string;
|
|
3
3
|
declare const BaseTextComponent: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, TModifiable>> & string;
|
|
4
|
-
|
|
4
|
+
declare const BaseSpanComponent: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, TModifiable>> & string;
|
|
5
|
+
export { BaseComponent, BaseTextComponent, BaseSpanComponent };
|
|
@@ -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";
|
|
@@ -29,6 +30,7 @@ interface DefaultTheme {
|
|
|
29
30
|
3: "3rem";
|
|
30
31
|
3.5: "3.5rem";
|
|
31
32
|
4: "4rem";
|
|
33
|
+
4.5: "4.5rem";
|
|
32
34
|
5: "5rem";
|
|
33
35
|
6: "6rem";
|
|
34
36
|
};
|
|
@@ -80,6 +82,7 @@ interface DefaultTheme {
|
|
|
80
82
|
}
|
|
81
83
|
type TSpacing = keyof DefaultTheme["spacing"];
|
|
82
84
|
type TShadows = keyof DefaultTheme["shadows"];
|
|
85
|
+
type TIconSize = "xl" | "lg" | "md" | "sm" | "xs";
|
|
83
86
|
interface IPaddingModifiable {
|
|
84
87
|
padding?: [TSpacing, TSpacing, TSpacing, TSpacing];
|
|
85
88
|
px?: TSpacing;
|
|
@@ -115,6 +118,11 @@ interface IBorderModifiable {
|
|
|
115
118
|
borderColor?: string;
|
|
116
119
|
borderRadius?: string;
|
|
117
120
|
}
|
|
121
|
+
interface IIconModifiable {
|
|
122
|
+
icon: IconName;
|
|
123
|
+
iconColor?: string;
|
|
124
|
+
iconSize: TIconSize;
|
|
125
|
+
}
|
|
118
126
|
interface IDisplayModifiable {
|
|
119
127
|
scroll?: "none" | "x" | "xy" | "y";
|
|
120
128
|
visibility?: Property.Visibility;
|
|
@@ -159,4 +167,4 @@ interface IInteractionModifiable {
|
|
|
159
167
|
shadowHover?: TShadows;
|
|
160
168
|
}
|
|
161
169
|
type TModifiable = IBorderModifiable & IDisplayModifiable & IInteractionModifiable & IMarginModifiable & IPaddingModifiable & IPositionModifiable & ITextModifiable;
|
|
162
|
-
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,7 @@
|
|
|
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;
|
|
@@ -8,7 +8,7 @@ type THtmlTag = keyof ReactHTML;
|
|
|
8
8
|
* @property {THtmlTag} [as] The react html tag to represent.
|
|
9
9
|
* @property {boolean} [center] Whether to center the content.
|
|
10
10
|
* @property {Function} [onHover] Function handler for hover event.
|
|
11
|
-
* @property {Function} [onLeave] Function handler for
|
|
11
|
+
* @property {Function} [onLeave] Function handler for leave event.
|
|
12
12
|
*/
|
|
13
13
|
interface IContainerProps extends TModifiable, HTMLAttributes<HTMLDivElement> {
|
|
14
14
|
as?: THtmlTag;
|
|
@@ -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 };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IIconWrapProps } from './types';
|
|
2
|
+
interface IStyledIconWrapProps {
|
|
3
|
+
$clickable?: IIconWrapProps["clickable"];
|
|
4
|
+
$color?: IIconWrapProps["iconColor"];
|
|
5
|
+
$hoverColor?: IIconWrapProps["hoverColor"];
|
|
6
|
+
$disabled?: IIconWrapProps["disabled"];
|
|
7
|
+
$rotation?: IIconWrapProps["rotation"];
|
|
8
|
+
$size: IIconWrapProps["iconSize"];
|
|
9
|
+
}
|
|
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
|
+
ref?: ((instance: HTMLSpanElement | null) => void) | import('react').RefObject<HTMLSpanElement> | null | undefined;
|
|
12
|
+
}, IStyledIconWrapProps>> & string;
|
|
13
|
+
declare const IconInGalleryWrap: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
14
|
+
export { IconWrap, IconInGalleryWrap };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { MouseEventHandler } from 'react';
|
|
2
|
+
import { IIconModifiable, IMarginModifiable } from '../@core';
|
|
3
|
+
type TIconType = "fa-brands" | "fa-light" | "fa-regular" | "fa-solid";
|
|
4
|
+
/**
|
|
5
|
+
* Icon Wrapper component props.
|
|
6
|
+
* @extends IMarginModifiable
|
|
7
|
+
* @property {boolean} [clickable] Defines the cursor to show on icon hover.
|
|
8
|
+
* @property {string} [color] The icon color.
|
|
9
|
+
* @property {string} [hoverColor] The icon color onn hover.
|
|
10
|
+
* @property {Function} [onClick] Function handler for click event.
|
|
11
|
+
* @property {boolean} [disabled] Show disabled icon state.
|
|
12
|
+
* @property {number} [rotation] Rotation degrees to modify icon style.
|
|
13
|
+
* @property {TSize} size The icon size.
|
|
14
|
+
*/
|
|
15
|
+
interface IIconWrapProps extends IIconModifiable, IMarginModifiable {
|
|
16
|
+
clickable?: boolean;
|
|
17
|
+
hoverColor?: string;
|
|
18
|
+
onClick?: MouseEventHandler<HTMLSpanElement>;
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
rotation?: number;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Icon component props.
|
|
24
|
+
* @extends IIconWrapProps
|
|
25
|
+
* @property {string} [iconClass] The icon class from fontawesome.
|
|
26
|
+
* @property {IconName} icon The icon name coming from fontawesome.
|
|
27
|
+
* @property {TIconType} iconType The icon type.
|
|
28
|
+
*/
|
|
29
|
+
interface IIconProps extends IIconWrapProps {
|
|
30
|
+
iconClass?: string;
|
|
31
|
+
iconType?: TIconType;
|
|
32
|
+
}
|
|
33
|
+
export type { IIconProps, IIconWrapProps, TIconType };
|
|
@@ -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.
|
package/dist/src/index.d.ts
CHANGED
|
@@ -2,5 +2,7 @@ export * from './components/@core';
|
|
|
2
2
|
export * from './components/cloud-image';
|
|
3
3
|
export * from './components/colors';
|
|
4
4
|
export * from './components/container';
|
|
5
|
+
export * from './components/icon';
|
|
5
6
|
export * from './components/logo';
|
|
7
|
+
export * from './components/tooltip';
|
|
6
8
|
export * from './components/typography';
|
package/package.json
CHANGED
|
@@ -7,23 +7,38 @@
|
|
|
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",
|
|
12
|
+
"@fortawesome/react-fontawesome": "0.2.2",
|
|
11
13
|
"react": "18.2.0",
|
|
12
14
|
"react-dom": "18.2.0",
|
|
15
|
+
"react-tooltip": "5.28.0",
|
|
13
16
|
"styled-components": "6.1.13"
|
|
14
17
|
},
|
|
15
18
|
"devDependencies": {
|
|
19
|
+
"@storybook/addon-essentials": "8.3.5",
|
|
20
|
+
"@storybook/addon-interactions": "8.3.5",
|
|
21
|
+
"@storybook/addon-links": "8.3.5",
|
|
22
|
+
"@storybook/blocks": "8.3.5",
|
|
23
|
+
"@storybook/react": "8.3.5",
|
|
24
|
+
"@storybook/react-vite": "8.3.5",
|
|
25
|
+
"@storybook/test": "8.3.5",
|
|
16
26
|
"@types/react": "18.2.0",
|
|
17
27
|
"@types/react-dom": "18.2.0",
|
|
18
28
|
"@vitejs/plugin-react-swc": "3.7.1",
|
|
19
|
-
"eslint": "9.
|
|
29
|
+
"eslint": "9.12.0",
|
|
20
30
|
"eslint-config-prettier": "9.1.0",
|
|
31
|
+
"eslint-import-resolver-typescript": "3.6.3",
|
|
21
32
|
"eslint-plugin-functional": "7.0.2",
|
|
33
|
+
"eslint-plugin-import": "2.31.0",
|
|
34
|
+
"eslint-plugin-jsdoc": "50.3.1",
|
|
22
35
|
"eslint-plugin-jsx-a11y": "6.10.0",
|
|
23
36
|
"eslint-plugin-prettier": "5.2.1",
|
|
24
37
|
"eslint-plugin-project-structure": "3.0.1",
|
|
25
38
|
"eslint-plugin-react": "7.37.0",
|
|
26
39
|
"postcss-styled-syntax": "0.6.4",
|
|
40
|
+
"remark-gfm": "4.0.0",
|
|
41
|
+
"storybook": "8.3.5",
|
|
27
42
|
"stylelint": "16.9.0",
|
|
28
43
|
"stylelint-config-standard": "36.0.1",
|
|
29
44
|
"typescript": "5.6.2",
|
|
@@ -53,9 +68,16 @@
|
|
|
53
68
|
"url": "git+https://gitlab.com/fluidattacks/universe.git"
|
|
54
69
|
},
|
|
55
70
|
"scripts": {
|
|
56
|
-
"dev": "vite",
|
|
57
71
|
"build": "tsc && vite build",
|
|
58
|
-
"
|
|
72
|
+
"build-storybook": "storybook build",
|
|
73
|
+
"dev": "vite",
|
|
74
|
+
"preview": "vite preview",
|
|
75
|
+
"storybook": "storybook dev"
|
|
59
76
|
},
|
|
60
|
-
"version": "1.2.
|
|
77
|
+
"version": "1.2.8",
|
|
78
|
+
"eslintConfig": {
|
|
79
|
+
"extends": [
|
|
80
|
+
"plugin:storybook/recommended"
|
|
81
|
+
]
|
|
82
|
+
}
|
|
61
83
|
}
|