@latte-macchiat-io/latte-vanilla-components 0.0.176 → 0.0.178

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.
Files changed (219) hide show
  1. package/package.json +9 -22
  2. package/src/assets/styles/mediaqueries.tsx +24 -0
  3. package/src/components/Actions/Actions.tsx +132 -0
  4. package/src/components/Actions/export.tsx +4 -0
  5. package/src/components/{Main/stories.ts → Actions/stories.tsx} +14 -13
  6. package/src/components/Button/Button.tsx +132 -0
  7. package/src/components/Button/export.tsx +5 -0
  8. package/src/components/Carousel/Carousel.tsx +328 -0
  9. package/src/components/Carousel/export.tsx +4 -0
  10. package/src/components/Columns/Columns.tsx +142 -0
  11. package/src/components/Columns/export.tsx +5 -0
  12. package/src/components/ConsentCookie/ConsentCookie.tsx +202 -0
  13. package/src/components/ConsentCookie/export.tsx +4 -0
  14. package/src/components/{Icon/stories.ts → ConsentCookie/stories.tsx} +7 -8
  15. package/src/components/Footer/Footer.tsx +130 -0
  16. package/src/components/Footer/export.tsx +4 -0
  17. package/src/components/Footer/stories.tsx +26 -0
  18. package/src/components/Form/Form.tsx +127 -0
  19. package/src/components/Form/Row/Row.tsx +137 -0
  20. package/src/components/Form/Row/stories.tsx +41 -0
  21. package/src/components/Form/TextField/Input/Input.tsx +139 -0
  22. package/src/components/Form/TextField/Input/export.tsx +6 -0
  23. package/src/components/Form/TextField/Label/Label.tsx +133 -0
  24. package/src/components/Form/TextField/Label/export.tsx +4 -0
  25. package/src/components/Form/TextField/TextField.tsx +200 -0
  26. package/src/components/Form/TextField/Textarea/Textarea.tsx +135 -0
  27. package/src/components/Form/TextField/Textarea/export.tsx +6 -0
  28. package/src/components/Form/TextField/Textarea/stories.tsx +44 -0
  29. package/src/components/Form/TextField/export.tsx +4 -0
  30. package/src/components/Form/export.tsx +4 -0
  31. package/src/components/Header/Header.tsx +158 -0
  32. package/src/components/Header/HeaderOverlay/index.tsx +32 -0
  33. package/src/components/Header/ToggleNav/index.tsx +32 -0
  34. package/src/components/Header/export.tsx +4 -0
  35. package/src/components/Header/stories.tsx +26 -0
  36. package/src/components/Icon/Icon.tsx +159 -0
  37. package/src/components/Icon/export.tsx +4 -0
  38. package/src/components/KeyNumber/KeyNumber.tsx +166 -0
  39. package/src/components/KeyNumber/export.tsx +4 -0
  40. package/src/components/LanguageSwitcher/LanguageSwitcher.tsx +168 -0
  41. package/src/components/LanguageSwitcher/export.tsx +4 -0
  42. package/src/components/Logo/Logo.tsx +137 -0
  43. package/src/components/Logo/export.tsx +4 -0
  44. package/src/components/Logo/stories.tsx +28 -0
  45. package/src/components/Main/Main.tsx +130 -0
  46. package/src/components/Main/export.tsx +4 -0
  47. package/src/components/Modal/Modal.tsx +194 -0
  48. package/src/components/Modal/export.tsx +4 -0
  49. package/src/components/Modal/types.tsx +5 -0
  50. package/src/components/Nav/Nav.tsx +129 -0
  51. package/src/components/Nav/export.tsx +4 -0
  52. package/src/components/Nav/stories.tsx +28 -0
  53. package/src/components/NavLegal/NavLegal.tsx +133 -0
  54. package/src/components/NavLegal/export.tsx +4 -0
  55. package/src/components/NavLegal/stories.tsx +28 -0
  56. package/src/components/NavSocial/NavSocial.tsx +169 -0
  57. package/src/components/NavSocial/export.tsx +5 -0
  58. package/src/components/{Columns/stories.ts → NavSocial/stories.tsx} +12 -14
  59. package/src/components/Section/Section.tsx +130 -0
  60. package/src/components/Section/export.tsx +6 -0
  61. package/src/components/ToRemove/ToRemove.tsx +3 -0
  62. package/src/components/Video/Video.tsx +243 -0
  63. package/src/components/Video/export.tsx +2 -0
  64. package/src/components/VideoFullWidth/VideoFullWidth.tsx +152 -0
  65. package/src/components/VideoFullWidth/export.tsx +2 -0
  66. package/dist/components/Actions/Actions.css.ts +0 -113
  67. package/dist/components/Button/Button.css.ts +0 -119
  68. package/dist/components/Carousel/Carousel.css.ts +0 -179
  69. package/dist/components/Columns/Columns.css.ts +0 -185
  70. package/dist/components/ConsentCookie/ConsentCookie.css.ts +0 -167
  71. package/dist/components/Footer/Footer.css.ts +0 -108
  72. package/dist/components/Form/Form.css.ts +0 -64
  73. package/dist/components/Form/Row/Row.css.ts +0 -70
  74. package/dist/components/Form/TextField/Input/Input.css.ts +0 -106
  75. package/dist/components/Form/TextField/Label/Label.css.ts +0 -58
  76. package/dist/components/Form/TextField/TextField.css.ts +0 -139
  77. package/dist/components/Form/TextField/Textarea/Textarea.css.ts +0 -121
  78. package/dist/components/Header/Header.css.ts +0 -111
  79. package/dist/components/Header/HeaderOverlay/styles.css.ts +0 -33
  80. package/dist/components/Header/ToggleNav/styles.css.ts +0 -40
  81. package/dist/components/Icon/Icon.css.ts +0 -102
  82. package/dist/components/KeyNumber/KeyNumber.css.ts +0 -158
  83. package/dist/components/LanguageSwitcher/LanguageSwitcher.css.ts +0 -120
  84. package/dist/components/Logo/Logo.css.ts +0 -98
  85. package/dist/components/Main/Main.css.ts +0 -62
  86. package/dist/components/Modal/Modal.css.ts +0 -203
  87. package/dist/components/Nav/Nav.css.ts +0 -123
  88. package/dist/components/NavLegal/NavLegal.css.ts +0 -121
  89. package/dist/components/NavSocial/NavSocial.css.ts +0 -121
  90. package/dist/components/Section/Section.css.ts +0 -101
  91. package/dist/components/Video/Video.css.ts +0 -210
  92. package/dist/components/VideoFullWidth/VideoFullWidth.css.ts +0 -50
  93. package/dist/css/index.cjs +0 -1
  94. package/dist/css/index.js +0 -34
  95. package/dist/index.cjs.js +0 -2
  96. package/dist/index.es.js +0 -3863
  97. package/dist/styles/sprinkles.css.ts +0 -84
  98. package/dist/theme/contract.css.ts +0 -83
  99. package/dist/theme.css-CNjMk-g_.cjs +0 -1
  100. package/dist/theme.css-Dj6kL9o0.js +0 -3020
  101. package/dist/types/components/Actions/Actions.css.d.ts +0 -74
  102. package/dist/types/components/Actions/Actions.d.ts +0 -7
  103. package/dist/types/components/Actions/stories.d.ts +0 -0
  104. package/dist/types/components/Button/Button.css.d.ts +0 -65
  105. package/dist/types/components/Button/Button.d.ts +0 -8
  106. package/dist/types/components/Button/export.d.ts +0 -0
  107. package/dist/types/components/Button/stories.d.ts +0 -0
  108. package/dist/types/components/Carousel/Carousel.css.d.ts +0 -33
  109. package/dist/types/components/Carousel/Carousel.d.ts +0 -15
  110. package/dist/types/components/Carousel/export.d.ts +0 -0
  111. package/dist/types/components/Columns/Columns.css.d.ts +0 -104
  112. package/dist/types/components/Columns/Columns.d.ts +0 -8
  113. package/dist/types/components/Columns/export.d.ts +0 -0
  114. package/dist/types/components/Columns/stories.d.ts +0 -0
  115. package/dist/types/components/ConsentCookie/ConsentCookie.css.d.ts +0 -15
  116. package/dist/types/components/ConsentCookie/ConsentCookie.d.ts +0 -17
  117. package/dist/types/components/ConsentCookie/export.d.ts +0 -0
  118. package/dist/types/components/ConsentCookie/stories.d.ts +0 -0
  119. package/dist/types/components/Footer/Footer.css.d.ts +0 -50
  120. package/dist/types/components/Footer/Footer.d.ts +0 -7
  121. package/dist/types/components/Footer/export.d.ts +0 -0
  122. package/dist/types/components/Footer/stories.d.ts +0 -6
  123. package/dist/types/components/Form/Form.css.d.ts +0 -46
  124. package/dist/types/components/Form/Form.d.ts +0 -7
  125. package/dist/types/components/Form/Row/Row.css.d.ts +0 -51
  126. package/dist/types/components/Form/Row/Row.d.ts +0 -9
  127. package/dist/types/components/Form/Row/index.d.ts +0 -0
  128. package/dist/types/components/Form/Row/stories.d.ts +0 -0
  129. package/dist/types/components/Form/TextField/Input/Input.css.d.ts +0 -32
  130. package/dist/types/components/Form/TextField/Input/Input.d.ts +0 -10
  131. package/dist/types/components/Form/TextField/Input/export.d.ts +0 -0
  132. package/dist/types/components/Form/TextField/Label/Label.css.d.ts +0 -23
  133. package/dist/types/components/Form/TextField/Label/Label.d.ts +0 -9
  134. package/dist/types/components/Form/TextField/Label/export.d.ts +0 -0
  135. package/dist/types/components/Form/TextField/TextField.css.d.ts +0 -19
  136. package/dist/types/components/Form/TextField/TextField.d.ts +0 -21
  137. package/dist/types/components/Form/TextField/Textarea/Textarea.css.d.ts +0 -56
  138. package/dist/types/components/Form/TextField/Textarea/Textarea.d.ts +0 -8
  139. package/dist/types/components/Form/TextField/Textarea/export.d.ts +0 -0
  140. package/dist/types/components/Form/TextField/Textarea/stories.d.ts +0 -0
  141. package/dist/types/components/Form/TextField/export.d.ts +0 -0
  142. package/dist/types/components/Form/export.d.ts +0 -0
  143. package/dist/types/components/Header/Header.css.d.ts +0 -36
  144. package/dist/types/components/Header/Header.d.ts +0 -11
  145. package/dist/types/components/Header/HeaderOverlay/index.d.ts +0 -7
  146. package/dist/types/components/Header/HeaderOverlay/styles.css.d.ts +0 -5
  147. package/dist/types/components/Header/ToggleNav/index.d.ts +0 -9
  148. package/dist/types/components/Header/ToggleNav/styles.css.d.ts +0 -5
  149. package/dist/types/components/Header/export.d.ts +0 -0
  150. package/dist/types/components/Header/stories.d.ts +0 -6
  151. package/dist/types/components/Icon/Icon.css.d.ts +0 -45
  152. package/dist/types/components/Icon/Icon.d.ts +0 -12
  153. package/dist/types/components/Icon/export.d.ts +0 -0
  154. package/dist/types/components/Icon/path.d.ts +0 -19
  155. package/dist/types/components/Icon/stories.d.ts +0 -0
  156. package/dist/types/components/KeyNumber/KeyNumber.css.d.ts +0 -40
  157. package/dist/types/components/KeyNumber/KeyNumber.d.ts +0 -15
  158. package/dist/types/components/KeyNumber/export.d.ts +0 -0
  159. package/dist/types/components/LanguageSwitcher/LanguageSwitcher.css.d.ts +0 -18
  160. package/dist/types/components/LanguageSwitcher/LanguageSwitcher.d.ts +0 -16
  161. package/dist/types/components/LanguageSwitcher/export.d.ts +0 -0
  162. package/dist/types/components/Logo/Logo.css.d.ts +0 -54
  163. package/dist/types/components/Logo/Logo.d.ts +0 -8
  164. package/dist/types/components/Logo/export.d.ts +0 -0
  165. package/dist/types/components/Logo/stories.d.ts +0 -6
  166. package/dist/types/components/Main/Main.css.d.ts +0 -32
  167. package/dist/types/components/Main/Main.d.ts +0 -7
  168. package/dist/types/components/Main/export.d.ts +0 -0
  169. package/dist/types/components/Main/stories.d.ts +0 -0
  170. package/dist/types/components/Modal/Modal.css.d.ts +0 -82
  171. package/dist/types/components/Modal/Modal.d.ts +0 -15
  172. package/dist/types/components/Modal/export.d.ts +0 -0
  173. package/dist/types/components/Modal/types.d.ts +0 -5
  174. package/dist/types/components/Nav/Nav.css.d.ts +0 -52
  175. package/dist/types/components/Nav/Nav.d.ts +0 -7
  176. package/dist/types/components/Nav/export.d.ts +0 -0
  177. package/dist/types/components/Nav/stories.d.ts +0 -6
  178. package/dist/types/components/NavLegal/NavLegal.css.d.ts +0 -57
  179. package/dist/types/components/NavLegal/NavLegal.d.ts +0 -7
  180. package/dist/types/components/NavLegal/export.d.ts +0 -0
  181. package/dist/types/components/NavLegal/stories.d.ts +0 -6
  182. package/dist/types/components/NavSocial/NavSocial.css.d.ts +0 -30
  183. package/dist/types/components/NavSocial/NavSocial.d.ts +0 -15
  184. package/dist/types/components/NavSocial/export.d.ts +0 -0
  185. package/dist/types/components/NavSocial/stories.d.ts +0 -0
  186. package/dist/types/components/Section/Section.css.d.ts +0 -60
  187. package/dist/types/components/Section/Section.d.ts +0 -7
  188. package/dist/types/components/Section/export.d.ts +0 -0
  189. package/dist/types/components/Section/stories.d.ts +0 -0
  190. package/dist/types/components/ToRemove/ToRemove.d.ts +0 -1
  191. package/dist/types/components/Video/Video.css.d.ts +0 -43
  192. package/dist/types/components/Video/Video.d.ts +0 -17
  193. package/dist/types/components/Video/export.d.ts +0 -0
  194. package/dist/types/components/VideoFullWidth/VideoFullWidth.css.d.ts +0 -18
  195. package/dist/types/components/VideoFullWidth/VideoFullWidth.d.ts +0 -14
  196. package/dist/types/components/VideoFullWidth/export.d.ts +0 -0
  197. package/dist/types/css/index.d.ts +0 -28
  198. package/dist/types/index.d.ts +0 -58
  199. package/dist/types/styles/mediaqueries.d.ts +0 -16
  200. package/dist/types/styles/sprinkles.css.d.ts +0 -3423
  201. package/dist/types/theme/baseThemeValues.d.ts +0 -158
  202. package/dist/types/theme/contract.css.d.ts +0 -79
  203. package/dist/types/theme/index.d.ts +0 -3
  204. package/dist/types/theme/utils.d.ts +0 -86
  205. package/dist/types/utils/cookie.d.ts +0 -2
  206. package/dist/types/utils/deep-merge-objects.d.ts +0 -2
  207. package/dist/types/utils/theme.css.d.ts +0 -173
  208. package/dist/types/utils/use-breakpoint-key.d.ts +0 -1
  209. package/dist/types/utils/use-window-size.d.ts +0 -5
  210. package/dist/utils/theme.css.ts +0 -129
  211. package/src/components/Button/stories.ts +0 -127
  212. package/src/components/Section/stories.ts +0 -64
  213. package/src/css/index.ts +0 -33
  214. package/src/themes/dark.ts +0 -3
  215. package/src/themes/index.ts +0 -5
  216. package/src/themes/light.ts +0 -3
  217. /package/{dist/types/components/Actions/export.d.ts → src/components/Form/Row/index.tsx} +0 -0
  218. /package/{dist/types/components/NavLegal/types.d.ts → src/components/NavLegal/types.tsx} +0 -0
  219. /package/{dist/types/components/NavSocial/types.d.ts → src/components/NavSocial/types.tsx} +0 -0
@@ -0,0 +1,133 @@
1
+ import { clsx } from 'clsx';
2
+ import { forwardRef } from 'react';
3
+ import { navLegalRecipe, type NavLegalVariants } from './NavLegal.css';
4
+ import { sprinkles, type Sprinkles } from '../../styles/sprinkles.css';
5
+
6
+ export interface NavLegalProps extends Omit<React.HTMLAttributes<HTMLElement>, 'color'>, Sprinkles, NonNullable<NavLegalVariants> {
7
+ css?: string;
8
+ as?: 'nav' | 'div' | 'footer';
9
+ }
10
+
11
+ export const NavLegal = forwardRef<HTMLElement, NavLegalProps>(
12
+ (
13
+ {
14
+ children,
15
+ orientation,
16
+ size,
17
+ variant,
18
+ align,
19
+ as: Component = 'nav',
20
+ css,
21
+ className,
22
+ // Extract sprinkles props
23
+ margin,
24
+ marginTop,
25
+ marginBottom,
26
+ marginLeft,
27
+ marginRight,
28
+ padding,
29
+ paddingTop,
30
+ paddingBottom,
31
+ paddingLeft,
32
+ paddingRight,
33
+ gap,
34
+ display,
35
+ flexDirection,
36
+ justifyContent,
37
+ flexWrap,
38
+ flex,
39
+ width,
40
+ height,
41
+ minWidth,
42
+ maxWidth,
43
+ minHeight,
44
+ position,
45
+ top,
46
+ bottom,
47
+ left,
48
+ right,
49
+ zIndex,
50
+ fontSize,
51
+ fontFamily,
52
+ lineHeight,
53
+ textAlign,
54
+ fontWeight,
55
+ color,
56
+ backgroundColor,
57
+ borderRadius,
58
+ borderWidth,
59
+ borderStyle,
60
+ borderColor,
61
+ boxShadow,
62
+ opacity,
63
+ overflow,
64
+ overflowX,
65
+ overflowY,
66
+ ...htmlProps
67
+ },
68
+ ref
69
+ ) => {
70
+ return (
71
+ <Component
72
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
73
+ ref={ref as any}
74
+ className={clsx(
75
+ navLegalRecipe({ orientation, size, variant, align }),
76
+ sprinkles({
77
+ margin,
78
+ marginTop,
79
+ marginBottom,
80
+ marginLeft,
81
+ marginRight,
82
+ padding,
83
+ paddingTop,
84
+ paddingBottom,
85
+ paddingLeft,
86
+ paddingRight,
87
+ gap,
88
+ display,
89
+ flexDirection,
90
+ justifyContent,
91
+ flexWrap,
92
+ flex,
93
+ width,
94
+ height,
95
+ minWidth,
96
+ maxWidth,
97
+ minHeight,
98
+ position,
99
+ top,
100
+ bottom,
101
+ left,
102
+ right,
103
+ zIndex,
104
+ fontSize,
105
+ fontFamily,
106
+ lineHeight,
107
+ textAlign,
108
+ fontWeight,
109
+ color,
110
+ backgroundColor,
111
+ borderRadius,
112
+ borderWidth,
113
+ borderStyle,
114
+ borderColor,
115
+ boxShadow,
116
+ opacity,
117
+ overflow,
118
+ overflowX,
119
+ overflowY,
120
+ }),
121
+ css,
122
+ className
123
+ )}
124
+ role="navigation"
125
+ aria-label="Legal navigation"
126
+ {...htmlProps}>
127
+ {children}
128
+ </Component>
129
+ );
130
+ }
131
+ );
132
+
133
+ NavLegal.displayName = 'NavLegal';
@@ -0,0 +1,4 @@
1
+ // export { NavLegal } from '.';
2
+ // export type { NavLegalProps } from '.';
3
+
4
+ // export { styles as NavLegalStyles } from './styles.css';
@@ -0,0 +1,28 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+
3
+ import { NavLegal } from '../../index';
4
+
5
+ // More on how to set up stories at: https://storybook.js.org/docs/writing-stories#default-export
6
+ const meta: Meta<typeof NavLegal> = {
7
+ title: 'Latte Components / 6. Nav / Legal',
8
+ component: NavLegal,
9
+ parameters: {
10
+ // Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/configure/story-layout
11
+ layout: 'centered',
12
+ },
13
+ // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs
14
+ tags: ['autodocs'],
15
+ // More on argTypes: https://storybook.js.org/docs/api/argtypes
16
+ argTypes: {},
17
+ // 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
18
+ };
19
+
20
+ export default meta;
21
+ type Story = StoryObj<typeof meta>;
22
+
23
+ // More on writing stories with args: https://storybook.js.org/docs/writing-stories/args
24
+ export const Default: Story = {
25
+ args: {
26
+ children: '',
27
+ },
28
+ };
@@ -0,0 +1,169 @@
1
+ import { clsx } from 'clsx';
2
+ import { forwardRef } from 'react';
3
+ import { navSocialLink, navSocialRecipe, type NavSocialVariants } from './NavSocial.css';
4
+ import { sprinkles, type Sprinkles } from '../../styles/sprinkles.css';
5
+ import { Icon } from '../Icon/Icon';
6
+
7
+ export type SocialNetwork = 'instagram' | 'linkedIn' | 'facebook' | 'pinterest' | 'spotify' | 'X' | 'youtube' | 'tiktok';
8
+
9
+ export interface SocialLink {
10
+ name: SocialNetwork;
11
+ url: string;
12
+ label?: string;
13
+ }
14
+
15
+ export interface NavSocialProps extends Omit<React.HTMLAttributes<HTMLElement>, 'color'>, Sprinkles, NonNullable<NavSocialVariants> {
16
+ css?: string;
17
+ links: SocialLink[];
18
+ iconSize?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
19
+ as?: 'nav' | 'div' | 'ul';
20
+ }
21
+
22
+ export const NavSocial = forwardRef<HTMLElement, NavSocialProps>(
23
+ (
24
+ {
25
+ links,
26
+ iconSize = 'md',
27
+ orientation,
28
+ size,
29
+ variant,
30
+ as: Component = 'nav',
31
+ css,
32
+ className,
33
+ // Extract sprinkles props
34
+ margin,
35
+ marginTop,
36
+ marginBottom,
37
+ marginLeft,
38
+ marginRight,
39
+ padding,
40
+ paddingTop,
41
+ paddingBottom,
42
+ paddingLeft,
43
+ paddingRight,
44
+ gap,
45
+ display,
46
+ flexDirection,
47
+ justifyContent,
48
+ flexWrap,
49
+ flex,
50
+ width,
51
+ height,
52
+ minWidth,
53
+ maxWidth,
54
+ minHeight,
55
+ position,
56
+ top,
57
+ bottom,
58
+ left,
59
+ right,
60
+ zIndex,
61
+ fontSize,
62
+ fontFamily,
63
+ lineHeight,
64
+ textAlign,
65
+ fontWeight,
66
+ color,
67
+ backgroundColor,
68
+ borderRadius,
69
+ borderWidth,
70
+ borderStyle,
71
+ borderColor,
72
+ boxShadow,
73
+ opacity,
74
+ overflow,
75
+ overflowX,
76
+ overflowY,
77
+ ...htmlProps
78
+ },
79
+ ref
80
+ ) => {
81
+ const getSocialIcon = (name: SocialNetwork): string => {
82
+ const iconMap: Record<SocialNetwork, string> = {
83
+ instagram: 'socialInstagram',
84
+ linkedIn: 'socialLinkedIn',
85
+ facebook: 'socialFacebook',
86
+ pinterest: 'socialPinterest',
87
+ spotify: 'socialSpotify',
88
+ X: 'socialX',
89
+ youtube: 'socialYoutube',
90
+ tiktok: 'socialTiktok',
91
+ };
92
+ return iconMap[name];
93
+ };
94
+
95
+ return (
96
+ <Component
97
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
98
+ ref={ref as any}
99
+ className={clsx(
100
+ navSocialRecipe({ orientation, size, variant }),
101
+ sprinkles({
102
+ margin,
103
+ marginTop,
104
+ marginBottom,
105
+ marginLeft,
106
+ marginRight,
107
+ padding,
108
+ paddingTop,
109
+ paddingBottom,
110
+ paddingLeft,
111
+ paddingRight,
112
+ gap,
113
+ display,
114
+ flexDirection,
115
+ justifyContent,
116
+ flexWrap,
117
+ flex,
118
+ width,
119
+ height,
120
+ minWidth,
121
+ maxWidth,
122
+ minHeight,
123
+ position,
124
+ top,
125
+ bottom,
126
+ left,
127
+ right,
128
+ zIndex,
129
+ fontSize,
130
+ fontFamily,
131
+ lineHeight,
132
+ textAlign,
133
+ fontWeight,
134
+ color,
135
+ backgroundColor,
136
+ borderRadius,
137
+ borderWidth,
138
+ borderStyle,
139
+ borderColor,
140
+ boxShadow,
141
+ opacity,
142
+ overflow,
143
+ overflowX,
144
+ overflowY,
145
+ }),
146
+ css,
147
+ className
148
+ )}
149
+ role="navigation"
150
+ aria-label="Social media links"
151
+ {...htmlProps}>
152
+ {links.map((social, index) => (
153
+ <a
154
+ key={`${social.name}-${index}`}
155
+ href={social.url}
156
+ target="_blank"
157
+ rel="noopener noreferrer"
158
+ className={navSocialLink}
159
+ aria-label={social.label || `Visit our ${social.name} page`}>
160
+ {/*eslint-disable-next-line @typescript-eslint/no-explicit-any*/}
161
+ <Icon icon={getSocialIcon(social.name) as any} size={iconSize} aria-hidden="true" />
162
+ </a>
163
+ ))}
164
+ </Component>
165
+ );
166
+ }
167
+ );
168
+
169
+ NavSocial.displayName = 'NavSocial';
@@ -0,0 +1,5 @@
1
+ // export { NavSocial } from '.';
2
+ // export type { NavSocialProps } from '.';
3
+
4
+ // export type { Social as SocialType } from './types';
5
+ // export { styles as NavSocialStyles } from './styles.css';
@@ -1,10 +1,11 @@
1
1
  // import type { Meta, StoryObj } from '@storybook/react';
2
- // import { Columns } from '.';
2
+ //
3
+ // import { NavSocial } from '../../index';
3
4
  //
4
5
  // // More on how to set up stories at: https://storybook.js.org/docs/writing-stories#default-export
5
- // const meta = {
6
- // title: 'Latte Components / Layout / Columns',
7
- // component: Columns,
6
+ // const meta: Meta<typeof NavSocial> = {
7
+ // title: 'Latte Components / 6. Nav / Social',
8
+ // component: NavSocial,
8
9
  // parameters: {
9
10
  // // Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/configure/story-layout
10
11
  // layout: 'centered',
@@ -14,7 +15,7 @@
14
15
  // // More on argTypes: https://storybook.js.org/docs/api/argtypes
15
16
  // argTypes: {},
16
17
  // // 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
17
- // } satisfies Meta<typeof Columns>;
18
+ // };
18
19
  //
19
20
  // export default meta;
20
21
  // type Story = StoryObj<typeof meta>;
@@ -22,14 +23,11 @@
22
23
  // // More on writing stories with args: https://storybook.js.org/docs/writing-stories/args
23
24
  // export const Default: Story = {
24
25
  // args: {
25
- // columns: [6, 6],
26
- // children: '<div>Column 1</div> <div>Column 2</div>',
27
- // },
28
- // };
29
- //
30
- // export const Default3Col: Story = {
31
- // args: {
32
- // columns: [4, 4, 4],
33
- // children: '<div>Column 1</div> <div>Column 2</div> <div>Column 3</div>',
26
+ // navSocial: [
27
+ // {
28
+ // name: 'instagram',
29
+ // link: 'https://www.instagram.com/',
30
+ // },
31
+ // ],
34
32
  // },
35
33
  // };
@@ -0,0 +1,130 @@
1
+ 'use client';
2
+
3
+ import { clsx } from 'clsx';
4
+ import { forwardRef } from 'react';
5
+ import { sectionRecipe, type SectionVariants } from './Section.css';
6
+ import { sprinkles, type Sprinkles } from '../../styles/sprinkles.css';
7
+
8
+ export interface SectionProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'color'>, Sprinkles, NonNullable<SectionVariants> {
9
+ css?: string;
10
+ as?: 'section' | 'div' | 'main' | 'article' | 'aside';
11
+ }
12
+
13
+ export const Section = forwardRef<HTMLDivElement, SectionProps>(
14
+ (
15
+ {
16
+ children,
17
+ align,
18
+ isDark,
19
+ isFullHeight,
20
+ spacing,
21
+ as: Component = 'section',
22
+ css,
23
+ className,
24
+ // Extract sprinkles props
25
+ margin,
26
+ marginTop,
27
+ marginBottom,
28
+ marginLeft,
29
+ marginRight,
30
+ padding,
31
+ paddingTop,
32
+ paddingBottom,
33
+ paddingLeft,
34
+ paddingRight,
35
+ gap,
36
+ display,
37
+ flexDirection,
38
+ justifyContent,
39
+ flexWrap,
40
+ flex,
41
+ width,
42
+ height,
43
+ minWidth,
44
+ maxWidth,
45
+ minHeight,
46
+ position,
47
+ top,
48
+ bottom,
49
+ left,
50
+ right,
51
+ zIndex,
52
+ fontSize,
53
+ fontFamily,
54
+ lineHeight,
55
+ textAlign,
56
+ fontWeight,
57
+ color,
58
+ backgroundColor,
59
+ borderRadius,
60
+ borderWidth,
61
+ borderStyle,
62
+ borderColor,
63
+ boxShadow,
64
+ opacity,
65
+ overflow,
66
+ overflowX,
67
+ overflowY,
68
+ ...htmlProps
69
+ },
70
+ ref
71
+ ) => {
72
+ return (
73
+ <Component
74
+ ref={ref}
75
+ className={clsx(
76
+ sectionRecipe({ align, isDark, isFullHeight, spacing }),
77
+ sprinkles({
78
+ margin,
79
+ marginTop,
80
+ marginBottom,
81
+ marginLeft,
82
+ marginRight,
83
+ padding,
84
+ paddingTop,
85
+ paddingBottom,
86
+ paddingLeft,
87
+ paddingRight,
88
+ gap,
89
+ display,
90
+ flexDirection,
91
+ justifyContent,
92
+ flexWrap,
93
+ flex,
94
+ width,
95
+ height,
96
+ minWidth,
97
+ maxWidth,
98
+ minHeight,
99
+ position,
100
+ top,
101
+ bottom,
102
+ left,
103
+ right,
104
+ zIndex,
105
+ fontSize,
106
+ fontFamily,
107
+ lineHeight,
108
+ textAlign,
109
+ fontWeight,
110
+ color,
111
+ backgroundColor,
112
+ borderRadius,
113
+ borderWidth,
114
+ borderStyle,
115
+ borderColor,
116
+ boxShadow,
117
+ opacity,
118
+ overflow,
119
+ overflowX,
120
+ overflowY,
121
+ }),
122
+ css,
123
+ className
124
+ )}
125
+ {...htmlProps}>
126
+ {children}
127
+ </Component>
128
+ );
129
+ }
130
+ );
@@ -0,0 +1,6 @@
1
+ // export { Section } from '.';
2
+ // export type { SectionProps } from '.';
3
+ // export { Align as SectionAlign } from './types';
4
+
5
+ // export * as allStyles from './styles.css';
6
+ // export { styles as SectionStyles } from './styles.css';
@@ -0,0 +1,3 @@
1
+ export const ToRemove = () => {
2
+ return <div>ToRemove</div>;
3
+ };