plataforma-fundacao-componentes 2.22.18 → 2.22.21
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.
- package/dist/components/checkbox/Checkbox.d.ts +2 -1
- package/dist/index.js +59 -44
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +59 -44
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1335,6 +1335,7 @@ var TrashIcon = function TrashIcon() {
|
|
|
1335
1335
|
})(exports.CheckboxThemes || (exports.CheckboxThemes = {}));
|
|
1336
1336
|
|
|
1337
1337
|
var rootClassName$s = 'component-checkbox';
|
|
1338
|
+
|
|
1338
1339
|
function Checkbox(props) {
|
|
1339
1340
|
var fProps = React.useMemo(function () {
|
|
1340
1341
|
var handleClick = function handleClick(evt) {
|
|
@@ -1363,12 +1364,14 @@ function Checkbox(props) {
|
|
|
1363
1364
|
|
|
1364
1365
|
return React__default.createElement("button", Object.assign({}, fProps));
|
|
1365
1366
|
}
|
|
1367
|
+
|
|
1366
1368
|
Checkbox.defaultProps = {
|
|
1367
1369
|
disabled: false,
|
|
1368
1370
|
value: false,
|
|
1369
1371
|
theme: 'primary',
|
|
1370
1372
|
onChange: function onChange() {}
|
|
1371
1373
|
};
|
|
1374
|
+
var Checkbox$1 = React.memo(Checkbox);
|
|
1372
1375
|
|
|
1373
1376
|
var rootClassName$t = 'component-bloco-de-notas';
|
|
1374
1377
|
function BlocoDeNotas(props) {
|
|
@@ -1404,7 +1407,7 @@ function BlocoDeNotas(props) {
|
|
|
1404
1407
|
className: rootClassName$t + "-left-content"
|
|
1405
1408
|
}, React__default.createElement("div", {
|
|
1406
1409
|
className: rootClassName$t + "-checkbox"
|
|
1407
|
-
}, React__default.createElement(Checkbox, {
|
|
1410
|
+
}, React__default.createElement(Checkbox$1, {
|
|
1408
1411
|
disabled: props.loading || !props.notas || !props.notas.length,
|
|
1409
1412
|
theme: exports.CheckboxThemes.Blue,
|
|
1410
1413
|
value: Boolean(props.notas && props.notas.length && props.notas.length === props.selected.length),
|
|
@@ -1472,7 +1475,7 @@ function BlocoDeNotas(props) {
|
|
|
1472
1475
|
className: rootClassName$t + "-nota-left-content"
|
|
1473
1476
|
}, React__default.createElement("div", {
|
|
1474
1477
|
className: rootClassName$t + "-checkbox"
|
|
1475
|
-
}, React__default.createElement(Checkbox, {
|
|
1478
|
+
}, React__default.createElement(Checkbox$1, {
|
|
1476
1479
|
theme: exports.CheckboxThemes.Blue,
|
|
1477
1480
|
value: nota.id ? props.selected.indexOf(nota.id) > -1 : false,
|
|
1478
1481
|
onChange: function onChange(evt) {
|
|
@@ -9245,7 +9248,7 @@ function Select(props) {
|
|
|
9245
9248
|
}
|
|
9246
9249
|
},
|
|
9247
9250
|
onClick: handleChange
|
|
9248
|
-
}, React__default.createElement(Checkbox, {
|
|
9251
|
+
}, React__default.createElement(Checkbox$1, {
|
|
9249
9252
|
value: checked,
|
|
9250
9253
|
disabled: props.readOnly,
|
|
9251
9254
|
onChange: function onChange() {
|
|
@@ -9568,7 +9571,7 @@ var LeftCheckboxWithLabel = function LeftCheckboxWithLabel(props) {
|
|
|
9568
9571
|
className: rootClassName$1w + "-checkbox-wrapper",
|
|
9569
9572
|
"tooltip-position": props['tooltip-position'],
|
|
9570
9573
|
"tooltip-text": props['tooltip-text']
|
|
9571
|
-
}, React__default.createElement(Checkbox, {
|
|
9574
|
+
}, React__default.createElement(Checkbox$1, {
|
|
9572
9575
|
value: props.value,
|
|
9573
9576
|
disabled: props.disabled,
|
|
9574
9577
|
onChange: props.onChange,
|
|
@@ -9922,8 +9925,6 @@ var TableUpperHeader$1 = React.memo(TableUpperHeader);
|
|
|
9922
9925
|
var rootClassName$1B = 'component-table-with-overflow';
|
|
9923
9926
|
|
|
9924
9927
|
function TableWithOverflow(props) {
|
|
9925
|
-
var _props$columns, _props$lines;
|
|
9926
|
-
|
|
9927
9928
|
var mediaQuery = useScreenSize();
|
|
9928
9929
|
var wrapperClassName = React.useMemo(function () {
|
|
9929
9930
|
return getMergedClassNames([rootClassName$1B + "-wrapper", props.upperHeader ? 'has-upper-header' : '', props.noResultMessage && !props.lines.length ? 'no-result' : '', 'left-columns-padding']);
|
|
@@ -9973,6 +9974,54 @@ function TableWithOverflow(props) {
|
|
|
9973
9974
|
return prev + n;
|
|
9974
9975
|
}, 8) + "px" : '8px';
|
|
9975
9976
|
}, [props.columns, atLeastOneStaticColumn]);
|
|
9977
|
+
var renderLinesKey = React.useMemo(function () {
|
|
9978
|
+
return getUniqueKey();
|
|
9979
|
+
}, [props.lines]);
|
|
9980
|
+
var columnsHeader = React.useMemo(function () {
|
|
9981
|
+
var _props$columns;
|
|
9982
|
+
|
|
9983
|
+
return (_props$columns = props.columns) === null || _props$columns === void 0 ? void 0 : _props$columns.map(function (column) {
|
|
9984
|
+
var _column$props;
|
|
9985
|
+
|
|
9986
|
+
var absoluteObj = atLeastOneStaticColumn && column.absolute ? column.absolute : {};
|
|
9987
|
+
return React__default.createElement("th", Object.assign({
|
|
9988
|
+
key: "header-" + column.key,
|
|
9989
|
+
"data-draggable": atLeastOneStaticColumn && !Boolean(column.absolute)
|
|
9990
|
+
}, column.props, {
|
|
9991
|
+
style: _extends({}, (_column$props = column.props) === null || _column$props === void 0 ? void 0 : _column$props.style, absoluteObj),
|
|
9992
|
+
className: getMergedClassNames([column.key + "-cell", atLeastOneStaticColumn && column.absolute ? 'absolute' : ''])
|
|
9993
|
+
}), column.value);
|
|
9994
|
+
});
|
|
9995
|
+
}, [props.columns, renderLinesKey]);
|
|
9996
|
+
var lines = React.useMemo(function () {
|
|
9997
|
+
var _props$lines;
|
|
9998
|
+
|
|
9999
|
+
return (_props$lines = props.lines) === null || _props$lines === void 0 ? void 0 : _props$lines.map(function (line, lineIndex) {
|
|
10000
|
+
var _props$columns2;
|
|
10001
|
+
|
|
10002
|
+
var k = line.key ? line.key : lineIndex;
|
|
10003
|
+
return React__default.createElement("tr", {
|
|
10004
|
+
key: k,
|
|
10005
|
+
"aria-disabled": line.disabled || false
|
|
10006
|
+
}, React__default.createElement("td", {
|
|
10007
|
+
"data-draggable": false,
|
|
10008
|
+
className: 'absolute left-0'
|
|
10009
|
+
}), (_props$columns2 = props.columns) === null || _props$columns2 === void 0 ? void 0 : _props$columns2.map(function (column) {
|
|
10010
|
+
var _column$props2, _column$props3;
|
|
10011
|
+
|
|
10012
|
+
var absoluteObj = atLeastOneStaticColumn && column.absolute ? column.absolute : {};
|
|
10013
|
+
return React__default.createElement("td", Object.assign({
|
|
10014
|
+
"data-draggable": atLeastOneStaticColumn && !Boolean(column.absolute),
|
|
10015
|
+
key: k + "-" + column.key + (column.absolute ? '' : renderLinesKey)
|
|
10016
|
+
}, column.props, {
|
|
10017
|
+
style: _extends({}, (_column$props2 = column.props) === null || _column$props2 === void 0 ? void 0 : _column$props2.style, absoluteObj),
|
|
10018
|
+
className: getMergedClassNames([(_column$props3 = column.props) === null || _column$props3 === void 0 ? void 0 : _column$props3.className, column.key + "-cell", atLeastOneStaticColumn && column.absolute ? 'absolute' : ''])
|
|
10019
|
+
}), line[column.key]);
|
|
10020
|
+
}), React__default.createElement("td", {
|
|
10021
|
+
className: 'absolute right-0'
|
|
10022
|
+
}));
|
|
10023
|
+
});
|
|
10024
|
+
}, [props.lines, renderLinesKey]);
|
|
9976
10025
|
return React__default.createElement("div", {
|
|
9977
10026
|
className: rootClassName$1B
|
|
9978
10027
|
}, props.upperHeader ? React__default.createElement("div", {
|
|
@@ -10000,43 +10049,9 @@ function TableWithOverflow(props) {
|
|
|
10000
10049
|
ref: outerTableRef
|
|
10001
10050
|
}, React__default.createElement("table", null, React__default.createElement("thead", null, React__default.createElement("tr", null, React__default.createElement("th", {
|
|
10002
10051
|
className: 'absolute left-0'
|
|
10003
|
-
}),
|
|
10004
|
-
var _column$props;
|
|
10005
|
-
|
|
10006
|
-
var absoluteObj = atLeastOneStaticColumn && column.absolute ? column.absolute : {};
|
|
10007
|
-
return React__default.createElement("th", Object.assign({
|
|
10008
|
-
key: "header-" + column.key,
|
|
10009
|
-
"data-draggable": atLeastOneStaticColumn && !Boolean(column.absolute)
|
|
10010
|
-
}, column.props, {
|
|
10011
|
-
style: _extends({}, (_column$props = column.props) === null || _column$props === void 0 ? void 0 : _column$props.style, absoluteObj),
|
|
10012
|
-
className: getMergedClassNames([column.key + "-cell", atLeastOneStaticColumn && column.absolute ? 'absolute' : ''])
|
|
10013
|
-
}), column.value);
|
|
10014
|
-
}), React__default.createElement("th", {
|
|
10052
|
+
}), columnsHeader, React__default.createElement("th", {
|
|
10015
10053
|
className: 'absolute right-0'
|
|
10016
|
-
})), React__default.createElement("tr", null)), React__default.createElement("tbody", null,
|
|
10017
|
-
var _props$columns2;
|
|
10018
|
-
|
|
10019
|
-
return React__default.createElement("tr", {
|
|
10020
|
-
key: lineIndex,
|
|
10021
|
-
"aria-disabled": line.disabled || false
|
|
10022
|
-
}, React__default.createElement("td", {
|
|
10023
|
-
"data-draggable": false,
|
|
10024
|
-
className: 'absolute left-0'
|
|
10025
|
-
}), (_props$columns2 = props.columns) === null || _props$columns2 === void 0 ? void 0 : _props$columns2.map(function (column) {
|
|
10026
|
-
var _column$props2, _column$props3;
|
|
10027
|
-
|
|
10028
|
-
var absoluteObj = atLeastOneStaticColumn && column.absolute ? column.absolute : {};
|
|
10029
|
-
return React__default.createElement("td", Object.assign({
|
|
10030
|
-
"data-draggable": atLeastOneStaticColumn && !Boolean(column.absolute),
|
|
10031
|
-
key: lineIndex + "-" + column.key
|
|
10032
|
-
}, column.props, {
|
|
10033
|
-
style: _extends({}, (_column$props2 = column.props) === null || _column$props2 === void 0 ? void 0 : _column$props2.style, absoluteObj),
|
|
10034
|
-
className: getMergedClassNames([(_column$props3 = column.props) === null || _column$props3 === void 0 ? void 0 : _column$props3.className, column.key + "-cell", atLeastOneStaticColumn && column.absolute ? 'absolute' : ''])
|
|
10035
|
-
}), line[column.key]);
|
|
10036
|
-
}), React__default.createElement("td", {
|
|
10037
|
-
className: 'absolute right-0'
|
|
10038
|
-
}));
|
|
10039
|
-
})))), props.noResultMessage && !props.lines.length ? React__default.createElement("div", {
|
|
10054
|
+
})), React__default.createElement("tr", null)), React__default.createElement("tbody", null, lines))), props.noResultMessage && !props.lines.length ? React__default.createElement("div", {
|
|
10040
10055
|
className: rootClassName$1B + "-no-result"
|
|
10041
10056
|
}, props.noResultMessage) : undefined));
|
|
10042
10057
|
}
|
|
@@ -10634,7 +10649,7 @@ function TextEditorUrlCreator(props) {
|
|
|
10634
10649
|
onEnter: handleSubmit
|
|
10635
10650
|
})), /*#__PURE__*/React__default.createElement(Row$1, {
|
|
10636
10651
|
className: rootClassName$1U + "-new-tab-row"
|
|
10637
|
-
}, /*#__PURE__*/React__default.createElement(Checkbox, {
|
|
10652
|
+
}, /*#__PURE__*/React__default.createElement(Checkbox$1, {
|
|
10638
10653
|
value: newTab,
|
|
10639
10654
|
onChange: function onChange(value) {
|
|
10640
10655
|
return setNewTab(value);
|
|
@@ -11919,7 +11934,7 @@ exports.Card = Card;
|
|
|
11919
11934
|
exports.Carousel = Carousel;
|
|
11920
11935
|
exports.CarouselPersona = CarouselPersona$1;
|
|
11921
11936
|
exports.CarouselTouchFrendly = CarouselTouchFrendly$1;
|
|
11922
|
-
exports.Checkbox = Checkbox;
|
|
11937
|
+
exports.Checkbox = Checkbox$1;
|
|
11923
11938
|
exports.Col = Col$1;
|
|
11924
11939
|
exports.Collapse = Collapse$1;
|
|
11925
11940
|
exports.ConfirmModal = ConfirmModal;
|