@vygruppen/spor-react 12.24.14 → 12.24.16
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 +14 -0
- package/dist/index.cjs +447 -159
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +79 -15
- package/dist/index.d.ts +79 -15
- package/dist/index.mjs +438 -161
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
- package/src/calendar/CalendarCell.tsx +58 -32
- package/src/calendar/CalendarContext.tsx +9 -0
- package/src/calendar/ScrollCalendar.tsx +14 -4
- package/src/input/Autocomplete.tsx +105 -98
- package/src/input/Menu.tsx +234 -0
- package/src/input/index.ts +1 -0
- package/src/theme/slot-recipes/anatomy.ts +14 -0
- package/src/theme/slot-recipes/index.ts +2 -0
- package/src/theme/slot-recipes/menu.ts +111 -0
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { defineSlotRecipe } from "@chakra-ui/react";
|
|
2
|
+
|
|
3
|
+
import { menuAnatomy } from "./anatomy";
|
|
4
|
+
|
|
5
|
+
export const menuSlotRecipe = defineSlotRecipe({
|
|
6
|
+
className: "menu",
|
|
7
|
+
slots: menuAnatomy.keys(),
|
|
8
|
+
base: {
|
|
9
|
+
content: {
|
|
10
|
+
bg: "bg",
|
|
11
|
+
borderRadius: "sm",
|
|
12
|
+
boxShadow: "sm",
|
|
13
|
+
width: "fit-content",
|
|
14
|
+
padding: "1",
|
|
15
|
+
|
|
16
|
+
display: "flex",
|
|
17
|
+
flexDirection: "column",
|
|
18
|
+
gap: "0.5",
|
|
19
|
+
zIndex: "dropdown",
|
|
20
|
+
|
|
21
|
+
_open: {
|
|
22
|
+
animationStyle: "slide-fade-in",
|
|
23
|
+
animationDuration: "fast",
|
|
24
|
+
zIndex: "popover",
|
|
25
|
+
outline: "none",
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
itemGroup: {
|
|
29
|
+
display: "flex",
|
|
30
|
+
flexDirection: "column",
|
|
31
|
+
gap: "0.5",
|
|
32
|
+
},
|
|
33
|
+
item: {
|
|
34
|
+
borderRadius: "9px",
|
|
35
|
+
padding: "2",
|
|
36
|
+
display: "flex",
|
|
37
|
+
justifyContent: "space-between",
|
|
38
|
+
gap: 1.5,
|
|
39
|
+
|
|
40
|
+
_hover: {
|
|
41
|
+
backgroundColor: "accent.surface.hover",
|
|
42
|
+
},
|
|
43
|
+
|
|
44
|
+
"&:active": {
|
|
45
|
+
backgroundColor: "accent.surface.active",
|
|
46
|
+
},
|
|
47
|
+
|
|
48
|
+
_checked: {
|
|
49
|
+
backgroundColor: "accent.surface",
|
|
50
|
+
},
|
|
51
|
+
|
|
52
|
+
_highlighted: {
|
|
53
|
+
backgroundColor: "ghost.surface.hover",
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
itemGroupLabel: {
|
|
57
|
+
paddingY: "1",
|
|
58
|
+
fontWeight: "bold",
|
|
59
|
+
fontSize: "xs",
|
|
60
|
+
},
|
|
61
|
+
itemCommand: {
|
|
62
|
+
fontSize: "2xs",
|
|
63
|
+
},
|
|
64
|
+
separator: {
|
|
65
|
+
color: "outline",
|
|
66
|
+
},
|
|
67
|
+
radioItem: {
|
|
68
|
+
display: "flex",
|
|
69
|
+
justifyContent: "space-between",
|
|
70
|
+
gap: 2,
|
|
71
|
+
},
|
|
72
|
+
triggerItem: {
|
|
73
|
+
display: "flex",
|
|
74
|
+
justifyContent: "space-between",
|
|
75
|
+
gap: 1.5,
|
|
76
|
+
alignItems: "center",
|
|
77
|
+
},
|
|
78
|
+
checkboxItem: {
|
|
79
|
+
display: "flex",
|
|
80
|
+
gap: 2,
|
|
81
|
+
alignItems: "center",
|
|
82
|
+
width: "full",
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
variants: {
|
|
86
|
+
variant: {
|
|
87
|
+
core: {
|
|
88
|
+
content: {
|
|
89
|
+
border: "1px solid",
|
|
90
|
+
borderColor: "core.outline",
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
accent: {
|
|
94
|
+
content: {
|
|
95
|
+
border: "1px solid",
|
|
96
|
+
borderColor: "core.outline",
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
floating: {
|
|
100
|
+
content: {
|
|
101
|
+
border: "sm",
|
|
102
|
+
borderColor: "floating.outline",
|
|
103
|
+
boxShadow: "lg",
|
|
104
|
+
},
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
defaultVariants: {
|
|
109
|
+
variant: "core",
|
|
110
|
+
},
|
|
111
|
+
});
|