@vygruppen/spor-react 12.14.0 → 12.14.1
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 +10 -0
- package/dist/index.cjs +69 -49
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.mjs +69 -49
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
- package/src/alert/ServiceAlert.tsx +4 -11
- package/src/datepicker/CalendarHeader.tsx +6 -4
- package/src/datepicker/DateField.tsx +1 -5
- package/src/input/Field.tsx +1 -1
- package/src/input/ListBox.tsx +6 -2
- package/src/stepper/StepperStep.tsx +0 -1
- package/src/theme/slot-recipes/accordion.ts +6 -6
- package/src/theme/slot-recipes/alert-service.ts +23 -8
- package/src/theme/slot-recipes/choice-chip.ts +17 -3
- package/src/theme/slot-recipes/datepicker.ts +1 -1
- package/src/theme/slot-recipes/line-icon.ts +4 -0
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@vygruppen/spor-react",
|
3
3
|
"type": "module",
|
4
|
-
"version": "12.14.
|
4
|
+
"version": "12.14.1",
|
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.2.0",
|
50
|
-
"@vygruppen/spor-
|
51
|
-
"@vygruppen/spor-
|
50
|
+
"@vygruppen/spor-loader": "0.7.0",
|
51
|
+
"@vygruppen/spor-icon-react": "4.2.1"
|
52
52
|
},
|
53
53
|
"devDependencies": {
|
54
54
|
"@react-types/datepicker": "^3.10.0",
|
@@ -6,7 +6,6 @@ import {
|
|
6
6
|
HStack,
|
7
7
|
RecipeVariantProps,
|
8
8
|
Span,
|
9
|
-
Stack,
|
10
9
|
Text,
|
11
10
|
useSlotRecipe,
|
12
11
|
} from "@chakra-ui/react";
|
@@ -127,16 +126,10 @@ export const ServiceAlert = forwardRef<HTMLDivElement, ServiceAlertProps>(
|
|
127
126
|
</HStack>
|
128
127
|
</Accordion.ItemTrigger>
|
129
128
|
|
130
|
-
<Accordion.ItemContent
|
131
|
-
<
|
132
|
-
|
133
|
-
|
134
|
-
width={contentWidth}
|
135
|
-
css={styles.itemBody}
|
136
|
-
>
|
137
|
-
{children}
|
138
|
-
</Accordion.ItemBody>
|
139
|
-
</Stack>
|
129
|
+
<Accordion.ItemContent css={styles.itemContent}>
|
130
|
+
<Accordion.ItemBody maxWidth={contentWidth} css={styles.itemBody}>
|
131
|
+
{children}
|
132
|
+
</Accordion.ItemBody>
|
140
133
|
</Accordion.ItemContent>
|
141
134
|
</Accordion.Item>
|
142
135
|
</Accordion.Root>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
"use client";
|
2
|
-
import {
|
2
|
+
import { Flex } from "@chakra-ui/react";
|
3
3
|
import { getLocalTimeZone } from "@internationalized/date";
|
4
4
|
import {
|
5
5
|
ArrowLeftOutline24Icon,
|
@@ -7,6 +7,8 @@ import {
|
|
7
7
|
} from "@vygruppen/spor-icon-react";
|
8
8
|
import { CalendarState, RangeCalendarState } from "react-stately";
|
9
9
|
|
10
|
+
import { Text } from "@/typography";
|
11
|
+
|
10
12
|
import { createTexts, useTranslation } from "../i18n";
|
11
13
|
import { CalendarNavigationButton } from "./CalendarNavigationButton";
|
12
14
|
import { useCurrentLocale } from "./utils";
|
@@ -103,16 +105,16 @@ export const CalendarNavigator = ({
|
|
103
105
|
icon={<ArrowLeftOutline24Icon />}
|
104
106
|
aria-label={`${t(texts.previous)} ${t(texts[unit])}`}
|
105
107
|
/>
|
106
|
-
<
|
108
|
+
<Text
|
107
109
|
role="heading"
|
108
|
-
|
110
|
+
variant="md"
|
109
111
|
fontWeight="bold"
|
110
112
|
flex="1"
|
111
113
|
textAlign="center"
|
112
114
|
color={"core.text"}
|
113
115
|
>
|
114
116
|
{capitalize(title)}
|
115
|
-
</
|
117
|
+
</Text>
|
116
118
|
<CalendarNavigationButton
|
117
119
|
onPress={onNext}
|
118
120
|
isDisabled={isNextDisabled}
|
@@ -63,11 +63,7 @@ export const DateField = forwardRef<HTMLDivElement, DateFieldProps>(
|
|
63
63
|
position="absolute"
|
64
64
|
paddingTop="2px"
|
65
65
|
>
|
66
|
-
<Label
|
67
|
-
padding="0"
|
68
|
-
fontSize={["mobile.xs", "desktop.xs"]}
|
69
|
-
{...props.labelProps}
|
70
|
-
>
|
66
|
+
<Label padding="0" {...props.labelProps}>
|
71
67
|
{props.label} <Field.RequiredIndicator />
|
72
68
|
</Label>
|
73
69
|
</Box>
|
package/src/input/Field.tsx
CHANGED
package/src/input/ListBox.tsx
CHANGED
@@ -127,7 +127,11 @@ export function ItemDescription({ children }: { children: React.ReactNode }) {
|
|
127
127
|
const recipe = useSlotRecipe({ key: "listbox" });
|
128
128
|
const styles = recipe({});
|
129
129
|
return (
|
130
|
-
<Box
|
130
|
+
<Box
|
131
|
+
{...descriptionProps}
|
132
|
+
css={styles}
|
133
|
+
fontSize={["mobile.xs", "desktop.xs"]}
|
134
|
+
>
|
131
135
|
{children}
|
132
136
|
</Box>
|
133
137
|
);
|
@@ -233,7 +237,7 @@ function ListBoxSection({ section, state }: ListBoxSectionProps) {
|
|
233
237
|
>
|
234
238
|
{section.rendered && (
|
235
239
|
<Box
|
236
|
-
fontSize="mobile.
|
240
|
+
fontSize={["mobile.sm", "desktop.sm"]}
|
237
241
|
color={titleColor}
|
238
242
|
paddingTop={1}
|
239
243
|
marginTop={isFirstSection ? 0 : 2}
|
@@ -22,13 +22,13 @@ export const accordionSlotRecipe = defineSlotRecipe({
|
|
22
22
|
textAlign: "left",
|
23
23
|
width: "full",
|
24
24
|
alignItems: "center",
|
25
|
-
fontSize: ["mobile.sm",
|
25
|
+
fontSize: ["mobile.sm", "desktop.sm"],
|
26
26
|
fontFamily: "body",
|
27
27
|
fontWeight: "bold",
|
28
28
|
outlineOffset: "-2px",
|
29
|
-
paddingX: [2,
|
30
|
-
paddingY: [1,
|
31
|
-
minHeight: [6,
|
29
|
+
paddingX: [2, 3],
|
30
|
+
paddingY: [1, 1.5],
|
31
|
+
minHeight: [6, 7],
|
32
32
|
cursor: "pointer",
|
33
33
|
_disabled: {
|
34
34
|
pointerEvents: "none",
|
@@ -37,7 +37,7 @@ export const accordionSlotRecipe = defineSlotRecipe({
|
|
37
37
|
},
|
38
38
|
itemContent: {
|
39
39
|
borderBottomRadius: "sm",
|
40
|
-
fontSize: ["mobile.sm",
|
40
|
+
fontSize: ["mobile.sm", "desktop.sm"],
|
41
41
|
color: "text",
|
42
42
|
height: "auto",
|
43
43
|
overflow: "hidden",
|
@@ -52,7 +52,7 @@ export const accordionSlotRecipe = defineSlotRecipe({
|
|
52
52
|
},
|
53
53
|
itemBody: {
|
54
54
|
paddingY: 2,
|
55
|
-
paddingX: [2,
|
55
|
+
paddingX: [2, 3],
|
56
56
|
},
|
57
57
|
itemIndicator: {
|
58
58
|
transition: "rotate 0.2s",
|
@@ -22,7 +22,8 @@ export const alertServiceSlotRecipe = defineSlotRecipe({
|
|
22
22
|
display: "flex",
|
23
23
|
flexDirection: "column",
|
24
24
|
justifyContent: "center",
|
25
|
-
padding: [2,
|
25
|
+
padding: ["2", "3"],
|
26
|
+
paddingBottom: "1",
|
26
27
|
borderBottomRadius: "md",
|
27
28
|
borderTopRadius: "none",
|
28
29
|
width: "full",
|
@@ -39,27 +40,41 @@ export const alertServiceSlotRecipe = defineSlotRecipe({
|
|
39
40
|
},
|
40
41
|
},
|
41
42
|
itemTriggerTitle: {
|
42
|
-
fontSize: ["
|
43
|
+
fontSize: ["mobile.sm", "desktop.sm"],
|
43
44
|
},
|
44
45
|
notificationText: {
|
45
46
|
fontWeight: "400",
|
46
|
-
fontSize: ["
|
47
|
+
fontSize: ["mobile.xs", "desktop.xs"],
|
47
48
|
textWrap: "nowrap",
|
49
|
+
color: "alert.service.text.secondary",
|
48
50
|
},
|
51
|
+
|
52
|
+
itemContent: {
|
53
|
+
paddingX: ["2", "3"],
|
54
|
+
paddingBottom: ["2", "3"],
|
55
|
+
paddingTop: ["1", "2"],
|
56
|
+
},
|
57
|
+
|
49
58
|
itemBody: {
|
50
59
|
marginX: "auto",
|
51
60
|
padding: "0 !important",
|
52
|
-
|
53
|
-
|
61
|
+
color: "alert.service.text.secondary",
|
62
|
+
gap: 0,
|
63
|
+
flexDirection: "column",
|
64
|
+
display: "flex",
|
54
65
|
"& > p": {
|
55
|
-
gap: 2,
|
56
66
|
width: "full",
|
57
67
|
borderBottom: "1px dashed",
|
58
68
|
borderColor: "outline.inverted",
|
59
|
-
|
60
|
-
|
69
|
+
|
70
|
+
paddingY: ["1", "1.5"],
|
71
|
+
|
72
|
+
_first: {
|
73
|
+
paddingTop: 0,
|
74
|
+
},
|
61
75
|
_last: {
|
62
76
|
borderBottom: "none",
|
77
|
+
paddingBottom: 0,
|
63
78
|
},
|
64
79
|
},
|
65
80
|
},
|
@@ -10,7 +10,6 @@ export const choiceChipSlotRecipe = defineSlotRecipe({
|
|
10
10
|
display: "inline-flex",
|
11
11
|
alignItems: "center",
|
12
12
|
boxAlign: "center",
|
13
|
-
fontSize: "xs",
|
14
13
|
cursor: "pointer",
|
15
14
|
transitionProperty: "all",
|
16
15
|
borderRadius: "xl",
|
@@ -69,7 +68,6 @@ export const choiceChipSlotRecipe = defineSlotRecipe({
|
|
69
68
|
display: "flex",
|
70
69
|
alignItems: "center",
|
71
70
|
gap: "1",
|
72
|
-
fontSize: "xs",
|
73
71
|
},
|
74
72
|
},
|
75
73
|
|
@@ -83,6 +81,10 @@ export const choiceChipSlotRecipe = defineSlotRecipe({
|
|
83
81
|
height: 5,
|
84
82
|
paddingX: 1.5,
|
85
83
|
},
|
84
|
+
label: {
|
85
|
+
fontSize: { base: "mobile.sm", sm: "desktop.sm" },
|
86
|
+
fontWeight: "medium",
|
87
|
+
},
|
86
88
|
},
|
87
89
|
sm: {
|
88
90
|
root: {
|
@@ -92,6 +94,10 @@ export const choiceChipSlotRecipe = defineSlotRecipe({
|
|
92
94
|
height: 6,
|
93
95
|
paddingX: 2,
|
94
96
|
},
|
97
|
+
label: {
|
98
|
+
fontSize: { base: "mobile.sm", sm: "desktop.sm" },
|
99
|
+
fontWeight: "bold",
|
100
|
+
},
|
95
101
|
},
|
96
102
|
md: {
|
97
103
|
root: {
|
@@ -101,6 +107,10 @@ export const choiceChipSlotRecipe = defineSlotRecipe({
|
|
101
107
|
height: 7,
|
102
108
|
paddingX: 2,
|
103
109
|
},
|
110
|
+
label: {
|
111
|
+
fontSize: { base: "mobile.md", sm: "desktop.md" },
|
112
|
+
fontWeight: "bold",
|
113
|
+
},
|
104
114
|
},
|
105
115
|
lg: {
|
106
116
|
root: {
|
@@ -110,6 +120,10 @@ export const choiceChipSlotRecipe = defineSlotRecipe({
|
|
110
120
|
height: 8,
|
111
121
|
paddingX: 3,
|
112
122
|
},
|
123
|
+
label: {
|
124
|
+
fontSize: { base: "mobile.md", sm: "desktop.md" },
|
125
|
+
fontWeight: "bold",
|
126
|
+
},
|
113
127
|
},
|
114
128
|
},
|
115
129
|
|
@@ -176,7 +190,7 @@ export const choiceChipSlotRecipe = defineSlotRecipe({
|
|
176
190
|
},
|
177
191
|
|
178
192
|
defaultVariants: {
|
179
|
-
size: "
|
193
|
+
size: "sm",
|
180
194
|
variant: "core",
|
181
195
|
chipType: "choice",
|
182
196
|
},
|