@akinon/ui-list 0.0.2 → 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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,IAAI,YAAY,EAAE,MAAM,MAAM,CAAC;AACtD,OAAO,EAAE,IAAI,IAAI,OAAO,EAAE,MAAM,MAAM,CAAC;AACvC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,MAAM,MAAM,SAAS,CAAC,CAAC,IAAI,YAAY,CAAC,CAAC,CAAC,CAAC;AAI3C,QAAA,MAAM,aAAa,wFAKlB,CAAC;AAEF,KAAK,mBAAmB,GAAG,OAAO,aAAa,GAAG;IAChD,IAAI,EAAE,OAAO,OAAO,CAAC,IAAI,CAAC;CAC3B,CAAC;AAEF,QAAA,MAAM,IAAI,EAAE,mBAEV,CAAC;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC"}
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ var __rest = (this && this.__rest) || function (s, e) {
3
+ var t = {};
4
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
+ t[p] = s[p];
6
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
+ t[p[i]] = s[p[i]];
10
+ }
11
+ return t;
12
+ };
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.List = void 0;
15
+ const antd_1 = require("antd");
16
+ const React = require("react");
17
+ // TODO extending unknown is not allowed
18
+ // eslint-disable-next-line
19
+ const ListComponent = (_a) => {
20
+ var { children } = _a, restListProps = __rest(_a, ["children"]);
21
+ return React.createElement(antd_1.List, Object.assign({}, restListProps), children);
22
+ };
23
+ const List = Object.assign(ListComponent, {
24
+ Item: antd_1.List.Item
25
+ });
26
+ exports.List = List;
@@ -0,0 +1,11 @@
1
+ import type { ListProps as AntListProps } from 'antd';
2
+ import { List as AntList } from 'antd';
3
+ import * as React from 'react';
4
+ export type ListProps<T> = AntListProps<T>;
5
+ declare const ListComponent: <T extends unknown>({ children, ...restListProps }: ListProps<T>) => React.JSX.Element;
6
+ type CompoundedComponent = typeof ListComponent & {
7
+ Item: typeof AntList.Item;
8
+ };
9
+ declare const List: CompoundedComponent;
10
+ export { List };
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,IAAI,YAAY,EAAE,MAAM,MAAM,CAAC;AACtD,OAAO,EAAE,IAAI,IAAI,OAAO,EAAE,MAAM,MAAM,CAAC;AACvC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,MAAM,MAAM,SAAS,CAAC,CAAC,IAAI,YAAY,CAAC,CAAC,CAAC,CAAC;AAI3C,QAAA,MAAM,aAAa,wFAKlB,CAAC;AAEF,KAAK,mBAAmB,GAAG,OAAO,aAAa,GAAG;IAChD,IAAI,EAAE,OAAO,OAAO,CAAC,IAAI,CAAC;CAC3B,CAAC;AAEF,QAAA,MAAM,IAAI,EAAE,mBAEV,CAAC;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC"}
@@ -0,0 +1,23 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
12
+ import { List as AntList } from 'antd';
13
+ import * as React from 'react';
14
+ // TODO extending unknown is not allowed
15
+ // eslint-disable-next-line
16
+ const ListComponent = (_a) => {
17
+ var { children } = _a, restListProps = __rest(_a, ["children"]);
18
+ return React.createElement(AntList, Object.assign({}, restListProps), children);
19
+ };
20
+ const List = Object.assign(ListComponent, {
21
+ Item: AntList.Item
22
+ });
23
+ export { List };
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@akinon/ui-list",
3
- "version": "0.0.2",
3
+ "version": "0.2.0",
4
4
  "private": false,
5
5
  "type": "module",
6
- "main": "dist/index.js",
7
- "module": "dist/index.js",
6
+ "main": "dist/esm/index.js",
7
+ "module": "dist/esm/index.js",
8
8
  "files": [
9
9
  "dist"
10
10
  ],
@@ -13,26 +13,33 @@
13
13
  },
14
14
  "devDependencies": {
15
15
  "clean-package": "2.2.0",
16
- "@akinon/vite-config": "^0.1.1",
17
- "tsconfig": "0.0.0",
18
- "eslint-config-custom": "0.1.0"
16
+ "copyfiles": "^2.4.1",
17
+ "rimraf": "^5.0.5",
18
+ "typescript": "^5.2.2",
19
+ "@akinon/typescript-config": "0.1.0",
20
+ "@akinon/vite-config": "0.3.0",
21
+ "@akinon/eslint-config": "0.1.0"
19
22
  },
20
23
  "peerDependencies": {
21
24
  "react": ">=18",
22
25
  "react-dom": ">=18"
23
26
  },
24
27
  "clean-package": "../../../clean-package.config.json",
25
- "types": "dist/index.d.ts",
28
+ "types": "dist/esm/index.d.ts",
26
29
  "exports": {
27
30
  ".": {
28
- "types": "./dist/index.d.ts",
29
- "import": "./dist/index.js",
30
- "require": "./dist/index.cjs"
31
+ "types": "./dist/esm/index.d.ts",
32
+ "import": "./dist/esm/index.js",
33
+ "require": "./dist/cjs/index.js"
31
34
  },
32
35
  "./package.json": "./package.json"
33
36
  },
34
37
  "scripts": {
35
- "build": "vite build",
38
+ "build": "pnpm run build:esm && pnpm run build:commonjs && pnpm run copy:files",
39
+ "build:esm": "tsc --outDir dist/esm",
40
+ "build:commonjs": "tsc --module commonjs --outDir dist/cjs",
41
+ "copy:files": "copyfiles -u 1 src/**/*.css dist/esm && copyfiles -u 1 src/**/*.css dist/cjs",
42
+ "clean": "rimraf dist/",
36
43
  "lint": "eslint *.ts*",
37
44
  "test": "vitest run",
38
45
  "test:ui": "vitest --ui",