x-star-design 0.0.20 → 0.0.22

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.
@@ -1,4 +1,5 @@
1
1
  import { LangId } from '../code-mirror-wrapper/define';
2
+ export declare const langVL: Map<LangId, string>;
2
3
  export interface CodeDetail {
3
4
  problemNameZh: string;
4
5
  problemNameEn: string;
@@ -1 +1,2 @@
1
- export {};
1
+ import { LangId } from "../code-mirror-wrapper/define";
2
+ export var langVL = new Map([[LangId.CPP17, 'C++17'], [LangId.CPP14, 'C++14'], [LangId.CPP11, 'C++11'], [LangId.CPP, 'C++'], [LangId.GCC, 'C'], [LangId.FPC, 'Pascal'], [LangId.PY2, 'Python2.7'], [LangId.PY3, 'Python3.8'], [LangId.JAVA, 'Java8'], [LangId.PLAIN, 'plain']]);
@@ -13,6 +13,7 @@ import ConfigProviderWrapper from "../config-provider-wrapper";
13
13
  import { useLocale } from "../locales";
14
14
  import SubmissionStatus from "../submission-status";
15
15
  import { prefix } from "../utils/global";
16
+ import { langVL } from "./define";
16
17
  var CodeDetailModal = function CodeDetailModal(_ref) {
17
18
  var codeData = _ref.codeData,
18
19
  open = _ref.open,
@@ -38,7 +39,10 @@ var CodeDetailModal = function CodeDetailModal(_ref) {
38
39
  key: 'language',
39
40
  align: 'center',
40
41
  title: t('Language'),
41
- dataIndex: 'language'
42
+ dataIndex: 'language',
43
+ render: function render(language) {
44
+ return langVL.get(language);
45
+ }
42
46
  }, {
43
47
  key: 'status',
44
48
  align: 'center',
@@ -104,7 +108,7 @@ var CodeDetailModal = function CodeDetailModal(_ref) {
104
108
  },
105
109
  open: open,
106
110
  onCancel: onCancel,
107
- width: '60%',
111
+ width: 800,
108
112
  footer: null
109
113
  }, props), /*#__PURE__*/React.createElement(Table, {
110
114
  pagination: false,
package/dist/index.d.ts CHANGED
@@ -11,7 +11,6 @@ export type { FallbackProps } from './error-boundary';
11
11
  export { default as InputNumbers } from './input-numbers';
12
12
  export { default as LoadingMask } from './loading-mask';
13
13
  export { LocaleProvider } from './locales';
14
- export { default as PaneTitle } from './pane-title';
15
14
  export { default as RainbowCat } from './rainbow-cat';
16
15
  export { default as SortTable } from './sort-table';
17
16
  export { default as StatusTag } from './status-tag';
package/dist/index.js CHANGED
@@ -9,7 +9,6 @@ export { default as ErrorBoundary } from "./error-boundary";
9
9
  export { default as InputNumbers } from "./input-numbers";
10
10
  export { default as LoadingMask } from "./loading-mask";
11
11
  export { LocaleProvider } from "./locales";
12
- export { default as PaneTitle } from "./pane-title";
13
12
  export { default as RainbowCat } from "./rainbow-cat";
14
13
  export { default as SortTable } from "./sort-table";
15
14
  export { default as StatusTag } from "./status-tag";
@@ -287,8 +287,11 @@
287
287
  }
288
288
  .x-star-design-titleSection .x-star-design-title {
289
289
  color: #000;
290
- display: inline;
291
- margin-left: 10px;
290
+ margin: 0 10px;
291
+ }
292
+ .x-star-design-titleSection .x-star-design-description {
293
+ color: #b6b6b6;
294
+ font-size: 12px;
292
295
  }
293
296
 
294
297
  .x-star-design-virtual-grid::-webkit-scrollbar {
@@ -323,17 +326,6 @@
323
326
  background: #141414;
324
327
  }
325
328
 
326
- .x-star-design-title {
327
- background-color: #fff;
328
- min-height: 50px;
329
- margin: 0;
330
- padding: 10px 20px;
331
- }
332
- .x-star-design-title .x-star-design-description {
333
- font-size: 12px;
334
- color: #b6b6b6;
335
- }
336
-
337
329
  .x-star-design-XTabs.x-star-design-tabs, .x-star-design-XTabs.ant-tabs {
338
330
  width: 100%;
339
331
  min-height: 80vh;
@@ -359,6 +351,7 @@
359
351
  border-left: 6px solid #1890ff;
360
352
  background-color: #fff;
361
353
  transition: all 0.1s cubic-bezier(0.645, 0.045, 0.355, 1);
354
+ border-radius: 0;
362
355
  }
363
356
  .x-star-design-XTabs .x-star-design-tabs-tab-btn,
364
357
  .x-star-design-XTabs .ant-tabs-tab-btn {
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  type TitleWithIconProps = {
3
3
  title: string;
4
4
  className?: string;
5
+ description?: string;
5
6
  };
6
- declare const TitleWithIcon: ({ className, title }: TitleWithIconProps) => React.JSX.Element;
7
+ declare const TitleWithIcon: ({ className, title, description, }: TitleWithIconProps) => React.JSX.Element;
7
8
  export default TitleWithIcon;
@@ -4,14 +4,17 @@ import rightSvg from "../assets/title-with-icon/right.svg";
4
4
  import { prefix } from "../utils/global";
5
5
  var TitleWithIcon = function TitleWithIcon(_ref) {
6
6
  var className = _ref.className,
7
- title = _ref.title;
7
+ title = _ref.title,
8
+ description = _ref.description;
8
9
  return /*#__PURE__*/React.createElement("div", {
9
10
  className: classNames(className, "".concat(prefix, "titleSection"))
10
11
  }, /*#__PURE__*/React.createElement("img", {
11
12
  src: rightSvg,
12
13
  alt: ""
13
- }), /*#__PURE__*/React.createElement("div", {
14
+ }), /*#__PURE__*/React.createElement("span", {
14
15
  className: "".concat(prefix, "title")
15
- }, title));
16
+ }, title), /*#__PURE__*/React.createElement("span", {
17
+ className: "".concat(prefix, "description")
18
+ }, description));
16
19
  };
17
20
  export default TitleWithIcon;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "x-star-design",
3
- "version": "0.0.20",
3
+ "version": "0.0.22",
4
4
  "description": "A react component library developed by turingstar",
5
5
  "license": "MIT",
6
6
  "module": "dist/index.js",
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- type PaneTitleProps = {
3
- title: string;
4
- description: string;
5
- children?: React.ReactNode;
6
- style?: React.CSSProperties;
7
- };
8
- declare const PaneTitle: React.FC<PaneTitleProps>;
9
- export default PaneTitle;
@@ -1,27 +0,0 @@
1
- import { Space } from 'antd';
2
- import React from 'react';
3
- import ConfigProviderWrapper from "../config-provider-wrapper";
4
- import TitleWithIcon from "../title-with-icon";
5
- import { prefix } from "../utils/global";
6
- var PaneTitle = function PaneTitle(_ref) {
7
- var title = _ref.title,
8
- description = _ref.description,
9
- children = _ref.children,
10
- style = _ref.style;
11
- return /*#__PURE__*/React.createElement(ConfigProviderWrapper, null, /*#__PURE__*/React.createElement("div", {
12
- style: style
13
- }, /*#__PURE__*/React.createElement("div", {
14
- className: "".concat(prefix, "title")
15
- }, /*#__PURE__*/React.createElement(Space, {
16
- align: "center"
17
- }, /*#__PURE__*/React.createElement(TitleWithIcon, {
18
- title: title
19
- }), /*#__PURE__*/React.createElement("div", {
20
- className: "".concat(prefix, "description")
21
- }, description), /*#__PURE__*/React.createElement("div", {
22
- style: {
23
- marginLeft: 40
24
- }
25
- }, children)))));
26
- };
27
- export default PaneTitle;