vuesp-components 1.3.1 → 1.3.3

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/README.md CHANGED
@@ -1,7 +1,191 @@
1
1
  # Vuesp components
2
2
 
3
- Component library for [Vuesp](https://github.com/bondrogeen/vuesp) - Template for your arduino projects with a web interface.
3
+ Component library for [Vuesp](https://github.com/bondrogeen/vuesp) - Template for your arduino projects with a web interface.
4
4
 
5
+ ## Installation
6
+
7
+ ### npm
8
+
9
+ ```bash
10
+ npm install vuesp-components
11
+ ```
12
+
13
+ ### yarn
14
+
15
+ ```bash
16
+ yarn add vuesp-components
17
+ ```
18
+
19
+ ### pnpm
20
+
21
+ ```bash
22
+ pnpm add vuesp-components
23
+ ```
24
+
25
+ ## Usage
26
+
27
+ ### Basic Setup
28
+
29
+ Import the components and styles in your Vue app:
30
+
31
+ ```typescript
32
+ import { createApp } from 'vue'
33
+ import App from './App.vue'
34
+ import * as components from 'vuesp-components'
35
+ import 'vuesp-components/dist/style.css'
36
+
37
+ const app = createApp(App)
38
+
39
+ // Register all components globally
40
+ Object.entries(components).forEach(([name, component]) => {
41
+ if (typeof component === 'object' && component.name) {
42
+ app.component(component.name, component)
43
+ }
44
+ })
45
+
46
+ app.mount('#app')
47
+ ```
48
+
49
+ ### Using Components
50
+
51
+ #### UI Components
52
+
53
+ ```vue
54
+ <template>
55
+ <div>
56
+ <VButton color="primary" @click="handleClick">Click me</VButton>
57
+ <VTextField v-model="text" label="Input text" />
58
+ <VSelect v-model="selected" :list="options" />
59
+ <VCheckbox v-model="checked" />
60
+ </div>
61
+ </template>
62
+
63
+ <script setup lang="ts">
64
+ import { ref } from 'vue'
65
+
66
+ const text = ref('')
67
+ const selected = ref('')
68
+ const checked = ref(false)
69
+ const options = [
70
+ { label: 'Option 1', value: 1 },
71
+ { label: 'Option 2', value: 2 },
72
+ ]
73
+
74
+ const handleClick = () => {
75
+ console.log('Button clicked')
76
+ }
77
+ </script>
78
+ ```
79
+
80
+ #### App Layout Components
81
+
82
+ ```vue
83
+ <template>
84
+ <div class="app">
85
+ <AppHeader :changeTheme="toggleTheme" :notifications="notifications" />
86
+ <AppNav :menu="menuItems" :fullPath="route.path" />
87
+ <div class="app-content">
88
+ <RouterView />
89
+ </div>
90
+ <AppNotification ref="notification" />
91
+ </div>
92
+ </template>
93
+ ```
94
+
95
+ #### Dashboard Components
96
+
97
+ ```vue
98
+ <template>
99
+ <div class="dashboard">
100
+ <CardBase label="Temperature" icon="thermometer">
101
+ <CardInput :value="temperature" @input="updateTemp" />
102
+ </CardBase>
103
+ <CardBase label="Status" icon="info">
104
+ <CardButton label="Toggle" @click="toggleStatus" />
105
+ </CardBase>
106
+ </div>
107
+ </template>
108
+ ```
109
+
110
+ ### Composables
111
+
112
+ ```typescript
113
+ import { useForms } from 'vuesp-components/composables'
114
+
115
+ const { formData, submitForm, resetForm } = useForms()
116
+ ```
117
+
118
+ ### Helpers
119
+
120
+ ```typescript
121
+ import { someHelper } from 'vuesp-components/helpers'
122
+ ```
123
+
124
+ ### Plugins
125
+
126
+ ```typescript
127
+ import { i18nPlugin } from 'vuesp-components/plugins'
128
+
129
+ app.use(i18nPlugin, {
130
+ locale: 'en',
131
+ })
132
+ ```
133
+
134
+ ## Features
135
+
136
+ - ✅ Vue 3 with TypeScript support
137
+ - ✅ Tailwind CSS styling
138
+ - ✅ Fully typed components
139
+ - ✅ Accessible UI components
140
+ - ✅ Responsive design
141
+ - ✅ Dark mode support
142
+ - ✅ Dashboard components for IoT interfaces
143
+ - ✅ Form utilities and composables
144
+ - ✅ i18n integration
145
+
146
+ ## Components
147
+
148
+ ### UI Components
149
+ - `VButton` - Button component
150
+ - `VCheckbox` - Checkbox component
151
+ - `VTextField` - Text input field
152
+ - `VSelect` - Select dropdown
153
+ - `VAutocomplete` - Autocomplete input
154
+ - `VTable` - Data table
155
+ - `VTabs` - Tabs component
156
+ - `VAccordion` - Accordion component
157
+ - `VDropdown` - Dropdown menu
158
+ - `VLoader` - Loading spinner
159
+ - `VIcon` - Icon component
160
+ - `VFile` - File upload
161
+ - `VDragDrop` - Drag and drop
162
+ - `VExpansion` - Expansion panel
163
+ - `VList` - List component
164
+
165
+ ### App Components
166
+ - `AppHeader` - Header with theme toggle
167
+ - `AppNav` - Navigation menu
168
+ - `AppAside` - Sidebar
169
+ - `AppDialog` - Modal dialog
170
+ - `AppNotification` - Toast notifications
171
+ - `AppProgress` - Progress bar
172
+
173
+ ### Dashboard Components
174
+ - `CardBase` - Base card
175
+ - `CardButton` - Button card
176
+ - `CardDate` - Date card
177
+ - `CardDimmer` - Dimmer control
178
+ - `CardInfo` - Info card
179
+ - `CardInput` - Input card
180
+ - `CardList` - List card
181
+ - `ItemEdit` - Edit item component
182
+ - `ItemOptions` - Options component
183
+
184
+ ## License
185
+
186
+ ## 1.3.1 (2026-06-22)
187
+
188
+ - (bondrogeen) Build fixes and documentation updates
5
189
 
6
190
  ## 1.3.0 (2025-10-09)
7
191
 
@@ -1 +1 @@
1
- {"version":3,"file":"AppAside.vue.d.ts","sourceRoot":"","sources":["../../../src/components/app/AppAside.vue"],"names":[],"mappings":"AAmBA;AAsCA,OAAO,KAAK,EAAE,cAAc,EAAkB,MAAM,wBAAwB,CAAC;AAoB7E,iBAAS,cAAc;WA2ET,OAAO,IAA6B;;yBAVpB,GAAG;;;;EAehC;AAWD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;6EAOnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAQpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"AppAside.vue.d.ts","sourceRoot":"","sources":["../../../src/components/app/AppAside.vue"],"names":[],"mappings":"AAmBA;AAqCA,OAAO,KAAK,EAAE,cAAc,EAAkB,MAAM,wBAAwB,CAAC;AAmB7E,iBAAS,cAAc;WA2ET,OAAO,IAA6B;;yBAVpB,GAAG;;;;EAehC;AAWD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;6EAOnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAQpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,10 +1,10 @@
1
- import { IVDragDropProps } from './types';
1
+ import { IVDragDropProps, IVDragDropItem } from './types';
2
2
  declare function __VLS_template(): {
3
3
  attrs: Partial<{}>;
4
4
  slots: {
5
5
  default?(_: {
6
- item: any;
7
- key: any;
6
+ item: IVDragDropItem;
7
+ key: number;
8
8
  index: number;
9
9
  isDragging: boolean;
10
10
  }): any;
@@ -14,20 +14,20 @@ declare function __VLS_template(): {
14
14
  };
15
15
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
16
16
  declare const __VLS_component: import('vue').DefineComponent<IVDragDropProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
17
- "update:items": (items: any[]) => any;
17
+ "update:items": (items: IVDragDropItem[]) => any;
18
18
  "order-change": (payload: {
19
19
  fromIndex: number;
20
20
  toIndex: number;
21
- movedItem: unknown;
22
- newOrder: unknown[];
21
+ movedItem: IVDragDropItem;
22
+ newOrder: IVDragDropItem[];
23
23
  }) => any;
24
24
  }, string, import('vue').PublicProps, Readonly<IVDragDropProps & {
25
- "onUpdate:items"?: ((items: any[]) => any) | undefined;
25
+ "onUpdate:items"?: ((items: IVDragDropItem[]) => any) | undefined;
26
26
  "onOrder-change"?: ((payload: {
27
27
  fromIndex: number;
28
28
  toIndex: number;
29
- movedItem: unknown;
30
- newOrder: unknown[];
29
+ movedItem: IVDragDropItem;
30
+ newOrder: IVDragDropItem[];
31
31
  }) => any) | undefined;
32
32
  }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}>;
33
33
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
@@ -1 +1 @@
1
- {"version":3,"file":"VDragDrop.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/drag-drop/VDragDrop.vue"],"names":[],"mappings":"AA6BA;AAmFA,OAAO,EAAE,eAAe,EAAmC,MAAM,iCAAiC,CAAC;AAwDnG,iBAAS,cAAc;WAyET,OAAO,IAA6B;;;;;;;YAVrB,GAAG;;;;EAe/B;AAgBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;6EAQnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAQpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"VDragDrop.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/drag-drop/VDragDrop.vue"],"names":[],"mappings":"AA6BA;AAmFA,OAAO,EAAE,eAAe,EAAmB,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAwDnG,iBAAS,cAAc;WAyET,OAAO,IAA6B;;;;;;;YAVrB,GAAG;;;;EAe/B;AAgBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;6EAQnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAQpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -2,16 +2,16 @@ export interface IVDragDropItem {
2
2
  id: number;
3
3
  }
4
4
  export interface IVDragDropProps {
5
- items: any[];
5
+ items: IVDragDropItem[];
6
6
  itemKey?: 'id';
7
7
  }
8
8
  export interface IVDragDropEmits {
9
- (e: 'update:items', items: any[]): void;
9
+ (e: 'update:items', items: IVDragDropItem[]): void;
10
10
  (e: 'order-change', payload: {
11
11
  fromIndex: number;
12
12
  toIndex: number;
13
- movedItem: unknown;
14
- newOrder: unknown[];
13
+ movedItem: IVDragDropItem;
14
+ newOrder: IVDragDropItem[];
15
15
  }): void;
16
16
  }
17
17
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/drag-drop/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,GAAG,EAAE,CAAC;IACb,OAAO,CAAC,EAAE,IAAI,CAAC;CAChB;AACD,MAAM,WAAW,eAAe;IAC9B,CAAC,CAAC,EAAE,cAAc,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;IACxC,CAAC,CAAC,EAAE,cAAc,EAAE,OAAO,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,OAAO,CAAC;QAAC,QAAQ,EAAE,OAAO,EAAE,CAAA;KAAE,GAAG,IAAI,CAAC;CACrH"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/drag-drop/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,OAAO,CAAC,EAAE,IAAI,CAAC;CAChB;AACD,MAAM,WAAW,eAAe;IAC9B,CAAC,CAAC,EAAE,cAAc,EAAE,KAAK,EAAE,cAAc,EAAE,GAAG,IAAI,CAAC;IACnD,CAAC,CAAC,EAAE,cAAc,EAAE,OAAO,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,cAAc,CAAC;QAAC,QAAQ,EAAE,cAAc,EAAE,CAAA;KAAE,GAAG,IAAI,CAAC;CACnI"}
@@ -2,7 +2,7 @@ import { reactive as h, computed as F } from "vue";
2
2
  function S(d) {
3
3
  const { validationSchema: n, initialValues: f = {} } = d, s = h({}), e = h({}), u = h({}), l = h({}), E = () => {
4
4
  Object.keys(n).forEach((t) => {
5
- s[t] = f[t] || "", e[t] = [], u[t] = !1, l[t] = !1;
5
+ s[t] = f[t] ?? "", e[t] = [], u[t] = !1, l[t] = !1;
6
6
  });
7
7
  }, v = (t, r) => {
8
8
  const a = n[t] || [], c = [];
@@ -1,5 +1,5 @@
1
1
  import { Ref, ComputedRef } from 'vue';
2
- export type Validator = (value: string, values?: Record<string, any>) => true | string;
2
+ export type Validator = (value: string, values?: Record<string, unknown>) => true | string;
3
3
  export type ValidationSchema = Record<string, Validator[]>;
4
4
  export interface FieldState {
5
5
  value: string | number;
@@ -8,13 +8,13 @@ export interface FieldState {
8
8
  dirty: boolean;
9
9
  }
10
10
  export interface FormState {
11
- values: Record<string, any>;
11
+ values: Record<string, unknown>;
12
12
  errors: Record<string, string[]>;
13
13
  touched: Record<string, boolean>;
14
14
  dirty: Record<string, boolean>;
15
15
  }
16
16
  export interface DefineFieldOptions {
17
- props?: (context: FieldContext) => Record<string, any>;
17
+ props?: (context: FieldContext) => Record<string, unknown>;
18
18
  }
19
19
  export interface FieldContext {
20
20
  errors: string[];
@@ -23,13 +23,13 @@ export interface FieldContext {
23
23
  }
24
24
  export interface UseFormOptions {
25
25
  validationSchema: ValidationSchema;
26
- initialValues?: Record<string, any>;
26
+ initialValues?: Record<string, unknown>;
27
27
  }
28
28
  export interface UseFormReturn {
29
- values: Record<string, any>;
29
+ values: Record<string, unknown>;
30
30
  errors: Record<string, string[]>;
31
- defineField: <T = any>(name: string, options?: DefineFieldOptions) => [Ref<T>, ComputedRef<Record<string, any>>];
32
- handleSubmit: (callback: (values: Record<string, any>) => void | Promise<void>) => (event?: Event) => Promise<void>;
31
+ defineField: <T = unknown>(name: string, options?: DefineFieldOptions) => [Ref<T>, ComputedRef<Record<string, unknown>>];
32
+ handleSubmit: (callback: (values: Record<string, unknown>) => void | Promise<void>) => (event?: Event) => Promise<void>;
33
33
  resetForm: () => void;
34
34
  validate: () => boolean;
35
35
  }
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/composables/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,KAAK,CAAC;AAE5C,MAAM,MAAM,SAAS,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,IAAI,GAAG,MAAM,CAAC;AACvF,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC;AAE3D,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,OAAO,CAAC;CAChB;AAED,MAAM,WAAW,SAAS;IACxB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,C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M,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IACjC,WAAW,EAAE,CAAC,CAAC,GAAG,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,kBAAkB,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;IACzH,YAAY,EAAE,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,KAAK,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACxH,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,QAAQ,EAAE,MAAM,OAAO,CAAC;CACzB"}
@@ -1,11 +1,11 @@
1
- import { TypeGetDataValue, TypeGetParamsData, IDashboardItem } from '../types/types';
1
+ import { TypeGetDataValue, TypeGetParamsData, IDashboardItem, GetTypeByPath } from '../types/types';
2
2
  export declare const getDataValue: TypeGetDataValue;
3
3
  export declare const getParamsData: TypeGetParamsData;
4
4
  export declare const getFunction: (body: string | undefined) => Function | null;
5
5
  export declare const setStateItem: <T>(item: IDashboardItem, value: unknown, object: T) => any;
6
6
  export declare const getStateItem: <T>(item: IDashboardItem, object: T) => {
7
- value: string | NonNullable<import('../types/types').GetTypeByPath<T, string>>;
8
- valueTo: string | NonNullable<import('../types/types').GetTypeByPath<T, string>>;
7
+ value: string | NonNullable<GetTypeByPath<T, string>>;
8
+ valueTo: string | NonNullable<GetTypeByPath<T, string>>;
9
9
  id: string;
10
10
  name: string;
11
11
  type: string;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/dashboard/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEzF,eAAO,MAAM,YAAY,EAAE,gBAY1B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,iBAE3B,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,MAAM,MAAM,GAAG,SAAS,oBAInD,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,CAAC,EAAE,MAAM,cAAc,EAAE,OAAO,OAAO,EAAE,QAAQ,CAAC,QAU9E,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,CAAC,EAAE,MAAM,cAAc,EAAE,QAAQ,CAAC;;;;;;;;;;;;CAkB9D,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/dashboard/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAExG,eAAO,MAAM,YAAY,EAAE,gBAY1B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,iBAE3B,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,MAAM,MAAM,GAAG,SAAS,oBAInD,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,CAAC,EAAE,MAAM,cAAc,EAAE,OAAO,OAAO,EAAE,QAAQ,CAAC,QAU9E,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,CAAC,EAAE,MAAM,cAAc,EAAE,QAAQ,CAAC;;;;;;;;;;;;CAkB9D,CAAC"}
@@ -1,38 +1,38 @@
1
- const v = (t, n) => {
2
- const r = t.split(".");
3
- let e = n;
4
- for (const c of r)
5
- if (e !== null && typeof e == "object" && c in e)
6
- e = e[c];
1
+ const v = (t, r) => {
2
+ const c = t.split(".");
3
+ let e = r;
4
+ for (const n of c)
5
+ if (e !== null && typeof e == "object" && n in e)
6
+ e = e[n];
7
7
  else
8
8
  return;
9
9
  return e;
10
- }, i = ({ args: t }, n) => t.map((r) => v(r, n)), l = (t) => t ? (t = t.includes("return") ? t : `return ${t}`, new Function("v", "a", "b", "c", t)) : null, F = (t, n, r) => {
11
- const [e, ...c] = i(t, r);
12
- let s = null;
10
+ }, i = ({ args: t }, r) => t.map((c) => v(c, r)), u = (t) => t ? (t = t.includes("return") ? t : `return ${t}`, new Function("v", "a", "b", "c", t)) : null, F = (t, r, c) => {
11
+ const [, ...e] = i(t, c);
12
+ let n = null;
13
13
  try {
14
- const o = l(t.set);
15
- o && (s = o(n, ...c));
14
+ const o = u(t.set);
15
+ o && (n = o(r, ...e));
16
16
  } catch (o) {
17
17
  console.warn(o);
18
18
  }
19
- return s;
20
- }, p = (t, n) => {
21
- const r = i(t, n), [e, c, s, o] = r;
22
- let a = e ?? "", g = a;
19
+ return n;
20
+ }, p = (t, r) => {
21
+ const c = i(t, r), [e, n, o, l] = c;
22
+ let s = e ?? "", g = s;
23
23
  try {
24
- const u = l(t.get);
25
- u && (a = u(a, c, s, o));
26
- const f = l(t.getTo);
27
- f && (g = f(a, c, s, o));
28
- } catch (u) {
29
- console.warn(u);
24
+ const a = u(t.get);
25
+ a && (s = a(s, n, o, l));
26
+ const f = u(t.getTo);
27
+ f && (g = f(s, n, o, l));
28
+ } catch (a) {
29
+ console.warn(a);
30
30
  }
31
- return { ...t, value: a, valueTo: g };
31
+ return { ...t, value: s, valueTo: g };
32
32
  };
33
33
  export {
34
34
  v as getDataValue,
35
- l as getFunction,
35
+ u as getFunction,
36
36
  i as getParamsData,
37
37
  p as getStateItem,
38
38
  F as setStateItem
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { ObjectPlugin } from 'node_modules/@vue/runtime-core/dist/runtime-core';
1
+ import { Plugin } from 'vue';
2
2
  export * from './components';
3
- declare const _default: ObjectPlugin;
3
+ declare const _default: Plugin;
4
4
  export default _default;
5
5
  export * from './dashboard';
6
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,kDAAkD,CAAC;AAShF,OAAO,uBAAuB,CAAC;AAM/B,cAAc,eAAe,CAAC;wBASzB,YAAY;AAPjB,wBAOkB;AAElB,cAAc,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,MAAM,EAAa,MAAM,KAAK,CAAC;AAS7C,OAAO,uBAAuB,CAAC;AAI/B,cAAc,eAAe,CAAC;wBASzB,MAAM;AAPX,wBAOY;AAEZ,cAAc,aAAa,CAAC"}
@@ -1,4 +1,4 @@
1
- import { ObjectPlugin } from 'node_modules/@vue/runtime-core/dist/runtime-core';
2
- declare const i18nPlugin: ObjectPlugin;
1
+ import { Plugin } from 'vue';
2
+ declare const i18nPlugin: Plugin;
3
3
  export default i18nPlugin;
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/i18n/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,kDAAkD,CAAC;AAKhF,QAAA,MAAM,UAAU,EA6CX,YAAY,CAAC;AAElB,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/i18n/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,MAAM,EAAE,MAAM,KAAK,CAAC;AAMtD,QAAA,MAAM,UAAU,EAAE,MAiDjB,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -1,19 +1,24 @@
1
- import { reactive as L, readonly as g } from "vue";
2
- const d = { en: {} }, $ = "en", y = {
3
- install(o, e = {}) {
4
- const a = (e == null ? void 0 : e.locales) || d, s = (e == null ? void 0 : e.defaultLocale) || $, t = L({
1
+ import { reactive as g, readonly as L } from "vue";
2
+ const b = { en: {} }, d = "en", y = {
3
+ install(a, l = {}) {
4
+ const r = (l == null ? void 0 : l.locales) || b, s = (l == null ? void 0 : l.defaultLocale) || d, t = g({
5
5
  locale: s
6
- }), r = {
7
- state: g(t),
6
+ }), n = {
7
+ state: L(t),
8
8
  $t(c, f = {}) {
9
9
  const i = c.split(".");
10
- let l = a[t.locale];
11
- for (const n of i)
12
- l = l == null ? void 0 : l[n];
13
- return typeof l != "string" ? c : l.replace(/{(\w+)}/g, (n, u) => f[u] || n);
10
+ let e = r[t.locale];
11
+ for (const o of i)
12
+ if (typeof e == "object" && e !== null)
13
+ e = e[o];
14
+ else {
15
+ e = void 0;
16
+ break;
17
+ }
18
+ return typeof e != "string" ? c : e.replace(/{(\w+)}/g, (o, u) => f[u] || o);
14
19
  },
15
20
  setLocale(c) {
16
- if (a[c]) {
21
+ if (r[c]) {
17
22
  t.locale = c;
18
23
  return;
19
24
  }
@@ -23,10 +28,10 @@ const d = { en: {} }, $ = "en", y = {
23
28
  return t.locale;
24
29
  },
25
30
  getListLocales() {
26
- return Object.keys(a);
31
+ return Object.keys(r);
27
32
  }
28
33
  };
29
- o.config.globalProperties.$t = r.$t, o.provide("i18n", r), window.$i18n = r;
34
+ a.config.globalProperties.$t = n.$t, a.config.globalProperties.$i18n = n, a.provide("i18n", n);
30
35
  }
31
36
  };
32
37
  export {
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.3.1",
2
+ "version": "1.3.3",
3
3
  "name": "vuesp-components",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
@@ -61,12 +61,11 @@
61
61
  "author": "bondrogeen",
62
62
  "license": "MIT",
63
63
  "dependencies": {
64
- "@tailwindcss/vite": "4.1.6",
65
64
  "@vueuse/core": "^13.9.0",
66
- "tailwindcss": "4.1.6",
67
- "vue": "3.5.0"
65
+ "tslib": "^2.3.0"
68
66
  },
69
67
  "devDependencies": {
68
+ "@tailwindcss/vite": "4.1.6",
70
69
  "@eslint/js": "^9.39.1",
71
70
  "@types/node": "^18.11.18",
72
71
  "@typescript-eslint/parser": "^8.46.3",
@@ -77,16 +76,17 @@
77
76
  "eslint-plugin-vue": "^10.5.1",
78
77
  "globals": "^16.5.0",
79
78
  "tsconfig-paths": "^4.2.0",
80
- "tslib": "^2.3.0",
79
+ "tailwindcss": "4.1.6",
81
80
  "typescript": "~5.9.2",
82
81
  "typescript-eslint": "^8.46.3",
83
82
  "vite": "^5.0.0",
84
83
  "vite-plugin-dts": "~4.5.0",
85
84
  "vite-svg-loader": "^5.1.0",
86
85
  "vite-svg-sprite-wrapper": "^1.5.0",
86
+ "vue": "3.5.0",
87
87
  "vue-tsc": "^2.2.8"
88
88
  },
89
89
  "peerDependencies": {
90
- "vue": "3.5.0"
90
+ "vue": "^3.5.0"
91
91
  }
92
92
  }