@sproutsocial/racine 21.1.0 → 22.0.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 (195) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/commonjs/Badge/styles.js +2 -2
  3. package/commonjs/Banner/styles.js +2 -2
  4. package/commonjs/Box/styles.js +2 -2
  5. package/commonjs/Button/styles.js +6 -6
  6. package/commonjs/Card/styles.js +4 -4
  7. package/commonjs/Card/utils.js +2 -2
  8. package/commonjs/CharacterCounter/styles.js +2 -2
  9. package/commonjs/ChartLegend/styles.js +3 -3
  10. package/commonjs/Checkbox/styles.js +6 -6
  11. package/commonjs/DatePicker/styles.js +2 -2
  12. package/commonjs/Drawer/styles.js +2 -2
  13. package/commonjs/FormField/FormField.js +3 -3
  14. package/commonjs/Icon/styles.js +2 -2
  15. package/commonjs/Image/styles.js +2 -2
  16. package/commonjs/Indicator/styles.js +3 -3
  17. package/commonjs/Input/Input.js +2 -2
  18. package/commonjs/Input/styles.js +4 -4
  19. package/commonjs/KeyboardKey/styles.js +2 -2
  20. package/commonjs/Link/styles.js +5 -5
  21. package/commonjs/Loader/styles.js +4 -4
  22. package/commonjs/Menu/Menu.js +4 -4
  23. package/commonjs/Menu/styles.js +3 -3
  24. package/commonjs/Message/styles.js +3 -3
  25. package/commonjs/Modal/styles.js +2 -2
  26. package/commonjs/PartnerLogo/styles.js +2 -2
  27. package/commonjs/Popout/Popout.js +2 -2
  28. package/commonjs/Popout/styles.js +2 -2
  29. package/commonjs/Portal/Portal.js +4 -4
  30. package/commonjs/Radio/styles.js +5 -5
  31. package/commonjs/SegmentedControl/styles.js +4 -4
  32. package/commonjs/Select/styles.js +4 -4
  33. package/commonjs/Switch/styles.js +2 -2
  34. package/commonjs/Table/styles.js +2 -2
  35. package/commonjs/TableCell/styles.js +2 -2
  36. package/commonjs/TableHeaderCell/styles.js +2 -2
  37. package/commonjs/TableRowAccordion/styles.js +2 -2
  38. package/commonjs/Tabs/styles.js +2 -2
  39. package/commonjs/Text/styles.js +2 -2
  40. package/commonjs/Textarea/styles.js +4 -4
  41. package/commonjs/ThemeProvider/index.js +2 -3
  42. package/commonjs/ToggleHint/styles.js +4 -4
  43. package/commonjs/Token/Token.js +2 -2
  44. package/commonjs/Token/styles.js +4 -4
  45. package/commonjs/TokenInput/styles.js +4 -4
  46. package/commonjs/VisuallyHidden/VisuallyHidden.js +2 -2
  47. package/commonjs/index.js +37 -68
  48. package/commonjs/types/index.js +4 -15
  49. package/commonjs/utils/hooks.js +2 -2
  50. package/commonjs/utils/mixins.js +3 -4
  51. package/commonjs/utils/react-testing-library.js +2 -2
  52. package/commonjs/utils/responsiveProps/index.js +2 -3
  53. package/dist/types/Badge/BadgeTypes.d.ts +1 -1
  54. package/dist/types/Badge/BadgeTypes.d.ts.map +1 -1
  55. package/dist/types/Banner/BannerTypes.d.ts +1 -1
  56. package/dist/types/Banner/BannerTypes.d.ts.map +1 -1
  57. package/dist/types/Box/BoxTypes.d.ts +1 -1
  58. package/dist/types/Box/BoxTypes.d.ts.map +1 -1
  59. package/dist/types/Breadcrumb/BreadcrumbTypes.d.ts +1 -1
  60. package/dist/types/Breadcrumb/BreadcrumbTypes.d.ts.map +1 -1
  61. package/dist/types/Button/ButtonTypes.d.ts +1 -1
  62. package/dist/types/Button/ButtonTypes.d.ts.map +1 -1
  63. package/dist/types/CharacterCounter/CharacterCounterTypes.d.ts +1 -1
  64. package/dist/types/CharacterCounter/CharacterCounterTypes.d.ts.map +1 -1
  65. package/dist/types/ChartLegend/ChartLegendTypes.d.ts +1 -1
  66. package/dist/types/ChartLegend/ChartLegendTypes.d.ts.map +1 -1
  67. package/dist/types/ChartLegend/styles.d.ts +1 -1
  68. package/dist/types/ChartLegend/styles.d.ts.map +1 -1
  69. package/dist/types/Checkbox/CheckboxTypes.d.ts +1 -1
  70. package/dist/types/Checkbox/CheckboxTypes.d.ts.map +1 -1
  71. package/dist/types/Drawer/DrawerTypes.d.ts +1 -1
  72. package/dist/types/Drawer/DrawerTypes.d.ts.map +1 -1
  73. package/dist/types/Drawer/styles.d.ts +1 -1
  74. package/dist/types/Drawer/styles.d.ts.map +1 -1
  75. package/dist/types/Icon/IconTypes.d.ts +1 -1
  76. package/dist/types/Icon/IconTypes.d.ts.map +1 -1
  77. package/dist/types/Image/ImageTypes.d.ts +1 -1
  78. package/dist/types/Image/ImageTypes.d.ts.map +1 -1
  79. package/dist/types/Indicator/IndicatorTypes.d.ts +1 -1
  80. package/dist/types/Indicator/IndicatorTypes.d.ts.map +1 -1
  81. package/dist/types/Input/InputTypes.d.ts +1 -1
  82. package/dist/types/Input/InputTypes.d.ts.map +1 -1
  83. package/dist/types/KeyboardKey/KeyboardKeyTypes.d.ts +1 -1
  84. package/dist/types/KeyboardKey/KeyboardKeyTypes.d.ts.map +1 -1
  85. package/dist/types/Link/LinkTypes.d.ts +1 -1
  86. package/dist/types/Link/LinkTypes.d.ts.map +1 -1
  87. package/dist/types/Listbox/Listbox.d.ts +1 -1
  88. package/dist/types/Loader/LoaderTypes.d.ts +1 -1
  89. package/dist/types/Loader/LoaderTypes.d.ts.map +1 -1
  90. package/dist/types/PartnerLogo/PartnerLogoTypes.d.ts +1 -1
  91. package/dist/types/PartnerLogo/PartnerLogoTypes.d.ts.map +1 -1
  92. package/dist/types/Popout/PopoutTypes.d.ts +1 -1
  93. package/dist/types/Popout/PopoutTypes.d.ts.map +1 -1
  94. package/dist/types/Radio/RadioTypes.d.ts +1 -1
  95. package/dist/types/Radio/RadioTypes.d.ts.map +1 -1
  96. package/dist/types/Select/SelectTypes.d.ts +2 -2
  97. package/dist/types/Select/SelectTypes.d.ts.map +1 -1
  98. package/dist/types/Stack/StackTypes.d.ts +1 -1
  99. package/dist/types/Stack/StackTypes.d.ts.map +1 -1
  100. package/dist/types/Table/TableTypes.d.ts +1 -1
  101. package/dist/types/Table/TableTypes.d.ts.map +1 -1
  102. package/dist/types/TableCell/TableCellTypes.d.ts +1 -1
  103. package/dist/types/TableCell/TableCellTypes.d.ts.map +1 -1
  104. package/dist/types/TableRowAccordion/TableRowAccordionTypes.d.ts +1 -1
  105. package/dist/types/TableRowAccordion/TableRowAccordionTypes.d.ts.map +1 -1
  106. package/dist/types/Tabs/TabsTypes.d.ts +1 -1
  107. package/dist/types/Tabs/TabsTypes.d.ts.map +1 -1
  108. package/dist/types/Text/TextTypes.d.ts +1 -1
  109. package/dist/types/Text/TextTypes.d.ts.map +1 -1
  110. package/dist/types/Textarea/TextareaTypes.d.ts +1 -1
  111. package/dist/types/Textarea/TextareaTypes.d.ts.map +1 -1
  112. package/dist/types/ThemeProvider/index.d.ts +1 -1
  113. package/dist/types/ThemeProvider/index.d.ts.map +1 -1
  114. package/dist/types/Toast/ToastTypes.d.ts +1 -1
  115. package/dist/types/Toast/ToastTypes.d.ts.map +1 -1
  116. package/dist/types/Toast/styles.d.ts +1 -1
  117. package/dist/types/Toast/styles.d.ts.map +1 -1
  118. package/dist/types/ToggleHint/ToggleHintTypes.d.ts +1 -1
  119. package/dist/types/ToggleHint/ToggleHintTypes.d.ts.map +1 -1
  120. package/dist/types/Token/TokenTypes.d.ts +1 -1
  121. package/dist/types/Token/TokenTypes.d.ts.map +1 -1
  122. package/dist/types/TokenInput/TokenInputTypes.d.ts +1 -1
  123. package/dist/types/TokenInput/TokenInputTypes.d.ts.map +1 -1
  124. package/dist/types/index.d.ts +5 -10
  125. package/dist/types/index.d.ts.map +1 -1
  126. package/dist/types/systemProps/index.d.ts +1 -1
  127. package/dist/types/systemProps/index.d.ts.map +1 -1
  128. package/dist/types/types/index.d.ts +1 -2
  129. package/dist/types/types/index.d.ts.map +1 -1
  130. package/dist/types/types/styled-components.d.ts +1 -1
  131. package/dist/types/types/styled-components.d.ts.map +1 -1
  132. package/dist/types/types/system-props.d.ts +28 -1
  133. package/dist/types/types/system-props.d.ts.map +1 -1
  134. package/dist/types/utils/responsiveProps/index.d.ts +1 -1
  135. package/dist/types/utils/responsiveProps/index.d.ts.map +1 -1
  136. package/lib/Badge/styles.js +1 -1
  137. package/lib/Banner/styles.js +1 -1
  138. package/lib/Box/styles.js +1 -1
  139. package/lib/Button/styles.js +2 -2
  140. package/lib/Card/styles.js +1 -1
  141. package/lib/Card/utils.js +1 -1
  142. package/lib/CharacterCounter/styles.js +1 -1
  143. package/lib/ChartLegend/styles.js +1 -1
  144. package/lib/Checkbox/styles.js +2 -2
  145. package/lib/DatePicker/styles.js +1 -1
  146. package/lib/Drawer/styles.js +1 -1
  147. package/lib/FormField/FormField.js +1 -1
  148. package/lib/Icon/styles.js +1 -1
  149. package/lib/Image/styles.js +1 -1
  150. package/lib/Indicator/styles.js +2 -2
  151. package/lib/Input/Input.js +1 -1
  152. package/lib/Input/styles.js +2 -2
  153. package/lib/KeyboardKey/styles.js +1 -1
  154. package/lib/Link/styles.js +2 -2
  155. package/lib/Loader/styles.js +2 -2
  156. package/lib/Menu/Menu.js +2 -2
  157. package/lib/Menu/styles.js +1 -1
  158. package/lib/Message/styles.js +1 -1
  159. package/lib/Modal/styles.js +1 -1
  160. package/lib/PartnerLogo/styles.js +1 -1
  161. package/lib/Popout/Popout.js +1 -1
  162. package/lib/Popout/styles.js +1 -1
  163. package/lib/Portal/Portal.js +1 -1
  164. package/lib/Radio/styles.js +2 -2
  165. package/lib/SegmentedControl/styles.js +1 -1
  166. package/lib/Select/styles.js +2 -2
  167. package/lib/Switch/styles.js +1 -1
  168. package/lib/Table/styles.js +1 -1
  169. package/lib/TableCell/styles.js +1 -1
  170. package/lib/TableHeaderCell/styles.js +1 -1
  171. package/lib/TableRowAccordion/styles.js +1 -1
  172. package/lib/Tabs/styles.js +1 -1
  173. package/lib/Text/styles.js +1 -1
  174. package/lib/Textarea/styles.js +2 -2
  175. package/lib/ThemeProvider/index.js +1 -1
  176. package/lib/ToggleHint/styles.js +2 -2
  177. package/lib/Token/Token.js +1 -1
  178. package/lib/Token/styles.js +2 -2
  179. package/lib/TokenInput/styles.js +2 -2
  180. package/lib/VisuallyHidden/VisuallyHidden.js +1 -1
  181. package/lib/index.js +5 -9
  182. package/lib/types/index.js +1 -2
  183. package/lib/utils/hooks.js +1 -1
  184. package/lib/utils/mixins.js +1 -1
  185. package/lib/utils/react-testing-library.js +1 -1
  186. package/lib/utils/responsiveProps/index.js +1 -1
  187. package/package.json +16 -1
  188. package/dist/themes/dark/_themed.scss +0 -119
  189. package/dist/themes/dark/theme.scss +0 -684
  190. package/dist/themes/extendedThemes/sproutTheme/dark/_themed.scss +0 -119
  191. package/dist/themes/extendedThemes/sproutTheme/dark/theme.scss +0 -1097
  192. package/dist/themes/extendedThemes/sproutTheme/light/_themed.scss +0 -119
  193. package/dist/themes/extendedThemes/sproutTheme/light/theme.scss +0 -1097
  194. package/dist/themes/light/_themed.scss +0 -119
  195. package/dist/themes/light/theme.scss +0 -806
@@ -6,7 +6,7 @@ import React from "react";
6
6
  import styled, { createGlobalStyle } from "styled-components";
7
7
  import { width, zIndex } from "styled-system";
8
8
  import ReactModal from "react-modal";
9
- import { COMMON } from "../utils/system-props";
9
+ import { COMMON } from "@sproutsocial/seeds-react-system-props";
10
10
  import Box from "../Box";
11
11
 
12
12
  // This is the max space allowed between the modal and the edge of the browser
@@ -1,6 +1,6 @@
1
1
  import styled, { css } from "styled-components";
2
2
  import { verticalAlign } from "styled-system";
3
- import { COMMON, FLEXBOX } from "../utils/system-props";
3
+ import { COMMON, FLEXBOX } from "@sproutsocial/seeds-react-system-props";
4
4
  var sizes = {
5
5
  mini: "12px",
6
6
  small: "16px",
@@ -22,7 +22,7 @@ import { useTransition, animated } from "react-spring";
22
22
  import FocusLock from "react-focus-lock";
23
23
  import { Popper } from "react-popper";
24
24
  import { MOTION_DURATION_FAST } from "@sproutsocial/seeds-motion/dist/seeds-motion-unitless";
25
- import { useMutationObserver } from "../utils/hooks";
25
+ import { useMutationObserver } from "@sproutsocial/seeds-react-hooks";
26
26
  import Portal from "../Portal";
27
27
  import Box from "../Box";
28
28
  import { TargetWrapper } from "./styles";
@@ -1,5 +1,5 @@
1
1
  import styled from "styled-components";
2
- import { COMMON, LAYOUT } from "../utils/system-props";
2
+ import { COMMON, LAYOUT } from "@sproutsocial/seeds-react-system-props";
3
3
  export var TargetWrapper = styled.div.withConfig({
4
4
  displayName: "styles__TargetWrapper",
5
5
  componentId: "sc-pftzv7-0"
@@ -14,7 +14,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
14
14
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
15
15
  import * as React from "react";
16
16
  import { createPortal } from "react-dom";
17
- import { canUseDOM } from "../utils";
17
+ import { canUseDOM } from "@sproutsocial/seeds-react-utilities";
18
18
  var Portal = /*#__PURE__*/function (_React$Component) {
19
19
  _inherits(Portal, _React$Component);
20
20
  function Portal(props) {
@@ -1,6 +1,6 @@
1
1
  import styled, { css } from "styled-components";
2
- import { focusRing, disabled } from "../utils/mixins";
3
- import { COMMON } from "../utils/system-props";
2
+ import { COMMON } from "@sproutsocial/seeds-react-system-props";
3
+ import { focusRing, disabled } from "@sproutsocial/seeds-react-mixins";
4
4
  import Text from "../Text";
5
5
  var Container = styled.span.withConfig({
6
6
  displayName: "styles__Container",
@@ -1,5 +1,5 @@
1
1
  import styled, { css } from "styled-components";
2
- import { visuallyHidden, focusRing, disabled } from "../utils/mixins";
2
+ import { visuallyHidden, focusRing, disabled } from "@sproutsocial/seeds-react-mixins";
3
3
  import Box from "../Box";
4
4
  import Text from "../Text";
5
5
  export var SegmentedControlContainer = styled(Box).withConfig({
@@ -1,6 +1,6 @@
1
1
  import styled, { css } from "styled-components";
2
- import { focusRing } from "../utils/mixins";
3
- import { COMMON } from "../utils/system-props";
2
+ import { focusRing } from "@sproutsocial/seeds-react-mixins";
3
+ import { COMMON } from "@sproutsocial/seeds-react-system-props";
4
4
  var Container = styled.div.withConfig({
5
5
  displayName: "styles__Container",
6
6
  componentId: "sc-egruk2-0"
@@ -1,5 +1,5 @@
1
1
  import styled, { keyframes } from "styled-components";
2
- import { focusRing } from "../utils/mixins";
2
+ import { focusRing } from "@sproutsocial/seeds-react-mixins";
3
3
  import { color, layout, space } from "styled-system";
4
4
  var loadingKeyFrame = keyframes(["0%{transform:rotate(0deg);}100%{transform:rotate(360deg);}"]);
5
5
  export var StyledSwitchButton = styled.button.withConfig({
@@ -1,5 +1,5 @@
1
1
  import styled from "styled-components";
2
- import { COMMON } from "../utils/system-props";
2
+ import { COMMON } from "@sproutsocial/seeds-react-system-props";
3
3
  var Container = styled.table.withConfig({
4
4
  displayName: "styles__Container",
5
5
  componentId: "sc-ddi9em-0"
@@ -1,5 +1,5 @@
1
1
  import styled from "styled-components";
2
- import { COMMON } from "../utils/system-props";
2
+ import { COMMON } from "@sproutsocial/seeds-react-system-props";
3
3
  var Container = styled.td.withConfig({
4
4
  displayName: "styles__Container",
5
5
  componentId: "sc-1k0c6fx-0"
@@ -1,5 +1,5 @@
1
1
  import styled, { css } from "styled-components";
2
- import { COMMON } from "../utils/system-props";
2
+ import { COMMON } from "@sproutsocial/seeds-react-system-props";
3
3
  var Container = styled.th.withConfig({
4
4
  displayName: "styles__Container",
5
5
  componentId: "sc-fjeapu-0"
@@ -1,5 +1,5 @@
1
1
  import styled, { css } from "styled-components";
2
- import { COMMON } from "../utils/system-props";
2
+ import { COMMON } from "@sproutsocial/seeds-react-system-props";
3
3
  var Container = styled.tbody.withConfig({
4
4
  displayName: "styles__Container",
5
5
  componentId: "sc-1s8pba9-0"
@@ -1,5 +1,5 @@
1
1
  import styled, { css } from "styled-components";
2
- import { COMMON } from "../utils/system-props";
2
+ import { COMMON } from "@sproutsocial/seeds-react-system-props";
3
3
  import Button from "../Button";
4
4
  var Container = styled.ul.withConfig({
5
5
  displayName: "styles__Container",
@@ -1,5 +1,5 @@
1
1
  import styled, { css } from "styled-components";
2
- import { COMMON, LAYOUT, FLEXBOX, GRID, TYPOGRAPHY } from "../utils/system-props";
2
+ import { COMMON, LAYOUT, FLEXBOX, GRID, TYPOGRAPHY } from "@sproutsocial/seeds-react-system-props";
3
3
  var Container = styled.span.withConfig({
4
4
  displayName: "styles__Container",
5
5
  componentId: "sc-99cuku-0"
@@ -1,6 +1,6 @@
1
1
  import styled, { css } from "styled-components";
2
- import { focusRing } from "../utils/mixins";
3
- import { COMMON } from "../utils/system-props";
2
+ import { COMMON } from "@sproutsocial/seeds-react-system-props";
3
+ import { focusRing } from "@sproutsocial/seeds-react-mixins";
4
4
  var Container = styled.div.withConfig({
5
5
  displayName: "styles__Container",
6
6
  componentId: "sc-12lw4hd-0"
@@ -1,7 +1,7 @@
1
1
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
2
  import * as React from "react";
3
3
  import { ThemeProvider as BaseThemeProvider } from "styled-components";
4
- import theme from "../themes/light/theme";
4
+ import { theme } from "@sproutsocial/seeds-react-theme";
5
5
 
6
6
  // We can append additional themes types here
7
7
 
@@ -1,6 +1,6 @@
1
1
  import styled, { css } from "styled-components";
2
- import { visuallyHidden } from "../utils/mixins";
3
- import { COMMON } from "../utils/system-props";
2
+ import { COMMON } from "@sproutsocial/seeds-react-system-props";
3
+ import { visuallyHidden } from "@sproutsocial/seeds-react-mixins";
4
4
  var Container = styled.div.withConfig({
5
5
  displayName: "styles__Container",
6
6
  componentId: "sc-10oduzm-0"
@@ -3,7 +3,7 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
3
3
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
4
4
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
5
5
  import * as React from "react";
6
- import { useTextContent } from "../utils/hooks";
6
+ import { useTextContent } from "@sproutsocial/seeds-react-hooks";
7
7
  import Box from "../Box";
8
8
  import Icon from "../Icon";
9
9
  import { VisuallyHidden } from "../VisuallyHidden";
@@ -1,6 +1,6 @@
1
1
  import styled, { css } from "styled-components";
2
- import { focusRing } from "../utils/mixins";
3
- import { COMMON } from "../utils/system-props";
2
+ import { COMMON } from "@sproutsocial/seeds-react-system-props";
3
+ import { focusRing } from "@sproutsocial/seeds-react-mixins";
4
4
  import { useInteractiveColor } from "../utils/useInteractiveColor";
5
5
  var Container = styled.button.withConfig({
6
6
  displayName: "styles__Container",
@@ -1,6 +1,6 @@
1
1
  import styled, { css } from "styled-components";
2
- import { focusRing } from "../utils/mixins";
3
- import { COMMON } from "../utils/system-props";
2
+ import { COMMON } from "@sproutsocial/seeds-react-system-props";
3
+ import { focusRing } from "@sproutsocial/seeds-react-mixins";
4
4
  var Container = styled.div.withConfig({
5
5
  displayName: "styles__Container",
6
6
  componentId: "sc-18dw7or-0"
@@ -1,5 +1,5 @@
1
1
  import styled from "styled-components";
2
- import { visuallyHidden } from "../utils/mixins";
2
+ import { visuallyHidden } from "@sproutsocial/seeds-react-mixins";
3
3
  export var VisuallyHidden = styled.span.withConfig({
4
4
  displayName: "VisuallyHidden",
5
5
  componentId: "sc-19792f6-0"
package/lib/index.js CHANGED
@@ -5,22 +5,18 @@ export { LogoNamesWithoutVariants as PartnerLogoNames } from "@sproutsocial/seed
5
5
 
6
6
  /* Theme and related types */
7
7
  export * from "./systemProps";
8
- export { default as theme } from "./themes/light/theme";
9
- export { default as darkTheme } from "./themes/dark/theme";
10
- export { sproutLightTheme, sproutDarkTheme } from "./themes/extendedThemes/sproutTheme";
11
- export { default as ThemeProvider } from "./ThemeProvider";
8
+ export * from "@sproutsocial/seeds-react-theme";
9
+ export { default as ThemeProvider } from "@sproutsocial/seeds-react-theme-provider";
12
10
 
13
11
  /* Utilities and related types */
14
- export { useSelect, useMultiselect, useTextContent } from "./utils/hooks";
15
- export { visuallyHidden, focusRing, disabled } from "./utils/mixins";
16
- export { useInteractiveColor } from "./utils/useInteractiveColor";
17
- export { useMeasure } from "./utils/use-measure";
12
+ export { useSelect, useMultiselect, useTextContent, useMeasure, useInteractiveColor } from "@sproutsocial/seeds-react-hooks";
13
+ export * from "@sproutsocial/seeds-react-mixins";
18
14
 
19
15
  /* Components */
20
16
  export * from "./Avatar";
21
17
  export * from "./Badge";
22
18
  export * from "./Banner";
23
- export * from "./Box";
19
+ export * from "@sproutsocial/seeds-react-box";
24
20
  export * from "./Breadcrumb";
25
21
  export * from "./Button";
26
22
  export * from "./Card";
@@ -1,5 +1,4 @@
1
1
  export * from "./shared";
2
2
  export * from "./styled-components";
3
3
  export * from "./system-props";
4
- export * from "./theme";
5
- export * from "./theme.colors";
4
+ export * from "@sproutsocial/seeds-react-theme";
@@ -13,7 +13,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
13
13
  function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
14
14
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
15
15
  import { useState, useCallback, useEffect, useMemo, useReducer, useRef } from "react";
16
- import { canUseDOM } from "./";
16
+ import { canUseDOM } from "@sproutsocial/seeds-react-utilities";
17
17
  export function useTextContent(initial) {
18
18
  var _useState = useState(initial),
19
19
  _useState2 = _slicedToArray(_useState, 2),
@@ -1,6 +1,6 @@
1
1
  import { transparentize } from "polished";
2
2
  import { css } from "styled-components";
3
- import theme from "../themes/light/theme";
3
+ import { theme } from "@sproutsocial/seeds-react-theme";
4
4
  export var svgToDataURL = function svgToDataURL(svgStr) {
5
5
  var encoded = encodeURIComponent(svgStr).replace(/'/g, "%27").replace(/"/g, "%22");
6
6
  var header = "data:image/svg+xml,";
@@ -10,7 +10,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
10
10
  import { act, cleanup, createEvent, fireEvent, queries, render, screen as defaultScreen, waitFor, waitForElementToBeRemoved, within } from "@testing-library/react";
11
11
  import userEvent from "@testing-library/user-event";
12
12
  import ThemeProvider from "../ThemeProvider";
13
- import { a11yCheck } from "./a11yTest";
13
+ import { a11yCheck } from "@sproutsocial/seeds-react-utilities";
14
14
  import { dataQaLabelQueries } from "./dataQaLabelQueries";
15
15
  var sproutQueries = _objectSpread(_objectSpread({}, queries), dataQaLabelQueries);
16
16
 
@@ -5,7 +5,7 @@ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symb
5
5
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
6
6
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
7
7
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
8
- import theme from "../../themes/light/theme";
8
+ import { theme } from "@sproutsocial/seeds-react-theme";
9
9
  var breakpoints = theme.breakpoints;
10
10
  var LENGTH = breakpoints.length + 1;
11
11
  export var normalizeResponsiveProp = function normalizeResponsiveProp(value) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sproutsocial/racine",
3
- "version": "21.1.0",
3
+ "version": "22.0.0",
4
4
  "license": "MIT",
5
5
  "engines": {
6
6
  "node": ">=18"
@@ -100,6 +100,13 @@
100
100
  "@sproutsocial/seeds-space": "*",
101
101
  "@sproutsocial/seeds-tsconfig": "*",
102
102
  "@sproutsocial/seeds-typography": "*",
103
+ "@sproutsocial/seeds-react-box": "*",
104
+ "@sproutsocial/seeds-react-hooks": "*",
105
+ "@sproutsocial/seeds-react-mixins": "*",
106
+ "@sproutsocial/seeds-react-system-props": "*",
107
+ "@sproutsocial/seeds-react-theme-provider": "*",
108
+ "@sproutsocial/seeds-react-theme": "*",
109
+ "@sproutsocial/seeds-react-utilities": "*",
103
110
  "@storybook/addon-a11y": "^7.0.0",
104
111
  "@storybook/addon-actions": "^7.0.0",
105
112
  "@storybook/addon-essentials": "^7.0.0",
@@ -155,6 +162,7 @@
155
162
  "jsdom": "^22.1.0",
156
163
  "json-to-scss": "^1.6.2",
157
164
  "moment": "^2.29.4",
165
+ "mkdirp": "1.0.4",
158
166
  "npm-run-all": "^4.1.2",
159
167
  "outdent": "^0.7.0",
160
168
  "pify": "^4.0.1",
@@ -186,6 +194,13 @@
186
194
  "@sproutsocial/seeds-typography": ">=2.0.0",
187
195
  "@sproutsocial/seeds-partner-logos": ">=1.5.0",
188
196
  "@sproutsocial/seeds-illustrations": ">=1.3.0",
197
+ "@sproutsocial/seeds-react-box": "^1.0.0",
198
+ "@sproutsocial/seeds-react-hooks": "^2.0.0",
199
+ "@sproutsocial/seeds-react-mixins": "^2.0.0",
200
+ "@sproutsocial/seeds-react-system-props": "^2.0.0",
201
+ "@sproutsocial/seeds-react-theme-provider": "^1.0.0",
202
+ "@sproutsocial/seeds-react-theme": "^1.0.0",
203
+ "@sproutsocial/seeds-react-utilities": "^2.0.0",
189
204
  "moment": "^2.29.4",
190
205
  "prop-types": "^15.0.0",
191
206
  "react": "^16.8.0 || ^17.0.0",
@@ -1,119 +0,0 @@
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
- // theme.scss is auto-generated based on the JS theme file, ensuring our SCSS theme variables stay in sync.
6
- // _themed.scss will be copied to each theme folder in /dist, where the theme.scss file for that theme will be.
7
- @import "./theme.scss";
8
-
9
- // In the JS theme file, the theme object is exported as "default" (i.e., using "export default"),
10
- // so we need to map-get "default" to access it.
11
- $theme: map-get($theme, "default");
12
-
13
- // FUNCTIONS
14
- // This function will allow you to get any value from the theme.
15
- // @param {string} $key - the period-separated path to the value in the theme object. e.g., "colors.text.body"
16
- @function t($key) {
17
- $keys: _str-split($key, ".");
18
- @return _map-deep-get($theme, $keys);
19
- }
20
-
21
- // The rest of the functions are convenience methods to get theme values for subsets of the theme.
22
- // @param {string} $key - the period-separated path to the value in the theme object, with "colors." omitted. e.g., "text.body"
23
- @function colors($key) {
24
- $keys: _str-split($key, ".");
25
- @return _map-deep-get($theme, join("colors", $keys));
26
- }
27
-
28
- // @param {string} $key - the period-separated path to the value in the theme object, with "typography." omitted. e.g., "100.fontSize"
29
- @function typography($key) {
30
- $keys: _str-split($key, ".");
31
- @return _map-deep-get($theme, join("typography", $keys));
32
- }
33
-
34
- // @param {string} $key - the period-separated path to the value in the theme object, with "fontWeights." omitted. e.g., "normal"
35
- @function fontWeights($key) {
36
- $keys: _str-split($key, ".");
37
- @return _map-deep-get($theme, join("fontWeights", $keys));
38
- }
39
-
40
- // @param {string} $key - the period-separated path to the value in the theme object, with "space." omitted. e.g., "100"
41
- @function space($key) {
42
- $keys: _str-split($key, ".");
43
- @return _map-deep-get($theme, join("space", $keys));
44
- }
45
-
46
- // @param {string} $key - the period-separated path to the value in the theme object, with "radii." omitted. e.g., "inner"
47
- @function radii($key) {
48
- $keys: _str-split($key, ".");
49
- @return _map-deep-get($theme, join("radii", $keys));
50
- }
51
-
52
- // @param {string} $key - the period-separated path to the value in the theme object, with "borders." omitted. e.g., "500"
53
- @function borders($key) {
54
- $keys: _str-split($key, ".");
55
- @return _map-deep-get($theme, join("borders", $keys));
56
- }
57
-
58
- // @param {string} $key - the period-separated path to the value in the theme object, with "borderWidths." omitted. e.g., "500"
59
- @function borderWidths($key) {
60
- $keys: _str-split($key, ".");
61
- @return _map-deep-get($theme, join("borderWidths", $keys));
62
- }
63
-
64
- // @param {string} $key - the period-separated path to the value in the theme object, with "shadows." omitted. e.g., "low"
65
- @function shadows($key) {
66
- $keys: _str-split($key, ".");
67
- @return _map-deep-get($theme, join("shadows", $keys));
68
- }
69
-
70
- // @param {string} $key - the period-separated path to the value in the theme object, with "easing." omitted. e.g., "ease_in"
71
- @function easing($key) {
72
- $keys: _str-split($key, ".");
73
- @return _map-deep-get($theme, join("easing", $keys));
74
- }
75
-
76
- // @param {string} $key - the period-separated path to the value in the theme object, with "duration." omitted. e.g., "fast"
77
- @function duration($key) {
78
- $keys: _str-split($key, ".");
79
- @return _map-deep-get($theme, join("duration", $keys));
80
- }
81
-
82
- // UTILITIES
83
- // Helper functions that power the functions above. Not relevant to the theme.
84
- // If you import this file with @use, these functions will be excluded because they are private.
85
-
86
- // Via https://stackoverflow.com/a/42295154
87
- // Used to split period-separated object keys, e.g. "colors.text.body" => ["colors", "text", "body"]
88
- // Only works with a single-character separator.
89
- @function _str-split($string, $separator) {
90
- // empty array/list
91
- $split-arr: ();
92
- // first index of separator in string
93
- $index: str-index($string, $separator);
94
- // loop through string
95
- @while $index != null {
96
- // get the substring from the first character to the separator
97
- $item: str-slice($string, 1, $index - 1);
98
- // push item to array
99
- $split-arr: append($split-arr, $item);
100
- // remove item and separator from string
101
- $string: str-slice($string, $index + 1);
102
- // find new index of separator
103
- $index: str-index($string, $separator);
104
- }
105
- // add the remaining string to list (the last item)
106
- $split-arr: append($split-arr, $string);
107
-
108
- @return $split-arr;
109
- }
110
-
111
- // Adapted from https://css-tricks.com/snippets/sass/deep-getset-maps/
112
- // Iterates over a list of keys to read multi-level maps.
113
- // e.g., _map-deep-get((colors: (text: (body: "#364141"))), ["colors", "text", "body"]) => "#364141"
114
- @function _map-deep-get($map, $keys) {
115
- @each $key in $keys {
116
- $map: map-get($map, $key);
117
- }
118
- @return $map;
119
- }