You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ygdc/kirby/panel/dist/js/PlaygroundView.min.js

2 lines
16 KiB

2 months ago
import{n as t,_ as e}from"./index.min.js";import{D as n}from"./Docs.min.js";import"./vendor.min.js";const l=t({props:{docs:Object},computed:{options(){const t=[{icon:"expand",link:"lab/docs/"+this.docs.component}];return this.docs.github&&t.unshift({icon:"github",link:this.docs.github,target:"_blank"}),t}}},(function(){var t=this,e=t._self._c;return e("k-drawer",t._b({ref:"drawer",staticClass:"k-form-drawer",attrs:{options:t.options},on:{submit:function(e){return t.$emit("cancel")}}},"k-drawer",t.$attrs,!1),[e("k-lab-docs",t._b({},"k-lab-docs",t.docs,!1))],1)}),[],!1,null,null,null,null).exports;const a=t({props:{code:{type:Boolean,default:!0},label:String,flex:Boolean},data:()=>({mode:"preview"}),computed:{component(){return window.UiExamples[this.label]}}},(function(){var t=this,e=t._self._c;return e("div",{staticClass:"k-lab-example",attrs:{"data-flex":t.flex,tabindex:"0"}},[e("header",{staticClass:"k-lab-example-header"},[e("h3",{staticClass:"k-lab-example-label"},[t._v(t._s(t.label))]),t.code?e("k-button-group",{staticClass:"k-lab-example-inspector",attrs:{layout:"collapsed"}},[e("k-button",{attrs:{theme:"preview"===t.mode?"info":null,icon:"preview",size:"xs",title:"Preview"},on:{click:function(e){t.mode="preview"}}}),e("k-button",{attrs:{theme:"inspect"===t.mode?"info":null,icon:"code",size:"xs",title:"Vue code"},on:{click:function(e){t.mode="inspect"}}})],1):t._e()],1),"preview"===t.mode?e("div",{staticClass:"k-lab-example-canvas"},[t._t("default")],2):t._e(),"inspect"===t.mode?e("div",{staticClass:"k-lab-example-code"},[e("k-code",{attrs:{language:"html"}},[t._v(t._s(t.component))])],1):t._e()])}),[],!1,null,null,null,null).exports;const o=t({},(function(){return(0,this._self._c)("div",{staticClass:"k-lab-examples"},[this._t("default")],2)}),[],!1,null,null,null,null).exports;const i=t({props:{description:{default:!0,type:Boolean},icon:{default:!0,type:Boolean},placeholder:{default:!0,type:Boolean},type:String,value:{default:null,type:[String,Number,Array]}},data:()=>({input:null}),computed:{label(){return this.$helper.string.ucfirst(this.type)}},watch:{value:{handler(t){this.input=t},immediate:!0}},methods:{emit(t){this.input=t,this.$emit("input",t)}}},(function(){var t=this,e=t._self._c;return e("k-lab-form",[e("k-lab-examples",[e("k-lab-example",{attrs:{label:"Default"}},[e(`k-${t.type}-field`,{tag:"component",attrs:{name:t.type,label:t.label,value:t.input},on:{input:t.emit}})],1),e("k-lab-example",{attrs:{label:"Autofocus"}},[e(`k-${t.type}-field`,{tag:"component",attrs:{autofocus:!0,label:t.label,value:t.input},on:{input:t.emit}})],1),e("k-lab-example",{attrs:{label:"Required"}},[e(`k-${t.type}-field`,{tag:"component",attrs:{label:t.label,required:!0,value:t.input},on:{input:t.emit}})],1),t.placeholder?e("k-lab-example",{attrs:{label:"Placeholder"}},[e(`k-${t.type}-field`,{tag:"component",attrs:{label:t.label,value:t.input,placeholder:"Placeholder text …"},on:{input:t.emit}})],1):t._e(),e("k-lab-example",{attrs:{label:"Help"}},[e(`k-${t.type}-field`,{tag:"component",attrs:{label:t.label,value:t.input,help:"This is some help text"},on:{input:t.emit}})],1),t.description?e("k-lab-example",{attrs:{label:"Before & After"}},[e(`k-${t.type}-field`,{tag:"component",attrs:{label:t.label,value:t.input,after:"After",before:"Before"},on:{input:t.emit}})],1):t._e(),t.icon?e("k-lab-example",{attrs:{label:"Icon"}},[e(`k-${t.type}-field`,{tag:"component",attrs:{label:t.label,value:t.input,icon:"edit"},on:{input:t.emit}})],1):t._e(),e("k-lab-example",{attrs:{label:"Disabled"}},[e(`k-${t.type}-field`,{tag:"component",attrs:{disabled:!0,label:t.label,value:t.input},on:{input:t.emit}})],1),t._t("default")],2)],1)}),[],!1,null,null,null,null).exports;const p=t({props:{column:{default:()=>({}),type:Object},field:{default:()=>({}),type:Object},label:String,type:String,value:{}}},(function(){var t=this,e=t._self._c;return e("k-lab-example",{attrs:{label:t.label}},[e("div",{staticClass:"k-table"},[e("table",[e("thead",[e("tr",[e("th",{attrs:{"data-mobile":"true"}},[t._v(" "+t._s(t.$helper.string.ucfirst(t.type))+" Field Preview "