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.
@@ -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 {
@@ -4,6 +4,7 @@ interface DatePickerProps {
4
4
  initialValue?: string;
5
5
  onChange?: (evt: any) => void;
6
6
  queryToAppend: string;
7
+ disabled?: boolean;
7
8
  language?: {
8
9
  daysOfWeek: string[];
9
10
  months: string[];
@@ -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 {};
package/dist/index.css CHANGED
@@ -3147,6 +3147,7 @@ h5 {
3147
3147
  width: 100%;
3148
3148
  position: relative;
3149
3149
  display: flex;
3150
+ flex-wrap: nowrap;
3150
3151
  align-items: center;
3151
3152
  border-width: 0 0 2px 0;
3152
3153
  border-style: solid;
@@ -3165,14 +3166,13 @@ h5 {
3165
3166
  .component-input .component-input-input-container .component-input-input:focus {
3166
3167
  outline: none; }
3167
3168
  .component-input .component-input-input-container::before {
3168
- content: "";
3169
+ content: '';
3169
3170
  transition: visibility 0.3s ease, opacity 0.3s ease;
3170
3171
  opacity: 0;
3171
3172
  visibility: hidden; }
3172
3173
  .component-input .component-input-input-container .component-input-right-object {
3173
- position: absolute;
3174
- right: 5px;
3175
- padding-bottom: 1px; }
3174
+ position: static;
3175
+ padding: 0 5px 1px 5px; }
3176
3176
  .component-input .component-input-input-container .component-input-right-object svg {
3177
3177
  width: 23px;
3178
3178
  height: 23px; }
@@ -3211,7 +3211,7 @@ h5 {
3211
3211
  color: #e60000 !important; }
3212
3212
 
3213
3213
  .component-input.component-input-loading .component-input-input-container::after {
3214
- content: "";
3214
+ content: '';
3215
3215
  height: 2px;
3216
3216
  width: 0;
3217
3217
  left: 0;
@@ -3283,7 +3283,7 @@ h5 {
3283
3283
  .component-input:not(.component-input-error):not(.force-focus):not(.component-input-disabled):not(.component-input-loading) .component-input-input-container:focus-within::before {
3284
3284
  opacity: 1;
3285
3285
  visibility: visible;
3286
- content: "";
3286
+ content: '';
3287
3287
  height: 2px;
3288
3288
  display: block;
3289
3289
  position: absolute;
@@ -3294,7 +3294,7 @@ h5 {
3294
3294
 
3295
3295
  .component-input:not(.component-input-error):not(.force-focus):not(.component-input-disabled):not(.component-input-loading) .component-input-input-container:not(:focus-within):not(.force-focus)::before {
3296
3296
  opacity: 0;
3297
- content: "";
3297
+ content: '';
3298
3298
  height: 2px;
3299
3299
  display: block;
3300
3300
  position: absolute;
@@ -3306,7 +3306,7 @@ h5 {
3306
3306
  .component-input:not(.component-input-error).force-focus .component-input-input-container::before {
3307
3307
  opacity: 1;
3308
3308
  visibility: visible;
3309
- content: "";
3309
+ content: '';
3310
3310
  height: 2px;
3311
3311
  display: block;
3312
3312
  position: absolute;
@@ -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); }
@@ -10913,6 +10923,7 @@ h5 {
10913
10923
  width: 100%;
10914
10924
  position: relative;
10915
10925
  display: flex;
10926
+ flex-wrap: nowrap;
10916
10927
  align-items: center;
10917
10928
  border-width: 0 0 2px 0;
10918
10929
  border-style: solid;
@@ -10932,13 +10943,16 @@ h5 {
10932
10943
  .component-input-area .component-input-area-input-container .component-input-area-input-area:focus {
10933
10944
  outline: none; }
10934
10945
  .component-input-area .component-input-area-input-container::before {
10935
- content: "";
10946
+ content: '';
10936
10947
  transition: visibility 0.3s ease, opacity 0.3s ease;
10937
10948
  opacity: 0;
10938
10949
  visibility: hidden; }
10939
10950
  .component-input-area .component-input-area-input-container .component-input-area-right-object {
10940
- position: absolute;
10941
- right: 5px; }
10951
+ position: static;
10952
+ padding: 0 5px 1px; }
10953
+ .component-input-area .component-input-area-input-container .component-input-area-right-object svg {
10954
+ width: 23px;
10955
+ height: 23px; }
10942
10956
  .component-input-area .component-input-area-helper-and-counter {
10943
10957
  position: relative;
10944
10958
  display: flex;
@@ -10974,7 +10988,7 @@ h5 {
10974
10988
  color: #e60000 !important; }
10975
10989
 
10976
10990
  .component-input-area.component-input-area-loading .component-input-area-input-container::after {
10977
- content: "";
10991
+ content: '';
10978
10992
  height: 2px;
10979
10993
  width: 0;
10980
10994
  left: 0;
@@ -11046,7 +11060,7 @@ h5 {
11046
11060
  .component-input-area:not(.component-input-area-error):not(.force-focus):not(.component-input-area-disabled):not(.component-input-area-loading) .component-input-area-input-container:focus-within::before {
11047
11061
  opacity: 1;
11048
11062
  visibility: visible;
11049
- content: "";
11063
+ content: '';
11050
11064
  height: 2px;
11051
11065
  display: block;
11052
11066
  position: absolute;
@@ -11057,7 +11071,7 @@ h5 {
11057
11071
 
11058
11072
  .component-input-area:not(.component-input-area-error):not(.force-focus):not(.component-input-area-disabled):not(.component-input-area-loading) .component-input-area-input-container:not(:focus-within):not(.force-focus)::before {
11059
11073
  opacity: 0;
11060
- content: "";
11074
+ content: '';
11061
11075
  height: 2px;
11062
11076
  display: block;
11063
11077
  position: absolute;
@@ -11069,7 +11083,7 @@ h5 {
11069
11083
  .component-input-area:not(.component-input-area-error).force-focus .component-input-area-input-container::before {
11070
11084
  opacity: 1;
11071
11085
  visibility: visible;
11072
- content: "";
11086
+ content: '';
11073
11087
  height: 2px;
11074
11088
  display: block;
11075
11089
  position: absolute;
@@ -12286,6 +12300,8 @@ h5 {
12286
12300
  flex-flow: column;
12287
12301
  overflow-y: overlay;
12288
12302
  padding: 24px; }
12303
+ .component-modal .component-modal-content.compense {
12304
+ padding: calc(24px - var(--colPadding)); }
12289
12305
  .component-modal .component-modal-footer {
12290
12306
  display: flex;
12291
12307
  justify-content: flex-end;
@@ -14379,7 +14395,11 @@ h5 {
14379
14395
  display: flex;
14380
14396
  align-items: center;
14381
14397
  width: 100%; }
14382
- .component-table-left-checkbox-with-label span {
14398
+ .component-table-left-checkbox-with-label .component-table-left-checkbox-with-label-checkbox-wrapper {
14399
+ display: flex;
14400
+ align-items: center;
14401
+ justify-content: center; }
14402
+ .component-table-left-checkbox-with-label .component-table-left-checkbox-with-label-label-wrapper {
14383
14403
  display: flex;
14384
14404
  align-items: center;
14385
14405
  margin-left: 8px;
@@ -14515,7 +14535,7 @@ table.component-table {
14515
14535
  padding: 8px;
14516
14536
  border-collapse: collapse; }
14517
14537
  table.component-table * {
14518
- font-family: "Nunito", sans-serif; }
14538
+ font-family: "Nunito", sans-serif !important; }
14519
14539
  table.component-table thead tr th {
14520
14540
  background-color: #fefefe;
14521
14541
  font-weight: 800;
@@ -15061,7 +15081,7 @@ h5 {
15061
15081
  position: relative;
15062
15082
  width: 100%; }
15063
15083
  .component-table-with-overflow * {
15064
- font-family: "Nunito", sans-serif; }
15084
+ font-family: "Nunito", sans-serif !important; }
15065
15085
  .component-table-with-overflow .component-table-with-overflow-outer-table {
15066
15086
  width: 100%;
15067
15087
  overflow-x: auto; }
package/dist/index.js CHANGED
@@ -39,7 +39,7 @@ var ChevronArrowDownIcon = function ChevronArrowDownIcon() {
39
39
 
40
40
  var getMergedClassNames = function getMergedClassNames(arr) {
41
41
  return arr.filter(function (el) {
42
- return el !== '';
42
+ return Boolean(el);
43
43
  }).join(' ');
44
44
  };
45
45
  var getUniqueKey = function getUniqueKey() {
@@ -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;
@@ -3956,6 +3956,8 @@ function Col(props) {
3956
3956
  delete rp.end;
3957
3957
  delete rp.cols;
3958
3958
  delete rp.children;
3959
+ delete rp.buttonActionsCol;
3960
+ delete rp.noPaddingTop;
3959
3961
  return rp;
3960
3962
  }, [props]);
3961
3963
  return React__default.createElement("div", Object.assign({}, p), props.children);
@@ -4294,6 +4296,7 @@ function DatePicker(props) {
4294
4296
  return React__default.createElement("div", {
4295
4297
  className: rootClassName$P
4296
4298
  }, props.initialValue ? React__default.createElement(IconButton$1, {
4299
+ disabled: props.disabled,
4297
4300
  className: rootClassName$P + "-clear-button",
4298
4301
  icon: React__default.createElement(CloseIcon, null),
4299
4302
  onClick: function onClick() {
@@ -8416,7 +8419,7 @@ function Modal(props) {
8416
8419
  var filteredProps = React.useMemo(function () {
8417
8420
  var p = _extends({}, props, {
8418
8421
  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()])
8422
+ className: getMergedClassNames([props.className || '', rootClassName$1k, props.mobileOnXS ? 'mobile-on-xs' : '', rootClassName$1k + "-" + String(props.size).toLowerCase()])
8420
8423
  });
8421
8424
 
8422
8425
  delete p.footer;
@@ -8428,6 +8431,7 @@ function Modal(props) {
8428
8431
  delete p.mobileOnXS;
8429
8432
  delete p.preventEscExit;
8430
8433
  delete p.preventMaskExit;
8434
+ delete p.compenseColPaddingContent;
8431
8435
  delete p.modalKey;
8432
8436
  return p;
8433
8437
  }, [props]);
@@ -8459,7 +8463,7 @@ function Modal(props) {
8459
8463
  onClick: handleClose,
8460
8464
  icon: React__default.createElement(CloseIcon, null)
8461
8465
  }))), React__default.createElement("div", {
8462
- className: rootClassName$1k + "-content"
8466
+ className: getMergedClassNames([rootClassName$1k + "-content", props.compenseColPaddingContent ? 'compense' : ''])
8463
8467
  }, props.children), props.footer ? React__default.createElement("div", {
8464
8468
  className: rootClassName$1k + "-footer"
8465
8469
  }, footer) : undefined);
@@ -9526,6 +9530,8 @@ ActionsColumn.defaultProps = {
9526
9530
 
9527
9531
  var rootClassName$1w = 'component-table-left-checkbox-with-label';
9528
9532
  var LeftCheckboxWithLabel = function LeftCheckboxWithLabel(props) {
9533
+ var _props$spanProps2;
9534
+
9529
9535
  var style = React.useMemo(function () {
9530
9536
  var _props$spanProps;
9531
9537
 
@@ -9545,25 +9551,28 @@ var LeftCheckboxWithLabel = function LeftCheckboxWithLabel(props) {
9545
9551
  }, [props.anchorLabelToCheckbox, props.disabled, props.justifyContent, props.removeUserSelect, props.spanProps]);
9546
9552
  return React__default.createElement("div", {
9547
9553
  className: rootClassName$1w
9548
- }, React__default.createElement(Checkbox, {
9554
+ }, React__default.createElement("span", {
9555
+ className: rootClassName$1w + "-checkbox-wrapper",
9549
9556
  "tooltip-position": props['tooltip-position'],
9550
- "tooltip-text": props['tooltip-text'],
9557
+ "tooltip-text": props['tooltip-text']
9558
+ }, React__default.createElement(Checkbox, {
9551
9559
  value: props.value,
9552
9560
  disabled: props.disabled,
9553
9561
  onChange: props.onChange,
9554
9562
  theme: props.theme
9555
- }), typeof props.label === 'string' ? React__default.createElement("span", Object.assign({}, props.spanProps, {
9563
+ })), React__default.createElement("span", Object.assign({}, props.spanProps, {
9564
+ className: getMergedClassNames([rootClassName$1w + "-label-wrapper", ((_props$spanProps2 = props.spanProps) === null || _props$spanProps2 === void 0 ? void 0 : _props$spanProps2.className) || '']),
9556
9565
  style: style,
9557
9566
  onClick: function onClick(evt) {
9558
- var _props$spanProps2;
9567
+ var _props$spanProps3;
9559
9568
 
9560
9569
  if (props.anchorLabelToCheckbox) {
9561
9570
  props.onChange(!props.value);
9562
9571
  }
9563
9572
 
9564
- (_props$spanProps2 = props.spanProps) === null || _props$spanProps2 === void 0 ? void 0 : _props$spanProps2.onClick(evt);
9573
+ (_props$spanProps3 = props.spanProps) === null || _props$spanProps3 === void 0 ? void 0 : _props$spanProps3.onClick(evt);
9565
9574
  }
9566
- }), props.label) : props.label);
9575
+ }), props.label));
9567
9576
  };
9568
9577
 
9569
9578
  var rootClassName$1x = 'component-table';
@@ -9817,7 +9826,7 @@ function TableWithOverflow(props) {
9817
9826
  body();
9818
9827
  midWith();
9819
9828
  }, [props.lines, props.columns]);
9820
- React.useLayoutEffect(function () {
9829
+ React.useEffect(function () {
9821
9830
  var func = function func() {
9822
9831
  attWidth();
9823
9832
  header();
@@ -9830,7 +9839,7 @@ function TableWithOverflow(props) {
9830
9839
  window.removeEventListener('resize', func);
9831
9840
  };
9832
9841
  }, []);
9833
- React.useLayoutEffect(function () {
9842
+ React.useEffect(function () {
9834
9843
  var element = document.querySelector("#" + id + " ." + rootClassName$1A + "-table ." + rootClassName$1A + "-mid");
9835
9844
  var pos = {
9836
9845
  left: 0,
@@ -9890,7 +9899,9 @@ function TableWithOverflow(props) {
9890
9899
  var column = Array.from(props.columns).find(function (c) {
9891
9900
  return c.key === cell[0];
9892
9901
  });
9893
- return (column === null || column === void 0 ? void 0 : column.key) === 'actions' ? React__default.createElement("td", null) : React__default.createElement("td", Object.assign({
9902
+ return (column === null || column === void 0 ? void 0 : column.key) === 'actions' ? React__default.createElement("td", {
9903
+ key: fakeId + "-actions"
9904
+ }) : React__default.createElement("td", Object.assign({
9894
9905
  key: cell[1].key ? cell[1].key : valueIndex
9895
9906
  }, column === null || column === void 0 ? void 0 : column.props, cell[1].props), cell[1]);
9896
9907
  }), React__default.createElement("td", null));