@xfe-repo/web-components 1.0.1 → 1.1.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/index.d.mts CHANGED
@@ -1,10 +1,11 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
1
2
  import { PureComponent } from 'react';
2
3
 
3
4
  type Props = {
4
5
  loading: boolean;
5
6
  };
6
7
  declare class Loading extends PureComponent<Props> {
7
- render(): JSX.Element | null;
8
+ render(): react_jsx_runtime.JSX.Element | null;
8
9
  }
9
10
 
10
11
  export { Loading };
package/dist/index.d.ts CHANGED
@@ -1,10 +1,11 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
1
2
  import { PureComponent } from 'react';
2
3
 
3
4
  type Props = {
4
5
  loading: boolean;
5
6
  };
6
7
  declare class Loading extends PureComponent<Props> {
7
- render(): JSX.Element | null;
8
+ render(): react_jsx_runtime.JSX.Element | null;
8
9
  }
9
10
 
10
11
  export { Loading };
package/dist/index.mjs CHANGED
@@ -1,23 +1,123 @@
1
1
  // src/Loading/index.tsx
2
+ function _assert_this_initialized(self) {
3
+ if (self === void 0) {
4
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
5
+ }
6
+ return self;
7
+ }
8
+ function _class_call_check(instance, Constructor) {
9
+ if (!(instance instanceof Constructor)) {
10
+ throw new TypeError("Cannot call a class as a function");
11
+ }
12
+ }
13
+ function _defineProperties(target, props) {
14
+ for(var i = 0; i < props.length; i++){
15
+ var descriptor = props[i];
16
+ descriptor.enumerable = descriptor.enumerable || false;
17
+ descriptor.configurable = true;
18
+ if ("value" in descriptor) descriptor.writable = true;
19
+ Object.defineProperty(target, descriptor.key, descriptor);
20
+ }
21
+ }
22
+ function _create_class(Constructor, protoProps, staticProps) {
23
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
24
+ if (staticProps) _defineProperties(Constructor, staticProps);
25
+ return Constructor;
26
+ }
27
+ function _get_prototype_of(o) {
28
+ _get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
29
+ return o.__proto__ || Object.getPrototypeOf(o);
30
+ };
31
+ return _get_prototype_of(o);
32
+ }
33
+ function _inherits(subClass, superClass) {
34
+ if (typeof superClass !== "function" && superClass !== null) {
35
+ throw new TypeError("Super expression must either be null or a function");
36
+ }
37
+ subClass.prototype = Object.create(superClass && superClass.prototype, {
38
+ constructor: {
39
+ value: subClass,
40
+ writable: true,
41
+ configurable: true
42
+ }
43
+ });
44
+ if (superClass) _set_prototype_of(subClass, superClass);
45
+ }
46
+ function _possible_constructor_return(self, call) {
47
+ if (call && (_type_of(call) === "object" || typeof call === "function")) {
48
+ return call;
49
+ }
50
+ return _assert_this_initialized(self);
51
+ }
52
+ function _set_prototype_of(o, p) {
53
+ _set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
54
+ o.__proto__ = p;
55
+ return o;
56
+ };
57
+ return _set_prototype_of(o, p);
58
+ }
59
+ function _type_of(obj) {
60
+ "@swc/helpers - typeof";
61
+ return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
62
+ }
63
+ function _is_native_reflect_construct() {
64
+ if (typeof Reflect === "undefined" || !Reflect.construct) return false;
65
+ if (Reflect.construct.sham) return false;
66
+ if (typeof Proxy === "function") return true;
67
+ try {
68
+ Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
69
+ return true;
70
+ } catch (e) {
71
+ return false;
72
+ }
73
+ }
74
+ function _create_super(Derived) {
75
+ var hasNativeReflectConstruct = _is_native_reflect_construct();
76
+ return function _createSuperInternal() {
77
+ var Super = _get_prototype_of(Derived), result;
78
+ if (hasNativeReflectConstruct) {
79
+ var NewTarget = _get_prototype_of(this).constructor;
80
+ result = Reflect.construct(Super, arguments, NewTarget);
81
+ } else {
82
+ result = Super.apply(this, arguments);
83
+ }
84
+ return _possible_constructor_return(this, result);
85
+ };
86
+ }
2
87
  import { PureComponent } from "react";
3
-
4
88
  // src/Loading/index.module.less
5
89
  var index_module_default = {
6
- loading: "index_module_loading"
90
+ loading: "index_module_loading"
7
91
  };
8
-
9
92
  // src/Loading/index.tsx
10
93
  import { Spin } from "antd";
11
94
  import { jsx } from "react/jsx-runtime";
12
- var Loading = class extends PureComponent {
13
- render() {
14
- const { loading } = this.props;
15
- if (!loading)
16
- return null;
17
- return /* @__PURE__ */ jsx("div", { className: index_module_default.loading, children: /* @__PURE__ */ jsx(Spin, { spinning: loading, delay: 200, className: index_module_default.loading_icon }) });
18
- }
19
- };
95
+ var Loading = /*#__PURE__*/ function(PureComponent) {
96
+ "use strict";
97
+ _inherits(Loading, PureComponent);
98
+ var _super = _create_super(Loading);
99
+ function Loading() {
100
+ _class_call_check(this, Loading);
101
+ return _super.apply(this, arguments);
102
+ }
103
+ _create_class(Loading, [
104
+ {
105
+ key: "render",
106
+ value: function render() {
107
+ var loading = this.props.loading;
108
+ if (!loading) return null;
109
+ return /* @__PURE__ */ jsx("div", {
110
+ className: index_module_default.loading,
111
+ children: /* @__PURE__ */ jsx(Spin, {
112
+ spinning: loading,
113
+ delay: 200,
114
+ className: index_module_default.loading_icon
115
+ })
116
+ });
117
+ }
118
+ }
119
+ ]);
120
+ return Loading;
121
+ }(PureComponent);
20
122
  var Loading_default = Loading;
21
- export {
22
- Loading_default as Loading
23
- };
123
+ export { Loading_default as Loading };
package/package.json CHANGED
@@ -1,32 +1,34 @@
1
1
  {
2
2
  "name": "@xfe-repo/web-components",
3
- "version": "1.0.1",
3
+ "version": "1.1.0",
4
4
  "sideEffects": false,
5
+ "module": "dist/index.js",
6
+ "types": "dist/index.d.ts",
5
7
  "exports": {
6
8
  ".": {
7
9
  "import": {
8
10
  "types": "./dist/index.d.mts",
9
- "require": "./dist/index.mjs"
11
+ "default": "./dist/index.mjs"
10
12
  },
11
13
  "require": {
12
14
  "types": "./dist/index.d.ts",
13
15
  "default": "./dist/index.js"
14
- },
15
- "default": "./dist/index.js"
16
+ }
16
17
  }
17
18
  },
18
19
  "files": [
19
20
  "dist"
20
21
  ],
21
22
  "dependencies": {
22
- "antd": "^5.12.1"
23
+ "antd": "^5.20.6"
23
24
  },
24
25
  "devDependencies": {
25
26
  "@swc/core": "^1.3.100",
26
- "@types/react": "^18.2.0",
27
- "esbuild-plugin-less": "^1.3.1",
28
- "@xfe-repo/eslint-config": "0.0.1",
29
- "@xfe-repo/typescript-config": "0.0.3"
27
+ "@types/node": "^20.16.5",
28
+ "@types/react": "^18",
29
+ "esbuild-plugin-less": "^1.3.9",
30
+ "@xfe-repo/typescript-config": "0.0.3",
31
+ "@xfe-repo/eslint-config": "0.0.2"
30
32
  },
31
33
  "scripts": {
32
34
  "build": "tsup",