@vue-interface/btn-dropdown 2.0.0-beta.1 → 2.0.0-beta.10

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.
@@ -0,0 +1,463 @@
1
+ declare const _default: import("vue").DefineComponent<{
2
+ /**
3
+ * Display the dropdown menu aligned left or right
4
+ *
5
+ * @property String
6
+ */
7
+ align: {
8
+ type: StringConstructor;
9
+ default: string;
10
+ validate(value: any): boolean;
11
+ };
12
+ /**
13
+ * Should animate the dropdown opening.
14
+ *
15
+ * @property {Boolean}
16
+ */
17
+ animated: {
18
+ type: BooleanConstructor;
19
+ default: boolean;
20
+ };
21
+ /**
22
+ * Additional button classes.
23
+ *
24
+ * @property {Object|String}
25
+ */
26
+ buttonClass: (StringConstructor | ObjectConstructor)[];
27
+ /**
28
+ * Show the caret.
29
+ *
30
+ * @property {Boolean}
31
+ */
32
+ caret: {
33
+ type: BooleanConstructor;
34
+ default: boolean;
35
+ };
36
+ /**
37
+ * Should display the toggle button as a circle.
38
+ *
39
+ * @property Boolean
40
+ */
41
+ /**
42
+ * Display as a dropup instead of a dropdown.
43
+ *
44
+ * @property Boolean
45
+ */
46
+ dropup: {
47
+ type: BooleanConstructor;
48
+ default: boolean;
49
+ };
50
+ /**
51
+ * Display as a dropright instead of a dropdown.
52
+ *
53
+ * @property Boolean
54
+ */
55
+ dropright: {
56
+ type: BooleanConstructor;
57
+ default: boolean;
58
+ };
59
+ /**
60
+ * Display as a dropleft instead of a dropdown.
61
+ *
62
+ * @property Boolean
63
+ */
64
+ dropleft: {
65
+ type: BooleanConstructor;
66
+ default: boolean;
67
+ };
68
+ /**
69
+ * The action height.
70
+ *
71
+ * @property {String}
72
+ */
73
+ height: StringConstructor;
74
+ /**
75
+ * The href action.
76
+ *
77
+ * @property {String}
78
+ */
79
+ href: StringConstructor;
80
+ /**
81
+ * Is the dropdown a nav item?
82
+ *
83
+ * @property {Boolean}
84
+ */
85
+ nav: BooleanConstructor;
86
+ /**
87
+ * The toggle button's label. If not defined as an attribute,
88
+ * you can override with the component's slot (inner html).
89
+ *
90
+ * @property {String}
91
+ */
92
+ label: StringConstructor;
93
+ offset: {
94
+ type: NumberConstructor;
95
+ default: number;
96
+ };
97
+ /**
98
+ * Should rotate the toggle button when opened.
99
+ *
100
+ * @property {Boolean}
101
+ */
102
+ rotate: {
103
+ type: BooleanConstructor;
104
+ default: boolean;
105
+ };
106
+ /**
107
+ * Display the dropdown button with a split toggle button.
108
+ *
109
+ * @property {Boolean}
110
+ */
111
+ split: {
112
+ type: BooleanConstructor;
113
+ default: boolean;
114
+ };
115
+ /**
116
+ * The "to" path, used for vue-router.
117
+ *
118
+ * @property {String|Object}
119
+ */
120
+ to: (StringConstructor | ObjectConstructor)[];
121
+ /**
122
+ * The button type attribute.
123
+ *
124
+ * @property {String}
125
+ */
126
+ type: {
127
+ type: StringConstructor;
128
+ default: string;
129
+ };
130
+ /**
131
+ * The action width.
132
+ *
133
+ * @property {String}
134
+ */
135
+ width: StringConstructor;
136
+ }, unknown, {
137
+ popper: null;
138
+ triggerAnimation: boolean;
139
+ expanded: boolean;
140
+ }, {
141
+ scope(): {
142
+ placement: any;
143
+ variantClassPrefix: any;
144
+ sizeableClassPrefix: any;
145
+ classes: any;
146
+ actionClasses: any;
147
+ toggleStyle: any;
148
+ toggleClasses: any;
149
+ focus: any;
150
+ queryFocusable: any;
151
+ isFocusable: any;
152
+ toggle: any;
153
+ show: any;
154
+ hide: any;
155
+ onBlur: any;
156
+ onClickItem: any;
157
+ onClickToggle: any;
158
+ expanded: any;
159
+ };
160
+ placement(): "left" | "right" | "top" | "bottom";
161
+ variantClassPrefix(): string;
162
+ sizeableClassPrefix(): "btn";
163
+ classes(): {
164
+ dropdown: any;
165
+ dropup: any;
166
+ dropright: any;
167
+ dropleft: any;
168
+ 'icon-only': boolean;
169
+ 'hide-caret': boolean;
170
+ expanded: any;
171
+ 'rotate-90': any;
172
+ };
173
+ actionClasses(): any;
174
+ toggleStyle(): {
175
+ width: any;
176
+ height: any;
177
+ };
178
+ toggleClasses(): any;
179
+ }, {
180
+ /**
181
+ * Focus on the the dropdown toggle button
182
+ *
183
+ * @return void
184
+ */
185
+ focus(): void;
186
+ /**
187
+ * Focus on the the dropdown toggle button
188
+ *
189
+ * @return void
190
+ */
191
+ queryFocusable(): any;
192
+ /**
193
+ * Method to check if the given element is focusable.
194
+ *
195
+ * @return void
196
+ */
197
+ isFocusable(element: any): boolean;
198
+ /**
199
+ * Toggle the dropdown menu
200
+ *
201
+ * @return void
202
+ */
203
+ toggle(): void;
204
+ /**
205
+ * Show the dropdown menu
206
+ *
207
+ * @return void
208
+ */
209
+ show(): void;
210
+ /**
211
+ * Hide the dropdown menu
212
+ *
213
+ * @return void
214
+ */
215
+ hide(): void;
216
+ /**
217
+ * A callback function for the `blur-item` event.
218
+ *
219
+ * @return void
220
+ */
221
+ onBlur(e: any): void;
222
+ onClickDocument(e: Event): void;
223
+ /**
224
+ * A callback function for the `click-item` event.
225
+ *
226
+ * @return void
227
+ */
228
+ onClickItem(e: any): void;
229
+ /**
230
+ * A callback function for the `click-toggle` event.
231
+ *
232
+ * @return void
233
+ */
234
+ onClickToggle(e: any): void;
235
+ onKeydown(e: any): void;
236
+ }, import("vue").ComponentOptionsMixin, import("vue").DefineComponent<{
237
+ active: BooleanConstructor;
238
+ block: BooleanConstructor;
239
+ componentPrefix: {
240
+ type: StringConstructor;
241
+ default: string;
242
+ };
243
+ disabled: BooleanConstructor;
244
+ label: StringConstructor;
245
+ outline: BooleanConstructor;
246
+ tag: StringConstructor;
247
+ variant: {
248
+ type: StringConstructor;
249
+ default: string;
250
+ };
251
+ }, unknown, unknown, {
252
+ classes(): string | undefined[];
253
+ component(): string;
254
+ variantClassPrefix(): string;
255
+ }, {}, import("vue").DefineComponent<{
256
+ componentPrefix: StringConstructor;
257
+ size: StringConstructor;
258
+ sizePrefix: StringConstructor;
259
+ }, unknown, unknown, {
260
+ sizeableClassPrefix(): string | undefined;
261
+ hasSizeablePrefix(): boolean;
262
+ sizeableClass(): string;
263
+ }, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
264
+ componentPrefix: StringConstructor;
265
+ size: StringConstructor;
266
+ sizePrefix: StringConstructor;
267
+ }>>, {}> | {
268
+ props: {
269
+ componentPrefix: StringConstructor;
270
+ variant: StringConstructor;
271
+ variantPrefix: StringConstructor;
272
+ };
273
+ computed: {
274
+ variantClassPrefix(): string | undefined;
275
+ hasVariantPrefix(): boolean;
276
+ variantClass(): string;
277
+ };
278
+ }, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
279
+ active: BooleanConstructor;
280
+ block: BooleanConstructor;
281
+ componentPrefix: {
282
+ type: StringConstructor;
283
+ default: string;
284
+ };
285
+ /**
286
+ * The toggle button's label. If not defined as an attribute,
287
+ * you can override with the component's slot (inner html).
288
+ *
289
+ * @property {String}
290
+ */
291
+ disabled: BooleanConstructor;
292
+ label: StringConstructor;
293
+ outline: BooleanConstructor;
294
+ tag: StringConstructor;
295
+ variant: {
296
+ type: StringConstructor;
297
+ default: string;
298
+ };
299
+ }>>, {
300
+ componentPrefix: string;
301
+ active: boolean;
302
+ block: boolean;
303
+ disabled: boolean;
304
+ outline: boolean; /**
305
+ * Display the dropdown button with a split toggle button.
306
+ *
307
+ * @property {Boolean}
308
+ */
309
+ variant: string;
310
+ }>, ("toggle" | "show" | "click-toggle" | "hide")[], "toggle" | "show" | "click-toggle" | "hide", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
311
+ /**
312
+ * Display the dropdown menu aligned left or right
313
+ *
314
+ * @property String
315
+ */
316
+ align: {
317
+ type: StringConstructor;
318
+ default: string;
319
+ validate(value: any): boolean;
320
+ };
321
+ /**
322
+ * Should animate the dropdown opening.
323
+ *
324
+ * @property {Boolean}
325
+ */
326
+ animated: {
327
+ type: BooleanConstructor;
328
+ default: boolean;
329
+ };
330
+ /**
331
+ * Additional button classes.
332
+ *
333
+ * @property {Object|String}
334
+ */
335
+ buttonClass: (StringConstructor | ObjectConstructor)[];
336
+ /**
337
+ * Show the caret.
338
+ *
339
+ * @property {Boolean}
340
+ */
341
+ caret: {
342
+ type: BooleanConstructor;
343
+ default: boolean;
344
+ };
345
+ /**
346
+ * Should display the toggle button as a circle.
347
+ *
348
+ * @property Boolean
349
+ */
350
+ /**
351
+ * Display as a dropup instead of a dropdown.
352
+ *
353
+ * @property Boolean
354
+ */
355
+ dropup: {
356
+ type: BooleanConstructor;
357
+ default: boolean;
358
+ };
359
+ /**
360
+ * Display as a dropright instead of a dropdown.
361
+ *
362
+ * @property Boolean
363
+ */
364
+ dropright: {
365
+ type: BooleanConstructor;
366
+ default: boolean;
367
+ };
368
+ /**
369
+ * Display as a dropleft instead of a dropdown.
370
+ *
371
+ * @property Boolean
372
+ */
373
+ dropleft: {
374
+ type: BooleanConstructor;
375
+ default: boolean;
376
+ };
377
+ /**
378
+ * The action height.
379
+ *
380
+ * @property {String}
381
+ */
382
+ height: StringConstructor;
383
+ /**
384
+ * The href action.
385
+ *
386
+ * @property {String}
387
+ */
388
+ href: StringConstructor;
389
+ /**
390
+ * Is the dropdown a nav item?
391
+ *
392
+ * @property {Boolean}
393
+ */
394
+ nav: BooleanConstructor;
395
+ /**
396
+ * The toggle button's label. If not defined as an attribute,
397
+ * you can override with the component's slot (inner html).
398
+ *
399
+ * @property {String}
400
+ */
401
+ label: StringConstructor;
402
+ offset: {
403
+ type: NumberConstructor;
404
+ default: number;
405
+ };
406
+ /**
407
+ * Should rotate the toggle button when opened.
408
+ *
409
+ * @property {Boolean}
410
+ */
411
+ rotate: {
412
+ type: BooleanConstructor;
413
+ default: boolean;
414
+ };
415
+ /**
416
+ * Display the dropdown button with a split toggle button.
417
+ *
418
+ * @property {Boolean}
419
+ */
420
+ split: {
421
+ type: BooleanConstructor;
422
+ default: boolean;
423
+ };
424
+ /**
425
+ * The "to" path, used for vue-router.
426
+ *
427
+ * @property {String|Object}
428
+ */
429
+ to: (StringConstructor | ObjectConstructor)[];
430
+ /**
431
+ * The button type attribute.
432
+ *
433
+ * @property {String}
434
+ */
435
+ type: {
436
+ type: StringConstructor;
437
+ default: string;
438
+ };
439
+ /**
440
+ * The action width.
441
+ *
442
+ * @property {String}
443
+ */
444
+ width: StringConstructor;
445
+ }>> & {
446
+ onToggle?: ((...args: any[]) => any) | undefined;
447
+ onShow?: ((...args: any[]) => any) | undefined;
448
+ "onClick-toggle"?: ((...args: any[]) => any) | undefined;
449
+ onHide?: ((...args: any[]) => any) | undefined;
450
+ }, {
451
+ type: string;
452
+ split: boolean;
453
+ align: string;
454
+ animated: boolean;
455
+ caret: boolean;
456
+ dropup: boolean;
457
+ dropright: boolean;
458
+ dropleft: boolean;
459
+ nav: boolean;
460
+ offset: number;
461
+ rotate: boolean;
462
+ }>;
463
+ export default _default;
package/package.json CHANGED
@@ -1,24 +1,27 @@
1
1
  {
2
2
  "name": "@vue-interface/btn-dropdown",
3
- "version": "2.0.0-beta.1",
3
+ "version": "2.0.0-beta.10",
4
4
  "description": "A Vue button dropdown component.",
5
5
  "files": [
6
- "index.js",
7
- "dist",
8
- "src"
6
+ "dist"
9
7
  ],
8
+ "type": "module",
10
9
  "main": "./dist/btn-dropdown.umd.js",
11
- "module": "./index.js",
10
+ "module": "./dist/btn-dropdown.js",
11
+ "types": "./dist/index.d.ts",
12
+ "exports": {
13
+ ".": {
14
+ "import": "./dist/btn-dropdown.js",
15
+ "require": "./dist/btn-dropdown.umd.js",
16
+ "types": "./dist/index.d.ts"
17
+ },
18
+ "./dist/style.css": "./dist/style.css"
19
+ },
12
20
  "browserslist": "last 2 versions, > 0.5%, ie >= 11",
13
21
  "scripts": {
14
22
  "dev": "vite",
15
23
  "build": "vite build",
16
- "preview": "vite preview",
17
- "pre-release": "npm run build; git add . -A; git commit -m 'pre-release commit'",
18
- "release-patch": "npm run pre-release && npm version patch -m \"%s\" && npm run release;",
19
- "release-minor": "npm run pre-release && npm version minor -m \"%s\" && npm run release;",
20
- "release-major": "npm run pre-release && npm version major -m \"%s\" && npm run release;",
21
- "release": "git add . -A; git commit; git push --tags origin; npm publish;"
24
+ "preview": "vite preview"
22
25
  },
23
26
  "repository": {
24
27
  "type": "git",
@@ -38,29 +41,28 @@
38
41
  "bugs": {
39
42
  "url": "https://github.com/vue-interface/btn-dropdown/issues"
40
43
  },
41
- "homepage": "https://github.com/vue-interface/btn-dropdown/docs#readme",
44
+ "homepage": "https://github.com/vue-interface/btn-dropdown",
42
45
  "dependencies": {
43
46
  "@popperjs/core": "^2.11.2",
44
47
  "@vue-interface/btn": "^3.0.0-beta.1",
45
- "@vue-interface/btn-group": "^2.0.0-beta.0",
46
- "@vue-interface/dropdown-menu": "^2.0.0-beta.3"
48
+ "@vue-interface/btn-group": "^2.0.0-beta.4",
49
+ "@vue-interface/dropdown-menu": "^2.0.0-beta.8"
47
50
  },
48
51
  "peerDependencies": {
49
52
  "vue": "^3.0.0"
50
53
  },
51
54
  "devDependencies": {
52
- "@rollup/plugin-babel": "^6.0.0",
53
- "@vitejs/plugin-vue": "^3.0.3",
55
+ "@vitejs/plugin-vue": "^4.0.0",
56
+ "@vue-interface/eslint-config": "^1.0.0-beta.0",
54
57
  "autoprefixer": "^10.4.2",
55
- "babel-eslint": "^10.1.0",
56
- "babel-preset-vue": "^2.0.2",
57
58
  "change-case": "^4.1.2",
58
59
  "eslint": "^8.25.0",
59
- "eslint-plugin-vue": "^9.6.0",
60
60
  "pascalcase": "^2.0.0",
61
61
  "postcss": "^8.4.6",
62
62
  "tailwindcss": "^3.1.0",
63
- "vite": "^3.1.8",
63
+ "typescript": "^4.9.4",
64
+ "vite": "^4.0.0",
65
+ "vite-plugin-dts": "^1.7.1",
64
66
  "vue": "^3.2.41"
65
67
  }
66
68
  }