@sproutsocial/racine 13.0.2 → 13.1.1
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.
- package/CHANGELOG.md +19 -0
- package/__flow__/EnumIconNames.js +1 -1
- package/__flow__/EnumLogoNames.js +1 -1
- package/__flow__/IconViewBoxes.js +3 -0
- package/__flow__/LogoViewBoxes.js +4 -0
- package/__flow__/Numeral/tests/testNumeral.js +9 -13
- package/__flow__/PartnerLogo/TypePartnerNames.js +1 -1
- package/__flow__/TableHeaderCell/index.js +1 -0
- package/__flow__/utils/react-testing-library.js +10 -5
- package/commonjs/IconViewBoxes.js +3 -0
- package/commonjs/LogoViewBoxes.js +4 -0
- package/commonjs/Numeral/tests/testNumeral.js +9 -11
- package/commonjs/TableHeaderCell/index.js +12 -0
- package/commonjs/utils/react-testing-library.js +8 -11
- package/dist/icon.svg +1 -1
- package/dist/iconList.js +1 -1
- package/dist/logo.svg +1 -1
- package/dist/logoList.js +1 -1
- package/lib/IconViewBoxes.js +3 -0
- package/lib/LogoViewBoxes.js +4 -0
- package/lib/Numeral/tests/testNumeral.js +10 -12
- package/lib/TableHeaderCell/index.js +5 -0
- package/lib/utils/react-testing-library.js +7 -5
- package/package.json +4 -2
package/dist/logoList.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
module.exports = ["bigcommerce-dark","bigcommerce-lockup-dark","bigcommerce-lockup","bigcommerce","bitly-dark","bitly","canva-dark","canva","dropbox-dark","dropbox-lockup-dark","dropbox-lockup","dropbox-wordmark-dark","dropbox-wordmark","dropbox","facebook-audience-network-dark","facebook-audience-network","facebook-dark","facebook-groups-dark","facebook-groups","facebook-shops-dark","facebook-shops","facebook","feedly-dark","feedly","glassdoor-dark","glassdoor","google-analytics-dark","google-analytics","google-business-messages-dark","google-business-messages","google-drive-dark","google-drive","google-my-business-dark","google-my-business","hubspot-dark","hubspot","instagram-dark","instagram","linkedin-audience-network-dark","linkedin-audience-network","linkedin-dark","linkedin","marketo-dark","marketo","messenger-dark","messenger","microsoft-dynamics-dark","microsoft-dynamics","pinterest-dark","pinterest","reddit-dark","reddit","salesforce-dark","salesforce","shopify-dark","shopify","slack-dark","slack","sproutsocial-dark","sproutsocial-lockup-dark","sproutsocial-lockup","sproutsocial-wordmark-dark","sproutsocial-wordmark","sproutsocial","tiktok-dark","tiktok","tripadvisor-dark","tripadvisor","tumblr-dark","tumblr","twitter-audience-network-dark","twitter-audience-network","twitter-dark","twitter","whatsapp-dark","whatsapp","woocommerce-dark","woocommerce","yelp-dark","yelp","youtube-dark","youtube","zendesk-dark","zendesk-lockup-dark","zendesk-lockup","zendesk-wordmark-dark","zendesk-wordmark","zendesk"];
|
|
1
|
+
module.exports = ["apple-app-store-dark","apple-app-store","bigcommerce-dark","bigcommerce-lockup-dark","bigcommerce-lockup","bigcommerce","bitly-dark","bitly","canva-dark","canva","dropbox-dark","dropbox-lockup-dark","dropbox-lockup","dropbox-wordmark-dark","dropbox-wordmark","dropbox","facebook-audience-network-dark","facebook-audience-network","facebook-dark","facebook-groups-dark","facebook-groups","facebook-shops-dark","facebook-shops","facebook","feedly-dark","feedly","glassdoor-dark","glassdoor","google-analytics-dark","google-analytics","google-business-messages-dark","google-business-messages","google-drive-dark","google-drive","google-my-business-dark","google-my-business","google-play-store-dark","google-play-store","hubspot-dark","hubspot","instagram-dark","instagram","linkedin-audience-network-dark","linkedin-audience-network","linkedin-dark","linkedin","marketo-dark","marketo","messenger-dark","messenger","microsoft-dynamics-dark","microsoft-dynamics","pinterest-dark","pinterest","reddit-dark","reddit","salesforce-dark","salesforce","shopify-dark","shopify","slack-dark","slack","sproutsocial-dark","sproutsocial-lockup-dark","sproutsocial-lockup","sproutsocial-wordmark-dark","sproutsocial-wordmark","sproutsocial","tiktok-dark","tiktok","tripadvisor-dark","tripadvisor","tumblr-dark","tumblr","twitter-audience-network-dark","twitter-audience-network","twitter-dark","twitter","whatsapp-dark","whatsapp","woocommerce-dark","woocommerce","yelp-dark","yelp","youtube-dark","youtube","zendesk-dark","zendesk-lockup-dark","zendesk-lockup","zendesk-wordmark-dark","zendesk-wordmark","zendesk"];
|
package/lib/IconViewBoxes.js
CHANGED
|
@@ -158,6 +158,7 @@ module.exports = {
|
|
|
158
158
|
"full-access": "0 0 16 16",
|
|
159
159
|
"gear": "0 0 16 16",
|
|
160
160
|
"gears": "0 0 16 16",
|
|
161
|
+
"github": "0 0 18 18",
|
|
161
162
|
"glassdoor": "0 0 16 16",
|
|
162
163
|
"glasses": "0 0 18 14",
|
|
163
164
|
"globe": "0 0 16 16",
|
|
@@ -295,6 +296,8 @@ module.exports = {
|
|
|
295
296
|
"saved-reply-outline": "0 0 16 12",
|
|
296
297
|
"saved-reply": "0 0 16 12",
|
|
297
298
|
"search": "0 0 16 16",
|
|
299
|
+
"send-again-outline": "0 0 18 18",
|
|
300
|
+
"send-again": "0 0 18 18",
|
|
298
301
|
"sent-message-outline": "0 0 16 14",
|
|
299
302
|
"sent-message": "0 0 16 14",
|
|
300
303
|
"share": "0 0 16 14",
|
package/lib/LogoViewBoxes.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
+
"apple-app-store-dark": "0 0 140 140",
|
|
3
|
+
"apple-app-store": "0 0 140 140",
|
|
2
4
|
"bigcommerce-dark": "0 0 140 140",
|
|
3
5
|
"bigcommerce-lockup-dark": "0 0 291 66",
|
|
4
6
|
"bigcommerce-lockup": "0 0 291 66",
|
|
@@ -33,6 +35,8 @@ module.exports = {
|
|
|
33
35
|
"google-drive": "0 0 140 126",
|
|
34
36
|
"google-my-business-dark": "0 0 140 123",
|
|
35
37
|
"google-my-business": "0 0 140 123",
|
|
38
|
+
"google-play-store-dark": "0 0 140 155",
|
|
39
|
+
"google-play-store": "0 0 140 155",
|
|
36
40
|
"hubspot-dark": "0 0 140 156",
|
|
37
41
|
"hubspot": "0 0 140 156",
|
|
38
42
|
"instagram-dark": "0 0 140 140",
|
|
@@ -7,9 +7,8 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
7
7
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
8
8
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
9
9
|
/* eslint-env jest, node */
|
|
10
|
-
import 'jest-styled-components';
|
|
11
10
|
import React from 'react';
|
|
12
|
-
import { render, fireEvent } from "../../utils/react-testing-library";
|
|
11
|
+
import { render, fireEvent, screen } from "../../utils/react-testing-library";
|
|
13
12
|
import { Numeral } from "../..";
|
|
14
13
|
jest.mock("../constants", function () {
|
|
15
14
|
return _objectSpread(_objectSpread({}, jest.requireActual("../constants")), {}, {
|
|
@@ -24,24 +23,24 @@ var testNumeral = function testNumeral(value) {
|
|
|
24
23
|
tooltipText = texts.tip;
|
|
25
24
|
if (tooltipText) {
|
|
26
25
|
test("Should display ".concat(value, " abbreviated as -> ").concat(mainText, " with tooltip -> ").concat(tooltipText, " "), /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
27
|
-
var _render, container,
|
|
26
|
+
var _render, container, numeral, tooltip, content;
|
|
28
27
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
29
28
|
while (1) {
|
|
30
29
|
switch (_context.prev = _context.next) {
|
|
31
30
|
case 0:
|
|
32
31
|
_render = render( /*#__PURE__*/React.createElement(Numeral, _extends({
|
|
33
32
|
number: value
|
|
34
|
-
}, options))), container = _render.container
|
|
35
|
-
numeral = getByText(mainText);
|
|
33
|
+
}, options))), container = _render.container;
|
|
34
|
+
numeral = screen.getByText(mainText);
|
|
36
35
|
tooltip = container.querySelector('[data-qa-tooltip]');
|
|
37
36
|
fireEvent.mouseOver(numeral);
|
|
38
37
|
_context.next = 6;
|
|
39
|
-
return findByText(tooltipText);
|
|
38
|
+
return screen.findByText(tooltipText);
|
|
40
39
|
case 6:
|
|
41
40
|
content = _context.sent;
|
|
42
|
-
expect(numeral).
|
|
41
|
+
expect(numeral).toBeInTheDocument();
|
|
43
42
|
expect(tooltip).toBeTruthy();
|
|
44
|
-
expect(content).
|
|
43
|
+
expect(content).toBeInTheDocument();
|
|
45
44
|
case 10:
|
|
46
45
|
case "end":
|
|
47
46
|
return _context.stop();
|
|
@@ -54,11 +53,10 @@ var testNumeral = function testNumeral(value) {
|
|
|
54
53
|
var _render2 = render( /*#__PURE__*/React.createElement(Numeral, _extends({
|
|
55
54
|
number: value
|
|
56
55
|
}, options))),
|
|
57
|
-
container = _render2.container
|
|
58
|
-
|
|
59
|
-
var numeral = getByText(mainText);
|
|
56
|
+
container = _render2.container;
|
|
57
|
+
var numeral = screen.getByText(mainText);
|
|
60
58
|
var tooltip = container.querySelector('[data-qa-tooltip]');
|
|
61
|
-
expect(numeral).
|
|
59
|
+
expect(numeral).toBeInTheDocument();
|
|
62
60
|
expect(tooltip).toBeFalsy();
|
|
63
61
|
});
|
|
64
62
|
}
|
|
@@ -18,6 +18,11 @@ import * as React from 'react';
|
|
|
18
18
|
import Icon from "../Icon";
|
|
19
19
|
import Container, { SortIcon } from "./styles";
|
|
20
20
|
import { SORT_DIRECTIONS } from "./constants";
|
|
21
|
+
export * from "./constants";
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* @deprecated Use TypeEnumSortDirections from root instead
|
|
25
|
+
*/
|
|
21
26
|
/**
|
|
22
27
|
* The table header cell component is for rendering table header cells and is meant to be used with the table component.
|
|
23
28
|
*/
|
|
@@ -6,14 +6,14 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
6
6
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
7
7
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
8
8
|
import * as React from 'react';
|
|
9
|
-
import { act, cleanup, createEvent, fireEvent, queries, render, screen, wait, waitFor, waitForElement, waitForElementToBeRemoved, within } from '@testing-library/react';
|
|
9
|
+
import { act, cleanup, createEvent, fireEvent, queries, render, screen as defaultScreen, wait, waitFor, waitForElement, waitForElementToBeRemoved, within } from '@testing-library/react';
|
|
10
10
|
import userEvent from '@testing-library/user-event';
|
|
11
11
|
import ThemeProvider from "../ThemeProvider";
|
|
12
12
|
import { a11yCheck } from "./a11yTest";
|
|
13
13
|
import { dataQaLabelQueries } from "./dataQaLabelQueries";
|
|
14
14
|
var sproutQueries = _objectSpread(_objectSpread({}, queries), dataQaLabelQueries);
|
|
15
15
|
var customRender = function customRender(node, options) {
|
|
16
|
-
var
|
|
16
|
+
var utils = render(node, _objectSpread(_objectSpread({}, options), {}, {
|
|
17
17
|
queries: sproutQueries,
|
|
18
18
|
wrapper: ThemeProvider
|
|
19
19
|
}));
|
|
@@ -24,7 +24,7 @@ var customRender = function customRender(node, options) {
|
|
|
24
24
|
switch (_context.prev = _context.next) {
|
|
25
25
|
case 0:
|
|
26
26
|
_context.next = 2;
|
|
27
|
-
return a11yCheck(
|
|
27
|
+
return a11yCheck(utils.container);
|
|
28
28
|
case 2:
|
|
29
29
|
case "end":
|
|
30
30
|
return _context.stop();
|
|
@@ -36,11 +36,13 @@ var customRender = function customRender(node, options) {
|
|
|
36
36
|
return _ref.apply(this, arguments);
|
|
37
37
|
};
|
|
38
38
|
}();
|
|
39
|
-
return _objectSpread(_objectSpread({},
|
|
39
|
+
return _objectSpread(_objectSpread({}, utils), {}, {
|
|
40
40
|
runA11yCheck: runA11yCheck
|
|
41
41
|
});
|
|
42
42
|
};
|
|
43
43
|
var customWithin = function customWithin(element) {
|
|
44
44
|
return within(element, sproutQueries);
|
|
45
45
|
};
|
|
46
|
-
|
|
46
|
+
var boundQueries = within(document.body, sproutQueries);
|
|
47
|
+
var customScreen = _objectSpread(_objectSpread({}, defaultScreen), boundQueries);
|
|
48
|
+
export { act, cleanup, createEvent, customRender as render, customWithin as within, fireEvent, customScreen as screen, userEvent, wait, waitFor, waitForElement, waitForElementToBeRemoved };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sproutsocial/racine",
|
|
3
|
-
"version": "13.
|
|
3
|
+
"version": "13.1.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"files": [
|
|
6
6
|
"__flow__",
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
"@sproutsocial/seeds-color": "^1.5.3",
|
|
99
99
|
"@sproutsocial/seeds-depth": "^3.0.0",
|
|
100
100
|
"@sproutsocial/seeds-motion": "^1.2.0",
|
|
101
|
-
"@sproutsocial/seeds-networkcolor": "^2.
|
|
101
|
+
"@sproutsocial/seeds-networkcolor": "^2.11.0",
|
|
102
102
|
"@sproutsocial/seeds-space": "^0.4.7",
|
|
103
103
|
"@sproutsocial/seeds-typography": "^3.0.1",
|
|
104
104
|
"@storybook/addon-a11y": "^6.4.19",
|
|
@@ -135,10 +135,12 @@
|
|
|
135
135
|
"eslint-plugin-flowtype": "^5.7.2",
|
|
136
136
|
"eslint-plugin-import": "^2.26.0",
|
|
137
137
|
"eslint-plugin-jest": "^27.1.5",
|
|
138
|
+
"eslint-plugin-jest-dom": "^4.0.3",
|
|
138
139
|
"eslint-plugin-jsx-a11y": "^6.3.1",
|
|
139
140
|
"eslint-plugin-prettier": "^3.1.4",
|
|
140
141
|
"eslint-plugin-react": "^7.31.10",
|
|
141
142
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
143
|
+
"eslint-plugin-testing-library": "^5.9.1",
|
|
142
144
|
"flow-bin": "0.131.0",
|
|
143
145
|
"glob": "^7.1.6",
|
|
144
146
|
"husky": "^0.14.3",
|