@latte-macchiat-io/latte-vanilla-components 0.0.502 → 0.0.504

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.502",
3
+ "version": "0.0.504",
4
4
  "description": "Beautiful components for amazing projects, with a touch of Vanilla 🥤",
5
5
  "type": "module",
6
6
  "main": "./src/index.ts",
@@ -9,7 +9,6 @@ import {
9
9
  collapseExpandItemOpen,
10
10
  collapseExpandItemTitle,
11
11
  collapseExpandTitleIcon,
12
- collapseExpandTitleIconMinWidthVar,
13
12
  } from './styles.css';
14
13
 
15
14
  import { themeContract } from '../../../theme/contract.css';
@@ -20,7 +19,7 @@ import { Paragraph } from '../../Paragraph';
20
19
 
21
20
  export type ExpandCollapseItems = {
22
21
  title: string;
23
- text: string;
22
+ text: React.ReactNode;
24
23
  };
25
24
 
26
25
  export type ExpandCollapseItemsProps = ExpandCollapseItems & {
@@ -48,9 +47,6 @@ export const ExpandCollapseItem = ({ title, text, icon }: ExpandCollapseItemsPro
48
47
  className={collapseExpandTitleIcon}
49
48
  iconPath={icon?.path || icons.caret}
50
49
  color={themeContract.expandCollapse.item.title.icon.color || themeContract.icon.color}
51
- style={{
52
- [collapseExpandTitleIconMinWidthVar]: `${icon?.size || 20}px`,
53
- }}
54
50
  />
55
51
  <Heading as="h3" size="sm">
56
52
  {title}
@@ -1,4 +1,4 @@
1
- import { createVar, globalStyle, style } from '@vanilla-extract/css';
1
+ import { globalStyle, style } from '@vanilla-extract/css';
2
2
 
3
3
  import { themeContract } from '../../../theme/contract.css';
4
4
  import { generateResponsiveMedia } from '../../../utils/generateResponsiveMedia';
@@ -40,12 +40,9 @@ export const collapseExpandItemTitle = style({
40
40
  }),
41
41
  });
42
42
 
43
- export const collapseExpandTitleIconMinWidthVar = createVar();
44
-
45
43
  export const collapseExpandTitleIcon = style({
46
44
  margin: 0,
47
45
  transition: 'transform 0.3s ease-out',
48
- minWidth: collapseExpandTitleIconMinWidthVar,
49
46
 
50
47
  '@media': generateResponsiveMedia({
51
48
  marginTop: themeContract.expandCollapse.item.title.icon.marginTop,
@@ -1,6 +1,6 @@
1
1
  import path from './path';
2
2
 
3
- import { iconRecipe } from './style.css';
3
+ import { iconMinWidthVar, iconRecipe } from './style.css';
4
4
 
5
5
  import { themeContract } from '../../theme/contract.css';
6
6
  import { cn } from '../../utils/styleOverride';
@@ -21,7 +21,10 @@ export const Icon = ({ icon = '', className, size = 24, iconPath = '', viewBox =
21
21
  viewBox={viewBox}
22
22
  className={cn(iconRecipe, className)}
23
23
  width={typeof size === 'number' ? `${size}px` : size}
24
- height={typeof size === 'number' ? `${size}px` : size}>
24
+ height={typeof size === 'number' ? `${size}px` : size}
25
+ style={{
26
+ [iconMinWidthVar]: typeof size === 'number' ? `${size}px` : size,
27
+ }}>
25
28
  <path d={d} fill={color} />
26
29
  </svg>
27
30
  );
@@ -1,9 +1,12 @@
1
- import { style } from '@vanilla-extract/css';
1
+ import { createVar, style } from '@vanilla-extract/css';
2
+
3
+ export const iconMinWidthVar = createVar();
2
4
 
3
5
  export const iconRecipe = style({
4
6
  margin: '0 auto',
5
7
  display: 'inline-block',
6
8
  verticalAlign: 'middle',
9
+ minWidth: iconMinWidthVar,
7
10
  });
8
11
 
9
12
  export const iconPath = style({