@chakra-ui/panda-preset 3.24.2 → 3.26.0
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/dist/cjs/recipes/checkmark.cjs +5 -0
- package/dist/cjs/recipes/radiomark.cjs +5 -0
- package/dist/cjs/slot-recipes/combobox.cjs +1 -0
- package/dist/cjs/slot-recipes/index.cjs +4 -0
- package/dist/cjs/slot-recipes/listbox.cjs +146 -0
- package/dist/cjs/slot-recipes/menu.cjs +4 -2
- package/dist/cjs/slot-recipes/scroll-area.cjs +144 -0
- package/dist/esm/recipes/checkmark.js +5 -0
- package/dist/esm/recipes/radiomark.js +5 -0
- package/dist/esm/slot-recipes/combobox.js +1 -0
- package/dist/esm/slot-recipes/index.js +4 -0
- package/dist/esm/slot-recipes/listbox.js +144 -0
- package/dist/esm/slot-recipes/menu.js +4 -2
- package/dist/esm/slot-recipes/scroll-area.js +142 -0
- package/dist/types/slot-recipes/index.d.ts +2 -0
- package/dist/types/slot-recipes/listbox.d.ts +1 -0
- package/dist/types/slot-recipes/scroll-area.d.ts +1 -0
- package/package.json +2 -2
|
@@ -24,6 +24,7 @@ var fieldset = require('./fieldset.cjs');
|
|
|
24
24
|
var fileUpload = require('./file-upload.cjs');
|
|
25
25
|
var hoverCard = require('./hover-card.cjs');
|
|
26
26
|
var list = require('./list.cjs');
|
|
27
|
+
var listbox = require('./listbox.cjs');
|
|
27
28
|
var menu = require('./menu.cjs');
|
|
28
29
|
var nativeSelect = require('./native-select.cjs');
|
|
29
30
|
var numberInput = require('./number-input.cjs');
|
|
@@ -35,6 +36,7 @@ var qrCode = require('./qr-code.cjs');
|
|
|
35
36
|
var radioCard = require('./radio-card.cjs');
|
|
36
37
|
var radioGroup = require('./radio-group.cjs');
|
|
37
38
|
var ratingGroup = require('./rating-group.cjs');
|
|
39
|
+
var scrollArea = require('./scroll-area.cjs');
|
|
38
40
|
var segmentGroup = require('./segment-group.cjs');
|
|
39
41
|
var select = require('./select.cjs');
|
|
40
42
|
var slider = require('./slider.cjs');
|
|
@@ -72,6 +74,7 @@ const slotRecipes = {
|
|
|
72
74
|
fileUpload: fileUpload.fileUploadSlotRecipe,
|
|
73
75
|
hoverCard: hoverCard.hoverCardSlotRecipe,
|
|
74
76
|
list: list.listSlotRecipe,
|
|
77
|
+
listbox: listbox.listboxSlotRecipe,
|
|
75
78
|
menu: menu.menuSlotRecipe,
|
|
76
79
|
nativeSelect: nativeSelect.nativeSelectSlotRecipe,
|
|
77
80
|
numberInput: numberInput.numberInputSlotRecipe,
|
|
@@ -82,6 +85,7 @@ const slotRecipes = {
|
|
|
82
85
|
radioCard: radioCard.radioCardSlotRecipe,
|
|
83
86
|
radioGroup: radioGroup.radioGroupSlotRecipe,
|
|
84
87
|
ratingGroup: ratingGroup.ratingGroupSlotRecipe,
|
|
88
|
+
scrollArea: scrollArea.scrollAreaSlotRecipe,
|
|
85
89
|
segmentGroup: segmentGroup.segmentGroupSlotRecipe,
|
|
86
90
|
select: select.selectSlotRecipe,
|
|
87
91
|
combobox: combobox.comboboxSlotRecipe,
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
var def = require('../def.cjs');
|
|
5
|
+
|
|
6
|
+
const listboxSlotRecipe = def.defineSlotRecipe({
|
|
7
|
+
className: "listbox",
|
|
8
|
+
slots: [
|
|
9
|
+
"label",
|
|
10
|
+
"input",
|
|
11
|
+
"item",
|
|
12
|
+
"itemText",
|
|
13
|
+
"itemIndicator",
|
|
14
|
+
"itemGroup",
|
|
15
|
+
"itemGroupLabel",
|
|
16
|
+
"content",
|
|
17
|
+
"root",
|
|
18
|
+
"valueText",
|
|
19
|
+
"empty"
|
|
20
|
+
],
|
|
21
|
+
base: {
|
|
22
|
+
root: {
|
|
23
|
+
display: "flex",
|
|
24
|
+
flexDirection: "column",
|
|
25
|
+
gap: "1.5",
|
|
26
|
+
width: "full"
|
|
27
|
+
},
|
|
28
|
+
content: {
|
|
29
|
+
display: "flex",
|
|
30
|
+
maxH: "96",
|
|
31
|
+
p: "1",
|
|
32
|
+
gap: "1",
|
|
33
|
+
textStyle: "sm",
|
|
34
|
+
outline: "none",
|
|
35
|
+
scrollPadding: "1",
|
|
36
|
+
_horizontal: {
|
|
37
|
+
flexDirection: "row",
|
|
38
|
+
overflowX: "auto"
|
|
39
|
+
},
|
|
40
|
+
_vertical: {
|
|
41
|
+
flexDirection: "column",
|
|
42
|
+
overflowY: "auto"
|
|
43
|
+
},
|
|
44
|
+
"--listbox-item-padding-x": "spacing.2",
|
|
45
|
+
"--listbox-item-padding-y": "spacing.1.5"
|
|
46
|
+
},
|
|
47
|
+
item: {
|
|
48
|
+
position: "relative",
|
|
49
|
+
userSelect: "none",
|
|
50
|
+
display: "flex",
|
|
51
|
+
alignItems: "center",
|
|
52
|
+
gap: "2",
|
|
53
|
+
cursor: "pointer",
|
|
54
|
+
justifyContent: "space-between",
|
|
55
|
+
flex: "1",
|
|
56
|
+
textAlign: "start",
|
|
57
|
+
borderRadius: "l1",
|
|
58
|
+
py: "var(--listbox-item-padding-y)",
|
|
59
|
+
px: "var(--listbox-item-padding-x)",
|
|
60
|
+
_highlighted: {
|
|
61
|
+
outline: "2px solid",
|
|
62
|
+
outlineColor: "border.emphasized"
|
|
63
|
+
},
|
|
64
|
+
_disabled: {
|
|
65
|
+
pointerEvents: "none",
|
|
66
|
+
opacity: "0.5"
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
empty: {
|
|
70
|
+
py: "var(--listbox-item-padding-y)",
|
|
71
|
+
px: "var(--listbox-item-padding-x)"
|
|
72
|
+
},
|
|
73
|
+
itemText: {
|
|
74
|
+
flex: "1"
|
|
75
|
+
},
|
|
76
|
+
itemGroup: {
|
|
77
|
+
mt: "1.5",
|
|
78
|
+
_first: {
|
|
79
|
+
mt: "0"
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
itemGroupLabel: {
|
|
83
|
+
py: "1.5",
|
|
84
|
+
px: "2",
|
|
85
|
+
fontWeight: "medium"
|
|
86
|
+
},
|
|
87
|
+
label: {
|
|
88
|
+
fontWeight: "medium",
|
|
89
|
+
userSelect: "none",
|
|
90
|
+
textStyle: "sm",
|
|
91
|
+
_disabled: {
|
|
92
|
+
layerStyle: "disabled"
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
valueText: {
|
|
96
|
+
lineClamp: "1",
|
|
97
|
+
maxW: "80%"
|
|
98
|
+
},
|
|
99
|
+
itemIndicator: {
|
|
100
|
+
display: "flex",
|
|
101
|
+
alignItems: "center",
|
|
102
|
+
justifyContent: "center",
|
|
103
|
+
_icon: {
|
|
104
|
+
boxSize: "4"
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
variants: {
|
|
109
|
+
variant: {
|
|
110
|
+
subtle: {
|
|
111
|
+
content: {
|
|
112
|
+
bg: "bg.panel",
|
|
113
|
+
borderWidth: "1px",
|
|
114
|
+
borderRadius: "l2"
|
|
115
|
+
},
|
|
116
|
+
item: {
|
|
117
|
+
_hover: {
|
|
118
|
+
bg: "bg.emphasized/60"
|
|
119
|
+
},
|
|
120
|
+
_selected: {
|
|
121
|
+
bg: "bg.muted"
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
solid: {
|
|
126
|
+
content: {
|
|
127
|
+
bg: "bg.panel",
|
|
128
|
+
borderWidth: "1px",
|
|
129
|
+
borderRadius: "l2"
|
|
130
|
+
},
|
|
131
|
+
item: {
|
|
132
|
+
_selected: {
|
|
133
|
+
bg: "colorPalette.solid",
|
|
134
|
+
color: "colorPalette.contrast"
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
plain: {}
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
defaultVariants: {
|
|
142
|
+
variant: "subtle"
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
exports.listboxSlotRecipe = listboxSlotRecipe;
|
|
@@ -121,7 +121,8 @@ const menuSlotRecipe = def.defineSlotRecipe({
|
|
|
121
121
|
sm: {
|
|
122
122
|
content: {
|
|
123
123
|
minW: "8rem",
|
|
124
|
-
padding: "1"
|
|
124
|
+
padding: "1",
|
|
125
|
+
scrollPadding: "1"
|
|
125
126
|
},
|
|
126
127
|
item: {
|
|
127
128
|
gap: "1",
|
|
@@ -133,7 +134,8 @@ const menuSlotRecipe = def.defineSlotRecipe({
|
|
|
133
134
|
md: {
|
|
134
135
|
content: {
|
|
135
136
|
minW: "8rem",
|
|
136
|
-
padding: "1.5"
|
|
137
|
+
padding: "1.5",
|
|
138
|
+
scrollPadding: "1.5"
|
|
137
139
|
},
|
|
138
140
|
item: {
|
|
139
141
|
gap: "2",
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
var def = require('../def.cjs');
|
|
5
|
+
|
|
6
|
+
const scrollAreaSlotRecipe = def.defineSlotRecipe({
|
|
7
|
+
className: "scroll-area",
|
|
8
|
+
slots: ["root", "viewport", "content", "scrollbar", "thumb", "corner"],
|
|
9
|
+
base: {
|
|
10
|
+
root: {
|
|
11
|
+
display: "flex",
|
|
12
|
+
flexDirection: "column",
|
|
13
|
+
width: "100%",
|
|
14
|
+
height: "100%",
|
|
15
|
+
position: "relative",
|
|
16
|
+
overflow: "hidden",
|
|
17
|
+
"--scrollbar-margin": "2px",
|
|
18
|
+
"--scrollbar-click-area": "calc(var(--scrollbar-size) + calc(var(--scrollbar-margin) * 2))"
|
|
19
|
+
},
|
|
20
|
+
viewport: {
|
|
21
|
+
display: "flex",
|
|
22
|
+
flexDirection: "column",
|
|
23
|
+
height: "100%",
|
|
24
|
+
width: "100%",
|
|
25
|
+
borderRadius: "inherit",
|
|
26
|
+
WebkitOverflowScrolling: "touch",
|
|
27
|
+
scrollbarWidth: "none",
|
|
28
|
+
"&::-webkit-scrollbar": {
|
|
29
|
+
display: "none"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
content: {
|
|
33
|
+
minWidth: "100%"
|
|
34
|
+
},
|
|
35
|
+
scrollbar: {
|
|
36
|
+
display: "flex",
|
|
37
|
+
userSelect: "none",
|
|
38
|
+
touchAction: "none",
|
|
39
|
+
borderRadius: "full",
|
|
40
|
+
colorPalette: "gray",
|
|
41
|
+
transition: "opacity 150ms 300ms",
|
|
42
|
+
position: "relative",
|
|
43
|
+
margin: "var(--scrollbar-margin)",
|
|
44
|
+
"&:not([data-overflow-x], [data-overflow-y])": {
|
|
45
|
+
display: "none"
|
|
46
|
+
},
|
|
47
|
+
bg: "{colors.colorPalette.solid/10}",
|
|
48
|
+
"--thumb-bg": "{colors.colorPalette.solid/25}",
|
|
49
|
+
"&:is(:hover, :active)": {
|
|
50
|
+
"--thumb-bg": "{colors.colorPalette.solid/50}"
|
|
51
|
+
},
|
|
52
|
+
_before: {
|
|
53
|
+
content: '""',
|
|
54
|
+
position: "absolute"
|
|
55
|
+
},
|
|
56
|
+
_vertical: {
|
|
57
|
+
width: "var(--scrollbar-size)",
|
|
58
|
+
flexDirection: "column",
|
|
59
|
+
"&::before": {
|
|
60
|
+
width: "var(--scrollbar-click-area)",
|
|
61
|
+
height: "100%",
|
|
62
|
+
insetInlineStart: "calc(var(--scrollbar-margin) * -1)"
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
_horizontal: {
|
|
66
|
+
height: "var(--scrollbar-size)",
|
|
67
|
+
flexDirection: "row",
|
|
68
|
+
"&::before": {
|
|
69
|
+
height: "var(--scrollbar-click-area)",
|
|
70
|
+
width: "100%",
|
|
71
|
+
top: "calc(var(--scrollbar-margin) * -1)"
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
thumb: {
|
|
76
|
+
borderRadius: "inherit",
|
|
77
|
+
bg: "var(--thumb-bg)",
|
|
78
|
+
transition: "backgrounds",
|
|
79
|
+
_vertical: {
|
|
80
|
+
width: "full"
|
|
81
|
+
},
|
|
82
|
+
_horizontal: {
|
|
83
|
+
height: "full"
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
corner: {
|
|
87
|
+
bg: "bg.muted",
|
|
88
|
+
margin: "var(--scrollbar-margin)",
|
|
89
|
+
opacity: 0,
|
|
90
|
+
transition: "opacity 150ms 300ms",
|
|
91
|
+
"&[data-hover]": {
|
|
92
|
+
transitionDelay: "0ms",
|
|
93
|
+
opacity: 1
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
variants: {
|
|
98
|
+
variant: {
|
|
99
|
+
hover: {
|
|
100
|
+
scrollbar: {
|
|
101
|
+
opacity: "0",
|
|
102
|
+
"&[data-hover], &[data-scrolling]": {
|
|
103
|
+
opacity: "1",
|
|
104
|
+
transitionDuration: "faster",
|
|
105
|
+
transitionDelay: "0ms"
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
always: {
|
|
110
|
+
scrollbar: {
|
|
111
|
+
opacity: "1"
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
size: {
|
|
116
|
+
xs: {
|
|
117
|
+
root: {
|
|
118
|
+
"--scrollbar-size": "sizes.1"
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
sm: {
|
|
122
|
+
root: {
|
|
123
|
+
"--scrollbar-size": "sizes.1.5"
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
md: {
|
|
127
|
+
root: {
|
|
128
|
+
"--scrollbar-size": "sizes.2"
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
lg: {
|
|
132
|
+
root: {
|
|
133
|
+
"--scrollbar-size": "sizes.3"
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
defaultVariants: {
|
|
139
|
+
size: "md",
|
|
140
|
+
variant: "hover"
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
exports.scrollAreaSlotRecipe = scrollAreaSlotRecipe;
|
|
@@ -22,6 +22,7 @@ import { fieldsetSlotRecipe } from './fieldset.js';
|
|
|
22
22
|
import { fileUploadSlotRecipe } from './file-upload.js';
|
|
23
23
|
import { hoverCardSlotRecipe } from './hover-card.js';
|
|
24
24
|
import { listSlotRecipe } from './list.js';
|
|
25
|
+
import { listboxSlotRecipe } from './listbox.js';
|
|
25
26
|
import { menuSlotRecipe } from './menu.js';
|
|
26
27
|
import { nativeSelectSlotRecipe } from './native-select.js';
|
|
27
28
|
import { numberInputSlotRecipe } from './number-input.js';
|
|
@@ -33,6 +34,7 @@ import { qrCodeSlotRecipe } from './qr-code.js';
|
|
|
33
34
|
import { radioCardSlotRecipe } from './radio-card.js';
|
|
34
35
|
import { radioGroupSlotRecipe } from './radio-group.js';
|
|
35
36
|
import { ratingGroupSlotRecipe } from './rating-group.js';
|
|
37
|
+
import { scrollAreaSlotRecipe } from './scroll-area.js';
|
|
36
38
|
import { segmentGroupSlotRecipe } from './segment-group.js';
|
|
37
39
|
import { selectSlotRecipe } from './select.js';
|
|
38
40
|
import { sliderSlotRecipe } from './slider.js';
|
|
@@ -70,6 +72,7 @@ const slotRecipes = {
|
|
|
70
72
|
fileUpload: fileUploadSlotRecipe,
|
|
71
73
|
hoverCard: hoverCardSlotRecipe,
|
|
72
74
|
list: listSlotRecipe,
|
|
75
|
+
listbox: listboxSlotRecipe,
|
|
73
76
|
menu: menuSlotRecipe,
|
|
74
77
|
nativeSelect: nativeSelectSlotRecipe,
|
|
75
78
|
numberInput: numberInputSlotRecipe,
|
|
@@ -80,6 +83,7 @@ const slotRecipes = {
|
|
|
80
83
|
radioCard: radioCardSlotRecipe,
|
|
81
84
|
radioGroup: radioGroupSlotRecipe,
|
|
82
85
|
ratingGroup: ratingGroupSlotRecipe,
|
|
86
|
+
scrollArea: scrollAreaSlotRecipe,
|
|
83
87
|
segmentGroup: segmentGroupSlotRecipe,
|
|
84
88
|
select: selectSlotRecipe,
|
|
85
89
|
combobox: comboboxSlotRecipe,
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
import { defineSlotRecipe } from '../def.js';
|
|
3
|
+
|
|
4
|
+
const listboxSlotRecipe = defineSlotRecipe({
|
|
5
|
+
className: "listbox",
|
|
6
|
+
slots: [
|
|
7
|
+
"label",
|
|
8
|
+
"input",
|
|
9
|
+
"item",
|
|
10
|
+
"itemText",
|
|
11
|
+
"itemIndicator",
|
|
12
|
+
"itemGroup",
|
|
13
|
+
"itemGroupLabel",
|
|
14
|
+
"content",
|
|
15
|
+
"root",
|
|
16
|
+
"valueText",
|
|
17
|
+
"empty"
|
|
18
|
+
],
|
|
19
|
+
base: {
|
|
20
|
+
root: {
|
|
21
|
+
display: "flex",
|
|
22
|
+
flexDirection: "column",
|
|
23
|
+
gap: "1.5",
|
|
24
|
+
width: "full"
|
|
25
|
+
},
|
|
26
|
+
content: {
|
|
27
|
+
display: "flex",
|
|
28
|
+
maxH: "96",
|
|
29
|
+
p: "1",
|
|
30
|
+
gap: "1",
|
|
31
|
+
textStyle: "sm",
|
|
32
|
+
outline: "none",
|
|
33
|
+
scrollPadding: "1",
|
|
34
|
+
_horizontal: {
|
|
35
|
+
flexDirection: "row",
|
|
36
|
+
overflowX: "auto"
|
|
37
|
+
},
|
|
38
|
+
_vertical: {
|
|
39
|
+
flexDirection: "column",
|
|
40
|
+
overflowY: "auto"
|
|
41
|
+
},
|
|
42
|
+
"--listbox-item-padding-x": "spacing.2",
|
|
43
|
+
"--listbox-item-padding-y": "spacing.1.5"
|
|
44
|
+
},
|
|
45
|
+
item: {
|
|
46
|
+
position: "relative",
|
|
47
|
+
userSelect: "none",
|
|
48
|
+
display: "flex",
|
|
49
|
+
alignItems: "center",
|
|
50
|
+
gap: "2",
|
|
51
|
+
cursor: "pointer",
|
|
52
|
+
justifyContent: "space-between",
|
|
53
|
+
flex: "1",
|
|
54
|
+
textAlign: "start",
|
|
55
|
+
borderRadius: "l1",
|
|
56
|
+
py: "var(--listbox-item-padding-y)",
|
|
57
|
+
px: "var(--listbox-item-padding-x)",
|
|
58
|
+
_highlighted: {
|
|
59
|
+
outline: "2px solid",
|
|
60
|
+
outlineColor: "border.emphasized"
|
|
61
|
+
},
|
|
62
|
+
_disabled: {
|
|
63
|
+
pointerEvents: "none",
|
|
64
|
+
opacity: "0.5"
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
empty: {
|
|
68
|
+
py: "var(--listbox-item-padding-y)",
|
|
69
|
+
px: "var(--listbox-item-padding-x)"
|
|
70
|
+
},
|
|
71
|
+
itemText: {
|
|
72
|
+
flex: "1"
|
|
73
|
+
},
|
|
74
|
+
itemGroup: {
|
|
75
|
+
mt: "1.5",
|
|
76
|
+
_first: {
|
|
77
|
+
mt: "0"
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
itemGroupLabel: {
|
|
81
|
+
py: "1.5",
|
|
82
|
+
px: "2",
|
|
83
|
+
fontWeight: "medium"
|
|
84
|
+
},
|
|
85
|
+
label: {
|
|
86
|
+
fontWeight: "medium",
|
|
87
|
+
userSelect: "none",
|
|
88
|
+
textStyle: "sm",
|
|
89
|
+
_disabled: {
|
|
90
|
+
layerStyle: "disabled"
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
valueText: {
|
|
94
|
+
lineClamp: "1",
|
|
95
|
+
maxW: "80%"
|
|
96
|
+
},
|
|
97
|
+
itemIndicator: {
|
|
98
|
+
display: "flex",
|
|
99
|
+
alignItems: "center",
|
|
100
|
+
justifyContent: "center",
|
|
101
|
+
_icon: {
|
|
102
|
+
boxSize: "4"
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
variants: {
|
|
107
|
+
variant: {
|
|
108
|
+
subtle: {
|
|
109
|
+
content: {
|
|
110
|
+
bg: "bg.panel",
|
|
111
|
+
borderWidth: "1px",
|
|
112
|
+
borderRadius: "l2"
|
|
113
|
+
},
|
|
114
|
+
item: {
|
|
115
|
+
_hover: {
|
|
116
|
+
bg: "bg.emphasized/60"
|
|
117
|
+
},
|
|
118
|
+
_selected: {
|
|
119
|
+
bg: "bg.muted"
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
solid: {
|
|
124
|
+
content: {
|
|
125
|
+
bg: "bg.panel",
|
|
126
|
+
borderWidth: "1px",
|
|
127
|
+
borderRadius: "l2"
|
|
128
|
+
},
|
|
129
|
+
item: {
|
|
130
|
+
_selected: {
|
|
131
|
+
bg: "colorPalette.solid",
|
|
132
|
+
color: "colorPalette.contrast"
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
plain: {}
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
defaultVariants: {
|
|
140
|
+
variant: "subtle"
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
export { listboxSlotRecipe };
|
|
@@ -119,7 +119,8 @@ const menuSlotRecipe = defineSlotRecipe({
|
|
|
119
119
|
sm: {
|
|
120
120
|
content: {
|
|
121
121
|
minW: "8rem",
|
|
122
|
-
padding: "1"
|
|
122
|
+
padding: "1",
|
|
123
|
+
scrollPadding: "1"
|
|
123
124
|
},
|
|
124
125
|
item: {
|
|
125
126
|
gap: "1",
|
|
@@ -131,7 +132,8 @@ const menuSlotRecipe = defineSlotRecipe({
|
|
|
131
132
|
md: {
|
|
132
133
|
content: {
|
|
133
134
|
minW: "8rem",
|
|
134
|
-
padding: "1.5"
|
|
135
|
+
padding: "1.5",
|
|
136
|
+
scrollPadding: "1.5"
|
|
135
137
|
},
|
|
136
138
|
item: {
|
|
137
139
|
gap: "2",
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
import { defineSlotRecipe } from '../def.js';
|
|
3
|
+
|
|
4
|
+
const scrollAreaSlotRecipe = defineSlotRecipe({
|
|
5
|
+
className: "scroll-area",
|
|
6
|
+
slots: ["root", "viewport", "content", "scrollbar", "thumb", "corner"],
|
|
7
|
+
base: {
|
|
8
|
+
root: {
|
|
9
|
+
display: "flex",
|
|
10
|
+
flexDirection: "column",
|
|
11
|
+
width: "100%",
|
|
12
|
+
height: "100%",
|
|
13
|
+
position: "relative",
|
|
14
|
+
overflow: "hidden",
|
|
15
|
+
"--scrollbar-margin": "2px",
|
|
16
|
+
"--scrollbar-click-area": "calc(var(--scrollbar-size) + calc(var(--scrollbar-margin) * 2))"
|
|
17
|
+
},
|
|
18
|
+
viewport: {
|
|
19
|
+
display: "flex",
|
|
20
|
+
flexDirection: "column",
|
|
21
|
+
height: "100%",
|
|
22
|
+
width: "100%",
|
|
23
|
+
borderRadius: "inherit",
|
|
24
|
+
WebkitOverflowScrolling: "touch",
|
|
25
|
+
scrollbarWidth: "none",
|
|
26
|
+
"&::-webkit-scrollbar": {
|
|
27
|
+
display: "none"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
content: {
|
|
31
|
+
minWidth: "100%"
|
|
32
|
+
},
|
|
33
|
+
scrollbar: {
|
|
34
|
+
display: "flex",
|
|
35
|
+
userSelect: "none",
|
|
36
|
+
touchAction: "none",
|
|
37
|
+
borderRadius: "full",
|
|
38
|
+
colorPalette: "gray",
|
|
39
|
+
transition: "opacity 150ms 300ms",
|
|
40
|
+
position: "relative",
|
|
41
|
+
margin: "var(--scrollbar-margin)",
|
|
42
|
+
"&:not([data-overflow-x], [data-overflow-y])": {
|
|
43
|
+
display: "none"
|
|
44
|
+
},
|
|
45
|
+
bg: "{colors.colorPalette.solid/10}",
|
|
46
|
+
"--thumb-bg": "{colors.colorPalette.solid/25}",
|
|
47
|
+
"&:is(:hover, :active)": {
|
|
48
|
+
"--thumb-bg": "{colors.colorPalette.solid/50}"
|
|
49
|
+
},
|
|
50
|
+
_before: {
|
|
51
|
+
content: '""',
|
|
52
|
+
position: "absolute"
|
|
53
|
+
},
|
|
54
|
+
_vertical: {
|
|
55
|
+
width: "var(--scrollbar-size)",
|
|
56
|
+
flexDirection: "column",
|
|
57
|
+
"&::before": {
|
|
58
|
+
width: "var(--scrollbar-click-area)",
|
|
59
|
+
height: "100%",
|
|
60
|
+
insetInlineStart: "calc(var(--scrollbar-margin) * -1)"
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
_horizontal: {
|
|
64
|
+
height: "var(--scrollbar-size)",
|
|
65
|
+
flexDirection: "row",
|
|
66
|
+
"&::before": {
|
|
67
|
+
height: "var(--scrollbar-click-area)",
|
|
68
|
+
width: "100%",
|
|
69
|
+
top: "calc(var(--scrollbar-margin) * -1)"
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
thumb: {
|
|
74
|
+
borderRadius: "inherit",
|
|
75
|
+
bg: "var(--thumb-bg)",
|
|
76
|
+
transition: "backgrounds",
|
|
77
|
+
_vertical: {
|
|
78
|
+
width: "full"
|
|
79
|
+
},
|
|
80
|
+
_horizontal: {
|
|
81
|
+
height: "full"
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
corner: {
|
|
85
|
+
bg: "bg.muted",
|
|
86
|
+
margin: "var(--scrollbar-margin)",
|
|
87
|
+
opacity: 0,
|
|
88
|
+
transition: "opacity 150ms 300ms",
|
|
89
|
+
"&[data-hover]": {
|
|
90
|
+
transitionDelay: "0ms",
|
|
91
|
+
opacity: 1
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
variants: {
|
|
96
|
+
variant: {
|
|
97
|
+
hover: {
|
|
98
|
+
scrollbar: {
|
|
99
|
+
opacity: "0",
|
|
100
|
+
"&[data-hover], &[data-scrolling]": {
|
|
101
|
+
opacity: "1",
|
|
102
|
+
transitionDuration: "faster",
|
|
103
|
+
transitionDelay: "0ms"
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
always: {
|
|
108
|
+
scrollbar: {
|
|
109
|
+
opacity: "1"
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
size: {
|
|
114
|
+
xs: {
|
|
115
|
+
root: {
|
|
116
|
+
"--scrollbar-size": "sizes.1"
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
sm: {
|
|
120
|
+
root: {
|
|
121
|
+
"--scrollbar-size": "sizes.1.5"
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
md: {
|
|
125
|
+
root: {
|
|
126
|
+
"--scrollbar-size": "sizes.2"
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
lg: {
|
|
130
|
+
root: {
|
|
131
|
+
"--scrollbar-size": "sizes.3"
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
defaultVariants: {
|
|
137
|
+
size: "md",
|
|
138
|
+
variant: "hover"
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
|
|
142
|
+
export { scrollAreaSlotRecipe };
|
|
@@ -20,6 +20,7 @@ export declare const slotRecipes: {
|
|
|
20
20
|
fileUpload: import("@pandacss/types").SlotRecipeConfig;
|
|
21
21
|
hoverCard: import("@pandacss/types").SlotRecipeConfig;
|
|
22
22
|
list: import("@pandacss/types").SlotRecipeConfig;
|
|
23
|
+
listbox: import("@pandacss/types").SlotRecipeConfig;
|
|
23
24
|
menu: import("@pandacss/types").SlotRecipeConfig;
|
|
24
25
|
nativeSelect: import("@pandacss/types").SlotRecipeConfig;
|
|
25
26
|
numberInput: import("@pandacss/types").SlotRecipeConfig;
|
|
@@ -30,6 +31,7 @@ export declare const slotRecipes: {
|
|
|
30
31
|
radioCard: import("@pandacss/types").SlotRecipeConfig;
|
|
31
32
|
radioGroup: import("@pandacss/types").SlotRecipeConfig;
|
|
32
33
|
ratingGroup: import("@pandacss/types").SlotRecipeConfig;
|
|
34
|
+
scrollArea: import("@pandacss/types").SlotRecipeConfig;
|
|
33
35
|
segmentGroup: import("@pandacss/types").SlotRecipeConfig;
|
|
34
36
|
select: import("@pandacss/types").SlotRecipeConfig;
|
|
35
37
|
combobox: import("@pandacss/types").SlotRecipeConfig;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const listboxSlotRecipe: import("@pandacss/types").SlotRecipeConfig;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const scrollAreaSlotRecipe: import("@pandacss/types").SlotRecipeConfig;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chakra-ui/panda-preset",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.26.0",
|
|
4
4
|
"description": "Panda preset for Chakra UI",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/cjs/index.cjs",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"globby": "14.1.0",
|
|
52
|
-
"@chakra-ui/cli": "3.
|
|
52
|
+
"@chakra-ui/cli": "3.26.0"
|
|
53
53
|
},
|
|
54
54
|
"scripts": {
|
|
55
55
|
"theme:eject": "chakra eject --outdir=src",
|