@automattic/charts 1.4.0 → 1.4.2
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 +15 -5
- package/dist/index.cjs +162 -114
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +120 -72
- package/dist/index.js.map +1 -1
- package/package.json +8 -8
- package/src/charts/area-chart/area-chart.tsx +124 -54
- package/src/charts/area-chart/test/area-chart.test.tsx +203 -0
- package/AGENTS.md +0 -78
package/dist/index.js
CHANGED
|
@@ -467,7 +467,7 @@ var require_es6 = __commonJS({
|
|
|
467
467
|
|
|
468
468
|
// src/charts/area-chart/area-chart.tsx
|
|
469
469
|
import { formatNumberCompact as formatNumberCompact3 } from "@automattic/number-formatters";
|
|
470
|
-
import { XYChart as XYChart2,
|
|
470
|
+
import { XYChart as XYChart2, AnimatedAreaSeries, AnimatedAreaStack, Grid as Grid2, Axis as Axis2 } from "@visx/xychart";
|
|
471
471
|
import { __ as __4 } from "@wordpress/i18n";
|
|
472
472
|
import clsx5 from "clsx";
|
|
473
473
|
import { useMemo as useMemo16, useContext as useContext13, forwardRef as forwardRef5, useImperativeHandle as useImperativeHandle4, useState as useState10, useRef as useRef10, useCallback as useCallback9 } from "react";
|
|
@@ -1533,7 +1533,7 @@ import { Group } from "@visx/group";
|
|
|
1533
1533
|
import { LegendItem, LegendLabel, LegendOrdinal, LegendShape } from "@visx/legend";
|
|
1534
1534
|
import { scaleOrdinal } from "@visx/scale";
|
|
1535
1535
|
|
|
1536
|
-
// ../../../node_modules/.pnpm/@wordpress+element@6.
|
|
1536
|
+
// ../../../node_modules/.pnpm/@wordpress+element@6.46.0/node_modules/@wordpress/element/build-module/react.mjs
|
|
1537
1537
|
import {
|
|
1538
1538
|
Children,
|
|
1539
1539
|
cloneElement,
|
|
@@ -4203,6 +4203,42 @@ var AreaChartInternal = /* @__PURE__ */ forwardRef5(({
|
|
|
4203
4203
|
chartRef,
|
|
4204
4204
|
totalPoints: dataSorted[0]?.data.length || 0
|
|
4205
4205
|
});
|
|
4206
|
+
const fixedYDomain = useMemo16(() => {
|
|
4207
|
+
if (!legendInteractive || !dataSorted.length || !dataSorted[0].data.length || stacked && stackOffset !== "none") {
|
|
4208
|
+
return void 0;
|
|
4209
|
+
}
|
|
4210
|
+
if (stacked) {
|
|
4211
|
+
const numPoints = Math.max(...dataSorted.map((s) => s.data.length));
|
|
4212
|
+
let posMax = 0;
|
|
4213
|
+
let negMin = 0;
|
|
4214
|
+
for (let i = 0; i < numPoints; i++) {
|
|
4215
|
+
let posSum = 0;
|
|
4216
|
+
let negSum = 0;
|
|
4217
|
+
for (const series of dataSorted) {
|
|
4218
|
+
const v = Number(series.data[i]?.value);
|
|
4219
|
+
if (Number.isNaN(v)) continue;
|
|
4220
|
+
if (v >= 0) posSum += v;
|
|
4221
|
+
else negSum += v;
|
|
4222
|
+
}
|
|
4223
|
+
if (posSum > posMax) posMax = posSum;
|
|
4224
|
+
if (negSum < negMin) negMin = negSum;
|
|
4225
|
+
}
|
|
4226
|
+
return [negMin, posMax];
|
|
4227
|
+
}
|
|
4228
|
+
let max = -Infinity;
|
|
4229
|
+
let min = Infinity;
|
|
4230
|
+
for (const series of dataSorted) {
|
|
4231
|
+
for (const point of series.data) {
|
|
4232
|
+
const v = Number(point?.value);
|
|
4233
|
+
if (!Number.isNaN(v)) {
|
|
4234
|
+
if (v > max) max = v;
|
|
4235
|
+
if (v < min) min = v;
|
|
4236
|
+
}
|
|
4237
|
+
}
|
|
4238
|
+
}
|
|
4239
|
+
if (max === -Infinity) return void 0;
|
|
4240
|
+
return [Math.min(0, min), max];
|
|
4241
|
+
}, [dataSorted, stacked, stackOffset, legendInteractive]);
|
|
4206
4242
|
const chartOptions = useMemo16(() => {
|
|
4207
4243
|
const formatter = options?.axis?.x?.tickFormat || getFormatter(dataSorted);
|
|
4208
4244
|
return {
|
|
@@ -4231,10 +4267,13 @@ var AreaChartInternal = /* @__PURE__ */ forwardRef5(({
|
|
|
4231
4267
|
nice: true,
|
|
4232
4268
|
// Stacked areas should always include zero so the baseline is meaningful.
|
|
4233
4269
|
zero: stacked,
|
|
4270
|
+
...fixedYDomain ? {
|
|
4271
|
+
domain: fixedYDomain
|
|
4272
|
+
} : {},
|
|
4234
4273
|
...options?.yScale
|
|
4235
4274
|
}
|
|
4236
4275
|
};
|
|
4237
|
-
}, [options, dataSorted, width, stacked]);
|
|
4276
|
+
}, [options, dataSorted, width, stacked, fixedYDomain]);
|
|
4238
4277
|
const defaultMargin = useChartMargin(height, chartOptions, dataSorted, theme);
|
|
4239
4278
|
const error = validateData2(dataSorted);
|
|
4240
4279
|
const isDataValid = !error;
|
|
@@ -4257,10 +4296,33 @@ var AreaChartInternal = /* @__PURE__ */ forwardRef5(({
|
|
|
4257
4296
|
metadata: chartMetadata
|
|
4258
4297
|
});
|
|
4259
4298
|
const prefersReducedMotion = usePrefersReducedMotion();
|
|
4299
|
+
const animationEnabled = !!animation && !prefersReducedMotion;
|
|
4260
4300
|
const accessors = {
|
|
4261
4301
|
xAccessor: (d) => d?.date,
|
|
4262
4302
|
yAccessor: (d) => d?.value
|
|
4263
4303
|
};
|
|
4304
|
+
const zeroYAccessor = useCallback9(() => 0, []);
|
|
4305
|
+
const visibleLabels = useMemo16(() => new Set(seriesWithVisibility.filter((s) => s.isVisible).map((s) => s.series.label)), [seriesWithVisibility]);
|
|
4306
|
+
const filteredRenderTooltip = useCallback9((params) => {
|
|
4307
|
+
if (!legendInteractive) return renderTooltip(params);
|
|
4308
|
+
const datumByKey = params?.tooltipData?.datumByKey;
|
|
4309
|
+
if (!datumByKey) return renderTooltip(params);
|
|
4310
|
+
const filtered = Object.fromEntries(Object.entries(datumByKey).filter(([key]) => visibleLabels.has(key)));
|
|
4311
|
+
if (Object.keys(filtered).length === 0) return null;
|
|
4312
|
+
const nearestDatum = params?.tooltipData?.nearestDatum;
|
|
4313
|
+
const nextNearest = nearestDatum && visibleLabels.has(nearestDatum.key) ? nearestDatum : {
|
|
4314
|
+
...Object.values(filtered)[0],
|
|
4315
|
+
distance: nearestDatum?.distance ?? 0
|
|
4316
|
+
};
|
|
4317
|
+
return renderTooltip({
|
|
4318
|
+
...params,
|
|
4319
|
+
tooltipData: {
|
|
4320
|
+
...params.tooltipData,
|
|
4321
|
+
datumByKey: filtered,
|
|
4322
|
+
nearestDatum: nextNearest
|
|
4323
|
+
}
|
|
4324
|
+
});
|
|
4325
|
+
}, [renderTooltip, legendInteractive, visibleLabels]);
|
|
4264
4326
|
const resolvedFillOpacity = fillOpacity ?? (stacked ? 0.85 : 0.4);
|
|
4265
4327
|
const resolvedWithStroke = withStroke ?? !stacked;
|
|
4266
4328
|
if (error) {
|
|
@@ -4286,6 +4348,35 @@ var AreaChartInternal = /* @__PURE__ */ forwardRef5(({
|
|
|
4286
4348
|
isVisible
|
|
4287
4349
|
}) => isVisible);
|
|
4288
4350
|
const curve = getCurveType(curveType, smoothing);
|
|
4351
|
+
const renderSeries = ({
|
|
4352
|
+
series: seriesData,
|
|
4353
|
+
index,
|
|
4354
|
+
isVisible
|
|
4355
|
+
}) => {
|
|
4356
|
+
const {
|
|
4357
|
+
color,
|
|
4358
|
+
lineStyles
|
|
4359
|
+
} = getElementStyles({
|
|
4360
|
+
data: seriesData,
|
|
4361
|
+
index
|
|
4362
|
+
});
|
|
4363
|
+
return /* @__PURE__ */ _jsx17(AnimatedAreaSeries, {
|
|
4364
|
+
dataKey: seriesData?.label,
|
|
4365
|
+
data: seriesData.data,
|
|
4366
|
+
xAccessor: accessors.xAccessor,
|
|
4367
|
+
yAccessor: isVisible || !legendInteractive ? accessors.yAccessor : zeroYAccessor,
|
|
4368
|
+
fill: color,
|
|
4369
|
+
fillOpacity: resolvedFillOpacity,
|
|
4370
|
+
...stacked ? {} : {
|
|
4371
|
+
renderLine: resolvedWithStroke,
|
|
4372
|
+
curve
|
|
4373
|
+
},
|
|
4374
|
+
lineProps: {
|
|
4375
|
+
stroke: color,
|
|
4376
|
+
...lineStyles
|
|
4377
|
+
}
|
|
4378
|
+
}, seriesData?.label || index);
|
|
4379
|
+
};
|
|
4289
4380
|
return /* @__PURE__ */ _jsx17(SingleChartContext.Provider, {
|
|
4290
4381
|
value: {
|
|
4291
4382
|
chartId,
|
|
@@ -4299,7 +4390,7 @@ var AreaChartInternal = /* @__PURE__ */ forwardRef5(({
|
|
|
4299
4390
|
legendChildren,
|
|
4300
4391
|
gap,
|
|
4301
4392
|
className: clsx5("area-chart", area_chart_module_default["area-chart"], {
|
|
4302
|
-
[area_chart_module_default["area-chart--animated"]]:
|
|
4393
|
+
[area_chart_module_default["area-chart--animated"]]: animationEnabled
|
|
4303
4394
|
}, className),
|
|
4304
4395
|
style: {
|
|
4305
4396
|
width,
|
|
@@ -4348,63 +4439,17 @@ var AreaChartInternal = /* @__PURE__ */ forwardRef5(({
|
|
|
4348
4439
|
width,
|
|
4349
4440
|
height: chartHeight,
|
|
4350
4441
|
children: __4("All series are hidden. Click legend items to show data.", "jetpack-charts")
|
|
4351
|
-
}) : null, !allSeriesHidden && stacked && /* @__PURE__ */ _jsx17(
|
|
4442
|
+
}) : null, !allSeriesHidden && stacked && /* @__PURE__ */ _jsx17(AnimatedAreaStack, {
|
|
4352
4443
|
curve,
|
|
4353
4444
|
offset: stackOffset,
|
|
4354
4445
|
renderLine: resolvedWithStroke,
|
|
4355
|
-
children:
|
|
4356
|
-
|
|
4357
|
-
index
|
|
4358
|
-
}) => {
|
|
4359
|
-
const {
|
|
4360
|
-
color,
|
|
4361
|
-
lineStyles
|
|
4362
|
-
} = getElementStyles({
|
|
4363
|
-
data: seriesData,
|
|
4364
|
-
index
|
|
4365
|
-
});
|
|
4366
|
-
return /* @__PURE__ */ _jsx17(AreaSeries2, {
|
|
4367
|
-
dataKey: seriesData?.label,
|
|
4368
|
-
data: seriesData.data,
|
|
4369
|
-
...accessors,
|
|
4370
|
-
fill: color,
|
|
4371
|
-
fillOpacity: resolvedFillOpacity,
|
|
4372
|
-
lineProps: {
|
|
4373
|
-
stroke: color,
|
|
4374
|
-
...lineStyles
|
|
4375
|
-
}
|
|
4376
|
-
}, seriesData?.label || index);
|
|
4377
|
-
})
|
|
4378
|
-
}), !allSeriesHidden && !stacked && visibleSeries.map(({
|
|
4379
|
-
series: seriesData,
|
|
4380
|
-
index
|
|
4381
|
-
}) => {
|
|
4382
|
-
const {
|
|
4383
|
-
color,
|
|
4384
|
-
lineStyles
|
|
4385
|
-
} = getElementStyles({
|
|
4386
|
-
data: seriesData,
|
|
4387
|
-
index
|
|
4388
|
-
});
|
|
4389
|
-
return /* @__PURE__ */ _jsx17(AreaSeries2, {
|
|
4390
|
-
dataKey: seriesData?.label,
|
|
4391
|
-
data: seriesData.data,
|
|
4392
|
-
...accessors,
|
|
4393
|
-
fill: color,
|
|
4394
|
-
fillOpacity: resolvedFillOpacity,
|
|
4395
|
-
renderLine: resolvedWithStroke,
|
|
4396
|
-
curve,
|
|
4397
|
-
lineProps: {
|
|
4398
|
-
stroke: color,
|
|
4399
|
-
...lineStyles
|
|
4400
|
-
}
|
|
4401
|
-
}, seriesData?.label || index);
|
|
4402
|
-
}), withTooltips && /* @__PURE__ */ _jsxs7(_Fragment4, {
|
|
4446
|
+
children: seriesWithVisibility.map(renderSeries)
|
|
4447
|
+
}), !allSeriesHidden && !stacked && seriesWithVisibility.map(renderSeries), withTooltips && /* @__PURE__ */ _jsxs7(_Fragment4, {
|
|
4403
4448
|
children: [/* @__PURE__ */ _jsx17(AccessibleTooltip, {
|
|
4404
4449
|
detectBounds: true,
|
|
4405
4450
|
snapTooltipToDatumX: true,
|
|
4406
4451
|
snapTooltipToDatumY: !stacked,
|
|
4407
|
-
renderTooltip,
|
|
4452
|
+
renderTooltip: filteredRenderTooltip,
|
|
4408
4453
|
showVerticalCrosshair: withTooltipCrosshairs?.showVertical,
|
|
4409
4454
|
showHorizontalCrosshair: withTooltipCrosshairs?.showHorizontal,
|
|
4410
4455
|
selectedIndex,
|
|
@@ -5823,7 +5868,7 @@ var GeoChartWithProvider = (props) => {
|
|
|
5823
5868
|
GeoChartWithProvider.displayName = "GeoChart";
|
|
5824
5869
|
var GeoChartResponsive = withResponsive(GeoChartWithProvider);
|
|
5825
5870
|
|
|
5826
|
-
// ../../../node_modules/.pnpm/@wordpress+components@
|
|
5871
|
+
// ../../../node_modules/.pnpm/@wordpress+components@33.1.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/utils/hooks/use-update-effect.mjs
|
|
5827
5872
|
function useUpdateEffect(effect, deps) {
|
|
5828
5873
|
const mountedRef = useRef5(false);
|
|
5829
5874
|
useEffect4(() => {
|
|
@@ -7277,7 +7322,7 @@ var css2 = _createEmotion.css;
|
|
|
7277
7322
|
var sheet = _createEmotion.sheet;
|
|
7278
7323
|
var cache = _createEmotion.cache;
|
|
7279
7324
|
|
|
7280
|
-
// ../../../node_modules/.pnpm/@wordpress+components@
|
|
7325
|
+
// ../../../node_modules/.pnpm/@wordpress+components@33.1.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/utils/hooks/use-cx.mjs
|
|
7281
7326
|
var isSerializedStyles = (o) => typeof o !== "undefined" && o !== null && ["name", "styles"].every((p) => typeof o[p] !== "undefined");
|
|
7282
7327
|
var useCx = () => {
|
|
7283
7328
|
const cache2 = __unsafe_useEmotionCache();
|
|
@@ -7364,7 +7409,7 @@ function memize(fn, options) {
|
|
|
7364
7409
|
return memoized;
|
|
7365
7410
|
}
|
|
7366
7411
|
|
|
7367
|
-
// ../../../node_modules/.pnpm/@wordpress+components@
|
|
7412
|
+
// ../../../node_modules/.pnpm/@wordpress+components@33.1.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/utils/colors-values.mjs
|
|
7368
7413
|
var white = "#fff";
|
|
7369
7414
|
var GRAY = {
|
|
7370
7415
|
900: "#1e1e1e",
|
|
@@ -7445,7 +7490,7 @@ var COLORS = Object.freeze({
|
|
|
7445
7490
|
ui: UI
|
|
7446
7491
|
});
|
|
7447
7492
|
|
|
7448
|
-
// ../../../node_modules/.pnpm/@wordpress+components@
|
|
7493
|
+
// ../../../node_modules/.pnpm/@wordpress+components@33.1.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/utils/config-values.mjs
|
|
7449
7494
|
var CONTROL_HEIGHT = "36px";
|
|
7450
7495
|
var CONTROL_PROPS = {
|
|
7451
7496
|
// These values should be shared with TextControl.
|
|
@@ -7505,6 +7550,9 @@ var config_values_default = Object.assign({}, CONTROL_PROPS, {
|
|
|
7505
7550
|
surfaceBorderSubtleColor: "rgba(0, 0, 0, 0.05)",
|
|
7506
7551
|
surfaceBackgroundTertiaryColor: COLORS.white,
|
|
7507
7552
|
surfaceColor: COLORS.white,
|
|
7553
|
+
// Modal exit animation: `use-modal-exit-animation` parses this for the
|
|
7554
|
+
// `animationend` timeout race; keep the numeric duration equal to
|
|
7555
|
+
// `--wpds-motion-duration-md` on `.components-modal__frame` in modal/style.scss.
|
|
7508
7556
|
transitionDuration: "200ms",
|
|
7509
7557
|
transitionDurationFast: "160ms",
|
|
7510
7558
|
transitionDurationFaster: "120ms",
|
|
@@ -7513,14 +7561,14 @@ var config_values_default = Object.assign({}, CONTROL_PROPS, {
|
|
|
7513
7561
|
transitionTimingFunctionControl: "cubic-bezier(0.12, 0.8, 0.32, 1)"
|
|
7514
7562
|
});
|
|
7515
7563
|
|
|
7516
|
-
// ../../../node_modules/.pnpm/@wordpress+components@
|
|
7564
|
+
// ../../../node_modules/.pnpm/@wordpress+components@33.1.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/context/context-system-provider.mjs
|
|
7517
7565
|
var import_es6 = __toESM(require_es6(), 1);
|
|
7518
7566
|
import deepmerge2 from "deepmerge";
|
|
7519
7567
|
|
|
7520
|
-
// ../../../node_modules/.pnpm/@wordpress+warning@3.
|
|
7568
|
+
// ../../../node_modules/.pnpm/@wordpress+warning@3.46.0/node_modules/@wordpress/warning/build-module/utils.mjs
|
|
7521
7569
|
var logged = /* @__PURE__ */ new Set();
|
|
7522
7570
|
|
|
7523
|
-
// ../../../node_modules/.pnpm/@wordpress+warning@3.
|
|
7571
|
+
// ../../../node_modules/.pnpm/@wordpress+warning@3.46.0/node_modules/@wordpress/warning/build-module/index.mjs
|
|
7524
7572
|
function isDev() {
|
|
7525
7573
|
return globalThis.SCRIPT_DEBUG === true;
|
|
7526
7574
|
}
|
|
@@ -7539,7 +7587,7 @@ function warning(message) {
|
|
|
7539
7587
|
logged.add(message);
|
|
7540
7588
|
}
|
|
7541
7589
|
|
|
7542
|
-
// ../../../node_modules/.pnpm/@wordpress+components@
|
|
7590
|
+
// ../../../node_modules/.pnpm/@wordpress+components@33.1.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/context/context-system-provider.mjs
|
|
7543
7591
|
import { jsx as _jsx23 } from "react/jsx-runtime";
|
|
7544
7592
|
var ComponentsContext = createContext3(
|
|
7545
7593
|
/** @type {Record<string, any>} */
|
|
@@ -7582,19 +7630,19 @@ var BaseContextSystemProvider = ({
|
|
|
7582
7630
|
};
|
|
7583
7631
|
var ContextSystemProvider = memo(BaseContextSystemProvider);
|
|
7584
7632
|
|
|
7585
|
-
// ../../../node_modules/.pnpm/@wordpress+components@
|
|
7633
|
+
// ../../../node_modules/.pnpm/@wordpress+components@33.1.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/context/constants.mjs
|
|
7586
7634
|
var COMPONENT_NAMESPACE = "data-wp-component";
|
|
7587
7635
|
var CONNECTED_NAMESPACE = "data-wp-c16t";
|
|
7588
7636
|
var CONNECT_STATIC_NAMESPACE = "__contextSystemKey__";
|
|
7589
7637
|
|
|
7590
|
-
// ../../../node_modules/.pnpm/@wordpress+components@
|
|
7638
|
+
// ../../../node_modules/.pnpm/@wordpress+components@33.1.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/context/get-styled-class-name-from-key.mjs
|
|
7591
7639
|
function getStyledClassName(namespace) {
|
|
7592
7640
|
const kebab = paramCase(namespace);
|
|
7593
7641
|
return `components-${kebab}`;
|
|
7594
7642
|
}
|
|
7595
7643
|
var getStyledClassNameFromKey = memize(getStyledClassName);
|
|
7596
7644
|
|
|
7597
|
-
// ../../../node_modules/.pnpm/@wordpress+components@
|
|
7645
|
+
// ../../../node_modules/.pnpm/@wordpress+components@33.1.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/context/context-connect.mjs
|
|
7598
7646
|
function contextConnect(Component2, namespace) {
|
|
7599
7647
|
return _contextConnect(Component2, namespace, {
|
|
7600
7648
|
forwardsRef: true
|
|
@@ -7619,7 +7667,7 @@ function _contextConnect(Component2, namespace, options) {
|
|
|
7619
7667
|
});
|
|
7620
7668
|
}
|
|
7621
7669
|
|
|
7622
|
-
// ../../../node_modules/.pnpm/@wordpress+components@
|
|
7670
|
+
// ../../../node_modules/.pnpm/@wordpress+components@33.1.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/context/utils.mjs
|
|
7623
7671
|
function getNamespace(componentName) {
|
|
7624
7672
|
return {
|
|
7625
7673
|
[COMPONENT_NAMESPACE]: componentName
|
|
@@ -7631,7 +7679,7 @@ function getConnectedNamespace() {
|
|
|
7631
7679
|
};
|
|
7632
7680
|
}
|
|
7633
7681
|
|
|
7634
|
-
// ../../../node_modules/.pnpm/@wordpress+components@
|
|
7682
|
+
// ../../../node_modules/.pnpm/@wordpress+components@33.1.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/context/use-context-system.mjs
|
|
7635
7683
|
function useContextSystem(props, namespace) {
|
|
7636
7684
|
const contextSystemProps = useComponentsContext();
|
|
7637
7685
|
if (typeof namespace === "undefined") {
|
|
@@ -7815,7 +7863,7 @@ var createStyled = function createStyled2(tag, options) {
|
|
|
7815
7863
|
};
|
|
7816
7864
|
};
|
|
7817
7865
|
|
|
7818
|
-
// ../../../node_modules/.pnpm/@wordpress+components@
|
|
7866
|
+
// ../../../node_modules/.pnpm/@wordpress+components@33.1.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/view/component.mjs
|
|
7819
7867
|
import { jsx as _jsx24 } from "react/jsx-runtime";
|
|
7820
7868
|
var PolymorphicDiv = /* @__PURE__ */ createStyled("div", process.env.NODE_ENV === "production" ? {
|
|
7821
7869
|
target: "e19lxcc00"
|
|
@@ -7838,7 +7886,7 @@ var View = Object.assign(forwardRef(UnforwardedView), {
|
|
|
7838
7886
|
});
|
|
7839
7887
|
var component_default = View;
|
|
7840
7888
|
|
|
7841
|
-
// ../../../node_modules/.pnpm/@wordpress+components@
|
|
7889
|
+
// ../../../node_modules/.pnpm/@wordpress+components@33.1.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/utils/use-responsive-value.mjs
|
|
7842
7890
|
var breakpoints = ["40em", "52em", "64em"];
|
|
7843
7891
|
var useBreakpointIndex = (options = {}) => {
|
|
7844
7892
|
const {
|
|
@@ -7881,7 +7929,7 @@ function useResponsiveValue(values, options = {}) {
|
|
|
7881
7929
|
return array[index >= array.length ? array.length - 1 : index];
|
|
7882
7930
|
}
|
|
7883
7931
|
|
|
7884
|
-
// ../../../node_modules/.pnpm/@wordpress+components@
|
|
7932
|
+
// ../../../node_modules/.pnpm/@wordpress+components@33.1.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/grid/utils.mjs
|
|
7885
7933
|
var ALIGNMENTS = {
|
|
7886
7934
|
bottom: {
|
|
7887
7935
|
alignItems: "flex-end",
|
|
@@ -7932,7 +7980,7 @@ function getAlignmentProps(alignment) {
|
|
|
7932
7980
|
return alignmentProps;
|
|
7933
7981
|
}
|
|
7934
7982
|
|
|
7935
|
-
// ../../../node_modules/.pnpm/@wordpress+components@
|
|
7983
|
+
// ../../../node_modules/.pnpm/@wordpress+components@33.1.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/grid/hook.mjs
|
|
7936
7984
|
function useGrid(props) {
|
|
7937
7985
|
const {
|
|
7938
7986
|
align,
|
|
@@ -7978,7 +8026,7 @@ function useGrid(props) {
|
|
|
7978
8026
|
};
|
|
7979
8027
|
}
|
|
7980
8028
|
|
|
7981
|
-
// ../../../node_modules/.pnpm/@wordpress+components@
|
|
8029
|
+
// ../../../node_modules/.pnpm/@wordpress+components@33.1.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/build-module/grid/component.mjs
|
|
7982
8030
|
import { jsx as _jsx25 } from "react/jsx-runtime";
|
|
7983
8031
|
function UnconnectedGrid(props, forwardedRef) {
|
|
7984
8032
|
const gridProps = useGrid(props);
|