@deque/cauldron-react 4.6.0-canary.43500cc8 → 4.6.0-canary.53b76d5e
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/clipboard.js +24 -0
- package/lib/components/Accordion/Accordion.d.ts +4 -2
- package/lib/components/ExpandCollapsePanel/ExpandCollapsePanel.d.ts +1 -1
- package/lib/components/ExpandCollapsePanel/PanelTrigger.d.ts +3 -1
- package/lib/components/Icon/types.d.ts +1 -1
- package/lib/components/Pagination/Pagination.d.ts +1 -0
- package/lib/export-solid.js +24 -0
- package/lib/index.js +24 -11
- package/package.json +1 -1
package/lib/clipboard.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
|
4
|
+
|
|
5
|
+
var React = require('react');
|
|
6
|
+
var React__default = _interopDefault(React);
|
|
7
|
+
|
|
8
|
+
var _path;
|
|
9
|
+
|
|
10
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
11
|
+
|
|
12
|
+
const SvgClipboard = props => /*#__PURE__*/React.createElement("svg", _extends({
|
|
13
|
+
overflow: "visible",
|
|
14
|
+
preserveAspectRatio: "none",
|
|
15
|
+
viewBox: "0 0 24 24",
|
|
16
|
+
height: 24,
|
|
17
|
+
width: 24
|
|
18
|
+
}, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
|
|
19
|
+
d: "M19 3h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm2 14H7v-2h7v2zm3-4H7v-2h10v2zm0-4H7V7h10v2z",
|
|
20
|
+
fill: "currentColor",
|
|
21
|
+
vectorEffect: "non-scaling-stroke"
|
|
22
|
+
})));
|
|
23
|
+
|
|
24
|
+
exports.default = SvgClipboard;
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { ExpandCollapsePanelProps } from '../ExpandCollapsePanel';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
export interface AccordionTriggerProps extends React.HTMLAttributes<HTMLButtonElement> {
|
|
5
|
-
children: React.
|
|
5
|
+
children: React.ReactNode;
|
|
6
6
|
heading?: React.ReactElement | {
|
|
7
7
|
level: string | undefined;
|
|
8
8
|
};
|
|
@@ -12,7 +12,9 @@ declare const AccordionTrigger: {
|
|
|
12
12
|
displayName: string;
|
|
13
13
|
propTypes: {
|
|
14
14
|
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
15
|
-
heading: PropTypes.Requireable<
|
|
15
|
+
heading: PropTypes.Requireable<PropTypes.InferProps<{
|
|
16
|
+
level: PropTypes.Requireable<number>;
|
|
17
|
+
}>>;
|
|
16
18
|
};
|
|
17
19
|
};
|
|
18
20
|
interface AccordionContentProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
@@ -4,7 +4,7 @@ export interface ExpandCollapsePanelProps extends React.HTMLAttributes<HTMLDivEl
|
|
|
4
4
|
open?: boolean;
|
|
5
5
|
children: React.ReactNode;
|
|
6
6
|
animationTiming?: number | boolean;
|
|
7
|
-
onToggle
|
|
7
|
+
onToggle?: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
8
8
|
}
|
|
9
9
|
interface ExpandCollapsePanelState {
|
|
10
10
|
controlled: boolean;
|
|
@@ -21,7 +21,9 @@ declare const _default: React.MemoExoticComponent<{
|
|
|
21
21
|
open: PropTypes.Requireable<boolean>;
|
|
22
22
|
iconExpanded: PropTypes.Requireable<string>;
|
|
23
23
|
iconCollapsed: PropTypes.Requireable<string>;
|
|
24
|
-
heading: PropTypes.Requireable<
|
|
24
|
+
heading: PropTypes.Requireable<PropTypes.InferProps<{
|
|
25
|
+
level: PropTypes.Requireable<number>;
|
|
26
|
+
}>>;
|
|
25
27
|
};
|
|
26
28
|
displayName: string;
|
|
27
29
|
}>;
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
* GENERATED CODE. DO NOT EDIT DIRECTLY!
|
|
3
3
|
*/
|
|
4
4
|
/** IconType represents each valid icon type. */
|
|
5
|
-
export declare type IconType = 'add-user' | 'arrow-circle-up' | 'arrow-circle-down' | 'arrow-circle-left' | 'arrow-circle-right' | 'arrow-up' | 'arrow-down' | 'arrow-left' | 'arrow-right' | 'arrows-alt' | 'bolt' | 'caution' | 'check-circle' | 'check-shield' | 'check-solid' | 'check' | 'checkbox-checked' | 'checkbox-unchecked' | 'chevron-double-up' | 'chevron-double-down' | 'chevron-double-left' | 'chevron-double-right' | 'chevron-up' | 'chevron-down' | 'chevron-left' | 'chevron-right' | 'close' | 'code' | 'copy' | 'download' | 'dropper' | 'exchange' | 'external-link' | 'eye' | 'filter-solid' | 'filter' | 'flag' | 'gears' | 'grid' | 'hamburger-menu' | 'highlight' | 'info-circle-alt' | 'info-circle' | 'info-square' | 'kabob' | 'list' | 'lock' | 'magnifying-glass' | 'menu' | 'minus' | 'new-releases' | 'new' | 'no' | 'pencil' | 'play' | 'plus' | 'question-circle' | 'radio-checked' | 'radio-unchecked' | 'recycle-square' | 'recycle' | 'resend' | 'robot' | 'run-again' | 'save' | 'share' | 'sort-triangle' | 'sort' | 'star' | 'sun' | 'tag' | 'target' | 'trash' | 'triangle-up' | 'triangle-down' | 'triangle-left' | 'triangle-right' | 'upload';
|
|
5
|
+
export declare type IconType = 'add-user' | 'arrow-circle-up' | 'arrow-circle-down' | 'arrow-circle-left' | 'arrow-circle-right' | 'arrow-up' | 'arrow-down' | 'arrow-left' | 'arrow-right' | 'arrows-alt' | 'bolt' | 'caution' | 'check-circle' | 'check-shield' | 'check-solid' | 'check' | 'checkbox-checked' | 'checkbox-unchecked' | 'chevron-double-up' | 'chevron-double-down' | 'chevron-double-left' | 'chevron-double-right' | 'chevron-up' | 'chevron-down' | 'chevron-left' | 'chevron-right' | 'clipboard' | 'close' | 'code' | 'copy' | 'download' | 'dropper' | 'exchange' | 'export-solid' | 'external-link' | 'eye' | 'filter-solid' | 'filter' | 'flag' | 'gears' | 'grid' | 'hamburger-menu' | 'highlight' | 'info-circle-alt' | 'info-circle' | 'info-square' | 'kabob' | 'list' | 'lock' | 'magnifying-glass' | 'menu' | 'minus' | 'new-releases' | 'new' | 'no' | 'pencil' | 'play' | 'plus' | 'question-circle' | 'radio-checked' | 'radio-unchecked' | 'recycle-square' | 'recycle' | 'resend' | 'robot' | 'run-again' | 'save' | 'share' | 'sort-triangle' | 'sort' | 'star' | 'sun' | 'tag' | 'target' | 'trash' | 'triangle-up' | 'triangle-down' | 'triangle-left' | 'triangle-right' | 'upload';
|
|
6
6
|
/** iconTypes holds each valid icon type. */
|
|
7
7
|
export declare const iconTypes: string[];
|
|
@@ -14,6 +14,7 @@ interface Props extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
14
14
|
onFirstPageClick?: () => void;
|
|
15
15
|
onLastPageClick?: () => void;
|
|
16
16
|
tooltipPlacement?: Placement;
|
|
17
|
+
thin?: boolean;
|
|
17
18
|
className?: string;
|
|
18
19
|
}
|
|
19
20
|
declare const Pagination: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
|
4
|
+
|
|
5
|
+
var React = require('react');
|
|
6
|
+
var React__default = _interopDefault(React);
|
|
7
|
+
|
|
8
|
+
var _path;
|
|
9
|
+
|
|
10
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
11
|
+
|
|
12
|
+
const SvgExportSolid = props => /*#__PURE__*/React.createElement("svg", _extends({
|
|
13
|
+
overflow: "visible",
|
|
14
|
+
preserveAspectRatio: "none",
|
|
15
|
+
viewBox: "0 0 24 24",
|
|
16
|
+
height: 24,
|
|
17
|
+
width: 24
|
|
18
|
+
}, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
|
|
19
|
+
d: "M16.47 18.47c-.26.25-.67.24-.92-.02a.649.649 0 0 1 .02-.92.649.649 0 0 1 1.1.47c0 .18-.08.35-.2.47zm2.66 0c-.26.25-.67.24-.92-.02a.649.649 0 0 1 .02-.92.649.649 0 0 1 1.1.47c0 .18-.07.35-.2.47zm1.54-2.8c0-.55-.45-1-1-1h-4.84l-1.42 1.42c-.78.78-2.05.78-2.83 0l-1.4-1.42H4.34c-.55 0-1 .45-1 1V19c0 .55.45 1 1 1h15.32c.55 0 1-.45 1-1v-3.34l.01.01zm-4-6.33H14V4.67a.692.692 0 0 0-.68-.67h-2.66a.69.69 0 0 0-.67.67v4.66H7.34a.628.628 0 0 0-.62.41c-.13.25-.06.55.15.73l4.66 4.66c.25.26.66.27.92.02l.02-.02 4.66-4.66c.21-.18.28-.48.15-.73a.62.62 0 0 0-.63-.41l.02.01z",
|
|
20
|
+
fill: "currentColor",
|
|
21
|
+
vectorEffect: "non-scaling-stroke"
|
|
22
|
+
})));
|
|
23
|
+
|
|
24
|
+
exports.default = SvgExportSolid;
|
package/lib/index.js
CHANGED
|
@@ -143,12 +143,14 @@ var iconTypes = [
|
|
|
143
143
|
'chevron-down',
|
|
144
144
|
'chevron-left',
|
|
145
145
|
'chevron-right',
|
|
146
|
+
'clipboard',
|
|
146
147
|
'close',
|
|
147
148
|
'code',
|
|
148
149
|
'copy',
|
|
149
150
|
'download',
|
|
150
151
|
'dropper',
|
|
151
152
|
'exchange',
|
|
153
|
+
'export-solid',
|
|
152
154
|
'external-link',
|
|
153
155
|
'eye',
|
|
154
156
|
'filter-solid',
|
|
@@ -213,12 +215,14 @@ function __variableDynamicImportRuntime0__(path) {
|
|
|
213
215
|
case './icons/checkbox-unchecked.svg': return Promise.resolve().then(function () { return require('./checkbox-unchecked.js'); });
|
|
214
216
|
case './icons/chevron-double.svg': return Promise.resolve().then(function () { return require('./chevron-double.js'); });
|
|
215
217
|
case './icons/chevron.svg': return Promise.resolve().then(function () { return require('./chevron.js'); });
|
|
218
|
+
case './icons/clipboard.svg': return Promise.resolve().then(function () { return require('./clipboard.js'); });
|
|
216
219
|
case './icons/close.svg': return Promise.resolve().then(function () { return require('./close.js'); });
|
|
217
220
|
case './icons/code.svg': return Promise.resolve().then(function () { return require('./code.js'); });
|
|
218
221
|
case './icons/copy.svg': return Promise.resolve().then(function () { return require('./copy.js'); });
|
|
219
222
|
case './icons/download.svg': return Promise.resolve().then(function () { return require('./download.js'); });
|
|
220
223
|
case './icons/dropper.svg': return Promise.resolve().then(function () { return require('./dropper.js'); });
|
|
221
224
|
case './icons/exchange.svg': return Promise.resolve().then(function () { return require('./exchange.js'); });
|
|
225
|
+
case './icons/export-solid.svg': return Promise.resolve().then(function () { return require('./export-solid.js'); });
|
|
222
226
|
case './icons/external-link.svg': return Promise.resolve().then(function () { return require('./external-link.js'); });
|
|
223
227
|
case './icons/eye.svg': return Promise.resolve().then(function () { return require('./eye.js'); });
|
|
224
228
|
case './icons/filter-solid.svg': return Promise.resolve().then(function () { return require('./filter-solid.js'); });
|
|
@@ -330,7 +334,9 @@ PanelTrigger.propTypes = {
|
|
|
330
334
|
open: PropTypes.bool,
|
|
331
335
|
iconExpanded: PropTypes.string,
|
|
332
336
|
iconCollapsed: PropTypes.string,
|
|
333
|
-
heading: PropTypes.
|
|
337
|
+
heading: PropTypes.shape({
|
|
338
|
+
level: PropTypes.number
|
|
339
|
+
})
|
|
334
340
|
};
|
|
335
341
|
PanelTrigger.displayName = 'PanelTrigger';
|
|
336
342
|
var PanelTrigger$1 = React__default.memo(PanelTrigger);
|
|
@@ -357,8 +363,8 @@ var ExpandCollapsePanel = /** @class */ (function (_super) {
|
|
|
357
363
|
};
|
|
358
364
|
_this.panel = React__default.createRef();
|
|
359
365
|
_this.handleToggle = function (e) {
|
|
360
|
-
var
|
|
361
|
-
var
|
|
366
|
+
var _a = _this.props.onToggle, onToggle = _a === void 0 ? function () { } : _a;
|
|
367
|
+
var _b = _this.state, isOpen = _b.isOpen, controlled = _b.controlled;
|
|
362
368
|
onToggle(e);
|
|
363
369
|
if (!controlled) {
|
|
364
370
|
_this.setState({ isOpen: !isOpen, isAnimating: true });
|
|
@@ -475,7 +481,10 @@ var AccordionContent = function (_a) {
|
|
|
475
481
|
var Accordion = function (_a) {
|
|
476
482
|
var children = _a.children;
|
|
477
483
|
var childrenArray = React__default.Children.toArray(children);
|
|
478
|
-
var trigger = childrenArray.find(function (child) {
|
|
484
|
+
var trigger = childrenArray.find(function (child) {
|
|
485
|
+
return typeof child === 'string' ||
|
|
486
|
+
child.type === AccordionTrigger;
|
|
487
|
+
});
|
|
479
488
|
var panelElement = childrenArray.find(function (child) {
|
|
480
489
|
return typeof child === 'string' ||
|
|
481
490
|
child.type === AccordionContent;
|
|
@@ -505,7 +514,9 @@ Accordion.propTypes = {
|
|
|
505
514
|
};
|
|
506
515
|
AccordionTrigger.propTypes = {
|
|
507
516
|
children: PropTypes.node,
|
|
508
|
-
heading: PropTypes.
|
|
517
|
+
heading: PropTypes.shape({
|
|
518
|
+
level: PropTypes.number
|
|
519
|
+
})
|
|
509
520
|
};
|
|
510
521
|
AccordionContent.propTypes = {
|
|
511
522
|
children: PropTypes.node.isRequired,
|
|
@@ -8635,16 +8646,18 @@ AddressCityStateZip.propTypes = {
|
|
|
8635
8646
|
};
|
|
8636
8647
|
|
|
8637
8648
|
var Pagination = React__default.forwardRef(function (_a, ref) {
|
|
8638
|
-
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, other = tslib.__rest(_a, ["totalItems", "itemsPerPage", "currentPage", "statusLabel", "firstPageLabel", "previousPageLabel", "nextPageLabel", "lastPageLabel", "tooltipPlacement", "onNextPageClick", "onPreviousPageClick", "onFirstPageClick", "onLastPageClick", "className"]);
|
|
8649
|
+
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"]);
|
|
8639
8650
|
var itemStart = currentPage * itemsPerPage - itemsPerPage + 1;
|
|
8640
8651
|
var itemEnd = Math.min(itemStart + itemsPerPage - 1, totalItems);
|
|
8641
8652
|
var isLastPage = itemEnd === totalItems;
|
|
8642
8653
|
var isFirstPage = currentPage === 1;
|
|
8643
|
-
return (React__default.createElement("div", tslib.__assign({ ref: ref, className: classNames('Pagination', className
|
|
8654
|
+
return (React__default.createElement("div", tslib.__assign({ ref: ref, className: classNames('Pagination', className, {
|
|
8655
|
+
'Pagination--thin': thin
|
|
8656
|
+
}) }, other),
|
|
8644
8657
|
React__default.createElement("ul", null,
|
|
8645
|
-
React__default.createElement("li", null, isFirstPage ? (React__default.createElement(TooltipTabstop, { hideElementOnHidden: true, association: "aria-labelledby", tooltip: firstPageLabel, placement: tooltipPlacement },
|
|
8658
|
+
React__default.createElement("li", null, isFirstPage ? (React__default.createElement(TooltipTabstop, { className: "IconButton", hideElementOnHidden: true, association: "aria-labelledby", tooltip: firstPageLabel, placement: tooltipPlacement },
|
|
8646
8659
|
React__default.createElement(Icon, { type: "chevron-double-left" }))) : (React__default.createElement(IconButton, { icon: "chevron-double-left", tooltipPlacement: tooltipPlacement, label: firstPageLabel, onClick: onFirstPageClick }))),
|
|
8647
|
-
React__default.createElement("li", null, isFirstPage ? (React__default.createElement(TooltipTabstop, { hideElementOnHidden: true, association: "aria-labelledby", tooltip: previousPageLabel, placement: tooltipPlacement },
|
|
8660
|
+
React__default.createElement("li", null, isFirstPage ? (React__default.createElement(TooltipTabstop, { className: "IconButton", hideElementOnHidden: true, association: "aria-labelledby", tooltip: previousPageLabel, placement: tooltipPlacement },
|
|
8648
8661
|
React__default.createElement(Icon, { type: "chevron-left" }))) : (React__default.createElement(IconButton, { icon: "chevron-left", tooltipPlacement: tooltipPlacement, label: previousPageLabel, onClick: onPreviousPageClick }))),
|
|
8649
8662
|
React__default.createElement("li", null,
|
|
8650
8663
|
React__default.createElement("span", { role: "log", "aria-atomic": "true" }, statusLabel || (React__default.createElement("span", null,
|
|
@@ -8655,9 +8668,9 @@ var Pagination = React__default.forwardRef(function (_a, ref) {
|
|
|
8655
8668
|
React__default.createElement("strong", null, itemEnd),
|
|
8656
8669
|
" of ",
|
|
8657
8670
|
React__default.createElement("strong", null, totalItems))))),
|
|
8658
|
-
React__default.createElement("li", null, isLastPage ? (React__default.createElement(TooltipTabstop, { hideElementOnHidden: true, association: "aria-labelledby", tooltip: nextPageLabel, placement: tooltipPlacement },
|
|
8671
|
+
React__default.createElement("li", null, isLastPage ? (React__default.createElement(TooltipTabstop, { className: "IconButton", hideElementOnHidden: true, association: "aria-labelledby", tooltip: nextPageLabel, placement: tooltipPlacement },
|
|
8659
8672
|
React__default.createElement(Icon, { type: "chevron-right" }))) : (React__default.createElement(IconButton, { icon: "chevron-right", tooltipPlacement: tooltipPlacement, label: nextPageLabel, onClick: onNextPageClick }))),
|
|
8660
|
-
React__default.createElement("li", null, isLastPage ? (React__default.createElement(TooltipTabstop, { hideElementOnHidden: true, association: "aria-labelledby", tooltip: lastPageLabel, placement: tooltipPlacement },
|
|
8673
|
+
React__default.createElement("li", null, isLastPage ? (React__default.createElement(TooltipTabstop, { className: "IconButton", hideElementOnHidden: true, association: "aria-labelledby", tooltip: lastPageLabel, placement: tooltipPlacement },
|
|
8661
8674
|
React__default.createElement(Icon, { type: "chevron-double-right" }))) : (React__default.createElement(IconButton, { icon: "chevron-double-right", tooltipPlacement: tooltipPlacement, label: lastPageLabel, onClick: onLastPageClick }))))));
|
|
8662
8675
|
});
|
|
8663
8676
|
Pagination.displayName = 'Pagination';
|