oddsgate-ds 1.0.40 → 1.0.42
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/.storybook/main.ts +3 -3
- package/.storybook/preview.ts +0 -15
- package/package.json +12 -9
- package/rollup.config.js +2 -0
- package/src/components/atoms/Button/Button.stories.tsx +1 -1
- package/src/components/atoms/Counter/Counter.stories.tsx +4 -5
- package/src/components/atoms/Separator/Separator.stories.tsx +1 -1
- package/src/components/atoms/SocialLinks/SocialLinks.stories.tsx +0 -2
- package/src/components/atoms/Spacer/Spacer.stories.tsx +1 -1
- package/src/components/molecules/EventsCard/EventsCard.stories.tsx +3 -1
- package/src/components/molecules/LogosCard/LogosCard.stories.tsx +4 -4
- package/src/components/molecules/ProductCard/ProductCard.stories.tsx +9 -4
- package/src/components/organisms/CircularSlider/CircularSlider.stories.tsx +41 -45
- package/src/components/organisms/Tabs/Tabs.stories.tsx +11 -10
package/.storybook/main.ts
CHANGED
|
@@ -7,15 +7,15 @@ const config: StorybookConfig = {
|
|
|
7
7
|
'@storybook/addon-links',
|
|
8
8
|
'@storybook/addon-essentials',
|
|
9
9
|
'@storybook/addon-interactions',
|
|
10
|
+
'@storybook/addon-webpack5-compiler-swc',
|
|
11
|
+
'@chromatic-com/storybook'
|
|
10
12
|
],
|
|
11
13
|
framework: {
|
|
12
14
|
name: '@storybook/react-webpack5',
|
|
13
15
|
options: {}
|
|
14
16
|
},
|
|
15
17
|
docs: {
|
|
16
|
-
|
|
17
|
-
autodocs: 'tag',
|
|
18
|
-
defaultName: 'Documentation',
|
|
18
|
+
defaultName: 'Documentation'
|
|
19
19
|
},
|
|
20
20
|
typescript: {
|
|
21
21
|
check: false,
|
package/.storybook/preview.ts
CHANGED
|
@@ -1,24 +1,9 @@
|
|
|
1
1
|
import GlobalStyles from './../src/styles/Global'
|
|
2
|
-
import type { Preview } from "@storybook/react";
|
|
3
2
|
import { withThemeFromJSXProvider } from '@storybook/addon-styling';
|
|
4
3
|
|
|
5
|
-
const preview: Preview = {
|
|
6
|
-
parameters: {
|
|
7
|
-
actions: { argTypesRegex: "^on[A-Z].*" },
|
|
8
|
-
controls: {
|
|
9
|
-
matchers: {
|
|
10
|
-
color: /(background|color)$/i,
|
|
11
|
-
date: /Date$/,
|
|
12
|
-
},
|
|
13
|
-
},
|
|
14
|
-
},
|
|
15
|
-
};
|
|
16
|
-
|
|
17
4
|
export const decorators = [
|
|
18
5
|
withThemeFromJSXProvider({
|
|
19
6
|
GlobalStyles, // Adds your GlobalStyle component to all stories
|
|
20
7
|
}),
|
|
21
8
|
];
|
|
22
9
|
|
|
23
|
-
|
|
24
|
-
export default preview;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oddsgate-ds",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.42",
|
|
4
4
|
"description": "Miew theme component library",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -28,19 +28,21 @@
|
|
|
28
28
|
"author": "Rui Correia <rui.correia@miew.pt>",
|
|
29
29
|
"license": "MIT",
|
|
30
30
|
"devDependencies": {
|
|
31
|
+
"@chromatic-com/storybook": "^1",
|
|
31
32
|
"@rollup/plugin-commonjs": "^25.0.0",
|
|
32
33
|
"@rollup/plugin-node-resolve": "^15.0.2",
|
|
33
34
|
"@rollup/plugin-replace": "^5.0.2",
|
|
34
35
|
"@rollup/plugin-sucrase": "^5.0.1",
|
|
35
36
|
"@rollup/plugin-typescript": "^11.1.1",
|
|
36
|
-
"@storybook/addon-essentials": "^
|
|
37
|
-
"@storybook/addon-interactions": "^
|
|
38
|
-
"@storybook/addon-links": "^
|
|
37
|
+
"@storybook/addon-essentials": "^8.1.5",
|
|
38
|
+
"@storybook/addon-interactions": "^8.1.5",
|
|
39
|
+
"@storybook/addon-links": "^8.1.5",
|
|
39
40
|
"@storybook/addon-styling": "^1.3.2",
|
|
40
|
-
"@storybook/
|
|
41
|
-
"@storybook/
|
|
42
|
-
"@storybook/react
|
|
43
|
-
"@storybook/
|
|
41
|
+
"@storybook/addon-webpack5-compiler-swc": "^1.0.3",
|
|
42
|
+
"@storybook/blocks": "^8.1.5",
|
|
43
|
+
"@storybook/react": "^8.1.5",
|
|
44
|
+
"@storybook/react-webpack5": "^8.1.5",
|
|
45
|
+
"@storybook/test": "^8.1.5",
|
|
44
46
|
"@types/react": "^18.2.14",
|
|
45
47
|
"@types/react-dom": "^18.2.6",
|
|
46
48
|
"babel-plugin-styled-components": "^2.1.4",
|
|
@@ -62,8 +64,9 @@
|
|
|
62
64
|
"rollup-plugin-terser": "^7.0.2",
|
|
63
65
|
"sass": "^1.63.6",
|
|
64
66
|
"sass-loader": "^13.3.1",
|
|
65
|
-
"storybook": "^
|
|
67
|
+
"storybook": "^8.1.5",
|
|
66
68
|
"style-loader": "^3.3.3",
|
|
69
|
+
"styled-components": "^6.1.11",
|
|
67
70
|
"stylelint": "^15.10.2",
|
|
68
71
|
"stylelint-config-standard": "^34.0.0",
|
|
69
72
|
"tslib": "^2.5.2",
|
package/rollup.config.js
CHANGED
|
@@ -35,12 +35,14 @@ export default [
|
|
|
35
35
|
format: 'cjs',
|
|
36
36
|
sourcemap: true,
|
|
37
37
|
interop: 'compat',
|
|
38
|
+
// manualChunks: true,
|
|
38
39
|
},
|
|
39
40
|
{
|
|
40
41
|
file: packageJson.module,
|
|
41
42
|
format: 'esm',
|
|
42
43
|
sourcemap: true,
|
|
43
44
|
interop: 'compat',
|
|
45
|
+
// manualChunks: true,
|
|
44
46
|
}
|
|
45
47
|
],
|
|
46
48
|
plugins: [
|
|
@@ -16,15 +16,14 @@ export default {
|
|
|
16
16
|
export const Example: StoryObj<ICounter> = {
|
|
17
17
|
render: args => (
|
|
18
18
|
<>
|
|
19
|
-
<div style={{ height:
|
|
20
|
-
</div>
|
|
19
|
+
<div style={{ height: '2000px' }}></div>
|
|
21
20
|
<Counter {...args}></Counter>
|
|
22
21
|
</>
|
|
23
22
|
),
|
|
24
23
|
args: {
|
|
25
|
-
title:
|
|
24
|
+
title: 'lorem ipsum',
|
|
26
25
|
number: 30,
|
|
27
|
-
prefix:
|
|
28
|
-
suffix:
|
|
26
|
+
prefix: '+',
|
|
27
|
+
suffix: '%'
|
|
29
28
|
}
|
|
30
29
|
}
|
|
@@ -12,7 +12,6 @@ export default {
|
|
|
12
12
|
argTypes: {}
|
|
13
13
|
} as Meta
|
|
14
14
|
|
|
15
|
-
|
|
16
15
|
export const Example: StoryObj<ISocialLinks> = {
|
|
17
16
|
args: {
|
|
18
17
|
variant: 'text',
|
|
@@ -25,7 +24,6 @@ export const Example: StoryObj<ISocialLinks> = {
|
|
|
25
24
|
}
|
|
26
25
|
}
|
|
27
26
|
|
|
28
|
-
|
|
29
27
|
export const Light: StoryObj<ISocialLinks> = {
|
|
30
28
|
render: args => <SocialLinks {...args} />,
|
|
31
29
|
args: {
|
|
@@ -23,7 +23,9 @@ const image = (
|
|
|
23
23
|
)
|
|
24
24
|
|
|
25
25
|
export const Simple: StoryObj<IEventsCard> = {
|
|
26
|
-
render: args =>
|
|
26
|
+
render: args => (
|
|
27
|
+
<EventsCard {...args} style={{ maxWidth: '320px' }}></EventsCard>
|
|
28
|
+
),
|
|
27
29
|
args: {
|
|
28
30
|
date: '24 nov 23',
|
|
29
31
|
category: 'Category name',
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
2
|
|
|
3
|
-
import { ILogosCard } from './LogosCard.interface'
|
|
4
|
-
import LogosCard from './LogosCard.component'
|
|
5
|
-
import React from 'react'
|
|
3
|
+
import { ILogosCard } from './LogosCard.interface'
|
|
4
|
+
import LogosCard from './LogosCard.component'
|
|
5
|
+
import React from 'react'
|
|
6
6
|
|
|
7
7
|
// More on default export: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
|
|
8
8
|
export default {
|
|
@@ -33,6 +33,6 @@ export const Simple: StoryObj<ILogosCard> = {
|
|
|
33
33
|
),
|
|
34
34
|
args: {
|
|
35
35
|
imageElement: image,
|
|
36
|
-
title:
|
|
36
|
+
title: 'Logo Teste'
|
|
37
37
|
}
|
|
38
38
|
}
|
|
@@ -23,15 +23,20 @@ const image = (
|
|
|
23
23
|
)
|
|
24
24
|
|
|
25
25
|
export const Simple: StoryObj<IProductCard> = {
|
|
26
|
-
render: args =>
|
|
26
|
+
render: args => (
|
|
27
27
|
<>
|
|
28
|
-
<ProductCard
|
|
28
|
+
<ProductCard
|
|
29
|
+
{...args}
|
|
30
|
+
title="Lorem"
|
|
31
|
+
style={{ maxWidth: '320px' }}
|
|
32
|
+
></ProductCard>
|
|
29
33
|
<ProductCard {...args} style={{ maxWidth: '320px' }}></ProductCard>
|
|
30
|
-
|
|
34
|
+
</>
|
|
35
|
+
),
|
|
31
36
|
args: {
|
|
32
37
|
title: 'Cras vel facilisis tellus',
|
|
33
38
|
imageElement: image,
|
|
34
39
|
description:
|
|
35
|
-
'Cras vel facilisis tellus, id iaculis risus. Vestibulum non mollis ipsum. Vestibulum faucibus nisl sit amet magna interdum tristique. Cras vel facilisis tellus, id iaculis risus. Vestibulum non mollis ipsum. Vestibulum faucibus nisl sit amet magna interdum tristique.'
|
|
40
|
+
'Cras vel facilisis tellus, id iaculis risus. Vestibulum non mollis ipsum. Vestibulum faucibus nisl sit amet magna interdum tristique. Cras vel facilisis tellus, id iaculis risus. Vestibulum non mollis ipsum. Vestibulum faucibus nisl sit amet magna interdum tristique.'
|
|
36
41
|
}
|
|
37
42
|
}
|
|
@@ -23,111 +23,107 @@ const image = (
|
|
|
23
23
|
)
|
|
24
24
|
|
|
25
25
|
export const Simple: StoryObj<ICircularSlider> = {
|
|
26
|
-
render: args =>
|
|
27
|
-
<CircularSlider {...args}>
|
|
28
|
-
|
|
29
|
-
</CircularSlider>
|
|
30
|
-
),
|
|
26
|
+
render: args => <CircularSlider {...args}></CircularSlider>,
|
|
31
27
|
args: {
|
|
32
28
|
content: [
|
|
33
29
|
{
|
|
34
|
-
name:
|
|
35
|
-
role:
|
|
30
|
+
name: 'My name 1',
|
|
31
|
+
role: 'My role',
|
|
36
32
|
img: image
|
|
37
33
|
},
|
|
38
34
|
{
|
|
39
|
-
name:
|
|
40
|
-
role:
|
|
35
|
+
name: 'My name 2',
|
|
36
|
+
role: 'My role',
|
|
41
37
|
img: image
|
|
42
38
|
},
|
|
43
39
|
{
|
|
44
|
-
name:
|
|
45
|
-
role:
|
|
40
|
+
name: 'My name 3',
|
|
41
|
+
role: 'My role',
|
|
46
42
|
img: image
|
|
47
43
|
},
|
|
48
44
|
{
|
|
49
|
-
name:
|
|
50
|
-
role:
|
|
45
|
+
name: 'My name 4',
|
|
46
|
+
role: 'My role',
|
|
51
47
|
img: image
|
|
52
48
|
},
|
|
53
49
|
{
|
|
54
|
-
name:
|
|
55
|
-
role:
|
|
50
|
+
name: 'My name 5',
|
|
51
|
+
role: 'My role',
|
|
56
52
|
img: image
|
|
57
53
|
},
|
|
58
54
|
{
|
|
59
|
-
name:
|
|
60
|
-
role:
|
|
55
|
+
name: 'My name 6',
|
|
56
|
+
role: 'My role',
|
|
61
57
|
img: image
|
|
62
58
|
},
|
|
63
59
|
{
|
|
64
|
-
name:
|
|
65
|
-
role:
|
|
60
|
+
name: 'My name 7',
|
|
61
|
+
role: 'My role',
|
|
66
62
|
img: image
|
|
67
63
|
},
|
|
68
64
|
{
|
|
69
|
-
name:
|
|
70
|
-
role:
|
|
65
|
+
name: 'My name 9',
|
|
66
|
+
role: 'My role',
|
|
71
67
|
img: image
|
|
72
68
|
},
|
|
73
69
|
{
|
|
74
|
-
name:
|
|
75
|
-
role:
|
|
70
|
+
name: 'My name 9',
|
|
71
|
+
role: 'My role',
|
|
76
72
|
img: image
|
|
77
73
|
},
|
|
78
74
|
{
|
|
79
|
-
name:
|
|
80
|
-
role:
|
|
75
|
+
name: 'My name 10',
|
|
76
|
+
role: 'My role',
|
|
81
77
|
img: image
|
|
82
78
|
},
|
|
83
79
|
{
|
|
84
|
-
name:
|
|
85
|
-
role:
|
|
80
|
+
name: 'My name 11',
|
|
81
|
+
role: 'My role',
|
|
86
82
|
img: image
|
|
87
83
|
},
|
|
88
84
|
{
|
|
89
|
-
name:
|
|
90
|
-
role:
|
|
85
|
+
name: 'My name 1§2',
|
|
86
|
+
role: 'My role',
|
|
91
87
|
img: image
|
|
92
88
|
},
|
|
93
89
|
{
|
|
94
|
-
name:
|
|
95
|
-
role:
|
|
90
|
+
name: 'My name 13',
|
|
91
|
+
role: 'My role',
|
|
96
92
|
img: image
|
|
97
93
|
},
|
|
98
94
|
{
|
|
99
|
-
name:
|
|
100
|
-
role:
|
|
95
|
+
name: 'My name 14',
|
|
96
|
+
role: 'My role',
|
|
101
97
|
img: image
|
|
102
98
|
},
|
|
103
99
|
{
|
|
104
|
-
name:
|
|
105
|
-
role:
|
|
100
|
+
name: 'My name 15',
|
|
101
|
+
role: 'My role',
|
|
106
102
|
img: image
|
|
107
103
|
},
|
|
108
104
|
{
|
|
109
|
-
name:
|
|
110
|
-
role:
|
|
105
|
+
name: 'My name 16',
|
|
106
|
+
role: 'My role',
|
|
111
107
|
img: image
|
|
112
108
|
},
|
|
113
109
|
{
|
|
114
|
-
name:
|
|
115
|
-
role:
|
|
110
|
+
name: 'My name 17',
|
|
111
|
+
role: 'My role',
|
|
116
112
|
img: image
|
|
117
113
|
},
|
|
118
114
|
{
|
|
119
|
-
name:
|
|
120
|
-
role:
|
|
115
|
+
name: 'My name 19',
|
|
116
|
+
role: 'My role',
|
|
121
117
|
img: image
|
|
122
118
|
},
|
|
123
119
|
{
|
|
124
|
-
name:
|
|
125
|
-
role:
|
|
120
|
+
name: 'My name 19',
|
|
121
|
+
role: 'My role',
|
|
126
122
|
img: image
|
|
127
123
|
},
|
|
128
124
|
{
|
|
129
|
-
name:
|
|
130
|
-
role:
|
|
125
|
+
name: 'My name 20',
|
|
126
|
+
role: 'My role',
|
|
131
127
|
img: image
|
|
132
128
|
}
|
|
133
129
|
]
|
|
@@ -14,7 +14,7 @@ export default {
|
|
|
14
14
|
export const Simple: StoryObj<ITabs> = {
|
|
15
15
|
render: args => <Tabs {...args}></Tabs>,
|
|
16
16
|
args: {
|
|
17
|
-
title:
|
|
17
|
+
title: 'Lorem ipsum dolor sit amet',
|
|
18
18
|
vertical: true,
|
|
19
19
|
menu: [
|
|
20
20
|
{
|
|
@@ -31,8 +31,8 @@ export const Simple: StoryObj<ITabs> = {
|
|
|
31
31
|
culpa qui officia deserunt mollit anim id est laborum.
|
|
32
32
|
</RichText>
|
|
33
33
|
),
|
|
34
|
-
onClick: () =>{
|
|
35
|
-
alert(
|
|
34
|
+
onClick: () => {
|
|
35
|
+
alert('Tab clicked')
|
|
36
36
|
}
|
|
37
37
|
},
|
|
38
38
|
{
|
|
@@ -46,12 +46,13 @@ export const Simple: StoryObj<ITabs> = {
|
|
|
46
46
|
aliquip ex ea commodo consequat. Duis aute irure dolor in
|
|
47
47
|
reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
|
|
48
48
|
pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
|
|
49
|
-
culpa qui officia deserunt mollit anim id est eiusmod tempor
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
49
|
+
culpa qui officia deserunt mollit anim id est eiusmod tempor
|
|
50
|
+
incididunt ut labore et dolore magna aliqua. Ut enim ad minim
|
|
51
|
+
veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex
|
|
52
|
+
ea commodo consequat. Duis aute irure dolor in reprehenderit in
|
|
53
|
+
voluptate velit esse cillum dolore eu fugiat nulla pariatur.
|
|
54
|
+
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui
|
|
55
|
+
officia deserunt mollit anim id est laborum.
|
|
55
56
|
</RichText>
|
|
56
57
|
)
|
|
57
58
|
},
|
|
@@ -112,6 +113,6 @@ export const Simple: StoryObj<ITabs> = {
|
|
|
112
113
|
</RichText>
|
|
113
114
|
)
|
|
114
115
|
}
|
|
115
|
-
]
|
|
116
|
+
]
|
|
116
117
|
}
|
|
117
118
|
}
|