@sproutsocial/racine 17.0.0 → 19.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.
- package/CHANGELOG.md +59 -1
- package/README.md +16 -14
- package/__flow__/Card/Card.flow.js +5 -1
- package/__flow__/Card/CardTypes.flow.js +8 -1
- package/__flow__/Numeral/Numeral.flow.js +2 -0
- package/__flow__/index.flow.js +1 -8
- package/commonjs/Card/subComponents.js +14 -6
- package/commonjs/ChartLegend/ChartLegend.js +6 -23
- package/commonjs/ChartLegend/useChartLabels.js +41 -0
- package/commonjs/Collapsible/Collapsible.js +2 -2
- package/commonjs/Link/Link.js +2 -1
- package/commonjs/Menu/Menu.js +69 -55
- package/commonjs/Menu/styles.js +1 -1
- package/commonjs/Numeral/Numeral.js +11 -2
- package/commonjs/TableHeaderCell/TableHeaderCell.js +3 -1
- package/commonjs/Toast/styles.js +2 -4
- package/commonjs/index.flow.js +48 -64
- package/commonjs/index.js +8 -24
- package/commonjs/themes/light/theme.js +33 -1
- package/commonjs/utils/use-measure.js +65 -0
- package/dist/themes/dark/theme.scss +28 -0
- package/dist/themes/extendedThemes/sproutTheme/dark/theme.scss +28 -0
- package/dist/themes/extendedThemes/sproutTheme/light/theme.scss +28 -0
- package/dist/themes/light/theme.scss +56 -0
- package/dist/types/Box/Box.d.ts +1 -1
- package/dist/types/Box/Box.d.ts.map +1 -1
- package/dist/types/Card/CardTypes.d.ts +3 -2
- package/dist/types/Card/CardTypes.d.ts.map +1 -1
- package/dist/types/Card/styles.d.ts +2 -2
- package/dist/types/Card/styles.d.ts.map +1 -1
- package/dist/types/Card/subComponents.d.ts +1 -1
- package/dist/types/Card/subComponents.d.ts.map +1 -1
- package/dist/types/ChartLegend/ChartLegend.d.ts.map +1 -1
- package/dist/types/ChartLegend/ChartLegendTypes.d.ts +8 -5
- package/dist/types/ChartLegend/ChartLegendTypes.d.ts.map +1 -1
- package/dist/types/ChartLegend/useChartLabels.d.ts +4 -0
- package/dist/types/ChartLegend/useChartLabels.d.ts.map +1 -0
- package/dist/types/Checkbox/styles.d.ts +1 -1
- package/dist/types/Checkbox/styles.d.ts.map +1 -1
- package/dist/types/Collapsible/styles.d.ts +1 -1
- package/dist/types/DatePicker/styles.d.ts +1 -1
- package/dist/types/Drawer/styles.d.ts +1 -1
- package/dist/types/Drawer/styles.d.ts.map +1 -1
- package/dist/types/Fieldset/styles.d.ts +1 -1
- package/dist/types/Fieldset/styles.d.ts.map +1 -1
- package/dist/types/Menu/Menu.d.ts.map +1 -1
- package/dist/types/Menu/styles.d.ts +2 -2
- package/dist/types/Menu/styles.d.ts.map +1 -1
- package/dist/types/Message/styles.d.ts +5 -5
- package/dist/types/Message/styles.d.ts.map +1 -1
- package/dist/types/Modal/Modal.d.ts +1 -1
- package/dist/types/Modal/styles.d.ts +4 -4
- package/dist/types/Modal/styles.d.ts.map +1 -1
- package/dist/types/Numeral/Numeral.d.ts.map +1 -1
- package/dist/types/Numeral/NumeralTypes.d.ts +2 -0
- package/dist/types/Numeral/NumeralTypes.d.ts.map +1 -1
- package/dist/types/Numeral/__tests__/features/testNumeral.d.ts.map +1 -1
- package/dist/types/SegmentedControl/styles.d.ts +2 -2
- package/dist/types/SegmentedControl/styles.d.ts.map +1 -1
- package/dist/types/Skeleton/Skeleton.d.ts +1 -1
- package/dist/types/Skeleton/Skeleton.d.ts.map +1 -1
- package/dist/types/TableHeaderCell/TableHeaderCell.d.ts.map +1 -1
- package/dist/types/Toast/styles.d.ts +2 -1
- package/dist/types/Toast/styles.d.ts.map +1 -1
- package/dist/types/Tooltip/styles.d.ts +1 -1
- package/dist/types/Tooltip/styles.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -5
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/themes/dark/theme.d.ts +28 -0
- package/dist/types/themes/dark/theme.d.ts.map +1 -1
- package/dist/types/themes/light/theme.d.ts +56 -0
- package/dist/types/themes/light/theme.d.ts.map +1 -1
- package/dist/types/utils/use-measure.d.ts +14 -0
- package/dist/types/utils/use-measure.d.ts.map +1 -0
- package/lib/Card/subComponents.js +14 -7
- package/lib/ChartLegend/ChartLegend.js +5 -23
- package/lib/ChartLegend/useChartLabels.js +33 -0
- package/lib/Collapsible/Collapsible.js +1 -1
- package/lib/Link/Link.js +2 -1
- package/lib/Menu/Menu.js +69 -55
- package/lib/Menu/styles.js +1 -1
- package/lib/Numeral/Numeral.js +11 -2
- package/lib/TableHeaderCell/TableHeaderCell.js +3 -1
- package/lib/Toast/styles.js +2 -3
- package/lib/index.flow.js +1 -7
- package/lib/index.js +2 -7
- package/lib/themes/light/theme.js +30 -0
- package/lib/utils/use-measure.js +59 -0
- package/package.json +14 -20
- package/__flow__/OverflowList/OverflowList.flow.js +0 -22
- package/__flow__/OverflowList/index.flow.js +0 -2
- package/__flow__/dataviz/DataVizRotation.flow.js +0 -12
- package/__flow__/dataviz/index.flow.js +0 -2
- package/commonjs/OverflowList/OverflowList.flow.js +0 -6
- package/commonjs/OverflowList/OverflowList.js +0 -115
- package/commonjs/OverflowList/OverflowListTypes.js +0 -5
- package/commonjs/OverflowList/index.flow.js +0 -16
- package/commonjs/OverflowList/index.js +0 -31
- package/commonjs/OverflowList/styles.js +0 -25
- package/commonjs/dataviz/DataVizRotation.flow.js +0 -6
- package/commonjs/dataviz/DataVizRotation.js +0 -21
- package/commonjs/dataviz/DataVizRotationTypes.js +0 -5
- package/commonjs/dataviz/index.flow.js +0 -16
- package/commonjs/dataviz/index.js +0 -27
- package/dist/types/OverflowList/OverflowList.d.ts +0 -5
- package/dist/types/OverflowList/OverflowList.d.ts.map +0 -1
- package/dist/types/OverflowList/OverflowListTypes.d.ts +0 -16
- package/dist/types/OverflowList/OverflowListTypes.d.ts.map +0 -1
- package/dist/types/OverflowList/index.d.ts +0 -5
- package/dist/types/OverflowList/index.d.ts.map +0 -1
- package/dist/types/OverflowList/styles.d.ts +0 -4
- package/dist/types/OverflowList/styles.d.ts.map +0 -1
- package/dist/types/dataviz/DataVizRotation.d.ts +0 -5
- package/dist/types/dataviz/DataVizRotation.d.ts.map +0 -1
- package/dist/types/dataviz/DataVizRotationTypes.d.ts +0 -5
- package/dist/types/dataviz/DataVizRotationTypes.d.ts.map +0 -1
- package/dist/types/dataviz/index.d.ts +0 -3
- package/dist/types/dataviz/index.d.ts.map +0 -1
- package/lib/OverflowList/OverflowList.flow.js +0 -1
- package/lib/OverflowList/OverflowList.js +0 -104
- package/lib/OverflowList/OverflowListTypes.js +0 -1
- package/lib/OverflowList/index.flow.js +0 -1
- package/lib/OverflowList/index.js +0 -4
- package/lib/OverflowList/styles.js +0 -14
- package/lib/dataviz/DataVizRotation.flow.js +0 -1
- package/lib/dataviz/DataVizRotation.js +0 -13
- package/lib/dataviz/DataVizRotationTypes.js +0 -1
- package/lib/dataviz/index.flow.js +0 -1
- package/lib/dataviz/index.js +0 -2
|
@@ -5,10 +5,10 @@ export declare const Body: import("styled-components").GlobalStyleComponent<{},
|
|
|
5
5
|
export declare const Container: import("styled-components").StyledComponent<({ className, ...props }: {
|
|
6
6
|
className?: string | undefined;
|
|
7
7
|
} & Omit<ReactModal.Props, "className" | "portalClassName" | "overlayClassName">) => React.JSX.Element, import("styled-components").DefaultTheme, TypeContainerProps, never>;
|
|
8
|
-
export declare const Content: import("styled-components").StyledComponent<React.ForwardRefExoticComponent<
|
|
9
|
-
export declare const HeaderContainer: import("styled-components").StyledComponent<React.ForwardRefExoticComponent<
|
|
10
|
-
export declare const Header: import("styled-components").StyledComponent<React.ForwardRefExoticComponent<
|
|
8
|
+
export declare const Content: import("styled-components").StyledComponent<React.ForwardRefExoticComponent<Omit<import("../Box").TypeBoxProps, "ref"> & React.RefAttributes<HTMLDivElement>>, import("styled-components").DefaultTheme, {}, never>;
|
|
9
|
+
export declare const HeaderContainer: import("styled-components").StyledComponent<React.ForwardRefExoticComponent<Omit<import("../Box").TypeBoxProps, "ref"> & React.RefAttributes<HTMLDivElement>>, import("styled-components").DefaultTheme, {}, never>;
|
|
10
|
+
export declare const Header: import("styled-components").StyledComponent<React.ForwardRefExoticComponent<Omit<import("../Box").TypeBoxProps, "ref"> & React.RefAttributes<HTMLDivElement>>, import("styled-components").DefaultTheme, {
|
|
11
11
|
bordered?: boolean | undefined;
|
|
12
12
|
}, never>;
|
|
13
|
-
export declare const Footer: import("styled-components").StyledComponent<React.ForwardRefExoticComponent<
|
|
13
|
+
export declare const Footer: import("styled-components").StyledComponent<React.ForwardRefExoticComponent<Omit<import("../Box").TypeBoxProps, "ref"> & React.RefAttributes<HTMLDivElement>>, import("styled-components").DefaultTheme, {}, never>;
|
|
14
14
|
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/Modal/styles.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,UAAU,MAAM,aAAa,CAAC;AAErC,OAAY,EAAC,kBAAkB,EAAC,MAAM,UAAU,CAAC;AAmCjD,eAAO,MAAM,IAAI,gGAIhB,CAAC;AAEF,eAAO,MAAM,SAAS;;4KAkDrB,CAAC;AAEF,eAAO,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/Modal/styles.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,UAAU,MAAM,aAAa,CAAC;AAErC,OAAY,EAAC,kBAAkB,EAAC,MAAM,UAAU,CAAC;AAmCjD,eAAO,MAAM,IAAI,gGAIhB,CAAC;AAEF,eAAO,MAAM,SAAS;;4KAkDrB,CAAC;AAEF,eAAO,MAAM,OAAO,uNAWnB,CAAC;AAEF,eAAO,MAAM,eAAe,uNAI3B,CAAC;AAEF,eAAO,MAAM,MAAM;;SASlB,CAAC;AAEF,eAAO,MAAM,MAAM,uNAOlB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Numeral.d.ts","sourceRoot":"","sources":["../../../src/Numeral/Numeral.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Numeral.d.ts","sourceRoot":"","sources":["../../../src/Numeral/Numeral.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAgB/B,OAAO,KAAK,EAAoB,gBAAgB,EAAC,MAAM,gBAAgB,CAAC;AAyHxE,QAAA,MAAM,OAAO,UAAW,gBAAgB,sBA0CvC,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
|
@@ -11,6 +11,8 @@ export interface TypeNumeralProps extends Omit<TypeTextProps, 'children'> {
|
|
|
11
11
|
currency?: string;
|
|
12
12
|
/** A boolean determining whether or not the number should be abbreviated, or a number representing the abbreviation threshold */
|
|
13
13
|
abbreviate?: boolean | number;
|
|
14
|
+
/** Text to be read off by screen readers for invalid values (i.e., any value rendered as '—' (em dash)) */
|
|
15
|
+
invalidNumberLabel?: string;
|
|
14
16
|
/** Override the default decimal precision (2 for decimals/currency, 1 for percentages), or "none" allowing unrestricted precision. */
|
|
15
17
|
precision?: number | 'none';
|
|
16
18
|
qa?: TypeQaProps;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NumeralTypes.d.ts","sourceRoot":"","sources":["../../../src/Numeral/NumeralTypes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,EAAC,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAC,WAAW,EAAC,MAAM,mBAAmB,CAAC;AAE9C,oBAAY,iBAAiB,GAAG,SAAS,GAAG,UAAU,GAAG,SAAS,CAAC;AAEnE,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAAC,aAAa,EAAE,UAAU,CAAC;IACvE,iCAAiC;IACjC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAEnC,mIAAmI;IACnI,MAAM,CAAC,EAAE,MAAM,CAAC;IAGhB,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAE3B,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,kIAAkI;IAClI,UAAU,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAE9B,sIAAsI;IACtI,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B,EAAE,CAAC,EAAE,WAAW,CAAC;CAClB"}
|
|
1
|
+
{"version":3,"file":"NumeralTypes.d.ts","sourceRoot":"","sources":["../../../src/Numeral/NumeralTypes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,EAAC,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAC,WAAW,EAAC,MAAM,mBAAmB,CAAC;AAE9C,oBAAY,iBAAiB,GAAG,SAAS,GAAG,UAAU,GAAG,SAAS,CAAC;AAEnE,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAAC,aAAa,EAAE,UAAU,CAAC;IACvE,iCAAiC;IACjC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAEnC,mIAAmI;IACnI,MAAM,CAAC,EAAE,MAAM,CAAC;IAGhB,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAE3B,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,kIAAkI;IAClI,UAAU,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAE9B,2GAA2G;IAC3G,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAE5B,sIAAsI;IACtI,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B,EAAE,CAAC,EAAE,WAAW,CAAC;CAClB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testNumeral.d.ts","sourceRoot":"","sources":["../../../../../src/Numeral/__tests__/features/testNumeral.tsx"],"names":[],"mappings":"AAWA,QAAA,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"testNumeral.d.ts","sourceRoot":"","sources":["../../../../../src/Numeral/__tests__/features/testNumeral.tsx"],"names":[],"mappings":"AAWA,QAAA,MAAM,WAAW,2DA0BhB,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { TypeSegmentedControlProps } from './SegmentedControlTypes';
|
|
3
|
-
export declare const SegmentedControlContainer: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<
|
|
4
|
-
export declare const SegmentedControlItemContainer: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<
|
|
3
|
+
export declare const SegmentedControlContainer: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<Omit<import("../Box").TypeBoxProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>, import("styled-components").DefaultTheme, Pick<TypeSegmentedControlProps, "disabled">, never>;
|
|
4
|
+
export declare const SegmentedControlItemContainer: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<Omit<import("../Box").TypeBoxProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>, import("styled-components").DefaultTheme, {}, never>;
|
|
5
5
|
interface TypeSegmentedControlState {
|
|
6
6
|
isActive: boolean;
|
|
7
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/SegmentedControl/styles.ts"],"names":[],"mappings":";AAIA,OAAO,EAAC,yBAAyB,EAAC,MAAM,yBAAyB,CAAC;AAElE,eAAO,MAAM,yBAAyB,
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/SegmentedControl/styles.ts"],"names":[],"mappings":";AAIA,OAAO,EAAC,yBAAyB,EAAC,MAAM,yBAAyB,CAAC;AAElE,eAAO,MAAM,yBAAyB,oRAarC,CAAC;AAEF,eAAO,MAAM,6BAA6B,2OAgBzC,CAAC;AAEF,UAAU,yBAAyB;IACjC,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,eAAO,MAAM,qBAAqB;;;;;;;;;8EAsCjC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
declare const Skeleton: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<
|
|
2
|
+
declare const Skeleton: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<Omit<import("../Box").TypeBoxProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>, import("styled-components").DefaultTheme, {}, never>;
|
|
3
3
|
export default Skeleton;
|
|
4
4
|
//# sourceMappingURL=Skeleton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Skeleton.d.ts","sourceRoot":"","sources":["../../../src/Skeleton/Skeleton.ts"],"names":[],"mappings":";AAIA,QAAA,MAAM,QAAQ
|
|
1
|
+
{"version":3,"file":"Skeleton.d.ts","sourceRoot":"","sources":["../../../src/Skeleton/Skeleton.ts"],"names":[],"mappings":";AAIA,QAAA,MAAM,QAAQ,2OA0Bb,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableHeaderCell.d.ts","sourceRoot":"","sources":["../../../src/TableHeaderCell/TableHeaderCell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAAC,wBAAwB,EAAC,MAAM,wBAAwB,CAAC;AAEhE,qBAAa,eAAgB,SAAQ,KAAK,CAAC,SAAS,CAAC,wBAAwB,CAAC;IAC5E,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC;IAE3B,WAAW,aACC,OAAO,qBACE,WAAW,GAAG,YAAY,GAAG,SAAS,uBAgBzD;IAGF,WAAW,MACN,gBAAgB,CAAC,oBAAoB,GAAG,iBAAiB,CAAC,
|
|
1
|
+
{"version":3,"file":"TableHeaderCell.d.ts","sourceRoot":"","sources":["../../../src/TableHeaderCell/TableHeaderCell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAAC,wBAAwB,EAAC,MAAM,wBAAwB,CAAC;AAEhE,qBAAa,eAAgB,SAAQ,KAAK,CAAC,SAAS,CAAC,wBAAwB,CAAC;IAC5E,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC;IAE3B,WAAW,aACC,OAAO,qBACE,WAAW,GAAG,YAAY,GAAG,SAAS,uBAgBzD;IAGF,WAAW,MACN,gBAAgB,CAAC,oBAAoB,GAAG,iBAAiB,CAAC,UAgB7D;IAEF,MAAM;CAoEP;AAED,eAAe,eAAe,CAAC"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import 'react-toastify/dist/ReactToastify.css';
|
|
2
3
|
import { TypeColor } from '../types/theme';
|
|
3
4
|
interface TypeProps {
|
|
4
5
|
type: 'info' | 'success' | 'warning' | 'error';
|
|
5
6
|
customColor?: TypeColor;
|
|
6
7
|
}
|
|
7
|
-
declare const Container: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<
|
|
8
|
+
declare const Container: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<Omit<import("../Box").TypeBoxProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>, import("styled-components").DefaultTheme, TypeProps, never>;
|
|
8
9
|
export declare const CustomIcon: import("styled-components").StyledComponent<{
|
|
9
10
|
({ name, size, fixedWidth, ariaLabel, color, svgProps, ...rest }: import("../Icon").TypeIconProps): import("react").JSX.Element;
|
|
10
11
|
Toggle: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/Toast/styles.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/Toast/styles.ts"],"names":[],"mappings":";AAGA,OAAO,uCAAuC,CAAC;AAG/C,OAAO,EAAC,SAAS,EAAC,MAAM,kBAAkB,CAAC;AAE3C,UAAU,SAAS;IACjB,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;IAC/C,WAAW,CAAC,EAAE,SAAS,CAAC;CACzB;AAED,QAAA,MAAM,SAAS,kPAQd,CAAC;AAEF,eAAO,MAAM,UAAU;;;;;;8DAItB,CAAC;AAEF,eAAO,MAAM,iBAAiB,gGAgC7B,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { TypeTooltipContent } from './TooltipTypes';
|
|
3
|
-
export declare const TooltipContent: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<
|
|
3
|
+
export declare const TooltipContent: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<Omit<import("../Box").TypeBoxProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>, import("styled-components").DefaultTheme, Pick<TypeTooltipContent, "appearance">, never>;
|
|
4
4
|
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/Tooltip/styles.ts"],"names":[],"mappings":";AAEA,OAAO,EAAC,kBAAkB,EAAC,MAAM,gBAAgB,CAAC;AAElD,eAAO,MAAM,cAAc,
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/Tooltip/styles.ts"],"names":[],"mappings":";AAEA,OAAO,EAAC,kBAAkB,EAAC,MAAM,gBAAgB,CAAC;AAElD,eAAO,MAAM,cAAc,+QAM1B,CAAC"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export { default as ThemeProvider } from './ThemeProvider';
|
|
|
13
13
|
export { useSelect, useMultiselect, useTextContent } from './utils/hooks';
|
|
14
14
|
export { visuallyHidden, focusRing, disabled } from './utils/mixins';
|
|
15
15
|
export { useInteractiveColor } from './utils/useInteractiveColor';
|
|
16
|
+
export { useMeasure } from './utils/use-measure';
|
|
16
17
|
export * from './Avatar';
|
|
17
18
|
export * from './Badge';
|
|
18
19
|
export * from './Banner';
|
|
@@ -43,7 +44,6 @@ export * from './Menu';
|
|
|
43
44
|
export * from './Message';
|
|
44
45
|
export * from './Modal';
|
|
45
46
|
export * from './Numeral';
|
|
46
|
-
export * from './OverflowList';
|
|
47
47
|
export * from './PartnerLogo';
|
|
48
48
|
export * from './Popout';
|
|
49
49
|
export * from './Radio';
|
|
@@ -70,8 +70,4 @@ export * from './VisuallyHidden';
|
|
|
70
70
|
* @deprecated Alert has been renamed to Banner
|
|
71
71
|
*/
|
|
72
72
|
export { Banner as Alert } from './Banner';
|
|
73
|
-
/**
|
|
74
|
-
* Should this be exported? @deprecated?
|
|
75
|
-
*/
|
|
76
|
-
export * from './dataviz';
|
|
77
73
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,YAAY,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAC;AACnD,YAAY,EAAC,qBAAqB,EAAC,MAAM,yBAAyB,CAAC;AACnE,YAAY,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAC,OAAO,IAAI,SAAS,EAAC,MAAM,aAAa,CAAC;AACjD,OAAO,EAAC,OAAO,IAAI,qBAAqB,EAAC,MAAM,qBAAqB,CAAC;AACrE,OAAO,EAAC,OAAO,IAAI,gBAAgB,EAAC,MAAM,aAAa,CAAC;AAGxD,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAC,OAAO,IAAI,KAAK,EAAC,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAC,OAAO,IAAI,SAAS,EAAC,MAAM,qBAAqB,CAAC;AACzD,OAAO,EACL,gBAAgB,EAChB,eAAe,GAChB,MAAM,qCAAqC,CAAC;AAC7C,YAAY,EAA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AAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC;AAEjC;;GAEG;AACH,OAAO,EAAC,MAAM,IAAI,KAAK,EAAC,MAAM,UAAU,CAAC"}
|
|
@@ -557,6 +557,34 @@ declare const darkTheme: {
|
|
|
557
557
|
lineHeight: string;
|
|
558
558
|
};
|
|
559
559
|
};
|
|
560
|
+
fontSizes: {
|
|
561
|
+
100: string;
|
|
562
|
+
200: string;
|
|
563
|
+
300: string;
|
|
564
|
+
400: string;
|
|
565
|
+
500: string;
|
|
566
|
+
600: string;
|
|
567
|
+
700: string;
|
|
568
|
+
800: string;
|
|
569
|
+
900: string;
|
|
570
|
+
1000: string;
|
|
571
|
+
1100: string;
|
|
572
|
+
1200: string;
|
|
573
|
+
};
|
|
574
|
+
lineHeights: {
|
|
575
|
+
100: string;
|
|
576
|
+
200: string;
|
|
577
|
+
300: string;
|
|
578
|
+
400: string;
|
|
579
|
+
500: string;
|
|
580
|
+
600: string;
|
|
581
|
+
700: string;
|
|
582
|
+
800: string;
|
|
583
|
+
900: string;
|
|
584
|
+
1000: string;
|
|
585
|
+
1100: string;
|
|
586
|
+
1200: string;
|
|
587
|
+
};
|
|
560
588
|
fontFamily: string;
|
|
561
589
|
fontWeights: {
|
|
562
590
|
normal: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../../src/themes/dark/theme.ts"],"names":[],"mappings":"AA0BA,eAAO,MAAM,OAAO;;;;CAInB,CAAC;AAmOF,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBAhNT,mDAAmD;;;;;;;;;;;;;;;;;;;;;;;;;gBAyBnD,mDAAmD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4LxD,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -49,6 +49,34 @@ export declare const typography: {
|
|
|
49
49
|
lineHeight: string;
|
|
50
50
|
};
|
|
51
51
|
};
|
|
52
|
+
export declare const fontSizes: {
|
|
53
|
+
100: string;
|
|
54
|
+
200: string;
|
|
55
|
+
300: string;
|
|
56
|
+
400: string;
|
|
57
|
+
500: string;
|
|
58
|
+
600: string;
|
|
59
|
+
700: string;
|
|
60
|
+
800: string;
|
|
61
|
+
900: string;
|
|
62
|
+
1000: string;
|
|
63
|
+
1100: string;
|
|
64
|
+
1200: string;
|
|
65
|
+
};
|
|
66
|
+
export declare const lineHeights: {
|
|
67
|
+
100: string;
|
|
68
|
+
200: string;
|
|
69
|
+
300: string;
|
|
70
|
+
400: string;
|
|
71
|
+
500: string;
|
|
72
|
+
600: string;
|
|
73
|
+
700: string;
|
|
74
|
+
800: string;
|
|
75
|
+
900: string;
|
|
76
|
+
1000: string;
|
|
77
|
+
1100: string;
|
|
78
|
+
1200: string;
|
|
79
|
+
};
|
|
52
80
|
export declare type TypeFontFamilyString = string;
|
|
53
81
|
export declare const fontFamily: string;
|
|
54
82
|
export declare const fontWeights: {
|
|
@@ -645,6 +673,34 @@ declare const theme: {
|
|
|
645
673
|
lineHeight: string;
|
|
646
674
|
};
|
|
647
675
|
};
|
|
676
|
+
fontSizes: {
|
|
677
|
+
100: string;
|
|
678
|
+
200: string;
|
|
679
|
+
300: string;
|
|
680
|
+
400: string;
|
|
681
|
+
500: string;
|
|
682
|
+
600: string;
|
|
683
|
+
700: string;
|
|
684
|
+
800: string;
|
|
685
|
+
900: string;
|
|
686
|
+
1000: string;
|
|
687
|
+
1100: string;
|
|
688
|
+
1200: string;
|
|
689
|
+
};
|
|
690
|
+
lineHeights: {
|
|
691
|
+
100: string;
|
|
692
|
+
200: string;
|
|
693
|
+
300: string;
|
|
694
|
+
400: string;
|
|
695
|
+
500: string;
|
|
696
|
+
600: string;
|
|
697
|
+
700: string;
|
|
698
|
+
800: string;
|
|
699
|
+
900: string;
|
|
700
|
+
1000: string;
|
|
701
|
+
1100: string;
|
|
702
|
+
1200: string;
|
|
703
|
+
};
|
|
648
704
|
fontFamily: string;
|
|
649
705
|
fontWeights: {
|
|
650
706
|
normal: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../../src/themes/light/theme.ts"],"names":[],"mappings":"AA6BA,eAAO,MAAM,WAAW,UAA0C,CAAC;AAmQnE,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAatB,CAAC;AAEF,oBAAY,oBAAoB,GAAG,MAAM,CAAC;AAE1C,eAAO,MAAM,UAAU,QAA+B,CAAC;AAEvD,eAAO,MAAM,WAAW;;;;;CAKvB,CAAC;AAEF,eAAO,MAAM,KAAK;;;;;;;;;;CAUjB,CAAC;AAEF,eAAO,MAAM,KAAK;;;;;;;;CAQjB,CAAC;AAEF,eAAO,MAAM,OAAO;;CAEnB,CAAC;AAEF,eAAO,MAAM,YAAY;;CAExB,CAAC;AAEF,eAAO,MAAM,OAAO;;;;CAInB,CAAC;AAEF,eAAO,MAAM,MAAM;;;;CAIlB,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;CAIpB,CAAC;AAEF,QAAA,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../../src/themes/light/theme.ts"],"names":[],"mappings":"AA6BA,eAAO,MAAM,WAAW,UAA0C,CAAC;AAmQnE,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+NtD,CAAC;AAEF,eAAe,KAAK,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type RefObject } from 'react';
|
|
2
|
+
interface DOMRectObject {
|
|
3
|
+
x: number;
|
|
4
|
+
y: number;
|
|
5
|
+
width: number;
|
|
6
|
+
height: number;
|
|
7
|
+
top: number;
|
|
8
|
+
right: number;
|
|
9
|
+
bottom: number;
|
|
10
|
+
left: number;
|
|
11
|
+
}
|
|
12
|
+
export declare function useMeasure<TElement extends Element>(ref: RefObject<TElement>): Readonly<DOMRectObject>;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=use-measure.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-measure.d.ts","sourceRoot":"","sources":["../../../src/utils/use-measure.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAEhE,UAAU,aAAa;IACrB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd;AAYD,wBAAgB,UAAU,CAAC,QAAQ,SAAS,OAAO,EAAE,GAAG,EAAE,SAAS,CAAC,QAAQ,CAAC,2BAoC5E"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var _excluded = ["children"],
|
|
2
2
|
_excluded2 = ["children"],
|
|
3
3
|
_excluded3 = ["children"],
|
|
4
|
-
_excluded4 = ["affordance", "children"];
|
|
4
|
+
_excluded4 = ["affordance", "children", "external", "color"];
|
|
5
5
|
function _objectDestructuringEmpty(obj) { if (obj == null) throw new TypeError("Cannot destructure " + obj); }
|
|
6
6
|
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); }
|
|
7
7
|
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; }
|
|
@@ -42,25 +42,32 @@ export var CardAffordance = function CardAffordance(_ref5) {
|
|
|
42
42
|
var rest = _extends({}, (_objectDestructuringEmpty(_ref5), _ref5));
|
|
43
43
|
return /*#__PURE__*/React.createElement(StyledCardAffordance, _extends({}, rest, {
|
|
44
44
|
size: "mini",
|
|
45
|
-
name: "arrow-right"
|
|
45
|
+
name: "arrow-right"
|
|
46
|
+
// TODO: probably need to make this available to the top level for external links https://sprout.atlassian.net/browse/DS-2223
|
|
47
|
+
,
|
|
46
48
|
"aria-hidden": true
|
|
47
49
|
}));
|
|
48
50
|
};
|
|
49
|
-
|
|
50
|
-
// jsdocs, never types?
|
|
51
|
-
|
|
52
51
|
export var CardLink = function CardLink(_ref6) {
|
|
53
52
|
var affordance = _ref6.affordance,
|
|
54
53
|
children = _ref6.children,
|
|
54
|
+
_ref6$external = _ref6.external,
|
|
55
|
+
external = _ref6$external === void 0 ? false : _ref6$external,
|
|
56
|
+
color = _ref6.color,
|
|
55
57
|
rest = _objectWithoutProperties(_ref6, _excluded4);
|
|
56
58
|
var _useContext = useContext(SubComponentContext),
|
|
57
59
|
href = _useContext.href,
|
|
58
60
|
linkRef = _useContext.linkRef;
|
|
59
61
|
return /*#__PURE__*/React.createElement(StyledCardLink, _extends({}, rest, {
|
|
60
|
-
target:
|
|
61
|
-
rel:
|
|
62
|
+
target: external ? '_blank' : undefined,
|
|
63
|
+
rel: external ? 'noreferrer' : undefined,
|
|
62
64
|
href: href,
|
|
63
65
|
ref: linkRef
|
|
66
|
+
// TODO: fix this type since `color` should be valid here. TS can't resolve the correct type.
|
|
67
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
68
|
+
// @ts-ignore
|
|
69
|
+
,
|
|
70
|
+
color: color
|
|
64
71
|
}), /*#__PURE__*/React.createElement(React.Fragment, null, children, affordance ? /*#__PURE__*/React.createElement(CardAffordance, {
|
|
65
72
|
ml: 300
|
|
66
73
|
}) : null));
|
|
@@ -3,38 +3,20 @@ 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
|
|
7
|
-
import {
|
|
8
|
-
import Container, { Label, Swatch } from "./styles";
|
|
9
|
-
function getSwatchColor(theme, index) {
|
|
10
|
-
return THEME_MAP[theme.toUpperCase()][index];
|
|
11
|
-
}
|
|
12
|
-
function getLabels(legendLabels, theme) {
|
|
13
|
-
return legendLabels.map(function (label, i) {
|
|
14
|
-
var labelColor = label.color ? label.color : getSwatchColor(theme, i);
|
|
15
|
-
return /*#__PURE__*/React.createElement(Label, {
|
|
16
|
-
key: label.name
|
|
17
|
-
}, /*#__PURE__*/React.createElement(Swatch, {
|
|
18
|
-
bg: labelColor,
|
|
19
|
-
"data-qa-swatch": ""
|
|
20
|
-
}), /*#__PURE__*/React.createElement(Text, {
|
|
21
|
-
as: "div",
|
|
22
|
-
fontSize: 200,
|
|
23
|
-
breakWord: true
|
|
24
|
-
}, label.name));
|
|
25
|
-
});
|
|
26
|
-
}
|
|
6
|
+
import Container from "./styles";
|
|
7
|
+
import { useChartLabels } from "./useChartLabels";
|
|
27
8
|
var ChartLegend = function ChartLegend(_ref) {
|
|
28
9
|
var legendLabels = _ref.legendLabels,
|
|
29
10
|
stacked = _ref.stacked,
|
|
30
11
|
_ref$theme = _ref.theme,
|
|
31
|
-
theme = _ref$theme === void 0 ? '
|
|
12
|
+
theme = _ref$theme === void 0 ? 'datavizRotation' : _ref$theme,
|
|
32
13
|
qa = _ref.qa,
|
|
33
14
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
15
|
+
var chartLabels = useChartLabels(legendLabels, theme);
|
|
34
16
|
return /*#__PURE__*/React.createElement(Container, _extends({
|
|
35
17
|
inline: !stacked,
|
|
36
18
|
"data-qa-chartlegend": "",
|
|
37
19
|
qa: qa
|
|
38
|
-
}, rest),
|
|
20
|
+
}, rest), chartLabels);
|
|
39
21
|
};
|
|
40
22
|
export default ChartLegend;
|