@latte-macchiat-io/latte-vanilla-components 0.0.196 → 0.0.198

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.196",
3
+ "version": "0.0.198",
4
4
  "description": "Beautiful components for amazing projects, with a touch of Vanilla 🥤",
5
5
  "type": "module",
6
6
  "main": "./src/index.ts",
@@ -1,5 +1,3 @@
1
- 'use client';
2
-
3
1
  import { clsx } from 'clsx';
4
2
  import { forwardRef } from 'react';
5
3
 
@@ -1,6 +1,6 @@
1
1
  import type { Meta, StoryObj } from '@storybook/react-vite';
2
2
 
3
- import { Footer } from '../../index';
3
+ import { Footer } from './index';
4
4
 
5
5
  // More on how to set up stories at: https://storybook.js.org/docs/writing-stories#default-export
6
6
  const meta: Meta<typeof Footer> = {
@@ -2,14 +2,14 @@ import { assignInlineVars } from '@vanilla-extract/dynamic';
2
2
  import { useEffect } from 'react';
3
3
 
4
4
  import { headerOverlayStyle, vars } from './styles.css';
5
- import { WithClassName } from '../../../types/withClassName';
6
5
 
7
6
  export interface HeaderOverlayProps {
7
+ css?: string;
8
8
  isOpen: boolean;
9
9
  children: React.ReactNode;
10
10
  }
11
11
 
12
- const HeaderOverlay = ({ isOpen = false, children, className }: HeaderOverlayProps & WithClassName) => {
12
+ const HeaderOverlay = ({ isOpen = false, children, css }: HeaderOverlayProps) => {
13
13
  useEffect(() => {
14
14
  const html = document.getElementsByTagName('html')[0];
15
15
  html.style.overflow = '';
@@ -19,7 +19,7 @@ const HeaderOverlay = ({ isOpen = false, children, className }: HeaderOverlayPro
19
19
 
20
20
  return (
21
21
  <div
22
- className={`${headerOverlayStyle} ${className}`}
22
+ className={`${headerOverlayStyle} ${css}`}
23
23
  style={assignInlineVars({
24
24
  [vars.overlayBottom]: !isOpen ? '100%' : '-100vh',
25
25
  [vars.overlayTransform]: isOpen ? 'translate(0, 0)' : 'translate(0, -100%)',
@@ -1,14 +1,14 @@
1
1
  import { assignInlineVars } from '@vanilla-extract/dynamic';
2
2
  import { toggleNavBarStyle, toggleNavStyle, vars } from './styles.css';
3
- import { WithClassName } from '../../../types/withClassName';
4
3
 
5
4
  export type ToggleNavProps = {
5
+ css?: string;
6
6
  isNavOpen: boolean;
7
7
  onToggleNav: () => void;
8
8
  displayOnDesktop: boolean;
9
9
  };
10
10
 
11
- export const ToggleNav = ({ isNavOpen = false, onToggleNav, displayOnDesktop, className }: ToggleNavProps & WithClassName) => {
11
+ export const ToggleNav = ({ isNavOpen = false, onToggleNav, displayOnDesktop, css }: ToggleNavProps) => {
12
12
  const handleClick = () => {
13
13
  window.scrollTo({ top: 0, behavior: 'smooth' });
14
14
  onToggleNav();
@@ -16,7 +16,7 @@ export const ToggleNav = ({ isNavOpen = false, onToggleNav, displayOnDesktop, cl
16
16
 
17
17
  return (
18
18
  <button
19
- className={`${toggleNavStyle} ${className}`}
19
+ className={`${toggleNavStyle} ${css}`}
20
20
  style={assignInlineVars({
21
21
  [vars.displayOnDesktop]: displayOnDesktop ? 'block' : 'none',
22
22
  })}
@@ -1,8 +1,7 @@
1
1
  import { style } from '@vanilla-extract/css';
2
2
  import { recipe, RecipeVariants } from '@vanilla-extract/recipes';
3
-
4
- import { sprinkles } from '../../../styles/sprinkles.css';
5
- import { themeContract } from '../../../theme/contract.css';
3
+ import { sprinkles } from '../../styles/sprinkles.css';
4
+ import { themeContract } from '../../theme/contract.css';
6
5
 
7
6
  export const headingRecipe = recipe({
8
7
  base: style({
@@ -176,10 +176,10 @@ export const HeroSection: Story = {
176
176
  Build amazing applications with our comprehensive component library. Get started in minutes and scale to millions of users.
177
177
  </p>
178
178
  <div style={{ display: 'flex', gap: '1rem', flexWrap: 'wrap', justifyContent: 'center' }}>
179
- <Button variant="secondary" size="lg">
179
+ <Button variant="primary" size="lg">
180
180
  Get Started Free
181
181
  </Button>
182
- <Button variant="ghost" size="lg" style={{ borderColor: 'white', color: 'white' }}>
182
+ <Button variant="secondary" size="lg">
183
183
  Watch Demo
184
184
  </Button>
185
185
  </div>
@@ -275,7 +275,7 @@ export const CallToActionSection: Story = {
275
275
  <Button variant="primary" size="lg">
276
276
  Start Building
277
277
  </Button>
278
- <Button variant="ghost" size="lg" style={{ borderColor: 'white', color: 'white' }}>
278
+ <Button variant="secondary" size="lg">
279
279
  View Documentation
280
280
  </Button>
281
281
  </div>
@@ -1,11 +1,11 @@
1
1
  import { style } from '@vanilla-extract/css';
2
- import { themeContract } from '../../../theme/contract.css';
2
+ import { themeContract } from '../../theme/contract.css';
3
3
 
4
4
  export const testStyle = style({
5
- padding: themeContract.space.large,
5
+ padding: themeContract.space.lg,
6
6
  backgroundColor: themeContract.colors.primary,
7
7
  color: themeContract.colors.text,
8
- borderRadius: themeContract.radii.medium,
9
- margin: themeContract.space.medium,
8
+ borderRadius: themeContract.radii.md,
9
+ margin: themeContract.space.md,
10
10
  border: `2px solid ${themeContract.colors.border}`,
11
- });
11
+ });
package/src/index.ts CHANGED
@@ -24,6 +24,8 @@ export { Nav, type NavProps } from './components/Nav';
24
24
 
25
25
  export { Icon, type IconProps } from './components/Icon';
26
26
 
27
+ export { Heading, type HeadingProps } from './components/Heading';
28
+
27
29
  export { Modal, type ModalProps } from './components/Modal';
28
30
  export { type ModalVariants } from './components/Modal/styles.css';
29
31