@avakhula/ui 0.0.108 → 0.0.110

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,8 +19552,7 @@ class sa {
19552
19552
  return this.tooltipContainer;
19553
19553
  }
19554
19554
  createTooltip(n, e) {
19555
- if (!e.trim().length)
19556
- return;
19555
+ console.log("create tooltip"), console.log(e == null ? void 0 : e.length);
19557
19556
  const i = `
19558
19557
  position: absolute;
19559
19558
  top: 0px;
@@ -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":tr}),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.trim().length)return;const o=`
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":tr}),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){console.log("create tooltip"),console.log(e==null?void 0:e.length);const o=`
210
210
  position: absolute;
211
211
  top: 0px;
212
212
  left: 0px;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@avakhula/ui",
3
- "version": "0.0.108",
3
+ "version": "0.0.110",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.umd.cjs",
6
6
  "source": "src/index.js",
package/src/App.vue CHANGED
@@ -1,10 +1,16 @@
1
1
  <template>
2
- <ib-button @mouseenter="test" @mouseleave="test1"> test </ib-button>
2
+ <div id="test">
3
+ <ib-input v-tooltip="'test'" readonly />
4
+ </div>
3
5
  </template>
4
6
 
5
7
  <script>
6
- import IbButton from "./components/Button/Button.vue";
8
+ import IbInput from "./components/Form/Input/Input.vue";
9
+ import { TooltipDirective as Tooltip } from "./index";
7
10
  export default {
11
+ directives: {
12
+ Tooltip
13
+ },
8
14
  methods: {
9
15
  test() {
10
16
  console.log('test')
@@ -14,10 +20,17 @@ export default {
14
20
  }
15
21
  },
16
22
  components: {
17
- IbButton,
23
+ IbInput,
18
24
  },
19
25
  };
20
26
  </script>
21
27
 
22
- <style>
23
- </style>
28
+ <style lang="scss">
29
+ #test {
30
+ width: 100vw;
31
+ height: 100vh;
32
+ display: flex;
33
+ align-items: center;
34
+ justify-content: center;
35
+ }
36
+ </style>
@@ -16,9 +16,11 @@ export default class Tooltip {
16
16
  }
17
17
 
18
18
  createTooltip(el, text) {
19
- if (!text.trim().length) {
20
- return;
21
- }
19
+ console.log('create tooltip')
20
+ console.log(text?.length);
21
+ // if (!text.length) {
22
+ // return;
23
+ // }
22
24
 
23
25
  const tooltipContainerStyles = `
24
26
  position: absolute;