@integrigo/integrigo-ui 1.6.10 → 1.6.12-a

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,7 +3,7 @@ import { ComponentStory, ComponentMeta } from '@storybook/react';
3
3
  declare const _default: ComponentMeta<React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "size"> & import("formik").FieldProps<any, any> & {
4
4
  label?: string | undefined;
5
5
  validationType?: import("../../../types/validation").ValidationType | undefined;
6
- icon?: "close" | "angle-down" | "arrow-left" | "bars" | "bell" | "check-circle" | "check-square" | "clipboad-notes" | "dice-five" | "edit" | "envelope" | "exclamation-circle" | "exclamation-triangle" | "exit" | "facebook" | "home" | "image-edit" | "instagram" | "linkedin" | "lock" | "minus" | "phone" | "plus" | "process" | "points-circle" | "redo" | "setting" | "user-circle" | "users" | undefined;
6
+ icon?: "close" | "angle-down" | "arrow-left" | "bars" | "bell" | "check-circle" | "check-square" | "clipboad-notes" | "dice-five" | "edit" | "envelope" | "exclamation-circle" | "exclamation-triangle" | "exit" | "facebook" | "home" | "image-edit" | "instagram" | "linkedin" | "lock" | "minus" | "phone" | "plus" | "process" | "points-circle" | "redo" | "setting" | "user" | "user-circle" | "users" | undefined;
7
7
  size?: "s" | "m" | "l" | "xl" | undefined;
8
8
  direction?: "rtl" | "ltr" | undefined;
9
9
  onIconClick?: (() => void) | undefined;
@@ -12,7 +12,7 @@ export default _default;
12
12
  export declare const Basic: ComponentStory<React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "size"> & import("formik").FieldProps<any, any> & {
13
13
  label?: string | undefined;
14
14
  validationType?: import("../../../types/validation").ValidationType | undefined;
15
- icon?: "close" | "angle-down" | "arrow-left" | "bars" | "bell" | "check-circle" | "check-square" | "clipboad-notes" | "dice-five" | "edit" | "envelope" | "exclamation-circle" | "exclamation-triangle" | "exit" | "facebook" | "home" | "image-edit" | "instagram" | "linkedin" | "lock" | "minus" | "phone" | "plus" | "process" | "points-circle" | "redo" | "setting" | "user-circle" | "users" | undefined;
15
+ icon?: "close" | "angle-down" | "arrow-left" | "bars" | "bell" | "check-circle" | "check-square" | "clipboad-notes" | "dice-five" | "edit" | "envelope" | "exclamation-circle" | "exclamation-triangle" | "exit" | "facebook" | "home" | "image-edit" | "instagram" | "linkedin" | "lock" | "minus" | "phone" | "plus" | "process" | "points-circle" | "redo" | "setting" | "user" | "user-circle" | "users" | undefined;
16
16
  size?: "s" | "m" | "l" | "xl" | undefined;
17
17
  direction?: "rtl" | "ltr" | undefined;
18
18
  onIconClick?: (() => void) | undefined;
@@ -20,7 +20,7 @@ export declare const Basic: ComponentStory<React.ForwardRefExoticComponent<Omit<
20
20
  export declare const Success: ComponentStory<React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "size"> & import("formik").FieldProps<any, any> & {
21
21
  label?: string | undefined;
22
22
  validationType?: import("../../../types/validation").ValidationType | undefined;
23
- icon?: "close" | "angle-down" | "arrow-left" | "bars" | "bell" | "check-circle" | "check-square" | "clipboad-notes" | "dice-five" | "edit" | "envelope" | "exclamation-circle" | "exclamation-triangle" | "exit" | "facebook" | "home" | "image-edit" | "instagram" | "linkedin" | "lock" | "minus" | "phone" | "plus" | "process" | "points-circle" | "redo" | "setting" | "user-circle" | "users" | undefined;
23
+ icon?: "close" | "angle-down" | "arrow-left" | "bars" | "bell" | "check-circle" | "check-square" | "clipboad-notes" | "dice-five" | "edit" | "envelope" | "exclamation-circle" | "exclamation-triangle" | "exit" | "facebook" | "home" | "image-edit" | "instagram" | "linkedin" | "lock" | "minus" | "phone" | "plus" | "process" | "points-circle" | "redo" | "setting" | "user" | "user-circle" | "users" | undefined;
24
24
  size?: "s" | "m" | "l" | "xl" | undefined;
25
25
  direction?: "rtl" | "ltr" | undefined;
26
26
  onIconClick?: (() => void) | undefined;
@@ -28,7 +28,7 @@ export declare const Success: ComponentStory<React.ForwardRefExoticComponent<Omi
28
28
  export declare const Error: ComponentStory<React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "size"> & import("formik").FieldProps<any, any> & {
29
29
  label?: string | undefined;
30
30
  validationType?: import("../../../types/validation").ValidationType | undefined;
31
- icon?: "close" | "angle-down" | "arrow-left" | "bars" | "bell" | "check-circle" | "check-square" | "clipboad-notes" | "dice-five" | "edit" | "envelope" | "exclamation-circle" | "exclamation-triangle" | "exit" | "facebook" | "home" | "image-edit" | "instagram" | "linkedin" | "lock" | "minus" | "phone" | "plus" | "process" | "points-circle" | "redo" | "setting" | "user-circle" | "users" | undefined;
31
+ icon?: "close" | "angle-down" | "arrow-left" | "bars" | "bell" | "check-circle" | "check-square" | "clipboad-notes" | "dice-five" | "edit" | "envelope" | "exclamation-circle" | "exclamation-triangle" | "exit" | "facebook" | "home" | "image-edit" | "instagram" | "linkedin" | "lock" | "minus" | "phone" | "plus" | "process" | "points-circle" | "redo" | "setting" | "user" | "user-circle" | "users" | undefined;
32
32
  size?: "s" | "m" | "l" | "xl" | undefined;
33
33
  direction?: "rtl" | "ltr" | undefined;
34
34
  onIconClick?: (() => void) | undefined;
@@ -36,7 +36,7 @@ export declare const Error: ComponentStory<React.ForwardRefExoticComponent<Omit<
36
36
  export declare const Disabled: ComponentStory<React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "size"> & import("formik").FieldProps<any, any> & {
37
37
  label?: string | undefined;
38
38
  validationType?: import("../../../types/validation").ValidationType | undefined;
39
- icon?: "close" | "angle-down" | "arrow-left" | "bars" | "bell" | "check-circle" | "check-square" | "clipboad-notes" | "dice-five" | "edit" | "envelope" | "exclamation-circle" | "exclamation-triangle" | "exit" | "facebook" | "home" | "image-edit" | "instagram" | "linkedin" | "lock" | "minus" | "phone" | "plus" | "process" | "points-circle" | "redo" | "setting" | "user-circle" | "users" | undefined;
39
+ icon?: "close" | "angle-down" | "arrow-left" | "bars" | "bell" | "check-circle" | "check-square" | "clipboad-notes" | "dice-five" | "edit" | "envelope" | "exclamation-circle" | "exclamation-triangle" | "exit" | "facebook" | "home" | "image-edit" | "instagram" | "linkedin" | "lock" | "minus" | "phone" | "plus" | "process" | "points-circle" | "redo" | "setting" | "user" | "user-circle" | "users" | undefined;
40
40
  size?: "s" | "m" | "l" | "xl" | undefined;
41
41
  direction?: "rtl" | "ltr" | undefined;
42
42
  onIconClick?: (() => void) | undefined;
@@ -44,7 +44,7 @@ export declare const Disabled: ComponentStory<React.ForwardRefExoticComponent<Om
44
44
  export declare const IconLTR: ComponentStory<React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "size"> & import("formik").FieldProps<any, any> & {
45
45
  label?: string | undefined;
46
46
  validationType?: import("../../../types/validation").ValidationType | undefined;
47
- icon?: "close" | "angle-down" | "arrow-left" | "bars" | "bell" | "check-circle" | "check-square" | "clipboad-notes" | "dice-five" | "edit" | "envelope" | "exclamation-circle" | "exclamation-triangle" | "exit" | "facebook" | "home" | "image-edit" | "instagram" | "linkedin" | "lock" | "minus" | "phone" | "plus" | "process" | "points-circle" | "redo" | "setting" | "user-circle" | "users" | undefined;
47
+ icon?: "close" | "angle-down" | "arrow-left" | "bars" | "bell" | "check-circle" | "check-square" | "clipboad-notes" | "dice-five" | "edit" | "envelope" | "exclamation-circle" | "exclamation-triangle" | "exit" | "facebook" | "home" | "image-edit" | "instagram" | "linkedin" | "lock" | "minus" | "phone" | "plus" | "process" | "points-circle" | "redo" | "setting" | "user" | "user-circle" | "users" | undefined;
48
48
  size?: "s" | "m" | "l" | "xl" | undefined;
49
49
  direction?: "rtl" | "ltr" | undefined;
50
50
  onIconClick?: (() => void) | undefined;
@@ -52,7 +52,7 @@ export declare const IconLTR: ComponentStory<React.ForwardRefExoticComponent<Omi
52
52
  export declare const IconRTL: ComponentStory<React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "size"> & import("formik").FieldProps<any, any> & {
53
53
  label?: string | undefined;
54
54
  validationType?: import("../../../types/validation").ValidationType | undefined;
55
- icon?: "close" | "angle-down" | "arrow-left" | "bars" | "bell" | "check-circle" | "check-square" | "clipboad-notes" | "dice-five" | "edit" | "envelope" | "exclamation-circle" | "exclamation-triangle" | "exit" | "facebook" | "home" | "image-edit" | "instagram" | "linkedin" | "lock" | "minus" | "phone" | "plus" | "process" | "points-circle" | "redo" | "setting" | "user-circle" | "users" | undefined;
55
+ icon?: "close" | "angle-down" | "arrow-left" | "bars" | "bell" | "check-circle" | "check-square" | "clipboad-notes" | "dice-five" | "edit" | "envelope" | "exclamation-circle" | "exclamation-triangle" | "exit" | "facebook" | "home" | "image-edit" | "instagram" | "linkedin" | "lock" | "minus" | "phone" | "plus" | "process" | "points-circle" | "redo" | "setting" | "user" | "user-circle" | "users" | undefined;
56
56
  size?: "s" | "m" | "l" | "xl" | undefined;
57
57
  direction?: "rtl" | "ltr" | undefined;
58
58
  onIconClick?: (() => void) | undefined;
@@ -60,7 +60,7 @@ export declare const IconRTL: ComponentStory<React.ForwardRefExoticComponent<Omi
60
60
  export declare const DisabledIcon: ComponentStory<React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "size"> & import("formik").FieldProps<any, any> & {
61
61
  label?: string | undefined;
62
62
  validationType?: import("../../../types/validation").ValidationType | undefined;
63
- icon?: "close" | "angle-down" | "arrow-left" | "bars" | "bell" | "check-circle" | "check-square" | "clipboad-notes" | "dice-five" | "edit" | "envelope" | "exclamation-circle" | "exclamation-triangle" | "exit" | "facebook" | "home" | "image-edit" | "instagram" | "linkedin" | "lock" | "minus" | "phone" | "plus" | "process" | "points-circle" | "redo" | "setting" | "user-circle" | "users" | undefined;
63
+ icon?: "close" | "angle-down" | "arrow-left" | "bars" | "bell" | "check-circle" | "check-square" | "clipboad-notes" | "dice-five" | "edit" | "envelope" | "exclamation-circle" | "exclamation-triangle" | "exit" | "facebook" | "home" | "image-edit" | "instagram" | "linkedin" | "lock" | "minus" | "phone" | "plus" | "process" | "points-circle" | "redo" | "setting" | "user" | "user-circle" | "users" | undefined;
64
64
  size?: "s" | "m" | "l" | "xl" | undefined;
65
65
  direction?: "rtl" | "ltr" | undefined;
66
66
  onIconClick?: (() => void) | undefined;
@@ -68,7 +68,7 @@ export declare const DisabledIcon: ComponentStory<React.ForwardRefExoticComponen
68
68
  export declare const WithLabel: ComponentStory<React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "size"> & import("formik").FieldProps<any, any> & {
69
69
  label?: string | undefined;
70
70
  validationType?: import("../../../types/validation").ValidationType | undefined;
71
- icon?: "close" | "angle-down" | "arrow-left" | "bars" | "bell" | "check-circle" | "check-square" | "clipboad-notes" | "dice-five" | "edit" | "envelope" | "exclamation-circle" | "exclamation-triangle" | "exit" | "facebook" | "home" | "image-edit" | "instagram" | "linkedin" | "lock" | "minus" | "phone" | "plus" | "process" | "points-circle" | "redo" | "setting" | "user-circle" | "users" | undefined;
71
+ icon?: "close" | "angle-down" | "arrow-left" | "bars" | "bell" | "check-circle" | "check-square" | "clipboad-notes" | "dice-five" | "edit" | "envelope" | "exclamation-circle" | "exclamation-triangle" | "exit" | "facebook" | "home" | "image-edit" | "instagram" | "linkedin" | "lock" | "minus" | "phone" | "plus" | "process" | "points-circle" | "redo" | "setting" | "user" | "user-circle" | "users" | undefined;
72
72
  size?: "s" | "m" | "l" | "xl" | undefined;
73
73
  direction?: "rtl" | "ltr" | undefined;
74
74
  onIconClick?: (() => void) | undefined;
@@ -1,5 +1,5 @@
1
- import React from 'react';
2
- import { IconType } from '../../atoms/Icon';
1
+ import React from "react";
2
+ import { IconType } from "../../atoms/Icon";
3
3
  export interface SettingProps {
4
4
  icon?: IconType;
5
5
  title: string;
@@ -7,4 +7,4 @@ export interface SettingProps {
7
7
  trigger: string;
8
8
  children?: React.ReactNode;
9
9
  }
10
- export declare const Setting: React.FC<SettingProps>;
10
+ export declare const Setting: React.FCS<SettingProps>;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
2
  import { ComponentStory, ComponentMeta } from '@storybook/react';
3
- declare const _default: ComponentMeta<React.FC<import("./Setting").SettingProps>>;
3
+ declare const _default: ComponentMeta<React.FCS<import("./Setting").SettingProps>>;
4
4
  export default _default;
5
- export declare const Basic: ComponentStory<React.FC<import("./Setting").SettingProps>>;
5
+ export declare const Basic: ComponentStory<React.FCS<import("./Setting").SettingProps>>;
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.10",
6
+ "version": "1.6.12a",
7
7
  "main": "lib/index.js",
8
8
  "module": "lib/index.esm.js",
9
9
  "types": "lib/index.d.ts",
@@ -1,8 +1,9 @@
1
- import styled from 'styled-components';
1
+ import styled from "styled-components";
2
2
 
3
3
  export interface CardProps {
4
4
  inverse?: boolean;
5
- size?: 's' | 'm' | 'l';
5
+ size?: "s" | "m" | "l";
6
+ flat?: boolean;
6
7
  }
7
8
 
8
9
  const sizeVariants = {
@@ -22,11 +23,11 @@ const sizeVariants = {
22
23
 
23
24
  export const Card = styled.div<CardProps>`
24
25
  background-color: ${(p) =>
25
- p.inverse ? 'var(--color-navy)' : 'var(--color-white)'};
26
- box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
27
- color: ${(p) => (p.inverse ? 'var(--color-white)' : 'var(--color-navy)')};
28
- padding: ${(p) => sizeVariants[p.size || 'l'].padding}px;
29
- border-radius: ${(p) => sizeVariants[p.size || 'l'].borderRadius}px;
26
+ p.inverse ? "var(--color-navy)" : "var(--color-white)"};
27
+ box-shadow: ${(p) => (p.flat ? "none" : "0px 4px 4px rgba(0, 0, 0, 0.25)")};
28
+ color: ${(p) => (p.inverse ? "var(--color-white)" : "var(--color-navy)")};
29
+ padding: ${(p) => sizeVariants[p.size || "l"].padding}px;
30
+ border-radius: ${(p) => sizeVariants[p.size || "l"].borderRadius}px;
30
31
  `;
31
32
 
32
- Card.displayName = 'Card';
33
+ Card.displayName = "Card";
@@ -28,6 +28,7 @@ import PointsCircle from "./icons/PointsCircle";
28
28
  import Process from "./icons/Process";
29
29
  import Redo from "./icons/Redo";
30
30
  import Setting from "./icons/Setting";
31
+ import User from "./icons/User";
31
32
  import UserCircle from "./icons/UserCircle";
32
33
  import Users from "./icons/Users";
33
34
 
@@ -59,6 +60,7 @@ export const iconHashMap = {
59
60
  "points-circle": PointsCircle,
60
61
  redo: Redo,
61
62
  setting: Setting,
63
+ user: User,
62
64
  "user-circle": UserCircle,
63
65
  users: Users,
64
66
  };
@@ -0,0 +1,12 @@
1
+ import React from "react";
2
+
3
+ const User: React.FCS = (props) => (
4
+ <svg viewBox="0 0 20 22" xmlns="http://www.w3.org/2000/svg" {...props}>
5
+ <path
6
+ d="M13.71 11.7099C14.6904 10.9385 15.406 9.8808 15.7572 8.68382C16.1085 7.48684 16.0779 6.21015 15.6698 5.03135C15.2617 3.85255 14.4963 2.83027 13.4801 2.10674C12.4639 1.3832 11.2474 0.994385 10 0.994385C8.75255 0.994385 7.53611 1.3832 6.51993 2.10674C5.50374 2.83027 4.73834 3.85255 4.33021 5.03135C3.92208 6.21015 3.89151 7.48684 4.24276 8.68382C4.59401 9.8808 5.3096 10.9385 6.29 11.7099C4.61007 12.3829 3.14428 13.4992 2.04889 14.9398C0.953495 16.3804 0.26956 18.0912 0.0699967 19.8899C0.0555513 20.0212 0.0671132 20.1541 0.104022 20.2809C0.140931 20.4078 0.202464 20.5261 0.285108 20.6292C0.452016 20.8374 0.69478 20.9707 0.959997 20.9999C1.22521 21.0291 1.49116 20.9517 1.69932 20.7848C1.90749 20.6179 2.04082 20.3751 2.07 20.1099C2.28958 18.1551 3.22168 16.3497 4.68822 15.0387C6.15475 13.7277 8.0529 13.0029 10.02 13.0029C11.9871 13.0029 13.8852 13.7277 15.3518 15.0387C16.8183 16.3497 17.7504 18.1551 17.97 20.1099C17.9972 20.3556 18.1144 20.5825 18.2991 20.7469C18.4838 20.9113 18.7228 21.0014 18.97 20.9999H19.08C19.3421 20.9697 19.5817 20.8372 19.7466 20.6311C19.9114 20.4251 19.9881 20.1622 19.96 19.8999C19.7595 18.0961 19.0719 16.3809 17.9708 14.9381C16.8698 13.4953 15.3969 12.3794 13.71 11.7099ZM10 10.9999C9.20887 10.9999 8.43551 10.7653 7.77772 10.3258C7.11992 9.88623 6.60723 9.26152 6.30448 8.53061C6.00173 7.79971 5.92251 6.99544 6.07686 6.21952C6.2312 5.4436 6.61216 4.73086 7.17157 4.17145C7.73098 3.61204 8.44371 3.23108 9.21964 3.07674C9.99556 2.9224 10.7998 3.00161 11.5307 3.30436C12.2616 3.60711 12.8863 4.1198 13.3259 4.7776C13.7654 5.4354 14 6.20876 14 6.99988C14 8.06075 13.5786 9.07816 12.8284 9.82831C12.0783 10.5785 11.0609 10.9999 10 10.9999Z"
7
+ fill="#1A1A1A"
8
+ />
9
+ </svg>
10
+ );
11
+
12
+ export default User;
@@ -47,7 +47,7 @@ const Root = styled.div`
47
47
  Root.displayName = 'Root';
48
48
 
49
49
  const Name = styled(Hero)`
50
- font-size: var(--font-bold);
50
+ font-weight: var(--font-bold);
51
51
  `;
52
52
 
53
53
  Name.displayName = 'Name';
@@ -1,9 +1,9 @@
1
- import React, { useState } from 'react';
2
- import styled from 'styled-components';
3
- import { Icon, IconType } from '../../atoms/Icon';
4
- import { Typography } from '../../atoms/Typography';
1
+ import React, { useState } from "react";
2
+ import styled from "styled-components";
3
+ import { Icon, IconType } from "../../atoms/Icon";
4
+ import { Typography } from "../../atoms/Typography";
5
5
 
6
- const { Body, Hero } = Typography;
6
+ const { Body } = Typography;
7
7
 
8
8
  export interface SettingProps {
9
9
  icon?: IconType;
@@ -13,12 +13,13 @@ export interface SettingProps {
13
13
  children?: React.ReactNode;
14
14
  }
15
15
 
16
- export const Setting: React.FC<SettingProps> = ({
16
+ export const Setting: React.FCS<SettingProps> = ({
17
17
  icon,
18
18
  title,
19
19
  subtitle,
20
20
  trigger,
21
21
  children,
22
+ className,
22
23
  }) => {
23
24
  const [open, setOpen] = useState(false);
24
25
 
@@ -27,29 +28,29 @@ export const Setting: React.FC<SettingProps> = ({
27
28
  };
28
29
 
29
30
  return (
30
- <>
31
+ <div className={className}>
31
32
  <Root active={open} onClick={handleTriggerClick}>
32
33
  <LeftHandSide>
33
34
  {icon && <Icon size={{ width: 24, height: 24 }} type={icon} />}
34
35
 
35
36
  <Content>
36
- <Body bold size="l">
37
- {title}
37
+ <Body bold>{title}</Body>
38
+ <Body bold size="s">
39
+ {subtitle}
38
40
  </Body>
39
- <Body bold>{subtitle}</Body>
40
41
  </Content>
41
42
  </LeftHandSide>
42
43
 
43
44
  <Trigger active={open}>
44
45
  <Icon type="angle-down" size={{ width: 16, height: 16 }} />
45
- <Body bold size="l" as="span">
46
+ <Body bold as="span">
46
47
  {trigger}
47
48
  </Body>
48
49
  </Trigger>
49
50
  </Root>
50
51
 
51
52
  {open && <ExpandedBody>{children}</ExpandedBody>}
52
- </>
53
+ </div>
53
54
  );
54
55
  };
55
56
 
@@ -57,7 +58,7 @@ const Root = styled.div<{ active: boolean }>`
57
58
  align-items: center;
58
59
  background-color: var(--color-white);
59
60
  border: 1px solid
60
- ${(p) => (p.active ? 'var(--color-orange)' : 'var(--shades-of-grey-40)')};
61
+ ${(p) => (p.active ? "var(--color-orange)" : "var(--shades-of-grey-40)")};
61
62
  border-radius: 5px;
62
63
  display: flex;
63
64
  justify-content: space-between;
@@ -84,7 +85,7 @@ const Trigger = styled.div<{ active: boolean }>`
84
85
  gap: var(--padding-s);
85
86
 
86
87
  & svg {
87
- transform: ${(p) => (p.active ? 'rotate(180deg)' : 'rotate(0)')};
88
+ transform: ${(p) => (p.active ? "rotate(180deg)" : "rotate(0)")};
88
89
  transition: transform var(--transition-speed);
89
90
  }
90
91
  `;