@integrigo/integrigo-ui 1.6.18-d → 1.6.18-e

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.
@@ -3,11 +3,11 @@ import { ComponentStory, ComponentMeta } from '@storybook/react';
3
3
  declare const _default: ComponentMeta<React.FC<{
4
4
  src: string;
5
5
  alt: string;
6
- size?: "s" | "m" | "l" | "xl" | "xxl" | undefined;
6
+ size?: "xl" | "l" | "m" | "s" | "xxl" | undefined;
7
7
  }>>;
8
8
  export default _default;
9
9
  export declare const Basic: ComponentStory<React.FC<{
10
10
  src: string;
11
11
  alt: string;
12
- size?: "s" | "m" | "l" | "xl" | "xxl" | undefined;
12
+ size?: "xl" | "l" | "m" | "s" | "xxl" | undefined;
13
13
  }>>;
@@ -11,7 +11,7 @@ declare const _default: ComponentMeta<import("react").FCS<{
11
11
  children?: import("react").ReactNode;
12
12
  }) | undefined;
13
13
  children?: import("react").ReactNode;
14
- size?: "s" | "m" | "l" | "xl" | undefined;
14
+ size?: "xl" | "l" | "m" | "s" | undefined;
15
15
  }>>;
16
16
  export default _default;
17
17
  export declare const Icon: ComponentStory<import("react").FCS<{
@@ -25,7 +25,7 @@ export declare const Icon: ComponentStory<import("react").FCS<{
25
25
  children?: import("react").ReactNode;
26
26
  }) | undefined;
27
27
  children?: import("react").ReactNode;
28
- size?: "s" | "m" | "l" | "xl" | undefined;
28
+ size?: "xl" | "l" | "m" | "s" | undefined;
29
29
  }>>;
30
30
  export declare const Basic: ComponentStory<import("react").FCS<{
31
31
  icon?: (import("react").SVGProps<SVGSVGElement> & {
@@ -38,5 +38,5 @@ export declare const Basic: ComponentStory<import("react").FCS<{
38
38
  children?: import("react").ReactNode;
39
39
  }) | undefined;
40
40
  children?: import("react").ReactNode;
41
- size?: "s" | "m" | "l" | "xl" | undefined;
41
+ size?: "xl" | "l" | "m" | "s" | undefined;
42
42
  }>>;
@@ -1,6 +1,6 @@
1
1
  import { ComponentStory, ComponentMeta } from "@storybook/react";
2
2
  declare const _default: ComponentMeta<import("styled-components").StyledComponent<"div", any, {
3
- size?: "s" | "m" | "l" | "xl" | "xxl" | undefined;
3
+ size?: "xl" | "l" | "m" | "s" | "xxl" | undefined;
4
4
  width?: number | undefined;
5
5
  height?: number | undefined;
6
6
  variant?: number | undefined;
@@ -8,7 +8,7 @@ declare const _default: ComponentMeta<import("styled-components").StyledComponen
8
8
  }, never>>;
9
9
  export default _default;
10
10
  export declare const Basic: ComponentStory<import("styled-components").StyledComponent<"div", any, {
11
- size?: "s" | "m" | "l" | "xl" | "xxl" | undefined;
11
+ size?: "xl" | "l" | "m" | "s" | "xxl" | undefined;
12
12
  width?: number | undefined;
13
13
  height?: number | undefined;
14
14
  variant?: number | undefined;
@@ -2,10 +2,10 @@
2
2
  import { ComponentStory, ComponentMeta } from '@storybook/react';
3
3
  declare const _default: ComponentMeta<import("react").FC<{
4
4
  text: string;
5
- size?: "s" | "m" | "l" | "xl" | "xxl" | undefined;
5
+ size?: "xl" | "l" | "m" | "s" | "xxl" | undefined;
6
6
  }>>;
7
7
  export default _default;
8
8
  export declare const Basic: ComponentStory<import("react").FC<{
9
9
  text: string;
10
- size?: "s" | "m" | "l" | "xl" | "xxl" | undefined;
10
+ size?: "xl" | "l" | "m" | "s" | "xxl" | undefined;
11
11
  }>>;
@@ -1,19 +1,19 @@
1
1
  import React from 'react';
2
2
  import { ComponentStory, ComponentMeta } from '@storybook/react';
3
- declare const _default: ComponentMeta<React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "type"> & {
4
- size?: "s" | "m" | "l" | "xl" | undefined;
3
+ declare const _default: ComponentMeta<React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "type" | "size"> & {
4
+ size?: "xl" | "l" | "m" | "s" | undefined;
5
5
  label?: string | undefined;
6
6
  } & React.RefAttributes<HTMLInputElement>>>;
7
7
  export default _default;
8
- export declare const Basic: ComponentStory<React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "type"> & {
9
- size?: "s" | "m" | "l" | "xl" | undefined;
8
+ export declare const Basic: ComponentStory<React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "type" | "size"> & {
9
+ size?: "xl" | "l" | "m" | "s" | undefined;
10
10
  label?: string | undefined;
11
11
  } & React.RefAttributes<HTMLInputElement>>>;
12
- export declare const Controlled: ComponentStory<React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "type"> & {
13
- size?: "s" | "m" | "l" | "xl" | undefined;
12
+ export declare const Controlled: ComponentStory<React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "type" | "size"> & {
13
+ size?: "xl" | "l" | "m" | "s" | undefined;
14
14
  label?: string | undefined;
15
15
  } & React.RefAttributes<HTMLInputElement>>>;
16
- export declare const WithLabel: ComponentStory<React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "type"> & {
17
- size?: "s" | "m" | "l" | "xl" | undefined;
16
+ export declare const WithLabel: ComponentStory<React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "type" | "size"> & {
17
+ size?: "xl" | "l" | "m" | "s" | undefined;
18
18
  label?: string | undefined;
19
19
  } & React.RefAttributes<HTMLInputElement>>>;
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  import { IconType } from "../../atoms/Icon";
3
- export interface IconButtonProps {
3
+ export interface IconButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
4
4
  size?: "m" | "l";
5
5
  icon: IconType;
6
6
  }
@@ -4,7 +4,7 @@ declare const _default: ComponentMeta<React.ForwardRefExoticComponent<Omit<React
4
4
  label?: string | undefined;
5
5
  validationType?: import("../../../types/validation").ValidationType | undefined;
6
6
  icon?: "close" | "angle-down" | "arrow-circle-right" | "arrow-left" | "arrow-right" | "bars" | "bell" | "calendar" | "calendar-slash" | "check-circle" | "check-square" | "clipboad-notes" | "close-square" | "comment-dots" | "create-dashboard" | "dice-five" | "dice-one" | "edit" | "ellipsis-horizontal" | "ellipsis-vertical" | "envelope" | "exclamation-circle" | "exclamation-triangle" | "exit" | "eye" | "facebook" | "heart" | "heart-alt" | "home" | "hour-glass" | "image-edit" | "instagram" | "linkedin" | "lock" | "minus" | "phone" | "plus" | "points-circle" | "process" | "question-circle" | "redo" | "rocket" | "setting" | "user" | "user-circle" | "user-plus" | "users" | undefined;
7
- size?: "s" | "m" | "l" | "xl" | undefined;
7
+ size?: "xl" | "l" | "m" | "s" | undefined;
8
8
  direction?: "rtl" | "ltr" | undefined;
9
9
  onIconClick?: (() => void) | undefined;
10
10
  } & React.RefAttributes<HTMLInputElement>>>;
@@ -13,7 +13,7 @@ export declare const Basic: ComponentStory<React.ForwardRefExoticComponent<Omit<
13
13
  label?: string | undefined;
14
14
  validationType?: import("../../../types/validation").ValidationType | undefined;
15
15
  icon?: "close" | "angle-down" | "arrow-circle-right" | "arrow-left" | "arrow-right" | "bars" | "bell" | "calendar" | "calendar-slash" | "check-circle" | "check-square" | "clipboad-notes" | "close-square" | "comment-dots" | "create-dashboard" | "dice-five" | "dice-one" | "edit" | "ellipsis-horizontal" | "ellipsis-vertical" | "envelope" | "exclamation-circle" | "exclamation-triangle" | "exit" | "eye" | "facebook" | "heart" | "heart-alt" | "home" | "hour-glass" | "image-edit" | "instagram" | "linkedin" | "lock" | "minus" | "phone" | "plus" | "points-circle" | "process" | "question-circle" | "redo" | "rocket" | "setting" | "user" | "user-circle" | "user-plus" | "users" | undefined;
16
- size?: "s" | "m" | "l" | "xl" | undefined;
16
+ size?: "xl" | "l" | "m" | "s" | undefined;
17
17
  direction?: "rtl" | "ltr" | undefined;
18
18
  onIconClick?: (() => void) | undefined;
19
19
  } & React.RefAttributes<HTMLInputElement>>>;
@@ -21,7 +21,7 @@ export declare const Success: ComponentStory<React.ForwardRefExoticComponent<Omi
21
21
  label?: string | undefined;
22
22
  validationType?: import("../../../types/validation").ValidationType | undefined;
23
23
  icon?: "close" | "angle-down" | "arrow-circle-right" | "arrow-left" | "arrow-right" | "bars" | "bell" | "calendar" | "calendar-slash" | "check-circle" | "check-square" | "clipboad-notes" | "close-square" | "comment-dots" | "create-dashboard" | "dice-five" | "dice-one" | "edit" | "ellipsis-horizontal" | "ellipsis-vertical" | "envelope" | "exclamation-circle" | "exclamation-triangle" | "exit" | "eye" | "facebook" | "heart" | "heart-alt" | "home" | "hour-glass" | "image-edit" | "instagram" | "linkedin" | "lock" | "minus" | "phone" | "plus" | "points-circle" | "process" | "question-circle" | "redo" | "rocket" | "setting" | "user" | "user-circle" | "user-plus" | "users" | undefined;
24
- size?: "s" | "m" | "l" | "xl" | undefined;
24
+ size?: "xl" | "l" | "m" | "s" | undefined;
25
25
  direction?: "rtl" | "ltr" | undefined;
26
26
  onIconClick?: (() => void) | undefined;
27
27
  } & React.RefAttributes<HTMLInputElement>>>;
@@ -29,7 +29,7 @@ export declare const Error: ComponentStory<React.ForwardRefExoticComponent<Omit<
29
29
  label?: string | undefined;
30
30
  validationType?: import("../../../types/validation").ValidationType | undefined;
31
31
  icon?: "close" | "angle-down" | "arrow-circle-right" | "arrow-left" | "arrow-right" | "bars" | "bell" | "calendar" | "calendar-slash" | "check-circle" | "check-square" | "clipboad-notes" | "close-square" | "comment-dots" | "create-dashboard" | "dice-five" | "dice-one" | "edit" | "ellipsis-horizontal" | "ellipsis-vertical" | "envelope" | "exclamation-circle" | "exclamation-triangle" | "exit" | "eye" | "facebook" | "heart" | "heart-alt" | "home" | "hour-glass" | "image-edit" | "instagram" | "linkedin" | "lock" | "minus" | "phone" | "plus" | "points-circle" | "process" | "question-circle" | "redo" | "rocket" | "setting" | "user" | "user-circle" | "user-plus" | "users" | undefined;
32
- size?: "s" | "m" | "l" | "xl" | undefined;
32
+ size?: "xl" | "l" | "m" | "s" | undefined;
33
33
  direction?: "rtl" | "ltr" | undefined;
34
34
  onIconClick?: (() => void) | undefined;
35
35
  } & React.RefAttributes<HTMLInputElement>>>;
@@ -37,7 +37,7 @@ export declare const Disabled: ComponentStory<React.ForwardRefExoticComponent<Om
37
37
  label?: string | undefined;
38
38
  validationType?: import("../../../types/validation").ValidationType | undefined;
39
39
  icon?: "close" | "angle-down" | "arrow-circle-right" | "arrow-left" | "arrow-right" | "bars" | "bell" | "calendar" | "calendar-slash" | "check-circle" | "check-square" | "clipboad-notes" | "close-square" | "comment-dots" | "create-dashboard" | "dice-five" | "dice-one" | "edit" | "ellipsis-horizontal" | "ellipsis-vertical" | "envelope" | "exclamation-circle" | "exclamation-triangle" | "exit" | "eye" | "facebook" | "heart" | "heart-alt" | "home" | "hour-glass" | "image-edit" | "instagram" | "linkedin" | "lock" | "minus" | "phone" | "plus" | "points-circle" | "process" | "question-circle" | "redo" | "rocket" | "setting" | "user" | "user-circle" | "user-plus" | "users" | undefined;
40
- size?: "s" | "m" | "l" | "xl" | undefined;
40
+ size?: "xl" | "l" | "m" | "s" | undefined;
41
41
  direction?: "rtl" | "ltr" | undefined;
42
42
  onIconClick?: (() => void) | undefined;
43
43
  } & React.RefAttributes<HTMLInputElement>>>;
@@ -45,7 +45,7 @@ export declare const IconLTR: ComponentStory<React.ForwardRefExoticComponent<Omi
45
45
  label?: string | undefined;
46
46
  validationType?: import("../../../types/validation").ValidationType | undefined;
47
47
  icon?: "close" | "angle-down" | "arrow-circle-right" | "arrow-left" | "arrow-right" | "bars" | "bell" | "calendar" | "calendar-slash" | "check-circle" | "check-square" | "clipboad-notes" | "close-square" | "comment-dots" | "create-dashboard" | "dice-five" | "dice-one" | "edit" | "ellipsis-horizontal" | "ellipsis-vertical" | "envelope" | "exclamation-circle" | "exclamation-triangle" | "exit" | "eye" | "facebook" | "heart" | "heart-alt" | "home" | "hour-glass" | "image-edit" | "instagram" | "linkedin" | "lock" | "minus" | "phone" | "plus" | "points-circle" | "process" | "question-circle" | "redo" | "rocket" | "setting" | "user" | "user-circle" | "user-plus" | "users" | undefined;
48
- size?: "s" | "m" | "l" | "xl" | undefined;
48
+ size?: "xl" | "l" | "m" | "s" | undefined;
49
49
  direction?: "rtl" | "ltr" | undefined;
50
50
  onIconClick?: (() => void) | undefined;
51
51
  } & React.RefAttributes<HTMLInputElement>>>;
@@ -53,7 +53,7 @@ export declare const IconRTL: ComponentStory<React.ForwardRefExoticComponent<Omi
53
53
  label?: string | undefined;
54
54
  validationType?: import("../../../types/validation").ValidationType | undefined;
55
55
  icon?: "close" | "angle-down" | "arrow-circle-right" | "arrow-left" | "arrow-right" | "bars" | "bell" | "calendar" | "calendar-slash" | "check-circle" | "check-square" | "clipboad-notes" | "close-square" | "comment-dots" | "create-dashboard" | "dice-five" | "dice-one" | "edit" | "ellipsis-horizontal" | "ellipsis-vertical" | "envelope" | "exclamation-circle" | "exclamation-triangle" | "exit" | "eye" | "facebook" | "heart" | "heart-alt" | "home" | "hour-glass" | "image-edit" | "instagram" | "linkedin" | "lock" | "minus" | "phone" | "plus" | "points-circle" | "process" | "question-circle" | "redo" | "rocket" | "setting" | "user" | "user-circle" | "user-plus" | "users" | undefined;
56
- size?: "s" | "m" | "l" | "xl" | undefined;
56
+ size?: "xl" | "l" | "m" | "s" | undefined;
57
57
  direction?: "rtl" | "ltr" | undefined;
58
58
  onIconClick?: (() => void) | undefined;
59
59
  } & React.RefAttributes<HTMLInputElement>>>;
@@ -61,7 +61,7 @@ export declare const DisabledIcon: ComponentStory<React.ForwardRefExoticComponen
61
61
  label?: string | undefined;
62
62
  validationType?: import("../../../types/validation").ValidationType | undefined;
63
63
  icon?: "close" | "angle-down" | "arrow-circle-right" | "arrow-left" | "arrow-right" | "bars" | "bell" | "calendar" | "calendar-slash" | "check-circle" | "check-square" | "clipboad-notes" | "close-square" | "comment-dots" | "create-dashboard" | "dice-five" | "dice-one" | "edit" | "ellipsis-horizontal" | "ellipsis-vertical" | "envelope" | "exclamation-circle" | "exclamation-triangle" | "exit" | "eye" | "facebook" | "heart" | "heart-alt" | "home" | "hour-glass" | "image-edit" | "instagram" | "linkedin" | "lock" | "minus" | "phone" | "plus" | "points-circle" | "process" | "question-circle" | "redo" | "rocket" | "setting" | "user" | "user-circle" | "user-plus" | "users" | undefined;
64
- size?: "s" | "m" | "l" | "xl" | undefined;
64
+ size?: "xl" | "l" | "m" | "s" | undefined;
65
65
  direction?: "rtl" | "ltr" | undefined;
66
66
  onIconClick?: (() => void) | undefined;
67
67
  } & React.RefAttributes<HTMLInputElement>>>;
@@ -69,7 +69,7 @@ export declare const WithLabel: ComponentStory<React.ForwardRefExoticComponent<O
69
69
  label?: string | undefined;
70
70
  validationType?: import("../../../types/validation").ValidationType | undefined;
71
71
  icon?: "close" | "angle-down" | "arrow-circle-right" | "arrow-left" | "arrow-right" | "bars" | "bell" | "calendar" | "calendar-slash" | "check-circle" | "check-square" | "clipboad-notes" | "close-square" | "comment-dots" | "create-dashboard" | "dice-five" | "dice-one" | "edit" | "ellipsis-horizontal" | "ellipsis-vertical" | "envelope" | "exclamation-circle" | "exclamation-triangle" | "exit" | "eye" | "facebook" | "heart" | "heart-alt" | "home" | "hour-glass" | "image-edit" | "instagram" | "linkedin" | "lock" | "minus" | "phone" | "plus" | "points-circle" | "process" | "question-circle" | "redo" | "rocket" | "setting" | "user" | "user-circle" | "user-plus" | "users" | undefined;
72
- size?: "s" | "m" | "l" | "xl" | undefined;
72
+ size?: "xl" | "l" | "m" | "s" | undefined;
73
73
  direction?: "rtl" | "ltr" | undefined;
74
74
  onIconClick?: (() => void) | undefined;
75
75
  } & React.RefAttributes<HTMLInputElement>>>;
@@ -3,7 +3,7 @@ import { ComponentStory, ComponentMeta } from '@storybook/react';
3
3
  declare const _default: ComponentMeta<import("react").FC<Partial<{
4
4
  src: string;
5
5
  alt: string;
6
- size?: "s" | "m" | "l" | "xl" | "xxl" | undefined;
6
+ size?: "xl" | "l" | "m" | "s" | "xxl" | undefined;
7
7
  } & {
8
8
  children?: import("react").ReactNode;
9
9
  }> & {
@@ -14,7 +14,7 @@ export default _default;
14
14
  export declare const Basic: ComponentStory<import("react").FC<Partial<{
15
15
  src: string;
16
16
  alt: string;
17
- size?: "s" | "m" | "l" | "xl" | "xxl" | undefined;
17
+ size?: "xl" | "l" | "m" | "s" | "xxl" | undefined;
18
18
  } & {
19
19
  children?: import("react").ReactNode;
20
20
  }> & {
@@ -24,7 +24,7 @@ export declare const Basic: ComponentStory<import("react").FC<Partial<{
24
24
  export declare const WithInitials: ComponentStory<import("react").FC<Partial<{
25
25
  src: string;
26
26
  alt: string;
27
- size?: "s" | "m" | "l" | "xl" | "xxl" | undefined;
27
+ size?: "xl" | "l" | "m" | "s" | "xxl" | undefined;
28
28
  } & {
29
29
  children?: import("react").ReactNode;
30
30
  }> & {
@@ -1,20 +1,20 @@
1
1
  import React from 'react';
2
2
  import { ComponentMeta, ComponentStory } from '@storybook/react';
3
3
  import { Size } from './Radio';
4
- declare const _default: ComponentMeta<React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "type"> & {
4
+ declare const _default: ComponentMeta<React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "type" | "size"> & {
5
5
  size?: Size | undefined;
6
6
  label?: string | undefined;
7
7
  } & React.RefAttributes<HTMLInputElement>>>;
8
8
  export default _default;
9
- export declare const Basic: ComponentStory<React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "type"> & {
9
+ export declare const Basic: ComponentStory<React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "type" | "size"> & {
10
10
  size?: Size | undefined;
11
11
  label?: string | undefined;
12
12
  } & React.RefAttributes<HTMLInputElement>>>;
13
- export declare const Controlled: ComponentStory<React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "type"> & {
13
+ export declare const Controlled: ComponentStory<React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "type" | "size"> & {
14
14
  size?: Size | undefined;
15
15
  label?: string | undefined;
16
16
  } & React.RefAttributes<HTMLInputElement>>>;
17
- export declare const WithLabel: ComponentStory<React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "type"> & {
17
+ export declare const WithLabel: ComponentStory<React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "type" | "size"> & {
18
18
  size?: Size | undefined;
19
19
  label?: string | undefined;
20
20
  } & React.RefAttributes<HTMLInputElement>>>;
@@ -0,0 +1,11 @@
1
+ import React from "react";
2
+ export interface CommentProps {
3
+ avatar: {
4
+ src: string;
5
+ alt: string;
6
+ };
7
+ body: string;
8
+ author: string;
9
+ createdAt: Date;
10
+ }
11
+ export declare const Comment: React.FC<CommentProps>;
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ import { ComponentStory, ComponentMeta } from "@storybook/react";
3
+ declare const _default: ComponentMeta<import("react").FC<import("./Comment").CommentProps>>;
4
+ export default _default;
5
+ export declare const Basic: ComponentStory<import("react").FC<import("./Comment").CommentProps>>;
@@ -0,0 +1 @@
1
+ export { Comment } from './Comment';
@@ -3,3 +3,4 @@ export { Setting } from './Setting';
3
3
  export { Modal } from './Modal';
4
4
  export { Select } from './Select';
5
5
  export { Table } from './Table';
6
+ export { Comment } from './Comment';
@@ -1,4 +1,4 @@
1
1
  export { Alert, Avatar, Card, Divider, DateTime, Icon, Nav, Pill, Typography, Spinner, Chip, Dot, Gradient, } from "./components/atoms";
2
2
  export { InfoCard, Input, TextArea, Button, Checkbox, Dropdown, Profile, Radio, Tile, Switch, IconButton, } from "./components/molecules";
3
- export { Menu, Setting, Modal, Select, Table } from "./components/organisms";
3
+ export { Menu, Setting, Modal, Select, Table, Comment, } from "./components/organisms";
4
4
  export { GlobalStyles as IntegrigoUI, Color } from "./styles";
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "registry": "https://npm.pkg.github.com/integrigo"
5
5
  },
6
- "version": "1.6.18d",
6
+ "version": "1.6.18e",
7
7
  "main": "lib/index.js",
8
8
  "module": "lib/index.esm.js",
9
9
  "types": "lib/index.d.ts",
@@ -4,7 +4,8 @@ import { Color } from "../../../styles";
4
4
  import { Icon } from "../../atoms";
5
5
  import { IconType } from "../../atoms/Icon";
6
6
 
7
- export interface IconButtonProps {
7
+ export interface IconButtonProps
8
+ extends React.ButtonHTMLAttributes<HTMLButtonElement> {
8
9
  size?: "m" | "l";
9
10
  icon: IconType;
10
11
  }
@@ -14,12 +15,21 @@ const sizeVariant = {
14
15
  l: 48,
15
16
  };
16
17
 
17
- export const IconButton: React.FC<IconButtonProps> = ({ size = "m", icon }) => {
18
+ export const IconButton: React.FC<IconButtonProps> = ({
19
+ size = "m",
20
+ icon,
21
+ ...props
22
+ }) => {
18
23
  const iconSize = (5 / 9) * sizeVariant[size];
19
24
 
20
25
  return (
21
- <Root size={size}>
22
- <Icon type={icon} width={iconSize} height={iconSize} fill={Color.Orange}/>
26
+ <Root size={size} {...props}>
27
+ <Icon
28
+ type={icon}
29
+ width={iconSize}
30
+ height={iconSize}
31
+ fill={Color.Orange}
32
+ />
23
33
  </Root>
24
34
  );
25
35
  };
@@ -27,10 +37,24 @@ export const IconButton: React.FC<IconButtonProps> = ({ size = "m", icon }) => {
27
37
  const Root = styled.button<{ size: "m" | "l" }>`
28
38
  border: none;
29
39
  display: flex;
40
+ cursor: pointer;
30
41
  align-items: center;
31
42
  justify-content: center;
32
43
  width: ${(p) => sizeVariant[p.size]}px;
33
44
  height: ${(p) => sizeVariant[p.size]}px;
34
45
  border-radius: calc(${(p) => sizeVariant[p.size]}px / 2);
35
46
  background-color: var(--color-ecru);
47
+ transition: background-color var(--transition-speed);
48
+
49
+ & svg {
50
+ transition: fill var(--transition-speed);
51
+ }
52
+
53
+ &:hover {
54
+ background-color: var(--color-orange);
55
+
56
+ & svg {
57
+ fill: var(--color-ecru);
58
+ }
59
+ }
36
60
  `;
@@ -0,0 +1,29 @@
1
+ import { ComponentStory, ComponentMeta } from "@storybook/react";
2
+
3
+ import { Comment } from "./Comment";
4
+
5
+ export default {
6
+ title: "Organisms/Comment",
7
+ component: Comment,
8
+ argTypes: {
9
+ show: {
10
+ control: "boolean",
11
+ defaultValue: true,
12
+ },
13
+ },
14
+ } as ComponentMeta<typeof Comment>;
15
+
16
+ const Template: ComponentStory<typeof Comment> = (args) => (
17
+ <Comment {...args} />
18
+ );
19
+
20
+ export const Basic = Template.bind({});
21
+ Basic.args = {
22
+ avatar: {
23
+ src: "https://img.freepik.com/darmowe-zdjecie/dosc-usmiechnieta-radosnie-kobieta-o-jasnych-wlosach-ubrana-swobodnie-wygladajaca-z-zadowoleniem_176420-15187.jpg?w=1380&t=st=1660198496~exp=1660199096~hmac=7401572065d2cd7bb67d9f43dbde5c116b90aad419b179fffac1196df24869f2",
24
+ alt: "Jane Doe",
25
+ },
26
+ body: "Comment body goes here!",
27
+ author: "Jane Doe",
28
+ createdAt: new Date(),
29
+ };
@@ -0,0 +1,59 @@
1
+ import React from "react";
2
+ import styled from "styled-components";
3
+ import { Avatar, DateTime, Typography } from "../../atoms";
4
+
5
+ export interface CommentProps {
6
+ avatar: {
7
+ src: string;
8
+ alt: string;
9
+ };
10
+ body: string;
11
+ author: string;
12
+ createdAt: Date;
13
+ }
14
+
15
+ export const Comment: React.FC<CommentProps> = ({
16
+ avatar,
17
+ body,
18
+ author,
19
+ createdAt,
20
+ }) => {
21
+ return (
22
+ <Root>
23
+ <Avatar {...avatar} />
24
+
25
+ <NameAndDate>
26
+ <Typography.Hero size="s">{author}</Typography.Hero>
27
+ <DateTime date={createdAt} />
28
+ </NameAndDate>
29
+
30
+ <div />
31
+
32
+ <Typography.Body>{body}</Typography.Body>
33
+ </Root>
34
+ );
35
+ };
36
+
37
+ const Root = styled.div`
38
+ display: grid;
39
+ grid-template-columns: 32px auto;
40
+ grid-template-rows: 32px auto;
41
+ column-gap: var(--padding-m);
42
+ row-gap: var(--padding-m);
43
+
44
+ & > p {
45
+ margin: 0;
46
+ }
47
+ `;
48
+
49
+ const NameAndDate = styled.div`
50
+ display: flex;
51
+ justify-content: space-between;
52
+ align-items: center;
53
+ flex-wrap: wrap;
54
+
55
+ & > h5 {
56
+ margin: 0;
57
+ color: var(--color-orange);
58
+ }
59
+ `;
@@ -0,0 +1 @@
1
+ export { Comment } from './Comment'
@@ -2,4 +2,5 @@ export { Menu } from './Menu';
2
2
  export { Setting } from './Setting';
3
3
  export { Modal } from './Modal';
4
4
  export { Select } from './Select';
5
- export { Table } from './Table';
5
+ export { Table } from './Table';
6
+ export { Comment } from './Comment'
package/src/index.ts CHANGED
@@ -28,6 +28,13 @@ export {
28
28
  IconButton,
29
29
  } from "./components/molecules";
30
30
 
31
- export { Menu, Setting, Modal, Select, Table } from "./components/organisms";
31
+ export {
32
+ Menu,
33
+ Setting,
34
+ Modal,
35
+ Select,
36
+ Table,
37
+ Comment,
38
+ } from "./components/organisms";
32
39
 
33
40
  export { GlobalStyles as IntegrigoUI, Color } from "./styles";