@chakra-ui/panda-preset 3.25.0 → 3.27.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/LICENSE CHANGED
@@ -1,21 +1,20 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2019 Segun Adebayo
3
+ Copyright (c) 2019 Chakra Systems Inc.
4
4
 
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
6
+ this software and associated documentation files (the "Software"), to deal in
7
+ the Software without restriction, including without limitation the rights to
8
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9
+ the Software, and to permit persons to whom the Software is furnished to do so,
10
+ subject to the following conditions:
11
11
 
12
12
  The above copyright notice and this permission notice shall be included in all
13
13
  copies or substantial portions of the Software.
14
14
 
15
15
  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -80,6 +80,11 @@ const checkmarkRecipe = def.defineRecipe({
80
80
  borderColor: "colorPalette.solid"
81
81
  }
82
82
  }
83
+ },
84
+ filled: {
85
+ true: {
86
+ bg: "bg"
87
+ }
83
88
  }
84
89
  },
85
90
  defaultVariants: {
@@ -91,6 +91,11 @@ const radiomarkRecipe = def.defineRecipe({
91
91
  lg: {
92
92
  boxSize: "6"
93
93
  }
94
+ },
95
+ filled: {
96
+ true: {
97
+ bg: "bg"
98
+ }
94
99
  }
95
100
  },
96
101
  defaultVariants: {
@@ -75,7 +75,8 @@ const codeBlockSlotRecipe = def.defineSlotRecipe({
75
75
  content: {
76
76
  position: "relative",
77
77
  colorScheme: "dark",
78
- overflow: "hidden",
78
+ overflowX: "auto",
79
+ overflowY: "hidden",
79
80
  borderBottomRadius: "var(--code-block-radius)",
80
81
  maxHeight: "var(--code-block-max-height)",
81
82
  "& ::selection": {
@@ -176,6 +177,7 @@ const codeBlockSlotRecipe = def.defineSlotRecipe({
176
177
  display: "inline-block",
177
178
  textAlign: "end",
178
179
  userSelect: "none",
180
+ whiteSpace: "nowrap",
179
181
  opacity: 0.4
180
182
  },
181
183
  "& [data-diff='added']:before": {
@@ -20,6 +20,7 @@ const comboboxSlotRecipe = def.defineSlotRecipe({
20
20
  "list",
21
21
  "positioner",
22
22
  "trigger",
23
+ "empty",
23
24
  "indicatorGroup",
24
25
  "empty"
25
26
  ],
@@ -24,6 +24,7 @@ var fieldset = require('./fieldset.cjs');
24
24
  var fileUpload = require('./file-upload.cjs');
25
25
  var hoverCard = require('./hover-card.cjs');
26
26
  var list = require('./list.cjs');
27
+ var listbox = require('./listbox.cjs');
27
28
  var menu = require('./menu.cjs');
28
29
  var nativeSelect = require('./native-select.cjs');
29
30
  var numberInput = require('./number-input.cjs');
@@ -73,6 +74,7 @@ const slotRecipes = {
73
74
  fileUpload: fileUpload.fileUploadSlotRecipe,
74
75
  hoverCard: hoverCard.hoverCardSlotRecipe,
75
76
  list: list.listSlotRecipe,
77
+ listbox: listbox.listboxSlotRecipe,
76
78
  menu: menu.menuSlotRecipe,
77
79
  nativeSelect: nativeSelect.nativeSelectSlotRecipe,
78
80
  numberInput: numberInput.numberInputSlotRecipe,
@@ -0,0 +1,146 @@
1
+ "use strict";
2
+ 'use strict';
3
+
4
+ var def = require('../def.cjs');
5
+
6
+ const listboxSlotRecipe = def.defineSlotRecipe({
7
+ className: "listbox",
8
+ slots: [
9
+ "label",
10
+ "input",
11
+ "item",
12
+ "itemText",
13
+ "itemIndicator",
14
+ "itemGroup",
15
+ "itemGroupLabel",
16
+ "content",
17
+ "root",
18
+ "valueText",
19
+ "empty"
20
+ ],
21
+ base: {
22
+ root: {
23
+ display: "flex",
24
+ flexDirection: "column",
25
+ gap: "1.5",
26
+ width: "full"
27
+ },
28
+ content: {
29
+ display: "flex",
30
+ maxH: "96",
31
+ p: "1",
32
+ gap: "1",
33
+ textStyle: "sm",
34
+ outline: "none",
35
+ scrollPadding: "1",
36
+ _horizontal: {
37
+ flexDirection: "row",
38
+ overflowX: "auto"
39
+ },
40
+ _vertical: {
41
+ flexDirection: "column",
42
+ overflowY: "auto"
43
+ },
44
+ "--listbox-item-padding-x": "spacing.2",
45
+ "--listbox-item-padding-y": "spacing.1.5"
46
+ },
47
+ item: {
48
+ position: "relative",
49
+ userSelect: "none",
50
+ display: "flex",
51
+ alignItems: "center",
52
+ gap: "2",
53
+ cursor: "pointer",
54
+ justifyContent: "space-between",
55
+ flex: "1",
56
+ textAlign: "start",
57
+ borderRadius: "l1",
58
+ py: "var(--listbox-item-padding-y)",
59
+ px: "var(--listbox-item-padding-x)",
60
+ _highlighted: {
61
+ outline: "2px solid",
62
+ outlineColor: "border.emphasized"
63
+ },
64
+ _disabled: {
65
+ pointerEvents: "none",
66
+ opacity: "0.5"
67
+ }
68
+ },
69
+ empty: {
70
+ py: "var(--listbox-item-padding-y)",
71
+ px: "var(--listbox-item-padding-x)"
72
+ },
73
+ itemText: {
74
+ flex: "1"
75
+ },
76
+ itemGroup: {
77
+ mt: "1.5",
78
+ _first: {
79
+ mt: "0"
80
+ }
81
+ },
82
+ itemGroupLabel: {
83
+ py: "1.5",
84
+ px: "2",
85
+ fontWeight: "medium"
86
+ },
87
+ label: {
88
+ fontWeight: "medium",
89
+ userSelect: "none",
90
+ textStyle: "sm",
91
+ _disabled: {
92
+ layerStyle: "disabled"
93
+ }
94
+ },
95
+ valueText: {
96
+ lineClamp: "1",
97
+ maxW: "80%"
98
+ },
99
+ itemIndicator: {
100
+ display: "flex",
101
+ alignItems: "center",
102
+ justifyContent: "center",
103
+ _icon: {
104
+ boxSize: "4"
105
+ }
106
+ }
107
+ },
108
+ variants: {
109
+ variant: {
110
+ subtle: {
111
+ content: {
112
+ bg: "bg.panel",
113
+ borderWidth: "1px",
114
+ borderRadius: "l2"
115
+ },
116
+ item: {
117
+ _hover: {
118
+ bg: "bg.emphasized/60"
119
+ },
120
+ _selected: {
121
+ bg: "bg.muted"
122
+ }
123
+ }
124
+ },
125
+ solid: {
126
+ content: {
127
+ bg: "bg.panel",
128
+ borderWidth: "1px",
129
+ borderRadius: "l2"
130
+ },
131
+ item: {
132
+ _selected: {
133
+ bg: "colorPalette.solid",
134
+ color: "colorPalette.contrast"
135
+ }
136
+ }
137
+ },
138
+ plain: {}
139
+ }
140
+ },
141
+ defaultVariants: {
142
+ variant: "subtle"
143
+ }
144
+ });
145
+
146
+ exports.listboxSlotRecipe = listboxSlotRecipe;
@@ -121,7 +121,8 @@ const menuSlotRecipe = def.defineSlotRecipe({
121
121
  sm: {
122
122
  content: {
123
123
  minW: "8rem",
124
- padding: "1"
124
+ padding: "1",
125
+ scrollPadding: "1"
125
126
  },
126
127
  item: {
127
128
  gap: "1",
@@ -133,7 +134,8 @@ const menuSlotRecipe = def.defineSlotRecipe({
133
134
  md: {
134
135
  content: {
135
136
  minW: "8rem",
136
- padding: "1.5"
137
+ padding: "1.5",
138
+ scrollPadding: "1.5"
137
139
  },
138
140
  item: {
139
141
  gap: "2",
@@ -78,6 +78,11 @@ const checkmarkRecipe = defineRecipe({
78
78
  borderColor: "colorPalette.solid"
79
79
  }
80
80
  }
81
+ },
82
+ filled: {
83
+ true: {
84
+ bg: "bg"
85
+ }
81
86
  }
82
87
  },
83
88
  defaultVariants: {
@@ -89,6 +89,11 @@ const radiomarkRecipe = defineRecipe({
89
89
  lg: {
90
90
  boxSize: "6"
91
91
  }
92
+ },
93
+ filled: {
94
+ true: {
95
+ bg: "bg"
96
+ }
92
97
  }
93
98
  },
94
99
  defaultVariants: {
@@ -73,7 +73,8 @@ const codeBlockSlotRecipe = defineSlotRecipe({
73
73
  content: {
74
74
  position: "relative",
75
75
  colorScheme: "dark",
76
- overflow: "hidden",
76
+ overflowX: "auto",
77
+ overflowY: "hidden",
77
78
  borderBottomRadius: "var(--code-block-radius)",
78
79
  maxHeight: "var(--code-block-max-height)",
79
80
  "& ::selection": {
@@ -174,6 +175,7 @@ const codeBlockSlotRecipe = defineSlotRecipe({
174
175
  display: "inline-block",
175
176
  textAlign: "end",
176
177
  userSelect: "none",
178
+ whiteSpace: "nowrap",
177
179
  opacity: 0.4
178
180
  },
179
181
  "& [data-diff='added']:before": {
@@ -18,6 +18,7 @@ const comboboxSlotRecipe = defineSlotRecipe({
18
18
  "list",
19
19
  "positioner",
20
20
  "trigger",
21
+ "empty",
21
22
  "indicatorGroup",
22
23
  "empty"
23
24
  ],
@@ -22,6 +22,7 @@ import { fieldsetSlotRecipe } from './fieldset.js';
22
22
  import { fileUploadSlotRecipe } from './file-upload.js';
23
23
  import { hoverCardSlotRecipe } from './hover-card.js';
24
24
  import { listSlotRecipe } from './list.js';
25
+ import { listboxSlotRecipe } from './listbox.js';
25
26
  import { menuSlotRecipe } from './menu.js';
26
27
  import { nativeSelectSlotRecipe } from './native-select.js';
27
28
  import { numberInputSlotRecipe } from './number-input.js';
@@ -71,6 +72,7 @@ const slotRecipes = {
71
72
  fileUpload: fileUploadSlotRecipe,
72
73
  hoverCard: hoverCardSlotRecipe,
73
74
  list: listSlotRecipe,
75
+ listbox: listboxSlotRecipe,
74
76
  menu: menuSlotRecipe,
75
77
  nativeSelect: nativeSelectSlotRecipe,
76
78
  numberInput: numberInputSlotRecipe,
@@ -0,0 +1,144 @@
1
+ "use strict";
2
+ import { defineSlotRecipe } from '../def.js';
3
+
4
+ const listboxSlotRecipe = defineSlotRecipe({
5
+ className: "listbox",
6
+ slots: [
7
+ "label",
8
+ "input",
9
+ "item",
10
+ "itemText",
11
+ "itemIndicator",
12
+ "itemGroup",
13
+ "itemGroupLabel",
14
+ "content",
15
+ "root",
16
+ "valueText",
17
+ "empty"
18
+ ],
19
+ base: {
20
+ root: {
21
+ display: "flex",
22
+ flexDirection: "column",
23
+ gap: "1.5",
24
+ width: "full"
25
+ },
26
+ content: {
27
+ display: "flex",
28
+ maxH: "96",
29
+ p: "1",
30
+ gap: "1",
31
+ textStyle: "sm",
32
+ outline: "none",
33
+ scrollPadding: "1",
34
+ _horizontal: {
35
+ flexDirection: "row",
36
+ overflowX: "auto"
37
+ },
38
+ _vertical: {
39
+ flexDirection: "column",
40
+ overflowY: "auto"
41
+ },
42
+ "--listbox-item-padding-x": "spacing.2",
43
+ "--listbox-item-padding-y": "spacing.1.5"
44
+ },
45
+ item: {
46
+ position: "relative",
47
+ userSelect: "none",
48
+ display: "flex",
49
+ alignItems: "center",
50
+ gap: "2",
51
+ cursor: "pointer",
52
+ justifyContent: "space-between",
53
+ flex: "1",
54
+ textAlign: "start",
55
+ borderRadius: "l1",
56
+ py: "var(--listbox-item-padding-y)",
57
+ px: "var(--listbox-item-padding-x)",
58
+ _highlighted: {
59
+ outline: "2px solid",
60
+ outlineColor: "border.emphasized"
61
+ },
62
+ _disabled: {
63
+ pointerEvents: "none",
64
+ opacity: "0.5"
65
+ }
66
+ },
67
+ empty: {
68
+ py: "var(--listbox-item-padding-y)",
69
+ px: "var(--listbox-item-padding-x)"
70
+ },
71
+ itemText: {
72
+ flex: "1"
73
+ },
74
+ itemGroup: {
75
+ mt: "1.5",
76
+ _first: {
77
+ mt: "0"
78
+ }
79
+ },
80
+ itemGroupLabel: {
81
+ py: "1.5",
82
+ px: "2",
83
+ fontWeight: "medium"
84
+ },
85
+ label: {
86
+ fontWeight: "medium",
87
+ userSelect: "none",
88
+ textStyle: "sm",
89
+ _disabled: {
90
+ layerStyle: "disabled"
91
+ }
92
+ },
93
+ valueText: {
94
+ lineClamp: "1",
95
+ maxW: "80%"
96
+ },
97
+ itemIndicator: {
98
+ display: "flex",
99
+ alignItems: "center",
100
+ justifyContent: "center",
101
+ _icon: {
102
+ boxSize: "4"
103
+ }
104
+ }
105
+ },
106
+ variants: {
107
+ variant: {
108
+ subtle: {
109
+ content: {
110
+ bg: "bg.panel",
111
+ borderWidth: "1px",
112
+ borderRadius: "l2"
113
+ },
114
+ item: {
115
+ _hover: {
116
+ bg: "bg.emphasized/60"
117
+ },
118
+ _selected: {
119
+ bg: "bg.muted"
120
+ }
121
+ }
122
+ },
123
+ solid: {
124
+ content: {
125
+ bg: "bg.panel",
126
+ borderWidth: "1px",
127
+ borderRadius: "l2"
128
+ },
129
+ item: {
130
+ _selected: {
131
+ bg: "colorPalette.solid",
132
+ color: "colorPalette.contrast"
133
+ }
134
+ }
135
+ },
136
+ plain: {}
137
+ }
138
+ },
139
+ defaultVariants: {
140
+ variant: "subtle"
141
+ }
142
+ });
143
+
144
+ export { listboxSlotRecipe };
@@ -119,7 +119,8 @@ const menuSlotRecipe = defineSlotRecipe({
119
119
  sm: {
120
120
  content: {
121
121
  minW: "8rem",
122
- padding: "1"
122
+ padding: "1",
123
+ scrollPadding: "1"
123
124
  },
124
125
  item: {
125
126
  gap: "1",
@@ -131,7 +132,8 @@ const menuSlotRecipe = defineSlotRecipe({
131
132
  md: {
132
133
  content: {
133
134
  minW: "8rem",
134
- padding: "1.5"
135
+ padding: "1.5",
136
+ scrollPadding: "1.5"
135
137
  },
136
138
  item: {
137
139
  gap: "2",
@@ -20,6 +20,7 @@ export declare const slotRecipes: {
20
20
  fileUpload: import("@pandacss/types").SlotRecipeConfig;
21
21
  hoverCard: import("@pandacss/types").SlotRecipeConfig;
22
22
  list: import("@pandacss/types").SlotRecipeConfig;
23
+ listbox: import("@pandacss/types").SlotRecipeConfig;
23
24
  menu: import("@pandacss/types").SlotRecipeConfig;
24
25
  nativeSelect: import("@pandacss/types").SlotRecipeConfig;
25
26
  numberInput: import("@pandacss/types").SlotRecipeConfig;
@@ -0,0 +1 @@
1
+ export declare const listboxSlotRecipe: import("@pandacss/types").SlotRecipeConfig;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chakra-ui/panda-preset",
3
- "version": "3.25.0",
3
+ "version": "3.27.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.25.0"
52
+ "@chakra-ui/cli": "3.27.0"
53
53
  },
54
54
  "scripts": {
55
55
  "theme:eject": "chakra eject --outdir=src",