@wordpress/ui 0.10.0 → 0.11.1-next.v.202604091042.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (245) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/CONTRIBUTING.md +25 -0
  3. package/README.md +22 -2
  4. package/build/alert-dialog/context.cjs +6 -1
  5. package/build/alert-dialog/context.cjs.map +2 -2
  6. package/build/alert-dialog/popup.cjs +105 -33
  7. package/build/alert-dialog/popup.cjs.map +4 -4
  8. package/build/alert-dialog/root.cjs +106 -6
  9. package/build/alert-dialog/root.cjs.map +2 -2
  10. package/build/alert-dialog/trigger.cjs +4 -14
  11. package/build/alert-dialog/trigger.cjs.map +3 -3
  12. package/build/alert-dialog/types.cjs.map +1 -1
  13. package/build/button/button.cjs +16 -6
  14. package/build/button/button.cjs.map +3 -3
  15. package/build/card/content.cjs +3 -3
  16. package/build/card/content.cjs.map +1 -1
  17. package/build/card/full-bleed.cjs +3 -3
  18. package/build/card/full-bleed.cjs.map +1 -1
  19. package/build/card/header.cjs +3 -3
  20. package/build/card/header.cjs.map +1 -1
  21. package/build/card/root.cjs +3 -3
  22. package/build/card/root.cjs.map +1 -1
  23. package/build/card/title.cjs +3 -3
  24. package/build/card/title.cjs.map +1 -1
  25. package/build/collapsible-card/header.cjs +3 -3
  26. package/build/collapsible-card/header.cjs.map +2 -2
  27. package/build/empty-state/title.cjs.map +2 -2
  28. package/build/form/primitives/field/description.cjs +17 -4
  29. package/build/form/primitives/field/description.cjs.map +3 -3
  30. package/build/form/primitives/field/details.cjs +3 -3
  31. package/build/form/primitives/field/details.cjs.map +2 -2
  32. package/build/form/primitives/field/label.cjs +3 -3
  33. package/build/form/primitives/field/label.cjs.map +2 -2
  34. package/build/form/primitives/fieldset/description.cjs +20 -4
  35. package/build/form/primitives/fieldset/description.cjs.map +3 -3
  36. package/build/form/primitives/fieldset/details.cjs +3 -3
  37. package/build/form/primitives/fieldset/details.cjs.map +2 -2
  38. package/build/form/primitives/fieldset/legend.cjs +3 -3
  39. package/build/form/primitives/fieldset/legend.cjs.map +2 -2
  40. package/build/form/primitives/input/input.cjs +23 -7
  41. package/build/form/primitives/input/input.cjs.map +3 -3
  42. package/build/form/primitives/input-layout/input-layout.cjs +10 -0
  43. package/build/form/primitives/input-layout/input-layout.cjs.map +3 -3
  44. package/build/form/primitives/select/trigger.cjs +3 -3
  45. package/build/form/primitives/select/trigger.cjs.map +2 -2
  46. package/build/form/primitives/textarea/textarea.cjs +20 -1
  47. package/build/form/primitives/textarea/textarea.cjs.map +3 -3
  48. package/build/index.cjs +3 -0
  49. package/build/index.cjs.map +2 -2
  50. package/build/link/link.cjs +16 -6
  51. package/build/link/link.cjs.map +3 -3
  52. package/build/popover/arrow.cjs +94 -0
  53. package/build/popover/arrow.cjs.map +7 -0
  54. package/build/popover/close.cjs +45 -0
  55. package/build/popover/close.cjs.map +7 -0
  56. package/build/popover/context.cjs +76 -0
  57. package/build/popover/context.cjs.map +7 -0
  58. package/build/popover/description.cjs +70 -0
  59. package/build/popover/description.cjs.map +7 -0
  60. package/build/popover/index.cjs +49 -0
  61. package/build/popover/index.cjs.map +7 -0
  62. package/build/popover/popup.cjs +138 -0
  63. package/build/popover/popup.cjs.map +7 -0
  64. package/build/popover/root.cjs +35 -0
  65. package/build/popover/root.cjs.map +7 -0
  66. package/build/popover/title.cjs +56 -0
  67. package/build/popover/title.cjs.map +7 -0
  68. package/build/popover/trigger.cjs +38 -0
  69. package/build/popover/trigger.cjs.map +7 -0
  70. package/build/popover/types.cjs +19 -0
  71. package/build/popover/types.cjs.map +7 -0
  72. package/build/text/text.cjs +20 -5
  73. package/build/text/text.cjs.map +3 -3
  74. package/build/utils/use-deprioritized-initial-focus.cjs.map +2 -2
  75. package/build-module/alert-dialog/context.mjs +6 -1
  76. package/build-module/alert-dialog/context.mjs.map +2 -2
  77. package/build-module/alert-dialog/popup.mjs +107 -33
  78. package/build-module/alert-dialog/popup.mjs.map +4 -4
  79. package/build-module/alert-dialog/root.mjs +113 -7
  80. package/build-module/alert-dialog/root.mjs.map +2 -2
  81. package/build-module/alert-dialog/trigger.mjs +4 -4
  82. package/build-module/alert-dialog/trigger.mjs.map +3 -3
  83. package/build-module/button/button.mjs +16 -6
  84. package/build-module/button/button.mjs.map +3 -3
  85. package/build-module/card/content.mjs +3 -3
  86. package/build-module/card/content.mjs.map +1 -1
  87. package/build-module/card/full-bleed.mjs +3 -3
  88. package/build-module/card/full-bleed.mjs.map +1 -1
  89. package/build-module/card/header.mjs +3 -3
  90. package/build-module/card/header.mjs.map +1 -1
  91. package/build-module/card/root.mjs +3 -3
  92. package/build-module/card/root.mjs.map +1 -1
  93. package/build-module/card/title.mjs +3 -3
  94. package/build-module/card/title.mjs.map +1 -1
  95. package/build-module/collapsible-card/header.mjs +3 -3
  96. package/build-module/collapsible-card/header.mjs.map +2 -2
  97. package/build-module/empty-state/title.mjs.map +2 -2
  98. package/build-module/form/primitives/field/description.mjs +17 -4
  99. package/build-module/form/primitives/field/description.mjs.map +3 -3
  100. package/build-module/form/primitives/field/details.mjs +3 -3
  101. package/build-module/form/primitives/field/details.mjs.map +2 -2
  102. package/build-module/form/primitives/field/label.mjs +3 -3
  103. package/build-module/form/primitives/field/label.mjs.map +2 -2
  104. package/build-module/form/primitives/fieldset/description.mjs +20 -4
  105. package/build-module/form/primitives/fieldset/description.mjs.map +3 -3
  106. package/build-module/form/primitives/fieldset/details.mjs +3 -3
  107. package/build-module/form/primitives/fieldset/details.mjs.map +2 -2
  108. package/build-module/form/primitives/fieldset/legend.mjs +3 -3
  109. package/build-module/form/primitives/fieldset/legend.mjs.map +2 -2
  110. package/build-module/form/primitives/input/input.mjs +23 -7
  111. package/build-module/form/primitives/input/input.mjs.map +3 -3
  112. package/build-module/form/primitives/input-layout/input-layout.mjs +10 -0
  113. package/build-module/form/primitives/input-layout/input-layout.mjs.map +3 -3
  114. package/build-module/form/primitives/select/trigger.mjs +3 -3
  115. package/build-module/form/primitives/select/trigger.mjs.map +2 -2
  116. package/build-module/form/primitives/textarea/textarea.mjs +20 -1
  117. package/build-module/form/primitives/textarea/textarea.mjs.map +3 -3
  118. package/build-module/index.mjs +2 -0
  119. package/build-module/index.mjs.map +2 -2
  120. package/build-module/link/link.mjs +16 -6
  121. package/build-module/link/link.mjs.map +3 -3
  122. package/build-module/popover/arrow.mjs +59 -0
  123. package/build-module/popover/arrow.mjs.map +7 -0
  124. package/build-module/popover/close.mjs +20 -0
  125. package/build-module/popover/close.mjs.map +7 -0
  126. package/build-module/popover/context.mjs +57 -0
  127. package/build-module/popover/context.mjs.map +7 -0
  128. package/build-module/popover/description.mjs +35 -0
  129. package/build-module/popover/description.mjs.map +7 -0
  130. package/build-module/popover/index.mjs +18 -0
  131. package/build-module/popover/index.mjs.map +7 -0
  132. package/build-module/popover/popup.mjs +105 -0
  133. package/build-module/popover/popup.mjs.map +7 -0
  134. package/build-module/popover/root.mjs +10 -0
  135. package/build-module/popover/root.mjs.map +7 -0
  136. package/build-module/popover/title.mjs +31 -0
  137. package/build-module/popover/title.mjs.map +7 -0
  138. package/build-module/popover/trigger.mjs +13 -0
  139. package/build-module/popover/trigger.mjs.map +7 -0
  140. package/build-module/popover/types.mjs +1 -0
  141. package/build-module/popover/types.mjs.map +7 -0
  142. package/build-module/text/text.mjs +20 -5
  143. package/build-module/text/text.mjs.map +3 -3
  144. package/build-module/utils/use-deprioritized-initial-focus.mjs.map +2 -2
  145. package/build-types/alert-dialog/context.d.ts +6 -3
  146. package/build-types/alert-dialog/context.d.ts.map +1 -1
  147. package/build-types/alert-dialog/popup.d.ts.map +1 -1
  148. package/build-types/alert-dialog/root.d.ts +2 -8
  149. package/build-types/alert-dialog/root.d.ts.map +1 -1
  150. package/build-types/alert-dialog/stories/index.story.d.ts +18 -6
  151. package/build-types/alert-dialog/stories/index.story.d.ts.map +1 -1
  152. package/build-types/alert-dialog/trigger.d.ts +2 -1
  153. package/build-types/alert-dialog/trigger.d.ts.map +1 -1
  154. package/build-types/alert-dialog/types.d.ts +57 -26
  155. package/build-types/alert-dialog/types.d.ts.map +1 -1
  156. package/build-types/button/button.d.ts.map +1 -1
  157. package/build-types/card/stories/index.story.d.ts.map +1 -1
  158. package/build-types/empty-state/title.d.ts.map +1 -1
  159. package/build-types/form/primitives/field/description.d.ts.map +1 -1
  160. package/build-types/form/primitives/fieldset/description.d.ts.map +1 -1
  161. package/build-types/form/primitives/input/input.d.ts.map +1 -1
  162. package/build-types/form/primitives/input-layout/input-layout.d.ts.map +1 -1
  163. package/build-types/form/primitives/textarea/textarea.d.ts.map +1 -1
  164. package/build-types/form/stories/shared.d.ts.map +1 -1
  165. package/build-types/index.d.ts +1 -0
  166. package/build-types/index.d.ts.map +1 -1
  167. package/build-types/link/link.d.ts.map +1 -1
  168. package/build-types/popover/arrow.d.ts +10 -0
  169. package/build-types/popover/arrow.d.ts.map +1 -0
  170. package/build-types/popover/close.d.ts +11 -0
  171. package/build-types/popover/close.d.ts.map +1 -0
  172. package/build-types/popover/context.d.ts +22 -0
  173. package/build-types/popover/context.d.ts.map +1 -0
  174. package/build-types/popover/description.d.ts +10 -0
  175. package/build-types/popover/description.d.ts.map +1 -0
  176. package/build-types/popover/index.d.ts +9 -0
  177. package/build-types/popover/index.d.ts.map +1 -0
  178. package/build-types/popover/popup.d.ts +11 -0
  179. package/build-types/popover/popup.d.ts.map +1 -0
  180. package/build-types/popover/root.d.ts +37 -0
  181. package/build-types/popover/root.d.ts.map +1 -0
  182. package/build-types/popover/stories/index.story.d.ts +211 -0
  183. package/build-types/popover/stories/index.story.d.ts.map +1 -0
  184. package/build-types/popover/stories/utils.d.ts +25 -0
  185. package/build-types/popover/stories/utils.d.ts.map +1 -0
  186. package/build-types/popover/test/index.test.d.ts +2 -0
  187. package/build-types/popover/test/index.test.d.ts.map +1 -0
  188. package/build-types/popover/title.d.ts +20 -0
  189. package/build-types/popover/title.d.ts.map +1 -0
  190. package/build-types/popover/trigger.d.ts +10 -0
  191. package/build-types/popover/trigger.d.ts.map +1 -0
  192. package/build-types/popover/types.d.ts +83 -0
  193. package/build-types/popover/types.d.ts.map +1 -0
  194. package/build-types/text/stories/index.story.d.ts +4 -0
  195. package/build-types/text/stories/index.story.d.ts.map +1 -1
  196. package/build-types/text/text.d.ts.map +1 -1
  197. package/build-types/utils/use-deprioritized-initial-focus.d.ts +6 -5
  198. package/build-types/utils/use-deprioritized-initial-focus.d.ts.map +1 -1
  199. package/package.json +11 -11
  200. package/src/alert-dialog/context.tsx +12 -4
  201. package/src/alert-dialog/popup.tsx +91 -33
  202. package/src/alert-dialog/root.tsx +191 -13
  203. package/src/alert-dialog/stories/index.story.tsx +116 -65
  204. package/src/alert-dialog/style.module.css +11 -0
  205. package/src/alert-dialog/test/index.test.tsx +1265 -347
  206. package/src/alert-dialog/trigger.tsx +2 -2
  207. package/src/alert-dialog/types.ts +59 -28
  208. package/src/button/button.tsx +2 -0
  209. package/src/button/style.module.css +4 -0
  210. package/src/card/stories/index.story.tsx +0 -1
  211. package/src/card/style.module.css +1 -1
  212. package/src/card/test/index.test.tsx +0 -1
  213. package/src/empty-state/title.tsx +0 -1
  214. package/src/form/primitives/field/description.tsx +6 -1
  215. package/src/form/primitives/fieldset/description.tsx +9 -1
  216. package/src/form/primitives/input/input.tsx +6 -1
  217. package/src/form/primitives/input/style.module.css +4 -0
  218. package/src/form/primitives/input-layout/input-layout.tsx +2 -0
  219. package/src/form/primitives/textarea/textarea.tsx +10 -1
  220. package/src/form/stories/shared.tsx +4 -2
  221. package/src/index.ts +1 -0
  222. package/src/link/link.tsx +2 -0
  223. package/src/link/style.module.css +10 -0
  224. package/src/popover/arrow.tsx +49 -0
  225. package/src/popover/close.tsx +24 -0
  226. package/src/popover/context.tsx +100 -0
  227. package/src/popover/description.tsx +34 -0
  228. package/src/popover/index.ts +9 -0
  229. package/src/popover/popup.tsx +106 -0
  230. package/src/popover/root.tsx +41 -0
  231. package/src/popover/stories/index.story.tsx +1315 -0
  232. package/src/popover/stories/utils.tsx +91 -0
  233. package/src/popover/style.module.css +64 -0
  234. package/src/popover/test/index.test.tsx +727 -0
  235. package/src/popover/title.tsx +50 -0
  236. package/src/popover/trigger.tsx +17 -0
  237. package/src/popover/types.ts +113 -0
  238. package/src/text/stories/index.story.tsx +4 -2
  239. package/src/text/style.module.css +26 -0
  240. package/src/text/test/index.test.tsx +1 -4
  241. package/src/text/text.tsx +8 -1
  242. package/src/utils/css/field.module.css +4 -1
  243. package/src/utils/css/focus.module.css +7 -5
  244. package/src/utils/css/global-css-defense.module.css +117 -0
  245. package/src/utils/use-deprioritized-initial-focus.ts +5 -4
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/form/primitives/select/trigger.tsx", "../../../../src/utils/css/focus.module.css", "../../../../src/utils/css/select-trigger.module.css"],
4
- "sourcesContent": ["import { Select as _Select } from '@base-ui/react/select';\nimport clsx from 'clsx';\nimport { forwardRef } from '@wordpress/element';\nimport { chevronDown } from '@wordpress/icons';\nimport focusStyles from '../../../utils/css/focus.module.css';\nimport selectTriggerStyles from '../../../utils/css/select-trigger.module.css';\nimport { InputLayout } from '../input-layout';\nimport { Icon } from '../../../icon';\nimport type { SelectTriggerProps } from './types';\n\nexport const Trigger = forwardRef< HTMLButtonElement, SelectTriggerProps >(\n\tfunction Trigger(\n\t\t{ className, size, variant, children, ...restProps },\n\t\tref\n\t) {\n\t\treturn (\n\t\t\t<InputLayout\n\t\t\t\tclassName={ clsx(\n\t\t\t\t\tfocusStyles[ 'outset-ring--focus-within-except-active' ],\n\t\t\t\t\tselectTriggerStyles[ 'trigger-wrapper' ],\n\t\t\t\t\tvariant === 'minimal' &&\n\t\t\t\t\t\tselectTriggerStyles[ 'is-minimal' ],\n\t\t\t\t\tclassName\n\t\t\t\t) }\n\t\t\t\tsize={ size }\n\t\t\t\tisBorderless={ variant === 'minimal' }\n\t\t\t>\n\t\t\t\t<_Select.Trigger\n\t\t\t\t\t{ ...restProps }\n\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\tselectTriggerStyles.trigger,\n\t\t\t\t\t\tvariant === 'minimal' &&\n\t\t\t\t\t\t\tselectTriggerStyles[ 'is-minimal' ]\n\t\t\t\t\t) }\n\t\t\t\t\tdata-can-disable-input-layout\n\t\t\t\t\tref={ ref }\n\t\t\t\t>\n\t\t\t\t\t<_Select.Value\n\t\t\t\t\t\tclassName={ ( state ) =>\n\t\t\t\t\t\t\tclsx(\n\t\t\t\t\t\t\t\tselectTriggerStyles[ 'trigger-value' ],\n\t\t\t\t\t\t\t\tstate.value === '' &&\n\t\t\t\t\t\t\t\t\tselectTriggerStyles[ 'is-placeholder' ]\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}\n\t\t\t\t\t>\n\t\t\t\t\t\t{ children }\n\t\t\t\t\t</_Select.Value>\n\t\t\t\t\t<Icon\n\t\t\t\t\t\tclassName={ selectTriggerStyles[ 'trigger-caret' ] }\n\t\t\t\t\t\ticon={ chevronDown }\n\t\t\t\t\t\tsize={ 18 }\n\t\t\t\t\t/>\n\t\t\t\t</_Select.Trigger>\n\t\t\t</InputLayout>\n\t\t);\n\t}\n);\n", "if (typeof document !== 'undefined' && process.env.NODE_ENV !== 'test' && !document.head.querySelector(\"style[data-wp-hash='4acd2b57a1']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"4acd2b57a1\");\n\tstyle.appendChild(document.createTextNode(\"@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-utilities{._08e8a2e44959f892__outset-ring--focus,._970d04df7376df67__outset-ring--focus-within-except-active,.c5cb3ee4bddaa8e4__outset-ring--focus-within-visible,.cd83dfc2126a0846__outset-ring--focus-within,.d0541bc9dd9dc7b6__outset-ring--focus-visible,.e25b2bdd7aa21721__outset-ring--focus-except-active,.ecadb9e080e2dfa5__outset-ring--focus-parent-visible{@media not (prefers-reduced-motion){transition:outline .1s ease-out}outline-color:#0000;outline-offset:1px;outline-style:solid;outline-width:0}._08e8a2e44959f892__outset-ring--focus:focus,._970d04df7376df67__outset-ring--focus-within-except-active:focus-within:not(:has(:active)),.c5cb3ee4bddaa8e4__outset-ring--focus-within-visible:focus-within:has(:focus-visible),.cd83dfc2126a0846__outset-ring--focus-within:focus-within,.d0541bc9dd9dc7b6__outset-ring--focus-visible:focus-visible,.e25b2bdd7aa21721__outset-ring--focus-except-active:focus:not(:active),:focus-visible .ecadb9e080e2dfa5__outset-ring--focus-parent-visible{outline-color:var(--wpds-color-stroke-focus-brand,var(--wp-admin-theme-color,#3858e9));outline-width:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}\"));\n\tdocument.head.appendChild(style);\n}\nexport default {\"outset-ring--focus\":\"_08e8a2e44959f892__outset-ring--focus\",\"outset-ring--focus-except-active\":\"e25b2bdd7aa21721__outset-ring--focus-except-active\",\"outset-ring--focus-visible\":\"d0541bc9dd9dc7b6__outset-ring--focus-visible\",\"outset-ring--focus-within\":\"cd83dfc2126a0846__outset-ring--focus-within\",\"outset-ring--focus-within-except-active\":\"_970d04df7376df67__outset-ring--focus-within-except-active\",\"outset-ring--focus-within-visible\":\"c5cb3ee4bddaa8e4__outset-ring--focus-within-visible\",\"outset-ring--focus-parent-visible\":\"ecadb9e080e2dfa5__outset-ring--focus-parent-visible\"};\n", "if (typeof document !== 'undefined' && process.env.NODE_ENV !== 'test' && !document.head.querySelector(\"style[data-wp-hash='30745c0b5f']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"30745c0b5f\");\n\tstyle.appendChild(document.createTextNode(\"@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-utilities{._6e4e0445ef20426b__trigger-wrapper{&.fa98c865fb77e675__is-minimal{width:fit-content}}._7893295e3f6d1af7__trigger{align-items:center;background-color:initial;border:none;color:var(--wpds-color-fg-interactive-neutral,#1e1e1e);cursor:var(--wpds-cursor-control,pointer);display:flex;font-family:inherit;font-size:inherit;gap:var(--wpds-dimension-gap-xs,4px);justify-content:space-between;line-height:1.4;padding-block:4px;padding-inline-end:calc(var(--wp-ui-input-layout-padding-inline) - 4px);padding-inline-start:var(--wp-ui-input-layout-padding-inline);text-align:start;user-select:none;width:100%;&.fa98c865fb77e675__is-minimal{width:auto}&:focus{outline:none}&[data-disabled]{background-color:var(--wpds-color-bg-interactive-neutral-weak-disabled,#0000);color:var(--wpds-color-fg-interactive-neutral-disabled,#8a8a8a)}}.e760c9339965ce84__trigger-value{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;&.c67f9ed393747f3f__is-placeholder{color:var(--wpds-color-fg-interactive-neutral-disabled,#8a8a8a)}}._308bc63e43681f99__trigger-caret{flex:0 0 auto}}\"));\n\tdocument.head.appendChild(style);\n}\nexport default {\"trigger-wrapper\":\"_6e4e0445ef20426b__trigger-wrapper\",\"is-minimal\":\"fa98c865fb77e675__is-minimal\",\"trigger\":\"_7893295e3f6d1af7__trigger\",\"trigger-value\":\"e760c9339965ce84__trigger-value\",\"is-placeholder\":\"c67f9ed393747f3f__is-placeholder\",\"trigger-caret\":\"_308bc63e43681f99__trigger-caret\"};\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAAkC;AAClC,kBAAiB;AACjB,qBAA2B;AAC3B,mBAA4B;;;ACH5B,IAAI,OAAO,aAAa,eAAe,QAAQ,IAAI,aAAa,UAAU,CAAC,SAAS,KAAK,cAAc,kCAAkC,GAAG;AAC3I,QAAM,QAAQ,SAAS,cAAc,OAAO;AAC5C,QAAM,aAAa,gBAAgB,YAAY;AAC/C,QAAM,YAAY,SAAS,eAAe,8tCAA8tC,CAAC;AACzwC,WAAS,KAAK,YAAY,KAAK;AAChC;AACA,IAAO,gBAAQ,EAAC,sBAAqB,yCAAwC,oCAAmC,sDAAqD,8BAA6B,gDAA+C,6BAA4B,+CAA8C,2CAA0C,8DAA6D,qCAAoC,uDAAsD,qCAAoC,sDAAqD;;;ACNrlB,IAAI,OAAO,aAAa,eAAe,QAAQ,IAAI,aAAa,UAAU,CAAC,SAAS,KAAK,cAAc,kCAAkC,GAAG;AAC3I,QAAM,QAAQ,SAAS,cAAc,OAAO;AAC5C,QAAM,aAAa,gBAAgB,YAAY;AAC/C,QAAM,YAAY,SAAS,eAAe,4oCAA4oC,CAAC;AACvrC,WAAS,KAAK,YAAY,KAAK;AAChC;AACA,IAAO,yBAAQ,EAAC,mBAAkB,sCAAqC,cAAa,gCAA+B,WAAU,8BAA6B,iBAAgB,mCAAkC,kBAAiB,oCAAmC,iBAAgB,mCAAkC;;;AFAlT,0BAA4B;AAC5B,kBAAqB;AAoBjB;AAjBG,IAAM,cAAU;AAAA,EACtB,SAASA,SACR,EAAE,WAAW,MAAM,SAAS,UAAU,GAAG,UAAU,GACnD,KACC;AACD,WACC;AAAA,MAAC;AAAA;AAAA,QACA,eAAY,YAAAC;AAAA,UACX,cAAa,yCAA0C;AAAA,UACvD,uBAAqB,iBAAkB;AAAA,UACvC,YAAY,aACX,uBAAqB,YAAa;AAAA,UACnC;AAAA,QACD;AAAA,QACA;AAAA,QACA,cAAe,YAAY;AAAA,QAE3B;AAAA,UAAC,cAAAC,OAAQ;AAAA,UAAR;AAAA,YACE,GAAG;AAAA,YACL,eAAY,YAAAD;AAAA,cACX,uBAAoB;AAAA,cACpB,YAAY,aACX,uBAAqB,YAAa;AAAA,YACpC;AAAA,YACA,iCAA6B;AAAA,YAC7B;AAAA,YAEA;AAAA;AAAA,gBAAC,cAAAC,OAAQ;AAAA,gBAAR;AAAA,kBACA,WAAY,CAAE,cACb,YAAAD;AAAA,oBACC,uBAAqB,eAAgB;AAAA,oBACrC,MAAM,UAAU,MACf,uBAAqB,gBAAiB;AAAA,kBACxC;AAAA,kBAGC;AAAA;AAAA,cACH;AAAA,cACA;AAAA,gBAAC;AAAA;AAAA,kBACA,WAAY,uBAAqB,eAAgB;AAAA,kBACjD,MAAO;AAAA,kBACP,MAAO;AAAA;AAAA,cACR;AAAA;AAAA;AAAA,QACD;AAAA;AAAA,IACD;AAAA,EAEF;AACD;",
4
+ "sourcesContent": ["import { Select as _Select } from '@base-ui/react/select';\nimport clsx from 'clsx';\nimport { forwardRef } from '@wordpress/element';\nimport { chevronDown } from '@wordpress/icons';\nimport focusStyles from '../../../utils/css/focus.module.css';\nimport selectTriggerStyles from '../../../utils/css/select-trigger.module.css';\nimport { InputLayout } from '../input-layout';\nimport { Icon } from '../../../icon';\nimport type { SelectTriggerProps } from './types';\n\nexport const Trigger = forwardRef< HTMLButtonElement, SelectTriggerProps >(\n\tfunction Trigger(\n\t\t{ className, size, variant, children, ...restProps },\n\t\tref\n\t) {\n\t\treturn (\n\t\t\t<InputLayout\n\t\t\t\tclassName={ clsx(\n\t\t\t\t\tfocusStyles[ 'outset-ring--focus-within-except-active' ],\n\t\t\t\t\tselectTriggerStyles[ 'trigger-wrapper' ],\n\t\t\t\t\tvariant === 'minimal' &&\n\t\t\t\t\t\tselectTriggerStyles[ 'is-minimal' ],\n\t\t\t\t\tclassName\n\t\t\t\t) }\n\t\t\t\tsize={ size }\n\t\t\t\tisBorderless={ variant === 'minimal' }\n\t\t\t>\n\t\t\t\t<_Select.Trigger\n\t\t\t\t\t{ ...restProps }\n\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\tselectTriggerStyles.trigger,\n\t\t\t\t\t\tvariant === 'minimal' &&\n\t\t\t\t\t\t\tselectTriggerStyles[ 'is-minimal' ]\n\t\t\t\t\t) }\n\t\t\t\t\tdata-can-disable-input-layout\n\t\t\t\t\tref={ ref }\n\t\t\t\t>\n\t\t\t\t\t<_Select.Value\n\t\t\t\t\t\tclassName={ ( state ) =>\n\t\t\t\t\t\t\tclsx(\n\t\t\t\t\t\t\t\tselectTriggerStyles[ 'trigger-value' ],\n\t\t\t\t\t\t\t\tstate.value === '' &&\n\t\t\t\t\t\t\t\t\tselectTriggerStyles[ 'is-placeholder' ]\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}\n\t\t\t\t\t>\n\t\t\t\t\t\t{ children }\n\t\t\t\t\t</_Select.Value>\n\t\t\t\t\t<Icon\n\t\t\t\t\t\tclassName={ selectTriggerStyles[ 'trigger-caret' ] }\n\t\t\t\t\t\ticon={ chevronDown }\n\t\t\t\t\t\tsize={ 18 }\n\t\t\t\t\t/>\n\t\t\t\t</_Select.Trigger>\n\t\t\t</InputLayout>\n\t\t);\n\t}\n);\n", "if (typeof document !== 'undefined' && process.env.NODE_ENV !== 'test' && !document.head.querySelector(\"style[data-wp-hash='2a5ab8f3a7']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"2a5ab8f3a7\");\n\tstyle.appendChild(document.createTextNode(\"@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-utilities{._08e8a2e44959f892__outset-ring--focus,._970d04df7376df67__outset-ring--focus-within-except-active,.c5cb3ee4bddaa8e4__outset-ring--focus-within-visible,.cd83dfc2126a0846__outset-ring--focus-within,.d0541bc9dd9dc7b6__outset-ring--focus-visible,.e25b2bdd7aa21721__outset-ring--focus-except-active,.ecadb9e080e2dfa5__outset-ring--focus-parent-visible{@media not (prefers-reduced-motion){--_gcd-a-transition:outline 0.1s ease-out;transition:outline .1s ease-out}outline:0 solid #0000;outline-offset:1px}._08e8a2e44959f892__outset-ring--focus:focus,._970d04df7376df67__outset-ring--focus-within-except-active:focus-within:not(:has(:active)),.c5cb3ee4bddaa8e4__outset-ring--focus-within-visible:focus-within:has(:focus-visible),.cd83dfc2126a0846__outset-ring--focus-within:focus-within,.d0541bc9dd9dc7b6__outset-ring--focus-visible:focus-visible,.e25b2bdd7aa21721__outset-ring--focus-except-active:focus:not(:active),:focus-visible .ecadb9e080e2dfa5__outset-ring--focus-parent-visible{--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus-brand,var(--wp-admin-theme-color,#3858e9));--_gcd-div-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus-brand,var(--wp-admin-theme-color,#3858e9));outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus-brand,var(--wp-admin-theme-color,#3858e9))}}\"));\n\tdocument.head.appendChild(style);\n}\nexport default {\"outset-ring--focus\":\"_08e8a2e44959f892__outset-ring--focus\",\"outset-ring--focus-except-active\":\"e25b2bdd7aa21721__outset-ring--focus-except-active\",\"outset-ring--focus-visible\":\"d0541bc9dd9dc7b6__outset-ring--focus-visible\",\"outset-ring--focus-within\":\"cd83dfc2126a0846__outset-ring--focus-within\",\"outset-ring--focus-within-except-active\":\"_970d04df7376df67__outset-ring--focus-within-except-active\",\"outset-ring--focus-within-visible\":\"c5cb3ee4bddaa8e4__outset-ring--focus-within-visible\",\"outset-ring--focus-parent-visible\":\"ecadb9e080e2dfa5__outset-ring--focus-parent-visible\"};\n", "if (typeof document !== 'undefined' && process.env.NODE_ENV !== 'test' && !document.head.querySelector(\"style[data-wp-hash='30745c0b5f']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"30745c0b5f\");\n\tstyle.appendChild(document.createTextNode(\"@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-utilities{._6e4e0445ef20426b__trigger-wrapper{&.fa98c865fb77e675__is-minimal{width:fit-content}}._7893295e3f6d1af7__trigger{align-items:center;background-color:initial;border:none;color:var(--wpds-color-fg-interactive-neutral,#1e1e1e);cursor:var(--wpds-cursor-control,pointer);display:flex;font-family:inherit;font-size:inherit;gap:var(--wpds-dimension-gap-xs,4px);justify-content:space-between;line-height:1.4;padding-block:4px;padding-inline-end:calc(var(--wp-ui-input-layout-padding-inline) - 4px);padding-inline-start:var(--wp-ui-input-layout-padding-inline);text-align:start;user-select:none;width:100%;&.fa98c865fb77e675__is-minimal{width:auto}&:focus{outline:none}&[data-disabled]{background-color:var(--wpds-color-bg-interactive-neutral-weak-disabled,#0000);color:var(--wpds-color-fg-interactive-neutral-disabled,#8a8a8a)}}.e760c9339965ce84__trigger-value{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;&.c67f9ed393747f3f__is-placeholder{color:var(--wpds-color-fg-interactive-neutral-disabled,#8a8a8a)}}._308bc63e43681f99__trigger-caret{flex:0 0 auto}}\"));\n\tdocument.head.appendChild(style);\n}\nexport default {\"trigger-wrapper\":\"_6e4e0445ef20426b__trigger-wrapper\",\"is-minimal\":\"fa98c865fb77e675__is-minimal\",\"trigger\":\"_7893295e3f6d1af7__trigger\",\"trigger-value\":\"e760c9339965ce84__trigger-value\",\"is-placeholder\":\"c67f9ed393747f3f__is-placeholder\",\"trigger-caret\":\"_308bc63e43681f99__trigger-caret\"};\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAAkC;AAClC,kBAAiB;AACjB,qBAA2B;AAC3B,mBAA4B;;;ACH5B,IAAI,OAAO,aAAa,eAAe,QAAQ,IAAI,aAAa,UAAU,CAAC,SAAS,KAAK,cAAc,kCAAkC,GAAG;AAC3I,QAAM,QAAQ,SAAS,cAAc,OAAO;AAC5C,QAAM,aAAa,gBAAgB,YAAY;AAC/C,QAAM,YAAY,SAAS,eAAe,siDAAsiD,CAAC;AACjlD,WAAS,KAAK,YAAY,KAAK;AAChC;AACA,IAAO,gBAAQ,EAAC,sBAAqB,yCAAwC,oCAAmC,sDAAqD,8BAA6B,gDAA+C,6BAA4B,+CAA8C,2CAA0C,8DAA6D,qCAAoC,uDAAsD,qCAAoC,sDAAqD;;;ACNrlB,IAAI,OAAO,aAAa,eAAe,QAAQ,IAAI,aAAa,UAAU,CAAC,SAAS,KAAK,cAAc,kCAAkC,GAAG;AAC3I,QAAM,QAAQ,SAAS,cAAc,OAAO;AAC5C,QAAM,aAAa,gBAAgB,YAAY;AAC/C,QAAM,YAAY,SAAS,eAAe,4oCAA4oC,CAAC;AACvrC,WAAS,KAAK,YAAY,KAAK;AAChC;AACA,IAAO,yBAAQ,EAAC,mBAAkB,sCAAqC,cAAa,gCAA+B,WAAU,8BAA6B,iBAAgB,mCAAkC,kBAAiB,oCAAmC,iBAAgB,mCAAkC;;;AFAlT,0BAA4B;AAC5B,kBAAqB;AAoBjB;AAjBG,IAAM,cAAU;AAAA,EACtB,SAASA,SACR,EAAE,WAAW,MAAM,SAAS,UAAU,GAAG,UAAU,GACnD,KACC;AACD,WACC;AAAA,MAAC;AAAA;AAAA,QACA,eAAY,YAAAC;AAAA,UACX,cAAa,yCAA0C;AAAA,UACvD,uBAAqB,iBAAkB;AAAA,UACvC,YAAY,aACX,uBAAqB,YAAa;AAAA,UACnC;AAAA,QACD;AAAA,QACA;AAAA,QACA,cAAe,YAAY;AAAA,QAE3B;AAAA,UAAC,cAAAC,OAAQ;AAAA,UAAR;AAAA,YACE,GAAG;AAAA,YACL,eAAY,YAAAD;AAAA,cACX,uBAAoB;AAAA,cACpB,YAAY,aACX,uBAAqB,YAAa;AAAA,YACpC;AAAA,YACA,iCAA6B;AAAA,YAC7B;AAAA,YAEA;AAAA;AAAA,gBAAC,cAAAC,OAAQ;AAAA,gBAAR;AAAA,kBACA,WAAY,CAAE,cACb,YAAAD;AAAA,oBACC,uBAAqB,eAAgB;AAAA,oBACrC,MAAM,UAAU,MACf,uBAAqB,gBAAiB;AAAA,kBACxC;AAAA,kBAGC;AAAA;AAAA,cACH;AAAA,cACA;AAAA,gBAAC;AAAA;AAAA,kBACA,WAAY,uBAAqB,eAAgB;AAAA,kBACjD,MAAO;AAAA,kBACP,MAAO;AAAA;AAAA,cACR;AAAA;AAAA;AAAA,QACD;AAAA;AAAA,IACD;AAAA,EAEF;AACD;",
6
6
  "names": ["Trigger", "clsx", "_Select"]
7
7
  }
@@ -48,6 +48,17 @@ var style_default = { "wrapper": "_1e441c22c9dc5d28__wrapper", "textarea": "_414
48
48
 
49
49
  // packages/ui/src/form/primitives/textarea/textarea.tsx
50
50
  var import_input = require("../input/index.cjs");
51
+
52
+ // packages/ui/src/utils/css/global-css-defense.module.css
53
+ if (typeof document !== "undefined" && process.env.NODE_ENV !== "test" && !document.head.querySelector("style[data-wp-hash='3bd1d35622']")) {
54
+ const style = document.createElement("style");
55
+ style.setAttribute("data-wp-hash", "3bd1d35622");
56
+ style.appendChild(document.createTextNode("._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,#8a8a8a))}&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-fg-interactive-neutral-disabled,#8a8a8a))}}&: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-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)}"));
57
+ document.head.appendChild(style);
58
+ }
59
+ 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" };
60
+
61
+ // packages/ui/src/form/primitives/textarea/textarea.tsx
51
62
  var import_jsx_runtime = require("react/jsx-runtime");
52
63
  var wrappedRender = (render, restProps) => {
53
64
  return function textareaRender(props) {
@@ -73,7 +84,15 @@ var Textarea = (0, import_element.forwardRef)(
73
84
  style,
74
85
  render: wrappedRender(
75
86
  render || ((props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("textarea", { ...props })),
76
- { className: style_default.textarea, ref, rows, ...restProps }
87
+ {
88
+ className: (0, import_clsx.default)(
89
+ global_css_defense_default.textarea,
90
+ style_default.textarea
91
+ ),
92
+ ref,
93
+ rows,
94
+ ...restProps
95
+ }
77
96
  ),
78
97
  value,
79
98
  defaultValue,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../src/form/primitives/textarea/textarea.tsx", "../../../../src/form/primitives/textarea/style.module.css"],
4
- "sourcesContent": ["import { mergeProps } from '@base-ui/react';\nimport clsx from 'clsx';\nimport { cloneElement, forwardRef } from '@wordpress/element';\nimport styles from './style.module.css';\nimport type { TextareaProps } from './types';\nimport { Input } from '../input';\n\nconst wrappedRender = (\n\trender: NonNullable< TextareaProps[ 'render' ] >,\n\trestProps: TextareaProps & { ref: React.Ref< HTMLTextAreaElement > }\n) => {\n\treturn function textareaRender(\n\t\tprops: React.HTMLAttributes< HTMLTextAreaElement >\n\t) {\n\t\treturn typeof render === 'function'\n\t\t\t? render( mergeProps( props, restProps ) )\n\t\t\t: cloneElement( render, mergeProps( props, restProps ) );\n\t};\n};\n\nexport const Textarea = forwardRef< HTMLTextAreaElement, TextareaProps >(\n\tfunction Textarea(\n\t\t{\n\t\t\tclassName,\n\t\t\tdefaultValue,\n\t\t\tdisabled,\n\t\t\tonValueChange,\n\t\t\trender,\n\t\t\trows = 4,\n\t\t\tstyle,\n\t\t\tvalue,\n\t\t\t...restProps\n\t\t},\n\t\tref\n\t) {\n\t\treturn (\n\t\t\t<Input\n\t\t\t\tclassName={ clsx( styles.wrapper, className ) }\n\t\t\t\tstyle={ style }\n\t\t\t\trender={ wrappedRender(\n\t\t\t\t\trender || ( ( props ) => <textarea { ...props } /> ),\n\t\t\t\t\t{ className: styles.textarea, ref, rows, ...restProps }\n\t\t\t\t) }\n\t\t\t\tvalue={ value }\n\t\t\t\tdefaultValue={ defaultValue }\n\t\t\t\tonValueChange={ onValueChange }\n\t\t\t\tdisabled={ disabled }\n\t\t\t/>\n\t\t);\n\t}\n);\n", "if (typeof document !== 'undefined' && process.env.NODE_ENV !== 'test' && !document.head.querySelector(\"style[data-wp-hash='1485e116be']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"1485e116be\");\n\tstyle.appendChild(document.createTextNode(\"@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._1e441c22c9dc5d28__wrapper{--wp-ui-textarea-min-height:40px}._414844876c32ecee__textarea{min-height:calc(var(--wp-ui-textarea-min-height) - 2px);resize:block}}@layer wp-ui-compositions{._1e441c22c9dc5d28__wrapper{--wp-ui-input-padding-block:9.9px;height:auto;line-height:1.4}}\"));\n\tdocument.head.appendChild(style);\n}\nexport default {\"wrapper\":\"_1e441c22c9dc5d28__wrapper\",\"textarea\":\"_414844876c32ecee__textarea\"};\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA2B;AAC3B,kBAAiB;AACjB,qBAAyC;;;ACFzC,IAAI,OAAO,aAAa,eAAe,QAAQ,IAAI,aAAa,UAAU,CAAC,SAAS,KAAK,cAAc,kCAAkC,GAAG;AAC3I,QAAM,QAAQ,SAAS,cAAc,OAAO;AAC5C,QAAM,aAAa,gBAAgB,YAAY;AAC/C,QAAM,YAAY,SAAS,eAAe,6XAA6X,CAAC;AACxa,WAAS,KAAK,YAAY,KAAK;AAChC;AACA,IAAO,gBAAQ,EAAC,WAAU,8BAA6B,YAAW,8BAA6B;;;ADD/F,mBAAsB;AAmCQ;AAjC9B,IAAM,gBAAgB,CACrB,QACA,cACI;AACJ,SAAO,SAAS,eACf,OACC;AACD,WAAO,OAAO,WAAW,aACtB,WAAQ,yBAAY,OAAO,SAAU,CAAE,QACvC,6BAAc,YAAQ,yBAAY,OAAO,SAAU,CAAE;AAAA,EACzD;AACD;AAEO,IAAM,eAAW;AAAA,EACvB,SAASA,UACR;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,OAAO;AAAA,IACP;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACJ,GACA,KACC;AACD,WACC;AAAA,MAAC;AAAA;AAAA,QACA,eAAY,YAAAC,SAAM,cAAO,SAAS,SAAU;AAAA,QAC5C;AAAA,QACA,QAAS;AAAA,UACR,WAAY,CAAE,UAAW,4CAAC,cAAW,GAAG,OAAQ;AAAA,UAChD,EAAE,WAAW,cAAO,UAAU,KAAK,MAAM,GAAG,UAAU;AAAA,QACvD;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA;AAAA,IACD;AAAA,EAEF;AACD;",
3
+ "sources": ["../../../../src/form/primitives/textarea/textarea.tsx", "../../../../src/form/primitives/textarea/style.module.css", "../../../../src/utils/css/global-css-defense.module.css"],
4
+ "sourcesContent": ["import { mergeProps } from '@base-ui/react';\nimport clsx from 'clsx';\nimport { cloneElement, forwardRef } from '@wordpress/element';\nimport styles from './style.module.css';\nimport type { TextareaProps } from './types';\nimport { Input } from '../input';\nimport defenseStyles from '../../../utils/css/global-css-defense.module.css';\n\nconst wrappedRender = (\n\trender: NonNullable< TextareaProps[ 'render' ] >,\n\trestProps: TextareaProps & { ref: React.Ref< HTMLTextAreaElement > }\n) => {\n\treturn function textareaRender(\n\t\tprops: React.HTMLAttributes< HTMLTextAreaElement >\n\t) {\n\t\treturn typeof render === 'function'\n\t\t\t? render( mergeProps( props, restProps ) )\n\t\t\t: cloneElement( render, mergeProps( props, restProps ) );\n\t};\n};\n\nexport const Textarea = forwardRef< HTMLTextAreaElement, TextareaProps >(\n\tfunction Textarea(\n\t\t{\n\t\t\tclassName,\n\t\t\tdefaultValue,\n\t\t\tdisabled,\n\t\t\tonValueChange,\n\t\t\trender,\n\t\t\trows = 4,\n\t\t\tstyle,\n\t\t\tvalue,\n\t\t\t...restProps\n\t\t},\n\t\tref\n\t) {\n\t\treturn (\n\t\t\t<Input\n\t\t\t\tclassName={ clsx( styles.wrapper, className ) }\n\t\t\t\tstyle={ style }\n\t\t\t\trender={ wrappedRender(\n\t\t\t\t\trender || ( ( props ) => <textarea { ...props } /> ),\n\t\t\t\t\t{\n\t\t\t\t\t\tclassName: clsx(\n\t\t\t\t\t\t\tdefenseStyles.textarea,\n\t\t\t\t\t\t\tstyles.textarea\n\t\t\t\t\t\t),\n\t\t\t\t\t\tref,\n\t\t\t\t\t\trows,\n\t\t\t\t\t\t...restProps,\n\t\t\t\t\t}\n\t\t\t\t) }\n\t\t\t\tvalue={ value }\n\t\t\t\tdefaultValue={ defaultValue }\n\t\t\t\tonValueChange={ onValueChange }\n\t\t\t\tdisabled={ disabled }\n\t\t\t/>\n\t\t);\n\t}\n);\n", "if (typeof document !== 'undefined' && process.env.NODE_ENV !== 'test' && !document.head.querySelector(\"style[data-wp-hash='1485e116be']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"1485e116be\");\n\tstyle.appendChild(document.createTextNode(\"@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._1e441c22c9dc5d28__wrapper{--wp-ui-textarea-min-height:40px}._414844876c32ecee__textarea{min-height:calc(var(--wp-ui-textarea-min-height) - 2px);resize:block}}@layer wp-ui-compositions{._1e441c22c9dc5d28__wrapper{--wp-ui-input-padding-block:9.9px;height:auto;line-height:1.4}}\"));\n\tdocument.head.appendChild(style);\n}\nexport default {\"wrapper\":\"_1e441c22c9dc5d28__wrapper\",\"textarea\":\"_414844876c32ecee__textarea\"};\n", "if (typeof document !== 'undefined' && process.env.NODE_ENV !== 'test' && !document.head.querySelector(\"style[data-wp-hash='3bd1d35622']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"3bd1d35622\");\n\tstyle.appendChild(document.createTextNode(\"._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,#8a8a8a))}&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-fg-interactive-neutral-disabled,#8a8a8a))}}&: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-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)}\"));\n\tdocument.head.appendChild(style);\n}\nexport default {\"button\":\"_6defc79820e382c6__button\",\"input\":\"d2cff2e5dea83bd1__input\",\"textarea\":\"_547d86373d02e108__textarea\",\"div\":\"_8c15fd0ed9f28ba4__div\",\"p\":\"_43cec3e1eec1066d__p\",\"heading\":\"e97669c6d9a38497__heading\",\"a\":\"_2c0831b0499dbd6e__a\"};\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA2B;AAC3B,kBAAiB;AACjB,qBAAyC;;;ACFzC,IAAI,OAAO,aAAa,eAAe,QAAQ,IAAI,aAAa,UAAU,CAAC,SAAS,KAAK,cAAc,kCAAkC,GAAG;AAC3I,QAAM,QAAQ,SAAS,cAAc,OAAO;AAC5C,QAAM,aAAa,gBAAgB,YAAY;AAC/C,QAAM,YAAY,SAAS,eAAe,6XAA6X,CAAC;AACxa,WAAS,KAAK,YAAY,KAAK;AAChC;AACA,IAAO,gBAAQ,EAAC,WAAU,8BAA6B,YAAW,8BAA6B;;;ADD/F,mBAAsB;;;AELtB,IAAI,OAAO,aAAa,eAAe,QAAQ,IAAI,aAAa,UAAU,CAAC,SAAS,KAAK,cAAc,kCAAkC,GAAG;AAC3I,QAAM,QAAQ,SAAS,cAAc,OAAO;AAC5C,QAAM,aAAa,gBAAgB,YAAY;AAC/C,QAAM,YAAY,SAAS,eAAe,gvFAAgvF,CAAC;AAC3xF,WAAS,KAAK,YAAY,KAAK;AAChC;AACA,IAAO,6BAAQ,EAAC,UAAS,6BAA4B,SAAQ,2BAA0B,YAAW,+BAA8B,OAAM,0BAAyB,KAAI,wBAAuB,WAAU,6BAA4B,KAAI,uBAAsB;;;AFmC5N;AAjC9B,IAAM,gBAAgB,CACrB,QACA,cACI;AACJ,SAAO,SAAS,eACf,OACC;AACD,WAAO,OAAO,WAAW,aACtB,WAAQ,yBAAY,OAAO,SAAU,CAAE,QACvC,6BAAc,YAAQ,yBAAY,OAAO,SAAU,CAAE;AAAA,EACzD;AACD;AAEO,IAAM,eAAW;AAAA,EACvB,SAASA,UACR;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,OAAO;AAAA,IACP;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACJ,GACA,KACC;AACD,WACC;AAAA,MAAC;AAAA;AAAA,QACA,eAAY,YAAAC,SAAM,cAAO,SAAS,SAAU;AAAA,QAC5C;AAAA,QACA,QAAS;AAAA,UACR,WAAY,CAAE,UAAW,4CAAC,cAAW,GAAG,OAAQ;AAAA,UAChD;AAAA,YACC,eAAW,YAAAA;AAAA,cACV,2BAAc;AAAA,cACd,cAAO;AAAA,YACR;AAAA,YACA;AAAA,YACA;AAAA,YACA,GAAG;AAAA,UACJ;AAAA,QACD;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA;AAAA,IACD;AAAA,EAEF;AACD;",
6
6
  "names": ["Textarea", "clsx"]
7
7
  }
package/build/index.cjs CHANGED
@@ -38,6 +38,7 @@ __export(index_exports, {
38
38
  Dialog: () => Dialog,
39
39
  EmptyState: () => EmptyState,
40
40
  Notice: () => Notice,
41
+ Popover: () => Popover,
41
42
  Tabs: () => Tabs,
42
43
  Tooltip: () => Tooltip
43
44
  });
@@ -55,6 +56,7 @@ __reExport(index_exports, require("./icon/index.cjs"), module.exports);
55
56
  __reExport(index_exports, require("./icon-button/index.cjs"), module.exports);
56
57
  __reExport(index_exports, require("./link/index.cjs"), module.exports);
57
58
  var Notice = __toESM(require("./notice/index.cjs"));
59
+ var Popover = __toESM(require("./popover/index.cjs"));
58
60
  __reExport(index_exports, require("./stack/index.cjs"), module.exports);
59
61
  var Tabs = __toESM(require("./tabs/index.cjs"));
60
62
  __reExport(index_exports, require("./text/index.cjs"), module.exports);
@@ -69,6 +71,7 @@ __reExport(index_exports, require("./visually-hidden/index.cjs"), module.exports
69
71
  Dialog,
70
72
  EmptyState,
71
73
  Notice,
74
+ Popover,
72
75
  Tabs,
73
76
  Tooltip,
74
77
  ...require("./badge/index.cjs"),
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/index.ts"],
4
- "sourcesContent": ["export * from './badge';\nexport * from './button';\nexport * as Card from './card';\nexport * as Collapsible from './collapsible';\nexport * as CollapsibleCard from './collapsible-card';\nexport * as AlertDialog from './alert-dialog';\nexport * as Dialog from './dialog';\nexport * as EmptyState from './empty-state';\nexport * from './form';\nexport * from './icon';\nexport * from './icon-button';\nexport * from './link';\nexport * as Notice from './notice';\nexport * from './stack';\nexport * as Tabs from './tabs';\nexport * from './text';\nexport * as Tooltip from './tooltip';\nexport * from './visually-hidden';\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAAc,8BAAd;AACA,0BAAc,+BADd;AAEA,WAAsB;AACtB,kBAA6B;AAC7B,sBAAiC;AACjC,kBAA6B;AAC7B,aAAwB;AACxB,iBAA4B;AAC5B,0BAAc,6BARd;AASA,0BAAc,6BATd;AAUA,0BAAc,oCAVd;AAWA,0BAAc,6BAXd;AAYA,aAAwB;AACxB,0BAAc,8BAbd;AAcA,WAAsB;AACtB,0BAAc,6BAfd;AAgBA,cAAyB;AACzB,0BAAc,wCAjBd;",
4
+ "sourcesContent": ["export * from './badge';\nexport * from './button';\nexport * as Card from './card';\nexport * as Collapsible from './collapsible';\nexport * as CollapsibleCard from './collapsible-card';\nexport * as AlertDialog from './alert-dialog';\nexport * as Dialog from './dialog';\nexport * as EmptyState from './empty-state';\nexport * from './form';\nexport * from './icon';\nexport * from './icon-button';\nexport * from './link';\nexport * as Notice from './notice';\nexport * as Popover from './popover';\nexport * from './stack';\nexport * as Tabs from './tabs';\nexport * from './text';\nexport * as Tooltip from './tooltip';\nexport * from './visually-hidden';\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAAc,8BAAd;AACA,0BAAc,+BADd;AAEA,WAAsB;AACtB,kBAA6B;AAC7B,sBAAiC;AACjC,kBAA6B;AAC7B,aAAwB;AACxB,iBAA4B;AAC5B,0BAAc,6BARd;AASA,0BAAc,6BATd;AAUA,0BAAc,oCAVd;AAWA,0BAAc,6BAXd;AAYA,aAAwB;AACxB,cAAyB;AACzB,0BAAc,8BAdd;AAeA,WAAsB;AACtB,0BAAc,6BAhBd;AAiBA,cAAyB;AACzB,0BAAc,wCAlBd;",
6
6
  "names": []
7
7
  }
@@ -48,23 +48,32 @@ if (typeof document !== "undefined" && process.env.NODE_ENV !== "test" && !docum
48
48
  var resets_default = { "box-sizing": "_336cd3e4e743482f__box-sizing" };
49
49
 
50
50
  // packages/ui/src/utils/css/focus.module.css
51
- if (typeof document !== "undefined" && process.env.NODE_ENV !== "test" && !document.head.querySelector("style[data-wp-hash='4acd2b57a1']")) {
51
+ if (typeof document !== "undefined" && process.env.NODE_ENV !== "test" && !document.head.querySelector("style[data-wp-hash='2a5ab8f3a7']")) {
52
52
  const style = document.createElement("style");
53
- style.setAttribute("data-wp-hash", "4acd2b57a1");
54
- style.appendChild(document.createTextNode("@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-utilities{._08e8a2e44959f892__outset-ring--focus,._970d04df7376df67__outset-ring--focus-within-except-active,.c5cb3ee4bddaa8e4__outset-ring--focus-within-visible,.cd83dfc2126a0846__outset-ring--focus-within,.d0541bc9dd9dc7b6__outset-ring--focus-visible,.e25b2bdd7aa21721__outset-ring--focus-except-active,.ecadb9e080e2dfa5__outset-ring--focus-parent-visible{@media not (prefers-reduced-motion){transition:outline .1s ease-out}outline-color:#0000;outline-offset:1px;outline-style:solid;outline-width:0}._08e8a2e44959f892__outset-ring--focus:focus,._970d04df7376df67__outset-ring--focus-within-except-active:focus-within:not(:has(:active)),.c5cb3ee4bddaa8e4__outset-ring--focus-within-visible:focus-within:has(:focus-visible),.cd83dfc2126a0846__outset-ring--focus-within:focus-within,.d0541bc9dd9dc7b6__outset-ring--focus-visible:focus-visible,.e25b2bdd7aa21721__outset-ring--focus-except-active:focus:not(:active),:focus-visible .ecadb9e080e2dfa5__outset-ring--focus-parent-visible{outline-color:var(--wpds-color-stroke-focus-brand,var(--wp-admin-theme-color,#3858e9));outline-width:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}"));
53
+ style.setAttribute("data-wp-hash", "2a5ab8f3a7");
54
+ style.appendChild(document.createTextNode("@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-utilities{._08e8a2e44959f892__outset-ring--focus,._970d04df7376df67__outset-ring--focus-within-except-active,.c5cb3ee4bddaa8e4__outset-ring--focus-within-visible,.cd83dfc2126a0846__outset-ring--focus-within,.d0541bc9dd9dc7b6__outset-ring--focus-visible,.e25b2bdd7aa21721__outset-ring--focus-except-active,.ecadb9e080e2dfa5__outset-ring--focus-parent-visible{@media not (prefers-reduced-motion){--_gcd-a-transition:outline 0.1s ease-out;transition:outline .1s ease-out}outline:0 solid #0000;outline-offset:1px}._08e8a2e44959f892__outset-ring--focus:focus,._970d04df7376df67__outset-ring--focus-within-except-active:focus-within:not(:has(:active)),.c5cb3ee4bddaa8e4__outset-ring--focus-within-visible:focus-within:has(:focus-visible),.cd83dfc2126a0846__outset-ring--focus-within:focus-within,.d0541bc9dd9dc7b6__outset-ring--focus-visible:focus-visible,.e25b2bdd7aa21721__outset-ring--focus-except-active:focus:not(:active),:focus-visible .ecadb9e080e2dfa5__outset-ring--focus-parent-visible{--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus-brand,var(--wp-admin-theme-color,#3858e9));--_gcd-div-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus-brand,var(--wp-admin-theme-color,#3858e9));outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus-brand,var(--wp-admin-theme-color,#3858e9))}}"));
55
55
  document.head.appendChild(style);
56
56
  }
57
57
  var focus_default = { "outset-ring--focus": "_08e8a2e44959f892__outset-ring--focus", "outset-ring--focus-except-active": "e25b2bdd7aa21721__outset-ring--focus-except-active", "outset-ring--focus-visible": "d0541bc9dd9dc7b6__outset-ring--focus-visible", "outset-ring--focus-within": "cd83dfc2126a0846__outset-ring--focus-within", "outset-ring--focus-within-except-active": "_970d04df7376df67__outset-ring--focus-within-except-active", "outset-ring--focus-within-visible": "c5cb3ee4bddaa8e4__outset-ring--focus-within-visible", "outset-ring--focus-parent-visible": "ecadb9e080e2dfa5__outset-ring--focus-parent-visible" };
58
58
 
59
59
  // packages/ui/src/link/style.module.css
60
- if (typeof document !== "undefined" && process.env.NODE_ENV !== "test" && !document.head.querySelector("style[data-wp-hash='ced84b3704']")) {
60
+ if (typeof document !== "undefined" && process.env.NODE_ENV !== "test" && !document.head.querySelector("style[data-wp-hash='f197386fe0']")) {
61
61
  const style = document.createElement("style");
62
- style.setAttribute("data-wp-hash", "ced84b3704");
63
- style.appendChild(document.createTextNode('@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{.d4250949359b05ce__link{text-decoration-thickness:.5px;text-underline-offset:.2em}.c6055659b8e2cd2c__is-brand,.c6055659b8e2cd2c__is-brand:visited{color:var(--wpds-color-fg-interactive-brand,var(--wp-admin-theme-color,#3858e9))}.c6055659b8e2cd2c__is-brand:active,.c6055659b8e2cd2c__is-brand:hover{color:var(--wpds-color-fg-interactive-brand-active,var(--wp-admin-theme-color,#3858e9))}._92e0dfcaeee15b88__is-neutral,._92e0dfcaeee15b88__is-neutral:visited{color:var(--wpds-color-fg-interactive-neutral,#1e1e1e);text-decoration-color:var(--wpds-color-stroke-interactive-neutral,#8a8a8a)}._92e0dfcaeee15b88__is-neutral:active,._92e0dfcaeee15b88__is-neutral:hover{color:var(--wpds-color-fg-interactive-neutral-active,#1e1e1e)}.cf122a9bf1035d42__is-unstyled{color:inherit;text-decoration:none}.e6ad7c380ee337fe__has-link-icon{text-decoration:none}._8dc7567f9ff415bf__link-contents{text-decoration:underline;text-decoration-color:inherit;text-decoration-thickness:.5px}._0cb411afac4c86c7__link-icon{font-weight:var(--wpds-font-weight-regular,400);margin-inline-start:var(--wpds-dimension-padding-xs,4px)}._0cb411afac4c86c7__link-icon:after{content:"\\2197"}._0cb411afac4c86c7__link-icon:dir(rtl):after{content:"\\2196"}}'));
62
+ style.setAttribute("data-wp-hash", "f197386fe0");
63
+ style.appendChild(document.createTextNode('@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{.d4250949359b05ce__link{text-decoration-thickness:.5px;text-underline-offset:.2em}.c6055659b8e2cd2c__is-brand,.c6055659b8e2cd2c__is-brand:visited{--_gcd-a-color:var(--wpds-color-fg-interactive-brand,var(--wp-admin-theme-color,#3858e9));color:var(--wpds-color-fg-interactive-brand,var(--wp-admin-theme-color,#3858e9))}.c6055659b8e2cd2c__is-brand:active,.c6055659b8e2cd2c__is-brand:hover{--_gcd-a-color:var(--wpds-color-fg-interactive-brand-active,var(--wp-admin-theme-color,#3858e9));color:var(--wpds-color-fg-interactive-brand-active,var(--wp-admin-theme-color,#3858e9))}._92e0dfcaeee15b88__is-neutral,._92e0dfcaeee15b88__is-neutral:visited{--_gcd-a-color:var(--wpds-color-fg-interactive-neutral,#1e1e1e);color:var(--wpds-color-fg-interactive-neutral,#1e1e1e);text-decoration-color:var(--wpds-color-stroke-interactive-neutral,#8a8a8a)}._92e0dfcaeee15b88__is-neutral:active,._92e0dfcaeee15b88__is-neutral:hover{--_gcd-a-color:var(--wpds-color-fg-interactive-neutral-active,#1e1e1e);color:var(--wpds-color-fg-interactive-neutral-active,#1e1e1e)}.cf122a9bf1035d42__is-unstyled{--_gcd-a-color:inherit;color:inherit;text-decoration:none}.e6ad7c380ee337fe__has-link-icon{text-decoration:none}._8dc7567f9ff415bf__link-contents{text-decoration:underline;text-decoration-color:inherit;text-decoration-thickness:.5px}._0cb411afac4c86c7__link-icon{font-weight:var(--wpds-font-weight-regular,400);margin-inline-start:var(--wpds-dimension-padding-xs,4px)}._0cb411afac4c86c7__link-icon:after{content:"\\2197"}._0cb411afac4c86c7__link-icon:dir(rtl):after{content:"\\2196"}}'));
64
64
  document.head.appendChild(style);
65
65
  }
66
66
  var style_default = { "link": "d4250949359b05ce__link", "is-brand": "c6055659b8e2cd2c__is-brand", "is-neutral": "_92e0dfcaeee15b88__is-neutral", "is-unstyled": "cf122a9bf1035d42__is-unstyled", "has-link-icon": "e6ad7c380ee337fe__has-link-icon", "link-contents": "_8dc7567f9ff415bf__link-contents", "link-icon": "_0cb411afac4c86c7__link-icon" };
67
67
 
68
+ // packages/ui/src/utils/css/global-css-defense.module.css
69
+ if (typeof document !== "undefined" && process.env.NODE_ENV !== "test" && !document.head.querySelector("style[data-wp-hash='3bd1d35622']")) {
70
+ const style = document.createElement("style");
71
+ style.setAttribute("data-wp-hash", "3bd1d35622");
72
+ style.appendChild(document.createTextNode("._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,#8a8a8a))}&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-fg-interactive-neutral-disabled,#8a8a8a))}}&: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-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)}"));
73
+ document.head.appendChild(style);
74
+ }
75
+ 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" };
76
+
68
77
  // packages/ui/src/link/link.tsx
69
78
  var import_jsx_runtime = require("react/jsx-runtime");
70
79
  var Link = (0, import_element.forwardRef)(function Link2({
@@ -90,6 +99,7 @@ var Link = (0, import_element.forwardRef)(function Link2({
90
99
  ref,
91
100
  props: (0, import_react.mergeProps)(props, {
92
101
  className: (0, import_clsx.default)(
102
+ global_css_defense_default.a,
93
103
  resets_default["box-sizing"],
94
104
  focus_default["outset-ring--focus"],
95
105
  variant !== "unstyled" && style_default.link,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../src/link/link.tsx", "../../src/utils/css/resets.module.css", "../../src/utils/css/focus.module.css", "../../src/link/style.module.css"],
4
- "sourcesContent": ["import { useRender, mergeProps } from '@base-ui/react';\nimport clsx from 'clsx';\nimport { forwardRef } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { type LinkProps } from './types';\nimport resetStyles from '../utils/css/resets.module.css';\nimport focusStyles from '../utils/css/focus.module.css';\nimport styles from './style.module.css';\n\n/**\n * A styled anchor element with support for semantic color tones and an\n * unstyled escape hatch.\n */\nexport const Link = forwardRef< HTMLAnchorElement, LinkProps >( function Link(\n\t{\n\t\tchildren,\n\t\tvariant = 'default',\n\t\ttone = 'brand',\n\t\topenInNewTab = false,\n\t\trender,\n\t\tclassName,\n\t\tonClick,\n\t\t...props\n\t},\n\tref\n) {\n\tconst isInternalAnchor = !! props.href?.startsWith( '#' );\n\n\tconst handleClick = ( event: React.MouseEvent< HTMLAnchorElement > ) => {\n\t\tif ( openInNewTab && isInternalAnchor ) {\n\t\t\tevent.preventDefault();\n\t\t}\n\t\tonClick?.( event );\n\t};\n\n\tconst element = useRender( {\n\t\trender,\n\t\tdefaultTagName: 'a',\n\t\tref,\n\t\tprops: mergeProps< 'a' >( props, {\n\t\t\tclassName: clsx(\n\t\t\t\tresetStyles[ 'box-sizing' ],\n\t\t\t\tfocusStyles[ 'outset-ring--focus' ],\n\t\t\t\tvariant !== 'unstyled' && styles.link,\n\t\t\t\tvariant !== 'unstyled' && styles[ `is-${ tone }` ],\n\t\t\t\tvariant === 'unstyled' && styles[ 'is-unstyled' ],\n\t\t\t\topenInNewTab && styles[ 'has-link-icon' ],\n\t\t\t\tclassName\n\t\t\t),\n\t\t\tonClick: handleClick,\n\t\t\ttarget: openInNewTab ? '_blank' : undefined,\n\t\t\tchildren: openInNewTab ? (\n\t\t\t\t<>\n\t\t\t\t\t<span className={ styles[ 'link-contents' ] }>\n\t\t\t\t\t\t{ children }\n\t\t\t\t\t</span>\n\t\t\t\t\t<span\n\t\t\t\t\t\tclassName={ styles[ 'link-icon' ] }\n\t\t\t\t\t\trole=\"img\"\n\t\t\t\t\t\taria-label={\n\t\t\t\t\t\t\t/* translators: accessibility text appended to link text */\n\t\t\t\t\t\t\t__( '(opens in a new tab)' )\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t</>\n\t\t\t) : (\n\t\t\t\tchildren\n\t\t\t),\n\t\t} ),\n\t} );\n\n\treturn element;\n} );\n", "if (typeof document !== 'undefined' && process.env.NODE_ENV !== 'test' && !document.head.querySelector(\"style[data-wp-hash='e3ae230cea']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"e3ae230cea\");\n\tstyle.appendChild(document.createTextNode(\"@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}\"));\n\tdocument.head.appendChild(style);\n}\nexport default {\"box-sizing\":\"_336cd3e4e743482f__box-sizing\"};\n", "if (typeof document !== 'undefined' && process.env.NODE_ENV !== 'test' && !document.head.querySelector(\"style[data-wp-hash='4acd2b57a1']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"4acd2b57a1\");\n\tstyle.appendChild(document.createTextNode(\"@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-utilities{._08e8a2e44959f892__outset-ring--focus,._970d04df7376df67__outset-ring--focus-within-except-active,.c5cb3ee4bddaa8e4__outset-ring--focus-within-visible,.cd83dfc2126a0846__outset-ring--focus-within,.d0541bc9dd9dc7b6__outset-ring--focus-visible,.e25b2bdd7aa21721__outset-ring--focus-except-active,.ecadb9e080e2dfa5__outset-ring--focus-parent-visible{@media not (prefers-reduced-motion){transition:outline .1s ease-out}outline-color:#0000;outline-offset:1px;outline-style:solid;outline-width:0}._08e8a2e44959f892__outset-ring--focus:focus,._970d04df7376df67__outset-ring--focus-within-except-active:focus-within:not(:has(:active)),.c5cb3ee4bddaa8e4__outset-ring--focus-within-visible:focus-within:has(:focus-visible),.cd83dfc2126a0846__outset-ring--focus-within:focus-within,.d0541bc9dd9dc7b6__outset-ring--focus-visible:focus-visible,.e25b2bdd7aa21721__outset-ring--focus-except-active:focus:not(:active),:focus-visible .ecadb9e080e2dfa5__outset-ring--focus-parent-visible{outline-color:var(--wpds-color-stroke-focus-brand,var(--wp-admin-theme-color,#3858e9));outline-width:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}\"));\n\tdocument.head.appendChild(style);\n}\nexport default {\"outset-ring--focus\":\"_08e8a2e44959f892__outset-ring--focus\",\"outset-ring--focus-except-active\":\"e25b2bdd7aa21721__outset-ring--focus-except-active\",\"outset-ring--focus-visible\":\"d0541bc9dd9dc7b6__outset-ring--focus-visible\",\"outset-ring--focus-within\":\"cd83dfc2126a0846__outset-ring--focus-within\",\"outset-ring--focus-within-except-active\":\"_970d04df7376df67__outset-ring--focus-within-except-active\",\"outset-ring--focus-within-visible\":\"c5cb3ee4bddaa8e4__outset-ring--focus-within-visible\",\"outset-ring--focus-parent-visible\":\"ecadb9e080e2dfa5__outset-ring--focus-parent-visible\"};\n", "if (typeof document !== 'undefined' && process.env.NODE_ENV !== 'test' && !document.head.querySelector(\"style[data-wp-hash='ced84b3704']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"ced84b3704\");\n\tstyle.appendChild(document.createTextNode(\"@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{.d4250949359b05ce__link{text-decoration-thickness:.5px;text-underline-offset:.2em}.c6055659b8e2cd2c__is-brand,.c6055659b8e2cd2c__is-brand:visited{color:var(--wpds-color-fg-interactive-brand,var(--wp-admin-theme-color,#3858e9))}.c6055659b8e2cd2c__is-brand:active,.c6055659b8e2cd2c__is-brand:hover{color:var(--wpds-color-fg-interactive-brand-active,var(--wp-admin-theme-color,#3858e9))}._92e0dfcaeee15b88__is-neutral,._92e0dfcaeee15b88__is-neutral:visited{color:var(--wpds-color-fg-interactive-neutral,#1e1e1e);text-decoration-color:var(--wpds-color-stroke-interactive-neutral,#8a8a8a)}._92e0dfcaeee15b88__is-neutral:active,._92e0dfcaeee15b88__is-neutral:hover{color:var(--wpds-color-fg-interactive-neutral-active,#1e1e1e)}.cf122a9bf1035d42__is-unstyled{color:inherit;text-decoration:none}.e6ad7c380ee337fe__has-link-icon{text-decoration:none}._8dc7567f9ff415bf__link-contents{text-decoration:underline;text-decoration-color:inherit;text-decoration-thickness:.5px}._0cb411afac4c86c7__link-icon{font-weight:var(--wpds-font-weight-regular,400);margin-inline-start:var(--wpds-dimension-padding-xs,4px)}._0cb411afac4c86c7__link-icon:after{content:\\\"\\\\2197\\\"}._0cb411afac4c86c7__link-icon:dir(rtl):after{content:\\\"\\\\2196\\\"}}\"));\n\tdocument.head.appendChild(style);\n}\nexport default {\"link\":\"d4250949359b05ce__link\",\"is-brand\":\"c6055659b8e2cd2c__is-brand\",\"is-neutral\":\"_92e0dfcaeee15b88__is-neutral\",\"is-unstyled\":\"cf122a9bf1035d42__is-unstyled\",\"has-link-icon\":\"e6ad7c380ee337fe__has-link-icon\",\"link-contents\":\"_8dc7567f9ff415bf__link-contents\",\"link-icon\":\"_0cb411afac4c86c7__link-icon\"};\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAsC;AACtC,kBAAiB;AACjB,qBAA2B;AAC3B,kBAAmB;;;ACHnB,IAAI,OAAO,aAAa,eAAe,QAAQ,IAAI,aAAa,UAAU,CAAC,SAAS,KAAK,cAAc,kCAAkC,GAAG;AAC3I,QAAM,QAAQ,SAAS,cAAc,OAAO;AAC5C,QAAM,aAAa,gBAAgB,YAAY;AAC/C,QAAM,YAAY,SAAS,eAAe,kMAAkM,CAAC;AAC7O,WAAS,KAAK,YAAY,KAAK;AAChC;AACA,IAAO,iBAAQ,EAAC,cAAa,gCAA+B;;;ACN5D,IAAI,OAAO,aAAa,eAAe,QAAQ,IAAI,aAAa,UAAU,CAAC,SAAS,KAAK,cAAc,kCAAkC,GAAG;AAC3I,QAAM,QAAQ,SAAS,cAAc,OAAO;AAC5C,QAAM,aAAa,gBAAgB,YAAY;AAC/C,QAAM,YAAY,SAAS,eAAe,8tCAA8tC,CAAC;AACzwC,WAAS,KAAK,YAAY,KAAK;AAChC;AACA,IAAO,gBAAQ,EAAC,sBAAqB,yCAAwC,oCAAmC,sDAAqD,8BAA6B,gDAA+C,6BAA4B,+CAA8C,2CAA0C,8DAA6D,qCAAoC,uDAAsD,qCAAoC,sDAAqD;;;ACNrlB,IAAI,OAAO,aAAa,eAAe,QAAQ,IAAI,aAAa,UAAU,CAAC,SAAS,KAAK,cAAc,kCAAkC,GAAG;AAC3I,QAAM,QAAQ,SAAS,cAAc,OAAO;AAC5C,QAAM,aAAa,gBAAgB,YAAY;AAC/C,QAAM,YAAY,SAAS,eAAe,qyCAAyyC,CAAC;AACp1C,WAAS,KAAK,YAAY,KAAK;AAChC;AACA,IAAO,gBAAQ,EAAC,QAAO,0BAAyB,YAAW,8BAA6B,cAAa,iCAAgC,eAAc,iCAAgC,iBAAgB,mCAAkC,iBAAgB,oCAAmC,aAAY,+BAA8B;;;AH8C9T;AAvCG,IAAM,WAAO,2BAA4C,SAASA,MACxE;AAAA,EACC;AAAA,EACA,UAAU;AAAA,EACV,OAAO;AAAA,EACP,eAAe;AAAA,EACf;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACJ,GACA,KACC;AACD,QAAM,mBAAmB,CAAC,CAAE,MAAM,MAAM,WAAY,GAAI;AAExD,QAAM,cAAc,CAAE,UAAkD;AACvE,QAAK,gBAAgB,kBAAmB;AACvC,YAAM,eAAe;AAAA,IACtB;AACA,cAAW,KAAM;AAAA,EAClB;AAEA,QAAM,cAAU,wBAAW;AAAA,IAC1B;AAAA,IACA,gBAAgB;AAAA,IAChB;AAAA,IACA,WAAO,yBAAmB,OAAO;AAAA,MAChC,eAAW,YAAAC;AAAA,QACV,eAAa,YAAa;AAAA,QAC1B,cAAa,oBAAqB;AAAA,QAClC,YAAY,cAAc,cAAO;AAAA,QACjC,YAAY,cAAc,cAAQ,MAAO,IAAK,EAAG;AAAA,QACjD,YAAY,cAAc,cAAQ,aAAc;AAAA,QAChD,gBAAgB,cAAQ,eAAgB;AAAA,QACxC;AAAA,MACD;AAAA,MACA,SAAS;AAAA,MACT,QAAQ,eAAe,WAAW;AAAA,MAClC,UAAU,eACT,4EACC;AAAA,oDAAC,UAAK,WAAY,cAAQ,eAAgB,GACvC,UACH;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACA,WAAY,cAAQ,WAAY;AAAA,YAChC,MAAK;AAAA,YACL;AAAA;AAAA,kBAEC,gBAAI,sBAAuB;AAAA;AAAA;AAAA,QAE7B;AAAA,SACD,IAEA;AAAA,IAEF,CAAE;AAAA,EACH,CAAE;AAEF,SAAO;AACR,CAAE;",
3
+ "sources": ["../../src/link/link.tsx", "../../src/utils/css/resets.module.css", "../../src/utils/css/focus.module.css", "../../src/link/style.module.css", "../../src/utils/css/global-css-defense.module.css"],
4
+ "sourcesContent": ["import { useRender, mergeProps } from '@base-ui/react';\nimport clsx from 'clsx';\nimport { forwardRef } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { type LinkProps } from './types';\nimport resetStyles from '../utils/css/resets.module.css';\nimport focusStyles from '../utils/css/focus.module.css';\nimport styles from './style.module.css';\nimport defenseStyles from '../utils/css/global-css-defense.module.css';\n\n/**\n * A styled anchor element with support for semantic color tones and an\n * unstyled escape hatch.\n */\nexport const Link = forwardRef< HTMLAnchorElement, LinkProps >( function Link(\n\t{\n\t\tchildren,\n\t\tvariant = 'default',\n\t\ttone = 'brand',\n\t\topenInNewTab = false,\n\t\trender,\n\t\tclassName,\n\t\tonClick,\n\t\t...props\n\t},\n\tref\n) {\n\tconst isInternalAnchor = !! props.href?.startsWith( '#' );\n\n\tconst handleClick = ( event: React.MouseEvent< HTMLAnchorElement > ) => {\n\t\tif ( openInNewTab && isInternalAnchor ) {\n\t\t\tevent.preventDefault();\n\t\t}\n\t\tonClick?.( event );\n\t};\n\n\tconst element = useRender( {\n\t\trender,\n\t\tdefaultTagName: 'a',\n\t\tref,\n\t\tprops: mergeProps< 'a' >( props, {\n\t\t\tclassName: clsx(\n\t\t\t\tdefenseStyles.a,\n\t\t\t\tresetStyles[ 'box-sizing' ],\n\t\t\t\tfocusStyles[ 'outset-ring--focus' ],\n\t\t\t\tvariant !== 'unstyled' && styles.link,\n\t\t\t\tvariant !== 'unstyled' && styles[ `is-${ tone }` ],\n\t\t\t\tvariant === 'unstyled' && styles[ 'is-unstyled' ],\n\t\t\t\topenInNewTab && styles[ 'has-link-icon' ],\n\t\t\t\tclassName\n\t\t\t),\n\t\t\tonClick: handleClick,\n\t\t\ttarget: openInNewTab ? '_blank' : undefined,\n\t\t\tchildren: openInNewTab ? (\n\t\t\t\t<>\n\t\t\t\t\t<span className={ styles[ 'link-contents' ] }>\n\t\t\t\t\t\t{ children }\n\t\t\t\t\t</span>\n\t\t\t\t\t<span\n\t\t\t\t\t\tclassName={ styles[ 'link-icon' ] }\n\t\t\t\t\t\trole=\"img\"\n\t\t\t\t\t\taria-label={\n\t\t\t\t\t\t\t/* translators: accessibility text appended to link text */\n\t\t\t\t\t\t\t__( '(opens in a new tab)' )\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t</>\n\t\t\t) : (\n\t\t\t\tchildren\n\t\t\t),\n\t\t} ),\n\t} );\n\n\treturn element;\n} );\n", "if (typeof document !== 'undefined' && process.env.NODE_ENV !== 'test' && !document.head.querySelector(\"style[data-wp-hash='e3ae230cea']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"e3ae230cea\");\n\tstyle.appendChild(document.createTextNode(\"@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}\"));\n\tdocument.head.appendChild(style);\n}\nexport default {\"box-sizing\":\"_336cd3e4e743482f__box-sizing\"};\n", "if (typeof document !== 'undefined' && process.env.NODE_ENV !== 'test' && !document.head.querySelector(\"style[data-wp-hash='2a5ab8f3a7']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"2a5ab8f3a7\");\n\tstyle.appendChild(document.createTextNode(\"@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-utilities{._08e8a2e44959f892__outset-ring--focus,._970d04df7376df67__outset-ring--focus-within-except-active,.c5cb3ee4bddaa8e4__outset-ring--focus-within-visible,.cd83dfc2126a0846__outset-ring--focus-within,.d0541bc9dd9dc7b6__outset-ring--focus-visible,.e25b2bdd7aa21721__outset-ring--focus-except-active,.ecadb9e080e2dfa5__outset-ring--focus-parent-visible{@media not (prefers-reduced-motion){--_gcd-a-transition:outline 0.1s ease-out;transition:outline .1s ease-out}outline:0 solid #0000;outline-offset:1px}._08e8a2e44959f892__outset-ring--focus:focus,._970d04df7376df67__outset-ring--focus-within-except-active:focus-within:not(:has(:active)),.c5cb3ee4bddaa8e4__outset-ring--focus-within-visible:focus-within:has(:focus-visible),.cd83dfc2126a0846__outset-ring--focus-within:focus-within,.d0541bc9dd9dc7b6__outset-ring--focus-visible:focus-visible,.e25b2bdd7aa21721__outset-ring--focus-except-active:focus:not(:active),:focus-visible .ecadb9e080e2dfa5__outset-ring--focus-parent-visible{--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus-brand,var(--wp-admin-theme-color,#3858e9));--_gcd-div-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus-brand,var(--wp-admin-theme-color,#3858e9));outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus-brand,var(--wp-admin-theme-color,#3858e9))}}\"));\n\tdocument.head.appendChild(style);\n}\nexport default {\"outset-ring--focus\":\"_08e8a2e44959f892__outset-ring--focus\",\"outset-ring--focus-except-active\":\"e25b2bdd7aa21721__outset-ring--focus-except-active\",\"outset-ring--focus-visible\":\"d0541bc9dd9dc7b6__outset-ring--focus-visible\",\"outset-ring--focus-within\":\"cd83dfc2126a0846__outset-ring--focus-within\",\"outset-ring--focus-within-except-active\":\"_970d04df7376df67__outset-ring--focus-within-except-active\",\"outset-ring--focus-within-visible\":\"c5cb3ee4bddaa8e4__outset-ring--focus-within-visible\",\"outset-ring--focus-parent-visible\":\"ecadb9e080e2dfa5__outset-ring--focus-parent-visible\"};\n", "if (typeof document !== 'undefined' && process.env.NODE_ENV !== 'test' && !document.head.querySelector(\"style[data-wp-hash='f197386fe0']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"f197386fe0\");\n\tstyle.appendChild(document.createTextNode(\"@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{.d4250949359b05ce__link{text-decoration-thickness:.5px;text-underline-offset:.2em}.c6055659b8e2cd2c__is-brand,.c6055659b8e2cd2c__is-brand:visited{--_gcd-a-color:var(--wpds-color-fg-interactive-brand,var(--wp-admin-theme-color,#3858e9));color:var(--wpds-color-fg-interactive-brand,var(--wp-admin-theme-color,#3858e9))}.c6055659b8e2cd2c__is-brand:active,.c6055659b8e2cd2c__is-brand:hover{--_gcd-a-color:var(--wpds-color-fg-interactive-brand-active,var(--wp-admin-theme-color,#3858e9));color:var(--wpds-color-fg-interactive-brand-active,var(--wp-admin-theme-color,#3858e9))}._92e0dfcaeee15b88__is-neutral,._92e0dfcaeee15b88__is-neutral:visited{--_gcd-a-color:var(--wpds-color-fg-interactive-neutral,#1e1e1e);color:var(--wpds-color-fg-interactive-neutral,#1e1e1e);text-decoration-color:var(--wpds-color-stroke-interactive-neutral,#8a8a8a)}._92e0dfcaeee15b88__is-neutral:active,._92e0dfcaeee15b88__is-neutral:hover{--_gcd-a-color:var(--wpds-color-fg-interactive-neutral-active,#1e1e1e);color:var(--wpds-color-fg-interactive-neutral-active,#1e1e1e)}.cf122a9bf1035d42__is-unstyled{--_gcd-a-color:inherit;color:inherit;text-decoration:none}.e6ad7c380ee337fe__has-link-icon{text-decoration:none}._8dc7567f9ff415bf__link-contents{text-decoration:underline;text-decoration-color:inherit;text-decoration-thickness:.5px}._0cb411afac4c86c7__link-icon{font-weight:var(--wpds-font-weight-regular,400);margin-inline-start:var(--wpds-dimension-padding-xs,4px)}._0cb411afac4c86c7__link-icon:after{content:\\\"\\\\2197\\\"}._0cb411afac4c86c7__link-icon:dir(rtl):after{content:\\\"\\\\2196\\\"}}\"));\n\tdocument.head.appendChild(style);\n}\nexport default {\"link\":\"d4250949359b05ce__link\",\"is-brand\":\"c6055659b8e2cd2c__is-brand\",\"is-neutral\":\"_92e0dfcaeee15b88__is-neutral\",\"is-unstyled\":\"cf122a9bf1035d42__is-unstyled\",\"has-link-icon\":\"e6ad7c380ee337fe__has-link-icon\",\"link-contents\":\"_8dc7567f9ff415bf__link-contents\",\"link-icon\":\"_0cb411afac4c86c7__link-icon\"};\n", "if (typeof document !== 'undefined' && process.env.NODE_ENV !== 'test' && !document.head.querySelector(\"style[data-wp-hash='3bd1d35622']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"3bd1d35622\");\n\tstyle.appendChild(document.createTextNode(\"._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,#8a8a8a))}&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-fg-interactive-neutral-disabled,#8a8a8a))}}&: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-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)}\"));\n\tdocument.head.appendChild(style);\n}\nexport default {\"button\":\"_6defc79820e382c6__button\",\"input\":\"d2cff2e5dea83bd1__input\",\"textarea\":\"_547d86373d02e108__textarea\",\"div\":\"_8c15fd0ed9f28ba4__div\",\"p\":\"_43cec3e1eec1066d__p\",\"heading\":\"e97669c6d9a38497__heading\",\"a\":\"_2c0831b0499dbd6e__a\"};\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAsC;AACtC,kBAAiB;AACjB,qBAA2B;AAC3B,kBAAmB;;;ACHnB,IAAI,OAAO,aAAa,eAAe,QAAQ,IAAI,aAAa,UAAU,CAAC,SAAS,KAAK,cAAc,kCAAkC,GAAG;AAC3I,QAAM,QAAQ,SAAS,cAAc,OAAO;AAC5C,QAAM,aAAa,gBAAgB,YAAY;AAC/C,QAAM,YAAY,SAAS,eAAe,kMAAkM,CAAC;AAC7O,WAAS,KAAK,YAAY,KAAK;AAChC;AACA,IAAO,iBAAQ,EAAC,cAAa,gCAA+B;;;ACN5D,IAAI,OAAO,aAAa,eAAe,QAAQ,IAAI,aAAa,UAAU,CAAC,SAAS,KAAK,cAAc,kCAAkC,GAAG;AAC3I,QAAM,QAAQ,SAAS,cAAc,OAAO;AAC5C,QAAM,aAAa,gBAAgB,YAAY;AAC/C,QAAM,YAAY,SAAS,eAAe,siDAAsiD,CAAC;AACjlD,WAAS,KAAK,YAAY,KAAK;AAChC;AACA,IAAO,gBAAQ,EAAC,sBAAqB,yCAAwC,oCAAmC,sDAAqD,8BAA6B,gDAA+C,6BAA4B,+CAA8C,2CAA0C,8DAA6D,qCAAoC,uDAAsD,qCAAoC,sDAAqD;;;ACNrlB,IAAI,OAAO,aAAa,eAAe,QAAQ,IAAI,aAAa,UAAU,CAAC,SAAS,KAAK,cAAc,kCAAkC,GAAG;AAC3I,QAAM,QAAQ,SAAS,cAAc,OAAO;AAC5C,QAAM,aAAa,gBAAgB,YAAY;AAC/C,QAAM,YAAY,SAAS,eAAe,8nDAAkoD,CAAC;AAC7qD,WAAS,KAAK,YAAY,KAAK;AAChC;AACA,IAAO,gBAAQ,EAAC,QAAO,0BAAyB,YAAW,8BAA6B,cAAa,iCAAgC,eAAc,iCAAgC,iBAAgB,mCAAkC,iBAAgB,oCAAmC,aAAY,+BAA8B;;;ACNlU,IAAI,OAAO,aAAa,eAAe,QAAQ,IAAI,aAAa,UAAU,CAAC,SAAS,KAAK,cAAc,kCAAkC,GAAG;AAC3I,QAAM,QAAQ,SAAS,cAAc,OAAO;AAC5C,QAAM,aAAa,gBAAgB,YAAY;AAC/C,QAAM,YAAY,SAAS,eAAe,gvFAAgvF,CAAC;AAC3xF,WAAS,KAAK,YAAY,KAAK;AAChC;AACA,IAAO,6BAAQ,EAAC,UAAS,6BAA4B,SAAQ,2BAA0B,YAAW,+BAA8B,OAAM,0BAAyB,KAAI,wBAAuB,WAAU,6BAA4B,KAAI,uBAAsB;;;AJgDtP;AAxCG,IAAM,WAAO,2BAA4C,SAASA,MACxE;AAAA,EACC;AAAA,EACA,UAAU;AAAA,EACV,OAAO;AAAA,EACP,eAAe;AAAA,EACf;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACJ,GACA,KACC;AACD,QAAM,mBAAmB,CAAC,CAAE,MAAM,MAAM,WAAY,GAAI;AAExD,QAAM,cAAc,CAAE,UAAkD;AACvE,QAAK,gBAAgB,kBAAmB;AACvC,YAAM,eAAe;AAAA,IACtB;AACA,cAAW,KAAM;AAAA,EAClB;AAEA,QAAM,cAAU,wBAAW;AAAA,IAC1B;AAAA,IACA,gBAAgB;AAAA,IAChB;AAAA,IACA,WAAO,yBAAmB,OAAO;AAAA,MAChC,eAAW,YAAAC;AAAA,QACV,2BAAc;AAAA,QACd,eAAa,YAAa;AAAA,QAC1B,cAAa,oBAAqB;AAAA,QAClC,YAAY,cAAc,cAAO;AAAA,QACjC,YAAY,cAAc,cAAQ,MAAO,IAAK,EAAG;AAAA,QACjD,YAAY,cAAc,cAAQ,aAAc;AAAA,QAChD,gBAAgB,cAAQ,eAAgB;AAAA,QACxC;AAAA,MACD;AAAA,MACA,SAAS;AAAA,MACT,QAAQ,eAAe,WAAW;AAAA,MAClC,UAAU,eACT,4EACC;AAAA,oDAAC,UAAK,WAAY,cAAQ,eAAgB,GACvC,UACH;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACA,WAAY,cAAQ,WAAY;AAAA,YAChC,MAAK;AAAA,YACL;AAAA;AAAA,kBAEC,gBAAI,sBAAuB;AAAA;AAAA;AAAA,QAE7B;AAAA,SACD,IAEA;AAAA,IAEF,CAAE;AAAA,EACH,CAAE;AAEF,SAAO;AACR,CAAE;",
6
6
  "names": ["Link", "clsx"]
7
7
  }
@@ -0,0 +1,94 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // packages/ui/src/popover/arrow.tsx
31
+ var arrow_exports = {};
32
+ __export(arrow_exports, {
33
+ Arrow: () => Arrow
34
+ });
35
+ module.exports = __toCommonJS(arrow_exports);
36
+ var import_popover = require("@base-ui/react/popover");
37
+ var import_clsx = __toESM(require("clsx"));
38
+ var import_element = require("@wordpress/element");
39
+
40
+ // packages/ui/src/popover/style.module.css
41
+ if (typeof document !== "undefined" && process.env.NODE_ENV !== "test" && !document.head.querySelector("style[data-wp-hash='3b666a02be']")) {
42
+ const style = document.createElement("style");
43
+ style.setAttribute("data-wp-hash", "3b666a02be");
44
+ style.appendChild(document.createTextNode('@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._10450722b9676f78__positioner{z-index:var(--wp-ui-popover-z-index,initial)}._84e8f597bcf683b8__popup{background-color:var(--wpds-color-bg-surface-neutral-strong,#fff);border:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral-weak,#e0e0e0);border-radius:var(--wpds-border-radius-md,4px);box-shadow:var(--wpds-elevation-md,0 2px 3px 0 #0000000d,0 4px 5px 0 #0000000a,0 12px 12px 0 #00000008,0 16px 16px 0 #00000005);color:var(--wpds-color-fg-content-neutral,#1e1e1e);font-family:var(--wpds-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-font-size-md,13px);line-height:var(--wpds-font-line-height-md,24px);outline:0;padding:var(--wpds-dimension-padding-lg,16px)}.ca05d3eb89321fcd__arrow{display:flex;&[data-side=top]{bottom:-8px;rotate:180deg}&[data-side=bottom]{rotate:0deg;top:-8px}&[data-side=left]{inset-inline-end:-13px;rotate:90deg}&[data-side=right]{inset-inline-start:-13px;rotate:-90deg}}._12d8edd9eb946b5f__arrow-fill{fill:var(--wpds-color-bg-surface-neutral-strong,#fff)}._6ddab482bd929dad__arrow-stroke{fill:var(--wpds-color-stroke-surface-neutral-weak,#e0e0e0)}._42cb9ed02a2f0782__description{color:var(--wpds-color-fg-content-neutral-weak,#6d6d6d)}.e4d544aa033f05c6__backdrop{background-color:#00000026;inset:0;position:fixed;z-index:var(--wp-ui-popover-z-index,initial)}}'));
45
+ document.head.appendChild(style);
46
+ }
47
+ var style_default = { "positioner": "_10450722b9676f78__positioner", "popup": "_84e8f597bcf683b8__popup", "arrow": "ca05d3eb89321fcd__arrow", "arrow-fill": "_12d8edd9eb946b5f__arrow-fill", "arrow-stroke": "_6ddab482bd929dad__arrow-stroke", "description": "_42cb9ed02a2f0782__description", "backdrop": "e4d544aa033f05c6__backdrop" };
48
+
49
+ // packages/ui/src/popover/arrow.tsx
50
+ var import_jsx_runtime = require("react/jsx-runtime");
51
+ function DefaultArrowSvg(props) {
52
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
53
+ "svg",
54
+ {
55
+ width: "20",
56
+ height: "10",
57
+ viewBox: "0 0 20 10",
58
+ fill: "none",
59
+ ...props,
60
+ children: [
61
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
62
+ "path",
63
+ {
64
+ d: "M20 10H0V8h1.465a4 4 0 0 0 2.676-1.027l5.19-4.388c.378-.341.96-.341 1.338 0l5.19 4.388A4 4 0 0 0 18.535 8H20z",
65
+ className: style_default["arrow-fill"]
66
+ }
67
+ ),
68
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
69
+ "path",
70
+ {
71
+ d: "M10 3.097 4.81 7.486A5 5 0 0 1 1.465 8.77H0V8h1.465a4 4 0 0 0 2.676-1.027l5.19-4.388c.378-.341.96-.341 1.338 0l5.19 4.388A4 4 0 0 0 18.535 8H20v.77h-1.465a5 5 0 0 1-3.345-1.284z",
72
+ className: style_default["arrow-stroke"]
73
+ }
74
+ )
75
+ ]
76
+ }
77
+ );
78
+ }
79
+ var Arrow = (0, import_element.forwardRef)(function PopoverArrow({ children, className, ...props }, ref) {
80
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
81
+ import_popover.Popover.Arrow,
82
+ {
83
+ ref,
84
+ className: (0, import_clsx.default)(style_default.arrow, className),
85
+ ...props,
86
+ children: children ?? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DefaultArrowSvg, {})
87
+ }
88
+ );
89
+ });
90
+ // Annotate the CommonJS export names for ESM import in node:
91
+ 0 && (module.exports = {
92
+ Arrow
93
+ });
94
+ //# sourceMappingURL=arrow.cjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/popover/arrow.tsx", "../../src/popover/style.module.css"],
4
+ "sourcesContent": ["import { Popover as _Popover } from '@base-ui/react/popover';\nimport clsx from 'clsx';\nimport { forwardRef } from '@wordpress/element';\nimport styles from './style.module.css';\nimport type { ArrowProps } from './types';\n\nfunction DefaultArrowSvg( props: React.ComponentProps< 'svg' > ) {\n\treturn (\n\t\t<svg\n\t\t\twidth=\"20\"\n\t\t\theight=\"10\"\n\t\t\tviewBox=\"0 0 20 10\"\n\t\t\tfill=\"none\"\n\t\t\t{ ...props }\n\t\t>\n\t\t\t<path\n\t\t\t\td=\"M20 10H0V8h1.465a4 4 0 0 0 2.676-1.027l5.19-4.388c.378-.341.96-.341 1.338 0l5.19 4.388A4 4 0 0 0 18.535 8H20z\"\n\t\t\t\tclassName={ styles[ 'arrow-fill' ] }\n\t\t\t/>\n\t\t\t<path\n\t\t\t\td=\"M10 3.097 4.81 7.486A5 5 0 0 1 1.465 8.77H0V8h1.465a4 4 0 0 0 2.676-1.027l5.19-4.388c.378-.341.96-.341 1.338 0l5.19 4.388A4 4 0 0 0 18.535 8H20v.77h-1.465a5 5 0 0 1-3.345-1.284z\"\n\t\t\t\tclassName={ styles[ 'arrow-stroke' ] }\n\t\t\t/>\n\t\t</svg>\n\t);\n}\n\n/**\n * Renders an optional arrow element that points toward the anchor.\n *\n * Must be placed inside `Popover.Popup`. The arrow automatically rotates\n * to match the current placement side.\n */\nconst Arrow = forwardRef< HTMLDivElement, ArrowProps >( function PopoverArrow(\n\t{ children, className, ...props },\n\tref\n) {\n\treturn (\n\t\t<_Popover.Arrow\n\t\t\tref={ ref }\n\t\t\tclassName={ clsx( styles.arrow, className ) }\n\t\t\t{ ...props }\n\t\t>\n\t\t\t{ children ?? <DefaultArrowSvg /> }\n\t\t</_Popover.Arrow>\n\t);\n} );\n\nexport { Arrow };\n", "if (typeof document !== 'undefined' && process.env.NODE_ENV !== 'test' && !document.head.querySelector(\"style[data-wp-hash='3b666a02be']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"3b666a02be\");\n\tstyle.appendChild(document.createTextNode(\"@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._10450722b9676f78__positioner{z-index:var(--wp-ui-popover-z-index,initial)}._84e8f597bcf683b8__popup{background-color:var(--wpds-color-bg-surface-neutral-strong,#fff);border:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral-weak,#e0e0e0);border-radius:var(--wpds-border-radius-md,4px);box-shadow:var(--wpds-elevation-md,0 2px 3px 0 #0000000d,0 4px 5px 0 #0000000a,0 12px 12px 0 #00000008,0 16px 16px 0 #00000005);color:var(--wpds-color-fg-content-neutral,#1e1e1e);font-family:var(--wpds-font-family-body,-apple-system,system-ui,\\\"Segoe UI\\\",\\\"Roboto\\\",\\\"Oxygen-Sans\\\",\\\"Ubuntu\\\",\\\"Cantarell\\\",\\\"Helvetica Neue\\\",sans-serif);font-size:var(--wpds-font-size-md,13px);line-height:var(--wpds-font-line-height-md,24px);outline:0;padding:var(--wpds-dimension-padding-lg,16px)}.ca05d3eb89321fcd__arrow{display:flex;&[data-side=top]{bottom:-8px;rotate:180deg}&[data-side=bottom]{rotate:0deg;top:-8px}&[data-side=left]{inset-inline-end:-13px;rotate:90deg}&[data-side=right]{inset-inline-start:-13px;rotate:-90deg}}._12d8edd9eb946b5f__arrow-fill{fill:var(--wpds-color-bg-surface-neutral-strong,#fff)}._6ddab482bd929dad__arrow-stroke{fill:var(--wpds-color-stroke-surface-neutral-weak,#e0e0e0)}._42cb9ed02a2f0782__description{color:var(--wpds-color-fg-content-neutral-weak,#6d6d6d)}.e4d544aa033f05c6__backdrop{background-color:#00000026;inset:0;position:fixed;z-index:var(--wp-ui-popover-z-index,initial)}}\"));\n\tdocument.head.appendChild(style);\n}\nexport default {\"positioner\":\"_10450722b9676f78__positioner\",\"popup\":\"_84e8f597bcf683b8__popup\",\"arrow\":\"ca05d3eb89321fcd__arrow\",\"arrow-fill\":\"_12d8edd9eb946b5f__arrow-fill\",\"arrow-stroke\":\"_6ddab482bd929dad__arrow-stroke\",\"description\":\"_42cb9ed02a2f0782__description\",\"backdrop\":\"e4d544aa033f05c6__backdrop\"};\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAAoC;AACpC,kBAAiB;AACjB,qBAA2B;;;ACF3B,IAAI,OAAO,aAAa,eAAe,QAAQ,IAAI,aAAa,UAAU,CAAC,SAAS,KAAK,cAAc,kCAAkC,GAAG;AAC3I,QAAM,QAAQ,SAAS,cAAc,OAAO;AAC5C,QAAM,aAAa,gBAAgB,YAAY;AAC/C,QAAM,YAAY,SAAS,eAAe,0+CAAs/C,CAAC;AACjiD,WAAS,KAAK,YAAY,KAAK;AAChC;AACA,IAAO,gBAAQ,EAAC,cAAa,iCAAgC,SAAQ,4BAA2B,SAAQ,2BAA0B,cAAa,iCAAgC,gBAAe,mCAAkC,eAAc,kCAAiC,YAAW,6BAA4B;;;ADEpT;AAFF,SAAS,gBAAiB,OAAuC;AAChE,SACC;AAAA,IAAC;AAAA;AAAA,MACA,OAAM;AAAA,MACN,QAAO;AAAA,MACP,SAAQ;AAAA,MACR,MAAK;AAAA,MACH,GAAG;AAAA,MAEL;AAAA;AAAA,UAAC;AAAA;AAAA,YACA,GAAE;AAAA,YACF,WAAY,cAAQ,YAAa;AAAA;AAAA,QAClC;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACA,GAAE;AAAA,YACF,WAAY,cAAQ,cAAe;AAAA;AAAA,QACpC;AAAA;AAAA;AAAA,EACD;AAEF;AAQA,IAAM,YAAQ,2BAA0C,SAAS,aAChE,EAAE,UAAU,WAAW,GAAG,MAAM,GAChC,KACC;AACD,SACC;AAAA,IAAC,eAAAA,QAAS;AAAA,IAAT;AAAA,MACA;AAAA,MACA,eAAY,YAAAC,SAAM,cAAO,OAAO,SAAU;AAAA,MACxC,GAAG;AAAA,MAEH,sBAAY,4CAAC,mBAAgB;AAAA;AAAA,EAChC;AAEF,CAAE;",
6
+ "names": ["_Popover", "clsx"]
7
+ }
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
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 __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // packages/ui/src/popover/close.tsx
21
+ var close_exports = {};
22
+ __export(close_exports, {
23
+ Close: () => Close
24
+ });
25
+ module.exports = __toCommonJS(close_exports);
26
+ var import_popover = require("@base-ui/react/popover");
27
+ var import_element = require("@wordpress/element");
28
+ var import_jsx_runtime = require("react/jsx-runtime");
29
+ var Close = (0, import_element.forwardRef)(
30
+ function PopoverClose(props, ref) {
31
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
32
+ import_popover.Popover.Close,
33
+ {
34
+ ref,
35
+ "data-wp-ui-popover-close": "",
36
+ ...props
37
+ }
38
+ );
39
+ }
40
+ );
41
+ // Annotate the CommonJS export names for ESM import in node:
42
+ 0 && (module.exports = {
43
+ Close
44
+ });
45
+ //# sourceMappingURL=close.cjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/popover/close.tsx"],
4
+ "sourcesContent": ["import { Popover as _Popover } from '@base-ui/react/popover';\nimport { forwardRef } from '@wordpress/element';\nimport type { CloseProps } from './types';\n\n/**\n * Renders a button that closes the popover when clicked.\n *\n * When the popover opens, initial focus skips this button in favor of\n * the first interactive element inside the popup (unless `initialFocus`\n * on `Popover.Popup` overrides this behavior).\n */\nconst Close = forwardRef< HTMLButtonElement, CloseProps >(\n\tfunction PopoverClose( props, ref ) {\n\t\treturn (\n\t\t\t<_Popover.Close\n\t\t\t\tref={ ref }\n\t\t\t\tdata-wp-ui-popover-close=\"\"\n\t\t\t\t{ ...props }\n\t\t\t/>\n\t\t);\n\t}\n);\n\nexport { Close };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAAoC;AACpC,qBAA2B;AAaxB;AAHH,IAAM,YAAQ;AAAA,EACb,SAAS,aAAc,OAAO,KAAM;AACnC,WACC;AAAA,MAAC,eAAAA,QAAS;AAAA,MAAT;AAAA,QACA;AAAA,QACA,4BAAyB;AAAA,QACvB,GAAG;AAAA;AAAA,IACN;AAAA,EAEF;AACD;",
6
+ "names": ["_Popover"]
7
+ }
@@ -0,0 +1,76 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
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 __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // packages/ui/src/popover/context.tsx
21
+ var context_exports = {};
22
+ __export(context_exports, {
23
+ PopoverValidationProvider: () => PopoverValidationProvider,
24
+ usePopoverValidationContext: () => usePopoverValidationContext
25
+ });
26
+ module.exports = __toCommonJS(context_exports);
27
+ var import_element = require("@wordpress/element");
28
+ var import_jsx_runtime = require("react/jsx-runtime");
29
+ var VALIDATION_ENABLED = process.env.NODE_ENV !== "production";
30
+ var PopoverValidationContext = VALIDATION_ENABLED ? (0, import_element.createContext)(null) : null;
31
+ function usePopoverValidationContextDev() {
32
+ return (0, import_element.useContext)(PopoverValidationContext);
33
+ }
34
+ function usePopoverValidationContextProd() {
35
+ return null;
36
+ }
37
+ var usePopoverValidationContext = VALIDATION_ENABLED ? usePopoverValidationContextDev : usePopoverValidationContextProd;
38
+ function PopoverValidationProviderDev({
39
+ children
40
+ }) {
41
+ const titleElementRef = (0, import_element.useRef)(null);
42
+ const registerTitle = (0, import_element.useCallback)((element) => {
43
+ titleElementRef.current = element;
44
+ }, []);
45
+ const contextValue = (0, import_element.useMemo)(
46
+ () => ({ registerTitle }),
47
+ [registerTitle]
48
+ );
49
+ (0, import_element.useEffect)(() => {
50
+ const titleElement = titleElementRef.current;
51
+ if (!titleElement) {
52
+ throw new Error(
53
+ "Popover: Missing <Popover.Title>. For accessibility, every popover requires a title. If needed, the title can be visually hidden but must not be omitted."
54
+ );
55
+ }
56
+ const textContent = titleElement.textContent?.trim();
57
+ if (!textContent) {
58
+ throw new Error(
59
+ "Popover: <Popover.Title> cannot be empty. Provide meaningful text content for the popover title."
60
+ );
61
+ }
62
+ }, []);
63
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopoverValidationContext.Provider, { value: contextValue, children });
64
+ }
65
+ function PopoverValidationProviderProd({
66
+ children
67
+ }) {
68
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children });
69
+ }
70
+ var PopoverValidationProvider = VALIDATION_ENABLED ? PopoverValidationProviderDev : PopoverValidationProviderProd;
71
+ // Annotate the CommonJS export names for ESM import in node:
72
+ 0 && (module.exports = {
73
+ PopoverValidationProvider,
74
+ usePopoverValidationContext
75
+ });
76
+ //# sourceMappingURL=context.cjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/popover/context.tsx"],
4
+ "sourcesContent": ["import {\n\tcreateContext,\n\tuseCallback,\n\tuseContext,\n\tuseEffect,\n\tuseMemo,\n\tuseRef,\n} from '@wordpress/element';\n\n/**\n * Whether validation is enabled. This is a build-time constant that allows\n * bundlers to tree-shake all validation code in production builds.\n */\nconst VALIDATION_ENABLED = process.env.NODE_ENV !== 'production';\n\ntype PopoverValidationContextType = {\n\tregisterTitle: ( element: HTMLElement | null ) => void;\n};\n\nconst PopoverValidationContext = VALIDATION_ENABLED\n\t? createContext< PopoverValidationContextType | null >( null )\n\t: ( null as unknown as React.Context< PopoverValidationContextType | null > );\n\nfunction usePopoverValidationContextDev() {\n\treturn useContext( PopoverValidationContext );\n}\n\nfunction usePopoverValidationContextProd() {\n\treturn null;\n}\n\n/**\n * Hook to access the popover validation context.\n * Returns null in production or if not within a Popover.Popup.\n */\nexport const usePopoverValidationContext = VALIDATION_ENABLED\n\t? usePopoverValidationContextDev\n\t: usePopoverValidationContextProd;\n\n/**\n * Development-only provider that tracks whether Popover.Title is rendered.\n */\nfunction PopoverValidationProviderDev( {\n\tchildren,\n}: {\n\tchildren: React.ReactNode;\n} ) {\n\tconst titleElementRef = useRef< HTMLElement | null >( null );\n\n\tconst registerTitle = useCallback( ( element: HTMLElement | null ) => {\n\t\ttitleElementRef.current = element;\n\t}, [] );\n\n\tconst contextValue = useMemo(\n\t\t() => ( { registerTitle } ),\n\t\t[ registerTitle ]\n\t);\n\n\tuseEffect( () => {\n\t\tconst titleElement = titleElementRef.current;\n\n\t\tif ( ! titleElement ) {\n\t\t\tthrow new Error(\n\t\t\t\t'Popover: Missing <Popover.Title>. ' +\n\t\t\t\t\t'For accessibility, every popover requires a title. ' +\n\t\t\t\t\t'If needed, the title can be visually hidden but must not be omitted.'\n\t\t\t);\n\t\t}\n\n\t\tconst textContent = titleElement.textContent?.trim();\n\t\tif ( ! textContent ) {\n\t\t\tthrow new Error(\n\t\t\t\t'Popover: <Popover.Title> cannot be empty. ' +\n\t\t\t\t\t'Provide meaningful text content for the popover title.'\n\t\t\t);\n\t\t}\n\t}, [] );\n\n\treturn (\n\t\t<PopoverValidationContext.Provider value={ contextValue }>\n\t\t\t{ children }\n\t\t</PopoverValidationContext.Provider>\n\t);\n}\n\nfunction PopoverValidationProviderProd( {\n\tchildren,\n}: {\n\tchildren: React.ReactNode;\n} ) {\n\treturn <>{ children }</>;\n}\n\n/**\n * Provider component that validates Popover.Title presence in development mode.\n * In production, this component is a no-op and just renders children.\n */\nexport const PopoverValidationProvider = VALIDATION_ENABLED\n\t? PopoverValidationProviderDev\n\t: PopoverValidationProviderProd;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAOO;AAwEL;AAlEF,IAAM,qBAAqB,QAAQ,IAAI,aAAa;AAMpD,IAAM,2BAA2B,yBAC9B,8BAAsD,IAAK,IACzD;AAEL,SAAS,iCAAiC;AACzC,aAAO,2BAAY,wBAAyB;AAC7C;AAEA,SAAS,kCAAkC;AAC1C,SAAO;AACR;AAMO,IAAM,8BAA8B,qBACxC,iCACA;AAKH,SAAS,6BAA8B;AAAA,EACtC;AACD,GAEI;AACH,QAAM,sBAAkB,uBAA8B,IAAK;AAE3D,QAAM,oBAAgB,4BAAa,CAAE,YAAiC;AACrE,oBAAgB,UAAU;AAAA,EAC3B,GAAG,CAAC,CAAE;AAEN,QAAM,mBAAe;AAAA,IACpB,OAAQ,EAAE,cAAc;AAAA,IACxB,CAAE,aAAc;AAAA,EACjB;AAEA,gCAAW,MAAM;AAChB,UAAM,eAAe,gBAAgB;AAErC,QAAK,CAAE,cAAe;AACrB,YAAM,IAAI;AAAA,QACT;AAAA,MAGD;AAAA,IACD;AAEA,UAAM,cAAc,aAAa,aAAa,KAAK;AACnD,QAAK,CAAE,aAAc;AACpB,YAAM,IAAI;AAAA,QACT;AAAA,MAED;AAAA,IACD;AAAA,EACD,GAAG,CAAC,CAAE;AAEN,SACC,4CAAC,yBAAyB,UAAzB,EAAkC,OAAQ,cACxC,UACH;AAEF;AAEA,SAAS,8BAA+B;AAAA,EACvC;AACD,GAEI;AACH,SAAO,2EAAI,UAAU;AACtB;AAMO,IAAM,4BAA4B,qBACtC,+BACA;",
6
+ "names": []
7
+ }