@sproutsocial/racine 8.6.4-dar10.3 → 8.8.0-dar35-beta.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__/Breadcrumb/styles.js +0 -5
- package/__flow__/Listbox/__snapshots__/index.test.js.snap +20 -0
- package/__flow__/Menu/__snapshots__/index.test.js.snap +10 -0
- package/__flow__/Menu/index.stories.js +24 -14
- package/__flow__/Menu/styles.js +4 -0
- package/__flow__/themes/_themes.scss +140 -0
- package/__flow__/themes/dark/theme.js +4 -0
- package/__flow__/themes/default/theme.js +4 -0
- package/commonjs/Breadcrumb/styles.js +1 -1
- package/commonjs/Menu/styles.js +1 -1
- package/commonjs/themes/dark/theme.js +4 -0
- package/commonjs/themes/default/theme.js +4 -0
- package/dist/themes/_themes.scss +140 -0
- package/dist/themes/dark.scss +25 -0
- package/dist/themes/default.scss +25 -0
- package/lib/Breadcrumb/styles.js +1 -1
- package/lib/Menu/styles.js +1 -1
- package/lib/themes/dark/theme.js +4 -0
- package/lib/themes/default/theme.js +4 -0
- package/package.json +4 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 8.7.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 1cf97da: Remove font weight rule from Breadcrumbs styles
|
|
8
|
+
|
|
9
|
+
## 8.7.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- bcfb6eb: Export themes as scss variables
|
|
14
|
+
|
|
15
|
+
## 8.6.3
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- 777fcd7: Unset inverted icon color when menu item is hovered and active
|
|
20
|
+
|
|
3
21
|
## 8.6.2
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -42,11 +42,6 @@ const Nav: StyledComponent<{ ... }, TypeTheme, *> = styled.nav`
|
|
|
42
42
|
font-weight: bold;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
li:not(:last-child) a,
|
|
46
|
-
li:not(:last-child) button {
|
|
47
|
-
font-weight: normal;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
45
|
li:not(:last-child)::after {
|
|
51
46
|
content: "/";
|
|
52
47
|
color: ${(props) => props.theme.colors.text.body};
|
|
@@ -413,6 +413,11 @@ exports[`Listbox AsListbox with checkboxes should match snapshot 1`] = `
|
|
|
413
413
|
background-color: #f3f4f4;
|
|
414
414
|
}
|
|
415
415
|
|
|
416
|
+
.c6:focus .Icon-svg,
|
|
417
|
+
.c6:hover .Icon-svg {
|
|
418
|
+
color: unset;
|
|
419
|
+
}
|
|
420
|
+
|
|
416
421
|
.c6:hover {
|
|
417
422
|
cursor: pointer;
|
|
418
423
|
}
|
|
@@ -446,6 +451,11 @@ exports[`Listbox AsListbox with checkboxes should match snapshot 1`] = `
|
|
|
446
451
|
background-color: #f3f4f4;
|
|
447
452
|
}
|
|
448
453
|
|
|
454
|
+
.c4:focus .Icon-svg,
|
|
455
|
+
.c4:hover .Icon-svg {
|
|
456
|
+
color: unset;
|
|
457
|
+
}
|
|
458
|
+
|
|
449
459
|
.c4:hover {
|
|
450
460
|
cursor: pointer;
|
|
451
461
|
}
|
|
@@ -698,6 +708,11 @@ exports[`Listbox AsListbox with filter input should match snapshot 1`] = `
|
|
|
698
708
|
background-color: #f3f4f4;
|
|
699
709
|
}
|
|
700
710
|
|
|
711
|
+
.c7:focus .Icon-svg,
|
|
712
|
+
.c7:hover .Icon-svg {
|
|
713
|
+
color: unset;
|
|
714
|
+
}
|
|
715
|
+
|
|
701
716
|
.c7:hover {
|
|
702
717
|
cursor: pointer;
|
|
703
718
|
}
|
|
@@ -731,6 +746,11 @@ exports[`Listbox AsListbox with filter input should match snapshot 1`] = `
|
|
|
731
746
|
background-color: #f3f4f4;
|
|
732
747
|
}
|
|
733
748
|
|
|
749
|
+
.c5:focus .Icon-svg,
|
|
750
|
+
.c5:hover .Icon-svg {
|
|
751
|
+
color: unset;
|
|
752
|
+
}
|
|
753
|
+
|
|
734
754
|
.c5:hover {
|
|
735
755
|
cursor: pointer;
|
|
736
756
|
}
|
|
@@ -47,6 +47,11 @@ exports[`Menu AsMenu should match snapshot 1`] = `
|
|
|
47
47
|
background-color: #f3f4f4;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
+
.c7:focus .Icon-svg,
|
|
51
|
+
.c7:hover .Icon-svg {
|
|
52
|
+
color: unset;
|
|
53
|
+
}
|
|
54
|
+
|
|
50
55
|
.c7:hover {
|
|
51
56
|
cursor: pointer;
|
|
52
57
|
}
|
|
@@ -80,6 +85,11 @@ exports[`Menu AsMenu should match snapshot 1`] = `
|
|
|
80
85
|
background-color: #f3f4f4;
|
|
81
86
|
}
|
|
82
87
|
|
|
88
|
+
.c6:focus .Icon-svg,
|
|
89
|
+
.c6:hover .Icon-svg {
|
|
90
|
+
color: unset;
|
|
91
|
+
}
|
|
92
|
+
|
|
83
93
|
.c6:hover {
|
|
84
94
|
cursor: pointer;
|
|
85
95
|
}
|
|
@@ -5,6 +5,7 @@ import OverflowList from "../OverflowList";
|
|
|
5
5
|
import Icon from "../Icon";
|
|
6
6
|
import { names } from "./names";
|
|
7
7
|
import Text from "../Text";
|
|
8
|
+
import Box from "../Box";
|
|
8
9
|
|
|
9
10
|
const fruit = ["Apple", "Banana", "Orange"];
|
|
10
11
|
const maybeFruit = ["Tomato", "Cucumber", "Squash"];
|
|
@@ -207,19 +208,28 @@ export const MenuWithCheckboxes = (props) => {
|
|
|
207
208
|
// Specifically testing that icons with a color inverse when active like the text does.
|
|
208
209
|
export const MenuWithIcons = (props) => {
|
|
209
210
|
return (
|
|
210
|
-
<
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
211
|
+
<Box
|
|
212
|
+
width="200px"
|
|
213
|
+
border={500}
|
|
214
|
+
borderRadius="outer"
|
|
215
|
+
borderColor="container.border.base"
|
|
216
|
+
boxShadow={300}
|
|
217
|
+
backgroundColor="container.background.base"
|
|
218
|
+
>
|
|
219
|
+
<Menu {...props}>
|
|
220
|
+
<Menu.Item key="positive" onClick={() => alert("positive")}>
|
|
221
|
+
<Icon name="flat-positive-sentiment" mr={200} color="icon.info" />
|
|
222
|
+
Positive
|
|
223
|
+
</Menu.Item>
|
|
224
|
+
<Menu.Item key="negative" onClick={() => alert("negative")}>
|
|
225
|
+
<Icon name="flat-negative-sentiment" mr={200} color="icon.error" />
|
|
226
|
+
Negative
|
|
227
|
+
</Menu.Item>
|
|
228
|
+
<Menu.Item key="neutral" onClick={() => alert("neutral")}>
|
|
229
|
+
<Icon name="flat-neutral-sentiment" mr={200} />
|
|
230
|
+
Neutral
|
|
231
|
+
</Menu.Item>
|
|
232
|
+
</Menu>
|
|
233
|
+
</Box>
|
|
224
234
|
);
|
|
225
235
|
};
|
package/__flow__/Menu/styles.js
CHANGED
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
// Inspired by https://medium.com/@katiemctigue/how-to-create-a-dark-mode-in-sass-609f131a3995
|
|
2
|
+
// This file is excluded from stylelint, because stylelint is only set up to lint styled-components at the moment.
|
|
3
|
+
|
|
4
|
+
// SET-UP
|
|
5
|
+
// These files are auto-generated based on JS theme files, ensuring our SCSS theme variables stay in sync.
|
|
6
|
+
@import "dist/themes/default.scss";
|
|
7
|
+
@import "dist/themes/dark.scss";
|
|
8
|
+
|
|
9
|
+
// In the JS theme files, the theme object is exported as "default" (i.e., using "export default"),
|
|
10
|
+
// so we need to map-get "default" to access it.
|
|
11
|
+
$themes: (
|
|
12
|
+
default: map-get($default, "default"),
|
|
13
|
+
dark: map-get($dark, "default")
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
// MIXIN
|
|
17
|
+
// CSS properties that are theme-dependent must be wrapped in this mixin
|
|
18
|
+
@mixin themed() {
|
|
19
|
+
@each $theme, $map in $themes {
|
|
20
|
+
// ~ selects siblings to the specified selector, * selects all children of those siblings,
|
|
21
|
+
// which makes ~ * a kind of nephew selector. Thus we can target all elements on the page even if they are
|
|
22
|
+
// not a direct descendent of the element that we apply the theme classname to.
|
|
23
|
+
// This is important for pop-ups and modals, since they are often mounted directly to the body.
|
|
24
|
+
.theme--#{$theme} ~ * & {
|
|
25
|
+
$theme-map: () !global;
|
|
26
|
+
@each $key, $submap in $map {
|
|
27
|
+
$value: map-get(map-get($themes, $theme), "#{$key}");
|
|
28
|
+
$theme-map: map-merge($theme-map, ($key: $value)) !global;
|
|
29
|
+
}
|
|
30
|
+
@content;
|
|
31
|
+
$theme-map: null !global;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// FUNCTIONS
|
|
37
|
+
// This function will allow you to get any value from the theme.
|
|
38
|
+
// @param {string} $key - the period-separated path to the value in the theme object. e.g., "colors.text.body"
|
|
39
|
+
@function t($key) {
|
|
40
|
+
$keys: _string-split($key, ".");
|
|
41
|
+
@return _map-deep-get($theme-map, $keys);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// These functions are convenience methods to get theme values for subsets of the theme.
|
|
45
|
+
// @param {string} $key - the period-separated path to the value in the theme object, with "colors." omitted. e.g., "text.body"
|
|
46
|
+
@function colors($key) {
|
|
47
|
+
$keys: _string-split($key, ".");
|
|
48
|
+
@return _map-deep-get($theme-map, join("colors", $keys));
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// @param {string} $key - the period-separated path to the value in the theme object, with "typography." omitted. e.g., "100.fontSize"
|
|
52
|
+
@function typography($key) {
|
|
53
|
+
$keys: _string-split($key, ".");
|
|
54
|
+
@return _map-deep-get($theme-map, join("typography", $keys));
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// @param {string} $key - the period-separated path to the value in the theme object, with "fontWeights." omitted. e.g., "normal"
|
|
58
|
+
@function fontWeights($key) {
|
|
59
|
+
$keys: _string-split($key, ".");
|
|
60
|
+
@return _map-deep-get($theme-map, join("fontWeights", $keys));
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// @param {string} $key - the period-separated path to the value in the theme object, with "space." omitted. e.g., "100"
|
|
64
|
+
@function space($key) {
|
|
65
|
+
$keys: _string-split($key, ".");
|
|
66
|
+
@return _map-deep-get($theme-map, join("space", $keys));
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// @param {string} $key - the period-separated path to the value in the theme object, with "radii." omitted. e.g., "inner"
|
|
70
|
+
@function radii($key) {
|
|
71
|
+
$keys: _string-split($key, ".");
|
|
72
|
+
@return _map-deep-get($theme-map, join("radii", $keys));
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// @param {string} $key - the period-separated path to the value in the theme object, with "borders." omitted. e.g., "500"
|
|
76
|
+
@function borders($key) {
|
|
77
|
+
$keys: _string-split($key, ".");
|
|
78
|
+
@return _map-deep-get($theme-map, join("borders", $keys));
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// @param {string} $key - the period-separated path to the value in the theme object, with "borderWidths." omitted. e.g., "500"
|
|
82
|
+
@function borderWidths($key) {
|
|
83
|
+
$keys: _string-split($key, ".");
|
|
84
|
+
@return _map-deep-get($theme-map, join("borderWidths", $keys));
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// @param {string} $key - the period-separated path to the value in the theme object, with "shadows." omitted. e.g., "low"
|
|
88
|
+
@function shadows($key) {
|
|
89
|
+
$keys: _string-split($key, ".");
|
|
90
|
+
@return _map-deep-get($theme-map, join("shadows", $keys));
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// @param {string} $key - the period-separated path to the value in the theme object, with "easing." omitted. e.g., "ease_in"
|
|
94
|
+
@function easing($key) {
|
|
95
|
+
$keys: _string-split($key, ".");
|
|
96
|
+
@return _map-deep-get($theme-map, join("easing", $keys));
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// @param {string} $key - the period-separated path to the value in the theme object, with "duration." omitted. e.g., "fast"
|
|
100
|
+
@function duration($key) {
|
|
101
|
+
$keys: _string-split($key, ".");
|
|
102
|
+
@return _map-deep-get($theme-map, join("duration", $keys));
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
// UTILITIES
|
|
106
|
+
// Helper functions that power the functions above. Not relevant to the theme.
|
|
107
|
+
// If you import this file with @use, they will not be included.
|
|
108
|
+
|
|
109
|
+
// Via https://stackoverflow.com/a/42295154
|
|
110
|
+
// Only works with a single-character separator
|
|
111
|
+
@function _string-split($string, $separator) {
|
|
112
|
+
// empty array/list
|
|
113
|
+
$split-arr: ();
|
|
114
|
+
// first index of separator in string
|
|
115
|
+
$index : str-index($string, $separator);
|
|
116
|
+
// loop through string
|
|
117
|
+
@while $index != null {
|
|
118
|
+
// get the substring from the first character to the separator
|
|
119
|
+
$item: str-slice($string, 1, $index - 1);
|
|
120
|
+
// push item to array
|
|
121
|
+
$split-arr: append($split-arr, $item);
|
|
122
|
+
// remove item and separator from string
|
|
123
|
+
$string: str-slice($string, $index + 1);
|
|
124
|
+
// find new index of separator
|
|
125
|
+
$index : str-index($string, $separator);
|
|
126
|
+
}
|
|
127
|
+
// add the remaining string to list (the last item)
|
|
128
|
+
$split-arr: append($split-arr, $string);
|
|
129
|
+
|
|
130
|
+
@return $split-arr;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
// Adapted from https://css-tricks.com/snippets/sass/deep-getset-maps/
|
|
134
|
+
// Iterates over a list of keys to read multi-level maps
|
|
135
|
+
@function _map-deep-get($map, $keys) {
|
|
136
|
+
@each $key in $keys {
|
|
137
|
+
$map: map-get($map, $key);
|
|
138
|
+
}
|
|
139
|
+
@return $map;
|
|
140
|
+
}
|
|
@@ -223,6 +223,10 @@ const colors = {
|
|
|
223
223
|
whatsapp: NETWORKCOLORS.NETWORK_COLOR_WHATSAPP,
|
|
224
224
|
tiktok: NETWORKCOLORS.NETWORK_COLOR_TIKTOK,
|
|
225
225
|
},
|
|
226
|
+
dataviz: {
|
|
227
|
+
map: datavizPalette.DATAVIZ_COLORS_MAP,
|
|
228
|
+
list: datavizPalette.DATAVIZ_COLORS_LIST,
|
|
229
|
+
},
|
|
226
230
|
...literalColors,
|
|
227
231
|
...datavizPalette,
|
|
228
232
|
};
|
|
@@ -10,7 +10,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
10
10
|
var Nav = _styledComponents.default.nav.withConfig({
|
|
11
11
|
displayName: "styles__Nav",
|
|
12
12
|
componentId: "sc-1ub1apc-0"
|
|
13
|
-
})(["ol{", ";margin:0;font-family:", ";padding:0;display:flex;}li{margin-right:", ";display:flex;}a,button{", ";max-width:200px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;&:not(.overflow--menu){margin:0;padding:0;}}ol > div + li::before{content:\"/\";margin-right:", ";}li:last-child a,li:last-child button{color:", ";font-weight:bold;}li:not(:last-child)
|
|
13
|
+
})(["ol{", ";margin:0;font-family:", ";padding:0;display:flex;}li{margin-right:", ";display:flex;}a,button{", ";max-width:200px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;&:not(.overflow--menu){margin:0;padding:0;}}ol > div + li::before{content:\"/\";margin-right:", ";}li:last-child a,li:last-child button{color:", ";font-weight:bold;}li:not(:last-child)::after{content:\"/\";color:", ";margin-left:", ";}"], function (props) {
|
|
14
14
|
return props.theme.typography[200];
|
|
15
15
|
}, function (props) {
|
|
16
16
|
return props.theme.fontFamily;
|
package/commonjs/Menu/styles.js
CHANGED
|
@@ -45,7 +45,7 @@ var MenuItemContainer = (0, _styledComponents.default)(_Box.default).withConfig(
|
|
|
45
45
|
return props.theme.fontWeights.semibold;
|
|
46
46
|
});
|
|
47
47
|
}, function (props) {
|
|
48
|
-
return !props.disabled && (0, _styledComponents.css)(["&:focus,&:hover{color:", ";background-color:", ";}"], function (props) {
|
|
48
|
+
return !props.disabled && (0, _styledComponents.css)(["&:focus,&:hover{color:", ";background-color:", ";.Icon-svg{color:unset;}}"], function (props) {
|
|
49
49
|
return props.theme.colors.text.body;
|
|
50
50
|
}, function (props) {
|
|
51
51
|
return props.theme.colors.listItem.background.hover;
|
|
@@ -188,6 +188,10 @@ var darkTheme = _extends({}, _theme.default, {
|
|
|
188
188
|
hover: _seedsColor.default.COLOR_NEUTRAL_800,
|
|
189
189
|
selected: _seedsColor.default.COLOR_NEUTRAL_0
|
|
190
190
|
}
|
|
191
|
+
},
|
|
192
|
+
dataviz: {
|
|
193
|
+
map: _datavizPalette.datavizPalette.DATAVIZ_COLORS_MAP,
|
|
194
|
+
list: _datavizPalette.datavizPalette.DATAVIZ_COLORS_LIST
|
|
191
195
|
}
|
|
192
196
|
}, _datavizPalette.datavizPalette),
|
|
193
197
|
mode: "dark"
|
|
@@ -229,6 +229,10 @@ var colors = _extends({
|
|
|
229
229
|
yelp: _seedsNetworkcolor.default.NETWORK_COLOR_YELP,
|
|
230
230
|
whatsapp: _seedsNetworkcolor.default.NETWORK_COLOR_WHATSAPP,
|
|
231
231
|
tiktok: _seedsNetworkcolor.default.NETWORK_COLOR_TIKTOK
|
|
232
|
+
},
|
|
233
|
+
dataviz: {
|
|
234
|
+
map: _datavizPalette.datavizPalette.DATAVIZ_COLORS_MAP,
|
|
235
|
+
list: _datavizPalette.datavizPalette.DATAVIZ_COLORS_LIST
|
|
232
236
|
}
|
|
233
237
|
}, _literalColors.default, _datavizPalette.datavizPalette);
|
|
234
238
|
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
// Inspired by https://medium.com/@katiemctigue/how-to-create-a-dark-mode-in-sass-609f131a3995
|
|
2
|
+
// This file is excluded from stylelint, because stylelint is only set up to lint styled-components at the moment.
|
|
3
|
+
|
|
4
|
+
// SET-UP
|
|
5
|
+
// These files are auto-generated based on JS theme files, ensuring our SCSS theme variables stay in sync.
|
|
6
|
+
@import "dist/themes/default.scss";
|
|
7
|
+
@import "dist/themes/dark.scss";
|
|
8
|
+
|
|
9
|
+
// In the JS theme files, the theme object is exported as "default" (i.e., using "export default"),
|
|
10
|
+
// so we need to map-get "default" to access it.
|
|
11
|
+
$themes: (
|
|
12
|
+
default: map-get($default, "default"),
|
|
13
|
+
dark: map-get($dark, "default")
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
// MIXIN
|
|
17
|
+
// CSS properties that are theme-dependent must be wrapped in this mixin
|
|
18
|
+
@mixin themed() {
|
|
19
|
+
@each $theme, $map in $themes {
|
|
20
|
+
// ~ selects siblings to the specified selector, * selects all children of those siblings,
|
|
21
|
+
// which makes ~ * a kind of nephew selector. Thus we can target all elements on the page even if they are
|
|
22
|
+
// not a direct descendent of the element that we apply the theme classname to.
|
|
23
|
+
// This is important for pop-ups and modals, since they are often mounted directly to the body.
|
|
24
|
+
.theme--#{$theme} ~ * & {
|
|
25
|
+
$theme-map: () !global;
|
|
26
|
+
@each $key, $submap in $map {
|
|
27
|
+
$value: map-get(map-get($themes, $theme), "#{$key}");
|
|
28
|
+
$theme-map: map-merge($theme-map, ($key: $value)) !global;
|
|
29
|
+
}
|
|
30
|
+
@content;
|
|
31
|
+
$theme-map: null !global;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// FUNCTIONS
|
|
37
|
+
// This function will allow you to get any value from the theme.
|
|
38
|
+
// @param {string} $key - the period-separated path to the value in the theme object. e.g., "colors.text.body"
|
|
39
|
+
@function t($key) {
|
|
40
|
+
$keys: _string-split($key, ".");
|
|
41
|
+
@return _map-deep-get($theme-map, $keys);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// These functions are convenience methods to get theme values for subsets of the theme.
|
|
45
|
+
// @param {string} $key - the period-separated path to the value in the theme object, with "colors." omitted. e.g., "text.body"
|
|
46
|
+
@function colors($key) {
|
|
47
|
+
$keys: _string-split($key, ".");
|
|
48
|
+
@return _map-deep-get($theme-map, join("colors", $keys));
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// @param {string} $key - the period-separated path to the value in the theme object, with "typography." omitted. e.g., "100.fontSize"
|
|
52
|
+
@function typography($key) {
|
|
53
|
+
$keys: _string-split($key, ".");
|
|
54
|
+
@return _map-deep-get($theme-map, join("typography", $keys));
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// @param {string} $key - the period-separated path to the value in the theme object, with "fontWeights." omitted. e.g., "normal"
|
|
58
|
+
@function fontWeights($key) {
|
|
59
|
+
$keys: _string-split($key, ".");
|
|
60
|
+
@return _map-deep-get($theme-map, join("fontWeights", $keys));
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// @param {string} $key - the period-separated path to the value in the theme object, with "space." omitted. e.g., "100"
|
|
64
|
+
@function space($key) {
|
|
65
|
+
$keys: _string-split($key, ".");
|
|
66
|
+
@return _map-deep-get($theme-map, join("space", $keys));
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// @param {string} $key - the period-separated path to the value in the theme object, with "radii." omitted. e.g., "inner"
|
|
70
|
+
@function radii($key) {
|
|
71
|
+
$keys: _string-split($key, ".");
|
|
72
|
+
@return _map-deep-get($theme-map, join("radii", $keys));
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// @param {string} $key - the period-separated path to the value in the theme object, with "borders." omitted. e.g., "500"
|
|
76
|
+
@function borders($key) {
|
|
77
|
+
$keys: _string-split($key, ".");
|
|
78
|
+
@return _map-deep-get($theme-map, join("borders", $keys));
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// @param {string} $key - the period-separated path to the value in the theme object, with "borderWidths." omitted. e.g., "500"
|
|
82
|
+
@function borderWidths($key) {
|
|
83
|
+
$keys: _string-split($key, ".");
|
|
84
|
+
@return _map-deep-get($theme-map, join("borderWidths", $keys));
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// @param {string} $key - the period-separated path to the value in the theme object, with "shadows." omitted. e.g., "low"
|
|
88
|
+
@function shadows($key) {
|
|
89
|
+
$keys: _string-split($key, ".");
|
|
90
|
+
@return _map-deep-get($theme-map, join("shadows", $keys));
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// @param {string} $key - the period-separated path to the value in the theme object, with "easing." omitted. e.g., "ease_in"
|
|
94
|
+
@function easing($key) {
|
|
95
|
+
$keys: _string-split($key, ".");
|
|
96
|
+
@return _map-deep-get($theme-map, join("easing", $keys));
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// @param {string} $key - the period-separated path to the value in the theme object, with "duration." omitted. e.g., "fast"
|
|
100
|
+
@function duration($key) {
|
|
101
|
+
$keys: _string-split($key, ".");
|
|
102
|
+
@return _map-deep-get($theme-map, join("duration", $keys));
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
// UTILITIES
|
|
106
|
+
// Helper functions that power the functions above. Not relevant to the theme.
|
|
107
|
+
// If you import this file with @use, they will not be included.
|
|
108
|
+
|
|
109
|
+
// Via https://stackoverflow.com/a/42295154
|
|
110
|
+
// Only works with a single-character separator
|
|
111
|
+
@function _string-split($string, $separator) {
|
|
112
|
+
// empty array/list
|
|
113
|
+
$split-arr: ();
|
|
114
|
+
// first index of separator in string
|
|
115
|
+
$index : str-index($string, $separator);
|
|
116
|
+
// loop through string
|
|
117
|
+
@while $index != null {
|
|
118
|
+
// get the substring from the first character to the separator
|
|
119
|
+
$item: str-slice($string, 1, $index - 1);
|
|
120
|
+
// push item to array
|
|
121
|
+
$split-arr: append($split-arr, $item);
|
|
122
|
+
// remove item and separator from string
|
|
123
|
+
$string: str-slice($string, $index + 1);
|
|
124
|
+
// find new index of separator
|
|
125
|
+
$index : str-index($string, $separator);
|
|
126
|
+
}
|
|
127
|
+
// add the remaining string to list (the last item)
|
|
128
|
+
$split-arr: append($split-arr, $string);
|
|
129
|
+
|
|
130
|
+
@return $split-arr;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
// Adapted from https://css-tricks.com/snippets/sass/deep-getset-maps/
|
|
134
|
+
// Iterates over a list of keys to read multi-level maps
|
|
135
|
+
@function _map-deep-get($map, $keys) {
|
|
136
|
+
@each $key in $keys {
|
|
137
|
+
$map: map-get($map, $key);
|
|
138
|
+
}
|
|
139
|
+
@return $map;
|
|
140
|
+
}
|
package/dist/themes/dark.scss
CHANGED
|
@@ -202,6 +202,31 @@ $dark: (
|
|
|
202
202
|
whatsapp: #25D366,
|
|
203
203
|
tiktok: #000000
|
|
204
204
|
),
|
|
205
|
+
dataviz: (
|
|
206
|
+
map: (
|
|
207
|
+
1: #24e0c5,
|
|
208
|
+
2: #a193f2,
|
|
209
|
+
3: #ff76ae,
|
|
210
|
+
4: #ffcd1c,
|
|
211
|
+
5: #56adf5,
|
|
212
|
+
6: #f282f5,
|
|
213
|
+
7: #75dd66,
|
|
214
|
+
8: #ff9c5d,
|
|
215
|
+
9: #db3e3e,
|
|
216
|
+
10: #0b968f,
|
|
217
|
+
11: #6f5ed3,
|
|
218
|
+
12: #ce3665,
|
|
219
|
+
13: #ba7506,
|
|
220
|
+
14: #2079c3,
|
|
221
|
+
15: #ac44a8,
|
|
222
|
+
16: #0ca750,
|
|
223
|
+
17: #ed7024,
|
|
224
|
+
18: #ff7f6e,
|
|
225
|
+
19: #c2f2bd,
|
|
226
|
+
20: #ffe99a
|
|
227
|
+
),
|
|
228
|
+
list: (#24e0c5, #a193f2, #ff76ae, #ffcd1c, #56adf5, #f282f5, #75dd66, #ff9c5d, #db3e3e, #0b968f, #6f5ed3, #ce3665, #ba7506, #2079c3, #ac44a8, #0ca750, #ed7024, #ff7f6e, #c2f2bd, #ffe99a)
|
|
229
|
+
),
|
|
205
230
|
neutral: (
|
|
206
231
|
0: #FFFFFF,
|
|
207
232
|
100: #f3f4f4,
|
package/dist/themes/default.scss
CHANGED
|
@@ -302,6 +302,31 @@ $default: (
|
|
|
302
302
|
whatsapp: #25D366,
|
|
303
303
|
tiktok: #000000
|
|
304
304
|
),
|
|
305
|
+
dataviz: (
|
|
306
|
+
map: (
|
|
307
|
+
1: #08c4b2,
|
|
308
|
+
2: #6f5ed3,
|
|
309
|
+
3: #ce3665,
|
|
310
|
+
4: #ffcd1c,
|
|
311
|
+
5: #3896e3,
|
|
312
|
+
6: #db61db,
|
|
313
|
+
7: #59cb59,
|
|
314
|
+
8: #fc8943,
|
|
315
|
+
9: #db3e3e,
|
|
316
|
+
10: #026661,
|
|
317
|
+
11: #a193f2,
|
|
318
|
+
12: #931847,
|
|
319
|
+
13: #944c0c,
|
|
320
|
+
14: #0c5689,
|
|
321
|
+
15: #6c2277,
|
|
322
|
+
16: #006b40,
|
|
323
|
+
17: #962c0b,
|
|
324
|
+
18: #ff7f6e,
|
|
325
|
+
19: #0ca750,
|
|
326
|
+
20: #ba7506
|
|
327
|
+
),
|
|
328
|
+
list: (#08c4b2, #6f5ed3, #ce3665, #ffcd1c, #3896e3, #db61db, #59cb59, #fc8943, #db3e3e, #026661, #a193f2, #931847, #944c0c, #0c5689, #6c2277, #006b40, #962c0b, #ff7f6e, #0ca750, #ba7506)
|
|
329
|
+
),
|
|
305
330
|
neutral: (
|
|
306
331
|
0: #FFFFFF,
|
|
307
332
|
100: #f3f4f4,
|
package/lib/Breadcrumb/styles.js
CHANGED
|
@@ -2,7 +2,7 @@ import styled from "styled-components";
|
|
|
2
2
|
var Nav = styled.nav.withConfig({
|
|
3
3
|
displayName: "styles__Nav",
|
|
4
4
|
componentId: "sc-1ub1apc-0"
|
|
5
|
-
})(["ol{", ";margin:0;font-family:", ";padding:0;display:flex;}li{margin-right:", ";display:flex;}a,button{", ";max-width:200px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;&:not(.overflow--menu){margin:0;padding:0;}}ol > div + li::before{content:\"/\";margin-right:", ";}li:last-child a,li:last-child button{color:", ";font-weight:bold;}li:not(:last-child)
|
|
5
|
+
})(["ol{", ";margin:0;font-family:", ";padding:0;display:flex;}li{margin-right:", ";display:flex;}a,button{", ";max-width:200px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;&:not(.overflow--menu){margin:0;padding:0;}}ol > div + li::before{content:\"/\";margin-right:", ";}li:last-child a,li:last-child button{color:", ";font-weight:bold;}li:not(:last-child)::after{content:\"/\";color:", ";margin-left:", ";}"], function (props) {
|
|
6
6
|
return props.theme.typography[200];
|
|
7
7
|
}, function (props) {
|
|
8
8
|
return props.theme.fontFamily;
|
package/lib/Menu/styles.js
CHANGED
|
@@ -31,7 +31,7 @@ export var MenuItemContainer = styled(Box).withConfig({
|
|
|
31
31
|
return props.theme.fontWeights.semibold;
|
|
32
32
|
});
|
|
33
33
|
}, function (props) {
|
|
34
|
-
return !props.disabled && css(["&:focus,&:hover{color:", ";background-color:", ";}"], function (props) {
|
|
34
|
+
return !props.disabled && css(["&:focus,&:hover{color:", ";background-color:", ";.Icon-svg{color:unset;}}"], function (props) {
|
|
35
35
|
return props.theme.colors.text.body;
|
|
36
36
|
}, function (props) {
|
|
37
37
|
return props.theme.colors.listItem.background.hover;
|
package/lib/themes/dark/theme.js
CHANGED
|
@@ -178,6 +178,10 @@ var darkTheme = _extends({}, defaultTheme, {
|
|
|
178
178
|
hover: COLORS.COLOR_NEUTRAL_800,
|
|
179
179
|
selected: COLORS.COLOR_NEUTRAL_0
|
|
180
180
|
}
|
|
181
|
+
},
|
|
182
|
+
dataviz: {
|
|
183
|
+
map: datavizPalette.DATAVIZ_COLORS_MAP,
|
|
184
|
+
list: datavizPalette.DATAVIZ_COLORS_LIST
|
|
181
185
|
}
|
|
182
186
|
}, datavizPalette),
|
|
183
187
|
mode: "dark"
|
|
@@ -211,6 +211,10 @@ var colors = _extends({
|
|
|
211
211
|
yelp: NETWORKCOLORS.NETWORK_COLOR_YELP,
|
|
212
212
|
whatsapp: NETWORKCOLORS.NETWORK_COLOR_WHATSAPP,
|
|
213
213
|
tiktok: NETWORKCOLORS.NETWORK_COLOR_TIKTOK
|
|
214
|
+
},
|
|
215
|
+
dataviz: {
|
|
216
|
+
map: datavizPalette.DATAVIZ_COLORS_MAP,
|
|
217
|
+
list: datavizPalette.DATAVIZ_COLORS_LIST
|
|
214
218
|
}
|
|
215
219
|
}, literalColors, datavizPalette);
|
|
216
220
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sproutsocial/racine",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.8.0-dar35-beta.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"files": [
|
|
6
6
|
"__flow__",
|
|
@@ -52,16 +52,13 @@
|
|
|
52
52
|
},
|
|
53
53
|
"lint-staged": {
|
|
54
54
|
"**/*.js": [
|
|
55
|
-
"eslint --fix"
|
|
56
|
-
"git add"
|
|
55
|
+
"eslint --fix"
|
|
57
56
|
],
|
|
58
57
|
"*.scss": [
|
|
59
|
-
"stylelint --fix"
|
|
60
|
-
"git add"
|
|
58
|
+
"stylelint --fix"
|
|
61
59
|
],
|
|
62
60
|
"icons/*.svg": [
|
|
63
|
-
"yarn icon-lint write"
|
|
64
|
-
"git add"
|
|
61
|
+
"yarn icon-lint write"
|
|
65
62
|
]
|
|
66
63
|
},
|
|
67
64
|
"dependencies": {
|