@sproutsocial/racine 7.6.0 → 8.0.0-beta-dark-mode.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/__flow__/Badge/styles.js +1 -1
- package/__flow__/Banner/index.js +2 -1
- package/__flow__/Banner/styles.js +9 -6
- package/__flow__/Box/index.stories.js +3 -3
- package/__flow__/Box/styles.js +4 -4
- package/__flow__/Button/__snapshots__/index.test.js.snap +4 -4
- package/__flow__/Button/index.js +7 -2
- package/__flow__/Button/index.stories.js +6 -1
- package/__flow__/Button/styles.js +17 -12
- package/__flow__/Card/index.js +2 -2
- package/__flow__/CharacterCounter/styles.js +1 -1
- package/__flow__/Checkbox/styles.js +18 -16
- package/__flow__/Collapsible/index.stories.js +11 -5
- package/__flow__/DatePicker/styles.js +14 -12
- package/__flow__/Drawer/styles.js +1 -1
- package/__flow__/FormField/index.js +1 -1
- package/__flow__/Icon/index.stories.js +24 -6
- package/__flow__/Input/styles.js +6 -6
- package/__flow__/KeyboardKey/styles.js +2 -2
- package/__flow__/Link/styles.js +3 -5
- package/__flow__/Listbox/__snapshots__/index.test.js.snap +8 -2
- package/__flow__/Listbox/index.js +4 -4
- package/__flow__/Menu/__snapshots__/index.test.js.snap +5 -2
- package/__flow__/Menu/index.js +7 -2
- package/__flow__/Menu/styles.js +6 -3
- package/__flow__/Message/index.js +2 -2
- package/__flow__/Message/index.stories.js +1 -1
- package/__flow__/Modal/index.js +1 -1
- package/__flow__/Modal/index.stories.js +14 -8
- package/__flow__/Modal/styles.js +2 -2
- package/__flow__/Numeral/styles.js +2 -1
- package/__flow__/OverflowList/index.stories.js +15 -8
- package/__flow__/Popout/index.js +3 -3
- package/__flow__/Radio/styles.js +8 -8
- package/__flow__/SegmentedControl/styles.js +9 -5
- package/__flow__/Select/styles.js +5 -5
- package/__flow__/Skeleton/index.js +4 -4
- package/__flow__/Skeleton/index.stories.js +1 -1
- package/__flow__/Stack/index.stories.js +3 -1
- package/__flow__/Switch/styles.js +13 -11
- package/__flow__/Table/styles.js +2 -1
- package/__flow__/TableCell/index.stories.js +2 -0
- package/__flow__/TableHeaderCell/index.stories.js +3 -0
- package/__flow__/TableRowAccordion/styles.js +2 -1
- package/__flow__/Tabs/styles.js +5 -5
- package/__flow__/Textarea/styles.js +5 -5
- package/__flow__/ThemeProvider/index.js +2 -2
- package/__flow__/Toast/index.js +1 -1
- package/__flow__/Toast/styles.js +3 -3
- package/__flow__/Token/styles.js +19 -10
- package/__flow__/TokenInput/index.js +2 -1
- package/__flow__/TokenInput/styles.js +14 -6
- package/__flow__/Tooltip/index.js +2 -2
- package/__flow__/index.js +2 -2
- package/__flow__/themes/dark/decorative-palettes.js +43 -0
- package/__flow__/themes/dark/theme.js +195 -0
- package/__flow__/themes/default/decorative-palettes.js +43 -0
- package/__flow__/themes/default/literal-colors.js +160 -0
- package/__flow__/themes/default/theme.js +354 -0
- package/__flow__/types/system-props.flow.js +2 -2
- package/__flow__/types/theme.colors.flow.js +244 -0
- package/__flow__/types/theme.flow.js +40 -213
- package/__flow__/utils/mixins.js +4 -3
- package/__flow__/utils/responsiveProps/index.js +1 -1
- package/commonjs/Badge/styles.js +1 -1
- package/commonjs/Banner/index.js +3 -2
- package/commonjs/Banner/styles.js +1 -1
- package/commonjs/Button/index.js +5 -3
- package/commonjs/Button/styles.js +12 -11
- package/commonjs/Card/index.js +2 -2
- package/commonjs/CharacterCounter/styles.js +1 -1
- package/commonjs/Checkbox/styles.js +7 -7
- package/commonjs/DatePicker/styles.js +13 -11
- package/commonjs/Drawer/styles.js +1 -1
- package/commonjs/FormField/index.js +1 -1
- package/commonjs/Input/styles.js +6 -6
- package/commonjs/KeyboardKey/styles.js +2 -2
- package/commonjs/Link/styles.js +4 -8
- package/commonjs/Listbox/index.js +4 -4
- package/commonjs/Menu/index.js +2 -2
- package/commonjs/Menu/styles.js +10 -4
- package/commonjs/Message/index.js +2 -2
- package/commonjs/Modal/index.js +1 -1
- package/commonjs/Modal/styles.js +2 -2
- package/commonjs/Numeral/styles.js +1 -1
- package/commonjs/Popout/index.js +2 -2
- package/commonjs/Radio/styles.js +4 -4
- package/commonjs/SegmentedControl/styles.js +5 -5
- package/commonjs/Select/styles.js +5 -5
- package/commonjs/Skeleton/index.js +2 -2
- package/commonjs/Switch/styles.js +7 -7
- package/commonjs/Table/styles.js +1 -1
- package/commonjs/TableRowAccordion/styles.js +1 -1
- package/commonjs/Tabs/styles.js +5 -5
- package/commonjs/Textarea/styles.js +5 -5
- package/commonjs/ThemeProvider/index.js +1 -1
- package/commonjs/Toast/index.js +1 -1
- package/commonjs/Toast/styles.js +3 -3
- package/commonjs/Token/styles.js +16 -12
- package/commonjs/TokenInput/index.js +38 -35
- package/commonjs/TokenInput/styles.js +9 -7
- package/commonjs/Tooltip/index.js +2 -2
- package/commonjs/index.js +3 -3
- package/commonjs/themes/dark/decorative-palettes.js +51 -0
- package/commonjs/themes/dark/theme.js +195 -0
- package/commonjs/themes/default/decorative-palettes.js +51 -0
- package/commonjs/themes/default/literal-colors.js +165 -0
- package/commonjs/themes/default/theme.js +333 -0
- package/commonjs/types/theme.colors.flow.js +5 -0
- package/commonjs/types/theme.flow.js +1 -5
- package/commonjs/utils/mixins.js +2 -2
- package/commonjs/utils/responsiveProps/index.js +1 -1
- package/lib/Badge/styles.js +1 -1
- package/lib/Banner/index.js +3 -2
- package/lib/Banner/styles.js +1 -1
- package/lib/Button/index.js +5 -3
- package/lib/Button/styles.js +11 -11
- package/lib/Card/index.js +2 -2
- package/lib/CharacterCounter/styles.js +1 -1
- package/lib/Checkbox/styles.js +7 -7
- package/lib/DatePicker/styles.js +12 -11
- package/lib/Drawer/styles.js +1 -1
- package/lib/FormField/index.js +1 -1
- package/lib/Input/styles.js +6 -6
- package/lib/KeyboardKey/styles.js +2 -2
- package/lib/Link/styles.js +4 -8
- package/lib/Listbox/index.js +4 -4
- package/lib/Menu/index.js +2 -2
- package/lib/Menu/styles.js +10 -4
- package/lib/Message/index.js +2 -2
- package/lib/Modal/index.js +1 -1
- package/lib/Modal/styles.js +2 -2
- package/lib/Numeral/styles.js +1 -1
- package/lib/Popout/index.js +2 -2
- package/lib/Radio/styles.js +4 -4
- package/lib/SegmentedControl/styles.js +5 -5
- package/lib/Select/styles.js +5 -5
- package/lib/Skeleton/index.js +2 -2
- package/lib/Switch/styles.js +7 -7
- package/lib/Table/styles.js +1 -1
- package/lib/TableRowAccordion/styles.js +1 -1
- package/lib/Tabs/styles.js +5 -5
- package/lib/Textarea/styles.js +5 -5
- package/lib/ThemeProvider/index.js +1 -1
- package/lib/Toast/index.js +1 -1
- package/lib/Toast/styles.js +3 -3
- package/lib/Token/styles.js +16 -12
- package/lib/TokenInput/index.js +38 -35
- package/lib/TokenInput/styles.js +9 -7
- package/lib/Tooltip/index.js +2 -2
- package/lib/index.js +2 -2
- package/lib/themes/dark/decorative-palettes.js +36 -0
- package/lib/themes/dark/theme.js +185 -0
- package/lib/themes/default/decorative-palettes.js +36 -0
- package/lib/themes/default/literal-colors.js +156 -0
- package/lib/themes/default/theme.js +305 -0
- package/lib/types/theme.colors.flow.js +1 -0
- package/lib/types/theme.flow.js +1 -1
- package/lib/utils/mixins.js +2 -2
- package/lib/utils/responsiveProps/index.js +1 -1
- package/package.json +1 -1
- package/__flow__/themes/dark.js +0 -133
- package/__flow__/themes/light.js +0 -7
- package/__flow__/utils/theme.js +0 -422
- package/commonjs/themes/dark.js +0 -140
- package/commonjs/themes/light.js +0 -14
- package/commonjs/utils/theme.js +0 -421
- package/lib/themes/dark.js +0 -131
- package/lib/themes/light.js +0 -5
- package/lib/utils/theme.js +0 -402
package/lib/Tabs/styles.js
CHANGED
|
@@ -9,7 +9,7 @@ var Container = styled.ul.withConfig({
|
|
|
9
9
|
}, function (props) {
|
|
10
10
|
return props.theme.borders[500];
|
|
11
11
|
}, function (props) {
|
|
12
|
-
return props.theme.colors.border;
|
|
12
|
+
return props.theme.colors.container.border.base;
|
|
13
13
|
}, COMMON);
|
|
14
14
|
export var TabItem = styled.li.withConfig({
|
|
15
15
|
displayName: "styles__TabItem",
|
|
@@ -22,11 +22,11 @@ export var TabItem = styled.li.withConfig({
|
|
|
22
22
|
});
|
|
23
23
|
}, function (props) {
|
|
24
24
|
return props.isSelected && css(["box-shadow:", ";"], function (props) {
|
|
25
|
-
return "inset 0 -3px 0 0 " + props.theme.colors.
|
|
25
|
+
return "inset 0 -3px 0 0 " + props.theme.colors.button.primary.background.base;
|
|
26
26
|
});
|
|
27
27
|
}, function (props) {
|
|
28
28
|
return props.isSelected && css(["box-shadow:", ";"], function (props) {
|
|
29
|
-
return "inset 0 -3px 0 0 " + props.theme.colors.
|
|
29
|
+
return "inset 0 -3px 0 0 " + props.theme.colors.button.primary.background.hover;
|
|
30
30
|
});
|
|
31
31
|
}); // eslint-disable-next-line prettier/prettier
|
|
32
32
|
|
|
@@ -39,11 +39,11 @@ export var TabButton = styled(Button).withConfig({
|
|
|
39
39
|
return props.theme.colors.text.headline;
|
|
40
40
|
}, function (props) {
|
|
41
41
|
return props.isSelected && css(["color:", ";"], function (props) {
|
|
42
|
-
return props.theme.colors.
|
|
42
|
+
return props.theme.colors.link.base;
|
|
43
43
|
});
|
|
44
44
|
}, function (props) {
|
|
45
45
|
return props.isSelected && css(["color:", ";"], function (props) {
|
|
46
|
-
return props.theme.colors.
|
|
46
|
+
return props.theme.colors.link.hover;
|
|
47
47
|
});
|
|
48
48
|
});
|
|
49
49
|
export default Container;
|
package/lib/Textarea/styles.js
CHANGED
|
@@ -7,11 +7,11 @@ var Container = styled.div.withConfig({
|
|
|
7
7
|
})(["box-sizing:border-box;position:relative;textarea{box-sizing:border-box;display:block;width:100%;padding:", ";border:1px solid ", ";border-radius:", ";background-color:", ";color:", ";outline:none;resize:none;transition:border-color ", " ", ",box-shadow ", " ", ";font-family:", ";", " font-weight:", ";appearance:none;&:focus{", "}&:placeholder{color:", ";}", " ", " ", "}", " ", " ", ""], function (props) {
|
|
8
8
|
return props.theme.space[300];
|
|
9
9
|
}, function (props) {
|
|
10
|
-
return props.theme.colors.
|
|
10
|
+
return props.theme.colors.form.border.base;
|
|
11
11
|
}, function (props) {
|
|
12
12
|
return props.theme.radii[500];
|
|
13
13
|
}, function (props) {
|
|
14
|
-
return props.theme.colors.background.
|
|
14
|
+
return props.theme.colors.form.background.base;
|
|
15
15
|
}, function (props) {
|
|
16
16
|
return props.theme.colors.text.body;
|
|
17
17
|
}, function (props) {
|
|
@@ -29,7 +29,7 @@ var Container = styled.div.withConfig({
|
|
|
29
29
|
}, function (props) {
|
|
30
30
|
return props.theme.fontWeights.normal;
|
|
31
31
|
}, focusRing, function (props) {
|
|
32
|
-
return props.theme.colors.
|
|
32
|
+
return props.theme.colors.form.placeholder.base;
|
|
33
33
|
}, function (props) {
|
|
34
34
|
return props.resizable && css(["resize:vertical;"]);
|
|
35
35
|
}, function (props) {
|
|
@@ -40,14 +40,14 @@ var Container = styled.div.withConfig({
|
|
|
40
40
|
return props.disabled && css(["opacity:0.4;textarea{cursor:not-allowed;}"]);
|
|
41
41
|
}, function (props) {
|
|
42
42
|
return props.invalid && css(["textarea{border-color:", ";}"], function (props) {
|
|
43
|
-
return props.theme.colors.error
|
|
43
|
+
return props.theme.colors.form.border.error;
|
|
44
44
|
});
|
|
45
45
|
}, COMMON);
|
|
46
46
|
export var Accessory = styled.div.withConfig({
|
|
47
47
|
displayName: "styles__Accessory",
|
|
48
48
|
componentId: "sc-1hnc1wu-1"
|
|
49
49
|
})(["position:absolute;color:", ";", ";", ";"], function (props) {
|
|
50
|
-
return props.theme.colors.icon.
|
|
50
|
+
return props.theme.colors.icon.base;
|
|
51
51
|
}, function (props) {
|
|
52
52
|
return props.before && css(["top:", ";left:", ";"], props.theme.space[300], props.theme.space[350]);
|
|
53
53
|
}, function (props) {
|
|
@@ -2,7 +2,7 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
|
2
2
|
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { ThemeProvider as BaseThemeProvider } from "styled-components";
|
|
5
|
-
import theme from "../
|
|
5
|
+
import theme from "../themes/default/theme";
|
|
6
6
|
|
|
7
7
|
var ThemeProvider = function ThemeProvider(props) {
|
|
8
8
|
return /*#__PURE__*/React.createElement(BaseThemeProvider, _extends({}, props, {
|
package/lib/Toast/index.js
CHANGED
package/lib/Toast/styles.js
CHANGED
|
@@ -15,9 +15,9 @@ var Container = styled(Box).withConfig({
|
|
|
15
15
|
}, function (p) {
|
|
16
16
|
return p.theme.typography[200];
|
|
17
17
|
}, function (p) {
|
|
18
|
-
return p.theme.colors.background.
|
|
18
|
+
return p.theme.colors.container.background.base;
|
|
19
19
|
}, function (p) {
|
|
20
|
-
return p.theme.colors[p.type]
|
|
20
|
+
return p.theme.colors.container.border[p.type];
|
|
21
21
|
});
|
|
22
22
|
export var CustomIcon = styled(Icon).withConfig({
|
|
23
23
|
displayName: "styles__CustomIcon",
|
|
@@ -25,7 +25,7 @@ export var CustomIcon = styled(Icon).withConfig({
|
|
|
25
25
|
})(["margin-right:", ";transform:translateY(4px);color:", ";"], function (props) {
|
|
26
26
|
return props.theme.space[400];
|
|
27
27
|
}, function (p) {
|
|
28
|
-
return p.customColor ? undefined : p.theme.colors[p.type]
|
|
28
|
+
return p.customColor ? undefined : p.theme.colors.icon[p.type];
|
|
29
29
|
});
|
|
30
30
|
export var GlobalToastStyles = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n\t", "\n\n\t.Toastify__toast:last-of-type {\n\t\tmargin-bottom: 0;\n\t}\n\n\t.Toastify-container-overrides {\n\t\tpadding: 0;\n\t\twidth: 360px;\n\t}\n\n\t.Toastify-toast-overrides {\n\t\tpadding: 0;\n\t\tmin-height: 0;\n\t\tborder-radius: 2px;\n\t}\n\n\t.Toastify__toast-container--bottom-right {\n\t\tbottom: ", ";\n\t\tright: ", ";\n\t}\n\n\t/* Override React Toastify's mobile width styles */\n\t@media only screen and (max-width: 480px) {\n\t\t.Toastify-container-overrides {\n\t\t\tmin-width: initial;\n\t\t}\n\t}\n"])), toastStyles, function (p) {
|
|
31
31
|
return p.theme.space[400];
|
package/lib/Token/styles.js
CHANGED
|
@@ -15,9 +15,9 @@ var Container = styled.button.withConfig({
|
|
|
15
15
|
}, function (props) {
|
|
16
16
|
return props.theme.colors.text.body;
|
|
17
17
|
}, function (props) {
|
|
18
|
-
return props.theme.colors.background.
|
|
18
|
+
return props.theme.colors.container.background.base;
|
|
19
19
|
}, function (props) {
|
|
20
|
-
return props.theme.colors.
|
|
20
|
+
return props.theme.colors.container.border.base;
|
|
21
21
|
}, function (props) {
|
|
22
22
|
return props.theme.fontWeights.normal;
|
|
23
23
|
}, function (props) {
|
|
@@ -30,25 +30,29 @@ var Container = styled.button.withConfig({
|
|
|
30
30
|
return props.closeable && css(["cursor:pointer;&:hover,&:active{color:", ";border:1px solid ", ";background-color:", ";}"], function (props) {
|
|
31
31
|
return props.theme.colors.text.body;
|
|
32
32
|
}, function (props) {
|
|
33
|
-
return props.theme.colors.
|
|
33
|
+
return props.theme.colors.container.border.decorative.neutral;
|
|
34
34
|
}, function (props) {
|
|
35
|
-
return props.theme.colors.background.
|
|
35
|
+
return props.theme.colors.container.background.decorative.neutral;
|
|
36
36
|
});
|
|
37
37
|
}, function (props) {
|
|
38
|
-
return props.disabled && css(["opacity:0.4;cursor:not-allowed;"])
|
|
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
|
+
});
|
|
39
43
|
}, function (props) {
|
|
40
|
-
return !props.valid && css(["color:", ";border-color:", ";background:", ";&:hover{color:", ";border
|
|
41
|
-
return props.theme.colors.text.
|
|
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;
|
|
42
46
|
}, function (props) {
|
|
43
|
-
return props.theme.colors.error
|
|
47
|
+
return props.theme.colors.container.border.error;
|
|
44
48
|
}, function (props) {
|
|
45
|
-
return props.theme.colors.error
|
|
49
|
+
return props.theme.colors.container.background.error;
|
|
46
50
|
}, function (props) {
|
|
47
|
-
return props.theme.colors.text.
|
|
51
|
+
return props.theme.colors.text.body;
|
|
48
52
|
}, function (props) {
|
|
49
|
-
return props.theme.colors.
|
|
53
|
+
return props.theme.colors.container.border.error;
|
|
50
54
|
}, function (props) {
|
|
51
|
-
return props.theme.colors.
|
|
55
|
+
return props.theme.colors.container.background.error;
|
|
52
56
|
});
|
|
53
57
|
}, COMMON);
|
|
54
58
|
export default Container;
|
package/lib/TokenInput/index.js
CHANGED
|
@@ -192,7 +192,9 @@ var TokenInput = /*#__PURE__*/function (_React$Component) {
|
|
|
192
192
|
_proto.renderToken = function renderToken(token) {
|
|
193
193
|
var _this2 = this;
|
|
194
194
|
|
|
195
|
-
var
|
|
195
|
+
var _this$props4 = this.props,
|
|
196
|
+
defaultIconName = _this$props4.iconName,
|
|
197
|
+
disabled = _this$props4.disabled;
|
|
196
198
|
var activeId = this.state.activeToken;
|
|
197
199
|
var id = token.id,
|
|
198
200
|
tokenIconName = token.iconName,
|
|
@@ -206,7 +208,8 @@ var TokenInput = /*#__PURE__*/function (_React$Component) {
|
|
|
206
208
|
return _this2.handleClickToken(e, token);
|
|
207
209
|
},
|
|
208
210
|
valid: valid,
|
|
209
|
-
active: isActive
|
|
211
|
+
active: isActive,
|
|
212
|
+
disabled: disabled
|
|
210
213
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
211
214
|
display: "flex",
|
|
212
215
|
alignItems: "center"
|
|
@@ -229,39 +232,39 @@ var TokenInput = /*#__PURE__*/function (_React$Component) {
|
|
|
229
232
|
};
|
|
230
233
|
|
|
231
234
|
_proto.render = function render() {
|
|
232
|
-
var _this$
|
|
233
|
-
autoFocus = _this$
|
|
234
|
-
autocomplete = _this$
|
|
235
|
-
disabled = _this$
|
|
236
|
-
isInvalid = _this$
|
|
237
|
-
hasWarning = _this$
|
|
238
|
-
id = _this$
|
|
239
|
-
name = _this$
|
|
240
|
-
placeholder = _this$
|
|
241
|
-
required = _this$
|
|
242
|
-
value = _this$
|
|
243
|
-
elemBefore = _this$
|
|
244
|
-
elemAfter = _this$
|
|
245
|
-
maxLength = _this$
|
|
246
|
-
ariaDescribedby = _this$
|
|
247
|
-
ariaLabel = _this$
|
|
248
|
-
innerRef = _this$
|
|
249
|
-
onAddToken = _this$
|
|
250
|
-
onRemoveToken = _this$
|
|
251
|
-
onChangeTokens = _this$
|
|
252
|
-
onClickToken = _this$
|
|
253
|
-
onBlur = _this$
|
|
254
|
-
onChange = _this$
|
|
255
|
-
onFocus = _this$
|
|
256
|
-
onKeyDown = _this$
|
|
257
|
-
onKeyUp = _this$
|
|
258
|
-
onPaste = _this$
|
|
259
|
-
_this$
|
|
260
|
-
inputProps = _this$
|
|
261
|
-
_this$
|
|
262
|
-
qa = _this$
|
|
263
|
-
tokens = _this$
|
|
264
|
-
rest = _objectWithoutPropertiesLoose(_this$
|
|
235
|
+
var _this$props5 = this.props,
|
|
236
|
+
autoFocus = _this$props5.autoFocus,
|
|
237
|
+
autocomplete = _this$props5.autocomplete,
|
|
238
|
+
disabled = _this$props5.disabled,
|
|
239
|
+
isInvalid = _this$props5.isInvalid,
|
|
240
|
+
hasWarning = _this$props5.hasWarning,
|
|
241
|
+
id = _this$props5.id,
|
|
242
|
+
name = _this$props5.name,
|
|
243
|
+
placeholder = _this$props5.placeholder,
|
|
244
|
+
required = _this$props5.required,
|
|
245
|
+
value = _this$props5.value,
|
|
246
|
+
elemBefore = _this$props5.elemBefore,
|
|
247
|
+
elemAfter = _this$props5.elemAfter,
|
|
248
|
+
maxLength = _this$props5.maxLength,
|
|
249
|
+
ariaDescribedby = _this$props5.ariaDescribedby,
|
|
250
|
+
ariaLabel = _this$props5.ariaLabel,
|
|
251
|
+
innerRef = _this$props5.innerRef,
|
|
252
|
+
onAddToken = _this$props5.onAddToken,
|
|
253
|
+
onRemoveToken = _this$props5.onRemoveToken,
|
|
254
|
+
onChangeTokens = _this$props5.onChangeTokens,
|
|
255
|
+
onClickToken = _this$props5.onClickToken,
|
|
256
|
+
onBlur = _this$props5.onBlur,
|
|
257
|
+
onChange = _this$props5.onChange,
|
|
258
|
+
onFocus = _this$props5.onFocus,
|
|
259
|
+
onKeyDown = _this$props5.onKeyDown,
|
|
260
|
+
onKeyUp = _this$props5.onKeyUp,
|
|
261
|
+
onPaste = _this$props5.onPaste,
|
|
262
|
+
_this$props5$inputPro = _this$props5.inputProps,
|
|
263
|
+
inputProps = _this$props5$inputPro === void 0 ? {} : _this$props5$inputPro,
|
|
264
|
+
_this$props5$qa = _this$props5.qa,
|
|
265
|
+
qa = _this$props5$qa === void 0 ? {} : _this$props5$qa,
|
|
266
|
+
tokens = _this$props5.tokens,
|
|
267
|
+
rest = _objectWithoutPropertiesLoose(_this$props5, ["autoFocus", "autocomplete", "disabled", "isInvalid", "hasWarning", "id", "name", "placeholder", "required", "value", "elemBefore", "elemAfter", "maxLength", "ariaDescribedby", "ariaLabel", "innerRef", "onAddToken", "onRemoveToken", "onChangeTokens", "onClickToken", "onBlur", "onChange", "onFocus", "onKeyDown", "onKeyUp", "onPaste", "inputProps", "qa", "tokens"]);
|
|
265
268
|
|
|
266
269
|
var state = this.state;
|
|
267
270
|
return /*#__PURE__*/React.createElement(Container, _extends({
|
package/lib/TokenInput/styles.js
CHANGED
|
@@ -4,8 +4,8 @@ import { focusRing } from "../utils/mixins";
|
|
|
4
4
|
var Container = styled.div.withConfig({
|
|
5
5
|
displayName: "styles__Container",
|
|
6
6
|
componentId: "sc-19um4n4-0"
|
|
7
|
-
})(["box-sizing:border-box;position:relative;display:flex;flex-wrap:wrap;align-items:center;align-content:center;cursor:text;width:100%;border:1px solid ", ";border-radius:", ";margin:0;padding:", ";padding-top:", ";background-color:", ";color:", ";transition:border-color ", " ", ",box-shadow ", " ", ";", ";font-family:", ";font-weight:", ";appearance:none;button{margin:", " ", " 0 0;}input{", ";outline:none;border:none;flex:1;padding:0;padding-top:", ";margin:", " ", " ", " 0;color:", ";background-color:", ";min-height:20px;&::-webkit-search-cancel-button{appearance:none;}&:focus{box-shadow:none;}&::-ms-clear{display:none;}&:not(output):not(:focus):-moz-ui-invalid{box-shadow:none;}}&:placeholder{color:", ";}", " ", " ", " ", " ", " ", " ", ""], function (props) {
|
|
8
|
-
return props.theme.colors.
|
|
7
|
+
})(["box-sizing:border-box;position:relative;display:flex;flex-wrap:wrap;align-items:center;align-content:center;cursor:text;width:100%;border:1px solid ", ";border-radius:", ";margin:0;padding:", ";padding-top:", ";background-color:", ";color:", ";transition:border-color ", " ", ",box-shadow ", " ", ";", ";font-family:", ";font-weight:", ";appearance:none;button{margin:", " ", " 0 0;}input{", ";outline:none;border:none;flex:1;padding:0;padding-top:", ";margin:", " ", " ", " 0;color:", ";background-color:", ";min-height:20px;&::-webkit-search-cancel-button{appearance:none;}&:focus{box-shadow:none;}&::-ms-clear{display:none;}&:not(output):not(:focus):-moz-ui-invalid{box-shadow:none;}", "}&:placeholder{color:", ";}", " ", " ", " ", " ", " ", " ", ""], function (props) {
|
|
8
|
+
return props.theme.colors.form.border.base;
|
|
9
9
|
}, function (props) {
|
|
10
10
|
return props.theme.radii[500];
|
|
11
11
|
}, function (props) {
|
|
@@ -13,7 +13,7 @@ var Container = styled.div.withConfig({
|
|
|
13
13
|
}, function (props) {
|
|
14
14
|
return props.theme.space[200];
|
|
15
15
|
}, function (props) {
|
|
16
|
-
return props.theme.colors.background.
|
|
16
|
+
return props.theme.colors.form.background.base;
|
|
17
17
|
}, function (props) {
|
|
18
18
|
return props.theme.colors.text.body;
|
|
19
19
|
}, function (props) {
|
|
@@ -47,9 +47,11 @@ var Container = styled.div.withConfig({
|
|
|
47
47
|
}, function (props) {
|
|
48
48
|
return props.theme.colors.text.body;
|
|
49
49
|
}, function (props) {
|
|
50
|
-
return props.theme.colors.background.
|
|
50
|
+
return props.theme.colors.form.background.base;
|
|
51
51
|
}, function (props) {
|
|
52
|
-
return props.
|
|
52
|
+
return props.disabled && css(["opacity:0.4;cursor:not-allowed;"]);
|
|
53
|
+
}, function (props) {
|
|
54
|
+
return props.theme.colors.form.placeholder.base;
|
|
53
55
|
}, function (props) {
|
|
54
56
|
return props.hasBeforeElement && css(["padding-left:40px;"]);
|
|
55
57
|
}, function (props) {
|
|
@@ -60,11 +62,11 @@ var Container = styled.div.withConfig({
|
|
|
60
62
|
return props.focused && css(["", ""], focusRing);
|
|
61
63
|
}, function (props) {
|
|
62
64
|
return props.invalid && css(["border-color:", ";"], function (props) {
|
|
63
|
-
return props.theme.colors.error
|
|
65
|
+
return props.theme.colors.form.border.error;
|
|
64
66
|
});
|
|
65
67
|
}, function (props) {
|
|
66
68
|
return props.warning && css(["border-color:", ";"], function (props) {
|
|
67
|
-
return props.theme.colors.warning
|
|
69
|
+
return props.theme.colors.form.border.warning;
|
|
68
70
|
});
|
|
69
71
|
}, COMMON);
|
|
70
72
|
Container.displayName = "TokenInputContainer";
|
package/lib/Tooltip/index.js
CHANGED
|
@@ -117,10 +117,10 @@ var Content = function Content(_ref2) {
|
|
|
117
117
|
py: appearance === "box" ? 400 : 200,
|
|
118
118
|
m: 200,
|
|
119
119
|
color: "text.body",
|
|
120
|
-
bg: "background.
|
|
120
|
+
bg: "container.background.base",
|
|
121
121
|
boxShadow: 300,
|
|
122
122
|
border: 500,
|
|
123
|
-
borderColor: "border" // $FlowIssue - upgrade v0.112.0
|
|
123
|
+
borderColor: "container.border.base" // $FlowIssue - upgrade v0.112.0
|
|
124
124
|
|
|
125
125
|
}, rest), children);
|
|
126
126
|
};
|
package/lib/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { visuallyHidden, focusRing, disabled } from "./utils/mixins";
|
|
2
2
|
export { useSelect, useMultiselect, useTextContent } from "./utils/hooks";
|
|
3
|
-
export { default as theme } from "./
|
|
4
|
-
export { default as darkTheme } from "./themes/dark";
|
|
3
|
+
export { default as theme } from "./themes/default/theme";
|
|
4
|
+
export { default as darkTheme } from "./themes/dark/theme";
|
|
5
5
|
export { default as Icon } from "./Icon"; // DEPRECATED: Alert has been renamed to Banner
|
|
6
6
|
|
|
7
7
|
export { default as Alert } from "./Banner";
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import COLORS from "@sproutsocial/seeds-color";
|
|
2
|
+
export var green = {
|
|
3
|
+
background: COLORS.COLOR_GREEN_900,
|
|
4
|
+
highlight: COLORS.COLOR_GREEN_500,
|
|
5
|
+
foreground: COLORS.COLOR_GREEN_100
|
|
6
|
+
};
|
|
7
|
+
export var blue = {
|
|
8
|
+
background: COLORS.COLOR_BLUE_900,
|
|
9
|
+
highlight: COLORS.COLOR_BLUE_600,
|
|
10
|
+
foreground: COLORS.COLOR_BLUE_100
|
|
11
|
+
};
|
|
12
|
+
export var purple = {
|
|
13
|
+
background: COLORS.COLOR_PURPLE_800,
|
|
14
|
+
highlight: COLORS.COLOR_PURPLE_500,
|
|
15
|
+
foreground: COLORS.COLOR_PURPLE_100
|
|
16
|
+
};
|
|
17
|
+
export var yellow = {
|
|
18
|
+
background: COLORS.COLOR_YELLOW_900,
|
|
19
|
+
highlight: COLORS.COLOR_YELLOW_600,
|
|
20
|
+
foreground: COLORS.COLOR_YELLOW_100
|
|
21
|
+
};
|
|
22
|
+
export var orange = {
|
|
23
|
+
background: COLORS.COLOR_ORANGE_900,
|
|
24
|
+
highlight: COLORS.COLOR_ORANGE_600,
|
|
25
|
+
foreground: COLORS.COLOR_ORANGE_100
|
|
26
|
+
};
|
|
27
|
+
export var red = {
|
|
28
|
+
background: COLORS.COLOR_RED_900,
|
|
29
|
+
highlight: COLORS.COLOR_RED_600,
|
|
30
|
+
foreground: COLORS.COLOR_RED_100
|
|
31
|
+
};
|
|
32
|
+
export var neutral = {
|
|
33
|
+
background: COLORS.COLOR_NEUTRAL_900,
|
|
34
|
+
highlight: COLORS.COLOR_NEUTRAL_500,
|
|
35
|
+
foreground: COLORS.COLOR_NEUTRAL_100
|
|
36
|
+
};
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
|
|
3
|
+
import COLORS from "@sproutsocial/seeds-color";
|
|
4
|
+
import defaultTheme from "../default/theme";
|
|
5
|
+
import { green, blue, purple, yellow, orange, red, neutral } from "./decorative-palettes";
|
|
6
|
+
|
|
7
|
+
var darkTheme = _extends({}, defaultTheme, {
|
|
8
|
+
colors: _extends({}, defaultTheme.colors, {
|
|
9
|
+
app: {
|
|
10
|
+
background: {
|
|
11
|
+
base: COLORS.COLOR_NEUTRAL_1000
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
container: {
|
|
15
|
+
background: {
|
|
16
|
+
base: COLORS.COLOR_NEUTRAL_900,
|
|
17
|
+
success: green.background,
|
|
18
|
+
warning: yellow.background,
|
|
19
|
+
error: red.background,
|
|
20
|
+
info: blue.background,
|
|
21
|
+
opportunity: purple.background,
|
|
22
|
+
danger: red.background,
|
|
23
|
+
decorative: {
|
|
24
|
+
green: green.background,
|
|
25
|
+
blue: blue.background,
|
|
26
|
+
purple: purple.background,
|
|
27
|
+
yellow: yellow.background,
|
|
28
|
+
orange: orange.background,
|
|
29
|
+
red: red.background,
|
|
30
|
+
neutral: neutral.background
|
|
31
|
+
},
|
|
32
|
+
selected: COLORS.COLOR_NEUTRAL_0
|
|
33
|
+
},
|
|
34
|
+
border: {
|
|
35
|
+
base: COLORS.COLOR_NEUTRAL_1100,
|
|
36
|
+
success: green.highlight,
|
|
37
|
+
warning: yellow.highlight,
|
|
38
|
+
error: red.highlight,
|
|
39
|
+
danger: red.highlight,
|
|
40
|
+
info: blue.highlight,
|
|
41
|
+
opportunity: purple.highlight,
|
|
42
|
+
decorative: {
|
|
43
|
+
green: green.highlight,
|
|
44
|
+
blue: blue.highlight,
|
|
45
|
+
purple: purple.highlight,
|
|
46
|
+
yellow: yellow.highlight,
|
|
47
|
+
orange: orange.highlight,
|
|
48
|
+
red: red.highlight,
|
|
49
|
+
neutral: neutral.highlight
|
|
50
|
+
},
|
|
51
|
+
selected: COLORS.COLOR_NEUTRAL_0
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
button: {
|
|
55
|
+
primary: {
|
|
56
|
+
background: {
|
|
57
|
+
base: COLORS.COLOR_BLUE_400,
|
|
58
|
+
hover: COLORS.COLOR_BLUE_300,
|
|
59
|
+
active: COLORS.COLOR_BLUE_200
|
|
60
|
+
},
|
|
61
|
+
border: {
|
|
62
|
+
base: "transparent"
|
|
63
|
+
},
|
|
64
|
+
text: {
|
|
65
|
+
base: COLORS.COLOR_NEUTRAL_900,
|
|
66
|
+
hover: COLORS.COLOR_NEUTRAL_1000
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
secondary: {
|
|
70
|
+
background: {
|
|
71
|
+
base: "transparent",
|
|
72
|
+
hover: COLORS.COLOR_NEUTRAL_100,
|
|
73
|
+
active: COLORS.COLOR_NEUTRAL_0
|
|
74
|
+
},
|
|
75
|
+
border: {
|
|
76
|
+
base: COLORS.COLOR_NEUTRAL_0
|
|
77
|
+
},
|
|
78
|
+
text: {
|
|
79
|
+
base: COLORS.COLOR_NEUTRAL_0,
|
|
80
|
+
hover: COLORS.COLOR_NEUTRAL_800
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
pill: {
|
|
84
|
+
background: {
|
|
85
|
+
base: "transparent",
|
|
86
|
+
hover: COLORS.COLOR_NEUTRAL_1000,
|
|
87
|
+
active: COLORS.COLOR_NEUTRAL_900
|
|
88
|
+
},
|
|
89
|
+
border: {
|
|
90
|
+
base: "transparent"
|
|
91
|
+
},
|
|
92
|
+
text: {
|
|
93
|
+
base: COLORS.COLOR_NEUTRAL_100,
|
|
94
|
+
hover: COLORS.COLOR_NEUTRAL_0
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
destructive: {
|
|
98
|
+
background: {
|
|
99
|
+
base: COLORS.COLOR_RED_400,
|
|
100
|
+
hover: COLORS.COLOR_RED_300,
|
|
101
|
+
active: COLORS.COLOR_RED_200
|
|
102
|
+
},
|
|
103
|
+
border: {
|
|
104
|
+
base: "transparent"
|
|
105
|
+
},
|
|
106
|
+
text: {
|
|
107
|
+
base: COLORS.COLOR_NEUTRAL_900,
|
|
108
|
+
hover: COLORS.COLOR_NEUTRAL_1000
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
placeholder: {
|
|
112
|
+
background: {
|
|
113
|
+
base: "transparent",
|
|
114
|
+
hover: COLORS.COLOR_NEUTRAL_1100,
|
|
115
|
+
active: COLORS.COLOR_NEUTRAL_1100
|
|
116
|
+
},
|
|
117
|
+
border: {
|
|
118
|
+
base: COLORS.COLOR_NEUTRAL_500
|
|
119
|
+
},
|
|
120
|
+
text: {
|
|
121
|
+
base: COLORS.COLOR_BLUE_400,
|
|
122
|
+
hover: COLORS.COLOR_BLUE_300
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
unstyled: {
|
|
126
|
+
background: {
|
|
127
|
+
base: "transparent"
|
|
128
|
+
},
|
|
129
|
+
border: {
|
|
130
|
+
base: "transparent"
|
|
131
|
+
},
|
|
132
|
+
text: {
|
|
133
|
+
base: COLORS.COLOR_NEUTRAL_300,
|
|
134
|
+
hover: COLORS.COLOR_NEUTRAL_200
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
link: {
|
|
139
|
+
base: COLORS.COLOR_BLUE_400,
|
|
140
|
+
hover: COLORS.COLOR_BLUE_300
|
|
141
|
+
},
|
|
142
|
+
text: {
|
|
143
|
+
headline: COLORS.COLOR_NEUTRAL_0,
|
|
144
|
+
subtext: COLORS.COLOR_NEUTRAL_300,
|
|
145
|
+
body: COLORS.COLOR_NEUTRAL_100,
|
|
146
|
+
inverse: COLORS.COLOR_NEUTRAL_900,
|
|
147
|
+
error: COLORS.COLOR_RED_400
|
|
148
|
+
},
|
|
149
|
+
icon: {
|
|
150
|
+
base: COLORS.COLOR_NEUTRAL_100,
|
|
151
|
+
inverse: COLORS.COLOR_NEUTRAL_900,
|
|
152
|
+
success: green.foreground,
|
|
153
|
+
warning: yellow.foreground,
|
|
154
|
+
error: red.foreground,
|
|
155
|
+
danger: red.foreground,
|
|
156
|
+
info: blue.foreground,
|
|
157
|
+
opportunity: purple.foreground
|
|
158
|
+
},
|
|
159
|
+
form: {
|
|
160
|
+
background: {
|
|
161
|
+
base: COLORS.COLOR_NEUTRAL_900,
|
|
162
|
+
selected: COLORS.COLOR_NEUTRAL_0
|
|
163
|
+
},
|
|
164
|
+
border: {
|
|
165
|
+
base: COLORS.COLOR_NEUTRAL_500,
|
|
166
|
+
error: red.highlight,
|
|
167
|
+
warning: yellow.highlight,
|
|
168
|
+
selected: COLORS.COLOR_NEUTRAL_0
|
|
169
|
+
},
|
|
170
|
+
placeholder: {
|
|
171
|
+
base: COLORS.COLOR_NEUTRAL_500
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
listItem: {
|
|
175
|
+
background: {
|
|
176
|
+
base: "transparent",
|
|
177
|
+
hover: COLORS.COLOR_NEUTRAL_800,
|
|
178
|
+
selected: COLORS.COLOR_NEUTRAL_0
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}),
|
|
182
|
+
mode: "dark"
|
|
183
|
+
});
|
|
184
|
+
|
|
185
|
+
export default darkTheme;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import COLORS from "@sproutsocial/seeds-color";
|
|
2
|
+
export var green = {
|
|
3
|
+
background: COLORS.COLOR_GREEN_100,
|
|
4
|
+
highlight: COLORS.COLOR_GREEN_500,
|
|
5
|
+
foreground: COLORS.COLOR_GREEN_900
|
|
6
|
+
};
|
|
7
|
+
export var blue = {
|
|
8
|
+
background: COLORS.COLOR_BLUE_100,
|
|
9
|
+
highlight: COLORS.COLOR_BLUE_600,
|
|
10
|
+
foreground: COLORS.COLOR_BLUE_900
|
|
11
|
+
};
|
|
12
|
+
export var purple = {
|
|
13
|
+
background: COLORS.COLOR_PURPLE_100,
|
|
14
|
+
highlight: COLORS.COLOR_PURPLE_500,
|
|
15
|
+
foreground: COLORS.COLOR_PURPLE_800
|
|
16
|
+
};
|
|
17
|
+
export var yellow = {
|
|
18
|
+
background: COLORS.COLOR_YELLOW_100,
|
|
19
|
+
highlight: COLORS.COLOR_YELLOW_600,
|
|
20
|
+
foreground: COLORS.COLOR_YELLOW_900
|
|
21
|
+
};
|
|
22
|
+
export var orange = {
|
|
23
|
+
background: COLORS.COLOR_ORANGE_100,
|
|
24
|
+
highlight: COLORS.COLOR_ORANGE_600,
|
|
25
|
+
foreground: COLORS.COLOR_ORANGE_900
|
|
26
|
+
};
|
|
27
|
+
export var red = {
|
|
28
|
+
background: COLORS.COLOR_RED_100,
|
|
29
|
+
highlight: COLORS.COLOR_RED_600,
|
|
30
|
+
foreground: COLORS.COLOR_RED_900
|
|
31
|
+
};
|
|
32
|
+
export var neutral = {
|
|
33
|
+
background: COLORS.COLOR_NEUTRAL_100,
|
|
34
|
+
highlight: COLORS.COLOR_NEUTRAL_500,
|
|
35
|
+
foreground: COLORS.COLOR_NEUTRAL_900
|
|
36
|
+
};
|