@wordpress/customize-widgets 6.0.0 → 6.1.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.
- package/build/components/block-appender/index.cjs +24 -41
- package/build/components/block-appender/index.cjs.map +1 -7
- package/build/components/block-inspector-button/index.cjs +24 -52
- package/build/components/block-inspector-button/index.cjs.map +1 -7
- package/build/components/customize-widgets/index.cjs +76 -97
- package/build/components/customize-widgets/index.cjs.map +1 -7
- package/build/components/customize-widgets/use-clear-selected-block.cjs +58 -67
- package/build/components/customize-widgets/use-clear-selected-block.cjs.map +1 -7
- package/build/components/error-boundary/index.cjs +115 -155
- package/build/components/error-boundary/index.cjs.map +1 -7
- package/build/components/focus-control/index.cjs +44 -84
- package/build/components/focus-control/index.cjs.map +1 -7
- package/build/components/focus-control/use-blocks-focus-control.cjs +28 -49
- package/build/components/focus-control/use-blocks-focus-control.cjs.map +1 -7
- package/build/components/header/index.cjs +84 -122
- package/build/components/header/index.cjs.map +1 -7
- package/build/components/inserter/index.cjs +43 -78
- package/build/components/inserter/index.cjs.map +1 -7
- package/build/components/inserter/use-inserter.cjs +22 -54
- package/build/components/inserter/use-inserter.cjs.map +1 -7
- package/build/components/keyboard-shortcut-help-modal/config.cjs +88 -85
- package/build/components/keyboard-shortcut-help-modal/config.cjs.map +1 -7
- package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.cjs +40 -57
- package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.cjs.map +1 -7
- package/build/components/keyboard-shortcut-help-modal/index.cjs +103 -165
- package/build/components/keyboard-shortcut-help-modal/index.cjs.map +1 -7
- package/build/components/keyboard-shortcut-help-modal/shortcut.cjs +37 -76
- package/build/components/keyboard-shortcut-help-modal/shortcut.cjs.map +1 -7
- package/build/components/keyboard-shortcuts/index.cjs +70 -100
- package/build/components/keyboard-shortcuts/index.cjs.map +1 -7
- package/build/components/more-menu/index.cjs +103 -151
- package/build/components/more-menu/index.cjs.map +1 -7
- package/build/components/sidebar-block-editor/index.cjs +122 -155
- package/build/components/sidebar-block-editor/index.cjs.map +1 -7
- package/build/components/sidebar-block-editor/sidebar-adapter.cjs +207 -270
- package/build/components/sidebar-block-editor/sidebar-adapter.cjs.map +1 -7
- package/build/components/sidebar-block-editor/sidebar-editor-provider.cjs +40 -50
- package/build/components/sidebar-block-editor/sidebar-editor-provider.cjs.map +1 -7
- package/build/components/sidebar-block-editor/use-sidebar-block-editor.cjs +75 -110
- package/build/components/sidebar-block-editor/use-sidebar-block-editor.cjs.map +1 -7
- package/build/components/sidebar-controls/index.cjs +27 -53
- package/build/components/sidebar-controls/index.cjs.map +1 -7
- package/build/components/welcome-guide/index.cjs +70 -94
- package/build/components/welcome-guide/index.cjs.map +1 -7
- package/build/controls/inserter-outer-section.cjs +68 -110
- package/build/controls/inserter-outer-section.cjs.map +1 -7
- package/build/controls/inspector-section.cjs +57 -90
- package/build/controls/inspector-section.cjs.map +1 -7
- package/build/controls/sidebar-control.cjs +55 -69
- package/build/controls/sidebar-control.cjs.map +1 -7
- package/build/controls/sidebar-section.cjs +79 -103
- package/build/controls/sidebar-section.cjs.map +1 -7
- package/build/filters/index.cjs +8 -5
- package/build/filters/move-to-sidebar.cjs +62 -78
- package/build/filters/move-to-sidebar.cjs.map +1 -7
- package/build/filters/replace-media-upload.cjs +11 -9
- package/build/filters/replace-media-upload.cjs.map +1 -7
- package/build/filters/wide-widget-display.cjs +20 -20
- package/build/filters/wide-widget-display.cjs.map +1 -7
- package/build/index.cjs +84 -91
- package/build/index.cjs.map +1 -7
- package/build/lock-unlock.cjs +10 -35
- package/build/lock-unlock.cjs.map +1 -7
- package/build/store/actions.cjs +49 -32
- package/build/store/actions.cjs.map +1 -7
- package/build/store/constants.cjs +12 -29
- package/build/store/constants.cjs.map +1 -7
- package/build/store/index.cjs +49 -41
- package/build/store/index.cjs.map +1 -7
- package/build/store/reducer.cjs +20 -33
- package/build/store/reducer.cjs.map +1 -7
- package/build/store/selectors.cjs +47 -38
- package/build/store/selectors.cjs.map +1 -7
- package/build/utils.cjs +81 -108
- package/build/utils.cjs.map +1 -7
- package/build-module/components/block-appender/index.mjs +18 -23
- package/build-module/components/block-appender/index.mjs.map +1 -7
- package/build-module/components/block-inspector-button/index.mjs +15 -28
- package/build-module/components/block-inspector-button/index.mjs.map +1 -7
- package/build-module/components/customize-widgets/index.mjs +45 -73
- package/build-module/components/customize-widgets/index.mjs.map +1 -7
- package/build-module/components/customize-widgets/use-clear-selected-block.mjs +52 -46
- package/build-module/components/customize-widgets/use-clear-selected-block.mjs.map +1 -7
- package/build-module/components/error-boundary/index.mjs +103 -128
- package/build-module/components/error-boundary/index.mjs.map +1 -7
- package/build-module/components/focus-control/index.mjs +37 -66
- package/build-module/components/focus-control/index.mjs.map +1 -7
- package/build-module/components/focus-control/use-blocks-focus-control.mjs +21 -27
- package/build-module/components/focus-control/use-blocks-focus-control.mjs.map +1 -7
- package/build-module/components/header/index.mjs +55 -92
- package/build-module/components/header/index.mjs.map +1 -7
- package/build-module/components/inserter/index.mjs +33 -53
- package/build-module/components/inserter/index.mjs.map +1 -7
- package/build-module/components/inserter/use-inserter.mjs +17 -34
- package/build-module/components/inserter/use-inserter.mjs.map +1 -7
- package/build-module/components/keyboard-shortcut-help-modal/config.mjs +83 -61
- package/build-module/components/keyboard-shortcut-help-modal/config.mjs.map +1 -7
- package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.mjs +19 -33
- package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.mjs.map +1 -7
- package/build-module/components/keyboard-shortcut-help-modal/index.mjs +75 -139
- package/build-module/components/keyboard-shortcut-help-modal/index.mjs.map +1 -7
- package/build-module/components/keyboard-shortcut-help-modal/shortcut.mjs +31 -55
- package/build-module/components/keyboard-shortcut-help-modal/shortcut.mjs.map +1 -7
- package/build-module/components/keyboard-shortcuts/index.mjs +62 -79
- package/build-module/components/keyboard-shortcuts/index.mjs.map +1 -7
- package/build-module/components/more-menu/index.mjs +76 -128
- package/build-module/components/more-menu/index.mjs.map +1 -7
- package/build-module/components/sidebar-block-editor/index.mjs +86 -128
- package/build-module/components/sidebar-block-editor/index.mjs.map +1 -7
- package/build-module/components/sidebar-block-editor/sidebar-adapter.mjs +202 -250
- package/build-module/components/sidebar-block-editor/sidebar-adapter.mjs.map +1 -7
- package/build-module/components/sidebar-block-editor/sidebar-editor-provider.mjs +17 -25
- package/build-module/components/sidebar-block-editor/sidebar-editor-provider.mjs.map +1 -7
- package/build-module/components/sidebar-block-editor/use-sidebar-block-editor.mjs +54 -86
- package/build-module/components/sidebar-block-editor/use-sidebar-block-editor.mjs.map +1 -7
- package/build-module/components/sidebar-controls/index.mjs +19 -27
- package/build-module/components/sidebar-controls/index.mjs.map +1 -7
- package/build-module/components/welcome-guide/index.mjs +62 -71
- package/build-module/components/welcome-guide/index.mjs.map +1 -7
- package/build-module/controls/inserter-outer-section.mjs +61 -88
- package/build-module/controls/inserter-outer-section.mjs.map +1 -7
- package/build-module/controls/inspector-section.mjs +52 -70
- package/build-module/controls/inspector-section.mjs.map +1 -7
- package/build-module/controls/sidebar-control.mjs +33 -45
- package/build-module/controls/sidebar-control.mjs.map +1 -7
- package/build-module/controls/sidebar-section.mjs +59 -80
- package/build-module/controls/sidebar-section.mjs.map +1 -7
- package/build-module/filters/index.mjs +0 -2
- package/build-module/filters/move-to-sidebar.mjs +52 -79
- package/build-module/filters/move-to-sidebar.mjs.map +1 -7
- package/build-module/filters/replace-media-upload.mjs +5 -8
- package/build-module/filters/replace-media-upload.mjs.map +1 -7
- package/build-module/filters/wide-widget-display.mjs +13 -18
- package/build-module/filters/wide-widget-display.mjs.map +1 -7
- package/build-module/index.mjs +53 -71
- package/build-module/index.mjs.map +1 -7
- package/build-module/lock-unlock.mjs +5 -10
- package/build-module/lock-unlock.mjs.map +1 -7
- package/build-module/store/actions.mjs +44 -8
- package/build-module/store/actions.mjs.map +1 -7
- package/build-module/store/constants.mjs +7 -5
- package/build-module/store/constants.mjs.map +1 -7
- package/build-module/store/index.mjs +15 -11
- package/build-module/store/index.mjs.map +1 -7
- package/build-module/store/reducer.mjs +15 -13
- package/build-module/store/reducer.mjs.map +1 -7
- package/build-module/store/selectors.mjs +41 -13
- package/build-module/store/selectors.mjs.map +1 -7
- package/build-module/utils.mjs +74 -82
- package/build-module/utils.mjs.map +1 -7
- package/package.json +27 -27
- package/src/components/customize-widgets/index.jsx +2 -2
- package/src/components/welcome-guide/index.jsx +6 -2
- package/build/filters/index.cjs.map +0 -7
- package/build-module/filters/index.mjs.map +0 -7
|
@@ -1,63 +1,85 @@
|
|
|
1
|
-
// packages/customize-widgets/src/components/keyboard-shortcut-help-modal/config.js
|
|
2
1
|
import { __ } from "@wordpress/i18n";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
2
|
+
// packages/customize-widgets/src/components/keyboard-shortcut-help-modal/config.js
|
|
3
|
+
const textFormattingShortcuts = [
|
|
4
|
+
{
|
|
5
|
+
keyCombination: {
|
|
6
|
+
modifier: "primary",
|
|
7
|
+
character: "b"
|
|
8
|
+
},
|
|
9
|
+
description: __("Make the selected text bold.")
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
keyCombination: {
|
|
13
|
+
modifier: "primary",
|
|
14
|
+
character: "i"
|
|
15
|
+
},
|
|
16
|
+
description: __("Make the selected text italic.")
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
keyCombination: {
|
|
20
|
+
modifier: "primary",
|
|
21
|
+
character: "k"
|
|
22
|
+
},
|
|
23
|
+
description: __("Convert the selected text into a link.")
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
keyCombination: {
|
|
27
|
+
modifier: "primaryShift",
|
|
28
|
+
character: "k"
|
|
29
|
+
},
|
|
30
|
+
description: __("Remove a link.")
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
keyCombination: { character: "[[" },
|
|
34
|
+
description: __("Insert a link to a post or page.")
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
keyCombination: {
|
|
38
|
+
modifier: "primary",
|
|
39
|
+
character: "u"
|
|
40
|
+
},
|
|
41
|
+
description: __("Underline the selected text.")
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
keyCombination: {
|
|
45
|
+
modifier: "access",
|
|
46
|
+
character: "d"
|
|
47
|
+
},
|
|
48
|
+
description: __("Strikethrough the selected text.")
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
keyCombination: {
|
|
52
|
+
modifier: "access",
|
|
53
|
+
character: "x"
|
|
54
|
+
},
|
|
55
|
+
description: __("Make the selected text inline code.")
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
keyCombination: {
|
|
59
|
+
modifier: "access",
|
|
60
|
+
character: "0"
|
|
61
|
+
},
|
|
62
|
+
aliases: [{
|
|
63
|
+
modifier: "access",
|
|
64
|
+
character: "7"
|
|
65
|
+
}],
|
|
66
|
+
description: __("Convert the current heading to a paragraph.")
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
keyCombination: {
|
|
70
|
+
modifier: "access",
|
|
71
|
+
character: "1-6"
|
|
72
|
+
},
|
|
73
|
+
description: __("Convert the current paragraph or heading to a heading of level 1 to 6.")
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
keyCombination: {
|
|
77
|
+
modifier: "primaryShift",
|
|
78
|
+
character: "SPACE"
|
|
79
|
+
},
|
|
80
|
+
description: __("Add non breaking space.")
|
|
81
|
+
}
|
|
59
82
|
];
|
|
60
|
-
export {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
//# sourceMappingURL=config.mjs.map
|
|
83
|
+
export { textFormattingShortcuts };
|
|
84
|
+
|
|
85
|
+
//# sourceMappingURL=config.mjs.map
|
|
@@ -1,7 +1 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/keyboard-shortcut-help-modal/config.js"],
|
|
4
|
-
"sourcesContent": ["import { __ } from '@wordpress/i18n';\n\nexport const textFormattingShortcuts = [\n\t{\n\t\tkeyCombination: { modifier: 'primary', character: 'b' },\n\t\tdescription: __( 'Make the selected text bold.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primary', character: 'i' },\n\t\tdescription: __( 'Make the selected text italic.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primary', character: 'k' },\n\t\tdescription: __( 'Convert the selected text into a link.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primaryShift', character: 'k' },\n\t\tdescription: __( 'Remove a link.' ),\n\t},\n\t{\n\t\tkeyCombination: { character: '[[' },\n\t\tdescription: __( 'Insert a link to a post or page.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primary', character: 'u' },\n\t\tdescription: __( 'Underline the selected text.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'access', character: 'd' },\n\t\tdescription: __( 'Strikethrough the selected text.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'access', character: 'x' },\n\t\tdescription: __( 'Make the selected text inline code.' ),\n\t},\n\t{\n\t\tkeyCombination: {\n\t\t\tmodifier: 'access',\n\t\t\tcharacter: '0',\n\t\t},\n\t\taliases: [\n\t\t\t{\n\t\t\t\tmodifier: 'access',\n\t\t\t\tcharacter: '7',\n\t\t\t},\n\t\t],\n\t\tdescription: __( 'Convert the current heading to a paragraph.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'access', character: '1-6' },\n\t\tdescription: __(\n\t\t\t'Convert the current paragraph or heading to a heading of level 1 to 6.'\n\t\t),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primaryShift', character: 'SPACE' },\n\t\tdescription: __( 'Add non breaking space.' ),\n\t},\n];\n"],
|
|
5
|
-
"mappings": ";AAAA,SAAS,UAAU;AAEZ,IAAM,0BAA0B;AAAA,EACtC;AAAA,IACC,gBAAgB,EAAE,UAAU,WAAW,WAAW,IAAI;AAAA,IACtD,aAAa,GAAI,8BAA+B;AAAA,EACjD;AAAA,EACA;AAAA,IACC,gBAAgB,EAAE,UAAU,WAAW,WAAW,IAAI;AAAA,IACtD,aAAa,GAAI,gCAAiC;AAAA,EACnD;AAAA,EACA;AAAA,IACC,gBAAgB,EAAE,UAAU,WAAW,WAAW,IAAI;AAAA,IACtD,aAAa,GAAI,wCAAyC;AAAA,EAC3D;AAAA,EACA;AAAA,IACC,gBAAgB,EAAE,UAAU,gBAAgB,WAAW,IAAI;AAAA,IAC3D,aAAa,GAAI,gBAAiB;AAAA,EACnC;AAAA,EACA;AAAA,IACC,gBAAgB,EAAE,WAAW,KAAK;AAAA,IAClC,aAAa,GAAI,kCAAmC;AAAA,EACrD;AAAA,EACA;AAAA,IACC,gBAAgB,EAAE,UAAU,WAAW,WAAW,IAAI;AAAA,IACtD,aAAa,GAAI,8BAA+B;AAAA,EACjD;AAAA,EACA;AAAA,IACC,gBAAgB,EAAE,UAAU,UAAU,WAAW,IAAI;AAAA,IACrD,aAAa,GAAI,kCAAmC;AAAA,EACrD;AAAA,EACA;AAAA,IACC,gBAAgB,EAAE,UAAU,UAAU,WAAW,IAAI;AAAA,IACrD,aAAa,GAAI,qCAAsC;AAAA,EACxD;AAAA,EACA;AAAA,IACC,gBAAgB;AAAA,MACf,UAAU;AAAA,MACV,WAAW;AAAA,IACZ;AAAA,IACA,SAAS;AAAA,MACR;AAAA,QACC,UAAU;AAAA,QACV,WAAW;AAAA,MACZ;AAAA,IACD;AAAA,IACA,aAAa,GAAI,6CAA8C;AAAA,EAChE;AAAA,EACA;AAAA,IACC,gBAAgB,EAAE,UAAU,UAAU,WAAW,MAAM;AAAA,IACvD,aAAa;AAAA,MACZ;AAAA,IACD;AAAA,EACD;AAAA,EACA;AAAA,IACC,gBAAgB,EAAE,UAAU,gBAAgB,WAAW,QAAQ;AAAA,IAC/D,aAAa,GAAI,yBAA0B;AAAA,EAC5C;AACD;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
1
|
+
{"version":3,"file":"config.mjs","names":[],"sources":["../../../src/components/keyboard-shortcut-help-modal/config.js"],"sourcesContent":["import { __ } from '@wordpress/i18n';\n\nexport const textFormattingShortcuts = [\n\t{\n\t\tkeyCombination: { modifier: 'primary', character: 'b' },\n\t\tdescription: __( 'Make the selected text bold.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primary', character: 'i' },\n\t\tdescription: __( 'Make the selected text italic.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primary', character: 'k' },\n\t\tdescription: __( 'Convert the selected text into a link.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primaryShift', character: 'k' },\n\t\tdescription: __( 'Remove a link.' ),\n\t},\n\t{\n\t\tkeyCombination: { character: '[[' },\n\t\tdescription: __( 'Insert a link to a post or page.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primary', character: 'u' },\n\t\tdescription: __( 'Underline the selected text.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'access', character: 'd' },\n\t\tdescription: __( 'Strikethrough the selected text.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'access', character: 'x' },\n\t\tdescription: __( 'Make the selected text inline code.' ),\n\t},\n\t{\n\t\tkeyCombination: {\n\t\t\tmodifier: 'access',\n\t\t\tcharacter: '0',\n\t\t},\n\t\taliases: [\n\t\t\t{\n\t\t\t\tmodifier: 'access',\n\t\t\t\tcharacter: '7',\n\t\t\t},\n\t\t],\n\t\tdescription: __( 'Convert the current heading to a paragraph.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'access', character: '1-6' },\n\t\tdescription: __(\n\t\t\t'Convert the current paragraph or heading to a heading of level 1 to 6.'\n\t\t),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primaryShift', character: 'SPACE' },\n\t\tdescription: __( 'Add non breaking space.' ),\n\t},\n];\n"],"mappings":";;AAEA,MAAa,0BAA0B;CACtC;EACC,gBAAgB;GAAE,UAAU;GAAW,WAAW;EAAI;EACtD,aAAa,GAAI,8BAA+B;CACjD;CACA;EACC,gBAAgB;GAAE,UAAU;GAAW,WAAW;EAAI;EACtD,aAAa,GAAI,gCAAiC;CACnD;CACA;EACC,gBAAgB;GAAE,UAAU;GAAW,WAAW;EAAI;EACtD,aAAa,GAAI,wCAAyC;CAC3D;CACA;EACC,gBAAgB;GAAE,UAAU;GAAgB,WAAW;EAAI;EAC3D,aAAa,GAAI,gBAAiB;CACnC;CACA;EACC,gBAAgB,EAAE,WAAW,KAAK;EAClC,aAAa,GAAI,kCAAmC;CACrD;CACA;EACC,gBAAgB;GAAE,UAAU;GAAW,WAAW;EAAI;EACtD,aAAa,GAAI,8BAA+B;CACjD;CACA;EACC,gBAAgB;GAAE,UAAU;GAAU,WAAW;EAAI;EACrD,aAAa,GAAI,kCAAmC;CACrD;CACA;EACC,gBAAgB;GAAE,UAAU;GAAU,WAAW;EAAI;EACrD,aAAa,GAAI,qCAAsC;CACxD;CACA;EACC,gBAAgB;GACf,UAAU;GACV,WAAW;EACZ;EACA,SAAS,CACR;GACC,UAAU;GACV,WAAW;EACZ,CACD;EACA,aAAa,GAAI,6CAA8C;CAChE;CACA;EACC,gBAAgB;GAAE,UAAU;GAAU,WAAW;EAAM;EACvD,aAAa,GACZ,wEACD;CACD;CACA;EACC,gBAAgB;GAAE,UAAU;GAAgB,WAAW;EAAQ;EAC/D,aAAa,GAAI,yBAA0B;CAC5C;AACD"}
|
|
@@ -1,38 +1,24 @@
|
|
|
1
|
-
// packages/customize-widgets/src/components/keyboard-shortcut-help-modal/dynamic-shortcut.jsx
|
|
2
1
|
import { useSelect } from "@wordpress/data";
|
|
3
|
-
import { store
|
|
2
|
+
import { store } from "@wordpress/keyboard-shortcuts";
|
|
4
3
|
import Shortcut from "./shortcut.mjs";
|
|
5
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
// packages/customize-widgets/src/components/keyboard-shortcut-help-modal/dynamic-shortcut.jsx
|
|
6
6
|
function DynamicShortcut({ name }) {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
);
|
|
22
|
-
if (!keyCombination) {
|
|
23
|
-
return null;
|
|
24
|
-
}
|
|
25
|
-
return /* @__PURE__ */ jsx(
|
|
26
|
-
Shortcut,
|
|
27
|
-
{
|
|
28
|
-
keyCombination,
|
|
29
|
-
description,
|
|
30
|
-
aliases
|
|
31
|
-
}
|
|
32
|
-
);
|
|
7
|
+
const { keyCombination, description, aliases } = useSelect((select) => {
|
|
8
|
+
const { getShortcutKeyCombination, getShortcutDescription, getShortcutAliases } = select(store);
|
|
9
|
+
return {
|
|
10
|
+
keyCombination: getShortcutKeyCombination(name),
|
|
11
|
+
aliases: getShortcutAliases(name),
|
|
12
|
+
description: getShortcutDescription(name)
|
|
13
|
+
};
|
|
14
|
+
}, [name]);
|
|
15
|
+
if (!keyCombination) return null;
|
|
16
|
+
return /* @__PURE__ */ jsx(Shortcut, {
|
|
17
|
+
keyCombination,
|
|
18
|
+
description,
|
|
19
|
+
aliases
|
|
20
|
+
});
|
|
33
21
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
};
|
|
38
|
-
//# sourceMappingURL=dynamic-shortcut.mjs.map
|
|
22
|
+
export { DynamicShortcut as default };
|
|
23
|
+
|
|
24
|
+
//# sourceMappingURL=dynamic-shortcut.mjs.map
|
|
@@ -1,7 +1 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/keyboard-shortcut-help-modal/dynamic-shortcut.jsx"],
|
|
4
|
-
"sourcesContent": ["import { useSelect } from '@wordpress/data';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\nimport Shortcut from './shortcut';\n\nfunction DynamicShortcut( { name } ) {\n\tconst { keyCombination, description, aliases } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetShortcutKeyCombination,\n\t\t\t\tgetShortcutDescription,\n\t\t\t\tgetShortcutAliases,\n\t\t\t} = select( keyboardShortcutsStore );\n\n\t\t\treturn {\n\t\t\t\tkeyCombination: getShortcutKeyCombination( name ),\n\t\t\t\taliases: getShortcutAliases( name ),\n\t\t\t\tdescription: getShortcutDescription( name ),\n\t\t\t};\n\t\t},\n\t\t[ name ]\n\t);\n\n\tif ( ! keyCombination ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Shortcut\n\t\t\tkeyCombination={ keyCombination }\n\t\t\tdescription={ description }\n\t\t\taliases={ aliases }\n\t\t/>\n\t);\n}\n\nexport default DynamicShortcut;\n"],
|
|
5
|
-
"mappings": ";AAAA,SAAS,iBAAiB;AAC1B,SAAS,SAAS,8BAA8B;AAChD,OAAO,cAAc;AAyBnB;AAvBF,SAAS,gBAAiB,EAAE,KAAK,GAAI;AACpC,QAAM,EAAE,gBAAgB,aAAa,QAAQ,IAAI;AAAA,IAChD,CAAE,WAAY;AACb,YAAM;AAAA,QACL;AAAA,QACA;AAAA,QACA;AAAA,MACD,IAAI,OAAQ,sBAAuB;AAEnC,aAAO;AAAA,QACN,gBAAgB,0BAA2B,IAAK;AAAA,QAChD,SAAS,mBAAoB,IAAK;AAAA,QAClC,aAAa,uBAAwB,IAAK;AAAA,MAC3C;AAAA,IACD;AAAA,IACA,CAAE,IAAK;AAAA,EACR;AAEA,MAAK,CAAE,gBAAiB;AACvB,WAAO;AAAA,EACR;AAEA,SACC;AAAA,IAAC;AAAA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAAA,EACD;AAEF;AAEA,IAAO,2BAAQ;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
1
|
+
{"version":3,"file":"dynamic-shortcut.mjs","names":["keyboardShortcutsStore"],"sources":["../../../src/components/keyboard-shortcut-help-modal/dynamic-shortcut.jsx"],"sourcesContent":["import { useSelect } from '@wordpress/data';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\nimport Shortcut from './shortcut';\n\nfunction DynamicShortcut( { name } ) {\n\tconst { keyCombination, description, aliases } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetShortcutKeyCombination,\n\t\t\t\tgetShortcutDescription,\n\t\t\t\tgetShortcutAliases,\n\t\t\t} = select( keyboardShortcutsStore );\n\n\t\t\treturn {\n\t\t\t\tkeyCombination: getShortcutKeyCombination( name ),\n\t\t\t\taliases: getShortcutAliases( name ),\n\t\t\t\tdescription: getShortcutDescription( name ),\n\t\t\t};\n\t\t},\n\t\t[ name ]\n\t);\n\n\tif ( ! keyCombination ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Shortcut\n\t\t\tkeyCombination={ keyCombination }\n\t\t\tdescription={ description }\n\t\t\taliases={ aliases }\n\t\t/>\n\t);\n}\n\nexport default DynamicShortcut;\n"],"mappings":";;;;;AAIA,SAAS,gBAAiB,EAAE,QAAS;CACpC,MAAM,EAAE,gBAAgB,aAAa,YAAY,WAC9C,WAAY;EACb,MAAM,EACL,2BACA,wBACA,uBACG,OAAQA,KAAuB;EAEnC,OAAO;GACN,gBAAgB,0BAA2B,IAAK;GAChD,SAAS,mBAAoB,IAAK;GAClC,aAAa,uBAAwB,IAAK;EAC3C;CACD,GACA,CAAE,IAAK,CACR;CAEA,IAAK,CAAE,gBACN,OAAO;CAGR,OACC,oBAAC,UAAD;EACkB;EACH;EACJ;CACV,CAAA;AAEH"}
|
|
@@ -1,150 +1,86 @@
|
|
|
1
|
-
// packages/customize-widgets/src/components/keyboard-shortcut-help-modal/index.jsx
|
|
2
1
|
import clsx from "clsx";
|
|
3
2
|
import { Modal } from "@wordpress/components";
|
|
4
3
|
import { __ } from "@wordpress/i18n";
|
|
5
|
-
import {
|
|
6
|
-
useShortcut,
|
|
7
|
-
store as keyboardShortcutsStore
|
|
8
|
-
} from "@wordpress/keyboard-shortcuts";
|
|
4
|
+
import { store, useShortcut } from "@wordpress/keyboard-shortcuts";
|
|
9
5
|
import { useDispatch, useSelect } from "@wordpress/data";
|
|
10
6
|
import { useEffect } from "@wordpress/element";
|
|
11
7
|
import { textFormattingShortcuts } from "./config.mjs";
|
|
12
8
|
import Shortcut from "./shortcut.mjs";
|
|
13
9
|
import DynamicShortcut from "./dynamic-shortcut.mjs";
|
|
14
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
{
|
|
40
|
-
className: clsx(
|
|
41
|
-
"customize-widgets-keyboard-shortcut-help-modal__section",
|
|
42
|
-
className
|
|
43
|
-
),
|
|
44
|
-
children: [
|
|
45
|
-
!!title && /* @__PURE__ */ jsx("h2", { className: "customize-widgets-keyboard-shortcut-help-modal__section-title", children: title }),
|
|
46
|
-
/* @__PURE__ */ jsx(ShortcutList, { shortcuts })
|
|
47
|
-
]
|
|
48
|
-
}
|
|
49
|
-
);
|
|
50
|
-
var ShortcutCategorySection = ({
|
|
51
|
-
title,
|
|
52
|
-
categoryName,
|
|
53
|
-
additionalShortcuts = []
|
|
54
|
-
}) => {
|
|
55
|
-
const categoryShortcuts = useSelect(
|
|
56
|
-
(select) => {
|
|
57
|
-
return select(keyboardShortcutsStore).getCategoryShortcuts(
|
|
58
|
-
categoryName
|
|
59
|
-
);
|
|
60
|
-
},
|
|
61
|
-
[categoryName]
|
|
62
|
-
);
|
|
63
|
-
return /* @__PURE__ */ jsx(
|
|
64
|
-
ShortcutSection,
|
|
65
|
-
{
|
|
66
|
-
title,
|
|
67
|
-
shortcuts: categoryShortcuts.concat(additionalShortcuts)
|
|
68
|
-
}
|
|
69
|
-
);
|
|
11
|
+
// packages/customize-widgets/src/components/keyboard-shortcut-help-modal/index.jsx
|
|
12
|
+
const ShortcutList = ({ shortcuts }) => /* @__PURE__ */ jsx("ul", {
|
|
13
|
+
className: "customize-widgets-keyboard-shortcut-help-modal__shortcut-list",
|
|
14
|
+
role: "list",
|
|
15
|
+
children: shortcuts.map((shortcut, index) => /* @__PURE__ */ jsx("li", {
|
|
16
|
+
className: "customize-widgets-keyboard-shortcut-help-modal__shortcut",
|
|
17
|
+
children: typeof shortcut === "string" ? /* @__PURE__ */ jsx(DynamicShortcut, { name: shortcut }) : /* @__PURE__ */ jsx(Shortcut, { ...shortcut })
|
|
18
|
+
}, index))
|
|
19
|
+
});
|
|
20
|
+
const ShortcutSection = ({ title, shortcuts, className }) => /* @__PURE__ */ jsxs("section", {
|
|
21
|
+
className: clsx("customize-widgets-keyboard-shortcut-help-modal__section", className),
|
|
22
|
+
children: [!!title && /* @__PURE__ */ jsx("h2", {
|
|
23
|
+
className: "customize-widgets-keyboard-shortcut-help-modal__section-title",
|
|
24
|
+
children: title
|
|
25
|
+
}), /* @__PURE__ */ jsx(ShortcutList, { shortcuts })]
|
|
26
|
+
});
|
|
27
|
+
const ShortcutCategorySection = ({ title, categoryName, additionalShortcuts = [] }) => {
|
|
28
|
+
const categoryShortcuts = useSelect((select) => {
|
|
29
|
+
return select(store).getCategoryShortcuts(categoryName);
|
|
30
|
+
}, [categoryName]);
|
|
31
|
+
return /* @__PURE__ */ jsx(ShortcutSection, {
|
|
32
|
+
title,
|
|
33
|
+
shortcuts: categoryShortcuts.concat(additionalShortcuts)
|
|
34
|
+
});
|
|
70
35
|
};
|
|
71
|
-
function KeyboardShortcutHelpModal({
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
),
|
|
119
|
-
/* @__PURE__ */ jsx(
|
|
120
|
-
ShortcutCategorySection,
|
|
121
|
-
{
|
|
122
|
-
title: __("Block shortcuts"),
|
|
123
|
-
categoryName: "block",
|
|
124
|
-
additionalShortcuts: [
|
|
125
|
-
{
|
|
126
|
-
keyCombination: { character: "/" },
|
|
127
|
-
description: __(
|
|
128
|
-
"Change the block type after adding a new paragraph."
|
|
129
|
-
),
|
|
130
|
-
/* translators: The forward-slash character. e.g. '/'. */
|
|
131
|
-
ariaLabel: __("Forward-slash")
|
|
132
|
-
}
|
|
133
|
-
]
|
|
134
|
-
}
|
|
135
|
-
),
|
|
136
|
-
/* @__PURE__ */ jsx(
|
|
137
|
-
ShortcutSection,
|
|
138
|
-
{
|
|
139
|
-
title: __("Text formatting"),
|
|
140
|
-
shortcuts: textFormattingShortcuts
|
|
141
|
-
}
|
|
142
|
-
)
|
|
143
|
-
]
|
|
144
|
-
}
|
|
145
|
-
);
|
|
36
|
+
function KeyboardShortcutHelpModal({ isModalActive, toggleModal }) {
|
|
37
|
+
const { registerShortcut } = useDispatch(store);
|
|
38
|
+
useEffect(() => {
|
|
39
|
+
registerShortcut({
|
|
40
|
+
name: "core/customize-widgets/keyboard-shortcuts",
|
|
41
|
+
category: "main",
|
|
42
|
+
description: __("Display these keyboard shortcuts."),
|
|
43
|
+
keyCombination: {
|
|
44
|
+
modifier: "access",
|
|
45
|
+
character: "h"
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
}, [registerShortcut]);
|
|
49
|
+
useShortcut("core/customize-widgets/keyboard-shortcuts", toggleModal);
|
|
50
|
+
if (!isModalActive) return null;
|
|
51
|
+
return /* @__PURE__ */ jsxs(Modal, {
|
|
52
|
+
className: "customize-widgets-keyboard-shortcut-help-modal",
|
|
53
|
+
title: __("Keyboard shortcuts"),
|
|
54
|
+
onRequestClose: toggleModal,
|
|
55
|
+
children: [
|
|
56
|
+
/* @__PURE__ */ jsx(ShortcutSection, {
|
|
57
|
+
className: "customize-widgets-keyboard-shortcut-help-modal__main-shortcuts",
|
|
58
|
+
shortcuts: ["core/customize-widgets/keyboard-shortcuts"]
|
|
59
|
+
}),
|
|
60
|
+
/* @__PURE__ */ jsx(ShortcutCategorySection, {
|
|
61
|
+
title: __("Global shortcuts"),
|
|
62
|
+
categoryName: "global"
|
|
63
|
+
}),
|
|
64
|
+
/* @__PURE__ */ jsx(ShortcutCategorySection, {
|
|
65
|
+
title: __("Selection shortcuts"),
|
|
66
|
+
categoryName: "selection"
|
|
67
|
+
}),
|
|
68
|
+
/* @__PURE__ */ jsx(ShortcutCategorySection, {
|
|
69
|
+
title: __("Block shortcuts"),
|
|
70
|
+
categoryName: "block",
|
|
71
|
+
additionalShortcuts: [{
|
|
72
|
+
keyCombination: { character: "/" },
|
|
73
|
+
description: __("Change the block type after adding a new paragraph."),
|
|
74
|
+
ariaLabel: __("Forward-slash")
|
|
75
|
+
}]
|
|
76
|
+
}),
|
|
77
|
+
/* @__PURE__ */ jsx(ShortcutSection, {
|
|
78
|
+
title: __("Text formatting"),
|
|
79
|
+
shortcuts: textFormattingShortcuts
|
|
80
|
+
})
|
|
81
|
+
]
|
|
82
|
+
});
|
|
146
83
|
}
|
|
147
|
-
export {
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
//# sourceMappingURL=index.mjs.map
|
|
84
|
+
export { KeyboardShortcutHelpModal as default };
|
|
85
|
+
|
|
86
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,7 +1 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/keyboard-shortcut-help-modal/index.jsx"],
|
|
4
|
-
"sourcesContent": ["import clsx from 'clsx';\nimport { Modal } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tuseShortcut,\n\tstore as keyboardShortcutsStore,\n} from '@wordpress/keyboard-shortcuts';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useEffect } from '@wordpress/element';\nimport { textFormattingShortcuts } from './config';\nimport Shortcut from './shortcut';\nimport DynamicShortcut from './dynamic-shortcut';\n\nconst ShortcutList = ( { shortcuts } ) => (\n\t/*\n\t * Disable reason: The `list` ARIA role is redundant but\n\t * Safari+VoiceOver won't announce the list otherwise.\n\t */\n\t/* eslint-disable jsx-a11y/no-redundant-roles */\n\t<ul\n\t\tclassName=\"customize-widgets-keyboard-shortcut-help-modal__shortcut-list\"\n\t\trole=\"list\"\n\t>\n\t\t{ shortcuts.map( ( shortcut, index ) => (\n\t\t\t<li\n\t\t\t\tclassName=\"customize-widgets-keyboard-shortcut-help-modal__shortcut\"\n\t\t\t\tkey={ index }\n\t\t\t>\n\t\t\t\t{ typeof shortcut === 'string' ? (\n\t\t\t\t\t<DynamicShortcut name={ shortcut } />\n\t\t\t\t) : (\n\t\t\t\t\t<Shortcut { ...shortcut } />\n\t\t\t\t) }\n\t\t\t</li>\n\t\t) ) }\n\t</ul>\n\t/* eslint-enable jsx-a11y/no-redundant-roles */\n);\n\nconst ShortcutSection = ( { title, shortcuts, className } ) => (\n\t<section\n\t\tclassName={ clsx(\n\t\t\t'customize-widgets-keyboard-shortcut-help-modal__section',\n\t\t\tclassName\n\t\t) }\n\t>\n\t\t{ !! title && (\n\t\t\t<h2 className=\"customize-widgets-keyboard-shortcut-help-modal__section-title\">\n\t\t\t\t{ title }\n\t\t\t</h2>\n\t\t) }\n\t\t<ShortcutList shortcuts={ shortcuts } />\n\t</section>\n);\n\nconst ShortcutCategorySection = ( {\n\ttitle,\n\tcategoryName,\n\tadditionalShortcuts = [],\n} ) => {\n\tconst categoryShortcuts = useSelect(\n\t\t( select ) => {\n\t\t\treturn select( keyboardShortcutsStore ).getCategoryShortcuts(\n\t\t\t\tcategoryName\n\t\t\t);\n\t\t},\n\t\t[ categoryName ]\n\t);\n\n\treturn (\n\t\t<ShortcutSection\n\t\t\ttitle={ title }\n\t\t\tshortcuts={ categoryShortcuts.concat( additionalShortcuts ) }\n\t\t/>\n\t);\n};\n\nexport default function KeyboardShortcutHelpModal( {\n\tisModalActive,\n\ttoggleModal,\n} ) {\n\tconst { registerShortcut } = useDispatch( keyboardShortcutsStore );\n\n\tuseEffect( () => {\n\t\tregisterShortcut( {\n\t\t\tname: 'core/customize-widgets/keyboard-shortcuts',\n\t\t\tcategory: 'main',\n\t\t\tdescription: __( 'Display these keyboard shortcuts.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'access',\n\t\t\t\tcharacter: 'h',\n\t\t\t},\n\t\t} );\n\t}, [ registerShortcut ] );\n\n\tuseShortcut( 'core/customize-widgets/keyboard-shortcuts', toggleModal );\n\n\tif ( ! isModalActive ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Modal\n\t\t\tclassName=\"customize-widgets-keyboard-shortcut-help-modal\"\n\t\t\ttitle={ __( 'Keyboard shortcuts' ) }\n\t\t\tonRequestClose={ toggleModal }\n\t\t>\n\t\t\t<ShortcutSection\n\t\t\t\tclassName=\"customize-widgets-keyboard-shortcut-help-modal__main-shortcuts\"\n\t\t\t\tshortcuts={ [ 'core/customize-widgets/keyboard-shortcuts' ] }\n\t\t\t/>\n\t\t\t<ShortcutCategorySection\n\t\t\t\ttitle={ __( 'Global shortcuts' ) }\n\t\t\t\tcategoryName=\"global\"\n\t\t\t/>\n\n\t\t\t<ShortcutCategorySection\n\t\t\t\ttitle={ __( 'Selection shortcuts' ) }\n\t\t\t\tcategoryName=\"selection\"\n\t\t\t/>\n\n\t\t\t<ShortcutCategorySection\n\t\t\t\ttitle={ __( 'Block shortcuts' ) }\n\t\t\t\tcategoryName=\"block\"\n\t\t\t\tadditionalShortcuts={ [\n\t\t\t\t\t{\n\t\t\t\t\t\tkeyCombination: { character: '/' },\n\t\t\t\t\t\tdescription: __(\n\t\t\t\t\t\t\t'Change the block type after adding a new paragraph.'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t/* translators: The forward-slash character. e.g. '/'. */\n\t\t\t\t\t\tariaLabel: __( 'Forward-slash' ),\n\t\t\t\t\t},\n\t\t\t\t] }\n\t\t\t/>\n\t\t\t<ShortcutSection\n\t\t\t\ttitle={ __( 'Text formatting' ) }\n\t\t\t\tshortcuts={ textFormattingShortcuts }\n\t\t\t/>\n\t\t</Modal>\n\t);\n}\n"],
|
|
5
|
-
"mappings": ";AAAA,OAAO,UAAU;AACjB,SAAS,aAAa;AACtB,SAAS,UAAU;AACnB;AAAA,EACC;AAAA,EACA,SAAS;AAAA,OACH;AACP,SAAS,aAAa,iBAAiB;AACvC,SAAS,iBAAiB;AAC1B,SAAS,+BAA+B;AACxC,OAAO,cAAc;AACrB,OAAO,qBAAqB;AAkBvB,cAWJ,YAXI;AAhBL,IAAM,eAAe,CAAE,EAAE,UAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMlC;AAAA,IAAC;AAAA;AAAA,MACA,WAAU;AAAA,MACV,MAAK;AAAA,MAEH,oBAAU,IAAK,CAAE,UAAU,UAC5B;AAAA,QAAC;AAAA;AAAA,UACA,WAAU;AAAA,UAGR,iBAAO,aAAa,WACrB,oBAAC,mBAAgB,MAAO,UAAW,IAEnC,oBAAC,YAAW,GAAG,UAAW;AAAA;AAAA,QALrB;AAAA,MAOP,CACC;AAAA;AAAA,EACH;AAAA;AAID,IAAM,kBAAkB,CAAE,EAAE,OAAO,WAAW,UAAU,MACvD;AAAA,EAAC;AAAA;AAAA,IACA,WAAY;AAAA,MACX;AAAA,MACA;AAAA,IACD;AAAA,IAEE;AAAA,OAAC,CAAE,SACJ,oBAAC,QAAG,WAAU,iEACX,iBACH;AAAA,MAED,oBAAC,gBAAa,WAAwB;AAAA;AAAA;AACvC;AAGD,IAAM,0BAA0B,CAAE;AAAA,EACjC;AAAA,EACA;AAAA,EACA,sBAAsB,CAAC;AACxB,MAAO;AACN,QAAM,oBAAoB;AAAA,IACzB,CAAE,WAAY;AACb,aAAO,OAAQ,sBAAuB,EAAE;AAAA,QACvC;AAAA,MACD;AAAA,IACD;AAAA,IACA,CAAE,YAAa;AAAA,EAChB;AAEA,SACC;AAAA,IAAC;AAAA;AAAA,MACA;AAAA,MACA,WAAY,kBAAkB,OAAQ,mBAAoB;AAAA;AAAA,EAC3D;AAEF;AAEe,SAAR,0BAA4C;AAAA,EAClD;AAAA,EACA;AACD,GAAI;AACH,QAAM,EAAE,iBAAiB,IAAI,YAAa,sBAAuB;AAEjE,YAAW,MAAM;AAChB,qBAAkB;AAAA,MACjB,MAAM;AAAA,MACN,UAAU;AAAA,MACV,aAAa,GAAI,mCAAoC;AAAA,MACrD,gBAAgB;AAAA,QACf,UAAU;AAAA,QACV,WAAW;AAAA,MACZ;AAAA,IACD,CAAE;AAAA,EACH,GAAG,CAAE,gBAAiB,CAAE;AAExB,cAAa,6CAA6C,WAAY;AAEtE,MAAK,CAAE,eAAgB;AACtB,WAAO;AAAA,EACR;AAEA,SACC;AAAA,IAAC;AAAA;AAAA,MACA,WAAU;AAAA,MACV,OAAQ,GAAI,oBAAqB;AAAA,MACjC,gBAAiB;AAAA,MAEjB;AAAA;AAAA,UAAC;AAAA;AAAA,YACA,WAAU;AAAA,YACV,WAAY,CAAE,2CAA4C;AAAA;AAAA,QAC3D;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACA,OAAQ,GAAI,kBAAmB;AAAA,YAC/B,cAAa;AAAA;AAAA,QACd;AAAA,QAEA;AAAA,UAAC;AAAA;AAAA,YACA,OAAQ,GAAI,qBAAsB;AAAA,YAClC,cAAa;AAAA;AAAA,QACd;AAAA,QAEA;AAAA,UAAC;AAAA;AAAA,YACA,OAAQ,GAAI,iBAAkB;AAAA,YAC9B,cAAa;AAAA,YACb,qBAAsB;AAAA,cACrB;AAAA,gBACC,gBAAgB,EAAE,WAAW,IAAI;AAAA,gBACjC,aAAa;AAAA,kBACZ;AAAA,gBACD;AAAA;AAAA,gBAEA,WAAW,GAAI,eAAgB;AAAA,cAChC;AAAA,YACD;AAAA;AAAA,QACD;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACA,OAAQ,GAAI,iBAAkB;AAAA,YAC9B,WAAY;AAAA;AAAA,QACb;AAAA;AAAA;AAAA,EACD;AAEF;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["keyboardShortcutsStore"],"sources":["../../../src/components/keyboard-shortcut-help-modal/index.jsx"],"sourcesContent":["import clsx from 'clsx';\nimport { Modal } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tuseShortcut,\n\tstore as keyboardShortcutsStore,\n} from '@wordpress/keyboard-shortcuts';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useEffect } from '@wordpress/element';\nimport { textFormattingShortcuts } from './config';\nimport Shortcut from './shortcut';\nimport DynamicShortcut from './dynamic-shortcut';\n\nconst ShortcutList = ( { shortcuts } ) => (\n\t/*\n\t * Disable reason: The `list` ARIA role is redundant but\n\t * Safari+VoiceOver won't announce the list otherwise.\n\t */\n\t/* eslint-disable jsx-a11y/no-redundant-roles */\n\t<ul\n\t\tclassName=\"customize-widgets-keyboard-shortcut-help-modal__shortcut-list\"\n\t\trole=\"list\"\n\t>\n\t\t{ shortcuts.map( ( shortcut, index ) => (\n\t\t\t<li\n\t\t\t\tclassName=\"customize-widgets-keyboard-shortcut-help-modal__shortcut\"\n\t\t\t\tkey={ index }\n\t\t\t>\n\t\t\t\t{ typeof shortcut === 'string' ? (\n\t\t\t\t\t<DynamicShortcut name={ shortcut } />\n\t\t\t\t) : (\n\t\t\t\t\t<Shortcut { ...shortcut } />\n\t\t\t\t) }\n\t\t\t</li>\n\t\t) ) }\n\t</ul>\n\t/* eslint-enable jsx-a11y/no-redundant-roles */\n);\n\nconst ShortcutSection = ( { title, shortcuts, className } ) => (\n\t<section\n\t\tclassName={ clsx(\n\t\t\t'customize-widgets-keyboard-shortcut-help-modal__section',\n\t\t\tclassName\n\t\t) }\n\t>\n\t\t{ !! title && (\n\t\t\t<h2 className=\"customize-widgets-keyboard-shortcut-help-modal__section-title\">\n\t\t\t\t{ title }\n\t\t\t</h2>\n\t\t) }\n\t\t<ShortcutList shortcuts={ shortcuts } />\n\t</section>\n);\n\nconst ShortcutCategorySection = ( {\n\ttitle,\n\tcategoryName,\n\tadditionalShortcuts = [],\n} ) => {\n\tconst categoryShortcuts = useSelect(\n\t\t( select ) => {\n\t\t\treturn select( keyboardShortcutsStore ).getCategoryShortcuts(\n\t\t\t\tcategoryName\n\t\t\t);\n\t\t},\n\t\t[ categoryName ]\n\t);\n\n\treturn (\n\t\t<ShortcutSection\n\t\t\ttitle={ title }\n\t\t\tshortcuts={ categoryShortcuts.concat( additionalShortcuts ) }\n\t\t/>\n\t);\n};\n\nexport default function KeyboardShortcutHelpModal( {\n\tisModalActive,\n\ttoggleModal,\n} ) {\n\tconst { registerShortcut } = useDispatch( keyboardShortcutsStore );\n\n\tuseEffect( () => {\n\t\tregisterShortcut( {\n\t\t\tname: 'core/customize-widgets/keyboard-shortcuts',\n\t\t\tcategory: 'main',\n\t\t\tdescription: __( 'Display these keyboard shortcuts.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'access',\n\t\t\t\tcharacter: 'h',\n\t\t\t},\n\t\t} );\n\t}, [ registerShortcut ] );\n\n\tuseShortcut( 'core/customize-widgets/keyboard-shortcuts', toggleModal );\n\n\tif ( ! isModalActive ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Modal\n\t\t\tclassName=\"customize-widgets-keyboard-shortcut-help-modal\"\n\t\t\ttitle={ __( 'Keyboard shortcuts' ) }\n\t\t\tonRequestClose={ toggleModal }\n\t\t>\n\t\t\t<ShortcutSection\n\t\t\t\tclassName=\"customize-widgets-keyboard-shortcut-help-modal__main-shortcuts\"\n\t\t\t\tshortcuts={ [ 'core/customize-widgets/keyboard-shortcuts' ] }\n\t\t\t/>\n\t\t\t<ShortcutCategorySection\n\t\t\t\ttitle={ __( 'Global shortcuts' ) }\n\t\t\t\tcategoryName=\"global\"\n\t\t\t/>\n\n\t\t\t<ShortcutCategorySection\n\t\t\t\ttitle={ __( 'Selection shortcuts' ) }\n\t\t\t\tcategoryName=\"selection\"\n\t\t\t/>\n\n\t\t\t<ShortcutCategorySection\n\t\t\t\ttitle={ __( 'Block shortcuts' ) }\n\t\t\t\tcategoryName=\"block\"\n\t\t\t\tadditionalShortcuts={ [\n\t\t\t\t\t{\n\t\t\t\t\t\tkeyCombination: { character: '/' },\n\t\t\t\t\t\tdescription: __(\n\t\t\t\t\t\t\t'Change the block type after adding a new paragraph.'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t/* translators: The forward-slash character. e.g. '/'. */\n\t\t\t\t\t\tariaLabel: __( 'Forward-slash' ),\n\t\t\t\t\t},\n\t\t\t\t] }\n\t\t\t/>\n\t\t\t<ShortcutSection\n\t\t\t\ttitle={ __( 'Text formatting' ) }\n\t\t\t\tshortcuts={ textFormattingShortcuts }\n\t\t\t/>\n\t\t</Modal>\n\t);\n}\n"],"mappings":";;;;;;;;;;;AAaA,MAAM,gBAAiB,EAAE,gBAMxB,oBAAC,MAAD;CACC,WAAU;CACV,MAAK;CAEH,UAAA,UAAU,KAAO,UAAU,UAC5B,oBAAC,MAAD;EACC,WAAU;EAGR,UAAA,OAAO,aAAa,WACrB,oBAAC,iBAAD,EAAiB,MAAO,SAAY,CAAA,IAEpC,oBAAC,UAAD,EAAU,GAAK,SAAY,CAAA;CAEzB,GAPG,KAOH,CACH;AACC,CAAA;AAIL,MAAM,mBAAoB,EAAE,OAAO,WAAW,gBAC7C,qBAAC,WAAD;CACC,WAAY,KACX,2DACA,SACD;CAJD,UAAA,CAMG,CAAC,CAAE,SACJ,oBAAC,MAAD;EAAI,WAAU;EACX,UAAA;CACC,CAAA,GAEL,oBAAC,cAAD,EAA0B,UAAa,CAAA,CAC/B;;AAGV,MAAM,2BAA4B,EACjC,OACA,cACA,sBAAsB,CAAC,QACjB;CACN,MAAM,oBAAoB,WACvB,WAAY;EACb,OAAO,OAAQA,KAAuB,CAAC,CAAC,qBACvC,YACD;CACD,GACA,CAAE,YAAa,CAChB;CAEA,OACC,oBAAC,iBAAD;EACS;EACR,WAAY,kBAAkB,OAAQ,mBAAoB;CAC1D,CAAA;AAEH;AAEA,SAAwB,0BAA2B,EAClD,eACA,eACG;CACH,MAAM,EAAE,qBAAqB,YAAaA,KAAuB;CAEjE,gBAAiB;EAChB,iBAAkB;GACjB,MAAM;GACN,UAAU;GACV,aAAa,GAAI,mCAAoC;GACrD,gBAAgB;IACf,UAAU;IACV,WAAW;GACZ;EACD,CAAE;CACH,GAAG,CAAE,gBAAiB,CAAE;CAExB,YAAa,6CAA6C,WAAY;CAEtE,IAAK,CAAE,eACN,OAAO;CAGR,OACC,qBAAC,OAAD;EACC,WAAU;EACV,OAAQ,GAAI,oBAAqB;EACjC,gBAAiB;EAHlB,UAAA;GAKC,oBAAC,iBAAD;IACC,WAAU;IACV,WAAY,CAAE,2CAA4C;GAC1D,CAAA;GACD,oBAAC,yBAAD;IACC,OAAQ,GAAI,kBAAmB;IAC/B,cAAa;GACb,CAAA;GAED,oBAAC,yBAAD;IACC,OAAQ,GAAI,qBAAsB;IAClC,cAAa;GACb,CAAA;GAED,oBAAC,yBAAD;IACC,OAAQ,GAAI,iBAAkB;IAC9B,cAAa;IACb,qBAAsB,CACrB;KACC,gBAAgB,EAAE,WAAW,IAAI;KACjC,aAAa,GACZ,qDACD;KAEA,WAAW,GAAI,eAAgB;IAChC,CACD;GACA,CAAA;GACD,oBAAC,iBAAD;IACC,OAAQ,GAAI,iBAAkB;IAC9B,WAAY;GACZ,CAAA;EACK;;AAET"}
|
|
@@ -1,61 +1,37 @@
|
|
|
1
|
-
// packages/customize-widgets/src/components/keyboard-shortcut-help-modal/shortcut.jsx
|
|
2
1
|
import { Fragment } from "@wordpress/element";
|
|
3
2
|
import { displayShortcutList, shortcutAriaLabel } from "@wordpress/keycodes";
|
|
4
|
-
import { Fragment as
|
|
3
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
// packages/customize-widgets/src/components/keyboard-shortcut-help-modal/shortcut.jsx
|
|
5
5
|
function KeyCombination({ keyCombination, forceAriaLabel }) {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
if (character === "+") {
|
|
20
|
-
return /* @__PURE__ */ jsx(Fragment, { children: character }, index);
|
|
21
|
-
}
|
|
22
|
-
return /* @__PURE__ */ jsx(
|
|
23
|
-
"kbd",
|
|
24
|
-
{
|
|
25
|
-
className: "customize-widgets-keyboard-shortcut-help-modal__shortcut-key",
|
|
26
|
-
children: character
|
|
27
|
-
},
|
|
28
|
-
index
|
|
29
|
-
);
|
|
30
|
-
}
|
|
31
|
-
)
|
|
32
|
-
}
|
|
33
|
-
);
|
|
6
|
+
const shortcut = keyCombination.modifier ? displayShortcutList[keyCombination.modifier](keyCombination.character) : keyCombination.character;
|
|
7
|
+
const ariaLabel = keyCombination.modifier ? shortcutAriaLabel[keyCombination.modifier](keyCombination.character) : keyCombination.character;
|
|
8
|
+
return /* @__PURE__ */ jsx("kbd", {
|
|
9
|
+
className: "customize-widgets-keyboard-shortcut-help-modal__shortcut-key-combination",
|
|
10
|
+
"aria-label": forceAriaLabel || ariaLabel,
|
|
11
|
+
children: (Array.isArray(shortcut) ? shortcut : [shortcut]).map((character, index) => {
|
|
12
|
+
if (character === "+") return /* @__PURE__ */ jsx(Fragment, { children: character }, index);
|
|
13
|
+
return /* @__PURE__ */ jsx("kbd", {
|
|
14
|
+
className: "customize-widgets-keyboard-shortcut-help-modal__shortcut-key",
|
|
15
|
+
children: character
|
|
16
|
+
}, index);
|
|
17
|
+
})
|
|
18
|
+
});
|
|
34
19
|
}
|
|
35
20
|
function Shortcut({ description, keyCombination, aliases = [], ariaLabel }) {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
keyCombination: alias,
|
|
50
|
-
forceAriaLabel: ariaLabel
|
|
51
|
-
},
|
|
52
|
-
index
|
|
53
|
-
))
|
|
54
|
-
] })
|
|
55
|
-
] });
|
|
21
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("div", {
|
|
22
|
+
className: "customize-widgets-keyboard-shortcut-help-modal__shortcut-description",
|
|
23
|
+
children: description
|
|
24
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
25
|
+
className: "customize-widgets-keyboard-shortcut-help-modal__shortcut-term",
|
|
26
|
+
children: [/* @__PURE__ */ jsx(KeyCombination, {
|
|
27
|
+
keyCombination,
|
|
28
|
+
forceAriaLabel: ariaLabel
|
|
29
|
+
}), aliases.map((alias, index) => /* @__PURE__ */ jsx(KeyCombination, {
|
|
30
|
+
keyCombination: alias,
|
|
31
|
+
forceAriaLabel: ariaLabel
|
|
32
|
+
}, index))]
|
|
33
|
+
})] });
|
|
56
34
|
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
};
|
|
61
|
-
//# sourceMappingURL=shortcut.mjs.map
|
|
35
|
+
export { Shortcut as default };
|
|
36
|
+
|
|
37
|
+
//# sourceMappingURL=shortcut.mjs.map
|
|
@@ -1,7 +1 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/keyboard-shortcut-help-modal/shortcut.jsx"],
|
|
4
|
-
"sourcesContent": ["import { Fragment } from '@wordpress/element';\nimport { displayShortcutList, shortcutAriaLabel } from '@wordpress/keycodes';\n\nfunction KeyCombination( { keyCombination, forceAriaLabel } ) {\n\tconst shortcut = keyCombination.modifier\n\t\t? displayShortcutList[ keyCombination.modifier ](\n\t\t\t\tkeyCombination.character\n\t\t\t)\n\t\t: keyCombination.character;\n\tconst ariaLabel = keyCombination.modifier\n\t\t? shortcutAriaLabel[ keyCombination.modifier ](\n\t\t\t\tkeyCombination.character\n\t\t\t)\n\t\t: keyCombination.character;\n\n\treturn (\n\t\t<kbd\n\t\t\tclassName=\"customize-widgets-keyboard-shortcut-help-modal__shortcut-key-combination\"\n\t\t\taria-label={ forceAriaLabel || ariaLabel }\n\t\t>\n\t\t\t{ ( Array.isArray( shortcut ) ? shortcut : [ shortcut ] ).map(\n\t\t\t\t( character, index ) => {\n\t\t\t\t\tif ( character === '+' ) {\n\t\t\t\t\t\treturn <Fragment key={ index }>{ character }</Fragment>;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<kbd\n\t\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\t\tclassName=\"customize-widgets-keyboard-shortcut-help-modal__shortcut-key\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ character }\n\t\t\t\t\t\t</kbd>\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t) }\n\t\t</kbd>\n\t);\n}\n\nfunction Shortcut( { description, keyCombination, aliases = [], ariaLabel } ) {\n\treturn (\n\t\t<>\n\t\t\t<div className=\"customize-widgets-keyboard-shortcut-help-modal__shortcut-description\">\n\t\t\t\t{ description }\n\t\t\t</div>\n\t\t\t<div className=\"customize-widgets-keyboard-shortcut-help-modal__shortcut-term\">\n\t\t\t\t<KeyCombination\n\t\t\t\t\tkeyCombination={ keyCombination }\n\t\t\t\t\tforceAriaLabel={ ariaLabel }\n\t\t\t\t/>\n\t\t\t\t{ aliases.map( ( alias, index ) => (\n\t\t\t\t\t<KeyCombination\n\t\t\t\t\t\tkeyCombination={ alias }\n\t\t\t\t\t\tforceAriaLabel={ ariaLabel }\n\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t/>\n\t\t\t\t) ) }\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nexport default Shortcut;\n"],
|
|
5
|
-
"mappings": ";AAAA,SAAS,gBAAgB;AACzB,SAAS,qBAAqB,yBAAyB;AAsB1C,SAmBX,YAAAA,WAnBW,KAuBV,YAvBU;AApBb,SAAS,eAAgB,EAAE,gBAAgB,eAAe,GAAI;AAC7D,QAAM,WAAW,eAAe,WAC7B,oBAAqB,eAAe,QAAS;AAAA,IAC7C,eAAe;AAAA,EAChB,IACC,eAAe;AAClB,QAAM,YAAY,eAAe,WAC9B,kBAAmB,eAAe,QAAS;AAAA,IAC3C,eAAe;AAAA,EAChB,IACC,eAAe;AAElB,SACC;AAAA,IAAC;AAAA;AAAA,MACA,WAAU;AAAA,MACV,cAAa,kBAAkB;AAAA,MAE3B,iBAAM,QAAS,QAAS,IAAI,WAAW,CAAE,QAAS,GAAI;AAAA,QACzD,CAAE,WAAW,UAAW;AACvB,cAAK,cAAc,KAAM;AACxB,mBAAO,oBAAC,YAAyB,uBAAV,KAAqB;AAAA,UAC7C;AAEA,iBACC;AAAA,YAAC;AAAA;AAAA,cAEA,WAAU;AAAA,cAER;AAAA;AAAA,YAHI;AAAA,UAIP;AAAA,QAEF;AAAA,MACD;AAAA;AAAA,EACD;AAEF;AAEA,SAAS,SAAU,EAAE,aAAa,gBAAgB,UAAU,CAAC,GAAG,UAAU,GAAI;AAC7E,SACC,qBAAAA,WAAA,EACC;AAAA,wBAAC,SAAI,WAAU,wEACZ,uBACH;AAAA,IACA,qBAAC,SAAI,WAAU,iEACd;AAAA;AAAA,QAAC;AAAA;AAAA,UACA;AAAA,UACA,gBAAiB;AAAA;AAAA,MAClB;AAAA,MACE,QAAQ,IAAK,CAAE,OAAO,UACvB;AAAA,QAAC;AAAA;AAAA,UACA,gBAAiB;AAAA,UACjB,gBAAiB;AAAA;AAAA,QACX;AAAA,MACP,CACC;AAAA,OACH;AAAA,KACD;AAEF;AAEA,IAAO,mBAAQ;",
|
|
6
|
-
"names": ["Fragment"]
|
|
7
|
-
}
|
|
1
|
+
{"version":3,"file":"shortcut.mjs","names":[],"sources":["../../../src/components/keyboard-shortcut-help-modal/shortcut.jsx"],"sourcesContent":["import { Fragment } from '@wordpress/element';\nimport { displayShortcutList, shortcutAriaLabel } from '@wordpress/keycodes';\n\nfunction KeyCombination( { keyCombination, forceAriaLabel } ) {\n\tconst shortcut = keyCombination.modifier\n\t\t? displayShortcutList[ keyCombination.modifier ](\n\t\t\t\tkeyCombination.character\n\t\t\t)\n\t\t: keyCombination.character;\n\tconst ariaLabel = keyCombination.modifier\n\t\t? shortcutAriaLabel[ keyCombination.modifier ](\n\t\t\t\tkeyCombination.character\n\t\t\t)\n\t\t: keyCombination.character;\n\n\treturn (\n\t\t<kbd\n\t\t\tclassName=\"customize-widgets-keyboard-shortcut-help-modal__shortcut-key-combination\"\n\t\t\taria-label={ forceAriaLabel || ariaLabel }\n\t\t>\n\t\t\t{ ( Array.isArray( shortcut ) ? shortcut : [ shortcut ] ).map(\n\t\t\t\t( character, index ) => {\n\t\t\t\t\tif ( character === '+' ) {\n\t\t\t\t\t\treturn <Fragment key={ index }>{ character }</Fragment>;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<kbd\n\t\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\t\tclassName=\"customize-widgets-keyboard-shortcut-help-modal__shortcut-key\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ character }\n\t\t\t\t\t\t</kbd>\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t) }\n\t\t</kbd>\n\t);\n}\n\nfunction Shortcut( { description, keyCombination, aliases = [], ariaLabel } ) {\n\treturn (\n\t\t<>\n\t\t\t<div className=\"customize-widgets-keyboard-shortcut-help-modal__shortcut-description\">\n\t\t\t\t{ description }\n\t\t\t</div>\n\t\t\t<div className=\"customize-widgets-keyboard-shortcut-help-modal__shortcut-term\">\n\t\t\t\t<KeyCombination\n\t\t\t\t\tkeyCombination={ keyCombination }\n\t\t\t\t\tforceAriaLabel={ ariaLabel }\n\t\t\t\t/>\n\t\t\t\t{ aliases.map( ( alias, index ) => (\n\t\t\t\t\t<KeyCombination\n\t\t\t\t\t\tkeyCombination={ alias }\n\t\t\t\t\t\tforceAriaLabel={ ariaLabel }\n\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t/>\n\t\t\t\t) ) }\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nexport default Shortcut;\n"],"mappings":";;;;AAGA,SAAS,eAAgB,EAAE,gBAAgB,kBAAmB;CAC7D,MAAM,WAAW,eAAe,WAC7B,oBAAqB,eAAe,SAAU,CAC9C,eAAe,SAChB,IACC,eAAe;CAClB,MAAM,YAAY,eAAe,WAC9B,kBAAmB,eAAe,SAAU,CAC5C,eAAe,SAChB,IACC,eAAe;CAElB,OACC,oBAAC,OAAD;EACC,WAAU;EACV,cAAa,kBAAkB;EAE3B,WAAA,MAAM,QAAS,QAAS,IAAI,WAAW,CAAE,QAAS,EAAA,CAAI,KACvD,WAAW,UAAW;GACvB,IAAK,cAAc,KAClB,OAAO,oBAAC,UAAD,EAAA,UAA0B,UAAqB,GAA/B,KAA+B;GAGvD,OACC,oBAAC,OAAD;IAEC,WAAU;IAER,UAAA;GACE,GAJE,KAIF;EAEP,CACD;CACI,CAAA;AAEP;AAEA,SAAS,SAAU,EAAE,aAAa,gBAAgB,UAAU,CAAC,GAAG,aAAc;CAC7E,OACC,qBAAA,YAAA,EAAA,UAAA,CACC,oBAAC,OAAD;EAAK,WAAU;EACZ,UAAA;CACE,CAAA,GACL,qBAAC,OAAD;EAAK,WAAU;EAAf,UAAA,CACC,oBAAC,gBAAD;GACkB;GACjB,gBAAiB;EACjB,CAAA,GACC,QAAQ,KAAO,OAAO,UACvB,oBAAC,gBAAD;GACC,gBAAiB;GACjB,gBAAiB;EAEjB,GADM,KACN,CACA,CACE;CACJ,CAAA,CAAA,EAAA,CAAA;AAEJ"}
|