@chakra-ui/panda-preset 3.21.1 → 3.22.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.
@@ -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",
@@ -41,7 +41,7 @@ const radiomarkRecipe = def.defineRecipe({
41
41
  variant: {
42
42
  solid: {
43
43
  borderWidth: "1px",
44
- borderColor: "border",
44
+ borderColor: "border.emphasized",
45
45
  _checked: {
46
46
  bg: "colorPalette.solid",
47
47
  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",
@@ -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;
@@ -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",
@@ -94,7 +94,7 @@ const radioGroupSlotRecipe = def.defineSlotRecipe({
94
94
  solid: {
95
95
  itemControl: {
96
96
  borderWidth: "1px",
97
- borderColor: "border",
97
+ borderColor: "border.emphasized",
98
98
  _checked: {
99
99
  bg: "colorPalette.solid",
100
100
  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",
@@ -39,7 +39,7 @@ const radiomarkRecipe = defineRecipe({
39
39
  variant: {
40
40
  solid: {
41
41
  borderWidth: "1px",
42
- borderColor: "border",
42
+ borderColor: "border.emphasized",
43
43
  _checked: {
44
44
  bg: "colorPalette.solid",
45
45
  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",
@@ -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 };
@@ -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",
@@ -92,7 +92,7 @@ const radioGroupSlotRecipe = defineSlotRecipe({
92
92
  solid: {
93
93
  itemControl: {
94
94
  borderWidth: "1px",
95
- borderColor: "border",
95
+ borderColor: "border.emphasized",
96
96
  _checked: {
97
97
  bg: "colorPalette.solid",
98
98
  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.21.1",
3
+ "version": "3.22.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.21.1"
52
+ "@chakra-ui/cli": "3.22.0"
53
53
  },
54
54
  "scripts": {
55
55
  "theme:eject": "chakra eject --outdir=src",