@mekari/pixel3-theme 0.0.1-alpha.0 → 0.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/index.js +201 -16
- package/dist/index.mjs +195 -8
- package/dist/recipes/divider.d.mts +5 -0
- package/dist/recipes/divider.d.ts +5 -0
- package/dist/recipes/form-control.d.mts +5 -0
- package/dist/recipes/form-control.d.ts +5 -0
- package/dist/recipes/index.d.mts +3 -0
- package/dist/recipes/index.d.ts +3 -0
- package/dist/recipes/input-tag.d.mts +5 -0
- package/dist/recipes/input-tag.d.ts +5 -0
- package/dist/tokens/index.d.mts +4 -0
- package/dist/tokens/index.d.ts +4 -0
- package/dist/tokens/sizes.d.mts +4 -0
- package/dist/tokens/sizes.d.ts +4 -0
- package/package.json +5 -4
- package/src/breakpoints.ts +6 -0
- package/src/conditions.ts +22 -0
- package/src/global-css.ts +23 -0
- package/src/index.ts +26 -0
- package/src/keyframes.ts +15 -0
- package/src/recipes/accordion.ts +57 -0
- package/src/recipes/avatar.ts +179 -0
- package/src/recipes/badge.ts +166 -0
- package/src/recipes/button.ts +224 -0
- package/src/recipes/checkbox.ts +92 -0
- package/src/recipes/divider.ts +31 -0
- package/src/recipes/form-control.ts +40 -0
- package/src/recipes/icon.ts +31 -0
- package/src/recipes/index.ts +61 -0
- package/src/recipes/input-tag.ts +119 -0
- package/src/recipes/input.ts +204 -0
- package/src/recipes/popover.ts +82 -0
- package/src/recipes/progress.ts +76 -0
- package/src/recipes/radio.ts +103 -0
- package/src/recipes/select.ts +114 -0
- package/src/recipes/shared.ts +19 -0
- package/src/recipes/spinner.ts +25 -0
- package/src/recipes/table.ts +113 -0
- package/src/recipes/tabs.ts +204 -0
- package/src/recipes/tag.ts +98 -0
- package/src/recipes/text.ts +56 -0
- package/src/recipes/textarea.ts +60 -0
- package/src/recipes/toggle.ts +99 -0
- package/src/recipes/tooltip.ts +24 -0
- package/src/text-styles.ts +34 -0
- package/src/tokens/borders.ts +8 -0
- package/src/tokens/colors.ts +130 -0
- package/src/tokens/durations.ts +7 -0
- package/src/tokens/index.ts +28 -0
- package/src/tokens/opacity.ts +8 -0
- package/src/tokens/radii.ts +11 -0
- package/src/tokens/shadows.ts +40 -0
- package/src/tokens/sizes.ts +28 -0
- package/src/tokens/spacing.ts +21 -0
- package/src/tokens/typography.ts +45 -0
- package/src/tokens/z-index.ts +12 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export const conditions = {
|
|
2
|
+
extend: {
|
|
3
|
+
disabled: '&:is(:disabled, [disabled], [aria-disabled=true], [data-disabled])',
|
|
4
|
+
invalid: '&:is(:invalid, [aria-invalid=true], [data-invalid])',
|
|
5
|
+
checked: '&:is(:checked, [data-checked], [aria-checked=true], [data-state=checked])',
|
|
6
|
+
indeterminate:
|
|
7
|
+
'&:is(:indeterminate, [data-indeterminate], [aria-checked=mixed], [data-state=indeterminate])',
|
|
8
|
+
closed: '&:is([data-state=closed])',
|
|
9
|
+
open: '&:is([open], [data-state=open])',
|
|
10
|
+
hidden: '&:is([hidden])',
|
|
11
|
+
collapsed: '&:is([aria-collapsed=true], [data-collapsed], [data-state="collapsed"])',
|
|
12
|
+
loading: '& > [data-loading=true], &:is([data-loading], [aria-busy=true])',
|
|
13
|
+
hasIcon: '&[data-has-icon=true]',
|
|
14
|
+
active: '&[data-active=true], [data-active]',
|
|
15
|
+
highlight: '&[data-highlight=true], [data-highlight]',
|
|
16
|
+
hasBorder: '&[data-has-border=true]',
|
|
17
|
+
hasBackground: '&[data-has-background=true]',
|
|
18
|
+
isFullWidth: '&[data-is-full-width=true]',
|
|
19
|
+
placementLeft: '&[data-placement=left]',
|
|
20
|
+
placementRight: '&[data-placement=right]'
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { defineGlobalStyles } from '@pandacss/dev'
|
|
2
|
+
|
|
3
|
+
export const globalCss = defineGlobalStyles({
|
|
4
|
+
html: {
|
|
5
|
+
MozOsxFontSmoothing: 'grayscale',
|
|
6
|
+
textRendering: 'optimizeLegibility',
|
|
7
|
+
WebkitFontSmoothing: 'antialiased',
|
|
8
|
+
WebkitTextSizeAdjust: '100%'
|
|
9
|
+
},
|
|
10
|
+
body: {
|
|
11
|
+
background: 'var(--mp-colors-white)',
|
|
12
|
+
color: 'var(--mp-colors-dark)',
|
|
13
|
+
fontFamily: 'var(--mp-fonts-body)',
|
|
14
|
+
fontSize: '14px',
|
|
15
|
+
_dark: {
|
|
16
|
+
colorScheme: 'dark'
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
'*, *::before, *::after': {
|
|
20
|
+
borderStyle: 'solid',
|
|
21
|
+
boxSizing: 'border-box'
|
|
22
|
+
}
|
|
23
|
+
})
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { definePreset } from '@pandacss/dev'
|
|
2
|
+
import type { Preset } from '@pandacss/types'
|
|
3
|
+
import { conditions } from './conditions'
|
|
4
|
+
import { globalCss } from './global-css'
|
|
5
|
+
import { tokens } from './tokens'
|
|
6
|
+
import { textStyles } from './text-styles'
|
|
7
|
+
import { keyframes } from './keyframes'
|
|
8
|
+
import { recipes, slotRecipes } from './recipes'
|
|
9
|
+
import { breakpoints } from './breakpoints'
|
|
10
|
+
|
|
11
|
+
const preset: Preset = definePreset({
|
|
12
|
+
theme: {
|
|
13
|
+
extend: {
|
|
14
|
+
breakpoints,
|
|
15
|
+
keyframes,
|
|
16
|
+
textStyles,
|
|
17
|
+
tokens,
|
|
18
|
+
recipes,
|
|
19
|
+
slotRecipes
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
conditions,
|
|
23
|
+
globalCss
|
|
24
|
+
})
|
|
25
|
+
|
|
26
|
+
export default preset
|
package/src/keyframes.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { defineKeyframes } from '@pandacss/dev'
|
|
2
|
+
|
|
3
|
+
export const keyframes = defineKeyframes({
|
|
4
|
+
'fade-in': {
|
|
5
|
+
from: { opacity: '0' },
|
|
6
|
+
to: { opacity: '1' }
|
|
7
|
+
},
|
|
8
|
+
'fade-out': {
|
|
9
|
+
from: { opacity: '1' },
|
|
10
|
+
to: { opacity: '0' }
|
|
11
|
+
},
|
|
12
|
+
spin: {
|
|
13
|
+
'100%': { transform: 'rotate(1turn)' }
|
|
14
|
+
}
|
|
15
|
+
})
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
// import { accordionAnatomy } from "@ark-ui/anatomy";
|
|
2
|
+
import { defineSlotRecipe } from '@pandacss/dev'
|
|
3
|
+
|
|
4
|
+
export const accordion = defineSlotRecipe({
|
|
5
|
+
className: 'accordion',
|
|
6
|
+
slots: ['root', 'item', 'trigger', 'content'],
|
|
7
|
+
base: {
|
|
8
|
+
root: {
|
|
9
|
+
divideY: '1px',
|
|
10
|
+
width: 'full'
|
|
11
|
+
},
|
|
12
|
+
trigger: {
|
|
13
|
+
alignItems: 'center',
|
|
14
|
+
color: 'fg.default',
|
|
15
|
+
cursor: 'pointer',
|
|
16
|
+
display: 'flex',
|
|
17
|
+
fontWeight: 'normal',
|
|
18
|
+
justifyContent: 'space-between',
|
|
19
|
+
textStyle: 'lg',
|
|
20
|
+
width: 'full',
|
|
21
|
+
fontSize: 'lg'
|
|
22
|
+
},
|
|
23
|
+
content: {
|
|
24
|
+
color: 'fg.muted',
|
|
25
|
+
display: 'grid',
|
|
26
|
+
gridTemplateRows: '0fr',
|
|
27
|
+
transitionProperty: 'grid-template-rows, padding-bottom',
|
|
28
|
+
transitionDuration: 'normal',
|
|
29
|
+
transitionTimingFunction: 'default',
|
|
30
|
+
_open: {
|
|
31
|
+
gridTemplateRows: '1fr'
|
|
32
|
+
},
|
|
33
|
+
'& > div': {
|
|
34
|
+
overflow: 'hidden'
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
defaultVariants: {
|
|
39
|
+
size: 'md'
|
|
40
|
+
},
|
|
41
|
+
variants: {
|
|
42
|
+
size: {
|
|
43
|
+
md: {
|
|
44
|
+
trigger: {
|
|
45
|
+
py: '4'
|
|
46
|
+
},
|
|
47
|
+
content: {
|
|
48
|
+
pb: '6',
|
|
49
|
+
pr: '8',
|
|
50
|
+
_closed: {
|
|
51
|
+
pb: '0'
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
})
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import { defineSlotRecipe } from '@pandacss/dev'
|
|
2
|
+
|
|
3
|
+
const avatarSlotRecipe = defineSlotRecipe({
|
|
4
|
+
className: 'avatar',
|
|
5
|
+
jsx: ['MpAvatar', 'mp-avatar'],
|
|
6
|
+
slots: ['root', 'fallback', 'image', 'icon'],
|
|
7
|
+
base: {
|
|
8
|
+
root: {
|
|
9
|
+
color: 'white',
|
|
10
|
+
position: 'relative',
|
|
11
|
+
display: 'inline-flex',
|
|
12
|
+
alignItems: 'center',
|
|
13
|
+
justifyContent: 'center',
|
|
14
|
+
verticalAlign: 'top',
|
|
15
|
+
flexShrink: '0',
|
|
16
|
+
fontWeight: 'semiBold',
|
|
17
|
+
textTransform: 'uppercase',
|
|
18
|
+
userSelect: 'none',
|
|
19
|
+
backgroundColor: 'var(--mp-avatar--background-color)',
|
|
20
|
+
borderColor: 'var(--mp-avatar--border-color)',
|
|
21
|
+
marginLeft: 'var(--mp-avatar--margin-left)',
|
|
22
|
+
cursor: 'var(--mp-avatar--cursor)',
|
|
23
|
+
_hasBorder: {
|
|
24
|
+
borderWidth: '0.125rem'
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
fallback: {
|
|
28
|
+
width: '100%',
|
|
29
|
+
height: '100%',
|
|
30
|
+
visibility: 'var(--mp-avatar--visibility)',
|
|
31
|
+
display: 'var(--mp-avatar--display)'
|
|
32
|
+
},
|
|
33
|
+
image: {
|
|
34
|
+
width: '100%',
|
|
35
|
+
height: '100%',
|
|
36
|
+
objectFit: 'cover'
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
variants: {
|
|
40
|
+
variant: {
|
|
41
|
+
square: {
|
|
42
|
+
root: { borderRadius: 'md' },
|
|
43
|
+
image: { borderRadius: 'md' }
|
|
44
|
+
},
|
|
45
|
+
circle: {
|
|
46
|
+
root: { borderRadius: 'full' },
|
|
47
|
+
image: { borderRadius: 'full' }
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
variantColor: {
|
|
51
|
+
gray: {
|
|
52
|
+
root: { backgroundColor: 'gray.50' }
|
|
53
|
+
},
|
|
54
|
+
sky: {
|
|
55
|
+
root: { backgroundColor: 'sky.400' }
|
|
56
|
+
},
|
|
57
|
+
teal: {
|
|
58
|
+
root: { backgroundColor: 'teal.400' }
|
|
59
|
+
},
|
|
60
|
+
violet: {
|
|
61
|
+
root: { backgroundColor: 'violet.400' }
|
|
62
|
+
},
|
|
63
|
+
amber: {
|
|
64
|
+
root: { backgroundColor: 'amber.400' }
|
|
65
|
+
},
|
|
66
|
+
rose: {
|
|
67
|
+
root: { backgroundColor: 'rose.400' }
|
|
68
|
+
},
|
|
69
|
+
stone: {
|
|
70
|
+
root: { backgroundColor: 'stone.400' }
|
|
71
|
+
},
|
|
72
|
+
lime: {
|
|
73
|
+
root: { backgroundColor: 'lime.400' }
|
|
74
|
+
},
|
|
75
|
+
pink: {
|
|
76
|
+
root: { backgroundColor: 'pink.400' }
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
size: {
|
|
80
|
+
sm: {
|
|
81
|
+
root: { width: '6', height: '6', fontSize: 'xs' },
|
|
82
|
+
icon: { width: '4!', height: '4!' }
|
|
83
|
+
},
|
|
84
|
+
md: {
|
|
85
|
+
root: { width: '8', height: '8', fontSize: 'sm' },
|
|
86
|
+
icon: { width: '5!', height: '5!' }
|
|
87
|
+
},
|
|
88
|
+
lg: {
|
|
89
|
+
root: { width: '12', height: '12', fontSize: 'lg' },
|
|
90
|
+
icon: { width: '8!', height: '8!' }
|
|
91
|
+
},
|
|
92
|
+
xl: {
|
|
93
|
+
root: { width: '20', height: '20', fontSize: '2xl' },
|
|
94
|
+
icon: { width: '16!', height: '16!' }
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
compoundVariants: [
|
|
99
|
+
{
|
|
100
|
+
size: 'sm',
|
|
101
|
+
variant: 'square',
|
|
102
|
+
css: {
|
|
103
|
+
root: { borderRadius: 'sm' },
|
|
104
|
+
image: { borderRadius: 'sm' }
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
size: 'lg',
|
|
109
|
+
variant: 'square',
|
|
110
|
+
css: {
|
|
111
|
+
root: { borderRadius: 'lg' },
|
|
112
|
+
image: { borderRadius: 'lg' }
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
size: 'xl',
|
|
117
|
+
variant: 'square',
|
|
118
|
+
css: {
|
|
119
|
+
root: { borderRadius: 'xl' },
|
|
120
|
+
image: { borderRadius: 'xl' }
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
variantColor: 'gray',
|
|
125
|
+
css: {
|
|
126
|
+
root: { color: 'gray.600' }
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
],
|
|
130
|
+
defaultVariants: {
|
|
131
|
+
size: 'md',
|
|
132
|
+
variant: 'circle'
|
|
133
|
+
}
|
|
134
|
+
})
|
|
135
|
+
|
|
136
|
+
const avatarGroupSlotRecipe = defineSlotRecipe({
|
|
137
|
+
className: 'avatar-group',
|
|
138
|
+
jsx: ['MpAvatarGroup', 'mp-avatar-group'],
|
|
139
|
+
slots: ['root', 'excess'],
|
|
140
|
+
base: {
|
|
141
|
+
root: {
|
|
142
|
+
display: 'flex',
|
|
143
|
+
alignItems: 'center',
|
|
144
|
+
zIndex: '0'
|
|
145
|
+
},
|
|
146
|
+
excess: {
|
|
147
|
+
marginLeft: '2',
|
|
148
|
+
color: 'blue.400',
|
|
149
|
+
backgroundColor: 'blue.50',
|
|
150
|
+
fontWeight: 'semiBold',
|
|
151
|
+
display: 'flex',
|
|
152
|
+
alignItems: 'center',
|
|
153
|
+
justifyContent: 'center',
|
|
154
|
+
borderRadius: 'full',
|
|
155
|
+
userSelect: 'none',
|
|
156
|
+
cursor: 'var(--mp-avatar-group--cursor)'
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
variants: {
|
|
160
|
+
size: {
|
|
161
|
+
sm: {
|
|
162
|
+
excess: { width: '6', height: '6', fontSize: 'xs' }
|
|
163
|
+
},
|
|
164
|
+
md: {
|
|
165
|
+
excess: { width: '8', height: '8', fontSize: 'sm' }
|
|
166
|
+
},
|
|
167
|
+
lg: {
|
|
168
|
+
excess: { width: '12', height: '12', fontSize: 'lg' }
|
|
169
|
+
},
|
|
170
|
+
xl: {
|
|
171
|
+
excess: { width: '20', height: '20', fontSize: '2xl' }
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
compoundVariants: [],
|
|
176
|
+
defaultVariants: {}
|
|
177
|
+
})
|
|
178
|
+
|
|
179
|
+
export { avatarSlotRecipe, avatarGroupSlotRecipe }
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import { defineRecipe } from '@pandacss/dev'
|
|
2
|
+
|
|
3
|
+
const badgeRecipe = defineRecipe({
|
|
4
|
+
className: 'badge',
|
|
5
|
+
jsx: ['MpBadge', 'mp-badge'],
|
|
6
|
+
base: {
|
|
7
|
+
display: 'inline-flex',
|
|
8
|
+
alignItems: 'center',
|
|
9
|
+
borderRadius: '999px'
|
|
10
|
+
},
|
|
11
|
+
|
|
12
|
+
variants: {
|
|
13
|
+
variant: {
|
|
14
|
+
solid: {
|
|
15
|
+
color: 'white'
|
|
16
|
+
},
|
|
17
|
+
subtle: {}
|
|
18
|
+
},
|
|
19
|
+
variantColor: {
|
|
20
|
+
blue: {},
|
|
21
|
+
green: {},
|
|
22
|
+
orange: {},
|
|
23
|
+
red: {},
|
|
24
|
+
gray: {}
|
|
25
|
+
},
|
|
26
|
+
size: {
|
|
27
|
+
sm: {
|
|
28
|
+
fontSize: 'xs',
|
|
29
|
+
fontWeight: 'semibold',
|
|
30
|
+
lineHeight: '1sm',
|
|
31
|
+
letterSpacing: 'normal',
|
|
32
|
+
height: '4'
|
|
33
|
+
},
|
|
34
|
+
md: {
|
|
35
|
+
fontSize: 'md',
|
|
36
|
+
fontWeight: 'regular',
|
|
37
|
+
lineHeight: 'md',
|
|
38
|
+
letterSpacing: 'normal',
|
|
39
|
+
height: '5'
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
|
|
44
|
+
compoundVariants: [
|
|
45
|
+
// Size
|
|
46
|
+
{
|
|
47
|
+
variant: 'solid',
|
|
48
|
+
size: 'md',
|
|
49
|
+
css: {
|
|
50
|
+
paddingX: '1.5',
|
|
51
|
+
paddingY: '0.5'
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
variant: 'solid',
|
|
56
|
+
size: 'sm',
|
|
57
|
+
css: {
|
|
58
|
+
paddingX: '1',
|
|
59
|
+
paddingY: '0.5'
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
variant: 'subtle',
|
|
64
|
+
size: 'md',
|
|
65
|
+
css: {
|
|
66
|
+
paddingX: '2',
|
|
67
|
+
paddingY: '0'
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
variant: 'subtle',
|
|
72
|
+
size: 'sm',
|
|
73
|
+
css: {
|
|
74
|
+
paddingX: '1',
|
|
75
|
+
paddingY: '0'
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
|
|
79
|
+
// Solid
|
|
80
|
+
{
|
|
81
|
+
variant: 'solid',
|
|
82
|
+
variantColor: 'blue',
|
|
83
|
+
css: {
|
|
84
|
+
backgroundColor: 'sky.400'
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
variant: 'solid',
|
|
89
|
+
variantColor: 'green',
|
|
90
|
+
css: {
|
|
91
|
+
backgroundColor: 'teal.400'
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
variant: 'solid',
|
|
96
|
+
variantColor: 'orange',
|
|
97
|
+
css: {
|
|
98
|
+
backgroundColor: 'amber.400'
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
variant: 'solid',
|
|
103
|
+
variantColor: 'red',
|
|
104
|
+
css: {
|
|
105
|
+
backgroundColor: 'rose.400'
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
variant: 'solid',
|
|
110
|
+
variantColor: 'gray',
|
|
111
|
+
css: {
|
|
112
|
+
backgroundColor: 'stone.400'
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
|
|
116
|
+
// Subtle
|
|
117
|
+
{
|
|
118
|
+
variant: ['subtle'],
|
|
119
|
+
variantColor: 'blue',
|
|
120
|
+
css: {
|
|
121
|
+
backgroundColor: 'blue.50',
|
|
122
|
+
color: 'blue.700'
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
variant: ['subtle'],
|
|
127
|
+
variantColor: 'green',
|
|
128
|
+
css: {
|
|
129
|
+
backgroundColor: 'green.50',
|
|
130
|
+
color: 'green.700'
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
variant: ['subtle'],
|
|
135
|
+
variantColor: 'orange',
|
|
136
|
+
css: {
|
|
137
|
+
backgroundColor: 'orange.50',
|
|
138
|
+
color: 'orange.700'
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
variant: ['subtle'],
|
|
143
|
+
variantColor: 'red',
|
|
144
|
+
css: {
|
|
145
|
+
backgroundColor: 'red.50',
|
|
146
|
+
color: 'red.700'
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
variant: ['subtle'],
|
|
151
|
+
variantColor: 'gray',
|
|
152
|
+
css: {
|
|
153
|
+
backgroundColor: 'gray.50',
|
|
154
|
+
color: 'black'
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
],
|
|
158
|
+
|
|
159
|
+
defaultVariants: {
|
|
160
|
+
variant: 'solid',
|
|
161
|
+
size: 'md',
|
|
162
|
+
variantColor: 'blue'
|
|
163
|
+
}
|
|
164
|
+
})
|
|
165
|
+
|
|
166
|
+
export { badgeRecipe }
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
import { defineRecipe } from '@pandacss/dev'
|
|
2
|
+
|
|
3
|
+
const buttonRecipe = defineRecipe({
|
|
4
|
+
className: 'button',
|
|
5
|
+
jsx: ['MpButton', 'mp-button'],
|
|
6
|
+
base: {
|
|
7
|
+
position: 'relative',
|
|
8
|
+
display: 'inline-flex',
|
|
9
|
+
justifyContent: 'center',
|
|
10
|
+
alignItems: 'center',
|
|
11
|
+
alignSelf: 'start',
|
|
12
|
+
gap: '2',
|
|
13
|
+
borderWidth: '1px',
|
|
14
|
+
whiteSpace: 'nowrap',
|
|
15
|
+
userSelect: 'none',
|
|
16
|
+
appearance: 'none',
|
|
17
|
+
outline: 'none',
|
|
18
|
+
cursor: 'pointer',
|
|
19
|
+
transitionDuration: '250ms',
|
|
20
|
+
transitionProperty: 'background, border-color, color, box-shadow',
|
|
21
|
+
transitionTimingFunction: 'linear',
|
|
22
|
+
_loading: {
|
|
23
|
+
cursor: 'wait',
|
|
24
|
+
position: 'absolute',
|
|
25
|
+
display: 'flex',
|
|
26
|
+
justifyContent: 'center',
|
|
27
|
+
alignItems: 'center',
|
|
28
|
+
width: 'full',
|
|
29
|
+
height: 'full'
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
variants: {
|
|
33
|
+
variant: {
|
|
34
|
+
primary: {
|
|
35
|
+
color: 'white',
|
|
36
|
+
background: 'blue.400',
|
|
37
|
+
borderColor: 'blue.400',
|
|
38
|
+
_hover: {
|
|
39
|
+
background: 'blue.500',
|
|
40
|
+
borderColor: 'blue.500'
|
|
41
|
+
},
|
|
42
|
+
_active: {
|
|
43
|
+
background: 'blue.700',
|
|
44
|
+
borderColor: 'blue.700'
|
|
45
|
+
},
|
|
46
|
+
_loading: {
|
|
47
|
+
background: 'blue.400'
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
secondary: {
|
|
51
|
+
color: 'blue.400',
|
|
52
|
+
background: 'white',
|
|
53
|
+
borderColor: 'gray.100',
|
|
54
|
+
_hover: {
|
|
55
|
+
background: 'gray.50',
|
|
56
|
+
borderColor: 'gray.100'
|
|
57
|
+
},
|
|
58
|
+
_active: {
|
|
59
|
+
background: 'blue.50',
|
|
60
|
+
borderColor: 'blue.50'
|
|
61
|
+
},
|
|
62
|
+
_loading: {
|
|
63
|
+
background: 'white'
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
ghost: {
|
|
67
|
+
color: 'gray.600',
|
|
68
|
+
background: 'white',
|
|
69
|
+
borderColor: 'white',
|
|
70
|
+
_hover: {
|
|
71
|
+
background: 'gray.50',
|
|
72
|
+
borderColor: 'gray.50'
|
|
73
|
+
},
|
|
74
|
+
_active: {
|
|
75
|
+
background: 'gray.100',
|
|
76
|
+
borderColor: 'gray.100'
|
|
77
|
+
},
|
|
78
|
+
_loading: {
|
|
79
|
+
background: 'white'
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
danger: {
|
|
83
|
+
color: 'white',
|
|
84
|
+
background: 'red.400',
|
|
85
|
+
borderColor: 'red.400',
|
|
86
|
+
_hover: {
|
|
87
|
+
background: 'red.500',
|
|
88
|
+
borderColor: 'red.500'
|
|
89
|
+
},
|
|
90
|
+
_active: {
|
|
91
|
+
background: 'red.700',
|
|
92
|
+
borderColor: 'red.700'
|
|
93
|
+
},
|
|
94
|
+
_focusVisible: {
|
|
95
|
+
borderColor: 'red.400',
|
|
96
|
+
boxShadow: '0 0 0 3px #FDECEE'
|
|
97
|
+
},
|
|
98
|
+
_loading: {
|
|
99
|
+
background: 'red.400'
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
textLink: {
|
|
103
|
+
color: 'blue.400',
|
|
104
|
+
background: 'white',
|
|
105
|
+
borderColor: 'white',
|
|
106
|
+
_hover: {
|
|
107
|
+
color: 'blue.500'
|
|
108
|
+
},
|
|
109
|
+
_active: {
|
|
110
|
+
color: 'blue.700'
|
|
111
|
+
},
|
|
112
|
+
_disabled: {
|
|
113
|
+
cursor: 'not-allowed',
|
|
114
|
+
color: 'gray.400'
|
|
115
|
+
},
|
|
116
|
+
_loading: {
|
|
117
|
+
background: 'white'
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
size: {
|
|
122
|
+
sm: {
|
|
123
|
+
paddingX: '2',
|
|
124
|
+
paddingY: '1',
|
|
125
|
+
borderRadius: 'sm',
|
|
126
|
+
textStyle: 'label.md',
|
|
127
|
+
fontWeight: 'regular',
|
|
128
|
+
_loading: {
|
|
129
|
+
borderRadius: 'sm'
|
|
130
|
+
},
|
|
131
|
+
_hasIcon: {
|
|
132
|
+
padding: '1 !important'
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
md: {
|
|
136
|
+
paddingX: '4',
|
|
137
|
+
paddingY: '2',
|
|
138
|
+
borderRadius: 'md',
|
|
139
|
+
textStyle: 'label.md',
|
|
140
|
+
fontWeight: 'semiBold',
|
|
141
|
+
_loading: {
|
|
142
|
+
borderRadius: 'md'
|
|
143
|
+
},
|
|
144
|
+
_hasIcon: {
|
|
145
|
+
padding: '2 !important'
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
compoundVariants: [
|
|
151
|
+
{
|
|
152
|
+
variant: ['textLink'],
|
|
153
|
+
css: {
|
|
154
|
+
paddingX: '0',
|
|
155
|
+
paddingY: '0',
|
|
156
|
+
borderRadius: 'sm',
|
|
157
|
+
_focusVisible: {
|
|
158
|
+
borderColor: 'white',
|
|
159
|
+
boxShadow: 'focus'
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
variant: ['ghost', 'textLink'],
|
|
165
|
+
css: {
|
|
166
|
+
fontWeight: 'regular'
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
variant: ['primary', 'secondary', 'ghost'],
|
|
171
|
+
css: {
|
|
172
|
+
_focusVisible: {
|
|
173
|
+
borderColor: 'blue.400',
|
|
174
|
+
boxShadow: 'focus'
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
variant: ['primary', 'secondary', 'ghost', 'danger'],
|
|
180
|
+
css: {
|
|
181
|
+
_disabled: {
|
|
182
|
+
cursor: 'not-allowed',
|
|
183
|
+
color: 'gray.400',
|
|
184
|
+
background: 'gray.50',
|
|
185
|
+
borderColor: 'gray.50',
|
|
186
|
+
_hover: {
|
|
187
|
+
background: 'gray.50',
|
|
188
|
+
borderColor: 'gray.50'
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
],
|
|
194
|
+
defaultVariants: {
|
|
195
|
+
variant: 'primary',
|
|
196
|
+
size: 'md'
|
|
197
|
+
}
|
|
198
|
+
})
|
|
199
|
+
|
|
200
|
+
const buttonGroupRecipe = defineRecipe({
|
|
201
|
+
className: 'pixel-button-group',
|
|
202
|
+
jsx: ['MpButtonGroup'],
|
|
203
|
+
base: {
|
|
204
|
+
display: 'flex',
|
|
205
|
+
alignItems: 'center',
|
|
206
|
+
gap: 'var(--mp-button-group-spacing)',
|
|
207
|
+
'&[data-split-button=true]': {
|
|
208
|
+
gap: '0',
|
|
209
|
+
'& > [data-pixel-component=MpButton]': {
|
|
210
|
+
_first: {
|
|
211
|
+
borderTopRightRadius: 'none !important',
|
|
212
|
+
borderBottomRightRadius: 'none !important',
|
|
213
|
+
borderRight: '0 !important'
|
|
214
|
+
},
|
|
215
|
+
_last: {
|
|
216
|
+
borderTopLeftRadius: 'none !important',
|
|
217
|
+
borderBottomLeftRadius: 'none !important'
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
})
|
|
223
|
+
|
|
224
|
+
export { buttonRecipe, buttonGroupRecipe }
|