@integrigo/integrigo-ui 1.6.16-c → 1.6.16-d
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/index.d.ts +1 -0
- package/lib/index.esm.js +1 -1
- package/lib/index.js +1 -1
- package/lib/src/components/molecules/Checkbox/Checkbox.stories.d.ts +4 -4
- package/lib/src/components/molecules/Radio/Radio.stories.d.ts +4 -4
- package/package.json +1 -1
- package/src/components/atoms/Initials/Initials.tsx +1 -0
- package/src/components/molecules/Profile/Profile.tsx +11 -2
@@ -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>, "
|
3
|
+
declare const _default: ComponentMeta<React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "type"> & {
|
4
4
|
size?: "s" | "m" | "l" | "xl" | 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>, "
|
8
|
+
export declare const Basic: ComponentStory<React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "type"> & {
|
9
9
|
size?: "s" | "m" | "l" | "xl" | undefined;
|
10
10
|
label?: string | undefined;
|
11
11
|
} & React.RefAttributes<HTMLInputElement>>>;
|
12
|
-
export declare const Controlled: ComponentStory<React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "
|
12
|
+
export declare const Controlled: ComponentStory<React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "type"> & {
|
13
13
|
size?: "s" | "m" | "l" | "xl" | undefined;
|
14
14
|
label?: string | undefined;
|
15
15
|
} & React.RefAttributes<HTMLInputElement>>>;
|
16
|
-
export declare const WithLabel: ComponentStory<React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "
|
16
|
+
export declare const WithLabel: ComponentStory<React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "type"> & {
|
17
17
|
size?: "s" | "m" | "l" | "xl" | undefined;
|
18
18
|
label?: string | undefined;
|
19
19
|
} & React.RefAttributes<HTMLInputElement>>>;
|
@@ -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>, "
|
4
|
+
declare const _default: ComponentMeta<React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "type"> & {
|
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>, "
|
9
|
+
export declare const Basic: ComponentStory<React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "type"> & {
|
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>, "
|
13
|
+
export declare const Controlled: ComponentStory<React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "type"> & {
|
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>, "
|
17
|
+
export declare const WithLabel: ComponentStory<React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "type"> & {
|
18
18
|
size?: Size | undefined;
|
19
19
|
label?: string | undefined;
|
20
20
|
} & React.RefAttributes<HTMLInputElement>>>;
|
package/package.json
CHANGED
@@ -27,6 +27,7 @@ const Root = styled.div<{ size: number, color: string }>`
|
|
27
27
|
background-color: ${p => p.color};
|
28
28
|
color: var(--color-white);
|
29
29
|
display: flex;
|
30
|
+
font-size: ${p => `calc(${p.size}px / 2)`};
|
30
31
|
align-items: center;
|
31
32
|
justify-content: center;
|
32
33
|
text-transform: uppercase;
|
@@ -10,6 +10,14 @@ type ProfileProps = Partial<React.ComponentProps<typeof Avatar>> & {
|
|
10
10
|
children?: React.ReactNode;
|
11
11
|
};
|
12
12
|
|
13
|
+
const fontSizeVariant = {
|
14
|
+
s: 12,
|
15
|
+
m: 16,
|
16
|
+
l: 20,
|
17
|
+
xl: 24,
|
18
|
+
xxl: 32,
|
19
|
+
};
|
20
|
+
|
13
21
|
const getInitials = (text: string): string =>
|
14
22
|
text
|
15
23
|
.split(' ')
|
@@ -32,7 +40,7 @@ export const Profile: React.FC<ProfileProps> = ({
|
|
32
40
|
)}
|
33
41
|
|
34
42
|
<Details>
|
35
|
-
<Name as="span">{name}</Name>
|
43
|
+
<Name as="span" size={size}>{name}</Name>
|
36
44
|
{children}
|
37
45
|
</Details>
|
38
46
|
</Root>
|
@@ -46,8 +54,9 @@ const Root = styled.div`
|
|
46
54
|
|
47
55
|
Root.displayName = 'Root';
|
48
56
|
|
49
|
-
const Name = styled(Hero)
|
57
|
+
const Name = styled(Hero)<{ size: ProfileProps['size']}>`
|
50
58
|
font-weight: var(--font-bold);
|
59
|
+
font-size: ${p => fontSizeVariant[p.size || 'm']}px;
|
51
60
|
`;
|
52
61
|
|
53
62
|
Name.displayName = 'Name';
|