@okshaun/components 2.0.2 → 4.0.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/icon-metadata.json +385 -41
- package/dist/index.js +13414 -5259
- package/dist/index.js.map +1 -1
- package/dist/panda.buildinfo.json +1245 -263
- package/dist/{preset-DAmO4B54.js → preset-BOFHjPdQ.js} +2265 -1727
- package/dist/preset-BOFHjPdQ.js.map +1 -0
- package/dist/preset.js +1 -1
- package/dist/specs/conditions.json +75 -51
- package/dist/specs/keyframes.json +33 -0
- package/dist/specs/recipes.json +359 -103
- package/dist/specs/semantic-tokens.json +152 -44
- package/dist/specs/tokens.json +21 -36
- package/dist/sprite.svg +1 -1
- package/dist/sprite.symbol.html +499 -43
- package/dist/styles.css +18229 -7568
- package/dist/svgs/barcode-off.svg +1 -0
- package/dist/svgs/cheese.svg +1 -0
- package/dist/svgs/collapse-vertical.svg +1 -0
- package/dist/svgs/expand-vertical.svg +1 -0
- package/dist/svgs/magnet.svg +1 -0
- package/dist/svgs/spinner.svg +1 -0
- package/dist/svgs/to-date-backward.svg +1 -0
- package/dist/svgs/to-date-forward.svg +1 -0
- package/dist/types/index.d.ts +2804 -296
- package/package.json +4 -2
- package/src/recipes/autocomplete.ts +266 -0
- package/src/recipes/avatar.ts +1 -1
- package/src/recipes/badge.ts +31 -43
- package/src/recipes/breakpointIndicator.ts +11 -0
- package/src/recipes/button.ts +172 -223
- package/src/recipes/calendar.ts +91 -0
- package/src/recipes/card.ts +4 -70
- package/src/recipes/chip.ts +213 -142
- package/src/recipes/dateMenus.ts +40 -0
- package/src/recipes/dateTimeMenus.ts +43 -0
- package/src/recipes/icon.ts +25 -6
- package/src/recipes/kbd.ts +56 -0
- package/src/recipes/list.ts +17 -1
- package/src/recipes/listDensity.ts +66 -0
- package/src/recipes/listItem.ts +29 -161
- package/src/recipes/listItemGroup.ts +17 -39
- package/src/recipes/menu.ts +17 -3
- package/src/recipes/modal.ts +70 -39
- package/src/recipes/radio.ts +6 -6
- package/src/recipes/recipes-regular.ts +2 -0
- package/src/recipes/recipes-slot.ts +8 -2
- package/src/recipes/segmentedFields.ts +192 -0
- package/src/recipes/segmentedInputs.ts +109 -0
- package/src/recipes/select.ts +8 -1
- package/src/recipes/skeleton.ts +72 -0
- package/src/recipes/spinner.ts +27 -24
- package/src/recipes/tag.ts +218 -210
- package/src/recipes/text.ts +37 -19
- package/src/recipes/textInput.ts +106 -117
- package/src/recipes/themeSwitcher.ts +3 -3
- package/src/recipes/timeMenus.ts +110 -0
- package/src/recipes/toggle.ts +3 -1
- package/src/styles/primitives/animations.ts +3 -0
- package/src/styles/primitives/shadows.ts +26 -60
- package/src/styles/primitives/zIndex.ts +1 -0
- package/src/styles/semantics/colors.ts +43 -0
- package/src/styles/semantics/shadows.ts +4 -30
- package/src/styles/semantics/zIndex.ts +2 -0
- package/src/styles/utilities/conditions.ts +61 -51
- package/src/styles/utilities/dropShadows.ts +51 -0
- package/src/styles/utilities/filters.ts +22 -7
- package/src/styles/utilities/globalStyle.ts +5 -2
- package/src/styles/utilities/index.ts +3 -0
- package/src/styles/utilities/keyframes.ts +31 -4
- package/src/styles/utilities/recipeGlobalStyles.ts +22 -0
- package/src/styles/utilities/shadowDefinitions.ts +112 -0
- package/src/utils/dsChain.ts +113 -0
- package/src/utils/dsComponent.ts +44 -0
- package/src/utils/dsPart.ts +41 -0
- package/src/utils/mergeAriaDescribedBy.ts +7 -0
- package/dist/preset-DAmO4B54.js.map +0 -1
- package/src/recipes/datePicker.ts +0 -212
- package/src/recipes/timePicker.ts +0 -199
package/src/recipes/button.ts
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { defineSlotRecipe } from '@pandacss/dev';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
fill: 'icon.decorative',
|
|
5
|
-
mixBlendMode: { base: 'multiply', _dark: 'screen' },
|
|
6
|
-
_groupHover: { fill: 'current' },
|
|
7
|
-
_groupActive: { fill: 'current' },
|
|
8
|
-
};
|
|
3
|
+
import { globalBaseStyles } from '~/styles/utilities';
|
|
9
4
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
_groupActive: { fill: 'icon.decorative.inverse' },
|
|
15
|
-
};
|
|
5
|
+
// Ported from the Cetec design system: slots, the custom-property sizing
|
|
6
|
+
// mechanism, the size variant and the style-variant set. The recipe's
|
|
7
|
+
// before/after variants are internal, computed from Button's props, so the
|
|
8
|
+
// public before, after, iconBefore and iconAfter props are unchanged.
|
|
16
9
|
|
|
17
|
-
const
|
|
10
|
+
const buttonBaseStyles = {
|
|
18
11
|
container: {
|
|
12
|
+
...globalBaseStyles,
|
|
13
|
+
'--main-py': 'token(sizes.3)',
|
|
14
|
+
'--main-px': 'token(sizes.10)',
|
|
15
|
+
'--main-slot-side-padding': 'token(sizes.0)',
|
|
16
|
+
'--main-fs': 'token(sizes.16)',
|
|
17
|
+
'--slot-size': 'token(sizes.20)',
|
|
18
|
+
'--slot-px': 'token(sizes.6)',
|
|
19
19
|
position: 'relative',
|
|
20
20
|
appearance: 'none',
|
|
21
21
|
display: 'flex',
|
|
@@ -24,14 +24,13 @@ const baseButtonStyles = {
|
|
|
24
24
|
minWidth: '0',
|
|
25
25
|
width: 'fit',
|
|
26
26
|
height: 'fit',
|
|
27
|
+
flexShrink: 0,
|
|
27
28
|
transitionDuration: 'fast',
|
|
28
29
|
transitionProperty: 'background, border-color, color, box-shadow',
|
|
29
30
|
transitionTimingFunction: 'default',
|
|
30
31
|
userSelect: 'none',
|
|
31
32
|
verticalAlign: 'middle',
|
|
32
|
-
fontFamily: 'sans',
|
|
33
33
|
fontWeight: 'medium',
|
|
34
|
-
fontSize: '16',
|
|
35
34
|
lineHeight: 'default',
|
|
36
35
|
borderWidth: '1',
|
|
37
36
|
borderStyle: 'solid',
|
|
@@ -40,6 +39,7 @@ const baseButtonStyles = {
|
|
|
40
39
|
outlineWidth: '2',
|
|
41
40
|
outlineStyle: 'solid',
|
|
42
41
|
outlineColor: 'transparent',
|
|
42
|
+
outlineOffset: '1',
|
|
43
43
|
textDecoration: 'none',
|
|
44
44
|
whiteSpace: 'nowrap',
|
|
45
45
|
cursor: 'pointer',
|
|
@@ -55,20 +55,33 @@ const baseButtonStyles = {
|
|
|
55
55
|
outlineColor: 'border.focused',
|
|
56
56
|
},
|
|
57
57
|
},
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
mainContent: {
|
|
59
|
+
display: 'flex',
|
|
60
|
+
alignItems: 'center',
|
|
61
|
+
width: 'fit',
|
|
62
|
+
height: 'fit',
|
|
63
|
+
py: 'var(--main-py)',
|
|
64
|
+
px: 'var(--main-px)',
|
|
65
|
+
fontSize: 'var(--main-fs)',
|
|
66
|
+
},
|
|
67
|
+
slot: {
|
|
68
|
+
display: 'inline-flex',
|
|
69
|
+
alignItems: 'center',
|
|
60
70
|
transitionDuration: 'fast',
|
|
61
|
-
transitionProperty: '
|
|
71
|
+
transitionProperty: 'all',
|
|
62
72
|
transitionTimingFunction: 'default',
|
|
73
|
+
flex: '0 0 var(--slot-size)',
|
|
74
|
+
px: 'var(--slot-px)',
|
|
63
75
|
},
|
|
64
76
|
};
|
|
65
77
|
|
|
78
|
+
// Variants only hold color-related styles
|
|
66
79
|
const buttonVariants = {
|
|
67
80
|
variant: {
|
|
68
|
-
|
|
81
|
+
standard: {
|
|
69
82
|
container: {
|
|
70
83
|
bg: 'bg.neutral',
|
|
71
|
-
|
|
84
|
+
borderColor: 'transparent',
|
|
72
85
|
_hover: {
|
|
73
86
|
bg: 'bg.neutral.hovered',
|
|
74
87
|
},
|
|
@@ -76,78 +89,86 @@ const buttonVariants = {
|
|
|
76
89
|
bg: 'bg.neutral.pressed',
|
|
77
90
|
},
|
|
78
91
|
},
|
|
79
|
-
|
|
92
|
+
mainContent: {
|
|
93
|
+
color: 'text',
|
|
94
|
+
},
|
|
95
|
+
slot: {
|
|
96
|
+
fill: 'icon.decorative',
|
|
97
|
+
mixBlendMode: { base: 'multiply', _dark: 'screen' },
|
|
98
|
+
_groupHover: { fill: 'current' },
|
|
99
|
+
_groupActive: { fill: 'current' },
|
|
100
|
+
},
|
|
80
101
|
},
|
|
81
102
|
primary: {
|
|
82
103
|
container: {
|
|
83
|
-
bg: 'bg.
|
|
84
|
-
|
|
104
|
+
bg: 'bg.neutral.boldest',
|
|
105
|
+
borderColor: 'transparent',
|
|
85
106
|
_hover: {
|
|
86
|
-
bg: 'bg.
|
|
107
|
+
bg: 'bg.neutral.bold.hovered',
|
|
87
108
|
},
|
|
88
109
|
_active: {
|
|
89
|
-
bg: 'bg.
|
|
110
|
+
bg: 'bg.neutral.bold.pressed',
|
|
90
111
|
},
|
|
91
112
|
},
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
113
|
+
mainContent: {
|
|
114
|
+
color: 'text.inverse',
|
|
115
|
+
},
|
|
116
|
+
slot: {
|
|
117
|
+
fill: 'icon.decorative.inverse',
|
|
118
|
+
mixBlendMode: { base: 'screen', _dark: 'multiply' },
|
|
119
|
+
_groupHover: { fill: 'icon.decorative.inverse.hovered' },
|
|
120
|
+
_groupActive: { fill: 'icon.decorative.inverse.hovered' },
|
|
95
121
|
_groupDisabled: {
|
|
96
|
-
fill: 'icon.decorative.inverse
|
|
122
|
+
fill: 'icon.decorative.inverse',
|
|
97
123
|
},
|
|
98
124
|
},
|
|
99
125
|
},
|
|
100
|
-
|
|
126
|
+
hollow: {
|
|
101
127
|
container: {
|
|
102
128
|
bg: 'bg.neutral.subtle',
|
|
103
|
-
|
|
129
|
+
borderColor: 'border',
|
|
104
130
|
_hover: {
|
|
105
131
|
bg: 'bg.neutral.subtle.hovered',
|
|
106
|
-
color: 'text',
|
|
107
132
|
},
|
|
108
133
|
_active: {
|
|
109
134
|
bg: 'bg.neutral.subtle.pressed',
|
|
110
|
-
color: 'text',
|
|
111
135
|
},
|
|
112
136
|
},
|
|
113
|
-
|
|
137
|
+
mainContent: {
|
|
138
|
+
color: 'text',
|
|
139
|
+
},
|
|
140
|
+
slot: {
|
|
141
|
+
fill: 'icon.decorative',
|
|
142
|
+
mixBlendMode: { base: 'multiply', _dark: 'screen' },
|
|
143
|
+
_groupHover: { fill: 'current' },
|
|
144
|
+
_groupActive: { fill: 'current' },
|
|
145
|
+
},
|
|
114
146
|
},
|
|
115
|
-
|
|
147
|
+
ghost: {
|
|
116
148
|
container: {
|
|
117
149
|
bg: 'bg.neutral.subtle',
|
|
118
|
-
|
|
150
|
+
borderColor: 'transparent',
|
|
119
151
|
_hover: {
|
|
120
152
|
bg: 'bg.neutral.subtle.hovered',
|
|
121
|
-
color: 'text',
|
|
122
153
|
},
|
|
123
154
|
_active: {
|
|
124
155
|
bg: 'bg.neutral.subtle.pressed',
|
|
125
|
-
color: 'text',
|
|
126
156
|
},
|
|
127
157
|
},
|
|
128
|
-
|
|
129
|
-
},
|
|
130
|
-
hollow: {
|
|
131
|
-
container: {
|
|
132
|
-
bg: 'bg.neutral.subtle',
|
|
133
|
-
borderColor: 'border',
|
|
158
|
+
mainContent: {
|
|
134
159
|
color: 'text',
|
|
135
|
-
_hover: {
|
|
136
|
-
bg: 'bg.neutral.subtle.hovered',
|
|
137
|
-
},
|
|
138
|
-
_active: {
|
|
139
|
-
bg: 'bg.neutral.subtle.pressed',
|
|
140
|
-
},
|
|
141
|
-
_disabled: {
|
|
142
|
-
borderColor: 'border.disabled',
|
|
143
|
-
},
|
|
144
160
|
},
|
|
145
|
-
|
|
161
|
+
slot: {
|
|
162
|
+
fill: 'icon.decorative',
|
|
163
|
+
mixBlendMode: { base: 'multiply', _dark: 'screen' },
|
|
164
|
+
_groupHover: { fill: 'current' },
|
|
165
|
+
_groupActive: { fill: 'current' },
|
|
166
|
+
},
|
|
146
167
|
},
|
|
147
168
|
danger: {
|
|
148
169
|
container: {
|
|
149
170
|
bg: 'red.50',
|
|
150
|
-
|
|
171
|
+
borderColor: 'transparent',
|
|
151
172
|
_hover: {
|
|
152
173
|
bg: 'red.40',
|
|
153
174
|
},
|
|
@@ -155,8 +176,14 @@ const buttonVariants = {
|
|
|
155
176
|
bg: 'red.60',
|
|
156
177
|
},
|
|
157
178
|
},
|
|
158
|
-
|
|
159
|
-
|
|
179
|
+
mainContent: {
|
|
180
|
+
color: 'neutral.0',
|
|
181
|
+
},
|
|
182
|
+
slot: {
|
|
183
|
+
fill: 'icon.decorative.inverse',
|
|
184
|
+
mixBlendMode: 'screen',
|
|
185
|
+
_groupHover: { fill: 'icon.decorative.inverse.hovered' },
|
|
186
|
+
_groupActive: { fill: 'icon.decorative.inverse.hovered' },
|
|
160
187
|
_groupDisabled: {
|
|
161
188
|
fill: 'icon.decorative.inverse',
|
|
162
189
|
},
|
|
@@ -165,17 +192,20 @@ const buttonVariants = {
|
|
|
165
192
|
selected: {
|
|
166
193
|
container: {
|
|
167
194
|
bg: 'bg.selected',
|
|
168
|
-
|
|
195
|
+
borderColor: 'transparent',
|
|
169
196
|
_hover: {
|
|
170
197
|
bg: 'bg.selected.hovered',
|
|
171
|
-
color: 'text.selected
|
|
198
|
+
color: 'text.selected',
|
|
172
199
|
},
|
|
173
200
|
_active: {
|
|
174
201
|
bg: 'bg.selected.pressed',
|
|
175
202
|
color: 'text.selected',
|
|
176
203
|
},
|
|
177
204
|
},
|
|
178
|
-
|
|
205
|
+
mainContent: {
|
|
206
|
+
color: 'text.selected',
|
|
207
|
+
},
|
|
208
|
+
slot: {
|
|
179
209
|
fill: 'icon.selected',
|
|
180
210
|
mixBlendMode: { base: 'multiply', _dark: 'screen' },
|
|
181
211
|
_groupHover: { fill: 'icon.selected' },
|
|
@@ -188,7 +218,7 @@ const buttonVariants = {
|
|
|
188
218
|
selectedBold: {
|
|
189
219
|
container: {
|
|
190
220
|
bg: 'bg.selected.bold',
|
|
191
|
-
|
|
221
|
+
borderColor: 'transparent',
|
|
192
222
|
_hover: {
|
|
193
223
|
bg: 'bg.selected.bold.hovered',
|
|
194
224
|
},
|
|
@@ -196,164 +226,88 @@ const buttonVariants = {
|
|
|
196
226
|
bg: 'bg.selected.bold.pressed',
|
|
197
227
|
},
|
|
198
228
|
},
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
mixBlendMode: { base: 'screen', _dark: 'multiply' },
|
|
202
|
-
_groupHover: { fill: 'icon.inverse' },
|
|
203
|
-
_groupActive: { fill: 'icon.inverse' },
|
|
204
|
-
_groupDisabled: {
|
|
205
|
-
fill: 'icon.inverse',
|
|
206
|
-
},
|
|
207
|
-
},
|
|
208
|
-
},
|
|
209
|
-
selectedSubtle: {
|
|
210
|
-
container: {
|
|
211
|
-
bg: 'bg.selected',
|
|
212
|
-
color: 'text.selected',
|
|
213
|
-
_hover: {
|
|
214
|
-
bg: 'bg.selected.hovered',
|
|
215
|
-
color: 'text.selected.hovered',
|
|
216
|
-
},
|
|
217
|
-
_active: {
|
|
218
|
-
bg: 'bg.selected.pressed',
|
|
219
|
-
color: 'text.selected',
|
|
220
|
-
},
|
|
229
|
+
mainContent: {
|
|
230
|
+
color: 'text.inverse',
|
|
221
231
|
},
|
|
222
|
-
|
|
223
|
-
fill: 'icon.
|
|
224
|
-
mixBlendMode: { base: '
|
|
225
|
-
_groupHover: { fill: 'icon.
|
|
226
|
-
_groupActive: { fill: 'icon.
|
|
232
|
+
slot: {
|
|
233
|
+
fill: 'icon.decorative.inverse',
|
|
234
|
+
mixBlendMode: { base: 'screen', _dark: 'multiply' },
|
|
235
|
+
_groupHover: { fill: 'icon.decorative.inverse.hovered' },
|
|
236
|
+
_groupActive: { fill: 'icon.decorative.inverse.hovered' },
|
|
227
237
|
_groupDisabled: {
|
|
228
|
-
fill: 'icon.
|
|
238
|
+
fill: 'icon.decorative.inverse',
|
|
229
239
|
},
|
|
230
240
|
},
|
|
231
241
|
},
|
|
232
242
|
},
|
|
233
243
|
};
|
|
234
244
|
|
|
235
|
-
const buttonSizes = {
|
|
236
|
-
sm: {
|
|
237
|
-
container: {
|
|
238
|
-
fontSize: '14',
|
|
239
|
-
py: '1',
|
|
240
|
-
px: '8',
|
|
241
|
-
},
|
|
242
|
-
icon: {
|
|
243
|
-
w: '22',
|
|
244
|
-
h: '22',
|
|
245
|
-
},
|
|
246
|
-
},
|
|
247
|
-
md: {
|
|
248
|
-
container: {
|
|
249
|
-
fontSize: '16',
|
|
250
|
-
py: '3',
|
|
251
|
-
px: '12',
|
|
252
|
-
},
|
|
253
|
-
icon: {
|
|
254
|
-
w: '24',
|
|
255
|
-
h: '24',
|
|
256
|
-
},
|
|
257
|
-
},
|
|
258
|
-
lg: {
|
|
259
|
-
container: {
|
|
260
|
-
fontSize: '16',
|
|
261
|
-
py: '7',
|
|
262
|
-
px: '14',
|
|
263
|
-
},
|
|
264
|
-
icon: {
|
|
265
|
-
w: '24',
|
|
266
|
-
h: '24',
|
|
267
|
-
},
|
|
268
|
-
},
|
|
269
|
-
xl: {
|
|
270
|
-
container: {
|
|
271
|
-
fontSize: '20',
|
|
272
|
-
py: '9',
|
|
273
|
-
px: '16',
|
|
274
|
-
},
|
|
275
|
-
icon: {
|
|
276
|
-
w: '28',
|
|
277
|
-
h: '28',
|
|
278
|
-
},
|
|
279
|
-
},
|
|
280
|
-
};
|
|
281
|
-
|
|
282
245
|
export const buttonRecipe = defineSlotRecipe({
|
|
283
246
|
className: 'button',
|
|
284
247
|
jsx: ['Button'],
|
|
285
|
-
slots: ['container', '
|
|
286
|
-
base:
|
|
248
|
+
slots: ['container', 'mainContent', 'slot'],
|
|
249
|
+
base: buttonBaseStyles,
|
|
287
250
|
variants: {
|
|
288
251
|
...buttonVariants,
|
|
289
|
-
size:
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
size: 'sm',
|
|
300
|
-
iconBefore: true,
|
|
301
|
-
css: {
|
|
302
|
-
container: { ps: '2' },
|
|
303
|
-
},
|
|
304
|
-
},
|
|
305
|
-
{
|
|
306
|
-
size: 'sm',
|
|
307
|
-
iconAfter: true,
|
|
308
|
-
css: {
|
|
309
|
-
container: { pe: '2' },
|
|
310
|
-
},
|
|
311
|
-
},
|
|
312
|
-
{
|
|
313
|
-
size: 'md',
|
|
314
|
-
iconBefore: true,
|
|
315
|
-
css: {
|
|
316
|
-
container: { ps: '3' },
|
|
252
|
+
size: {
|
|
253
|
+
sm: {
|
|
254
|
+
container: {
|
|
255
|
+
'--main-py': 'token(sizes.0)',
|
|
256
|
+
'--main-px': 'token(sizes.8)',
|
|
257
|
+
'--main-slot-side-padding': 'token(sizes.0)',
|
|
258
|
+
'--main-fs': 'token(sizes.14)',
|
|
259
|
+
'--slot-size': 'token(sizes.16)',
|
|
260
|
+
'--slot-px': 'token(sizes.4)',
|
|
261
|
+
},
|
|
317
262
|
},
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
263
|
+
md: {
|
|
264
|
+
container: {
|
|
265
|
+
'--main-py': 'token(sizes.3)',
|
|
266
|
+
'--main-px': 'token(sizes.10)',
|
|
267
|
+
'--main-slot-side-padding': 'token(sizes.0)',
|
|
268
|
+
'--main-fs': 'token(sizes.16)',
|
|
269
|
+
'--slot-size': 'token(sizes.20)',
|
|
270
|
+
'--slot-px': 'token(sizes.6)',
|
|
271
|
+
},
|
|
324
272
|
},
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
273
|
+
lg: {
|
|
274
|
+
container: {
|
|
275
|
+
'--main-py': 'token(sizes.7)',
|
|
276
|
+
'--main-px': 'token(sizes.12)',
|
|
277
|
+
'--main-slot-side-padding': 'token(sizes.0)',
|
|
278
|
+
'--main-fs': 'token(sizes.16)',
|
|
279
|
+
'--slot-size': 'token(sizes.24)',
|
|
280
|
+
'--slot-px': 'token(sizes.8)',
|
|
281
|
+
},
|
|
331
282
|
},
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
283
|
+
xl: {
|
|
284
|
+
container: {
|
|
285
|
+
'--main-py': 'token(sizes.9)',
|
|
286
|
+
'--main-px': 'token(sizes.16)',
|
|
287
|
+
'--main-slot-side-padding': 'token(sizes.0)',
|
|
288
|
+
'--main-fs': 'token(sizes.20)',
|
|
289
|
+
'--slot-size': 'token(sizes.28)',
|
|
290
|
+
'--slot-px': 'token(sizes.10)',
|
|
291
|
+
},
|
|
338
292
|
},
|
|
339
293
|
},
|
|
340
|
-
{
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
294
|
+
before: {
|
|
295
|
+
true: {
|
|
296
|
+
mainContent: {
|
|
297
|
+
ps: '0',
|
|
298
|
+
},
|
|
345
299
|
},
|
|
346
300
|
},
|
|
347
|
-
{
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
301
|
+
after: {
|
|
302
|
+
true: {
|
|
303
|
+
mainContent: {
|
|
304
|
+
pe: '0',
|
|
305
|
+
},
|
|
352
306
|
},
|
|
353
307
|
},
|
|
354
|
-
|
|
308
|
+
},
|
|
355
309
|
defaultVariants: {
|
|
356
|
-
variant: '
|
|
310
|
+
variant: 'standard',
|
|
357
311
|
size: 'md',
|
|
358
312
|
},
|
|
359
313
|
});
|
|
@@ -361,55 +315,50 @@ export const buttonRecipe = defineSlotRecipe({
|
|
|
361
315
|
export const iconButtonRecipe = defineSlotRecipe({
|
|
362
316
|
className: 'iconButton',
|
|
363
317
|
jsx: ['IconButton'],
|
|
364
|
-
slots: ['container', '
|
|
365
|
-
base:
|
|
318
|
+
slots: ['container', 'mainContent', 'slot'],
|
|
319
|
+
base: {
|
|
320
|
+
...buttonBaseStyles,
|
|
321
|
+
mainContent: {
|
|
322
|
+
w: 'calc(var(--slot-size) + (var(--slot-px) * 2))',
|
|
323
|
+
h: 'calc(var(--slot-size) + (var(--slot-px) * 2))',
|
|
324
|
+
p: 'var(--slot-px)',
|
|
325
|
+
},
|
|
326
|
+
slot: {
|
|
327
|
+
w: 'var(--slot-size)',
|
|
328
|
+
h: 'var(--slot-size)',
|
|
329
|
+
},
|
|
330
|
+
},
|
|
366
331
|
variants: {
|
|
367
332
|
...buttonVariants,
|
|
368
333
|
size: {
|
|
369
334
|
sm: {
|
|
370
335
|
container: {
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
},
|
|
374
|
-
icon: {
|
|
375
|
-
w: '22',
|
|
376
|
-
h: '22',
|
|
336
|
+
'--slot-size': 'token(sizes.16)',
|
|
337
|
+
'--slot-px': 'token(sizes.3)',
|
|
377
338
|
},
|
|
378
339
|
},
|
|
379
340
|
md: {
|
|
380
341
|
container: {
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
},
|
|
384
|
-
icon: {
|
|
385
|
-
w: '24',
|
|
386
|
-
h: '24',
|
|
342
|
+
'--slot-size': 'token(sizes.20)',
|
|
343
|
+
'--slot-px': 'token(sizes.5)',
|
|
387
344
|
},
|
|
388
345
|
},
|
|
389
346
|
lg: {
|
|
390
347
|
container: {
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
},
|
|
394
|
-
icon: {
|
|
395
|
-
w: '24',
|
|
396
|
-
h: '24',
|
|
348
|
+
'--slot-size': 'token(sizes.24)',
|
|
349
|
+
'--slot-px': 'token(sizes.7)',
|
|
397
350
|
},
|
|
398
351
|
},
|
|
399
352
|
xl: {
|
|
400
353
|
container: {
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
},
|
|
404
|
-
icon: {
|
|
405
|
-
w: '28',
|
|
406
|
-
h: '28',
|
|
354
|
+
'--slot-size': 'token(sizes.28)',
|
|
355
|
+
'--slot-px': 'token(sizes.9)',
|
|
407
356
|
},
|
|
408
357
|
},
|
|
409
358
|
},
|
|
410
359
|
},
|
|
411
360
|
defaultVariants: {
|
|
412
|
-
variant: '
|
|
361
|
+
variant: 'standard',
|
|
413
362
|
size: 'md',
|
|
414
363
|
},
|
|
415
364
|
});
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { defineSlotRecipe } from '@pandacss/dev';
|
|
2
|
+
|
|
3
|
+
import { globalBaseStyles } from '~/styles/utilities';
|
|
4
|
+
|
|
5
|
+
export const calendarRecipe = defineSlotRecipe({
|
|
6
|
+
className: 'calendar',
|
|
7
|
+
jsx: ['Calendar'],
|
|
8
|
+
slots: ['root', 'header', 'grid', 'weekdayLabel', 'day', 'monthYearGrid'],
|
|
9
|
+
base: {
|
|
10
|
+
root: {
|
|
11
|
+
...globalBaseStyles,
|
|
12
|
+
display: 'flex',
|
|
13
|
+
flexDirection: 'column',
|
|
14
|
+
alignItems: 'flex-start',
|
|
15
|
+
bg: 'surface',
|
|
16
|
+
width: '278',
|
|
17
|
+
},
|
|
18
|
+
header: {
|
|
19
|
+
display: 'flex',
|
|
20
|
+
alignItems: 'center',
|
|
21
|
+
justifyContent: 'space-between',
|
|
22
|
+
gap: '4',
|
|
23
|
+
width: 'full',
|
|
24
|
+
p: '8',
|
|
25
|
+
borderBottom: 'default',
|
|
26
|
+
fontFamily: 'mono',
|
|
27
|
+
},
|
|
28
|
+
grid: {
|
|
29
|
+
display: 'grid',
|
|
30
|
+
gridTemplateColumns: 'repeat(7, minmax(0, 1fr))',
|
|
31
|
+
gap: '4',
|
|
32
|
+
width: 'fit',
|
|
33
|
+
p: '8',
|
|
34
|
+
mx: 'auto',
|
|
35
|
+
},
|
|
36
|
+
weekdayLabel: {
|
|
37
|
+
display: 'flex',
|
|
38
|
+
alignItems: 'center',
|
|
39
|
+
justifyContent: 'center',
|
|
40
|
+
userSelect: 'none',
|
|
41
|
+
},
|
|
42
|
+
day: {
|
|
43
|
+
position: 'relative',
|
|
44
|
+
alignItems: 'center',
|
|
45
|
+
justifyContent: 'center',
|
|
46
|
+
fontFamily: 'mono',
|
|
47
|
+
width: '32',
|
|
48
|
+
height: '32',
|
|
49
|
+
minWidth: '32',
|
|
50
|
+
_today: {
|
|
51
|
+
outline: '1px solid {colors.border.focused}',
|
|
52
|
+
outlineOffset: '1',
|
|
53
|
+
},
|
|
54
|
+
_unavailable: {
|
|
55
|
+
color: 'text.disabled',
|
|
56
|
+
cursor: 'not-allowed',
|
|
57
|
+
pointerEvents: 'none',
|
|
58
|
+
_hover: {
|
|
59
|
+
bg: 'transparent',
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
monthYearGrid: {
|
|
64
|
+
display: 'grid',
|
|
65
|
+
gridTemplateColumns: 'repeat(3, minmax(0, 1fr))',
|
|
66
|
+
gap: '4',
|
|
67
|
+
width: 'full',
|
|
68
|
+
p: '8',
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
variants: {
|
|
72
|
+
type: {
|
|
73
|
+
days: {},
|
|
74
|
+
months: {
|
|
75
|
+
day: {
|
|
76
|
+
width: 'auto',
|
|
77
|
+
px: '8',
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
years: {
|
|
81
|
+
day: {
|
|
82
|
+
width: 'auto',
|
|
83
|
+
px: '8',
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
defaultVariants: {
|
|
89
|
+
type: 'days',
|
|
90
|
+
},
|
|
91
|
+
});
|