@okshaun/components 1.0.2 → 2.0.1
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/.mcp.json +2 -5
- package/dist/icon-metadata.json +5173 -0
- package/dist/index.js +17118 -9339
- package/dist/index.js.map +1 -1
- package/dist/panda.buildinfo.json +696 -0
- package/dist/playroom-static.css +187432 -0
- package/dist/{preset-DCCViEDs.js → preset-Df8i1OIQ.js} +3651 -2776
- package/dist/preset-Df8i1OIQ.js.map +1 -0
- package/dist/preset.js +1 -1
- package/dist/specs/color-palette.json +22 -1
- package/dist/specs/patterns.json +0 -16
- package/dist/specs/recipes.json +411 -239
- package/dist/specs/semantic-tokens.json +347 -146
- package/dist/specs/text-styles.json +72 -0
- package/dist/specs/tokens.json +267 -67
- package/dist/sprite.svg +1 -1
- package/dist/sprite.symbol.html +6662 -320
- package/dist/styles.css +36925 -5
- package/dist/svgs/calendar-lock.svg +1 -0
- package/dist/svgs/computer.svg +1 -0
- package/dist/svgs/cookie.svg +1 -0
- package/dist/svgs/folder-check.svg +1 -0
- package/dist/svgs/folder-copy.svg +1 -0
- package/dist/svgs/folder-dashed.svg +1 -0
- package/dist/svgs/folder-open.svg +1 -0
- package/dist/svgs/folder-topic.svg +1 -0
- package/dist/svgs/folder.svg +1 -0
- package/dist/svgs/mobile.svg +1 -0
- package/dist/svgs/numpad.svg +1 -0
- package/dist/svgs/phone.svg +1 -0
- package/dist/svgs/qr-code.svg +1 -0
- package/dist/svgs/sparkle.svg +1 -0
- package/dist/svgs/trolley.svg +1 -0
- package/dist/types/index.d.ts +837 -337
- package/package.json +49 -24
- package/src/recipes/avatar.ts +98 -98
- package/src/recipes/badge.ts +22 -39
- package/src/recipes/box.ts +1 -7
- package/src/recipes/breadcrumbs.ts +42 -25
- package/src/recipes/button.ts +201 -105
- package/src/recipes/card.ts +5 -1
- package/src/recipes/checkbox.ts +23 -24
- package/src/recipes/checkboxInput.ts +25 -0
- package/src/recipes/chip.ts +35 -37
- package/src/recipes/code.ts +4 -4
- package/src/recipes/datePicker.ts +212 -0
- package/src/recipes/divider.ts +38 -32
- package/src/recipes/formField.ts +41 -23
- package/src/recipes/highlightText.ts +14 -0
- package/src/recipes/icon.ts +13 -0
- package/src/recipes/list.ts +14 -0
- package/src/recipes/listItem.ts +310 -0
- package/src/recipes/listItemGroup.ts +62 -0
- package/src/recipes/menu.ts +90 -163
- package/src/recipes/modal.ts +55 -25
- package/src/recipes/radio.ts +29 -20
- package/src/recipes/radioInput.ts +25 -0
- package/src/recipes/recipes-regular.ts +14 -0
- package/src/recipes/recipes-slot.ts +19 -0
- package/src/recipes/select.ts +1 -1
- package/src/recipes/spinner.ts +49 -23
- package/src/recipes/tag.ts +80 -84
- package/src/recipes/text.ts +18 -10
- package/src/recipes/textInput.ts +205 -0
- package/src/recipes/textarea.ts +65 -138
- package/src/recipes/themeSwitcher.ts +3 -3
- package/src/recipes/timePicker.ts +199 -0
- package/src/recipes/toggle.ts +72 -99
- package/src/recipes/toggleInput.ts +26 -0
- package/src/recipes/tooltip.ts +52 -343
- package/src/styles/index.css +1 -1
- package/src/styles/primitives/borders.ts +7 -1
- package/src/styles/primitives/colors.ts +51 -0
- package/src/styles/primitives/fontSizes.ts +1 -0
- package/src/styles/primitives/index.ts +2 -1
- package/src/styles/primitives/shadows.ts +28 -37
- package/src/styles/primitives/sizes.ts +1 -0
- package/src/styles/primitives/zIndex.ts +17 -0
- package/src/styles/semantics/colors.ts +137 -82
- package/src/styles/semantics/index.ts +1 -0
- package/src/styles/semantics/shadows.ts +27 -16
- package/src/styles/semantics/zIndex.ts +18 -0
- package/src/styles/utilities/breakpoints.ts +6 -6
- package/src/styles/utilities/index.ts +3 -0
- package/src/styles/utilities/textStyles.ts +70 -0
- package/src/utils/splitProps.ts +3 -3
- package/dist/preset-DCCViEDs.js.map +0 -1
- package/dist/styles/global.css +0 -148
- package/dist/styles/recipes/avatar.css +0 -185
- package/dist/styles/recipes/badge.css +0 -85
- package/dist/styles/recipes/breadcrumbs.css +0 -38
- package/dist/styles/recipes/button.css +0 -195
- package/dist/styles/recipes/card.css +0 -57
- package/dist/styles/recipes/checkbox-input.css +0 -12
- package/dist/styles/recipes/checkbox.css +0 -90
- package/dist/styles/recipes/chip.css +0 -137
- package/dist/styles/recipes/code.css +0 -12
- package/dist/styles/recipes/divider.css +0 -40
- package/dist/styles/recipes/form-field.css +0 -39
- package/dist/styles/recipes/heading.css +0 -40
- package/dist/styles/recipes/icon-button.css +0 -181
- package/dist/styles/recipes/label.css +0 -14
- package/dist/styles/recipes/link.css +0 -49
- package/dist/styles/recipes/menu.css +0 -141
- package/dist/styles/recipes/modal.css +0 -99
- package/dist/styles/recipes/pre.css +0 -16
- package/dist/styles/recipes/radio-input.css +0 -7
- package/dist/styles/recipes/radio.css +0 -82
- package/dist/styles/recipes/select.css +0 -103
- package/dist/styles/recipes/spinner.css +0 -36
- package/dist/styles/recipes/tag.css +0 -27
- package/dist/styles/recipes/text.css +0 -46
- package/dist/styles/recipes/textarea.css +0 -91
- package/dist/styles/recipes/textinput.css +0 -87
- package/dist/styles/recipes/theme-switcher.css +0 -53
- package/dist/styles/recipes/toggle-input.css +0 -12
- package/dist/styles/recipes/toggle.css +0 -125
- package/dist/styles/recipes/tooltip.css +0 -133
- package/dist/styles/recipes.css +0 -30
- package/dist/styles/reset.css +0 -1
- package/dist/styles/tokens.css +0 -1016
- package/dist/styles/utilities.css +0 -1694
- package/src/recipes/checkboxinput.ts +0 -15
- package/src/recipes/index.ts +0 -28
- package/src/recipes/radioinput.ts +0 -12
- package/src/recipes/textinput.ts +0 -100
- package/src/recipes/toggleinput.ts +0 -16
- package/src/utils/injectSprite.ts +0 -36
- package/src/utils/spriteContent.ts +0 -4
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
import { defineSlotRecipe } from '@pandacss/dev';
|
|
2
|
+
|
|
3
|
+
export const listItemRecipe = defineSlotRecipe({
|
|
4
|
+
className: 'listItem',
|
|
5
|
+
jsx: ['ListItem'],
|
|
6
|
+
slots: [
|
|
7
|
+
'wrapper',
|
|
8
|
+
'icon',
|
|
9
|
+
'itemMain',
|
|
10
|
+
'itemLabel',
|
|
11
|
+
'itemDescription',
|
|
12
|
+
'divider',
|
|
13
|
+
],
|
|
14
|
+
base: {
|
|
15
|
+
wrapper: {
|
|
16
|
+
display: 'flex',
|
|
17
|
+
alignItems: 'start',
|
|
18
|
+
justifyContent: 'start',
|
|
19
|
+
gap: '4',
|
|
20
|
+
width: 'full',
|
|
21
|
+
textAlign: 'left',
|
|
22
|
+
borderWidth: '1',
|
|
23
|
+
borderStyle: 'solid',
|
|
24
|
+
borderColor: 'transparent',
|
|
25
|
+
color: 'text',
|
|
26
|
+
cursor: 'pointer',
|
|
27
|
+
outline: '[2px solid transparent]',
|
|
28
|
+
outlineOffset: '-2',
|
|
29
|
+
bg: 'transparent',
|
|
30
|
+
scrollSnapAlign: 'start',
|
|
31
|
+
transitionDuration: 'fast',
|
|
32
|
+
transitionProperty: 'background, color',
|
|
33
|
+
transitionTimingFunction: 'default',
|
|
34
|
+
_hover: {
|
|
35
|
+
bg: 'bg.neutral.hovered',
|
|
36
|
+
},
|
|
37
|
+
'&:is(:active)': {
|
|
38
|
+
bg: 'bg.neutral.hovered',
|
|
39
|
+
},
|
|
40
|
+
_focus: {
|
|
41
|
+
bg: 'bg.neutral.hovered',
|
|
42
|
+
},
|
|
43
|
+
'&[data-active="true"]': {
|
|
44
|
+
bg: 'bg.neutral.hovered',
|
|
45
|
+
},
|
|
46
|
+
_disabled: {
|
|
47
|
+
opacity: '0.4',
|
|
48
|
+
cursor: 'not-allowed',
|
|
49
|
+
pointerEvents: 'none',
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
divider: {
|
|
53
|
+
width: 'full',
|
|
54
|
+
},
|
|
55
|
+
icon: {
|
|
56
|
+
aspectRatio: 'square',
|
|
57
|
+
transitionDuration: 'fast',
|
|
58
|
+
transitionProperty: 'fill',
|
|
59
|
+
transitionTimingFunction: 'default',
|
|
60
|
+
flexShrink: '0',
|
|
61
|
+
},
|
|
62
|
+
itemMain: {
|
|
63
|
+
display: 'flex',
|
|
64
|
+
flexDirection: 'column',
|
|
65
|
+
gap: '0',
|
|
66
|
+
minWidth: '0',
|
|
67
|
+
},
|
|
68
|
+
itemLabel: {
|
|
69
|
+
color: 'text',
|
|
70
|
+
},
|
|
71
|
+
itemDescription: {
|
|
72
|
+
color: 'text.subtlest',
|
|
73
|
+
lineHeight: 'tight',
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
variants: {
|
|
77
|
+
variant: {
|
|
78
|
+
default: {},
|
|
79
|
+
checkbox: {
|
|
80
|
+
wrapper: {
|
|
81
|
+
_hover: {
|
|
82
|
+
bg: 'bg.neutral.hovered',
|
|
83
|
+
},
|
|
84
|
+
_focus: {
|
|
85
|
+
bg: 'bg.neutral.hovered',
|
|
86
|
+
},
|
|
87
|
+
'&:is(:active), &:is([data-active="true"]):hover': {
|
|
88
|
+
bg: 'bg.neutral.hovered',
|
|
89
|
+
},
|
|
90
|
+
_selected: {
|
|
91
|
+
bg: 'surface',
|
|
92
|
+
_hover: {
|
|
93
|
+
bg: 'surface',
|
|
94
|
+
},
|
|
95
|
+
_focus: {
|
|
96
|
+
bg: 'bg.neutral.hovered',
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
toggle: {
|
|
102
|
+
wrapper: {
|
|
103
|
+
_hover: {
|
|
104
|
+
bg: 'bg.neutral.hovered',
|
|
105
|
+
},
|
|
106
|
+
_focus: {
|
|
107
|
+
bg: 'bg.neutral.hovered',
|
|
108
|
+
},
|
|
109
|
+
'&:is(:active), &:is([data-active="true"]):hover': {
|
|
110
|
+
bg: 'bg.neutral.hovered',
|
|
111
|
+
},
|
|
112
|
+
_selected: {
|
|
113
|
+
bg: 'surface',
|
|
114
|
+
_hover: {
|
|
115
|
+
bg: 'surface',
|
|
116
|
+
},
|
|
117
|
+
_focus: {
|
|
118
|
+
bg: 'bg.neutral.hovered',
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
divider: {},
|
|
124
|
+
},
|
|
125
|
+
density: {
|
|
126
|
+
compact: {
|
|
127
|
+
wrapper: {
|
|
128
|
+
py: '3',
|
|
129
|
+
px: '10',
|
|
130
|
+
},
|
|
131
|
+
itemLabel: {
|
|
132
|
+
textStyle: 'sans.md',
|
|
133
|
+
color: 'text',
|
|
134
|
+
},
|
|
135
|
+
itemDescription: {
|
|
136
|
+
textStyle: 'sans.xs',
|
|
137
|
+
lineHeight: 'tight',
|
|
138
|
+
},
|
|
139
|
+
icon: {
|
|
140
|
+
w: '24',
|
|
141
|
+
h: '24',
|
|
142
|
+
},
|
|
143
|
+
divider: {
|
|
144
|
+
py: '3',
|
|
145
|
+
px: '10',
|
|
146
|
+
},
|
|
147
|
+
},
|
|
148
|
+
comfortable: {
|
|
149
|
+
wrapper: {
|
|
150
|
+
py: '7',
|
|
151
|
+
px: '12',
|
|
152
|
+
},
|
|
153
|
+
itemLabel: {
|
|
154
|
+
textStyle: 'sans.md',
|
|
155
|
+
color: 'text',
|
|
156
|
+
},
|
|
157
|
+
itemDescription: {
|
|
158
|
+
textStyle: 'sans.xs',
|
|
159
|
+
lineHeight: 'tight',
|
|
160
|
+
},
|
|
161
|
+
icon: {
|
|
162
|
+
w: '24',
|
|
163
|
+
h: '24',
|
|
164
|
+
},
|
|
165
|
+
divider: {
|
|
166
|
+
py: '7',
|
|
167
|
+
px: '12',
|
|
168
|
+
},
|
|
169
|
+
},
|
|
170
|
+
spacious: {
|
|
171
|
+
wrapper: {
|
|
172
|
+
py: '9',
|
|
173
|
+
px: '16',
|
|
174
|
+
},
|
|
175
|
+
itemLabel: {
|
|
176
|
+
textStyle: 'sans.lg',
|
|
177
|
+
color: 'text',
|
|
178
|
+
},
|
|
179
|
+
itemDescription: {
|
|
180
|
+
textStyle: 'sans.sm',
|
|
181
|
+
lineHeight: 'tight',
|
|
182
|
+
},
|
|
183
|
+
icon: {
|
|
184
|
+
w: '28',
|
|
185
|
+
h: '28',
|
|
186
|
+
},
|
|
187
|
+
divider: {
|
|
188
|
+
py: '9',
|
|
189
|
+
px: '16',
|
|
190
|
+
},
|
|
191
|
+
},
|
|
192
|
+
},
|
|
193
|
+
selected: {
|
|
194
|
+
true: {
|
|
195
|
+
wrapper: {
|
|
196
|
+
bg: 'surface.selected',
|
|
197
|
+
'&[data-active="true"]': {
|
|
198
|
+
bg: 'surface.selected.hovered',
|
|
199
|
+
},
|
|
200
|
+
_hover: {
|
|
201
|
+
bg: 'surface.selected.hovered',
|
|
202
|
+
},
|
|
203
|
+
'&:is(:active)': {
|
|
204
|
+
bg: 'surface.selected.pressed',
|
|
205
|
+
},
|
|
206
|
+
_focusVisible: {
|
|
207
|
+
bg: 'surface.selected.hovered',
|
|
208
|
+
},
|
|
209
|
+
},
|
|
210
|
+
},
|
|
211
|
+
false: {},
|
|
212
|
+
},
|
|
213
|
+
iconBefore: {
|
|
214
|
+
true: {},
|
|
215
|
+
false: {},
|
|
216
|
+
},
|
|
217
|
+
iconAfter: {
|
|
218
|
+
true: {},
|
|
219
|
+
false: {},
|
|
220
|
+
},
|
|
221
|
+
},
|
|
222
|
+
compoundVariants: [
|
|
223
|
+
{
|
|
224
|
+
density: 'compact',
|
|
225
|
+
iconBefore: true,
|
|
226
|
+
css: {
|
|
227
|
+
wrapper: {
|
|
228
|
+
ps: '5',
|
|
229
|
+
},
|
|
230
|
+
},
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
density: 'compact',
|
|
234
|
+
iconAfter: true,
|
|
235
|
+
css: {
|
|
236
|
+
wrapper: {
|
|
237
|
+
pe: '5',
|
|
238
|
+
},
|
|
239
|
+
},
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
density: 'compact',
|
|
243
|
+
variant: 'checkbox',
|
|
244
|
+
css: {
|
|
245
|
+
wrapper: {
|
|
246
|
+
ps: '5',
|
|
247
|
+
},
|
|
248
|
+
},
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
density: 'comfortable',
|
|
252
|
+
iconBefore: true,
|
|
253
|
+
css: {
|
|
254
|
+
wrapper: {
|
|
255
|
+
ps: '7',
|
|
256
|
+
},
|
|
257
|
+
},
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
density: 'comfortable',
|
|
261
|
+
iconAfter: true,
|
|
262
|
+
css: {
|
|
263
|
+
wrapper: {
|
|
264
|
+
pe: '7',
|
|
265
|
+
},
|
|
266
|
+
},
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
density: 'comfortable',
|
|
270
|
+
variant: 'checkbox',
|
|
271
|
+
css: {
|
|
272
|
+
wrapper: {
|
|
273
|
+
ps: '7',
|
|
274
|
+
},
|
|
275
|
+
},
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
density: 'spacious',
|
|
279
|
+
iconBefore: true,
|
|
280
|
+
css: {
|
|
281
|
+
wrapper: {
|
|
282
|
+
ps: '9',
|
|
283
|
+
},
|
|
284
|
+
},
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
density: 'spacious',
|
|
288
|
+
iconAfter: true,
|
|
289
|
+
css: {
|
|
290
|
+
wrapper: {
|
|
291
|
+
pe: '9',
|
|
292
|
+
},
|
|
293
|
+
},
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
density: 'spacious',
|
|
297
|
+
variant: 'checkbox',
|
|
298
|
+
css: {
|
|
299
|
+
wrapper: {
|
|
300
|
+
ps: '9',
|
|
301
|
+
},
|
|
302
|
+
},
|
|
303
|
+
},
|
|
304
|
+
],
|
|
305
|
+
defaultVariants: {
|
|
306
|
+
variant: 'default',
|
|
307
|
+
density: 'compact',
|
|
308
|
+
selected: false,
|
|
309
|
+
},
|
|
310
|
+
});
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { defineSlotRecipe } from '@pandacss/dev';
|
|
2
|
+
|
|
3
|
+
export const listItemGroupRecipe = defineSlotRecipe({
|
|
4
|
+
className: 'listItemGroup',
|
|
5
|
+
jsx: ['ListItemGroup'],
|
|
6
|
+
slots: ['wrapper', 'groupLabel', 'divider'],
|
|
7
|
+
base: {
|
|
8
|
+
wrapper: {
|
|
9
|
+
width: 'full',
|
|
10
|
+
},
|
|
11
|
+
groupLabel: {
|
|
12
|
+
color: 'text.subtlest',
|
|
13
|
+
borderStyle: 'solid',
|
|
14
|
+
borderWidth: '1',
|
|
15
|
+
borderColor: 'transparent',
|
|
16
|
+
},
|
|
17
|
+
divider: {},
|
|
18
|
+
},
|
|
19
|
+
variants: {
|
|
20
|
+
density: {
|
|
21
|
+
compact: {
|
|
22
|
+
groupLabel: {
|
|
23
|
+
px: '10',
|
|
24
|
+
pt: '8',
|
|
25
|
+
pb: '2',
|
|
26
|
+
fontSize: '12',
|
|
27
|
+
},
|
|
28
|
+
divider: {
|
|
29
|
+
my: '4',
|
|
30
|
+
mx: '10',
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
comfortable: {
|
|
34
|
+
groupLabel: {
|
|
35
|
+
px: '12',
|
|
36
|
+
pt: '12',
|
|
37
|
+
pb: '4',
|
|
38
|
+
fontSize: '14',
|
|
39
|
+
},
|
|
40
|
+
divider: {
|
|
41
|
+
my: '6',
|
|
42
|
+
mx: '12',
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
spacious: {
|
|
46
|
+
groupLabel: {
|
|
47
|
+
px: '16',
|
|
48
|
+
pt: '16',
|
|
49
|
+
pb: '6',
|
|
50
|
+
fontSize: '16',
|
|
51
|
+
},
|
|
52
|
+
divider: {
|
|
53
|
+
my: '8',
|
|
54
|
+
mx: '16',
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
defaultVariants: {
|
|
60
|
+
density: 'compact',
|
|
61
|
+
},
|
|
62
|
+
});
|
package/src/recipes/menu.ts
CHANGED
|
@@ -1,180 +1,112 @@
|
|
|
1
1
|
import { defineSlotRecipe } from '@pandacss/dev';
|
|
2
2
|
|
|
3
3
|
const menuBase = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
boxShadow: 'medium',
|
|
4
|
+
wrapper: {
|
|
5
|
+
width: 'fit',
|
|
6
|
+
bg: 'surface',
|
|
7
|
+
borderRadius: '4',
|
|
8
|
+
boxShadow: 'overlay',
|
|
9
|
+
overflow: 'hidden',
|
|
10
|
+
zIndex: '100',
|
|
11
|
+
transitionProperty: 'width, height',
|
|
12
|
+
transitionDuration: 'normal',
|
|
13
|
+
transitionTimingFunction: 'default',
|
|
15
14
|
outline: 'none',
|
|
16
|
-
zIndex: 1000,
|
|
17
15
|
},
|
|
18
|
-
|
|
19
|
-
// Individual menu item row
|
|
20
|
-
menuItem: {
|
|
16
|
+
backHeader: {
|
|
21
17
|
display: 'flex',
|
|
22
|
-
alignItems: '
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
18
|
+
alignItems: 'center',
|
|
19
|
+
justifyContent: 'start',
|
|
20
|
+
gap: '0',
|
|
21
|
+
ps: '4',
|
|
22
|
+
borderWidth: '0',
|
|
23
|
+
borderBlockWidth: '3',
|
|
24
|
+
borderColor: 'transparent',
|
|
25
|
+
bg: { base: 'tan.5', _dark: 'tan.60' },
|
|
26
|
+
width: 'full',
|
|
27
|
+
textAlign: 'left',
|
|
26
28
|
cursor: 'pointer',
|
|
27
|
-
|
|
28
|
-
transitionProperty: 'background-color, color',
|
|
29
|
-
transitionDuration: 'fast',
|
|
30
|
-
bg: 'surface.overlay',
|
|
31
|
-
|
|
29
|
+
color: 'text',
|
|
32
30
|
_hover: {
|
|
33
|
-
bg: '
|
|
34
|
-
},
|
|
35
|
-
_focusVisible: {
|
|
36
|
-
bg: 'surface.overlay.hovered',
|
|
31
|
+
bg: { base: 'tan.10', _dark: 'tan.50' },
|
|
37
32
|
},
|
|
38
33
|
_active: {
|
|
39
|
-
bg: '
|
|
40
|
-
},
|
|
41
|
-
_disabled: {
|
|
42
|
-
opacity: 0.5,
|
|
43
|
-
cursor: 'not-allowed',
|
|
44
|
-
pointerEvents: 'none',
|
|
45
|
-
},
|
|
46
|
-
_selected: {
|
|
47
|
-
bg: 'bg.selected',
|
|
34
|
+
bg: { base: 'tan.20', _dark: 'tan.70' },
|
|
48
35
|
},
|
|
49
36
|
},
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
alignItems: 'center',
|
|
55
|
-
justifyContent: 'center',
|
|
56
|
-
flexShrink: 0,
|
|
57
|
-
w: '24',
|
|
58
|
-
h: '24',
|
|
59
|
-
color: 'icon.selected',
|
|
37
|
+
levelsViewport: {
|
|
38
|
+
overflow: 'hidden',
|
|
39
|
+
width: 'full',
|
|
40
|
+
position: 'relative',
|
|
60
41
|
},
|
|
61
|
-
|
|
62
|
-
// Left icon area
|
|
63
|
-
menuItemIconLeft: {
|
|
42
|
+
levelsTrack: {
|
|
64
43
|
display: 'flex',
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
color: 'icon.decorative',
|
|
44
|
+
width: 'full',
|
|
45
|
+
transitionProperty: 'transform',
|
|
46
|
+
transitionDuration: 'normal',
|
|
47
|
+
transitionTimingFunction: 'default',
|
|
48
|
+
willChange: 'transform',
|
|
71
49
|
},
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
display: 'flex',
|
|
76
|
-
alignItems: 'center',
|
|
77
|
-
justifyContent: 'center',
|
|
78
|
-
flexShrink: 0,
|
|
79
|
-
w: '24',
|
|
80
|
-
h: '24',
|
|
81
|
-
ml: 'auto',
|
|
82
|
-
color: 'icon.decorative',
|
|
50
|
+
level: {
|
|
51
|
+
minWidth: '0',
|
|
52
|
+
flexShrink: '0',
|
|
83
53
|
},
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
54
|
+
sizeProbe: {
|
|
55
|
+
position: 'absolute',
|
|
56
|
+
pointerEvents: 'none',
|
|
57
|
+
visibility: 'hidden',
|
|
58
|
+
top: '0',
|
|
59
|
+
left: '0',
|
|
60
|
+
width: 'fit-content',
|
|
61
|
+
height: 'fit-content',
|
|
62
|
+
overflow: 'visible',
|
|
91
63
|
},
|
|
92
|
-
|
|
93
|
-
// Primary label
|
|
94
|
-
menuItemLabel: {
|
|
95
|
-
fontSize: '16',
|
|
96
|
-
color: 'text',
|
|
97
|
-
fontFamily: 'sans',
|
|
98
|
-
fontWeight: 'normal',
|
|
99
|
-
|
|
100
|
-
// Highlight match styling for autocomplete
|
|
101
|
-
'& mark': {
|
|
102
|
-
bg: 'bg.warning.hovered',
|
|
103
|
-
color: 'text.bold',
|
|
104
|
-
borderRadius: '2',
|
|
105
|
-
// px: '2',
|
|
106
|
-
},
|
|
107
|
-
},
|
|
108
|
-
|
|
109
|
-
// Secondary description
|
|
110
|
-
menuItemDescription: {
|
|
111
|
-
fontSize: '12',
|
|
112
|
-
fontFamily: 'sans',
|
|
113
|
-
color: 'text.subtlest',
|
|
114
|
-
},
|
|
115
|
-
|
|
116
|
-
// Divider between items/groups
|
|
117
|
-
menuDivider: {
|
|
118
|
-
h: '1',
|
|
119
|
-
mx: '12',
|
|
120
|
-
my: '4',
|
|
121
|
-
bg: 'border',
|
|
122
|
-
},
|
|
123
|
-
|
|
124
|
-
// Group container
|
|
125
|
-
menuGroup: {
|
|
126
|
-
display: 'flex',
|
|
127
|
-
flexDirection: 'column',
|
|
128
|
-
},
|
|
129
|
-
|
|
130
|
-
// Group label
|
|
131
|
-
menuGroupLabel: {
|
|
132
|
-
fontSize: '12',
|
|
133
|
-
color: 'text.subtlest',
|
|
134
|
-
fontFamily: 'sans',
|
|
135
|
-
// fontWeight: 'medium',
|
|
136
|
-
// textTransform: 'uppercase',
|
|
137
|
-
// letterSpacing: 'wide',
|
|
64
|
+
noResults: {
|
|
138
65
|
px: '12',
|
|
139
|
-
|
|
140
|
-
|
|
66
|
+
py: '10',
|
|
67
|
+
color: 'text.subtlest',
|
|
141
68
|
},
|
|
142
69
|
};
|
|
143
70
|
|
|
144
71
|
const menuVariants = {
|
|
145
|
-
|
|
146
|
-
packing: {
|
|
147
|
-
default: {
|
|
148
|
-
menu: { minWidth: '200' },
|
|
149
|
-
menuItem: { py: '8' },
|
|
150
|
-
},
|
|
72
|
+
density: {
|
|
151
73
|
compact: {
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
74
|
+
backHeader: {
|
|
75
|
+
py: '1',
|
|
76
|
+
pe: '18',
|
|
77
|
+
ps: '5',
|
|
78
|
+
textStyle: 'body.md',
|
|
79
|
+
color: 'text',
|
|
80
|
+
},
|
|
157
81
|
},
|
|
158
82
|
comfortable: {
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
indicatorPosition: {
|
|
166
|
-
left: {
|
|
167
|
-
menuItem: {
|
|
168
|
-
flexDirection: 'row',
|
|
83
|
+
backHeader: {
|
|
84
|
+
py: '5',
|
|
85
|
+
pe: '20',
|
|
86
|
+
ps: '7',
|
|
87
|
+
textStyle: 'body.md',
|
|
88
|
+
color: 'text',
|
|
169
89
|
},
|
|
170
90
|
},
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
91
|
+
spacious: {
|
|
92
|
+
backHeader: {
|
|
93
|
+
py: '7',
|
|
94
|
+
pe: '24',
|
|
95
|
+
ps: '9',
|
|
96
|
+
textStyle: 'body.lg',
|
|
97
|
+
color: 'text',
|
|
174
98
|
},
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
panel: {
|
|
102
|
+
true: {
|
|
103
|
+
wrapper: {
|
|
104
|
+
width: 'full',
|
|
105
|
+
height: 'full',
|
|
106
|
+
minHeight: 'full',
|
|
107
|
+
overflowY: 'auto',
|
|
108
|
+
rounded: '0',
|
|
109
|
+
boxShadow: 'none',
|
|
178
110
|
},
|
|
179
111
|
},
|
|
180
112
|
},
|
|
@@ -182,24 +114,19 @@ const menuVariants = {
|
|
|
182
114
|
|
|
183
115
|
export const menuRecipe = defineSlotRecipe({
|
|
184
116
|
className: 'menu',
|
|
185
|
-
jsx: ['Menu', 'MenuItem', '
|
|
117
|
+
jsx: ['Menu', 'MenuItem', 'MenuGroup', 'SubMenu'],
|
|
186
118
|
slots: [
|
|
187
|
-
'
|
|
188
|
-
'
|
|
189
|
-
'
|
|
190
|
-
'
|
|
191
|
-
'
|
|
192
|
-
'
|
|
193
|
-
'
|
|
194
|
-
'menuItemDescription',
|
|
195
|
-
'menuDivider',
|
|
196
|
-
'menuGroup',
|
|
197
|
-
'menuGroupLabel',
|
|
119
|
+
'wrapper',
|
|
120
|
+
'backHeader',
|
|
121
|
+
'levelsViewport',
|
|
122
|
+
'levelsTrack',
|
|
123
|
+
'level',
|
|
124
|
+
'sizeProbe',
|
|
125
|
+
'noResults',
|
|
198
126
|
],
|
|
199
127
|
base: menuBase,
|
|
200
128
|
variants: menuVariants,
|
|
201
129
|
defaultVariants: {
|
|
202
|
-
|
|
203
|
-
indicatorPosition: 'left',
|
|
130
|
+
density: 'compact',
|
|
204
131
|
},
|
|
205
132
|
});
|