@xqmsg/ui-core 0.17.0 → 0.17.2

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.17.0",
2
+ "version": "0.17.2",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
@@ -10,5 +10,12 @@ export interface CloseProps {
10
10
  * A functional React component utilized to render the `Close` icon component
11
11
  */
12
12
  export const Close: React.FC<CloseProps> = ({ boxSize, onClick }) => {
13
- return <CloseIcon boxSize={boxSize} onClick={onClick} cursor="pointer" />;
13
+ return (
14
+ <CloseIcon
15
+ width={boxSize}
16
+ height={boxSize}
17
+ onClick={onClick}
18
+ cursor="pointer"
19
+ />
20
+ );
14
21
  };
@@ -64,10 +64,11 @@ const StackedPilledInput = React.forwardRef<
64
64
 
65
65
  const onHandleKeyDown = (e: React.KeyboardEvent) => {
66
66
  if (
67
- e.key === ' ' ||
68
- e.key === 'Enter' ||
69
- e.key === ',' ||
70
- e.key === 'Tab'
67
+ (e.key === ' ' ||
68
+ e.key === 'Enter' ||
69
+ e.key === ',' ||
70
+ e.key === 'Tab') &&
71
+ localValue.trim().length
71
72
  ) {
72
73
  if (
73
74
  e.key === 'Enter' &&
@@ -1,5 +1,6 @@
1
1
  import { Meta, Story } from '@storybook/react';
2
2
  import React from 'react';
3
+ import { Box } from '@chakra-ui/react';
3
4
  import Token, { TokenProps } from '.';
4
5
 
5
6
  const meta: Meta<TokenProps> = {
@@ -12,8 +13,10 @@ const meta: Meta<TokenProps> = {
12
13
  };
13
14
 
14
15
  export default meta;
15
- const Template: Story<TokenProps> = (args) => (
16
- <Token {...args} onDelete={() => null} />
16
+ const Template: Story<TokenProps> = args => (
17
+ <Box width="fit-content">
18
+ <Token {...args} onDelete={() => null} />
19
+ </Box>
17
20
  );
18
21
 
19
22
  export const Default = Template.bind({});
@@ -1,7 +1,7 @@
1
1
  import { Flex, Text } from '@chakra-ui/react';
2
2
  import { truncate } from 'lodash';
3
3
  import React from 'react';
4
- import { Close } from 'src/components/icons/close';
4
+ import { Close } from '../../../icons/close';
5
5
  import colors from '../../../../../src/theme/foundations/colors';
6
6
 
7
7
  export interface TokenProps {
@@ -243,11 +243,8 @@ export function Input<T extends FieldValues>({
243
243
  id={name}
244
244
  isInvalid={isInvalid}
245
245
  position="relative"
246
- py={
247
- (label || helperText || isInvalid) && inputType !== 'checkbox'
248
- ? 6
249
- : 0
250
- }
246
+ py={label || helperText || isInvalid ? 6 : 0}
247
+ pb={inputType === 'checkbox' ? 6 : 0}
251
248
  >
252
249
  {label && inputType !== 'checkbox' && (
253
250
  <Label
@@ -9,6 +9,7 @@ export interface NavigationMenuHeaderProps {
9
9
  /**
10
10
  * A functional React component utilized to render the `NavigationMenuHeader` component
11
11
  */
12
+
12
13
  export const NavigationMenuHeader: React.FC<NavigationMenuHeaderProps> = ({
13
14
  label,
14
15
  }) => {
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { Box, Flex, Link } from '@chakra-ui/react';
3
- import colors from 'src/theme/foundations/colors';
3
+ import colors from '../../../../theme/foundations/colors';
4
4
 
5
5
  export interface NavigationMenuItemProps {
6
6
  leftIcon: JSX.Element;