@xqmsg/ui-core 0.22.2 → 0.22.4

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.22.2",
2
+ "version": "0.22.4",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
@@ -65,8 +65,8 @@
65
65
  "@storybook/react": "^6.5.10",
66
66
  "@svgr/rollup": "^8.0.1",
67
67
  "@svgr/webpack": "^8.0.1",
68
- "@types/react": "^18.2.1",
69
- "@types/react-dom": "^18.2.2",
68
+ "@types/react": "^18.2.12",
69
+ "@types/react-dom": "^18.2.5",
70
70
  "@typescript-eslint/eslint-plugin": "^5.59.5",
71
71
  "@typescript-eslint/parser": "^5.59.5",
72
72
  "babel-loader": "8.1.0",
@@ -111,6 +111,7 @@
111
111
  "yup": "^0.32.11"
112
112
  },
113
113
  "resolutions": {
114
+ "framer-motion": "6.4.1",
114
115
  "**/@typescript-eslint/eslint-plugin": "^5.59.5",
115
116
  "**/@typescript-eslint/parser": "^5.59.5"
116
117
  }
@@ -42,7 +42,7 @@ export const Banner: React.FC<BannerProps> = ({
42
42
  }, [variant]);
43
43
 
44
44
  return (
45
- <Alert variant={variant}>
45
+ <Alert variant={variant} borderRadius="4px">
46
46
  <AlertDescription>
47
47
  <Flex
48
48
  flexDirection={type === 'condensed' ? 'row' : 'column'}
@@ -50,7 +50,13 @@ const StackedPilledInput = React.forwardRef<
50
50
  }
51
51
 
52
52
  if (watchedValue !== undefined && watchedValue?.length) {
53
- setLatestFormValueToArray(watchedValue.split(',').filter(Boolean));
53
+ setLatestFormValueToArray(
54
+ watchedValue
55
+ .split(';')
56
+ .join(',')
57
+ .split(',')
58
+ .filter(Boolean)
59
+ );
54
60
 
55
61
  if (latestTokenElement) {
56
62
  latestTokenElement.scrollIntoView({
@@ -69,9 +75,9 @@ const StackedPilledInput = React.forwardRef<
69
75
  }
70
76
 
71
77
  if (
72
- (e.key === ' ' ||
73
- e.key === 'Enter' ||
78
+ (e.key === 'Enter' ||
74
79
  e.key === ',' ||
80
+ e.key === ';' ||
75
81
  e.key === 'Tab') &&
76
82
  localValue.trim().length
77
83
  ) {
@@ -99,7 +105,14 @@ const StackedPilledInput = React.forwardRef<
99
105
  }
100
106
 
101
107
  const filteredUniqueValues = Array.from(
102
- new Set([...lastestFormValueToArray, ...localValue.trim().split(',')])
108
+ new Set([
109
+ ...lastestFormValueToArray,
110
+ ...localValue
111
+ .trim()
112
+ .split(';')
113
+ .join(',')
114
+ .split(','),
115
+ ])
103
116
  );
104
117
 
105
118
  setLocalValue('');
@@ -304,7 +317,10 @@ const StackedPilledInput = React.forwardRef<
304
317
  onChange={e =>
305
318
  tokenIndex === null &&
306
319
  setLocalValue(
307
- e.target.value.trim().replace(',', '').length
320
+ e.target.value
321
+ .trim()
322
+ .replace(',', '')
323
+ .replace(';', '').length
308
324
  ? e.target.value
309
325
  : ''
310
326
  )
@@ -13,8 +13,7 @@ const StackedSwitch = React.forwardRef<HTMLInputElement, StackedSwitchProps>(
13
13
 
14
14
  return (
15
15
  <Switch
16
- h="26px"
17
- mx="4px"
16
+ h="21px"
18
17
  _focus={{
19
18
  border: '2px solid',
20
19
  borderColor: colors.border.focus,
@@ -18,7 +18,7 @@ export const Label: React.FC<LabelProps> = ({
18
18
  label,
19
19
  }) => {
20
20
  return (
21
- <FormLabel display="flex">
21
+ <FormLabel display="flex" ml="0">
22
22
  {label}
23
23
  {isRequired && (
24
24
  <Box ml={1} color={colors.label.error}>
@@ -251,7 +251,11 @@ export function Input<T extends FieldValues>({
251
251
  id={name}
252
252
  isInvalid={isInvalid}
253
253
  position="relative"
254
- py={label || helperText || isInvalid ? 5 : 0}
254
+ py={
255
+ (inputType !== 'checkbox' && label) || helperText || isInvalid
256
+ ? 5
257
+ : 0
258
+ }
255
259
  >
256
260
  {label && inputType !== 'checkbox' && (
257
261
  <Label