@thl-ui/vue 0.0.0-stage → 0.1.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.
- package/LICENSE +21 -0
- package/README.md +58 -2
- package/dist/components/basic.d.ts +397 -0
- package/dist/components/basic.js +303 -0
- package/dist/components/basic.js.map +1 -0
- package/dist/components/data.d.ts +690 -0
- package/dist/components/data.js +919 -0
- package/dist/components/data.js.map +1 -0
- package/dist/components/form.d.ts +764 -0
- package/dist/components/form.js +1212 -0
- package/dist/components/form.js.map +1 -0
- package/dist/components/layout.d.ts +219 -0
- package/dist/components/layout.js +480 -0
- package/dist/components/layout.js.map +1 -0
- package/dist/components/nav.d.ts +295 -0
- package/dist/components/nav.js +398 -0
- package/dist/components/nav.js.map +1 -0
- package/dist/components/overlay.d.ts +303 -0
- package/dist/components/overlay.js +437 -0
- package/dist/components/overlay.js.map +1 -0
- package/dist/components/util.d.ts +26 -0
- package/dist/components/util.js +35 -0
- package/dist/components/util.js.map +1 -0
- package/dist/context.d.ts +47 -0
- package/dist/context.js +81 -0
- package/dist/context.js.map +1 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.js +128 -0
- package/dist/index.js.map +1 -0
- package/package.json +56 -4
package/dist/context.js
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { shallowRef as s, getCurrentScope as g, onScopeDispose as h, inject as d, computed as a } from "vue";
|
|
2
|
+
import { createThl as m, createToastManager as x } from "@thl-ui/core";
|
|
3
|
+
import { registerIcons as b } from "@thl-ui/icons";
|
|
4
|
+
const f = /* @__PURE__ */ Symbol("thl-ui");
|
|
5
|
+
function S(t) {
|
|
6
|
+
const o = s(t.get()), c = t.subscribe((e) => {
|
|
7
|
+
o.value = e;
|
|
8
|
+
});
|
|
9
|
+
return g() && h(c), o;
|
|
10
|
+
}
|
|
11
|
+
function v(t = {}, o) {
|
|
12
|
+
t.icons && b(t.icons);
|
|
13
|
+
const c = o ?? m(t), e = c.get().components.Toast ?? {}, n = s(c.get());
|
|
14
|
+
c.subscribe((u) => {
|
|
15
|
+
n.value = u;
|
|
16
|
+
});
|
|
17
|
+
const i = s(c.i18n.getLocale()), r = s(0);
|
|
18
|
+
return c.i18n.subscribe((u) => {
|
|
19
|
+
i.value = u, r.value++;
|
|
20
|
+
}), { thl: c, toast: x({ duration: e.duration, max: e.max, position: e.position }), config: n, locale: i, rev: r };
|
|
21
|
+
}
|
|
22
|
+
let T = null;
|
|
23
|
+
function l() {
|
|
24
|
+
return d(f, null) ?? (T ??= v());
|
|
25
|
+
}
|
|
26
|
+
const p = {
|
|
27
|
+
install(t, o = {}) {
|
|
28
|
+
const { instance: c, ...e } = o, n = v(e, c);
|
|
29
|
+
t.provide(f, n), t.config.globalProperties.$thl = n.thl, t.config.globalProperties.$t = (i, r) => (n.rev.value, n.thl.t(i, r));
|
|
30
|
+
}
|
|
31
|
+
}, P = (t) => ({ install: (o) => p.install(o, t) });
|
|
32
|
+
function k() {
|
|
33
|
+
return l().thl;
|
|
34
|
+
}
|
|
35
|
+
function D() {
|
|
36
|
+
const t = l();
|
|
37
|
+
return { config: t.config, set: t.thl.set };
|
|
38
|
+
}
|
|
39
|
+
function U() {
|
|
40
|
+
const t = l();
|
|
41
|
+
return a(() => t.config.value.prefix);
|
|
42
|
+
}
|
|
43
|
+
function $() {
|
|
44
|
+
const t = l(), o = t.thl.i18n;
|
|
45
|
+
return {
|
|
46
|
+
t: (e, n) => (t.rev.value, t.locale.value, o.t(e, n)),
|
|
47
|
+
te: (e) => (t.rev.value, o.te(e)),
|
|
48
|
+
n: (e, n) => (t.locale.value, o.n(e, n)),
|
|
49
|
+
d: (e, n) => (t.locale.value, o.d(e, n)),
|
|
50
|
+
locale: t.locale,
|
|
51
|
+
setLocale: (e) => t.thl.set({ locale: e }),
|
|
52
|
+
intlLocale: () => (t.locale.value, o.intlLocale()),
|
|
53
|
+
i18n: o
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
function j(t, o) {
|
|
57
|
+
const c = l();
|
|
58
|
+
return a(() => {
|
|
59
|
+
const e = { ...c.config.value.components[t] ?? {} };
|
|
60
|
+
for (const n in o) o[n] !== void 0 && (e[n] = o[n]);
|
|
61
|
+
return e;
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
function w() {
|
|
65
|
+
return l().toast;
|
|
66
|
+
}
|
|
67
|
+
export {
|
|
68
|
+
f as THL_KEY,
|
|
69
|
+
p as ThlUI,
|
|
70
|
+
v as createContext,
|
|
71
|
+
P as createThlUI,
|
|
72
|
+
j as useDefaults,
|
|
73
|
+
$ as useI18n,
|
|
74
|
+
U as usePrefix,
|
|
75
|
+
S as useStore,
|
|
76
|
+
k as useThl,
|
|
77
|
+
D as useThlConfig,
|
|
78
|
+
l as useThlContext,
|
|
79
|
+
w as useToast
|
|
80
|
+
};
|
|
81
|
+
//# sourceMappingURL=context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.js","sources":["../src/context.ts"],"sourcesContent":["import { inject, shallowRef, onScopeDispose, computed, getCurrentScope, type App, type InjectionKey, type Ref, type ComputedRef } from 'vue';\nimport {\n createThl,\n createToastManager,\n type ThlInstance,\n type ThlUserConfig,\n type ThlConfig,\n type Store,\n type ToastManager,\n type ThlComponentDefaults,\n type TParams,\n} from '@thl-ui/core';\nimport { registerIcons, type IconRegistry } from '@thl-ui/icons';\n\nexport interface ThlContext {\n thl: ThlInstance;\n toast: ToastManager;\n config: Ref<ThlConfig>;\n locale: Ref<string>;\n rev: Ref<number>;\n}\nexport const THL_KEY: InjectionKey<ThlContext> = Symbol('thl-ui');\n\n/** Bridge a core Store to a Vue ref (auto-unsubscribes with the current effect scope). */\nexport function useStore<T>(store: Store<T>): Ref<T> {\n const r = shallowRef(store.get()) as Ref<T>;\n const off = store.subscribe((v) => {\n r.value = v;\n });\n if (getCurrentScope()) onScopeDispose(off);\n return r;\n}\n\nexport function createContext(user: ThlUserConfig & { icons?: IconRegistry } = {}, instance?: ThlInstance): ThlContext {\n if (user.icons) registerIcons(user.icons);\n const thl = instance ?? createThl(user);\n const t = thl.get().components.Toast ?? {};\n const config = shallowRef(thl.get());\n thl.subscribe((c) => {\n config.value = c;\n });\n const locale = shallowRef(thl.i18n.getLocale());\n const rev = shallowRef(0);\n thl.i18n.subscribe((l) => {\n locale.value = l;\n rev.value++;\n });\n return { thl, toast: createToastManager({ duration: t.duration, max: t.max, position: t.position }), config, locale, rev };\n}\n\nlet fallback: ThlContext | null = null;\nexport function useThlContext(): ThlContext {\n return inject(THL_KEY, null) ?? (fallback ??= createContext());\n}\n\n/** Vue plugin: app.use(ThlUI, config). Exposes $t and $thl globally. */\nexport const ThlUI = {\n install(app: App, options: ThlUserConfig & { icons?: IconRegistry; instance?: ThlInstance; components?: any } = {}) {\n const { instance, ...cfg } = options;\n const ctx = createContext(cfg, instance);\n app.provide(THL_KEY, ctx);\n app.config.globalProperties.$thl = ctx.thl;\n app.config.globalProperties.$t = (k: string, p?: TParams) => {\n void ctx.rev.value;\n return ctx.thl.t(k, p);\n };\n },\n};\nexport const createThlUI = (options?: Parameters<typeof ThlUI.install>[1]) => ({ install: (app: App) => ThlUI.install(app, options) });\n\nexport function useThl() {\n return useThlContext().thl;\n}\nexport function useThlConfig() {\n const ctx = useThlContext();\n return { config: ctx.config, set: ctx.thl.set };\n}\nexport function usePrefix(): ComputedRef<string> {\n const c = useThlContext();\n return computed(() => c.config.value.prefix);\n}\n\n/** Reactive translator: tracks locale + message revision so templates re-render. */\nexport function useI18n() {\n const ctx = useThlContext();\n const i18n = ctx.thl.i18n;\n const t = (key: string, params?: TParams) => {\n void ctx.rev.value;\n void ctx.locale.value;\n return i18n.t(key, params);\n };\n return {\n t,\n te: (k: string) => {\n void ctx.rev.value;\n return i18n.te(k);\n },\n n: (v: number, o?: Intl.NumberFormatOptions) => {\n void ctx.locale.value;\n return i18n.n(v, o);\n },\n d: (v: Date | number | string, o?: Intl.DateTimeFormatOptions) => {\n void ctx.locale.value;\n return i18n.d(v, o);\n },\n locale: ctx.locale,\n setLocale: (l: string) => ctx.thl.set({ locale: l }),\n intlLocale: () => {\n void ctx.locale.value;\n return i18n.intlLocale();\n },\n i18n,\n };\n}\n\nexport function useDefaults<K extends keyof ThlComponentDefaults>(name: K, props: Record<string, unknown>) {\n const ctx = useThlContext();\n return computed(() => {\n const out: Record<string, unknown> = { ...((ctx.config.value.components[name] ?? {}) as object) };\n for (const k in props) if (props[k] !== undefined) out[k] = props[k];\n return out as NonNullable<ThlComponentDefaults[K]>;\n });\n}\n\nexport function useToast(): ToastManager {\n return useThlContext().toast;\n}\n"],"names":["THL_KEY","useStore","store","r","shallowRef","off","v","getCurrentScope","onScopeDispose","createContext","user","instance","registerIcons","thl","createThl","t","config","c","locale","rev","l","createToastManager","fallback","useThlContext","inject","ThlUI","app","options","cfg","ctx","k","p","createThlUI","useThl","useThlConfig","usePrefix","computed","useI18n","i18n","key","params","o","useDefaults","name","props","out","useToast"],"mappings":"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"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { App, Component } from 'vue';
|
|
2
|
+
import { ThlUI as Plugin } from './context';
|
|
3
|
+
export * from './context';
|
|
4
|
+
export * from './components/basic';
|
|
5
|
+
export * from './components/overlay';
|
|
6
|
+
export * from './components/nav';
|
|
7
|
+
export * from './components/form';
|
|
8
|
+
export * from './components/data';
|
|
9
|
+
export * from './components/layout';
|
|
10
|
+
export { createThl, rules, type ThlUserConfig, type ThlConfig, type MenuItem } from '@thl-ui/core';
|
|
11
|
+
/** All components, for global registration. Annotated pure so apps that import single components can drop the rest. */
|
|
12
|
+
export declare const components: Record<string, Component>;
|
|
13
|
+
/** Plugin that installs config/i18n AND registers every component globally (<ThlButton/>, <thl-button/>). */
|
|
14
|
+
declare const _default: {
|
|
15
|
+
install(app: App, options?: Parameters<typeof Plugin.install>[1]): void;
|
|
16
|
+
};
|
|
17
|
+
export default _default;
|
|
18
|
+
declare module 'vue' {
|
|
19
|
+
interface ComponentCustomProperties {
|
|
20
|
+
$t: (key: string, params?: Record<string, string | number>) => string;
|
|
21
|
+
$thl: import('@thl-ui/core').ThlInstance;
|
|
22
|
+
}
|
|
23
|
+
}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { ThlUI as T } from "./context.js";
|
|
2
|
+
import { THL_KEY as x, createContext as C, createThlUI as b, useDefaults as P, useI18n as S, usePrefix as g, useStore as I, useThl as L, useThlConfig as k, useThlContext as y, useToast as B } from "./context.js";
|
|
3
|
+
import * as t from "./components/basic.js";
|
|
4
|
+
import { ThlAlert as A, ThlAvatar as G, ThlBadge as v, ThlButton as F, ThlButtonGroup as R, ThlCard as j, ThlDivider as w, ThlIcon as E, ThlLabel as M, ThlPanel as U, ThlPreloader as H, ThlRibbon as O, ThlSkeleton as W, ThlSpinner as N, ThlWell as z } from "./components/basic.js";
|
|
5
|
+
import * as h from "./components/overlay.js";
|
|
6
|
+
import { ThlConfirmHost as Y, ThlDrawer as _, ThlDropdown as q, ThlModal as J, ThlPopover as Q, ThlProgress as V, ThlProgressCircle as X, ThlToaster as Z, ThlTooltip as $, confirm as ll } from "./components/overlay.js";
|
|
7
|
+
import * as a from "./components/nav.js";
|
|
8
|
+
import { ThlActivityFeed as ol, ThlBreadcrumb as rl, ThlCarousel as Tl, ThlHorizontalTimeline as tl, ThlPagination as hl, ThlSteps as al, ThlTabs as il, ThlTimeline as nl } from "./components/nav.js";
|
|
9
|
+
import * as i from "./components/form.js";
|
|
10
|
+
import { ThlCalendarGrid as pl, ThlCheckbox as ml, ThlCheckboxGroup as cl, ThlColorPicker as ul, ThlDatePicker as fl, ThlDateRangePicker as dl, ThlEditor as xl, ThlField as Cl, ThlFloatingLabel as bl, ThlForm as Pl, ThlFormActions as Sl, ThlInput as gl, ThlInputGroup as Il, ThlNativeSelect as Ll, ThlNumberInput as kl, ThlRadio as yl, ThlRadioGroup as Bl, ThlSelect as Dl, ThlSlider as Al, ThlSwitch as Gl, ThlTagsInput as vl, ThlTextarea as Fl, ThlTimePicker as Rl, ThlUpload as jl } from "./components/form.js";
|
|
11
|
+
import * as n from "./components/data.js";
|
|
12
|
+
import { ThlBarChart as El, ThlCalendar as Ml, ThlChat as Ul, ThlColorBox as Hl, ThlDataTable as Ol, ThlGallery as Wl, ThlInfoBox as Nl, ThlLineChart as zl, ThlList as Kl, ThlPieChart as Yl, ThlPricingTable as _l, ThlProfileCard as ql, ThlSparkline as Jl, ThlStatBox as Ql, ThlStatsRow as Vl, ThlTable as Xl, ThlTodoList as Zl, ThlUserCard as $l, ThlWeather as le } from "./components/data.js";
|
|
13
|
+
import * as s from "./components/layout.js";
|
|
14
|
+
import { ThlAppLayout as oe, ThlAuthLayout as re, ThlErrorLayout as Te, ThlPage as te, ThlSettingsPanel as he, ThlSideMenu as ae, ThlTopbarMessages as ie } from "./components/layout.js";
|
|
15
|
+
import { createThl as se, rules as pe } from "@thl-ui/core";
|
|
16
|
+
function p(...o) {
|
|
17
|
+
return Object.fromEntries(
|
|
18
|
+
o.flatMap((l) => Object.entries(l)).filter(([l, e]) => l.startsWith("Thl") && typeof e == "object" && e && "setup" in e)
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
const m = /* @__PURE__ */ p(t, h, a, i, n, s), u = {
|
|
22
|
+
install(o, l) {
|
|
23
|
+
T.install(o, l);
|
|
24
|
+
for (const [e, r] of Object.entries(m)) o.component(e, r);
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
export {
|
|
28
|
+
x as THL_KEY,
|
|
29
|
+
ol as ThlActivityFeed,
|
|
30
|
+
A as ThlAlert,
|
|
31
|
+
oe as ThlAppLayout,
|
|
32
|
+
re as ThlAuthLayout,
|
|
33
|
+
G as ThlAvatar,
|
|
34
|
+
v as ThlBadge,
|
|
35
|
+
El as ThlBarChart,
|
|
36
|
+
rl as ThlBreadcrumb,
|
|
37
|
+
F as ThlButton,
|
|
38
|
+
R as ThlButtonGroup,
|
|
39
|
+
Ml as ThlCalendar,
|
|
40
|
+
pl as ThlCalendarGrid,
|
|
41
|
+
j as ThlCard,
|
|
42
|
+
Tl as ThlCarousel,
|
|
43
|
+
Ul as ThlChat,
|
|
44
|
+
ml as ThlCheckbox,
|
|
45
|
+
cl as ThlCheckboxGroup,
|
|
46
|
+
Hl as ThlColorBox,
|
|
47
|
+
ul as ThlColorPicker,
|
|
48
|
+
Y as ThlConfirmHost,
|
|
49
|
+
Ol as ThlDataTable,
|
|
50
|
+
fl as ThlDatePicker,
|
|
51
|
+
dl as ThlDateRangePicker,
|
|
52
|
+
w as ThlDivider,
|
|
53
|
+
_ as ThlDrawer,
|
|
54
|
+
q as ThlDropdown,
|
|
55
|
+
xl as ThlEditor,
|
|
56
|
+
Te as ThlErrorLayout,
|
|
57
|
+
Cl as ThlField,
|
|
58
|
+
bl as ThlFloatingLabel,
|
|
59
|
+
Pl as ThlForm,
|
|
60
|
+
Sl as ThlFormActions,
|
|
61
|
+
Wl as ThlGallery,
|
|
62
|
+
tl as ThlHorizontalTimeline,
|
|
63
|
+
E as ThlIcon,
|
|
64
|
+
Nl as ThlInfoBox,
|
|
65
|
+
gl as ThlInput,
|
|
66
|
+
Il as ThlInputGroup,
|
|
67
|
+
M as ThlLabel,
|
|
68
|
+
zl as ThlLineChart,
|
|
69
|
+
Kl as ThlList,
|
|
70
|
+
J as ThlModal,
|
|
71
|
+
Ll as ThlNativeSelect,
|
|
72
|
+
kl as ThlNumberInput,
|
|
73
|
+
te as ThlPage,
|
|
74
|
+
hl as ThlPagination,
|
|
75
|
+
U as ThlPanel,
|
|
76
|
+
Yl as ThlPieChart,
|
|
77
|
+
Q as ThlPopover,
|
|
78
|
+
H as ThlPreloader,
|
|
79
|
+
_l as ThlPricingTable,
|
|
80
|
+
ql as ThlProfileCard,
|
|
81
|
+
V as ThlProgress,
|
|
82
|
+
X as ThlProgressCircle,
|
|
83
|
+
yl as ThlRadio,
|
|
84
|
+
Bl as ThlRadioGroup,
|
|
85
|
+
O as ThlRibbon,
|
|
86
|
+
Dl as ThlSelect,
|
|
87
|
+
he as ThlSettingsPanel,
|
|
88
|
+
ae as ThlSideMenu,
|
|
89
|
+
W as ThlSkeleton,
|
|
90
|
+
Al as ThlSlider,
|
|
91
|
+
Jl as ThlSparkline,
|
|
92
|
+
N as ThlSpinner,
|
|
93
|
+
Ql as ThlStatBox,
|
|
94
|
+
Vl as ThlStatsRow,
|
|
95
|
+
al as ThlSteps,
|
|
96
|
+
Gl as ThlSwitch,
|
|
97
|
+
Xl as ThlTable,
|
|
98
|
+
il as ThlTabs,
|
|
99
|
+
vl as ThlTagsInput,
|
|
100
|
+
Fl as ThlTextarea,
|
|
101
|
+
Rl as ThlTimePicker,
|
|
102
|
+
nl as ThlTimeline,
|
|
103
|
+
Z as ThlToaster,
|
|
104
|
+
Zl as ThlTodoList,
|
|
105
|
+
$ as ThlTooltip,
|
|
106
|
+
ie as ThlTopbarMessages,
|
|
107
|
+
T as ThlUI,
|
|
108
|
+
jl as ThlUpload,
|
|
109
|
+
$l as ThlUserCard,
|
|
110
|
+
le as ThlWeather,
|
|
111
|
+
z as ThlWell,
|
|
112
|
+
m as components,
|
|
113
|
+
ll as confirm,
|
|
114
|
+
C as createContext,
|
|
115
|
+
se as createThl,
|
|
116
|
+
b as createThlUI,
|
|
117
|
+
u as default,
|
|
118
|
+
pe as rules,
|
|
119
|
+
P as useDefaults,
|
|
120
|
+
S as useI18n,
|
|
121
|
+
g as usePrefix,
|
|
122
|
+
I as useStore,
|
|
123
|
+
L as useThl,
|
|
124
|
+
k as useThlConfig,
|
|
125
|
+
y as useThlContext,
|
|
126
|
+
B as useToast
|
|
127
|
+
};
|
|
128
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["import type { App, Component } from 'vue';\nimport { ThlUI as Plugin } from './context';\nimport * as basic from './components/basic';\nimport * as overlay from './components/overlay';\nimport * as nav from './components/nav';\nimport * as form from './components/form';\nimport * as data from './components/data';\nimport * as layout from './components/layout';\n\nexport * from './context';\nexport * from './components/basic';\nexport * from './components/overlay';\nexport * from './components/nav';\nexport * from './components/form';\nexport * from './components/data';\nexport * from './components/layout';\nexport { createThl, rules, type ThlUserConfig, type ThlConfig, type MenuItem } from '@thl-ui/core';\n\nfunction collect(...mods: Array<Record<string, unknown>>): Record<string, Component> {\n return Object.fromEntries(\n mods.flatMap((m) => Object.entries(m)).filter(([k, v]) => k.startsWith('Thl') && typeof v === 'object' && v && 'setup' in (v as object)),\n ) as Record<string, Component>;\n}\n\n/** All components, for global registration. Annotated pure so apps that import single components can drop the rest. */\nexport const components: Record<string, Component> = /*#__PURE__*/ collect(basic, overlay, nav, form, data, layout);\n\n/** Plugin that installs config/i18n AND registers every component globally (<ThlButton/>, <thl-button/>). */\nexport default {\n install(app: App, options?: Parameters<typeof Plugin.install>[1]) {\n Plugin.install(app, options);\n for (const [name, comp] of Object.entries(components)) app.component(name, comp);\n },\n};\n\ndeclare module 'vue' {\n interface ComponentCustomProperties {\n $t: (key: string, params?: Record<string, string | number>) => string;\n $thl: import('@thl-ui/core').ThlInstance;\n }\n}\n"],"names":["collect","mods","m","k","v","components","basic","overlay","nav","form","data","layout","index","app","options","Plugin","name","comp"],"mappings":";;;;;;;;;;;;;;;AAkBA,SAASA,KAAWC,GAAiE;AACnF,SAAO,OAAO;AAAA,IACZA,EAAK,QAAQ,CAACC,MAAM,OAAO,QAAQA,CAAC,CAAC,EAAE,OAAO,CAAC,CAACC,GAAGC,CAAC,MAAMD,EAAE,WAAW,KAAK,KAAK,OAAOC,KAAM,YAAYA,KAAK,WAAYA,CAAY;AAAA,EAAA;AAE3I;AAGO,MAAMC,IAAsD,gBAAAL,EAAQM,GAAOC,GAASC,GAAKC,GAAMC,GAAMC,CAAM,GAGlHC,IAAe;AAAA,EACb,QAAQC,GAAUC,GAAgD;AAChEC,IAAAA,EAAO,QAAQF,GAAKC,CAAO;AAC3B,eAAW,CAACE,GAAMC,CAAI,KAAK,OAAO,QAAQZ,CAAU,EAAG,CAAAQ,EAAI,UAAUG,GAAMC,CAAI;AAAA,EACjF;AACF;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,58 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thl-ui/vue",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "thl-ui for Vue 3: admin UI components with global config, 12 skins, dark mode and i18n.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"thl-ui",
|
|
7
|
+
"ui",
|
|
8
|
+
"components",
|
|
9
|
+
"admin",
|
|
10
|
+
"dashboard",
|
|
11
|
+
"vue",
|
|
12
|
+
"vue3",
|
|
13
|
+
"vue-components"
|
|
14
|
+
],
|
|
15
|
+
"license": "MIT",
|
|
16
|
+
"homepage": "https://thl.tandd.dev/guide/vue",
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "git+https://gitlab.com/tandd.packages/thl-ui.git",
|
|
20
|
+
"directory": "packages/vue"
|
|
21
|
+
},
|
|
22
|
+
"bugs": {
|
|
23
|
+
"url": "https://gitlab.com/tandd.packages/thl-ui/-/issues"
|
|
24
|
+
},
|
|
25
|
+
"type": "module",
|
|
26
|
+
"main": "./dist/index.js",
|
|
27
|
+
"types": "./dist/index.d.ts",
|
|
28
|
+
"exports": {
|
|
29
|
+
".": {
|
|
30
|
+
"types": "./dist/index.d.ts",
|
|
31
|
+
"import": "./dist/index.js"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"files": [
|
|
35
|
+
"dist"
|
|
36
|
+
],
|
|
37
|
+
"sideEffects": false,
|
|
38
|
+
"scripts": {
|
|
39
|
+
"build": "vite build",
|
|
40
|
+
"typecheck": "vue-tsc -p tsconfig.json --noEmit"
|
|
41
|
+
},
|
|
42
|
+
"peerDependencies": {
|
|
43
|
+
"vue": ">=3.5.2"
|
|
44
|
+
},
|
|
45
|
+
"dependencies": {
|
|
46
|
+
"@thl-ui/core": "0.1.1",
|
|
47
|
+
"@thl-ui/icons": "0.1.1",
|
|
48
|
+
"@thl-ui/charts": "0.1.1",
|
|
49
|
+
"@thl-ui/locales": "0.1.1",
|
|
50
|
+
"@thl-ui/tokens": "0.1.1"
|
|
51
|
+
},
|
|
52
|
+
"devDependencies": {
|
|
53
|
+
"vue": "^3.5.22",
|
|
54
|
+
"@vitejs/plugin-vue": "^6.0.1",
|
|
55
|
+
"@vue/test-utils": "^2.4.6",
|
|
56
|
+
"vue-tsc": "^3.1.0"
|
|
57
|
+
}
|
|
58
|
+
}
|