@sproutsocial/racine 21.1.0 → 22.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +22 -0
- package/README.md +2 -1
- package/commonjs/Badge/styles.js +2 -2
- package/commonjs/Banner/styles.js +2 -2
- package/commonjs/Box/styles.js +2 -2
- package/commonjs/Button/styles.js +8 -7
- package/commonjs/Card/styles.js +4 -4
- package/commonjs/Card/utils.js +2 -2
- package/commonjs/CharacterCounter/styles.js +2 -2
- package/commonjs/ChartLegend/styles.js +3 -3
- package/commonjs/Checkbox/styles.js +6 -6
- package/commonjs/DatePicker/styles.js +2 -2
- package/commonjs/Drawer/styles.js +2 -2
- package/commonjs/FormField/FormField.js +3 -3
- package/commonjs/Icon/styles.js +2 -2
- package/commonjs/Image/styles.js +2 -2
- package/commonjs/Indicator/styles.js +3 -3
- package/commonjs/Input/Input.js +7 -7
- package/commonjs/Input/styles.js +4 -4
- package/commonjs/KeyboardKey/styles.js +2 -2
- package/commonjs/Link/styles.js +5 -5
- package/commonjs/Loader/styles.js +4 -4
- package/commonjs/Menu/Menu.js +13 -8
- package/commonjs/Menu/styles.js +3 -3
- package/commonjs/Message/Message.js +2 -2
- package/commonjs/Message/styles.js +3 -3
- package/commonjs/Modal/styles.js +2 -2
- package/commonjs/PartnerLogo/styles.js +2 -2
- package/commonjs/Popout/Popout.js +2 -2
- package/commonjs/Popout/styles.js +2 -2
- package/commonjs/Portal/Portal.js +4 -4
- package/commonjs/Radio/styles.js +5 -5
- package/commonjs/SegmentedControl/styles.js +4 -4
- package/commonjs/Select/styles.js +4 -4
- package/commonjs/Switch/styles.js +2 -2
- package/commonjs/Table/styles.js +2 -2
- package/commonjs/TableCell/styles.js +2 -2
- package/commonjs/TableHeaderCell/styles.js +2 -2
- package/commonjs/TableRowAccordion/styles.js +2 -2
- package/commonjs/Tabs/styles.js +2 -2
- package/commonjs/Text/styles.js +2 -2
- package/commonjs/Textarea/styles.js +4 -4
- package/commonjs/ThemeProvider/index.js +2 -3
- package/commonjs/ToggleHint/styles.js +4 -4
- package/commonjs/Token/Token.js +2 -2
- package/commonjs/Token/styles.js +4 -4
- package/commonjs/TokenInput/styles.js +4 -4
- package/commonjs/VisuallyHidden/VisuallyHidden.js +2 -2
- package/commonjs/index.js +89 -108
- package/commonjs/types/index.js +4 -15
- package/commonjs/utils/hooks.js +2 -2
- package/commonjs/utils/mixins.js +3 -4
- package/commonjs/utils/react-testing-library.js +2 -2
- package/commonjs/utils/responsiveProps/index.js +2 -3
- package/dist/types/Badge/BadgeTypes.d.ts +1 -1
- package/dist/types/Badge/BadgeTypes.d.ts.map +1 -1
- package/dist/types/Banner/BannerTypes.d.ts +1 -1
- package/dist/types/Banner/BannerTypes.d.ts.map +1 -1
- package/dist/types/Box/BoxTypes.d.ts +1 -1
- package/dist/types/Box/BoxTypes.d.ts.map +1 -1
- package/dist/types/Breadcrumb/BreadcrumbTypes.d.ts +1 -1
- package/dist/types/Breadcrumb/BreadcrumbTypes.d.ts.map +1 -1
- package/dist/types/Button/ButtonTypes.d.ts +1 -1
- package/dist/types/Button/ButtonTypes.d.ts.map +1 -1
- package/dist/types/Button/styles.d.ts.map +1 -1
- package/dist/types/CharacterCounter/CharacterCounterTypes.d.ts +1 -1
- package/dist/types/CharacterCounter/CharacterCounterTypes.d.ts.map +1 -1
- package/dist/types/ChartLegend/ChartLegendTypes.d.ts +1 -1
- package/dist/types/ChartLegend/ChartLegendTypes.d.ts.map +1 -1
- package/dist/types/ChartLegend/styles.d.ts +1 -1
- package/dist/types/ChartLegend/styles.d.ts.map +1 -1
- package/dist/types/Checkbox/CheckboxTypes.d.ts +1 -1
- package/dist/types/Checkbox/CheckboxTypes.d.ts.map +1 -1
- package/dist/types/Drawer/DrawerTypes.d.ts +1 -1
- package/dist/types/Drawer/DrawerTypes.d.ts.map +1 -1
- package/dist/types/Drawer/styles.d.ts +1 -1
- package/dist/types/Drawer/styles.d.ts.map +1 -1
- package/dist/types/Icon/IconTypes.d.ts +1 -1
- package/dist/types/Icon/IconTypes.d.ts.map +1 -1
- package/dist/types/Image/ImageTypes.d.ts +1 -1
- package/dist/types/Image/ImageTypes.d.ts.map +1 -1
- package/dist/types/Indicator/IndicatorTypes.d.ts +1 -1
- package/dist/types/Indicator/IndicatorTypes.d.ts.map +1 -1
- package/dist/types/Input/InputTypes.d.ts +1 -1
- package/dist/types/Input/InputTypes.d.ts.map +1 -1
- package/dist/types/KeyboardKey/KeyboardKeyTypes.d.ts +1 -1
- package/dist/types/KeyboardKey/KeyboardKeyTypes.d.ts.map +1 -1
- package/dist/types/Link/LinkTypes.d.ts +1 -1
- package/dist/types/Link/LinkTypes.d.ts.map +1 -1
- package/dist/types/Listbox/Listbox.d.ts +4 -4
- package/dist/types/Loader/LoaderTypes.d.ts +1 -1
- package/dist/types/Loader/LoaderTypes.d.ts.map +1 -1
- package/dist/types/Menu/Menu.d.ts +2 -2
- package/dist/types/Menu/Menu.d.ts.map +1 -1
- package/dist/types/Message/Message.d.ts +1 -1
- package/dist/types/Message/Message.d.ts.map +1 -1
- package/dist/types/PartnerLogo/PartnerLogoTypes.d.ts +1 -1
- package/dist/types/PartnerLogo/PartnerLogoTypes.d.ts.map +1 -1
- package/dist/types/Popout/PopoutTypes.d.ts +1 -1
- package/dist/types/Popout/PopoutTypes.d.ts.map +1 -1
- package/dist/types/Radio/RadioTypes.d.ts +1 -1
- package/dist/types/Radio/RadioTypes.d.ts.map +1 -1
- package/dist/types/Select/SelectTypes.d.ts +2 -2
- package/dist/types/Select/SelectTypes.d.ts.map +1 -1
- package/dist/types/Stack/StackTypes.d.ts +1 -1
- package/dist/types/Stack/StackTypes.d.ts.map +1 -1
- package/dist/types/Table/TableTypes.d.ts +1 -1
- package/dist/types/Table/TableTypes.d.ts.map +1 -1
- package/dist/types/TableCell/TableCellTypes.d.ts +1 -1
- package/dist/types/TableCell/TableCellTypes.d.ts.map +1 -1
- package/dist/types/TableRowAccordion/TableRowAccordionTypes.d.ts +1 -1
- package/dist/types/TableRowAccordion/TableRowAccordionTypes.d.ts.map +1 -1
- package/dist/types/Tabs/TabsTypes.d.ts +1 -1
- package/dist/types/Tabs/TabsTypes.d.ts.map +1 -1
- package/dist/types/Text/TextTypes.d.ts +1 -1
- package/dist/types/Text/TextTypes.d.ts.map +1 -1
- package/dist/types/Textarea/TextareaTypes.d.ts +1 -1
- package/dist/types/Textarea/TextareaTypes.d.ts.map +1 -1
- package/dist/types/ThemeProvider/index.d.ts +1 -1
- package/dist/types/ThemeProvider/index.d.ts.map +1 -1
- package/dist/types/Toast/ToastTypes.d.ts +1 -1
- package/dist/types/Toast/ToastTypes.d.ts.map +1 -1
- package/dist/types/Toast/styles.d.ts +1 -1
- package/dist/types/Toast/styles.d.ts.map +1 -1
- package/dist/types/ToggleHint/ToggleHintTypes.d.ts +1 -1
- package/dist/types/ToggleHint/ToggleHintTypes.d.ts.map +1 -1
- package/dist/types/Token/TokenTypes.d.ts +1 -1
- package/dist/types/Token/TokenTypes.d.ts.map +1 -1
- package/dist/types/TokenInput/TokenInputTypes.d.ts +1 -1
- package/dist/types/TokenInput/TokenInputTypes.d.ts.map +1 -1
- package/dist/types/index.d.ts +16 -20
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/systemProps/index.d.ts +1 -1
- package/dist/types/systemProps/index.d.ts.map +1 -1
- package/dist/types/types/index.d.ts +1 -2
- package/dist/types/types/index.d.ts.map +1 -1
- package/dist/types/types/styled-components.d.ts +1 -1
- package/dist/types/types/styled-components.d.ts.map +1 -1
- package/dist/types/types/system-props.d.ts +28 -1
- package/dist/types/types/system-props.d.ts.map +1 -1
- package/dist/types/utils/responsiveProps/index.d.ts +1 -1
- package/dist/types/utils/responsiveProps/index.d.ts.map +1 -1
- package/lib/Badge/styles.js +1 -1
- package/lib/Banner/styles.js +1 -1
- package/lib/Box/styles.js +1 -1
- package/lib/Button/styles.js +5 -4
- package/lib/Card/styles.js +1 -1
- package/lib/Card/utils.js +1 -1
- package/lib/CharacterCounter/styles.js +1 -1
- package/lib/ChartLegend/styles.js +1 -1
- package/lib/Checkbox/styles.js +2 -2
- package/lib/DatePicker/styles.js +1 -1
- package/lib/Drawer/styles.js +1 -1
- package/lib/FormField/FormField.js +1 -1
- package/lib/Icon/styles.js +1 -1
- package/lib/Image/styles.js +1 -1
- package/lib/Indicator/styles.js +2 -2
- package/lib/Input/Input.js +3 -3
- package/lib/Input/styles.js +2 -2
- package/lib/KeyboardKey/styles.js +1 -1
- package/lib/Link/styles.js +2 -2
- package/lib/Loader/styles.js +2 -2
- package/lib/Menu/Menu.js +10 -5
- package/lib/Menu/styles.js +1 -1
- package/lib/Message/Message.js +1 -1
- package/lib/Message/styles.js +1 -1
- package/lib/Modal/styles.js +1 -1
- package/lib/PartnerLogo/styles.js +1 -1
- package/lib/Popout/Popout.js +1 -1
- package/lib/Popout/styles.js +1 -1
- package/lib/Portal/Portal.js +1 -1
- package/lib/Radio/styles.js +2 -2
- package/lib/SegmentedControl/styles.js +1 -1
- package/lib/Select/styles.js +2 -2
- package/lib/Switch/styles.js +1 -1
- package/lib/Table/styles.js +1 -1
- package/lib/TableCell/styles.js +1 -1
- package/lib/TableHeaderCell/styles.js +1 -1
- package/lib/TableRowAccordion/styles.js +1 -1
- package/lib/Tabs/styles.js +1 -1
- package/lib/Text/styles.js +1 -1
- package/lib/Textarea/styles.js +2 -2
- package/lib/ThemeProvider/index.js +1 -1
- package/lib/ToggleHint/styles.js +2 -2
- package/lib/Token/Token.js +1 -1
- package/lib/Token/styles.js +2 -2
- package/lib/TokenInput/styles.js +2 -2
- package/lib/VisuallyHidden/VisuallyHidden.js +1 -1
- package/lib/index.js +16 -19
- package/lib/types/index.js +1 -2
- package/lib/utils/hooks.js +1 -1
- package/lib/utils/mixins.js +1 -1
- package/lib/utils/react-testing-library.js +1 -1
- package/lib/utils/responsiveProps/index.js +1 -1
- package/package.json +30 -12
- package/dist/themes/dark/_themed.scss +0 -119
- package/dist/themes/dark/theme.scss +0 -684
- package/dist/themes/extendedThemes/sproutTheme/dark/_themed.scss +0 -119
- package/dist/themes/extendedThemes/sproutTheme/dark/theme.scss +0 -1097
- package/dist/themes/extendedThemes/sproutTheme/light/_themed.scss +0 -119
- package/dist/themes/extendedThemes/sproutTheme/light/theme.scss +0 -1097
- package/dist/themes/light/_themed.scss +0 -119
- package/dist/themes/light/theme.scss +0 -806
package/lib/Radio/styles.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import styled, { css } from "styled-components";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
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 "
|
|
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({
|
package/lib/Select/styles.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import styled, { css } from "styled-components";
|
|
2
|
-
import { focusRing } from "
|
|
3
|
-
import { COMMON } from "
|
|
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"
|
package/lib/Switch/styles.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import styled, { keyframes } from "styled-components";
|
|
2
|
-
import { focusRing } from "
|
|
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({
|
package/lib/Table/styles.js
CHANGED
package/lib/TableCell/styles.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import styled, { css } from "styled-components";
|
|
2
|
-
import { COMMON } from "
|
|
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 "
|
|
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"
|
package/lib/Tabs/styles.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import styled, { css } from "styled-components";
|
|
2
|
-
import { COMMON } from "
|
|
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",
|
package/lib/Text/styles.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import styled, { css } from "styled-components";
|
|
2
|
-
import { COMMON, LAYOUT, FLEXBOX, GRID, TYPOGRAPHY } from "
|
|
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"
|
package/lib/Textarea/styles.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import styled, { css } from "styled-components";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
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 "
|
|
4
|
+
import { theme } from "@sproutsocial/seeds-react-theme";
|
|
5
5
|
|
|
6
6
|
// We can append additional themes types here
|
|
7
7
|
|
package/lib/ToggleHint/styles.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import styled, { css } from "styled-components";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
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"
|
package/lib/Token/Token.js
CHANGED
|
@@ -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 "
|
|
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";
|
package/lib/Token/styles.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import styled, { css } from "styled-components";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
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",
|
package/lib/TokenInput/styles.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import styled, { css } from "styled-components";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
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 "
|
|
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
|
@@ -4,39 +4,35 @@ export { IllustrationNames as SpotIllustrationNames } from "@sproutsocial/seeds-
|
|
|
4
4
|
export { LogoNamesWithoutVariants as PartnerLogoNames } from "@sproutsocial/seeds-partner-logos";
|
|
5
5
|
|
|
6
6
|
/* Theme and related types */
|
|
7
|
-
export * from "
|
|
8
|
-
export
|
|
9
|
-
export { default as
|
|
10
|
-
export { sproutLightTheme, sproutDarkTheme } from "./themes/extendedThemes/sproutTheme";
|
|
11
|
-
export { default as ThemeProvider } from "./ThemeProvider";
|
|
7
|
+
export * from "@sproutsocial/seeds-react-system-props";
|
|
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 "
|
|
15
|
-
export
|
|
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 "
|
|
19
|
+
export * from "@sproutsocial/seeds-react-box";
|
|
24
20
|
export * from "./Breadcrumb";
|
|
25
|
-
export * from "
|
|
21
|
+
export * from "@sproutsocial/seeds-react-button";
|
|
26
22
|
export * from "./Card";
|
|
27
23
|
export * from "./CharacterCounter";
|
|
28
24
|
export * from "./ChartLegend";
|
|
29
|
-
export * from "
|
|
25
|
+
export * from "@sproutsocial/seeds-react-checkbox";
|
|
30
26
|
export * from "./Collapsible";
|
|
31
27
|
export * from "./DatePicker";
|
|
32
28
|
export * from "./Drawer";
|
|
33
29
|
export * from "./EmptyState";
|
|
34
30
|
export * from "./Fieldset";
|
|
35
31
|
export * from "./FormField";
|
|
36
|
-
export * from "
|
|
32
|
+
export * from "@sproutsocial/seeds-react-icon";
|
|
37
33
|
export * from "./Image";
|
|
38
34
|
export * from "./Indicator";
|
|
39
|
-
export * from "
|
|
35
|
+
export * from "@sproutsocial/seeds-react-input";
|
|
40
36
|
export * from "./KeyboardKey";
|
|
41
37
|
export * from "./Label";
|
|
42
38
|
export * from "./Link";
|
|
@@ -47,21 +43,22 @@ export * from "./Menu";
|
|
|
47
43
|
export * from "./Message";
|
|
48
44
|
export * from "./Modal";
|
|
49
45
|
export * from "./Numeral";
|
|
50
|
-
export * from "
|
|
51
|
-
export * from "
|
|
52
|
-
export * from "
|
|
46
|
+
export * from "@sproutsocial/seeds-react-partner-logo";
|
|
47
|
+
export * from "@sproutsocial/seeds-react-popout";
|
|
48
|
+
export * from "@sproutsocial/seeds-react-portal";
|
|
49
|
+
export * from "@sproutsocial/seeds-react-radio";
|
|
53
50
|
export * from "./SegmentedControl";
|
|
54
51
|
export * from "./Select";
|
|
55
52
|
export * from "./Skeleton";
|
|
56
53
|
export * from "./SpotIllustration";
|
|
57
54
|
export * from "./Stack";
|
|
58
|
-
export * from "
|
|
55
|
+
export * from "@sproutsocial/seeds-react-switch";
|
|
59
56
|
export * from "./Table";
|
|
60
57
|
export * from "./TableCell";
|
|
61
58
|
export * from "./TableHeaderCell";
|
|
62
59
|
export * from "./TableRowAccordion";
|
|
63
60
|
export * from "./Tabs";
|
|
64
|
-
export * from "
|
|
61
|
+
export * from "@sproutsocial/seeds-react-text";
|
|
65
62
|
export * from "./Textarea";
|
|
66
63
|
export * from "./Toast";
|
|
67
64
|
export * from "./ToggleHint";
|
package/lib/types/index.js
CHANGED
package/lib/utils/hooks.js
CHANGED
|
@@ -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),
|
package/lib/utils/mixins.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { transparentize } from "polished";
|
|
2
2
|
import { css } from "styled-components";
|
|
3
|
-
import theme from "
|
|
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 "
|
|
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 "
|
|
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": "
|
|
3
|
+
"version": "22.1.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=18"
|
|
@@ -57,6 +57,23 @@
|
|
|
57
57
|
"ts-to-flow": "flowgen $FILE -o $OUTPUT --add-flow-header --no-module-exports"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
+
"@sproutsocial/seeds-react-box": "^1.0.0",
|
|
61
|
+
"@sproutsocial/seeds-react-checkbox": "^1.0.0",
|
|
62
|
+
"@sproutsocial/seeds-react-input": "^1.0.0",
|
|
63
|
+
"@sproutsocial/seeds-react-text": "^1.0.0",
|
|
64
|
+
"@sproutsocial/seeds-react-radio": "^1.0.0",
|
|
65
|
+
"@sproutsocial/seeds-react-button": "^1.0.0",
|
|
66
|
+
"@sproutsocial/seeds-react-switch": "^1.0.0",
|
|
67
|
+
"@sproutsocial/seeds-react-hooks": "^2.0.0",
|
|
68
|
+
"@sproutsocial/seeds-react-icon": "^1.0.0",
|
|
69
|
+
"@sproutsocial/seeds-react-mixins": "^2.0.0",
|
|
70
|
+
"@sproutsocial/seeds-react-partner-logo": "^1.0.0",
|
|
71
|
+
"@sproutsocial/seeds-react-popout": "^1.0.0",
|
|
72
|
+
"@sproutsocial/seeds-react-portal": "^1.0.0",
|
|
73
|
+
"@sproutsocial/seeds-react-system-props": "^2.2.0",
|
|
74
|
+
"@sproutsocial/seeds-react-theme-provider": "^1.0.0",
|
|
75
|
+
"@sproutsocial/seeds-react-theme": "^1.0.0",
|
|
76
|
+
"@sproutsocial/seeds-react-utilities": "^2.0.0",
|
|
60
77
|
"@styled-system/theme-get": "^5.1.2",
|
|
61
78
|
"classnames": "^2.2.6",
|
|
62
79
|
"default-browser-id": "^3.0.0",
|
|
@@ -89,6 +106,7 @@
|
|
|
89
106
|
"@babel/preset-typescript": "^7.22.5",
|
|
90
107
|
"@khanacademy/flow-to-ts": "^0.5.2",
|
|
91
108
|
"@sproutsocial/eslint-config-seeds": "*",
|
|
109
|
+
"@sproutsocial/seeds-typography": "*",
|
|
92
110
|
"@sproutsocial/seeds-border": "*",
|
|
93
111
|
"@sproutsocial/seeds-color": "*",
|
|
94
112
|
"@sproutsocial/seeds-depth": "*",
|
|
@@ -99,7 +117,6 @@
|
|
|
99
117
|
"@sproutsocial/seeds-partner-logos": "*",
|
|
100
118
|
"@sproutsocial/seeds-space": "*",
|
|
101
119
|
"@sproutsocial/seeds-tsconfig": "*",
|
|
102
|
-
"@sproutsocial/seeds-typography": "*",
|
|
103
120
|
"@storybook/addon-a11y": "^7.0.0",
|
|
104
121
|
"@storybook/addon-actions": "^7.0.0",
|
|
105
122
|
"@storybook/addon-essentials": "^7.0.0",
|
|
@@ -155,6 +172,7 @@
|
|
|
155
172
|
"jsdom": "^22.1.0",
|
|
156
173
|
"json-to-scss": "^1.6.2",
|
|
157
174
|
"moment": "^2.29.4",
|
|
175
|
+
"mkdirp": "1.0.4",
|
|
158
176
|
"npm-run-all": "^4.1.2",
|
|
159
177
|
"outdent": "^0.7.0",
|
|
160
178
|
"pify": "^4.0.1",
|
|
@@ -176,16 +194,16 @@
|
|
|
176
194
|
"ws": "^8.13.0"
|
|
177
195
|
},
|
|
178
196
|
"peerDependencies": {
|
|
179
|
-
"@sproutsocial/seeds-
|
|
180
|
-
"@sproutsocial/seeds-
|
|
181
|
-
"@sproutsocial/seeds-
|
|
182
|
-
"@sproutsocial/seeds-
|
|
183
|
-
"@sproutsocial/seeds-
|
|
184
|
-
"@sproutsocial/seeds-
|
|
185
|
-
"@sproutsocial/seeds-
|
|
186
|
-
"@sproutsocial/seeds-
|
|
187
|
-
"@sproutsocial/seeds-partner-logos": "
|
|
188
|
-
"@sproutsocial/seeds-
|
|
197
|
+
"@sproutsocial/seeds-typography": "*",
|
|
198
|
+
"@sproutsocial/seeds-border": "*",
|
|
199
|
+
"@sproutsocial/seeds-color": "*",
|
|
200
|
+
"@sproutsocial/seeds-depth": "*",
|
|
201
|
+
"@sproutsocial/seeds-icons": "*",
|
|
202
|
+
"@sproutsocial/seeds-illustrations": "*",
|
|
203
|
+
"@sproutsocial/seeds-motion": "*",
|
|
204
|
+
"@sproutsocial/seeds-networkcolor": "*",
|
|
205
|
+
"@sproutsocial/seeds-partner-logos": "*",
|
|
206
|
+
"@sproutsocial/seeds-space": "*",
|
|
189
207
|
"moment": "^2.29.4",
|
|
190
208
|
"prop-types": "^15.0.0",
|
|
191
209
|
"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
|
-
}
|