@latte-macchiat-io/latte-vanilla-components 0.0.175 → 0.0.176
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/dist/css/index.cjs +1 -0
- package/dist/css/index.js +34 -0
- package/dist/index.cjs.js +2 -2
- package/dist/index.es.js +3195 -6145
- package/dist/theme.css-CNjMk-g_.cjs +1 -0
- package/dist/theme.css-Dj6kL9o0.js +3020 -0
- package/dist/types/css/index.d.ts +28 -0
- package/dist/types/styles/mediaqueries.d.ts +16 -0
- package/dist/types/styles/sprinkles.css.d.ts +3423 -0
- package/dist/types/theme/baseThemeValues.d.ts +158 -0
- package/dist/types/theme/contract.css.d.ts +79 -0
- package/dist/types/theme/index.d.ts +3 -0
- package/dist/types/theme/utils.d.ts +86 -0
- package/package.json +17 -13
- package/src/assets/styles/default-theme.ts +312 -0
- package/src/components/Button/stories.ts +127 -0
- package/src/components/Columns/stories.ts +35 -0
- package/src/components/Icon/path.ts +36 -0
- package/src/components/Icon/stories.ts +29 -0
- package/src/components/Main/stories.ts +33 -0
- package/src/components/Section/stories.ts +64 -0
- package/src/css/index.ts +33 -0
- package/src/index.ts +96 -0
- package/src/styles/mediaqueries.ts +17 -0
- package/src/theme/baseThemeValues.ts +160 -0
- package/src/theme/index.ts +6 -0
- package/src/theme/utils.ts +76 -0
- package/src/themes/dark.ts +3 -0
- package/src/themes/index.ts +5 -0
- package/src/themes/light.ts +3 -0
- package/src/types/theme.ts +295 -0
- package/src/types/withClassName.ts +3 -0
- package/src/utils/cookie.ts +24 -0
- package/src/utils/deep-merge-objects.ts +15 -0
- package/src/utils/use-breakpoint-key.ts +30 -0
- package/src/utils/use-window-size.ts +37 -0
@@ -0,0 +1,127 @@
|
|
1
|
+
// import type { Meta, StoryObj } from '@storybook/react';
|
2
|
+
// import { fn } from '@storybook/test';
|
3
|
+
|
4
|
+
// import { Button } from './export';
|
5
|
+
// import { Size, Style, Variant } from './types';
|
6
|
+
// import { buttonStyle } from './styles.css';
|
7
|
+
// import { defaultTheme } from '../../assets/styles/default-theme';
|
8
|
+
|
9
|
+
// // More on how to set up stories at: https://storybook.js.org/docs/writing-stories#default-export
|
10
|
+
// const meta = {
|
11
|
+
// title: 'Latte Components / 3. Buttons / Button',
|
12
|
+
// component: Button,
|
13
|
+
// parameters: {
|
14
|
+
// // Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/configure/story-layout
|
15
|
+
// layout: 'centered',
|
16
|
+
// },
|
17
|
+
// // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs
|
18
|
+
// tags: ['autodocs'],
|
19
|
+
// // More on argTypes: https://storybook.js.org/docs/api/argtypes
|
20
|
+
// argTypes: {},
|
21
|
+
// // 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
|
22
|
+
// args: { onClick: fn() },
|
23
|
+
// } satisfies Meta<typeof Button>;
|
24
|
+
|
25
|
+
// export default meta;
|
26
|
+
// type Story = StoryObj<typeof meta>;
|
27
|
+
|
28
|
+
// // More on writing stories with args: https://storybook.js.org/docs/writing-stories/args
|
29
|
+
// export const Default: Story = {
|
30
|
+
// args: {
|
31
|
+
// children: 'Button',
|
32
|
+
// theme: defaultTheme,
|
33
|
+
// className: buttonStyle,
|
34
|
+
// },
|
35
|
+
// };
|
36
|
+
|
37
|
+
// export const Primary: Story = {
|
38
|
+
// args: {
|
39
|
+
// children: 'Button',
|
40
|
+
// theme: defaultTheme,
|
41
|
+
// className: buttonStyle,
|
42
|
+
// variant: Variant.Primary,
|
43
|
+
// },
|
44
|
+
// };
|
45
|
+
|
46
|
+
// export const StyleOutline: Story = {
|
47
|
+
// args: {
|
48
|
+
// children: 'Button',
|
49
|
+
// theme: defaultTheme,
|
50
|
+
// style: Style.Outline,
|
51
|
+
// className: buttonStyle,
|
52
|
+
// },
|
53
|
+
// };
|
54
|
+
|
55
|
+
// export const Secondary: Story = {
|
56
|
+
// args: {
|
57
|
+
// children: 'Button',
|
58
|
+
// theme: defaultTheme,
|
59
|
+
// className: buttonStyle,
|
60
|
+
// variant: Variant.Secondary,
|
61
|
+
// },
|
62
|
+
// };
|
63
|
+
|
64
|
+
// export const SecondaryOutline: Story = {
|
65
|
+
// args: {
|
66
|
+
// children: 'Button',
|
67
|
+
// theme: defaultTheme,
|
68
|
+
// style: Style.Outline,
|
69
|
+
// className: buttonStyle,
|
70
|
+
// variant: Variant.Secondary,
|
71
|
+
// },
|
72
|
+
// };
|
73
|
+
|
74
|
+
// export const StaticColor: Story = {
|
75
|
+
// args: {
|
76
|
+
// children: 'Button',
|
77
|
+
// theme: defaultTheme,
|
78
|
+
// className: buttonStyle,
|
79
|
+
// staticColor: '#76D1F5',
|
80
|
+
// },
|
81
|
+
// };
|
82
|
+
|
83
|
+
// export const StaticColorOutline: Story = {
|
84
|
+
// args: {
|
85
|
+
// children: 'Button',
|
86
|
+
// theme: defaultTheme,
|
87
|
+
// style: Style.Outline,
|
88
|
+
// className: buttonStyle,
|
89
|
+
// staticColor: '#76D1F5',
|
90
|
+
// },
|
91
|
+
// };
|
92
|
+
|
93
|
+
// export const Disabled: Story = {
|
94
|
+
// args: {
|
95
|
+
// isDisabled: true,
|
96
|
+
// children: 'Button',
|
97
|
+
// theme: defaultTheme,
|
98
|
+
// className: buttonStyle,
|
99
|
+
// },
|
100
|
+
// };
|
101
|
+
|
102
|
+
// export const Pending: Story = {
|
103
|
+
// args: {
|
104
|
+
// isPending: true,
|
105
|
+
// theme: defaultTheme,
|
106
|
+
// children: 'Pending...',
|
107
|
+
// className: buttonStyle,
|
108
|
+
// },
|
109
|
+
// };
|
110
|
+
|
111
|
+
// export const SizeSmall: Story = {
|
112
|
+
// args: {
|
113
|
+
// size: Size.Small,
|
114
|
+
// children: 'Button',
|
115
|
+
// theme: defaultTheme,
|
116
|
+
// className: buttonStyle,
|
117
|
+
// },
|
118
|
+
// };
|
119
|
+
|
120
|
+
// export const SizeLarge: Story = {
|
121
|
+
// args: {
|
122
|
+
// size: Size.Large,
|
123
|
+
// children: 'Button',
|
124
|
+
// theme: defaultTheme,
|
125
|
+
// className: buttonStyle,
|
126
|
+
// },
|
127
|
+
// };
|
@@ -0,0 +1,35 @@
|
|
1
|
+
// import type { Meta, StoryObj } from '@storybook/react';
|
2
|
+
// import { Columns } from '.';
|
3
|
+
//
|
4
|
+
// // 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,
|
8
|
+
// parameters: {
|
9
|
+
// // Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/configure/story-layout
|
10
|
+
// layout: 'centered',
|
11
|
+
// },
|
12
|
+
// // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs
|
13
|
+
// tags: ['autodocs'],
|
14
|
+
// // More on argTypes: https://storybook.js.org/docs/api/argtypes
|
15
|
+
// argTypes: {},
|
16
|
+
// // 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
|
+
//
|
19
|
+
// export default meta;
|
20
|
+
// type Story = StoryObj<typeof meta>;
|
21
|
+
//
|
22
|
+
// // More on writing stories with args: https://storybook.js.org/docs/writing-stories/args
|
23
|
+
// export const Default: Story = {
|
24
|
+
// 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>',
|
34
|
+
// },
|
35
|
+
// };
|
@@ -0,0 +1,36 @@
|
|
1
|
+
const icons = {
|
2
|
+
caret:
|
3
|
+
'M8.12 9.29 12 13.17l3.88-3.88c.39-.39 1.02-.39 1.41 0 .39.39.39 1.02 0 1.41l-4.59 4.59c-.39.39-1.02.39-1.41 0L6.7 10.7a.9959.9959 0 0 1 0-1.41c.39-.38 1.03-.39 1.42 0',
|
4
|
+
close:
|
5
|
+
'M18.3 5.71a.996.996 0 0 0-1.41 0L12 10.59 7.11 5.7a.996.996 0 0 0-1.41 0c-.39.39-.39 1.02 0 1.41L10.59 12 5.7 16.89c-.39.39-.39 1.02 0 1.41s1.02.39 1.41 0L12 13.41l4.89 4.89c.39.39 1.02.39 1.41 0s.39-1.02 0-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4',
|
6
|
+
arrowBack:
|
7
|
+
'M19 11H7.83l4.88-4.88c.39-.39.39-1.03 0-1.42a.996.996 0 0 0-1.41 0l-6.59 6.59c-.39.39-.39 1.02 0 1.41l6.59 6.59c.39.39 1.02.39 1.41 0s.39-1.02 0-1.41L7.83 13H19c.55 0 1-.45 1-1s-.45-1-1-1',
|
8
|
+
arrowForward:
|
9
|
+
'M5 13h11.17l-4.88 4.88c-.39.39-.39 1.03 0 1.42s1.02.39 1.41 0l6.59-6.59c.39-.39.39-1.02 0-1.41l-6.58-6.6a.996.996 0 0 0-1.41 0c-.39.39-.39 1.02 0 1.41L16.17 11H5c-.55 0-1 .45-1 1s.45 1 1 1',
|
10
|
+
|
11
|
+
//video
|
12
|
+
play: 'M8 5v14l11-7z',
|
13
|
+
pause: 'M6 19h4V5H6zm8-14v14h4V5z',
|
14
|
+
volumeMute: 'M7 9v6h4l5 5V4l-5 5z',
|
15
|
+
volumeUp:
|
16
|
+
'M3 9v6h4l5 5V4L7 9zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02M14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77s-2.99-7.86-7-8.77',
|
17
|
+
|
18
|
+
// Social
|
19
|
+
socialFacebook:
|
20
|
+
'M 22.2816,10.9924 C 22.2816,4.92145 17.3602,0 11.2892,0 5.21832,0 0.296875,4.92145 0.296875,10.9924 c 0,5.4865 4.019725,10.0342 9.274805,10.8588 V 14.1698 H 6.78065 V 10.9924 H 9.57168 V 8.57061 c 0,-2.75496 1.64112,-4.27672 4.15202,-4.27672 1.2023,0 2.4606,0.2147 2.4606,0.2147 v 2.70515 h -1.3861 c -1.3654,0 -1.7914,0.8474 -1.7914,1.71756 v 2.0611 h 3.0487 l -0.4874,3.1774 h -2.5613 v 7.6814 c 5.2551,-0.8246 9.2748,-5.3723 9.2748,-10.8588 z',
|
21
|
+
socialInstagram:
|
22
|
+
'M7.8 2h8.4C19.4 2 22 4.6 22 7.8v8.4a5.8 5.8 0 0 1-5.8 5.8H7.8C4.6 22 2 19.4 2 16.2V7.8A5.8 5.8 0 0 1 7.8 2m-.2 2A3.6 3.6 0 0 0 4 7.6v8.8C4 18.39 5.61 20 7.6 20h8.8a3.6 3.6 0 0 0 3.6-3.6V7.6C20 5.61 18.39 4 16.4 4H7.6m9.65 1.5a1.25 1.25 0 0 1 1.25 1.25A1.25 1.25 0 0 1 17.25 8 1.25 1.25 0 0 1 16 6.75a1.25 1.25 0 0 1 1.25-1.25M12 7a5 5 0 0 1 5 5 5 5 0 0 1-5 5 5 5 0 0 1-5-5 5 5 0 0 1 5-5m0 2a3 3 0 0 0-3 3 3 3 0 0 0 3 3 3 3 0 0 0 3-3 3 3 0 0 0-3-3z',
|
23
|
+
socialPinterest:
|
24
|
+
'M9.04 21.54c.96.29 1.93.46 2.96.46a10 10 0 0 0 10-10A10 10 0 0 0 12 2 10 10 0 0 0 2 12c0 4.25 2.67 7.9 6.44 9.34-.09-.78-.18-2.07 0-2.96l1.15-4.94s-.29-.58-.29-1.5c0-1.38.86-2.41 1.84-2.41.86 0 1.26.63 1.26 1.44 0 .86-.57 2.09-.86 3.27-.17.98.52 1.84 1.52 1.84 1.78 0 3.16-1.9 3.16-4.58 0-2.4-1.72-4.04-4.19-4.04-2.82 0-4.48 2.1-4.48 4.31 0 .86.28 1.73.74 2.3.09.06.09.14.06.29l-.29 1.09c0 .17-.11.23-.28.11-1.28-.56-2.02-2.38-2.02-3.85 0-3.16 2.24-6.03 6.56-6.03 3.44 0 6.12 2.47 6.12 5.75 0 3.44-2.13 6.2-5.18 6.2-.97 0-1.92-.52-2.26-1.13l-.67 2.37c-.23.86-.86 2.01-1.29 2.7v-.03z',
|
25
|
+
socialLinkedIn:
|
26
|
+
'M19 3a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14m-.5 15.5v-5.3a3.26 3.26 0 0 0-3.26-3.26c-.85 0-1.84.52-2.32 1.3v-1.11h-2.79v8.37h2.79v-4.93c0-.77.62-1.4 1.39-1.4a1.4 1.4 0 0 1 1.4 1.4v4.93h2.79M6.88 8.56a1.68 1.68 0 0 0 1.68-1.68c0-.93-.75-1.69-1.68-1.69a1.69 1.69 0 0 0-1.69 1.69c0 .93.76 1.68 1.69 1.68m1.39 9.94v-8.37H5.5v8.37h2.77z',
|
27
|
+
socialSpotify: '',
|
28
|
+
socialTiktok:
|
29
|
+
'M21,2H3A1,1,0,0,0,2,3V21a1,1,0,0,0,1,1H21a1,1,0,0,0,1-1V3A1,1,0,0,0,21,2Zm-3.281,8.725h0c-.109.011-.219.016-.328.017A3.571,3.571,0,0,1,14.4,9.129v5.493a4.061,4.061,0,1,1-4.06-4.06c.085,0,.167.008.251.013v2a2.067,2.067,0,1,0-.251,4.119A2.123,2.123,0,0,0,12.5,14.649l.02-9.331h1.914A3.564,3.564,0,0,0,17.719,8.5Z',
|
30
|
+
socialX:
|
31
|
+
'M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z',
|
32
|
+
socialYoutube:
|
33
|
+
'M10 15l5.19-3L10 9v6m11.56-7.83c.13.47.22 1.1.28 1.9.07.8.1 1.49.1 2.09L22 12c0 2.19-.16 3.8-.44 4.83-.25.9-.83 1.48-1.73 1.73-.47.13-1.33.22-2.65.28-1.3.07-2.49.1-3.59.1L12 19c-4.19 0-6.8-.16-7.83-.44-.9-.25-1.48-.83-1.73-1.73-.13-.47-.22-1.1-.28-1.9-.07-.8-.1-1.49-.1-2.09L2 12c0-2.19.16-3.8.44-4.83.25-.9.83-1.48 1.73-1.73.47-.13 1.33-.22 2.65-.28 1.3-.07 2.49-.1 3.59-.1L12 5c4.19 0 6.8.16 7.83.44.9.25 1.48.83 1.73 1.73z',
|
34
|
+
};
|
35
|
+
|
36
|
+
export default icons;
|
@@ -0,0 +1,29 @@
|
|
1
|
+
// import type { Meta, StoryObj } from '@storybook/react';
|
2
|
+
// import { defaultTheme } from '../../assets/styles/default-theme';
|
3
|
+
// import { Icon } from '../../index';
|
4
|
+
//
|
5
|
+
// // More on how to set up stories at: https://storybook.js.org/docs/writing-stories#default-export
|
6
|
+
// const meta = {
|
7
|
+
// title: 'Latte Components / 1. Global / Icon',
|
8
|
+
// component: Icon,
|
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
|
+
// } satisfies Meta<typeof Icon>;
|
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
|
+
// icon: 'close',
|
27
|
+
// theme: defaultTheme,
|
28
|
+
// },
|
29
|
+
// };
|
@@ -0,0 +1,33 @@
|
|
1
|
+
// import type { Meta, StoryObj } from '@storybook/react';
|
2
|
+
//
|
3
|
+
// import { defaultTheme } from '../../assets/styles/default-theme';
|
4
|
+
// import { Main } from '.';
|
5
|
+
// import { mainStyle } from './styles.css';
|
6
|
+
//
|
7
|
+
// // More on how to set up stories at: https://storybook.js.org/docs/writing-stories#default-export
|
8
|
+
// const meta = {
|
9
|
+
// title: 'Latte Components / Layout / Main',
|
10
|
+
// component: Main,
|
11
|
+
// parameters: {
|
12
|
+
// // Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/configure/story-layout
|
13
|
+
// layout: 'centered',
|
14
|
+
// },
|
15
|
+
// // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs
|
16
|
+
// tags: ['autodocs'],
|
17
|
+
// // More on argTypes: https://storybook.js.org/docs/api/argtypes
|
18
|
+
// argTypes: {},
|
19
|
+
// // 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
|
20
|
+
// } satisfies Meta<typeof Main>;
|
21
|
+
//
|
22
|
+
// export default meta;
|
23
|
+
// type Story = StoryObj<typeof meta>;
|
24
|
+
//
|
25
|
+
// // More on writing stories with args: https://storybook.js.org/docs/writing-stories/args
|
26
|
+
// export const Default: Story = {
|
27
|
+
// args: {
|
28
|
+
// className: mainStyle,
|
29
|
+
// theme: defaultTheme,
|
30
|
+
// children:
|
31
|
+
// 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.',
|
32
|
+
// },
|
33
|
+
// };
|
@@ -0,0 +1,64 @@
|
|
1
|
+
// import type { Meta, StoryObj } from '@storybook/react';
|
2
|
+
// import { defaultTheme } from '@assets/styles/default-theme';
|
3
|
+
// import { Section } from './Section';
|
4
|
+
// import { sectionStyle } from './styles.css';
|
5
|
+
// import { Align } from './types';
|
6
|
+
|
7
|
+
// // More on how to set up stories at: https://storybook.js.org/docs/writing-stories#default-export
|
8
|
+
// const meta = {
|
9
|
+
// title: 'Latte Components / Layout / Section',
|
10
|
+
// component: Section,
|
11
|
+
// parameters: {
|
12
|
+
// // Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/configure/story-layout
|
13
|
+
// layout: 'centered',
|
14
|
+
// },
|
15
|
+
// // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs
|
16
|
+
// tags: ['autodocs'],
|
17
|
+
// // More on argTypes: https://storybook.js.org/docs/api/argtypes
|
18
|
+
// argTypes: {},
|
19
|
+
// // 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
|
20
|
+
// } satisfies Meta<typeof Section>;
|
21
|
+
|
22
|
+
// export default meta;
|
23
|
+
// type Story = StoryObj<typeof meta>;
|
24
|
+
|
25
|
+
// // More on writing stories with args: https://storybook.js.org/docs/writing-stories/args
|
26
|
+
// export const Default: Story = {
|
27
|
+
// args: {
|
28
|
+
// theme: defaultTheme,
|
29
|
+
// className: sectionStyle,
|
30
|
+
// children:
|
31
|
+
// 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.',
|
32
|
+
// },
|
33
|
+
// };
|
34
|
+
|
35
|
+
// export const FullHeight: Story = {
|
36
|
+
// args: {
|
37
|
+
// isFullHeight: true,
|
38
|
+
// theme: defaultTheme,
|
39
|
+
// className: sectionStyle,
|
40
|
+
// children:
|
41
|
+
// 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.',
|
42
|
+
// },
|
43
|
+
// };
|
44
|
+
|
45
|
+
// export const AlignCenter: Story = {
|
46
|
+
// args: {
|
47
|
+
// theme: defaultTheme,
|
48
|
+
// align: Align.Center,
|
49
|
+
// className: sectionStyle,
|
50
|
+
// children:
|
51
|
+
// 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.',
|
52
|
+
// },
|
53
|
+
// };
|
54
|
+
|
55
|
+
// export const BackgroundColor: Story = {
|
56
|
+
// args: {
|
57
|
+
// isDark: true,
|
58
|
+
// theme: defaultTheme,
|
59
|
+
// backgroundColor: 'red',
|
60
|
+
// className: sectionStyle,
|
61
|
+
// children:
|
62
|
+
// 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.',
|
63
|
+
// },
|
64
|
+
// };
|
package/src/css/index.ts
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
// CSS-only exports for consuming applications
|
2
|
+
// This enables the pattern: import { themeContract, sprinkles } from 'library/css'
|
3
|
+
|
4
|
+
export { themeContract } from '../theme/contract.css';
|
5
|
+
export { sprinkles, responsiveProperties, type Sprinkles } from '../styles/sprinkles.css';
|
6
|
+
export { createLightTheme, createDarkTheme, type ThemeOverrides } from '../utils/theme.css';
|
7
|
+
|
8
|
+
// Recipe exports from components
|
9
|
+
export { actionsRecipe, type ActionsVariants } from '../components/Actions/Actions.css';
|
10
|
+
export { buttonRecipe, type ButtonVariants } from '../components/Button/Button.css';
|
11
|
+
export { carouselRecipe, type CarouselVariants } from '../components/Carousel/Carousel.css';
|
12
|
+
export { columnsRecipe, type ColumnsVariants } from '../components/Columns/Columns.css';
|
13
|
+
export { consentRecipe, type ConsentCookieVariants } from '../components/ConsentCookie/ConsentCookie.css';
|
14
|
+
export { footerRecipe, type FooterVariants } from '../components/Footer/Footer.css';
|
15
|
+
export { formRecipe, type FormVariants } from '../components/Form/Form.css';
|
16
|
+
export { rowRecipe, type RowVariants } from '../components/Form/Row/Row.css';
|
17
|
+
export { inputRecipe, type InputVariants } from '../components/Form/TextField/Input/Input.css';
|
18
|
+
export { labelRecipe, type LabelVariants } from '../components/Form/TextField/Label/Label.css';
|
19
|
+
export { textFieldRecipe, type TextFieldVariants } from '../components/Form/TextField/TextField.css';
|
20
|
+
export { textareaRecipe, type TextareaVariants } from '../components/Form/TextField/Textarea/Textarea.css';
|
21
|
+
export { headerRecipe, type HeaderVariants } from '../components/Header/Header.css';
|
22
|
+
export { iconRecipe, type IconVariants } from '../components/Icon/Icon.css';
|
23
|
+
export { keyNumberRecipe, type KeyNumberVariants } from '../components/KeyNumber/KeyNumber.css';
|
24
|
+
export { languageSwitcherRecipe, type LanguageSwitcherVariants } from '../components/LanguageSwitcher/LanguageSwitcher.css';
|
25
|
+
export { logoRecipe, type LogoVariants } from '../components/Logo/Logo.css';
|
26
|
+
export { mainRecipe, type MainVariants } from '../components/Main/Main.css';
|
27
|
+
export { modalRecipe, modalContentRecipe, type ModalVariants, type ModalContentVariants } from '../components/Modal/Modal.css';
|
28
|
+
export { navRecipe, type NavVariants } from '../components/Nav/Nav.css';
|
29
|
+
export { navLegalRecipe, type NavLegalVariants } from '../components/NavLegal/NavLegal.css';
|
30
|
+
export { navSocialRecipe, type NavSocialVariants } from '../components/NavSocial/NavSocial.css';
|
31
|
+
export { sectionRecipe, type SectionVariants } from '../components/Section/Section.css';
|
32
|
+
export { videoRecipe, type VideoVariants } from '../components/Video/Video.css';
|
33
|
+
export { videoFullWidthRecipe, type VideoFullWidthVariants } from '../components/VideoFullWidth/VideoFullWidth.css';
|
package/src/index.ts
ADDED
@@ -0,0 +1,96 @@
|
|
1
|
+
// Theme system - Import this first to apply global styles
|
2
|
+
export * from './theme';
|
3
|
+
|
4
|
+
// Styles utilities
|
5
|
+
export { sprinkles, responsiveProperties, type Sprinkles } from './styles/sprinkles.css';
|
6
|
+
export { breakpoints, queries } from './styles/mediaqueries';
|
7
|
+
|
8
|
+
// Vanilla Extract Components (fully migrated)
|
9
|
+
export { Button, type ButtonProps } from './components/Button/Button';
|
10
|
+
export { type ButtonVariants } from './components/Button/Button.css';
|
11
|
+
|
12
|
+
export { Section, type SectionProps } from './components/Section/Section';
|
13
|
+
export { type SectionVariants } from './components/Section/Section.css';
|
14
|
+
|
15
|
+
export { Main, type MainProps } from './components/Main/Main';
|
16
|
+
export { type MainVariants } from './components/Main/Main.css';
|
17
|
+
|
18
|
+
export { Header, type HeaderProps } from './components/Header/Header';
|
19
|
+
export { type HeaderVariants } from './components/Header/Header.css';
|
20
|
+
|
21
|
+
export { Footer, type FooterProps } from './components/Footer/Footer';
|
22
|
+
export { type FooterVariants } from './components/Footer/Footer.css';
|
23
|
+
|
24
|
+
export { Nav, type NavProps } from './components/Nav/Nav';
|
25
|
+
export { type NavVariants } from './components/Nav/Nav.css';
|
26
|
+
|
27
|
+
export { Icon, type IconProps } from './components/Icon/Icon';
|
28
|
+
export { type IconVariants } from './components/Icon/Icon.css';
|
29
|
+
|
30
|
+
export { Modal, type ModalProps } from './components/Modal/Modal';
|
31
|
+
export { type ModalVariants } from './components/Modal/Modal.css';
|
32
|
+
|
33
|
+
export { Logo, type LogoProps } from './components/Logo/Logo';
|
34
|
+
export { type LogoVariants } from './components/Logo/Logo.css';
|
35
|
+
|
36
|
+
export { Columns, type ColumnsProps } from './components/Columns/Columns';
|
37
|
+
export { type ColumnsVariants } from './components/Columns/Columns.css';
|
38
|
+
|
39
|
+
export { Actions, type ActionsProps } from './components/Actions/Actions';
|
40
|
+
export { type ActionsVariants } from './components/Actions/Actions.css';
|
41
|
+
|
42
|
+
export { Carousel, type CarouselProps } from './components/Carousel/Carousel';
|
43
|
+
export { type CarouselVariants } from './components/Carousel/Carousel.css';
|
44
|
+
|
45
|
+
export { ConsentCookie, type ConsentCookieProps } from './components/ConsentCookie/ConsentCookie';
|
46
|
+
export { type ConsentCookieVariants } from './components/ConsentCookie/ConsentCookie.css';
|
47
|
+
|
48
|
+
export { KeyNumber, type KeyNumberProps } from './components/KeyNumber/KeyNumber';
|
49
|
+
export { type KeyNumberVariants } from './components/KeyNumber/KeyNumber.css';
|
50
|
+
|
51
|
+
export { NavSocial, type NavSocialProps, type SocialNetwork, type SocialLink } from './components/NavSocial/NavSocial';
|
52
|
+
export { type NavSocialVariants } from './components/NavSocial/NavSocial.css';
|
53
|
+
|
54
|
+
export { NavLegal, type NavLegalProps } from './components/NavLegal/NavLegal';
|
55
|
+
export { type NavLegalVariants } from './components/NavLegal/NavLegal.css';
|
56
|
+
|
57
|
+
export { LanguageSwitcher, type LanguageSwitcherProps, type Locale } from './components/LanguageSwitcher/LanguageSwitcher';
|
58
|
+
export { type LanguageSwitcherVariants } from './components/LanguageSwitcher/LanguageSwitcher.css';
|
59
|
+
|
60
|
+
// Video Components
|
61
|
+
export { Video, type VideoProps } from './components/Video/Video';
|
62
|
+
export { type VideoVariants } from './components/Video/Video.css';
|
63
|
+
|
64
|
+
export { VideoFullWidth, type VideoFullWidthProps } from './components/VideoFullWidth/VideoFullWidth';
|
65
|
+
export { type VideoFullWidthVariants } from './components/VideoFullWidth/VideoFullWidth.css';
|
66
|
+
|
67
|
+
// Form Components
|
68
|
+
export { Form, type FormProps } from './components/Form/Form';
|
69
|
+
export { type FormVariants } from './components/Form/Form.css';
|
70
|
+
|
71
|
+
export { Row, type RowProps } from './components/Form/Row/Row';
|
72
|
+
export { type RowVariants } from './components/Form/Row/Row.css';
|
73
|
+
|
74
|
+
export { TextField, type TextFieldProps, type InputType } from './components/Form/TextField/TextField';
|
75
|
+
export { type TextFieldVariants } from './components/Form/TextField/TextField.css';
|
76
|
+
|
77
|
+
// Form TextField Subcomponents
|
78
|
+
export { Label, type LabelProps } from './components/Form/TextField/Label/Label';
|
79
|
+
export { type LabelVariants } from './components/Form/TextField/Label/Label.css';
|
80
|
+
|
81
|
+
export { Input, type InputProps, type InputType as InputFieldType } from './components/Form/TextField/Input/Input';
|
82
|
+
export { type InputVariants } from './components/Form/TextField/Input/Input.css';
|
83
|
+
|
84
|
+
export { Textarea, type TextareaProps } from './components/Form/TextField/Textarea/Textarea';
|
85
|
+
export { type TextareaVariants } from './components/Form/TextField/Textarea/Textarea.css';
|
86
|
+
|
87
|
+
export { ToRemove } from './components/ToRemove/ToRemove';
|
88
|
+
|
89
|
+
// Theme utilities
|
90
|
+
export { createDarkTheme, createLightTheme, type ThemeOverrides } from './utils/theme.css';
|
91
|
+
// Theme contract and values
|
92
|
+
export { themeContract } from './theme/contract.css';
|
93
|
+
export { baseLightTheme, baseDarkTheme } from './theme/baseThemeValues';
|
94
|
+
|
95
|
+
// Theme utilities
|
96
|
+
export { createThemeOverride, getThemeContract, getThemeValues, toggleTheme, setTheme, getCurrentTheme, type ThemeValues } from './theme/utils';
|
@@ -0,0 +1,17 @@
|
|
1
|
+
export const breakpoints = {
|
2
|
+
mobile: 0,
|
3
|
+
sm: 640,
|
4
|
+
md: 768,
|
5
|
+
lg: 1024,
|
6
|
+
xl: 1280,
|
7
|
+
'2xl': 1536,
|
8
|
+
} as const;
|
9
|
+
|
10
|
+
export const queries = {
|
11
|
+
mobile: `screen and (min-width: ${breakpoints.mobile}px)`,
|
12
|
+
sm: `screen and (min-width: ${breakpoints.sm}px)`,
|
13
|
+
md: `screen and (min-width: ${breakpoints.md}px)`,
|
14
|
+
lg: `screen and (min-width: ${breakpoints.lg}px)`,
|
15
|
+
xl: `screen and (min-width: ${breakpoints.xl}px)`,
|
16
|
+
'2xl': `screen and (min-width: ${breakpoints['2xl']}px)`,
|
17
|
+
};
|
@@ -0,0 +1,160 @@
|
|
1
|
+
// Base theme values that can be imported and extended by apps
|
2
|
+
export const baseLightTheme = {
|
3
|
+
colors: {
|
4
|
+
primary: '#FF7377',
|
5
|
+
secondary: '#FCEFE6',
|
6
|
+
accent: '#FF7377',
|
7
|
+
background: '#ffffff',
|
8
|
+
surface: '#f8f9fa',
|
9
|
+
text: '#000000',
|
10
|
+
textSecondary: '#666666',
|
11
|
+
textLight: '#f5f5f5',
|
12
|
+
border: '#e1e1e1',
|
13
|
+
error: '#dc3545',
|
14
|
+
warning: '#ffc107',
|
15
|
+
success: '#28a745',
|
16
|
+
info: '#17a2b8',
|
17
|
+
},
|
18
|
+
space: {
|
19
|
+
none: '0px',
|
20
|
+
xs: '4px',
|
21
|
+
sm: '8px',
|
22
|
+
md: '16px',
|
23
|
+
lg: '32px',
|
24
|
+
xl: '64px',
|
25
|
+
'2xl': '128px',
|
26
|
+
},
|
27
|
+
radii: {
|
28
|
+
none: '0px',
|
29
|
+
sm: '4px',
|
30
|
+
md: '8px',
|
31
|
+
lg: '16px',
|
32
|
+
xl: '24px',
|
33
|
+
full: '9999px',
|
34
|
+
},
|
35
|
+
fonts: {
|
36
|
+
body: 'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',
|
37
|
+
heading: 'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',
|
38
|
+
mono: 'ui-monospace, SFMono-Regular, "SF Mono", Monaco, Consolas, monospace',
|
39
|
+
},
|
40
|
+
fontSizes: {
|
41
|
+
xs: '12px',
|
42
|
+
sm: '14px',
|
43
|
+
md: '16px',
|
44
|
+
lg: '18px',
|
45
|
+
xl: '20px',
|
46
|
+
'2xl': '24px',
|
47
|
+
'3xl': '32px',
|
48
|
+
'4xl': '40px',
|
49
|
+
},
|
50
|
+
fontWeights: {
|
51
|
+
light: '300',
|
52
|
+
normal: '400',
|
53
|
+
medium: '500',
|
54
|
+
semibold: '600',
|
55
|
+
bold: '700',
|
56
|
+
},
|
57
|
+
lineHeights: {
|
58
|
+
tight: '1.2',
|
59
|
+
normal: '1.5',
|
60
|
+
relaxed: '1.75',
|
61
|
+
},
|
62
|
+
shadows: {
|
63
|
+
none: 'none',
|
64
|
+
sm: '0 1px 2px rgba(0, 0, 0, 0.05)',
|
65
|
+
md: '0 4px 6px rgba(0, 0, 0, 0.1)',
|
66
|
+
lg: '0 10px 15px rgba(0, 0, 0, 0.1)',
|
67
|
+
xl: '0 20px 25px rgba(0, 0, 0, 0.1)',
|
68
|
+
},
|
69
|
+
maxWidth: '1500px',
|
70
|
+
section: {
|
71
|
+
paddingTop: '48px',
|
72
|
+
paddingBottom: '48px',
|
73
|
+
},
|
74
|
+
header: {
|
75
|
+
height: '80px',
|
76
|
+
},
|
77
|
+
footer: {
|
78
|
+
height: '80px',
|
79
|
+
},
|
80
|
+
};
|
81
|
+
|
82
|
+
export const baseDarkTheme = {
|
83
|
+
colors: {
|
84
|
+
primary: '#1a73e8',
|
85
|
+
secondary: '#374151',
|
86
|
+
accent: '#60a5fa',
|
87
|
+
background: '#111827',
|
88
|
+
surface: '#1f2937',
|
89
|
+
text: '#ffffff',
|
90
|
+
textSecondary: '#9ca3af',
|
91
|
+
textLight: '#f3f4f6',
|
92
|
+
border: '#374151',
|
93
|
+
error: '#ef4444',
|
94
|
+
warning: '#f59e0b',
|
95
|
+
success: '#10b981',
|
96
|
+
info: '#3b82f6',
|
97
|
+
},
|
98
|
+
space: {
|
99
|
+
none: '0px',
|
100
|
+
xs: '4px',
|
101
|
+
sm: '8px',
|
102
|
+
md: '16px',
|
103
|
+
lg: '32px',
|
104
|
+
xl: '64px',
|
105
|
+
'2xl': '128px',
|
106
|
+
},
|
107
|
+
radii: {
|
108
|
+
none: '0px',
|
109
|
+
sm: '4px',
|
110
|
+
md: '8px',
|
111
|
+
lg: '16px',
|
112
|
+
xl: '24px',
|
113
|
+
full: '9999px',
|
114
|
+
},
|
115
|
+
fonts: {
|
116
|
+
body: 'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',
|
117
|
+
heading: 'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',
|
118
|
+
mono: 'ui-monospace, SFMono-Regular, "SF Mono", Monaco, Consolas, monospace',
|
119
|
+
},
|
120
|
+
fontSizes: {
|
121
|
+
xs: '12px',
|
122
|
+
sm: '14px',
|
123
|
+
md: '16px',
|
124
|
+
lg: '18px',
|
125
|
+
xl: '20px',
|
126
|
+
'2xl': '24px',
|
127
|
+
'3xl': '32px',
|
128
|
+
'4xl': '40px',
|
129
|
+
},
|
130
|
+
fontWeights: {
|
131
|
+
light: '300',
|
132
|
+
normal: '400',
|
133
|
+
medium: '500',
|
134
|
+
semibold: '600',
|
135
|
+
bold: '700',
|
136
|
+
},
|
137
|
+
lineHeights: {
|
138
|
+
tight: '1.2',
|
139
|
+
normal: '1.5',
|
140
|
+
relaxed: '1.75',
|
141
|
+
},
|
142
|
+
shadows: {
|
143
|
+
none: 'none',
|
144
|
+
sm: '0 1px 2px rgba(0, 0, 0, 0.1)',
|
145
|
+
md: '0 4px 6px rgba(0, 0, 0, 0.15)',
|
146
|
+
lg: '0 10px 15px rgba(0, 0, 0, 0.2)',
|
147
|
+
xl: '0 20px 25px rgba(0, 0, 0, 0.25)',
|
148
|
+
},
|
149
|
+
maxWidth: '1500px',
|
150
|
+
section: {
|
151
|
+
paddingTop: '48px',
|
152
|
+
paddingBottom: '48px',
|
153
|
+
},
|
154
|
+
header: {
|
155
|
+
height: '80px',
|
156
|
+
},
|
157
|
+
footer: {
|
158
|
+
height: '80px',
|
159
|
+
},
|
160
|
+
};
|
@@ -0,0 +1,6 @@
|
|
1
|
+
// Theme contract and values
|
2
|
+
export { themeContract } from './contract.css';
|
3
|
+
export { baseLightTheme, baseDarkTheme } from './baseThemeValues';
|
4
|
+
|
5
|
+
// Theme utilities
|
6
|
+
export { createThemeOverride, getThemeContract, getThemeValues, toggleTheme, setTheme, getCurrentTheme, type ThemeValues } from './utils';
|