@latte-macchiat-io/latte-vanilla-components 0.0.199 → 0.0.201

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.199",
3
+ "version": "0.0.201",
4
4
  "description": "Beautiful components for amazing projects, with a touch of Vanilla 🥤",
5
5
  "type": "module",
6
6
  "main": "./src/index.ts",
@@ -1,4 +1,2 @@
1
- // export { Actions } from '.';
2
- // export type { ActionsProps } from '.';
3
-
4
- // export { styles as ActionsStyles } from './styles.css';
1
+ export { Actions, type ActionsProps } from './';
2
+ export { type ActionsVariants } from './styles.css';
@@ -1,5 +1,3 @@
1
- 'use client';
2
-
3
1
  import { clsx } from 'clsx';
4
2
  import { forwardRef } from 'react';
5
3
 
@@ -7,14 +5,11 @@ import { actionsRecipe, type ActionsVariants } from './styles.css';
7
5
 
8
6
  export type ActionsProps = React.HTMLAttributes<HTMLDivElement> &
9
7
  ActionsVariants & {
10
- css?: string;
11
8
  children: React.ReactNode;
12
9
  };
13
10
 
14
- export const Actions = forwardRef<HTMLDivElement, ActionsProps>(({ align, direction, css, className, children }, ref) => (
15
- <div ref={ref} className={clsx(actionsRecipe({ align, direction }), css, className)}>
11
+ export const Actions = forwardRef<HTMLDivElement, ActionsProps>(({ align, direction, className, children }, ref) => (
12
+ <div ref={ref} className={clsx(actionsRecipe({ align, direction }), className)}>
16
13
  {children}
17
14
  </div>
18
15
  ));
19
-
20
- Actions.displayName = 'Actions';
@@ -0,0 +1,29 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-vite';
2
+ import React from 'react';
3
+
4
+ import { Actions } from '.';
5
+
6
+ // More on how to set up stories at: https://storybook.js.org/docs/writing-stories#default-export
7
+ const meta: Meta<typeof Actions> = {
8
+ title: 'Latte Components / 1. Global / Actions',
9
+ component: Actions,
10
+ parameters: {
11
+ // Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/configure/story-layout
12
+ layout: 'centered',
13
+ },
14
+ // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs
15
+ tags: ['autodocs'],
16
+ // More on argTypes: https://storybook.js.org/docs/api/argtypes
17
+ argTypes: {},
18
+ // Use `fn` to spy on the onClick arg, which will appear in the actions panel once invoked: https://storybook.js.org/docs/essentials/actions#action-args
19
+ };
20
+
21
+ export default meta;
22
+ type Story = StoryObj<typeof meta>;
23
+
24
+ // More on writing stories with args: https://storybook.js.org/docs/writing-stories/args
25
+ export const Default: Story = {
26
+ args: {
27
+ children: <div>hello</div>,
28
+ },
29
+ };
@@ -35,6 +35,7 @@ export const actionsRecipe = recipe({
35
35
  justifyContent: 'flex-end',
36
36
  },
37
37
  },
38
+
38
39
  direction: {
39
40
  row: {
40
41
  flexDirection: 'row',
@@ -0,0 +1,40 @@
1
+ const themeActionsBase = {
2
+ actions: {
3
+ gap: {
4
+ mobile: '15px',
5
+ sm: '15px',
6
+ md: '30px',
7
+ lg: '30px',
8
+ xl: '50px',
9
+ '2xl': '50px',
10
+ },
11
+ paddingTop: {
12
+ mobile: '15px',
13
+ sm: '15px',
14
+ md: '30px',
15
+ lg: '30px',
16
+ xl: '50px',
17
+ '2xl': '50px',
18
+ },
19
+ paddingBottom: {
20
+ mobile: '15px',
21
+ sm: '15px',
22
+ md: '30px',
23
+ lg: '30px',
24
+ xl: '50px',
25
+ '2xl': '50px',
26
+ },
27
+ },
28
+ };
29
+
30
+ export const themeActionsLight = {
31
+ actions: {
32
+ ...themeActionsBase.actions,
33
+ },
34
+ };
35
+
36
+ export const themeActionsDark = {
37
+ actions: {
38
+ ...themeActionsBase.actions,
39
+ },
40
+ };
@@ -25,5 +25,3 @@ export const Button = forwardRef<HTMLButtonElement, ButtonProps>(
25
25
  );
26
26
  }
27
27
  );
28
-
29
- Button.displayName = 'Button';
@@ -227,5 +227,3 @@ export const Carousel = forwardRef<HTMLDivElement, CarouselProps>(
227
227
  );
228
228
  }
229
229
  );
230
-
231
- Carousel.displayName = 'Carousel';
@@ -32,5 +32,3 @@ export const Columns = forwardRef<HTMLDivElement, ColumnsProps>(({ align, vAlign
32
32
  </div>
33
33
  );
34
34
  });
35
-
36
- Columns.displayName = 'Columns';
@@ -198,5 +198,3 @@ export const ConsentCookie = forwardRef<HTMLDivElement, ConsentCookieProps>(
198
198
  );
199
199
  }
200
200
  );
201
-
202
- ConsentCookie.displayName = 'ConsentCookie';
@@ -15,5 +15,3 @@ export const Footer = forwardRef<HTMLDivElement, FooterProps>(({ children, css,
15
15
  </footer>
16
16
  );
17
17
  });
18
-
19
- Footer.displayName = 'Footer';
@@ -123,5 +123,3 @@ export const Form = forwardRef<HTMLFormElement, FormProps>(
123
123
  );
124
124
  }
125
125
  );
126
-
127
- Form.displayName = 'Form';
@@ -133,5 +133,3 @@ export const Row = forwardRef<HTMLDivElement, RowProps>(
133
133
  );
134
134
  }
135
135
  );
136
-
137
- Row.displayName = 'Row';
@@ -135,5 +135,3 @@ export const Input = forwardRef<HTMLInputElement, InputProps>(
135
135
  );
136
136
  }
137
137
  );
138
-
139
- Input.displayName = 'Input';
@@ -129,5 +129,3 @@ export const Label = forwardRef<HTMLLabelElement, LabelProps>(
129
129
  );
130
130
  }
131
131
  );
132
-
133
- Label.displayName = 'Label';
@@ -131,5 +131,3 @@ export const Textarea = forwardRef<HTMLTextAreaElement, TextareaProps>(
131
131
  );
132
132
  }
133
133
  );
134
-
135
- Textarea.displayName = 'Textarea';
@@ -49,5 +49,3 @@ export const Header = forwardRef<HTMLDivElement, HeaderProps>(
49
49
  );
50
50
  }
51
51
  );
52
-
53
- Header.displayName = 'Header';
@@ -47,5 +47,3 @@ export const KeyNumber = forwardRef<HTMLDivElement, KeyNumberProps>(
47
47
  );
48
48
  }
49
49
  );
50
-
51
- KeyNumber.displayName = 'KeyNumber';
@@ -76,5 +76,3 @@ export const LanguageSwitcher = forwardRef<HTMLDivElement, LanguageSwitcherProps
76
76
  );
77
77
  }
78
78
  );
79
-
80
- LanguageSwitcher.displayName = 'LanguageSwitcher';
@@ -38,5 +38,3 @@ export const Modal = forwardRef<HTMLDivElement, ModalProps>(({ triggerLabel, css
38
38
  </>
39
39
  );
40
40
  });
41
-
42
- Modal.displayName = 'Modal';
@@ -18,5 +18,3 @@ export const Nav = forwardRef<HTMLDivElement, NavProps>(({ children, css, classN
18
18
  </div>
19
19
  );
20
20
  });
21
-
22
- Nav.displayName = 'Nav';
@@ -13,5 +13,3 @@ export const NavLegal = forwardRef<HTMLDivElement, NavLegalProps>(({ css, classN
13
13
  {children}
14
14
  </div>
15
15
  ));
16
-
17
- NavLegal.displayName = 'NavLegal';
@@ -28,5 +28,3 @@ export const NavSocial = forwardRef<HTMLDivElement, NavSocialProps>(({ navSocial
28
28
  </div>
29
29
  );
30
30
  });
31
-
32
- NavSocial.displayName = 'NavSocial';
@@ -16,5 +16,3 @@ export const Section = forwardRef<HTMLElement, SectionProps>(
16
16
  </section>
17
17
  )
18
18
  );
19
-
20
- Section.displayName = 'Section';
@@ -1,7 +1,5 @@
1
1
  'use client';
2
2
 
3
- /* eslint-disable jsx-a11y/media-has-caption */
4
-
5
3
  import { clsx } from 'clsx';
6
4
  import { forwardRef, useEffect, useRef, useState } from 'react';
7
5
  import {
@@ -113,5 +111,3 @@ export const Video = forwardRef<HTMLDivElement, VideoProps>(
113
111
  );
114
112
  }
115
113
  );
116
-
117
- Video.displayName = 'Video';
package/src/index.ts CHANGED
@@ -10,6 +10,8 @@ export { breakpoints, queries } from './styles/mediaqueries';
10
10
  // Components
11
11
  export { ThemeToggle } from './components/ThemeToggle';
12
12
 
13
+ export * from './components/Actions/export';
14
+
13
15
  export { Button, type ButtonProps } from './components/Button';
14
16
  export { type ButtonVariants } from './components/Button/styles.css';
15
17
 
@@ -35,9 +37,6 @@ export { Logo, type LogoProps } from './components/Logo';
35
37
 
36
38
  export { Columns, type ColumnsProps } from './components/Columns';
37
39
 
38
- export { Actions, type ActionsProps } from './components/Actions';
39
- export { type ActionsVariants } from './components/Actions/styles.css';
40
-
41
40
  export { Carousel, type CarouselProps } from './components/Carousel';
42
41
  export { type CarouselVariants } from './components/Carousel/styles.css';
43
42
 
@@ -48,6 +47,7 @@ export { KeyNumber, type KeyNumberProps } from './components/KeyNumber';
48
47
  export { type KeyNumberVariants } from './components/KeyNumber/styles.css';
49
48
 
50
49
  export { NavSocial, type NavSocialProps } from './components/NavSocial';
50
+ export { type Social } from './components/NavSocial/types';
51
51
 
52
52
  export { NavLegal, type NavLegalProps } from './components/NavLegal';
53
53
 
@@ -1,3 +1,5 @@
1
+ import { themeActionsDark, themeActionsLight } from '../components/Actions/theme';
2
+
1
3
  // Base theme values that can be imported and extended by apps
2
4
  export const baseLightTheme = {
3
5
  colors: {
@@ -208,32 +210,7 @@ export const baseLightTheme = {
208
210
  },
209
211
  },
210
212
 
211
- actions: {
212
- gap: {
213
- mobile: '15px',
214
- sm: '15px',
215
- md: '30px',
216
- lg: '30px',
217
- xl: '50px',
218
- '2xl': '50px',
219
- },
220
- paddingTop: {
221
- mobile: '15px',
222
- sm: '15px',
223
- md: '30px',
224
- lg: '30px',
225
- xl: '50px',
226
- '2xl': '50px',
227
- },
228
- paddingBottom: {
229
- mobile: '15px',
230
- sm: '15px',
231
- md: '30px',
232
- lg: '30px',
233
- xl: '50px',
234
- '2xl': '50px',
235
- },
236
- },
213
+ ...themeActionsLight,
237
214
 
238
215
  button: {
239
216
  minWidth: '100',
@@ -980,32 +957,7 @@ export const baseDarkTheme = {
980
957
  color: '#FF7377',
981
958
  },
982
959
 
983
- actions: {
984
- gap: {
985
- mobile: '15px',
986
- sm: '15px',
987
- md: '30px',
988
- lg: '30px',
989
- xl: '50px',
990
- '2xl': '50px',
991
- },
992
- paddingTop: {
993
- mobile: '15px',
994
- sm: '15px',
995
- md: '30px',
996
- lg: '30px',
997
- xl: '50px',
998
- '2xl': '50px',
999
- },
1000
- paddingBottom: {
1001
- mobile: '15px',
1002
- sm: '15px',
1003
- md: '30px',
1004
- lg: '30px',
1005
- xl: '50px',
1006
- '2xl': '50px',
1007
- },
1008
- },
960
+ ...themeActionsDark,
1009
961
 
1010
962
  modal: {
1011
963
  border: 'none',