@skedulo/sked-ui 21.8.0 → 21.8.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.
@@ -5,5 +5,5 @@ interface IEmptyState extends React.HTMLAttributes<HTMLDivElement> {
5
5
  message: string;
6
6
  className?: string;
7
7
  }
8
- export declare const EmptyState: React.SFC<IEmptyState>;
8
+ export declare const EmptyState: React.FC<IEmptyState>;
9
9
  export {};
@@ -2,7 +2,7 @@ import * as React from 'react';
2
2
  import { IFilterItem } from '../interfaces';
3
3
  export interface IFilterSearchProps<T> {
4
4
  items: T[];
5
- children: React.SFC<{
5
+ children: React.FC<{
6
6
  filteredItems: T[];
7
7
  }>;
8
8
  placeholder?: string;
@@ -2,7 +2,7 @@ import * as React from 'react';
2
2
  import { IFilterItem } from '../interfaces';
3
3
  export interface IRemoteSearchProps<T> {
4
4
  useFetch: (searchTerm: string) => Promise<T[]>;
5
- children: React.SFC<{
5
+ children: React.FC<{
6
6
  fetchedItems: T[];
7
7
  searchTerm: string;
8
8
  isFetching: boolean;
@@ -7,5 +7,5 @@ interface IProps extends React.HTMLAttributes<HTMLDivElement> {
7
7
  placeholderValue?: string;
8
8
  maxContentLength?: number;
9
9
  }
10
- export declare const ReadOnly: React.SFC<IProps>;
10
+ export declare const ReadOnly: React.FC<IProps>;
11
11
  export {};
@@ -46,7 +46,7 @@ export declare const FormLabel: React.FunctionComponent<{
46
46
  * are displayed in a consistent fashion. The resulting input will need to have the class form-element__outline applied
47
47
  * to it for us to hook into it to apply appropriate styling.
48
48
  */
49
- export declare const FormElementWrapper: React.SFC<FormElementWrapperProps & ValidationProps & React.HTMLAttributes<HTMLDivElement>>;
49
+ export declare const FormElementWrapper: React.FC<FormElementWrapperProps & ValidationProps & React.HTMLAttributes<HTMLDivElement>>;
50
50
  /**
51
51
  * Use when a validation error isn’t tied to a particular field
52
52
  */
@@ -6,4 +6,4 @@ export interface IInlineBannerProps extends React.HTMLAttributes<HTMLDivElement>
6
6
  /**
7
7
  * Displays a inline banner with various styling depending on the type.
8
8
  */
9
- export declare const InlineBanner: React.SFC<IInlineBannerProps & React.HTMLAttributes<HTMLDivElement>>;
9
+ export declare const InlineBanner: React.FC<IInlineBannerProps & React.HTMLAttributes<HTMLDivElement>>;
@@ -17,5 +17,5 @@ interface ILoadingSpinnerProps {
17
17
  * Loading Spinner inherits the color used in the parent element.
18
18
  * It accepts a size prop which defines the size of the spinner in px.
19
19
  */
20
- export declare const LoadingSpinner: React.SFC<ILoadingSpinnerProps>;
20
+ export declare const LoadingSpinner: React.FC<ILoadingSpinnerProps>;
21
21
  export {};
@@ -1,3 +1,3 @@
1
1
  import * as React from 'react';
2
2
  import { IPagination } from '../interfaces';
3
- export declare const PaginationCount: React.SFC<IPagination>;
3
+ export declare const PaginationCount: React.FC<IPagination>;
@@ -11,4 +11,4 @@ export declare const Page: React.FC<{
11
11
  isCurrent: boolean;
12
12
  onClick?: (event: React.MouseEvent) => void;
13
13
  }>;
14
- export declare const PaginationPages: React.SFC<IPagination>;
14
+ export declare const PaginationPages: React.FC<IPagination>;
@@ -4,13 +4,13 @@ export interface IHeaderCell {
4
4
  width?: string;
5
5
  className?: string;
6
6
  }
7
- export declare const Table: React.SFC<React.HTMLAttributes<HTMLTableElement>>;
7
+ export declare const Table: React.FC<React.HTMLAttributes<HTMLTableElement>>;
8
8
  export declare const TableHeadRow: React.FC<React.HTMLAttributes<HTMLTableRowElement>>;
9
- export declare const TableHead: React.SFC<{
9
+ export declare const TableHead: React.FC<{
10
10
  cells: IHeaderCell[];
11
11
  sticky?: boolean;
12
12
  className?: string;
13
13
  }>;
14
14
  export declare const TableBody: React.SFC;
15
- export declare const TableRow: React.SFC<React.HTMLAttributes<HTMLTableRowElement>>;
16
- export declare const TableCell: React.SFC<React.TdHTMLAttributes<HTMLTableDataCellElement>>;
15
+ export declare const TableRow: React.FC<React.HTMLAttributes<HTMLTableRowElement>>;
16
+ export declare const TableCell: React.FC<React.TdHTMLAttributes<HTMLTableDataCellElement>>;
package/dist/index.js CHANGED
@@ -6755,6 +6755,7 @@ var OverflowTooltip = /*#__PURE__*/function (_React$PureComponent) {
6755
6755
  }, {
6756
6756
  key: "isTextOverflow",
6757
6757
  value: function isTextOverflow() {
6758
+ if (!this._element) return false;
6758
6759
  return this._element.clientWidth < this._element.scrollWidth;
6759
6760
  }
6760
6761
  }, {
@@ -58492,20 +58493,23 @@ __webpack_require__.r(__webpack_exports__);
58492
58493
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TableBody", function() { return TableBody; });
58493
58494
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TableRow", function() { return TableRow; });
58494
58495
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TableCell", function() { return TableCell; });
58495
- /* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6);
58496
- /* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);
58497
- /* harmony import */ var _babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7);
58498
- /* harmony import */ var _babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__);
58499
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(23);
58500
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);
58501
- /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(24);
58502
- /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_3__);
58503
- /* harmony import */ var _utils_Strings__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(739);
58496
+ /* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9);
58497
+ /* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);
58498
+ /* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6);
58499
+ /* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1__);
58500
+ /* harmony import */ var _babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7);
58501
+ /* harmony import */ var _babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__);
58502
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(23);
58503
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);
58504
+ /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(24);
58505
+ /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_4__);
58506
+ /* harmony import */ var _utils_Strings__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(739);
58507
+
58504
58508
 
58505
58509
 
58506
58510
  var _excluded = ["className", "children"],
58507
58511
  _excluded2 = ["className", "children"],
58508
- _excluded3 = ["className", "children"],
58512
+ _excluded3 = ["className", "children", "style"],
58509
58513
  _excluded4 = ["className", "children"];
58510
58514
 
58511
58515
 
@@ -58513,62 +58517,73 @@ var _excluded = ["className", "children"],
58513
58517
  var Table = function Table(props) {
58514
58518
  var className = props.className,
58515
58519
  children = props.children,
58516
- otherProps = _babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1___default()(props, _excluded);
58520
+ otherProps = _babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2___default()(props, _excluded);
58517
58521
 
58518
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("table", _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({
58519
- className: classnames__WEBPACK_IMPORTED_MODULE_3___default()('sk-table sk-w-full sk-border-collapse', className)
58522
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("table", _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default()({
58523
+ className: classnames__WEBPACK_IMPORTED_MODULE_4___default()('sk-table sk-w-full sk-border-collapse', className)
58520
58524
  }, otherProps), children);
58521
58525
  };
58522
58526
  var TableHeadRow = function TableHeadRow(props) {
58523
58527
  var className = props.className,
58524
58528
  children = props.children,
58525
- rest = _babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1___default()(props, _excluded2);
58529
+ rest = _babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2___default()(props, _excluded2);
58526
58530
 
58527
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("tr", _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({
58528
- className: classnames__WEBPACK_IMPORTED_MODULE_3___default()('sk-h-10 sk-text-left', className)
58531
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("tr", _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default()({
58532
+ className: classnames__WEBPACK_IMPORTED_MODULE_4___default()('sk-h-10 sk-text-left', className)
58529
58533
  }, rest), children);
58530
58534
  };
58531
58535
  var TableHead = function TableHead(_ref) {
58532
58536
  var cells = _ref.cells,
58533
58537
  sticky = _ref.sticky,
58534
58538
  className = _ref.className;
58535
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("thead", {
58539
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("thead", {
58536
58540
  className: className
58537
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](TableHeadRow, null, cells.map(function (cell) {
58538
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("th", {
58539
- "data-sk-name": "th-".concat(Object(_utils_Strings__WEBPACK_IMPORTED_MODULE_4__["createTestLabel"])(cell.name)),
58541
+ }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](TableHeadRow, null, cells.map(function (cell) {
58542
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("th", {
58543
+ "data-sk-name": "th-".concat(Object(_utils_Strings__WEBPACK_IMPORTED_MODULE_5__["createTestLabel"])(cell.name)),
58540
58544
  key: cell.name,
58541
- className: classnames__WEBPACK_IMPORTED_MODULE_3___default()('sk-th sk-bg-neutral-250 sk-text-neutral-650 sk-text-xxs sk-uppercase sk-font-medium', {
58545
+ className: classnames__WEBPACK_IMPORTED_MODULE_4___default()('sk-th sk-bg-neutral-250 sk-text-neutral-650 sk-text-xxs sk-uppercase sk-font-medium', {
58542
58546
  'sk-sticky sk-top-0': sticky
58543
58547
  }, cell.className),
58544
58548
  style: {
58545
58549
  width: cell.width || '',
58546
58550
  minWidth: '120px'
58547
58551
  }
58548
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("span", {
58552
+ }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("span", {
58549
58553
  className: "sk-th-content sk-px-3"
58550
58554
  }, cell.name));
58551
58555
  })));
58552
58556
  };
58553
58557
  var TableBody = function TableBody(props) {
58554
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("tbody", null, props.children);
58558
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("tbody", null, props.children);
58555
58559
  };
58556
58560
  var TableRow = function TableRow(props) {
58561
+ var _React$useState = react__WEBPACK_IMPORTED_MODULE_3__["useState"]({}),
58562
+ _React$useState2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_React$useState, 2),
58563
+ inlineStyle = _React$useState2[0],
58564
+ setInlineStyle = _React$useState2[1];
58565
+
58557
58566
  var className = props.className,
58558
58567
  children = props.children,
58559
- otherProps = _babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1___default()(props, _excluded3);
58568
+ style = props.style,
58569
+ otherProps = _babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2___default()(props, _excluded3); // Hack to fix weird issue with border-bottom not displaying on Platform List page on initial page load after React 18 upgrade
58570
+
58560
58571
 
58561
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("tr", _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({
58562
- className: classnames__WEBPACK_IMPORTED_MODULE_3___default()('sk-border-b sk-border-neutral-350 sk-leading-tight', className)
58572
+ react__WEBPACK_IMPORTED_MODULE_3__["useEffect"](function () {
58573
+ setInlineStyle(style);
58574
+ }, [style]);
58575
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("tr", _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default()({
58576
+ className: classnames__WEBPACK_IMPORTED_MODULE_4___default()('sk-border-b sk-border-neutral-350 sk-leading-tight', className),
58577
+ style: inlineStyle
58563
58578
  }, otherProps), children);
58564
58579
  };
58565
58580
  var TableCell = function TableCell(props) {
58566
58581
  var className = props.className,
58567
58582
  children = props.children,
58568
- otherProps = _babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1___default()(props, _excluded4);
58583
+ otherProps = _babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2___default()(props, _excluded4);
58569
58584
 
58570
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("td", _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({
58571
- className: classnames__WEBPACK_IMPORTED_MODULE_3___default()('sk-p-3 sk-text-xs sk-text-neutral-850', className)
58585
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("td", _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default()({
58586
+ className: classnames__WEBPACK_IMPORTED_MODULE_4___default()('sk-p-3 sk-text-xs sk-text-neutral-850', className)
58572
58587
  }, otherProps), children);
58573
58588
  };
58574
58589
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skedulo/sked-ui",
3
- "version": "21.8.0",
3
+ "version": "21.8.2",
4
4
  "license": "UNLICENSED",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",