vue-spear-tip 0.4.2 → 0.4.3-beta.1

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.
Files changed (39) hide show
  1. package/dist/.vite/manifest.json +32 -32
  2. package/dist/{Button-CYcXBn6e.js → Button-Cy7jEHLM.js} +1 -1
  3. package/dist/{Button-Cp9T3IYN.cjs → Button-DRCriWgK.cjs} +1 -1
  4. package/dist/{CodeHighlight-DQTjGiNu.cjs → CodeHighlight-CSW79iY2.cjs} +1 -1
  5. package/dist/{CodeHighlight-CKc5muo1.js → CodeHighlight-CuTTU4UN.js} +1 -1
  6. package/dist/{DateField-C07lf30q.js → DateField-B8ST8d-c.js} +2 -2
  7. package/dist/{DateField-uw3R6WT-.cjs → DateField-BovgLNIo.cjs} +1 -1
  8. package/dist/{FieldComponent.vue_vue_type_script_lang-wBvdbbJm.js → FieldComponent.vue_vue_type_script_lang-B95EQa3m.js} +1 -1
  9. package/dist/{FieldComponent.vue_vue_type_script_lang-DklZyWmK.cjs → FieldComponent.vue_vue_type_script_lang-NXJrzI_q.cjs} +1 -1
  10. package/dist/{SelectField-CSMs0Syw.js → SelectField-B3oJ3ew_.js} +2 -2
  11. package/dist/{SelectField-BRkffT1m.cjs → SelectField-Cef8GmrK.cjs} +1 -1
  12. package/dist/{StringField-DT_VSBqj.cjs → StringField-C_0SQJtB.cjs} +1 -1
  13. package/dist/{StringField-BavxMpHv.js → StringField-CpJ-m5vv.js} +2 -2
  14. package/dist/{SwitchField-D9WEyMPj.cjs → SwitchField-Bxnmn3_v.cjs} +1 -1
  15. package/dist/{SwitchField-DlkrJwDd.js → SwitchField-Cwz6URRI.js} +2 -2
  16. package/dist/{Tabs-DVI-t0Wo.cjs → Tabs-BjV7e7zW.cjs} +1 -1
  17. package/dist/{Tabs-COfVQ8iX.js → Tabs-Oh-CuKbc.js} +1 -1
  18. package/dist/{TextField-DTk4zbvg.js → TextField-DqWsZ9jJ.js} +2 -2
  19. package/dist/{TextField-fPwRsNJx.cjs → TextField-Z-1KUVIn.cjs} +1 -1
  20. package/dist/{index-C2FyHQM_.js → index-CwPJq1hT.js} +15 -13
  21. package/dist/{index-BzJgL_gB.cjs → index-D3Eee-TB.cjs} +1 -1
  22. package/dist/replaceable/BaseComponent.vue +18 -10
  23. package/dist/vue-spear-tip.cjs.js +1 -1
  24. package/dist/vue-spear-tip.es.js +1 -1
  25. package/docs/index.html +1 -1
  26. package/docs/static/{Button-rIzfcWIC.js → Button-DY0tM6dA.js} +1 -1
  27. package/docs/static/{CodeHighlight-ei0IA0GY.js → CodeHighlight-Dg0Mb-AH.js} +1 -1
  28. package/docs/static/{DateField-B-0zfupO.js → DateField-CXbZrQ80.js} +1 -1
  29. package/docs/static/{FieldComponent.vue_vue_type_script_lang-CWcc-m1H.js → FieldComponent.vue_vue_type_script_lang-CNc2WRwV.js} +1 -1
  30. package/docs/static/{NoSymbolIcon-CHDiT1Bi.js → NoSymbolIcon-CZ-MKzNk.js} +1 -1
  31. package/docs/static/{SelectField-DY2c_Mpo.js → SelectField-DdM5pUHx.js} +1 -1
  32. package/docs/static/{StringField-CCR2aQo9.js → StringField-C1sqQmkZ.js} +1 -1
  33. package/docs/static/{SwitchField-BS7HnUcr.js → SwitchField-Tg3h9bmm.js} +1 -1
  34. package/docs/static/{Tabs-ByKftH1E.js → Tabs-B6zxgWdl.js} +1 -1
  35. package/docs/static/{TextField-DSYfcfvb.js → TextField-Bn_Maa8X.js} +1 -1
  36. package/docs/static/index-CJVOSpdk.js +2 -0
  37. package/docs/static/{main-CFEGvCly.js → main-BSbegBSy.js} +6 -6
  38. package/package.json +1 -1
  39. package/docs/static/index-smyOpGNE.js +0 -2
@@ -20,6 +20,7 @@ export default abstract class BaseComponent extends VueClass implements IBaseVue
20
20
  const windowHeight = ref(window.innerHeight)
21
21
  const isAndroid = this.VST.device().osName()?.toLowerCase().includes('android')
22
22
  const isApple = this.VST.device().deviceVendor() == 'Apple'
23
+ const hasTouchpad = () => 'ontouchstart' in window || navigator.maxTouchPoints > 0 || (navigator as any).msMaxTouchPoints > 0
23
24
  const isIphone =
24
25
  this.VST.device().osName()?.toLowerCase().includes('ios')
25
26
  || this.VST.device().deviceModel()?.toLowerCase().includes('iphone')
@@ -30,18 +31,25 @@ export default abstract class BaseComponent extends VueClass implements IBaseVue
30
31
 
31
32
  this.VST.$reactive = reactive({
32
33
  locale: (Intl ? ((new Intl.DateTimeFormat())?.resolvedOptions?.()?.locale) : navigator.language) || 'en',
33
- isMobile: computed(() => windowWidth.value < 768),
34
+ isMobile: computed(() => windowWidth.value < 768 || (windowHeight.value < 768 && windowWidth.value < 1000)),
34
35
  isTablet: computed(() => windowWidth.value < 1280 && windowWidth.value >= 768),
35
36
  isNotebook: computed(() => windowWidth.value <= 1366 && windowWidth.value >= 1280),
36
37
  isDesktop: computed(() => windowWidth.value > 1366),
37
- viewPortType: computed(() => (windowWidth.value < 768) ? 'mobile' : (
38
- (windowWidth.value < 1280)
39
- ? 'tablet'
40
- : (
41
- (windowWidth.value < 1366)
42
- ? 'notebook'
43
- : 'desktop'
44
- )),
38
+ viewPortType: computed(() => (
39
+ windowWidth.value < 768 || (
40
+ // Мобильник в повёрнутом состоянии в большинстве случаев
41
+ windowHeight.value < 768 && windowWidth.value < 1000
42
+ ))
43
+ ? 'mobile'
44
+ : hasTouchpad() && windowWidth.value < 1440 // Планшет в режиме desktop
45
+ ? 'tablet'
46
+ : ((windowWidth.value < 1280)
47
+ ? 'tablet'
48
+ : (
49
+ (windowWidth.value < 1366)
50
+ ? 'notebook'
51
+ : 'desktop'
52
+ )),
45
53
  ),
46
54
  get isIphone() {
47
55
  return isIphone
@@ -53,7 +61,7 @@ export default abstract class BaseComponent extends VueClass implements IBaseVue
53
61
  return isAndroid
54
62
  },
55
63
  get hasTouchpad() {
56
- return 'ontouchstart' in window || navigator.maxTouchPoints > 0 || (navigator as any).msMaxTouchPoints > 0
64
+ return hasTouchpad()
57
65
  },
58
66
  viewPortWidth: computed(() => windowWidth.value),
59
67
  viewPortHeight: computed(() => windowHeight.value),
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-BzJgL_gB.cjs");exports.BaseComponent=e.BaseComponent$1;exports.Button=e.VSTButton;exports.ButtonInherited=e.ButtonInherited$1;exports.CodeHighlight=e.index;exports.Computed=e.Computed;exports.DateField=e.index$5;exports.FieldComponent=e.FieldComponent;exports.Prop=e.Prop;exports.SelectField=e.index$2;exports.StringField=e.VSTStringField;exports.SwitchField=e.index$3;exports.Tabs=e.index$1;exports.TextField=e.index$4;exports.VST=e.VST;exports.VueClass=e.VueClass;exports.VueClassComponent=e.VueClassComponent;exports.Watch=e.Watch;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-D3Eee-TB.cjs");exports.BaseComponent=e.BaseComponent$1;exports.Button=e.VSTButton;exports.ButtonInherited=e.ButtonInherited$1;exports.CodeHighlight=e.index;exports.Computed=e.Computed;exports.DateField=e.index$5;exports.FieldComponent=e.FieldComponent;exports.Prop=e.Prop;exports.SelectField=e.index$2;exports.StringField=e.VSTStringField;exports.SwitchField=e.index$3;exports.Tabs=e.index$1;exports.TextField=e.index$4;exports.VST=e.VST;exports.VueClass=e.VueClass;exports.VueClassComponent=e.VueClassComponent;exports.Watch=e.Watch;
@@ -1,4 +1,4 @@
1
- import { e, c as t, h as o, i, C as l, m as d, F as n, P as C, j as F, b as h, k as m, g as p, l as r, V as u, d as c, f as g, W as S } from "./index-C2FyHQM_.js";
1
+ import { e, c as t, h as o, i, C as l, m as d, F as n, P as C, j as F, b as h, k as m, g as p, l as r, V as u, d as c, f as g, W as S } from "./index-CwPJq1hT.js";
2
2
  export {
3
3
  e as BaseComponent,
4
4
  t as Button,
package/docs/index.html CHANGED
@@ -3,7 +3,7 @@
3
3
  <meta charset="UTF-8">
4
4
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
5
5
  <title>Vue Spear Tip</title>
6
- <script type="module" crossorigin src="/static/main-CFEGvCly.js"></script>
6
+ <script type="module" crossorigin src="/static/main-BSbegBSy.js"></script>
7
7
  <link rel="stylesheet" crossorigin href="/static/main-hpuWh67r.css">
8
8
  </head>
9
9
  <body>
@@ -1 +1 @@
1
- var v=Object.defineProperty;var p=(e,o)=>v(e,"name",{value:o,configurable:!0});import{N as g,V as w,c as r,f as a,o as t,a as C,h as B,e as T,g as b,t as s,n as i,i as $,j as m,F as k,k as z,w as R,b as H}from"./main-CFEGvCly.js";var M=Object.getOwnPropertyDescriptor,O=p((e,o,y,f)=>{for(var d=f>1?void 0:f?M(o,y):o,u=e.length-1,n;u>=0;u--)(n=e[u])&&(d=n(d)||d);return d},"__decorateClass"),l;let h=(l=class extends g{},p(l,"Button"),l);h=O([w],h);const S=["title","data-theme","data-offset","data-placement"],W=["title","data-theme","data-offset","data-placement","disabled","type"],V=["innerHTML"],A=["innerHTML"],D=["href"],F=["href"];function I(e,o,y,f,d,u){return e.showButton?(t(),r("div",{key:0,class:i(["d-inline-block relative whitespace-nowrap",{h24px:e.size=="sm",h34px:e.size=="md","min-h40px":e.size=="lg"}]),title:e.disabled?e.disabledTitle:"","data-theme":e.dataThemeInner,"data-offset":e.dataOffset,"data-placement":e.dataPlacement},[C("button",{class:i(["relative w100% h100% flex! items-center! justify-center!",{shine:e.shine,[e.randomClass+(e.isOnHover?" hover":"")]:!0,"py10px px8px":e.size=="sm","py10px px13px":e.size=="md","py10px px18px":e.size=="lg"}]),title:e.disabled?"":e.innerTitle,"data-theme":e.dataThemeInner,"data-offset":e.dataOffset,"data-placement":e.dataPlacement,onMouseover:o[0]||(o[0]=n=>e.isOnHover=!0),onMouseout:o[1]||(o[1]=n=>e.isOnHover=!1),onTouchstart:o[2]||(o[2]=(...n)=>e.touchstart&&e.touchstart(...n)),onTouchend:o[3]||(o[3]=(...n)=>e.touchend&&e.touchend(...n)),onMouseup:o[4]||(o[4]=(...n)=>e.mouseup&&e.mouseup(...n)),onMousedown:o[5]||(o[5]=(...n)=>e.mousedown&&e.mousedown(...n)),onKeydown:o[6]||(o[6]=R((...n)=>e.keydownEnter&&e.keydownEnter(...n),["enter"])),onMouseleave:o[7]||(o[7]=n=>e.isButtonActive=!1),disabled:e.disabled,type:e.type,style:b({fontSize:e.size=="sm"?"0.75rem":e.fontSize,fontFamily:e.fontFamily,borderRadius:e.borderRadius,width:e.width,...e.style}),ref:"button"},[e.badge?(t(),r("div",{key:0,class:"absolute right--9px top--9px bg-lightblue-400 fw-bold rounded-full z-3 px7px",style:b({background:e.badgeBg??void 0,color:e.badgeColor??"#ffffff"})},s(e.badge),5)):a("",!0),e.icon?(t(),r("span",{key:1,class:i(["left-icon-animate",e.$slots.default&&e.$refs?.button?.innerText?.trim?.()?.length?"left-icon":""])},[e.icon?.startsWith("<")?(t(),r("div",{key:0,innerHTML:e.icon},null,8,V)):(t(),r("i",{key:1,class:i(["fa",e.icon])},null,2))],2)):a("",!0),B(e.$slots,"default",{},void 0,!0),e.iconRight?(t(),r("span",{key:2,class:i(["right-icon-animate",e.$slots.default&&e.$refs?.button?.innerText?.trim?.()?.length?"right-icon":""])},[e.iconRight?.startsWith("<")?(t(),r("div",{key:0,innerHTML:e.iconRight},null,8,A)):(t(),r("i",{key:1,class:i(["fa",e.iconRight])},null,2))],2)):a("",!0),(t(),T(z("style"),null,{default:$(()=>[m("."+s(e.randomClass)+" { background: "+s(e.style?.bacground??e.currentBg+"!important")+"; box-shadow: none !important; color: "+s(e.currentColor)+" !important; border-color: "+s(e.currentBorderColor)+" !important; }",1),e.currentColorHover?(t(),r(k,{key:0},[m("."+s(e.randomClass)+":hover { color: "+s(e.style?.color??e.currentColorHover+"!important")+"; }",1)],64)):a("",!0),e.disabled?a("",!0):(t(),r(k,{key:1},[m("."+s(e.randomClass)+":active { background: "+s(e.currentBgActive)+" !important; border-color: "+s(e.currentBorderColorActive)+" !important; color: "+s(e.currentColorActive)+" !important; opacity: 1 !important; "+s(e.boxShadowCss)+" !important; }",1)],64))]),_:1})),e.link&&e.link?.startsWith("http")||e.link?.startsWith("//")?(t(),r("a",{key:3,class:"d-none",ref:"link",href:e.link,target:"_blank"}," ",8,D)):!e.link&&e.linkRevert&&!e.linkRevert?.startsWith("http")&&!e.linkRevert?.startsWith("//")?(t(),r("a",{key:4,class:"d-none",ref:"link",href:e.linkRevert,target:"_blank"}," ",8,F)):a("",!0)],46,W)],10,S)):a("",!0)}p(I,"render");const P=H(h,[["render",I],["__scopeId","data-v-4053962d"]]);export{P as default};
1
+ var v=Object.defineProperty;var p=(e,o)=>v(e,"name",{value:o,configurable:!0});import{N as g,V as w,c as r,f as a,o as t,a as C,h as B,e as T,g as b,t as s,n as i,i as $,j as m,F as k,k as z,w as R,b as H}from"./main-BSbegBSy.js";var M=Object.getOwnPropertyDescriptor,O=p((e,o,y,f)=>{for(var d=f>1?void 0:f?M(o,y):o,u=e.length-1,n;u>=0;u--)(n=e[u])&&(d=n(d)||d);return d},"__decorateClass"),l;let h=(l=class extends g{},p(l,"Button"),l);h=O([w],h);const S=["title","data-theme","data-offset","data-placement"],W=["title","data-theme","data-offset","data-placement","disabled","type"],V=["innerHTML"],A=["innerHTML"],D=["href"],F=["href"];function I(e,o,y,f,d,u){return e.showButton?(t(),r("div",{key:0,class:i(["d-inline-block relative whitespace-nowrap",{h24px:e.size=="sm",h34px:e.size=="md","min-h40px":e.size=="lg"}]),title:e.disabled?e.disabledTitle:"","data-theme":e.dataThemeInner,"data-offset":e.dataOffset,"data-placement":e.dataPlacement},[C("button",{class:i(["relative w100% h100% flex! items-center! justify-center!",{shine:e.shine,[e.randomClass+(e.isOnHover?" hover":"")]:!0,"py10px px8px":e.size=="sm","py10px px13px":e.size=="md","py10px px18px":e.size=="lg"}]),title:e.disabled?"":e.innerTitle,"data-theme":e.dataThemeInner,"data-offset":e.dataOffset,"data-placement":e.dataPlacement,onMouseover:o[0]||(o[0]=n=>e.isOnHover=!0),onMouseout:o[1]||(o[1]=n=>e.isOnHover=!1),onTouchstart:o[2]||(o[2]=(...n)=>e.touchstart&&e.touchstart(...n)),onTouchend:o[3]||(o[3]=(...n)=>e.touchend&&e.touchend(...n)),onMouseup:o[4]||(o[4]=(...n)=>e.mouseup&&e.mouseup(...n)),onMousedown:o[5]||(o[5]=(...n)=>e.mousedown&&e.mousedown(...n)),onKeydown:o[6]||(o[6]=R((...n)=>e.keydownEnter&&e.keydownEnter(...n),["enter"])),onMouseleave:o[7]||(o[7]=n=>e.isButtonActive=!1),disabled:e.disabled,type:e.type,style:b({fontSize:e.size=="sm"?"0.75rem":e.fontSize,fontFamily:e.fontFamily,borderRadius:e.borderRadius,width:e.width,...e.style}),ref:"button"},[e.badge?(t(),r("div",{key:0,class:"absolute right--9px top--9px bg-lightblue-400 fw-bold rounded-full z-3 px7px",style:b({background:e.badgeBg??void 0,color:e.badgeColor??"#ffffff"})},s(e.badge),5)):a("",!0),e.icon?(t(),r("span",{key:1,class:i(["left-icon-animate",e.$slots.default&&e.$refs?.button?.innerText?.trim?.()?.length?"left-icon":""])},[e.icon?.startsWith("<")?(t(),r("div",{key:0,innerHTML:e.icon},null,8,V)):(t(),r("i",{key:1,class:i(["fa",e.icon])},null,2))],2)):a("",!0),B(e.$slots,"default",{},void 0,!0),e.iconRight?(t(),r("span",{key:2,class:i(["right-icon-animate",e.$slots.default&&e.$refs?.button?.innerText?.trim?.()?.length?"right-icon":""])},[e.iconRight?.startsWith("<")?(t(),r("div",{key:0,innerHTML:e.iconRight},null,8,A)):(t(),r("i",{key:1,class:i(["fa",e.iconRight])},null,2))],2)):a("",!0),(t(),T(z("style"),null,{default:$(()=>[m("."+s(e.randomClass)+" { background: "+s(e.style?.bacground??e.currentBg+"!important")+"; box-shadow: none !important; color: "+s(e.currentColor)+" !important; border-color: "+s(e.currentBorderColor)+" !important; }",1),e.currentColorHover?(t(),r(k,{key:0},[m("."+s(e.randomClass)+":hover { color: "+s(e.style?.color??e.currentColorHover+"!important")+"; }",1)],64)):a("",!0),e.disabled?a("",!0):(t(),r(k,{key:1},[m("."+s(e.randomClass)+":active { background: "+s(e.currentBgActive)+" !important; border-color: "+s(e.currentBorderColorActive)+" !important; color: "+s(e.currentColorActive)+" !important; opacity: 1 !important; "+s(e.boxShadowCss)+" !important; }",1)],64))]),_:1})),e.link&&e.link?.startsWith("http")||e.link?.startsWith("//")?(t(),r("a",{key:3,class:"d-none",ref:"link",href:e.link,target:"_blank"}," ",8,D)):!e.link&&e.linkRevert&&!e.linkRevert?.startsWith("http")&&!e.linkRevert?.startsWith("//")?(t(),r("a",{key:4,class:"d-none",ref:"link",href:e.linkRevert,target:"_blank"}," ",8,F)):a("",!0)],46,W)],10,S)):a("",!0)}p(I,"render");const P=H(h,[["render",I],["__scopeId","data-v-4053962d"]]);export{P as default};