yootd 0.0.66 → 0.0.67

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.
@@ -14,6 +14,12 @@ import { useBem } from "../../hooks/useBem";
14
14
  import { DelBtnIcon } from "./DelBtnIcon";
15
15
  import { DragBtnIcon } from "./DragBtnIcon";
16
16
  import { EditBtnIcon } from "./EditBtnIcon";
17
+ var statusColor = {
18
+ primary: 'primary',
19
+ success: 'success',
20
+ warning: 'warning',
21
+ error: 'error'
22
+ };
17
23
  var SortableItem = function SortableItem(_ref) {
18
24
  var activeKey = _ref.activeKey,
19
25
  id = _ref.id,
@@ -24,6 +30,7 @@ var SortableItem = function SortableItem(_ref) {
24
30
  title = _ref.title,
25
31
  checked = _ref.checked,
26
32
  extra = _ref.extra,
33
+ status = _ref.status,
27
34
  data = _ref.data,
28
35
  _onClick = _ref.onClick,
29
36
  onEdit = _ref.onEdit,
@@ -38,6 +45,7 @@ var SortableItem = function SortableItem(_ref) {
38
45
  transform = _useSortable.transform,
39
46
  transition = _useSortable.transition,
40
47
  isDragging = _useSortable.isDragging;
48
+ console.log(statusColor[status !== null && status !== void 0 ? status : '']);
41
49
  var style = _objectSpread({
42
50
  transform: CSS.Transform.toString(transform),
43
51
  transition: transition
@@ -51,7 +59,7 @@ var SortableItem = function SortableItem(_ref) {
51
59
  style: style,
52
60
  className: "".concat(mb)
53
61
  }, /*#__PURE__*/React.createElement("div", {
54
- className: "".concat(mb.b('content'), " ").concat(id === activeKey ? "".concat(mb.e('content-active')) : ''),
62
+ className: "".concat(mb.b('content'), " ").concat(id === activeKey ? "".concat(mb.e('content-active')) : '', " ").concat(mb.b(statusColor[status !== null && status !== void 0 ? status : ''])),
55
63
  key: id,
56
64
  onClick: function onClick() {
57
65
  _onClick === null || _onClick === void 0 || _onClick(id, {
@@ -67,7 +67,7 @@
67
67
  }
68
68
  }
69
69
  &-content:hover {
70
- background-color: #d1eaff;
70
+ background-color: var(--ant-color-primary-border);
71
71
  transition: all 0.05s ease;
72
72
  }
73
73
  &-content::before {
@@ -81,7 +81,7 @@
81
81
  z-index: 100;
82
82
  }
83
83
  &__content-active {
84
- background-color: #d1eaff;
84
+ background-color: var(--ant-color-primary-border);
85
85
  }
86
86
  &__content-active::after {
87
87
  content: '';
@@ -90,7 +90,22 @@
90
90
  left: 0;
91
91
  width: 4px;
92
92
  height: 100%;
93
- background-color: #4d8de2;
94
-
93
+ background-color: var(--ant-color-primary);
94
+ }
95
+ &-primary {
96
+ border: 4px solid var(--ant-color-primary);
97
+ z-index: 999;
98
+ }
99
+ &-success {
100
+ border: 4px solid var(--ant-color-success);
101
+ z-index: 999;
102
+ }
103
+ &-warning {
104
+ border: 4px solid var(--ant-color-warning);
105
+ z-index: 999;
106
+ }
107
+ &-error {
108
+ border: 4px solid var(--ant-color-error);
109
+ z-index: 999;
95
110
  }
96
111
  }
@@ -214,7 +214,8 @@ export var Aside = function Aside(_ref) {
214
214
  onEdit: handleEdit,
215
215
  onDel: handleDel,
216
216
  onSwitch: handleSwitch,
217
- data: item.data
217
+ data: item.data,
218
+ status: item.status
218
219
  });
219
220
  })))));
220
221
  };
@@ -3,6 +3,7 @@ type IdataItem = {
3
3
  title: string;
4
4
  extra?: string;
5
5
  checked?: boolean;
6
+ status?: string;
6
7
  data?: any;
7
8
  };
8
9
  export type AsideProps = {
@@ -41,6 +42,7 @@ export type AsideItemProps = {
41
42
  dragBtnIcon?: boolean;
42
43
  checked?: boolean;
43
44
  extra?: string;
45
+ status?: string;
44
46
  data?: any;
45
47
  onClick?: (key: string, e: IdataItem) => void;
46
48
  onEdit?: (key: string, e: IdataItem) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yootd",
3
- "version": "0.0.66",
3
+ "version": "0.0.67",
4
4
  "description": "A react library developed with dumi",
5
5
  "license": "MIT",
6
6
  "module": "dist/index.js",