summaryrefslogtreecommitdiffstats
path: root/wp-includes/blocks/search
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 07:56:49 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 07:56:49 +0000
commita415c29efee45520ae252d2aa28f1083a521cd7b (patch)
treef4ade4b6668ecc0765de7e1424f7c1427ad433ff /wp-includes/blocks/search
parentInitial commit. (diff)
downloadwordpress-a415c29efee45520ae252d2aa28f1083a521cd7b.tar.xz
wordpress-a415c29efee45520ae252d2aa28f1083a521cd7b.zip
Adding upstream version 6.4.3+dfsg1.upstream/6.4.3+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'wp-includes/blocks/search')
-rw-r--r--wp-includes/blocks/search/block.json97
-rw-r--r--wp-includes/blocks/search/editor-rtl.css14
-rw-r--r--wp-includes/blocks/search/editor-rtl.min.css1
-rw-r--r--wp-includes/blocks/search/editor.css14
-rw-r--r--wp-includes/blocks/search/editor.min.css1
-rw-r--r--wp-includes/blocks/search/style-rtl.css95
-rw-r--r--wp-includes/blocks/search/style-rtl.min.css1
-rw-r--r--wp-includes/blocks/search/style.css95
-rw-r--r--wp-includes/blocks/search/style.min.css1
-rw-r--r--wp-includes/blocks/search/theme-rtl.css8
-rw-r--r--wp-includes/blocks/search/theme-rtl.min.css1
-rw-r--r--wp-includes/blocks/search/theme.css8
-rw-r--r--wp-includes/blocks/search/theme.min.css1
-rw-r--r--wp-includes/blocks/search/view.asset.php1
-rw-r--r--wp-includes/blocks/search/view.js101
-rw-r--r--wp-includes/blocks/search/view.min.asset.php1
-rw-r--r--wp-includes/blocks/search/view.min.js1
17 files changed, 441 insertions, 0 deletions
diff --git a/wp-includes/blocks/search/block.json b/wp-includes/blocks/search/block.json
new file mode 100644
index 0000000..5669a90
--- /dev/null
+++ b/wp-includes/blocks/search/block.json
@@ -0,0 +1,97 @@
+{
+ "$schema": "https://schemas.wp.org/trunk/block.json",
+ "apiVersion": 3,
+ "name": "core/search",
+ "title": "Search",
+ "category": "widgets",
+ "description": "Help visitors find your content.",
+ "keywords": [ "find" ],
+ "textdomain": "default",
+ "attributes": {
+ "label": {
+ "type": "string",
+ "__experimentalRole": "content"
+ },
+ "showLabel": {
+ "type": "boolean",
+ "default": true
+ },
+ "placeholder": {
+ "type": "string",
+ "default": "",
+ "__experimentalRole": "content"
+ },
+ "width": {
+ "type": "number"
+ },
+ "widthUnit": {
+ "type": "string"
+ },
+ "buttonText": {
+ "type": "string",
+ "__experimentalRole": "content"
+ },
+ "buttonPosition": {
+ "type": "string",
+ "default": "button-outside"
+ },
+ "buttonUseIcon": {
+ "type": "boolean",
+ "default": false
+ },
+ "query": {
+ "type": "object",
+ "default": {}
+ },
+ "buttonBehavior": {
+ "type": "string",
+ "default": "expand-searchfield"
+ },
+ "isSearchFieldHidden": {
+ "type": "boolean",
+ "default": false
+ }
+ },
+ "supports": {
+ "align": [ "left", "center", "right" ],
+ "color": {
+ "gradients": true,
+ "__experimentalSkipSerialization": true,
+ "__experimentalDefaultControls": {
+ "background": true,
+ "text": true
+ }
+ },
+ "interactivity": true,
+ "typography": {
+ "__experimentalSkipSerialization": true,
+ "__experimentalSelector": ".wp-block-search__label, .wp-block-search__input, .wp-block-search__button",
+ "fontSize": true,
+ "lineHeight": true,
+ "__experimentalFontFamily": true,
+ "__experimentalFontWeight": true,
+ "__experimentalFontStyle": true,
+ "__experimentalTextTransform": true,
+ "__experimentalTextDecoration": true,
+ "__experimentalLetterSpacing": true,
+ "__experimentalDefaultControls": {
+ "fontSize": true
+ }
+ },
+ "__experimentalBorder": {
+ "color": true,
+ "radius": true,
+ "width": true,
+ "__experimentalSkipSerialization": true,
+ "__experimentalDefaultControls": {
+ "color": true,
+ "radius": true,
+ "width": true
+ }
+ },
+ "html": false
+ },
+ "viewScript": "file:./view.min.js",
+ "editorStyle": "wp-block-search-editor",
+ "style": "wp-block-search"
+}
diff --git a/wp-includes/blocks/search/editor-rtl.css b/wp-includes/blocks/search/editor-rtl.css
new file mode 100644
index 0000000..05eeacf
--- /dev/null
+++ b/wp-includes/blocks/search/editor-rtl.css
@@ -0,0 +1,14 @@
+.wp-block[data-align=center] .wp-block-search .wp-block-search__inside-wrapper{
+ margin:auto;
+}
+
+.wp-block-search .wp-block-search__button{
+ align-items:center;
+ border-radius:initial;
+ display:flex;
+ height:auto;
+ justify-content:center;
+}
+.wp-block-search__components-button-group{
+ margin-top:10px;
+} \ No newline at end of file
diff --git a/wp-includes/blocks/search/editor-rtl.min.css b/wp-includes/blocks/search/editor-rtl.min.css
new file mode 100644
index 0000000..b9c22f4
--- /dev/null
+++ b/wp-includes/blocks/search/editor-rtl.min.css
@@ -0,0 +1 @@
+.wp-block[data-align=center] .wp-block-search .wp-block-search__inside-wrapper{margin:auto}.wp-block-search .wp-block-search__button{align-items:center;border-radius:initial;display:flex;height:auto;justify-content:center}.wp-block-search__components-button-group{margin-top:10px} \ No newline at end of file
diff --git a/wp-includes/blocks/search/editor.css b/wp-includes/blocks/search/editor.css
new file mode 100644
index 0000000..05eeacf
--- /dev/null
+++ b/wp-includes/blocks/search/editor.css
@@ -0,0 +1,14 @@
+.wp-block[data-align=center] .wp-block-search .wp-block-search__inside-wrapper{
+ margin:auto;
+}
+
+.wp-block-search .wp-block-search__button{
+ align-items:center;
+ border-radius:initial;
+ display:flex;
+ height:auto;
+ justify-content:center;
+}
+.wp-block-search__components-button-group{
+ margin-top:10px;
+} \ No newline at end of file
diff --git a/wp-includes/blocks/search/editor.min.css b/wp-includes/blocks/search/editor.min.css
new file mode 100644
index 0000000..b9c22f4
--- /dev/null
+++ b/wp-includes/blocks/search/editor.min.css
@@ -0,0 +1 @@
+.wp-block[data-align=center] .wp-block-search .wp-block-search__inside-wrapper{margin:auto}.wp-block-search .wp-block-search__button{align-items:center;border-radius:initial;display:flex;height:auto;justify-content:center}.wp-block-search__components-button-group{margin-top:10px} \ No newline at end of file
diff --git a/wp-includes/blocks/search/style-rtl.css b/wp-includes/blocks/search/style-rtl.css
new file mode 100644
index 0000000..ff60086
--- /dev/null
+++ b/wp-includes/blocks/search/style-rtl.css
@@ -0,0 +1,95 @@
+.wp-block-search__button{
+ margin-right:10px;
+ word-break:normal;
+}
+.wp-block-search__button.has-icon{
+ line-height:0;
+}
+.wp-block-search__button svg{
+ fill:currentColor;
+ min-height:24px;
+ min-width:24px;
+ vertical-align:text-bottom;
+}
+
+:where(.wp-block-search__button){
+ border:1px solid #ccc;
+ padding:6px 10px;
+}
+
+.wp-block-search__inside-wrapper{
+ display:flex;
+ flex:auto;
+ flex-wrap:nowrap;
+ max-width:100%;
+}
+
+.wp-block-search__label{
+ width:100%;
+}
+
+.wp-block-search__input{
+ -webkit-appearance:initial;
+ appearance:none;
+ border:1px solid #949494;
+ flex-grow:1;
+ margin-left:0;
+ margin-right:0;
+ min-width:3rem;
+ padding:8px;
+ text-decoration:unset !important;
+}
+
+.wp-block-search.wp-block-search__button-only .wp-block-search__button{
+ flex-shrink:0;
+ margin-right:0;
+ max-width:calc(100% - 100px);
+}
+
+:where(.wp-block-search__button-inside .wp-block-search__inside-wrapper){
+ border:1px solid #949494;
+ box-sizing:border-box;
+ padding:4px;
+}
+:where(.wp-block-search__button-inside .wp-block-search__inside-wrapper) .wp-block-search__input{
+ border:none;
+ border-radius:0;
+ padding:0 4px;
+}
+:where(.wp-block-search__button-inside .wp-block-search__inside-wrapper) .wp-block-search__input:focus{
+ outline:none;
+}
+:where(.wp-block-search__button-inside .wp-block-search__inside-wrapper) :where(.wp-block-search__button){
+ padding:4px 8px;
+}
+
+.wp-block-search.aligncenter .wp-block-search__inside-wrapper{
+ margin:auto;
+}
+
+.wp-block-search__button-behavior-expand .wp-block-search__inside-wrapper{
+ min-width:0 !important;
+ transition-property:width;
+}
+.wp-block-search__button-behavior-expand .wp-block-search__input{
+ flex-basis:100%;
+ transition-duration:.3s;
+}
+.wp-block-search__button-behavior-expand.wp-block-search__searchfield-hidden,.wp-block-search__button-behavior-expand.wp-block-search__searchfield-hidden .wp-block-search__inside-wrapper{
+ overflow:hidden;
+}
+.wp-block-search__button-behavior-expand.wp-block-search__searchfield-hidden .wp-block-search__input{
+ border-left-width:0 !important;
+ border-right-width:0 !important;
+ flex-basis:0;
+ flex-grow:0;
+ margin:0;
+ min-width:0 !important;
+ padding-left:0 !important;
+ padding-right:0 !important;
+ width:0 !important;
+}
+
+.wp-block[data-align=right] .wp-block-search__button-behavior-expand .wp-block-search__inside-wrapper{
+ float:left;
+} \ No newline at end of file
diff --git a/wp-includes/blocks/search/style-rtl.min.css b/wp-includes/blocks/search/style-rtl.min.css
new file mode 100644
index 0000000..73dea5a
--- /dev/null
+++ b/wp-includes/blocks/search/style-rtl.min.css
@@ -0,0 +1 @@
+.wp-block-search__button{margin-right:10px;word-break:normal}.wp-block-search__button.has-icon{line-height:0}.wp-block-search__button svg{fill:currentColor;min-height:24px;min-width:24px;vertical-align:text-bottom}:where(.wp-block-search__button){border:1px solid #ccc;padding:6px 10px}.wp-block-search__inside-wrapper{display:flex;flex:auto;flex-wrap:nowrap;max-width:100%}.wp-block-search__label{width:100%}.wp-block-search__input{-webkit-appearance:initial;appearance:none;border:1px solid #949494;flex-grow:1;margin-left:0;margin-right:0;min-width:3rem;padding:8px;text-decoration:unset!important}.wp-block-search.wp-block-search__button-only .wp-block-search__button{flex-shrink:0;margin-right:0;max-width:calc(100% - 100px)}:where(.wp-block-search__button-inside .wp-block-search__inside-wrapper){border:1px solid #949494;box-sizing:border-box;padding:4px}:where(.wp-block-search__button-inside .wp-block-search__inside-wrapper) .wp-block-search__input{border:none;border-radius:0;padding:0 4px}:where(.wp-block-search__button-inside .wp-block-search__inside-wrapper) .wp-block-search__input:focus{outline:none}:where(.wp-block-search__button-inside .wp-block-search__inside-wrapper) :where(.wp-block-search__button){padding:4px 8px}.wp-block-search.aligncenter .wp-block-search__inside-wrapper{margin:auto}.wp-block-search__button-behavior-expand .wp-block-search__inside-wrapper{min-width:0!important;transition-property:width}.wp-block-search__button-behavior-expand .wp-block-search__input{flex-basis:100%;transition-duration:.3s}.wp-block-search__button-behavior-expand.wp-block-search__searchfield-hidden,.wp-block-search__button-behavior-expand.wp-block-search__searchfield-hidden .wp-block-search__inside-wrapper{overflow:hidden}.wp-block-search__button-behavior-expand.wp-block-search__searchfield-hidden .wp-block-search__input{border-left-width:0!important;border-right-width:0!important;flex-basis:0;flex-grow:0;margin:0;min-width:0!important;padding-left:0!important;padding-right:0!important;width:0!important}.wp-block[data-align=right] .wp-block-search__button-behavior-expand .wp-block-search__inside-wrapper{float:left} \ No newline at end of file
diff --git a/wp-includes/blocks/search/style.css b/wp-includes/blocks/search/style.css
new file mode 100644
index 0000000..91fe4f7
--- /dev/null
+++ b/wp-includes/blocks/search/style.css
@@ -0,0 +1,95 @@
+.wp-block-search__button{
+ margin-left:10px;
+ word-break:normal;
+}
+.wp-block-search__button.has-icon{
+ line-height:0;
+}
+.wp-block-search__button svg{
+ fill:currentColor;
+ min-height:24px;
+ min-width:24px;
+ vertical-align:text-bottom;
+}
+
+:where(.wp-block-search__button){
+ border:1px solid #ccc;
+ padding:6px 10px;
+}
+
+.wp-block-search__inside-wrapper{
+ display:flex;
+ flex:auto;
+ flex-wrap:nowrap;
+ max-width:100%;
+}
+
+.wp-block-search__label{
+ width:100%;
+}
+
+.wp-block-search__input{
+ -webkit-appearance:initial;
+ appearance:none;
+ border:1px solid #949494;
+ flex-grow:1;
+ margin-left:0;
+ margin-right:0;
+ min-width:3rem;
+ padding:8px;
+ text-decoration:unset !important;
+}
+
+.wp-block-search.wp-block-search__button-only .wp-block-search__button{
+ flex-shrink:0;
+ margin-left:0;
+ max-width:calc(100% - 100px);
+}
+
+:where(.wp-block-search__button-inside .wp-block-search__inside-wrapper){
+ border:1px solid #949494;
+ box-sizing:border-box;
+ padding:4px;
+}
+:where(.wp-block-search__button-inside .wp-block-search__inside-wrapper) .wp-block-search__input{
+ border:none;
+ border-radius:0;
+ padding:0 4px;
+}
+:where(.wp-block-search__button-inside .wp-block-search__inside-wrapper) .wp-block-search__input:focus{
+ outline:none;
+}
+:where(.wp-block-search__button-inside .wp-block-search__inside-wrapper) :where(.wp-block-search__button){
+ padding:4px 8px;
+}
+
+.wp-block-search.aligncenter .wp-block-search__inside-wrapper{
+ margin:auto;
+}
+
+.wp-block-search__button-behavior-expand .wp-block-search__inside-wrapper{
+ min-width:0 !important;
+ transition-property:width;
+}
+.wp-block-search__button-behavior-expand .wp-block-search__input{
+ flex-basis:100%;
+ transition-duration:.3s;
+}
+.wp-block-search__button-behavior-expand.wp-block-search__searchfield-hidden,.wp-block-search__button-behavior-expand.wp-block-search__searchfield-hidden .wp-block-search__inside-wrapper{
+ overflow:hidden;
+}
+.wp-block-search__button-behavior-expand.wp-block-search__searchfield-hidden .wp-block-search__input{
+ border-left-width:0 !important;
+ border-right-width:0 !important;
+ flex-basis:0;
+ flex-grow:0;
+ margin:0;
+ min-width:0 !important;
+ padding-left:0 !important;
+ padding-right:0 !important;
+ width:0 !important;
+}
+
+.wp-block[data-align=right] .wp-block-search__button-behavior-expand .wp-block-search__inside-wrapper{
+ float:right;
+} \ No newline at end of file
diff --git a/wp-includes/blocks/search/style.min.css b/wp-includes/blocks/search/style.min.css
new file mode 100644
index 0000000..c744f37
--- /dev/null
+++ b/wp-includes/blocks/search/style.min.css
@@ -0,0 +1 @@
+.wp-block-search__button{margin-left:10px;word-break:normal}.wp-block-search__button.has-icon{line-height:0}.wp-block-search__button svg{fill:currentColor;min-height:24px;min-width:24px;vertical-align:text-bottom}:where(.wp-block-search__button){border:1px solid #ccc;padding:6px 10px}.wp-block-search__inside-wrapper{display:flex;flex:auto;flex-wrap:nowrap;max-width:100%}.wp-block-search__label{width:100%}.wp-block-search__input{-webkit-appearance:initial;appearance:none;border:1px solid #949494;flex-grow:1;margin-left:0;margin-right:0;min-width:3rem;padding:8px;text-decoration:unset!important}.wp-block-search.wp-block-search__button-only .wp-block-search__button{flex-shrink:0;margin-left:0;max-width:calc(100% - 100px)}:where(.wp-block-search__button-inside .wp-block-search__inside-wrapper){border:1px solid #949494;box-sizing:border-box;padding:4px}:where(.wp-block-search__button-inside .wp-block-search__inside-wrapper) .wp-block-search__input{border:none;border-radius:0;padding:0 4px}:where(.wp-block-search__button-inside .wp-block-search__inside-wrapper) .wp-block-search__input:focus{outline:none}:where(.wp-block-search__button-inside .wp-block-search__inside-wrapper) :where(.wp-block-search__button){padding:4px 8px}.wp-block-search.aligncenter .wp-block-search__inside-wrapper{margin:auto}.wp-block-search__button-behavior-expand .wp-block-search__inside-wrapper{min-width:0!important;transition-property:width}.wp-block-search__button-behavior-expand .wp-block-search__input{flex-basis:100%;transition-duration:.3s}.wp-block-search__button-behavior-expand.wp-block-search__searchfield-hidden,.wp-block-search__button-behavior-expand.wp-block-search__searchfield-hidden .wp-block-search__inside-wrapper{overflow:hidden}.wp-block-search__button-behavior-expand.wp-block-search__searchfield-hidden .wp-block-search__input{border-left-width:0!important;border-right-width:0!important;flex-basis:0;flex-grow:0;margin:0;min-width:0!important;padding-left:0!important;padding-right:0!important;width:0!important}.wp-block[data-align=right] .wp-block-search__button-behavior-expand .wp-block-search__inside-wrapper{float:right} \ No newline at end of file
diff --git a/wp-includes/blocks/search/theme-rtl.css b/wp-includes/blocks/search/theme-rtl.css
new file mode 100644
index 0000000..18713bb
--- /dev/null
+++ b/wp-includes/blocks/search/theme-rtl.css
@@ -0,0 +1,8 @@
+.wp-block-search .wp-block-search__label{
+ font-weight:700;
+}
+
+.wp-block-search__button{
+ border:1px solid #ccc;
+ padding:.375em .625em;
+} \ No newline at end of file
diff --git a/wp-includes/blocks/search/theme-rtl.min.css b/wp-includes/blocks/search/theme-rtl.min.css
new file mode 100644
index 0000000..8938965
--- /dev/null
+++ b/wp-includes/blocks/search/theme-rtl.min.css
@@ -0,0 +1 @@
+.wp-block-search .wp-block-search__label{font-weight:700}.wp-block-search__button{border:1px solid #ccc;padding:.375em .625em} \ No newline at end of file
diff --git a/wp-includes/blocks/search/theme.css b/wp-includes/blocks/search/theme.css
new file mode 100644
index 0000000..18713bb
--- /dev/null
+++ b/wp-includes/blocks/search/theme.css
@@ -0,0 +1,8 @@
+.wp-block-search .wp-block-search__label{
+ font-weight:700;
+}
+
+.wp-block-search__button{
+ border:1px solid #ccc;
+ padding:.375em .625em;
+} \ No newline at end of file
diff --git a/wp-includes/blocks/search/theme.min.css b/wp-includes/blocks/search/theme.min.css
new file mode 100644
index 0000000..8938965
--- /dev/null
+++ b/wp-includes/blocks/search/theme.min.css
@@ -0,0 +1 @@
+.wp-block-search .wp-block-search__label{font-weight:700}.wp-block-search__button{border:1px solid #ccc;padding:.375em .625em} \ No newline at end of file
diff --git a/wp-includes/blocks/search/view.asset.php b/wp-includes/blocks/search/view.asset.php
new file mode 100644
index 0000000..9ecb989
--- /dev/null
+++ b/wp-includes/blocks/search/view.asset.php
@@ -0,0 +1 @@
+<?php return array('dependencies' => array(), 'version' => 'bbd4958a430d8ba14c4c');
diff --git a/wp-includes/blocks/search/view.js b/wp-includes/blocks/search/view.js
new file mode 100644
index 0000000..9d18abf
--- /dev/null
+++ b/wp-includes/blocks/search/view.js
@@ -0,0 +1,101 @@
+"use strict";
+(self["__WordPressPrivateInteractivityAPI__"] = self["__WordPressPrivateInteractivityAPI__"] || []).push([[222],{
+
+/***/ 534:
+/***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
+
+/* harmony import */ var _wordpress_interactivity__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(754);
+/**
+ * WordPress dependencies
+ */
+
+(0,_wordpress_interactivity__WEBPACK_IMPORTED_MODULE_0__/* .store */ .h)({
+ selectors: {
+ core: {
+ search: {
+ ariaLabel: ({
+ context
+ }) => {
+ const {
+ ariaLabelCollapsed,
+ ariaLabelExpanded
+ } = context.core.search;
+ return context.core.search.isSearchInputVisible ? ariaLabelExpanded : ariaLabelCollapsed;
+ },
+ ariaControls: ({
+ context
+ }) => {
+ return context.core.search.isSearchInputVisible ? null : context.core.search.inputId;
+ },
+ type: ({
+ context
+ }) => {
+ return context.core.search.isSearchInputVisible ? 'submit' : 'button';
+ },
+ tabindex: ({
+ context
+ }) => {
+ return context.core.search.isSearchInputVisible ? '0' : '-1';
+ }
+ }
+ }
+ },
+ actions: {
+ core: {
+ search: {
+ openSearchInput: ({
+ context,
+ event,
+ ref
+ }) => {
+ if (!context.core.search.isSearchInputVisible) {
+ event.preventDefault();
+ context.core.search.isSearchInputVisible = true;
+ ref.parentElement.querySelector('input').focus();
+ }
+ },
+ closeSearchInput: ({
+ context
+ }) => {
+ context.core.search.isSearchInputVisible = false;
+ },
+ handleSearchKeydown: store => {
+ const {
+ actions,
+ event,
+ ref
+ } = store;
+ // If Escape close the menu.
+ if (event?.key === 'Escape') {
+ actions.core.search.closeSearchInput(store);
+ ref.querySelector('button').focus();
+ }
+ },
+ handleSearchFocusout: store => {
+ const {
+ actions,
+ event,
+ ref
+ } = store;
+ // If focus is outside search form, and in the document, close menu
+ // event.target === The element losing focus
+ // event.relatedTarget === The element receiving focus (if any)
+ // When focusout is outside the document,
+ // `window.document.activeElement` doesn't change.
+ if (!ref.contains(event.relatedTarget) && event.target !== window.document.activeElement) {
+ actions.core.search.closeSearchInput(store);
+ }
+ }
+ }
+ }
+ }
+});
+
+/***/ })
+
+},
+/******/ function(__webpack_require__) { // webpackRuntimeModules
+/******/ var __webpack_exec__ = function(moduleId) { return __webpack_require__(__webpack_require__.s = moduleId); }
+/******/ var __webpack_exports__ = (__webpack_exec__(534));
+/******/ }
+]); \ No newline at end of file
diff --git a/wp-includes/blocks/search/view.min.asset.php b/wp-includes/blocks/search/view.min.asset.php
new file mode 100644
index 0000000..dc204c9
--- /dev/null
+++ b/wp-includes/blocks/search/view.min.asset.php
@@ -0,0 +1 @@
+<?php return array('dependencies' => array(), 'version' => 'ff76b5016de2df424c55');
diff --git a/wp-includes/blocks/search/view.min.js b/wp-includes/blocks/search/view.min.js
new file mode 100644
index 0000000..f38519d
--- /dev/null
+++ b/wp-includes/blocks/search/view.min.js
@@ -0,0 +1 @@
+"use strict";(self.__WordPressPrivateInteractivityAPI__=self.__WordPressPrivateInteractivityAPI__||[]).push([[222],{534:function(e,t,c){(0,c(754).h)({selectors:{core:{search:{ariaLabel:({context:e})=>{const{ariaLabelCollapsed:t,ariaLabelExpanded:c}=e.core.search;return e.core.search.isSearchInputVisible?c:t},ariaControls:({context:e})=>e.core.search.isSearchInputVisible?null:e.core.search.inputId,type:({context:e})=>e.core.search.isSearchInputVisible?"submit":"button",tabindex:({context:e})=>e.core.search.isSearchInputVisible?"0":"-1"}}},actions:{core:{search:{openSearchInput:({context:e,event:t,ref:c})=>{e.core.search.isSearchInputVisible||(t.preventDefault(),e.core.search.isSearchInputVisible=!0,c.parentElement.querySelector("input").focus())},closeSearchInput:({context:e})=>{e.core.search.isSearchInputVisible=!1},handleSearchKeydown:e=>{const{actions:t,event:c,ref:r}=e;"Escape"===c?.key&&(t.core.search.closeSearchInput(e),r.querySelector("button").focus())},handleSearchFocusout:e=>{const{actions:t,event:c,ref:r}=e;r.contains(c.relatedTarget)||c.target===window.document.activeElement||t.core.search.closeSearchInput(e)}}}}})}},function(e){var t;t=534,e(e.s=t)}]); \ No newline at end of file