@sproutsocial/racine 11.0.2 → 11.1.2-badge-update.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 +18 -0
- package/__flow__/Badge/constants.js +48 -0
- package/__flow__/Badge/index.js +58 -32
- package/__flow__/Badge/index.stories.js +29 -42
- package/__flow__/Badge/index.test.js +34 -32
- package/__flow__/Badge/styles.js +22 -42
- package/__flow__/EnumIconNames.js +1 -1
- package/__flow__/IconViewBoxes.js +1 -1
- package/__flow__/index.js +1 -0
- package/__flow__/systemProps/background.js +28 -0
- package/__flow__/systemProps/border.js +76 -0
- package/__flow__/systemProps/color.js +25 -0
- package/__flow__/systemProps/custom.js +23 -0
- package/__flow__/systemProps/flexbox.js +42 -0
- package/__flow__/systemProps/grid.js +43 -0
- package/__flow__/systemProps/index.js +17 -0
- package/__flow__/systemProps/layout.js +43 -0
- package/__flow__/systemProps/position.js +29 -0
- package/__flow__/systemProps/shadow.js +18 -0
- package/__flow__/systemProps/space.js +83 -0
- package/__flow__/systemProps/systemProps.js +55 -0
- package/__flow__/systemProps/tests/__snapshots__/background.test.js.snap +96 -0
- package/__flow__/systemProps/tests/__snapshots__/border.test.js.snap +469 -0
- package/__flow__/systemProps/tests/__snapshots__/color.test.js.snap +55 -0
- package/__flow__/systemProps/tests/__snapshots__/custom.test.js.snap +36 -0
- package/__flow__/systemProps/tests/__snapshots__/flexbox.test.js.snap +239 -0
- package/__flow__/systemProps/tests/__snapshots__/grid.test.js.snap +166 -0
- package/__flow__/systemProps/tests/__snapshots__/layout.test.js.snap +218 -0
- package/__flow__/systemProps/tests/__snapshots__/position.test.js.snap +115 -0
- package/__flow__/systemProps/tests/__snapshots__/shadow.test.js.snap +25 -0
- package/__flow__/systemProps/tests/__snapshots__/space.test.js.snap +39 -0
- package/__flow__/systemProps/tests/__snapshots__/typography.test.js.snap +166 -0
- package/__flow__/systemProps/tests/__snapshots__/variant.test.js.snap +17 -0
- package/__flow__/systemProps/tests/background.test.js +90 -0
- package/__flow__/systemProps/tests/border.test.js +299 -0
- package/__flow__/systemProps/tests/color.test.js +49 -0
- package/__flow__/systemProps/tests/custom.test.js +38 -0
- package/__flow__/systemProps/tests/flexbox.test.js +150 -0
- package/__flow__/systemProps/tests/grid.test.js +123 -0
- package/__flow__/systemProps/tests/layout.test.js +135 -0
- package/__flow__/systemProps/tests/position.test.js +78 -0
- package/__flow__/systemProps/tests/shadow.test.js +30 -0
- package/__flow__/systemProps/tests/space.test.js +32 -0
- package/__flow__/systemProps/tests/types.flow.js +55 -0
- package/__flow__/systemProps/tests/typography.test.js +93 -0
- package/__flow__/systemProps/tests/variant.test.js +25 -0
- package/__flow__/systemProps/types.flow.js +20 -0
- package/__flow__/systemProps/typography.js +34 -0
- package/__flow__/systemProps/variant.js +18 -0
- package/__flow__/themes/dark/theme.js +1 -0
- package/__flow__/themes/light/literal-colors.js +2 -0
- package/__flow__/themes/light/theme.js +1 -0
- package/__flow__/types/theme.colors.flow.js +27 -0
- package/bin/buildNpm.js +58 -0
- package/commonjs/Avatar/index.js +7 -4
- package/commonjs/Badge/constants.js +43 -0
- package/commonjs/Badge/index.js +42 -38
- package/commonjs/Badge/styles.js +16 -32
- package/commonjs/Banner/index.js +3 -1
- package/commonjs/Banner/styles.js +1 -1
- package/commonjs/Box/styles.js +1 -1
- package/commonjs/Breadcrumb/index.js +5 -2
- package/commonjs/Button/index.js +3 -1
- package/commonjs/Card/index.js +3 -1
- package/commonjs/Card/styles.js +3 -3
- package/commonjs/CharacterCounter/index.js +3 -1
- package/commonjs/CharacterCounter/styles.js +1 -1
- package/commonjs/ChartLegend/index.js +3 -1
- package/commonjs/ChartLegend/styles.js +3 -3
- package/commonjs/Checkbox/index.js +3 -1
- package/commonjs/Checkbox/styles.js +1 -1
- package/commonjs/Collapsible/index.js +5 -2
- package/commonjs/DatePicker/DateRangePicker.js +3 -1
- package/commonjs/DatePicker/SingleDatePicker.js +3 -1
- package/commonjs/DatePicker/StatefulDateRangePicker.js +3 -1
- package/commonjs/DatePicker/StatefulSingleDatePicker.js +3 -1
- package/commonjs/DatePicker/common.js +1 -1
- package/commonjs/DatePicker/styles.js +2 -6
- package/commonjs/Drawer/SlideTransition.js +3 -1
- package/commonjs/Drawer/index.js +9 -4
- package/commonjs/Drawer/styles.js +2 -2
- package/commonjs/EmptyState/index.js +3 -1
- package/commonjs/Fieldset/index.js +7 -3
- package/commonjs/FormField/index.js +3 -1
- package/commonjs/Icon/index.js +5 -2
- package/commonjs/Icon/styles.js +1 -1
- package/commonjs/IconViewBoxes.js +1 -0
- package/commonjs/Image/index.js +3 -1
- package/commonjs/Image/styles.js +1 -1
- package/commonjs/Indicator/index.js +3 -1
- package/commonjs/Input/index.js +3 -1
- package/commonjs/Input/styles.js +2 -2
- package/commonjs/KeyboardKey/index.js +3 -1
- package/commonjs/Label/index.js +4 -2
- package/commonjs/Link/index.js +3 -1
- package/commonjs/Link/styles.js +1 -1
- package/commonjs/Listbox/index.js +7 -4
- package/commonjs/Loader/index.js +3 -1
- package/commonjs/Loader/styles.js +2 -2
- package/commonjs/LoaderButton/index.js +3 -1
- package/commonjs/Menu/constants.js +1 -1
- package/commonjs/Menu/descendants.js +10 -7
- package/commonjs/Menu/hooks.js +1 -1
- package/commonjs/Menu/index.js +22 -16
- package/commonjs/Menu/styles.js +2 -2
- package/commonjs/Message/index.js +3 -1
- package/commonjs/Message/styles.js +1 -1
- package/commonjs/Modal/index.js +7 -3
- package/commonjs/Modal/styles.js +4 -6
- package/commonjs/Numeral/constants.js +1 -1
- package/commonjs/Numeral/index.js +3 -1
- package/commonjs/Numeral/styles.js +3 -3
- package/commonjs/OverflowList/styles.js +1 -1
- package/commonjs/Popout/index.js +7 -3
- package/commonjs/Popout/styles.js +1 -1
- package/commonjs/Radio/index.js +3 -1
- package/commonjs/Radio/styles.js +4 -4
- package/commonjs/SegmentedControl/index.js +5 -2
- package/commonjs/Select/index.js +3 -1
- package/commonjs/Stack/index.js +3 -1
- package/commonjs/Switch/index.js +3 -1
- package/commonjs/Switch/styles.js +1 -1
- package/commonjs/Table/index.js +10 -5
- package/commonjs/TableCell/index.js +3 -1
- package/commonjs/TableHeaderCell/index.js +3 -1
- package/commonjs/TableRowAccordion/index.js +3 -1
- package/commonjs/Tabs/index.js +5 -2
- package/commonjs/Tabs/styles.js +4 -4
- package/commonjs/Text/index.js +3 -1
- package/commonjs/Text/styles.js +1 -1
- package/commonjs/Textarea/index.js +3 -1
- package/commonjs/Toast/index.js +15 -15
- package/commonjs/Toast/styles.js +4 -7
- package/commonjs/ToggleHint/index.js +3 -1
- package/commonjs/Token/index.js +3 -1
- package/commonjs/Token/styles.js +1 -1
- package/commonjs/TokenInput/index.js +3 -1
- package/commonjs/Tooltip/index.js +5 -2
- package/commonjs/Tooltip/styles.js +1 -1
- package/commonjs/VisuallyHidden/index.js +1 -1
- package/commonjs/include-icons.js +1 -1
- package/commonjs/index.js +79 -1
- package/commonjs/systemProps/background.js +9 -0
- package/commonjs/systemProps/border.js +9 -0
- package/commonjs/systemProps/color.js +9 -0
- package/commonjs/systemProps/custom.js +12 -0
- package/commonjs/systemProps/flexbox.js +9 -0
- package/commonjs/systemProps/grid.js +9 -0
- package/commonjs/systemProps/index.js +115 -0
- package/commonjs/systemProps/layout.js +9 -0
- package/commonjs/systemProps/position.js +9 -0
- package/commonjs/systemProps/shadow.js +9 -0
- package/commonjs/systemProps/space.js +10 -0
- package/commonjs/systemProps/systemProps.js +33 -0
- package/commonjs/systemProps/tests/types.flow.js +46 -0
- package/commonjs/systemProps/types.flow.js +1 -0
- package/commonjs/systemProps/typography.js +9 -0
- package/commonjs/systemProps/variant.js +12 -0
- package/commonjs/themes/dark/decorative-palettes.js +1 -1
- package/commonjs/themes/dark/theme.js +1 -1
- package/commonjs/themes/light/decorative-palettes.js +1 -1
- package/commonjs/themes/light/literal-colors.js +4 -2
- package/commonjs/themes/light/theme.js +1 -1
- package/commonjs/types/theme.colors.flow.js +2 -0
- package/commonjs/utils/hooks.js +3 -2
- package/commonjs/utils/mixins.js +1 -1
- package/commonjs/utils/system-props.js +1 -1
- package/dist/iconList.js +1 -1
- package/dist/icons.svg +1 -1
- package/dist/themes/dark/dark.scss +9 -7
- package/dist/themes/light/light.scss +99 -97
- package/icons/power-up-outline.svg +3 -0
- package/includeIcons.js +1 -1
- package/lib/Avatar/index.js +7 -4
- package/lib/Badge/constants.js +38 -0
- package/lib/Badge/index.js +39 -38
- package/lib/Badge/styles.js +13 -28
- package/lib/Banner/index.js +3 -1
- package/lib/Banner/styles.js +1 -1
- package/lib/Box/styles.js +1 -1
- package/lib/Breadcrumb/index.js +5 -2
- package/lib/Button/index.js +3 -1
- package/lib/Card/index.js +3 -1
- package/lib/Card/styles.js +2 -2
- package/lib/CharacterCounter/index.js +3 -1
- package/lib/CharacterCounter/styles.js +1 -1
- package/lib/ChartLegend/index.js +3 -1
- package/lib/ChartLegend/styles.js +3 -3
- package/lib/Checkbox/index.js +3 -1
- package/lib/Collapsible/index.js +5 -2
- package/lib/DatePicker/DateRangePicker.js +3 -1
- package/lib/DatePicker/SingleDatePicker.js +3 -1
- package/lib/DatePicker/StatefulDateRangePicker.js +3 -1
- package/lib/DatePicker/StatefulSingleDatePicker.js +3 -1
- package/lib/DatePicker/styles.js +2 -6
- package/lib/Drawer/SlideTransition.js +3 -1
- package/lib/Drawer/index.js +9 -4
- package/lib/Drawer/styles.js +2 -2
- package/lib/EmptyState/index.js +3 -1
- package/lib/Fieldset/index.js +7 -3
- package/lib/FormField/index.js +3 -1
- package/lib/Icon/index.js +5 -2
- package/lib/Icon/styles.js +1 -1
- package/lib/IconViewBoxes.js +1 -0
- package/lib/Image/index.js +3 -1
- package/lib/Image/styles.js +1 -1
- package/lib/Indicator/index.js +3 -1
- package/lib/Input/index.js +3 -1
- package/lib/Input/styles.js +2 -2
- package/lib/KeyboardKey/index.js +3 -1
- package/lib/Label/index.js +4 -2
- package/lib/Link/index.js +3 -1
- package/lib/Link/styles.js +1 -1
- package/lib/Listbox/index.js +6 -3
- package/lib/Loader/index.js +3 -1
- package/lib/Loader/styles.js +2 -2
- package/lib/LoaderButton/index.js +3 -1
- package/lib/Menu/descendants.js +5 -2
- package/lib/Menu/index.js +20 -16
- package/lib/Menu/styles.js +2 -2
- package/lib/Message/index.js +3 -1
- package/lib/Modal/index.js +7 -3
- package/lib/Modal/styles.js +3 -5
- package/lib/Numeral/index.js +3 -1
- package/lib/Numeral/styles.js +2 -2
- package/lib/OverflowList/styles.js +1 -1
- package/lib/Popout/index.js +7 -3
- package/lib/Popout/styles.js +1 -1
- package/lib/Radio/index.js +3 -1
- package/lib/Radio/styles.js +4 -4
- package/lib/SegmentedControl/index.js +5 -2
- package/lib/Select/index.js +3 -1
- package/lib/Stack/index.js +3 -1
- package/lib/Switch/index.js +3 -1
- package/lib/Switch/styles.js +1 -1
- package/lib/Table/index.js +9 -4
- package/lib/TableCell/index.js +3 -1
- package/lib/TableHeaderCell/index.js +3 -1
- package/lib/TableRowAccordion/index.js +3 -1
- package/lib/Tabs/index.js +5 -2
- package/lib/Tabs/styles.js +3 -3
- package/lib/Text/index.js +3 -1
- package/lib/Text/styles.js +1 -1
- package/lib/Textarea/index.js +3 -1
- package/lib/Toast/index.js +14 -14
- package/lib/Toast/styles.js +3 -7
- package/lib/ToggleHint/index.js +3 -1
- package/lib/Token/index.js +3 -1
- package/lib/Token/styles.js +1 -1
- package/lib/TokenInput/index.js +3 -1
- package/lib/Tooltip/index.js +5 -2
- package/lib/Tooltip/styles.js +1 -1
- package/lib/VisuallyHidden/index.js +1 -1
- package/lib/include-icons.js +1 -1
- package/lib/index.js +1 -0
- package/lib/systemProps/background.js +2 -0
- package/lib/systemProps/border.js +2 -0
- package/lib/systemProps/color.js +2 -0
- package/lib/systemProps/custom.js +5 -0
- package/lib/systemProps/flexbox.js +2 -0
- package/lib/systemProps/grid.js +2 -0
- package/lib/systemProps/index.js +14 -0
- package/lib/systemProps/layout.js +2 -0
- package/lib/systemProps/position.js +2 -0
- package/lib/systemProps/shadow.js +2 -0
- package/lib/systemProps/space.js +3 -0
- package/lib/systemProps/systemProps.js +14 -0
- package/lib/systemProps/tests/types.flow.js +44 -0
- package/lib/systemProps/types.flow.js +0 -0
- package/lib/systemProps/typography.js +2 -0
- package/lib/systemProps/variant.js +5 -0
- package/lib/themes/light/literal-colors.js +4 -2
- package/lib/types/theme.colors.flow.js +2 -1
- package/package.json +15 -3
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
// @flow strict-local
|
|
2
|
+
import React from "react";
|
|
3
|
+
import styled from "styled-components";
|
|
4
|
+
import { render } from "../../utils/react-testing-library";
|
|
5
|
+
import type { TypeTheme } from "../../types/theme.flow";
|
|
6
|
+
import {
|
|
7
|
+
typographySystemProps,
|
|
8
|
+
type TypeTypographySystemProps,
|
|
9
|
+
} from "../typography";
|
|
10
|
+
|
|
11
|
+
describe("typography system props", () => {
|
|
12
|
+
const Component = styled<TypeTypographySystemProps, TypeTheme, "div">("div")`
|
|
13
|
+
${typographySystemProps}
|
|
14
|
+
`;
|
|
15
|
+
|
|
16
|
+
test("fontFamily", () => {
|
|
17
|
+
const { container } = render(
|
|
18
|
+
<>
|
|
19
|
+
<Component fontFamily="string" />
|
|
20
|
+
</>
|
|
21
|
+
);
|
|
22
|
+
expect(container).toMatchSnapshot();
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
test("fontSize", () => {
|
|
26
|
+
const { container } = render(
|
|
27
|
+
<>
|
|
28
|
+
<Component fontSize="string" />
|
|
29
|
+
<Component fontSize={100} />
|
|
30
|
+
</>
|
|
31
|
+
);
|
|
32
|
+
expect(container).toMatchSnapshot();
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
test("fontStyle", () => {
|
|
36
|
+
const { container } = render(
|
|
37
|
+
<>
|
|
38
|
+
<Component fontStyle="string" />
|
|
39
|
+
</>
|
|
40
|
+
);
|
|
41
|
+
expect(container).toMatchSnapshot();
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
test("fontWeight", () => {
|
|
45
|
+
const { container } = render(
|
|
46
|
+
<>
|
|
47
|
+
<Component fontWeight="normal" />
|
|
48
|
+
<Component fontWeight="semibold" />
|
|
49
|
+
<Component fontWeight="bold" />
|
|
50
|
+
<Component fontWeight="extrabold" />
|
|
51
|
+
<Component fontWeight={100} />
|
|
52
|
+
<Component
|
|
53
|
+
// $FlowExpectedError
|
|
54
|
+
fontWeight="string"
|
|
55
|
+
/>
|
|
56
|
+
</>
|
|
57
|
+
);
|
|
58
|
+
expect(container).toMatchSnapshot();
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
test("letterSpacing", () => {
|
|
62
|
+
const { container } = render(
|
|
63
|
+
<>
|
|
64
|
+
<Component letterSpacing="string" />
|
|
65
|
+
<Component letterSpacing={1} />
|
|
66
|
+
</>
|
|
67
|
+
);
|
|
68
|
+
expect(container).toMatchSnapshot();
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
test("lineHeight", () => {
|
|
72
|
+
const { container } = render(
|
|
73
|
+
<>
|
|
74
|
+
<Component lineHeight="string" />
|
|
75
|
+
<Component lineHeight={1} />
|
|
76
|
+
</>
|
|
77
|
+
);
|
|
78
|
+
expect(container).toMatchSnapshot();
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
test("textAlign", () => {
|
|
82
|
+
const { container } = render(
|
|
83
|
+
<>
|
|
84
|
+
<Component textAlign="center" />
|
|
85
|
+
<Component
|
|
86
|
+
// $FlowExpectedError
|
|
87
|
+
textAlign="string"
|
|
88
|
+
/>
|
|
89
|
+
</>
|
|
90
|
+
);
|
|
91
|
+
expect(container).toMatchSnapshot();
|
|
92
|
+
});
|
|
93
|
+
});
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// @flow strict-local
|
|
2
|
+
import React from "react";
|
|
3
|
+
import styled from "styled-components";
|
|
4
|
+
import { render } from "../../utils/react-testing-library";
|
|
5
|
+
import type { TypeTheme } from "../../types/theme.flow";
|
|
6
|
+
import { variantSystemProps, type TypeVariantSystemProps } from "../variant";
|
|
7
|
+
|
|
8
|
+
describe("variant system props", () => {
|
|
9
|
+
const Component = styled<TypeVariantSystemProps, TypeTheme, "div">("div")`
|
|
10
|
+
${variantSystemProps}
|
|
11
|
+
`;
|
|
12
|
+
|
|
13
|
+
test("typeScale", () => {
|
|
14
|
+
const { container } = render(
|
|
15
|
+
<>
|
|
16
|
+
<Component typeScale="100" />
|
|
17
|
+
<Component
|
|
18
|
+
// $FlowExpectedError
|
|
19
|
+
typeScale={100}
|
|
20
|
+
/>
|
|
21
|
+
</>
|
|
22
|
+
);
|
|
23
|
+
expect(container).toMatchSnapshot();
|
|
24
|
+
});
|
|
25
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// @flow strict
|
|
2
|
+
|
|
3
|
+
export type TypeResponsiveSystemProp<T> =
|
|
4
|
+
| T
|
|
5
|
+
| [T]
|
|
6
|
+
| [T, T]
|
|
7
|
+
| [T, T, T]
|
|
8
|
+
| [T, T, T, T]
|
|
9
|
+
| [T, T, T, T, T];
|
|
10
|
+
export type TypeBaseSystemProp<T> = ?T | boolean;
|
|
11
|
+
// eslint-disable-next-line prettier/prettier
|
|
12
|
+
export type TypeResponsiveBaseSystemProp<T> = TypeResponsiveSystemProp<TypeBaseSystemProp<T>>;
|
|
13
|
+
|
|
14
|
+
export interface StyledSystemStyleFn {
|
|
15
|
+
(...args: mixed[]): mixed;
|
|
16
|
+
|
|
17
|
+
config?: { ... } | void;
|
|
18
|
+
propNames?: string[] | void;
|
|
19
|
+
cache?: { ... } | void;
|
|
20
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// @flow strict-local
|
|
2
|
+
|
|
3
|
+
import { typography } from "styled-system";
|
|
4
|
+
import type {
|
|
5
|
+
FontFamilyProperty,
|
|
6
|
+
FontSizeProperty,
|
|
7
|
+
FontStyleProperty,
|
|
8
|
+
FontWeightProperty,
|
|
9
|
+
LetterSpacingProperty,
|
|
10
|
+
LineHeightProperty,
|
|
11
|
+
TextAlignProperty,
|
|
12
|
+
} from "csstype";
|
|
13
|
+
|
|
14
|
+
import typeof { fontWeights as TypeofFontWeights } from "../themes/light/theme";
|
|
15
|
+
import type {
|
|
16
|
+
StyledSystemStyleFn,
|
|
17
|
+
TypeResponsiveBaseSystemProp,
|
|
18
|
+
} from "./types.flow.js";
|
|
19
|
+
|
|
20
|
+
// https://styled-system.com/table#typography
|
|
21
|
+
|
|
22
|
+
export type TypeTypographySystemProps = $ReadOnly<{|
|
|
23
|
+
fontFamily?: TypeResponsiveBaseSystemProp<FontFamilyProperty>,
|
|
24
|
+
fontSize?: TypeResponsiveBaseSystemProp<FontSizeProperty<number>>,
|
|
25
|
+
fontStyle?: TypeResponsiveBaseSystemProp<FontStyleProperty>,
|
|
26
|
+
// eslint-disable-next-line prettier/prettier
|
|
27
|
+
fontWeight?: TypeResponsiveBaseSystemProp<FontWeightProperty | $Keys<TypeofFontWeights>>,
|
|
28
|
+
// eslint-disable-next-line prettier/prettier
|
|
29
|
+
letterSpacing?: TypeResponsiveBaseSystemProp<LetterSpacingProperty<string | number>>,
|
|
30
|
+
lineHeight?: TypeResponsiveBaseSystemProp<LineHeightProperty<void>>,
|
|
31
|
+
textAlign?: TypeResponsiveBaseSystemProp<TextAlignProperty>,
|
|
32
|
+
|}>;
|
|
33
|
+
|
|
34
|
+
export const typographySystemProps: StyledSystemStyleFn = typography;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// @flow strict-local
|
|
2
|
+
import { compose, variant } from "styled-system";
|
|
3
|
+
import type { TypeTypography } from "../types/theme.flow";
|
|
4
|
+
|
|
5
|
+
import type { TypeResponsiveBaseSystemProp } from "./types.flow.js";
|
|
6
|
+
|
|
7
|
+
// https://styled-system.com/variants
|
|
8
|
+
|
|
9
|
+
export type TypeVariantSystemProps = $ReadOnly<{|
|
|
10
|
+
typeScale?: TypeResponsiveBaseSystemProp<$Keys<TypeTypography>>,
|
|
11
|
+
|}>;
|
|
12
|
+
|
|
13
|
+
export const variantSystemProps = compose(
|
|
14
|
+
variant({
|
|
15
|
+
key: "typography",
|
|
16
|
+
prop: "typeScale",
|
|
17
|
+
})
|
|
18
|
+
);
|
|
@@ -15,6 +15,7 @@ const literalColors = {
|
|
|
15
15
|
"800": COLORS.COLOR_NEUTRAL_800,
|
|
16
16
|
"900": COLORS.COLOR_NEUTRAL_900,
|
|
17
17
|
"1000": COLORS.COLOR_NEUTRAL_1000,
|
|
18
|
+
"1100": COLORS.COLOR_NEUTRAL_1100,
|
|
18
19
|
},
|
|
19
20
|
green: {
|
|
20
21
|
"0": COLORS.COLOR_GREEN_0,
|
|
@@ -42,6 +43,7 @@ const literalColors = {
|
|
|
42
43
|
"800": COLORS.COLOR_RED_800,
|
|
43
44
|
"900": COLORS.COLOR_RED_900,
|
|
44
45
|
"1000": COLORS.COLOR_RED_1000,
|
|
46
|
+
"1100": COLORS.COLOR_RED_1100,
|
|
45
47
|
},
|
|
46
48
|
blue: {
|
|
47
49
|
"0": COLORS.COLOR_BLUE_0,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// @flow strict-local
|
|
2
2
|
|
|
3
3
|
import literalColors from "../themes/light/literal-colors";
|
|
4
|
+
import { datavizPalette } from "../themes/light/dataviz-palette";
|
|
4
5
|
|
|
5
6
|
type TypeAppColors = {|
|
|
6
7
|
app: {
|
|
@@ -170,6 +171,7 @@ type TypeIconColors = {|
|
|
|
170
171
|
danger: string,
|
|
171
172
|
info: string,
|
|
172
173
|
opportunity: string,
|
|
174
|
+
applied: string,
|
|
173
175
|
positive_sentiment: string,
|
|
174
176
|
negative_sentiment: string,
|
|
175
177
|
neutral_sentiment: string,
|
|
@@ -204,6 +206,28 @@ type TypeListItemColors = {|
|
|
|
204
206
|
},
|
|
205
207
|
|};
|
|
206
208
|
|
|
209
|
+
type TypeOverlayColors = {|
|
|
210
|
+
overlay: {
|
|
211
|
+
background: {
|
|
212
|
+
base: string,
|
|
213
|
+
},
|
|
214
|
+
text: {
|
|
215
|
+
base: string,
|
|
216
|
+
},
|
|
217
|
+
icon: {
|
|
218
|
+
base: string,
|
|
219
|
+
},
|
|
220
|
+
},
|
|
221
|
+
|};
|
|
222
|
+
|
|
223
|
+
type TypeElevationColors = {|
|
|
224
|
+
elevation: {
|
|
225
|
+
base: string,
|
|
226
|
+
},
|
|
227
|
+
|};
|
|
228
|
+
|
|
229
|
+
type TypeDatavizColors = typeof datavizPalette;
|
|
230
|
+
|
|
207
231
|
type TypeNetworkColors = {|
|
|
208
232
|
network: {
|
|
209
233
|
twitter: string,
|
|
@@ -245,6 +269,9 @@ export type TypeColors = {
|
|
|
245
269
|
...TypeIconColors,
|
|
246
270
|
...TypeFormColors,
|
|
247
271
|
...TypeListItemColors,
|
|
272
|
+
...TypeOverlayColors,
|
|
273
|
+
...TypeElevationColors,
|
|
274
|
+
...TypeDatavizColors,
|
|
248
275
|
...TypeNetworkColors,
|
|
249
276
|
...TypeLiteralColors,
|
|
250
277
|
};
|
package/bin/buildNpm.js
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file handles the generation of an .npmrc with Jfrog credentials during the CI process.
|
|
3
|
+
* It replicates the local configuration requirements of a developer running `yarn` on their machine
|
|
4
|
+
* If run locally please do not commit your auth credentials
|
|
5
|
+
*/
|
|
6
|
+
const fs = require("fs");
|
|
7
|
+
const https = require("https");
|
|
8
|
+
const { exit } = require("process");
|
|
9
|
+
|
|
10
|
+
const { ARTIFACTORY_KEY, CI } = process.env;
|
|
11
|
+
|
|
12
|
+
// Check if we're in CI context, otherwise skip the process
|
|
13
|
+
if (!CI) {
|
|
14
|
+
exit();
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const options = {
|
|
18
|
+
hostname: "sproutsocial.jfrog.io",
|
|
19
|
+
path: "/artifactory/api/npm/auth",
|
|
20
|
+
method: "GET",
|
|
21
|
+
headers: {
|
|
22
|
+
"X-JFrog-Art-Api": ARTIFACTORY_KEY,
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
const req = https.request(options, (res) => {
|
|
27
|
+
console.log(`statusCode: ${res.statusCode}`);
|
|
28
|
+
|
|
29
|
+
// Call our auth endpoint with environment credentials
|
|
30
|
+
res.on("data", (data) => {
|
|
31
|
+
// Writes out an .npmrc file with the response
|
|
32
|
+
fs.writeFile(".npmrc", data, (err) => {
|
|
33
|
+
if (err) console.log(err);
|
|
34
|
+
else {
|
|
35
|
+
console.log(".npmrc generated successfully!");
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
// Once the file is created we append the registry info
|
|
40
|
+
fs.appendFile(
|
|
41
|
+
".npmrc",
|
|
42
|
+
"registry=https://sproutsocial.jfrog.io/artifactory/api/npm/npm_virtual",
|
|
43
|
+
function (err) {
|
|
44
|
+
if (err) throw err;
|
|
45
|
+
console.log("Registry Config Added!");
|
|
46
|
+
}
|
|
47
|
+
);
|
|
48
|
+
|
|
49
|
+
// Finally, we set permissions for the file so that netlify recognizes it
|
|
50
|
+
fs.chmodSync(".npmrc", "0600");
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
req.on("error", (error) => {
|
|
55
|
+
console.error(error);
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
req.end();
|
package/commonjs/Avatar/index.js
CHANGED
|
@@ -15,6 +15,9 @@ var _Image = _interopRequireDefault(require("../Image"));
|
|
|
15
15
|
|
|
16
16
|
var _Text = _interopRequireDefault(require("../Text"));
|
|
17
17
|
|
|
18
|
+
var _excluded = ["fontSize"],
|
|
19
|
+
_excluded2 = ["appearance", "name", "src", "variant", "type", "size", "bg", "color"];
|
|
20
|
+
|
|
18
21
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
22
|
|
|
20
23
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
@@ -27,12 +30,12 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
27
30
|
|
|
28
31
|
var AvatarText = (0, _styledComponents.default)(function (_ref) {
|
|
29
32
|
var fontSize = _ref.fontSize,
|
|
30
|
-
rest = _objectWithoutPropertiesLoose(_ref,
|
|
33
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
31
34
|
|
|
32
35
|
return /*#__PURE__*/React.createElement(_Text.default, rest);
|
|
33
36
|
}).withConfig({
|
|
34
37
|
displayName: "Avatar__AvatarText",
|
|
35
|
-
componentId: "yx873f-0"
|
|
38
|
+
componentId: "sc-yx873f-0"
|
|
36
39
|
})(["font-size:", "px;color:", "px;"], function (props) {
|
|
37
40
|
return props.fontSize;
|
|
38
41
|
}, function (props) {
|
|
@@ -40,7 +43,7 @@ var AvatarText = (0, _styledComponents.default)(function (_ref) {
|
|
|
40
43
|
});
|
|
41
44
|
var Container = (0, _styledComponents.default)(_Box.default).withConfig({
|
|
42
45
|
displayName: "Avatar__Container",
|
|
43
|
-
componentId: "yx873f-1"
|
|
46
|
+
componentId: "sc-yx873f-1"
|
|
44
47
|
})(["", ""], function (_ref2) {
|
|
45
48
|
var theme = _ref2.theme,
|
|
46
49
|
type = _ref2.type,
|
|
@@ -75,7 +78,7 @@ var Avatar = function Avatar(_ref3) {
|
|
|
75
78
|
size = _ref3$size === void 0 ? "40px" : _ref3$size,
|
|
76
79
|
bg = _ref3.bg,
|
|
77
80
|
color = _ref3.color,
|
|
78
|
-
rest = _objectWithoutPropertiesLoose(_ref3,
|
|
81
|
+
rest = _objectWithoutPropertiesLoose(_ref3, _excluded2);
|
|
79
82
|
|
|
80
83
|
var _useState = (0, React.useState)(false),
|
|
81
84
|
imageFailedLoading = _useState[0],
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.legacyBadgeColors = void 0;
|
|
5
|
+
var defaultPurple = {
|
|
6
|
+
color: "colors.text.body",
|
|
7
|
+
background: "colors.container.background.decorative.purple"
|
|
8
|
+
};
|
|
9
|
+
var suggestion = {
|
|
10
|
+
color: "colors.text.body",
|
|
11
|
+
background: "colors.container.background.decorative.blue"
|
|
12
|
+
};
|
|
13
|
+
var passive = {
|
|
14
|
+
color: "colors.text.body",
|
|
15
|
+
background: "colors.container.background.decorative.neutral"
|
|
16
|
+
};
|
|
17
|
+
var primary = {
|
|
18
|
+
color: "colors.text.body",
|
|
19
|
+
background: "colors.container.background.decorative.blue"
|
|
20
|
+
};
|
|
21
|
+
var secondary = {
|
|
22
|
+
color: "colors.text.body",
|
|
23
|
+
background: "colors.container.background.decorative.yellow"
|
|
24
|
+
};
|
|
25
|
+
var common = {
|
|
26
|
+
color: "colors.text.inverse",
|
|
27
|
+
background: "colors.aqua.600"
|
|
28
|
+
};
|
|
29
|
+
var approval = {
|
|
30
|
+
color: "colors.text.body",
|
|
31
|
+
background: "colors.container.background.decorative.orange"
|
|
32
|
+
}; //Deprecated former "types"
|
|
33
|
+
|
|
34
|
+
var legacyBadgeColors = {
|
|
35
|
+
primary: primary,
|
|
36
|
+
secondary: secondary,
|
|
37
|
+
passive: passive,
|
|
38
|
+
common: common,
|
|
39
|
+
approval: approval,
|
|
40
|
+
default: defaultPurple,
|
|
41
|
+
suggestion: suggestion
|
|
42
|
+
};
|
|
43
|
+
exports.legacyBadgeColors = legacyBadgeColors;
|
package/commonjs/Badge/index.js
CHANGED
|
@@ -5,8 +5,14 @@ exports.default = void 0;
|
|
|
5
5
|
|
|
6
6
|
var React = _interopRequireWildcard(require("react"));
|
|
7
7
|
|
|
8
|
+
var _Icon = _interopRequireDefault(require("../Icon"));
|
|
9
|
+
|
|
8
10
|
var _styles = _interopRequireDefault(require("./styles"));
|
|
9
11
|
|
|
12
|
+
var _Box = _interopRequireDefault(require("../Box"));
|
|
13
|
+
|
|
14
|
+
var _excluded = ["children", "text", "iconName", "type", "tip", "size", "badgeColor"];
|
|
15
|
+
|
|
10
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
17
|
|
|
12
18
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
@@ -17,43 +23,41 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
|
17
23
|
|
|
18
24
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
19
25
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
var Badge = function Badge(_ref) {
|
|
27
|
+
var children = _ref.children,
|
|
28
|
+
text = _ref.text,
|
|
29
|
+
iconName = _ref.iconName,
|
|
30
|
+
type = _ref.type,
|
|
31
|
+
tip = _ref.tip,
|
|
32
|
+
_ref$size = _ref.size,
|
|
33
|
+
size = _ref$size === void 0 ? "small" : _ref$size,
|
|
34
|
+
_ref$badgeColor = _ref.badgeColor,
|
|
35
|
+
badgeColor = _ref$badgeColor === void 0 ? "blue" : _ref$badgeColor,
|
|
36
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
37
|
+
|
|
38
|
+
if (children && text) {
|
|
39
|
+
throw new Error("can't use both `children` and `text` props. Text is deprecated, consider using children.");
|
|
29
40
|
}
|
|
30
41
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}(React.Component);
|
|
54
|
-
|
|
55
|
-
exports.default = Badge;
|
|
56
|
-
Badge.defaultProps = {
|
|
57
|
-
type: "primary",
|
|
58
|
-
size: "default"
|
|
59
|
-
};
|
|
42
|
+
return /*#__PURE__*/React.createElement(_styles.default, _extends({}, rest, {
|
|
43
|
+
// size previously included default, which currently maps to small. Once consumers have updated this can be simplified.
|
|
44
|
+
size: size === "default" ? "large" : size,
|
|
45
|
+
badgeColor: badgeColor,
|
|
46
|
+
"data-tip": tip,
|
|
47
|
+
"data-qa-badge": text || "",
|
|
48
|
+
"data-qa-badge-type": type,
|
|
49
|
+
"data-qa-badge-tip": tip || "",
|
|
50
|
+
type: type && type
|
|
51
|
+
}), /*#__PURE__*/React.createElement(_Box.default, {
|
|
52
|
+
display: "flex",
|
|
53
|
+
alignItems: "center",
|
|
54
|
+
JustifyContent: "center"
|
|
55
|
+
}, iconName ? /*#__PURE__*/React.createElement(_Icon.default, {
|
|
56
|
+
mr: 200,
|
|
57
|
+
name: iconName,
|
|
58
|
+
size: size === "small" ? "mini" : "default"
|
|
59
|
+
}) : null, children || text));
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
var _default = Badge;
|
|
63
|
+
exports.default = _default;
|
package/commonjs/Badge/styles.js
CHANGED
|
@@ -3,46 +3,30 @@
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.default = void 0;
|
|
5
5
|
|
|
6
|
-
var _styledComponents =
|
|
6
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
7
7
|
|
|
8
8
|
var _systemProps = require("../utils/system-props");
|
|
9
9
|
|
|
10
10
|
var _themeGet = require("@styled-system/theme-get");
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
15
|
-
|
|
16
|
-
var colors = {
|
|
17
|
-
primary: "colors.neutral.0",
|
|
18
|
-
secondary: "colors.neutral.800",
|
|
19
|
-
passive: "colors.neutral.800",
|
|
20
|
-
common: "colors.neutral.0",
|
|
21
|
-
approval: "colors.neutral.800",
|
|
22
|
-
default: "colors.neutral.0",
|
|
23
|
-
suggestion: "colors.neutral.900"
|
|
24
|
-
};
|
|
25
|
-
var backgroundColors = {
|
|
26
|
-
primary: "colors.blue.700",
|
|
27
|
-
secondary: "colors.yellow.500",
|
|
28
|
-
passive: "colors.neutral.200",
|
|
29
|
-
common: "colors.aqua.600",
|
|
30
|
-
approval: "colors.orange.300",
|
|
31
|
-
default: "colors.purple.700",
|
|
32
|
-
suggestion: "colors.blue.300"
|
|
33
|
-
}; // eslint-disable-next-line prettier/prettier
|
|
12
|
+
var _constants = require("./constants");
|
|
34
13
|
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
+
|
|
16
|
+
// eslint-disable-next-line prettier/prettier
|
|
35
17
|
var Container = _styledComponents.default.span.withConfig({
|
|
36
18
|
displayName: "styles__Container",
|
|
37
|
-
componentId: "g1g76b-0"
|
|
38
|
-
})(["
|
|
39
|
-
return
|
|
40
|
-
}, function (
|
|
41
|
-
return
|
|
42
|
-
}, function (
|
|
43
|
-
return
|
|
44
|
-
}, function (
|
|
45
|
-
return
|
|
19
|
+
componentId: "sc-g1g76b-0"
|
|
20
|
+
})(["font-family:", ";", ";border-radius:9999px;line-height:16px;display:inline-block;color:", ";background:", ";padding:", ";", ";"], function (p) {
|
|
21
|
+
return p.theme.fontFamily;
|
|
22
|
+
}, function (p) {
|
|
23
|
+
return p.size === "small" ? p.theme.typography[100] : p.theme.typography[200];
|
|
24
|
+
}, function (p) {
|
|
25
|
+
return p.type ? (0, _themeGet.themeGet)(_constants.legacyBadgeColors[p.type].color) : p.theme.colors.text.body;
|
|
26
|
+
}, function (p) {
|
|
27
|
+
return p.type ? (0, _themeGet.themeGet)(_constants.legacyBadgeColors[p.type].background) : p.theme.colors.container.background.decorative[p.badgeColor];
|
|
28
|
+
}, function (p) {
|
|
29
|
+
return p.size === "small" ? p.theme.space[0] + " " + p.theme.space[200] : "" + p.theme.space[300];
|
|
46
30
|
}, _systemProps.COMMON);
|
|
47
31
|
|
|
48
32
|
var _default = Container;
|
package/commonjs/Banner/index.js
CHANGED
|
@@ -11,6 +11,8 @@ var _styles = _interopRequireDefault(require("./styles"));
|
|
|
11
11
|
|
|
12
12
|
var _Box = _interopRequireDefault(require("../Box"));
|
|
13
13
|
|
|
14
|
+
var _excluded = ["type", "text"];
|
|
15
|
+
|
|
14
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
17
|
|
|
16
18
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
@@ -81,7 +83,7 @@ var Banner = /*#__PURE__*/function (_React$Component) {
|
|
|
81
83
|
var _this$props = this.props,
|
|
82
84
|
type = _this$props.type,
|
|
83
85
|
text = _this$props.text,
|
|
84
|
-
rest = _objectWithoutPropertiesLoose(_this$props,
|
|
86
|
+
rest = _objectWithoutPropertiesLoose(_this$props, _excluded);
|
|
85
87
|
|
|
86
88
|
return /*#__PURE__*/React.createElement(_styles.default // danger needs to be properly deprecated and removed DS-1094
|
|
87
89
|
, _extends({
|
|
@@ -13,7 +13,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
13
13
|
|
|
14
14
|
var Container = _styledComponents.default.div.withConfig({
|
|
15
15
|
displayName: "styles__Container",
|
|
16
|
-
componentId: "q43dr4-0"
|
|
16
|
+
componentId: "sc-q43dr4-0"
|
|
17
17
|
})(function (props) {
|
|
18
18
|
return (0, _styledComponents.css)(["display:flex;overflow:hidden;align-items:center;justify-content:space-between;color:", ";border-radius:", ";font-family:", ";", " padding:", ";border:1px solid ", ";background-color:", ";.Icon{align-self:flex-start;margin-top:3px;margin-right:", ";min-width:16px;color:", ";}a,button{font-weight:", ";color:", ";font-size:inherit;&:hover{color:", ";text-decoration:underline;}}> span:not(.Icon){display:block;}", " ", ""], props.theme.colors.text.body, props.theme.radii.outer, props.theme.fontFamily, props.theme.typography[200], props.theme.space[300], props.theme.colors.container.border[props.type], props.theme.colors.container.background[props.type], props.theme.space[400], props.theme.colors.icon[props.type], props.theme.fontWeights.semibold, props.theme.colors.text.body, props.theme.colors.text.body, _systemProps.COMMON, _systemProps.LAYOUT);
|
|
19
19
|
});
|
package/commonjs/Box/styles.js
CHANGED
|
@@ -11,7 +11,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
11
11
|
|
|
12
12
|
var Container = _styledComponents.default.div.withConfig({
|
|
13
13
|
displayName: "styles__Container",
|
|
14
|
-
componentId: "ma8yo6-0"
|
|
14
|
+
componentId: "sc-ma8yo6-0"
|
|
15
15
|
})(["box-sizing:border-box;font-family:", ";", " ", " ", " ", " ", " ", ""], function (_ref) {
|
|
16
16
|
var theme = _ref.theme;
|
|
17
17
|
return theme.fontFamily;
|
|
@@ -13,6 +13,9 @@ var _Menu = require("../Menu");
|
|
|
13
13
|
|
|
14
14
|
var _styles = _interopRequireDefault(require("./styles"));
|
|
15
15
|
|
|
16
|
+
var _excluded = ["children", "href"],
|
|
17
|
+
_excluded2 = ["ariaLabel", "overflow", "children"];
|
|
18
|
+
|
|
16
19
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
20
|
|
|
18
21
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
@@ -26,7 +29,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
26
29
|
var BreadcrumbItem = function BreadcrumbItem(_ref) {
|
|
27
30
|
var children = _ref.children,
|
|
28
31
|
href = _ref.href,
|
|
29
|
-
rest = _objectWithoutPropertiesLoose(_ref,
|
|
32
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
30
33
|
|
|
31
34
|
return /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement(_Link.default, _extends({
|
|
32
35
|
href: href // $FlowIssue - upgrade v0.112.0
|
|
@@ -38,7 +41,7 @@ var Breadcrumb = function Breadcrumb(_ref2) {
|
|
|
38
41
|
var ariaLabel = _ref2.ariaLabel,
|
|
39
42
|
overflow = _ref2.overflow,
|
|
40
43
|
children = _ref2.children,
|
|
41
|
-
rest = _objectWithoutPropertiesLoose(_ref2,
|
|
44
|
+
rest = _objectWithoutPropertiesLoose(_ref2, _excluded2);
|
|
42
45
|
|
|
43
46
|
var listItems = React.Children.toArray(children);
|
|
44
47
|
var lastItem = listItems[listItems.length - 1];
|