@wordpress/components 25.13.0 → 25.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (224) hide show
  1. package/CHANGELOG.md +38 -1
  2. package/build/border-control/border-control-dropdown/component.js +4 -2
  3. package/build/border-control/border-control-dropdown/component.js.map +1 -1
  4. package/build/border-control/border-control-dropdown/hook.js +3 -2
  5. package/build/border-control/border-control-dropdown/hook.js.map +1 -1
  6. package/build/border-control/styles.js +17 -17
  7. package/build/border-control/styles.js.map +1 -1
  8. package/build/checkbox-control/index.js +1 -1
  9. package/build/checkbox-control/index.js.map +1 -1
  10. package/build/checkbox-control/types.js.map +1 -1
  11. package/build/date-time/time/timezone.js +11 -2
  12. package/build/date-time/time/timezone.js.map +1 -1
  13. package/build/dimension-control/index.js +2 -0
  14. package/build/dimension-control/index.js.map +1 -1
  15. package/build/dimension-control/types.js.map +1 -1
  16. package/build/dropdown-menu-v2-ariakit/styles.js +14 -14
  17. package/build/dropdown-menu-v2-ariakit/styles.js.map +1 -1
  18. package/build/focal-point-picker/controls.js +5 -1
  19. package/build/focal-point-picker/controls.js.map +1 -1
  20. package/build/focal-point-picker/index.js +2 -0
  21. package/build/focal-point-picker/index.js.map +1 -1
  22. package/build/focal-point-picker/styles/focal-point-picker-style.js +15 -15
  23. package/build/focal-point-picker/styles/focal-point-picker-style.js.map +1 -1
  24. package/build/focal-point-picker/types.js.map +1 -1
  25. package/build/font-size-picker/font-size-picker-select.js +2 -0
  26. package/build/font-size-picker/font-size-picker-select.js.map +1 -1
  27. package/build/font-size-picker/font-size-picker-toggle-group.js +2 -0
  28. package/build/font-size-picker/font-size-picker-toggle-group.js.map +1 -1
  29. package/build/font-size-picker/index.js +6 -1
  30. package/build/font-size-picker/index.js.map +1 -1
  31. package/build/font-size-picker/types.js.map +1 -1
  32. package/build/index.native.js +0 -16
  33. package/build/index.native.js.map +1 -1
  34. package/build/mobile/global-styles-context/utils.native.js +13 -0
  35. package/build/mobile/global-styles-context/utils.native.js.map +1 -1
  36. package/build/palette-edit/index.js +21 -1
  37. package/build/palette-edit/index.js.map +1 -1
  38. package/build/query-controls/author-select.js +3 -1
  39. package/build/query-controls/author-select.js.map +1 -1
  40. package/build/query-controls/category-select.js +3 -1
  41. package/build/query-controls/category-select.js.map +1 -1
  42. package/build/query-controls/index.js +6 -1
  43. package/build/query-controls/index.js.map +1 -1
  44. package/build/query-controls/types.js.map +1 -1
  45. package/build/tabs/index.js +18 -1
  46. package/build/tabs/index.js.map +1 -1
  47. package/build/tabs/tab.js +2 -2
  48. package/build/tabs/tab.js.map +1 -1
  49. package/build/tabs/tabpanel.js +3 -2
  50. package/build/tabs/tabpanel.js.map +1 -1
  51. package/build/tabs/types.js.map +1 -1
  52. package/build/toggle-group-control/toggle-group-control/utils.js +17 -17
  53. package/build/toggle-group-control/toggle-group-control/utils.js.map +1 -1
  54. package/build/tools-panel/tools-panel-item/hook.js +11 -11
  55. package/build/tools-panel/tools-panel-item/hook.js.map +1 -1
  56. package/build-module/border-control/border-control-dropdown/component.js +4 -2
  57. package/build-module/border-control/border-control-dropdown/component.js.map +1 -1
  58. package/build-module/border-control/border-control-dropdown/hook.js +3 -2
  59. package/build-module/border-control/border-control-dropdown/hook.js.map +1 -1
  60. package/build-module/border-control/styles.js +17 -17
  61. package/build-module/border-control/styles.js.map +1 -1
  62. package/build-module/checkbox-control/index.js +1 -1
  63. package/build-module/checkbox-control/index.js.map +1 -1
  64. package/build-module/checkbox-control/types.js.map +1 -1
  65. package/build-module/date-time/time/timezone.js +11 -2
  66. package/build-module/date-time/time/timezone.js.map +1 -1
  67. package/build-module/dimension-control/index.js +2 -0
  68. package/build-module/dimension-control/index.js.map +1 -1
  69. package/build-module/dimension-control/types.js.map +1 -1
  70. package/build-module/dropdown-menu-v2-ariakit/styles.js +14 -14
  71. package/build-module/dropdown-menu-v2-ariakit/styles.js.map +1 -1
  72. package/build-module/focal-point-picker/controls.js +5 -1
  73. package/build-module/focal-point-picker/controls.js.map +1 -1
  74. package/build-module/focal-point-picker/index.js +2 -0
  75. package/build-module/focal-point-picker/index.js.map +1 -1
  76. package/build-module/focal-point-picker/styles/focal-point-picker-style.js +15 -15
  77. package/build-module/focal-point-picker/styles/focal-point-picker-style.js.map +1 -1
  78. package/build-module/focal-point-picker/types.js.map +1 -1
  79. package/build-module/font-size-picker/font-size-picker-select.js +2 -0
  80. package/build-module/font-size-picker/font-size-picker-select.js.map +1 -1
  81. package/build-module/font-size-picker/font-size-picker-toggle-group.js +2 -0
  82. package/build-module/font-size-picker/font-size-picker-toggle-group.js.map +1 -1
  83. package/build-module/font-size-picker/index.js +6 -1
  84. package/build-module/font-size-picker/index.js.map +1 -1
  85. package/build-module/font-size-picker/types.js.map +1 -1
  86. package/build-module/index.native.js +0 -2
  87. package/build-module/index.native.js.map +1 -1
  88. package/build-module/mobile/global-styles-context/utils.native.js +13 -0
  89. package/build-module/mobile/global-styles-context/utils.native.js.map +1 -1
  90. package/build-module/palette-edit/index.js +20 -3
  91. package/build-module/palette-edit/index.js.map +1 -1
  92. package/build-module/query-controls/author-select.js +3 -1
  93. package/build-module/query-controls/author-select.js.map +1 -1
  94. package/build-module/query-controls/category-select.js +3 -1
  95. package/build-module/query-controls/category-select.js.map +1 -1
  96. package/build-module/query-controls/index.js +6 -1
  97. package/build-module/query-controls/index.js.map +1 -1
  98. package/build-module/query-controls/types.js.map +1 -1
  99. package/build-module/tabs/index.js +18 -1
  100. package/build-module/tabs/index.js.map +1 -1
  101. package/build-module/tabs/tab.js +2 -2
  102. package/build-module/tabs/tab.js.map +1 -1
  103. package/build-module/tabs/tabpanel.js +3 -2
  104. package/build-module/tabs/tabpanel.js.map +1 -1
  105. package/build-module/tabs/types.js.map +1 -1
  106. package/build-module/toggle-group-control/toggle-group-control/utils.js +17 -17
  107. package/build-module/toggle-group-control/toggle-group-control/utils.js.map +1 -1
  108. package/build-module/tools-panel/tools-panel-item/hook.js +11 -11
  109. package/build-module/tools-panel/tools-panel-item/hook.js.map +1 -1
  110. package/build-style/style-rtl.css +1 -1
  111. package/build-style/style.css +1 -1
  112. package/build-types/border-control/border-control-dropdown/component.d.ts.map +1 -1
  113. package/build-types/border-control/border-control-dropdown/hook.d.ts +1 -0
  114. package/build-types/border-control/border-control-dropdown/hook.d.ts.map +1 -1
  115. package/build-types/border-control/styles.d.ts +1 -1
  116. package/build-types/border-control/styles.d.ts.map +1 -1
  117. package/build-types/checkbox-control/index.d.ts.map +1 -1
  118. package/build-types/checkbox-control/types.d.ts +3 -2
  119. package/build-types/checkbox-control/types.d.ts.map +1 -1
  120. package/build-types/date-time/time/timezone.d.ts.map +1 -1
  121. package/build-types/dimension-control/index.d.ts.map +1 -1
  122. package/build-types/dimension-control/types.d.ts +6 -0
  123. package/build-types/dimension-control/types.d.ts.map +1 -1
  124. package/build-types/dropdown-menu-v2-ariakit/styles.d.ts.map +1 -1
  125. package/build-types/focal-point-picker/controls.d.ts +1 -1
  126. package/build-types/focal-point-picker/controls.d.ts.map +1 -1
  127. package/build-types/focal-point-picker/index.d.ts +1 -1
  128. package/build-types/focal-point-picker/index.d.ts.map +1 -1
  129. package/build-types/focal-point-picker/stories/index.story.d.ts +8 -4
  130. package/build-types/focal-point-picker/stories/index.story.d.ts.map +1 -1
  131. package/build-types/focal-point-picker/types.d.ts +7 -0
  132. package/build-types/focal-point-picker/types.d.ts.map +1 -1
  133. package/build-types/font-size-picker/font-size-picker-select.d.ts.map +1 -1
  134. package/build-types/font-size-picker/font-size-picker-toggle-group.d.ts.map +1 -1
  135. package/build-types/font-size-picker/index.d.ts.map +1 -1
  136. package/build-types/font-size-picker/types.d.ts +8 -1
  137. package/build-types/font-size-picker/types.d.ts.map +1 -1
  138. package/build-types/palette-edit/index.d.ts +6 -1
  139. package/build-types/palette-edit/index.d.ts.map +1 -1
  140. package/build-types/query-controls/author-select.d.ts +1 -1
  141. package/build-types/query-controls/author-select.d.ts.map +1 -1
  142. package/build-types/query-controls/category-select.d.ts +1 -1
  143. package/build-types/query-controls/category-select.d.ts.map +1 -1
  144. package/build-types/query-controls/index.d.ts +1 -1
  145. package/build-types/query-controls/index.d.ts.map +1 -1
  146. package/build-types/query-controls/types.d.ts +9 -0
  147. package/build-types/query-controls/types.d.ts.map +1 -1
  148. package/build-types/tabs/index.d.ts +2 -2
  149. package/build-types/tabs/index.d.ts.map +1 -1
  150. package/build-types/tabs/tab.d.ts +2 -1
  151. package/build-types/tabs/tab.d.ts.map +1 -1
  152. package/build-types/tabs/tabpanel.d.ts +2 -1
  153. package/build-types/tabs/tabpanel.d.ts.map +1 -1
  154. package/build-types/tabs/types.d.ts +8 -3
  155. package/build-types/tabs/types.d.ts.map +1 -1
  156. package/build-types/toggle-group-control/toggle-group-control/utils.d.ts.map +1 -1
  157. package/build-types/tools-panel/tools-panel-item/hook.d.ts.map +1 -1
  158. package/package.json +19 -19
  159. package/src/border-control/border-control-dropdown/component.tsx +3 -1
  160. package/src/border-control/border-control-dropdown/hook.ts +3 -2
  161. package/src/border-control/styles.ts +2 -9
  162. package/src/checkbox-control/README.md +2 -1
  163. package/src/checkbox-control/index.tsx +8 -6
  164. package/src/checkbox-control/test/__snapshots__/index.tsx.snap +3 -8
  165. package/src/checkbox-control/test/index.tsx +7 -0
  166. package/src/checkbox-control/types.ts +3 -2
  167. package/src/custom-select-control/test/index.js +367 -35
  168. package/src/date-time/time/timezone.tsx +15 -3
  169. package/src/dimension-control/index.tsx +2 -0
  170. package/src/dimension-control/test/__snapshots__/index.test.js.snap +2 -2
  171. package/src/dimension-control/types.ts +6 -0
  172. package/src/dropdown-menu-v2-ariakit/styles.ts +12 -0
  173. package/src/focal-point-picker/controls.tsx +4 -0
  174. package/src/focal-point-picker/index.tsx +2 -0
  175. package/src/focal-point-picker/styles/focal-point-picker-style.ts +1 -1
  176. package/src/focal-point-picker/types.ts +7 -0
  177. package/src/font-size-picker/font-size-picker-select.tsx +2 -0
  178. package/src/font-size-picker/font-size-picker-toggle-group.tsx +9 -1
  179. package/src/font-size-picker/index.tsx +11 -3
  180. package/src/font-size-picker/types.ts +8 -1
  181. package/src/form-toggle/style.scss +4 -2
  182. package/src/index.native.js +0 -2
  183. package/src/mobile/global-styles-context/test/utils.native.js +22 -0
  184. package/src/mobile/global-styles-context/utils.native.js +14 -0
  185. package/src/mobile/link-settings/style.native.scss +0 -17
  186. package/src/palette-edit/index.tsx +22 -8
  187. package/src/palette-edit/style.scss +2 -2
  188. package/src/palette-edit/test/index.tsx +75 -1
  189. package/src/query-controls/author-select.tsx +2 -0
  190. package/src/query-controls/category-select.tsx +2 -0
  191. package/src/query-controls/index.tsx +6 -1
  192. package/src/query-controls/types.ts +9 -0
  193. package/src/search-control/README.md +2 -0
  194. package/src/spinner/README.md +2 -0
  195. package/src/tabs/README.md +4 -4
  196. package/src/tabs/index.tsx +22 -1
  197. package/src/tabs/stories/index.story.tsx +48 -48
  198. package/src/tabs/tab.tsx +3 -3
  199. package/src/tabs/tabpanel.tsx +7 -3
  200. package/src/tabs/test/index.tsx +180 -106
  201. package/src/tabs/types.ts +8 -3
  202. package/src/toggle-group-control/test/index.tsx +54 -1
  203. package/src/toggle-group-control/toggle-group-control/utils.ts +15 -20
  204. package/src/tools-panel/tools-panel-item/hook.ts +10 -21
  205. package/tsconfig.tsbuildinfo +1 -1
  206. package/build/mobile/inserter-button/index.native.js +0 -98
  207. package/build/mobile/inserter-button/index.native.js.map +0 -1
  208. package/build/mobile/inserter-button/sparkles.js +0 -23
  209. package/build/mobile/inserter-button/sparkles.js.map +0 -1
  210. package/build/mobile/link-settings/image-link-destinations-screen.native.js +0 -119
  211. package/build/mobile/link-settings/image-link-destinations-screen.native.js.map +0 -1
  212. package/build-module/mobile/inserter-button/index.native.js +0 -89
  213. package/build-module/mobile/inserter-button/index.native.js.map +0 -1
  214. package/build-module/mobile/inserter-button/sparkles.js +0 -15
  215. package/build-module/mobile/inserter-button/sparkles.js.map +0 -1
  216. package/build-module/mobile/link-settings/image-link-destinations-screen.native.js +0 -110
  217. package/build-module/mobile/link-settings/image-link-destinations-screen.native.js.map +0 -1
  218. package/build-types/mobile/inserter-button/sparkles.d.ts +0 -3
  219. package/build-types/mobile/inserter-button/sparkles.d.ts.map +0 -1
  220. package/src/mobile/inserter-button/README.md +0 -62
  221. package/src/mobile/inserter-button/index.native.js +0 -116
  222. package/src/mobile/inserter-button/sparkles.js +0 -15
  223. package/src/mobile/inserter-button/style.native.scss +0 -72
  224. package/src/mobile/link-settings/image-link-destinations-screen.native.js +0 -152
@@ -1,98 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.default = void 0;
8
- var _react = require("react");
9
- var _reactNative = require("react-native");
10
- var _element = require("@wordpress/element");
11
- var _components = require("@wordpress/components");
12
- var _compose = require("@wordpress/compose");
13
- var _i18n = require("@wordpress/i18n");
14
- var _blockEditor = require("@wordpress/block-editor");
15
- var _style = _interopRequireDefault(require("./style.scss"));
16
- var _sparkles = _interopRequireDefault(require("./sparkles"));
17
- /**
18
- * External dependencies
19
- */
20
-
21
- /**
22
- * WordPress dependencies
23
- */
24
-
25
- /**
26
- * Internal dependencies
27
- */
28
-
29
- class MenuItem extends _element.Component {
30
- constructor() {
31
- super(...arguments);
32
- this.onPress = this.onPress.bind(this);
33
- }
34
- onPress() {
35
- const {
36
- onSelect,
37
- item
38
- } = this.props;
39
- onSelect(item);
40
- }
41
- render() {
42
- const {
43
- getStylesFromColorScheme,
44
- item,
45
- itemWidth,
46
- maxWidth
47
- } = this.props;
48
- const modalIconWrapperStyle = getStylesFromColorScheme(_style.default.modalIconWrapper, _style.default.modalIconWrapperDark);
49
- const modalIconStyle = _style.default.modalIcon;
50
- const modalItemLabelStyle = getStylesFromColorScheme(_style.default.modalItemLabel, _style.default.modalItemLabelDark);
51
- const clipboardBlockStyles = getStylesFromColorScheme(_style.default.clipboardBlock, _style.default.clipboardBlockDark);
52
- const isClipboardBlock = item.id === 'clipboard';
53
- const blockTitle = isClipboardBlock ? (0, _i18n.__)('Copied block') : item.title;
54
- const blockIsNew = item.isNew === true;
55
- const accessibilityLabelFormat = blockIsNew ?
56
- // translators: Newly available block name. %s: The localized block name
57
- (0, _i18n.__)('%s block, newly available') :
58
- // translators: Block name. %s: The localized block name
59
- (0, _i18n.__)('%s block');
60
- const accessibilityLabel = (0, _i18n.sprintf)(accessibilityLabelFormat, item.title);
61
- return (0, _react.createElement)(_reactNative.TouchableHighlight, {
62
- style: [_style.default.touchableArea, item.isDisabled ? _style.default.disabled : null],
63
- underlayColor: "transparent",
64
- activeOpacity: 0.5,
65
- accessibilityRole: "button",
66
- accessibilityLabel: accessibilityLabel,
67
- onPress: this.onPress,
68
- disabled: item.isDisabled
69
- }, (0, _react.createElement)(_reactNative.View, {
70
- style: [_style.default.modalItem, {
71
- width: maxWidth
72
- }]
73
- }, (0, _react.createElement)(_reactNative.View, {
74
- style: [modalIconWrapperStyle, itemWidth && {
75
- width: itemWidth
76
- }, isClipboardBlock && clipboardBlockStyles]
77
- }, blockIsNew && (0, _react.createElement)(_components.Icon, {
78
- icon: _sparkles.default,
79
- style: _style.default.newIndicator
80
- }), (0, _react.createElement)(_reactNative.View, {
81
- style: modalIconStyle
82
- }, (0, _react.createElement)(_blockEditor.BlockIcon, {
83
- icon: item.icon,
84
- size: modalIconStyle.width
85
- }))), (0, _react.createElement)(_reactNative.Text, {
86
- numberOfLines: 3,
87
- style: modalItemLabelStyle
88
- }, blockTitle)));
89
- }
90
- }
91
- const InserterButton = (0, _compose.withPreferredColorScheme)(MenuItem);
92
- InserterButton.Styles = {
93
- modalItem: _style.default.modalItem,
94
- modalIconWrapper: _style.default.modalIconWrapper
95
- };
96
- var _default = InserterButton;
97
- exports.default = _default;
98
- //# sourceMappingURL=index.native.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_reactNative","require","_element","_components","_compose","_i18n","_blockEditor","_style","_interopRequireDefault","_sparkles","MenuItem","Component","constructor","arguments","onPress","bind","onSelect","item","props","render","getStylesFromColorScheme","itemWidth","maxWidth","modalIconWrapperStyle","styles","modalIconWrapper","modalIconWrapperDark","modalIconStyle","modalIcon","modalItemLabelStyle","modalItemLabel","modalItemLabelDark","clipboardBlockStyles","clipboardBlock","clipboardBlockDark","isClipboardBlock","id","blockTitle","__","title","blockIsNew","isNew","accessibilityLabelFormat","accessibilityLabel","sprintf","_react","createElement","TouchableHighlight","style","touchableArea","isDisabled","disabled","underlayColor","activeOpacity","accessibilityRole","View","modalItem","width","Icon","icon","sparkles","newIndicator","BlockIcon","size","Text","numberOfLines","InserterButton","withPreferredColorScheme","Styles","_default","exports","default"],"sources":["@wordpress/components/src/mobile/inserter-button/index.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { View, TouchableHighlight, Text } from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport { Icon } from '@wordpress/components';\nimport { withPreferredColorScheme } from '@wordpress/compose';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { BlockIcon } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport styles from './style.scss';\nimport sparkles from './sparkles';\nclass MenuItem extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\n\t\tthis.onPress = this.onPress.bind( this );\n\t}\n\n\tonPress() {\n\t\tconst { onSelect, item } = this.props;\n\t\tonSelect( item );\n\t}\n\n\trender() {\n\t\tconst { getStylesFromColorScheme, item, itemWidth, maxWidth } =\n\t\t\tthis.props;\n\n\t\tconst modalIconWrapperStyle = getStylesFromColorScheme(\n\t\t\tstyles.modalIconWrapper,\n\t\t\tstyles.modalIconWrapperDark\n\t\t);\n\t\tconst modalIconStyle = styles.modalIcon;\n\t\tconst modalItemLabelStyle = getStylesFromColorScheme(\n\t\t\tstyles.modalItemLabel,\n\t\t\tstyles.modalItemLabelDark\n\t\t);\n\n\t\tconst clipboardBlockStyles = getStylesFromColorScheme(\n\t\t\tstyles.clipboardBlock,\n\t\t\tstyles.clipboardBlockDark\n\t\t);\n\n\t\tconst isClipboardBlock = item.id === 'clipboard';\n\t\tconst blockTitle = isClipboardBlock ? __( 'Copied block' ) : item.title;\n\t\tconst blockIsNew = item.isNew === true;\n\t\tconst accessibilityLabelFormat = blockIsNew\n\t\t\t? // translators: Newly available block name. %s: The localized block name\n\t\t\t __( '%s block, newly available' )\n\t\t\t: // translators: Block name. %s: The localized block name\n\t\t\t __( '%s block' );\n\t\tconst accessibilityLabel = sprintf(\n\t\t\taccessibilityLabelFormat,\n\t\t\titem.title\n\t\t);\n\n\t\treturn (\n\t\t\t<TouchableHighlight\n\t\t\t\tstyle={ [\n\t\t\t\t\tstyles.touchableArea,\n\t\t\t\t\titem.isDisabled ? styles.disabled : null,\n\t\t\t\t] }\n\t\t\t\tunderlayColor=\"transparent\"\n\t\t\t\tactiveOpacity={ 0.5 }\n\t\t\t\taccessibilityRole=\"button\"\n\t\t\t\taccessibilityLabel={ accessibilityLabel }\n\t\t\t\tonPress={ this.onPress }\n\t\t\t\tdisabled={ item.isDisabled }\n\t\t\t>\n\t\t\t\t<View style={ [ styles.modalItem, { width: maxWidth } ] }>\n\t\t\t\t\t<View\n\t\t\t\t\t\tstyle={ [\n\t\t\t\t\t\t\tmodalIconWrapperStyle,\n\t\t\t\t\t\t\titemWidth && {\n\t\t\t\t\t\t\t\twidth: itemWidth,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tisClipboardBlock && clipboardBlockStyles,\n\t\t\t\t\t\t] }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ blockIsNew && (\n\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\ticon={ sparkles }\n\t\t\t\t\t\t\t\tstyle={ styles.newIndicator }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t<View style={ modalIconStyle }>\n\t\t\t\t\t\t\t<BlockIcon\n\t\t\t\t\t\t\t\ticon={ item.icon }\n\t\t\t\t\t\t\t\tsize={ modalIconStyle.width }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</View>\n\t\t\t\t\t</View>\n\t\t\t\t\t<Text numberOfLines={ 3 } style={ modalItemLabelStyle }>\n\t\t\t\t\t\t{ blockTitle }\n\t\t\t\t\t</Text>\n\t\t\t\t</View>\n\t\t\t</TouchableHighlight>\n\t\t);\n\t}\n}\n\nconst InserterButton = withPreferredColorScheme( MenuItem );\n\nInserterButton.Styles = {\n\tmodalItem: styles.modalItem,\n\tmodalIconWrapper: styles.modalIconWrapper,\n};\n\nexport default InserterButton;\n"],"mappings":";;;;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,YAAA,GAAAL,OAAA;AAKA,IAAAM,MAAA,GAAAC,sBAAA,CAAAP,OAAA;AACA,IAAAQ,SAAA,GAAAD,sBAAA,CAAAP,OAAA;AAlBA;AACA;AACA;;AAGA;AACA;AACA;;AAOA;AACA;AACA;;AAGA,MAAMS,QAAQ,SAASC,kBAAS,CAAC;EAChCC,WAAWA,CAAA,EAAG;IACb,KAAK,CAAE,GAAGC,SAAU,CAAC;IAErB,IAAI,CAACC,OAAO,GAAG,IAAI,CAACA,OAAO,CAACC,IAAI,CAAE,IAAK,CAAC;EACzC;EAEAD,OAAOA,CAAA,EAAG;IACT,MAAM;MAAEE,QAAQ;MAAEC;IAAK,CAAC,GAAG,IAAI,CAACC,KAAK;IACrCF,QAAQ,CAAEC,IAAK,CAAC;EACjB;EAEAE,MAAMA,CAAA,EAAG;IACR,MAAM;MAAEC,wBAAwB;MAAEH,IAAI;MAAEI,SAAS;MAAEC;IAAS,CAAC,GAC5D,IAAI,CAACJ,KAAK;IAEX,MAAMK,qBAAqB,GAAGH,wBAAwB,CACrDI,cAAM,CAACC,gBAAgB,E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IAAAuB,MAAA,CAAAC,aAAA,EAAC9C,YAAA,CAAAuD,IAAI;MACJP,KAAK,EAAG,CACPzB,qBAAqB,EACrBF,SAAS,IAAI;QACZoC,KAAK,EAAEpC;MACR,CAAC,EACDc,gBAAgB,IAAIH,oBAAoB;IACtC,GAEDQ,UAAU,IACX,IAAAK,MAAA,CAAAC,aAAA,EAAC3C,WAAA,CAAAuD,IAAI;MACJC,IAAI,EAAGC,iBAAU;MACjBZ,KAAK,EAAGxB,cAAM,CAACqC;IAAc,CAC7B,CACD,EACD,IAAAhB,MAAA,CAAAC,aAAA,EAAC9C,YAAA,CAAAuD,IAAI;MAACP,KAAK,EAAGrB;IAAgB,GAC7B,IAAAkB,MAAA,CAAAC,aAAA,EAACxC,YAAA,CAAAwD,SAAS;MACTH,IAAI,EAAG1C,IAAI,CAAC0C,IAAM;MAClBI,IAAI,EAAGpC,cAAc,CAAC8B;IAAO,CAC7B,CACI,CACD,CAAC,EACP,IAAAZ,MAAA,CAAAC,aAAA,EAAC9C,YAAA,CAAAgE,IAAI;MAACC,aAAa,EAAG,CAAG;MAACjB,KAAK,EAAGnB;IAAqB,GACpDQ,UACG,CACD,CACa,CAAC;EAEvB;AACD;AAEA,MAAM6B,cAAc,GAAG,IAAAC,iCAAwB,EAAEzD,QAAS,CAAC;AAE3DwD,cAAc,CAACE,MAAM,GAAG;EACvBZ,SAAS,EAAEhC,cAAM,CAACgC,SAAS;EAC3B/B,gBAAgB,EAAED,cAAM,CAACC;AAC1B,CAAC;AAAC,IAAA4C,QAAA,GAEaH,cAAc;AAAAI,OAAA,CAAAC,OAAA,GAAAF,QAAA"}
@@ -1,23 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var _react = require("react");
8
- var _primitives = require("@wordpress/primitives");
9
- /**
10
- * WordPress dependencies
11
- */
12
-
13
- const sparkles = (0, _react.createElement)(_primitives.SVG, {
14
- viewBox: "0 0 24 24",
15
- fill: "none",
16
- xmlns: "http://www.w3.org/2000/svg"
17
- }, (0, _react.createElement)(_primitives.Path, {
18
- d: "M10 11c-1.588-.479-4-.91-4-.91s2-.241 4-.454c1.8-.191 3.365-.502 4-3.181C14.635 3.775 15 1 15 1s.365 2.775 1 5.455c.635 2.679 2 2.969 4 3.181 2 .213 4 .455 4 .455s-2.412.43-4 .909c-1.588.479-3 1-4 4.546-.746 2.643-.893 4.948-1 5.454-.107-.506-.167-2.5-1-5.454C13 12 11.588 11.479 10 11zM7.333 3.5C6.803 3.333 6 3.182 6 3.182s.667-.085 1.333-.16c.6-.066 1.122-.175 1.334-1.113C8.878.971 9 0 9 0s.122.971.333 1.91c.212.937.667 1.038 1.334 1.113.666.074 1.333.159 1.333.159s-.804.15-1.333.318c-.53.167-1 .35-1.334 1.59C9.085 6.017 9.036 6.824 9 7c-.036-.177-.056-.875-.333-1.91-.334-1.24-.804-1.423-1.334-1.59zM2.444 18C1.474 17.713 0 17.454 0 17.454s1.222-.145 2.444-.272c1.1-.115 2.057-.302 2.445-1.91C5.277 13.666 5.5 12 5.5 12s.223 1.665.611 3.273c.388 1.607 1.222 1.781 2.445 1.909 1.222.127 2.444.273 2.444.273s-1.474.258-2.444.545c-.971.287-1.834.6-2.445 2.727-.456 1.586-.546 2.97-.611 3.273-.065-.304-.102-1.5-.611-3.273C4.278 18.6 3.415 18.287 2.444 18z",
19
- fill: "#F0C930"
20
- }));
21
- var _default = sparkles;
22
- exports.default = _default;
23
- //# sourceMappingURL=sparkles.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_primitives","require","sparkles","_react","createElement","SVG","viewBox","fill","xmlns","Path","d","_default","exports","default"],"sources":["@wordpress/components/src/mobile/inserter-button/sparkles.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst sparkles = (\n\t<SVG viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t<Path\n\t\t\td=\"M10 11c-1.588-.479-4-.91-4-.91s2-.241 4-.454c1.8-.191 3.365-.502 4-3.181C14.635 3.775 15 1 15 1s.365 2.775 1 5.455c.635 2.679 2 2.969 4 3.181 2 .213 4 .455 4 .455s-2.412.43-4 .909c-1.588.479-3 1-4 4.546-.746 2.643-.893 4.948-1 5.454-.107-.506-.167-2.5-1-5.454C13 12 11.588 11.479 10 11zM7.333 3.5C6.803 3.333 6 3.182 6 3.182s.667-.085 1.333-.16c.6-.066 1.122-.175 1.334-1.113C8.878.971 9 0 9 0s.122.971.333 1.91c.212.937.667 1.038 1.334 1.113.666.074 1.333.159 1.333.159s-.804.15-1.333.318c-.53.167-1 .35-1.334 1.59C9.085 6.017 9.036 6.824 9 7c-.036-.177-.056-.875-.333-1.91-.334-1.24-.804-1.423-1.334-1.59zM2.444 18C1.474 17.713 0 17.454 0 17.454s1.222-.145 2.444-.272c1.1-.115 2.057-.302 2.445-1.91C5.277 13.666 5.5 12 5.5 12s.223 1.665.611 3.273c.388 1.607 1.222 1.781 2.445 1.909 1.222.127 2.444.273 2.444.273s-1.474.258-2.444.545c-.971.287-1.834.6-2.445 2.727-.456 1.586-.546 2.97-.611 3.273-.065-.304-.102-1.5-.611-3.273C4.278 18.6 3.415 18.287 2.444 18z\"\n\t\t\tfill=\"#F0C930\"\n\t\t/>\n\t</SVG>\n);\n\nexport default sparkles;\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAGA,MAAMC,QAAQ,GACb,IAAAC,MAAA,CAAAC,aAAA,EAACJ,WAAA,CAAAK,GAAG;EAACC,OAAO,EAAC,WAAW;EAACC,IAAI,EAAC,MAAM;EAACC,KAAK,EAAC;AAA4B,GACtE,IAAAL,MAAA,CAAAC,aAAA,EAACJ,WAAA,CAAAS,IAAI;EACJC,CAAC,EAAC,k8BAAk8B;EACp8BH,IAAI,EAAC;AAAS,CACd,CACG,CACL;AAAC,IAAAI,QAAA,GAEaT,QAAQ;AAAAU,OAAA,CAAAC,OAAA,GAAAF,QAAA"}
@@ -1,119 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.default = void 0;
8
- var _react = require("react");
9
- var _native = require("@react-navigation/native");
10
- var _reactNative = require("react-native");
11
- var _i18n = require("@wordpress/i18n");
12
- var _icons = require("@wordpress/icons");
13
- var _blockEditor = require("@wordpress/block-editor");
14
- var _compose = require("@wordpress/compose");
15
- var _style = _interopRequireDefault(require("./style.scss"));
16
- var _body = _interopRequireDefault(require("../../panel/body"));
17
- var _bottomSheet = _interopRequireDefault(require("../bottom-sheet"));
18
- /**
19
- * External dependencies
20
- */
21
-
22
- /**
23
- * WordPress dependencies
24
- */
25
-
26
- /**
27
- * Internal dependencies
28
- */
29
-
30
- const LINK_DESTINATION_NONE = 'none';
31
- const LINK_DESTINATION_MEDIA = 'media';
32
- const LINK_DESTINATION_ATTACHMENT = 'attachment';
33
- const LINK_DESTINATION_CUSTOM = 'custom';
34
- function LinkDestination({
35
- children,
36
- isSelected,
37
- label,
38
- onPress,
39
- value,
40
- valueStyle
41
- }) {
42
- const optionIcon = (0, _compose.usePreferredColorSchemeStyle)(_style.default.optionIcon, _style.default.optionIconDark);
43
- return (0, _react.createElement)(_bottomSheet.default.Cell, {
44
- icon: _icons.check,
45
- iconStyle: _reactNative.StyleSheet.flatten([optionIcon, !isSelected && _style.default.unselectedOptionIcon]),
46
- label: label,
47
- leftAlign: true,
48
- onPress: onPress,
49
- value: value,
50
- valueStyle: valueStyle,
51
- separatorType: "leftMargin"
52
- }, children);
53
- }
54
- function ImageLinkDestinationsScreen(props) {
55
- const navigation = (0, _native.useNavigation)();
56
- const route = (0, _native.useRoute)();
57
- const {
58
- url = ''
59
- } = props;
60
- const {
61
- inputValue = url,
62
- imageUrl,
63
- attachmentPageUrl,
64
- linkDestination
65
- } = route.params || {};
66
- function goToLinkPicker() {
67
- navigation.navigate(_blockEditor.blockSettingsScreens.linkPicker, {
68
- inputValue: linkDestination === LINK_DESTINATION_CUSTOM ? inputValue : ''
69
- });
70
- }
71
- const setLinkDestination = newLinkDestination => () => {
72
- let newUrl;
73
- switch (newLinkDestination) {
74
- case LINK_DESTINATION_MEDIA:
75
- newUrl = imageUrl;
76
- break;
77
- case LINK_DESTINATION_ATTACHMENT:
78
- newUrl = attachmentPageUrl;
79
- break;
80
- default:
81
- newUrl = '';
82
- break;
83
- }
84
- navigation.navigate(_blockEditor.blockSettingsScreens.settings, {
85
- // The `inputValue` name is reused from LinkPicker, as it helps avoid
86
- // bugs from stale values remaining in the React Navigation route
87
- // parameters.
88
- inputValue: newUrl,
89
- // Clear link text value that may be set from LinkPicker.
90
- text: ''
91
- });
92
- };
93
- return (0, _react.createElement)(_react.Fragment, null, (0, _react.createElement)(_bottomSheet.default.NavBar, null, (0, _react.createElement)(_bottomSheet.default.NavBar.BackButton, {
94
- onPress: navigation.goBack
95
- }), (0, _react.createElement)(_bottomSheet.default.NavBar.Heading, null, (0, _i18n.__)('Link To'))), (0, _react.createElement)(_body.default, null, (0, _react.createElement)(LinkDestination, {
96
- isSelected: linkDestination === LINK_DESTINATION_NONE,
97
- label: (0, _i18n.__)('None'),
98
- onPress: setLinkDestination(LINK_DESTINATION_NONE)
99
- }), (0, _react.createElement)(LinkDestination, {
100
- isSelected: linkDestination === LINK_DESTINATION_MEDIA,
101
- label: (0, _i18n.__)('Media File'),
102
- onPress: setLinkDestination(LINK_DESTINATION_MEDIA)
103
- }), !!attachmentPageUrl && (0, _react.createElement)(LinkDestination, {
104
- isSelected: linkDestination === LINK_DESTINATION_ATTACHMENT,
105
- label: (0, _i18n.__)('Attachment Page'),
106
- onPress: setLinkDestination(LINK_DESTINATION_ATTACHMENT)
107
- }), (0, _react.createElement)(LinkDestination, {
108
- isSelected: linkDestination === LINK_DESTINATION_CUSTOM,
109
- label: (0, _i18n.__)('Custom URL'),
110
- onPress: goToLinkPicker,
111
- value: linkDestination === LINK_DESTINATION_CUSTOM ? inputValue : '',
112
- valueStyle: linkDestination === LINK_DESTINATION_CUSTOM ? undefined : _style.default.placeholderTextColor
113
- }, (0, _react.createElement)(_icons.Icon, {
114
- icon: _icons.chevronRight
115
- }))));
116
- }
117
- var _default = ImageLinkDestinationsScreen;
118
- exports.default = _default;
119
- //# sourceMappingURL=image-link-destinations-screen.native.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_native","require","_reactNative","_i18n","_icons","_blockEditor","_compose","_style","_interopRequireDefault","_body","_bottomSheet","LINK_DESTINATION_NONE","LINK_DESTINATION_MEDIA","LINK_DESTINATION_ATTACHMENT","LINK_DESTINATION_CUSTOM","LinkDestination","children","isSelected","label","onPress","value","valueStyle","optionIcon","usePreferredColorSchemeStyle","styles","optionIconDark","_react","createElement","default","Cell","icon","check","iconStyle","StyleSheet","flatten","unselectedOptionIcon","leftAlign","separatorType","ImageLinkDestinationsScreen","props","navigation","useNavigation","route","useRoute","url","inputValue","imageUrl","attachmentPageUrl","linkDestination","params","goToLinkPicker","navigate","blockSettingsScreens","linkPicker","setLinkDestination","newLinkDestination","newUrl","settings","text","Fragment","NavBar","BackButton","goBack","Heading","__","undefined","placeholderTextColor","Icon","chevronRight","_default","exports"],"sources":["@wordpress/components/src/mobile/link-settings/image-link-destinations-screen.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { useNavigation, useRoute } from '@react-navigation/native';\nimport { StyleSheet } from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Icon, check, chevronRight } from '@wordpress/icons';\nimport { blockSettingsScreens } from '@wordpress/block-editor';\nimport { usePreferredColorSchemeStyle } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport styles from './style.scss';\nimport PanelBody from '../../panel/body';\nimport BottomSheet from '../bottom-sheet';\n\nconst LINK_DESTINATION_NONE = 'none';\nconst LINK_DESTINATION_MEDIA = 'media';\nconst LINK_DESTINATION_ATTACHMENT = 'attachment';\nconst LINK_DESTINATION_CUSTOM = 'custom';\n\nfunction LinkDestination( {\n\tchildren,\n\tisSelected,\n\tlabel,\n\tonPress,\n\tvalue,\n\tvalueStyle,\n} ) {\n\tconst optionIcon = usePreferredColorSchemeStyle(\n\t\tstyles.optionIcon,\n\t\tstyles.optionIconDark\n\t);\n\treturn (\n\t\t<BottomSheet.Cell\n\t\t\ticon={ check }\n\t\t\ticonStyle={ StyleSheet.flatten( [\n\t\t\t\toptionIcon,\n\t\t\t\t! isSelected && styles.unselectedOptionIcon,\n\t\t\t] ) }\n\t\t\tlabel={ label }\n\t\t\tleftAlign\n\t\t\tonPress={ onPress }\n\t\t\tvalue={ value }\n\t\t\tvalueStyle={ valueStyle }\n\t\t\tseparatorType=\"leftMargin\"\n\t\t>\n\t\t\t{ children }\n\t\t</BottomSheet.Cell>\n\t);\n}\n\nfunction ImageLinkDestinationsScreen( props ) {\n\tconst navigation = useNavigation();\n\tconst route = useRoute();\n\tconst { url = '' } = props;\n\tconst {\n\t\tinputValue = url,\n\t\timageUrl,\n\t\tattachmentPageUrl,\n\t\tlinkDestination,\n\t} = route.params || {};\n\n\tfunction goToLinkPicker() {\n\t\tnavigation.navigate( blockSettingsScreens.linkPicker, {\n\t\t\tinputValue:\n\t\t\t\tlinkDestination === LINK_DESTINATION_CUSTOM ? inputValue : '',\n\t\t} );\n\t}\n\n\tconst setLinkDestination = ( newLinkDestination ) => () => {\n\t\tlet newUrl;\n\t\tswitch ( newLinkDestination ) {\n\t\t\tcase LINK_DESTINATION_MEDIA:\n\t\t\t\tnewUrl = imageUrl;\n\t\t\t\tbreak;\n\t\t\tcase LINK_DESTINATION_ATTACHMENT:\n\t\t\t\tnewUrl = attachmentPageUrl;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tnewUrl = '';\n\t\t\t\tbreak;\n\t\t}\n\n\t\tnavigation.navigate( blockSettingsScreens.settings, {\n\t\t\t// The `inputValue` name is reused from LinkPicker, as it helps avoid\n\t\t\t// bugs from stale values remaining in the React Navigation route\n\t\t\t// parameters.\n\t\t\tinputValue: newUrl,\n\t\t\t// Clear link text value that may be set from LinkPicker.\n\t\t\ttext: '',\n\t\t} );\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<BottomSheet.NavBar>\n\t\t\t\t<BottomSheet.NavBar.BackButton onPress={ navigation.goBack } />\n\t\t\t\t<BottomSheet.NavBar.Heading>\n\t\t\t\t\t{ __( 'Link To' ) }\n\t\t\t\t</BottomSheet.NavBar.Heading>\n\t\t\t</BottomSheet.NavBar>\n\t\t\t<PanelBody>\n\t\t\t\t<LinkDestination\n\t\t\t\t\tisSelected={ linkDestination === LINK_DESTINATION_NONE }\n\t\t\t\t\tlabel={ __( 'None' ) }\n\t\t\t\t\tonPress={ setLinkDestination( LINK_DESTINATION_NONE ) }\n\t\t\t\t/>\n\t\t\t\t<LinkDestination\n\t\t\t\t\tisSelected={ linkDestination === LINK_DESTINATION_MEDIA }\n\t\t\t\t\tlabel={ __( 'Media File' ) }\n\t\t\t\t\tonPress={ setLinkDestination( LINK_DESTINATION_MEDIA ) }\n\t\t\t\t/>\n\t\t\t\t{ !! attachmentPageUrl && (\n\t\t\t\t\t<LinkDestination\n\t\t\t\t\t\tisSelected={\n\t\t\t\t\t\t\tlinkDestination === LINK_DESTINATION_ATTACHMENT\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlabel={ __( 'Attachment Page' ) }\n\t\t\t\t\t\tonPress={ setLinkDestination(\n\t\t\t\t\t\t\tLINK_DESTINATION_ATTACHMENT\n\t\t\t\t\t\t) }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t<LinkDestination\n\t\t\t\t\tisSelected={ linkDestination === LINK_DESTINATION_CUSTOM }\n\t\t\t\t\tlabel={ __( 'Custom URL' ) }\n\t\t\t\t\tonPress={ goToLinkPicker }\n\t\t\t\t\tvalue={\n\t\t\t\t\t\tlinkDestination === LINK_DESTINATION_CUSTOM\n\t\t\t\t\t\t\t? inputValue\n\t\t\t\t\t\t\t: ''\n\t\t\t\t\t}\n\t\t\t\t\tvalueStyle={\n\t\t\t\t\t\tlinkDestination === LINK_DESTINATION_CUSTOM\n\t\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t\t: styles.placeholderTextColor\n\t\t\t\t\t}\n\t\t\t\t>\n\t\t\t\t\t<Icon icon={ chevronRight }></Icon>\n\t\t\t\t</LinkDestination>\n\t\t\t</PanelBody>\n\t\t</>\n\t);\n}\n\nexport default ImageLinkDestinationsScreen;\n"],"mappings":";;;;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAKA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AAKA,IAAAM,MAAA,GAAAC,sBAAA,CAAAP,OAAA;AACA,IAAAQ,KAAA,GAAAD,sBAAA,CAAAP,OAAA;AACA,IAAAS,YAAA,GAAAF,sBAAA,CAAAP,OAAA;AAnBA;AACA;AACA;;AAIA;AACA;AACA;;AAMA;AACA;AACA;;AAKA,MAAMU,qBAAqB,GAAG,MAAM;AACpC,MAAMC,sBAAsB,GAAG,OAAO;AACtC,MAAMC,2BAA2B,GAAG,YAAY;AAChD,MAAMC,uBAAuB,GAAG,QAAQ;AAExC,SAASC,eAAeA,CAAE;EACzBC,QAAQ;EACRC,UAAU;EACVC,KAAK;EACLC,OAAO;EACPC,KAAK;EACLC;AACD,CAAC,EAAG;EACH,MAAMC,UAAU,GAAG,IAAAC,qCAA4B,EAC9CC,cAAM,CAACF,UAAU,EACjBE,cAAM,CAACC,cACR,CAAC;EACD,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACjB,YAAA,CAAAkB,OAAW,CAACC,IAAI;IAChBC,IAAI,EAAGC,YAAO;IACdC,SAAS,EAAGC,uBAAU,CAACC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B;IAC1B9B,KAAK,EACJ4B,eAAe,KAAKlC,uBAAuB,GACxC+B,UAAU,GACV,EACH;IACDxB,UAAU,EACT2B,eAAe,KAAKlC,uBAAuB,GACxCmD,SAAS,GACTzC,cAAM,CAAC0C;EACV,GAED,IAAAxC,MAAA,CAAAC,aAAA,EAACvB,MAAA,CAAA+D,IAAI;IAACrC,IAAI,EAAGsC;EAAc,CAAO,CAClB,CACP,CACV,CAAC;AAEL;AAAC,IAAAC,QAAA,GAEc/B,2BAA2B;AAAAgC,OAAA,CAAA1C,OAAA,GAAAyC,QAAA"}
@@ -1,89 +0,0 @@
1
- import { createElement } from "react";
2
- /**
3
- * External dependencies
4
- */
5
- import { View, TouchableHighlight, Text } from 'react-native';
6
-
7
- /**
8
- * WordPress dependencies
9
- */
10
- import { Component } from '@wordpress/element';
11
- import { Icon } from '@wordpress/components';
12
- import { withPreferredColorScheme } from '@wordpress/compose';
13
- import { __, sprintf } from '@wordpress/i18n';
14
- import { BlockIcon } from '@wordpress/block-editor';
15
-
16
- /**
17
- * Internal dependencies
18
- */
19
- import styles from './style.scss';
20
- import sparkles from './sparkles';
21
- class MenuItem extends Component {
22
- constructor() {
23
- super(...arguments);
24
- this.onPress = this.onPress.bind(this);
25
- }
26
- onPress() {
27
- const {
28
- onSelect,
29
- item
30
- } = this.props;
31
- onSelect(item);
32
- }
33
- render() {
34
- const {
35
- getStylesFromColorScheme,
36
- item,
37
- itemWidth,
38
- maxWidth
39
- } = this.props;
40
- const modalIconWrapperStyle = getStylesFromColorScheme(styles.modalIconWrapper, styles.modalIconWrapperDark);
41
- const modalIconStyle = styles.modalIcon;
42
- const modalItemLabelStyle = getStylesFromColorScheme(styles.modalItemLabel, styles.modalItemLabelDark);
43
- const clipboardBlockStyles = getStylesFromColorScheme(styles.clipboardBlock, styles.clipboardBlockDark);
44
- const isClipboardBlock = item.id === 'clipboard';
45
- const blockTitle = isClipboardBlock ? __('Copied block') : item.title;
46
- const blockIsNew = item.isNew === true;
47
- const accessibilityLabelFormat = blockIsNew ?
48
- // translators: Newly available block name. %s: The localized block name
49
- __('%s block, newly available') :
50
- // translators: Block name. %s: The localized block name
51
- __('%s block');
52
- const accessibilityLabel = sprintf(accessibilityLabelFormat, item.title);
53
- return createElement(TouchableHighlight, {
54
- style: [styles.touchableArea, item.isDisabled ? styles.disabled : null],
55
- underlayColor: "transparent",
56
- activeOpacity: 0.5,
57
- accessibilityRole: "button",
58
- accessibilityLabel: accessibilityLabel,
59
- onPress: this.onPress,
60
- disabled: item.isDisabled
61
- }, createElement(View, {
62
- style: [styles.modalItem, {
63
- width: maxWidth
64
- }]
65
- }, createElement(View, {
66
- style: [modalIconWrapperStyle, itemWidth && {
67
- width: itemWidth
68
- }, isClipboardBlock && clipboardBlockStyles]
69
- }, blockIsNew && createElement(Icon, {
70
- icon: sparkles,
71
- style: styles.newIndicator
72
- }), createElement(View, {
73
- style: modalIconStyle
74
- }, createElement(BlockIcon, {
75
- icon: item.icon,
76
- size: modalIconStyle.width
77
- }))), createElement(Text, {
78
- numberOfLines: 3,
79
- style: modalItemLabelStyle
80
- }, blockTitle)));
81
- }
82
- }
83
- const InserterButton = withPreferredColorScheme(MenuItem);
84
- InserterButton.Styles = {
85
- modalItem: styles.modalItem,
86
- modalIconWrapper: styles.modalIconWrapper
87
- };
88
- export default InserterButton;
89
- //# sourceMappingURL=index.native.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["View","TouchableHighlight","Text","Component","Icon","withPreferredColorScheme","__","sprintf","BlockIcon","styles","sparkles","MenuItem","constructor","arguments","onPress","bind","onSelect","item","props","render","getStylesFromColorScheme","itemWidth","maxWidth","modalIconWrapperStyle","modalIconWrapper","modalIconWrapperDark","modalIconStyle","modalIcon","modalItemLabelStyle","modalItemLabel","modalItemLabelDark","clipboardBlockStyles","clipboardBlock","clipboardBlockDark","isClipboardBlock","id","blockTitle","title","blockIsNew","isNew","accessibilityLabelFormat","accessibilityLabel","createElement","style","touchableArea","isDisabled","disabled","underlayColor","activeOpacity","accessibilityRole","modalItem","width","icon","newIndicator","size","numberOfLines","InserterButton","Styles"],"sources":["@wordpress/components/src/mobile/inserter-button/index.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { View, TouchableHighlight, Text } from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport { Icon } from '@wordpress/components';\nimport { withPreferredColorScheme } from '@wordpress/compose';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { BlockIcon } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport styles from './style.scss';\nimport sparkles from './sparkles';\nclass MenuItem extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\n\t\tthis.onPress = this.onPress.bind( this );\n\t}\n\n\tonPress() {\n\t\tconst { onSelect, item } = this.props;\n\t\tonSelect( item );\n\t}\n\n\trender() {\n\t\tconst { getStylesFromColorScheme, item, itemWidth, maxWidth } =\n\t\t\tthis.props;\n\n\t\tconst modalIconWrapperStyle = getStylesFromColorScheme(\n\t\t\tstyles.modalIconWrapper,\n\t\t\tstyles.modalIconWrapperDark\n\t\t);\n\t\tconst modalIconStyle = styles.modalIcon;\n\t\tconst modalItemLabelStyle = getStylesFromColorScheme(\n\t\t\tstyles.modalItemLabel,\n\t\t\tstyles.modalItemLabelDark\n\t\t);\n\n\t\tconst clipboardBlockStyles = getStylesFromColorScheme(\n\t\t\tstyles.clipboardBlock,\n\t\t\tstyles.clipboardBlockDark\n\t\t);\n\n\t\tconst isClipboardBlock = item.id === 'clipboard';\n\t\tconst blockTitle = isClipboardBlock ? __( 'Copied block' ) : item.title;\n\t\tconst blockIsNew = item.isNew === true;\n\t\tconst accessibilityLabelFormat = blockIsNew\n\t\t\t? // translators: Newly available block name. %s: The localized block name\n\t\t\t __( '%s block, newly available' )\n\t\t\t: // translators: Block name. %s: The localized block name\n\t\t\t __( '%s block' );\n\t\tconst accessibilityLabel = sprintf(\n\t\t\taccessibilityLabelFormat,\n\t\t\titem.title\n\t\t);\n\n\t\treturn (\n\t\t\t<TouchableHighlight\n\t\t\t\tstyle={ [\n\t\t\t\t\tstyles.touchableArea,\n\t\t\t\t\titem.isDisabled ? styles.disabled : null,\n\t\t\t\t] }\n\t\t\t\tunderlayColor=\"transparent\"\n\t\t\t\tactiveOpacity={ 0.5 }\n\t\t\t\taccessibilityRole=\"button\"\n\t\t\t\taccessibilityLabel={ accessibilityLabel }\n\t\t\t\tonPress={ this.onPress }\n\t\t\t\tdisabled={ item.isDisabled }\n\t\t\t>\n\t\t\t\t<View style={ [ styles.modalItem, { width: maxWidth } ] }>\n\t\t\t\t\t<View\n\t\t\t\t\t\tstyle={ [\n\t\t\t\t\t\t\tmodalIconWrapperStyle,\n\t\t\t\t\t\t\titemWidth && {\n\t\t\t\t\t\t\t\twidth: itemWidth,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tisClipboardBlock && clipboardBlockStyles,\n\t\t\t\t\t\t] }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ blockIsNew && (\n\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\ticon={ sparkles }\n\t\t\t\t\t\t\t\tstyle={ styles.newIndicator }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t<View style={ modalIconStyle }>\n\t\t\t\t\t\t\t<BlockIcon\n\t\t\t\t\t\t\t\ticon={ item.icon }\n\t\t\t\t\t\t\t\tsize={ modalIconStyle.width }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</View>\n\t\t\t\t\t</View>\n\t\t\t\t\t<Text numberOfLines={ 3 } style={ modalItemLabelStyle }>\n\t\t\t\t\t\t{ blockTitle }\n\t\t\t\t\t</Text>\n\t\t\t\t</View>\n\t\t\t</TouchableHighlight>\n\t\t);\n\t}\n}\n\nconst InserterButton = withPreferredColorScheme( MenuItem );\n\nInserterButton.Styles = {\n\tmodalItem: styles.modalItem,\n\tmodalIconWrapper: styles.modalIconWrapper,\n};\n\nexport default Inserter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cAAc,CAACyB;IAAO,CAC7B,CACI,CACD,CAAC,EACPT,aAAA,CAACxC,IAAI;MAACqD,aAAa,EAAG,CAAG;MAACZ,KAAK,EAAGf;IAAqB,GACpDQ,UACG,CACD,CACa,CAAC;EAEvB;AACD;AAEA,MAAMoB,cAAc,GAAGnD,wBAAwB,CAAEM,QAAS,CAAC;AAE3D6C,cAAc,CAACC,MAAM,GAAG;EACvBP,SAAS,EAAEzC,MAAM,CAACyC,SAAS;EAC3B1B,gBAAgB,EAAEf,MAAM,CAACe;AAC1B,CAAC;AAED,eAAegC,cAAc"}
@@ -1,15 +0,0 @@
1
- import { createElement } from "react";
2
- /**
3
- * WordPress dependencies
4
- */
5
- import { SVG, Path } from '@wordpress/primitives';
6
- const sparkles = createElement(SVG, {
7
- viewBox: "0 0 24 24",
8
- fill: "none",
9
- xmlns: "http://www.w3.org/2000/svg"
10
- }, createElement(Path, {
11
- d: "M10 11c-1.588-.479-4-.91-4-.91s2-.241 4-.454c1.8-.191 3.365-.502 4-3.181C14.635 3.775 15 1 15 1s.365 2.775 1 5.455c.635 2.679 2 2.969 4 3.181 2 .213 4 .455 4 .455s-2.412.43-4 .909c-1.588.479-3 1-4 4.546-.746 2.643-.893 4.948-1 5.454-.107-.506-.167-2.5-1-5.454C13 12 11.588 11.479 10 11zM7.333 3.5C6.803 3.333 6 3.182 6 3.182s.667-.085 1.333-.16c.6-.066 1.122-.175 1.334-1.113C8.878.971 9 0 9 0s.122.971.333 1.91c.212.937.667 1.038 1.334 1.113.666.074 1.333.159 1.333.159s-.804.15-1.333.318c-.53.167-1 .35-1.334 1.59C9.085 6.017 9.036 6.824 9 7c-.036-.177-.056-.875-.333-1.91-.334-1.24-.804-1.423-1.334-1.59zM2.444 18C1.474 17.713 0 17.454 0 17.454s1.222-.145 2.444-.272c1.1-.115 2.057-.302 2.445-1.91C5.277 13.666 5.5 12 5.5 12s.223 1.665.611 3.273c.388 1.607 1.222 1.781 2.445 1.909 1.222.127 2.444.273 2.444.273s-1.474.258-2.444.545c-.971.287-1.834.6-2.445 2.727-.456 1.586-.546 2.97-.611 3.273-.065-.304-.102-1.5-.611-3.273C4.278 18.6 3.415 18.287 2.444 18z",
12
- fill: "#F0C930"
13
- }));
14
- export default sparkles;
15
- //# sourceMappingURL=sparkles.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["SVG","Path","sparkles","createElement","viewBox","fill","xmlns","d"],"sources":["@wordpress/components/src/mobile/inserter-button/sparkles.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst sparkles = (\n\t<SVG viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t<Path\n\t\t\td=\"M10 11c-1.588-.479-4-.91-4-.91s2-.241 4-.454c1.8-.191 3.365-.502 4-3.181C14.635 3.775 15 1 15 1s.365 2.775 1 5.455c.635 2.679 2 2.969 4 3.181 2 .213 4 .455 4 .455s-2.412.43-4 .909c-1.588.479-3 1-4 4.546-.746 2.643-.893 4.948-1 5.454-.107-.506-.167-2.5-1-5.454C13 12 11.588 11.479 10 11zM7.333 3.5C6.803 3.333 6 3.182 6 3.182s.667-.085 1.333-.16c.6-.066 1.122-.175 1.334-1.113C8.878.971 9 0 9 0s.122.971.333 1.91c.212.937.667 1.038 1.334 1.113.666.074 1.333.159 1.333.159s-.804.15-1.333.318c-.53.167-1 .35-1.334 1.59C9.085 6.017 9.036 6.824 9 7c-.036-.177-.056-.875-.333-1.91-.334-1.24-.804-1.423-1.334-1.59zM2.444 18C1.474 17.713 0 17.454 0 17.454s1.222-.145 2.444-.272c1.1-.115 2.057-.302 2.445-1.91C5.277 13.666 5.5 12 5.5 12s.223 1.665.611 3.273c.388 1.607 1.222 1.781 2.445 1.909 1.222.127 2.444.273 2.444.273s-1.474.258-2.444.545c-.971.287-1.834.6-2.445 2.727-.456 1.586-.546 2.97-.611 3.273-.065-.304-.102-1.5-.611-3.273C4.278 18.6 3.415 18.287 2.444 18z\"\n\t\t\tfill=\"#F0C930\"\n\t\t/>\n\t</SVG>\n);\n\nexport default sparkles;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,GAAG,EAAEC,IAAI,QAAQ,uBAAuB;AAEjD,MAAMC,QAAQ,GACbC,aAAA,CAACH,GAAG;EAACI,OAAO,EAAC,WAAW;EAACC,IAAI,EAAC,MAAM;EAACC,KAAK,EAAC;AAA4B,GACtEH,aAAA,CAACF,IAAI;EACJM,CAAC,EAAC,k8BAAk8B;EACp8BF,IAAI,EAAC;AAAS,CACd,CACG,CACL;AAED,eAAeH,QAAQ"}
@@ -1,110 +0,0 @@
1
- import { createElement, Fragment } from "react";
2
- /**
3
- * External dependencies
4
- */
5
- import { useNavigation, useRoute } from '@react-navigation/native';
6
- import { StyleSheet } from 'react-native';
7
-
8
- /**
9
- * WordPress dependencies
10
- */
11
- import { __ } from '@wordpress/i18n';
12
- import { Icon, check, chevronRight } from '@wordpress/icons';
13
- import { blockSettingsScreens } from '@wordpress/block-editor';
14
- import { usePreferredColorSchemeStyle } from '@wordpress/compose';
15
-
16
- /**
17
- * Internal dependencies
18
- */
19
- import styles from './style.scss';
20
- import PanelBody from '../../panel/body';
21
- import BottomSheet from '../bottom-sheet';
22
- const LINK_DESTINATION_NONE = 'none';
23
- const LINK_DESTINATION_MEDIA = 'media';
24
- const LINK_DESTINATION_ATTACHMENT = 'attachment';
25
- const LINK_DESTINATION_CUSTOM = 'custom';
26
- function LinkDestination({
27
- children,
28
- isSelected,
29
- label,
30
- onPress,
31
- value,
32
- valueStyle
33
- }) {
34
- const optionIcon = usePreferredColorSchemeStyle(styles.optionIcon, styles.optionIconDark);
35
- return createElement(BottomSheet.Cell, {
36
- icon: check,
37
- iconStyle: StyleSheet.flatten([optionIcon, !isSelected && styles.unselectedOptionIcon]),
38
- label: label,
39
- leftAlign: true,
40
- onPress: onPress,
41
- value: value,
42
- valueStyle: valueStyle,
43
- separatorType: "leftMargin"
44
- }, children);
45
- }
46
- function ImageLinkDestinationsScreen(props) {
47
- const navigation = useNavigation();
48
- const route = useRoute();
49
- const {
50
- url = ''
51
- } = props;
52
- const {
53
- inputValue = url,
54
- imageUrl,
55
- attachmentPageUrl,
56
- linkDestination
57
- } = route.params || {};
58
- function goToLinkPicker() {
59
- navigation.navigate(blockSettingsScreens.linkPicker, {
60
- inputValue: linkDestination === LINK_DESTINATION_CUSTOM ? inputValue : ''
61
- });
62
- }
63
- const setLinkDestination = newLinkDestination => () => {
64
- let newUrl;
65
- switch (newLinkDestination) {
66
- case LINK_DESTINATION_MEDIA:
67
- newUrl = imageUrl;
68
- break;
69
- case LINK_DESTINATION_ATTACHMENT:
70
- newUrl = attachmentPageUrl;
71
- break;
72
- default:
73
- newUrl = '';
74
- break;
75
- }
76
- navigation.navigate(blockSettingsScreens.settings, {
77
- // The `inputValue` name is reused from LinkPicker, as it helps avoid
78
- // bugs from stale values remaining in the React Navigation route
79
- // parameters.
80
- inputValue: newUrl,
81
- // Clear link text value that may be set from LinkPicker.
82
- text: ''
83
- });
84
- };
85
- return createElement(Fragment, null, createElement(BottomSheet.NavBar, null, createElement(BottomSheet.NavBar.BackButton, {
86
- onPress: navigation.goBack
87
- }), createElement(BottomSheet.NavBar.Heading, null, __('Link To'))), createElement(PanelBody, null, createElement(LinkDestination, {
88
- isSelected: linkDestination === LINK_DESTINATION_NONE,
89
- label: __('None'),
90
- onPress: setLinkDestination(LINK_DESTINATION_NONE)
91
- }), createElement(LinkDestination, {
92
- isSelected: linkDestination === LINK_DESTINATION_MEDIA,
93
- label: __('Media File'),
94
- onPress: setLinkDestination(LINK_DESTINATION_MEDIA)
95
- }), !!attachmentPageUrl && createElement(LinkDestination, {
96
- isSelected: linkDestination === LINK_DESTINATION_ATTACHMENT,
97
- label: __('Attachment Page'),
98
- onPress: setLinkDestination(LINK_DESTINATION_ATTACHMENT)
99
- }), createElement(LinkDestination, {
100
- isSelected: linkDestination === LINK_DESTINATION_CUSTOM,
101
- label: __('Custom URL'),
102
- onPress: goToLinkPicker,
103
- value: linkDestination === LINK_DESTINATION_CUSTOM ? inputValue : '',
104
- valueStyle: linkDestination === LINK_DESTINATION_CUSTOM ? undefined : styles.placeholderTextColor
105
- }, createElement(Icon, {
106
- icon: chevronRight
107
- }))));
108
- }
109
- export default ImageLinkDestinationsScreen;
110
- //# sourceMappingURL=image-link-destinations-screen.native.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["useNavigation","useRoute","StyleSheet","__","Icon","check","chevronRight","blockSettingsScreens","usePreferredColorSchemeStyle","styles","PanelBody","BottomSheet","LINK_DESTINATION_NONE","LINK_DESTINATION_MEDIA","LINK_DESTINATION_ATTACHMENT","LINK_DESTINATION_CUSTOM","LinkDestination","children","isSelected","label","onPress","value","valueStyle","optionIcon","optionIconDark","createElement","Cell","icon","iconStyle","flatten","unselectedOptionIcon","leftAlign","separatorType","ImageLinkDestinationsScreen","props","navigation","route","url","inputValue","imageUrl","attachmentPageUrl","linkDestination","params","goToLinkPicker","navigate","linkPicker","setLinkDestination","newLinkDestination","newUrl","settings","text","Fragment","NavBar","BackButton","goBack","Heading","undefined","placeholderTextColor"],"sources":["@wordpress/components/src/mobile/link-settings/image-link-destinations-screen.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { useNavigation, useRoute } from '@react-navigation/native';\nimport { StyleSheet } from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Icon, check, chevronRight } from '@wordpress/icons';\nimport { blockSettingsScreens } from '@wordpress/block-editor';\nimport { usePreferredColorSchemeStyle } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport styles from './style.scss';\nimport PanelBody from '../../panel/body';\nimport BottomSheet from '../bottom-sheet';\n\nconst LINK_DESTINATION_NONE = 'none';\nconst LINK_DESTINATION_MEDIA = 'media';\nconst LINK_DESTINATION_ATTACHMENT = 'attachment';\nconst LINK_DESTINATION_CUSTOM = 'custom';\n\nfunction LinkDestination( {\n\tchildren,\n\tisSelected,\n\tlabel,\n\tonPress,\n\tvalue,\n\tvalueStyle,\n} ) {\n\tconst optionIcon = usePreferredColorSchemeStyle(\n\t\tstyles.optionIcon,\n\t\tstyles.optionIconDark\n\t);\n\treturn (\n\t\t<BottomSheet.Cell\n\t\t\ticon={ check }\n\t\t\ticonStyle={ StyleSheet.flatten( [\n\t\t\t\toptionIcon,\n\t\t\t\t! isSelected && styles.unselectedOptionIcon,\n\t\t\t] ) }\n\t\t\tlabel={ label }\n\t\t\tleftAlign\n\t\t\tonPress={ onPress }\n\t\t\tvalue={ value }\n\t\t\tvalueStyle={ valueStyle }\n\t\t\tseparatorType=\"leftMargin\"\n\t\t>\n\t\t\t{ children }\n\t\t</BottomSheet.Cell>\n\t);\n}\n\nfunction ImageLinkDestinationsScreen( props ) {\n\tconst navigation = useNavigation();\n\tconst route = useRoute();\n\tconst { url = '' } = props;\n\tconst {\n\t\tinputValue = url,\n\t\timageUrl,\n\t\tattachmentPageUrl,\n\t\tlinkDestination,\n\t} = route.params || {};\n\n\tfunction goToLinkPicker() {\n\t\tnavigation.navigate( blockSettingsScreens.linkPicker, {\n\t\t\tinputValue:\n\t\t\t\tlinkDestination === LINK_DESTINATION_CUSTOM ? inputValue : '',\n\t\t} );\n\t}\n\n\tconst setLinkDestination = ( newLinkDestination ) => () => {\n\t\tlet newUrl;\n\t\tswitch ( newLinkDestination ) {\n\t\t\tcase LINK_DESTINATION_MEDIA:\n\t\t\t\tnewUrl = imageUrl;\n\t\t\t\tbreak;\n\t\t\tcase LINK_DESTINATION_ATTACHMENT:\n\t\t\t\tnewUrl = attachmentPageUrl;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tnewUrl = '';\n\t\t\t\tbreak;\n\t\t}\n\n\t\tnavigation.navigate( blockSettingsScreens.settings, {\n\t\t\t// The `inputValue` name is reused from LinkPicker, as it helps avoid\n\t\t\t// bugs from stale values remaining in the React Navigation route\n\t\t\t// parameters.\n\t\t\tinputValue: newUrl,\n\t\t\t// Clear link text value that may be set from LinkPicker.\n\t\t\ttext: '',\n\t\t} );\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<BottomSheet.NavBar>\n\t\t\t\t<BottomSheet.NavBar.BackButton onPress={ navigation.goBack } />\n\t\t\t\t<BottomSheet.NavBar.Heading>\n\t\t\t\t\t{ __( 'Link To' ) }\n\t\t\t\t</BottomSheet.NavBar.Heading>\n\t\t\t</BottomSheet.NavBar>\n\t\t\t<PanelBody>\n\t\t\t\t<LinkDestination\n\t\t\t\t\tisSelected={ linkDestination === LINK_DESTINATION_NONE }\n\t\t\t\t\tlabel={ __( 'None' ) }\n\t\t\t\t\tonPress={ setLinkDestination( LINK_DESTINATION_NONE ) }\n\t\t\t\t/>\n\t\t\t\t<LinkDestination\n\t\t\t\t\tisSelected={ linkDestination === LINK_DESTINATION_MEDIA }\n\t\t\t\t\tlabel={ __( 'Media File' ) }\n\t\t\t\t\tonPress={ setLinkDestination( LINK_DESTINATION_MEDIA ) }\n\t\t\t\t/>\n\t\t\t\t{ !! attachmentPageUrl && (\n\t\t\t\t\t<LinkDestination\n\t\t\t\t\t\tisSelected={\n\t\t\t\t\t\t\tlinkDestination === LINK_DESTINATION_ATTACHMENT\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlabel={ __( 'Attachment Page' ) }\n\t\t\t\t\t\tonPress={ setLinkDestination(\n\t\t\t\t\t\t\tLINK_DESTINATION_ATTACHMENT\n\t\t\t\t\t\t) }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t<LinkDestination\n\t\t\t\t\tisSelected={ linkDestination === LINK_DESTINATION_CUSTOM }\n\t\t\t\t\tlabel={ __( 'Custom URL' ) }\n\t\t\t\t\tonPress={ goToLinkPicker }\n\t\t\t\t\tvalue={\n\t\t\t\t\t\tlinkDestination === LINK_DESTINATION_CUSTOM\n\t\t\t\t\t\t\t? inputValue\n\t\t\t\t\t\t\t: ''\n\t\t\t\t\t}\n\t\t\t\t\tvalueStyle={\n\t\t\t\t\t\tlinkDestination === LINK_DESTINATION_CUSTOM\n\t\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t\t: styles.placeholderTextColor\n\t\t\t\t\t}\n\t\t\t\t>\n\t\t\t\t\t<Icon icon={ chevronRight }></Icon>\n\t\t\t\t</LinkDestination>\n\t\t\t</PanelBody>\n\t\t</>\n\t);\n}\n\nexport default ImageLinkDestinationsScreen;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,aAAa,EAAEC,QAAQ,QAAQ,0BAA0B;AAClE,SAASC,UAAU,QAAQ,cAAc;;AAEzC;AACA;AACA;AACA,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,IAAI,EAAEC,KAAK,EAAEC,YAAY,QAAQ,kBAAkB;AAC5D,SAASC,oBAAoB,QAAQ,yBAAyB;AAC9D,SAASC,4BAA4B,QAAQ,oBAAoB;;AAEjE;AACA;AACA;AACA,OAAOC,MAAM,MAAM,cAAc;AACjC,OAAOC,SAAS,MAAM,kBAAkB;AACxC,OAAOC,WAAW,MAAM,iBAAiB;AAEzC,MAAMC,qBAAqB,GAAG,MAAM;AACpC,MAAMC,sBAAsB,GAAG,OAAO;AACtC,MAAMC,2BAA2B,GAAG,YAAY;AAChD,MAAMC,uBAAuB,GAAG,QAAQ;AAExC,SAASC,eAAeA,CAAE;EACzBC,QAAQ;EACRC,UAAU;EACVC,KAAK;EACLC,OAAO;EACPC,KAAK;EACLC;AACD,CAAC,EAAG;EACH,MAAMC,UAAU,GAAGf,4BAA4B,CAC9CC,MAAM,CAACc,UAAU,EACjBd,MAAM,CAACe,cACR,CAAC;EACD,OACCC,aAAA,CAACd,WAAW,CAACe,IAAI;IAChBC,IAAI,EAAGtB,KAAO;IACduB,SAAS,EAAG1B,UAAU,CAAC2B,OAAO,CAAE,CAC/BN,UAAU,EACV,CAAEL,UAAU,IAAIT,MAAM,CAACqB,oBAAoB,CAC1C,CAAG;IACLX,KAAK,EAAGA,KAAO;IACfY,SAAS;IACTX,OAA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,CAACyC,MAAM,CAACG,OAAO,QACxBpD,EAAE,CAAE,SAAU,CACW,CACT,CAAC,EACrBsB,aAAA,CAACf,SAAS,QACTe,aAAA,CAACT,eAAe;IACfE,UAAU,EAAGuB,eAAe,KAAK7B,qBAAuB;IACxDO,KAAK,EAAGhB,EAAE,CAAE,MAAO,CAAG;IACtBiB,OAAO,EAAG0B,kBAAkB,CAAElC,qBAAsB;EAAG,CACvD,CAAC,EACFa,aAAA,CAACT,eAAe;IACfE,UAAU,EAAGuB,eAAe,KAAK5B,sBAAwB;IACzDM,KAAK,EAAGhB,EAAE,CAAE,YAAa,CAAG;IAC5BiB,OAAO,EAAG0B,kBAAkB,CAAEjC,sBAAuB;EAAG,CACxD,CAAC,EACA,CAAC,CAAE2B,iBAAiB,IACrBf,aAAA,CAACT,eAAe;IACfE,UAAU,EACTuB,eAAe,KAAK3B,2BACpB;IACDK,KAAK,EAAGhB,EAAE,CAAE,iBAAkB,CAAG;IACjCiB,OAAO,EAAG0B,kBAAkB,CAC3BhC,2BACD;EAAG,CACH,CACD,EACDW,aAAA,CAACT,eAAe;IACfE,UAAU,EAAGuB,eAAe,KAAK1B,uBAAyB;IAC1DI,KAAK,EAAGhB,EAAE,CAAE,YAAa,CAAG;IAC5BiB,OAAO,EAAGuB,cAAgB;IAC1BtB,KAAK,EACJoB,eAAe,KAAK1B,uBAAuB,GACxCuB,UAAU,GACV,EACH;IACDhB,UAAU,EACTmB,eAAe,KAAK1B,uBAAuB,GACxCyC,SAAS,GACT/C,MAAM,CAACgD;EACV,GAEDhC,aAAA,CAACrB,IAAI;IAACuB,IAAI,EAAGrB;EAAc,CAAO,CAClB,CACP,CACV,CAAC;AAEL;AAEA,eAAe2B,2BAA2B"}
@@ -1,3 +0,0 @@
1
- export default sparkles;
2
- declare const sparkles: JSX.Element;
3
- //# sourceMappingURL=sparkles.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sparkles.d.ts","sourceRoot":"","sources":["../../../src/mobile/inserter-button/sparkles.js"],"names":[],"mappings":";AAKA,oCAOE"}
@@ -1,62 +0,0 @@
1
- # InserterButton
2
-
3
- InserterButton is a type of button component.
4
-
5
- ## Usage
6
-
7
- ```jsx
8
- function render() {
9
- return (
10
- <View>
11
- <Text>Some rendered content here</Text>
12
- <InserterButton
13
- item={ { title: 'Short Text', icon: <SVG></SVG> } }
14
- onSelect={ function ( item ) {
15
- console.log( 'selected' );
16
- } }
17
- />
18
- </View>
19
- );
20
- }
21
- ```
22
-
23
- _Note:_
24
-
25
- ## Props
26
-
27
- ### `maxWidth`
28
-
29
- - **Type:** `String`
30
- - **Default:** `undefined`
31
-
32
- The max-width of the button.
33
-
34
- ### `itemWidth`
35
-
36
- - **Type:** `String`
37
- - **Default:** `undefined`
38
-
39
- The button width.
40
-
41
- ### `onSelect`
42
-
43
- - **Type:** `Function`
44
- - **Required** `true`
45
-
46
- The function that is called once the InserterButton has been selected.
47
-
48
- ### `item`
49
-
50
- - **Type:** `Object`
51
- - **Required** `true`
52
-
53
- The object that gets selected.
54
-
55
- ## Examples
56
-
57
- <InserterButton
58
- item={ item }
59
- itemWidth={ itemWidth }
60
- maxWidth={ maxWidth }
61
- onSelect={ onSelect }
62
- />