@sproutsocial/racine 7.5.0 → 8.0.0-beta-dark-mode.1
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 +6 -0
- 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 -8
- 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 +334 -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 +38 -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 +18 -10
- 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 +18 -10
- 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
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = void 0;
|
|
5
|
+
|
|
6
|
+
var _seedsColor = _interopRequireDefault(require("@sproutsocial/seeds-color"));
|
|
7
|
+
|
|
8
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
9
|
+
|
|
10
|
+
var literalColors = {
|
|
11
|
+
neutral: {
|
|
12
|
+
"0": _seedsColor.default.COLOR_NEUTRAL_0,
|
|
13
|
+
"100": _seedsColor.default.COLOR_NEUTRAL_100,
|
|
14
|
+
"200": _seedsColor.default.COLOR_NEUTRAL_200,
|
|
15
|
+
"300": _seedsColor.default.COLOR_NEUTRAL_300,
|
|
16
|
+
"400": _seedsColor.default.COLOR_NEUTRAL_400,
|
|
17
|
+
"500": _seedsColor.default.COLOR_NEUTRAL_500,
|
|
18
|
+
"600": _seedsColor.default.COLOR_NEUTRAL_600,
|
|
19
|
+
"700": _seedsColor.default.COLOR_NEUTRAL_700,
|
|
20
|
+
"800": _seedsColor.default.COLOR_NEUTRAL_800,
|
|
21
|
+
"900": _seedsColor.default.COLOR_NEUTRAL_900,
|
|
22
|
+
"1000": _seedsColor.default.COLOR_NEUTRAL_1000
|
|
23
|
+
},
|
|
24
|
+
green: {
|
|
25
|
+
"0": _seedsColor.default.COLOR_GREEN_0,
|
|
26
|
+
"100": _seedsColor.default.COLOR_GREEN_100,
|
|
27
|
+
"200": _seedsColor.default.COLOR_GREEN_200,
|
|
28
|
+
"300": _seedsColor.default.COLOR_GREEN_300,
|
|
29
|
+
"400": _seedsColor.default.COLOR_GREEN_400,
|
|
30
|
+
"500": _seedsColor.default.COLOR_GREEN_500,
|
|
31
|
+
"600": _seedsColor.default.COLOR_GREEN_600,
|
|
32
|
+
"700": _seedsColor.default.COLOR_GREEN_700,
|
|
33
|
+
"800": _seedsColor.default.COLOR_GREEN_800,
|
|
34
|
+
"900": _seedsColor.default.COLOR_GREEN_900,
|
|
35
|
+
"1000": _seedsColor.default.COLOR_GREEN_1000,
|
|
36
|
+
"1100": _seedsColor.default.COLOR_GREEN_1100
|
|
37
|
+
},
|
|
38
|
+
red: {
|
|
39
|
+
"0": _seedsColor.default.COLOR_RED_0,
|
|
40
|
+
"100": _seedsColor.default.COLOR_RED_100,
|
|
41
|
+
"200": _seedsColor.default.COLOR_RED_200,
|
|
42
|
+
"300": _seedsColor.default.COLOR_RED_300,
|
|
43
|
+
"400": _seedsColor.default.COLOR_RED_400,
|
|
44
|
+
"500": _seedsColor.default.COLOR_RED_500,
|
|
45
|
+
"600": _seedsColor.default.COLOR_RED_600,
|
|
46
|
+
"700": _seedsColor.default.COLOR_RED_700,
|
|
47
|
+
"800": _seedsColor.default.COLOR_RED_800,
|
|
48
|
+
"900": _seedsColor.default.COLOR_RED_900,
|
|
49
|
+
"1000": _seedsColor.default.COLOR_RED_1000
|
|
50
|
+
},
|
|
51
|
+
blue: {
|
|
52
|
+
"0": _seedsColor.default.COLOR_BLUE_0,
|
|
53
|
+
"100": _seedsColor.default.COLOR_BLUE_100,
|
|
54
|
+
"200": _seedsColor.default.COLOR_BLUE_200,
|
|
55
|
+
"300": _seedsColor.default.COLOR_BLUE_300,
|
|
56
|
+
"400": _seedsColor.default.COLOR_BLUE_400,
|
|
57
|
+
"500": _seedsColor.default.COLOR_BLUE_500,
|
|
58
|
+
"600": _seedsColor.default.COLOR_BLUE_600,
|
|
59
|
+
"700": _seedsColor.default.COLOR_BLUE_700,
|
|
60
|
+
"800": _seedsColor.default.COLOR_BLUE_800,
|
|
61
|
+
"900": _seedsColor.default.COLOR_BLUE_900,
|
|
62
|
+
"1000": _seedsColor.default.COLOR_BLUE_1000,
|
|
63
|
+
"1100": _seedsColor.default.COLOR_BLUE_1100
|
|
64
|
+
},
|
|
65
|
+
teal: {
|
|
66
|
+
"0": _seedsColor.default.COLOR_TEAL_0,
|
|
67
|
+
"100": _seedsColor.default.COLOR_TEAL_100,
|
|
68
|
+
"200": _seedsColor.default.COLOR_TEAL_200,
|
|
69
|
+
"300": _seedsColor.default.COLOR_TEAL_300,
|
|
70
|
+
"400": _seedsColor.default.COLOR_TEAL_400,
|
|
71
|
+
"500": _seedsColor.default.COLOR_TEAL_500,
|
|
72
|
+
"600": _seedsColor.default.COLOR_TEAL_600,
|
|
73
|
+
"700": _seedsColor.default.COLOR_TEAL_700,
|
|
74
|
+
"800": _seedsColor.default.COLOR_TEAL_800,
|
|
75
|
+
"900": _seedsColor.default.COLOR_TEAL_900,
|
|
76
|
+
"1000": _seedsColor.default.COLOR_TEAL_1000,
|
|
77
|
+
"1100": _seedsColor.default.COLOR_TEAL_1100
|
|
78
|
+
},
|
|
79
|
+
aqua: {
|
|
80
|
+
"0": _seedsColor.default.COLOR_AQUA_0,
|
|
81
|
+
"100": _seedsColor.default.COLOR_AQUA_100,
|
|
82
|
+
"200": _seedsColor.default.COLOR_AQUA_200,
|
|
83
|
+
"300": _seedsColor.default.COLOR_AQUA_300,
|
|
84
|
+
"400": _seedsColor.default.COLOR_AQUA_400,
|
|
85
|
+
"500": _seedsColor.default.COLOR_AQUA_500,
|
|
86
|
+
"600": _seedsColor.default.COLOR_AQUA_600,
|
|
87
|
+
"700": _seedsColor.default.COLOR_AQUA_700,
|
|
88
|
+
"800": _seedsColor.default.COLOR_AQUA_800,
|
|
89
|
+
"900": _seedsColor.default.COLOR_AQUA_900,
|
|
90
|
+
"1000": _seedsColor.default.COLOR_AQUA_1000,
|
|
91
|
+
"1100": _seedsColor.default.COLOR_AQUA_1100
|
|
92
|
+
},
|
|
93
|
+
purple: {
|
|
94
|
+
"0": _seedsColor.default.COLOR_PURPLE_0,
|
|
95
|
+
"100": _seedsColor.default.COLOR_PURPLE_100,
|
|
96
|
+
"200": _seedsColor.default.COLOR_PURPLE_200,
|
|
97
|
+
"300": _seedsColor.default.COLOR_PURPLE_300,
|
|
98
|
+
"400": _seedsColor.default.COLOR_PURPLE_400,
|
|
99
|
+
"500": _seedsColor.default.COLOR_PURPLE_500,
|
|
100
|
+
"600": _seedsColor.default.COLOR_PURPLE_600,
|
|
101
|
+
"700": _seedsColor.default.COLOR_PURPLE_700,
|
|
102
|
+
"800": _seedsColor.default.COLOR_PURPLE_800,
|
|
103
|
+
"900": _seedsColor.default.COLOR_PURPLE_900,
|
|
104
|
+
"1000": _seedsColor.default.COLOR_PURPLE_1000,
|
|
105
|
+
"1100": _seedsColor.default.COLOR_PURPLE_1100
|
|
106
|
+
},
|
|
107
|
+
magenta: {
|
|
108
|
+
"0": _seedsColor.default.COLOR_MAGENTA_0,
|
|
109
|
+
"100": _seedsColor.default.COLOR_MAGENTA_100,
|
|
110
|
+
"200": _seedsColor.default.COLOR_MAGENTA_200,
|
|
111
|
+
"300": _seedsColor.default.COLOR_MAGENTA_300,
|
|
112
|
+
"400": _seedsColor.default.COLOR_MAGENTA_400,
|
|
113
|
+
"500": _seedsColor.default.COLOR_MAGENTA_500,
|
|
114
|
+
"600": _seedsColor.default.COLOR_MAGENTA_600,
|
|
115
|
+
"700": _seedsColor.default.COLOR_MAGENTA_700,
|
|
116
|
+
"800": _seedsColor.default.COLOR_MAGENTA_800,
|
|
117
|
+
"900": _seedsColor.default.COLOR_MAGENTA_900,
|
|
118
|
+
"1000": _seedsColor.default.COLOR_MAGENTA_1000,
|
|
119
|
+
"1100": _seedsColor.default.COLOR_MAGENTA_1100
|
|
120
|
+
},
|
|
121
|
+
yellow: {
|
|
122
|
+
"0": _seedsColor.default.COLOR_YELLOW_0,
|
|
123
|
+
"100": _seedsColor.default.COLOR_YELLOW_100,
|
|
124
|
+
"200": _seedsColor.default.COLOR_YELLOW_200,
|
|
125
|
+
"300": _seedsColor.default.COLOR_YELLOW_300,
|
|
126
|
+
"400": _seedsColor.default.COLOR_YELLOW_400,
|
|
127
|
+
"500": _seedsColor.default.COLOR_YELLOW_500,
|
|
128
|
+
"600": _seedsColor.default.COLOR_YELLOW_600,
|
|
129
|
+
"700": _seedsColor.default.COLOR_YELLOW_700,
|
|
130
|
+
"800": _seedsColor.default.COLOR_YELLOW_800,
|
|
131
|
+
"900": _seedsColor.default.COLOR_YELLOW_900,
|
|
132
|
+
"1000": _seedsColor.default.COLOR_YELLOW_1000,
|
|
133
|
+
"1100": _seedsColor.default.COLOR_YELLOW_1100
|
|
134
|
+
},
|
|
135
|
+
pink: {
|
|
136
|
+
"0": _seedsColor.default.COLOR_PINK_0,
|
|
137
|
+
"100": _seedsColor.default.COLOR_PINK_100,
|
|
138
|
+
"200": _seedsColor.default.COLOR_PINK_200,
|
|
139
|
+
"300": _seedsColor.default.COLOR_PINK_300,
|
|
140
|
+
"400": _seedsColor.default.COLOR_PINK_400,
|
|
141
|
+
"500": _seedsColor.default.COLOR_PINK_500,
|
|
142
|
+
"600": _seedsColor.default.COLOR_PINK_600,
|
|
143
|
+
"700": _seedsColor.default.COLOR_PINK_700,
|
|
144
|
+
"800": _seedsColor.default.COLOR_PINK_800,
|
|
145
|
+
"900": _seedsColor.default.COLOR_PINK_900,
|
|
146
|
+
"1000": _seedsColor.default.COLOR_PINK_1000,
|
|
147
|
+
"1100": _seedsColor.default.COLOR_PINK_1100
|
|
148
|
+
},
|
|
149
|
+
orange: {
|
|
150
|
+
"0": _seedsColor.default.COLOR_ORANGE_0,
|
|
151
|
+
"100": _seedsColor.default.COLOR_ORANGE_100,
|
|
152
|
+
"200": _seedsColor.default.COLOR_ORANGE_200,
|
|
153
|
+
"300": _seedsColor.default.COLOR_ORANGE_300,
|
|
154
|
+
"400": _seedsColor.default.COLOR_ORANGE_400,
|
|
155
|
+
"500": _seedsColor.default.COLOR_ORANGE_500,
|
|
156
|
+
"600": _seedsColor.default.COLOR_ORANGE_600,
|
|
157
|
+
"700": _seedsColor.default.COLOR_ORANGE_700,
|
|
158
|
+
"800": _seedsColor.default.COLOR_ORANGE_800,
|
|
159
|
+
"900": _seedsColor.default.COLOR_ORANGE_900,
|
|
160
|
+
"1000": _seedsColor.default.COLOR_ORANGE_1000,
|
|
161
|
+
"1100": _seedsColor.default.COLOR_ORANGE_1100
|
|
162
|
+
}
|
|
163
|
+
};
|
|
164
|
+
var _default = literalColors;
|
|
165
|
+
exports.default = _default;
|
|
@@ -0,0 +1,333 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = exports.duration = exports.easing = exports.shadows = exports.borderWidths = exports.borders = exports.radii = exports.space = exports.fontWeights = exports.fontFamily = exports.typography = exports.breakpoints = void 0;
|
|
5
|
+
|
|
6
|
+
var _seedsColor = _interopRequireDefault(require("@sproutsocial/seeds-color"));
|
|
7
|
+
|
|
8
|
+
var _literalColors = _interopRequireDefault(require("./literal-colors"));
|
|
9
|
+
|
|
10
|
+
var _decorativePalettes = require("./decorative-palettes");
|
|
11
|
+
|
|
12
|
+
var _seedsNetworkcolor = _interopRequireDefault(require("@sproutsocial/seeds-networkcolor"));
|
|
13
|
+
|
|
14
|
+
var _seedsTypography = _interopRequireDefault(require("@sproutsocial/seeds-typography"));
|
|
15
|
+
|
|
16
|
+
var _seedsSpace = _interopRequireDefault(require("@sproutsocial/seeds-space"));
|
|
17
|
+
|
|
18
|
+
var _seedsDepth = _interopRequireDefault(require("@sproutsocial/seeds-depth"));
|
|
19
|
+
|
|
20
|
+
var _seedsMotion = _interopRequireDefault(require("@sproutsocial/seeds-motion"));
|
|
21
|
+
|
|
22
|
+
var _seedsBorder = _interopRequireDefault(require("@sproutsocial/seeds-border"));
|
|
23
|
+
|
|
24
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
|
+
|
|
26
|
+
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); }
|
|
27
|
+
|
|
28
|
+
var breakpoints = ["900px", "1200px", "1500px", "1800px"];
|
|
29
|
+
exports.breakpoints = breakpoints;
|
|
30
|
+
|
|
31
|
+
var colors = _extends({
|
|
32
|
+
app: {
|
|
33
|
+
background: {
|
|
34
|
+
base: _seedsColor.default.COLOR_NEUTRAL_100
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
container: {
|
|
38
|
+
background: {
|
|
39
|
+
base: _seedsColor.default.COLOR_NEUTRAL_0,
|
|
40
|
+
success: _decorativePalettes.green.background,
|
|
41
|
+
warning: _decorativePalettes.yellow.background,
|
|
42
|
+
error: _decorativePalettes.red.background,
|
|
43
|
+
info: _decorativePalettes.blue.background,
|
|
44
|
+
opportunity: _decorativePalettes.purple.background,
|
|
45
|
+
danger: _decorativePalettes.red.background,
|
|
46
|
+
decorative: {
|
|
47
|
+
green: _decorativePalettes.green.background,
|
|
48
|
+
blue: _decorativePalettes.blue.background,
|
|
49
|
+
purple: _decorativePalettes.purple.background,
|
|
50
|
+
yellow: _decorativePalettes.yellow.background,
|
|
51
|
+
orange: _decorativePalettes.orange.background,
|
|
52
|
+
red: _decorativePalettes.red.background,
|
|
53
|
+
neutral: _decorativePalettes.neutral.background
|
|
54
|
+
},
|
|
55
|
+
selected: _seedsColor.default.COLOR_NEUTRAL_800
|
|
56
|
+
},
|
|
57
|
+
border: {
|
|
58
|
+
base: _seedsColor.default.COLOR_NEUTRAL_200,
|
|
59
|
+
success: _decorativePalettes.green.highlight,
|
|
60
|
+
warning: _decorativePalettes.yellow.highlight,
|
|
61
|
+
error: _decorativePalettes.red.highlight,
|
|
62
|
+
danger: _decorativePalettes.red.highlight,
|
|
63
|
+
info: _decorativePalettes.blue.highlight,
|
|
64
|
+
opportunity: _decorativePalettes.purple.highlight,
|
|
65
|
+
decorative: {
|
|
66
|
+
green: _decorativePalettes.green.highlight,
|
|
67
|
+
blue: _decorativePalettes.blue.highlight,
|
|
68
|
+
purple: _decorativePalettes.purple.highlight,
|
|
69
|
+
yellow: _decorativePalettes.yellow.highlight,
|
|
70
|
+
orange: _decorativePalettes.orange.highlight,
|
|
71
|
+
red: _decorativePalettes.red.highlight,
|
|
72
|
+
neutral: _decorativePalettes.neutral.highlight
|
|
73
|
+
},
|
|
74
|
+
selected: _seedsColor.default.COLOR_NEUTRAL_800
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
button: {
|
|
78
|
+
primary: {
|
|
79
|
+
background: {
|
|
80
|
+
base: _seedsColor.default.COLOR_BLUE_700,
|
|
81
|
+
hover: _seedsColor.default.COLOR_BLUE_800,
|
|
82
|
+
active: _seedsColor.default.COLOR_BLUE_900
|
|
83
|
+
},
|
|
84
|
+
border: {
|
|
85
|
+
base: "transparent"
|
|
86
|
+
},
|
|
87
|
+
text: {
|
|
88
|
+
base: _seedsColor.default.COLOR_NEUTRAL_0,
|
|
89
|
+
hover: _seedsColor.default.COLOR_NEUTRAL_0
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
secondary: {
|
|
93
|
+
background: {
|
|
94
|
+
base: "transparent",
|
|
95
|
+
hover: _seedsColor.default.COLOR_NEUTRAL_800,
|
|
96
|
+
active: _seedsColor.default.COLOR_NEUTRAL_900
|
|
97
|
+
},
|
|
98
|
+
border: {
|
|
99
|
+
base: _seedsColor.default.COLOR_NEUTRAL_800
|
|
100
|
+
},
|
|
101
|
+
text: {
|
|
102
|
+
base: _seedsColor.default.COLOR_NEUTRAL_800,
|
|
103
|
+
hover: _seedsColor.default.COLOR_NEUTRAL_0
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
pill: {
|
|
107
|
+
background: {
|
|
108
|
+
base: "transparent",
|
|
109
|
+
hover: _seedsColor.default.COLOR_NEUTRAL_100,
|
|
110
|
+
active: _seedsColor.default.COLOR_NEUTRAL_200
|
|
111
|
+
},
|
|
112
|
+
border: {
|
|
113
|
+
base: "transparent"
|
|
114
|
+
},
|
|
115
|
+
text: {
|
|
116
|
+
base: _seedsColor.default.COLOR_NEUTRAL_800,
|
|
117
|
+
hover: _seedsColor.default.COLOR_NEUTRAL_900
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
destructive: {
|
|
121
|
+
background: {
|
|
122
|
+
base: _seedsColor.default.COLOR_RED_800,
|
|
123
|
+
hover: _seedsColor.default.COLOR_RED_900,
|
|
124
|
+
active: _seedsColor.default.COLOR_RED_1000
|
|
125
|
+
},
|
|
126
|
+
border: {
|
|
127
|
+
base: "transparent"
|
|
128
|
+
},
|
|
129
|
+
text: {
|
|
130
|
+
base: _seedsColor.default.COLOR_NEUTRAL_0,
|
|
131
|
+
hover: _seedsColor.default.COLOR_NEUTRAL_0
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
placeholder: {
|
|
135
|
+
background: {
|
|
136
|
+
base: "transparent",
|
|
137
|
+
hover: _seedsColor.default.COLOR_NEUTRAL_0,
|
|
138
|
+
active: _seedsColor.default.COLOR_NEUTRAL_0
|
|
139
|
+
},
|
|
140
|
+
border: {
|
|
141
|
+
base: _seedsColor.default.COLOR_NEUTRAL_500
|
|
142
|
+
},
|
|
143
|
+
text: {
|
|
144
|
+
base: _seedsColor.default.COLOR_BLUE_700,
|
|
145
|
+
hover: _seedsColor.default.COLOR_BLUE_800
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
unstyled: {
|
|
149
|
+
background: {
|
|
150
|
+
base: "transparent"
|
|
151
|
+
},
|
|
152
|
+
border: {
|
|
153
|
+
base: "transparent"
|
|
154
|
+
},
|
|
155
|
+
text: {
|
|
156
|
+
base: _seedsColor.default.COLOR_NEUTRAL_700,
|
|
157
|
+
hover: _seedsColor.default.COLOR_NEUTRAL_900
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
link: {
|
|
162
|
+
base: _seedsColor.default.COLOR_BLUE_800,
|
|
163
|
+
hover: _seedsColor.default.COLOR_BLUE_900
|
|
164
|
+
},
|
|
165
|
+
text: {
|
|
166
|
+
headline: _seedsColor.default.COLOR_NEUTRAL_900,
|
|
167
|
+
subtext: _seedsColor.default.COLOR_NEUTRAL_700,
|
|
168
|
+
body: _seedsColor.default.COLOR_NEUTRAL_800,
|
|
169
|
+
inverse: _seedsColor.default.COLOR_NEUTRAL_0,
|
|
170
|
+
error: _seedsColor.default.COLOR_RED_800
|
|
171
|
+
},
|
|
172
|
+
icon: {
|
|
173
|
+
base: _seedsColor.default.COLOR_NEUTRAL_800,
|
|
174
|
+
inverse: _seedsColor.default.COLOR_NEUTRAL_0,
|
|
175
|
+
success: _decorativePalettes.green.foreground,
|
|
176
|
+
warning: _decorativePalettes.yellow.foreground,
|
|
177
|
+
error: _decorativePalettes.red.foreground,
|
|
178
|
+
danger: _decorativePalettes.red.foreground,
|
|
179
|
+
info: _decorativePalettes.blue.foreground,
|
|
180
|
+
opportunity: _decorativePalettes.purple.foreground
|
|
181
|
+
},
|
|
182
|
+
form: {
|
|
183
|
+
background: {
|
|
184
|
+
base: _seedsColor.default.COLOR_NEUTRAL_0,
|
|
185
|
+
selected: _seedsColor.default.COLOR_NEUTRAL_800
|
|
186
|
+
},
|
|
187
|
+
border: {
|
|
188
|
+
base: _seedsColor.default.COLOR_NEUTRAL_400,
|
|
189
|
+
error: _decorativePalettes.red.highlight,
|
|
190
|
+
warning: _decorativePalettes.yellow.highlight,
|
|
191
|
+
selected: _seedsColor.default.COLOR_NEUTRAL_800
|
|
192
|
+
},
|
|
193
|
+
placeholder: {
|
|
194
|
+
base: _seedsColor.default.COLOR_NEUTRAL_600
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
listItem: {
|
|
198
|
+
background: {
|
|
199
|
+
base: "transparent",
|
|
200
|
+
hover: _seedsColor.default.COLOR_NEUTRAL_100,
|
|
201
|
+
selected: _seedsColor.default.COLOR_NEUTRAL_800
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
network: {
|
|
205
|
+
twitter: _seedsNetworkcolor.default.NETWORK_COLOR_TWITTER,
|
|
206
|
+
twitter_like: _seedsNetworkcolor.default.NETWORK_COLOR_TWITTER_LIKE,
|
|
207
|
+
facebook: _seedsNetworkcolor.default.NETWORK_COLOR_FACEBOOK,
|
|
208
|
+
facebook_audience_network: _seedsNetworkcolor.default.NETWORK_COLOR_FACEBOOK_AUDIENCE_NETWORK,
|
|
209
|
+
linkedin: _seedsNetworkcolor.default.NETWORK_COLOR_LINKEDIN,
|
|
210
|
+
instagram: _seedsNetworkcolor.default.NETWORK_COLOR_INSTAGRAM,
|
|
211
|
+
feedly: _seedsNetworkcolor.default.NETWORK_COLOR_FEEDLY,
|
|
212
|
+
analytics: _seedsNetworkcolor.default.NETWORK_COLOR_ANALYTICS,
|
|
213
|
+
youtube: _seedsNetworkcolor.default.NETWORK_COLOR_YOUTUBE,
|
|
214
|
+
messenger: _seedsNetworkcolor.default.NETWORK_COLOR_MESSENGER,
|
|
215
|
+
snapchat: _seedsNetworkcolor.default.NETWORK_COLOR_SNAPCHAT,
|
|
216
|
+
pinterest: _seedsNetworkcolor.default.NETWORK_COLOR_PINTEREST,
|
|
217
|
+
tumblr: _seedsNetworkcolor.default.NETWORK_COLOR_TUMBLR,
|
|
218
|
+
reddit: _seedsNetworkcolor.default.NETWORK_COLOR_REDDIT,
|
|
219
|
+
tripadvisor: _seedsNetworkcolor.default.NETWORK_COLOR_TRIPADVISOR,
|
|
220
|
+
glassdoor: _seedsNetworkcolor.default.NETWORK_COLOR_GLASSDOOR,
|
|
221
|
+
google_my_business: _seedsNetworkcolor.default.NETWORK_COLOR_GOOGLE_MY_BUSINESS,
|
|
222
|
+
google_business_messages: _seedsNetworkcolor.default.NETWORK_COLOR_GOOGLE_BUSINESS_MESSAGES,
|
|
223
|
+
salesforce: _seedsNetworkcolor.default.NETWORK_COLOR_SALESFORCE,
|
|
224
|
+
zendesk: _seedsNetworkcolor.default.NETWORK_COLOR_ZENDESK,
|
|
225
|
+
hubspot: _seedsNetworkcolor.default.NETWORK_COLOR_HUBSPOT,
|
|
226
|
+
microsoft_dynamics: _seedsNetworkcolor.default.NETWORK_COLOR_MICROSOFT_DYNAMICS,
|
|
227
|
+
yelp: _seedsNetworkcolor.default.NETWORK_COLOR_YELP,
|
|
228
|
+
whatsapp: _seedsNetworkcolor.default.NETWORK_COLOR_WHATSAPP
|
|
229
|
+
}
|
|
230
|
+
}, _literalColors.default);
|
|
231
|
+
|
|
232
|
+
var typography = {
|
|
233
|
+
"100": _seedsTypography.default.TYPOGRAPHY_SIZE_100,
|
|
234
|
+
"200": _seedsTypography.default.TYPOGRAPHY_SIZE_200,
|
|
235
|
+
"300": _seedsTypography.default.TYPOGRAPHY_SIZE_300,
|
|
236
|
+
"400": _seedsTypography.default.TYPOGRAPHY_SIZE_400,
|
|
237
|
+
"500": _seedsTypography.default.TYPOGRAPHY_SIZE_500,
|
|
238
|
+
"600": _seedsTypography.default.TYPOGRAPHY_SIZE_600,
|
|
239
|
+
"700": _seedsTypography.default.TYPOGRAPHY_SIZE_700,
|
|
240
|
+
"800": _seedsTypography.default.TYPOGRAPHY_SIZE_800,
|
|
241
|
+
"900": _seedsTypography.default.TYPOGRAPHY_SIZE_900,
|
|
242
|
+
"1000": _seedsTypography.default.TYPOGRAPHY_SIZE_1000,
|
|
243
|
+
"1100": _seedsTypography.default.TYPOGRAPHY_SIZE_1100,
|
|
244
|
+
"1200": _seedsTypography.default.TYPOGRAPHY_SIZE_1200
|
|
245
|
+
};
|
|
246
|
+
exports.typography = typography;
|
|
247
|
+
var fontFamily = _seedsTypography.default.TYPOGRAPHY_FAMILY;
|
|
248
|
+
exports.fontFamily = fontFamily;
|
|
249
|
+
var fontWeights = {
|
|
250
|
+
normal: _seedsTypography.default.TYPOGRAPHY_WEIGHT_NORMAL,
|
|
251
|
+
semibold: _seedsTypography.default.TYPOGRAPHY_WEIGHT_SEMIBOLD,
|
|
252
|
+
bold: _seedsTypography.default.TYPOGRAPHY_WEIGHT_BOLD,
|
|
253
|
+
extrabold: _seedsTypography.default.TYPOGRAPHY_WEIGHT_EXTRA_BOLD
|
|
254
|
+
};
|
|
255
|
+
exports.fontWeights = fontWeights;
|
|
256
|
+
var space = {
|
|
257
|
+
"0": _seedsSpace.default.SPACE_SIZE_0,
|
|
258
|
+
"100": _seedsSpace.default.SPACE_SIZE_100,
|
|
259
|
+
"200": _seedsSpace.default.SPACE_SIZE_200,
|
|
260
|
+
"300": _seedsSpace.default.SPACE_SIZE_300,
|
|
261
|
+
"350": _seedsSpace.default.SPACE_SIZE_350,
|
|
262
|
+
"400": _seedsSpace.default.SPACE_SIZE_400,
|
|
263
|
+
"450": _seedsSpace.default.SPACE_SIZE_450,
|
|
264
|
+
"500": _seedsSpace.default.SPACE_SIZE_500,
|
|
265
|
+
"600": _seedsSpace.default.SPACE_SIZE_600
|
|
266
|
+
};
|
|
267
|
+
exports.space = space;
|
|
268
|
+
var radii = {
|
|
269
|
+
"400": _seedsBorder.default.BORDER_RADIUS_400,
|
|
270
|
+
"500": _seedsBorder.default.BORDER_RADIUS_500,
|
|
271
|
+
"600": _seedsBorder.default.BORDER_RADIUS_600,
|
|
272
|
+
"1000": _seedsBorder.default.BORDER_RADIUS_1000,
|
|
273
|
+
inner: _seedsBorder.default.BORDER_RADIUS_500,
|
|
274
|
+
outer: _seedsBorder.default.BORDER_RADIUS_600,
|
|
275
|
+
pill: _seedsBorder.default.BORDER_RADIUS_1000
|
|
276
|
+
};
|
|
277
|
+
exports.radii = radii;
|
|
278
|
+
var borders = {
|
|
279
|
+
"500": _seedsBorder.default.BORDER_WIDTH_500 + " solid"
|
|
280
|
+
};
|
|
281
|
+
exports.borders = borders;
|
|
282
|
+
var borderWidths = {
|
|
283
|
+
"500": _seedsBorder.default.BORDER_WIDTH_500
|
|
284
|
+
};
|
|
285
|
+
exports.borderWidths = borderWidths;
|
|
286
|
+
var shadows = {
|
|
287
|
+
"100": _seedsDepth.default.ELEVATION_LEVEL_100,
|
|
288
|
+
"200": _seedsDepth.default.ELEVATION_LEVEL_200,
|
|
289
|
+
"300": _seedsDepth.default.ELEVATION_LEVEL_300,
|
|
290
|
+
"400": _seedsDepth.default.ELEVATION_LEVEL_400
|
|
291
|
+
};
|
|
292
|
+
exports.shadows = shadows;
|
|
293
|
+
var easing = {
|
|
294
|
+
ease_in: _seedsMotion.default.MOTION_EASE_IN,
|
|
295
|
+
ease_out: _seedsMotion.default.MOTION_EASE_OUT,
|
|
296
|
+
ease_inout: _seedsMotion.default.MOTION_EASE_INOUT
|
|
297
|
+
};
|
|
298
|
+
exports.easing = easing;
|
|
299
|
+
var duration = {
|
|
300
|
+
fast: _seedsMotion.default.MOTION_DURATION_FAST,
|
|
301
|
+
medium: _seedsMotion.default.MOTION_DURATION_MEDIUM,
|
|
302
|
+
slow: _seedsMotion.default.MOTION_DURATION_SLOW
|
|
303
|
+
};
|
|
304
|
+
exports.duration = duration;
|
|
305
|
+
var theme = {
|
|
306
|
+
breakpoints: breakpoints,
|
|
307
|
+
colors: colors,
|
|
308
|
+
typography: _extends({}, typography, {
|
|
309
|
+
typography: typography
|
|
310
|
+
}),
|
|
311
|
+
fontFamily: fontFamily,
|
|
312
|
+
fontWeights: fontWeights,
|
|
313
|
+
space: _extends({}, space, {
|
|
314
|
+
space: space,
|
|
315
|
+
"-space": Object.keys(space).reduce(function (negativeSpace, key) {
|
|
316
|
+
// The values are strings (eg 24px) so we concatenate a negative sign
|
|
317
|
+
negativeSpace[key] = "-" + space[key];
|
|
318
|
+
return negativeSpace;
|
|
319
|
+
}, {})
|
|
320
|
+
}),
|
|
321
|
+
radii: _extends({}, radii, {
|
|
322
|
+
radii: radii
|
|
323
|
+
}),
|
|
324
|
+
borders: borders,
|
|
325
|
+
borderWidths: borderWidths,
|
|
326
|
+
shadows: _extends({}, shadows, {
|
|
327
|
+
shadows: shadows
|
|
328
|
+
}),
|
|
329
|
+
easing: easing,
|
|
330
|
+
duration: duration
|
|
331
|
+
};
|
|
332
|
+
var _default = theme;
|
|
333
|
+
exports.default = _default;
|
|
@@ -1,7 +1,3 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _theme =
|
|
4
|
-
|
|
5
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
6
|
-
|
|
7
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
3
|
+
var _theme = require("../themes/default/theme");
|
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("
|
|
8
|
+
var _theme = _interopRequireDefault(require("../themes/default/theme"));
|
|
9
9
|
|
|
10
10
|
var _polished = require("polished");
|
|
11
11
|
|
|
@@ -21,7 +21,7 @@ var svgToDataURL = function svgToDataURL(svgStr) {
|
|
|
21
21
|
exports.svgToDataURL = svgToDataURL;
|
|
22
22
|
var visuallyHidden = (0, _styledComponents.css)(["position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);border:0;"]);
|
|
23
23
|
exports.visuallyHidden = visuallyHidden;
|
|
24
|
-
var focusRing = (0, _styledComponents.css)(["box-shadow:0 0 0 1px ", ",0 0px 0px 4px ", ";outline:none;&::-moz-focus-inner{border:0;}"], _theme.default.colors.
|
|
24
|
+
var focusRing = (0, _styledComponents.css)(["box-shadow:0 0 0 1px ", ",0 0px 0px 4px ", ";outline:none;&::-moz-focus-inner{border:0;}"], _theme.default.colors.button.primary.background.base, (0, _polished.transparentize)(0.7, _theme.default.colors.button.primary.background.base));
|
|
25
25
|
exports.focusRing = focusRing;
|
|
26
26
|
var pill = (0, _styledComponents.css)(["min-width:", ";min-height:", ";padding:", " ", ";border-radius:", ";"], _theme.default.space[600], _theme.default.space[600], _theme.default.space[300], _theme.default.space[350], _theme.default.radii.pill);
|
|
27
27
|
exports.pill = pill;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.normalizeResponsiveProp = void 0;
|
|
5
5
|
|
|
6
|
-
var _theme = _interopRequireDefault(require("
|
|
6
|
+
var _theme = _interopRequireDefault(require("../../themes/default/theme"));
|
|
7
7
|
|
|
8
8
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
9
9
|
|
package/lib/Badge/styles.js
CHANGED
package/lib/Banner/index.js
CHANGED
|
@@ -69,8 +69,9 @@ var Banner = /*#__PURE__*/function (_React$Component) {
|
|
|
69
69
|
text = _this$props.text,
|
|
70
70
|
rest = _objectWithoutPropertiesLoose(_this$props, ["type", "text"]);
|
|
71
71
|
|
|
72
|
-
return /*#__PURE__*/React.createElement(Container
|
|
73
|
-
|
|
72
|
+
return /*#__PURE__*/React.createElement(Container // danger needs to be properly deprecated and removed DS-1094
|
|
73
|
+
, _extends({
|
|
74
|
+
type: type === "danger" ? "error" : type,
|
|
74
75
|
"data-qa-alert": "",
|
|
75
76
|
"data-qa-alert-type": type,
|
|
76
77
|
"data-qa-alert-text": text // $FlowIssue - upgrade v0.112.0
|
package/lib/Banner/styles.js
CHANGED
|
@@ -4,6 +4,6 @@ var Container = styled.div.withConfig({
|
|
|
4
4
|
displayName: "styles__Container",
|
|
5
5
|
componentId: "q43dr4-0"
|
|
6
6
|
})(function (props) {
|
|
7
|
-
return css(["display:flex;overflow:hidden;align-items:center;justify-content:space-between;color:", ";border-radius:", ";font-family:", ";", " padding:", ";border:1px solid ", ";background-color:", ";.Icon{align-self:flex-start;margin-top:3px;margin-right:", ";min-width:16px;color:", ";}a,button{font-weight:", ";color:", ";font-size:inherit;text-decoration:underline;}> span:not(.Icon){display:block;}", " ", ""], props.theme.colors.text.
|
|
7
|
+
return css(["display:flex;overflow:hidden;align-items:center;justify-content:space-between;color:", ";border-radius:", ";font-family:", ";", " padding:", ";border:1px solid ", ";background-color:", ";.Icon{align-self:flex-start;margin-top:3px;margin-right:", ";min-width:16px;color:", ";}a,button{font-weight:", ";color:", ";font-size:inherit;&:hover{color:", ";text-decoration:underline;}}> span:not(.Icon){display:block;}", " ", ""], props.theme.colors.text.body, props.theme.radii.outer, props.theme.fontFamily, props.theme.typography[200], props.theme.space[300], props.theme.colors.container.border[props.type], props.theme.colors.container.background[props.type], props.theme.space[400], props.theme.colors.icon[props.type], props.theme.fontWeights.semibold, props.theme.colors.text.body, props.theme.colors.text.body, COMMON, LAYOUT);
|
|
8
8
|
});
|
|
9
9
|
export default Container;
|
package/lib/Button/index.js
CHANGED
|
@@ -8,7 +8,7 @@ import Container from "./styles";
|
|
|
8
8
|
var Button = function Button(_ref) {
|
|
9
9
|
var href = _ref.href,
|
|
10
10
|
_ref$appearance = _ref.appearance,
|
|
11
|
-
appearance = _ref$appearance === void 0 ? "
|
|
11
|
+
appearance = _ref$appearance === void 0 ? "unstyled" : _ref$appearance,
|
|
12
12
|
_ref$active = _ref.active,
|
|
13
13
|
active = _ref$active === void 0 ? false : _ref$active,
|
|
14
14
|
disabled = _ref.disabled,
|
|
@@ -27,8 +27,10 @@ var Button = function Button(_ref) {
|
|
|
27
27
|
|
|
28
28
|
if (!href && external) {
|
|
29
29
|
console.warn("Warning: external prop cannot be set without a href declaration");
|
|
30
|
-
}
|
|
30
|
+
} // plans to properly deprecate captured in DS-1096
|
|
31
31
|
|
|
32
|
+
|
|
33
|
+
var appearanceCheck = appearance === "default" ? "unstyled" : appearance;
|
|
32
34
|
return /*#__PURE__*/React.createElement(Container, _extends({
|
|
33
35
|
title: title,
|
|
34
36
|
active: active,
|
|
@@ -40,7 +42,7 @@ var Button = function Button(_ref) {
|
|
|
40
42
|
"aria-disabled": disabled ? disabled : undefined,
|
|
41
43
|
disabled: disabled,
|
|
42
44
|
buttonSize: size,
|
|
43
|
-
appearance:
|
|
45
|
+
appearance: appearanceCheck,
|
|
44
46
|
ref: innerRef,
|
|
45
47
|
onClick: onClick,
|
|
46
48
|
"data-qa-button": title || "",
|
package/lib/Button/styles.js
CHANGED
|
@@ -8,15 +8,15 @@ var Container = styled.button.withConfig({
|
|
|
8
8
|
})(["display:inline-block;box-sizing:border-box;text-align:center;font-family:", ";border:1px solid ", ";border-radius:", ";border-style:", ";background:", ";color:", ";cursor:pointer;text-decoration:none;line-height:16px;white-space:nowrap;font-weight:", ";transition:all ", " linear;margin:0;padding:", ";font-size:", ";&:visited{color:", ";}&:hover{color:", ";background:", ";text-decoration:none;box-shadow:", ";}&:active{color:", ";background:", ";transform:translateY(1px);}&:focus{", "}&:focus:active{box-shadow:none;}", " ", " ", " ", "{vertical-align:text-bottom;}", " ", ""], function (props) {
|
|
9
9
|
return props.theme.fontFamily;
|
|
10
10
|
}, function (props) {
|
|
11
|
-
return props.theme.colors.
|
|
11
|
+
return props.theme.colors.button[props.appearance].border.base;
|
|
12
12
|
}, function (props) {
|
|
13
13
|
return props.theme.radii[500];
|
|
14
14
|
}, function (props) {
|
|
15
15
|
return props.appearance === "placeholder" ? "dashed" : "solid";
|
|
16
16
|
}, function (props) {
|
|
17
|
-
return props.theme.colors.
|
|
17
|
+
return props.theme.colors.button[props.appearance].background.base;
|
|
18
18
|
}, function (props) {
|
|
19
|
-
return props.theme.colors.
|
|
19
|
+
return props.theme.colors.button[props.appearance].text.base;
|
|
20
20
|
}, function (props) {
|
|
21
21
|
return props.theme.fontWeights.bold;
|
|
22
22
|
}, function (props) {
|
|
@@ -26,22 +26,22 @@ var Container = styled.button.withConfig({
|
|
|
26
26
|
}, function (props) {
|
|
27
27
|
return props.buttonSize === "default" ? props.theme.typography[200].fontSize : props.theme.typography[300].fontSize;
|
|
28
28
|
}, function (props) {
|
|
29
|
-
return props.theme.colors.
|
|
29
|
+
return props.theme.colors.button[props.appearance].text.base;
|
|
30
30
|
}, function (props) {
|
|
31
|
-
return props.theme.colors.
|
|
31
|
+
return props.theme.colors.button[props.appearance].text.hover;
|
|
32
32
|
}, function (props) {
|
|
33
|
-
return props.theme.colors.
|
|
33
|
+
return props.theme.colors.button[props.appearance].background.hover;
|
|
34
34
|
}, function (props) {
|
|
35
35
|
return props.appearance === "placeholder" ? props.theme.shadows[100] : "none";
|
|
36
36
|
}, function (props) {
|
|
37
|
-
return props.theme.colors.
|
|
37
|
+
return props.theme.colors.button[props.appearance].text.hover;
|
|
38
38
|
}, function (props) {
|
|
39
|
-
return props.theme.colors.
|
|
39
|
+
return props.theme.colors.button[props.appearance].background.active;
|
|
40
40
|
}, focusRing, function (props) {
|
|
41
|
-
return props.active && css(["color:", " !important;background:", " !important;"], props.theme.colors.
|
|
41
|
+
return props.active && css(["color:", " !important;background:", " !important;"], props.theme.colors.button[props.appearance].text.hover, props.theme.colors.button[props.appearance].background.active);
|
|
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:
|
|
45
|
+
return props.appearance === "pill" && css(["display:inline-flex;align-items:center;justify-content:center;mix-blend-mode:", ";", ""], props.theme.mode ? "screen" : "multiply", pill);
|
|
46
46
|
}, Icon, LAYOUT, COMMON);
|
|
47
|
-
export default Container;
|
|
47
|
+
export default Container; //${props.theme.mode === "dark" ? "screen" : "multiply"}
|