plataforma-fundacao-componentes 2.22.16 → 2.22.19

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.
@@ -19,6 +19,7 @@ interface TableWithOverflowProps {
19
19
  showTopNavigator?: boolean;
20
20
  columns: ColumnObject[];
21
21
  lines?: any[];
22
+ noResultMessage?: string;
22
23
  }
23
24
  declare function TableWithOverflow(props: TableWithOverflowProps): JSX.Element;
24
25
  declare namespace TableWithOverflow {
package/dist/index.css CHANGED
@@ -15248,7 +15248,6 @@ h5 {
15248
15248
  border-bottom: 1px solid;
15249
15249
  transition: background-color 0.3s ease, color 0.3s ease;
15250
15250
  background-color: #cdd3cd;
15251
- color: #828a82;
15252
15251
  border-color: #828a82; }
15253
15252
  .component-upper-header-table .component-upper-header-table-btn {
15254
15253
  font-size: 16px;
@@ -15280,7 +15279,6 @@ h5 {
15280
15279
  max-height: 20px !important; }
15281
15280
  .component-upper-header-table.active {
15282
15281
  background-color: #d7e6c8;
15283
- color: #3fa110;
15284
15282
  border-color: #3fa110; }
15285
15283
  .component-upper-header-table.active .component-upper-header-table-btn:not(:disabled) {
15286
15284
  background-color: #d7e6c8;
@@ -15295,7 +15293,8 @@ h5 {
15295
15293
  flex-wrap: wrap; }
15296
15294
  .component-upper-header-table .component-upper-header-table-collapsed {
15297
15295
  border-top: 1px solid #3fa110;
15298
- background-color: #eff4eb; }
15296
+ background-color: #eff4eb;
15297
+ padding: var(--colPadding); }
15299
15298
 
15300
15299
  @import url("https://fonts.googleapis.com/css2?family=Exo+2:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");
15301
15300
  @import url("https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,200;0,300;0,400;0,600;0,700;0,800;0,900;1,200;1,300;1,400;1,600;1,700;1,800;1,900&display=swap");
@@ -15453,6 +15452,7 @@ h5 {
15453
15452
  .component-table-with-overflow .component-table-with-overflow-wrapper .component-table-with-overflow-outer-table table thead tr:nth-child(2) {
15454
15453
  height: 12px; }
15455
15454
  .component-table-with-overflow .component-table-with-overflow-wrapper .component-table-with-overflow-outer-table table tbody tr td {
15455
+ min-height: 44px;
15456
15456
  background-color: #fefefe;
15457
15457
  padding: 12px 8px;
15458
15458
  white-space: nowrap; }
@@ -15531,6 +15531,22 @@ tr:first-child th:last-child {
15531
15531
  right: 0;
15532
15532
  width: 8px;
15533
15533
  height: 44px; } }
15534
+ .component-table-with-overflow .component-table-with-overflow-wrapper.no-result {
15535
+ padding-bottom: 44px; }
15536
+ .component-table-with-overflow .component-table-with-overflow-no-result {
15537
+ -webkit-user-select: none;
15538
+ -moz-user-select: none;
15539
+ -ms-user-select: none;
15540
+ user-select: none;
15541
+ position: absolute;
15542
+ left: 0;
15543
+ width: 100%;
15544
+ display: flex;
15545
+ align-items: center;
15546
+ justify-content: center;
15547
+ background-color: #fefefe;
15548
+ border-radius: 8px;
15549
+ min-height: 44px; }
15534
15550
 
15535
15551
  @import url("https://fonts.googleapis.com/css2?family=Exo+2:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");
15536
15552
  @import url("https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,200;0,300;0,400;0,600;0,700;0,800;0,900;1,200;1,300;1,400;1,600;1,700;1,800;1,900&display=swap");
package/dist/index.js CHANGED
@@ -9926,8 +9926,8 @@ function TableWithOverflow(props) {
9926
9926
 
9927
9927
  var mediaQuery = useScreenSize();
9928
9928
  var wrapperClassName = React.useMemo(function () {
9929
- return getMergedClassNames([rootClassName$1B + "-wrapper", props.upperHeader ? 'has-upper-header' : '', 'left-columns-padding']);
9930
- }, [props.upperHeader]);
9929
+ return getMergedClassNames([rootClassName$1B + "-wrapper", props.upperHeader ? 'has-upper-header' : '', props.noResultMessage && !props.lines.length ? 'no-result' : '', 'left-columns-padding']);
9930
+ }, [props.upperHeader, props.lines, props.noResultMessage]);
9931
9931
  var outerTableRef = React.createRef();
9932
9932
  useDraggableScroll(outerTableRef, {
9933
9933
  mouseDownCondition: function mouseDownCondition(el) {
@@ -10006,7 +10006,7 @@ function TableWithOverflow(props) {
10006
10006
  var absoluteObj = atLeastOneStaticColumn && column.absolute ? column.absolute : {};
10007
10007
  return React__default.createElement("th", Object.assign({
10008
10008
  key: "header-" + column.key,
10009
- "data-draggable": atLeastOneStaticColumn && !Boolean(absoluteObj)
10009
+ "data-draggable": atLeastOneStaticColumn && !Boolean(column.absolute)
10010
10010
  }, column.props, {
10011
10011
  style: _extends({}, (_column$props = column.props) === null || _column$props === void 0 ? void 0 : _column$props.style, absoluteObj),
10012
10012
  className: getMergedClassNames([column.key + "-cell", atLeastOneStaticColumn && column.absolute ? 'absolute' : ''])
@@ -10016,8 +10016,9 @@ function TableWithOverflow(props) {
10016
10016
  })), React__default.createElement("tr", null)), React__default.createElement("tbody", null, (_props$lines = props.lines) === null || _props$lines === void 0 ? void 0 : _props$lines.map(function (line, lineIndex) {
10017
10017
  var _props$columns2;
10018
10018
 
10019
+ var k = line.key ? line.key : lineIndex;
10019
10020
  return React__default.createElement("tr", {
10020
- key: lineIndex,
10021
+ key: k,
10021
10022
  "aria-disabled": line.disabled || false
10022
10023
  }, React__default.createElement("td", {
10023
10024
  "data-draggable": false,
@@ -10028,7 +10029,7 @@ function TableWithOverflow(props) {
10028
10029
  var absoluteObj = atLeastOneStaticColumn && column.absolute ? column.absolute : {};
10029
10030
  return React__default.createElement("td", Object.assign({
10030
10031
  "data-draggable": atLeastOneStaticColumn && !Boolean(column.absolute),
10031
- key: lineIndex + "-" + column.key
10032
+ key: k + "-" + column.key
10032
10033
  }, column.props, {
10033
10034
  style: _extends({}, (_column$props2 = column.props) === null || _column$props2 === void 0 ? void 0 : _column$props2.style, absoluteObj),
10034
10035
  className: getMergedClassNames([(_column$props3 = column.props) === null || _column$props3 === void 0 ? void 0 : _column$props3.className, column.key + "-cell", atLeastOneStaticColumn && column.absolute ? 'absolute' : ''])
@@ -10036,7 +10037,9 @@ function TableWithOverflow(props) {
10036
10037
  }), React__default.createElement("td", {
10037
10038
  className: 'absolute right-0'
10038
10039
  }));
10039
- }))))));
10040
+ })))), props.noResultMessage && !props.lines.length ? React__default.createElement("div", {
10041
+ className: rootClassName$1B + "-no-result"
10042
+ }, props.noResultMessage) : undefined));
10040
10043
  }
10041
10044
 
10042
10045
  TableWithOverflow.defaultProps = {