@chakra-ui/panda-preset 3.21.1 → 3.23.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 +1 -1
- package/dist/cjs/recipes/radiomark.cjs +1 -1
- package/dist/cjs/slot-recipes/checkbox-card.cjs +2 -2
- package/dist/cjs/slot-recipes/checkbox.cjs +1 -1
- package/dist/cjs/slot-recipes/dialog.cjs +5 -5
- package/dist/cjs/slot-recipes/editable.cjs +1 -1
- package/dist/cjs/slot-recipes/index.cjs +3 -1
- package/dist/cjs/slot-recipes/native-select.cjs +22 -10
- package/dist/cjs/slot-recipes/radio-card.cjs +2 -2
- package/dist/cjs/slot-recipes/radio-group.cjs +1 -1
- package/dist/cjs/slot-recipes/tree-view.cjs +213 -0
- package/dist/esm/recipes/checkmark.js +1 -1
- package/dist/esm/recipes/radiomark.js +1 -1
- package/dist/esm/slot-recipes/checkbox-card.js +2 -2
- package/dist/esm/slot-recipes/checkbox.js +1 -1
- package/dist/esm/slot-recipes/dialog.js +5 -5
- package/dist/esm/slot-recipes/editable.js +1 -1
- package/dist/esm/slot-recipes/index.js +3 -1
- package/dist/esm/slot-recipes/native-select.js +22 -10
- package/dist/esm/slot-recipes/radio-card.js +2 -2
- package/dist/esm/slot-recipes/radio-group.js +1 -1
- package/dist/esm/slot-recipes/tree-view.js +211 -0
- package/dist/types/slot-recipes/index.d.ts +1 -0
- package/dist/types/slot-recipes/tree-view.d.ts +1 -0
- package/package.json +2 -2
|
@@ -47,7 +47,7 @@ const checkmarkRecipe = def.defineRecipe({
|
|
|
47
47
|
},
|
|
48
48
|
variant: {
|
|
49
49
|
solid: {
|
|
50
|
-
borderColor: "border",
|
|
50
|
+
borderColor: "border.emphasized",
|
|
51
51
|
"&:is([data-state=checked], [data-state=indeterminate])": {
|
|
52
52
|
bg: "colorPalette.solid",
|
|
53
53
|
color: "colorPalette.contrast",
|
|
@@ -164,7 +164,7 @@ const checkboxCardSlotRecipe = def.defineSlotRecipe({
|
|
|
164
164
|
}
|
|
165
165
|
},
|
|
166
166
|
indicator: {
|
|
167
|
-
borderColor: "border",
|
|
167
|
+
borderColor: "border.emphasized",
|
|
168
168
|
"&:is([data-state=checked], [data-state=indeterminate])": {
|
|
169
169
|
bg: "colorPalette.solid",
|
|
170
170
|
color: "colorPalette.contrast",
|
|
@@ -199,7 +199,7 @@ const checkboxCardSlotRecipe = def.defineSlotRecipe({
|
|
|
199
199
|
}
|
|
200
200
|
},
|
|
201
201
|
indicator: {
|
|
202
|
-
borderColor: "border",
|
|
202
|
+
borderColor: "border.emphasized",
|
|
203
203
|
"&:is([data-state=checked], [data-state=indeterminate])": {
|
|
204
204
|
bg: "colorPalette.solid",
|
|
205
205
|
color: "colorPalette.contrast",
|
|
@@ -106,7 +106,7 @@ const checkboxSlotRecipe = def.defineSlotRecipe({
|
|
|
106
106
|
},
|
|
107
107
|
solid: {
|
|
108
108
|
control: {
|
|
109
|
-
borderColor: "border",
|
|
109
|
+
borderColor: "border.emphasized",
|
|
110
110
|
"&:is([data-state=checked], [data-state=indeterminate])": {
|
|
111
111
|
bg: "colorPalette.solid",
|
|
112
112
|
color: "colorPalette.contrast",
|
|
@@ -24,9 +24,9 @@ const dialogSlotRecipe = def.defineSlotRecipe({
|
|
|
24
24
|
pos: "fixed",
|
|
25
25
|
left: 0,
|
|
26
26
|
top: 0,
|
|
27
|
-
w: "
|
|
27
|
+
w: "100dvw",
|
|
28
28
|
h: "100dvh",
|
|
29
|
-
zIndex: "
|
|
29
|
+
zIndex: "var(--z-index)",
|
|
30
30
|
_open: {
|
|
31
31
|
animationName: "fade-in",
|
|
32
32
|
animationDuration: "slow"
|
|
@@ -38,7 +38,7 @@ const dialogSlotRecipe = def.defineSlotRecipe({
|
|
|
38
38
|
},
|
|
39
39
|
positioner: {
|
|
40
40
|
display: "flex",
|
|
41
|
-
width: "
|
|
41
|
+
width: "100dvw",
|
|
42
42
|
height: "100dvh",
|
|
43
43
|
position: "fixed",
|
|
44
44
|
left: 0,
|
|
@@ -191,8 +191,8 @@ const dialogSlotRecipe = def.defineSlotRecipe({
|
|
|
191
191
|
},
|
|
192
192
|
full: {
|
|
193
193
|
content: {
|
|
194
|
-
maxW: "
|
|
195
|
-
minH: "
|
|
194
|
+
maxW: "100dvw",
|
|
195
|
+
minH: "100dvh",
|
|
196
196
|
"--dialog-margin": "0",
|
|
197
197
|
borderRadius: "0"
|
|
198
198
|
}
|
|
@@ -47,6 +47,7 @@ var tag = require('./tag.cjs');
|
|
|
47
47
|
var timeline = require('./timeline.cjs');
|
|
48
48
|
var toast = require('./toast.cjs');
|
|
49
49
|
var tooltip = require('./tooltip.cjs');
|
|
50
|
+
var treeView = require('./tree-view.cjs');
|
|
50
51
|
|
|
51
52
|
const slotRecipes = {
|
|
52
53
|
accordion: accordion.accordionSlotRecipe,
|
|
@@ -94,7 +95,8 @@ const slotRecipes = {
|
|
|
94
95
|
status: status.statusSlotRecipe,
|
|
95
96
|
timeline: timeline.timelineSlotRecipe,
|
|
96
97
|
colorPicker: colorPicker.colorPickerSlotRecipe,
|
|
97
|
-
qrCode: qrCode.qrCodeSlotRecipe
|
|
98
|
+
qrCode: qrCode.qrCodeSlotRecipe,
|
|
99
|
+
treeView: treeView.treeViewSlotRecipe
|
|
98
100
|
};
|
|
99
101
|
|
|
100
102
|
exports.slotRecipes = slotRecipes;
|
|
@@ -20,6 +20,8 @@ const nativeSelectSlotRecipe = def.defineSlotRecipe({
|
|
|
20
20
|
appearance: "none",
|
|
21
21
|
borderRadius: "l2",
|
|
22
22
|
"--error-color": "colors.border.error",
|
|
23
|
+
"--input-height": "var(--select-field-height)",
|
|
24
|
+
height: "var(--select-field-height)",
|
|
23
25
|
_disabled: {
|
|
24
26
|
layerStyle: "disabled"
|
|
25
27
|
},
|
|
@@ -84,11 +86,13 @@ const nativeSelectSlotRecipe = def.defineSlotRecipe({
|
|
|
84
86
|
},
|
|
85
87
|
size: {
|
|
86
88
|
xs: {
|
|
89
|
+
root: {
|
|
90
|
+
"--select-field-height": "sizes.8"
|
|
91
|
+
},
|
|
87
92
|
field: {
|
|
88
93
|
textStyle: "xs",
|
|
89
94
|
ps: "2",
|
|
90
|
-
pe: "6"
|
|
91
|
-
height: "6"
|
|
95
|
+
pe: "6"
|
|
92
96
|
},
|
|
93
97
|
indicator: {
|
|
94
98
|
textStyle: "sm",
|
|
@@ -96,11 +100,13 @@ const nativeSelectSlotRecipe = def.defineSlotRecipe({
|
|
|
96
100
|
}
|
|
97
101
|
},
|
|
98
102
|
sm: {
|
|
103
|
+
root: {
|
|
104
|
+
"--select-field-height": "sizes.9"
|
|
105
|
+
},
|
|
99
106
|
field: {
|
|
100
107
|
textStyle: "sm",
|
|
101
108
|
ps: "2.5",
|
|
102
|
-
pe: "8"
|
|
103
|
-
height: "8"
|
|
109
|
+
pe: "8"
|
|
104
110
|
},
|
|
105
111
|
indicator: {
|
|
106
112
|
textStyle: "md",
|
|
@@ -108,11 +114,13 @@ const nativeSelectSlotRecipe = def.defineSlotRecipe({
|
|
|
108
114
|
}
|
|
109
115
|
},
|
|
110
116
|
md: {
|
|
117
|
+
root: {
|
|
118
|
+
"--select-field-height": "sizes.10"
|
|
119
|
+
},
|
|
111
120
|
field: {
|
|
112
121
|
textStyle: "sm",
|
|
113
122
|
ps: "3",
|
|
114
|
-
pe: "8"
|
|
115
|
-
height: "10"
|
|
123
|
+
pe: "8"
|
|
116
124
|
},
|
|
117
125
|
indicator: {
|
|
118
126
|
textStyle: "lg",
|
|
@@ -120,11 +128,13 @@ const nativeSelectSlotRecipe = def.defineSlotRecipe({
|
|
|
120
128
|
}
|
|
121
129
|
},
|
|
122
130
|
lg: {
|
|
131
|
+
root: {
|
|
132
|
+
"--select-field-height": "sizes.11"
|
|
133
|
+
},
|
|
123
134
|
field: {
|
|
124
135
|
textStyle: "md",
|
|
125
136
|
ps: "4",
|
|
126
|
-
pe: "8"
|
|
127
|
-
height: "11"
|
|
137
|
+
pe: "8"
|
|
128
138
|
},
|
|
129
139
|
indicator: {
|
|
130
140
|
textStyle: "xl",
|
|
@@ -132,11 +142,13 @@ const nativeSelectSlotRecipe = def.defineSlotRecipe({
|
|
|
132
142
|
}
|
|
133
143
|
},
|
|
134
144
|
xl: {
|
|
145
|
+
root: {
|
|
146
|
+
"--select-field-height": "sizes.12"
|
|
147
|
+
},
|
|
135
148
|
field: {
|
|
136
149
|
textStyle: "md",
|
|
137
150
|
ps: "4.5",
|
|
138
|
-
pe: "10"
|
|
139
|
-
height: "12"
|
|
151
|
+
pe: "10"
|
|
140
152
|
},
|
|
141
153
|
indicator: {
|
|
142
154
|
textStyle: "xl",
|
|
@@ -182,7 +182,7 @@ const radioCardSlotRecipe = def.defineSlotRecipe({
|
|
|
182
182
|
},
|
|
183
183
|
itemIndicator: {
|
|
184
184
|
borderWidth: "1px",
|
|
185
|
-
borderColor: "border",
|
|
185
|
+
borderColor: "border.emphasized",
|
|
186
186
|
_checked: {
|
|
187
187
|
bg: "colorPalette.solid",
|
|
188
188
|
color: "colorPalette.contrast",
|
|
@@ -223,7 +223,7 @@ const radioCardSlotRecipe = def.defineSlotRecipe({
|
|
|
223
223
|
},
|
|
224
224
|
itemIndicator: {
|
|
225
225
|
borderWidth: "1px",
|
|
226
|
-
borderColor: "border",
|
|
226
|
+
borderColor: "border.emphasized",
|
|
227
227
|
_checked: {
|
|
228
228
|
bg: "colorPalette.solid",
|
|
229
229
|
color: "colorPalette.contrast",
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
var def = require('../def.cjs');
|
|
5
|
+
|
|
6
|
+
const treeViewSlotRecipe = def.defineSlotRecipe({
|
|
7
|
+
slots: [
|
|
8
|
+
"branch",
|
|
9
|
+
"branchContent",
|
|
10
|
+
"branchControl",
|
|
11
|
+
"branchIndentGuide",
|
|
12
|
+
"branchIndicator",
|
|
13
|
+
"branchText",
|
|
14
|
+
"branchTrigger",
|
|
15
|
+
"item",
|
|
16
|
+
"itemIndicator",
|
|
17
|
+
"itemText",
|
|
18
|
+
"label",
|
|
19
|
+
"nodeCheckbox",
|
|
20
|
+
"root",
|
|
21
|
+
"tree"
|
|
22
|
+
],
|
|
23
|
+
className: "tree-view",
|
|
24
|
+
base: {
|
|
25
|
+
root: {
|
|
26
|
+
width: "full",
|
|
27
|
+
display: "flex",
|
|
28
|
+
flexDirection: "column",
|
|
29
|
+
gap: "2"
|
|
30
|
+
},
|
|
31
|
+
tree: {
|
|
32
|
+
display: "flex",
|
|
33
|
+
flexDirection: "column",
|
|
34
|
+
"--tree-item-gap": "spacing.2",
|
|
35
|
+
_icon: {
|
|
36
|
+
boxSize: "var(--tree-icon-size)"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
label: {
|
|
40
|
+
fontWeight: "medium",
|
|
41
|
+
textStyle: "sm"
|
|
42
|
+
},
|
|
43
|
+
branch: {
|
|
44
|
+
position: "relative"
|
|
45
|
+
},
|
|
46
|
+
branchContent: {
|
|
47
|
+
position: "relative"
|
|
48
|
+
},
|
|
49
|
+
branchIndentGuide: {
|
|
50
|
+
height: "100%",
|
|
51
|
+
width: "1px",
|
|
52
|
+
bg: "border",
|
|
53
|
+
position: "absolute",
|
|
54
|
+
"--tree-depth": "calc(var(--depth) - 1)",
|
|
55
|
+
"--tree-indentation-offset": "calc(var(--tree-indentation) * var(--tree-depth))",
|
|
56
|
+
"--tree-offset": "calc(var(--tree-padding-inline) + var(--tree-indentation-offset))",
|
|
57
|
+
"--tree-icon-offset": "calc(var(--tree-icon-size) * 0.5 * var(--depth))",
|
|
58
|
+
insetInlineStart: "calc(var(--tree-offset) + var(--tree-icon-offset))",
|
|
59
|
+
zIndex: "1"
|
|
60
|
+
},
|
|
61
|
+
branchIndicator: {
|
|
62
|
+
color: "fg.muted",
|
|
63
|
+
transformOrigin: "center",
|
|
64
|
+
transitionDuration: "normal",
|
|
65
|
+
transitionProperty: "transform",
|
|
66
|
+
transitionTimingFunction: "default",
|
|
67
|
+
_open: {
|
|
68
|
+
transform: "rotate(90deg)"
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
branchTrigger: {
|
|
72
|
+
display: "inline-flex",
|
|
73
|
+
alignItems: "center",
|
|
74
|
+
justifyContent: "center"
|
|
75
|
+
},
|
|
76
|
+
branchControl: {
|
|
77
|
+
display: "flex",
|
|
78
|
+
alignItems: "center",
|
|
79
|
+
gap: "var(--tree-item-gap)",
|
|
80
|
+
rounded: "l2",
|
|
81
|
+
userSelect: "none",
|
|
82
|
+
position: "relative",
|
|
83
|
+
"--tree-depth": "calc(var(--depth) - 1)",
|
|
84
|
+
"--tree-indentation-offset": "calc(var(--tree-indentation) * var(--tree-depth))",
|
|
85
|
+
"--tree-icon-offset": "calc(var(--tree-icon-size) * var(--tree-depth) * 0.5)",
|
|
86
|
+
"--tree-offset": "calc(var(--tree-padding-inline) + var(--tree-indentation-offset) + var(--tree-icon-offset))",
|
|
87
|
+
ps: "var(--tree-offset)",
|
|
88
|
+
pe: "var(--tree-padding-inline)",
|
|
89
|
+
py: "var(--tree-padding-block)",
|
|
90
|
+
focusVisibleRing: "inside",
|
|
91
|
+
focusRingColor: "border.emphasized",
|
|
92
|
+
focusRingWidth: "2px",
|
|
93
|
+
"&:hover, &:focus-visible": {
|
|
94
|
+
bg: "bg.muted"
|
|
95
|
+
},
|
|
96
|
+
_disabled: {
|
|
97
|
+
layerStyle: "disabled"
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
item: {
|
|
101
|
+
display: "flex",
|
|
102
|
+
alignItems: "center",
|
|
103
|
+
gap: "var(--tree-item-gap)",
|
|
104
|
+
rounded: "l2",
|
|
105
|
+
userSelect: "none",
|
|
106
|
+
position: "relative",
|
|
107
|
+
"--tree-depth": "calc(var(--depth) - 1)",
|
|
108
|
+
"--tree-indentation-offset": "calc(var(--tree-indentation) * var(--tree-depth))",
|
|
109
|
+
"--tree-icon-offset": "calc(var(--tree-icon-size) * var(--tree-depth) * 0.5)",
|
|
110
|
+
"--tree-offset": "calc(var(--tree-padding-inline) + var(--tree-indentation-offset) + var(--tree-icon-offset))",
|
|
111
|
+
ps: "var(--tree-offset)",
|
|
112
|
+
pe: "var(--tree-padding-inline)",
|
|
113
|
+
py: "var(--tree-padding-block)",
|
|
114
|
+
focusVisibleRing: "inside",
|
|
115
|
+
focusRingColor: "border.emphasized",
|
|
116
|
+
focusRingWidth: "2px",
|
|
117
|
+
"&:hover, &:focus-visible": {
|
|
118
|
+
bg: "bg.muted"
|
|
119
|
+
},
|
|
120
|
+
_disabled: {
|
|
121
|
+
layerStyle: "disabled"
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
itemText: {
|
|
125
|
+
flex: "1"
|
|
126
|
+
},
|
|
127
|
+
branchText: {
|
|
128
|
+
flex: "1"
|
|
129
|
+
},
|
|
130
|
+
nodeCheckbox: {
|
|
131
|
+
display: "inline-flex"
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
variants: {
|
|
135
|
+
size: {
|
|
136
|
+
md: {
|
|
137
|
+
tree: {
|
|
138
|
+
textStyle: "sm",
|
|
139
|
+
"--tree-indentation": "spacing.4",
|
|
140
|
+
"--tree-padding-inline": "spacing.3",
|
|
141
|
+
"--tree-padding-block": "spacing.1.5",
|
|
142
|
+
"--tree-icon-size": "spacing.4"
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
sm: {
|
|
146
|
+
tree: {
|
|
147
|
+
textStyle: "sm",
|
|
148
|
+
"--tree-indentation": "spacing.4",
|
|
149
|
+
"--tree-padding-inline": "spacing.3",
|
|
150
|
+
"--tree-padding-block": "spacing.1",
|
|
151
|
+
"--tree-icon-size": "spacing.3"
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
xs: {
|
|
155
|
+
tree: {
|
|
156
|
+
textStyle: "xs",
|
|
157
|
+
"--tree-indentation": "spacing.4",
|
|
158
|
+
"--tree-padding-inline": "spacing.2",
|
|
159
|
+
"--tree-padding-block": "spacing.1",
|
|
160
|
+
"--tree-icon-size": "spacing.3"
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
variant: {
|
|
165
|
+
subtle: {
|
|
166
|
+
branchControl: {
|
|
167
|
+
_selected: {
|
|
168
|
+
bg: "colorPalette.subtle",
|
|
169
|
+
color: "colorPalette.fg"
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
item: {
|
|
173
|
+
_selected: {
|
|
174
|
+
bg: "colorPalette.subtle",
|
|
175
|
+
color: "colorPalette.fg"
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
solid: {
|
|
180
|
+
branchControl: {
|
|
181
|
+
_selected: {
|
|
182
|
+
layerStyle: "fill.solid"
|
|
183
|
+
}
|
|
184
|
+
},
|
|
185
|
+
item: {
|
|
186
|
+
_selected: {
|
|
187
|
+
layerStyle: "fill.solid"
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
animateContent: {
|
|
193
|
+
true: {
|
|
194
|
+
branchContent: {
|
|
195
|
+
_open: {
|
|
196
|
+
animationName: "expand-height, fade-in",
|
|
197
|
+
animationDuration: "moderate"
|
|
198
|
+
},
|
|
199
|
+
_closed: {
|
|
200
|
+
animationName: "collapse-height, fade-out",
|
|
201
|
+
animationDuration: "moderate"
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
defaultVariants: {
|
|
208
|
+
size: "md",
|
|
209
|
+
variant: "subtle"
|
|
210
|
+
}
|
|
211
|
+
});
|
|
212
|
+
|
|
213
|
+
exports.treeViewSlotRecipe = treeViewSlotRecipe;
|
|
@@ -45,7 +45,7 @@ const checkmarkRecipe = defineRecipe({
|
|
|
45
45
|
},
|
|
46
46
|
variant: {
|
|
47
47
|
solid: {
|
|
48
|
-
borderColor: "border",
|
|
48
|
+
borderColor: "border.emphasized",
|
|
49
49
|
"&:is([data-state=checked], [data-state=indeterminate])": {
|
|
50
50
|
bg: "colorPalette.solid",
|
|
51
51
|
color: "colorPalette.contrast",
|
|
@@ -162,7 +162,7 @@ const checkboxCardSlotRecipe = defineSlotRecipe({
|
|
|
162
162
|
}
|
|
163
163
|
},
|
|
164
164
|
indicator: {
|
|
165
|
-
borderColor: "border",
|
|
165
|
+
borderColor: "border.emphasized",
|
|
166
166
|
"&:is([data-state=checked], [data-state=indeterminate])": {
|
|
167
167
|
bg: "colorPalette.solid",
|
|
168
168
|
color: "colorPalette.contrast",
|
|
@@ -197,7 +197,7 @@ const checkboxCardSlotRecipe = defineSlotRecipe({
|
|
|
197
197
|
}
|
|
198
198
|
},
|
|
199
199
|
indicator: {
|
|
200
|
-
borderColor: "border",
|
|
200
|
+
borderColor: "border.emphasized",
|
|
201
201
|
"&:is([data-state=checked], [data-state=indeterminate])": {
|
|
202
202
|
bg: "colorPalette.solid",
|
|
203
203
|
color: "colorPalette.contrast",
|
|
@@ -104,7 +104,7 @@ const checkboxSlotRecipe = defineSlotRecipe({
|
|
|
104
104
|
},
|
|
105
105
|
solid: {
|
|
106
106
|
control: {
|
|
107
|
-
borderColor: "border",
|
|
107
|
+
borderColor: "border.emphasized",
|
|
108
108
|
"&:is([data-state=checked], [data-state=indeterminate])": {
|
|
109
109
|
bg: "colorPalette.solid",
|
|
110
110
|
color: "colorPalette.contrast",
|
|
@@ -22,9 +22,9 @@ const dialogSlotRecipe = defineSlotRecipe({
|
|
|
22
22
|
pos: "fixed",
|
|
23
23
|
left: 0,
|
|
24
24
|
top: 0,
|
|
25
|
-
w: "
|
|
25
|
+
w: "100dvw",
|
|
26
26
|
h: "100dvh",
|
|
27
|
-
zIndex: "
|
|
27
|
+
zIndex: "var(--z-index)",
|
|
28
28
|
_open: {
|
|
29
29
|
animationName: "fade-in",
|
|
30
30
|
animationDuration: "slow"
|
|
@@ -36,7 +36,7 @@ const dialogSlotRecipe = defineSlotRecipe({
|
|
|
36
36
|
},
|
|
37
37
|
positioner: {
|
|
38
38
|
display: "flex",
|
|
39
|
-
width: "
|
|
39
|
+
width: "100dvw",
|
|
40
40
|
height: "100dvh",
|
|
41
41
|
position: "fixed",
|
|
42
42
|
left: 0,
|
|
@@ -189,8 +189,8 @@ const dialogSlotRecipe = defineSlotRecipe({
|
|
|
189
189
|
},
|
|
190
190
|
full: {
|
|
191
191
|
content: {
|
|
192
|
-
maxW: "
|
|
193
|
-
minH: "
|
|
192
|
+
maxW: "100dvw",
|
|
193
|
+
minH: "100dvh",
|
|
194
194
|
"--dialog-margin": "0",
|
|
195
195
|
borderRadius: "0"
|
|
196
196
|
}
|
|
@@ -45,6 +45,7 @@ import { tagSlotRecipe } from './tag.js';
|
|
|
45
45
|
import { timelineSlotRecipe } from './timeline.js';
|
|
46
46
|
import { toastSlotRecipe } from './toast.js';
|
|
47
47
|
import { tooltipSlotRecipe } from './tooltip.js';
|
|
48
|
+
import { treeViewSlotRecipe } from './tree-view.js';
|
|
48
49
|
|
|
49
50
|
const slotRecipes = {
|
|
50
51
|
accordion: accordionSlotRecipe,
|
|
@@ -92,7 +93,8 @@ const slotRecipes = {
|
|
|
92
93
|
status: statusSlotRecipe,
|
|
93
94
|
timeline: timelineSlotRecipe,
|
|
94
95
|
colorPicker: colorPickerSlotRecipe,
|
|
95
|
-
qrCode: qrCodeSlotRecipe
|
|
96
|
+
qrCode: qrCodeSlotRecipe,
|
|
97
|
+
treeView: treeViewSlotRecipe
|
|
96
98
|
};
|
|
97
99
|
|
|
98
100
|
export { slotRecipes };
|
|
@@ -18,6 +18,8 @@ const nativeSelectSlotRecipe = defineSlotRecipe({
|
|
|
18
18
|
appearance: "none",
|
|
19
19
|
borderRadius: "l2",
|
|
20
20
|
"--error-color": "colors.border.error",
|
|
21
|
+
"--input-height": "var(--select-field-height)",
|
|
22
|
+
height: "var(--select-field-height)",
|
|
21
23
|
_disabled: {
|
|
22
24
|
layerStyle: "disabled"
|
|
23
25
|
},
|
|
@@ -82,11 +84,13 @@ const nativeSelectSlotRecipe = defineSlotRecipe({
|
|
|
82
84
|
},
|
|
83
85
|
size: {
|
|
84
86
|
xs: {
|
|
87
|
+
root: {
|
|
88
|
+
"--select-field-height": "sizes.8"
|
|
89
|
+
},
|
|
85
90
|
field: {
|
|
86
91
|
textStyle: "xs",
|
|
87
92
|
ps: "2",
|
|
88
|
-
pe: "6"
|
|
89
|
-
height: "6"
|
|
93
|
+
pe: "6"
|
|
90
94
|
},
|
|
91
95
|
indicator: {
|
|
92
96
|
textStyle: "sm",
|
|
@@ -94,11 +98,13 @@ const nativeSelectSlotRecipe = defineSlotRecipe({
|
|
|
94
98
|
}
|
|
95
99
|
},
|
|
96
100
|
sm: {
|
|
101
|
+
root: {
|
|
102
|
+
"--select-field-height": "sizes.9"
|
|
103
|
+
},
|
|
97
104
|
field: {
|
|
98
105
|
textStyle: "sm",
|
|
99
106
|
ps: "2.5",
|
|
100
|
-
pe: "8"
|
|
101
|
-
height: "8"
|
|
107
|
+
pe: "8"
|
|
102
108
|
},
|
|
103
109
|
indicator: {
|
|
104
110
|
textStyle: "md",
|
|
@@ -106,11 +112,13 @@ const nativeSelectSlotRecipe = defineSlotRecipe({
|
|
|
106
112
|
}
|
|
107
113
|
},
|
|
108
114
|
md: {
|
|
115
|
+
root: {
|
|
116
|
+
"--select-field-height": "sizes.10"
|
|
117
|
+
},
|
|
109
118
|
field: {
|
|
110
119
|
textStyle: "sm",
|
|
111
120
|
ps: "3",
|
|
112
|
-
pe: "8"
|
|
113
|
-
height: "10"
|
|
121
|
+
pe: "8"
|
|
114
122
|
},
|
|
115
123
|
indicator: {
|
|
116
124
|
textStyle: "lg",
|
|
@@ -118,11 +126,13 @@ const nativeSelectSlotRecipe = defineSlotRecipe({
|
|
|
118
126
|
}
|
|
119
127
|
},
|
|
120
128
|
lg: {
|
|
129
|
+
root: {
|
|
130
|
+
"--select-field-height": "sizes.11"
|
|
131
|
+
},
|
|
121
132
|
field: {
|
|
122
133
|
textStyle: "md",
|
|
123
134
|
ps: "4",
|
|
124
|
-
pe: "8"
|
|
125
|
-
height: "11"
|
|
135
|
+
pe: "8"
|
|
126
136
|
},
|
|
127
137
|
indicator: {
|
|
128
138
|
textStyle: "xl",
|
|
@@ -130,11 +140,13 @@ const nativeSelectSlotRecipe = defineSlotRecipe({
|
|
|
130
140
|
}
|
|
131
141
|
},
|
|
132
142
|
xl: {
|
|
143
|
+
root: {
|
|
144
|
+
"--select-field-height": "sizes.12"
|
|
145
|
+
},
|
|
133
146
|
field: {
|
|
134
147
|
textStyle: "md",
|
|
135
148
|
ps: "4.5",
|
|
136
|
-
pe: "10"
|
|
137
|
-
height: "12"
|
|
149
|
+
pe: "10"
|
|
138
150
|
},
|
|
139
151
|
indicator: {
|
|
140
152
|
textStyle: "xl",
|
|
@@ -180,7 +180,7 @@ const radioCardSlotRecipe = defineSlotRecipe({
|
|
|
180
180
|
},
|
|
181
181
|
itemIndicator: {
|
|
182
182
|
borderWidth: "1px",
|
|
183
|
-
borderColor: "border",
|
|
183
|
+
borderColor: "border.emphasized",
|
|
184
184
|
_checked: {
|
|
185
185
|
bg: "colorPalette.solid",
|
|
186
186
|
color: "colorPalette.contrast",
|
|
@@ -221,7 +221,7 @@ const radioCardSlotRecipe = defineSlotRecipe({
|
|
|
221
221
|
},
|
|
222
222
|
itemIndicator: {
|
|
223
223
|
borderWidth: "1px",
|
|
224
|
-
borderColor: "border",
|
|
224
|
+
borderColor: "border.emphasized",
|
|
225
225
|
_checked: {
|
|
226
226
|
bg: "colorPalette.solid",
|
|
227
227
|
color: "colorPalette.contrast",
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
import { defineSlotRecipe } from '../def.js';
|
|
3
|
+
|
|
4
|
+
const treeViewSlotRecipe = defineSlotRecipe({
|
|
5
|
+
slots: [
|
|
6
|
+
"branch",
|
|
7
|
+
"branchContent",
|
|
8
|
+
"branchControl",
|
|
9
|
+
"branchIndentGuide",
|
|
10
|
+
"branchIndicator",
|
|
11
|
+
"branchText",
|
|
12
|
+
"branchTrigger",
|
|
13
|
+
"item",
|
|
14
|
+
"itemIndicator",
|
|
15
|
+
"itemText",
|
|
16
|
+
"label",
|
|
17
|
+
"nodeCheckbox",
|
|
18
|
+
"root",
|
|
19
|
+
"tree"
|
|
20
|
+
],
|
|
21
|
+
className: "tree-view",
|
|
22
|
+
base: {
|
|
23
|
+
root: {
|
|
24
|
+
width: "full",
|
|
25
|
+
display: "flex",
|
|
26
|
+
flexDirection: "column",
|
|
27
|
+
gap: "2"
|
|
28
|
+
},
|
|
29
|
+
tree: {
|
|
30
|
+
display: "flex",
|
|
31
|
+
flexDirection: "column",
|
|
32
|
+
"--tree-item-gap": "spacing.2",
|
|
33
|
+
_icon: {
|
|
34
|
+
boxSize: "var(--tree-icon-size)"
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
label: {
|
|
38
|
+
fontWeight: "medium",
|
|
39
|
+
textStyle: "sm"
|
|
40
|
+
},
|
|
41
|
+
branch: {
|
|
42
|
+
position: "relative"
|
|
43
|
+
},
|
|
44
|
+
branchContent: {
|
|
45
|
+
position: "relative"
|
|
46
|
+
},
|
|
47
|
+
branchIndentGuide: {
|
|
48
|
+
height: "100%",
|
|
49
|
+
width: "1px",
|
|
50
|
+
bg: "border",
|
|
51
|
+
position: "absolute",
|
|
52
|
+
"--tree-depth": "calc(var(--depth) - 1)",
|
|
53
|
+
"--tree-indentation-offset": "calc(var(--tree-indentation) * var(--tree-depth))",
|
|
54
|
+
"--tree-offset": "calc(var(--tree-padding-inline) + var(--tree-indentation-offset))",
|
|
55
|
+
"--tree-icon-offset": "calc(var(--tree-icon-size) * 0.5 * var(--depth))",
|
|
56
|
+
insetInlineStart: "calc(var(--tree-offset) + var(--tree-icon-offset))",
|
|
57
|
+
zIndex: "1"
|
|
58
|
+
},
|
|
59
|
+
branchIndicator: {
|
|
60
|
+
color: "fg.muted",
|
|
61
|
+
transformOrigin: "center",
|
|
62
|
+
transitionDuration: "normal",
|
|
63
|
+
transitionProperty: "transform",
|
|
64
|
+
transitionTimingFunction: "default",
|
|
65
|
+
_open: {
|
|
66
|
+
transform: "rotate(90deg)"
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
branchTrigger: {
|
|
70
|
+
display: "inline-flex",
|
|
71
|
+
alignItems: "center",
|
|
72
|
+
justifyContent: "center"
|
|
73
|
+
},
|
|
74
|
+
branchControl: {
|
|
75
|
+
display: "flex",
|
|
76
|
+
alignItems: "center",
|
|
77
|
+
gap: "var(--tree-item-gap)",
|
|
78
|
+
rounded: "l2",
|
|
79
|
+
userSelect: "none",
|
|
80
|
+
position: "relative",
|
|
81
|
+
"--tree-depth": "calc(var(--depth) - 1)",
|
|
82
|
+
"--tree-indentation-offset": "calc(var(--tree-indentation) * var(--tree-depth))",
|
|
83
|
+
"--tree-icon-offset": "calc(var(--tree-icon-size) * var(--tree-depth) * 0.5)",
|
|
84
|
+
"--tree-offset": "calc(var(--tree-padding-inline) + var(--tree-indentation-offset) + var(--tree-icon-offset))",
|
|
85
|
+
ps: "var(--tree-offset)",
|
|
86
|
+
pe: "var(--tree-padding-inline)",
|
|
87
|
+
py: "var(--tree-padding-block)",
|
|
88
|
+
focusVisibleRing: "inside",
|
|
89
|
+
focusRingColor: "border.emphasized",
|
|
90
|
+
focusRingWidth: "2px",
|
|
91
|
+
"&:hover, &:focus-visible": {
|
|
92
|
+
bg: "bg.muted"
|
|
93
|
+
},
|
|
94
|
+
_disabled: {
|
|
95
|
+
layerStyle: "disabled"
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
item: {
|
|
99
|
+
display: "flex",
|
|
100
|
+
alignItems: "center",
|
|
101
|
+
gap: "var(--tree-item-gap)",
|
|
102
|
+
rounded: "l2",
|
|
103
|
+
userSelect: "none",
|
|
104
|
+
position: "relative",
|
|
105
|
+
"--tree-depth": "calc(var(--depth) - 1)",
|
|
106
|
+
"--tree-indentation-offset": "calc(var(--tree-indentation) * var(--tree-depth))",
|
|
107
|
+
"--tree-icon-offset": "calc(var(--tree-icon-size) * var(--tree-depth) * 0.5)",
|
|
108
|
+
"--tree-offset": "calc(var(--tree-padding-inline) + var(--tree-indentation-offset) + var(--tree-icon-offset))",
|
|
109
|
+
ps: "var(--tree-offset)",
|
|
110
|
+
pe: "var(--tree-padding-inline)",
|
|
111
|
+
py: "var(--tree-padding-block)",
|
|
112
|
+
focusVisibleRing: "inside",
|
|
113
|
+
focusRingColor: "border.emphasized",
|
|
114
|
+
focusRingWidth: "2px",
|
|
115
|
+
"&:hover, &:focus-visible": {
|
|
116
|
+
bg: "bg.muted"
|
|
117
|
+
},
|
|
118
|
+
_disabled: {
|
|
119
|
+
layerStyle: "disabled"
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
itemText: {
|
|
123
|
+
flex: "1"
|
|
124
|
+
},
|
|
125
|
+
branchText: {
|
|
126
|
+
flex: "1"
|
|
127
|
+
},
|
|
128
|
+
nodeCheckbox: {
|
|
129
|
+
display: "inline-flex"
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
variants: {
|
|
133
|
+
size: {
|
|
134
|
+
md: {
|
|
135
|
+
tree: {
|
|
136
|
+
textStyle: "sm",
|
|
137
|
+
"--tree-indentation": "spacing.4",
|
|
138
|
+
"--tree-padding-inline": "spacing.3",
|
|
139
|
+
"--tree-padding-block": "spacing.1.5",
|
|
140
|
+
"--tree-icon-size": "spacing.4"
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
sm: {
|
|
144
|
+
tree: {
|
|
145
|
+
textStyle: "sm",
|
|
146
|
+
"--tree-indentation": "spacing.4",
|
|
147
|
+
"--tree-padding-inline": "spacing.3",
|
|
148
|
+
"--tree-padding-block": "spacing.1",
|
|
149
|
+
"--tree-icon-size": "spacing.3"
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
xs: {
|
|
153
|
+
tree: {
|
|
154
|
+
textStyle: "xs",
|
|
155
|
+
"--tree-indentation": "spacing.4",
|
|
156
|
+
"--tree-padding-inline": "spacing.2",
|
|
157
|
+
"--tree-padding-block": "spacing.1",
|
|
158
|
+
"--tree-icon-size": "spacing.3"
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
variant: {
|
|
163
|
+
subtle: {
|
|
164
|
+
branchControl: {
|
|
165
|
+
_selected: {
|
|
166
|
+
bg: "colorPalette.subtle",
|
|
167
|
+
color: "colorPalette.fg"
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
item: {
|
|
171
|
+
_selected: {
|
|
172
|
+
bg: "colorPalette.subtle",
|
|
173
|
+
color: "colorPalette.fg"
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
solid: {
|
|
178
|
+
branchControl: {
|
|
179
|
+
_selected: {
|
|
180
|
+
layerStyle: "fill.solid"
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
item: {
|
|
184
|
+
_selected: {
|
|
185
|
+
layerStyle: "fill.solid"
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
animateContent: {
|
|
191
|
+
true: {
|
|
192
|
+
branchContent: {
|
|
193
|
+
_open: {
|
|
194
|
+
animationName: "expand-height, fade-in",
|
|
195
|
+
animationDuration: "moderate"
|
|
196
|
+
},
|
|
197
|
+
_closed: {
|
|
198
|
+
animationName: "collapse-height, fade-out",
|
|
199
|
+
animationDuration: "moderate"
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
defaultVariants: {
|
|
206
|
+
size: "md",
|
|
207
|
+
variant: "subtle"
|
|
208
|
+
}
|
|
209
|
+
});
|
|
210
|
+
|
|
211
|
+
export { treeViewSlotRecipe };
|
|
@@ -45,4 +45,5 @@ export declare const slotRecipes: {
|
|
|
45
45
|
timeline: import("@pandacss/types").SlotRecipeConfig;
|
|
46
46
|
colorPicker: import("@pandacss/types").SlotRecipeConfig;
|
|
47
47
|
qrCode: import("@pandacss/types").SlotRecipeConfig;
|
|
48
|
+
treeView: import("@pandacss/types").SlotRecipeConfig;
|
|
48
49
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const treeViewSlotRecipe: 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.23.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.23.0"
|
|
53
53
|
},
|
|
54
54
|
"scripts": {
|
|
55
55
|
"theme:eject": "chakra eject --outdir=src",
|