@latte-macchiat-io/latte-vanilla-components 0.0.216 → 0.0.218

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.216",
3
+ "version": "0.0.218",
4
4
  "description": "Beautiful components for amazing projects, with a touch of Vanilla 🥤",
5
5
  "type": "module",
6
6
  "main": "./src/index.ts",
@@ -3,7 +3,7 @@ import { clsx } from 'clsx';
3
3
  import { bar, toggleNavButton } from './styles.css';
4
4
 
5
5
  export type HeaderToggleNavProps = {
6
- isOpen: boolean;
6
+ isOpen?: boolean;
7
7
  };
8
8
 
9
9
  export const HeaderToggleNav = ({ isOpen }: HeaderToggleNavProps) => {
@@ -1,4 +1,5 @@
1
1
  import { style } from '@vanilla-extract/css';
2
+ import { calc } from '@vanilla-extract/css-utils';
2
3
  import { recipe, type RecipeVariants } from '@vanilla-extract/recipes';
3
4
 
4
5
  import { themeContract } from '../../theme/contract.css';
@@ -67,6 +68,14 @@ export const sectionRecipe = recipe({
67
68
  justifyContent: 'flex-start',
68
69
  },
69
70
  },
71
+ isHeaderFixed: {
72
+ true: {
73
+ // minHeight: calc.subtract('100vh', themeContract.header.height),
74
+ },
75
+ false: {
76
+ minHeight: '100vh',
77
+ },
78
+ },
70
79
  withPaddingTop: {
71
80
  true: {
72
81
  '@media': {
@@ -0,0 +1 @@
1
+ export { ThemeToggle, type ThemeToggleProps } from './';
@@ -1,8 +1,13 @@
1
1
  'use client';
2
2
 
3
+ import clsx from 'clsx';
3
4
  import { useEffect, useState } from 'react';
4
5
 
5
- export function ThemeToggle() {
6
+ import { themeToggleRecipe } from './styles.css';
7
+
8
+ export type ThemeToggleProps = React.HTMLAttributes<HTMLDivElement> & {};
9
+
10
+ export const ThemeToggle = ({ className }: ThemeToggleProps) => {
6
11
  const [theme, setTheme] = useState<'light' | 'dark'>('light');
7
12
 
8
13
  useEffect(() => {
@@ -23,8 +28,8 @@ export function ThemeToggle() {
23
28
  };
24
29
 
25
30
  return (
26
- <button onClick={toggleTheme} aria-label="Toggle theme">
31
+ <button onClick={toggleTheme} aria-label="Toggle theme" className={clsx(themeToggleRecipe(), className)}>
27
32
  {theme === 'light' ? '🌙' : '☀️'}
28
33
  </button>
29
34
  );
30
- }
35
+ };
@@ -0,0 +1,11 @@
1
+ import { recipe } from '@vanilla-extract/recipes';
2
+
3
+ export const themeToggleRecipe = recipe({
4
+ base: [
5
+ {
6
+ border: 0,
7
+
8
+ '@media': {},
9
+ },
10
+ ],
11
+ });
package/src/index.ts CHANGED
@@ -19,6 +19,7 @@ export * from './components/Section/export';
19
19
  export * from './components/Main/export';
20
20
 
21
21
  export * from './components/Header/export';
22
+ export * from './components/Header/HeaderToggleNav/export';
22
23
  export * from './components/Footer/export';
23
24
 
24
25
  export * from './components/Nav/export';