dtable-ui-component 6.0.125-vjs.3 → 6.0.125-xhs.10

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.
@@ -39,15 +39,15 @@
39
39
 
40
40
  .dtable-ui-user-select-container .form-control {
41
41
  border: none;
42
- border-bottom: 1px solid rgb(0 40 100 / 12%) !important;
43
42
  border-radius: 4px 4px 0 0;
44
43
  padding: .375rem 1rem !important;
44
+ height: 100%;
45
45
  }
46
46
 
47
47
  .dtable-ui-user-select-container .form-control:focus {
48
48
  border-color: transparent !important;
49
- border-bottom: 1px solid rgb(0 40 100 / 12%) !important;
50
49
  box-shadow: none !important;
50
+ height: 100%;
51
51
  }
52
52
 
53
53
  .dtable-ui-user-select-container .dtable-ui-user-list-container .dtable-ui-user-item-container {
@@ -80,7 +80,7 @@
80
80
  }
81
81
 
82
82
  .dtable-ui-user-list-container .dtable-ui-collaborator-check-icon .dtable-icon-check {
83
- color: #666666;
83
+ color: var(--bs-icon-color);
84
84
  font-size: 14px;
85
85
  }
86
86
 
@@ -9,7 +9,7 @@ var _react = require("react");
9
9
  var _classnames = _interopRequireDefault(require("classnames"));
10
10
  var _reactstrap = require("reactstrap");
11
11
  var _ClickOutside = _interopRequireDefault(require("../ClickOutside"));
12
- var _DTableSearchInput = _interopRequireDefault(require("../DTableSearchInput"));
12
+ var _DTableCustomizeSearchInput = _interopRequireDefault(require("../DTableCustomizeSearchInput"));
13
13
  var _userItem = _interopRequireDefault(require("./user-item"));
14
14
  var _lang = require("../lang");
15
15
  var _keyCodes = _interopRequireDefault(require("../constants/key-codes"));
@@ -219,24 +219,17 @@ const AsyncUserSelect = _ref => {
219
219
  className: "dtable-ui-user-select-container",
220
220
  ref: userSelectContainerRef,
221
221
  onMouseDown: e => e.stopPropagation(),
222
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
223
- className: "dtable-ui-user-search-container",
224
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_DTableSearchInput.default, {
225
- autoFocus: true,
222
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
223
+ className: "seatable-option-group-search",
224
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_DTableCustomizeSearchInput.default, {
225
+ className: "option-search-control",
226
226
  placeholder: searchPlaceholder || (0, _lang.getLocale)('Search_users'),
227
- value: searchValue,
228
- wait: 200,
229
227
  onChange: onSearchValueChanged,
230
- onKeyDown: onKeyDown
231
- }), searchValue && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
232
- className: "search-clear-btn position-absolute",
233
- onClick: () => onSearchValueChanged(''),
234
- title: (0, _lang.getLocale)('Clear_search_text'),
235
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
236
- "aria-hidden": "true",
237
- className: "dtable-font dtable-icon-x"
238
- })
239
- })]
228
+ clearValue: () => onSearchValueChanged(''),
229
+ autoFocus: true,
230
+ isClearable: true,
231
+ value: searchValue
232
+ })
240
233
  }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
241
234
  className: "dtable-ui-user-list-container",
242
235
  ref: userListContainerRef,
@@ -10,11 +10,10 @@
10
10
  }
11
11
 
12
12
  .seatable-search-input .form-control {
13
- height: 32px;
13
+ height: 100%;
14
14
  border: none;
15
- padding: .375rem 0 .375rem 1rem;
15
+ padding: .375rem 1rem;
16
16
  cursor: pointer;
17
- border-bottom: 1px solid var(--bs-border-color);
18
17
  }
19
18
 
20
19
  .seatable-search-input-multiple .form-control:focus,
@@ -101,6 +101,12 @@
101
101
  margin-right: 8px;
102
102
  width: calc(100% - 20px);
103
103
  white-space: nowrap;
104
+ text-overflow: ellipsis;
105
+ overflow: hidden;
106
+ }
107
+
108
+ .seatable-customize-select .selected-option .multicolor-icon {
109
+ font-size: 12px;
104
110
  }
105
111
 
106
112
  .seatable-customize-select .multiple-check-icon,
@@ -12,21 +12,23 @@
12
12
  z-index: 10001;
13
13
  }
14
14
 
15
+ .seatable-option-group-search {
16
+ border-bottom: 1px solid var(--bs-border-color);
17
+ height: 32px;
18
+ }
19
+
15
20
  .seatable-option-group .seatable-option-group-search {
16
21
  width: 100%;
17
22
  min-width: 170px;
18
23
  position: relative;
19
24
  padding: 0;
20
- height: 32px;
21
- border-bottom: 1px solid var(--bs-border-color);
22
25
  }
23
26
 
24
27
  .seatable-option-group .seatable-option-group-search .form-control {
25
- height: 32px;
28
+ height: 100%;
26
29
  border: none;
27
- padding: .375rem 0 .375rem 1rem;
30
+ padding: .375rem 1rem;
28
31
  cursor: pointer;
29
- border-bottom: 1px solid var(--bs-border-color);
30
32
  }
31
33
 
32
34
  .seatable-option-group .seatable-option-group-search .form-control:focus {
@@ -34,10 +36,13 @@
34
36
  box-shadow: none;
35
37
  }
36
38
 
39
+ .seatable-option-group-search .input-icon-addon,
37
40
  .seatable-option-group .seatable-option-group-search .input-icon-addon {
38
41
  z-index: 1;
39
42
  pointer-events: auto;
40
43
  min-width: 2.75rem !important;
44
+ width: 40px;
45
+ height: 32px;
41
46
  }
42
47
 
43
48
  .seatable-option-group .seatable-option-group-search .input-icon-addon svg {
@@ -95,7 +95,7 @@
95
95
 
96
96
  .group-select .selected-option-show .selected-option-item .dtable-icon-x {
97
97
  cursor: pointer;
98
- color: #666666;
98
+ color: var(--bs-icon-color);
99
99
  font-size: 12px;
100
100
  margin-right: 6px;
101
101
  }
@@ -106,15 +106,13 @@
106
106
 
107
107
  .seatable-group-select .form-control {
108
108
  border: none;
109
- border-bottom: 1px solid rgb(0 40 100 / 12%) !important;
110
109
  border-radius: 4px 4px 0 0;
111
110
  padding: .375rem 0 .375rem 1rem;
112
- height: 32px;
111
+ height: 100%;
113
112
  }
114
113
 
115
114
  .seatable-group-select .form-control:focus {
116
115
  border-color: transparent !important;
117
- border-bottom: 1px solid rgb(0 40 100 / 12%) !important;
118
116
  box-shadow: none !important;
119
117
  }
120
118
 
@@ -91,7 +91,7 @@ class DTableGroupSelect extends _react.Component {
91
91
  className: "selected-option-item-name",
92
92
  children: item.name
93
93
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
94
- className: "dtable-font dtable-icon-x ml-1",
94
+ className: "dtable-font dtable-icon-x",
95
95
  onClick: () => {
96
96
  this.props.onDeleteOption(item);
97
97
  }
@@ -19,7 +19,7 @@
19
19
 
20
20
  .group-selector .option .dtable-icon-check{
21
21
  font-size: 14px;
22
- color: #666666;
22
+ color: var(--bs-icon-color);
23
23
  height: 14px !important;
24
24
  display: flex;
25
25
  align-items: center;
@@ -1,10 +1,10 @@
1
1
  .dtable-select-check-icon {
2
- width: 20px;
3
- height: 20px;
2
+ width: 14px;
3
+ height: 14px;
4
4
  text-align: center;
5
5
  }
6
6
 
7
7
  .dtable-select-check-icon .dtable-font {
8
- font-size: 12px;
9
- color: #798d99;
8
+ font-size: 14px;
9
+ color: #666;
10
10
  }
@@ -21,7 +21,7 @@ function DTableSelectLabel(_ref) {
21
21
  }), isSelect && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
22
22
  className: "dtable-select-check-icon",
23
23
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
24
- className: "dtable-font dtable-icon-check-mark"
24
+ className: "dtable-font dtable-icon-check"
25
25
  })
26
26
  })]
27
27
  });
@@ -66,6 +66,7 @@ class DTableSelect extends _react.default.Component {
66
66
  filterOption: customFilterOption,
67
67
  form: form,
68
68
  autoFocus: autoFocus
69
+ // menuIsOpen={true}
69
70
  });
70
71
  }
71
72
  }
@@ -20,10 +20,21 @@ const DEFAULT_CONTROL_STYLE = {
20
20
  borderRadius: '4px',
21
21
  outline: '0'
22
22
  };
23
+ const DISABLED_CONTROL_STYLE = {
24
+ fontSize: '14px',
25
+ padding: '0 4px',
26
+ border: '1px solid rgba(0, 40, 100, 0.12)',
27
+ boxShadow: 'none',
28
+ backgroundColor: 'var(--bs-bg-color)',
29
+ borderRadius: '4px',
30
+ outline: '0',
31
+ cursor: 'default',
32
+ opacity: 0.65
33
+ };
23
34
  const FOCUS_CONTROL_STYLE = {
24
35
  fontSize: '14px',
25
36
  padding: '0 4px',
26
- border: '1px solid #3e84f7',
37
+ border: '1px solid #3E84F7',
27
38
  boxShadow: 'none',
28
39
  backgroundColor: 'var(--bs-popover-bg)',
29
40
  borderRadius: '4px',
@@ -35,40 +46,40 @@ const controlCallback = (provided, state) => {
35
46
  isFocused
36
47
  } = state;
37
48
  if (isDisabled) {
38
- return (0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, provided), DEFAULT_CONTROL_STYLE), {}, {
39
- cursor: 'default',
40
- backgroundColor: '#f5f5f5',
41
- opacity: 0.65
49
+ return (0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, provided), DISABLED_CONTROL_STYLE), {}, {
50
+ ':active': {
51
+ border: '1px solid #3E84F7'
52
+ },
53
+ '.header-icon': {
54
+ color: 'var(--bs-icon-secondary-color)',
55
+ padding: '0 0.5rem !important'
56
+ }
42
57
  });
43
58
  }
44
59
  if (isFocused) {
45
- return (0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, provided), FOCUS_CONTROL_STYLE), {}, {
46
- '&:hover': (0, _objectSpread2.default)((0, _objectSpread2.default)({}, provided), FOCUS_CONTROL_STYLE)
47
- });
60
+ return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, provided), FOCUS_CONTROL_STYLE);
48
61
  }
49
- return (0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, provided), {}, {
62
+ return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, provided), {}, {
50
63
  fontSize: '14px',
51
64
  lineHeight: '1.5',
52
65
  cursor: 'pointer'
53
- }, DEFAULT_CONTROL_STYLE), {}, {
54
- '&:hover': (0, _objectSpread2.default)({}, DEFAULT_CONTROL_STYLE)
55
- });
66
+ }, DEFAULT_CONTROL_STYLE);
56
67
  };
57
68
  const MenuSelectStyle = exports.MenuSelectStyle = {
58
- // .react-select__menu / react-select-2-listbox
59
69
  menu: base => {
60
70
  return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, base), {}, {
61
- padding: '4px 0 4px 8px',
71
+ padding: '8px',
62
72
  backgroundColor: 'var(--bs-popover-bg)',
63
73
  border: '1px solid var(--bs-border-secondary-color)',
64
74
  borderRadius: '4px',
65
75
  boxShadow: '0px 6px 14px rgba(0, 0, 0, 0.1)',
66
- marginTop: '4px'
76
+ marginTop: '4px',
77
+ marginBottom: 0,
78
+ width: 'fit-content'
67
79
  });
68
80
  },
69
- // .react-select__menu-list)
70
81
  menuList: provided => (0, _objectSpread2.default)((0, _objectSpread2.default)({}, provided), {}, {
71
- paddingRight: '8px'
82
+ padding: 0
72
83
  }),
73
84
  option: (provided, state) => {
74
85
  const {
@@ -78,10 +89,20 @@ const MenuSelectStyle = exports.MenuSelectStyle = {
78
89
  return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, provided), {}, {
79
90
  color: 'var(--bs-body-color)',
80
91
  borderRadius: '4px',
81
- minHeight: '32px',
82
- padding: '6px 12px 6px 8px',
92
+ height: '32px',
93
+ padding: '8px',
83
94
  cursor: isDisabled ? 'default' : 'pointer',
84
- backgroundColor: isFocused ? 'var(--bs-hover-bg)' : 'var(--bs-popover-bg)'
95
+ backgroundColor: isFocused ? 'var(--bs-hover-bg)' : 'var(--bs-popover-bg)',
96
+ overflow: 'hidden',
97
+ whiteSpace: 'nowrap',
98
+ textOverflow: 'ellipsis',
99
+ ':hover': {
100
+ backgroundColor: 'rgba(0, 0, 0, 0.04)'
101
+ },
102
+ '.header-icon': {
103
+ color: 'var(--bs-icon-secondary-color)',
104
+ padding: '0 0.5rem !important'
105
+ }
85
106
  });
86
107
  },
87
108
  control: controlCallback,
@@ -102,8 +123,10 @@ const MenuSelectStyle = exports.MenuSelectStyle = {
102
123
  });
103
124
  },
104
125
  multiValueRemove: styles => (0, _objectSpread2.default)((0, _objectSpread2.default)({}, styles), {}, {
105
- color: '#909090',
106
- ':hover': {
126
+ '.dtable-font': {
127
+ color: 'var(--bs-icon-color)'
128
+ },
129
+ '.dtable-font:hover': {
107
130
  backgroundColor: 'transparent',
108
131
  color: 'var(--bs-icon-color)'
109
132
  }
@@ -116,7 +139,7 @@ const MenuSelectStyle = exports.MenuSelectStyle = {
116
139
  isDisabled
117
140
  } = state;
118
141
  return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, provided), {}, {
119
- color: '#868e96',
142
+ color: '#868E96',
120
143
  opacity: isDisabled ? 0.65 : 1
121
144
  });
122
145
  },
@@ -124,6 +147,18 @@ const MenuSelectStyle = exports.MenuSelectStyle = {
124
147
  return {
125
148
  'display': 'none'
126
149
  };
150
+ },
151
+ dropdownIndicator: (provided, state) => {
152
+ const {
153
+ isDisabled
154
+ } = state;
155
+ return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, provided), {}, {
156
+ paddingRight: '12px',
157
+ '.dtable-font': {
158
+ color: 'var(--bs-icon-color) !important',
159
+ opacity: isDisabled ? 0.65 : 1
160
+ }
161
+ });
127
162
  }
128
163
  };
129
164
  const DropdownIndicator = props => {
@@ -133,8 +168,8 @@ const DropdownIndicator = props => {
133
168
  style: {
134
169
  fontSize: '12px',
135
170
  marginLeft: '-2px',
136
- color: '#666666',
137
- paddingRight: '16px'
171
+ color: 'var(--bs-icon-color)',
172
+ paddingRight: 0
138
173
  }
139
174
  })
140
175
  }));
@@ -157,7 +192,8 @@ const ClearIndicator = _ref => {
157
192
  className: "dtable-font dtable-icon-fork-number",
158
193
  style: {
159
194
  fontSize: '12px',
160
- marginRight: '-2px'
195
+ marginRight: '-2px',
196
+ color: 'var(--bs-icon-color)'
161
197
  }
162
198
  })
163
199
  }));
@@ -190,7 +226,7 @@ const Option = props => {
190
226
  className: "dtable-font dtable-icon-check",
191
227
  style: {
192
228
  fontSize: '14px',
193
- color: '#666666',
229
+ color: 'var(--bs-icon-color)',
194
230
  paddingLeft: '16px'
195
231
  }
196
232
  })]
@@ -66,15 +66,13 @@
66
66
 
67
67
  .option-group .option-group-search .form-control {
68
68
  border: none;
69
- border-bottom: 1px solid rgb(0 40 100 / 12%) !important;
70
69
  border-radius: 4px 4px 0 0;
71
70
  padding: .375rem 0 .375rem 1rem;
72
- height: 32px;
71
+ height: 100%;
73
72
  }
74
73
 
75
74
  .option-group .option-group-search .form-control:focus {
76
75
  border-color: transparent !important;
77
- border-bottom: 1px solid rgb(0 40 100 / 12%) !important;
78
76
  box-shadow: none !important;
79
77
  }
80
78
 
@@ -114,7 +112,7 @@
114
112
 
115
113
  .option-group-dtable-ui-multiple-select-selector .multiple-check-icon .dtable-icon-check-mark {
116
114
  font-size: 12px;
117
- color: #666666;
115
+ color: var(--bs-icon-color);
118
116
  }
119
117
 
120
118
  .option-group-dtable-ui-single-select-selector .option:hover,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dtable-ui-component",
3
- "version": "6.0.125vjs.3",
3
+ "version": "6.0.125xhs.10",
4
4
  "main": "./lib/index.js",
5
5
  "dependencies": {
6
6
  "@seafile/react-image-lightbox": "5.0.9",