| 1 |
var __create = Object.create; |
| 2 |
var __defProp = Object.defineProperty; |
| 3 |
var __getOwnPropDesc = Object.getOwnPropertyDescriptor; |
| 4 |
var __getOwnPropNames = Object.getOwnPropertyNames; |
| 5 |
var __getProtoOf = Object.getPrototypeOf; |
| 6 |
var __hasOwnProp = Object.prototype.hasOwnProperty; |
| 7 |
var __commonJS = (cb, mod) => function __require() { |
| 8 |
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; |
| 9 |
}; |
| 10 |
var __copyProps = (to, from, except, desc) => { |
| 11 |
if (from && typeof from === "object" || typeof from === "function") { |
| 12 |
for (let key of __getOwnPropNames(from)) |
| 13 |
if (!__hasOwnProp.call(to, key) && key !== except) |
| 14 |
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); |
| 15 |
} |
| 16 |
return to; |
| 17 |
}; |
| 18 |
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( |
| 19 |
// If the importer is in node compatibility mode or this is not an ESM |
| 20 |
// file that has been converted to a CommonJS file using a Babel- |
| 21 |
// compatible transform (i.e. "__esModule" has not been set), then set |
| 22 |
// "default" to the CommonJS "module.exports" for node compatibility. |
| 23 |
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, |
| 24 |
mod |
| 25 |
)); |
| 26 |
|
| 27 |
// package-external:@wordpress/element |
| 28 |
var require_element = __commonJS({ |
| 29 |
"package-external:@wordpress/element"(exports, module) { |
| 30 |
module.exports = window.wp.element; |
| 31 |
} |
| 32 |
}); |
| 33 |
|
| 34 |
// package-external:@wordpress/data |
| 35 |
var require_data = __commonJS({ |
| 36 |
"package-external:@wordpress/data"(exports, module) { |
| 37 |
module.exports = window.wp.data; |
| 38 |
} |
| 39 |
}); |
| 40 |
|
| 41 |
// package-external:@wordpress/core-data |
| 42 |
var require_core_data = __commonJS({ |
| 43 |
"package-external:@wordpress/core-data"(exports, module) { |
| 44 |
module.exports = window.wp.coreData; |
| 45 |
} |
| 46 |
}); |
| 47 |
|
| 48 |
// package-external:@wordpress/i18n |
| 49 |
var require_i18n = __commonJS({ |
| 50 |
"package-external:@wordpress/i18n"(exports, module) { |
| 51 |
module.exports = window.wp.i18n; |
| 52 |
} |
| 53 |
}); |
| 54 |
|
| 55 |
// package-external:@wordpress/primitives |
| 56 |
var require_primitives = __commonJS({ |
| 57 |
"package-external:@wordpress/primitives"(exports, module) { |
| 58 |
module.exports = window.wp.primitives; |
| 59 |
} |
| 60 |
}); |
| 61 |
|
| 62 |
// vendor-external:react/jsx-runtime |
| 63 |
var require_jsx_runtime = __commonJS({ |
| 64 |
"vendor-external:react/jsx-runtime"(exports, module) { |
| 65 |
module.exports = window.ReactJSXRuntime; |
| 66 |
} |
| 67 |
}); |
| 68 |
|
| 69 |
// package-external:@wordpress/url |
| 70 |
var require_url = __commonJS({ |
| 71 |
"package-external:@wordpress/url"(exports, module) { |
| 72 |
module.exports = window.wp.url; |
| 73 |
} |
| 74 |
}); |
| 75 |
|
| 76 |
// package-external:@wordpress/components |
| 77 |
var require_components = __commonJS({ |
| 78 |
"package-external:@wordpress/components"(exports, module) { |
| 79 |
module.exports = window.wp.components; |
| 80 |
} |
| 81 |
}); |
| 82 |
|
| 83 |
// vendor-external:react |
| 84 |
var require_react = __commonJS({ |
| 85 |
"vendor-external:react"(exports, module) { |
| 86 |
module.exports = window.React; |
| 87 |
} |
| 88 |
}); |
| 89 |
|
| 90 |
// widgets/site-preview/render.tsx |
| 91 |
var import_element6 = __toESM(require_element()); |
| 92 |
var import_data = __toESM(require_data()); |
| 93 |
var import_core_data = __toESM(require_core_data()); |
| 94 |
var import_i18n2 = __toESM(require_i18n()); |
| 95 |
|
| 96 |
// packages/icons/build-module/library/wordpress.mjs |
| 97 |
var import_primitives = __toESM(require_primitives(), 1); |
| 98 |
var import_jsx_runtime = __toESM(require_jsx_runtime(), 1); |
| 99 |
var wordpress_default = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_primitives.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_primitives.Path, { d: "M 22 12 C 22 6.49 17.51 2 12 2 C 6.48 2 2 6.49 2 12 C 2 17.52 6.48 22 12 22 C 17.51 22 22 17.52 22 12 M 9.78 17.37 L 6.37 8.22 C 6.92 8.2 7.54 8.14 7.54 8.14 C 8.04 8.08 7.98 7.01 7.48 7.03 C 7.48 7.03 6.03 7.14 5.11 7.14 C 4.93 7.14 4.74 7.14 4.53 7.13 C 6.12 4.69 8.87 3.11 12 3.11 C 14.33 3.11 16.45 3.98 18.05 5.45 C 17.37 5.34 16.4 5.84 16.4 7.03 C 16.4 7.77 16.85 8.39 17.3 9.13 C 17.65 9.74 17.85 10.49 17.85 11.59 C 17.85 13.08 16.45 16.59 16.45 16.59 L 13.42 8.22 C 13.96 8.2 14.24 8.05 14.24 8.05 C 14.74 8 14.68 6.8 14.18 6.83 C 14.18 6.83 12.74 6.95 11.8 6.95 C 10.93 6.95 9.47 6.83 9.47 6.83 C 8.97 6.8 8.91 8.03 9.41 8.05 L 10.33 8.13 L 11.59 11.54 L 9.78 17.37 M 19.41 12 C 19.65 11.36 20.15 10.13 19.84 7.75 C 20.54 9.04 20.89 10.46 20.89 12 C 20.89 15.29 19.16 18.24 16.49 19.78 C 17.46 17.19 18.43 14.58 19.41 12 M 8.1 20.09 C 5.12 18.65 3.11 15.53 3.11 12 C 3.11 10.7 3.34 9.52 3.83 8.41 C 5.25 12.3 6.67 16.2 8.1 20.09 M 12.13 13.46 L 14.71 20.44 C 13.85 20.73 12.95 20.89 12 20.89 C 11.21 20.89 10.43 20.78 9.71 20.56 C 10.52 18.18 11.33 15.82 12.13 13.46 L 12.13 13.46" }) }); |
| 100 |
|
| 101 |
// widgets/site-preview/render.tsx |
| 102 |
var import_url = __toESM(require_url()); |
| 103 |
var import_components = __toESM(require_components()); |
| 104 |
|
| 105 |
// node_modules/clsx/dist/clsx.mjs |
| 106 |
function r(e) { |
| 107 |
var t, f, n = ""; |
| 108 |
if ("string" == typeof e || "number" == typeof e) n += e; |
| 109 |
else if ("object" == typeof e) if (Array.isArray(e)) { |
| 110 |
var o = e.length; |
| 111 |
for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f); |
| 112 |
} else for (f in e) e[f] && (n && (n += " "), n += f); |
| 113 |
return n; |
| 114 |
} |
| 115 |
function clsx() { |
| 116 |
for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t); |
| 117 |
return n; |
| 118 |
} |
| 119 |
var clsx_default = clsx; |
| 120 |
|
| 121 |
// node_modules/@base-ui/utils/createLogOnce.mjs |
| 122 |
var loggedMessages; |
| 123 |
if (true) { |
| 124 |
loggedMessages = /* @__PURE__ */ new Set(); |
| 125 |
} |
| 126 |
function createLogOnce(severity, prefix) { |
| 127 |
return function logOnce(...messages) { |
| 128 |
if (true) { |
| 129 |
const message = messages.join(" "); |
| 130 |
const output = prefix ? `${prefix}: ${message}` : message; |
| 131 |
const key = `${severity}:${output}`; |
| 132 |
if (!loggedMessages.has(key)) { |
| 133 |
loggedMessages.add(key); |
| 134 |
if (severity === "warn") { |
| 135 |
console.warn(output); |
| 136 |
} else { |
| 137 |
console.error(output); |
| 138 |
} |
| 139 |
} |
| 140 |
} |
| 141 |
}; |
| 142 |
} |
| 143 |
|
| 144 |
// node_modules/@base-ui/utils/error.mjs |
| 145 |
var error = createLogOnce("error", "Base UI"); |
| 146 |
|
| 147 |
// node_modules/@base-ui/utils/safeReact.mjs |
| 148 |
var React = __toESM(require_react(), 1); |
| 149 |
var SafeReact = { |
| 150 |
...React |
| 151 |
}; |
| 152 |
|
| 153 |
// node_modules/@base-ui/utils/useRefWithInit.mjs |
| 154 |
var React2 = __toESM(require_react(), 1); |
| 155 |
var UNINITIALIZED = {}; |
| 156 |
function useRefWithInit(init, initArg) { |
| 157 |
const ref = React2.useRef(UNINITIALIZED); |
| 158 |
if (ref.current === UNINITIALIZED) { |
| 159 |
ref.current = init(initArg); |
| 160 |
} |
| 161 |
return ref; |
| 162 |
} |
| 163 |
|
| 164 |
// node_modules/@base-ui/utils/useStableCallback.mjs |
| 165 |
var useInsertionEffect = SafeReact.useInsertionEffect; |
| 166 |
var useSafeInsertionEffect = ( |
| 167 |
// React 17 doesn't have useInsertionEffect. |
| 168 |
useInsertionEffect && // Preact replaces useInsertionEffect with useLayoutEffect and fires too late. |
| 169 |
useInsertionEffect !== SafeReact.useLayoutEffect ? useInsertionEffect : (fn) => fn() |
| 170 |
); |
| 171 |
function useStableCallback(callback) { |
| 172 |
const stable = useRefWithInit(createStableCallback).current; |
| 173 |
stable.next = callback; |
| 174 |
useSafeInsertionEffect(stable.effect); |
| 175 |
return stable.trampoline; |
| 176 |
} |
| 177 |
function createStableCallback() { |
| 178 |
const stable = { |
| 179 |
next: void 0, |
| 180 |
callback: assertNotCalled, |
| 181 |
trampoline: (...args) => stable.callback?.(...args), |
| 182 |
effect: () => { |
| 183 |
stable.callback = stable.next; |
| 184 |
} |
| 185 |
}; |
| 186 |
return stable; |
| 187 |
} |
| 188 |
function assertNotCalled() { |
| 189 |
if (true) { |
| 190 |
throw ( |
| 191 |
/* minify-error-disabled */ |
| 192 |
new Error("Base UI: Cannot call an event handler while rendering.") |
| 193 |
); |
| 194 |
} |
| 195 |
} |
| 196 |
|
| 197 |
// node_modules/@base-ui/utils/warn.mjs |
| 198 |
var warn = createLogOnce("warn", "Base UI"); |
| 199 |
|
| 200 |
// node_modules/@base-ui/utils/empty.mjs |
| 201 |
var EMPTY_ARRAY = Object.freeze([]); |
| 202 |
var EMPTY_OBJECT = Object.freeze({}); |
| 203 |
|
| 204 |
// node_modules/@base-ui/utils/useIsoLayoutEffect.mjs |
| 205 |
var React3 = __toESM(require_react(), 1); |
| 206 |
var noop = () => { |
| 207 |
}; |
| 208 |
var useIsoLayoutEffect = typeof document !== "undefined" ? React3.useLayoutEffect : noop; |
| 209 |
|
| 210 |
// node_modules/@base-ui/react/internals/useRenderElement.mjs |
| 211 |
var React6 = __toESM(require_react(), 1); |
| 212 |
|
| 213 |
// node_modules/@base-ui/utils/useMergedRefs.mjs |
| 214 |
function useMergedRefs(a, b, c, d) { |
| 215 |
const forkRef = useRefWithInit(createForkRef).current; |
| 216 |
if (didChange(forkRef, a, b, c, d)) { |
| 217 |
update(forkRef, [a, b, c, d]); |
| 218 |
} |
| 219 |
return forkRef.callback; |
| 220 |
} |
| 221 |
function useMergedRefsN(refs) { |
| 222 |
const forkRef = useRefWithInit(createForkRef).current; |
| 223 |
if (didChangeN(forkRef, refs)) { |
| 224 |
update(forkRef, refs); |
| 225 |
} |
| 226 |
return forkRef.callback; |
| 227 |
} |
| 228 |
function createForkRef() { |
| 229 |
return { |
| 230 |
callback: null, |
| 231 |
cleanup: null, |
| 232 |
refs: [] |
| 233 |
}; |
| 234 |
} |
| 235 |
function didChange(forkRef, a, b, c, d) { |
| 236 |
return forkRef.refs[0] !== a || forkRef.refs[1] !== b || forkRef.refs[2] !== c || forkRef.refs[3] !== d; |
| 237 |
} |
| 238 |
function didChangeN(forkRef, newRefs) { |
| 239 |
return forkRef.refs.length !== newRefs.length || forkRef.refs.some((ref, index) => ref !== newRefs[index]); |
| 240 |
} |
| 241 |
function update(forkRef, refs) { |
| 242 |
forkRef.refs = refs; |
| 243 |
if (refs.every((ref) => ref == null)) { |
| 244 |
forkRef.callback = null; |
| 245 |
return; |
| 246 |
} |
| 247 |
forkRef.callback = (instance) => { |
| 248 |
if (forkRef.cleanup) { |
| 249 |
forkRef.cleanup(); |
| 250 |
forkRef.cleanup = null; |
| 251 |
} |
| 252 |
if (instance != null) { |
| 253 |
const cleanupCallbacks = Array(refs.length).fill(null); |
| 254 |
for (let i = 0; i < refs.length; i += 1) { |
| 255 |
const ref = refs[i]; |
| 256 |
if (ref == null) { |
| 257 |
continue; |
| 258 |
} |
| 259 |
switch (typeof ref) { |
| 260 |
case "function": { |
| 261 |
const refCleanup = ref(instance); |
| 262 |
if (typeof refCleanup === "function") { |
| 263 |
cleanupCallbacks[i] = refCleanup; |
| 264 |
} |
| 265 |
break; |
| 266 |
} |
| 267 |
case "object": { |
| 268 |
ref.current = instance; |
| 269 |
break; |
| 270 |
} |
| 271 |
default: |
| 272 |
} |
| 273 |
} |
| 274 |
forkRef.cleanup = () => { |
| 275 |
for (let i = 0; i < refs.length; i += 1) { |
| 276 |
const ref = refs[i]; |
| 277 |
if (ref == null) { |
| 278 |
continue; |
| 279 |
} |
| 280 |
switch (typeof ref) { |
| 281 |
case "function": { |
| 282 |
const cleanupCallback = cleanupCallbacks[i]; |
| 283 |
if (typeof cleanupCallback === "function") { |
| 284 |
cleanupCallback(); |
| 285 |
} else { |
| 286 |
void ref(null); |
| 287 |
} |
| 288 |
break; |
| 289 |
} |
| 290 |
case "object": { |
| 291 |
ref.current = null; |
| 292 |
break; |
| 293 |
} |
| 294 |
default: |
| 295 |
} |
| 296 |
} |
| 297 |
}; |
| 298 |
} |
| 299 |
}; |
| 300 |
} |
| 301 |
|
| 302 |
// node_modules/@base-ui/utils/getReactElementRef.mjs |
| 303 |
var React5 = __toESM(require_react(), 1); |
| 304 |
|
| 305 |
// node_modules/@base-ui/utils/reactVersion.mjs |
| 306 |
var React4 = __toESM(require_react(), 1); |
| 307 |
var majorVersion = parseInt(React4.version, 10); |
| 308 |
function isReactVersionAtLeast(reactVersionToCheck) { |
| 309 |
return majorVersion >= reactVersionToCheck; |
| 310 |
} |
| 311 |
|
| 312 |
// node_modules/@base-ui/utils/getReactElementRef.mjs |
| 313 |
function getReactElementRef(element) { |
| 314 |
if (!/* @__PURE__ */ React5.isValidElement(element)) { |
| 315 |
return null; |
| 316 |
} |
| 317 |
const reactElement = element; |
| 318 |
const propsWithRef = reactElement.props; |
| 319 |
return (isReactVersionAtLeast(19) ? propsWithRef?.ref : reactElement.ref) ?? null; |
| 320 |
} |
| 321 |
|
| 322 |
// node_modules/@base-ui/utils/mergeObjects.mjs |
| 323 |
function mergeObjects(a, b) { |
| 324 |
if (a && !b) { |
| 325 |
return a; |
| 326 |
} |
| 327 |
if (!a && b) { |
| 328 |
return b; |
| 329 |
} |
| 330 |
if (a || b) { |
| 331 |
return { |
| 332 |
...a, |
| 333 |
...b |
| 334 |
}; |
| 335 |
} |
| 336 |
return void 0; |
| 337 |
} |
| 338 |
|
| 339 |
// node_modules/@base-ui/react/internals/getStateAttributesProps.mjs |
| 340 |
function getStateAttributesProps(state, customMapping) { |
| 341 |
const props = {}; |
| 342 |
for (const key in state) { |
| 343 |
const value = state[key]; |
| 344 |
if (customMapping?.hasOwnProperty(key)) { |
| 345 |
const customProps = customMapping[key](value); |
| 346 |
if (customProps != null) { |
| 347 |
Object.assign(props, customProps); |
| 348 |
} |
| 349 |
continue; |
| 350 |
} |
| 351 |
if (value === true) { |
| 352 |
props[`data-${key.toLowerCase()}`] = ""; |
| 353 |
} else if (value) { |
| 354 |
props[`data-${key.toLowerCase()}`] = value.toString(); |
| 355 |
} |
| 356 |
} |
| 357 |
return props; |
| 358 |
} |
| 359 |
|
| 360 |
// node_modules/@base-ui/react/utils/resolveClassName.mjs |
| 361 |
function resolveClassName(className, state) { |
| 362 |
return typeof className === "function" ? className(state) : className; |
| 363 |
} |
| 364 |
|
| 365 |
// node_modules/@base-ui/react/utils/resolveStyle.mjs |
| 366 |
function resolveStyle(style, state) { |
| 367 |
return typeof style === "function" ? style(state) : style; |
| 368 |
} |
| 369 |
|
| 370 |
// node_modules/@base-ui/react/merge-props/mergeProps.mjs |
| 371 |
var EMPTY_PROPS = {}; |
| 372 |
function mergeProps(a, b, c, d, e) { |
| 373 |
if (!c && !d && !e && !a) { |
| 374 |
return createInitialMergedProps(b); |
| 375 |
} |
| 376 |
let merged = createInitialMergedProps(a); |
| 377 |
if (b) { |
| 378 |
merged = mergeInto(merged, b); |
| 379 |
} |
| 380 |
if (c) { |
| 381 |
merged = mergeInto(merged, c); |
| 382 |
} |
| 383 |
if (d) { |
| 384 |
merged = mergeInto(merged, d); |
| 385 |
} |
| 386 |
if (e) { |
| 387 |
merged = mergeInto(merged, e); |
| 388 |
} |
| 389 |
return merged; |
| 390 |
} |
| 391 |
function mergePropsN(props) { |
| 392 |
if (props.length === 0) { |
| 393 |
return EMPTY_PROPS; |
| 394 |
} |
| 395 |
if (props.length === 1) { |
| 396 |
return createInitialMergedProps(props[0]); |
| 397 |
} |
| 398 |
let merged = createInitialMergedProps(props[0]); |
| 399 |
for (let i = 1; i < props.length; i += 1) { |
| 400 |
merged = mergeInto(merged, props[i]); |
| 401 |
} |
| 402 |
return merged; |
| 403 |
} |
| 404 |
function createInitialMergedProps(inputProps) { |
| 405 |
if (isPropsGetter(inputProps)) { |
| 406 |
return { |
| 407 |
...resolvePropsGetter(inputProps, EMPTY_PROPS) |
| 408 |
}; |
| 409 |
} |
| 410 |
return copyInitialProps(inputProps); |
| 411 |
} |
| 412 |
function mergeInto(merged, inputProps) { |
| 413 |
if (isPropsGetter(inputProps)) { |
| 414 |
return resolvePropsGetter(inputProps, merged); |
| 415 |
} |
| 416 |
return mutablyMergeInto(merged, inputProps); |
| 417 |
} |
| 418 |
function copyInitialProps(inputProps) { |
| 419 |
const copiedProps = { |
| 420 |
...inputProps |
| 421 |
}; |
| 422 |
for (const propName in copiedProps) { |
| 423 |
const propValue = copiedProps[propName]; |
| 424 |
if (isEventHandler(propName, propValue)) { |
| 425 |
copiedProps[propName] = wrapEventHandler(propValue); |
| 426 |
} |
| 427 |
} |
| 428 |
return copiedProps; |
| 429 |
} |
| 430 |
function mutablyMergeInto(mergedProps, externalProps) { |
| 431 |
if (!externalProps) { |
| 432 |
return mergedProps; |
| 433 |
} |
| 434 |
for (const propName in externalProps) { |
| 435 |
const externalPropValue = externalProps[propName]; |
| 436 |
switch (propName) { |
| 437 |
case "style": { |
| 438 |
mergedProps[propName] = mergeObjects(mergedProps.style, externalPropValue); |
| 439 |
break; |
| 440 |
} |
| 441 |
case "className": { |
| 442 |
mergedProps[propName] = mergeClassNames(mergedProps.className, externalPropValue); |
| 443 |
break; |
| 444 |
} |
| 445 |
default: { |
| 446 |
if (isEventHandler(propName, externalPropValue)) { |
| 447 |
mergedProps[propName] = mergeEventHandlers(mergedProps[propName], externalPropValue); |
| 448 |
} else { |
| 449 |
mergedProps[propName] = externalPropValue; |
| 450 |
} |
| 451 |
} |
| 452 |
} |
| 453 |
} |
| 454 |
return mergedProps; |
| 455 |
} |
| 456 |
function isEventHandler(key, value) { |
| 457 |
const code0 = key.charCodeAt(0); |
| 458 |
const code1 = key.charCodeAt(1); |
| 459 |
const code2 = key.charCodeAt(2); |
| 460 |
return code0 === 111 && code1 === 110 && code2 >= 65 && code2 <= 90 && (typeof value === "function" || typeof value === "undefined"); |
| 461 |
} |
| 462 |
function isPropsGetter(inputProps) { |
| 463 |
return typeof inputProps === "function"; |
| 464 |
} |
| 465 |
function resolvePropsGetter(inputProps, previousProps) { |
| 466 |
if (isPropsGetter(inputProps)) { |
| 467 |
return inputProps(previousProps); |
| 468 |
} |
| 469 |
return inputProps ?? EMPTY_PROPS; |
| 470 |
} |
| 471 |
function mergeEventHandlers(ourHandler, theirHandler) { |
| 472 |
if (!theirHandler) { |
| 473 |
return ourHandler; |
| 474 |
} |
| 475 |
if (!ourHandler) { |
| 476 |
return wrapEventHandler(theirHandler); |
| 477 |
} |
| 478 |
return (...args) => { |
| 479 |
const event = args[0]; |
| 480 |
if (isSyntheticEvent(event)) { |
| 481 |
const baseUIEvent = event; |
| 482 |
makeEventPreventable(baseUIEvent); |
| 483 |
const result2 = theirHandler(...args); |
| 484 |
if (!baseUIEvent.baseUIHandlerPrevented) { |
| 485 |
ourHandler?.(...args); |
| 486 |
} |
| 487 |
return result2; |
| 488 |
} |
| 489 |
const result = theirHandler(...args); |
| 490 |
ourHandler?.(...args); |
| 491 |
return result; |
| 492 |
}; |
| 493 |
} |
| 494 |
function wrapEventHandler(handler) { |
| 495 |
if (!handler) { |
| 496 |
return handler; |
| 497 |
} |
| 498 |
return (...args) => { |
| 499 |
const event = args[0]; |
| 500 |
if (isSyntheticEvent(event)) { |
| 501 |
makeEventPreventable(event); |
| 502 |
} |
| 503 |
return handler(...args); |
| 504 |
}; |
| 505 |
} |
| 506 |
function makeEventPreventable(event) { |
| 507 |
event.preventBaseUIHandler = () => { |
| 508 |
event.baseUIHandlerPrevented = true; |
| 509 |
}; |
| 510 |
return event; |
| 511 |
} |
| 512 |
function mergeClassNames(ourClassName, theirClassName) { |
| 513 |
if (theirClassName) { |
| 514 |
if (ourClassName) { |
| 515 |
return theirClassName + " " + ourClassName; |
| 516 |
} |
| 517 |
return theirClassName; |
| 518 |
} |
| 519 |
return ourClassName; |
| 520 |
} |
| 521 |
function isSyntheticEvent(event) { |
| 522 |
return event != null && typeof event === "object" && "nativeEvent" in event; |
| 523 |
} |
| 524 |
|
| 525 |
// node_modules/@base-ui/react/internals/useRenderElement.mjs |
| 526 |
var import_react = __toESM(require_react(), 1); |
| 527 |
function useRenderElement(element, componentProps, params = {}) { |
| 528 |
let renderProp = componentProps.render; |
| 529 |
if (params.enabled !== false) { |
| 530 |
renderProp = unwrapLazyRenderProp(renderProp); |
| 531 |
} |
| 532 |
const outProps = useRenderElementProps(componentProps, params, renderProp); |
| 533 |
if (params.enabled === false) { |
| 534 |
return null; |
| 535 |
} |
| 536 |
const state = params.state ?? EMPTY_OBJECT; |
| 537 |
return evaluateRenderProp(element, renderProp, outProps, state); |
| 538 |
} |
| 539 |
function useRenderElementProps(componentProps, params, renderProp) { |
| 540 |
const { |
| 541 |
className: classNameProp, |
| 542 |
style: styleProp |
| 543 |
} = componentProps; |
| 544 |
const { |
| 545 |
state = EMPTY_OBJECT, |
| 546 |
ref, |
| 547 |
props, |
| 548 |
stateAttributesMapping, |
| 549 |
enabled = true |
| 550 |
} = params; |
| 551 |
const className = enabled ? resolveClassName(classNameProp, state) : void 0; |
| 552 |
const style = enabled ? resolveStyle(styleProp, state) : void 0; |
| 553 |
const stateProps = enabled ? getStateAttributesProps(state, stateAttributesMapping) : EMPTY_OBJECT; |
| 554 |
const resolvedProps = enabled && props ? resolveRenderFunctionProps(props) : void 0; |
| 555 |
const outProps = enabled ? mergeObjects(stateProps, resolvedProps) ?? {} : EMPTY_OBJECT; |
| 556 |
if (typeof document !== "undefined") { |
| 557 |
if (!enabled) { |
| 558 |
void useMergedRefs(null, null); |
| 559 |
} else if (Array.isArray(ref)) { |
| 560 |
outProps.ref = useMergedRefsN([outProps.ref, getReactElementRef(renderProp), ...ref]); |
| 561 |
} else { |
| 562 |
outProps.ref = useMergedRefs(outProps.ref, getReactElementRef(renderProp), ref); |
| 563 |
} |
| 564 |
} |
| 565 |
if (!enabled) { |
| 566 |
return EMPTY_OBJECT; |
| 567 |
} |
| 568 |
if (className !== void 0) { |
| 569 |
outProps.className = mergeClassNames(outProps.className, className); |
| 570 |
} |
| 571 |
if (style !== void 0) { |
| 572 |
outProps.style = mergeObjects(outProps.style, style); |
| 573 |
} |
| 574 |
return outProps; |
| 575 |
} |
| 576 |
function resolveRenderFunctionProps(props) { |
| 577 |
if (Array.isArray(props)) { |
| 578 |
return mergePropsN(props); |
| 579 |
} |
| 580 |
return mergeProps(void 0, props); |
| 581 |
} |
| 582 |
var REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy"); |
| 583 |
var COMPONENT_IDENTIFIER_PATTERN = /^[A-Z][A-Za-z0-9$]*$/; |
| 584 |
var LOWERCASE_CHARACTER_PATTERN = /[a-z]/; |
| 585 |
function unwrapLazyRenderProp(render) { |
| 586 |
if (render?.$$typeof !== REACT_LAZY_TYPE) { |
| 587 |
return render; |
| 588 |
} |
| 589 |
const unwrapped = React6.Children.toArray(render)[0]; |
| 590 |
return /* @__PURE__ */ React6.isValidElement(unwrapped) ? unwrapped : render; |
| 591 |
} |
| 592 |
function evaluateRenderProp(element, render, props, state) { |
| 593 |
if (render) { |
| 594 |
if (typeof render === "function") { |
| 595 |
if (true) { |
| 596 |
warnIfRenderPropLooksLikeComponent(render); |
| 597 |
} |
| 598 |
return render(props, state); |
| 599 |
} |
| 600 |
const mergedProps = mergeProps(props, render.props); |
| 601 |
mergedProps.ref = props.ref; |
| 602 |
if (true) { |
| 603 |
if (!/* @__PURE__ */ React6.isValidElement(render)) { |
| 604 |
throw new Error(["Base UI: The `render` prop was provided an invalid React element as `React.isValidElement(render)` is `false`.", "A valid React element must be provided to the `render` prop because it is cloned with props to replace the default element.", "https://base-ui.com/r/invalid-render-prop"].join("\n")); |
| 605 |
} |
| 606 |
} |
| 607 |
return /* @__PURE__ */ React6.cloneElement(render, mergedProps); |
| 608 |
} |
| 609 |
if (element) { |
| 610 |
if (typeof element === "string") { |
| 611 |
return renderTag(element, props); |
| 612 |
} |
| 613 |
} |
| 614 |
throw new Error(true ? "Base UI: Render element or function are not defined." : formatErrorMessage_default(8)); |
| 615 |
} |
| 616 |
function warnIfRenderPropLooksLikeComponent(renderFn) { |
| 617 |
const functionName = renderFn.name; |
| 618 |
if (functionName.length === 0) { |
| 619 |
return; |
| 620 |
} |
| 621 |
if (!COMPONENT_IDENTIFIER_PATTERN.test(functionName)) { |
| 622 |
return; |
| 623 |
} |
| 624 |
if (!LOWERCASE_CHARACTER_PATTERN.test(functionName)) { |
| 625 |
return; |
| 626 |
} |
| 627 |
warn(`The \`render\` prop received a function named \`${functionName}\` that starts with an uppercase letter.`, "This usually means a React component was passed directly as `render={Component}`.", "Base UI calls `render` as a plain function, which can break the Rules of Hooks during reconciliation.", "If this is an intentional render callback, rename it to start with a lowercase letter.", "Use `render={<Component />}` or `render={(props) => <Component {...props} />}` instead.", "https://base-ui.com/r/invalid-render-prop"); |
| 628 |
} |
| 629 |
function renderTag(Tag, props) { |
| 630 |
if (Tag === "button") { |
| 631 |
return /* @__PURE__ */ (0, import_react.createElement)("button", { |
| 632 |
type: "button", |
| 633 |
...props, |
| 634 |
key: props.key |
| 635 |
}); |
| 636 |
} |
| 637 |
if (Tag === "img") { |
| 638 |
return /* @__PURE__ */ (0, import_react.createElement)("img", { |
| 639 |
alt: "", |
| 640 |
...props, |
| 641 |
key: props.key |
| 642 |
}); |
| 643 |
} |
| 644 |
return /* @__PURE__ */ React6.createElement(Tag, props); |
| 645 |
} |
| 646 |
|
| 647 |
// node_modules/@base-ui/react/internals/use-button/useButton.mjs |
| 648 |
var React9 = __toESM(require_react(), 1); |
| 649 |
|
| 650 |
// node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs |
| 651 |
function hasWindow() { |
| 652 |
return typeof window !== "undefined"; |
| 653 |
} |
| 654 |
function getWindow(node) { |
| 655 |
var _node$ownerDocument; |
| 656 |
return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window; |
| 657 |
} |
| 658 |
function isHTMLElement(value) { |
| 659 |
if (!hasWindow()) { |
| 660 |
return false; |
| 661 |
} |
| 662 |
return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement; |
| 663 |
} |
| 664 |
|
| 665 |
// node_modules/@base-ui/react/internals/composite/root/CompositeRootContext.mjs |
| 666 |
var React7 = __toESM(require_react(), 1); |
| 667 |
var CompositeRootContext = /* @__PURE__ */ React7.createContext(void 0); |
| 668 |
if (true) CompositeRootContext.displayName = "CompositeRootContext"; |
| 669 |
function useCompositeRootContext(optional = false) { |
| 670 |
const context = React7.useContext(CompositeRootContext); |
| 671 |
if (context === void 0 && !optional) { |
| 672 |
throw new Error(true ? "Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>." : formatErrorMessage_default(16)); |
| 673 |
} |
| 674 |
return context; |
| 675 |
} |
| 676 |
|
| 677 |
// node_modules/@base-ui/react/utils/useFocusableWhenDisabled.mjs |
| 678 |
var React8 = __toESM(require_react(), 1); |
| 679 |
function useFocusableWhenDisabled(parameters) { |
| 680 |
const { |
| 681 |
focusableWhenDisabled, |
| 682 |
disabled, |
| 683 |
composite = false, |
| 684 |
tabIndex: tabIndexProp = 0, |
| 685 |
isNativeButton |
| 686 |
} = parameters; |
| 687 |
const isFocusableComposite = composite && focusableWhenDisabled !== false; |
| 688 |
const isNonFocusableComposite = composite && focusableWhenDisabled === false; |
| 689 |
const props = React8.useMemo(() => { |
| 690 |
const additionalProps = { |
| 691 |
// allow Tabbing away from focusableWhenDisabled elements |
| 692 |
onKeyDown(event) { |
| 693 |
if (disabled && focusableWhenDisabled && event.key !== "Tab") { |
| 694 |
event.preventDefault(); |
| 695 |
} |
| 696 |
} |
| 697 |
}; |
| 698 |
if (!composite) { |
| 699 |
additionalProps.tabIndex = tabIndexProp; |
| 700 |
if (!isNativeButton && disabled) { |
| 701 |
additionalProps.tabIndex = focusableWhenDisabled ? tabIndexProp : -1; |
| 702 |
} |
| 703 |
} |
| 704 |
if (isNativeButton && (focusableWhenDisabled || isFocusableComposite) || !isNativeButton && disabled) { |
| 705 |
additionalProps["aria-disabled"] = disabled; |
| 706 |
} |
| 707 |
if (isNativeButton && (!focusableWhenDisabled || isNonFocusableComposite)) { |
| 708 |
additionalProps.disabled = disabled; |
| 709 |
} |
| 710 |
return additionalProps; |
| 711 |
}, [composite, disabled, focusableWhenDisabled, isFocusableComposite, isNonFocusableComposite, isNativeButton, tabIndexProp]); |
| 712 |
return { |
| 713 |
props |
| 714 |
}; |
| 715 |
} |
| 716 |
|
| 717 |
// node_modules/@base-ui/react/utils/dispatchClickWithModifiers.mjs |
| 718 |
function dispatchClickWithModifiers(target, sourceEvent, { |
| 719 |
detail = 0 |
| 720 |
} = {}) { |
| 721 |
target.dispatchEvent(new (getWindow(target)).PointerEvent("click", { |
| 722 |
bubbles: true, |
| 723 |
cancelable: true, |
| 724 |
composed: true, |
| 725 |
detail, |
| 726 |
shiftKey: sourceEvent.shiftKey, |
| 727 |
ctrlKey: sourceEvent.ctrlKey, |
| 728 |
altKey: sourceEvent.altKey, |
| 729 |
metaKey: sourceEvent.metaKey |
| 730 |
})); |
| 731 |
} |
| 732 |
|
| 733 |
// node_modules/@base-ui/react/internals/use-button/useButton.mjs |
| 734 |
function useButton(parameters = {}) { |
| 735 |
const { |
| 736 |
disabled = false, |
| 737 |
focusableWhenDisabled, |
| 738 |
tabIndex = 0, |
| 739 |
native: isNativeButton = true, |
| 740 |
composite: compositeProp |
| 741 |
} = parameters; |
| 742 |
const elementRef = React9.useRef(null); |
| 743 |
const compositeRootContext = useCompositeRootContext(true); |
| 744 |
const isCompositeItem = compositeProp ?? compositeRootContext !== void 0; |
| 745 |
const { |
| 746 |
props: focusableWhenDisabledProps |
| 747 |
} = useFocusableWhenDisabled({ |
| 748 |
focusableWhenDisabled, |
| 749 |
disabled, |
| 750 |
composite: isCompositeItem, |
| 751 |
tabIndex, |
| 752 |
isNativeButton |
| 753 |
}); |
| 754 |
if (true) { |
| 755 |
React9.useEffect(() => { |
| 756 |
if (!elementRef.current) { |
| 757 |
return; |
| 758 |
} |
| 759 |
const isButtonTag = isButtonElement(elementRef.current); |
| 760 |
if (isNativeButton) { |
| 761 |
if (!isButtonTag) { |
| 762 |
const ownerStackMessage = SafeReact.captureOwnerStack?.() || ""; |
| 763 |
const message = "A component that acts as a button expected a native <button> because the `nativeButton` prop is true. Rendering a non-<button> removes native button semantics, which can impact forms and accessibility. Use a real <button> in the `render` prop, or set `nativeButton` to `false`."; |
| 764 |
error(`${message}${ownerStackMessage}`); |
| 765 |
} |
| 766 |
} else if (isButtonTag) { |
| 767 |
const ownerStackMessage = SafeReact.captureOwnerStack?.() || ""; |
| 768 |
const message = "A component that acts as a button expected a non-<button> because the `nativeButton` prop is false. Rendering a <button> keeps native behavior while Base UI applies non-native attributes and handlers, which can add unintended extra attributes (such as `role` or `aria-disabled`). Use a non-<button> in the `render` prop, or set `nativeButton` to `true`."; |
| 769 |
error(`${message}${ownerStackMessage}`); |
| 770 |
} |
| 771 |
}, [isNativeButton]); |
| 772 |
} |
| 773 |
const updateDisabled = React9.useCallback(() => { |
| 774 |
const element = elementRef.current; |
| 775 |
if (!isButtonElement(element)) { |
| 776 |
return; |
| 777 |
} |
| 778 |
if (isCompositeItem && disabled && focusableWhenDisabledProps.disabled === void 0 && element.disabled) { |
| 779 |
element.disabled = false; |
| 780 |
} |
| 781 |
}, [disabled, focusableWhenDisabledProps.disabled, isCompositeItem]); |
| 782 |
useIsoLayoutEffect(updateDisabled, [updateDisabled]); |
| 783 |
const getButtonProps = React9.useCallback((externalProps = {}) => { |
| 784 |
const { |
| 785 |
onClick: externalOnClick, |
| 786 |
onMouseDown: externalOnMouseDown, |
| 787 |
onKeyUp: externalOnKeyUp, |
| 788 |
onKeyDown: externalOnKeyDown, |
| 789 |
onPointerDown: externalOnPointerDown, |
| 790 |
...otherExternalProps |
| 791 |
} = externalProps; |
| 792 |
return mergeProps({ |
| 793 |
onClick(event) { |
| 794 |
if (disabled) { |
| 795 |
event.preventDefault(); |
| 796 |
return; |
| 797 |
} |
| 798 |
externalOnClick?.(event); |
| 799 |
}, |
| 800 |
onMouseDown(event) { |
| 801 |
if (!disabled) { |
| 802 |
externalOnMouseDown?.(event); |
| 803 |
} |
| 804 |
}, |
| 805 |
onKeyDown(event) { |
| 806 |
if (disabled) { |
| 807 |
return; |
| 808 |
} |
| 809 |
makeEventPreventable(event); |
| 810 |
externalOnKeyDown?.(event); |
| 811 |
if (event.baseUIHandlerPrevented) { |
| 812 |
return; |
| 813 |
} |
| 814 |
const isCurrentTarget = event.target === event.currentTarget; |
| 815 |
const currentTarget = event.currentTarget; |
| 816 |
const isButton = isButtonElement(currentTarget); |
| 817 |
const isLink = !isNativeButton && isValidLinkElement(currentTarget); |
| 818 |
const shouldClick = isCurrentTarget && (isNativeButton ? isButton : !isLink); |
| 819 |
const isEnterKey = event.key === "Enter"; |
| 820 |
const isSpaceKey = event.key === " "; |
| 821 |
const role = currentTarget.getAttribute("role"); |
| 822 |
const isTextNavigationRole = role?.startsWith("menuitem") || role === "option" || role === "gridcell"; |
| 823 |
if (isCurrentTarget && isCompositeItem && isSpaceKey) { |
| 824 |
if (event.defaultPrevented && isTextNavigationRole) { |
| 825 |
return; |
| 826 |
} |
| 827 |
event.preventDefault(); |
| 828 |
if (!isNativeButton || isButton) { |
| 829 |
event.preventBaseUIHandler(); |
| 830 |
dispatchClickWithModifiers(currentTarget, event); |
| 831 |
} |
| 832 |
return; |
| 833 |
} |
| 834 |
if (!shouldClick || isNativeButton || !isSpaceKey && !isEnterKey) { |
| 835 |
if (isCurrentTarget && isLink && isSpaceKey) { |
| 836 |
event.preventDefault(); |
| 837 |
} |
| 838 |
return; |
| 839 |
} |
| 840 |
if (event.defaultPrevented) { |
| 841 |
return; |
| 842 |
} |
| 843 |
event.preventDefault(); |
| 844 |
if (isEnterKey) { |
| 845 |
event.preventBaseUIHandler(); |
| 846 |
dispatchClickWithModifiers(currentTarget, event); |
| 847 |
} |
| 848 |
}, |
| 849 |
onKeyUp(event) { |
| 850 |
if (disabled) { |
| 851 |
return; |
| 852 |
} |
| 853 |
makeEventPreventable(event); |
| 854 |
externalOnKeyUp?.(event); |
| 855 |
if (event.target === event.currentTarget && isNativeButton && isCompositeItem && isButtonElement(event.currentTarget) && event.key === " ") { |
| 856 |
event.preventDefault(); |
| 857 |
return; |
| 858 |
} |
| 859 |
if (event.baseUIHandlerPrevented) { |
| 860 |
return; |
| 861 |
} |
| 862 |
if (event.target === event.currentTarget && !isNativeButton && !isCompositeItem && !event.defaultPrevented && event.key === " ") { |
| 863 |
event.preventBaseUIHandler(); |
| 864 |
dispatchClickWithModifiers(event.currentTarget, event); |
| 865 |
} |
| 866 |
}, |
| 867 |
onPointerDown(event) { |
| 868 |
if (disabled) { |
| 869 |
event.preventDefault(); |
| 870 |
return; |
| 871 |
} |
| 872 |
externalOnPointerDown?.(event); |
| 873 |
} |
| 874 |
}, isNativeButton ? { |
| 875 |
type: "button" |
| 876 |
} : { |
| 877 |
role: "button" |
| 878 |
}, focusableWhenDisabledProps, otherExternalProps); |
| 879 |
}, [disabled, focusableWhenDisabledProps, isCompositeItem, isNativeButton]); |
| 880 |
const buttonRef = useStableCallback((element) => { |
| 881 |
elementRef.current = element; |
| 882 |
updateDisabled(); |
| 883 |
}); |
| 884 |
return { |
| 885 |
getButtonProps, |
| 886 |
buttonRef |
| 887 |
}; |
| 888 |
} |
| 889 |
function isButtonElement(elem) { |
| 890 |
return isHTMLElement(elem) && elem.tagName === "BUTTON"; |
| 891 |
} |
| 892 |
function isValidLinkElement(elem) { |
| 893 |
return isHTMLElement(elem) && elem.tagName === "A" && Boolean(elem.href); |
| 894 |
} |
| 895 |
|
| 896 |
// node_modules/@base-ui/react/button/Button.mjs |
| 897 |
var React10 = __toESM(require_react(), 1); |
| 898 |
var Button = /* @__PURE__ */ React10.forwardRef(function Button2(componentProps, forwardedRef) { |
| 899 |
const { |
| 900 |
render, |
| 901 |
className, |
| 902 |
disabled = false, |
| 903 |
focusableWhenDisabled = false, |
| 904 |
nativeButton = true, |
| 905 |
style, |
| 906 |
...elementProps |
| 907 |
} = componentProps; |
| 908 |
const { |
| 909 |
getButtonProps, |
| 910 |
buttonRef |
| 911 |
} = useButton({ |
| 912 |
disabled, |
| 913 |
focusableWhenDisabled, |
| 914 |
native: nativeButton |
| 915 |
}); |
| 916 |
const state = { |
| 917 |
disabled |
| 918 |
}; |
| 919 |
return useRenderElement("button", componentProps, { |
| 920 |
state, |
| 921 |
ref: [forwardedRef, buttonRef], |
| 922 |
props: [elementProps, getButtonProps] |
| 923 |
}); |
| 924 |
}); |
| 925 |
if (true) Button.displayName = "Button"; |
| 926 |
|
| 927 |
// node_modules/@base-ui/react/use-render/useRender.mjs |
| 928 |
function useRender(params) { |
| 929 |
return useRenderElement(params.defaultTagName ?? "div", params, params); |
| 930 |
} |
| 931 |
|
| 932 |
// packages/ui/build-module/text/text.mjs |
| 933 |
var import_element = __toESM(require_element(), 1); |
| 934 |
var STYLE_HASH_ATTRIBUTE = "data-wp-hash"; |
| 935 |
function getRuntime() { |
| 936 |
const globalScope = globalThis; |
| 937 |
if (globalScope.__wpStyleRuntime) { |
| 938 |
return globalScope.__wpStyleRuntime; |
| 939 |
} |
| 940 |
globalScope.__wpStyleRuntime = { |
| 941 |
documents: /* @__PURE__ */ new Map(), |
| 942 |
styles: /* @__PURE__ */ new Map(), |
| 943 |
injectedStyles: /* @__PURE__ */ new WeakMap() |
| 944 |
}; |
| 945 |
if (typeof document !== "undefined") { |
| 946 |
registerDocument(document); |
| 947 |
} |
| 948 |
return globalScope.__wpStyleRuntime; |
| 949 |
} |
| 950 |
function documentContainsStyleHash(targetDocument, hash) { |
| 951 |
if (!targetDocument.head) { |
| 952 |
return false; |
| 953 |
} |
| 954 |
for (const style of targetDocument.head.querySelectorAll( |
| 955 |
`style[${STYLE_HASH_ATTRIBUTE}]` |
| 956 |
)) { |
| 957 |
if (style.getAttribute(STYLE_HASH_ATTRIBUTE) === hash) { |
| 958 |
return true; |
| 959 |
} |
| 960 |
} |
| 961 |
return false; |
| 962 |
} |
| 963 |
function injectStyle(targetDocument, hash, css) { |
| 964 |
if (!targetDocument.head) { |
| 965 |
return; |
| 966 |
} |
| 967 |
const runtime = getRuntime(); |
| 968 |
let injectedStyles = runtime.injectedStyles.get(targetDocument); |
| 969 |
if (!injectedStyles) { |
| 970 |
injectedStyles = /* @__PURE__ */ new Set(); |
| 971 |
runtime.injectedStyles.set(targetDocument, injectedStyles); |
| 972 |
} |
| 973 |
if (injectedStyles.has(hash)) { |
| 974 |
return; |
| 975 |
} |
| 976 |
if (documentContainsStyleHash(targetDocument, hash)) { |
| 977 |
injectedStyles.add(hash); |
| 978 |
return; |
| 979 |
} |
| 980 |
const style = targetDocument.createElement("style"); |
| 981 |
style.setAttribute(STYLE_HASH_ATTRIBUTE, hash); |
| 982 |
style.appendChild(targetDocument.createTextNode(css)); |
| 983 |
targetDocument.head.appendChild(style); |
| 984 |
injectedStyles.add(hash); |
| 985 |
} |
| 986 |
function registerDocument(targetDocument) { |
| 987 |
const runtime = getRuntime(); |
| 988 |
runtime.documents.set( |
| 989 |
targetDocument, |
| 990 |
(runtime.documents.get(targetDocument) ?? 0) + 1 |
| 991 |
); |
| 992 |
for (const [hash, css] of runtime.styles) { |
| 993 |
injectStyle(targetDocument, hash, css); |
| 994 |
} |
| 995 |
return () => { |
| 996 |
const count = runtime.documents.get(targetDocument); |
| 997 |
if (count === void 0) { |
| 998 |
return; |
| 999 |
} |
| 1000 |
if (count <= 1) { |
| 1001 |
runtime.documents.delete(targetDocument); |
| 1002 |
return; |
| 1003 |
} |
| 1004 |
runtime.documents.set(targetDocument, count - 1); |
| 1005 |
}; |
| 1006 |
} |
| 1007 |
function registerStyle(hash, css) { |
| 1008 |
const runtime = getRuntime(); |
| 1009 |
runtime.styles.set(hash, css); |
| 1010 |
for (const targetDocument of runtime.documents.keys()) { |
| 1011 |
injectStyle(targetDocument, hash, css); |
| 1012 |
} |
| 1013 |
} |
| 1014 |
if (typeof process === "undefined" || true) { |
| 1015 |
registerStyle("3167e7d116", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._83ed8a8da5dd50ea__text{text-wrap:pretty;margin:0}._14437cfb77831647__heading-2xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-2xl,32px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-emphasis,600);--_gcd-p-font-size:var(--wpds-typography-font-size-2xl,32px);--_gcd-p-line-height:var(--wpds-typography-line-height-2xl,40px);font-size:var(--wpds-typography-font-size-2xl,32px);line-height:var(--wpds-typography-line-height-2xl,40px)}._14437cfb77831647__heading-2xl,._3c78b7fa9b4072dd__heading-xl{font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-emphasis,600)}._3c78b7fa9b4072dd__heading-xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-emphasis,600);--_gcd-p-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-p-line-height:var(--wpds-typography-line-height-md,24px);font-size:var(--wpds-typography-font-size-xl,20px);line-height:var(--wpds-typography-line-height-md,24px)}.aa58f227716bcde2__heading-lg{--_gcd-heading-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-emphasis,600);--_gcd-p-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-p-line-height:var(--wpds-typography-line-height-sm,20px);font-size:var(--wpds-typography-font-size-lg,15px)}.aa58f227716bcde2__heading-lg,.fc4da56d8dfe52c4__heading-md{font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-emphasis,600);line-height:var(--wpds-typography-line-height-sm,20px)}.fc4da56d8dfe52c4__heading-md{--_gcd-heading-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-emphasis,600);--_gcd-p-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-p-line-height:var(--wpds-typography-line-height-sm,20px);font-size:var(--wpds-typography-font-size-md,13px)}.a9b78c7c82e8dff7__heading-sm{--_gcd-heading-font-size:var(--wpds-typography-font-size-xs,11px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-emphasis,600);--_gcd-p-font-size:var(--wpds-typography-font-size-xs,11px);--_gcd-p-line-height:var(--wpds-typography-line-height-xs,16px);font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-xs,11px);font-weight:var(--wpds-typography-font-weight-emphasis,600);line-height:var(--wpds-typography-line-height-xs,16px);text-transform:uppercase}._305ff559e52180d5__body-xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-default,400);--_gcd-p-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-p-line-height:var(--wpds-typography-line-height-xl,32px);font-size:var(--wpds-typography-font-size-xl,20px);line-height:var(--wpds-typography-line-height-xl,32px)}._305ff559e52180d5__body-xl,.ca1aa3fc2029e958__body-lg{font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-default,400)}.ca1aa3fc2029e958__body-lg{--_gcd-heading-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-default,400);--_gcd-p-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-p-line-height:var(--wpds-typography-line-height-md,24px);font-size:var(--wpds-typography-font-size-lg,15px);line-height:var(--wpds-typography-line-height-md,24px)}._131101940be12424__body-md{--_gcd-heading-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-default,400);--_gcd-p-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-p-line-height:var(--wpds-typography-line-height-sm,20px);font-size:var(--wpds-typography-font-size-md,13px);line-height:var(--wpds-typography-line-height-sm,20px)}._0e8d87a42c1f75fa__body-sm,._131101940be12424__body-md{font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-default,400)}._0e8d87a42c1f75fa__body-sm{--_gcd-heading-font-size:var(--wpds-typography-font-size-sm,12px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-default,400);--_gcd-p-font-size:var(--wpds-typography-font-size-sm,12px);--_gcd-p-line-height:var(--wpds-typography-line-height-xs,16px);font-size:var(--wpds-typography-font-size-sm,12px);line-height:var(--wpds-typography-line-height-xs,16px)}}}'); |
| 1016 |
} |
| 1017 |
var style_default = { "text": "_83ed8a8da5dd50ea__text", "heading-2xl": "_14437cfb77831647__heading-2xl", "heading-xl": "_3c78b7fa9b4072dd__heading-xl", "heading-lg": "aa58f227716bcde2__heading-lg", "heading-md": "fc4da56d8dfe52c4__heading-md", "heading-sm": "a9b78c7c82e8dff7__heading-sm", "body-xl": "_305ff559e52180d5__body-xl", "body-lg": "ca1aa3fc2029e958__body-lg", "body-md": "_131101940be12424__body-md", "body-sm": "_0e8d87a42c1f75fa__body-sm" }; |
| 1018 |
if (typeof process === "undefined" || true) { |
| 1019 |
registerStyle("e8e31009f5", "._6defc79820e382c6__button{box-sizing:var(--_gcd-button-box-sizing,border-box);font-family:var(--_gcd-button-font-family,inherit);font-size:var(--_gcd-button-font-size,inherit);font-weight:var(--_gcd-button-font-weight,inherit)}.d2cff2e5dea83bd1__input{box-sizing:var(--_gcd-input-box-sizing,border-box);font-family:var(--_gcd-input-font-family,inherit);font-size:var(--_gcd-input-font-size,inherit);font-weight:var(--_gcd-input-font-weight,inherit);margin:var(--_gcd-input-margin,0);&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-foreground-interactive-neutral-weak,#707070))}&:is(textarea,[type=text],[type=password],[type=color],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){background-color:var(--_gcd-input-background-color,transparent);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 transparent);color:var(--_gcd-input-color,var(--wpds-color-foreground-interactive-neutral,#1e1e1e));&:focus{border-color:var(--_gcd-input-border-color-focus,var(--wp-admin-theme-color));box-shadow:var(--_gcd-input-box-shadow-focus,none);outline:var(--_gcd-input-outline-focus,none)}&:disabled{background:var(--_gcd-input-background-disabled,transparent);border-color:var(--_gcd-input-border-color-disabled,transparent);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}}&:is(textarea,[type=text],[type=password],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){line-height:var(--_gcd-input-line-height,inherit);min-height:var(--_gcd-input-min-height,auto);padding:var(--_gcd-input-padding,0)}}._547d86373d02e108__textarea{box-sizing:var(--_gcd-textarea-box-sizing,border-box);overflow:var(--_gcd-textarea-overflow,auto);resize:var(--_gcd-textarea-resize,block)}._8c15fd0ed9f28ba4__div{outline:var(--_gcd-div-outline,0 solid transparent)}p._43cec3e1eec1066d__p{font-size:var(--_gcd-p-font-size,13px);line-height:var(--_gcd-p-line-height,1.5);margin:var(--_gcd-p-margin,0)}:is(h1,h2,h3,h4,h5,h6).e97669c6d9a38497__heading{color:var(--_gcd-heading-color,var(--wpds-color-foreground-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-emphasis,600));margin:var(--_gcd-heading-margin,0)}._2c0831b0499dbd6e__a,._2c0831b0499dbd6e__a:is(:hover,:focus,:active){border-radius:var(--_gcd-a-border-radius,0);box-shadow:var(--_gcd-a-box-shadow,none);color:var(--_gcd-a-color,inherit);outline:var(--_gcd-a-outline,0 solid transparent);transition:var(--_gcd-a-transition,none)}.c59a0ebebd71fa4a__ol{list-style:var(--_gcd-ol-list-style,none);margin:var(--_gcd-ol-margin,0);padding-block:var(--_gcd-ol-padding-block,0);padding-inline:var(--_gcd-ol-padding-inline,0)}._46b5cb0c8e24e8c9__li{margin:var(--_gcd-li-margin,0)}"); |
| 1020 |
} |
| 1021 |
var global_css_defense_default = { "button": "_6defc79820e382c6__button", "input": "d2cff2e5dea83bd1__input", "textarea": "_547d86373d02e108__textarea", "div": "_8c15fd0ed9f28ba4__div", "p": "_43cec3e1eec1066d__p", "heading": "e97669c6d9a38497__heading", "a": "_2c0831b0499dbd6e__a", "ol": "c59a0ebebd71fa4a__ol", "li": "_46b5cb0c8e24e8c9__li" }; |
| 1022 |
var Text = (0, import_element.forwardRef)(function Text2({ variant = "body-md", render, className, ...props }, ref) { |
| 1023 |
const element = useRender({ |
| 1024 |
render, |
| 1025 |
defaultTagName: "span", |
| 1026 |
ref, |
| 1027 |
props: mergeProps(props, { |
| 1028 |
className: clsx_default( |
| 1029 |
style_default.text, |
| 1030 |
global_css_defense_default.heading, |
| 1031 |
global_css_defense_default.p, |
| 1032 |
style_default[variant], |
| 1033 |
className |
| 1034 |
) |
| 1035 |
}) |
| 1036 |
}); |
| 1037 |
return element; |
| 1038 |
}); |
| 1039 |
|
| 1040 |
// packages/ui/build-module/icon/icon.mjs |
| 1041 |
var import_element2 = __toESM(require_element(), 1); |
| 1042 |
var import_primitives2 = __toESM(require_primitives(), 1); |
| 1043 |
var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1); |
| 1044 |
var Icon = (0, import_element2.forwardRef)(function Icon2({ icon, size = 24, style, ...restProps }, ref) { |
| 1045 |
const mergedStyle = icon.props.style || style ? { ...icon.props.style, ...style } : void 0; |
| 1046 |
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)( |
| 1047 |
import_primitives2.SVG, |
| 1048 |
{ |
| 1049 |
ref, |
| 1050 |
...icon.props, |
| 1051 |
...restProps, |
| 1052 |
...mergedStyle ? { style: mergedStyle } : {}, |
| 1053 |
width: size, |
| 1054 |
height: size |
| 1055 |
} |
| 1056 |
); |
| 1057 |
}); |
| 1058 |
|
| 1059 |
// packages/ui/build-module/button/button.mjs |
| 1060 |
var import_element3 = __toESM(require_element(), 1); |
| 1061 |
var import_i18n = __toESM(require_i18n(), 1); |
| 1062 |
var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1); |
| 1063 |
import { speak } from "@wordpress/a11y"; |
| 1064 |
var STYLE_HASH_ATTRIBUTE2 = "data-wp-hash"; |
| 1065 |
function getRuntime2() { |
| 1066 |
const globalScope = globalThis; |
| 1067 |
if (globalScope.__wpStyleRuntime) { |
| 1068 |
return globalScope.__wpStyleRuntime; |
| 1069 |
} |
| 1070 |
globalScope.__wpStyleRuntime = { |
| 1071 |
documents: /* @__PURE__ */ new Map(), |
| 1072 |
styles: /* @__PURE__ */ new Map(), |
| 1073 |
injectedStyles: /* @__PURE__ */ new WeakMap() |
| 1074 |
}; |
| 1075 |
if (typeof document !== "undefined") { |
| 1076 |
registerDocument2(document); |
| 1077 |
} |
| 1078 |
return globalScope.__wpStyleRuntime; |
| 1079 |
} |
| 1080 |
function documentContainsStyleHash2(targetDocument, hash) { |
| 1081 |
if (!targetDocument.head) { |
| 1082 |
return false; |
| 1083 |
} |
| 1084 |
for (const style of targetDocument.head.querySelectorAll( |
| 1085 |
`style[${STYLE_HASH_ATTRIBUTE2}]` |
| 1086 |
)) { |
| 1087 |
if (style.getAttribute(STYLE_HASH_ATTRIBUTE2) === hash) { |
| 1088 |
return true; |
| 1089 |
} |
| 1090 |
} |
| 1091 |
return false; |
| 1092 |
} |
| 1093 |
function injectStyle2(targetDocument, hash, css) { |
| 1094 |
if (!targetDocument.head) { |
| 1095 |
return; |
| 1096 |
} |
| 1097 |
const runtime = getRuntime2(); |
| 1098 |
let injectedStyles = runtime.injectedStyles.get(targetDocument); |
| 1099 |
if (!injectedStyles) { |
| 1100 |
injectedStyles = /* @__PURE__ */ new Set(); |
| 1101 |
runtime.injectedStyles.set(targetDocument, injectedStyles); |
| 1102 |
} |
| 1103 |
if (injectedStyles.has(hash)) { |
| 1104 |
return; |
| 1105 |
} |
| 1106 |
if (documentContainsStyleHash2(targetDocument, hash)) { |
| 1107 |
injectedStyles.add(hash); |
| 1108 |
return; |
| 1109 |
} |
| 1110 |
const style = targetDocument.createElement("style"); |
| 1111 |
style.setAttribute(STYLE_HASH_ATTRIBUTE2, hash); |
| 1112 |
style.appendChild(targetDocument.createTextNode(css)); |
| 1113 |
targetDocument.head.appendChild(style); |
| 1114 |
injectedStyles.add(hash); |
| 1115 |
} |
| 1116 |
function registerDocument2(targetDocument) { |
| 1117 |
const runtime = getRuntime2(); |
| 1118 |
runtime.documents.set( |
| 1119 |
targetDocument, |
| 1120 |
(runtime.documents.get(targetDocument) ?? 0) + 1 |
| 1121 |
); |
| 1122 |
for (const [hash, css] of runtime.styles) { |
| 1123 |
injectStyle2(targetDocument, hash, css); |
| 1124 |
} |
| 1125 |
return () => { |
| 1126 |
const count = runtime.documents.get(targetDocument); |
| 1127 |
if (count === void 0) { |
| 1128 |
return; |
| 1129 |
} |
| 1130 |
if (count <= 1) { |
| 1131 |
runtime.documents.delete(targetDocument); |
| 1132 |
return; |
| 1133 |
} |
| 1134 |
runtime.documents.set(targetDocument, count - 1); |
| 1135 |
}; |
| 1136 |
} |
| 1137 |
function registerStyle2(hash, css) { |
| 1138 |
const runtime = getRuntime2(); |
| 1139 |
runtime.styles.set(hash, css); |
| 1140 |
for (const targetDocument of runtime.documents.keys()) { |
| 1141 |
injectStyle2(targetDocument, hash, css); |
| 1142 |
} |
| 1143 |
} |
| 1144 |
if (typeof process === "undefined" || true) { |
| 1145 |
registerStyle2("effc4e3032", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._97b0fc33c028be1a__button,.abbb272e2ce49bd6__is-unstyled{appearance:none;padding:0}._97b0fc33c028be1a__button{--wp-ui-button-font-weight:var(--wpds-typography-font-weight-emphasis,600);--wp-ui-button-background-color:var(--wpds-color-background-interactive-brand-strong,var(--wp-admin-theme-color,#3858e9));--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-brand-strong-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 93%,#000));--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-brand-strong-disabled,#e6e6e6);--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-brand-strong,#fff);--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-brand-strong-active,#fff);--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-brand-strong-disabled,#8d8d8d);--wp-ui-button-padding-block:var(--wpds-dimension-padding-xs,4px);--wp-ui-button-padding-inline:var(--wpds-dimension-padding-md,12px);--wp-ui-button-height:var(--wpds-dimension-size-lg,40px);--wp-ui-button-aspect-ratio:auto;--wp-ui-button-font-size:var(--wpds-typography-font-size-md,13px);--wp-ui-button-min-width:calc(4ch + var(--wp-ui-button-padding-inline)*2);--wp-ui-button-icon-margin:calc((var(--wpds-dimension-size-2xs, 16px) - var(--wpds-dimension-size-sm, 24px))/2);--wp-ui-button-border-color:var(--wp-ui-button-background-color);--wp-ui-button-border-color-active:var(--wp-ui-button-background-color-active);--wp-ui-button-border-color-disabled:var(--wp-ui-button-background-color-disabled);--_gcd-button-font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);--_gcd-button-font-size:var(--wp-ui-button-font-size);--_gcd-button-font-weight:var(--wp-ui-button-font-weight);align-items:center;aspect-ratio:var(--wp-ui-button-aspect-ratio);background-clip:border-box;background-color:var(--wp-ui-button-background-color);border-color:var(--wp-ui-button-border-color);border-radius:var(--wpds-border-radius-sm,2px);border-style:solid;border-width:1px;color:var(--wp-ui-button-foreground-color);display:inline-flex;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wp-ui-button-font-size);font-weight:var(--wp-ui-button-font-weight);gap:var(--wpds-dimension-gap-sm,8px);justify-content:center;line-height:var(--wpds-typography-line-height-sm,20px);max-width:100%;min-height:var(--wp-ui-button-height);min-width:var(--wp-ui-button-min-width);overflow-wrap:anywhere;padding-block:var(--wp-ui-button-padding-block);padding-inline:var(--wp-ui-button-padding-inline);position:relative;text-align:center;text-decoration:none;&:not([data-disabled]){cursor:var(--wpds-cursor-control,pointer)}@media not (prefers-reduced-motion){transition:color .1s ease-out;*{transition:opacity .1s ease-out}}&[href]{cursor:pointer}[href]{color:inherit;text-decoration:inherit}&:not([data-disabled]):is(:hover,:active,:focus){background-color:var(--wp-ui-button-background-color-active);border-color:var(--wp-ui-button-border-color-active);color:var(--wp-ui-button-foreground-color-active)}&[data-disabled]:not(._914b42f315c0e580__is-loading){background-color:var(--wp-ui-button-background-color-disabled);border-color:var(--wp-ui-button-border-color-disabled);color:var(--wp-ui-button-foreground-color-disabled);@media (forced-colors:active){border-bottom-color:GrayText;border-left-color:GrayText;border-right-color:GrayText;border-top-color:GrayText;color:GrayText}}&:before{aspect-ratio:1;border:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid;border-block-end-color:transparent;border-block-start-color:var(--wp-ui-button-foreground-color);border-inline-end-color:var(--wp-ui-button-foreground-color);border-inline-start-color:transparent;border-radius:50%;box-sizing:border-box;content:"";display:block;height:var(--wp-ui-button-font-size);left:50%;opacity:0;pointer-events:none;position:absolute;top:50%;transform:translate(-50%,-50%);@media not (prefers-reduced-motion){transition:opacity .1s ease-out}@media (forced-colors:active){border-block-end-style:none;border-bottom-color:ButtonText;border-inline-start-style:none;border-left-color:ButtonText;border-right-color:ButtonText;border-top-color:ButtonText}}}._908205475f9f2a92__is-small{--wp-ui-button-padding-block:0px;--wp-ui-button-padding-inline:var(--wpds-dimension-padding-sm,8px);--wp-ui-button-height:var(--wpds-dimension-size-sm,24px)}._9f6fc6553aeb36fe__icon{margin:var(--wp-ui-button-icon-margin)}.dd460c965226cc77__is-brand{&._62d5a778b7b258ee__is-outline,&.ad0619a3217c6a5b__is-minimal{--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-brand,var(--wp-admin-theme-color,#3858e9));--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 52%,#000));--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-brand-disabled,#8d8d8d)}&._62d5a778b7b258ee__is-outline{--wp-ui-button-background-color:var(--wpds-color-background-interactive-brand-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-brand-weak-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 12%,#fff));--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-brand-weak-disabled,#0000);--wp-ui-button-border-color:var(--wpds-color-stroke-interactive-brand,var(--wp-admin-theme-color,#3858e9));--wp-ui-button-border-color-active:var(--wpds-color-stroke-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 85%,#000));--wp-ui-button-border-color-disabled:var(--wpds-color-stroke-interactive-brand-disabled,#dbdbdb)}&.ad0619a3217c6a5b__is-minimal{--wp-ui-button-background-color:var(--wpds-color-background-interactive-brand-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-brand-weak-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 12%,#fff));--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-brand-weak-disabled,#0000)}}.e722a8f96726aa99__is-neutral{&.ad0619a3217c6a5b__is-minimal[aria-pressed=true],&.b50b3358c5fb4d0b__is-solid{--wp-ui-button-background-color:var(--wpds-color-background-interactive-neutral-strong,#2d2d2d);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-neutral-strong-active,#1e1e1e);--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-neutral-strong-disabled,#e6e6e6);--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-neutral-strong,#f0f0f0);--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-neutral-strong-active,#f0f0f0);--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-neutral-strong-disabled,#8d8d8d)}&._62d5a778b7b258ee__is-outline,&.ad0619a3217c6a5b__is-minimal:not([aria-pressed=true]){--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-neutral-active,#1e1e1e);--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d)}&._62d5a778b7b258ee__is-outline{--wp-ui-button-background-color:var(--wpds-color-background-interactive-neutral-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-neutral-weak-active,#ededed);--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-neutral-weak-disabled,#0000);--wp-ui-button-border-color:var(--wpds-color-stroke-interactive-neutral,#8d8d8d);--wp-ui-button-border-color-active:var(--wpds-color-stroke-interactive-neutral-active,#6e6e6e);--wp-ui-button-border-color-disabled:var(--wpds-color-stroke-interactive-neutral-disabled,#dbdbdb)}&.ad0619a3217c6a5b__is-minimal:not([aria-pressed=true]){--wp-ui-button-background-color:var(--wpds-color-background-interactive-neutral-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-neutral-weak-active,#ededed);--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-neutral-weak-disabled,#0000)}}.abbb272e2ce49bd6__is-unstyled{background:none;border:none;min-width:unset}.cf59cf1b69629838__is-compact{--wp-ui-button-height:var(--wpds-dimension-size-md,32px)}._914b42f315c0e580__is-loading:not(.abbb272e2ce49bd6__is-unstyled){color:transparent;&:not([data-disabled]):is(:hover,:active,:focus){color:transparent}@media (forced-colors:active){color:ButtonFace}*{opacity:0}&:before{opacity:1;transition-delay:.05s;@media not (prefers-reduced-motion){animation:_5a1d53da6f830c8d__loading-animation 1s linear infinite}}}}@keyframes _5a1d53da6f830c8d__loading-animation{0%{transform:translate(-50%,-50%) rotate(0deg)}to{transform:translate(-50%,-50%) rotate(1turn)}}}'); |
| 1146 |
} |
| 1147 |
var style_default2 = { "button": "_97b0fc33c028be1a__button", "is-unstyled": "abbb272e2ce49bd6__is-unstyled", "is-loading": "_914b42f315c0e580__is-loading", "is-small": "_908205475f9f2a92__is-small", "icon": "_9f6fc6553aeb36fe__icon", "is-brand": "dd460c965226cc77__is-brand", "is-outline": "_62d5a778b7b258ee__is-outline", "is-minimal": "ad0619a3217c6a5b__is-minimal", "is-neutral": "e722a8f96726aa99__is-neutral", "is-solid": "b50b3358c5fb4d0b__is-solid", "is-compact": "cf59cf1b69629838__is-compact", "loading-animation": "_5a1d53da6f830c8d__loading-animation" }; |
| 1148 |
if (typeof process === "undefined" || true) { |
| 1149 |
registerStyle2("10f3806643", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}"); |
| 1150 |
} |
| 1151 |
var resets_default = { "box-sizing": "_336cd3e4e743482f__box-sizing" }; |
| 1152 |
if (typeof process === "undefined" || true) { |
| 1153 |
registerStyle2("08122b3d53", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{.af79fb116edb0dd7__outset-ring--focus:focus,.dfcfdc28396e5d98__outset-ring--focus-visible:focus-visible,.e5cd9ee879f6403a__outset-ring--focus-within:focus-within,:focus-visible ._81935a08e952f267__outset-ring--focus-parent-visible{--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));--_gcd-div-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline-offset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}._3c9f5ee9fc9c136d__outset-ring--focus-within-except-active:focus-within,.abc777e9713fa711__outset-ring--focus-except-active:focus{outline:none}._3c9f5ee9fc9c136d__outset-ring--focus-within-except-active:focus-within:not(:has(:active)),.abc777e9713fa711__outset-ring--focus-except-active:focus:not(:active){--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));--_gcd-div-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline-offset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}}"); |
| 1154 |
} |
| 1155 |
var focus_module_default = { "outset-ring--focus": "af79fb116edb0dd7__outset-ring--focus", "outset-ring--focus-visible": "dfcfdc28396e5d98__outset-ring--focus-visible", "outset-ring--focus-within": "e5cd9ee879f6403a__outset-ring--focus-within", "outset-ring--focus-parent-visible": "_81935a08e952f267__outset-ring--focus-parent-visible", "outset-ring--focus-except-active": "abc777e9713fa711__outset-ring--focus-except-active", "outset-ring--focus-within-except-active": "_3c9f5ee9fc9c136d__outset-ring--focus-within-except-active" }; |
| 1156 |
if (typeof process === "undefined" || true) { |
| 1157 |
registerStyle2("e8e31009f5", "._6defc79820e382c6__button{box-sizing:var(--_gcd-button-box-sizing,border-box);font-family:var(--_gcd-button-font-family,inherit);font-size:var(--_gcd-button-font-size,inherit);font-weight:var(--_gcd-button-font-weight,inherit)}.d2cff2e5dea83bd1__input{box-sizing:var(--_gcd-input-box-sizing,border-box);font-family:var(--_gcd-input-font-family,inherit);font-size:var(--_gcd-input-font-size,inherit);font-weight:var(--_gcd-input-font-weight,inherit);margin:var(--_gcd-input-margin,0);&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-foreground-interactive-neutral-weak,#707070))}&:is(textarea,[type=text],[type=password],[type=color],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){background-color:var(--_gcd-input-background-color,transparent);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 transparent);color:var(--_gcd-input-color,var(--wpds-color-foreground-interactive-neutral,#1e1e1e));&:focus{border-color:var(--_gcd-input-border-color-focus,var(--wp-admin-theme-color));box-shadow:var(--_gcd-input-box-shadow-focus,none);outline:var(--_gcd-input-outline-focus,none)}&:disabled{background:var(--_gcd-input-background-disabled,transparent);border-color:var(--_gcd-input-border-color-disabled,transparent);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}}&:is(textarea,[type=text],[type=password],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){line-height:var(--_gcd-input-line-height,inherit);min-height:var(--_gcd-input-min-height,auto);padding:var(--_gcd-input-padding,0)}}._547d86373d02e108__textarea{box-sizing:var(--_gcd-textarea-box-sizing,border-box);overflow:var(--_gcd-textarea-overflow,auto);resize:var(--_gcd-textarea-resize,block)}._8c15fd0ed9f28ba4__div{outline:var(--_gcd-div-outline,0 solid transparent)}p._43cec3e1eec1066d__p{font-size:var(--_gcd-p-font-size,13px);line-height:var(--_gcd-p-line-height,1.5);margin:var(--_gcd-p-margin,0)}:is(h1,h2,h3,h4,h5,h6).e97669c6d9a38497__heading{color:var(--_gcd-heading-color,var(--wpds-color-foreground-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-emphasis,600));margin:var(--_gcd-heading-margin,0)}._2c0831b0499dbd6e__a,._2c0831b0499dbd6e__a:is(:hover,:focus,:active){border-radius:var(--_gcd-a-border-radius,0);box-shadow:var(--_gcd-a-box-shadow,none);color:var(--_gcd-a-color,inherit);outline:var(--_gcd-a-outline,0 solid transparent);transition:var(--_gcd-a-transition,none)}.c59a0ebebd71fa4a__ol{list-style:var(--_gcd-ol-list-style,none);margin:var(--_gcd-ol-margin,0);padding-block:var(--_gcd-ol-padding-block,0);padding-inline:var(--_gcd-ol-padding-inline,0)}._46b5cb0c8e24e8c9__li{margin:var(--_gcd-li-margin,0)}"); |
| 1158 |
} |
| 1159 |
var global_css_defense_default2 = { "button": "_6defc79820e382c6__button", "input": "d2cff2e5dea83bd1__input", "textarea": "_547d86373d02e108__textarea", "div": "_8c15fd0ed9f28ba4__div", "p": "_43cec3e1eec1066d__p", "heading": "e97669c6d9a38497__heading", "a": "_2c0831b0499dbd6e__a", "ol": "c59a0ebebd71fa4a__ol", "li": "_46b5cb0c8e24e8c9__li" }; |
| 1160 |
var Button3 = (0, import_element3.forwardRef)( |
| 1161 |
function Button22({ |
| 1162 |
tone = "brand", |
| 1163 |
variant = "solid", |
| 1164 |
size = "default", |
| 1165 |
className, |
| 1166 |
focusableWhenDisabled = true, |
| 1167 |
disabled, |
| 1168 |
loading, |
| 1169 |
loadingAnnouncement = (0, import_i18n.__)("Loading"), |
| 1170 |
children, |
| 1171 |
...props |
| 1172 |
}, ref) { |
| 1173 |
const mergedClassName = clsx_default( |
| 1174 |
global_css_defense_default2.button, |
| 1175 |
resets_default["box-sizing"], |
| 1176 |
focus_module_default["outset-ring--focus-except-active"], |
| 1177 |
variant !== "unstyled" && style_default2.button, |
| 1178 |
style_default2[`is-${tone}`], |
| 1179 |
style_default2[`is-${variant}`], |
| 1180 |
style_default2[`is-${size}`], |
| 1181 |
loading && style_default2["is-loading"], |
| 1182 |
className |
| 1183 |
); |
| 1184 |
(0, import_element3.useEffect)(() => { |
| 1185 |
if (loading && loadingAnnouncement) { |
| 1186 |
speak(loadingAnnouncement); |
| 1187 |
} |
| 1188 |
}, [loading, loadingAnnouncement]); |
| 1189 |
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)( |
| 1190 |
Button, |
| 1191 |
{ |
| 1192 |
ref, |
| 1193 |
className: mergedClassName, |
| 1194 |
focusableWhenDisabled, |
| 1195 |
disabled: disabled ?? loading, |
| 1196 |
...props, |
| 1197 |
children |
| 1198 |
} |
| 1199 |
); |
| 1200 |
} |
| 1201 |
); |
| 1202 |
|
| 1203 |
// packages/ui/build-module/button/icon.mjs |
| 1204 |
var import_element4 = __toESM(require_element(), 1); |
| 1205 |
var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1); |
| 1206 |
var STYLE_HASH_ATTRIBUTE3 = "data-wp-hash"; |
| 1207 |
function getRuntime3() { |
| 1208 |
const globalScope = globalThis; |
| 1209 |
if (globalScope.__wpStyleRuntime) { |
| 1210 |
return globalScope.__wpStyleRuntime; |
| 1211 |
} |
| 1212 |
globalScope.__wpStyleRuntime = { |
| 1213 |
documents: /* @__PURE__ */ new Map(), |
| 1214 |
styles: /* @__PURE__ */ new Map(), |
| 1215 |
injectedStyles: /* @__PURE__ */ new WeakMap() |
| 1216 |
}; |
| 1217 |
if (typeof document !== "undefined") { |
| 1218 |
registerDocument3(document); |
| 1219 |
} |
| 1220 |
return globalScope.__wpStyleRuntime; |
| 1221 |
} |
| 1222 |
function documentContainsStyleHash3(targetDocument, hash) { |
| 1223 |
if (!targetDocument.head) { |
| 1224 |
return false; |
| 1225 |
} |
| 1226 |
for (const style of targetDocument.head.querySelectorAll( |
| 1227 |
`style[${STYLE_HASH_ATTRIBUTE3}]` |
| 1228 |
)) { |
| 1229 |
if (style.getAttribute(STYLE_HASH_ATTRIBUTE3) === hash) { |
| 1230 |
return true; |
| 1231 |
} |
| 1232 |
} |
| 1233 |
return false; |
| 1234 |
} |
| 1235 |
function injectStyle3(targetDocument, hash, css) { |
| 1236 |
if (!targetDocument.head) { |
| 1237 |
return; |
| 1238 |
} |
| 1239 |
const runtime = getRuntime3(); |
| 1240 |
let injectedStyles = runtime.injectedStyles.get(targetDocument); |
| 1241 |
if (!injectedStyles) { |
| 1242 |
injectedStyles = /* @__PURE__ */ new Set(); |
| 1243 |
runtime.injectedStyles.set(targetDocument, injectedStyles); |
| 1244 |
} |
| 1245 |
if (injectedStyles.has(hash)) { |
| 1246 |
return; |
| 1247 |
} |
| 1248 |
if (documentContainsStyleHash3(targetDocument, hash)) { |
| 1249 |
injectedStyles.add(hash); |
| 1250 |
return; |
| 1251 |
} |
| 1252 |
const style = targetDocument.createElement("style"); |
| 1253 |
style.setAttribute(STYLE_HASH_ATTRIBUTE3, hash); |
| 1254 |
style.appendChild(targetDocument.createTextNode(css)); |
| 1255 |
targetDocument.head.appendChild(style); |
| 1256 |
injectedStyles.add(hash); |
| 1257 |
} |
| 1258 |
function registerDocument3(targetDocument) { |
| 1259 |
const runtime = getRuntime3(); |
| 1260 |
runtime.documents.set( |
| 1261 |
targetDocument, |
| 1262 |
(runtime.documents.get(targetDocument) ?? 0) + 1 |
| 1263 |
); |
| 1264 |
for (const [hash, css] of runtime.styles) { |
| 1265 |
injectStyle3(targetDocument, hash, css); |
| 1266 |
} |
| 1267 |
return () => { |
| 1268 |
const count = runtime.documents.get(targetDocument); |
| 1269 |
if (count === void 0) { |
| 1270 |
return; |
| 1271 |
} |
| 1272 |
if (count <= 1) { |
| 1273 |
runtime.documents.delete(targetDocument); |
| 1274 |
return; |
| 1275 |
} |
| 1276 |
runtime.documents.set(targetDocument, count - 1); |
| 1277 |
}; |
| 1278 |
} |
| 1279 |
function registerStyle3(hash, css) { |
| 1280 |
const runtime = getRuntime3(); |
| 1281 |
runtime.styles.set(hash, css); |
| 1282 |
for (const targetDocument of runtime.documents.keys()) { |
| 1283 |
injectStyle3(targetDocument, hash, css); |
| 1284 |
} |
| 1285 |
} |
| 1286 |
if (typeof process === "undefined" || true) { |
| 1287 |
registerStyle3("effc4e3032", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._97b0fc33c028be1a__button,.abbb272e2ce49bd6__is-unstyled{appearance:none;padding:0}._97b0fc33c028be1a__button{--wp-ui-button-font-weight:var(--wpds-typography-font-weight-emphasis,600);--wp-ui-button-background-color:var(--wpds-color-background-interactive-brand-strong,var(--wp-admin-theme-color,#3858e9));--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-brand-strong-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 93%,#000));--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-brand-strong-disabled,#e6e6e6);--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-brand-strong,#fff);--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-brand-strong-active,#fff);--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-brand-strong-disabled,#8d8d8d);--wp-ui-button-padding-block:var(--wpds-dimension-padding-xs,4px);--wp-ui-button-padding-inline:var(--wpds-dimension-padding-md,12px);--wp-ui-button-height:var(--wpds-dimension-size-lg,40px);--wp-ui-button-aspect-ratio:auto;--wp-ui-button-font-size:var(--wpds-typography-font-size-md,13px);--wp-ui-button-min-width:calc(4ch + var(--wp-ui-button-padding-inline)*2);--wp-ui-button-icon-margin:calc((var(--wpds-dimension-size-2xs, 16px) - var(--wpds-dimension-size-sm, 24px))/2);--wp-ui-button-border-color:var(--wp-ui-button-background-color);--wp-ui-button-border-color-active:var(--wp-ui-button-background-color-active);--wp-ui-button-border-color-disabled:var(--wp-ui-button-background-color-disabled);--_gcd-button-font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);--_gcd-button-font-size:var(--wp-ui-button-font-size);--_gcd-button-font-weight:var(--wp-ui-button-font-weight);align-items:center;aspect-ratio:var(--wp-ui-button-aspect-ratio);background-clip:border-box;background-color:var(--wp-ui-button-background-color);border-color:var(--wp-ui-button-border-color);border-radius:var(--wpds-border-radius-sm,2px);border-style:solid;border-width:1px;color:var(--wp-ui-button-foreground-color);display:inline-flex;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wp-ui-button-font-size);font-weight:var(--wp-ui-button-font-weight);gap:var(--wpds-dimension-gap-sm,8px);justify-content:center;line-height:var(--wpds-typography-line-height-sm,20px);max-width:100%;min-height:var(--wp-ui-button-height);min-width:var(--wp-ui-button-min-width);overflow-wrap:anywhere;padding-block:var(--wp-ui-button-padding-block);padding-inline:var(--wp-ui-button-padding-inline);position:relative;text-align:center;text-decoration:none;&:not([data-disabled]){cursor:var(--wpds-cursor-control,pointer)}@media not (prefers-reduced-motion){transition:color .1s ease-out;*{transition:opacity .1s ease-out}}&[href]{cursor:pointer}[href]{color:inherit;text-decoration:inherit}&:not([data-disabled]):is(:hover,:active,:focus){background-color:var(--wp-ui-button-background-color-active);border-color:var(--wp-ui-button-border-color-active);color:var(--wp-ui-button-foreground-color-active)}&[data-disabled]:not(._914b42f315c0e580__is-loading){background-color:var(--wp-ui-button-background-color-disabled);border-color:var(--wp-ui-button-border-color-disabled);color:var(--wp-ui-button-foreground-color-disabled);@media (forced-colors:active){border-bottom-color:GrayText;border-left-color:GrayText;border-right-color:GrayText;border-top-color:GrayText;color:GrayText}}&:before{aspect-ratio:1;border:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid;border-block-end-color:transparent;border-block-start-color:var(--wp-ui-button-foreground-color);border-inline-end-color:var(--wp-ui-button-foreground-color);border-inline-start-color:transparent;border-radius:50%;box-sizing:border-box;content:"";display:block;height:var(--wp-ui-button-font-size);left:50%;opacity:0;pointer-events:none;position:absolute;top:50%;transform:translate(-50%,-50%);@media not (prefers-reduced-motion){transition:opacity .1s ease-out}@media (forced-colors:active){border-block-end-style:none;border-bottom-color:ButtonText;border-inline-start-style:none;border-left-color:ButtonText;border-right-color:ButtonText;border-top-color:ButtonText}}}._908205475f9f2a92__is-small{--wp-ui-button-padding-block:0px;--wp-ui-button-padding-inline:var(--wpds-dimension-padding-sm,8px);--wp-ui-button-height:var(--wpds-dimension-size-sm,24px)}._9f6fc6553aeb36fe__icon{margin:var(--wp-ui-button-icon-margin)}.dd460c965226cc77__is-brand{&._62d5a778b7b258ee__is-outline,&.ad0619a3217c6a5b__is-minimal{--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-brand,var(--wp-admin-theme-color,#3858e9));--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 52%,#000));--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-brand-disabled,#8d8d8d)}&._62d5a778b7b258ee__is-outline{--wp-ui-button-background-color:var(--wpds-color-background-interactive-brand-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-brand-weak-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 12%,#fff));--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-brand-weak-disabled,#0000);--wp-ui-button-border-color:var(--wpds-color-stroke-interactive-brand,var(--wp-admin-theme-color,#3858e9));--wp-ui-button-border-color-active:var(--wpds-color-stroke-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 85%,#000));--wp-ui-button-border-color-disabled:var(--wpds-color-stroke-interactive-brand-disabled,#dbdbdb)}&.ad0619a3217c6a5b__is-minimal{--wp-ui-button-background-color:var(--wpds-color-background-interactive-brand-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-brand-weak-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 12%,#fff));--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-brand-weak-disabled,#0000)}}.e722a8f96726aa99__is-neutral{&.ad0619a3217c6a5b__is-minimal[aria-pressed=true],&.b50b3358c5fb4d0b__is-solid{--wp-ui-button-background-color:var(--wpds-color-background-interactive-neutral-strong,#2d2d2d);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-neutral-strong-active,#1e1e1e);--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-neutral-strong-disabled,#e6e6e6);--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-neutral-strong,#f0f0f0);--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-neutral-strong-active,#f0f0f0);--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-neutral-strong-disabled,#8d8d8d)}&._62d5a778b7b258ee__is-outline,&.ad0619a3217c6a5b__is-minimal:not([aria-pressed=true]){--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-neutral-active,#1e1e1e);--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d)}&._62d5a778b7b258ee__is-outline{--wp-ui-button-background-color:var(--wpds-color-background-interactive-neutral-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-neutral-weak-active,#ededed);--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-neutral-weak-disabled,#0000);--wp-ui-button-border-color:var(--wpds-color-stroke-interactive-neutral,#8d8d8d);--wp-ui-button-border-color-active:var(--wpds-color-stroke-interactive-neutral-active,#6e6e6e);--wp-ui-button-border-color-disabled:var(--wpds-color-stroke-interactive-neutral-disabled,#dbdbdb)}&.ad0619a3217c6a5b__is-minimal:not([aria-pressed=true]){--wp-ui-button-background-color:var(--wpds-color-background-interactive-neutral-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-neutral-weak-active,#ededed);--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-neutral-weak-disabled,#0000)}}.abbb272e2ce49bd6__is-unstyled{background:none;border:none;min-width:unset}.cf59cf1b69629838__is-compact{--wp-ui-button-height:var(--wpds-dimension-size-md,32px)}._914b42f315c0e580__is-loading:not(.abbb272e2ce49bd6__is-unstyled){color:transparent;&:not([data-disabled]):is(:hover,:active,:focus){color:transparent}@media (forced-colors:active){color:ButtonFace}*{opacity:0}&:before{opacity:1;transition-delay:.05s;@media not (prefers-reduced-motion){animation:_5a1d53da6f830c8d__loading-animation 1s linear infinite}}}}@keyframes _5a1d53da6f830c8d__loading-animation{0%{transform:translate(-50%,-50%) rotate(0deg)}to{transform:translate(-50%,-50%) rotate(1turn)}}}'); |
| 1288 |
} |
| 1289 |
var style_default3 = { "button": "_97b0fc33c028be1a__button", "is-unstyled": "abbb272e2ce49bd6__is-unstyled", "is-loading": "_914b42f315c0e580__is-loading", "is-small": "_908205475f9f2a92__is-small", "icon": "_9f6fc6553aeb36fe__icon", "is-brand": "dd460c965226cc77__is-brand", "is-outline": "_62d5a778b7b258ee__is-outline", "is-minimal": "ad0619a3217c6a5b__is-minimal", "is-neutral": "e722a8f96726aa99__is-neutral", "is-solid": "b50b3358c5fb4d0b__is-solid", "is-compact": "cf59cf1b69629838__is-compact", "loading-animation": "_5a1d53da6f830c8d__loading-animation" }; |
| 1290 |
var ButtonIcon = (0, import_element4.forwardRef)( |
| 1291 |
function ButtonIcon2({ className, icon, ...props }, ref) { |
| 1292 |
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)( |
| 1293 |
Icon, |
| 1294 |
{ |
| 1295 |
ref, |
| 1296 |
icon, |
| 1297 |
className: clsx_default(style_default3.icon, className), |
| 1298 |
size: 24, |
| 1299 |
...props |
| 1300 |
} |
| 1301 |
); |
| 1302 |
} |
| 1303 |
); |
| 1304 |
|
| 1305 |
// packages/ui/build-module/button/index.mjs |
| 1306 |
ButtonIcon.displayName = "Button.Icon"; |
| 1307 |
var Button4 = Object.assign(Button3, { |
| 1308 |
/** |
| 1309 |
* An icon component specifically designed to work well when rendered inside |
| 1310 |
* a `Button` component. |
| 1311 |
*/ |
| 1312 |
Icon: ButtonIcon |
| 1313 |
}); |
| 1314 |
|
| 1315 |
// packages/ui/build-module/stack/stack.mjs |
| 1316 |
var import_element5 = __toESM(require_element(), 1); |
| 1317 |
var STYLE_HASH_ATTRIBUTE4 = "data-wp-hash"; |
| 1318 |
function getRuntime4() { |
| 1319 |
const globalScope = globalThis; |
| 1320 |
if (globalScope.__wpStyleRuntime) { |
| 1321 |
return globalScope.__wpStyleRuntime; |
| 1322 |
} |
| 1323 |
globalScope.__wpStyleRuntime = { |
| 1324 |
documents: /* @__PURE__ */ new Map(), |
| 1325 |
styles: /* @__PURE__ */ new Map(), |
| 1326 |
injectedStyles: /* @__PURE__ */ new WeakMap() |
| 1327 |
}; |
| 1328 |
if (typeof document !== "undefined") { |
| 1329 |
registerDocument4(document); |
| 1330 |
} |
| 1331 |
return globalScope.__wpStyleRuntime; |
| 1332 |
} |
| 1333 |
function documentContainsStyleHash4(targetDocument, hash) { |
| 1334 |
if (!targetDocument.head) { |
| 1335 |
return false; |
| 1336 |
} |
| 1337 |
for (const style of targetDocument.head.querySelectorAll( |
| 1338 |
`style[${STYLE_HASH_ATTRIBUTE4}]` |
| 1339 |
)) { |
| 1340 |
if (style.getAttribute(STYLE_HASH_ATTRIBUTE4) === hash) { |
| 1341 |
return true; |
| 1342 |
} |
| 1343 |
} |
| 1344 |
return false; |
| 1345 |
} |
| 1346 |
function injectStyle4(targetDocument, hash, css) { |
| 1347 |
if (!targetDocument.head) { |
| 1348 |
return; |
| 1349 |
} |
| 1350 |
const runtime = getRuntime4(); |
| 1351 |
let injectedStyles = runtime.injectedStyles.get(targetDocument); |
| 1352 |
if (!injectedStyles) { |
| 1353 |
injectedStyles = /* @__PURE__ */ new Set(); |
| 1354 |
runtime.injectedStyles.set(targetDocument, injectedStyles); |
| 1355 |
} |
| 1356 |
if (injectedStyles.has(hash)) { |
| 1357 |
return; |
| 1358 |
} |
| 1359 |
if (documentContainsStyleHash4(targetDocument, hash)) { |
| 1360 |
injectedStyles.add(hash); |
| 1361 |
return; |
| 1362 |
} |
| 1363 |
const style = targetDocument.createElement("style"); |
| 1364 |
style.setAttribute(STYLE_HASH_ATTRIBUTE4, hash); |
| 1365 |
style.appendChild(targetDocument.createTextNode(css)); |
| 1366 |
targetDocument.head.appendChild(style); |
| 1367 |
injectedStyles.add(hash); |
| 1368 |
} |
| 1369 |
function registerDocument4(targetDocument) { |
| 1370 |
const runtime = getRuntime4(); |
| 1371 |
runtime.documents.set( |
| 1372 |
targetDocument, |
| 1373 |
(runtime.documents.get(targetDocument) ?? 0) + 1 |
| 1374 |
); |
| 1375 |
for (const [hash, css] of runtime.styles) { |
| 1376 |
injectStyle4(targetDocument, hash, css); |
| 1377 |
} |
| 1378 |
return () => { |
| 1379 |
const count = runtime.documents.get(targetDocument); |
| 1380 |
if (count === void 0) { |
| 1381 |
return; |
| 1382 |
} |
| 1383 |
if (count <= 1) { |
| 1384 |
runtime.documents.delete(targetDocument); |
| 1385 |
return; |
| 1386 |
} |
| 1387 |
runtime.documents.set(targetDocument, count - 1); |
| 1388 |
}; |
| 1389 |
} |
| 1390 |
function registerStyle4(hash, css) { |
| 1391 |
const runtime = getRuntime4(); |
| 1392 |
runtime.styles.set(hash, css); |
| 1393 |
for (const targetDocument of runtime.documents.keys()) { |
| 1394 |
injectStyle4(targetDocument, hash, css); |
| 1395 |
} |
| 1396 |
} |
| 1397 |
if (typeof process === "undefined" || true) { |
| 1398 |
registerStyle4("32aba35fe1", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._19ce0419607e1896__stack{display:flex}}}"); |
| 1399 |
} |
| 1400 |
var style_default4 = { "stack": "_19ce0419607e1896__stack" }; |
| 1401 |
var gapTokens = { |
| 1402 |
xs: "var(--wpds-dimension-gap-xs, 4px)", |
| 1403 |
sm: "var(--wpds-dimension-gap-sm, 8px)", |
| 1404 |
md: "var(--wpds-dimension-gap-md, 12px)", |
| 1405 |
lg: "var(--wpds-dimension-gap-lg, 16px)", |
| 1406 |
xl: "var(--wpds-dimension-gap-xl, 24px)", |
| 1407 |
"2xl": "var(--wpds-dimension-gap-2xl, 32px)", |
| 1408 |
"3xl": "var(--wpds-dimension-gap-3xl, 40px)" |
| 1409 |
}; |
| 1410 |
var Stack = (0, import_element5.forwardRef)(function Stack2({ direction, gap, align, justify, wrap, render, ...props }, ref) { |
| 1411 |
const style = { |
| 1412 |
gap: gap && gapTokens[gap], |
| 1413 |
alignItems: align, |
| 1414 |
justifyContent: justify, |
| 1415 |
flexDirection: direction, |
| 1416 |
flexWrap: wrap |
| 1417 |
}; |
| 1418 |
const element = useRender({ |
| 1419 |
render, |
| 1420 |
ref, |
| 1421 |
props: mergeProps(props, { style, className: style_default4.stack }) |
| 1422 |
}); |
| 1423 |
return element; |
| 1424 |
}); |
| 1425 |
|
| 1426 |
// packages/style-runtime/src/index.ts |
| 1427 |
var STYLE_HASH_ATTRIBUTE5 = "data-wp-hash"; |
| 1428 |
function getRuntime5() { |
| 1429 |
const globalScope = globalThis; |
| 1430 |
if (globalScope.__wpStyleRuntime) { |
| 1431 |
return globalScope.__wpStyleRuntime; |
| 1432 |
} |
| 1433 |
globalScope.__wpStyleRuntime = { |
| 1434 |
documents: /* @__PURE__ */ new Map(), |
| 1435 |
styles: /* @__PURE__ */ new Map(), |
| 1436 |
injectedStyles: /* @__PURE__ */ new WeakMap() |
| 1437 |
}; |
| 1438 |
if (typeof document !== "undefined") { |
| 1439 |
registerDocument5(document); |
| 1440 |
} |
| 1441 |
return globalScope.__wpStyleRuntime; |
| 1442 |
} |
| 1443 |
function documentContainsStyleHash5(targetDocument, hash) { |
| 1444 |
if (!targetDocument.head) { |
| 1445 |
return false; |
| 1446 |
} |
| 1447 |
for (const style of targetDocument.head.querySelectorAll( |
| 1448 |
`style[${STYLE_HASH_ATTRIBUTE5}]` |
| 1449 |
)) { |
| 1450 |
if (style.getAttribute(STYLE_HASH_ATTRIBUTE5) === hash) { |
| 1451 |
return true; |
| 1452 |
} |
| 1453 |
} |
| 1454 |
return false; |
| 1455 |
} |
| 1456 |
function injectStyle5(targetDocument, hash, css) { |
| 1457 |
if (!targetDocument.head) { |
| 1458 |
return; |
| 1459 |
} |
| 1460 |
const runtime = getRuntime5(); |
| 1461 |
let injectedStyles = runtime.injectedStyles.get(targetDocument); |
| 1462 |
if (!injectedStyles) { |
| 1463 |
injectedStyles = /* @__PURE__ */ new Set(); |
| 1464 |
runtime.injectedStyles.set(targetDocument, injectedStyles); |
| 1465 |
} |
| 1466 |
if (injectedStyles.has(hash)) { |
| 1467 |
return; |
| 1468 |
} |
| 1469 |
if (documentContainsStyleHash5(targetDocument, hash)) { |
| 1470 |
injectedStyles.add(hash); |
| 1471 |
return; |
| 1472 |
} |
| 1473 |
const style = targetDocument.createElement("style"); |
| 1474 |
style.setAttribute(STYLE_HASH_ATTRIBUTE5, hash); |
| 1475 |
style.appendChild(targetDocument.createTextNode(css)); |
| 1476 |
targetDocument.head.appendChild(style); |
| 1477 |
injectedStyles.add(hash); |
| 1478 |
} |
| 1479 |
function registerDocument5(targetDocument) { |
| 1480 |
const runtime = getRuntime5(); |
| 1481 |
runtime.documents.set( |
| 1482 |
targetDocument, |
| 1483 |
(runtime.documents.get(targetDocument) ?? 0) + 1 |
| 1484 |
); |
| 1485 |
for (const [hash, css] of runtime.styles) { |
| 1486 |
injectStyle5(targetDocument, hash, css); |
| 1487 |
} |
| 1488 |
return () => { |
| 1489 |
const count = runtime.documents.get(targetDocument); |
| 1490 |
if (count === void 0) { |
| 1491 |
return; |
| 1492 |
} |
| 1493 |
if (count <= 1) { |
| 1494 |
runtime.documents.delete(targetDocument); |
| 1495 |
return; |
| 1496 |
} |
| 1497 |
runtime.documents.set(targetDocument, count - 1); |
| 1498 |
}; |
| 1499 |
} |
| 1500 |
function registerStyle5(hash, css) { |
| 1501 |
const runtime = getRuntime5(); |
| 1502 |
runtime.styles.set(hash, css); |
| 1503 |
for (const targetDocument of runtime.documents.keys()) { |
| 1504 |
injectStyle5(targetDocument, hash, css); |
| 1505 |
} |
| 1506 |
} |
| 1507 |
|
| 1508 |
// widgets/site-preview/style.module.css |
| 1509 |
if (typeof process === "undefined" || true) { |
| 1510 |
registerStyle5("32999722ac", "._528f94b7f3c8f19c__container{aspect-ratio:3/4;height:100%;overflow:hidden;width:100%}._528700ec847f17e8__url-bar{background:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);border-block-end:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);flex-shrink:0}._528700ec847f17e8__url-bar,.cc99bc5269858202__url-field{padding:var(--wpds-dimension-padding-xs,4px) var(--wpds-dimension-padding-sm,8px)}.cc99bc5269858202__url-field{background:var(--wpds-color-background-surface-neutral-strong,#fff);border:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);border-radius:var(--wpds-border-radius-lg,8px);min-width:0}._24307c22e8fb0ba6__url-favicon{flex-shrink:0;height:var(--wpds-typography-font-size-xs,11px);object-fit:contain;width:var(--wpds-typography-font-size-xs,11px)}.a4338ce996962b13__url-icon{color:var(--wpds-color-foreground-content-neutral-weak,#707070);flex-shrink:0}.e9cf06a1ff0e18b0__url-text{color:var(--wpds-color-foreground-content-neutral,#1e1e1e);flex:1;font-size:var(--wpds-typography-font-size-xs,11px);line-height:var(--wpds-typography-line-height-xs,16px);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._1595014c324a5369__preview-wrap{flex:1;min-height:0;position:relative}.c1322576565e9858__loading{inset:0;position:absolute;z-index:1}._80c298aa7d9d30b1__iframe{inset-block-start:0;inset-inline-start:50%;min-height:375%;position:absolute;transform:translate(-50%) scale(.4);transform-origin:center top;width:250%}._017ce5123c2e1282__overlay{backdrop-filter:blur(1px);background:color-mix(in srgb,var(--wpds-color-foreground-content-neutral-weak,#707070) 20%,transparent);inset:0;opacity:0;position:absolute}._1595014c324a5369__preview-wrap:focus-within ._017ce5123c2e1282__overlay,._1595014c324a5369__preview-wrap:hover ._017ce5123c2e1282__overlay{opacity:1}@media not (prefers-reduced-motion){._017ce5123c2e1282__overlay{transition:opacity var(--wpds-motion-duration-lg,.3s) var(--wpds-motion-easing-expressive,cubic-bezier(.25,0,0,1))}}"); |
| 1511 |
} |
| 1512 |
var style_default5 = { "container": "_528f94b7f3c8f19c__container", "url-bar": "_528700ec847f17e8__url-bar", "url-field": "cc99bc5269858202__url-field", "url-favicon": "_24307c22e8fb0ba6__url-favicon", "url-icon": "a4338ce996962b13__url-icon", "url-text": "e9cf06a1ff0e18b0__url-text", "preview-wrap": "_1595014c324a5369__preview-wrap", "loading": "c1322576565e9858__loading", "iframe": "_80c298aa7d9d30b1__iframe", "overlay": "_017ce5123c2e1282__overlay" }; |
| 1513 |
|
| 1514 |
// widgets/site-preview/render.tsx |
| 1515 |
var import_jsx_runtime5 = __toESM(require_jsx_runtime()); |
| 1516 |
function PreviewUrlBar({ |
| 1517 |
siteUrl, |
| 1518 |
siteIconUrl |
| 1519 |
}) { |
| 1520 |
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: style_default5["url-bar"], children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)( |
| 1521 |
Stack, |
| 1522 |
{ |
| 1523 |
direction: "row", |
| 1524 |
align: "center", |
| 1525 |
gap: "xs", |
| 1526 |
className: style_default5["url-field"], |
| 1527 |
children: [ |
| 1528 |
siteIconUrl ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)( |
| 1529 |
"img", |
| 1530 |
{ |
| 1531 |
className: style_default5["url-favicon"], |
| 1532 |
src: siteIconUrl, |
| 1533 |
alt: "" |
| 1534 |
} |
| 1535 |
) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)( |
| 1536 |
Icon, |
| 1537 |
{ |
| 1538 |
className: style_default5["url-icon"], |
| 1539 |
icon: wordpress_default, |
| 1540 |
size: 12 |
| 1541 |
} |
| 1542 |
), |
| 1543 |
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { className: style_default5["url-text"], children: siteUrl }) |
| 1544 |
] |
| 1545 |
} |
| 1546 |
) }); |
| 1547 |
} |
| 1548 |
function SitePreview() { |
| 1549 |
const [isIframeLoading, setIsIframeLoading] = (0, import_element6.useState)(true); |
| 1550 |
const [isVisitLoading, setIsVisitLoading] = (0, import_element6.useState)(false); |
| 1551 |
const [isEditLoading, setIsEditLoading] = (0, import_element6.useState)(false); |
| 1552 |
const { siteUrl, siteIconUrl } = (0, import_data.useSelect)((select) => { |
| 1553 |
const site = select(import_core_data.store).getEntityRecord( |
| 1554 |
"root", |
| 1555 |
"site", |
| 1556 |
void 0 |
| 1557 |
); |
| 1558 |
const base = select(import_core_data.store).getEntityRecord("root", "__unstableBase", void 0); |
| 1559 |
return { |
| 1560 |
siteUrl: site?.url, |
| 1561 |
siteIconUrl: base?.site_icon_url |
| 1562 |
}; |
| 1563 |
}, []); |
| 1564 |
const isBlockTheme = (0, import_data.useSelect)( |
| 1565 |
(select) => !!select(import_core_data.store).getCurrentTheme()?.is_block_theme, |
| 1566 |
[] |
| 1567 |
); |
| 1568 |
(0, import_element6.useEffect)(() => { |
| 1569 |
setIsIframeLoading(true); |
| 1570 |
}, [siteUrl]); |
| 1571 |
if (!siteUrl) { |
| 1572 |
return null; |
| 1573 |
} |
| 1574 |
const src = (0, import_url.addQueryArgs)(siteUrl, { |
| 1575 |
wp_site_preview: 1 |
| 1576 |
}); |
| 1577 |
const editUrl = isBlockTheme ? "site-editor.php" : "customize.php"; |
| 1578 |
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Stack, { direction: "column", className: style_default5.container, children: [ |
| 1579 |
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(PreviewUrlBar, { siteUrl, siteIconUrl }), |
| 1580 |
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: style_default5["preview-wrap"], children: [ |
| 1581 |
isIframeLoading && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)( |
| 1582 |
Stack, |
| 1583 |
{ |
| 1584 |
direction: "column", |
| 1585 |
align: "center", |
| 1586 |
justify: "center", |
| 1587 |
className: style_default5.loading, |
| 1588 |
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_components.Spinner, {}) |
| 1589 |
} |
| 1590 |
), |
| 1591 |
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)( |
| 1592 |
"iframe", |
| 1593 |
{ |
| 1594 |
className: style_default5.iframe, |
| 1595 |
loading: "lazy", |
| 1596 |
scrolling: "no", |
| 1597 |
title: (0, import_i18n2.__)("Site preview"), |
| 1598 |
src, |
| 1599 |
onLoad: () => setIsIframeLoading(false), |
| 1600 |
inert: "true" |
| 1601 |
} |
| 1602 |
), |
| 1603 |
!isIframeLoading && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)( |
| 1604 |
Stack, |
| 1605 |
{ |
| 1606 |
direction: "row", |
| 1607 |
align: "center", |
| 1608 |
justify: "center", |
| 1609 |
gap: "sm", |
| 1610 |
className: style_default5.overlay, |
| 1611 |
children: [ |
| 1612 |
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)( |
| 1613 |
Button4, |
| 1614 |
{ |
| 1615 |
variant: "solid", |
| 1616 |
tone: "neutral", |
| 1617 |
loading: isVisitLoading, |
| 1618 |
onClick: () => { |
| 1619 |
setIsVisitLoading(true); |
| 1620 |
window.location.href = siteUrl; |
| 1621 |
}, |
| 1622 |
children: (0, import_i18n2.__)("Visit") |
| 1623 |
} |
| 1624 |
), |
| 1625 |
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)( |
| 1626 |
Button4, |
| 1627 |
{ |
| 1628 |
variant: "solid", |
| 1629 |
tone: "brand", |
| 1630 |
loading: isEditLoading, |
| 1631 |
onClick: () => { |
| 1632 |
setIsEditLoading(true); |
| 1633 |
window.location.href = editUrl; |
| 1634 |
}, |
| 1635 |
children: (0, import_i18n2.__)("Edit site") |
| 1636 |
} |
| 1637 |
) |
| 1638 |
] |
| 1639 |
} |
| 1640 |
) |
| 1641 |
] }) |
| 1642 |
] }); |
| 1643 |
} |
| 1644 |
export { |
| 1645 |
SitePreview as default |
| 1646 |
}; |
| 1647 |
|