@sproutsocial/racine 8.8.0 → 9.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/__flow__/Button/styles.js +4 -2
- package/__flow__/Card/styles.js +1 -1
- package/__flow__/Checkbox/styles.js +3 -1
- package/__flow__/Drawer/styles.js +1 -1
- package/__flow__/KeyboardKey/styles.js +1 -1
- package/__flow__/Listbox/__snapshots__/index.test.js.snap +40 -34
- package/__flow__/Menu/__snapshots__/index.test.js.snap +15 -12
- package/__flow__/Menu/index.js +3 -7
- package/__flow__/Menu/index.stories.js +1 -1
- package/__flow__/Menu/styles.js +1 -18
- package/__flow__/Modal/index.test.js +0 -16
- package/__flow__/Modal/styles.js +1 -1
- package/__flow__/Popout/index.js +1 -1
- package/__flow__/Token/index.js +4 -1
- package/__flow__/Token/index.stories.js +11 -0
- package/__flow__/Token/styles.js +43 -33
- package/__flow__/Tooltip/index.js +1 -1
- package/__flow__/themes/dark/theme.js +179 -159
- package/__flow__/themes/default/theme.js +15 -8
- package/__flow__/themes/utils/interact.js +12 -0
- package/__flow__/types/system-props.flow.js +1 -2
- package/commonjs/Button/styles.js +2 -2
- package/commonjs/Card/styles.js +1 -1
- package/commonjs/Checkbox/styles.js +1 -1
- package/commonjs/Drawer/styles.js +1 -1
- package/commonjs/KeyboardKey/styles.js +1 -1
- package/commonjs/Menu/index.js +3 -1
- package/commonjs/Menu/styles.js +3 -16
- package/commonjs/Modal/styles.js +1 -1
- package/commonjs/Popout/index.js +1 -1
- package/commonjs/Token/index.js +5 -2
- package/commonjs/Token/styles.js +19 -50
- package/commonjs/Tooltip/index.js +1 -1
- package/commonjs/themes/dark/theme.js +178 -157
- package/commonjs/themes/default/theme.js +15 -8
- package/commonjs/themes/utils/interact.js +19 -0
- package/dist/themes/dark.scss +18 -11
- package/dist/themes/default.scss +14 -15
- package/lib/Button/styles.js +2 -2
- package/lib/Card/styles.js +1 -1
- package/lib/Checkbox/styles.js +1 -1
- package/lib/Drawer/styles.js +1 -1
- package/lib/KeyboardKey/styles.js +1 -1
- package/lib/Menu/index.js +4 -2
- package/lib/Menu/styles.js +2 -13
- package/lib/Modal/styles.js +1 -1
- package/lib/Popout/index.js +1 -1
- package/lib/Token/index.js +5 -2
- package/lib/Token/styles.js +19 -50
- package/lib/Tooltip/index.js +1 -1
- package/lib/themes/dark/theme.js +173 -156
- package/lib/themes/default/theme.js +14 -8
- package/lib/themes/utils/interact.js +13 -0
- package/package.json +3 -3
- package/__flow__/Modal/__snapshots__/index.test.js.snap +0 -80
package/dist/themes/dark.scss
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
$dark: (
|
|
2
2
|
__esModule: true,
|
|
3
|
+
shadows: (
|
|
4
|
+
low: 0px 2px 4px #040404FF,
|
|
5
|
+
medium: 0px 8px 16px #040404FF,
|
|
6
|
+
high: 0px 16px 32px #040404FF
|
|
7
|
+
),
|
|
3
8
|
default: (
|
|
9
|
+
utils: (
|
|
10
|
+
|
|
11
|
+
),
|
|
4
12
|
breakpoints: (900px, 1200px, 1500px, 1800px),
|
|
5
13
|
colors: (
|
|
6
14
|
app: (
|
|
@@ -175,6 +183,9 @@ $dark: (
|
|
|
175
183
|
selected: #FFFFFF
|
|
176
184
|
)
|
|
177
185
|
),
|
|
186
|
+
elevation: (
|
|
187
|
+
base: #040404
|
|
188
|
+
),
|
|
178
189
|
network: (
|
|
179
190
|
twitter: #1da1f2,
|
|
180
191
|
twitter_like: #e0245e,
|
|
@@ -401,6 +412,9 @@ $dark: (
|
|
|
401
412
|
18: #ff7f6e,
|
|
402
413
|
19: #c2f2bd,
|
|
403
414
|
20: #ffe99a
|
|
415
|
+
),
|
|
416
|
+
utils: (
|
|
417
|
+
|
|
404
418
|
)
|
|
405
419
|
),
|
|
406
420
|
typography: (
|
|
@@ -568,16 +582,9 @@ $dark: (
|
|
|
568
582
|
500: 1px
|
|
569
583
|
),
|
|
570
584
|
shadows: (
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
400: 0px 16px 32px rgba(39,51,51,.24),
|
|
575
|
-
shadows: (
|
|
576
|
-
100: 0px 2px 4px rgba(39,51,51,.24),
|
|
577
|
-
200: 0px 4px 8px rgba(39,51,51,.24),
|
|
578
|
-
300: 0px 8px 16px rgba(39,51,51,.24),
|
|
579
|
-
400: 0px 16px 32px rgba(39,51,51,.24)
|
|
580
|
-
)
|
|
585
|
+
low: 0px 2px 4px #040404FF,
|
|
586
|
+
medium: 0px 8px 16px #040404FF,
|
|
587
|
+
high: 0px 16px 32px #040404FF
|
|
581
588
|
),
|
|
582
589
|
easing: (
|
|
583
590
|
ease_in: cubic-bezier(.4, 0, .7, .2),
|
|
@@ -589,6 +596,6 @@ $dark: (
|
|
|
589
596
|
medium: .3s,
|
|
590
597
|
slow: .6s
|
|
591
598
|
),
|
|
592
|
-
mode: dark
|
|
599
|
+
mode: default-dark
|
|
593
600
|
)
|
|
594
601
|
);
|
package/dist/themes/default.scss
CHANGED
|
@@ -85,10 +85,9 @@ $default: (
|
|
|
85
85
|
500: 1px
|
|
86
86
|
),
|
|
87
87
|
shadows: (
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
400: 0px 16px 32px rgba(39,51,51,.24)
|
|
88
|
+
low: 0px 2px 4px #2733333D,
|
|
89
|
+
medium: 0px 8px 16px #2733333D,
|
|
90
|
+
high: 0px 16px 32px #2733333D
|
|
92
91
|
),
|
|
93
92
|
easing: (
|
|
94
93
|
ease_in: cubic-bezier(.4, 0, .7, .2),
|
|
@@ -101,6 +100,9 @@ $default: (
|
|
|
101
100
|
slow: .6s
|
|
102
101
|
),
|
|
103
102
|
default: (
|
|
103
|
+
utils: (
|
|
104
|
+
|
|
105
|
+
),
|
|
104
106
|
breakpoints: (900px, 1200px, 1500px, 1800px),
|
|
105
107
|
colors: (
|
|
106
108
|
app: (
|
|
@@ -275,6 +277,9 @@ $default: (
|
|
|
275
277
|
selected: #364141
|
|
276
278
|
)
|
|
277
279
|
),
|
|
280
|
+
elevation: (
|
|
281
|
+
base: #2733333D
|
|
282
|
+
),
|
|
278
283
|
network: (
|
|
279
284
|
twitter: #1da1f2,
|
|
280
285
|
twitter_like: #e0245e,
|
|
@@ -668,16 +673,9 @@ $default: (
|
|
|
668
673
|
500: 1px
|
|
669
674
|
),
|
|
670
675
|
shadows: (
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
400: 0px 16px 32px rgba(39,51,51,.24),
|
|
675
|
-
shadows: (
|
|
676
|
-
100: 0px 2px 4px rgba(39,51,51,.24),
|
|
677
|
-
200: 0px 4px 8px rgba(39,51,51,.24),
|
|
678
|
-
300: 0px 8px 16px rgba(39,51,51,.24),
|
|
679
|
-
400: 0px 16px 32px rgba(39,51,51,.24)
|
|
680
|
-
)
|
|
676
|
+
low: 0px 2px 4px #2733333D,
|
|
677
|
+
medium: 0px 8px 16px #2733333D,
|
|
678
|
+
high: 0px 16px 32px #2733333D
|
|
681
679
|
),
|
|
682
680
|
easing: (
|
|
683
681
|
ease_in: cubic-bezier(.4, 0, .7, .2),
|
|
@@ -688,6 +686,7 @@ $default: (
|
|
|
688
686
|
fast: .15s,
|
|
689
687
|
medium: .3s,
|
|
690
688
|
slow: .6s
|
|
691
|
-
)
|
|
689
|
+
),
|
|
690
|
+
mode: default-light
|
|
692
691
|
)
|
|
693
692
|
);
|
package/lib/Button/styles.js
CHANGED
|
@@ -32,7 +32,7 @@ var Container = styled.button.withConfig({
|
|
|
32
32
|
}, function (props) {
|
|
33
33
|
return props.theme.colors.button[props.appearance].background.hover;
|
|
34
34
|
}, function (props) {
|
|
35
|
-
return props.appearance === "placeholder" ? props.theme.shadows
|
|
35
|
+
return props.appearance === "placeholder" ? props.theme.shadows.low : "none";
|
|
36
36
|
}, function (props) {
|
|
37
37
|
return props.theme.colors.button[props.appearance].text.hover;
|
|
38
38
|
}, function (props) {
|
|
@@ -42,6 +42,6 @@ var Container = styled.button.withConfig({
|
|
|
42
42
|
}, function (props) {
|
|
43
43
|
return props.disabled && disabled;
|
|
44
44
|
}, function (props) {
|
|
45
|
-
return props.appearance === "pill" && css(["display:inline-flex;align-items:center;justify-content:center;mix-blend-mode:", ";", ""], props.theme.mode ? "screen" : "multiply", pill);
|
|
45
|
+
return props.appearance === "pill" && css(["display:inline-flex;align-items:center;justify-content:center;mix-blend-mode:", ";", ""], props.theme.mode === "default-dark" ? "screen" : "multiply", pill);
|
|
46
46
|
}, Icon, LAYOUT, COMMON);
|
|
47
47
|
export default Container; //${props.theme.mode === "dark" ? "screen" : "multiply"}
|
package/lib/Card/styles.js
CHANGED
|
@@ -9,7 +9,7 @@ var Container = styled(Box).withConfig({
|
|
|
9
9
|
}, function (props) {
|
|
10
10
|
return props.theme.radii[500];
|
|
11
11
|
}, function (props) {
|
|
12
|
-
return props.theme.shadows
|
|
12
|
+
return props.theme.shadows.low;
|
|
13
13
|
}, function (props) {
|
|
14
14
|
return props.theme.duration.medium;
|
|
15
15
|
}, function (props) {
|
package/lib/Checkbox/styles.js
CHANGED
|
@@ -22,7 +22,7 @@ export var InputWrapper = styled(Box).withConfig({
|
|
|
22
22
|
return props.theme.duration.fast;
|
|
23
23
|
}, function (props) {
|
|
24
24
|
return props.theme.easing.ease_inout;
|
|
25
|
-
}, props.theme.mode ? "screen" : "multiply", pill, props.theme.colors.app.background.base, PillInput, pill);
|
|
25
|
+
}, props.theme.mode === "default-dark" ? "screen" : "multiply", pill, props.theme.colors.app.background.base, PillInput, pill);
|
|
26
26
|
});
|
|
27
27
|
InputWrapper.displayName = "InputWrapper";
|
|
28
28
|
export var CheckboxBox = styled.div.withConfig({
|
package/lib/Drawer/styles.js
CHANGED
|
@@ -13,7 +13,7 @@ var Container = styled.div.withConfig({
|
|
|
13
13
|
}, function (props) {
|
|
14
14
|
return props.theme.colors.container.background.base;
|
|
15
15
|
}, function (props) {
|
|
16
|
-
return props.theme.shadows
|
|
16
|
+
return props.theme.shadows.high;
|
|
17
17
|
}, function (props) {
|
|
18
18
|
return css(["", ":", "px;"], props.direction, props.offset);
|
|
19
19
|
}, COMMON);
|
|
@@ -12,7 +12,7 @@ var Container = styled.div.withConfig({
|
|
|
12
12
|
}, function (props) {
|
|
13
13
|
return props.theme.radii[500];
|
|
14
14
|
}, function (props) {
|
|
15
|
-
return props.theme.shadows
|
|
15
|
+
return props.theme.shadows.low;
|
|
16
16
|
}, function (props) {
|
|
17
17
|
return props.theme.space[200];
|
|
18
18
|
}, COMMON);
|
package/lib/Menu/index.js
CHANGED
|
@@ -8,7 +8,7 @@ import * as React from "react";
|
|
|
8
8
|
import styled from "styled-components";
|
|
9
9
|
import { useCallback, useContext, useEffect, useMemo, useRef, useState } from "react";
|
|
10
10
|
import uniqueId from "lodash.uniqueid";
|
|
11
|
-
import {
|
|
11
|
+
import { MenuItemContainer, MenuItemsContainer } from "./styles";
|
|
12
12
|
import { MENU_ITEM_ROLES, MENU_ROLES } from "./constants";
|
|
13
13
|
import Box from "../Box";
|
|
14
14
|
import Button from "../Button";
|
|
@@ -244,7 +244,9 @@ export var MenuGroup = function MenuGroup(_ref2) {
|
|
|
244
244
|
mt: 350,
|
|
245
245
|
color: "text.headline",
|
|
246
246
|
_css: isDisabled && disabled
|
|
247
|
-
}, title)), /*#__PURE__*/React.createElement(
|
|
247
|
+
}, title)), /*#__PURE__*/React.createElement(Box, _extends({}, props, {
|
|
248
|
+
m: 300,
|
|
249
|
+
p: 300,
|
|
248
250
|
role: "group"
|
|
249
251
|
}), children));
|
|
250
252
|
};
|
package/lib/Menu/styles.js
CHANGED
|
@@ -41,18 +41,7 @@ export var MenuItemContainer = styled(Box).withConfig({
|
|
|
41
41
|
}, function (props) {
|
|
42
42
|
return props.disabled && disabled;
|
|
43
43
|
});
|
|
44
|
-
export var MenuGroupContainer = styled(Box).withConfig({
|
|
45
|
-
displayName: "styles__MenuGroupContainer",
|
|
46
|
-
componentId: "fjvae4-1"
|
|
47
|
-
})(["", ";"], function (props) {
|
|
48
|
-
return props.appearance === "flush" ? css(["margin:0 -", ";"], function (props) {
|
|
49
|
-
return props.theme.space[300];
|
|
50
|
-
}) : css(["padding:", ";"], function (props) {
|
|
51
|
-
return props.theme.space[300];
|
|
52
|
-
});
|
|
53
|
-
});
|
|
54
44
|
export var MenuItemsContainer = styled(Box).withConfig({
|
|
55
45
|
displayName: "styles__MenuItemsContainer",
|
|
56
|
-
componentId: "fjvae4-
|
|
57
|
-
})(["list-style-type:none;outline:0;"]);
|
|
58
|
-
export default MenuGroupContainer;
|
|
46
|
+
componentId: "fjvae4-1"
|
|
47
|
+
})(["list-style-type:none;outline:0;"]);
|
package/lib/Modal/styles.js
CHANGED
|
@@ -53,7 +53,7 @@ export var Container = styled(ReactModalAdapter).withConfig({
|
|
|
53
53
|
}, function (props) {
|
|
54
54
|
return props.theme.radii[500];
|
|
55
55
|
}, function (props) {
|
|
56
|
-
return props.theme.shadows
|
|
56
|
+
return props.theme.shadows.medium;
|
|
57
57
|
}, function (props) {
|
|
58
58
|
return props.theme.colors.text.body;
|
|
59
59
|
}, BODY_PADDING, BODY_PADDING, BODY_PADDING, width, COMMON);
|
package/lib/Popout/index.js
CHANGED
package/lib/Token/index.js
CHANGED
|
@@ -18,14 +18,17 @@ var Token = function Token(_ref) {
|
|
|
18
18
|
valid = _ref$valid === void 0 ? true : _ref$valid,
|
|
19
19
|
_ref$disabled = _ref.disabled,
|
|
20
20
|
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
21
|
-
|
|
21
|
+
_ref$palette = _ref.palette,
|
|
22
|
+
palette = _ref$palette === void 0 ? "neutral" : _ref$palette,
|
|
23
|
+
rest = _objectWithoutPropertiesLoose(_ref, ["children", "closeable", "onClick", "qa", "valid", "disabled", "palette"]);
|
|
22
24
|
|
|
23
25
|
var textContainer = useTextContent("");
|
|
24
26
|
return /*#__PURE__*/React.createElement(Container, _extends({
|
|
25
27
|
ref: textContainer,
|
|
26
28
|
valid: valid,
|
|
27
|
-
|
|
29
|
+
palette: palette,
|
|
28
30
|
type: closeable || onClick ? "button" : undefined,
|
|
31
|
+
as: closeable || onClick ? "button" : "div",
|
|
29
32
|
closeable: closeable || onClick,
|
|
30
33
|
disabled: disabled,
|
|
31
34
|
onClick: onClick,
|
package/lib/Token/styles.js
CHANGED
|
@@ -4,55 +4,24 @@ import { focusRing } from "../utils/mixins";
|
|
|
4
4
|
var Container = styled.button.withConfig({
|
|
5
5
|
displayName: "styles__Container",
|
|
6
6
|
componentId: "nyn5zy-0"
|
|
7
|
-
})(["
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
},
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
},
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
},
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
},
|
|
26
|
-
return props.theme.duration.fast;
|
|
27
|
-
}, function (props) {
|
|
28
|
-
return props.theme.easing.ease_inout;
|
|
29
|
-
}, focusRing, function (props) {
|
|
30
|
-
return props.closeable && css(["cursor:pointer;&:hover,&:active{color:", ";border:1px solid ", ";background-color:", ";}"], function (props) {
|
|
31
|
-
return props.theme.colors.text.body;
|
|
32
|
-
}, function (props) {
|
|
33
|
-
return props.theme.colors.container.border.decorative.neutral;
|
|
34
|
-
}, function (props) {
|
|
35
|
-
return props.theme.colors.container.background.decorative.neutral;
|
|
36
|
-
});
|
|
37
|
-
}, function (props) {
|
|
38
|
-
return props.disabled && css(["opacity:0.4;cursor:not-allowed;&:hover,&:active{background:", ";border:1px solid ", ";}"], function (props) {
|
|
39
|
-
return props.theme.colors.container.background.base;
|
|
40
|
-
}, function (props) {
|
|
41
|
-
return props.theme.colors.container.border.base;
|
|
42
|
-
});
|
|
43
|
-
}, function (props) {
|
|
44
|
-
return !props.valid && css(["color:", ";border-color:", ";background:", ";&:hover{color:", ";border:1px solid ", ";background-color:", ";}"], function (props) {
|
|
45
|
-
return props.theme.colors.text.body;
|
|
46
|
-
}, function (props) {
|
|
47
|
-
return props.theme.colors.container.border.error;
|
|
48
|
-
}, function (props) {
|
|
49
|
-
return props.theme.colors.container.background.error;
|
|
50
|
-
}, function (props) {
|
|
51
|
-
return props.theme.colors.text.body;
|
|
52
|
-
}, function (props) {
|
|
53
|
-
return props.theme.colors.container.border.error;
|
|
54
|
-
}, function (props) {
|
|
55
|
-
return props.theme.colors.container.background.error;
|
|
56
|
-
});
|
|
7
|
+
})(["position:relative;display:inline-block;margin:0;line-height:1;vertical-align:middle;outline:none;", " &:focus{", "}", " ", " ", " ", " ", ""], function (_ref) {
|
|
8
|
+
var theme = _ref.theme;
|
|
9
|
+
return css(["", " font-family:", ";font-weight:", ";border:1px solid ", ";border-radius:", ";color:", ";background:", ";padding:", " ", ";transition:all ", " ", ";"], theme.typography[200], theme.fontFamily, theme.fontWeights.normal, theme.colors.container.border.base, theme.radii[500], theme.colors.text.body, theme.colors.container.background.base, theme.space[200], theme.space[300], theme.duration.fast, theme.easing.ease_inout);
|
|
10
|
+
}, focusRing, function (_ref2) {
|
|
11
|
+
var theme = _ref2.theme,
|
|
12
|
+
palette = _ref2.palette;
|
|
13
|
+
return palette === "blue" && css(["color:", ";background:", ";border:1px solid ", ";&:hover,&:active{cursor:pointer;box-shadow:", ";border:1px solid ", ";}"], theme.colors.text.body, theme.colors.container.background.decorative.blue, theme.colors.container.border.decorative.blue, theme.shadows.low, theme.utils.interact(theme.colors.container.border.decorative.blue));
|
|
14
|
+
}, function (_ref3) {
|
|
15
|
+
var closeable = _ref3.closeable,
|
|
16
|
+
theme = _ref3.theme;
|
|
17
|
+
return closeable && css(["cursor:pointer;&:hover,&:active{box-shadow:", ";border:1px solid ", ";}"], theme.shadows.low, theme.utils.interact(theme.colors.container.border.base));
|
|
18
|
+
}, function (_ref4) {
|
|
19
|
+
var disabled = _ref4.disabled,
|
|
20
|
+
theme = _ref4.theme;
|
|
21
|
+
return disabled && css(["opacity:0.4;cursor:not-allowed;&:hover,&:active{box-shadow:none;border:1px solid ", ";}"], theme.colors.container.border.base);
|
|
22
|
+
}, function (_ref5) {
|
|
23
|
+
var valid = _ref5.valid,
|
|
24
|
+
theme = _ref5.theme;
|
|
25
|
+
return !valid && css(["color:", ";background:", ";border:1px solid ", ";&:hover{box-shadow:", ";border:1px solid ", ";}"], theme.colors.text.error, theme.colors.container.background.error, theme.colors.container.border.error, theme.shadows.low, theme.utils.interact(theme.colors.container.border.error));
|
|
57
26
|
}, COMMON);
|
|
58
27
|
export default Container;
|
package/lib/Tooltip/index.js
CHANGED
|
@@ -118,7 +118,7 @@ var Content = function Content(_ref2) {
|
|
|
118
118
|
m: 200,
|
|
119
119
|
color: "text.body",
|
|
120
120
|
bg: "container.background.base",
|
|
121
|
-
boxShadow:
|
|
121
|
+
boxShadow: "medium",
|
|
122
122
|
border: 500,
|
|
123
123
|
borderColor: "container.border.base" // $FlowIssue - upgrade v0.112.0
|
|
124
124
|
|