@xqmsg/ui-core 0.21.6 → 0.22.0
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/components/card/Card.stories.d.ts +5 -0
- package/dist/components/card/index.d.ts +11 -0
- package/dist/components/form/section/index.d.ts +0 -1
- package/dist/components/icons/dropdown/index.d.ts +1 -0
- package/dist/components/icons/folder/fill/index.d.ts +1 -0
- package/dist/components/icons/index.d.ts +5 -1
- package/dist/components/icons/task/index.d.ts +6 -0
- package/dist/components/table/index.d.ts +0 -1
- package/dist/index.d.ts +1 -0
- package/dist/theme/foundations/breakpoints.d.ts +1 -1
- package/dist/theme/foundations/colors.d.ts +2 -0
- package/dist/ui-core.cjs.development.js +386 -194
- package/dist/ui-core.cjs.development.js.map +1 -1
- package/dist/ui-core.cjs.production.min.js +1 -1
- package/dist/ui-core.cjs.production.min.js.map +1 -1
- package/dist/ui-core.esm.js +386 -196
- package/dist/ui-core.esm.js.map +1 -1
- package/package.json +28 -27
- package/src/components/card/Card.stories.tsx +56 -0
- package/src/components/card/index.tsx +78 -0
- package/src/components/icons/dropdown/dropdown.svg +1 -1
- package/src/components/icons/dropdown/index.tsx +5 -2
- package/src/components/icons/folder/fill/folder-fill-gradient.svg +34 -0
- package/src/components/icons/folder/fill/index.tsx +9 -1
- package/src/components/icons/index.tsx +5 -0
- package/src/components/icons/task/index.tsx +10 -0
- package/src/components/icons/task/task.svg +11 -0
- package/src/components/input/StackedMultiSelect/index.tsx +2 -2
- package/src/components/input/StackedPilledInput/index.tsx +31 -29
- package/src/components/input/StackedSelect/index.tsx +1 -1
- package/src/index.tsx +3 -0
- package/src/theme/components/input.ts +1 -1
- package/src/theme/foundations/colors.ts +2 -1
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.
|
|
2
|
+
"version": "0.22.0",
|
|
3
3
|
"license": "MIT",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"typings": "dist/index.d.ts",
|
|
@@ -50,63 +50,64 @@
|
|
|
50
50
|
}
|
|
51
51
|
],
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@babel/core": "^7.
|
|
54
|
-
"@babel/preset-env": "^7.
|
|
53
|
+
"@babel/core": "^7.21.8",
|
|
54
|
+
"@babel/preset-env": "^7.21.5",
|
|
55
55
|
"@babel/preset-react": "^7.18.6",
|
|
56
56
|
"@rollup/plugin-image": "^3.0.2",
|
|
57
57
|
"@rollup/plugin-url": "^8.0.1",
|
|
58
|
-
"@size-limit/preset-small-lib": "^8.
|
|
58
|
+
"@size-limit/preset-small-lib": "^8.2.4",
|
|
59
59
|
"@storybook/addon-essentials": "^6.5.10",
|
|
60
60
|
"@storybook/addon-info": "^5.3.21",
|
|
61
61
|
"@storybook/addon-links": "^6.5.10",
|
|
62
62
|
"@storybook/addons": "^6.5.10",
|
|
63
63
|
"@storybook/builder-webpack5": "^6.5.10",
|
|
64
|
-
"@storybook/manager-webpack5": "^6.5.
|
|
64
|
+
"@storybook/manager-webpack5": "^6.5.16",
|
|
65
65
|
"@storybook/react": "^6.5.10",
|
|
66
66
|
"@svgr/rollup": "^6.5.1",
|
|
67
67
|
"@svgr/webpack": "^6.3.1",
|
|
68
|
-
"@types/react": "^18.
|
|
69
|
-
"@types/react-dom": "^18.
|
|
70
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
71
|
-
"@typescript-eslint/parser": "^5.
|
|
68
|
+
"@types/react": "^18.2.1",
|
|
69
|
+
"@types/react-dom": "^18.2.2",
|
|
70
|
+
"@typescript-eslint/eslint-plugin": "^5.59.2",
|
|
71
|
+
"@typescript-eslint/parser": "^5.59.2",
|
|
72
72
|
"babel-loader": "8.1.0",
|
|
73
73
|
"babel-preset-react-app": "^9.1.2",
|
|
74
74
|
"generate-changelog": "^1.8.0",
|
|
75
|
-
"husky": "^8.0.
|
|
75
|
+
"husky": "^8.0.3",
|
|
76
76
|
"react": "^18.0.0",
|
|
77
77
|
"react-dom": "^18.0.0",
|
|
78
78
|
"rollup-plugin-cjs-es": "^1.1.0",
|
|
79
79
|
"rollup-plugin-image-files": "^1.4.2",
|
|
80
80
|
"rollup-plugin-svg": "^2.0.0",
|
|
81
|
-
"size-limit": "^8.
|
|
82
|
-
"tsconfig-paths-webpack-plugin": "^4.0.
|
|
81
|
+
"size-limit": "^8.2.4",
|
|
82
|
+
"tsconfig-paths-webpack-plugin": "^4.0.1",
|
|
83
83
|
"tsdx": "^0.14.1",
|
|
84
|
-
"tslib": "^2.
|
|
84
|
+
"tslib": "^2.5.0",
|
|
85
85
|
"typescript": "^4.8.2",
|
|
86
|
-
"yalc": "^1.0.0-pre.53"
|
|
86
|
+
"yalc": "^1.0.0-pre.53",
|
|
87
|
+
"yarn-audit-fix": "^9.3.10"
|
|
87
88
|
},
|
|
88
89
|
"dependencies": {
|
|
89
|
-
"@chakra-ui/icons": "^2.0.
|
|
90
|
+
"@chakra-ui/icons": "^2.0.19",
|
|
90
91
|
"@chakra-ui/media-query": "^2.0.0",
|
|
91
|
-
"@chakra-ui/progress": "^2.
|
|
92
|
-
"@chakra-ui/react": "^2.
|
|
93
|
-
"@chakra-ui/storybook-addon": "^4.0.
|
|
94
|
-
"@chakra-ui/system": "^2.
|
|
92
|
+
"@chakra-ui/progress": "^2.1.6",
|
|
93
|
+
"@chakra-ui/react": "^2.6.1",
|
|
94
|
+
"@chakra-ui/storybook-addon": "^4.0.16",
|
|
95
|
+
"@chakra-ui/system": "^2.5.7",
|
|
95
96
|
"@chakra-ui/theme": "^2.0.0",
|
|
96
|
-
"@chakra-ui/theme-tools": "^2.0.
|
|
97
|
-
"@chakra-ui/transition": "^2.0.
|
|
98
|
-
"@chakra-ui/utils": "^2.0.
|
|
99
|
-
"@emotion/react": "~11.
|
|
100
|
-
"@emotion/styled": "~11.
|
|
97
|
+
"@chakra-ui/theme-tools": "^2.0.16",
|
|
98
|
+
"@chakra-ui/transition": "^2.0.16",
|
|
99
|
+
"@chakra-ui/utils": "^2.0.14",
|
|
100
|
+
"@emotion/react": "~11.10.8",
|
|
101
|
+
"@emotion/styled": "~11.10.8",
|
|
101
102
|
"@hookform/resolvers": "^2.9.7",
|
|
102
103
|
"@types/react-router-dom": "^5.3.3",
|
|
103
104
|
"axios": "^0.27.2",
|
|
104
105
|
"framer-motion": "6.3.0",
|
|
105
|
-
"react-hook-form": "^7.
|
|
106
|
-
"react-icons": "^4.
|
|
106
|
+
"react-hook-form": "^7.43.9",
|
|
107
|
+
"react-icons": "^4.8.0",
|
|
107
108
|
"react-is": "^18.2.0",
|
|
108
109
|
"react-router-dom": "^5.3.3",
|
|
109
|
-
"react-select": "^5.
|
|
110
|
+
"react-select": "^5.7.3",
|
|
110
111
|
"yup": "^0.32.11"
|
|
111
112
|
},
|
|
112
113
|
"resolutions": {
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Meta, Story } from '@storybook/react';
|
|
3
|
+
import { Card, CardProps } from '.';
|
|
4
|
+
import { Flex, Text } from '@chakra-ui/react';
|
|
5
|
+
import { Button } from '../button';
|
|
6
|
+
import { Task } from '../icons/task';
|
|
7
|
+
|
|
8
|
+
const meta: Meta<CardProps> = {
|
|
9
|
+
title: 'Card example',
|
|
10
|
+
component: Card,
|
|
11
|
+
argTypes: {
|
|
12
|
+
title: {
|
|
13
|
+
control: {
|
|
14
|
+
type: 'text',
|
|
15
|
+
},
|
|
16
|
+
description: 'Title of the card',
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
parameters: {
|
|
20
|
+
controls: { expanded: true },
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
export default meta;
|
|
24
|
+
const Template: Story<CardProps> = args => (
|
|
25
|
+
<Flex flexDir="column" height="450px" justifyContent="space-between">
|
|
26
|
+
<Card
|
|
27
|
+
{...args}
|
|
28
|
+
title="Connect a Service"
|
|
29
|
+
leftIcon={<Task boxSize="18px" />}
|
|
30
|
+
>
|
|
31
|
+
<>
|
|
32
|
+
Description paragraph ipsum dolor sit ame tconsectetur. At pelle nte
|
|
33
|
+
sque
|
|
34
|
+
<Text as="b"> eget hendrt felis.</Text>
|
|
35
|
+
</>
|
|
36
|
+
<>
|
|
37
|
+
Description paragraph ipsum dolor sit ame tconsectetur. At pelle nte
|
|
38
|
+
sque eget hendrt felis.
|
|
39
|
+
</>
|
|
40
|
+
<Button
|
|
41
|
+
text="Acti asdf asdfads fon"
|
|
42
|
+
ariaLabel="Action"
|
|
43
|
+
width="fixed"
|
|
44
|
+
variant="secondary"
|
|
45
|
+
onClick={() => {
|
|
46
|
+
console.log('button on click');
|
|
47
|
+
}}
|
|
48
|
+
/>
|
|
49
|
+
</Card>
|
|
50
|
+
</Flex>
|
|
51
|
+
);
|
|
52
|
+
|
|
53
|
+
export const Default = Template.bind({});
|
|
54
|
+
Default.args = {
|
|
55
|
+
title: 'Card title',
|
|
56
|
+
};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import React, { Children, ReactNode } from 'react';
|
|
2
|
+
import { Box, Flex, Text } from '@chakra-ui/react';
|
|
3
|
+
import colors from '../../theme/foundations/colors';
|
|
4
|
+
import typography from '../../theme/foundations/typography';
|
|
5
|
+
import { Button } from '../button';
|
|
6
|
+
|
|
7
|
+
export interface CardProps {
|
|
8
|
+
title: string | ReactNode;
|
|
9
|
+
leftIcon?: JSX.Element;
|
|
10
|
+
children: ReactNode | null;
|
|
11
|
+
height?: string | number;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* A functional React component utilized to render the `Card` component
|
|
16
|
+
*/
|
|
17
|
+
export const Card: React.FC<CardProps> = ({
|
|
18
|
+
title,
|
|
19
|
+
leftIcon,
|
|
20
|
+
children,
|
|
21
|
+
height = 'auto',
|
|
22
|
+
}) => {
|
|
23
|
+
return (
|
|
24
|
+
<Box
|
|
25
|
+
bg={colors.fill.light.quaternary}
|
|
26
|
+
borderRadius="4px"
|
|
27
|
+
border={`.5px solid ${colors.border.default}`}
|
|
28
|
+
py="8px"
|
|
29
|
+
px="8px"
|
|
30
|
+
height={height}
|
|
31
|
+
overflowY="auto"
|
|
32
|
+
width="206px"
|
|
33
|
+
_notLast={{ marginBottom: '8px' }}
|
|
34
|
+
>
|
|
35
|
+
{title && (
|
|
36
|
+
<Flex
|
|
37
|
+
display="flex"
|
|
38
|
+
alignItems="center"
|
|
39
|
+
justifyContent="start"
|
|
40
|
+
textDecoration="none"
|
|
41
|
+
_hover={{ textDecoration: 'none' }}
|
|
42
|
+
mb="8px"
|
|
43
|
+
>
|
|
44
|
+
<Flex alignItems="center">
|
|
45
|
+
<Box mr="4px">{leftIcon}</Box>
|
|
46
|
+
<Text
|
|
47
|
+
color={colors.label.primary.light}
|
|
48
|
+
fontSize={typography.fontSizes.sm}
|
|
49
|
+
fontWeight={typography.fontWeights.medium}
|
|
50
|
+
>
|
|
51
|
+
{title}
|
|
52
|
+
</Text>
|
|
53
|
+
</Flex>
|
|
54
|
+
</Flex>
|
|
55
|
+
)}
|
|
56
|
+
{Children.map(children, child => {
|
|
57
|
+
if (!React.isValidElement(child)) {
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
if (child.type !== Button) {
|
|
61
|
+
return (
|
|
62
|
+
<Text
|
|
63
|
+
as="div"
|
|
64
|
+
_notLast={{ marginBottom: '8px' }}
|
|
65
|
+
color={colors.label.primary.light}
|
|
66
|
+
fontSize={typography.fontSizes.xs}
|
|
67
|
+
fontWeight={typography.fontWeights.normal}
|
|
68
|
+
>
|
|
69
|
+
{child}
|
|
70
|
+
</Text>
|
|
71
|
+
);
|
|
72
|
+
} else {
|
|
73
|
+
return <Box mt="8px">{child}</Box>;
|
|
74
|
+
}
|
|
75
|
+
})}
|
|
76
|
+
</Box>
|
|
77
|
+
);
|
|
78
|
+
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M2 12C0.89543 12 -3.91405e-08 11.1046 -8.74228e-08 10L-4.37114e-07 2C-4.85396e-07 0.895431 0.89543 -3.91405e-08 2 -8.74228e-08L10 -4.37114e-07C11.1046 -4.85396e-07 12 0.89543 12 2L12 10C12 11.1046 11.1046 12 10 12L2 12ZM6 2.5C6.13261 2.5 6.25979 2.55268 6.35355 2.64645L7.85355 4.14645C8.04881 4.34171 8.04881 4.65829 7.85355 4.85355C7.65829 5.04882 7.34171 5.04882 7.14645 4.85355L6 3.70711L4.85355 4.85355C4.65829 5.04882 4.34171 5.04882 4.14645 4.85355C3.95118 4.65829 3.95118 4.34171 4.14645 4.14645L5.64645 2.64645C5.74021 2.55268 5.86739 2.5 6 2.5ZM5.64645 9.35355C5.74021 9.44732 5.86739 9.5 6 9.5C6.13261 9.5 6.25978 9.44732 6.35355 9.35355L7.85355 7.85355C8.04882 7.65829 8.04882 7.34171 7.85355 7.14645C7.65829 6.95118 7.34171 6.95118 7.14645 7.14645L6 8.29289L4.85355 7.14645C4.65829 6.95118 4.34171 6.95118 4.14645 7.14645C3.95118 7.34171 3.95118 7.65829 4.14645 7.85355L5.64645 9.35355Z" fill="
|
|
2
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M2 12C0.89543 12 -3.91405e-08 11.1046 -8.74228e-08 10L-4.37114e-07 2C-4.85396e-07 0.895431 0.89543 -3.91405e-08 2 -8.74228e-08L10 -4.37114e-07C11.1046 -4.85396e-07 12 0.89543 12 2L12 10C12 11.1046 11.1046 12 10 12L2 12ZM6 2.5C6.13261 2.5 6.25979 2.55268 6.35355 2.64645L7.85355 4.14645C8.04881 4.34171 8.04881 4.65829 7.85355 4.85355C7.65829 5.04882 7.34171 5.04882 7.14645 4.85355L6 3.70711L4.85355 4.85355C4.65829 5.04882 4.34171 5.04882 4.14645 4.85355C3.95118 4.65829 3.95118 4.34171 4.14645 4.14645L5.64645 2.64645C5.74021 2.55268 5.86739 2.5 6 2.5ZM5.64645 9.35355C5.74021 9.44732 5.86739 9.5 6 9.5C6.13261 9.5 6.25978 9.44732 6.35355 9.35355L7.85355 7.85355C8.04882 7.65829 8.04882 7.34171 7.85355 7.14645C7.65829 6.95118 7.34171 6.95118 7.14645 7.14645L6 8.29289L4.85355 7.14645C4.65829 6.95118 4.34171 6.95118 4.14645 7.14645C3.95118 7.34171 3.95118 7.65829 4.14645 7.85355L5.64645 9.35355Z" fill="current"/>
|
|
3
3
|
</svg>
|
|
@@ -3,11 +3,14 @@ import { ReactComponent as DropdownIcon } from './dropdown.svg';
|
|
|
3
3
|
|
|
4
4
|
export interface DropdownProps {
|
|
5
5
|
boxSize: number | string;
|
|
6
|
+
disabled?: boolean;
|
|
6
7
|
}
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* A functional React component utilized to render the `Dropdown` icon component
|
|
10
11
|
*/
|
|
11
|
-
export const Dropdown: React.FC<DropdownProps> = ({ boxSize }) => {
|
|
12
|
-
return
|
|
12
|
+
export const Dropdown: React.FC<DropdownProps> = ({ boxSize, disabled }) => {
|
|
13
|
+
return (
|
|
14
|
+
<DropdownIcon boxSize={boxSize} fill={disabled ? '#3C3C4399' : '#0082FF'} />
|
|
15
|
+
);
|
|
13
16
|
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 102.4 89.6">
|
|
3
|
+
<defs>
|
|
4
|
+
<style>
|
|
5
|
+
.cls-1 {
|
|
6
|
+
fill: url(#linear-gradient-2);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.cls-1, .cls-2 {
|
|
10
|
+
fill-opacity: .8;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.cls-3 {
|
|
14
|
+
fill: #fff;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.cls-2 {
|
|
18
|
+
fill: url(#linear-gradient);
|
|
19
|
+
}
|
|
20
|
+
</style>
|
|
21
|
+
<linearGradient id="linear-gradient" x1="67.42" y1="97.14" x2="14.33" y2="13.53" gradientTransform="translate(0 91.6) scale(1 -1)" gradientUnits="userSpaceOnUse">
|
|
22
|
+
<stop offset="0" stop-color="#ff81e2"/>
|
|
23
|
+
<stop offset="1" stop-color="#0082ff"/>
|
|
24
|
+
</linearGradient>
|
|
25
|
+
<linearGradient id="linear-gradient-2" x1="87.33" y1="84.5" x2="34.24" y2=".89" gradientTransform="translate(0 91.6) scale(1 -1)" gradientUnits="userSpaceOnUse">
|
|
26
|
+
<stop offset="0" stop-color="#ff81e2"/>
|
|
27
|
+
<stop offset="1" stop-color="#0082ff"/>
|
|
28
|
+
</linearGradient>
|
|
29
|
+
</defs>
|
|
30
|
+
<path class="cls-3" d="m11.2,0C5.01,0,0,5.01,0,11.2v20.87c3.23-2.07,7.08-3.27,11.2-3.27h80c4.12,0,7.97,1.2,11.2,3.27v-8.07c0-6.19-5.01-11.2-11.2-11.2h-30.95c-.42,0-.83-.17-1.13-.47l-9.05-9.05c-2.1-2.1-4.95-3.28-7.92-3.28H11.2Z"/>
|
|
31
|
+
<path class="cls-2" d="m11.2,0C5.01,0,0,5.01,0,11.2v20.87c3.23-2.07,7.08-3.27,11.2-3.27h80c4.12,0,7.97,1.2,11.2,3.27v-8.07c0-6.19-5.01-11.2-11.2-11.2h-30.95c-.42,0-.83-.17-1.13-.47l-9.05-9.05c-2.1-2.1-4.95-3.28-7.92-3.28H11.2Z"/>
|
|
32
|
+
<path class="cls-3" d="m11.2,38.4c-6.19,0-11.2,5.01-11.2,11.2v28.8c0,6.19,5.01,11.2,11.2,11.2h80c6.19,0,11.2-5.01,11.2-11.2v-28.8c0-6.19-5.01-11.2-11.2-11.2H11.2Z"/>
|
|
33
|
+
<path class="cls-1" d="m11.2,38.4c-6.19,0-11.2,5.01-11.2,11.2v28.8c0,6.19,5.01,11.2,11.2,11.2h80c6.19,0,11.2-5.01,11.2-11.2v-28.8c0-6.19-5.01-11.2-11.2-11.2H11.2Z"/>
|
|
34
|
+
</svg>
|
|
@@ -1,13 +1,21 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ReactComponent as FolderFillIcon } from './folder-fill.svg';
|
|
3
|
+
import { ReactComponent as FolderFillGradientIcon } from './folder-fill-gradient.svg';
|
|
3
4
|
|
|
4
5
|
export interface FolderFillProps {
|
|
5
6
|
boxSize: number | string;
|
|
7
|
+
gradient?: boolean;
|
|
6
8
|
}
|
|
7
9
|
|
|
8
10
|
/**
|
|
9
11
|
* A functional React component utilized to render the `FolderFill` icon component
|
|
10
12
|
*/
|
|
11
|
-
export const FolderFill: React.FC<FolderFillProps> = ({
|
|
13
|
+
export const FolderFill: React.FC<FolderFillProps> = ({
|
|
14
|
+
boxSize,
|
|
15
|
+
gradient = false,
|
|
16
|
+
}) => {
|
|
17
|
+
if (gradient) {
|
|
18
|
+
return <FolderFillGradientIcon width={boxSize} height={boxSize} />;
|
|
19
|
+
}
|
|
12
20
|
return <FolderFillIcon width={boxSize} height={boxSize} />;
|
|
13
21
|
};
|
|
@@ -34,7 +34,11 @@ import { Question } from './question';
|
|
|
34
34
|
import { Video } from './video';
|
|
35
35
|
import { Page } from './page';
|
|
36
36
|
import { Workspace } from './workspace';
|
|
37
|
+
import { Task } from './task';
|
|
37
38
|
|
|
39
|
+
export interface IconProps {
|
|
40
|
+
boxSize: string;
|
|
41
|
+
}
|
|
38
42
|
export {
|
|
39
43
|
Checkmark,
|
|
40
44
|
ChevronDown,
|
|
@@ -72,4 +76,5 @@ export {
|
|
|
72
76
|
Video,
|
|
73
77
|
Warning,
|
|
74
78
|
Workspace,
|
|
79
|
+
Task,
|
|
75
80
|
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ReactComponent as TaskIcon } from './task.svg';
|
|
3
|
+
import { IconProps } from '..';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* A functional React component utilized to render the `Task` icon component
|
|
7
|
+
*/
|
|
8
|
+
export const Task: React.FC<IconProps> = ({ boxSize }) => {
|
|
9
|
+
return <TaskIcon boxSize={boxSize} />;
|
|
10
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<rect width="16" height="16" rx="8" fill="#FFB300"/>
|
|
3
|
+
<rect width="16" height="16" rx="8" fill="url(#paint0_linear_2027_23020)" fill-opacity="0.16"/>
|
|
4
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M11.8421 9.59139C12.412 9.28926 12.8002 8.68997 12.8002 8.00001C12.8002 7.31005 12.412 6.71077 11.8421 6.40864C12.0315 5.79203 11.8822 5.09376 11.3943 4.60589C10.9064 4.11801 10.2082 3.96874 9.59156 4.15809C9.28944 3.5882 8.69015 3.20001 8.0002 3.20001C7.31024 3.20001 6.71094 3.58821 6.40882 4.1581C5.79221 3.96877 5.09396 4.11803 4.60608 4.60591C4.11821 5.09378 3.96894 5.79203 4.15828 6.40864C3.58839 6.71077 3.2002 7.31006 3.2002 8.00001C3.2002 8.68997 3.58839 9.28926 4.15828 9.59138C3.96894 10.208 4.1182 10.9063 4.60608 11.3941C5.09396 11.882 5.79221 12.0313 6.40882 11.8419C6.71095 12.4118 7.31024 12.8 8.0002 12.8C8.69016 12.8 9.28945 12.4118 9.59157 11.8419C10.2082 12.0313 10.9064 11.882 11.3943 11.3941C11.8822 10.9062 12.0314 10.208 11.8421 9.59139ZM10.3141 6.91469C10.4603 6.7137 10.4159 6.43226 10.2149 6.28608C10.0139 6.1399 9.73244 6.18434 9.58626 6.38534L7.49601 9.25943L6.36839 8.13181C6.19266 7.95608 5.90773 7.95608 5.732 8.13181C5.55626 8.30755 5.55626 8.59247 5.732 8.76821L7.232 10.2682C7.32506 10.3613 7.45419 10.4089 7.5854 10.3986C7.7166 10.3883 7.83672 10.3211 7.91413 10.2147L10.3141 6.91469Z" fill="white"/>
|
|
5
|
+
<defs>
|
|
6
|
+
<linearGradient id="paint0_linear_2027_23020" x1="8" y1="0" x2="8" y2="16" gradientUnits="userSpaceOnUse">
|
|
7
|
+
<stop stop-color="white"/>
|
|
8
|
+
<stop offset="1" stop-color="white" stop-opacity="0"/>
|
|
9
|
+
</linearGradient>
|
|
10
|
+
</defs>
|
|
11
|
+
</svg>
|
|
@@ -261,7 +261,7 @@ const StackedMultiSelect = React.forwardRef<
|
|
|
261
261
|
<Flex
|
|
262
262
|
fontSize="13px"
|
|
263
263
|
h="26px"
|
|
264
|
-
border={isFocussed ? '2px solid' : '
|
|
264
|
+
border={isFocussed ? '2px solid' : '.5px solid'}
|
|
265
265
|
borderColor={isFocussed ? colors.border.focus : colors.border.default}
|
|
266
266
|
py="5px"
|
|
267
267
|
pl="8px"
|
|
@@ -330,7 +330,7 @@ const StackedMultiSelect = React.forwardRef<
|
|
|
330
330
|
_focus={{ boxShadow: 'none !important' }}
|
|
331
331
|
/>
|
|
332
332
|
<Flex mr="4px" justifyContent="center" alignItems="center">
|
|
333
|
-
<DropdownIcon boxSize="16px" />
|
|
333
|
+
<DropdownIcon boxSize="16px" disabled={disabled} />
|
|
334
334
|
</Flex>
|
|
335
335
|
</Flex>
|
|
336
336
|
{isFocussed && (
|
|
@@ -217,7 +217,7 @@ const StackedPilledInput = React.forwardRef<
|
|
|
217
217
|
<Box position="relative">
|
|
218
218
|
<Flex
|
|
219
219
|
fontSize="13px"
|
|
220
|
-
border={isFocussed ? '2px solid' : '
|
|
220
|
+
border={isFocussed ? '2px solid' : '.5px solid'}
|
|
221
221
|
borderColor={isFocussed ? colors.border.focus : colors.border.default}
|
|
222
222
|
pl="8px"
|
|
223
223
|
borderRadius="4px"
|
|
@@ -288,34 +288,36 @@ const StackedPilledInput = React.forwardRef<
|
|
|
288
288
|
</Text>
|
|
289
289
|
) : null}
|
|
290
290
|
</Flex>
|
|
291
|
-
|
|
292
|
-
<
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
291
|
+
{!disabled && (
|
|
292
|
+
<Flex flex={1} minWidth={isFocussed && !tokenIndex ? '20%' : 0}>
|
|
293
|
+
<Input
|
|
294
|
+
onKeyDown={onHandleKeyDown}
|
|
295
|
+
type="text"
|
|
296
|
+
padding={0}
|
|
297
|
+
alignContent="flex-start"
|
|
298
|
+
float="right"
|
|
299
|
+
border="none"
|
|
300
|
+
height="auto"
|
|
301
|
+
color={tokenIndex !== null ? 'transparent' : colors.label.primary}
|
|
302
|
+
_focus={{ boxShadow: 'none !important' }}
|
|
303
|
+
value={localValue}
|
|
304
|
+
onChange={e =>
|
|
305
|
+
tokenIndex === null &&
|
|
306
|
+
setLocalValue(
|
|
307
|
+
e.target.value.trim().replace(',', '').length
|
|
308
|
+
? e.target.value
|
|
309
|
+
: ''
|
|
310
|
+
)
|
|
311
|
+
}
|
|
312
|
+
ref={inputRef}
|
|
313
|
+
onFocus={() => setIsFocussed(true)}
|
|
314
|
+
onBlur={() => {
|
|
315
|
+
setIsFocussed(false);
|
|
316
|
+
return setTokenIndex(null);
|
|
317
|
+
}}
|
|
318
|
+
/>
|
|
319
|
+
</Flex>
|
|
320
|
+
)}
|
|
319
321
|
</Flex>
|
|
320
322
|
</Box>
|
|
321
323
|
);
|
|
@@ -212,7 +212,7 @@ const StackedSelect = React.forwardRef<HTMLInputElement, StackedSelectProps>(
|
|
|
212
212
|
cursor={disabled ? 'not-allowed' : 'pointer'}
|
|
213
213
|
onClick={() => !disabled && setIsFocussed(!isFocussed)}
|
|
214
214
|
>
|
|
215
|
-
<DropdownIcon boxSize="16px" />
|
|
215
|
+
<DropdownIcon boxSize="16px" disabled={disabled} />
|
|
216
216
|
</InputRightElement>
|
|
217
217
|
</InputGroup>
|
|
218
218
|
{isFocussed && (
|
package/src/index.tsx
CHANGED