@okshaun/components 1.0.1 → 2.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/.mcp.json +2 -5
- package/dist/icon-metadata.json +5173 -0
- package/dist/index.js +17088 -9273
- package/dist/index.js.map +1 -1
- package/dist/panda.buildinfo.json +693 -0
- package/dist/playroom-static.css +187432 -0
- package/dist/{preset-BzrKiUEH.js → preset-Coz-VwQR.js} +4051 -3217
- package/dist/preset-Coz-VwQR.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 -247
- package/dist/specs/semantic-tokens.json +330 -115
- package/dist/specs/text-styles.json +72 -0
- package/dist/specs/tokens.json +237 -27
- package/dist/sprite.svg +1 -1
- package/dist/sprite.symbol.html +6662 -320
- package/dist/styles.css +36938 -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 +834 -347
- package/package.json +49 -36
- package/src/recipes/avatar.ts +4 -4
- package/src/recipes/badge.ts +22 -48
- package/src/recipes/box.ts +1 -7
- package/src/recipes/breadcrumbs.ts +42 -25
- package/src/recipes/button.ts +151 -85
- 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 +223 -0
- package/src/recipes/divider.ts +38 -31
- 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 +51 -18
- 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/{index.ts → recipes-slot.ts} +14 -23
- 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 -19
- 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/radii.ts +1 -1
- package/src/styles/primitives/shadows.ts +9 -9
- 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/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 +71 -1
- package/src/utils/splitProps.ts +4 -4
- package/dist/preset-BzrKiUEH.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 -43
- 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/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
package/src/recipes/tag.ts
CHANGED
|
@@ -1,74 +1,66 @@
|
|
|
1
1
|
import { defineRecipe } from '@pandacss/dev';
|
|
2
2
|
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
appearance: {
|
|
20
|
-
default: {},
|
|
21
|
-
bold: {},
|
|
22
|
-
},
|
|
23
|
-
hue: {
|
|
24
|
-
gray: {},
|
|
25
|
-
red: {},
|
|
26
|
-
orange: {},
|
|
27
|
-
yellow: {},
|
|
28
|
-
lime: {},
|
|
29
|
-
green: {},
|
|
30
|
-
teal: {},
|
|
31
|
-
blue: {},
|
|
32
|
-
indigo: {},
|
|
33
|
-
purple: {},
|
|
34
|
-
magenta: {},
|
|
35
|
-
tan: {},
|
|
3
|
+
export const tagRecipe = defineRecipe({
|
|
4
|
+
className: 'tag',
|
|
5
|
+
jsx: ['Tag'],
|
|
6
|
+
base: {
|
|
7
|
+
display: 'flex',
|
|
8
|
+
alignItems: 'center',
|
|
9
|
+
py: '0',
|
|
10
|
+
borderRadius: '2',
|
|
11
|
+
gap: '1',
|
|
12
|
+
px: '4',
|
|
13
|
+
w: 'fit',
|
|
14
|
+
h: '20',
|
|
15
|
+
fontSize: '14',
|
|
16
|
+
fontWeight: 'medium',
|
|
17
|
+
lineHeight: 'tight',
|
|
18
|
+
whiteSpace: 'nowrap',
|
|
36
19
|
},
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
pl: '1',
|
|
20
|
+
variants: {
|
|
21
|
+
variant: {
|
|
22
|
+
default: {},
|
|
23
|
+
bold: {},
|
|
42
24
|
},
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
25
|
+
hue: {
|
|
26
|
+
gray: {},
|
|
27
|
+
red: {},
|
|
28
|
+
orange: {},
|
|
29
|
+
yellow: {},
|
|
30
|
+
lime: {},
|
|
31
|
+
green: {},
|
|
32
|
+
teal: {},
|
|
33
|
+
blue: {},
|
|
34
|
+
indigo: {},
|
|
35
|
+
purple: {},
|
|
36
|
+
magenta: {},
|
|
37
|
+
tan: {},
|
|
47
38
|
},
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
39
|
+
iconBefore: {
|
|
40
|
+
true: {
|
|
41
|
+
gap: '1',
|
|
42
|
+
pl: '1',
|
|
43
|
+
},
|
|
44
|
+
false: {},
|
|
45
|
+
},
|
|
46
|
+
iconAfter: {
|
|
47
|
+
true: {
|
|
48
|
+
gap: '1',
|
|
49
|
+
pr: '1',
|
|
50
|
+
},
|
|
51
|
+
false: {},
|
|
52
|
+
},
|
|
53
|
+
hasIcon: {
|
|
54
|
+
true: {},
|
|
55
|
+
false: {
|
|
56
|
+
px: '4',
|
|
57
|
+
},
|
|
53
58
|
},
|
|
54
|
-
},
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
export const tagRecipe = defineRecipe({
|
|
58
|
-
className: 'tag',
|
|
59
|
-
jsx: ['Tag'],
|
|
60
|
-
base: tagBase,
|
|
61
|
-
variants: tagVariant,
|
|
62
|
-
defaultVariants: {
|
|
63
|
-
appearance: 'default',
|
|
64
|
-
hue: 'gray',
|
|
65
|
-
iconPosition: 'left',
|
|
66
|
-
hasIcon: false,
|
|
67
59
|
},
|
|
68
60
|
compoundVariants: [
|
|
69
61
|
{
|
|
70
62
|
hue: 'gray',
|
|
71
|
-
|
|
63
|
+
variant: 'default',
|
|
72
64
|
css: {
|
|
73
65
|
color: 'text.subtle',
|
|
74
66
|
bg: 'bg.neutral',
|
|
@@ -76,7 +68,7 @@ export const tagRecipe = defineRecipe({
|
|
|
76
68
|
},
|
|
77
69
|
{
|
|
78
70
|
hue: 'gray',
|
|
79
|
-
|
|
71
|
+
variant: 'bold',
|
|
80
72
|
css: {
|
|
81
73
|
color: 'text.inverse',
|
|
82
74
|
bg: 'bg.neutral.boldest',
|
|
@@ -84,7 +76,7 @@ export const tagRecipe = defineRecipe({
|
|
|
84
76
|
},
|
|
85
77
|
{
|
|
86
78
|
hue: 'red',
|
|
87
|
-
|
|
79
|
+
variant: 'default',
|
|
88
80
|
css: {
|
|
89
81
|
color: { base: 'red.70', _dark: 'red.20' },
|
|
90
82
|
bg: { base: 'red.20', _dark: 'red.100' },
|
|
@@ -92,7 +84,7 @@ export const tagRecipe = defineRecipe({
|
|
|
92
84
|
},
|
|
93
85
|
{
|
|
94
86
|
hue: 'red',
|
|
95
|
-
|
|
87
|
+
variant: 'bold',
|
|
96
88
|
css: {
|
|
97
89
|
color: { base: 'red.10', _dark: 'red.100' },
|
|
98
90
|
bg: { base: 'red.60', _dark: 'red.40' },
|
|
@@ -100,7 +92,7 @@ export const tagRecipe = defineRecipe({
|
|
|
100
92
|
},
|
|
101
93
|
{
|
|
102
94
|
hue: 'orange',
|
|
103
|
-
|
|
95
|
+
variant: 'default',
|
|
104
96
|
css: {
|
|
105
97
|
color: { base: 'orange.70', _dark: 'orange.20' },
|
|
106
98
|
bg: { base: 'orange.20', _dark: 'orange.100' },
|
|
@@ -108,7 +100,7 @@ export const tagRecipe = defineRecipe({
|
|
|
108
100
|
},
|
|
109
101
|
{
|
|
110
102
|
hue: 'orange',
|
|
111
|
-
|
|
103
|
+
variant: 'bold',
|
|
112
104
|
css: {
|
|
113
105
|
color: { base: 'orange.10', _dark: 'orange.100' },
|
|
114
106
|
bg: { base: 'orange.60', _dark: 'orange.50' },
|
|
@@ -116,7 +108,7 @@ export const tagRecipe = defineRecipe({
|
|
|
116
108
|
},
|
|
117
109
|
{
|
|
118
110
|
hue: 'yellow',
|
|
119
|
-
|
|
111
|
+
variant: 'default',
|
|
120
112
|
css: {
|
|
121
113
|
color: { base: 'yellow.80', _dark: 'yellow.50' },
|
|
122
114
|
bg: { base: 'yellow.20', _dark: 'yellow.90' },
|
|
@@ -124,7 +116,7 @@ export const tagRecipe = defineRecipe({
|
|
|
124
116
|
},
|
|
125
117
|
{
|
|
126
118
|
hue: 'yellow',
|
|
127
|
-
|
|
119
|
+
variant: 'bold',
|
|
128
120
|
css: {
|
|
129
121
|
color: { base: 'yellow.100', _dark: 'yellow.100' },
|
|
130
122
|
bg: { base: 'yellow.40', _dark: 'yellow.60' },
|
|
@@ -132,7 +124,7 @@ export const tagRecipe = defineRecipe({
|
|
|
132
124
|
},
|
|
133
125
|
{
|
|
134
126
|
hue: 'lime',
|
|
135
|
-
|
|
127
|
+
variant: 'default',
|
|
136
128
|
css: {
|
|
137
129
|
color: { base: 'lime.70', _dark: 'lime.20' },
|
|
138
130
|
bg: { base: 'lime.20', _dark: 'lime.90' },
|
|
@@ -140,7 +132,7 @@ export const tagRecipe = defineRecipe({
|
|
|
140
132
|
},
|
|
141
133
|
{
|
|
142
134
|
hue: 'lime',
|
|
143
|
-
|
|
135
|
+
variant: 'bold',
|
|
144
136
|
css: {
|
|
145
137
|
color: { base: 'lime.10', _dark: 'lime.100' },
|
|
146
138
|
bg: { base: 'lime.60', _dark: 'lime.40' },
|
|
@@ -148,7 +140,7 @@ export const tagRecipe = defineRecipe({
|
|
|
148
140
|
},
|
|
149
141
|
{
|
|
150
142
|
hue: 'green',
|
|
151
|
-
|
|
143
|
+
variant: 'default',
|
|
152
144
|
css: {
|
|
153
145
|
color: { base: 'green.70', _dark: 'green.20' },
|
|
154
146
|
bg: { base: 'green.20', _dark: 'green.90' },
|
|
@@ -156,7 +148,7 @@ export const tagRecipe = defineRecipe({
|
|
|
156
148
|
},
|
|
157
149
|
{
|
|
158
150
|
hue: 'green',
|
|
159
|
-
|
|
151
|
+
variant: 'bold',
|
|
160
152
|
css: {
|
|
161
153
|
color: { base: 'gray.10', _dark: 'green.100' },
|
|
162
154
|
bg: { base: 'green.70', _dark: 'green.40' },
|
|
@@ -164,7 +156,7 @@ export const tagRecipe = defineRecipe({
|
|
|
164
156
|
},
|
|
165
157
|
{
|
|
166
158
|
hue: 'teal',
|
|
167
|
-
|
|
159
|
+
variant: 'default',
|
|
168
160
|
css: {
|
|
169
161
|
color: { base: 'teal.80', _dark: 'teal.20' },
|
|
170
162
|
bg: { base: 'teal.20', _dark: 'teal.90' },
|
|
@@ -172,7 +164,7 @@ export const tagRecipe = defineRecipe({
|
|
|
172
164
|
},
|
|
173
165
|
{
|
|
174
166
|
hue: 'teal',
|
|
175
|
-
|
|
167
|
+
variant: 'bold',
|
|
176
168
|
css: {
|
|
177
169
|
color: { base: 'teal.10', _dark: 'teal.100' },
|
|
178
170
|
bg: { base: 'teal.60', _dark: 'teal.50' },
|
|
@@ -180,7 +172,7 @@ export const tagRecipe = defineRecipe({
|
|
|
180
172
|
},
|
|
181
173
|
{
|
|
182
174
|
hue: 'blue',
|
|
183
|
-
|
|
175
|
+
variant: 'default',
|
|
184
176
|
css: {
|
|
185
177
|
color: { base: 'blue.70', _dark: 'blue.20' },
|
|
186
178
|
bg: { base: 'blue.20', _dark: 'blue.90' },
|
|
@@ -188,7 +180,7 @@ export const tagRecipe = defineRecipe({
|
|
|
188
180
|
},
|
|
189
181
|
{
|
|
190
182
|
hue: 'blue',
|
|
191
|
-
|
|
183
|
+
variant: 'bold',
|
|
192
184
|
css: {
|
|
193
185
|
color: { base: 'blue.10', _dark: 'blue.10' },
|
|
194
186
|
bg: { base: 'blue.50', _dark: 'blue.70' },
|
|
@@ -196,7 +188,7 @@ export const tagRecipe = defineRecipe({
|
|
|
196
188
|
},
|
|
197
189
|
{
|
|
198
190
|
hue: 'indigo',
|
|
199
|
-
|
|
191
|
+
variant: 'default',
|
|
200
192
|
css: {
|
|
201
193
|
color: { base: 'indigo.70', _dark: 'indigo.20' },
|
|
202
194
|
bg: { base: 'indigo.20', _dark: 'indigo.90' },
|
|
@@ -204,7 +196,7 @@ export const tagRecipe = defineRecipe({
|
|
|
204
196
|
},
|
|
205
197
|
{
|
|
206
198
|
hue: 'indigo',
|
|
207
|
-
|
|
199
|
+
variant: 'bold',
|
|
208
200
|
css: {
|
|
209
201
|
color: { base: 'indigo.10', _dark: 'indigo.10' },
|
|
210
202
|
bg: { base: 'indigo.60', _dark: 'indigo.70' },
|
|
@@ -212,7 +204,7 @@ export const tagRecipe = defineRecipe({
|
|
|
212
204
|
},
|
|
213
205
|
{
|
|
214
206
|
hue: 'purple',
|
|
215
|
-
|
|
207
|
+
variant: 'default',
|
|
216
208
|
css: {
|
|
217
209
|
color: { base: 'purple.70', _dark: 'purple.20' },
|
|
218
210
|
bg: { base: 'purple.20', _dark: 'purple.90' },
|
|
@@ -220,7 +212,7 @@ export const tagRecipe = defineRecipe({
|
|
|
220
212
|
},
|
|
221
213
|
{
|
|
222
214
|
hue: 'purple',
|
|
223
|
-
|
|
215
|
+
variant: 'bold',
|
|
224
216
|
css: {
|
|
225
217
|
color: { base: 'purple.10', _dark: 'purple.10' },
|
|
226
218
|
bg: { base: 'purple.60', _dark: 'purple.80' },
|
|
@@ -228,7 +220,7 @@ export const tagRecipe = defineRecipe({
|
|
|
228
220
|
},
|
|
229
221
|
{
|
|
230
222
|
hue: 'magenta',
|
|
231
|
-
|
|
223
|
+
variant: 'default',
|
|
232
224
|
css: {
|
|
233
225
|
color: { base: 'magenta.80', _dark: 'magenta.20' },
|
|
234
226
|
bg: { base: 'magenta.20', _dark: 'magenta.90' },
|
|
@@ -236,7 +228,7 @@ export const tagRecipe = defineRecipe({
|
|
|
236
228
|
},
|
|
237
229
|
{
|
|
238
230
|
hue: 'magenta',
|
|
239
|
-
|
|
231
|
+
variant: 'bold',
|
|
240
232
|
css: {
|
|
241
233
|
color: { base: 'magenta.10', _dark: 'magenta.10' },
|
|
242
234
|
bg: { base: 'magenta.70', _dark: 'magenta.70' },
|
|
@@ -244,7 +236,7 @@ export const tagRecipe = defineRecipe({
|
|
|
244
236
|
},
|
|
245
237
|
{
|
|
246
238
|
hue: 'tan',
|
|
247
|
-
|
|
239
|
+
variant: 'default',
|
|
248
240
|
css: {
|
|
249
241
|
color: { base: 'tan.70', _dark: 'tan.20' },
|
|
250
242
|
bg: { base: 'tan.20', _dark: 'tan.80' },
|
|
@@ -252,11 +244,15 @@ export const tagRecipe = defineRecipe({
|
|
|
252
244
|
},
|
|
253
245
|
{
|
|
254
246
|
hue: 'tan',
|
|
255
|
-
|
|
247
|
+
variant: 'bold',
|
|
256
248
|
css: {
|
|
257
249
|
color: { base: 'gray.10', _dark: 'tan.90' },
|
|
258
250
|
bg: { base: 'tan.60', _dark: 'tan.40' },
|
|
259
251
|
},
|
|
260
252
|
},
|
|
261
253
|
],
|
|
254
|
+
defaultVariants: {
|
|
255
|
+
variant: 'default',
|
|
256
|
+
hue: 'gray',
|
|
257
|
+
},
|
|
262
258
|
});
|
package/src/recipes/text.ts
CHANGED
|
@@ -8,7 +8,7 @@ const textBase = {
|
|
|
8
8
|
margin: '0',
|
|
9
9
|
lineHeight: 'default',
|
|
10
10
|
fontWeight: 'normal',
|
|
11
|
-
fontSize: '16',
|
|
11
|
+
fontSize: '{sizes.16}',
|
|
12
12
|
color: 'text.subtlest',
|
|
13
13
|
maxWidth: 'prose',
|
|
14
14
|
};
|
|
@@ -66,7 +66,7 @@ const textVariants = {
|
|
|
66
66
|
whiteSpace: 'nowrap',
|
|
67
67
|
},
|
|
68
68
|
},
|
|
69
|
-
|
|
69
|
+
allCaps: {
|
|
70
70
|
true: {
|
|
71
71
|
textTransform: 'uppercase',
|
|
72
72
|
fontWeight: 'bold',
|
|
@@ -91,7 +91,7 @@ const headingVariants = {
|
|
|
91
91
|
h3: { textStyle: 'heading.sm' },
|
|
92
92
|
h4: { textStyle: 'heading.xs' },
|
|
93
93
|
},
|
|
94
|
-
|
|
94
|
+
allCaps: {
|
|
95
95
|
true: {
|
|
96
96
|
textTransform: 'uppercase',
|
|
97
97
|
letterSpacing: 'widest',
|
|
@@ -104,21 +104,25 @@ const linkBase = {
|
|
|
104
104
|
alignItems: 'center',
|
|
105
105
|
fontWeight: 'medium',
|
|
106
106
|
gap: '1',
|
|
107
|
-
color:
|
|
107
|
+
color: 'link',
|
|
108
|
+
textDecoration: 'none',
|
|
108
109
|
backgroundImage: 'linear-gradient(90deg, transparent 0% 100%)',
|
|
109
|
-
backgroundSize: '100%
|
|
110
|
+
backgroundSize: '100% {sizes.1}',
|
|
110
111
|
backgroundRepeat: 'no-repeat',
|
|
111
112
|
backgroundPositionY: '100%',
|
|
113
|
+
outlineWidth: '2',
|
|
114
|
+
outlineStyle: 'solid',
|
|
115
|
+
outlineColor: 'transparent',
|
|
116
|
+
outlineOffset: '1',
|
|
112
117
|
width: 'fit-content',
|
|
113
118
|
cursor: 'pointer',
|
|
114
|
-
textDecoration: 'none',
|
|
115
119
|
_hover: {
|
|
116
|
-
color:
|
|
117
|
-
backgroundColor: { base: 'blue.10', _dark: 'blue.100' },
|
|
120
|
+
color: 'link',
|
|
118
121
|
backgroundImage: 'linear-gradient(90deg, currentColor 0% 100%)',
|
|
119
122
|
},
|
|
120
|
-
|
|
121
|
-
|
|
123
|
+
_focusVisible: {
|
|
124
|
+
borderRadius: '{sizes.4}',
|
|
125
|
+
outlineColor: 'border.focused',
|
|
122
126
|
},
|
|
123
127
|
};
|
|
124
128
|
|
|
@@ -127,17 +131,18 @@ const linkVariants = {
|
|
|
127
131
|
_disabled: {
|
|
128
132
|
true: {
|
|
129
133
|
cursor: 'not-allowed',
|
|
130
|
-
|
|
134
|
+
opacity: '40%',
|
|
131
135
|
pointerEvents: 'none',
|
|
132
136
|
},
|
|
133
137
|
},
|
|
134
138
|
};
|
|
135
139
|
|
|
136
140
|
const labelBase = {
|
|
137
|
-
fontSize: '
|
|
141
|
+
fontSize: '{sizes.16}',
|
|
138
142
|
fontWeight: 'normal',
|
|
139
143
|
lineHeight: 'tight',
|
|
140
144
|
cursor: 'default',
|
|
145
|
+
color: 'text',
|
|
141
146
|
};
|
|
142
147
|
|
|
143
148
|
//Copied linkvarients, don't have styles defined for this yet
|
|
@@ -146,7 +151,7 @@ const labelVariants = {
|
|
|
146
151
|
_disabled: {
|
|
147
152
|
true: {
|
|
148
153
|
cursor: 'not-allowed',
|
|
149
|
-
|
|
154
|
+
opacity: '70%',
|
|
150
155
|
pointerEvents: 'none',
|
|
151
156
|
},
|
|
152
157
|
},
|
|
@@ -157,9 +162,6 @@ export const textRecipe = defineRecipe({
|
|
|
157
162
|
jsx: ['Text'],
|
|
158
163
|
base: textBase,
|
|
159
164
|
variants: textVariants,
|
|
160
|
-
defaultVariants: {
|
|
161
|
-
family: 'inherit',
|
|
162
|
-
},
|
|
163
165
|
});
|
|
164
166
|
|
|
165
167
|
export const headingRecipe = defineRecipe({
|
|
@@ -177,9 +179,6 @@ export const linkRecipe = defineRecipe({
|
|
|
177
179
|
jsx: ['Link'],
|
|
178
180
|
base: linkBase,
|
|
179
181
|
variants: linkVariants,
|
|
180
|
-
defaultVariants: {
|
|
181
|
-
family: 'inherit',
|
|
182
|
-
},
|
|
183
182
|
});
|
|
184
183
|
|
|
185
184
|
export const labelRecipe = defineRecipe({
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
import { defineSlotRecipe } from '@pandacss/dev';
|
|
2
|
+
|
|
3
|
+
const textInputBase = {
|
|
4
|
+
container: {
|
|
5
|
+
position: 'relative',
|
|
6
|
+
width: 'full',
|
|
7
|
+
bg: 'surface',
|
|
8
|
+
borderWidth: '{sizes.1}',
|
|
9
|
+
borderStyle: 'solid',
|
|
10
|
+
borderColor: 'border.input',
|
|
11
|
+
borderRadius: '{sizes.4}',
|
|
12
|
+
outlineWidth: '{sizes.1}',
|
|
13
|
+
outlineStyle: 'solid',
|
|
14
|
+
outlineColor: 'transparent',
|
|
15
|
+
overflow: 'hidden',
|
|
16
|
+
lineHeight: 'none',
|
|
17
|
+
_focusWithin: {
|
|
18
|
+
outlineColor: 'border.focused',
|
|
19
|
+
borderColor: 'border.focused',
|
|
20
|
+
},
|
|
21
|
+
_error: {
|
|
22
|
+
borderColor: 'border.danger',
|
|
23
|
+
_focusWithin: {
|
|
24
|
+
borderColor: 'border.danger',
|
|
25
|
+
outlineColor: 'border.danger',
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
_disabled: {
|
|
29
|
+
opacity: '40%',
|
|
30
|
+
cursor: 'not-allowed',
|
|
31
|
+
_focusWithin: {
|
|
32
|
+
outlineColor: 'transparent',
|
|
33
|
+
borderColor: 'border.input',
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
_groupDisabled: {
|
|
37
|
+
opacity: 1, // let FormField handle disabled state opacity
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
input: {
|
|
41
|
+
width: 'full',
|
|
42
|
+
bg: 'surface',
|
|
43
|
+
color: 'text',
|
|
44
|
+
lineHeight: 'default',
|
|
45
|
+
fontFamily: 'sans',
|
|
46
|
+
border: 'none',
|
|
47
|
+
outline: 'none',
|
|
48
|
+
_placeholder: {
|
|
49
|
+
color: 'text.placeholder',
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
icon: {
|
|
53
|
+
position: 'absolute',
|
|
54
|
+
top: '50%',
|
|
55
|
+
transform: 'translateY(-50%)',
|
|
56
|
+
fill: 'icon.decorative.subtle',
|
|
57
|
+
mixBlendMode: { base: 'multiply', _dark: 'screen' },
|
|
58
|
+
pointerEvents: 'none',
|
|
59
|
+
zIndex: 1,
|
|
60
|
+
},
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
const textInputVariants = {
|
|
64
|
+
size: {
|
|
65
|
+
sm: {
|
|
66
|
+
input: {
|
|
67
|
+
py: '0',
|
|
68
|
+
px: '{sizes.8}',
|
|
69
|
+
fontSize: '{sizes.14}',
|
|
70
|
+
},
|
|
71
|
+
icon: {
|
|
72
|
+
mx: '2',
|
|
73
|
+
w: '{sizes.22}',
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
md: {
|
|
77
|
+
input: {
|
|
78
|
+
py: '3',
|
|
79
|
+
px: '{sizes.10}',
|
|
80
|
+
fontSize: '{sizes.16}',
|
|
81
|
+
},
|
|
82
|
+
icon: {
|
|
83
|
+
mx: '3',
|
|
84
|
+
w: '{sizes.24}',
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
lg: {
|
|
88
|
+
input: {
|
|
89
|
+
py: '7',
|
|
90
|
+
px: '{sizes.12}',
|
|
91
|
+
fontSize: '{sizes.16}',
|
|
92
|
+
},
|
|
93
|
+
icon: {
|
|
94
|
+
mx: '5',
|
|
95
|
+
w: '{sizes.24}',
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
xl: {
|
|
99
|
+
input: {
|
|
100
|
+
py: '9',
|
|
101
|
+
px: '{sizes.16}',
|
|
102
|
+
fontSize: '{sizes.20}',
|
|
103
|
+
},
|
|
104
|
+
icon: {
|
|
105
|
+
mx: '7',
|
|
106
|
+
w: '{sizes.28}',
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
iconBefore: {
|
|
111
|
+
true: {
|
|
112
|
+
icon: {
|
|
113
|
+
left: '0',
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
iconAfter: {
|
|
118
|
+
true: {
|
|
119
|
+
icon: {
|
|
120
|
+
right: '0',
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
autoSize: {
|
|
125
|
+
true: {
|
|
126
|
+
input: {
|
|
127
|
+
fieldSizing: 'content',
|
|
128
|
+
maxW: 'full',
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
},
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
const textInputCompoundVariants: NonNullable<
|
|
135
|
+
Parameters<typeof defineSlotRecipe>[0]['compoundVariants']
|
|
136
|
+
> = [
|
|
137
|
+
{
|
|
138
|
+
size: 'sm',
|
|
139
|
+
iconBefore: true,
|
|
140
|
+
css: {
|
|
141
|
+
input: { ps: '[calc({sizes.24} + {sizes.2})]' },
|
|
142
|
+
},
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
size: 'sm',
|
|
146
|
+
iconAfter: true,
|
|
147
|
+
css: {
|
|
148
|
+
input: { pe: '[calc({sizes.24} + {sizes.2})]' },
|
|
149
|
+
},
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
size: 'md',
|
|
153
|
+
iconBefore: true,
|
|
154
|
+
css: {
|
|
155
|
+
input: { ps: '[calc({sizes.24} + {sizes.7})]' },
|
|
156
|
+
},
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
size: 'md',
|
|
160
|
+
iconAfter: true,
|
|
161
|
+
css: {
|
|
162
|
+
input: { pe: '[calc({sizes.24} + {sizes.7})]' },
|
|
163
|
+
},
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
size: 'lg',
|
|
167
|
+
iconBefore: true,
|
|
168
|
+
css: {
|
|
169
|
+
input: { ps: '[calc({sizes.24} + {sizes.10})]' },
|
|
170
|
+
},
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
size: 'lg',
|
|
174
|
+
iconAfter: true,
|
|
175
|
+
css: {
|
|
176
|
+
input: { pe: '[calc({sizes.24} + {sizes.10})]' },
|
|
177
|
+
},
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
size: 'xl',
|
|
181
|
+
iconBefore: true,
|
|
182
|
+
css: {
|
|
183
|
+
input: { ps: '[calc({sizes.32} + {sizes.10})]' },
|
|
184
|
+
},
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
size: 'xl',
|
|
188
|
+
iconAfter: true,
|
|
189
|
+
css: {
|
|
190
|
+
input: { pe: '[calc({sizes.32} + {sizes.10})]' },
|
|
191
|
+
},
|
|
192
|
+
},
|
|
193
|
+
];
|
|
194
|
+
|
|
195
|
+
export const textInputRecipe = defineSlotRecipe({
|
|
196
|
+
className: 'textInput',
|
|
197
|
+
jsx: ['TextInput', 'Textinput'],
|
|
198
|
+
slots: ['container', 'input', 'icon'],
|
|
199
|
+
base: textInputBase,
|
|
200
|
+
variants: textInputVariants,
|
|
201
|
+
compoundVariants: textInputCompoundVariants,
|
|
202
|
+
defaultVariants: {
|
|
203
|
+
size: 'md',
|
|
204
|
+
},
|
|
205
|
+
});
|