@pezeshk-book/modules 0.1.92 → 0.2.0
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/modules/data-table/data-table.d.ts +1 -1
- package/dist/modules/data-table/data-table.js +2 -3
- package/dist/modules/data-table/data-table.js.map +1 -1
- package/dist/modules/data-table/data-table.props.d.ts +5 -4
- package/dist/stories/data-table/complex-data-table.d.ts +7 -0
- package/dist/stories/data-table/complex-data-table.js +12 -0
- package/dist/stories/data-table/complex-data-table.js.map +1 -0
- package/dist/stories/data-table/complex-data-table.stories.d.ts +6 -0
- package/dist/stories/data-table/complex-data-table.stories.js +18 -0
- package/dist/stories/data-table/complex-data-table.stories.js.map +1 -0
- package/dist/stories/data-table/simple-data-table.d.ts +7 -0
- package/dist/stories/data-table/simple-data-table.js +12 -0
- package/dist/stories/data-table/simple-data-table.js.map +1 -0
- package/dist/stories/data-table/simple-data-table.stories.d.ts +6 -0
- package/dist/stories/data-table/simple-data-table.stories.js +18 -0
- package/dist/stories/data-table/simple-data-table.stories.js.map +1 -0
- package/package.json +1 -1
- package/dist/stories/data-table/data-table.d.ts +0 -5
- package/dist/stories/data-table/data-table.js +0 -13
- package/dist/stories/data-table/data-table.js.map +0 -1
- package/dist/stories/data-table/data-table.stories.d.ts +0 -6
- package/dist/stories/data-table/data-table.stories.js +0 -15
- package/dist/stories/data-table/data-table.stories.js.map +0 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { DataTableProps, TableVariant } from './data-table.props';
|
|
2
|
-
declare const DataTable: <T extends TableVariant>(
|
|
2
|
+
declare const DataTable: <T extends TableVariant>(props: DataTableProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default DataTable;
|
|
@@ -2,9 +2,8 @@ import { __assign } from "tslib";
|
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import ComplexDataTable from './complex';
|
|
4
4
|
import SimpleDataTable from './simple';
|
|
5
|
-
var DataTable = function (
|
|
6
|
-
|
|
7
|
-
if (variant === 'complex') {
|
|
5
|
+
var DataTable = function (props) {
|
|
6
|
+
if (props.variant === 'complex') {
|
|
8
7
|
return _jsx(ComplexDataTable, __assign({}, props));
|
|
9
8
|
}
|
|
10
9
|
return _jsx(SimpleDataTable, __assign({}, props));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-table.js","sourceRoot":"","sources":["../../../modules/data-table/data-table.tsx"],"names":[],"mappings":";;AACA,OAAO,gBAAgB,MAAM,WAAW,CAAC;AACzC,OAAO,eAAe,MAAM,UAAU,CAAC;AAIvC,IAAM,SAAS,GAAG,UAAyB,
|
|
1
|
+
{"version":3,"file":"data-table.js","sourceRoot":"","sources":["../../../modules/data-table/data-table.tsx"],"names":[],"mappings":";;AACA,OAAO,gBAAgB,MAAM,WAAW,CAAC;AACzC,OAAO,eAAe,MAAM,UAAU,CAAC;AAIvC,IAAM,SAAS,GAAG,UAAyB,KAAwB;IACjE,IAAI,KAAK,CAAC,OAAO,KAAK,SAAS,EAAE;QAC/B,OAAO,KAAC,gBAAgB,eAAM,KAA+B,EAAI,CAAC;KACnE;IAED,OAAO,KAAC,eAAe,eAAM,KAA8B,EAAI,CAAC;AAClE,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { ComplexDataTableProps } from './complex/complex-data-table.props';
|
|
2
2
|
import { SimpleDataTableProps } from './simple/simple-data-table.props';
|
|
3
3
|
export type TableVariant = 'simple' | 'complex';
|
|
4
|
-
export
|
|
5
|
-
variant:
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
export type DataTableProps<T extends TableVariant> = T extends 'simple' ? {
|
|
5
|
+
variant: 'simple';
|
|
6
|
+
} & SimpleDataTableProps : {
|
|
7
|
+
variant: 'complex';
|
|
8
|
+
} & ComplexDataTableProps;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ComplexDataTableProps } from '../../modules/data-table/complex/complex-data-table.props';
|
|
2
|
+
/**
|
|
3
|
+
* Primary UI component for user interaction
|
|
4
|
+
*/
|
|
5
|
+
export declare const ComplexDataTable: (props: {
|
|
6
|
+
variant: 'complex';
|
|
7
|
+
} & ComplexDataTableProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { __assign } from "tslib";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import CustomDataTable from '../../modules/data-table';
|
|
4
|
+
import dummyData from './dummy-data';
|
|
5
|
+
import { columns, header } from './data-table-columns';
|
|
6
|
+
/**
|
|
7
|
+
* Primary UI component for user interaction
|
|
8
|
+
*/
|
|
9
|
+
export var ComplexDataTable = function (props) {
|
|
10
|
+
return (_jsx(CustomDataTable, __assign({}, props, { data: dummyData, header: header, column: columns })));
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=complex-data-table.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"complex-data-table.js","sourceRoot":"","sources":["../../../stories/data-table/complex-data-table.tsx"],"names":[],"mappings":";;AAAA,OAAO,eAAe,MAAM,0BAA0B,CAAC;AACvD,OAAO,SAAS,MAAM,cAAc,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAGvD;;GAEG;AACH,MAAM,CAAC,IAAM,gBAAgB,GAAG,UAAC,KAAqD;IACpF,OAAO,CACL,KAAC,eAAe,eACV,KAAK,IACT,IAAI,EAAE,SAAS,EACf,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,OAAO,IACf,CACH,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { ComplexDataTable } from './complex-data-table';
|
|
3
|
+
declare const meta: Meta<typeof ComplexDataTable>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof ComplexDataTable>;
|
|
6
|
+
export declare const Complex: Story;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { __assign } from "tslib";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { ComplexDataTable } from './complex-data-table';
|
|
4
|
+
var meta = {
|
|
5
|
+
title: 'DataTable',
|
|
6
|
+
component: ComplexDataTable,
|
|
7
|
+
argTypes: {}
|
|
8
|
+
};
|
|
9
|
+
export default meta;
|
|
10
|
+
export var Complex = {
|
|
11
|
+
render: function (args) {
|
|
12
|
+
return _jsx(ComplexDataTable, __assign({}, args));
|
|
13
|
+
},
|
|
14
|
+
args: {
|
|
15
|
+
variant: 'complex'
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=complex-data-table.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"complex-data-table.stories.js","sourceRoot":"","sources":["../../../stories/data-table/complex-data-table.stories.tsx"],"names":[],"mappings":";;AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,IAAM,IAAI,GAAkC;IAC1C,KAAK,EAAE,WAAW;IAClB,SAAS,EAAE,gBAAgB;IAC3B,QAAQ,EAAE,EACT;CACF,CAAC;AAEF,eAAe,IAAI,CAAC;AAGpB,MAAM,CAAC,IAAM,OAAO,GAAU;IAC5B,MAAM,EAAE,UAAC,IAAqD;QAC5D,OAAO,KAAC,gBAAgB,eAAK,IAAI,EAAI,CAAC;IACxC,CAAC;IACD,IAAI,EAAE;QACJ,OAAO,EAAE,SAAS;KACnB;CACF,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SimpleDataTableProps } from '../../modules/data-table/simple/simple-data-table.props';
|
|
2
|
+
/**
|
|
3
|
+
* Primary UI component for user interaction
|
|
4
|
+
*/
|
|
5
|
+
export declare const SimpleDataTable: (props: {
|
|
6
|
+
variant: 'simple';
|
|
7
|
+
} & SimpleDataTableProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { __assign } from "tslib";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import CustomDataTable from '../../modules/data-table';
|
|
4
|
+
import dummyData from './dummy-data';
|
|
5
|
+
import { columns, header } from './data-table-columns';
|
|
6
|
+
/**
|
|
7
|
+
* Primary UI component for user interaction
|
|
8
|
+
*/
|
|
9
|
+
export var SimpleDataTable = function (props) {
|
|
10
|
+
return (_jsx(CustomDataTable, __assign({}, props, { data: dummyData, header: header, column: columns })));
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=simple-data-table.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"simple-data-table.js","sourceRoot":"","sources":["../../../stories/data-table/simple-data-table.tsx"],"names":[],"mappings":";;AAAA,OAAO,eAAe,MAAM,0BAA0B,CAAC;AACvD,OAAO,SAAS,MAAM,cAAc,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAGvD;;GAEG;AACH,MAAM,CAAC,IAAM,eAAe,GAAG,UAAC,KAAiD;IAC/E,OAAO,CACL,KAAC,eAAe,eACV,KAAK,IACT,IAAI,EAAE,SAAS,EACf,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,OAAO,IACf,CACH,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { __assign } from "tslib";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { SimpleDataTable } from './simple-data-table';
|
|
4
|
+
var meta = {
|
|
5
|
+
title: 'DataTable',
|
|
6
|
+
component: SimpleDataTable,
|
|
7
|
+
argTypes: {}
|
|
8
|
+
};
|
|
9
|
+
export default meta;
|
|
10
|
+
export var Simple = {
|
|
11
|
+
render: function (args) {
|
|
12
|
+
return _jsx(SimpleDataTable, __assign({}, args));
|
|
13
|
+
},
|
|
14
|
+
args: {
|
|
15
|
+
variant: 'simple'
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=simple-data-table.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"simple-data-table.stories.js","sourceRoot":"","sources":["../../../stories/data-table/simple-data-table.stories.tsx"],"names":[],"mappings":";;AACA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAGtD,IAAM,IAAI,GAAiC;IACzC,KAAK,EAAE,WAAW;IAClB,SAAS,EAAE,eAAe;IAC1B,QAAQ,EAAE,EACT;CACF,CAAC;AAEF,eAAe,IAAI,CAAC;AAGpB,MAAM,CAAC,IAAM,MAAM,GAAU;IAC3B,MAAM,EAAE,UAAC,IAAiD;QACxD,OAAO,KAAC,eAAe,eAAK,IAAI,EAAI,CAAC;IACvC,CAAC;IACD,IAAI,EAAE;QACJ,OAAO,EAAE,QAAQ;KAClB;CACF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { DataTableProps, TableVariant } from '../../modules/data-table/data-table.props';
|
|
2
|
-
/**
|
|
3
|
-
* Primary UI component for user interaction
|
|
4
|
-
*/
|
|
5
|
-
export declare const DataTable: <T extends TableVariant>({ variant, props }: DataTableProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { __assign } from "tslib";
|
|
2
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import CustomDataTable from '../../modules/data-table';
|
|
4
|
-
import dummyData from './dummy-data';
|
|
5
|
-
import { header, columns } from './data-table-columns';
|
|
6
|
-
/**
|
|
7
|
-
* Primary UI component for user interaction
|
|
8
|
-
*/
|
|
9
|
-
export var DataTable = function (_a) {
|
|
10
|
-
var variant = _a.variant, props = _a.props;
|
|
11
|
-
return (_jsx(CustomDataTable, { variant: variant, props: __assign(__assign({}, props), { data: dummyData, header: header, total: 20, perPage: 20, lastPage: 1, column: columns }) }));
|
|
12
|
-
};
|
|
13
|
-
//# sourceMappingURL=data-table.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"data-table.js","sourceRoot":"","sources":["../../../stories/data-table/data-table.tsx"],"names":[],"mappings":";;AAAA,OAAO,eAAe,MAAM,0BAA0B,CAAC;AAEvD,OAAO,SAAS,MAAM,cAAc,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAEvD;;GAEG;AACH,MAAM,CAAC,IAAM,SAAS,GAAG,UAAyB,EAAqC;QAAnC,OAAO,aAAA,EAAE,KAAK,WAAA;IAChE,OAAO,CACL,KAAC,eAAe,IACd,OAAO,EAAE,OAAO,EAChB,KAAK,wBACA,KAAK,KACR,IAAI,EAAE,SAAS,EACf,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,EAAE,EACT,OAAO,EAAE,EAAE,EACX,QAAQ,EAAE,CAAC,EACX,MAAM,EAAE,OAAO,MAEjB,CACH,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { __assign } from "tslib";
|
|
2
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import { DataTable } from './data-table';
|
|
4
|
-
var meta = {
|
|
5
|
-
title: 'DataTable',
|
|
6
|
-
component: DataTable,
|
|
7
|
-
argTypes: {}
|
|
8
|
-
};
|
|
9
|
-
export default meta;
|
|
10
|
-
export var Default = {
|
|
11
|
-
render: function (args) {
|
|
12
|
-
return _jsx(DataTable, __assign({}, args));
|
|
13
|
-
}
|
|
14
|
-
};
|
|
15
|
-
//# sourceMappingURL=data-table.stories.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"data-table.stories.js","sourceRoot":"","sources":["../../../stories/data-table/data-table.stories.tsx"],"names":[],"mappings":";;AACA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGzC,IAAM,IAAI,GAA2B;IACnC,KAAK,EAAE,WAAW;IAClB,SAAS,EAAE,SAAS;IACpB,QAAQ,EAAE,EACT;CACF,CAAC;AAEF,eAAe,IAAI,CAAC;AAGpB,MAAM,CAAC,IAAM,OAAO,GAAU;IAC5B,MAAM,EAAE,UAAC,IAAmC;QAC1C,OAAO,KAAC,SAAS,eAAK,IAAI,EAAI,CAAC;IACjC,CAAC;CACF,CAAC"}
|