@artsy/palette-charts 36.4.0-canary.1351.29887.0 → 37.0.0-canary.1357.29995.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.
|
@@ -48,5 +48,5 @@ exports.BaseTooltipPositioner = BaseTooltipPositioner;
|
|
|
48
48
|
var HoverTooltipPositioner = (0, _styledComponents.default)(BaseTooltipPositioner).withConfig({
|
|
49
49
|
displayName: "ChartHoverTooltip__HoverTooltipPositioner",
|
|
50
50
|
componentId: "sc-2qa7c8-1"
|
|
51
|
-
})(["", ";z-index:2;position:fixed;background-color:", ";box-shadow:
|
|
51
|
+
})(["", ";z-index:2;position:fixed;background-color:", ";box-shadow:", ";"], _palette.media.xs(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: none;\n "]))), (0, _themeGet.themeGet)("colors.white100"), (0, _themeGet.themeGet)("effects.dropShadow"));
|
|
52
52
|
//# sourceMappingURL=ChartHoverTooltip.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChartHoverTooltip.js","names":["_palette","require","_themeGet","_react","_interopRequireWildcard","_styledComponents","_interopRequireDefault","_MousePositionContext","_templateObject","obj","__esModule","default","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","_taggedTemplateLiteral","strings","raw","slice","freeze","defineProperties","value","LABEL_OFFSET","ChartHoverTooltip","_ref","children","ref","useRef","_useContext","useContext","MousePositionContext","x","y","current","style","top","offsetHeight","left","createElement","HoverTooltipPositioner","exports","displayName","BaseTooltipPositioner","styled","Flex","withConfig","componentId","media","xs","themeGet"],"sources":["../../../src/elements/DataVis/ChartHoverTooltip.tsx"],"sourcesContent":["import { Flex, media } from \"@artsy/palette\"\nimport { themeGet } from \"@styled-system/theme-get\"\nimport React, { useContext, useRef } from \"react\"\nimport styled from \"styled-components\"\nimport { MousePositionContext } from \"./MousePositionContext\"\n\nconst LABEL_OFFSET = 10\n\n/**\n * Tooltip for bar and line charts\n */\nexport const ChartHoverTooltip = ({ children }) => {\n const ref = useRef(null)\n const { x, y } = useContext(MousePositionContext)\n if (ref.current) {\n // position outside of the render loop to avoid GC churn\n ref.current.style.top = y - LABEL_OFFSET - ref.current.offsetHeight + \"px\"\n ref.current.style.left = x + \"px\"\n }\n return <HoverTooltipPositioner ref={ref}>{children}</HoverTooltipPositioner>\n}\n\n/**\n * Base component for positioning tooltips\n */\nexport const BaseTooltipPositioner = styled(Flex)`\n transform: translateX(-50%);\n pointer-events: none;\n border-radius: 2px;\n`\n\nconst HoverTooltipPositioner = styled(BaseTooltipPositioner)`\n ${media.xs`\n display: none;\n `};\n z-index: 2;\n position: fixed;\n background-color: ${themeGet(\"colors.white100\")};\n box-shadow:
|
|
1
|
+
{"version":3,"file":"ChartHoverTooltip.js","names":["_palette","require","_themeGet","_react","_interopRequireWildcard","_styledComponents","_interopRequireDefault","_MousePositionContext","_templateObject","obj","__esModule","default","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","_taggedTemplateLiteral","strings","raw","slice","freeze","defineProperties","value","LABEL_OFFSET","ChartHoverTooltip","_ref","children","ref","useRef","_useContext","useContext","MousePositionContext","x","y","current","style","top","offsetHeight","left","createElement","HoverTooltipPositioner","exports","displayName","BaseTooltipPositioner","styled","Flex","withConfig","componentId","media","xs","themeGet"],"sources":["../../../src/elements/DataVis/ChartHoverTooltip.tsx"],"sourcesContent":["import { Flex, media } from \"@artsy/palette\"\nimport { themeGet } from \"@styled-system/theme-get\"\nimport React, { useContext, useRef } from \"react\"\nimport styled from \"styled-components\"\nimport { MousePositionContext } from \"./MousePositionContext\"\n\nconst LABEL_OFFSET = 10\n\n/**\n * Tooltip for bar and line charts\n */\nexport const ChartHoverTooltip = ({ children }) => {\n const ref = useRef(null)\n const { x, y } = useContext(MousePositionContext)\n if (ref.current) {\n // position outside of the render loop to avoid GC churn\n ref.current.style.top = y - LABEL_OFFSET - ref.current.offsetHeight + \"px\"\n ref.current.style.left = x + \"px\"\n }\n return <HoverTooltipPositioner ref={ref}>{children}</HoverTooltipPositioner>\n}\n\n/**\n * Base component for positioning tooltips\n */\nexport const BaseTooltipPositioner = styled(Flex)`\n transform: translateX(-50%);\n pointer-events: none;\n border-radius: 2px;\n`\n\nconst HoverTooltipPositioner = styled(BaseTooltipPositioner)`\n ${media.xs`\n display: none;\n `};\n z-index: 2;\n position: fixed;\n background-color: ${themeGet(\"colors.white100\")};\n box-shadow: ${themeGet(\"effects.dropShadow\")};\n`\n"],"mappings":";;;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAC,uBAAA,CAAAH,OAAA;AACA,IAAAI,iBAAA,GAAAC,sBAAA,CAAAL,OAAA;AACA,IAAAM,qBAAA,GAAAN,OAAA;AAA6D,IAAAO,eAAA;AAAA,SAAAF,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,SAAAG,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAT,wBAAAK,GAAA,EAAAI,WAAA,SAAAA,WAAA,IAAAJ,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,aAAAQ,OAAA,CAAAR,GAAA,yBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAS,KAAA,GAAAN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AAC,GAAAH,WAAA,CAADG,CAAC;IAAEC,CAAC,GAAAJ,WAAA,CAADI,CAAC;EACZ,IAAIN,GAAG,CAACO,OAAO,EAAE;IACf;IACAP,GAAG,CAACO,OAAO,CAACC,KAAK,CAACC,GAAG,GAAGH,CAAC,GAAGV,YAAY,GAAGI,GAAG,CAACO,OAAO,CAACG,YAAY,GAAG,IAAI;IAC1EV,GAAG,CAACO,OAAO,CAACC,KAAK,CAACG,IAAI,GAAGN,CAAC,GAAG,IAAI;EACnC;EACA,oBAAO7C,MAAA,CAAAQ,OAAA,CAAA4C,aAAA,CAACC,sBAAsB;IAACb,GAAG,EAAEA;EAAI,GAAED,QAAQ,CAA0B;AAC9E,CAAC;AAAAe,OAAA,CAAAjB,iBAAA,GAAAA,iBAAA;AATYA,iBAAiB,CAAAkB,WAAA;AAW9B;AACA;AACA;AACO,IAAMC,qBAAqB,GAAG,IAAAC,yBAAM,EAACC,aAAI,CAAC,CAAAC,UAAA;EAAAJ,WAAA;EAAAK,WAAA;AAAA,yEAIhD;AAAAN,OAAA,CAAAE,qBAAA,GAAAA,qBAAA;AAED,IAAMH,sBAAsB,GAAG,IAAAI,yBAAM,EAACD,qBAAqB,CAAC,CAAAG,UAAA;EAAAJ,WAAA;EAAAK,WAAA;AAAA,6EACxDC,cAAK,CAACC,EAAE,CAAAzD,eAAA,KAAAA,eAAA,GAAAwB,sBAAA,kCAKU,IAAAkC,kBAAQ,EAAC,iBAAiB,CAAC,EACjC,IAAAA,kBAAQ,EAAC,oBAAoB,CAAC,CAC7C"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@artsy/palette-charts",
|
|
3
3
|
"sideEffects": false,
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "37.0.0-canary.1357.29995.0",
|
|
5
5
|
"description": "Design system library for react components",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"publishConfig": {
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
"typescript-styled-plugin": "0.10.0"
|
|
116
116
|
},
|
|
117
117
|
"dependencies": {
|
|
118
|
-
"@artsy/palette": "
|
|
118
|
+
"@artsy/palette": "38.0.0-canary.1357.29995.0",
|
|
119
119
|
"@seznam/compose-react-refs": "^1.0.6",
|
|
120
120
|
"@styled-system/theme-get": "^5.1.2",
|
|
121
121
|
"d3-interpolate": "^1.3.2",
|
|
@@ -174,5 +174,5 @@
|
|
|
174
174
|
"url": "http://localhost"
|
|
175
175
|
}
|
|
176
176
|
},
|
|
177
|
-
"gitHead": "
|
|
177
|
+
"gitHead": "e6c8e83a6282a0b17112bc2de7b79d2d26908416"
|
|
178
178
|
}
|