plataforma-fundacao-componentes 2.23.7 → 2.23.8
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/dropdownItem/DropdownItem.d.ts +1 -0
- package/dist/index.css +49 -13
- package/dist/index.js +26 -12
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +26 -12
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
|
@@ -7,6 +7,7 @@ interface DropdownItemProps {
|
|
|
7
7
|
disabled?: boolean;
|
|
8
8
|
onClick?: (event?: any) => void;
|
|
9
9
|
alignRight?: boolean;
|
|
10
|
+
loading?: boolean;
|
|
10
11
|
}
|
|
11
12
|
declare function DropdownItem(props: DropdownItemProps): JSX.Element;
|
|
12
13
|
declare const _default: React.MemoExoticComponent<typeof DropdownItem>;
|
package/dist/index.css
CHANGED
|
@@ -8497,6 +8497,7 @@ h5 {
|
|
|
8497
8497
|
justify-content: flex-start;
|
|
8498
8498
|
border: none;
|
|
8499
8499
|
outline: none;
|
|
8500
|
+
position: relative;
|
|
8500
8501
|
transition: color 0.3s ease, background-color 0.3s ease; }
|
|
8501
8502
|
.component-dropdown-item:not(:disabled) {
|
|
8502
8503
|
cursor: pointer; }
|
|
@@ -8504,23 +8505,58 @@ h5 {
|
|
|
8504
8505
|
background-color: #f3f3f3; }
|
|
8505
8506
|
.component-dropdown-item:disabled {
|
|
8506
8507
|
color: #cdd3cd; }
|
|
8507
|
-
|
|
8508
|
-
|
|
8509
|
-
.component-dropdown-item .component-dropdown-item-
|
|
8508
|
+
.component-dropdown-item:disabled .component-dropdown-item-loader {
|
|
8509
|
+
color: #828a82; }
|
|
8510
|
+
.component-dropdown-item .component-dropdown-item-content {
|
|
8511
|
+
width: 100%;
|
|
8510
8512
|
display: flex;
|
|
8511
8513
|
align-items: center;
|
|
8512
|
-
|
|
8513
|
-
|
|
8514
|
-
|
|
8515
|
-
|
|
8516
|
-
|
|
8517
|
-
|
|
8518
|
-
|
|
8519
|
-
|
|
8520
|
-
|
|
8514
|
+
justify-content: flex-start; }
|
|
8515
|
+
.component-dropdown-item .component-dropdown-item-content .component-dropdown-item-label {
|
|
8516
|
+
font-size: 15px;
|
|
8517
|
+
vertical-align: middle;
|
|
8518
|
+
text-overflow: ellipsis;
|
|
8519
|
+
text-align: left; }
|
|
8520
|
+
.component-dropdown-item .component-dropdown-item-content .component-dropdown-item-icon {
|
|
8521
|
+
display: flex;
|
|
8522
|
+
align-items: center;
|
|
8523
|
+
margin-right: 10px;
|
|
8524
|
+
margin-left: unset; }
|
|
8525
|
+
.component-dropdown-item .component-dropdown-item-content .component-dropdown-item-icon svg {
|
|
8526
|
+
height: 20px;
|
|
8527
|
+
width: 20px; }
|
|
8528
|
+
.component-dropdown-item.right .component-dropdown-item-content,
|
|
8529
|
+
.component-dropdown-item.right .component-dropdown-item-loader {
|
|
8530
|
+
flex-direction: row-reverse; }
|
|
8531
|
+
.component-dropdown-item.right .component-dropdown-item-label {
|
|
8532
|
+
text-align: left; }
|
|
8533
|
+
.component-dropdown-item.right .component-dropdown-item-icon {
|
|
8534
|
+
margin-right: unset;
|
|
8535
|
+
margin-left: 10px; }
|
|
8536
|
+
.component-dropdown-item.loading .component-dropdown-item-content {
|
|
8537
|
+
overflow: hidden; }
|
|
8538
|
+
.component-dropdown-item .component-dropdown-item-loader {
|
|
8539
|
+
width: 30px;
|
|
8521
8540
|
display: flex;
|
|
8522
8541
|
align-items: center;
|
|
8523
|
-
|
|
8542
|
+
justify-content: flex-start;
|
|
8543
|
+
overflow: hidden;
|
|
8544
|
+
transition: width 0.3s ease, opacity 0.2s ease; }
|
|
8545
|
+
.component-dropdown-item .component-dropdown-item-loader svg {
|
|
8546
|
+
height: 20px;
|
|
8547
|
+
width: 20px; }
|
|
8548
|
+
.component-dropdown-item .component-dropdown-item-loader.component-dropdown-item-fade-enter {
|
|
8549
|
+
width: 0;
|
|
8550
|
+
opacity: 0; }
|
|
8551
|
+
.component-dropdown-item .component-dropdown-item-loader.component-dropdown-item-fade-enter-active {
|
|
8552
|
+
opacity: 1;
|
|
8553
|
+
width: 30px; }
|
|
8554
|
+
.component-dropdown-item .component-dropdown-item-loader.component-dropdown-item-fade-exit {
|
|
8555
|
+
opacity: 1;
|
|
8556
|
+
width: 30px; }
|
|
8557
|
+
.component-dropdown-item .component-dropdown-item-loader.component-dropdown-item-fade-exit-active {
|
|
8558
|
+
opacity: 0;
|
|
8559
|
+
width: 0px; }
|
|
8524
8560
|
|
|
8525
8561
|
@import url("https://fonts.googleapis.com/css2?family=Exo+2:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");
|
|
8526
8562
|
@import url("https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,200;0,300;0,400;0,600;0,700;0,800;0,900;1,200;1,300;1,400;1,600;1,700;1,800;1,900&display=swap");
|
package/dist/index.js
CHANGED
|
@@ -8533,21 +8533,30 @@ var rootClassName$27 = 'component-dropdown-item';
|
|
|
8533
8533
|
function DropdownItem(props) {
|
|
8534
8534
|
return React__default.createElement("button", {
|
|
8535
8535
|
id: props.id,
|
|
8536
|
-
disabled: props.disabled,
|
|
8536
|
+
disabled: props.disabled || props.loading,
|
|
8537
8537
|
"aria-disabled": props.disabled,
|
|
8538
|
-
className: getMergedClassNames([rootClassName$27, props.alignRight ? '
|
|
8538
|
+
className: getMergedClassNames([rootClassName$27, props.alignRight ? 'right' : '', props.loading ? 'loading' : '']),
|
|
8539
8539
|
onClick: function onClick(evt) {
|
|
8540
8540
|
if (typeof props.onClick === 'function' && !props.disabled) {
|
|
8541
8541
|
props.onClick(evt);
|
|
8542
8542
|
}
|
|
8543
8543
|
}
|
|
8544
|
-
},
|
|
8544
|
+
}, React__default.createElement("div", {
|
|
8545
|
+
className: rootClassName$27 + "-content"
|
|
8546
|
+
}, React__default.createElement(reactTransitionGroup.CSSTransition, {
|
|
8547
|
+
"in": props.loading,
|
|
8548
|
+
timeout: 300,
|
|
8549
|
+
unmountOnExit: true,
|
|
8550
|
+
classNames: rootClassName$27 + "-fade"
|
|
8551
|
+
}, React__default.createElement("div", {
|
|
8552
|
+
className: rootClassName$27 + "-loader"
|
|
8553
|
+
}, React__default.createElement(PercentLoaderIcon, {
|
|
8554
|
+
indefinido: true
|
|
8555
|
+
}))), props.icon ? React__default.createElement("div", {
|
|
8545
8556
|
className: rootClassName$27 + "-icon"
|
|
8546
8557
|
}, props.icon) : undefined, React__default.createElement("div", {
|
|
8547
8558
|
className: rootClassName$27 + "-label"
|
|
8548
|
-
}, props.label)
|
|
8549
|
-
className: rootClassName$27 + "-icon right"
|
|
8550
|
-
}, props.icon) : undefined);
|
|
8559
|
+
}, props.label)));
|
|
8551
8560
|
}
|
|
8552
8561
|
|
|
8553
8562
|
var DropdownItem$1 = React.memo(DropdownItem);
|
|
@@ -11492,6 +11501,11 @@ function TableWithOverflow(props) {
|
|
|
11492
11501
|
}
|
|
11493
11502
|
};
|
|
11494
11503
|
|
|
11504
|
+
var someAbsoluteColumn = React.useMemo(function () {
|
|
11505
|
+
return props.columns.some(function (c) {
|
|
11506
|
+
return c.absolute;
|
|
11507
|
+
});
|
|
11508
|
+
}, [props.columns]);
|
|
11495
11509
|
var atLeastOneStaticColumn = React.useMemo(function () {
|
|
11496
11510
|
return props.columns.some(function (c) {
|
|
11497
11511
|
return !c.absolute;
|
|
@@ -11521,14 +11535,14 @@ function TableWithOverflow(props) {
|
|
|
11521
11535
|
|
|
11522
11536
|
var absoluteObj = atLeastOneStaticColumn && column.absolute ? column.absolute : {};
|
|
11523
11537
|
return React__default.createElement("th", Object.assign({
|
|
11524
|
-
key: "header-" + column.key + "-" + atLeastOneStaticColumn,
|
|
11525
|
-
"data-draggable": atLeastOneStaticColumn && !Boolean(column.absolute)
|
|
11538
|
+
key: "header-" + column.key + "-" + atLeastOneStaticColumn + "-" + someAbsoluteColumn,
|
|
11539
|
+
"data-draggable": someAbsoluteColumn && atLeastOneStaticColumn && !Boolean(column.absolute)
|
|
11526
11540
|
}, column.props, {
|
|
11527
11541
|
style: _extends({}, (_column$props = column.props) === null || _column$props === void 0 ? void 0 : _column$props.style, absoluteObj),
|
|
11528
11542
|
className: getMergedClassNames([column.key + "-cell", atLeastOneStaticColumn && column.absolute ? 'absolute' : ''])
|
|
11529
11543
|
}), column.value);
|
|
11530
11544
|
});
|
|
11531
|
-
}, [props.columns, atLeastOneStaticColumn]);
|
|
11545
|
+
}, [props.columns, atLeastOneStaticColumn, someAbsoluteColumn]);
|
|
11532
11546
|
var lines = React.useMemo(function () {
|
|
11533
11547
|
var _props$lines;
|
|
11534
11548
|
|
|
@@ -11547,8 +11561,8 @@ function TableWithOverflow(props) {
|
|
|
11547
11561
|
|
|
11548
11562
|
var absoluteObj = atLeastOneStaticColumn && column.absolute ? column.absolute : {};
|
|
11549
11563
|
return React__default.createElement("td", Object.assign({
|
|
11550
|
-
"data-draggable": atLeastOneStaticColumn && !Boolean(column.absolute),
|
|
11551
|
-
key: k + "-" + column.key + "-" + atLeastOneStaticColumn
|
|
11564
|
+
"data-draggable": someAbsoluteColumn && atLeastOneStaticColumn && !Boolean(column.absolute),
|
|
11565
|
+
key: k + "-" + column.key + "-" + atLeastOneStaticColumn + "-" + someAbsoluteColumn
|
|
11552
11566
|
}, column.props, {
|
|
11553
11567
|
style: _extends({}, (_column$props2 = column.props) === null || _column$props2 === void 0 ? void 0 : _column$props2.style, absoluteObj),
|
|
11554
11568
|
className: getMergedClassNames([(_column$props3 = column.props) === null || _column$props3 === void 0 ? void 0 : _column$props3.className, column.key + "-cell", atLeastOneStaticColumn && column.absolute ? 'absolute' : ''])
|
|
@@ -11557,7 +11571,7 @@ function TableWithOverflow(props) {
|
|
|
11557
11571
|
className: 'absolute right-0'
|
|
11558
11572
|
}));
|
|
11559
11573
|
});
|
|
11560
|
-
}, [props.
|
|
11574
|
+
}, [props.lines, props.columns, atLeastOneStaticColumn, someAbsoluteColumn]);
|
|
11561
11575
|
return React__default.createElement("div", {
|
|
11562
11576
|
className: rootClassName$2H
|
|
11563
11577
|
}, props.upperHeader ? React__default.createElement("div", {
|