pixuireactcomponents 1.1.19 → 1.1.21
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/README.md +5 -5
- package/index.d.ts +15 -14
- package/index.js +16 -15
- package/package.json +11 -11
- package/tools/EventDispatcherJs.d.ts +10 -10
- package/tools/EventDispatcherJs.js +71 -71
- package/tools/Logger.d.ts +6 -6
- package/tools/Logger.js +138 -138
- package/tools/tools.md +21 -21
- package/ui/components/button/Button.d.ts +5 -0
- package/ui/components/button/Button.js +37 -0
- package/ui/components/carousel/Carousel.d.ts +5 -5
- package/ui/components/carousel/Carousel.js +219 -216
- package/ui/components/dropdown/Dropdown.d.ts +30 -30
- package/ui/components/dropdown/Dropdown.js +92 -92
- package/ui/components/dropdown/DropdownOptionUI.d.ts +11 -11
- package/ui/components/dropdown/DropdownOptionUI.js +28 -28
- package/ui/components/dropdown/DropdownSpreadMainUI.d.ts +9 -9
- package/ui/components/dropdown/DropdownSpreadMainUI.js +27 -27
- package/ui/components/dropdown/DropdownUnspreadMainUI.d.ts +9 -9
- package/ui/components/dropdown/DropdownUnspreadMainUI.js +27 -27
- package/ui/components/gradient/GradientText.d.ts +63 -63
- package/ui/components/gradient/GradientText.js +329 -332
- package/ui/components/outlinetext/OutlineText.d.ts +73 -73
- package/ui/components/outlinetext/OutlineText.js +157 -157
- package/ui/components/progress/Progress.d.ts +34 -34
- package/ui/components/progress/Progress.js +142 -142
- package/ui/components/slapface/Slapface.d.ts +12 -9
- package/ui/components/slapface/Slapface.js +227 -198
- package/ui/components/slider/Slider.d.ts +57 -57
- package/ui/components/slider/Slider.js +289 -289
- package/ui/components/tab/Tab.d.ts +6 -6
- package/ui/components/tab/Tab.js +27 -27
- package/ui/components/tab/Tabs.d.ts +12 -12
- package/ui/components/tab/Tabs.js +54 -54
- package/ui/ui.md +1 -1
- package/ui/components/slapface/less/Slapface.less +0 -107
|
@@ -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目录
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
.maininterface{
|
|
2
|
-
width:1200px;
|
|
3
|
-
height:682px;
|
|
4
|
-
/* width:100%;
|
|
5
|
-
height:100%; */
|
|
6
|
-
margin: auto;
|
|
7
|
-
/* padding: 0px 36px 36px 36px; */
|
|
8
|
-
/* background-color: grey; */
|
|
9
|
-
flex-direction: column;
|
|
10
|
-
position: relative;
|
|
11
|
-
}
|
|
12
|
-
.gameTitle{
|
|
13
|
-
height : 76px;
|
|
14
|
-
width:244px;
|
|
15
|
-
position: relative;
|
|
16
|
-
/* left:12px;
|
|
17
|
-
top:0px; */
|
|
18
|
-
font-size: 44px;
|
|
19
|
-
color:white;
|
|
20
|
-
background-color: rgb(180, 180, 180);
|
|
21
|
-
z-index: 999;
|
|
22
|
-
text-align: center;
|
|
23
|
-
float:left;
|
|
24
|
-
}
|
|
25
|
-
.closeButton{
|
|
26
|
-
width:36px;
|
|
27
|
-
height:36px;
|
|
28
|
-
background-size: contain;
|
|
29
|
-
/* float: left; */
|
|
30
|
-
position: absolute;
|
|
31
|
-
right:0px;
|
|
32
|
-
top:0px;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
@keyframes zoom{
|
|
36
|
-
from{
|
|
37
|
-
transform: scale(0)
|
|
38
|
-
}
|
|
39
|
-
80%{
|
|
40
|
-
transform: scale(1.1);
|
|
41
|
-
}
|
|
42
|
-
to{
|
|
43
|
-
transform: scale(1);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.groupBack{
|
|
48
|
-
animation-name:zoom;
|
|
49
|
-
animation-timing-function:ease-in-out;
|
|
50
|
-
animation-iteration-count:1;
|
|
51
|
-
animation-duration: 1s;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.isShowToday{
|
|
55
|
-
width:36px;
|
|
56
|
-
height:31px;
|
|
57
|
-
background-size: contain;
|
|
58
|
-
position: absolute;
|
|
59
|
-
right:0px;
|
|
60
|
-
bottom:0px;
|
|
61
|
-
}
|
|
62
|
-
.title{
|
|
63
|
-
position: absolute;
|
|
64
|
-
color:red;
|
|
65
|
-
left:0px;
|
|
66
|
-
top:0px;
|
|
67
|
-
}
|
|
68
|
-
.groupFrame{
|
|
69
|
-
position:absolute;
|
|
70
|
-
right:0%;
|
|
71
|
-
bottom:0%;
|
|
72
|
-
}
|
|
73
|
-
.jumpButton{
|
|
74
|
-
position: absolute;
|
|
75
|
-
right:50%;
|
|
76
|
-
bottom:10%;
|
|
77
|
-
/* top:80%; */
|
|
78
|
-
transform: translate(50%, -50%);
|
|
79
|
-
}
|
|
80
|
-
.slapImage{
|
|
81
|
-
box-sizing: content-box;
|
|
82
|
-
/* border-width: 5px;
|
|
83
|
-
border-color: black;
|
|
84
|
-
border-style: solid; */
|
|
85
|
-
position: absolute;
|
|
86
|
-
left:50%;
|
|
87
|
-
top:50%;
|
|
88
|
-
transform:translate(-50%,-50%);
|
|
89
|
-
}
|
|
90
|
-
.frame {
|
|
91
|
-
border: 12px solid rgb(60, 65, 71);
|
|
92
|
-
display: flex;
|
|
93
|
-
/* flex-direction: row; */
|
|
94
|
-
/* flex-basis: content; */
|
|
95
|
-
/* justify-content: space-around; */
|
|
96
|
-
width: 1128px;
|
|
97
|
-
height: 604px;
|
|
98
|
-
position: relative;
|
|
99
|
-
top:-12px;
|
|
100
|
-
background-color: rgb(60, 65, 71);
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
.mask{
|
|
104
|
-
// background:url(images/coupon-logo.gif) no-repeat;
|
|
105
|
-
height:100px;background-color:#fff;
|
|
106
|
-
opacity:0.6;
|
|
107
|
-
}
|