@vygruppen/spor-react 4.0.3 → 4.1.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 +9 -11
- package/CHANGELOG.md +26 -0
- package/dist/{CountryCodeSelect-RUH47EQH.mjs → CountryCodeSelect-7MAIS4VT.mjs} +1 -1
- package/dist/{chunk-XT6QVKN5.mjs → chunk-U2IWIWOD.mjs} +152 -1953
- package/dist/index.d.mts +17 -93
- package/dist/index.d.ts +17 -93
- package/dist/index.js +151 -1980
- package/dist/index.mjs +1 -1
- package/package.json +3 -3
- package/src/accordion/Accordion.test.tsx +1 -1
- package/src/accordion/Accordion.tsx +1 -1
- package/src/accordion/AccordionContext.tsx +1 -1
- package/src/accordion/Expandable.tsx +6 -6
- package/src/alert/BaseAlert.test.tsx +5 -5
- package/src/alert/BaseAlert.tsx +5 -1
- package/src/alert/ClosableAlert.test.tsx +3 -3
- package/src/alert/ExpandableAlert.test.tsx +5 -5
- package/src/button/Button.test.tsx +1 -1
- package/src/button/Button.tsx +1 -1
- package/src/button/CloseButton.tsx +1 -1
- package/src/button/FloatingActionButton.tsx +5 -5
- package/src/button/IconButton.tsx +1 -1
- package/src/card/Card.tsx +3 -2
- package/src/card/index.tsx +1 -1
- package/src/datepicker/Calendar.tsx +9 -9
- package/src/datepicker/CalendarCell.tsx +9 -8
- package/src/datepicker/CalendarGrid.tsx +9 -9
- package/src/datepicker/CalendarHeader.tsx +2 -2
- package/src/datepicker/CalendarTriggerButton.tsx +5 -10
- package/src/datepicker/DateField.tsx +3 -3
- package/src/datepicker/DatePicker.tsx +6 -6
- package/src/datepicker/DateRangePicker.tsx +1 -1
- package/src/datepicker/DateTimeSegment.tsx +2 -2
- package/src/datepicker/RangeCalendar.tsx +8 -5
- package/src/datepicker/StyledField.tsx +2 -6
- package/src/datepicker/TimePicker.test.tsx +4 -4
- package/src/datepicker/TimePicker.tsx +5 -5
- package/src/index.tsx +0 -1
- package/src/input/CardSelect.tsx +3 -3
- package/src/input/Combobox.tsx +1 -1
- package/src/input/CountryCodeSelect.tsx +1 -1
- package/src/input/FormErrorMessage.tsx +1 -1
- package/src/input/InfoSelect.tsx +1 -1
- package/src/input/Input.tsx +1 -1
- package/src/input/InputElement.tsx +2 -2
- package/src/input/ListBox.tsx +3 -3
- package/src/input/NativeSelect.tsx +1 -1
- package/src/input/PasswordInput.tsx +1 -1
- package/src/input/PhoneNumberInput.tsx +13 -4
- package/src/input/Popover.tsx +4 -4
- package/src/input/RadioGroup.tsx +1 -1
- package/src/input/SearchInput.tsx +1 -1
- package/src/input/Switch.tsx +1 -1
- package/src/layout/Stack.tsx +1 -1
- package/src/linjetag/TravelTag.tsx +2 -2
- package/src/link/TextLink.tsx +1 -1
- package/src/list/index.tsx +0 -1
- package/src/loader/DarkSpinner.tsx +2 -4
- package/src/loader/SkeletonText.tsx +6 -3
- package/src/loader/useRotatingLabel.tsx +2 -2
- package/src/media-controller/index.test.tsx +6 -6
- package/src/modal/Drawer.tsx +2 -4
- package/src/modal/ModalHeader.tsx +1 -1
- package/src/provider/index.tsx +1 -1
- package/src/stepper/Stepper.tsx +10 -6
- package/src/stepper/StepperContext.tsx +7 -7
- package/src/stepper/StepperStep.tsx +56 -16
- package/src/theme/components/button.ts +25 -44
- package/src/theme/components/card.ts +7 -1
- package/src/theme/components/close-button.ts +3 -1
- package/src/theme/components/datepicker.ts +2 -2
- package/src/theme/components/divider.ts +17 -17
- package/src/theme/components/fab.ts +16 -13
- package/src/theme/components/info-tag.ts +7 -8
- package/src/theme/components/input.ts +4 -2
- package/src/theme/components/line-icon.ts +1 -2
- package/src/theme/components/media-controller-button.ts +1 -1
- package/src/theme/components/popover.ts +1 -2
- package/src/theme/components/select.ts +4 -4
- package/src/theme/components/stepper.ts +8 -155
- package/src/theme/components/switch.ts +9 -9
- package/src/theme/components/table.ts +3 -3
- package/src/theme/components/tabs.ts +24 -18
- package/src/theme/components/textarea.ts +1 -1
- package/src/theme/components/travel-tag.ts +2 -2
- package/src/theme/foundations/spacing.ts +1 -1
- package/src/theme/foundations/styles.ts +10 -10
- package/src/theme/utils/box-shadow-utils.ts +2 -2
- package/src/toast/ActionToast.test.tsx +1 -1
- package/src/toast/BaseToast.test.tsx +3 -3
- package/src/toast/ClosableToast.test.tsx +1 -1
- package/src/toast/index.tsx +1 -1
- package/src/toast/useToast.tsx +3 -3
- package/src/typography/Badge.tsx +1 -1
- package/src/typography/Text.tsx +1 -1
- package/tsconfig.json +1 -1
@@ -1,43 +1,83 @@
|
|
1
|
-
import {
|
1
|
+
import { useMultiStyleConfig } from "@chakra-ui/react";
|
2
2
|
import { DropdownRightFill18Icon } from "@vygruppen/spor-icon-react";
|
3
3
|
import React from "react";
|
4
|
-
import { Box } from "..";
|
4
|
+
import { Box, Button } from "..";
|
5
5
|
import { useStepper } from "./StepperContext";
|
6
6
|
|
7
7
|
type StepperStepProps = {
|
8
8
|
children: React.ReactNode;
|
9
9
|
stepNumber: number;
|
10
|
+
variant: "base" | "accent";
|
10
11
|
};
|
11
|
-
export const StepperStep = ({
|
12
|
-
|
13
|
-
|
12
|
+
export const StepperStep = ({
|
13
|
+
children,
|
14
|
+
stepNumber,
|
15
|
+
variant,
|
16
|
+
}: StepperStepProps) => {
|
17
|
+
const { activeStep, onClick } = useStepper();
|
18
|
+
const state = getState(stepNumber!, activeStep);
|
14
19
|
const style = useMultiStyleConfig("Stepper", {
|
20
|
+
state,
|
15
21
|
variant,
|
16
|
-
colorScheme,
|
17
22
|
});
|
18
23
|
|
24
|
+
const adjustedProps = getButtonStylesForState(state);
|
25
|
+
|
19
26
|
return (
|
20
27
|
<Box __css={style.stepContainer}>
|
21
28
|
{stepNumber > 1 && (
|
22
29
|
<DropdownRightFill18Icon marginX={5} display={["none", "block"]} />
|
23
30
|
)}
|
24
31
|
|
25
|
-
<
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
32
|
+
<Button
|
33
|
+
size={"xs"}
|
34
|
+
variant={
|
35
|
+
state === "active"
|
36
|
+
? "primary"
|
37
|
+
: state === "completed"
|
38
|
+
? "additional"
|
39
|
+
: "ghost"
|
40
|
+
}
|
41
|
+
{...adjustedProps}
|
31
42
|
onClick={() => onClick(stepNumber)}
|
32
43
|
>
|
33
|
-
|
34
|
-
|
35
|
-
</Flex>
|
44
|
+
{children}
|
45
|
+
</Button>
|
36
46
|
</Box>
|
37
47
|
);
|
38
48
|
};
|
39
49
|
|
40
|
-
const
|
50
|
+
const getButtonStylesForState = (
|
51
|
+
state: "completed" | "active" | "disabled",
|
52
|
+
): Record<string, any> => {
|
53
|
+
switch (state) {
|
54
|
+
case "active":
|
55
|
+
return {
|
56
|
+
_hover: {},
|
57
|
+
boxShadow: "none",
|
58
|
+
_focus: {},
|
59
|
+
_active: {},
|
60
|
+
cursor: "auto",
|
61
|
+
};
|
62
|
+
case "completed":
|
63
|
+
return {
|
64
|
+
boxShadow: "none",
|
65
|
+
};
|
66
|
+
case "disabled":
|
67
|
+
return {
|
68
|
+
_disabled: {},
|
69
|
+
_hover: {},
|
70
|
+
_focus: {},
|
71
|
+
_active: {},
|
72
|
+
color: "dimGrey",
|
73
|
+
cursor: "auto",
|
74
|
+
};
|
75
|
+
default:
|
76
|
+
return {};
|
77
|
+
}
|
78
|
+
};
|
79
|
+
|
80
|
+
const getState = (stepNumber: number, activeStep: number) => {
|
41
81
|
if (stepNumber < activeStep) {
|
42
82
|
return "completed";
|
43
83
|
}
|
@@ -31,73 +31,54 @@ const config = defineStyleConfig({
|
|
31
31
|
},
|
32
32
|
},
|
33
33
|
variants: {
|
34
|
-
control: (props) => ({
|
35
|
-
backgroundColor: mode("darkTeal", "mint")(props),
|
36
|
-
color: mode("white", "darkTeal")(props),
|
37
|
-
...focusVisible({
|
38
|
-
focus: {
|
39
|
-
boxShadow: `inset 0 0 0 4px ${mode(
|
40
|
-
colors.darkTeal,
|
41
|
-
colors.seaMist
|
42
|
-
)(props)}, inset 0 0 0 6px currentColor`,
|
43
|
-
},
|
44
|
-
notFocus: { boxShadow: "none" },
|
45
|
-
}),
|
46
|
-
_hover: {
|
47
|
-
backgroundColor: mode("night", "coralGreen")(props),
|
48
|
-
},
|
49
|
-
_active: {
|
50
|
-
backgroundColor: mode("pine", "white")(props),
|
51
|
-
},
|
52
|
-
}),
|
53
34
|
primary: (props) => ({
|
54
35
|
// FIXME: Update to use a global defined background color for darkMode whenever it is available.
|
55
36
|
// hardcoded background color as alpha-"hack" below is not feasible for dark mode with solid background color
|
56
|
-
backgroundColor: "primaryGreen",
|
57
|
-
color: "white",
|
37
|
+
backgroundColor: mode("primaryGreen", "coralGreen")(props),
|
38
|
+
color: mode("white", "darkTeal")(props),
|
58
39
|
...focusVisible({
|
59
40
|
focus: {
|
60
41
|
boxShadow: `inset 0 0 0 2px ${mode(
|
61
42
|
colors.greenHaze,
|
62
|
-
colors.azure
|
43
|
+
colors.azure,
|
63
44
|
)(props)}, inset 0 0 0 4px ${mode(
|
64
45
|
colors.white,
|
65
|
-
colors.darkGrey
|
46
|
+
colors.darkGrey,
|
66
47
|
)(props)}`,
|
67
48
|
},
|
68
49
|
notFocus: { boxShadow: "none" },
|
69
50
|
}),
|
70
51
|
_hover: {
|
71
|
-
backgroundColor: "
|
52
|
+
backgroundColor: mode("darkTeal", "blueGreen")(props),
|
72
53
|
},
|
73
54
|
_active: {
|
74
|
-
backgroundColor: "
|
55
|
+
backgroundColor: mode("greenHaze", "seaMist")(props),
|
75
56
|
},
|
76
57
|
}),
|
77
58
|
secondary: (props) => ({
|
78
59
|
// FIXME: Update to use global defined background color for darkMode whenever it is available instead of alpha
|
79
|
-
backgroundColor: mode("seaMist", "
|
60
|
+
backgroundColor: mode("seaMist", "primaryGreen")(props),
|
80
61
|
color: mode("darkTeal", "white")(props),
|
81
62
|
// order is important here for now while we do not have global defined background color for darkMode
|
82
63
|
_hover: {
|
83
|
-
backgroundColor: mode("coralGreen", "
|
64
|
+
backgroundColor: mode("coralGreen", "greenHaze")(props),
|
84
65
|
},
|
85
66
|
...focusVisible({
|
86
67
|
focus: {
|
87
68
|
boxShadow: `inset 0 0 0 2px ${mode(
|
88
69
|
colors.greenHaze,
|
89
|
-
colors.
|
70
|
+
colors.primaryGreen,
|
90
71
|
)(props)}, inset 0 0 0 4px ${mode(
|
91
72
|
colors.white,
|
92
|
-
colors.
|
73
|
+
colors.darkTeal,
|
93
74
|
)(props)}`,
|
94
75
|
_hover: {
|
95
76
|
boxShadow: `inset 0 0 0 2px ${mode(
|
96
77
|
colors.greenHaze,
|
97
|
-
colors.azure
|
78
|
+
colors.azure,
|
98
79
|
)(props)}, inset 0 0 0 4px ${mode(
|
99
80
|
colors.white,
|
100
|
-
colors.blackAlpha[500]
|
81
|
+
colors.blackAlpha[500],
|
101
82
|
)(props)}`,
|
102
83
|
},
|
103
84
|
},
|
@@ -106,44 +87,44 @@ const config = defineStyleConfig({
|
|
106
87
|
},
|
107
88
|
}),
|
108
89
|
_active: {
|
109
|
-
backgroundColor: mode("mint", "
|
90
|
+
backgroundColor: mode("mint", "darkTeal")(props),
|
110
91
|
boxShadow: `inset 0 0 0 2px ${mode(
|
111
92
|
colors.greenHaze,
|
112
|
-
colors.azure
|
93
|
+
colors.azure,
|
113
94
|
)(props)}, inset 0 0 0 4px ${mode(
|
114
95
|
colors.white,
|
115
|
-
colors.blackAlpha[600]
|
96
|
+
colors.blackAlpha[600],
|
116
97
|
)(props)}`,
|
117
98
|
_hover: {
|
118
99
|
boxShadow: `inset 0 0 0 2px ${mode(
|
119
100
|
colors.greenHaze,
|
120
|
-
colors.azure
|
101
|
+
colors.azure,
|
121
102
|
)(props)}, inset 0 0 0 4px ${mode(
|
122
103
|
colors.white,
|
123
|
-
colors.blackAlpha[600]
|
104
|
+
colors.blackAlpha[600],
|
124
105
|
)(props)}`,
|
125
106
|
},
|
126
107
|
},
|
127
108
|
}),
|
128
|
-
|
109
|
+
tertiary: (props) => ({
|
129
110
|
backgroundColor: "transparent",
|
130
111
|
color: mode("darkGrey", "white")(props),
|
131
112
|
fontWeight: "normal",
|
132
113
|
boxShadow: `inset 0 0 0 1px ${mode(
|
133
114
|
colors.blackAlpha[400],
|
134
|
-
colors.whiteAlpha[400]
|
115
|
+
colors.whiteAlpha[400],
|
135
116
|
)(props)}`,
|
136
117
|
...focusVisible({
|
137
118
|
focus: {
|
138
119
|
boxShadow: getBoxShadowString({
|
139
120
|
borderWidth: 2,
|
140
|
-
borderColor: "
|
121
|
+
borderColor: "azure",
|
141
122
|
}),
|
142
123
|
},
|
143
124
|
notFocus: {
|
144
125
|
boxShadow: `inset 0 0 0 1px ${mode(
|
145
126
|
colors.blackAlpha[400],
|
146
|
-
colors.whiteAlpha[400]
|
127
|
+
colors.whiteAlpha[400],
|
147
128
|
)(props)}`,
|
148
129
|
},
|
149
130
|
}),
|
@@ -153,7 +134,7 @@ const config = defineStyleConfig({
|
|
153
134
|
_active: {
|
154
135
|
boxShadow: `inset 0 0 0 1px ${mode(
|
155
136
|
colors.blackAlpha[400],
|
156
|
-
colors.whiteAlpha[300]
|
137
|
+
colors.whiteAlpha[300],
|
157
138
|
)(props)}`,
|
158
139
|
backgroundColor: mode("mint", "whiteAlpha.200")(props),
|
159
140
|
},
|
@@ -174,13 +155,13 @@ const config = defineStyleConfig({
|
|
174
155
|
},
|
175
156
|
}),
|
176
157
|
_hover: {
|
177
|
-
backgroundColor: mode("seaMist", "
|
158
|
+
backgroundColor: mode("seaMist", "whiteAlpha.200")(props),
|
178
159
|
_disabled: {
|
179
160
|
color: "blackAlpha.300",
|
180
161
|
},
|
181
162
|
},
|
182
163
|
_active: {
|
183
|
-
backgroundColor: mode("mint", "whiteAlpha.
|
164
|
+
backgroundColor: mode("mint", "whiteAlpha.100")(props),
|
184
165
|
},
|
185
166
|
}),
|
186
167
|
floating: (props) => ({
|
@@ -190,7 +171,7 @@ const config = defineStyleConfig({
|
|
190
171
|
baseShadow: "sm",
|
191
172
|
}),
|
192
173
|
_active: {
|
193
|
-
backgroundColor: mode("mint", "whiteAlpha.
|
174
|
+
backgroundColor: mode("mint", "whiteAlpha.400")(props),
|
194
175
|
},
|
195
176
|
_hover: {
|
196
177
|
backgroundColor: mode("white", "whiteAlpha.200")(props),
|
@@ -58,7 +58,8 @@ type CardThemeProps = {
|
|
58
58
|
| "green"
|
59
59
|
| "teal"
|
60
60
|
| "yellow"
|
61
|
-
| "orange"
|
61
|
+
| "orange"
|
62
|
+
| "red";
|
62
63
|
size: "sm" | "lg";
|
63
64
|
};
|
64
65
|
|
@@ -84,6 +85,11 @@ const getColorSchemeBaseProps = (props: CardThemeProps) => {
|
|
84
85
|
backgroundColor: "seaMist",
|
85
86
|
};
|
86
87
|
}
|
88
|
+
case "red": {
|
89
|
+
return {
|
90
|
+
backgroundColor: "pink",
|
91
|
+
};
|
92
|
+
}
|
87
93
|
default:
|
88
94
|
return {
|
89
95
|
backgroundColor: colors[colorScheme]?.[100] ?? "platinum",
|
@@ -18,7 +18,9 @@ const config = defineStyleConfig({
|
|
18
18
|
...focusVisible({
|
19
19
|
focus: {
|
20
20
|
outline: "none",
|
21
|
-
boxShadow: getBoxShadowString({
|
21
|
+
boxShadow: getBoxShadowString({
|
22
|
+
borderColor: mode("greenHaze", "azure")(props),
|
23
|
+
}),
|
22
24
|
outlineOffset: "2px",
|
23
25
|
},
|
24
26
|
notFocus: {
|
@@ -14,7 +14,7 @@ const parts = anatomy("datepicker").parts(
|
|
14
14
|
"weekend",
|
15
15
|
"dateCell",
|
16
16
|
"inputLabel",
|
17
|
-
"dateTimeSegment"
|
17
|
+
"dateTimeSegment",
|
18
18
|
);
|
19
19
|
|
20
20
|
const $arrowBackground = cssVar("popper-arrow-bg");
|
@@ -50,7 +50,7 @@ const config = helpers.defineMultiStyleConfig({
|
|
50
50
|
dateTimeSegment: {
|
51
51
|
color: mode(
|
52
52
|
"darkGrey",
|
53
|
-
props.isPlaceholder ? "whiteAlpha.400" : "white"
|
53
|
+
props.isPlaceholder ? "whiteAlpha.400" : "white",
|
54
54
|
)(props),
|
55
55
|
},
|
56
56
|
calendarTriggerButton: {
|
@@ -1,37 +1,37 @@
|
|
1
|
-
import { defineStyle, defineStyleConfig } from "@chakra-ui/styled-system"
|
2
|
-
import { mode } from "@chakra-ui/theme-tools"
|
1
|
+
import { defineStyle, defineStyleConfig } from "@chakra-ui/styled-system";
|
2
|
+
import { mode } from "@chakra-ui/theme-tools";
|
3
3
|
|
4
|
-
const baseStyle = defineStyle(props => ({
|
5
|
-
borderColor: mode("blackAlpha.300", "whiteAlpha.300")(props)
|
6
|
-
}))
|
4
|
+
const baseStyle = defineStyle((props) => ({
|
5
|
+
borderColor: mode("blackAlpha.300", "whiteAlpha.300")(props),
|
6
|
+
}));
|
7
7
|
|
8
8
|
const variantSolid = defineStyle({
|
9
9
|
borderStyle: "solid",
|
10
|
-
})
|
10
|
+
});
|
11
11
|
|
12
12
|
const variantDashed = defineStyle({
|
13
13
|
borderStyle: "dashed",
|
14
|
-
})
|
14
|
+
});
|
15
15
|
|
16
16
|
const variants = {
|
17
17
|
solid: variantSolid,
|
18
18
|
dashed: variantDashed,
|
19
|
-
}
|
19
|
+
};
|
20
20
|
|
21
21
|
const sizes = {
|
22
22
|
sm: {
|
23
|
-
borderWidth:
|
24
|
-
borderRadius:
|
23
|
+
borderWidth: "1px",
|
24
|
+
borderRadius: "0.5px",
|
25
25
|
},
|
26
26
|
md: {
|
27
|
-
borderWidth:
|
28
|
-
borderRadius:
|
27
|
+
borderWidth: "2px",
|
28
|
+
borderRadius: "1px",
|
29
29
|
},
|
30
30
|
lg: {
|
31
|
-
borderWidth:
|
32
|
-
borderRadius:
|
31
|
+
borderWidth: "3px",
|
32
|
+
borderRadius: "1.5px",
|
33
33
|
},
|
34
|
-
}
|
34
|
+
};
|
35
35
|
|
36
36
|
export default defineStyleConfig({
|
37
37
|
baseStyle,
|
@@ -39,6 +39,6 @@ export default defineStyleConfig({
|
|
39
39
|
sizes,
|
40
40
|
defaultProps: {
|
41
41
|
variant: "solid",
|
42
|
-
size:
|
42
|
+
size: "md",
|
43
43
|
},
|
44
|
-
})
|
44
|
+
});
|
@@ -100,8 +100,8 @@ const config = helpers.defineMultiStyleConfig({
|
|
100
100
|
...focusVisible({
|
101
101
|
focus: {
|
102
102
|
boxShadow: mode(
|
103
|
-
|
104
|
-
|
103
|
+
`${props.theme.shadows.md}, inset 0 0 0 4px ${props.theme.colors.darkTeal}, inset 0 0 0 6px ${props.theme.colors.white}`,
|
104
|
+
`${props.theme.shadows.md}, inset 0 0 0 4px ${props.theme.colors.mint}, inset 0 0 0 6px ${props.theme.colors.darkTeal}`,
|
105
105
|
)(props),
|
106
106
|
outline: "none",
|
107
107
|
},
|
@@ -115,20 +115,23 @@ const config = helpers.defineMultiStyleConfig({
|
|
115
115
|
container: {
|
116
116
|
backgroundColor: mode("white", "whiteAlpha.100")(props),
|
117
117
|
color: mode("darkGrey", "white")(props),
|
118
|
-
_active: {
|
118
|
+
_active: {
|
119
119
|
backgroundColor: mode("mint", "whiteAlpha.100")(props),
|
120
|
-
color: mode("darkGrey", "white")(props)
|
120
|
+
color: mode("darkGrey", "white")(props),
|
121
121
|
},
|
122
122
|
_hover: {
|
123
123
|
backgroundColor: mode("white", "transparent")(props),
|
124
|
-
boxShadow: mode(
|
125
|
-
|
124
|
+
boxShadow: mode(
|
125
|
+
`inset 0 0 0 2px ${props.theme.colors.darkGrey}`,
|
126
|
+
`inset 0 0 0 2px ${props.theme.colors.white}`,
|
127
|
+
)(props),
|
128
|
+
color: mode("darkGrey", "white")(props),
|
126
129
|
},
|
127
130
|
...focusVisible({
|
128
131
|
focus: {
|
129
132
|
boxShadow: mode(
|
130
|
-
|
131
|
-
|
133
|
+
`${props.theme.shadows.md}, inset 0 0 0 4px ${props.theme.colors.white}, inset 0 0 0 6px ${props.theme.colors.darkGrey}`,
|
134
|
+
`${props.theme.shadows.md}, inset 0 0 0 4px ${props.theme.colors.brightRed}, inset 0 0 0 6px ${props.theme.colors.white}`,
|
132
135
|
)(props),
|
133
136
|
outline: "none",
|
134
137
|
},
|
@@ -142,19 +145,19 @@ const config = helpers.defineMultiStyleConfig({
|
|
142
145
|
container: {
|
143
146
|
backgroundColor: mode("mint", "pine")(props),
|
144
147
|
color: mode("darkTeal", "white")(props),
|
145
|
-
_active: {
|
148
|
+
_active: {
|
146
149
|
backgroundColor: mode("seaMist", "whiteAlpha.100")(props),
|
147
|
-
color: mode("darkTeal", "white")(props)
|
150
|
+
color: mode("darkTeal", "white")(props),
|
148
151
|
},
|
149
152
|
_hover: {
|
150
153
|
backgroundColor: mode("coralGreen", "whiteAlpha.200")(props),
|
151
|
-
color: mode("darkTeal", "white")(props)
|
154
|
+
color: mode("darkTeal", "white")(props),
|
152
155
|
},
|
153
156
|
...focusVisible({
|
154
157
|
focus: {
|
155
158
|
boxShadow: mode(
|
156
|
-
|
157
|
-
|
159
|
+
`${props.theme.shadows.md}, inset 0 0 0 4px ${props.theme.colors.mint}, inset 0 0 0 6px ${props.theme.colors.azure}`,
|
160
|
+
`${props.theme.shadows.md}, inset 0 0 0 4px ${props.theme.colors.pine}, inset 0 0 0 6px ${props.theme.colors.azure}`,
|
158
161
|
)(props),
|
159
162
|
outline: "none",
|
160
163
|
},
|
@@ -8,7 +8,7 @@ const parts = anatomy("info-tag").parts(
|
|
8
8
|
"icon",
|
9
9
|
"textContainer",
|
10
10
|
"title",
|
11
|
-
"description"
|
11
|
+
"description",
|
12
12
|
);
|
13
13
|
|
14
14
|
const helpers = createMultiStyleConfigHelpers(parts.keys);
|
@@ -48,17 +48,16 @@ const config = helpers.defineMultiStyleConfig({
|
|
48
48
|
defaultProps: {
|
49
49
|
size: "md",
|
50
50
|
},
|
51
|
-
|
52
|
-
|
51
|
+
variants: {
|
52
|
+
walk: (props) => ({
|
53
53
|
iconContainer: {
|
54
54
|
backgroundColor: mode("white", "transparent")(props),
|
55
55
|
boxShadow: mode(
|
56
|
-
`${props.theme.shadows.md}, inset 0 0 0 2px ${props.theme.colors.black[200]}`,
|
57
|
-
`${props.theme.shadows.md}, inset 0 0 0 2px ${props.theme.colors.whiteAlpha[400]}
|
58
|
-
|
56
|
+
`${props.theme.shadows.md}, inset 0 0 0 2px ${props.theme.colors.black[200]}`,
|
57
|
+
`${props.theme.shadows.md}, inset 0 0 0 2px ${props.theme.colors.whiteAlpha[400]}`,
|
58
|
+
)(props),
|
59
59
|
},
|
60
60
|
}),
|
61
|
-
}
|
61
|
+
},
|
62
62
|
});
|
63
63
|
export default config;
|
64
|
-
|
@@ -45,13 +45,15 @@ const config = helpers.defineMultiStyleConfig({
|
|
45
45
|
}),
|
46
46
|
},
|
47
47
|
notFocus: {
|
48
|
-
boxShadow: getBoxShadowString({
|
48
|
+
boxShadow: getBoxShadowString({
|
49
|
+
borderColor: mode("darkGrey", "white")(props),
|
50
|
+
}),
|
49
51
|
},
|
50
52
|
}),
|
51
53
|
_disabled: {
|
52
54
|
backgroundColor: mode("blackAlpha.100", "whiteAlpha.100")(props),
|
53
55
|
boxShadow: getBoxShadowString({
|
54
|
-
borderColor: mode("blackAlpha.200", "whiteAlpha.200")(props)
|
56
|
+
borderColor: mode("blackAlpha.200", "whiteAlpha.200")(props),
|
55
57
|
}),
|
56
58
|
cursor: "not-allowed",
|
57
59
|
},
|
@@ -16,7 +16,7 @@ const config = helpers.defineMultiStyleConfig({
|
|
16
16
|
zIndex: "popover",
|
17
17
|
},
|
18
18
|
content: {
|
19
|
-
[$popperBg.variable]: mode(`colors.darkTeal`, `colors.pine`)(props)
|
19
|
+
[$popperBg.variable]: mode(`colors.darkTeal`, `colors.pine`)(props),
|
20
20
|
backgroundColor: $popperBg.reference,
|
21
21
|
[$arrowBg.variable]: $popperBg.reference,
|
22
22
|
[$arrowShadowColor.variable]: `colors.blackAlpha.300`,
|
@@ -43,7 +43,6 @@ const config = helpers.defineMultiStyleConfig({
|
|
43
43
|
...focusVisible({
|
44
44
|
focus: {
|
45
45
|
boxShadow: getBoxShadowString({ borderColor: "azure" }),
|
46
|
-
|
47
46
|
},
|
48
47
|
notFocus: {
|
49
48
|
boxShadow: "none",
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import {selectAnatomy} from "@chakra-ui/anatomy";
|
2
|
-
import {createMultiStyleConfigHelpers} from "@chakra-ui/react";
|
3
|
-
import {default as Input} from "./input";
|
4
|
-
import {mode} from "@chakra-ui/theme-tools";
|
1
|
+
import { selectAnatomy } from "@chakra-ui/anatomy";
|
2
|
+
import { createMultiStyleConfigHelpers } from "@chakra-ui/react";
|
3
|
+
import { default as Input } from "./input";
|
4
|
+
import { mode } from "@chakra-ui/theme-tools";
|
5
5
|
|
6
6
|
const parts = selectAnatomy.extend("root");
|
7
7
|
|