@sproutsocial/racine 12.22.0 → 12.23.0
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 +12 -0
- package/README.md +2 -0
- package/__flow__/Avatar/__tests__/features.test.js +98 -0
- package/__flow__/Banner/index.js +2 -1
- package/__flow__/CharacterCounter/index.test.js +1 -1
- package/__flow__/Collapsible/index.js +2 -2
- package/__flow__/Drawer/index.js +11 -0
- package/__flow__/Drawer/index.stories.js +2 -1
- package/__flow__/EmptyState/index.test.js +1 -1
- package/__flow__/EnumIllustrationNames.js +1 -1
- package/__flow__/Fieldset/index.js +1 -1
- package/__flow__/IllustrationViewBoxes.js +1 -1
- package/__flow__/Indicator/index.js +1 -1
- package/__flow__/Input/index.js +2 -1
- package/__flow__/Link/index.js +2 -1
- package/__flow__/Link/index.test.js +2 -0
- package/__flow__/Listbox/index.stories.js +1 -0
- package/__flow__/Loader/index.js +1 -1
- package/__flow__/Modal/index.stories.js +1 -1
- package/__flow__/Numeral/tests/testNumeral.js +1 -0
- package/__flow__/Popout/index.js +1 -1
- package/__flow__/Portal/index.stories.js +7 -7
- package/__flow__/SegmentedControl/index.js +1 -1
- package/__flow__/SpotIllustration/illustrationNames.js +1 -0
- package/__flow__/SpotIllustration/spotIllustrations/campaign-tag.svg +6 -0
- package/__flow__/SpotIllustration/spotIllustrations/tag.svg +4 -4
- package/__flow__/Table/index.js +4 -4
- package/__flow__/TableCell/index.js +1 -1
- package/__flow__/TableHeaderCell/index.js +1 -1
- package/__flow__/Tabs/index.js +1 -1
- package/__flow__/Textarea/index.js +1 -1
- package/__flow__/Toast/index.js +1 -1
- package/__flow__/Toast/styles.js +1 -1
- package/__flow__/TokenInput/index.stories.js +4 -4
- package/__flow__/TokenInput/tests/default/pasting.test.js +6 -2
- package/__flow__/code-guidelines.mdx +244 -0
- package/__flow__/setupTests.js +1 -0
- package/__flow__/utils/a11yTest.js +1 -0
- package/__flow__/utils/system-props.js +1 -0
- package/commonjs/Avatar/index.js +19 -10
- package/commonjs/Badge/constants.js +3 -1
- package/commonjs/Badge/index.js +7 -3
- package/commonjs/Badge/styles.js +4 -2
- package/commonjs/Banner/index.js +9 -4
- package/commonjs/Banner/styles.js +5 -2
- package/commonjs/Box/index.js +5 -2
- package/commonjs/Box/styles.js +3 -1
- package/commonjs/Breadcrumb/index.js +12 -5
- package/commonjs/Breadcrumb/styles.js +3 -1
- package/commonjs/Button/index.js +7 -3
- package/commonjs/Button/styles.js +6 -3
- package/commonjs/Card/index.js +7 -3
- package/commonjs/Card/styles.js +3 -1
- package/commonjs/CharacterCounter/index.js +39 -22
- package/commonjs/CharacterCounter/styles.js +5 -2
- package/commonjs/ChartLegend/index.js +7 -3
- package/commonjs/ChartLegend/styles.js +5 -2
- package/commonjs/Checkbox/index.js +117 -97
- package/commonjs/Checkbox/styles.js +5 -2
- package/commonjs/Collapsible/index.js +27 -12
- package/commonjs/Collapsible/styles.js +4 -2
- package/commonjs/DatePicker/DateRangePicker.js +7 -3
- package/commonjs/DatePicker/SingleDatePicker.js +7 -3
- package/commonjs/DatePicker/StatefulDateRangePicker.js +19 -7
- package/commonjs/DatePicker/StatefulSingleDatePicker.js +16 -5
- package/commonjs/DatePicker/common.js +4 -2
- package/commonjs/DatePicker/index.js +15 -3
- package/commonjs/DatePicker/styles.js +5 -2
- package/commonjs/Drawer/SlideTransition.js +9 -5
- package/commonjs/Drawer/index.js +15 -7
- package/commonjs/Drawer/styles.js +5 -2
- package/commonjs/EmptyState/index.js +7 -3
- package/commonjs/Fieldset/index.js +10 -6
- package/commonjs/Fieldset/styles.js +5 -2
- package/commonjs/FormField/index.js +17 -6
- package/commonjs/Icon/deprecatedIcons.js +3 -1
- package/commonjs/Icon/index.js +9 -5
- package/commonjs/Icon/styles.js +6 -3
- package/commonjs/IllustrationViewBoxes.js +2 -1
- package/commonjs/Image/index.js +78 -58
- package/commonjs/Image/styles.js +5 -2
- package/commonjs/Indicator/index.js +40 -23
- package/commonjs/Indicator/styles.js +4 -2
- package/commonjs/Input/index.js +156 -132
- package/commonjs/Input/styles.js +5 -2
- package/commonjs/KeyboardKey/index.js +30 -14
- package/commonjs/KeyboardKey/styles.js +3 -1
- package/commonjs/Label/index.js +32 -16
- package/commonjs/Link/constants.js +3 -1
- package/commonjs/Link/index.js +9 -4
- package/commonjs/Link/styles.js +5 -2
- package/commonjs/Listbox/index.js +15 -8
- package/commonjs/Loader/index.js +43 -26
- package/commonjs/Loader/styles.js +5 -2
- package/commonjs/LoaderButton/index.js +7 -3
- package/commonjs/Menu/constants.js +3 -1
- package/commonjs/Menu/descendants.js +35 -20
- package/commonjs/Menu/hooks.js +8 -8
- package/commonjs/Menu/index.flow.js +2 -1
- package/commonjs/Menu/index.js +44 -27
- package/commonjs/Menu/names.js +3 -1
- package/commonjs/Menu/styles.js +6 -3
- package/commonjs/Message/index.js +7 -3
- package/commonjs/Message/styles.js +4 -2
- package/commonjs/Modal/index.js +9 -5
- package/commonjs/Modal/styles.js +9 -5
- package/commonjs/Numeral/constants.js +3 -1
- package/commonjs/Numeral/index.js +16 -5
- package/commonjs/Numeral/styles.js +3 -1
- package/commonjs/Numeral/tests/testNumeral.js +16 -11
- package/commonjs/OverflowList/index.flow.js +2 -1
- package/commonjs/OverflowList/index.js +6 -3
- package/commonjs/OverflowList/styles.js +5 -2
- package/commonjs/PartnerLogo/index.js +9 -6
- package/commonjs/PartnerLogo/styles.js +5 -2
- package/commonjs/Popout/index.js +28 -13
- package/commonjs/Popout/styles.js +3 -1
- package/commonjs/Portal/index.js +50 -30
- package/commonjs/Radio/index.js +73 -56
- package/commonjs/Radio/styles.js +5 -2
- package/commonjs/SegmentedControl/index.js +21 -9
- package/commonjs/SegmentedControl/styles.js +5 -2
- package/commonjs/Select/index.js +78 -61
- package/commonjs/Select/styles.js +8 -5
- package/commonjs/Skeleton/index.js +4 -2
- package/commonjs/SpotIllustration/illustrationNames.js +4 -2
- package/commonjs/SpotIllustration/index.js +5 -3
- package/commonjs/Stack/index.js +7 -3
- package/commonjs/Switch/index.js +52 -35
- package/commonjs/Switch/styles.js +6 -3
- package/commonjs/Table/index.js +14 -10
- package/commonjs/Table/styles.js +3 -1
- package/commonjs/TableCell/index.js +39 -23
- package/commonjs/TableCell/styles.js +3 -1
- package/commonjs/TableHeaderCell/index.js +54 -37
- package/commonjs/TableHeaderCell/styles.js +5 -2
- package/commonjs/TableRowAccordion/index.js +61 -44
- package/commonjs/TableRowAccordion/styles.js +5 -2
- package/commonjs/Tabs/index.js +116 -90
- package/commonjs/Tabs/styles.js +8 -5
- package/commonjs/Text/index.js +7 -3
- package/commonjs/Text/styles.js +5 -2
- package/commonjs/Textarea/index.js +104 -87
- package/commonjs/Textarea/styles.js +5 -2
- package/commonjs/ThemeProvider/index.js +5 -2
- package/commonjs/Toast/index.js +7 -8
- package/commonjs/Toast/styles.js +5 -2
- package/commonjs/ToggleHint/index.js +43 -26
- package/commonjs/ToggleHint/styles.js +6 -3
- package/commonjs/Token/index.js +7 -3
- package/commonjs/Token/styles.js +5 -2
- package/commonjs/TokenInput/index.js +221 -192
- package/commonjs/TokenInput/styles.js +5 -2
- package/commonjs/TokenInput/util.js +5 -3
- package/commonjs/Tooltip/index.js +30 -14
- package/commonjs/Tooltip/styles.js +3 -1
- package/commonjs/VisuallyHidden/index.js +3 -1
- package/commonjs/dataviz/index.js +3 -1
- package/commonjs/index.js +451 -84
- package/commonjs/systemProps/background.js +3 -1
- package/commonjs/systemProps/border.js +3 -1
- package/commonjs/systemProps/color.js +3 -1
- package/commonjs/systemProps/custom.js +3 -1
- package/commonjs/systemProps/flexbox.js +3 -1
- package/commonjs/systemProps/grid.js +3 -1
- package/commonjs/systemProps/index.js +87 -15
- package/commonjs/systemProps/layout.js +3 -1
- package/commonjs/systemProps/position.js +3 -1
- package/commonjs/systemProps/shadow.js +3 -1
- package/commonjs/systemProps/space.js +3 -1
- package/commonjs/systemProps/systemProps.js +3 -1
- package/commonjs/systemProps/typography.js +3 -1
- package/commonjs/systemProps/variant.js +3 -1
- package/commonjs/themes/dark/dataviz-palette.js +3 -1
- package/commonjs/themes/dark/decorative-palettes.js +3 -1
- package/commonjs/themes/dark/theme.js +11 -7
- package/commonjs/themes/extendedThemes/sproutTheme/dark/theme.js +9 -5
- package/commonjs/themes/extendedThemes/sproutTheme/index.js +15 -4
- package/commonjs/themes/extendedThemes/sproutTheme/light/theme.js +8 -4
- package/commonjs/themes/light/dataviz-palette.js +3 -1
- package/commonjs/themes/light/decorative-palettes.js +3 -1
- package/commonjs/themes/light/literal-colors.js +3 -1
- package/commonjs/themes/light/theme.js +17 -13
- package/commonjs/utils/a11yTest.js +5 -2
- package/commonjs/utils/chartColors.js +3 -1
- package/commonjs/utils/constants.js +3 -1
- package/commonjs/utils/dataQaLabelQueries.js +26 -16
- package/commonjs/utils/hooks.js +39 -26
- package/commonjs/utils/index.js +18 -8
- package/commonjs/utils/innerText.js +4 -2
- package/commonjs/utils/mixins.js +3 -1
- package/commonjs/utils/react-testing-library.js +74 -18
- package/commonjs/utils/responsiveProps/index.js +16 -8
- package/commonjs/utils/system-props.js +6 -2
- package/commonjs/utils/useInteractiveColor.js +3 -1
- package/dist/illustration.svg +1 -1
- package/dist/illustrationList.js +1 -1
- package/dist/themes/dark/theme.scss +0 -1
- package/dist/themes/extendedThemes/sproutTheme/dark/theme.scss +0 -1
- package/dist/themes/extendedThemes/sproutTheme/light/theme.scss +0 -1
- package/dist/themes/light/theme.scss +0 -1
- package/lib/Avatar/index.js +17 -11
- package/lib/Badge/index.js +5 -4
- package/lib/Badge/styles.js +3 -3
- package/lib/Banner/index.js +7 -5
- package/lib/Banner/styles.js +1 -1
- package/lib/Box/index.js +1 -1
- package/lib/Box/styles.js +1 -1
- package/lib/Breadcrumb/index.js +11 -7
- package/lib/Button/index.js +3 -2
- package/lib/Button/styles.js +4 -4
- package/lib/Card/index.js +3 -2
- package/lib/Card/styles.js +2 -2
- package/lib/CharacterCounter/index.js +36 -21
- package/lib/CharacterCounter/styles.js +1 -1
- package/lib/ChartLegend/index.js +5 -4
- package/lib/ChartLegend/styles.js +1 -1
- package/lib/Checkbox/index.js +114 -96
- package/lib/Checkbox/styles.js +5 -5
- package/lib/Collapsible/index.js +24 -12
- package/lib/Collapsible/styles.js +2 -2
- package/lib/DatePicker/DateRangePicker.js +4 -3
- package/lib/DatePicker/SingleDatePicker.js +4 -3
- package/lib/DatePicker/StatefulDateRangePicker.js +15 -6
- package/lib/DatePicker/StatefulSingleDatePicker.js +12 -4
- package/lib/DatePicker/common.js +3 -3
- package/lib/DatePicker/index.js +2 -2
- package/lib/DatePicker/styles.js +2 -2
- package/lib/Drawer/SlideTransition.js +4 -3
- package/lib/Drawer/index.js +17 -12
- package/lib/Drawer/styles.js +2 -2
- package/lib/EmptyState/index.js +4 -3
- package/lib/Fieldset/index.js +8 -7
- package/lib/Fieldset/styles.js +1 -1
- package/lib/FormField/index.js +17 -9
- package/lib/Icon/index.js +8 -7
- package/lib/Icon/styles.js +2 -2
- package/lib/IllustrationViewBoxes.js +2 -1
- package/lib/Image/index.js +75 -57
- package/lib/Image/styles.js +1 -1
- package/lib/Indicator/index.js +38 -23
- package/lib/Indicator/styles.js +3 -3
- package/lib/Input/index.js +157 -135
- package/lib/Input/styles.js +2 -2
- package/lib/KeyboardKey/index.js +28 -14
- package/lib/KeyboardKey/styles.js +1 -1
- package/lib/Label/index.js +29 -15
- package/lib/Link/index.js +5 -3
- package/lib/Link/styles.js +3 -3
- package/lib/Listbox/index.js +14 -10
- package/lib/Loader/index.js +40 -25
- package/lib/Loader/styles.js +2 -2
- package/lib/LoaderButton/index.js +5 -4
- package/lib/Menu/descendants.js +30 -18
- package/lib/Menu/hooks.js +7 -9
- package/lib/Menu/index.flow.js +4 -4
- package/lib/Menu/index.js +54 -40
- package/lib/Menu/styles.js +3 -3
- package/lib/Message/index.js +6 -5
- package/lib/Message/styles.js +4 -4
- package/lib/Modal/index.js +9 -8
- package/lib/Modal/styles.js +6 -5
- package/lib/Numeral/index.js +15 -7
- package/lib/Numeral/styles.js +1 -1
- package/lib/Numeral/tests/testNumeral.js +15 -11
- package/lib/OverflowList/index.js +3 -3
- package/lib/OverflowList/styles.js +1 -1
- package/lib/PartnerLogo/index.js +8 -7
- package/lib/PartnerLogo/styles.js +1 -1
- package/lib/Popout/index.js +27 -15
- package/lib/Popout/styles.js +1 -1
- package/lib/Portal/index.js +47 -29
- package/lib/Radio/index.js +70 -55
- package/lib/Radio/styles.js +3 -3
- package/lib/SegmentedControl/index.js +18 -9
- package/lib/SegmentedControl/styles.js +3 -3
- package/lib/Select/index.js +76 -61
- package/lib/Select/styles.js +5 -5
- package/lib/Skeleton/index.js +2 -2
- package/lib/SpotIllustration/illustrationNames.js +1 -1
- package/lib/SpotIllustration/index.js +3 -3
- package/lib/Stack/index.js +4 -3
- package/lib/Switch/index.js +51 -36
- package/lib/Switch/styles.js +4 -4
- package/lib/Table/index.js +12 -11
- package/lib/Table/styles.js +1 -1
- package/lib/TableCell/index.js +36 -22
- package/lib/TableCell/styles.js +1 -1
- package/lib/TableHeaderCell/index.js +52 -37
- package/lib/TableHeaderCell/styles.js +1 -1
- package/lib/TableRowAccordion/index.js +60 -45
- package/lib/TableRowAccordion/styles.js +1 -1
- package/lib/Tabs/index.js +113 -89
- package/lib/Tabs/styles.js +5 -5
- package/lib/Text/index.js +3 -2
- package/lib/Text/styles.js +1 -1
- package/lib/Textarea/index.js +101 -86
- package/lib/Textarea/styles.js +2 -2
- package/lib/ThemeProvider/index.js +1 -1
- package/lib/Toast/index.js +6 -10
- package/lib/Toast/styles.js +4 -3
- package/lib/ToggleHint/index.js +41 -26
- package/lib/ToggleHint/styles.js +3 -3
- package/lib/Token/index.js +6 -5
- package/lib/Token/styles.js +3 -3
- package/lib/TokenInput/index.js +223 -196
- package/lib/TokenInput/styles.js +2 -2
- package/lib/TokenInput/util.js +2 -2
- package/lib/Tooltip/index.js +28 -14
- package/lib/Tooltip/styles.js +1 -1
- package/lib/VisuallyHidden/index.js +1 -1
- package/lib/dataviz/index.js +1 -1
- package/lib/index.js +64 -64
- package/lib/systemProps/index.js +14 -14
- package/lib/systemProps/systemProps.js +12 -12
- package/lib/themes/dark/theme.js +11 -9
- package/lib/themes/extendedThemes/sproutTheme/dark/theme.js +7 -5
- package/lib/themes/extendedThemes/sproutTheme/index.js +2 -2
- package/lib/themes/extendedThemes/sproutTheme/light/theme.js +6 -4
- package/lib/themes/light/theme.js +17 -15
- package/lib/types/theme.colors.flow.js +2 -2
- package/lib/types/theme.flow.js +2 -2
- package/lib/utils/a11yTest.js +3 -1
- package/lib/utils/dataQaLabelQueries.js +23 -15
- package/lib/utils/hooks.js +37 -26
- package/lib/utils/index.js +15 -7
- package/lib/utils/innerText.js +1 -1
- package/lib/utils/mixins.js +1 -1
- package/lib/utils/react-testing-library.js +11 -8
- package/lib/utils/responsiveProps/index.js +14 -8
- package/lib/utils/system-props.js +1 -0
- package/package.json +16 -27
- package/__flow__/Avatar/index.test.js +0 -23
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 12.23.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- b9585e91: Adds a campaign spot illustration to SpotIllustration and updates the tag illustration
|
|
8
|
+
|
|
9
|
+
## 12.22.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 67770645: Update loader-utils to fix security vulnerabilities
|
|
14
|
+
|
|
3
15
|
## 12.22.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -140,6 +140,8 @@ $ yarn
|
|
|
140
140
|
|
|
141
141
|
The Design Systems team works on a regular two-week sprint cadence to iterate against Racine's roadmap and assist in any ad-hoc issues that may come up. That said, contributions to Racine are welcomed from any member of the wider Sprout org. Whether you're adding a new component or simply fixing a bug, every improvement to the library is future leverage for our peers, our product, and our customers.
|
|
142
142
|
|
|
143
|
+
When writing code for Racine, please refer to the `code-guidelines.mdx` story in Storybook.
|
|
144
|
+
|
|
143
145
|
### **🔍 Step 1: Find a way to contribute**
|
|
144
146
|
|
|
145
147
|
There are a few ways to get involved:
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
// @flow
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import {render, screen} from '../../utils/react-testing-library';
|
|
4
|
+
import Avatar from '../index';
|
|
5
|
+
|
|
6
|
+
// This top level describe should be used to describe the component and what we are testing
|
|
7
|
+
describe('Avatar/features', () => {
|
|
8
|
+
// Each describe should describe an intentional feature of the component
|
|
9
|
+
|
|
10
|
+
describe('When an image is provided', () => {
|
|
11
|
+
// Each test should describe the expected behavior of the feature and its fallbacks
|
|
12
|
+
it('should render an image correctly', () => {
|
|
13
|
+
const imgSrc = 'https://github.com/kentcdodds.png';
|
|
14
|
+
render(<Avatar name="John Doe" src={imgSrc} />);
|
|
15
|
+
const image = screen.getByAltText('John Doe');
|
|
16
|
+
expect(image).toHaveAttribute('src', imgSrc);
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
it('should not render initials', () => {
|
|
20
|
+
const imgSrc = 'https://github.com/kentcdodds.png';
|
|
21
|
+
render(<Avatar name="John Doe" src={imgSrc} />);
|
|
22
|
+
const initials = screen.queryByText('JD');
|
|
23
|
+
expect(initials).not.toBeInTheDocument();
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
it('should render initials when image fails to load', async () => {
|
|
27
|
+
render(<Avatar name="John Doe" src="" />);
|
|
28
|
+
// TODO: figure out a better way to mock image failures...
|
|
29
|
+
const image = await screen.queryByRole('img');
|
|
30
|
+
const initials = await screen.getByText('JD');
|
|
31
|
+
expect(image).not.toBeInTheDocument();
|
|
32
|
+
expect(initials).toBeInTheDocument();
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
it('should render as circle by default', () => {
|
|
36
|
+
render(<Avatar name="John Doe" />);
|
|
37
|
+
const avatar = screen.getByTitle('John Doe');
|
|
38
|
+
expect(avatar).toHaveStyleRule('border-radius', '50%');
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
it('should render as a leaf when appearance="leaf" ', () => {
|
|
42
|
+
render(<Avatar name="John Doe" appearance="leaf" />);
|
|
43
|
+
const avatar = screen.getByTitle('John Doe');
|
|
44
|
+
expect(avatar).toHaveStyleRule('border-radius', '40% 0 40% 0');
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
it('should render 40px by default', () => {
|
|
48
|
+
render(<Avatar name="John Doe" />);
|
|
49
|
+
const avatar = screen.getByTitle('John Doe');
|
|
50
|
+
expect(avatar).toHaveStyleRule('width', '40px');
|
|
51
|
+
expect(avatar).toHaveStyleRule('height', '40px');
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
describe('When no image is provided', () => {
|
|
56
|
+
it('should render initials correctly', () => {
|
|
57
|
+
render(<Avatar name="John Doe" />);
|
|
58
|
+
const initials = screen.getByText('JD');
|
|
59
|
+
expect(initials).toBeInTheDocument();
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
it('should render single initial if only 1 name given', () => {
|
|
63
|
+
render(<Avatar name="John" />);
|
|
64
|
+
const singleInitial = screen.getByText('J');
|
|
65
|
+
expect(singleInitial).toBeInTheDocument();
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
it('should display first 2 initials if >3 names are provided', () => {
|
|
69
|
+
render(<Avatar name="John Doe Smith" />);
|
|
70
|
+
const initials = screen.getByText('JD');
|
|
71
|
+
expect(initials).toBeInTheDocument();
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
it('should render a "?" as a fallback if no name is provided', () => {
|
|
75
|
+
render(<Avatar />);
|
|
76
|
+
const fallback = screen.getByText('?');
|
|
77
|
+
const initials = screen.queryByText('JD');
|
|
78
|
+
expect(fallback).toBeInTheDocument();
|
|
79
|
+
expect(initials).not.toBeInTheDocument();
|
|
80
|
+
});
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
describe('When a user wants to customize Avatar', () => {
|
|
84
|
+
it('should be able to the size of Avatar', () => {
|
|
85
|
+
render(<Avatar name="John Doe" size="100px" />);
|
|
86
|
+
const avatar = screen.getByTitle('John Doe');
|
|
87
|
+
expect(avatar).toHaveStyleRule('width', '100px');
|
|
88
|
+
expect(avatar).toHaveStyleRule('height', '100px');
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
// Should we even test stuff like this? What's the best way for us to test intentional overrides we provide that are not a default behavior?
|
|
92
|
+
it('should render different color background when type prop is used', () => {
|
|
93
|
+
render(<Avatar name="John Doe" type="blue" />);
|
|
94
|
+
const avatar = screen.getByTitle('John Doe');
|
|
95
|
+
expect(avatar).toHaveStyleRule('background', `#c7e4f9`);
|
|
96
|
+
});
|
|
97
|
+
});
|
|
98
|
+
});
|
package/__flow__/Banner/index.js
CHANGED
|
@@ -46,6 +46,7 @@ const getBannerIcon = (type: EnumValidBannerType) => {
|
|
|
46
46
|
const Banner = ({type = 'error', text, ...rest}: TypeProps) => {
|
|
47
47
|
const bannerType: EnumValidBannerType = type === 'danger' ? 'error' : type;
|
|
48
48
|
if (type === 'danger') {
|
|
49
|
+
// eslint-disable-next-line no-console
|
|
49
50
|
console.warn(
|
|
50
51
|
'Warning: The `danger` type has been deprecated on the Banner component. Please use `error` instead.'
|
|
51
52
|
);
|
|
@@ -53,7 +54,7 @@ const Banner = ({type = 'error', text, ...rest}: TypeProps) => {
|
|
|
53
54
|
return (
|
|
54
55
|
<Container
|
|
55
56
|
type={type}
|
|
56
|
-
data-qa-alert=
|
|
57
|
+
data-qa-alert=""
|
|
57
58
|
data-qa-alert-type={type}
|
|
58
59
|
data-qa-alert-text={text}
|
|
59
60
|
// $FlowIssue - upgrade v0.112.0
|
|
@@ -5,7 +5,7 @@ import 'jest-styled-components';
|
|
|
5
5
|
import CharacterCounter from './';
|
|
6
6
|
import {COLOR_RED_800} from '@sproutsocial/seeds-color';
|
|
7
7
|
|
|
8
|
-
describe
|
|
8
|
+
describe('CharacterCounter', () => {
|
|
9
9
|
it('should render properly', () => {
|
|
10
10
|
const {getByText} = render(
|
|
11
11
|
<CharacterCounter currentValue={22} maxValue={100} />
|
|
@@ -52,7 +52,7 @@ const determineMaxHeight = (isHidden, openHeight, computedHeight) => {
|
|
|
52
52
|
if (isHidden === undefined) return undefined;
|
|
53
53
|
|
|
54
54
|
// If the user has defined an explicit open height, return that as the max height
|
|
55
|
-
if (
|
|
55
|
+
if (openHeight) return openHeight;
|
|
56
56
|
|
|
57
57
|
// Otherwise, fallback to the computed height
|
|
58
58
|
return computedHeight;
|
|
@@ -106,7 +106,7 @@ const Panel = ({children, ...rest}) => {
|
|
|
106
106
|
scrollable={isOpen}
|
|
107
107
|
maxHeight={isOpen ? maxHeight : collapsedHeight}
|
|
108
108
|
minHeight={collapsedHeight}
|
|
109
|
-
data-qa-collapsible=
|
|
109
|
+
data-qa-collapsible=""
|
|
110
110
|
data-qa-collapsible-isopen={isOpen === true}
|
|
111
111
|
{...rest}
|
|
112
112
|
>
|
package/__flow__/Drawer/index.js
CHANGED
|
@@ -140,6 +140,16 @@ const Drawer = ({
|
|
|
140
140
|
zIndex,
|
|
141
141
|
closeTargets,
|
|
142
142
|
...rest
|
|
143
|
+
}: {
|
|
144
|
+
children: React.Node,
|
|
145
|
+
direction?: 'left' | 'right',
|
|
146
|
+
disableCloseOnClickOutside?: boolean,
|
|
147
|
+
id: string,
|
|
148
|
+
offset?: number,
|
|
149
|
+
onClose: () => void,
|
|
150
|
+
zIndex?: number,
|
|
151
|
+
closeTargets?: Array<Element>,
|
|
152
|
+
style: any,
|
|
143
153
|
}) => {
|
|
144
154
|
const drawerRef = useRef(null);
|
|
145
155
|
|
|
@@ -208,6 +218,7 @@ const Drawer = ({
|
|
|
208
218
|
offset={offset}
|
|
209
219
|
direction={direction}
|
|
210
220
|
data-qa-drawer={id}
|
|
221
|
+
// $FlowIssue - upgrade v0.112.0
|
|
211
222
|
{...rest}
|
|
212
223
|
>
|
|
213
224
|
{children}
|
|
@@ -181,7 +181,7 @@ export const DrawerWithHeaderChildren = (args: TypeDrawerProps) => (
|
|
|
181
181
|
>
|
|
182
182
|
<Drawer.Header>
|
|
183
183
|
<Box flexGrow={1}>
|
|
184
|
-
<Tabs fullWidth selectedId=
|
|
184
|
+
<Tabs fullWidth selectedId="1" onSelect={() => {}}>
|
|
185
185
|
<Tabs.Button id="1">
|
|
186
186
|
<Box display="flex" justifyContent="center" alignItems="center">
|
|
187
187
|
<Icon name="notifications" mr={350} />
|
|
@@ -294,6 +294,7 @@ export const DrawerWithCloseButtonRender = (args: TypeDrawerProps) => (
|
|
|
294
294
|
render={({onClose, closeButtonLabel}) => {
|
|
295
295
|
const newOnClose = () => {
|
|
296
296
|
setTimeout(() => {
|
|
297
|
+
// eslint-disable-next-line no-console
|
|
297
298
|
console.log('close');
|
|
298
299
|
onClose();
|
|
299
300
|
}, 3000);
|
|
@@ -114,7 +114,7 @@ describe('EmptyState', () => {
|
|
|
114
114
|
headline="Ready to create your first topic?"
|
|
115
115
|
subtext="Now that you have the basics down, it’s time to create a topic. Remember to look for the icon at any time you are feeling lost."
|
|
116
116
|
primaryAction={<Button>Create a Topic</Button>}
|
|
117
|
-
secondaryAction={<Button>I
|
|
117
|
+
secondaryAction={<Button>I'll do this later</Button>}
|
|
118
118
|
/>
|
|
119
119
|
);
|
|
120
120
|
const element = getByText("I'll do this later");
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @flow
|
|
2
|
-
export type EnumIllustrationNames = "abacus" | "analytics-offering" | "asset-cards" | "astronaut" | "binoculars" | "brand-keyword" | "browser-doc" | "business" | "calendar-event" | "calendar-reporting" | "cat-error" | "cat-no-access" | "cat" | "checkbox-alert" | "coffee-cup" | "competitors" | "compose-window" | "compose" | "computer-error" | "connect" | "contact" | "conversation" | "custom-branding" | "customer-service" | "dashboard" | "exclamation-mark" | "face-happy" | "find-bookmark" | "flask" | "general-topic" | "global-features" | "global-trend" | "grow-large" | "grow" | "hands-raised" | "headset" | "heartbeat-connection" | "instagram-links" | "invoice" | "jewel" | "keyword-tracking" | "lightbulb-alt" | "lightbulb" | "like-conversation" | "link-broken" | "link-messages" | "link-sections" | "link-upload" | "listening-pendo" | "listening-sentiment" | "listening-topic-templates" | "listening-tour" | "listening" | "loading" | "mailbox-empty" | "mailbox-full" | "message" | "molecule" | "network-data" | "no-messages-found" | "no-notifications" | "note" | "notification" | "notifications-onboarding" | "organize-message" | "outbox-queue" | "outbox-reviews" | "pdf" | "planning" | "podium" | "pointer" | "publish-assets" | "publish-links" | "publishing" | "puzzle-piece" | "question-mark" | "reporting-folder" | "reporting" | "review-location" | "review" | "robot-assembly" | "robot-error" | "robot-happy" | "rocket" | "schedule-date" | "schedule-messages" | "search-keywords" | "search-success" | "search-trends" | "search" | "security" | "sentiment" | "shopping-bag" | "spark-line" | "stamp" | "storefront" | "success" | "tag-message" | "tag" | "team-roles" | "team" | "telescope" | "tha-mel" | "thumbs-up" | "toggle-switch" | "toolset-strength" | "tracking-time" | "twitter-messages" | "twitter-profiles" | "under-construction" | "unsubscribe" | "upward-trend" | "user-task" | "view-connections" | "vip-list" | "warning" | "wifi" | "workflow-steps";
|
|
2
|
+
export type EnumIllustrationNames = "abacus" | "analytics-offering" | "asset-cards" | "astronaut" | "binoculars" | "brand-keyword" | "browser-doc" | "business" | "calendar-event" | "calendar-reporting" | "campaign-tag" | "cat-error" | "cat-no-access" | "cat" | "checkbox-alert" | "coffee-cup" | "competitors" | "compose-window" | "compose" | "computer-error" | "connect" | "contact" | "conversation" | "custom-branding" | "customer-service" | "dashboard" | "exclamation-mark" | "face-happy" | "find-bookmark" | "flask" | "general-topic" | "global-features" | "global-trend" | "grow-large" | "grow" | "hands-raised" | "headset" | "heartbeat-connection" | "instagram-links" | "invoice" | "jewel" | "keyword-tracking" | "lightbulb-alt" | "lightbulb" | "like-conversation" | "link-broken" | "link-messages" | "link-sections" | "link-upload" | "listening-pendo" | "listening-sentiment" | "listening-topic-templates" | "listening-tour" | "listening" | "loading" | "mailbox-empty" | "mailbox-full" | "message" | "molecule" | "network-data" | "no-messages-found" | "no-notifications" | "note" | "notification" | "notifications-onboarding" | "organize-message" | "outbox-queue" | "outbox-reviews" | "pdf" | "planning" | "podium" | "pointer" | "publish-assets" | "publish-links" | "publishing" | "puzzle-piece" | "question-mark" | "reporting-folder" | "reporting" | "review-location" | "review" | "robot-assembly" | "robot-error" | "robot-happy" | "rocket" | "schedule-date" | "schedule-messages" | "search-keywords" | "search-success" | "search-trends" | "search" | "security" | "sentiment" | "shopping-bag" | "spark-line" | "stamp" | "storefront" | "success" | "tag-message" | "tag" | "team-roles" | "team" | "telescope" | "tha-mel" | "thumbs-up" | "toggle-switch" | "toolset-strength" | "tracking-time" | "twitter-messages" | "twitter-profiles" | "under-construction" | "unsubscribe" | "upward-trend" | "user-task" | "view-connections" | "vip-list" | "warning" | "wifi" | "workflow-steps";
|
|
@@ -23,7 +23,7 @@ const Fieldset = ({
|
|
|
23
23
|
...rest
|
|
24
24
|
}: TypeProps) => (
|
|
25
25
|
// $FlowIssue - upgrade v0.112.0
|
|
26
|
-
<Box as="fieldset" border="none" p={0} data-qa-fieldset=
|
|
26
|
+
<Box as="fieldset" border="none" p={0} data-qa-fieldset="" {...rest}>
|
|
27
27
|
{typeof label === 'string' ? (
|
|
28
28
|
<Fieldset.Legend>{label}</Fieldset.Legend>
|
|
29
29
|
) : (
|
|
@@ -1 +1 @@
|
|
|
1
|
-
module.exports = {"abacus":"0 0 249 157","analytics-offering":"0 0 220 231","asset-cards":"0 0 331 204","astronaut":"0 0 277 298","binoculars":"0 0 269 200","brand-keyword":"0 0 240 230","browser-doc":"0 0 303 223","business":"0 0 88 56","calendar-event":"0 0 110 42","calendar-reporting":"0 0 248 182","cat-error":"0 0 284 180","cat-no-access":"0 0 370 273","cat":"0 0 240 171","checkbox-alert":"0 0 193 169","coffee-cup":"0 0 196 234","competitors":"0 0 355 258","compose-window":"0 0 372 188","compose":"0 0 62 45","computer-error":"0 0 237 259","connect":"0 0 242 162","contact":"0 0 305 145","conversation":"0 0 330 236","custom-branding":"0 0 168 164","customer-service":"0 0 302 155","dashboard":"0 0 337 195","exclamation-mark":"0 0 219 143","face-happy":"0 0 238 173","find-bookmark":"0 0 276 228","flask":"0 0 255 230","general-topic":"0 0 101 63","global-features":"0 0 239 226","global-trend":"0 0 56 42","grow-large":"0 0 189 137","grow":"0 0 73 45","hands-raised":"0 0 192 176","headset":"0 0 106 54","heartbeat-connection":"0 0 335 201","instagram-links":"0 0 333 250","invoice":"0 0 171 178","jewel":"0 0 154 137","keyword-tracking":"0 0 400 232","lightbulb-alt":"0 0 89 54","lightbulb":"0 0 49 43","like-conversation":"0 0 293 258","link-broken":"0 0 340 236","link-messages":"0 0 233 250","link-sections":"0 0 270 273","link-upload":"0 0 180 140","listening-pendo":"0 0 544 109","listening-sentiment":"0 0 343 154","listening-topic-templates":"0 0 337 247","listening-tour":"0 0 236 212","listening":"0 0 101 63","loading":"0 0 62 39","mailbox-empty":"0 0 309 240","mailbox-full":"0 0 352 252","message":"0 0 58 44","molecule":"0 0 342 242","network-data":"0 0 369 229","no-messages-found":"0 0 272 211","no-notifications":"0 0 281 134","note":"0 0 49 47","notification":"0 0 252 194","notifications-onboarding":"0 0 352 163","organize-message":"0 0 276 220","outbox-queue":"0 0 246 176","outbox-reviews":"0 0 246 176","pdf":"0 0 36 35","planning":"0 0 251 277","podium":"0 0 106 46","pointer":"0 0 54 37","publish-assets":"0 0 336 263","publish-links":"0 0 266 252","publishing":"0 0 343 191","puzzle-piece":"0 0 56 44","question-mark":"0 0 302 191","reporting-folder":"0 0 314 247","reporting":"0 0 331 226","review-location":"0 0 251 227","review":"0 0 251 143","robot-assembly":"0 0 375 253","robot-error":"0 0 281 286","robot-happy":"0 0 222 190","rocket":"0 0 101 56","schedule-date":"0 0 386 240","schedule-messages":"0 0 372 217","search-keywords":"0 0 237 243","search-success":"0 0 235 243","search-trends":"0 0 249 187","search":"0 0 337 196","security":"0 0 216 284","sentiment":"0 0 316 246","shopping-bag":"0 0 112 58","spark-line":"0 0 227 113","stamp":"0 0 291 253","storefront":"0 0 111 45","success":"0 0 200 200","tag-message":"0 0 346 226","tag":"0 0
|
|
1
|
+
module.exports = {"abacus":"0 0 249 157","analytics-offering":"0 0 220 231","asset-cards":"0 0 331 204","astronaut":"0 0 277 298","binoculars":"0 0 269 200","brand-keyword":"0 0 240 230","browser-doc":"0 0 303 223","business":"0 0 88 56","calendar-event":"0 0 110 42","calendar-reporting":"0 0 248 182","campaign-tag":"0 0 125 84","cat-error":"0 0 284 180","cat-no-access":"0 0 370 273","cat":"0 0 240 171","checkbox-alert":"0 0 193 169","coffee-cup":"0 0 196 234","competitors":"0 0 355 258","compose-window":"0 0 372 188","compose":"0 0 62 45","computer-error":"0 0 237 259","connect":"0 0 242 162","contact":"0 0 305 145","conversation":"0 0 330 236","custom-branding":"0 0 168 164","customer-service":"0 0 302 155","dashboard":"0 0 337 195","exclamation-mark":"0 0 219 143","face-happy":"0 0 238 173","find-bookmark":"0 0 276 228","flask":"0 0 255 230","general-topic":"0 0 101 63","global-features":"0 0 239 226","global-trend":"0 0 56 42","grow-large":"0 0 189 137","grow":"0 0 73 45","hands-raised":"0 0 192 176","headset":"0 0 106 54","heartbeat-connection":"0 0 335 201","instagram-links":"0 0 333 250","invoice":"0 0 171 178","jewel":"0 0 154 137","keyword-tracking":"0 0 400 232","lightbulb-alt":"0 0 89 54","lightbulb":"0 0 49 43","like-conversation":"0 0 293 258","link-broken":"0 0 340 236","link-messages":"0 0 233 250","link-sections":"0 0 270 273","link-upload":"0 0 180 140","listening-pendo":"0 0 544 109","listening-sentiment":"0 0 343 154","listening-topic-templates":"0 0 337 247","listening-tour":"0 0 236 212","listening":"0 0 101 63","loading":"0 0 62 39","mailbox-empty":"0 0 309 240","mailbox-full":"0 0 352 252","message":"0 0 58 44","molecule":"0 0 342 242","network-data":"0 0 369 229","no-messages-found":"0 0 272 211","no-notifications":"0 0 281 134","note":"0 0 49 47","notification":"0 0 252 194","notifications-onboarding":"0 0 352 163","organize-message":"0 0 276 220","outbox-queue":"0 0 246 176","outbox-reviews":"0 0 246 176","pdf":"0 0 36 35","planning":"0 0 251 277","podium":"0 0 106 46","pointer":"0 0 54 37","publish-assets":"0 0 336 263","publish-links":"0 0 266 252","publishing":"0 0 343 191","puzzle-piece":"0 0 56 44","question-mark":"0 0 302 191","reporting-folder":"0 0 314 247","reporting":"0 0 331 226","review-location":"0 0 251 227","review":"0 0 251 143","robot-assembly":"0 0 375 253","robot-error":"0 0 281 286","robot-happy":"0 0 222 190","rocket":"0 0 101 56","schedule-date":"0 0 386 240","schedule-messages":"0 0 372 217","search-keywords":"0 0 237 243","search-success":"0 0 235 243","search-trends":"0 0 249 187","search":"0 0 337 196","security":"0 0 216 284","sentiment":"0 0 316 246","shopping-bag":"0 0 112 58","spark-line":"0 0 227 113","stamp":"0 0 291 253","storefront":"0 0 111 45","success":"0 0 200 200","tag-message":"0 0 346 226","tag":"0 0 125 84","team-roles":"0 0 358 298","team":"0 0 347 249","telescope":"0 0 272 255","tha-mel":"0 0 181 152","thumbs-up":"0 0 169 250","toggle-switch":"0 0 299 127","toolset-strength":"0 0 348 231","tracking-time":"0 0 360 195","twitter-messages":"0 0 220 228","twitter-profiles":"0 0 335 187","under-construction":"0 0 343 243","unsubscribe":"0 0 212 163","upward-trend":"0 0 65 49","user-task":"0 0 313 176","view-connections":"0 0 356 201","vip-list":"0 0 212 228","warning":"0 0 55 38","wifi":"0 0 55 43","workflow-steps":"0 0 295 214"};
|
package/__flow__/Input/index.js
CHANGED
|
@@ -110,6 +110,7 @@ const ClearButton = () => {
|
|
|
110
110
|
|
|
111
111
|
// Warn if clearButtonLabel is not included, so that the unlocalized fallback will not be mistaken for a proper label.
|
|
112
112
|
if (!clearButtonLabel) {
|
|
113
|
+
// eslint-disable-next-line no-console
|
|
113
114
|
console.warn(
|
|
114
115
|
'Warning: clearButtonLabel prop is required when using Input.ClearButton. Please pass a localized clearButtonLabel to Input.'
|
|
115
116
|
);
|
|
@@ -253,7 +254,7 @@ class Input extends React.Component<TypeProps, TypeState> {
|
|
|
253
254
|
} = this.props;
|
|
254
255
|
|
|
255
256
|
// Convert autoComplete from a boolean prop to a string value.
|
|
256
|
-
let autoCompleteValue
|
|
257
|
+
let autoCompleteValue;
|
|
257
258
|
if (autoComplete !== undefined) {
|
|
258
259
|
autoCompleteValue = autoComplete ? 'on' : 'off';
|
|
259
260
|
}
|
package/__flow__/Link/index.js
CHANGED
|
@@ -31,6 +31,7 @@ const Link = ({
|
|
|
31
31
|
...rest
|
|
32
32
|
}: TypeProps) => {
|
|
33
33
|
if (!href && external) {
|
|
34
|
+
// eslint-disable-next-line no-console
|
|
34
35
|
console.warn(
|
|
35
36
|
'Warning: external prop cannot be set without a href declaration'
|
|
36
37
|
);
|
|
@@ -49,7 +50,7 @@ const Link = ({
|
|
|
49
50
|
disabled={disabled}
|
|
50
51
|
onClick={onClick}
|
|
51
52
|
underline={underline}
|
|
52
|
-
data-qa-link=
|
|
53
|
+
data-qa-link=""
|
|
53
54
|
data-qa-link-isdisabled={disabled === true}
|
|
54
55
|
{...qa}
|
|
55
56
|
{...rest}
|
|
@@ -49,6 +49,7 @@ describe('Racine Link', () => {
|
|
|
49
49
|
const {getByText} = render(
|
|
50
50
|
<Link
|
|
51
51
|
onClick={() => {
|
|
52
|
+
// eslint-disable-next-line no-console
|
|
52
53
|
console.log('Button');
|
|
53
54
|
}}
|
|
54
55
|
>
|
|
@@ -63,6 +64,7 @@ describe('Racine Link', () => {
|
|
|
63
64
|
<Link
|
|
64
65
|
href="http://sproutsocial.com"
|
|
65
66
|
onClick={() => {
|
|
67
|
+
// eslint-disable-next-line no-console
|
|
66
68
|
console.log('Button');
|
|
67
69
|
}}
|
|
68
70
|
>
|
package/__flow__/Loader/index.js
CHANGED
|
@@ -31,7 +31,7 @@ export const defaultStory = () => (
|
|
|
31
31
|
<Modal.Header
|
|
32
32
|
title="Assign Chatbot"
|
|
33
33
|
subtitle="The chatbot will respond to customers from this profile."
|
|
34
|
-
|
|
34
|
+
/>
|
|
35
35
|
<Modal.Content>
|
|
36
36
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
|
|
37
37
|
eiusmod tempor incididunt ut labore et dolore magna aliqua. Lorem
|
package/__flow__/Popout/index.js
CHANGED
|
@@ -14,22 +14,22 @@ export const portal = () => (
|
|
|
14
14
|
<Portal>
|
|
15
15
|
<Box
|
|
16
16
|
position="absolute"
|
|
17
|
-
top=
|
|
17
|
+
top="100px"
|
|
18
18
|
left={0}
|
|
19
|
-
width=
|
|
20
|
-
border=
|
|
19
|
+
width="100px"
|
|
20
|
+
border="2px solid red"
|
|
21
21
|
>
|
|
22
22
|
this is portaled content
|
|
23
23
|
</Box>
|
|
24
24
|
</Portal>
|
|
25
25
|
|
|
26
|
-
<Portal as=
|
|
26
|
+
<Portal as="span">
|
|
27
27
|
<Box
|
|
28
28
|
position="absolute"
|
|
29
|
-
top=
|
|
29
|
+
top="100px"
|
|
30
30
|
right={0}
|
|
31
|
-
width=
|
|
32
|
-
border=
|
|
31
|
+
width="100px"
|
|
32
|
+
border="2px solid blue"
|
|
33
33
|
>
|
|
34
34
|
this is portaled content too!!
|
|
35
35
|
</Box>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<svg width="125" height="84" viewBox="0 0 125 84" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M66.5 38.6124L91.3039 25.2209C92.5251 24.5616 94 25.4574 94 26.8584V72.637C94 74.038 92.5251 74.9339 91.3039 74.2745L66.5 60.883H62.8508C63.0992 66.0323 65.9758 70.7055 70.4768 73.1908L71.0058 73.4829L67.4942 80L66.9653 79.7079C60.108 75.9216 55.7643 68.75 55.5117 60.883H44.5C41.4624 60.883 39 58.3903 39 55.3154V44.1801C39 41.1051 41.4624 38.6124 44.5 38.6124H66.5Z" fill="#56ADF5"/>
|
|
3
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M18.1171 30.0586C18.1171 32.8523 15.8523 35.1171 13.0586 35.1171C10.2648 35.1171 8 32.8523 8 30.0586C8 27.2648 10.2648 25 13.0586 25C15.8523 25 18.1171 27.2648 18.1171 30.0586ZM42.3915 3.3045C43.509 3.3045 44.415 4.21042 44.415 5.32793V11.3112H50.3982C51.5157 11.3112 52.4216 12.2171 52.4216 13.3346C52.4216 14.4521 51.5157 15.358 50.3982 15.358H44.415V21.5153C44.415 22.6328 43.509 23.5387 42.3915 23.5387C41.274 23.5387 40.3681 22.6328 40.3681 21.5153V15.358H34.2108C33.0933 15.358 32.1874 14.4521 32.1874 13.3346C32.1874 12.2171 33.0933 11.3112 34.2108 11.3112H40.3681V5.32793C40.3681 4.21042 41.274 3.3045 42.3915 3.3045Z" fill="#56ADF5"/>
|
|
4
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M37 54.0714H50.0133C50.2885 62.2675 54.8271 69.7363 61.9864 73.682L62.5634 74L65.4366 68.6779L64.8595 68.3598C59.628 65.4766 56.2897 60.0482 56.018 54.0714H61L88.0588 68.6528C89.391 69.3707 91 68.3953 91 66.8698V17.0236C91 15.498 89.391 14.5226 88.0588 15.2405L61 29.8219H37C33.6863 29.8219 31 32.5361 31 35.8843V48.0091C31 51.3572 33.6863 54.0714 37 54.0714ZM62.5 35.8843H56V48.0091H62.5L85 60.1338V23.7596L62.5 35.8843ZM37 35.8843H50V48.0091H37L37 35.8843Z" fill="#273333"/>
|
|
5
|
+
<path d="M97 31.8427V52.0506C100.314 52.0506 103 49.3364 103 45.9883V37.9051C103 34.5569 100.314 31.8427 97 31.8427Z" fill="#273333"/>
|
|
6
|
+
</svg>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
<svg width="62" height="42" viewBox="0 0
|
|
2
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="
|
|
3
|
-
<path
|
|
4
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="
|
|
1
|
+
<svg width="62" height="42" viewBox="0 0 125 84" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M98.5649 5.05856C98.5649 7.85233 96.3001 10.1171 93.5063 10.1171C90.7125 10.1171 88.4478 7.85233 88.4478 5.05856C88.4478 2.26479 90.7125 0 93.5063 0C96.3001 0 98.5649 2.26479 98.5649 5.05856ZM114.839 26.3045C115.957 26.3045 116.863 27.2104 116.863 28.3279V34.3112H122.846C123.963 34.3112 124.869 35.2171 124.869 36.3346C124.869 37.4521 123.963 38.358 122.846 38.358H116.863V44.5153C116.863 45.6328 115.957 46.5387 114.839 46.5387C113.722 46.5387 112.816 45.6328 112.816 44.5153V38.358H106.659C105.541 38.358 104.635 37.4521 104.635 36.3346C104.635 35.2171 105.541 34.3112 106.659 34.3112H112.816V28.3279C112.816 27.2104 113.722 26.3045 114.839 26.3045Z" fill="#56ADF5"/>
|
|
3
|
+
<path d="M68.3975 18.6475L94.2592 44.5092C97.1881 47.4381 97.1881 52.1869 94.2592 55.1158L71.1158 78.2592C68.1869 81.1881 63.4381 81.1881 60.5092 78.2592L34.6475 52.3975C33.5926 51.3426 33 49.9119 33 48.42V24.5C33 20.3579 36.3579 17 40.5 17H64.42C65.9119 17 67.3426 17.5926 68.3975 18.6475Z" fill="#56ADF5"/>
|
|
4
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M37.6475 42.3975L63.5092 68.2592C66.4381 71.1881 71.1869 71.1881 74.1158 68.2592L97.2592 45.1158C100.188 42.1869 100.188 37.4381 97.2592 34.5092L71.3975 8.64752C70.3426 7.59263 68.9119 7 67.42 7H43.5C39.3579 7 36 10.3579 36 14.5V38.42C36 39.9119 36.5926 41.3426 37.6475 42.3975ZM67.42 12.625L93.2817 38.4867C94.014 39.2189 94.014 40.4061 93.2817 41.1383L70.1383 64.2817C69.4061 65.014 68.2189 65.014 67.4867 64.2817L41.625 38.4201L41.625 14.5C41.625 13.4645 42.4645 12.625 43.5 12.625L67.42 12.625Z" fill="#273333"/>
|
|
5
5
|
</svg>
|
package/__flow__/Table/index.js
CHANGED
|
@@ -37,7 +37,7 @@ type TypeProps = {
|
|
|
37
37
|
|
|
38
38
|
const renderTableRow = (row: TypeTableRow) => {
|
|
39
39
|
return (
|
|
40
|
-
<tbody key={row.id} data-qa-table-row=
|
|
40
|
+
<tbody key={row.id} data-qa-table-row="">
|
|
41
41
|
<tr>
|
|
42
42
|
{row.cells.map((td) => {
|
|
43
43
|
return <TableCell {...td} key={td.id} />;
|
|
@@ -62,16 +62,16 @@ export const Table = ({
|
|
|
62
62
|
}: TypeProps) => {
|
|
63
63
|
if (children) {
|
|
64
64
|
return (
|
|
65
|
-
<Container {...rest} data-qa-table=
|
|
65
|
+
<Container {...rest} data-qa-table="">
|
|
66
66
|
{children}
|
|
67
67
|
</Container>
|
|
68
68
|
);
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
return (
|
|
72
|
-
<Container {...rest} data-qa-table=
|
|
72
|
+
<Container {...rest} data-qa-table="">
|
|
73
73
|
{head.length > 0 && (
|
|
74
|
-
<thead data-qa-table-header=
|
|
74
|
+
<thead data-qa-table-header="">
|
|
75
75
|
<tr>
|
|
76
76
|
{head.map((th) => {
|
|
77
77
|
return (
|
|
@@ -93,7 +93,7 @@ export default class TableHeaderCell extends React.Component<TypeProps> {
|
|
|
93
93
|
width={width}
|
|
94
94
|
onClick={this.handleClick}
|
|
95
95
|
data-tableheadercell-sortable={isSortable}
|
|
96
|
-
data-qa-table-header-cell=
|
|
96
|
+
data-qa-table-header-cell=""
|
|
97
97
|
data-qa-table-header-cell-sortdirection={sortDirection}
|
|
98
98
|
>
|
|
99
99
|
{children || content}
|
package/__flow__/Tabs/index.js
CHANGED
|
@@ -158,7 +158,7 @@ export default class Tabs extends React.Component<TypeTabsProps, {}> {
|
|
|
158
158
|
|
|
159
159
|
return (
|
|
160
160
|
// $FlowIssue - upgrade v0.112.0
|
|
161
|
-
<Container data-qa-tabs=
|
|
161
|
+
<Container data-qa-tabs="" onKeyUp={this.keyHandler} {...qa} {...rest}>
|
|
162
162
|
<TabButtonContext.Provider
|
|
163
163
|
value={{
|
|
164
164
|
selectedId: this.getSelectedId(),
|
|
@@ -151,7 +151,7 @@ export default class Textarea extends React.Component<TypeProps> {
|
|
|
151
151
|
onBlur={this.handleBlur}
|
|
152
152
|
onFocus={this.handleFocus}
|
|
153
153
|
ref={innerRef}
|
|
154
|
-
data-qa-textarea-input=
|
|
154
|
+
data-qa-textarea-input=""
|
|
155
155
|
data-qa-input={name}
|
|
156
156
|
{...inputProps}
|
|
157
157
|
/>
|
package/__flow__/Toast/index.js
CHANGED
|
@@ -94,7 +94,7 @@ export function toast(options: TypeToastOptions): void {
|
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
const IconBox = (props) => (
|
|
97
|
-
<Box display="inline-block" css=
|
|
97
|
+
<Box display="inline-block" css="line-height: 1;" {...props} />
|
|
98
98
|
);
|
|
99
99
|
|
|
100
100
|
const Toast = ({content, theme, color, icon}: TypeProps) => {
|
package/__flow__/Toast/styles.js
CHANGED
|
@@ -3,7 +3,7 @@ import styled, {createGlobalStyle} from 'styled-components';
|
|
|
3
3
|
import Box from '../Box';
|
|
4
4
|
import Icon from '../Icon';
|
|
5
5
|
// $FlowIssue
|
|
6
|
-
import toastStyles from '!!raw-loader!react-toastify/dist/ReactToastify.css';
|
|
6
|
+
import toastStyles from '!!raw-loader!react-toastify/dist/ReactToastify.css'; // eslint-disable-line import/no-unresolved
|
|
7
7
|
|
|
8
8
|
import type {TypeTheme} from '../types/theme.flow';
|
|
9
9
|
|
|
@@ -22,8 +22,8 @@ const MinimalStatefulTokenInput = (props: TypeMinimalTypeProps): Node => {
|
|
|
22
22
|
<Fragment>
|
|
23
23
|
<TokenInput
|
|
24
24
|
{...rest}
|
|
25
|
-
id=
|
|
26
|
-
name=
|
|
25
|
+
id="example"
|
|
26
|
+
name="example"
|
|
27
27
|
tokens={tokenSpecs}
|
|
28
28
|
onChangeTokens={setTokenSpecs}
|
|
29
29
|
autocomplete="off"
|
|
@@ -58,8 +58,8 @@ const MeddlingStatefulTokenInput = (props: TypeProps): Node => {
|
|
|
58
58
|
<Fragment>
|
|
59
59
|
<TokenInput
|
|
60
60
|
{...rest}
|
|
61
|
-
id=
|
|
62
|
-
name=
|
|
61
|
+
id="fine-grain"
|
|
62
|
+
name="fine-grain"
|
|
63
63
|
value={text}
|
|
64
64
|
tokens={tokenSpecs}
|
|
65
65
|
delimiters={delimiters}
|
|
@@ -11,7 +11,11 @@ const firePasteEvent = (target: React.Node, text: string) => {
|
|
|
11
11
|
};
|
|
12
12
|
|
|
13
13
|
describe('When pasting...', () => {
|
|
14
|
-
let mockHandleAdd
|
|
14
|
+
let mockHandleAdd;
|
|
15
|
+
let mockHandleRemove;
|
|
16
|
+
let mockHandleChange;
|
|
17
|
+
let tokenInput;
|
|
18
|
+
let input;
|
|
15
19
|
|
|
16
20
|
describe('...with no tokens...', () => {
|
|
17
21
|
beforeEach(() => {
|
|
@@ -120,7 +124,7 @@ describe('When pasting...', () => {
|
|
|
120
124
|
id="0"
|
|
121
125
|
name="token-input"
|
|
122
126
|
placeholder="Enter text"
|
|
123
|
-
value=
|
|
127
|
+
value="Pre Text!"
|
|
124
128
|
onAddToken={mockHandleAdd}
|
|
125
129
|
onRemoveToken={mockHandleRemove}
|
|
126
130
|
/>
|