@ebay/ui-core-react 3.10.1 → 3.10.2

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,6 +1,6 @@
1
- import { FC, ReactNode } from 'react';
1
+ import React, { FC, ReactNode } from 'react';
2
2
  import { NoticeStatus } from './types';
3
- declare type Props = {
3
+ declare type Props = React.ComponentProps<'div'> & {
4
4
  status?: NoticeStatus;
5
5
  onNoticeShow?: () => void;
6
6
  'aria-label': string;
@@ -1 +1 @@
1
- {"version":3,"file":"inline-notice.d.ts","sourceRoot":"","sources":["../../src/ebay-inline-notice/inline-notice.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAa,SAAS,EAAE,MAAM,OAAO,CAAA;AAMvD,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAEtC,aAAK,KAAK,GAAG;IACT,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACxB,CAAA;AAED,QAAA,MAAM,gBAAgB,EAAE,EAAE,CAAC,KAAK,CAsC/B,CAAA;AAED,eAAe,gBAAgB,CAAA"}
1
+ {"version":3,"file":"inline-notice.d.ts","sourceRoot":"","sources":["../../src/ebay-inline-notice/inline-notice.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,EAAa,SAAS,EAAE,MAAM,OAAO,CAAA;AAMvD,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAEtC,aAAK,KAAK,GAAG,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IACvC,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACxB,CAAA;AAED,QAAA,MAAM,gBAAgB,EAAE,EAAE,CAAC,KAAK,CA0C/B,CAAA;AAED,eAAe,gBAAgB,CAAA"}
@@ -29,6 +29,17 @@ var __importStar = (this && this.__importStar) || function (mod) {
29
29
  __setModuleDefault(result, mod);
30
30
  return result;
31
31
  };
32
+ var __rest = (this && this.__rest) || function (s, e) {
33
+ var t = {};
34
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
35
+ t[p] = s[p];
36
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
37
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
38
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
39
+ t[p[i]] = s[p[i]];
40
+ }
41
+ return t;
42
+ };
32
43
  var __importDefault = (this && this.__importDefault) || function (mod) {
33
44
  return (mod && mod.__esModule) ? mod : { "default": mod };
34
45
  };
@@ -40,7 +51,8 @@ var notice_content_1 = __importDefault(require("../common/notice-utils/notice-co
40
51
  var component_utils_1 = require("../common/component-utils");
41
52
  var ebay_icon_1 = require("../ebay-icon");
42
53
  var EbayInlineNotice = function (_a) {
43
- var className = _a.className, _b = _a.status, status = _b === void 0 ? 'general' : _b, children = _a.children, _c = _a.hidden, hidden = _c === void 0 ? false : _c, ariaLabel = _a["aria-label"], _d = _a.onNoticeShow, onNoticeShow = _d === void 0 ? function () { } : _d;
54
+ var _b;
55
+ var className = _a.className, _c = _a.status, status = _c === void 0 ? 'general' : _c, children = _a.children, _d = _a.hidden, hidden = _d === void 0 ? false : _d, ariaLabel = _a["aria-label"], _e = _a.onNoticeShow, onNoticeShow = _e === void 0 ? function () { } : _e, rest = __rest(_a, ["className", "status", "children", "hidden", 'aria-label', "onNoticeShow"]);
44
56
  react_1.useEffect(function () {
45
57
  if (!hidden) {
46
58
  onNoticeShow();
@@ -54,7 +66,7 @@ var EbayInlineNotice = function (_a) {
54
66
  throw new Error("EbayInlineNotice: Please use a EbayNoticeContent that defines the content of the notice");
55
67
  }
56
68
  var isGeneral = status === "general";
57
- return (react_1.default.createElement("div", { className: classnames_1.default(className, "inline-notice " + (!isGeneral ? "inline-notice--" + status : "")) },
69
+ return (react_1.default.createElement("div", __assign({}, rest, { className: classnames_1.default(className, 'inline-notice', (_b = {}, _b["inline-notice--" + status] = !isGeneral, _b)) }),
58
70
  !isGeneral ? (react_1.default.createElement("span", { className: "inline-notice__header" },
59
71
  react_1.default.createElement(ebay_icon_1.EbayIcon, { name: status + "FilledSmall", a11yText: ariaLabel, a11yVariant: "label" }))) : null,
60
72
  react_1.default.createElement(notice_content_1.default, __assign({}, content.props, { type: "inline" }))));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ebay/ui-core-react",
3
- "version": "3.10.1",
3
+ "version": "3.10.2",
4
4
  "description": "Skin components build off React",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",