PageSourceSearch

https://allvit.no/assets/index-B3I8cHuA.js

js allvit.no collected 2026-10-04 13:10:38 UTC 4,653 bytes, 1 lines download raw bytes

1import{j as s}from"./jsx-runtime-u17CrQMm.js";import{r as g,R as y,g as A}from"./components-dnTWoCsa.js";import{T as E}from"./index-BtCUzoPr.js";import{x as O,y as T,k as R,z as F,X as N,T as z,l as M,F as b,m as U,s as W,n as _,P as f,u as B,B as D,c as H,A as P,t as S}from"./index-IhyZ9-vN.js";import{L as X}from"./lib-D9kTplD4.js";function q(e){return O("MuiInputAdornment",e)}const I=T("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var C;const G=(e,r)=>{const{ownerState:n}=e;return[r.root,r[`position${b(n.position)}`],n.disablePointerEvents===!0&&r.disablePointerEvents,r[n.variant]]},J=e=>{const{classes:r,disablePointerEvents:n,hiddenLabel:t,position:a,size:o,variant:l}=e,d={root:["root",n&&"disablePointerEvents",a&&`position${b(a)}`,l,t&&"hiddenLabel",o&&`size${b(o)}`]};return U(d,q,r)},K=W("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:G})(_(({theme:e})=>({display:"flex",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(e.vars||e).palette.action.active,variants:[{props:{variant:"filled"},style:{[`&.${I.positionStart}&:not(.${I.hiddenLabel})`]:{marginTop:16}}},{props:{position:"start"},style:{marginRight:8}},{props:{position:"end"},style:{marginLeft:8}},{props:{disablePointerEvents:!0},style:{pointerEvents:"none"}}]}))),L=g.forwardRef(function(r,n){const t=R({props:r,name:"MuiInputAdornment"}),{children:a,className:o,component:l="div",disablePointerEvents:d=!1,disableTypography:v=!1,position:c,variant:u,...x}=t,p=F()||{};let m=u;u&&p.variant,p&&!m&&(m=p.variant);const h={...t,hiddenLabel:p.hiddenLabel,size:p.size,disablePointerEvents:d,position:c,variant:m},i=J(h);return s.jsx(N.Provider,{value:null,children:s.jsx(K,{as:l,ownerState:h,className:M(i.root,o),ref:n,...x,children:typeof a=="string"&&!v?s.jsx(z,{color:"textSecondary",children:a}):s.jsxs(g.Fragment,{children:[c==="start"?C||(C=s.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"})):null,a]})})})});function j(){return j=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])}return e},j.apply(this,arguments)}function Q(e,r){if(e==null)return{};var n=V(e,r),t,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)t=o[a],!(r.indexOf(t)>=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(n[t]=e[t])}return n}function V(e,r){if(e==null)return{};var n={},t=Object.keys(e),a,o;for(o=0;o<t.length;o++)a=t[o],!(r.indexOf(a)>=0)&&(n[a]=e[a]);return n}var w=g.forwardRef(function(e,r){var n=e.color,t=n===void 0?"currentColor":n,a=e.size,o=a===void 0?24:a,l=Q(e,["color","size"]);return y.createElement("svg",j({ref:r,xmlns:"http://www.w3.org/2000/svg",width:o,height:o,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},l),y.createElement("circle",{cx:"11",cy:"11",r:"8"}),y.createElement("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"}))});w.propTypes={color:f.string,size:f.oneOfType([f.string,f.number])};w.displayName="Search";const Y=g.forwardRef(({onChange:e,value:r,inputState:n,$size:t="small",onKeyUp:a,onReset:o,onEnterButton:l,wrapperSx:d,sx:v,inputProps:c,hideStartAdornment:u,placeholder:x,hideLoader:p,endActions:m},h)=>{const i=B(),k=A();return s.jsx(D,{sx:S({position:"relative"},d),children:s.jsx(E,{ref:h,placeholder:x||"Søk...",onKeyUp:a,inputProps:{"aria-label":"Søketekst",id:"searchInput","data-cy":"cy-search-input",...c},onChange:e,$size:t,fullWidth:!0,value:r,sx:S({zIndex:0,pl:t==="large"?6:4,pr:"2px"},v),startAdornment:u?void 0:s.jsx(L,{position:"start",sx:{mr:t==="large"?4:3},children:s.jsx(w,{color:c&&c.disabled?i.palette.text.disabled:i.palette.mode==="light"?i.palette.cta.main:i.palette.common.white,size:t==="large"?26:t==="medium"?24:20})}),endAdornment:s.jsxs(L,{position:"end",children:[m,n!=="idle"&&!p&&s.jsx(H,{size:t==="large"?22:t==="small"?16:18,sx:{mr:2,color:i.palette.mode==="light"?i.palette.cta.main:i.palette.common.white}}),n==="idle"&&o&&r&&r.length>0&&s.jsx(P,{variant:"transparent",onClick:o,"data-cy":"cy-search-nullstill",size:t==="large"||t==="medium"||t==="small"?t:"small",children:"Nullstill"}),n==="idle"&&l&&r&&r.length>0&&s.jsx(P,{component:X,state:{from:k.pathname},variant:"primary",sx:{"&.MuiButton-sizeLarge":{fontSize:t==="large"?i.typography.h5.fontSize:"inherit"}},onClick:l.handler,"data-cy":"cy-search-enter",size:t==="large"||t==="medium"||t==="small"?t:"small",children:l.label??"Søk"})]})})})});Y.displayName="SearchInput";export{L as I,w as S,Y as a};

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.