@easyv/react-components 0.0.37 → 0.0.39

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.
@@ -60,9 +60,11 @@
60
60
  text-align: center;
61
61
  font-size: 12px;
62
62
  opacity: 0;
63
+ border-radius: var(--border-radius-small);
63
64
 
64
65
  .arco-input-number-handle-up,
65
66
  .arco-input-number-handle-down {
67
+ color: var(--color-text-1);
66
68
  display: flex;
67
69
  align-items: center;
68
70
  justify-content: center;
@@ -71,12 +73,21 @@
71
73
 
72
74
  &.arco-input-number-handle-disabled {
73
75
  cursor: not-allowed;
76
+ color: var(--color-text-3);
74
77
  }
75
78
 
76
79
  &:not(.arco-input-number-handle-disabled):hover {
77
80
  background-color: var(--color-fill-2);
78
81
  }
79
82
  }
83
+
84
+ .arco-input-number-handle-up {
85
+ border-radius: var(--border-radius-small) var(--border-radius-small) 0 0;
86
+ }
87
+
88
+ .arco-input-number-handle-down {
89
+ border-radius: 0 0 var(--border-radius-small) var(--border-radius-small);
90
+ }
80
91
  }
81
92
 
82
93
  &:hover {
@@ -0,0 +1,17 @@
1
+ /// <reference types="react" />
2
+ import type { MenuProps } from './interface';
3
+ import './index.less';
4
+ declare const XMenu: import("react").ForwardRefExoticComponent<MenuProps & import("react").RefAttributes<unknown>> & {
5
+ Item: import("react").ForwardRefExoticComponent<import("@arco-design/web-react").MenuItemProps & import("react").RefAttributes<unknown>> & {
6
+ menuType: string;
7
+ };
8
+ ItemGroup: import("react").ForwardRefExoticComponent<import("@arco-design/web-react").MenuItemGroupProps & import("react").RefAttributes<unknown>> & {
9
+ menuType: string;
10
+ };
11
+ SubMenu: import("react").ForwardRefExoticComponent<import("@arco-design/web-react").MenuSubMenuProps & import("react").RefAttributes<unknown>> & {
12
+ menuType: string;
13
+ };
14
+ __ARCO_MENU__: boolean;
15
+ };
16
+ export default XMenu;
17
+ export { MenuProps };
@@ -11,6 +11,7 @@
11
11
  border-inline-end-width: 1px;
12
12
  border-color: var(--color-border-4);
13
13
  margin: 0;
14
+ background-color: var(--color-bg-2);
14
15
 
15
16
  &::after {
16
17
  background-color: transparent;
@@ -26,10 +27,15 @@
26
27
  border-inline-start-width: 1px;
27
28
  }
28
29
 
30
+ &:not(.arco-radio-disabled):hover {
31
+ background-color: var(--color-fill-2);
32
+ }
33
+
29
34
  &.arco-radio-checked {
30
35
  z-index: 1;
31
36
  color: rgb(var(--primary-6));
32
37
  border-color: rgb(var(--primary-6));
38
+ background-color: rgb(var(--primary-1));
33
39
 
34
40
  &::before {
35
41
  left: -1px;
@@ -0,0 +1 @@
1
+ <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14' width="12" height="12"><path fill-rule='evenodd' clip-rule='evenodd' d='M11.1365 3.65805C11.0038 3.52544 10.7888 3.52544 10.6562 3.65805L5.79333 8.52096L3.52992 6.25755C3.39731 6.12494 3.18231 6.12494 3.0497 6.25755L2.49155 6.8157C2.35894 6.94831 2.35894 7.16332 2.49155 7.29593L5.07741 9.88179C5.08664 9.89102 5.09627 9.89961 5.10625 9.90756L5.55475 10.3561C5.68736 10.4887 5.90237 10.4887 6.03498 10.3561L11.6946 4.69643C11.8272 4.56382 11.8272 4.34881 11.6946 4.2162L11.1365 3.65805Z'/></svg>
@@ -36,12 +36,15 @@
36
36
  // 添加选中的样式后面的勾
37
37
  li.arco-select-option-selected {
38
38
  &::before {
39
- content: url('data:image/svg+xml; utf8, <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14 14" fill="currentColor"><path fill-rule="evenodd" clip-rule="evenodd" d="M11.1365 3.65805C11.0038 3.52544 10.7888 3.52544 10.6562 3.65805L5.79333 8.52096L3.52992 6.25755C3.39731 6.12494 3.18231 6.12494 3.0497 6.25755L2.49155 6.8157C2.35894 6.94831 2.35894 7.16332 2.49155 7.29593L5.07741 9.88179C5.08664 9.89102 5.09627 9.89961 5.10625 9.90756L5.55475 10.3561C5.68736 10.4887 5.90237 10.4887 6.03498 10.3561L11.6946 4.69643C11.8272 4.56382 11.8272 4.34881 11.6946 4.2162L11.1365 3.65805Z"/></svg>');
39
+ content: '';
40
40
  position: absolute;
41
- top: 2px;
42
- right: 9px;
43
- width: 14px;
44
- height: 14px;
41
+ right: 8px;
42
+ width: 24px;
43
+ height: 100%;
44
+ transform: scale(0.5);
45
+ mask: url('./check.svg') no-repeat center center;
46
+ mask-size: cover;
47
+ background-color: var(--color-text-1);
45
48
  }
46
49
  }
47
50
 
@@ -1,4 +1,5 @@
1
- import { Upload } from '@arco-design/web-react';
1
+ /// <reference types="react" />
2
+ import { UploadProps } from './interface';
2
3
  import './index.less';
3
- export default Upload;
4
- export type * from './interface';
4
+ declare const _default: import("react").ForwardRefExoticComponent<UploadProps & import("react").RefAttributes<unknown>>;
5
+ export default _default;
@@ -1,3 +1,64 @@
1
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
+ var _excluded = ["drag"],
3
+ _excluded2 = ["tip", "dragIcon", "dragTitle", "dragHeight", "mask"];
4
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
5
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
6
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
7
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
8
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
9
+ 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; }
10
+ 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; }
11
+ import { forwardRef } from 'react';
1
12
  import { Upload } from '@arco-design/web-react';
13
+ import { DTableUploadColored } from '@easyv/react-icons';
2
14
  import "./index.less";
3
- export default Upload;
15
+ import { jsx as _jsx } from "react/jsx-runtime";
16
+ import { jsxs as _jsxs } from "react/jsx-runtime";
17
+ var defaultTitle = /*#__PURE__*/_jsxs("span", {
18
+ children: ["\u5C06\u6587\u4EF6\u62D6\u81F3\u6B64\u5904\u6216", /*#__PURE__*/_jsx("span", {
19
+ className: "arco-upload-drag-title-em",
20
+ children: "\u9009\u62E9\u6587\u4EF6"
21
+ })]
22
+ });
23
+ function XUpload(_ref, ref) {
24
+ var drag = _ref.drag,
25
+ restProps = _objectWithoutProperties(_ref, _excluded);
26
+ if (drag) {
27
+ var tip = restProps.tip,
28
+ _restProps$dragIcon = restProps.dragIcon,
29
+ dragIcon = _restProps$dragIcon === void 0 ? /*#__PURE__*/_jsx(DTableUploadColored, {}) : _restProps$dragIcon,
30
+ _restProps$dragTitle = restProps.dragTitle,
31
+ dragTitle = _restProps$dragTitle === void 0 ? defaultTitle : _restProps$dragTitle,
32
+ dragHeight = restProps.dragHeight,
33
+ mask = restProps.mask,
34
+ dragProps = _objectWithoutProperties(restProps, _excluded2);
35
+ return /*#__PURE__*/_jsx(Upload, _objectSpread(_objectSpread({
36
+ ref: ref,
37
+ drag: true
38
+ }, dragProps), {}, {
39
+ children: /*#__PURE__*/_jsxs("div", {
40
+ className: "arco-upload-drag-content",
41
+ style: {
42
+ height: dragHeight
43
+ },
44
+ children: [dragIcon && /*#__PURE__*/_jsx("div", {
45
+ className: "arco-upload-drag-icon",
46
+ children: dragIcon
47
+ }), dragTitle && /*#__PURE__*/_jsx("div", {
48
+ className: "arco-upload-drag-title",
49
+ children: dragTitle
50
+ }), tip && /*#__PURE__*/_jsx("div", {
51
+ className: "arco-upload-drag-tip",
52
+ children: tip
53
+ }), mask && /*#__PURE__*/_jsx("div", {
54
+ className: "arco-upload-drag-mask",
55
+ children: mask
56
+ })]
57
+ })
58
+ }));
59
+ }
60
+ return /*#__PURE__*/_jsx(Upload, _objectSpread({
61
+ ref: ref
62
+ }, restProps));
63
+ }
64
+ export default /*#__PURE__*/forwardRef(XUpload);
@@ -0,0 +1,66 @@
1
+ // .arco-upload {
2
+ // &.arco-upload-drag {
3
+ // height: 100%;
4
+
5
+ // .arco-upload-trigger {
6
+ // height: 100%;
7
+
8
+ // & > div {
9
+ // height: 100%;
10
+ // }
11
+ // }
12
+ // }
13
+ // }
14
+
15
+ .arco-upload-drag-content {
16
+ position: relative;
17
+ display: flex;
18
+ flex-direction: column;
19
+ justify-content: center;
20
+ align-items: center;
21
+ background-color: var(--color-fill-1);
22
+ border-radius: 4px;
23
+ border: 1px dashed var(--color-border-2);
24
+ height: 100%;
25
+
26
+ &:hover {
27
+ background-color: var(--color-fill-2);
28
+ border: 1px dashed var(--color-border-3);
29
+
30
+ .arco-upload-drag-mask {
31
+ display: flex;
32
+ }
33
+ }
34
+
35
+ .arco-upload-drag-icon {
36
+ display: flex;
37
+ align-items: center;
38
+ font-size: 64px;
39
+ }
40
+
41
+ .arco-upload-drag-title {
42
+ color: var(--color-text-1);
43
+ margin-bottom: 4px;
44
+
45
+ .arco-upload-drag-title-em {
46
+ margin-left: 4px;
47
+ color: rgb(var(--primary-6));
48
+ }
49
+ }
50
+
51
+ .arco-upload-drag-tip {
52
+ color: var(--color-text-3);
53
+ }
54
+
55
+ .arco-upload-drag-mask {
56
+ display: none;
57
+ position: absolute;
58
+ top: 0;
59
+ left: 0;
60
+ right: 0;
61
+ bottom: 0;
62
+ background-color: rgba(0, 0, 0, 0.64);
63
+ justify-content: center;
64
+ align-items: center;
65
+ }
66
+ }
@@ -1,2 +1,11 @@
1
- export type { UploadProps } from '@arco-design/web-react';
2
- export type { UploadInstance } from '@arco-design/web-react/es/Upload';
1
+ import React from 'react';
2
+ import type { UploadProps } from '@arco-design/web-react';
3
+ import type { UploadInstance } from '@arco-design/web-react/es/Upload';
4
+ interface XUploadProps extends UploadProps {
5
+ mask?: React.ReactNode;
6
+ dragTitle?: React.ReactNode;
7
+ dragIcon?: React.ReactNode;
8
+ dragHeight?: number;
9
+ children?: React.ReactNode;
10
+ }
11
+ export type { XUploadProps as UploadProps, UploadInstance };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@easyv/react-components",
3
- "version": "0.0.37",
3
+ "version": "0.0.39",
4
4
  "description": "a react component library base on arco design",
5
5
  "license": "MIT",
6
6
  "module": "dist/index.js",
@@ -47,7 +47,7 @@
47
47
  ]
48
48
  },
49
49
  "dependencies": {
50
- "@easyv/react-icons": "4.0.0",
50
+ "@easyv/react-icons": "4.14.0",
51
51
  "ahooks": "^3.7.8",
52
52
  "classnames": "^2.3.2",
53
53
  "rc-color-picker": "1.2.6"