@chakra-ui/panda-preset 3.17.0 → 3.19.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.
@@ -0,0 +1,299 @@
1
+ "use strict";
2
+ 'use strict';
3
+
4
+ var def = require('../def.cjs');
5
+
6
+ const comboboxSlotRecipe = def.defineSlotRecipe({
7
+ className: "combobox",
8
+ slots: [
9
+ "root",
10
+ "clearTrigger",
11
+ "content",
12
+ "control",
13
+ "input",
14
+ "item",
15
+ "itemGroup",
16
+ "itemGroupLabel",
17
+ "itemIndicator",
18
+ "itemText",
19
+ "label",
20
+ "list",
21
+ "positioner",
22
+ "trigger",
23
+ "indicatorGroup",
24
+ "empty"
25
+ ],
26
+ base: {
27
+ root: {
28
+ display: "flex",
29
+ flexDirection: "column",
30
+ gap: "1.5",
31
+ width: "full"
32
+ },
33
+ label: {
34
+ fontWeight: "medium",
35
+ userSelect: "none",
36
+ textStyle: "sm",
37
+ _disabled: {
38
+ layerStyle: "disabled"
39
+ }
40
+ },
41
+ input: {
42
+ display: "flex",
43
+ alignItems: "center",
44
+ justifyContent: "space-between",
45
+ background: "bg.panel",
46
+ width: "full",
47
+ minH: "var(--combobox-input-height)",
48
+ px: "var(--combobox-input-padding-x)",
49
+ "--input-height": "var(--combobox-input-height)",
50
+ borderRadius: "l2",
51
+ outline: 0,
52
+ userSelect: "none",
53
+ textAlign: "start",
54
+ _placeholderShown: {
55
+ color: "fg.muted"
56
+ },
57
+ _disabled: {
58
+ layerStyle: "disabled"
59
+ },
60
+ "--focus-color": "colors.colorPalette.focusRing",
61
+ "--error-color": "colors.border.error",
62
+ _invalid: {
63
+ focusRingColor: "var(--error-color)",
64
+ borderColor: "var(--error-color)"
65
+ }
66
+ },
67
+ trigger: {
68
+ display: "inline-flex",
69
+ alignItems: "center",
70
+ justifyContent: "center",
71
+ "--input-height": "var(--combobox-input-height)"
72
+ },
73
+ clearTrigger: {
74
+ color: "fg.muted",
75
+ pointerEvents: "auto",
76
+ focusVisibleRing: "inside",
77
+ focusRingWidth: "2px",
78
+ rounded: "l1"
79
+ },
80
+ control: {
81
+ pos: "relative"
82
+ },
83
+ indicatorGroup: {
84
+ display: "flex",
85
+ alignItems: "center",
86
+ justifyContent: "center",
87
+ gap: "1",
88
+ pos: "absolute",
89
+ insetEnd: "0",
90
+ top: "0",
91
+ bottom: "0",
92
+ px: "var(--combobox-input-padding-x)",
93
+ _icon: {
94
+ boxSize: "var(--combobox-indicator-size)"
95
+ },
96
+ "[data-disabled] &": {
97
+ opacity: 0.5
98
+ }
99
+ },
100
+ content: {
101
+ background: "bg.panel",
102
+ display: "flex",
103
+ flexDirection: "column",
104
+ zIndex: "dropdown",
105
+ borderRadius: "l2",
106
+ outline: 0,
107
+ maxH: "96",
108
+ overflowY: "auto",
109
+ boxShadow: "md",
110
+ _open: {
111
+ animationStyle: "slide-fade-in",
112
+ animationDuration: "fast"
113
+ },
114
+ _closed: {
115
+ animationStyle: "slide-fade-out",
116
+ animationDuration: "0s"
117
+ },
118
+ "&[data-empty]:not(:has([data-scope=combobox][data-part=empty]))": {
119
+ opacity: 0
120
+ }
121
+ },
122
+ item: {
123
+ position: "relative",
124
+ userSelect: "none",
125
+ display: "flex",
126
+ alignItems: "center",
127
+ gap: "2",
128
+ py: "var(--combobox-item-padding-y)",
129
+ px: "var(--combobox-item-padding-x)",
130
+ cursor: "option",
131
+ justifyContent: "space-between",
132
+ flex: "1",
133
+ textAlign: "start",
134
+ borderRadius: "l1",
135
+ _highlighted: {
136
+ bg: "bg.emphasized/60"
137
+ },
138
+ _disabled: {
139
+ pointerEvents: "none",
140
+ opacity: "0.5"
141
+ },
142
+ _icon: {
143
+ boxSize: "var(--combobox-indicator-size)"
144
+ }
145
+ },
146
+ empty: {
147
+ py: "var(--combobox-item-padding-y)",
148
+ px: "var(--combobox-item-padding-x)"
149
+ },
150
+ itemText: {
151
+ flex: "1"
152
+ },
153
+ itemGroup: {
154
+ pb: "var(--combobox-item-padding-y)",
155
+ _last: {
156
+ pb: "0"
157
+ }
158
+ },
159
+ itemGroupLabel: {
160
+ fontWeight: "medium",
161
+ py: "var(--combobox-item-padding-y)",
162
+ px: "var(--combobox-item-padding-x)"
163
+ }
164
+ },
165
+ variants: {
166
+ variant: {
167
+ outline: {
168
+ input: {
169
+ bg: "transparent",
170
+ borderWidth: "1px",
171
+ borderColor: "border",
172
+ focusVisibleRing: "inside"
173
+ }
174
+ },
175
+ subtle: {
176
+ input: {
177
+ borderWidth: "1px",
178
+ borderColor: "transparent",
179
+ bg: "bg.muted",
180
+ focusVisibleRing: "inside"
181
+ }
182
+ },
183
+ flushed: {
184
+ input: {
185
+ bg: "transparent",
186
+ borderBottomWidth: "1px",
187
+ borderBottomColor: "border",
188
+ borderRadius: "0",
189
+ px: "0",
190
+ _focusVisible: {
191
+ borderColor: "var(--focus-color)",
192
+ boxShadow: "0px 1px 0px 0px var(--focus-color)"
193
+ }
194
+ },
195
+ indicatorGroup: {
196
+ px: "0"
197
+ }
198
+ }
199
+ },
200
+ size: {
201
+ xs: {
202
+ root: {
203
+ "--combobox-input-height": "sizes.8",
204
+ "--combobox-input-padding-x": "spacing.2",
205
+ "--combobox-indicator-size": "sizes.3.5"
206
+ },
207
+ input: {
208
+ textStyle: "xs"
209
+ },
210
+ content: {
211
+ "--combobox-item-padding-x": "spacing.1.5",
212
+ "--combobox-item-padding-y": "spacing.1",
213
+ "--combobox-indicator-size": "sizes.3.5",
214
+ p: "1",
215
+ textStyle: "xs"
216
+ },
217
+ trigger: {
218
+ textStyle: "xs",
219
+ gap: "1"
220
+ }
221
+ },
222
+ sm: {
223
+ root: {
224
+ "--combobox-input-height": "sizes.9",
225
+ "--combobox-input-padding-x": "spacing.2.5",
226
+ "--combobox-indicator-size": "sizes.4"
227
+ },
228
+ input: {
229
+ textStyle: "sm"
230
+ },
231
+ content: {
232
+ "--combobox-item-padding-x": "spacing.2",
233
+ "--combobox-item-padding-y": "spacing.1.5",
234
+ "--combobox-indicator-size": "sizes.4",
235
+ p: "1",
236
+ textStyle: "sm"
237
+ },
238
+ trigger: {
239
+ textStyle: "sm",
240
+ gap: "1"
241
+ }
242
+ },
243
+ md: {
244
+ root: {
245
+ "--combobox-input-height": "sizes.10",
246
+ "--combobox-input-padding-x": "spacing.3",
247
+ "--combobox-indicator-size": "sizes.4"
248
+ },
249
+ input: {
250
+ textStyle: "sm"
251
+ },
252
+ content: {
253
+ "--combobox-item-padding-x": "spacing.2",
254
+ "--combobox-item-padding-y": "spacing.1.5",
255
+ "--combobox-indicator-size": "sizes.4",
256
+ p: "1",
257
+ textStyle: "sm"
258
+ },
259
+ itemIndicator: {
260
+ display: "flex",
261
+ alignItems: "center",
262
+ justifyContent: "center"
263
+ },
264
+ trigger: {
265
+ textStyle: "sm",
266
+ gap: "2"
267
+ }
268
+ },
269
+ lg: {
270
+ root: {
271
+ "--combobox-input-height": "sizes.12",
272
+ "--combobox-input-padding-x": "spacing.4",
273
+ "--combobox-indicator-size": "sizes.5"
274
+ },
275
+ input: {
276
+ textStyle: "md"
277
+ },
278
+ content: {
279
+ "--combobox-item-padding-y": "spacing.2",
280
+ "--combobox-item-padding-x": "spacing.3",
281
+ "--combobox-indicator-size": "sizes.5",
282
+ p: "1.5",
283
+ textStyle: "md"
284
+ },
285
+ trigger: {
286
+ textStyle: "md",
287
+ py: "3",
288
+ gap: "2"
289
+ }
290
+ }
291
+ }
292
+ },
293
+ defaultVariants: {
294
+ size: "md",
295
+ variant: "outline"
296
+ }
297
+ });
298
+
299
+ exports.comboboxSlotRecipe = comboboxSlotRecipe;
@@ -12,6 +12,7 @@ var checkbox = require('./checkbox.cjs');
12
12
  var checkboxCard = require('./checkbox-card.cjs');
13
13
  var collapsible = require('./collapsible.cjs');
14
14
  var colorPicker = require('./color-picker.cjs');
15
+ var combobox = require('./combobox.cjs');
15
16
  var dataList = require('./data-list.cjs');
16
17
  var dialog = require('./dialog.cjs');
17
18
  var drawer = require('./drawer.cjs');
@@ -80,6 +81,7 @@ const slotRecipes = {
80
81
  ratingGroup: ratingGroup.ratingGroupSlotRecipe,
81
82
  segmentGroup: segmentGroup.segmentGroupSlotRecipe,
82
83
  select: select.selectSlotRecipe,
84
+ combobox: combobox.comboboxSlotRecipe,
83
85
  slider: slider.sliderSlotRecipe,
84
86
  stat: stat.statSlotRecipe,
85
87
  steps: steps.stepsSlotRecipe,
@@ -33,7 +33,7 @@ const progressCircleSlotRecipe = def.defineSlotRecipe({
33
33
  },
34
34
  circleRange: {
35
35
  stroke: "colorPalette.solid",
36
- transitionProperty: "stroke-dasharray",
36
+ transitionProperty: "stroke-dashoffset, stroke-dasharray",
37
37
  transitionDuration: "0.6s",
38
38
  _indeterminate: {
39
39
  animation: "circular-progress 1.5s linear infinite"
@@ -57,7 +57,7 @@ const selectSlotRecipe = def.defineSlotRecipe({
57
57
  alignItems: "center",
58
58
  gap: "1",
59
59
  pos: "absolute",
60
- right: "0",
60
+ insetEnd: "0",
61
61
  top: "0",
62
62
  bottom: "0",
63
63
  px: "var(--select-trigger-padding-x)",
@@ -0,0 +1,297 @@
1
+ "use strict";
2
+ import { defineSlotRecipe } from '../def.js';
3
+
4
+ const comboboxSlotRecipe = defineSlotRecipe({
5
+ className: "combobox",
6
+ slots: [
7
+ "root",
8
+ "clearTrigger",
9
+ "content",
10
+ "control",
11
+ "input",
12
+ "item",
13
+ "itemGroup",
14
+ "itemGroupLabel",
15
+ "itemIndicator",
16
+ "itemText",
17
+ "label",
18
+ "list",
19
+ "positioner",
20
+ "trigger",
21
+ "indicatorGroup",
22
+ "empty"
23
+ ],
24
+ base: {
25
+ root: {
26
+ display: "flex",
27
+ flexDirection: "column",
28
+ gap: "1.5",
29
+ width: "full"
30
+ },
31
+ label: {
32
+ fontWeight: "medium",
33
+ userSelect: "none",
34
+ textStyle: "sm",
35
+ _disabled: {
36
+ layerStyle: "disabled"
37
+ }
38
+ },
39
+ input: {
40
+ display: "flex",
41
+ alignItems: "center",
42
+ justifyContent: "space-between",
43
+ background: "bg.panel",
44
+ width: "full",
45
+ minH: "var(--combobox-input-height)",
46
+ px: "var(--combobox-input-padding-x)",
47
+ "--input-height": "var(--combobox-input-height)",
48
+ borderRadius: "l2",
49
+ outline: 0,
50
+ userSelect: "none",
51
+ textAlign: "start",
52
+ _placeholderShown: {
53
+ color: "fg.muted"
54
+ },
55
+ _disabled: {
56
+ layerStyle: "disabled"
57
+ },
58
+ "--focus-color": "colors.colorPalette.focusRing",
59
+ "--error-color": "colors.border.error",
60
+ _invalid: {
61
+ focusRingColor: "var(--error-color)",
62
+ borderColor: "var(--error-color)"
63
+ }
64
+ },
65
+ trigger: {
66
+ display: "inline-flex",
67
+ alignItems: "center",
68
+ justifyContent: "center",
69
+ "--input-height": "var(--combobox-input-height)"
70
+ },
71
+ clearTrigger: {
72
+ color: "fg.muted",
73
+ pointerEvents: "auto",
74
+ focusVisibleRing: "inside",
75
+ focusRingWidth: "2px",
76
+ rounded: "l1"
77
+ },
78
+ control: {
79
+ pos: "relative"
80
+ },
81
+ indicatorGroup: {
82
+ display: "flex",
83
+ alignItems: "center",
84
+ justifyContent: "center",
85
+ gap: "1",
86
+ pos: "absolute",
87
+ insetEnd: "0",
88
+ top: "0",
89
+ bottom: "0",
90
+ px: "var(--combobox-input-padding-x)",
91
+ _icon: {
92
+ boxSize: "var(--combobox-indicator-size)"
93
+ },
94
+ "[data-disabled] &": {
95
+ opacity: 0.5
96
+ }
97
+ },
98
+ content: {
99
+ background: "bg.panel",
100
+ display: "flex",
101
+ flexDirection: "column",
102
+ zIndex: "dropdown",
103
+ borderRadius: "l2",
104
+ outline: 0,
105
+ maxH: "96",
106
+ overflowY: "auto",
107
+ boxShadow: "md",
108
+ _open: {
109
+ animationStyle: "slide-fade-in",
110
+ animationDuration: "fast"
111
+ },
112
+ _closed: {
113
+ animationStyle: "slide-fade-out",
114
+ animationDuration: "0s"
115
+ },
116
+ "&[data-empty]:not(:has([data-scope=combobox][data-part=empty]))": {
117
+ opacity: 0
118
+ }
119
+ },
120
+ item: {
121
+ position: "relative",
122
+ userSelect: "none",
123
+ display: "flex",
124
+ alignItems: "center",
125
+ gap: "2",
126
+ py: "var(--combobox-item-padding-y)",
127
+ px: "var(--combobox-item-padding-x)",
128
+ cursor: "option",
129
+ justifyContent: "space-between",
130
+ flex: "1",
131
+ textAlign: "start",
132
+ borderRadius: "l1",
133
+ _highlighted: {
134
+ bg: "bg.emphasized/60"
135
+ },
136
+ _disabled: {
137
+ pointerEvents: "none",
138
+ opacity: "0.5"
139
+ },
140
+ _icon: {
141
+ boxSize: "var(--combobox-indicator-size)"
142
+ }
143
+ },
144
+ empty: {
145
+ py: "var(--combobox-item-padding-y)",
146
+ px: "var(--combobox-item-padding-x)"
147
+ },
148
+ itemText: {
149
+ flex: "1"
150
+ },
151
+ itemGroup: {
152
+ pb: "var(--combobox-item-padding-y)",
153
+ _last: {
154
+ pb: "0"
155
+ }
156
+ },
157
+ itemGroupLabel: {
158
+ fontWeight: "medium",
159
+ py: "var(--combobox-item-padding-y)",
160
+ px: "var(--combobox-item-padding-x)"
161
+ }
162
+ },
163
+ variants: {
164
+ variant: {
165
+ outline: {
166
+ input: {
167
+ bg: "transparent",
168
+ borderWidth: "1px",
169
+ borderColor: "border",
170
+ focusVisibleRing: "inside"
171
+ }
172
+ },
173
+ subtle: {
174
+ input: {
175
+ borderWidth: "1px",
176
+ borderColor: "transparent",
177
+ bg: "bg.muted",
178
+ focusVisibleRing: "inside"
179
+ }
180
+ },
181
+ flushed: {
182
+ input: {
183
+ bg: "transparent",
184
+ borderBottomWidth: "1px",
185
+ borderBottomColor: "border",
186
+ borderRadius: "0",
187
+ px: "0",
188
+ _focusVisible: {
189
+ borderColor: "var(--focus-color)",
190
+ boxShadow: "0px 1px 0px 0px var(--focus-color)"
191
+ }
192
+ },
193
+ indicatorGroup: {
194
+ px: "0"
195
+ }
196
+ }
197
+ },
198
+ size: {
199
+ xs: {
200
+ root: {
201
+ "--combobox-input-height": "sizes.8",
202
+ "--combobox-input-padding-x": "spacing.2",
203
+ "--combobox-indicator-size": "sizes.3.5"
204
+ },
205
+ input: {
206
+ textStyle: "xs"
207
+ },
208
+ content: {
209
+ "--combobox-item-padding-x": "spacing.1.5",
210
+ "--combobox-item-padding-y": "spacing.1",
211
+ "--combobox-indicator-size": "sizes.3.5",
212
+ p: "1",
213
+ textStyle: "xs"
214
+ },
215
+ trigger: {
216
+ textStyle: "xs",
217
+ gap: "1"
218
+ }
219
+ },
220
+ sm: {
221
+ root: {
222
+ "--combobox-input-height": "sizes.9",
223
+ "--combobox-input-padding-x": "spacing.2.5",
224
+ "--combobox-indicator-size": "sizes.4"
225
+ },
226
+ input: {
227
+ textStyle: "sm"
228
+ },
229
+ content: {
230
+ "--combobox-item-padding-x": "spacing.2",
231
+ "--combobox-item-padding-y": "spacing.1.5",
232
+ "--combobox-indicator-size": "sizes.4",
233
+ p: "1",
234
+ textStyle: "sm"
235
+ },
236
+ trigger: {
237
+ textStyle: "sm",
238
+ gap: "1"
239
+ }
240
+ },
241
+ md: {
242
+ root: {
243
+ "--combobox-input-height": "sizes.10",
244
+ "--combobox-input-padding-x": "spacing.3",
245
+ "--combobox-indicator-size": "sizes.4"
246
+ },
247
+ input: {
248
+ textStyle: "sm"
249
+ },
250
+ content: {
251
+ "--combobox-item-padding-x": "spacing.2",
252
+ "--combobox-item-padding-y": "spacing.1.5",
253
+ "--combobox-indicator-size": "sizes.4",
254
+ p: "1",
255
+ textStyle: "sm"
256
+ },
257
+ itemIndicator: {
258
+ display: "flex",
259
+ alignItems: "center",
260
+ justifyContent: "center"
261
+ },
262
+ trigger: {
263
+ textStyle: "sm",
264
+ gap: "2"
265
+ }
266
+ },
267
+ lg: {
268
+ root: {
269
+ "--combobox-input-height": "sizes.12",
270
+ "--combobox-input-padding-x": "spacing.4",
271
+ "--combobox-indicator-size": "sizes.5"
272
+ },
273
+ input: {
274
+ textStyle: "md"
275
+ },
276
+ content: {
277
+ "--combobox-item-padding-y": "spacing.2",
278
+ "--combobox-item-padding-x": "spacing.3",
279
+ "--combobox-indicator-size": "sizes.5",
280
+ p: "1.5",
281
+ textStyle: "md"
282
+ },
283
+ trigger: {
284
+ textStyle: "md",
285
+ py: "3",
286
+ gap: "2"
287
+ }
288
+ }
289
+ }
290
+ },
291
+ defaultVariants: {
292
+ size: "md",
293
+ variant: "outline"
294
+ }
295
+ });
296
+
297
+ export { comboboxSlotRecipe };
@@ -10,6 +10,7 @@ import { checkboxSlotRecipe } from './checkbox.js';
10
10
  import { checkboxCardSlotRecipe } from './checkbox-card.js';
11
11
  import { collapsibleSlotRecipe } from './collapsible.js';
12
12
  import { colorPickerSlotRecipe } from './color-picker.js';
13
+ import { comboboxSlotRecipe } from './combobox.js';
13
14
  import { dataListSlotRecipe } from './data-list.js';
14
15
  import { dialogSlotRecipe } from './dialog.js';
15
16
  import { drawerSlotRecipe } from './drawer.js';
@@ -78,6 +79,7 @@ const slotRecipes = {
78
79
  ratingGroup: ratingGroupSlotRecipe,
79
80
  segmentGroup: segmentGroupSlotRecipe,
80
81
  select: selectSlotRecipe,
82
+ combobox: comboboxSlotRecipe,
81
83
  slider: sliderSlotRecipe,
82
84
  stat: statSlotRecipe,
83
85
  steps: stepsSlotRecipe,
@@ -31,7 +31,7 @@ const progressCircleSlotRecipe = defineSlotRecipe({
31
31
  },
32
32
  circleRange: {
33
33
  stroke: "colorPalette.solid",
34
- transitionProperty: "stroke-dasharray",
34
+ transitionProperty: "stroke-dashoffset, stroke-dasharray",
35
35
  transitionDuration: "0.6s",
36
36
  _indeterminate: {
37
37
  animation: "circular-progress 1.5s linear infinite"
@@ -55,7 +55,7 @@ const selectSlotRecipe = defineSlotRecipe({
55
55
  alignItems: "center",
56
56
  gap: "1",
57
57
  pos: "absolute",
58
- right: "0",
58
+ insetEnd: "0",
59
59
  top: "0",
60
60
  bottom: "0",
61
61
  px: "var(--select-trigger-padding-x)",
@@ -0,0 +1 @@
1
+ export declare const comboboxSlotRecipe: import("@pandacss/types").SlotRecipeConfig;
@@ -31,6 +31,7 @@ export declare const slotRecipes: {
31
31
  ratingGroup: import("@pandacss/types").SlotRecipeConfig;
32
32
  segmentGroup: import("@pandacss/types").SlotRecipeConfig;
33
33
  select: import("@pandacss/types").SlotRecipeConfig;
34
+ combobox: import("@pandacss/types").SlotRecipeConfig;
34
35
  slider: import("@pandacss/types").SlotRecipeConfig;
35
36
  stat: import("@pandacss/types").SlotRecipeConfig;
36
37
  steps: import("@pandacss/types").SlotRecipeConfig;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chakra-ui/panda-preset",
3
- "version": "3.17.0",
3
+ "version": "3.19.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.17.0"
52
+ "@chakra-ui/cli": "3.19.0"
53
53
  },
54
54
  "scripts": {
55
55
  "theme:eject": "chakra eject --outdir=src",