x-star-design 0.0.50 → 0.0.52
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/feedback/index.js +38 -10
- package/dist/locales/en_US.d.ts +2 -2
- package/dist/locales/en_US.js +2 -2
- package/dist/locales/index.d.ts +4 -4
- package/dist/locales/zh_CN.d.ts +2 -2
- package/dist/locales/zh_CN.js +2 -2
- package/dist/styles/index.css +20 -20
- package/dist/title-with-icon/index.d.ts +5 -5
- package/dist/title-with-icon/index.js +10 -8
- package/dist/xtabs/index.d.ts +2 -2
- package/dist/xtabs/index.js +8 -10
- package/package.json +1 -1
- package/dist/assets/status-tag/pending.svg +0 -24
- package/dist/assets/title-with-icon/right.svg +0 -16
package/dist/feedback/index.js
CHANGED
|
@@ -62,6 +62,7 @@ var Feedback = function Feedback(_ref) {
|
|
|
62
62
|
onFinish: function onFinish(val) {
|
|
63
63
|
onSubmit === null || onSubmit === void 0 ? void 0 : onSubmit(val);
|
|
64
64
|
setShowSubmitContent(true);
|
|
65
|
+
setChoiceType(undefined);
|
|
65
66
|
},
|
|
66
67
|
className: classNames("".concat(prefix, "-feedbackForm"), _defineProperty({}, "".concat(prefix, "-feedbackFormHidden"), showSubmitContent))
|
|
67
68
|
}, /*#__PURE__*/React.createElement(Space, {
|
|
@@ -91,21 +92,31 @@ var Feedback = function Feedback(_ref) {
|
|
|
91
92
|
},
|
|
92
93
|
style: {
|
|
93
94
|
color: choiceType === 2 ? activeColor : '#d9d9d9',
|
|
94
|
-
transition: 'color 0.3s ease-in-out'
|
|
95
|
+
transition: 'color 0.3s ease-in-out'
|
|
96
|
+
}
|
|
97
|
+
}, /*#__PURE__*/React.createElement(Space, {
|
|
98
|
+
direction: "vertical"
|
|
99
|
+
}, /*#__PURE__*/React.createElement(LikeFilled, {
|
|
100
|
+
style: {
|
|
95
101
|
fontSize: '36px'
|
|
96
102
|
}
|
|
97
|
-
},
|
|
103
|
+
}), t('ACCLAIM'))), /*#__PURE__*/React.createElement(Radio, {
|
|
98
104
|
value: 1,
|
|
99
105
|
"data-testid": "feedbackKey-testId-dislike",
|
|
100
106
|
style: {
|
|
101
107
|
color: choiceType === 1 ? activeColor : '#d9d9d9',
|
|
102
|
-
transition: 'color 0.3s ease-in-out'
|
|
103
|
-
fontSize: '36px'
|
|
108
|
+
transition: 'color 0.3s ease-in-out'
|
|
104
109
|
},
|
|
105
110
|
onClick: function onClick() {
|
|
106
111
|
setChoiceType(1);
|
|
107
112
|
}
|
|
108
|
-
}, /*#__PURE__*/React.createElement(
|
|
113
|
+
}, /*#__PURE__*/React.createElement(Space, {
|
|
114
|
+
direction: "vertical"
|
|
115
|
+
}, /*#__PURE__*/React.createElement(DislikeFilled, {
|
|
116
|
+
style: {
|
|
117
|
+
fontSize: '36px'
|
|
118
|
+
}
|
|
119
|
+
}), t('BAD_REVIEW')))))), ((_choiceTypeList = choiceTypeList()) === null || _choiceTypeList === void 0 ? void 0 : _choiceTypeList.length) && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
109
120
|
style: {
|
|
110
121
|
marginBottom: 10
|
|
111
122
|
}
|
|
@@ -142,14 +153,29 @@ var Feedback = function Feedback(_ref) {
|
|
|
142
153
|
rules: [{
|
|
143
154
|
required: true,
|
|
144
155
|
message: t('FEEDBACK_MESSAGE_3')
|
|
156
|
+
}, {
|
|
157
|
+
validator: function validator(_, value) {
|
|
158
|
+
//空格字符串校验
|
|
159
|
+
if (/^\s+$/g.test(value)) {
|
|
160
|
+
return Promise.reject();
|
|
161
|
+
}
|
|
162
|
+
return Promise.resolve();
|
|
163
|
+
},
|
|
164
|
+
message: t('FEEDBACK_MESSAGE_3')
|
|
145
165
|
}]
|
|
146
166
|
}, /*#__PURE__*/React.createElement(TextArea, {
|
|
147
167
|
"data-testid": "feedbackTextAreaKey-testId",
|
|
148
|
-
placeholder:
|
|
149
|
-
|
|
168
|
+
placeholder: t('FEEDBACK_TEXTAREA_PLACEHOLDER'),
|
|
169
|
+
showCount: true,
|
|
170
|
+
maxLength: 200,
|
|
171
|
+
style: {
|
|
172
|
+
height: '100px',
|
|
173
|
+
resize: 'none'
|
|
174
|
+
}
|
|
150
175
|
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
151
176
|
style: {
|
|
152
|
-
marginBottom: 0
|
|
177
|
+
marginBottom: 0,
|
|
178
|
+
marginTop: 16
|
|
153
179
|
}
|
|
154
180
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
155
181
|
type: "primary",
|
|
@@ -194,6 +220,7 @@ var Feedback = function Feedback(_ref) {
|
|
|
194
220
|
"data-testid": "popover-testId"
|
|
195
221
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
196
222
|
type: "link",
|
|
223
|
+
className: classNames("".concat(prefix, "-outsideFeedbackButton")),
|
|
197
224
|
"data-testid": "feedback-button-like",
|
|
198
225
|
icon: choiceType === 2 ? /*#__PURE__*/React.createElement(LikeFilled, {
|
|
199
226
|
style: {
|
|
@@ -207,9 +234,10 @@ var Feedback = function Feedback(_ref) {
|
|
|
207
234
|
e.stopPropagation();
|
|
208
235
|
}
|
|
209
236
|
}
|
|
210
|
-
}
|
|
237
|
+
}), /*#__PURE__*/React.createElement(Button, {
|
|
211
238
|
type: "link",
|
|
212
239
|
"data-testid": "feedback-button-dislike",
|
|
240
|
+
className: classNames("".concat(prefix, "-outsideFeedbackButton")),
|
|
213
241
|
icon: choiceType === 1 ? /*#__PURE__*/React.createElement(DislikeFilled, {
|
|
214
242
|
style: {
|
|
215
243
|
color: activeColor
|
|
@@ -222,6 +250,6 @@ var Feedback = function Feedback(_ref) {
|
|
|
222
250
|
e.stopPropagation();
|
|
223
251
|
}
|
|
224
252
|
}
|
|
225
|
-
}
|
|
253
|
+
})))));
|
|
226
254
|
};
|
|
227
255
|
export default Feedback;
|
package/dist/locales/en_US.d.ts
CHANGED
|
@@ -67,8 +67,8 @@ declare const _default: {
|
|
|
67
67
|
readonly FEEDBACK_TYPE: "Feedback Type";
|
|
68
68
|
readonly SUBMIT: "Submit";
|
|
69
69
|
readonly FEEDBACK_ON_THE_PROBLEM: "Your feedback on this problem";
|
|
70
|
-
readonly ACCLAIM: "
|
|
71
|
-
readonly BAD_REVIEW: "
|
|
70
|
+
readonly ACCLAIM: "Like";
|
|
71
|
+
readonly BAD_REVIEW: "Dislike";
|
|
72
72
|
readonly PLEASE_SELECT_FEEDBACK_TYPE: "Please fill in the feedback review";
|
|
73
73
|
readonly FEEDBACK_TEXTAREA_PLACEHOLDER: "Please describe your feedback in detail and we will deal with it as soon as possible";
|
|
74
74
|
readonly FEEDBACK_MESSAGE_1: "Please fill in the satisfaction";
|
package/dist/locales/en_US.js
CHANGED
|
@@ -67,8 +67,8 @@ export default {
|
|
|
67
67
|
FEEDBACK_TYPE: 'Feedback Type',
|
|
68
68
|
SUBMIT: 'Submit',
|
|
69
69
|
FEEDBACK_ON_THE_PROBLEM: 'Your feedback on this problem',
|
|
70
|
-
ACCLAIM: '
|
|
71
|
-
BAD_REVIEW: '
|
|
70
|
+
ACCLAIM: 'Like',
|
|
71
|
+
BAD_REVIEW: 'Dislike',
|
|
72
72
|
PLEASE_SELECT_FEEDBACK_TYPE: 'Please fill in the feedback review',
|
|
73
73
|
FEEDBACK_TEXTAREA_PLACEHOLDER: 'Please describe your feedback in detail and we will deal with it as soon as possible',
|
|
74
74
|
FEEDBACK_MESSAGE_1: 'Please fill in the satisfaction',
|
package/dist/locales/index.d.ts
CHANGED
|
@@ -78,8 +78,8 @@ export declare const useLocale: <T extends "VisualDataConfig" | "TranslateButton
|
|
|
78
78
|
readonly FEEDBACK_TYPE: "反馈类型";
|
|
79
79
|
readonly SUBMIT: "提交";
|
|
80
80
|
readonly FEEDBACK_ON_THE_PROBLEM: "您对本题目的反馈";
|
|
81
|
-
readonly ACCLAIM: "
|
|
82
|
-
readonly BAD_REVIEW: "
|
|
81
|
+
readonly ACCLAIM: "满意";
|
|
82
|
+
readonly BAD_REVIEW: "不满意";
|
|
83
83
|
readonly PLEASE_SELECT_FEEDBACK_TYPE: "请填写反馈评价";
|
|
84
84
|
readonly FEEDBACK_TEXTAREA_PLACEHOLDER: "请详细描述你的反馈,我们会尽快处理";
|
|
85
85
|
readonly FEEDBACK_MESSAGE_1: "请填写满意度";
|
|
@@ -155,8 +155,8 @@ export declare const useLocale: <T extends "VisualDataConfig" | "TranslateButton
|
|
|
155
155
|
readonly FEEDBACK_TYPE: "Feedback Type";
|
|
156
156
|
readonly SUBMIT: "Submit";
|
|
157
157
|
readonly FEEDBACK_ON_THE_PROBLEM: "Your feedback on this problem";
|
|
158
|
-
readonly ACCLAIM: "
|
|
159
|
-
readonly BAD_REVIEW: "
|
|
158
|
+
readonly ACCLAIM: "Like";
|
|
159
|
+
readonly BAD_REVIEW: "Dislike";
|
|
160
160
|
readonly PLEASE_SELECT_FEEDBACK_TYPE: "Please fill in the feedback review";
|
|
161
161
|
readonly FEEDBACK_TEXTAREA_PLACEHOLDER: "Please describe your feedback in detail and we will deal with it as soon as possible";
|
|
162
162
|
readonly FEEDBACK_MESSAGE_1: "Please fill in the satisfaction";
|
package/dist/locales/zh_CN.d.ts
CHANGED
|
@@ -67,8 +67,8 @@ declare const _default: {
|
|
|
67
67
|
readonly FEEDBACK_TYPE: "反馈类型";
|
|
68
68
|
readonly SUBMIT: "提交";
|
|
69
69
|
readonly FEEDBACK_ON_THE_PROBLEM: "您对本题目的反馈";
|
|
70
|
-
readonly ACCLAIM: "
|
|
71
|
-
readonly BAD_REVIEW: "
|
|
70
|
+
readonly ACCLAIM: "满意";
|
|
71
|
+
readonly BAD_REVIEW: "不满意";
|
|
72
72
|
readonly PLEASE_SELECT_FEEDBACK_TYPE: "请填写反馈评价";
|
|
73
73
|
readonly FEEDBACK_TEXTAREA_PLACEHOLDER: "请详细描述你的反馈,我们会尽快处理";
|
|
74
74
|
readonly FEEDBACK_MESSAGE_1: "请填写满意度";
|
package/dist/locales/zh_CN.js
CHANGED
|
@@ -67,8 +67,8 @@ export default {
|
|
|
67
67
|
FEEDBACK_TYPE: '反馈类型',
|
|
68
68
|
SUBMIT: '提交',
|
|
69
69
|
FEEDBACK_ON_THE_PROBLEM: '您对本题目的反馈',
|
|
70
|
-
ACCLAIM: '
|
|
71
|
-
BAD_REVIEW: '
|
|
70
|
+
ACCLAIM: '满意',
|
|
71
|
+
BAD_REVIEW: '不满意',
|
|
72
72
|
PLEASE_SELECT_FEEDBACK_TYPE: '请填写反馈评价',
|
|
73
73
|
FEEDBACK_TEXTAREA_PLACEHOLDER: '请详细描述你的反馈,我们会尽快处理',
|
|
74
74
|
FEEDBACK_MESSAGE_1: '请填写满意度',
|
package/dist/styles/index.css
CHANGED
|
@@ -39,7 +39,6 @@
|
|
|
39
39
|
z-index: 999;
|
|
40
40
|
border: 3px dashed orange !important;
|
|
41
41
|
}
|
|
42
|
-
.x-star-design-contactButtonCard .ant-card-body,
|
|
43
42
|
.x-star-design-contactButtonCard .x-star-design-card-body {
|
|
44
43
|
padding: 5px;
|
|
45
44
|
}
|
|
@@ -185,9 +184,6 @@
|
|
|
185
184
|
.x-star-design-feedbackContainer .x-star-design-feedbackContent .x-star-design-feedbackButton {
|
|
186
185
|
width: 100%;
|
|
187
186
|
}
|
|
188
|
-
.x-star-design-feedbackContainer .x-star-design-feedbackContent .x-star-design-feedbackTextArea {
|
|
189
|
-
height: 100px;
|
|
190
|
-
}
|
|
191
187
|
.x-star-design-feedbackContainer .x-star-design-feedbackContent :global(.x-star-design-form-item) {
|
|
192
188
|
margin-bottom: 10px;
|
|
193
189
|
}
|
|
@@ -208,6 +204,11 @@
|
|
|
208
204
|
.x-star-design-feedbackContainer .x-star-design-popover-title {
|
|
209
205
|
margin-bottom: 0 !important;
|
|
210
206
|
}
|
|
207
|
+
.x-star-design-feedbackContainer .x-star-design-outsideFeedbackButton {
|
|
208
|
+
padding-left: 8px !important;
|
|
209
|
+
padding-right: 8px !important;
|
|
210
|
+
font-size: 12px;
|
|
211
|
+
}
|
|
211
212
|
.x-star-design-feedbackContainer .x-star-design-popover-inner {
|
|
212
213
|
display: flex;
|
|
213
214
|
flex-direction: column;
|
|
@@ -516,18 +517,21 @@
|
|
|
516
517
|
width: 100%;
|
|
517
518
|
}
|
|
518
519
|
|
|
519
|
-
.x-star-design-
|
|
520
|
+
.x-star-design-xtabs-wrapper {
|
|
521
|
+
width: 100%;
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
.x-star-design-xtabs.x-star-design-tabs {
|
|
520
525
|
width: 100%;
|
|
521
526
|
min-height: 80vh;
|
|
522
527
|
border: 0;
|
|
523
528
|
background-color: #fff;
|
|
524
529
|
color: #9e9e9e;
|
|
525
530
|
}
|
|
526
|
-
.x-star-design-
|
|
527
|
-
.x-star-design-XTabs .ant-tabs-nav-wrap {
|
|
531
|
+
.x-star-design-xtabs .x-star-design-tabs-nav-wrap {
|
|
528
532
|
background-color: var(--xtabs-secondary-color);
|
|
529
533
|
}
|
|
530
|
-
.x-star-design-
|
|
534
|
+
.x-star-design-xtabs.x-star-design-tabs-card > .x-star-design-tabs-nav .x-star-design-tabs-tab {
|
|
531
535
|
width: 130px;
|
|
532
536
|
height: 130px;
|
|
533
537
|
background-color: unset;
|
|
@@ -538,42 +542,38 @@
|
|
|
538
542
|
border: 0;
|
|
539
543
|
color: #9e9e9e;
|
|
540
544
|
}
|
|
541
|
-
.x-star-design-
|
|
545
|
+
.x-star-design-xtabs.x-star-design-tabs-card > .x-star-design-tabs-nav .x-star-design-tabs-tab-active {
|
|
542
546
|
border-left: 6px solid var(--xtabs-primary-color);
|
|
543
547
|
background-color: #fff;
|
|
544
548
|
transition: all 0.1s cubic-bezier(0.645, 0.045, 0.355, 1);
|
|
545
549
|
border-radius: 0;
|
|
546
550
|
}
|
|
547
|
-
.x-star-design-
|
|
551
|
+
.x-star-design-xtabs.x-star-design-tabs .x-star-design-tabs-tab:hover {
|
|
548
552
|
color: var(--xtabs-primary-color);
|
|
549
553
|
}
|
|
550
|
-
.x-star-design-
|
|
551
|
-
.x-star-design-XTabs .ant-tabs-tab-btn {
|
|
554
|
+
.x-star-design-xtabs .x-star-design-tabs-tab-btn {
|
|
552
555
|
text-align: center;
|
|
553
556
|
white-space: normal;
|
|
554
557
|
}
|
|
555
|
-
.x-star-design-
|
|
556
|
-
.x-star-design-XTabs .ant-tabs-content-holder {
|
|
558
|
+
.x-star-design-xtabs .x-star-design-tabs-content-holder {
|
|
557
559
|
border-left: 0;
|
|
558
560
|
}
|
|
559
|
-
.x-star-design-
|
|
560
|
-
.x-star-design-XTabs .ant-tabs-content {
|
|
561
|
+
.x-star-design-xtabs .x-star-design-tabs-content {
|
|
561
562
|
display: flex;
|
|
562
563
|
width: 100%;
|
|
563
564
|
height: 100%;
|
|
564
565
|
border: 1px solid #d7d7d7;
|
|
565
566
|
padding: 0 20px;
|
|
566
567
|
}
|
|
567
|
-
.x-star-design-
|
|
568
|
-
.x-star-design-XTabs .ant-tabs-tabpane {
|
|
568
|
+
.x-star-design-xtabs .x-star-design-tabs-tabpane {
|
|
569
569
|
padding: 0 24px 24px;
|
|
570
570
|
}
|
|
571
|
-
.x-star-design-
|
|
571
|
+
.x-star-design-xtabs .x-star-design-icon-img {
|
|
572
572
|
text-align: center;
|
|
573
573
|
font-size: 44px;
|
|
574
574
|
padding-left: 10px;
|
|
575
575
|
}
|
|
576
|
-
.x-star-design-
|
|
576
|
+
.x-star-design-xtabs .x-star-design-icon-title {
|
|
577
577
|
font-size: 16px;
|
|
578
578
|
display: block;
|
|
579
579
|
padding-top: 10px;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
interface TitleWithIconProps {
|
|
3
|
+
id?: string;
|
|
4
4
|
className?: string;
|
|
5
|
+
title?: React.ReactNode;
|
|
5
6
|
description?: React.ReactNode;
|
|
6
|
-
|
|
7
|
-
};
|
|
8
|
-
declare const TitleWithIcon: ({ className, title, description, id, }: TitleWithIconProps) => React.JSX.Element;
|
|
7
|
+
}
|
|
8
|
+
declare const TitleWithIcon: ({ id, className, title, description, }: TitleWithIconProps) => React.JSX.Element;
|
|
9
9
|
export default TitleWithIcon;
|
|
@@ -4,21 +4,23 @@ import classNames from 'classnames';
|
|
|
4
4
|
import React, { useContext } from 'react';
|
|
5
5
|
import { prefix } from "../utils/global";
|
|
6
6
|
var TitleWithIcon = function TitleWithIcon(_ref) {
|
|
7
|
-
var
|
|
7
|
+
var _theme$token;
|
|
8
|
+
var id = _ref.id,
|
|
9
|
+
className = _ref.className,
|
|
8
10
|
title = _ref.title,
|
|
9
|
-
description = _ref.description
|
|
10
|
-
id = _ref.id;
|
|
11
|
+
description = _ref.description;
|
|
11
12
|
var _useContext = useContext(ConfigContext),
|
|
12
13
|
theme = _useContext.theme;
|
|
13
|
-
var _ref2 = (theme === null || theme === void 0 ? void 0 : theme.token)
|
|
14
|
-
colorPrimary = _ref2.colorPrimary
|
|
14
|
+
var _ref2 = (_theme$token = theme === null || theme === void 0 ? void 0 : theme.token) !== null && _theme$token !== void 0 ? _theme$token : {},
|
|
15
|
+
_ref2$colorPrimary = _ref2.colorPrimary,
|
|
16
|
+
colorPrimary = _ref2$colorPrimary === void 0 ? '#1990fe' : _ref2$colorPrimary;
|
|
15
17
|
return /*#__PURE__*/React.createElement("div", {
|
|
16
18
|
"data-testid": "wrapper",
|
|
17
|
-
|
|
18
|
-
|
|
19
|
+
id: id,
|
|
20
|
+
className: classNames(className, "".concat(prefix, "-titleSection"))
|
|
19
21
|
}, /*#__PURE__*/React.createElement(RightSquareFilled, {
|
|
20
22
|
style: {
|
|
21
|
-
color: colorPrimary
|
|
23
|
+
color: colorPrimary
|
|
22
24
|
}
|
|
23
25
|
}), /*#__PURE__*/React.createElement("span", {
|
|
24
26
|
"data-testid": "title",
|
package/dist/xtabs/index.d.ts
CHANGED
|
@@ -2,9 +2,9 @@ import { TabsProps } from 'antd';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
type XTabsItem = Exclude<TabsProps['items'], undefined> extends (infer Item)[] ? Item & {
|
|
4
4
|
icon?: React.ReactNode;
|
|
5
|
-
} :
|
|
5
|
+
} : never;
|
|
6
6
|
interface XTabsProps extends TabsProps {
|
|
7
|
-
items
|
|
7
|
+
items?: XTabsItem[];
|
|
8
8
|
}
|
|
9
9
|
declare const XTabs: ({ items, ...props }: XTabsProps) => React.JSX.Element;
|
|
10
10
|
export default XTabs;
|
package/dist/xtabs/index.js
CHANGED
|
@@ -7,6 +7,7 @@ import { ConfigContext } from 'antd/es/config-provider';
|
|
|
7
7
|
import React, { useContext, useEffect, useMemo, useRef } from 'react';
|
|
8
8
|
import ConfigProviderWrapper from "../config-provider-wrapper";
|
|
9
9
|
import { prefix } from "../utils/global";
|
|
10
|
+
|
|
10
11
|
//hash颜色转换rgba
|
|
11
12
|
function hexToRGBA(hex, alpha) {
|
|
12
13
|
var r = '',
|
|
@@ -24,25 +25,21 @@ function hexToRGBA(hex, alpha) {
|
|
|
24
25
|
return "rgba(".concat(+r, ",").concat(+g, ",").concat(+b, ",").concat(alpha, ")");
|
|
25
26
|
}
|
|
26
27
|
var XTabs = function XTabs(_ref) {
|
|
28
|
+
var _theme$token;
|
|
27
29
|
var items = _ref.items,
|
|
28
30
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
31
|
+
var colorThemeRef = useRef(null);
|
|
29
32
|
var _useContext = useContext(ConfigContext),
|
|
30
33
|
theme = _useContext.theme;
|
|
31
|
-
var _ref2 = (theme === null || theme === void 0 ? void 0 : theme.token)
|
|
34
|
+
var _ref2 = (_theme$token = theme === null || theme === void 0 ? void 0 : theme.token) !== null && _theme$token !== void 0 ? _theme$token : {},
|
|
32
35
|
_ref2$colorPrimary = _ref2.colorPrimary,
|
|
33
36
|
colorPrimary = _ref2$colorPrimary === void 0 ? '#1990fe' : _ref2$colorPrimary;
|
|
34
|
-
var colorThemeRef = useRef(null);
|
|
35
37
|
useEffect(function () {
|
|
36
38
|
var _colorThemeRef$curren, _colorThemeRef$curren2;
|
|
37
39
|
//设置主题色
|
|
38
40
|
(_colorThemeRef$curren = colorThemeRef.current) === null || _colorThemeRef$curren === void 0 ? void 0 : _colorThemeRef$curren.style.setProperty('--xtabs-primary-color', colorPrimary);
|
|
39
41
|
(_colorThemeRef$curren2 = colorThemeRef.current) === null || _colorThemeRef$curren2 === void 0 ? void 0 : _colorThemeRef$curren2.style.setProperty('--xtabs-secondary-color', hexToRGBA(colorPrimary, 0.15));
|
|
40
|
-
|
|
41
|
-
var _colorThemeRef$curren3, _colorThemeRef$curren4;
|
|
42
|
-
(_colorThemeRef$curren3 = colorThemeRef.current) === null || _colorThemeRef$curren3 === void 0 ? void 0 : _colorThemeRef$curren3.style.removeProperty('--xtabs-primary-color');
|
|
43
|
-
(_colorThemeRef$curren4 = colorThemeRef.current) === null || _colorThemeRef$curren4 === void 0 ? void 0 : _colorThemeRef$curren4.style.removeProperty('--xtabs-secondary-color');
|
|
44
|
-
};
|
|
45
|
-
}, []);
|
|
42
|
+
}, [colorPrimary]);
|
|
46
43
|
var newItems = useMemo(function () {
|
|
47
44
|
return items === null || items === void 0 ? void 0 : items.map(function (item) {
|
|
48
45
|
return _objectSpread(_objectSpread({}, item), {}, {
|
|
@@ -57,10 +54,11 @@ var XTabs = function XTabs(_ref) {
|
|
|
57
54
|
});
|
|
58
55
|
}, [items]);
|
|
59
56
|
return /*#__PURE__*/React.createElement(ConfigProviderWrapper, null, /*#__PURE__*/React.createElement("div", {
|
|
57
|
+
"data-testid": 'xtabsColorTheme',
|
|
60
58
|
ref: colorThemeRef,
|
|
61
|
-
"
|
|
59
|
+
className: "".concat(prefix, "-xtabs-wrapper")
|
|
62
60
|
}, /*#__PURE__*/React.createElement(Tabs, _extends({
|
|
63
|
-
className: "".concat(prefix, "-
|
|
61
|
+
className: "".concat(prefix, "-xtabs"),
|
|
64
62
|
tabPosition: 'left',
|
|
65
63
|
size: "large",
|
|
66
64
|
type: "card",
|
package/package.json
CHANGED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<svg width="12px" height="12px" viewBox="0 0 12 12" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
3
|
-
<title>review</title>
|
|
4
|
-
<g id="融合题页面" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
5
|
-
<g id="融合题-页面布局-方案一" transform="translate(-186.000000, -824.000000)" fill="#FC7D33">
|
|
6
|
-
<g id="左侧" transform="translate(50.000000, 88.000000)">
|
|
7
|
-
<g id="图例" transform="translate(0.000000, 522.000000)">
|
|
8
|
-
<g id="状态区分" transform="translate(24.000000, 128.000000)">
|
|
9
|
-
<g transform="translate(10.000000, 30.000000)" id="客观题备份-4">
|
|
10
|
-
<g transform="translate(86.000000, 52.000000)">
|
|
11
|
-
<g id="1备份-11" transform="translate(12.000000, 0.000000)">
|
|
12
|
-
<g id="review" transform="translate(4.000000, 4.000000)">
|
|
13
|
-
<rect id="矩形" fill-rule="nonzero" opacity="0" x="0" y="0" width="12" height="12"></rect>
|
|
14
|
-
<rect id="矩形" stroke="#FC7D33" x="1.92753247" y="5.96077922" width="8.14285714" height="1"></rect>
|
|
15
|
-
</g>
|
|
16
|
-
</g>
|
|
17
|
-
</g>
|
|
18
|
-
</g>
|
|
19
|
-
</g>
|
|
20
|
-
</g>
|
|
21
|
-
</g>
|
|
22
|
-
</g>
|
|
23
|
-
</g>
|
|
24
|
-
</svg>
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
<svg
|
|
2
|
-
t="1692761303575"
|
|
3
|
-
class="icon"
|
|
4
|
-
viewBox="64 64 896 896"
|
|
5
|
-
version="1.1"
|
|
6
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
7
|
-
p-id="8268"
|
|
8
|
-
data-spm-anchor-id="a313x.search_index.0.i2.2cc53a81BXBCFy"
|
|
9
|
-
width="1em"
|
|
10
|
-
height="1em"
|
|
11
|
-
>
|
|
12
|
-
<path
|
|
13
|
-
d="M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zM658.7 518.5l-246 178c-5.3 3.8-12.7 0-12.7-6.5v-46.9c0-10.2 4.9-19.9 13.2-25.9L558.6 512 413.2 406.8c-8.3-6-13.2-15.6-13.2-25.9V334c0-6.5 7.4-10.3 12.7-6.5l246 178c4.4 3.2 4.4 9.8 0 13z"
|
|
14
|
-
fill="#1890ff"
|
|
15
|
-
></path>
|
|
16
|
-
</svg>
|