@feedmepos/ui-library 0.0.12 → 0.0.13
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/dynamic-dialog/FmDynamicDialog.vue.d.ts +1 -1
- package/dist/components/form/select/FmSelect.vue.d.ts +11 -10
- package/dist/components/menu/menu-container/FmMenu.vue.d.ts +10 -8
- package/dist/components/tooltip/FmTooltip.vue.d.ts +3 -3
- package/dist/components.d.ts +561 -123
- package/dist/federation/FmDateRangePicker-6a251133.css +1 -0
- package/dist/federation/FmDropField-b51924c1.css +1 -0
- package/dist/federation/FmMenu-1bf41c36.css +1 -0
- package/dist/federation/FmProgressIndicator.vue_vue_type_style_index_0_lang-4936958a.js +1 -0
- package/dist/federation/FmSelect-0d4033b1.css +1 -0
- package/dist/federation/FmStepper.vue_vue_type_script_setup_true_lang-ebb560f4.js +1 -0
- package/dist/federation/FmTextField.vue_vue_type_style_index_0_lang-37891b48.js +1 -0
- package/dist/federation/{FmTimePicker.vue_vue_type_style_index_0_lang-cd3ff46f.js → FmTimePicker.vue_vue_type_style_index_0_lang-adf67efb.js} +1 -1
- package/dist/federation/FmTooltip.vue_vue_type_script_setup_true_lang-4afc1a0b.js +1 -0
- package/dist/federation/__federation_expose_FmDateRangePicker-96bfdeee.js +1 -0
- package/dist/federation/__federation_expose_FmDropField-acc0feb2.js +1 -0
- package/dist/federation/__federation_expose_FmDynamicDialog-f6d013b7.js +1 -0
- package/dist/federation/__federation_expose_FmMenu-da3eca46.js +1 -0
- package/dist/federation/__federation_expose_FmProgressIndicator-cb1c88dd.js +1 -0
- package/dist/federation/__federation_expose_FmSelect-c850d1a0.js +1 -0
- package/dist/federation/{__federation_expose_FmStepper-39811b61.js → __federation_expose_FmStepper-fc3f64a1.js} +1 -1
- package/dist/federation/{__federation_expose_FmTextField-ee99cd30.js → __federation_expose_FmTextField-09b9d527.js} +1 -1
- package/dist/federation/{__federation_expose_FmTimePicker-149aa26d.js → __federation_expose_FmTimePicker-2f0c4dd1.js} +1 -1
- package/dist/federation/{__federation_expose_FmTooltip-fa2c64c7.js → __federation_expose_FmTooltip-adedf618.js} +1 -1
- package/dist/federation/dialog-plugin-a69976d4.js +1 -0
- package/dist/federation/feedmepos-ui-components.js +1 -1
- package/dist/federation/floating-ui.vue.esm-6ee3a4dc.js +1 -0
- package/dist/federation/index-81fbf747.css +1 -0
- package/dist/federation/index-d2981ce7.js +11 -0
- package/dist/feedmepos-ui-library.js +5150 -4876
- package/dist/feedmepos-ui-library.umd.cjs +6 -6
- package/dist/global-components.d.ts +6 -3
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/federation/FmDateRangePicker-2b4b8a36.css +0 -1
- package/dist/federation/FmMenu-008b4edf.css +0 -1
- package/dist/federation/FmSelect-5383ab5c.css +0 -1
- package/dist/federation/FmStepper.vue_vue_type_script_setup_true_lang-620c5c99.js +0 -1
- package/dist/federation/FmTextField.vue_vue_type_style_index_0_lang-31424202.js +0 -1
- package/dist/federation/FmTooltip.vue_vue_type_script_setup_true_lang-ec99af74.js +0 -1
- package/dist/federation/__federation_expose_FmDateRangePicker-6e0116bd.js +0 -1
- package/dist/federation/__federation_expose_FmMenu-c78ae222.js +0 -1
- package/dist/federation/__federation_expose_FmSelect-dd3e5756.js +0 -1
- package/dist/federation/index-039b0ff7.js +0 -11
- package/dist/federation/index-1375029c.css +0 -1
- /package/dist/federation/{FmStepper-f275f227.css → FmProgressIndicator-f275f227.css} +0 -0
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.fm-date-picker__container[data-v-fdf144e1]{margin-top:.25rem;height:48px;border-radius:8px;border-width:1px;border-color:var(--fm-color-neutral-gray-300);padding:11px 7px;cursor:pointer;background-color:var(--fm-color-neutral-white)}.fm-date-picker__container[data-v-fdf144e1]:hover:not(.fm-date-picker__container--opened):not(.fm-date-picker__container--disabled){border-color:var(--fm-color-neutral-gray-400)}.fm-date-picker__container--opened[data-v-fdf144e1]{border-width:2px;border-color:var(--fm-color-primary);padding:10px 6px}.fm-date-picker__container--disabled[data-v-fdf144e1]{cursor:not-allowed;border-color:var(--fm-color-neutral-gray-200)}.fm-calendar[data-v-fdf144e1]{z-index:20;background-color:var(--fm-color-neutral-white)}.fm-calendar__row[data-v-fdf144e1]{display:flex;height:48px;width:100%}.fm-calendar__cell[data-v-fdf144e1]{display:flex;height:48px;width:48px;align-items:center;justify-content:center}.fm-calendar__cell__button[data-v-fdf144e1]{height:100%;width:100%;border-radius:9999px}.fm-calendar__cell__button[data-v-fdf144e1]:hover:not(.fm-calendar__cell__button--selected):not(.fm-calendar__cell__button--selected-start):not(.fm-calendar__cell__button--selected-between):not(.fm-calendar__cell__button--selected-end){border-radius:9999px;background-color:var(--fm-color-opacity-sm)}.fm-calendar__cell__button--selected[data-v-fdf144e1]{font-size:1rem;font-weight:700;line-height:1.5;letter-spacing:.005em;text-decoration-line:none;background-color:var(--fm-color-primary);color:var(--fm-color-neutral-white)}.fm-calendar__cell__button--selected-start[data-v-fdf144e1]{border-radius:9999px 0 0 9999px;font-size:1rem;font-weight:700;line-height:1.5;letter-spacing:.005em;text-decoration-line:none;background-color:var(--fm-color-primary);color:var(--fm-color-neutral-white)}.fm-calendar__cell__button--selected-between[data-v-fdf144e1]{border-radius:0;background-color:var(--fm-color-system-orange-100)}.fm-calendar__cell__button--selected-end[data-v-fdf144e1]{border-radius:0 9999px 9999px 0;font-size:1rem;font-weight:700;line-height:1.5;letter-spacing:.005em;text-decoration-line:none;background-color:var(--fm-color-primary);color:var(--fm-color-neutral-white)}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.fm-menu[data-v-1f528682]{display:block;min-height:24px;min-width:24px}.fm-menu__content[data-v-1f528682]{max-height:408px;min-width:112px;padding:12px 4px;display:flex;flex-direction:column;overflow-y:auto;border-radius:8px;background-color:var(--fm-color-neutral-white);--tw-shadow: 0px 8px 16px 0px rgba(199, 199, 204, .24);--tw-shadow-colored: 0px 8px 16px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);z-index:99;position:absolute;display:none}.fm-menu__content--opened[data-v-1f528682]{display:block}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.fm-select[data-v-7475b9fb]{display:flex;flex-direction:column;gap:4px}.fm-select__container[data-v-7475b9fb]{height:48px;width:100%;display:flex;gap:8px;align-items:center;justify-content:space-between;padding:11px 7px;border:1px solid var(--fm-color-neutral-gray-300);border-radius:8px;background-color:var(--fm-color-neutral-white);cursor:pointer;position:relative}.fm-select__container--expanded[data-v-7475b9fb]:not(.fm-select__container--disabled){outline:none;border:2px solid var(--fm-color-primary);padding:10px 6px}.fm-select__container--invalid[data-v-7475b9fb]:not(.fm-select__container--expanded):not(.fm-select__container--disabled){outline:none;border:2px solid var(--fm-color-system-red-300);padding:10px 6px}.fm-select__container--valid[data-v-7475b9fb]:not(.fm-select__container--expanded):not(.fm-select__container--disabled){outline:none;border:2px solid var(--fm-color-system-green-300);padding:10px 6px}.fm-select__container--warning[data-v-7475b9fb]:not(.fm-select__container--expanded):not(.fm-select__container--disabled){outline:none;border:2px solid var(--fm-color-system-orange-300);padding:10px 6px}.fm-select__container[data-v-7475b9fb]:hover:not(.fm-select__container--expanded):not(.fm-select__container--disabled){padding:11px 7px;border:1px solid var(--fm-color-neutral-gray-400)}.fm-select__container--disabled[data-v-7475b9fb]{padding:11px 7px;border:1px solid var(--fm-color-neutral-gray-200);cursor:not-allowed}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{importShared as r,__tla as K}from"./__federation_fn_import.js";import{_ as W,__tla as L}from"./FmStepHeader.vue_vue_type_script_setup_true_lang-f5088e67.js";import{S as O}from"./provider-keys-22cc7f73.js";let E,Q=Promise.all([(()=>{try{return K}catch{}})(),(()=>{try{return L}catch{}})()]).then(async()=>{const{defineComponent:q}=await r("vue"),{createElementVNode:g,renderSlot:P,openBlock:j,createElementBlock:z}=await r("vue"),A={class:"fm-progress-indicator relative"},F=["data-progress"],M={class:"absolute flex fm-typo-body-sm-400 h-full inset-0 items-center justify-center w-full"},{computed:T,onMounted:D,onUpdated:I,ref:R,watch:U}=await r("vue"),G=q({__name:"FmProgressIndicator",props:{modelValue:{type:Number,required:!0}},setup(o){const f=o,t=R(null),s=T(()=>`${f.modelValue/100*360}deg`),l=e=>{t.value&&t.value.style.setProperty("--progress",e)};return D(()=>{l(s.value)}),I(()=>{l(s.value)}),U(s,async e=>{l(e)}),(e,C)=>(j(),z("div",A,[g("div",{ref_key:"progress",ref:t,class:"fm-progress-circular w-full","data-progress":s.value},null,8,F),g("div",M,[P(e.$slots,"default")])]))}});let h,i,d,n,x,b,w,V,u,$,c,p,S,k,v,N,B,m;({defineComponent:h}=await r("vue")),{renderSlot:i,normalizeClass:d,createElementVNode:n,toDisplayString:x,createTextVNode:b,withCtx:w,createVNode:V,openBlock:u,createBlock:$,createCommentVNode:c,createElementBlock:p}=await r("vue"),S={class:"hidden items-center xs:flex"},k={class:"flex gap-2 items-start justify-end mb-24 mt-40 p-0 self-stretch"},{ref:v,onMounted:N,provide:B,computed:m}=await r("vue"),E=h({__name:"FmStepper",props:{modelValue:{type:Number,required:!0},orientation:{type:String,default:"horizontal"}},emits:["update:model-value"],setup(o,{emit:f}){const t=o;B(O,{currentStep:()=>t.modelValue,goToStep:a=>{f("update:model-value",a)}});const s=v(),l=v([]),e=m(()=>l.value[t.modelValue-1]),C=m(()=>t.modelValue/l.value.length*100),H=m(()=>`${t.modelValue} of ${l.value.length}`),J=()=>{var _;const a=Array.from(((_=s.value)==null?void 0:_.querySelectorAll(":scope > .fm-step"))??[]);l.value=a.map(y=>({title:y.dataset.title??"",description:y.dataset.description,disabled:y.dataset.disabled=="true"}))};return N(()=>{J()}),(a,_)=>(u(),p("div",{class:d(`fm-stepper fm-stepper__${o.orientation}`)},[n("div",{ref_key:"stepperRef",ref:s,class:d(`flex mx-24 mt-12 mb-24 xs:hidden ${o.orientation==="vertical"?"flex-col":""}`)},[i(a.$slots,"default")],2),n("div",S,[V(G,{"model-value":C.value,class:"mr-12",style:{"min-width":"60px"}},{default:w(()=>[b(x(H.value),1)]),_:1},8,["model-value"]),e.value?(u(),$(W,{key:0,class:"grow","title-bold":"",title:e.value.title,description:e.value.description,disabled:e.value.disabled},null,8,["title","description","disabled"])):c("",!0)]),a.$slots.contents?(u(),p("div",{key:0,class:d(`flex-col mx-24 mt-12 mb-24 ${o.orientation==="vertical"?"w-2/3":""}`)},[i(a.$slots,"contents"),n("div",k,[i(a.$slots,"actions")])],2)):c("",!0)],2))}})});export{E as _,Q as __tla};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{importShared as f,__tla as J}from"./__federation_fn_import.js";import y,{__tla as K}from"./__federation_expose_FmIcon-e5ab92a8.js";import{u as W,a as Q,__tla as R}from"./useValidation-f33a4108.js";let T,U=Promise.all([(()=>{try{return J}catch{}})(),(()=>{try{return K}catch{}})(),(()=>{try{return R}catch{}})()]).then(async()=>{const{defineComponent:I}=await f("vue"),{renderSlot:i,toDisplayString:t,normalizeClass:n,createElementVNode:o,openBlock:l,createElementBlock:a,createCommentVNode:d,createBlock:x,unref:u,createTextVNode:M,renderList:w,Fragment:L,createVNode:q}=await f("vue"),F={class:"fm-text-field"},N={class:"fm-text-field--label"},$={key:0},E=["value","inputMode","type","placeholder","required","minlength","maxlength","disabled","readOnly"],S={key:0},z={key:0,class:"fm-text-field__helper-container fm-typo-body-sm-400 text-fm-color-typo-secondary"},O={key:0},P={key:1},{computed:D,onMounted:j,ref:_,watch:A}=await f("vue");var g=(r=>(r.required="*",r.optional="(optional)",r))(g||{});T=I({__name:"FmTextField",props:{required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},placeholder:{default:""},helperText:{default:""},minLength:{default:0},maxLength:{default:NaN},inputmode:{default:"text"},readonly:{type:Boolean,default:!1},labelMark:{default:"none"},leadingIcon:{default:()=>({name:"",color:""})},trailingIcon:{default:()=>({name:"",color:""})},showSuccess:{type:Boolean,default:!1},showValidBorder:{type:Boolean,default:!1},prependText:{default:""},appendText:{default:""},label:{},modelValue:{},rules:{default:()=>[]}},emits:["update:modelValue"],setup(r,{emit:b}){const p=r,G=_(null),c=_(!1),{validate:h,errorMessages:s,resetValidation:v,setValidationValue:k}=W(p),{isPristine:V}=Q(h,v,b,""),H=e=>{V.value=!1,e.target.value||v(),k(e.target.value),b("update:modelValue",e.target.value)};A(()=>p.modelValue,()=>{V.value||h()});const C=D(()=>s.value.length===0);return j(()=>{k(p.modelValue)}),(e,m)=>(l(),a("label",F,[o("div",null,[o("div",N,[i(e.$slots,"label"),o("span",{class:n({"fm-typo-body-lg-400":!0,"text-fm-color-typo-primary":!e.disabled,"text-fm-color-typo-disabled":e.disabled})},t(e.label),3),e.labelMark!=="none"?(l(),a("span",{key:0,class:n({"fm-color-typo-tertiary fm-typo-body-md-400":e.labelMark==="optional","fm-color-typo-error fm-typo-body-lg-700":e.labelMark==="required"})},t(g[e.labelMark]),3)):d("",!0)])]),o("div",{class:n({"fm-text-field__container":!0,"fm-text-field__container--focused":c.value,"fm-text-field__container--invalid":!!e.modelValue&&!C.value,"fm-text-field__container--valid":e.showValidBorder&&e.showSuccess&&!!e.modelValue&&C.value,"fm-text-field__container--disabled":e.disabled})},[i(e.$slots,"prepend",{},()=>[e.prependText?(l(),a("div",$,t(e.prependText),1)):d("",!0),e.leadingIcon.name?(l(),x(y,{key:1,name:e.leadingIcon.name,size:"md",color:e.leadingIcon.color??(e.disabled?"#C7C7CC":"#1C1C1E")},null,8,["name","color"])):d("",!0)]),o("input",{ref_key:"inputEl",ref:G,class:n({"fm-text-field--input fm-typo-body-lg-400":!0,"fm-color-typo-primary":!e.disabled,"fm-color-typo-disabled":e.disabled}),value:e.modelValue,inputMode:e.inputmode,type:e.inputmode,placeholder:e.placeholder,required:e.required,minlength:e.minLength,maxlength:e.maxLength,disabled:e.disabled,readOnly:e.readonly,onInput:H,onFocus:m[0]||(m[0]=()=>c.value=!0),onBlur:m[1]||(m[1]=()=>c.value=!1)},null,42,E),i(e.$slots,"append",{},()=>[e.appendText?(l(),a("div",S,t(e.appendText),1)):d("",!0),e.trailingIcon.name?(l(),x(y,{key:1,name:e.trailingIcon.name,size:"md",color:e.trailingIcon.color??(e.disabled?"#C7C7CC":"#1C1C1E")},null,8,["name","color"])):d("",!0)])],2),e.helperText||u(s).length>0?(l(),a("div",z,[u(s).length===0?(l(),a("div",O,[i(e.$slots,"helper-text",{},()=>[M(t(e.helperText),1)])])):(l(),a("div",P,[(l(!0),a(L,null,w(u(s),B=>(l(),a("div",{key:B,class:"flex gap-4 items-center text-fm-color-typo-error"},[q(y,{name:"error",color:"#FF3B30",size:"sm"}),o("span",null,t(B),1)]))),128))])),o("div",{class:n({"fm-color-typo-disabled":e.disabled})},t(e.maxLength?`${e.modelValue.length} / ${e.maxLength}`:""),3)])):d("",!0)]))}})});export{T as _,U as __tla};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{importShared as ut,__tla as Fe}from"./__federation_fn_import.js";import Pe,{__tla as _e}from"./__federation_expose_FmButton-a3ca7654.js";import{bq as q,X as H,bh as ot,bk as Oe,aU as bt,b6 as Be,bd as Ve,bj as G}from"./runtime-core.esm-bundler-35391e07.js";let Zt,Kt,Me=Promise.all([(()=>{try{return Fe}catch{}})(),(()=>{try{return _e}catch{}})()]).then(async()=>{const I=Math.min,j=Math.max,it=Math.round,O=t=>({x:t,y:t}),te={left:"right",right:"left",bottom:"top",top:"bottom"},ee={start:"end",end:"start"};function ft(t,e,n){return j(t,I(e,n))}function J(t,e){return typeof t=="function"?t(e):t}function N(t){return t.split("-")[0]}function Q(t){return t.split("-")[1]}function Tt(t){return t==="x"?"y":"x"}function dt(t){return t==="y"?"height":"width"}function rt(t){return["top","bottom"].includes(N(t))?"y":"x"}function pt(t){return Tt(rt(t))}function ne(t,e,n){n===void 0&&(n=!1);const o=Q(t),i=pt(t),l=dt(i);let r=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[l]>e.floating[l]&&(r=lt(r)),[r,lt(r)]}function oe(t){const e=lt(t);return[mt(t),e,mt(e)]}function mt(t){return t.replace(/start|end/g,e=>ee[e])}function ie(t,e,n){const o=["left","right"],i=["right","left"],l=["top","bottom"],r=["bottom","top"];switch(t){case"top":case"bottom":return n?e?i:o:e?o:i;case"left":case"right":return e?l:r;default:return[]}}function re(t,e,n,o){const i=Q(t);let l=ie(N(t),n==="start",o);return i&&(l=l.map(r=>r+"-"+i),e&&(l=l.concat(l.map(mt)))),l}function lt(t){return t.replace(/left|right|bottom|top/g,e=>te[e])}function le(t){return{top:0,right:0,bottom:0,left:0,...t}}function kt(t){return typeof t!="number"?le(t):{top:t,right:t,bottom:t,left:t}}function at(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function Rt(t,e,n){let{reference:o,floating:i}=t;const l=rt(e),r=pt(e),a=dt(r),s=N(e),u=l==="y",d=o.x+o.width/2-i.width/2,p=o.y+o.height/2-i.height/2,y=o[a]/2-i[a]/2;let c;switch(s){case"top":c={x:d,y:o.y-i.height};break;case"bottom":c={x:d,y:o.y+o.height};break;case"right":c={x:o.x+o.width,y:p};break;case"left":c={x:o.x-i.width,y:p};break;default:c={x:o.x,y:o.y}}switch(Q(e)){case"start":c[r]-=y*(n&&u?-1:1);break;case"end":c[r]+=y*(n&&u?-1:1);break}return c}const ae=async(t,e,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:l=[],platform:r}=n,a=l.filter(Boolean),s=await(r.isRTL==null?void 0:r.isRTL(e));let u=await r.getElementRects({reference:t,floating:e,strategy:i}),{x:d,y:p}=Rt(u,o,s),y=o,c={},f=0;for(let m=0;m<a.length;m++){const{name:h,fn:w}=a[m],{x,y:v,data:b,reset:T}=await w({x:d,y:p,initialPlacement:o,placement:y,strategy:i,middlewareData:c,rects:u,platform:r,elements:{reference:t,floating:e}});if(d=x??d,p=v??p,c={...c,[h]:{...c[h],...b}},T&&f<=50){f++,typeof T=="object"&&(T.placement&&(y=T.placement),T.rects&&(u=T.rects===!0?await r.getElementRects({reference:t,floating:e,strategy:i}):T.rects),{x:d,y:p}=Rt(u,y,s)),m=-1;continue}}return{x:d,y:p,placement:y,strategy:i,middlewareData:c}};async function Et(t,e){var n;e===void 0&&(e={});const{x:o,y:i,platform:l,rects:r,elements:a,strategy:s}=t,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:p="floating",altBoundary:y=!1,padding:c=0}=J(e,t),f=kt(c),m=a[y?p==="floating"?"reference":"floating":p],h=at(await l.getClippingRect({element:(n=await(l.isElement==null?void 0:l.isElement(m)))==null||n?m:m.contextElement||await(l.getDocumentElement==null?void 0:l.getDocumentElement(a.floating)),boundary:u,rootBoundary:d,strategy:s})),w=p==="floating"?{...r.floating,x:o,y:i}:r.reference,x=await(l.getOffsetParent==null?void 0:l.getOffsetParent(a.floating)),v=await(l.isElement==null?void 0:l.isElement(x))?await(l.getScale==null?void 0:l.getScale(x))||{x:1,y:1}:{x:1,y:1},b=at(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({rect:w,offsetParent:x,strategy:s}):w);return{top:(h.top-b.top+f.top)/v.y,bottom:(b.bottom-h.bottom+f.bottom)/v.y,left:(h.left-b.left+f.left)/v.x,right:(b.right-h.right+f.right)/v.x}}const se=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:o,placement:i,rects:l,platform:r,elements:a,middlewareData:s}=e,{element:u,padding:d=0}=J(t,e)||{};if(u==null)return{};const p=kt(d),y={x:n,y:o},c=pt(i),f=dt(c),m=await r.getDimensions(u),h=c==="y",w=h?"top":"left",x=h?"bottom":"right",v=h?"clientHeight":"clientWidth",b=l.reference[f]+l.reference[c]-y[c]-l.floating[f],T=y[c]-l.reference[c],P=await(r.getOffsetParent==null?void 0:r.getOffsetParent(u));let g=P?P[v]:0;(!g||!await(r.isElement==null?void 0:r.isElement(P)))&&(g=a.floating[v]||l.floating[f]);const D=b/2-T/2,M=g/2-m[f]/2-1,tt=I(p[w],M),et=I(p[x],M),C=tt,nt=g-m[f]-et,R=g/2-m[f]/2+D,A=ft(C,R,nt),S=!s.arrow&&Q(i)!=null&&R!=A&&l.reference[f]/2-(R<C?tt:et)-m[f]/2<0,_=S?R<C?R-C:R-nt:0;return{[c]:y[c]+_,data:{[c]:A,centerOffset:R-A-_,...S&&{alignmentOffset:_}},reset:S}}}),ce=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:i,middlewareData:l,rects:r,initialPlacement:a,platform:s,elements:u}=e,{mainAxis:d=!0,crossAxis:p=!0,fallbackPlacements:y,fallbackStrategy:c="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:m=!0,...h}=J(t,e);if((n=l.arrow)!=null&&n.alignmentOffset)return{};const w=N(i),x=N(a)===a,v=await(s.isRTL==null?void 0:s.isRTL(u.floating)),b=y||(x||!m?[lt(a)]:oe(a));!y&&f!=="none"&&b.push(...re(a,m,f,v));const T=[a,...b],P=await Et(e,h),g=[];let D=((o=l.flip)==null?void 0:o.overflows)||[];if(d&&g.push(P[w]),p){const C=ne(i,r,v);g.push(P[C[0]],P[C[1]])}if(D=[...D,{placement:i,overflows:g}],!g.every(C=>C<=0)){var M,tt;const C=(((M=l.flip)==null?void 0:M.index)||0)+1,nt=T[C];if(nt)return{data:{index:C,overflows:D},reset:{placement:nt}};let R=(tt=D.filter(A=>A.overflows[0]<=0).sort((A,S)=>A.overflows[1]-S.overflows[1])[0])==null?void 0:tt.placement;if(!R)switch(c){case"bestFit":{var et;const A=(et=D.map(S=>[S.placement,S.overflows.filter(_=>_>0).reduce((_,Se)=>_+Se,0)]).sort((S,_)=>S[1]-_[1])[0])==null?void 0:et[0];A&&(R=A);break}case"initialPlacement":R=a;break}if(i!==R)return{reset:{placement:R}}}return{}}}};async function ue(t,e){const{placement:n,platform:o,elements:i}=t,l=await(o.isRTL==null?void 0:o.isRTL(i.floating)),r=N(n),a=Q(n),s=rt(n)==="y",u=["left","top"].includes(r)?-1:1,d=l&&s?-1:1,p=J(e,t);let{mainAxis:y,crossAxis:c,alignmentAxis:f}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...p};return a&&typeof f=="number"&&(c=a==="end"?f*-1:f),s?{x:c*d,y:y*u}:{x:y*u,y:c*d}}const fe=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){const{x:n,y:o}=e,i=await ue(e,t);return{x:n+i.x,y:o+i.y,data:i}}}},de=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:i}=e,{mainAxis:l=!0,crossAxis:r=!1,limiter:a={fn:h=>{let{x:w,y:x}=h;return{x:w,y:x}}},...s}=J(t,e),u={x:n,y:o},d=await Et(e,s),p=rt(N(i)),y=Tt(p);let c=u[y],f=u[p];if(l){const h=y==="y"?"top":"left",w=y==="y"?"bottom":"right",x=c+d[h],v=c-d[w];c=ft(x,c,v)}if(r){const h=p==="y"?"top":"left",w=p==="y"?"bottom":"right",x=f+d[h],v=f-d[w];f=ft(x,f,v)}const m=a.fn({...e,[y]:c,[p]:f});return{...m,data:{x:m.x-n,y:m.y-o}}}}};function B(t){return Ct(t)?(t.nodeName||"").toLowerCase():"#document"}function k(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function V(t){var e;return(e=(Ct(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Ct(t){return t instanceof Node||t instanceof k(t).Node}function F(t){return t instanceof Element||t instanceof k(t).Element}function L(t){return t instanceof HTMLElement||t instanceof k(t).HTMLElement}function Lt(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof k(t).ShadowRoot}function Z(t){const{overflow:e,overflowX:n,overflowY:o,display:i}=E(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!["inline","contents"].includes(i)}function pe(t){return["table","td","th"].includes(B(t))}function yt(t){const e=ht(),n=E(t);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(o=>(n.willChange||"").includes(o))||["paint","layout","strict","content"].some(o=>(n.contain||"").includes(o))}function me(t){let e=z(t);for(;L(e)&&!st(e);){if(yt(e))return e;e=z(e)}return null}function ht(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function st(t){return["html","body","#document"].includes(B(t))}function E(t){return k(t).getComputedStyle(t)}function ct(t){return F(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function z(t){if(B(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Lt(t)&&t.host||V(t);return Lt(e)?e.host:e}function Dt(t){const e=z(t);return st(e)?t.ownerDocument?t.ownerDocument.body:t.body:L(e)&&Z(e)?e:Dt(e)}function gt(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=Dt(t),l=i===((o=t.ownerDocument)==null?void 0:o.body),r=k(i);return l?e.concat(r,r.visualViewport||[],Z(i)?i:[],r.frameElement&&n?gt(r.frameElement):[]):e.concat(i,gt(i,[],n))}function At(t){const e=E(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const i=L(t),l=i?t.offsetWidth:n,r=i?t.offsetHeight:o,a=it(n)!==l||it(o)!==r;return a&&(n=l,o=r),{width:n,height:o,$:a}}function St(t){return F(t)?t:t.contextElement}function X(t){const e=St(t);if(!L(e))return O(1);const n=e.getBoundingClientRect(),{width:o,height:i,$:l}=At(e);let r=(l?it(n.width):n.width)/o,a=(l?it(n.height):n.height)/i;return(!r||!Number.isFinite(r))&&(r=1),(!a||!Number.isFinite(a))&&(a=1),{x:r,y:a}}const ye=O(0);function Ft(t){const e=k(t);return!ht()||!e.visualViewport?ye:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function he(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==k(t)?!1:e}function K(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),l=St(t);let r=O(1);e&&(o?F(o)&&(r=X(o)):r=X(t));const a=he(l,n,o)?Ft(l):O(0);let s=(i.left+a.x)/r.x,u=(i.top+a.y)/r.y,d=i.width/r.x,p=i.height/r.y;if(l){const y=k(l),c=o&&F(o)?k(o):o;let f=y.frameElement;for(;f&&o&&c!==y;){const m=X(f),h=f.getBoundingClientRect(),w=E(f),x=h.left+(f.clientLeft+parseFloat(w.paddingLeft))*m.x,v=h.top+(f.clientTop+parseFloat(w.paddingTop))*m.y;s*=m.x,u*=m.y,d*=m.x,p*=m.y,s+=x,u+=v,f=k(f).frameElement}}return at({width:d,height:p,x:s,y:u})}function ge(t){let{rect:e,offsetParent:n,strategy:o}=t;const i=L(n),l=V(n);if(n===l)return e;let r={scrollLeft:0,scrollTop:0},a=O(1);const s=O(0);if((i||!i&&o!=="fixed")&&((B(n)!=="body"||Z(l))&&(r=ct(n)),L(n))){const u=K(n);a=X(n),s.x=u.x+n.clientLeft,s.y=u.y+n.clientTop}return{width:e.width*a.x,height:e.height*a.y,x:e.x*a.x-r.scrollLeft*a.x+s.x,y:e.y*a.y-r.scrollTop*a.y+s.y}}function ve(t){return Array.from(t.getClientRects())}function Pt(t){return K(V(t)).left+ct(t).scrollLeft}function xe(t){const e=V(t),n=ct(t),o=t.ownerDocument.body,i=j(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),l=j(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let r=-n.scrollLeft+Pt(t);const a=-n.scrollTop;return E(o).direction==="rtl"&&(r+=j(e.clientWidth,o.clientWidth)-i),{width:i,height:l,x:r,y:a}}function we(t,e){const n=k(t),o=V(t),i=n.visualViewport;let l=o.clientWidth,r=o.clientHeight,a=0,s=0;if(i){l=i.width,r=i.height;const u=ht();(!u||u&&e==="fixed")&&(a=i.offsetLeft,s=i.offsetTop)}return{width:l,height:r,x:a,y:s}}function be(t,e){const n=K(t,!0,e==="fixed"),o=n.top+t.clientTop,i=n.left+t.clientLeft,l=L(t)?X(t):O(1),r=t.clientWidth*l.x,a=t.clientHeight*l.y,s=i*l.x,u=o*l.y;return{width:r,height:a,x:s,y:u}}function _t(t,e,n){let o;if(e==="viewport")o=we(t,n);else if(e==="document")o=xe(V(t));else if(F(e))o=be(e,n);else{const i=Ft(t);o={...e,x:e.x-i.x,y:e.y-i.y}}return at(o)}function Ot(t,e){const n=z(t);return n===e||!F(n)||st(n)?!1:E(n).position==="fixed"||Ot(n,e)}function Te(t,e){const n=e.get(t);if(n)return n;let o=gt(t,[],!1).filter(a=>F(a)&&B(a)!=="body"),i=null;const l=E(t).position==="fixed";let r=l?z(t):t;for(;F(r)&&!st(r);){const a=E(r),s=yt(r);!s&&a.position==="fixed"&&(i=null),(l?!s&&!i:!s&&a.position==="static"&&i&&["absolute","fixed"].includes(i.position)||Z(r)&&!s&&Ot(t,r))?o=o.filter(u=>u!==r):i=a,r=z(r)}return e.set(t,o),o}function ke(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t;const l=[...n==="clippingAncestors"?Te(e,this._c):[].concat(n),o],r=l[0],a=l.reduce((s,u)=>{const d=_t(e,u,i);return s.top=j(d.top,s.top),s.right=I(d.right,s.right),s.bottom=I(d.bottom,s.bottom),s.left=j(d.left,s.left),s},_t(e,r,i));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function Re(t){return At(t)}function Ee(t,e,n){const o=L(e),i=V(e),l=n==="fixed",r=K(t,!0,l,e);let a={scrollLeft:0,scrollTop:0};const s=O(0);if(o||!o&&!l)if((B(e)!=="body"||Z(i))&&(a=ct(e)),o){const u=K(e,!0,l,e);s.x=u.x+e.clientLeft,s.y=u.y+e.clientTop}else i&&(s.x=Pt(i));return{x:r.left+a.scrollLeft-s.x,y:r.top+a.scrollTop-s.y,width:r.width,height:r.height}}function Bt(t,e){return!L(t)||E(t).position==="fixed"?null:e?e(t):t.offsetParent}function Vt(t,e){const n=k(t);if(!L(t))return n;let o=Bt(t,e);for(;o&&pe(o)&&E(o).position==="static";)o=Bt(o,e);return o&&(B(o)==="html"||B(o)==="body"&&E(o).position==="static"&&!yt(o))?n:o||me(t)||n}const Ce=async function(t){let{reference:e,floating:n,strategy:o}=t;const i=this.getOffsetParent||Vt,l=this.getDimensions;return{reference:Ee(e,await i(n),o),floating:{x:0,y:0,...await l(n)}}};function Le(t){return E(t).direction==="rtl"}const De={convertOffsetParentRelativeRectToViewportRelativeRect:ge,getDocumentElement:V,getClippingRect:ke,getOffsetParent:Vt,getElementRects:Ce,getClientRects:ve,getDimensions:Re,getScale:X,isElement:F,isRTL:Le},Mt=(t,e,n)=>{const o=new Map,i={platform:De,...n},l={...i.platform,_c:o};return ae(t,e,{...i,platform:l})};await ut("vue");function vt(t){var e;return(e=t==null?void 0:t.$el)!=null?e:t}function Ae(t){return{name:"arrow",options:t,fn(e){const n=vt(q(t.element));return n==null?{}:se({element:n,padding:t.padding}).fn(e)}}}function Ht(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Nt(t,e){const n=Ht(t);return Math.round(e*n)/n}Kt=function(t,e,n){n===void 0&&(n={});const o=n.whileElementsMounted,i=H(()=>{var g;return(g=q(n.open))!=null?g:!0}),l=H(()=>q(n.middleware)),r=H(()=>{var g;return(g=q(n.placement))!=null?g:"bottom"}),a=H(()=>{var g;return(g=q(n.strategy))!=null?g:"absolute"}),s=H(()=>{var g;return(g=q(n.transform))!=null?g:!0}),u=H(()=>vt(t.value)),d=H(()=>vt(e.value)),p=ot(0),y=ot(0),c=ot(a.value),f=ot(r.value),m=Oe({}),h=ot(!1),w=H(()=>{const g={position:c.value,left:"0",top:"0"};if(!d.value)return g;const D=Nt(d.value,p.value),M=Nt(d.value,y.value);return s.value?{...g,transform:"translate("+D+"px, "+M+"px)",...Ht(d.value)>=1.5&&{willChange:"transform"}}:{position:c.value,left:D+"px",top:M+"px"}});let x;function v(){u.value==null||d.value==null||Mt(u.value,d.value,{middleware:l.value,placement:r.value,strategy:a.value}).then(g=>{p.value=g.x,y.value=g.y,c.value=g.strategy,f.value=g.placement,m.value=g.middlewareData,h.value=!0})}function b(){typeof x=="function"&&(x(),x=void 0)}function T(){if(b(),o===void 0){v();return}if(u.value!=null&&d.value!=null){x=o(u.value,d.value,v);return}}function P(){i.value||(h.value=!1)}return bt([l,r,a],v,{flush:"sync"}),bt([u,d],T,{flush:"sync"}),bt(i,P,{flush:"sync"}),Be()&&Ve(b),{x:G(p),y:G(y),strategy:G(c),placement:G(f),middlewareData:G(m),isPositioned:G(h),floatingStyles:w,update:v}};let Wt,$t,W,xt,U,Y,wt,jt,zt,Xt,Ut,Yt,qt,Gt,It,Jt,$,Qt;({defineComponent:Wt}=await ut("vue")),{renderSlot:$t,createElementVNode:W,toDisplayString:xt,openBlock:U,createElementBlock:Y,createCommentVNode:wt,normalizeClass:jt,renderList:zt,Fragment:Xt,createVNode:Ut,normalizeStyle:Yt}=await ut("vue"),qt={class:"px-2 py-0"},Gt={key:0,class:"fm-typo-body-xl-700"},It={key:0,class:"content-start flex gap-0 px-2 py-0 self-stretch"},{computed:Jt,ref:$,watchEffect:Qt}=await ut("vue"),Zt=Wt({__name:"FmTooltip",props:{variant:{default:"plain"},beak:{default:"top"},hasArrow:{type:Boolean,default:!0},titleText:{default:"Title"},contentText:{},actionButtons:{}},setup(t){const e=t,n=$(null),o=$(null),i=$(null),l=async()=>{var w,x,v,b;const{x:c,y:f,placement:m,middlewareData:h}=await Mt(n.value,o.value,{placement:e.beak,middleware:[fe(10),ce(),de({padding:5}),e.hasArrow?Ae({element:i.value,padding:10}):null]});if(Object.assign(o.value.style,{left:`${c}px`,top:`${f}px`}),e.hasArrow){const T={top:"bottom",right:"left",bottom:"top",left:"right"}[m.split("-")[0]];Object.assign(i.value.style,{left:((w=h.arrow)==null?void 0:w.x)!=null?`${(x=h.arrow)==null?void 0:x.x}px`:"",top:((v=h.arrow)==null?void 0:v.y)!=null?`${(b=h.arrow)==null?void 0:b.y}px`:"",right:"",bottom:"",background:e.variant==="rich"?"#FFF":"#1C1C1E",[T]:"-4px"})}},r=$(!1),a=$(0),s=$(0),u=Jt(()=>({...{plain:{color:"#FFF",background:"#1C1C1E",boxShadow:"0 2px 4px rgba(0, 0, 0, 0)"},rich:{background:"#FFF",boxShadow:"0px 8px 16px 0px rgba(199, 199, 204, 0.24)"}}[e.variant],display:r.value?"block":"none"})),d=()=>{clearTimeout(s.value),a.value=window.setTimeout(()=>{r.value=!0},500)},p=()=>{clearTimeout(a.value),s.value=window.setTimeout(()=>r.value=!1,1500)},y=()=>{clearTimeout(s.value),r.value=!0};return Qt(()=>{r.value?(l(),window.addEventListener("resize",l)):window.removeEventListener("resize",l)}),(c,f)=>(U(),Y("div",null,[W("div",{ref_key:"tooltipContainer",ref:n,class:"cursor-pointer flex items-center justify-center relative w-max",onMouseenter:d,onMouseleave:p},[$t(c.$slots,"default")],544),W("div",{ref_key:"tooltip",ref:o,class:"absolute box-border break-words left-0 max-w-xs px-4 py-3 rounded-2xl top-0 w-max whitespace-normal z-50",style:Yt(u.value),onMouseenter:y,onMouseleave:p},[W("div",null,[W("div",qt,[c.variant=="rich"?(U(),Y("div",Gt,xt(c.titleText),1)):wt("",!0),W("div",{class:jt(c.variant=="plain"?"fm-typo-body-sm-400":"fm-typo-body-md-400")},xt(c.contentText),3)]),c.variant=="rich"?(U(),Y("div",It,[(U(!0),Y(Xt,null,zt(c.actionButtons,(m,h)=>(U(),Y("div",{key:h},[Ut(Pe,{variant:"tertiary",label:m.label,onClick:m.handler},null,8,["label","onClick"])]))),128))])):wt("",!0)]),W("div",{ref_key:"arrowEl",ref:i,class:"-rotate-45 absolute h-3 w-3"},null,512)],36)]))}})});export{Zt as _,Me as __tla,Kt as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{importShared as M,__tla as ee}from"./__federation_fn_import.js";import{d as D}from"./dayjs.min-5433e12a.js";import S,{__tla as te}from"./__federation_expose_FmIcon-e5ab92a8.js";import{_ as ae}from"./_plugin-vue_export-helper-c27b6911.js";let A,le=Promise.all([(()=>{try{return ee}catch{}})(),(()=>{try{return te}catch{}})()]).then(async()=>{const{defineComponent:O}=await M("vue"),{toDisplayString:i,normalizeClass:s,createElementVNode:l,createVNode:w,renderList:Y,Fragment:h,openBlock:u,createElementBlock:c,createCommentVNode:F,pushScopeId:I,popScopeId:L}=await M("vue"),N=v=>(I("data-v-fdf144e1"),v=v(),L(),v),P={class:"flex gap-1 items-center relative w-full"},j=N(()=>l("div",{class:"fm-typo-body-lg-400 h-6 mt-7 shrink-0 text-center text-fm-color-typo-primary w-6"}," to ",-1)),R={class:"w-full"},q={class:"flex h-10 justify-between p-2"},z={class:"fm-typo-body-lg-400"},U={class:"flex gap-1 items-center justify-center"},$={class:"fm-calendar__row fm-typo-body-lg-400 text-fm-color-typo-tertiary"},G=["onClick"],{ref:m,computed:H,onMounted:J,onUnmounted:K}=await M("vue"),Q=O({__name:"FmDateRangePicker",props:{modelValue:{},label:{default:""},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(v,{emit:g}){const n=v,y=m([]),e=m({startDate:null,endDate:null}),f=m(!1),p=m(D()),k=m(null),x=m(null),b=m(null),T=t=>{var a,o;if(e.value.startDate&&e.value.endDate){e.value={startDate:null,endDate:null},g("update:modelValue",{startDate:null,endDate:null});return}if(!e.value.startDate&&!e.value.endDate)e.value.startDate=t;else if(t.isBefore(e.value.startDate)){const r=e.value.startDate;e.value={startDate:t,endDate:r}}else e.value.endDate=t;g("update:modelValue",{startDate:(a=e.value.startDate)==null?void 0:a.format("YYYY-MM-DD"),endDate:(o=e.value.endDate)==null?void 0:o.format("YYYY-MM-DD")}),e.value.startDate&&e.value.endDate&&(f.value=!1)},C=()=>{y.value=[];const t=D(p.value).startOf("month"),a=t.endOf("month"),o=t.month();let r=t.startOf("week"),d=[];for(;r.isBefore(a.endOf("week"));)r.day()===0&&d.length>0&&(y.value.push(d),d=[]),d.push({date:r,isCurrentMonth:r.month()===o}),r=r.add(1,"day");d.length>0&&y.value.push(d)},V=()=>{n.disabled||(f.value=!f.value,requestAnimationFrame(()=>{var a;const t=(a=k.value)==null?void 0:a.getBoundingClientRect();b.value.style.top=`${t.height+4}px`,b.value.style.left="0px"}))},B=t=>{const a=t.path||t.composedPath();for(const o of a)if(o==k.value||o==x.value||o==b.value)return;f.value=!1},E=t=>{p.value=t?p.value.add(1,"month"):p.value.subtract(1,"month"),C()},W=H(()=>Array.from(Array(7),(t,a)=>D().day(a).format("ddd"))),X=t=>{var a,o,r,d;return{"fm-calendar__cell__button--selected":((a=e.value.startDate)==null?void 0:a.isSame(t))&&!e.value.endDate||((o=e.value.endDate)==null?void 0:o.isSame(t))&&!e.value.startDate,"fm-calendar__cell__button--selected-start":((r=e.value.startDate)==null?void 0:r.isSame(t))&&e.value.endDate,"fm-calendar__cell__button--selected-end":((d=e.value.endDate)==null?void 0:d.isSame(t))&&e.value.startDate,"fm-calendar__cell__button--selected-between":e.value.startDate&&e.value.endDate&&t.isAfter(e.value.startDate)&&t.isBefore(e.value.endDate)}};return J(()=>{var t;window.addEventListener("click",B),C(),(t=n.modelValue)!=null&&t.startDate&&n.modelValue.endDate&&(e.value={startDate:D(n.modelValue.startDate,"YYYY-MM-DD"),endDate:D(n.modelValue.endDate,"YYYY-MM-DD")})}),K(()=>{window.removeEventListener("click",B)}),(t,a)=>{var o,r;return u(),c("div",P,[l("label",{ref_key:"startButtonEl",ref:k,class:"w-full",onClick:V},[l("div",{class:s(["fm-typo-body-lg-400",[n.disabled?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"]])},i(n.label),3),l("div",{class:s(["fm-date-picker__container",{"fm-date-picker__container--opened":f.value,"fm-date-picker__container--disabled":n.disabled}])},[l("div",{class:s(["fm-typo-body-lg-400",[n.disabled?"text-fm-color-typo-disabled":e.value.startDate?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},i(((o=e.value.startDate)==null?void 0:o.format("D MMM YYYY"))??"DD MM YYYY"),3)],2)],512),j,l("label",{ref_key:"endButtonEl",ref:x,class:"w-full",onClick:V},[l("div",{class:s(["fm-typo-body-lg-400",[n.disabled?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"]])},i(n.label),3),l("div",{class:s(["fm-date-picker__container",{"fm-date-picker__container--opened":f.value,"fm-date-picker__container--disabled":n.disabled}])},[l("div",{class:s(["fm-typo-body-lg-400",[n.disabled?"text-fm-color-typo-disabled":e.value.endDate?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},i(((r=e.value.endDate)==null?void 0:r.format("D MMM YYYY"))??"DD MM YYYY"),3)],2)],512),l("div",{ref_key:"dropdownEl",ref:b,class:s(["absolute bg-fm-color-white fm-calendar gap-6 p-3 rounded-lg shadow-light-300 w-[360px]",[f.value?"block":"hidden"]])},[l("div",R,[l("div",q,[l("div",z,i(p.value.format("MMMM YYYY")),1),l("div",U,[w(S,{class:"cursor-pointer",name:"chevron_left",outline:!1,color:"#1C1C1E",onClick:a[0]||(a[0]=()=>E(!1))}),w(S,{class:"cursor-pointer",name:"chevron_right",outline:!1,color:"#1C1C1E",onClick:a[1]||(a[1]=()=>E(!0))})])]),l("div",null,[l("div",$,[(u(!0),c(h,null,Y(W.value,d=>(u(),c("div",{key:d,class:"fm-calendar__cell"},i(d),1))),128))]),l("div",null,[(u(!0),c(h,null,Y(y.value,(d,Z)=>(u(),c("div",{key:Z,class:"fm-calendar__row fm-typo-body-lg-400"},[(u(!0),c(h,null,Y(d,_=>(u(),c("div",{key:_.date.date(),class:"fm-calendar__cell"},[_.isCurrentMonth?(u(),c("button",{key:0,class:s(["fm-calendar__cell__button",X(_.date)]),onClick:()=>T(_.date)},i(_.date.date()),11,G)):F("",!0)]))),128))]))),128))])])])],2)])}}});A=ae(Q,[["__scopeId","data-v-fdf144e1"]])});export{le as __tla,A as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var R=Object.defineProperty;var z=(d,n,c)=>n in d?R(d,n,{enumerable:!0,configurable:!0,writable:!0,value:c}):d[n]=c;var f=(d,n,c)=>(z(d,typeof n!="symbol"?n+"":n,c),c);import{importShared as h,__tla as F}from"./__federation_fn_import.js";import{_ as H}from"./_plugin-vue_export-helper-c27b6911.js";let S,Y=Promise.all([(()=>{try{return F}catch{}})()]).then(async()=>{function d(t){for(;t;){if(n(t))return t;t=t.parentElement}return document.scrollingElement}function n(t){if(!t||t.nodeType!==Node.ELEMENT_NODE)return!1;const i=window.getComputedStyle(t);return i.overflowY==="scroll"||i.overflowY==="auto"&&t.scrollHeight>t.clientHeight}class c{constructor(i,s){f(this,"onScroll");f(this,"scrollParent");this.onScroll=s,this.scrollParent=d(i)}bindScroll(){this.scrollParent.addEventListener("scroll",this.onScroll)}unbindScroll(){this.scrollParent.removeEventListener("scroll",this.onScroll)}}const{defineComponent:b}=await h("vue"),{renderSlot:w,createElementVNode:_,normalizeClass:k,Teleport:x,openBlock:g,createBlock:B,createElementBlock:$,pushScopeId:q,popScopeId:A}=await h("vue"),C={class:"relative"},{onMounted:P,onUnmounted:L,ref:v,watch:N}=await h("vue"),I=b({__name:"FmMenu",props:{isOpen:{type:Boolean,default:!1},placement:{default:"bottom-left"},disabled:{type:Boolean,default:!1}},emits:["dropdown-changed"],setup(t,{expose:i,emit:s}){const a=t,e=v(!1),p=v(null),r=v(null);let m;i({show:()=>{e.value||(e.value=!0,s("dropdown-changed",e.value))},hide:()=>{e.value&&(e.value=!1,s("dropdown-changed",e.value))}});const M=()=>{a.disabled||(e.value=!e.value,O(),s("dropdown-changed",e.value))},O=()=>{requestAnimationFrame(()=>{var u,E;const l=(u=r.value)==null?void 0:u.getBoundingClientRect(),o=(E=p.value)==null?void 0:E.getBoundingClientRect();a.placement.includes("bottom")?r.value.style.top=`${o.bottom+4}px`:a.placement.includes("top")&&(r.value.style.top=`${o.top-l.height-4}px`),a.placement.includes("left")?r.value.style.left=`${o.left}px`:a.placement.includes("center")?r.value.style.left=`${o.left+o.width/2-l.width/2}px`:a.placement.includes("right")&&(r.value.style.left=`${o.right-l.width}px`)})},y=l=>{if(!e.value)return;const o=l.path||l.composedPath();for(const u of o)if(u==p.value||u==r.value)return;e.value=!1,s("dropdown-changed",e.value)},T=()=>{s("dropdown-changed",!1)};return N(()=>a.isOpen,l=>e.value=l),P(()=>{e.value=a.isOpen,window.addEventListener("click",y),m=new c(p.value,T),m.bindScroll()}),L(()=>{window.removeEventListener("click",y),m.unbindScroll()}),(l,o)=>(g(),$("div",C,[_("div",{ref_key:"buttonEl",ref:p,class:"fm-menu",onClick:M},[w(l.$slots,"menu-button",{},void 0,!0)],512),(g(),B(x,{to:"body"},[_("div",{ref_key:"dropdownEl",ref:r,class:k({"fm-menu__content":!0,"fm-menu__content--opened":e.value})},[w(l.$slots,"menu-content",{},void 0,!0)],2)]))]))}});S=H(I,[["__scopeId","data-v-1f528682"]])});export{Y as __tla,S as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{importShared as c,__tla as z}from"./__federation_fn_import.js";import E,{__tla as F}from"./__federation_expose_FmIcon-e5ab92a8.js";import $,{__tla as D}from"./__federation_expose_FmMenu-c78ae222.js";import R,{__tla as U}from"./__federation_expose_FmMenuItem-d331a359.js";import{_ as j}from"./_plugin-vue_export-helper-c27b6911.js";let h,q=Promise.all([(()=>{try{return z}catch{}})(),(()=>{try{return F}catch{}})(),(()=>{try{return D}catch{}})(),(()=>{try{return U}catch{}})()]).then(async()=>{const{defineComponent:V}=await c("vue"),{renderSlot:x,toDisplayString:p,normalizeClass:s,openBlock:m,createElementBlock:i,createCommentVNode:w,createElementVNode:o,createVNode:f,renderList:g,Fragment:C,createBlock:S,withCtx:_,pushScopeId:L,popScopeId:P}=await c("vue"),k={class:"w-[280px]"},{computed:b,ref:N,toRaw:u}=await c("vue"),B=V({__name:"FmSelect",props:{modelValue:{},label:{},items:{},disabled:{type:Boolean,default:!1},multiselect:{type:Boolean,default:!1},placement:{default:"bottom-left"},placeholder:{default:""}},emits:["update:modelValue"],setup(J,{emit:v}){const t=J,d=N(!1),O=(e,a)=>{if(t.multiselect){let l=[];e?l=[...u(t.modelValue),a.value]:(l=[...t.modelValue],l=l.filter(r=>JSON.stringify(u(r))!==JSON.stringify(a.value))),v("update:modelValue",l)}else d.value=!1,v("update:modelValue",a.value)},I=b(()=>{const e=y.value.map(a=>a.label).join(", ");return e===""?t.placeholder:e}),y=b(()=>t.multiselect?t.items.filter(e=>u(t.modelValue).some(a=>n(a,e.value))):t.items.filter(e=>n(t.modelValue,e.value))),n=(e,a)=>JSON.stringify(e)===JSON.stringify(a);return(e,a)=>(m(),i("div",null,[o("label",null,[x(e.$slots,"label",{},()=>[e.label?(m(),i("div",{key:0,class:s(["fm-typo-body-lg-400 mb-4",{"fm-typo-body-lg-400":!0,"text-fm-color-typo-primary":!e.disabled,"text-fm-color-typo-disabled":e.disabled}])},p(e.label),3)):w("",!0)],!0)]),f($,{disabled:e.disabled,"is-open":d.value,placement:e.placement,onDropdownChanged:a[0]||(a[0]=l=>d.value=l)},{"menu-button":_(()=>[o("label",{class:s([`${e.disabled?"cursor-not-allowed":"cursor-pointer"} fm-select`])},[o("div",{class:s({"fm-select__container":!0,"fm-select__container--expanded":d.value,"fm-select__container--disabled":e.disabled})},[o("div",{class:s({"fm-typo-body-lg-400 w-full h-full overflow-hidden text-ellipsis whitespace-nowrap":!0,"text-fm-color-typo-tertiary":!e.modelValue,"text-fm-color-typo-primary":!!e.modelValue})},p(I.value),3),f(E,{name:d.value?"expand_less":"expand_more",size:"md",color:e.disabled?"#C7C7CC":"black"},null,8,["name","color"])],2)],2)]),"menu-content":_(()=>[o("div",k,[(m(!0),i(C,null,g(e.items,l=>(m(),S(R,{key:l.value,"has-checkbox":e.multiselect,label:l.label,value:l.value,"model-value":y.value.some(r=>n(r.value,l.value)),"onUpdate:modelValue":r=>O(r,l)},null,8,["has-checkbox","label","value","model-value","onUpdate:modelValue"]))),128))])]),_:1},8,["disabled","is-open","placement"])]))}});h=j(B,[["__scopeId","data-v-7475b9fb"]])});export{q as __tla,h as default};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import{importShared as n,__tla as or}from"./__federation_fn_import.js";import{c as ir,a as nr,_ as rr,__tla as ur}from"./FmBreadcrumb.vue_vue_type_style_index_0_lang-4abc649e.js";import{_ as W,__tla as sr}from"./FmCard.vue_vue_type_style_index_0_lang-3de86b2b.js";import{_ as $,__tla as dr}from"./FmCardSection.vue_vue_type_script_setup_true_lang-b8e33ddd.js";import{_ as cr,__tla as mr}from"./FmCardTitle.vue_vue_type_script_setup_true_lang-4f3b50b7.js";import{_ as pr,__tla as vr}from"./FmLine.vue_vue_type_script_setup_true_lang-290ac533.js";import p,{__tla as fr}from"./__federation_expose_FmButton-a3ca7654.js";import{_ as it,__tla as br}from"./FmCardActions.vue_vue_type_script_setup_true_lang-315cfb3c.js";import nt,{__tla as gr}from"./__federation_expose_FmDatePicker-c542d446.js";import rt,{__tla as _r}from"./__federation_expose_FmDateRangePicker-6e0116bd.js";import{_ as Me,__tla as yr}from"./FmCheckbox.vue_vue_type_style_index_0_lang-fcb61ef1.js";import hr,{__tla as wr}from"./__federation_expose_FmField-41eeed18.js";import F,{__tla as Vr}from"./__federation_expose_FmRadio-eb498ffc.js";import{_ as rl,__tla as xr}from"./FmRadioGroup.vue_vue_type_script_setup_true_lang-99e6a9c2.js";import ul,{__tla as kr}from"./__federation_expose_FmSelect-dd3e5756.js";import sl,{__tla as Cr}from"./__federation_expose_FmStepperField-99c193ef.js";import k,{__tla as Br}from"./__federation_expose_FmSwitch-f75dd36e.js";import{_ as be,__tla as Fr}from"./FmTextField.vue_vue_type_style_index_0_lang-31424202.js";import{_ as Pe,__tla as Nr}from"./FmTextarea.vue_vue_type_style_index_0_lang-7507a1ba.js";import Z,{__tla as Sr}from"./__federation_expose_FmIcon-e5ab92a8.js";import Er,{__tla as Dr}from"./__federation_expose_FmList-6bab2481.js";import dl,{__tla as Ur}from"./__federation_expose_FmListItem-b4a2ef3a.js";import Tr,{__tla as zr}from"./__federation_expose_FmMenu-c78ae222.js";import Lr,{__tla as Ar}from"./__federation_expose_FmMenuItem-d331a359.js";import{u as Or,_ as G,__tla as Mr}from"./FmTooltip.vue_vue_type_script_setup_true_lang-ec99af74.js";import L,{__tla as Pr}from"./__federation_expose_FmSnackbar-7af29a69.js";import{_ as Rr,__tla as Wr}from"./FmTimePicker.vue_vue_type_style_index_0_lang-cd3ff46f.js";import{_ as $r,__tla as jr}from"./FmDialog.vue_vue_type_style_index_0_lang-2c81e20e.js";import ut,{__tla as Ir}from"./__federation_expose_FmSpacer-a0a89a0a.js";import{D as st}from"./provider-keys-22cc7f73.js";import{_ as Gr,__tla as qr}from"./FmForm.vue_vue_type_script_setup_true_lang-67f87de0.js";import{_ as ge,__tla as Hr}from"./FmButtonGroup.vue_vue_type_script_setup_true_lang-658ba5f6.js";import{_ as cl,__tla as Jr}from"./FmStepper.vue_vue_type_script_setup_true_lang-620c5c99.js";import P,{__tla as Qr}from"./__federation_expose_FmStep-804e2bea.js";import{_ as Kr}from"./_plugin-vue_export-helper-c27b6911.js";Promise.all([(()=>{try{return or}catch{}})(),(()=>{try{return ur}catch{}})(),(()=>{try{return sr}catch{}})(),(()=>{try{return dr}catch{}})(),(()=>{try{return mr}catch{}})(),(()=>{try{return vr}catch{}})(),(()=>{try{return fr}catch{}})(),(()=>{try{return br}catch{}})(),(()=>{try{return gr}catch{}})(),(()=>{try{return _r}catch{}})(),(()=>{try{return yr}catch{}})(),(()=>{try{return wr}catch{}})(),(()=>{try{return Vr}catch{}})(),(()=>{try{return xr}catch{}})(),(()=>{try{return kr}catch{}})(),(()=>{try{return Cr}catch{}})(),(()=>{try{return Br}catch{}})(),(()=>{try{return Fr}catch{}})(),(()=>{try{return Nr}catch{}})(),(()=>{try{return Sr}catch{}})(),(()=>{try{return Dr}catch{}})(),(()=>{try{return Ur}catch{}})(),(()=>{try{return zr}catch{}})(),(()=>{try{return Ar}catch{}})(),(()=>{try{return Mr}catch{}})(),(()=>{try{return Pr}catch{}})(),(()=>{try{return Wr}catch{}})(),(()=>{try{return jr}catch{}})(),(()=>{try{return Ir}catch{}})(),(()=>{try{return qr}catch{}})(),(()=>{try{return Hr}catch{}})(),(()=>{try{return Jr}catch{}})(),(()=>{try{return Qr}catch{}})()]).then(async()=>{(function(){const o=document.createElement("link").relList;if(o&&o.supports&&o.supports("modulepreload"))return;for(const t of document.querySelectorAll('link[rel="modulepreload"]'))a(t);new MutationObserver(t=>{for(const l of t)if(l.type==="childList")for(const i of l.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&a(i)}).observe(document,{childList:!0,subtree:!0});function e(t){const l={};return t.integrity&&(l.integrity=t.integrity),t.referrerPolicy&&(l.referrerPolicy=t.referrerPolicy),t.crossOrigin==="use-credentials"?l.credentials="include":t.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function a(t){if(t.ep)return;t.ep=!0;const l=e(t);fetch(t.href,l)}})();const dt=ir({history:nr(),routes:[]}),ml={directive:"wave",color:"currentColor",initialOpacity:.2,finalOpacity:.1,duration:.4,dissolveDuration:.15,easing:"ease-out",cancellationPeriod:75,trigger:"auto",tagName:"div"},ct=o=>"config"in o&&"globalProperties"in o.config,mt=o=>{let e;return o==="vue2"?e=!1:o==="vue3"?e=!0:e=ct(o),e?{mounted:"mounted",updated:"updated"}:{mounted:"inserted",updated:"componentUpdated"}},pl=o=>typeof o=="string"&&o!=="auto",vl=(o,e)=>{o.dataset.vWaveBoundary=pl(e)?e:"true"},pt=({borderTopLeftRadius:o,borderTopRightRadius:e,borderBottomLeftRadius:a,borderBottomRightRadius:t},l)=>{const i=document.createElement(l);return i.style.top="0",i.style.left="0",i.style.width="100%",i.style.height="100%",i.style.display="block",i.style.position="absolute",i.style.borderRadius=`${o} ${e} ${t} ${a}`,i.style.overflow="hidden",i.style.pointerEvents="none",i.style.webkitMaskImage="-webkit-radial-gradient(white, black)",i},vt=(o,e,a,t)=>{const l=document.createElement("div");return l.style.position="absolute",l.style.width=`${a}px`,l.style.height=`${a}px`,l.style.top=`${e}px`,l.style.left=`${o}px`,l.style.background=t.color,l.style.borderRadius="50%",l.style.opacity=`${t.initialOpacity}`,l.style.transform="translate(-50%,-50%) scale(0)",l.style.transition=`transform ${t.duration}s ${t.easing}, opacity ${t.duration}s ${t.easing}`,l};function _e(o,e,a,t){const l=o-a,i=e-t;return Math.sqrt(l*l+i*i)}function ft(o,e,{width:a,height:t}){const l=_e(o,e,0,0),i=_e(o,e,a,0),u=_e(o,e,0,t),s=_e(o,e,a,t);return Math.max(l,i,u,s)}const bt=({x:o,y:e},{top:a,left:t})=>({x:o-t,y:e-a}),Re="vWaveCountInternal";function gt(o){const e=We(o);fl(o,e+1)}function _t(o){const e=We(o);fl(o,e-1)}function fl(o,e){o.dataset[Re]=e.toString()}function We(o){var e;return parseInt((e=o.dataset[Re])!==null&&e!==void 0?e:"0",10)}function yt(o){delete o.dataset[Re]}const $e=(o,e,a)=>{const t=e.getBoundingClientRect(),l=window.getComputedStyle(e),{x:i,y:u}=bt(o,t),s=2.05*ft(i,u,t),r=pt(l,a.tagName),m=vt(i,u,s,a);gt(e);let f="";l.position==="static"&&(e.style.position&&(f=e.style.position),e.style.position="relative"),r.appendChild(m),e.appendChild(r);let b=!1;const V=il=>{typeof il<"u"&&(document.removeEventListener("pointerup",V),document.removeEventListener("pointercancel",V)),b?al():b=!0},al=()=>{m.style.transition=`opacity ${a.dissolveDuration}s linear`,m.style.opacity="0",setTimeout(()=>{r.remove(),_t(e),We(e)===0&&(yt(e),e.style.position=f)},a.dissolveDuration*1e3)};document.addEventListener("pointerup",V),document.addEventListener("pointercancel",V);const ol=setTimeout(()=>{document.removeEventListener("pointercancel",fe),requestAnimationFrame(()=>{m.style.transform="translate(-50%,-50%) scale(1)",m.style.opacity=`${a.finalOpacity}`,setTimeout(()=>V(),a.duration*1e3)})},a.cancellationPeriod),fe=()=>{clearTimeout(ol),r.remove(),document.removeEventListener("pointerup",V),document.removeEventListener("pointercancel",V),document.removeEventListener("pointercancel",fe)};document.addEventListener("pointercancel",fe)},X=new WeakMap,bl=(o={},e="vue3")=>{const a=Object.assign(Object.assign({},ml),o),t=mt(e),l=s=>{const r=s.currentTarget.dataset.vWaveTrigger;document.querySelectorAll(`[data-v-wave-boundary="${r}"]`).forEach(m=>$e(s,m,Object.assign(Object.assign({},a),X.get(m))))},i={[t.mounted](s,{value:r={}}){var m;X.set(s,r),vl(s,(m=r&&r.trigger)!==null&&m!==void 0?m:a.trigger),s.addEventListener("pointerdown",f=>{if(X.get(s)===!1)return;const b=Object.assign(Object.assign({},a),X.get(s));if(b.trigger===!1)return $e(f,s,b);if(pl(b.trigger))return;const V=s.querySelector('[data-v-wave-trigger="true"]');!V&&b.trigger===!0||V&&!f.composedPath().includes(V)||$e(f,s,b)})},[t.updated](s,{value:r={}}){var m;X.set(s,r),vl(s,(m=r&&r.trigger)!==null&&m!==void 0?m:a.trigger)}},u={[t.mounted](s,{arg:r="true"}){s.dataset.vWaveTrigger=r,r!=="true"&&s.addEventListener("pointerdown",l)},[t.updated](s,{arg:r="true"}){s.dataset.vWaveTrigger=r,r==="true"?s.removeEventListener("pointerdown",l):s.addEventListener("pointerdown",l)}};return{wave:i,vWave:i,waveTrigger:u,vWaveTrigger:u}},ht={install(o,e={}){if(this.installed)return;this.installed=!0;const a=Object.assign(Object.assign({},ml),e),{vWave:t,vWaveTrigger:l}=bl(a,o);o.directive(a.directive,t),o.directive(`${a.directive}-trigger`,l)},installed:!1,createLocalWaveDirective:bl},{defineComponent:wt}=await n("vue"),{toDisplayString:gl,createElementVNode:je,withCtx:Y,createVNode:_l,renderSlot:Vt,openBlock:xt,createBlock:kt}=await n("vue"),Ct={class:"fm-typo-title-sm-700 mb-4"},Bt={class:""},d=wt({__name:"DemoSection",props:{title:{type:String,required:!0},description:{type:String,default:void 0}},setup(o){return(e,a)=>(xt(),kt(W,{variant:"outlined",title:o.title},{header:Y(()=>[_l(cr,null,{actions:Y(()=>[]),default:Y(()=>[je("div",null,[je("div",Ct,gl(o.title),1),je("div",Bt,gl(o.description??o.title),1)])]),_:1})]),default:Y(()=>[_l($,null,{default:Y(()=>[Vt(e.$slots,"default")]),_:3})]),_:3},8,["title"]))}}),{defineComponent:Ft}=await n("vue"),{createVNode:yl,withCtx:Nt,openBlock:St,createElementBlock:Et}=await n("vue"),Dt=Ft({__name:"Breadcrumb",setup(o){const e=[{label:"Home",route:"/",disabled:!0},{label:"Marketing",route:"/marketing"},{label:"My campaign",route:"/marketing/campaign"},{label:"Create campaign",route:"/marketing/campaign/create"}];return(a,t)=>(St(),Et("div",null,[yl(d,{title:"Breadcrumb",description:"Basic usage"},{default:Nt(()=>[yl(rr,{items:e})]),_:1})]))}}),{defineComponent:Ut}=await n("vue"),{createVNode:hl,withCtx:Tt,openBlock:zt,createElementBlock:Lt}=await n("vue"),At=Ut({__name:"Line",setup(o){const e=[{label:"Dataset 1",data:[65,59,80,81,56,55,40,65,59,80,81,56],fill:!0,color:"fm-color-system-green-300"}];return(a,t)=>(zt(),Lt("div",null,[hl(d,{title:"Line chart",description:"Basic line chart usage"},{default:Tt(()=>[hl(pr,{name:"Total product sales",paragraph:"Included sales: Jun 2023 - Aug 2023","x-axis":{categories:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]},datasets:e})]),_:1})]))}}),{defineComponent:Ot}=await n("vue"),{createVNode:w,createElementVNode:ye,withCtx:he,openBlock:Mt,createElementBlock:Pt}=await n("vue"),Rt={class:"flex flex-col gap-24"},Wt={class:"gap-24 grid grid-cols-6"},$t={class:"gap-24 grid grid-cols-6"},jt={class:"flex gap-24"},It={class:"flex gap-24"},Gt=Ot({__name:"Button",setup(o){return(e,a)=>(Mt(),Pt("div",Rt,[w(d,{title:"Basic button",description:"Different button variant"},{default:he(()=>[ye("div",Wt,[w(p,{variant:"primary",label:"Primary"}),w(p,{variant:"secondary",label:"Secondary"}),w(p,{variant:"tertiary",label:"Tertiary"}),w(p,{variant:"destructive",label:"Destructive"}),w(p,{variant:"fab",label:"FAB"})])]),_:1}),w(d,{title:"Size",description:"Different button size"},{default:he(()=>[ye("div",$t,[w(p,{variant:"primary",label:"md",size:"md"}),w(p,{variant:"primary",label:"lg"})])]),_:1}),w(d,{title:"With icons",description:""},{default:he(()=>[ye("div",jt,[w(p,{variant:"primary",label:"button",size:"md",icon:"home"}),w(p,{variant:"secondary",label:"button",size:"md",icon:"home"}),w(p,{variant:"tertiary",label:"button",size:"md",icon:"home"}),w(p,{variant:"destructive",label:"button",size:"md",icon:"home"}),w(p,{variant:"fab",label:"button",size:"md",icon:"home"}),w(p,{variant:"fab",size:"md",icon:"home"})])]),_:1}),w(d,{title:"Disabled",description:""},{default:he(()=>[ye("div",It,[w(p,{variant:"primary",disabled:"",label:"button",size:"md"}),w(p,{variant:"secondary",disabled:"",label:"button",size:"md"}),w(p,{variant:"tertiary",disabled:"",label:"button",size:"md"}),w(p,{variant:"destructive",disabled:"",label:"button",size:"md"}),w(p,{variant:"fab",disabled:"",label:"button",size:"md"}),w(p,{variant:"fab",disabled:"",size:"md",icon:"home"})])]),_:1})]))}}),qt=`
|
|
2
|
-
Lorem ipsum dolor sit amet, consectetur adipiscing elit,
|
|
3
|
-
sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
|
|
4
|
-
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris
|
|
5
|
-
nisi ut aliquip ex ea commodo consequat.
|
|
6
|
-
`,Ht=`
|
|
7
|
-
Lorem ipsum dolor sit amet, consectetur adipiscing elit,
|
|
8
|
-
sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
|
|
9
|
-
`;function v(o=!1){return o?qt:Ht}const{defineComponent:Jt}=await n("vue"),{unref:J,toDisplayString:Q,createElementVNode:_,withCtx:h,createVNode:g,openBlock:Qt,createElementBlock:Kt}=await n("vue"),Zt={class:"flex flex-col gap-24"},Xt={class:"gap-24 grid grid-cols-3"},Yt={class:"gap-24 grid grid-cols-3"},ea=_("img",{src:"https://cdn.quasar.dev/img/mountains.jpg"},null,-1),la=_("div",{class:"mb-8"}," Title ",-1),ta=_("img",{src:"https://tailwindui.com/img/ecommerce-images/product-page-01-related-product-01.jpg"},null,-1),aa=_("div",{class:"flex"},[_("div",{class:"grow"},[_("div",{class:"mb-8"}," Basic Tee "),_("div",{class:"text-fm-color-typo-secondary"}," Aspen white ")]),_("div",{class:"fm-typo-body-lg-700"}," $35 ")],-1),oa={class:"gap-24 grid grid-cols-2"},ia=_("div",{class:"grow"},[_("img",{src:"https://cdn.quasar.dev/img/mountains.jpg",class:"h-full w-full",style:{"object-fit":"fill"}})],-1),na=_("div",{class:"grow"},[_("img",{src:"https://cdn.quasar.dev/img/mountains.jpg",class:"h-full w-full",style:{"object-fit":"fill"}})],-1),ra=_("div",{class:"basis-1/3"},[_("img",{src:"https://tailwindui.com/img/ecommerce-images/product-page-01-related-product-01.jpg",class:"h-full w-full",style:{"object-fit":"fill"}})],-1),ua=_("div",{class:"fm-typo-title-sm-700 mb-16"}," Basic Tee 6-pack ",-1),sa={class:"text-fm-color-typo-secondary"},da=_("div",null," Color ",-1),ca=_("div",null," Size ",-1),ma=Jt({__name:"Card",setup(o){return(e,a)=>(Qt(),Kt("div",Zt,[g(d,{title:"Card",description:"Card basic usage"},{default:h(()=>[_("div",Xt,[g(W,{class:"h-fit"},{default:h(()=>[g($,null,{default:h(()=>[_("div",null,Q(J(v)()),1)]),_:1})]),_:1}),g(W,{title:"Title"},{default:h(()=>[g($,null,{default:h(()=>[_("div",null,Q(J(v)()),1)]),_:1})]),_:1}),g(W,{title:"Title"},{actions:h(()=>[g(it,null,{default:h(()=>[g(p,{label:"Cancel",size:"md",variant:"secondary"}),g(p,{label:"Confirm",size:"md"})]),_:1})]),default:h(()=>[g($,null,{default:h(()=>[_("div",null,Q(J(v)()),1)]),_:1})]),_:1})])]),_:1}),g(d,{title:"Media card",description:"Cards with media content"},{default:h(()=>[_("div",Yt,[g(W,{class:"h-fit"},{default:h(()=>[ea,g($,null,{default:h(()=>[la,_("div",null,Q(J(v)()),1)]),_:1})]),_:1}),g(W,{class:"h-fit"},{actions:h(()=>[g(it,{alignment:"center"},{default:h(()=>[g(p,{label:"Add to cart",size:"md",class:"w-full"})]),_:1})]),default:h(()=>[ta,g($,null,{default:h(()=>[aa]),_:1})]),_:1})])]),_:1}),g(d,{title:"Horizontal card",description:"Cards with horizontal layout"},{default:h(()=>[_("div",oa,[g(W,{class:"h-fit",horizontal:""},{default:h(()=>[ia,g($,null,{default:h(()=>[_("div",null,Q(J(v)()),1)]),_:1})]),_:1}),g(W,{class:"h-fit",horizontal:""},{default:h(()=>[na,g($,{class:"flex flex-col gap-16 items-center justify-center",padding:"p-8"},{default:h(()=>[g(p,{icon:"home",variant:"tertiary"}),g(p,{icon:"add",variant:"tertiary"}),g(p,{icon:"warning",variant:"tertiary"})]),_:1})]),_:1})])]),_:1}),g(d,{title:"Advance",description:"Advance usage for card component"},{default:h(()=>[g(W,{horizontal:""},{default:h(()=>[ra,g($,{class:"basis-2/3 flex flex-col gap-24"},{default:h(()=>[_("div",null,[ua,_("div",sa,Q(J(v)(!0)),1)]),da,ca,g(p,{label:"Add to cart"})]),_:1})]),_:1})]),_:1})]))}}),{defineComponent:pa}=await n("vue"),{createVNode:Ie,createElementVNode:va,withCtx:fa,openBlock:ba,createElementBlock:ga}=await n("vue"),_a={class:"flex flex-col gap-24"},ya={class:"gap-24 grid grid-cols-3"},{ref:ha}=await n("vue"),wa=pa({__name:"DatePicker",setup(o){const e=ha("2023-10-26");return(a,t)=>(ba(),ga("div",_a,[Ie(d,{title:"Date picker",description:"Basic usage"},{default:fa(()=>[va("div",ya,[Ie(nt,{modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=l=>e.value=l),label:"Single date picker",disabled:!1},null,8,["modelValue"]),Ie(nt,{modelValue:e.value,"onUpdate:modelValue":t[1]||(t[1]=l=>e.value=l),label:"Disabled",disabled:!0},null,8,["modelValue"])])]),_:1})]))}}),{defineComponent:Va}=await n("vue"),{createVNode:Ge,createElementVNode:xa,withCtx:ka,openBlock:Ca,createElementBlock:Ba}=await n("vue"),Fa={class:"flex flex-col gap-24"},Na={class:"gap-24 grid grid-cols-3"},{ref:Sa}=await n("vue"),Ea=Va({__name:"DateRangePicker",setup(o){const e=Sa({startDate:"2023-10-01",endDate:"2023-10-31"});return(a,t)=>(Ca(),Ba("div",Fa,[Ge(d,{title:"Date picker",description:"Basic usage"},{default:ka(()=>[xa("div",Na,[Ge(rt,{modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=l=>e.value=l),label:"Date range picker",disabled:!1},null,8,["modelValue"]),Ge(rt,{modelValue:e.value,"onUpdate:modelValue":t[1]||(t[1]=l=>e.value=l),label:"Disabled",disabled:!0},null,8,["modelValue"])])]),_:1})]))}}),{defineComponent:Da}=await n("vue"),{unref:we,createVNode:ee,withCtx:Ua,openBlock:Ta,createElementBlock:za}=await n("vue"),La={class:"flex flex-col gap-24"},{ref:Aa}=await n("vue"),Oa=Da({__name:"Checkbox",setup(o){const e=Aa(!1);return(a,t)=>(Ta(),za("div",La,[ee(d,{title:"Radio",description:"Basic usage"},{default:Ua(()=>[ee(Me,{modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=l=>e.value=l),name:"v1",label:"Option 1",value:"1",sublabel:we(v)(),indeterminate:!1},null,8,["modelValue","sublabel"]),ee(Me,{modelValue:e.value,"onUpdate:modelValue":t[1]||(t[1]=l=>e.value=l),name:"v2",label:"Option 2",value:"2",sublabel:we(v)(),indeterminate:!1},null,8,["modelValue","sublabel"]),ee(Me,{modelValue:e.value,"onUpdate:modelValue":t[2]||(t[2]=l=>e.value=l),disabled:!0,name:"v3",label:"Option 3",value:"3",sublabel:we(v)(),indeterminate:!1},null,8,["modelValue","sublabel"]),ee(Me,{modelValue:e.value,"onUpdate:modelValue":t[3]||(t[3]=l=>e.value=l),name:"v4",label:"Option 4",value:"4",sublabel:we(v)(),indeterminate:!0},null,8,["modelValue","sublabel"])]),_:1})]))}}),{defineComponent:Ma}=await n("vue"),{createElementVNode:Pa,withCtx:wl,createVNode:Vl,openBlock:Ra,createElementBlock:Wa}=await n("vue"),$a={class:"flex flex-col gap-24"},ja=Pa("div",null," test ",-1),Ia=Ma({__name:"Field",setup(o){function e(){confirm("form field clicked")}return(a,t)=>(Ra(),Wa("div",$a,[Vl(d,{title:"Form field",description:"Wrapper to make your component part of form"},{default:wl(()=>[Vl(hr,{class:"text-fm-color-typo-warning",onClick:e},{default:wl(()=>[ja]),_:1})]),_:1})]))}}),{defineComponent:Ga}=await n("vue"),{unref:E,createVNode:B,withCtx:le,createElementVNode:xl,openBlock:qa,createElementBlock:Ha}=await n("vue"),Ja={class:"flex flex-col gap-24"},{ref:Qa}=await n("vue"),Ka=Ga({__name:"Radio",setup(o){const e=Qa("");return(a,t)=>(qa(),Ha("div",Ja,[B(d,{title:"Radio",description:"Radio Group"},{default:le(()=>[xl("div",null,[B(rl,{modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=l=>e.value=l)},{default:le(()=>[B(F,{value:"1",label:"Bluetooth",sublabel:E(v)()},null,8,["sublabel"]),B(F,{value:"2",label:"WiFi",sublabel:E(v)()},null,8,["sublabel"]),B(F,{value:"3",label:"NFC",sublabel:E(v)()},null,8,["sublabel"]),B(F,{value:"4",label:"Hotspot",sublabel:E(v)()},null,8,["sublabel"])]),_:1},8,["modelValue"])])]),_:1}),B(d,{title:"Radio",description:"Radio Group Inline"},{default:le(()=>[xl("div",null,[B(rl,{modelValue:e.value,"onUpdate:modelValue":t[1]||(t[1]=l=>e.value=l),inline:""},{default:le(()=>[B(F,{value:"1",label:"Bluetooth",sublabel:E(v)()},null,8,["sublabel"]),B(F,{value:"2",label:"WiFi",sublabel:E(v)()},null,8,["sublabel"]),B(F,{value:"3",label:"NFC",sublabel:E(v)()},null,8,["sublabel"]),B(F,{value:"4",label:"Hotspot",sublabel:E(v)()},null,8,["sublabel"])]),_:1},8,["modelValue"])])]),_:1}),B(d,{title:"Radio",description:"Radio"},{default:le(()=>[B(F,{modelValue:e.value,"onUpdate:modelValue":t[2]||(t[2]=l=>e.value=l),value:"1",label:"Bluetooth",sublabel:E(v)()},null,8,["modelValue","sublabel"]),B(F,{modelValue:e.value,"onUpdate:modelValue":t[3]||(t[3]=l=>e.value=l),value:"2",label:"WiFi",sublabel:E(v)()},null,8,["modelValue","sublabel"]),B(F,{modelValue:e.value,"onUpdate:modelValue":t[4]||(t[4]=l=>e.value=l),value:"3",label:"NFC",sublabel:E(v)()},null,8,["modelValue","sublabel"]),B(F,{modelValue:e.value,"onUpdate:modelValue":t[5]||(t[5]=l=>e.value=l),value:"4",label:"Hotspot",sublabel:E(v)()},null,8,["modelValue","sublabel"])]),_:1})]))}}),{defineComponent:Za}=await n("vue"),{createVNode:Ve,toDisplayString:kl,createElementVNode:Cl,withCtx:Bl,openBlock:Xa,createElementBlock:Ya}=await n("vue"),eo={class:"flex flex-col gap-24"},{ref:Fl}=await n("vue"),lo=Za({__name:"Select",setup(o){const e=Fl(3),a=Fl([3,"4"]);return(t,l)=>(Xa(),Ya("div",eo,[Ve(d,{title:"Select",description:"Single selection"},{default:Bl(()=>[Ve(ul,{modelValue:e.value,"onUpdate:modelValue":l[0]||(l[0]=i=>e.value=i),label:"Select",items:[{label:"Object",value:{first:"something"}},{label:"Array",value:["array","1"]},{label:"Number",value:3},{label:"String",value:"4"},{label:"1",value:"5"},{label:"2",value:"6"}]},null,8,["modelValue"]),Cl("div",null,kl(e.value),1)]),_:1}),Ve(d,{title:"Select",description:"Multiple selection"},{default:Bl(()=>[Ve(ul,{modelValue:a.value,"onUpdate:modelValue":l[1]||(l[1]=i=>a.value=i),label:"Select",items:[{label:"Object",value:{first:"something"}},{label:"Array",value:["array","1"]},{label:"Number",value:3},{label:"String",value:"4"},{label:"1",value:"5"},{label:"2",value:"6"}],multiselect:""},null,8,["modelValue"]),Cl("div",null,kl(a.value),1)]),_:1})]))}}),{defineComponent:to}=await n("vue"),{createVNode:qe,createElementVNode:He,toDisplayString:ao,createTextVNode:oo,withCtx:io,openBlock:no,createElementBlock:ro}=await n("vue"),uo=He("h1",{class:"mt-8"}," Without steppers ",-1),{ref:so}=await n("vue"),co=to({__name:"Stepper",setup(o){const e=so(null);return(a,t)=>(no(),ro("div",null,[qe(d,{title:"Text field",description:""},{default:io(()=>[He("div",null,[qe(sl,{modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=l=>e.value=l),label:"Number",placeholder:"Placeholder",step:30,min:0,max:999,"helper-text":"Helper",rules:[l=>l<=100||"More than 100",l=>l<=50||"More than 50"],"prepend-text":"RM","append-text":"%"},null,8,["modelValue","rules"])]),uo,He("div",null,[qe(sl,{modelValue:e.value,"onUpdate:modelValue":t[1]||(t[1]=l=>e.value=l),label:"Number",placeholder:"Placeholder",step:30,min:0,max:999,"helper-text":"Helper",rules:[l=>l<=100||"More than 100",l=>l<=50||"More than 50"],"show-steppers":!1},null,8,["modelValue","rules"])]),oo(" "+ao(e.value),1)]),_:1})]))}}),{defineComponent:mo}=await n("vue"),{createVNode:y,createElementVNode:xe,withCtx:te,unref:Nl,openBlock:po,createElementBlock:vo}=await n("vue"),fo={class:"flex flex-col gap-24"},bo={class:"flex gap-24"},go={class:"flex flex-col"},_o={class:"flex gap-24"},yo={class:"flex gap-24"},{ref:ho}=await n("vue"),wo=mo({__name:"Switch",setup(o){const e=ho({bluetooth:!1,wifi:!1,nfc:!0,hotspot:!0});return(a,t)=>(po(),vo("div",fo,[y(d,{title:"Switch",description:"Basic usage"},{default:te(()=>[xe("div",bo,[y(k,{modelValue:e.value.bluetooth,"onUpdate:modelValue":t[0]||(t[0]=l=>e.value.bluetooth=l),value:"bluetooth",label:"Bluetooth",disabled:"","show-icon":""},null,8,["modelValue"]),y(k,{modelValue:e.value.wifi,"onUpdate:modelValue":t[1]||(t[1]=l=>e.value.wifi=l),value:"wifi",label:"WiFi"},null,8,["modelValue"]),y(k,{modelValue:e.value.nfc,"onUpdate:modelValue":t[2]||(t[2]=l=>e.value.nfc=l),value:"nfc",label:"NFC"},null,8,["modelValue"]),y(k,{modelValue:e.value.hotspot,"onUpdate:modelValue":t[3]||(t[3]=l=>e.value.hotspot=l),value:"hotspot",label:"Hotspot"},null,8,["modelValue"])])]),_:1}),y(d,{title:"Switch",description:"Vertical"},{default:te(()=>[xe("div",go,[y(k,{modelValue:e.value.bluetooth,"onUpdate:modelValue":t[4]||(t[4]=l=>e.value.bluetooth=l),value:"bluetooth",label:"Bluetooth"},null,8,["modelValue"]),y(k,{modelValue:e.value.wifi,"onUpdate:modelValue":t[5]||(t[5]=l=>e.value.wifi=l),value:"wifi",label:"WiFi"},null,8,["modelValue"]),y(k,{modelValue:e.value.nfc,"onUpdate:modelValue":t[6]||(t[6]=l=>e.value.nfc=l),value:"nfc",label:"NFC"},null,8,["modelValue"]),y(k,{modelValue:e.value.hotspot,"onUpdate:modelValue":t[7]||(t[7]=l=>e.value.hotspot=l),value:"hotspot",label:"Hotspot"},null,8,["modelValue"])])]),_:1}),y(d,{title:"Label position",description:"Change label position"},{default:te(()=>[y(k,{modelValue:e.value.bluetooth,"onUpdate:modelValue":t[8]||(t[8]=l=>e.value.bluetooth=l),value:"bluetooth",label:"Bluetooth","label-placement":"right"},null,8,["modelValue"]),y(k,{modelValue:e.value.wifi,"onUpdate:modelValue":t[9]||(t[9]=l=>e.value.wifi=l),value:"wifi",label:"WiFi","label-placement":"right",sublabel:Nl(v)(!0)},null,8,["modelValue","sublabel"]),y(k,{modelValue:e.value.nfc,"onUpdate:modelValue":t[10]||(t[10]=l=>e.value.nfc=l),value:"nfc",label:"NFC","label-placement":"right"},null,8,["modelValue"]),y(k,{modelValue:e.value.hotspot,"onUpdate:modelValue":t[11]||(t[11]=l=>e.value.hotspot=l),value:"hotspot",label:"Hotspot","label-placement":"right",sublabel:Nl(v)(!0)},null,8,["modelValue","sublabel"])]),_:1}),y(d,{title:"Disabled switch"},{default:te(()=>[xe("div",_o,[y(k,{modelValue:e.value.bluetooth,"onUpdate:modelValue":t[12]||(t[12]=l=>e.value.bluetooth=l),value:"bluetooth",label:"Bluetooth",disabled:""},null,8,["modelValue"]),y(k,{modelValue:e.value.wifi,"onUpdate:modelValue":t[13]||(t[13]=l=>e.value.wifi=l),value:"wifi",label:"WiFi",disabled:""},null,8,["modelValue"]),y(k,{modelValue:e.value.nfc,"onUpdate:modelValue":t[14]||(t[14]=l=>e.value.nfc=l),value:"nfc",label:"NFC",disabled:""},null,8,["modelValue"]),y(k,{modelValue:e.value.hotspot,"onUpdate:modelValue":t[15]||(t[15]=l=>e.value.hotspot=l),value:"hotspot",label:"Hotspot",disabled:""},null,8,["modelValue"])])]),_:1}),y(d,{title:"Icon switch",description:"Switch with icon"},{default:te(()=>[xe("div",yo,[y(k,{modelValue:e.value.bluetooth,"onUpdate:modelValue":t[16]||(t[16]=l=>e.value.bluetooth=l),value:"bluetooth",label:"Bluetooth",disabled:"","show-icon":""},null,8,["modelValue"]),y(k,{modelValue:e.value.wifi,"onUpdate:modelValue":t[17]||(t[17]=l=>e.value.wifi=l),value:"wifi",label:"WiFi","show-icon":""},null,8,["modelValue"]),y(k,{modelValue:e.value.nfc,"onUpdate:modelValue":t[18]||(t[18]=l=>e.value.nfc=l),value:"nfc",label:"NFC",disabled:"","show-icon":""},null,8,["modelValue"]),y(k,{modelValue:e.value.hotspot,"onUpdate:modelValue":t[19]||(t[19]=l=>e.value.hotspot=l),value:"hotspot",label:"Hotspot","show-icon":""},null,8,["modelValue"])])]),_:1})]))}}),{defineComponent:Vo}=await n("vue"),{createVNode:ae,createElementVNode:Sl,withCtx:El,openBlock:xo,createElementBlock:ko}=await n("vue"),{ref:Dl}=await n("vue"),Co=Vo({__name:"TextField",setup(o){const e=Dl(""),a=Dl("");return(t,l)=>(xo(),ko("div",null,[ae(d,{title:"Text field",description:""},{default:El(()=>[Sl("div",null,[ae(be,{modelValue:e.value,"onUpdate:modelValue":l[0]||(l[0]=i=>e.value=i),label:"something",disabled:!1,"input-state":"success","helper-text":"something",rules:[i=>!!i.includes("t")||"nothing"]},null,8,["modelValue","rules"]),ae(be,{modelValue:e.value,"onUpdate:modelValue":l[1]||(l[1]=i=>e.value=i),label:"something",disabled:!1,"input-state":"warning"},null,8,["modelValue"])])]),_:1}),ae(d,{title:"Text area",description:""},{default:El(()=>[Sl("div",null,[ae(Pe,{modelValue:a.value,"onUpdate:modelValue":l[2]||(l[2]=i=>a.value=i),label:"textarea",disabled:!1,"input-state":"error",rules:[i=>!!i.includes("t")||"nothing"]},null,8,["modelValue","rules"])])]),_:1})]))}}),{defineComponent:Bo}=await n("vue"),{createVNode:oe,createElementVNode:Fo,withCtx:No,openBlock:So,createElementBlock:Eo}=await n("vue"),Do={class:"flex flex-col gap-24"},Uo={class:"gap-24 grid grid-cols-12"},To=Bo({__name:"Icon",setup(o){return(e,a)=>(So(),Eo("div",Do,[oe(d,{title:"Icon",description:"Basic icon styling"},{default:No(()=>[Fo("div",Uo,[oe(Z,{name:"visibility",outline:!0,size:"sm",color:"primary"}),oe(Z,{name:"visibility",outline:!1,color:"system-success-300"}),oe(Z,{name:"visibility",outline:!0,size:"lg",color:"#F12345"}),oe(Z,{name:"visibility",outline:!1,color:"#F12345",size:"xl"})])]),_:1})]))}}),{defineComponent:zo}=await n("vue"),{createVNode:K,createElementVNode:C,withCtx:ie,openBlock:Lo,createElementBlock:Ao}=await n("vue"),Oo={class:"flex flex-col gap-24"},Mo={class:"flex gap-24"},Po=C("div",{class:"grow"},[C("div",null,"Leslie Alexander"),C("div",{class:"fm-typo-body-sm-400 text-fm-color-typo-secondary"}," leslie.alexander@example.com ")],-1),Ro=C("div",{class:"flex flex-col items-end"},[C("div",null," Co-Founder / CEO "),C("div",{class:"fm-typo-body-sm-400 text-fm-color-typo-secondary"}," Last seen 3h ago ")],-1),Wo=C("div",{class:"grow"},[C("div",null,"Michael Foster"),C("div",{class:"fm-typo-body-sm-400 text-fm-color-typo-secondary"}," michael.foster@example.com ")],-1),$o=C("div",{class:"flex flex-col items-end"},[C("div",null," Co-Founder / CEO "),C("div",{class:"fm-typo-body-sm-400 text-fm-color-typo-secondary"}," Last seen 3h ago ")],-1),jo=C("div",{class:"grow"},[C("div",null,"Dries Vincent"),C("div",{class:"fm-typo-body-sm-400 text-fm-color-typo-secondary"}," dries.vincent@example.com ")],-1),Io=C("div",{class:"flex flex-col items-end"},[C("div",null," Co-Founder / CEO "),C("div",{class:"fm-typo-body-sm-400 text-fm-color-typo-secondary"}," Last seen 3h ago ")],-1),Go=zo({__name:"List",setup(o){return(e,a)=>(Lo(),Ao("div",Oo,[K(d,{title:"Switch",description:"Basic usage"},{default:ie(()=>[C("div",Mo,[K(Er,{class:"w-full",disabled:""},{default:ie(()=>[K(dl,{tag:"a"},{default:ie(()=>[K(Z,{name:"hexagon"}),Po,Ro]),_:1}),K(dl,{tag:"label"},{default:ie(()=>[Wo,$o]),_:1}),K(dl,{tag:"label"},{default:ie(()=>[jo,Io]),_:1})]),_:1})])]),_:1})]))}}),{defineComponent:qo}=await n("vue"),{createElementVNode:Ul,unref:Ho,normalizeStyle:Jo,Fragment:Qo,openBlock:Ko,createElementBlock:Zo}=await n("vue"),{ref:Tl}=await n("vue"),zl=qo({__name:"FmMenuList",setup(o){const e=Tl(null),a=Tl(null),{floatingStyles:t}=Or(e,a),l=()=>{a.value.style.display="block"},i=()=>{a.value.style.display=""};return(u,s)=>(Ko(),Zo(Qo,null,[Ul("button",{ref_key:"anchor",ref:e,onMouseenter:l,onMouseout:i}," Button ",544),Ul("div",{ref_key:"menu",ref:a,class:"bg-cyan-50 h-48 hidden w-48",style:Jo(Ho(t))}," Tooltip ",4)],64))}}),{defineComponent:Xo}=await n("vue"),{createElementVNode:U,toDisplayString:Ll,createVNode:ne,renderList:Yo,Fragment:ei,openBlock:Je,createElementBlock:Al,createBlock:li,withCtx:ke}=await n("vue"),ti={class:"flex flex-col gap-24"},ai=U("div",{class:"bg-fm-color-system-warning-100 p-16"},[U("h1",null," Notes "),U("ul",null,[U("li",null,"\u2022 The dropdown will close whenever it detects scrolling"),U("li",null,"\u2022 Multi select must use checkbox per design guidelines")])],-1),oi={class:"bg-fm-color-neutral-gray-100 mb-16 min-h-[40px] p-8 whitespace-pre"},ii={class:"w-[280px]"},{ref:Ce}=await n("vue"),ni=Xo({__name:"Menu",setup(o){const e=Ce([{label:"Grid",icon:"grid_view",selected:!1},{label:"List",icon:"view_list",selected:!1},{label:"Thumbnails",icon:"gallery_thumbnail",selected:!1}]),a=Ce(!1),t=Ce(!1),l=Ce(),i=u=>{l.value=u,e.value.forEach(s=>{s.selected=JSON.stringify(s)===JSON.stringify(u)}),t.value=!1};return(u,s)=>(Je(),Al("div",ti,[ne(d,{title:"Menu",description:"Basic usage WIP: Menu item clicking logic needs some work still, sorry for the wait"},{default:ke(()=>[ai,U("div",oi,[U("div",null,[U("code",null,Ll(JSON.stringify(e.value,null,4)),1)]),U("div",null,[U("code",null,Ll(JSON.stringify(l.value,null,4)),1)])]),ne(Tr,{disabled:a.value,"is-open":t.value,onDropdownChanged:s[0]||(s[0]=r=>t.value=r)},{"menu-button":ke(()=>[ne(p,{label:"Open Menu"})]),"menu-content":ke(()=>[U("div",ii,[(Je(!0),Al(ei,null,Yo(e.value,(r,m)=>(Je(),li(Lr,{key:m,modelValue:r.selected,"onUpdate:modelValue":f=>r.selected=f,label:r.label,icon:r.icon,onClick:f=>i(r)},null,8,["modelValue","onUpdate:modelValue","label","icon","onClick"]))),128))])]),_:1},8,["disabled","is-open"])]),_:1}),ne(d,{title:"Floating Menu",description:"Floating UI Menu"},{default:ke(()=>[ne(zl)]),_:1})]))}}),{defineComponent:ri}=await n("vue"),{unref:T,createVNode:N,createElementVNode:Qe,withCtx:Ke,openBlock:ui,createElementBlock:si}=await n("vue"),di={class:"flex flex-col gap-24"},ci={class:"gap-24 grid grid-cols-3"},mi={class:"gap-24 grid grid-cols-3"},pi={class:"gap-24 grid grid-cols-3"},Ol=ri({__name:"Snackbar",setup(o){function e(t){confirm(`Snackbar action pressed!
|
|
10
|
-
${t}.`)}function a(t){confirm(`Snackbar dismissed!
|
|
11
|
-
${t}.`)}return(t,l)=>(ui(),si("div",di,[N(d,{title:"Snackbar",description:"Basic usage"},{default:Ke(()=>[Qe("div",ci,[N(L,{title:"Info",description:T(v)(),variant:"info"},null,8,["description"]),N(L,{title:"success",description:T(v)(),variant:"success"},null,8,["description"]),N(L,{title:"warning",description:T(v)(),variant:"warning"},null,8,["description"]),N(L,{title:"error",description:T(v)(),variant:"error"},null,8,["description"]),N(L,{title:"neutral ",description:T(v)(),variant:"neutral"},null,8,["description"])])]),_:1}),N(d,{title:"Advance snackbar",description:"Snackbar with action"},{default:Ke(()=>[Qe("div",mi,[N(L,{title:"Info",description:T(v)(),dismissable:"",variant:"info",action:"press me",onOnAction:l[0]||(l[0]=()=>e("info")),onOnDismiss:l[1]||(l[1]=()=>a("info"))},null,8,["description"]),N(L,{title:"success",description:T(v)(),dismissable:"",variant:"success",action:"press me",onOnAction:l[2]||(l[2]=()=>e("success")),onOnDismiss:l[3]||(l[3]=()=>a("success"))},null,8,["description"]),N(L,{title:"warning",description:T(v)(),dismissable:"",variant:"warning",action:"press me",onOnAction:l[4]||(l[4]=()=>e("warning")),onOnDismiss:l[5]||(l[5]=()=>a("warning"))},null,8,["description"]),N(L,{title:"error",description:T(v)(),dismissable:"",variant:"error",action:"press me",onOnAction:l[6]||(l[6]=()=>e("error")),onOnDismiss:l[7]||(l[7]=()=>a("error"))},null,8,["description"]),N(L,{title:"neutral",description:T(v)(),dismissable:"",variant:"neutral",action:"press me",onOnAction:l[8]||(l[8]=()=>e("neutral")),onOnDismiss:l[9]||(l[9]=()=>a("neutral"))},null,8,["description"])])]),_:1}),N(d,{title:"Custom snackbar",description:"Snackbar with custom color"},{default:Ke(()=>[Qe("div",pi,[N(L,{title:"Custom snackbar",color:"secondary-blue-pea","bg-color":"secondary-citrus",description:T(v)()},null,8,["description"])])]),_:1})]))}}),{defineComponent:vi}=await n("vue"),{createVNode:fi,toDisplayString:bi,createElementVNode:Ze,withCtx:gi,openBlock:_i,createBlock:yi}=await n("vue"),hi={style:{width:"fit-content"}},wi={class:"flex flex-col gap-16 items-center justify-center"},Vi={class:"fm-typo-body-xl-700"},{ref:xi}=await n("vue"),ki=vi({__name:"TimePicker",setup(o){const e=xi(null);return(a,t)=>(_i(),yi(d,{title:"Time picker"},{default:gi(()=>[Ze("div",hi,[Ze("div",wi,[fi(Rr,{modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=l=>e.value=l)},null,8,["modelValue"]),Ze("div",Vi,bi(e.value),1)])])]),_:1}))}}),{defineComponent:Ci}=await n("vue"),{createTextVNode:j,withCtx:A,createVNode:O,createElementVNode:Ml,openBlock:Bi,createElementBlock:Fi}=await n("vue"),Ni={class:"flex flex-col gap-24"},Si={class:"gap-24 grid grid-cols-4"},Ei={class:"gap-24 grid grid-cols-4"},Di=Ci({__name:"Tooltip",setup(o){return(e,a)=>(Bi(),Fi("div",Ni,[O(d,{title:"Tooltip",description:"Basic usage"},{default:A(()=>[Ml("div",Si,[O(G,{"has-arrow":!0,variant:"plain",beak:"top","content-text":"Top tooltip","action-buttons":[{label:"Action",handler:()=>console.log("Button clicked!")}]},{default:A(()=>[j(" Top tooltip ")]),_:1},8,["action-buttons"]),O(G,{"has-arrow":!0,variant:"plain",beak:"right","content-text":"Right tooltip","action-buttons":[{label:"Action",handler:()=>console.log("Button clicked!")}]},{default:A(()=>[j(" Right tooltip ")]),_:1},8,["action-buttons"]),O(G,{"has-arrow":!0,variant:"plain",beak:"bottom","content-text":"Bottom tooltip","action-buttons":[{label:"Action",handler:()=>console.log("Button clicked!")}]},{default:A(()=>[j(" Bottom tooltip ")]),_:1},8,["action-buttons"]),O(G,{"has-arrow":!0,variant:"plain",beak:"left","content-text":"Left tooltip","action-buttons":[{label:"Action",handler:()=>console.log("Button clicked!")}]},{default:A(()=>[j(" Left tooltip ")]),_:1},8,["action-buttons"])])]),_:1}),O(d,{title:"Tooltip",description:"Tooltip with actions"},{default:A(()=>[Ml("div",Ei,[O(G,{"has-arrow":!0,variant:"rich",beak:"top","content-text":"Top tooltip","action-buttons":[{label:"Action",handler:()=>console.log("Button clicked!")}]},{default:A(()=>[j(" Top tooltip ")]),_:1},8,["action-buttons"]),O(G,{"has-arrow":!0,variant:"rich",beak:"right","content-text":"Right tooltip","action-buttons":[{label:"Action",handler:()=>console.log("Button clicked!")}]},{default:A(()=>[j(" Right tooltip ")]),_:1},8,["action-buttons"]),O(G,{"has-arrow":!0,variant:"rich",beak:"bottom","content-text":"Bottom tooltip","action-buttons":[{label:"Action",handler:()=>console.log("Button clicked!")}]},{default:A(()=>[j(" Bottom tooltip ")]),_:1},8,["action-buttons"]),O(G,{"has-arrow":!0,variant:"rich",beak:"left","content-text":"Left tooltip","action-buttons":[{label:"Action",handler:()=>console.log("Button clicked!")}]},{default:A(()=>[j(" Left tooltip ")]),_:1},8,["action-buttons"])])]),_:1})]))}}),{inject:Ui}=await n("vue");function Ti(){const o=Ui(st);if(!o)throw new Error("No provider");return o}const{defineComponent:zi}=await n("vue"),{createVNode:z,createElementVNode:Be,withCtx:re,openBlock:Li,createElementBlock:Ai}=await n("vue"),Oi={class:"flex flex-col gap-24"},Mi=Be("div",null,"Header",-1),Pi={class:"bg-fm-color-opacity-md overflow-auto w-[500px]"},Ri=Be("div",{class:"h-[300px] w-min"}," this is spacer ",-1),Wi=Be("div",{class:"h-[300px] w-min"}," this is spacer ",-1),{ref:Pl}=await n("vue"),$i=zi({__name:"Dialog",setup(o){const e=Pl(!1),a=Pl(""),t=Ti(),l=()=>{t.open({title:"something",message:"something",primaryActions:{text:"Primary"},secondaryActions:{text:"Secondary"},tertiaryActions:{text:"Tertiary"},contentComponent:Ol}).onPrimary(()=>{console.log("primary log")}).onSecondary(()=>{console.log("secondary log")}).onTertiary(()=>{console.log("tertiary log")})};return(i,u)=>(Li(),Ai("div",Oi,[z(d,{title:"Icon",description:"Basic icon styling"},{default:re(()=>[z(p,{label:"Open",onClick:u[0]||(u[0]=s=>e.value=!0)}),z($r,{modelValue:e.value,"onUpdate:modelValue":u[3]||(u[3]=s=>e.value=s),overlay:!0},{"dialog-header":re(()=>[Mi]),"dialog-content":re(()=>[Be("div",Pi,[Ri,z(ul,{modelValue:a.value,"onUpdate:modelValue":u[1]||(u[1]=s=>a.value=s),label:"Select",items:[{label:"Object",value:{first:"something"}},{label:"Array",value:["array","1"]},{label:"Number",value:3},{label:"String",value:"4"},{label:"1",value:"4"},{label:"2",value:"5"}]},null,8,["modelValue"]),z(zl),Wi])]),"dialog-footer":re(()=>[z(p,{class:"sm:w-full xs:w-full",variant:"tertiary",label:"Label",size:"md"}),z(ut,{class:"sm:hidden xs:hidden"}),z(p,{class:"sm:w-full xs:w-full",variant:"secondary",label:"Label",size:"md"}),z(p,{class:"sm:w-full xs:w-full",variant:"primary",label:"Close",size:"md",onClick:u[2]||(u[2]=s=>e.value=!1)})]),_:1},8,["modelValue"])]),_:1}),z(d,{title:"Dialog Plugin"},{default:re(()=>[z(p,{variant:"primary",label:"Open Dialog Plugin",size:"lg",onClick:l})]),_:1})]))}}),{defineComponent:ji}=await n("vue"),{toDisplayString:Ii,createElementVNode:Fe,createTextVNode:Gi,createVNode:S,withCtx:Xe,openBlock:qi,createElementBlock:Hi}=await n("vue"),Ji={class:"bg-fm-color-neutral-gray-100 min-h-[40px] p-8 whitespace-pre"},Qi={class:"flex gap-8 items-center"},{ref:Rl}=await n("vue"),Ki=ji({__name:"Form",setup(o){const e=Rl({textField:"",radioGroup:null,stepper:null,textarea:""}),a=Rl(),t=()=>{var l;(l=a.value)==null||l.resetInputsValidation()};return(l,i)=>(qi(),Hi("div",null,[S(d,{title:"Form",description:"Basic usage"},{default:Xe(()=>[Fe("div",null,[Gi(" Value: "),Fe("div",Ji,[Fe("code",null,Ii(JSON.stringify(e.value,null,4)),1)])]),S(Gr,{ref_key:"form",ref:a,class:"flex flex-col gap-16"},{default:Xe(()=>[S(be,{modelValue:e.value.textField,"onUpdate:modelValue":i[0]||(i[0]=u=>e.value.textField=u),label:"Text Field",rules:[u=>!!u.includes("t")||"Must have a 't'"]},null,8,["modelValue","rules"]),S(rl,{modelValue:e.value.radioGroup,"onUpdate:modelValue":i[1]||(i[1]=u=>e.value.radioGroup=u),disabled:!1},{default:Xe(()=>[S(F,{value:"bluetooth",label:"Bluetooth"}),S(F,{value:"wifi",label:"WiFi"}),S(F,{value:"nfc",label:"NFC"}),S(F,{value:"hotspot",label:"Hotspot"})]),_:1},8,["modelValue"]),S(sl,{modelValue:e.value.stepper,"onUpdate:modelValue":i[2]||(i[2]=u=>e.value.stepper=u),label:"Number",placeholder:"Placeholder",step:30,min:0,max:999,"helper-text":"Helper",rules:[u=>u<=100||"More than 100",u=>u<=50||"More than 50",u=>!!u||"This field is required"],"prepend-text":"RM","append-text":"%"},null,8,["modelValue","rules"]),S(Pe,{modelValue:e.value.textarea,"onUpdate:modelValue":i[3]||(i[3]=u=>e.value.textarea=u),label:"Textarea",rules:[u=>!!u.includes("t")||"Must have a 't'"]},null,8,["modelValue","rules"]),Fe("div",Qi,[S(p,{type:"submit",label:"Submit"}),S(p,{type:"reset",label:"Reset"}),S(p,{label:"Reset Validation",onClick:t})])]),_:1},512)]),_:1})]))}}),{defineComponent:Zi}=await n("vue"),{createVNode:M,withCtx:ue,openBlock:Xi,createElementBlock:Yi}=await n("vue"),en={class:"flex flex-col gap-24"},{ref:se}=await n("vue"),ln=Zi({__name:"ButtonGroup",setup(o){const e=[{label:"Grid"},{label:"List"},{label:"Thumbnails"}],a=[{icon:"grid_view"},{icon:"view_list"},{icon:"gallery_thumbnail"}],t=[{label:"Grid",icon:"grid_view"},{label:"List",icon:"view_list"},{label:"Thumbnails",icon:"gallery_thumbnail"}],l=[{label:"Grid",icon:"grid_view"},{label:"List (Disabled)",icon:"view_list",disabled:!0},{label:"Thumbnails",icon:"gallery_thumbnail"}],i=se(e[0]),u=se(a[0]),s=se(t[0]),r=se(null),m=se(null);return(f,b)=>(Xi(),Yi("div",en,[M(d,{title:"Button Group (Label)",description:"Label only"},{default:ue(()=>[M(ge,{modelValue:i.value,"onUpdate:modelValue":b[0]||(b[0]=V=>i.value=V),items:e},null,8,["modelValue"])]),_:1}),M(d,{title:"Button Group (Icon)",description:"Icon only"},{default:ue(()=>[M(ge,{modelValue:u.value,"onUpdate:modelValue":b[1]||(b[1]=V=>u.value=V),items:a},null,8,["modelValue"])]),_:1}),M(d,{title:"Button Group (Both)",description:"Both"},{default:ue(()=>[M(ge,{modelValue:s.value,"onUpdate:modelValue":b[2]||(b[2]=V=>s.value=V),items:t},null,8,["modelValue"])]),_:1}),M(d,{title:"Button Group (Disabled)",description:"Disabled state for the whole group"},{default:ue(()=>[M(ge,{modelValue:r.value,"onUpdate:modelValue":b[3]||(b[3]=V=>r.value=V),items:t,disabled:""},null,8,["modelValue"])]),_:1}),M(d,{title:"Button Group (Individually Disabled)",description:"Disabled state for the an individual button"},{default:ue(()=>[M(ge,{modelValue:m.value,"onUpdate:modelValue":b[4]||(b[4]=V=>m.value=V),items:l},null,8,["modelValue"])]),_:1})]))}}),{createVNode:x,unref:Wl,withCtx:I,createElementVNode:Ye,openBlock:de,createElementBlock:Ne,createCommentVNode:$l,withModifiers:jl,createBlock:tn}=await n("vue"),an={class:"flex flex-col gap-24 w-full"},on={key:0,class:"flex flex-col w-full"},nn=Ye("div",{class:"fm-typo-title-sm-700 mb-8"}," Campaign Detail ",-1),rn={key:1,class:"flex flex-col w-full"},un=Ye("div",{class:"fm-typo-title-sm-700 mb-8"}," Campaign Trigger ",-1),sn={key:2,class:"flex flex-col w-full"},dn=Ye("div",{class:"fm-typo-title-sm-700 mb-8"}," Campaign Configuration ",-1),{ref:Il}=await n("vue"),cn={__name:"Stepper",setup(o){const e=Il(""),a=Il(1),t=()=>a.value>1,l=()=>!0,i=()=>a.value>2,u=()=>a.value>3,s=()=>{a.value<4&&(a.value+=1)},r=()=>{a.value>0&&(a.value-=1)};return(m,f)=>(de(),Ne("div",an,[x(d,{title:"Horizontal Stepper",description:"With horizontal orientation"},{default:I(()=>[x(cl,{modelValue:a.value,"onUpdate:modelValue":f[0]||(f[0]=b=>a.value=b),orientation:"horizontal"},{default:I(()=>[x(P,{title:"General information",description:"Supporting text",value:1,disabled:()=>a.value>2,complete:()=>!1,onClick:()=>{}},null,8,["disabled"]),x(P,{title:"Event trigger",description:"asd",value:2,complete:()=>a.value>2},null,8,["complete"]),x(P,{title:"Configuration",description:Wl(v)(!0),value:3,error:()=>!0,complete:()=>a.value>3},null,8,["description","complete"]),x(P,{title:"Confirmation",value:4,disabled:()=>!0,complete:()=>a.value>4},null,8,["complete"])]),_:1},8,["modelValue"])]),_:1}),x(d,{title:"Vertical Stepper",description:"With vertical orientation"},{default:I(()=>[x(cl,{modelValue:a.value,"onUpdate:modelValue":f[1]||(f[1]=b=>a.value=b),orientation:"vertical"},{default:I(()=>[x(P,{title:"General information",description:"Supporting text",value:1,complete:()=>a.value>1},null,8,["complete"]),x(P,{title:"Event trigger",description:Wl(v)(!0),value:2,disabled:()=>!0,complete:()=>a.value>2},null,8,["description","complete"]),x(P,{title:"Configuration",value:3,error:()=>!0,complete:()=>a.value>3},null,8,["complete"])]),_:1},8,["modelValue"])]),_:1}),x(d,{title:"Basic Usage",description:"contains 3 slots (default - FmStep, contents - form, actions - navigation buttons)"},{default:I(()=>[x(cl,{modelValue:a.value,"onUpdate:modelValue":f[6]||(f[6]=b=>a.value=b),"total-steps":3,orientation:"horizontal"},{contents:I(()=>[a.value===1?(de(),Ne("div",on,[nn,x(be,{modelValue:e.value,"onUpdate:modelValue":f[2]||(f[2]=b=>e.value=b),required:"",label:"Field 1"},null,8,["modelValue"]),x(Pe,{modelValue:e.value,"onUpdate:modelValue":f[3]||(f[3]=b=>e.value=b),label:"textarea",disabled:!1},null,8,["modelValue"])])):a.value===2?(de(),Ne("div",rn,[un,x(be,{modelValue:e.value,"onUpdate:modelValue":f[4]||(f[4]=b=>e.value=b),label:"Field 1"},null,8,["modelValue"])])):a.value===3?(de(),Ne("div",sn,[dn,x(Pe,{modelValue:e.value,"onUpdate:modelValue":f[5]||(f[5]=b=>e.value=b),label:"textarea",disabled:!1},null,8,["modelValue"])])):$l("",!0)]),actions:I(()=>[a.value!=1?(de(),tn(p,{key:0,type:"button",label:"Previous",variant:"tertiary",onClick:jl(r,["prevent"])},null,8,["onClick"])):$l("",!0),x(p,{variant:"primary",label:a.value!=3?"Next":"Submit",type:"button",onClick:jl(s,["prevent"])},null,8,["label","onClick"])]),default:I(()=>[x(P,{title:"General information",description:"Supporting text",value:1,error:l,complete:t}),x(P,{title:"Event trigger",value:2,complete:i}),x(P,{title:"Configuration",value:3,complete:u})]),_:1},8,["modelValue"])]),_:1})]))}},{defineComponent:mn}=await n("vue"),{renderSlot:el,toDisplayString:Se,normalizeClass:ce,createElementVNode:Ee,openBlock:De,createElementBlock:ll,createCommentVNode:pn,createBlock:vn,pushScopeId:Zr,popScopeId:Xr}=await n("vue"),fn={class:"fm-drop-field"},bn=["accept","disabled"],{computed:Gl,ref:Ue}=await n("vue"),gn=mn({__name:"FmDropField",props:{label:{default:""},disabled:{type:Boolean,default:!1},accept:{default:""},maxFileSize:{default:8e6}},emits:["file-upload","file-rejected"],setup(o,{emit:e}){const a=o,t=Ue(!1),l=Ue(),i=Ue(),u=Ue(),s=c=>{a.disabled||(c.stopPropagation(),c.preventDefault())},r=c=>{a.disabled||(c.stopPropagation(),c.preventDefault(),t.value=!0)},m=c=>{a.disabled||(c.stopPropagation(),c.preventDefault(),t.value=!1)},f=c=>{a.disabled||(c.stopPropagation(),c.preventDefault(),t.value=!1,b(c))},b=c=>{var R;u.value=((R=c.dataTransfer)==null?void 0:R.files)??c.target.files;const H=u.value;if(l.value=al(H[0]),i.value=ol(H[0]),l.value&&i.value)e("file-upload",H[0]);else{const ar=V();e("file-rejected",[{file:H[0],reason:ar}])}},V=()=>{const c=[];return l.value||c.push("invalid-type"),i.value||c.push("invalid-size"),c},al=c=>{if(!a.accept)return!0;const H=a.accept.split(",").map(R=>R.trim());for(const R of H)if(fe(R)){if(ot(R)===ot(c.type))return!0}else if(il(c)===R||c.type===R)return!0;return!1},ol=c=>c.size<=a.maxFileSize,fe=c=>c.indexOf("*")!==-1,il=c=>"."+c.name.split(".").pop(),ot=c=>c.substring(0,c.indexOf("/")),tr=Gl(()=>{if(t.value)return"Drop file to upload";if(l.value){if(!i.value)return`File size exceeds ${a.maxFileSize*1e-6}mb`}else return"File type is not valid";return""}),nl=Gl(()=>u.value?!l.value||!i.value:!1);return(c,H)=>(De(),ll("label",fn,[el(c.$slots,"label",{},()=>[Ee("div",{class:ce(["fm-typo-body-lg-400",[c.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-primary"]])},Se(c.label),3)],!0),Ee("div",{class:ce(["fm-drop-field__container",{"fm-drop-field__container--dragging":t.value,"fm-drop-field__container--invalid":nl.value&&!c.disabled,"fm-drop-field__container--disabled":c.disabled}]),onDragenter:s,onDragover:r,onDragleave:m,onDrop:f},[(t.value||nl.value)&&!c.disabled?(De(),ll("div",{key:0,class:ce({"fm-typo-body-lg-700":!0,"text-fm-color-primary":t.value,"text-fm-color-typo-error":nl.value})},Se(tr.value),3)):(De(),vn(p,{key:1,label:"Add files",size:"md",variant:"secondary",disabled:c.disabled},null,8,["disabled"])),el(c.$slots,"accept-text",{},()=>[a.accept?(De(),ll("div",{key:0,class:ce(["fm-typo-body-md-400",[c.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-secondary"]])},Se(`Accepts ${a.accept}`),3)):pn("",!0)],!0),Ee("input",{type:"file",class:"fm-drop-field__input",accept:c.accept,disabled:c.disabled,onChange:b},null,40,bn)],34),el(c.$slots,"helper-text",{},()=>[Ee("div",{class:ce(["fm-typo-body-sm-400",[c.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-secondary"]])},Se(`Max size ${a.maxFileSize*1e-6}mb`),3)],!0)]))}}),ql=Kr(gn,[["__scopeId","data-v-31c17193"]]),{defineComponent:_n}=await n("vue"),{createVNode:Te,createElementVNode:ze,toDisplayString:yn,withCtx:Hl,Fragment:hn,openBlock:wn,createElementBlock:Vn}=await n("vue"),xn=["src"],{ref:Jl}=await n("vue"),kn=_n({__name:"DropField",setup(o){const e=Jl(),a=Jl(),t=i=>{console.log(i),e.value=URL.createObjectURL(i)},l=i=>{console.log(i),a.value=i};return(i,u)=>(wn(),Vn(hn,null,[Te(d,{title:"Drop Field"},{default:Hl(()=>[Te(ql,{class:"h-[300px] w-[200px]",label:"Document",accept:".pdf, .png",onFileUpload:t,onFileRejected:l}),ze("div",null,[ze("img",{src:e.value},null,8,xn)]),ze("div",null,[ze("code",null,yn(JSON.stringify(a.value,function(s,r){return s==="file"?{fileName:r.name,fileType:r.type}:r},4)),1)])]),_:1}),Te(d,{class:"mt-4",title:"Drop Field Disabled"},{default:Hl(()=>[Te(ql,{class:"h-[300px] w-[200px]",label:"Document",disabled:""})]),_:1})],64))}}),{defineComponent:Cn}=await n("vue"),{renderList:Ql,Fragment:Kl,openBlock:me,createElementBlock:Le,toDisplayString:Zl,createElementVNode:Ae,normalizeClass:Bn,resolveDynamicComponent:Fn,createBlock:Nn}=await n("vue"),Sn={class:"divide-x flex h-screen",style:{"background-color":"#f7f7f7"}},En={class:"h-full overflow-y-auto px-24",style:{"min-width":"200px"}},Dn={class:"fm-typo-body-lg-700 mb-8 text-fm-color-typo-tertiary"},Un=["onClick"],Tn={class:"grow h-full overflow-y-auto p-16"},{ref:zn,computed:Ln,onMounted:An}=await n("vue"),On=Cn({__name:"App",setup(o){const e=[{title:"Application",children:{FmButton:{label:"Button",component:Gt},FmButtonGroup:{label:"Button Group",component:ln},FmCard:{label:"Card",component:ma},FmIcon:{label:"Icon",component:To},FmSnackbar:{label:"Snackbar",component:Ol},FmList:{label:"List & list item",component:Go},FmStepper:{label:"Stepper",component:cn},FmBreadcrumb:{label:"Breadcrumb",component:Dt},FmDialog:{label:"Dialog",component:$i},FmDropField:{label:"Drop Field",component:kn}}},{title:"Form",children:{FmForm:{label:"Form",component:Ki},FmFormField:{label:"Form field",component:Ia},FmTextField:{label:"Input",component:Co},FmStepperField:{label:"Stepper Field",component:co},FmSwitch:{label:"Switch",component:wo},FmRadio:{label:"Radio",component:Ka},FmCheckbox:{label:"Checkbox",component:Oa},FmSelect:{label:"Select",component:lo},FmDatePicker:{label:"Date picker",component:wa},FmDateRangePicker:{label:"Date range picker",component:Ea},FmTimePicker:{label:"Time picker",component:ki}}},{title:"Chart",children:{FmLineChart:{label:"Line chart",component:At}}},{title:"Utility",children:{FmMenu:{label:"Menu",component:ni},FmTooltip:{label:"Tooltip",component:Di}}}],a=zn("FmButton");function t(i){window.location.hash=i,a.value=i}const l=Ln(()=>e.reduce((i,u)=>({...i,...u.children}),{})[a.value].component);return An(()=>{const[,i]=window.location.hash.split("/");i&&t(i)}),(i,u)=>(me(),Le("div",Sn,[Ae("div",En,[(me(),Le(Kl,null,Ql(e,(s,r)=>Ae("div",{key:r,class:"mt-24"},[Ae("div",Dn,Zl(s.title),1),(me(!0),Le(Kl,null,Ql(s.children,(m,f)=>(me(),Le("div",{key:f,class:Bn([a.value===f?"cursor-not-allowed fm-typo-body-lg-700 text-fm-color-primary":"cursor-pointer","py-4"]),onClick:()=>t(f)},Zl(m.label),11,Un))),128))])),64))]),Ae("div",Tn,[(me(),Nn(Fn(l.value)))])]))}}),{defineComponent:Mn}=await n("vue"),{resolveDynamicComponent:Xl,normalizeProps:Yl,guardReactiveProps:et,openBlock:D,createBlock:q,createElementBlock:pe,createCommentVNode:ve,toDisplayString:lt,createElementVNode:tl,createVNode:Pn,normalizeStyle:Rn,normalizeClass:Wn,Transition:$n,withCtx:jn}=await n("vue"),In={key:0,class:"block"},Gn={class:"flex fm-typo-title-sm-700 items-center justify-between text-fm-color-typo-primary"},qn={class:"fm-typo-title-md-700 text-fm-color-typo-primary"},Hn={key:0,class:"overflow-y-auto"},Jn={key:1,class:"fm-typo-body-md-400 overflow-y-auto text-fm-color-neutral-black"},Qn={class:"flex gap-8 items-center justify-end sm:flex-col-reverse xs:flex-col-reverse"},{onMounted:Kn,ref:tt}=await n("vue"),Zn=Mn({__name:"FmDynamicDialog",props:{title:{},message:{},primaryActions:{default:null},secondaryActions:{default:null},tertiaryActions:{default:null},overlay:{type:Boolean,default:!0},closeButton:{type:Boolean,default:!0},minWidth:{default:280},dialogComponent:{default:null},contentComponent:{default:null},dialogComponentProps:{},contentComponentProps:{},unmount:{},storedFunctions:{}},emits:["dialog-opened","dialog-closed"],setup(o,{emit:e}){const a=o,t=tt(!0),l=tt(null),i=()=>{a.overlay&&(a.unmount(),e("dialog-closed"))},u=r=>{l.value&&r.target===l.value&&i()},s=(r,m)=>{a.storedFunctions[m].forEach(f=>f()),r.close&&i()};return Kn(()=>{e("dialog-opened")}),(r,m)=>(D(),q($n,null,{default:jn(()=>[t.value?(D(),pe("div",{key:0,ref_key:"overlayRef",ref:l,class:Wn({"fm-dialog--container":!0,"fm-dialog--overlay":r.overlay}),onClick:u},[r.dialogComponent?(D(),pe("div",In,[(D(),q(Xl(r.dialogComponent),Yl(et(r.dialogComponentProps)),null,16))])):(D(),pe("div",{key:1,class:"fm-dialog",style:Rn({"min-width":`${a.minWidth}px`})},[tl("div",Gn,[tl("div",qn,lt(r.title),1),r.closeButton?(D(),q(Z,{key:0,class:"cursor-pointer",name:"close",size:"md",onClick:i})):ve("",!0)]),r.contentComponent?(D(),pe("div",Hn,[(D(),q(Xl(r.contentComponent),Yl(et(r.contentComponentProps)),null,16))])):(D(),pe("div",Jn,lt(r.message),1)),tl("div",Qn,[r.tertiaryActions?(D(),q(p,{key:0,class:"sm:w-full xs:w-full",variant:"tertiary",label:r.tertiaryActions.text,size:"md",onClick:m[0]||(m[0]=f=>s(r.tertiaryActions,"tertiary"))},null,8,["label"])):ve("",!0),Pn(ut,{class:"sm:hidden xs:hidden"}),r.secondaryActions?(D(),q(p,{key:1,class:"sm:w-full xs:w-full",variant:"secondary",label:r.secondaryActions.text,size:"md",onClick:m[1]||(m[1]=f=>s(r.secondaryActions,"secondary"))},null,8,["label"])):ve("",!0),r.primaryActions?(D(),q(p,{key:2,class:"sm:w-full xs:w-full",variant:"primary",label:r.primaryActions.text,size:"md",onClick:m[2]||(m[2]=f=>s(r.primaryActions,"primary"))},null,8,["label"])):ve("",!0)])],4))],2)):ve("",!0)]),_:1}))}}),{markRaw:Xn,createVNode:Yn,render:at}=await n("vue"),er={install:o=>{const e={open:a=>{const t={primary:[],secondary:[],tertiary:[]},l={onPrimary:m=>(t.primary.push(m),l),onSecondary:m=>(t.secondary.push(m),l),onTertiary:m=>(t.tertiary.push(m),l)};function i(){u&&at(null,u),u=null,r=null}let u=document.createElement("div");document.body.appendChild(u);const s=Xn(Zn);let r=Yn(s,{...a,unmount:i,storedFunctions:t});return r.appContext=o._context,at(r,u),l}};o.config.globalProperties.$dialog=e,o.provide(st,e)}},{createApp:lr}=await n("vue"),Oe=lr(On);Oe.use(dt),Oe.use(ht,{duration:.3,color:"var(--fm-color-opacity-sm)",initialOpacity:1,finalOpacity:.1,dissolveDuration:.6}),Oe.use(er),Oe.mount("#app")});
|