@validol4ik/uikit 0.3.24 → 0.3.25
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/types/boot.d.ts +0 -2
- package/dist/types/index.d.ts +6 -0
- package/dist/types/plugin.d.ts +0 -5
- package/dist/uikit.cjs +1 -1
- package/dist/uikit.es.js +4443 -5
- package/package.json +1 -1
- package/dist/AppButton-Bz5mz9Mx.cjs +0 -1
- package/dist/AppButton-DGne1Zdn.js +0 -390
- package/dist/AppButtonCopy-CWQXqXtn.js +0 -62
- package/dist/AppButtonCopy-Vyc1hnYD.cjs +0 -1
- package/dist/AppIcon-Bupq345T.js +0 -19
- package/dist/AppIcon-CZ4SweU2.cjs +0 -1
- package/dist/AppSelect-DVxNpiFx.cjs +0 -1
- package/dist/AppSelect-DWfwIpXY.js +0 -3327
- package/dist/_plugin-vue_export-helper-BHFhmbuH.cjs +0 -1
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
- package/dist/boot/boot.cjs +0 -1
- package/dist/boot/boot.es.js +0 -7
- package/dist/components-C9kjME7-.js +0 -16
- package/dist/components-TUA38xWT.cjs +0 -1
- package/dist/focusout-DjvPXP_b.js +0 -135
- package/dist/focusout-DzWGke-4.cjs +0 -1
- package/dist/plugin/plugin.cjs +0 -1
- package/dist/plugin/plugin.es.js +0 -9
- package/dist/types/components/components.d.ts +0 -49
- package/dist/types/uikit.d.ts +0 -1
- package/dist/use-router-link-BgNwCOFX.js +0 -576
- package/dist/use-router-link-DiPB_4Ct.cjs +0 -1
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),a=require("./use-router-link-DiPB_4Ct.cjs"),N=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Z={[a.SIZES.SM]:"3px 9px",[a.SIZES.MD]:"5px 12px",[a.SIZES.LG]:"9px 20px"},$={left:"start",center:"center",right:"end",between:"between",around:"around",evenly:"evenly",stretch:"stretch"},K=Object.keys($),V={align:{type:String,validator:e=>K.includes(e)}};function Q(e){return t.computed(()=>{const o=e.align===void 0?e.vertical===!0?"stretch":"left":e.align;return`${e.vertical===!0?"items":"justify"}-${$[o]}`})}const w={none:0,xs:4,sm:8,md:16,lg:24,xl:32},W={xs:8,sm:10,md:14,lg:20,xl:24},F=["button","submit","reset"],G=/[^\s]\/[^\s]/,H=["flat","outline","push","unelevated"];function U(e,o){return e.flat===!0?"flat":e.outline===!0?"outline":e.push===!0?"push":e.unelevated===!0?"unelevated":o}const X={...a.useSizeProps,...a.useRouterLinkNonMatchingProps,type:{type:String,default:"button"},label:[Number,String],icon:String,iconRight:String,...H.reduce((e,o)=>(e[o]=Boolean)&&e,{}),square:Boolean,rounded:Boolean,glossy:Boolean,size:String,fab:Boolean,fabMini:Boolean,padding:String,color:String,textColor:String,noCaps:Boolean,noWrap:Boolean,dense:Boolean,tabindex:[Number,String],ripple:{type:[Boolean,Object],default:!0},align:{...V.align,default:"center"},stack:Boolean,stretch:Boolean,loading:{type:Boolean,default:null},disable:Boolean},Y={...X,round:Boolean};function J(e){const o=a.useSize(e,W),f=Q(e),{hasRouterLink:u,hasLink:b,linkTag:g,linkAttrs:C,navigateOnClick:P}=a.useRouterLink({fallbackTag:"button"}),M=t.computed(()=>{const i=e.fab===!1&&e.fabMini===!1?o.value:{};return e.padding!==void 0?Object.assign({},i,{padding:e.padding.split(/\s+/).map(v=>v in w?w[v]+"px":v).join(" "),minWidth:"0",minHeight:"0"}):i}),R=t.computed(()=>e.rounded===!0||e.fab===!0||e.fabMini===!0),k=t.computed(()=>e.disable!==!0&&e.loading!==!0),E=t.computed(()=>k.value===!0?e.tabindex||0:-1),l=t.computed(()=>U(e,"standard")),q=t.computed(()=>{const i={tabindex:E.value};return b.value===!0?Object.assign(i,C.value):F.includes(e.type)===!0&&(i.type=e.type),g.value==="a"?(e.disable===!0?i["aria-disabled"]="true":i.href===void 0&&(i.role="button"),u.value!==!0&&G.test(e.type)===!0&&(i.type=e.type)):e.disable===!0&&(i.disabled="",i["aria-disabled"]="true"),e.loading===!0&&e.percentage!==void 0&&Object.assign(i,{role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":e.percentage}),i}),d=t.computed(()=>{let i;e.color!==void 0?e.flat===!0||e.outline===!0?i=`text-${e.textColor||e.color}`:i=`bg-${e.color} text-${e.textColor||"white"}`:e.textColor&&(i=`text-${e.textColor}`);const v=e.round===!0?"round":`rectangle${R.value===!0?" q-btn--rounded":e.square===!0?" q-btn--square":""}`;return`q-btn--${l.value} q-btn--${v}`+(i!==void 0?" "+i:"")+(k.value===!0?" q-btn--actionable q-focusable q-hoverable":e.disable===!0?" disabled":"")+(e.fab===!0?" q-btn--fab":e.fabMini===!0?" q-btn--fab-mini":"")+(e.noCaps===!0?" q-btn--no-uppercase":"")+(e.dense===!0?" q-btn--dense":"")+(e.stretch===!0?" no-border-radius self-stretch":"")+(e.glossy===!0?" glossy":"")+(e.square?" q-btn--square":"")}),p=t.computed(()=>f.value+(e.stack===!0?" column":" row")+(e.noWrap===!0?" no-wrap text-no-wrap":"")+(e.loading===!0?" q-btn__content--hidden":""));return{classes:d,style:M,innerClasses:p,attributes:q,hasLink:b,linkTag:g,navigateOnClick:P,isActionable:k}}const{passiveCapture:s}=a.listenOpts;let m=null,h=null,y=null;const ee=a.createComponent({name:"QBtn",props:{...Y,percentage:Number,darkPercentage:Boolean,onTouchstart:[Function,Array]},emits:["click","keydown","mousedown","keyup"],setup(e,{slots:o,emit:f}){const{proxy:u}=t.getCurrentInstance(),{classes:b,style:g,innerClasses:C,attributes:P,hasLink:M,linkTag:R,navigateOnClick:k,isActionable:E}=J(e),l=t.ref(null),q=t.ref(null);let d=null,p,i=null;const v=t.computed(()=>e.label!==void 0&&e.label!==null&&e.label!==""),x=t.computed(()=>e.disable===!0||e.ripple===!1?!1:{keyCodes:M.value===!0?[13,32]:[13],...e.ripple===!0?{}:e.ripple}),A=t.computed(()=>({center:e.round})),I=t.computed(()=>{const n=Math.max(0,Math.min(100,e.percentage));return n>0?{transition:"transform 0.6s",transform:`translateX(${n-100}%)`}:{}}),z=t.computed(()=>{if(e.loading===!0)return{onMousedown:B,onTouchstart:B,onClick:B,onKeydown:B,onKeyup:B};if(E.value===!0){const n={onClick:T,onKeydown:_,onMousedown:D};if(u.$q.platform.has.touch===!0){const r=e.onTouchstart!==void 0?"":"Passive";n[`onTouchstart${r}`]=j}return n}return{onClick:a.stopAndPrevent}}),O=t.computed(()=>({ref:l,class:"q-btn q-btn-item non-selectable no-outline "+b.value,style:g.value,...P.value,...z.value}));function T(n){if(l.value!==null){if(n!==void 0){if(n.defaultPrevented===!0)return;const r=document.activeElement;if(e.type==="submit"&&r!==document.body&&l.value.contains(r)===!1&&r.contains(l.value)===!1){l.value.focus();const L=()=>{document.removeEventListener("keydown",a.stopAndPrevent,!0),document.removeEventListener("keyup",L,s),l.value!==null&&l.value.removeEventListener("blur",L,s)};document.addEventListener("keydown",a.stopAndPrevent,!0),document.addEventListener("keyup",L,s),l.value.addEventListener("blur",L,s)}}k(n)}}function _(n){l.value!==null&&(f("keydown",n),a.isKeyCode(n,[13,32])===!0&&h!==l.value&&(h!==null&&S(),n.defaultPrevented!==!0&&(l.value.focus(),h=l.value,l.value.classList.add("q-btn--active"),document.addEventListener("keyup",c,!0),l.value.addEventListener("blur",c,s)),a.stopAndPrevent(n)))}function j(n){l.value!==null&&(f("touchstart",n),n.defaultPrevented!==!0&&(m!==l.value&&(m!==null&&S(),m=l.value,d=n.target,d.addEventListener("touchcancel",c,s),d.addEventListener("touchend",c,s)),p=!0,i!==null&&clearTimeout(i),i=setTimeout(()=>{i=null,p=!1},200)))}function D(n){l.value!==null&&(n.qSkipRipple=p===!0,f("mousedown",n),n.defaultPrevented!==!0&&y!==l.value&&(y!==null&&S(),y=l.value,l.value.classList.add("q-btn--active"),document.addEventListener("mouseup",c,s)))}function c(n){if(l.value!==null&&!(n!==void 0&&n.type==="blur"&&document.activeElement===l.value)){if(n!==void 0&&n.type==="keyup"){if(h===l.value&&a.isKeyCode(n,[13,32])===!0){const r=new MouseEvent("click",n);r.qKeyEvent=!0,n.defaultPrevented===!0&&a.prevent(r),n.cancelBubble===!0&&a.stop(r),l.value.dispatchEvent(r),a.stopAndPrevent(n),n.qKeyEvent=!0}f("keyup",n)}S()}}function S(n){const r=q.value;n!==!0&&(m===l.value||y===l.value)&&r!==null&&r!==document.activeElement&&(r.setAttribute("tabindex",-1),r.focus()),m===l.value&&(d!==null&&(d.removeEventListener("touchcancel",c,s),d.removeEventListener("touchend",c,s)),m=d=null),y===l.value&&(document.removeEventListener("mouseup",c,s),y=null),h===l.value&&(document.removeEventListener("keyup",c,!0),l.value!==null&&l.value.removeEventListener("blur",c,s),h=null),l.value!==null&&l.value.classList.remove("q-btn--active")}function B(n){a.stopAndPrevent(n),n.qSkipRipple=!0}return t.onBeforeUnmount(()=>{S(!0)}),Object.assign(u,{click:n=>{E.value===!0&&T(n)}}),()=>{let n=[];e.icon!==void 0&&n.push(t.h(a.QIcon,{name:e.icon,left:e.stack!==!0&&v.value===!0,role:"img"})),v.value===!0&&n.push(t.h("span",{class:"block"},[e.label])),n=a.hMergeSlot(o.default,n),e.iconRight!==void 0&&e.round===!1&&n.push(t.h(a.QIcon,{name:e.iconRight,right:e.stack!==!0&&v.value===!0,role:"img"}));const r=[t.h("span",{class:"q-focus-helper",ref:q})];return e.loading===!0&&e.percentage!==void 0&&r.push(t.h("span",{class:"q-btn__progress absolute-full overflow-hidden"+(e.darkPercentage===!0?" q-btn__progress--dark":"")},[t.h("span",{class:"q-btn__progress-indicator fit block",style:I.value})])),r.push(t.h("span",{class:"q-btn__content text-center col items-center q-anchor--skip "+C.value},n)),e.loading!==null&&r.push(t.h(t.Transition,{name:"q-transition--fade"},()=>e.loading===!0?[t.h("span",{key:"loading",class:"absolute-full flex flex-center"},o.loading!==void 0?o.loading():[t.h(a.QSpinner)])]:null)),t.withDirectives(t.h(R.value,O.value,r),[[a.Ripple,x.value,void 0,A.value]])}}}),te=t.defineComponent({__name:"AppButton",props:{size:{default:a.SIZES.MD},transparent:{type:Boolean},flat:{type:Boolean},rounded:{type:Boolean},color:{default:a.COLORS.PRIMARY},iconLeft:{},iconRight:{},iconMiddle:{},disabled:{type:Boolean},loading:{type:Boolean},to:{},href:{},target:{},submit:{type:Boolean},ariaLabel:{},label:{}},emits:["click"],setup(e){const o=e,f=t.computed(()=>["app-btn",{"app-btn_default":!o.transparent&&!o.flat,"app-btn_trans":o.transparent,"app-btn_flat":o.flat,"app-btn_rounded":o.rounded,"app-btn_sm":o.size===a.SIZES.SM,"app-btn_md":o.size===a.SIZES.MD,"app-btn_lg":o.size===a.SIZES.LG,"app-btn_icon-left":o.iconLeft,"app-btn_icon-right":o.iconRight,"app-btn_icon-middle":o.iconMiddle},`app-btn_${o.color}`]);return(u,b)=>(t.openBlock(),t.createBlock(t.unref(ee),{"no-caps":"",unelevated:"",class:t.normalizeClass(f.value),padding:t.unref(Z)[u.size||t.unref(a.SIZES).MD],loading:u.loading,disable:u.disabled||void 0,to:u.to,href:u.href,target:u.target,type:u.submit?"submit":void 0,"aria-label":u.ariaLabel,onClick:b[0]||(b[0]=g=>u.$emit("click",g))},{default:t.withCtx(()=>[u.iconLeft||u.iconMiddle?(t.openBlock(),t.createElementBlock("i",{key:0,class:t.normalizeClass(["icon-kl",u.iconLeft?"icon-kl_left":"icon-kl_middle",`icon-kl-${u.iconLeft||u.iconMiddle}`,u.transparent||u.flat?`text-${u.color}`:"text-secondary"])},null,2)):t.createCommentVNode("",!0),t.renderSlot(u.$slots,"default",{},void 0,!0),u.label?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode(t.toDisplayString(u.label),1)],64)):t.createCommentVNode("",!0),u.iconRight?(t.openBlock(),t.createElementBlock("i",{key:2,class:t.normalizeClass(["icon-kl","icon-kl_right",`icon-kl-${u.iconRight}`,u.transparent?`text-${u.color}`:"text-secondary"])},null,2)):t.createCommentVNode("",!0)]),_:3},8,["class","padding","loading","disable","to","href","target","type","aria-label"]))}}),ne=N._export_sfc(te,[["__scopeId","data-v-64785508"]]);exports.default=ne;
|
|
@@ -1,390 +0,0 @@
|
|
|
1
|
-
import { computed as o, getCurrentInstance as Y, ref as j, onBeforeUnmount as Z, h as s, Transition as J, withDirectives as ee, defineComponent as te, openBlock as R, createBlock as ne, unref as x, normalizeClass as O, withCtx as ae, createElementBlock as z, createCommentVNode as A, renderSlot as le, Fragment as ue, createTextVNode as ie, toDisplayString as oe } from "vue";
|
|
2
|
-
import { S as b, u as re, a as se, b as ce, c as de, d as fe, s as h, i as D, p as ve, e as be, l as ge, Q as I, h as me, f as he, R as ye, C as ke } from "./use-router-link-BgNwCOFX.js";
|
|
3
|
-
import { _ as Be } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
|
-
const Le = {
|
|
5
|
-
[b.SM]: "3px 9px",
|
|
6
|
-
[b.MD]: "5px 12px",
|
|
7
|
-
[b.LG]: "9px 20px"
|
|
8
|
-
}, N = {
|
|
9
|
-
left: "start",
|
|
10
|
-
center: "center",
|
|
11
|
-
right: "end",
|
|
12
|
-
between: "between",
|
|
13
|
-
around: "around",
|
|
14
|
-
evenly: "evenly",
|
|
15
|
-
stretch: "stretch"
|
|
16
|
-
}, pe = Object.keys(N), qe = {
|
|
17
|
-
align: {
|
|
18
|
-
type: String,
|
|
19
|
-
validator: (e) => pe.includes(e)
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
function Ce(e) {
|
|
23
|
-
return o(() => {
|
|
24
|
-
const l = e.align === void 0 ? e.vertical === !0 ? "stretch" : "left" : e.align;
|
|
25
|
-
return `${e.vertical === !0 ? "items" : "justify"}-${N[l]}`;
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
const K = {
|
|
29
|
-
none: 0,
|
|
30
|
-
xs: 4,
|
|
31
|
-
sm: 8,
|
|
32
|
-
md: 16,
|
|
33
|
-
lg: 24,
|
|
34
|
-
xl: 32
|
|
35
|
-
}, Ee = {
|
|
36
|
-
xs: 8,
|
|
37
|
-
sm: 10,
|
|
38
|
-
md: 14,
|
|
39
|
-
lg: 20,
|
|
40
|
-
xl: 24
|
|
41
|
-
}, Se = ["button", "submit", "reset"], Me = /[^\s]\/[^\s]/, Re = ["flat", "outline", "push", "unelevated"];
|
|
42
|
-
function Te(e, l) {
|
|
43
|
-
return e.flat === !0 ? "flat" : e.outline === !0 ? "outline" : e.push === !0 ? "push" : e.unelevated === !0 ? "unelevated" : l;
|
|
44
|
-
}
|
|
45
|
-
const we = {
|
|
46
|
-
...de,
|
|
47
|
-
...ce,
|
|
48
|
-
type: {
|
|
49
|
-
type: String,
|
|
50
|
-
default: "button"
|
|
51
|
-
},
|
|
52
|
-
label: [Number, String],
|
|
53
|
-
icon: String,
|
|
54
|
-
iconRight: String,
|
|
55
|
-
...Re.reduce(
|
|
56
|
-
(e, l) => (e[l] = Boolean) && e,
|
|
57
|
-
{}
|
|
58
|
-
),
|
|
59
|
-
square: Boolean,
|
|
60
|
-
rounded: Boolean,
|
|
61
|
-
glossy: Boolean,
|
|
62
|
-
size: String,
|
|
63
|
-
fab: Boolean,
|
|
64
|
-
fabMini: Boolean,
|
|
65
|
-
padding: String,
|
|
66
|
-
color: String,
|
|
67
|
-
textColor: String,
|
|
68
|
-
noCaps: Boolean,
|
|
69
|
-
noWrap: Boolean,
|
|
70
|
-
dense: Boolean,
|
|
71
|
-
tabindex: [Number, String],
|
|
72
|
-
ripple: {
|
|
73
|
-
type: [Boolean, Object],
|
|
74
|
-
default: !0
|
|
75
|
-
},
|
|
76
|
-
align: {
|
|
77
|
-
...qe.align,
|
|
78
|
-
default: "center"
|
|
79
|
-
},
|
|
80
|
-
stack: Boolean,
|
|
81
|
-
stretch: Boolean,
|
|
82
|
-
loading: {
|
|
83
|
-
type: Boolean,
|
|
84
|
-
default: null
|
|
85
|
-
},
|
|
86
|
-
disable: Boolean
|
|
87
|
-
}, Pe = {
|
|
88
|
-
...we,
|
|
89
|
-
round: Boolean
|
|
90
|
-
};
|
|
91
|
-
function $e(e) {
|
|
92
|
-
const l = re(e, Ee), v = Ce(e), { hasRouterLink: a, hasLink: g, linkTag: m, linkAttrs: T, navigateOnClick: w } = se({
|
|
93
|
-
fallbackTag: "button"
|
|
94
|
-
}), P = o(() => {
|
|
95
|
-
const u = e.fab === !1 && e.fabMini === !1 ? l.value : {};
|
|
96
|
-
return e.padding !== void 0 ? Object.assign({}, u, {
|
|
97
|
-
padding: e.padding.split(/\s+/).map((f) => f in K ? K[f] + "px" : f).join(" "),
|
|
98
|
-
minWidth: "0",
|
|
99
|
-
minHeight: "0"
|
|
100
|
-
}) : u;
|
|
101
|
-
}), $ = o(
|
|
102
|
-
() => e.rounded === !0 || e.fab === !0 || e.fabMini === !0
|
|
103
|
-
), L = o(
|
|
104
|
-
() => e.disable !== !0 && e.loading !== !0
|
|
105
|
-
), E = o(() => L.value === !0 ? e.tabindex || 0 : -1), n = o(() => Te(e, "standard")), S = o(() => {
|
|
106
|
-
const u = { tabindex: E.value };
|
|
107
|
-
return g.value === !0 ? Object.assign(u, T.value) : Se.includes(e.type) === !0 && (u.type = e.type), m.value === "a" ? (e.disable === !0 ? u["aria-disabled"] = "true" : u.href === void 0 && (u.role = "button"), a.value !== !0 && Me.test(e.type) === !0 && (u.type = e.type)) : e.disable === !0 && (u.disabled = "", u["aria-disabled"] = "true"), e.loading === !0 && e.percentage !== void 0 && Object.assign(u, {
|
|
108
|
-
role: "progressbar",
|
|
109
|
-
"aria-valuemin": 0,
|
|
110
|
-
"aria-valuemax": 100,
|
|
111
|
-
"aria-valuenow": e.percentage
|
|
112
|
-
}), u;
|
|
113
|
-
}), d = o(() => {
|
|
114
|
-
let u;
|
|
115
|
-
e.color !== void 0 ? e.flat === !0 || e.outline === !0 ? u = `text-${e.textColor || e.color}` : u = `bg-${e.color} text-${e.textColor || "white"}` : e.textColor && (u = `text-${e.textColor}`);
|
|
116
|
-
const f = e.round === !0 ? "round" : `rectangle${$.value === !0 ? " q-btn--rounded" : e.square === !0 ? " q-btn--square" : ""}`;
|
|
117
|
-
return `q-btn--${n.value} q-btn--${f}` + (u !== void 0 ? " " + u : "") + (L.value === !0 ? " q-btn--actionable q-focusable q-hoverable" : e.disable === !0 ? " disabled" : "") + (e.fab === !0 ? " q-btn--fab" : e.fabMini === !0 ? " q-btn--fab-mini" : "") + (e.noCaps === !0 ? " q-btn--no-uppercase" : "") + (e.dense === !0 ? " q-btn--dense" : "") + (e.stretch === !0 ? " no-border-radius self-stretch" : "") + (e.glossy === !0 ? " glossy" : "") + (e.square ? " q-btn--square" : "");
|
|
118
|
-
}), p = o(
|
|
119
|
-
() => v.value + (e.stack === !0 ? " column" : " row") + (e.noWrap === !0 ? " no-wrap text-no-wrap" : "") + (e.loading === !0 ? " q-btn__content--hidden" : "")
|
|
120
|
-
);
|
|
121
|
-
return {
|
|
122
|
-
classes: d,
|
|
123
|
-
style: P,
|
|
124
|
-
innerClasses: p,
|
|
125
|
-
attributes: S,
|
|
126
|
-
hasLink: g,
|
|
127
|
-
linkTag: m,
|
|
128
|
-
navigateOnClick: w,
|
|
129
|
-
isActionable: L
|
|
130
|
-
};
|
|
131
|
-
}
|
|
132
|
-
const { passiveCapture: r } = ge;
|
|
133
|
-
let y = null, k = null, B = null;
|
|
134
|
-
const xe = fe({
|
|
135
|
-
name: "QBtn",
|
|
136
|
-
props: {
|
|
137
|
-
...Pe,
|
|
138
|
-
percentage: Number,
|
|
139
|
-
darkPercentage: Boolean,
|
|
140
|
-
onTouchstart: [Function, Array]
|
|
141
|
-
},
|
|
142
|
-
emits: ["click", "keydown", "mousedown", "keyup"],
|
|
143
|
-
setup(e, { slots: l, emit: v }) {
|
|
144
|
-
const { proxy: a } = Y(), {
|
|
145
|
-
classes: g,
|
|
146
|
-
style: m,
|
|
147
|
-
innerClasses: T,
|
|
148
|
-
attributes: w,
|
|
149
|
-
hasLink: P,
|
|
150
|
-
linkTag: $,
|
|
151
|
-
navigateOnClick: L,
|
|
152
|
-
isActionable: E
|
|
153
|
-
} = $e(e), n = j(null), S = j(null);
|
|
154
|
-
let d = null, p, u = null;
|
|
155
|
-
const f = o(
|
|
156
|
-
() => e.label !== void 0 && e.label !== null && e.label !== ""
|
|
157
|
-
), Q = o(() => e.disable === !0 || e.ripple === !1 ? !1 : {
|
|
158
|
-
keyCodes: P.value === !0 ? [13, 32] : [13],
|
|
159
|
-
...e.ripple === !0 ? {} : e.ripple
|
|
160
|
-
}), V = o(() => ({ center: e.round })), W = o(() => {
|
|
161
|
-
const t = Math.max(0, Math.min(100, e.percentage));
|
|
162
|
-
return t > 0 ? { transition: "transform 0.6s", transform: `translateX(${t - 100}%)` } : {};
|
|
163
|
-
}), F = o(() => {
|
|
164
|
-
if (e.loading === !0)
|
|
165
|
-
return {
|
|
166
|
-
onMousedown: C,
|
|
167
|
-
onTouchstart: C,
|
|
168
|
-
onClick: C,
|
|
169
|
-
onKeydown: C,
|
|
170
|
-
onKeyup: C
|
|
171
|
-
};
|
|
172
|
-
if (E.value === !0) {
|
|
173
|
-
const t = {
|
|
174
|
-
onClick: _,
|
|
175
|
-
onKeydown: H,
|
|
176
|
-
onMousedown: X
|
|
177
|
-
};
|
|
178
|
-
if (a.$q.platform.has.touch === !0) {
|
|
179
|
-
const i = e.onTouchstart !== void 0 ? "" : "Passive";
|
|
180
|
-
t[`onTouchstart${i}`] = U;
|
|
181
|
-
}
|
|
182
|
-
return t;
|
|
183
|
-
}
|
|
184
|
-
return {
|
|
185
|
-
// needed; especially for disabled <a> tags
|
|
186
|
-
onClick: h
|
|
187
|
-
};
|
|
188
|
-
}), G = o(() => ({
|
|
189
|
-
ref: n,
|
|
190
|
-
class: "q-btn q-btn-item non-selectable no-outline " + g.value,
|
|
191
|
-
style: m.value,
|
|
192
|
-
...w.value,
|
|
193
|
-
...F.value
|
|
194
|
-
}));
|
|
195
|
-
function _(t) {
|
|
196
|
-
if (n.value !== null) {
|
|
197
|
-
if (t !== void 0) {
|
|
198
|
-
if (t.defaultPrevented === !0)
|
|
199
|
-
return;
|
|
200
|
-
const i = document.activeElement;
|
|
201
|
-
if (e.type === "submit" && i !== document.body && n.value.contains(i) === !1 && i.contains(n.value) === !1) {
|
|
202
|
-
n.value.focus();
|
|
203
|
-
const M = () => {
|
|
204
|
-
document.removeEventListener("keydown", h, !0), document.removeEventListener("keyup", M, r), n.value !== null && n.value.removeEventListener("blur", M, r);
|
|
205
|
-
};
|
|
206
|
-
document.addEventListener("keydown", h, !0), document.addEventListener("keyup", M, r), n.value.addEventListener("blur", M, r);
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
L(t);
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
function H(t) {
|
|
213
|
-
n.value !== null && (v("keydown", t), D(t, [13, 32]) === !0 && k !== n.value && (k !== null && q(), t.defaultPrevented !== !0 && (n.value.focus(), k = n.value, n.value.classList.add("q-btn--active"), document.addEventListener("keyup", c, !0), n.value.addEventListener("blur", c, r)), h(t)));
|
|
214
|
-
}
|
|
215
|
-
function U(t) {
|
|
216
|
-
n.value !== null && (v("touchstart", t), t.defaultPrevented !== !0 && (y !== n.value && (y !== null && q(), y = n.value, d = t.target, d.addEventListener("touchcancel", c, r), d.addEventListener("touchend", c, r)), p = !0, u !== null && clearTimeout(u), u = setTimeout(() => {
|
|
217
|
-
u = null, p = !1;
|
|
218
|
-
}, 200)));
|
|
219
|
-
}
|
|
220
|
-
function X(t) {
|
|
221
|
-
n.value !== null && (t.qSkipRipple = p === !0, v("mousedown", t), t.defaultPrevented !== !0 && B !== n.value && (B !== null && q(), B = n.value, n.value.classList.add("q-btn--active"), document.addEventListener("mouseup", c, r)));
|
|
222
|
-
}
|
|
223
|
-
function c(t) {
|
|
224
|
-
if (n.value !== null && !(t !== void 0 && t.type === "blur" && document.activeElement === n.value)) {
|
|
225
|
-
if (t !== void 0 && t.type === "keyup") {
|
|
226
|
-
if (k === n.value && D(t, [13, 32]) === !0) {
|
|
227
|
-
const i = new MouseEvent("click", t);
|
|
228
|
-
i.qKeyEvent = !0, t.defaultPrevented === !0 && ve(i), t.cancelBubble === !0 && be(i), n.value.dispatchEvent(i), h(t), t.qKeyEvent = !0;
|
|
229
|
-
}
|
|
230
|
-
v("keyup", t);
|
|
231
|
-
}
|
|
232
|
-
q();
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
function q(t) {
|
|
236
|
-
const i = S.value;
|
|
237
|
-
t !== !0 && (y === n.value || B === n.value) && i !== null && i !== document.activeElement && (i.setAttribute("tabindex", -1), i.focus()), y === n.value && (d !== null && (d.removeEventListener("touchcancel", c, r), d.removeEventListener("touchend", c, r)), y = d = null), B === n.value && (document.removeEventListener("mouseup", c, r), B = null), k === n.value && (document.removeEventListener("keyup", c, !0), n.value !== null && n.value.removeEventListener("blur", c, r), k = null), n.value !== null && n.value.classList.remove("q-btn--active");
|
|
238
|
-
}
|
|
239
|
-
function C(t) {
|
|
240
|
-
h(t), t.qSkipRipple = !0;
|
|
241
|
-
}
|
|
242
|
-
return Z(() => {
|
|
243
|
-
q(!0);
|
|
244
|
-
}), Object.assign(a, {
|
|
245
|
-
click: (t) => {
|
|
246
|
-
E.value === !0 && _(t);
|
|
247
|
-
}
|
|
248
|
-
}), () => {
|
|
249
|
-
let t = [];
|
|
250
|
-
e.icon !== void 0 && t.push(
|
|
251
|
-
s(I, {
|
|
252
|
-
name: e.icon,
|
|
253
|
-
left: e.stack !== !0 && f.value === !0,
|
|
254
|
-
role: "img"
|
|
255
|
-
})
|
|
256
|
-
), f.value === !0 && t.push(
|
|
257
|
-
s("span", { class: "block" }, [e.label])
|
|
258
|
-
), t = me(l.default, t), e.iconRight !== void 0 && e.round === !1 && t.push(
|
|
259
|
-
s(I, {
|
|
260
|
-
name: e.iconRight,
|
|
261
|
-
right: e.stack !== !0 && f.value === !0,
|
|
262
|
-
role: "img"
|
|
263
|
-
})
|
|
264
|
-
);
|
|
265
|
-
const i = [
|
|
266
|
-
s("span", {
|
|
267
|
-
class: "q-focus-helper",
|
|
268
|
-
ref: S
|
|
269
|
-
})
|
|
270
|
-
];
|
|
271
|
-
return e.loading === !0 && e.percentage !== void 0 && i.push(
|
|
272
|
-
s("span", {
|
|
273
|
-
class: "q-btn__progress absolute-full overflow-hidden" + (e.darkPercentage === !0 ? " q-btn__progress--dark" : "")
|
|
274
|
-
}, [
|
|
275
|
-
s("span", {
|
|
276
|
-
class: "q-btn__progress-indicator fit block",
|
|
277
|
-
style: W.value
|
|
278
|
-
})
|
|
279
|
-
])
|
|
280
|
-
), i.push(
|
|
281
|
-
s("span", {
|
|
282
|
-
class: "q-btn__content text-center col items-center q-anchor--skip " + T.value
|
|
283
|
-
}, t)
|
|
284
|
-
), e.loading !== null && i.push(
|
|
285
|
-
s(J, {
|
|
286
|
-
name: "q-transition--fade"
|
|
287
|
-
}, () => e.loading === !0 ? [
|
|
288
|
-
s("span", {
|
|
289
|
-
key: "loading",
|
|
290
|
-
class: "absolute-full flex flex-center"
|
|
291
|
-
}, l.loading !== void 0 ? l.loading() : [s(he)])
|
|
292
|
-
] : null)
|
|
293
|
-
), ee(
|
|
294
|
-
s(
|
|
295
|
-
$.value,
|
|
296
|
-
G.value,
|
|
297
|
-
i
|
|
298
|
-
),
|
|
299
|
-
[[
|
|
300
|
-
ye,
|
|
301
|
-
Q.value,
|
|
302
|
-
void 0,
|
|
303
|
-
V.value
|
|
304
|
-
]]
|
|
305
|
-
);
|
|
306
|
-
};
|
|
307
|
-
}
|
|
308
|
-
}), Oe = /* @__PURE__ */ te({
|
|
309
|
-
__name: "AppButton",
|
|
310
|
-
props: {
|
|
311
|
-
size: { default: b.MD },
|
|
312
|
-
transparent: { type: Boolean },
|
|
313
|
-
flat: { type: Boolean },
|
|
314
|
-
rounded: { type: Boolean },
|
|
315
|
-
color: { default: ke.PRIMARY },
|
|
316
|
-
iconLeft: {},
|
|
317
|
-
iconRight: {},
|
|
318
|
-
iconMiddle: {},
|
|
319
|
-
disabled: { type: Boolean },
|
|
320
|
-
loading: { type: Boolean },
|
|
321
|
-
to: {},
|
|
322
|
-
href: {},
|
|
323
|
-
target: {},
|
|
324
|
-
submit: { type: Boolean },
|
|
325
|
-
ariaLabel: {},
|
|
326
|
-
label: {}
|
|
327
|
-
},
|
|
328
|
-
emits: ["click"],
|
|
329
|
-
setup(e) {
|
|
330
|
-
const l = e, v = o(() => [
|
|
331
|
-
"app-btn",
|
|
332
|
-
{
|
|
333
|
-
"app-btn_default": !l.transparent && !l.flat,
|
|
334
|
-
"app-btn_trans": l.transparent,
|
|
335
|
-
"app-btn_flat": l.flat,
|
|
336
|
-
"app-btn_rounded": l.rounded,
|
|
337
|
-
"app-btn_sm": l.size === b.SM,
|
|
338
|
-
"app-btn_md": l.size === b.MD,
|
|
339
|
-
"app-btn_lg": l.size === b.LG,
|
|
340
|
-
"app-btn_icon-left": l.iconLeft,
|
|
341
|
-
"app-btn_icon-right": l.iconRight,
|
|
342
|
-
"app-btn_icon-middle": l.iconMiddle
|
|
343
|
-
},
|
|
344
|
-
`app-btn_${l.color}`
|
|
345
|
-
]);
|
|
346
|
-
return (a, g) => (R(), ne(x(xe), {
|
|
347
|
-
"no-caps": "",
|
|
348
|
-
unelevated: "",
|
|
349
|
-
class: O(v.value),
|
|
350
|
-
padding: x(Le)[a.size || x(b).MD],
|
|
351
|
-
loading: a.loading,
|
|
352
|
-
disable: a.disabled || void 0,
|
|
353
|
-
to: a.to,
|
|
354
|
-
href: a.href,
|
|
355
|
-
target: a.target,
|
|
356
|
-
type: a.submit ? "submit" : void 0,
|
|
357
|
-
"aria-label": a.ariaLabel,
|
|
358
|
-
onClick: g[0] || (g[0] = (m) => a.$emit("click", m))
|
|
359
|
-
}, {
|
|
360
|
-
default: ae(() => [
|
|
361
|
-
a.iconLeft || a.iconMiddle ? (R(), z("i", {
|
|
362
|
-
key: 0,
|
|
363
|
-
class: O([
|
|
364
|
-
"icon-kl",
|
|
365
|
-
a.iconLeft ? "icon-kl_left" : "icon-kl_middle",
|
|
366
|
-
`icon-kl-${a.iconLeft || a.iconMiddle}`,
|
|
367
|
-
a.transparent || a.flat ? `text-${a.color}` : "text-secondary"
|
|
368
|
-
])
|
|
369
|
-
}, null, 2)) : A("", !0),
|
|
370
|
-
le(a.$slots, "default", {}, void 0, !0),
|
|
371
|
-
a.label ? (R(), z(ue, { key: 1 }, [
|
|
372
|
-
ie(oe(a.label), 1)
|
|
373
|
-
], 64)) : A("", !0),
|
|
374
|
-
a.iconRight ? (R(), z("i", {
|
|
375
|
-
key: 2,
|
|
376
|
-
class: O([
|
|
377
|
-
"icon-kl",
|
|
378
|
-
"icon-kl_right",
|
|
379
|
-
`icon-kl-${a.iconRight}`,
|
|
380
|
-
a.transparent ? `text-${a.color}` : "text-secondary"
|
|
381
|
-
])
|
|
382
|
-
}, null, 2)) : A("", !0)
|
|
383
|
-
]),
|
|
384
|
-
_: 3
|
|
385
|
-
}, 8, ["class", "padding", "loading", "disable", "to", "href", "target", "type", "aria-label"]));
|
|
386
|
-
}
|
|
387
|
-
}), je = /* @__PURE__ */ Be(Oe, [["__scopeId", "data-v-64785508"]]);
|
|
388
|
-
export {
|
|
389
|
-
je as default
|
|
390
|
-
};
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { defineComponent as i, ref as l, openBlock as s, createBlock as p, mergeProps as d, withModifiers as u } from "vue";
|
|
2
|
-
import { r as m, a as f } from "./focusout-DjvPXP_b.js";
|
|
3
|
-
import { C } from "./use-router-link-BgNwCOFX.js";
|
|
4
|
-
import y from "./AppButton-DGne1Zdn.js";
|
|
5
|
-
function b(t) {
|
|
6
|
-
const e = document.createElement("textarea");
|
|
7
|
-
e.value = t, e.contentEditable = "true", e.style.position = "fixed";
|
|
8
|
-
const o = () => {
|
|
9
|
-
};
|
|
10
|
-
f(o), document.body.appendChild(e), e.focus(), e.select();
|
|
11
|
-
const n = document.execCommand("copy");
|
|
12
|
-
return e.remove(), m(o), n;
|
|
13
|
-
}
|
|
14
|
-
function v(t) {
|
|
15
|
-
return navigator.clipboard !== void 0 ? navigator.clipboard.writeText(t) : new Promise((e, o) => {
|
|
16
|
-
const n = b(t);
|
|
17
|
-
n ? e(!0) : o(n);
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
const a = {
|
|
21
|
-
COPY: "copy_o",
|
|
22
|
-
COPIED: "copied_o"
|
|
23
|
-
}, P = /* @__PURE__ */ i({
|
|
24
|
-
__name: "AppButtonCopy",
|
|
25
|
-
props: {
|
|
26
|
-
text: {},
|
|
27
|
-
size: {},
|
|
28
|
-
transparent: { type: Boolean, default: !0 },
|
|
29
|
-
flat: { type: Boolean },
|
|
30
|
-
rounded: { type: Boolean },
|
|
31
|
-
color: { default: C.INFO },
|
|
32
|
-
iconLeft: {},
|
|
33
|
-
iconRight: {},
|
|
34
|
-
iconMiddle: {},
|
|
35
|
-
disabled: { type: Boolean },
|
|
36
|
-
loading: { type: Boolean },
|
|
37
|
-
to: {},
|
|
38
|
-
href: {},
|
|
39
|
-
target: {},
|
|
40
|
-
submit: { type: Boolean },
|
|
41
|
-
ariaLabel: {},
|
|
42
|
-
label: {}
|
|
43
|
-
},
|
|
44
|
-
setup(t) {
|
|
45
|
-
const e = t, o = l(a.COPY), n = () => {
|
|
46
|
-
o.value = a.COPIED, setTimeout(() => {
|
|
47
|
-
o.value = a.COPY;
|
|
48
|
-
}, 2e3);
|
|
49
|
-
}, r = () => {
|
|
50
|
-
v(e.text).then(n).catch((c) => {
|
|
51
|
-
console.log(c);
|
|
52
|
-
});
|
|
53
|
-
};
|
|
54
|
-
return (c, B) => (s(), p(y, d(e, {
|
|
55
|
-
"icon-middle": o.value,
|
|
56
|
-
onClick: u(r, ["prevent"])
|
|
57
|
-
}), null, 16, ["icon-middle"]));
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
export {
|
|
61
|
-
P as default
|
|
62
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("vue"),i=require("./focusout-DzWGke-4.cjs"),u=require("./use-router-link-DiPB_4Ct.cjs"),s=require("./AppButton-Bz5mz9Mx.cjs");function d(t){const e=document.createElement("textarea");e.value=t,e.contentEditable="true",e.style.position="fixed";const o=()=>{};i.addFocusout(o),document.body.appendChild(e),e.focus(),e.select();const n=document.execCommand("copy");return e.remove(),i.removeFocusout(o),n}function p(t){return navigator.clipboard!==void 0?navigator.clipboard.writeText(t):new Promise((e,o)=>{const n=d(t);n?e(!0):o(n)})}const r={COPY:"copy_o",COPIED:"copied_o"},f=c.defineComponent({__name:"AppButtonCopy",props:{text:{},size:{},transparent:{type:Boolean,default:!0},flat:{type:Boolean},rounded:{type:Boolean},color:{default:u.COLORS.INFO},iconLeft:{},iconRight:{},iconMiddle:{},disabled:{type:Boolean},loading:{type:Boolean},to:{},href:{},target:{},submit:{type:Boolean},ariaLabel:{},label:{}},setup(t){const e=t,o=c.ref(r.COPY),n=()=>{o.value=r.COPIED,setTimeout(()=>{o.value=r.COPY},2e3)},l=()=>{p(e.text).then(n).catch(a=>{console.log(a)})};return(a,m)=>(c.openBlock(),c.createBlock(s.default,c.mergeProps(e,{"icon-middle":o.value,onClick:c.withModifiers(l,["prevent"])}),null,16,["icon-middle"]))}});exports.default=f;
|
package/dist/AppIcon-Bupq345T.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { defineComponent as e, openBlock as n, createElementBlock as s, normalizeStyle as r, normalizeClass as l } from "vue";
|
|
2
|
-
import { _ as a } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
3
|
-
const c = /* @__PURE__ */ e({
|
|
4
|
-
__name: "AppIcon",
|
|
5
|
-
props: {
|
|
6
|
-
name: {},
|
|
7
|
-
size: {},
|
|
8
|
-
color: {}
|
|
9
|
-
},
|
|
10
|
-
setup(p) {
|
|
11
|
-
return (o, t) => (n(), s("i", {
|
|
12
|
-
class: l(["icon-kl", `icon-kl-${o.name}`, o.color ? `text-${o.color}` : ""]),
|
|
13
|
-
style: r(o.size ? `font-size: ${o.size}` : void 0)
|
|
14
|
-
}, null, 6));
|
|
15
|
-
}
|
|
16
|
-
}), f = /* @__PURE__ */ a(c, [["__scopeId", "data-v-24fca0cf"]]);
|
|
17
|
-
export {
|
|
18
|
-
f as default
|
|
19
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),n=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),r=o.defineComponent({__name:"AppIcon",props:{name:{},size:{},color:{}},setup(s){return(e,t)=>(o.openBlock(),o.createElementBlock("i",{class:o.normalizeClass(["icon-kl",`icon-kl-${e.name}`,e.color?`text-${e.color}`:""]),style:o.normalizeStyle(e.size?`font-size: ${e.size}`:void 0)},null,6))}}),l=n._export_sfc(r,[["__scopeId","data-v-24fca0cf"]]);exports.default=l;
|