@sproutsocial/racine 9.1.0-token-beta.0 → 10.0.0--dar97-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 +8 -0
- package/__flow__/Box/index.stories.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/styles.js +1 -18
- package/__flow__/Modal/index.test.js +0 -16
- package/__flow__/Stack/index.js +1 -1
- package/__flow__/ThemeProvider/index.js +2 -2
- package/__flow__/index.js +1 -1
- package/__flow__/themes/dark/_themes.scss +132 -0
- package/__flow__/themes/dark/theme.js +1 -1
- package/{dist/themes → __flow__/themes/light}/_themes.scss +5 -11
- package/__flow__/themes/{default → light}/dataviz-palette.js +0 -0
- package/__flow__/themes/{default → light}/decorative-palettes.js +0 -0
- package/__flow__/themes/{default → light}/literal-colors.js +0 -0
- package/__flow__/themes/{default → light}/theme.js +0 -0
- package/__flow__/types/theme.colors.flow.js +1 -1
- package/__flow__/types/theme.flow.js +2 -2
- package/__flow__/utils/mixins.js +1 -1
- package/__flow__/utils/responsiveProps/index.js +1 -1
- package/commonjs/Menu/index.js +3 -1
- package/commonjs/Menu/styles.js +3 -16
- package/commonjs/ThemeProvider/index.js +1 -1
- package/commonjs/index.js +1 -1
- package/commonjs/themes/dark/theme.js +1 -1
- package/commonjs/themes/{default → light}/dataviz-palette.js +0 -0
- package/commonjs/themes/{default → light}/decorative-palettes.js +0 -0
- package/commonjs/themes/{default → light}/literal-colors.js +0 -0
- package/commonjs/themes/{default → light}/theme.js +0 -0
- package/commonjs/types/theme.colors.flow.js +1 -1
- package/commonjs/types/theme.flow.js +1 -1
- package/commonjs/utils/mixins.js +1 -1
- package/commonjs/utils/responsiveProps/index.js +1 -1
- package/dist/themes/dark/_themes.scss +132 -0
- package/dist/themes/{dark.scss → dark/dark.scss} +6 -6
- package/{__flow__/themes → dist/themes/light}/_themes.scss +5 -11
- package/dist/themes/{default.scss → light/light.scss} +7 -7
- package/lib/Menu/index.js +4 -2
- package/lib/Menu/styles.js +2 -13
- package/lib/ThemeProvider/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/themes/dark/theme.js +1 -1
- package/lib/themes/{default → light}/dataviz-palette.js +0 -0
- package/lib/themes/{default → light}/decorative-palettes.js +0 -0
- package/lib/themes/{default → light}/literal-colors.js +0 -0
- package/lib/themes/{default → light}/theme.js +0 -0
- package/lib/types/theme.colors.flow.js +1 -1
- package/lib/types/theme.flow.js +1 -1
- package/lib/utils/mixins.js +1 -1
- package/lib/utils/responsiveProps/index.js +1 -1
- package/package.json +2 -2
- package/__flow__/Modal/__snapshots__/index.test.js.snap +0 -80
|
@@ -10,9 +10,9 @@ import {
|
|
|
10
10
|
space,
|
|
11
11
|
easing,
|
|
12
12
|
duration,
|
|
13
|
-
} from "../themes/
|
|
13
|
+
} from "../themes/light/theme";
|
|
14
14
|
import type { TypeColors } from "./theme.colors.flow.js";
|
|
15
|
-
import type { TypeFontFamilyString } from "../themes/
|
|
15
|
+
import type { TypeFontFamilyString } from "../themes/light/theme";
|
|
16
16
|
|
|
17
17
|
export type TypeBreakpoint = typeof breakpoints;
|
|
18
18
|
export type TypeTypography = typeof typography;
|
package/__flow__/utils/mixins.js
CHANGED
package/commonjs/Menu/index.js
CHANGED
|
@@ -277,7 +277,9 @@ var MenuGroup = function MenuGroup(_ref2) {
|
|
|
277
277
|
mt: 350,
|
|
278
278
|
color: "text.headline",
|
|
279
279
|
_css: isDisabled && _mixins.disabled
|
|
280
|
-
}, title)), /*#__PURE__*/React.createElement(
|
|
280
|
+
}, title)), /*#__PURE__*/React.createElement(_Box.default, _extends({}, props, {
|
|
281
|
+
m: 300,
|
|
282
|
+
p: 300,
|
|
281
283
|
role: "group"
|
|
282
284
|
}), children));
|
|
283
285
|
};
|
package/commonjs/Menu/styles.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
|
-
exports.
|
|
4
|
+
exports.MenuItemsContainer = exports.MenuItemContainer = void 0;
|
|
5
5
|
|
|
6
6
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
7
7
|
|
|
@@ -56,21 +56,8 @@ var MenuItemContainer = (0, _styledComponents.default)(_Box.default).withConfig(
|
|
|
56
56
|
return props.disabled && _mixins.disabled;
|
|
57
57
|
});
|
|
58
58
|
exports.MenuItemContainer = MenuItemContainer;
|
|
59
|
-
var MenuGroupContainer = (0, _styledComponents.default)(_Box.default).withConfig({
|
|
60
|
-
displayName: "styles__MenuGroupContainer",
|
|
61
|
-
componentId: "fjvae4-1"
|
|
62
|
-
})(["", ";"], function (props) {
|
|
63
|
-
return props.appearance === "flush" ? (0, _styledComponents.css)(["margin:0 -", ";"], function (props) {
|
|
64
|
-
return props.theme.space[300];
|
|
65
|
-
}) : (0, _styledComponents.css)(["padding:", ";"], function (props) {
|
|
66
|
-
return props.theme.space[300];
|
|
67
|
-
});
|
|
68
|
-
});
|
|
69
|
-
exports.MenuGroupContainer = MenuGroupContainer;
|
|
70
59
|
var MenuItemsContainer = (0, _styledComponents.default)(_Box.default).withConfig({
|
|
71
60
|
displayName: "styles__MenuItemsContainer",
|
|
72
|
-
componentId: "fjvae4-
|
|
61
|
+
componentId: "fjvae4-1"
|
|
73
62
|
})(["list-style-type:none;outline:0;"]);
|
|
74
|
-
exports.MenuItemsContainer = MenuItemsContainer;
|
|
75
|
-
var _default = MenuGroupContainer;
|
|
76
|
-
exports.default = _default;
|
|
63
|
+
exports.MenuItemsContainer = MenuItemsContainer;
|
|
@@ -7,7 +7,7 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
7
7
|
|
|
8
8
|
var _styledComponents = require("styled-components");
|
|
9
9
|
|
|
10
|
-
var _theme = _interopRequireDefault(require("../themes/
|
|
10
|
+
var _theme = _interopRequireDefault(require("../themes/light/theme"));
|
|
11
11
|
|
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
13
|
|
package/commonjs/index.js
CHANGED
|
@@ -15,7 +15,7 @@ exports.useSelect = _hooks.useSelect;
|
|
|
15
15
|
exports.useMultiselect = _hooks.useMultiselect;
|
|
16
16
|
exports.useTextContent = _hooks.useTextContent;
|
|
17
17
|
|
|
18
|
-
var _theme = _interopRequireDefault(require("./themes/
|
|
18
|
+
var _theme = _interopRequireDefault(require("./themes/light/theme"));
|
|
19
19
|
|
|
20
20
|
exports.theme = _theme.default;
|
|
21
21
|
|
|
@@ -7,7 +7,7 @@ var _seedsColor = _interopRequireDefault(require("@sproutsocial/seeds-color"));
|
|
|
7
7
|
|
|
8
8
|
var _seedsDepth = _interopRequireDefault(require("@sproutsocial/seeds-depth"));
|
|
9
9
|
|
|
10
|
-
var _theme = _interopRequireDefault(require("../
|
|
10
|
+
var _theme = _interopRequireDefault(require("../light/theme"));
|
|
11
11
|
|
|
12
12
|
var _datavizPalette = require("./dataviz-palette");
|
|
13
13
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _literalColors = _interopRequireDefault(require("../themes/
|
|
3
|
+
var _literalColors = _interopRequireDefault(require("../themes/light/literal-colors"));
|
|
4
4
|
|
|
5
5
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
package/commonjs/utils/mixins.js
CHANGED
|
@@ -5,7 +5,7 @@ exports.disabled = exports.pill = exports.focusRing = exports.visuallyHidden = e
|
|
|
5
5
|
|
|
6
6
|
var _styledComponents = require("styled-components");
|
|
7
7
|
|
|
8
|
-
var _theme = _interopRequireDefault(require("../themes/
|
|
8
|
+
var _theme = _interopRequireDefault(require("../themes/light/theme"));
|
|
9
9
|
|
|
10
10
|
var _polished = require("polished");
|
|
11
11
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.normalizeResponsiveProp = void 0;
|
|
5
5
|
|
|
6
|
-
var _theme = _interopRequireDefault(require("../../themes/
|
|
6
|
+
var _theme = _interopRequireDefault(require("../../themes/light/theme"));
|
|
7
7
|
|
|
8
8
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
9
9
|
|
|
@@ -0,0 +1,132 @@
|
|
|
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/dark/dark.scss";
|
|
7
|
+
|
|
8
|
+
// In the JS theme files, the theme object is exported as "default" (i.e., using "export default"),
|
|
9
|
+
// so we need to map-get "default" to access it.
|
|
10
|
+
$theme = map-get($dark, 'default');
|
|
11
|
+
|
|
12
|
+
// MIXIN
|
|
13
|
+
// CSS properties that are theme-dependent must be wrapped in this mixin
|
|
14
|
+
@mixin themed() {
|
|
15
|
+
& {
|
|
16
|
+
$theme-map: () !global;
|
|
17
|
+
@each $key, $submap in $theme {
|
|
18
|
+
$value: map-get($theme, "#{$key}");
|
|
19
|
+
$theme-map: map-merge($theme-map, ($key: $value)) !global;
|
|
20
|
+
}
|
|
21
|
+
@content;
|
|
22
|
+
$theme-map: null !global;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// FUNCTIONS
|
|
27
|
+
// This function will allow you to get any value from the theme.
|
|
28
|
+
// @param {string} $key - the period-separated path to the value in the theme object. e.g., "colors.text.body"
|
|
29
|
+
@function t($key) {
|
|
30
|
+
$keys: _str-split($key, ".");
|
|
31
|
+
@return _map-deep-get($theme-map, $keys);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// The rest of the functions are convenience methods to get theme values for subsets of the theme.
|
|
35
|
+
// @param {string} $key - the period-separated path to the value in the theme object, with "colors." omitted. e.g., "text.body"
|
|
36
|
+
@function colors($key) {
|
|
37
|
+
$keys: _str-split($key, ".");
|
|
38
|
+
@return _map-deep-get($theme-map, join("colors", $keys));
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// @param {string} $key - the period-separated path to the value in the theme object, with "typography." omitted. e.g., "100.fontSize"
|
|
42
|
+
@function typography($key) {
|
|
43
|
+
$keys: _str-split($key, ".");
|
|
44
|
+
@return _map-deep-get($theme-map, join("typography", $keys));
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// @param {string} $key - the period-separated path to the value in the theme object, with "fontWeights." omitted. e.g., "normal"
|
|
48
|
+
@function fontWeights($key) {
|
|
49
|
+
$keys: _str-split($key, ".");
|
|
50
|
+
@return _map-deep-get($theme-map, join("fontWeights", $keys));
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// @param {string} $key - the period-separated path to the value in the theme object, with "space." omitted. e.g., "100"
|
|
54
|
+
@function space($key) {
|
|
55
|
+
$keys: _str-split($key, ".");
|
|
56
|
+
@return _map-deep-get($theme-map, join("space", $keys));
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// @param {string} $key - the period-separated path to the value in the theme object, with "radii." omitted. e.g., "inner"
|
|
60
|
+
@function radii($key) {
|
|
61
|
+
$keys: _str-split($key, ".");
|
|
62
|
+
@return _map-deep-get($theme-map, join("radii", $keys));
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// @param {string} $key - the period-separated path to the value in the theme object, with "borders." omitted. e.g., "500"
|
|
66
|
+
@function borders($key) {
|
|
67
|
+
$keys: _str-split($key, ".");
|
|
68
|
+
@return _map-deep-get($theme-map, join("borders", $keys));
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// @param {string} $key - the period-separated path to the value in the theme object, with "borderWidths." omitted. e.g., "500"
|
|
72
|
+
@function borderWidths($key) {
|
|
73
|
+
$keys: _str-split($key, ".");
|
|
74
|
+
@return _map-deep-get($theme-map, join("borderWidths", $keys));
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// @param {string} $key - the period-separated path to the value in the theme object, with "shadows." omitted. e.g., "low"
|
|
78
|
+
@function shadows($key) {
|
|
79
|
+
$keys: _str-split($key, ".");
|
|
80
|
+
@return _map-deep-get($theme-map, join("shadows", $keys));
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// @param {string} $key - the period-separated path to the value in the theme object, with "easing." omitted. e.g., "ease_in"
|
|
84
|
+
@function easing($key) {
|
|
85
|
+
$keys: _str-split($key, ".");
|
|
86
|
+
@return _map-deep-get($theme-map, join("easing", $keys));
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// @param {string} $key - the period-separated path to the value in the theme object, with "duration." omitted. e.g., "fast"
|
|
90
|
+
@function duration($key) {
|
|
91
|
+
$keys: _str-split($key, ".");
|
|
92
|
+
@return _map-deep-get($theme-map, join("duration", $keys));
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// UTILITIES
|
|
96
|
+
// Helper functions that power the functions above. Not relevant to the theme.
|
|
97
|
+
// If you import this file with @use, these functions will be excluded because they are private.
|
|
98
|
+
|
|
99
|
+
// Via https://stackoverflow.com/a/42295154
|
|
100
|
+
// Used to split period-separated object keys, e.g. "colors.text.body" => ["colors", "text", "body"]
|
|
101
|
+
// Only works with a single-character separator.
|
|
102
|
+
@function _str-split($string, $separator) {
|
|
103
|
+
// empty array/list
|
|
104
|
+
$split-arr: ();
|
|
105
|
+
// first index of separator in string
|
|
106
|
+
$index : str-index($string, $separator);
|
|
107
|
+
// loop through string
|
|
108
|
+
@while $index != null {
|
|
109
|
+
// get the substring from the first character to the separator
|
|
110
|
+
$item: str-slice($string, 1, $index - 1);
|
|
111
|
+
// push item to array
|
|
112
|
+
$split-arr: append($split-arr, $item);
|
|
113
|
+
// remove item and separator from string
|
|
114
|
+
$string: str-slice($string, $index + 1);
|
|
115
|
+
// find new index of separator
|
|
116
|
+
$index : str-index($string, $separator);
|
|
117
|
+
}
|
|
118
|
+
// add the remaining string to list (the last item)
|
|
119
|
+
$split-arr: append($split-arr, $string);
|
|
120
|
+
|
|
121
|
+
@return $split-arr;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
// Adapted from https://css-tricks.com/snippets/sass/deep-getset-maps/
|
|
125
|
+
// Iterates over a list of keys to read multi-level maps.
|
|
126
|
+
// e.g., _map-deep-get((colors: (text: (body: "#364141"))), ["colors", "text", "body"]) => "#364141"
|
|
127
|
+
@function _map-deep-get($map, $keys) {
|
|
128
|
+
@each $key in $keys {
|
|
129
|
+
$map: map-get($map, $key);
|
|
130
|
+
}
|
|
131
|
+
@return $map;
|
|
132
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
$dark: (
|
|
2
2
|
__esModule: true,
|
|
3
3
|
shadows: (
|
|
4
|
-
low: 0px 2px 4px
|
|
5
|
-
medium: 0px 8px 16px
|
|
6
|
-
high: 0px 16px 32px
|
|
4
|
+
low: 0px 2px 4px #040404FF,
|
|
5
|
+
medium: 0px 8px 16px #040404FF,
|
|
6
|
+
high: 0px 16px 32px #040404FF
|
|
7
7
|
),
|
|
8
8
|
default: (
|
|
9
9
|
utils: (
|
|
@@ -582,9 +582,9 @@ $dark: (
|
|
|
582
582
|
500: 1px
|
|
583
583
|
),
|
|
584
584
|
shadows: (
|
|
585
|
-
low: 0px 2px 4px
|
|
586
|
-
medium: 0px 8px 16px
|
|
587
|
-
high: 0px 16px 32px
|
|
585
|
+
low: 0px 2px 4px #040404FF,
|
|
586
|
+
medium: 0px 8px 16px #040404FF,
|
|
587
|
+
high: 0px 16px 32px #040404FF
|
|
588
588
|
),
|
|
589
589
|
easing: (
|
|
590
590
|
ease_in: cubic-bezier(.4, 0, .7, .2),
|
|
@@ -3,29 +3,23 @@
|
|
|
3
3
|
|
|
4
4
|
// SET-UP
|
|
5
5
|
// These files are auto-generated based on JS theme files, ensuring our SCSS theme variables stay in sync.
|
|
6
|
-
@import "
|
|
7
|
-
@import "../../dist/themes/dark.scss";
|
|
6
|
+
@import "../../../dist/themes/light/light.scss";
|
|
8
7
|
|
|
9
8
|
// In the JS theme files, the theme object is exported as "default" (i.e., using "export default"),
|
|
10
9
|
// so we need to map-get "default" to access it.
|
|
11
|
-
$
|
|
12
|
-
light: map-get($default, "default"),
|
|
13
|
-
dark: map-get($dark, "default")
|
|
14
|
-
);
|
|
10
|
+
$theme = map-get($light, 'default');
|
|
15
11
|
|
|
16
12
|
// MIXIN
|
|
17
13
|
// CSS properties that are theme-dependent must be wrapped in this mixin
|
|
18
14
|
@mixin themed() {
|
|
19
|
-
|
|
20
|
-
.theme--#{$theme} & {
|
|
15
|
+
& {
|
|
21
16
|
$theme-map: () !global;
|
|
22
|
-
@each $key, $submap in $
|
|
23
|
-
$value: map-get(
|
|
17
|
+
@each $key, $submap in $theme {
|
|
18
|
+
$value: map-get($theme, "#{$key}");
|
|
24
19
|
$theme-map: map-merge($theme-map, ($key: $value)) !global;
|
|
25
20
|
}
|
|
26
21
|
@content;
|
|
27
22
|
$theme-map: null !global;
|
|
28
|
-
}
|
|
29
23
|
}
|
|
30
24
|
}
|
|
31
25
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
$
|
|
1
|
+
$light: (
|
|
2
2
|
__esModule: true,
|
|
3
3
|
breakpoints: (900px, 1200px, 1500px, 1800px),
|
|
4
4
|
typography: (
|
|
@@ -85,9 +85,9 @@ $default: (
|
|
|
85
85
|
500: 1px
|
|
86
86
|
),
|
|
87
87
|
shadows: (
|
|
88
|
-
low: 0px 2px 4px
|
|
89
|
-
medium: 0px 8px 16px
|
|
90
|
-
high: 0px 16px 32px
|
|
88
|
+
low: 0px 2px 4px #2733333D,
|
|
89
|
+
medium: 0px 8px 16px #2733333D,
|
|
90
|
+
high: 0px 16px 32px #2733333D
|
|
91
91
|
),
|
|
92
92
|
easing: (
|
|
93
93
|
ease_in: cubic-bezier(.4, 0, .7, .2),
|
|
@@ -673,9 +673,9 @@ $default: (
|
|
|
673
673
|
500: 1px
|
|
674
674
|
),
|
|
675
675
|
shadows: (
|
|
676
|
-
low: 0px 2px 4px
|
|
677
|
-
medium: 0px 8px 16px
|
|
678
|
-
high: 0px 16px 32px
|
|
676
|
+
low: 0px 2px 4px #2733333D,
|
|
677
|
+
medium: 0px 8px 16px #2733333D,
|
|
678
|
+
high: 0px 16px 32px #2733333D
|
|
679
679
|
),
|
|
680
680
|
easing: (
|
|
681
681
|
ease_in: cubic-bezier(.4, 0, .7, .2),
|
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;"]);
|
|
@@ -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 "../themes/
|
|
5
|
+
import theme from "../themes/light/theme";
|
|
6
6
|
|
|
7
7
|
var ThemeProvider = function ThemeProvider(props) {
|
|
8
8
|
return /*#__PURE__*/React.createElement(BaseThemeProvider, _extends({}, props, {
|
package/lib/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { visuallyHidden, focusRing, disabled } from "./utils/mixins";
|
|
2
2
|
export { useSelect, useMultiselect, useTextContent } from "./utils/hooks";
|
|
3
|
-
export { default as theme } from "./themes/
|
|
3
|
+
export { default as theme } from "./themes/light/theme";
|
|
4
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
|
|
package/lib/themes/dark/theme.js
CHANGED
|
@@ -2,7 +2,7 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
|
2
2
|
|
|
3
3
|
import COLORS from "@sproutsocial/seeds-color";
|
|
4
4
|
import DEPTH from "@sproutsocial/seeds-depth";
|
|
5
|
-
import defaultTheme from "../
|
|
5
|
+
import defaultTheme from "../light/theme";
|
|
6
6
|
import { datavizPalette } from "./dataviz-palette";
|
|
7
7
|
import { green, blue, purple, yellow, orange, red, neutral } from "./decorative-palettes";
|
|
8
8
|
import interact from "../utils/interact";
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import literalColors from "../themes/
|
|
1
|
+
import literalColors from "../themes/light/literal-colors";
|
package/lib/types/theme.flow.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import { breakpoints, typography, fontWeights, radii, borders, borderWidths, shadows, space, easing, duration } from "../themes/
|
|
1
|
+
import { breakpoints, typography, fontWeights, radii, borders, borderWidths, shadows, space, easing, duration } from "../themes/light/theme";
|
package/lib/utils/mixins.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { css } from "styled-components";
|
|
2
|
-
import theme from "../themes/
|
|
2
|
+
import theme from "../themes/light/theme";
|
|
3
3
|
import { transparentize } from "polished";
|
|
4
4
|
export var svgToDataURL = function svgToDataURL(svgStr) {
|
|
5
5
|
var encoded = encodeURIComponent(svgStr).replace(/'/g, "%27").replace(/"/g, "%22");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sproutsocial/racine",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "10.0.0--dar97-beta.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"files": [
|
|
6
6
|
"__flow__",
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
"@storybook/addon-storysource": "^6.1.11",
|
|
104
104
|
"@storybook/addon-viewport": "^6.1.11",
|
|
105
105
|
"@storybook/addons": "^6.1.11",
|
|
106
|
-
"@storybook/react": "^6.
|
|
106
|
+
"@storybook/react": "^6.4.19",
|
|
107
107
|
"@storybook/theming": "^6.1.11",
|
|
108
108
|
"@testing-library/react": "^11.2.2",
|
|
109
109
|
"@testing-library/user-event": "^13.0.0",
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`Modal should render properly 1`] = `
|
|
4
|
-
.c0__Overlay {
|
|
5
|
-
position: fixed;
|
|
6
|
-
top: 0px;
|
|
7
|
-
left: 0px;
|
|
8
|
-
right: 0px;
|
|
9
|
-
bottom: 0px;
|
|
10
|
-
display: -webkit-box;
|
|
11
|
-
display: -webkit-flex;
|
|
12
|
-
display: -ms-flexbox;
|
|
13
|
-
display: flex;
|
|
14
|
-
-webkit-align-items: center;
|
|
15
|
-
-webkit-box-align: center;
|
|
16
|
-
-ms-flex-align: center;
|
|
17
|
-
align-items: center;
|
|
18
|
-
-webkit-box-pack: center;
|
|
19
|
-
-webkit-justify-content: center;
|
|
20
|
-
-ms-flex-pack: center;
|
|
21
|
-
justify-content: center;
|
|
22
|
-
background-color: rgba(22,32,32,0.68);
|
|
23
|
-
opacity: 0;
|
|
24
|
-
will-change: opacity;
|
|
25
|
-
-webkit-transition: opacity .3s cubic-bezier(.4,0,.2,1);
|
|
26
|
-
transition: opacity .3s cubic-bezier(.4,0,.2,1);
|
|
27
|
-
z-index: 6;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.c0__Overlay.ReactModal__Overlay--after-open {
|
|
31
|
-
opacity: 1;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.c0__Overlay.ReactModal__Overlay--before-close {
|
|
35
|
-
opacity: 0;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.c0__Content {
|
|
39
|
-
display: -webkit-box;
|
|
40
|
-
display: -webkit-flex;
|
|
41
|
-
display: -ms-flexbox;
|
|
42
|
-
display: flex;
|
|
43
|
-
-webkit-flex-direction: column;
|
|
44
|
-
-ms-flex-direction: column;
|
|
45
|
-
flex-direction: column;
|
|
46
|
-
background: #FFFFFF;
|
|
47
|
-
border-radius: 6px;
|
|
48
|
-
box-shadow: 0px 8px 16px #2733333D;
|
|
49
|
-
-webkit-filter: blur(0);
|
|
50
|
-
filter: blur(0);
|
|
51
|
-
color: #364141;
|
|
52
|
-
outline: none;
|
|
53
|
-
max-width: calc(100vw - 64px);
|
|
54
|
-
max-height: calc(100vh - 64px);
|
|
55
|
-
width: 800px;
|
|
56
|
-
background-color: #c1c1f7;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
@media screen and (-ms-high-contrast:active),(-ms-high-contrast:none) {
|
|
60
|
-
.c0__Content {
|
|
61
|
-
height: calc(100vh - 64px);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
<div
|
|
66
|
-
class="ReactModal__Overlay ReactModal__Overlay--after-open styles__Container-sc-9lom4g-0__Overlay c0 c0__Overlay"
|
|
67
|
-
>
|
|
68
|
-
<div
|
|
69
|
-
aria-label="Label"
|
|
70
|
-
aria-modal="true"
|
|
71
|
-
class="ReactModal__Content ReactModal__Content--after-open styles__Container-sc-9lom4g-0__Content c0 c0__Content"
|
|
72
|
-
data-qa-modal=""
|
|
73
|
-
data-qa-modal-isopen="true"
|
|
74
|
-
role="dialog"
|
|
75
|
-
tabindex="-1"
|
|
76
|
-
>
|
|
77
|
-
ajdsfljasdlfjlasdjf
|
|
78
|
-
</div>
|
|
79
|
-
</div>
|
|
80
|
-
`;
|