| 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 |
// vendor-external:react |
| 35 |
var require_react = __commonJS({ |
| 36 |
"vendor-external:react"(exports, module) { |
| 37 |
module.exports = window.React; |
| 38 |
} |
| 39 |
}); |
| 40 |
|
| 41 |
// vendor-external:react/jsx-runtime |
| 42 |
var require_jsx_runtime = __commonJS({ |
| 43 |
"vendor-external:react/jsx-runtime"(exports, module) { |
| 44 |
module.exports = window.ReactJSXRuntime; |
| 45 |
} |
| 46 |
}); |
| 47 |
|
| 48 |
// node_modules/clsx/dist/clsx.mjs |
| 49 |
function r(e) { |
| 50 |
var t, f, n = ""; |
| 51 |
if ("string" == typeof e || "number" == typeof e) n += e; |
| 52 |
else if ("object" == typeof e) if (Array.isArray(e)) { |
| 53 |
var o = e.length; |
| 54 |
for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f); |
| 55 |
} else for (f in e) e[f] && (n && (n += " "), n += f); |
| 56 |
return n; |
| 57 |
} |
| 58 |
function clsx() { |
| 59 |
for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t); |
| 60 |
return n; |
| 61 |
} |
| 62 |
var clsx_default = clsx; |
| 63 |
|
| 64 |
// node_modules/@base-ui/utils/esm/useRefWithInit.js |
| 65 |
var React = __toESM(require_react(), 1); |
| 66 |
var UNINITIALIZED = {}; |
| 67 |
function useRefWithInit(init, initArg) { |
| 68 |
const ref = React.useRef(UNINITIALIZED); |
| 69 |
if (ref.current === UNINITIALIZED) { |
| 70 |
ref.current = init(initArg); |
| 71 |
} |
| 72 |
return ref; |
| 73 |
} |
| 74 |
|
| 75 |
// node_modules/@base-ui/utils/esm/warn.js |
| 76 |
var set; |
| 77 |
if (true) { |
| 78 |
set = /* @__PURE__ */ new Set(); |
| 79 |
} |
| 80 |
function warn(...messages) { |
| 81 |
if (true) { |
| 82 |
const messageKey = messages.join(" "); |
| 83 |
if (!set.has(messageKey)) { |
| 84 |
set.add(messageKey); |
| 85 |
console.warn(`Base UI: ${messageKey}`); |
| 86 |
} |
| 87 |
} |
| 88 |
} |
| 89 |
|
| 90 |
// node_modules/@base-ui/react/esm/internals/useRenderElement.js |
| 91 |
var React4 = __toESM(require_react(), 1); |
| 92 |
|
| 93 |
// node_modules/@base-ui/utils/esm/useMergedRefs.js |
| 94 |
function useMergedRefs(a, b, c, d) { |
| 95 |
const forkRef = useRefWithInit(createForkRef).current; |
| 96 |
if (didChange(forkRef, a, b, c, d)) { |
| 97 |
update(forkRef, [a, b, c, d]); |
| 98 |
} |
| 99 |
return forkRef.callback; |
| 100 |
} |
| 101 |
function useMergedRefsN(refs) { |
| 102 |
const forkRef = useRefWithInit(createForkRef).current; |
| 103 |
if (didChangeN(forkRef, refs)) { |
| 104 |
update(forkRef, refs); |
| 105 |
} |
| 106 |
return forkRef.callback; |
| 107 |
} |
| 108 |
function createForkRef() { |
| 109 |
return { |
| 110 |
callback: null, |
| 111 |
cleanup: null, |
| 112 |
refs: [] |
| 113 |
}; |
| 114 |
} |
| 115 |
function didChange(forkRef, a, b, c, d) { |
| 116 |
return forkRef.refs[0] !== a || forkRef.refs[1] !== b || forkRef.refs[2] !== c || forkRef.refs[3] !== d; |
| 117 |
} |
| 118 |
function didChangeN(forkRef, newRefs) { |
| 119 |
return forkRef.refs.length !== newRefs.length || forkRef.refs.some((ref, index) => ref !== newRefs[index]); |
| 120 |
} |
| 121 |
function update(forkRef, refs) { |
| 122 |
forkRef.refs = refs; |
| 123 |
if (refs.every((ref) => ref == null)) { |
| 124 |
forkRef.callback = null; |
| 125 |
return; |
| 126 |
} |
| 127 |
forkRef.callback = (instance) => { |
| 128 |
if (forkRef.cleanup) { |
| 129 |
forkRef.cleanup(); |
| 130 |
forkRef.cleanup = null; |
| 131 |
} |
| 132 |
if (instance != null) { |
| 133 |
const cleanupCallbacks = Array(refs.length).fill(null); |
| 134 |
for (let i = 0; i < refs.length; i += 1) { |
| 135 |
const ref = refs[i]; |
| 136 |
if (ref == null) { |
| 137 |
continue; |
| 138 |
} |
| 139 |
switch (typeof ref) { |
| 140 |
case "function": { |
| 141 |
const refCleanup = ref(instance); |
| 142 |
if (typeof refCleanup === "function") { |
| 143 |
cleanupCallbacks[i] = refCleanup; |
| 144 |
} |
| 145 |
break; |
| 146 |
} |
| 147 |
case "object": { |
| 148 |
ref.current = instance; |
| 149 |
break; |
| 150 |
} |
| 151 |
default: |
| 152 |
} |
| 153 |
} |
| 154 |
forkRef.cleanup = () => { |
| 155 |
for (let i = 0; i < refs.length; i += 1) { |
| 156 |
const ref = refs[i]; |
| 157 |
if (ref == null) { |
| 158 |
continue; |
| 159 |
} |
| 160 |
switch (typeof ref) { |
| 161 |
case "function": { |
| 162 |
const cleanupCallback = cleanupCallbacks[i]; |
| 163 |
if (typeof cleanupCallback === "function") { |
| 164 |
cleanupCallback(); |
| 165 |
} else { |
| 166 |
ref(null); |
| 167 |
} |
| 168 |
break; |
| 169 |
} |
| 170 |
case "object": { |
| 171 |
ref.current = null; |
| 172 |
break; |
| 173 |
} |
| 174 |
default: |
| 175 |
} |
| 176 |
} |
| 177 |
}; |
| 178 |
} |
| 179 |
}; |
| 180 |
} |
| 181 |
|
| 182 |
// node_modules/@base-ui/utils/esm/getReactElementRef.js |
| 183 |
var React3 = __toESM(require_react(), 1); |
| 184 |
|
| 185 |
// node_modules/@base-ui/utils/esm/reactVersion.js |
| 186 |
var React2 = __toESM(require_react(), 1); |
| 187 |
var majorVersion = parseInt(React2.version, 10); |
| 188 |
function isReactVersionAtLeast(reactVersionToCheck) { |
| 189 |
return majorVersion >= reactVersionToCheck; |
| 190 |
} |
| 191 |
|
| 192 |
// node_modules/@base-ui/utils/esm/getReactElementRef.js |
| 193 |
function getReactElementRef(element) { |
| 194 |
if (!/* @__PURE__ */ React3.isValidElement(element)) { |
| 195 |
return null; |
| 196 |
} |
| 197 |
const reactElement = element; |
| 198 |
const propsWithRef = reactElement.props; |
| 199 |
return (isReactVersionAtLeast(19) ? propsWithRef?.ref : reactElement.ref) ?? null; |
| 200 |
} |
| 201 |
|
| 202 |
// node_modules/@base-ui/utils/esm/mergeObjects.js |
| 203 |
function mergeObjects(a, b) { |
| 204 |
if (a && !b) { |
| 205 |
return a; |
| 206 |
} |
| 207 |
if (!a && b) { |
| 208 |
return b; |
| 209 |
} |
| 210 |
if (a || b) { |
| 211 |
return { |
| 212 |
...a, |
| 213 |
...b |
| 214 |
}; |
| 215 |
} |
| 216 |
return void 0; |
| 217 |
} |
| 218 |
|
| 219 |
// node_modules/@base-ui/utils/esm/empty.js |
| 220 |
var EMPTY_ARRAY = Object.freeze([]); |
| 221 |
var EMPTY_OBJECT = Object.freeze({}); |
| 222 |
|
| 223 |
// node_modules/@base-ui/react/esm/internals/getStateAttributesProps.js |
| 224 |
function getStateAttributesProps(state, customMapping) { |
| 225 |
const props = {}; |
| 226 |
for (const key in state) { |
| 227 |
const value = state[key]; |
| 228 |
if (customMapping?.hasOwnProperty(key)) { |
| 229 |
const customProps = customMapping[key](value); |
| 230 |
if (customProps != null) { |
| 231 |
Object.assign(props, customProps); |
| 232 |
} |
| 233 |
continue; |
| 234 |
} |
| 235 |
if (value === true) { |
| 236 |
props[`data-${key.toLowerCase()}`] = ""; |
| 237 |
} else if (value) { |
| 238 |
props[`data-${key.toLowerCase()}`] = value.toString(); |
| 239 |
} |
| 240 |
} |
| 241 |
return props; |
| 242 |
} |
| 243 |
|
| 244 |
// node_modules/@base-ui/react/esm/utils/resolveClassName.js |
| 245 |
function resolveClassName(className, state) { |
| 246 |
return typeof className === "function" ? className(state) : className; |
| 247 |
} |
| 248 |
|
| 249 |
// node_modules/@base-ui/react/esm/utils/resolveStyle.js |
| 250 |
function resolveStyle(style, state) { |
| 251 |
return typeof style === "function" ? style(state) : style; |
| 252 |
} |
| 253 |
|
| 254 |
// node_modules/@base-ui/react/esm/merge-props/mergeProps.js |
| 255 |
var EMPTY_PROPS = {}; |
| 256 |
function mergeProps(a, b, c, d, e) { |
| 257 |
if (!c && !d && !e && !a) { |
| 258 |
return createInitialMergedProps(b); |
| 259 |
} |
| 260 |
let merged = createInitialMergedProps(a); |
| 261 |
if (b) { |
| 262 |
merged = mergeInto(merged, b); |
| 263 |
} |
| 264 |
if (c) { |
| 265 |
merged = mergeInto(merged, c); |
| 266 |
} |
| 267 |
if (d) { |
| 268 |
merged = mergeInto(merged, d); |
| 269 |
} |
| 270 |
if (e) { |
| 271 |
merged = mergeInto(merged, e); |
| 272 |
} |
| 273 |
return merged; |
| 274 |
} |
| 275 |
function mergePropsN(props) { |
| 276 |
if (props.length === 0) { |
| 277 |
return EMPTY_PROPS; |
| 278 |
} |
| 279 |
if (props.length === 1) { |
| 280 |
return createInitialMergedProps(props[0]); |
| 281 |
} |
| 282 |
let merged = createInitialMergedProps(props[0]); |
| 283 |
for (let i = 1; i < props.length; i += 1) { |
| 284 |
merged = mergeInto(merged, props[i]); |
| 285 |
} |
| 286 |
return merged; |
| 287 |
} |
| 288 |
function createInitialMergedProps(inputProps) { |
| 289 |
if (isPropsGetter(inputProps)) { |
| 290 |
return { |
| 291 |
...resolvePropsGetter(inputProps, EMPTY_PROPS) |
| 292 |
}; |
| 293 |
} |
| 294 |
return copyInitialProps(inputProps); |
| 295 |
} |
| 296 |
function mergeInto(merged, inputProps) { |
| 297 |
if (isPropsGetter(inputProps)) { |
| 298 |
return resolvePropsGetter(inputProps, merged); |
| 299 |
} |
| 300 |
return mutablyMergeInto(merged, inputProps); |
| 301 |
} |
| 302 |
function copyInitialProps(inputProps) { |
| 303 |
const copiedProps = { |
| 304 |
...inputProps |
| 305 |
}; |
| 306 |
for (const propName in copiedProps) { |
| 307 |
const propValue = copiedProps[propName]; |
| 308 |
if (isEventHandler(propName, propValue)) { |
| 309 |
copiedProps[propName] = wrapEventHandler(propValue); |
| 310 |
} |
| 311 |
} |
| 312 |
return copiedProps; |
| 313 |
} |
| 314 |
function mutablyMergeInto(mergedProps, externalProps) { |
| 315 |
if (!externalProps) { |
| 316 |
return mergedProps; |
| 317 |
} |
| 318 |
for (const propName in externalProps) { |
| 319 |
const externalPropValue = externalProps[propName]; |
| 320 |
switch (propName) { |
| 321 |
case "style": { |
| 322 |
mergedProps[propName] = mergeObjects(mergedProps.style, externalPropValue); |
| 323 |
break; |
| 324 |
} |
| 325 |
case "className": { |
| 326 |
mergedProps[propName] = mergeClassNames(mergedProps.className, externalPropValue); |
| 327 |
break; |
| 328 |
} |
| 329 |
default: { |
| 330 |
if (isEventHandler(propName, externalPropValue)) { |
| 331 |
mergedProps[propName] = mergeEventHandlers(mergedProps[propName], externalPropValue); |
| 332 |
} else { |
| 333 |
mergedProps[propName] = externalPropValue; |
| 334 |
} |
| 335 |
} |
| 336 |
} |
| 337 |
} |
| 338 |
return mergedProps; |
| 339 |
} |
| 340 |
function isEventHandler(key, value) { |
| 341 |
const code0 = key.charCodeAt(0); |
| 342 |
const code1 = key.charCodeAt(1); |
| 343 |
const code2 = key.charCodeAt(2); |
| 344 |
return code0 === 111 && code1 === 110 && code2 >= 65 && code2 <= 90 && (typeof value === "function" || typeof value === "undefined"); |
| 345 |
} |
| 346 |
function isPropsGetter(inputProps) { |
| 347 |
return typeof inputProps === "function"; |
| 348 |
} |
| 349 |
function resolvePropsGetter(inputProps, previousProps) { |
| 350 |
if (isPropsGetter(inputProps)) { |
| 351 |
return inputProps(previousProps); |
| 352 |
} |
| 353 |
return inputProps ?? EMPTY_PROPS; |
| 354 |
} |
| 355 |
function mergeEventHandlers(ourHandler, theirHandler) { |
| 356 |
if (!theirHandler) { |
| 357 |
return ourHandler; |
| 358 |
} |
| 359 |
if (!ourHandler) { |
| 360 |
return wrapEventHandler(theirHandler); |
| 361 |
} |
| 362 |
return (...args) => { |
| 363 |
const event = args[0]; |
| 364 |
if (isSyntheticEvent(event)) { |
| 365 |
const baseUIEvent = event; |
| 366 |
makeEventPreventable(baseUIEvent); |
| 367 |
const result2 = theirHandler(...args); |
| 368 |
if (!baseUIEvent.baseUIHandlerPrevented) { |
| 369 |
ourHandler?.(...args); |
| 370 |
} |
| 371 |
return result2; |
| 372 |
} |
| 373 |
const result = theirHandler(...args); |
| 374 |
ourHandler?.(...args); |
| 375 |
return result; |
| 376 |
}; |
| 377 |
} |
| 378 |
function wrapEventHandler(handler) { |
| 379 |
if (!handler) { |
| 380 |
return handler; |
| 381 |
} |
| 382 |
return (...args) => { |
| 383 |
const event = args[0]; |
| 384 |
if (isSyntheticEvent(event)) { |
| 385 |
makeEventPreventable(event); |
| 386 |
} |
| 387 |
return handler(...args); |
| 388 |
}; |
| 389 |
} |
| 390 |
function makeEventPreventable(event) { |
| 391 |
event.preventBaseUIHandler = () => { |
| 392 |
event.baseUIHandlerPrevented = true; |
| 393 |
}; |
| 394 |
return event; |
| 395 |
} |
| 396 |
function mergeClassNames(ourClassName, theirClassName) { |
| 397 |
if (theirClassName) { |
| 398 |
if (ourClassName) { |
| 399 |
return theirClassName + " " + ourClassName; |
| 400 |
} |
| 401 |
return theirClassName; |
| 402 |
} |
| 403 |
return ourClassName; |
| 404 |
} |
| 405 |
function isSyntheticEvent(event) { |
| 406 |
return event != null && typeof event === "object" && "nativeEvent" in event; |
| 407 |
} |
| 408 |
|
| 409 |
// node_modules/@base-ui/react/esm/internals/useRenderElement.js |
| 410 |
var import_react = __toESM(require_react(), 1); |
| 411 |
function useRenderElement(element, componentProps, params = {}) { |
| 412 |
const renderProp = componentProps.render; |
| 413 |
const outProps = useRenderElementProps(componentProps, params); |
| 414 |
if (params.enabled === false) { |
| 415 |
return null; |
| 416 |
} |
| 417 |
const state = params.state ?? EMPTY_OBJECT; |
| 418 |
return evaluateRenderProp(element, renderProp, outProps, state); |
| 419 |
} |
| 420 |
function useRenderElementProps(componentProps, params = {}) { |
| 421 |
const { |
| 422 |
className: classNameProp, |
| 423 |
style: styleProp, |
| 424 |
render: renderProp |
| 425 |
} = componentProps; |
| 426 |
const { |
| 427 |
state = EMPTY_OBJECT, |
| 428 |
ref, |
| 429 |
props, |
| 430 |
stateAttributesMapping, |
| 431 |
enabled = true |
| 432 |
} = params; |
| 433 |
const className = enabled ? resolveClassName(classNameProp, state) : void 0; |
| 434 |
const style = enabled ? resolveStyle(styleProp, state) : void 0; |
| 435 |
const stateProps = enabled ? getStateAttributesProps(state, stateAttributesMapping) : EMPTY_OBJECT; |
| 436 |
const resolvedProps = enabled && props ? resolveRenderFunctionProps(props) : void 0; |
| 437 |
const outProps = enabled ? mergeObjects(stateProps, resolvedProps) ?? {} : EMPTY_OBJECT; |
| 438 |
if (typeof document !== "undefined") { |
| 439 |
if (!enabled) { |
| 440 |
useMergedRefs(null, null); |
| 441 |
} else if (Array.isArray(ref)) { |
| 442 |
outProps.ref = useMergedRefsN([outProps.ref, getReactElementRef(renderProp), ...ref]); |
| 443 |
} else { |
| 444 |
outProps.ref = useMergedRefs(outProps.ref, getReactElementRef(renderProp), ref); |
| 445 |
} |
| 446 |
} |
| 447 |
if (!enabled) { |
| 448 |
return EMPTY_OBJECT; |
| 449 |
} |
| 450 |
if (className !== void 0) { |
| 451 |
outProps.className = mergeClassNames(outProps.className, className); |
| 452 |
} |
| 453 |
if (style !== void 0) { |
| 454 |
outProps.style = mergeObjects(outProps.style, style); |
| 455 |
} |
| 456 |
return outProps; |
| 457 |
} |
| 458 |
function resolveRenderFunctionProps(props) { |
| 459 |
if (Array.isArray(props)) { |
| 460 |
return mergePropsN(props); |
| 461 |
} |
| 462 |
return mergeProps(void 0, props); |
| 463 |
} |
| 464 |
var REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy"); |
| 465 |
var COMPONENT_IDENTIFIER_PATTERN = /^[A-Z][A-Za-z0-9$]*$/; |
| 466 |
var LOWERCASE_CHARACTER_PATTERN = /[a-z]/; |
| 467 |
function evaluateRenderProp(element, render, props, state) { |
| 468 |
if (render) { |
| 469 |
if (typeof render === "function") { |
| 470 |
if (true) { |
| 471 |
warnIfRenderPropLooksLikeComponent(render); |
| 472 |
} |
| 473 |
return render(props, state); |
| 474 |
} |
| 475 |
const mergedProps = mergeProps(props, render.props); |
| 476 |
mergedProps.ref = props.ref; |
| 477 |
let newElement = render; |
| 478 |
if (newElement?.$$typeof === REACT_LAZY_TYPE) { |
| 479 |
const children = React4.Children.toArray(render); |
| 480 |
newElement = children[0]; |
| 481 |
} |
| 482 |
if (true) { |
| 483 |
if (!/* @__PURE__ */ React4.isValidElement(newElement)) { |
| 484 |
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")); |
| 485 |
} |
| 486 |
} |
| 487 |
return /* @__PURE__ */ React4.cloneElement(newElement, mergedProps); |
| 488 |
} |
| 489 |
if (element) { |
| 490 |
if (typeof element === "string") { |
| 491 |
return renderTag(element, props); |
| 492 |
} |
| 493 |
} |
| 494 |
throw new Error(true ? "Base UI: Render element or function are not defined." : formatErrorMessage_default(8)); |
| 495 |
} |
| 496 |
function warnIfRenderPropLooksLikeComponent(renderFn) { |
| 497 |
const functionName = renderFn.name; |
| 498 |
if (functionName.length === 0) { |
| 499 |
return; |
| 500 |
} |
| 501 |
if (!COMPONENT_IDENTIFIER_PATTERN.test(functionName)) { |
| 502 |
return; |
| 503 |
} |
| 504 |
if (!LOWERCASE_CHARACTER_PATTERN.test(functionName)) { |
| 505 |
return; |
| 506 |
} |
| 507 |
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"); |
| 508 |
} |
| 509 |
function renderTag(Tag, props) { |
| 510 |
if (Tag === "button") { |
| 511 |
return /* @__PURE__ */ (0, import_react.createElement)("button", { |
| 512 |
type: "button", |
| 513 |
...props, |
| 514 |
key: props.key |
| 515 |
}); |
| 516 |
} |
| 517 |
if (Tag === "img") { |
| 518 |
return /* @__PURE__ */ (0, import_react.createElement)("img", { |
| 519 |
alt: "", |
| 520 |
...props, |
| 521 |
key: props.key |
| 522 |
}); |
| 523 |
} |
| 524 |
return /* @__PURE__ */ React4.createElement(Tag, props); |
| 525 |
} |
| 526 |
|
| 527 |
// node_modules/@base-ui/react/esm/use-render/useRender.js |
| 528 |
function useRender(params) { |
| 529 |
return useRenderElement(params.defaultTagName ?? "div", params, params); |
| 530 |
} |
| 531 |
|
| 532 |
// packages/ui/build-module/text/text.mjs |
| 533 |
var import_element = __toESM(require_element(), 1); |
| 534 |
var STYLE_HASH_ATTRIBUTE = "data-wp-hash"; |
| 535 |
function getRuntime() { |
| 536 |
const globalScope = globalThis; |
| 537 |
if (globalScope.__wpStyleRuntime) { |
| 538 |
return globalScope.__wpStyleRuntime; |
| 539 |
} |
| 540 |
globalScope.__wpStyleRuntime = { |
| 541 |
documents: /* @__PURE__ */ new Map(), |
| 542 |
styles: /* @__PURE__ */ new Map(), |
| 543 |
injectedStyles: /* @__PURE__ */ new WeakMap() |
| 544 |
}; |
| 545 |
if (typeof document !== "undefined") { |
| 546 |
registerDocument(document); |
| 547 |
} |
| 548 |
return globalScope.__wpStyleRuntime; |
| 549 |
} |
| 550 |
function documentContainsStyleHash(targetDocument, hash) { |
| 551 |
if (!targetDocument.head) { |
| 552 |
return false; |
| 553 |
} |
| 554 |
for (const style of targetDocument.head.querySelectorAll( |
| 555 |
`style[${STYLE_HASH_ATTRIBUTE}]` |
| 556 |
)) { |
| 557 |
if (style.getAttribute(STYLE_HASH_ATTRIBUTE) === hash) { |
| 558 |
return true; |
| 559 |
} |
| 560 |
} |
| 561 |
return false; |
| 562 |
} |
| 563 |
function injectStyle(targetDocument, hash, css) { |
| 564 |
if (!targetDocument.head) { |
| 565 |
return; |
| 566 |
} |
| 567 |
const runtime = getRuntime(); |
| 568 |
let injectedStyles = runtime.injectedStyles.get(targetDocument); |
| 569 |
if (!injectedStyles) { |
| 570 |
injectedStyles = /* @__PURE__ */ new Set(); |
| 571 |
runtime.injectedStyles.set(targetDocument, injectedStyles); |
| 572 |
} |
| 573 |
if (injectedStyles.has(hash)) { |
| 574 |
return; |
| 575 |
} |
| 576 |
if (documentContainsStyleHash(targetDocument, hash)) { |
| 577 |
injectedStyles.add(hash); |
| 578 |
return; |
| 579 |
} |
| 580 |
const style = targetDocument.createElement("style"); |
| 581 |
style.setAttribute(STYLE_HASH_ATTRIBUTE, hash); |
| 582 |
style.appendChild(targetDocument.createTextNode(css)); |
| 583 |
targetDocument.head.appendChild(style); |
| 584 |
injectedStyles.add(hash); |
| 585 |
} |
| 586 |
function registerDocument(targetDocument) { |
| 587 |
const runtime = getRuntime(); |
| 588 |
runtime.documents.set( |
| 589 |
targetDocument, |
| 590 |
(runtime.documents.get(targetDocument) ?? 0) + 1 |
| 591 |
); |
| 592 |
for (const [hash, css] of runtime.styles) { |
| 593 |
injectStyle(targetDocument, hash, css); |
| 594 |
} |
| 595 |
return () => { |
| 596 |
const count = runtime.documents.get(targetDocument); |
| 597 |
if (count === void 0) { |
| 598 |
return; |
| 599 |
} |
| 600 |
if (count <= 1) { |
| 601 |
runtime.documents.delete(targetDocument); |
| 602 |
return; |
| 603 |
} |
| 604 |
runtime.documents.set(targetDocument, count - 1); |
| 605 |
}; |
| 606 |
} |
| 607 |
function registerStyle(hash, css) { |
| 608 |
const runtime = getRuntime(); |
| 609 |
runtime.styles.set(hash, css); |
| 610 |
for (const targetDocument of runtime.documents.keys()) { |
| 611 |
injectStyle(targetDocument, hash, css); |
| 612 |
} |
| 613 |
} |
| 614 |
if (typeof process === "undefined" || true) { |
| 615 |
registerStyle("0c8601dd83", '@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._83ed8a8da5dd50ea__text{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-medium,499);--_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-medium,499)}._3c78b7fa9b4072dd__heading-xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-medium,499);--_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-medium,499);--_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-medium,499);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-medium,499);--_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-medium,499);--_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-medium,499);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-regular,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-regular,400)}.ca1aa3fc2029e958__body-lg{--_gcd-heading-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-regular,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-regular,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-regular,400)}._0e8d87a42c1f75fa__body-sm{--_gcd-heading-font-size:var(--wpds-typography-font-size-sm,12px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-regular,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)}}'); |
| 616 |
} |
| 617 |
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" }; |
| 618 |
if (typeof process === "undefined" || true) { |
| 619 |
registerStyle("1fb29d3a3c", "._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);&: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,#0000);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 #0000);color:var(--_gcd-input-color,var(--wpds-color-fg-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,#0000);border-color:var(--_gcd-input-border-color-disabled,#0000);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-fg-interactive-neutral-disabled,#8d8d8d))}&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-fg-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 #0000)}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-fg-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-medium,499));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 #0000);transition:var(--_gcd-a-transition,none)}"); |
| 620 |
} |
| 621 |
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" }; |
| 622 |
var Text = (0, import_element.forwardRef)(function Text2({ variant = "body-md", render, className, ...props }, ref) { |
| 623 |
const element = useRender({ |
| 624 |
render, |
| 625 |
defaultTagName: "span", |
| 626 |
ref, |
| 627 |
props: mergeProps(props, { |
| 628 |
className: clsx_default( |
| 629 |
style_default.text, |
| 630 |
global_css_defense_default.heading, |
| 631 |
global_css_defense_default.p, |
| 632 |
style_default[variant], |
| 633 |
className |
| 634 |
) |
| 635 |
}) |
| 636 |
}); |
| 637 |
return element; |
| 638 |
}); |
| 639 |
|
| 640 |
// packages/ui/build-module/stack/stack.mjs |
| 641 |
var import_element2 = __toESM(require_element(), 1); |
| 642 |
var STYLE_HASH_ATTRIBUTE2 = "data-wp-hash"; |
| 643 |
function getRuntime2() { |
| 644 |
const globalScope = globalThis; |
| 645 |
if (globalScope.__wpStyleRuntime) { |
| 646 |
return globalScope.__wpStyleRuntime; |
| 647 |
} |
| 648 |
globalScope.__wpStyleRuntime = { |
| 649 |
documents: /* @__PURE__ */ new Map(), |
| 650 |
styles: /* @__PURE__ */ new Map(), |
| 651 |
injectedStyles: /* @__PURE__ */ new WeakMap() |
| 652 |
}; |
| 653 |
if (typeof document !== "undefined") { |
| 654 |
registerDocument2(document); |
| 655 |
} |
| 656 |
return globalScope.__wpStyleRuntime; |
| 657 |
} |
| 658 |
function documentContainsStyleHash2(targetDocument, hash) { |
| 659 |
if (!targetDocument.head) { |
| 660 |
return false; |
| 661 |
} |
| 662 |
for (const style of targetDocument.head.querySelectorAll( |
| 663 |
`style[${STYLE_HASH_ATTRIBUTE2}]` |
| 664 |
)) { |
| 665 |
if (style.getAttribute(STYLE_HASH_ATTRIBUTE2) === hash) { |
| 666 |
return true; |
| 667 |
} |
| 668 |
} |
| 669 |
return false; |
| 670 |
} |
| 671 |
function injectStyle2(targetDocument, hash, css) { |
| 672 |
if (!targetDocument.head) { |
| 673 |
return; |
| 674 |
} |
| 675 |
const runtime = getRuntime2(); |
| 676 |
let injectedStyles = runtime.injectedStyles.get(targetDocument); |
| 677 |
if (!injectedStyles) { |
| 678 |
injectedStyles = /* @__PURE__ */ new Set(); |
| 679 |
runtime.injectedStyles.set(targetDocument, injectedStyles); |
| 680 |
} |
| 681 |
if (injectedStyles.has(hash)) { |
| 682 |
return; |
| 683 |
} |
| 684 |
if (documentContainsStyleHash2(targetDocument, hash)) { |
| 685 |
injectedStyles.add(hash); |
| 686 |
return; |
| 687 |
} |
| 688 |
const style = targetDocument.createElement("style"); |
| 689 |
style.setAttribute(STYLE_HASH_ATTRIBUTE2, hash); |
| 690 |
style.appendChild(targetDocument.createTextNode(css)); |
| 691 |
targetDocument.head.appendChild(style); |
| 692 |
injectedStyles.add(hash); |
| 693 |
} |
| 694 |
function registerDocument2(targetDocument) { |
| 695 |
const runtime = getRuntime2(); |
| 696 |
runtime.documents.set( |
| 697 |
targetDocument, |
| 698 |
(runtime.documents.get(targetDocument) ?? 0) + 1 |
| 699 |
); |
| 700 |
for (const [hash, css] of runtime.styles) { |
| 701 |
injectStyle2(targetDocument, hash, css); |
| 702 |
} |
| 703 |
return () => { |
| 704 |
const count = runtime.documents.get(targetDocument); |
| 705 |
if (count === void 0) { |
| 706 |
return; |
| 707 |
} |
| 708 |
if (count <= 1) { |
| 709 |
runtime.documents.delete(targetDocument); |
| 710 |
return; |
| 711 |
} |
| 712 |
runtime.documents.set(targetDocument, count - 1); |
| 713 |
}; |
| 714 |
} |
| 715 |
function registerStyle2(hash, css) { |
| 716 |
const runtime = getRuntime2(); |
| 717 |
runtime.styles.set(hash, css); |
| 718 |
for (const targetDocument of runtime.documents.keys()) { |
| 719 |
injectStyle2(targetDocument, hash, css); |
| 720 |
} |
| 721 |
} |
| 722 |
if (typeof process === "undefined" || true) { |
| 723 |
registerStyle2("b51ff41489", "@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._19ce0419607e1896__stack{display:flex}}"); |
| 724 |
} |
| 725 |
var style_default2 = { "stack": "_19ce0419607e1896__stack" }; |
| 726 |
var gapTokens = { |
| 727 |
xs: "var(--wpds-dimension-gap-xs, 4px)", |
| 728 |
sm: "var(--wpds-dimension-gap-sm, 8px)", |
| 729 |
md: "var(--wpds-dimension-gap-md, 12px)", |
| 730 |
lg: "var(--wpds-dimension-gap-lg, 16px)", |
| 731 |
xl: "var(--wpds-dimension-gap-xl, 24px)", |
| 732 |
"2xl": "var(--wpds-dimension-gap-2xl, 32px)", |
| 733 |
"3xl": "var(--wpds-dimension-gap-3xl, 40px)" |
| 734 |
}; |
| 735 |
var Stack = (0, import_element2.forwardRef)(function Stack2({ direction, gap, align, justify, wrap, render, ...props }, ref) { |
| 736 |
const style = { |
| 737 |
gap: gap && gapTokens[gap], |
| 738 |
alignItems: align, |
| 739 |
justifyContent: justify, |
| 740 |
flexDirection: direction, |
| 741 |
flexWrap: wrap |
| 742 |
}; |
| 743 |
const element = useRender({ |
| 744 |
render, |
| 745 |
ref, |
| 746 |
props: mergeProps(props, { style, className: style_default2.stack }) |
| 747 |
}); |
| 748 |
return element; |
| 749 |
}); |
| 750 |
|
| 751 |
// packages/style-runtime/src/index.ts |
| 752 |
var STYLE_HASH_ATTRIBUTE3 = "data-wp-hash"; |
| 753 |
function getRuntime3() { |
| 754 |
const globalScope = globalThis; |
| 755 |
if (globalScope.__wpStyleRuntime) { |
| 756 |
return globalScope.__wpStyleRuntime; |
| 757 |
} |
| 758 |
globalScope.__wpStyleRuntime = { |
| 759 |
documents: /* @__PURE__ */ new Map(), |
| 760 |
styles: /* @__PURE__ */ new Map(), |
| 761 |
injectedStyles: /* @__PURE__ */ new WeakMap() |
| 762 |
}; |
| 763 |
if (typeof document !== "undefined") { |
| 764 |
registerDocument3(document); |
| 765 |
} |
| 766 |
return globalScope.__wpStyleRuntime; |
| 767 |
} |
| 768 |
function documentContainsStyleHash3(targetDocument, hash) { |
| 769 |
if (!targetDocument.head) { |
| 770 |
return false; |
| 771 |
} |
| 772 |
for (const style of targetDocument.head.querySelectorAll( |
| 773 |
`style[${STYLE_HASH_ATTRIBUTE3}]` |
| 774 |
)) { |
| 775 |
if (style.getAttribute(STYLE_HASH_ATTRIBUTE3) === hash) { |
| 776 |
return true; |
| 777 |
} |
| 778 |
} |
| 779 |
return false; |
| 780 |
} |
| 781 |
function injectStyle3(targetDocument, hash, css) { |
| 782 |
if (!targetDocument.head) { |
| 783 |
return; |
| 784 |
} |
| 785 |
const runtime = getRuntime3(); |
| 786 |
let injectedStyles = runtime.injectedStyles.get(targetDocument); |
| 787 |
if (!injectedStyles) { |
| 788 |
injectedStyles = /* @__PURE__ */ new Set(); |
| 789 |
runtime.injectedStyles.set(targetDocument, injectedStyles); |
| 790 |
} |
| 791 |
if (injectedStyles.has(hash)) { |
| 792 |
return; |
| 793 |
} |
| 794 |
if (documentContainsStyleHash3(targetDocument, hash)) { |
| 795 |
injectedStyles.add(hash); |
| 796 |
return; |
| 797 |
} |
| 798 |
const style = targetDocument.createElement("style"); |
| 799 |
style.setAttribute(STYLE_HASH_ATTRIBUTE3, hash); |
| 800 |
style.appendChild(targetDocument.createTextNode(css)); |
| 801 |
targetDocument.head.appendChild(style); |
| 802 |
injectedStyles.add(hash); |
| 803 |
} |
| 804 |
function registerDocument3(targetDocument) { |
| 805 |
const runtime = getRuntime3(); |
| 806 |
runtime.documents.set( |
| 807 |
targetDocument, |
| 808 |
(runtime.documents.get(targetDocument) ?? 0) + 1 |
| 809 |
); |
| 810 |
for (const [hash, css] of runtime.styles) { |
| 811 |
injectStyle3(targetDocument, hash, css); |
| 812 |
} |
| 813 |
return () => { |
| 814 |
const count = runtime.documents.get(targetDocument); |
| 815 |
if (count === void 0) { |
| 816 |
return; |
| 817 |
} |
| 818 |
if (count <= 1) { |
| 819 |
runtime.documents.delete(targetDocument); |
| 820 |
return; |
| 821 |
} |
| 822 |
runtime.documents.set(targetDocument, count - 1); |
| 823 |
}; |
| 824 |
} |
| 825 |
function registerStyle3(hash, css) { |
| 826 |
const runtime = getRuntime3(); |
| 827 |
runtime.styles.set(hash, css); |
| 828 |
for (const targetDocument of runtime.documents.keys()) { |
| 829 |
injectStyle3(targetDocument, hash, css); |
| 830 |
} |
| 831 |
} |
| 832 |
|
| 833 |
// widgets/hello-world/style.module.css |
| 834 |
if (typeof process === "undefined" || true) { |
| 835 |
registerStyle3("e03e80d16c", "._6e9c47f7f67ffa0d__root{background-color:var(--wpds-color-bg-surface-brand,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 9%,#fff));color:var(--wpds-color-fg-interactive-brand,var(--wp-admin-theme-color,#3858e9));height:100%;padding:var(--wpds-dimension-padding-2xl,24px)}"); |
| 836 |
} |
| 837 |
var style_default3 = { "root": "_6e9c47f7f67ffa0d__root" }; |
| 838 |
|
| 839 |
// widgets/hello-world/render.tsx |
| 840 |
var import_jsx_runtime = __toESM(require_jsx_runtime()); |
| 841 |
function HelloWorld({ attributes }) { |
| 842 |
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( |
| 843 |
Stack, |
| 844 |
{ |
| 845 |
align: "center", |
| 846 |
justify: "center", |
| 847 |
className: clsx_default(style_default3.root), |
| 848 |
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { variant: "heading-2xl", children: attributes?.message || "Hello World" }) |
| 849 |
} |
| 850 |
); |
| 851 |
} |
| 852 |
export { |
| 853 |
HelloWorld as default |
| 854 |
}; |
| 855 |
|