superdesk-ui-framework 3.1.15 → 3.1.17

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.
@@ -103,7 +103,7 @@ var PanelHeader = /** @class */ (function (_super) {
103
103
  this.props.iconButtons != null
104
104
  && this.props.iconButtons,
105
105
  this.props.onClose != null
106
- && React.createElement(IconButton_1.IconButton, { icon: 'close-small', ariaValue: 'Close', onClick: this.props.onClose })))),
106
+ && (React.createElement(IconButton_1.IconButton, { icon: 'close-small', ariaValue: 'Close', onClick: this.props.onClose }))))),
107
107
  this.props.children));
108
108
  };
109
109
  return PanelHeader;
@@ -1,8 +1,16 @@
1
1
  import * as React from 'react';
2
- interface IProps {
3
- overlay?: boolean;
2
+ interface IPropsOverlay {
3
+ overlay: true;
4
+ backgroundColor?: React.CSSProperties['backgroundColor'];
4
5
  }
6
+ interface IPropsInline {
7
+ overlay?: false;
8
+ width?: React.CSSProperties['width'];
9
+ height?: React.CSSProperties['height'];
10
+ backgroundColor?: React.CSSProperties['backgroundColor'];
11
+ }
12
+ type IProps = IPropsOverlay | IPropsInline;
5
13
  export declare class Loader extends React.Component<IProps> {
6
- render(): JSX.Element | null;
14
+ render(): JSX.Element;
7
15
  }
8
16
  export {};
@@ -47,10 +47,14 @@ var Loader = /** @class */ (function (_super) {
47
47
  }
48
48
  Loader.prototype.render = function () {
49
49
  if (this.props.overlay) {
50
- return (React.createElement("div", { className: 'sd-loader' }));
50
+ return (React.createElement("div", { className: "sd-loader", style: { backgroundColor: this.props.backgroundColor } }));
51
51
  }
52
52
  else {
53
- return null;
53
+ return (React.createElement("div", { className: "sd-loader--inline", style: {
54
+ width: this.props.width,
55
+ height: this.props.height,
56
+ backgroundColor: this.props.backgroundColor,
57
+ } }));
54
58
  }
55
59
  };
56
60
  return Loader;
@@ -4,6 +4,7 @@ interface IProps {
4
4
  onActiveTabChange(val: string | null): void;
5
5
  items: Array<ISideBarTab | 'divider'>;
6
6
  side?: 'none' | 'left' | 'right';
7
+ disabled?: boolean;
7
8
  }
8
9
  export interface ISideBarTab {
9
10
  id: string;
@@ -77,7 +77,8 @@ var SideBarTabs = /** @class */ (function (_super) {
77
77
  }
78
78
  else {
79
79
  return (React.createElement("li", { key: index, "data-sd-tooltip": item.tooltip, "data-flow": 'left' },
80
- React.createElement("a", { role: 'button', "aria-label": item.tooltip, className: (0, classnames_1.default)('sd-sidetab-menu__btn', { 'sd-sidetab-menu__btn--active': item.id === _this.props.activeTab }), onClick: function () { return _this.handleClick(item); } },
80
+ React.createElement("button", { disabled: _this.props.disabled, role: 'button', "aria-label": item.tooltip, className: (0, classnames_1.default)('sd-sidetab-menu__btn', { 'sd-sidetab-menu__btn--active': item.id === _this.props.activeTab && _this.props.disabled !== true,
81
+ }), onClick: function () { return _this.handleClick(item); } },
81
82
  item.badgeValue != null && (React.createElement(Badge_1.Badge, { text: item['badgeValue'], type: 'primary' })),
82
83
  React.createElement("span", { className: 'sd-sidetab-menu__main-icon ' },
83
84
  React.createElement(Icon_1.Icon, { size: item['size'], name: item['icon'] })),