@ldmjs/ui 1.0.0-dev-5 → 1.0.0-dev-6

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 ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (C) 2024 by LANIT <nevezhin@lanit.ru>
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
package/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # Dependencies
2
2
 
3
3
  - vue: >=3.4
4
+ - vuetify: >= 3.5
5
+ - lodash: >= 4
4
6
 
5
7
  # Installation
6
8
 
@@ -29,5 +31,114 @@ appComponent.mount('#app');
29
31
 
30
32
  # Library
31
33
 
32
- - ld-icon
33
- - loader
34
+ ## #ld-icon
35
+
36
+ ### use icons
37
+
38
+ ```js
39
+ appComponent.use(ldmui, {
40
+ LdIcon: {
41
+ path: 'path/to/icons',
42
+ map: {
43
+ icons: [
44
+ ['user', 'user_icon_file_name']
45
+ ]
46
+ }
47
+ }
48
+ });
49
+ ```
50
+
51
+ ```html
52
+ <ld-icon>user</ld-icon>
53
+ ```
54
+
55
+ ## #loader
56
+
57
+ ### use loader
58
+
59
+ ```vue
60
+ <loader :options="{ transparent: false, global: true }" :visible="loading" />
61
+ ```
62
+
63
+ ## #vuetify aliases:
64
+ [
65
+ small-button,
66
+ square-button,
67
+ small-chip,
68
+ small-badge
69
+ ]
70
+
71
+ ### use vuetify aliases
72
+
73
+ ```js
74
+ import 'vuetify/styles';
75
+ import 'material-design-icons-iconfont/dist/material-design-icons.css';
76
+ import { defaults, getAliases } from '@ldmjs/ui';
77
+ import { createVuetify } from 'vuetify';
78
+ import * as components from 'vuetify/components';
79
+
80
+ const vuetify = createVuetify({
81
+ aliases: {
82
+ ...getAliases(components),
83
+ },
84
+ defaults: {
85
+ ...defaults
86
+ }
87
+ })
88
+ ```
89
+
90
+ ## #ld-btn
91
+
92
+ ### use responsive buttons
93
+
94
+ ```js
95
+ appComponent.use(ldmui, {
96
+ LdBtn: {
97
+ isMobile: 'keyForGlobalIsMobileViewport',
98
+ isTablet: 'keyForGlobalIsTabletViewport',
99
+ isDesktop: 'keyForGlobalIsDesktopViewport'
100
+ }
101
+ });
102
+ ```
103
+
104
+ ```html
105
+ <ld-btn
106
+ variant="outlined" // text, flat
107
+ color="primary"
108
+ testid="test-id"
109
+ :disabled="false" // non required
110
+ :is-desktop-view="true" // non required
111
+ :is-tablet-view="false" // non required
112
+ :is-mobile-view="false" // non required
113
+ @click="func()" // click handler
114
+ >
115
+ <template #icon>
116
+ <ld-icon ... /> // some icon
117
+ </template>
118
+ <template #text>
119
+ button caption // some text
120
+ </template>
121
+ <template #hidden>
122
+ <div>...</div>
123
+ </template>
124
+ </ld-btn>
125
+ ```
126
+
127
+ ## #ld-splitter
128
+
129
+ ### use splitter
130
+
131
+ ```html
132
+ <ld-splitter>
133
+ <template #left-pane>
134
+ <div>Left Pane</div>
135
+ </template>
136
+ <template #right-pane>
137
+ <div>Right Pane</div>
138
+ </template>
139
+ </ld-splitter>
140
+ ```
141
+
142
+ # Utilities
143
+
144
+ - isDefined