@wordpress/block-editor 11.3.6 → 11.5.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 (357) hide show
  1. package/CHANGELOG.md +3 -1
  2. package/build/components/block-lock/modal.js +1 -0
  3. package/build/components/block-lock/modal.js.map +1 -1
  4. package/build/components/block-popover/inbetween.js +10 -33
  5. package/build/components/block-popover/inbetween.js.map +1 -1
  6. package/build/components/block-settings-menu/block-settings-dropdown.js +2 -2
  7. package/build/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  8. package/build/components/block-styles/index.js +2 -1
  9. package/build/components/block-styles/index.js.map +1 -1
  10. package/build/components/block-types-list/index.native.js +2 -0
  11. package/build/components/block-types-list/index.native.js.map +1 -1
  12. package/build/components/child-layout-control/index.js +107 -0
  13. package/build/components/child-layout-control/index.js.map +1 -0
  14. package/build/components/colors-gradients/control.js +6 -3
  15. package/build/components/colors-gradients/control.js.map +1 -1
  16. package/build/components/date-format-picker/index.js +3 -3
  17. package/build/components/date-format-picker/index.js.map +1 -1
  18. package/build/components/font-appearance-control/index.js +0 -3
  19. package/build/components/font-appearance-control/index.js.map +1 -1
  20. package/build/components/global-styles/dimensions-panel.js +594 -0
  21. package/build/components/global-styles/dimensions-panel.js.map +1 -0
  22. package/build/components/global-styles/hooks.js +142 -45
  23. package/build/components/global-styles/hooks.js.map +1 -1
  24. package/build/components/global-styles/index.js +38 -0
  25. package/build/components/global-styles/index.js.map +1 -1
  26. package/build/components/global-styles/typography-panel.js +434 -0
  27. package/build/components/global-styles/typography-panel.js.map +1 -0
  28. package/build/components/global-styles/use-global-styles-output.js +7 -3
  29. package/build/components/global-styles/use-global-styles-output.js.map +1 -1
  30. package/build/components/global-styles/utils.js +2 -0
  31. package/build/components/global-styles/utils.js.map +1 -1
  32. package/build/components/iframe/index.js +17 -11
  33. package/build/components/iframe/index.js.map +1 -1
  34. package/build/components/image-editor/aspect-ratio-dropdown.js +2 -1
  35. package/build/components/image-editor/aspect-ratio-dropdown.js.map +1 -1
  36. package/build/components/image-size-control/index.js +6 -11
  37. package/build/components/image-size-control/index.js.map +1 -1
  38. package/build/components/index.native.js +23 -0
  39. package/build/components/index.native.js.map +1 -1
  40. package/build/components/inserter/block-patterns-tab.js +9 -15
  41. package/build/components/inserter/block-patterns-tab.js.map +1 -1
  42. package/build/components/inserter/block-types-tab.native.js +4 -1
  43. package/build/components/inserter/block-types-tab.native.js.map +1 -1
  44. package/build/components/inserter/reusable-blocks-tab.native.js +4 -1
  45. package/build/components/inserter/reusable-blocks-tab.native.js.map +1 -1
  46. package/build/components/inserter/search-results.native.js +4 -1
  47. package/build/components/inserter/search-results.native.js.map +1 -1
  48. package/build/components/inspector-controls/block-support-tools-panel.js +1 -1
  49. package/build/components/inspector-controls/block-support-tools-panel.js.map +1 -1
  50. package/build/components/inspector-controls/fill.js +38 -9
  51. package/build/components/inspector-controls/fill.js.map +1 -1
  52. package/build/components/link-control/index.js +55 -28
  53. package/build/components/link-control/index.js.map +1 -1
  54. package/build/components/link-control/settings-drawer.js +72 -30
  55. package/build/components/link-control/settings-drawer.js.map +1 -1
  56. package/build/components/link-control/settings.js +53 -0
  57. package/build/components/link-control/settings.js.map +1 -0
  58. package/build/components/list-view/block.js +4 -2
  59. package/build/components/list-view/block.js.map +1 -1
  60. package/build/components/list-view/expander.js +2 -1
  61. package/build/components/list-view/expander.js.map +1 -1
  62. package/build/components/list-view/index.js +6 -1
  63. package/build/components/list-view/index.js.map +1 -1
  64. package/build/components/off-canvas-editor/appender.js +5 -10
  65. package/build/components/off-canvas-editor/appender.js.map +1 -1
  66. package/build/components/off-canvas-editor/block-contents.js +3 -2
  67. package/build/components/off-canvas-editor/block-contents.js.map +1 -1
  68. package/build/components/off-canvas-editor/branch.js +1 -0
  69. package/build/components/off-canvas-editor/branch.js.map +1 -1
  70. package/build/components/off-canvas-editor/index.js +7 -3
  71. package/build/components/off-canvas-editor/index.js.map +1 -1
  72. package/build/components/off-canvas-editor/leaf-more-menu.js +24 -4
  73. package/build/components/off-canvas-editor/leaf-more-menu.js.map +1 -1
  74. package/build/components/off-canvas-editor/link-ui.js +2 -0
  75. package/build/components/off-canvas-editor/link-ui.js.map +1 -1
  76. package/build/components/responsive-block-control/index.js +1 -0
  77. package/build/components/responsive-block-control/index.js.map +1 -1
  78. package/build/components/rich-text/index.js +9 -45
  79. package/build/components/rich-text/index.js.map +1 -1
  80. package/build/components/rich-text/use-delete.js +73 -0
  81. package/build/components/rich-text/use-delete.js.map +1 -0
  82. package/build/components/rich-text/use-input-rules.js +14 -6
  83. package/build/components/rich-text/use-input-rules.js.map +1 -1
  84. package/build/components/url-input/index.js +2 -2
  85. package/build/components/url-input/index.js.map +1 -1
  86. package/build/components/writing-flow/use-selection-observer.js +4 -1
  87. package/build/components/writing-flow/use-selection-observer.js.map +1 -1
  88. package/build/hooks/align.js +3 -1
  89. package/build/hooks/align.js.map +1 -1
  90. package/build/hooks/dimensions.js +78 -190
  91. package/build/hooks/dimensions.js.map +1 -1
  92. package/build/hooks/duotone.js +94 -25
  93. package/build/hooks/duotone.js.map +1 -1
  94. package/build/hooks/font-family.js +2 -76
  95. package/build/hooks/font-family.js.map +1 -1
  96. package/build/hooks/font-size.js +3 -51
  97. package/build/hooks/font-size.js.map +1 -1
  98. package/build/hooks/gap.js +0 -201
  99. package/build/hooks/gap.js.map +1 -1
  100. package/build/hooks/index.js +2 -0
  101. package/build/hooks/index.js.map +1 -1
  102. package/build/hooks/layout.js +14 -5
  103. package/build/hooks/layout.js.map +1 -1
  104. package/build/hooks/line-height.js +0 -42
  105. package/build/hooks/line-height.js.map +1 -1
  106. package/build/hooks/margin.js +7 -163
  107. package/build/hooks/margin.js.map +1 -1
  108. package/build/hooks/padding.js +7 -163
  109. package/build/hooks/padding.js.map +1 -1
  110. package/build/hooks/typography.js +98 -128
  111. package/build/hooks/typography.js.map +1 -1
  112. package/build/hooks/utils.js +75 -0
  113. package/build/hooks/utils.js.map +1 -1
  114. package/build/layouts/flex.js +1 -0
  115. package/build/layouts/flex.js.map +1 -1
  116. package/build/store/actions.js +24 -12
  117. package/build/store/actions.js.map +1 -1
  118. package/build/store/reducer.js +53 -47
  119. package/build/store/reducer.js.map +1 -1
  120. package/build/store/selectors.js +22 -1
  121. package/build/store/selectors.js.map +1 -1
  122. package/build/utils/parse-css-unit-to-px.js +36 -3
  123. package/build/utils/parse-css-unit-to-px.js.map +1 -1
  124. package/build-module/components/block-lock/modal.js +1 -0
  125. package/build-module/components/block-lock/modal.js.map +1 -1
  126. package/build-module/components/block-popover/inbetween.js +10 -33
  127. package/build-module/components/block-popover/inbetween.js.map +1 -1
  128. package/build-module/components/block-settings-menu/block-settings-dropdown.js +2 -2
  129. package/build-module/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  130. package/build-module/components/block-styles/index.js +2 -1
  131. package/build-module/components/block-styles/index.js.map +1 -1
  132. package/build-module/components/block-types-list/index.native.js +2 -0
  133. package/build-module/components/block-types-list/index.native.js.map +1 -1
  134. package/build-module/components/child-layout-control/index.js +98 -0
  135. package/build-module/components/child-layout-control/index.js.map +1 -0
  136. package/build-module/components/colors-gradients/control.js +6 -3
  137. package/build-module/components/colors-gradients/control.js.map +1 -1
  138. package/build-module/components/date-format-picker/index.js +4 -4
  139. package/build-module/components/date-format-picker/index.js.map +1 -1
  140. package/build-module/components/font-appearance-control/index.js +2 -1
  141. package/build-module/components/font-appearance-control/index.js.map +1 -1
  142. package/build-module/components/global-styles/dimensions-panel.js +574 -0
  143. package/build-module/components/global-styles/dimensions-panel.js.map +1 -0
  144. package/build-module/components/global-styles/hooks.js +138 -46
  145. package/build-module/components/global-styles/hooks.js.map +1 -1
  146. package/build-module/components/global-styles/index.js +3 -1
  147. package/build-module/components/global-styles/index.js.map +1 -1
  148. package/build-module/components/global-styles/typography-panel.js +415 -0
  149. package/build-module/components/global-styles/typography-panel.js.map +1 -0
  150. package/build-module/components/global-styles/use-global-styles-output.js +7 -3
  151. package/build-module/components/global-styles/use-global-styles-output.js.map +1 -1
  152. package/build-module/components/global-styles/utils.js +2 -0
  153. package/build-module/components/global-styles/utils.js.map +1 -1
  154. package/build-module/components/iframe/index.js +17 -11
  155. package/build-module/components/iframe/index.js.map +1 -1
  156. package/build-module/components/image-editor/aspect-ratio-dropdown.js +2 -1
  157. package/build-module/components/image-editor/aspect-ratio-dropdown.js.map +1 -1
  158. package/build-module/components/image-size-control/index.js +7 -12
  159. package/build-module/components/image-size-control/index.js.map +1 -1
  160. package/build-module/components/index.native.js +2 -1
  161. package/build-module/components/index.native.js.map +1 -1
  162. package/build-module/components/inserter/block-patterns-tab.js +9 -15
  163. package/build-module/components/inserter/block-patterns-tab.js.map +1 -1
  164. package/build-module/components/inserter/block-types-tab.native.js +3 -1
  165. package/build-module/components/inserter/block-types-tab.native.js.map +1 -1
  166. package/build-module/components/inserter/reusable-blocks-tab.native.js +3 -1
  167. package/build-module/components/inserter/reusable-blocks-tab.native.js.map +1 -1
  168. package/build-module/components/inserter/search-results.native.js +3 -1
  169. package/build-module/components/inserter/search-results.native.js.map +1 -1
  170. package/build-module/components/inspector-controls/block-support-tools-panel.js +1 -1
  171. package/build-module/components/inspector-controls/block-support-tools-panel.js.map +1 -1
  172. package/build-module/components/inspector-controls/fill.js +39 -9
  173. package/build-module/components/inspector-controls/fill.js.map +1 -1
  174. package/build-module/components/link-control/index.js +56 -28
  175. package/build-module/components/link-control/index.js.map +1 -1
  176. package/build-module/components/link-control/settings-drawer.js +68 -30
  177. package/build-module/components/link-control/settings-drawer.js.map +1 -1
  178. package/build-module/components/link-control/settings.js +44 -0
  179. package/build-module/components/link-control/settings.js.map +1 -0
  180. package/build-module/components/list-view/block.js +4 -2
  181. package/build-module/components/list-view/block.js.map +1 -1
  182. package/build-module/components/list-view/expander.js +2 -1
  183. package/build-module/components/list-view/expander.js.map +1 -1
  184. package/build-module/components/list-view/index.js +6 -1
  185. package/build-module/components/list-view/index.js.map +1 -1
  186. package/build-module/components/off-canvas-editor/appender.js +5 -10
  187. package/build-module/components/off-canvas-editor/appender.js.map +1 -1
  188. package/build-module/components/off-canvas-editor/block-contents.js +3 -2
  189. package/build-module/components/off-canvas-editor/block-contents.js.map +1 -1
  190. package/build-module/components/off-canvas-editor/branch.js +1 -0
  191. package/build-module/components/off-canvas-editor/branch.js.map +1 -1
  192. package/build-module/components/off-canvas-editor/index.js +7 -3
  193. package/build-module/components/off-canvas-editor/index.js.map +1 -1
  194. package/build-module/components/off-canvas-editor/leaf-more-menu.js +27 -7
  195. package/build-module/components/off-canvas-editor/leaf-more-menu.js.map +1 -1
  196. package/build-module/components/off-canvas-editor/link-ui.js +2 -0
  197. package/build-module/components/off-canvas-editor/link-ui.js.map +1 -1
  198. package/build-module/components/responsive-block-control/index.js +1 -0
  199. package/build-module/components/responsive-block-control/index.js.map +1 -1
  200. package/build-module/components/rich-text/index.js +9 -45
  201. package/build-module/components/rich-text/index.js.map +1 -1
  202. package/build-module/components/rich-text/use-delete.js +62 -0
  203. package/build-module/components/rich-text/use-delete.js.map +1 -0
  204. package/build-module/components/rich-text/use-input-rules.js +14 -6
  205. package/build-module/components/rich-text/use-input-rules.js.map +1 -1
  206. package/build-module/components/url-input/index.js +2 -2
  207. package/build-module/components/url-input/index.js.map +1 -1
  208. package/build-module/components/writing-flow/use-selection-observer.js +4 -1
  209. package/build-module/components/writing-flow/use-selection-observer.js.map +1 -1
  210. package/build-module/hooks/align.js +3 -1
  211. package/build-module/hooks/align.js.map +1 -1
  212. package/build-module/hooks/dimensions.js +81 -187
  213. package/build-module/hooks/dimensions.js.map +1 -1
  214. package/build-module/hooks/duotone.js +86 -24
  215. package/build-module/hooks/duotone.js.map +1 -1
  216. package/build-module/hooks/font-family.js +3 -69
  217. package/build-module/hooks/font-family.js.map +1 -1
  218. package/build-module/hooks/font-size.js +6 -47
  219. package/build-module/hooks/font-size.js.map +1 -1
  220. package/build-module/hooks/gap.js +0 -182
  221. package/build-module/hooks/gap.js.map +1 -1
  222. package/build-module/hooks/index.js +1 -0
  223. package/build-module/hooks/index.js.map +1 -1
  224. package/build-module/hooks/layout.js +14 -5
  225. package/build-module/hooks/layout.js.map +1 -1
  226. package/build-module/hooks/line-height.js +0 -38
  227. package/build-module/hooks/line-height.js.map +1 -1
  228. package/build-module/hooks/margin.js +4 -143
  229. package/build-module/hooks/margin.js.map +1 -1
  230. package/build-module/hooks/padding.js +4 -143
  231. package/build-module/hooks/padding.js.map +1 -1
  232. package/build-module/hooks/typography.js +97 -123
  233. package/build-module/hooks/typography.js.map +1 -1
  234. package/build-module/hooks/utils.js +70 -0
  235. package/build-module/hooks/utils.js.map +1 -1
  236. package/build-module/layouts/flex.js +1 -0
  237. package/build-module/layouts/flex.js.map +1 -1
  238. package/build-module/store/actions.js +24 -12
  239. package/build-module/store/actions.js.map +1 -1
  240. package/build-module/store/reducer.js +53 -45
  241. package/build-module/store/reducer.js.map +1 -1
  242. package/build-module/store/selectors.js +22 -1
  243. package/build-module/store/selectors.js.map +1 -1
  244. package/build-module/utils/parse-css-unit-to-px.js +36 -3
  245. package/build-module/utils/parse-css-unit-to-px.js.map +1 -1
  246. package/build-style/style-rtl.css +54 -64
  247. package/build-style/style.css +54 -64
  248. package/package.json +31 -31
  249. package/src/components/block-draggable/test/__snapshots__/index.native.js.snap +24 -24
  250. package/src/components/block-lock/modal.js +1 -0
  251. package/src/components/block-lock/style.scss +0 -9
  252. package/src/components/block-mobile-toolbar/test/__snapshots__/block-actions-menu.native.js.snap +20 -20
  253. package/src/components/block-mover/test/__snapshots__/index.native.js.snap +15 -15
  254. package/src/components/block-popover/inbetween.js +21 -53
  255. package/src/components/block-settings-menu/block-settings-dropdown.js +4 -1
  256. package/src/components/block-styles/index.js +5 -1
  257. package/src/components/block-types-list/index.native.js +2 -0
  258. package/src/components/child-layout-control/index.js +106 -0
  259. package/src/components/color-palette/test/__snapshots__/control.js.snap +1 -1
  260. package/src/components/colors-gradients/control.js +3 -0
  261. package/src/components/date-format-picker/index.js +6 -8
  262. package/src/components/date-format-picker/style.scss +0 -5
  263. package/src/components/font-appearance-control/index.js +1 -1
  264. package/src/components/global-styles/dimensions-panel.js +627 -0
  265. package/src/components/global-styles/hooks.js +229 -66
  266. package/src/components/global-styles/index.js +9 -0
  267. package/src/components/global-styles/typography-panel.js +428 -0
  268. package/src/components/global-styles/use-global-styles-output.js +10 -5
  269. package/src/components/global-styles/utils.js +2 -0
  270. package/src/components/iframe/index.js +20 -18
  271. package/src/components/image-editor/aspect-ratio-dropdown.js +1 -0
  272. package/src/components/image-size-control/index.js +10 -12
  273. package/src/components/image-size-control/style.scss +3 -21
  274. package/src/components/index.native.js +5 -0
  275. package/src/components/inner-blocks/test/__snapshots__/index.js.snap +1 -1
  276. package/src/components/inserter/block-patterns-tab.js +9 -23
  277. package/src/components/inserter/block-types-tab.native.js +2 -0
  278. package/src/components/inserter/reusable-blocks-tab.native.js +2 -0
  279. package/src/components/inserter/search-results.native.js +2 -0
  280. package/src/components/inserter/test/__snapshots__/index.native.js.snap +15 -15
  281. package/src/components/inspector-controls/block-support-tools-panel.js +0 -1
  282. package/src/components/inspector-controls/fill.js +32 -8
  283. package/src/components/link-control/index.js +69 -34
  284. package/src/components/link-control/settings-drawer.js +85 -29
  285. package/src/components/link-control/settings.js +42 -0
  286. package/src/components/link-control/style.scss +63 -37
  287. package/src/components/link-control/test/index.js +347 -9
  288. package/src/components/list-view/block.js +7 -1
  289. package/src/components/list-view/expander.js +1 -0
  290. package/src/components/list-view/index.js +5 -0
  291. package/src/components/media-replace-flow/style.scss +7 -9
  292. package/src/components/media-replace-flow/test/index.js +1 -1
  293. package/src/components/off-canvas-editor/appender.js +13 -16
  294. package/src/components/off-canvas-editor/block-contents.js +2 -1
  295. package/src/components/off-canvas-editor/branch.js +1 -0
  296. package/src/components/off-canvas-editor/index.js +8 -2
  297. package/src/components/off-canvas-editor/leaf-more-menu.js +52 -15
  298. package/src/components/off-canvas-editor/link-ui.js +2 -0
  299. package/src/components/responsive-block-control/index.js +1 -0
  300. package/src/components/rich-text/index.js +8 -46
  301. package/src/components/rich-text/use-delete.js +59 -0
  302. package/src/components/rich-text/use-input-rules.js +13 -5
  303. package/src/components/url-input/index.js +3 -2
  304. package/src/components/url-popover/stories/index.js +1 -0
  305. package/src/components/writing-flow/use-selection-observer.js +5 -1
  306. package/src/hooks/align.js +1 -1
  307. package/src/hooks/dimensions.js +97 -269
  308. package/src/hooks/duotone.js +100 -30
  309. package/src/hooks/font-family.js +0 -58
  310. package/src/hooks/font-size.js +1 -36
  311. package/src/hooks/gap.js +0 -201
  312. package/src/hooks/index.js +1 -0
  313. package/src/hooks/layout.js +19 -6
  314. package/src/hooks/line-height.js +0 -33
  315. package/src/hooks/margin.js +1 -164
  316. package/src/hooks/padding.js +1 -163
  317. package/src/hooks/test/__snapshots__/align.native.js.snap +24 -24
  318. package/src/hooks/test/duotone.js +102 -0
  319. package/src/hooks/typography.js +112 -213
  320. package/src/hooks/utils.js +90 -0
  321. package/src/layouts/flex.js +1 -0
  322. package/src/store/actions.js +12 -4
  323. package/src/store/reducer.js +68 -43
  324. package/src/store/selectors.js +20 -1
  325. package/src/store/test/actions.js +4 -2
  326. package/src/utils/parse-css-unit-to-px.js +35 -5
  327. package/src/utils/test/parse-css-unit-to-px.js +12 -0
  328. package/build/hooks/child-layout.js +0 -213
  329. package/build/hooks/child-layout.js.map +0 -1
  330. package/build/hooks/font-appearance.js +0 -188
  331. package/build/hooks/font-appearance.js.map +0 -1
  332. package/build/hooks/letter-spacing.js +0 -129
  333. package/build/hooks/letter-spacing.js.map +0 -1
  334. package/build/hooks/min-height.js +0 -139
  335. package/build/hooks/min-height.js.map +0 -1
  336. package/build/hooks/text-decoration.js +0 -130
  337. package/build/hooks/text-decoration.js.map +0 -1
  338. package/build/hooks/text-transform.js +0 -130
  339. package/build/hooks/text-transform.js.map +0 -1
  340. package/build-module/hooks/child-layout.js +0 -193
  341. package/build-module/hooks/child-layout.js.map +0 -1
  342. package/build-module/hooks/font-appearance.js +0 -161
  343. package/build-module/hooks/font-appearance.js.map +0 -1
  344. package/build-module/hooks/letter-spacing.js +0 -107
  345. package/build-module/hooks/letter-spacing.js.map +0 -1
  346. package/build-module/hooks/min-height.js +0 -116
  347. package/build-module/hooks/min-height.js.map +0 -1
  348. package/build-module/hooks/text-decoration.js +0 -108
  349. package/build-module/hooks/text-decoration.js.map +0 -1
  350. package/build-module/hooks/text-transform.js +0 -108
  351. package/build-module/hooks/text-transform.js.map +0 -1
  352. package/src/hooks/child-layout.js +0 -195
  353. package/src/hooks/font-appearance.js +0 -146
  354. package/src/hooks/letter-spacing.js +0 -101
  355. package/src/hooks/min-height.js +0 -104
  356. package/src/hooks/text-decoration.js +0 -102
  357. package/src/hooks/text-transform.js +0 -101
@@ -0,0 +1,415 @@
1
+ import { createElement } from "@wordpress/element";
2
+
3
+ /**
4
+ * WordPress dependencies
5
+ */
6
+ import { FontSizePicker, __experimentalToolsPanel as ToolsPanel, __experimentalToolsPanelItem as ToolsPanelItem } from '@wordpress/components';
7
+ import { __ } from '@wordpress/i18n';
8
+ import { useCallback } from '@wordpress/element';
9
+ /**
10
+ * Internal dependencies
11
+ */
12
+
13
+ import FontFamilyControl from '../font-family';
14
+ import FontAppearanceControl from '../font-appearance-control';
15
+ import LineHeightControl from '../line-height-control';
16
+ import LetterSpacingControl from '../letter-spacing-control';
17
+ import TextTransformControl from '../text-transform-control';
18
+ import TextDecorationControl from '../text-decoration-control';
19
+ import { getValueFromVariable } from './utils';
20
+ export function useHasTypographyPanel(settings) {
21
+ const hasFontFamily = useHasFontFamilyControl(settings);
22
+ const hasLineHeight = useHasLineHeightControl(settings);
23
+ const hasFontAppearance = useHasAppearanceControl(settings);
24
+ const hasLetterSpacing = useHasLetterSpacingControl(settings);
25
+ const hasTextTransform = useHasTextTransformControl(settings);
26
+ const hasTextDecoration = useHasTextDecorationControl(settings);
27
+ const hasFontSize = useHasFontSizeControl(settings);
28
+ return hasFontFamily || hasLineHeight || hasFontAppearance || hasLetterSpacing || hasTextTransform || hasFontSize || hasTextDecoration;
29
+ }
30
+
31
+ function useHasFontSizeControl(settings) {
32
+ var _settings$typography, _settings$typography$, _settings$typography2, _ref, _fontSizesPerOrigin$c;
33
+
34
+ const disableCustomFontSizes = !(settings !== null && settings !== void 0 && (_settings$typography = settings.typography) !== null && _settings$typography !== void 0 && _settings$typography.customFontSize);
35
+ const fontSizesPerOrigin = (_settings$typography$ = settings === null || settings === void 0 ? void 0 : (_settings$typography2 = settings.typography) === null || _settings$typography2 === void 0 ? void 0 : _settings$typography2.fontSizes) !== null && _settings$typography$ !== void 0 ? _settings$typography$ : {};
36
+ const fontSizes = (_ref = (_fontSizesPerOrigin$c = fontSizesPerOrigin === null || fontSizesPerOrigin === void 0 ? void 0 : fontSizesPerOrigin.custom) !== null && _fontSizesPerOrigin$c !== void 0 ? _fontSizesPerOrigin$c : fontSizesPerOrigin === null || fontSizesPerOrigin === void 0 ? void 0 : fontSizesPerOrigin.theme) !== null && _ref !== void 0 ? _ref : fontSizesPerOrigin.default;
37
+ return !!(fontSizes !== null && fontSizes !== void 0 && fontSizes.length) || !disableCustomFontSizes;
38
+ }
39
+
40
+ function useHasFontFamilyControl(settings) {
41
+ var _settings$typography3, _ref2, _fontFamiliesPerOrigi;
42
+
43
+ const fontFamiliesPerOrigin = settings === null || settings === void 0 ? void 0 : (_settings$typography3 = settings.typography) === null || _settings$typography3 === void 0 ? void 0 : _settings$typography3.fontFamilies;
44
+ const fontFamilies = (_ref2 = (_fontFamiliesPerOrigi = fontFamiliesPerOrigin === null || fontFamiliesPerOrigin === void 0 ? void 0 : fontFamiliesPerOrigin.custom) !== null && _fontFamiliesPerOrigi !== void 0 ? _fontFamiliesPerOrigi : fontFamiliesPerOrigin === null || fontFamiliesPerOrigin === void 0 ? void 0 : fontFamiliesPerOrigin.theme) !== null && _ref2 !== void 0 ? _ref2 : fontFamiliesPerOrigin === null || fontFamiliesPerOrigin === void 0 ? void 0 : fontFamiliesPerOrigin.default;
45
+ return !!(fontFamilies !== null && fontFamilies !== void 0 && fontFamilies.length);
46
+ }
47
+
48
+ function useHasLineHeightControl(settings) {
49
+ var _settings$typography4;
50
+
51
+ return settings === null || settings === void 0 ? void 0 : (_settings$typography4 = settings.typography) === null || _settings$typography4 === void 0 ? void 0 : _settings$typography4.lineHeight;
52
+ }
53
+
54
+ function useHasAppearanceControl(settings) {
55
+ var _settings$typography5, _settings$typography6;
56
+
57
+ const hasFontStyles = settings === null || settings === void 0 ? void 0 : (_settings$typography5 = settings.typography) === null || _settings$typography5 === void 0 ? void 0 : _settings$typography5.fontStyle;
58
+ const hasFontWeights = settings === null || settings === void 0 ? void 0 : (_settings$typography6 = settings.typography) === null || _settings$typography6 === void 0 ? void 0 : _settings$typography6.fontWeight;
59
+ return hasFontStyles || hasFontWeights;
60
+ }
61
+
62
+ function useAppearanceControlLabel(settings) {
63
+ var _settings$typography7, _settings$typography8;
64
+
65
+ const hasFontStyles = settings === null || settings === void 0 ? void 0 : (_settings$typography7 = settings.typography) === null || _settings$typography7 === void 0 ? void 0 : _settings$typography7.fontStyle;
66
+ const hasFontWeights = settings === null || settings === void 0 ? void 0 : (_settings$typography8 = settings.typography) === null || _settings$typography8 === void 0 ? void 0 : _settings$typography8.fontWeight;
67
+
68
+ if (!hasFontStyles) {
69
+ return __('Font weight');
70
+ }
71
+
72
+ if (!hasFontWeights) {
73
+ return __('Font style');
74
+ }
75
+
76
+ return __('Appearance');
77
+ }
78
+
79
+ function useHasLetterSpacingControl(settings) {
80
+ var _settings$typography9;
81
+
82
+ return settings === null || settings === void 0 ? void 0 : (_settings$typography9 = settings.typography) === null || _settings$typography9 === void 0 ? void 0 : _settings$typography9.letterSpacing;
83
+ }
84
+
85
+ function useHasTextTransformControl(settings) {
86
+ var _settings$typography10;
87
+
88
+ return settings === null || settings === void 0 ? void 0 : (_settings$typography10 = settings.typography) === null || _settings$typography10 === void 0 ? void 0 : _settings$typography10.textTransform;
89
+ }
90
+
91
+ function useHasTextDecorationControl(settings) {
92
+ var _settings$typography11;
93
+
94
+ return settings === null || settings === void 0 ? void 0 : (_settings$typography11 = settings.typography) === null || _settings$typography11 === void 0 ? void 0 : _settings$typography11.textDecoration;
95
+ }
96
+
97
+ function TypographyToolsPanel(_ref3) {
98
+ let {
99
+ resetAllFilter,
100
+ onChange,
101
+ value,
102
+ panelId,
103
+ children
104
+ } = _ref3;
105
+
106
+ const resetAll = () => {
107
+ const updatedValue = resetAllFilter(value);
108
+ onChange(updatedValue);
109
+ };
110
+
111
+ return createElement(ToolsPanel, {
112
+ label: __('Typography'),
113
+ resetAll: resetAll,
114
+ panelId: panelId
115
+ }, children);
116
+ }
117
+
118
+ const DEFAULT_CONTROLS = {
119
+ fontFamily: true,
120
+ fontSize: true,
121
+ fontAppearance: true,
122
+ lineHeight: true,
123
+ letterSpacing: true,
124
+ textTransform: true,
125
+ textDecoration: true
126
+ };
127
+ export default function TypographyPanel(_ref4) {
128
+ var _settings$typography12, _ref5, _fontFamiliesPerOrigi2, _inheritedValue$typog, _settings$typography13, _settings$typography$2, _settings$typography14, _ref7, _fontSizesPerOrigin$c2, _inheritedValue$typog2, _settings$typography15, _settings$typography16, _inheritedValue$typog3, _inheritedValue$typog4, _inheritedValue$typog5, _inheritedValue$typog6, _inheritedValue$typog7, _inheritedValue$typog8;
129
+
130
+ let {
131
+ as: Wrapper = TypographyToolsPanel,
132
+ value,
133
+ onChange,
134
+ inheritedValue = value,
135
+ settings,
136
+ panelId,
137
+ defaultControls = DEFAULT_CONTROLS
138
+ } = _ref4;
139
+
140
+ const decodeValue = rawValue => getValueFromVariable({
141
+ settings
142
+ }, '', rawValue); // Font Family
143
+
144
+
145
+ const hasFontFamilyEnabled = useHasFontFamilyControl(settings);
146
+ const fontFamiliesPerOrigin = settings === null || settings === void 0 ? void 0 : (_settings$typography12 = settings.typography) === null || _settings$typography12 === void 0 ? void 0 : _settings$typography12.fontFamilies;
147
+ const fontFamilies = (_ref5 = (_fontFamiliesPerOrigi2 = fontFamiliesPerOrigin === null || fontFamiliesPerOrigin === void 0 ? void 0 : fontFamiliesPerOrigin.custom) !== null && _fontFamiliesPerOrigi2 !== void 0 ? _fontFamiliesPerOrigi2 : fontFamiliesPerOrigin === null || fontFamiliesPerOrigin === void 0 ? void 0 : fontFamiliesPerOrigin.theme) !== null && _ref5 !== void 0 ? _ref5 : fontFamiliesPerOrigin === null || fontFamiliesPerOrigin === void 0 ? void 0 : fontFamiliesPerOrigin.default;
148
+ const fontFamily = decodeValue(inheritedValue === null || inheritedValue === void 0 ? void 0 : (_inheritedValue$typog = inheritedValue.typography) === null || _inheritedValue$typog === void 0 ? void 0 : _inheritedValue$typog.fontFamily);
149
+
150
+ const setFontFamily = newValue => {
151
+ var _fontFamilies$find;
152
+
153
+ const slug = fontFamilies === null || fontFamilies === void 0 ? void 0 : (_fontFamilies$find = fontFamilies.find(_ref6 => {
154
+ let {
155
+ fontFamily: f
156
+ } = _ref6;
157
+ return f === newValue;
158
+ })) === null || _fontFamilies$find === void 0 ? void 0 : _fontFamilies$find.slug;
159
+ onChange({ ...value,
160
+ typography: { ...(value === null || value === void 0 ? void 0 : value.typography),
161
+ fontFamily: slug ? `var:preset|font-family|${slug}` : newValue
162
+ }
163
+ });
164
+ };
165
+
166
+ const hasFontFamily = () => {
167
+ var _value$typography;
168
+
169
+ return !!(value !== null && value !== void 0 && (_value$typography = value.typography) !== null && _value$typography !== void 0 && _value$typography.fontFamily);
170
+ };
171
+
172
+ const resetFontFamily = () => setFontFamily(undefined); // Font Size
173
+
174
+
175
+ const hasFontSizeEnabled = useHasFontSizeControl(settings);
176
+ const disableCustomFontSizes = !(settings !== null && settings !== void 0 && (_settings$typography13 = settings.typography) !== null && _settings$typography13 !== void 0 && _settings$typography13.customFontSize);
177
+ const fontSizesPerOrigin = (_settings$typography$2 = settings === null || settings === void 0 ? void 0 : (_settings$typography14 = settings.typography) === null || _settings$typography14 === void 0 ? void 0 : _settings$typography14.fontSizes) !== null && _settings$typography$2 !== void 0 ? _settings$typography$2 : {};
178
+ const fontSizes = (_ref7 = (_fontSizesPerOrigin$c2 = fontSizesPerOrigin === null || fontSizesPerOrigin === void 0 ? void 0 : fontSizesPerOrigin.custom) !== null && _fontSizesPerOrigin$c2 !== void 0 ? _fontSizesPerOrigin$c2 : fontSizesPerOrigin === null || fontSizesPerOrigin === void 0 ? void 0 : fontSizesPerOrigin.theme) !== null && _ref7 !== void 0 ? _ref7 : fontSizesPerOrigin.default;
179
+ const fontSize = decodeValue(inheritedValue === null || inheritedValue === void 0 ? void 0 : (_inheritedValue$typog2 = inheritedValue.typography) === null || _inheritedValue$typog2 === void 0 ? void 0 : _inheritedValue$typog2.fontSize);
180
+
181
+ const setFontSize = (newValue, metadata) => {
182
+ const actualValue = !!(metadata !== null && metadata !== void 0 && metadata.slug) ? `var:preset|font-size|${metadata === null || metadata === void 0 ? void 0 : metadata.slug}` : newValue;
183
+ onChange({ ...value,
184
+ typography: { ...(value === null || value === void 0 ? void 0 : value.typography),
185
+ fontSize: actualValue
186
+ }
187
+ });
188
+ };
189
+
190
+ const hasFontSize = () => {
191
+ var _value$typography2;
192
+
193
+ return !!(value !== null && value !== void 0 && (_value$typography2 = value.typography) !== null && _value$typography2 !== void 0 && _value$typography2.fontSize);
194
+ };
195
+
196
+ const resetFontSize = () => setFontSize(undefined); // Appearance
197
+
198
+
199
+ const hasAppearanceControl = useHasAppearanceControl(settings);
200
+ const appearanceControlLabel = useAppearanceControlLabel(settings);
201
+ const hasFontStyles = settings === null || settings === void 0 ? void 0 : (_settings$typography15 = settings.typography) === null || _settings$typography15 === void 0 ? void 0 : _settings$typography15.fontStyle;
202
+ const hasFontWeights = settings === null || settings === void 0 ? void 0 : (_settings$typography16 = settings.typography) === null || _settings$typography16 === void 0 ? void 0 : _settings$typography16.fontWeight;
203
+ const fontStyle = decodeValue(inheritedValue === null || inheritedValue === void 0 ? void 0 : (_inheritedValue$typog3 = inheritedValue.typography) === null || _inheritedValue$typog3 === void 0 ? void 0 : _inheritedValue$typog3.fontStyle);
204
+ const fontWeight = decodeValue(inheritedValue === null || inheritedValue === void 0 ? void 0 : (_inheritedValue$typog4 = inheritedValue.typography) === null || _inheritedValue$typog4 === void 0 ? void 0 : _inheritedValue$typog4.fontWeight);
205
+
206
+ const setFontAppearance = _ref8 => {
207
+ let {
208
+ fontStyle: newFontStyle,
209
+ fontWeight: newFontWeight
210
+ } = _ref8;
211
+ onChange({ ...value,
212
+ typography: { ...(value === null || value === void 0 ? void 0 : value.typography),
213
+ fontStyle: newFontStyle,
214
+ fontWeight: newFontWeight
215
+ }
216
+ });
217
+ };
218
+
219
+ const hasFontAppearance = () => {
220
+ var _value$typography3, _value$typography4;
221
+
222
+ return !!(value !== null && value !== void 0 && (_value$typography3 = value.typography) !== null && _value$typography3 !== void 0 && _value$typography3.fontStyle) || !!(value !== null && value !== void 0 && (_value$typography4 = value.typography) !== null && _value$typography4 !== void 0 && _value$typography4.fontWeight);
223
+ };
224
+
225
+ const resetFontAppearance = () => {
226
+ setFontAppearance({});
227
+ }; // Line Height
228
+
229
+
230
+ const hasLineHeightEnabled = useHasLineHeightControl(settings);
231
+ const lineHeight = decodeValue(inheritedValue === null || inheritedValue === void 0 ? void 0 : (_inheritedValue$typog5 = inheritedValue.typography) === null || _inheritedValue$typog5 === void 0 ? void 0 : _inheritedValue$typog5.lineHeight);
232
+
233
+ const setLineHeight = newValue => {
234
+ onChange({ ...value,
235
+ typography: { ...(value === null || value === void 0 ? void 0 : value.typography),
236
+ lineHeight: newValue
237
+ }
238
+ });
239
+ };
240
+
241
+ const hasLineHeight = () => {
242
+ var _value$typography5;
243
+
244
+ return !!(value !== null && value !== void 0 && (_value$typography5 = value.typography) !== null && _value$typography5 !== void 0 && _value$typography5.lineHeight);
245
+ };
246
+
247
+ const resetLineHeight = () => setLineHeight(undefined); // Letter Spacing
248
+
249
+
250
+ const hasLetterSpacingControl = useHasLetterSpacingControl(settings);
251
+ const letterSpacing = decodeValue(inheritedValue === null || inheritedValue === void 0 ? void 0 : (_inheritedValue$typog6 = inheritedValue.typography) === null || _inheritedValue$typog6 === void 0 ? void 0 : _inheritedValue$typog6.letterSpacing);
252
+
253
+ const setLetterSpacing = newValue => {
254
+ onChange({ ...value,
255
+ typography: { ...(value === null || value === void 0 ? void 0 : value.typography),
256
+ letterSpacing: newValue
257
+ }
258
+ });
259
+ };
260
+
261
+ const hasLetterSpacing = () => {
262
+ var _value$typography6;
263
+
264
+ return !!(value !== null && value !== void 0 && (_value$typography6 = value.typography) !== null && _value$typography6 !== void 0 && _value$typography6.letterSpacing);
265
+ };
266
+
267
+ const resetLetterSpacing = () => setLetterSpacing(undefined); // Text Transform
268
+
269
+
270
+ const hasTextTransformControl = useHasTextTransformControl(settings);
271
+ const textTransform = decodeValue(inheritedValue === null || inheritedValue === void 0 ? void 0 : (_inheritedValue$typog7 = inheritedValue.typography) === null || _inheritedValue$typog7 === void 0 ? void 0 : _inheritedValue$typog7.textTransform);
272
+
273
+ const setTextTransform = newValue => {
274
+ onChange({ ...value,
275
+ typography: { ...(value === null || value === void 0 ? void 0 : value.typography),
276
+ textTransform: newValue
277
+ }
278
+ });
279
+ };
280
+
281
+ const hasTextTransform = () => {
282
+ var _value$typography7;
283
+
284
+ return !!(value !== null && value !== void 0 && (_value$typography7 = value.typography) !== null && _value$typography7 !== void 0 && _value$typography7.textTransform);
285
+ };
286
+
287
+ const resetTextTransform = () => setTextTransform(undefined); // Text Decoration
288
+
289
+
290
+ const hasTextDecorationControl = useHasTextDecorationControl(settings);
291
+ const textDecoration = decodeValue(inheritedValue === null || inheritedValue === void 0 ? void 0 : (_inheritedValue$typog8 = inheritedValue.typography) === null || _inheritedValue$typog8 === void 0 ? void 0 : _inheritedValue$typog8.textDecoration);
292
+
293
+ const setTextDecoration = newValue => {
294
+ onChange({ ...value,
295
+ typography: { ...(value === null || value === void 0 ? void 0 : value.typography),
296
+ textDecoration: newValue
297
+ }
298
+ });
299
+ };
300
+
301
+ const hasTextDecoration = () => {
302
+ var _value$typography8;
303
+
304
+ return !!(value !== null && value !== void 0 && (_value$typography8 = value.typography) !== null && _value$typography8 !== void 0 && _value$typography8.textDecoration);
305
+ };
306
+
307
+ const resetTextDecoration = () => setTextDecoration(undefined);
308
+
309
+ const resetAllFilter = useCallback(previousValue => {
310
+ return { ...previousValue,
311
+ typography: {}
312
+ };
313
+ }, []);
314
+ return createElement(Wrapper, {
315
+ resetAllFilter: resetAllFilter,
316
+ value: value,
317
+ onChange: onChange,
318
+ panelId: panelId
319
+ }, hasFontFamilyEnabled && createElement(ToolsPanelItem, {
320
+ label: __('Font family'),
321
+ hasValue: hasFontFamily,
322
+ onDeselect: resetFontFamily,
323
+ isShownByDefault: defaultControls.fontFamily,
324
+ panelId: panelId
325
+ }, createElement(FontFamilyControl, {
326
+ fontFamilies: fontFamilies,
327
+ value: fontFamily,
328
+ onChange: setFontFamily,
329
+ size: "__unstable-large",
330
+ __nextHasNoMarginBottom: true
331
+ })), hasFontSizeEnabled && createElement(ToolsPanelItem, {
332
+ label: __('Font size'),
333
+ hasValue: hasFontSize,
334
+ onDeselect: resetFontSize,
335
+ isShownByDefault: defaultControls.fontSize,
336
+ panelId: panelId
337
+ }, createElement(FontSizePicker, {
338
+ value: fontSize,
339
+ onChange: setFontSize,
340
+ fontSizes: fontSizes,
341
+ disableCustomFontSizes: disableCustomFontSizes,
342
+ withReset: false,
343
+ withSlider: true,
344
+ size: "__unstable-large",
345
+ __nextHasNoMarginBottom: true
346
+ })), hasAppearanceControl && createElement(ToolsPanelItem, {
347
+ className: "single-column",
348
+ label: appearanceControlLabel,
349
+ hasValue: hasFontAppearance,
350
+ onDeselect: resetFontAppearance,
351
+ isShownByDefault: defaultControls.fontAppearance,
352
+ panelId: panelId
353
+ }, createElement(FontAppearanceControl, {
354
+ value: {
355
+ fontStyle,
356
+ fontWeight
357
+ },
358
+ onChange: setFontAppearance,
359
+ hasFontStyles: hasFontStyles,
360
+ hasFontWeights: hasFontWeights,
361
+ size: "__unstable-large",
362
+ __nextHasNoMarginBottom: true
363
+ })), hasLineHeightEnabled && createElement(ToolsPanelItem, {
364
+ className: "single-column",
365
+ label: __('Line height'),
366
+ hasValue: hasLineHeight,
367
+ onDeselect: resetLineHeight,
368
+ isShownByDefault: defaultControls.lineHeight,
369
+ panelId: panelId
370
+ }, createElement(LineHeightControl, {
371
+ __nextHasNoMarginBottom: true,
372
+ __unstableInputWidth: "auto",
373
+ value: lineHeight,
374
+ onChange: setLineHeight,
375
+ size: "__unstable-large"
376
+ })), hasLetterSpacingControl && createElement(ToolsPanelItem, {
377
+ className: "single-column",
378
+ label: __('Letter spacing'),
379
+ hasValue: hasLetterSpacing,
380
+ onDeselect: resetLetterSpacing,
381
+ isShownByDefault: defaultControls.letterSpacing,
382
+ panelId: panelId
383
+ }, createElement(LetterSpacingControl, {
384
+ value: letterSpacing,
385
+ onChange: setLetterSpacing,
386
+ size: "__unstable-large",
387
+ __unstableInputWidth: "auto"
388
+ })), hasTextDecorationControl && createElement(ToolsPanelItem, {
389
+ className: "single-column",
390
+ label: __('Text decoration'),
391
+ hasValue: hasTextDecoration,
392
+ onDeselect: resetTextDecoration,
393
+ isShownByDefault: defaultControls.textDecoration,
394
+ panelId: panelId
395
+ }, createElement(TextDecorationControl, {
396
+ value: textDecoration,
397
+ onChange: setTextDecoration,
398
+ size: "__unstable-large",
399
+ __unstableInputWidth: "auto"
400
+ })), hasTextTransformControl && createElement(ToolsPanelItem, {
401
+ label: __('Letter case'),
402
+ hasValue: hasTextTransform,
403
+ onDeselect: resetTextTransform,
404
+ isShownByDefault: defaultControls.textTransform,
405
+ panelId: panelId
406
+ }, createElement(TextTransformControl, {
407
+ value: textTransform,
408
+ onChange: setTextTransform,
409
+ showNone: true,
410
+ isBlock: true,
411
+ size: "__unstable-large",
412
+ __nextHasNoMarginBottom: true
413
+ })));
414
+ }
415
+ //# sourceMappingURL=typography-panel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["@wordpress/block-editor/src/components/global-styles/typography-panel.js"],"names":["FontSizePicker","__experimentalToolsPanel","ToolsPanel","__experimentalToolsPanelItem","ToolsPanelItem","__","useCallback","FontFamilyControl","FontAppearanceControl","LineHeightControl","LetterSpacingControl","TextTransformControl","TextDecorationControl","getValueFromVariable","useHasTypographyPanel","settings","hasFontFamily","useHasFontFamilyControl","hasLineHeight","useHasLineHeightControl","hasFontAppearance","useHasAppearanceControl","hasLetterSpacing","useHasLetterSpacingControl","hasTextTransform","useHasTextTransformControl","hasTextDecoration","useHasTextDecorationControl","hasFontSize","useHasFontSizeControl","disableCustomFontSizes","typography","customFontSize","fontSizesPerOrigin","fontSizes","custom","theme","default","length","fontFamiliesPerOrigin","fontFamilies","lineHeight","hasFontStyles","fontStyle","hasFontWeights","fontWeight","useAppearanceControlLabel","letterSpacing","textTransform","textDecoration","TypographyToolsPanel","resetAllFilter","onChange","value","panelId","children","resetAll","updatedValue","DEFAULT_CONTROLS","fontFamily","fontSize","fontAppearance","TypographyPanel","as","Wrapper","inheritedValue","defaultControls","decodeValue","rawValue","hasFontFamilyEnabled","setFontFamily","newValue","slug","find","f","resetFontFamily","undefined","hasFontSizeEnabled","setFontSize","metadata","actualValue","resetFontSize","hasAppearanceControl","appearanceControlLabel","setFontAppearance","newFontStyle","newFontWeight","resetFontAppearance","hasLineHeightEnabled","setLineHeight","resetLineHeight","hasLetterSpacingControl","setLetterSpacing","resetLetterSpacing","hasTextTransformControl","setTextTransform","resetTextTransform","hasTextDecorationControl","setTextDecoration","resetTextDecoration","previousValue"],"mappings":";;AAAA;AACA;AACA;AACA,SACCA,cADD,EAECC,wBAAwB,IAAIC,UAF7B,EAGCC,4BAA4B,IAAIC,cAHjC,QAIO,uBAJP;AAKA,SAASC,EAAT,QAAmB,iBAAnB;AACA,SAASC,WAAT,QAA4B,oBAA5B;AAEA;AACA;AACA;;AACA,OAAOC,iBAAP,MAA8B,gBAA9B;AACA,OAAOC,qBAAP,MAAkC,4BAAlC;AACA,OAAOC,iBAAP,MAA8B,wBAA9B;AACA,OAAOC,oBAAP,M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,CAAE,aAAF,CADX;AAEC,IAAA,QAAQ,EAAGmB,gBAFZ;AAGC,IAAA,UAAU,EAAGwE,kBAHd;AAIC,IAAA,gBAAgB,EAAG9B,eAAe,CAAClB,aAJpC;AAKC,IAAA,OAAO,EAAGM;AALX,KAOC,cAAC,oBAAD;AACC,IAAA,KAAK,EAAGN,aADT;AAEC,IAAA,QAAQ,EAAG+C,gBAFZ;AAGC,IAAA,QAAQ,MAHT;AAIC,IAAA,OAAO,MAJR;AAKC,IAAA,IAAI,EAAC,kBALN;AAMC,IAAA,uBAAuB;AANxB,IAPD,CAtHF,CADD;AA0IA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tFontSizePicker,\n\t__experimentalToolsPanel as ToolsPanel,\n\t__experimentalToolsPanelItem as ToolsPanelItem,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useCallback } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport FontFamilyControl from '../font-family';\nimport FontAppearanceControl from '../font-appearance-control';\nimport LineHeightControl from '../line-height-control';\nimport LetterSpacingControl from '../letter-spacing-control';\nimport TextTransformControl from '../text-transform-control';\nimport TextDecorationControl from '../text-decoration-control';\nimport { getValueFromVariable } from './utils';\n\nexport function useHasTypographyPanel( settings ) {\n\tconst hasFontFamily = useHasFontFamilyControl( settings );\n\tconst hasLineHeight = useHasLineHeightControl( settings );\n\tconst hasFontAppearance = useHasAppearanceControl( settings );\n\tconst hasLetterSpacing = useHasLetterSpacingControl( settings );\n\tconst hasTextTransform = useHasTextTransformControl( settings );\n\tconst hasTextDecoration = useHasTextDecorationControl( settings );\n\tconst hasFontSize = useHasFontSizeControl( settings );\n\n\treturn (\n\t\thasFontFamily ||\n\t\thasLineHeight ||\n\t\thasFontAppearance ||\n\t\thasLetterSpacing ||\n\t\thasTextTransform ||\n\t\thasFontSize ||\n\t\thasTextDecoration\n\t);\n}\n\nfunction useHasFontSizeControl( settings ) {\n\tconst disableCustomFontSizes = ! settings?.typography?.customFontSize;\n\tconst fontSizesPerOrigin = settings?.typography?.fontSizes ?? {};\n\tconst fontSizes =\n\t\tfontSizesPerOrigin?.custom ??\n\t\tfontSizesPerOrigin?.theme ??\n\t\tfontSizesPerOrigin.default;\n\treturn !! fontSizes?.length || ! disableCustomFontSizes;\n}\n\nfunction useHasFontFamilyControl( settings ) {\n\tconst fontFamiliesPerOrigin = settings?.typography?.fontFamilies;\n\tconst fontFamilies =\n\t\tfontFamiliesPerOrigin?.custom ??\n\t\tfontFamiliesPerOrigin?.theme ??\n\t\tfontFamiliesPerOrigin?.default;\n\treturn !! fontFamilies?.length;\n}\n\nfunction useHasLineHeightControl( settings ) {\n\treturn settings?.typography?.lineHeight;\n}\n\nfunction useHasAppearanceControl( settings ) {\n\tconst hasFontStyles = settings?.typography?.fontStyle;\n\tconst hasFontWeights = settings?.typography?.fontWeight;\n\treturn hasFontStyles || hasFontWeights;\n}\n\nfunction useAppearanceControlLabel( settings ) {\n\tconst hasFontStyles = settings?.typography?.fontStyle;\n\tconst hasFontWeights = settings?.typography?.fontWeight;\n\tif ( ! hasFontStyles ) {\n\t\treturn __( 'Font weight' );\n\t}\n\tif ( ! hasFontWeights ) {\n\t\treturn __( 'Font style' );\n\t}\n\treturn __( 'Appearance' );\n}\n\nfunction useHasLetterSpacingControl( settings ) {\n\treturn settings?.typography?.letterSpacing;\n}\n\nfunction useHasTextTransformControl( settings ) {\n\treturn settings?.typography?.textTransform;\n}\n\nfunction useHasTextDecorationControl( settings ) {\n\treturn settings?.typography?.textDecoration;\n}\n\nfunction TypographyToolsPanel( {\n\tresetAllFilter,\n\tonChange,\n\tvalue,\n\tpanelId,\n\tchildren,\n} ) {\n\tconst resetAll = () => {\n\t\tconst updatedValue = resetAllFilter( value );\n\t\tonChange( updatedValue );\n\t};\n\n\treturn (\n\t\t<ToolsPanel\n\t\t\tlabel={ __( 'Typography' ) }\n\t\t\tresetAll={ resetAll }\n\t\t\tpanelId={ panelId }\n\t\t>\n\t\t\t{ children }\n\t\t</ToolsPanel>\n\t);\n}\n\nconst DEFAULT_CONTROLS = {\n\tfontFamily: true,\n\tfontSize: true,\n\tfontAppearance: true,\n\tlineHeight: true,\n\tletterSpacing: true,\n\ttextTransform: true,\n\ttextDecoration: true,\n};\n\nexport default function TypographyPanel( {\n\tas: Wrapper = TypographyToolsPanel,\n\tvalue,\n\tonChange,\n\tinheritedValue = value,\n\tsettings,\n\tpanelId,\n\tdefaultControls = DEFAULT_CONTROLS,\n} ) {\n\tconst decodeValue = ( rawValue ) =>\n\t\tgetValueFromVariable( { settings }, '', rawValue );\n\n\t// Font Family\n\tconst hasFontFamilyEnabled = useHasFontFamilyControl( settings );\n\tconst fontFamiliesPerOrigin = settings?.typography?.fontFamilies;\n\tconst fontFamilies =\n\t\tfontFamiliesPerOrigin?.custom ??\n\t\tfontFamiliesPerOrigin?.theme ??\n\t\tfontFamiliesPerOrigin?.default;\n\tconst fontFamily = decodeValue( inheritedValue?.typography?.fontFamily );\n\tconst setFontFamily = ( newValue ) => {\n\t\tconst slug = fontFamilies?.find(\n\t\t\t( { fontFamily: f } ) => f === newValue\n\t\t)?.slug;\n\t\tonChange( {\n\t\t\t...value,\n\t\t\ttypography: {\n\t\t\t\t...value?.typography,\n\t\t\t\tfontFamily: slug\n\t\t\t\t\t? `var:preset|font-family|${ slug }`\n\t\t\t\t\t: newValue,\n\t\t\t},\n\t\t} );\n\t};\n\tconst hasFontFamily = () => !! value?.typography?.fontFamily;\n\tconst resetFontFamily = () => setFontFamily( undefined );\n\n\t// Font Size\n\tconst hasFontSizeEnabled = useHasFontSizeControl( settings );\n\tconst disableCustomFontSizes = ! settings?.typography?.customFontSize;\n\tconst fontSizesPerOrigin = settings?.typography?.fontSizes ?? {};\n\tconst fontSizes =\n\t\tfontSizesPerOrigin?.custom ??\n\t\tfontSizesPerOrigin?.theme ??\n\t\tfontSizesPerOrigin.default;\n\tconst fontSize = decodeValue( inheritedValue?.typography?.fontSize );\n\tconst setFontSize = ( newValue, metadata ) => {\n\t\tconst actualValue = !! metadata?.slug\n\t\t\t? `var:preset|font-size|${ metadata?.slug }`\n\t\t\t: newValue;\n\n\t\tonChange( {\n\t\t\t...value,\n\t\t\ttypography: {\n\t\t\t\t...value?.typography,\n\t\t\t\tfontSize: actualValue,\n\t\t\t},\n\t\t} );\n\t};\n\tconst hasFontSize = () => !! value?.typography?.fontSize;\n\tconst resetFontSize = () => setFontSize( undefined );\n\n\t// Appearance\n\tconst hasAppearanceControl = useHasAppearanceControl( settings );\n\tconst appearanceControlLabel = useAppearanceControlLabel( settings );\n\tconst hasFontStyles = settings?.typography?.fontStyle;\n\tconst hasFontWeights = settings?.typography?.fontWeight;\n\tconst fontStyle = decodeValue( inheritedValue?.typography?.fontStyle );\n\tconst fontWeight = decodeValue( inheritedValue?.typography?.fontWeight );\n\tconst setFontAppearance = ( {\n\t\tfontStyle: newFontStyle,\n\t\tfontWeight: newFontWeight,\n\t} ) => {\n\t\tonChange( {\n\t\t\t...value,\n\t\t\ttypography: {\n\t\t\t\t...value?.typography,\n\t\t\t\tfontStyle: newFontStyle,\n\t\t\t\tfontWeight: newFontWeight,\n\t\t\t},\n\t\t} );\n\t};\n\tconst hasFontAppearance = () =>\n\t\t!! value?.typography?.fontStyle || !! value?.typography?.fontWeight;\n\tconst resetFontAppearance = () => {\n\t\tsetFontAppearance( {} );\n\t};\n\n\t// Line Height\n\tconst hasLineHeightEnabled = useHasLineHeightControl( settings );\n\tconst lineHeight = decodeValue( inheritedValue?.typography?.lineHeight );\n\tconst setLineHeight = ( newValue ) => {\n\t\tonChange( {\n\t\t\t...value,\n\t\t\ttypography: {\n\t\t\t\t...value?.typography,\n\t\t\t\tlineHeight: newValue,\n\t\t\t},\n\t\t} );\n\t};\n\tconst hasLineHeight = () => !! value?.typography?.lineHeight;\n\tconst resetLineHeight = () => setLineHeight( undefined );\n\n\t// Letter Spacing\n\tconst hasLetterSpacingControl = useHasLetterSpacingControl( settings );\n\tconst letterSpacing = decodeValue(\n\t\tinheritedValue?.typography?.letterSpacing\n\t);\n\tconst setLetterSpacing = ( newValue ) => {\n\t\tonChange( {\n\t\t\t...value,\n\t\t\ttypography: {\n\t\t\t\t...value?.typography,\n\t\t\t\tletterSpacing: newValue,\n\t\t\t},\n\t\t} );\n\t};\n\tconst hasLetterSpacing = () => !! value?.typography?.letterSpacing;\n\tconst resetLetterSpacing = () => setLetterSpacing( undefined );\n\n\t// Text Transform\n\tconst hasTextTransformControl = useHasTextTransformControl( settings );\n\tconst textTransform = decodeValue(\n\t\tinheritedValue?.typography?.textTransform\n\t);\n\tconst setTextTransform = ( newValue ) => {\n\t\tonChange( {\n\t\t\t...value,\n\t\t\ttypography: {\n\t\t\t\t...value?.typography,\n\t\t\t\ttextTransform: newValue,\n\t\t\t},\n\t\t} );\n\t};\n\tconst hasTextTransform = () => !! value?.typography?.textTransform;\n\tconst resetTextTransform = () => setTextTransform( undefined );\n\n\t// Text Decoration\n\tconst hasTextDecorationControl = useHasTextDecorationControl( settings );\n\tconst textDecoration = decodeValue(\n\t\tinheritedValue?.typography?.textDecoration\n\t);\n\tconst setTextDecoration = ( newValue ) => {\n\t\tonChange( {\n\t\t\t...value,\n\t\t\ttypography: {\n\t\t\t\t...value?.typography,\n\t\t\t\ttextDecoration: newValue,\n\t\t\t},\n\t\t} );\n\t};\n\tconst hasTextDecoration = () => !! value?.typography?.textDecoration;\n\tconst resetTextDecoration = () => setTextDecoration( undefined );\n\n\tconst resetAllFilter = useCallback( ( previousValue ) => {\n\t\treturn {\n\t\t\t...previousValue,\n\t\t\ttypography: {},\n\t\t};\n\t}, [] );\n\n\treturn (\n\t\t<Wrapper\n\t\t\tresetAllFilter={ resetAllFilter }\n\t\t\tvalue={ value }\n\t\t\tonChange={ onChange }\n\t\t\tpanelId={ panelId }\n\t\t>\n\t\t\t{ hasFontFamilyEnabled && (\n\t\t\t\t<ToolsPanelItem\n\t\t\t\t\tlabel={ __( 'Font family' ) }\n\t\t\t\t\thasValue={ hasFontFamily }\n\t\t\t\t\tonDeselect={ resetFontFamily }\n\t\t\t\t\tisShownByDefault={ defaultControls.fontFamily }\n\t\t\t\t\tpanelId={ panelId }\n\t\t\t\t>\n\t\t\t\t\t<FontFamilyControl\n\t\t\t\t\t\tfontFamilies={ fontFamilies }\n\t\t\t\t\t\tvalue={ fontFamily }\n\t\t\t\t\t\tonChange={ setFontFamily }\n\t\t\t\t\t\tsize=\"__unstable-large\"\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t/>\n\t\t\t\t</ToolsPanelItem>\n\t\t\t) }\n\t\t\t{ hasFontSizeEnabled && (\n\t\t\t\t<ToolsPanelItem\n\t\t\t\t\tlabel={ __( 'Font size' ) }\n\t\t\t\t\thasValue={ hasFontSize }\n\t\t\t\t\tonDeselect={ resetFontSize }\n\t\t\t\t\tisShownByDefault={ defaultControls.fontSize }\n\t\t\t\t\tpanelId={ panelId }\n\t\t\t\t>\n\t\t\t\t\t<FontSizePicker\n\t\t\t\t\t\tvalue={ fontSize }\n\t\t\t\t\t\tonChange={ setFontSize }\n\t\t\t\t\t\tfontSizes={ fontSizes }\n\t\t\t\t\t\tdisableCustomFontSizes={ disableCustomFontSizes }\n\t\t\t\t\t\twithReset={ false }\n\t\t\t\t\t\twithSlider\n\t\t\t\t\t\tsize=\"__unstable-large\"\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t/>\n\t\t\t\t</ToolsPanelItem>\n\t\t\t) }\n\t\t\t{ hasAppearanceControl && (\n\t\t\t\t<ToolsPanelItem\n\t\t\t\t\tclassName=\"single-column\"\n\t\t\t\t\tlabel={ appearanceControlLabel }\n\t\t\t\t\thasValue={ hasFontAppearance }\n\t\t\t\t\tonDeselect={ resetFontAppearance }\n\t\t\t\t\tisShownByDefault={ defaultControls.fontAppearance }\n\t\t\t\t\tpanelId={ panelId }\n\t\t\t\t>\n\t\t\t\t\t<FontAppearanceControl\n\t\t\t\t\t\tvalue={ {\n\t\t\t\t\t\t\tfontStyle,\n\t\t\t\t\t\t\tfontWeight,\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tonChange={ setFontAppearance }\n\t\t\t\t\t\thasFontStyles={ hasFontStyles }\n\t\t\t\t\t\thasFontWeights={ hasFontWeights }\n\t\t\t\t\t\tsize=\"__unstable-large\"\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t/>\n\t\t\t\t</ToolsPanelItem>\n\t\t\t) }\n\t\t\t{ hasLineHeightEnabled && (\n\t\t\t\t<ToolsPanelItem\n\t\t\t\t\tclassName=\"single-column\"\n\t\t\t\t\tlabel={ __( 'Line height' ) }\n\t\t\t\t\thasValue={ hasLineHeight }\n\t\t\t\t\tonDeselect={ resetLineHeight }\n\t\t\t\t\tisShownByDefault={ defaultControls.lineHeight }\n\t\t\t\t\tpanelId={ panelId }\n\t\t\t\t>\n\t\t\t\t\t<LineHeightControl\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t__unstableInputWidth=\"auto\"\n\t\t\t\t\t\tvalue={ lineHeight }\n\t\t\t\t\t\tonChange={ setLineHeight }\n\t\t\t\t\t\tsize=\"__unstable-large\"\n\t\t\t\t\t/>\n\t\t\t\t</ToolsPanelItem>\n\t\t\t) }\n\t\t\t{ hasLetterSpacingControl && (\n\t\t\t\t<ToolsPanelItem\n\t\t\t\t\tclassName=\"single-column\"\n\t\t\t\t\tlabel={ __( 'Letter spacing' ) }\n\t\t\t\t\thasValue={ hasLetterSpacing }\n\t\t\t\t\tonDeselect={ resetLetterSpacing }\n\t\t\t\t\tisShownByDefault={ defaultControls.letterSpacing }\n\t\t\t\t\tpanelId={ panelId }\n\t\t\t\t>\n\t\t\t\t\t<LetterSpacingControl\n\t\t\t\t\t\tvalue={ letterSpacing }\n\t\t\t\t\t\tonChange={ setLetterSpacing }\n\t\t\t\t\t\tsize=\"__unstable-large\"\n\t\t\t\t\t\t__unstableInputWidth=\"auto\"\n\t\t\t\t\t/>\n\t\t\t\t</ToolsPanelItem>\n\t\t\t) }\n\t\t\t{ hasTextDecorationControl && (\n\t\t\t\t<ToolsPanelItem\n\t\t\t\t\tclassName=\"single-column\"\n\t\t\t\t\tlabel={ __( 'Text decoration' ) }\n\t\t\t\t\thasValue={ hasTextDecoration }\n\t\t\t\t\tonDeselect={ resetTextDecoration }\n\t\t\t\t\tisShownByDefault={ defaultControls.textDecoration }\n\t\t\t\t\tpanelId={ panelId }\n\t\t\t\t>\n\t\t\t\t\t<TextDecorationControl\n\t\t\t\t\t\tvalue={ textDecoration }\n\t\t\t\t\t\tonChange={ setTextDecoration }\n\t\t\t\t\t\tsize=\"__unstable-large\"\n\t\t\t\t\t\t__unstableInputWidth=\"auto\"\n\t\t\t\t\t/>\n\t\t\t\t</ToolsPanelItem>\n\t\t\t) }\n\t\t\t{ hasTextTransformControl && (\n\t\t\t\t<ToolsPanelItem\n\t\t\t\t\tlabel={ __( 'Letter case' ) }\n\t\t\t\t\thasValue={ hasTextTransform }\n\t\t\t\t\tonDeselect={ resetTextTransform }\n\t\t\t\t\tisShownByDefault={ defaultControls.textTransform }\n\t\t\t\t\tpanelId={ panelId }\n\t\t\t\t>\n\t\t\t\t\t<TextTransformControl\n\t\t\t\t\t\tvalue={ textTransform }\n\t\t\t\t\t\tonChange={ setTextTransform }\n\t\t\t\t\t\tshowNone\n\t\t\t\t\t\tisBlock\n\t\t\t\t\t\tsize=\"__unstable-large\"\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t/>\n\t\t\t\t</ToolsPanelItem>\n\t\t\t) }\n\t\t</Wrapper>\n\t);\n}\n"]}
@@ -593,13 +593,17 @@ export const toStyles = function (tree, blockSelectors, hasBlockGapSupport, hasF
593
593
  }
594
594
 
595
595
  if (useRootPaddingAlign) {
596
+ /*
597
+ * These rules reproduce the ones from https://github.com/WordPress/gutenberg/blob/79103f124925d1f457f627e154f52a56228ed5ad/lib/class-wp-theme-json-gutenberg.php#L2508
598
+ * almost exactly, but for the selectors that target block wrappers in the front end. This code only runs in the editor, so it doesn't need those selectors.
599
+ */
596
600
  ruleset += `padding-right: 0; padding-left: 0; padding-top: var(--wp--style--root--padding-top); padding-bottom: var(--wp--style--root--padding-bottom) }
597
601
  .has-global-padding { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); }
598
602
  .has-global-padding :where(.has-global-padding) { padding-right: 0; padding-left: 0; }
599
603
  .has-global-padding > .alignfull { margin-right: calc(var(--wp--style--root--padding-right) * -1); margin-left: calc(var(--wp--style--root--padding-left) * -1); }
600
604
  .has-global-padding :where(.has-global-padding) > .alignfull { margin-right: 0; margin-left: 0; }
601
- .has-global-padding > .alignfull:where(:not(.has-global-padding)) > :where([class*="wp-block-"]:not(.alignfull):not([class*="__"]),p,h1,h2,h3,h4,h5,h6,ul,ol) { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); }
602
- .has-global-padding :where(.has-global-padding) > .alignfull:where(:not(.has-global-padding)) > :where([class*="wp-block-"]:not(.alignfull):not([class*="__"]),p,h1,h2,h3,h4,h5,h6,ul,ol) { padding-right: 0; padding-left: 0;`;
605
+ .has-global-padding > .alignfull:where(:not(.has-global-padding)) > :where(.wp-block:not(.alignfull),p,h1,h2,h3,h4,h5,h6,ul,ol) { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); }
606
+ .has-global-padding :where(.has-global-padding) > .alignfull:where(:not(.has-global-padding)) > :where(.wp-block:not(.alignfull),p,h1,h2,h3,h4,h5,h6,ul,ol) { padding-right: 0; padding-left: 0;`;
603
607
  }
604
608
 
605
609
  ruleset += '}';
@@ -686,7 +690,7 @@ export const toStyles = function (tree, blockSelectors, hasBlockGapSupport, hasF
686
690
  const duotoneDeclarations = getStylesDeclarations(duotoneStyles);
687
691
 
688
692
  if (duotoneDeclarations.length > 0) {
689
- ruleset = ruleset + `${duotoneSelector}{${duotoneDeclarations.join(';')};}`;
693
+ ruleset = ruleset + `${scopeSelector(selector, duotoneSelector)}{${duotoneDeclarations.join(';')};}`;
690
694
  }
691
695
  } // Process blockGap and layout styles.
692
696