@latte-macchiat-io/latte-vanilla-components 0.0.501 → 0.0.503
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
|
@@ -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';
|
|
@@ -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 {
|
|
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';
|
|
@@ -49,11 +49,8 @@ export const collapseExpandTitleIcon = style({
|
|
|
49
49
|
}),
|
|
50
50
|
});
|
|
51
51
|
|
|
52
|
-
export const collapseExpandTitleIconMinWidthVar = createVar();
|
|
53
|
-
|
|
54
52
|
globalStyle(`${collapseExpandItemOpen} .${collapseExpandTitleIcon}`, {
|
|
55
53
|
transform: 'rotate(-90deg)',
|
|
56
|
-
minWidth: collapseExpandTitleIconMinWidthVar,
|
|
57
54
|
});
|
|
58
55
|
|
|
59
56
|
globalStyle(`${collapseExpandItemTitle} > h3`, {
|
|
@@ -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({
|