@kalink-ui/seedly 0.32.0 → 0.32.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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @kalink-ui/seedly
2
2
 
3
+ ## 0.32.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 9d3abfd: Add proper styling solution for Input component
8
+
3
9
  ## 0.32.0
4
10
 
5
11
  ### Minor Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kalink-ui/seedly",
3
- "version": "0.32.0",
3
+ "version": "0.32.1",
4
4
  "description": "A set of components for building UIs with React and TypeScript",
5
5
  "sideEffects": false,
6
6
  "license": "MIT",
@@ -1,26 +1,30 @@
1
- import { style, globalStyle, createGlobalTheme } from '@vanilla-extract/css';
1
+ import {
2
+ style,
3
+ globalStyle,
4
+ createThemeContract,
5
+ assignVars,
6
+ fallbackVar,
7
+ } from '@vanilla-extract/css';
2
8
  import { recipe, RecipeVariants } from '@vanilla-extract/recipes';
3
9
 
4
10
  import { sys, transition, typography } from '../../styles';
5
11
  import { components } from '../../styles/layers.css';
12
+ import { formFieldVars } from '../form-field';
6
13
 
7
- export const inputVars = createGlobalTheme(':root', {
8
- '@layer': components,
9
-
14
+ export const inputVars = createThemeContract({
10
15
  color: {
11
- foreground: 'inherit',
12
- background: sys.color.background,
13
- outline: sys.color.foreground,
14
- error: 'red',
16
+ foreground: null,
17
+ background: null,
18
+ outline: null,
15
19
  },
16
20
 
17
21
  spacing: {
18
- block: sys.spacing[2],
19
- inline: sys.spacing[4],
22
+ block: null,
23
+ inline: null,
20
24
  },
21
25
 
22
26
  shape: {
23
- corner: sys.shape.corner.none,
27
+ corner: null,
24
28
  },
25
29
  });
26
30
 
@@ -34,7 +38,7 @@ export const inputAppearance = recipe({
34
38
 
35
39
  color: inputVars.color.foreground,
36
40
 
37
- backgroundColor: 'transparent',
41
+ backgroundColor: inputVars.color.background,
38
42
  borderRadius: inputVars.shape.corner,
39
43
 
40
44
  cursor: 'inherit',
@@ -63,17 +67,39 @@ export const inputAppearance = recipe({
63
67
 
64
68
  '&[aria-invalid], &:has([aria-invalid])': {
65
69
  vars: {
66
- [inputVars.color.foreground]: 'red',
70
+ [inputVars.color.foreground]: fallbackVar(
71
+ formFieldVars.color.foreground,
72
+ 'red',
73
+ ),
67
74
  },
68
75
  },
69
76
  },
70
77
 
71
78
  vars: {
72
- [inputVars.color.foreground]: sys.color.foreground,
73
- [inputVars.color.background]: sys.color.background,
74
- [inputVars.color.outline]: inputVars.color.foreground,
75
- [inputVars.spacing.block]: sys.spacing[2],
76
- [inputVars.spacing.inline]: sys.spacing[4],
79
+ ...assignVars(inputVars.color, {
80
+ foreground: fallbackVar(
81
+ formFieldVars.color.foreground,
82
+ sys.color.foreground,
83
+ ),
84
+ background: fallbackVar(
85
+ formFieldVars.color.background,
86
+ sys.color.background,
87
+ 'transparent',
88
+ ),
89
+ outline: fallbackVar(
90
+ formFieldVars.color.outline,
91
+ sys.color.foreground,
92
+ ),
93
+ }),
94
+
95
+ ...assignVars(inputVars.spacing, {
96
+ block: sys.spacing[2],
97
+ inline: sys.spacing[4],
98
+ }),
99
+
100
+ ...assignVars(inputVars.shape, {
101
+ corner: sys.shape.corner.none,
102
+ }),
77
103
  },
78
104
  },
79
105
  },
@@ -127,8 +153,10 @@ export const inputAppearance = recipe({
127
153
  fontSize: `max(16px, ${sys.typography.body.small.size})`,
128
154
 
129
155
  vars: {
130
- [inputVars.spacing.block]: sys.spacing[1],
131
- [inputVars.spacing.inline]: sys.spacing[1],
156
+ ...assignVars(inputVars.spacing, {
157
+ block: sys.spacing[1],
158
+ inline: sys.spacing[1],
159
+ }),
132
160
  },
133
161
  },
134
162
  },
@@ -146,8 +174,10 @@ export const inputAppearance = recipe({
146
174
  fontSize: `max(16px, ${sys.typography.body.medium.size})`,
147
175
 
148
176
  vars: {
149
- [inputVars.spacing.block]: sys.spacing[2],
150
- [inputVars.spacing.inline]: sys.spacing[2],
177
+ ...assignVars(inputVars.spacing, {
178
+ block: sys.spacing[2],
179
+ inline: sys.spacing[2],
180
+ }),
151
181
  },
152
182
  },
153
183
  },
@@ -165,8 +195,10 @@ export const inputAppearance = recipe({
165
195
  fontSize: `max(16px, ${sys.typography.body.large.size})`,
166
196
 
167
197
  vars: {
168
- [inputVars.spacing.block]: sys.spacing[3],
169
- [inputVars.spacing.inline]: sys.spacing[3],
198
+ ...assignVars(inputVars.spacing, {
199
+ block: sys.spacing[3],
200
+ inline: sys.spacing[3],
201
+ }),
170
202
  },
171
203
  },
172
204
  },
@@ -217,7 +249,6 @@ export const input = style({
217
249
  paddingBottom: 0,
218
250
 
219
251
  color: 'inherit',
220
-
221
252
  border: 'none',
222
253
  backgroundColor: 'transparent',
223
254
  cursor: 'inherit',