@wordpress/components 7.0.9 → 7.0.10

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 (211) hide show
  1. package/build/autocomplete/index.js.map +1 -1
  2. package/build/base-control/index.js.map +1 -1
  3. package/build/button/index.js.map +1 -1
  4. package/build/button/index.native.js.map +1 -1
  5. package/build/button-group/index.js.map +1 -1
  6. package/build/checkbox-control/index.js.map +1 -1
  7. package/build/clipboard-button/index.js.map +1 -1
  8. package/build/color-indicator/index.js.map +1 -1
  9. package/build/color-palette/index.js.map +1 -1
  10. package/build/color-picker/alpha.js.map +1 -1
  11. package/build/color-picker/hue.js.map +1 -1
  12. package/build/color-picker/index.js.map +1 -1
  13. package/build/color-picker/inputs.js.map +1 -1
  14. package/build/color-picker/saturation.js.map +1 -1
  15. package/build/color-picker/utils.js.map +1 -1
  16. package/build/dashicon/icon-class.js.map +1 -1
  17. package/build/dashicon/icon-class.native.js.map +1 -1
  18. package/build/dashicon/index.js.map +1 -1
  19. package/build/date-time/date.js.map +1 -1
  20. package/build/date-time/index.js.map +1 -1
  21. package/build/date-time/time.js.map +1 -1
  22. package/build/disabled/index.js.map +1 -1
  23. package/build/draggable/index.js.map +1 -1
  24. package/build/drop-zone/index.js.map +1 -1
  25. package/build/drop-zone/provider.js.map +1 -1
  26. package/build/dropdown/index.js.map +1 -1
  27. package/build/dropdown-menu/index.js.map +1 -1
  28. package/build/dropdown-menu/index.native.js.map +1 -1
  29. package/build/external-link/index.js.map +1 -1
  30. package/build/focusable-iframe/index.js.map +1 -1
  31. package/build/font-size-picker/index.js.map +1 -1
  32. package/build/form-file-upload/index.js.map +1 -1
  33. package/build/form-toggle/index.js.map +1 -1
  34. package/build/form-token-field/index.js.map +1 -1
  35. package/build/form-token-field/suggestions-list.js.map +1 -1
  36. package/build/form-token-field/token-input.js.map +1 -1
  37. package/build/form-token-field/token.js.map +1 -1
  38. package/build/higher-order/navigate-regions/index.js.map +1 -1
  39. package/build/higher-order/with-constrained-tabbing/index.js.map +1 -1
  40. package/build/higher-order/with-fallback-styles/index.js.map +1 -1
  41. package/build/higher-order/with-filters/index.js.map +1 -1
  42. package/build/higher-order/with-focus-outside/index.js.map +1 -1
  43. package/build/higher-order/with-focus-return/index.js.map +1 -1
  44. package/build/higher-order/with-notices/index.js.map +1 -1
  45. package/build/higher-order/with-spoken-messages/index.js.map +1 -1
  46. package/build/icon/index.js.map +1 -1
  47. package/build/icon-button/index.js.map +1 -1
  48. package/build/index.js.map +1 -1
  49. package/build/index.native.js.map +1 -1
  50. package/build/isolated-event-container/index.js.map +1 -1
  51. package/build/keyboard-shortcuts/index.js.map +1 -1
  52. package/build/menu-group/index.js.map +1 -1
  53. package/build/menu-item/index.js.map +1 -1
  54. package/build/menu-items-choice/index.js.map +1 -1
  55. package/build/modal/aria-helper.js.map +1 -1
  56. package/build/modal/frame.js.map +1 -1
  57. package/build/modal/header.js.map +1 -1
  58. package/build/modal/index.js.map +1 -1
  59. package/build/navigable-container/container.js.map +1 -1
  60. package/build/navigable-container/index.js.map +1 -1
  61. package/build/navigable-container/menu.js.map +1 -1
  62. package/build/navigable-container/tabbable.js.map +1 -1
  63. package/build/notice/index.js.map +1 -1
  64. package/build/notice/list.js.map +1 -1
  65. package/build/panel/body.js.map +1 -1
  66. package/build/panel/header.js.map +1 -1
  67. package/build/panel/index.js.map +1 -1
  68. package/build/panel/row.js.map +1 -1
  69. package/build/placeholder/index.js.map +1 -1
  70. package/build/popover/detect-outside.js.map +1 -1
  71. package/build/popover/index.js.map +1 -1
  72. package/build/popover/utils.js.map +1 -1
  73. package/build/primitives/index.js.map +1 -1
  74. package/build/primitives/svg/index.js.map +1 -1
  75. package/build/primitives/svg/index.native.js.map +1 -1
  76. package/build/query-controls/category-select.js.map +1 -1
  77. package/build/query-controls/index.js.map +1 -1
  78. package/build/query-controls/terms.js.map +1 -1
  79. package/build/radio-control/index.js.map +1 -1
  80. package/build/range-control/index.js.map +1 -1
  81. package/build/resizable-box/index.js.map +1 -1
  82. package/build/responsive-wrapper/index.js.map +1 -1
  83. package/build/sandbox/index.js.map +1 -1
  84. package/build/scroll-lock/index.js.map +1 -1
  85. package/build/select-control/index.js.map +1 -1
  86. package/build/server-side-render/index.js.map +1 -1
  87. package/build/shortcut/index.js.map +1 -1
  88. package/build/slot-fill/context.js.map +1 -1
  89. package/build/slot-fill/fill.js.map +1 -1
  90. package/build/slot-fill/index.js.map +1 -1
  91. package/build/slot-fill/slot.js.map +1 -1
  92. package/build/spinner/index.js.map +1 -1
  93. package/build/tab-panel/index.js.map +1 -1
  94. package/build/text-control/index.js.map +1 -1
  95. package/build/textarea-control/index.js.map +1 -1
  96. package/build/toggle-control/index.js.map +1 -1
  97. package/build/toolbar/index.js.map +1 -1
  98. package/build/toolbar/toolbar-container.js.map +1 -1
  99. package/build/toolbar/toolbar-container.native.js.map +1 -1
  100. package/build/toolbar-button/index.js.map +1 -1
  101. package/build/toolbar-button/toolbar-button-container.js.map +1 -1
  102. package/build/toolbar-button/toolbar-button-container.native.js.map +1 -1
  103. package/build/tooltip/index.js.map +1 -1
  104. package/build/tooltip/index.native.js.map +1 -1
  105. package/build/tree-select/index.js.map +1 -1
  106. package/build-module/autocomplete/index.js.map +1 -1
  107. package/build-module/base-control/index.js.map +1 -1
  108. package/build-module/button/index.js.map +1 -1
  109. package/build-module/button/index.native.js.map +1 -1
  110. package/build-module/button-group/index.js.map +1 -1
  111. package/build-module/checkbox-control/index.js.map +1 -1
  112. package/build-module/clipboard-button/index.js.map +1 -1
  113. package/build-module/color-indicator/index.js.map +1 -1
  114. package/build-module/color-palette/index.js.map +1 -1
  115. package/build-module/color-picker/alpha.js.map +1 -1
  116. package/build-module/color-picker/hue.js.map +1 -1
  117. package/build-module/color-picker/index.js.map +1 -1
  118. package/build-module/color-picker/inputs.js.map +1 -1
  119. package/build-module/color-picker/saturation.js.map +1 -1
  120. package/build-module/color-picker/utils.js.map +1 -1
  121. package/build-module/dashicon/icon-class.js.map +1 -1
  122. package/build-module/dashicon/icon-class.native.js.map +1 -1
  123. package/build-module/dashicon/index.js.map +1 -1
  124. package/build-module/date-time/date.js.map +1 -1
  125. package/build-module/date-time/index.js.map +1 -1
  126. package/build-module/date-time/time.js.map +1 -1
  127. package/build-module/disabled/index.js.map +1 -1
  128. package/build-module/draggable/index.js.map +1 -1
  129. package/build-module/drop-zone/index.js.map +1 -1
  130. package/build-module/drop-zone/provider.js.map +1 -1
  131. package/build-module/dropdown/index.js.map +1 -1
  132. package/build-module/dropdown-menu/index.js.map +1 -1
  133. package/build-module/dropdown-menu/index.native.js.map +1 -1
  134. package/build-module/external-link/index.js.map +1 -1
  135. package/build-module/focusable-iframe/index.js.map +1 -1
  136. package/build-module/font-size-picker/index.js.map +1 -1
  137. package/build-module/form-file-upload/index.js.map +1 -1
  138. package/build-module/form-toggle/index.js.map +1 -1
  139. package/build-module/form-token-field/index.js.map +1 -1
  140. package/build-module/form-token-field/suggestions-list.js.map +1 -1
  141. package/build-module/form-token-field/token-input.js.map +1 -1
  142. package/build-module/form-token-field/token.js.map +1 -1
  143. package/build-module/higher-order/navigate-regions/index.js.map +1 -1
  144. package/build-module/higher-order/with-constrained-tabbing/index.js.map +1 -1
  145. package/build-module/higher-order/with-fallback-styles/index.js.map +1 -1
  146. package/build-module/higher-order/with-filters/index.js.map +1 -1
  147. package/build-module/higher-order/with-focus-outside/index.js.map +1 -1
  148. package/build-module/higher-order/with-focus-return/index.js.map +1 -1
  149. package/build-module/higher-order/with-notices/index.js.map +1 -1
  150. package/build-module/higher-order/with-spoken-messages/index.js.map +1 -1
  151. package/build-module/icon/index.js.map +1 -1
  152. package/build-module/icon-button/index.js.map +1 -1
  153. package/build-module/index.js.map +1 -1
  154. package/build-module/index.native.js.map +1 -1
  155. package/build-module/isolated-event-container/index.js.map +1 -1
  156. package/build-module/keyboard-shortcuts/index.js.map +1 -1
  157. package/build-module/menu-group/index.js.map +1 -1
  158. package/build-module/menu-item/index.js.map +1 -1
  159. package/build-module/menu-items-choice/index.js.map +1 -1
  160. package/build-module/modal/aria-helper.js.map +1 -1
  161. package/build-module/modal/frame.js.map +1 -1
  162. package/build-module/modal/header.js.map +1 -1
  163. package/build-module/modal/index.js.map +1 -1
  164. package/build-module/navigable-container/container.js.map +1 -1
  165. package/build-module/navigable-container/index.js.map +1 -1
  166. package/build-module/navigable-container/menu.js.map +1 -1
  167. package/build-module/navigable-container/tabbable.js.map +1 -1
  168. package/build-module/notice/index.js.map +1 -1
  169. package/build-module/notice/list.js.map +1 -1
  170. package/build-module/panel/body.js.map +1 -1
  171. package/build-module/panel/header.js.map +1 -1
  172. package/build-module/panel/index.js.map +1 -1
  173. package/build-module/panel/row.js.map +1 -1
  174. package/build-module/placeholder/index.js.map +1 -1
  175. package/build-module/popover/detect-outside.js.map +1 -1
  176. package/build-module/popover/index.js.map +1 -1
  177. package/build-module/popover/utils.js.map +1 -1
  178. package/build-module/primitives/index.js.map +1 -1
  179. package/build-module/primitives/svg/index.js.map +1 -1
  180. package/build-module/primitives/svg/index.native.js.map +1 -1
  181. package/build-module/query-controls/category-select.js.map +1 -1
  182. package/build-module/query-controls/index.js.map +1 -1
  183. package/build-module/query-controls/terms.js.map +1 -1
  184. package/build-module/radio-control/index.js.map +1 -1
  185. package/build-module/range-control/index.js.map +1 -1
  186. package/build-module/resizable-box/index.js.map +1 -1
  187. package/build-module/responsive-wrapper/index.js.map +1 -1
  188. package/build-module/sandbox/index.js.map +1 -1
  189. package/build-module/scroll-lock/index.js.map +1 -1
  190. package/build-module/select-control/index.js.map +1 -1
  191. package/build-module/server-side-render/index.js.map +1 -1
  192. package/build-module/shortcut/index.js.map +1 -1
  193. package/build-module/slot-fill/context.js.map +1 -1
  194. package/build-module/slot-fill/fill.js.map +1 -1
  195. package/build-module/slot-fill/index.js.map +1 -1
  196. package/build-module/slot-fill/slot.js.map +1 -1
  197. package/build-module/spinner/index.js.map +1 -1
  198. package/build-module/tab-panel/index.js.map +1 -1
  199. package/build-module/text-control/index.js.map +1 -1
  200. package/build-module/textarea-control/index.js.map +1 -1
  201. package/build-module/toggle-control/index.js.map +1 -1
  202. package/build-module/toolbar/index.js.map +1 -1
  203. package/build-module/toolbar/toolbar-container.js.map +1 -1
  204. package/build-module/toolbar/toolbar-container.native.js.map +1 -1
  205. package/build-module/toolbar-button/index.js.map +1 -1
  206. package/build-module/toolbar-button/toolbar-button-container.js.map +1 -1
  207. package/build-module/toolbar-button/toolbar-button-container.native.js.map +1 -1
  208. package/build-module/tooltip/index.js.map +1 -1
  209. package/build-module/tooltip/index.native.js.map +1 -1
  210. package/build-module/tree-select/index.js.map +1 -1
  211. package/package.json +3 -3
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/jdesrosiers/Sites/gutenberg-security/5.1/packages/components/src/menu-group/index.js"],"names":["MenuGroup","children","className","instanceId","label","Children","count","labelId","classNames"],"mappings":";;;;;;;;;;AAQA;;AALA;;AAMA;;AAKA;;AAdA;;;;AAKA;;;;AAMA;;;AAKO,SAASA,SAAT,OAKH;AAAA,MAJHC,QAIG,QAJHA,QAIG;AAAA,4BAHHC,SAGG;AAAA,MAHHA,SAGG,+BAHS,EAGT;AAAA,MAFHC,UAEG,QAFHA,UAEG;AAAA,MADHC,KACG,QADHA,KACG;;AACH,MAAK,CAAEC,kBAASC,KAAT,CAAgBL,QAAhB,CAAP,EAAoC;AACnC,WAAO,IAAP;AACA;;AAED,MAAMM,OAAO,yCAAmCJ,UAAnC,CAAb;AACA,MAAMK,UAAU,GAAG,yBAClBN,SADkB,EAElB,uBAFkB,CAAnB;AAKA,SACC;AAAK,IAAA,SAAS,EAAGM;AAAjB,KACGJ,KAAK,IACN;AAAK,IAAA,SAAS,EAAC,8BAAf;AAA8C,IAAA,EAAE,EAAGG;AAAnD,KAA+DH,KAA/D,CAFF,EAIC,4BAAC,iCAAD;AAAe,IAAA,WAAW,EAAC,UAA3B;AAAsC,uBAAkBG;AAAxD,KACGN,QADH,CAJD,CADD;AAUA;;eAEc,6BAAgBD,SAAhB,C","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { Children } from '@wordpress/element';\nimport { withInstanceId } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { NavigableMenu } from '../navigable-container';\n\nexport function MenuGroup( {\n\tchildren,\n\tclassName = '',\n\tinstanceId,\n\tlabel,\n} ) {\n\tif ( ! Children.count( children ) ) {\n\t\treturn null;\n\t}\n\n\tconst labelId = `components-menu-group-label-${ instanceId }`;\n\tconst classNames = classnames(\n\t\tclassName,\n\t\t'components-menu-group'\n\t);\n\n\treturn (\n\t\t<div className={ classNames }>\n\t\t\t{ label &&\n\t\t\t\t<div className=\"components-menu-group__label\" id={ labelId }>{ label }</div>\n\t\t\t}\n\t\t\t<NavigableMenu orientation=\"vertical\" aria-labelledby={ labelId }>\n\t\t\t\t{ children }\n\t\t\t</NavigableMenu>\n\t\t</div>\n\t);\n}\n\nexport default withInstanceId( MenuGroup );\n"]}
1
+ {"version":3,"sources":["/Users/jdesrosiers/Sites/git-wordpress-develop/src/wp-content/plugins/gutenberg/packages/components/src/menu-group/index.js"],"names":["MenuGroup","children","className","instanceId","label","Children","count","labelId","classNames"],"mappings":";;;;;;;;;;AAQA;;AALA;;AAMA;;AAKA;;AAdA;;;;AAKA;;;;AAMA;;;AAKO,SAASA,SAAT,OAKH;AAAA,MAJHC,QAIG,QAJHA,QAIG;AAAA,4BAHHC,SAGG;AAAA,MAHHA,SAGG,+BAHS,EAGT;AAAA,MAFHC,UAEG,QAFHA,UAEG;AAAA,MADHC,KACG,QADHA,KACG;;AACH,MAAK,CAAEC,kBAASC,KAAT,CAAgBL,QAAhB,CAAP,EAAoC;AACnC,WAAO,IAAP;AACA;;AAED,MAAMM,OAAO,yCAAmCJ,UAAnC,CAAb;AACA,MAAMK,UAAU,GAAG,yBAClBN,SADkB,EAElB,uBAFkB,CAAnB;AAKA,SACC;AAAK,IAAA,SAAS,EAAGM;AAAjB,KACGJ,KAAK,IACN;AAAK,IAAA,SAAS,EAAC,8BAAf;AAA8C,IAAA,EAAE,EAAGG;AAAnD,KAA+DH,KAA/D,CAFF,EAIC,4BAAC,iCAAD;AAAe,IAAA,WAAW,EAAC,UAA3B;AAAsC,uBAAkBG;AAAxD,KACGN,QADH,CAJD,CADD;AAUA;;eAEc,6BAAgBD,SAAhB,C","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { Children } from '@wordpress/element';\nimport { withInstanceId } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { NavigableMenu } from '../navigable-container';\n\nexport function MenuGroup( {\n\tchildren,\n\tclassName = '',\n\tinstanceId,\n\tlabel,\n} ) {\n\tif ( ! Children.count( children ) ) {\n\t\treturn null;\n\t}\n\n\tconst labelId = `components-menu-group-label-${ instanceId }`;\n\tconst classNames = classnames(\n\t\tclassName,\n\t\t'components-menu-group'\n\t);\n\n\treturn (\n\t\t<div className={ classNames }>\n\t\t\t{ label &&\n\t\t\t\t<div className=\"components-menu-group__label\" id={ labelId }>{ label }</div>\n\t\t\t}\n\t\t\t<NavigableMenu orientation=\"vertical\" aria-labelledby={ labelId }>\n\t\t\t\t{ children }\n\t\t\t</NavigableMenu>\n\t\t</div>\n\t);\n}\n\nexport default withInstanceId( MenuGroup );\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/jdesrosiers/Sites/gutenberg-security/5.1/packages/components/src/menu-item/index.js"],"names":["MenuItem","children","label","info","className","icon","shortcut","isSelected","role","instanceId","props","undefined","infoId","tagName","Button","height","width","IconButton"],"mappings":";;;;;;;;;;;;;;AAGA;;AACA;;AAKA;;AACA;;AAKA;;AACA;;AACA;;AAjBA;;;;AAMA;;;;AAMA;;;;AAOA;;;;;AAKO,SAASA,QAAT,OAWH;AAAA,MAVHC,QAUG,QAVHA,QAUG;AAAA,wBATHC,KASG;AAAA,MATHA,KASG,2BATKD,QASL;AAAA,MARHE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,IAAAA,IAAI,EAAJA,IANK;AAOLJ,IAAAA,SAAS,EAATA;AAPK,KAQFM,KARE,GAUNT,QAVM,EAWN,4BAAC,iBAAD;AAAU,IAAA,SAAS,EAAC,gCAApB;AAAqD,IAAA,QAAQ,EAAGK;AAAhE,IAXM,CAAP;AAaA;;eAEc,6BAAgBN,QAAhB,C","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\nimport { isString } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { createElement, cloneElement } from '@wordpress/element';\nimport { withInstanceId } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport Shortcut from '../shortcut';\nimport IconButton from '../icon-button';\n\n/**\n * Renders a generic menu item for use inside the more menu.\n *\n * @return {WPElement} More menu item.\n */\nexport function MenuItem( {\n\tchildren,\n\tlabel = children,\n\tinfo,\n\tclassName,\n\ticon,\n\tshortcut,\n\tisSelected,\n\trole = 'menuitem',\n\tinstanceId,\n\t...props\n} ) {\n\tclassName = classnames( 'components-menu-item__button', className, {\n\t\t'has-icon': icon,\n\t} );\n\n\t// Avoid using label if it is passed as non-string children.\n\tlabel = isString( label ) ? label : undefined;\n\n\tif ( info ) {\n\t\tconst infoId = 'edit-post-feature-toggle__info-' + instanceId;\n\n\t\t// Deconstructed props is scoped to the function; mutation is fine.\n\t\tprops[ 'aria-describedby' ] = infoId;\n\n\t\tchildren = (\n\t\t\t<span className=\"components-menu-item__info-wrapper\">\n\t\t\t\t{ children }\n\t\t\t\t<span\n\t\t\t\t\tid={ infoId }\n\t\t\t\t\tclassName=\"components-menu-item__info\">\n\t\t\t\t\t{ info }\n\t\t\t\t</span>\n\t\t\t</span>\n\t\t);\n\t}\n\n\tlet tagName = Button;\n\n\tif ( icon ) {\n\t\tif ( ! isString( icon ) ) {\n\t\t\ticon = cloneElement( icon, {\n\t\t\t\tclassName: 'components-menu-items__item-icon',\n\t\t\t\theight: 20,\n\t\t\t\twidth: 20,\n\t\t\t} );\n\t\t}\n\n\t\ttagName = IconButton;\n\t\tprops.icon = icon;\n\t}\n\n\treturn createElement(\n\t\ttagName,\n\t\t{\n\t\t\t'aria-label': label,\n\t\t\t// Make sure aria-checked matches spec https://www.w3.org/TR/wai-aria-1.1/#aria-checked\n\t\t\t'aria-checked': ( role === 'menuitemcheckbox' || role === 'menuitemradio' ) ? isSelected : undefined,\n\t\t\trole,\n\t\t\tclassName,\n\t\t\t...props,\n\t\t},\n\t\tchildren,\n\t\t<Shortcut className=\"components-menu-item__shortcut\" shortcut={ shortcut } />\n\t);\n}\n\nexport default withInstanceId( MenuItem );\n"]}
1
+ {"version":3,"sources":["/Users/jdesrosiers/Sites/git-wordpress-develop/src/wp-content/plugins/gutenberg/packages/components/src/menu-item/index.js"],"names":["MenuItem","children","label","info","className","icon","shortcut","isSelected","role","instanceId","props","undefined","infoId","tagName","Button","height","width","IconButton"],"mappings":";;;;;;;;;;;;;;AAGA;;AACA;;AAKA;;AACA;;AAKA;;AACA;;AACA;;AAjBA;;;;AAMA;;;;AAMA;;;;AAOA;;;;;AAKO,SAASA,QAAT,OAWH;AAAA,MAVHC,QAUG,QAVHA,QAUG;AAAA,wBATHC,KASG;AAAA,MATHA,KASG,2BATKD,QASL;AAAA,MARHE,IAQG,QARHA,IAQG;AAAA,MAPHC,SAOG,QAPHA,SAOG;AAAA,MANHC,IAMG,QANHA,IAMG;AAAA,MALHC,QAKG,QALHA,QAKG;AAAA,MAJHC,UAIG,QAJHA,UAIG;AAAA,uBAHHC,IAGG;AAAA,MAHHA,IAGG,0BAHI,UAGJ;AAAA,MAFHC,UAEG,QAFHA,UAEG;AAAA,MADAC,KACA;AACHN,EAAAA,SAAS,GAAG,yBAAY,8BAAZ,EAA4CA,SAA5C,EAAuD;AAClE,gBAAYC;AADsD,GAAvD,CAAZ,CADG,CAKH;;AACAH,EAAAA,KAAK,GAAG,sBAAUA,KAAV,IAAoBA,KAApB,GAA4BS,SAApC;;AAEA,MAAKR,IAAL,EAAY;AACX,QAAMS,MAAM,GAAG,oCAAoCH,UAAnD,CADW,CAGX;;AACAC,IAAAA,KAAK,CAAE,kBAAF,CAAL,GAA8BE,MAA9B;AAEAX,IAAAA,QAAQ,GACP;AAAM,MAAA,SAAS,EAAC;AAAhB,OACGA,QADH,EAEC;AACC,MAAA,EAAE,EAAGW,MADN;AAEC,MAAA,SAAS,EAAC;AAFX,OAGGT,IAHH,CAFD,CADD;AAUA;;AAED,MAAIU,OAAO,GAAGC,eAAd;;AAEA,MAAKT,IAAL,EAAY;AACX,QAAK,CAAE,sBAAUA,IAAV,CAAP,EAA0B;AACzBA,MAAAA,IAAI,GAAG,2BAAcA,IAAd,EAAoB;AAC1BD,QAAAA,SAAS,EAAE,kCADe;AAE1BW,QAAAA,MAAM,EAAE,EAFkB;AAG1BC,QAAAA,KAAK,EAAE;AAHmB,OAApB,CAAP;AAKA;;AAEDH,IAAAA,OAAO,GAAGI,mBAAV;AACAP,IAAAA,KAAK,CAACL,IAAN,GAAaA,IAAb;AACA;;AAED,SAAO,4BACNQ,OADM;AAGL,kBAAcX,KAHT;AAIL;AACA,oBAAkBM,IAAI,KAAK,kBAAT,IAA+BA,IAAI,KAAK,eAA1C,GAA8DD,UAA9D,GAA2EI,SALtF;AAMLH,IAAAA,IAAI,EAAJA,IANK;AAOLJ,IAAAA,SAAS,EAATA;AAPK,KAQFM,KARE,GAUNT,QAVM,EAWN,4BAAC,iBAAD;AAAU,IAAA,SAAS,EAAC,gCAApB;AAAqD,IAAA,QAAQ,EAAGK;AAAhE,IAXM,CAAP;AAaA;;eAEc,6BAAgBN,QAAhB,C","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\nimport { isString } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { createElement, cloneElement } from '@wordpress/element';\nimport { withInstanceId } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport Shortcut from '../shortcut';\nimport IconButton from '../icon-button';\n\n/**\n * Renders a generic menu item for use inside the more menu.\n *\n * @return {WPElement} More menu item.\n */\nexport function MenuItem( {\n\tchildren,\n\tlabel = children,\n\tinfo,\n\tclassName,\n\ticon,\n\tshortcut,\n\tisSelected,\n\trole = 'menuitem',\n\tinstanceId,\n\t...props\n} ) {\n\tclassName = classnames( 'components-menu-item__button', className, {\n\t\t'has-icon': icon,\n\t} );\n\n\t// Avoid using label if it is passed as non-string children.\n\tlabel = isString( label ) ? label : undefined;\n\n\tif ( info ) {\n\t\tconst infoId = 'edit-post-feature-toggle__info-' + instanceId;\n\n\t\t// Deconstructed props is scoped to the function; mutation is fine.\n\t\tprops[ 'aria-describedby' ] = infoId;\n\n\t\tchildren = (\n\t\t\t<span className=\"components-menu-item__info-wrapper\">\n\t\t\t\t{ children }\n\t\t\t\t<span\n\t\t\t\t\tid={ infoId }\n\t\t\t\t\tclassName=\"components-menu-item__info\">\n\t\t\t\t\t{ info }\n\t\t\t\t</span>\n\t\t\t</span>\n\t\t);\n\t}\n\n\tlet tagName = Button;\n\n\tif ( icon ) {\n\t\tif ( ! isString( icon ) ) {\n\t\t\ticon = cloneElement( icon, {\n\t\t\t\tclassName: 'components-menu-items__item-icon',\n\t\t\t\theight: 20,\n\t\t\t\twidth: 20,\n\t\t\t} );\n\t\t}\n\n\t\ttagName = IconButton;\n\t\tprops.icon = icon;\n\t}\n\n\treturn createElement(\n\t\ttagName,\n\t\t{\n\t\t\t'aria-label': label,\n\t\t\t// Make sure aria-checked matches spec https://www.w3.org/TR/wai-aria-1.1/#aria-checked\n\t\t\t'aria-checked': ( role === 'menuitemcheckbox' || role === 'menuitemradio' ) ? isSelected : undefined,\n\t\t\trole,\n\t\t\tclassName,\n\t\t\t...props,\n\t\t},\n\t\tchildren,\n\t\t<Shortcut className=\"components-menu-item__shortcut\" shortcut={ shortcut } />\n\t);\n}\n\nexport default withInstanceId( MenuItem );\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/jdesrosiers/Sites/gutenberg-security/5.1/packages/components/src/menu-items-choice/index.js"],"names":["MenuItemsChoice","choices","onSelect","value","map","item","isSelected","shortcut","label"],"mappings":";;;;;;;;;;;AAGA;;AAHA;;;AAKe,SAASA,eAAT,OAIX;AAAA,0BAHHC,OAGG;AAAA,MAHHA,OAGG,6BAHO,EAGP;AAAA,MAFHC,QAEG,QAFHA,QAEG;AAAA,MADHC,KACG,QADHA,KACG;AACH,SAAOF,OAAO,CAACG,GAAR,CAAa,UAAEC,IAAF,EAAY;AAC/B,QAAMC,UAAU,GAAGH,KAAK,KAAKE,IAAI,CAACF,KAAlC;AACA,WACC,4BAAC,iBAAD;AACC,MAAA,GAAG,EAAGE,IAAI,CAACF,KADZ;AAEC,MAAA,IAAI,EAAC,eAFN;AAGC,MAAA,IAAI,EAAGG,UAAU,IAAI,KAHtB;AAIC,MAAA,UAAU,EAAGA,UAJd;AAKC,MAAA,QAAQ,EAAGD,IAAI,CAACE,QALjB;AAMC,MAAA,OAAO,EAAG,mBAAM;AACf,YAAK,CAAED,UAAP,EAAoB;AACnBJ,UAAAA,QAAQ,CAAEG,IAAI,CAACF,KAAP,CAAR;AACA;AACD;AAVF,OAYGE,IAAI,CAACG,KAZR,CADD;AAgBA,GAlBM,CAAP;AAmBA","sourcesContent":["/**\n * Internal dependencies\n */\nimport MenuItem from '../menu-item';\n\nexport default function MenuItemsChoice( {\n\tchoices = [],\n\tonSelect,\n\tvalue,\n} ) {\n\treturn choices.map( ( item ) => {\n\t\tconst isSelected = value === item.value;\n\t\treturn (\n\t\t\t<MenuItem\n\t\t\t\tkey={ item.value }\n\t\t\t\trole=\"menuitemradio\"\n\t\t\t\ticon={ isSelected && 'yes' }\n\t\t\t\tisSelected={ isSelected }\n\t\t\t\tshortcut={ item.shortcut }\n\t\t\t\tonClick={ () => {\n\t\t\t\t\tif ( ! isSelected ) {\n\t\t\t\t\t\tonSelect( item.value );\n\t\t\t\t\t}\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t{ item.label }\n\t\t\t</MenuItem>\n\t\t);\n\t} );\n}\n"]}
1
+ {"version":3,"sources":["/Users/jdesrosiers/Sites/git-wordpress-develop/src/wp-content/plugins/gutenberg/packages/components/src/menu-items-choice/index.js"],"names":["MenuItemsChoice","choices","onSelect","value","map","item","isSelected","shortcut","label"],"mappings":";;;;;;;;;;;AAGA;;AAHA;;;AAKe,SAASA,eAAT,OAIX;AAAA,0BAHHC,OAGG;AAAA,MAHHA,OAGG,6BAHO,EAGP;AAAA,MAFHC,QAEG,QAFHA,QAEG;AAAA,MADHC,KACG,QADHA,KACG;AACH,SAAOF,OAAO,CAACG,GAAR,CAAa,UAAEC,IAAF,EAAY;AAC/B,QAAMC,UAAU,GAAGH,KAAK,KAAKE,IAAI,CAACF,KAAlC;AACA,WACC,4BAAC,iBAAD;AACC,MAAA,GAAG,EAAGE,IAAI,CAACF,KADZ;AAEC,MAAA,IAAI,EAAC,eAFN;AAGC,MAAA,IAAI,EAAGG,UAAU,IAAI,KAHtB;AAIC,MAAA,UAAU,EAAGA,UAJd;AAKC,MAAA,QAAQ,EAAGD,IAAI,CAACE,QALjB;AAMC,MAAA,OAAO,EAAG,mBAAM;AACf,YAAK,CAAED,UAAP,EAAoB;AACnBJ,UAAAA,QAAQ,CAAEG,IAAI,CAACF,KAAP,CAAR;AACA;AACD;AAVF,OAYGE,IAAI,CAACG,KAZR,CADD;AAgBA,GAlBM,CAAP;AAmBA","sourcesContent":["/**\n * Internal dependencies\n */\nimport MenuItem from '../menu-item';\n\nexport default function MenuItemsChoice( {\n\tchoices = [],\n\tonSelect,\n\tvalue,\n} ) {\n\treturn choices.map( ( item ) => {\n\t\tconst isSelected = value === item.value;\n\t\treturn (\n\t\t\t<MenuItem\n\t\t\t\tkey={ item.value }\n\t\t\t\trole=\"menuitemradio\"\n\t\t\t\ticon={ isSelected && 'yes' }\n\t\t\t\tisSelected={ isSelected }\n\t\t\t\tshortcut={ item.shortcut }\n\t\t\t\tonClick={ () => {\n\t\t\t\t\tif ( ! isSelected ) {\n\t\t\t\t\t\tonSelect( item.value );\n\t\t\t\t\t}\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t{ item.label }\n\t\t\t</MenuItem>\n\t\t);\n\t} );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/jdesrosiers/Sites/gutenberg-security/5.1/packages/components/src/modal/aria-helper.js"],"names":["LIVE_REGION_ARIA_ROLES","Set","hiddenElements","isHidden","hideApp","unhiddenElement","elements","document","body","children","element","elementShouldBeHidden","setAttribute","push","role","getAttribute","tagName","hasAttribute","has","showApp","removeAttribute"],"mappings":";;;;;;;;;AAGA;;AAHA;;;AAKA,IAAMA,sBAAsB,GAAG,IAAIC,GAAJ,CAAS,CACvC,OADuC,EAEvC,QAFuC,EAGvC,KAHuC,EAIvC,SAJuC,EAKvC,OALuC,CAAT,CAA/B;AAQA,IAAIC,cAAc,GAAG,EAArB;AAAA,IACCC,QAAQ,GAAG,KADZ;AAGA;;;;;;;;;;;;;AAYO,SAASC,OAAT,CAAkBC,eAAlB,EAAoC;AAC1C,MAAKF,QAAL,EAAgB;AACf;AACA;;AACD,MAAMG,QAAQ,GAAGC,QAAQ,CAACC,IAAT,CAAcC,QAA/B;AACA,uBAASH,QAAT,EAAmB,UAAEI,OAAF,EAAe;AACjC,QACCA,OAAO,KAAKL,eADb,EAEE;AACD;AACA;;AACD,QAAKM,qBAAqB,CAAED,OAAF,CAA1B,EAAwC;AACvCA,MAAAA,OAAO,CAACE,YAAR,CAAsB,aAAtB,EAAqC,MAArC;AACAV,MAAAA,cAAc,CAACW,IAAf,CAAqBH,OAArB;AACA;AACD,GAVD;AAWAP,EAAAA,QAAQ,GAAG,IAAX;AACA;AAED;;;;;;;;;AAOO,SAASQ,qBAAT,CAAgCD,OAAhC,EAA0C;AAChD,MAAMI,IAAI,GAAGJ,OAAO,CAACK,YAAR,CAAsB,MAAtB,CAAb;AACA,SAAO,EACNL,OAAO,CAACM,OAAR,KAAoB,QAApB,IACAN,OAAO,CAACO,YAAR,CAAsB,aAAtB,CADA,IAEAP,OAAO,CAACO,YAAR,CAAsB,WAAtB,CAFA,IAGAjB,sBAAsB,CAACkB,GAAvB,CAA4BJ,IAA5B,CAJM,CAAP;AAMA;AAED;;;;;;AAIO,SAASK,OAAT,GAAmB;AACzB,MAAK,CAAEhB,QAAP,EAAkB;AACjB;AACA;;AACD,uBAASD,cAAT,EAAyB,UAAEQ,OAAF,EAAe;AACvCA,IAAAA,OAAO,CAACU,eAAR,CAAyB,aAAzB;AACA,GAFD;AAGAlB,EAAAA,cAAc,GAAG,EAAjB;AACAC,EAAAA,QAAQ,GAAG,KAAX;AACA","sourcesContent":["/**\n * External dependencies\n */\nimport { forEach } from 'lodash';\n\nconst LIVE_REGION_ARIA_ROLES = new Set( [\n\t'alert',\n\t'status',\n\t'log',\n\t'marquee',\n\t'timer',\n] );\n\nlet hiddenElements = [],\n\tisHidden = false;\n\n/**\n * Hides all elements in the body element from screen-readers except\n * the provided element and elements that should not be hidden from\n * screen-readers.\n *\n * The reason we do this is because `aria-modal=\"true\"` currently is bugged\n * in Safari, and support is spotty in other browsers overall. In the future\n * we should consider removing these helper functions in favor of\n * `aria-modal=\"true\"`.\n *\n * @param {Element} unhiddenElement The element that should not be hidden.\n */\nexport function hideApp( unhiddenElement ) {\n\tif ( isHidden ) {\n\t\treturn;\n\t}\n\tconst elements = document.body.children;\n\tforEach( elements, ( element ) => {\n\t\tif (\n\t\t\telement === unhiddenElement\n\t\t) {\n\t\t\treturn;\n\t\t}\n\t\tif ( elementShouldBeHidden( element ) ) {\n\t\t\telement.setAttribute( 'aria-hidden', 'true' );\n\t\t\thiddenElements.push( element );\n\t\t}\n\t} );\n\tisHidden = true;\n}\n\n/**\n * Determines if the passed element should not be hidden from screen readers.\n *\n * @param {HTMLElement} element The element that should be checked.\n *\n * @return {boolean} Whether the element should not be hidden from screen-readers.\n */\nexport function elementShouldBeHidden( element ) {\n\tconst role = element.getAttribute( 'role' );\n\treturn ! (\n\t\telement.tagName === 'SCRIPT' ||\n\t\telement.hasAttribute( 'aria-hidden' ) ||\n\t\telement.hasAttribute( 'aria-live' ) ||\n\t\tLIVE_REGION_ARIA_ROLES.has( role )\n\t);\n}\n\n/**\n * Makes all elements in the body that have been hidden by `hideApp`\n * visible again to screen-readers.\n */\nexport function showApp() {\n\tif ( ! isHidden ) {\n\t\treturn;\n\t}\n\tforEach( hiddenElements, ( element ) => {\n\t\telement.removeAttribute( 'aria-hidden' );\n\t} );\n\thiddenElements = [];\n\tisHidden = false;\n}\n"]}
1
+ {"version":3,"sources":["/Users/jdesrosiers/Sites/git-wordpress-develop/src/wp-content/plugins/gutenberg/packages/components/src/modal/aria-helper.js"],"names":["LIVE_REGION_ARIA_ROLES","Set","hiddenElements","isHidden","hideApp","unhiddenElement","elements","document","body","children","element","elementShouldBeHidden","setAttribute","push","role","getAttribute","tagName","hasAttribute","has","showApp","removeAttribute"],"mappings":";;;;;;;;;AAGA;;AAHA;;;AAKA,IAAMA,sBAAsB,GAAG,IAAIC,GAAJ,CAAS,CACvC,OADuC,EAEvC,QAFuC,EAGvC,KAHuC,EAIvC,SAJuC,EAKvC,OALuC,CAAT,CAA/B;AAQA,IAAIC,cAAc,GAAG,EAArB;AAAA,IACCC,QAAQ,GAAG,KADZ;AAGA;;;;;;;;;;;;;AAYO,SAASC,OAAT,CAAkBC,eAAlB,EAAoC;AAC1C,MAAKF,QAAL,EAAgB;AACf;AACA;;AACD,MAAMG,QAAQ,GAAGC,QAAQ,CAACC,IAAT,CAAcC,QAA/B;AACA,uBAASH,QAAT,EAAmB,UAAEI,OAAF,EAAe;AACjC,QACCA,OAAO,KAAKL,eADb,EAEE;AACD;AACA;;AACD,QAAKM,qBAAqB,CAAED,OAAF,CAA1B,EAAwC;AACvCA,MAAAA,OAAO,CAACE,YAAR,CAAsB,aAAtB,EAAqC,MAArC;AACAV,MAAAA,cAAc,CAACW,IAAf,CAAqBH,OAArB;AACA;AACD,GAVD;AAWAP,EAAAA,QAAQ,GAAG,IAAX;AACA;AAED;;;;;;;;;AAOO,SAASQ,qBAAT,CAAgCD,OAAhC,EAA0C;AAChD,MAAMI,IAAI,GAAGJ,OAAO,CAACK,YAAR,CAAsB,MAAtB,CAAb;AACA,SAAO,EACNL,OAAO,CAACM,OAAR,KAAoB,QAApB,IACAN,OAAO,CAACO,YAAR,CAAsB,aAAtB,CADA,IAEAP,OAAO,CAACO,YAAR,CAAsB,WAAtB,CAFA,IAGAjB,sBAAsB,CAACkB,GAAvB,CAA4BJ,IAA5B,CAJM,CAAP;AAMA;AAED;;;;;;AAIO,SAASK,OAAT,GAAmB;AACzB,MAAK,CAAEhB,QAAP,EAAkB;AACjB;AACA;;AACD,uBAASD,cAAT,EAAyB,UAAEQ,OAAF,EAAe;AACvCA,IAAAA,OAAO,CAACU,eAAR,CAAyB,aAAzB;AACA,GAFD;AAGAlB,EAAAA,cAAc,GAAG,EAAjB;AACAC,EAAAA,QAAQ,GAAG,KAAX;AACA","sourcesContent":["/**\n * External dependencies\n */\nimport { forEach } from 'lodash';\n\nconst LIVE_REGION_ARIA_ROLES = new Set( [\n\t'alert',\n\t'status',\n\t'log',\n\t'marquee',\n\t'timer',\n] );\n\nlet hiddenElements = [],\n\tisHidden = false;\n\n/**\n * Hides all elements in the body element from screen-readers except\n * the provided element and elements that should not be hidden from\n * screen-readers.\n *\n * The reason we do this is because `aria-modal=\"true\"` currently is bugged\n * in Safari, and support is spotty in other browsers overall. In the future\n * we should consider removing these helper functions in favor of\n * `aria-modal=\"true\"`.\n *\n * @param {Element} unhiddenElement The element that should not be hidden.\n */\nexport function hideApp( unhiddenElement ) {\n\tif ( isHidden ) {\n\t\treturn;\n\t}\n\tconst elements = document.body.children;\n\tforEach( elements, ( element ) => {\n\t\tif (\n\t\t\telement === unhiddenElement\n\t\t) {\n\t\t\treturn;\n\t\t}\n\t\tif ( elementShouldBeHidden( element ) ) {\n\t\t\telement.setAttribute( 'aria-hidden', 'true' );\n\t\t\thiddenElements.push( element );\n\t\t}\n\t} );\n\tisHidden = true;\n}\n\n/**\n * Determines if the passed element should not be hidden from screen readers.\n *\n * @param {HTMLElement} element The element that should be checked.\n *\n * @return {boolean} Whether the element should not be hidden from screen-readers.\n */\nexport function elementShouldBeHidden( element ) {\n\tconst role = element.getAttribute( 'role' );\n\treturn ! (\n\t\telement.tagName === 'SCRIPT' ||\n\t\telement.hasAttribute( 'aria-hidden' ) ||\n\t\telement.hasAttribute( 'aria-live' ) ||\n\t\tLIVE_REGION_ARIA_ROLES.has( role )\n\t);\n}\n\n/**\n * Makes all elements in the body that have been hidden by `hideApp`\n * visible again to screen-readers.\n */\nexport function showApp() {\n\tif ( ! isHidden ) {\n\t\treturn;\n\t}\n\tforEach( hiddenElements, ( element ) => {\n\t\telement.removeAttribute( 'aria-hidden' );\n\t} );\n\thiddenElements = [];\n\tisHidden = false;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/jdesrosiers/Sites/gutenberg-security/5.1/packages/components/src/modal/frame.js"],"names":["ModalFrame","arguments","containerRef","handleKeyDown","bind","handleClickOutside","focusFirstTabbable","props","focusOnMount","tabbables","focus","tabbable","find","current","length","event","shouldCloseOnClickOutside","onRequestClose","keyCode","ESCAPE","handleEscapeKeyDown","shouldCloseOnEsc","preventDefault","contentLabel","aria","describedby","labelledby","children","className","role","style","Component","withFocusReturn","withConstrainedTabbing","clickOutside","keydown"],"mappings":";;;;;;;;;AAGA;;;;;;;;;;;;;;AACA;;AACA;;AACA;;AAKA;;AAKA;;AACA;;AAjBA;;;;AAQA;;;;AAKA;;;IAMMA,U;;;;;AACL,wBAAc;AAAA;;AAAA;AACb,iHAAUC,SAAV;AAEA,UAAKC,YAAL,GAAoB,yBAApB;AACA,UAAKC,aAAL,GAAqB,MAAKA,aAAL,CAAmBC,IAAnB,mFAArB;AACA,UAAKC,kBAAL,GAA0B,MAAKA,kBAAL,CAAwBD,IAAxB,mFAA1B;AACA,UAAKE,kBAAL,GAA0B,MAAKA,kBAAL,CAAwBF,IAAxB,mFAA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ADb;AAEC,QAAA,KAAK,EAAGE,KAFT;AAGC,QAAA,GAAG,EAAG,KAAK5B,YAHZ;AAIC,QAAA,IAAI,EAAG2B,IAJR;AAKC,sBAAaN,YALd;AAMC,2BAAkBA,YAAY,GAAG,IAAH,GAAUG,UANzC;AAOC,4BAAmBD,WAPpB;AAQC,QAAA,QAAQ,EAAC;AARV,SAUGE,QAVH,CADD;AAcA;;;EA9GuBI,kB;;eAiHV,sBAAS,CACvBC,wBADuB,EAEvBC,+BAFuB,EAGvBC,0BAHuB,EAIvB,+BAAkB;AACjBC,EAAAA,OAAO,EAAE;AADQ,CAAlB,CAJuB,CAAT,EAOVnC,UAPU,C","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Component, createRef } from '@wordpress/element';\nimport { ESCAPE } from '@wordpress/keycodes';\nimport { focus } from '@wordpress/dom';\nimport { withGlobalEvents, compose } from '@wordpress/compose';\n\n/**\n * External dependencies\n */\nimport clickOutside from 'react-click-outside';\n\n/**\n * Internal dependencies\n */\nimport withFocusReturn from '../higher-order/with-focus-return';\nimport withConstrainedTabbing from '../higher-order/with-constrained-tabbing';\n\nclass ModalFrame extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\n\t\tthis.containerRef = createRef();\n\t\tthis.handleKeyDown = this.handleKeyDown.bind( this );\n\t\tthis.handleClickOutside = this.handleClickOutside.bind( this );\n\t\tthis.focusFirstTabbable = this.focusFirstTabbable.bind( this );\n\t}\n\n\t/**\n\t * Focuses the first tabbable element when props.focusOnMount is true.\n\t */\n\tcomponentDidMount() {\n\t\t// Focus on mount\n\t\tif ( this.props.focusOnMount ) {\n\t\t\tthis.focusFirstTabbable();\n\t\t}\n\t}\n\n\t/**\n\t * Focuses the first tabbable element.\n\t */\n\tfocusFirstTabbable() {\n\t\tconst tabbables = focus.tabbable.find( this.containerRef.current );\n\t\tif ( tabbables.length ) {\n\t\t\ttabbables[ 0 ].focus();\n\t\t}\n\t}\n\n\t/**\n\t * Callback function called when clicked outside the modal.\n\t *\n\t * @param {Object} event Mouse click event.\n\t */\n\thandleClickOutside( event ) {\n\t\tif ( this.props.shouldCloseOnClickOutside ) {\n\t\t\tthis.onRequestClose( event );\n\t\t}\n\t}\n\n\t/**\n\t * Callback function called when a key is pressed.\n\t *\n\t * @param {KeyboardEvent} event Key down event.\n\t */\n\thandleKeyDown( event ) {\n\t\tif ( event.keyCode === ESCAPE ) {\n\t\t\tthis.handleEscapeKeyDown( event );\n\t\t}\n\t}\n\n\t/**\n\t * Handles a escape key down event.\n\t *\n\t * Calls onRequestClose and prevents default key press behaviour.\n\t *\n\t * @param {Object} event Key down event.\n\t */\n\thandleEscapeKeyDown( event ) {\n\t\tif ( this.props.shouldCloseOnEsc ) {\n\t\t\tevent.preventDefault();\n\t\t\tthis.onRequestClose( event );\n\t\t}\n\t}\n\n\t/**\n\t * Calls the onRequestClose callback props when it is available.\n\t *\n\t * @param {Object} event Event object.\n\t */\n\tonRequestClose( event ) {\n\t\tconst { onRequestClose } = this.props;\n\t\tif ( onRequestClose ) {\n\t\t\tonRequestClose( event );\n\t\t}\n\t}\n\n\t/**\n\t * Renders the modal frame element.\n\t *\n\t * @return {WPElement} The modal frame element.\n\t */\n\trender() {\n\t\tconst {\n\t\t\tcontentLabel,\n\t\t\taria: {\n\t\t\t\tdescribedby,\n\t\t\t\tlabelledby,\n\t\t\t},\n\t\t\tchildren,\n\t\t\tclassName,\n\t\t\trole,\n\t\t\tstyle,\n\t\t} = this.props;\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\tclassName={ className }\n\t\t\t\tstyle={ style }\n\t\t\t\tref={ this.containerRef }\n\t\t\t\trole={ role }\n\t\t\t\taria-label={ contentLabel }\n\t\t\t\taria-labelledby={ contentLabel ? null : labelledby }\n\t\t\t\taria-describedby={ describedby }\n\t\t\t\ttabIndex=\"-1\"\n\t\t\t>\n\t\t\t\t{ children }\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nexport default compose( [\n\twithFocusReturn,\n\twithConstrainedTabbing,\n\tclickOutside,\n\twithGlobalEvents( {\n\t\tkeydown: 'handleKeyDown',\n\t} ),\n] )( ModalFrame );\n"]}
1
+ {"version":3,"sources":["/Users/jdesrosiers/Sites/git-wordpress-develop/src/wp-content/plugins/gutenberg/packages/components/src/modal/frame.js"],"names":["ModalFrame","arguments","containerRef","handleKeyDown","bind","handleClickOutside","focusFirstTabbable","props","focusOnMount","tabbables","focus","tabbable","find","current","length","event","shouldCloseOnClickOutside","onRequestClose","keyCode","ESCAPE","handleEscapeKeyDown","shouldCloseOnEsc","preventDefault","contentLabel","aria","describedby","labelledby","children","className","role","style","Component","withFocusReturn","withConstrainedTabbing","clickOutside","keydown"],"mappings":";;;;;;;;;AAGA;;;;;;;;;;;;;;AACA;;AACA;;AACA;;AAKA;;AAKA;;AACA;;AAjBA;;;;AAQA;;;;AAKA;;;IAMMA,U;;;;;AACL,wBAAc;AAAA;;AAAA;AACb,iHAAUC,SAAV;AAEA,UAAKC,YAAL,GAAoB,yBAApB;AACA,UAAKC,aAAL,GAAqB,MAAKA,aAAL,CAAmBC,IAAnB,mFAArB;AACA,UAAKC,kBAAL,GAA0B,MAAKA,kBAAL,CAAwBD,IAAxB,mFAA1B;AACA,UAAKE,kBAAL,GAA0B,MAAKA,kBAAL,CAAwBF,IAAxB,mFAA1B;AANa;AAOb;AAED;;;;;;;wCAGoB;AACnB;AACA,UAAK,KAAKG,KAAL,CAAWC,YAAhB,EAA+B;AAC9B,aAAKF,kBAAL;AACA;AACD;AAED;;;;;;yCAGqB;AACpB,UAAMG,SAAS,GAAGC,WAAMC,QAAN,CAAeC,IAAf,CAAqB,KAAKV,YAAL,CAAkBW,OAAvC,CAAlB;;AACA,UAAKJ,SAAS,CAACK,MAAf,EAAwB;AACvBL,QAAAA,SAAS,CAAE,CAAF,CAAT,CAAeC,KAAf;AACA;AACD;AAED;;;;;;;;uCAKoBK,K,EAAQ;AAC3B,UAAK,KAAKR,KAAL,CAAWS,yBAAhB,EAA4C;AAC3C,a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/**\n * WordPress dependencies\n */\nimport { Component, createRef } from '@wordpress/element';\nimport { ESCAPE } from '@wordpress/keycodes';\nimport { focus } from '@wordpress/dom';\nimport { withGlobalEvents, compose } from '@wordpress/compose';\n\n/**\n * External dependencies\n */\nimport clickOutside from 'react-click-outside';\n\n/**\n * Internal dependencies\n */\nimport withFocusReturn from '../higher-order/with-focus-return';\nimport withConstrainedTabbing from '../higher-order/with-constrained-tabbing';\n\nclass ModalFrame extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\n\t\tthis.containerRef = createRef();\n\t\tthis.handleKeyDown = this.handleKeyDown.bind( this );\n\t\tthis.handleClickOutside = this.handleClickOutside.bind( this );\n\t\tthis.focusFirstTabbable = this.focusFirstTabbable.bind( this );\n\t}\n\n\t/**\n\t * Focuses the first tabbable element when props.focusOnMount is true.\n\t */\n\tcomponentDidMount() {\n\t\t// Focus on mount\n\t\tif ( this.props.focusOnMount ) {\n\t\t\tthis.focusFirstTabbable();\n\t\t}\n\t}\n\n\t/**\n\t * Focuses the first tabbable element.\n\t */\n\tfocusFirstTabbable() {\n\t\tconst tabbables = focus.tabbable.find( this.containerRef.current );\n\t\tif ( tabbables.length ) {\n\t\t\ttabbables[ 0 ].focus();\n\t\t}\n\t}\n\n\t/**\n\t * Callback function called when clicked outside the modal.\n\t *\n\t * @param {Object} event Mouse click event.\n\t */\n\thandleClickOutside( event ) {\n\t\tif ( this.props.shouldCloseOnClickOutside ) {\n\t\t\tthis.onRequestClose( event );\n\t\t}\n\t}\n\n\t/**\n\t * Callback function called when a key is pressed.\n\t *\n\t * @param {KeyboardEvent} event Key down event.\n\t */\n\thandleKeyDown( event ) {\n\t\tif ( event.keyCode === ESCAPE ) {\n\t\t\tthis.handleEscapeKeyDown( event );\n\t\t}\n\t}\n\n\t/**\n\t * Handles a escape key down event.\n\t *\n\t * Calls onRequestClose and prevents default key press behaviour.\n\t *\n\t * @param {Object} event Key down event.\n\t */\n\thandleEscapeKeyDown( event ) {\n\t\tif ( this.props.shouldCloseOnEsc ) {\n\t\t\tevent.preventDefault();\n\t\t\tthis.onRequestClose( event );\n\t\t}\n\t}\n\n\t/**\n\t * Calls the onRequestClose callback props when it is available.\n\t *\n\t * @param {Object} event Event object.\n\t */\n\tonRequestClose( event ) {\n\t\tconst { onRequestClose } = this.props;\n\t\tif ( onRequestClose ) {\n\t\t\tonRequestClose( event );\n\t\t}\n\t}\n\n\t/**\n\t * Renders the modal frame element.\n\t *\n\t * @return {WPElement} The modal frame element.\n\t */\n\trender() {\n\t\tconst {\n\t\t\tcontentLabel,\n\t\t\taria: {\n\t\t\t\tdescribedby,\n\t\t\t\tlabelledby,\n\t\t\t},\n\t\t\tchildren,\n\t\t\tclassName,\n\t\t\trole,\n\t\t\tstyle,\n\t\t} = this.props;\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\tclassName={ className }\n\t\t\t\tstyle={ style }\n\t\t\t\tref={ this.containerRef }\n\t\t\t\trole={ role }\n\t\t\t\taria-label={ contentLabel }\n\t\t\t\taria-labelledby={ contentLabel ? null : labelledby }\n\t\t\t\taria-describedby={ describedby }\n\t\t\t\ttabIndex=\"-1\"\n\t\t\t>\n\t\t\t\t{ children }\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nexport default compose( [\n\twithFocusReturn,\n\twithConstrainedTabbing,\n\tclickOutside,\n\twithGlobalEvents( {\n\t\tkeydown: 'handleKeyDown',\n\t} ),\n] )( ModalFrame );\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/jdesrosiers/Sites/gutenberg-security/5.1/packages/components/src/modal/header.js"],"names":["ModalHeader","icon","title","onClose","closeLabel","headingId","isDismissable","label"],"mappings":";;;;;;;;;;;AAGA;;AAKA;;AARA;;;;AAKA;;;AAKA,IAAMA,WAAW,GAAG,SAAdA,WAAc,OAAsE;AAAA,MAAlEC,IAAkE,QAAlEA,IAAkE;AAAA,MAA5DC,KAA4D,QAA5DA,KAA4D;AAAA,MAArDC,OAAqD,QAArDA,OAAqD;AAAA,MAA5CC,UAA4C,QAA5CA,UAA4C;AAAA,MAAhCC,SAAgC,QAAhCA,SAAgC;AAAA,MAArBC,aAAqB,QAArBA,aAAqB;AACzF,MAAMC,KAAK,GAAGH,UAAU,GAAGA,UAAH,GAAgB,cAAI,cAAJ,CAAxC;AAEA,SACC;AACC,IAAA,SAAS,EAAC;AADX,KAGC;AAAK,IAAA,SAAS,EAAC;AAAf,KACGH,IAAI,IACL;AAAM,IAAA,SAAS,EAAC,kCAAhB;AAAmD;AAAnD,KACGA,IADH,CAFF,EAMGC,KAAK,IACN;AAAI,IAAA,EAAE,EAAGG,SAAT;AACC,IAAA,SAAS,EAAC;AADX,KAEGH,KAFH,CAPF,CAHD,EAgBGI,aAAa,IACd,4BAAC,mBAAD;AACC,IAAA,OAAO,EAAGH,OADX;AAEC,IAAA,IAAI,EAAC,QAFN;AAGC,IAAA,KAAK,EAAGI;AAHT,IAjBF,CADD;AA0BA,CA7BD;;eA+BeP,W","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies.\n */\nimport IconButton from '../icon-button';\n\nconst ModalHeader = ( { icon, title, onClose, closeLabel, headingId, isDismissable } ) => {\n\tconst label = closeLabel ? closeLabel : __( 'Close dialog' );\n\n\treturn (\n\t\t<div\n\t\t\tclassName=\"components-modal__header\"\n\t\t>\n\t\t\t<div className=\"components-modal__header-heading-container\">\n\t\t\t\t{ icon &&\n\t\t\t\t\t<span className=\"components-modal__icon-container\" aria-hidden>\n\t\t\t\t\t\t{ icon }\n\t\t\t\t\t</span>\n\t\t\t\t}\n\t\t\t\t{ title &&\n\t\t\t\t\t<h1 id={ headingId }\n\t\t\t\t\t\tclassName=\"components-modal__header-heading\">\n\t\t\t\t\t\t{ title }\n\t\t\t\t\t</h1>\n\t\t\t\t}\n\t\t\t</div>\n\t\t\t{ isDismissable &&\n\t\t\t\t<IconButton\n\t\t\t\t\tonClick={ onClose }\n\t\t\t\t\ticon=\"no-alt\"\n\t\t\t\t\tlabel={ label }\n\t\t\t\t/>\n\t\t\t}\n\t\t</div>\n\t);\n};\n\nexport default ModalHeader;\n"]}
1
+ {"version":3,"sources":["/Users/jdesrosiers/Sites/git-wordpress-develop/src/wp-content/plugins/gutenberg/packages/components/src/modal/header.js"],"names":["ModalHeader","icon","title","onClose","closeLabel","headingId","isDismissable","label"],"mappings":";;;;;;;;;;;AAGA;;AAKA;;AARA;;;;AAKA;;;AAKA,IAAMA,WAAW,GAAG,SAAdA,WAAc,OAAsE;AAAA,MAAlEC,IAAkE,QAAlEA,IAAkE;AAAA,MAA5DC,KAA4D,QAA5DA,KAA4D;AAAA,MAArDC,OAAqD,QAArDA,OAAqD;AAAA,MAA5CC,UAA4C,QAA5CA,UAA4C;AAAA,MAAhCC,SAAgC,QAAhCA,SAAgC;AAAA,MAArBC,aAAqB,QAArBA,aAAqB;AACzF,MAAMC,KAAK,GAAGH,UAAU,GAAGA,UAAH,GAAgB,cAAI,cAAJ,CAAxC;AAEA,SACC;AACC,IAAA,SAAS,EAAC;AADX,KAGC;AAAK,IAAA,SAAS,EAAC;AAAf,KACGH,IAAI,IACL;AAAM,IAAA,SAAS,EAAC,kCAAhB;AAAmD;AAAnD,KACGA,IADH,CAFF,EAMGC,KAAK,IACN;AAAI,IAAA,EAAE,EAAGG,SAAT;AACC,IAAA,SAAS,EAAC;AADX,KAEGH,KAFH,CAPF,CAHD,EAgBGI,aAAa,IACd,4BAAC,mBAAD;AACC,IAAA,OAAO,EAAGH,OADX;AAEC,IAAA,IAAI,EAAC,QAFN;AAGC,IAAA,KAAK,EAAGI;AAHT,IAjBF,CADD;AA0BA,CA7BD;;eA+BeP,W","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies.\n */\nimport IconButton from '../icon-button';\n\nconst ModalHeader = ( { icon, title, onClose, closeLabel, headingId, isDismissable } ) => {\n\tconst label = closeLabel ? closeLabel : __( 'Close dialog' );\n\n\treturn (\n\t\t<div\n\t\t\tclassName=\"components-modal__header\"\n\t\t>\n\t\t\t<div className=\"components-modal__header-heading-container\">\n\t\t\t\t{ icon &&\n\t\t\t\t\t<span className=\"components-modal__icon-container\" aria-hidden>\n\t\t\t\t\t\t{ icon }\n\t\t\t\t\t</span>\n\t\t\t\t}\n\t\t\t\t{ title &&\n\t\t\t\t\t<h1 id={ headingId }\n\t\t\t\t\t\tclassName=\"components-modal__header-heading\">\n\t\t\t\t\t\t{ title }\n\t\t\t\t\t</h1>\n\t\t\t\t}\n\t\t\t</div>\n\t\t\t{ isDismissable &&\n\t\t\t\t<IconButton\n\t\t\t\t\tonClick={ onClose }\n\t\t\t\t\ticon=\"no-alt\"\n\t\t\t\t\tlabel={ label }\n\t\t\t\t/>\n\t\t\t}\n\t\t</div>\n\t);\n};\n\nexport default ModalHeader;\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/jdesrosiers/Sites/gutenberg-security/5.1/packages/components/src/modal/index.js"],"names":["parentElement","openModalCount","Modal","props","prepareDOM","openFirstModal","closeLastModal","cleanDOM","document","createElement","body","appendChild","node","removeChild","ariaHelper","hideApp","classList","add","bodyOpenClassName","remove","showApp","overlayClassName","className","onRequestClose","title","icon","closeButtonLabel","children","aria","instanceId","isDismissable","otherProps","headingId","labelledby","describedby","Component","defaultProps","role","noop","focusOnMount","shouldCloseOnEsc","shouldCloseOnClickOutside"],"mappings":";;;;;;;;;;;AASA;;;;;;;;;;;;;;;;AANA;;AACA;;AAMA;;AAKA;;AACA;;AACA;;AACA;;AAlBA;;;;AAMA;;;;AAMA;;;AAQA;AACA,IAAIA,aAAJ;AAAA,IACCC,cAAc,GAAG,CADlB;;IAGMC,K;;;;;AACL,iBAAaC,KAAb,EAAqB;AAAA;;AAAA;AACpB,2GAAOA,KAAP;;AAEA,UAAKC,UAAL;;AAHoB;AAIpB;AAED;;;;;;;;;wCAKoB;AACnBH,MAAAA,cAAc;;AAEd,UAAKA,cAAc,KAAK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AE,IADP;AAELC,IAAAA,WAAW,EAAE;AAFR;AAVc,CAArB;;eAgBe,6BAAgBhC,KAAhB,C","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\nimport { noop } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { Component, createPortal } from '@wordpress/element';\nimport { withInstanceId } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport ModalFrame from './frame';\nimport ModalHeader from './header';\nimport * as ariaHelper from './aria-helper';\nimport IsolatedEventContainer from '../isolated-event-container';\n\n// Used to count the number of open modals.\nlet parentElement,\n\topenModalCount = 0;\n\nclass Modal extends Component {\n\tconstructor( props ) {\n\t\tsuper( props );\n\n\t\tthis.prepareDOM();\n\t}\n\n\t/**\n\t * Appends the modal's node to the DOM, so the portal can render the\n\t * modal in it. Also calls the openFirstModal when this is the first modal to be\n\t * opened.\n\t */\n\tcomponentDidMount() {\n\t\topenModalCount++;\n\n\t\tif ( openModalCount === 1 ) {\n\t\t\tthis.openFirstModal();\n\t\t}\n\t}\n\n\t/**\n\t * Removes the modal's node from the DOM. Also calls closeLastModal when this is\n\t * the last modal to be closed.\n\t */\n\tcomponentWillUnmount() {\n\t\topenModalCount--;\n\n\t\tif ( openModalCount === 0 ) {\n\t\t\tthis.closeLastModal();\n\t\t}\n\n\t\tthis.cleanDOM();\n\t}\n\n\t/**\n\t * Prepares the DOM for the modals to be rendered.\n\t *\n\t * Every modal is mounted in a separate div appended to a parent div\n\t * that is appended to the document body.\n\t *\n\t * The parent div will be created if it does not yet exist, and the\n\t * separate div for this specific modal will be appended to that.\n\t */\n\tprepareDOM() {\n\t\tif ( ! parentElement ) {\n\t\t\tparentElement = document.createElement( 'div' );\n\t\t\tdocument.body.appendChild( parentElement );\n\t\t}\n\t\tthis.node = document.createElement( 'div' );\n\t\tparentElement.appendChild( this.node );\n\t}\n\n\t/**\n\t * Removes the specific mounting point for this modal from the DOM.\n\t */\n\tcleanDOM() {\n\t\tparentElement.removeChild( this.node );\n\t}\n\n\t/**\n\t * Prepares the DOM for this modal and any additional modal to be mounted.\n\t *\n\t * It appends an additional div to the body for the modals to be rendered in,\n\t * it hides any other elements from screen-readers and adds an additional class\n\t * to the body to prevent scrolling while the modal is open.\n\t */\n\topenFirstModal() {\n\t\tariaHelper.hideApp( parentElement );\n\t\tdocument.body.classList.add( this.props.bodyOpenClassName );\n\t}\n\n\t/**\n\t * Cleans up the DOM after the last modal is closed and makes the app available\n\t * for screen-readers again.\n\t */\n\tcloseLastModal() {\n\t\tdocument.body.classList.remove( this.props.bodyOpenClassName );\n\t\tariaHelper.showApp();\n\t}\n\n\t/**\n\t * Renders the modal.\n\t *\n\t * @return {WPElement} The modal element.\n\t */\n\trender() {\n\t\tconst {\n\t\t\toverlayClassName,\n\t\t\tclassName,\n\t\t\tonRequestClose,\n\t\t\ttitle,\n\t\t\ticon,\n\t\t\tcloseButtonLabel,\n\t\t\tchildren,\n\t\t\taria,\n\t\t\tinstanceId,\n\t\t\tisDismissable,\n\t\t\t...otherProps\n\t\t} = this.props;\n\n\t\tconst headingId = aria.labelledby || `components-modal-header-${ instanceId }`;\n\n\t\t// Disable reason: this stops mouse events from triggering tooltips and\n\t\t// other elements underneath the modal overlay.\n\t\t/* eslint-disable jsx-a11y/no-static-element-interactions */\n\t\treturn createPortal(\n\t\t\t<IsolatedEventContainer\n\t\t\t\tclassName={ classnames( 'components-modal__screen-overlay', overlayClassName ) }\n\t\t\t>\n\t\t\t\t<ModalFrame\n\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t'components-modal__frame',\n\t\t\t\t\t\tclassName\n\t\t\t\t\t) }\n\t\t\t\t\tonRequestClose={ onRequestClose }\n\t\t\t\t\taria={ {\n\t\t\t\t\t\tlabelledby: title ? headingId : null,\n\t\t\t\t\t\tdescribedby: aria.describedby,\n\t\t\t\t\t} }\n\t\t\t\t\t{ ...otherProps }\n\t\t\t\t>\n\t\t\t\t\t<div className={ 'components-modal__content' } tabIndex=\"0\">\n\t\t\t\t\t\t<ModalHeader\n\t\t\t\t\t\t\tcloseLabel={ closeButtonLabel }\n\t\t\t\t\t\t\theadingId={ headingId }\n\t\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\t\tisDismissable={ isDismissable }\n\t\t\t\t\t\t\tonClose={ onRequestClose }\n\t\t\t\t\t\t\ttitle={ title }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{ children }\n\t\t\t\t\t</div>\n\t\t\t\t</ModalFrame>\n\t\t\t</IsolatedEventContainer>,\n\t\t\tthis.node\n\t\t);\n\t\t/* eslint-enable jsx-a11y/no-static-element-interactions */\n\t}\n}\n\nModal.defaultProps = {\n\tbodyOpenClassName: 'modal-open',\n\trole: 'dialog',\n\ttitle: null,\n\tonRequestClose: noop,\n\tfocusOnMount: true,\n\tshouldCloseOnEsc: true,\n\tshouldCloseOnClickOutside: true,\n\tisDismissable: true,\n\t/* accessibility */\n\taria: {\n\t\tlabelledby: null,\n\t\tdescribedby: null,\n\t},\n};\n\nexport default withInstanceId( Modal );\n"]}
1
+ {"version":3,"sources":["/Users/jdesrosiers/Sites/git-wordpress-develop/src/wp-content/plugins/gutenberg/packages/components/src/modal/index.js"],"names":["parentElement","openModalCount","Modal","props","prepareDOM","openFirstModal","closeLastModal","cleanDOM","document","createElement","body","appendChild","node","removeChild","ariaHelper","hideApp","classList","add","bodyOpenClassName","remove","showApp","overlayClassName","className","onRequestClose","title","icon","closeButtonLabel","children","aria","instanceId","isDismissable","otherProps","headingId","labelledby","describedby","Component","defaultProps","role","noop","focusOnMount","shouldCloseOnEsc","shouldCloseOnClickOutside"],"mappings":";;;;;;;;;;;AASA;;;;;;;;;;;;;;;;AANA;;AACA;;AAMA;;AAKA;;AACA;;AACA;;AACA;;AAlBA;;;;AAMA;;;;AAMA;;;AAQA;AACA,IAAIA,aAAJ;AAAA,IACCC,cAAc,GAAG,CADlB;;IAGMC,K;;;;;AACL,iBAAaC,KAAb,EAAqB;AAAA;;AAAA;AACpB,2GAAOA,K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A,yBAAyB,EAAE,IAPP;AAQpBX,EAAAA,aAAa,EAAE,IARK;;AASpB;AACAF,EAAAA,IAAI,EAAE;AACLK,IAAAA,UAAU,EAAE,IADP;AAELC,IAAAA,WAAW,EAAE;AAFR;AAVc,CAArB;;eAgBe,6BAAgBhC,KAAhB,C","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\nimport { noop } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { Component, createPortal } from '@wordpress/element';\nimport { withInstanceId } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport ModalFrame from './frame';\nimport ModalHeader from './header';\nimport * as ariaHelper from './aria-helper';\nimport IsolatedEventContainer from '../isolated-event-container';\n\n// Used to count the number of open modals.\nlet parentElement,\n\topenModalCount = 0;\n\nclass Modal extends Component {\n\tconstructor( props ) {\n\t\tsuper( props );\n\n\t\tthis.prepareDOM();\n\t}\n\n\t/**\n\t * Appends the modal's node to the DOM, so the portal can render the\n\t * modal in it. Also calls the openFirstModal when this is the first modal to be\n\t * opened.\n\t */\n\tcomponentDidMount() {\n\t\topenModalCount++;\n\n\t\tif ( openModalCount === 1 ) {\n\t\t\tthis.openFirstModal();\n\t\t}\n\t}\n\n\t/**\n\t * Removes the modal's node from the DOM. Also calls closeLastModal when this is\n\t * the last modal to be closed.\n\t */\n\tcomponentWillUnmount() {\n\t\topenModalCount--;\n\n\t\tif ( openModalCount === 0 ) {\n\t\t\tthis.closeLastModal();\n\t\t}\n\n\t\tthis.cleanDOM();\n\t}\n\n\t/**\n\t * Prepares the DOM for the modals to be rendered.\n\t *\n\t * Every modal is mounted in a separate div appended to a parent div\n\t * that is appended to the document body.\n\t *\n\t * The parent div will be created if it does not yet exist, and the\n\t * separate div for this specific modal will be appended to that.\n\t */\n\tprepareDOM() {\n\t\tif ( ! parentElement ) {\n\t\t\tparentElement = document.createElement( 'div' );\n\t\t\tdocument.body.appendChild( parentElement );\n\t\t}\n\t\tthis.node = document.createElement( 'div' );\n\t\tparentElement.appendChild( this.node );\n\t}\n\n\t/**\n\t * Removes the specific mounting point for this modal from the DOM.\n\t */\n\tcleanDOM() {\n\t\tparentElement.removeChild( this.node );\n\t}\n\n\t/**\n\t * Prepares the DOM for this modal and any additional modal to be mounted.\n\t *\n\t * It appends an additional div to the body for the modals to be rendered in,\n\t * it hides any other elements from screen-readers and adds an additional class\n\t * to the body to prevent scrolling while the modal is open.\n\t */\n\topenFirstModal() {\n\t\tariaHelper.hideApp( parentElement );\n\t\tdocument.body.classList.add( this.props.bodyOpenClassName );\n\t}\n\n\t/**\n\t * Cleans up the DOM after the last modal is closed and makes the app available\n\t * for screen-readers again.\n\t */\n\tcloseLastModal() {\n\t\tdocument.body.classList.remove( this.props.bodyOpenClassName );\n\t\tariaHelper.showApp();\n\t}\n\n\t/**\n\t * Renders the modal.\n\t *\n\t * @return {WPElement} The modal element.\n\t */\n\trender() {\n\t\tconst {\n\t\t\toverlayClassName,\n\t\t\tclassName,\n\t\t\tonRequestClose,\n\t\t\ttitle,\n\t\t\ticon,\n\t\t\tcloseButtonLabel,\n\t\t\tchildren,\n\t\t\taria,\n\t\t\tinstanceId,\n\t\t\tisDismissable,\n\t\t\t...otherProps\n\t\t} = this.props;\n\n\t\tconst headingId = aria.labelledby || `components-modal-header-${ instanceId }`;\n\n\t\t// Disable reason: this stops mouse events from triggering tooltips and\n\t\t// other elements underneath the modal overlay.\n\t\t/* eslint-disable jsx-a11y/no-static-element-interactions */\n\t\treturn createPortal(\n\t\t\t<IsolatedEventContainer\n\t\t\t\tclassName={ classnames( 'components-modal__screen-overlay', overlayClassName ) }\n\t\t\t>\n\t\t\t\t<ModalFrame\n\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t'components-modal__frame',\n\t\t\t\t\t\tclassName\n\t\t\t\t\t) }\n\t\t\t\t\tonRequestClose={ onRequestClose }\n\t\t\t\t\taria={ {\n\t\t\t\t\t\tlabelledby: title ? headingId : null,\n\t\t\t\t\t\tdescribedby: aria.describedby,\n\t\t\t\t\t} }\n\t\t\t\t\t{ ...otherProps }\n\t\t\t\t>\n\t\t\t\t\t<div className={ 'components-modal__content' } tabIndex=\"0\">\n\t\t\t\t\t\t<ModalHeader\n\t\t\t\t\t\t\tcloseLabel={ closeButtonLabel }\n\t\t\t\t\t\t\theadingId={ headingId }\n\t\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\t\tisDismissable={ isDismissable }\n\t\t\t\t\t\t\tonClose={ onRequestClose }\n\t\t\t\t\t\t\ttitle={ title }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{ children }\n\t\t\t\t\t</div>\n\t\t\t\t</ModalFrame>\n\t\t\t</IsolatedEventContainer>,\n\t\t\tthis.node\n\t\t);\n\t\t/* eslint-enable jsx-a11y/no-static-element-interactions */\n\t}\n}\n\nModal.defaultProps = {\n\tbodyOpenClassName: 'modal-open',\n\trole: 'dialog',\n\ttitle: null,\n\tonRequestClose: noop,\n\tfocusOnMount: true,\n\tshouldCloseOnEsc: true,\n\tshouldCloseOnClickOutside: true,\n\tisDismissable: true,\n\t/* accessibility */\n\taria: {\n\t\tlabelledby: null,\n\t\tdescribedby: null,\n\t},\n};\n\nexport default withInstanceId( Modal );\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/jdesrosiers/Sites/gutenberg-security/5.1/packages/components/src/navigable-container/container.js"],"names":["cycleValue","value","total","offset","nextValue","NavigableContainer","arguments","onKeyDown","bind","bindContainer","getFocusableContext","getFocusableIndex","ref","forwardedRef","props","container","current","target","onlyBrowserTabstops","finder","focus","tabbable","focusable","focusables","find","index","directIndex","indexOf","event","cycle","eventToOffset","onNavigate","noop","stopNavigationEvents","undefined","nativeEvent","stopImmediatePropagation","getAttribute","preventDefault","stopPropagation","context","document","activeElement","nextIndex","length","children","onFocus","Component","forwardedNavigableContainer","displayName"],"mappings":";;;;;;;;;AAQA;;;;;;;;;;;;;;;;;;AALA;;AAMA;;AATA;;;;AAKA;;;AAMA,SAASA,UAAT,CAA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B;AAChB;AACA;;AA/BiB,UAiCVf,KAjCU,GAiCYe,OAjCZ,CAiCVf,KAjCU;AAAA,UAiCHF,UAjCG,GAiCYiB,OAjCZ,CAiCHjB,UAjCG;AAkClB,UAAMoB,SAAS,GAAGd,KAAK,GAAG7B,UAAU,CAAEyB,KAAF,EAASF,UAAU,CAACqB,MAApB,EAA4BzC,MAA5B,CAAb,GAAoDsB,KAAK,GAAGtB,MAAnF;;AACA,UAAKwC,SAAS,IAAI,CAAb,IAAkBA,SAAS,GAAGpB,UAAU,CAACqB,MAA9C,EAAuD;AACtDrB,QAAAA,UAAU,CAAEoB,SAAF,CAAV,CAAwBvB,KAAxB;AACAW,QAAAA,UAAU,CAAEY,SAAF,EAAapB,UAAU,CAAEoB,SAAF,CAAvB,CAAV;AACA;AACD;;;6BAEQ;AAAA,yBACuB,KAAK7B,KAD5B;AAAA,UACA+B,QADA,gBACAA,QADA;AAAA,UACa/B,KADb,uEAER;;AACA;;AACA,aACC;AAAK,QAAA,GAAG,EAAG,KAAKL;AAAhB,SACM,kBAAMK,KAAN,EAAa,CACjB,sBADiB,EAEjB,eAFiB,EAGjB,YAHiB,EAIjB,OAJiB,EAKjB,qBALiB,EAMjB,cANiB,CAAb,CADN;AASC,QAAA,SAAS,EAAG,KAAKP,SATlB;AAUC,QAAA,OAAO,EAAG,KAAKuC;AAVhB,UAWGD,QAXH,CADD;AAeA;;;EApG+BE,kB;;AAuGjC,IAAMC,2BAA2B,GAAG,SAA9BA,2BAA8B,CAAElC,KAAF,EAASF,GAAT,EAAkB;AACrD,SAAO,4BAAC,kBAAD,6BAAyBE,KAAzB;AAAiC,IAAA,YAAY,EAAGF;AAAhD,KAAP;AACA,CAFD;;AAGAoC,2BAA2B,CAACC,WAA5B,GAA0C,oBAA1C;;eAEe,yBAAYD,2BAAZ,C","sourcesContent":["/**\n * External Dependencies\n */\nimport { omit, noop, isFunction } from 'lodash';\n\n/**\n * WordPress Dependencies\n */\nimport { Component, forwardRef } from '@wordpress/element';\nimport { focus } from '@wordpress/dom';\n\nfunction cycleValue( value, total, offset ) {\n\tconst nextValue = value + offset;\n\tif ( nextValue < 0 ) {\n\t\treturn total + nextValue;\n\t} else if ( nextValue >= total ) {\n\t\treturn nextValue - total;\n\t}\n\n\treturn nextValue;\n}\n\nclass NavigableContainer extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\t\tthis.onKeyDown = this.onKeyDown.bind( this );\n\t\tthis.bindContainer = this.bindContainer.bind( this );\n\n\t\tthis.getFocusableContext = this.getFocusableContext.bind( this );\n\t\tthis.getFocusableIndex = this.getFocusableIndex.bind( this );\n\t}\n\n\tbindContainer( ref ) {\n\t\tconst { forwardedRef } = this.props;\n\t\tthis.container = ref;\n\n\t\tif ( isFunction( forwardedRef ) ) {\n\t\t\tforwardedRef( ref );\n\t\t} else if ( forwardedRef && 'current' in forwardedRef ) {\n\t\t\tforwardedRef.current = ref;\n\t\t}\n\t}\n\n\tgetFocusableContext( target ) {\n\t\tconst { onlyBrowserTabstops } = this.props;\n\t\tconst finder = onlyBrowserTabstops ? focus.tabbable : focus.focusable;\n\t\tconst focusables = finder.find( this.container );\n\n\t\tconst index = this.getFocusableIndex( focusables, target );\n\t\tif ( index > -1 && target ) {\n\t\t\treturn { index, target, focusables };\n\t\t}\n\t\treturn null;\n\t}\n\n\tgetFocusableIndex( focusables, target ) {\n\t\tconst directIndex = focusables.indexOf( target );\n\t\tif ( directIndex !== -1 ) {\n\t\t\treturn directIndex;\n\t\t}\n\t}\n\n\tonKeyDown( event ) {\n\t\tif ( this.props.onKeyDown ) {\n\t\t\tthis.props.onKeyDown( event );\n\t\t}\n\n\t\tconst { getFocusableContext } = this;\n\t\tconst { cycle = true, eventToOffset, onNavigate = noop, stopNavigationEvents } = this.props;\n\n\t\tconst offset = eventToOffset( event );\n\n\t\t// eventToOffset returns undefined if the event is not handled by the component\n\t\tif ( offset !== undefined && stopNavigationEvents ) {\n\t\t\t// Prevents arrow key handlers bound to the document directly interfering\n\t\t\tevent.nativeEvent.stopImmediatePropagation();\n\n\t\t\t// When navigating a collection of items, prevent scroll containers\n\t\t\t// from scrolling.\n\t\t\tif ( event.target.getAttribute( 'role' ) === 'menuitem' ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\n\t\t\tevent.stopPropagation();\n\t\t}\n\n\t\tif ( ! offset ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst context = getFocusableContext( document.activeElement );\n\t\tif ( ! context ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { index, focusables } = context;\n\t\tconst nextIndex = cycle ? cycleValue( index, focusables.length, offset ) : index + offset;\n\t\tif ( nextIndex >= 0 && nextIndex < focusables.length ) {\n\t\t\tfocusables[ nextIndex ].focus();\n\t\t\tonNavigate( nextIndex, focusables[ nextIndex ] );\n\t\t}\n\t}\n\n\trender() {\n\t\tconst { children, ...props } = this.props;\n\t\t// Disable reason: Assumed role is applied by parent via props spread.\n\t\t/* eslint-disable jsx-a11y/no-static-element-interactions */\n\t\treturn (\n\t\t\t<div ref={ this.bindContainer }\n\t\t\t\t{ ...omit( props, [\n\t\t\t\t\t'stopNavigationEvents',\n\t\t\t\t\t'eventToOffset',\n\t\t\t\t\t'onNavigate',\n\t\t\t\t\t'cycle',\n\t\t\t\t\t'onlyBrowserTabstops',\n\t\t\t\t\t'forwardedRef',\n\t\t\t\t] ) }\n\t\t\t\tonKeyDown={ this.onKeyDown }\n\t\t\t\tonFocus={ this.onFocus }>\n\t\t\t\t{ children }\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nconst forwardedNavigableContainer = ( props, ref ) => {\n\treturn <NavigableContainer { ...props } forwardedRef={ ref } />;\n};\nforwardedNavigableContainer.displayName = 'NavigableContainer';\n\nexport default forwardRef( forwardedNavigableContainer );\n"]}
1
+ {"version":3,"sources":["/Users/jdesrosiers/Sites/git-wordpress-develop/src/wp-content/plugins/gutenberg/packages/components/src/navigable-container/container.js"],"names":["cycleValue","value","total","offset","nextValue","NavigableContainer","arguments","onKeyDown","bind","bindContainer","getFocusableContext","getFocusableIndex","ref","forwardedRef","props","container","current","target","onlyBrowserTabstops","finder","focus","tabbable","focusable","focusables","find","index","directIndex","indexOf","event","cycle","eventToOffset","onNavigate","noop","stopNavigationEvents","undefined","nativeEvent","stopImmediatePropagation","getAttribute","preventDefault","stopPropagation","context","document","activeElement","nextIndex","length","children","onFocus","Component","forwardedNavigableContainer","displayName"],"mappings":";;;;;;;;;AAQA;;;;;;;;;;;;;;;;;;AALA;;AAMA;;AATA;;;;AAKA;;;AAMA,SAASA,UAAT,CAAqBC,KAArB,EAA4BC,KAA5B,EAAmCC,MAAnC,EAA4C;AAC3C,MAAMC,SAAS,GAAGH,KAAK,GAAGE,MAA1B;;AACA,MAAKC,SAAS,GAAG,CAAjB,EAAqB;AACpB,WAAOF,KAAK,GAAGE,SAAf;AACA,GAFD,MAEO,IAAKA,SAAS,IAAIF,KAAlB,EAA0B;AAChC,WAAOE,SAAS,GAAGF,KAAnB;AACA;;AAED,SAAOE,SAAP;AACA;;IAEKC,kB;;;;;AACL,gCAAc;AAAA;;AAAA;AACb,yHAAUC,SAAV;AACA,UAAKC,SAAL,GAAiB,MAAKA,SAAL,CAAeC,IAAf,mFAAjB;AACA,UAAKC,aAAL,GAAqB,MAAKA,aAAL,CAAmBD,IAAnB,mFAArB;AAEA,UAAKE,mBAAL,GAA2B,MAAKA,mBAAL,CAAyBF,IAAzB,mFAA3B;AACA,UAAKG,iBAAL,GAAyB,MAAKA,iBAAL,CAAuBH,IAAvB,mFAAzB;AANa;AAOb;;;;kCAEcI,G,EAAM;AAAA,UACZC,YADY,GACK,KAAKC,KADV,CACZD,YADY;AAEpB,WAAKE,SAAL,GAAiBH,GAAjB;;AAEA,UAAK,wBAAYC,YAAZ,CAAL,EAAkC;AACjCA,QAAAA,YAAY,CAAED,GAAF,CAAZ;AACA,OAFD,MAEO,IAAKC,YAAY,IAAI,aAAaA,YAAlC,EAAiD;AACvDA,QAAAA,YAAY,CAACG,O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B;;AAuGjC,IAAMC,2BAA2B,GAAG,SAA9BA,2BAA8B,CAAElC,KAAF,EAASF,GAAT,EAAkB;AACrD,SAAO,4BAAC,kBAAD,6BAAyBE,KAAzB;AAAiC,IAAA,YAAY,EAAGF;AAAhD,KAAP;AACA,CAFD;;AAGAoC,2BAA2B,CAACC,WAA5B,GAA0C,oBAA1C;;eAEe,yBAAYD,2BAAZ,C","sourcesContent":["/**\n * External Dependencies\n */\nimport { omit, noop, isFunction } from 'lodash';\n\n/**\n * WordPress Dependencies\n */\nimport { Component, forwardRef } from '@wordpress/element';\nimport { focus } from '@wordpress/dom';\n\nfunction cycleValue( value, total, offset ) {\n\tconst nextValue = value + offset;\n\tif ( nextValue < 0 ) {\n\t\treturn total + nextValue;\n\t} else if ( nextValue >= total ) {\n\t\treturn nextValue - total;\n\t}\n\n\treturn nextValue;\n}\n\nclass NavigableContainer extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\t\tthis.onKeyDown = this.onKeyDown.bind( this );\n\t\tthis.bindContainer = this.bindContainer.bind( this );\n\n\t\tthis.getFocusableContext = this.getFocusableContext.bind( this );\n\t\tthis.getFocusableIndex = this.getFocusableIndex.bind( this );\n\t}\n\n\tbindContainer( ref ) {\n\t\tconst { forwardedRef } = this.props;\n\t\tthis.container = ref;\n\n\t\tif ( isFunction( forwardedRef ) ) {\n\t\t\tforwardedRef( ref );\n\t\t} else if ( forwardedRef && 'current' in forwardedRef ) {\n\t\t\tforwardedRef.current = ref;\n\t\t}\n\t}\n\n\tgetFocusableContext( target ) {\n\t\tconst { onlyBrowserTabstops } = this.props;\n\t\tconst finder = onlyBrowserTabstops ? focus.tabbable : focus.focusable;\n\t\tconst focusables = finder.find( this.container );\n\n\t\tconst index = this.getFocusableIndex( focusables, target );\n\t\tif ( index > -1 && target ) {\n\t\t\treturn { index, target, focusables };\n\t\t}\n\t\treturn null;\n\t}\n\n\tgetFocusableIndex( focusables, target ) {\n\t\tconst directIndex = focusables.indexOf( target );\n\t\tif ( directIndex !== -1 ) {\n\t\t\treturn directIndex;\n\t\t}\n\t}\n\n\tonKeyDown( event ) {\n\t\tif ( this.props.onKeyDown ) {\n\t\t\tthis.props.onKeyDown( event );\n\t\t}\n\n\t\tconst { getFocusableContext } = this;\n\t\tconst { cycle = true, eventToOffset, onNavigate = noop, stopNavigationEvents } = this.props;\n\n\t\tconst offset = eventToOffset( event );\n\n\t\t// eventToOffset returns undefined if the event is not handled by the component\n\t\tif ( offset !== undefined && stopNavigationEvents ) {\n\t\t\t// Prevents arrow key handlers bound to the document directly interfering\n\t\t\tevent.nativeEvent.stopImmediatePropagation();\n\n\t\t\t// When navigating a collection of items, prevent scroll containers\n\t\t\t// from scrolling.\n\t\t\tif ( event.target.getAttribute( 'role' ) === 'menuitem' ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\n\t\t\tevent.stopPropagation();\n\t\t}\n\n\t\tif ( ! offset ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst context = getFocusableContext( document.activeElement );\n\t\tif ( ! context ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { index, focusables } = context;\n\t\tconst nextIndex = cycle ? cycleValue( index, focusables.length, offset ) : index + offset;\n\t\tif ( nextIndex >= 0 && nextIndex < focusables.length ) {\n\t\t\tfocusables[ nextIndex ].focus();\n\t\t\tonNavigate( nextIndex, focusables[ nextIndex ] );\n\t\t}\n\t}\n\n\trender() {\n\t\tconst { children, ...props } = this.props;\n\t\t// Disable reason: Assumed role is applied by parent via props spread.\n\t\t/* eslint-disable jsx-a11y/no-static-element-interactions */\n\t\treturn (\n\t\t\t<div ref={ this.bindContainer }\n\t\t\t\t{ ...omit( props, [\n\t\t\t\t\t'stopNavigationEvents',\n\t\t\t\t\t'eventToOffset',\n\t\t\t\t\t'onNavigate',\n\t\t\t\t\t'cycle',\n\t\t\t\t\t'onlyBrowserTabstops',\n\t\t\t\t\t'forwardedRef',\n\t\t\t\t] ) }\n\t\t\t\tonKeyDown={ this.onKeyDown }\n\t\t\t\tonFocus={ this.onFocus }>\n\t\t\t\t{ children }\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nconst forwardedNavigableContainer = ( props, ref ) => {\n\treturn <NavigableContainer { ...props } forwardedRef={ ref } />;\n};\nforwardedNavigableContainer.displayName = 'NavigableContainer';\n\nexport default forwardRef( forwardedNavigableContainer );\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/jdesrosiers/Sites/gutenberg-security/5.1/packages/components/src/navigable-container/index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAGA;;AACA","sourcesContent":["/**\n * Internal Dependencies\n */\nexport { default as NavigableMenu } from './menu';\nexport { default as TabbableContainer } from './tabbable';\n"]}
1
+ {"version":3,"sources":["/Users/jdesrosiers/Sites/git-wordpress-develop/src/wp-content/plugins/gutenberg/packages/components/src/navigable-container/index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAGA;;AACA","sourcesContent":["/**\n * Internal Dependencies\n */\nexport { default as NavigableMenu } from './menu';\nexport { default as TabbableContainer } from './tabbable';\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/jdesrosiers/Sites/gutenberg-security/5.1/packages/components/src/navigable-container/menu.js"],"names":["NavigableMenu","ref","role","orientation","rest","eventToOffset","evt","keyCode","next","DOWN","previous","UP","RIGHT","LEFT"],"mappings":";;;;;;;;;;AAQA;;;;;;AALA;;AAMA;;AAKA;;AAdA;;;;AAKA;;;;AAMA;;;AAKO,SAASA,aAAT,OAIJC,GAJI,EAIE;AAAA,uBAHRC,IAGQ;AAAA,MAHRA,IAGQ,0BAHD,MAGC;AAAA,8BAFRC,WAEQ;AAAA,MAFRA,WAEQ,iCAFM,UAEN;AAAA,MADLC,IACK;;AACR,MAAMC,aAAa,GAAG,SAAhBA,aAAgB,CAAEC,GAAF,EAAW;AAAA,QACxBC,OADwB,GACZD,GADY,CACxBC,OADwB;AAGhC,QAAIC,IAAI,GAAG,CAAEC,cAAF,CAAX;AACA,QAAIC,QAAQ,GAAG,CAAEC,YAAF,CAAf;;AAEA,QAAKR,WAAW,KAAK,YAArB,EAAoC;AACnCK,MAAAA,IAAI,GAAG,CAAEI,eAAF,CAAP;AACAF,MAAAA,QAAQ,GAAG,CAAEG,cAAF,CAAX;AACA;;AAED,QAAKV,WAAW,KAAK,MAArB,EAA8B;AAC7BK,MAAAA,IAAI,GAAG,CAAEI,eAAF,EAASH,cAAT,CAAP;AACAC,MAAAA,QAAQ,GAAG,CAAEG,cAAF,EAAQF,YAAR,CAAX;AACA;;AAED,QAAK,sBAAUH,IAAV,EAAgBD,OAAhB,CAAL,EAAiC;AAChC,aAAO,CAAP;AACA,KAFD,MAEO,IAAK,sBAAUG,QAAV,EAAoBH,OAApB,CAAL,EAAqC;AAC3C,aAAO,CAAC,CAAR;AACA;AACD,GArBD;;AAuBA,SACC,4BAAC,kBAAD;AACC,IAAA,GAAG,EAAGN,GADP;AAEC,IAAA,oBAAoB,MAFrB;AAGC,IAAA,mBAAmB,EAAG,KAHvB;AAIC,IAAA,IAAI,EAAGC,IAJR;AAKC,wBAAmBA,IAAI,KAAK,cAAT,GAA0B,IAA1B,GAAiCC,WALrD;AAMC,IAAA,aAAa,EAAGE;AANjB,KAOMD,IAPN,EADD;AAWA;;eAEc,yBAAYJ,aAAZ,C","sourcesContent":["/**\n * External Dependencies\n */\nimport { includes } from 'lodash';\n\n/**\n * WordPress Dependencies\n */\nimport { forwardRef } from '@wordpress/element';\nimport { UP, DOWN, LEFT, RIGHT } from '@wordpress/keycodes';\n\n/**\n * Internal dependencies\n */\nimport NavigableContainer from './container';\n\nexport function NavigableMenu( {\n\trole = 'menu',\n\torientation = 'vertical',\n\t...rest\n}, ref ) {\n\tconst eventToOffset = ( evt ) => {\n\t\tconst { keyCode } = evt;\n\n\t\tlet next = [ DOWN ];\n\t\tlet previous = [ UP ];\n\n\t\tif ( orientation === 'horizontal' ) {\n\t\t\tnext = [ RIGHT ];\n\t\t\tprevious = [ LEFT ];\n\t\t}\n\n\t\tif ( orientation === 'both' ) {\n\t\t\tnext = [ RIGHT, DOWN ];\n\t\t\tprevious = [ LEFT, UP ];\n\t\t}\n\n\t\tif ( includes( next, keyCode ) ) {\n\t\t\treturn 1;\n\t\t} else if ( includes( previous, keyCode ) ) {\n\t\t\treturn -1;\n\t\t}\n\t};\n\n\treturn (\n\t\t<NavigableContainer\n\t\t\tref={ ref }\n\t\t\tstopNavigationEvents\n\t\t\tonlyBrowserTabstops={ false }\n\t\t\trole={ role }\n\t\t\taria-orientation={ role === 'presentation' ? null : orientation }\n\t\t\teventToOffset={ eventToOffset }\n\t\t\t{ ...rest }\n\t\t/>\n\t);\n}\n\nexport default forwardRef( NavigableMenu );\n"]}
1
+ {"version":3,"sources":["/Users/jdesrosiers/Sites/git-wordpress-develop/src/wp-content/plugins/gutenberg/packages/components/src/navigable-container/menu.js"],"names":["NavigableMenu","ref","role","orientation","rest","eventToOffset","evt","keyCode","next","DOWN","previous","UP","RIGHT","LEFT"],"mappings":";;;;;;;;;;AAQA;;;;;;AALA;;AAMA;;AAKA;;AAdA;;;;AAKA;;;;AAMA;;;AAKO,SAASA,aAAT,OAIJC,GAJI,EAIE;AAAA,uBAHRC,IAGQ;AAAA,MAHRA,IAGQ,0BAHD,MAGC;AAAA,8BAFRC,WAEQ;AAAA,MAFRA,WAEQ,iCAFM,UAEN;AAAA,MADLC,IACK;;AACR,MAAMC,aAAa,GAAG,SAAhBA,aAAgB,CAAEC,GAAF,EAAW;AAAA,QACxBC,OADwB,GACZD,GADY,CACxBC,OADwB;AAGhC,QAAIC,IAAI,GAAG,CAAEC,cAAF,CAAX;AACA,QAAIC,QAAQ,GAAG,CAAEC,YAAF,CAAf;;AAEA,QAAKR,WAAW,KAAK,YAArB,EAAoC;AACnCK,MAAAA,IAAI,GAAG,CAAEI,eAAF,CAAP;AACAF,MAAAA,QAAQ,GAAG,CAAEG,cAAF,CAAX;AACA;;AAED,QAAKV,WAAW,KAAK,MAArB,EAA8B;AAC7BK,MAAAA,IAAI,GAAG,CAAEI,eAAF,EAASH,cAAT,CAAP;AACAC,MAAAA,QAAQ,GAAG,CAAEG,cAAF,EAAQF,YAAR,CAAX;AACA;;AAED,QAAK,sBAAUH,IAAV,EAAgBD,OAAhB,CAAL,EAAiC;AAChC,aAAO,CAAP;AACA,KAFD,MAEO,IAAK,sBAAUG,QAAV,EAAoBH,OAApB,CAAL,EAAqC;AAC3C,aAAO,CAAC,CAAR;AACA;AACD,GArBD;;AAuBA,SACC,4BAAC,kBAAD;AACC,IAAA,GAAG,EAAGN,GADP;AAEC,IAAA,oBAAoB,MAFrB;AAGC,IAAA,mBAAmB,EAAG,KAHvB;AAIC,IAAA,IAAI,EAAGC,IAJR;AAKC,wBAAmBA,IAAI,KAAK,cAAT,GAA0B,IAA1B,GAAiCC,WALrD;AAMC,IAAA,aAAa,EAAGE;AANjB,KAOMD,IAPN,EADD;AAWA;;eAEc,yBAAYJ,aAAZ,C","sourcesContent":["/**\n * External Dependencies\n */\nimport { includes } from 'lodash';\n\n/**\n * WordPress Dependencies\n */\nimport { forwardRef } from '@wordpress/element';\nimport { UP, DOWN, LEFT, RIGHT } from '@wordpress/keycodes';\n\n/**\n * Internal dependencies\n */\nimport NavigableContainer from './container';\n\nexport function NavigableMenu( {\n\trole = 'menu',\n\torientation = 'vertical',\n\t...rest\n}, ref ) {\n\tconst eventToOffset = ( evt ) => {\n\t\tconst { keyCode } = evt;\n\n\t\tlet next = [ DOWN ];\n\t\tlet previous = [ UP ];\n\n\t\tif ( orientation === 'horizontal' ) {\n\t\t\tnext = [ RIGHT ];\n\t\t\tprevious = [ LEFT ];\n\t\t}\n\n\t\tif ( orientation === 'both' ) {\n\t\t\tnext = [ RIGHT, DOWN ];\n\t\t\tprevious = [ LEFT, UP ];\n\t\t}\n\n\t\tif ( includes( next, keyCode ) ) {\n\t\t\treturn 1;\n\t\t} else if ( includes( previous, keyCode ) ) {\n\t\t\treturn -1;\n\t\t}\n\t};\n\n\treturn (\n\t\t<NavigableContainer\n\t\t\tref={ ref }\n\t\t\tstopNavigationEvents\n\t\t\tonlyBrowserTabstops={ false }\n\t\t\trole={ role }\n\t\t\taria-orientation={ role === 'presentation' ? null : orientation }\n\t\t\teventToOffset={ eventToOffset }\n\t\t\t{ ...rest }\n\t\t/>\n\t);\n}\n\nexport default forwardRef( NavigableMenu );\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/jdesrosiers/Sites/gutenberg-security/5.1/packages/components/src/navigable-container/tabbable.js"],"names":["TabbableContainer","ref","eventToOffset","props","innerEventToOffset","evt","keyCode","shiftKey","TAB"],"mappings":";;;;;;;;;;AAGA;;;;;;AACA;;AAKA;;AATA;;;;AAMA;;;AAKO,SAASA,iBAAT,OAAyDC,GAAzD,EAA+D;AAAA,MAAjCC,aAAiC,QAAjCA,aAAiC;AAAA,MAAfC,KAAe;;AACrE,MAAMC,kBAAkB,GAAG,SAArBA,kBAAqB,CAAEC,GAAF,EAAW;AAAA,QAC7BC,OAD6B,GACPD,GADO,CAC7BC,OAD6B;AAAA,QACpBC,QADoB,GACPF,GADO,CACpBE,QADoB;;AAErC,QAAKC,kBAAQF,OAAb,EAAuB;AACtB,aAAOC,QAAQ,GAAG,CAAC,CAAJ,GAAQ,CAAvB;AACA,KAJoC,CAMrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,QAAKL,aAAL,EAAqB;AACpB,aAAOA,aAAa,CAAEG,GAAF,CAApB;AACA;AACD,GApBD;;AAsBA,SACC,4BAAC,kBAAD;AACC,IAAA,GAAG,EAAGJ,GADP;AAEC,IAAA,oBAAoB,MAFrB;AAGC,IAAA,mBAAmB,MAHpB;AAIC,IAAA,aAAa,EAAGG;AAJjB,KAKMD,KALN,EADD;AASA;;eAEc,yBAAYH,iBAAZ,C","sourcesContent":["/**\n * WordPress Dependencies\n */\nimport { forwardRef } from '@wordpress/element';\nimport { TAB } from '@wordpress/keycodes';\n\n/**\n * Internal dependencies\n */\nimport NavigableContainer from './container';\n\nexport function TabbableContainer( { eventToOffset, ...props }, ref ) {\n\tconst innerEventToOffset = ( evt ) => {\n\t\tconst { keyCode, shiftKey } = evt;\n\t\tif ( TAB === keyCode ) {\n\t\t\treturn shiftKey ? -1 : 1;\n\t\t}\n\n\t\t// Allow custom handling of keys besides Tab.\n\t\t//\n\t\t// By default, TabbableContainer will move focus forward on Tab and\n\t\t// backward on Shift+Tab. The handler below will be used for all other\n\t\t// events. The semantics for `eventToOffset`'s return\n\t\t// values are the following:\n\t\t//\n\t\t// - +1: move focus forward\n\t\t// - -1: move focus backward\n\t\t// - 0: don't move focus, but acknowledge event and thus stop it\n\t\t// - undefined: do nothing, let the event propagate\n\t\tif ( eventToOffset ) {\n\t\t\treturn eventToOffset( evt );\n\t\t}\n\t};\n\n\treturn (\n\t\t<NavigableContainer\n\t\t\tref={ ref }\n\t\t\tstopNavigationEvents\n\t\t\tonlyBrowserTabstops\n\t\t\teventToOffset={ innerEventToOffset }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n\nexport default forwardRef( TabbableContainer );\n"]}
1
+ {"version":3,"sources":["/Users/jdesrosiers/Sites/git-wordpress-develop/src/wp-content/plugins/gutenberg/packages/components/src/navigable-container/tabbable.js"],"names":["TabbableContainer","ref","eventToOffset","props","innerEventToOffset","evt","keyCode","shiftKey","TAB"],"mappings":";;;;;;;;;;AAGA;;;;;;AACA;;AAKA;;AATA;;;;AAMA;;;AAKO,SAASA,iBAAT,OAAyDC,GAAzD,EAA+D;AAAA,MAAjCC,aAAiC,QAAjCA,aAAiC;AAAA,MAAfC,KAAe;;AACrE,MAAMC,kBAAkB,GAAG,SAArBA,kBAAqB,CAAEC,GAAF,EAAW;AAAA,QAC7BC,OAD6B,GACPD,GADO,CAC7BC,OAD6B;AAAA,QACpBC,QADoB,GACPF,GADO,CACpBE,QADoB;;AAErC,QAAKC,kBAAQF,OAAb,EAAuB;AACtB,aAAOC,QAAQ,GAAG,CAAC,CAAJ,GAAQ,CAAvB;AACA,KAJoC,CAMrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,QAAKL,aAAL,EAAqB;AACpB,aAAOA,aAAa,CAAEG,GAAF,CAApB;AACA;AACD,GApBD;;AAsBA,SACC,4BAAC,kBAAD;AACC,IAAA,GAAG,EAAGJ,GADP;AAEC,IAAA,oBAAoB,MAFrB;AAGC,IAAA,mBAAmB,MAHpB;AAIC,IAAA,aAAa,EAAGG;AAJjB,KAKMD,KALN,EADD;AASA;;eAEc,yBAAYH,iBAAZ,C","sourcesContent":["/**\n * WordPress Dependencies\n */\nimport { forwardRef } from '@wordpress/element';\nimport { TAB } from '@wordpress/keycodes';\n\n/**\n * Internal dependencies\n */\nimport NavigableContainer from './container';\n\nexport function TabbableContainer( { eventToOffset, ...props }, ref ) {\n\tconst innerEventToOffset = ( evt ) => {\n\t\tconst { keyCode, shiftKey } = evt;\n\t\tif ( TAB === keyCode ) {\n\t\t\treturn shiftKey ? -1 : 1;\n\t\t}\n\n\t\t// Allow custom handling of keys besides Tab.\n\t\t//\n\t\t// By default, TabbableContainer will move focus forward on Tab and\n\t\t// backward on Shift+Tab. The handler below will be used for all other\n\t\t// events. The semantics for `eventToOffset`'s return\n\t\t// values are the following:\n\t\t//\n\t\t// - +1: move focus forward\n\t\t// - -1: move focus backward\n\t\t// - 0: don't move focus, but acknowledge event and thus stop it\n\t\t// - undefined: do nothing, let the event propagate\n\t\tif ( eventToOffset ) {\n\t\t\treturn eventToOffset( evt );\n\t\t}\n\t};\n\n\treturn (\n\t\t<NavigableContainer\n\t\t\tref={ ref }\n\t\t\tstopNavigationEvents\n\t\t\tonlyBrowserTabstops\n\t\t\teventToOffset={ innerEventToOffset }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n\nexport default forwardRef( TabbableContainer );\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/jdesrosiers/Sites/gutenberg-security/5.1/packages/components/src/notice/index.js"],"names":["Notice","className","status","children","onRemove","noop","isDismissible","actions","__unstableHTML","classes","map","index","label","url","onClick"],"mappings":";;;;;;;;;AAUA;;AAPA;;AACA;;AAKA;;AAMA;;AAfA;;;;AAMA;;;;AAMA;;;AAKA,SAASA,MAAT,OAQI;AAAA,MAPHC,SAOG,QAPHA,SAOG;AAAA,MANHC,MAMG,QANHA,MAMG;AAAA,MALHC,QAKG,QALHA,QAKG;AAAA,2BAJHC,QAIG;AAAA,MAJHA,QAIG,8BAJQC,YAIR;AAAA,gCAHHC,aAGG;AAAA,MAHHA,aAGG,mCAHa,IAGb;AAAA,0BAFHC,OAEG;AAAA,MAFHA,OAEG,6BAFO,EAEP;AAAA,MADHC,cACG,QADHA,cACG;AACH,MAAMC,OAAO,GAAG,yBAAYR,SAAZ,EAAuB,mBAAvB,EAA4C,QAAQC,MAApD,EAA4D;AAC3E,sBAAkBI;AADyD,GAA5D,CAAhB;;AAIA,MAAKE,cAAL,EAAsB;AACrBL,IAAAA,QAAQ,GAAG,4BAAC,gBAAD,QAAWA,QAAX,CAAX;AACA;;AAED,SACC;AAAK,IAAA,SAAS,EAAGM;AAAjB,KACC;AAAK,IAAA,SAAS,EAAC;AAAf,KACGN,QADH,EAEGI,OAAO,CAACG,GAAR,CAAa,iBAA2BC,KAA3B;AAAA,QAAIC,KAAJ,SAAIA,KAAJ;AAAA,QAAWC,GAAX,SAAWA,GAAX;AAAA,QAAgBC,OAAhB,SAAgBA,OAAhB;AAAA,WACd,4BAAC,QAAD;AACC,MAAA,GAAG,EAAGH,KADP;AAEC,MAAA,IAAI,EAAGE,GAFR;AAGC,MAAA,MAAM,EAAG,CAAC,CAAEA,GAHb;AAIC,MAAA,OAAO,EAAGC,OAJX;AAKC,MAAA,SAAS,EAAC;AALX,OAOGF,KAPH,CADc;AAAA,GAAb,CAFH,CADD,EAeGN,aAAa,IACd,4BAAC,YAAD;AACC,IAAA,SAAS,EAAC,4BADX;AAEC,IAAA,IAAI,EAAC,IAFN;AAGC,IAAA,KAAK,EAAG,cAAI,qBAAJ,CAHT;AAIC,IAAA,OAAO,EAAGF,QAJX;AAKC,IAAA,OAAO,EAAG;AALX,IAhBF,CADD;AA2BA;;eAEcJ,M","sourcesContent":["/**\n * External dependencies\n */\nimport { noop } from 'lodash';\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { RawHTML } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { Button, IconButton } from '../';\n\nfunction Notice( {\n\tclassName,\n\tstatus,\n\tchildren,\n\tonRemove = noop,\n\tisDismissible = true,\n\tactions = [],\n\t__unstableHTML,\n} ) {\n\tconst classes = classnames( className, 'components-notice', 'is-' + status, {\n\t\t'is-dismissible': isDismissible,\n\t} );\n\n\tif ( __unstableHTML ) {\n\t\tchildren = <RawHTML>{ children }</RawHTML>;\n\t}\n\n\treturn (\n\t\t<div className={ classes }>\n\t\t\t<div className=\"components-notice__content\">\n\t\t\t\t{ children }\n\t\t\t\t{ actions.map( ( { label, url, onClick }, index ) => (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\thref={ url }\n\t\t\t\t\t\tisLink={ !! url }\n\t\t\t\t\t\tonClick={ onClick }\n\t\t\t\t\t\tclassName=\"components-notice__action\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{ label }\n\t\t\t\t\t</Button>\n\t\t\t\t) ) }\n\t\t\t</div>\n\t\t\t{ isDismissible && (\n\t\t\t\t<IconButton\n\t\t\t\t\tclassName=\"components-notice__dismiss\"\n\t\t\t\t\ticon=\"no\"\n\t\t\t\t\tlabel={ __( 'Dismiss this notice' ) }\n\t\t\t\t\tonClick={ onRemove }\n\t\t\t\t\ttooltip={ false }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</div>\n\t);\n}\n\nexport default Notice;\n"]}
1
+ {"version":3,"sources":["/Users/jdesrosiers/Sites/git-wordpress-develop/src/wp-content/plugins/gutenberg/packages/components/src/notice/index.js"],"names":["Notice","className","status","children","onRemove","noop","isDismissible","actions","__unstableHTML","classes","map","index","label","url","onClick"],"mappings":";;;;;;;;;AAUA;;AAPA;;AACA;;AAKA;;AAMA;;AAfA;;;;AAMA;;;;AAMA;;;AAKA,SAASA,MAAT,OAQI;AAAA,MAPHC,SAOG,QAPHA,SAOG;AAAA,MANHC,MAMG,QANHA,MAMG;AAAA,MALHC,QAKG,QALHA,QAKG;AAAA,2BAJHC,QAIG;AAAA,MAJHA,QAIG,8BAJQC,YAIR;AAAA,gCAHHC,aAGG;AAAA,MAHHA,aAGG,mCAHa,IAGb;AAAA,0BAFHC,OAEG;AAAA,MAFHA,OAEG,6BAFO,EAEP;AAAA,MADHC,cACG,QADHA,cACG;AACH,MAAMC,OAAO,GAAG,yBAAYR,SAAZ,EAAuB,mBAAvB,EAA4C,QAAQC,MAApD,EAA4D;AAC3E,sBAAkBI;AADyD,GAA5D,CAAhB;;AAIA,MAAKE,cAAL,EAAsB;AACrBL,IAAAA,QAAQ,GAAG,4BAAC,gBAAD,QAAWA,QAAX,CAAX;AACA;;AAED,SACC;AAAK,IAAA,SAAS,EAAGM;AAAjB,KACC;AAAK,IAAA,SAAS,EAAC;AAAf,KACGN,QADH,EAEGI,OAAO,CAACG,GAAR,CAAa,iBAA2BC,KAA3B;AAAA,QAAIC,KAAJ,SAAIA,KAAJ;AAAA,QAAWC,GAAX,SAAWA,GAAX;AAAA,QAAgBC,OAAhB,SAAgBA,OAAhB;AAAA,WACd,4BAAC,QAAD;AACC,MAAA,GAAG,EAAGH,KADP;AAEC,MAAA,IAAI,EAAGE,GAFR;AAGC,MAAA,MAAM,EAAG,CAAC,CAAEA,GAHb;AAIC,MAAA,OAAO,EAAGC,OAJX;AAKC,MAAA,SAAS,EAAC;AALX,OAOGF,KAPH,CADc;AAAA,GAAb,CAFH,CADD,EAeGN,aAAa,IACd,4BAAC,YAAD;AACC,IAAA,SAAS,EAAC,4BADX;AAEC,IAAA,IAAI,EAAC,IAFN;AAGC,IAAA,KAAK,EAAG,cAAI,qBAAJ,CAHT;AAIC,IAAA,OAAO,EAAGF,QAJX;AAKC,IAAA,OAAO,EAAG;AALX,IAhBF,CADD;AA2BA;;eAEcJ,M","sourcesContent":["/**\n * External dependencies\n */\nimport { noop } from 'lodash';\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { RawHTML } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { Button, IconButton } from '../';\n\nfunction Notice( {\n\tclassName,\n\tstatus,\n\tchildren,\n\tonRemove = noop,\n\tisDismissible = true,\n\tactions = [],\n\t__unstableHTML,\n} ) {\n\tconst classes = classnames( className, 'components-notice', 'is-' + status, {\n\t\t'is-dismissible': isDismissible,\n\t} );\n\n\tif ( __unstableHTML ) {\n\t\tchildren = <RawHTML>{ children }</RawHTML>;\n\t}\n\n\treturn (\n\t\t<div className={ classes }>\n\t\t\t<div className=\"components-notice__content\">\n\t\t\t\t{ children }\n\t\t\t\t{ actions.map( ( { label, url, onClick }, index ) => (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\thref={ url }\n\t\t\t\t\t\tisLink={ !! url }\n\t\t\t\t\t\tonClick={ onClick }\n\t\t\t\t\t\tclassName=\"components-notice__action\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{ label }\n\t\t\t\t\t</Button>\n\t\t\t\t) ) }\n\t\t\t</div>\n\t\t\t{ isDismissible && (\n\t\t\t\t<IconButton\n\t\t\t\t\tclassName=\"components-notice__dismiss\"\n\t\t\t\t\ticon=\"no\"\n\t\t\t\t\tlabel={ __( 'Dismiss this notice' ) }\n\t\t\t\t\tonClick={ onRemove }\n\t\t\t\t\ttooltip={ false }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</div>\n\t);\n}\n\nexport default Notice;\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/jdesrosiers/Sites/gutenberg-security/5.1/packages/components/src/notice/list.js"],"names":["NoticeList","notices","onRemove","noop","className","children","removeNotice","id","reverse","map","notice","content"],"mappings":";;;;;;;;;;;;;;;AAGA;;AAKA;;AARA;;;;AAKA;;;;AAKA;;;;;;;;;;AAUA,SAASA,UAAT,OAAoG;AAAA,MAA7EC,OAA6E,QAA7EA,OAA6E;AAAA,2BAApEC,QAAoE;AAAA,MAApEA,QAAoE,8BAAzDC,YAAyD;AAAA,4BAAnDC,SAAmD;AAAA,MAAnDA,SAAmD,+BAAvC,wBAAuC;AAAA,MAAbC,QAAa,QAAbA,QAAa;;AACnG,MAAMC,YAAY,GAAG,SAAfA,YAAe,CAAEC,EAAF;AAAA,WAAU;AAAA,aAAML,QAAQ,CAAEK,EAAF,CAAd;AAAA,KAAV;AAAA,GAArB;;AAEA,SACC;AAAK,IAAA,SAAS,EAAGH;AAAjB,KACGC,QADH,EAEG,iCAAKJ,OAAL,EAAeO,OAAf,GAAyBC,GAAzB,CAA8B,UAAEC,MAAF;AAAA,WAC/B,4BAAC,SAAD,6BACM,kBAAMA,MAAN,EAAc,CAAE,SAAF,CAAd,CADN;AAEC,MAAA,GAAG,EAAGA,MAAM,CAACH,EAFd;AAGC,MAAA,QAAQ,EAAGD,YAAY,CAAEI,MAAM,CAACH,EAAT;AAHxB,QAKGG,MAAM,CAACC,OALV,CAD+B;AAAA,GAA9B,CAFH,CADD;AAcA;;eAEcX,U","sourcesContent":["/**\n * External dependencies\n */\nimport { noop, omit } from 'lodash';\n\n/**\n * Internal dependencies\n */\nimport Notice from './';\n\n/**\n* Renders a list of notices.\n*\n* @param {Object} $0 Props passed to the component.\n* @param {Array} $0.notices Array of notices to render.\n* @param {Function} $0.onRemove Function called when a notice should be removed / dismissed.\n* @param {Object} $0.className Name of the class used by the component.\n* @param {Object} $0.children Array of children to be rendered inside the notice list.\n* @return {Object} The rendered notices list.\n*/\nfunction NoticeList( { notices, onRemove = noop, className = 'components-notice-list', children } ) {\n\tconst removeNotice = ( id ) => () => onRemove( id );\n\n\treturn (\n\t\t<div className={ className }>\n\t\t\t{ children }\n\t\t\t{ [ ...notices ].reverse().map( ( notice ) => (\n\t\t\t\t<Notice\n\t\t\t\t\t{ ...omit( notice, [ 'content' ] ) }\n\t\t\t\t\tkey={ notice.id }\n\t\t\t\t\tonRemove={ removeNotice( notice.id ) }\n\t\t\t\t>\n\t\t\t\t\t{ notice.content }\n\t\t\t\t</Notice>\n\t\t\t) ) }\n\t\t</div>\n\t);\n}\n\nexport default NoticeList;\n"]}
1
+ {"version":3,"sources":["/Users/jdesrosiers/Sites/git-wordpress-develop/src/wp-content/plugins/gutenberg/packages/components/src/notice/list.js"],"names":["NoticeList","notices","onRemove","noop","className","children","removeNotice","id","reverse","map","notice","content"],"mappings":";;;;;;;;;;;;;;;AAGA;;AAKA;;AARA;;;;AAKA;;;;AAKA;;;;;;;;;;AAUA,SAASA,UAAT,OAAoG;AAAA,MAA7EC,OAA6E,QAA7EA,OAA6E;AAAA,2BAApEC,QAAoE;AAAA,MAApEA,QAAoE,8BAAzDC,YAAyD;AAAA,4BAAnDC,SAAmD;AAAA,MAAnDA,SAAmD,+BAAvC,wBAAuC;AAAA,MAAbC,QAAa,QAAbA,QAAa;;AACnG,MAAMC,YAAY,GAAG,SAAfA,YAAe,CAAEC,EAAF;AAAA,WAAU;AAAA,aAAML,QAAQ,CAAEK,EAAF,CAAd;AAAA,KAAV;AAAA,GAArB;;AAEA,SACC;AAAK,IAAA,SAAS,EAAGH;AAAjB,KACGC,QADH,EAEG,iCAAKJ,OAAL,EAAeO,OAAf,GAAyBC,GAAzB,CAA8B,UAAEC,MAAF;AAAA,WAC/B,4BAAC,SAAD,6BACM,kBAAMA,MAAN,EAAc,CAAE,SAAF,CAAd,CADN;AAEC,MAAA,GAAG,EAAGA,MAAM,CAACH,EAFd;AAGC,MAAA,QAAQ,EAAGD,YAAY,CAAEI,MAAM,CAACH,EAAT;AAHxB,QAKGG,MAAM,CAACC,OALV,CAD+B;AAAA,GAA9B,CAFH,CADD;AAcA;;eAEcX,U","sourcesContent":["/**\n * External dependencies\n */\nimport { noop, omit } from 'lodash';\n\n/**\n * Internal dependencies\n */\nimport Notice from './';\n\n/**\n* Renders a list of notices.\n*\n* @param {Object} $0 Props passed to the component.\n* @param {Array} $0.notices Array of notices to render.\n* @param {Function} $0.onRemove Function called when a notice should be removed / dismissed.\n* @param {Object} $0.className Name of the class used by the component.\n* @param {Object} $0.children Array of children to be rendered inside the notice list.\n* @return {Object} The rendered notices list.\n*/\nfunction NoticeList( { notices, onRemove = noop, className = 'components-notice-list', children } ) {\n\tconst removeNotice = ( id ) => () => onRemove( id );\n\n\treturn (\n\t\t<div className={ className }>\n\t\t\t{ children }\n\t\t\t{ [ ...notices ].reverse().map( ( notice ) => (\n\t\t\t\t<Notice\n\t\t\t\t\t{ ...omit( notice, [ 'content' ] ) }\n\t\t\t\t\tkey={ notice.id }\n\t\t\t\t\tonRemove={ removeNotice( notice.id ) }\n\t\t\t\t>\n\t\t\t\t\t{ notice.content }\n\t\t\t\t</Notice>\n\t\t\t) ) }\n\t\t</div>\n\t);\n}\n\nexport default NoticeList;\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/jdesrosiers/Sites/gutenberg-security/5.1/packages/components/src/panel/body.js"],"names":["PanelBody","props","arguments","state","opened","initialOpen","undefined","toggle","bind","event","preventDefault","setState","onToggle","title","children","className","icon","forwardedRef","isOpened","classes","Component","forwardedPanelBody","ref","displayName"],"mappings":";;;;;;;;;AAQA;;;;;;;;;;;;;;;;AALA;;AAUA;;AACA;;AACA;;AAfA;;;;AAKA;;;;AAKA;;;IAOaA,S;;;;;AACZ,qBAAaC,KAAb,EAAqB;AAAA;;AAAA;AACpB,gHAAUC,SAAV;AACA,UAAKC,KAAL,GAAa;AACZC,MAAAA,MAAM,EAAEH,KAAK,CAACI,WAAN,KAAsBC,SAAtB,GAAkC,IAAlC,GAAyCL,KAAK,CAACI;AAD3C,KAAb;AAGA,UAAKE,MAAL,GAAc,MAAKA,MAAL,CAA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K,EAAC;AAA9F,SACC,4BAAC,aAAD,QAAG,4BAAC,gBAAD;AAAM,QAAA,IAAI,EAAC,MAAX;AAAkB,QAAA,CAAC,EAAC;AAApB,QAAH,CADD,EAEC,4BAAC,aAAD,QAAG,4BAAC,gBAAD;AAAM,QAAA,CAAC,EAAC;AAAR,QAAH,CAFD,CADS,GAKT,4BAAC,eAAD;AAAK,QAAA,SAAS,EAAC,yBAAf;AAAyC,QAAA,KAAK,EAAC,MAA/C;AAAsD,QAAA,MAAM,EAAC,MAA7D;AAAoE,QAAA,OAAO,EAAC,WAA5E;AAAwF,QAAA,KAAK,EAAC;AAA9F,SACC,4BAAC,aAAD,QAAG,4BAAC,gBAAD;AAAM,QAAA,IAAI,EAAC,MAAX;AAAkB,QAAA,CAAC,EAAC;AAApB,QAAH,CADD,EAEC,4BAAC,aAAD,QAAG,4BAAC,gBAAD;AAAM,QAAA,CAAC,EAAC;AAAR,QAAH,CAFD,CANF,CATD,EAqBGL,KArBH,EAsBGG,IAAI,IAAI,4BAAC,aAAD;AAAM,QAAA,IAAI,EAAGA,IAAb;AAAoB,QAAA,SAAS,EAAC,wBAA9B;AAAuD,QAAA,IAAI,EAAG;AAA9D,QAtBX,CADD,CAFF,EA6BGE,QAAQ,IAAIJ,QA7Bf,CADD;AAiCA;;;EA5D6BM,kB;;;;AA+D/B,IAAMC,kBAAkB,GAAG,SAArBA,kBAAqB,CAAEpB,KAAF,EAASqB,GAAT,EAAkB;AAC5C,SAAO,4BAAC,SAAD,6BAAgBrB,KAAhB;AAAwB,IAAA,YAAY,EAAGqB;AAAvC,KAAP;AACA,CAFD;;AAGAD,kBAAkB,CAACE,WAAnB,GAAiC,WAAjC;;eAEe,yBAAYF,kBAAZ,C","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { Component, forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport Icon from '../icon';\nimport { G, Path, SVG } from '../primitives';\n\nexport class PanelBody extends Component {\n\tconstructor( props ) {\n\t\tsuper( ...arguments );\n\t\tthis.state = {\n\t\t\topened: props.initialOpen === undefined ? true : props.initialOpen,\n\t\t};\n\t\tthis.toggle = this.toggle.bind( this );\n\t}\n\n\ttoggle( event ) {\n\t\tevent.preventDefault();\n\t\tif ( this.props.opened === undefined ) {\n\t\t\tthis.setState( ( state ) => ( {\n\t\t\t\topened: ! state.opened,\n\t\t\t} ) );\n\t\t}\n\n\t\tif ( this.props.onToggle ) {\n\t\t\tthis.props.onToggle();\n\t\t}\n\t}\n\n\trender() {\n\t\tconst { title, children, opened, className, icon, forwardedRef } = this.props;\n\t\tconst isOpened = opened === undefined ? this.state.opened : opened;\n\t\tconst classes = classnames( 'components-panel__body', className, { 'is-opened': isOpened } );\n\n\t\treturn (\n\t\t\t<div className={ classes } ref={ forwardedRef }>\n\t\t\t\t{ !! title && (\n\t\t\t\t\t<h2 className=\"components-panel__body-title\">\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tclassName=\"components-panel__body-toggle\"\n\t\t\t\t\t\t\tonClick={ this.toggle }\n\t\t\t\t\t\t\taria-expanded={ isOpened }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ /*\n\t\t\t\t\t\t\t\tFirefox + NVDA don't announce aria-expanded because the browser\n\t\t\t\t\t\t\t\trepaints the whole element, so this wrapping span hides that.\n\t\t\t\t\t\t\t*/ }\n\t\t\t\t\t\t\t<span aria-hidden=\"true\">\n\t\t\t\t\t\t\t\t{ isOpened ?\n\t\t\t\t\t\t\t\t\t<SVG className=\"components-panel__arrow\" width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t\t\t\t\t\t\t\t\t<G><Path fill=\"none\" d=\"M0,0h24v24H0V0z\" /></G>\n\t\t\t\t\t\t\t\t\t\t<G><Path d=\"M12,8l-6,6l1.41,1.41L12,10.83l4.59,4.58L18,14L12,8z\" /></G>\n\t\t\t\t\t\t\t\t\t</SVG> :\n\t\t\t\t\t\t\t\t\t<SVG className=\"components-panel__arrow\" width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t\t\t\t\t\t\t\t\t<G><Path fill=\"none\" d=\"M0,0h24v24H0V0z\" /></G>\n\t\t\t\t\t\t\t\t\t\t<G><Path d=\"M7.41,8.59L12,13.17l4.59-4.58L18,10l-6,6l-6-6L7.41,8.59z\" /></G>\n\t\t\t\t\t\t\t\t\t</SVG>\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t{ title }\n\t\t\t\t\t\t\t{ icon && <Icon icon={ icon } className=\"components-panel__icon\" size={ 20 } /> }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</h2>\n\t\t\t\t) }\n\t\t\t\t{ isOpened && children }\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nconst forwardedPanelBody = ( props, ref ) => {\n\treturn <PanelBody { ...props } forwardedRef={ ref } />;\n};\nforwardedPanelBody.displayName = 'PanelBody';\n\nexport default forwardRef( forwardedPanelBody );\n"]}
1
+ {"version":3,"sources":["/Users/jdesrosiers/Sites/git-wordpress-develop/src/wp-content/plugins/gutenberg/packages/components/src/panel/body.js"],"names":["PanelBody","props","arguments","state","opened","initialOpen","undefined","toggle","bind","event","preventDefault","setState","onToggle","title","children","className","icon","forwardedRef","isOpened","classes","Component","forwardedPanelBody","ref","displayName"],"mappings":";;;;;;;;;AAQA;;;;;;;;;;;;;;;;AALA;;AAUA;;AACA;;AACA;;AAfA;;;;AAKA;;;;AAKA;;;IAOaA,S;;;;;AACZ,qBAAaC,KAAb,EAAqB;AAAA;;AAAA;AACpB,gHAAUC,SAAV;AACA,UAAKC,KAAL,GAAa;AACZC,MAAAA,MAAM,EAAEH,KAAK,CAACI,WAAN,KAAsBC,SAAtB,GAAkC,IAAlC,GAAyCL,KAAK,CAACI;AAD3C,KAAb;AA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AA,OAAO,EAAC,WAA5E;AAAwF,QAAA,KAAK,EAAC;AAA9F,SACC,4BAAC,aAAD,QAAG,4BAAC,gBAAD;AAAM,QAAA,IAAI,EAAC,MAAX;AAAkB,QAAA,CAAC,EAAC;AAApB,QAAH,CADD,EAEC,4BAAC,aAAD,QAAG,4BAAC,gBAAD;AAAM,QAAA,CAAC,EAAC;AAAR,QAAH,CAFD,CADS,GAKT,4BAAC,eAAD;AAAK,QAAA,SAAS,EAAC,yBAAf;AAAyC,QAAA,KAAK,EAAC,MAA/C;AAAsD,QAAA,MAAM,EAAC,MAA7D;AAAoE,QAAA,OAAO,EAAC,WAA5E;AAAwF,QAAA,KAAK,EAAC;AAA9F,SACC,4BAAC,aAAD,QAAG,4BAAC,gBAAD;AAAM,QAAA,IAAI,EAAC,MAAX;AAAkB,QAAA,CAAC,EAAC;AAApB,QAAH,CADD,EAEC,4BAAC,aAAD,QAAG,4BAAC,gBAAD;AAAM,QAAA,CAAC,EAAC;AAAR,QAAH,CAFD,CANF,CATD,EAqBGL,KArBH,EAsBGG,IAAI,IAAI,4BAAC,aAAD;AAAM,QAAA,IAAI,EAAGA,IAAb;AAAoB,QAAA,SAAS,EAAC,wBAA9B;AAAuD,QAAA,IAAI,EAAG;AAA9D,QAtBX,CADD,CAFF,EA6BGE,QAAQ,IAAIJ,QA7Bf,CADD;AAiCA;;;EA5D6BM,kB;;;;AA+D/B,IAAMC,kBAAkB,GAAG,SAArBA,kBAAqB,CAAEpB,KAAF,EAASqB,GAAT,EAAkB;AAC5C,SAAO,4BAAC,SAAD,6BAAgBrB,KAAhB;AAAwB,IAAA,YAAY,EAAGqB;AAAvC,KAAP;AACA,CAFD;;AAGAD,kBAAkB,CAACE,WAAnB,GAAiC,WAAjC;;eAEe,yBAAYF,kBAAZ,C","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { Component, forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport Icon from '../icon';\nimport { G, Path, SVG } from '../primitives';\n\nexport class PanelBody extends Component {\n\tconstructor( props ) {\n\t\tsuper( ...arguments );\n\t\tthis.state = {\n\t\t\topened: props.initialOpen === undefined ? true : props.initialOpen,\n\t\t};\n\t\tthis.toggle = this.toggle.bind( this );\n\t}\n\n\ttoggle( event ) {\n\t\tevent.preventDefault();\n\t\tif ( this.props.opened === undefined ) {\n\t\t\tthis.setState( ( state ) => ( {\n\t\t\t\topened: ! state.opened,\n\t\t\t} ) );\n\t\t}\n\n\t\tif ( this.props.onToggle ) {\n\t\t\tthis.props.onToggle();\n\t\t}\n\t}\n\n\trender() {\n\t\tconst { title, children, opened, className, icon, forwardedRef } = this.props;\n\t\tconst isOpened = opened === undefined ? this.state.opened : opened;\n\t\tconst classes = classnames( 'components-panel__body', className, { 'is-opened': isOpened } );\n\n\t\treturn (\n\t\t\t<div className={ classes } ref={ forwardedRef }>\n\t\t\t\t{ !! title && (\n\t\t\t\t\t<h2 className=\"components-panel__body-title\">\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tclassName=\"components-panel__body-toggle\"\n\t\t\t\t\t\t\tonClick={ this.toggle }\n\t\t\t\t\t\t\taria-expanded={ isOpened }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ /*\n\t\t\t\t\t\t\t\tFirefox + NVDA don't announce aria-expanded because the browser\n\t\t\t\t\t\t\t\trepaints the whole element, so this wrapping span hides that.\n\t\t\t\t\t\t\t*/ }\n\t\t\t\t\t\t\t<span aria-hidden=\"true\">\n\t\t\t\t\t\t\t\t{ isOpened ?\n\t\t\t\t\t\t\t\t\t<SVG className=\"components-panel__arrow\" width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t\t\t\t\t\t\t\t\t<G><Path fill=\"none\" d=\"M0,0h24v24H0V0z\" /></G>\n\t\t\t\t\t\t\t\t\t\t<G><Path d=\"M12,8l-6,6l1.41,1.41L12,10.83l4.59,4.58L18,14L12,8z\" /></G>\n\t\t\t\t\t\t\t\t\t</SVG> :\n\t\t\t\t\t\t\t\t\t<SVG className=\"components-panel__arrow\" width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t\t\t\t\t\t\t\t\t<G><Path fill=\"none\" d=\"M0,0h24v24H0V0z\" /></G>\n\t\t\t\t\t\t\t\t\t\t<G><Path d=\"M7.41,8.59L12,13.17l4.59-4.58L18,10l-6,6l-6-6L7.41,8.59z\" /></G>\n\t\t\t\t\t\t\t\t\t</SVG>\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t{ title }\n\t\t\t\t\t\t\t{ icon && <Icon icon={ icon } className=\"components-panel__icon\" size={ 20 } /> }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</h2>\n\t\t\t\t) }\n\t\t\t\t{ isOpened && children }\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nconst forwardedPanelBody = ( props, ref ) => {\n\treturn <PanelBody { ...props } forwardedRef={ ref } />;\n};\nforwardedPanelBody.displayName = 'PanelBody';\n\nexport default forwardRef( forwardedPanelBody );\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/jdesrosiers/Sites/gutenberg-security/5.1/packages/components/src/panel/header.js"],"names":["PanelHeader","label","children"],"mappings":";;;;;;;;;AAAA,SAASA,WAAT,OAA4C;AAAA,MAApBC,KAAoB,QAApBA,KAAoB;AAAA,MAAbC,QAAa,QAAbA,QAAa;AAC3C,SACC;AAAK,IAAA,SAAS,EAAC;AAAf,KACGD,KAAK,IAAI,wCAAMA,KAAN,CADZ,EAEGC,QAFH,CADD;AAMA;;eAEcF,W","sourcesContent":["function PanelHeader( { label, children } ) {\n\treturn (\n\t\t<div className=\"components-panel__header\">\n\t\t\t{ label && <h2>{ label }</h2> }\n\t\t\t{ children }\n\t\t</div>\n\t);\n}\n\nexport default PanelHeader;\n"]}
1
+ {"version":3,"sources":["/Users/jdesrosiers/Sites/git-wordpress-develop/src/wp-content/plugins/gutenberg/packages/components/src/panel/header.js"],"names":["PanelHeader","label","children"],"mappings":";;;;;;;;;AAAA,SAASA,WAAT,OAA4C;AAAA,MAApBC,KAAoB,QAApBA,KAAoB;AAAA,MAAbC,QAAa,QAAbA,QAAa;AAC3C,SACC;AAAK,IAAA,SAAS,EAAC;AAAf,KACGD,KAAK,IAAI,wCAAMA,KAAN,CADZ,EAEGC,QAFH,CADD;AAMA;;eAEcF,W","sourcesContent":["function PanelHeader( { label, children } ) {\n\treturn (\n\t\t<div className=\"components-panel__header\">\n\t\t\t{ label && <h2>{ label }</h2> }\n\t\t\t{ children }\n\t\t</div>\n\t);\n}\n\nexport default PanelHeader;\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/jdesrosiers/Sites/gutenberg-security/5.1/packages/components/src/panel/index.js"],"names":["Panel","header","className","children","classNames"],"mappings":";;;;;;;;;;;AAGA;;AAKA;;AARA;;;;AAKA;;;AAKA,SAASA,KAAT,OAAkD;AAAA,MAAhCC,MAAgC,QAAhCA,MAAgC;AAAA,MAAxBC,SAAwB,QAAxBA,SAAwB;AAAA,MAAbC,QAAa,QAAbA,QAAa;AACjD,MAAMC,UAAU,GAAG,yBAAYF,SAAZ,EAAuB,kBAAvB,CAAnB;AACA,SACC;AAAK,IAAA,SAAS,EAAGE;AAAjB,KACGH,MAAM,IAAI,4BAAC,eAAD;AAAa,IAAA,KAAK,EAAGA;AAArB,IADb,EAEGE,QAFH,CADD;AAMA;;eAEcH,K","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * Internal dependencies\n */\nimport PanelHeader from './header';\n\nfunction Panel( { header, className, children } ) {\n\tconst classNames = classnames( className, 'components-panel' );\n\treturn (\n\t\t<div className={ classNames }>\n\t\t\t{ header && <PanelHeader label={ header } /> }\n\t\t\t{ children }\n\t\t</div>\n\t);\n}\n\nexport default Panel;\n"]}
1
+ {"version":3,"sources":["/Users/jdesrosiers/Sites/git-wordpress-develop/src/wp-content/plugins/gutenberg/packages/components/src/panel/index.js"],"names":["Panel","header","className","children","classNames"],"mappings":";;;;;;;;;;;AAGA;;AAKA;;AARA;;;;AAKA;;;AAKA,SAASA,KAAT,OAAkD;AAAA,MAAhCC,MAAgC,QAAhCA,MAAgC;AAAA,MAAxBC,SAAwB,QAAxBA,SAAwB;AAAA,MAAbC,QAAa,QAAbA,QAAa;AACjD,MAAMC,UAAU,GAAG,yBAAYF,SAAZ,EAAuB,kBAAvB,CAAnB;AACA,SACC;AAAK,IAAA,SAAS,EAAGE;AAAjB,KACGH,MAAM,IAAI,4BAAC,eAAD;AAAa,IAAA,KAAK,EAAGA;AAArB,IADb,EAEGE,QAFH,CADD;AAMA;;eAEcH,K","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * Internal dependencies\n */\nimport PanelHeader from './header';\n\nfunction Panel( { header, className, children } ) {\n\tconst classNames = classnames( className, 'components-panel' );\n\treturn (\n\t\t<div className={ classNames }>\n\t\t\t{ header && <PanelHeader label={ header } /> }\n\t\t\t{ children }\n\t\t</div>\n\t);\n}\n\nexport default Panel;\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/jdesrosiers/Sites/gutenberg-security/5.1/packages/components/src/panel/row.js"],"names":["PanelRow","className","children","classes"],"mappings":";;;;;;;;;;;AAGA;;AAHA;;;AAKA,SAASA,QAAT,OAA6C;AAAA,MAAxBC,SAAwB,QAAxBA,SAAwB;AAAA,MAAbC,QAAa,QAAbA,QAAa;AAC5C,MAAMC,OAAO,GAAG,yBAAY,uBAAZ,EAAqCF,SAArC,CAAhB;AAEA,SACC;AAAK,IAAA,SAAS,EAAGE;AAAjB,KACGD,QADH,CADD;AAKA;;eAEcF,Q","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\nfunction PanelRow( { className, children } ) {\n\tconst classes = classnames( 'components-panel__row', className );\n\n\treturn (\n\t\t<div className={ classes }>\n\t\t\t{ children }\n\t\t</div>\n\t);\n}\n\nexport default PanelRow;\n"]}
1
+ {"version":3,"sources":["/Users/jdesrosiers/Sites/git-wordpress-develop/src/wp-content/plugins/gutenberg/packages/components/src/panel/row.js"],"names":["PanelRow","className","children","classes"],"mappings":";;;;;;;;;;;AAGA;;AAHA;;;AAKA,SAASA,QAAT,OAA6C;AAAA,MAAxBC,SAAwB,QAAxBA,SAAwB;AAAA,MAAbC,QAAa,QAAbA,QAAa;AAC5C,MAAMC,OAAO,GAAG,yBAAY,uBAAZ,EAAqCF,SAArC,CAAhB;AAEA,SACC;AAAK,IAAA,SAAS,EAAGE;AAAjB,KACGD,QADH,CADD;AAKA;;eAEcF,Q","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\nfunction PanelRow( { className, children } ) {\n\tconst classes = classnames( 'components-panel__row', className );\n\n\treturn (\n\t\t<div className={ classes }>\n\t\t\t{ children }\n\t\t</div>\n\t);\n}\n\nexport default PanelRow;\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/jdesrosiers/Sites/gutenberg-security/5.1/packages/components/src/placeholder/index.js"],"names":["Placeholder","icon","children","label","instructions","className","notices","additionalProps","classes"],"mappings":";;;;;;;;;;;;;;;AAGA;;AACA;;AAKA;;AATA;;;;AAMA;;;;AAKA;;;;;;AAMA,SAASA,WAAT,OAAwG;AAAA,MAAhFC,IAAgF,QAAhFA,IAAgF;AAAA,MAA1EC,QAA0E,QAA1EA,QAA0E;AAAA,MAAhEC,KAAgE,QAAhEA,KAAgE;AAAA,MAAzDC,YAAyD,QAAzDA,YAAyD;AAAA,MAA3CC,SAA2C,QAA3CA,SAA2C;AAAA,MAAhCC,OAAgC,QAAhCA,OAAgC;AAAA,MAApBC,eAAoB;AACvG,MAAMC,OAAO,GAAG,yBAAY,wBAAZ,EAAsCH,SAAtC,CAAhB;AAEA,SACC,8DAAUE,eAAV;AAA4B,IAAA,SAAS,EAAGC;AAAxC,MACGF,OADH,EAEC;AAAK,IAAA,SAAS,EAAC;AAAf,KACG,sBAAUL,IAAV,IAAmB,4BAAC,iBAAD;AAAU,IAAA,IAAI,EAAGA;AAAjB,IAAnB,GAAgDA,IADnD,EAEGE,KAFH,CAFD,EAMG,CAAC,CAAEC,YAAH,IAAmB;AAAK,IAAA,SAAS,EAAC;AAAf,KAAwDA,YAAxD,CANtB,EAOC;AAAK,IAAA,SAAS,EAAC;AAAf,KACGF,QADH,CAPD,CADD;AAaA;;eAEcF,W","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\nimport { isString } from 'lodash';\n\n/**\n * Internal dependencies\n */\nimport Dashicon from '../dashicon';\n\n/**\n* Renders a placeholder. Normally used by blocks to render their empty state.\n*\n* @param {Object} props The component props.\n* @return {Object} The rendered placeholder.\n*/\nfunction Placeholder( { icon, children, label, instructions, className, notices, ...additionalProps } ) {\n\tconst classes = classnames( 'components-placeholder', className );\n\n\treturn (\n\t\t<div { ...additionalProps } className={ classes }>\n\t\t\t{ notices }\n\t\t\t<div className=\"components-placeholder__label\">\n\t\t\t\t{ isString( icon ) ? <Dashicon icon={ icon } /> : icon }\n\t\t\t\t{ label }\n\t\t\t</div>\n\t\t\t{ !! instructions && <div className=\"components-placeholder__instructions\">{ instructions }</div> }\n\t\t\t<div className=\"components-placeholder__fieldset\">\n\t\t\t\t{ children }\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n\nexport default Placeholder;\n"]}
1
+ {"version":3,"sources":["/Users/jdesrosiers/Sites/git-wordpress-develop/src/wp-content/plugins/gutenberg/packages/components/src/placeholder/index.js"],"names":["Placeholder","icon","children","label","instructions","className","notices","additionalProps","classes"],"mappings":";;;;;;;;;;;;;;;AAGA;;AACA;;AAKA;;AATA;;;;AAMA;;;;AAKA;;;;;;AAMA,SAASA,WAAT,OAAwG;AAAA,MAAhFC,IAAgF,QAAhFA,IAAgF;AAAA,MAA1EC,QAA0E,QAA1EA,QAA0E;AAAA,MAAhEC,KAAgE,QAAhEA,KAAgE;AAAA,MAAzDC,YAAyD,QAAzDA,YAAyD;AAAA,MAA3CC,SAA2C,QAA3CA,SAA2C;AAAA,MAAhCC,OAAgC,QAAhCA,OAAgC;AAAA,MAApBC,eAAoB;AACvG,MAAMC,OAAO,GAAG,yBAAY,wBAAZ,EAAsCH,SAAtC,CAAhB;AAEA,SACC,8DAAUE,eAAV;AAA4B,IAAA,SAAS,EAAGC;AAAxC,MACGF,OADH,EAEC;AAAK,IAAA,SAAS,EAAC;AAAf,KACG,sBAAUL,IAAV,IAAmB,4BAAC,iBAAD;AAAU,IAAA,IAAI,EAAGA;AAAjB,IAAnB,GAAgDA,IADnD,EAEGE,KAFH,CAFD,EAMG,CAAC,CAAEC,YAAH,IAAmB;AAAK,IAAA,SAAS,EAAC;AAAf,KAAwDA,YAAxD,CANtB,EAOC;AAAK,IAAA,SAAS,EAAC;AAAf,KACGF,QADH,CAPD,CADD;AAaA;;eAEcF,W","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\nimport { isString } from 'lodash';\n\n/**\n * Internal dependencies\n */\nimport Dashicon from '../dashicon';\n\n/**\n* Renders a placeholder. Normally used by blocks to render their empty state.\n*\n* @param {Object} props The component props.\n* @return {Object} The rendered placeholder.\n*/\nfunction Placeholder( { icon, children, label, instructions, className, notices, ...additionalProps } ) {\n\tconst classes = classnames( 'components-placeholder', className );\n\n\treturn (\n\t\t<div { ...additionalProps } className={ classes }>\n\t\t\t{ notices }\n\t\t\t<div className=\"components-placeholder__label\">\n\t\t\t\t{ isString( icon ) ? <Dashicon icon={ icon } /> : icon }\n\t\t\t\t{ label }\n\t\t\t</div>\n\t\t\t{ !! instructions && <div className=\"components-placeholder__instructions\">{ instructions }</div> }\n\t\t\t<div className=\"components-placeholder__fieldset\">\n\t\t\t\t{ children }\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n\nexport default Placeholder;\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/jdesrosiers/Sites/gutenberg-security/5.1/packages/components/src/popover/detect-outside.js"],"names":["PopoverDetectOutside","event","onClickOutside","props","children","Component"],"mappings":";;;;;;;;;;;;;;;;;;;AAGA;;AAKA;;AARA;;;;AAKA;;;IAKMA,oB;;;;;;;;;;;;uCACeC,K,EAAQ;AAAA,UACnBC,cADmB,GACA,KAAKC,KADL,CACnBD,cADmB;;AAE3B,UAAKA,cAAL,EAAsB;AACrBA,QAAAA,cAAc,CAAED,KAAF,CAAd;AACA;AACD;;;6BAEQ;AACR,aAAO,KAAKE,KAAL,CAAWC,QAAlB;AACA;;;EAViCC,kB;;eAapB,gCAAcL,oBAAd,C","sourcesContent":["/**\n * External dependencies\n */\nimport clickOutside from 'react-click-outside';\n\n/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\n\nclass PopoverDetectOutside extends Component {\n\thandleClickOutside( event ) {\n\t\tconst { onClickOutside } = this.props;\n\t\tif ( onClickOutside ) {\n\t\t\tonClickOutside( event );\n\t\t}\n\t}\n\n\trender() {\n\t\treturn this.props.children;\n\t}\n}\n\nexport default clickOutside( PopoverDetectOutside );\n"]}
1
+ {"version":3,"sources":["/Users/jdesrosiers/Sites/git-wordpress-develop/src/wp-content/plugins/gutenberg/packages/components/src/popover/detect-outside.js"],"names":["PopoverDetectOutside","event","onClickOutside","props","children","Component"],"mappings":";;;;;;;;;;;;;;;;;;;AAGA;;AAKA;;AARA;;;;AAKA;;;IAKMA,oB;;;;;;;;;;;;uCACeC,K,EAAQ;AAAA,UACnBC,cADmB,GACA,KAAKC,KADL,CACnBD,cADmB;;AAE3B,UAAKA,cAAL,EAAsB;AACrBA,QAAAA,cAAc,CAAED,KAAF,CAAd;AACA;AACD;;;6BAEQ;AACR,aAAO,KAAKE,KAAL,CAAWC,QAAlB;AACA;;;EAViCC,kB;;eAapB,gCAAcL,oBAAd,C","sourcesContent":["/**\n * External dependencies\n */\nimport clickOutside from 'react-click-outside';\n\n/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\n\nclass PopoverDetectOutside extends Component {\n\thandleClickOutside( event ) {\n\t\tconst { onClickOutside } = this.props;\n\t\tif ( onClickOutside ) {\n\t\t\tonClickOutside( event );\n\t\t}\n\t}\n\n\trender() {\n\t\treturn this.props.children;\n\t}\n}\n\nexport default clickOutside( PopoverDetectOutside );\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/jdesrosiers/Sites/gutenberg-security/5.1/packages/components/src/popover/index.js"],"names":["FocusManaged","children","SLOT_NAME","Popover","arguments","getAnchorRect","bind","computePopoverPosition","maybeClose","throttledRefresh","refresh","refreshOnAnchorMove","contentNode","anchorNode","state","popoverLeft","popoverTop","yAxis","xAxis","contentHeight","contentWidth","isMobile","popoverSize","anchorRect","toggleAutoRefresh","focusTimeout","setTimeout","focus","prevProps","position","props","clearTimeout","isActive","window","cancelAnimationFrame","rafHandle","handler","autoRefresh","setInterval","clearInterval","event","type","current","contains","target","requestAnimationFrame","didAnchorRectChange","contentRect","getBoundingClientRect","width","height","didPopoverSizeChange","setState","focusOnMount","firstTabbable","tabbable","find","anchor","parentNode","rect","getComputedStyle","paddingTop","paddingBottom","topPad","parseInt","bottomPad","x","left","y","top","right","bottom","expandOnMobile","newPopoverPosition","onKeyDown","onClose","keyCode","ESCAPE","stopPropagation","headerTitle","className","onClickOutside","noArrow","range","contentProps","classes","content","undefined","visibility","maxHeight","maxWidth","getSlot","Component","defaultProps","PopoverContainer","Slot"],"mappings":";;;;;;;;;AASA;;;;;;;;;;;;;;;;;;AANA;;AACA;;AAMA;;AACA;;AAKA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAvBA;;;;AAMA;;;;AAOA;;;AAYA,IAAMA,YAAY,GAAG,qCAAwB,8BAAiB;AAAA,MAAIC,QAAJ,QAAIA,QAAJ;AAAA,SAAoBA,QAApB;AAAA,CAAjB,CAAxB,CAArB;AAEA;;;;;;AAKA,IAAMC,SAAS,GAAG,SAAlB;;IAEMC,O;;;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EtB6B,EAAAA,OAAO,EAAE;AAFa,CAAvB;AAKA,IAAMY,gBAAgB,GAAG3F,OAAzB;;AAEA2F,gBAAgB,CAACC,IAAjB,GAAwB;AAAA,SAAM,4BAAC,cAAD;AAAM,IAAA,gBAAgB,MAAtB;AAAuB,IAAA,IAAI,EAAG7F;AAA9B,IAAN;AAAA,CAAxB;;eAEe4F,gB","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\nimport isShallowEqual from '@wordpress/is-shallow-equal';\n\n/**\n * WordPress dependencies\n */\nimport { Component, createRef } from '@wordpress/element';\nimport { focus } from '@wordpress/dom';\nimport { ESCAPE } from '@wordpress/keycodes';\n\n/**\n * Internal dependencies\n */\nimport { computePopoverPosition } from './utils';\nimport withFocusReturn from '../higher-order/with-focus-return';\nimport withConstrainedTabbing from '../higher-order/with-constrained-tabbing';\nimport PopoverDetectOutside from './detect-outside';\nimport IconButton from '../icon-button';\nimport ScrollLock from '../scroll-lock';\nimport IsolatedEventContainer from '../isolated-event-container';\nimport { Slot, Fill, Consumer } from '../slot-fill';\n\nconst FocusManaged = withConstrainedTabbing( withFocusReturn( ( { children } ) => children ) );\n\n/**\n * Name of slot in which popover should fill.\n *\n * @type {String}\n */\nconst SLOT_NAME = 'Popover';\n\nclass Popover extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\n\t\tthis.getAnchorRect = this.getAnchorRect.bind( this );\n\t\tthis.computePopoverPosition = this.computePopoverPosition.bind( this );\n\t\tthis.maybeClose = this.maybeClose.bind( this );\n\t\tthis.throttledRefresh = this.throttledRefresh.bind( this );\n\t\tthis.refresh = this.refresh.bind( this );\n\t\tthis.refreshOnAnchorMove = this.refreshOnAnchorMove.bind( this );\n\n\t\tthis.contentNode = createRef();\n\t\tthis.anchorNode = createRef();\n\n\t\tthis.state = {\n\t\t\tpopoverLeft: null,\n\t\t\tpopoverTop: null,\n\t\t\tyAxis: 'top',\n\t\t\txAxis: 'center',\n\t\t\tcontentHeight: null,\n\t\t\tcontentWidth: null,\n\t\t\tisMobile: false,\n\t\t\tpopoverSize: null,\n\t\t};\n\n\t\t// Property used keep track of the previous anchor rect\n\t\t// used to compute the popover position and size.\n\t\tthis.anchorRect = {};\n\t}\n\n\tcomponentDidMount() {\n\t\tthis.toggleAutoRefresh( true );\n\t\tthis.refresh();\n\n\t\t/*\n\t\t * Without the setTimeout, the dom node is not being focused. Related:\n\t\t * https://stackoverflow.com/questions/35522220/react-ref-with-focus-doesnt-work-without-settimeout-my-example\n\t\t *\n\t\t * TODO: Treat the cause, not the symptom.\n\t\t */\n\t\tthis.focusTimeout = setTimeout( () => {\n\t\t\tthis.focus();\n\t\t}, 0 );\n\t}\n\n\tcomponentDidUpdate( prevProps ) {\n\t\tif ( prevProps.position !== this.props.position ) {\n\t\t\tthis.computePopoverPosition( this.state.popoverSize, this.anchorRect );\n\t\t}\n\t}\n\n\tcomponentWillUnmount() {\n\t\tclearTimeout( this.focusTimeout );\n\t\tthis.toggleAutoRefresh( false );\n\t}\n\n\ttoggleAutoRefresh( isActive ) {\n\t\twindow.cancelAnimationFrame( this.rafHandle );\n\n\t\t// Refresh the popover every time the window is resized or scrolled\n\t\tconst handler = isActive ? 'addEventListener' : 'removeEventListener';\n\t\twindow[ handler ]( 'resize', this.throttledRefresh );\n\t\twindow[ handler ]( 'scroll', this.throttledRefresh, true );\n\n\t\t/*\n\t\t * There are sometimes we need to reposition or resize the popover that are not\n\t\t * handled by the resize/scroll window events (i.e. CSS changes in the layout\n\t\t * that changes the position of the anchor).\n\t\t *\n\t\t * For these situations, we refresh the popover every 0.5s\n\t\t */\n\t\tif ( isActive ) {\n\t\t\tthis.autoRefresh = setInterval( this.refreshOnAnchorMove, 500 );\n\t\t} else {\n\t\t\tclearInterval( this.autoRefresh );\n\t\t}\n\t}\n\n\tthrottledRefresh( event ) {\n\t\twindow.cancelAnimationFrame( this.rafHandle );\n\t\tif ( event && event.type === 'scroll' && this.contentNode.current.contains( event.target ) ) {\n\t\t\treturn;\n\t\t}\n\t\tthis.rafHandle = window.requestAnimationFrame( this.refresh );\n\t}\n\n\t/**\n\t * Calling refreshOnAnchorMove\n\t * will only refresh the popover position if the anchor moves.\n\t */\n\trefreshOnAnchorMove() {\n\t\tconst { getAnchorRect = this.getAnchorRect } = this.props;\n\t\tconst anchorRect = getAnchorRect( this.anchorNode.current );\n\t\tconst didAnchorRectChange = ! isShallowEqual( anchorRect, this.anchorRect );\n\t\tif ( didAnchorRectChange ) {\n\t\t\tthis.anchorRect = anchorRect;\n\t\t\tthis.computePopoverPosition( this.state.popoverSize, anchorRect );\n\t\t}\n\t}\n\n\t/**\n\t * Calling `refresh()` will force the Popover to recalculate its size and\n\t * position. This is useful when a DOM change causes the anchor node to change\n\t * position.\n\t */\n\trefresh() {\n\t\tconst { getAnchorRect = this.getAnchorRect } = this.props;\n\t\tconst anchorRect = getAnchorRect( this.anchorNode.current );\n\t\tconst contentRect = this.contentNode.current.getBoundingClientRect();\n\t\tconst popoverSize = {\n\t\t\twidth: contentRect.width,\n\t\t\theight: contentRect.height,\n\t\t};\n\t\tconst didPopoverSizeChange = ! this.state.popoverSize || (\n\t\t\tpopoverSize.width !== this.state.popoverSize.width ||\n\t\t\tpopoverSize.height !== this.state.popoverSize.height\n\t\t);\n\t\tif ( didPopoverSizeChange ) {\n\t\t\tthis.setState( { popoverSize } );\n\t\t}\n\t\tthis.anchorRect = anchorRect;\n\t\tthis.computePopoverPosition( popoverSize, anchorRect );\n\t}\n\n\tfocus() {\n\t\tconst { focusOnMount } = this.props;\n\n\t\tif ( ! focusOnMount || ! this.contentNode.current ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( focusOnMount === 'firstElement' ) {\n\t\t\t// Find first tabbable node within content and shift focus, falling\n\t\t\t// back to the popover panel itself.\n\t\t\tconst firstTabbable = focus.tabbable.find( this.contentNode.current )[ 0 ];\n\n\t\t\tif ( firstTabbable ) {\n\t\t\t\tfirstTabbable.focus();\n\t\t\t} else {\n\t\t\t\tthis.contentNode.current.focus();\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\tif ( focusOnMount === 'container' ) {\n\t\t\t// Focus the popover panel itself so items in the popover are easily\n\t\t\t// accessed via keyboard navigation.\n\t\t\tthis.contentNode.current.focus();\n\t\t}\n\t}\n\n\tgetAnchorRect( anchor ) {\n\t\tif ( ! anchor || ! anchor.parentNode ) {\n\t\t\treturn;\n\t\t}\n\t\tconst rect = anchor.parentNode.getBoundingClientRect();\n\t\t// subtract padding\n\t\tconst { paddingTop, paddingBottom } = window.getComputedStyle( anchor.parentNode );\n\t\tconst topPad = parseInt( paddingTop, 10 );\n\t\tconst bottomPad = parseInt( paddingBottom, 10 );\n\t\treturn {\n\t\t\tx: rect.left,\n\t\t\ty: rect.top + topPad,\n\t\t\twidth: rect.width,\n\t\t\theight: rect.height - topPad - bottomPad,\n\t\t\tleft: rect.left,\n\t\t\tright: rect.right,\n\t\t\ttop: rect.top + topPad,\n\t\t\tbottom: rect.bottom - bottomPad,\n\t\t};\n\t}\n\n\tcomputePopoverPosition( popoverSize, anchorRect ) {\n\t\tconst { position = 'top', expandOnMobile } = this.props;\n\t\tconst newPopoverPosition = computePopoverPosition(\n\t\t\tanchorRect,\n\t\t\tpopoverSize,\n\t\t\tposition,\n\t\t\texpandOnMobile\n\t\t);\n\n\t\tif (\n\t\t\tthis.state.yAxis !== newPopoverPosition.yAxis ||\n\t\t\tthis.state.xAxis !== newPopoverPosition.xAxis ||\n\t\t\tthis.state.popoverLeft !== newPopoverPosition.popoverLeft ||\n\t\t\tthis.state.popoverTop !== newPopoverPosition.popoverTop ||\n\t\t\tthis.state.contentHeight !== newPopoverPosition.contentHeight ||\n\t\t\tthis.state.contentWidth !== newPopoverPosition.contentWidth ||\n\t\t\tthis.state.isMobile !== newPopoverPosition.isMobile\n\t\t) {\n\t\t\tthis.setState( newPopoverPosition );\n\t\t}\n\t}\n\n\tmaybeClose( event ) {\n\t\tconst { onKeyDown, onClose } = this.props;\n\n\t\t// Close on escape\n\t\tif ( event.keyCode === ESCAPE && onClose ) {\n\t\t\tevent.stopPropagation();\n\t\t\tonClose();\n\t\t}\n\n\t\t// Preserve original content prop behavior\n\t\tif ( onKeyDown ) {\n\t\t\tonKeyDown( event );\n\t\t}\n\t}\n\n\trender() {\n\t\tconst {\n\t\t\theaderTitle,\n\t\t\tonClose,\n\t\t\tchildren,\n\t\t\tclassName,\n\t\t\tonClickOutside = onClose,\n\t\t\tnoArrow,\n\t\t\t// Disable reason: We generate the `...contentProps` rest as remainder\n\t\t\t// of props which aren't explicitly handled by this component.\n\t\t\t/* eslint-disable no-unused-vars */\n\t\t\tposition,\n\t\t\trange,\n\t\t\tfocusOnMount,\n\t\t\tgetAnchorRect,\n\t\t\texpandOnMobile,\n\t\t\t/* eslint-enable no-unused-vars */\n\t\t\t...contentProps\n\t\t} = this.props;\n\t\tconst {\n\t\t\tpopoverLeft,\n\t\t\tpopoverTop,\n\t\t\tyAxis,\n\t\t\txAxis,\n\t\t\tcontentHeight,\n\t\t\tcontentWidth,\n\t\t\tpopoverSize,\n\t\t\tisMobile,\n\t\t} = this.state;\n\n\t\tconst classes = classnames(\n\t\t\t'components-popover',\n\t\t\tclassName,\n\t\t\t'is-' + yAxis,\n\t\t\t'is-' + xAxis,\n\t\t\t{\n\t\t\t\t'is-mobile': isMobile,\n\t\t\t\t'is-without-arrow': noArrow || ( xAxis === 'center' && yAxis === 'middle' ),\n\t\t\t}\n\t\t);\n\n\t\t// Disable reason: We care to capture the _bubbled_ events from inputs\n\t\t// within popover as inferring close intent.\n\n\t\t/* eslint-disable jsx-a11y/no-static-element-interactions */\n\t\tlet content = (\n\t\t\t<PopoverDetectOutside onClickOutside={ onClickOutside }>\n\t\t\t\t<IsolatedEventContainer\n\t\t\t\t\tclassName={ classes }\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\ttop: ! isMobile && popoverTop ? popoverTop + 'px' : undefined,\n\t\t\t\t\t\tleft: ! isMobile && popoverLeft ? popoverLeft + 'px' : undefined,\n\t\t\t\t\t\tvisibility: popoverSize ? undefined : 'hidden',\n\t\t\t\t\t} }\n\t\t\t\t\t{ ...contentProps }\n\t\t\t\t\tonKeyDown={ this.maybeClose }\n\t\t\t\t>\n\t\t\t\t\t{ isMobile && (\n\t\t\t\t\t\t<div className=\"components-popover__header\">\n\t\t\t\t\t\t\t<span className=\"components-popover__header-title\">\n\t\t\t\t\t\t\t\t{ headerTitle }\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<IconButton className=\"components-popover__close\" icon=\"no-alt\" onClick={ onClose } />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t) }\n\t\t\t\t\t<div\n\t\t\t\t\t\tref={ this.contentNode }\n\t\t\t\t\t\tclassName=\"components-popover__content\"\n\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\tmaxHeight: ! isMobile && contentHeight ? contentHeight + 'px' : undefined,\n\t\t\t\t\t\t\tmaxWidth: ! isMobile && contentWidth ? contentWidth + 'px' : undefined,\n\t\t\t\t\t\t} }\n\t\t\t\t\t\ttabIndex=\"-1\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{ children }\n\t\t\t\t\t</div>\n\t\t\t\t</IsolatedEventContainer>\n\t\t\t</PopoverDetectOutside>\n\t\t);\n\t\t/* eslint-enable jsx-a11y/no-static-element-interactions */\n\n\t\t// Apply focus to element as long as focusOnMount is truthy; false is\n\t\t// the only \"disabled\" value.\n\t\tif ( focusOnMount ) {\n\t\t\tcontent = <FocusManaged>{ content }</FocusManaged>;\n\t\t}\n\n\t\treturn (\n\t\t\t<Consumer>\n\t\t\t\t{ ( { getSlot } ) => {\n\t\t\t\t\t// In case there is no slot context in which to render,\n\t\t\t\t\t// default to an in-place rendering.\n\t\t\t\t\tif ( getSlot && getSlot( SLOT_NAME ) ) {\n\t\t\t\t\t\tcontent = <Fill name={ SLOT_NAME }>{ content }</Fill>;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<span ref={ this.anchorNode }>\n\t\t\t\t\t\t\t{ content }\n\t\t\t\t\t\t\t{ isMobile && expandOnMobile && <ScrollLock /> }\n\t\t\t\t\t\t</span>\n\t\t\t\t\t);\n\t\t\t\t} }\n\t\t\t</Consumer>\n\t\t);\n\t}\n}\n\nPopover.defaultProps = {\n\tfocusOnMount: 'firstElement',\n\tnoArrow: false,\n};\n\nconst PopoverContainer = Popover;\n\nPopoverContainer.Slot = () => <Slot bubblesVirtually name={ SLOT_NAME } />;\n\nexport default PopoverContainer;\n"]}
1
+ {"version":3,"sources":["/Users/jdesrosiers/Sites/git-wordpress-develop/src/wp-content/plugins/gutenberg/packages/components/src/popover/index.js"],"names":["FocusManaged","children","SLOT_NAME","Popover","arguments","getAnchorRect","bind","computePopoverPosition","maybeClose","throttledRefresh","refresh","refreshOnAnchorMove","contentNode","anchorNode","state","popoverLeft","popoverTop","yAxis","xAxis","contentHeight","contentWidth","isMobile","popoverSize","anchorRect","toggleAutoRefresh","focusTimeout","setTimeout","focus","prevProps","position","props","clearTimeout","isActive","window","cancelAnimationFrame","rafHandle","handler","autoRefresh","setInterval","clearInterval","event","type","current","contains","target","requestAnimationFrame","didAnchorRectChange","contentRect","getBoundingClientRect","width","height","didPopoverSizeChange","setState","focusOnMount","firstTabbable","tabbable","find","anchor","parentNode","rect","getComputedStyle","paddingTop","paddingBottom","topPad","parseInt","bottomPad","x","left","y","top","right","bottom","expandOnMobile","newPopoverPosition","onKeyDown","onClose","keyCode","ESCAPE","stopPropagation","headerTitle","className","onClickOutside","noArrow","range","contentProps","classes","content","undefined","visibility","maxHeight","maxWidth","getSlot","Component","defaultProps","PopoverContainer","Slot"],"mappings":";;;;;;;;;AASA;;;;;;;;;;;;;;;;;;AANA;;AACA;;AAMA;;AACA;;AAKA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAvBA;;;;AAMA;;;;AAOA;;;AAYA,IAAMA,YAAY,GAAG,qCAAwB,8BAAiB;AAAA,MAAIC,QAAJ,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D;AAMA,OAdF,CADD;AAkBA;;;EA3ToBoB,kB;;AA8TtBzF,OAAO,CAAC0F,YAAR,GAAuB;AACtBxC,EAAAA,YAAY,EAAE,cADQ;AAEtB6B,EAAAA,OAAO,EAAE;AAFa,CAAvB;AAKA,IAAMY,gBAAgB,GAAG3F,OAAzB;;AAEA2F,gBAAgB,CAACC,IAAjB,GAAwB;AAAA,SAAM,4BAAC,cAAD;AAAM,IAAA,gBAAgB,MAAtB;AAAuB,IAAA,IAAI,EAAG7F;AAA9B,IAAN;AAAA,CAAxB;;eAEe4F,gB","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\nimport isShallowEqual from '@wordpress/is-shallow-equal';\n\n/**\n * WordPress dependencies\n */\nimport { Component, createRef } from '@wordpress/element';\nimport { focus } from '@wordpress/dom';\nimport { ESCAPE } from '@wordpress/keycodes';\n\n/**\n * Internal dependencies\n */\nimport { computePopoverPosition } from './utils';\nimport withFocusReturn from '../higher-order/with-focus-return';\nimport withConstrainedTabbing from '../higher-order/with-constrained-tabbing';\nimport PopoverDetectOutside from './detect-outside';\nimport IconButton from '../icon-button';\nimport ScrollLock from '../scroll-lock';\nimport IsolatedEventContainer from '../isolated-event-container';\nimport { Slot, Fill, Consumer } from '../slot-fill';\n\nconst FocusManaged = withConstrainedTabbing( withFocusReturn( ( { children } ) => children ) );\n\n/**\n * Name of slot in which popover should fill.\n *\n * @type {String}\n */\nconst SLOT_NAME = 'Popover';\n\nclass Popover extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\n\t\tthis.getAnchorRect = this.getAnchorRect.bind( this );\n\t\tthis.computePopoverPosition = this.computePopoverPosition.bind( this );\n\t\tthis.maybeClose = this.maybeClose.bind( this );\n\t\tthis.throttledRefresh = this.throttledRefresh.bind( this );\n\t\tthis.refresh = this.refresh.bind( this );\n\t\tthis.refreshOnAnchorMove = this.refreshOnAnchorMove.bind( this );\n\n\t\tthis.contentNode = createRef();\n\t\tthis.anchorNode = createRef();\n\n\t\tthis.state = {\n\t\t\tpopoverLeft: null,\n\t\t\tpopoverTop: null,\n\t\t\tyAxis: 'top',\n\t\t\txAxis: 'center',\n\t\t\tcontentHeight: null,\n\t\t\tcontentWidth: null,\n\t\t\tisMobile: false,\n\t\t\tpopoverSize: null,\n\t\t};\n\n\t\t// Property used keep track of the previous anchor rect\n\t\t// used to compute the popover position and size.\n\t\tthis.anchorRect = {};\n\t}\n\n\tcomponentDidMount() {\n\t\tthis.toggleAutoRefresh( true );\n\t\tthis.refresh();\n\n\t\t/*\n\t\t * Without the setTimeout, the dom node is not being focused. Related:\n\t\t * https://stackoverflow.com/questions/35522220/react-ref-with-focus-doesnt-work-without-settimeout-my-example\n\t\t *\n\t\t * TODO: Treat the cause, not the symptom.\n\t\t */\n\t\tthis.focusTimeout = setTimeout( () => {\n\t\t\tthis.focus();\n\t\t}, 0 );\n\t}\n\n\tcomponentDidUpdate( prevProps ) {\n\t\tif ( prevProps.position !== this.props.position ) {\n\t\t\tthis.computePopoverPosition( this.state.popoverSize, this.anchorRect );\n\t\t}\n\t}\n\n\tcomponentWillUnmount() {\n\t\tclearTimeout( this.focusTimeout );\n\t\tthis.toggleAutoRefresh( false );\n\t}\n\n\ttoggleAutoRefresh( isActive ) {\n\t\twindow.cancelAnimationFrame( this.rafHandle );\n\n\t\t// Refresh the popover every time the window is resized or scrolled\n\t\tconst handler = isActive ? 'addEventListener' : 'removeEventListener';\n\t\twindow[ handler ]( 'resize', this.throttledRefresh );\n\t\twindow[ handler ]( 'scroll', this.throttledRefresh, true );\n\n\t\t/*\n\t\t * There are sometimes we need to reposition or resize the popover that are not\n\t\t * handled by the resize/scroll window events (i.e. CSS changes in the layout\n\t\t * that changes the position of the anchor).\n\t\t *\n\t\t * For these situations, we refresh the popover every 0.5s\n\t\t */\n\t\tif ( isActive ) {\n\t\t\tthis.autoRefresh = setInterval( this.refreshOnAnchorMove, 500 );\n\t\t} else {\n\t\t\tclearInterval( this.autoRefresh );\n\t\t}\n\t}\n\n\tthrottledRefresh( event ) {\n\t\twindow.cancelAnimationFrame( this.rafHandle );\n\t\tif ( event && event.type === 'scroll' && this.contentNode.current.contains( event.target ) ) {\n\t\t\treturn;\n\t\t}\n\t\tthis.rafHandle = window.requestAnimationFrame( this.refresh );\n\t}\n\n\t/**\n\t * Calling refreshOnAnchorMove\n\t * will only refresh the popover position if the anchor moves.\n\t */\n\trefreshOnAnchorMove() {\n\t\tconst { getAnchorRect = this.getAnchorRect } = this.props;\n\t\tconst anchorRect = getAnchorRect( this.anchorNode.current );\n\t\tconst didAnchorRectChange = ! isShallowEqual( anchorRect, this.anchorRect );\n\t\tif ( didAnchorRectChange ) {\n\t\t\tthis.anchorRect = anchorRect;\n\t\t\tthis.computePopoverPosition( this.state.popoverSize, anchorRect );\n\t\t}\n\t}\n\n\t/**\n\t * Calling `refresh()` will force the Popover to recalculate its size and\n\t * position. This is useful when a DOM change causes the anchor node to change\n\t * position.\n\t */\n\trefresh() {\n\t\tconst { getAnchorRect = this.getAnchorRect } = this.props;\n\t\tconst anchorRect = getAnchorRect( this.anchorNode.current );\n\t\tconst contentRect = this.contentNode.current.getBoundingClientRect();\n\t\tconst popoverSize = {\n\t\t\twidth: contentRect.width,\n\t\t\theight: contentRect.height,\n\t\t};\n\t\tconst didPopoverSizeChange = ! this.state.popoverSize || (\n\t\t\tpopoverSize.width !== this.state.popoverSize.width ||\n\t\t\tpopoverSize.height !== this.state.popoverSize.height\n\t\t);\n\t\tif ( didPopoverSizeChange ) {\n\t\t\tthis.setState( { popoverSize } );\n\t\t}\n\t\tthis.anchorRect = anchorRect;\n\t\tthis.computePopoverPosition( popoverSize, anchorRect );\n\t}\n\n\tfocus() {\n\t\tconst { focusOnMount } = this.props;\n\n\t\tif ( ! focusOnMount || ! this.contentNode.current ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( focusOnMount === 'firstElement' ) {\n\t\t\t// Find first tabbable node within content and shift focus, falling\n\t\t\t// back to the popover panel itself.\n\t\t\tconst firstTabbable = focus.tabbable.find( this.contentNode.current )[ 0 ];\n\n\t\t\tif ( firstTabbable ) {\n\t\t\t\tfirstTabbable.focus();\n\t\t\t} else {\n\t\t\t\tthis.contentNode.current.focus();\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\tif ( focusOnMount === 'container' ) {\n\t\t\t// Focus the popover panel itself so items in the popover are easily\n\t\t\t// accessed via keyboard navigation.\n\t\t\tthis.contentNode.current.focus();\n\t\t}\n\t}\n\n\tgetAnchorRect( anchor ) {\n\t\tif ( ! anchor || ! anchor.parentNode ) {\n\t\t\treturn;\n\t\t}\n\t\tconst rect = anchor.parentNode.getBoundingClientRect();\n\t\t// subtract padding\n\t\tconst { paddingTop, paddingBottom } = window.getComputedStyle( anchor.parentNode );\n\t\tconst topPad = parseInt( paddingTop, 10 );\n\t\tconst bottomPad = parseInt( paddingBottom, 10 );\n\t\treturn {\n\t\t\tx: rect.left,\n\t\t\ty: rect.top + topPad,\n\t\t\twidth: rect.width,\n\t\t\theight: rect.height - topPad - bottomPad,\n\t\t\tleft: rect.left,\n\t\t\tright: rect.right,\n\t\t\ttop: rect.top + topPad,\n\t\t\tbottom: rect.bottom - bottomPad,\n\t\t};\n\t}\n\n\tcomputePopoverPosition( popoverSize, anchorRect ) {\n\t\tconst { position = 'top', expandOnMobile } = this.props;\n\t\tconst newPopoverPosition = computePopoverPosition(\n\t\t\tanchorRect,\n\t\t\tpopoverSize,\n\t\t\tposition,\n\t\t\texpandOnMobile\n\t\t);\n\n\t\tif (\n\t\t\tthis.state.yAxis !== newPopoverPosition.yAxis ||\n\t\t\tthis.state.xAxis !== newPopoverPosition.xAxis ||\n\t\t\tthis.state.popoverLeft !== newPopoverPosition.popoverLeft ||\n\t\t\tthis.state.popoverTop !== newPopoverPosition.popoverTop ||\n\t\t\tthis.state.contentHeight !== newPopoverPosition.contentHeight ||\n\t\t\tthis.state.contentWidth !== newPopoverPosition.contentWidth ||\n\t\t\tthis.state.isMobile !== newPopoverPosition.isMobile\n\t\t) {\n\t\t\tthis.setState( newPopoverPosition );\n\t\t}\n\t}\n\n\tmaybeClose( event ) {\n\t\tconst { onKeyDown, onClose } = this.props;\n\n\t\t// Close on escape\n\t\tif ( event.keyCode === ESCAPE && onClose ) {\n\t\t\tevent.stopPropagation();\n\t\t\tonClose();\n\t\t}\n\n\t\t// Preserve original content prop behavior\n\t\tif ( onKeyDown ) {\n\t\t\tonKeyDown( event );\n\t\t}\n\t}\n\n\trender() {\n\t\tconst {\n\t\t\theaderTitle,\n\t\t\tonClose,\n\t\t\tchildren,\n\t\t\tclassName,\n\t\t\tonClickOutside = onClose,\n\t\t\tnoArrow,\n\t\t\t// Disable reason: We generate the `...contentProps` rest as remainder\n\t\t\t// of props which aren't explicitly handled by this component.\n\t\t\t/* eslint-disable no-unused-vars */\n\t\t\tposition,\n\t\t\trange,\n\t\t\tfocusOnMount,\n\t\t\tgetAnchorRect,\n\t\t\texpandOnMobile,\n\t\t\t/* eslint-enable no-unused-vars */\n\t\t\t...contentProps\n\t\t} = this.props;\n\t\tconst {\n\t\t\tpopoverLeft,\n\t\t\tpopoverTop,\n\t\t\tyAxis,\n\t\t\txAxis,\n\t\t\tcontentHeight,\n\t\t\tcontentWidth,\n\t\t\tpopoverSize,\n\t\t\tisMobile,\n\t\t} = this.state;\n\n\t\tconst classes = classnames(\n\t\t\t'components-popover',\n\t\t\tclassName,\n\t\t\t'is-' + yAxis,\n\t\t\t'is-' + xAxis,\n\t\t\t{\n\t\t\t\t'is-mobile': isMobile,\n\t\t\t\t'is-without-arrow': noArrow || ( xAxis === 'center' && yAxis === 'middle' ),\n\t\t\t}\n\t\t);\n\n\t\t// Disable reason: We care to capture the _bubbled_ events from inputs\n\t\t// within popover as inferring close intent.\n\n\t\t/* eslint-disable jsx-a11y/no-static-element-interactions */\n\t\tlet content = (\n\t\t\t<PopoverDetectOutside onClickOutside={ onClickOutside }>\n\t\t\t\t<IsolatedEventContainer\n\t\t\t\t\tclassName={ classes }\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\ttop: ! isMobile && popoverTop ? popoverTop + 'px' : undefined,\n\t\t\t\t\t\tleft: ! isMobile && popoverLeft ? popoverLeft + 'px' : undefined,\n\t\t\t\t\t\tvisibility: popoverSize ? undefined : 'hidden',\n\t\t\t\t\t} }\n\t\t\t\t\t{ ...contentProps }\n\t\t\t\t\tonKeyDown={ this.maybeClose }\n\t\t\t\t>\n\t\t\t\t\t{ isMobile && (\n\t\t\t\t\t\t<div className=\"components-popover__header\">\n\t\t\t\t\t\t\t<span className=\"components-popover__header-title\">\n\t\t\t\t\t\t\t\t{ headerTitle }\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<IconButton className=\"components-popover__close\" icon=\"no-alt\" onClick={ onClose } />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t) }\n\t\t\t\t\t<div\n\t\t\t\t\t\tref={ this.contentNode }\n\t\t\t\t\t\tclassName=\"components-popover__content\"\n\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\tmaxHeight: ! isMobile && contentHeight ? contentHeight + 'px' : undefined,\n\t\t\t\t\t\t\tmaxWidth: ! isMobile && contentWidth ? contentWidth + 'px' : undefined,\n\t\t\t\t\t\t} }\n\t\t\t\t\t\ttabIndex=\"-1\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{ children }\n\t\t\t\t\t</div>\n\t\t\t\t</IsolatedEventContainer>\n\t\t\t</PopoverDetectOutside>\n\t\t);\n\t\t/* eslint-enable jsx-a11y/no-static-element-interactions */\n\n\t\t// Apply focus to element as long as focusOnMount is truthy; false is\n\t\t// the only \"disabled\" value.\n\t\tif ( focusOnMount ) {\n\t\t\tcontent = <FocusManaged>{ content }</FocusManaged>;\n\t\t}\n\n\t\treturn (\n\t\t\t<Consumer>\n\t\t\t\t{ ( { getSlot } ) => {\n\t\t\t\t\t// In case there is no slot context in which to render,\n\t\t\t\t\t// default to an in-place rendering.\n\t\t\t\t\tif ( getSlot && getSlot( SLOT_NAME ) ) {\n\t\t\t\t\t\tcontent = <Fill name={ SLOT_NAME }>{ content }</Fill>;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<span ref={ this.anchorNode }>\n\t\t\t\t\t\t\t{ content }\n\t\t\t\t\t\t\t{ isMobile && expandOnMobile && <ScrollLock /> }\n\t\t\t\t\t\t</span>\n\t\t\t\t\t);\n\t\t\t\t} }\n\t\t\t</Consumer>\n\t\t);\n\t}\n}\n\nPopover.defaultProps = {\n\tfocusOnMount: 'firstElement',\n\tnoArrow: false,\n};\n\nconst PopoverContainer = Popover;\n\nPopoverContainer.Slot = () => <Slot bubblesVirtually name={ SLOT_NAME } />;\n\nexport default PopoverContainer;\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/jdesrosiers/Sites/gutenberg-security/5.1/packages/components/src/popover/utils.js"],"names":["HEIGHT_OFFSET","isMobileViewport","window","innerWidth","isRTL","document","documentElement","dir","computePopoverXAxisPosition","anchorRect","contentSize","xAxis","chosenYAxis","width","anchorMidPoint","Math","round","left","centerAlignment","popoverLeft","contentWidth","leftAlignmentX","leftAlignment","rightAlignmentX","right","rightAlignment","chosenXAxis","chosenWidth","computePopoverYAxisPosition","yAxis","height","top","middleAlignment","popoverTop","contentHeight","innerHeight","topAlignment","bottomAlignment","bottom","chosenHeight","computePopoverPosition","position","expandOnMobile","split","yAxisPosition","xAxisPosition","isMobile"],"mappings":";;;;;;;;;;;;;;;AACA;;;AAGA,IAAMA,aAAa,GAAG,EAAtB,C,CAA0B;;AAC1B,IAAMC,gBAAgB,GAAG,SAAnBA,gBAAmB;AAAA,SAAMC,MAAM,CAACC,UAAP,GAAoB,GAA1B;AAAA,CAAzB;;AACA,IAAMC,KAAK,GAAG,SAARA,KAAQ;AAAA,SAAMC,QAAQ,CAACC,eAAT,CAAyBC,GAAzB,KAAiC,KAAvC;AAAA,CAAd;AAEA;;;;;;;;;;;;;AAWO,SAASC,2BAAT,CAAsCC,UAAtC,EAAkDC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MAC5FlB,KAD4F,kCACpF,QADoF;;AAG3G,MAAMiC,aAAa,GAAGhB,2BAA2B,CAAEnB,UAAF,EAAcC,WAAd,EAA2BmB,KAA3B,CAAjD;AACA,MAAMgB,aAAa,GAAGrC,2BAA2B,CAAEC,UAAF,EAAcC,WAAd,EAA2BC,KAA3B,EAAkCiC,aAAa,CAACf,KAAhD,CAAjD;AAEA;AACCiB,IAAAA,QAAQ,EAAE7C,gBAAgB,MAAMyC;AADjC,KAEIG,aAFJ,EAGID,aAHJ;AAKA","sourcesContent":["\n/**\n * Module constants\n */\nconst HEIGHT_OFFSET = 10; // used by the arrow and a bit of empty space\nconst isMobileViewport = () => window.innerWidth < 782;\nconst isRTL = () => document.documentElement.dir === 'rtl';\n\n/**\n * Utility used to compute the popover position over the xAxis\n *\n * @param {Object} anchorRect Anchor Rect.\n * @param {Object} contentSize Content Size.\n * @param {string} xAxis Desired xAxis.\n * @param {string} chosenYAxis yAxis to be used.\n * @param {boolean} expandOnMobile Whether to expand the popover on mobile or not.\n *\n * @return {Object} Popover xAxis position and constraints.\n */\nexport function computePopoverXAxisPosition( anchorRect, contentSize, xAxis, chosenYAxis ) {\n\tconst { width } = contentSize;\n\t// Correct xAxis for RTL support\n\tif ( xAxis === 'left' && isRTL() ) {\n\t\txAxis = 'right';\n\t} else if ( xAxis === 'right' && isRTL() ) {\n\t\txAxis = 'left';\n\t}\n\n\t// x axis alignment choices\n\tconst anchorMidPoint = Math.round( anchorRect.left + ( anchorRect.width / 2 ) );\n\tconst centerAlignment = {\n\t\tpopoverLeft: anchorMidPoint,\n\t\tcontentWidth: (\n\t\t\t( anchorMidPoint - ( width / 2 ) > 0 ? ( width / 2 ) : anchorMidPoint ) +\n\t\t\t( anchorMidPoint + ( width / 2 ) > window.innerWidth ? window.innerWidth - anchorMidPoint : ( width / 2 ) )\n\t\t),\n\t};\n\tconst leftAlignmentX = chosenYAxis === 'middle' ? anchorRect.left : anchorMidPoint;\n\tconst leftAlignment = {\n\t\tpopoverLeft: leftAlignmentX,\n\t\tcontentWidth: leftAlignmentX - width > 0 ? width : leftAlignmentX,\n\t};\n\tconst rightAlignmentX = chosenYAxis === 'middle' ? anchorRect.right : anchorMidPoint;\n\tconst rightAlignment = {\n\t\tpopoverLeft: rightAlignmentX,\n\t\tcontentWidth: rightAlignmentX + width > window.innerWidth ? window.innerWidth - rightAlignmentX : width,\n\t};\n\n\t// Choosing the x axis\n\tlet chosenXAxis;\n\tlet contentWidth = null;\n\tif ( xAxis === 'center' && centerAlignment.contentWidth === width ) {\n\t\tchosenXAxis = 'center';\n\t} else if ( xAxis === 'left' && leftAlignment.contentWidth === width ) {\n\t\tchosenXAxis = 'left';\n\t} else if ( xAxis === 'right' && rightAlignment.contentWidth === width ) {\n\t\tchosenXAxis = 'right';\n\t} else {\n\t\tchosenXAxis = leftAlignment.contentWidth > rightAlignment.contentWidth ? 'left' : 'right';\n\t\tconst chosenWidth = chosenXAxis === 'left' ? leftAlignment.contentWidth : rightAlignment.contentWidth;\n\t\tcontentWidth = chosenWidth !== width ? chosenWidth : null;\n\t}\n\n\tlet popoverLeft;\n\tif ( chosenXAxis === 'center' ) {\n\t\tpopoverLeft = centerAlignment.popoverLeft;\n\t} else if ( chosenXAxis === 'left' ) {\n\t\tpopoverLeft = leftAlignment.popoverLeft;\n\t} else {\n\t\tpopoverLeft = rightAlignment.popoverLeft;\n\t}\n\n\treturn {\n\t\txAxis: chosenXAxis,\n\t\tpopoverLeft,\n\t\tcontentWidth,\n\t};\n}\n\n/**\n * Utility used to compute the popover position over the yAxis\n *\n * @param {Object} anchorRect Anchor Rect.\n * @param {Object} contentSize Content Size.\n * @param {string} yAxis Desired yAxis.\n * @param {boolean} expandOnMobile Whether to expand the popover on mobile or not.\n *\n * @return {Object} Popover xAxis position and constraints.\n */\nexport function computePopoverYAxisPosition( anchorRect, contentSize, yAxis ) {\n\tconst { height } = contentSize;\n\n\t// y axis alignment choices\n\tconst anchorMidPoint = anchorRect.top + ( anchorRect.height / 2 );\n\tconst middleAlignment = {\n\t\tpopoverTop: anchorMidPoint,\n\t\tcontentHeight: (\n\t\t\t( anchorMidPoint - ( height / 2 ) > 0 ? ( height / 2 ) : anchorMidPoint ) +\n\t\t\t( anchorMidPoint + ( height / 2 ) > window.innerHeight ? window.innerHeight - anchorMidPoint : ( height / 2 ) )\n\t\t),\n\t};\n\tconst topAlignment = {\n\t\tpopoverTop: anchorRect.top,\n\t\tcontentHeight: anchorRect.top - HEIGHT_OFFSET - height > 0 ? height : anchorRect.top - HEIGHT_OFFSET,\n\t};\n\tconst bottomAlignment = {\n\t\tpopoverTop: anchorRect.bottom,\n\t\tcontentHeight: anchorRect.bottom + HEIGHT_OFFSET + height > window.innerHeight ? window.innerHeight - HEIGHT_OFFSET - anchorRect.bottom : height,\n\t};\n\n\t// Choosing the y axis\n\tlet chosenYAxis;\n\tlet contentHeight = null;\n\tif ( yAxis === 'middle' && middleAlignment.contentHeight === height ) {\n\t\tchosenYAxis = 'middle';\n\t} else if ( yAxis === 'top' && topAlignment.contentHeight === height ) {\n\t\tchosenYAxis = 'top';\n\t} else if ( yAxis === 'bottom' && bottomAlignment.contentHeight === height ) {\n\t\tchosenYAxis = 'bottom';\n\t} else {\n\t\tchosenYAxis = topAlignment.contentHeight > bottomAlignment.contentHeight ? 'top' : 'bottom';\n\t\tconst chosenHeight = chosenYAxis === 'top' ? topAlignment.contentHeight : bottomAlignment.contentHeight;\n\t\tcontentHeight = chosenHeight !== height ? chosenHeight : null;\n\t}\n\n\tlet popoverTop;\n\tif ( chosenYAxis === 'middle' ) {\n\t\tpopoverTop = middleAlignment.popoverTop;\n\t} else if ( chosenYAxis === 'top' ) {\n\t\tpopoverTop = topAlignment.popoverTop;\n\t} else {\n\t\tpopoverTop = bottomAlignment.popoverTop;\n\t}\n\n\treturn {\n\t\tyAxis: chosenYAxis,\n\t\tpopoverTop,\n\t\tcontentHeight,\n\t};\n}\n\n/**\n * Utility used to compute the popover position and the content max width/height for a popover\n * given its anchor rect and its content size.\n *\n * @param {Object} anchorRect Anchor Rect.\n * @param {Object} contentSize Content Size.\n * @param {string} position Position.\n * @param {boolean} expandOnMobile Whether to expand the popover on mobile or not.\n *\n * @return {Object} Popover position and constraints.\n */\nexport function computePopoverPosition( anchorRect, contentSize, position = 'top', expandOnMobile = false ) {\n\tconst [ yAxis, xAxis = 'center' ] = position.split( ' ' );\n\n\tconst yAxisPosition = computePopoverYAxisPosition( anchorRect, contentSize, yAxis );\n\tconst xAxisPosition = computePopoverXAxisPosition( anchorRect, contentSize, xAxis, yAxisPosition.yAxis );\n\n\treturn {\n\t\tisMobile: isMobileViewport() && expandOnMobile,\n\t\t...xAxisPosition,\n\t\t...yAxisPosition,\n\t};\n}\n"]}
1
+ {"version":3,"sources":["/Users/jdesrosiers/Sites/git-wordpress-develop/src/wp-content/plugins/gutenberg/packages/components/src/popover/utils.js"],"names":["HEIGHT_OFFSET","isMobileViewport","window","innerWidth","isRTL","document","documentElement","dir","computePopoverXAxisPosition","anchorRect","contentSize","xAxis","chosenYAxis","width","anchorMidPoint","Math","round","left","centerAlignment","popoverLeft","contentWidth","leftAlignmentX","leftAlignment","rightAlignmentX","right","rightAlignment","chosenXAxis","chosenWidth","computePopoverYAxisPosition","yAxis","height","top","middleAlignment","popoverTop","contentHeight","innerHeight","topAlignment","bottomAlignment","bottom","chosenHeight","computePopoverPosition","position","expandOnMobile","split","yAxisPosition","xAxisPosition","isMobile"],"mappings":";;;;;;;;;;;;;;;AACA;;;AAGA,IAAMA,aAAa,GAAG,EAAtB,C,CAA0B;;AAC1B,IAAMC,gBAAgB,GAAG,SAAnBA,gBAAmB;AAAA,SAAMC,MAAM,CAACC,UAAP,GAAoB,GAA1B;AAAA,CAAzB;;AACA,IAAMC,KAAK,GAAG,SAARA,KAAQ;AAAA,SAAMC,QAAQ,CAACC,eAAT,CAAyBC,GAAzB,KAAiC,KAAvC;AAAA,CAAd;AAEA;;;;;;;;;;;;;AAWO,SAASC,2BAAT,CAAsCC,UAAt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AA;AAAA,MAC5FlB,KAD4F,kCACpF,QADoF;;AAG3G,MAAMiC,aAAa,GAAGhB,2BAA2B,CAAEnB,UAAF,EAAcC,WAAd,EAA2BmB,KAA3B,CAAjD;AACA,MAAMgB,aAAa,GAAGrC,2BAA2B,CAAEC,UAAF,EAAcC,WAAd,EAA2BC,KAA3B,EAAkCiC,aAAa,CAACf,KAAhD,CAAjD;AAEA;AACCiB,IAAAA,QAAQ,EAAE7C,gBAAgB,MAAMyC;AADjC,KAEIG,aAFJ,EAGID,aAHJ;AAKA","sourcesContent":["\n/**\n * Module constants\n */\nconst HEIGHT_OFFSET = 10; // used by the arrow and a bit of empty space\nconst isMobileViewport = () => window.innerWidth < 782;\nconst isRTL = () => document.documentElement.dir === 'rtl';\n\n/**\n * Utility used to compute the popover position over the xAxis\n *\n * @param {Object} anchorRect Anchor Rect.\n * @param {Object} contentSize Content Size.\n * @param {string} xAxis Desired xAxis.\n * @param {string} chosenYAxis yAxis to be used.\n * @param {boolean} expandOnMobile Whether to expand the popover on mobile or not.\n *\n * @return {Object} Popover xAxis position and constraints.\n */\nexport function computePopoverXAxisPosition( anchorRect, contentSize, xAxis, chosenYAxis ) {\n\tconst { width } = contentSize;\n\t// Correct xAxis for RTL support\n\tif ( xAxis === 'left' && isRTL() ) {\n\t\txAxis = 'right';\n\t} else if ( xAxis === 'right' && isRTL() ) {\n\t\txAxis = 'left';\n\t}\n\n\t// x axis alignment choices\n\tconst anchorMidPoint = Math.round( anchorRect.left + ( anchorRect.width / 2 ) );\n\tconst centerAlignment = {\n\t\tpopoverLeft: anchorMidPoint,\n\t\tcontentWidth: (\n\t\t\t( anchorMidPoint - ( width / 2 ) > 0 ? ( width / 2 ) : anchorMidPoint ) +\n\t\t\t( anchorMidPoint + ( width / 2 ) > window.innerWidth ? window.innerWidth - anchorMidPoint : ( width / 2 ) )\n\t\t),\n\t};\n\tconst leftAlignmentX = chosenYAxis === 'middle' ? anchorRect.left : anchorMidPoint;\n\tconst leftAlignment = {\n\t\tpopoverLeft: leftAlignmentX,\n\t\tcontentWidth: leftAlignmentX - width > 0 ? width : leftAlignmentX,\n\t};\n\tconst rightAlignmentX = chosenYAxis === 'middle' ? anchorRect.right : anchorMidPoint;\n\tconst rightAlignment = {\n\t\tpopoverLeft: rightAlignmentX,\n\t\tcontentWidth: rightAlignmentX + width > window.innerWidth ? window.innerWidth - rightAlignmentX : width,\n\t};\n\n\t// Choosing the x axis\n\tlet chosenXAxis;\n\tlet contentWidth = null;\n\tif ( xAxis === 'center' && centerAlignment.contentWidth === width ) {\n\t\tchosenXAxis = 'center';\n\t} else if ( xAxis === 'left' && leftAlignment.contentWidth === width ) {\n\t\tchosenXAxis = 'left';\n\t} else if ( xAxis === 'right' && rightAlignment.contentWidth === width ) {\n\t\tchosenXAxis = 'right';\n\t} else {\n\t\tchosenXAxis = leftAlignment.contentWidth > rightAlignment.contentWidth ? 'left' : 'right';\n\t\tconst chosenWidth = chosenXAxis === 'left' ? leftAlignment.contentWidth : rightAlignment.contentWidth;\n\t\tcontentWidth = chosenWidth !== width ? chosenWidth : null;\n\t}\n\n\tlet popoverLeft;\n\tif ( chosenXAxis === 'center' ) {\n\t\tpopoverLeft = centerAlignment.popoverLeft;\n\t} else if ( chosenXAxis === 'left' ) {\n\t\tpopoverLeft = leftAlignment.popoverLeft;\n\t} else {\n\t\tpopoverLeft = rightAlignment.popoverLeft;\n\t}\n\n\treturn {\n\t\txAxis: chosenXAxis,\n\t\tpopoverLeft,\n\t\tcontentWidth,\n\t};\n}\n\n/**\n * Utility used to compute the popover position over the yAxis\n *\n * @param {Object} anchorRect Anchor Rect.\n * @param {Object} contentSize Content Size.\n * @param {string} yAxis Desired yAxis.\n * @param {boolean} expandOnMobile Whether to expand the popover on mobile or not.\n *\n * @return {Object} Popover xAxis position and constraints.\n */\nexport function computePopoverYAxisPosition( anchorRect, contentSize, yAxis ) {\n\tconst { height } = contentSize;\n\n\t// y axis alignment choices\n\tconst anchorMidPoint = anchorRect.top + ( anchorRect.height / 2 );\n\tconst middleAlignment = {\n\t\tpopoverTop: anchorMidPoint,\n\t\tcontentHeight: (\n\t\t\t( anchorMidPoint - ( height / 2 ) > 0 ? ( height / 2 ) : anchorMidPoint ) +\n\t\t\t( anchorMidPoint + ( height / 2 ) > window.innerHeight ? window.innerHeight - anchorMidPoint : ( height / 2 ) )\n\t\t),\n\t};\n\tconst topAlignment = {\n\t\tpopoverTop: anchorRect.top,\n\t\tcontentHeight: anchorRect.top - HEIGHT_OFFSET - height > 0 ? height : anchorRect.top - HEIGHT_OFFSET,\n\t};\n\tconst bottomAlignment = {\n\t\tpopoverTop: anchorRect.bottom,\n\t\tcontentHeight: anchorRect.bottom + HEIGHT_OFFSET + height > window.innerHeight ? window.innerHeight - HEIGHT_OFFSET - anchorRect.bottom : height,\n\t};\n\n\t// Choosing the y axis\n\tlet chosenYAxis;\n\tlet contentHeight = null;\n\tif ( yAxis === 'middle' && middleAlignment.contentHeight === height ) {\n\t\tchosenYAxis = 'middle';\n\t} else if ( yAxis === 'top' && topAlignment.contentHeight === height ) {\n\t\tchosenYAxis = 'top';\n\t} else if ( yAxis === 'bottom' && bottomAlignment.contentHeight === height ) {\n\t\tchosenYAxis = 'bottom';\n\t} else {\n\t\tchosenYAxis = topAlignment.contentHeight > bottomAlignment.contentHeight ? 'top' : 'bottom';\n\t\tconst chosenHeight = chosenYAxis === 'top' ? topAlignment.contentHeight : bottomAlignment.contentHeight;\n\t\tcontentHeight = chosenHeight !== height ? chosenHeight : null;\n\t}\n\n\tlet popoverTop;\n\tif ( chosenYAxis === 'middle' ) {\n\t\tpopoverTop = middleAlignment.popoverTop;\n\t} else if ( chosenYAxis === 'top' ) {\n\t\tpopoverTop = topAlignment.popoverTop;\n\t} else {\n\t\tpopoverTop = bottomAlignment.popoverTop;\n\t}\n\n\treturn {\n\t\tyAxis: chosenYAxis,\n\t\tpopoverTop,\n\t\tcontentHeight,\n\t};\n}\n\n/**\n * Utility used to compute the popover position and the content max width/height for a popover\n * given its anchor rect and its content size.\n *\n * @param {Object} anchorRect Anchor Rect.\n * @param {Object} contentSize Content Size.\n * @param {string} position Position.\n * @param {boolean} expandOnMobile Whether to expand the popover on mobile or not.\n *\n * @return {Object} Popover position and constraints.\n */\nexport function computePopoverPosition( anchorRect, contentSize, position = 'top', expandOnMobile = false ) {\n\tconst [ yAxis, xAxis = 'center' ] = position.split( ' ' );\n\n\tconst yAxisPosition = computePopoverYAxisPosition( anchorRect, contentSize, yAxis );\n\tconst xAxisPosition = computePopoverXAxisPosition( anchorRect, contentSize, xAxis, yAxisPosition.yAxis );\n\n\treturn {\n\t\tisMobile: isMobileViewport() && expandOnMobile,\n\t\t...xAxisPosition,\n\t\t...yAxisPosition,\n\t};\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/jdesrosiers/Sites/gutenberg-security/5.1/packages/components/src/primitives/index.js"],"names":[],"mappings":";;;;;;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA","sourcesContent":["export * from './svg';\n"]}
1
+ {"version":3,"sources":["/Users/jdesrosiers/Sites/git-wordpress-develop/src/wp-content/plugins/gutenberg/packages/components/src/primitives/index.js"],"names":[],"mappings":";;;;;;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA","sourcesContent":["export * from './svg';\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/jdesrosiers/Sites/gutenberg-security/5.1/packages/components/src/primitives/svg/index.js"],"names":["Circle","props","G","Path","Polygon","Rect","SVG","appliedProps","role","focusable"],"mappings":";;;;;;;;;;;AAGA;;AAHA;;;AAKO,IAAMA,MAAM,GAAG,SAATA,MAAS,CAAEC,KAAF;AAAA,SAAa,4BAAe,QAAf,EAAyBA,KAAzB,CAAb;AAAA,CAAf;;;;AACA,IAAMC,CAAC,GAAG,SAAJA,CAAI,CAAED,KAAF;AAAA,SAAa,4BAAe,GAAf,EAAoBA,KAApB,CAAb;AAAA,CAAV;;;;AACA,IAAME,IAAI,GAAG,SAAPA,IAAO,CAAEF,KAAF;AAAA,SAAa,4BAAe,MAAf,EAAuBA,KAAvB,CAAb;AAAA,CAAb;;;;AACA,IAAMG,OAAO,GAAG,SAAVA,OAAU,CAAEH,KAAF;AAAA,SAAa,4BAAe,SAAf,EAA0BA,KAA1B,CAAb;AAAA,CAAhB;;;;AACA,IAAMI,IAAI,GAAG,SAAPA,IAAO,CAAEJ,KAAF;AAAA,SAAa,4BAAe,MAAf,EAAuBA,KAAvB,CAAb;AAAA,CAAb;;;;AAEA,IAAMK,GAAG,GAAG,SAANA,GAAM,CAAEL,KAAF,EAAa;AAC/B,MAAMM,YAAY,mCACdN,KADc;AAEjBO,IAAAA,IAAI,EAAE,KAFW;AAGjB,mBAAe,MAHE;AAIjBC,IAAAA,SAAS,EAAE;AAJM,IAAlB,CAD+B,CAQ/B;AACA;;AACA,SAAO,mCAAUF,YAAV,CAAP;AACA,CAXM","sourcesContent":["/**\n * External dependencies\n */\nimport { createElement } from '@wordpress/element';\n\nexport const Circle = ( props ) => createElement( 'circle', props );\nexport const G = ( props ) => createElement( 'g', props );\nexport const Path = ( props ) => createElement( 'path', props );\nexport const Polygon = ( props ) => createElement( 'polygon', props );\nexport const Rect = ( props ) => createElement( 'rect', props );\n\nexport const SVG = ( props ) => {\n\tconst appliedProps = {\n\t\t...props,\n\t\trole: 'img',\n\t\t'aria-hidden': 'true',\n\t\tfocusable: 'false',\n\t};\n\n\t// Disable reason: We need to have a way to render HTML tag for web.\n\t// eslint-disable-next-line react/forbid-elements\n\treturn <svg { ...appliedProps } />;\n};\n"]}
1
+ {"version":3,"sources":["/Users/jdesrosiers/Sites/git-wordpress-develop/src/wp-content/plugins/gutenberg/packages/components/src/primitives/svg/index.js"],"names":["Circle","props","G","Path","Polygon","Rect","SVG","appliedProps","role","focusable"],"mappings":";;;;;;;;;;;AAGA;;AAHA;;;AAKO,IAAMA,MAAM,GAAG,SAATA,MAAS,CAAEC,KAAF;AAAA,SAAa,4BAAe,QAAf,EAAyBA,KAAzB,CAAb;AAAA,CAAf;;;;AACA,IAAMC,CAAC,GAAG,SAAJA,CAAI,CAAED,KAAF;AAAA,SAAa,4BAAe,GAAf,EAAoBA,KAApB,CAAb;AAAA,CAAV;;;;AACA,IAAME,IAAI,GAAG,SAAPA,IAAO,CAAEF,KAAF;AAAA,SAAa,4BAAe,MAAf,EAAuBA,KAAvB,CAAb;AAAA,CAAb;;;;AACA,IAAMG,OAAO,GAAG,SAAVA,OAAU,CAAEH,KAAF;AAAA,SAAa,4BAAe,SAAf,EAA0BA,KAA1B,CAAb;AAAA,CAAhB;;;;AACA,IAAMI,IAAI,GAAG,SAAPA,IAAO,CAAEJ,KAAF;AAAA,SAAa,4BAAe,MAAf,EAAuBA,KAAvB,CAAb;AAAA,CAAb;;;;AAEA,IAAMK,GAAG,GAAG,SAANA,GAAM,CAAEL,KAAF,EAAa;AAC/B,MAAMM,YAAY,mCACdN,KADc;AAEjBO,IAAAA,IAAI,EAAE,KAFW;AAGjB,mBAAe,MAHE;AAIjBC,IAAAA,SAAS,EAAE;AAJM,IAAlB,CAD+B,CAQ/B;AACA;;AACA,SAAO,mCAAUF,YAAV,CAAP;AACA,CAXM","sourcesContent":["/**\n * External dependencies\n */\nimport { createElement } from '@wordpress/element';\n\nexport const Circle = ( props ) => createElement( 'circle', props );\nexport const G = ( props ) => createElement( 'g', props );\nexport const Path = ( props ) => createElement( 'path', props );\nexport const Polygon = ( props ) => createElement( 'polygon', props );\nexport const Rect = ( props ) => createElement( 'rect', props );\n\nexport const SVG = ( props ) => {\n\tconst appliedProps = {\n\t\t...props,\n\t\trole: 'img',\n\t\t'aria-hidden': 'true',\n\t\tfocusable: 'false',\n\t};\n\n\t// Disable reason: We need to have a way to render HTML tag for web.\n\t// eslint-disable-next-line react/forbid-elements\n\treturn <svg { ...appliedProps } />;\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/jdesrosiers/Sites/gutenberg-security/5.1/packages/components/src/primitives/svg/index.native.js"],"names":["SVG","props","stylesFromClasses","className","split","map","element","styles","filter","Boolean","styleValues","Object","assign","style","safeProps","color"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA;;AAKA;;AARA;;;;AAKA;;;AAaO,IAAMA,GAAG,GAAG,SAANA,GAAM,CAAEC,KAAF,EAAa;AAC/B,MAAMC,iBAAiB,GAAG,CAAED,KAAK,CAACE,SAAN,IAAmB,EAArB,EAA0BC,KAA1B,CAAiC,GAAjC,EAAuCC,GAAvC,CAA4C,UAAEC,OAAF;AAAA,WAAeC,eAAQD,OAAR,CAAf;AAAA,GAA5C,EAA+EE,MAA/E,CAAuFC,OAAvF,CAA1B;AACA,MAAMC,WAAW,GAAGC,MAAM,CAACC,MAAP,OAAAD,MAAM,GAAS,EAAT,EAAaV,KAAK,CAACY,KAAnB,0CAA6BX,iBAA7B,GAA1B;AACA,MAAMY,SAAS,mCAAQb,KAAR;AAAeY,IAAAA,KAAK,EAAEH;AAAtB,IAAf;AAEA,SACC,4BAAC,mBAAD,CACC;AADD;AAEC,IAAA,GAAG,EAAGI,SAAS,CAACD,KAAV,CAAgBE,KAFvB;AAGC,IAAA,MAAM,EAAC,MAHR;AAIC,IAAA,KAAK,EAAC;AAJP,KAKMD,SALN,EADD;AASA,CAdM","sourcesContent":["/**\n * External dependencies\n */\nimport { Svg } from 'react-native-svg';\n\n/**\n * Internal dependencies\n */\nimport styles from './style.scss';\n\nexport {\n\tCircle,\n\tG,\n\tPath,\n\tPolygon,\n\tRect,\n} from 'react-native-svg';\n\nexport const SVG = ( props ) => {\n\tconst stylesFromClasses = ( props.className || '' ).split( ' ' ).map( ( element ) => styles[ element ] ).filter( Boolean );\n\tconst styleValues = Object.assign( {}, props.style, ...stylesFromClasses );\n\tconst safeProps = { ...props, style: styleValues };\n\n\treturn (\n\t\t<Svg\n\t\t\t//We want to re-render when style color is changed\n\t\t\tkey={ safeProps.style.color }\n\t\t\theight=\"100%\"\n\t\t\twidth=\"100%\"\n\t\t\t{ ...safeProps }\n\t\t/>\n\t);\n};\n\n"]}
1
+ {"version":3,"sources":["/Users/jdesrosiers/Sites/git-wordpress-develop/src/wp-content/plugins/gutenberg/packages/components/src/primitives/svg/index.native.js"],"names":["SVG","props","stylesFromClasses","className","split","map","element","styles","filter","Boolean","styleValues","Object","assign","style","safeProps","color"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA;;AAKA;;AARA;;;;AAKA;;;AAaO,IAAMA,GAAG,GAAG,SAANA,GAAM,CAAEC,KAAF,EAAa;AAC/B,MAAMC,iBAAiB,GAAG,CAAED,KAAK,CAACE,SAAN,IAAmB,EAArB,EAA0BC,KAA1B,CAAiC,GAAjC,EAAuCC,GAAvC,CAA4C,UAAEC,OAAF;AAAA,WAAeC,eAAQD,OAAR,CAAf;AAAA,GAA5C,EAA+EE,MAA/E,CAAuFC,OAAvF,CAA1B;AACA,MAAMC,WAAW,GAAGC,MAAM,CAACC,MAAP,OAAAD,MAAM,GAAS,EAAT,EAAaV,KAAK,CAACY,KAAnB,0CAA6BX,iBAA7B,GAA1B;AACA,MAAMY,SAAS,mCAAQb,KAAR;AAAeY,IAAAA,KAAK,EAAEH;AAAtB,IAAf;AAEA,SACC,4BAAC,mBAAD,CACC;AADD;AAEC,IAAA,GAAG,EAAGI,SAAS,CAACD,KAAV,CAAgBE,KAFvB;AAGC,IAAA,MAAM,EAAC,MAHR;AAIC,IAAA,KAAK,EAAC;AAJP,KAKMD,SALN,EADD;AASA,CAdM","sourcesContent":["/**\n * External dependencies\n */\nimport { Svg } from 'react-native-svg';\n\n/**\n * Internal dependencies\n */\nimport styles from './style.scss';\n\nexport {\n\tCircle,\n\tG,\n\tPath,\n\tPolygon,\n\tRect,\n} from 'react-native-svg';\n\nexport const SVG = ( props ) => {\n\tconst stylesFromClasses = ( props.className || '' ).split( ' ' ).map( ( element ) => styles[ element ] ).filter( Boolean );\n\tconst styleValues = Object.assign( {}, props.style, ...stylesFromClasses );\n\tconst safeProps = { ...props, style: styleValues };\n\n\treturn (\n\t\t<Svg\n\t\t\t//We want to re-render when style color is changed\n\t\t\tkey={ safeProps.style.color }\n\t\t\theight=\"100%\"\n\t\t\twidth=\"100%\"\n\t\t\t{ ...safeProps }\n\t\t/>\n\t);\n};\n\n"]}