x-star-design 0.0.9 → 0.0.11

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,34 @@
1
+ export interface ImgShowProps {
2
+ /**
3
+ * @description 缩放比例
4
+ */
5
+ scale?: number;
6
+ offsetX?: number;
7
+ offsetY?: number;
8
+ }
9
+ export interface titleShowProps {
10
+ offsetX?: number;
11
+ offsetY?: number;
12
+ fontSize?: number;
13
+ fontFamily?: string;
14
+ shadowColor?: string;
15
+ color?: string;
16
+ }
17
+ export interface AcAnimationProps {
18
+ /**
19
+ * @description 文本内容
20
+ */
21
+ title?: string;
22
+ /**
23
+ * @description 图片地址
24
+ */
25
+ imgUrl?: string;
26
+ /**
27
+ * @default scale: 1, offsetX: 0, offsetY: 0 相对canvas水平垂直居中
28
+ */
29
+ imgSizeAndPosition?: ImgShowProps;
30
+ /**
31
+ * @default offsetX: 0, offsetY: 0, fontSize: 36, fontFamily: 'Arial', shadowColor: 'rgba(2,38,121,0.2)', color: '#022679' 相对canvas水平垂直居中
32
+ */
33
+ titleStyle?: titleShowProps;
34
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { AcAnimationProps } from './define';
3
+ declare const AcAnimation: React.FC<AcAnimationProps>;
4
+ export default AcAnimation;
@@ -0,0 +1,180 @@
1
+ import React, { useEffect } from 'react';
2
+ var AcAnimation = function AcAnimation(_ref) {
3
+ var title = _ref.title,
4
+ imgUrl = _ref.imgUrl,
5
+ _ref$imgSizeAndPositi = _ref.imgSizeAndPosition,
6
+ imgSizeAndPosition = _ref$imgSizeAndPositi === void 0 ? {
7
+ scale: 1,
8
+ offsetX: 0,
9
+ offsetY: 0
10
+ } : _ref$imgSizeAndPositi,
11
+ titleStyle = _ref.titleStyle;
12
+ var canvas = document.createElement('canvas');
13
+ var ctx = canvas.getContext('2d');
14
+ var AnimationID = -1;
15
+ var confetti = [];
16
+ var confettiCount = 300;
17
+ var gravity = 0.5;
18
+ var terminalVelocity = 5;
19
+ var drag = 0.075;
20
+ var colors = [{
21
+ front: 'red',
22
+ back: 'darkred'
23
+ }, {
24
+ front: 'green',
25
+ back: 'darkgreen'
26
+ }, {
27
+ front: 'blue',
28
+ back: 'darkblue'
29
+ }, {
30
+ front: 'yellow',
31
+ back: 'darkyellow'
32
+ }, {
33
+ front: 'orange',
34
+ back: 'darkorange'
35
+ }, {
36
+ front: 'pink',
37
+ back: 'darkpink'
38
+ }, {
39
+ front: 'purple',
40
+ back: 'darkpurple'
41
+ }, {
42
+ front: 'turquoise',
43
+ back: 'darkturquoise'
44
+ }];
45
+ var img = new Image();
46
+ img.src = imgUrl || '';
47
+ useEffect(function () {
48
+ if (canvas) {
49
+ canvas.style.zIndex = '9999';
50
+ canvas.style.width = '60vw';
51
+ canvas.style.height = '60vh';
52
+ canvas.style.position = 'absolute';
53
+ canvas.style.top = '50%';
54
+ canvas.style.left = '50%';
55
+ canvas.style.transform = 'translate(-50%, -50%)';
56
+ canvas.width = window.innerWidth;
57
+ canvas.height = window.innerHeight;
58
+ }
59
+ }, [canvas]);
60
+ var resizeCanvas = function resizeCanvas() {
61
+ canvas.width = window.innerWidth;
62
+ canvas.height = window.innerHeight;
63
+ };
64
+ var renderImg = function renderImg(imgSizeAndPosition) {
65
+ ctx.save();
66
+ ctx.translate(canvas.width / 2, canvas.height / 2);
67
+ ctx.drawImage(img, imgSizeAndPosition.offsetX || 0 - img.width * (imgSizeAndPosition.scale || 1) / 2, imgSizeAndPosition.offsetY || 0 - img.height * (imgSizeAndPosition.scale || 1) / 2, img.width * (imgSizeAndPosition.scale || 1), img.height * (imgSizeAndPosition.scale || 1));
68
+ ctx.restore();
69
+ };
70
+ var renderText = function renderText(titleStyle) {
71
+ ctx.save();
72
+ ctx.shadowOffsetX = 4;
73
+ ctx.shadowOffsetY = 2;
74
+ ctx.shadowBlur = 4;
75
+ ctx.textAlign = 'center';
76
+ ctx.textBaseline = 'middle';
77
+ ctx.font = "bold \n\t\t".concat((titleStyle === null || titleStyle === void 0 ? void 0 : titleStyle.fontSize) || 36, "px \n\t\t").concat((titleStyle === null || titleStyle === void 0 ? void 0 : titleStyle.fontFamily) || 'Arial');
78
+ ctx.fillStyle = (titleStyle === null || titleStyle === void 0 ? void 0 : titleStyle.color) || '#022679';
79
+ ctx.shadowColor = (titleStyle === null || titleStyle === void 0 ? void 0 : titleStyle.fontFamily) || 'rgba(2,38,121,0.2)';
80
+ ctx.fillText(title || '', canvas.width / 2 + ((titleStyle === null || titleStyle === void 0 ? void 0 : titleStyle.offsetX) || 0), canvas.height / 2 + ((titleStyle === null || titleStyle === void 0 ? void 0 : titleStyle.offsetY) || 0));
81
+ ctx.restore();
82
+ };
83
+ var randomRange = function randomRange(min, max) {
84
+ return Math.random() * (max - min) + min;
85
+ };
86
+ var initConfetti = function initConfetti() {
87
+ for (var i = 0; i < confettiCount; i++) {
88
+ confetti.push({
89
+ color: colors[Math.floor(randomRange(0, colors.length))],
90
+ dimensions: {
91
+ x: randomRange(10, 20),
92
+ y: randomRange(10, 30)
93
+ },
94
+ position: {
95
+ x: randomRange(0, canvas.width),
96
+ y: canvas.height - 1
97
+ },
98
+ rotation: randomRange(0, 2 * Math.PI),
99
+ scale: {
100
+ x: 1,
101
+ y: 1
102
+ },
103
+ velocity: {
104
+ x: randomRange(-25, 25),
105
+ y: randomRange(0, -50)
106
+ }
107
+ });
108
+ }
109
+ };
110
+
111
+ //---------Render-----------
112
+ var render = function render() {
113
+ ctx.clearRect(0, 0, canvas.width, canvas.height);
114
+ if (title) {
115
+ renderText(titleStyle);
116
+ }
117
+ if (imgUrl) {
118
+ renderImg(imgSizeAndPosition);
119
+ }
120
+ confetti.forEach(function (confetto, index) {
121
+ var width = confetto.dimensions.x * confetto.scale.x;
122
+ var height = confetto.dimensions.y * confetto.scale.y;
123
+
124
+ // Move canvas to position and rotate
125
+ ctx.translate(confetto.position.x, confetto.position.y);
126
+ ctx.rotate(confetto.rotation);
127
+
128
+ // Apply forces to velocity
129
+ confetto.velocity.x -= confetto.velocity.x * drag;
130
+ confetto.velocity.y = Math.min(confetto.velocity.y + gravity, terminalVelocity);
131
+ confetto.velocity.x += Math.random() > 0.5 ? Math.random() : -Math.random();
132
+
133
+ // Set position
134
+ confetto.position.x += confetto.velocity.x;
135
+ confetto.position.y += confetto.velocity.y;
136
+
137
+ // Delete confetti when out of frame
138
+ if (confetto.position.y >= canvas.height) confetti.splice(index, 1);
139
+
140
+ // Loop confetto x position
141
+ if (confetto.position.x > canvas.width) confetto.position.x = 0;
142
+ if (confetto.position.x < 0) confetto.position.x = canvas.width;
143
+
144
+ // Spin confetto by scaling y
145
+ confetto.scale.y = Math.cos(confetto.position.y * 0.1);
146
+ ctx.fillStyle = confetto.scale.y > 0 ? confetto.color.front : confetto.color.back;
147
+
148
+ // Draw confetti
149
+ ctx.fillRect(-width / 2, -height / 2, width, height);
150
+
151
+ // Reset transform matrix
152
+ ctx.setTransform(1, 0, 0, 1, 0, 0);
153
+ });
154
+ if (confetti.length <= 10) {
155
+ canvas.remove();
156
+ window.cancelAnimationFrame(AnimationID);
157
+ return;
158
+ }
159
+ AnimationID = window.requestAnimationFrame(render);
160
+ };
161
+
162
+ //----------Resize----------
163
+ window.addEventListener('resize', function () {
164
+ resizeCanvas();
165
+ });
166
+ useEffect(function () {
167
+ var _document$getElementB;
168
+ initConfetti();
169
+ render();
170
+ (_document$getElementB = document.getElementById('ac-canvas')) === null || _document$getElementB === void 0 ? void 0 : _document$getElementB.appendChild(canvas);
171
+ }, []);
172
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
173
+ id: "ac-canvas",
174
+ onClick: function onClick() {
175
+ canvas.remove();
176
+ window.cancelAnimationFrame(AnimationID);
177
+ }
178
+ }));
179
+ };
180
+ export default AcAnimation;
@@ -3,11 +3,13 @@ interface DraggableLayoutProps {
3
3
  className?: string;
4
4
  style?: React.CSSProperties;
5
5
  dividerClassName?: string;
6
- minWidth: [number, number];
7
- defaultWidth: number;
6
+ dividerWidth?: string;
7
+ dividerChildren?: React.ReactNode;
8
+ defaultWidth?: string;
9
+ minWidth?: [string, string];
10
+ collapsible?: [boolean, boolean];
8
11
  left: React.ReactNode;
9
12
  right: React.ReactNode;
10
- barWidth: number;
11
13
  }
12
14
  /**
13
15
  * 可拖拽布局
@@ -4,105 +4,155 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
4
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
5
  function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
6
6
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
- import { useMemoizedFn, useMouse, useSize } from 'ahooks';
7
+ import { useMemoizedFn } from 'ahooks';
8
8
  import classNames from 'classnames';
9
- import React, { useEffect, useRef, useState } from 'react';
10
- import { useDelayedMount } from 'x-star-utils';
9
+ import React, { useRef, useState } from 'react';
11
10
  import { prefix } from "../utils/global";
12
11
  /**
13
12
  * 可拖拽布局
14
13
  */
15
14
  var DraggableLayout = function DraggableLayout(_ref) {
16
- var _ref$className = _ref.className,
17
- className = _ref$className === void 0 ? '' : _ref$className,
15
+ var className = _ref.className,
18
16
  style = _ref.style,
19
17
  dividerClassName = _ref.dividerClassName,
20
- minWidth = _ref.minWidth,
21
- defaultWidth = _ref.defaultWidth,
18
+ _ref$dividerWidth = _ref.dividerWidth,
19
+ dividerWidth = _ref$dividerWidth === void 0 ? '0%' : _ref$dividerWidth,
20
+ dividerChildren = _ref.dividerChildren,
21
+ _ref$defaultWidth = _ref.defaultWidth,
22
+ defaultWidth = _ref$defaultWidth === void 0 ? '50%' : _ref$defaultWidth,
23
+ _ref$minWidth = _ref.minWidth,
24
+ minWidth = _ref$minWidth === void 0 ? ['25%', '25%'] : _ref$minWidth,
25
+ _ref$collapsible = _ref.collapsible,
26
+ collapsible = _ref$collapsible === void 0 ? [true, true] : _ref$collapsible,
22
27
  left = _ref.left,
23
- right = _ref.right,
24
- barWidth = _ref.barWidth;
25
- var _useState = useState(300),
28
+ right = _ref.right;
29
+ var _useState = useState(false),
26
30
  _useState2 = _slicedToArray(_useState, 2),
27
- width = _useState2[0],
28
- setWidth = _useState2[1];
29
- var _useState3 = useState(false),
30
- _useState4 = _slicedToArray(_useState3, 2),
31
- dragging = _useState4[0],
32
- setDragging = _useState4[1];
33
- var wrapper = useRef(null);
34
- var _useMouse = useMouse(wrapper),
35
- elementX = _useMouse.elementX;
36
- var size = useSize(wrapper);
37
- useEffect(function () {
38
- if (size) {
39
- setWidth(defaultWidth / 100 * size.width);
31
+ dragging = _useState2[0],
32
+ setDragging = _useState2[1];
33
+ var transition = useRef(false);
34
+ var wrapperRef = useRef(null);
35
+ var dividerRef = useRef(null);
36
+ var leftRef = useRef(null);
37
+ var rightRef = useRef(null);
38
+ var enableTransition = useMemoizedFn(function () {
39
+ if (dividerRef.current && leftRef.current && rightRef.current) {
40
+ dividerRef.current.style.transition = 'color 0.3s, background 0.3s, border 0.3s, left 0.3s';
41
+ leftRef.current.style.transition = 'left 0.3s, right 0.3s';
42
+ rightRef.current.style.transition = 'left 0.3s, right 0.3s';
40
43
  }
41
- }, [defaultWidth, size]);
42
- useEffect(function () {
43
- if (dragging && size) {
44
- if (elementX < minWidth[0] / 100 * size.width / 2) {
45
- setWidth(0);
46
- } else if (elementX < minWidth[0] / 100 * size.width) {
47
- setWidth(minWidth[0] / 100 * size.width);
48
- } else if (elementX < size.width - minWidth[1] / 100 * size.width) {
49
- setWidth(elementX);
50
- } else if (elementX < size.width - minWidth[1] / 100 * size.width / 2) {
51
- setWidth(size.width - minWidth[1] / 100 * size.width);
44
+ });
45
+ var disableTransition = useMemoizedFn(function () {
46
+ if (dividerRef.current && leftRef.current && rightRef.current) {
47
+ dividerRef.current.style.transition = 'color 0.3s, background 0.3s, border 0.3s';
48
+ leftRef.current.style.transition = '';
49
+ rightRef.current.style.transition = '';
50
+ }
51
+ });
52
+ var dragHandler = useMemoizedFn(function (e) {
53
+ if (!transition.current && wrapperRef.current && dividerRef.current && leftRef.current && rightRef.current) {
54
+ if (collapsible[0] && e.offsetX < leftRef.current.offsetWidth / 2) {
55
+ if (leftRef.current.style.right !== '100%') {
56
+ // 左侧收起
57
+ enableTransition();
58
+ transition.current = true;
59
+ setTimeout(function () {
60
+ return transition.current = false;
61
+ }, 300);
62
+ dividerRef.current.classList.add("".concat(prefix, "draggable-divider-active"));
63
+ dividerRef.current.style.left = '0';
64
+ leftRef.current.style.left = "-".concat(minWidth[0]);
65
+ leftRef.current.style.right = '100%';
66
+ rightRef.current.style.left = dividerWidth;
67
+ rightRef.current.style.right = '0';
68
+ }
69
+ } else if (collapsible[1] && e.offsetX > wrapperRef.current.offsetWidth - rightRef.current.offsetWidth / 2) {
70
+ if (rightRef.current.style.left !== '100%') {
71
+ // 右侧收起
72
+ enableTransition();
73
+ transition.current = true;
74
+ setTimeout(function () {
75
+ return transition.current = false;
76
+ }, 300);
77
+ dividerRef.current.classList.add("".concat(prefix, "draggable-divider-active"));
78
+ dividerRef.current.style.left = "calc(100% - ".concat(dividerWidth, ")");
79
+ leftRef.current.style.left = '0';
80
+ leftRef.current.style.right = dividerWidth;
81
+ rightRef.current.style.left = '100%';
82
+ rightRef.current.style.right = "-".concat(minWidth[1]);
83
+ }
52
84
  } else {
53
- setWidth(size.width);
85
+ // 同时展示
86
+ if (leftRef.current.style.right === '100%' || rightRef.current.style.left === '100%') {
87
+ transition.current = true;
88
+ setTimeout(function () {
89
+ transition.current = false;
90
+ disableTransition();
91
+ }, 300);
92
+ }
93
+ var width = "min(max(".concat(e.offsetX, "px, calc(").concat(minWidth[0], " + ").concat(dividerWidth, " / 2)), calc(100% - ").concat(minWidth[1], " - ").concat(dividerWidth, " / 2))");
94
+ dividerRef.current.classList.remove("".concat(prefix, "draggable-divider-active"));
95
+ dividerRef.current.style.left = "calc(".concat(width, " - ").concat(dividerWidth, " / 2)");
96
+ leftRef.current.style.left = '0';
97
+ leftRef.current.style.right = "calc(100% - ".concat(width, " + ").concat(dividerWidth, " / 2)");
98
+ rightRef.current.style.left = "calc(".concat(width, " + ").concat(dividerWidth, " / 2)");
99
+ rightRef.current.style.right = '0';
54
100
  }
55
101
  }
56
- }, [dragging, size, elementX, minWidth]);
57
- var dragEnd = useMemoizedFn(function () {
58
- setDragging(false);
59
- if (wrapper.current) {
60
- wrapper.current.style.cursor = 'unset';
61
- wrapper.current.removeEventListener('mouseup', dragEnd);
62
- }
63
102
  });
64
103
  var dragStart = useMemoizedFn(function () {
65
104
  setDragging(true);
66
- if (wrapper.current) {
67
- wrapper.current.style.cursor = 'col-resize';
68
- wrapper.current.addEventListener('mouseup', dragEnd);
105
+ if (wrapperRef.current) {
106
+ wrapperRef.current.style.cursor = 'col-resize';
107
+ wrapperRef.current.addEventListener('mousemove', dragHandler, {
108
+ capture: true,
109
+ passive: true
110
+ });
111
+ document.addEventListener('mouseup', function () {
112
+ setDragging(false);
113
+ if (wrapperRef.current) {
114
+ wrapperRef.current.style.cursor = 'unset';
115
+ wrapperRef.current.removeEventListener('mousemove', dragHandler, {
116
+ capture: true
117
+ });
118
+ }
119
+ }, {
120
+ capture: true,
121
+ passive: true,
122
+ once: true
123
+ });
69
124
  }
70
125
  });
71
- var leftHide = width === 0;
72
- var rightHide = width === (size === null || size === void 0 ? void 0 : size.width);
73
- var _useDelayedMount = useDelayedMount(leftHide || rightHide, 300),
74
- _useDelayedMount2 = _slicedToArray(_useDelayedMount, 1),
75
- transition = _useDelayedMount2[0];
76
126
  return /*#__PURE__*/React.createElement("div", {
77
- ref: wrapper,
78
- className: classNames("".concat(prefix, "draggableLayout"), className),
127
+ ref: wrapperRef,
128
+ className: classNames("".concat(prefix, "draggable-layout"), className),
79
129
  style: style
80
- }, size && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
81
- className: dividerClassName || classNames("".concat(prefix, "draggableDivider"), "".concat(leftHide || rightHide ? "".concat(prefix, "draggableDividerActive") : '')),
130
+ }, /*#__PURE__*/React.createElement("div", {
131
+ ref: dividerRef,
132
+ className: dividerClassName !== null && dividerClassName !== void 0 ? dividerClassName : classNames("".concat(prefix, "draggable-divider")),
82
133
  style: {
83
- left: leftHide ? width : rightHide ? width - barWidth : width - barWidth / 2,
84
- transition: transition ? 'all 0.3s' : 'color 0.3s, background-color 0.3s'
134
+ left: "calc(".concat(defaultWidth, " - ").concat(dividerWidth, " / 2)")
85
135
  },
86
136
  onDragStart: function onDragStart(e) {
87
137
  return e.preventDefault();
88
138
  },
89
139
  onMouseDown: dragStart
90
- }, "\u22EE"), dragging && /*#__PURE__*/React.createElement("div", {
91
- className: "".concat(prefix, "draggableMask")
140
+ }, dividerChildren), dragging && /*#__PURE__*/React.createElement("div", {
141
+ className: "".concat(prefix, "draggable-mask")
92
142
  }), /*#__PURE__*/React.createElement("div", {
93
- className: "".concat(prefix, "draggableChildren"),
143
+ ref: leftRef,
144
+ className: "".concat(prefix, "draggable-children"),
94
145
  style: {
95
- right: rightHide ? barWidth : "calc(100% - ".concat(width - barWidth / 2, "px)"),
96
- left: leftHide ? "calc(-".concat(minWidth[0], " / 100 * 100%)") : 0,
97
- transition: transition ? 'all 0.3s' : ''
146
+ left: 0,
147
+ right: "calc(100% - ".concat(defaultWidth, " + ").concat(dividerWidth, " / 2)")
98
148
  }
99
149
  }, left), /*#__PURE__*/React.createElement("div", {
100
- className: "".concat(prefix, "draggableChildren"),
150
+ ref: rightRef,
151
+ className: "".concat(prefix, "draggable-children"),
101
152
  style: {
102
- left: leftHide ? barWidth : width + barWidth / 2,
103
- right: rightHide ? "calc(-".concat(minWidth[1], " / 100 * 100%)") : 0,
104
- transition: transition ? 'all 0.3s' : ''
153
+ left: "calc(".concat(defaultWidth, " + ").concat(dividerWidth, " / 2)"),
154
+ right: 0
105
155
  }
106
- }, right)));
156
+ }, right));
107
157
  };
108
158
  export default DraggableLayout;
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ export { default as AcAnimation } from './ac-animation';
1
2
  export { default as CodeMirrorWrapper } from './code-mirror-wrapper';
2
3
  export { LangId, Language, Theme } from './code-mirror-wrapper/define';
3
4
  export { default as DraggableLayout } from './draggable-layout';
package/dist/index.js CHANGED
@@ -1,3 +1,4 @@
1
+ export { default as AcAnimation } from "./ac-animation";
1
2
  export { default as CodeMirrorWrapper } from "./code-mirror-wrapper";
2
3
  export { LangId, Language, Theme } from "./code-mirror-wrapper/define";
3
4
  export { default as DraggableLayout } from "./draggable-layout";
@@ -44,58 +44,42 @@
44
44
  outline: unset;
45
45
  }
46
46
 
47
- .x-star-design-divider-test {
48
- cursor: col-resize;
49
- position: relative;
50
- background-color: #fafafa;
51
- width: 16px;
52
- background-size: cover;
53
- background-position: center;
54
- font-size: 32px;
55
- color: #9f9f9f;
56
- user-select: none;
57
- height: 100%;
58
- display: flex;
59
- align-items: center;
60
- justify-content: center;
61
- transition: all 0.3s;
62
- z-index: 91;
63
- }
64
-
65
- .x-star-design-draggableLayout {
47
+ .x-star-design-draggable-layout {
66
48
  position: relative;
67
- height: 100%;
68
49
  width: 100%;
50
+ height: 100%;
69
51
  overflow: hidden;
70
52
  }
71
53
 
72
- .x-star-design-draggableDivider {
54
+ .x-star-design-draggable-divider {
73
55
  position: absolute;
74
56
  top: 0;
75
57
  bottom: 0;
76
58
  border-left: 4px transparent solid;
77
- z-index: 91;
59
+ transform: translate(-2px);
60
+ z-index: 90;
61
+ transition: color 0.3s, background 0.3s, border 0.3s;
62
+ cursor: col-resize;
78
63
  }
79
64
 
80
- .x-star-design-draggableDivider:hover,
81
- .x-star-design-draggableDivider:active,
82
- .x-star-design-draggableDividerActive {
65
+ .x-star-design-draggable-divider:hover,
66
+ .x-star-design-draggable-divider:active,
67
+ .x-star-design-draggable-divider.x-star-design-draggable-divider-active {
83
68
  border-left: 4px #1890ff solid;
84
- cursor: col-resize;
85
69
  }
86
70
 
87
- .x-star-design-draggableMask {
71
+ .x-star-design-draggable-mask {
88
72
  position: absolute;
89
73
  inset: 0;
90
- z-index: 90;
74
+ z-index: 91;
91
75
  }
92
76
 
93
- .x-star-design-draggableChildren {
77
+ .x-star-design-draggable-children {
94
78
  position: absolute;
95
79
  top: 0;
96
80
  bottom: 0;
97
81
  }
98
- .x-star-design-draggableChildren > * {
82
+ .x-star-design-draggable-children > * {
99
83
  height: 100%;
100
84
  }
101
85
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "x-star-design",
3
- "version": "0.0.9",
3
+ "version": "0.0.11",
4
4
  "description": "A react component library developed by turingstar",
5
5
  "license": "MIT",
6
6
  "module": "dist/index.js",