@vygruppen/spor-react 13.1.0 → 13.1.2
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 +4 -3
- package/CHANGELOG.md +15 -0
- package/dist/index.cjs +113 -30
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -4
- package/dist/index.d.ts +5 -4
- package/dist/index.mjs +114 -31
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
- package/src/input/Menu.tsx +9 -5
- package/src/input/PasswordInput.tsx +1 -2
- package/src/theme/recipes/badge.ts +97 -25
- package/src/toast/toast.tsx +7 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vygruppen/spor-react",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "13.1.
|
|
4
|
+
"version": "13.1.2",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
@@ -47,9 +47,9 @@
|
|
|
47
47
|
"react-stately": "^3.31.1",
|
|
48
48
|
"react-swipeable": "^7.0.1",
|
|
49
49
|
"usehooks-ts": "^3.1.0",
|
|
50
|
-
"@vygruppen/spor-design-tokens": "5.0.
|
|
51
|
-
"@vygruppen/spor-
|
|
52
|
-
"@vygruppen/spor-
|
|
50
|
+
"@vygruppen/spor-design-tokens": "5.0.1",
|
|
51
|
+
"@vygruppen/spor-loader": "0.7.0",
|
|
52
|
+
"@vygruppen/spor-icon-react": "5.0.0"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@react-types/datepicker": "^3.10.0",
|
package/src/input/Menu.tsx
CHANGED
|
@@ -74,7 +74,8 @@ export const MenuContent = ({
|
|
|
74
74
|
|
|
75
75
|
export type MenuTriggerProps = {
|
|
76
76
|
icon?: ReactNode;
|
|
77
|
-
|
|
77
|
+
withChevron?: boolean;
|
|
78
|
+
} & Omit<ButtonProps, "rightIcon" | "leftIcon"> & {
|
|
78
79
|
ref?: Ref<HTMLButtonElement>;
|
|
79
80
|
};
|
|
80
81
|
|
|
@@ -83,6 +84,7 @@ export const MenuTrigger = ({
|
|
|
83
84
|
size,
|
|
84
85
|
children,
|
|
85
86
|
ref,
|
|
87
|
+
withChevron = true,
|
|
86
88
|
...props
|
|
87
89
|
}: MenuTriggerProps) => {
|
|
88
90
|
const { variant } = useMenuContext();
|
|
@@ -104,10 +106,12 @@ export const MenuTrigger = ({
|
|
|
104
106
|
size={size}
|
|
105
107
|
{...props}
|
|
106
108
|
rightIcon={
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
109
|
+
withChevron && (
|
|
110
|
+
<ChevronIcon
|
|
111
|
+
transform={open ? "rotate(180deg)" : undefined}
|
|
112
|
+
transition="transform 0.3s"
|
|
113
|
+
/>
|
|
114
|
+
)
|
|
111
115
|
}
|
|
112
116
|
>
|
|
113
117
|
{children}
|
|
@@ -25,7 +25,7 @@ export const badgeRecipie = defineRecipe({
|
|
|
25
25
|
},
|
|
26
26
|
},
|
|
27
27
|
green: {
|
|
28
|
-
backgroundColor: "surface.
|
|
28
|
+
backgroundColor: "surface.success",
|
|
29
29
|
color: "text.success",
|
|
30
30
|
"& svg": {
|
|
31
31
|
color: "icon.success",
|
|
@@ -108,10 +108,19 @@ export const badgeRecipie = defineRecipe({
|
|
|
108
108
|
colorPalette: "blue",
|
|
109
109
|
inverted: true,
|
|
110
110
|
css: {
|
|
111
|
-
backgroundColor:
|
|
112
|
-
|
|
111
|
+
backgroundColor: {
|
|
112
|
+
_light: "darkBlue",
|
|
113
|
+
_dark: "lightBlue",
|
|
114
|
+
},
|
|
115
|
+
color: {
|
|
116
|
+
_light: "icyBlue",
|
|
117
|
+
_dark: "royal",
|
|
118
|
+
},
|
|
113
119
|
"& svg": {
|
|
114
|
-
color:
|
|
120
|
+
color: {
|
|
121
|
+
_light: "royal",
|
|
122
|
+
_dark: "icyBlue",
|
|
123
|
+
},
|
|
115
124
|
},
|
|
116
125
|
},
|
|
117
126
|
},
|
|
@@ -119,10 +128,19 @@ export const badgeRecipie = defineRecipe({
|
|
|
119
128
|
colorPalette: "green",
|
|
120
129
|
inverted: true,
|
|
121
130
|
css: {
|
|
122
|
-
backgroundColor:
|
|
123
|
-
|
|
131
|
+
backgroundColor: {
|
|
132
|
+
_light: "darkTeal",
|
|
133
|
+
_dark: "seaMist",
|
|
134
|
+
},
|
|
135
|
+
color: {
|
|
136
|
+
_light: "mint",
|
|
137
|
+
_dark: "jungle",
|
|
138
|
+
},
|
|
124
139
|
"& svg": {
|
|
125
|
-
color:
|
|
140
|
+
color: {
|
|
141
|
+
_light: "mint",
|
|
142
|
+
_dark: "jungle",
|
|
143
|
+
},
|
|
126
144
|
},
|
|
127
145
|
},
|
|
128
146
|
},
|
|
@@ -130,10 +148,19 @@ export const badgeRecipie = defineRecipe({
|
|
|
130
148
|
colorPalette: "grey",
|
|
131
149
|
inverted: true,
|
|
132
150
|
css: {
|
|
133
|
-
backgroundColor:
|
|
134
|
-
|
|
151
|
+
backgroundColor: {
|
|
152
|
+
_light: "carbon",
|
|
153
|
+
_dark: "platinum",
|
|
154
|
+
},
|
|
155
|
+
color: {
|
|
156
|
+
_light: "white",
|
|
157
|
+
_dark: "darkGrey",
|
|
158
|
+
},
|
|
135
159
|
"& svg": {
|
|
136
|
-
color:
|
|
160
|
+
color: {
|
|
161
|
+
_light: "white",
|
|
162
|
+
_dark: "darkGrey",
|
|
163
|
+
},
|
|
137
164
|
},
|
|
138
165
|
},
|
|
139
166
|
},
|
|
@@ -142,10 +169,19 @@ export const badgeRecipie = defineRecipe({
|
|
|
142
169
|
colorPalette: "cream",
|
|
143
170
|
inverted: true,
|
|
144
171
|
css: {
|
|
145
|
-
backgroundColor:
|
|
146
|
-
|
|
172
|
+
backgroundColor: {
|
|
173
|
+
_light: "coffee",
|
|
174
|
+
_dark: "blonde",
|
|
175
|
+
},
|
|
176
|
+
color: {
|
|
177
|
+
_light: "cornsilk",
|
|
178
|
+
_dark: "coffee",
|
|
179
|
+
},
|
|
147
180
|
"& svg": {
|
|
148
|
-
color:
|
|
181
|
+
color: {
|
|
182
|
+
_light: "cornsilk",
|
|
183
|
+
_dark: "coffee",
|
|
184
|
+
},
|
|
149
185
|
},
|
|
150
186
|
},
|
|
151
187
|
},
|
|
@@ -153,10 +189,19 @@ export const badgeRecipie = defineRecipe({
|
|
|
153
189
|
colorPalette: "yellow",
|
|
154
190
|
inverted: true,
|
|
155
191
|
css: {
|
|
156
|
-
backgroundColor:
|
|
157
|
-
|
|
192
|
+
backgroundColor: {
|
|
193
|
+
_light: "bronze",
|
|
194
|
+
_dark: "banana",
|
|
195
|
+
},
|
|
196
|
+
color: {
|
|
197
|
+
_light: "cornsilk",
|
|
198
|
+
_dark: "coffee",
|
|
199
|
+
},
|
|
158
200
|
"& svg": {
|
|
159
|
-
color:
|
|
201
|
+
color: {
|
|
202
|
+
_light: "cornsilk",
|
|
203
|
+
_dark: "coffee",
|
|
204
|
+
},
|
|
160
205
|
},
|
|
161
206
|
},
|
|
162
207
|
},
|
|
@@ -164,10 +209,19 @@ export const badgeRecipie = defineRecipe({
|
|
|
164
209
|
colorPalette: "orange",
|
|
165
210
|
inverted: true,
|
|
166
211
|
css: {
|
|
167
|
-
backgroundColor:
|
|
168
|
-
|
|
212
|
+
backgroundColor: {
|
|
213
|
+
_light: "wood",
|
|
214
|
+
_dark: "champagne",
|
|
215
|
+
},
|
|
216
|
+
color: {
|
|
217
|
+
_light: "bisque",
|
|
218
|
+
_dark: "wood",
|
|
219
|
+
},
|
|
169
220
|
"& svg": {
|
|
170
|
-
color:
|
|
221
|
+
color: {
|
|
222
|
+
_light: "bisque",
|
|
223
|
+
_dark: "wood",
|
|
224
|
+
},
|
|
171
225
|
},
|
|
172
226
|
},
|
|
173
227
|
},
|
|
@@ -175,10 +229,19 @@ export const badgeRecipie = defineRecipe({
|
|
|
175
229
|
colorPalette: "red",
|
|
176
230
|
inverted: true,
|
|
177
231
|
css: {
|
|
178
|
-
backgroundColor:
|
|
179
|
-
|
|
232
|
+
backgroundColor: {
|
|
233
|
+
_light: "burgundy",
|
|
234
|
+
_dark: "lightRed",
|
|
235
|
+
},
|
|
236
|
+
color: {
|
|
237
|
+
_light: "pink",
|
|
238
|
+
_dark: "maroon",
|
|
239
|
+
},
|
|
180
240
|
"& svg": {
|
|
181
|
-
color:
|
|
241
|
+
color: {
|
|
242
|
+
_light: "pink",
|
|
243
|
+
_dark: "maroon",
|
|
244
|
+
},
|
|
182
245
|
},
|
|
183
246
|
},
|
|
184
247
|
},
|
|
@@ -187,10 +250,19 @@ export const badgeRecipie = defineRecipe({
|
|
|
187
250
|
colorPalette: "neutral",
|
|
188
251
|
inverted: true,
|
|
189
252
|
css: {
|
|
190
|
-
backgroundColor:
|
|
191
|
-
|
|
253
|
+
backgroundColor: {
|
|
254
|
+
_light: "ink",
|
|
255
|
+
_dark: "white",
|
|
256
|
+
},
|
|
257
|
+
color: {
|
|
258
|
+
_light: "white",
|
|
259
|
+
_dark: "darkGrey",
|
|
260
|
+
},
|
|
192
261
|
"& svg": {
|
|
193
|
-
color:
|
|
262
|
+
color: {
|
|
263
|
+
_light: "white",
|
|
264
|
+
_dark: "darkGrey",
|
|
265
|
+
},
|
|
194
266
|
},
|
|
195
267
|
},
|
|
196
268
|
},
|
package/src/toast/toast.tsx
CHANGED
|
@@ -45,7 +45,13 @@ export const Toaster = () => {
|
|
|
45
45
|
<Portal>
|
|
46
46
|
<ChakraToaster toaster={toaster} insetInline={{ mdDown: "4" }}>
|
|
47
47
|
{(toast) => (
|
|
48
|
-
<Toast.Root
|
|
48
|
+
<Toast.Root
|
|
49
|
+
width={{ md: toast.meta?.width }}
|
|
50
|
+
border="sm"
|
|
51
|
+
borderColor={`outline.${toast.type}`}
|
|
52
|
+
boxShadow="sm"
|
|
53
|
+
role="alert"
|
|
54
|
+
>
|
|
49
55
|
<AlertIcon variant={toast.type as Variant} />
|
|
50
56
|
<Stack gap="1" flex="1" maxWidth="100%">
|
|
51
57
|
<Toast.Description>{toast.description}</Toast.Description>
|