@chakra-ui/panda-preset 3.28.0 → 3.29.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/slot-recipes/carousel.cjs +76 -0
- package/dist/cjs/slot-recipes/code-block.cjs +1 -0
- package/dist/cjs/slot-recipes/combobox.cjs +13 -4
- package/dist/cjs/slot-recipes/index.cjs +2 -0
- package/dist/cjs/slot-recipes/segment-group.cjs +8 -6
- package/dist/cjs/slot-recipes/tabs.cjs +4 -4
- package/dist/esm/slot-recipes/carousel.js +74 -0
- package/dist/esm/slot-recipes/code-block.js +1 -0
- package/dist/esm/slot-recipes/combobox.js +13 -4
- package/dist/esm/slot-recipes/index.js +2 -0
- package/dist/esm/slot-recipes/segment-group.js +8 -6
- package/dist/esm/slot-recipes/tabs.js +4 -4
- package/dist/types/slot-recipes/carousel.d.ts +1 -0
- package/dist/types/slot-recipes/index.d.ts +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
var def = require('../def.cjs');
|
|
5
|
+
|
|
6
|
+
const carouselSlotRecipe = def.defineSlotRecipe({
|
|
7
|
+
className: "carousel",
|
|
8
|
+
slots: [
|
|
9
|
+
"root",
|
|
10
|
+
"itemGroup",
|
|
11
|
+
"item",
|
|
12
|
+
"control",
|
|
13
|
+
"nextTrigger",
|
|
14
|
+
"prevTrigger",
|
|
15
|
+
"indicatorGroup",
|
|
16
|
+
"indicator",
|
|
17
|
+
"autoplayTrigger"
|
|
18
|
+
],
|
|
19
|
+
base: {
|
|
20
|
+
root: {
|
|
21
|
+
position: "relative",
|
|
22
|
+
display: "flex",
|
|
23
|
+
gap: "2",
|
|
24
|
+
_horizontal: {
|
|
25
|
+
flexDirection: "column"
|
|
26
|
+
},
|
|
27
|
+
_vertical: {
|
|
28
|
+
flexDirection: "row"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
item: {
|
|
32
|
+
_horizontal: {
|
|
33
|
+
width: "100%"
|
|
34
|
+
},
|
|
35
|
+
_vertical: {
|
|
36
|
+
height: "100%"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
control: {
|
|
40
|
+
display: "flex",
|
|
41
|
+
alignItems: "center",
|
|
42
|
+
_horizontal: {
|
|
43
|
+
flexDirection: "row",
|
|
44
|
+
width: "100%"
|
|
45
|
+
},
|
|
46
|
+
_vertical: {
|
|
47
|
+
flexDirection: "column",
|
|
48
|
+
height: "100%"
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
indicatorGroup: {
|
|
52
|
+
display: "flex",
|
|
53
|
+
justifyContent: "center",
|
|
54
|
+
gap: "3",
|
|
55
|
+
_horizontal: {
|
|
56
|
+
flexDirection: "row"
|
|
57
|
+
},
|
|
58
|
+
_vertical: {
|
|
59
|
+
flexDirection: "column"
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
indicator: {
|
|
63
|
+
width: "2.5",
|
|
64
|
+
height: "2.5",
|
|
65
|
+
borderRadius: "full",
|
|
66
|
+
bg: "colorPalette.subtle",
|
|
67
|
+
cursor: "button",
|
|
68
|
+
_current: {
|
|
69
|
+
bg: "colorPalette.solid"
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
defaultVariants: {}
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
exports.carouselSlotRecipe = carouselSlotRecipe;
|
|
@@ -134,6 +134,7 @@ const codeBlockSlotRecipe = def.defineSlotRecipe({
|
|
|
134
134
|
},
|
|
135
135
|
"& [data-line]": {
|
|
136
136
|
position: "relative",
|
|
137
|
+
paddingInlineEnd: "var(--code-block-padding)",
|
|
137
138
|
"--highlight-bg": "var(--code-block-highlight-bg)",
|
|
138
139
|
"--highlight-border": "var(--code-block-highlight-border)",
|
|
139
140
|
"&[data-highlight], &[data-diff]": {
|
|
@@ -39,6 +39,17 @@ const comboboxSlotRecipe = def.defineSlotRecipe({
|
|
|
39
39
|
layerStyle: "disabled"
|
|
40
40
|
}
|
|
41
41
|
},
|
|
42
|
+
control: {
|
|
43
|
+
pos: "relative",
|
|
44
|
+
"--padding-factor": "1",
|
|
45
|
+
"--combobox-input-padding-end": "var(--combobox-input-padding-x)",
|
|
46
|
+
"&:has([data-part=trigger]), &:has([data-part=clear-trigger])": {
|
|
47
|
+
"--combobox-input-padding-end": "calc(var(--combobox-input-height) * var(--padding-factor))"
|
|
48
|
+
},
|
|
49
|
+
"&:has([data-part=trigger]):has([data-part=clear-trigger]:not([hidden]))": {
|
|
50
|
+
"--padding-factor": "1.5"
|
|
51
|
+
}
|
|
52
|
+
},
|
|
42
53
|
input: {
|
|
43
54
|
display: "flex",
|
|
44
55
|
alignItems: "center",
|
|
@@ -46,7 +57,8 @@ const comboboxSlotRecipe = def.defineSlotRecipe({
|
|
|
46
57
|
background: "bg.panel",
|
|
47
58
|
width: "full",
|
|
48
59
|
minH: "var(--combobox-input-height)",
|
|
49
|
-
|
|
60
|
+
ps: "var(--combobox-input-padding-x)",
|
|
61
|
+
pe: "var(--combobox-input-padding-end)",
|
|
50
62
|
"--input-height": "var(--combobox-input-height)",
|
|
51
63
|
borderRadius: "l2",
|
|
52
64
|
outline: 0,
|
|
@@ -78,9 +90,6 @@ const comboboxSlotRecipe = def.defineSlotRecipe({
|
|
|
78
90
|
focusRingWidth: "2px",
|
|
79
91
|
rounded: "l1"
|
|
80
92
|
},
|
|
81
|
-
control: {
|
|
82
|
-
pos: "relative"
|
|
83
|
-
},
|
|
84
93
|
indicatorGroup: {
|
|
85
94
|
display: "flex",
|
|
86
95
|
alignItems: "center",
|
|
@@ -8,6 +8,7 @@ var avatar = require('./avatar.cjs');
|
|
|
8
8
|
var blockquote = require('./blockquote.cjs');
|
|
9
9
|
var breadcrumb = require('./breadcrumb.cjs');
|
|
10
10
|
var card = require('./card.cjs');
|
|
11
|
+
var carousel = require('./carousel.cjs');
|
|
11
12
|
var checkbox = require('./checkbox.cjs');
|
|
12
13
|
var checkboxCard = require('./checkbox-card.cjs');
|
|
13
14
|
var codeBlock = require('./code-block.cjs');
|
|
@@ -61,6 +62,7 @@ const slotRecipes = {
|
|
|
61
62
|
blockquote: blockquote.blockquoteSlotRecipe,
|
|
62
63
|
breadcrumb: breadcrumb.breadcrumbSlotRecipe,
|
|
63
64
|
card: card.cardSlotRecipe,
|
|
65
|
+
carousel: carousel.carouselSlotRecipe,
|
|
64
66
|
checkbox: checkbox.checkboxSlotRecipe,
|
|
65
67
|
checkboxCard: checkboxCard.checkboxCardSlotRecipe,
|
|
66
68
|
codeBlock: codeBlock.codeBlockSlotRecipe,
|
|
@@ -9,7 +9,12 @@ const segmentGroupSlotRecipe = def.defineSlotRecipe({
|
|
|
9
9
|
base: {
|
|
10
10
|
root: {
|
|
11
11
|
"--segment-radius": "radii.l2",
|
|
12
|
-
|
|
12
|
+
"--segment-indicator-bg": {
|
|
13
|
+
_light: "colors.bg",
|
|
14
|
+
_dark: "colors.bg.emphasized"
|
|
15
|
+
},
|
|
16
|
+
"--segment-indicator-shadow": "shadows.sm",
|
|
17
|
+
borderRadius: "var(--segment-radius)",
|
|
13
18
|
display: "inline-flex",
|
|
14
19
|
boxShadow: "inset",
|
|
15
20
|
minW: "max-content",
|
|
@@ -68,12 +73,9 @@ const segmentGroupSlotRecipe = def.defineSlotRecipe({
|
|
|
68
73
|
}
|
|
69
74
|
},
|
|
70
75
|
indicator: {
|
|
71
|
-
shadow: "
|
|
76
|
+
shadow: "var(--segment-indicator-shadow)",
|
|
72
77
|
pos: "absolute",
|
|
73
|
-
bg:
|
|
74
|
-
_light: "bg",
|
|
75
|
-
_dark: "bg.emphasized"
|
|
76
|
-
},
|
|
78
|
+
bg: "var(--segment-indicator-bg)",
|
|
77
79
|
width: "var(--width)",
|
|
78
80
|
height: "var(--height)",
|
|
79
81
|
top: "var(--top)",
|
|
@@ -9,6 +9,8 @@ const tabsSlotRecipe = def.defineSlotRecipe({
|
|
|
9
9
|
base: {
|
|
10
10
|
root: {
|
|
11
11
|
"--tabs-trigger-radius": "radii.l2",
|
|
12
|
+
"--tabs-indicator-shadow": "shadows.xs",
|
|
13
|
+
"--tabs-indicator-bg": "colors.bg",
|
|
12
14
|
position: "relative",
|
|
13
15
|
_horizontal: {
|
|
14
16
|
display: "block"
|
|
@@ -21,8 +23,6 @@ const tabsSlotRecipe = def.defineSlotRecipe({
|
|
|
21
23
|
display: "inline-flex",
|
|
22
24
|
position: "relative",
|
|
23
25
|
isolation: "isolate",
|
|
24
|
-
"--tabs-indicator-shadow": "shadows.xs",
|
|
25
|
-
"--tabs-indicator-bg": "colors.bg",
|
|
26
26
|
minH: "var(--tabs-height)",
|
|
27
27
|
_horizontal: {
|
|
28
28
|
flexDirection: "row"
|
|
@@ -65,7 +65,7 @@ const tabsSlotRecipe = def.defineSlotRecipe({
|
|
|
65
65
|
indicator: {
|
|
66
66
|
width: "var(--width)",
|
|
67
67
|
height: "var(--height)",
|
|
68
|
-
borderRadius: "var(--tabs-
|
|
68
|
+
borderRadius: "var(--tabs-trigger-radius)",
|
|
69
69
|
bg: "var(--tabs-indicator-bg)",
|
|
70
70
|
shadow: "var(--tabs-indicator-shadow)",
|
|
71
71
|
zIndex: -1
|
|
@@ -266,7 +266,7 @@ const tabsSlotRecipe = def.defineSlotRecipe({
|
|
|
266
266
|
"&[data-selected][data-ssr]": {
|
|
267
267
|
bg: "var(--tabs-indicator-bg)",
|
|
268
268
|
shadow: "var(--tabs-indicator-shadow)",
|
|
269
|
-
borderRadius: "var(--tabs-
|
|
269
|
+
borderRadius: "var(--tabs-trigger-radius)"
|
|
270
270
|
}
|
|
271
271
|
}
|
|
272
272
|
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
import { defineSlotRecipe } from '../def.js';
|
|
3
|
+
|
|
4
|
+
const carouselSlotRecipe = defineSlotRecipe({
|
|
5
|
+
className: "carousel",
|
|
6
|
+
slots: [
|
|
7
|
+
"root",
|
|
8
|
+
"itemGroup",
|
|
9
|
+
"item",
|
|
10
|
+
"control",
|
|
11
|
+
"nextTrigger",
|
|
12
|
+
"prevTrigger",
|
|
13
|
+
"indicatorGroup",
|
|
14
|
+
"indicator",
|
|
15
|
+
"autoplayTrigger"
|
|
16
|
+
],
|
|
17
|
+
base: {
|
|
18
|
+
root: {
|
|
19
|
+
position: "relative",
|
|
20
|
+
display: "flex",
|
|
21
|
+
gap: "2",
|
|
22
|
+
_horizontal: {
|
|
23
|
+
flexDirection: "column"
|
|
24
|
+
},
|
|
25
|
+
_vertical: {
|
|
26
|
+
flexDirection: "row"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
item: {
|
|
30
|
+
_horizontal: {
|
|
31
|
+
width: "100%"
|
|
32
|
+
},
|
|
33
|
+
_vertical: {
|
|
34
|
+
height: "100%"
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
control: {
|
|
38
|
+
display: "flex",
|
|
39
|
+
alignItems: "center",
|
|
40
|
+
_horizontal: {
|
|
41
|
+
flexDirection: "row",
|
|
42
|
+
width: "100%"
|
|
43
|
+
},
|
|
44
|
+
_vertical: {
|
|
45
|
+
flexDirection: "column",
|
|
46
|
+
height: "100%"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
indicatorGroup: {
|
|
50
|
+
display: "flex",
|
|
51
|
+
justifyContent: "center",
|
|
52
|
+
gap: "3",
|
|
53
|
+
_horizontal: {
|
|
54
|
+
flexDirection: "row"
|
|
55
|
+
},
|
|
56
|
+
_vertical: {
|
|
57
|
+
flexDirection: "column"
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
indicator: {
|
|
61
|
+
width: "2.5",
|
|
62
|
+
height: "2.5",
|
|
63
|
+
borderRadius: "full",
|
|
64
|
+
bg: "colorPalette.subtle",
|
|
65
|
+
cursor: "button",
|
|
66
|
+
_current: {
|
|
67
|
+
bg: "colorPalette.solid"
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
defaultVariants: {}
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
export { carouselSlotRecipe };
|
|
@@ -132,6 +132,7 @@ const codeBlockSlotRecipe = defineSlotRecipe({
|
|
|
132
132
|
},
|
|
133
133
|
"& [data-line]": {
|
|
134
134
|
position: "relative",
|
|
135
|
+
paddingInlineEnd: "var(--code-block-padding)",
|
|
135
136
|
"--highlight-bg": "var(--code-block-highlight-bg)",
|
|
136
137
|
"--highlight-border": "var(--code-block-highlight-border)",
|
|
137
138
|
"&[data-highlight], &[data-diff]": {
|
|
@@ -37,6 +37,17 @@ const comboboxSlotRecipe = defineSlotRecipe({
|
|
|
37
37
|
layerStyle: "disabled"
|
|
38
38
|
}
|
|
39
39
|
},
|
|
40
|
+
control: {
|
|
41
|
+
pos: "relative",
|
|
42
|
+
"--padding-factor": "1",
|
|
43
|
+
"--combobox-input-padding-end": "var(--combobox-input-padding-x)",
|
|
44
|
+
"&:has([data-part=trigger]), &:has([data-part=clear-trigger])": {
|
|
45
|
+
"--combobox-input-padding-end": "calc(var(--combobox-input-height) * var(--padding-factor))"
|
|
46
|
+
},
|
|
47
|
+
"&:has([data-part=trigger]):has([data-part=clear-trigger]:not([hidden]))": {
|
|
48
|
+
"--padding-factor": "1.5"
|
|
49
|
+
}
|
|
50
|
+
},
|
|
40
51
|
input: {
|
|
41
52
|
display: "flex",
|
|
42
53
|
alignItems: "center",
|
|
@@ -44,7 +55,8 @@ const comboboxSlotRecipe = defineSlotRecipe({
|
|
|
44
55
|
background: "bg.panel",
|
|
45
56
|
width: "full",
|
|
46
57
|
minH: "var(--combobox-input-height)",
|
|
47
|
-
|
|
58
|
+
ps: "var(--combobox-input-padding-x)",
|
|
59
|
+
pe: "var(--combobox-input-padding-end)",
|
|
48
60
|
"--input-height": "var(--combobox-input-height)",
|
|
49
61
|
borderRadius: "l2",
|
|
50
62
|
outline: 0,
|
|
@@ -76,9 +88,6 @@ const comboboxSlotRecipe = defineSlotRecipe({
|
|
|
76
88
|
focusRingWidth: "2px",
|
|
77
89
|
rounded: "l1"
|
|
78
90
|
},
|
|
79
|
-
control: {
|
|
80
|
-
pos: "relative"
|
|
81
|
-
},
|
|
82
91
|
indicatorGroup: {
|
|
83
92
|
display: "flex",
|
|
84
93
|
alignItems: "center",
|
|
@@ -6,6 +6,7 @@ import { avatarSlotRecipe } from './avatar.js';
|
|
|
6
6
|
import { blockquoteSlotRecipe } from './blockquote.js';
|
|
7
7
|
import { breadcrumbSlotRecipe } from './breadcrumb.js';
|
|
8
8
|
import { cardSlotRecipe } from './card.js';
|
|
9
|
+
import { carouselSlotRecipe } from './carousel.js';
|
|
9
10
|
import { checkboxSlotRecipe } from './checkbox.js';
|
|
10
11
|
import { checkboxCardSlotRecipe } from './checkbox-card.js';
|
|
11
12
|
import { codeBlockSlotRecipe } from './code-block.js';
|
|
@@ -59,6 +60,7 @@ const slotRecipes = {
|
|
|
59
60
|
blockquote: blockquoteSlotRecipe,
|
|
60
61
|
breadcrumb: breadcrumbSlotRecipe,
|
|
61
62
|
card: cardSlotRecipe,
|
|
63
|
+
carousel: carouselSlotRecipe,
|
|
62
64
|
checkbox: checkboxSlotRecipe,
|
|
63
65
|
checkboxCard: checkboxCardSlotRecipe,
|
|
64
66
|
codeBlock: codeBlockSlotRecipe,
|
|
@@ -7,7 +7,12 @@ const segmentGroupSlotRecipe = defineSlotRecipe({
|
|
|
7
7
|
base: {
|
|
8
8
|
root: {
|
|
9
9
|
"--segment-radius": "radii.l2",
|
|
10
|
-
|
|
10
|
+
"--segment-indicator-bg": {
|
|
11
|
+
_light: "colors.bg",
|
|
12
|
+
_dark: "colors.bg.emphasized"
|
|
13
|
+
},
|
|
14
|
+
"--segment-indicator-shadow": "shadows.sm",
|
|
15
|
+
borderRadius: "var(--segment-radius)",
|
|
11
16
|
display: "inline-flex",
|
|
12
17
|
boxShadow: "inset",
|
|
13
18
|
minW: "max-content",
|
|
@@ -66,12 +71,9 @@ const segmentGroupSlotRecipe = defineSlotRecipe({
|
|
|
66
71
|
}
|
|
67
72
|
},
|
|
68
73
|
indicator: {
|
|
69
|
-
shadow: "
|
|
74
|
+
shadow: "var(--segment-indicator-shadow)",
|
|
70
75
|
pos: "absolute",
|
|
71
|
-
bg:
|
|
72
|
-
_light: "bg",
|
|
73
|
-
_dark: "bg.emphasized"
|
|
74
|
-
},
|
|
76
|
+
bg: "var(--segment-indicator-bg)",
|
|
75
77
|
width: "var(--width)",
|
|
76
78
|
height: "var(--height)",
|
|
77
79
|
top: "var(--top)",
|
|
@@ -7,6 +7,8 @@ const tabsSlotRecipe = defineSlotRecipe({
|
|
|
7
7
|
base: {
|
|
8
8
|
root: {
|
|
9
9
|
"--tabs-trigger-radius": "radii.l2",
|
|
10
|
+
"--tabs-indicator-shadow": "shadows.xs",
|
|
11
|
+
"--tabs-indicator-bg": "colors.bg",
|
|
10
12
|
position: "relative",
|
|
11
13
|
_horizontal: {
|
|
12
14
|
display: "block"
|
|
@@ -19,8 +21,6 @@ const tabsSlotRecipe = defineSlotRecipe({
|
|
|
19
21
|
display: "inline-flex",
|
|
20
22
|
position: "relative",
|
|
21
23
|
isolation: "isolate",
|
|
22
|
-
"--tabs-indicator-shadow": "shadows.xs",
|
|
23
|
-
"--tabs-indicator-bg": "colors.bg",
|
|
24
24
|
minH: "var(--tabs-height)",
|
|
25
25
|
_horizontal: {
|
|
26
26
|
flexDirection: "row"
|
|
@@ -63,7 +63,7 @@ const tabsSlotRecipe = defineSlotRecipe({
|
|
|
63
63
|
indicator: {
|
|
64
64
|
width: "var(--width)",
|
|
65
65
|
height: "var(--height)",
|
|
66
|
-
borderRadius: "var(--tabs-
|
|
66
|
+
borderRadius: "var(--tabs-trigger-radius)",
|
|
67
67
|
bg: "var(--tabs-indicator-bg)",
|
|
68
68
|
shadow: "var(--tabs-indicator-shadow)",
|
|
69
69
|
zIndex: -1
|
|
@@ -264,7 +264,7 @@ const tabsSlotRecipe = defineSlotRecipe({
|
|
|
264
264
|
"&[data-selected][data-ssr]": {
|
|
265
265
|
bg: "var(--tabs-indicator-bg)",
|
|
266
266
|
shadow: "var(--tabs-indicator-shadow)",
|
|
267
|
-
borderRadius: "var(--tabs-
|
|
267
|
+
borderRadius: "var(--tabs-trigger-radius)"
|
|
268
268
|
}
|
|
269
269
|
}
|
|
270
270
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const carouselSlotRecipe: import("@pandacss/types").SlotRecipeConfig;
|
|
@@ -6,6 +6,7 @@ export declare const slotRecipes: {
|
|
|
6
6
|
blockquote: import("@pandacss/types").SlotRecipeConfig;
|
|
7
7
|
breadcrumb: import("@pandacss/types").SlotRecipeConfig;
|
|
8
8
|
card: import("@pandacss/types").SlotRecipeConfig;
|
|
9
|
+
carousel: import("@pandacss/types").SlotRecipeConfig;
|
|
9
10
|
checkbox: import("@pandacss/types").SlotRecipeConfig;
|
|
10
11
|
checkboxCard: import("@pandacss/types").SlotRecipeConfig;
|
|
11
12
|
codeBlock: 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.29.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.29.0"
|
|
53
53
|
},
|
|
54
54
|
"scripts": {
|
|
55
55
|
"theme:eject": "chakra eject --outdir=src",
|