@ssa-ui-kit/core 1.0.1 → 1.0.2
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/style.css +9 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/src/components/CollapsibleNavBar/stories/CollapsibleNavBar.stories.tsx +47 -25
- package/src/components/CollapsibleNavBar/stories/Layout.tsx +1 -1
- package/src/components/Filters/Filters.tsx +1 -1
- package/src/components/MultipleDropdownOptions/MultipleDropdownOptions.tsx +1 -1
- package/src/components/ResponsiveImage/ResponsiveImage.stories.tsx +6 -4
- package/src/components/TableFilters/styles.ts +1 -0
- package/src/components/TextField/TextField.stories.tsx +8 -1
- package/tsbuildcache +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ssa-ui-kit/core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"private": false,
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"loose-envify": "^1.4.0",
|
|
30
30
|
"scheduler": "^0.23.0",
|
|
31
31
|
"uuid": "^9.0.0",
|
|
32
|
-
"@ssa-ui-kit/
|
|
33
|
-
"@ssa-ui-kit/
|
|
32
|
+
"@ssa-ui-kit/utils": "^1.0.0",
|
|
33
|
+
"@ssa-ui-kit/hooks": "^1.0.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@emotion/jest": "^11.11.0",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Fragment } from 'react';
|
|
2
2
|
import { Routes, Route, MemoryRouter } from 'react-router-dom';
|
|
3
|
-
import { Meta } from '@storybook/react';
|
|
4
|
-
import { Title, Description,
|
|
3
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
4
|
+
import { Title, Description, Subtitle, Stories } from '@storybook/addon-docs';
|
|
5
5
|
|
|
6
6
|
import { DecoratorFunction } from '@storybook/types';
|
|
7
7
|
import { CollapsibleNavBar } from '../CollapsibleNavBar';
|
|
@@ -35,11 +35,17 @@ export default {
|
|
|
35
35
|
parameters: {
|
|
36
36
|
layout: 'fullscreen',
|
|
37
37
|
docs: {
|
|
38
|
+
source: {
|
|
39
|
+
type: 'code',
|
|
40
|
+
},
|
|
38
41
|
page: () => (
|
|
39
42
|
<Fragment>
|
|
40
43
|
<Title />
|
|
44
|
+
<Subtitle />
|
|
41
45
|
<Description />
|
|
42
|
-
<
|
|
46
|
+
<div css={{ height: 300 }}>
|
|
47
|
+
<Stories />
|
|
48
|
+
</div>
|
|
43
49
|
</Fragment>
|
|
44
50
|
),
|
|
45
51
|
},
|
|
@@ -54,26 +60,42 @@ export default {
|
|
|
54
60
|
},
|
|
55
61
|
} as Meta<typeof CollapsibleNavBar>;
|
|
56
62
|
|
|
57
|
-
export const Default = {
|
|
63
|
+
export const Default: StoryObj<typeof CollapsibleNavBar> = () => {
|
|
64
|
+
return (
|
|
65
|
+
<CollapsibleNavBar
|
|
66
|
+
items={ITEMS}
|
|
67
|
+
renderLogo={<Logo />}
|
|
68
|
+
onChange={(isChecked) => {
|
|
69
|
+
console.log('>>>onChange', isChecked);
|
|
70
|
+
}}
|
|
71
|
+
/>
|
|
72
|
+
);
|
|
73
|
+
};
|
|
58
74
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
75
|
+
Default.args = {};
|
|
76
|
+
|
|
77
|
+
export const WithCustomIcon: Meta<typeof CollapsibleNavBar> = () => {
|
|
78
|
+
return (
|
|
79
|
+
<CollapsibleNavBar
|
|
80
|
+
items={[
|
|
81
|
+
...ITEMS,
|
|
82
|
+
{
|
|
83
|
+
path: 'custom',
|
|
84
|
+
CustomIcon,
|
|
85
|
+
title: 'Item with custom icon',
|
|
86
|
+
iconSize: 22,
|
|
87
|
+
iconName: 'archive',
|
|
88
|
+
},
|
|
89
|
+
]}
|
|
90
|
+
renderLogo={<Logo />}
|
|
91
|
+
onChange={(isChecked) => {
|
|
92
|
+
console.log('>>>onChange', isChecked);
|
|
93
|
+
}}
|
|
94
|
+
/>
|
|
95
|
+
);
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
WithCustomIcon.title = 'With Custom Icon';
|
|
99
|
+
WithCustomIcon.parameters = {
|
|
100
|
+
layout: 'fullscreen',
|
|
101
|
+
};
|
|
@@ -36,7 +36,7 @@ export const Layout = ({ children }: { children: React.ReactNode }) => {
|
|
|
36
36
|
}}>
|
|
37
37
|
{children}
|
|
38
38
|
<Main>
|
|
39
|
-
{new Array(
|
|
39
|
+
{new Array(30).fill(1).map((_, index) => (
|
|
40
40
|
<NotificationCard
|
|
41
41
|
key={index}
|
|
42
42
|
title="CyberVeinToken is Now Available"
|
|
@@ -21,10 +21,12 @@ export const Default: StoryObj<typeof ResponsiveImage> = () => {
|
|
|
21
21
|
tag
|
|
22
22
|
</Typography>
|
|
23
23
|
<ResponsiveImage
|
|
24
|
-
srcSet=
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
srcSet={`
|
|
25
|
+
https://firebasestorage.googleapis.com/v0/b/admin-themes.appspot.com/o/logo%2FUI_KIT_Medium_90_51.png?alt=media&token=6761e4f3-b985-4322-8824-0c9668a2e2d9 90w,
|
|
26
|
+
https://firebasestorage.googleapis.com/v0/b/admin-themes.appspot.com/o/logo%2FUI_KIT_Small_80_49.png?alt=media&token=910e7a01-8127-4e2e-88e6-1b85805d7beb 80w`}
|
|
27
|
+
sizes="(max-width: 900px) 80px, (min-width: 900px) 90px"
|
|
28
|
+
src="https://firebasestorage.googleapis.com/v0/b/admin-themes.appspot.com/o/logo%2FUI_KIT_Small_80_49.png?alt=media&token=910e7a01-8127-4e2e-88e6-1b85805d7beb"
|
|
29
|
+
alt="SSA UI Kit"
|
|
28
30
|
/>
|
|
29
31
|
</div>
|
|
30
32
|
);
|
|
@@ -148,7 +148,14 @@ export const WithAction: StoryObj<typeof TextField> = () => {
|
|
|
148
148
|
register={register}
|
|
149
149
|
helperText="some nice text"
|
|
150
150
|
endElement={
|
|
151
|
-
<button
|
|
151
|
+
<button
|
|
152
|
+
onClick={(event) => {
|
|
153
|
+
event.stopPropagation();
|
|
154
|
+
event.preventDefault();
|
|
155
|
+
console.log('calling action...');
|
|
156
|
+
}}>
|
|
157
|
+
Action
|
|
158
|
+
</button>
|
|
152
159
|
}
|
|
153
160
|
/>
|
|
154
161
|
);
|