@okshaun/components 0.5.8 → 1.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/README.md +22 -26
- package/dist/.mcp.json +11 -0
- package/dist/index.d.ts +3 -1268
- package/dist/index.js +1231 -957
- package/dist/index.js.map +1 -1
- package/dist/okshaun-logo-white.svg +11 -0
- package/dist/okshaun-logo.svg +11 -0
- package/dist/preset-BzrKiUEH.js +8452 -0
- package/dist/preset-BzrKiUEH.js.map +1 -0
- package/dist/preset.js +3 -7234
- package/dist/preset.js.map +1 -1
- package/dist/specs/animation-styles.json +4 -0
- package/dist/specs/color-palette.json +98 -0
- package/dist/specs/conditions.json +1901 -0
- package/dist/specs/keyframes.json +137 -0
- package/dist/specs/layer-styles.json +23 -0
- package/dist/specs/patterns.json +475 -0
- package/dist/specs/recipes.json +907 -0
- package/dist/specs/semantic-tokens.json +2837 -0
- package/dist/specs/text-styles.json +149 -0
- package/dist/specs/tokens.json +2750 -0
- package/dist/sprite.svg +1 -1
- package/dist/sprite.symbol.html +14 -14
- package/dist/styles/global.css +148 -0
- package/dist/styles/recipes/avatar.css +185 -0
- package/dist/styles/recipes/badge.css +85 -0
- package/dist/styles/recipes/breadcrumbs.css +38 -0
- package/dist/styles/recipes/button.css +195 -0
- package/dist/styles/recipes/card.css +57 -0
- package/dist/styles/recipes/checkbox-input.css +12 -0
- package/dist/styles/recipes/checkbox.css +90 -0
- package/dist/styles/recipes/chip.css +137 -0
- package/dist/styles/recipes/code.css +12 -0
- package/dist/styles/recipes/divider.css +43 -0
- package/dist/styles/recipes/form-field.css +39 -0
- package/dist/styles/recipes/heading.css +40 -0
- package/dist/styles/recipes/icon-button.css +181 -0
- package/dist/styles/recipes/label.css +14 -0
- package/dist/styles/recipes/link.css +49 -0
- package/dist/styles/recipes/menu.css +141 -0
- package/dist/styles/recipes/modal.css +99 -0
- package/dist/styles/recipes/pre.css +16 -0
- package/dist/styles/recipes/radio-input.css +7 -0
- package/dist/styles/recipes/radio.css +82 -0
- package/dist/styles/recipes/select.css +103 -0
- package/dist/styles/recipes/spinner.css +36 -0
- package/dist/styles/recipes/tag.css +27 -0
- package/dist/styles/recipes/text.css +46 -0
- package/dist/styles/recipes/textarea.css +91 -0
- package/dist/styles/recipes/textinput.css +87 -0
- package/dist/styles/recipes/theme-switcher.css +53 -0
- package/dist/styles/recipes/toggle-input.css +12 -0
- package/dist/styles/recipes/toggle.css +125 -0
- package/dist/styles/recipes/tooltip.css +133 -0
- package/dist/styles/recipes.css +30 -0
- package/dist/styles/reset.css +1 -0
- package/dist/styles/tokens.css +1016 -0
- package/dist/styles/utilities.css +1694 -0
- package/dist/styles.css +7 -0
- package/dist/svgs/building.svg +1 -0
- package/dist/types/index.d.ts +21626 -0
- package/dist/types/preset.d.ts +19 -0
- package/package.json +37 -35
- package/src/recipes/avatar.ts +205 -0
- package/src/recipes/badge.ts +203 -0
- package/src/recipes/box.ts +13 -0
- package/src/recipes/breadcrumbs.ts +29 -0
- package/src/recipes/button.ts +319 -0
- package/src/recipes/card.ts +148 -0
- package/src/recipes/checkbox.ts +87 -0
- package/src/recipes/checkboxinput.ts +15 -0
- package/src/recipes/chip.ts +189 -0
- package/src/recipes/code.ts +35 -0
- package/src/recipes/divider.ts +41 -0
- package/src/recipes/formField.ts +60 -0
- package/src/recipes/index.ts +28 -0
- package/src/recipes/menu.ts +205 -0
- package/src/recipes/modal.ts +120 -0
- package/src/recipes/radio.ts +71 -0
- package/src/recipes/radioinput.ts +12 -0
- package/src/recipes/select.ts +142 -0
- package/src/recipes/spinner.ts +52 -0
- package/src/recipes/tag.ts +262 -0
- package/src/recipes/text.ts +193 -0
- package/src/recipes/textarea.ts +153 -0
- package/src/recipes/textinput.ts +100 -0
- package/src/recipes/themeSwitcher.ts +48 -0
- package/src/recipes/toggle.ts +116 -0
- package/src/recipes/toggleinput.ts +16 -0
- package/src/recipes/tooltip.ts +359 -0
- package/src/styles/index.css +1 -0
- package/src/styles/primitives/animations.ts +16 -0
- package/src/styles/primitives/aspectRatios.ts +22 -0
- package/src/styles/primitives/blurs.ts +25 -0
- package/src/styles/primitives/borderWidths.ts +10 -0
- package/src/styles/primitives/borders.ts +36 -0
- package/src/styles/primitives/colors.ts +228 -0
- package/src/styles/primitives/durations.ts +25 -0
- package/src/styles/primitives/easings.ts +19 -0
- package/src/styles/primitives/fontSizes.ts +16 -0
- package/src/styles/primitives/fontWeights.ts +9 -0
- package/src/styles/primitives/fonts.ts +18 -0
- package/src/styles/primitives/index.ts +46 -0
- package/src/styles/primitives/letterSpacings.ts +22 -0
- package/src/styles/primitives/lineHeights.ts +16 -0
- package/src/styles/primitives/radii.ts +14 -0
- package/src/styles/primitives/shadows.ts +73 -0
- package/src/styles/primitives/sizes.ts +86 -0
- package/src/styles/primitives/spacings.ts +7 -0
- package/src/styles/semantics/colors.ts +774 -0
- package/src/styles/semantics/index.ts +2 -0
- package/src/styles/semantics/shadows.ts +32 -0
- package/src/styles/utilities/breakpoints.ts +8 -0
- package/src/styles/utilities/conditions.ts +140 -0
- package/src/styles/utilities/containerSizes.ts +17 -0
- package/src/styles/utilities/filters.ts +12 -0
- package/src/styles/utilities/globalStyle.ts +93 -0
- package/src/styles/utilities/index.ts +9 -0
- package/src/styles/utilities/keyframes.ts +89 -0
- package/src/styles/utilities/layerStyles.ts +18 -0
- package/src/styles/utilities/textStyles.ts +135 -0
- package/src/styles/utilities/transitions.ts +92 -0
- package/src/utils/injectSprite.ts +36 -0
- package/src/utils/splitProps.ts +19 -0
- package/src/utils/spriteContent.ts +4 -0
- package/dist/panda.buildinfo.json +0 -448
- package/dist/preset.d.ts +0 -5
- package/dist/transitions-DUgH88VW.js +0 -1041
- package/dist/transitions-DUgH88VW.js.map +0 -1
|
@@ -0,0 +1,319 @@
|
|
|
1
|
+
import { defineSlotRecipe } from '@pandacss/dev';
|
|
2
|
+
|
|
3
|
+
const baseButtonStyles = {
|
|
4
|
+
container: {
|
|
5
|
+
position: 'relative',
|
|
6
|
+
appearance: 'none',
|
|
7
|
+
display: 'flex',
|
|
8
|
+
alignItems: 'center',
|
|
9
|
+
gap: 4,
|
|
10
|
+
minWidth: 0,
|
|
11
|
+
width: 'fit',
|
|
12
|
+
height: 'fit',
|
|
13
|
+
transitionDuration: 'fast',
|
|
14
|
+
transitionProperty: 'background, border-color, color, box-shadow',
|
|
15
|
+
transitionTimingFunction: 'default',
|
|
16
|
+
userSelect: 'none',
|
|
17
|
+
verticalAlign: 'middle',
|
|
18
|
+
fontFamily: 'sans',
|
|
19
|
+
fontWeight: 'medium',
|
|
20
|
+
fontSize: 16,
|
|
21
|
+
lineHeight: 'default',
|
|
22
|
+
borderWidth: 1,
|
|
23
|
+
borderStyle: 'solid',
|
|
24
|
+
borderColor: 'transparent',
|
|
25
|
+
borderRadius: 4,
|
|
26
|
+
outlineWidth: 2,
|
|
27
|
+
outlineStyle: 'solid',
|
|
28
|
+
outlineColor: 'transparent',
|
|
29
|
+
textDecoration: 'none',
|
|
30
|
+
whiteSpace: 'nowrap',
|
|
31
|
+
cursor: 'pointer',
|
|
32
|
+
_focusVisible: {
|
|
33
|
+
outlineColor: 'border.focused',
|
|
34
|
+
},
|
|
35
|
+
_disabled: {
|
|
36
|
+
cursor: 'not-allowed',
|
|
37
|
+
bg: 'bg.disabled',
|
|
38
|
+
color: 'text.disabled',
|
|
39
|
+
borderColor: 'border.disabled',
|
|
40
|
+
icon: { fill: 'icon.disabled' },
|
|
41
|
+
_hover: {
|
|
42
|
+
bg: 'bg.disabled',
|
|
43
|
+
color: 'text.disabled',
|
|
44
|
+
borderColor: 'border.disabled',
|
|
45
|
+
icon: { fill: 'icon.disabled' },
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
_selected: {
|
|
49
|
+
bg: 'bg.selected',
|
|
50
|
+
color: 'text.selected',
|
|
51
|
+
borderColor: 'transparent',
|
|
52
|
+
icon: { fill: 'icon.selected' },
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
icon: {
|
|
56
|
+
aspectRatio: 'square',
|
|
57
|
+
transitionDuration: 'fast',
|
|
58
|
+
transitionProperty: 'fill',
|
|
59
|
+
transitionTimingFunction: 'default',
|
|
60
|
+
},
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
const buttonVariants = {
|
|
64
|
+
variant: {
|
|
65
|
+
default: {
|
|
66
|
+
container: {
|
|
67
|
+
bg: 'bg.neutral',
|
|
68
|
+
color: 'text',
|
|
69
|
+
icon: { fill: 'icon.decorative' },
|
|
70
|
+
_hover: {
|
|
71
|
+
bg: 'bg.neutral.hovered',
|
|
72
|
+
icon: { fill: 'icon.decorative.hovered' },
|
|
73
|
+
},
|
|
74
|
+
_active: {
|
|
75
|
+
bg: 'bg.neutral.pressed',
|
|
76
|
+
icon: { fill: 'icon.decorative.hovered' },
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
primary: {
|
|
81
|
+
container: {
|
|
82
|
+
bg: 'bg.brand.boldest',
|
|
83
|
+
color: 'text.inverse',
|
|
84
|
+
icon: { fill: 'icon.decorative.inverse' },
|
|
85
|
+
_hover: {
|
|
86
|
+
bg: 'bg.brand.boldest.hovered',
|
|
87
|
+
icon: { fill: 'icon.inverse' },
|
|
88
|
+
},
|
|
89
|
+
_active: {
|
|
90
|
+
bg: 'bg.brand.boldest.pressed',
|
|
91
|
+
icon: { fill: 'icon.inverse' },
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
subtle: {
|
|
96
|
+
container: {
|
|
97
|
+
bg: 'bg.neutral.subtle',
|
|
98
|
+
color: 'text.subtle',
|
|
99
|
+
icon: { fill: 'icon.decorative' },
|
|
100
|
+
_hover: {
|
|
101
|
+
bg: 'bg.neutral.subtle.hovered',
|
|
102
|
+
color: 'text',
|
|
103
|
+
icon: { fill: 'icon.decorative.hovered' },
|
|
104
|
+
},
|
|
105
|
+
_active: {
|
|
106
|
+
bg: 'bg.neutral.subtle.pressed',
|
|
107
|
+
color: 'text',
|
|
108
|
+
icon: { fill: 'icon.decorative.hovered' },
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
hollow: {
|
|
113
|
+
container: {
|
|
114
|
+
bg: 'bg.neutral.subtle',
|
|
115
|
+
color: 'text.subtle',
|
|
116
|
+
borderColor: 'border',
|
|
117
|
+
icon: { fill: 'icon.decorative' },
|
|
118
|
+
_hover: {
|
|
119
|
+
bg: 'bg.neutral.subtle.hovered',
|
|
120
|
+
color: 'text',
|
|
121
|
+
borderColor: 'border',
|
|
122
|
+
icon: { fill: 'icon.decorative.hovered' },
|
|
123
|
+
},
|
|
124
|
+
_active: {
|
|
125
|
+
bg: 'bg.neutral.subtle.pressed',
|
|
126
|
+
color: 'text',
|
|
127
|
+
borderColor: 'border',
|
|
128
|
+
icon: { fill: 'icon.decorative.hovered' },
|
|
129
|
+
},
|
|
130
|
+
_disabled: {
|
|
131
|
+
borderColor: 'border.disabled',
|
|
132
|
+
_hover: {
|
|
133
|
+
borderColor: 'border.disabled',
|
|
134
|
+
},
|
|
135
|
+
},
|
|
136
|
+
},
|
|
137
|
+
},
|
|
138
|
+
},
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
export const buttonRecipe = defineSlotRecipe({
|
|
142
|
+
className: 'button',
|
|
143
|
+
jsx: ['Button'],
|
|
144
|
+
slots: ['container', 'icon'],
|
|
145
|
+
base: baseButtonStyles,
|
|
146
|
+
variants: {
|
|
147
|
+
...buttonVariants,
|
|
148
|
+
size: {
|
|
149
|
+
md: {
|
|
150
|
+
container: {
|
|
151
|
+
fontSize: '16',
|
|
152
|
+
py: '3',
|
|
153
|
+
px: '12',
|
|
154
|
+
},
|
|
155
|
+
icon: {
|
|
156
|
+
w: '24',
|
|
157
|
+
h: '24',
|
|
158
|
+
},
|
|
159
|
+
},
|
|
160
|
+
xl: {
|
|
161
|
+
container: {
|
|
162
|
+
fontSize: '20',
|
|
163
|
+
py: '9',
|
|
164
|
+
px: '16',
|
|
165
|
+
},
|
|
166
|
+
icon: {
|
|
167
|
+
w: '28',
|
|
168
|
+
h: '28',
|
|
169
|
+
},
|
|
170
|
+
},
|
|
171
|
+
lg: {
|
|
172
|
+
container: {
|
|
173
|
+
fontSize: '16',
|
|
174
|
+
py: '7',
|
|
175
|
+
px: '14',
|
|
176
|
+
},
|
|
177
|
+
icon: {
|
|
178
|
+
w: '24',
|
|
179
|
+
h: '24',
|
|
180
|
+
},
|
|
181
|
+
},
|
|
182
|
+
sm: {
|
|
183
|
+
container: {
|
|
184
|
+
fontSize: '14',
|
|
185
|
+
py: '1',
|
|
186
|
+
px: '8',
|
|
187
|
+
},
|
|
188
|
+
icon: {
|
|
189
|
+
w: '22',
|
|
190
|
+
h: '22',
|
|
191
|
+
},
|
|
192
|
+
},
|
|
193
|
+
},
|
|
194
|
+
iconBefore: {
|
|
195
|
+
true: { container: {} },
|
|
196
|
+
},
|
|
197
|
+
iconAfter: {
|
|
198
|
+
true: { container: {} },
|
|
199
|
+
},
|
|
200
|
+
},
|
|
201
|
+
compoundVariants: [
|
|
202
|
+
{
|
|
203
|
+
size: 'md',
|
|
204
|
+
iconBefore: true,
|
|
205
|
+
css: {
|
|
206
|
+
container: { ps: '3' },
|
|
207
|
+
},
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
size: 'md',
|
|
211
|
+
iconAfter: true,
|
|
212
|
+
css: {
|
|
213
|
+
container: { pe: '3' },
|
|
214
|
+
},
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
size: 'sm',
|
|
218
|
+
iconBefore: true,
|
|
219
|
+
css: {
|
|
220
|
+
container: { ps: '2' },
|
|
221
|
+
},
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
size: 'sm',
|
|
225
|
+
iconAfter: true,
|
|
226
|
+
css: {
|
|
227
|
+
container: { pe: '2' },
|
|
228
|
+
},
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
size: 'lg',
|
|
232
|
+
iconBefore: true,
|
|
233
|
+
css: {
|
|
234
|
+
container: { ps: '5' },
|
|
235
|
+
},
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
size: 'lg',
|
|
239
|
+
iconAfter: true,
|
|
240
|
+
css: {
|
|
241
|
+
container: { pe: '5' },
|
|
242
|
+
},
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
size: 'xl',
|
|
246
|
+
iconBefore: true,
|
|
247
|
+
css: {
|
|
248
|
+
container: { ps: '7' },
|
|
249
|
+
},
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
size: 'xl',
|
|
253
|
+
iconAfter: true,
|
|
254
|
+
css: {
|
|
255
|
+
container: { pe: '7' },
|
|
256
|
+
},
|
|
257
|
+
},
|
|
258
|
+
],
|
|
259
|
+
defaultVariants: {
|
|
260
|
+
variant: 'default',
|
|
261
|
+
size: 'md',
|
|
262
|
+
},
|
|
263
|
+
});
|
|
264
|
+
|
|
265
|
+
export const iconButtonRecipe = defineSlotRecipe({
|
|
266
|
+
className: 'iconButton',
|
|
267
|
+
jsx: ['IconButton'],
|
|
268
|
+
slots: ['container', 'icon'],
|
|
269
|
+
base: baseButtonStyles,
|
|
270
|
+
variants: {
|
|
271
|
+
...buttonVariants,
|
|
272
|
+
size: {
|
|
273
|
+
md: {
|
|
274
|
+
container: {
|
|
275
|
+
fontSize: '16',
|
|
276
|
+
p: '3',
|
|
277
|
+
},
|
|
278
|
+
icon: {
|
|
279
|
+
w: '24',
|
|
280
|
+
h: '24',
|
|
281
|
+
},
|
|
282
|
+
},
|
|
283
|
+
sm: {
|
|
284
|
+
container: {
|
|
285
|
+
fontSize: '14',
|
|
286
|
+
p: '1',
|
|
287
|
+
},
|
|
288
|
+
icon: {
|
|
289
|
+
w: '22',
|
|
290
|
+
h: '22',
|
|
291
|
+
},
|
|
292
|
+
},
|
|
293
|
+
lg: {
|
|
294
|
+
container: {
|
|
295
|
+
fontSize: '16',
|
|
296
|
+
p: '7',
|
|
297
|
+
},
|
|
298
|
+
icon: {
|
|
299
|
+
w: '24',
|
|
300
|
+
h: '24',
|
|
301
|
+
},
|
|
302
|
+
},
|
|
303
|
+
xl: {
|
|
304
|
+
container: {
|
|
305
|
+
fontSize: '20',
|
|
306
|
+
p: '9',
|
|
307
|
+
},
|
|
308
|
+
icon: {
|
|
309
|
+
w: '28',
|
|
310
|
+
h: '28',
|
|
311
|
+
},
|
|
312
|
+
},
|
|
313
|
+
},
|
|
314
|
+
},
|
|
315
|
+
defaultVariants: {
|
|
316
|
+
variant: 'default',
|
|
317
|
+
size: 'md',
|
|
318
|
+
},
|
|
319
|
+
});
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { defineRecipe } from '@pandacss/dev';
|
|
2
|
+
|
|
3
|
+
const interactiveHoverStyles = {
|
|
4
|
+
cursor: 'pointer',
|
|
5
|
+
transition: 'all',
|
|
6
|
+
_hover: {
|
|
7
|
+
bg: 'surface',
|
|
8
|
+
boxShadow: 'elevated',
|
|
9
|
+
},
|
|
10
|
+
_focusVisible: {
|
|
11
|
+
bg: 'surface',
|
|
12
|
+
boxShadow: 'elevated',
|
|
13
|
+
borderWidth: '1',
|
|
14
|
+
outlineColor: 'border.focused',
|
|
15
|
+
borderColor: 'border.focused',
|
|
16
|
+
},
|
|
17
|
+
_disabled: {
|
|
18
|
+
opacity: '0.4',
|
|
19
|
+
cursor: 'not-allowed',
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export const cardRecipe = defineRecipe({
|
|
24
|
+
className: 'card',
|
|
25
|
+
jsx: ['Card'],
|
|
26
|
+
base: {
|
|
27
|
+
display: 'block',
|
|
28
|
+
textAlign: 'left',
|
|
29
|
+
bg: 'surface',
|
|
30
|
+
borderRadius: '8',
|
|
31
|
+
outlineWidth: '1',
|
|
32
|
+
outlineStyle: 'solid',
|
|
33
|
+
outlineColor: 'transparent',
|
|
34
|
+
outlineOffset: '0',
|
|
35
|
+
},
|
|
36
|
+
variants: {
|
|
37
|
+
variant: {
|
|
38
|
+
default: {
|
|
39
|
+
bg: 'surface.raised',
|
|
40
|
+
boxShadow: 'raised',
|
|
41
|
+
borderWidth: '1',
|
|
42
|
+
borderColor: 'transparent',
|
|
43
|
+
},
|
|
44
|
+
flat: {
|
|
45
|
+
borderWidth: '1',
|
|
46
|
+
borderStyle: 'solid',
|
|
47
|
+
borderColor: 'border',
|
|
48
|
+
boxShadow: 'zero',
|
|
49
|
+
},
|
|
50
|
+
sunken: {
|
|
51
|
+
bg: 'surface.sunken',
|
|
52
|
+
borderWidth: '1',
|
|
53
|
+
borderStyle: 'solid',
|
|
54
|
+
borderColor: 'transparent',
|
|
55
|
+
},
|
|
56
|
+
ghost: {
|
|
57
|
+
bg: 'transparent',
|
|
58
|
+
borderWidth: '1',
|
|
59
|
+
borderStyle: 'solid',
|
|
60
|
+
borderColor: 'transparent',
|
|
61
|
+
},
|
|
62
|
+
overlay: {
|
|
63
|
+
bg: 'surface.overlay',
|
|
64
|
+
boxShadow: 'overlay',
|
|
65
|
+
borderWidth: '1',
|
|
66
|
+
borderColor: 'transparent',
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
interactive: {
|
|
70
|
+
true: {
|
|
71
|
+
cursor: 'pointer',
|
|
72
|
+
},
|
|
73
|
+
false: {
|
|
74
|
+
cursor: 'default',
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
compoundVariants: [
|
|
79
|
+
// Default + interactive
|
|
80
|
+
{
|
|
81
|
+
variant: 'default',
|
|
82
|
+
interactive: true,
|
|
83
|
+
css: {
|
|
84
|
+
...interactiveHoverStyles,
|
|
85
|
+
_disabled: {
|
|
86
|
+
_hover: {
|
|
87
|
+
boxShadow: 'raised',
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
// Flat + interactive
|
|
93
|
+
{
|
|
94
|
+
variant: 'flat',
|
|
95
|
+
interactive: true,
|
|
96
|
+
css: {
|
|
97
|
+
...interactiveHoverStyles,
|
|
98
|
+
_disabled: {
|
|
99
|
+
_hover: {
|
|
100
|
+
boxShadow: 'none',
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
// Sunken + interactive
|
|
106
|
+
{
|
|
107
|
+
variant: 'sunken',
|
|
108
|
+
interactive: true,
|
|
109
|
+
css: {
|
|
110
|
+
...interactiveHoverStyles,
|
|
111
|
+
_disabled: {
|
|
112
|
+
_hover: {
|
|
113
|
+
boxShadow: 'none',
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
// Ghost + interactive
|
|
119
|
+
{
|
|
120
|
+
variant: 'ghost',
|
|
121
|
+
interactive: true,
|
|
122
|
+
css: {
|
|
123
|
+
...interactiveHoverStyles,
|
|
124
|
+
_disabled: {
|
|
125
|
+
_hover: {
|
|
126
|
+
boxShadow: 'none',
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
// Overlay + interactive
|
|
132
|
+
{
|
|
133
|
+
variant: 'overlay',
|
|
134
|
+
interactive: true,
|
|
135
|
+
css: {
|
|
136
|
+
_disabled: {
|
|
137
|
+
_hover: {
|
|
138
|
+
boxShadow: 'raised',
|
|
139
|
+
},
|
|
140
|
+
},
|
|
141
|
+
},
|
|
142
|
+
},
|
|
143
|
+
],
|
|
144
|
+
defaultVariants: {
|
|
145
|
+
variant: 'default',
|
|
146
|
+
interactive: false,
|
|
147
|
+
},
|
|
148
|
+
});
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { defineSlotRecipe } from '@pandacss/dev';
|
|
2
|
+
|
|
3
|
+
export const checkboxRecipe = defineSlotRecipe({
|
|
4
|
+
className: 'checkbox',
|
|
5
|
+
jsx: ['Checkbox'],
|
|
6
|
+
slots: ['container', 'input', 'indicator'],
|
|
7
|
+
base: {
|
|
8
|
+
container: {
|
|
9
|
+
position: 'relative',
|
|
10
|
+
display: 'inline-grid',
|
|
11
|
+
gridTemplateColumns: 'auto 1fr',
|
|
12
|
+
gap: 4,
|
|
13
|
+
alignItems: 'start',
|
|
14
|
+
cursor: 'pointer',
|
|
15
|
+
userSelect: 'none',
|
|
16
|
+
color: 'text',
|
|
17
|
+
_error: {
|
|
18
|
+
color: 'text.danger',
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
input: {
|
|
22
|
+
position: 'absolute',
|
|
23
|
+
opacity: 0,
|
|
24
|
+
width: 'full',
|
|
25
|
+
height: 'full',
|
|
26
|
+
margin: '0',
|
|
27
|
+
padding: '0',
|
|
28
|
+
zIndex: 1,
|
|
29
|
+
cursor: 'inherit',
|
|
30
|
+
"& ~ [name='checkbox']": {
|
|
31
|
+
display: 'inline-grid',
|
|
32
|
+
},
|
|
33
|
+
_checked: {
|
|
34
|
+
"& ~ [name='checkbox-checked']": {
|
|
35
|
+
display: 'inline-grid',
|
|
36
|
+
fill: 'icon',
|
|
37
|
+
},
|
|
38
|
+
"& ~ [name='checkbox']": {
|
|
39
|
+
display: 'none',
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
_indeterminate: {
|
|
43
|
+
"& ~ [name='checkbox-indeterminate']": {
|
|
44
|
+
display: 'inline-grid',
|
|
45
|
+
fill: 'icon',
|
|
46
|
+
_disabled: {},
|
|
47
|
+
},
|
|
48
|
+
"& ~ [name='checkbox']": {
|
|
49
|
+
display: 'none',
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
_disabled: {
|
|
53
|
+
'& ~ svg': {
|
|
54
|
+
// fill: 'icon.disabled',
|
|
55
|
+
pointerEvents: 'none',
|
|
56
|
+
},
|
|
57
|
+
display: 'inline-grid',
|
|
58
|
+
_hover: {
|
|
59
|
+
cursor: 'not-allowed',
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
_error: {
|
|
63
|
+
display: 'inline-grid',
|
|
64
|
+
'& ~ svg': {
|
|
65
|
+
fill: 'icon.danger',
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
_focusVisible: {
|
|
69
|
+
"& ~ [name='checkbox-focus']": {
|
|
70
|
+
display: 'inline-grid',
|
|
71
|
+
position: 'absolute',
|
|
72
|
+
fill: 'border.focused',
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
indicator: {
|
|
77
|
+
placeContent: 'center',
|
|
78
|
+
display: 'none',
|
|
79
|
+
width: 24,
|
|
80
|
+
height: 24,
|
|
81
|
+
"&:is([name='checkbox'])": {
|
|
82
|
+
display: 'inline-grid',
|
|
83
|
+
fill: 'icon.subtlest',
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { defineRecipe } from '@pandacss/dev';
|
|
2
|
+
|
|
3
|
+
const checkboxInputBase = {
|
|
4
|
+
display: 'flex',
|
|
5
|
+
alignItems: 'start',
|
|
6
|
+
'&[class*="-label"]': {
|
|
7
|
+
fontSize: '16',
|
|
8
|
+
},
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export const checkboxInputRecipe = defineRecipe({
|
|
12
|
+
className: 'checkbox-input',
|
|
13
|
+
jsx: ['CheckboxInput'],
|
|
14
|
+
base: checkboxInputBase,
|
|
15
|
+
});
|