plataforma-fundacao-componentes 2.22.19 → 2.22.22
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 +56 -45
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +56 -45
- 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,51 @@ function TableWithOverflow(props) {
|
|
|
9973
9974
|
return prev + n;
|
|
9974
9975
|
}, 8) + "px" : '8px';
|
|
9975
9976
|
}, [props.columns, atLeastOneStaticColumn]);
|
|
9977
|
+
var columnsHeader = React.useMemo(function () {
|
|
9978
|
+
var _props$columns;
|
|
9979
|
+
|
|
9980
|
+
return (_props$columns = props.columns) === null || _props$columns === void 0 ? void 0 : _props$columns.map(function (column) {
|
|
9981
|
+
var _column$props;
|
|
9982
|
+
|
|
9983
|
+
var absoluteObj = atLeastOneStaticColumn && column.absolute ? column.absolute : {};
|
|
9984
|
+
return React__default.createElement("th", Object.assign({
|
|
9985
|
+
key: "header-" + column.key + "-" + atLeastOneStaticColumn,
|
|
9986
|
+
"data-draggable": atLeastOneStaticColumn && !Boolean(column.absolute)
|
|
9987
|
+
}, column.props, {
|
|
9988
|
+
style: _extends({}, (_column$props = column.props) === null || _column$props === void 0 ? void 0 : _column$props.style, absoluteObj),
|
|
9989
|
+
className: getMergedClassNames([column.key + "-cell", atLeastOneStaticColumn && column.absolute ? 'absolute' : ''])
|
|
9990
|
+
}), column.value);
|
|
9991
|
+
});
|
|
9992
|
+
}, [props.columns, atLeastOneStaticColumn]);
|
|
9993
|
+
var lines = React.useMemo(function () {
|
|
9994
|
+
var _props$lines;
|
|
9995
|
+
|
|
9996
|
+
return (_props$lines = props.lines) === null || _props$lines === void 0 ? void 0 : _props$lines.map(function (line, lineIndex) {
|
|
9997
|
+
var _props$columns2;
|
|
9998
|
+
|
|
9999
|
+
var k = line.key ? line.key : lineIndex;
|
|
10000
|
+
return React__default.createElement("tr", {
|
|
10001
|
+
key: k,
|
|
10002
|
+
"aria-disabled": line.disabled || false
|
|
10003
|
+
}, React__default.createElement("td", {
|
|
10004
|
+
"data-draggable": false,
|
|
10005
|
+
className: 'absolute left-0'
|
|
10006
|
+
}), (_props$columns2 = props.columns) === null || _props$columns2 === void 0 ? void 0 : _props$columns2.map(function (column) {
|
|
10007
|
+
var _column$props2, _column$props3;
|
|
10008
|
+
|
|
10009
|
+
var absoluteObj = atLeastOneStaticColumn && column.absolute ? column.absolute : {};
|
|
10010
|
+
return React__default.createElement("td", Object.assign({
|
|
10011
|
+
"data-draggable": atLeastOneStaticColumn && !Boolean(column.absolute),
|
|
10012
|
+
key: k + "-" + column.key + "-" + atLeastOneStaticColumn
|
|
10013
|
+
}, column.props, {
|
|
10014
|
+
style: _extends({}, (_column$props2 = column.props) === null || _column$props2 === void 0 ? void 0 : _column$props2.style, absoluteObj),
|
|
10015
|
+
className: getMergedClassNames([(_column$props3 = column.props) === null || _column$props3 === void 0 ? void 0 : _column$props3.className, column.key + "-cell", atLeastOneStaticColumn && column.absolute ? 'absolute' : ''])
|
|
10016
|
+
}), line[column.key]);
|
|
10017
|
+
}), React__default.createElement("td", {
|
|
10018
|
+
className: 'absolute right-0'
|
|
10019
|
+
}));
|
|
10020
|
+
});
|
|
10021
|
+
}, [props.columns, props.lines, atLeastOneStaticColumn]);
|
|
9976
10022
|
return React__default.createElement("div", {
|
|
9977
10023
|
className: rootClassName$1B
|
|
9978
10024
|
}, props.upperHeader ? React__default.createElement("div", {
|
|
@@ -10000,44 +10046,9 @@ function TableWithOverflow(props) {
|
|
|
10000
10046
|
ref: outerTableRef
|
|
10001
10047
|
}, React__default.createElement("table", null, React__default.createElement("thead", null, React__default.createElement("tr", null, React__default.createElement("th", {
|
|
10002
10048
|
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", {
|
|
10049
|
+
}), columnsHeader, React__default.createElement("th", {
|
|
10015
10050
|
className: 'absolute right-0'
|
|
10016
|
-
})), React__default.createElement("tr", null)), React__default.createElement("tbody", null,
|
|
10017
|
-
var _props$columns2;
|
|
10018
|
-
|
|
10019
|
-
var k = line.key ? line.key : lineIndex;
|
|
10020
|
-
return React__default.createElement("tr", {
|
|
10021
|
-
key: k,
|
|
10022
|
-
"aria-disabled": line.disabled || false
|
|
10023
|
-
}, React__default.createElement("td", {
|
|
10024
|
-
"data-draggable": false,
|
|
10025
|
-
className: 'absolute left-0'
|
|
10026
|
-
}), (_props$columns2 = props.columns) === null || _props$columns2 === void 0 ? void 0 : _props$columns2.map(function (column) {
|
|
10027
|
-
var _column$props2, _column$props3;
|
|
10028
|
-
|
|
10029
|
-
var absoluteObj = atLeastOneStaticColumn && column.absolute ? column.absolute : {};
|
|
10030
|
-
return React__default.createElement("td", Object.assign({
|
|
10031
|
-
"data-draggable": atLeastOneStaticColumn && !Boolean(column.absolute),
|
|
10032
|
-
key: k + "-" + column.key
|
|
10033
|
-
}, column.props, {
|
|
10034
|
-
style: _extends({}, (_column$props2 = column.props) === null || _column$props2 === void 0 ? void 0 : _column$props2.style, absoluteObj),
|
|
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
|
-
}), line[column.key]);
|
|
10037
|
-
}), React__default.createElement("td", {
|
|
10038
|
-
className: 'absolute right-0'
|
|
10039
|
-
}));
|
|
10040
|
-
})))), props.noResultMessage && !props.lines.length ? React__default.createElement("div", {
|
|
10051
|
+
})), React__default.createElement("tr", null)), React__default.createElement("tbody", null, lines))), props.noResultMessage && !props.lines.length ? React__default.createElement("div", {
|
|
10041
10052
|
className: rootClassName$1B + "-no-result"
|
|
10042
10053
|
}, props.noResultMessage) : undefined));
|
|
10043
10054
|
}
|
|
@@ -10635,7 +10646,7 @@ function TextEditorUrlCreator(props) {
|
|
|
10635
10646
|
onEnter: handleSubmit
|
|
10636
10647
|
})), /*#__PURE__*/React__default.createElement(Row$1, {
|
|
10637
10648
|
className: rootClassName$1U + "-new-tab-row"
|
|
10638
|
-
}, /*#__PURE__*/React__default.createElement(Checkbox, {
|
|
10649
|
+
}, /*#__PURE__*/React__default.createElement(Checkbox$1, {
|
|
10639
10650
|
value: newTab,
|
|
10640
10651
|
onChange: function onChange(value) {
|
|
10641
10652
|
return setNewTab(value);
|
|
@@ -11920,7 +11931,7 @@ exports.Card = Card;
|
|
|
11920
11931
|
exports.Carousel = Carousel;
|
|
11921
11932
|
exports.CarouselPersona = CarouselPersona$1;
|
|
11922
11933
|
exports.CarouselTouchFrendly = CarouselTouchFrendly$1;
|
|
11923
|
-
exports.Checkbox = Checkbox;
|
|
11934
|
+
exports.Checkbox = Checkbox$1;
|
|
11924
11935
|
exports.Col = Col$1;
|
|
11925
11936
|
exports.Collapse = Collapse$1;
|
|
11926
11937
|
exports.ConfirmModal = ConfirmModal;
|