@antscorp/antsomi-ui 1.3.5-beta.63 → 1.3.5-beta.64

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 (19) hide show
  1. package/es/components/template/TemplateListing/components/CategoryListing/styled.js +4 -4
  2. package/es/components/template/TemplateListing/stories/dataTypes/components/BlankTemplatePropsTable/index.d.ts +2 -0
  3. package/es/components/template/TemplateListing/stories/dataTypes/components/BlankTemplatePropsTable/index.js +44 -0
  4. package/es/components/template/TemplateListing/stories/dataTypes/components/CategoryListingPropsTable/index.d.ts +2 -0
  5. package/es/components/template/TemplateListing/stories/dataTypes/components/CategoryListingPropsTable/index.js +53 -0
  6. package/es/components/template/TemplateListing/stories/dataTypes/components/DataTypeTables/index.d.ts +2 -0
  7. package/es/components/template/TemplateListing/stories/dataTypes/components/DataTypeTables/index.js +68 -0
  8. package/es/components/template/TemplateListing/stories/dataTypes/components/EmptyPropsTable/index.d.ts +2 -0
  9. package/es/components/template/TemplateListing/stories/dataTypes/components/EmptyPropsTable/index.js +28 -0
  10. package/es/components/template/TemplateListing/stories/dataTypes/components/TemplatesPropsTable/index.d.ts +2 -0
  11. package/es/components/template/TemplateListing/stories/dataTypes/components/TemplatesPropsTable/index.js +46 -0
  12. package/es/components/template/TemplateListing/stories/dataTypes/components/index.d.ts +5 -0
  13. package/es/components/template/TemplateListing/stories/dataTypes/components/index.js +5 -0
  14. package/es/components/template/TemplateListing/stories/demo/styled.d.ts +1 -0
  15. package/es/components/template/TemplateListing/stories/demo/styled.js +7 -0
  16. package/es/components/template/TemplateListing/styled/index.d.ts +0 -1
  17. package/es/components/template/TemplateListing/styled/index.js +0 -5
  18. package/es/components/template/TemplateListing/types/BlankTemplate.d.ts +1 -1
  19. package/package.json +1 -1
@@ -10,9 +10,8 @@ export const MenuWrapper = styled.div `
10
10
  overflow-x: hidden;
11
11
  border-right: 1px solid rgba(5, 5, 5, 0.06);
12
12
 
13
- .antsomi-menu {
14
- height: 100%;
15
-
13
+ .antsomi-menu,
14
+ .ant-menu {
16
15
  [role='menuitem'] {
17
16
  width: 100%;
18
17
  border-radius: 0;
@@ -21,7 +20,8 @@ export const MenuWrapper = styled.div `
21
20
  margin-left: 0 !important;
22
21
  margin-right: 0 !important;
23
22
 
24
- .antsomi-menu-title-content {
23
+ .antsomi-menu-title-content,
24
+ .ant-menu-title-content {
25
25
  height: 100%;
26
26
  }
27
27
  }
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const BlankTemplatePropsTable: React.FC;
@@ -0,0 +1,44 @@
1
+ // Libraries
2
+ import React from 'react';
3
+ // Components
4
+ import { Table } from '../../../../../../organism';
5
+ import { Tag, Typography, Flex } from '../../../../../../atoms';
6
+ // Constants
7
+ import { TABLE_API_COLUMNS } from '@antscorp/antsomi-ui/es/constants';
8
+ export const BlankTemplatePropsTable = () => {
9
+ const dataSource = [
10
+ {
11
+ key: '1',
12
+ property: 'show',
13
+ description: (React.createElement(Flex, { gap: 10, vertical: true },
14
+ React.createElement(Typography.Text, null, "Handler show or hide Blank Template"))),
15
+ type: React.createElement(Tag, { color: "processing" }, "boolean"),
16
+ default: React.createElement(Tag, { bordered: false }, "false"),
17
+ },
18
+ {
19
+ key: '2',
20
+ property: 'description',
21
+ description: (React.createElement(Flex, { gap: 10, vertical: true },
22
+ React.createElement(Typography.Text, null, "The text that is displayed below the Add Button"))),
23
+ type: React.createElement(Tag, { color: "processing" }, "string"),
24
+ default: React.createElement(Tag, { bordered: false }, "Blank Template"),
25
+ },
26
+ {
27
+ key: '3',
28
+ property: 'onClick',
29
+ description: (React.createElement(Flex, { gap: 10, vertical: true },
30
+ React.createElement(Typography.Text, null, "Callback onClick on Blank Template"))),
31
+ type: React.createElement(Tag, { color: "processing" }, 'React.MouseEventHandler<HTMLElement>'),
32
+ default: React.createElement(Tag, { bordered: false }, " - "),
33
+ },
34
+ {
35
+ key: '4',
36
+ property: 'blankTemplateRender',
37
+ description: (React.createElement(Flex, { gap: 10, vertical: true },
38
+ React.createElement(Typography.Text, null, "Render Blank Template node for customizing"))),
39
+ type: React.createElement(Tag, { color: "processing" }, '(node: ReactNode) => ReactNode'),
40
+ default: React.createElement(Tag, { bordered: false }, " - "),
41
+ },
42
+ ];
43
+ return React.createElement(Table, { dataSource: dataSource, columns: TABLE_API_COLUMNS, pagination: false });
44
+ };
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const CategoryListingPropsTable: React.FC;
@@ -0,0 +1,53 @@
1
+ // Libraries
2
+ import React from 'react';
3
+ // Components
4
+ import { Table } from '../../../../../../organism';
5
+ import { Tag, Typography, Flex } from '../../../../../../atoms';
6
+ // Constants
7
+ import { TABLE_API_COLUMNS } from '@antscorp/antsomi-ui/es/constants';
8
+ import { CATEGORY_LISTING_WITH } from '../../../../constants';
9
+ export const CategoryListingPropsTable = () => {
10
+ const dataSource = [
11
+ {
12
+ key: '1',
13
+ property: 'items',
14
+ description: (React.createElement(Flex, { gap: 10, vertical: true },
15
+ React.createElement(Typography.Text, null, "List of category items"))),
16
+ type: React.createElement(Tag, { color: "processing" }, "TCategoryItem [ ]"),
17
+ default: React.createElement(Tag, { bordered: false }, "[ ]"),
18
+ },
19
+ {
20
+ key: '2',
21
+ property: 'width',
22
+ description: (React.createElement(Flex, { gap: 10, vertical: true },
23
+ React.createElement(Typography.Text, null, "Width of category"))),
24
+ type: React.createElement(Tag, { color: "processing" }, "number"),
25
+ default: React.createElement(Tag, { bordered: false }, CATEGORY_LISTING_WITH),
26
+ },
27
+ {
28
+ key: '3',
29
+ property: 'loading',
30
+ description: (React.createElement(Flex, { gap: 10, vertical: true },
31
+ React.createElement(Typography.Text, null, "Show loading category listing"))),
32
+ type: React.createElement(Tag, { color: "processing" }, "boolean"),
33
+ default: React.createElement(Tag, { bordered: false }, "false"),
34
+ },
35
+ {
36
+ key: '4',
37
+ property: 'show',
38
+ description: (React.createElement(Flex, { gap: 10, vertical: true },
39
+ React.createElement(Typography.Text, null, "Handler show or hide category"))),
40
+ type: React.createElement(Tag, { color: "processing" }, "boolean"),
41
+ default: React.createElement(Tag, { bordered: false }, "true"),
42
+ },
43
+ {
44
+ key: '5',
45
+ property: 'checkedCategories',
46
+ description: (React.createElement(Flex, { gap: 10, vertical: true },
47
+ React.createElement(Typography.Text, null, "Record of checked categories"))),
48
+ type: React.createElement(Tag, { color: "processing" }, "TCheckedCategories"),
49
+ default: React.createElement(Tag, { bordered: false }, '{ }'),
50
+ },
51
+ ];
52
+ return React.createElement(Table, { dataSource: dataSource, columns: TABLE_API_COLUMNS, pagination: false });
53
+ };
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const DataTypeTable: React.FC;
@@ -0,0 +1,68 @@
1
+ // Libraries
2
+ import React from 'react';
3
+ import { Tag, Table } from '@antscorp/antsomi-ui/es/index';
4
+ import LinkTo from '@storybook/addon-links/react';
5
+ export const DataTypeTable = () => {
6
+ const columns = [
7
+ {
8
+ title: 'Name',
9
+ dataIndex: 'name',
10
+ key: 'name',
11
+ },
12
+ {
13
+ title: 'Type',
14
+ dataIndex: 'type',
15
+ key: 'type',
16
+ },
17
+ {
18
+ title: 'Description',
19
+ dataIndex: 'description',
20
+ key: 'description',
21
+ },
22
+ ];
23
+ const dataSource = [
24
+ {
25
+ key: 'templatesProps',
26
+ name: 'templatesProps',
27
+ type: (React.createElement(LinkTo, { story: "templates-props" },
28
+ React.createElement(Tag, { color: "processing" }, "templatesProps"))),
29
+ description: '-',
30
+ },
31
+ {
32
+ key: 'templateItemProps',
33
+ name: 'templateItemProps',
34
+ type: (React.createElement("a", { href: "../?path=/docs/molecules-thumbnailcard--default", target: "_blank" },
35
+ React.createElement(Tag, { color: "processing" }, "templateItemProps"))),
36
+ description: '-',
37
+ },
38
+ {
39
+ key: 'categoryListingProps',
40
+ name: 'categoryListingProps',
41
+ type: (React.createElement(LinkTo, { story: "category-listing-props" },
42
+ React.createElement(Tag, { color: "processing" }, "categoryListingProps"))),
43
+ description: '-',
44
+ },
45
+ {
46
+ key: 'blankTemplateProps',
47
+ name: 'blankTemplateProps',
48
+ type: (React.createElement(LinkTo, { story: "blank-template-props" },
49
+ React.createElement(Tag, { color: "processing" }, "blankTemplateProps"))),
50
+ description: '-',
51
+ },
52
+ {
53
+ key: 'previewModalProps',
54
+ name: 'previewModalProps',
55
+ type: (React.createElement("a", { href: "../?path=/docs/organisms-previewtemplatemodal--default", target: "_blank" },
56
+ React.createElement(Tag, { color: "processing" }, "previewModalProps"))),
57
+ description: '-',
58
+ },
59
+ {
60
+ key: 'emptyProps',
61
+ name: 'emptyProps',
62
+ type: (React.createElement(LinkTo, { story: "empty-props" },
63
+ React.createElement(Tag, { color: "processing" }, "emptyProps"))),
64
+ description: '-',
65
+ },
66
+ ];
67
+ return React.createElement(Table, { dataSource: dataSource, columns: columns, pagination: false });
68
+ };
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const EmptyPropsTable: React.FC;
@@ -0,0 +1,28 @@
1
+ // Libraries
2
+ import React from 'react';
3
+ // Components
4
+ import { Table } from '../../../../../../organism';
5
+ import { Tag, Typography, Flex } from '../../../../../../atoms';
6
+ // Constants
7
+ import { TABLE_API_COLUMNS } from '@antscorp/antsomi-ui/es/constants';
8
+ export const EmptyPropsTable = () => {
9
+ const dataSource = [
10
+ {
11
+ key: '1',
12
+ property: 'icon',
13
+ description: (React.createElement(Flex, { gap: 10, vertical: true },
14
+ React.createElement(Typography.Text, null, "Customize Empty icon"))),
15
+ type: React.createElement(Tag, { color: "processing" }, "ReactNode"),
16
+ default: React.createElement(Tag, { bordered: false }, " - "),
17
+ },
18
+ {
19
+ key: '2',
20
+ property: 'description',
21
+ description: (React.createElement(Flex, { gap: 10, vertical: true },
22
+ React.createElement(Typography.Text, null, "The text that is displayed below the Icon"))),
23
+ type: React.createElement(Tag, { color: "processing" }, "string"),
24
+ default: React.createElement(Tag, { bordered: false }, "No data"),
25
+ },
26
+ ];
27
+ return React.createElement(Table, { dataSource: dataSource, columns: TABLE_API_COLUMNS, pagination: false });
28
+ };
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const TemplatesPropsTable: React.FC;
@@ -0,0 +1,46 @@
1
+ // Libraries
2
+ import React from 'react';
3
+ // Components
4
+ import { Table } from '../../../../../../organism';
5
+ import { Tag, Typography, Flex } from '../../../../../../atoms';
6
+ // Constants
7
+ import { TABLE_API_COLUMNS } from '@antscorp/antsomi-ui/es/constants';
8
+ import { LISTING_GAP_DEFAULT } from '../../../../constants';
9
+ export const TemplatesPropsTable = () => {
10
+ const dataSource = [
11
+ {
12
+ key: '1',
13
+ property: 'items',
14
+ description: (React.createElement(Flex, { gap: 10, vertical: true },
15
+ React.createElement(Typography.Text, null, "List of templates"))),
16
+ type: React.createElement(Tag, { color: "processing" }, "( TTemplateItem & T) [ ]"),
17
+ default: React.createElement(Tag, { bordered: false }, "[ ]"),
18
+ },
19
+ {
20
+ key: '2',
21
+ property: 'loading',
22
+ description: (React.createElement(Flex, { gap: 10, vertical: true },
23
+ React.createElement(Typography.Text, null, "Show loading template listing"))),
24
+ type: React.createElement(Tag, { color: "processing" }, "boolean"),
25
+ default: React.createElement(Tag, { bordered: false }, "false"),
26
+ },
27
+ {
28
+ key: '3',
29
+ property: 'gap',
30
+ description: (React.createElement(Flex, { gap: 10, vertical: true },
31
+ React.createElement(Typography.Text, null, "Spacing between template items"),
32
+ React.createElement(Typography.Text, null, "When the screen size changes, the height and width of each template will change according to the screen, but the gap remains the same."))),
33
+ type: React.createElement(Tag, { color: "processing" }, "number"),
34
+ default: React.createElement(Tag, { bordered: false }, LISTING_GAP_DEFAULT),
35
+ },
36
+ {
37
+ key: '4',
38
+ property: 'onLoadMoreTemplates',
39
+ description: (React.createElement(Flex, { gap: 10, vertical: true },
40
+ React.createElement(Typography.Text, null, "Handles loading additional data based on lazy loading mechanism"))),
41
+ type: React.createElement(Tag, { color: "processing" }, '( ) => void'),
42
+ default: React.createElement(Tag, { bordered: false }, '( ) => { }'),
43
+ },
44
+ ];
45
+ return React.createElement(Table, { dataSource: dataSource, columns: TABLE_API_COLUMNS, pagination: false });
46
+ };
@@ -0,0 +1,5 @@
1
+ export { DataTypeTable } from './DataTypeTables';
2
+ export { TemplatesPropsTable } from './TemplatesPropsTable';
3
+ export { CategoryListingPropsTable } from './CategoryListingPropsTable';
4
+ export { BlankTemplatePropsTable } from './BlankTemplatePropsTable';
5
+ export { EmptyPropsTable } from './EmptyPropsTable';
@@ -0,0 +1,5 @@
1
+ export { DataTypeTable } from './DataTypeTables';
2
+ export { TemplatesPropsTable } from './TemplatesPropsTable';
3
+ export { CategoryListingPropsTable } from './CategoryListingPropsTable';
4
+ export { BlankTemplatePropsTable } from './BlankTemplatePropsTable';
5
+ export { EmptyPropsTable } from './EmptyPropsTable';
@@ -0,0 +1 @@
1
+ export declare const ImageWrapper: import("styled-components").StyledComponent<"img", any, {}, never>;
@@ -0,0 +1,7 @@
1
+ // Libraries
2
+ import styled from 'styled-components';
3
+ export const ImageWrapper = styled.img `
4
+ width: 100%;
5
+ height: 100%;
6
+ object-fit: contain;
7
+ `;
@@ -1,4 +1,3 @@
1
1
  /// <reference types="react" />
2
2
  export declare const TemplateListingWrapper: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("antd/es/flex/interface").FlexProps<import("antd/es/_util/type").AnyObject> & import("react").RefAttributes<HTMLElement>>, any, {}, never>;
3
3
  export declare const LoadMoreBlock: import("styled-components").StyledComponent<"div", any, {}, never>;
4
- export declare const ImageWrapper: import("styled-components").StyledComponent<"img", any, {}, never>;
@@ -33,8 +33,3 @@ export const TemplateListingWrapper = styled(Flex) `
33
33
  }
34
34
  `;
35
35
  export const LoadMoreBlock = styled.div ``;
36
- export const ImageWrapper = styled.img `
37
- width: 100%;
38
- height: 100%;
39
- object-fit: contain;
40
- `;
@@ -1,8 +1,8 @@
1
1
  import { ReactNode } from 'react';
2
2
  export interface BlankTemplateProps {
3
+ show?: boolean;
3
4
  width?: number;
4
5
  height?: number;
5
- show?: boolean;
6
6
  description?: string;
7
7
  onClick?: React.MouseEventHandler<HTMLElement>;
8
8
  blankTemplateRender?: (node: ReactNode) => ReactNode;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antscorp/antsomi-ui",
3
- "version": "1.3.5-beta.63",
3
+ "version": "1.3.5-beta.64",
4
4
  "description": "An enterprise-class UI design language and React UI library.",
5
5
  "sideEffects": [
6
6
  "dist/*",