@validol4ik/uikit 0.3.29 → 0.3.31

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.
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),a=require("./QNoSsr-DIrrSzFf.cjs"),i=require("./index-DMWwOLS3.cjs");function u(n){const e=document.createElement("textarea");e.value=n,e.contentEditable="true",e.style.position="fixed";const t=()=>{};a.addFocusout(t),document.body.appendChild(e),e.focus(),e.select();const c=document.execCommand("copy");return e.remove(),a.removeFocusout(t),c}function d(n){return navigator.clipboard!==void 0?navigator.clipboard.writeText(n):new Promise((e,t)=>{const c=u(n);c?e(!0):t(c)})}const r={COPY:"copy_o",COPIED:"copied_o"},p=o.defineComponent({__name:"AppButtonCopy",props:{text:{},size:{},transparent:{type:Boolean,default:!0},flat:{type:Boolean},rounded:{type:Boolean},color:{default:i.COLORS.INFO},iconLeft:{},iconRight:{},iconMiddle:{},disabled:{type:Boolean},loading:{type:Boolean},to:{},href:{},target:{},submit:{type:Boolean},ariaLabel:{},label:{}},setup(n){const e=n,t=o.ref(r.COPY),c=()=>{t.value=r.COPIED,setTimeout(()=>{t.value=r.COPY},2e3)},s=()=>{d(e.text).then(c).catch(l=>{console.log(l)})};return(l,f)=>(o.openBlock(),o.createBlock(o.unref(a.QNoSsr),null,{default:o.withCtx(()=>[o.createVNode(i.AppButton,o.mergeProps(e,{"icon-middle":t.value,onClick:o.withModifiers(s,["prevent"])}),null,16,["icon-middle"])]),_:1}))}});exports.default=p;
@@ -1,25 +1,25 @@
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 { A as C, C as y } from "./index-Ccvx5Q-3.js";
4
- function b(t) {
1
+ import { defineComponent as l, ref as i, openBlock as s, createBlock as p, unref as u, withCtx as d, createVNode as m, mergeProps as f, withModifiers as C } from "vue";
2
+ import { r as y, a as b, Q as v } from "./QNoSsr-B6NOqbLV.js";
3
+ import { A as B, C as O } from "./index-VwoDHcYO.js";
4
+ function _(t) {
5
5
  const e = document.createElement("textarea");
6
6
  e.value = t, e.contentEditable = "true", e.style.position = "fixed";
7
7
  const o = () => {
8
8
  };
9
- f(o), document.body.appendChild(e), e.focus(), e.select();
9
+ b(o), document.body.appendChild(e), e.focus(), e.select();
10
10
  const n = document.execCommand("copy");
11
- return e.remove(), m(o), n;
11
+ return e.remove(), y(o), n;
12
12
  }
13
- function v(t) {
13
+ function h(t) {
14
14
  return navigator.clipboard !== void 0 ? navigator.clipboard.writeText(t) : new Promise((e, o) => {
15
- const n = b(t);
15
+ const n = _(t);
16
16
  n ? e(!0) : o(n);
17
17
  });
18
18
  }
19
19
  const a = {
20
20
  COPY: "copy_o",
21
21
  COPIED: "copied_o"
22
- }, x = /* @__PURE__ */ i({
22
+ }, I = /* @__PURE__ */ l({
23
23
  __name: "AppButtonCopy",
24
24
  props: {
25
25
  text: {},
@@ -27,7 +27,7 @@ const a = {
27
27
  transparent: { type: Boolean, default: !0 },
28
28
  flat: { type: Boolean },
29
29
  rounded: { type: Boolean },
30
- color: { default: y.INFO },
30
+ color: { default: O.INFO },
31
31
  iconLeft: {},
32
32
  iconRight: {},
33
33
  iconMiddle: {},
@@ -41,21 +41,26 @@ const a = {
41
41
  label: {}
42
42
  },
43
43
  setup(t) {
44
- const e = t, o = l(a.COPY), n = () => {
44
+ const e = t, o = i(a.COPY), n = () => {
45
45
  o.value = a.COPIED, setTimeout(() => {
46
46
  o.value = a.COPY;
47
47
  }, 2e3);
48
48
  }, r = () => {
49
- v(e.text).then(n).catch((c) => {
49
+ h(e.text).then(n).catch((c) => {
50
50
  console.log(c);
51
51
  });
52
52
  };
53
- return (c, B) => (s(), p(C, d(e, {
54
- "icon-middle": o.value,
55
- onClick: u(r, ["prevent"])
56
- }), null, 16, ["icon-middle"]));
53
+ return (c, x) => (s(), p(u(v), null, {
54
+ default: d(() => [
55
+ m(B, f(e, {
56
+ "icon-middle": o.value,
57
+ onClick: C(r, ["prevent"])
58
+ }), null, 16, ["icon-middle"])
59
+ ]),
60
+ _: 1
61
+ }));
57
62
  }
58
63
  });
59
64
  export {
60
- x as default
65
+ I as default
61
66
  };