dtable-ui-component 0.1.101 → 0.2.0

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,52 @@
1
+ .dtable-radio {
2
+ user-select: none;
3
+ cursor: default;
4
+ display: inline-flex;
5
+ align-items: center;
6
+ margin: 0;
7
+ font-size: 14px;
8
+ }
9
+
10
+ .dtable-radio .dtable-radio-input {
11
+ position: absolute;
12
+ z-index: -1;
13
+ opacity: 0;
14
+ }
15
+
16
+ .dtable-radio .dtable-radio-indicator {
17
+ display: inline-block;
18
+ width: 16px;
19
+ height: 16px;
20
+ border-radius: 50%;
21
+ background-color: #ffffff;
22
+ border: 1px solid #bdbdbd;
23
+ position: relative;
24
+ }
25
+
26
+ .dtable-radio .dtable-radio-selected-indicator {
27
+ background-color: #FF8000;
28
+ border: unset !important;
29
+ }
30
+
31
+ .dtable-radio .dtable-radio-selected-indicator::before {
32
+ display: inline-block;
33
+ content: '';
34
+ width: 6px;
35
+ height: 6px;
36
+ background-color: #ffffff;
37
+ position: absolute;
38
+ left: 5px;
39
+ top: 5px;
40
+ border-radius: 50%;
41
+ }
42
+
43
+ .dtable-radio .dtable-radio-disable {
44
+ background-color: #f5f5f5;
45
+ }
46
+
47
+ .dtable-radio .dtable-radio-description {
48
+ margin-left: .5rem;
49
+ color: inherit;
50
+ transition: .3s color;
51
+ line-height: 16px;
52
+ }
@@ -0,0 +1,30 @@
1
+ import React from 'react';
2
+ import classnames from 'classnames';
3
+ import './index.css';
4
+
5
+ function SeaTableRadio(props) {
6
+ return /*#__PURE__*/React.createElement("label", {
7
+ className: "dtable-radio"
8
+ }, /*#__PURE__*/React.createElement("input", {
9
+ type: "radio",
10
+ className: "dtable-radio-input",
11
+ checked: props.isChecked,
12
+ onChange: props.disabled ? function () {} : props.onCheckedChange,
13
+ name: props.name,
14
+ value: props.value
15
+ }), /*#__PURE__*/React.createElement("span", {
16
+ className: classnames('dtable-radio-indicator', {
17
+ 'dtable-radio-selected-indicator': props.isChecked,
18
+ 'dtable-radio-disable': props.disabled
19
+ })
20
+ }), /*#__PURE__*/React.createElement("span", {
21
+ className: "dtable-radio-description text-truncate"
22
+ }, props.label));
23
+ }
24
+
25
+ SeaTableRadio.defaultProps = {
26
+ disabled: false,
27
+ name: 'dtable-radio-input',
28
+ onCheckedChange: function onCheckedChange() {}
29
+ };
30
+ export default SeaTableRadio;
@@ -89,7 +89,8 @@ var LinkEditorOption = /*#__PURE__*/function (_React$Component) {
89
89
  style: optionStyle
90
90
  }, /*#__PURE__*/React.createElement("div", {
91
91
  className: "option-name",
92
- style: optionNameStyle
92
+ style: optionNameStyle,
93
+ title: option.name
93
94
  }, option.name)), isShowRemoveIcon && /*#__PURE__*/React.createElement("div", {
94
95
  className: "option-remove",
95
96
  style: operationStyle,
@@ -91,7 +91,8 @@ var MBLinkEditorPopover = /*#__PURE__*/function (_React$Component) {
91
91
  }, /*#__PURE__*/React.createElement("span", {
92
92
  className: "mb-option-info"
93
93
  }, /*#__PURE__*/React.createElement("span", {
94
- className: "option-name"
94
+ className: "option-name",
95
+ title: option.name
95
96
  }, option.name)), isSelect && /*#__PURE__*/React.createElement("i", {
96
97
  className: "mb-option-checked dtable-font dtable-icon-check-mark"
97
98
  }));
@@ -93,7 +93,8 @@ var PCLinkEditorPopover = /*#__PURE__*/function (_React$Component) {
93
93
  }, /*#__PURE__*/React.createElement("div", {
94
94
  className: "option-info"
95
95
  }, /*#__PURE__*/React.createElement("div", {
96
- className: "option-name"
96
+ className: "option-name",
97
+ title: option.name
97
98
  }, option.name)), /*#__PURE__*/React.createElement("div", {
98
99
  className: "option-checked"
99
100
  }, isSelect && /*#__PURE__*/React.createElement("i", {
@@ -47,7 +47,8 @@ var SelectItem = /*#__PURE__*/function (_React$PureComponent) {
47
47
  var style = this.getStyle(option, fontSize);
48
48
  return /*#__PURE__*/React.createElement("div", {
49
49
  className: "dtable-ui select-item",
50
- style: style
50
+ style: style,
51
+ title: option.name
51
52
  }, option.name);
52
53
  }
53
54
  }]);
@@ -27,6 +27,7 @@ var DtableMarkdownViewer = /*#__PURE__*/function (_React$PureComponent) {
27
27
  var index = appVersionList.findIndex(function (version) {
28
28
  return version.indexOf('Chrome') >= 0;
29
29
  });
30
+ if (index === -1) return;
30
31
  var chromeVersion = appVersionList[index];
31
32
  chromeVersion = parseInt(chromeVersion.slice(chromeVersion.indexOf('/') + 1));
32
33
 
@@ -50,17 +50,9 @@ var SingleSelectFormatter = /*#__PURE__*/function (_React$PureComponent) {
50
50
  containerClassName = _this$props2.containerClassName,
51
51
  value = _this$props2.value;
52
52
  var classname = cn('dtable-ui cell-formatter-container single-select-formatter', containerClassName);
53
-
54
- if (!value) {
55
- return /*#__PURE__*/React.createElement("div", {
56
- className: classname
57
- });
58
- }
59
-
60
- var option = this.getOption();
61
53
  return /*#__PURE__*/React.createElement("div", {
62
54
  className: classname
63
- }, option);
55
+ }, value ? this.getOption() : '');
64
56
  }
65
57
  }]);
66
58
 
@@ -110,7 +110,8 @@ var MBSelectEditorPopover = /*#__PURE__*/function (_React$Component) {
110
110
  className: "mb-select-item"
111
111
  }, /*#__PURE__*/React.createElement("span", {
112
112
  className: "item-name",
113
- style: style
113
+ style: style,
114
+ title: option.name
114
115
  }, option.name)), /*#__PURE__*/React.createElement("span", {
115
116
  className: "mb-item-checked"
116
117
  }, isSelect && /*#__PURE__*/React.createElement("i", {
@@ -116,7 +116,8 @@ var PCSelectEditorPopover = /*#__PURE__*/function (_React$Component) {
116
116
  className: "option-info"
117
117
  }, /*#__PURE__*/React.createElement("div", {
118
118
  className: "option-name",
119
- style: optionStyle
119
+ style: optionStyle,
120
+ title: option.name
120
121
  }, option.name)), /*#__PURE__*/React.createElement("div", {
121
122
  className: "option-checked"
122
123
  }, isSelect && /*#__PURE__*/React.createElement("i", {
@@ -82,7 +82,8 @@ var SelectEditorOption = /*#__PURE__*/function (_React$Component) {
82
82
  className: "option-info",
83
83
  style: optionStyle
84
84
  }, /*#__PURE__*/React.createElement("div", {
85
- className: "option-name"
85
+ className: "option-name",
86
+ title: option.name
86
87
  }, option.name)), isShowRemoveIcon && /*#__PURE__*/React.createElement("div", {
87
88
  className: "option-remove",
88
89
  style: operationStyle,
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "dtable-ui-component",
3
- "version": "0.1.101",
3
+ "version": "0.2.0",
4
4
  "main": "./lib/index.js",
5
5
  "dependencies": {
6
6
  "@seafile/react-image-lightbox": "0.0.9",
7
- "@seafile/seafile-calendar": "^0.0.21",
7
+ "@seafile/seafile-calendar": "0.0.24",
8
8
  "@seafile/seafile-editor": "^0.3.107",
9
9
  "antd-mobile": "^2.3.3",
10
10
  "astro-classname": "^2.1.0",