pixuireactcomponents 1.1.21 → 1.1.22

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 (37) hide show
  1. package/README.md +5 -5
  2. package/index.d.ts +15 -15
  3. package/index.js +16 -16
  4. package/package.json +11 -11
  5. package/tools/EventDispatcherJs.d.ts +10 -10
  6. package/tools/EventDispatcherJs.js +71 -71
  7. package/tools/Logger.d.ts +6 -6
  8. package/tools/Logger.js +138 -138
  9. package/tools/tools.md +21 -21
  10. package/ui/components/button/Button.d.ts +5 -5
  11. package/ui/components/button/Button.js +37 -37
  12. package/ui/components/carousel/Carousel.d.ts +5 -5
  13. package/ui/components/carousel/Carousel.js +219 -219
  14. package/ui/components/dropdown/Dropdown.d.ts +30 -30
  15. package/ui/components/dropdown/Dropdown.js +92 -92
  16. package/ui/components/dropdown/DropdownOptionUI.d.ts +11 -11
  17. package/ui/components/dropdown/DropdownOptionUI.js +28 -28
  18. package/ui/components/dropdown/DropdownSpreadMainUI.d.ts +9 -9
  19. package/ui/components/dropdown/DropdownSpreadMainUI.js +27 -27
  20. package/ui/components/dropdown/DropdownUnspreadMainUI.d.ts +9 -9
  21. package/ui/components/dropdown/DropdownUnspreadMainUI.js +27 -27
  22. package/ui/components/gradient/GradientText.d.ts +63 -63
  23. package/ui/components/gradient/GradientText.js +329 -329
  24. package/ui/components/outlinetext/OutlineText.d.ts +73 -73
  25. package/ui/components/outlinetext/OutlineText.js +157 -157
  26. package/ui/components/progress/Progress.d.ts +34 -34
  27. package/ui/components/progress/Progress.js +142 -142
  28. package/ui/components/slapface/Slapface.d.ts +12 -12
  29. package/ui/components/slapface/Slapface.js +224 -227
  30. package/ui/components/slapface/less/Slapface.less +125 -0
  31. package/ui/components/slider/Slider.d.ts +57 -57
  32. package/ui/components/slider/Slider.js +289 -289
  33. package/ui/components/tab/Tab.d.ts +6 -6
  34. package/ui/components/tab/Tab.js +27 -27
  35. package/ui/components/tab/Tabs.d.ts +12 -12
  36. package/ui/components/tab/Tabs.js +54 -54
  37. package/ui/ui.md +1 -1
@@ -1,12 +1,12 @@
1
- import { Component, CSSProperties, h } from "preact";
2
- export declare class Tabs extends Component<{
3
- tabBarStyle: CSSProperties;
4
- onChoose: Function;
5
- defaultIndex: number | null;
6
- }, {
7
- selectedIndex: number;
8
- }> {
9
- constructor(props: any);
10
- SetCurrentIndex: (index: number) => void;
11
- render(): h.JSX.Element;
12
- }
1
+ import { Component, CSSProperties, h } from "preact";
2
+ export declare class Tabs extends Component<{
3
+ tabBarStyle: CSSProperties;
4
+ onChoose: Function;
5
+ defaultIndex: number | null;
6
+ }, {
7
+ selectedIndex: number;
8
+ }> {
9
+ constructor(props: any);
10
+ SetCurrentIndex: (index: number) => void;
11
+ render(): h.JSX.Element;
12
+ }
@@ -1,54 +1,54 @@
1
- var __extends = (this && this.__extends) || (function () {
2
- var extendStatics = function (d, b) {
3
- extendStatics = Object.setPrototypeOf ||
4
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
6
- return extendStatics(d, b);
7
- };
8
- return function (d, b) {
9
- if (typeof b !== "function" && b !== null)
10
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
11
- extendStatics(d, b);
12
- function __() { this.constructor = d; }
13
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
14
- };
15
- })();
16
- import { Component, h } from "preact";
17
- import { Tab } from "./Tab";
18
- var Tabs = /** @class */ (function (_super) {
19
- __extends(Tabs, _super);
20
- function Tabs(props) {
21
- var _this = _super.call(this, props) || this;
22
- _this.SetCurrentIndex = function (index) {
23
- if (index < 0 || index >= _this.props.children.length)
24
- return;
25
- _this.setState({
26
- selectedIndex: index
27
- });
28
- };
29
- var initIndex = _this.props.defaultIndex == null ? 0 : _this.props.defaultIndex;
30
- _this.state = {
31
- selectedIndex: initIndex
32
- };
33
- return _this;
34
- }
35
- Tabs.prototype.render = function () {
36
- var _this = this;
37
- return (h("div", { style: this.props.tabBarStyle }, this.props.children.map(function (v, index) {
38
- if (v.type != Tab)
39
- return v; // 留的口子,方便往Tabs里插入一些东西
40
- return (h("div", { onClick: function () {
41
- if (_this.state.selectedIndex == index) {
42
- return;
43
- }
44
- _this.setState({
45
- selectedIndex: index
46
- }, function () {
47
- _this.props.onChoose(_this.state.selectedIndex);
48
- });
49
- } }, v));
50
- })));
51
- };
52
- return Tabs;
53
- }(Component));
54
- export { Tabs };
1
+ var __extends = (this && this.__extends) || (function () {
2
+ var extendStatics = function (d, b) {
3
+ extendStatics = Object.setPrototypeOf ||
4
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
6
+ return extendStatics(d, b);
7
+ };
8
+ return function (d, b) {
9
+ if (typeof b !== "function" && b !== null)
10
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
11
+ extendStatics(d, b);
12
+ function __() { this.constructor = d; }
13
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
14
+ };
15
+ })();
16
+ import { Component, h } from "preact";
17
+ import { Tab } from "./Tab";
18
+ var Tabs = /** @class */ (function (_super) {
19
+ __extends(Tabs, _super);
20
+ function Tabs(props) {
21
+ var _this = _super.call(this, props) || this;
22
+ _this.SetCurrentIndex = function (index) {
23
+ if (index < 0 || index >= _this.props.children.length)
24
+ return;
25
+ _this.setState({
26
+ selectedIndex: index
27
+ });
28
+ };
29
+ var initIndex = _this.props.defaultIndex == null ? 0 : _this.props.defaultIndex;
30
+ _this.state = {
31
+ selectedIndex: initIndex
32
+ };
33
+ return _this;
34
+ }
35
+ Tabs.prototype.render = function () {
36
+ var _this = this;
37
+ return (h("div", { style: this.props.tabBarStyle }, this.props.children.map(function (v, index) {
38
+ if (v.type != Tab)
39
+ return v; // 留的口子,方便往Tabs里插入一些东西
40
+ return (h("div", { onClick: function () {
41
+ if (_this.state.selectedIndex == index) {
42
+ return;
43
+ }
44
+ _this.setState({
45
+ selectedIndex: index
46
+ }, function () {
47
+ _this.props.onChoose(_this.state.selectedIndex);
48
+ });
49
+ } }, v));
50
+ })));
51
+ };
52
+ return Tabs;
53
+ }(Component));
54
+ export { Tabs };
package/ui/ui.md CHANGED
@@ -1,2 +1,2 @@
1
- # UI组件
1
+ # UI组件
2
2
  组件源码,参见components目录;对应的示例Demo,参见sample目录