@vygruppen/spor-react 12.24.6 → 12.24.7
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/.turbo/turbo-build.log +10 -10
- package/.turbo/turbo-postinstall.log +2 -2
- package/CHANGELOG.md +6 -0
- package/dist/index.cjs +9 -17
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +9 -17
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -5
- package/src/datepicker/CalendarTriggerButton.tsx +1 -1
- package/src/datepicker/DateTimeSegment.tsx +1 -1
- package/src/input/Autocomplete.tsx +4 -9
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vygruppen/spor-react",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "12.24.
|
|
4
|
+
"version": "12.24.7",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
"react-swipeable": "^7.0.1",
|
|
48
48
|
"usehooks-ts": "^3.1.0",
|
|
49
49
|
"@vygruppen/spor-design-tokens": "4.3.3",
|
|
50
|
-
"@vygruppen/spor-
|
|
51
|
-
"@vygruppen/spor-
|
|
50
|
+
"@vygruppen/spor-icon-react": "4.5.2",
|
|
51
|
+
"@vygruppen/spor-loader": "0.7.0"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@react-types/datepicker": "^3.10.0",
|
|
@@ -68,8 +68,8 @@
|
|
|
68
68
|
"vitest": "^0.26.3",
|
|
69
69
|
"vitest-axe": "^0.1.0",
|
|
70
70
|
"vitest-canvas-mock": "^0.2.2",
|
|
71
|
-
"@vygruppen/
|
|
72
|
-
"@vygruppen/
|
|
71
|
+
"@vygruppen/tsconfig": "0.1.1",
|
|
72
|
+
"@vygruppen/eslint-config": "2.1.0"
|
|
73
73
|
},
|
|
74
74
|
"peerDependencies": {
|
|
75
75
|
"react": ">=18.0.0 <19.0.0",
|
|
@@ -33,7 +33,7 @@ export const CalendarTriggerButton = forwardRef<
|
|
|
33
33
|
const styles = recipe({ variant });
|
|
34
34
|
|
|
35
35
|
return (
|
|
36
|
-
<PopoverAnchor {...buttonProps} ref={ref}>
|
|
36
|
+
<PopoverAnchor {...buttonProps} ref={ref} asChild>
|
|
37
37
|
<IconButton
|
|
38
38
|
icon={<CalendarOutline24Icon />}
|
|
39
39
|
aria-label={t(texts.openCalendar)}
|
|
@@ -51,7 +51,7 @@ export const DateTimeSegment = forwardRef<HTMLDivElement, DateTimeSegmentProps>(
|
|
|
51
51
|
borderRadius="xs"
|
|
52
52
|
fontSize={["mobile.sm", "desktop.sm"]}
|
|
53
53
|
css={styles.dateTimeSegment}
|
|
54
|
-
aria-
|
|
54
|
+
aria-label={ariaDescription}
|
|
55
55
|
aria-labelledby={ariaLabel}
|
|
56
56
|
>
|
|
57
57
|
{isPaddable(segment.type)
|
|
@@ -44,6 +44,7 @@ export const Autocomplete = ({
|
|
|
44
44
|
loading,
|
|
45
45
|
disabled,
|
|
46
46
|
emptyLabel,
|
|
47
|
+
onFocus,
|
|
47
48
|
openOnClick = true,
|
|
48
49
|
openOnFocus = true,
|
|
49
50
|
...rest
|
|
@@ -104,7 +105,8 @@ export const Autocomplete = ({
|
|
|
104
105
|
helperText={helperText}
|
|
105
106
|
errorText={errorText}
|
|
106
107
|
required={required}
|
|
107
|
-
onFocus={() => {
|
|
108
|
+
onFocus={(event) => {
|
|
109
|
+
onFocus?.(event);
|
|
108
110
|
if (openOnFocus) combobox.setOpen(true);
|
|
109
111
|
}}
|
|
110
112
|
/>
|
|
@@ -116,14 +118,7 @@ export const Autocomplete = ({
|
|
|
116
118
|
</Combobox.IndicatorGroup>
|
|
117
119
|
</Combobox.Control>
|
|
118
120
|
<Combobox.Positioner>
|
|
119
|
-
<Combobox.Content
|
|
120
|
-
onBlur={(event) => {
|
|
121
|
-
// Close if focus moves outside the content, necessary for iPhone VoiceOver
|
|
122
|
-
if (!event.currentTarget.contains(event.relatedTarget as Node)) {
|
|
123
|
-
combobox.setOpen(false);
|
|
124
|
-
}
|
|
125
|
-
}}
|
|
126
|
-
>
|
|
121
|
+
<Combobox.Content>
|
|
127
122
|
<Combobox.Empty>
|
|
128
123
|
{!loading && (emptyLabel ?? t(texts.noItemsFound))}
|
|
129
124
|
</Combobox.Empty>
|