$49 GRAYBYTE WORDPRESS FILE MANAGER $59

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 104.21.15.130 | ADMIN IP 216.73.217.88
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/home/bravetechrwanda/dantho.rw/wp-includes/js/dist/script-modules/block-library/search/

HOME
Current File : /home/bravetechrwanda/dantho.rw/wp-includes/js/dist/script-modules/block-library/search//view.js
// packages/block-library/build-module/search/view.mjs
import {
  store,
  getContext,
  getElement,
  withSyncEvent
} from "@wordpress/interactivity";
var { actions } = store(
  "core/search",
  {
    state: {
      get ariaLabel() {
        const {
          isSearchInputVisible,
          ariaLabelCollapsed,
          ariaLabelExpanded
        } = getContext();
        return isSearchInputVisible ? ariaLabelExpanded : ariaLabelCollapsed;
      },
      get ariaControls() {
        const { isSearchInputVisible, inputId } = getContext();
        return isSearchInputVisible ? null : inputId;
      },
      get type() {
        const { isSearchInputVisible } = getContext();
        return isSearchInputVisible ? "submit" : "button";
      },
      get tabindex() {
        const { isSearchInputVisible } = getContext();
        return isSearchInputVisible ? "0" : "-1";
      }
    },
    actions: {
      openSearchInput: withSyncEvent((event) => {
        const ctx = getContext();
        const { ref } = getElement();
        if (!ctx.isSearchInputVisible) {
          event.preventDefault();
          ctx.isSearchInputVisible = true;
          ref.parentElement.querySelector("input").focus();
        }
      }),
      closeSearchInput() {
        const ctx = getContext();
        ctx.isSearchInputVisible = false;
      },
      handleSearchKeydown: withSyncEvent((event) => {
        const { ref } = getElement();
        if (event?.key === "Escape") {
          actions.closeSearchInput();
          ref.querySelector("button").focus();
        }
      }),
      handleSearchFocusout: withSyncEvent((event) => {
        const { ref } = getElement();
        if (!ref.contains(event.relatedTarget) && event.target !== window.document.activeElement) {
          actions.closeSearchInput();
        }
      })
    }
  },
  { lock: true }
);

Current_dir [ WRITEABLE ] Document_root [ NOT WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
21 May 2026 3.20 PM
bravetechrwanda / bravetechrwanda
0755
view.js
1.813 KB
21 May 2026 3.20 PM
bravetechrwanda / bravetechrwanda
0644
view.min.asset.php
0.176 KB
21 May 2026 3.20 PM
bravetechrwanda / bravetechrwanda
0644
view.min.js
0.935 KB
21 May 2026 3.20 PM
bravetechrwanda / bravetechrwanda
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME
Static GIF Static GIF