@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/dist/ui-core.cjs.development.js +61 -61
- 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 +61 -61
- package/dist/ui-core.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/icons/close/index.tsx +8 -1
- package/src/components/input/StackedPilledInput/index.tsx +5 -4
- package/src/components/input/components/token/Token.stories.tsx +5 -2
- package/src/components/input/components/token/index.tsx +1 -1
- package/src/components/input/index.tsx +2 -5
- package/src/components/navigation/components/header/index.tsx +1 -0
- package/src/components/navigation/components/items/index.tsx +1 -1
package/package.json
CHANGED
|
@@ -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
|
|
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
|
-
|
|
69
|
-
|
|
70
|
-
|
|
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> =
|
|
16
|
-
<
|
|
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 '
|
|
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
|
-
|
|
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
|