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