@latte-macchiat-io/latte-vanilla-components 0.0.295 → 0.0.297

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@latte-macchiat-io/latte-vanilla-components",
3
- "version": "0.0.295",
3
+ "version": "0.0.297",
4
4
  "description": "Beautiful components for amazing projects, with a touch of Vanilla 🥤",
5
5
  "type": "module",
6
6
  "main": "./src/index.ts",
@@ -1,28 +1,29 @@
1
+ import { globalStyle, style } from '@vanilla-extract/css';
1
2
  import { recipe, RecipeVariants } from '@vanilla-extract/recipes';
2
3
  import { queries } from '../../styles/mediaqueries';
3
4
  import { themeContract } from '../../theme/contract.css';
4
5
  import { generateResponsiveMedia } from '../../utils/generateResponsiveMedia';
5
6
 
7
+ export const columnsBase = style({
8
+ display: 'grid',
9
+ width: '100%',
10
+ gridTemplateColumns: '1fr', // Mobile : une seule colonne
11
+
12
+ '@media': {
13
+ ...generateResponsiveMedia({
14
+ gap: themeContract.columns.gap,
15
+ }),
16
+
17
+ [queries.sm]: {
18
+ gridAutoFlow: 'row',
19
+ gridTemplateColumns: 'var(--columns)', // desktop : prend la variable CSS
20
+ },
21
+ },
22
+ });
23
+
6
24
  export const columnsRecipe = recipe(
7
25
  {
8
- base: [
9
- {
10
- display: 'grid',
11
- width: '100%',
12
- gridTemplateColumns: '1fr', // Mobile : une seule colonne
13
-
14
- '@media': {
15
- ...generateResponsiveMedia({
16
- gap: themeContract.columns.gap,
17
- }),
18
-
19
- [queries.sm]: {
20
- gridAutoFlow: 'row',
21
- gridTemplateColumns: 'var(--columns)', // desktop : prend la variable CSS
22
- },
23
- },
24
- },
25
- ],
26
+ base: [columnsBase],
26
27
 
27
28
  variants: {
28
29
  align: {
@@ -45,4 +46,12 @@ export const columnsRecipe = recipe(
45
46
  'columns'
46
47
  );
47
48
 
49
+ globalStyle(`${columnsBase} > div`, {
50
+ '@media': {
51
+ ...generateResponsiveMedia({
52
+ gap: themeContract.columns.gap,
53
+ }),
54
+ },
55
+ });
56
+
48
57
  export type ColumnsVariants = RecipeVariants<typeof columnsRecipe>;