@timus-networks/theme 2.3.2 → 2.3.5

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/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@timus-networks/theme",
3
3
  "configKey": "themeOptions",
4
- "version": "2.3.2",
4
+ "version": "2.3.4",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "0.8.4",
7
7
  "unbuild": "2.0.0"
package/dist/module.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { readdirSync } from 'node:fs';
2
- import { resolve, parse, join } from 'node:path';
3
- import { defineNuxtModule, createResolver, useNuxt, addImports, addPlugin, addComponent } from 'nuxt/kit';
2
+ import { resolve, parse } from 'node:path';
3
+ import { defineNuxtModule, createResolver, useNuxt, addImports, addPlugin } from 'nuxt/kit';
4
4
 
5
5
 
6
6
 
@@ -12,7 +12,7 @@ const __filename = __cjs_url__.fileURLToPath(import.meta.url);
12
12
  const __dirname = __cjs_path__.dirname(__filename);
13
13
  const require = __cjs_mod__.createRequire(import.meta.url);
14
14
  const name = "@timus-networks/theme";
15
- const version = "2.3.2";
15
+ const version = "2.3.4";
16
16
  const description = "A comprehensive Nuxt.js module providing a tailored theme experience with integrated TailwindCSS support for applications.";
17
17
  const type = "module";
18
18
  const exports = {
@@ -37,10 +37,10 @@ const scripts = {
37
37
  fix: "npm run lint:prettier && npm run lint:eslint -- --fix && npm run lint:stylelint -- --fix",
38
38
  pub: "npm publish",
39
39
  sass: "node generate-sass.js",
40
- prepack: "nuxt-module-build build",
41
- "release-old": "npm run prepack && changelogen --release && npm run pub && git push --follow-tags",
42
- version: "standard-version",
43
- release: "npm run prepack && npm run version && npm run pub && git push --follow-tags origin main"
40
+ build: "nuxt-module-build build",
41
+ "release-old": "npm run build && changelogen --release && npm run pub && git push --follow-tags",
42
+ version: "standard-version --release-as ${npm_config_type:-patch}",
43
+ release: "npm run build && npm run version && npm run pub && git push --follow-tags origin main"
44
44
  };
45
45
  const repository = {
46
46
  type: "git",
@@ -155,29 +155,16 @@ const module = defineNuxtModule({
155
155
  });
156
156
  });
157
157
  const components_dir_list = [
158
- { env: "development", path: "runtime/components/development" },
159
- { env: "production", path: "runtime/components/production" }
158
+ { env: "development", path: `${folderPath}/components/development` },
159
+ { env: "production", path: `${folderPath}/components/production` }
160
160
  ];
161
- const comp = [];
162
- const addComponentFromFolder = (folder) => {
163
- const path = resolve(__dirname, folder);
164
- const files = readdirSync(path).filter((file) => file.endsWith(".vue"));
165
- files.forEach((file) => {
166
- const { name } = parse(file);
167
- const isExit = comp.find((item) => item.name === name);
168
- !isExit ? comp.push({ name, path: resolve(path, file) }) : console.log("#BU COMPONENT VAR name:", name, resolve(path, file), "\xD6nceki: ", isExit);
169
- nuxt.options.build.transpile.push(resolve(path, file));
170
- addComponent({
171
- name: join(name),
172
- filePath: resolve(path, file),
173
- mode: "client"
174
- });
175
- });
176
- };
177
161
  nuxt.hook("components:dirs", (dirs) => {
178
162
  components_dir_list.forEach(({ env, path }) => {
179
163
  if (isDev || !isDev && env === "production") {
180
- addComponentFromFolder(path);
164
+ dirs.push({
165
+ path: resolver.resolve(path)
166
+ /* , prefix: 'my-module' */
167
+ });
181
168
  }
182
169
  });
183
170
  });
@@ -66,6 +66,7 @@
66
66
  </template>
67
67
 
68
68
  <script lang="ts" setup>
69
+ import { Bell as ElIconBell } from '@element-plus/icons-vue';
69
70
  import { ref } from 'vue';
70
71
  import { reactive, toRefs } from 'vue';
71
72
 
@@ -75,7 +76,7 @@
75
76
  sizes: [50, 'default', 'large', 'medium', 'small', 'mini'] as const,
76
77
  infos: [50, '32', '56', '44', '32', '16'] as const,
77
78
  });
78
- const { sizes, infos, circleUrl, squareUrl, sizeList } = toRefs(state);
79
+ const { sizes, infos } = toRefs(state);
79
80
  const snippets = ref({
80
81
  isax: `<el-avatar class="isax-notification" />`,
81
82
  icon: `<el-avatar :icon="ElIconEdit" />`,
@@ -30,7 +30,10 @@
30
30
  <script lang="ts" setup>
31
31
  import { ref } from 'vue';
32
32
 
33
- const sample_path = ref([{ regex: /^\/about$/, label: 'header.about.text' }]);
33
+ const sample_path = ref([
34
+ { regex: /^\/about$/, label: 'header.about-label.text' },
35
+ { regex: /^\/theme\/([A-Za-z0-9\-_]+)$/, label: 'header.number.text' },
36
+ ]);
34
37
  const snippets = ref({
35
38
  basic: `<timus-breadcrumb :paths="[ { regex: /^\/about$/, label: 'header.about.text' } ]" />`,
36
39
  composable: `
@@ -205,31 +205,33 @@
205
205
  </div>
206
206
  </template>
207
207
 
208
- <script>
209
- import { defineComponent } from "vue";
210
- export default defineComponent({
211
- name: "TimusButton",
212
- data() {
213
- return {
214
- sizes: ["default", "large", "medium", "small", "mini"],
215
- colors: ["default", "primary", "secondary", "neutral", "success", "warning", "info", "danger"],
216
- snippets: {
217
- group: `
218
- <el-button-group>
219
- <el-button type="primary" :icon="ElIconArrowLeft">Previous Page</el-button>
220
- <el-button type="primary">
221
- Next Page<el-icon class="el-icon--right"><ElIconArrowRight /></el-icon>
222
- </el-button>
223
- </el-button-group>`
224
- },
225
- active_color: "default"
226
- };
227
- },
228
- methods: {
229
- capitalize(value) {
230
- const text = String(value);
231
- return text.charAt(0).toUpperCase() + text.slice(1);
232
- }
233
- }
234
- });
208
+ <script setup lang="ts">
209
+ import {
210
+ ArrowLeft as ElIconArrowLeft,
211
+ ArrowRight as ElIconArrowRight,
212
+ Delete as ElIconDelete,
213
+ Edit as ElIconEdit,
214
+ Search as ElIconSearch,
215
+ Share as ElIconShare,
216
+ Upload as ElIconUpload,
217
+ } from '@element-plus/icons-vue';
218
+ import { ref } from 'vue';
219
+
220
+ const sizes = ['default', 'large', 'medium', 'small', 'mini'];
221
+ const colors = ['default', 'primary', 'secondary', 'neutral', 'success', 'warning', 'info', 'danger'];
222
+ const snippets = {
223
+ group: `
224
+ <el-button-group>
225
+ <el-button type="primary" :icon="ElIconArrowLeft">Previous Page</el-button>
226
+ <el-button type="primary">
227
+ Next Page<el-icon class="el-icon--right"><ElIconArrowRight /></el-icon>
228
+ </el-button>
229
+ </el-button-group>`,
230
+ };
231
+ const active_color = ref('default');
232
+ const capitalize = (value: string): string => {
233
+ const text = String(value);
234
+
235
+ return text.charAt(0).toUpperCase() + text.slice(1);
236
+ };
235
237
  </script>
@@ -22,3 +22,305 @@ declare const _default: import("vue").DefineComponent<{}, {}, {
22
22
  handleCheckAllChange(val: CheckboxValueType): void;
23
23
  }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
24
24
  export default _default;
25
+ declare module 'vue' {
26
+ interface GlobalComponents {
27
+ }
28
+ interface GlobalDirectives {
29
+ }
30
+ }
31
+ declare global {
32
+ const __VLS_intrinsicElements: __VLS_IntrinsicElements;
33
+ const __VLS_directiveBindingRestFields: {
34
+ instance: null;
35
+ oldValue: null;
36
+ modifiers: any;
37
+ dir: any;
38
+ };
39
+ const __VLS_unref: typeof import('vue').unref;
40
+ const __VLS_nativeElements: {
41
+ a: HTMLAnchorElement;
42
+ abbr: HTMLElement;
43
+ address: HTMLElement;
44
+ area: HTMLAreaElement;
45
+ article: HTMLElement;
46
+ aside: HTMLElement;
47
+ audio: HTMLAudioElement;
48
+ b: HTMLElement;
49
+ base: HTMLBaseElement;
50
+ bdi: HTMLElement;
51
+ bdo: HTMLElement;
52
+ blockquote: HTMLQuoteElement;
53
+ body: HTMLBodyElement;
54
+ br: HTMLBRElement;
55
+ button: HTMLButtonElement;
56
+ canvas: HTMLCanvasElement;
57
+ caption: HTMLTableCaptionElement;
58
+ cite: HTMLElement;
59
+ code: HTMLElement;
60
+ col: HTMLTableColElement;
61
+ colgroup: HTMLTableColElement;
62
+ data: HTMLDataElement;
63
+ datalist: HTMLDataListElement;
64
+ dd: HTMLElement;
65
+ del: HTMLModElement;
66
+ details: HTMLDetailsElement;
67
+ dfn: HTMLElement;
68
+ dialog: HTMLDialogElement;
69
+ div: HTMLDivElement;
70
+ dl: HTMLDListElement;
71
+ dt: HTMLElement;
72
+ em: HTMLElement;
73
+ embed: HTMLEmbedElement;
74
+ fieldset: HTMLFieldSetElement;
75
+ figcaption: HTMLElement;
76
+ figure: HTMLElement;
77
+ footer: HTMLElement;
78
+ form: HTMLFormElement;
79
+ h1: HTMLHeadingElement;
80
+ h2: HTMLHeadingElement;
81
+ h3: HTMLHeadingElement;
82
+ h4: HTMLHeadingElement;
83
+ h5: HTMLHeadingElement;
84
+ h6: HTMLHeadingElement;
85
+ head: HTMLHeadElement;
86
+ header: HTMLElement;
87
+ hgroup: HTMLElement;
88
+ hr: HTMLHRElement;
89
+ html: HTMLHtmlElement;
90
+ i: HTMLElement;
91
+ iframe: HTMLIFrameElement;
92
+ img: HTMLImageElement;
93
+ input: HTMLInputElement;
94
+ ins: HTMLModElement;
95
+ kbd: HTMLElement;
96
+ label: HTMLLabelElement;
97
+ legend: HTMLLegendElement;
98
+ li: HTMLLIElement;
99
+ link: HTMLLinkElement;
100
+ main: HTMLElement;
101
+ map: HTMLMapElement;
102
+ mark: HTMLElement;
103
+ menu: HTMLMenuElement;
104
+ meta: HTMLMetaElement;
105
+ meter: HTMLMeterElement;
106
+ nav: HTMLElement;
107
+ noscript: HTMLElement;
108
+ object: HTMLObjectElement;
109
+ ol: HTMLOListElement;
110
+ optgroup: HTMLOptGroupElement;
111
+ option: HTMLOptionElement;
112
+ output: HTMLOutputElement;
113
+ p: HTMLParagraphElement;
114
+ picture: HTMLPictureElement;
115
+ pre: HTMLPreElement;
116
+ progress: HTMLProgressElement;
117
+ q: HTMLQuoteElement;
118
+ rp: HTMLElement;
119
+ rt: HTMLElement;
120
+ ruby: HTMLElement;
121
+ s: HTMLElement;
122
+ samp: HTMLElement;
123
+ script: HTMLScriptElement;
124
+ search: HTMLElement;
125
+ section: HTMLElement;
126
+ select: HTMLSelectElement;
127
+ slot: HTMLSlotElement;
128
+ small: HTMLElement;
129
+ source: HTMLSourceElement;
130
+ span: HTMLSpanElement;
131
+ strong: HTMLElement;
132
+ style: HTMLStyleElement;
133
+ sub: HTMLElement;
134
+ summary: HTMLElement;
135
+ sup: HTMLElement;
136
+ table: HTMLTableElement;
137
+ tbody: HTMLTableSectionElement;
138
+ td: HTMLTableCellElement;
139
+ template: HTMLTemplateElement;
140
+ textarea: HTMLTextAreaElement;
141
+ tfoot: HTMLTableSectionElement;
142
+ th: HTMLTableCellElement;
143
+ thead: HTMLTableSectionElement;
144
+ time: HTMLTimeElement;
145
+ title: HTMLTitleElement;
146
+ tr: HTMLTableRowElement;
147
+ track: HTMLTrackElement;
148
+ u: HTMLElement;
149
+ ul: HTMLUListElement;
150
+ var: HTMLElement;
151
+ video: HTMLVideoElement;
152
+ wbr: HTMLElement;
153
+ animate: SVGAnimateElement;
154
+ animateMotion: SVGAnimateMotionElement;
155
+ animateTransform: SVGAnimateTransformElement;
156
+ circle: SVGCircleElement;
157
+ clipPath: SVGClipPathElement;
158
+ defs: SVGDefsElement;
159
+ desc: SVGDescElement;
160
+ ellipse: SVGEllipseElement;
161
+ feBlend: SVGFEBlendElement;
162
+ feColorMatrix: SVGFEColorMatrixElement;
163
+ feComponentTransfer: SVGFEComponentTransferElement;
164
+ feComposite: SVGFECompositeElement;
165
+ feConvolveMatrix: SVGFEConvolveMatrixElement;
166
+ feDiffuseLighting: SVGFEDiffuseLightingElement;
167
+ feDisplacementMap: SVGFEDisplacementMapElement;
168
+ feDistantLight: SVGFEDistantLightElement;
169
+ feDropShadow: SVGFEDropShadowElement;
170
+ feFlood: SVGFEFloodElement;
171
+ feFuncA: SVGFEFuncAElement;
172
+ feFuncB: SVGFEFuncBElement;
173
+ feFuncG: SVGFEFuncGElement;
174
+ feFuncR: SVGFEFuncRElement;
175
+ feGaussianBlur: SVGFEGaussianBlurElement;
176
+ feImage: SVGFEImageElement;
177
+ feMerge: SVGFEMergeElement;
178
+ feMergeNode: SVGFEMergeNodeElement;
179
+ feMorphology: SVGFEMorphologyElement;
180
+ feOffset: SVGFEOffsetElement;
181
+ fePointLight: SVGFEPointLightElement;
182
+ feSpecularLighting: SVGFESpecularLightingElement;
183
+ feSpotLight: SVGFESpotLightElement;
184
+ feTile: SVGFETileElement;
185
+ feTurbulence: SVGFETurbulenceElement;
186
+ filter: SVGFilterElement;
187
+ foreignObject: SVGForeignObjectElement;
188
+ g: SVGGElement;
189
+ image: SVGImageElement;
190
+ line: SVGLineElement;
191
+ linearGradient: SVGLinearGradientElement;
192
+ marker: SVGMarkerElement;
193
+ mask: SVGMaskElement;
194
+ metadata: SVGMetadataElement;
195
+ mpath: SVGMPathElement;
196
+ path: SVGPathElement;
197
+ pattern: SVGPatternElement;
198
+ polygon: SVGPolygonElement;
199
+ polyline: SVGPolylineElement;
200
+ radialGradient: SVGRadialGradientElement;
201
+ rect: SVGRectElement;
202
+ set: SVGSetElement;
203
+ stop: SVGStopElement;
204
+ svg: SVGSVGElement;
205
+ switch: SVGSwitchElement;
206
+ symbol: SVGSymbolElement;
207
+ text: SVGTextElement;
208
+ textPath: SVGTextPathElement;
209
+ tspan: SVGTSpanElement;
210
+ use: SVGUseElement;
211
+ view: SVGViewElement;
212
+ };
213
+ type __VLS_IntrinsicElements = import('vue/jsx-runtime').JSX.IntrinsicElements;
214
+ type __VLS_Element = import('vue/jsx-runtime').JSX.Element;
215
+ type __VLS_GlobalComponents = import('vue').GlobalComponents & Pick<typeof import('vue'), 'Transition' | 'TransitionGroup' | 'KeepAlive' | 'Suspense' | 'Teleport'>;
216
+ type __VLS_GlobalDirectives = import('vue').GlobalDirectives;
217
+ type __VLS_IsAny<T> = 0 extends 1 & T ? true : false;
218
+ type __VLS_PickNotAny<A, B> = __VLS_IsAny<A> extends true ? B : A;
219
+ type __VLS_unknownDirective = (arg1: unknown, arg2: unknown, arg3: unknown, arg4: unknown) => void;
220
+ type __VLS_WithComponent<N0 extends string, LocalComponents, N1 extends string, N2 extends string, N3 extends string> = N1 extends keyof LocalComponents ? N1 extends N0 ? Pick<LocalComponents, N0 extends keyof LocalComponents ? N0 : never> : {
221
+ [K in N0]: LocalComponents[N1];
222
+ } : N2 extends keyof LocalComponents ? N2 extends N0 ? Pick<LocalComponents, N0 extends keyof LocalComponents ? N0 : never> : {
223
+ [K in N0]: LocalComponents[N2];
224
+ } : N3 extends keyof LocalComponents ? N3 extends N0 ? Pick<LocalComponents, N0 extends keyof LocalComponents ? N0 : never> : {
225
+ [K in N0]: LocalComponents[N3];
226
+ } : N1 extends keyof __VLS_GlobalComponents ? N1 extends N0 ? Pick<__VLS_GlobalComponents, N0 extends keyof __VLS_GlobalComponents ? N0 : never> : {
227
+ [K in N0]: __VLS_GlobalComponents[N1];
228
+ } : N2 extends keyof __VLS_GlobalComponents ? N2 extends N0 ? Pick<__VLS_GlobalComponents, N0 extends keyof __VLS_GlobalComponents ? N0 : never> : {
229
+ [K in N0]: __VLS_GlobalComponents[N2];
230
+ } : N3 extends keyof __VLS_GlobalComponents ? N3 extends N0 ? Pick<__VLS_GlobalComponents, N0 extends keyof __VLS_GlobalComponents ? N0 : never> : {
231
+ [K in N0]: __VLS_GlobalComponents[N3];
232
+ } : {
233
+ [K in N0]: unknown;
234
+ };
235
+ type __VLS_FunctionalComponentProps<T, K> = '__ctx' extends keyof __VLS_PickNotAny<K, {}> ? K extends {
236
+ __ctx?: {
237
+ props?: infer P;
238
+ };
239
+ } ? NonNullable<P> : never : T extends (props: infer P, ...args: any) => any ? P : {};
240
+ type __VLS_IsFunction<T, K> = K extends keyof T ? __VLS_IsAny<T[K]> extends false ? unknown extends T[K] ? false : true : false : false;
241
+ type __VLS_UnionToIntersection<U> = (U extends unknown ? (arg: U) => unknown : never) extends ((arg: infer P) => unknown) ? P : never;
242
+ type __VLS_OverloadUnionInner<T, U = unknown> = U & T extends (...args: infer A) => infer R ? U extends T ? never : __VLS_OverloadUnionInner<T, Pick<T, keyof T> & U & ((...args: A) => R)> | ((...args: A) => R) : never;
243
+ type __VLS_OverloadUnion<T> = Exclude<__VLS_OverloadUnionInner<(() => never) & T>, T extends () => never ? never : () => never>;
244
+ type __VLS_ConstructorOverloads<T> = __VLS_OverloadUnion<T> extends infer F ? F extends (event: infer E, ...args: infer A) => any ? {
245
+ [K in E & string]: (...args: A) => void;
246
+ } : never : never;
247
+ type __VLS_NormalizeEmits<T> = __VLS_PrettifyGlobal<__VLS_UnionToIntersection<__VLS_ConstructorOverloads<T> & {
248
+ [K in keyof T]: T[K] extends any[] ? {
249
+ (...args: T[K]): void;
250
+ } : never;
251
+ }>>;
252
+ type __VLS_PrettifyGlobal<T> = {
253
+ [K in keyof T]: T[K];
254
+ } & {};
255
+ function __VLS_getVForSourceType(source: number): [number, number, number][];
256
+ function __VLS_getVForSourceType(source: string): [string, number, number][];
257
+ function __VLS_getVForSourceType<T extends any[]>(source: T): [
258
+ item: T[number],
259
+ key: number,
260
+ index: number
261
+ ][];
262
+ function __VLS_getVForSourceType<T extends {
263
+ [Symbol.iterator](): Iterator<any>;
264
+ }>(source: T): [
265
+ item: T extends {
266
+ [Symbol.iterator](): Iterator<infer T1>;
267
+ } ? T1 : never,
268
+ key: number,
269
+ index: undefined
270
+ ][];
271
+ function __VLS_getVForSourceType<T extends number | {
272
+ [Symbol.iterator](): Iterator<any>;
273
+ }>(source: T): [
274
+ item: number | (Exclude<T, number> extends {
275
+ [Symbol.iterator](): Iterator<infer T1>;
276
+ } ? T1 : never),
277
+ key: number,
278
+ index: undefined
279
+ ][];
280
+ function __VLS_getVForSourceType<T>(source: T): [
281
+ item: T[keyof T],
282
+ key: keyof T,
283
+ index: number
284
+ ][];
285
+ function __VLS_getSlotParams<T>(slot: T): Parameters<__VLS_PickNotAny<NonNullable<T>, (...args: any[]) => any>>;
286
+ function __VLS_getSlotParam<T>(slot: T): Parameters<__VLS_PickNotAny<NonNullable<T>, (...args: any[]) => any>>[0];
287
+ function __VLS_directiveAsFunction<T extends import('vue').Directive>(dir: T): T extends (...args: any) => any ? T | __VLS_unknownDirective : NonNullable<(T & Record<string, __VLS_unknownDirective>)['created' | 'beforeMount' | 'mounted' | 'beforeUpdate' | 'updated' | 'beforeUnmount' | 'unmounted']>;
288
+ function __VLS_withScope<T, K>(ctx: T, scope: K): ctx is T & K;
289
+ function __VLS_makeOptional<T>(t: T): {
290
+ [K in keyof T]?: T[K];
291
+ };
292
+ function __VLS_nonNullable<T>(t: T): T extends null | undefined ? never : T;
293
+ function __VLS_asFunctionalComponent<T, K = T extends new (...args: any) => any ? InstanceType<T> : unknown>(t: T, instance?: K): T extends new (...args: any) => any ? (props: (K extends {
294
+ $props: infer Props;
295
+ } ? Props : any) & Record<string, unknown>, ctx?: any) => __VLS_Element & {
296
+ __ctx?: {
297
+ attrs?: any;
298
+ slots?: K extends {
299
+ $slots: infer Slots;
300
+ } ? Slots : any;
301
+ emit?: K extends {
302
+ $emit: infer Emit;
303
+ } ? Emit : any;
304
+ } & {
305
+ props?: (K extends {
306
+ $props: infer Props;
307
+ } ? Props : any) & Record<string, unknown>;
308
+ expose?(exposed: K): void;
309
+ };
310
+ } : T extends () => any ? (props: {}, ctx?: any) => ReturnType<T> : T extends (...args: any) => any ? T : (_: {} & Record<string, unknown>, ctx?: any) => {
311
+ __ctx?: {
312
+ attrs?: any;
313
+ expose?: any;
314
+ slots?: any;
315
+ emit?: any;
316
+ props?: {} & Record<string, unknown>;
317
+ };
318
+ };
319
+ function __VLS_elementAsFunction<T>(tag: T, endTag?: T): (_: T & Record<string, unknown>) => void;
320
+ function __VLS_functionalComponentArgsRest<T extends (...args: any) => any>(t: T): 2 extends Parameters<T>['length'] ? [any] : [];
321
+ function __VLS_pickFunctionalComponentCtx<T, K>(comp: T, compInstance: K): NonNullable<__VLS_PickNotAny<'__ctx' extends keyof __VLS_PickNotAny<K, {}> ? K extends {
322
+ __ctx?: infer Ctx;
323
+ } ? Ctx : never : any, T extends (props: any, ctx: infer Ctx) => any ? Ctx : any>>;
324
+ function __VLS_normalizeSlot<S>(s: S): S extends () => infer R ? (props: {}) => R : S;
325
+ function __VLS_tryAsConstant<const T>(t: T): T;
326
+ }
@@ -147,6 +147,7 @@
147
147
 
148
148
  <script lang="ts" setup>
149
149
  import { ElIcon } from 'element-plus';
150
+ import { ref } from 'vue';
150
151
 
151
152
  const placement_list = ref(['top-start', 'top', 'top-end', 'bottom-start', 'bottom', 'bottom-end']);
152
153
  const placement_selected = ref('top-start');
@@ -216,55 +216,46 @@
216
216
  </div>
217
217
  </template>
218
218
 
219
- <script>
220
- import { Calendar, Search } from "@element-plus/icons-vue";
221
- import { defineComponent } from "vue";
222
- export default defineComponent({
223
- name: "TimusInput",
224
- components: { Calendar, Search },
225
- data() {
226
- return {
227
- sizes: ["default", "large", "medium", "small", "mini"],
228
- colors: ["primary", "secondary", "neutral", "success", "warning", "info", "danger"],
229
- input: "",
230
- textarea: "",
231
- select: "1",
232
- snippets: {
233
- formatter: `<el-input
234
- v-model="input"
235
- placeholder="Please input"
236
- :formatter="(value: string) => \`$ \${value}\`.replace(/\\B(?=(\\d{3})+(?!\\d))/g, ',')"
237
- :parser="(value: string) => value.replace(/\\$\\s?|(,*)/g, '')"
238
- />`,
239
- password: `<el-input v-model="input" type="password" placeholder="Please input password" show-password />`,
240
- icons: {
241
- suffix: `
242
- // suffix
243
- <el-input v-model="input" :suffix-icon="ElIconCalendar" />`,
244
- slot: `
245
- // slot
246
- <el-input v-model="input" style="width: 240px" placeholder="Pick a date">
247
- <template #suffix>
248
- <el-icon class="el-input__icon"><calendar /></el-icon>
249
- </template>
250
- </el-input>
251
- `
252
- },
253
- textarea: `<el-input v-model="textarea" style="width: 240px" :rows="2" type="textarea" placeholder="Please input" />`,
254
- mixed: `
255
- <el-input v-model="input" style="max-width: 600px" placeholder="Please input">
256
- <template #prepend>Http://</template>
257
- <template #append><el-button :icon="ElIconSearch" type="primary" /></template>
258
- </el-input>
259
- `
260
- }
261
- };
262
- },
263
- methods: {
264
- capitalize(value) {
265
- const text = String(value);
266
- return text.charAt(0).toUpperCase() + text.slice(1);
267
- }
268
- }
269
- });
219
+ <script lang="ts" setup>
220
+ import { Calendar as ElIconCalendar, Search as ElIconSearch } from '@element-plus/icons-vue';
221
+ import { ref } from 'vue';
222
+
223
+ const sizes = ['default', 'large', 'medium', 'small', 'mini'];
224
+ const input = ref('');
225
+ const textarea = ref('');
226
+ const select = ref('1');
227
+ const snippets = {
228
+ formatter: `<el-input
229
+ v-model="input"
230
+ placeholder="Please input"
231
+ :formatter="(value: string) => \`$ \${value}\`.replace(/\\B(?=(\\d{3})+(?!\\d))/g, ',')"
232
+ :parser="(value: string) => value.replace(/\\$\\s?|(,*)/g, '')"
233
+ />`,
234
+ password: `<el-input v-model="input" type="password" placeholder="Please input password" show-password />`,
235
+ icons: {
236
+ suffix: `
237
+ // suffix
238
+ <el-input v-model="input" :suffix-icon="ElIconCalendar" />`,
239
+ slot: `
240
+ // slot
241
+ <el-input v-model="input" style="width: 240px" placeholder="Pick a date">
242
+ <template #suffix>
243
+ <el-icon class="el-input__icon"><calendar /></el-icon>
244
+ </template>
245
+ </el-input>
246
+ `,
247
+ },
248
+ textarea: `<el-input v-model="textarea" style="width: 240px" :rows="2" type="textarea" placeholder="Please input" />`,
249
+ mixed: `
250
+ <el-input v-model="input" style="max-width: 600px" placeholder="Please input">
251
+ <template #prepend>Http://</template>
252
+ <template #append><el-button :icon="ElIconSearch" type="primary" /></template>
253
+ </el-input>
254
+ `,
255
+ };
256
+ const capitalize = (value: string): string => {
257
+ const text = String(value);
258
+
259
+ return text.charAt(0).toUpperCase() + text.slice(1);
260
+ };
270
261
  </script>
@@ -58,6 +58,9 @@
58
58
  </template>
59
59
 
60
60
  <script lang="ts" setup>
61
+ import { Plus as ElIconPlus } from '@element-plus/icons-vue';
62
+ import { ref } from 'vue';
63
+
61
64
  const colors = ref<string[]>(['default', 'primary', 'secondary', 'neutral', 'success', 'warning', 'info', 'danger']);
62
65
  const snippets = ref({
63
66
  basic: `<el-link href="https://element-plus.org" target="_blank" type="secondary">default</el-link>`,
@@ -52,38 +52,47 @@
52
52
  </el-card>
53
53
  </div>
54
54
  </template>
55
-
56
55
  <script lang="ts" setup>
57
- import { ref } from 'vue';
56
+ import { reactive, ref, toRefs } from 'vue';
57
+
58
+ interface PaginationState {
59
+ current_page: number;
60
+ size: string;
61
+ page_size: number;
62
+ disabled: boolean;
63
+ background: string;
64
+ handleSizeChange: (pageSize: number) => void;
65
+ handleCurrentChange: (page: number) => void;
66
+ }
58
67
 
59
- const pagination = ref({
68
+ const paginationState = reactive<PaginationState>({
60
69
  current_page: 2,
61
70
  size: 'small',
62
71
  page_size: 20,
63
72
  disabled: false,
64
73
  background: 'transparent',
65
- handleSizeChange: (pageSize) => {
74
+ handleSizeChange: (pageSize: number) => {
66
75
  console.log(pageSize);
67
76
  },
68
- handleCurrentChange: (page) => {
77
+ handleCurrentChange: (page: number) => {
69
78
  console.log(page);
70
79
  },
71
80
  });
72
- const { current_page, size, page_size, disabled, background, handleSizeChange, handleCurrentChange } = toRefs(pagination);
81
+ const { current_page, size, page_size, disabled, background, handleSizeChange, handleCurrentChange } = toRefs(paginationState);
73
82
  const snippets = ref({
74
83
  basic: `
75
- <el-pagination
76
- v-model:current-page="current_page"
77
- v-model:page-size="page_size"
78
- :page-sizes="[10, 20, 50, 100]"
79
- :size="size"
80
- :background="background"
81
- layout="total, prev, pager, next, jumper, sizes"
82
- :total="40000"
83
- @size-change="handleSizeChange"
84
- @current-change="handleCurrentChange"
85
- />
86
- `,
84
+ <el-pagination
85
+ v-model:current-page="current_page"
86
+ v-model:page-size="page_size"
87
+ :page-sizes="[10, 20, 50, 100]"
88
+ :size="size"
89
+ :background="background"
90
+ layout="total, prev, pager, next, jumper, sizes"
91
+ :total="40000"
92
+ @size-change="handleSizeChange"
93
+ @current-change="handleCurrentChange"
94
+ />
95
+ `,
87
96
  disable: `<el-pagination :disabled="true" />`,
88
97
  });
89
98
  </script>