superdesk-ui-framework 5.2.1 → 5.2.2

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.
@@ -34,6 +34,11 @@ export const CopyableTextBox: React.FC<ICopyableTextBoxProps> = (props) => {
34
34
  navigator.clipboard
35
35
  .writeText(props.value)
36
36
  .then(() => {
37
+ toasted.notify(gettext('Copied to clipboard'), {
38
+ type: 'success',
39
+ duration: 500,
40
+ });
41
+
37
42
  setCopied(true);
38
43
 
39
44
  if (timeoutIdRef.current) {
@@ -8,37 +8,31 @@ interface IProps {
8
8
  icon: string;
9
9
  ariaValue: string;
10
10
  toolTipFlow?: 'top' | 'left' | 'right' | 'down';
11
- toolTipAppend?: boolean;
12
11
  size?: 'default' | 'small' | 'x-large';
13
12
  style?: 'default' | 'outline' | 'outlineWhite';
14
13
  disabled?: boolean;
15
14
  onClick(event: React.MouseEvent): void;
16
15
  }
17
16
 
18
- export class IconButton extends React.PureComponent<IProps> {
19
- static defaultProps = {
20
- toolTipAppend: true,
21
- };
22
- render() {
23
- let classes = classNames('icn-btn', {
24
- [`icn-btn--${this.props.size}`]: this.props.size || this.props.size !== undefined,
25
- [`icn-btn--${this.props.style}`]: this.props.style || this.props.style !== undefined,
26
- 'icn-btn--disabled': this.props.disabled,
27
- });
17
+ export const IconButton: React.FC<IProps> = (props) => {
18
+ const classes = classNames('icn-btn', {
19
+ [`icn-btn--${props.size}`]: props.size || props.size !== undefined,
20
+ [`icn-btn--${props.style}`]: props.style || props.style !== undefined,
21
+ 'icn-btn--disabled': props.disabled,
22
+ });
28
23
 
29
- return (
30
- <Tooltip text={this.props.disabled ? null : this.props.ariaValue} flow={this.props.toolTipFlow}>
31
- <button
32
- id={this.props.id}
33
- tabIndex={0}
34
- onClick={this.props.onClick}
35
- className={classes}
36
- disabled={this.props.disabled}
37
- aria-label={this.props.ariaValue}
38
- >
39
- <Icon name={this.props.icon} ariaHidden={true} />
40
- </button>
41
- </Tooltip>
42
- );
43
- }
44
- }
24
+ return (
25
+ <Tooltip text={props.disabled ? null : props.ariaValue} flow={props.toolTipFlow}>
26
+ <button
27
+ id={props.id}
28
+ tabIndex={0}
29
+ onClick={props.onClick}
30
+ className={classes}
31
+ disabled={props.disabled}
32
+ aria-label={props.ariaValue}
33
+ >
34
+ <Icon name={props.icon} ariaHidden={true} />
35
+ </button>
36
+ </Tooltip>
37
+ );
38
+ };
@@ -7,6 +7,7 @@ export const translations = {
7
7
  Close: 'Close',
8
8
  Search: 'Search',
9
9
  Copy: 'Copy',
10
+ 'Copied to clipboard': 'Copied to clipboard',
10
11
  'No results found': 'No results found',
11
12
  "Couldn't copy": "Couldn't copy",
12
13
  };
@@ -27456,21 +27456,6 @@ function addLeadingZeros(number, targetLength) {
27456
27456
 
27457
27457
  "use strict";
27458
27458
 
27459
- var __extends = (this && this.__extends) || (function () {
27460
- var extendStatics = function (d, b) {
27461
- extendStatics = Object.setPrototypeOf ||
27462
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
27463
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
27464
- return extendStatics(d, b);
27465
- };
27466
- return function (d, b) {
27467
- if (typeof b !== "function" && b !== null)
27468
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
27469
- extendStatics(d, b);
27470
- function __() { this.constructor = d; }
27471
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
27472
- };
27473
- })();
27474
27459
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
27475
27460
  if (k2 === undefined) k2 = k;
27476
27461
  var desc = Object.getOwnPropertyDescriptor(m, k);
@@ -27513,27 +27498,17 @@ var React = __importStar(__webpack_require__(0));
27513
27498
  var Icon_1 = __webpack_require__(13);
27514
27499
  var Tooltip_1 = __webpack_require__(50);
27515
27500
  var classnames_1 = __importDefault(__webpack_require__(3));
27516
- var IconButton = /** @class */ (function (_super) {
27517
- __extends(IconButton, _super);
27518
- function IconButton() {
27519
- return _super !== null && _super.apply(this, arguments) || this;
27520
- }
27521
- IconButton.prototype.render = function () {
27522
- var _a;
27523
- var classes = (0, classnames_1.default)('icn-btn', (_a = {},
27524
- _a["icn-btn--".concat(this.props.size)] = this.props.size || this.props.size !== undefined,
27525
- _a["icn-btn--".concat(this.props.style)] = this.props.style || this.props.style !== undefined,
27526
- _a['icn-btn--disabled'] = this.props.disabled,
27527
- _a));
27528
- return (React.createElement(Tooltip_1.Tooltip, { text: this.props.disabled ? null : this.props.ariaValue, flow: this.props.toolTipFlow },
27529
- React.createElement("button", { id: this.props.id, tabIndex: 0, onClick: this.props.onClick, className: classes, disabled: this.props.disabled, "aria-label": this.props.ariaValue },
27530
- React.createElement(Icon_1.Icon, { name: this.props.icon, ariaHidden: true }))));
27531
- };
27532
- IconButton.defaultProps = {
27533
- toolTipAppend: true,
27534
- };
27535
- return IconButton;
27536
- }(React.PureComponent));
27501
+ var IconButton = function (props) {
27502
+ var _a;
27503
+ var classes = (0, classnames_1.default)('icn-btn', (_a = {},
27504
+ _a["icn-btn--".concat(props.size)] = props.size || props.size !== undefined,
27505
+ _a["icn-btn--".concat(props.style)] = props.style || props.style !== undefined,
27506
+ _a['icn-btn--disabled'] = props.disabled,
27507
+ _a));
27508
+ return (React.createElement(Tooltip_1.Tooltip, { text: props.disabled ? null : props.ariaValue, flow: props.toolTipFlow },
27509
+ React.createElement("button", { id: props.id, tabIndex: 0, onClick: props.onClick, className: classes, disabled: props.disabled, "aria-label": props.ariaValue },
27510
+ React.createElement(Icon_1.Icon, { name: props.icon, ariaHidden: true }))));
27511
+ };
27537
27512
  exports.IconButton = IconButton;
27538
27513
 
27539
27514
 
@@ -64554,6 +64529,7 @@ exports.translations = {
64554
64529
  Close: 'Close',
64555
64530
  Search: 'Search',
64556
64531
  Copy: 'Copy',
64532
+ 'Copied to clipboard': 'Copied to clipboard',
64557
64533
  'No results found': 'No results found',
64558
64534
  "Couldn't copy": "Couldn't copy",
64559
64535
  };
@@ -102731,6 +102707,10 @@ var CopyableTextBox = function (props) {
102731
102707
  navigator.clipboard
102732
102708
  .writeText(props.value)
102733
102709
  .then(function () {
102710
+ Toast_1.toasted.notify((0, translations_1.gettext)('Copied to clipboard'), {
102711
+ type: 'success',
102712
+ duration: 500,
102713
+ });
102734
102714
  setCopied(true);
102735
102715
  if (timeoutIdRef.current) {
102736
102716
  window.clearTimeout(timeoutIdRef.current);
@@ -190419,7 +190399,7 @@ var EditorTest = /** @class */ (function (_super) {
190419
190399
  React.createElement("dd", null,
190420
190400
  React.createElement("time", { title: "July 29, 2021 3:58 PM" }, "07/29")))),
190421
190401
  React.createElement(index_1.ButtonGroup, { align: "end" },
190422
- React.createElement(index_1.IconButton, { icon: "preview-mode", toolTipAppend: true, ariaValue: "Print preview", onClick: function () { return false; } }),
190402
+ React.createElement(index_1.IconButton, { icon: "preview-mode", ariaValue: "Print preview", onClick: function () { return false; } }),
190423
190403
  React.createElement(index_1.IconButton, { icon: "adjust", ariaValue: "Toogle theme", onClick: function () { return false; } }),
190424
190404
  React.createElement(index_1.IconButton, { icon: "switches", ariaValue: "Theme settings", onClick: function () { return false; } }))), authoringHeader: React.createElement(React.Fragment, null,
190425
190405
  React.createElement(Form.FormGroup, null,
@@ -190721,7 +190701,7 @@ var Editor = /** @class */ (function (_super) {
190721
190701
  React.createElement("dd", null,
190722
190702
  React.createElement("time", { title: "July 29, 2021 3:58 PM" }, "07/29")))),
190723
190703
  React.createElement(index_1.ButtonGroup, { align: "end" },
190724
- React.createElement(index_1.IconButton, { icon: "preview-mode", toolTipAppend: true, ariaValue: "Print preview", onClick: function () { return false; } }),
190704
+ React.createElement(index_1.IconButton, { icon: "preview-mode", ariaValue: "Print preview", onClick: function () { return false; } }),
190725
190705
  React.createElement(index_1.IconButton, { icon: "adjust", ariaValue: "Toogle theme", onClick: function () { return false; } }),
190726
190706
  React.createElement(index_1.IconButton, { icon: "switches", ariaValue: "Theme settings", onClick: function () { return false; } }))), authoringHeader: React.createElement(React.Fragment, null,
190727
190707
  React.createElement(Form.FormGroup, { inlineLabel: true },
@@ -198425,7 +198405,7 @@ exports.ThreePaneLayoutPattern = ThreePaneLayoutPattern;
198425
198405
  /* 1067 */
198426
198406
  /***/ (function(module, exports) {
198427
198407
 
198428
- module.exports = {"name":"superdesk-ui-framework","version":"5.2.1","license":"AGPL-3.0","repository":{"type":"git","url":"https://github.com/superdesk/superdesk-ui-framework.git"},"main":"dist/superdesk-ui.bundle.js","types":"react/index.d.ts","contributors":["Nemanja Pavlovic","Vladimir Stefanovic","Darko Tomic","Aleksandar Jelicic","Tomas Kikutis","Dragana Zivkovic","Konstantin Markov","Helmy Giacoman"],"scripts":{"start":"webpack-dev-server --config tasks/webpack.dev.js","server":"webpack --watch --config tasks/webpack.prod.js && tsc-watch","build":"tsc -p tsconfig.json --noEmit && webpack --config tasks/webpack.prod.js && tsc","build-ui":"webpack && tsc && npm run lint","playground-lint":"tsc -p examples/pages/playgrounds/react-playgrounds --noEmit","format-code":"npx prettier . --write","lint":"tsc -p tsconfig.json --noEmit && npx prettier . --check && eslint --parser=@typescript-eslint/parser app && tslint -c tslint.json 'app-typescript/**/*.{ts,tsx}' && npm run playground-lint && npm run unit-test","lint-fix":"tsc -p tsconfig.json --noEmit && tslint --fix -c tslint.json 'app-typescript/**/*.{ts,tsx}'","prepublishOnly":"npm run build","unit-test":"mocha","debug-unit-tests":"mocha --inspect-brk"},"devDependencies":{"@types/assert":"^1.5.6","@types/chart.js":"^2.9.24","@types/classnames":"^2.2.9","@types/enzyme":"^3.10.12","@types/enzyme-adapter-react-16":"^1.0.6","@types/lodash":"^4.14.161","@types/mocha":"^9.1.1","@types/react":"16.8.23","@types/react-beautiful-dnd":"^13.1.2","@types/react-dom":"16.8.0","@types/react-router-dom":"^5.1.2","@types/react-scrollspy":"^3.3.5","@typescript-eslint/parser":"^5.58.0","angular":"^1.7.9","angular-animate":"^1.7.9","angular-route":"^1.7.9","classnames":"^2.2.5","clean-webpack-plugin":"^1.0.0","code-prettify":"^0.1.0","copy-webpack-plugin":"^4.6.0","css-loader":"^2.1.1","enzyme":"^3.11.0","enzyme-adapter-react-16":"^1.15.7","eslint":"^4.6.1","eslint-loader":"^1.9.0","eslint-plugin-angular":"^3.1.1","eslint-plugin-react":"^7.3.0","extract-text-webpack-plugin":"^3.0.2","file-loader":"^0.11.2","html-loader":"^0.5.1","html-webpack-plugin":"^2.30.1","jquery":"^3.1.1","jquery-ui":"^1.12.1","jsdom":"20.0.3","jsdom-global":"3.0.2","lodash":"4.17.21","mocha":"^8.4.0","moment":"^2.29.3","node-sass":"6.0","prettier":"3.5.3","prismjs":"^1.28.0","prop-types":"^15.6.0","react":"16.8.6","react-dom":"16.8.6","react-redux":"^5.0.6","react-router-dom":"^5.1.2","redux":"^3.7.2","redux-form":"^7.0.4","sass-loader":"^6.0.6","style-loader":"^0.18.2","superdesk-code-style":"^1.1.2","ts-loader":"^6.0.2","ts-node":"^10.9.1","tslint":"^5.18.0","typescript":"^5.8.3","url-loader":"^1.1.2","webpack":"^3.5.5","webpack-cli":"3.3.10","webpack-dev-server":"2.11.1","webpack-merge":"^4.2.1"},"dependencies":{"@popperjs/core":"^2.4.0","@sourcefabric/common":"0.0.66","@superdesk/primereact":"^5.0.2-16","@superdesk/react-resizable-panels":"0.0.39","chart.js":"^2.9.3","date-fns":"^4.1.0","popper-max-size-modifier":"^0.2.0","popper.js":"1.14.4","primeicons":"2.0.0","react-beautiful-dnd":"^13.0.0","react-id-generator":"^3.0.0","react-scrollspy":"^3.4.3","weekstart":"^2.0.0"},"peerDependencies":{"moment":"*"},"volta":{"node":"14.21.3"}}
198408
+ module.exports = {"name":"superdesk-ui-framework","version":"5.2.2","license":"AGPL-3.0","repository":{"type":"git","url":"https://github.com/superdesk/superdesk-ui-framework.git"},"main":"dist/superdesk-ui.bundle.js","types":"react/index.d.ts","contributors":["Nemanja Pavlovic","Vladimir Stefanovic","Darko Tomic","Aleksandar Jelicic","Tomas Kikutis","Dragana Zivkovic","Konstantin Markov","Helmy Giacoman"],"scripts":{"start":"webpack-dev-server --config tasks/webpack.dev.js","watch":"webpack --watch --config tasks/webpack.prod.js & tsc --watch","build":"tsc -p tsconfig.json --noEmit && webpack --config tasks/webpack.prod.js && tsc","build-ui":"webpack && tsc && npm run lint","playground-lint":"tsc -p examples/pages/playgrounds/react-playgrounds --noEmit","format-code":"npx prettier . --write","lint":"tsc -p tsconfig.json --noEmit && npx prettier . --check && eslint --parser=@typescript-eslint/parser app && tslint -c tslint.json 'app-typescript/**/*.{ts,tsx}' && npm run playground-lint && npm run unit-test","lint-fix":"tsc -p tsconfig.json --noEmit && tslint --fix -c tslint.json 'app-typescript/**/*.{ts,tsx}'","prepublishOnly":"npm run build","unit-test":"mocha","debug-unit-tests":"mocha --inspect-brk"},"devDependencies":{"@types/assert":"^1.5.6","@types/chart.js":"^2.9.24","@types/classnames":"^2.2.9","@types/enzyme":"^3.10.12","@types/enzyme-adapter-react-16":"^1.0.6","@types/lodash":"^4.14.161","@types/mocha":"^9.1.1","@types/react":"16.8.23","@types/react-beautiful-dnd":"^13.1.2","@types/react-dom":"16.8.0","@types/react-router-dom":"^5.1.2","@types/react-scrollspy":"^3.3.5","@typescript-eslint/parser":"^5.58.0","angular":"^1.7.9","angular-animate":"^1.7.9","angular-route":"^1.7.9","classnames":"^2.2.5","clean-webpack-plugin":"^1.0.0","code-prettify":"^0.1.0","copy-webpack-plugin":"^4.6.0","css-loader":"^2.1.1","enzyme":"^3.11.0","enzyme-adapter-react-16":"^1.15.7","eslint":"^4.6.1","eslint-loader":"^1.9.0","eslint-plugin-angular":"^3.1.1","eslint-plugin-react":"^7.3.0","extract-text-webpack-plugin":"^3.0.2","file-loader":"^0.11.2","html-loader":"^0.5.1","html-webpack-plugin":"^2.30.1","jquery":"^3.1.1","jquery-ui":"^1.12.1","jsdom":"20.0.3","jsdom-global":"3.0.2","lodash":"4.17.21","mocha":"^8.4.0","moment":"^2.29.3","node-sass":"6.0","prettier":"3.5.3","prismjs":"^1.28.0","prop-types":"^15.6.0","react":"16.8.6","react-dom":"16.8.6","react-redux":"^5.0.6","react-router-dom":"^5.1.2","redux":"^3.7.2","redux-form":"^7.0.4","sass-loader":"^6.0.6","style-loader":"^0.18.2","superdesk-code-style":"^1.1.2","ts-loader":"^6.0.2","ts-node":"^10.9.1","tslint":"^5.18.0","typescript":"^5.8.3","url-loader":"^1.1.2","webpack":"^3.5.5","webpack-cli":"3.3.10","webpack-dev-server":"2.11.1","webpack-merge":"^4.2.1"},"dependencies":{"@popperjs/core":"^2.4.0","@sourcefabric/common":"0.0.66","@superdesk/primereact":"^5.0.2-16","@superdesk/react-resizable-panels":"0.0.39","chart.js":"^2.9.3","date-fns":"^4.1.0","popper-max-size-modifier":"^0.2.0","popper.js":"1.14.4","primeicons":"2.0.0","react-beautiful-dnd":"^13.0.0","react-id-generator":"^3.0.0","react-scrollspy":"^3.4.3","weekstart":"^2.0.0"},"peerDependencies":{"moment":"*"},"volta":{"node":"14.21.3"}}
198429
198409
 
198430
198410
  /***/ }),
198431
198411
  /* 1068 */
@@ -27233,21 +27233,6 @@ function addLeadingZeros(number, targetLength) {
27233
27233
 
27234
27234
  "use strict";
27235
27235
 
27236
- var __extends = (this && this.__extends) || (function () {
27237
- var extendStatics = function (d, b) {
27238
- extendStatics = Object.setPrototypeOf ||
27239
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
27240
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
27241
- return extendStatics(d, b);
27242
- };
27243
- return function (d, b) {
27244
- if (typeof b !== "function" && b !== null)
27245
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
27246
- extendStatics(d, b);
27247
- function __() { this.constructor = d; }
27248
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
27249
- };
27250
- })();
27251
27236
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
27252
27237
  if (k2 === undefined) k2 = k;
27253
27238
  var desc = Object.getOwnPropertyDescriptor(m, k);
@@ -27290,27 +27275,17 @@ var React = __importStar(__webpack_require__(0));
27290
27275
  var Icon_1 = __webpack_require__(13);
27291
27276
  var Tooltip_1 = __webpack_require__(50);
27292
27277
  var classnames_1 = __importDefault(__webpack_require__(3));
27293
- var IconButton = /** @class */ (function (_super) {
27294
- __extends(IconButton, _super);
27295
- function IconButton() {
27296
- return _super !== null && _super.apply(this, arguments) || this;
27297
- }
27298
- IconButton.prototype.render = function () {
27299
- var _a;
27300
- var classes = (0, classnames_1.default)('icn-btn', (_a = {},
27301
- _a["icn-btn--".concat(this.props.size)] = this.props.size || this.props.size !== undefined,
27302
- _a["icn-btn--".concat(this.props.style)] = this.props.style || this.props.style !== undefined,
27303
- _a['icn-btn--disabled'] = this.props.disabled,
27304
- _a));
27305
- return (React.createElement(Tooltip_1.Tooltip, { text: this.props.disabled ? null : this.props.ariaValue, flow: this.props.toolTipFlow },
27306
- React.createElement("button", { id: this.props.id, tabIndex: 0, onClick: this.props.onClick, className: classes, disabled: this.props.disabled, "aria-label": this.props.ariaValue },
27307
- React.createElement(Icon_1.Icon, { name: this.props.icon, ariaHidden: true }))));
27308
- };
27309
- IconButton.defaultProps = {
27310
- toolTipAppend: true,
27311
- };
27312
- return IconButton;
27313
- }(React.PureComponent));
27278
+ var IconButton = function (props) {
27279
+ var _a;
27280
+ var classes = (0, classnames_1.default)('icn-btn', (_a = {},
27281
+ _a["icn-btn--".concat(props.size)] = props.size || props.size !== undefined,
27282
+ _a["icn-btn--".concat(props.style)] = props.style || props.style !== undefined,
27283
+ _a['icn-btn--disabled'] = props.disabled,
27284
+ _a));
27285
+ return (React.createElement(Tooltip_1.Tooltip, { text: props.disabled ? null : props.ariaValue, flow: props.toolTipFlow },
27286
+ React.createElement("button", { id: props.id, tabIndex: 0, onClick: props.onClick, className: classes, disabled: props.disabled, "aria-label": props.ariaValue },
27287
+ React.createElement(Icon_1.Icon, { name: props.icon, ariaHidden: true }))));
27288
+ };
27314
27289
  exports.IconButton = IconButton;
27315
27290
 
27316
27291
 
@@ -64284,6 +64259,7 @@ exports.translations = {
64284
64259
  Close: 'Close',
64285
64260
  Search: 'Search',
64286
64261
  Copy: 'Copy',
64262
+ 'Copied to clipboard': 'Copied to clipboard',
64287
64263
  'No results found': 'No results found',
64288
64264
  "Couldn't copy": "Couldn't copy",
64289
64265
  };
@@ -102078,6 +102054,10 @@ var CopyableTextBox = function (props) {
102078
102054
  navigator.clipboard
102079
102055
  .writeText(props.value)
102080
102056
  .then(function () {
102057
+ Toast_1.toasted.notify((0, translations_1.gettext)('Copied to clipboard'), {
102058
+ type: 'success',
102059
+ duration: 500,
102060
+ });
102081
102061
  setCopied(true);
102082
102062
  if (timeoutIdRef.current) {
102083
102063
  window.clearTimeout(timeoutIdRef.current);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "superdesk-ui-framework",
3
- "version": "5.2.1",
3
+ "version": "5.2.2",
4
4
  "license": "AGPL-3.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -20,7 +20,7 @@
20
20
  ],
21
21
  "scripts": {
22
22
  "start": "webpack-dev-server --config tasks/webpack.dev.js",
23
- "server": "webpack --watch --config tasks/webpack.prod.js && tsc-watch",
23
+ "watch": "webpack --watch --config tasks/webpack.prod.js & tsc --watch",
24
24
  "build": "tsc -p tsconfig.json --noEmit && webpack --config tasks/webpack.prod.js && tsc",
25
25
  "build-ui": "webpack && tsc && npm run lint",
26
26
  "playground-lint": "tsc -p examples/pages/playgrounds/react-playgrounds --noEmit",
@@ -59,6 +59,10 @@ var CopyableTextBox = function (props) {
59
59
  navigator.clipboard
60
60
  .writeText(props.value)
61
61
  .then(function () {
62
+ Toast_1.toasted.notify((0, translations_1.gettext)('Copied to clipboard'), {
63
+ type: 'success',
64
+ duration: 500,
65
+ });
62
66
  setCopied(true);
63
67
  if (timeoutIdRef.current) {
64
68
  window.clearTimeout(timeoutIdRef.current);
@@ -4,16 +4,10 @@ interface IProps {
4
4
  icon: string;
5
5
  ariaValue: string;
6
6
  toolTipFlow?: 'top' | 'left' | 'right' | 'down';
7
- toolTipAppend?: boolean;
8
7
  size?: 'default' | 'small' | 'x-large';
9
8
  style?: 'default' | 'outline' | 'outlineWhite';
10
9
  disabled?: boolean;
11
10
  onClick(event: React.MouseEvent): void;
12
11
  }
13
- export declare class IconButton extends React.PureComponent<IProps> {
14
- static defaultProps: {
15
- toolTipAppend: boolean;
16
- };
17
- render(): JSX.Element;
18
- }
12
+ export declare const IconButton: React.FC<IProps>;
19
13
  export {};
@@ -1,19 +1,4 @@
1
1
  "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- if (typeof b !== "function" && b !== null)
11
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
- extendStatics(d, b);
13
- function __() { this.constructor = d; }
14
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
- };
16
- })();
17
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
18
3
  if (k2 === undefined) k2 = k;
19
4
  var desc = Object.getOwnPropertyDescriptor(m, k);
@@ -56,25 +41,15 @@ var React = __importStar(require("react"));
56
41
  var Icon_1 = require("./Icon");
57
42
  var Tooltip_1 = require("./Tooltip");
58
43
  var classnames_1 = __importDefault(require("classnames"));
59
- var IconButton = /** @class */ (function (_super) {
60
- __extends(IconButton, _super);
61
- function IconButton() {
62
- return _super !== null && _super.apply(this, arguments) || this;
63
- }
64
- IconButton.prototype.render = function () {
65
- var _a;
66
- var classes = (0, classnames_1.default)('icn-btn', (_a = {},
67
- _a["icn-btn--".concat(this.props.size)] = this.props.size || this.props.size !== undefined,
68
- _a["icn-btn--".concat(this.props.style)] = this.props.style || this.props.style !== undefined,
69
- _a['icn-btn--disabled'] = this.props.disabled,
70
- _a));
71
- return (React.createElement(Tooltip_1.Tooltip, { text: this.props.disabled ? null : this.props.ariaValue, flow: this.props.toolTipFlow },
72
- React.createElement("button", { id: this.props.id, tabIndex: 0, onClick: this.props.onClick, className: classes, disabled: this.props.disabled, "aria-label": this.props.ariaValue },
73
- React.createElement(Icon_1.Icon, { name: this.props.icon, ariaHidden: true }))));
74
- };
75
- IconButton.defaultProps = {
76
- toolTipAppend: true,
77
- };
78
- return IconButton;
79
- }(React.PureComponent));
44
+ var IconButton = function (props) {
45
+ var _a;
46
+ var classes = (0, classnames_1.default)('icn-btn', (_a = {},
47
+ _a["icn-btn--".concat(props.size)] = props.size || props.size !== undefined,
48
+ _a["icn-btn--".concat(props.style)] = props.style || props.style !== undefined,
49
+ _a['icn-btn--disabled'] = props.disabled,
50
+ _a));
51
+ return (React.createElement(Tooltip_1.Tooltip, { text: props.disabled ? null : props.ariaValue, flow: props.toolTipFlow },
52
+ React.createElement("button", { id: props.id, tabIndex: 0, onClick: props.onClick, className: classes, disabled: props.disabled, "aria-label": props.ariaValue },
53
+ React.createElement(Icon_1.Icon, { name: props.icon, ariaHidden: true }))));
54
+ };
80
55
  exports.IconButton = IconButton;
@@ -6,6 +6,7 @@ export declare const translations: {
6
6
  Close: string;
7
7
  Search: string;
8
8
  Copy: string;
9
+ 'Copied to clipboard': string;
9
10
  'No results found': string;
10
11
  "Couldn't copy": string;
11
12
  };
@@ -11,6 +11,7 @@ exports.translations = {
11
11
  Close: 'Close',
12
12
  Search: 'Search',
13
13
  Copy: 'Copy',
14
+ 'Copied to clipboard': 'Copied to clipboard',
14
15
  'No results found': 'No results found',
15
16
  "Couldn't copy": "Couldn't copy",
16
17
  };