amssui 1.0.20 → 1.0.23
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/es/index.d.ts +2 -0
- package/es/index.js +2 -1
- package/es/menu-nav-icon-button/index.d.ts +9 -0
- package/es/menu-nav-icon-button/index.js +62 -0
- package/es/menu-nav-icon-button/style/index.css +33 -0
- package/es/menu-nav-icon-button/style/index.d.ts +1 -0
- package/es/menu-nav-icon-button/style/index.js +1 -0
- package/es/menu-nav-icon-button/style/index.less +38 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +10 -1
- package/lib/menu-nav-icon-button/index.d.ts +9 -0
- package/lib/menu-nav-icon-button/index.js +76 -0
- package/lib/menu-nav-icon-button/style/index.css +33 -0
- package/lib/menu-nav-icon-button/style/index.d.ts +1 -0
- package/lib/menu-nav-icon-button/style/index.js +7 -0
- package/lib/menu-nav-icon-button/style/index.less +38 -0
- package/package.json +4 -4
package/es/index.d.ts
CHANGED
package/es/index.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export { default as ButtonModal } from './button-modal';
|
|
1
|
+
export { default as ButtonModal } from './button-modal';
|
|
2
|
+
export { default as MenuNavIconButton } from './menu-nav-icon-button';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare type MenuNavIconProps = {
|
|
3
|
+
onChange?: (status: boolean) => void;
|
|
4
|
+
onClick?: () => void;
|
|
5
|
+
status?: boolean;
|
|
6
|
+
className?: string;
|
|
7
|
+
};
|
|
8
|
+
declare const MenuNavIconButton: React.FC<MenuNavIconProps>;
|
|
9
|
+
export default MenuNavIconButton;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
var __read = this && this.__read || function (o, n) {
|
|
2
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
3
|
+
if (!m) return o;
|
|
4
|
+
var i = m.call(o),
|
|
5
|
+
r,
|
|
6
|
+
ar = [],
|
|
7
|
+
e;
|
|
8
|
+
|
|
9
|
+
try {
|
|
10
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {
|
|
11
|
+
ar.push(r.value);
|
|
12
|
+
}
|
|
13
|
+
} catch (error) {
|
|
14
|
+
e = {
|
|
15
|
+
error: error
|
|
16
|
+
};
|
|
17
|
+
} finally {
|
|
18
|
+
try {
|
|
19
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
20
|
+
} finally {
|
|
21
|
+
if (e) throw e.error;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
return ar;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
import { useControllableValue } from 'ahooks';
|
|
29
|
+
import classNames from 'classnames';
|
|
30
|
+
import React from 'react';
|
|
31
|
+
|
|
32
|
+
var MenuNavIconButton = function MenuNavIconButton(props) {
|
|
33
|
+
var _onClick = props.onClick,
|
|
34
|
+
className = props.className;
|
|
35
|
+
|
|
36
|
+
var _a = __read(useControllableValue(props, {
|
|
37
|
+
valuePropName: 'status'
|
|
38
|
+
}), 2),
|
|
39
|
+
status = _a[0],
|
|
40
|
+
setStatus = _a[1];
|
|
41
|
+
|
|
42
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
43
|
+
className: classNames('menu-nav-icon', {
|
|
44
|
+
open: status
|
|
45
|
+
}, className),
|
|
46
|
+
onClick: function onClick() {
|
|
47
|
+
var nextStatus = !status;
|
|
48
|
+
setStatus(nextStatus);
|
|
49
|
+
_onClick === null || _onClick === void 0 ? void 0 : _onClick();
|
|
50
|
+
}
|
|
51
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
52
|
+
className: "menu-nav-icon-wrap"
|
|
53
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
54
|
+
className: "menu-nav-icon-bar"
|
|
55
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
56
|
+
className: "menu-nav-icon-bar"
|
|
57
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
58
|
+
className: "menu-nav-icon-bar"
|
|
59
|
+
})));
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
export default MenuNavIconButton;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
.menu-nav-icon-wrap {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
align-items: flex-start;
|
|
5
|
+
width: 44px;
|
|
6
|
+
padding: 9px 10px;
|
|
7
|
+
border: 1px solid transparent;
|
|
8
|
+
border-radius: 4px;
|
|
9
|
+
}
|
|
10
|
+
.menu-nav-icon-bar {
|
|
11
|
+
display: inline-block;
|
|
12
|
+
width: 22px;
|
|
13
|
+
height: 2px;
|
|
14
|
+
margin-top: 4px;
|
|
15
|
+
background-color: #fff;
|
|
16
|
+
border-radius: 1px;
|
|
17
|
+
}
|
|
18
|
+
.menu-nav-icon span {
|
|
19
|
+
display: block;
|
|
20
|
+
transform: rotate(0deg);
|
|
21
|
+
transition: 0.25s ease-in-out;
|
|
22
|
+
}
|
|
23
|
+
.menu-nav-icon.open span:nth-child(1) {
|
|
24
|
+
position: relative;
|
|
25
|
+
top: 6px;
|
|
26
|
+
transform: rotate(45deg);
|
|
27
|
+
}
|
|
28
|
+
.menu-nav-icon.open span:nth-child(2) {
|
|
29
|
+
transform: rotate(-45deg);
|
|
30
|
+
}
|
|
31
|
+
.menu-nav-icon.open span:nth-child(3) {
|
|
32
|
+
width: 0;
|
|
33
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import './index.less';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import './index.less';
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
.menu-nav-icon-wrap {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
align-items: flex-start;
|
|
5
|
+
width: 44px;
|
|
6
|
+
padding: 9px 10px;
|
|
7
|
+
border: 1px solid transparent;
|
|
8
|
+
border-radius: 4px;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.menu-nav-icon-bar {
|
|
12
|
+
display: inline-block;
|
|
13
|
+
width: 22px;
|
|
14
|
+
height: 2px;
|
|
15
|
+
margin-top: 4px;
|
|
16
|
+
background-color: #fff;
|
|
17
|
+
border-radius: 1px;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.menu-nav-icon span {
|
|
21
|
+
display: block;
|
|
22
|
+
transform: rotate(0deg);
|
|
23
|
+
transition: 0.25s ease-in-out;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.menu-nav-icon.open span:nth-child(1) {
|
|
27
|
+
position: relative;
|
|
28
|
+
top: 6px;
|
|
29
|
+
transform: rotate(45deg);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.menu-nav-icon.open span:nth-child(2) {
|
|
33
|
+
transform: rotate(-45deg);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.menu-nav-icon.open span:nth-child(3) {
|
|
37
|
+
width: 0;
|
|
38
|
+
}
|
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
|
@@ -9,7 +9,7 @@ var __importDefault = this && this.__importDefault || function (mod) {
|
|
|
9
9
|
Object.defineProperty(exports, "__esModule", {
|
|
10
10
|
value: true
|
|
11
11
|
});
|
|
12
|
-
exports.ButtonModal = void 0;
|
|
12
|
+
exports.MenuNavIconButton = exports.ButtonModal = void 0;
|
|
13
13
|
|
|
14
14
|
var button_modal_1 = require("./button-modal");
|
|
15
15
|
|
|
@@ -18,4 +18,13 @@ Object.defineProperty(exports, "ButtonModal", {
|
|
|
18
18
|
get: function get() {
|
|
19
19
|
return __importDefault(button_modal_1)["default"];
|
|
20
20
|
}
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
var menu_nav_icon_button_1 = require("./menu-nav-icon-button");
|
|
24
|
+
|
|
25
|
+
Object.defineProperty(exports, "MenuNavIconButton", {
|
|
26
|
+
enumerable: true,
|
|
27
|
+
get: function get() {
|
|
28
|
+
return __importDefault(menu_nav_icon_button_1)["default"];
|
|
29
|
+
}
|
|
21
30
|
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare type MenuNavIconProps = {
|
|
3
|
+
onChange?: (status: boolean) => void;
|
|
4
|
+
onClick?: () => void;
|
|
5
|
+
status?: boolean;
|
|
6
|
+
className?: string;
|
|
7
|
+
};
|
|
8
|
+
declare const MenuNavIconButton: React.FC<MenuNavIconProps>;
|
|
9
|
+
export default MenuNavIconButton;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __read = this && this.__read || function (o, n) {
|
|
4
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
5
|
+
if (!m) return o;
|
|
6
|
+
var i = m.call(o),
|
|
7
|
+
r,
|
|
8
|
+
ar = [],
|
|
9
|
+
e;
|
|
10
|
+
|
|
11
|
+
try {
|
|
12
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {
|
|
13
|
+
ar.push(r.value);
|
|
14
|
+
}
|
|
15
|
+
} catch (error) {
|
|
16
|
+
e = {
|
|
17
|
+
error: error
|
|
18
|
+
};
|
|
19
|
+
} finally {
|
|
20
|
+
try {
|
|
21
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
22
|
+
} finally {
|
|
23
|
+
if (e) throw e.error;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
return ar;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
var __importDefault = this && this.__importDefault || function (mod) {
|
|
31
|
+
return mod && mod.__esModule ? mod : {
|
|
32
|
+
"default": mod
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
Object.defineProperty(exports, "__esModule", {
|
|
37
|
+
value: true
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
var ahooks_1 = require("ahooks");
|
|
41
|
+
|
|
42
|
+
var classnames_1 = __importDefault(require("classnames"));
|
|
43
|
+
|
|
44
|
+
var react_1 = __importDefault(require("react"));
|
|
45
|
+
|
|
46
|
+
var MenuNavIconButton = function MenuNavIconButton(props) {
|
|
47
|
+
var _onClick = props.onClick,
|
|
48
|
+
className = props.className;
|
|
49
|
+
|
|
50
|
+
var _a = __read((0, ahooks_1.useControllableValue)(props, {
|
|
51
|
+
valuePropName: 'status'
|
|
52
|
+
}), 2),
|
|
53
|
+
status = _a[0],
|
|
54
|
+
setStatus = _a[1];
|
|
55
|
+
|
|
56
|
+
return react_1["default"].createElement("div", {
|
|
57
|
+
className: (0, classnames_1["default"])('menu-nav-icon', {
|
|
58
|
+
open: status
|
|
59
|
+
}, className),
|
|
60
|
+
onClick: function onClick() {
|
|
61
|
+
var nextStatus = !status;
|
|
62
|
+
setStatus(nextStatus);
|
|
63
|
+
_onClick === null || _onClick === void 0 ? void 0 : _onClick();
|
|
64
|
+
}
|
|
65
|
+
}, react_1["default"].createElement("div", {
|
|
66
|
+
className: "menu-nav-icon-wrap"
|
|
67
|
+
}, react_1["default"].createElement("span", {
|
|
68
|
+
className: "menu-nav-icon-bar"
|
|
69
|
+
}), react_1["default"].createElement("span", {
|
|
70
|
+
className: "menu-nav-icon-bar"
|
|
71
|
+
}), react_1["default"].createElement("span", {
|
|
72
|
+
className: "menu-nav-icon-bar"
|
|
73
|
+
})));
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
exports["default"] = MenuNavIconButton;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
.menu-nav-icon-wrap {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
align-items: flex-start;
|
|
5
|
+
width: 44px;
|
|
6
|
+
padding: 9px 10px;
|
|
7
|
+
border: 1px solid transparent;
|
|
8
|
+
border-radius: 4px;
|
|
9
|
+
}
|
|
10
|
+
.menu-nav-icon-bar {
|
|
11
|
+
display: inline-block;
|
|
12
|
+
width: 22px;
|
|
13
|
+
height: 2px;
|
|
14
|
+
margin-top: 4px;
|
|
15
|
+
background-color: #fff;
|
|
16
|
+
border-radius: 1px;
|
|
17
|
+
}
|
|
18
|
+
.menu-nav-icon span {
|
|
19
|
+
display: block;
|
|
20
|
+
transform: rotate(0deg);
|
|
21
|
+
transition: 0.25s ease-in-out;
|
|
22
|
+
}
|
|
23
|
+
.menu-nav-icon.open span:nth-child(1) {
|
|
24
|
+
position: relative;
|
|
25
|
+
top: 6px;
|
|
26
|
+
transform: rotate(45deg);
|
|
27
|
+
}
|
|
28
|
+
.menu-nav-icon.open span:nth-child(2) {
|
|
29
|
+
transform: rotate(-45deg);
|
|
30
|
+
}
|
|
31
|
+
.menu-nav-icon.open span:nth-child(3) {
|
|
32
|
+
width: 0;
|
|
33
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import './index.less';
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
.menu-nav-icon-wrap {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
align-items: flex-start;
|
|
5
|
+
width: 44px;
|
|
6
|
+
padding: 9px 10px;
|
|
7
|
+
border: 1px solid transparent;
|
|
8
|
+
border-radius: 4px;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.menu-nav-icon-bar {
|
|
12
|
+
display: inline-block;
|
|
13
|
+
width: 22px;
|
|
14
|
+
height: 2px;
|
|
15
|
+
margin-top: 4px;
|
|
16
|
+
background-color: #fff;
|
|
17
|
+
border-radius: 1px;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.menu-nav-icon span {
|
|
21
|
+
display: block;
|
|
22
|
+
transform: rotate(0deg);
|
|
23
|
+
transition: 0.25s ease-in-out;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.menu-nav-icon.open span:nth-child(1) {
|
|
27
|
+
position: relative;
|
|
28
|
+
top: 6px;
|
|
29
|
+
transform: rotate(45deg);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.menu-nav-icon.open span:nth-child(2) {
|
|
33
|
+
transform: rotate(-45deg);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.menu-nav-icon.open span:nth-child(3) {
|
|
37
|
+
width: 0;
|
|
38
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "amssui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.23",
|
|
4
4
|
"description": "react ui library",
|
|
5
5
|
"author": "jason <usochen@gmail.com>",
|
|
6
6
|
"main": "./lib/index.js",
|
|
@@ -31,13 +31,13 @@
|
|
|
31
31
|
],
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@ahooksjs/use-url-state": "^2.5.8",
|
|
34
|
-
"a-icons": "^1.0.
|
|
34
|
+
"a-icons": "^1.0.83",
|
|
35
35
|
"aa-utils": "^2.0.35",
|
|
36
36
|
"ahooks": "^3.0.8"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
39
|
"react": "^16.8.6 || ^17.0 || ^18.0",
|
|
40
|
-
"react-vant": "^2.0.0-alpha.41"
|
|
40
|
+
"react-vant": "^2.0.0-alpha.41 || ^3.0.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@types/enzyme": "^3.10.5",
|
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
"node": ">=10.0.0"
|
|
49
49
|
},
|
|
50
50
|
"license": "MIT",
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "d1be031cfc531f5bb10742f2aea82051b0ca6c60"
|
|
52
52
|
}
|