@chakra-ui/panda-preset 3.33.0 → 3.35.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,460 @@
1
+ "use strict";
2
+ import { defineSlotRecipe } from '../def.js';
3
+
4
+ const datePickerSlotRecipe = defineSlotRecipe({
5
+ className: "date-picker",
6
+ slots: [
7
+ "clearTrigger",
8
+ "content",
9
+ "control",
10
+ "input",
11
+ "label",
12
+ "monthSelect",
13
+ "nextTrigger",
14
+ "positioner",
15
+ "presetTrigger",
16
+ "prevTrigger",
17
+ "rangeText",
18
+ "root",
19
+ "table",
20
+ "tableBody",
21
+ "tableCell",
22
+ "tableCellTrigger",
23
+ "tableHead",
24
+ "tableHeader",
25
+ "tableRow",
26
+ "trigger",
27
+ "view",
28
+ "viewControl",
29
+ "viewTrigger",
30
+ "yearSelect",
31
+ "view",
32
+ "valueText",
33
+ "indicatorGroup"
34
+ ],
35
+ base: {
36
+ root: {
37
+ display: "flex",
38
+ flexDirection: "column",
39
+ gap: "1.5",
40
+ width: "full",
41
+ "--datepicker-indicators-offset": "sizes.3",
42
+ _disabled: {
43
+ opacity: 0.5
44
+ }
45
+ },
46
+ label: {
47
+ textStyle: "sm",
48
+ fontWeight: "medium"
49
+ },
50
+ indicatorGroup: {
51
+ position: "absolute",
52
+ insetEnd: "var(--datepicker-indicators-offset)",
53
+ top: "50%",
54
+ transform: "translateY(-50%)",
55
+ display: "flex",
56
+ alignItems: "center",
57
+ justifyContent: "center",
58
+ gap: "1"
59
+ },
60
+ control: {
61
+ display: "flex",
62
+ alignItems: "center",
63
+ gap: "2",
64
+ width: "full",
65
+ position: "relative"
66
+ },
67
+ input: {
68
+ flex: "1",
69
+ minWidth: "0",
70
+ height: "var(--datepicker-input-height)",
71
+ "--input-height": "var(--datepicker-input-height)",
72
+ px: "var(--datepicker-input-px)",
73
+ textStyle: "sm",
74
+ bg: "transparent",
75
+ borderRadius: "l2",
76
+ outline: "0",
77
+ appearance: "none",
78
+ color: "fg",
79
+ "--focus-color": "colors.colorPalette.focusRing",
80
+ "--error-color": "colors.border.error",
81
+ _placeholder: {
82
+ color: "fg.muted"
83
+ },
84
+ _invalid: {
85
+ focusRingColor: "var(--error-color)",
86
+ borderColor: "var(--error-color)"
87
+ }
88
+ },
89
+ trigger: {
90
+ display: "inline-flex",
91
+ alignItems: "center",
92
+ justifyContent: "center",
93
+ width: "6",
94
+ height: "6",
95
+ borderRadius: "l1",
96
+ color: "fg.muted",
97
+ outline: "none",
98
+ _hover: {
99
+ color: "fg"
100
+ },
101
+ focusVisibleRing: "inside",
102
+ focusRingWidth: "2px",
103
+ _icon: {
104
+ boxSize: "4"
105
+ }
106
+ },
107
+ content: {
108
+ display: "flex",
109
+ flexDirection: "column",
110
+ gap: "3",
111
+ p: "3",
112
+ minW: "18rem",
113
+ bg: "bg.panel",
114
+ borderRadius: "l2",
115
+ boxShadow: "lg",
116
+ color: "fg",
117
+ "--date-picker-z-index": "zIndex.popover",
118
+ zIndex: "calc(var(--date-picker-z-index) + var(--layer-index, 0))",
119
+ outline: "none",
120
+ _open: {
121
+ animationStyle: "scale-fade-in",
122
+ animationDuration: "fast"
123
+ },
124
+ _closed: {
125
+ animationStyle: "scale-fade-out",
126
+ animationDuration: "faster"
127
+ }
128
+ },
129
+ view: {
130
+ display: "flex",
131
+ flexDirection: "column",
132
+ gap: "3"
133
+ },
134
+ viewControl: {
135
+ display: "flex",
136
+ alignItems: "center",
137
+ justifyContent: "space-between",
138
+ gap: "2",
139
+ height: "var(--datepicker-nav-trigger-size)"
140
+ },
141
+ viewTrigger: {
142
+ display: "inline-flex",
143
+ flex: "1",
144
+ alignItems: "center",
145
+ justifyContent: "center",
146
+ gap: "1",
147
+ py: "1.5",
148
+ px: "2",
149
+ textStyle: "sm",
150
+ fontWeight: "semibold",
151
+ borderRadius: "l2",
152
+ focusVisibleRing: "inside",
153
+ focusRingWidth: "2px",
154
+ _hover: {
155
+ bg: "colorPalette.subtle"
156
+ }
157
+ },
158
+ prevTrigger: {
159
+ display: "inline-flex",
160
+ alignItems: "center",
161
+ justifyContent: "center",
162
+ boxSize: "var(--datepicker-nav-trigger-size)",
163
+ borderRadius: "l2",
164
+ color: "fg",
165
+ focusVisibleRing: "inside",
166
+ focusRingWidth: "2px",
167
+ _hover: {
168
+ bg: "colorPalette.subtle"
169
+ },
170
+ _focusVisible: {
171
+ boxShadow: "0 0 0 2px var(--colors-color-palette-focus-ring)"
172
+ },
173
+ _disabled: {
174
+ opacity: 0.5
175
+ },
176
+ _icon: {
177
+ boxSize: "4"
178
+ }
179
+ },
180
+ nextTrigger: {
181
+ display: "inline-flex",
182
+ alignItems: "center",
183
+ justifyContent: "center",
184
+ boxSize: "var(--datepicker-nav-trigger-size)",
185
+ borderRadius: "l2",
186
+ color: "fg",
187
+ focusVisibleRing: "inside",
188
+ focusRingWidth: "2px",
189
+ _hover: {
190
+ bg: "colorPalette.subtle"
191
+ },
192
+ _focusVisible: {
193
+ boxShadow: "0 0 0 2px var(--colors-color-palette-focus-ring)"
194
+ },
195
+ _disabled: {
196
+ opacity: 0.5
197
+ },
198
+ _icon: {
199
+ boxSize: "4"
200
+ }
201
+ },
202
+ rangeText: {
203
+ textStyle: "sm",
204
+ fontWeight: "semibold"
205
+ },
206
+ table: {
207
+ borderCollapse: "separate",
208
+ borderSpacing: "0"
209
+ },
210
+ tableHeader: {
211
+ width: "var(--table-cell-size)",
212
+ py: "2",
213
+ textStyle: "xs",
214
+ fontWeight: "medium",
215
+ color: "fg.muted",
216
+ textAlign: "center",
217
+ textTransform: "uppercase",
218
+ "&[data-type='week-number']": {
219
+ color: "fg.subtle"
220
+ }
221
+ },
222
+ tableCell: {
223
+ py: "0.5",
224
+ "&[data-type='week-number']": {
225
+ color: "fg.subtle"
226
+ }
227
+ },
228
+ tableCellTrigger: {
229
+ display: "inline-flex",
230
+ alignItems: "center",
231
+ justifyContent: "center",
232
+ minWidth: "var(--table-cell-size)",
233
+ minHeight: "var(--table-cell-size)",
234
+ textStyle: "sm",
235
+ borderRadius: "l2",
236
+ focusVisibleRing: "inside",
237
+ focusRingWidth: "2px",
238
+ focusRingOffset: "0px",
239
+ cursor: "default",
240
+ position: "relative",
241
+ _hover: {
242
+ bg: "colorPalette.subtle"
243
+ },
244
+ "[data-view=month] &, [data-view=year] &": {
245
+ width: "calc(var(--table-cell-size) * 1.75)"
246
+ },
247
+ _today: {
248
+ color: "colorPalette.fg",
249
+ fontWeight: "semibold",
250
+ textDecoration: "underline",
251
+ textUnderlineOffset: "3px",
252
+ textDecorationThickness: "2px"
253
+ },
254
+ "&[data-selected]": {
255
+ bg: "colorPalette.solid",
256
+ color: "colorPalette.contrast",
257
+ _hover: {
258
+ bg: "colorPalette.solid"
259
+ }
260
+ },
261
+ "&[data-in-range]": {
262
+ bg: "colorPalette.subtle",
263
+ color: "colorPalette.fg",
264
+ borderRadius: "0",
265
+ _hover: {
266
+ bg: "colorPalette.subtle"
267
+ }
268
+ },
269
+ "&[data-in-range][data-selected]": {
270
+ bg: "colorPalette.solid",
271
+ color: "colorPalette.contrast",
272
+ borderRadius: "0",
273
+ _hover: {
274
+ bg: "colorPalette.solid"
275
+ },
276
+ "&[data-range-start][data-range-end]": {
277
+ borderRadius: "l2"
278
+ },
279
+ "&[data-range-start]:not([data-range-end])": {
280
+ borderStartRadius: "l2",
281
+ borderEndRadius: "0"
282
+ },
283
+ "&[data-range-end]:not([data-range-start])": {
284
+ borderEndRadius: "l2",
285
+ borderStartRadius: "0"
286
+ }
287
+ },
288
+ _disabled: {
289
+ opacity: 0.4
290
+ }
291
+ },
292
+ monthSelect: {
293
+ height: "var(--datepicker-select-height)",
294
+ ps: "2",
295
+ pe: "8",
296
+ textStyle: "sm",
297
+ borderWidth: "1px",
298
+ borderRadius: "l2",
299
+ outline: "none",
300
+ focusVisibleRing: "inside",
301
+ appearance: "none",
302
+ fieldSizing: "content",
303
+ backgroundImage: `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")`,
304
+ backgroundRepeat: "no-repeat",
305
+ backgroundPosition: "right 0.375rem center",
306
+ backgroundSize: "1.25em"
307
+ },
308
+ yearSelect: {
309
+ height: "var(--datepicker-select-height)",
310
+ ps: "2",
311
+ pe: "8",
312
+ textStyle: "sm",
313
+ borderWidth: "1px",
314
+ borderRadius: "l2",
315
+ outline: "none",
316
+ focusVisibleRing: "inside",
317
+ appearance: "none",
318
+ fieldSizing: "content",
319
+ backgroundImage: `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")`,
320
+ backgroundRepeat: "no-repeat",
321
+ backgroundPosition: "right 0.375rem center",
322
+ backgroundSize: "1.25em"
323
+ },
324
+ clearTrigger: {
325
+ display: "inline-flex",
326
+ alignItems: "center",
327
+ justifyContent: "center",
328
+ width: "6",
329
+ height: "6",
330
+ flexShrink: 0,
331
+ textStyle: "xs",
332
+ borderRadius: "l2",
333
+ color: "fg.muted",
334
+ _hover: {
335
+ color: "fg"
336
+ },
337
+ focusVisibleRing: "inside",
338
+ _icon: {
339
+ width: "4",
340
+ height: "4"
341
+ }
342
+ }
343
+ },
344
+ variants: {
345
+ size: {
346
+ xs: {
347
+ root: {
348
+ "--datepicker-input-height": "sizes.8",
349
+ "--datepicker-input-px": "sizes.2",
350
+ "--datepicker-indicators-offset": "sizes.2"
351
+ },
352
+ view: {
353
+ "--table-cell-size": "sizes.8",
354
+ "--datepicker-nav-trigger-size": "sizes.7",
355
+ "--datepicker-select-height": "sizes.8"
356
+ }
357
+ },
358
+ sm: {
359
+ root: {
360
+ "--datepicker-input-height": "sizes.9",
361
+ "--datepicker-input-px": "sizes.2.5",
362
+ "--datepicker-indicators-offset": "sizes.2.5"
363
+ },
364
+ view: {
365
+ "--table-cell-size": "sizes.9",
366
+ "--datepicker-nav-trigger-size": "sizes.8",
367
+ "--datepicker-select-height": "sizes.9"
368
+ }
369
+ },
370
+ md: {
371
+ root: {
372
+ "--datepicker-input-height": "sizes.10",
373
+ "--datepicker-input-px": "sizes.3"
374
+ },
375
+ view: {
376
+ "--table-cell-size": "sizes.10",
377
+ "--datepicker-nav-trigger-size": "sizes.8",
378
+ "--datepicker-select-height": "sizes.10"
379
+ }
380
+ },
381
+ lg: {
382
+ root: {
383
+ "--datepicker-input-height": "sizes.11",
384
+ "--datepicker-input-px": "sizes.4"
385
+ },
386
+ view: {
387
+ "--table-cell-size": "sizes.10",
388
+ "--datepicker-nav-trigger-size": "sizes.9",
389
+ "--datepicker-select-height": "sizes.10"
390
+ }
391
+ },
392
+ xl: {
393
+ root: {
394
+ "--datepicker-input-height": "sizes.12",
395
+ "--datepicker-input-px": "sizes.4.5"
396
+ },
397
+ view: {
398
+ "--table-cell-size": "sizes.10",
399
+ "--datepicker-nav-trigger-size": "sizes.9",
400
+ "--datepicker-select-height": "sizes.10"
401
+ }
402
+ }
403
+ },
404
+ hideOutsideDays: {
405
+ true: {
406
+ tableCellTrigger: {
407
+ "&[data-outside-range]": {
408
+ visibility: "hidden"
409
+ }
410
+ }
411
+ }
412
+ },
413
+ variant: {
414
+ outline: {
415
+ input: {
416
+ bg: "transparent",
417
+ borderWidth: "1px",
418
+ borderColor: "border",
419
+ focusVisibleRing: "inside",
420
+ focusRingColor: "var(--focus-color)"
421
+ }
422
+ },
423
+ subtle: {
424
+ input: {
425
+ borderWidth: "1px",
426
+ borderColor: "transparent",
427
+ bg: "bg.muted",
428
+ focusVisibleRing: "inside",
429
+ focusRingColor: "var(--focus-color)"
430
+ }
431
+ },
432
+ flushed: {
433
+ input: {
434
+ bg: "transparent",
435
+ borderBottomWidth: "1px",
436
+ borderBottomColor: "border",
437
+ borderRadius: "0",
438
+ px: "0",
439
+ _focusVisible: {
440
+ borderColor: "var(--focus-color)",
441
+ boxShadow: "0px 1px 0px 0px var(--focus-color)",
442
+ _invalid: {
443
+ borderColor: "var(--error-color)",
444
+ boxShadow: "0px 1px 0px 0px var(--error-color)"
445
+ }
446
+ }
447
+ },
448
+ indicatorGroup: {
449
+ insetEnd: "0"
450
+ }
451
+ }
452
+ }
453
+ },
454
+ defaultVariants: {
455
+ size: "md",
456
+ variant: "outline"
457
+ }
458
+ });
459
+
460
+ export { datePickerSlotRecipe };
@@ -24,7 +24,8 @@ const dialogSlotRecipe = defineSlotRecipe({
24
24
  top: 0,
25
25
  w: "100dvw",
26
26
  h: "100dvh",
27
- zIndex: "var(--z-index)",
27
+ "--dialog-z-index": "zIndex.popover",
28
+ zIndex: "calc(var(--dialog-z-index) + var(--layer-index, 0) - 1)",
28
29
  _open: {
29
30
  animationName: "fade-in",
30
31
  animationDuration: "slow"
@@ -24,7 +24,8 @@ const drawerSlotRecipe = defineSlotRecipe({
24
24
  top: 0,
25
25
  w: "100vw",
26
26
  h: "100dvh",
27
- zIndex: "var(--z-index)",
27
+ "--drawer-z-index": "zIndex.popover",
28
+ zIndex: "calc(var(--drawer-z-index) + var(--layer-index, 0) - 1)",
28
29
  _open: {
29
30
  animationName: "fade-in",
30
31
  animationDuration: "slow"
@@ -14,6 +14,7 @@ import { collapsibleSlotRecipe } from './collapsible.js';
14
14
  import { colorPickerSlotRecipe } from './color-picker.js';
15
15
  import { comboboxSlotRecipe } from './combobox.js';
16
16
  import { dataListSlotRecipe } from './data-list.js';
17
+ import { datePickerSlotRecipe } from './date-picker.js';
17
18
  import { dialogSlotRecipe } from './dialog.js';
18
19
  import { drawerSlotRecipe } from './drawer.js';
19
20
  import { editableSlotRecipe } from './editable.js';
@@ -68,6 +69,7 @@ const slotRecipes = {
68
69
  codeBlock: codeBlockSlotRecipe,
69
70
  collapsible: collapsibleSlotRecipe,
70
71
  dataList: dataListSlotRecipe,
72
+ datePicker: datePickerSlotRecipe,
71
73
  dialog: dialogSlotRecipe,
72
74
  drawer: drawerSlotRecipe,
73
75
  editable: editableSlotRecipe,
@@ -2,7 +2,6 @@ export declare const recipes: {
2
2
  badge: import("@pandacss/types").RecipeConfig<import("@pandacss/types").RecipeVariantRecord>;
3
3
  button: import("@pandacss/types").RecipeConfig<import("@pandacss/types").RecipeVariantRecord>;
4
4
  code: import("@pandacss/types").RecipeConfig<import("@pandacss/types").RecipeVariantRecord>;
5
- container: import("@pandacss/types").RecipeConfig<import("@pandacss/types").RecipeVariantRecord>;
6
5
  heading: import("@pandacss/types").RecipeConfig<import("@pandacss/types").RecipeVariantRecord>;
7
6
  input: import("@pandacss/types").RecipeConfig<import("@pandacss/types").RecipeVariantRecord>;
8
7
  inputAddon: import("@pandacss/types").RecipeConfig<import("@pandacss/types").RecipeVariantRecord>;
@@ -0,0 +1 @@
1
+ export declare const datePickerSlotRecipe: import("@pandacss/types").SlotRecipeConfig;
@@ -12,6 +12,7 @@ export declare const slotRecipes: {
12
12
  codeBlock: import("@pandacss/types").SlotRecipeConfig;
13
13
  collapsible: import("@pandacss/types").SlotRecipeConfig;
14
14
  dataList: import("@pandacss/types").SlotRecipeConfig;
15
+ datePicker: import("@pandacss/types").SlotRecipeConfig;
15
16
  dialog: import("@pandacss/types").SlotRecipeConfig;
16
17
  drawer: import("@pandacss/types").SlotRecipeConfig;
17
18
  editable: import("@pandacss/types").SlotRecipeConfig;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chakra-ui/panda-preset",
3
- "version": "3.33.0",
3
+ "version": "3.35.0",
4
4
  "description": "Panda preset for Chakra UI",
5
5
  "type": "module",
6
6
  "main": "dist/cjs/index.cjs",
@@ -48,8 +48,8 @@
48
48
  "@pandacss/types": "^1.4.2"
49
49
  },
50
50
  "devDependencies": {
51
- "globby": "14.1.0",
52
- "@chakra-ui/cli": "3.33.0"
51
+ "globby": "16.1.1",
52
+ "@chakra-ui/cli": "3.35.0"
53
53
  },
54
54
  "scripts": {
55
55
  "theme:eject": "chakra eject --outdir=src",
@@ -1,35 +0,0 @@
1
- "use strict";
2
- 'use strict';
3
-
4
- var def = require('../def.cjs');
5
-
6
- const containerRecipe = def.defineRecipe({
7
- className: "container",
8
- base: {
9
- position: "relative",
10
- maxWidth: "8xl",
11
- w: "100%",
12
- mx: "auto",
13
- px: {
14
- base: "4",
15
- md: "6",
16
- lg: "8"
17
- }
18
- },
19
- variants: {
20
- centerContent: {
21
- true: {
22
- display: "flex",
23
- flexDirection: "column",
24
- alignItems: "center"
25
- }
26
- },
27
- fluid: {
28
- true: {
29
- maxWidth: "full"
30
- }
31
- }
32
- }
33
- });
34
-
35
- exports.containerRecipe = containerRecipe;
@@ -1,33 +0,0 @@
1
- "use strict";
2
- import { defineRecipe } from '../def.js';
3
-
4
- const containerRecipe = defineRecipe({
5
- className: "container",
6
- base: {
7
- position: "relative",
8
- maxWidth: "8xl",
9
- w: "100%",
10
- mx: "auto",
11
- px: {
12
- base: "4",
13
- md: "6",
14
- lg: "8"
15
- }
16
- },
17
- variants: {
18
- centerContent: {
19
- true: {
20
- display: "flex",
21
- flexDirection: "column",
22
- alignItems: "center"
23
- }
24
- },
25
- fluid: {
26
- true: {
27
- maxWidth: "full"
28
- }
29
- }
30
- }
31
- });
32
-
33
- export { containerRecipe };
@@ -1 +0,0 @@
1
- export declare const containerRecipe: import("@pandacss/types").RecipeConfig<import("@pandacss/types").RecipeVariantRecord>;