PageSourceSearch

https://teachandstudy.ru/assets/MySelect-BO8Ny9_w.js

js teachandstudy.ru collected 2026-10-06 05:36:19 UTC 3,696 bytes, 5 lines download raw bytes

1import{d as h,A as k,aF as B,o as a,c as s,L as i,b as f,l as y,b8 as V,t as r,m as c,e as o,aK as w,B as C,w as L,F as M,g as z,r as K,_ as F}from"./index-DJd8yxUG.js";import{x as S}from"./vue3-slide-up-down-Dk9XaEOW.js";const $=["data-test"],A={class:"simple-custom__selected select-none"},E={key:1,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",class:"svg-arr",fill:"currentColor","aria-hidden":"true"},N={key:0,class:"absolute my-1 text-sm text-orange-400"},I=["onClick","onKeydown"],O={key:0,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},T=h({__name:"MySelect",props:{dataTest:{},isOpen:{type:Boolean},name:{},id:{},modelValue:{},label:{},data:{},translateX:{},clear:{type:Boolean},disabled:{type:Boolean},fancy:{type:Boolean},error:{}},emits:["update:modelValue","open","clear"],setup(e,{emit:g}){const p=e,m=g,n=K(!1),v=d=>{d.target.closest(".simple-custom")||(n.value=!1)},x=d=>{d.label||(m("update:modelValue",d),n.value=!1)},u=()=>{p.disabled||(n.value=!n.value,m("open"))};return k(()=>{document.addEventListener("click",v)}),B(()=>{document.removeEventListener("click",v)}),(d,l)=>(a(),s("div",{"data-test":e.dataTest,class:i(["simple-custom",{"simple-custom_opened":n.value,disabled:e.disabled}])},[f(y(V),{id:e.id,class:"hidden",name:e.name,"model-value":e.modelValue.title},null,8,["id","name","model-value"]),e.label?(a(),s("div",{key:0,class:i(["label absolute translate-x-3 translate-y-[13px] transform cursor-pointer select-none text-[13px] text-[#686b75] transition duration-300",[e.modelValue.title?"!-translate-x-[0] !-translate-y-[20px] scale-[1]":""]]),onClick:u},r(e.label),3)):c("",!0),o("div",null,[o("div",{class:i(["simple-custom__head text-[15px] transition duration-[400]",[(e.modelValue.title,"h-[46px] px-2.5 pt-[2px]"),e.fancy?"border-[]":"",e.fancy&&n.value?"!bg-gray-100":""]]),tabindex:"-1",onClick:u,onKeydown:w(u,["enter"])},[o("div",A,r(e.modelValue.title),1),e.modelValue.title&&e.clear?(a(),s("svg",{key:0,class:"svg-arr",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 24 24",onClick:l[0]||(l[0]=C(t=>d.$emit("clear"),["stop"]))},[...l[1]||(l[1]=[o("path",{fill:"currentColor",d:"M18.3 5.71a.996.996 0 0 0-1.41 0L12 10.59L7.11 5.7A.996.996 0 1 0 5.7 7.11L10.59 12L5.7 16.89a.996.996 0 1 0 1.41 1.41L12 13.41l4.89 4.89a.996.996 0 1 0 1.41-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4z"},null,-1)])])):(a(),s("svg",E,[...l[2]||(l[2]=[o("path",{"fill-rule":"evenodd",d:`M10 3a.75.75 0 01.55.24l3.25 3.5a.75.75 0 11-1.1 1.02L10 4.852 7.3 7.76a.75.75 0
2            01-1.1-1.02l3.25-3.5A.75.75 0 0110 3zm-3.76 9.2a.75.75 0 011.06.04l2.7 2.908
3            2.7-2.908a.75.75 0 111.1 1.02l-3.25 3.5a.75.75 0 01-1.1 0l-3.25-3.5a.75.75
4            0 01.04-1.06z`,"clip-rule":"evenodd"},null,-1)])]))],34),e.error?(a(),s("p",N,r(e.error),1)):c("",!0)]),f(y(S),{"model-value":n.value&&e.isOpen,"opacity-closed":1,class:"simple-custom__items",tag:"ul",style:{"margin-top":"5px"},duration:400},{default:L(()=>[(a(!0),s(M,null,z(e.data,t=>(a(),s("li",{key:t.value,class:i(["simple-custom__item",{"simple-custom__item_selected":t.value===e.modelValue.value,"simple-custom__item-label":t.label}]),onClick:b=>x(t),onKeydown:w(b=>x(t),["enter"])},[o("span",null,r(t.title),1),t.value===e.modelValue.value&&!t.label?(a(),s("svg",O,[...l[3]||(l[3]=[o("path",{"fill-rule":"evenodd",d:`M16.704 4.153a.75.75 0 01.143 1.052l-8 10.5a.75.75 0 01-1.127.075l-4.5-4.5a.75.75 0
5            011.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 011.05-.143z`,"clip-rule":"evenodd"},null,-1)])])):c("",!0)],42,I))),128))]),_:1},8,["model-value"])],10,$))}}),X=F(T,[["__scopeId","data-v-c10ed03f"]]);export{X as M};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.