-
-
Notifications
You must be signed in to change notification settings - Fork 356
/
ionic.ts
119 lines (117 loc) · 2.1 KB
/
ionic.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
import type { ComponentResolver } from '../../types'
/**
* source: https://github.com/nuxt-modules/ionic/blob/main/src/imports.ts
* @author @danielroe
*/
// @keep-sorted
export const IonicBuiltInComponents = [
'IonAccordion',
'IonAccordionGroup',
'IonActionSheet',
'IonAlert',
'IonApp',
'IonAvatar',
'IonBackButton',
'IonBackdrop',
'IonBadge',
'IonBreadcrumb',
'IonBreadcrumbs',
'IonButton',
'IonButtons',
'IonCard',
'IonCardContent',
'IonCardHeader',
'IonCardSubtitle',
'IonCardTitle',
'IonCheckbox',
'IonChip',
'IonCol',
'IonContent',
'IonDatetime',
'IonDatetimeButton',
'IonFab',
'IonFabButton',
'IonFabList',
'IonFooter',
'IonGrid',
'IonHeader',
'IonIcon',
'IonImg',
'IonInfiniteScroll',
'IonInfiniteScrollContent',
'IonInput',
'IonInputPasswordToggle',
'IonItem',
'IonItemDivider',
'IonItemGroup',
'IonItemOption',
'IonItemOptions',
'IonItemSliding',
'IonLabel',
'IonList',
'IonListHeader',
'IonLoading',
'IonMenu',
'IonMenuButton',
'IonMenuToggle',
'IonModal',
'IonNav',
'IonNavLink',
'IonNote',
'IonPage',
'IonPicker',
'IonPickerColumn',
'IonPickerColumnOption',
'IonPickerLegacy',
'IonPopover',
'IonProgressBar',
'IonRadio',
'IonRadioGroup',
'IonRange',
'IonRefresher',
'IonRefresherContent',
'IonReorder',
'IonReorderGroup',
'IonRippleEffect',
'IonRouterOutlet',
'IonRow',
'IonSearchbar',
'IonSegment',
'IonSegmentButton',
'IonSegmentContent',
'IonSegmentView',
'IonSelect',
'IonSelectOption',
'IonSkeletonText',
'IonSpinner',
'IonSplitPane',
'IonTabBar',
'IonTabButton',
'IonTabs',
'IonText',
'IonTextarea',
'IonThumbnail',
'IonTitle',
'IonToast',
'IonToggle',
'IonToolbar',
]
/**
* Resolver for ionic framework
*
* @author @mathsgod @reslear
* @link https://ionicframework.com/
*/
export function IonicResolver(): ComponentResolver {
return {
type: 'component',
resolve: (name: string) => {
if (IonicBuiltInComponents.includes(name)) {
return {
name,
from: '@ionic/vue',
}
}
},
}
}