From 69b981d35f79e8508c659ed961f096a7a51aadb3 Mon Sep 17 00:00:00 2001 From: Michael Aerni Date: Thu, 9 Apr 2026 15:29:03 +0200 Subject: [PATCH] Fix selected icon display for options beyond initial pagination limit --- resources/dist/build/assets/cp-Bd8kaA_c.css | 1 + resources/dist/build/assets/cp-CXMWA2cY.js | 1 - resources/dist/build/assets/cp-DUuUuv0O.js | 1 + resources/dist/build/assets/cp-QrUPv2vB.css | 1 - resources/dist/build/manifest.json | 4 ++-- resources/js/FontAwesome.vue | 11 ++++++++++- 6 files changed, 14 insertions(+), 5 deletions(-) create mode 100644 resources/dist/build/assets/cp-Bd8kaA_c.css delete mode 100644 resources/dist/build/assets/cp-CXMWA2cY.js create mode 100644 resources/dist/build/assets/cp-DUuUuv0O.js delete mode 100644 resources/dist/build/assets/cp-QrUPv2vB.css diff --git a/resources/dist/build/assets/cp-Bd8kaA_c.css b/resources/dist/build/assets/cp-Bd8kaA_c.css new file mode 100644 index 0000000..b790a74 --- /dev/null +++ b/resources/dist/build/assets/cp-Bd8kaA_c.css @@ -0,0 +1 @@ +@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial}}}@layer addon-theme{:root,:host{--color-gray-300:var(--theme-color-gray-300);--color-gray-700:var(--theme-color-gray-700);--spacing:.25rem;--text-xs:.825rem;--text-xs--line-height:calc(1 / .75)}}@layer addon-utilities{.invisible{visibility:hidden}.visible{visibility:visible}.flex{display:flex}.h-5{height:calc(var(--spacing) * 5)}.w-5{width:calc(var(--spacing) * 5)}.items-center{align-items:center}.gap-4{gap:calc(var(--spacing) * 4)}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}}:root{--animation-timing-function-fast-out-slow-in:cubic-bezier(.4,0,.2,1);--color-button-active:hsl(from var(--color-gray-300) h s l / .45)}.dark{--color-button-active:hsl(from var(--color-gray-700) h s l / .45)}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false} diff --git a/resources/dist/build/assets/cp-CXMWA2cY.js b/resources/dist/build/assets/cp-CXMWA2cY.js deleted file mode 100644 index e87d5b8..0000000 --- a/resources/dist/build/assets/cp-CXMWA2cY.js +++ /dev/null @@ -1 +0,0 @@ -const _=window.Vue,{BaseTransition:$,BaseTransitionPropsValidators:Q,Comment:J,DeprecationTypes:X,EffectScope:Y,ErrorCodes:Z,ErrorTypeStrings:ee,Fragment:te,KeepAlive:oe,ReactiveEffect:ne,Static:re,Suspense:se,Teleport:ie,Text:ae,TrackOpTypes:le,Transition:ce,TransitionGroup:de,TriggerOpTypes:ue,VueElement:pe,__esModule:me,assertNumber:fe,callWithAsyncErrorHandling:he,callWithErrorHandling:ve,camelize:ge,capitalize:Se,cloneVNode:Ce,compatUtils:be,compile:ye,computed:f,createApp:we,createBlock:V,createCommentVNode:Te,createElementBlock:Pe,createElementVNode:i,createHydrationRenderer:Re,createPropsRestProxy:xe,createRenderer:Ie,createSSRApp:Ee,createSlots:Me,createStaticVNode:Le,createTextVNode:Ae,createVNode:Fe,customRef:ke,defineAsyncComponent:He,defineComponent:De,defineCustomElement:_e,defineEmits:Ve,defineExpose:Be,defineModel:Oe,defineOptions:Ne,defineProps:Ge,defineSSRCustomElement:ze,defineSlots:Ue,devtools:je,effect:qe,effectScope:Ke,getCurrentInstance:We,getCurrentScope:$e,getCurrentWatcher:Qe,getTransitionRawChildren:Je,guardReactiveProps:Xe,h:Ye,handleError:Ze,hasInjectionContext:et,hydrate:tt,hydrateOnIdle:ot,hydrateOnInteraction:nt,hydrateOnMediaQuery:rt,hydrateOnVisible:st,initCustomFormatter:it,initDirectivesForSSR:at,inject:lt,isMemoSame:ct,isProxy:dt,isReactive:ut,isReadonly:pt,isRef:mt,isRuntimeOnly:ft,isShallow:ht,isVNode:vt,markRaw:gt,mergeDefaults:St,mergeModels:Ct,mergeProps:bt,nextTick:yt,nodeOps:wt,normalizeClass:h,normalizeProps:Tt,normalizeStyle:Pt,onActivated:Rt,onBeforeMount:xt,onBeforeUnmount:It,onBeforeUpdate:Et,onDeactivated:Mt,onErrorCaptured:Lt,onMounted:B,onRenderTracked:At,onRenderTriggered:Ft,onScopeDispose:kt,onServerPrefetch:Ht,onUnmounted:O,onUpdated:Dt,onWatcherCleanup:_t,openBlock:N,patchProp:Vt,popScopeId:Bt,provide:Ot,proxyRefs:Nt,pushScopeId:Gt,queuePostFlushCb:zt,reactive:Ut,readonly:jt,ref:C,registerRuntimeCompiler:qt,render:Kt,renderList:Wt,renderSlot:$t,resolveComponent:Qt,resolveDirective:Jt,resolveDynamicComponent:Xt,resolveFilter:Yt,resolveTransitionHooks:Zt,setBlockTracking:eo,setDevtoolsHook:to,setTransitionHooks:oo,shallowReactive:no,shallowReadonly:ro,shallowRef:so,ssrContextKey:io,ssrUtils:ao,stop:lo,toDisplayString:b,toHandlerKey:co,toHandlers:uo,toRaw:po,toRef:mo,toRefs:fo,toValue:ho,transformVNodeArgs:vo,triggerRef:go,unref:c,useAttrs:So,useCssModule:Co,useCssVars:bo,useHost:yo,useId:wo,useModel:To,useSSRContext:Po,useShadowRoot:Ro,useSlots:xo,useTemplateRef:Io,useTransitionState:Eo,vModelCheckbox:Mo,vModelDynamic:Lo,vModelRadio:Ao,vModelSelect:Fo,vModelText:ko,vShow:Ho,version:Do,warn:_o,watch:Vo,watchEffect:Bo,watchPostEffect:Oo,watchSyncEffect:No,withAsyncContext:Go,withCtx:y,withDefaults:zo,withDirectives:Uo,withKeys:jo,withMemo:qo,withModifiers:Ko,withScopeId:Wo}=_,{Fieldtype:v,IndexFieldtype:$o,FieldtypeMixin:Qo,HasActionsMixin:Jo,HasInputOptionsMixin:Xo,HasPreferencesMixin:Yo,IndexFieldtypeMixin:Zo,InlineEditForm:en,DateFormatter:tn,ItemActions:on,RelatedItem:nn,RestoreRevision:rn,RevisionHistory:sn,RevisionPreview:an,SaveButtonOptions:ln,SortableList:cn,requireElevatedSession:dn,requireElevatedSessionIf:un,clone:pn,deepClone:mn,resetValuesFromResponse:fn}=__STATAMIC__.core,{Alert:hn,AuthCard:vn,Avatar:gn,Badge:Sn,Button:Cn,ButtonGroup:bn,Calendar:yn,Card:wn,CardList:Tn,CardListItem:Pn,CardPanel:Rn,CharacterCounter:xn,Checkbox:In,CheckboxGroup:En,CodeEditor:Mn,Combobox:G,CommandPaletteItem:Ln,ConfirmationModal:An,Context:Fn,ContextFooter:kn,ContextHeader:Hn,ContextItem:Dn,ContextLabel:_n,ContextMenu:Vn,ContextSeparator:Bn,CreateForm:On,DatePicker:Nn,DateRangePicker:Gn,Description:zn,DocsCallout:Un,DragHandle:jn,Dropdown:qn,DropdownItem:Kn,DropdownLabel:Wn,DropdownMenu:$n,DropdownSeparator:Qn,DropdownFooter:Jn,DropdownHeader:Xn,Editable:Yn,ErrorMessage:Zn,EmptyStateItem:er,EmptyStateMenu:tr,Field:or,Header:nr,Heading:rr,HoverCard:sr,Icon:ir,Input:ar,InputGroup:lr,InputGroupAppend:cr,InputGroupPrepend:dr,Label:ur,Listing:pr,ListingCustomizeColumns:mr,ListingFilters:fr,ListingHeaderCell:hr,ListingPagination:vr,ListingPresets:gr,ListingPresetTrigger:Sr,ListingRowActions:Cr,ListingSearch:br,ListingTable:yr,ListingTableBody:wr,ListingTableHead:Tr,ListingToggleAll:Pr,LivePreview:Rr,LivePreviewPopout:xr,MiddleEllipsis:Ir,Modal:Er,ModalClose:Mr,ModalTitle:Lr,Pagination:Ar,Panel:Fr,PanelFooter:kr,PanelHeader:Hr,Popover:Dr,PublishComponents:_r,PublishContainer:Vr,publishContextKey:Br,injectPublishContext:Or,PublishField:Nr,PublishFields:Gr,PublishFieldsProvider:zr,PublishForm:Ur,PublishLocalizations:jr,PublishSections:qr,PublishTabs:Kr,Radio:Wr,RadioGroup:$r,Select:Qr,Separator:Jr,Slider:Xr,Skeleton:Yr,SplitterGroup:Zr,SplitterPanel:es,SplitterResizeHandle:ts,StatusIndicator:os,Subheading:ns,Switch:rs,TabContent:ss,Stack:is,StackClose:as,StackHeader:ls,StackFooter:cs,StackContent:ds,Table:us,TableCell:ps,TableColumn:ms,TableColumns:fs,TableRow:hs,TableRows:vs,TabList:gs,TabProvider:Ss,Tabs:Cs,TabTrigger:bs,Textarea:ys,TimePicker:ws,ToggleGroup:Ts,ToggleItem:Ps,Widget:Rs,registerIconSet:xs,registerIconSetFromStrings:Is}=__STATAMIC__.ui,z=Statamic.$pinia.defineStore("fontAwesome",{state:()=>({icons:null,loading:!1}),actions:{fetchIcons(d){return this.icons||this.loading?Promise.resolve():(this.loading=!0,fetch(d).then(s=>s.json()).then(s=>this.icons=Object.values(s)).catch(s=>console.error("Failed to fetch Font Awesome icons:",s)).finally(()=>this.loading=!1))}}}),U={class:"flex items-center gap-4"},j={class:"text-xs truncate"},q={class:"flex items-center gap-4"},K={class:"text-xs truncate"},W={__name:"FontAwesome",props:v.props,emits:[...v.emits,"focus","blur"],setup(d,{expose:s,emit:w}){const T=w,r=d,{expose:P,update:R,isReadOnly:x}=v.use(T,r);s(P);const a=z(),u=C(""),l=C(50);let n=null,p=null;const g=f(()=>{if(!a.icons)return[];const e=a.icons.filter(t=>r.meta.styles.includes(t.style));return u.value.length>0?e.filter(t=>t.label.toLowerCase().includes(u.value.toLowerCase())):e}),I=f(()=>g.value.slice(0,l.value)),E=f(()=>(r.meta.script?Array.from(document.getElementsByTagName("script")).filter(t=>t.src===r.meta.script):Array.from(document.getElementsByTagName("link")).filter(t=>t.href===r.meta.css)).length>0);function M(e){u.value=e,l.value=50}function m(){const{scrollTop:e,scrollHeight:t,clientHeight:o}=n,H=e+o>=t-100,D=l.value{for(const t of e){for(const o of t.addedNodes)n||L(o);for(const o of t.removedNodes)n&&A(o)}}),p.observe(document.body,{childList:!0,subtree:!0})}function k(){if(E.value)return;const e=r.meta.script?Object.assign(document.createElement("script"),{src:r.meta.script}):Object.assign(document.createElement("link"),{rel:"stylesheet",href:r.meta.css});document.head.appendChild(e)}return B(()=>{a.fetchIcons(r.meta.url),k(),F()}),O(()=>{p.disconnect(),n&&n.removeEventListener("scroll",m)}),(e,t)=>(N(),V(c(G),{clearable:"",class:h({invisible:!c(a).icons}),"read-only":c(x),options:I.value,placeholder:"Type to search …","ignore-filter":!0,"model-value":c(a).icons?e.value:null,"option-value":"class","onUpdate:modelValue":c(R),onSearch:M},{option:y(o=>[i("div",U,[i("i",{class:h(["w-5 h-5",o.class])},null,2),i("span",j,b(o.label),1)])]),"selected-option":y(({option:o})=>[i("div",q,[i("i",{class:h(["w-5 h-5",o.class])},null,2),i("span",K,b(o.label),1)])]),_:1},8,["class","read-only","options","model-value","onUpdate:modelValue"]))}};Statamic.booting(()=>{Statamic.$components.register("font_awesome-fieldtype",W)}); diff --git a/resources/dist/build/assets/cp-DUuUuv0O.js b/resources/dist/build/assets/cp-DUuUuv0O.js new file mode 100644 index 0000000..0179749 --- /dev/null +++ b/resources/dist/build/assets/cp-DUuUuv0O.js @@ -0,0 +1 @@ +const _=window.Vue,{BaseTransition:$,BaseTransitionPropsValidators:Q,Comment:J,DeprecationTypes:X,EffectScope:Y,ErrorCodes:Z,ErrorTypeStrings:ee,Fragment:te,KeepAlive:oe,ReactiveEffect:ne,Static:se,Suspense:re,Teleport:ie,Text:ae,TrackOpTypes:le,Transition:ce,TransitionGroup:de,TriggerOpTypes:ue,VueElement:pe,__esModule:me,assertNumber:fe,callWithAsyncErrorHandling:he,callWithErrorHandling:ve,camelize:ge,capitalize:Se,cloneVNode:Ce,compatUtils:be,compile:ye,computed:h,createApp:we,createBlock:V,createCommentVNode:Te,createElementBlock:Pe,createElementVNode:i,createHydrationRenderer:Re,createPropsRestProxy:xe,createRenderer:Ie,createSSRApp:Ee,createSlots:Me,createStaticVNode:Le,createTextVNode:Ae,createVNode:Fe,customRef:ke,defineAsyncComponent:He,defineComponent:De,defineCustomElement:_e,defineEmits:Ve,defineExpose:Be,defineModel:Oe,defineOptions:Ne,defineProps:Ge,defineSSRCustomElement:ze,defineSlots:Ue,devtools:je,effect:qe,effectScope:Ke,getCurrentInstance:We,getCurrentScope:$e,getCurrentWatcher:Qe,getTransitionRawChildren:Je,guardReactiveProps:Xe,h:Ye,handleError:Ze,hasInjectionContext:et,hydrate:tt,hydrateOnIdle:ot,hydrateOnInteraction:nt,hydrateOnMediaQuery:st,hydrateOnVisible:rt,initCustomFormatter:it,initDirectivesForSSR:at,inject:lt,isMemoSame:ct,isProxy:dt,isReactive:ut,isReadonly:pt,isRef:mt,isRuntimeOnly:ft,isShallow:ht,isVNode:vt,markRaw:gt,mergeDefaults:St,mergeModels:Ct,mergeProps:bt,nextTick:yt,nodeOps:wt,normalizeClass:v,normalizeProps:Tt,normalizeStyle:Pt,onActivated:Rt,onBeforeMount:xt,onBeforeUnmount:It,onBeforeUpdate:Et,onDeactivated:Mt,onErrorCaptured:Lt,onMounted:B,onRenderTracked:At,onRenderTriggered:Ft,onScopeDispose:kt,onServerPrefetch:Ht,onUnmounted:O,onUpdated:Dt,onWatcherCleanup:_t,openBlock:N,patchProp:Vt,popScopeId:Bt,provide:Ot,proxyRefs:Nt,pushScopeId:Gt,queuePostFlushCb:zt,reactive:Ut,readonly:jt,ref:C,registerRuntimeCompiler:qt,render:Kt,renderList:Wt,renderSlot:$t,resolveComponent:Qt,resolveDirective:Jt,resolveDynamicComponent:Xt,resolveFilter:Yt,resolveTransitionHooks:Zt,setBlockTracking:eo,setDevtoolsHook:to,setTransitionHooks:oo,shallowReactive:no,shallowReadonly:so,shallowRef:ro,ssrContextKey:io,ssrUtils:ao,stop:lo,toDisplayString:b,toHandlerKey:co,toHandlers:uo,toRaw:po,toRef:mo,toRefs:fo,toValue:ho,transformVNodeArgs:vo,triggerRef:go,unref:c,useAttrs:So,useCssModule:Co,useCssVars:bo,useHost:yo,useId:wo,useModel:To,useSSRContext:Po,useShadowRoot:Ro,useSlots:xo,useTemplateRef:Io,useTransitionState:Eo,vModelCheckbox:Mo,vModelDynamic:Lo,vModelRadio:Ao,vModelSelect:Fo,vModelText:ko,vShow:Ho,version:Do,warn:_o,watch:Vo,watchEffect:Bo,watchPostEffect:Oo,watchSyncEffect:No,withAsyncContext:Go,withCtx:y,withDefaults:zo,withDirectives:Uo,withKeys:jo,withMemo:qo,withModifiers:Ko,withScopeId:Wo}=_,{Fieldtype:g,IndexFieldtype:$o,FieldtypeMixin:Qo,HasActionsMixin:Jo,HasInputOptionsMixin:Xo,HasPreferencesMixin:Yo,IndexFieldtypeMixin:Zo,InlineEditForm:en,DateFormatter:tn,ItemActions:on,RelatedItem:nn,RestoreRevision:sn,RevisionHistory:rn,RevisionPreview:an,SaveButtonOptions:ln,SortableList:cn,requireElevatedSession:dn,requireElevatedSessionIf:un,clone:pn,deepClone:mn,resetValuesFromResponse:fn}=__STATAMIC__.core,{Alert:hn,AuthCard:vn,Avatar:gn,Badge:Sn,Button:Cn,ButtonGroup:bn,Calendar:yn,Card:wn,CardList:Tn,CardListItem:Pn,CardPanel:Rn,CharacterCounter:xn,Checkbox:In,CheckboxGroup:En,CodeEditor:Mn,Combobox:G,CommandPaletteItem:Ln,ConfirmationModal:An,Context:Fn,ContextFooter:kn,ContextHeader:Hn,ContextItem:Dn,ContextLabel:_n,ContextMenu:Vn,ContextSeparator:Bn,CreateForm:On,DatePicker:Nn,DateRangePicker:Gn,Description:zn,DocsCallout:Un,DragHandle:jn,Dropdown:qn,DropdownItem:Kn,DropdownLabel:Wn,DropdownMenu:$n,DropdownSeparator:Qn,DropdownFooter:Jn,DropdownHeader:Xn,Editable:Yn,ErrorMessage:Zn,EmptyStateItem:es,EmptyStateMenu:ts,Field:os,Header:ns,Heading:ss,HoverCard:rs,Icon:is,Input:as,InputGroup:ls,InputGroupAppend:cs,InputGroupPrepend:ds,Label:us,Listing:ps,ListingCustomizeColumns:ms,ListingFilters:fs,ListingHeaderCell:hs,ListingPagination:vs,ListingPresets:gs,ListingPresetTrigger:Ss,ListingRowActions:Cs,ListingSearch:bs,ListingTable:ys,ListingTableBody:ws,ListingTableHead:Ts,ListingToggleAll:Ps,LivePreview:Rs,LivePreviewPopout:xs,MiddleEllipsis:Is,Modal:Es,ModalClose:Ms,ModalTitle:Ls,Pagination:As,Panel:Fs,PanelFooter:ks,PanelHeader:Hs,Popover:Ds,PublishComponents:_s,PublishContainer:Vs,publishContextKey:Bs,injectPublishContext:Os,PublishField:Ns,PublishFields:Gs,PublishFieldsProvider:zs,PublishForm:Us,PublishLocalizations:js,PublishSections:qs,PublishTabs:Ks,Radio:Ws,RadioGroup:$s,Select:Qs,Separator:Js,Slider:Xs,Skeleton:Ys,SplitterGroup:Zs,SplitterPanel:er,SplitterResizeHandle:tr,StatusIndicator:or,Subheading:nr,Switch:sr,TabContent:rr,Stack:ir,StackClose:ar,StackHeader:lr,StackFooter:cr,StackContent:dr,Table:ur,TableCell:pr,TableColumn:mr,TableColumns:fr,TableRow:hr,TableRows:vr,TabList:gr,TabProvider:Sr,Tabs:Cr,TabTrigger:br,Textarea:yr,TimePicker:wr,ToggleGroup:Tr,ToggleItem:Pr,Widget:Rr,registerIconSet:xr,registerIconSetFromStrings:Ir}=__STATAMIC__.ui,z=Statamic.$pinia.defineStore("fontAwesome",{state:()=>({icons:null,loading:!1}),actions:{fetchIcons(d){return this.icons||this.loading?Promise.resolve():(this.loading=!0,fetch(d).then(r=>r.json()).then(r=>this.icons=Object.values(r)).catch(r=>console.error("Failed to fetch Font Awesome icons:",r)).finally(()=>this.loading=!1))}}}),U={class:"flex items-center gap-4"},j={class:"text-xs truncate"},q={class:"flex items-center gap-4"},K={class:"text-xs truncate"},W={__name:"FontAwesome",props:g.props,emits:[...g.emits,"focus","blur"],setup(d,{expose:r,emit:w}){const T=w,n=d,{expose:P,update:R,isReadOnly:x}=g.use(T,n);r(P);const a=z(),u=C(""),l=C(50);let s=null,p=null;const m=h(()=>{if(!a.icons)return[];const e=a.icons.filter(t=>n.meta.styles.includes(t.style));return u.value.length>0?e.filter(t=>t.label.toLowerCase().includes(u.value.toLowerCase())):e}),I=h(()=>{const e=m.value.slice(0,l.value);if(!s&&n.value&&!e.find(t=>t.class===n.value)){const t=m.value.find(o=>o.class===n.value);t&&e.push(t)}return e}),E=h(()=>(n.meta.script?Array.from(document.getElementsByTagName("script")).filter(t=>t.src===n.meta.script):Array.from(document.getElementsByTagName("link")).filter(t=>t.href===n.meta.css)).length>0);function M(e){u.value=e,l.value=50}function f(){const{scrollTop:e,scrollHeight:t,clientHeight:o}=s,H=e+o>=t-100,D=l.value{for(const t of e){for(const o of t.addedNodes)s||L(o);for(const o of t.removedNodes)s&&A(o)}}),p.observe(document.body,{childList:!0,subtree:!0})}function k(){if(E.value)return;const e=n.meta.script?Object.assign(document.createElement("script"),{src:n.meta.script}):Object.assign(document.createElement("link"),{rel:"stylesheet",href:n.meta.css});document.head.appendChild(e)}return B(()=>{a.fetchIcons(n.meta.url),k(),F()}),O(()=>{p.disconnect(),s&&s.removeEventListener("scroll",f)}),(e,t)=>(N(),V(c(G),{clearable:"",class:v({invisible:!c(a).icons}),"read-only":c(x),options:I.value,placeholder:"Type to search …","ignore-filter":!0,"model-value":c(a).icons?e.value:null,"option-value":"class","onUpdate:modelValue":c(R),onSearch:M},{option:y(o=>[i("div",U,[i("i",{class:v(["w-5 h-5",o.class])},null,2),i("span",j,b(o.label),1)])]),"selected-option":y(({option:o})=>[i("div",q,[i("i",{class:v(["w-5 h-5",o.class])},null,2),i("span",K,b(o.label),1)])]),_:1},8,["class","read-only","options","model-value","onUpdate:modelValue"]))}};Statamic.booting(()=>{Statamic.$components.register("font_awesome-fieldtype",W)}); diff --git a/resources/dist/build/assets/cp-QrUPv2vB.css b/resources/dist/build/assets/cp-QrUPv2vB.css deleted file mode 100644 index 9c2f72e..0000000 --- a/resources/dist/build/assets/cp-QrUPv2vB.css +++ /dev/null @@ -1 +0,0 @@ -@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial}}}@layer addon-theme{:root,:host{--color-gray-300:var(--theme-color-gray-300);--color-gray-700:var(--theme-color-gray-700);--spacing:.25rem;--text-xs:.825rem;--text-xs--line-height:calc(1 / .75)}}@layer addon-utilities{.invisible{visibility:hidden}.flex{display:flex}.h-5{height:calc(var(--spacing) * 5)}.w-5{width:calc(var(--spacing) * 5)}.items-center{align-items:center}.gap-4{gap:calc(var(--spacing) * 4)}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}}:root{--animation-timing-function-fast-out-slow-in:cubic-bezier(.4,0,.2,1);--color-button-active:hsl(from var(--color-gray-300) h s l / .45)}.dark{--color-button-active:hsl(from var(--color-gray-700) h s l / .45)}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false} diff --git a/resources/dist/build/manifest.json b/resources/dist/build/manifest.json index 5908920..9ff9b59 100644 --- a/resources/dist/build/manifest.json +++ b/resources/dist/build/manifest.json @@ -1,6 +1,6 @@ { "resources/css/cp.css": { - "file": "assets/cp-QrUPv2vB.css", + "file": "assets/cp-Bd8kaA_c.css", "src": "resources/css/cp.css", "isEntry": true, "name": "cp", @@ -9,7 +9,7 @@ ] }, "resources/js/cp.js": { - "file": "assets/cp-CXMWA2cY.js", + "file": "assets/cp-DUuUuv0O.js", "name": "cp", "src": "resources/js/cp.js", "isEntry": true diff --git a/resources/js/FontAwesome.vue b/resources/js/FontAwesome.vue index 188bde8..8e4fdb5 100644 --- a/resources/js/FontAwesome.vue +++ b/resources/js/FontAwesome.vue @@ -58,7 +58,16 @@ const icons = computed(() => { return iconsByStyle; }); -const visibleIcons = computed(() => icons.value.slice(0, limit.value)); +const visibleIcons = computed(() => { + const visible = icons.value.slice(0, limit.value); + + if (!viewport && props.value && !visible.find((i) => i.class === props.value)) { + const selected = icons.value.find((i) => i.class === props.value); + if (selected) visible.push(selected); + } + + return visible; +}); const fontAwesomeIsLoaded = computed(() => { const elements = props.meta.script