@deque/cauldron-react 4.3.0-canary.4881208c → 4.3.0-canary.9d2b7bb9
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/components/Icon/types.d.ts +1 -1
- package/lib/components/Table/TableHeader.d.ts +4 -2
- package/lib/dropper.js +24 -0
- package/lib/index.js +11 -10
- package/package.json +1 -1
|
@@ -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' | 'exchange' | 'external-link' | 'eye' | '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' | 'plus' | 'question-circle' | 'radio-checked' | 'radio-unchecked' | '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' | 'close' | 'code' | 'copy' | 'download' | 'dropper' | 'exchange' | 'external-link' | 'eye' | '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' | 'plus' | 'question-circle' | 'radio-checked' | 'radio-unchecked' | '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[];
|
|
@@ -7,16 +7,18 @@ interface TableHeaderProps extends ThHTMLAttributes<HTMLTableCellElement> {
|
|
|
7
7
|
onSort?: () => void;
|
|
8
8
|
className?: string;
|
|
9
9
|
sortAscendingAnnouncement?: string;
|
|
10
|
-
|
|
10
|
+
sortDescendingAnnouncement?: string;
|
|
11
11
|
}
|
|
12
12
|
declare const TableHeader: {
|
|
13
|
-
({ children, sortDirection, onSort, className, sortAscendingAnnouncement,
|
|
13
|
+
({ children, sortDirection, onSort, className, sortAscendingAnnouncement, sortDescendingAnnouncement, ...other }: TableHeaderProps): JSX.Element;
|
|
14
14
|
displayName: string;
|
|
15
15
|
propTypes: {
|
|
16
16
|
children: PropTypes.Validator<string | number | boolean | {} | PropTypes.ReactElementLike | PropTypes.ReactNodeArray>;
|
|
17
17
|
sortDirection: PropTypes.Requireable<string>;
|
|
18
18
|
onSort: PropTypes.Requireable<(...args: any[]) => any>;
|
|
19
19
|
className: PropTypes.Requireable<string>;
|
|
20
|
+
sortAscendingAnnouncement: PropTypes.Requireable<string>;
|
|
21
|
+
sortDescendingAnnouncement: PropTypes.Requireable<string>;
|
|
20
22
|
};
|
|
21
23
|
};
|
|
22
24
|
export default TableHeader;
|
package/lib/dropper.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 SvgDropper = 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: "m20.71 5.63-2.34-2.34a.996.996 0 0 0-1.41 0l-3.12 3.12-1.93-1.91-1.41 1.41 1.42 1.42L3 16.25V21h4.75l8.92-8.92 1.42 1.42 1.41-1.41-1.92-1.92 3.12-3.12c.4-.4.4-1.03.01-1.42zM6.92 19 5 17.08l8.06-8.06 1.92 1.92L6.92 19z",
|
|
20
|
+
fill: "currentColor",
|
|
21
|
+
vectorEffect: "non-scaling-stroke"
|
|
22
|
+
})));
|
|
23
|
+
|
|
24
|
+
exports.default = SvgDropper;
|
package/lib/index.js
CHANGED
|
@@ -147,6 +147,7 @@ var iconTypes = [
|
|
|
147
147
|
'code',
|
|
148
148
|
'copy',
|
|
149
149
|
'download',
|
|
150
|
+
'dropper',
|
|
150
151
|
'exchange',
|
|
151
152
|
'external-link',
|
|
152
153
|
'eye',
|
|
@@ -213,6 +214,7 @@ function __variableDynamicImportRuntime0__(path) {
|
|
|
213
214
|
case './icons/code.svg': return Promise.resolve().then(function () { return require('./code.js'); });
|
|
214
215
|
case './icons/copy.svg': return Promise.resolve().then(function () { return require('./copy.js'); });
|
|
215
216
|
case './icons/download.svg': return Promise.resolve().then(function () { return require('./download.js'); });
|
|
217
|
+
case './icons/dropper.svg': return Promise.resolve().then(function () { return require('./dropper.js'); });
|
|
216
218
|
case './icons/exchange.svg': return Promise.resolve().then(function () { return require('./exchange.js'); });
|
|
217
219
|
case './icons/external-link.svg': return Promise.resolve().then(function () { return require('./external-link.js'); });
|
|
218
220
|
case './icons/eye.svg': return Promise.resolve().then(function () { return require('./eye.js'); });
|
|
@@ -8125,18 +8127,15 @@ TableHead.propTypes = {
|
|
|
8125
8127
|
};
|
|
8126
8128
|
|
|
8127
8129
|
var TableHeader = function (_a) {
|
|
8128
|
-
var children = _a.children, sortDirection = _a.sortDirection, onSort = _a.onSort, className = _a.className, _b = _a.sortAscendingAnnouncement, sortAscendingAnnouncement = _b === void 0 ? 'sorted ascending' : _b, _c = _a.
|
|
8130
|
+
var children = _a.children, sortDirection = _a.sortDirection, onSort = _a.onSort, className = _a.className, _b = _a.sortAscendingAnnouncement, sortAscendingAnnouncement = _b === void 0 ? 'sorted ascending' : _b, _c = _a.sortDescendingAnnouncement, sortDescendingAnnouncement = _c === void 0 ? 'sorted descending' : _c, other = tslib.__rest(_a, ["children", "sortDirection", "onSort", "className", "sortAscendingAnnouncement", "sortDescendingAnnouncement"]);
|
|
8129
8131
|
// When the sort direction changes, we want to announce the change in a live region
|
|
8130
8132
|
// because changes to the sort value is not widely supported yet
|
|
8131
8133
|
// see: https://a11ysupport.io/tech/aria/aria-sort_attribute
|
|
8132
|
-
var
|
|
8133
|
-
|
|
8134
|
-
|
|
8135
|
-
|
|
8136
|
-
|
|
8137
|
-
: sortDescendingAnnouncemen);
|
|
8138
|
-
}
|
|
8139
|
-
}, [sortDirection]);
|
|
8134
|
+
var announcement = sortDirection === 'ascending'
|
|
8135
|
+
? sortAscendingAnnouncement
|
|
8136
|
+
: sortDirection === 'descending'
|
|
8137
|
+
? sortDescendingAnnouncement
|
|
8138
|
+
: '';
|
|
8140
8139
|
return (React__default.createElement("th", tslib.__assign({ "aria-sort": sortDirection, className: classNames('TableHeader', className, {
|
|
8141
8140
|
'TableHeader--sort-ascending': sortDirection === 'ascending',
|
|
8142
8141
|
'TableHeader--sort-descending': sortDirection === 'descending'
|
|
@@ -8151,7 +8150,9 @@ TableHeader.propTypes = {
|
|
|
8151
8150
|
children: PropTypes.node.isRequired,
|
|
8152
8151
|
sortDirection: PropTypes.string,
|
|
8153
8152
|
onSort: PropTypes.func,
|
|
8154
|
-
className: PropTypes.string
|
|
8153
|
+
className: PropTypes.string,
|
|
8154
|
+
sortAscendingAnnouncement: PropTypes.string,
|
|
8155
|
+
sortDescendingAnnouncement: PropTypes.string
|
|
8155
8156
|
};
|
|
8156
8157
|
|
|
8157
8158
|
var TableRow = function (_a) {
|