impaktapps-design 0.2.77 → 0.2.79
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.
|
@@ -10453,6 +10453,7 @@ const BottomAxis = ({
|
|
|
10453
10453
|
tickLabelProps: () => {
|
|
10454
10454
|
var _a2, _b2, _c2, _d2;
|
|
10455
10455
|
return {
|
|
10456
|
+
display: innerWidth < 600 ? "none" : "inline-block",
|
|
10456
10457
|
fill: (_b2 = (_a2 = value.style) == null ? void 0 : _a2.labelStyle) == null ? void 0 : _b2.tickLabelColor,
|
|
10457
10458
|
fontSize: ((_d2 = (_c2 = value.style) == null ? void 0 : _c2.labelStyle) == null ? void 0 : _d2.tickFontSize) || 11,
|
|
10458
10459
|
textAnchor: "middle"
|
|
@@ -11752,9 +11753,9 @@ const DrawPieGraph = ({
|
|
|
11752
11753
|
tooltipData: [datum2[arr[0]], datum2[arr[1]]]
|
|
11753
11754
|
});
|
|
11754
11755
|
};
|
|
11755
|
-
const
|
|
11756
|
+
const innerWidth2 = parentWidth - 40;
|
|
11756
11757
|
const innerHeight = parentHeight - 40;
|
|
11757
|
-
const centerX =
|
|
11758
|
+
const centerX = innerWidth2 / 2;
|
|
11758
11759
|
const centerY = innerHeight / 2;
|
|
11759
11760
|
const left2 = centerX + 20;
|
|
11760
11761
|
const top2 = centerY + 20;
|
|
@@ -11785,7 +11786,7 @@ const DrawPieGraph = ({
|
|
|
11785
11786
|
const letter = ((_b2 = (_a2 = value == null ? void 0 : value.style) == null ? void 0 : _a2.pieStyle) == null ? void 0 : _b2.showPieLabel) ? arc2.data[arr[0]] : arc2.data[arr[1]];
|
|
11786
11787
|
const [centriodX, centriodY] = pie2.path.centroid(arc2);
|
|
11787
11788
|
const arcPath = pie2.path(arc2);
|
|
11788
|
-
const arcFill = getLetterFrequencyColor(
|
|
11789
|
+
const arcFill = getLetterFrequencyColor(arc2.data[arr[0]]);
|
|
11789
11790
|
return /* @__PURE__ */ jsxs("g", {
|
|
11790
11791
|
onMouseOut: hideTooltip,
|
|
11791
11792
|
onMouseOver: (e3) => handleMouse(e3, arc2.data),
|
|
@@ -17267,13 +17268,13 @@ function _objectWithoutPropertiesLoose$7(source, excluded) {
|
|
|
17267
17268
|
}
|
|
17268
17269
|
function BaseGrid(_ref) {
|
|
17269
17270
|
var _ref$rows = _ref.rows, rows = _ref$rows === void 0 ? true : _ref$rows, _ref$columns = _ref.columns, columns = _ref$columns === void 0 ? true : _ref$columns, GridRowsComponent = _ref.GridRowsComponent, GridColumnsComponent = _ref.GridColumnsComponent, props = _objectWithoutPropertiesLoose$7(_ref, _excluded$o);
|
|
17270
|
-
var _useContext = useContext(DataContext$1), theme = _useContext.theme, columnsScale = _useContext.xScale, rowsScale = _useContext.yScale, margin2 = _useContext.margin,
|
|
17271
|
+
var _useContext = useContext(DataContext$1), theme = _useContext.theme, columnsScale = _useContext.xScale, rowsScale = _useContext.yScale, margin2 = _useContext.margin, innerWidth2 = _useContext.innerWidth, innerHeight = _useContext.innerHeight;
|
|
17271
17272
|
var gridLineStyles = theme == null ? void 0 : theme.gridStyles;
|
|
17272
17273
|
return /* @__PURE__ */ jsxs(Fragment, {
|
|
17273
|
-
children: [rows && rowsScale &&
|
|
17274
|
+
children: [rows && rowsScale && innerWidth2 != null && /* @__PURE__ */ jsx(GridRowsComponent, {
|
|
17274
17275
|
left: margin2 == null ? void 0 : margin2.left,
|
|
17275
17276
|
lineStyle: gridLineStyles,
|
|
17276
|
-
width:
|
|
17277
|
+
width: innerWidth2,
|
|
17277
17278
|
scale: rowsScale,
|
|
17278
17279
|
...props
|
|
17279
17280
|
}), columns && columnsScale && innerHeight != null && /* @__PURE__ */ jsx(GridColumnsComponent, {
|
|
@@ -17398,7 +17399,7 @@ function defaultRenderGlyph$1(props) {
|
|
|
17398
17399
|
function TooltipInner(_ref2) {
|
|
17399
17400
|
var _tooltipContext$toolt, _nearestDatum$key, _ref12, _theme$gridStyles$str, _theme$gridStyles2, _theme$htmlLabel3, _ref13, _theme$gridStyles$str2, _theme$gridStyles3, _theme$htmlLabel4, _theme$backgroundColo, _theme$htmlLabel5, _theme$htmlLabel6;
|
|
17400
17401
|
var debounce2 = _ref2.debounce, detectBounds = _ref2.detectBounds, horizontalCrosshairStyle = _ref2.horizontalCrosshairStyle, glyphStyle = _ref2.glyphStyle, renderTooltip = _ref2.renderTooltip, _ref2$renderGlyph = _ref2.renderGlyph, renderGlyph = _ref2$renderGlyph === void 0 ? defaultRenderGlyph$1 : _ref2$renderGlyph, resizeObserverPolyfillProp = _ref2.resizeObserverPolyfill, _ref2$scroll = _ref2.scroll, scroll = _ref2$scroll === void 0 ? true : _ref2$scroll, _ref2$showDatumGlyph = _ref2.showDatumGlyph, showDatumGlyph = _ref2$showDatumGlyph === void 0 ? false : _ref2$showDatumGlyph, _ref2$showHorizontalC = _ref2.showHorizontalCrosshair, showHorizontalCrosshair = _ref2$showHorizontalC === void 0 ? false : _ref2$showHorizontalC, _ref2$showSeriesGlyph = _ref2.showSeriesGlyphs, showSeriesGlyphs = _ref2$showSeriesGlyph === void 0 ? false : _ref2$showSeriesGlyph, _ref2$showVerticalCro = _ref2.showVerticalCrosshair, showVerticalCrosshair = _ref2$showVerticalCro === void 0 ? false : _ref2$showVerticalCro, _ref2$snapTooltipToDa = _ref2.snapTooltipToDatumX, snapTooltipToDatumX = _ref2$snapTooltipToDa === void 0 ? false : _ref2$snapTooltipToDa, _ref2$snapTooltipToDa2 = _ref2.snapTooltipToDatumY, snapTooltipToDatumY = _ref2$snapTooltipToDa2 === void 0 ? false : _ref2$snapTooltipToDa2, verticalCrosshairStyle = _ref2.verticalCrosshairStyle, zIndex2 = _ref2.zIndex, tooltipProps = _objectWithoutPropertiesLoose$5(_ref2, _excluded$m);
|
|
17401
|
-
var _ref3 = useContext(DataContext$1) || {}, colorScale = _ref3.colorScale, theme = _ref3.theme, innerHeight = _ref3.innerHeight,
|
|
17402
|
+
var _ref3 = useContext(DataContext$1) || {}, colorScale = _ref3.colorScale, theme = _ref3.theme, innerHeight = _ref3.innerHeight, innerWidth2 = _ref3.innerWidth, margin2 = _ref3.margin, xScale = _ref3.xScale, yScale = _ref3.yScale, dataRegistry = _ref3.dataRegistry, resizeObserverPolyfill = _ref3.resizeObserverPolyfill;
|
|
17402
17403
|
var tooltipContext = useContext(TooltipContext$1);
|
|
17403
17404
|
var _useTooltipInPortal = useTooltipInPortal({
|
|
17404
17405
|
debounce: debounce2,
|
|
@@ -17525,12 +17526,12 @@ function TooltipInner(_ref2) {
|
|
|
17525
17526
|
detectBounds: false,
|
|
17526
17527
|
style: TOOLTIP_NO_STYLE,
|
|
17527
17528
|
children: /* @__PURE__ */ jsx("svg", {
|
|
17528
|
-
width:
|
|
17529
|
+
width: innerWidth2,
|
|
17529
17530
|
height: "1",
|
|
17530
17531
|
overflow: "visible",
|
|
17531
17532
|
children: /* @__PURE__ */ jsx("line", {
|
|
17532
17533
|
x1: 0,
|
|
17533
|
-
x2:
|
|
17534
|
+
x2: innerWidth2,
|
|
17534
17535
|
y1: 0,
|
|
17535
17536
|
y2: 0,
|
|
17536
17537
|
strokeWidth: 1.5,
|
|
@@ -18526,7 +18527,7 @@ function DataProvider(_ref) {
|
|
|
18526
18527
|
var contextTheme = useContext(ThemeContext$2);
|
|
18527
18528
|
var theme = propsTheme || contextTheme;
|
|
18528
18529
|
var _useDimensions = useDimensions(initialDimensions), _useDimensions$ = _useDimensions[0], width2 = _useDimensions$.width, height2 = _useDimensions$.height, margin2 = _useDimensions$.margin, setDimensions = _useDimensions[1];
|
|
18529
|
-
var
|
|
18530
|
+
var innerWidth2 = Math.max(0, width2 - margin2.left - margin2.right);
|
|
18530
18531
|
var innerHeight = Math.max(0, height2 - margin2.top - margin2.bottom);
|
|
18531
18532
|
var dataRegistry = useDataRegistry();
|
|
18532
18533
|
var _useScales = useScales({
|
|
@@ -18557,14 +18558,14 @@ function DataProvider(_ref) {
|
|
|
18557
18558
|
width: width2,
|
|
18558
18559
|
height: height2,
|
|
18559
18560
|
margin: margin2,
|
|
18560
|
-
innerWidth,
|
|
18561
|
+
innerWidth: innerWidth2,
|
|
18561
18562
|
innerHeight,
|
|
18562
18563
|
setDimensions,
|
|
18563
18564
|
horizontal,
|
|
18564
18565
|
resizeObserverPolyfill
|
|
18565
18566
|
};
|
|
18566
18567
|
},
|
|
18567
|
-
[colorScale, dataRegistry, height2, horizontal, innerHeight,
|
|
18568
|
+
[colorScale, dataRegistry, height2, horizontal, innerHeight, innerWidth2, margin2, setDimensions, theme, width2, xScale, yScale, resizeObserverPolyfill]
|
|
18568
18569
|
);
|
|
18569
18570
|
return /* @__PURE__ */ jsx(DataContext$1.Provider, {
|
|
18570
18571
|
value,
|