@automattic/charts 4.10.0 → 4.11.1
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 +19 -0
- package/TOKENS.md +7 -3
- package/dist/index.cjs +337 -708
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +52 -3
- package/dist/index.d.cts +39 -39
- package/dist/index.d.ts +39 -39
- package/dist/index.js +308 -660
- package/dist/index.js.map +1 -1
- package/dist/visx/group/index.js +1 -2
- package/dist/visx/legend/index.js +1 -2
- package/dist/visx/text/index.js +1 -2
- package/package.json +13 -12
- package/src/charts/conversion-funnel-chart/conversion-funnel-chart.module.scss +5 -0
- package/src/charts/geo-chart/geo-chart.module.scss +27 -0
- package/src/charts/geo-chart/geo-chart.tsx +68 -43
- package/src/charts/geo-chart/private/use-tooltip-position.ts +106 -0
- package/src/charts/geo-chart/test/geo-chart.test.tsx +68 -42
- package/src/charts/geo-chart/test/use-tooltip-position.test.ts +43 -0
- package/src/charts/heatmap-chart/heatmap-chart.module.scss +3 -3
- package/src/charts/heatmap-chart/private/heatmap-scale.ts +48 -43
- package/src/charts/heatmap-chart/test/heatmap-chart.test.tsx +5 -5
- package/src/charts/heatmap-chart/test/heatmap-scale.test.ts +55 -27
- package/src/charts/heatmap-chart/types.ts +1 -1
- package/src/charts/leaderboard-chart/test/leaderboard-chart.test.tsx +8 -5
- package/src/components/legend/private/base-legend.module.scss +5 -0
- package/src/components/legend/private/base-legend.tsx +8 -2
- package/src/components/tooltip/_surface.scss +19 -0
- package/src/components/tooltip/private/bounded-tooltip.tsx +2 -2
- package/src/components/tooltip/tooltip-box.module.scss +3 -17
- package/src/styles/chart-scope.scss +6 -4
- package/src/styles/test/chart-scope.test.ts +6 -2
package/dist/index.js
CHANGED
|
@@ -28,7 +28,6 @@ import { Chart } from "react-google-charts";
|
|
|
28
28
|
import DOMPurify from "dompurify";
|
|
29
29
|
import { __assign } from "tslib";
|
|
30
30
|
import "@babel/runtime/helpers/esm/extends";
|
|
31
|
-
import "@babel/runtime/helpers/extends";
|
|
32
31
|
import { Icon, chevronRight } from "@wordpress/icons";
|
|
33
32
|
import { arc, pie } from "@visx/shape";
|
|
34
33
|
//#region \0rolldown/runtime.js
|
|
@@ -38,7 +37,7 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
38
37
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
39
38
|
var __getProtoOf = Object.getPrototypeOf;
|
|
40
39
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
41
|
-
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
|
|
40
|
+
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod, mod.exports), cb = null), mod.exports);
|
|
42
41
|
var __copyProps = (to, from, except, desc) => {
|
|
43
42
|
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
44
43
|
key = keys[i];
|
|
@@ -2093,6 +2092,7 @@ function valueOrIdentityString(_) {
|
|
|
2093
2092
|
//#region src/components/legend/private/base-legend.module.scss
|
|
2094
2093
|
var base_legend_module_default = {
|
|
2095
2094
|
"legend": "a8ccharts-04TogW-legend",
|
|
2095
|
+
"legend--horizontal": "a8ccharts-04TogW-legend--horizontal",
|
|
2096
2096
|
"legend-item": "a8ccharts-04TogW-legend-item",
|
|
2097
2097
|
"legend-item--inactive": "a8ccharts-04TogW-legend-item--inactive",
|
|
2098
2098
|
"legend-item--interactive": "a8ccharts-04TogW-legend-item--interactive",
|
|
@@ -2194,12 +2194,12 @@ const BaseLegend = forwardRef(({ items: allItems, className, orientation = "hori
|
|
|
2194
2194
|
children: (labels) => /* @__PURE__ */ jsx(Stack, {
|
|
2195
2195
|
ref,
|
|
2196
2196
|
direction: orientation === "vertical" ? "column" : "row",
|
|
2197
|
-
gap: orientation === "vertical" ? "sm" :
|
|
2197
|
+
gap: orientation === "vertical" ? "sm" : void 0,
|
|
2198
2198
|
align: orientation === "vertical" ? flexAlignment : void 0,
|
|
2199
2199
|
justify: orientation === "horizontal" ? flexAlignment : void 0,
|
|
2200
2200
|
wrap: orientation === "horizontal" ? "wrap" : void 0,
|
|
2201
2201
|
role: interactive ? void 0 : "list",
|
|
2202
|
-
className: clsx(standaloneScopeClass, base_legend_module_default.legend, className),
|
|
2202
|
+
className: clsx(standaloneScopeClass, base_legend_module_default.legend, orientation === "horizontal" && base_legend_module_default["legend--horizontal"], className),
|
|
2203
2203
|
style: theme.legend?.containerStyles,
|
|
2204
2204
|
children: labels.map((label, i) => {
|
|
2205
2205
|
const matchedItem = items[i];
|
|
@@ -2624,9 +2624,6 @@ const BaseTooltip = ({ data, top, left, component: Component = LabelValueContent
|
|
|
2624
2624
|
children: content
|
|
2625
2625
|
});
|
|
2626
2626
|
};
|
|
2627
|
-
//#endregion
|
|
2628
|
-
//#region src/components/tooltip/private/bounded-tooltip.tsx
|
|
2629
|
-
const DEFAULT_OFFSET = 10;
|
|
2630
2627
|
const POINTER_HEIGHT = 6;
|
|
2631
2628
|
const clamp = (position, min, max, size) => Math.min(Math.max(position, min), Math.max(min, max - size));
|
|
2632
2629
|
const isClipping = (element) => {
|
|
@@ -2723,7 +2720,7 @@ const getBoundedPosition = ({ left, top, offsetLeft, offsetTop, box, wrapper, bo
|
|
|
2723
2720
|
* @param props.placement - Below-axis, beside without vertical flipping, or automatic flipping.
|
|
2724
2721
|
* @return The tooltip box.
|
|
2725
2722
|
*/
|
|
2726
|
-
const BoundedTooltip = ({ left = 0, top = 0, offsetLeft =
|
|
2723
|
+
const BoundedTooltip = ({ left = 0, top = 0, offsetLeft = 10, offsetTop = 10, style, unstyled = false, className, children, placement = "auto", ...rest }) => {
|
|
2727
2724
|
const nodeRef = useRef(null);
|
|
2728
2725
|
const clipRef = useRef(null);
|
|
2729
2726
|
const [position, setPosition] = useState(null);
|
|
@@ -7455,6 +7452,91 @@ function sanitizeHtml(html) {
|
|
|
7455
7452
|
//#region src/charts/geo-chart/geo-chart.module.scss
|
|
7456
7453
|
var geo_chart_module_default = { "container": "a8ccharts-8hS2IW-container" };
|
|
7457
7454
|
//#endregion
|
|
7455
|
+
//#region src/charts/geo-chart/private/use-tooltip-position.ts
|
|
7456
|
+
const TOOLTIP_CLASS = "google-visualization-tooltip";
|
|
7457
|
+
const isTooltip = (node) => node instanceof HTMLElement && node.classList.contains(TOOLTIP_CLASS);
|
|
7458
|
+
/**
|
|
7459
|
+
* Moves Google's HTML tooltip to where the other chart tooltips sit, just off the cursor. Google places it about 30px away and has no option for it.
|
|
7460
|
+
*
|
|
7461
|
+
* @param containerRef - The element Google draws the chart into.
|
|
7462
|
+
*/
|
|
7463
|
+
function useTooltipPosition(containerRef) {
|
|
7464
|
+
useEffect(() => {
|
|
7465
|
+
const container = containerRef.current;
|
|
7466
|
+
if (!container || typeof MutationObserver === "undefined") return;
|
|
7467
|
+
let pointer = null;
|
|
7468
|
+
let clip = null;
|
|
7469
|
+
const ownStyles = /* @__PURE__ */ new WeakMap();
|
|
7470
|
+
const place = (tooltip) => {
|
|
7471
|
+
const parent = tooltip.offsetParent;
|
|
7472
|
+
if (!pointer || !parent) return;
|
|
7473
|
+
if (clip?.parent !== parent) clip = {
|
|
7474
|
+
parent,
|
|
7475
|
+
element: findClippingAncestor(parent)
|
|
7476
|
+
};
|
|
7477
|
+
const parentRect = parent.getBoundingClientRect();
|
|
7478
|
+
const clipRect = clip.element?.getBoundingClientRect() ?? {
|
|
7479
|
+
left: 0,
|
|
7480
|
+
top: 0,
|
|
7481
|
+
right: window.innerWidth,
|
|
7482
|
+
bottom: window.innerHeight
|
|
7483
|
+
};
|
|
7484
|
+
const { x, y } = getBoundedPosition({
|
|
7485
|
+
left: pointer.x - parentRect.left,
|
|
7486
|
+
top: pointer.y - parentRect.top,
|
|
7487
|
+
offsetLeft: 10,
|
|
7488
|
+
offsetTop: 10,
|
|
7489
|
+
box: {
|
|
7490
|
+
width: tooltip.offsetWidth,
|
|
7491
|
+
height: tooltip.offsetHeight
|
|
7492
|
+
},
|
|
7493
|
+
wrapper: {
|
|
7494
|
+
left: 0,
|
|
7495
|
+
top: 0,
|
|
7496
|
+
right: parentRect.width,
|
|
7497
|
+
bottom: parentRect.height
|
|
7498
|
+
},
|
|
7499
|
+
bounds: {
|
|
7500
|
+
left: clipRect.left - parentRect.left,
|
|
7501
|
+
top: clipRect.top - parentRect.top,
|
|
7502
|
+
right: clipRect.right - parentRect.left,
|
|
7503
|
+
bottom: clipRect.bottom - parentRect.top
|
|
7504
|
+
}
|
|
7505
|
+
});
|
|
7506
|
+
tooltip.style.left = `${x}px`;
|
|
7507
|
+
tooltip.style.top = `${y}px`;
|
|
7508
|
+
ownStyles.set(tooltip, tooltip.style.cssText);
|
|
7509
|
+
};
|
|
7510
|
+
const trackPointer = (event) => {
|
|
7511
|
+
pointer = {
|
|
7512
|
+
x: event.clientX,
|
|
7513
|
+
y: event.clientY
|
|
7514
|
+
};
|
|
7515
|
+
};
|
|
7516
|
+
const observer = new MutationObserver((records) => {
|
|
7517
|
+
const tooltips = /* @__PURE__ */ new Set();
|
|
7518
|
+
for (const record of records) {
|
|
7519
|
+
if (isTooltip(record.target)) tooltips.add(record.target);
|
|
7520
|
+
record.addedNodes.forEach((node) => isTooltip(node) && tooltips.add(node));
|
|
7521
|
+
}
|
|
7522
|
+
for (const tooltip of tooltips) if (ownStyles.get(tooltip) !== tooltip.style.cssText) place(tooltip);
|
|
7523
|
+
});
|
|
7524
|
+
container.addEventListener("mouseover", trackPointer, true);
|
|
7525
|
+
container.addEventListener("mousemove", trackPointer, true);
|
|
7526
|
+
observer.observe(container, {
|
|
7527
|
+
childList: true,
|
|
7528
|
+
subtree: true,
|
|
7529
|
+
attributes: true,
|
|
7530
|
+
attributeFilter: ["style"]
|
|
7531
|
+
});
|
|
7532
|
+
return () => {
|
|
7533
|
+
container.removeEventListener("mouseover", trackPointer, true);
|
|
7534
|
+
container.removeEventListener("mousemove", trackPointer, true);
|
|
7535
|
+
observer.disconnect();
|
|
7536
|
+
};
|
|
7537
|
+
}, [containerRef]);
|
|
7538
|
+
}
|
|
7539
|
+
//#endregion
|
|
7458
7540
|
//#region src/charts/geo-chart/geo-chart.tsx
|
|
7459
7541
|
/**
|
|
7460
7542
|
* External dependencies
|
|
@@ -7497,6 +7579,23 @@ function involvesGeoChartErrorElement(node) {
|
|
|
7497
7579
|
if (!(node instanceof HTMLElement)) return false;
|
|
7498
7580
|
return node.id.startsWith(GOOGLE_CHARTS_ERROR_ID_PREFIX) || node.querySelector(`[id^="${GOOGLE_CHARTS_ERROR_ID_PREFIX}"]`) !== null;
|
|
7499
7581
|
}
|
|
7582
|
+
const isTooltipColumn = (column) => typeof column === "object" && column !== null && "role" in column && column.role === "tooltip";
|
|
7583
|
+
const hasHtmlFlag = (columnOrCell) => typeof columnOrCell === "object" && columnOrCell !== null && "p" in columnOrCell && typeof columnOrCell.p === "object" && columnOrCell.p !== null && "html" in columnOrCell.p && !!columnOrCell.p.html;
|
|
7584
|
+
const sanitizeIfString = (value) => typeof value === "string" ? sanitizeHtml(value) : value;
|
|
7585
|
+
/**
|
|
7586
|
+
* Sanitizes a tooltip cell Google will render as markup, whether a string or a `{ v, f, p }` object.
|
|
7587
|
+
*
|
|
7588
|
+
* @param cell - The tooltip cell.
|
|
7589
|
+
* @return The cell with its markup sanitized.
|
|
7590
|
+
*/
|
|
7591
|
+
function sanitizeTooltipCell(cell) {
|
|
7592
|
+
if (typeof cell !== "object" || cell === null) return sanitizeIfString(cell);
|
|
7593
|
+
return {
|
|
7594
|
+
...cell,
|
|
7595
|
+
..."v" in cell && { v: sanitizeIfString(cell.v) },
|
|
7596
|
+
..."f" in cell && { f: sanitizeIfString(cell.f) }
|
|
7597
|
+
};
|
|
7598
|
+
}
|
|
7500
7599
|
/**
|
|
7501
7600
|
* Normalizes the raw Google Charts error event into the GeoChart error shape.
|
|
7502
7601
|
*
|
|
@@ -7542,6 +7641,7 @@ const GeoChartInternal = ({ className, data, ariaLabel, width, height, region =
|
|
|
7542
7641
|
const scopeElement = useChartScopeElement();
|
|
7543
7642
|
const containerRef = useRef(null);
|
|
7544
7643
|
const reportedErrorIdsRef = useRef(/* @__PURE__ */ new Set());
|
|
7644
|
+
const [isLoaded, setIsLoaded] = useState(false);
|
|
7545
7645
|
useEffect(() => {
|
|
7546
7646
|
const container = containerRef.current;
|
|
7547
7647
|
if (!onError || !container || typeof MutationObserver === "undefined") return;
|
|
@@ -7562,6 +7662,8 @@ const GeoChartInternal = ({ className, data, ariaLabel, width, height, region =
|
|
|
7562
7662
|
reportRenderedErrors();
|
|
7563
7663
|
return () => observer.disconnect();
|
|
7564
7664
|
}, [onError]);
|
|
7665
|
+
useTooltipPosition(containerRef);
|
|
7666
|
+
const handleLoad = useCallback(() => setIsLoaded(true), []);
|
|
7565
7667
|
const loadingPlaceholder = /* @__PURE__ */ jsx(Center, {
|
|
7566
7668
|
className: clsx("geo-chart", geo_chart_module_default.container, className),
|
|
7567
7669
|
style: {
|
|
@@ -7575,28 +7677,18 @@ const GeoChartInternal = ({ className, data, ariaLabel, width, height, region =
|
|
|
7575
7677
|
const backgroundColorHex = normalizeColorToHex(CATALOG_POINTERS.background, scopeElement, resolveCssVariable) || DEFAULT_BACKGROUND_COLOR;
|
|
7576
7678
|
const defaultFillColorHex = normalizeColorToHex(CATALOG_POINTERS.surfaceSecondary, scopeElement, resolveCssVariable) || DEFAULT_FEATURE_FILL_COLOR;
|
|
7577
7679
|
const sanitizedData = useMemo(() => {
|
|
7578
|
-
if (data.length === 0) return
|
|
7579
|
-
|
|
7580
|
-
|
|
7581
|
-
|
|
7582
|
-
|
|
7583
|
-
|
|
7584
|
-
const col = data[0][i];
|
|
7585
|
-
if (typeof col === "object" && col !== null && "role" in col && col.role === "tooltip" && "p" in col && typeof col.p === "object" && col.p !== null && "html" in col.p && col.p.html === true) htmlTooltipIndices.push(i);
|
|
7586
|
-
}
|
|
7587
|
-
if (htmlTooltipIndices.length === 0) return {
|
|
7588
|
-
data,
|
|
7589
|
-
hasHtmlTooltips: false
|
|
7590
|
-
};
|
|
7680
|
+
if (data.length === 0) return data;
|
|
7681
|
+
const tooltipColumns = data[0].flatMap((column, index) => isTooltipColumn(column) ? [{
|
|
7682
|
+
index,
|
|
7683
|
+
isHtml: hasHtmlFlag(column)
|
|
7684
|
+
}] : []);
|
|
7685
|
+
if (tooltipColumns.length === 0) return data;
|
|
7591
7686
|
const sanitizedRows = data.slice(1).map((row) => {
|
|
7592
7687
|
const newRow = [...row];
|
|
7593
|
-
for (const
|
|
7688
|
+
for (const { index, isHtml } of tooltipColumns) if (isHtml || hasHtmlFlag(newRow[index])) newRow[index] = sanitizeTooltipCell(newRow[index]);
|
|
7594
7689
|
return newRow;
|
|
7595
7690
|
});
|
|
7596
|
-
return
|
|
7597
|
-
data: [data[0], ...sanitizedRows],
|
|
7598
|
-
hasHtmlTooltips: true
|
|
7599
|
-
};
|
|
7691
|
+
return [data[0], ...sanitizedRows];
|
|
7600
7692
|
}, [data]);
|
|
7601
7693
|
const options = useMemo(() => ({
|
|
7602
7694
|
...region !== "world" && { region },
|
|
@@ -7609,7 +7701,7 @@ const GeoChartInternal = ({ className, data, ariaLabel, width, height, region =
|
|
|
7609
7701
|
defaultColor: defaultFillColorHex,
|
|
7610
7702
|
tooltip: {
|
|
7611
7703
|
trigger: "focus",
|
|
7612
|
-
isHtml:
|
|
7704
|
+
isHtml: true
|
|
7613
7705
|
},
|
|
7614
7706
|
legend: "none",
|
|
7615
7707
|
keepAspectRatio: true
|
|
@@ -7621,8 +7713,7 @@ const GeoChartInternal = ({ className, data, ariaLabel, width, height, region =
|
|
|
7621
7713
|
lightColorHex,
|
|
7622
7714
|
fullColorHex,
|
|
7623
7715
|
backgroundColorHex,
|
|
7624
|
-
defaultFillColorHex
|
|
7625
|
-
sanitizedData.hasHtmlTooltips
|
|
7716
|
+
defaultFillColorHex
|
|
7626
7717
|
]);
|
|
7627
7718
|
const chartEvents = useMemo(() => {
|
|
7628
7719
|
const readyEvent = {
|
|
@@ -7639,7 +7730,7 @@ const GeoChartInternal = ({ className, data, ariaLabel, width, height, region =
|
|
|
7639
7730
|
}
|
|
7640
7731
|
}];
|
|
7641
7732
|
}, [onError]);
|
|
7642
|
-
return /* @__PURE__ */
|
|
7733
|
+
return /* @__PURE__ */ jsxs(Center, {
|
|
7643
7734
|
ref: containerRef,
|
|
7644
7735
|
role: "group",
|
|
7645
7736
|
"aria-label": ariaLabel ?? __("Geo chart", "jetpack-charts"),
|
|
@@ -7648,16 +7739,16 @@ const GeoChartInternal = ({ className, data, ariaLabel, width, height, region =
|
|
|
7648
7739
|
width,
|
|
7649
7740
|
height
|
|
7650
7741
|
},
|
|
7651
|
-
children: /* @__PURE__ */ jsx(Chart, {
|
|
7742
|
+
children: [!isLoaded && loadingPlaceholder, /* @__PURE__ */ jsx(TooltipTheme, { children: /* @__PURE__ */ jsx(Chart, {
|
|
7652
7743
|
chartType: "GeoChart",
|
|
7653
7744
|
chartPackages: GEO_CHART_PACKAGES,
|
|
7654
7745
|
width,
|
|
7655
7746
|
height,
|
|
7656
|
-
data: sanitizedData
|
|
7747
|
+
data: sanitizedData,
|
|
7657
7748
|
options,
|
|
7658
7749
|
chartEvents,
|
|
7659
|
-
|
|
7660
|
-
})
|
|
7750
|
+
onLoad: handleLoad
|
|
7751
|
+
}) })]
|
|
7661
7752
|
});
|
|
7662
7753
|
};
|
|
7663
7754
|
const GeoChartWithProvider = (props) => {
|
|
@@ -7832,16 +7923,10 @@ const getNormalizedValue = (value, extent) => {
|
|
|
7832
7923
|
return Math.min(1, Math.max(0, (value - min) / (max - min)));
|
|
7833
7924
|
};
|
|
7834
7925
|
const STEPS = 200;
|
|
7835
|
-
const
|
|
7836
|
-
for (let step = 0; step <= STEPS; step++) {
|
|
7837
|
-
const color = mixHexColors(from, to, step / STEPS);
|
|
7838
|
-
if (meets(color)) return color;
|
|
7839
|
-
}
|
|
7840
|
-
return null;
|
|
7841
|
-
};
|
|
7926
|
+
const ramp = (from, to) => Array.from({ length: 201 }, (_, step) => mixHexColors(from, to, step / STEPS));
|
|
7842
7927
|
/**
|
|
7843
|
-
* The two ends of the heatmap fill scale:
|
|
7844
|
-
* low end,
|
|
7928
|
+
* The two ends of the heatmap fill scale: toward 2.5:1 against the background and the empty cell at
|
|
7929
|
+
* the low end, never under 2:1 against the background or the high end, and toward 6:1 at the high end.
|
|
7845
7930
|
*
|
|
7846
7931
|
* @param primary - The resolved primary color, as six-digit hex.
|
|
7847
7932
|
* @param background - The resolved chart background, as six-digit hex.
|
|
@@ -7849,16 +7934,19 @@ const firstMeeting = (from, to, meets) => {
|
|
|
7849
7934
|
* @return The scale ends, as six-digit hex.
|
|
7850
7935
|
*/
|
|
7851
7936
|
const getHeatmapScale = (primary, background, emptyCell) => {
|
|
7852
|
-
const
|
|
7853
|
-
const
|
|
7854
|
-
const
|
|
7855
|
-
|
|
7856
|
-
|
|
7857
|
-
|
|
7858
|
-
const high =
|
|
7859
|
-
const
|
|
7937
|
+
const backgroundLuminance = relativeLuminance(background);
|
|
7938
|
+
const ownSide = relativeLuminance(primary) > backgroundLuminance ? "#ffffff" : "#000000";
|
|
7939
|
+
const otherSide = ownSide === "#ffffff" ? "#000000" : "#ffffff";
|
|
7940
|
+
const extreme = contrastRatio(ownSide, background) >= 6 || contrastRatio(ownSide, background) >= contrastRatio(otherSide, background) ? ownSide : otherSide;
|
|
7941
|
+
const onExtremeSide = (color) => extreme === "#ffffff" ? relativeLuminance(color) > backgroundLuminance : relativeLuminance(color) < backgroundLuminance;
|
|
7942
|
+
const deepening = ramp(primary, extreme);
|
|
7943
|
+
const high = deepening.find((color) => contrastRatio(color, background) >= 6) ?? extreme;
|
|
7944
|
+
const path = [...ramp(background, primary), ...deepening];
|
|
7945
|
+
const spread = path.slice(0, path.indexOf(high) + 1).filter((color) => onExtremeSide(color) && contrastRatio(color, background) >= 2 && contrastRatio(color, high) >= 2);
|
|
7946
|
+
const surroundings = emptyCell ? [background, emptyCell] : [background];
|
|
7947
|
+
const weakest = (color) => Math.min(...surroundings.map((other) => contrastRatio(color, other)));
|
|
7860
7948
|
return {
|
|
7861
|
-
low: (
|
|
7949
|
+
low: spread.find((color) => weakest(color) >= 2.5) ?? spread.find((color) => weakest(color) >= 2) ?? spread.reduce((best, color) => weakest(color) > weakest(best) ? color : best),
|
|
7862
7950
|
high
|
|
7863
7951
|
};
|
|
7864
7952
|
};
|
|
@@ -9114,10 +9202,10 @@ function paramCase(input, options) {
|
|
|
9114
9202
|
return dotCase(input, __assign({ delimiter: "-" }, options));
|
|
9115
9203
|
}
|
|
9116
9204
|
//#endregion
|
|
9117
|
-
//#region ../../../node_modules/.pnpm/@wordpress+warning@3.
|
|
9205
|
+
//#region ../../../node_modules/.pnpm/@wordpress+warning@3.57.0/node_modules/@wordpress/warning/build-module/utils.mjs
|
|
9118
9206
|
var logged = /* @__PURE__ */ new Set();
|
|
9119
9207
|
//#endregion
|
|
9120
|
-
//#region ../../../node_modules/.pnpm/@wordpress+warning@3.
|
|
9208
|
+
//#region ../../../node_modules/.pnpm/@wordpress+warning@3.57.0/node_modules/@wordpress/warning/build-module/index.mjs
|
|
9121
9209
|
function isDev() {
|
|
9122
9210
|
return globalThis.SCRIPT_DEBUG === true;
|
|
9123
9211
|
}
|
|
@@ -9131,7 +9219,7 @@ function warning(message) {
|
|
|
9131
9219
|
logged.add(message);
|
|
9132
9220
|
}
|
|
9133
9221
|
//#endregion
|
|
9134
|
-
//#region ../../../node_modules/.pnpm/@wordpress+components@
|
|
9222
|
+
//#region ../../../node_modules/.pnpm/@wordpress+components@42.0.0_@date-fns+tz@1.5.0_@types+react-dom@18.3.7_@types+react@18_5beefdda355715e908adfea668830e1f/node_modules/@wordpress/components/build-module/utils/hooks/use-update-effect.mjs
|
|
9135
9223
|
function useUpdateEffect(effect, deps) {
|
|
9136
9224
|
const mountedRef = useRef$1(false);
|
|
9137
9225
|
useEffect$1(() => {
|
|
@@ -9955,356 +10043,6 @@ var createCache = function createCache(options) {
|
|
|
9955
10043
|
return cache;
|
|
9956
10044
|
};
|
|
9957
10045
|
//#endregion
|
|
9958
|
-
//#region ../../../node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.production.min.js
|
|
9959
|
-
/** @license React v16.13.1
|
|
9960
|
-
* react-is.production.min.js
|
|
9961
|
-
*
|
|
9962
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
9963
|
-
*
|
|
9964
|
-
* This source code is licensed under the MIT license found in the
|
|
9965
|
-
* LICENSE file in the root directory of this source tree.
|
|
9966
|
-
*/
|
|
9967
|
-
var require_react_is_production_min = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
9968
|
-
var b = "function" === typeof Symbol && Symbol.for;
|
|
9969
|
-
var c = b ? Symbol.for("react.element") : 60103;
|
|
9970
|
-
var d = b ? Symbol.for("react.portal") : 60106;
|
|
9971
|
-
var e = b ? Symbol.for("react.fragment") : 60107;
|
|
9972
|
-
var f = b ? Symbol.for("react.strict_mode") : 60108;
|
|
9973
|
-
var g = b ? Symbol.for("react.profiler") : 60114;
|
|
9974
|
-
var h = b ? Symbol.for("react.provider") : 60109;
|
|
9975
|
-
var k = b ? Symbol.for("react.context") : 60110;
|
|
9976
|
-
var l = b ? Symbol.for("react.async_mode") : 60111;
|
|
9977
|
-
var m = b ? Symbol.for("react.concurrent_mode") : 60111;
|
|
9978
|
-
var n = b ? Symbol.for("react.forward_ref") : 60112;
|
|
9979
|
-
var p = b ? Symbol.for("react.suspense") : 60113;
|
|
9980
|
-
var q = b ? Symbol.for("react.suspense_list") : 60120;
|
|
9981
|
-
var r = b ? Symbol.for("react.memo") : 60115;
|
|
9982
|
-
var t = b ? Symbol.for("react.lazy") : 60116;
|
|
9983
|
-
var v = b ? Symbol.for("react.block") : 60121;
|
|
9984
|
-
var w = b ? Symbol.for("react.fundamental") : 60117;
|
|
9985
|
-
var x = b ? Symbol.for("react.responder") : 60118;
|
|
9986
|
-
var y = b ? Symbol.for("react.scope") : 60119;
|
|
9987
|
-
function z(a) {
|
|
9988
|
-
if ("object" === typeof a && null !== a) {
|
|
9989
|
-
var u = a.$$typeof;
|
|
9990
|
-
switch (u) {
|
|
9991
|
-
case c: switch (a = a.type, a) {
|
|
9992
|
-
case l:
|
|
9993
|
-
case m:
|
|
9994
|
-
case e:
|
|
9995
|
-
case g:
|
|
9996
|
-
case f:
|
|
9997
|
-
case p: return a;
|
|
9998
|
-
default: switch (a = a && a.$$typeof, a) {
|
|
9999
|
-
case k:
|
|
10000
|
-
case n:
|
|
10001
|
-
case t:
|
|
10002
|
-
case r:
|
|
10003
|
-
case h: return a;
|
|
10004
|
-
default: return u;
|
|
10005
|
-
}
|
|
10006
|
-
}
|
|
10007
|
-
case d: return u;
|
|
10008
|
-
}
|
|
10009
|
-
}
|
|
10010
|
-
}
|
|
10011
|
-
function A(a) {
|
|
10012
|
-
return z(a) === m;
|
|
10013
|
-
}
|
|
10014
|
-
exports.AsyncMode = l;
|
|
10015
|
-
exports.ConcurrentMode = m;
|
|
10016
|
-
exports.ContextConsumer = k;
|
|
10017
|
-
exports.ContextProvider = h;
|
|
10018
|
-
exports.Element = c;
|
|
10019
|
-
exports.ForwardRef = n;
|
|
10020
|
-
exports.Fragment = e;
|
|
10021
|
-
exports.Lazy = t;
|
|
10022
|
-
exports.Memo = r;
|
|
10023
|
-
exports.Portal = d;
|
|
10024
|
-
exports.Profiler = g;
|
|
10025
|
-
exports.StrictMode = f;
|
|
10026
|
-
exports.Suspense = p;
|
|
10027
|
-
exports.isAsyncMode = function(a) {
|
|
10028
|
-
return A(a) || z(a) === l;
|
|
10029
|
-
};
|
|
10030
|
-
exports.isConcurrentMode = A;
|
|
10031
|
-
exports.isContextConsumer = function(a) {
|
|
10032
|
-
return z(a) === k;
|
|
10033
|
-
};
|
|
10034
|
-
exports.isContextProvider = function(a) {
|
|
10035
|
-
return z(a) === h;
|
|
10036
|
-
};
|
|
10037
|
-
exports.isElement = function(a) {
|
|
10038
|
-
return "object" === typeof a && null !== a && a.$$typeof === c;
|
|
10039
|
-
};
|
|
10040
|
-
exports.isForwardRef = function(a) {
|
|
10041
|
-
return z(a) === n;
|
|
10042
|
-
};
|
|
10043
|
-
exports.isFragment = function(a) {
|
|
10044
|
-
return z(a) === e;
|
|
10045
|
-
};
|
|
10046
|
-
exports.isLazy = function(a) {
|
|
10047
|
-
return z(a) === t;
|
|
10048
|
-
};
|
|
10049
|
-
exports.isMemo = function(a) {
|
|
10050
|
-
return z(a) === r;
|
|
10051
|
-
};
|
|
10052
|
-
exports.isPortal = function(a) {
|
|
10053
|
-
return z(a) === d;
|
|
10054
|
-
};
|
|
10055
|
-
exports.isProfiler = function(a) {
|
|
10056
|
-
return z(a) === g;
|
|
10057
|
-
};
|
|
10058
|
-
exports.isStrictMode = function(a) {
|
|
10059
|
-
return z(a) === f;
|
|
10060
|
-
};
|
|
10061
|
-
exports.isSuspense = function(a) {
|
|
10062
|
-
return z(a) === p;
|
|
10063
|
-
};
|
|
10064
|
-
exports.isValidElementType = function(a) {
|
|
10065
|
-
return "string" === typeof a || "function" === typeof a || a === e || a === m || a === g || a === f || a === p || a === q || "object" === typeof a && null !== a && (a.$$typeof === t || a.$$typeof === r || a.$$typeof === h || a.$$typeof === k || a.$$typeof === n || a.$$typeof === w || a.$$typeof === x || a.$$typeof === y || a.$$typeof === v);
|
|
10066
|
-
};
|
|
10067
|
-
exports.typeOf = z;
|
|
10068
|
-
}));
|
|
10069
|
-
//#endregion
|
|
10070
|
-
//#region ../../../node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.development.js
|
|
10071
|
-
/** @license React v16.13.1
|
|
10072
|
-
* react-is.development.js
|
|
10073
|
-
*
|
|
10074
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
10075
|
-
*
|
|
10076
|
-
* This source code is licensed under the MIT license found in the
|
|
10077
|
-
* LICENSE file in the root directory of this source tree.
|
|
10078
|
-
*/
|
|
10079
|
-
var require_react_is_development = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
10080
|
-
if (process.env.NODE_ENV !== "production") (function() {
|
|
10081
|
-
"use strict";
|
|
10082
|
-
var hasSymbol = typeof Symbol === "function" && Symbol.for;
|
|
10083
|
-
var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for("react.element") : 60103;
|
|
10084
|
-
var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for("react.portal") : 60106;
|
|
10085
|
-
var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for("react.fragment") : 60107;
|
|
10086
|
-
var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for("react.strict_mode") : 60108;
|
|
10087
|
-
var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for("react.profiler") : 60114;
|
|
10088
|
-
var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for("react.provider") : 60109;
|
|
10089
|
-
var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for("react.context") : 60110;
|
|
10090
|
-
var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for("react.async_mode") : 60111;
|
|
10091
|
-
var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for("react.concurrent_mode") : 60111;
|
|
10092
|
-
var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for("react.forward_ref") : 60112;
|
|
10093
|
-
var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for("react.suspense") : 60113;
|
|
10094
|
-
var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for("react.suspense_list") : 60120;
|
|
10095
|
-
var REACT_MEMO_TYPE = hasSymbol ? Symbol.for("react.memo") : 60115;
|
|
10096
|
-
var REACT_LAZY_TYPE = hasSymbol ? Symbol.for("react.lazy") : 60116;
|
|
10097
|
-
var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for("react.block") : 60121;
|
|
10098
|
-
var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for("react.fundamental") : 60117;
|
|
10099
|
-
var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for("react.responder") : 60118;
|
|
10100
|
-
var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for("react.scope") : 60119;
|
|
10101
|
-
function isValidElementType(type) {
|
|
10102
|
-
return typeof type === "string" || typeof type === "function" || type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === "object" && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
|
|
10103
|
-
}
|
|
10104
|
-
function typeOf(object) {
|
|
10105
|
-
if (typeof object === "object" && object !== null) {
|
|
10106
|
-
var $$typeof = object.$$typeof;
|
|
10107
|
-
switch ($$typeof) {
|
|
10108
|
-
case REACT_ELEMENT_TYPE:
|
|
10109
|
-
var type = object.type;
|
|
10110
|
-
switch (type) {
|
|
10111
|
-
case REACT_ASYNC_MODE_TYPE:
|
|
10112
|
-
case REACT_CONCURRENT_MODE_TYPE:
|
|
10113
|
-
case REACT_FRAGMENT_TYPE:
|
|
10114
|
-
case REACT_PROFILER_TYPE:
|
|
10115
|
-
case REACT_STRICT_MODE_TYPE:
|
|
10116
|
-
case REACT_SUSPENSE_TYPE: return type;
|
|
10117
|
-
default:
|
|
10118
|
-
var $$typeofType = type && type.$$typeof;
|
|
10119
|
-
switch ($$typeofType) {
|
|
10120
|
-
case REACT_CONTEXT_TYPE:
|
|
10121
|
-
case REACT_FORWARD_REF_TYPE:
|
|
10122
|
-
case REACT_LAZY_TYPE:
|
|
10123
|
-
case REACT_MEMO_TYPE:
|
|
10124
|
-
case REACT_PROVIDER_TYPE: return $$typeofType;
|
|
10125
|
-
default: return $$typeof;
|
|
10126
|
-
}
|
|
10127
|
-
}
|
|
10128
|
-
case REACT_PORTAL_TYPE: return $$typeof;
|
|
10129
|
-
}
|
|
10130
|
-
}
|
|
10131
|
-
}
|
|
10132
|
-
var AsyncMode = REACT_ASYNC_MODE_TYPE;
|
|
10133
|
-
var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
|
|
10134
|
-
var ContextConsumer = REACT_CONTEXT_TYPE;
|
|
10135
|
-
var ContextProvider = REACT_PROVIDER_TYPE;
|
|
10136
|
-
var Element = REACT_ELEMENT_TYPE;
|
|
10137
|
-
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
|
10138
|
-
var Fragment = REACT_FRAGMENT_TYPE;
|
|
10139
|
-
var Lazy = REACT_LAZY_TYPE;
|
|
10140
|
-
var Memo = REACT_MEMO_TYPE;
|
|
10141
|
-
var Portal = REACT_PORTAL_TYPE;
|
|
10142
|
-
var Profiler = REACT_PROFILER_TYPE;
|
|
10143
|
-
var StrictMode = REACT_STRICT_MODE_TYPE;
|
|
10144
|
-
var Suspense = REACT_SUSPENSE_TYPE;
|
|
10145
|
-
var hasWarnedAboutDeprecatedIsAsyncMode = false;
|
|
10146
|
-
function isAsyncMode(object) {
|
|
10147
|
-
if (!hasWarnedAboutDeprecatedIsAsyncMode) {
|
|
10148
|
-
hasWarnedAboutDeprecatedIsAsyncMode = true;
|
|
10149
|
-
console["warn"]("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.");
|
|
10150
|
-
}
|
|
10151
|
-
return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
|
|
10152
|
-
}
|
|
10153
|
-
function isConcurrentMode(object) {
|
|
10154
|
-
return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
|
|
10155
|
-
}
|
|
10156
|
-
function isContextConsumer(object) {
|
|
10157
|
-
return typeOf(object) === REACT_CONTEXT_TYPE;
|
|
10158
|
-
}
|
|
10159
|
-
function isContextProvider(object) {
|
|
10160
|
-
return typeOf(object) === REACT_PROVIDER_TYPE;
|
|
10161
|
-
}
|
|
10162
|
-
function isElement(object) {
|
|
10163
|
-
return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
10164
|
-
}
|
|
10165
|
-
function isForwardRef(object) {
|
|
10166
|
-
return typeOf(object) === REACT_FORWARD_REF_TYPE;
|
|
10167
|
-
}
|
|
10168
|
-
function isFragment(object) {
|
|
10169
|
-
return typeOf(object) === REACT_FRAGMENT_TYPE;
|
|
10170
|
-
}
|
|
10171
|
-
function isLazy(object) {
|
|
10172
|
-
return typeOf(object) === REACT_LAZY_TYPE;
|
|
10173
|
-
}
|
|
10174
|
-
function isMemo(object) {
|
|
10175
|
-
return typeOf(object) === REACT_MEMO_TYPE;
|
|
10176
|
-
}
|
|
10177
|
-
function isPortal(object) {
|
|
10178
|
-
return typeOf(object) === REACT_PORTAL_TYPE;
|
|
10179
|
-
}
|
|
10180
|
-
function isProfiler(object) {
|
|
10181
|
-
return typeOf(object) === REACT_PROFILER_TYPE;
|
|
10182
|
-
}
|
|
10183
|
-
function isStrictMode(object) {
|
|
10184
|
-
return typeOf(object) === REACT_STRICT_MODE_TYPE;
|
|
10185
|
-
}
|
|
10186
|
-
function isSuspense(object) {
|
|
10187
|
-
return typeOf(object) === REACT_SUSPENSE_TYPE;
|
|
10188
|
-
}
|
|
10189
|
-
exports.AsyncMode = AsyncMode;
|
|
10190
|
-
exports.ConcurrentMode = ConcurrentMode;
|
|
10191
|
-
exports.ContextConsumer = ContextConsumer;
|
|
10192
|
-
exports.ContextProvider = ContextProvider;
|
|
10193
|
-
exports.Element = Element;
|
|
10194
|
-
exports.ForwardRef = ForwardRef;
|
|
10195
|
-
exports.Fragment = Fragment;
|
|
10196
|
-
exports.Lazy = Lazy;
|
|
10197
|
-
exports.Memo = Memo;
|
|
10198
|
-
exports.Portal = Portal;
|
|
10199
|
-
exports.Profiler = Profiler;
|
|
10200
|
-
exports.StrictMode = StrictMode;
|
|
10201
|
-
exports.Suspense = Suspense;
|
|
10202
|
-
exports.isAsyncMode = isAsyncMode;
|
|
10203
|
-
exports.isConcurrentMode = isConcurrentMode;
|
|
10204
|
-
exports.isContextConsumer = isContextConsumer;
|
|
10205
|
-
exports.isContextProvider = isContextProvider;
|
|
10206
|
-
exports.isElement = isElement;
|
|
10207
|
-
exports.isForwardRef = isForwardRef;
|
|
10208
|
-
exports.isFragment = isFragment;
|
|
10209
|
-
exports.isLazy = isLazy;
|
|
10210
|
-
exports.isMemo = isMemo;
|
|
10211
|
-
exports.isPortal = isPortal;
|
|
10212
|
-
exports.isProfiler = isProfiler;
|
|
10213
|
-
exports.isStrictMode = isStrictMode;
|
|
10214
|
-
exports.isSuspense = isSuspense;
|
|
10215
|
-
exports.isValidElementType = isValidElementType;
|
|
10216
|
-
exports.typeOf = typeOf;
|
|
10217
|
-
})();
|
|
10218
|
-
}));
|
|
10219
|
-
//#endregion
|
|
10220
|
-
//#region ../../../node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/index.js
|
|
10221
|
-
var require_react_is = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
10222
|
-
if (process.env.NODE_ENV === "production") module.exports = require_react_is_production_min();
|
|
10223
|
-
else module.exports = require_react_is_development();
|
|
10224
|
-
}));
|
|
10225
|
-
//#endregion
|
|
10226
|
-
//#region ../../../node_modules/.pnpm/hoist-non-react-statics@3.3.2/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js
|
|
10227
|
-
var require_hoist_non_react_statics_cjs = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
10228
|
-
var reactIs = require_react_is();
|
|
10229
|
-
/**
|
|
10230
|
-
* Copyright 2015, Yahoo! Inc.
|
|
10231
|
-
* Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
|
|
10232
|
-
*/
|
|
10233
|
-
var REACT_STATICS = {
|
|
10234
|
-
childContextTypes: true,
|
|
10235
|
-
contextType: true,
|
|
10236
|
-
contextTypes: true,
|
|
10237
|
-
defaultProps: true,
|
|
10238
|
-
displayName: true,
|
|
10239
|
-
getDefaultProps: true,
|
|
10240
|
-
getDerivedStateFromError: true,
|
|
10241
|
-
getDerivedStateFromProps: true,
|
|
10242
|
-
mixins: true,
|
|
10243
|
-
propTypes: true,
|
|
10244
|
-
type: true
|
|
10245
|
-
};
|
|
10246
|
-
var KNOWN_STATICS = {
|
|
10247
|
-
name: true,
|
|
10248
|
-
length: true,
|
|
10249
|
-
prototype: true,
|
|
10250
|
-
caller: true,
|
|
10251
|
-
callee: true,
|
|
10252
|
-
arguments: true,
|
|
10253
|
-
arity: true
|
|
10254
|
-
};
|
|
10255
|
-
var FORWARD_REF_STATICS = {
|
|
10256
|
-
"$$typeof": true,
|
|
10257
|
-
render: true,
|
|
10258
|
-
defaultProps: true,
|
|
10259
|
-
displayName: true,
|
|
10260
|
-
propTypes: true
|
|
10261
|
-
};
|
|
10262
|
-
var MEMO_STATICS = {
|
|
10263
|
-
"$$typeof": true,
|
|
10264
|
-
compare: true,
|
|
10265
|
-
defaultProps: true,
|
|
10266
|
-
displayName: true,
|
|
10267
|
-
propTypes: true,
|
|
10268
|
-
type: true
|
|
10269
|
-
};
|
|
10270
|
-
var TYPE_STATICS = {};
|
|
10271
|
-
TYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;
|
|
10272
|
-
TYPE_STATICS[reactIs.Memo] = MEMO_STATICS;
|
|
10273
|
-
function getStatics(component) {
|
|
10274
|
-
if (reactIs.isMemo(component)) return MEMO_STATICS;
|
|
10275
|
-
return TYPE_STATICS[component["$$typeof"]] || REACT_STATICS;
|
|
10276
|
-
}
|
|
10277
|
-
var defineProperty = Object.defineProperty;
|
|
10278
|
-
var getOwnPropertyNames = Object.getOwnPropertyNames;
|
|
10279
|
-
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
|
10280
|
-
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
10281
|
-
var getPrototypeOf = Object.getPrototypeOf;
|
|
10282
|
-
var objectPrototype = Object.prototype;
|
|
10283
|
-
function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {
|
|
10284
|
-
if (typeof sourceComponent !== "string") {
|
|
10285
|
-
if (objectPrototype) {
|
|
10286
|
-
var inheritedComponent = getPrototypeOf(sourceComponent);
|
|
10287
|
-
if (inheritedComponent && inheritedComponent !== objectPrototype) hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);
|
|
10288
|
-
}
|
|
10289
|
-
var keys = getOwnPropertyNames(sourceComponent);
|
|
10290
|
-
if (getOwnPropertySymbols) keys = keys.concat(getOwnPropertySymbols(sourceComponent));
|
|
10291
|
-
var targetStatics = getStatics(targetComponent);
|
|
10292
|
-
var sourceStatics = getStatics(sourceComponent);
|
|
10293
|
-
for (var i = 0; i < keys.length; ++i) {
|
|
10294
|
-
var key = keys[i];
|
|
10295
|
-
if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {
|
|
10296
|
-
var descriptor = getOwnPropertyDescriptor(sourceComponent, key);
|
|
10297
|
-
try {
|
|
10298
|
-
defineProperty(targetComponent, key, descriptor);
|
|
10299
|
-
} catch (e) {}
|
|
10300
|
-
}
|
|
10301
|
-
}
|
|
10302
|
-
}
|
|
10303
|
-
return targetComponent;
|
|
10304
|
-
}
|
|
10305
|
-
module.exports = hoistNonReactStatics;
|
|
10306
|
-
}));
|
|
10307
|
-
//#endregion
|
|
10308
10046
|
//#region ../../../node_modules/.pnpm/@emotion+utils@1.4.2/node_modules/@emotion/utils/dist/emotion-utils.browser.esm.js
|
|
10309
10047
|
function getRegisteredStyles$1(registered, registeredStyles, classNames) {
|
|
10310
10048
|
var rawClassName = "";
|
|
@@ -10404,7 +10142,7 @@ var unitlessKeys = {
|
|
|
10404
10142
|
};
|
|
10405
10143
|
//#endregion
|
|
10406
10144
|
//#region ../../../node_modules/.pnpm/@emotion+serialize@1.3.3/node_modules/@emotion/serialize/dist/emotion-serialize.esm.js
|
|
10407
|
-
var isDevelopment
|
|
10145
|
+
var isDevelopment = false;
|
|
10408
10146
|
var hyphenateRegex = /[A-Z]|^ms/g;
|
|
10409
10147
|
var animationRegex = /_EMO_([^_]+?)_([^]*?)_EMO_/g;
|
|
10410
10148
|
var isCustomProperty = function isCustomProperty(property) {
|
|
@@ -10484,7 +10222,7 @@ function createStringFromObject(mergedProps, registered, obj) {
|
|
|
10484
10222
|
if (registered != null && registered[asString] !== void 0) string += key + "{" + registered[asString] + "}";
|
|
10485
10223
|
else if (isProcessableValue(asString)) string += processStyleName(key) + ":" + processStyleValue(key, asString) + ";";
|
|
10486
10224
|
} else {
|
|
10487
|
-
if (key === "NO_COMPONENT_SELECTOR" && isDevelopment
|
|
10225
|
+
if (key === "NO_COMPONENT_SELECTOR" && isDevelopment) throw new Error(noComponentSelectorMessage);
|
|
10488
10226
|
if (Array.isArray(value) && typeof value[0] === "string" && (registered == null || registered[value[0]] === void 0)) {
|
|
10489
10227
|
for (var _i = 0; _i < value.length; _i++) if (isProcessableValue(value[_i])) string += processStyleName(key) + ":" + processStyleValue(key, value[_i]) + ";";
|
|
10490
10228
|
} else {
|
|
@@ -10527,80 +10265,15 @@ function serializeStyles(args, registered, mergedProps) {
|
|
|
10527
10265
|
next: cursor
|
|
10528
10266
|
};
|
|
10529
10267
|
}
|
|
10268
|
+
React["useInsertionEffect"] && React["useInsertionEffect"] || React.useLayoutEffect;
|
|
10530
10269
|
//#endregion
|
|
10531
|
-
//#region ../../../node_modules/.pnpm/@emotion+
|
|
10532
|
-
var syncFallback = function syncFallback(create) {
|
|
10533
|
-
return create();
|
|
10534
|
-
};
|
|
10535
|
-
var useInsertionEffect = React["useInsertionEffect"] ? React["useInsertionEffect"] : false;
|
|
10536
|
-
var useInsertionEffectAlwaysWithSyncFallback = useInsertionEffect || syncFallback;
|
|
10537
|
-
useInsertionEffect || React.useLayoutEffect;
|
|
10270
|
+
//#region ../../../node_modules/.pnpm/@emotion+react@11.14.0_@types+react@18.3.31_react@18.3.1/node_modules/@emotion/react/dist/emotion-element-f0de968e.browser.esm.js
|
|
10538
10271
|
var EmotionCacheContext = /* #__PURE__ */ React.createContext(typeof HTMLElement !== "undefined" ? /* #__PURE__ */ createCache({ key: "css" }) : null);
|
|
10539
10272
|
EmotionCacheContext.Provider;
|
|
10540
10273
|
var __unsafe_useEmotionCache = function useEmotionCache() {
|
|
10541
10274
|
return useContext(EmotionCacheContext);
|
|
10542
10275
|
};
|
|
10543
|
-
|
|
10544
|
-
return /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
10545
|
-
return func(props, useContext(EmotionCacheContext), ref);
|
|
10546
|
-
});
|
|
10547
|
-
};
|
|
10548
|
-
var ThemeContext = /* #__PURE__ */ React.createContext({});
|
|
10549
|
-
var hasOwn = {}.hasOwnProperty;
|
|
10550
|
-
var typePropName = "__EMOTION_TYPE_PLEASE_DO_NOT_USE__";
|
|
10551
|
-
var createEmotionProps = function createEmotionProps(type, props) {
|
|
10552
|
-
var newProps = {};
|
|
10553
|
-
for (var _key in props) if (hasOwn.call(props, _key)) newProps[_key] = props[_key];
|
|
10554
|
-
newProps[typePropName] = type;
|
|
10555
|
-
return newProps;
|
|
10556
|
-
};
|
|
10557
|
-
var Insertion = function Insertion(_ref) {
|
|
10558
|
-
var cache = _ref.cache, serialized = _ref.serialized, isStringTag = _ref.isStringTag;
|
|
10559
|
-
registerStyles(cache, serialized, isStringTag);
|
|
10560
|
-
useInsertionEffectAlwaysWithSyncFallback(function() {
|
|
10561
|
-
return insertStyles(cache, serialized, isStringTag);
|
|
10562
|
-
});
|
|
10563
|
-
return null;
|
|
10564
|
-
};
|
|
10565
|
-
var Emotion$1 = /* @__PURE__ */ withEmotionCache(function(props, cache, ref) {
|
|
10566
|
-
var cssProp = props.css;
|
|
10567
|
-
if (typeof cssProp === "string" && cache.registered[cssProp] !== void 0) cssProp = cache.registered[cssProp];
|
|
10568
|
-
var WrappedComponent = props[typePropName];
|
|
10569
|
-
var registeredStyles = [cssProp];
|
|
10570
|
-
var className = "";
|
|
10571
|
-
if (typeof props.className === "string") className = getRegisteredStyles$1(cache.registered, registeredStyles, props.className);
|
|
10572
|
-
else if (props.className != null) className = props.className + " ";
|
|
10573
|
-
var serialized = serializeStyles(registeredStyles, void 0, React.useContext(ThemeContext));
|
|
10574
|
-
className += cache.key + "-" + serialized.name;
|
|
10575
|
-
var newProps = {};
|
|
10576
|
-
for (var _key2 in props) if (hasOwn.call(props, _key2) && _key2 !== "css" && _key2 !== typePropName && true) newProps[_key2] = props[_key2];
|
|
10577
|
-
newProps.className = className;
|
|
10578
|
-
if (ref) newProps.ref = ref;
|
|
10579
|
-
return /*#__PURE__*/ React.createElement(React.Fragment, null, /*#__PURE__*/ React.createElement(Insertion, {
|
|
10580
|
-
cache,
|
|
10581
|
-
serialized,
|
|
10582
|
-
isStringTag: typeof WrappedComponent === "string"
|
|
10583
|
-
}), /*#__PURE__*/ React.createElement(WrappedComponent, newProps));
|
|
10584
|
-
});
|
|
10585
|
-
require_hoist_non_react_statics_cjs();
|
|
10586
|
-
var jsx$1 = function jsx(type, props) {
|
|
10587
|
-
var args = arguments;
|
|
10588
|
-
if (props == null || !hasOwn.call(props, "css")) return React.createElement.apply(void 0, args);
|
|
10589
|
-
var argsLength = args.length;
|
|
10590
|
-
var createElementArgArray = new Array(argsLength);
|
|
10591
|
-
createElementArgArray[0] = Emotion$1;
|
|
10592
|
-
createElementArgArray[1] = createEmotionProps(type, props);
|
|
10593
|
-
for (var i = 2; i < argsLength; i++) createElementArgArray[i] = args[i];
|
|
10594
|
-
return React.createElement.apply(null, createElementArgArray);
|
|
10595
|
-
};
|
|
10596
|
-
(function(_jsx) {
|
|
10597
|
-
var JSX;
|
|
10598
|
-
JSX || (JSX = _jsx.JSX || (_jsx.JSX = {}));
|
|
10599
|
-
})(jsx$1 || (jsx$1 = {}));
|
|
10600
|
-
function css$1() {
|
|
10601
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key];
|
|
10602
|
-
return serializeStyles(args);
|
|
10603
|
-
}
|
|
10276
|
+
({}).hasOwnProperty;
|
|
10604
10277
|
//#endregion
|
|
10605
10278
|
//#region ../../../node_modules/.pnpm/@emotion+css@11.13.5/node_modules/@emotion/css/create-instance/dist/emotion-css-create-instance.esm.js
|
|
10606
10279
|
function insertWithoutScoping(cache, serialized) {
|
|
@@ -10701,7 +10374,7 @@ _createEmotion.css;
|
|
|
10701
10374
|
_createEmotion.sheet;
|
|
10702
10375
|
_createEmotion.cache;
|
|
10703
10376
|
//#endregion
|
|
10704
|
-
//#region ../../../node_modules/.pnpm/@wordpress+components@
|
|
10377
|
+
//#region ../../../node_modules/.pnpm/@wordpress+components@42.0.0_@date-fns+tz@1.5.0_@types+react-dom@18.3.7_@types+react@18_5beefdda355715e908adfea668830e1f/node_modules/@wordpress/components/build-module/utils/hooks/use-cx.mjs
|
|
10705
10378
|
var isSerializedStyles = (o) => typeof o !== "undefined" && o !== null && ["name", "styles"].every((p) => typeof o[p] !== "undefined");
|
|
10706
10379
|
var useCx = () => {
|
|
10707
10380
|
const cache = __unsafe_useEmotionCache();
|
|
@@ -10808,140 +10481,7 @@ function memize(fn, options) {
|
|
|
10808
10481
|
return memoized;
|
|
10809
10482
|
}
|
|
10810
10483
|
//#endregion
|
|
10811
|
-
//#region ../../../node_modules/.pnpm/@wordpress+components@
|
|
10812
|
-
var white = "#fff";
|
|
10813
|
-
var GRAY = {
|
|
10814
|
-
900: "#1e1e1e",
|
|
10815
|
-
800: "#2f2f2f",
|
|
10816
|
-
/** Meets 4.6:1 text contrast against white. */
|
|
10817
|
-
700: "#757575",
|
|
10818
|
-
/** Meets 3:1 UI or large text contrast against white. */
|
|
10819
|
-
600: "#949494",
|
|
10820
|
-
400: "#ccc",
|
|
10821
|
-
/** Used for most borders. */
|
|
10822
|
-
300: "#ddd",
|
|
10823
|
-
/** Used sparingly for light borders. */
|
|
10824
|
-
200: "#e0e0e0",
|
|
10825
|
-
/** Used for light gray backgrounds. */
|
|
10826
|
-
100: "#f0f0f0"
|
|
10827
|
-
};
|
|
10828
|
-
var ALERT = {
|
|
10829
|
-
yellow: "#f0b849",
|
|
10830
|
-
red: "#d94f4f",
|
|
10831
|
-
green: "#4ab866"
|
|
10832
|
-
};
|
|
10833
|
-
var THEME = {
|
|
10834
|
-
accent: `var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9))`,
|
|
10835
|
-
accentDarker10: `var(--wp-components-color-accent-darker-10, var(--wp-admin-theme-color-darker-10, #2145e6))`,
|
|
10836
|
-
accentDarker20: `var(--wp-components-color-accent-darker-20, var(--wp-admin-theme-color-darker-20, #183ad6))`,
|
|
10837
|
-
/** Used when placing text on the accent color. */
|
|
10838
|
-
accentInverted: `var(--wp-components-color-accent-inverted, var(--wpds-color-foreground-interactive-brand-strong, #fff))`,
|
|
10839
|
-
background: `var(--wp-components-color-background, var(--wpds-color-background-surface-neutral-strong, #fff))`,
|
|
10840
|
-
foreground: `var(--wp-components-color-foreground, var(--wpds-color-foreground-content-neutral, #1e1e1e))`,
|
|
10841
|
-
/** Used when placing text on the foreground color. */
|
|
10842
|
-
foregroundInverted: `var(--wp-components-color-foreground-inverted, var(--wpds-color-background-surface-neutral, #fcfcfc))`,
|
|
10843
|
-
gray: {
|
|
10844
|
-
/** @deprecated Use `COLORS.theme.foreground` instead. */
|
|
10845
|
-
900: `var(--wp-components-color-foreground, var(--wpds-color-foreground-content-neutral, #1e1e1e))`,
|
|
10846
|
-
800: `var(--wp-components-color-gray-800, var(--wpds-color-foreground-content-neutral, #1e1e1e))`,
|
|
10847
|
-
700: `var(--wp-components-color-gray-700, var(--wpds-color-foreground-content-neutral-weak, #707070))`,
|
|
10848
|
-
600: `var(--wp-components-color-gray-600, var(--wpds-color-stroke-interactive-neutral, #8d8d8d))`,
|
|
10849
|
-
400: `var(--wp-components-color-gray-400, var(--wpds-color-stroke-interactive-neutral, #8d8d8d))`,
|
|
10850
|
-
300: `var(--wp-components-color-gray-300, var(--wpds-color-stroke-surface-neutral, #dbdbdb))`,
|
|
10851
|
-
200: `var(--wp-components-color-gray-200, var(--wpds-color-stroke-surface-neutral, #dbdbdb))`,
|
|
10852
|
-
100: `var(--wp-components-color-gray-100, var(--wpds-color-background-surface-neutral, #fcfcfc))`
|
|
10853
|
-
}
|
|
10854
|
-
};
|
|
10855
|
-
var UI = {
|
|
10856
|
-
background: THEME.background,
|
|
10857
|
-
backgroundDisabled: THEME.gray[100],
|
|
10858
|
-
border: THEME.gray[600],
|
|
10859
|
-
borderHover: THEME.gray[700],
|
|
10860
|
-
borderFocus: THEME.accent,
|
|
10861
|
-
borderDisabled: `var(--wpds-color-stroke-interactive-neutral-disabled, #dbdbdb)`,
|
|
10862
|
-
textDisabled: `var(--wpds-color-foreground-interactive-neutral-disabled, #8d8d8d)`,
|
|
10863
|
-
darkGrayPlaceholder: `color-mix(in srgb, ${THEME.foreground}, transparent 38%)`,
|
|
10864
|
-
lightGrayPlaceholder: `color-mix(in srgb, ${THEME.background}, transparent 35%)`
|
|
10865
|
-
};
|
|
10866
|
-
var COLORS = Object.freeze({
|
|
10867
|
-
/**
|
|
10868
|
-
* The main gray color object.
|
|
10869
|
-
*
|
|
10870
|
-
* @deprecated Use semantic aliases in `COLORS.ui` or theme-ready variables in `COLORS.theme.gray`.
|
|
10871
|
-
*/
|
|
10872
|
-
gray: GRAY,
|
|
10873
|
-
/**
|
|
10874
|
-
* @deprecated Prefer theme-ready variables in `COLORS.theme`.
|
|
10875
|
-
*/
|
|
10876
|
-
white,
|
|
10877
|
-
alert: ALERT,
|
|
10878
|
-
/**
|
|
10879
|
-
* Theme-ready variables with fallbacks.
|
|
10880
|
-
*
|
|
10881
|
-
* Prefer semantic aliases in `COLORS.ui` when applicable.
|
|
10882
|
-
*/
|
|
10883
|
-
theme: THEME,
|
|
10884
|
-
/**
|
|
10885
|
-
* Semantic aliases (prefer these over raw variables when applicable).
|
|
10886
|
-
*/
|
|
10887
|
-
ui: UI
|
|
10888
|
-
});
|
|
10889
|
-
//#endregion
|
|
10890
|
-
//#region ../../../node_modules/.pnpm/@wordpress+components@40.1.0_@date-fns+tz@1.5.0_@types+react-dom@18.3.7_@types+react@18_c300d25e93ed6b8d3659e83df7c1508a/node_modules/@wordpress/components/build-module/utils/config-values.mjs
|
|
10891
|
-
var CONTROL_HEIGHT = "36px";
|
|
10892
|
-
var CONTROL_PROPS = {
|
|
10893
|
-
controlPaddingX: 12,
|
|
10894
|
-
controlPaddingXSmall: 8,
|
|
10895
|
-
controlPaddingXLarge: 12 * 1.3334,
|
|
10896
|
-
controlBoxShadowFocus: `0 0 0 0.5px ${COLORS.theme.accent}`,
|
|
10897
|
-
controlHeight: CONTROL_HEIGHT,
|
|
10898
|
-
controlHeightXSmall: `calc( ${CONTROL_HEIGHT} * 0.6 )`,
|
|
10899
|
-
controlHeightSmall: `calc( ${CONTROL_HEIGHT} * 0.8 )`,
|
|
10900
|
-
controlHeightLarge: `calc( ${CONTROL_HEIGHT} * 1.2 )`,
|
|
10901
|
-
controlHeightXLarge: `calc( ${CONTROL_HEIGHT} * 1.4 )`
|
|
10902
|
-
};
|
|
10903
|
-
var config_values_default = Object.assign({}, CONTROL_PROPS, {
|
|
10904
|
-
colorDivider: "rgba(0, 0, 0, 0.1)",
|
|
10905
|
-
elevationIntensity: 1,
|
|
10906
|
-
radiusXSmall: "1px",
|
|
10907
|
-
radiusSmall: "2px",
|
|
10908
|
-
radiusMedium: "4px",
|
|
10909
|
-
radiusLarge: "8px",
|
|
10910
|
-
radiusFull: "9999px",
|
|
10911
|
-
radiusRound: "50%",
|
|
10912
|
-
borderWidth: "1px",
|
|
10913
|
-
borderWidthFocus: "1.5px",
|
|
10914
|
-
borderWidthTab: "4px",
|
|
10915
|
-
fontSize: "13px",
|
|
10916
|
-
fontSizeH1: "calc(2.44 * 13px)",
|
|
10917
|
-
fontSizeH2: "calc(1.95 * 13px)",
|
|
10918
|
-
fontSizeH3: "calc(1.56 * 13px)",
|
|
10919
|
-
fontSizeH4: "calc(1.25 * 13px)",
|
|
10920
|
-
fontSizeH5: "13px",
|
|
10921
|
-
fontSizeH6: "calc(0.8 * 13px)",
|
|
10922
|
-
fontSizeInputMobile: "16px",
|
|
10923
|
-
fontSizeMobile: "15px",
|
|
10924
|
-
fontSizeSmall: "calc(0.92 * 13px)",
|
|
10925
|
-
fontSizeXSmall: "calc(0.75 * 13px)",
|
|
10926
|
-
fontLineHeightBase: "1.4",
|
|
10927
|
-
fontWeight: "normal",
|
|
10928
|
-
fontWeightEmphasis: "600",
|
|
10929
|
-
gridBase: "4px",
|
|
10930
|
-
elevationXSmall: `0 1px 1px rgba(0, 0, 0, 0.03), 0 1px 2px rgba(0, 0, 0, 0.02), 0 3px 3px rgba(0, 0, 0, 0.02), 0 4px 4px rgba(0, 0, 0, 0.01)`,
|
|
10931
|
-
elevationSmall: `0 1px 2px rgba(0, 0, 0, 0.05), 0 2px 3px rgba(0, 0, 0, 0.04), 0 6px 6px rgba(0, 0, 0, 0.03), 0 8px 8px rgba(0, 0, 0, 0.02)`,
|
|
10932
|
-
elevationMedium: `0 2px 3px rgba(0, 0, 0, 0.05), 0 4px 5px rgba(0, 0, 0, 0.04), 0 12px 12px rgba(0, 0, 0, 0.03), 0 16px 16px rgba(0, 0, 0, 0.02)`,
|
|
10933
|
-
elevationLarge: `0 5px 15px rgba(0, 0, 0, 0.08), 0 15px 27px rgba(0, 0, 0, 0.07), 0 30px 36px rgba(0, 0, 0, 0.04), 0 50px 43px rgba(0, 0, 0, 0.02)`,
|
|
10934
|
-
surfaceBorderColor: "rgba(0, 0, 0, 0.1)",
|
|
10935
|
-
surfaceColor: COLORS.white,
|
|
10936
|
-
transitionDuration: "200ms",
|
|
10937
|
-
transitionDurationFast: "160ms",
|
|
10938
|
-
transitionDurationFaster: "120ms",
|
|
10939
|
-
transitionDurationFastest: "100ms",
|
|
10940
|
-
transitionTimingFunction: "cubic-bezier(0.08, 0.52, 0.52, 1)",
|
|
10941
|
-
transitionTimingFunctionControl: "cubic-bezier(0.12, 0.8, 0.32, 1)"
|
|
10942
|
-
});
|
|
10943
|
-
//#endregion
|
|
10944
|
-
//#region ../../../node_modules/.pnpm/@wordpress+components@40.1.0_@date-fns+tz@1.5.0_@types+react-dom@18.3.7_@types+react@18_c300d25e93ed6b8d3659e83df7c1508a/node_modules/@wordpress/components/build-module/context/context-system-provider.mjs
|
|
10484
|
+
//#region ../../../node_modules/.pnpm/@wordpress+components@42.0.0_@date-fns+tz@1.5.0_@types+react-dom@18.3.7_@types+react@18_5beefdda355715e908adfea668830e1f/node_modules/@wordpress/components/build-module/context/context-system-provider.mjs
|
|
10945
10485
|
var import_es6 = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
10946
10486
|
module.exports = function equal(a, b) {
|
|
10947
10487
|
if (a === b) return true;
|
|
@@ -11009,18 +10549,18 @@ var BaseContextSystemProvider = ({ children, value }) => {
|
|
|
11009
10549
|
};
|
|
11010
10550
|
memo(BaseContextSystemProvider);
|
|
11011
10551
|
//#endregion
|
|
11012
|
-
//#region ../../../node_modules/.pnpm/@wordpress+components@
|
|
10552
|
+
//#region ../../../node_modules/.pnpm/@wordpress+components@42.0.0_@date-fns+tz@1.5.0_@types+react-dom@18.3.7_@types+react@18_5beefdda355715e908adfea668830e1f/node_modules/@wordpress/components/build-module/context/constants.mjs
|
|
11013
10553
|
var COMPONENT_NAMESPACE = "data-wp-component";
|
|
11014
10554
|
var CONNECTED_NAMESPACE = "data-wp-c16t";
|
|
11015
10555
|
var CONNECT_STATIC_NAMESPACE = "__contextSystemKey__";
|
|
11016
10556
|
//#endregion
|
|
11017
|
-
//#region ../../../node_modules/.pnpm/@wordpress+components@
|
|
10557
|
+
//#region ../../../node_modules/.pnpm/@wordpress+components@42.0.0_@date-fns+tz@1.5.0_@types+react-dom@18.3.7_@types+react@18_5beefdda355715e908adfea668830e1f/node_modules/@wordpress/components/build-module/context/get-styled-class-name-from-key.mjs
|
|
11018
10558
|
function getStyledClassName(namespace) {
|
|
11019
10559
|
return `components-${paramCase(namespace)}`;
|
|
11020
10560
|
}
|
|
11021
10561
|
var getStyledClassNameFromKey = memize(getStyledClassName);
|
|
11022
10562
|
//#endregion
|
|
11023
|
-
//#region ../../../node_modules/.pnpm/@wordpress+components@
|
|
10563
|
+
//#region ../../../node_modules/.pnpm/@wordpress+components@42.0.0_@date-fns+tz@1.5.0_@types+react-dom@18.3.7_@types+react@18_5beefdda355715e908adfea668830e1f/node_modules/@wordpress/components/build-module/context/context-connect.mjs
|
|
11024
10564
|
function contextConnect(Component, namespace) {
|
|
11025
10565
|
return _contextConnect(Component, namespace, { forwardsRef: true });
|
|
11026
10566
|
}
|
|
@@ -11037,7 +10577,7 @@ function _contextConnect(Component, namespace, options) {
|
|
|
11037
10577
|
});
|
|
11038
10578
|
}
|
|
11039
10579
|
//#endregion
|
|
11040
|
-
//#region ../../../node_modules/.pnpm/@wordpress+components@
|
|
10580
|
+
//#region ../../../node_modules/.pnpm/@wordpress+components@42.0.0_@date-fns+tz@1.5.0_@types+react-dom@18.3.7_@types+react@18_5beefdda355715e908adfea668830e1f/node_modules/@wordpress/components/build-module/context/utils.mjs
|
|
11041
10581
|
function getNamespace(componentName) {
|
|
11042
10582
|
return { [COMPONENT_NAMESPACE]: componentName };
|
|
11043
10583
|
}
|
|
@@ -11045,7 +10585,7 @@ function getConnectedNamespace() {
|
|
|
11045
10585
|
return { [CONNECTED_NAMESPACE]: true };
|
|
11046
10586
|
}
|
|
11047
10587
|
//#endregion
|
|
11048
|
-
//#region ../../../node_modules/.pnpm/@wordpress+components@
|
|
10588
|
+
//#region ../../../node_modules/.pnpm/@wordpress+components@42.0.0_@date-fns+tz@1.5.0_@types+react-dom@18.3.7_@types+react@18_5beefdda355715e908adfea668830e1f/node_modules/@wordpress/components/build-module/context/use-context-system.mjs
|
|
11049
10589
|
function useContextSystem(props, namespace) {
|
|
11050
10590
|
const contextSystemProps = useComponentsContext();
|
|
11051
10591
|
if (typeof namespace === "undefined") globalThis.SCRIPT_DEBUG === true && warning("useContextSystem: Please provide a namespace");
|
|
@@ -11067,7 +10607,7 @@ function useContextSystem(props, namespace) {
|
|
|
11067
10607
|
return finalComponentProps;
|
|
11068
10608
|
}
|
|
11069
10609
|
//#endregion
|
|
11070
|
-
//#region ../../../node_modules/.pnpm/@wordpress+components@
|
|
10610
|
+
//#region ../../../node_modules/.pnpm/@wordpress+components@42.0.0_@date-fns+tz@1.5.0_@types+react-dom@18.3.7_@types+react@18_5beefdda355715e908adfea668830e1f/node_modules/@wordpress/components/build-module/visually-hidden/styles.mjs
|
|
11071
10611
|
var visuallyHidden = {
|
|
11072
10612
|
border: 0,
|
|
11073
10613
|
clip: "rect(1px, 1px, 1px, 1px)",
|
|
@@ -11083,7 +10623,7 @@ var visuallyHidden = {
|
|
|
11083
10623
|
wordBreak: "normal"
|
|
11084
10624
|
};
|
|
11085
10625
|
//#endregion
|
|
11086
|
-
//#region ../../../node_modules/.pnpm/@wordpress+components@
|
|
10626
|
+
//#region ../../../node_modules/.pnpm/@wordpress+components@42.0.0_@date-fns+tz@1.5.0_@types+react-dom@18.3.7_@types+react@18_5beefdda355715e908adfea668830e1f/node_modules/@wordpress/components/build-module/utils/polymorphic-element.mjs
|
|
11087
10627
|
var customAttributeRegExp = /^(data|aria|x)-/i;
|
|
11088
10628
|
var eventHandlerRegExp = /^on[A-Z]/;
|
|
11089
10629
|
var svgElementNames = new Set(`animate animateMotion animateTransform circle clipPath defs desc ellipse
|
|
@@ -11173,7 +10713,7 @@ function UnforwardedPolymorphicElement({ as, ...props }, ref) {
|
|
|
11173
10713
|
}
|
|
11174
10714
|
var PolymorphicElement = forwardRef$1(UnforwardedPolymorphicElement);
|
|
11175
10715
|
//#endregion
|
|
11176
|
-
//#region ../../../node_modules/.pnpm/@wordpress+components@
|
|
10716
|
+
//#region ../../../node_modules/.pnpm/@wordpress+components@42.0.0_@date-fns+tz@1.5.0_@types+react-dom@18.3.7_@types+react@18_5beefdda355715e908adfea668830e1f/node_modules/@wordpress/components/build-module/view/component.mjs
|
|
11177
10717
|
function UnforwardedView({ css, ...restProps }, ref) {
|
|
11178
10718
|
return /* @__PURE__ */ jsx(PolymorphicElement, {
|
|
11179
10719
|
ref,
|
|
@@ -11182,7 +10722,7 @@ function UnforwardedView({ css, ...restProps }, ref) {
|
|
|
11182
10722
|
}
|
|
11183
10723
|
var component_default$2 = Object.assign(forwardRef$1(UnforwardedView), { selector: ".components-view" });
|
|
11184
10724
|
//#endregion
|
|
11185
|
-
//#region ../../../node_modules/.pnpm/@wordpress+components@
|
|
10725
|
+
//#region ../../../node_modules/.pnpm/@wordpress+components@42.0.0_@date-fns+tz@1.5.0_@types+react-dom@18.3.7_@types+react@18_5beefdda355715e908adfea668830e1f/node_modules/@wordpress/components/build-module/visually-hidden/component.mjs
|
|
11186
10726
|
function UnconnectedVisuallyHidden(props, forwardedRef) {
|
|
11187
10727
|
const { style: styleProp, ...contextProps } = useContextSystem(props, "VisuallyHidden");
|
|
11188
10728
|
return /* @__PURE__ */ jsx(component_default$2, {
|
|
@@ -11197,18 +10737,19 @@ function UnconnectedVisuallyHidden(props, forwardedRef) {
|
|
|
11197
10737
|
}
|
|
11198
10738
|
var component_default$1 = contextConnect(UnconnectedVisuallyHidden, "VisuallyHidden");
|
|
11199
10739
|
//#endregion
|
|
11200
|
-
//#region ../../../node_modules/.pnpm/@wordpress+components@
|
|
10740
|
+
//#region ../../../node_modules/.pnpm/@wordpress+components@42.0.0_@date-fns+tz@1.5.0_@types+react-dom@18.3.7_@types+react@18_5beefdda355715e908adfea668830e1f/node_modules/@wordpress/components/build-module/utils/use-responsive-value.mjs
|
|
11201
10741
|
var breakpoints = [
|
|
11202
10742
|
"40em",
|
|
11203
10743
|
"52em",
|
|
11204
10744
|
"64em"
|
|
11205
10745
|
];
|
|
11206
10746
|
var useBreakpointIndex = (options = {}) => {
|
|
11207
|
-
const { defaultIndex = 0 } = options;
|
|
10747
|
+
const { defaultIndex = 0, enabled = true } = options;
|
|
11208
10748
|
if (typeof defaultIndex !== "number") throw new TypeError(`Default breakpoint index should be a number. Got: ${defaultIndex}, ${typeof defaultIndex}`);
|
|
11209
10749
|
else if (defaultIndex < 0 || defaultIndex > breakpoints.length - 1) throw new RangeError(`Default breakpoint index out of range. Theme has ${breakpoints.length} breakpoints, got index ${defaultIndex}`);
|
|
11210
10750
|
const [value, setValue] = useState$1(defaultIndex);
|
|
11211
10751
|
useEffect$1(() => {
|
|
10752
|
+
if (!enabled) return;
|
|
11212
10753
|
const getIndex = () => breakpoints.filter((bp) => {
|
|
11213
10754
|
return typeof window !== "undefined" ? window.matchMedia(`screen and (min-width: ${bp})`).matches : false;
|
|
11214
10755
|
}).length;
|
|
@@ -11221,17 +10762,21 @@ var useBreakpointIndex = (options = {}) => {
|
|
|
11221
10762
|
return () => {
|
|
11222
10763
|
if (typeof window !== "undefined") window.removeEventListener("resize", onResize);
|
|
11223
10764
|
};
|
|
11224
|
-
}, [value]);
|
|
10765
|
+
}, [value, enabled]);
|
|
11225
10766
|
return value;
|
|
11226
10767
|
};
|
|
11227
10768
|
function useResponsiveValue(values, options = {}) {
|
|
11228
|
-
const
|
|
10769
|
+
const isResponsive = Array.isArray(values) && values.length > 1;
|
|
10770
|
+
const index = useBreakpointIndex({
|
|
10771
|
+
...options,
|
|
10772
|
+
enabled: isResponsive
|
|
10773
|
+
});
|
|
11229
10774
|
if (!Array.isArray(values) && typeof values !== "function") return values;
|
|
11230
10775
|
const array = values || [];
|
|
11231
10776
|
return array[index >= array.length ? array.length - 1 : index];
|
|
11232
10777
|
}
|
|
11233
10778
|
//#endregion
|
|
11234
|
-
//#region ../../../node_modules/.pnpm/@wordpress+components@
|
|
10779
|
+
//#region ../../../node_modules/.pnpm/@wordpress+components@42.0.0_@date-fns+tz@1.5.0_@types+react-dom@18.3.7_@types+react@18_5beefdda355715e908adfea668830e1f/node_modules/@wordpress/components/build-module/grid/utils.mjs
|
|
11235
10780
|
var ALIGNMENTS = {
|
|
11236
10781
|
bottom: {
|
|
11237
10782
|
alignItems: "flex-end",
|
|
@@ -11276,52 +10821,155 @@ var ALIGNMENTS = {
|
|
|
11276
10821
|
}
|
|
11277
10822
|
};
|
|
11278
10823
|
function getAlignmentProps(alignment) {
|
|
11279
|
-
return alignment ? ALIGNMENTS[alignment] : {};
|
|
10824
|
+
return alignment ? ALIGNMENTS[alignment] ?? {} : {};
|
|
11280
10825
|
}
|
|
11281
10826
|
//#endregion
|
|
11282
|
-
//#region ../../../node_modules/.pnpm/@wordpress+components@
|
|
10827
|
+
//#region ../../../node_modules/.pnpm/@wordpress+components@42.0.0_@date-fns+tz@1.5.0_@types+react-dom@18.3.7_@types+react@18_5beefdda355715e908adfea668830e1f/node_modules/@wordpress/components/build-module/grid/hook.mjs
|
|
10828
|
+
var STYLE_HASH_ATTRIBUTE = "data-wp-hash";
|
|
10829
|
+
function getRuntime() {
|
|
10830
|
+
const globalScope = globalThis;
|
|
10831
|
+
if (globalScope.__wpStyleRuntime) return globalScope.__wpStyleRuntime;
|
|
10832
|
+
globalScope.__wpStyleRuntime = {
|
|
10833
|
+
documents: /* @__PURE__ */ new Map(),
|
|
10834
|
+
styles: /* @__PURE__ */ new Map(),
|
|
10835
|
+
injectedStyles: /* @__PURE__ */ new WeakMap()
|
|
10836
|
+
};
|
|
10837
|
+
if (typeof document !== "undefined") registerDocument(document);
|
|
10838
|
+
return globalScope.__wpStyleRuntime;
|
|
10839
|
+
}
|
|
10840
|
+
function documentContainsStyleHash(targetDocument, hash) {
|
|
10841
|
+
if (!targetDocument.head) return false;
|
|
10842
|
+
for (const style of targetDocument.head.querySelectorAll(`style[${STYLE_HASH_ATTRIBUTE}]`)) if (style.getAttribute(STYLE_HASH_ATTRIBUTE) === hash) return true;
|
|
10843
|
+
return false;
|
|
10844
|
+
}
|
|
10845
|
+
function injectStyle(targetDocument, hash, css) {
|
|
10846
|
+
if (!targetDocument.head) return;
|
|
10847
|
+
const runtime = getRuntime();
|
|
10848
|
+
let injectedStyles = runtime.injectedStyles.get(targetDocument);
|
|
10849
|
+
if (!injectedStyles) {
|
|
10850
|
+
injectedStyles = /* @__PURE__ */ new Set();
|
|
10851
|
+
runtime.injectedStyles.set(targetDocument, injectedStyles);
|
|
10852
|
+
}
|
|
10853
|
+
if (injectedStyles.has(hash)) return;
|
|
10854
|
+
if (documentContainsStyleHash(targetDocument, hash)) {
|
|
10855
|
+
injectedStyles.add(hash);
|
|
10856
|
+
return;
|
|
10857
|
+
}
|
|
10858
|
+
const style = targetDocument.createElement("style");
|
|
10859
|
+
style.setAttribute(STYLE_HASH_ATTRIBUTE, hash);
|
|
10860
|
+
style.appendChild(targetDocument.createTextNode(css));
|
|
10861
|
+
targetDocument.head.appendChild(style);
|
|
10862
|
+
injectedStyles.add(hash);
|
|
10863
|
+
}
|
|
10864
|
+
function registerDocument(targetDocument) {
|
|
10865
|
+
const runtime = getRuntime();
|
|
10866
|
+
runtime.documents.set(targetDocument, (runtime.documents.get(targetDocument) ?? 0) + 1);
|
|
10867
|
+
for (const [hash, css] of runtime.styles) injectStyle(targetDocument, hash, css);
|
|
10868
|
+
return () => {
|
|
10869
|
+
const count = runtime.documents.get(targetDocument);
|
|
10870
|
+
if (count === void 0) return;
|
|
10871
|
+
if (count <= 1) {
|
|
10872
|
+
runtime.documents.delete(targetDocument);
|
|
10873
|
+
return;
|
|
10874
|
+
}
|
|
10875
|
+
runtime.documents.set(targetDocument, count - 1);
|
|
10876
|
+
};
|
|
10877
|
+
}
|
|
10878
|
+
function registerStyle(hash, css) {
|
|
10879
|
+
const runtime = getRuntime();
|
|
10880
|
+
runtime.styles.set(hash, css);
|
|
10881
|
+
for (const targetDocument of runtime.documents.keys()) injectStyle(targetDocument, hash, css);
|
|
10882
|
+
}
|
|
10883
|
+
if (typeof process === "undefined" || process.env.NODE_ENV !== "test") registerStyle("79bac25858", "._631b7063b4047c89__grid{--wp-components-grid-align:initial;--wp-components-grid-justify:initial;--wp-components-grid-gap:initial;--wp-components-grid-template-columns:initial;--wp-components-grid-template-rows:initial;--wp-components-grid-row-gap:initial;--wp-components-grid-column-gap:initial;display:grid}._631b7063b4047c89__grid:not(:where(._51fa5e5688d538e7__row-gap-inherit,._3940112538797bb2__row-gap-initial,._9dc0e80dad95eb11__row-gap-unset,._964ec4132d3d0776__row-gap-revert,._9219888d7c4749d5__row-gap-revert-layer)){row-gap:var(--wp-components-grid-row-gap,calc(4px*var(--wp-components-grid-gap)))}._631b7063b4047c89__grid:not(:where(._149fd947497e8690__column-gap-inherit,.a018e74b0f04c517__column-gap-initial,.b1e45f9587eb70e5__column-gap-unset,._4da312511f64af94__column-gap-revert,.b51ead67217c210a__column-gap-revert-layer)){column-gap:var(--wp-components-grid-column-gap,calc(4px*var(--wp-components-grid-gap)))}._4cae76607d36422b__has-align:not(:where(._2c693b642b24e0d9__align-inherit,.fd4c5676ad7e83d4__align-initial,.c4c0cde44ab0ed21__align-unset,._8c23efb61db2f04e__align-revert,.c3adc4c41efa56d1__align-revert-layer)){align-items:var(--wp-components-grid-align)}._9bcd99517d001b4b__has-justify:not(:where(.a72d35ee0eda5e6b__justify-inherit,.d386403fd02ebc45__justify-initial,._7d60510a69e8ddf9__justify-unset,._857dfb6521d0cae3__justify-revert,._1537fff8402f1ca1__justify-revert-layer)){justify-content:var(--wp-components-grid-justify)}._983f7df07cd35a72__has-template-columns:not(:where(.df2216db1a717825__template-columns-inherit,._9016934ed273a0b8__template-columns-initial,._74966333f352d829__template-columns-unset,.b3ce45d005011688__template-columns-revert,._9ff0250b9bed5764__template-columns-revert-layer)){grid-template-columns:var(--wp-components-grid-template-columns)}._7e0fa0c081c20f6e__has-template-rows:not(:where(._10cfd24f62672d27__template-rows-inherit,.da1333be6b2af8c3__template-rows-initial,._919938d55c0cf234__template-rows-unset,.db40efe5796b7ffb__template-rows-revert,._1080cc5b99823c58__template-rows-revert-layer)){grid-template-rows:var(--wp-components-grid-template-rows)}.f4729d54fca65af1__is-inline{display:inline-grid;vertical-align:middle}._2c693b642b24e0d9__align-inherit{align-items:inherit}.fd4c5676ad7e83d4__align-initial{align-items:normal}.c4c0cde44ab0ed21__align-unset{align-items:unset}._8c23efb61db2f04e__align-revert{align-items:revert}.c3adc4c41efa56d1__align-revert-layer{align-items:revert-layer}.a72d35ee0eda5e6b__justify-inherit{justify-content:inherit}.d386403fd02ebc45__justify-initial{justify-content:normal}._7d60510a69e8ddf9__justify-unset{justify-content:unset}._857dfb6521d0cae3__justify-revert{justify-content:revert}._1537fff8402f1ca1__justify-revert-layer{justify-content:revert-layer}.df2216db1a717825__template-columns-inherit{grid-template-columns:inherit}._9016934ed273a0b8__template-columns-initial{grid-template-columns:none}._74966333f352d829__template-columns-unset{grid-template-columns:unset}.b3ce45d005011688__template-columns-revert{grid-template-columns:revert}._9ff0250b9bed5764__template-columns-revert-layer{grid-template-columns:revert-layer}._10cfd24f62672d27__template-rows-inherit{grid-template-rows:inherit}.da1333be6b2af8c3__template-rows-initial{grid-template-rows:none}._919938d55c0cf234__template-rows-unset{grid-template-rows:unset}.db40efe5796b7ffb__template-rows-revert{grid-template-rows:revert}._1080cc5b99823c58__template-rows-revert-layer{grid-template-rows:revert-layer}._51fa5e5688d538e7__row-gap-inherit{row-gap:inherit}._3940112538797bb2__row-gap-initial{row-gap:normal}._9dc0e80dad95eb11__row-gap-unset{row-gap:unset}._964ec4132d3d0776__row-gap-revert{row-gap:revert}._9219888d7c4749d5__row-gap-revert-layer{row-gap:revert-layer}._149fd947497e8690__column-gap-inherit{column-gap:inherit}.a018e74b0f04c517__column-gap-initial{column-gap:normal}.b1e45f9587eb70e5__column-gap-unset{column-gap:unset}._4da312511f64af94__column-gap-revert{column-gap:revert}.b51ead67217c210a__column-gap-revert-layer{column-gap:revert-layer}");
|
|
10884
|
+
var style_module_default = {
|
|
10885
|
+
"grid": "_631b7063b4047c89__grid",
|
|
10886
|
+
"row-gap-inherit": "_51fa5e5688d538e7__row-gap-inherit",
|
|
10887
|
+
"row-gap-initial": "_3940112538797bb2__row-gap-initial",
|
|
10888
|
+
"row-gap-unset": "_9dc0e80dad95eb11__row-gap-unset",
|
|
10889
|
+
"row-gap-revert": "_964ec4132d3d0776__row-gap-revert",
|
|
10890
|
+
"row-gap-revert-layer": "_9219888d7c4749d5__row-gap-revert-layer",
|
|
10891
|
+
"column-gap-inherit": "_149fd947497e8690__column-gap-inherit",
|
|
10892
|
+
"column-gap-initial": "a018e74b0f04c517__column-gap-initial",
|
|
10893
|
+
"column-gap-unset": "b1e45f9587eb70e5__column-gap-unset",
|
|
10894
|
+
"column-gap-revert": "_4da312511f64af94__column-gap-revert",
|
|
10895
|
+
"column-gap-revert-layer": "b51ead67217c210a__column-gap-revert-layer",
|
|
10896
|
+
"has-align": "_4cae76607d36422b__has-align",
|
|
10897
|
+
"align-inherit": "_2c693b642b24e0d9__align-inherit",
|
|
10898
|
+
"align-initial": "fd4c5676ad7e83d4__align-initial",
|
|
10899
|
+
"align-unset": "c4c0cde44ab0ed21__align-unset",
|
|
10900
|
+
"align-revert": "_8c23efb61db2f04e__align-revert",
|
|
10901
|
+
"align-revert-layer": "c3adc4c41efa56d1__align-revert-layer",
|
|
10902
|
+
"has-justify": "_9bcd99517d001b4b__has-justify",
|
|
10903
|
+
"justify-inherit": "a72d35ee0eda5e6b__justify-inherit",
|
|
10904
|
+
"justify-initial": "d386403fd02ebc45__justify-initial",
|
|
10905
|
+
"justify-unset": "_7d60510a69e8ddf9__justify-unset",
|
|
10906
|
+
"justify-revert": "_857dfb6521d0cae3__justify-revert",
|
|
10907
|
+
"justify-revert-layer": "_1537fff8402f1ca1__justify-revert-layer",
|
|
10908
|
+
"has-template-columns": "_983f7df07cd35a72__has-template-columns",
|
|
10909
|
+
"template-columns-inherit": "df2216db1a717825__template-columns-inherit",
|
|
10910
|
+
"template-columns-initial": "_9016934ed273a0b8__template-columns-initial",
|
|
10911
|
+
"template-columns-unset": "_74966333f352d829__template-columns-unset",
|
|
10912
|
+
"template-columns-revert": "b3ce45d005011688__template-columns-revert",
|
|
10913
|
+
"template-columns-revert-layer": "_9ff0250b9bed5764__template-columns-revert-layer",
|
|
10914
|
+
"has-template-rows": "_7e0fa0c081c20f6e__has-template-rows",
|
|
10915
|
+
"template-rows-inherit": "_10cfd24f62672d27__template-rows-inherit",
|
|
10916
|
+
"template-rows-initial": "da1333be6b2af8c3__template-rows-initial",
|
|
10917
|
+
"template-rows-unset": "_919938d55c0cf234__template-rows-unset",
|
|
10918
|
+
"template-rows-revert": "db40efe5796b7ffb__template-rows-revert",
|
|
10919
|
+
"template-rows-revert-layer": "_1080cc5b99823c58__template-rows-revert-layer",
|
|
10920
|
+
"is-inline": "f4729d54fca65af1__is-inline"
|
|
10921
|
+
};
|
|
10922
|
+
var CSS_WIDE_KEYWORDS = /* @__PURE__ */ new Set([
|
|
10923
|
+
"inherit",
|
|
10924
|
+
"initial",
|
|
10925
|
+
"unset",
|
|
10926
|
+
"revert",
|
|
10927
|
+
"revert-layer"
|
|
10928
|
+
]);
|
|
10929
|
+
function toCSSValue(value) {
|
|
10930
|
+
return typeof value === "number" ? `${value}px` : value?.trim() || void 0;
|
|
10931
|
+
}
|
|
11283
10932
|
function useGrid(props) {
|
|
11284
|
-
const { align, alignment, className, columnGap, columns = 2, gap = 3, isInline = false, justify, rowGap, rows, templateColumns, templateRows, ...otherProps } = useContextSystem(props, "Grid");
|
|
10933
|
+
const { align, alignment, className, columnGap, columns = 2, gap = 3, isInline = false, justify, rowGap, rows, style, templateColumns, templateRows, ...otherProps } = useContextSystem(props, "Grid");
|
|
11285
10934
|
const column = useResponsiveValue(Array.isArray(columns) ? columns : [columns]);
|
|
11286
10935
|
const row = useResponsiveValue(Array.isArray(rows) ? rows : [rows]);
|
|
11287
|
-
const gridTemplateColumns = templateColumns || !!
|
|
11288
|
-
const gridTemplateRows = templateRows || !!
|
|
11289
|
-
const
|
|
11290
|
-
const
|
|
11291
|
-
|
|
11292
|
-
|
|
11293
|
-
|
|
11294
|
-
|
|
11295
|
-
|
|
11296
|
-
|
|
11297
|
-
|
|
11298
|
-
gridRowGap: rowGap,
|
|
11299
|
-
gridColumnGap: columnGap,
|
|
11300
|
-
justifyContent: justify,
|
|
11301
|
-
verticalAlign: isInline ? "middle" : void 0,
|
|
11302
|
-
...alignmentProps
|
|
11303
|
-
}, process.env.NODE_ENV === "production" ? "" : ";label:gridClasses;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImhvb2sudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBNENzQiIsImZpbGUiOiJob29rLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHsgdXNlTWVtbyB9IGZyb20gJ0B3b3JkcHJlc3MvZWxlbWVudCc7XG5pbXBvcnQgdHlwZSB7IFdvcmRQcmVzc0NvbXBvbmVudFByb3BzIH0gZnJvbSAnLi4vY29udGV4dCc7XG5pbXBvcnQgeyB1c2VDb250ZXh0U3lzdGVtIH0gZnJvbSAnLi4vY29udGV4dCc7XG5pbXBvcnQgeyBnZXRBbGlnbm1lbnRQcm9wcyB9IGZyb20gJy4vdXRpbHMnO1xuaW1wb3J0IHsgdXNlUmVzcG9uc2l2ZVZhbHVlIH0gZnJvbSAnLi4vdXRpbHMvdXNlLXJlc3BvbnNpdmUtdmFsdWUnO1xuaW1wb3J0IENPTkZJRyBmcm9tICcuLi91dGlscy9jb25maWctdmFsdWVzJztcbmltcG9ydCB7IHVzZUN4IH0gZnJvbSAnLi4vdXRpbHMvaG9va3MvdXNlLWN4JztcbmltcG9ydCB0eXBlIHsgR3JpZFByb3BzIH0gZnJvbSAnLi90eXBlcyc7XG5cbmV4cG9ydCBkZWZhdWx0IGZ1bmN0aW9uIHVzZUdyaWQoXG5cdHByb3BzOiBXb3JkUHJlc3NDb21wb25lbnRQcm9wczwgR3JpZFByb3BzLCAnZGl2JyA+XG4pIHtcblx0Y29uc3Qge1xuXHRcdGFsaWduLFxuXHRcdGFsaWdubWVudCxcblx0XHRjbGFzc05hbWUsXG5cdFx0Y29sdW1uR2FwLFxuXHRcdGNvbHVtbnMgPSAyLFxuXHRcdGdhcCA9IDMsXG5cdFx0aXNJbmxpbmUgPSBmYWxzZSxcblx0XHRqdXN0aWZ5LFxuXHRcdHJvd0dhcCxcblx0XHRyb3dzLFxuXHRcdHRlbXBsYXRlQ29sdW1ucyxcblx0XHR0ZW1wbGF0ZVJvd3MsXG5cdFx0Li4ub3RoZXJQcm9wc1xuXHR9ID0gdXNlQ29udGV4dFN5c3RlbSggcHJvcHMsICdHcmlkJyApO1xuXG5cdGNvbnN0IGNvbHVtbnNBc0FycmF5ID0gQXJyYXkuaXNBcnJheSggY29sdW1ucyApID8gY29sdW1ucyA6IFsgY29sdW1ucyBdO1xuXHRjb25zdCBjb2x1bW4gPSB1c2VSZXNwb25zaXZlVmFsdWUoIGNvbHVtbnNBc0FycmF5ICk7XG5cdGNvbnN0IHJvd3NBc0FycmF5ID0gQXJyYXkuaXNBcnJheSggcm93cyApID8gcm93cyA6IFsgcm93cyBdO1xuXHRjb25zdCByb3cgPSB1c2VSZXNwb25zaXZlVmFsdWUoIHJvd3NBc0FycmF5ICk7XG5cblx0Y29uc3QgZ3JpZFRlbXBsYXRlQ29sdW1ucyA9XG5cdFx0dGVtcGxhdGVDb2x1bW5zIHx8ICggISEgY29sdW1ucyAmJiBgcmVwZWF0KCAkeyBjb2x1bW4gfSwgMWZyIClgICk7XG5cdGNvbnN0IGdyaWRUZW1wbGF0ZVJvd3MgPVxuXHRcdHRlbXBsYXRlUm93cyB8fCAoICEhIHJvd3MgJiYgYHJlcGVhdCggJHsgcm93IH0sIDFmciApYCApO1xuXG5cdGNvbnN0IGN4ID0gdXNlQ3goKTtcblxuXHRjb25zdCBjbGFzc2VzID0gdXNlTWVtbyggKCkgPT4ge1xuXHRcdGNvbnN0IGFsaWdubWVudFByb3BzID0gZ2V0QWxpZ25tZW50UHJvcHMoIGFsaWdubWVudCApO1xuXG5cdFx0Y29uc3QgZ3JpZENsYXNzZXMgPSBjc3MoIHtcblx0XHRcdGFsaWduSXRlbXM6IGFsaWduLFxuXHRcdFx0ZGlzcGxheTogaXNJbmxpbmUgPyAnaW5saW5lLWdyaWQnIDogJ2dyaWQnLFxuXHRcdFx0Z2FwOiBgY2FsYyggJHsgQ09ORklHLmdyaWRCYXNlIH0gKiAkeyBnYXAgfSApYCxcblx0XHRcdGdyaWRUZW1wbGF0ZUNvbHVtbnM6IGdyaWRUZW1wbGF0ZUNvbHVtbnMgfHwgdW5kZWZpbmVkLFxuXHRcdFx0Z3JpZFRlbXBsYXRlUm93czogZ3JpZFRlbXBsYXRlUm93cyB8fCB1bmRlZmluZWQsXG5cdFx0XHRncmlkUm93R2FwOiByb3dHYXAsXG5cdFx0XHRncmlkQ29sdW1uR2FwOiBjb2x1bW5HYXAsXG5cdFx0XHRqdXN0aWZ5Q29udGVudDoganVzdGlmeSxcblx0XHRcdHZlcnRpY2FsQWxpZ246IGlzSW5saW5lID8gJ21pZGRsZScgOiB1bmRlZmluZWQsXG5cdFx0XHQuLi5hbGlnbm1lbnRQcm9wcyxcblx0XHR9ICk7XG5cblx0XHRyZXR1cm4gY3goIGdyaWRDbGFzc2VzLCBjbGFzc05hbWUgKTtcblx0fSwgW1xuXHRcdGFsaWduLFxuXHRcdGFsaWdubWVudCxcblx0XHRjbGFzc05hbWUsXG5cdFx0Y29sdW1uR2FwLFxuXHRcdGN4LFxuXHRcdGdhcCxcblx0XHRncmlkVGVtcGxhdGVDb2x1bW5zLFxuXHRcdGdyaWRUZW1wbGF0ZVJvd3MsXG5cdFx0aXNJbmxpbmUsXG5cdFx0anVzdGlmeSxcblx0XHRyb3dHYXAsXG5cdF0gKTtcblxuXHRyZXR1cm4geyAuLi5vdGhlclByb3BzLCBjbGFzc05hbWU6IGNsYXNzZXMgfTtcbn1cbiJdfQ== */");
|
|
11304
|
-
return cx(gridClasses, className);
|
|
11305
|
-
}, [
|
|
11306
|
-
align,
|
|
11307
|
-
alignment,
|
|
11308
|
-
className,
|
|
11309
|
-
columnGap,
|
|
11310
|
-
cx,
|
|
11311
|
-
gap,
|
|
11312
|
-
gridTemplateColumns,
|
|
11313
|
-
gridTemplateRows,
|
|
11314
|
-
isInline,
|
|
11315
|
-
justify,
|
|
11316
|
-
rowGap
|
|
11317
|
-
]);
|
|
10936
|
+
const gridTemplateColumns = templateColumns || !!column && `repeat( ${column}, 1fr )`;
|
|
10937
|
+
const gridTemplateRows = templateRows || !!row && `repeat( ${row}, 1fr )`;
|
|
10938
|
+
const alignmentProps = getAlignmentProps(alignment);
|
|
10939
|
+
const values = {
|
|
10940
|
+
align: alignmentProps.alignItems ?? align,
|
|
10941
|
+
justify: alignmentProps.justifyContent ?? justify,
|
|
10942
|
+
"template-columns": gridTemplateColumns || void 0,
|
|
10943
|
+
"template-rows": gridTemplateRows || void 0,
|
|
10944
|
+
"row-gap": rowGap,
|
|
10945
|
+
"column-gap": columnGap
|
|
10946
|
+
};
|
|
11318
10947
|
return {
|
|
11319
10948
|
...otherProps,
|
|
11320
|
-
className:
|
|
10949
|
+
className: clsx(style_module_default.grid, {
|
|
10950
|
+
[style_module_default["is-inline"]]: isInline,
|
|
10951
|
+
[style_module_default["has-align"]]: !!values.align?.trim(),
|
|
10952
|
+
[style_module_default["has-justify"]]: !!values.justify?.trim(),
|
|
10953
|
+
[style_module_default["has-template-columns"]]: !!toCSSValue(values["template-columns"]),
|
|
10954
|
+
[style_module_default["has-template-rows"]]: !!toCSSValue(values["template-rows"])
|
|
10955
|
+
}, Object.entries(values).map(([property, value]) => {
|
|
10956
|
+
const keyword = typeof value === "string" ? value.trim().toLowerCase() : "";
|
|
10957
|
+
return CSS_WIDE_KEYWORDS.has(keyword) && style_module_default[`${property}-${keyword}`];
|
|
10958
|
+
}), className),
|
|
10959
|
+
style: {
|
|
10960
|
+
"--wp-components-grid-align": values.align,
|
|
10961
|
+
"--wp-components-grid-justify": values.justify,
|
|
10962
|
+
"--wp-components-grid-gap": gap,
|
|
10963
|
+
"--wp-components-grid-template-columns": toCSSValue(values["template-columns"]),
|
|
10964
|
+
"--wp-components-grid-template-rows": toCSSValue(values["template-rows"]),
|
|
10965
|
+
"--wp-components-grid-row-gap": toCSSValue(rowGap),
|
|
10966
|
+
"--wp-components-grid-column-gap": toCSSValue(columnGap),
|
|
10967
|
+
...style
|
|
10968
|
+
}
|
|
11321
10969
|
};
|
|
11322
10970
|
}
|
|
11323
10971
|
//#endregion
|
|
11324
|
-
//#region ../../../node_modules/.pnpm/@wordpress+components@
|
|
10972
|
+
//#region ../../../node_modules/.pnpm/@wordpress+components@42.0.0_@date-fns+tz@1.5.0_@types+react-dom@18.3.7_@types+react@18_5beefdda355715e908adfea668830e1f/node_modules/@wordpress/components/build-module/grid/component.mjs
|
|
11325
10973
|
function UnconnectedGrid(props, forwardedRef) {
|
|
11326
10974
|
const gridProps = useGrid(props);
|
|
11327
10975
|
return /* @__PURE__ */ jsx(component_default$2, {
|