x-star-design 0.0.2

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) XYD Tech Team tech@xinyoudui.com
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,40 @@
1
+ # x-star-design
2
+
3
+ [![NPM version](https://img.shields.io/npm/v/x-star-design.svg?style=flat)](https://npmjs.org/package/x-star-design)
4
+ [![NPM downloads](http://img.shields.io/npm/dm/x-star-design.svg?style=flat)](https://npmjs.org/package/x-star-design)
5
+
6
+ A react component library developed by turingstar
7
+
8
+ ## Usage
9
+
10
+ TODO
11
+
12
+ ## Options
13
+
14
+ TODO
15
+
16
+ ## Development
17
+
18
+ ```bash
19
+ # install dependencies
20
+ $ yarn install
21
+
22
+ # develop library by docs demo
23
+ $ yarn start
24
+
25
+ # build library source code
26
+ $ yarn run build
27
+
28
+ # build library source code in watch mode
29
+ $ yarn run build:watch
30
+
31
+ # build docs
32
+ $ yarn run docs:build
33
+
34
+ # check your project for potential problems
35
+ $ yarn run doctor
36
+ ```
37
+
38
+ ## LICENSE
39
+
40
+ MIT
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+ export type StatusTagShape = 'circle' | 'rect';
3
+ export type StatusTagType = 'unfilled' | 'filled' | 'correct' | 'wrong' | 'halfCorrect' | 'pending' | 'deleted';
4
+ export type StatusTagStyle = {
5
+ color: string;
6
+ borderColor: string;
7
+ backgroundColor: string;
8
+ icon?: React.ReactNode;
9
+ textDecoration?: string;
10
+ };
11
+ export interface StatusTagProps {
12
+ shape: StatusTagShape;
13
+ status: StatusTagType;
14
+ children: React.ReactNode;
15
+ required?: boolean;
16
+ hover?: boolean;
17
+ className?: string;
18
+ style?: React.CSSProperties;
19
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { StatusTagProps } from './define';
3
+ declare const StatusTag: ({ shape, status, hover, required, children, ...props }: StatusTagProps) => React.JSX.Element;
4
+ export default StatusTag;
@@ -0,0 +1,109 @@
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 = ["shape", "status", "hover", "required", "children"];
3
+ 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; }
4
+ 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; }
5
+ 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; }
6
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
7
+ 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); }
8
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
9
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
10
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
11
+ 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; }
12
+ 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; } }
13
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
14
+ 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; }
15
+ 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; }
16
+ import correctSVG from '@/assets/status-tag/correct.svg';
17
+ import diamondSVG from '@/assets/status-tag/diamond.svg';
18
+ import filledSVG from '@/assets/status-tag/filled.svg';
19
+ import halfCorrectSVG from '@/assets/status-tag/half-correct.svg';
20
+ import pendingSVG from '@/assets/status-tag/pending.svg';
21
+ import wrongSVG from '@/assets/status-tag/wrong.svg';
22
+ import classNames from 'classnames';
23
+ import React, { useRef, useState } from 'react';
24
+ import { prefix } from "../utils/global";
25
+ var StatusTag = function StatusTag(_ref) {
26
+ var _statusCSSMap$get, _statusCSSMap$get2, _statusCSSMap$get3, _classNames;
27
+ var shape = _ref.shape,
28
+ status = _ref.status,
29
+ hover = _ref.hover,
30
+ required = _ref.required,
31
+ children = _ref.children,
32
+ props = _objectWithoutProperties(_ref, _excluded);
33
+ var timeoutRef = useRef(0);
34
+ var _useState = useState(false),
35
+ _useState2 = _slicedToArray(_useState, 2),
36
+ showContent = _useState2[0],
37
+ setShowContent = _useState2[1];
38
+ /**
39
+ * 为了防止鼠标漂移状态依旧不变的问题
40
+ */
41
+ var handleMouseEnter = function handleMouseEnter() {
42
+ timeoutRef.current = window.setTimeout(function () {
43
+ setShowContent(true);
44
+ }, 100);
45
+ };
46
+ var handleMouseLeave = function handleMouseLeave() {
47
+ window.clearTimeout(timeoutRef.current);
48
+ setShowContent(false);
49
+ };
50
+ //CSS对应表
51
+ var statusCSSMap = new Map([['filled', {
52
+ color: '#1677ff',
53
+ borderColor: '#91CAFF',
54
+ backgroundColor: '#E6F4FF',
55
+ icon: /*#__PURE__*/React.createElement("img", {
56
+ src: filledSVG,
57
+ alt: ""
58
+ })
59
+ }], ['correct', {
60
+ color: '#52c41a',
61
+ borderColor: '#b7eb8f',
62
+ backgroundColor: '#f6ffed',
63
+ icon: /*#__PURE__*/React.createElement("img", {
64
+ src: correctSVG,
65
+ alt: ""
66
+ })
67
+ }], ['halfCorrect', {
68
+ color: '#8585FE',
69
+ borderColor: '#D6D6FF',
70
+ backgroundColor: '#F7F7FF',
71
+ icon: /*#__PURE__*/React.createElement("img", {
72
+ src: halfCorrectSVG,
73
+ alt: ""
74
+ })
75
+ }], ['wrong', {
76
+ color: '#FF4D4F',
77
+ borderColor: '#FFCCC7',
78
+ backgroundColor: '#FFF2F0',
79
+ icon: /*#__PURE__*/React.createElement("img", {
80
+ src: wrongSVG,
81
+ alt: ""
82
+ })
83
+ }], ['pending', {
84
+ color: '#FC7D33',
85
+ borderColor: '#FFC09B',
86
+ backgroundColor: '#FFF2EA',
87
+ icon: /*#__PURE__*/React.createElement("img", {
88
+ src: pendingSVG,
89
+ alt: ""
90
+ })
91
+ }], ['deleted', {
92
+ color: '#B7B7B7',
93
+ borderColor: '#B7B7B7',
94
+ backgroundColor: '#EFEFEF',
95
+ textDecoration: 'line-through'
96
+ }]]);
97
+ return /*#__PURE__*/React.createElement("div", {
98
+ className: classNames("".concat(prefix, "statusTag"), props.className),
99
+ style: _objectSpread(_objectSpread({}, statusCSSMap.get(status)), {}, {
100
+ borderRadius: shape === 'circle' ? '50%' : '4px'
101
+ }, props.style),
102
+ onMouseEnter: handleMouseEnter,
103
+ onMouseLeave: handleMouseLeave
104
+ }, hover ? (_statusCSSMap$get = statusCSSMap.get(status)) !== null && _statusCSSMap$get !== void 0 && _statusCSSMap$get.icon && !showContent ? (_statusCSSMap$get2 = statusCSSMap.get(status)) === null || _statusCSSMap$get2 === void 0 ? void 0 : _statusCSSMap$get2.icon : children : (_statusCSSMap$get3 = statusCSSMap.get(status)) === null || _statusCSSMap$get3 === void 0 ? void 0 : _statusCSSMap$get3.icon, required && /*#__PURE__*/React.createElement("img", {
105
+ src: diamondSVG,
106
+ className: classNames("".concat(prefix, "required"), (_classNames = {}, _defineProperty(_classNames, "".concat(prefix, "circleRequired"), shape === 'circle'), _defineProperty(_classNames, "".concat(prefix, "rectRequired"), shape !== 'circle'), _classNames))
107
+ }));
108
+ };
109
+ export default StatusTag;
@@ -0,0 +1,22 @@
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>check</title>
4
+ <g id="融合题页面" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
5
+ <g id="融合题-页面布局-方案一" transform="translate(-102.000000, -772.000000)" fill="#52C41A" fill-rule="nonzero">
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="客观题">
10
+ <g id="1备份-11" transform="translate(14.000000, 0.000000)">
11
+ <g id="check" transform="translate(4.000000, 4.000000)">
12
+ <rect id="矩形" opacity="0" x="0" y="0" width="12" height="12"></rect>
13
+ <path d="M10.6875,2.2265625 L9.86835937,2.2265625 C9.75351562,2.2265625 9.64453125,2.27929688 9.57421875,2.36953125 L4.74257812,8.49023437 L2.42578125,5.5546875 C2.35429687,5.46445312 2.24648437,5.41171875 2.13164062,5.41171875 L1.3125,5.41171875 C1.23398437,5.41171875 1.190625,5.50195312 1.23867187,5.56289062 L4.4484375,9.62929687 C4.5984375,9.81914062 4.88671875,9.81914062 5.03789062,9.62929687 L10.7613281,2.3765625 C10.809375,2.31679688 10.7660156,2.2265625 10.6875,2.2265625 Z" id="路径"></path>
14
+ </g>
15
+ </g>
16
+ </g>
17
+ </g>
18
+ </g>
19
+ </g>
20
+ </g>
21
+ </g>
22
+ </svg>
@@ -0,0 +1 @@
1
+ <svg t="1692604066504" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5338" width="200" height="200"><path d="M925.6 405.1l-203-253.7c-1.2-1.5-3.1-2.4-5-2.4H306.4c-1.9 0-3.8 0.9-5 2.4l-203 253.7c-1.9 2.4-1.9 5.9 0.2 8.3l408.6 459.5c1.2 1.4 3 2.1 4.8 2.1 1.8 0 3.5-0.8 4.8-2.1l408.6-459.5c2.1-2.4 2.1-5.9 0.2-8.3zM645.2 206.4l34.4 133.9-132.5-133.9h98.1z m8.2 178.5H370.6L512 242l141.4 142.9zM378.8 206.4h98.1L344.3 340.3l34.5-133.9z m-53.4 7l-44.1 171.5h-93.1l137.2-171.5zM194.6 434.9H289l125.8 247.7-220.2-247.7zM512 763.4L345.1 434.9h333.7L512 763.4z m97.1-80.8L735 434.9h94.4L609.1 682.6z m133.6-297.7l-44.1-171.5 137.2 171.5h-93.1z" p-id="5339" fill="#ffae00"></path></svg>
@@ -0,0 +1,24 @@
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>undo-outlined</title>
4
+ <g id="融合题页面" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
5
+ <g id="融合题-页面布局-方案一" transform="translate(-270.000000, -824.000000)" fill="#1677FF" fill-rule="nonzero">
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="客观题备份-5">
10
+ <g transform="translate(168.000000, 52.000000)">
11
+ <g id="1备份-11" transform="translate(14.000000, 0.000000)">
12
+ <g id="undo-outlined" transform="translate(4.000000, 4.000000)">
13
+ <rect id="矩形" opacity="0" x="0" y="0" width="12" height="12"></rect>
14
+ <path d="M5.99296875,1.45312059 C3.40429688,1.45664062 1.3125,3.55078125 1.3125,6.13945312 C1.3125,7.63945312 2.01796875,8.97539062 3.11484375,9.83320312 L2.67539063,10.3957031 C2.62734375,10.4578125 2.671875,10.5480469 2.74921875,10.5468863 L4.70625,10.5375 C4.7671875,10.5375 4.81171875,10.4800781 4.79648438,10.4214844 L4.33359375,8.51953125 C4.31484375,8.44335938 4.21640625,8.42226562 4.16835937,8.484375 L3.69140625,9.09492188 C3.571875,9.00117188 3.45703125,8.89921875 3.34804687,8.79023437 C3.00351563,8.44570313 2.7328125,8.04492188 2.54414062,7.5984375 C2.3484375,7.13671875 2.25,6.64570312 2.25,6.13945312 C2.25,5.63320312 2.3484375,5.1421875 2.54414062,4.68046875 C2.7328125,4.23398437 3.00351563,3.83320312 3.34804687,3.48867187 C3.69257812,3.14414062 4.09335938,2.8734375 4.53984375,2.68476562 C5.00273437,2.4890625 5.49375,2.390625 6,2.390625 C6.50625,2.390625 6.99726562,2.4890625 7.45898438,2.68476562 C7.90546875,2.8734375 8.30625,3.14414062 8.65078125,3.48867187 C8.9953125,3.83320312 9.26601563,4.23398438 9.4546875,4.68046875 C9.65039063,5.1421875 9.74882813,5.63320312 9.74882813,6.13945312 C9.74882813,6.64570312 9.65039063,7.13671875 9.4546875,7.5984375 C9.26601563,8.04492188 8.9953125,8.44570312 8.65078125,8.79023437 C8.56289063,8.878125 8.47148438,8.96015625 8.3765625,9.03867188 C8.33671875,9.07148438 8.33085938,9.12890625 8.3625,9.16875 L8.82421875,9.76054688 C8.85703125,9.8015625 8.91679687,9.80859375 8.9578125,9.77578125 C10.0136719,8.915625 10.6875,7.60664062 10.6875,6.13945312 C10.6875,3.5484375 8.58515625,1.44960937 5.99296875,1.45312059 Z" id="路径"></path>
15
+ </g>
16
+ </g>
17
+ </g>
18
+ </g>
19
+ </g>
20
+ </g>
21
+ </g>
22
+ </g>
23
+ </g>
24
+ </svg>
@@ -0,0 +1,25 @@
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>part</title>
4
+ <g id="融合题页面" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
5
+ <g id="融合题-页面布局-方案一" transform="translate(-270.000000, -772.000000)" fill="#8585FE" fill-rule="nonzero">
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="客观题备份-2">
10
+ <g transform="translate(168.000000, 0.000000)">
11
+ <g id="1备份-11" transform="translate(14.000000, 0.000000)">
12
+ <g id="part" transform="translate(4.000000, 4.000000)">
13
+ <rect id="矩形" opacity="0" x="0" y="0" width="12" height="12"></rect>
14
+ <path d="M10.6875,2.2265625 L9.86835937,2.2265625 C9.75351562,2.2265625 9.64453125,2.27929688 9.57421875,2.36953125 L4.74257812,8.49023437 L2.42578125,5.5546875 C2.35429687,5.46445312 2.24648437,5.41171875 2.13164062,5.41171875 L1.3125,5.41171875 C1.23398437,5.41171875 1.190625,5.50195312 1.23867187,5.56289062 L4.4484375,9.62929687 C4.5984375,9.81914062 4.88671875,9.81914062 5.03789062,9.62929687 L10.7613281,2.3765625 C10.809375,2.31679688 10.7660156,2.2265625 10.6875,2.2265625 Z" id="路径"></path>
15
+ <path d="M9.60703125,7.0403125 L8.9953125,6.31140625 L6.45820312,3.28679688 C6.42304687,3.24460938 6.3703125,3.22 6.3140625,3.22 L5.37890625,3.22 C5.29921875,3.22 5.25585937,3.31257813 5.30742187,3.37351563 L8.38359375,7.0403125 L8.9953125,7.76921875 L9.55084574,8.39505239 C9.58600199,8.43723989 9.63873637,8.46184927 9.69498637,8.46184927 L10.6301426,8.46184927 C10.7098301,8.46184927 10.7531895,8.36927114 10.701627,8.30833364 L9.60703125,7.0403125 Z" id="路径"></path>
16
+ </g>
17
+ </g>
18
+ </g>
19
+ </g>
20
+ </g>
21
+ </g>
22
+ </g>
23
+ </g>
24
+ </g>
25
+ </svg>
@@ -0,0 +1,24 @@
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>
@@ -0,0 +1,24 @@
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>close</title>
4
+ <g id="融合题页面" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
5
+ <g id="融合题-页面布局-方案一" transform="translate(-186.000000, -772.000000)" fill="#FF4D4F" fill-rule="nonzero">
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="客观题备份">
10
+ <g transform="translate(84.000000, 0.000000)">
11
+ <g id="1备份-11" transform="translate(14.000000, 0.000000)">
12
+ <g id="close" transform="translate(4.000000, 4.000000)">
13
+ <rect id="矩形" opacity="0" x="0" y="0" width="12" height="12"></rect>
14
+ <path d="M6.60703125,6 L9.68320312,2.33320313 C9.73476562,2.27226563 9.69140625,2.1796875 9.61171875,2.1796875 L8.6765625,2.1796875 C8.62148437,2.1796875 8.56875,2.20429688 8.53242187,2.24648438 L5.9953125,5.27109375 L3.45820312,2.24648437 C3.42304687,2.20429687 3.3703125,2.1796875 3.3140625,2.1796875 L2.37890625,2.1796875 C2.29921875,2.1796875 2.25585938,2.27226563 2.30742187,2.33320312 L5.38359375,6 L2.30742187,9.66679687 C2.25585938,9.72773438 2.29921875,9.8203125 2.37890625,9.8203125 L3.3140625,9.8203125 C3.36914062,9.8203125 3.421875,9.79570312 3.45820312,9.75351562 L5.9953125,6.72890625 L8.53242187,9.75351562 C8.56757812,9.79570312 8.6203125,9.8203125 8.6765625,9.8203125 L9.61171875,9.8203125 C9.69140625,9.8203125 9.73476562,9.72773438 9.68320312,9.66679687 L6.60703125,6 Z" id="路径"></path>
15
+ </g>
16
+ </g>
17
+ </g>
18
+ </g>
19
+ </g>
20
+ </g>
21
+ </g>
22
+ </g>
23
+ </g>
24
+ </svg>
@@ -0,0 +1,2 @@
1
+ export { default as StatusTag } from './StatusTag';
2
+ export type { StatusTagProps, StatusTagShape, StatusTagStyle, StatusTagType, } from './StatusTag/define';
package/dist/index.js ADDED
@@ -0,0 +1 @@
1
+ export { default as StatusTag } from "./StatusTag";
@@ -0,0 +1,35 @@
1
+ .x-star-design-statusTagTest {
2
+ display: flex;
3
+ gap: 1em;
4
+ }
5
+
6
+ .x-star-design-statusTag {
7
+ position: relative;
8
+ display: flex;
9
+ justify-content: center;
10
+ align-items: center;
11
+ cursor: pointer;
12
+ width: 1.6rem;
13
+ height: 1.6rem;
14
+ font-size: 1rem;
15
+ border-width: 1px;
16
+ border: 1px dashed #B7B7B7;
17
+ background-color: #EFEFEF;
18
+ }
19
+ .x-star-design-statusTag img {
20
+ width: 1rem;
21
+ height: 1rem;
22
+ }
23
+ .x-star-design-statusTag .x-star-design-required {
24
+ position: absolute;
25
+ width: 0.8rem;
26
+ height: 0.8rem;
27
+ }
28
+ .x-star-design-statusTag .x-star-design-circleRequired {
29
+ top: -3px;
30
+ right: -3px;
31
+ }
32
+ .x-star-design-statusTag .x-star-design-rectRequired {
33
+ top: -5px;
34
+ right: -5px;
35
+ }
@@ -0,0 +1,3 @@
1
+ declare module '*.svg' {
2
+ export default string;
3
+ }
@@ -0,0 +1 @@
1
+ export declare const prefix = "x-star-design-";
@@ -0,0 +1 @@
1
+ export var prefix = 'x-star-design-';
package/package.json ADDED
@@ -0,0 +1,77 @@
1
+ {
2
+ "name": "x-star-design",
3
+ "version": "0.0.2",
4
+ "description": "A react component library developed by turingstar",
5
+ "license": "MIT",
6
+ "module": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "files": [
9
+ "dist"
10
+ ],
11
+ "scripts": {
12
+ "build": "father build && sass src:dist --no-source-map",
13
+ "build:watch": "father dev",
14
+ "dev": "dumi dev",
15
+ "docs:build": "dumi build",
16
+ "doctor": "father doctor",
17
+ "lint": "npm run lint:es && npm run lint:css",
18
+ "lint:css": "stylelint \"{src,test}/**/*.{css,less}\"",
19
+ "lint:es": "eslint \"{src,test}/**/*.{js,jsx,ts,tsx}\"",
20
+ "prepare": "husky install && dumi setup",
21
+ "prepublishOnly": "father doctor && npm run build",
22
+ "start": "npm run dev"
23
+ },
24
+ "commitlint": {
25
+ "extends": [
26
+ "@commitlint/config-conventional"
27
+ ]
28
+ },
29
+ "lint-staged": {
30
+ "*.{md,json}": [
31
+ "prettier --write --no-error-on-unmatched-pattern"
32
+ ],
33
+ "*.{css,less}": [
34
+ "stylelint --fix",
35
+ "prettier --write"
36
+ ],
37
+ "*.{js,jsx}": [
38
+ "eslint --fix",
39
+ "prettier --write"
40
+ ],
41
+ "*.{ts,tsx}": [
42
+ "eslint --fix",
43
+ "prettier --parser=typescript --write"
44
+ ]
45
+ },
46
+ "dependencies": {
47
+ "classnames": "^2.3.2"
48
+ },
49
+ "devDependencies": {
50
+ "@commitlint/cli": "^17.1.2",
51
+ "@commitlint/config-conventional": "^17.1.0",
52
+ "@types/react": "^18.0.0",
53
+ "@types/react-dom": "^18.0.0",
54
+ "@umijs/lint": "^4.0.0",
55
+ "dumi": "^2.2.0",
56
+ "eslint": "^8.23.0",
57
+ "father": "^4.1.0",
58
+ "husky": "^8.0.1",
59
+ "lint-staged": "^13.0.3",
60
+ "prettier": "^2.7.1",
61
+ "prettier-plugin-organize-imports": "^3.0.0",
62
+ "prettier-plugin-packagejson": "^2.2.18",
63
+ "react": "^18.0.0",
64
+ "react-dom": "^18.0.0",
65
+ "stylelint": "^14.9.1"
66
+ },
67
+ "peerDependencies": {
68
+ "react": ">=16.9.0",
69
+ "react-dom": ">=16.9.0"
70
+ },
71
+ "publishConfig": {
72
+ "access": "public"
73
+ },
74
+ "authors": [
75
+ "XYD Tech Team tech@xinyoudui.com"
76
+ ]
77
+ }