@groupeactual/ui-kit 1.1.2 → 1.1.3
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,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@groupeactual/ui-kit",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A simple template for a custom React component library",
|
|
6
6
|
"devDependencies": {
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"@emotion/is-prop-valid": "^1.2.1",
|
|
43
43
|
"@emotion/react": "^11.11.1",
|
|
44
44
|
"@emotion/styled": "^11.11.0",
|
|
45
|
-
"@emotion/serialize": "^1.1.
|
|
45
|
+
"@emotion/serialize": "^1.1.3",
|
|
46
46
|
"@fortawesome/fontawesome-svg-core": "^6.4.2",
|
|
47
47
|
"@fortawesome/pro-regular-svg-icons": "git+https://github.com/actualtysoft/pro-regular-svg-icons.git#6.4.2",
|
|
48
48
|
"@fortawesome/pro-solid-svg-icons": "git+https://github.com/actualtysoft/pro-solid-svg-icons.git#6.4.2",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"notistack": "^3.0.1",
|
|
55
55
|
"react": "^18.2.0",
|
|
56
56
|
"react-dom": "^18.2.0",
|
|
57
|
-
"@groupeactual/design-tokens": "1.1.
|
|
57
|
+
"@groupeactual/design-tokens": "1.1.3"
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|
|
60
60
|
"react": "^18.2.0",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useMemo } from 'react';
|
|
1
|
+
import React, { useMemo, useRef } from 'react';
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
4
|
faCheck,
|
|
@@ -104,8 +104,10 @@ const AutocompleteMultipleSelect = <T,>({
|
|
|
104
104
|
|
|
105
105
|
const withPlaceholder = !value?.length && !!placeholder;
|
|
106
106
|
|
|
107
|
+
const boxRef = useRef<HTMLHeadingElement>(null);
|
|
108
|
+
console.log(boxRef?.current?.offsetWidth);
|
|
107
109
|
return (
|
|
108
|
-
<Box sx={{ width }}>
|
|
110
|
+
<Box sx={{ width }} ref={boxRef}>
|
|
109
111
|
<StyledAutoCompleteForm
|
|
110
112
|
fullWidth
|
|
111
113
|
color={color}
|
|
@@ -157,10 +159,14 @@ const AutocompleteMultipleSelect = <T,>({
|
|
|
157
159
|
}
|
|
158
160
|
sx={{
|
|
159
161
|
margin: '3px',
|
|
160
|
-
maxWidth:
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
162
|
+
maxWidth: boxRef?.current
|
|
163
|
+
? parseFloat(
|
|
164
|
+
String(boxRef.current?.offsetWidth).replace(
|
|
165
|
+
'px',
|
|
166
|
+
''
|
|
167
|
+
)
|
|
168
|
+
) - 50
|
|
169
|
+
: width
|
|
164
170
|
}}
|
|
165
171
|
/>
|
|
166
172
|
))}
|