plataforma-fundacao-componentes 2.22.4 → 2.22.7

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.
@@ -36,7 +36,7 @@ var ChevronArrowDownIcon = function ChevronArrowDownIcon() {
36
36
 
37
37
  var getMergedClassNames = function getMergedClassNames(arr) {
38
38
  return arr.filter(function (el) {
39
- return el !== '';
39
+ return Boolean(el);
40
40
  }).join(' ');
41
41
  };
42
42
  var getUniqueKey = function getUniqueKey() {
@@ -3961,7 +3961,7 @@ function Col(props) {
3961
3961
  });
3962
3962
 
3963
3963
  var rp = _extends({}, props, {
3964
- className: getMergedClassNames([props.className, rootClassName$L].concat(getSizes, [props.centralized ? 'centralized' : '', props.end ? 'end' : '', props.noPadding ? 'no-padding' : '']))
3964
+ 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' : '']))
3965
3965
  });
3966
3966
 
3967
3967
  delete rp.noPadding;
@@ -3969,6 +3969,8 @@ function Col(props) {
3969
3969
  delete rp.end;
3970
3970
  delete rp.cols;
3971
3971
  delete rp.children;
3972
+ delete rp.buttonActionsCol;
3973
+ delete rp.noPaddingTop;
3972
3974
  return rp;
3973
3975
  }, [props]);
3974
3976
  return React.createElement("div", Object.assign({}, p), props.children);
@@ -4307,6 +4309,7 @@ function DatePicker(props) {
4307
4309
  return React.createElement("div", {
4308
4310
  className: rootClassName$P
4309
4311
  }, props.initialValue ? React.createElement(IconButton$1, {
4312
+ disabled: props.disabled,
4310
4313
  className: rootClassName$P + "-clear-button",
4311
4314
  icon: React.createElement(CloseIcon, null),
4312
4315
  onClick: function onClick() {
@@ -8435,7 +8438,7 @@ function Modal(props) {
8435
8438
  var filteredProps = useMemo(function () {
8436
8439
  var p = _extends({}, props, {
8437
8440
  id: props.id ? props.id : props.modalKey ? props.modalKey : "modal" + getUniqueKey(),
8438
- className: getMergedClassNames([rootClassName$1k, props.className || '', props.mobileOnXS ? 'mobile-on-xs' : '', rootClassName$1k + "-" + String(props.size).toLowerCase()])
8441
+ className: getMergedClassNames([props.className || '', rootClassName$1k, props.mobileOnXS ? 'mobile-on-xs' : '', rootClassName$1k + "-" + String(props.size).toLowerCase()])
8439
8442
  });
8440
8443
 
8441
8444
  delete p.footer;
@@ -8447,6 +8450,7 @@ function Modal(props) {
8447
8450
  delete p.mobileOnXS;
8448
8451
  delete p.preventEscExit;
8449
8452
  delete p.preventMaskExit;
8453
+ delete p.compenseColPaddingContent;
8450
8454
  delete p.modalKey;
8451
8455
  return p;
8452
8456
  }, [props]);
@@ -8478,7 +8482,7 @@ function Modal(props) {
8478
8482
  onClick: handleClose,
8479
8483
  icon: React.createElement(CloseIcon, null)
8480
8484
  }))), React.createElement("div", {
8481
- className: rootClassName$1k + "-content"
8485
+ className: getMergedClassNames([rootClassName$1k + "-content", props.compenseColPaddingContent ? 'compense' : ''])
8482
8486
  }, props.children), props.footer ? React.createElement("div", {
8483
8487
  className: rootClassName$1k + "-footer"
8484
8488
  }, footer) : undefined);
@@ -9545,6 +9549,8 @@ ActionsColumn.defaultProps = {
9545
9549
 
9546
9550
  var rootClassName$1w = 'component-table-left-checkbox-with-label';
9547
9551
  var LeftCheckboxWithLabel = function LeftCheckboxWithLabel(props) {
9552
+ var _props$spanProps2;
9553
+
9548
9554
  var style = useMemo(function () {
9549
9555
  var _props$spanProps;
9550
9556
 
@@ -9564,25 +9570,28 @@ var LeftCheckboxWithLabel = function LeftCheckboxWithLabel(props) {
9564
9570
  }, [props.anchorLabelToCheckbox, props.disabled, props.justifyContent, props.removeUserSelect, props.spanProps]);
9565
9571
  return React.createElement("div", {
9566
9572
  className: rootClassName$1w
9567
- }, React.createElement(Checkbox, {
9573
+ }, React.createElement("span", {
9574
+ className: rootClassName$1w + "-checkbox-wrapper",
9568
9575
  "tooltip-position": props['tooltip-position'],
9569
- "tooltip-text": props['tooltip-text'],
9576
+ "tooltip-text": props['tooltip-text']
9577
+ }, React.createElement(Checkbox, {
9570
9578
  value: props.value,
9571
9579
  disabled: props.disabled,
9572
9580
  onChange: props.onChange,
9573
9581
  theme: props.theme
9574
- }), typeof props.label === 'string' ? React.createElement("span", Object.assign({}, props.spanProps, {
9582
+ })), React.createElement("span", Object.assign({}, props.spanProps, {
9583
+ className: getMergedClassNames([rootClassName$1w + "-label-wrapper", ((_props$spanProps2 = props.spanProps) === null || _props$spanProps2 === void 0 ? void 0 : _props$spanProps2.className) || '']),
9575
9584
  style: style,
9576
9585
  onClick: function onClick(evt) {
9577
- var _props$spanProps2;
9586
+ var _props$spanProps3;
9578
9587
 
9579
9588
  if (props.anchorLabelToCheckbox) {
9580
9589
  props.onChange(!props.value);
9581
9590
  }
9582
9591
 
9583
- (_props$spanProps2 = props.spanProps) === null || _props$spanProps2 === void 0 ? void 0 : _props$spanProps2.onClick(evt);
9592
+ (_props$spanProps3 = props.spanProps) === null || _props$spanProps3 === void 0 ? void 0 : _props$spanProps3.onClick(evt);
9584
9593
  }
9585
- }), props.label) : props.label);
9594
+ }), props.label));
9586
9595
  };
9587
9596
 
9588
9597
  var rootClassName$1x = 'component-table';
@@ -9836,7 +9845,7 @@ function TableWithOverflow(props) {
9836
9845
  body();
9837
9846
  midWith();
9838
9847
  }, [props.lines, props.columns]);
9839
- useLayoutEffect(function () {
9848
+ useEffect(function () {
9840
9849
  var func = function func() {
9841
9850
  attWidth();
9842
9851
  header();
@@ -9849,7 +9858,7 @@ function TableWithOverflow(props) {
9849
9858
  window.removeEventListener('resize', func);
9850
9859
  };
9851
9860
  }, []);
9852
- useLayoutEffect(function () {
9861
+ useEffect(function () {
9853
9862
  var element = document.querySelector("#" + id + " ." + rootClassName$1A + "-table ." + rootClassName$1A + "-mid");
9854
9863
  var pos = {
9855
9864
  left: 0,
@@ -9909,7 +9918,9 @@ function TableWithOverflow(props) {
9909
9918
  var column = Array.from(props.columns).find(function (c) {
9910
9919
  return c.key === cell[0];
9911
9920
  });
9912
- return (column === null || column === void 0 ? void 0 : column.key) === 'actions' ? React.createElement("td", null) : React.createElement("td", Object.assign({
9921
+ return (column === null || column === void 0 ? void 0 : column.key) === 'actions' ? React.createElement("td", {
9922
+ key: fakeId + "-actions"
9923
+ }) : React.createElement("td", Object.assign({
9913
9924
  key: cell[1].key ? cell[1].key : valueIndex
9914
9925
  }, column === null || column === void 0 ? void 0 : column.props, cell[1].props), cell[1]);
9915
9926
  }), React.createElement("td", null));