@latte-macchiat-io/latte-vanilla-components 0.0.225 → 0.0.227

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.225",
3
+ "version": "0.0.227",
4
4
  "description": "Beautiful components for amazing projects, with a touch of Vanilla 🥤",
5
5
  "type": "module",
6
6
  "main": "./src/index.ts",
@@ -4,6 +4,7 @@ import { recipe, RecipeVariants } from '@vanilla-extract/recipes';
4
4
 
5
5
  import { queries } from '../../styles/mediaqueries';
6
6
  import { themeContract } from '../../theme/contract.css';
7
+ import { addPixelsToBreakpoints } from '../../utils/addPixelsToBreakpoints';
7
8
  import { generateResponsiveMedia } from '../../utils/generateResponsiveMedia';
8
9
 
9
10
  export const videoRecipe = recipe({
@@ -119,6 +120,14 @@ export const playButton = style([
119
120
  opacity: 0,
120
121
  pointerEvents: 'none',
121
122
  },
123
+
124
+ '& svg': {
125
+ '@media': {
126
+ ...generateResponsiveMedia({
127
+ width: themeContract.video.playButton.iconSize,
128
+ }),
129
+ },
130
+ },
122
131
  },
123
132
 
124
133
  '@media': {
@@ -162,8 +171,6 @@ export const closeButton = style([
162
171
  export const pauseButton = style([
163
172
  controlButton,
164
173
  {
165
- right: '80px',
166
-
167
174
  bottom: themeContract.space.md,
168
175
  border: themeContract.video.pauseButton.border,
169
176
  color: themeContract.video.pauseButton.iconColor,
@@ -174,6 +181,7 @@ export const pauseButton = style([
174
181
  ...generateResponsiveMedia({
175
182
  width: themeContract.video.pauseButton.width,
176
183
  height: themeContract.video.pauseButton.height,
184
+ right: addPixelsToBreakpoints(themeContract.video.pauseButton.width, 20),
177
185
  }),
178
186
  },
179
187
  },
@@ -678,6 +678,14 @@ export const themeContract = createGlobalThemeContract({
678
678
  xl: 'latte-video-closeButton-height-xl',
679
679
  '2xl': 'latte-video-closeButton-height-2xl',
680
680
  },
681
+ iconSize: {
682
+ mobile: 'latte-video-playButton-iconSize-mobile',
683
+ sm: 'latte-video-playButton-iconSize-sm',
684
+ md: 'latte-video-playButton-iconSize-md',
685
+ lg: 'latte-video-playButton-iconSize-lg',
686
+ xl: 'latte-video-playButton-iconSize-xl',
687
+ '2xl': 'latte-video-playButton-iconSize-2xl',
688
+ },
681
689
  },
682
690
  pauseButton: {
683
691
  border: 'latte-video-pauseButton-border',
@@ -700,6 +708,14 @@ export const themeContract = createGlobalThemeContract({
700
708
  xl: 'latte-video-pauseButton-height-xl',
701
709
  '2xl': 'latte-video-pauseButton-height-2xl',
702
710
  },
711
+ iconSize: {
712
+ mobile: 'latte-video-pauseButton-iconSize-mobile',
713
+ sm: 'latte-video-pauseButton-iconSize-sm',
714
+ md: 'latte-video-pauseButton-iconSize-md',
715
+ lg: 'latte-video-pauseButton-iconSize-lg',
716
+ xl: 'latte-video-pauseButton-iconSize-xl',
717
+ '2xl': 'latte-video-pauseButton-iconSize-2xl',
718
+ },
703
719
  },
704
720
  soundButton: {
705
721
  border: 'latte-video-soundButton-border',
@@ -722,6 +738,14 @@ export const themeContract = createGlobalThemeContract({
722
738
  xl: 'latte-video-closeButton-height-xl',
723
739
  '2xl': 'latte-video-closeButton-height-2xl',
724
740
  },
741
+ iconSize: {
742
+ mobile: 'latte-video-soundButton-iconSize-mobile',
743
+ sm: 'latte-video-soundButton-iconSize-sm',
744
+ md: 'latte-video-soundButton-iconSize-md',
745
+ lg: 'latte-video-soundButton-iconSize-lg',
746
+ xl: 'latte-video-soundButton-iconSize-xl',
747
+ '2xl': 'latte-video-soundButton-iconSize-2xl',
748
+ },
725
749
  },
726
750
  closeButton: {
727
751
  border: 'latte-video-closeButton-border',
@@ -744,6 +768,14 @@ export const themeContract = createGlobalThemeContract({
744
768
  xl: 'latte-video-closeButton-height-xl',
745
769
  '2xl': 'latte-video-closeButton-height-2xl',
746
770
  },
771
+ iconSize: {
772
+ mobile: 'latte-video-closeButton-iconSize-mobile',
773
+ sm: 'latte-video-closeButton-iconSize-sm',
774
+ md: 'latte-video-closeButton-iconSize-md',
775
+ lg: 'latte-video-closeButton-iconSize-lg',
776
+ xl: 'latte-video-closeButton-iconSize-xl',
777
+ '2xl': 'latte-video-closeButton-iconSize-2xl',
778
+ },
747
779
  },
748
780
  },
749
781
  carousel: {
@@ -0,0 +1,5 @@
1
+ import { Breakpoints } from '../styles/mediaqueries';
2
+
3
+ export function addPixelsToBreakpoints(map: Record<Breakpoints, string>, pixels: number) {
4
+ return Object.fromEntries(Object.entries(map).map(([bp, value]) => [bp, `calc(${value} + ${pixels}px)`])) as Record<Breakpoints, string>;
5
+ }