@vue-interface/btn-dropdown 0.9.10 → 0.9.14
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/btn-dropdown.es.js +2179 -0
- package/dist/btn-dropdown.umd.js +1 -0
- package/dist/style.css +1 -0
- package/package.json +26 -29
- package/.eslintrc.js +0 -53
- package/babel.config.js +0 -7
- package/dist/BtnDropdown.common.js +0 -6903
- package/dist/BtnDropdown.common.js.map +0 -1
- package/dist/BtnDropdown.css +0 -1
- package/dist/BtnDropdown.umd.js +0 -6913
- package/dist/BtnDropdown.umd.js.map +0 -1
- package/dist/BtnDropdown.umd.min.js +0 -2
- package/dist/BtnDropdown.umd.min.js.map +0 -1
- package/dist/demo.html +0 -19
- package/docs/.vuepress/config.js +0 -44
- package/docs/.vuepress/dist/404.html +0 -19
- package/docs/.vuepress/dist/assets/css/0.styles.275ee968.css +0 -1
- package/docs/.vuepress/dist/assets/img/search.83621669.svg +0 -1
- package/docs/.vuepress/dist/assets/js/10.5d93d289.js +0 -1
- package/docs/.vuepress/dist/assets/js/11.97ab3884.js +0 -1
- package/docs/.vuepress/dist/assets/js/2.f3d148c3.js +0 -1
- package/docs/.vuepress/dist/assets/js/3.81681fff.js +0 -1
- package/docs/.vuepress/dist/assets/js/4.82fa7382.js +0 -1
- package/docs/.vuepress/dist/assets/js/5.3dae6ad4.js +0 -1
- package/docs/.vuepress/dist/assets/js/6.6a04f815.js +0 -1
- package/docs/.vuepress/dist/assets/js/7.c033cb49.js +0 -1
- package/docs/.vuepress/dist/assets/js/8.6d6eb599.js +0 -1
- package/docs/.vuepress/dist/assets/js/9.eaefe866.js +0 -1
- package/docs/.vuepress/dist/assets/js/app.7ed065d3.js +0 -13
- package/docs/.vuepress/dist/examples/index.html +0 -21
- package/docs/.vuepress/dist/examples/test.html +0 -17
- package/docs/.vuepress/dist/index.html +0 -53
- package/docs/.vuepress/dist/options.html +0 -41
- package/docs/.vuepress/dist/tailwindcss.html +0 -85
- package/docs/README.md +0 -17
- package/docs/examples/README.md +0 -3
- package/docs/options.md +0 -44
- package/index.html +0 -339
- package/index.js +0 -3
- package/main.vue +0 -5
- package/postcss.config.js +0 -1
- package/public/favicon.ico +0 -0
- package/public/index.html +0 -17
- package/src/BtnDropdown.vue +0 -108
- package/src/BtnDropdownAction.vue +0 -38
- package/src/BtnDropdownSingle.vue +0 -40
- package/src/BtnDropdownSplit.vue +0 -66
- package/src/DropdownHandler.js +0 -420
- package/src/css/BtnDropdown.css +0 -1
- package/tailwind.config.js +0 -13
- package/vue.config.js +0 -11
package/index.html
DELETED
|
@@ -1,339 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html>
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8">
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
|
6
|
-
<title>BtnDropdown</title>
|
|
7
|
-
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap-reboot.min.css">
|
|
8
|
-
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap-grid.min.css">
|
|
9
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@vue-interface/navigation/dist/Navigation.css">
|
|
10
|
-
<link rel="stylesheet" href="./dist/BtnDropdown.css">
|
|
11
|
-
</head>
|
|
12
|
-
<body>
|
|
13
|
-
<div id="app" class="container">
|
|
14
|
-
<h1 class="mb-5">btn-dropdown</h1>
|
|
15
|
-
|
|
16
|
-
<h3>Basic Usage</h3>
|
|
17
|
-
|
|
18
|
-
<navigation>
|
|
19
|
-
<a href="#">Item #1</a>
|
|
20
|
-
<btn-dropdown label="Item #2">
|
|
21
|
-
<a href="#">Dropdown Item #1</a>
|
|
22
|
-
<a href="#">Dropdown Item #2</a>
|
|
23
|
-
</btn-dropdown>
|
|
24
|
-
</navigation>
|
|
25
|
-
|
|
26
|
-
<!--
|
|
27
|
-
<btn-dropdown variant="secondary" label="Dropdown" @click-toggle="onToggle">
|
|
28
|
-
<router-link to="/" @click="onClickItem">Action</router-link>
|
|
29
|
-
<a href="#">Another Action</a>
|
|
30
|
-
<a href="#">Something else here</a>
|
|
31
|
-
</btn-dropdown>
|
|
32
|
-
|
|
33
|
-
<btn-dropdown variant="secondary" label="Dropdown" split @click="onClick" @click-toggle="onToggle">
|
|
34
|
-
<router-link to="/" @click="onClickItem">Action</router-link>
|
|
35
|
-
<a href="#">Another Action</a>
|
|
36
|
-
<a href="#">Something else here</a>
|
|
37
|
-
</btn-dropdown>
|
|
38
|
-
|
|
39
|
-
<hr>
|
|
40
|
-
|
|
41
|
-
<h3>Variants</h3>
|
|
42
|
-
|
|
43
|
-
<btn-dropdown label="Primary" variant="primary">
|
|
44
|
-
<a href="#">Action</a>
|
|
45
|
-
<a href="#">Another Action</a>
|
|
46
|
-
<a href="#">Something else here</a>
|
|
47
|
-
</btn-dropdown>
|
|
48
|
-
|
|
49
|
-
<btn-dropdown label="Secondary" variant="secondary">
|
|
50
|
-
<a href="#">Action</a>
|
|
51
|
-
<a href="#">Another Action</a>
|
|
52
|
-
<a href="#">Something else here</a>
|
|
53
|
-
</btn-dropdown>
|
|
54
|
-
|
|
55
|
-
<btn-dropdown label="Success" variant="success">
|
|
56
|
-
<a href="#">Action</a>
|
|
57
|
-
<a href="#">Another Action</a>
|
|
58
|
-
<a href="#">Something else here</a>
|
|
59
|
-
</btn-dropdown>
|
|
60
|
-
|
|
61
|
-
<btn-dropdown label="Info" variant="info">
|
|
62
|
-
<a href="#">Action</a>
|
|
63
|
-
<a href="#">Another Action</a>
|
|
64
|
-
<a href="#">Something else here</a>
|
|
65
|
-
</btn-dropdown>
|
|
66
|
-
|
|
67
|
-
<btn-dropdown label="Warning" variant="warning">
|
|
68
|
-
<a href="#">Action</a>
|
|
69
|
-
<a href="#">Another Action</a>
|
|
70
|
-
<a href="#">Something else here</a>
|
|
71
|
-
</btn-dropdown>
|
|
72
|
-
|
|
73
|
-
<btn-dropdown label="Danger" variant="danger">
|
|
74
|
-
<a href="#">Action</a>
|
|
75
|
-
<a href="#">Another Action</a>
|
|
76
|
-
<a href="#">Something else here</a>
|
|
77
|
-
</btn-dropdown>
|
|
78
|
-
|
|
79
|
-
<btn-dropdown label="Dark" variant="dark">
|
|
80
|
-
<a href="#">Action</a>
|
|
81
|
-
<a href="#">Another Action</a>
|
|
82
|
-
<a href="#">Something else here</a>
|
|
83
|
-
</btn-dropdown>
|
|
84
|
-
|
|
85
|
-
<btn-dropdown label="Light" variant="light">
|
|
86
|
-
<a href="#">Action</a>
|
|
87
|
-
<a href="#">Another Action</a>
|
|
88
|
-
<a href="#">Something else here</a>
|
|
89
|
-
</btn-dropdown>
|
|
90
|
-
|
|
91
|
-
<btn-dropdown label="Muted" variant="muted">
|
|
92
|
-
<a href="#">Action</a>
|
|
93
|
-
<a href="#">Another Action</a>
|
|
94
|
-
<a href="#">Something else here</a>
|
|
95
|
-
</btn-dropdown>
|
|
96
|
-
|
|
97
|
-
<hr>
|
|
98
|
-
|
|
99
|
-
<h3>Split button dropdowns</h3>
|
|
100
|
-
|
|
101
|
-
<btn-dropdown label="Primary" variant="primary" split>
|
|
102
|
-
<a href="#">Action</a>
|
|
103
|
-
<a href="#">Another Action</a>
|
|
104
|
-
<a href="#">Something else here</a>
|
|
105
|
-
</btn-dropdown>
|
|
106
|
-
|
|
107
|
-
<btn-dropdown label="Secondary" variant="secondary" split>
|
|
108
|
-
<a href="#">Action</a>
|
|
109
|
-
<a href="#">Another Action</a>
|
|
110
|
-
<a href="#">Something else here</a>
|
|
111
|
-
</btn-dropdown>
|
|
112
|
-
|
|
113
|
-
<btn-dropdown label="Success" variant="success" split>
|
|
114
|
-
<a href="#">Action</a>
|
|
115
|
-
<a href="#">Another Action</a>
|
|
116
|
-
<a href="#">Something else here</a>
|
|
117
|
-
</btn-dropdown>
|
|
118
|
-
|
|
119
|
-
<btn-dropdown label="Info" variant="info" split>
|
|
120
|
-
<a href="#">Action</a>
|
|
121
|
-
<a href="#">Another Action</a>
|
|
122
|
-
<a href="#">Something else here</a>
|
|
123
|
-
</btn-dropdown>
|
|
124
|
-
|
|
125
|
-
<btn-dropdown label="Warning" variant="warning" split>
|
|
126
|
-
<a href="#">Action</a>
|
|
127
|
-
<a href="#">Another Action</a>
|
|
128
|
-
<a href="#">Something else here</a>
|
|
129
|
-
</btn-dropdown>
|
|
130
|
-
|
|
131
|
-
<btn-dropdown label="Danger" variant="danger" split>
|
|
132
|
-
<a href="#">Action</a>
|
|
133
|
-
<a href="#">Another Action</a>
|
|
134
|
-
<a href="#">Something else here</a>
|
|
135
|
-
</btn-dropdown>
|
|
136
|
-
|
|
137
|
-
<btn-dropdown label="Dark" variant="dark" split>
|
|
138
|
-
<a href="#">Action</a>
|
|
139
|
-
<a href="#">Another Action</a>
|
|
140
|
-
<a href="#">Something else here</a>
|
|
141
|
-
</btn-dropdown>
|
|
142
|
-
|
|
143
|
-
<btn-dropdown label="Light" variant="light" split>
|
|
144
|
-
<a href="#">Action</a>
|
|
145
|
-
<a href="#">Another Action</a>
|
|
146
|
-
<a href="#">Something else here</a>
|
|
147
|
-
</btn-dropdown>
|
|
148
|
-
|
|
149
|
-
<btn-dropdown label="Muted" variant="muted" split>
|
|
150
|
-
<a href="#">Action</a>
|
|
151
|
-
<a href="#">Another Action</a>
|
|
152
|
-
<a href="#">Something else here</a>
|
|
153
|
-
</btn-dropdown>
|
|
154
|
-
|
|
155
|
-
<hr>
|
|
156
|
-
|
|
157
|
-
<h3>Split button dropdowns</h3>
|
|
158
|
-
|
|
159
|
-
<p>
|
|
160
|
-
<btn-dropdown label="Small button" size="sm" variant="secondary">
|
|
161
|
-
<a href="#">Action</a>
|
|
162
|
-
<a href="#">Another Action</a>
|
|
163
|
-
<a href="#">Something else here</a>
|
|
164
|
-
</btn-dropdown>
|
|
165
|
-
|
|
166
|
-
<btn-dropdown label="Medium button" size="md" variant="secondary">
|
|
167
|
-
<a href="#">Action</a>
|
|
168
|
-
<a href="#">Another Action</a>
|
|
169
|
-
<a href="#">Something else here</a>
|
|
170
|
-
</btn-dropdown>
|
|
171
|
-
|
|
172
|
-
<btn-dropdown label="Large button" size="lg" variant="secondary">
|
|
173
|
-
<a href="#">Action</a>
|
|
174
|
-
<a href="#">Another Action</a>
|
|
175
|
-
<a href="#">Something else here</a>
|
|
176
|
-
</btn-dropdown>
|
|
177
|
-
</p>
|
|
178
|
-
|
|
179
|
-
<p>
|
|
180
|
-
<btn-dropdown label="Small button" size="sm" variant="secondary" split>
|
|
181
|
-
<a href="#">Action</a>
|
|
182
|
-
<a href="#">Another Action</a>
|
|
183
|
-
<a href="#">Something else here</a>
|
|
184
|
-
</btn-dropdown>
|
|
185
|
-
|
|
186
|
-
<btn-dropdown label="Medium button" size="md" variant="secondary" split>
|
|
187
|
-
<a href="#">Action</a>
|
|
188
|
-
<a href="#">Another Action</a>
|
|
189
|
-
<a href="#">Something else here</a>
|
|
190
|
-
</btn-dropdown>
|
|
191
|
-
|
|
192
|
-
<btn-dropdown label="Large button" size="lg" variant="secondary" split>
|
|
193
|
-
<a href="#">Action</a>
|
|
194
|
-
<a href="#">Another Action</a>
|
|
195
|
-
<a href="#">Something else here</a>
|
|
196
|
-
</btn-dropdown>
|
|
197
|
-
</p>
|
|
198
|
-
|
|
199
|
-
<hr>
|
|
200
|
-
|
|
201
|
-
<h3>Menu Alignment</h3>
|
|
202
|
-
|
|
203
|
-
<p>
|
|
204
|
-
<btn-dropdown align="left" label="Align Left" variant="secondary">
|
|
205
|
-
<a href="#">Action</a>
|
|
206
|
-
<a href="#">Another Action</a>
|
|
207
|
-
<a href="#">Something else here</a>
|
|
208
|
-
</btn-dropdown>
|
|
209
|
-
|
|
210
|
-
<btn-dropdown align="right" label="Align Right" variant="secondary">
|
|
211
|
-
<a href="#">Action</a>
|
|
212
|
-
<a href="#">Another Action</a>
|
|
213
|
-
<a href="#">Something else here</a>
|
|
214
|
-
</btn-dropdown>
|
|
215
|
-
</p>
|
|
216
|
-
<p>
|
|
217
|
-
<btn-dropdown split align="left" label="Align Left Split" variant="secondary">
|
|
218
|
-
<a href="#">Action</a>
|
|
219
|
-
<a href="#">Another Action</a>
|
|
220
|
-
<a href="#">Something else here</a>
|
|
221
|
-
</btn-dropdown>
|
|
222
|
-
|
|
223
|
-
<btn-dropdown split align="right" label="Align Right Split" variant="secondary">
|
|
224
|
-
<a href="#">Action</a>
|
|
225
|
-
<a href="#">Another Action</a>
|
|
226
|
-
<a href="#">Something else here</a>
|
|
227
|
-
</btn-dropdown>
|
|
228
|
-
</p>
|
|
229
|
-
|
|
230
|
-
<hr>
|
|
231
|
-
|
|
232
|
-
<h3>Dropup variation</h3>
|
|
233
|
-
|
|
234
|
-
<btn-dropdown label="Dropup" variant="secondary" dropup>
|
|
235
|
-
<a href="#">Action</a>
|
|
236
|
-
<a href="#">Another Action</a>
|
|
237
|
-
<a href="#">Something else here</a>
|
|
238
|
-
</btn-dropdown>
|
|
239
|
-
|
|
240
|
-
<btn-dropdown label="Split Dropup" variant="secondary" split dropup>
|
|
241
|
-
<a href="#">Action</a>
|
|
242
|
-
<a href="#">Another Action</a>
|
|
243
|
-
<a href="#">Something else here</a>
|
|
244
|
-
</btn-dropdown>
|
|
245
|
-
|
|
246
|
-
<hr>
|
|
247
|
-
|
|
248
|
-
<h3>Dropright variation</h3>
|
|
249
|
-
|
|
250
|
-
<btn-dropdown label="Dropup" variant="secondary" dropright>
|
|
251
|
-
<a href="#">Action</a>
|
|
252
|
-
<a href="#">Another Action</a>
|
|
253
|
-
<a href="#">Something else here</a>
|
|
254
|
-
</btn-dropdown>
|
|
255
|
-
|
|
256
|
-
<btn-dropdown label="Split Dropup" variant="secondary" split dropright>
|
|
257
|
-
<a href="#">Action</a>
|
|
258
|
-
<a href="#">Another Action</a>
|
|
259
|
-
<a href="#">Something else here</a>
|
|
260
|
-
</btn-dropdown>
|
|
261
|
-
|
|
262
|
-
<hr>
|
|
263
|
-
|
|
264
|
-
<h3>Dropleft variation</h3>
|
|
265
|
-
|
|
266
|
-
<btn-dropdown label="Dropleft" variant="secondary" dropleft>
|
|
267
|
-
<a href="#">Action</a>
|
|
268
|
-
<a href="#">Another Action</a>
|
|
269
|
-
<a href="#">Something else here</a>
|
|
270
|
-
</btn-dropdown>
|
|
271
|
-
|
|
272
|
-
<btn-dropdown label="Dropleft" variant="secondary" split dropleft>
|
|
273
|
-
<a href="#">Action</a>
|
|
274
|
-
<a href="#">Another Action</a>
|
|
275
|
-
<a href="#">Something else here</a>
|
|
276
|
-
</btn-dropdown>
|
|
277
|
-
|
|
278
|
-
<hr>
|
|
279
|
-
|
|
280
|
-
<h3>Button Menu Items</h3>
|
|
281
|
-
|
|
282
|
-
<btn-dropdown label="Dropup" variant="secondary">
|
|
283
|
-
<a>Action</a>
|
|
284
|
-
<a>Another Action</a>
|
|
285
|
-
<a >Something else here</a>
|
|
286
|
-
</btn-dropdown>
|
|
287
|
-
|
|
288
|
-
<btn-dropdown label="Split Dropup" variant="secondary" split>
|
|
289
|
-
<a>Action</a>
|
|
290
|
-
<a>Another Action</a>
|
|
291
|
-
<a>Something else here</a>
|
|
292
|
-
</btn-dropdown>
|
|
293
|
-
-->
|
|
294
|
-
</div>
|
|
295
|
-
|
|
296
|
-
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
|
|
297
|
-
<script src="https://cdn.jsdelivr.net/npm/vue-router/dist/vue-router.js"></script>
|
|
298
|
-
<script src="https://cdn.jsdelivr.net/npm/@vue-interface/navigation/dist/Navigation.umd.min.js"></script>
|
|
299
|
-
<script type="text/javascript" src="./dist/BtnDropdown.umd.js"></script>
|
|
300
|
-
<script type="text/javascript">
|
|
301
|
-
Vue.use(VueRouter);
|
|
302
|
-
|
|
303
|
-
const router = new VueRouter({
|
|
304
|
-
routes: [{
|
|
305
|
-
path: '/test',
|
|
306
|
-
name: 'Home'
|
|
307
|
-
}]
|
|
308
|
-
});
|
|
309
|
-
|
|
310
|
-
const vue = new Vue({
|
|
311
|
-
router,
|
|
312
|
-
el: '#app',
|
|
313
|
-
components: {
|
|
314
|
-
BtnDropdown,
|
|
315
|
-
Navigation
|
|
316
|
-
},
|
|
317
|
-
methods: {
|
|
318
|
-
onClick(e) {
|
|
319
|
-
console.log('click', e);
|
|
320
|
-
},
|
|
321
|
-
onToggle(e) {
|
|
322
|
-
console.log('toggle', e);
|
|
323
|
-
|
|
324
|
-
// e.preventDefault() will stop the toggle.
|
|
325
|
-
},
|
|
326
|
-
onClickItem(e) {
|
|
327
|
-
e.stopPropagation();
|
|
328
|
-
}
|
|
329
|
-
},
|
|
330
|
-
data() {
|
|
331
|
-
return {
|
|
332
|
-
hasClicked: false,
|
|
333
|
-
hasClicked2: false
|
|
334
|
-
}
|
|
335
|
-
}
|
|
336
|
-
});
|
|
337
|
-
</script>
|
|
338
|
-
</body>
|
|
339
|
-
</html>
|
package/index.js
DELETED
package/main.vue
DELETED
package/postcss.config.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = {};
|
package/public/favicon.ico
DELETED
|
Binary file
|
package/public/index.html
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8">
|
|
5
|
-
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
6
|
-
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
|
7
|
-
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
|
8
|
-
<title><%= htmlWebpackPlugin.options.title %></title>
|
|
9
|
-
</head>
|
|
10
|
-
<body>
|
|
11
|
-
<noscript>
|
|
12
|
-
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
|
|
13
|
-
</noscript>
|
|
14
|
-
<div id="app"></div>
|
|
15
|
-
<!-- built files will be auto injected -->
|
|
16
|
-
</body>
|
|
17
|
-
</html>
|
package/src/BtnDropdown.vue
DELETED
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<component
|
|
3
|
-
:is="$attrs.split === undefined ? 'btn-dropdown-single' : 'btn-dropdown-split'"
|
|
4
|
-
class="btn-dropdown"
|
|
5
|
-
v-bind="$attrs"
|
|
6
|
-
@click="(...args) => this.$emit('click', ...args)"
|
|
7
|
-
@click-toggle="(...args) => this.$emit('click-toggle', ...args)"
|
|
8
|
-
@dropdown="(...args) => this.$emit('dropdown', ...args)"
|
|
9
|
-
@show="(...args) => this.$emit('show', ...args)"
|
|
10
|
-
@hide="(...args) => this.$emit('hide', ...args)"
|
|
11
|
-
@toggle="(...args) => this.$emit('toggle', ...args)">
|
|
12
|
-
<template #icon>
|
|
13
|
-
<slot name="icon" />
|
|
14
|
-
</template>
|
|
15
|
-
<template v-if="$attrs.label || this.$slots.label" #label>
|
|
16
|
-
<slot name="label">
|
|
17
|
-
{{ $attrs.label }}
|
|
18
|
-
</slot>
|
|
19
|
-
</template>
|
|
20
|
-
<slot />
|
|
21
|
-
</component>
|
|
22
|
-
</template>
|
|
23
|
-
|
|
24
|
-
<script>
|
|
25
|
-
import BtnDropdownSplit from './BtnDropdownSplit';
|
|
26
|
-
import BtnDropdownSingle from './BtnDropdownSingle';
|
|
27
|
-
|
|
28
|
-
export default {
|
|
29
|
-
|
|
30
|
-
name: 'BtnDropdown',
|
|
31
|
-
|
|
32
|
-
components: {
|
|
33
|
-
BtnDropdownSplit,
|
|
34
|
-
BtnDropdownSingle
|
|
35
|
-
},
|
|
36
|
-
|
|
37
|
-
inheritAttrs: false
|
|
38
|
-
|
|
39
|
-
};
|
|
40
|
-
</script>
|
|
41
|
-
|
|
42
|
-
<style>
|
|
43
|
-
@keyframes btnDropdownZoomIn {
|
|
44
|
-
from {
|
|
45
|
-
opacity: 0;
|
|
46
|
-
transform: scale3d(0.3, 0.3, 0.3);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
50% {
|
|
50
|
-
opacity: 1;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.btn-dropdown {
|
|
55
|
-
position: relative;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.btn-dropdown.nav-link .dropdown-toggle {
|
|
59
|
-
background: none;
|
|
60
|
-
border: 0;
|
|
61
|
-
padding: .5rem .25em;
|
|
62
|
-
margin-left: .25rem;
|
|
63
|
-
margin-right: -.25rem;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.btn-dropdown .dropdown-toggle {
|
|
67
|
-
display: flex;
|
|
68
|
-
transition: all 125ms ease-in;
|
|
69
|
-
align-items: center;
|
|
70
|
-
justify-content: center;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.btn-dropdown.rounded-circle > .btn:last-child,
|
|
74
|
-
.btn-dropdown.rounded-circle > .btn-group:last-child .dropdown-toggle {
|
|
75
|
-
border-top-right-radius: 1000rem;
|
|
76
|
-
border-bottom-right-radius: 1000rem;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
.btn-dropdown.rounded-circle > .btn:first-child,
|
|
80
|
-
.btn-dropdown.rounded-circle > .btn-group:first-child .dropdown-toggle {
|
|
81
|
-
border-top-left-radius: 1000rem;
|
|
82
|
-
border-bottom-left-radius: 1000rem;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
.btn-dropdown .rounded-circle {
|
|
86
|
-
border-radius: 1000rem;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
.btn-dropdown .rotate-90 {
|
|
90
|
-
transform: rotate(90deg);
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
.btn-dropdown.hide-caret .dropdown-toggle::after,
|
|
94
|
-
.btn-dropdown.icon-only .dropdown-toggle::after,
|
|
95
|
-
.btn-dropdown.hide-caret .dropdown-toggle::before,
|
|
96
|
-
.btn-dropdown.icon-only .dropdown-toggle::before {
|
|
97
|
-
display: none;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
.btn-dropdown .dropdown-menu {
|
|
101
|
-
animation-duration: 125ms;
|
|
102
|
-
animation-fill-mode: both;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
.btn-dropdown .dropdown-menu.animated {
|
|
106
|
-
animation-name: btnDropdownZoomIn;
|
|
107
|
-
}
|
|
108
|
-
</style>
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<component
|
|
3
|
-
:is="is"
|
|
4
|
-
:id="id"
|
|
5
|
-
v-bind="to ? { to } : { href }"
|
|
6
|
-
aria-haspopup="true"
|
|
7
|
-
:aria-expanded="expanded"
|
|
8
|
-
:type="is === 'button' ? 'button': undefined">
|
|
9
|
-
<slot />
|
|
10
|
-
</component>
|
|
11
|
-
</template>
|
|
12
|
-
|
|
13
|
-
<script>
|
|
14
|
-
export default {
|
|
15
|
-
props: {
|
|
16
|
-
expanded: {
|
|
17
|
-
type: Boolean,
|
|
18
|
-
default: false
|
|
19
|
-
},
|
|
20
|
-
id: String,
|
|
21
|
-
href: String,
|
|
22
|
-
to: [String, Object]
|
|
23
|
-
},
|
|
24
|
-
computed: {
|
|
25
|
-
is() {
|
|
26
|
-
if(this.to) {
|
|
27
|
-
return 'router-link';
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
if(this.href) {
|
|
31
|
-
return 'a';
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
return 'button';
|
|
35
|
-
},
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
</script>
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<btn-group :class="classes">
|
|
3
|
-
<btn-dropdown-action
|
|
4
|
-
:id="$attrs.id"
|
|
5
|
-
ref="button"
|
|
6
|
-
:expanded="isDropdownShowing"
|
|
7
|
-
:href="href"
|
|
8
|
-
:to="to"
|
|
9
|
-
:style="toggleStyle"
|
|
10
|
-
:class="toggleClasses"
|
|
11
|
-
@click.native="onClickToggle">
|
|
12
|
-
<slot name="icon" />
|
|
13
|
-
<slot name="label">
|
|
14
|
-
{{ label }}
|
|
15
|
-
</slot>
|
|
16
|
-
</btn-dropdown-action>
|
|
17
|
-
<dropdown-menu
|
|
18
|
-
:id="$attrs.id"
|
|
19
|
-
ref="menu"
|
|
20
|
-
:align="align"
|
|
21
|
-
:show="isDropdownShowing"
|
|
22
|
-
:class="{animated: triggerAnimation}"
|
|
23
|
-
@click-item="onClickItem"
|
|
24
|
-
@blur-item="onBlurItem">
|
|
25
|
-
<slot />
|
|
26
|
-
</dropdown-menu>
|
|
27
|
-
</btn-group>
|
|
28
|
-
</template>
|
|
29
|
-
|
|
30
|
-
<script>
|
|
31
|
-
import DropdownHandler from './DropdownHandler';
|
|
32
|
-
|
|
33
|
-
export default {
|
|
34
|
-
|
|
35
|
-
mixins: [
|
|
36
|
-
DropdownHandler
|
|
37
|
-
]
|
|
38
|
-
|
|
39
|
-
};
|
|
40
|
-
</script>
|
package/src/BtnDropdownSplit.vue
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<btn-group :class="classes" @click="onClick">
|
|
3
|
-
<btn-dropdown-action
|
|
4
|
-
v-if="!dropleft"
|
|
5
|
-
:id="$attrs.id"
|
|
6
|
-
ref="button"
|
|
7
|
-
:expanded="isDropdownShowing"
|
|
8
|
-
:href="href"
|
|
9
|
-
:to="to"
|
|
10
|
-
:class="actionClasses"
|
|
11
|
-
@click.native="e => $emit('click', e)">
|
|
12
|
-
<slot name="icon" />
|
|
13
|
-
<slot name="label">
|
|
14
|
-
{{ label }}
|
|
15
|
-
</slot>
|
|
16
|
-
</btn-dropdown-action>
|
|
17
|
-
<btn-group>
|
|
18
|
-
<button
|
|
19
|
-
v-if="split"
|
|
20
|
-
:id="$attrs.id"
|
|
21
|
-
ref="split"
|
|
22
|
-
type="button"
|
|
23
|
-
aria-haspopup="true"
|
|
24
|
-
:aria-expanded="isDropdownShowing"
|
|
25
|
-
:class="toggleClasses"
|
|
26
|
-
@click="onClickToggle" />
|
|
27
|
-
|
|
28
|
-
<dropdown-menu
|
|
29
|
-
:id="$attrs.id"
|
|
30
|
-
ref="menu"
|
|
31
|
-
:align="align"
|
|
32
|
-
:show="isDropdownShowing"
|
|
33
|
-
:class="{animated: triggerAnimation}"
|
|
34
|
-
@click-item="onClickItem"
|
|
35
|
-
@blur-item="onBlurItem">
|
|
36
|
-
<slot />
|
|
37
|
-
</dropdown-menu>
|
|
38
|
-
</btn-group>
|
|
39
|
-
<btn-dropdown-action
|
|
40
|
-
v-if="dropleft"
|
|
41
|
-
:id="$attrs.id"
|
|
42
|
-
ref="button"
|
|
43
|
-
:expanded="isDropdownShowing"
|
|
44
|
-
:href="href"
|
|
45
|
-
:to="to"
|
|
46
|
-
:class="actionClasses"
|
|
47
|
-
@click.native="e => $emit('click', e)">
|
|
48
|
-
<slot name="icon" />
|
|
49
|
-
<slot name="label">
|
|
50
|
-
{{ label }}
|
|
51
|
-
</slot>
|
|
52
|
-
</btn-dropdown-action>
|
|
53
|
-
</btn-group>
|
|
54
|
-
</template>
|
|
55
|
-
|
|
56
|
-
<script>
|
|
57
|
-
import DropdownHandler from './DropdownHandler';
|
|
58
|
-
|
|
59
|
-
export default {
|
|
60
|
-
|
|
61
|
-
mixins: [
|
|
62
|
-
DropdownHandler
|
|
63
|
-
]
|
|
64
|
-
|
|
65
|
-
};
|
|
66
|
-
</script>
|