@latte-macchiat-io/latte-vanilla-components 0.0.197 → 0.0.199
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 +1 -1
- package/src/components/Footer/index.tsx +0 -2
- package/src/components/Footer/stories.tsx +1 -1
- package/src/components/Header/HeaderOverlay/index.tsx +3 -3
- package/src/components/Header/ToggleNav/index.tsx +3 -3
- package/src/components/Heading/styles.css.ts +2 -3
- package/src/components/Section/stories.tsx +3 -3
- package/src/components/ThemeTest/ThemeTest.css.ts +5 -5
- package/src/index.ts +3 -1
- /package/src/components/ThemeToggle/{ThemeToggle.tsx → index.tsx} +0 -0
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import type { Meta, StoryObj } from '@storybook/react-vite';
|
2
2
|
|
3
|
-
import { Footer } from '
|
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,
|
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} ${
|
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,
|
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} ${
|
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 {
|
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="
|
179
|
+
<Button variant="primary" size="lg">
|
180
180
|
Get Started Free
|
181
181
|
</Button>
|
182
|
-
<Button variant="
|
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="
|
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 '
|
2
|
+
import { themeContract } from '../../theme/contract.css';
|
3
3
|
|
4
4
|
export const testStyle = style({
|
5
|
-
padding: themeContract.space.
|
5
|
+
padding: themeContract.space.lg,
|
6
6
|
backgroundColor: themeContract.colors.primary,
|
7
7
|
color: themeContract.colors.text,
|
8
|
-
borderRadius: themeContract.radii.
|
9
|
-
margin: themeContract.space.
|
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
@@ -8,7 +8,9 @@ export { sprinkles, type Sprinkles } from './styles/sprinkles.css';
|
|
8
8
|
export { breakpoints, queries } from './styles/mediaqueries';
|
9
9
|
|
10
10
|
// Components
|
11
|
-
export {
|
11
|
+
export { ThemeToggle } from './components/ThemeToggle';
|
12
|
+
|
13
|
+
export { Button, type ButtonProps } from './components/Button';
|
12
14
|
export { type ButtonVariants } from './components/Button/styles.css';
|
13
15
|
|
14
16
|
export { Section, type SectionProps } from './components/Section';
|
File without changes
|