fan-components 1.0.6 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Button/index.d.ts +2 -2
- package/dist/components/Button/index.d.ts.map +1 -1
- package/dist/components/Collapse/index.d.ts +3 -2
- package/dist/components/Collapse/index.d.ts.map +1 -1
- package/dist/components/Icon/index.d.ts +2 -2
- package/dist/components/Icon/index.d.ts.map +1 -1
- package/dist/components/index.d.ts +3 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/types.d.ts +4 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../packages/components/Button/index.ts"],"names":[],"mappings":"AAGA,cAAc,cAAc,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../packages/components/Button/index.ts"],"names":[],"mappings":"AAGA,cAAc,cAAc,CAAC;AAE7B,eAAO,MAAM,QAAQ,KAAsB,CAAC;AAC5C,eAAe,QAAQ,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * from "./src/Collapse";
|
|
2
|
-
declare const
|
|
3
|
-
export
|
|
2
|
+
export declare const FFCollapse: any;
|
|
3
|
+
export declare const FFCollapseItem: import("vue").DefineComponent<{}, {}, any>;
|
|
4
|
+
export default FFCollapse;
|
|
4
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../packages/components/Collapse/index.ts"],"names":[],"mappings":"AAIA,cAAc,gBAAgB,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../packages/components/Collapse/index.ts"],"names":[],"mappings":"AAIA,cAAc,gBAAgB,CAAC;AAE/B,eAAO,MAAM,UAAU,KAA0C,CAAC;AAClE,eAAO,MAAM,cAAc,4CAAe,CAAC;AAC3C,eAAe,UAAU,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../packages/components/Icon/index.ts"],"names":[],"mappings":"AAQA,cAAc,YAAY,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../packages/components/Icon/index.ts"],"names":[],"mappings":"AAQA,cAAc,YAAY,CAAC;AAE3B,eAAO,MAAM,MAAM,KAAoB,CAAC;AACxC,eAAe,MAAM,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../packages/components/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../packages/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAO,MAAM,EAAE,MAAM,KAAK,CAAC;AASvC,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAexD,QAAA,MAAM,EAAE,EAAE,MAAoB,CAAC;AAC/B,eAAe,EAAE,CAAC"}
|
package/dist/components/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as
|
|
1
|
+
import{library as e}from"@fortawesome/fontawesome-svg-core";import{fas as t}from"@fortawesome/free-solid-svg-icons";import{FontAwesomeIcon as o}from"@fortawesome/vue-fontawesome";import{defineComponent as r,useAttrs as i,computed as l,openBlock as a,createElementBlock as n,mergeProps as s,createVNode as d,unref as p,normalizeProps as u,guardReactiveProps as c,onMounted as f,ref as y,normalizeClass as m,createBlock as v,createCommentVNode as q,createElementVNode as g,renderSlot as b,watch as h,provide as B,inject as _,createTextVNode as S,toDisplayString as $,Transition as w,toHandlers as x,withCtx as C,withDirectives as k,vShow as I}from"vue";import{withInstall as O}from"@fan-components/utils";var j=r({name:"FfIcon",inheritAttrs:!1,__name:"Icon",props:{border:{type:Boolean,required:!1},fixedWidth:{type:Boolean,required:!1},flip:{type:[String,Boolean],required:!1},icon:{type:[Object,Array,String],required:!0},mask:{type:[Object,Array,String],required:!1},listItem:{type:Boolean,required:!1},pull:{type:String,required:!1},pulse:{type:Boolean,required:!1},rotation:{type:[Number,String],required:!1},swapOpacity:{type:Boolean,required:!1},size:{type:String,required:!1},spin:{type:Boolean,required:!1},transform:{type:[Object,String],required:!1},symbol:{type:[Boolean,String],required:!1},title:{type:String,required:!1},inverse:{type:Boolean,required:!1},bounce:{type:Boolean,required:!1},shake:{type:Boolean,required:!1},beat:{type:Boolean,required:!1},fade:{type:Boolean,required:!1},beatFade:{type:Boolean,required:!1},spinPulse:{type:Boolean,required:!1},spinReverse:{type:Boolean,required:!1}},setup(e){const t=i(),r=e,f=l(()=>Object.fromEntries(Object.entries(r).filter(([,e])=>void 0!==e))),y=l(()=>{const e={};return t.color&&"string"==typeof t.color&&(e.color=t.color),e});return(e,t)=>(a(),n("i",s({class:["ff-icon",{[`ff-icon--${e.$attrs.type}`]:e.$attrs.type}],style:y.value},e.$attrs),[d(p(o),u(c(f.value)),null,16)],16))}});const F=["disabled","autofocus","type"];const V=O(r({name:"FfButton",__name:"button",props:{type:{type:String,required:!1},size:{type:String,required:!1},plain:{type:Boolean,required:!1},round:{type:Boolean,required:!1},circle:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},nativeType:{type:String,required:!1,default:"button"},autofocus:{type:Boolean,required:!1},icon:{type:String,required:!1},loading:{type:Boolean,required:!1}},setup(e,{expose:t}){f(()=>{});const o=y();return t({ref:o}),(t,r)=>(a(),n("button",{ref_key:"_ref",ref:o,class:m(["ff-button",{[`ff-button--${e.type}`]:e.type,[`ff-button--${e.size}`]:e.size,"is-plain":e.plain,"is-round":e.round,"is-circle":e.circle,"is-disabled":e.disabled,"is-loading":e.loading}]),disabled:e.disabled||e.loading,autofocus:e.autofocus,type:e.nativeType},[e.loading?(a(),v(j,{key:0,icon:"spinner",spin:""})):q("v-if",!0),e.icon?(a(),v(j,{key:1,icon:e.icon},null,8,["icon"])):q("v-if",!0),g("span",null,[b(t.$slots,"default")])],10,F))}}));e.add(t);const z=O(j),A=Symbol("collapseContextKey"),E={class:"ff-collapse"};var N=r({name:"FfCollapse",__name:"Collapse",props:{modelValue:{type:Array,required:!0},accordion:{type:Boolean,required:!1}},emits:["update:modelValue","change"],setup(e,{emit:t}){const o=e,r=t,i=y(o.modelValue);o.accordion&&i.value.length>1&&console.warn("accordion mode should only have one active item");return h(()=>o.modelValue,e=>{i.value=e}),B(A,{activeNames:i,handleItemClick:e=>{let t=[...i.value];if(o.accordion)t=i.value[0]===e?[]:[e],i.value=t;else{const o=t.indexOf(e);o>-1?t.splice(o,1):t.push(e),i.value=t}r("update:modelValue",t),r("change",t)}}),(e,t)=>(a(),n("div",E,[b(e.$slots,"default")]))}});const H=["id"],L={class:"ff-collapse-item__wrapper"},T=["id"];var K=r({name:"FfCollapseItem",__name:"CollapseItem",props:{name:{type:[String,Number],required:!0},title:{type:String,required:!1},disabled:{type:Boolean,required:!1}},setup(e){const t=e,o=_(A),r=l(()=>o?.activeNames.value.includes(t.name)),i=()=>{t.disabled||o?.handleItemClick(t.name)},p={beforeEnter(e){e.style.height="0px",e.style.overflow="hidden"},enter(e){e.style.height=`${e.scrollHeight}px`},afterEnter(e){e.style.height="",e.style.overflow=""},beforeLeave(e){e.style.height=`${e.scrollHeight}px`,e.style.overflow="hidden"},leave(e){e.style.height="0px"},afterLeave(e){e.style.height="",e.style.overflow=""}};return(t,o)=>(a(),n("div",{class:m(["ff-collapse-item",{"is-disabled":e.disabled}])},[g("div",{id:`item-header-${e.name}`,class:m([{"is-disabled":e.disabled,"is-active":r.value},"ff-collapse-item__header"]),onClick:i},[b(t.$slots,"title",{},()=>[S($(e.title),1)]),d(j,{icon:"angle-right",class:"header-angle"})],10,H),d(w,s({name:"slide"},x(p),{persisted:""}),{default:C(()=>[k(g("div",L,[g("div",{id:`item-content-${e.name}`,class:"ff-collapse-item__content"},[b(t.$slots,"default")],8,T)],512),[[I,r.value]])]),_:3},16)],2))}});const P=O(N,{CollapseItem:K}),R=K;e.add(t);const W=[V,z,o,P],D={install:e=>{W.forEach(t=>{e.component(t?.name||"",t)})}};export{V as FFButton,P as FFCollapse,R as FFCollapseItem,z as FFIcon,D as default};
|
|
@@ -3,6 +3,10 @@ import { Plugin } from "vue";
|
|
|
3
3
|
declare const FF: Plugin;
|
|
4
4
|
export default FF;
|
|
5
5
|
|
|
6
|
+
export { FFButton } from './Button';
|
|
7
|
+
export { FFIcon } from './Icon';
|
|
8
|
+
export { FFCollapse, FFCollapseItem } from './Collapse';
|
|
9
|
+
|
|
6
10
|
export * from './Button'
|
|
7
11
|
export * from './Collapse'
|
|
8
12
|
export * from './Icon'
|