@ldmjs/ui 1.0.2 → 1.0.4
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 +25 -323
- package/dist/css/calendar.css +1125 -15
- package/dist/css/index.css +12 -12
- package/dist/imask.js +1 -1
- package/dist/index.js +4336 -302
- package/dist/multiselect.js +1 -1
- package/dist/runtime-template.js +1 -1
- package/dist/scss/_buttons.scss +93 -16
- package/dist/scss/_inputs.scss +12 -2
- package/dist/scss/_multiselect.scss +2 -1
- package/package.json +5 -4
package/README.md
CHANGED
|
@@ -18,6 +18,10 @@ OR
|
|
|
18
18
|
yarn add @ldmjs/ui@latest
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
+
# Documentation
|
|
22
|
+
|
|
23
|
+
http://172.19.90.47:8101
|
|
24
|
+
|
|
21
25
|
# Use
|
|
22
26
|
|
|
23
27
|
```js
|
|
@@ -47,37 +51,6 @@ tsconfig.json
|
|
|
47
51
|
}
|
|
48
52
|
```
|
|
49
53
|
|
|
50
|
-
# Library
|
|
51
|
-
|
|
52
|
-
## #ld-icon
|
|
53
|
-
|
|
54
|
-
### use icons
|
|
55
|
-
|
|
56
|
-
```js
|
|
57
|
-
appComponent.use(ldmui, {
|
|
58
|
-
LdIcon: {
|
|
59
|
-
path: 'path/to/icons',
|
|
60
|
-
map: {
|
|
61
|
-
icons: [
|
|
62
|
-
['user', 'user_icon_file_name']
|
|
63
|
-
]
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
```html
|
|
70
|
-
<ld-icon>user</ld-icon>
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
## #loader
|
|
74
|
-
|
|
75
|
-
### use loader
|
|
76
|
-
|
|
77
|
-
```html
|
|
78
|
-
<loader :options="{ transparent: false, global: true }" :visible="loading" />
|
|
79
|
-
```
|
|
80
|
-
|
|
81
54
|
## #vuetify aliases:
|
|
82
55
|
[
|
|
83
56
|
small-button,
|
|
@@ -105,299 +78,28 @@ const vuetify = createVuetify({
|
|
|
105
78
|
})
|
|
106
79
|
```
|
|
107
80
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
### use responsive buttons
|
|
111
|
-
|
|
112
|
-
```js
|
|
113
|
-
appComponent.use(ldmui, {
|
|
114
|
-
viewport: {
|
|
115
|
-
isMobile: 'keyForGlobalMobileViewport',
|
|
116
|
-
isTablet: 'keyForGlobalTabletViewport',
|
|
117
|
-
isDesktop: 'keyForGlobalDesktopViewport'
|
|
118
|
-
}
|
|
119
|
-
});
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
```html
|
|
123
|
-
<ld-btn
|
|
124
|
-
variant="outlined" // text, flat
|
|
125
|
-
color="primary"
|
|
126
|
-
testid="test-id"
|
|
127
|
-
:disabled="false" // non required
|
|
128
|
-
:is-desktop-view="true" // non required
|
|
129
|
-
:is-tablet-view="false" // non required
|
|
130
|
-
:is-mobile-view="false" // non required
|
|
131
|
-
@click="func()" // click handler
|
|
132
|
-
>
|
|
133
|
-
<template #icon>
|
|
134
|
-
<ld-icon ... /> // some icon
|
|
135
|
-
</template>
|
|
136
|
-
<template #text>
|
|
137
|
-
button caption // some text
|
|
138
|
-
</template>
|
|
139
|
-
<template #hidden>
|
|
140
|
-
<div>...</div>
|
|
141
|
-
</template>
|
|
142
|
-
</ld-btn>
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
## #ld-splitter
|
|
146
|
-
|
|
147
|
-
### use splitter
|
|
148
|
-
|
|
149
|
-
```html
|
|
150
|
-
<ld-splitter>
|
|
151
|
-
<template #left-pane>
|
|
152
|
-
<div>Left Pane</div>
|
|
153
|
-
</template>
|
|
154
|
-
<template #right-pane>
|
|
155
|
-
<div>Right Pane</div>
|
|
156
|
-
</template>
|
|
157
|
-
</ld-splitter>
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
## #ld-toggle-buttons
|
|
161
|
-
|
|
162
|
-
### use toggle buttons
|
|
163
|
-
|
|
164
|
-
```html
|
|
165
|
-
<ld-toggle-btn
|
|
166
|
-
v-model="toggleModel"
|
|
167
|
-
:items="toggleItems"
|
|
168
|
-
/>
|
|
169
|
-
```
|
|
170
|
-
|
|
171
|
-
```js
|
|
172
|
-
toggleItems = [
|
|
173
|
-
{
|
|
174
|
-
id: 0,
|
|
175
|
-
tooltip: 'user',
|
|
176
|
-
icon: 'user',
|
|
177
|
-
},
|
|
178
|
-
{
|
|
179
|
-
id: 1,
|
|
180
|
-
tooltip: 'group',
|
|
181
|
-
icon: 'group',
|
|
182
|
-
}
|
|
183
|
-
]
|
|
184
|
-
```
|
|
185
|
-
|
|
186
|
-
## #ld-breadcrumbs
|
|
187
|
-
|
|
188
|
-
### use breadcrumbs
|
|
189
|
-
|
|
190
|
-
```js
|
|
191
|
-
appComponent.use(ldmui, {
|
|
192
|
-
LdBreadcrumbs: {
|
|
193
|
-
home: { // setup route for home page
|
|
194
|
-
name: 'home',
|
|
195
|
-
path: '/'
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
```
|
|
199
|
-
|
|
200
|
-
```html
|
|
201
|
-
<ld-breadcrumbs :breadcrumbs="items" />
|
|
202
|
-
```
|
|
203
|
-
|
|
204
|
-
```js
|
|
205
|
-
const items = [
|
|
206
|
-
{
|
|
207
|
-
text: 'Документы',
|
|
208
|
-
route: {
|
|
209
|
-
path: '/documents'
|
|
210
|
-
}
|
|
211
|
-
},
|
|
212
|
-
{
|
|
213
|
-
text: 'Входящая корреспонденция',
|
|
214
|
-
route: {
|
|
215
|
-
path: '/documents/123456'
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
]
|
|
219
|
-
```
|
|
220
|
-
|
|
221
|
-
## #ld-edit-text
|
|
222
|
-
|
|
223
|
-
### use edit text
|
|
224
|
-
|
|
225
|
-
```html
|
|
226
|
-
<ld-edit-text v-model="value" label="ФИО" />
|
|
227
|
-
<ld-edit-text v-model="value" :only-numbers="true" label="Номер" />
|
|
228
|
-
```
|
|
229
|
-
|
|
230
|
-
## #ld-datepicker
|
|
231
|
-
|
|
232
|
-
### use datepicker
|
|
233
|
-
|
|
234
|
-
```html
|
|
235
|
-
<ld-datepicker v-model="value" :dateonly="false" label="Ld datepicker" />
|
|
236
|
-
```
|
|
237
|
-
|
|
238
|
-
## #ld-tabs
|
|
239
|
-
|
|
240
|
-
### use tabs
|
|
241
|
-
|
|
242
|
-
```html
|
|
243
|
-
<ld-tabs v-model="value" :mobile="false">
|
|
244
|
-
<ld-tab index="0" heading="Tab 1">Content</ld-tab>
|
|
245
|
-
<ld-tab index="1" heading="Tab 1">Content</ld-tab>
|
|
246
|
-
</ld-tabs>
|
|
247
|
-
```
|
|
248
|
-
|
|
249
|
-
## #ld-page-toolbar
|
|
250
|
-
|
|
251
|
-
### use page toolbar
|
|
252
|
-
|
|
253
|
-
```html
|
|
254
|
-
<ld-page-toolbar :preview="isMobile">
|
|
255
|
-
<template #breadcrumbs>
|
|
256
|
-
<ld-breadcrumbs :breadcrumbs="breadcrumbs" />
|
|
257
|
-
</template>
|
|
258
|
-
<template #content>
|
|
259
|
-
<span>Header</span>
|
|
260
|
-
</template>
|
|
261
|
-
<template #action-panel>
|
|
262
|
-
<ld-button>Button</ld-button>
|
|
263
|
-
</template>
|
|
264
|
-
</ld-page-toolbar>
|
|
265
|
-
```
|
|
266
|
-
|
|
267
|
-
## #ld-select-list-box
|
|
268
|
-
|
|
269
|
-
### use select list box
|
|
270
|
-
|
|
271
|
-
```html
|
|
272
|
-
<ld-select-list-box
|
|
273
|
-
ref="selectListBox"
|
|
274
|
-
v-model="selectedValue"
|
|
275
|
-
v-model:modelItems="selectedItems"
|
|
276
|
-
:handlers="handlers"
|
|
277
|
-
:multiselect="multiselect"
|
|
278
|
-
:required="required"
|
|
279
|
-
label="Ld Select List Box"
|
|
280
|
-
:persistent-hint="persistentHint"
|
|
281
|
-
:option-hint="optionHint"
|
|
282
|
-
input-hint="Select Box Hint"
|
|
283
|
-
>
|
|
284
|
-
<template #tag="{ item, onRemove, canRemove }">
|
|
285
|
-
tag template
|
|
286
|
-
</template>
|
|
287
|
-
<template #option="{ item, isSelected }">
|
|
288
|
-
option template
|
|
289
|
-
</template>
|
|
290
|
-
<template #option-icon="{ item, isSelected }">
|
|
291
|
-
option icon
|
|
292
|
-
</template>
|
|
293
|
-
<template #option-hint="{ item }">
|
|
294
|
-
option hint
|
|
295
|
-
</template>
|
|
296
|
-
</ld-select-list-box>
|
|
297
|
-
```
|
|
298
|
-
|
|
299
|
-
```js
|
|
300
|
-
// methods for work with vacabularies
|
|
301
|
-
const handlers = {
|
|
302
|
-
fetchData: () => { return [] },
|
|
303
|
-
fetchItem: (ids) => { return [] },
|
|
304
|
-
serverSearch: (searchTerm) => { return [] },
|
|
305
|
-
select: () => { return [] },
|
|
306
|
-
}
|
|
307
|
-
```
|
|
308
|
-
## #ld-radiogroup
|
|
309
|
-
|
|
310
|
-
### use radio inputs
|
|
311
|
-
|
|
312
|
-
```html
|
|
313
|
-
<ld-radiogroup v-model="radioValue" label="Ld Radio Buttons">
|
|
314
|
-
<ld-radiobutton label="Radio Button 1" :value="0" />
|
|
315
|
-
<ld-radiobutton label="Radio Button 2" :value="1" />
|
|
316
|
-
</ld-radiogroup>
|
|
317
|
-
```
|
|
318
|
-
|
|
319
|
-
## #ld-textarea
|
|
320
|
-
|
|
321
|
-
### use textarea
|
|
322
|
-
|
|
323
|
-
```html
|
|
324
|
-
<ld-textarea v-model="commentValue" label="Ld Textarea" label-on-top :rows="4" />
|
|
325
|
-
```
|
|
326
|
-
|
|
327
|
-
## #ld-select
|
|
328
|
-
|
|
329
|
-
### use select
|
|
330
|
-
|
|
331
|
-
```html
|
|
332
|
-
<ld-select v-model="selectedElement" :items="elements" label="Ld select" />
|
|
333
|
-
```
|
|
334
|
-
|
|
335
|
-
## ld-combobox
|
|
336
|
-
|
|
337
|
-
### use combobox
|
|
338
|
-
|
|
339
|
-
```html
|
|
340
|
-
<ld-combobox
|
|
341
|
-
v-model="comboboxValue"
|
|
342
|
-
label="Ld Combobox"
|
|
343
|
-
:multiselect="false"
|
|
344
|
-
item-title="title"
|
|
345
|
-
:items="comboboxItems"
|
|
346
|
-
required
|
|
347
|
-
/>
|
|
348
|
-
```
|
|
349
|
-
|
|
350
|
-
```js
|
|
351
|
-
const comboboxItems = [
|
|
352
|
-
{
|
|
353
|
-
id: 1,
|
|
354
|
-
title: '1'
|
|
355
|
-
},
|
|
356
|
-
{
|
|
357
|
-
id: 2,
|
|
358
|
-
title: '2'
|
|
359
|
-
}
|
|
360
|
-
]
|
|
361
|
-
```
|
|
362
|
-
|
|
363
|
-
## ld-text-viewer
|
|
364
|
-
|
|
365
|
-
### use textviewer
|
|
366
|
-
|
|
367
|
-
```html
|
|
368
|
-
<ld-text-viewer :text="'Link http://yandex.ru'" active-links label="Ld TextViewer" />
|
|
369
|
-
```
|
|
370
|
-
|
|
371
|
-
## ld-timepicker
|
|
372
|
-
|
|
373
|
-
### use timepicker
|
|
374
|
-
|
|
375
|
-
```html
|
|
376
|
-
<ld-timepicker v-model="timeValue" label="Ld Timepicker" required />
|
|
377
|
-
```
|
|
378
|
-
|
|
379
|
-
## ld-edit-masked-text
|
|
380
|
-
|
|
381
|
-
### use masked text
|
|
382
|
-
|
|
383
|
-
```html
|
|
384
|
-
<ld-edit-masked-text v-model="maskedText" mask="000-000-000 00" label="Ld Edit Masked Text" />
|
|
385
|
-
```
|
|
386
|
-
## ld-text-markup
|
|
387
|
-
|
|
388
|
-
### use text markup
|
|
389
|
-
|
|
390
|
-
```html
|
|
391
|
-
<ld-text-markup v-model="textMarkup" required label="Ld Text Markup" />
|
|
392
|
-
```
|
|
393
|
-
|
|
394
|
-
## ld-switch
|
|
395
|
-
|
|
396
|
-
### use switch
|
|
81
|
+
# Library
|
|
397
82
|
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
83
|
+
- ld-icon
|
|
84
|
+
- loader
|
|
85
|
+
- ld-btn
|
|
86
|
+
- ld-splitter
|
|
87
|
+
- ld-toggle-buttons
|
|
88
|
+
- ld-breadcrumbs
|
|
89
|
+
- ld-edit-text
|
|
90
|
+
- ld-tabs
|
|
91
|
+
- ld-datepicker
|
|
92
|
+
- ld-page-toolbar
|
|
93
|
+
- ld-select-list-box
|
|
94
|
+
- ld-radiogroup
|
|
95
|
+
- ld-textarea
|
|
96
|
+
- ld-select
|
|
97
|
+
- ld-combobox
|
|
98
|
+
- ld-text-viewer
|
|
99
|
+
- ld-timepicker
|
|
100
|
+
- ld-edit-masked-text
|
|
101
|
+
- ld-text-markup
|
|
102
|
+
- ld-switch
|
|
401
103
|
|
|
402
104
|
# Utilities
|
|
403
105
|
|