@kong-ui-public/misc-widgets 2.2.2 → 2.2.4-pr.2342.1fd456895.0
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/package.json +6 -6
- package/dist/misc-widgets.es.js +0 -73
- package/dist/misc-widgets.umd.js +0 -1
- package/dist/style.css +0 -1
- package/dist/types/components/github-star/GithubStar.vue.d.ts +0 -25
- package/dist/types/components/github-star/GithubStar.vue.d.ts.map +0 -1
- package/dist/types/components/index.d.ts +0 -2
- package/dist/types/components/index.d.ts.map +0 -1
- package/dist/types/composables/index.d.ts +0 -6
- package/dist/types/composables/index.d.ts.map +0 -1
- package/dist/types/composables/useI18n.d.ts +0 -9
- package/dist/types/composables/useI18n.d.ts.map +0 -1
- package/dist/types/index.d.ts +0 -3
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/types/index.d.ts +0 -2
- package/dist/types/types/index.d.ts.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kong-ui-public/misc-widgets",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.4-pr.2342.1fd456895.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/misc-widgets.umd.js",
|
|
6
6
|
"module": "./dist/misc-widgets.es.js",
|
|
@@ -21,14 +21,14 @@
|
|
|
21
21
|
"access": "public"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
|
-
"@kong/kongponents": "^9.
|
|
25
|
-
"vue": "
|
|
26
|
-
"@kong-ui-public/i18n": "^2.4.
|
|
24
|
+
"@kong/kongponents": "^9.34.2",
|
|
25
|
+
"vue": ">= 3.3.13 < 4",
|
|
26
|
+
"@kong-ui-public/i18n": "^2.4.4-pr.2342.1fd456895.0"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@kong/kongponents": "
|
|
29
|
+
"@kong/kongponents": "9.38.3",
|
|
30
30
|
"vue": "^3.5.13",
|
|
31
|
-
"@kong-ui-public/i18n": "^2.4.
|
|
31
|
+
"@kong-ui-public/i18n": "^2.4.4-pr.2342.1fd456895.0"
|
|
32
32
|
},
|
|
33
33
|
"repository": {
|
|
34
34
|
"type": "git",
|
package/dist/misc-widgets.es.js
DELETED
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { defineComponent as c, computed as l, ref as p, onMounted as b, resolveComponent as d, createElementBlock as h, createCommentVNode as g, openBlock as m, createVNode as f, withCtx as _, createElementVNode as i, unref as s, toDisplayString as S } from "vue";
|
|
2
|
-
import { createI18n as v, i18nTComponent as x } from "@kong-ui-public/i18n";
|
|
3
|
-
const k = {
|
|
4
|
-
title: "Star",
|
|
5
|
-
ariaLabel: "Star buttons/github-buttons on GitHub",
|
|
6
|
-
tooltipLabel: "Star this repository on Github"
|
|
7
|
-
}, y = {
|
|
8
|
-
githubStar: k
|
|
9
|
-
};
|
|
10
|
-
function L() {
|
|
11
|
-
const t = v("en-us", y);
|
|
12
|
-
return {
|
|
13
|
-
i18n: t,
|
|
14
|
-
i18nT: x(t)
|
|
15
|
-
// Translation component <i18n-t>
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
const C = {
|
|
19
|
-
useI18n: L
|
|
20
|
-
}, T = {
|
|
21
|
-
key: 0,
|
|
22
|
-
class: "kong-ui-public-misc-widgets-github-star",
|
|
23
|
-
"data-testid": "github-star"
|
|
24
|
-
}, E = ["aria-label", "href"], G = /* @__PURE__ */ c({
|
|
25
|
-
__name: "GithubStar",
|
|
26
|
-
props: {
|
|
27
|
-
url: {
|
|
28
|
-
type: String,
|
|
29
|
-
required: !0
|
|
30
|
-
},
|
|
31
|
-
tooltipText: {
|
|
32
|
-
type: String,
|
|
33
|
-
required: !1,
|
|
34
|
-
default: ""
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
setup(t) {
|
|
38
|
-
const { i18n: e } = C.useI18n(), o = t, a = l(() => o.tooltipText || e.t("githubStar.tooltipLabel")), n = p(!1);
|
|
39
|
-
return b(async () => {
|
|
40
|
-
const r = document.createElement("script");
|
|
41
|
-
r.addEventListener("load", () => {
|
|
42
|
-
n.value = !0;
|
|
43
|
-
}), r.setAttribute("src", "https://buttons.github.io/buttons.js"), document.head.appendChild(r);
|
|
44
|
-
}), (r, w) => {
|
|
45
|
-
const u = d("KTooltip");
|
|
46
|
-
return t.url && n.value ? (m(), h("div", T, [
|
|
47
|
-
f(u, { text: a.value }, {
|
|
48
|
-
default: _(() => [
|
|
49
|
-
i("span", null, [
|
|
50
|
-
i("a", {
|
|
51
|
-
"aria-label": s(e).t("githubStar.ariaLabel"),
|
|
52
|
-
class: "github-button",
|
|
53
|
-
"data-color-scheme": "no-preference: light; light: light; dark: light;",
|
|
54
|
-
"data-show-count": "true",
|
|
55
|
-
href: t.url,
|
|
56
|
-
target: "_blank"
|
|
57
|
-
}, S(s(e).t("githubStar.title")), 9, E)
|
|
58
|
-
])
|
|
59
|
-
]),
|
|
60
|
-
_: 1
|
|
61
|
-
}, 8, ["text"])
|
|
62
|
-
])) : g("", !0);
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
}), I = (t, e) => {
|
|
66
|
-
const o = t.__vccOpts || t;
|
|
67
|
-
for (const [a, n] of e)
|
|
68
|
-
o[a] = n;
|
|
69
|
-
return o;
|
|
70
|
-
}, q = /* @__PURE__ */ I(G, [["__scopeId", "data-v-235436ca"]]);
|
|
71
|
-
export {
|
|
72
|
-
q as GithubStar
|
|
73
|
-
};
|
package/dist/misc-widgets.umd.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(n,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("@kong-ui-public/i18n")):typeof define=="function"&&define.amd?define(["exports","vue","@kong-ui-public/i18n"],t):(n=typeof globalThis<"u"?globalThis:n||self,t(n["kong-ui-public-misc-widgets"]={},n.Vue,n["kong-ui-public-i18n"]))})(this,function(n,t,c){"use strict";const u={githubStar:{title:"Star",ariaLabel:"Star buttons/github-buttons on GitHub",tooltipLabel:"Star this repository on Github"}};function l(){const e=c.createI18n("en-us",u);return{i18n:e,i18nT:c.i18nTComponent(e)}}const d={useI18n:l},p={key:0,class:"kong-ui-public-misc-widgets-github-star","data-testid":"github-star"},b=["aria-label","href"],h=((e,o)=>{const i=e.__vccOpts||e;for(const[s,r]of o)i[s]=r;return i})(t.defineComponent({__name:"GithubStar",props:{url:{type:String,required:!0},tooltipText:{type:String,required:!1,default:""}},setup(e){const{i18n:o}=d.useI18n(),i=e,s=t.computed(()=>i.tooltipText||o.t("githubStar.tooltipLabel")),r=t.ref(!1);return t.onMounted(async()=>{const a=document.createElement("script");a.addEventListener("load",()=>{r.value=!0}),a.setAttribute("src","https://buttons.github.io/buttons.js"),document.head.appendChild(a)}),(a,S)=>{const f=t.resolveComponent("KTooltip");return e.url&&r.value?(t.openBlock(),t.createElementBlock("div",p,[t.createVNode(f,{text:s.value},{default:t.withCtx(()=>[t.createElementVNode("span",null,[t.createElementVNode("a",{"aria-label":t.unref(o).t("githubStar.ariaLabel"),class:"github-button","data-color-scheme":"no-preference: light; light: light; dark: light;","data-show-count":"true",href:e.url,target:"_blank"},t.toDisplayString(t.unref(o).t("githubStar.title")),9,b)])]),_:1},8,["text"])])):t.createCommentVNode("",!0)}}}),[["__scopeId","data-v-235436ca"]]);n.GithubStar=h,Object.defineProperty(n,Symbol.toStringTag,{value:"Module"})});
|
package/dist/style.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.kong-ui-public-misc-widgets-github-star[data-v-235436ca]{max-height:20px}.kong-ui-public-misc-widgets-github-star .github-button[data-v-235436ca]{font-style:normal}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
|
-
url: {
|
|
3
|
-
type: StringConstructor;
|
|
4
|
-
required: true;
|
|
5
|
-
};
|
|
6
|
-
tooltipText: {
|
|
7
|
-
type: StringConstructor;
|
|
8
|
-
required: false;
|
|
9
|
-
default: string;
|
|
10
|
-
};
|
|
11
|
-
}>, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
12
|
-
url: {
|
|
13
|
-
type: StringConstructor;
|
|
14
|
-
required: true;
|
|
15
|
-
};
|
|
16
|
-
tooltipText: {
|
|
17
|
-
type: StringConstructor;
|
|
18
|
-
required: false;
|
|
19
|
-
default: string;
|
|
20
|
-
};
|
|
21
|
-
}>> & Readonly<{}>, {
|
|
22
|
-
tooltipText: string;
|
|
23
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
24
|
-
export default _default;
|
|
25
|
-
//# sourceMappingURL=GithubStar.vue.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"GithubStar.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/github-star/GithubStar.vue"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAyLA,wBAcG"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,8BAA8B,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/composables/index.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,WAAW,CAAA;;;;AAG/B,wBAEC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { createI18n, i18nTComponent } from '@kong-ui-public/i18n';
|
|
2
|
-
import english from '../locales/en.json';
|
|
3
|
-
interface UseI18nReturn {
|
|
4
|
-
i18n: ReturnType<typeof createI18n<typeof english>>;
|
|
5
|
-
i18nT: ReturnType<typeof i18nTComponent<typeof english>>;
|
|
6
|
-
}
|
|
7
|
-
export default function useI18n(): UseI18nReturn;
|
|
8
|
-
export {};
|
|
9
|
-
//# sourceMappingURL=useI18n.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useI18n.d.ts","sourceRoot":"","sources":["../../../src/composables/useI18n.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AACjE,OAAO,OAAO,MAAM,oBAAoB,CAAA;AAExC,UAAU,aAAa;IACrB,IAAI,EAAE,UAAU,CAAC,OAAO,UAAU,CAAC,OAAO,OAAO,CAAC,CAAC,CAAA;IACnD,KAAK,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,OAAO,OAAO,CAAC,CAAC,CAAA;CACzD;AAED,MAAM,CAAC,OAAO,UAAU,OAAO,IAAI,aAAa,CAO/C"}
|
package/dist/types/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,SAAS,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,CAAA"}
|