plataforma-fundacao-componentes 2.22.2 → 2.22.5

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.
@@ -9,6 +9,8 @@ interface ColProps extends React.HTMLAttributes<HTMLDivElement> {
9
9
  end?: boolean;
10
10
  noPadding?: boolean;
11
11
  children?: React.ReactNode;
12
+ noPaddingTop?: boolean;
13
+ buttonActionsCol?: boolean;
12
14
  }
13
15
  declare function Col(props: ColProps): JSX.Element;
14
16
  declare namespace Col {
@@ -12,6 +12,7 @@ export interface ModalProps {
12
12
  onClose?: (modalKey?: string | number) => void;
13
13
  size?: ModalSizes;
14
14
  mobileOnXS?: boolean;
15
+ compenseColPaddingContent?: boolean;
15
16
  footer?: ButtonProps[] | any;
16
17
  children?: any;
17
18
  }
@@ -4,6 +4,7 @@ declare namespace _default {
4
4
  }
5
5
  export default _default;
6
6
  export function Small(): JSX.Element;
7
+ export function SmallCompensePadding(): JSX.Element;
7
8
  export function Large(): JSX.Element;
8
9
  export function ExtraLarge(): JSX.Element;
9
10
  export function Alert(): JSX.Element;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { ModalProps } from './Modal';
3
- interface AlertModalProps extends ModalProps {
3
+ export interface AlertModalProps extends ModalProps {
4
4
  language?: {
5
5
  confirm: string;
6
6
  };
@@ -13,7 +13,7 @@ export declare namespace AlertModal {
13
13
  showIcons: boolean;
14
14
  };
15
15
  }
16
- interface ConfirmModalProps extends ModalProps {
16
+ export interface ConfirmModalProps extends ModalProps {
17
17
  language?: {
18
18
  confirm: string;
19
19
  cancel: string;
@@ -28,7 +28,7 @@ export declare namespace ConfirmModal {
28
28
  showIcons: boolean;
29
29
  };
30
30
  }
31
- interface DestructiveModalProps extends ModalProps {
31
+ export interface DestructiveModalProps extends ModalProps {
32
32
  language?: {
33
33
  confirm: string;
34
34
  cancel: string;
@@ -43,4 +43,3 @@ export declare namespace DestructiveModal {
43
43
  showIcons: boolean;
44
44
  };
45
45
  }
46
- export {};
@@ -12,3 +12,4 @@ export declare const ConfirmSort: () => JSX.Element;
12
12
  export declare const WithActions: () => JSX.Element;
13
13
  export declare const UpperHeader: () => JSX.Element;
14
14
  export declare const Typed: () => JSX.Element;
15
+ export declare const WithOverflow: () => JSX.Element;
package/dist/index.css CHANGED
@@ -6438,12 +6438,22 @@ h5 {
6438
6438
  width: 100%; }
6439
6439
  .component-col:not(.no-padding) {
6440
6440
  padding: var(--colPadding); }
6441
+ .component-col.no-padding-top {
6442
+ padding-top: 0 !important; }
6441
6443
  .component-col.centralized {
6442
6444
  justify-content: center;
6443
6445
  align-items: center; }
6444
6446
  .component-col.end {
6445
6447
  justify-content: flex-end;
6446
6448
  align-items: center; }
6449
+ .component-col.button-actions-col {
6450
+ padding: 0;
6451
+ flex-wrap: wrap; }
6452
+ .component-col.button-actions-col button {
6453
+ margin: var(--colPadding); }
6454
+ @media screen and (max-width: 575.98px) {
6455
+ .component-col.button-actions-col button {
6456
+ width: 100% !important; } }
6447
6457
  .component-col.component-col-xl-1 {
6448
6458
  flex: 0 0 calc(100% * 1 / 12);
6449
6459
  max-width: calc(100% * 1 / 12); }
@@ -12286,6 +12296,8 @@ h5 {
12286
12296
  flex-flow: column;
12287
12297
  overflow-y: overlay;
12288
12298
  padding: 24px; }
12299
+ .component-modal .component-modal-content.compense {
12300
+ padding: calc(24px - var(--colPadding)); }
12289
12301
  .component-modal .component-modal-footer {
12290
12302
  display: flex;
12291
12303
  justify-content: flex-end;
@@ -14515,7 +14527,7 @@ table.component-table {
14515
14527
  padding: 8px;
14516
14528
  border-collapse: collapse; }
14517
14529
  table.component-table * {
14518
- font-family: "Nunito", sans-serif; }
14530
+ font-family: "Nunito", sans-serif !important; }
14519
14531
  table.component-table thead tr th {
14520
14532
  background-color: #fefefe;
14521
14533
  font-weight: 800;
@@ -14536,6 +14548,8 @@ table.component-table {
14536
14548
  table.component-table.has-upper-header thead tr th:last-child {
14537
14549
  border-radius: 0 0 8px 0;
14538
14550
  padding: 0; }
14551
+ table.component-table tbody tr[aria-disabled='true'] td {
14552
+ background-color: #efefef !important; }
14539
14553
  table.component-table tbody tr:first-child {
14540
14554
  height: 16px; }
14541
14555
  table.component-table tbody tr:not(:first-child):not(:last-child) td:not(:first-child):not(:last-child) {
@@ -15055,8 +15069,11 @@ h5 {
15055
15069
  background-color: #bfc7bf; }
15056
15070
 
15057
15071
  .component-table-with-overflow {
15072
+ font-family: "Nunito", sans-serif;
15058
15073
  position: relative;
15059
15074
  width: 100%; }
15075
+ .component-table-with-overflow * {
15076
+ font-family: "Nunito", sans-serif !important; }
15060
15077
  .component-table-with-overflow .component-table-with-overflow-outer-table {
15061
15078
  width: 100%;
15062
15079
  overflow-x: auto; }
@@ -15107,9 +15124,6 @@ h5 {
15107
15124
  .component-table-with-overflow .component-table-with-overflow-outer-table .component-table-with-overflow-table .component-table-with-overflow-mid:not(.over) {
15108
15125
  cursor: inherit;
15109
15126
  overflow-x: visible; }
15110
- .component-table-with-overflow .component-table-with-overflow-outer-table .component-table-with-overflow-table .component-table-with-overflow-mid .component-table-with-overflow-row.disabled .component-table-with-overflow-cell {
15111
- color: #828a82;
15112
- background-color: #efefef; }
15113
15127
  .component-table-with-overflow .component-table-with-overflow-outer-table .component-table-with-overflow-table .component-table-with-overflow-mid .component-table-with-overflow-cell {
15114
15128
  justify-content: center;
15115
15129
  background-color: #fefefe; }
@@ -15143,6 +15157,7 @@ h5 {
15143
15157
  margin-bottom: 16px;
15144
15158
  background-color: #fefefe; }
15145
15159
  .component-table-with-overflow .component-table-with-overflow-outer-table .component-table-with-overflow-table .component-table-with-overflow-header .component-table-with-overflow-cell {
15160
+ color: #323c32;
15146
15161
  display: flex;
15147
15162
  align-items: center;
15148
15163
  justify-content: center;
@@ -15154,12 +15169,13 @@ h5 {
15154
15169
  width: 100%; }
15155
15170
  .component-table-with-overflow .component-table-with-overflow-outer-table .component-table-with-overflow-table .component-table-with-overflow-body .component-table-with-overflow-row {
15156
15171
  display: flex; }
15157
- .component-table-with-overflow .component-table-with-overflow-outer-table .component-table-with-overflow-table .component-table-with-overflow-body .component-table-with-overflow-row.disabled {
15172
+ .component-table-with-overflow .component-table-with-overflow-outer-table .component-table-with-overflow-table .component-table-with-overflow-body .component-table-with-overflow-row.disabled .component-table-with-overflow-cell {
15158
15173
  color: #828a82;
15159
15174
  background-color: #efefef; }
15160
15175
  .component-table-with-overflow .component-table-with-overflow-outer-table .component-table-with-overflow-table .component-table-with-overflow-body .component-table-with-overflow-row:not(:last-child) .component-table-with-overflow-cell {
15161
15176
  border-bottom: 1px solid #cdd3cd; }
15162
15177
  .component-table-with-overflow .component-table-with-overflow-outer-table .component-table-with-overflow-table .component-table-with-overflow-body .component-table-with-overflow-row .component-table-with-overflow-cell {
15178
+ color: #323c32;
15163
15179
  text-align: center;
15164
15180
  vertical-align: middle;
15165
15181
  display: flex;
package/dist/index.js CHANGED
@@ -3948,7 +3948,7 @@ function Col(props) {
3948
3948
  });
3949
3949
 
3950
3950
  var rp = _extends({}, props, {
3951
- className: getMergedClassNames([props.className, rootClassName$L].concat(getSizes, [props.centralized ? 'centralized' : '', props.end ? 'end' : '', props.noPadding ? 'no-padding' : '']))
3951
+ className: getMergedClassNames([props.className, rootClassName$L].concat(getSizes, [props.centralized ? 'centralized' : '', props.end ? 'end' : '', props.noPadding ? 'no-padding' : '', props.noPaddingTop ? 'no-padding-top' : '', props.buttonActionsCol ? 'button-actions-col' : '']))
3952
3952
  });
3953
3953
 
3954
3954
  delete rp.noPadding;
@@ -4408,7 +4408,7 @@ var DropdownItem$1 = React.memo(DropdownItem);
4408
4408
  var rootClassName$S = 'component-dropdown-menu';
4409
4409
  function DropdownMenu(props) {
4410
4410
  var id = React.useMemo(function () {
4411
- return "" + rootClassName$S + (props.id ? props.id : getUniqueKey());
4411
+ return props.id ? props.id : getUniqueKey();
4412
4412
  }, [props.id]);
4413
4413
 
4414
4414
  var _useState = React.useState(null),
@@ -8416,7 +8416,7 @@ function Modal(props) {
8416
8416
  var filteredProps = React.useMemo(function () {
8417
8417
  var p = _extends({}, props, {
8418
8418
  id: props.id ? props.id : props.modalKey ? props.modalKey : "modal" + getUniqueKey(),
8419
- className: getMergedClassNames([rootClassName$1k, props.className || '', props.mobileOnXS ? 'mobile-on-xs' : '', rootClassName$1k + "-" + String(props.size).toLowerCase()])
8419
+ className: getMergedClassNames([props.className || '', rootClassName$1k, props.mobileOnXS ? 'mobile-on-xs' : '', rootClassName$1k + "-" + String(props.size).toLowerCase()])
8420
8420
  });
8421
8421
 
8422
8422
  delete p.footer;
@@ -8459,7 +8459,7 @@ function Modal(props) {
8459
8459
  onClick: handleClose,
8460
8460
  icon: React__default.createElement(CloseIcon, null)
8461
8461
  }))), React__default.createElement("div", {
8462
- className: rootClassName$1k + "-content"
8462
+ className: getMergedClassNames([rootClassName$1k + "-content", props.compenseColPaddingContent ? 'compense' : ''])
8463
8463
  }, props.children), props.footer ? React__default.createElement("div", {
8464
8464
  className: rootClassName$1k + "-footer"
8465
8465
  }, footer) : undefined);
@@ -9652,14 +9652,18 @@ function Table(props) {
9652
9652
  }, React__default.createElement("tr", null), props.lines && props.lines.length ? Array.from(props.lines).map(function (line, index) {
9653
9653
  var key = line.key ? line.key : index;
9654
9654
  delete line.key;
9655
+ var disabled = line.disabled || false;
9656
+ delete line.disabled;
9655
9657
  var lineProps = line.props ? line.props : {};
9656
9658
  delete line.props;
9657
9659
  return React__default.createElement("tr", Object.assign({
9658
- key: key
9660
+ key: key,
9661
+ "aria-disabled": disabled
9659
9662
  }, lineProps), React__default.createElement("td", null), Object.values(line).map(function (cell, valueIndex) {
9663
+ var columnProps = props.columns[valueIndex].props || {};
9660
9664
  return React__default.createElement("td", Object.assign({
9661
9665
  key: cell && cell.key ? cell.key : valueIndex
9662
- }, props.columns[valueIndex] && props.columns[valueIndex].props ? props.columns[valueIndex].props : {}, cell && cell.props ? cell.props : {}), cell);
9666
+ }, columnProps, cell && cell.props ? cell.props : {}), cell);
9663
9667
  }), React__default.createElement("td", null));
9664
9668
  }) : undefined))));
9665
9669
  }
@@ -9882,12 +9886,15 @@ function TableWithOverflow(props) {
9882
9886
  delete line.props;
9883
9887
  return React__default.createElement("tr", Object.assign({
9884
9888
  key: key
9885
- }, lineProps), React__default.createElement("td", null), Object.values(line).map(function (cell, valueIndex) {
9886
- var _props$columns$valueI;
9887
-
9888
- return React__default.createElement("td", Object.assign({
9889
- key: cell.key ? cell.key : valueIndex
9890
- }, (_props$columns$valueI = props.columns[valueIndex]) === null || _props$columns$valueI === void 0 ? void 0 : _props$columns$valueI.props, cell.props), cell);
9889
+ }, lineProps), React__default.createElement("td", null), Object.entries(line).map(function (cell, valueIndex) {
9890
+ var column = Array.from(props.columns).find(function (c) {
9891
+ return c.key === cell[0];
9892
+ });
9893
+ return (column === null || column === void 0 ? void 0 : column.key) === 'actions' ? React__default.createElement("td", {
9894
+ key: fakeId + "-actions"
9895
+ }) : React__default.createElement("td", Object.assign({
9896
+ key: cell[1].key ? cell[1].key : valueIndex
9897
+ }, column === null || column === void 0 ? void 0 : column.props, cell[1].props), cell[1]);
9891
9898
  }), React__default.createElement("td", null));
9892
9899
  }) : undefined)), props.upperHeader ? React__default.createElement(React__default.Fragment, null, React__default.createElement("div", {
9893
9900
  className: getMergedClassNames([rootClassName$1A + "-upper-header", props.upperHeader.active ? 'active' : ''])