@okshaun/components 1.0.2 → 2.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.
Files changed (129) hide show
  1. package/dist/.mcp.json +2 -5
  2. package/dist/icon-metadata.json +5173 -0
  3. package/dist/index.js +17118 -9339
  4. package/dist/index.js.map +1 -1
  5. package/dist/panda.buildinfo.json +696 -0
  6. package/dist/playroom-static.css +187432 -0
  7. package/dist/{preset-DCCViEDs.js → preset-Df8i1OIQ.js} +3651 -2776
  8. package/dist/preset-Df8i1OIQ.js.map +1 -0
  9. package/dist/preset.js +1 -1
  10. package/dist/specs/color-palette.json +22 -1
  11. package/dist/specs/patterns.json +0 -16
  12. package/dist/specs/recipes.json +411 -239
  13. package/dist/specs/semantic-tokens.json +347 -146
  14. package/dist/specs/text-styles.json +72 -0
  15. package/dist/specs/tokens.json +267 -67
  16. package/dist/sprite.svg +1 -1
  17. package/dist/sprite.symbol.html +6662 -320
  18. package/dist/styles.css +36925 -5
  19. package/dist/svgs/calendar-lock.svg +1 -0
  20. package/dist/svgs/computer.svg +1 -0
  21. package/dist/svgs/cookie.svg +1 -0
  22. package/dist/svgs/folder-check.svg +1 -0
  23. package/dist/svgs/folder-copy.svg +1 -0
  24. package/dist/svgs/folder-dashed.svg +1 -0
  25. package/dist/svgs/folder-open.svg +1 -0
  26. package/dist/svgs/folder-topic.svg +1 -0
  27. package/dist/svgs/folder.svg +1 -0
  28. package/dist/svgs/mobile.svg +1 -0
  29. package/dist/svgs/numpad.svg +1 -0
  30. package/dist/svgs/phone.svg +1 -0
  31. package/dist/svgs/qr-code.svg +1 -0
  32. package/dist/svgs/sparkle.svg +1 -0
  33. package/dist/svgs/trolley.svg +1 -0
  34. package/dist/types/index.d.ts +837 -337
  35. package/package.json +49 -24
  36. package/src/recipes/avatar.ts +98 -98
  37. package/src/recipes/badge.ts +22 -39
  38. package/src/recipes/box.ts +1 -7
  39. package/src/recipes/breadcrumbs.ts +42 -25
  40. package/src/recipes/button.ts +201 -105
  41. package/src/recipes/card.ts +5 -1
  42. package/src/recipes/checkbox.ts +23 -24
  43. package/src/recipes/checkboxInput.ts +25 -0
  44. package/src/recipes/chip.ts +35 -37
  45. package/src/recipes/code.ts +4 -4
  46. package/src/recipes/datePicker.ts +212 -0
  47. package/src/recipes/divider.ts +38 -32
  48. package/src/recipes/formField.ts +41 -23
  49. package/src/recipes/highlightText.ts +14 -0
  50. package/src/recipes/icon.ts +13 -0
  51. package/src/recipes/list.ts +14 -0
  52. package/src/recipes/listItem.ts +310 -0
  53. package/src/recipes/listItemGroup.ts +62 -0
  54. package/src/recipes/menu.ts +90 -163
  55. package/src/recipes/modal.ts +55 -25
  56. package/src/recipes/radio.ts +29 -20
  57. package/src/recipes/radioInput.ts +25 -0
  58. package/src/recipes/recipes-regular.ts +14 -0
  59. package/src/recipes/recipes-slot.ts +19 -0
  60. package/src/recipes/select.ts +1 -1
  61. package/src/recipes/spinner.ts +49 -23
  62. package/src/recipes/tag.ts +80 -84
  63. package/src/recipes/text.ts +18 -10
  64. package/src/recipes/textInput.ts +205 -0
  65. package/src/recipes/textarea.ts +65 -138
  66. package/src/recipes/themeSwitcher.ts +3 -3
  67. package/src/recipes/timePicker.ts +199 -0
  68. package/src/recipes/toggle.ts +72 -99
  69. package/src/recipes/toggleInput.ts +26 -0
  70. package/src/recipes/tooltip.ts +52 -343
  71. package/src/styles/index.css +1 -1
  72. package/src/styles/primitives/borders.ts +7 -1
  73. package/src/styles/primitives/colors.ts +51 -0
  74. package/src/styles/primitives/fontSizes.ts +1 -0
  75. package/src/styles/primitives/index.ts +2 -1
  76. package/src/styles/primitives/shadows.ts +28 -37
  77. package/src/styles/primitives/sizes.ts +1 -0
  78. package/src/styles/primitives/zIndex.ts +17 -0
  79. package/src/styles/semantics/colors.ts +137 -82
  80. package/src/styles/semantics/index.ts +1 -0
  81. package/src/styles/semantics/shadows.ts +27 -16
  82. package/src/styles/semantics/zIndex.ts +18 -0
  83. package/src/styles/utilities/breakpoints.ts +6 -6
  84. package/src/styles/utilities/index.ts +3 -0
  85. package/src/styles/utilities/textStyles.ts +70 -0
  86. package/src/utils/splitProps.ts +3 -3
  87. package/dist/preset-DCCViEDs.js.map +0 -1
  88. package/dist/styles/global.css +0 -148
  89. package/dist/styles/recipes/avatar.css +0 -185
  90. package/dist/styles/recipes/badge.css +0 -85
  91. package/dist/styles/recipes/breadcrumbs.css +0 -38
  92. package/dist/styles/recipes/button.css +0 -195
  93. package/dist/styles/recipes/card.css +0 -57
  94. package/dist/styles/recipes/checkbox-input.css +0 -12
  95. package/dist/styles/recipes/checkbox.css +0 -90
  96. package/dist/styles/recipes/chip.css +0 -137
  97. package/dist/styles/recipes/code.css +0 -12
  98. package/dist/styles/recipes/divider.css +0 -40
  99. package/dist/styles/recipes/form-field.css +0 -39
  100. package/dist/styles/recipes/heading.css +0 -40
  101. package/dist/styles/recipes/icon-button.css +0 -181
  102. package/dist/styles/recipes/label.css +0 -14
  103. package/dist/styles/recipes/link.css +0 -49
  104. package/dist/styles/recipes/menu.css +0 -141
  105. package/dist/styles/recipes/modal.css +0 -99
  106. package/dist/styles/recipes/pre.css +0 -16
  107. package/dist/styles/recipes/radio-input.css +0 -7
  108. package/dist/styles/recipes/radio.css +0 -82
  109. package/dist/styles/recipes/select.css +0 -103
  110. package/dist/styles/recipes/spinner.css +0 -36
  111. package/dist/styles/recipes/tag.css +0 -27
  112. package/dist/styles/recipes/text.css +0 -46
  113. package/dist/styles/recipes/textarea.css +0 -91
  114. package/dist/styles/recipes/textinput.css +0 -87
  115. package/dist/styles/recipes/theme-switcher.css +0 -53
  116. package/dist/styles/recipes/toggle-input.css +0 -12
  117. package/dist/styles/recipes/toggle.css +0 -125
  118. package/dist/styles/recipes/tooltip.css +0 -133
  119. package/dist/styles/recipes.css +0 -30
  120. package/dist/styles/reset.css +0 -1
  121. package/dist/styles/tokens.css +0 -1016
  122. package/dist/styles/utilities.css +0 -1694
  123. package/src/recipes/checkboxinput.ts +0 -15
  124. package/src/recipes/index.ts +0 -28
  125. package/src/recipes/radioinput.ts +0 -12
  126. package/src/recipes/textinput.ts +0 -100
  127. package/src/recipes/toggleinput.ts +0 -16
  128. package/src/utils/injectSprite.ts +0 -36
  129. package/src/utils/spriteContent.ts +0 -4
@@ -1,74 +1,66 @@
1
1
  import { defineRecipe } from '@pandacss/dev';
2
2
 
3
- const tagBase = {
4
- display: 'flex',
5
- py: '0',
6
- borderRadius: '2',
7
- gap: '1',
8
- h: '20',
9
- px: '4',
10
- fontFamily: 'sans',
11
- fontSize: '14',
12
- fontWeight: '500',
13
- whiteSpace: 'nowrap',
14
- width: 'fit-content',
15
- // lineHeight: 'none',
16
- };
17
-
18
- const tagVariant = {
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
- iconPosition: {
38
- left: {
39
- flexDirection: 'row',
40
- gap: '1',
41
- pl: '1',
20
+ variants: {
21
+ variant: {
22
+ default: {},
23
+ bold: {},
42
24
  },
43
- right: {
44
- flexDirection: 'row-reverse',
45
- gap: '1',
46
- pr: '1',
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
- hasIcon: {
50
- true: {},
51
- false: {
52
- px: 4,
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
- appearance: 'default',
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
- appearance: 'bold',
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
- appearance: 'default',
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
- appearance: 'bold',
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
- appearance: 'default',
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
- appearance: 'bold',
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
- appearance: 'default',
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
- appearance: 'bold',
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
- appearance: 'default',
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
- appearance: 'bold',
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
- appearance: 'default',
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
- appearance: 'bold',
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
- appearance: 'default',
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
- appearance: 'bold',
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
- appearance: 'default',
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
- appearance: 'bold',
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
- appearance: 'default',
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
- appearance: 'bold',
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
- appearance: 'default',
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
- appearance: 'bold',
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
- appearance: 'default',
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
- appearance: 'bold',
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
- appearance: 'default',
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
- appearance: 'bold',
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
  });
@@ -1,4 +1,5 @@
1
1
  import { defineRecipe } from '@pandacss/dev';
2
+
2
3
  import {
3
4
  fontSizes as fontSizeTokens,
4
5
  fontWeights as fontWeightTokens,
@@ -8,7 +9,7 @@ const textBase = {
8
9
  margin: '0',
9
10
  lineHeight: 'default',
10
11
  fontWeight: 'normal',
11
- fontSize: '16',
12
+ fontSize: '{sizes.16}',
12
13
  color: 'text.subtlest',
13
14
  maxWidth: 'prose',
14
15
  };
@@ -66,7 +67,7 @@ const textVariants = {
66
67
  whiteSpace: 'nowrap',
67
68
  },
68
69
  },
69
- allcaps: {
70
+ allCaps: {
70
71
  true: {
71
72
  textTransform: 'uppercase',
72
73
  fontWeight: 'bold',
@@ -91,7 +92,7 @@ const headingVariants = {
91
92
  h3: { textStyle: 'heading.sm' },
92
93
  h4: { textStyle: 'heading.xs' },
93
94
  },
94
- allcaps: {
95
+ allCaps: {
95
96
  true: {
96
97
  textTransform: 'uppercase',
97
98
  letterSpacing: 'widest',
@@ -104,19 +105,26 @@ const linkBase = {
104
105
  alignItems: 'center',
105
106
  fontWeight: 'medium',
106
107
  gap: '1',
107
- color: { base: 'blue.70', _dark: 'blue.40' },
108
+ color: 'link',
109
+ textDecoration: 'none',
108
110
  backgroundImage: 'linear-gradient(90deg, transparent 0% 100%)',
109
- backgroundSize: '100% 1px',
111
+ backgroundSize: '100% {sizes.1}',
110
112
  backgroundRepeat: 'no-repeat',
111
113
  backgroundPositionY: '100%',
114
+ outlineWidth: '2',
115
+ outlineStyle: 'solid',
116
+ outlineColor: 'transparent',
117
+ outlineOffset: '1',
112
118
  width: 'fit-content',
113
119
  cursor: 'pointer',
114
- textDecoration: 'none',
115
120
  _hover: {
116
- color: { base: 'blue.60', _dark: 'blue.40' },
117
- backgroundColor: { base: 'blue.10', _dark: 'blue.100' },
121
+ color: 'link',
118
122
  backgroundImage: 'linear-gradient(90deg, currentColor 0% 100%)',
119
123
  },
124
+ _focusVisible: {
125
+ borderRadius: '{sizes.4}',
126
+ outlineColor: 'border.focused',
127
+ },
120
128
  'p &': {
121
129
  backgroundImage: 'linear-gradient(90deg, currentColor 0% 100%)',
122
130
  },
@@ -134,13 +142,13 @@ const linkVariants = {
134
142
  };
135
143
 
136
144
  const labelBase = {
137
- fontSize: '14',
145
+ fontSize: '{sizes.16}',
138
146
  fontWeight: 'normal',
139
147
  lineHeight: 'tight',
140
148
  cursor: 'default',
149
+ color: 'text',
141
150
  };
142
151
 
143
- //Copied linkvarients, don't have styles defined for this yet
144
152
  const labelVariants = {
145
153
  ...textVariants,
146
154
  _disabled: {
@@ -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
+ });