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

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.226",
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({
@@ -162,8 +163,6 @@ export const closeButton = style([
162
163
  export const pauseButton = style([
163
164
  controlButton,
164
165
  {
165
- right: '80px',
166
-
167
166
  bottom: themeContract.space.md,
168
167
  border: themeContract.video.pauseButton.border,
169
168
  color: themeContract.video.pauseButton.iconColor,
@@ -174,6 +173,7 @@ export const pauseButton = style([
174
173
  ...generateResponsiveMedia({
175
174
  width: themeContract.video.pauseButton.width,
176
175
  height: themeContract.video.pauseButton.height,
176
+ right: addPixelsToBreakpoints(themeContract.video.pauseButton.width, 20),
177
177
  }),
178
178
  },
179
179
  },
@@ -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
+ }