@deque/cauldron-react 5.0.0-canary.f1b65af4 → 5.0.0-canary.f2e189b3
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/lib/index.js +15 -5
- package/lib/propTypes.d.ts +6 -0
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -1916,7 +1916,7 @@ var IconButton = React.forwardRef(function (_a, ref) {
|
|
|
1916
1916
|
'IconButton--error': variant === 'error'
|
|
1917
1917
|
}), ref: internalRef, disabled: disabled, tabIndex: disabled ? -1 : tabIndex }, accessibilityProps, other),
|
|
1918
1918
|
React__default.createElement(Icon, { type: icon }),
|
|
1919
|
-
React__default.createElement(Offscreen, null, label)),
|
|
1919
|
+
disabled && React__default.createElement(Offscreen, null, label)),
|
|
1920
1920
|
!disabled && (React__default.createElement(Tooltip, { target: internalRef, placement: tooltipPlacement, variant: tooltipVariant, portal: tooltipPortal, association: "aria-labelledby", hideElementOnHidden: true }, label))));
|
|
1921
1921
|
});
|
|
1922
1922
|
IconButton.propTypes = {
|
|
@@ -8678,6 +8678,16 @@ AddressCityStateZip.propTypes = {
|
|
|
8678
8678
|
className: PropTypes.string
|
|
8679
8679
|
};
|
|
8680
8680
|
|
|
8681
|
+
/**
|
|
8682
|
+
* This prop type is meant to ensure that a prop can actually be rendered as content.
|
|
8683
|
+
* It should match the ContentNode type in types.ts
|
|
8684
|
+
*/
|
|
8685
|
+
var contentNode = PropTypes.oneOfType([
|
|
8686
|
+
PropTypes.string,
|
|
8687
|
+
PropTypes.number,
|
|
8688
|
+
PropTypes.element
|
|
8689
|
+
]);
|
|
8690
|
+
|
|
8681
8691
|
var Pagination = React__default.forwardRef(function (_a, ref) {
|
|
8682
8692
|
var totalItems = _a.totalItems, _b = _a.itemsPerPage, itemsPerPage = _b === void 0 ? 10 : _b, _c = _a.currentPage, currentPage = _c === void 0 ? 1 : _c, statusLabel = _a.statusLabel, _d = _a.firstPageLabel, firstPageLabel = _d === void 0 ? 'First page' : _d, _e = _a.previousPageLabel, previousPageLabel = _e === void 0 ? 'Previous page' : _e, _f = _a.nextPageLabel, nextPageLabel = _f === void 0 ? 'Next page' : _f, _g = _a.lastPageLabel, lastPageLabel = _g === void 0 ? 'Last page' : _g, _h = _a.tooltipPlacement, tooltipPlacement = _h === void 0 ? 'bottom' : _h, onNextPageClick = _a.onNextPageClick, onPreviousPageClick = _a.onPreviousPageClick, onFirstPageClick = _a.onFirstPageClick, onLastPageClick = _a.onLastPageClick, className = _a.className, _j = _a.thin, thin = _j === void 0 ? false : _j, other = tslib.__rest(_a, ["totalItems", "itemsPerPage", "currentPage", "statusLabel", "firstPageLabel", "previousPageLabel", "nextPageLabel", "lastPageLabel", "tooltipPlacement", "onNextPageClick", "onPreviousPageClick", "onFirstPageClick", "onLastPageClick", "className", "thin"]);
|
|
8683
8693
|
var itemStart = currentPage * itemsPerPage - itemsPerPage + 1;
|
|
@@ -8712,10 +8722,10 @@ Pagination.propTypes = {
|
|
|
8712
8722
|
itemsPerPage: PropTypes.number,
|
|
8713
8723
|
currentPage: PropTypes.number,
|
|
8714
8724
|
statusLabel: PropTypes.element,
|
|
8715
|
-
firstPageLabel:
|
|
8716
|
-
previousPageLabel:
|
|
8717
|
-
nextPageLabel:
|
|
8718
|
-
lastPageLabel:
|
|
8725
|
+
firstPageLabel: contentNode,
|
|
8726
|
+
previousPageLabel: contentNode,
|
|
8727
|
+
nextPageLabel: contentNode,
|
|
8728
|
+
lastPageLabel: contentNode,
|
|
8719
8729
|
onNextPageClick: PropTypes.func,
|
|
8720
8730
|
onPreviousPageClick: PropTypes.func,
|
|
8721
8731
|
onFirstPageClick: PropTypes.func,
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import PropTypes from 'prop-types';
|
|
2
|
+
/**
|
|
3
|
+
* This prop type is meant to ensure that a prop can actually be rendered as content.
|
|
4
|
+
* It should match the ContentNode type in types.ts
|
|
5
|
+
*/
|
|
6
|
+
export declare const contentNode: PropTypes.Requireable<string | number | PropTypes.ReactElementLike>;
|
package/package.json
CHANGED