@deque/cauldron-react 5.0.0-canary.2e05a9cc → 5.0.0-canary.336beca1

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.
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { Cauldron } from '../../types';
3
3
  declare type BreadcrumbProps = {
4
- separator?: string;
4
+ separator?: React.ReactNode;
5
5
  } & React.HTMLAttributes<HTMLElement> & Cauldron.LabelProps;
6
6
  declare const Breadcrumb: React.ForwardRefExoticComponent<BreadcrumbProps & React.RefAttributes<HTMLElement>>;
7
7
  export default Breadcrumb;
@@ -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' | 'clipboard' | 'close' | 'code' | 'copy' | 'download' | 'dropper' | 'exchange' | 'export-solid' | 'external-link' | 'eye' | 'filter-solid' | 'filter' | 'flag' | 'gears' | 'grid' | 'hamburger-menu' | 'hashtag' | 'highlight' | 'info-circle-alt' | 'info-circle' | 'info-square' | 'kabob' | 'link' | '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' | 'sun' | 'table-sort-ascending' | 'table-sort-descending' | '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' | 'github' | 'grid' | 'hamburger-menu' | 'hashtag' | 'highlight' | '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' | 'sun' | 'table-sort-ascending' | 'table-sort-descending' | 'tag' | 'target' | 'trash' | 'triangle-up' | 'triangle-down' | 'triangle-left' | 'triangle-right' | 'twitter' | 'upload';
6
6
  /** iconTypes holds each valid icon type. */
7
7
  export declare const iconTypes: string[];
package/lib/github.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 SvgGithub = 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: "M8.03 19.14c0 .1-.11.17-.25.17-.16.01-.27-.06-.27-.17 0-.1.11-.17.25-.17.15-.01.27.06.27.17Zm-1.5-.22c-.03.1.06.21.21.24.13.05.27 0 .3-.1s-.06-.21-.21-.25c-.13-.03-.27.01-.3.11Zm2.14-.08c-.14.03-.24.13-.22.24.01.1.14.16.29.13.14-.03.24-.13.22-.22-.01-.09-.15-.15-.29-.14ZM11.85.3C5.13.3 0 5.39 0 12.11c0 5.37 3.38 9.96 8.2 11.57.62.11.84-.27.84-.59s-.01-1.95-.01-2.97c0 0-3.39.73-4.1-1.44 0 0-.55-1.41-1.35-1.77 0 0-1.11-.76.08-.75 0 0 1.2.1 1.87 1.25 1.06 1.87 2.84 1.33 3.53 1.01.11-.77.43-1.31.77-1.63-2.7-.3-5.43-.69-5.43-5.35 0-1.33.37-2 1.14-2.85-.13-.31-.54-1.61.13-3.29 1.01-.31 3.34 1.31 3.34 1.31.97-.27 2.01-.41 3.04-.41s2.07.14 3.04.41c0 0 2.33-1.63 3.34-1.31.66 1.68.25 2.97.13 3.29.77.86 1.25 1.52 1.25 2.85 0 4.67-2.85 5.04-5.55 5.35.45.38.82 1.11.82 2.25 0 1.63-.01 3.65-.01 4.05 0 .31.22.7.84.59 4.84-1.61 8.12-6.2 8.12-11.56C24 5.39 18.56.3 11.85.3ZM4.71 16.99c-.06.05-.05.16.03.25.08.08.19.11.25.05.06-.05.05-.16-.03-.25-.08-.08-.19-.11-.25-.05Zm-.52-.39c-.03.06.01.14.11.19.08.05.17.03.21-.03.03-.06-.01-.14-.11-.19-.1-.03-.17-.01-.21.03Zm1.57 1.72c-.08.06-.05.21.06.3.11.11.25.13.31.05.06-.06.03-.21-.06-.3-.11-.11-.25-.13-.31-.05Zm-.55-.71c-.08.05-.08.17 0 .29s.21.16.27.11c.08-.06.08-.19 0-.3-.07-.11-.19-.16-.27-.1Z",
20
+ fill: "currentColor",
21
+ vectorEffect: "non-scaling-stroke"
22
+ })));
23
+
24
+ exports.default = SvgGithub;
package/lib/index.js CHANGED
@@ -16,6 +16,7 @@ var reactDom = require('react-dom');
16
16
  var FocusTrap = _interopDefault(require('focus-trap-react'));
17
17
  var reactPopper = require('react-popper');
18
18
  var focusable = _interopDefault(require('focusable'));
19
+ require('fault');
19
20
 
20
21
  var Main = /** @class */ (function (_super) {
21
22
  tslib.__extends(Main, _super);
@@ -157,6 +158,7 @@ var iconTypes = [
157
158
  'filter',
158
159
  'flag',
159
160
  'gears',
161
+ 'github',
160
162
  'grid',
161
163
  'hamburger-menu',
162
164
  'hashtag',
@@ -166,6 +168,7 @@ var iconTypes = [
166
168
  'info-square',
167
169
  'kabob',
168
170
  'link',
171
+ 'linkedin',
169
172
  'list',
170
173
  'lock',
171
174
  'magnifying-glass',
@@ -203,6 +206,7 @@ var iconTypes = [
203
206
  'triangle-down',
204
207
  'triangle-left',
205
208
  'triangle-right',
209
+ 'twitter',
206
210
  'upload'
207
211
  ];
208
212
 
@@ -236,6 +240,7 @@ function __variableDynamicImportRuntime0__(path) {
236
240
  case './icons/filter.svg': return Promise.resolve().then(function () { return require('./filter.js'); });
237
241
  case './icons/flag.svg': return Promise.resolve().then(function () { return require('./flag.js'); });
238
242
  case './icons/gears.svg': return Promise.resolve().then(function () { return require('./gears.js'); });
243
+ case './icons/github.svg': return Promise.resolve().then(function () { return require('./github.js'); });
239
244
  case './icons/grid.svg': return Promise.resolve().then(function () { return require('./grid.js'); });
240
245
  case './icons/hamburger-menu.svg': return Promise.resolve().then(function () { return require('./hamburger-menu.js'); });
241
246
  case './icons/hashtag.svg': return Promise.resolve().then(function () { return require('./hashtag.js'); });
@@ -245,6 +250,7 @@ function __variableDynamicImportRuntime0__(path) {
245
250
  case './icons/info-square.svg': return Promise.resolve().then(function () { return require('./info-square.js'); });
246
251
  case './icons/kabob.svg': return Promise.resolve().then(function () { return require('./kabob.js'); });
247
252
  case './icons/link.svg': return Promise.resolve().then(function () { return require('./link.js'); });
253
+ case './icons/linkedin.svg': return Promise.resolve().then(function () { return require('./linkedin.js'); });
248
254
  case './icons/list.svg': return Promise.resolve().then(function () { return require('./list.js'); });
249
255
  case './icons/lock.svg': return Promise.resolve().then(function () { return require('./lock.js'); });
250
256
  case './icons/magnifying-glass.svg': return Promise.resolve().then(function () { return require('./magnifying-glass.js'); });
@@ -279,6 +285,7 @@ function __variableDynamicImportRuntime0__(path) {
279
285
  case './icons/target.svg': return Promise.resolve().then(function () { return require('./target.js'); });
280
286
  case './icons/trash.svg': return Promise.resolve().then(function () { return require('./trash.js'); });
281
287
  case './icons/triangle.svg': return Promise.resolve().then(function () { return require('./triangle.js'); });
288
+ case './icons/twitter.svg': return Promise.resolve().then(function () { return require('./twitter.js'); });
282
289
  case './icons/upload.svg': return Promise.resolve().then(function () { return require('./upload.js'); });
283
290
  default: return new Promise(function(resolve, reject) {
284
291
  (typeof queueMicrotask === 'function' ? queueMicrotask : setTimeout)(
@@ -1573,8 +1580,8 @@ var Dialog = /** @class */ (function (_super) {
1573
1580
  };
1574
1581
  Dialog.prototype.close = function () {
1575
1582
  var _a, _b, _c;
1583
+ (_a = this.state.isolator) === null || _a === void 0 ? void 0 : _a.deactivate();
1576
1584
  if (this.props.show) {
1577
- (_a = this.state.isolator) === null || _a === void 0 ? void 0 : _a.deactivate();
1578
1585
  (_c = (_b = this.props).onClose) === null || _c === void 0 ? void 0 : _c.call(_b);
1579
1586
  }
1580
1587
  };
@@ -2358,7 +2365,7 @@ var Toast = /** @class */ (function (_super) {
2358
2365
  var scrim = type === 'action-needed' && show ? (React__default.createElement("div", { className: "Scrim--light Scrim--show Scrim--fade-in" })) : null;
2359
2366
  var defaultProps = {
2360
2367
  tabIndex: -1,
2361
- className: "Toast Toast--".concat(typeMap[type].className, " ").concat(animationClass)
2368
+ className: classNames('Toast', "Toast--".concat(typeMap[type].className), animationClass, { 'Toast--non-dismissible': !dismissible })
2362
2369
  };
2363
2370
  if (!focus) {
2364
2371
  defaultProps.role = 'alert';
@@ -8678,6 +8685,16 @@ AddressCityStateZip.propTypes = {
8678
8685
  className: PropTypes.string
8679
8686
  };
8680
8687
 
8688
+ /**
8689
+ * This prop type is meant to ensure that a prop can actually be rendered as content.
8690
+ * It should match the ContentNode type in types.ts
8691
+ */
8692
+ var contentNode = PropTypes.oneOfType([
8693
+ PropTypes.string,
8694
+ PropTypes.number,
8695
+ PropTypes.element
8696
+ ]);
8697
+
8681
8698
  var Pagination = React__default.forwardRef(function (_a, ref) {
8682
8699
  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
8700
  var itemStart = currentPage * itemsPerPage - itemsPerPage + 1;
@@ -8712,10 +8729,10 @@ Pagination.propTypes = {
8712
8729
  itemsPerPage: PropTypes.number,
8713
8730
  currentPage: PropTypes.number,
8714
8731
  statusLabel: PropTypes.element,
8715
- firstPageLabel: PropTypes.element,
8716
- previousPageLabel: PropTypes.element,
8717
- nextPageLabel: PropTypes.element,
8718
- lastPageLabel: PropTypes.element,
8732
+ firstPageLabel: contentNode,
8733
+ previousPageLabel: contentNode,
8734
+ nextPageLabel: contentNode,
8735
+ lastPageLabel: contentNode,
8719
8736
  onNextPageClick: PropTypes.func,
8720
8737
  onPreviousPageClick: PropTypes.func,
8721
8738
  onFirstPageClick: PropTypes.func,
@@ -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 SvgLinkedin = 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: "M5.37 24H.4V7.98h4.98V24ZM2.88 5.79C1.29 5.79 0 4.47 0 2.88a2.88 2.88 0 0 1 5.76 0c0 1.59-1.29 2.91-2.88 2.91ZM23.99 24h-4.96v-7.8c0-1.86-.04-4.24-2.59-4.24s-2.98 2.02-2.98 4.11V24H8.49V7.98h4.77v2.19h.07c.66-1.26 2.29-2.59 4.71-2.59 5.04 0 5.96 3.32 5.96 7.62V24Z",
20
+ fill: "currentColor",
21
+ vectorEffect: "non-scaling-stroke"
22
+ })));
23
+
24
+ exports.default = SvgLinkedin;
@@ -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/lib/twitter.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 SvgTwitter = 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: "M21.53 7.11c.02.21.02.43.02.64 0 6.5-4.95 13.99-13.99 13.99-2.79 0-5.38-.81-7.55-2.21.4.05.78.06 1.19.06 2.3 0 4.42-.78 6.11-2.1a4.94 4.94 0 0 1-4.6-3.41c.3.05.61.08.93.08.44 0 .88-.06 1.29-.17A4.926 4.926 0 0 1 .99 9.16V9.1c.65.37 1.42.59 2.22.62a4.92 4.92 0 0 1-2.19-4.1c0-.91.24-1.75.67-2.48a14.02 14.02 0 0 0 10.14 5.15c-.08-.37-.12-.75-.12-1.13 0-2.71 2.19-4.92 4.92-4.92 1.42 0 2.7.59 3.59 1.55 1.11-.21 2.18-.62 3.12-1.19a4.93 4.93 0 0 1-2.16 2.71c.99-.11 1.95-.38 2.83-.76-.67.97-1.51 1.84-2.47 2.54Z",
20
+ fill: "currentColor",
21
+ vectorEffect: "non-scaling-stroke"
22
+ })));
23
+
24
+ exports.default = SvgTwitter;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deque/cauldron-react",
3
- "version": "5.0.0-canary.2e05a9cc",
3
+ "version": "5.0.0-canary.336beca1",
4
4
  "description": "Fully accessible react components library for Deque Cauldron",
5
5
  "homepage": "https://cauldron.dequelabs.com/",
6
6
  "publishConfig": {