@mariotzz/tzz-element 1.0.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) Mario<tzz1550455954@gmail.com>
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,79 @@
1
+ # tzz-element
2
+
3
+ [![NPM version](https://img.shields.io/npm/v/tzz-element.svg?style=flat)](https://npmjs.org/package/tzz-element)
4
+ [![NPM downloads](http://img.shields.io/npm/dm/tzz-element.svg?style=flat)](https://npmjs.org/package/tzz-element)
5
+
6
+ A react library developed with dumi
7
+
8
+ ## Usage
9
+
10
+ TODO
11
+
12
+ ## Options
13
+
14
+ TODO
15
+
16
+ ## Development
17
+
18
+ ```bash
19
+ # install dependencies
20
+ $ pnpm install
21
+
22
+ # develop library by docs demo
23
+ $ pnpm start
24
+
25
+ # build library source code
26
+ $ pnpm run build
27
+
28
+ # build library source code in watch mode
29
+ $ pnpm run build:watch
30
+
31
+ # build docs
32
+ $ pnpm run docs:build
33
+
34
+ # Locally preview the production build.
35
+ $ pnpm run docs:preview
36
+
37
+ # check your project for potential problems
38
+ $ pnpm run doctor
39
+ ```
40
+
41
+ ## LICENSE
42
+
43
+ MIT
44
+
45
+ ```
46
+ tzz-element
47
+ β”œβ”€ πŸ“.dumi
48
+ β”œβ”€ πŸ“.husky
49
+ β”‚ β”œβ”€ πŸ“_
50
+ β”‚ β”‚ β”œβ”€ πŸ“„.gitignore
51
+ β”‚ β”‚ └─ πŸ“„husky.sh
52
+ β”‚ β”œβ”€ πŸ“„commit-msg
53
+ β”‚ └─ πŸ“„pre-commit
54
+ β”œβ”€ πŸ“docs
55
+ β”‚ β”œβ”€ πŸ“„guide.md
56
+ β”‚ β”œβ”€ πŸ“„index.md
57
+ β”‚ └─ πŸ“„test.md
58
+ β”œβ”€ πŸ“src
59
+ β”‚ β”œβ”€ πŸ“Demo
60
+ β”‚ β”‚ β”œβ”€ πŸ“„index.md
61
+ β”‚ β”‚ └─ πŸ“„index.tsx
62
+ β”‚ β”œβ”€ πŸ“Foo
63
+ β”‚ β”‚ β”œβ”€ πŸ“„index.md
64
+ β”‚ β”‚ └─ πŸ“„index.tsx
65
+ β”‚ └─ πŸ“„index.ts
66
+ β”œβ”€ πŸ“„.dumirc.ts
67
+ β”œβ”€ πŸ“„.editorconfig
68
+ β”œβ”€ πŸ“„.eslintrc.js
69
+ β”œβ”€ πŸ“„.fatherrc.ts
70
+ β”œβ”€ πŸ“„.gitignore
71
+ β”œβ”€ πŸ“„.prettierignore
72
+ β”œβ”€ πŸ“„.prettierrc.js
73
+ β”œβ”€ πŸ“„.stylelintrc
74
+ β”œβ”€ πŸ“„LICENSE
75
+ β”œβ”€ πŸ“„README.md
76
+ β”œβ”€ πŸ“„package.json
77
+ β”œβ”€ πŸ“„pnpm-lock.yaml
78
+ └─ πŸ“„tsconfig.json
79
+ ```
@@ -0,0 +1,7 @@
1
+ import { Button as AntButton } from 'antd';
2
+ import React from 'react';
3
+ export type ButtonProps = React.ComponentProps<typeof AntButton> & {
4
+ dangerLight?: boolean;
5
+ };
6
+ export declare const Button: React.FC<ButtonProps>;
7
+ export default Button;
@@ -0,0 +1,20 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ var _excluded = ["dangerLight"];
3
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
4
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
5
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
7
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
8
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
9
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
10
+ import { Button as AntButton } from 'antd';
11
+ import React from 'react';
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
+ export var Button = function Button(_ref) {
14
+ var dangerLight = _ref.dangerLight,
15
+ props = _objectWithoutProperties(_ref, _excluded);
16
+ return /*#__PURE__*/_jsx(AntButton, _objectSpread(_objectSpread({}, props), {}, {
17
+ danger: dangerLight !== null && dangerLight !== void 0 ? dangerLight : props.danger
18
+ }));
19
+ };
20
+ export default Button;
@@ -0,0 +1,5 @@
1
+ import { type FC } from 'react';
2
+ declare const Demo: FC<{
3
+ title: string;
4
+ }>;
5
+ export default Demo;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ var Demo = function Demo(props) {
4
+ return /*#__PURE__*/_jsx("h4", {
5
+ children: props.title
6
+ });
7
+ };
8
+ export default Demo;
@@ -0,0 +1,5 @@
1
+ import { type FC } from 'react';
2
+ declare const Foo: FC<{
3
+ title: string;
4
+ }>;
5
+ export default Foo;
@@ -0,0 +1,7 @@
1
+ import { jsx as _jsx } from 'react/jsx-runtime';
2
+ let Foo = function Foo(props) {
3
+ return /*#__PURE__*/ _jsx('h4', {
4
+ children: props.title,
5
+ });
6
+ };
7
+ export default Foo;
package/es/index.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ export { default as Button } from './Button';
2
+ export { default as Demo } from './Demo';
3
+ export { default as Foo } from './Foo';
package/es/index.js ADDED
@@ -0,0 +1,3 @@
1
+ export { default as Button } from "./Button";
2
+ export { default as Demo } from "./Demo";
3
+ export { default as Foo } from "./Foo";
@@ -0,0 +1,7 @@
1
+ import { Button as AntButton } from 'antd';
2
+ import React from 'react';
3
+ export type ButtonProps = React.ComponentProps<typeof AntButton> & {
4
+ dangerLight?: boolean;
5
+ };
6
+ export declare const Button: React.FC<ButtonProps>;
7
+ export default Button;
@@ -0,0 +1,35 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/Button/index.tsx
20
+ var Button_exports = {};
21
+ __export(Button_exports, {
22
+ Button: () => Button,
23
+ default: () => Button_default
24
+ });
25
+ module.exports = __toCommonJS(Button_exports);
26
+ var import_antd = require("antd");
27
+ var import_jsx_runtime = require("react/jsx-runtime");
28
+ var Button = ({ dangerLight, ...props }) => {
29
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd.Button, { ...props, danger: dangerLight ?? props.danger });
30
+ };
31
+ var Button_default = Button;
32
+ // Annotate the CommonJS export names for ESM import in node:
33
+ 0 && (module.exports = {
34
+ Button
35
+ });
@@ -0,0 +1,5 @@
1
+ import { type FC } from 'react';
2
+ declare const Demo: FC<{
3
+ title: string;
4
+ }>;
5
+ export default Demo;
@@ -0,0 +1,27 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/Demo/index.tsx
20
+ var Demo_exports = {};
21
+ __export(Demo_exports, {
22
+ default: () => Demo_default
23
+ });
24
+ module.exports = __toCommonJS(Demo_exports);
25
+ var import_jsx_runtime = require("react/jsx-runtime");
26
+ var Demo = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h4", { children: props.title });
27
+ var Demo_default = Demo;
@@ -0,0 +1,5 @@
1
+ import { type FC } from 'react';
2
+ declare const Foo: FC<{
3
+ title: string;
4
+ }>;
5
+ export default Foo;
@@ -0,0 +1,27 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/Foo/index.tsx
20
+ var Foo_exports = {};
21
+ __export(Foo_exports, {
22
+ default: () => Foo_default
23
+ });
24
+ module.exports = __toCommonJS(Foo_exports);
25
+ var import_jsx_runtime = require("react/jsx-runtime");
26
+ var Foo = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h4", { children: props.title });
27
+ var Foo_default = Foo;
package/lib/index.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ export { default as Button } from './Button';
2
+ export { default as Demo } from './Demo';
3
+ export { default as Foo } from './Foo';
package/lib/index.js ADDED
@@ -0,0 +1,45 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // src/index.ts
30
+ var src_exports = {};
31
+ __export(src_exports, {
32
+ Button: () => import_Button.default,
33
+ Demo: () => import_Demo.default,
34
+ Foo: () => import_Foo.default
35
+ });
36
+ module.exports = __toCommonJS(src_exports);
37
+ var import_Button = __toESM(require("./Button"));
38
+ var import_Demo = __toESM(require("./Demo"));
39
+ var import_Foo = __toESM(require("./Foo"));
40
+ // Annotate the CommonJS export names for ESM import in node:
41
+ 0 && (module.exports = {
42
+ Button,
43
+ Demo,
44
+ Foo
45
+ });
package/package.json ADDED
@@ -0,0 +1,36 @@
1
+ {
2
+ "name": "@mariotzz/tzz-element",
3
+ "version": "1.0.0",
4
+ "license": "MIT",
5
+ "exports": {
6
+ ".": {
7
+ "types": "./es/index.d.ts",
8
+ "import": "./es/index.js",
9
+ "require": "./lib/index.js"
10
+ }
11
+ },
12
+ "main": "lib/index.js",
13
+ "module": "es/index.js",
14
+ "types": "es/index.d.ts",
15
+ "files": [
16
+ "es",
17
+ "lib",
18
+ "README.md",
19
+ "LICENSE"
20
+ ],
21
+ "devDependencies": {
22
+ "antd": "^6.1.1"
23
+ },
24
+ "peerDependencies": {
25
+ "antd": ">=6",
26
+ "react": ">=18",
27
+ "react-dom": ">=18"
28
+ },
29
+ "publishConfig": {
30
+ "access": "public"
31
+ },
32
+ "scripts": {
33
+ "build": "father build",
34
+ "build:watch": "father dev"
35
+ }
36
+ }