@deque/cauldron-react 4.4.0-canary.2508e60c → 4.4.0-canary.f8ca4e9b

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,14 +1,7 @@
1
1
  import React from 'react';
2
- import PropTypes from 'prop-types';
3
2
  export interface LoaderProps extends React.HTMLAttributes<HTMLDivElement> {
4
3
  label?: string;
5
4
  variant?: 'large' | 'small';
6
5
  }
7
- declare function Loader({ className, variant, label, ...props }: LoaderProps): JSX.Element;
8
- declare namespace Loader {
9
- var propTypes: {
10
- className: PropTypes.Requireable<string>;
11
- };
12
- var displayName: string;
13
- }
6
+ declare const Loader: React.ForwardRefExoticComponent<LoaderProps & React.RefAttributes<HTMLDivElement>>;
14
7
  export default Loader;
package/lib/index.js CHANGED
@@ -2223,7 +2223,7 @@ Link.propTypes = {
2223
2223
  };
2224
2224
  Link.displayName = 'Link';
2225
2225
 
2226
- function Loader(_a) {
2226
+ var Loader = React__default.forwardRef(function (_a, ref) {
2227
2227
  var className = _a.className, _b = _a.variant, variant = _b === void 0 ? 'small' : _b, label = _a.label, props = tslib.__rest(_a, ["className", "variant", "label"]);
2228
2228
  if (label === null || label === void 0 ? void 0 : label.length) {
2229
2229
  props['role'] = 'alert';
@@ -2232,12 +2232,8 @@ function Loader(_a) {
2232
2232
  else {
2233
2233
  props['aria-hidden'] = true;
2234
2234
  }
2235
- return (React__default.createElement("div", tslib.__assign({ className: classNames('Loader', className, variant === 'large'
2236
- ? 'Loader--large'
2237
- : variant === 'small'
2238
- ? 'Loader--small'
2239
- : '') }, props)));
2240
- }
2235
+ return (React__default.createElement("div", tslib.__assign({ ref: ref, className: classNames('Loader', className, variant === 'large' && 'Loader--large', variant === 'small' && 'Loader--small') }, props)));
2236
+ });
2241
2237
  Loader.propTypes = {
2242
2238
  className: PropTypes.string
2243
2239
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deque/cauldron-react",
3
- "version": "4.4.0-canary.2508e60c",
3
+ "version": "4.4.0-canary.f8ca4e9b",
4
4
  "description": "Fully accessible react components library for Deque Cauldron",
5
5
  "publishConfig": {
6
6
  "access": "public"