@avakhula/ui 0.0.132 → 0.0.133
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/index.js
CHANGED
|
@@ -19552,7 +19552,7 @@ class sa {
|
|
|
19552
19552
|
return this.tooltipContainer;
|
|
19553
19553
|
}
|
|
19554
19554
|
createTooltip(n, e) {
|
|
19555
|
-
if (
|
|
19555
|
+
if (!e.length)
|
|
19556
19556
|
return;
|
|
19557
19557
|
const i = `
|
|
19558
19558
|
position: absolute;
|
|
@@ -19582,7 +19582,7 @@ class sa {
|
|
|
19582
19582
|
}
|
|
19583
19583
|
}
|
|
19584
19584
|
const _r = new sa(), wo = (t, n) => {
|
|
19585
|
-
_r.getTooltipContainer() ||
|
|
19585
|
+
_r.getTooltipContainer() || _r.createTooltip(t, n.value);
|
|
19586
19586
|
}, Oo = () => {
|
|
19587
19587
|
_r.destroyTooltip();
|
|
19588
19588
|
}, g1 = {
|
package/dist/index.umd.cjs
CHANGED
|
@@ -206,7 +206,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
206
206
|
<rect x="7" y="9.5" width="11" height="2" rx="1" class="fill" fill="#1A1A1A"/>
|
|
207
207
|
<rect x="7" y="14.5" width="11" height="2" rx="1" class="fill" fill="#1A1A1A"/>
|
|
208
208
|
</svg>
|
|
209
|
-
`,E1="",at=mt.import("ui/icons");at.bold=Uf,at.italic=Kf,at.underline=Gf,at.strike=Yf,at["code-block"]=Zf,at.link=Wf,at.align[""]=Jf,at.align.center=Xf,at.align.right=Qf,at.align.justify=eh,at.list.ordered=th,at.list.bullet=nh,at["alphabet-list"]=rh,mt.register({"formats/alphabet-list":qt,"formats/alphabet-list/item":er}),mt.register(at),mt.debug("error");const ih={name:"IbTextEditor",props:{placeholder:{type:String,default:""},modelValue:{type:String},content:{type:String,default:""},readOnly:{type:Boolean,default:!1},enable:{type:Boolean,default:!0},modules:{type:[Object,Array],default:()=>{}},options:{type:Object,default:()=>{}},characterLimit:{type:[String,Number],default:null},error:{type:Boolean,default:!1},disable:{type:Boolean,default:!1},errorMessage:{type:String,default:""},characterLimitErrorMessage:{type:String,default:""},height:{type:String}},mounted(){this.$refs.toolbar.classList.remove("ql-toolbar");const t=this.$refs.wrapper.querySelector("input[data-link]");t.dataset.link="Enter Link",this.updateCharacterLength()},data(){return{data:this.modelValue?this.modelValue:this.content,characterLength:0,isFocus:!1}},watch:{content(t){this.data=t},data(t){this.$emit("update:modelValue",t)}},methods:{onChange(){this.updateCharacterLength(),this.$emit("change",this.data)},onBlur(t){this.$emit("blur",this.data,t),this.isFocus=!1},onFocus(){this.isFocus=!0},updateCharacterLength(){this.characterLength=this.$refs.quill.getText().length-1}},computed:{config(){const t={placeholder:this.data.length?"":this.placeholder,readOnly:this.readOnly?this.readOnly:this.disable,enable:this.enable};return Object.assign(t,this.options)},characterOverLimit(){return!!this.characterLimit&&this.characterLength>this.characterLimit}},components:{QuillEditor:qf,IbIconButton:ut,IbAlert:It,IbCharacterCount:Di}},oh={id:"toolbar",class:"toolbar",ref:"toolbar"},ah=i.createStaticVNode('<div class="toolbar-group header-toolbar-group"><select class="ql-header"><option value="1"></option><option value="2"></option><option value="3"></option><option value="4"></option><option value="5"></option><option value="6"></option><option selected></option></select></div>',1),lh={class:"toolbar-group"},sh=i.createElementVNode("div",{class:"toolbar-group"},[i.createElementVNode("select",{class:"ql-background"}),i.createElementVNode("select",{class:"ql-color"})],-1),dh={class:"toolbar-group"},ch={class:"toolbar-group"},uh={class:"toolbar-group"};function fh(t,n,e,o,a,r){const s=i.resolveComponent("ib-character-count"),l=i.resolveComponent("ib-alert"),u=i.resolveComponent("QuillEditor"),h=i.resolveComponent("ib-icon-button");return i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["textarea-wrapper",{error:r.characterOverLimit||e.error||e.errorMessage.length,focus:a.isFocus,disable:e.disable}])},[e.characterLimit?(i.openBlock(),i.createBlock(s,{key:0,"character-limit":e.characterLimit,"character-length":a.characterLength},null,8,["character-limit","character-length"])):i.createCommentVNode("",!0),e.errorMessage.length?(i.openBlock(),i.createBlock(l,{key:1,class:"error-message"},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(e.errorMessage),1)]),_:1})):i.createCommentVNode("",!0),i.withDirectives(i.createVNode(l,{class:"error-message"},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(e.characterLimitErrorMessage),1)]),_:1},512),[[i.vShow,e.characterLimitErrorMessage.length&&r.characterOverLimit]]),i.createElementVNode("div",{class:i.normalizeClass(["ib-text-editor-wrapper",{disable:e.disable}])},[i.createElementVNode("div",{class:"ib-text-editor",style:i.normalizeStyle({height:e.height?e.height+"px":""}),ref:"wrapper"},[i.createVNode(u,{onTextChange:r.onChange,onBlur:r.onBlur,onFocus:r.onFocus,ref:"quill",toolbar:"#toolbar",content:a.data,"onUpdate:content":n[0]||(n[0]=p=>a.data=p),contentType:"html",options:r.config,modules:e.modules},null,8,["onTextChange","onBlur","onFocus","content","options","modules"])],4),i.createElementVNode("div",oh,[ah,i.createElementVNode("div",lh,[i.createVNode(h,{class:"toolbar-item ql-bold",kind:"ghost"}),i.createVNode(h,{class:"toolbar-item ql-italic",kind:"ghost"}),i.createVNode(h,{class:"toolbar-item ql-underline",kind:"ghost"}),i.createVNode(h,{class:"toolbar-item ql-strike",kind:"ghost"})]),sh,i.createElementVNode("div",dh,[i.createVNode(h,{class:"toolbar-item ql-code-block",kind:"ghost"}),i.createVNode(h,{class:"toolbar-item ql-link",kind:"ghost"})]),i.createElementVNode("div",ch,[i.createVNode(h,{class:"toolbar-item ql-align",kind:"ghost"}),i.createVNode(h,{class:"ql-align toolbar-item",value:"center",kind:"ghost"}),i.createVNode(h,{class:"ql-align toolbar-item",value:"right",kind:"ghost"}),i.createVNode(h,{class:"ql-align toolbar-item",value:"justify",kind:"ghost"})]),i.createElementVNode("div",uh,[i.createVNode(h,{class:"ql-list toolbar-item",value:"ordered",kind:"ghost"}),i.createVNode(h,{class:"ql-list toolbar-item",value:"bullet",kind:"ghost"}),i.createVNode(h,{class:"ql-alphabet-list alphabet-list toolbar-item",kind:"ghost"})])],512)],2)],2)}const hh=_e(ih,[["render",fh]]),S1="",ph={name:"IbTable",computed:{hasThead(){return!!this.$slots.thead}}},mh={class:"ib-table-wrapper"},gh={class:"ib-table"};function yh(t,n,e,o,a,r){return i.openBlock(),i.createElementBlock("div",mh,[i.createElementVNode("table",gh,[r.hasThead?i.renderSlot(t.$slots,"thead",{key:0},void 0,!0):i.createCommentVNode("",!0),i.createElementVNode("tbody",null,[i.renderSlot(t.$slots,"tbody",{},void 0,!0)])])])}const vh=_e(ph,[["render",yh],["__scopeId","data-v-5dceb760"]]),N1="",bh={name:"IbRow"},_h={class:"ib-tr"};function $h(t,n,e,o,a,r){return i.openBlock(),i.createElementBlock("tr",_h,[i.renderSlot(t.$slots,"default",{ref:"row"})])}const wh=_e(bh,[["render",$h]]),x1="",kh={name:"IbCell",props:{fixed:{type:Boolean,default:!1}},data(){return{attr:{}}},mounted(){this.fixed&&this.freezeCol()},methods:{freezeCol(){const t=this.$el.getBoundingClientRect(),n=this.$el.closest("tr").getBoundingClientRect();this.attr.style||(this.attr.style={}),this.attr.style.minWidth=`${t.width}px`,this.attr.style.left=`${t.left-n.left}px`,this.attr.class+=" fixed"}}},Ch={class:"cell"};function Oh(t,n,e,o,a,r){return i.openBlock(),i.createElementBlock("td",i.mergeProps({onResize:n[0]||(n[0]=(...s)=>r.freezeCol&&r.freezeCol(...s)),class:"ib-cell"},this.attr),[i.createElementVNode("div",Ch,[i.renderSlot(t.$slots,"default",{},void 0,!0)])],16)}const Mo=_e(kh,[["render",Oh],["__scopeId","data-v-e74bb0f3"]]),T1="",Eh={name:"IbCheckboxCell",props:{isChecked:{type:Boolean,default:!1},fixed:{type:Boolean,default:!1}},components:{IbCell:Mo,IbCheckbox:vr}};function Sh(t,n,e,o,a,r){const s=i.resolveComponent("ib-checkbox"),l=i.resolveComponent("ib-cell");return i.openBlock(),i.createBlock(l,{fixed:e.fixed,class:"ib-checkbox-cell"},{default:i.withCtx(()=>[i.createVNode(s,{"is-checked":e.isChecked},null,8,["is-checked"])]),_:1},8,["fixed"])}const Nh=_e(Eh,[["render",Sh]]);class Po{constructor(){this.tooltipInstance=null,this.tooltipContainer=null}getTooltipInstance(){return this.getTooltipInstance}getTooltipContainer(){return this.tooltipContainer}createTooltip(n,e){if(
|
|
209
|
+
`,E1="",at=mt.import("ui/icons");at.bold=Uf,at.italic=Kf,at.underline=Gf,at.strike=Yf,at["code-block"]=Zf,at.link=Wf,at.align[""]=Jf,at.align.center=Xf,at.align.right=Qf,at.align.justify=eh,at.list.ordered=th,at.list.bullet=nh,at["alphabet-list"]=rh,mt.register({"formats/alphabet-list":qt,"formats/alphabet-list/item":er}),mt.register(at),mt.debug("error");const ih={name:"IbTextEditor",props:{placeholder:{type:String,default:""},modelValue:{type:String},content:{type:String,default:""},readOnly:{type:Boolean,default:!1},enable:{type:Boolean,default:!0},modules:{type:[Object,Array],default:()=>{}},options:{type:Object,default:()=>{}},characterLimit:{type:[String,Number],default:null},error:{type:Boolean,default:!1},disable:{type:Boolean,default:!1},errorMessage:{type:String,default:""},characterLimitErrorMessage:{type:String,default:""},height:{type:String}},mounted(){this.$refs.toolbar.classList.remove("ql-toolbar");const t=this.$refs.wrapper.querySelector("input[data-link]");t.dataset.link="Enter Link",this.updateCharacterLength()},data(){return{data:this.modelValue?this.modelValue:this.content,characterLength:0,isFocus:!1}},watch:{content(t){this.data=t},data(t){this.$emit("update:modelValue",t)}},methods:{onChange(){this.updateCharacterLength(),this.$emit("change",this.data)},onBlur(t){this.$emit("blur",this.data,t),this.isFocus=!1},onFocus(){this.isFocus=!0},updateCharacterLength(){this.characterLength=this.$refs.quill.getText().length-1}},computed:{config(){const t={placeholder:this.data.length?"":this.placeholder,readOnly:this.readOnly?this.readOnly:this.disable,enable:this.enable};return Object.assign(t,this.options)},characterOverLimit(){return!!this.characterLimit&&this.characterLength>this.characterLimit}},components:{QuillEditor:qf,IbIconButton:ut,IbAlert:It,IbCharacterCount:Di}},oh={id:"toolbar",class:"toolbar",ref:"toolbar"},ah=i.createStaticVNode('<div class="toolbar-group header-toolbar-group"><select class="ql-header"><option value="1"></option><option value="2"></option><option value="3"></option><option value="4"></option><option value="5"></option><option value="6"></option><option selected></option></select></div>',1),lh={class:"toolbar-group"},sh=i.createElementVNode("div",{class:"toolbar-group"},[i.createElementVNode("select",{class:"ql-background"}),i.createElementVNode("select",{class:"ql-color"})],-1),dh={class:"toolbar-group"},ch={class:"toolbar-group"},uh={class:"toolbar-group"};function fh(t,n,e,o,a,r){const s=i.resolveComponent("ib-character-count"),l=i.resolveComponent("ib-alert"),u=i.resolveComponent("QuillEditor"),h=i.resolveComponent("ib-icon-button");return i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["textarea-wrapper",{error:r.characterOverLimit||e.error||e.errorMessage.length,focus:a.isFocus,disable:e.disable}])},[e.characterLimit?(i.openBlock(),i.createBlock(s,{key:0,"character-limit":e.characterLimit,"character-length":a.characterLength},null,8,["character-limit","character-length"])):i.createCommentVNode("",!0),e.errorMessage.length?(i.openBlock(),i.createBlock(l,{key:1,class:"error-message"},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(e.errorMessage),1)]),_:1})):i.createCommentVNode("",!0),i.withDirectives(i.createVNode(l,{class:"error-message"},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(e.characterLimitErrorMessage),1)]),_:1},512),[[i.vShow,e.characterLimitErrorMessage.length&&r.characterOverLimit]]),i.createElementVNode("div",{class:i.normalizeClass(["ib-text-editor-wrapper",{disable:e.disable}])},[i.createElementVNode("div",{class:"ib-text-editor",style:i.normalizeStyle({height:e.height?e.height+"px":""}),ref:"wrapper"},[i.createVNode(u,{onTextChange:r.onChange,onBlur:r.onBlur,onFocus:r.onFocus,ref:"quill",toolbar:"#toolbar",content:a.data,"onUpdate:content":n[0]||(n[0]=p=>a.data=p),contentType:"html",options:r.config,modules:e.modules},null,8,["onTextChange","onBlur","onFocus","content","options","modules"])],4),i.createElementVNode("div",oh,[ah,i.createElementVNode("div",lh,[i.createVNode(h,{class:"toolbar-item ql-bold",kind:"ghost"}),i.createVNode(h,{class:"toolbar-item ql-italic",kind:"ghost"}),i.createVNode(h,{class:"toolbar-item ql-underline",kind:"ghost"}),i.createVNode(h,{class:"toolbar-item ql-strike",kind:"ghost"})]),sh,i.createElementVNode("div",dh,[i.createVNode(h,{class:"toolbar-item ql-code-block",kind:"ghost"}),i.createVNode(h,{class:"toolbar-item ql-link",kind:"ghost"})]),i.createElementVNode("div",ch,[i.createVNode(h,{class:"toolbar-item ql-align",kind:"ghost"}),i.createVNode(h,{class:"ql-align toolbar-item",value:"center",kind:"ghost"}),i.createVNode(h,{class:"ql-align toolbar-item",value:"right",kind:"ghost"}),i.createVNode(h,{class:"ql-align toolbar-item",value:"justify",kind:"ghost"})]),i.createElementVNode("div",uh,[i.createVNode(h,{class:"ql-list toolbar-item",value:"ordered",kind:"ghost"}),i.createVNode(h,{class:"ql-list toolbar-item",value:"bullet",kind:"ghost"}),i.createVNode(h,{class:"ql-alphabet-list alphabet-list toolbar-item",kind:"ghost"})])],512)],2)],2)}const hh=_e(ih,[["render",fh]]),S1="",ph={name:"IbTable",computed:{hasThead(){return!!this.$slots.thead}}},mh={class:"ib-table-wrapper"},gh={class:"ib-table"};function yh(t,n,e,o,a,r){return i.openBlock(),i.createElementBlock("div",mh,[i.createElementVNode("table",gh,[r.hasThead?i.renderSlot(t.$slots,"thead",{key:0},void 0,!0):i.createCommentVNode("",!0),i.createElementVNode("tbody",null,[i.renderSlot(t.$slots,"tbody",{},void 0,!0)])])])}const vh=_e(ph,[["render",yh],["__scopeId","data-v-5dceb760"]]),N1="",bh={name:"IbRow"},_h={class:"ib-tr"};function $h(t,n,e,o,a,r){return i.openBlock(),i.createElementBlock("tr",_h,[i.renderSlot(t.$slots,"default",{ref:"row"})])}const wh=_e(bh,[["render",$h]]),x1="",kh={name:"IbCell",props:{fixed:{type:Boolean,default:!1}},data(){return{attr:{}}},mounted(){this.fixed&&this.freezeCol()},methods:{freezeCol(){const t=this.$el.getBoundingClientRect(),n=this.$el.closest("tr").getBoundingClientRect();this.attr.style||(this.attr.style={}),this.attr.style.minWidth=`${t.width}px`,this.attr.style.left=`${t.left-n.left}px`,this.attr.class+=" fixed"}}},Ch={class:"cell"};function Oh(t,n,e,o,a,r){return i.openBlock(),i.createElementBlock("td",i.mergeProps({onResize:n[0]||(n[0]=(...s)=>r.freezeCol&&r.freezeCol(...s)),class:"ib-cell"},this.attr),[i.createElementVNode("div",Ch,[i.renderSlot(t.$slots,"default",{},void 0,!0)])],16)}const Mo=_e(kh,[["render",Oh],["__scopeId","data-v-e74bb0f3"]]),T1="",Eh={name:"IbCheckboxCell",props:{isChecked:{type:Boolean,default:!1},fixed:{type:Boolean,default:!1}},components:{IbCell:Mo,IbCheckbox:vr}};function Sh(t,n,e,o,a,r){const s=i.resolveComponent("ib-checkbox"),l=i.resolveComponent("ib-cell");return i.openBlock(),i.createBlock(l,{fixed:e.fixed,class:"ib-checkbox-cell"},{default:i.withCtx(()=>[i.createVNode(s,{"is-checked":e.isChecked},null,8,["is-checked"])]),_:1},8,["fixed"])}const Nh=_e(Eh,[["render",Sh]]);class Po{constructor(){this.tooltipInstance=null,this.tooltipContainer=null}getTooltipInstance(){return this.getTooltipInstance}getTooltipContainer(){return this.tooltipContainer}createTooltip(n,e){if(!e.length)return;const o=`
|
|
210
210
|
position: absolute;
|
|
211
211
|
top: 0px;
|
|
212
212
|
left: 0px;
|
|
@@ -216,4 +216,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
216
216
|
bottom: auto!important;
|
|
217
217
|
right: auto!important;
|
|
218
218
|
transform: none!important;
|
|
219
|
-
`;this.tooltipContainer.firstChild.setAttribute("style",f)}},100)}destroyTooltip(){var n,e;(n=this.tooltipInstance)==null||n.unmount(),this.tooltipInstance=null,(e=this.tooltipContainer)==null||e.remove(),this.tooltipContainer=null}}const tr=new Po,Bo=(t,n)=>{tr.getTooltipContainer()||
|
|
219
|
+
`;this.tooltipContainer.firstChild.setAttribute("style",f)}},100)}destroyTooltip(){var n,e;(n=this.tooltipInstance)==null||n.unmount(),this.tooltipInstance=null,(e=this.tooltipContainer)==null||e.remove(),this.tooltipContainer=null}}const tr=new Po,Bo=(t,n)=>{tr.getTooltipContainer()||tr.createTooltip(t,n.value)},Lo=()=>{tr.destroyTooltip()},xh={mounted(t,n){t.addEventListener("mouseenter",()=>Bo(t,n)),t.addEventListener("mouseout",Lo)},beforeUnmount(t,n){tr.destroyTooltip(),t.removeEventListener("mouseenter",()=>Bo(t,n)),t.removeEventListener("mouseout",Lo)}},Ur=new Po,Ro=(t,n)=>{Si(t)&&Ur.createTooltip(t,n.value)},jo=()=>{Ur.destroyTooltip()},Th={mounted(t,n){t.addEventListener("mouseenter",()=>Ro(t,n)),t.addEventListener("mouseleave",jo)},beforeUnmount(t,n){Ur.destroyTooltip(),t.removeEventListener("mouseenter",()=>Ro(t,n)),t.removeEventListener("mouseleave",jo)}};pe.IbAccordion=Go,pe.IbAlert=It,pe.IbAvatar=ba,pe.IbBadge=wa,pe.IbBreadcrumbs=Zl,pe.IbButton=gi,pe.IbButtonGroup=Ea,pe.IbCell=Mo,pe.IbCheckbox=vr,pe.IbCheckboxCell=Nh,pe.IbCheckboxGroup=$d,pe.IbDatePicker=sc,pe.IbDropdown=Bn,pe.IbDropdownItem=mr,pe.IbDropdownList=Ln,pe.IbFormGroup=yd,pe.IbIcon=Le,pe.IbIconButton=ut,pe.IbInput=yr,pe.IbLabel=sn,pe.IbLimitSelector=Ti,pe.IbModal=vl,pe.IbPagination=Ks,pe.IbPanel=hd,pe.IbPhoneInput=Of,pe.IbPopover=yi,pe.IbProgressBar=Xs,pe.IbRadio=xd,pe.IbRow=wh,pe.IbSorting=Fl,pe.IbSplitButton=cl,pe.IbSplitButtonItem=hl,pe.IbStatusIndicator=id,pe.IbTab=Il,pe.IbTabDropdown=Oi,pe.IbTable=vh,pe.IbTabs=Tl,pe.IbTagPill=xa,pe.IbTextEditor=hh,pe.IbTextarea=Vd,pe.IbToggle=Ei,pe.IbToggleTip=Ba,pe.IbTooltip=Ct,pe.IbTreeSelect=xi,pe.OutsideDirective=Mn,pe.TextOverflowTooltipDirective=Th,pe.TooltipDirective=xh,Object.defineProperty(pe,Symbol.toStringTag,{value:"Module"})});
|
package/package.json
CHANGED