@ebay/ui-core-react 7.0.1 → 7.0.3

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.
@@ -13,6 +13,10 @@ import { EbayButton } from '@ebay/ui-core-react/ebay-button'
13
13
  ```jsx harmony
14
14
  import "@ebay/skin/button"
15
15
  ```
16
+ ### If tokens haven't been added to the project at a higher level, make sure to import
17
+ ```jsx harmony
18
+ import '@ebay/skin/tokens';
19
+ ```
16
20
  ### Or import styles using SCSS/CSS
17
21
  ```jsx harmony
18
22
  import '@ebay/skin/button.css'
@@ -22,6 +22,18 @@ import '@ebay/skin/checkbox'
22
22
  import '@ebay/skin/checkbox.css'
23
23
  ```
24
24
 
25
+ ## Import EbaySvg
26
+
27
+ After you render the EbayCheckbox component in your application, if you do not see the checkbox svg, you should add import and render EbaySvg component once at the root level of your application (usually layout file).
28
+
29
+ ```jsx
30
+ import { EbaySvg } from "@ebay/ui-core-react/ebay-svg";
31
+
32
+ // Render this in your layout or root level component.
33
+ <EbaySvg />
34
+ ```
35
+
36
+
25
37
  ```jsx
26
38
  import { EbayLabel } from '@ebay/ui-core-react/ebay-field';
27
39
 
@@ -95,7 +95,7 @@ const EbayDrawerDialog = (_a) => {
95
95
  const childrenArray = react_1.Children.toArray(children);
96
96
  const header = childrenArray.find(({ type }) => type === ebay_dialog_base_1.EbayDialogHeader);
97
97
  const withoutHeader = childrenArray.filter(({ type }) => type !== ebay_dialog_base_1.EbayDialogHeader);
98
- return (react_1.default.createElement(ebay_dialog_base_1.DialogBaseWithState, Object.assign({}, rest, { classPrefix: classPrefix, onCloseBtnClick: onClose, className: (0, classnames_1.default)(rest.className, `${classPrefix}--mask-fade-slow`), windowClass: (0, classnames_1.default)(`${classPrefix}__window`, `${classPrefix}__window--slide`, {
98
+ return (react_1.default.createElement(ebay_dialog_base_1.DialogBaseWithState, Object.assign({}, rest, { classPrefix: classPrefix, onCloseBtnClick: onClose, className: (0, classnames_1.default)(rest.className, `${classPrefix}--mask-fade-slow`), windowClass: (0, classnames_1.default)(rest.windowClass, `${classPrefix}__window`, `${classPrefix}__window--slide`, {
99
99
  [`${classPrefix}__window--expanded`]: expanded
100
100
  }), onBackgroundClick: onClose, top: handle }),
101
101
  header || react_1.default.createElement(ebay_dialog_base_1.EbayDialogHeader, null),
@@ -13,11 +13,13 @@ import { EbayIconButton } from '@ebay/ui-core-react/ebay-icon-button'
13
13
 
14
14
  ### Import following styles from SKIN
15
15
  ```jsx harmony
16
+ import "@ebay/skin/icon"
16
17
  import "@ebay/skin/icon-button"
17
18
  ```
18
19
 
19
20
  ### Or import styles using SCSS/CSS
20
21
  ```jsx harmony
22
+ import '@ebay/skin/icon.css'
21
23
  import '@ebay/skin/icon-button.css'
22
24
  ```
23
25
 
@@ -1 +1 @@
1
- {"version":3,"file":"section-notice.d.ts","sourceRoot":"","sources":["../../src/ebay-section-notice/section-notice.tsx"],"names":[],"mappings":"AAAA,OAAc,EACV,cAAc,EACd,EAAE,EAEF,oBAAoB,EAEpB,iBAAiB,EAEpB,MAAM,OAAO,CAAA;AAId,OAAO,EAAY,IAAI,EAAE,MAAM,cAAc,CAAA;AAG7C,MAAM,MAAM,mBAAmB,GAAG,SAAS,GAAG,MAAM,GAAG,WAAW,GAAG,cAAc,GAAG,aAAa,GAAG,WAAW,CAAA;AACjH,MAAM,MAAM,KAAK,GAAG,cAAc,CAAC,SAAS,CAAC,GAAG;IAC5C,MAAM,CAAC,EAAE,mBAAmB,CAAC;IAC7B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,iBAAiB,GAAG,oBAAoB,CAAC;IACrD,aAAa,CAAC,EAAE,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;CACvB,CAAA;AAED,QAAA,MAAM,iBAAiB,EAAE,EAAE,CAAC,KAAK,CAoEhC,CAAA;AAED,eAAe,iBAAiB,CAAA"}
1
+ {"version":3,"file":"section-notice.d.ts","sourceRoot":"","sources":["../../src/ebay-section-notice/section-notice.tsx"],"names":[],"mappings":"AAAA,OAAc,EACV,cAAc,EACd,EAAE,EAEF,oBAAoB,EAEpB,iBAAiB,EAEpB,MAAM,OAAO,CAAA;AAId,OAAO,EAAY,IAAI,EAAE,MAAM,cAAc,CAAA;AAI7C,MAAM,MAAM,mBAAmB,GAAG,SAAS,GAAG,MAAM,GAAG,WAAW,GAAG,cAAc,GAAG,aAAa,GAAG,WAAW,CAAA;AACjH,MAAM,MAAM,KAAK,GAAG,cAAc,CAAC,SAAS,CAAC,GAAG;IAC5C,MAAM,CAAC,EAAE,mBAAmB,CAAC;IAC7B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,iBAAiB,GAAG,oBAAoB,CAAC;IACrD,aAAa,CAAC,EAAE,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;CACvB,CAAA;AAED,QAAA,MAAM,iBAAiB,EAAE,EAAE,CAAC,KAAK,CA2EhC,CAAA;AAED,eAAe,iBAAiB,CAAA"}
@@ -43,9 +43,14 @@ const ebay_notice_content_1 = require("../ebay-notice-base/components/ebay-notic
43
43
  const notice_content_1 = __importDefault(require("../common/notice-utils/notice-content"));
44
44
  const ebay_icon_1 = require("../ebay-icon");
45
45
  const index_1 = require("./index");
46
+ const random_id_1 = require("../common/random-id");
46
47
  const EbaySectionNotice = (_a) => {
47
48
  var { status = 'general', children, className, 'aria-label': ariaLabel, 'aria-roledescription': ariaRoleDescription = 'Notice', a11yDismissText, educationIcon, iconClass, prominent, onDismiss = () => { } } = _a, rest = __rest(_a, ["status", "children", "className", 'aria-label', 'aria-roledescription', "a11yDismissText", "educationIcon", "iconClass", "prominent", "onDismiss"]);
48
49
  const [dismissed, setDismissed] = (0, react_1.useState)(false);
50
+ const [rId, setRandomId] = (0, react_1.useState)('');
51
+ (0, react_1.useEffect)(() => {
52
+ setRandomId((0, random_id_1.randomId)());
53
+ }, []);
49
54
  const childrenArray = react_1.default.Children.toArray(children);
50
55
  const content = childrenArray.find(({ type }) => type === ebay_notice_content_1.EbayNoticeContent);
51
56
  const hasStatus = status !== 'general' && status !== 'none';
@@ -70,8 +75,8 @@ const EbaySectionNotice = (_a) => {
70
75
  [`section-notice--${status}`]: hasStatus,
71
76
  'section-notice--education': isEducational && prominent,
72
77
  'section-notice--large-icon': isEducational
73
- }), role: "region", "aria-label": !hasStatus ? ariaLabel : null, "aria-labelledby": hasStatus ? `section-notice-${status}` : null, "aria-roledescription": ariaRoleDescription }),
74
- iconName && (react_1.default.createElement("div", { className: "section-notice__header", id: `section-notice-${status}` },
78
+ }), role: "region", "aria-label": !hasStatus ? ariaLabel : null, "aria-labelledby": hasStatus ? `section-notice-${status}-${rId}` : null, "aria-roledescription": ariaRoleDescription }),
79
+ iconName && (react_1.default.createElement("div", { className: "section-notice__header", id: `section-notice-${status}-${rId}` },
75
80
  react_1.default.createElement(ebay_icon_1.EbayIcon, { className: iconClass, name: iconName, a11yText: ariaLabel, a11yVariant: "label" }))),
76
81
  react_1.default.createElement(notice_content_1.default, Object.assign({}, content.props, { type: "section" })),
77
82
  children,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ebay/ui-core-react",
3
- "version": "7.0.1",
3
+ "version": "7.0.3",
4
4
  "description": "Skin components build off React",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org"
@@ -23,7 +23,8 @@
23
23
  "update-icons": "node ./scripts/update-icons",
24
24
  "copy": "copyfiles package.json README.md lib; yarn copy:rest",
25
25
  "copy:rest": "yarn copyfiles -u 1 'src/**/*.md' lib",
26
- "prerelease": "npm version prerelease --preid rc && yarn clean && yarn build && yarn copy && CI=1 npm publish --tag rc lib/",
26
+ "release": "yarn build && yarn copy && CI=1 npm publish lib/ --access public",
27
+ "release:rc": "npm version prerelease --preid rc && yarn clean && yarn build && yarn copy && CI=1 npm publish --tag rc lib/",
27
28
  "prepare": "node scripts/husky-install || node ../scripts/husky-install"
28
29
  },
29
30
  "lint-staged": {