@latte-macchiat-io/latte-vanilla-components 0.0.554 → 0.0.555
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/package.json +1 -1
- package/src/components/Box/styles.css.ts +0 -2
- package/src/components/Form/TextField/Input/export.tsx +0 -1
- package/src/components/Form/TextField/Input/styles.css.ts +1 -2
- package/src/components/Form/TextField/Label/export.tsx +0 -1
- package/src/components/Form/TextField/Label/index.tsx +7 -7
- package/src/components/Form/TextField/Label/styles.css.ts +1 -3
- package/src/components/Form/TextField/Textarea/export.tsx +0 -1
- package/src/components/Form/TextField/Textarea/styles.css.ts +1 -2
- package/src/components/Form/TextField/export.tsx +0 -1
- package/src/components/Form/TextField/styles.css.ts +1 -2
- package/src/utils/CleanRecipeVariantsType.ts +0 -12
package/package.json
CHANGED
|
@@ -162,7 +162,5 @@ export const boxContent = recipe({
|
|
|
162
162
|
},
|
|
163
163
|
});
|
|
164
164
|
|
|
165
|
-
// export type BoxVariants = NonNullable<CleanRecipeVariants<RecipeVariants<typeof box>>>;
|
|
166
|
-
// export type BoxContentVariants = NonNullable<CleanRecipeVariants<RecipeVariants<typeof boxContent>>>;
|
|
167
165
|
export type BoxVariants = RecipeVariants<typeof box>;
|
|
168
166
|
export type BoxContentVariants = RecipeVariants<typeof boxContent>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { recipe
|
|
1
|
+
import { recipe } from '@vanilla-extract/recipes';
|
|
2
2
|
|
|
3
3
|
import { generateResponsiveMedia } from '../../../../styles/utils/generateResponsiveMedia';
|
|
4
4
|
import { themeContract } from '../../../../theme/contract.css';
|
|
@@ -35,4 +35,3 @@ export const inputRecipe = recipe(
|
|
|
35
35
|
'input'
|
|
36
36
|
);
|
|
37
37
|
|
|
38
|
-
export type InputVariants = RecipeVariants<typeof inputRecipe>;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { labelRecipe
|
|
1
|
+
import { labelRecipe } from './styles.css';
|
|
2
2
|
import { cn } from '../../../../utils/styleOverride';
|
|
3
3
|
|
|
4
|
-
export type LabelProps =
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
export type LabelProps = {
|
|
5
|
+
name: string;
|
|
6
|
+
label: string;
|
|
7
|
+
required: boolean;
|
|
8
|
+
className?: string;
|
|
9
|
+
};
|
|
10
10
|
|
|
11
11
|
export const Label = ({ label, name, required, className }: LabelProps) => (
|
|
12
12
|
<label htmlFor={name} className={cn(labelRecipe(), className)}>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { recipe
|
|
1
|
+
import { recipe } from '@vanilla-extract/recipes';
|
|
2
2
|
|
|
3
3
|
export const labelRecipe = recipe(
|
|
4
4
|
{
|
|
@@ -9,5 +9,3 @@ export const labelRecipe = recipe(
|
|
|
9
9
|
},
|
|
10
10
|
'text-field-label'
|
|
11
11
|
);
|
|
12
|
-
|
|
13
|
-
export type LabelVariants = RecipeVariants<typeof labelRecipe>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { recipe
|
|
1
|
+
import { recipe } from '@vanilla-extract/recipes';
|
|
2
2
|
|
|
3
3
|
import { generateResponsiveMedia } from '../../../../styles/utils/generateResponsiveMedia';
|
|
4
4
|
import { themeContract } from '../../../../theme/contract.css';
|
|
@@ -37,4 +37,3 @@ export const textareaRecipe = recipe(
|
|
|
37
37
|
'text-area'
|
|
38
38
|
);
|
|
39
39
|
|
|
40
|
-
export type TextareaVariants = RecipeVariants<typeof textareaRecipe>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { style } from '@vanilla-extract/css';
|
|
2
|
-
import { recipe
|
|
2
|
+
import { recipe } from '@vanilla-extract/recipes';
|
|
3
3
|
import { themeContract } from '../../../theme/contract.css';
|
|
4
4
|
|
|
5
5
|
const textFieldBase = style({
|
|
@@ -29,4 +29,3 @@ export const textFieldRecipe = recipe(
|
|
|
29
29
|
);
|
|
30
30
|
|
|
31
31
|
export { messageContainer, errorMessage };
|
|
32
|
-
export type TextFieldVariants = RecipeVariants<typeof textFieldRecipe>;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Utility type that normalizes Vanilla Extract's RecipeVariants by removing
|
|
3
|
-
* optional keys and filtering out `undefined` from both the variant object
|
|
4
|
-
* and its individual properties.
|
|
5
|
-
*
|
|
6
|
-
* Ensures that variants become strictly typed, fully defined, and safe to use
|
|
7
|
-
* in Storybook controls and component props.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
export type CleanRecipeVariants<T> = NonNullable<{
|
|
11
|
-
[K in keyof T]-?: Exclude<T[K], undefined>;
|
|
12
|
-
}>;
|