yootd 0.0.57 → 0.0.59
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/export/components/DownIcon.d.ts +3 -0
- package/dist/export/components/DownIcon.js +29 -0
- package/dist/export/components/UpIcon.d.ts +3 -0
- package/dist/export/components/UpIcon.js +28 -0
- package/dist/export/index.d.ts +6 -0
- package/dist/export/index.js +39 -0
- package/dist/export/index.scss +6 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/package.json +1 -1
@@ -0,0 +1,29 @@
|
|
1
|
+
var _excluded = ["style", "className"];
|
2
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
3
|
+
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; }
|
4
|
+
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; }
|
5
|
+
import React, { forwardRef } from 'react';
|
6
|
+
export var DownIcon = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
7
|
+
var style = _ref.style,
|
8
|
+
className = _ref.className,
|
9
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
10
|
+
return /*#__PURE__*/React.createElement("svg", _extends({
|
11
|
+
ref: ref,
|
12
|
+
width: "16",
|
13
|
+
height: "16",
|
14
|
+
viewBox: "0 0 16 16",
|
15
|
+
fill: "none",
|
16
|
+
xmlns: "http://www.w3.org/2000/svg"
|
17
|
+
}, rest, {
|
18
|
+
style: style,
|
19
|
+
className: className
|
20
|
+
}), /*#__PURE__*/React.createElement("g", {
|
21
|
+
id: "chevron-left"
|
22
|
+
}, /*#__PURE__*/React.createElement("path", {
|
23
|
+
id: "union",
|
24
|
+
d: "M12.46 6.4603L11.5407 5.54106L8.00034 9.08144L4.45996 5.54106L3.54072 6.4603L8.00034 10.9199L12.46 6.4603Z",
|
25
|
+
fill: "black",
|
26
|
+
fillOpacity: "0.45"
|
27
|
+
})));
|
28
|
+
});
|
29
|
+
DownIcon.displayName = 'DownIcon';
|
@@ -0,0 +1,28 @@
|
|
1
|
+
var _excluded = ["style", "className"];
|
2
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
3
|
+
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; }
|
4
|
+
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; }
|
5
|
+
import React, { forwardRef } from 'react';
|
6
|
+
export var UpIcon = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
7
|
+
var style = _ref.style,
|
8
|
+
className = _ref.className,
|
9
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
10
|
+
return /*#__PURE__*/React.createElement("svg", _extends({
|
11
|
+
ref: ref,
|
12
|
+
width: "16",
|
13
|
+
height: "16",
|
14
|
+
viewBox: "0 0 16 16",
|
15
|
+
fill: "none",
|
16
|
+
xmlns: "http://www.w3.org/2000/svg"
|
17
|
+
}, rest, {
|
18
|
+
style: style,
|
19
|
+
className: className
|
20
|
+
}), /*#__PURE__*/React.createElement("g", {
|
21
|
+
id: "chevron-left"
|
22
|
+
}, /*#__PURE__*/React.createElement("path", {
|
23
|
+
id: "union",
|
24
|
+
d: "M12.46 9.5397L11.5407 10.4589L8.00034 6.91856L4.45996 10.4589L3.54072 9.5397L8.00034 5.08008L12.46 9.5397Z",
|
25
|
+
fill: "#4D8DE2"
|
26
|
+
})));
|
27
|
+
});
|
28
|
+
UpIcon.displayName = 'UpIcon';
|
@@ -0,0 +1,39 @@
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
2
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
3
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
4
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
5
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
6
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
7
|
+
import { Dropdown } from 'antd';
|
8
|
+
import React, { useState } from 'react';
|
9
|
+
import { useBem } from "../hooks/useBem";
|
10
|
+
import { DownIcon } from "./components/DownIcon";
|
11
|
+
import { UpIcon } from "./components/UpIcon";
|
12
|
+
import "./index.scss";
|
13
|
+
export var Export = function Export(_ref) {
|
14
|
+
var _ref$items = _ref.items,
|
15
|
+
items = _ref$items === void 0 ? [{
|
16
|
+
label: '导入',
|
17
|
+
key: '1'
|
18
|
+
}, {
|
19
|
+
label: '下载模板',
|
20
|
+
key: '2'
|
21
|
+
}] : _ref$items;
|
22
|
+
var mb = useBem('export');
|
23
|
+
// 当前菜单展开状态
|
24
|
+
var _useState = useState(false),
|
25
|
+
_useState2 = _slicedToArray(_useState, 2),
|
26
|
+
open = _useState2[0],
|
27
|
+
setOpen = _useState2[1];
|
28
|
+
var menuProps = {
|
29
|
+
items: items
|
30
|
+
};
|
31
|
+
return /*#__PURE__*/React.createElement(Dropdown.Button, {
|
32
|
+
menu: menuProps,
|
33
|
+
icon: open ? /*#__PURE__*/React.createElement(UpIcon, null) : /*#__PURE__*/React.createElement(DownIcon, null),
|
34
|
+
overlayClassName: "".concat(mb),
|
35
|
+
onOpenChange: function onOpenChange(open) {
|
36
|
+
setOpen(open);
|
37
|
+
}
|
38
|
+
}, "\u5BFC\u5165");
|
39
|
+
};
|
package/dist/index.d.ts
CHANGED
@@ -23,6 +23,7 @@ export { Department } from './department';
|
|
23
23
|
export type { DepartmentProps } from './department/types/types';
|
24
24
|
export { DropdownSelect } from './dropdown-select';
|
25
25
|
export type { DropdownSelectProps } from './dropdown-select/types/type';
|
26
|
+
export { Export } from './export';
|
26
27
|
export { JobTitle } from './job-title';
|
27
28
|
export type { JobTitleProps } from './job-title/types/types';
|
28
29
|
export { Role } from './role';
|
package/dist/index.js
CHANGED
@@ -12,6 +12,7 @@ export { Divider } from "./divider";
|
|
12
12
|
export { Dropdown } from "./dropdown";
|
13
13
|
export { Department } from "./department";
|
14
14
|
export { DropdownSelect } from "./dropdown-select";
|
15
|
+
export { Export } from "./export";
|
15
16
|
export { JobTitle } from "./job-title";
|
16
17
|
export { Role } from "./role";
|
17
18
|
export { Flex } from "./flex";
|