@deque/cauldron-react 6.25.3 → 6.26.0-canary.290ddaeb
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.
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
* GENERATED CODE. DO NOT EDIT DIRECTLY!
|
|
3
3
|
*/
|
|
4
4
|
/** IconType represents each valid icon type. */
|
|
5
|
-
export 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' | 'broken-image' | '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' | 'clock' | 'close' | 'code' | 'copy' | 'download' | 'dropper' | 'exchange' | 'export-solid' | 'external-link' | 'eye' | 'filter' | 'flag' | 'gears' | 'github' | 'grid' | 'hamburger-menu' | 'hashtag' | 'highlight' | 'images' | 'info-circle-alt' | 'info-circle' | 'info-square' | 'kabob' | 'link' | 'linkedin' | 'list' | 'lock' | 'magnifying-glass' | 'menu' | 'minus' | 'new-releases' | 'new' | 'no' | 'pencil' | 'person-running' | 'play' | 'plus' | 'question-circle-alt' | 'question-circle' | 'radio-checked' | 'radio-unchecked' | 'recycle-square' | 'recycle' | 'resend' | 'robot' | 'run-again' | 'save' | 'share-nodes' | 'share' | 'sort-triangle' | 'sort' | 'star' | 'step-back' | 'step-forward' | 'sun' | 'table-sort-ascending' | 'table-sort-descending' | 'tag' | 'target' | 'trash' | 'triangle-up' | 'triangle-down' | 'triangle-left' | 'triangle-right' | 'twitter' | 'upload' | 'filter-solid';
|
|
5
|
+
export 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' | 'broken-image' | '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' | 'clock' | 'close' | 'code' | 'copy' | 'download' | 'dropper' | 'exchange' | 'export-solid' | 'external-link' | 'eye' | 'filter' | 'flag' | 'gears' | 'github' | 'grid' | 'hamburger-menu' | 'hashtag' | 'highlight' | 'images' | 'info-circle-alt' | 'info-circle' | 'info-square' | 'kabob' | 'link' | 'linkedin' | 'list' | 'lock' | 'magnifying-glass' | 'menu' | 'minus' | 'new-releases' | 'new' | 'no' | 'pause' | 'pencil' | 'person-running' | 'play' | 'plus' | 'question-circle-alt' | 'question-circle' | 'radio-checked' | 'radio-unchecked' | 'recycle-square' | 'recycle' | 'resend' | 'robot' | 'run-again' | 'save' | 'share-nodes' | 'share' | 'sort-triangle' | 'sort' | 'star' | 'step-back' | 'step-forward' | 'sun' | 'table-sort-ascending' | 'table-sort-descending' | 'tag' | 'target' | 'trash' | 'triangle-up' | 'triangle-down' | 'triangle-left' | 'triangle-right' | 'twitter' | 'upload' | 'filter-solid';
|
|
6
6
|
/** iconTypes holds each valid icon type. */
|
|
7
7
|
export declare const iconTypes: string[];
|
|
@@ -4,6 +4,7 @@ type ProgressBarProps = {
|
|
|
4
4
|
progress: number;
|
|
5
5
|
progressMax?: number;
|
|
6
6
|
progressMin?: number;
|
|
7
|
+
thin?: boolean;
|
|
7
8
|
} & Cauldron.LabelProps & React.HTMLAttributes<HTMLDivElement>;
|
|
8
9
|
declare const ProgressBar: React.ForwardRefExoticComponent<ProgressBarProps & React.RefAttributes<HTMLDivElement>>;
|
|
9
10
|
export default ProgressBar;
|
package/lib/index.js
CHANGED
|
@@ -165,6 +165,7 @@ var iconTypes = [
|
|
|
165
165
|
'new-releases',
|
|
166
166
|
'new',
|
|
167
167
|
'no',
|
|
168
|
+
'pause',
|
|
168
169
|
'pencil',
|
|
169
170
|
'person-running',
|
|
170
171
|
'play',
|
|
@@ -252,6 +253,7 @@ function __variableDynamicImportRuntime0__(path) {
|
|
|
252
253
|
case './icons/new-releases.svg': return Promise.resolve().then(function () { return require('./new-releases.js'); });
|
|
253
254
|
case './icons/new.svg': return Promise.resolve().then(function () { return require('./new.js'); });
|
|
254
255
|
case './icons/no.svg': return Promise.resolve().then(function () { return require('./no.js'); });
|
|
256
|
+
case './icons/pause.svg': return Promise.resolve().then(function () { return require('./pause.js'); });
|
|
255
257
|
case './icons/pencil.svg': return Promise.resolve().then(function () { return require('./pencil.js'); });
|
|
256
258
|
case './icons/person-running.svg': return Promise.resolve().then(function () { return require('./person-running.js'); });
|
|
257
259
|
case './icons/play.svg': return Promise.resolve().then(function () { return require('./play.js'); });
|
|
@@ -3417,9 +3419,9 @@ var Stepper = function (_a) {
|
|
|
3417
3419
|
Stepper.displayName = 'Stepper';
|
|
3418
3420
|
|
|
3419
3421
|
var ProgressBar = React.forwardRef(function (_a, ref) {
|
|
3420
|
-
var _b = _a.progress, progress = _b === void 0 ? 0 : _b, _c = _a.progressMax, progressMax = _c === void 0 ? 100 : _c, _d = _a.progressMin, progressMin = _d === void 0 ? 0 : _d, props = tslib.__rest(_a, ["progress", "progressMax", "progressMin"]);
|
|
3422
|
+
var _b = _a.progress, progress = _b === void 0 ? 0 : _b, _c = _a.progressMax, progressMax = _c === void 0 ? 100 : _c, _d = _a.progressMin, progressMin = _d === void 0 ? 0 : _d, thin = _a.thin, props = tslib.__rest(_a, ["progress", "progressMax", "progressMin", "thin"]);
|
|
3421
3423
|
var className = props.className, otherProps = tslib.__rest(props, ["className"]);
|
|
3422
|
-
return (React__default["default"].createElement("div", tslib.__assign({ className: classNames__default["default"]('ProgressBar', className), role: "progressbar", "aria-valuemin": progressMin, "aria-valuemax": progressMax, "aria-valuenow": progress, ref: ref }, otherProps),
|
|
3424
|
+
return (React__default["default"].createElement("div", tslib.__assign({ className: classNames__default["default"]('ProgressBar', { 'ProgressBar--thin': thin }, className), role: "progressbar", "aria-valuemin": progressMin, "aria-valuemax": progressMax, "aria-valuenow": progress, ref: ref }, otherProps),
|
|
3423
3425
|
React__default["default"].createElement("div", { className: "ProgressBar--fill", style: { width: "".concat(Math.min((progress / progressMax) * 100, 100), "%") } })));
|
|
3424
3426
|
});
|
|
3425
3427
|
ProgressBar.displayName = 'ProgressBar';
|
|
@@ -5351,8 +5353,13 @@ var ActionMenu = React.forwardRef(function (_a, ref) {
|
|
|
5351
5353
|
setOpen(false);
|
|
5352
5354
|
}
|
|
5353
5355
|
}, []);
|
|
5354
|
-
var handleOverlayBlur = React.useCallback(function () {
|
|
5355
|
-
|
|
5356
|
+
var handleOverlayBlur = React.useCallback(function (event) {
|
|
5357
|
+
var _a, _b;
|
|
5358
|
+
var relatedTarget = event.relatedTarget;
|
|
5359
|
+
if (!((_a = actionMenuRef.current) === null || _a === void 0 ? void 0 : _a.contains(relatedTarget)) &&
|
|
5360
|
+
!((_b = triggerRef.current) === null || _b === void 0 ? void 0 : _b.contains(relatedTarget))) {
|
|
5361
|
+
setOpen(false);
|
|
5362
|
+
}
|
|
5356
5363
|
}, []);
|
|
5357
5364
|
var handleAction = React.useCallback(function (key, event) {
|
|
5358
5365
|
// istanbul ignore else
|
|
@@ -5365,12 +5372,21 @@ var ActionMenu = React.forwardRef(function (_a, ref) {
|
|
|
5365
5372
|
}
|
|
5366
5373
|
}, [actionMenuList.props.onAction]);
|
|
5367
5374
|
React.useEffect(function () {
|
|
5368
|
-
var _a, _b
|
|
5375
|
+
var _a, _b;
|
|
5369
5376
|
if (open) {
|
|
5370
|
-
|
|
5377
|
+
// Use double requestAnimationFrame to ensure layout is complete.
|
|
5378
|
+
// The first RAF schedules work for the next frame, the second ensures
|
|
5379
|
+
// the browser has actually completed the layout pass.
|
|
5380
|
+
// This prevents scroll jumping when opening ActionMenus.
|
|
5381
|
+
requestAnimationFrame(function () {
|
|
5382
|
+
requestAnimationFrame(function () {
|
|
5383
|
+
var _a;
|
|
5384
|
+
(_a = actionMenuListRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
5385
|
+
});
|
|
5386
|
+
});
|
|
5371
5387
|
}
|
|
5372
|
-
else if ((
|
|
5373
|
-
(
|
|
5388
|
+
else if ((_a = actionMenuListRef.current) === null || _a === void 0 ? void 0 : _a.contains(document.activeElement)) {
|
|
5389
|
+
(_b = triggerRef.current) === null || _b === void 0 ? void 0 : _b.focus();
|
|
5374
5390
|
}
|
|
5375
5391
|
}, [open]);
|
|
5376
5392
|
var hidden = renderInTrigger && !open;
|
package/lib/pause.js
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
|
|
5
|
+
function _interopNamespace(e) {
|
|
6
|
+
if (e && e.__esModule) return e;
|
|
7
|
+
var n = Object.create(null);
|
|
8
|
+
if (e) {
|
|
9
|
+
Object.keys(e).forEach(function (k) {
|
|
10
|
+
if (k !== 'default') {
|
|
11
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
12
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () { return e[k]; }
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
n["default"] = e;
|
|
20
|
+
return Object.freeze(n);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
24
|
+
|
|
25
|
+
var _path;
|
|
26
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
27
|
+
const SvgPause = props => /*#__PURE__*/React__namespace.createElement("svg", _extends({
|
|
28
|
+
viewBox: "0 0 16 16",
|
|
29
|
+
fill: "none",
|
|
30
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
31
|
+
height: 24,
|
|
32
|
+
width: 24
|
|
33
|
+
}, props), _path || (_path = /*#__PURE__*/React__namespace.createElement("path", {
|
|
34
|
+
d: "M3.333 0c-1.107 0-2 .893-2 2v12c0 1.107.893 2 2 2h1.333c1.107 0 2-.893 2-2V2c0-1.107-.893-2-2-2H3.333Zm8 0c-1.107 0-2 .893-2 2v12c0 1.107.893 2 2 2h1.333c1.107 0 2-.893 2-2V2c0-1.107-.893-2-2-2h-1.333Z",
|
|
35
|
+
fill: "currentColor"
|
|
36
|
+
})));
|
|
37
|
+
|
|
38
|
+
exports["default"] = SvgPause;
|
package/package.json
CHANGED