dtable-ui-component 6.0.117-xms.3 → 6.0.117-xms.7

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.
@@ -10,7 +10,6 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
10
10
  var _react = _interopRequireDefault(require("react"));
11
11
  var _reactstrap = require("reactstrap");
12
12
  var _IconButton = _interopRequireDefault(require("../IconButton"));
13
- var _lang = require("../lang");
14
13
  require("./index.css");
15
14
  var _jsxRuntime = require("react/jsx-runtime");
16
15
  const _excluded = ["children"];
@@ -27,8 +26,7 @@ const DTableModalHeader = _ref => {
27
26
  onClick: props.toggle,
28
27
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_IconButton.default, {
29
28
  icon: "x",
30
- className: "dtable-modal-close-inner",
31
- title: (0, _lang.getLocale)('Close')
29
+ className: "dtable-modal-close-inner"
32
30
  })
33
31
  });
34
32
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactstrap.ModalHeader, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
@@ -1,60 +1,33 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
- var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.default = void 0;
9
8
  var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
10
9
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
11
- var _react = _interopRequireWildcard(require("react"));
10
+ var _react = _interopRequireDefault(require("react"));
12
11
  var _classnames = _interopRequireDefault(require("classnames"));
13
- var _DTableToolTip = _interopRequireDefault(require("../DTableToolTip"));
14
- var _dtableUtils = require("dtable-utils");
15
- require("../css/icon-button-styles.css");
16
12
  var _jsxRuntime = require("react/jsx-runtime");
17
- const _excluded = ["disabled", "className", "icon", "color", "children", "title", "tooltipPlacement", "outline", "noBackground"];
13
+ const _excluded = ["disabled", "className", "icon", "children"];
18
14
  const IconButton = _ref => {
19
15
  let {
20
16
  disabled,
21
17
  className,
22
18
  icon,
23
- color,
24
- children,
25
- title,
26
- tooltipPlacement,
27
- outline,
28
- noBackground
19
+ children
29
20
  } = _ref,
30
21
  otherProperties = (0, _objectWithoutProperties2.default)(_ref, _excluded);
31
- const buttonId = (0, _react.useMemo)(() => "dtable-icon-button-".concat((0, _dtableUtils.generatorBase64Code)(8)), []);
32
- const [mounted, setMounted] = (0, _react.useState)(false);
33
- (0, _react.useEffect)(() => {
34
- setMounted(true);
35
- }, []);
36
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
37
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", (0, _objectSpread2.default)((0, _objectSpread2.default)({
38
- id: buttonId,
39
- className: (0, _classnames.default)('dtable-icon-btn', className, {
40
- 'disabled': disabled,
41
- 'outline': outline,
42
- 'no-background': noBackground
43
- }),
44
- "aria-label": title
45
- }, otherProperties), {}, {
46
- children: [icon && /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
47
- className: (0, _classnames.default)('seatable-icon dtable-font', "dtable-icon-".concat(icon)),
48
- "aria-hidden": "true",
49
- style: color ? {
50
- color
51
- } : undefined
52
- }), children]
53
- })), title && mounted && /*#__PURE__*/(0, _jsxRuntime.jsx)(_DTableToolTip.default, {
54
- placement: tooltipPlacement || 'bottom',
55
- target: buttonId,
56
- children: title
57
- })]
58
- });
22
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", (0, _objectSpread2.default)((0, _objectSpread2.default)({
23
+ className: (0, _classnames.default)('seatable-icon-btn', className, {
24
+ 'disabled': disabled
25
+ })
26
+ }, otherProperties), {}, {
27
+ children: [icon && /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
28
+ className: (0, _classnames.default)('seatable-icon dtable-font', "dtable-icon-".concat(icon)),
29
+ "aria-hidden": "true"
30
+ }), children]
31
+ }));
59
32
  };
60
33
  var _default = exports.default = IconButton;
@@ -8,7 +8,6 @@ exports.default = void 0;
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
  var _reactstrap = require("reactstrap");
10
10
  var _IconButton = _interopRequireDefault(require("../IconButton"));
11
- var _lang = require("../lang");
12
11
  require("./index.css");
13
12
  var _jsxRuntime = require("react/jsx-runtime");
14
13
  class NotificationPopover extends _react.default.Component {
@@ -63,8 +62,7 @@ class NotificationPopover extends _react.default.Component {
63
62
  className: "notification-header",
64
63
  children: [headerText, /*#__PURE__*/(0, _jsxRuntime.jsx)(_IconButton.default, {
65
64
  icon: "x",
66
- onClick: this.props.onNotificationListToggle,
67
- title: (0, _lang.getLocale)('Close')
65
+ onClick: this.props.onNotificationListToggle
68
66
  })]
69
67
  }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
70
68
  className: "notification-body",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dtable-ui-component",
3
- "version": "6.0.117xms.3",
3
+ "version": "6.0.117xms.7",
4
4
  "main": "./lib/index.js",
5
5
  "dependencies": {
6
6
  "@seafile/react-image-lightbox": "^5.0.8",
@@ -1,141 +0,0 @@
1
- .dtable-icon-btn {
2
- display: inline-flex !important;
3
- align-items: center !important;
4
- justify-content: center !important;
5
- padding: 0 !important;
6
- border: none !important;
7
- background-color: transparent !important;
8
- color: #666666 !important;
9
- cursor: pointer;
10
- transition: all 0.2s ease !important;
11
- outline: none !important;
12
- border-radius: 3px !important;
13
- min-width: 24px;
14
- min-height: 24px;
15
- }
16
-
17
- .dtable-icon-btn:focus {
18
- outline: none !important;
19
- box-shadow: none !important;
20
- }
21
-
22
- .dtable-icon-btn:active:focus {
23
- box-shadow: none !important;
24
- }
25
-
26
- .dtable-icon-btn.btn-lg,
27
- .dtable-icon-btn.size-lg {
28
- min-width: 40px !important;
29
- min-height: 40px !important;
30
- }
31
-
32
- .dtable-icon-btn.btn-lg .dtable-icon-btn__icon,
33
- .dtable-icon-btn.size-lg .dtable-icon-btn__icon {
34
- font-size: 20px !important;
35
- }
36
-
37
- .dtable-icon-btn .dtable-icon-btn__icon {
38
- font-size: 16px !important;
39
- }
40
-
41
- .dtable-icon-btn.btn-sm,
42
- .dtable-icon-btn.size-sm {
43
- min-width: 24px !important;
44
- min-height: 24px !important;
45
- }
46
-
47
- .dtable-icon-btn.btn-sm .dtable-icon-btn__icon,
48
- .dtable-icon-btn.size-sm .dtable-icon-btn__icon {
49
- font-size: 14px !important;
50
- }
51
-
52
- .dtable-icon-btn.size-xs {
53
- min-width: 20px !important;
54
- min-height: 20px !important;
55
- }
56
-
57
- .dtable-icon-btn.size-xs .dtable-icon-btn__icon {
58
- font-size: 12px !important;
59
- }
60
-
61
- .dtable-icon-btn:hover:not(:disabled) {
62
- background-color: rgba(0, 0, 0, 0.04) !important;
63
- }
64
-
65
- .dtable-icon-btn:active:not(:disabled) {
66
- background-color: rgba(0, 0, 0, 0.08) !important;
67
- }
68
-
69
- .dtable-icon-btn.outline,
70
- .dtable-icon-btn.outlined {
71
- background-color: #FFFFFF !important;
72
- border: 1px solid rgba(0, 40, 100, 0.12) !important;
73
- color: #666666 !important;
74
- }
75
-
76
- .dtable-icon-btn.outline:hover:not(:disabled),
77
- .dtable-icon-btn.outlined:hover:not(:disabled) {
78
- background-color: rgba(0, 0, 0, 0.04) !important;
79
- border-color: rgba(0, 40, 100, 0.12) !important;
80
- }
81
-
82
- .dtable-icon-btn.outline:active:not(:disabled),
83
- .dtable-icon-btn.outlined:active:not(:disabled) {
84
- background-color: rgba(0, 0, 0, 0.08) !important;
85
- border-color: rgba(0, 40, 100, 0.12) !important;
86
- }
87
-
88
- .dtable-icon-btn.no-background,
89
- .dtable-icon-btn.no-display-bac {
90
- background-color: transparent !important;
91
- }
92
-
93
- .dtable-icon-btn.no-background:hover:not(:disabled),
94
- .dtable-icon-btn.no-display-bac:hover:not(:disabled) {
95
- background-color: transparent !important;
96
- }
97
-
98
- .dtable-icon-btn.no-background:active:not(:disabled),
99
- .dtable-icon-btn.no-display-bac:active:not(:disabled) {
100
- background-color: transparent !important;
101
- }
102
-
103
- .dtable-icon-btn:disabled,
104
- .dtable-icon-btn.disabled {
105
- opacity: 0.65 !important;
106
- cursor: not-allowed !important;
107
- }
108
-
109
- .dtable-icon-btn__icon {
110
- display: inline-block;
111
- line-height: 1;
112
- margin: 0;
113
- font-weight: normal;
114
- }
115
-
116
- .dtable-icon-btn.btn-primary,
117
- .dtable-icon-btn.color-primary {
118
- color: #FF8000 !important;
119
- }
120
-
121
- .dtable-icon-btn.btn-primary:hover:not(:disabled),
122
- .dtable-icon-btn.color-primary:hover:not(:disabled) {
123
- color: #ED7109 !important;
124
- background-color: rgba(255, 128, 0, 0.1) !important;
125
- }
126
-
127
- .dtable-icon-btn.btn-secondary,
128
- .dtable-icon-btn.color-secondary {
129
- color: #212529 !important;
130
- }
131
-
132
- .dtable-icon-btn.btn-danger,
133
- .dtable-icon-btn.color-danger {
134
- color: #dc3545 !important;
135
- }
136
-
137
- .dtable-icon-btn.btn-danger:hover:not(:disabled),
138
- .dtable-icon-btn.color-danger:hover:not(:disabled) {
139
- color: #c82333 !important;
140
- background-color: rgba(220, 53, 69, 0.1) !important;
141
- }