@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ssa-ui-kit/core",
3
- "version": "1.0.1",
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/hooks": "^1.0.0",
33
- "@ssa-ui-kit/utils": "^1.0.0"
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, Source } from '@storybook/addon-docs';
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
- <Source code={`<CollapsibleNavBar />`} />
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
- export const WithCustomIcon = {
60
- title: 'With Custom Icon',
61
- component: CollapsibleNavBar,
62
- parameters: {
63
- layout: 'fullscreen',
64
- },
65
- args: {
66
- items: [
67
- ...ITEMS,
68
- {
69
- path: 'custom',
70
- CustomIcon,
71
- title: 'Item with custom icon',
72
- },
73
- ],
74
- renderLogo: <Logo />,
75
- onChange: (isChecked) => {
76
- console.log('>>>onChange', isChecked);
77
- },
78
- },
79
- } as Meta<typeof CollapsibleNavBar>;
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(100).fill(1).map((_, index) => (
39
+ {new Array(30).fill(1).map((_, index) => (
40
40
  <NotificationCard
41
41
  key={index}
42
42
  title="CyberVeinToken is Now Available"
@@ -74,7 +74,7 @@ export const Filters = ({
74
74
  <FilterBlockWrapper>
75
75
  <FiltersBlock />
76
76
  </FilterBlockWrapper>
77
- <Wrapper css={{ width: 110 }}>
77
+ <Wrapper css={{ width: 110, zIndex: 1 }}>
78
78
  <TableFilters
79
79
  {...useTableDataResult}
80
80
  checkboxData={hiddenCheckboxData}
@@ -23,7 +23,7 @@ const DropdownOptionsBase = styled.ul<{ tabindex?: string }>`
23
23
  overflow-x: hidden;
24
24
  overflow-y: auto;
25
25
 
26
- z-index: 2;
26
+ z-index: 1;
27
27
 
28
28
  filter: ${({ theme }) =>
29
29
  `drop-shadow(-4px 4px 14px ${theme.colors.greyDarker14})`};
@@ -21,10 +21,12 @@ export const Default: StoryObj<typeof ResponsiveImage> = () => {
21
21
  tag
22
22
  </Typography>
23
23
  <ResponsiveImage
24
- srcSet="https://placehold.co/64x64 64w, https://placehold.co/48x48 48w"
25
- sizes="(min-width: 1440px) 64px, 48px"
26
- src="https://placehold.co/48x48"
27
- alt="Steps"
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
  );
@@ -6,6 +6,7 @@ export const tableFilterPopoverContentStyles = (theme: Theme) => css`
6
6
  padding: 20px 20px 14px 18px;
7
7
  width: 340px;
8
8
  background: ${theme.colors.white};
9
+ z-index: 1;
9
10
  `;
10
11
 
11
12
  export const tableFilterDividerStyles = (theme: Theme) => css`
@@ -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 onClick={() => console.log('calling action...')}>Action</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
  );