@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/dist/components/form/index.d.ts +2 -2
- package/dist/components/form/section/index.d.ts +2 -1
- package/dist/components/input/index.d.ts +1 -1
- package/dist/components/table/index.d.ts +2 -1
- package/dist/ui-core.cjs.development.js +10 -9
- 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 +10 -9
- package/dist/ui-core.esm.js.map +1 -1
- package/package.json +4 -3
- package/src/components/banner/index.tsx +1 -1
- package/src/components/input/StackedPilledInput/index.tsx +21 -5
- package/src/components/input/StackedSwitch/index.tsx +1 -2
- package/src/components/input/components/label/index.tsx +1 -1
- package/src/components/input/index.tsx +5 -1
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.22.
|
|
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.
|
|
69
|
-
"@types/react-dom": "^18.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
|
}
|
|
@@ -50,7 +50,13 @@ const StackedPilledInput = React.forwardRef<
|
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
if (watchedValue !== undefined && watchedValue?.length) {
|
|
53
|
-
setLatestFormValueToArray(
|
|
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([
|
|
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
|
|
320
|
+
e.target.value
|
|
321
|
+
.trim()
|
|
322
|
+
.replace(',', '')
|
|
323
|
+
.replace(';', '').length
|
|
308
324
|
? e.target.value
|
|
309
325
|
: ''
|
|
310
326
|
)
|
|
@@ -251,7 +251,11 @@ export function Input<T extends FieldValues>({
|
|
|
251
251
|
id={name}
|
|
252
252
|
isInvalid={isInvalid}
|
|
253
253
|
position="relative"
|
|
254
|
-
py={
|
|
254
|
+
py={
|
|
255
|
+
(inputType !== 'checkbox' && label) || helperText || isInvalid
|
|
256
|
+
? 5
|
|
257
|
+
: 0
|
|
258
|
+
}
|
|
255
259
|
>
|
|
256
260
|
{label && inputType !== 'checkbox' && (
|
|
257
261
|
<Label
|