@fluidattacks/design 1.2.3 → 1.2.4-pr-0.1

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,5 +1,82 @@
1
1
  import { Property } from 'csstype';
2
- import { DefaultTheme } from 'styled-components';
2
+ type ColorPalette = "25" | "50" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900";
3
+ /**
4
+ * Fluidattacks Default theme design
5
+ */
6
+ interface DefaultTheme {
7
+ breakpoints: {
8
+ mobile: string;
9
+ tablet: string;
10
+ sm: string;
11
+ md: string;
12
+ lg: string;
13
+ };
14
+ spacing: {
15
+ 0: "0rem";
16
+ 0.125: "0.125rem";
17
+ 0.25: "0.25rem";
18
+ 0.5: "0.5rem";
19
+ 0.625: "0.625rem";
20
+ 0.75: "0.75rem";
21
+ 1: "1rem";
22
+ 1.25: "1.25rem";
23
+ 1.5: "1.5rem";
24
+ 1.75: "1.75rem";
25
+ 2: "2rem";
26
+ 2.25: "2.25rem";
27
+ 2.5: "2.5rem";
28
+ 3: "3rem";
29
+ 3.5: "3.5rem";
30
+ 4: "4rem";
31
+ 5: "5rem";
32
+ 6: "6rem";
33
+ };
34
+ typography: {
35
+ type: {
36
+ primary: string;
37
+ poppins: string;
38
+ mono: string;
39
+ };
40
+ heading: {
41
+ xxl: string;
42
+ xl: string;
43
+ lg: string;
44
+ md: string;
45
+ sm: string;
46
+ xs: string;
47
+ };
48
+ text: {
49
+ xl: string;
50
+ lg: string;
51
+ md: string;
52
+ sm: string;
53
+ xs: string;
54
+ };
55
+ weight: {
56
+ bold: string;
57
+ semibold: string;
58
+ regular: string;
59
+ };
60
+ };
61
+ shadows: {
62
+ none: string;
63
+ sm: string;
64
+ md: string;
65
+ lg: string;
66
+ };
67
+ palette: {
68
+ primary: Record<ColorPalette, string>;
69
+ complementary: Record<ColorPalette, string>;
70
+ error: Record<ColorPalette, string>;
71
+ info: Record<ColorPalette, string>;
72
+ warning: Record<ColorPalette, string>;
73
+ success: Record<ColorPalette, string>;
74
+ gray: Record<ColorPalette, string>;
75
+ black: string;
76
+ white: string;
77
+ gradients: Record<string, string>;
78
+ };
79
+ }
3
80
  type TSpacing = keyof DefaultTheme["spacing"];
4
81
  type TShadows = keyof DefaultTheme["shadows"];
5
82
  interface IPaddingModifiable {
@@ -77,4 +154,4 @@ interface IInteractionModifiable {
77
154
  shadowHover?: TShadows;
78
155
  }
79
156
  type TModifiable = IBorderModifiable & IDisplayModifiable & IInteractionModifiable & IMarginModifiable & IPaddingModifiable & IPositionModifiable & ITextModifiable;
80
- export type { TSpacing, IPaddingModifiable, IMarginModifiable, IDisplayModifiable, ITextModifiable, IInteractionModifiable, IPositionModifiable, IBorderModifiable, TModifiable, };
157
+ export type { DefaultTheme, TSpacing, IPaddingModifiable, IMarginModifiable, IDisplayModifiable, ITextModifiable, IInteractionModifiable, IPositionModifiable, IBorderModifiable, TModifiable, };
@@ -1,12 +1,5 @@
1
- import { Plugins } from '@cloudinary/html';
2
1
  import { default as React } from 'react';
3
- interface IImageProps {
4
- alt?: string;
5
- height?: number | string;
6
- publicId: string;
7
- width?: number | string;
8
- plugins?: Plugins;
9
- }
10
- declare const MemoizedImage: React.MemoExoticComponent<({ alt, height, publicId, width, plugins, }: Readonly<IImageProps>) => JSX.Element>;
2
+ import { IImageProps } from './types';
3
+ declare const MemoizedImage: React.MemoExoticComponent<({ alt, height, width, plugins, publicId, }: Readonly<IImageProps>) => JSX.Element>;
11
4
  export type { IImageProps };
12
5
  export { MemoizedImage as CloudImage };
@@ -0,0 +1,17 @@
1
+ import { Plugins } from '@cloudinary/html';
2
+ /**
3
+ * Cloud image component props.
4
+ * @property {string} [alt] The alternate text for an image.
5
+ * @property {number | string} [height] The height of the image.
6
+ * @property {number | string} [width] The width of the image.
7
+ * @property {Plugins} [plugins] A list of cloudinary plugins.
8
+ * @property {string} publicId The publicId location in cloudinary.
9
+ */
10
+ interface IImageProps {
11
+ alt?: string;
12
+ height?: number | string;
13
+ width?: number | string;
14
+ plugins?: Plugins;
15
+ publicId: string;
16
+ }
17
+ export type { IImageProps };
@@ -1,3 +1,4 @@
1
+ import { PropsWithChildren } from 'react';
1
2
  import { IContainerProps } from './types';
2
- declare const Container: import('react').ForwardRefExoticComponent<Readonly<IContainerProps> & import('react').RefAttributes<HTMLDivElement>>;
3
+ declare const Container: import('react').ForwardRefExoticComponent<Readonly<PropsWithChildren<IContainerProps>> & import('react').RefAttributes<HTMLDivElement>>;
3
4
  export { Container };
@@ -1,10 +1,18 @@
1
- import { ReactHTML } from 'react';
1
+ import { HTMLAttributes, ReactHTML } from 'react';
2
2
  import { TModifiable } from '../@core/types';
3
3
  type THtmlTag = keyof ReactHTML;
4
- interface IContainerProps extends TModifiable, React.HTMLAttributes<HTMLDivElement> {
4
+ /**
5
+ * Container component props.
6
+ * @extends TModifiable
7
+ * @extends HTMLAttributes<HTMLDivElement>
8
+ * @property {THtmlTag} [as] The react html tag to represent.
9
+ * @property {boolean} [center] Whether to center the content.
10
+ * @property {Function} [onHover] Function handler for hover event.
11
+ * @property {Function} [onLeave] Function handler for hover event.
12
+ */
13
+ interface IContainerProps extends TModifiable, HTMLAttributes<HTMLDivElement> {
5
14
  as?: THtmlTag;
6
15
  center?: boolean;
7
- children?: React.ReactNode;
8
16
  onHover?: () => void;
9
17
  onLeave?: () => void;
10
18
  }
@@ -1,3 +1,3 @@
1
1
  import { ILogoProps } from './types';
2
- declare const Logo: ({ src, variant }: ILogoProps) => JSX.Element;
2
+ declare const Logo: ({ publicId, variant }: Readonly<ILogoProps>) => JSX.Element;
3
3
  export { Logo };
@@ -1,6 +1,11 @@
1
1
  type TLogoVariant = "footer" | "header" | "icon";
2
+ /**
3
+ * Logo component props.
4
+ * @property {string} publicId The publicId location in cloudinary.
5
+ * @property {TLogoVariant} variant The different types of logo used.
6
+ */
2
7
  interface ILogoProps {
3
- readonly src: string;
4
- readonly variant: TLogoVariant;
8
+ publicId: string;
9
+ variant: TLogoVariant;
5
10
  }
6
11
  export type { ILogoProps, TLogoVariant };
@@ -1,4 +1,9 @@
1
1
  import { CloudinaryImage } from '@cloudinary/url-gen';
2
+ /**
3
+ * Cloudinary image hook props.
4
+ * @property {string} publicId The publicId location in cloudinary.
5
+ * @property {string} [format] The image format desired (e.g., png, jpg).
6
+ */
2
7
  interface IUseCloudinaryImageProps {
3
8
  readonly publicId: string;
4
9
  readonly format?: string;
package/package.json CHANGED
@@ -21,6 +21,7 @@
21
21
  "eslint-plugin-functional": "7.0.2",
22
22
  "eslint-plugin-jsx-a11y": "6.10.0",
23
23
  "eslint-plugin-prettier": "5.2.1",
24
+ "eslint-plugin-project-structure": "3.0.1",
24
25
  "eslint-plugin-react": "7.37.0",
25
26
  "postcss-styled-syntax": "0.6.4",
26
27
  "stylelint": "16.9.0",
@@ -56,5 +57,5 @@
56
57
  "build": "tsc && vite build",
57
58
  "preview": "vite preview"
58
59
  },
59
- "version": "1.2.3"
60
+ "version": "1.2.4-pr-0.1"
60
61
  }
@@ -1,2 +0,0 @@
1
- declare const _default: any[];
2
- export default _default;