@kalink-ui/seedly 0.30.1 → 0.31.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/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @kalink-ui/seedly
2
2
 
3
+ ## 0.31.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 0afb723: feat(seedly/form-field): switch to theme contract and export vars
8
+ - Replace createGlobalTheme with createThemeContract + assignVars for FormField.
9
+ - Export formFieldVars from the FormField module's index for external theming.
10
+
3
11
  ## 0.30.1
4
12
 
5
13
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kalink-ui/seedly",
3
- "version": "0.30.1",
3
+ "version": "0.31.0",
4
4
  "description": "A set of components for building UIs with React and TypeScript",
5
5
  "sideEffects": false,
6
6
  "license": "MIT",
@@ -43,8 +43,8 @@
43
43
  "vite": "^6.3.5",
44
44
  "vite-tsconfig-paths": "^5.1.4",
45
45
  "vitest": "^3.2.3",
46
- "@kalink-ui/typescript-config": "0.4.0",
47
- "@kalink-ui/eslint-config": "0.10.0"
46
+ "@kalink-ui/eslint-config": "0.10.0",
47
+ "@kalink-ui/typescript-config": "0.4.0"
48
48
  },
49
49
  "peerDependencies": {
50
50
  "@vanilla-extract/css": "^1.17.1",
@@ -1,20 +1,18 @@
1
- import { createGlobalTheme, style } from '@vanilla-extract/css';
1
+ import { assignVars, createThemeContract, style } from '@vanilla-extract/css';
2
2
  import { recipe, RecipeVariants } from '@vanilla-extract/recipes';
3
3
 
4
4
  import { sys, typography } from '../../styles';
5
5
  import { components } from '../../styles/layers.css';
6
6
 
7
- export const formFieldVars = createGlobalTheme(':root', {
8
- '@layer': components,
9
-
7
+ export const formFieldVars = createThemeContract({
10
8
  spacing: {
11
- vertical: sys.spacing[2],
9
+ vertical: null,
12
10
  },
13
11
 
14
12
  color: {
15
- foreground: sys.color.foreground,
16
- background: sys.color.background,
17
- outline: sys.color.foreground,
13
+ foreground: null,
14
+ background: null,
15
+ outline: null,
18
16
  },
19
17
  });
20
18
 
@@ -31,6 +29,18 @@ export const formFieldStyle = recipe({
31
29
 
32
30
  color: formFieldVars.color.foreground,
33
31
 
32
+ vars: {
33
+ ...assignVars(formFieldVars.color, {
34
+ foreground: sys.color.foreground,
35
+ background: sys.color.background,
36
+ outline: sys.color.foreground,
37
+ }),
38
+
39
+ ...assignVars(formFieldVars.spacing, {
40
+ vertical: sys.spacing[2],
41
+ }),
42
+ },
43
+
34
44
  selectors: {
35
45
  '&:disabled, &:has(:disabled)': {
36
46
  cursor: 'not-allowed',
@@ -1,6 +1,6 @@
1
1
  export { useFormFieldContext } from './form-field-context';
2
2
  export { useFormFieldItemContext } from './form-field-item-context';
3
- export { formFieldStyle } from './form-field.css';
3
+ export { formFieldStyle, formFieldVars } from './form-field.css';
4
4
  export { FormFieldControl } from './form-field-control';
5
5
  export { FormFieldDescription } from './form-field-description';
6
6
  export { FormFieldError } from './form-field-error';