@easyv/react-components 0.0.1 → 0.0.3

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.
@@ -0,0 +1,2 @@
1
+ import './Points.less';
2
+ export default function Points(props: any): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,79 @@
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
+ 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; }
3
+ 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; }
4
+ 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; }
5
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
6
+ 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); }
7
+ import React, { useRef, useCallback } from 'react';
8
+ import classNames from 'classnames';
9
+ import { useEventListener } from 'ahooks';
10
+ import { getBackgroundAccordingColor, getMiddleColor } from "./utils";
11
+ import "./Points.less";
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
+ export default function Points(props) {
14
+ var _props$dots = props.dots,
15
+ dots = _props$dots === void 0 ? [] : _props$dots,
16
+ active = props.active,
17
+ setActive = props.setActive,
18
+ onChange = props.onChange;
19
+ var mouseDownRef = useRef(false);
20
+ var containerRect = useRef({});
21
+ var containerRef = useRef(null);
22
+ var handleMouseDown = function handleMouseDown(index, e) {
23
+ e.stopPropagation();
24
+ mouseDownRef.current = true;
25
+ containerRect.current = containerRef.current.getBoundingClientRect();
26
+ setActive(index);
27
+ };
28
+ var handleMouseMove = function handleMouseMove(e) {
29
+ e.stopPropagation();
30
+ if (mouseDownRef.current) {
31
+ var newOffset = (e.clientX - containerRect.current.x) / containerRect.current.width * 100;
32
+ newOffset = newOffset > 100 ? 100 : newOffset < 0 ? 0 : newOffset;
33
+ var newDots = dots.map(function (d, i) {
34
+ return i === active ? _objectSpread(_objectSpread({}, d), {}, {
35
+ offset: newOffset
36
+ }) : d;
37
+ });
38
+ onChange(newDots);
39
+ }
40
+ };
41
+ var handleMouseUp = useCallback(function (e) {
42
+ e.stopPropagation();
43
+ mouseDownRef.current = false;
44
+ }, []);
45
+ useEventListener('mousemove', handleMouseMove);
46
+ useEventListener('mouseup', handleMouseUp);
47
+ var handleAddColor = function handleAddColor(e) {
48
+ if (mouseDownRef.current) {
49
+ return;
50
+ }
51
+ var offset = Math.floor(e.nativeEvent.offsetX / e.target.offsetWidth * 100);
52
+ var newColor = getMiddleColor(dots, offset);
53
+ onChange(dots.concat({
54
+ color: newColor,
55
+ offset: offset
56
+ }));
57
+ setActive(dots.length);
58
+ };
59
+ return /*#__PURE__*/_jsx("div", {
60
+ className: 'arco-color-picker-points-bar',
61
+ style: getBackgroundAccordingColor(dots, 90),
62
+ onMouseDown: handleAddColor,
63
+ ref: containerRef,
64
+ children: dots.map(function (dot, i) {
65
+ return /*#__PURE__*/_jsx("span", {
66
+ className: classNames('arco-color-picker-points-dot', {
67
+ 'arco-color-picker-points-dot-active': active === i
68
+ }),
69
+ style: {
70
+ backgroundColor: dot.color,
71
+ left: "".concat(dot.offset, "%")
72
+ },
73
+ onMouseDown: function onMouseDown(e) {
74
+ return handleMouseDown(i, e);
75
+ }
76
+ }, i);
77
+ })
78
+ });
79
+ }
@@ -0,0 +1,51 @@
1
+ .arco-color-picker-points-bar {
2
+ position: relative;
3
+ width: 150px;
4
+ height: 6px;
5
+ margin-right: 16px;
6
+ border-radius: 4px;
7
+
8
+ &::before {
9
+ content: '';
10
+ position: relative;
11
+ z-index: -1;
12
+ display: block;
13
+ width: 100%;
14
+ height: 100%;
15
+ border-radius: 4px;
16
+ background-image: linear-gradient(
17
+ 45deg,
18
+ #404040 25%,
19
+ transparent 0,
20
+ transparent 75%,
21
+ #404040 0
22
+ ),
23
+ linear-gradient(
24
+ 45deg,
25
+ #404040 25%,
26
+ transparent 0,
27
+ transparent 75%,
28
+ #404040 0
29
+ );
30
+ background-color: #4a4a4a;
31
+ background-size: 10px 10px;
32
+ background-position: 0 0, 5px 5px;
33
+ }
34
+
35
+ .arco-color-picker-points-dot {
36
+ position: absolute;
37
+ top: -2px;
38
+ width: 10px;
39
+ height: 10px;
40
+ border-radius: 50%;
41
+ transform: translateX(-50%);
42
+ border: 2px solid #ffffff;
43
+ cursor: pointer;
44
+
45
+ &.arco-color-picker-points-dot-active {
46
+ width: 12px;
47
+ height: 12px;
48
+ box-shadow: 0 0 0 3px rgba(36, 145, 247, 0.6);
49
+ }
50
+ }
51
+ }
@@ -0,0 +1,4 @@
1
+ import 'rc-color-picker/assets/index.css';
2
+ import { ColorPickerProps } from './interface';
3
+ import './index.less';
4
+ export default function ColorPicker({ value, onChange, }: ColorPickerProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,39 @@
1
+ import React from 'react';
2
+ import { Panel as ColorPickerPanel } from 'rc-color-picker';
3
+ import 'rc-color-picker/assets/index.css';
4
+ import Color from 'rc-color-picker/lib/helpers/color';
5
+ import { useDebounceFn } from 'ahooks';
6
+ import "./index.less";
7
+ import { jsx as _jsx } from "react/jsx-runtime";
8
+ export default function ColorPicker(_ref) {
9
+ var _ref$value = _ref.value,
10
+ value = _ref$value === void 0 ? 'rgba(255,0,255,0.5)' : _ref$value,
11
+ onChange = _ref.onChange;
12
+ var colorObj = new Color(value);
13
+ console.log('colorObj', colorObj, colorObj.toRgbString());
14
+ var _useDebounceFn = useDebounceFn(function (_ref2) {
15
+ var color = _ref2.color,
16
+ alpha = _ref2.alpha;
17
+ var newColor;
18
+ var rgbColor;
19
+ if (alpha === 100) {
20
+ newColor = color;
21
+ } else {
22
+ rgbColor = new Color(color).RGB;
23
+ newColor = "RGBA(".concat(rgbColor[0], ",").concat(rgbColor[1], ",").concat(rgbColor[2], ",").concat(alpha / 100, ")");
24
+ }
25
+ onChange === null || onChange === void 0 ? void 0 : onChange(newColor);
26
+ }, {
27
+ wait: 100,
28
+ leading: true,
29
+ trailing: false
30
+ }),
31
+ run = _useDebounceFn.run;
32
+ return /*#__PURE__*/_jsx(ColorPickerPanel, {
33
+ className: "arco-color-picker",
34
+ mode: "RGB",
35
+ color: colorObj.toHexString(),
36
+ alpha: colorObj.alpha,
37
+ onChange: run
38
+ });
39
+ }
@@ -0,0 +1,160 @@
1
+ .arco-color-picker {
2
+ border: 1px solid var(--color-border-3);
3
+ background-color: var(--color-bg-white);
4
+ width: 238px;
5
+
6
+ .rc-color-picker-panel-board {
7
+ margin: 11px 11px 0;
8
+ }
9
+
10
+ .rc-color-picker-panel-board-hsv {
11
+ width: 216px;
12
+ }
13
+
14
+ .rc-color-picker-panel-ribbon,
15
+ .rc-color-picker-panel-alpha {
16
+ border-radius: 0;
17
+ box-shadow: none;
18
+
19
+ span {
20
+ width: 12px;
21
+ height: 12px;
22
+ border-radius: 6px;
23
+ border: 2px solid #fff;
24
+ background-color: transparent;
25
+ margin-left: -6px;
26
+ margin-top: -3px;
27
+ }
28
+ }
29
+
30
+ .rc-color-picker-panel-wrap {
31
+ margin-top: 16px;
32
+ }
33
+
34
+ // rgb滑块
35
+ .rc-color-picker-panel-wrap-ribbon {
36
+ top: 3px;
37
+ left: 11px;
38
+ right: 50px;
39
+ height: 6px;
40
+ padding: 0 6px;
41
+ border-radius: 3px;
42
+ background-image: linear-gradient(
43
+ to right,
44
+ #ff0000 0%,
45
+ #ff9900 10%,
46
+ #cdff00 20%,
47
+ #35ff00 30%,
48
+ #00ff66 40%,
49
+ #00fffd 50%,
50
+ #0066ff 60%,
51
+ #3200ff 70%,
52
+ #cd00ff 80%,
53
+ #ff0099 90%,
54
+ #ff0000 100%
55
+ );
56
+ }
57
+
58
+ .rc-color-picker-panel-ribbon {
59
+ background-image: none;
60
+ }
61
+
62
+ // alpha 滑块
63
+ .rc-color-picker-panel-wrap-alpha {
64
+ bottom: 3px;
65
+ left: 11px;
66
+ right: 50px;
67
+ height: 6px;
68
+ padding: 0 6px;
69
+ border-radius: 3px;
70
+ background-image: linear-gradient(
71
+ 45deg,
72
+ #b9b8c1 25%,
73
+ transparent 0,
74
+ transparent 75%,
75
+ #b9b8c1 0
76
+ ),
77
+ linear-gradient(
78
+ 45deg,
79
+ #b9b8c1 25%,
80
+ transparent 0,
81
+ transparent 75%,
82
+ #b9b8c1 0
83
+ );
84
+ background-color: #e1e1ea;
85
+ background-size: 6px 6px;
86
+ background-position: 0 0, 3px 3px;
87
+ }
88
+
89
+ .rc-color-picker-panel-alpha {
90
+ width: auto;
91
+ background-image: none;
92
+ }
93
+
94
+ .rc-color-picker-panel-alpha-bg {
95
+ width: 177px;
96
+ border-radius: 3px;
97
+ margin-left: -6px;
98
+ }
99
+
100
+ .rc-color-picker-panel-params-input {
101
+ padding: 2px 11px;
102
+
103
+ input {
104
+ outline: none;
105
+ height: 24px;
106
+ border-color: var(--color-border-3);
107
+ background-color: var(--color-bg-white);
108
+ color: #bfbfbf;
109
+
110
+ &[type='number'] {
111
+ margin-left: 4px;
112
+ }
113
+ }
114
+ }
115
+
116
+ .rc-color-picker-panel-wrap-preview {
117
+ right: 11px;
118
+ border-radius: 50%;
119
+ overflow: hidden;
120
+
121
+ input {
122
+ display: none;
123
+ }
124
+ }
125
+
126
+ .rc-color-picker-panel-params-lable {
127
+ color: var(--easyv-text-color);
128
+ }
129
+
130
+ .rc-color-picker-panel-params-lable-number:hover {
131
+ border-radius: 0;
132
+ box-shadow: none;
133
+ background-color: transparent;
134
+ cursor: initial;
135
+ }
136
+
137
+ // 颜色板的圈
138
+ .rc-color-picker-panel-board span {
139
+ width: 12px;
140
+ height: 12px;
141
+ border-radius: 6px;
142
+ border-width: 2px;
143
+ margin: -6px 0 0 -6px;
144
+ }
145
+
146
+ .rc-color-picker-panel-params-hex {
147
+ width: 70px;
148
+ }
149
+
150
+ .rc-color-picker-panel-params-lable-hex {
151
+ width: 70px;
152
+ }
153
+
154
+ .rc-color-picker-panel-inner {
155
+ box-shadow: none;
156
+ border: none;
157
+ border-radius: 0;
158
+ overflow: hidden;
159
+ }
160
+ }
@@ -0,0 +1,4 @@
1
+ export interface ColorPickerProps {
2
+ value?: string;
3
+ onChange?: (value: string) => void;
4
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,13 @@
1
+ export declare function toHex(x: any): string;
2
+ export declare function transformColor(color: string, a: number): any;
3
+ export declare function getBackgroundAccordingColor(color: any, fixedAngle: any): {
4
+ backgroundImage: string;
5
+ background?: undefined;
6
+ } | {
7
+ background: any;
8
+ backgroundImage?: undefined;
9
+ } | undefined;
10
+ export declare function getMiddleColor(colors: {
11
+ color: string;
12
+ offset: number;
13
+ }[], offset: number): string;
@@ -0,0 +1,156 @@
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
+ import Color from 'rc-color-picker/lib/helpers/color';
3
+ export function toHex(x) {
4
+ return ('0' + parseInt(x).toString(16)).slice(-2);
5
+ }
6
+ export function transformColor(color, a) {
7
+ var _Color = new Color(color),
8
+ r = _Color.redValue,
9
+ g = _Color.greenValue,
10
+ b = _Color.blueValue,
11
+ toHexString = _Color.toHexString;
12
+ return a === 1 ? toHexString() : "RGBA(".concat(r, ",").concat(g, ",").concat(b, ",").concat(a, ")");
13
+ }
14
+ export function getBackgroundAccordingColor(color, fixedAngle) {
15
+ if (typeof color === 'string') {
16
+ return {
17
+ background: color
18
+ };
19
+ } else if (Array.isArray(color)) {
20
+ var rebaseStops = color.concat();
21
+ rebaseStops.sort(function (a, b) {
22
+ return a.offset - b.offset;
23
+ });
24
+ var colors = rebaseStops.map(function (item, index) {
25
+ var _Color2 = new Color(item.color),
26
+ r = _Color2.r,
27
+ g = _Color2.g,
28
+ b = _Color2.b,
29
+ a = _Color2.a;
30
+ if (a === 1 || index === rebaseStops.length - 1) {
31
+ return "".concat(item.color, " ").concat(item.offset, "%");
32
+ } else {
33
+ var _Color3 = new Color(rebaseStops[index + 1].color),
34
+ nextR = _Color3.r,
35
+ nextG = _Color3.g,
36
+ nextB = _Color3.b,
37
+ nextA = _Color3.a;
38
+ var stepOpacity = (nextA - a) / 5;
39
+ var stepOffset = (rebaseStops[index + 1].offset - item.offset) / 5;
40
+ var stepR = (nextR - r) / 5;
41
+ var stepG = (nextG - g) / 5;
42
+ var stepB = (nextB - b) / 5;
43
+ return Array.from({
44
+ length: 5
45
+ }).map(function (d, i) {
46
+ return "".concat(transformColor("rgb(".concat(Math.round(r + stepR * i), ",").concat(Math.round(g + stepG * i), ",").concat(Math.round(b + stepB * i), ")"), a + stepOpacity * i), " ").concat(item.offset + stepOffset * i, "%");
47
+ }).join(',');
48
+ }
49
+ });
50
+ return {
51
+ backgroundImage: "linear-gradient(".concat(fixedAngle || 0, "deg, ").concat(colors.join(','), ")")
52
+ };
53
+ } else if (_typeof(color) === 'object') {
54
+ var _color$type = color.type,
55
+ type = _color$type === void 0 ? 'pure' : _color$type,
56
+ _color$linear = color.linear,
57
+ _color$linear2 = _color$linear === void 0 ? {
58
+ stops: [{
59
+ offset: 0,
60
+ color: '#000'
61
+ }, {
62
+ offset: 100,
63
+ color: '#fff'
64
+ }],
65
+ angle: 0,
66
+ opacity: 1
67
+ } : _color$linear,
68
+ stops = _color$linear2.stops,
69
+ angle = _color$linear2.angle,
70
+ opacity = _color$linear2.opacity,
71
+ _color$pure = color.pure,
72
+ pureColor = _color$pure === void 0 ? '#000' : _color$pure;
73
+ if (type === 'linear') {
74
+ var _rebaseStops = stops.concat();
75
+ _rebaseStops.sort(function (a, b) {
76
+ return a.offset - b.offset;
77
+ });
78
+ var _colors = _rebaseStops.map(function (item, index) {
79
+ var _Color4 = new Color(item.color),
80
+ r = _Color4.redValue,
81
+ g = _Color4.greenValue,
82
+ b = _Color4.blueValue,
83
+ a = _Color4.alphaValue;
84
+ if (a === 1 || index === _rebaseStops.length - 1) {
85
+ return "".concat(transformColor(item.color, a * opacity), " ").concat(item.offset, "%");
86
+ } else {
87
+ var _Color5 = new Color(_rebaseStops[index + 1].color),
88
+ nextR = _Color5.redValue,
89
+ nextG = _Color5.greenValue,
90
+ nextB = _Color5.blueValue,
91
+ nextA = _Color5.alphaValue;
92
+ var stepOpacity = (nextA - a) / 5;
93
+ var stepOffset = (_rebaseStops[index + 1].offset - item.offset) / 5;
94
+ var stepR = (nextR - r) / 5;
95
+ var stepG = (nextG - g) / 5;
96
+ var stepB = (nextB - b) / 5;
97
+ return Array.from({
98
+ length: 5
99
+ }).map(function (d, i) {
100
+ return "".concat(transformColor("rgb(".concat(Math.round(r + stepR * i), ",").concat(Math.round(g + stepG * i), ",").concat(Math.round(b + stepB * i), ")"), (a + stepOpacity * i) * opacity), " ").concat(item.offset + stepOffset * i, "%");
101
+ }).join(',');
102
+ }
103
+ });
104
+ return {
105
+ backgroundImage: "linear-gradient(".concat(fixedAngle !== undefined ? fixedAngle : angle, "deg, ").concat(_colors.join(','), ")")
106
+ };
107
+ } else {
108
+ return {
109
+ background: pureColor
110
+ };
111
+ }
112
+ }
113
+ }
114
+ export function getMiddleColor(colors, offset) {
115
+ var leftColor;
116
+ var rightColor;
117
+ var leftColors = colors.filter(function (d) {
118
+ return d.offset < offset;
119
+ });
120
+ var rightColors = colors.filter(function (d) {
121
+ return d.offset > offset;
122
+ });
123
+ if (leftColors.length) {
124
+ leftColors.sort(function (a, b) {
125
+ return b.offset - a.offset;
126
+ });
127
+ leftColor = leftColors[0];
128
+ }
129
+ if (rightColors.length) {
130
+ rightColors.sort(function (a, b) {
131
+ return a.offset - b.offset;
132
+ });
133
+ rightColor = rightColors[0];
134
+ }
135
+ if (!leftColor) {
136
+ return rightColor.color;
137
+ }
138
+ if (!rightColor) {
139
+ return leftColor.color;
140
+ }
141
+ var _Color6 = new Color(leftColor.color),
142
+ leftR = _Color6.redValue,
143
+ leftG = _Color6.greenValue,
144
+ leftB = _Color6.blueValue,
145
+ leftA = _Color6.alphaValue;
146
+ var _Color7 = new Color(rightColor.color),
147
+ rightR = _Color7.redValue,
148
+ rightG = _Color7.greenValue,
149
+ rightB = _Color7.blueValue,
150
+ rightA = _Color7.alphaValue;
151
+ var newR = Math.round((rightR - leftR) / (rightColor.offset - leftColor.offset) * (offset - leftColor.offset) + leftR);
152
+ var newG = Math.round((rightG - leftG) / (rightColor.offset - leftColor.offset) * (offset - leftColor.offset) + leftG);
153
+ var newB = Math.round((rightB - leftB) / (rightColor.offset - leftColor.offset) * (offset - leftColor.offset) + leftB);
154
+ var newA = (rightA - leftA) / (rightColor.offset - leftColor.offset) * (offset - leftColor.offset) + leftA;
155
+ return newA === 1 ? "#".concat(toHex(newR)).concat(toHex(newG)).concat(toHex(newB)) : "RGBA(".concat(newR, ",").concat(newG, ",").concat(newB, ",").concat(newA, ")");
156
+ }
@@ -1,4 +1,4 @@
1
- import { DatePickerProps, YearPickerProps, MonthPickerProps, QuarterPickerProps, WeekPickerProps, RangePickerProps } from './interface';
1
+ import type { DatePickerProps, YearPickerProps, MonthPickerProps, QuarterPickerProps, WeekPickerProps, RangePickerProps } from './interface';
2
2
  import './index.less';
3
3
  declare function XDatePicker({ bordered, className, ...restProps }: DatePickerProps): import("react/jsx-runtime").JSX.Element;
4
4
  declare namespace XDatePicker {
@@ -1,4 +1,4 @@
1
1
  import './index.less';
2
- import { DividerProps } from './interface';
2
+ import type { DividerProps } from './interface';
3
3
  export default function XDivider({ plain, className, ...restProps }: DividerProps): import("react/jsx-runtime").JSX.Element;
4
4
  export type * from './interface';
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { Input } from '@arco-design/web-react';
3
- import { InputProps, InputSearchProps, RefInputType } from './interface';
3
+ import type { InputProps, InputSearchProps, RefInputType } from './interface';
4
4
  import './index.less';
5
5
  declare type XInputType = React.ForwardRefExoticComponent<InputProps & React.RefAttributes<RefInputType>> & {
6
6
  Search: typeof InputSearch;
@@ -12,7 +12,6 @@ import React, { forwardRef } from 'react';
12
12
  import { Input } from '@arco-design/web-react';
13
13
  import classNames from 'classnames';
14
14
  import { SearchCircleOutlined } from '@easyv/react-icons';
15
- import { InputProps, InputSearchProps, RefInputType } from "./interface";
16
15
  import "./index.less";
17
16
  import { jsx as _jsx } from "react/jsx-runtime";
18
17
  var XInput = /*#__PURE__*/forwardRef(function (_ref, ref) {
@@ -49,5 +48,4 @@ export default XInput;
49
48
  XInput.Search = InputSearch;
50
49
  XInput.TextArea = Input.TextArea;
51
50
  XInput.Password = Input.Password;
52
- XInput.Group = Input.Group;
53
- export { InputProps, InputSearchProps, RefInputType };
51
+ XInput.Group = Input.Group;
@@ -1,4 +1,4 @@
1
1
  import { Layout } from '@arco-design/web-react';
2
2
  import './index.less';
3
3
  export default Layout;
4
- export * from './interface';
4
+ export type * from './interface';
@@ -1,4 +1,3 @@
1
1
  import { Layout } from '@arco-design/web-react';
2
2
  import "./index.less";
3
- export default Layout;
4
- export * from "./interface";
3
+ export default Layout;
@@ -1,4 +1,4 @@
1
- import { RadioProps, RadioGroupProps } from './interface';
1
+ import type { RadioProps, RadioGroupProps } from './interface';
2
2
  import './index.less';
3
3
  declare function XRadio(props: RadioProps): import("react/jsx-runtime").JSX.Element;
4
4
  declare namespace XRadio {
@@ -1,10 +1,4 @@
1
1
  div.arco-select {
2
- &:not(.arco-select-disabled) {
3
- .arco-select-view {
4
- background-color: transparent;
5
- }
6
- }
7
-
8
2
  .arco-select-view {
9
3
  border-color: var(--color-border-2);
10
4
 
package/dist/index.d.ts CHANGED
@@ -1,133 +1,133 @@
1
1
  import './index.css';
2
2
  export { default as Affix } from './Affix';
3
- export type { AffixProps } from './Affix';
3
+ export type { AffixProps } from './Affix/interface';
4
4
  export { default as Alert } from './Alert';
5
- export type { AlertProps } from './Alert';
5
+ export type { AlertProps } from './Alert/interface';
6
6
  export { default as Anchor } from './Anchor';
7
- export type { AnchorProps } from './Anchor';
7
+ export type { AnchorProps } from './Anchor/interface';
8
8
  export { default as AutoComplete } from './AutoComplete';
9
- export type { AutoCompleteProps } from './AutoComplete';
9
+ export type { AutoCompleteProps } from './AutoComplete/interface';
10
10
  export { default as Avatar } from './Avatar';
11
- export type { AvatarProps } from './Avatar';
11
+ export type { AvatarProps } from './Avatar/interface';
12
12
  export { default as BackTop } from './BackTop';
13
- export type { BackTopProps } from './BackTop';
13
+ export type { BackTopProps } from './BackTop/interface';
14
14
  export { default as Badge } from './Badge';
15
- export type { BadgeProps } from './Badge';
15
+ export type { BadgeProps } from './Badge/interface';
16
16
  export { default as Breadcrumb } from './Breadcrumb';
17
- export type { BreadcrumbProps } from './Breadcrumb';
17
+ export type { BreadcrumbProps } from './Breadcrumb/interface';
18
18
  export { default as Button } from './Button';
19
- export type { ButtonProps, ButtonGroupProps } from './Button';
19
+ export type { ButtonProps, ButtonGroupProps } from './Button/interface';
20
20
  export { default as Calendar } from './Calendar';
21
- export type { CalendarProps } from './Calendar';
21
+ export type { CalendarProps } from './Calendar/interface';
22
22
  export { default as Card } from './Card';
23
- export type { CardProps } from './Card';
23
+ export type { CardProps } from './Card/interface';
24
24
  export { default as Carousel } from './Carousel';
25
- export type { CarouselProps } from './Carousel';
25
+ export type { CarouselProps } from './Carousel/interface';
26
26
  export { default as Cascader } from './Cascader';
27
- export type { CascaderProps } from './Cascader';
27
+ export type { CascaderProps } from './Cascader/interface';
28
28
  export { default as Checkbox } from './Checkbox';
29
- export type { CheckboxProps } from './Checkbox';
29
+ export type { CheckboxProps } from './Checkbox/interface';
30
30
  export { default as Collapse } from './Collapse';
31
- export type { CollapseProps } from './Collapse';
31
+ export type { CollapseProps } from './Collapse/interface';
32
32
  export { default as Comment } from './Comment';
33
- export type { CommentProps } from './Comment';
33
+ export type { CommentProps } from './Comment/interface';
34
34
  export { default as ConfigProvider } from './ConfigProvider';
35
- export type { ConfigProviderProps } from './ConfigProvider';
35
+ export type { ConfigProviderProps } from './ConfigProvider/interface';
36
36
  export { default as DatePicker } from './DatePicker';
37
- export type { DatePickerProps, YearPickerProps, MonthPickerProps, QuarterPickerProps, WeekPickerProps, RangePickerProps, } from './DatePicker';
37
+ export type { DatePickerProps, YearPickerProps, MonthPickerProps, QuarterPickerProps, WeekPickerProps, RangePickerProps, } from './DatePicker/interface';
38
38
  export { default as Descriptions } from './Descriptions';
39
- export type { DescriptionsProps } from './Descriptions';
39
+ export type { DescriptionsProps } from './Descriptions/interface';
40
40
  export { default as Divider } from './Divider';
41
- export type { DividerProps } from './Divider';
41
+ export type { DividerProps } from './Divider/interface';
42
42
  export { default as Drawer } from './Drawer';
43
- export type { DrawerProps } from './Drawer';
43
+ export type { DrawerProps } from './Drawer/interface';
44
44
  export { default as Dropdown } from './Dropdown';
45
- export type { DropdownProps } from './Dropdown';
45
+ export type { DropdownProps } from './Dropdown/interface';
46
46
  export { default as Empty } from './Empty';
47
- export type { EmptyProps } from './Empty';
47
+ export type { EmptyProps } from './Empty/interface';
48
48
  export { default as Form } from './Form';
49
- export type { FormInstance, FormItemProps, FormProps } from './Form';
49
+ export type { FormInstance, FormItemProps, FormProps } from './Form/interface';
50
50
  export { default as Grid } from './Grid';
51
- export type { GridProps } from './Grid';
51
+ export type { GridProps } from './Grid/interface';
52
52
  export { default as Image } from './Image';
53
- export type { ImageProps } from './Image';
53
+ export type { ImageProps } from './Image/interface';
54
54
  export { default as Input } from './Input';
55
- export type { InputProps, InputSearchProps, RefInputType } from './Input';
55
+ export type { InputProps, InputSearchProps, RefInputType, } from './Input/interface';
56
56
  export { default as InputNumber } from './InputNumber';
57
- export type { InputNumberProps } from './InputNumber';
57
+ export type { InputNumberProps } from './InputNumber/interface';
58
58
  export { default as InputTag } from './InputTag';
59
- export type { InputTagProps } from './InputTag';
59
+ export type { InputTagProps } from './InputTag/interface';
60
60
  export { default as Layout } from './Layout';
61
- export type { LayoutProps } from './Layout';
61
+ export type { LayoutProps } from './Layout/interface';
62
62
  export { default as Link } from './Link';
63
- export type { LinkProps } from './Link';
63
+ export type { LinkProps } from './Link/interface';
64
64
  export { default as List } from './List';
65
- export type { ListProps } from './List';
65
+ export type { ListProps } from './List/interface';
66
66
  export { default as Mentions } from './Mentions';
67
- export type { MentionsProps } from './Mentions';
67
+ export type { MentionsProps } from './Mentions/interface';
68
68
  export { default as Menu } from './Menu';
69
- export type { MenuProps } from './Menu';
69
+ export type { MenuProps } from './Menu/interface';
70
70
  export { default as Notification } from './Notification';
71
- export type { NotificationProps } from './Notification';
71
+ export type { NotificationProps } from './Notification/interface';
72
72
  export { default as PageHeader } from './PageHeader';
73
- export type { PageHeaderProps } from './PageHeader';
73
+ export type { PageHeaderProps } from './PageHeader/interface';
74
74
  export { default as Pagination } from './Pagination';
75
- export type { PaginationProps } from './Pagination';
75
+ export type { PaginationProps } from './Pagination/interface';
76
76
  export { default as Popconfirm } from './Popconfirm';
77
- export type { PopconfirmProps } from './Popconfirm';
77
+ export type { PopconfirmProps } from './Popconfirm/interface';
78
78
  export { default as Popover } from './Popover';
79
- export type { PopoverProps } from './Popover';
79
+ export type { PopoverProps } from './Popover/interface';
80
80
  export { default as Progress } from './Progress';
81
- export type { ProgressProps } from './Progress';
81
+ export type { ProgressProps } from './Progress/interface';
82
82
  export { default as Rate } from './Rate';
83
- export type { RateProps } from './Rate';
83
+ export type { RateProps } from './Rate/interface';
84
84
  export { default as ResizeBox } from './ResizeBox';
85
- export type { ResizeBoxProps } from './ResizeBox';
85
+ export type { ResizeBoxProps } from './ResizeBox/interface';
86
86
  export { default as Result } from './Result';
87
- export type { ResultProps } from './Result';
87
+ export type { ResultProps } from './Result/interface';
88
88
  export { default as Skeleton } from './Skeleton';
89
- export type { SkeletonProps } from './Skeleton';
89
+ export type { SkeletonProps } from './Skeleton/interface';
90
90
  export { default as Slider } from './Slider';
91
- export type { SliderProps } from './Slider';
91
+ export type { SliderProps } from './Slider/interface';
92
92
  export { default as Spin } from './Spin';
93
- export type { SpinProps } from './Spin';
93
+ export type { SpinProps } from './Spin/interface';
94
94
  export { default as Statistic } from './Statistic';
95
- export type { StatisticProps } from './Statistic';
95
+ export type { StatisticProps } from './Statistic/interface';
96
96
  export { default as Steps } from './Steps';
97
- export type { StepsProps } from './Steps';
97
+ export type { StepsProps } from './Steps/interface';
98
98
  export { default as Switch } from './Switch';
99
- export type { SwitchProps } from './Switch';
99
+ export type { SwitchProps } from './Switch/interface';
100
100
  export { default as Table } from './Table';
101
- export type { TableProps, TableColumnProps } from './Table';
101
+ export type { TableProps, TableColumnProps } from './Table/interface';
102
102
  export { default as Tabs } from './Tabs';
103
- export type { TabsProps } from './Tabs';
103
+ export type { TabsProps } from './Tabs/interface';
104
104
  export { default as Timeline } from './Timeline';
105
- export type { TimelineProps } from './Timeline';
105
+ export type { TimelineProps } from './Timeline/interface';
106
106
  export { default as TimePicker } from './TimePicker';
107
- export type { TimePickerProps } from './TimePicker';
107
+ export type { TimePickerProps } from './TimePicker/interface';
108
108
  export { default as Tooltip } from './Tooltip';
109
- export type { TooltipProps } from './Tooltip';
109
+ export type { TooltipProps } from './Tooltip/interface';
110
110
  export { default as Transfer } from './Transfer';
111
- export type { TransferProps } from './Transfer';
111
+ export type { TransferProps } from './Transfer/interface';
112
112
  export { default as Tree } from './Tree';
113
- export type { TreeProps } from './Tree';
113
+ export type { TreeProps } from './Tree/interface';
114
114
  export { default as TreeSelect } from './TreeSelect';
115
- export type { TreeSelectProps } from './TreeSelect';
115
+ export type { TreeSelectProps } from './TreeSelect/interface';
116
116
  export { default as Trigger } from './Trigger';
117
- export type { TriggerProps } from './Trigger';
117
+ export type { TriggerProps } from './Trigger/interface';
118
118
  export { default as Typography } from './Typography';
119
- export type { TypographyProps } from './Typography';
119
+ export type { TypographyProps } from './Typography/interface';
120
120
  export { default as Upload } from './Upload';
121
- export type { UploadProps, UploadInstance } from './Upload';
121
+ export type { UploadProps, UploadInstance } from './Upload/interface';
122
122
  export { default as Message, default as message } from './Message';
123
- export type { MessageProps } from './Message';
123
+ export type { MessageProps } from './Message/interface';
124
124
  export { default as Modal } from './Modal';
125
- export type { ModalProps } from './Modal';
125
+ export type { ModalProps } from './Modal/interface';
126
126
  export { default as Radio } from './Radio';
127
- export type { RadioProps } from './Radio';
127
+ export type { RadioProps } from './Radio/interface';
128
128
  export { default as Select } from './Select';
129
- export type { SelectProps, SelectOptionProps, SelectOptionGroupProps, SelectHandle, } from './Select';
129
+ export type { SelectProps, SelectOptionProps, SelectOptionGroupProps, SelectHandle, } from './Select/interface';
130
130
  export { default as Space } from './Space';
131
- export type { SpaceProps } from './Space';
131
+ export type { SpaceProps } from './Space/interface';
132
132
  export { default as Tag } from './Tag';
133
- export type { TagProps } from './Tag';
133
+ export type { TagProps } from './Tag/interface';
package/dist/index.js CHANGED
@@ -64,4 +64,6 @@ export { default as Modal } from "./Modal";
64
64
  export { default as Radio } from "./Radio";
65
65
  export { default as Select } from "./Select";
66
66
  export { default as Space } from "./Space";
67
- export { default as Tag } from "./Tag";
67
+ export { default as Tag } from "./Tag";
68
+
69
+ // export { default as ColorPicker } from './ColorPicker';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@easyv/react-components",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "description": "a react component library base on arco design",
5
5
  "license": "MIT",
6
6
  "module": "dist/index.js",
@@ -48,7 +48,9 @@
48
48
  },
49
49
  "dependencies": {
50
50
  "@easyv/react-icons": "4.0.0",
51
- "classnames": "^2.3.2"
51
+ "ahooks": "^3.7.8",
52
+ "classnames": "^2.3.2",
53
+ "rc-color-picker": "^1.2.6"
52
54
  },
53
55
  "devDependencies": {
54
56
  "@arco-design/web-react": "2.52.0",