@xqmsg/ui-core 0.21.7 → 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/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.21.7",
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.18.13",
54
- "@babel/preset-env": "^7.19.0",
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.0.1",
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.10",
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.0.18",
69
- "@types/react-dom": "^18.0.6",
70
- "@typescript-eslint/eslint-plugin": "^5.36.2",
71
- "@typescript-eslint/parser": "^5.36.2",
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.1",
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.0.1",
82
- "tsconfig-paths-webpack-plugin": "^4.0.0",
81
+ "size-limit": "^8.2.4",
82
+ "tsconfig-paths-webpack-plugin": "^4.0.1",
83
83
  "tsdx": "^0.14.1",
84
- "tslib": "^2.4.0",
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.0",
90
+ "@chakra-ui/icons": "^2.0.19",
90
91
  "@chakra-ui/media-query": "^2.0.0",
91
- "@chakra-ui/progress": "^2.0.0",
92
- "@chakra-ui/react": "^2.3.6",
93
- "@chakra-ui/storybook-addon": "^4.0.10",
94
- "@chakra-ui/system": "^2.0.0",
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.0",
97
- "@chakra-ui/transition": "^2.0.0",
98
- "@chakra-ui/utils": "^2.0.0",
99
- "@emotion/react": "~11.9.0",
100
- "@emotion/styled": "~11.6.0",
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.34.0",
106
- "react-icons": "^4.4.0",
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.4.0",
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
+ };
@@ -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> = ({ boxSize }) => {
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' : '1px 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"
@@ -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' : '1px 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"
package/src/index.tsx CHANGED
@@ -11,6 +11,9 @@ export * from './components/breadcrumbs';
11
11
  // Button
12
12
  export * from './components/button';
13
13
 
14
+ // Card
15
+ export * from './components/card';
16
+
14
17
  // Google Button
15
18
  export * from './components/button/google';
16
19
 
@@ -11,7 +11,7 @@ const baseStyle = {
11
11
  },
12
12
  py: '5px',
13
13
  px: '8px',
14
- border: '1px solid',
14
+ border: '.5px solid',
15
15
  borderColor: colors.border.default,
16
16
  _disabled: {
17
17
  opacity: 1,
@@ -72,7 +72,8 @@ const label = {
72
72
 
73
73
  const border = {
74
74
  focus: '#3A6CD980',
75
- default: '#9999991A',
75
+ default: '#D9D9D9',
76
+ light: '#99999919A',
76
77
  };
77
78
 
78
79
  const blur = {