@fluidattacks/design 1.2.5 → 1.2.7
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 +129 -71
- package/dist/design.mjs +2120 -1926
- package/dist/src/components/@core/styles.d.ts +2 -1
- package/dist/src/components/@core/types.d.ts +1 -0
- 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/icon/index.d.ts +3 -0
- package/dist/src/components/icon/styles.d.ts +14 -0
- package/dist/src/components/icon/types.d.ts +38 -0
- package/dist/src/index.d.ts +2 -0
- package/package.json +21 -3
- 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 };
|
|
@@ -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,14 @@
|
|
|
1
|
+
import { IIconWrapProps } from './types';
|
|
2
|
+
interface IStyledIconWrapProps {
|
|
3
|
+
$clickable?: IIconWrapProps["clickable"];
|
|
4
|
+
$color?: IIconWrapProps["color"];
|
|
5
|
+
$hoverColor?: IIconWrapProps["hoverColor"];
|
|
6
|
+
$disabled?: IIconWrapProps["disabled"];
|
|
7
|
+
$rotation?: IIconWrapProps["rotation"];
|
|
8
|
+
$size: IIconWrapProps["size"];
|
|
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,38 @@
|
|
|
1
|
+
import { IconName } from '@fortawesome/free-solid-svg-icons';
|
|
2
|
+
import { MouseEventHandler } from 'react';
|
|
3
|
+
import { IMarginModifiable } from '../@core';
|
|
4
|
+
type TSize = "xl" | "lg" | "md" | "sm" | "xs";
|
|
5
|
+
type TIconType = "fa-brands" | "fa-light" | "fa-regular" | "fa-solid";
|
|
6
|
+
/**
|
|
7
|
+
* Icon Wrapper component props.
|
|
8
|
+
* @extends IMarginModifiable
|
|
9
|
+
* @property {boolean} [clickable] Defines the cursor to show on icon hover.
|
|
10
|
+
* @property {string} [color] The icon color.
|
|
11
|
+
* @property {string} [hoverColor] The icon color onn hover.
|
|
12
|
+
* @property {Function} [onClick] Function handler for click event.
|
|
13
|
+
* @property {boolean} [disabled] Show disabled icon state.
|
|
14
|
+
* @property {number} [rotation] Rotation degrees to modify icon style.
|
|
15
|
+
* @property {TSize} size The icon size.
|
|
16
|
+
*/
|
|
17
|
+
interface IIconWrapProps extends IMarginModifiable {
|
|
18
|
+
clickable?: boolean;
|
|
19
|
+
color?: string;
|
|
20
|
+
hoverColor?: string;
|
|
21
|
+
onClick?: MouseEventHandler<HTMLSpanElement>;
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
rotation?: number;
|
|
24
|
+
size: TSize;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Icon component props.
|
|
28
|
+
* @extends IIconWrapProps
|
|
29
|
+
* @property {string} [iconClass] The icon class from fontawesome.
|
|
30
|
+
* @property {IconName} icon The icon name coming from fontawesome.
|
|
31
|
+
* @property {TIconType} iconType The icon type.
|
|
32
|
+
*/
|
|
33
|
+
interface IIconProps extends IIconWrapProps {
|
|
34
|
+
iconClass?: string;
|
|
35
|
+
icon: IconName;
|
|
36
|
+
iconType?: TIconType;
|
|
37
|
+
}
|
|
38
|
+
export type { IIconProps, IIconWrapProps, TSize, TIconType };
|
package/dist/src/index.d.ts
CHANGED
|
@@ -2,4 +2,6 @@ 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/typography';
|
package/package.json
CHANGED
|
@@ -8,22 +8,33 @@
|
|
|
8
8
|
"@cloudinary/react": "1.13.0",
|
|
9
9
|
"@cloudinary/url-gen": "1.21.0",
|
|
10
10
|
"@fortawesome/free-solid-svg-icons": "6.6.0",
|
|
11
|
+
"@fortawesome/react-fontawesome": "0.2.2",
|
|
11
12
|
"react": "18.2.0",
|
|
12
13
|
"react-dom": "18.2.0",
|
|
13
14
|
"styled-components": "6.1.13"
|
|
14
15
|
},
|
|
15
16
|
"devDependencies": {
|
|
17
|
+
"@storybook/addon-essentials": "8.3.5",
|
|
18
|
+
"@storybook/addon-interactions": "8.3.5",
|
|
19
|
+
"@storybook/addon-links": "8.3.5",
|
|
20
|
+
"@storybook/blocks": "8.3.5",
|
|
21
|
+
"@storybook/react": "8.3.5",
|
|
22
|
+
"@storybook/react-vite": "8.3.5",
|
|
23
|
+
"@storybook/test": "8.3.5",
|
|
16
24
|
"@types/react": "18.2.0",
|
|
17
25
|
"@types/react-dom": "18.2.0",
|
|
18
26
|
"@vitejs/plugin-react-swc": "3.7.1",
|
|
19
27
|
"eslint": "9.11.1",
|
|
20
28
|
"eslint-config-prettier": "9.1.0",
|
|
21
29
|
"eslint-plugin-functional": "7.0.2",
|
|
30
|
+
"eslint-plugin-jsdoc": "50.3.1",
|
|
22
31
|
"eslint-plugin-jsx-a11y": "6.10.0",
|
|
23
32
|
"eslint-plugin-prettier": "5.2.1",
|
|
24
33
|
"eslint-plugin-project-structure": "3.0.1",
|
|
25
34
|
"eslint-plugin-react": "7.37.0",
|
|
26
35
|
"postcss-styled-syntax": "0.6.4",
|
|
36
|
+
"remark-gfm": "4.0.0",
|
|
37
|
+
"storybook": "8.3.5",
|
|
27
38
|
"stylelint": "16.9.0",
|
|
28
39
|
"stylelint-config-standard": "36.0.1",
|
|
29
40
|
"typescript": "5.6.2",
|
|
@@ -53,9 +64,16 @@
|
|
|
53
64
|
"url": "git+https://gitlab.com/fluidattacks/universe.git"
|
|
54
65
|
},
|
|
55
66
|
"scripts": {
|
|
56
|
-
"dev": "vite",
|
|
57
67
|
"build": "tsc && vite build",
|
|
58
|
-
"
|
|
68
|
+
"build-storybook": "storybook build",
|
|
69
|
+
"dev": "vite",
|
|
70
|
+
"preview": "vite preview",
|
|
71
|
+
"storybook": "storybook dev"
|
|
59
72
|
},
|
|
60
|
-
"version": "1.2.
|
|
73
|
+
"version": "1.2.7",
|
|
74
|
+
"eslintConfig": {
|
|
75
|
+
"extends": [
|
|
76
|
+
"plugin:storybook/recommended"
|
|
77
|
+
]
|
|
78
|
+
}
|
|
61
79
|
}
|