@ldmjs/ui 1.0.0-dev-7 → 1.0.0-dev-9

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,8 +1,10 @@
1
1
  # Dependencies
2
2
 
3
- - vue: >=3.4
3
+ - vue: >= 3.4
4
4
  - vuetify: >= 3.5
5
5
  - lodash: >= 4
6
+ - @vuelidate: >= 2
7
+ - vue-imask: >= 6
6
8
 
7
9
  # Installation
8
10
 
@@ -56,7 +58,7 @@ appComponent.mount('#app');
56
58
 
57
59
  ### use loader
58
60
 
59
- ```vue
61
+ ```html
60
62
  <loader :options="{ transparent: false, global: true }" :visible="loading" />
61
63
  ```
62
64
 
@@ -93,10 +95,10 @@ const vuetify = createVuetify({
93
95
 
94
96
  ```js
95
97
  appComponent.use(ldmui, {
96
- LdBtn: {
97
- isMobile: 'keyForGlobalIsMobileViewport',
98
- isTablet: 'keyForGlobalIsTabletViewport',
99
- isDesktop: 'keyForGlobalIsDesktopViewport'
98
+ viewport: {
99
+ isMobile: 'keyForGlobalMobileViewport',
100
+ isTablet: 'keyForGlobalTabletViewport',
101
+ isDesktop: 'keyForGlobalDesktopViewport'
100
102
  }
101
103
  });
102
104
  ```
@@ -139,6 +141,81 @@ const vuetify = createVuetify({
139
141
  </ld-splitter>
140
142
  ```
141
143
 
144
+ ## #ld-toggle-buttons
145
+
146
+ ### use toggle buttons
147
+
148
+ ```html
149
+ <ld-toggle-btn
150
+ v-model="toggleModel"
151
+ :items="toggleItems"
152
+ />
153
+ ```
154
+
155
+ ```js
156
+ toggleItems = [
157
+ {
158
+ id: 0,
159
+ tooltip: 'user',
160
+ icon: 'user',
161
+ },
162
+ {
163
+ id: 1,
164
+ tooltip: 'group',
165
+ icon: 'group',
166
+ }
167
+ ]
168
+ ```
169
+
170
+ ## #ld-breadcrumbs
171
+
172
+ ### use breadcrumbs
173
+
174
+ ```js
175
+ appComponent.use(ldmui, {
176
+ LdBreadcrumbs: {
177
+ home: { // setup route for home page
178
+ name: 'home',
179
+ path: '/'
180
+ }
181
+ }
182
+ ```
183
+
184
+ ```html
185
+ <ld-breadcrumbs :breadcrumbs="items" />
186
+ ```
187
+
188
+ ```js
189
+ const items = [
190
+ {
191
+ text: 'Документы',
192
+ route: {
193
+ path: '/documents'
194
+ }
195
+ },
196
+ {
197
+ text: 'Входящая корреспонденция',
198
+ route: {
199
+ path: '/documents/123456'
200
+ }
201
+ }
202
+ ]
203
+ ```
204
+
205
+ ## #ld-edit-text
206
+
207
+ ### use edit text
208
+
209
+ ```html
210
+ <ld-edit-text v-model="value" label="ФИО" />
211
+ <ld-edit-text v-model="value" :only-numbers="true" label="Номер" />
212
+ ```
213
+
142
214
  # Utilities
143
215
 
144
216
  - isDefined
217
+ - uidGen
218
+ - delay
219
+
220
+ # Directives
221
+ - v-active
package/dist/index.d.ts CHANGED
@@ -3,6 +3,8 @@ import { ldmuiOptions } from './types/options'
3
3
  declare const defaults: Record<string, unknown>;
4
4
  declare function getAliases(components: Record<string, unknown>): Record<string, unknown>;
5
5
  declare function isDefined(value: unknown): boolean;
6
+ declare function uidGen(len?: number, format?: string): string | number;
7
+ declare function delay(timeout: number): Promise<void>;
6
8
 
7
9
  declare const ldmui: {
8
10
  install(vue: any, options?: ldmuiOptions): void;
@@ -14,4 +16,6 @@ export {
14
16
  defaults,
15
17
  getAliases,
16
18
  isDefined,
19
+ delay,
20
+ uidGen
17
21
  }