@automattic/charts 4.15.0 → 4.15.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/dist/index.js CHANGED
@@ -3,7 +3,7 @@ import { formatNumber, formatNumberCompact } from "@automattic/number-formatters
3
3
  import { AnimatedAreaSeries, AnimatedAreaStack, AreaSeries, Axis, BarGroup, BarSeries, DataContext, GlyphSeries, Grid, TooltipContext, XYChart, buildChartTheme, useEventEmitter } from "@visx/xychart";
4
4
  import { __, _n, _x, sprintf } from "@wordpress/i18n";
5
5
  import clsx from "clsx";
6
- import { Children, Fragment, createContext, createContext as createContext$1, createElement, forwardRef, forwardRef as forwardRef$1, isValidElement, memo, useCallback, useContext, useContext as useContext$1, useEffect, useEffect as useEffect$1, useId, useImperativeHandle, useLayoutEffect, useMemo, useMemo as useMemo$1, useRef, useRef as useRef$1, useState, useState as useState$1, version } from "react";
6
+ import { Children, Fragment, createContext, createElement, forwardRef, isValidElement, useCallback, useContext, useEffect, useId, useImperativeHandle, useLayoutEffect, useMemo, useRef, useState, version } from "react";
7
7
  import { differenceInHours, differenceInYears, isValid, parse, parseISO } from "date-fns";
8
8
  import { tzOffset } from "@date-fns/tz";
9
9
  import { Text, getStringWidth } from "@visx/text";
@@ -25,7 +25,6 @@ import { bisector } from "@visx/vendor/d3-array";
25
25
  import { PatternCircles, PatternHexagons, PatternLines, PatternWaves } from "@visx/pattern";
26
26
  import { Chart } from "react-google-charts";
27
27
  import DOMPurify from "dompurify";
28
- import { __assign } from "tslib";
29
28
  import { Icon, chevronRight } from "@wordpress/icons";
30
29
  import { arc, pie } from "@visx/shape";
31
30
  // \0rolldown/runtime.js
@@ -10219,879 +10218,6 @@ const useMonthCalendarHeatmapData = (valueByDay, range, options = {}) => {
10219
10218
  weekStartsOn
10220
10219
  ]);
10221
10220
  };
10222
- // ../../../node_modules/.pnpm/is-plain-object@5.1.0/node_modules/is-plain-object/dist/is-plain-object.mjs
10223
- /*!
10224
- * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
10225
- *
10226
- * Copyright (c) 2014-2017, Jon Schlinkert.
10227
- * Released under the MIT License.
10228
- */
10229
- function isObject(o) {
10230
- return Object.prototype.toString.call(o) === "[object Object]";
10231
- }
10232
- function isPlainObject(o) {
10233
- var ctor, prot;
10234
- if (isObject(o) === false) return false;
10235
- ctor = o.constructor;
10236
- if (ctor === void 0) return true;
10237
- prot = ctor.prototype;
10238
- if (isObject(prot) === false) return false;
10239
- if (prot.hasOwnProperty("isPrototypeOf") === false) return false;
10240
- return true;
10241
- }
10242
- // ../../../node_modules/.pnpm/lower-case@2.0.2/node_modules/lower-case/dist.es2015/index.js
10243
- /**
10244
- * Lower case as a function.
10245
- */
10246
- function lowerCase(str) {
10247
- return str.toLowerCase();
10248
- }
10249
- // ../../../node_modules/.pnpm/no-case@3.0.4/node_modules/no-case/dist.es2015/index.js
10250
- var DEFAULT_SPLIT_REGEXP = [/([a-z0-9])([A-Z])/g, /([A-Z])([A-Z][a-z])/g];
10251
- var DEFAULT_STRIP_REGEXP = /[^A-Z0-9]+/gi;
10252
- /**
10253
- * Normalize the string into something other libraries can manipulate easier.
10254
- */
10255
- function noCase(input, options) {
10256
- if (options === void 0) options = {};
10257
- var _a = options.splitRegexp, splitRegexp = _a === void 0 ? DEFAULT_SPLIT_REGEXP : _a, _b = options.stripRegexp, stripRegexp = _b === void 0 ? DEFAULT_STRIP_REGEXP : _b, _c = options.transform, transform = _c === void 0 ? lowerCase : _c, _d = options.delimiter, delimiter = _d === void 0 ? " " : _d;
10258
- var result = replace(replace(input, splitRegexp, "$1\0$2"), stripRegexp, "\0");
10259
- var start = 0;
10260
- var end = result.length;
10261
- while (result.charAt(start) === "\0") start++;
10262
- while (result.charAt(end - 1) === "\0") end--;
10263
- return result.slice(start, end).split("\0").map(transform).join(delimiter);
10264
- }
10265
- /**
10266
- * Replace `re` in the input string with the replacement value.
10267
- */
10268
- function replace(input, re, value) {
10269
- if (re instanceof RegExp) return input.replace(re, value);
10270
- return re.reduce(function(input, re) {
10271
- return input.replace(re, value);
10272
- }, input);
10273
- }
10274
- // ../../../node_modules/.pnpm/dot-case@3.0.4/node_modules/dot-case/dist.es2015/index.js
10275
- function dotCase(input, options) {
10276
- if (options === void 0) options = {};
10277
- return noCase(input, __assign({ delimiter: "." }, options));
10278
- }
10279
- // ../../../node_modules/.pnpm/param-case@3.0.4/node_modules/param-case/dist.es2015/index.js
10280
- function paramCase(input, options) {
10281
- if (options === void 0) options = {};
10282
- return dotCase(input, __assign({ delimiter: "-" }, options));
10283
- }
10284
- // ../../../node_modules/.pnpm/@wordpress+warning@4.1.0/node_modules/@wordpress/warning/build-module/utils.mjs
10285
- /**
10286
- * Object map tracking messages which have been logged, for use in ensuring a
10287
- * message is only logged once.
10288
- */
10289
- const logged = /* @__PURE__ */ new Set();
10290
- // ../../../node_modules/.pnpm/@wordpress+warning@4.1.0/node_modules/@wordpress/warning/build-module/index.mjs
10291
- function isDev() {
10292
- return globalThis.SCRIPT_DEBUG === true;
10293
- }
10294
- /**
10295
- * Shows a warning with `message` if environment is not `production`.
10296
- *
10297
- * @param message Message to show in the warning.
10298
- *
10299
- * @example
10300
- * ```js
10301
- * import warning from '@wordpress/warning';
10302
- *
10303
- * function MyComponent( props ) {
10304
- * if ( ! props.title ) {
10305
- * warning( '`props.title` was not passed' );
10306
- * }
10307
- * ...
10308
- * }
10309
- * ```
10310
- */
10311
- function warning(message) {
10312
- if (!isDev()) return;
10313
- if (logged.has(message)) return;
10314
- console.warn(message);
10315
- try {
10316
- throw Error(message);
10317
- } catch {}
10318
- logged.add(message);
10319
- }
10320
- // ../../../node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/es6/index.js
10321
- var require_es6 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
10322
- module.exports = function equal(a, b) {
10323
- if (a === b) return true;
10324
- if (a && b && typeof a == "object" && typeof b == "object") {
10325
- if (a.constructor !== b.constructor) return false;
10326
- var length, i, keys;
10327
- if (Array.isArray(a)) {
10328
- length = a.length;
10329
- if (length != b.length) return false;
10330
- for (i = length; i-- !== 0;) if (!equal(a[i], b[i])) return false;
10331
- return true;
10332
- }
10333
- if (a instanceof Map && b instanceof Map) {
10334
- if (a.size !== b.size) return false;
10335
- for (i of a.entries()) if (!b.has(i[0])) return false;
10336
- for (i of a.entries()) if (!equal(i[1], b.get(i[0]))) return false;
10337
- return true;
10338
- }
10339
- if (a instanceof Set && b instanceof Set) {
10340
- if (a.size !== b.size) return false;
10341
- for (i of a.entries()) if (!b.has(i[0])) return false;
10342
- return true;
10343
- }
10344
- if (ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {
10345
- length = a.length;
10346
- if (length != b.length) return false;
10347
- for (i = length; i-- !== 0;) if (a[i] !== b[i]) return false;
10348
- return true;
10349
- }
10350
- if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
10351
- if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
10352
- if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
10353
- keys = Object.keys(a);
10354
- length = keys.length;
10355
- if (length !== Object.keys(b).length) return false;
10356
- for (i = length; i-- !== 0;) if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
10357
- for (i = length; i-- !== 0;) {
10358
- var key = keys[i];
10359
- if (!equal(a[key], b[key])) return false;
10360
- }
10361
- return true;
10362
- }
10363
- return a !== a && b !== b;
10364
- };
10365
- }));
10366
- // ../../../node_modules/.pnpm/@wordpress+components@44.0.0_patch_hash=dd89cc780626599c6721f4e05e7091dd7b0aed577d8a667_94a1a77c56d75249398bc99af3f14fa5/node_modules/@wordpress/components/build-module/utils/hooks/use-update-effect.mjs
10367
- /**
10368
- * A `React.useEffect` that will not run on the first render.
10369
- * Source:
10370
- * https://github.com/ariakit/ariakit/blob/main/packages/ariakit-react-core/src/utils/hooks.ts
10371
- *
10372
- * @param effect
10373
- * @param deps
10374
- */
10375
- function useUpdateEffect(effect, deps) {
10376
- const mountedRef = useRef$1(false);
10377
- useEffect$1(() => {
10378
- if (mountedRef.current) return effect();
10379
- mountedRef.current = true;
10380
- }, deps);
10381
- useEffect$1(() => () => {
10382
- mountedRef.current = false;
10383
- }, []);
10384
- }
10385
- // ../../../node_modules/.pnpm/@wordpress+components@44.0.0_patch_hash=dd89cc780626599c6721f4e05e7091dd7b0aed577d8a667_94a1a77c56d75249398bc99af3f14fa5/node_modules/@wordpress/components/build-module/context/context-system-provider.mjs
10386
- var import_es6 = /* @__PURE__ */ __toESM(require_es6(), 1);
10387
- const ComponentsContext = createContext$1({});
10388
- ComponentsContext.displayName = "ComponentsContext";
10389
- const useComponentsContext = () => useContext$1(ComponentsContext);
10390
- /**
10391
- * Consolidates incoming ContextSystem values with a (potential) parent ContextSystem value.
10392
- *
10393
- * Note: This function will warn if it detects an un-memoized `value`
10394
- *
10395
- * @param {Object} props
10396
- * @param {Record<string, any>} props.value
10397
- * @return {Record<string, any>} The consolidated value.
10398
- */
10399
- function useContextSystemBridge({ value }) {
10400
- const parentContext = useComponentsContext();
10401
- const valueRef = useRef$1(value);
10402
- useUpdateEffect(() => {
10403
- if ((0, import_es6.default)(valueRef.current, value) && valueRef.current !== value) warning(`Please memoize your context: ${JSON.stringify(value)}`);
10404
- }, [value]);
10405
- return useMemo$1(() => {
10406
- return deepmerge(parentContext ?? {}, value ?? {}, { isMergeableObject: isPlainObject });
10407
- }, [parentContext, value]);
10408
- }
10409
- /**
10410
- * A Provider component that can modify props for connected components within
10411
- * the Context system.
10412
- *
10413
- * @example
10414
- * ```jsx
10415
- * <ContextSystemProvider value={{ Button: { size: 'small' }}}>
10416
- * <Button>...</Button>
10417
- * </ContextSystemProvider>
10418
- * ```
10419
- *
10420
- * @template {Record<string, any>} T
10421
- * @param {Object} options
10422
- * @param {React.ReactNode} options.children Children to render.
10423
- * @param {T} options.value Props to render into connected components.
10424
- * @return {React.JSX.Element} A Provider wrapped component.
10425
- */
10426
- const BaseContextSystemProvider = ({ children, value }) => {
10427
- const contextValue = useContextSystemBridge({ value });
10428
- return /* @__PURE__ */ jsx(ComponentsContext.Provider, {
10429
- value: contextValue,
10430
- children
10431
- });
10432
- };
10433
- memo(BaseContextSystemProvider);
10434
- // ../../../node_modules/.pnpm/@wordpress+components@44.0.0_patch_hash=dd89cc780626599c6721f4e05e7091dd7b0aed577d8a667_94a1a77c56d75249398bc99af3f14fa5/node_modules/@wordpress/components/build-module/context/constants.mjs
10435
- const COMPONENT_NAMESPACE = "data-wp-component";
10436
- const CONNECTED_NAMESPACE = "data-wp-c16t";
10437
- /**
10438
- * Special key where the connected namespaces are stored.
10439
- * This is attached to Context connected components as a static property.
10440
- */
10441
- const CONNECT_STATIC_NAMESPACE = "__contextSystemKey__";
10442
- // ../../../node_modules/.pnpm/memize@2.1.1/node_modules/memize/dist/index.js
10443
- /**
10444
- * Memize options object.
10445
- *
10446
- * @typedef MemizeOptions
10447
- *
10448
- * @property {number} [maxSize] Maximum size of the cache.
10449
- */
10450
- /**
10451
- * Internal cache entry.
10452
- *
10453
- * @typedef MemizeCacheNode
10454
- *
10455
- * @property {?MemizeCacheNode|undefined} [prev] Previous node.
10456
- * @property {?MemizeCacheNode|undefined} [next] Next node.
10457
- * @property {Array<*>} args Function arguments for cache
10458
- * entry.
10459
- * @property {*} val Function result.
10460
- */
10461
- /**
10462
- * Properties of the enhanced function for controlling cache.
10463
- *
10464
- * @typedef MemizeMemoizedFunction
10465
- *
10466
- * @property {()=>void} clear Clear the cache.
10467
- */
10468
- /**
10469
- * Accepts a function to be memoized, and returns a new memoized function, with
10470
- * optional options.
10471
- *
10472
- * @template {(...args: any[]) => any} F
10473
- *
10474
- * @param {F} fn Function to memoize.
10475
- * @param {MemizeOptions} [options] Options object.
10476
- *
10477
- * @return {((...args: Parameters<F>) => ReturnType<F>) & MemizeMemoizedFunction} Memoized function.
10478
- */
10479
- function memize(fn, options) {
10480
- var size = 0;
10481
- /** @type {?MemizeCacheNode|undefined} */
10482
- var head;
10483
- /** @type {?MemizeCacheNode|undefined} */
10484
- var tail;
10485
- options = options || {};
10486
- function memoized() {
10487
- var node = head, len = arguments.length, args, i;
10488
- searchCache: while (node) {
10489
- if (node.args.length !== arguments.length) {
10490
- node = node.next;
10491
- continue;
10492
- }
10493
- for (i = 0; i < len; i++) if (node.args[i] !== arguments[i]) {
10494
- node = node.next;
10495
- continue searchCache;
10496
- }
10497
- if (node !== head) {
10498
- if (node === tail) tail = node.prev;
10499
- /** @type {MemizeCacheNode} */ node.prev.next = node.next;
10500
- if (node.next) node.next.prev = node.prev;
10501
- node.next = head;
10502
- node.prev = null;
10503
- /** @type {MemizeCacheNode} */ head.prev = node;
10504
- head = node;
10505
- }
10506
- return node.val;
10507
- }
10508
- args = new Array(len);
10509
- for (i = 0; i < len; i++) args[i] = arguments[i];
10510
- node = {
10511
- args,
10512
- val: fn.apply(null, args)
10513
- };
10514
- if (head) {
10515
- head.prev = node;
10516
- node.next = head;
10517
- } else tail = node;
10518
- if (size === options.maxSize) {
10519
- tail = tail.prev;
10520
- /** @type {MemizeCacheNode} */ tail.next = null;
10521
- } else size++;
10522
- head = node;
10523
- return node.val;
10524
- }
10525
- memoized.clear = function() {
10526
- head = null;
10527
- tail = null;
10528
- size = 0;
10529
- };
10530
- return memoized;
10531
- }
10532
- // ../../../node_modules/.pnpm/@wordpress+components@44.0.0_patch_hash=dd89cc780626599c6721f4e05e7091dd7b0aed577d8a667_94a1a77c56d75249398bc99af3f14fa5/node_modules/@wordpress/components/build-module/context/get-styled-class-name-from-key.mjs
10533
- /**
10534
- * Generates the connected component CSS className based on the namespace.
10535
- *
10536
- * @param namespace The name of the connected component.
10537
- * @return The generated CSS className.
10538
- */
10539
- function getStyledClassName(namespace) {
10540
- return `components-${paramCase(namespace)}`;
10541
- }
10542
- const getStyledClassNameFromKey = memize(getStyledClassName);
10543
- // ../../../node_modules/.pnpm/@wordpress+components@44.0.0_patch_hash=dd89cc780626599c6721f4e05e7091dd7b0aed577d8a667_94a1a77c56d75249398bc99af3f14fa5/node_modules/@wordpress/components/build-module/context/context-connect.mjs
10544
- /**
10545
- * Forwards ref (React.ForwardRef) and "Connects" (or registers) a component
10546
- * within the Context system under a specified namespace.
10547
- *
10548
- * @param Component The component to register into the Context system.
10549
- * @param namespace The namespace to register the component under.
10550
- * @return The connected WordPressComponent
10551
- */
10552
- function contextConnect(Component, namespace) {
10553
- return _contextConnect(Component, namespace, { forwardsRef: true });
10554
- }
10555
- function _contextConnect(Component, namespace, options) {
10556
- const WrappedComponent = options?.forwardsRef ? forwardRef$1(Component) : Component;
10557
- if (typeof namespace === "undefined") warning("contextConnect: Please provide a namespace");
10558
- let mergedNamespace = WrappedComponent["__contextSystemKey__"] || [namespace];
10559
- /**
10560
- * Consolidate (merge) namespaces before attaching it to the WrappedComponent.
10561
- */
10562
- if (Array.isArray(namespace)) mergedNamespace = [...mergedNamespace, ...namespace];
10563
- if (typeof namespace === "string") mergedNamespace = [...mergedNamespace, namespace];
10564
- return Object.assign(WrappedComponent, {
10565
- [CONNECT_STATIC_NAMESPACE]: [...new Set(mergedNamespace)],
10566
- displayName: namespace,
10567
- selector: `.${getStyledClassNameFromKey(namespace)}`
10568
- });
10569
- }
10570
- // ../../../node_modules/.pnpm/@wordpress+components@44.0.0_patch_hash=dd89cc780626599c6721f4e05e7091dd7b0aed577d8a667_94a1a77c56d75249398bc99af3f14fa5/node_modules/@wordpress/components/build-module/context/utils.mjs
10571
- /**
10572
- * Creates a dedicated context namespace HTML attribute for components.
10573
- * ns is short for "namespace"
10574
- *
10575
- * @example
10576
- * ```jsx
10577
- * <div {...ns('Container')} />
10578
- * ```
10579
- *
10580
- * @param componentName The name for the component.
10581
- * @return A props object with the namespaced HTML attribute.
10582
- */
10583
- function getNamespace(componentName) {
10584
- return { [COMPONENT_NAMESPACE]: componentName };
10585
- }
10586
- /**
10587
- * Creates a dedicated connected context namespace HTML attribute for components.
10588
- * ns is short for "namespace"
10589
- *
10590
- * @example
10591
- * ```jsx
10592
- * <div {...cns()} />
10593
- * ```
10594
- *
10595
- * @return A props object with the namespaced HTML attribute.
10596
- */
10597
- function getConnectedNamespace() {
10598
- return { [CONNECTED_NAMESPACE]: true };
10599
- }
10600
- // ../../../node_modules/.pnpm/@wordpress+components@44.0.0_patch_hash=dd89cc780626599c6721f4e05e7091dd7b0aed577d8a667_94a1a77c56d75249398bc99af3f14fa5/node_modules/@wordpress/components/build-module/context/use-context-system.mjs
10601
- /**
10602
- * Custom hook that derives registered props from the Context system.
10603
- * These derived props are then consolidated with incoming component props.
10604
- *
10605
- * @param props Incoming props from the component.
10606
- * @param namespace The namespace to register and to derive context props from.
10607
- * @return The connected props.
10608
- */
10609
- function useContextSystem(props, namespace) {
10610
- const contextSystemProps = useComponentsContext();
10611
- if (typeof namespace === "undefined") warning("useContextSystem: Please provide a namespace");
10612
- const contextProps = contextSystemProps?.[namespace] || {};
10613
- const finalComponentProps = {
10614
- ...getConnectedNamespace(),
10615
- ...getNamespace(namespace)
10616
- };
10617
- const { _overrides, ...otherContextProps } = contextProps;
10618
- const overrideProps = _overrides;
10619
- const initialMergedProps = Object.entries(otherContextProps).length ? Object.assign({}, otherContextProps, props) : props;
10620
- const propsWithChildren = initialMergedProps;
10621
- const classes = clsx(getStyledClassNameFromKey(namespace), props.className);
10622
- const rendered = typeof propsWithChildren.renderChildren === "function" ? propsWithChildren.renderChildren(initialMergedProps) : propsWithChildren.children;
10623
- for (const key in initialMergedProps) finalComponentProps[key] = initialMergedProps[key];
10624
- for (const key in overrideProps) finalComponentProps[key] = overrideProps[key];
10625
- if (rendered !== void 0) finalComponentProps.children = rendered;
10626
- finalComponentProps.className = classes;
10627
- return finalComponentProps;
10628
- }
10629
- // ../../../node_modules/.pnpm/@wordpress+components@44.0.0_patch_hash=dd89cc780626599c6721f4e05e7091dd7b0aed577d8a667_94a1a77c56d75249398bc99af3f14fa5/node_modules/@wordpress/components/build-module/visually-hidden/styles.mjs
10630
- const visuallyHidden = {
10631
- border: 0,
10632
- clip: "rect(1px, 1px, 1px, 1px)",
10633
- WebkitClipPath: "inset( 50% )",
10634
- clipPath: "inset( 50% )",
10635
- height: "1px",
10636
- margin: "-1px",
10637
- overflow: "hidden",
10638
- padding: 0,
10639
- position: "absolute",
10640
- width: "1px",
10641
- wordWrap: "normal",
10642
- wordBreak: "normal"
10643
- };
10644
- // ../../../node_modules/.pnpm/@wordpress+components@44.0.0_patch_hash=dd89cc780626599c6721f4e05e7091dd7b0aed577d8a667_94a1a77c56d75249398bc99af3f14fa5/node_modules/@wordpress/components/build-module/utils/polymorphic-element.mjs
10645
- const customAttributeRegExp = /^(data|aria|x)-/i;
10646
- const eventHandlerRegExp = /^on[A-Z]/;
10647
- const svgElementNames = new Set(`animate animateMotion animateTransform circle clipPath defs desc ellipse
10648
- feBlend feColorMatrix feComponentTransfer feComposite feConvolveMatrix
10649
- feDiffuseLighting feDisplacementMap feDistantLight feDropShadow feFlood
10650
- feFuncA feFuncB feFuncG feFuncR feGaussianBlur feImage feMerge feMergeNode
10651
- feMorphology feOffset fePointLight feSpecularLighting feSpotLight feTile
10652
- feTurbulence filter foreignObject g image line linearGradient marker mask
10653
- metadata mpath path pattern polygon polyline radialGradient rect set stop svg
10654
- switch symbol text textPath tspan use view`.split(/\s+/));
10655
- const baseElementProps = new Set(`children dangerouslySetInnerHTML key autoFocus defaultValue defaultChecked
10656
- innerHTML suppressContentEditableWarning suppressHydrationWarning valueLink
10657
- abbr accept acceptCharset accessKey action allow allowUserMedia
10658
- allowPaymentRequest allowFullScreen allowTransparency alt async autoComplete
10659
- autoPlay capture cellPadding cellSpacing challenge charSet checked cite classID
10660
- className cols colSpan content contentEditable contextMenu controls controlsList
10661
- coords crossOrigin data dateTime decoding default defer dir disabled
10662
- disablePictureInPicture disableRemotePlayback download draggable encType
10663
- enterKeyHint fetchpriority fetchPriority form formAction formEncType formMethod
10664
- formNoValidate formTarget frameBorder headers height hidden high href hrefLang
10665
- htmlFor httpEquiv id inputMode integrity is keyParams keyType kind label lang
10666
- list loading loop low marginHeight marginWidth max maxLength media mediaGroup
10667
- method min minLength multiple muted name nonce noValidate open optimum pattern
10668
- placeholder playsInline popover popoverTarget popoverTargetAction poster
10669
- preload profile radioGroup readOnly referrerPolicy rel required reversed role
10670
- rows rowSpan sandbox scope scoped scrolling seamless selected shape size sizes
10671
- slot span spellCheck src srcDoc srcLang srcSet start step style summary
10672
- tabIndex target title translate type useMap value width wmode wrap about
10673
- datatype inlist prefix property resource typeof vocab autoCapitalize
10674
- autoCorrect autoSave color incremental fallback inert itemProp itemScope
10675
- itemType itemID itemRef on option results security unselectable`.split(/\s+/));
10676
- const svgElementProps = new Set(`accentHeight accumulate additive alignmentBaseline allowReorder alphabetic
10677
- amplitude arabicForm ascent attributeName attributeType autoReverse azimuth
10678
- baseFrequency baselineShift baseProfile bbox begin bias by calcMode capHeight
10679
- clip clipPathUnits clipPath clipRule colorInterpolation
10680
- colorInterpolationFilters colorProfile colorRendering contentScriptType
10681
- contentStyleType cursor cx cy d decelerate descent diffuseConstant direction
10682
- display divisor dominantBaseline dur dx dy edgeMode elevation enableBackground
10683
- end exponent externalResourcesRequired fill fillOpacity fillRule filter
10684
- filterRes filterUnits floodColor floodOpacity focusable fontFamily fontSize
10685
- fontSizeAdjust fontStretch fontStyle fontVariant fontWeight format from fr fx
10686
- fy g1 g2 glyphName glyphOrientationHorizontal glyphOrientationVertical
10687
- glyphRef gradientTransform gradientUnits hanging horizAdvX horizOriginX
10688
- ideographic imageRendering in in2 intercept k k1 k2 k3 k4 kernelMatrix
10689
- kernelUnitLength kerning keyPoints keySplines keyTimes lengthAdjust
10690
- letterSpacing lightingColor limitingConeAngle local markerEnd markerMid
10691
- markerStart markerHeight markerUnits markerWidth mask maskContentUnits
10692
- maskUnits mathematical mode numOctaves offset opacity operator order orient
10693
- orientation origin overflow overlinePosition overlineThickness panose1
10694
- paintOrder pathLength patternContentUnits patternTransform patternUnits
10695
- pointerEvents points pointsAtX pointsAtY pointsAtZ preserveAlpha
10696
- preserveAspectRatio primitiveUnits r radius refX refY renderingIntent
10697
- repeatCount repeatDur requiredExtensions requiredFeatures restart result rotate
10698
- rx ry scale seed shapeRendering slope spacing specularConstant
10699
- specularExponent speed spreadMethod startOffset stdDeviation stemh stemv
10700
- stitchTiles stopColor stopOpacity strikethroughPosition strikethroughThickness
10701
- string stroke strokeDasharray strokeDashoffset strokeLinecap strokeLinejoin
10702
- strokeMiterlimit strokeOpacity strokeWidth surfaceScale systemLanguage
10703
- tableValues targetX targetY textAnchor textDecoration textRendering textLength
10704
- to transform u1 u2 underlinePosition underlineThickness unicode unicodeBidi
10705
- unicodeRange unitsPerEm vAlphabetic vHanging vIdeographic vMathematical values
10706
- vectorEffect version vertAdvY vertOriginX vertOriginY viewBox viewTarget
10707
- visibility widths wordSpacing writingMode x xHeight x1 x2 xChannelSelector
10708
- xlinkActuate xlinkArcrole xlinkHref xlinkRole xlinkShow xlinkTitle xlinkType
10709
- xmlBase xmlns xmlnsXlink xmlLang xmlSpace y y1 y2 yChannelSelector z
10710
- zoomAndPan`.split(/\s+/));
10711
- const compatElementProps = /* @__PURE__ */ new Set([
10712
- "autofocus",
10713
- "class",
10714
- "for"
10715
- ]);
10716
- function isValidIntrinsicElementProp(prop, element) {
10717
- if (customAttributeRegExp.test(prop) || eventHandlerRegExp.test(prop)) return true;
10718
- if (baseElementProps.has(prop) || compatElementProps.has(prop)) return true;
10719
- return svgElementNames.has(element) && svgElementProps.has(prop);
10720
- }
10721
- function filterIntrinsicElementProps(props, element) {
10722
- return Object.fromEntries(Object.entries(props).filter(([prop]) => isValidIntrinsicElementProp(prop, element)));
10723
- }
10724
- function UnforwardedPolymorphicElement({ as, ...props }, ref) {
10725
- const Element = as || "div";
10726
- const forwardedProps = typeof Element === "string" ? filterIntrinsicElementProps(props, Element) : props;
10727
- return /* @__PURE__ */ jsx(Element, {
10728
- ref,
10729
- ...forwardedProps
10730
- });
10731
- }
10732
- /**
10733
- * Internal utility for components that need Emotion-compatible `as` behavior
10734
- * while rendering with plain React elements.
10735
- */
10736
- const PolymorphicElement = forwardRef$1(UnforwardedPolymorphicElement);
10737
- // ../../../node_modules/.pnpm/@wordpress+components@44.0.0_patch_hash=dd89cc780626599c6721f4e05e7091dd7b0aed577d8a667_94a1a77c56d75249398bc99af3f14fa5/node_modules/@wordpress/components/build-module/view/component.mjs
10738
- function UnforwardedView({ css, ...restProps }, ref) {
10739
- return /* @__PURE__ */ jsx(PolymorphicElement, {
10740
- ref,
10741
- ...restProps
10742
- });
10743
- }
10744
- /**
10745
- * `View` is a core component that renders everything in the library.
10746
- * It is the principle component in the entire library.
10747
- *
10748
- * ```jsx
10749
- * import { View } from `@wordpress/components`;
10750
- *
10751
- * function Example() {
10752
- * return (
10753
- * <View>
10754
- * Code is Poetry
10755
- * </View>
10756
- * );
10757
- * }
10758
- * ```
10759
- */
10760
- const View = Object.assign(forwardRef$1(UnforwardedView), { selector: ".components-view" });
10761
- // ../../../node_modules/.pnpm/@wordpress+components@44.0.0_patch_hash=dd89cc780626599c6721f4e05e7091dd7b0aed577d8a667_94a1a77c56d75249398bc99af3f14fa5/node_modules/@wordpress/components/build-module/visually-hidden/component.mjs
10762
- function UnconnectedVisuallyHidden(props, forwardedRef) {
10763
- const { style: styleProp, ...contextProps } = useContextSystem(props, "VisuallyHidden");
10764
- return /* @__PURE__ */ jsx(View, {
10765
- ref: forwardedRef,
10766
- ...contextProps,
10767
- "data-visually-hidden": "",
10768
- style: {
10769
- ...visuallyHidden,
10770
- ...styleProp || {}
10771
- }
10772
- });
10773
- }
10774
- /**
10775
- * `VisuallyHidden` is a component used to render text intended to be visually
10776
- * hidden, but will show for alternate devices, for example a screen reader.
10777
- *
10778
- * ```jsx
10779
- * import { VisuallyHidden } from `@wordpress/components`;
10780
- *
10781
- * function Example() {
10782
- * return (
10783
- * <VisuallyHidden>
10784
- * <label>Code is Poetry</label>
10785
- * </VisuallyHidden>
10786
- * );
10787
- * }
10788
- * ```
10789
- */
10790
- const VisuallyHidden$1 = contextConnect(UnconnectedVisuallyHidden, "VisuallyHidden");
10791
- // ../../../node_modules/.pnpm/@wordpress+components@44.0.0_patch_hash=dd89cc780626599c6721f4e05e7091dd7b0aed577d8a667_94a1a77c56d75249398bc99af3f14fa5/node_modules/@wordpress/components/build-module/utils/use-responsive-value.mjs
10792
- const breakpoints = [
10793
- "40em",
10794
- "52em",
10795
- "64em"
10796
- ];
10797
- const useBreakpointIndex = (options = {}) => {
10798
- const { defaultIndex = 0, enabled = true } = options;
10799
- if (typeof defaultIndex !== "number") throw new TypeError(`Default breakpoint index should be a number. Got: ${defaultIndex}, ${typeof defaultIndex}`);
10800
- 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}`);
10801
- const [value, setValue] = useState$1(defaultIndex);
10802
- useEffect$1(() => {
10803
- if (!enabled) return;
10804
- const getIndex = () => breakpoints.filter((bp) => {
10805
- return typeof window !== "undefined" ? window.matchMedia(`screen and (min-width: ${bp})`).matches : false;
10806
- }).length;
10807
- const onResize = () => {
10808
- const newValue = getIndex();
10809
- if (value !== newValue) setValue(newValue);
10810
- };
10811
- onResize();
10812
- if (typeof window !== "undefined") window.addEventListener("resize", onResize);
10813
- return () => {
10814
- if (typeof window !== "undefined") window.removeEventListener("resize", onResize);
10815
- };
10816
- }, [value, enabled]);
10817
- return value;
10818
- };
10819
- function useResponsiveValue(values, options = {}) {
10820
- const isResponsive = Array.isArray(values) && values.length > 1;
10821
- const index = useBreakpointIndex({
10822
- ...options,
10823
- enabled: isResponsive
10824
- });
10825
- if (!Array.isArray(values) && typeof values !== "function") return values;
10826
- const array = values || [];
10827
- return array[index >= array.length ? array.length - 1 : index];
10828
- }
10829
- // ../../../node_modules/.pnpm/@wordpress+components@44.0.0_patch_hash=dd89cc780626599c6721f4e05e7091dd7b0aed577d8a667_94a1a77c56d75249398bc99af3f14fa5/node_modules/@wordpress/components/build-module/grid/utils.mjs
10830
- const ALIGNMENTS = {
10831
- bottom: {
10832
- alignItems: "flex-end",
10833
- justifyContent: "center"
10834
- },
10835
- bottomLeft: {
10836
- alignItems: "flex-end",
10837
- justifyContent: "flex-start"
10838
- },
10839
- bottomRight: {
10840
- alignItems: "flex-end",
10841
- justifyContent: "flex-end"
10842
- },
10843
- center: {
10844
- alignItems: "center",
10845
- justifyContent: "center"
10846
- },
10847
- spaced: {
10848
- alignItems: "center",
10849
- justifyContent: "space-between"
10850
- },
10851
- left: {
10852
- alignItems: "center",
10853
- justifyContent: "flex-start"
10854
- },
10855
- right: {
10856
- alignItems: "center",
10857
- justifyContent: "flex-end"
10858
- },
10859
- stretch: { alignItems: "stretch" },
10860
- top: {
10861
- alignItems: "flex-start",
10862
- justifyContent: "center"
10863
- },
10864
- topLeft: {
10865
- alignItems: "flex-start",
10866
- justifyContent: "flex-start"
10867
- },
10868
- topRight: {
10869
- alignItems: "flex-start",
10870
- justifyContent: "flex-end"
10871
- }
10872
- };
10873
- function getAlignmentProps(alignment) {
10874
- return alignment ? ALIGNMENTS[alignment] ?? {} : {};
10875
- }
10876
- // ../../../node_modules/.pnpm/@wordpress+components@44.0.0_patch_hash=dd89cc780626599c6721f4e05e7091dd7b0aed577d8a667_94a1a77c56d75249398bc99af3f14fa5/node_modules/@wordpress/components/build-module/grid/hook.mjs
10877
- const STYLE_HASH_ATTRIBUTE = "data-wp-hash";
10878
- /**
10879
- * Returns the shared style runtime registry.
10880
- *
10881
- * The registry is stored on `globalThis` so separately bundled copies of this
10882
- * package can coordinate through the same document and style maps.
10883
- *
10884
- * @return The shared runtime registry.
10885
- */
10886
- function getRuntime() {
10887
- const globalScope = globalThis;
10888
- if (globalScope.__wpStyleRuntime) return globalScope.__wpStyleRuntime;
10889
- globalScope.__wpStyleRuntime = {
10890
- documents: /* @__PURE__ */ new Map(),
10891
- styles: /* @__PURE__ */ new Map(),
10892
- injectedStyles: /* @__PURE__ */ new WeakMap()
10893
- };
10894
- if (typeof document !== "undefined") registerDocument(document);
10895
- return globalScope.__wpStyleRuntime;
10896
- }
10897
- /**
10898
- * Checks whether a document already contains a style tag for a hash.
10899
- *
10900
- * @param targetDocument Document to inspect.
10901
- * @param hash Stable hash for the transformed CSS.
10902
- *
10903
- * @return Whether the style hash already exists in the document.
10904
- */
10905
- function documentContainsStyleHash(targetDocument, hash) {
10906
- if (!targetDocument.head) return false;
10907
- for (const style of targetDocument.head.querySelectorAll(`style[${STYLE_HASH_ATTRIBUTE}]`)) if (style.getAttribute(STYLE_HASH_ATTRIBUTE) === hash) return true;
10908
- return false;
10909
- }
10910
- /**
10911
- * Injects a registered style into a document, unless that document already
10912
- * contains a style tag for the same hash.
10913
- *
10914
- * @param targetDocument Document to inject the style into.
10915
- * @param hash Stable hash for the transformed CSS.
10916
- * @param css CSS text to inject.
10917
- */
10918
- function injectStyle(targetDocument, hash, css) {
10919
- if (!targetDocument.head) return;
10920
- const runtime = getRuntime();
10921
- let injectedStyles = runtime.injectedStyles.get(targetDocument);
10922
- if (!injectedStyles) {
10923
- injectedStyles = /* @__PURE__ */ new Set();
10924
- runtime.injectedStyles.set(targetDocument, injectedStyles);
10925
- }
10926
- if (injectedStyles.has(hash)) return;
10927
- if (documentContainsStyleHash(targetDocument, hash)) {
10928
- injectedStyles.add(hash);
10929
- return;
10930
- }
10931
- const style = targetDocument.createElement("style");
10932
- style.setAttribute(STYLE_HASH_ATTRIBUTE, hash);
10933
- style.appendChild(targetDocument.createTextNode(css));
10934
- targetDocument.head.appendChild(style);
10935
- injectedStyles.add(hash);
10936
- }
10937
- /**
10938
- * Registers a document as a style injection target.
10939
- *
10940
- * Existing registered styles are replayed into the document immediately.
10941
- * Documents are reference-counted so multiple providers can safely register the
10942
- * same document without one cleanup removing it while another registration is
10943
- * still active.
10944
- *
10945
- * @param targetDocument Document to receive registered styles.
10946
- * @return Cleanup function that unregisters this document registration.
10947
- */
10948
- function registerDocument(targetDocument) {
10949
- const runtime = getRuntime();
10950
- runtime.documents.set(targetDocument, (runtime.documents.get(targetDocument) ?? 0) + 1);
10951
- for (const [hash, css] of runtime.styles) injectStyle(targetDocument, hash, css);
10952
- return () => {
10953
- const count = runtime.documents.get(targetDocument);
10954
- if (count === void 0) return;
10955
- if (count <= 1) {
10956
- runtime.documents.delete(targetDocument);
10957
- return;
10958
- }
10959
- runtime.documents.set(targetDocument, count - 1);
10960
- };
10961
- }
10962
- /**
10963
- * Registers a style and injects it into all registered documents.
10964
- *
10965
- * The hash is used as the deduplication key, so calling this repeatedly with
10966
- * the same hash will not add duplicate style tags to a document.
10967
- * Registered styles are retained for the lifetime of the page so they can be
10968
- * replayed into documents that are registered later.
10969
- *
10970
- * @param hash Stable hash for the transformed CSS.
10971
- * @param css CSS text to inject.
10972
- */
10973
- function registerStyle(hash, css) {
10974
- const runtime = getRuntime();
10975
- runtime.styles.set(hash, css);
10976
- for (const targetDocument of runtime.documents.keys()) injectStyle(targetDocument, hash, css);
10977
- }
10978
- if (typeof process === "undefined" || process.env.NODE_ENV !== "test") registerStyle("b1a8e206b7", ".ad3e2e48d7abbecd__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}.ad3e2e48d7abbecd__grid:not(:where(._519ed3f6107b2f0e__row-gap-inherit,.cd62b95f8b7a55ca__row-gap-initial,._226744df7703790b__row-gap-unset,._372e9fe7fa60a162__row-gap-revert,.a788bb6771f557d4__row-gap-revert-layer)){row-gap:var(--wp-components-grid-row-gap,calc(4px*var(--wp-components-grid-gap)))}.ad3e2e48d7abbecd__grid:not(:where(.c811e15146756906__column-gap-inherit,._17d3c2ea7daf9367__column-gap-initial,._595e6195481b9016__column-gap-unset,.a3ecb3e47731c19e__column-gap-revert,._7c87cfbf3c22f476__column-gap-revert-layer)){column-gap:var(--wp-components-grid-column-gap,calc(4px*var(--wp-components-grid-gap)))}._25a972dc3223dff3__has-align:not(:where(._3cda38ca04ad4eb9__align-inherit,.f1d7342c52a8cb04__align-initial,._0d1a6c7ee990f351__align-unset,._57c7b85e7abf618b__align-revert,._82cb0c4950962787__align-revert-layer)){align-items:var(--wp-components-grid-align)}._801d1214723237b8__has-justify:not(:where(.b83c5dbf3264515b__justify-inherit,._5b7394b39d69670e__justify-initial,._3e7f0418752602e5__justify-unset,._5f937df46d7b2259__justify-revert,.bf2a4718a1ddba5c__justify-revert-layer)){justify-content:var(--wp-components-grid-justify)}._3c6ac9820776f1cb__has-template-columns:not(:where(._35faa4d32eedef32__template-columns-inherit,._8150cadb3f438833__template-columns-initial,.bcd5f2b096dec164__template-columns-unset,._48d047bc6fb687b8__template-columns-revert,._93f250669aa1a5a7__template-columns-revert-layer)){grid-template-columns:var(--wp-components-grid-template-columns)}.c2703b6b15e69b82__has-template-rows:not(:where(._3e9d5ffc53e4afc0__template-rows-inherit,._64bb5fbdf6d1038a__template-rows-initial,.f8f5df7043222325__template-rows-unset,._408aaf58100e60d5__template-rows-revert,.e0730d6abf0f3d2a__template-rows-revert-layer)){grid-template-rows:var(--wp-components-grid-template-rows)}._43af1cbfad3e73dd__is-inline{display:inline-grid;vertical-align:middle}._3cda38ca04ad4eb9__align-inherit{align-items:inherit}.f1d7342c52a8cb04__align-initial{align-items:normal}._0d1a6c7ee990f351__align-unset{align-items:unset}._57c7b85e7abf618b__align-revert{align-items:revert}._82cb0c4950962787__align-revert-layer{align-items:revert-layer}.b83c5dbf3264515b__justify-inherit{justify-content:inherit}._5b7394b39d69670e__justify-initial{justify-content:normal}._3e7f0418752602e5__justify-unset{justify-content:unset}._5f937df46d7b2259__justify-revert{justify-content:revert}.bf2a4718a1ddba5c__justify-revert-layer{justify-content:revert-layer}._35faa4d32eedef32__template-columns-inherit{grid-template-columns:inherit}._8150cadb3f438833__template-columns-initial{grid-template-columns:none}.bcd5f2b096dec164__template-columns-unset{grid-template-columns:unset}._48d047bc6fb687b8__template-columns-revert{grid-template-columns:revert}._93f250669aa1a5a7__template-columns-revert-layer{grid-template-columns:revert-layer}._3e9d5ffc53e4afc0__template-rows-inherit{grid-template-rows:inherit}._64bb5fbdf6d1038a__template-rows-initial{grid-template-rows:none}.f8f5df7043222325__template-rows-unset{grid-template-rows:unset}._408aaf58100e60d5__template-rows-revert{grid-template-rows:revert}.e0730d6abf0f3d2a__template-rows-revert-layer{grid-template-rows:revert-layer}._519ed3f6107b2f0e__row-gap-inherit{row-gap:inherit}.cd62b95f8b7a55ca__row-gap-initial{row-gap:normal}._226744df7703790b__row-gap-unset{row-gap:unset}._372e9fe7fa60a162__row-gap-revert{row-gap:revert}.a788bb6771f557d4__row-gap-revert-layer{row-gap:revert-layer}.c811e15146756906__column-gap-inherit{column-gap:inherit}._17d3c2ea7daf9367__column-gap-initial{column-gap:normal}._595e6195481b9016__column-gap-unset{column-gap:unset}.a3ecb3e47731c19e__column-gap-revert{column-gap:revert}._7c87cfbf3c22f476__column-gap-revert-layer{column-gap:revert-layer}");
10979
- var style_module_default = {
10980
- "grid": "ad3e2e48d7abbecd__grid",
10981
- "row-gap-inherit": "_519ed3f6107b2f0e__row-gap-inherit",
10982
- "row-gap-initial": "cd62b95f8b7a55ca__row-gap-initial",
10983
- "row-gap-unset": "_226744df7703790b__row-gap-unset",
10984
- "row-gap-revert": "_372e9fe7fa60a162__row-gap-revert",
10985
- "row-gap-revert-layer": "a788bb6771f557d4__row-gap-revert-layer",
10986
- "column-gap-inherit": "c811e15146756906__column-gap-inherit",
10987
- "column-gap-initial": "_17d3c2ea7daf9367__column-gap-initial",
10988
- "column-gap-unset": "_595e6195481b9016__column-gap-unset",
10989
- "column-gap-revert": "a3ecb3e47731c19e__column-gap-revert",
10990
- "column-gap-revert-layer": "_7c87cfbf3c22f476__column-gap-revert-layer",
10991
- "has-align": "_25a972dc3223dff3__has-align",
10992
- "align-inherit": "_3cda38ca04ad4eb9__align-inherit",
10993
- "align-initial": "f1d7342c52a8cb04__align-initial",
10994
- "align-unset": "_0d1a6c7ee990f351__align-unset",
10995
- "align-revert": "_57c7b85e7abf618b__align-revert",
10996
- "align-revert-layer": "_82cb0c4950962787__align-revert-layer",
10997
- "has-justify": "_801d1214723237b8__has-justify",
10998
- "justify-inherit": "b83c5dbf3264515b__justify-inherit",
10999
- "justify-initial": "_5b7394b39d69670e__justify-initial",
11000
- "justify-unset": "_3e7f0418752602e5__justify-unset",
11001
- "justify-revert": "_5f937df46d7b2259__justify-revert",
11002
- "justify-revert-layer": "bf2a4718a1ddba5c__justify-revert-layer",
11003
- "has-template-columns": "_3c6ac9820776f1cb__has-template-columns",
11004
- "template-columns-inherit": "_35faa4d32eedef32__template-columns-inherit",
11005
- "template-columns-initial": "_8150cadb3f438833__template-columns-initial",
11006
- "template-columns-unset": "bcd5f2b096dec164__template-columns-unset",
11007
- "template-columns-revert": "_48d047bc6fb687b8__template-columns-revert",
11008
- "template-columns-revert-layer": "_93f250669aa1a5a7__template-columns-revert-layer",
11009
- "has-template-rows": "c2703b6b15e69b82__has-template-rows",
11010
- "template-rows-inherit": "_3e9d5ffc53e4afc0__template-rows-inherit",
11011
- "template-rows-initial": "_64bb5fbdf6d1038a__template-rows-initial",
11012
- "template-rows-unset": "f8f5df7043222325__template-rows-unset",
11013
- "template-rows-revert": "_408aaf58100e60d5__template-rows-revert",
11014
- "template-rows-revert-layer": "e0730d6abf0f3d2a__template-rows-revert-layer",
11015
- "is-inline": "_43af1cbfad3e73dd__is-inline"
11016
- };
11017
- const CSS_WIDE_KEYWORDS = /* @__PURE__ */ new Set([
11018
- "inherit",
11019
- "initial",
11020
- "unset",
11021
- "revert",
11022
- "revert-layer"
11023
- ]);
11024
- function toCSSValue(value) {
11025
- return typeof value === "number" ? `${value}px` : value?.trim() || void 0;
11026
- }
11027
- function useGrid(props) {
11028
- const { align, alignment, className, columnGap, columns = 2, gap = 3, isInline = false, justify, rowGap, rows, style, templateColumns, templateRows, ...otherProps } = useContextSystem(props, "Grid");
11029
- const column = useResponsiveValue(Array.isArray(columns) ? columns : [columns]);
11030
- const row = useResponsiveValue(Array.isArray(rows) ? rows : [rows]);
11031
- const gridTemplateColumns = templateColumns || !!column && `repeat( ${column}, 1fr )`;
11032
- const gridTemplateRows = templateRows || !!row && `repeat( ${row}, 1fr )`;
11033
- const alignmentProps = getAlignmentProps(alignment);
11034
- const values = {
11035
- align: alignmentProps.alignItems ?? align,
11036
- justify: alignmentProps.justifyContent ?? justify,
11037
- "template-columns": gridTemplateColumns || void 0,
11038
- "template-rows": gridTemplateRows || void 0,
11039
- "row-gap": rowGap,
11040
- "column-gap": columnGap
11041
- };
11042
- return {
11043
- ...otherProps,
11044
- className: clsx(style_module_default.grid, {
11045
- [style_module_default["is-inline"]]: isInline,
11046
- [style_module_default["has-align"]]: !!values.align?.trim(),
11047
- [style_module_default["has-justify"]]: !!values.justify?.trim(),
11048
- [style_module_default["has-template-columns"]]: !!toCSSValue(values["template-columns"]),
11049
- [style_module_default["has-template-rows"]]: !!toCSSValue(values["template-rows"])
11050
- }, Object.entries(values).map(([property, value]) => {
11051
- const keyword = typeof value === "string" ? value.trim().toLowerCase() : "";
11052
- return CSS_WIDE_KEYWORDS.has(keyword) && style_module_default[`${property}-${keyword}`];
11053
- }), className),
11054
- style: {
11055
- "--wp-components-grid-align": values.align,
11056
- "--wp-components-grid-justify": values.justify,
11057
- "--wp-components-grid-gap": gap,
11058
- "--wp-components-grid-template-columns": toCSSValue(values["template-columns"]),
11059
- "--wp-components-grid-template-rows": toCSSValue(values["template-rows"]),
11060
- "--wp-components-grid-row-gap": toCSSValue(rowGap),
11061
- "--wp-components-grid-column-gap": toCSSValue(columnGap),
11062
- ...style
11063
- }
11064
- };
11065
- }
11066
- // ../../../node_modules/.pnpm/@wordpress+components@44.0.0_patch_hash=dd89cc780626599c6721f4e05e7091dd7b0aed577d8a667_94a1a77c56d75249398bc99af3f14fa5/node_modules/@wordpress/components/build-module/grid/component.mjs
11067
- function UnconnectedGrid(props, forwardedRef) {
11068
- const gridProps = useGrid(props);
11069
- return /* @__PURE__ */ jsx(View, {
11070
- ...gridProps,
11071
- ref: forwardedRef
11072
- });
11073
- }
11074
- /**
11075
- * `Grid` is a primitive layout component that can arrange content in a grid configuration.
11076
- *
11077
- * ```jsx
11078
- * import {
11079
- * __experimentalGrid as Grid,
11080
- * __experimentalText as Text
11081
- * } from `@wordpress/components`;
11082
- *
11083
- * function Example() {
11084
- * return (
11085
- * <Grid columns={ 3 }>
11086
- * <Text>Code</Text>
11087
- * <Text>is</Text>
11088
- * <Text>Poetry</Text>
11089
- * </Grid>
11090
- * );
11091
- * }
11092
- * ```
11093
- */
11094
- const Grid$1 = contextConnect(UnconnectedGrid, "Grid");
11095
10221
  // src/charts/leaderboard-chart/hooks/use-fitted-row-count.ts
11096
10222
  /**
11097
10223
  * Fractional layout rounding can put a row's bottom a hair past the container's
@@ -11238,6 +10364,8 @@ var leaderboard_chart_module_default = {
11238
10364
  "deltaValue--up": "a8ccharts-GovfoW-deltaValue--up",
11239
10365
  "emptyState": "a8ccharts-GovfoW-emptyState",
11240
10366
  "fitEmptyState": "a8ccharts-GovfoW-fitEmptyState",
10367
+ "grid": "a8ccharts-GovfoW-grid",
10368
+ "grid--comparison": "a8ccharts-GovfoW-grid--comparison",
11241
10369
  "interactiveRow": "a8ccharts-GovfoW-interactiveRow",
11242
10370
  "is-overlay": "a8ccharts-GovfoW-is-overlay",
11243
10371
  "label": "a8ccharts-GovfoW-label",
@@ -11291,8 +10419,6 @@ function resolveLeaderboardEntries(data, { includePrevious, clampNegative = fals
11291
10419
  });
11292
10420
  }
11293
10421
  // src/charts/leaderboard-chart/leaderboard-chart.tsx
11294
- const ROW_GAP = "var(--a8c-charts-dimension-leaderboard-row-gap, 12px)";
11295
- const COLUMN_GAP = "var(--a8c-charts-dimension-leaderboard-column-gap, 4px)";
11296
10422
  /** Indexed by `Math.sign( delta ) + 1`, so [negative, neutral, positive]. */
11297
10423
  const DELTA_TREND_CLASS = [
11298
10424
  "deltaValue--down",
@@ -11346,8 +10472,9 @@ function forwardCellClickToRowButton(event) {
11346
10472
  if (event.target.closest("a, button")) return;
11347
10473
  event.currentTarget.querySelector(":scope > button")?.click();
11348
10474
  }
11349
- const BarLabel = ({ label }) => /* @__PURE__ */ jsx(Fragment$1, { children: typeof label === "string" ? /* @__PURE__ */ jsx(Text$1, {
10475
+ const BarLabel = ({ label, isInteractiveRow }) => /* @__PURE__ */ jsx(Fragment$1, { children: typeof label === "string" ? /* @__PURE__ */ jsx(Text$1, {
11350
10476
  className: leaderboard_chart_module_default.label,
10477
+ title: isInteractiveRow ? label : void 0,
11351
10478
  children: label
11352
10479
  }) : label });
11353
10480
  const Bar = ({ share, color, animation, divergingScale }) => {
@@ -11386,7 +10513,10 @@ const BarWithLabel = ({ entry, withComparison, withOverlayLabel, primaryColor, s
11386
10513
  })] });
11387
10514
  return /* @__PURE__ */ jsxs("div", {
11388
10515
  className: clsx(leaderboard_chart_module_default.barWithLabelContainer, { [leaderboard_chart_module_default["is-overlay"]]: withOverlayLabel }),
11389
- children: [/* @__PURE__ */ jsx(BarLabel, { label: entry.label }), bars]
10516
+ children: [/* @__PURE__ */ jsx(BarLabel, {
10517
+ label: entry.label,
10518
+ isInteractiveRow: Boolean(entry.onClick)
10519
+ }), bars]
11390
10520
  });
11391
10521
  };
11392
10522
  /**
@@ -11512,7 +10642,7 @@ const LeaderboardChartInternal = ({ data, chartId: providedChartId, width: propW
11512
10642
  const { contentRef, fittedCount, isMeasurable } = useFittedRowCount(fitRows && !allSeriesHidden, data?.length ?? 0, data);
11513
10643
  const shouldFitRows = fitRows && isMeasurable;
11514
10644
  const showComparisonColumn = withComparison && isComparisonVisible;
11515
- const templateColumns = showComparisonColumn && isPrimaryVisible ? "minmax(0, 1fr) auto auto" : "minmax(0, 1fr) auto";
10645
+ const hasDeltaColumn = showComparisonColumn && isPrimaryVisible;
11516
10646
  if (!data || data.length === 0) return /* @__PURE__ */ jsx(ChartInstanceContext.Provider, {
11517
10647
  value: { chartId },
11518
10648
  children: /* @__PURE__ */ jsx(ChartLayout, {
@@ -11574,13 +10704,11 @@ const LeaderboardChartInternal = ({ data, chartId: providedChartId, width: propW
11574
10704
  }), allSeriesHidden ? /* @__PURE__ */ jsx("div", {
11575
10705
  className: leaderboard_chart_module_default.emptyState,
11576
10706
  children: getAllHiddenMessage(legendInteractive, "series")
11577
- }) : /* @__PURE__ */ jsx(Grid$1, {
10707
+ }) : /* @__PURE__ */ jsx("div", {
11578
10708
  role: "list",
11579
10709
  "aria-label": ariaLabel ?? __("Leaderboard chart", "jetpack-charts"),
11580
- templateColumns,
11581
- rowGap: ROW_GAP,
11582
- columnGap: COLUMN_GAP,
11583
10710
  "data-leaderboard-grid": true,
10711
+ className: clsx(leaderboard_chart_module_default.grid, { [leaderboard_chart_module_default["grid--comparison"]]: hasDeltaColumn }),
11584
10712
  children: resolvedData.map((entry, rowIndex) => {
11585
10713
  const rowStyle = shouldFitRows && rowIndex >= fittedCount ? { visibility: "hidden" } : void 0;
11586
10714
  const hasPreviousPeriodValue = hasPreviousValue(entry);
@@ -11615,8 +10743,8 @@ const LeaderboardChartInternal = ({ data, chartId: providedChartId, width: propW
11615
10743
  children: [/* @__PURE__ */ jsx("span", {
11616
10744
  "aria-hidden": "true",
11617
10745
  children: "—"
11618
- }), /* @__PURE__ */ jsx(VisuallyHidden$1, {
11619
- as: "span",
10746
+ }), /* @__PURE__ */ jsx(VisuallyHidden, {
10747
+ render: /* @__PURE__ */ jsx("span", {}),
11620
10748
  children: hasPreviousPeriodValue ? __("Percentage change unavailable", "jetpack-charts") : __("No comparison data", "jetpack-charts")
11621
10749
  })]
11622
10750
  })