@discourser/design-system 0.11.0 → 0.13.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/{chunk-GUJTU4IH.js → chunk-BQAXPMOR.js} +12 -8
- package/dist/chunk-BQAXPMOR.js.map +1 -0
- package/dist/{chunk-X4PNKWSA.cjs → chunk-MIBEMJNS.cjs} +12 -8
- package/dist/chunk-MIBEMJNS.cjs.map +1 -0
- package/dist/{chunk-ESTQ62GZ.cjs → chunk-XSX6TKJZ.cjs} +211 -3
- package/dist/chunk-XSX6TKJZ.cjs.map +1 -0
- package/dist/{chunk-GMAXQBON.js → chunk-ZNAYN5UV.js} +211 -3
- package/dist/chunk-ZNAYN5UV.js.map +1 -0
- package/dist/components/Stepper/Stepper.d.ts +5 -1
- package/dist/components/Stepper/Stepper.d.ts.map +1 -1
- package/dist/components/index.cjs +33 -33
- package/dist/components/index.js +1 -1
- package/dist/index.cjs +37 -638
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -598
- package/dist/index.js.map +1 -1
- package/dist/preset/index.cjs +2 -2
- package/dist/preset/index.d.ts.map +1 -1
- package/dist/preset/index.js +1 -1
- package/dist/{recipes/stepper.recipe.d.ts → preset/recipes/stepper.d.ts} +2 -2
- package/dist/preset/recipes/stepper.d.ts.map +1 -0
- package/package.json +7 -2
- package/src/components/Stepper/Stepper.tsx +12 -2
- package/src/index.ts +0 -3
- package/src/preset/index.ts +6 -0
- package/src/{recipes/stepper.recipe.ts → preset/recipes/stepper.ts} +16 -2
- package/dist/chunk-ESTQ62GZ.cjs.map +0 -1
- package/dist/chunk-GMAXQBON.js.map +0 -1
- package/dist/chunk-GUJTU4IH.js.map +0 -1
- package/dist/chunk-X4PNKWSA.cjs.map +0 -1
- package/dist/recipes/button.recipe.d.ts +0 -2
- package/dist/recipes/button.recipe.d.ts.map +0 -1
- package/dist/recipes/card.recipe.d.ts +0 -2
- package/dist/recipes/card.recipe.d.ts.map +0 -1
- package/dist/recipes/dialog.recipe.d.ts +0 -2
- package/dist/recipes/dialog.recipe.d.ts.map +0 -1
- package/dist/recipes/icon-button.recipe.d.ts +0 -2
- package/dist/recipes/icon-button.recipe.d.ts.map +0 -1
- package/dist/recipes/index.d.ts +0 -7
- package/dist/recipes/index.d.ts.map +0 -1
- package/dist/recipes/input.recipe.d.ts +0 -2
- package/dist/recipes/input.recipe.d.ts.map +0 -1
- package/dist/recipes/stepper.recipe.d.ts.map +0 -1
- package/dist/recipes/switch.recipe.d.ts +0 -2
- package/dist/recipes/switch.recipe.d.ts.map +0 -1
- package/src/recipes/button.recipe.ts +0 -120
- package/src/recipes/card.recipe.ts +0 -50
- package/src/recipes/dialog.recipe.ts +0 -130
- package/src/recipes/icon-button.recipe.ts +0 -96
- package/src/recipes/index.ts +0 -6
- package/src/recipes/input.recipe.ts +0 -93
- package/src/recipes/switch.recipe.ts +0 -117
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
import { defineRecipe } from '@pandacss/dev';
|
|
2
|
-
|
|
3
|
-
export const buttonRecipe = defineRecipe({
|
|
4
|
-
className: 'button',
|
|
5
|
-
description: 'Material Design 3 button component',
|
|
6
|
-
base: {
|
|
7
|
-
display: 'inline-flex',
|
|
8
|
-
alignItems: 'center',
|
|
9
|
-
justifyContent: 'center',
|
|
10
|
-
gap: 'sm',
|
|
11
|
-
fontFamily: 'body',
|
|
12
|
-
fontWeight: '500',
|
|
13
|
-
borderRadius: 'full',
|
|
14
|
-
cursor: 'pointer',
|
|
15
|
-
transition: 'all',
|
|
16
|
-
transitionDuration: 'fast',
|
|
17
|
-
transitionTimingFunction: 'standard',
|
|
18
|
-
outline: 'none',
|
|
19
|
-
border: 'none',
|
|
20
|
-
textDecoration: 'none',
|
|
21
|
-
_disabled: {
|
|
22
|
-
opacity: 0.38,
|
|
23
|
-
cursor: 'not-allowed',
|
|
24
|
-
pointerEvents: 'none'
|
|
25
|
-
},
|
|
26
|
-
_focusVisible: {
|
|
27
|
-
outline: '2px solid',
|
|
28
|
-
outlineColor: 'primary',
|
|
29
|
-
outlineOffset: '2px'
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
variants: {
|
|
33
|
-
variant: {
|
|
34
|
-
filled: {
|
|
35
|
-
bg: 'primary',
|
|
36
|
-
color: 'onPrimary',
|
|
37
|
-
_hover: {
|
|
38
|
-
opacity: 0.92,
|
|
39
|
-
shadow: 'level1'
|
|
40
|
-
},
|
|
41
|
-
_active: {
|
|
42
|
-
opacity: 0.88
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
outlined: {
|
|
46
|
-
bg: 'transparent',
|
|
47
|
-
color: 'primary',
|
|
48
|
-
borderWidth: '1px',
|
|
49
|
-
borderStyle: 'solid',
|
|
50
|
-
borderColor: 'outline',
|
|
51
|
-
_hover: {
|
|
52
|
-
bg: 'primary',
|
|
53
|
-
bgOpacity: 0.08
|
|
54
|
-
},
|
|
55
|
-
_active: {
|
|
56
|
-
bg: 'primary',
|
|
57
|
-
bgOpacity: 0.12
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
|
-
text: {
|
|
61
|
-
bg: 'transparent',
|
|
62
|
-
color: 'primary',
|
|
63
|
-
_hover: {
|
|
64
|
-
bg: 'primary',
|
|
65
|
-
bgOpacity: 0.08
|
|
66
|
-
},
|
|
67
|
-
_active: {
|
|
68
|
-
bg: 'primary',
|
|
69
|
-
bgOpacity: 0.12
|
|
70
|
-
}
|
|
71
|
-
},
|
|
72
|
-
elevated: {
|
|
73
|
-
bg: 'surfaceContainerLow',
|
|
74
|
-
color: 'primary',
|
|
75
|
-
shadow: 'level1',
|
|
76
|
-
_hover: {
|
|
77
|
-
shadow: 'level2',
|
|
78
|
-
bg: 'surfaceContainerLow'
|
|
79
|
-
},
|
|
80
|
-
_active: {
|
|
81
|
-
shadow: 'level1'
|
|
82
|
-
}
|
|
83
|
-
},
|
|
84
|
-
tonal: {
|
|
85
|
-
bg: 'secondaryContainer',
|
|
86
|
-
color: 'onSecondaryContainer',
|
|
87
|
-
_hover: {
|
|
88
|
-
shadow: 'level1'
|
|
89
|
-
},
|
|
90
|
-
_active: {
|
|
91
|
-
shadow: 'none'
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
},
|
|
95
|
-
size: {
|
|
96
|
-
sm: {
|
|
97
|
-
height: '32px',
|
|
98
|
-
px: 'md',
|
|
99
|
-
fontSize: 'labelMedium',
|
|
100
|
-
lineHeight: 'labelMedium'
|
|
101
|
-
},
|
|
102
|
-
md: {
|
|
103
|
-
height: '40px',
|
|
104
|
-
px: 'lg',
|
|
105
|
-
fontSize: 'labelLarge',
|
|
106
|
-
lineHeight: 'labelLarge'
|
|
107
|
-
},
|
|
108
|
-
lg: {
|
|
109
|
-
height: '48px',
|
|
110
|
-
px: 'xl',
|
|
111
|
-
fontSize: 'labelLarge',
|
|
112
|
-
lineHeight: 'labelLarge'
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
},
|
|
116
|
-
defaultVariants: {
|
|
117
|
-
variant: 'filled',
|
|
118
|
-
size: 'md'
|
|
119
|
-
}
|
|
120
|
-
});
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { defineRecipe } from '@pandacss/dev';
|
|
2
|
-
|
|
3
|
-
export const cardRecipe = defineRecipe({
|
|
4
|
-
className: 'card',
|
|
5
|
-
description: 'Material Design 3 card component',
|
|
6
|
-
base: {
|
|
7
|
-
display: 'flex',
|
|
8
|
-
flexDirection: 'column',
|
|
9
|
-
borderRadius: 'medium',
|
|
10
|
-
overflow: 'hidden',
|
|
11
|
-
transition: 'all',
|
|
12
|
-
transitionDuration: 'fast',
|
|
13
|
-
transitionTimingFunction: 'standard'
|
|
14
|
-
},
|
|
15
|
-
variants: {
|
|
16
|
-
variant: {
|
|
17
|
-
elevated: {
|
|
18
|
-
bg: 'surfaceContainerLow',
|
|
19
|
-
shadow: 'level1',
|
|
20
|
-
_hover: {
|
|
21
|
-
shadow: 'level2'
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
filled: {
|
|
25
|
-
bg: 'surfaceContainerHighest'
|
|
26
|
-
},
|
|
27
|
-
outlined: {
|
|
28
|
-
bg: 'surface',
|
|
29
|
-
borderWidth: '1px',
|
|
30
|
-
borderStyle: 'solid',
|
|
31
|
-
borderColor: 'outlineVariant'
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
interactive: {
|
|
35
|
-
true: {
|
|
36
|
-
cursor: 'pointer',
|
|
37
|
-
_hover: {
|
|
38
|
-
opacity: 0.96
|
|
39
|
-
},
|
|
40
|
-
_active: {
|
|
41
|
-
opacity: 0.92
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
defaultVariants: {
|
|
47
|
-
variant: 'elevated',
|
|
48
|
-
interactive: false
|
|
49
|
-
}
|
|
50
|
-
});
|
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
import { defineSlotRecipe } from '@pandacss/dev';
|
|
2
|
-
|
|
3
|
-
export const dialogRecipe = defineSlotRecipe({
|
|
4
|
-
className: 'dialog',
|
|
5
|
-
description: 'Material Design 3 dialog component',
|
|
6
|
-
slots: ['backdrop', 'positioner', 'content', 'title', 'description', 'closeTrigger'],
|
|
7
|
-
base: {
|
|
8
|
-
backdrop: {
|
|
9
|
-
position: 'fixed',
|
|
10
|
-
inset: '0',
|
|
11
|
-
bg: 'scrim',
|
|
12
|
-
opacity: 0.4,
|
|
13
|
-
zIndex: 'modal',
|
|
14
|
-
animation: 'fadeIn',
|
|
15
|
-
_open: {
|
|
16
|
-
animation: 'fadeIn',
|
|
17
|
-
},
|
|
18
|
-
_closed: {
|
|
19
|
-
animation: 'fadeOut',
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
positioner: {
|
|
23
|
-
position: 'fixed',
|
|
24
|
-
inset: '0',
|
|
25
|
-
display: 'flex',
|
|
26
|
-
alignItems: 'center',
|
|
27
|
-
justifyContent: 'center',
|
|
28
|
-
zIndex: 'modal',
|
|
29
|
-
p: 'lg',
|
|
30
|
-
},
|
|
31
|
-
content: {
|
|
32
|
-
position: 'relative',
|
|
33
|
-
bg: 'surfaceContainerHigh',
|
|
34
|
-
color: 'onSurface',
|
|
35
|
-
borderRadius: 'extraLarge',
|
|
36
|
-
boxShadow: 'level3',
|
|
37
|
-
display: 'flex',
|
|
38
|
-
flexDirection: 'column',
|
|
39
|
-
maxWidth: '90vw',
|
|
40
|
-
maxHeight: '90vh',
|
|
41
|
-
overflow: 'hidden',
|
|
42
|
-
animation: 'scaleIn',
|
|
43
|
-
_open: {
|
|
44
|
-
animation: 'scaleIn',
|
|
45
|
-
},
|
|
46
|
-
_closed: {
|
|
47
|
-
animation: 'scaleOut',
|
|
48
|
-
},
|
|
49
|
-
},
|
|
50
|
-
title: {
|
|
51
|
-
fontFamily: 'headline',
|
|
52
|
-
fontSize: 'headlineSmall',
|
|
53
|
-
fontWeight: 'regular',
|
|
54
|
-
color: 'onSurface',
|
|
55
|
-
px: 'xl',
|
|
56
|
-
pt: 'xl',
|
|
57
|
-
pb: 'md',
|
|
58
|
-
},
|
|
59
|
-
description: {
|
|
60
|
-
fontFamily: 'body',
|
|
61
|
-
fontSize: 'bodyMedium',
|
|
62
|
-
color: 'onSurfaceVariant',
|
|
63
|
-
px: 'xl',
|
|
64
|
-
pb: 'xl',
|
|
65
|
-
flex: '1',
|
|
66
|
-
overflow: 'auto',
|
|
67
|
-
},
|
|
68
|
-
closeTrigger: {
|
|
69
|
-
position: 'absolute',
|
|
70
|
-
top: 'md',
|
|
71
|
-
right: 'md',
|
|
72
|
-
display: 'flex',
|
|
73
|
-
alignItems: 'center',
|
|
74
|
-
justifyContent: 'center',
|
|
75
|
-
width: '40px',
|
|
76
|
-
height: '40px',
|
|
77
|
-
borderRadius: 'full',
|
|
78
|
-
cursor: 'pointer',
|
|
79
|
-
color: 'onSurfaceVariant',
|
|
80
|
-
bg: 'transparent',
|
|
81
|
-
border: 'none',
|
|
82
|
-
transition: 'all',
|
|
83
|
-
transitionDuration: 'fast',
|
|
84
|
-
_hover: {
|
|
85
|
-
bg: 'surfaceContainerHighest',
|
|
86
|
-
},
|
|
87
|
-
_focus: {
|
|
88
|
-
outline: 'none',
|
|
89
|
-
bg: 'surfaceContainerHighest',
|
|
90
|
-
},
|
|
91
|
-
},
|
|
92
|
-
},
|
|
93
|
-
variants: {
|
|
94
|
-
size: {
|
|
95
|
-
sm: {
|
|
96
|
-
content: {
|
|
97
|
-
width: '280px',
|
|
98
|
-
minHeight: '140px',
|
|
99
|
-
},
|
|
100
|
-
},
|
|
101
|
-
md: {
|
|
102
|
-
content: {
|
|
103
|
-
width: '560px',
|
|
104
|
-
minHeight: '200px',
|
|
105
|
-
},
|
|
106
|
-
},
|
|
107
|
-
lg: {
|
|
108
|
-
content: {
|
|
109
|
-
width: '800px',
|
|
110
|
-
minHeight: '300px',
|
|
111
|
-
},
|
|
112
|
-
},
|
|
113
|
-
fullscreen: {
|
|
114
|
-
content: {
|
|
115
|
-
width: '100vw',
|
|
116
|
-
height: '100vh',
|
|
117
|
-
maxWidth: '100vw',
|
|
118
|
-
maxHeight: '100vh',
|
|
119
|
-
borderRadius: 'none',
|
|
120
|
-
},
|
|
121
|
-
positioner: {
|
|
122
|
-
p: '0',
|
|
123
|
-
},
|
|
124
|
-
},
|
|
125
|
-
},
|
|
126
|
-
},
|
|
127
|
-
defaultVariants: {
|
|
128
|
-
size: 'md',
|
|
129
|
-
},
|
|
130
|
-
});
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import { defineRecipe } from '@pandacss/dev';
|
|
2
|
-
|
|
3
|
-
export const iconButtonRecipe = defineRecipe({
|
|
4
|
-
className: 'icon-button',
|
|
5
|
-
description: 'Material Design 3 icon button component',
|
|
6
|
-
base: {
|
|
7
|
-
display: 'inline-flex',
|
|
8
|
-
alignItems: 'center',
|
|
9
|
-
justifyContent: 'center',
|
|
10
|
-
borderRadius: 'full',
|
|
11
|
-
cursor: 'pointer',
|
|
12
|
-
transition: 'all',
|
|
13
|
-
transitionDuration: 'fast',
|
|
14
|
-
transitionTimingFunction: 'standard',
|
|
15
|
-
outline: 'none',
|
|
16
|
-
border: 'none',
|
|
17
|
-
p: '0',
|
|
18
|
-
_disabled: {
|
|
19
|
-
opacity: 0.38,
|
|
20
|
-
cursor: 'not-allowed',
|
|
21
|
-
pointerEvents: 'none'
|
|
22
|
-
},
|
|
23
|
-
_focusVisible: {
|
|
24
|
-
outline: '2px solid',
|
|
25
|
-
outlineColor: 'primary',
|
|
26
|
-
outlineOffset: '2px'
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
variants: {
|
|
30
|
-
variant: {
|
|
31
|
-
standard: {
|
|
32
|
-
bg: 'transparent',
|
|
33
|
-
color: 'onSurfaceVariant',
|
|
34
|
-
_hover: {
|
|
35
|
-
bg: 'onSurfaceVariant',
|
|
36
|
-
bgOpacity: 0.08
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
filled: {
|
|
40
|
-
bg: 'primary',
|
|
41
|
-
color: 'onPrimary',
|
|
42
|
-
_hover: {
|
|
43
|
-
opacity: 0.92
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
tonal: {
|
|
47
|
-
bg: 'secondaryContainer',
|
|
48
|
-
color: 'onSecondaryContainer',
|
|
49
|
-
_hover: {
|
|
50
|
-
opacity: 0.92
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
outlined: {
|
|
54
|
-
bg: 'transparent',
|
|
55
|
-
color: 'onSurfaceVariant',
|
|
56
|
-
borderWidth: '1px',
|
|
57
|
-
borderStyle: 'solid',
|
|
58
|
-
borderColor: 'outline',
|
|
59
|
-
_hover: {
|
|
60
|
-
bg: 'onSurfaceVariant',
|
|
61
|
-
bgOpacity: 0.08
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
size: {
|
|
66
|
-
sm: {
|
|
67
|
-
width: '32px',
|
|
68
|
-
height: '32px',
|
|
69
|
-
'& svg': {
|
|
70
|
-
width: '18px',
|
|
71
|
-
height: '18px'
|
|
72
|
-
}
|
|
73
|
-
},
|
|
74
|
-
md: {
|
|
75
|
-
width: '40px',
|
|
76
|
-
height: '40px',
|
|
77
|
-
'& svg': {
|
|
78
|
-
width: '24px',
|
|
79
|
-
height: '24px'
|
|
80
|
-
}
|
|
81
|
-
},
|
|
82
|
-
lg: {
|
|
83
|
-
width: '48px',
|
|
84
|
-
height: '48px',
|
|
85
|
-
'& svg': {
|
|
86
|
-
width: '24px',
|
|
87
|
-
height: '24px'
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
},
|
|
92
|
-
defaultVariants: {
|
|
93
|
-
variant: 'standard',
|
|
94
|
-
size: 'md'
|
|
95
|
-
}
|
|
96
|
-
});
|
package/src/recipes/index.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export { buttonRecipe } from './button.recipe';
|
|
2
|
-
export { cardRecipe } from './card.recipe';
|
|
3
|
-
export { iconButtonRecipe } from './icon-button.recipe';
|
|
4
|
-
export { inputRecipe } from './input.recipe';
|
|
5
|
-
export { dialogRecipe } from './dialog.recipe';
|
|
6
|
-
export { switchRecipe } from './switch.recipe';
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import { defineRecipe } from '@pandacss/dev';
|
|
2
|
-
|
|
3
|
-
export const inputRecipe = defineRecipe({
|
|
4
|
-
className: 'input',
|
|
5
|
-
description: 'Material Design 3 text field component',
|
|
6
|
-
base: {
|
|
7
|
-
width: '100%',
|
|
8
|
-
fontFamily: 'body',
|
|
9
|
-
fontSize: 'bodyLarge',
|
|
10
|
-
lineHeight: 'bodyLarge',
|
|
11
|
-
color: 'onSurface',
|
|
12
|
-
bg: 'transparent',
|
|
13
|
-
borderRadius: 'extraSmall',
|
|
14
|
-
px: 'md',
|
|
15
|
-
transition: 'all',
|
|
16
|
-
transitionDuration: 'fast',
|
|
17
|
-
outline: 'none',
|
|
18
|
-
_placeholder: {
|
|
19
|
-
color: 'onSurfaceVariant',
|
|
20
|
-
opacity: 0.6,
|
|
21
|
-
},
|
|
22
|
-
_focus: {
|
|
23
|
-
outline: 'none',
|
|
24
|
-
},
|
|
25
|
-
_disabled: {
|
|
26
|
-
opacity: 0.38,
|
|
27
|
-
cursor: 'not-allowed',
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
variants: {
|
|
31
|
-
variant: {
|
|
32
|
-
filled: {
|
|
33
|
-
bg: 'surfaceContainerHighest',
|
|
34
|
-
borderBottomWidth: '1px',
|
|
35
|
-
borderBottomStyle: 'solid',
|
|
36
|
-
borderBottomColor: 'onSurfaceVariant',
|
|
37
|
-
borderTopLeftRadius: 'extraSmall',
|
|
38
|
-
borderTopRightRadius: 'extraSmall',
|
|
39
|
-
borderBottomLeftRadius: '0',
|
|
40
|
-
borderBottomRightRadius: '0',
|
|
41
|
-
_hover: {
|
|
42
|
-
bg: 'surfaceContainerHigh',
|
|
43
|
-
},
|
|
44
|
-
_focus: {
|
|
45
|
-
borderBottomWidth: '2px',
|
|
46
|
-
borderBottomColor: 'primary',
|
|
47
|
-
},
|
|
48
|
-
},
|
|
49
|
-
outlined: {
|
|
50
|
-
bg: 'transparent',
|
|
51
|
-
borderWidth: '1px',
|
|
52
|
-
borderStyle: 'solid',
|
|
53
|
-
borderColor: 'outline',
|
|
54
|
-
_hover: {
|
|
55
|
-
borderColor: 'onSurface',
|
|
56
|
-
},
|
|
57
|
-
_focus: {
|
|
58
|
-
borderWidth: '2px',
|
|
59
|
-
borderColor: 'primary',
|
|
60
|
-
},
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
|
-
size: {
|
|
64
|
-
sm: {
|
|
65
|
-
height: '40px',
|
|
66
|
-
fontSize: 'bodySmall',
|
|
67
|
-
lineHeight: 'bodySmall',
|
|
68
|
-
},
|
|
69
|
-
md: {
|
|
70
|
-
height: '56px',
|
|
71
|
-
fontSize: 'bodyLarge',
|
|
72
|
-
lineHeight: 'bodyLarge',
|
|
73
|
-
},
|
|
74
|
-
},
|
|
75
|
-
state: {
|
|
76
|
-
error: {
|
|
77
|
-
borderColor: 'error',
|
|
78
|
-
_focus: {
|
|
79
|
-
borderColor: 'error',
|
|
80
|
-
},
|
|
81
|
-
},
|
|
82
|
-
disabled: {
|
|
83
|
-
opacity: 0.38,
|
|
84
|
-
cursor: 'not-allowed',
|
|
85
|
-
pointerEvents: 'none',
|
|
86
|
-
},
|
|
87
|
-
},
|
|
88
|
-
},
|
|
89
|
-
defaultVariants: {
|
|
90
|
-
variant: 'outlined',
|
|
91
|
-
size: 'md',
|
|
92
|
-
},
|
|
93
|
-
});
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
import { defineSlotRecipe } from '@pandacss/dev';
|
|
2
|
-
|
|
3
|
-
export const switchRecipe = defineSlotRecipe({
|
|
4
|
-
className: 'switchControl',
|
|
5
|
-
description: 'Material Design 3 switch component',
|
|
6
|
-
slots: ['root', 'control', 'thumb', 'label'],
|
|
7
|
-
base: {
|
|
8
|
-
root: {
|
|
9
|
-
display: 'inline-flex',
|
|
10
|
-
alignItems: 'center',
|
|
11
|
-
gap: 'sm',
|
|
12
|
-
cursor: 'pointer',
|
|
13
|
-
userSelect: 'none',
|
|
14
|
-
_disabled: {
|
|
15
|
-
cursor: 'not-allowed',
|
|
16
|
-
opacity: 0.38,
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
control: {
|
|
20
|
-
position: 'relative',
|
|
21
|
-
display: 'inline-flex',
|
|
22
|
-
alignItems: 'center',
|
|
23
|
-
width: '52px',
|
|
24
|
-
height: '32px',
|
|
25
|
-
borderRadius: 'full',
|
|
26
|
-
bg: 'surfaceContainerHighest',
|
|
27
|
-
border: '2px solid',
|
|
28
|
-
borderColor: 'outline',
|
|
29
|
-
transition: 'all',
|
|
30
|
-
transitionDuration: 'fast',
|
|
31
|
-
flexShrink: 0,
|
|
32
|
-
_checked: {
|
|
33
|
-
bg: 'primary',
|
|
34
|
-
borderColor: 'primary',
|
|
35
|
-
},
|
|
36
|
-
_disabled: {
|
|
37
|
-
bg: 'surfaceVariant',
|
|
38
|
-
borderColor: 'onSurface',
|
|
39
|
-
opacity: 0.12,
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
thumb: {
|
|
43
|
-
position: 'absolute',
|
|
44
|
-
left: '4px',
|
|
45
|
-
width: '16px',
|
|
46
|
-
height: '16px',
|
|
47
|
-
borderRadius: 'full',
|
|
48
|
-
bg: 'outline',
|
|
49
|
-
transition: 'all',
|
|
50
|
-
transitionDuration: 'fast',
|
|
51
|
-
_checked: {
|
|
52
|
-
left: '28px',
|
|
53
|
-
width: '24px',
|
|
54
|
-
height: '24px',
|
|
55
|
-
bg: 'onPrimary',
|
|
56
|
-
},
|
|
57
|
-
_disabled: {
|
|
58
|
-
bg: 'onSurface',
|
|
59
|
-
opacity: 0.38,
|
|
60
|
-
},
|
|
61
|
-
},
|
|
62
|
-
label: {
|
|
63
|
-
fontFamily: 'body',
|
|
64
|
-
fontSize: 'bodyMedium',
|
|
65
|
-
color: 'onSurface',
|
|
66
|
-
userSelect: 'none',
|
|
67
|
-
_disabled: {
|
|
68
|
-
opacity: 0.38,
|
|
69
|
-
},
|
|
70
|
-
},
|
|
71
|
-
},
|
|
72
|
-
variants: {
|
|
73
|
-
size: {
|
|
74
|
-
sm: {
|
|
75
|
-
control: {
|
|
76
|
-
width: '44px',
|
|
77
|
-
height: '24px',
|
|
78
|
-
},
|
|
79
|
-
thumb: {
|
|
80
|
-
width: '12px',
|
|
81
|
-
height: '12px',
|
|
82
|
-
left: '4px',
|
|
83
|
-
_checked: {
|
|
84
|
-
left: '24px',
|
|
85
|
-
width: '16px',
|
|
86
|
-
height: '16px',
|
|
87
|
-
},
|
|
88
|
-
},
|
|
89
|
-
label: {
|
|
90
|
-
fontSize: 'bodySmall',
|
|
91
|
-
},
|
|
92
|
-
},
|
|
93
|
-
md: {
|
|
94
|
-
control: {
|
|
95
|
-
width: '52px',
|
|
96
|
-
height: '32px',
|
|
97
|
-
},
|
|
98
|
-
thumb: {
|
|
99
|
-
width: '16px',
|
|
100
|
-
height: '16px',
|
|
101
|
-
left: '4px',
|
|
102
|
-
_checked: {
|
|
103
|
-
left: '28px',
|
|
104
|
-
width: '24px',
|
|
105
|
-
height: '24px',
|
|
106
|
-
},
|
|
107
|
-
},
|
|
108
|
-
label: {
|
|
109
|
-
fontSize: 'bodyMedium',
|
|
110
|
-
},
|
|
111
|
-
},
|
|
112
|
-
},
|
|
113
|
-
},
|
|
114
|
-
defaultVariants: {
|
|
115
|
-
size: 'md',
|
|
116
|
-
},
|
|
117
|
-
});
|