@bagelink/vue 0.0.716 → 0.0.724
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/components/Btn.vue.d.ts +3 -3
- package/dist/components/Btn.vue.d.ts.map +1 -1
- package/dist/components/Carousel.vue.d.ts +1 -1
- package/dist/components/ComboBox.vue.d.ts +3 -3
- package/dist/components/Comments.vue.d.ts +2 -2
- package/dist/components/ContactSubmissions.vue.d.ts +2 -2
- package/dist/components/DropDown.vue.d.ts +3 -3
- package/dist/components/FormSchema.vue.d.ts +4 -5
- package/dist/components/LangText.vue.d.ts +2 -2
- package/dist/components/MaterialIcon.vue.d.ts +0 -1
- package/dist/components/MaterialIcon.vue.d.ts.map +1 -1
- package/dist/components/ModalBglForm.vue.d.ts +20 -21
- package/dist/components/PersonPreview.vue.d.ts +4 -5
- package/dist/components/PersonPreviewFormkit.vue.d.ts +3 -4
- package/dist/components/Popover.vue.d.ts +10 -0
- package/dist/components/Popover.vue.d.ts.map +1 -0
- package/dist/components/RTXEditor.vue.d.ts +3 -3
- package/dist/components/TabbedLayout.vue.d.ts +4 -5
- package/dist/components/charts/BarChart.vue.d.ts +2 -2
- package/dist/components/form/BglForm.vue.d.ts +1 -1
- package/dist/components/form/BglMultiStepForm.vue.d.ts +11 -11
- package/dist/components/form/ItemRef.vue.d.ts +3 -5
- package/dist/components/form/ItemRef.vue.d.ts.map +1 -1
- package/dist/components/form/MaterialIcon.vue.d.ts +3 -4
- package/dist/components/form/PlainInputField.vue.d.ts +3 -3
- package/dist/components/form/inputs/CurrencyInput.vue.d.ts +3 -3
- package/dist/components/form/inputs/DatetimeInput.vue.d.ts +3 -3
- package/dist/components/form/inputs/DurationInput.vue.d.ts +3 -3
- package/dist/components/form/inputs/DynamicLinkField.vue.d.ts +3 -3
- package/dist/components/form/inputs/EmailInput.vue.d.ts +3 -3
- package/dist/components/form/inputs/FloatInput.vue.d.ts +3 -3
- package/dist/components/form/inputs/IntInput.vue.d.ts +3 -3
- package/dist/components/form/inputs/JSONInput.vue.d.ts +1 -1
- package/dist/components/form/inputs/JSONInput.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/LinkField.vue.d.ts +3 -3
- package/dist/components/form/inputs/Password.vue.d.ts +3 -3
- package/dist/components/form/inputs/PasswordInput.vue.d.ts +3 -3
- package/dist/components/form/inputs/PlainText.vue.d.ts +3 -3
- package/dist/components/form/inputs/RadioPillsInput.vue.d.ts +1 -1
- package/dist/components/form/inputs/RadioPillsInput.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/ReadOnlyInput.vue.d.ts +2 -2
- package/dist/components/form/inputs/RichText2/index.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/RichTextEditor.vue.d.ts +3 -3
- package/dist/components/form/inputs/SelectField.vue.d.ts +8 -6
- package/dist/components/form/inputs/SelectField.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/TelInput.vue.d.ts +5 -5
- package/dist/components/form/inputs/TelInput.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/TextArea.vue.d.ts +3 -3
- package/dist/components/formkit/AddressArray.vue.d.ts +2 -2
- package/dist/components/formkit/BankDetailsArray.vue.d.ts +2 -2
- package/dist/components/formkit/ContactArrayFormKit.vue.d.ts +2 -2
- package/dist/components/formkit/FileUploader.vue.d.ts +2 -2
- package/dist/components/formkit/MiscFields.vue.d.ts +2 -2
- package/dist/components/formkit/Toggle.vue.d.ts +2 -2
- package/dist/components/lightbox/Lightbox.vue.d.ts +10 -0
- package/dist/components/lightbox/Lightbox.vue.d.ts.map +1 -0
- package/dist/components/lightbox/index.d.ts +6 -0
- package/dist/components/lightbox/index.d.ts.map +1 -0
- package/dist/components/lightbox/lightbox.types.d.ts +7 -0
- package/dist/components/lightbox/lightbox.types.d.ts.map +1 -0
- package/dist/components/whatsapp/form/MsgTemplate.vue.d.ts +3 -4
- package/dist/components/whatsapp/form/TextVariableExamples.vue.d.ts +2 -2
- package/dist/index.cjs +259 -48
- package/dist/index.mjs +260 -49
- package/dist/plugins/bagel.d.ts.map +1 -1
- package/dist/style.css +110 -12
- package/dist/types/materialIcon.d.ts +2 -0
- package/dist/types/materialIcon.d.ts.map +1 -0
- package/dist/utils/BagelFormUtils.d.ts +48 -48
- package/dist/utils/objects.d.ts +0 -1
- package/package.json +1 -1
- package/src/components/form/inputs/RichText2/FontWithASyntaxHighlighter-Regular.woff2 +0 -0
- package/src/components/form/inputs/RichText2/index.vue +31 -11
- package/src/components/lightbox/Lightbox.vue +228 -0
- package/src/components/lightbox/index.ts +61 -0
- package/src/components/lightbox/lightbox.types.ts +6 -0
- package/src/plugins/bagel.ts +2 -2
- package/dist/components/Accordion.d.ts +0 -12
- package/dist/components/Accordion.d.ts.map +0 -1
- package/dist/components/AccordionItem.d.ts +0 -34
- package/dist/components/AccordionItem.d.ts.map +0 -1
- package/dist/components/Alert.d.ts +0 -34
- package/dist/components/Alert.d.ts.map +0 -1
- package/dist/components/Avatar.d.ts +0 -36
- package/dist/components/Avatar.d.ts.map +0 -1
- package/dist/components/Badge.d.ts +0 -22
- package/dist/components/Badge.d.ts.map +0 -1
- package/dist/components/BglVideo.d.ts +0 -20
- package/dist/components/BglVideo.d.ts.map +0 -1
- package/dist/components/Btn.d.ts +0 -99
- package/dist/components/Btn.d.ts.map +0 -1
- package/dist/components/Card.d.ts +0 -39
- package/dist/components/Card.d.ts.map +0 -1
- package/dist/components/Carousel.d.ts +0 -74
- package/dist/components/Carousel.d.ts.map +0 -1
- package/dist/components/DataPreview.d.ts +0 -42
- package/dist/components/DataPreview.d.ts.map +0 -1
- package/dist/components/Drop.vue.d.ts +0 -34
- package/dist/components/Drop.vue.d.ts.map +0 -1
- package/dist/components/FileUploader.vue.d.ts +0 -60
- package/dist/components/FileUploader.vue.d.ts.map +0 -1
- package/dist/components/Flag.d.ts +0 -20
- package/dist/components/Flag.d.ts.map +0 -1
- package/dist/components/ListItem.d.ts +0 -34
- package/dist/components/ListItem.d.ts.map +0 -1
- package/dist/components/ListView.d.ts +0 -13
- package/dist/components/ListView.d.ts.map +0 -1
- package/dist/components/MapEmbed.d.ts +0 -3
- package/dist/components/MapEmbed.d.ts.map +0 -1
- package/dist/components/MaterialIcon.d.ts +0 -26
- package/dist/components/MaterialIcon.d.ts.map +0 -1
- package/dist/components/Modal.d.ts +0 -46
- package/dist/components/Modal.d.ts.map +0 -1
- package/dist/components/ModalConfirm.d.ts +0 -24
- package/dist/components/ModalConfirm.d.ts.map +0 -1
- package/dist/components/ModalForm.d.ts +0 -78
- package/dist/components/ModalForm.d.ts.map +0 -1
- package/dist/components/NavBar.d.ts +0 -64
- package/dist/components/NavBar.d.ts.map +0 -1
- package/dist/components/PageTitle.d.ts +0 -24
- package/dist/components/PageTitle.d.ts.map +0 -1
- package/dist/components/RouterWrapper.d.ts +0 -3
- package/dist/components/RouterWrapper.d.ts.map +0 -1
- package/dist/components/TableSchema.d.ts +0 -35
- package/dist/components/TableSchema.d.ts.map +0 -1
- package/dist/components/Title.d.ts +0 -42
- package/dist/components/Title.d.ts.map +0 -1
- package/dist/components/TopBar.d.ts +0 -12
- package/dist/components/TopBar.d.ts.map +0 -1
- package/dist/components/dashboard/Lineart.d.ts +0 -20
- package/dist/components/dashboard/Lineart.d.ts.map +0 -1
- package/dist/components/form/BglField.d.ts +0 -25
- package/dist/components/form/BglField.d.ts.map +0 -1
- package/dist/components/form/BglForm.d.ts +0 -75
- package/dist/components/form/BglForm.d.ts.map +0 -1
- package/dist/components/form/inputs/CheckInput.d.ts +0 -56
- package/dist/components/form/inputs/CheckInput.d.ts.map +0 -1
- package/dist/components/form/inputs/Checkbox.d.ts +0 -16
- package/dist/components/form/inputs/Checkbox.d.ts.map +0 -1
- package/dist/components/form/inputs/ColorPicker.d.ts +0 -48
- package/dist/components/form/inputs/ColorPicker.d.ts.map +0 -1
- package/dist/components/form/inputs/DateInput.d.ts +0 -64
- package/dist/components/form/inputs/DateInput.d.ts.map +0 -1
- package/dist/components/form/inputs/DatePicker.d.ts +0 -33
- package/dist/components/form/inputs/DatePicker.d.ts.map +0 -1
- package/dist/components/form/inputs/FileUpload.d.ts +0 -108
- package/dist/components/form/inputs/FileUpload.d.ts.map +0 -1
- package/dist/components/form/inputs/JSONInput.d.ts +0 -53
- package/dist/components/form/inputs/JSONInput.d.ts.map +0 -1
- package/dist/components/form/inputs/RadioGroup.d.ts +0 -42
- package/dist/components/form/inputs/RadioGroup.d.ts.map +0 -1
- package/dist/components/form/inputs/RadioPillsInput.d.ts +0 -48
- package/dist/components/form/inputs/RadioPillsInput.d.ts.map +0 -1
- package/dist/components/form/inputs/RichText.d.ts +0 -20
- package/dist/components/form/inputs/RichText.d.ts.map +0 -1
- package/dist/components/form/inputs/RichText2/Toolbar.d.ts +0 -22
- package/dist/components/form/inputs/RichText2/Toolbar.d.ts.map +0 -1
- package/dist/components/form/inputs/RichText2/index.d.ts +0 -24
- package/dist/components/form/inputs/RichText2/index.d.ts.map +0 -1
- package/dist/components/form/inputs/SelectInput.d.ts +0 -55
- package/dist/components/form/inputs/SelectInput.d.ts.map +0 -1
- package/dist/components/form/inputs/SignaturePad.d.ts +0 -72
- package/dist/components/form/inputs/SignaturePad.d.ts.map +0 -1
- package/dist/components/form/inputs/TableField.d.ts +0 -45
- package/dist/components/form/inputs/TableField.d.ts.map +0 -1
- package/dist/components/form/inputs/TelInput.d.ts +0 -241
- package/dist/components/form/inputs/TelInput.d.ts.map +0 -1
- package/dist/components/form/inputs/TextInput.d.ts +0 -90
- package/dist/components/form/inputs/TextInput.d.ts.map +0 -1
- package/dist/components/form/inputs/ToggleInput.d.ts +0 -58
- package/dist/components/form/inputs/ToggleInput.d.ts.map +0 -1
- package/dist/components/layout/BottomMenu.d.ts +0 -27
- package/dist/components/layout/BottomMenu.d.ts.map +0 -1
- package/dist/components/layout/Layout.d.ts +0 -58
- package/dist/components/layout/Layout.d.ts.map +0 -1
- package/dist/components/layout/SidebarMenu.d.ts +0 -38
- package/dist/components/layout/SidebarMenu.d.ts.map +0 -1
- package/dist/components/layout/TabbedLayout.d.ts +0 -42
- package/dist/components/layout/TabbedLayout.d.ts.map +0 -1
- package/dist/components/layout/Tabs.d.ts +0 -31
- package/dist/components/layout/Tabs.d.ts.map +0 -1
- package/dist/components/layout/TabsBody.d.ts +0 -23
- package/dist/components/layout/TabsBody.d.ts.map +0 -1
- package/dist/components/layout/TabsNav.d.ts +0 -35
- package/dist/components/layout/TabsNav.d.ts.map +0 -1
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { Btn, Icon } from '@bagelink/vue'
|
|
3
|
+
import { watch } from 'vue'
|
|
4
|
+
import type { LightboxItem } from './lightbox.types'
|
|
5
|
+
|
|
6
|
+
let isOpen = $ref(false)
|
|
7
|
+
let currentItem = $ref<LightboxItem>()
|
|
8
|
+
let group = $ref<LightboxItem[]>([])
|
|
9
|
+
let currentIndex = $ref(0)
|
|
10
|
+
|
|
11
|
+
function open(item: LightboxItem, groupItems: LightboxItem[] = []) {
|
|
12
|
+
isOpen = true
|
|
13
|
+
currentItem = item
|
|
14
|
+
if (!groupItems.length) return
|
|
15
|
+
group = groupItems
|
|
16
|
+
currentIndex = groupItems.indexOf(item)
|
|
17
|
+
document.addEventListener('keydown', handleKeydown)
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function close() {
|
|
21
|
+
isOpen = false
|
|
22
|
+
document.removeEventListener('keydown', handleKeydown)
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function next() {
|
|
26
|
+
if (group.length > 1) {
|
|
27
|
+
currentIndex = (currentIndex + 1) % group.length
|
|
28
|
+
currentItem = group[currentIndex]
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function prev() {
|
|
33
|
+
if (group.length > 1) {
|
|
34
|
+
currentIndex = (currentIndex - 1 + group.length) % group.length
|
|
35
|
+
currentItem = group[currentIndex]
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function selectItem(index: number) {
|
|
40
|
+
currentIndex = index
|
|
41
|
+
currentItem = group[index]
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
watch(() => isOpen, (val) => {
|
|
45
|
+
if (val) document.body.style.overflow = 'hidden'
|
|
46
|
+
else document.body.style.overflow = ''
|
|
47
|
+
})
|
|
48
|
+
|
|
49
|
+
function normalizeURL(url: string) {
|
|
50
|
+
if (url.startsWith('https://')) return url
|
|
51
|
+
url = url.replace(/http:\/\//, '')
|
|
52
|
+
return `//${url}`
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
function handleKeydown(event: KeyboardEvent) {
|
|
56
|
+
if (event.key === 'Escape') {
|
|
57
|
+
close()
|
|
58
|
+
} else if (event.key === 'ArrowLeft') {
|
|
59
|
+
prev()
|
|
60
|
+
} else if (event.key === 'ArrowRight') {
|
|
61
|
+
next()
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
defineExpose({ open, close })
|
|
66
|
+
</script>
|
|
67
|
+
|
|
68
|
+
<template>
|
|
69
|
+
<div
|
|
70
|
+
v-if="isOpen"
|
|
71
|
+
class="lightbox-overlay"
|
|
72
|
+
@keydown.esc="close"
|
|
73
|
+
@keydown.left="prev"
|
|
74
|
+
@keydown.right="next"
|
|
75
|
+
@click="close"
|
|
76
|
+
>
|
|
77
|
+
<div class="lightbox" @click.stop>
|
|
78
|
+
<Btn flat class="close-button color-white" icon="close" @click="close" />
|
|
79
|
+
<div class="lightbox-item">
|
|
80
|
+
<template v-if="currentItem?.type === 'image'">
|
|
81
|
+
<img :src="currentItem?.src" alt="Preview">
|
|
82
|
+
</template>
|
|
83
|
+
<template v-else-if="currentItem?.type === 'video'">
|
|
84
|
+
<video controls autoplay>
|
|
85
|
+
<source :src="currentItem?.src" type="video/mp4">
|
|
86
|
+
<track kind="captions" src="#" srclang="en" label="English">
|
|
87
|
+
</video>
|
|
88
|
+
</template>
|
|
89
|
+
<template v-else-if="currentItem?.type === 'pdf'">
|
|
90
|
+
<embed
|
|
91
|
+
:src="normalizeURL(currentItem?.src)"
|
|
92
|
+
type="application/pdf"
|
|
93
|
+
width="100%"
|
|
94
|
+
height="1080"
|
|
95
|
+
:title="currentItem?.name"
|
|
96
|
+
>
|
|
97
|
+
</template>
|
|
98
|
+
<template v-else>
|
|
99
|
+
<div class="file-info txt-white">
|
|
100
|
+
<p>File: {{ currentItem?.name }}</p>
|
|
101
|
+
<p>Type: {{ currentItem?.type }}</p>
|
|
102
|
+
<a :href="currentItem?.src" target="_blank">Open file</a>
|
|
103
|
+
</div>
|
|
104
|
+
</template>
|
|
105
|
+
</div>
|
|
106
|
+
<div class="navigation">
|
|
107
|
+
<Btn
|
|
108
|
+
class="navigation-btn"
|
|
109
|
+
icon="arrow_back"
|
|
110
|
+
@click="prev"
|
|
111
|
+
/>
|
|
112
|
+
<Btn
|
|
113
|
+
class="navigation-btn"
|
|
114
|
+
icon="arrow_forward"
|
|
115
|
+
@click="next"
|
|
116
|
+
/>
|
|
117
|
+
</div>
|
|
118
|
+
<div v-if="group && group.length > 1" class="thumbnails">
|
|
119
|
+
<template
|
|
120
|
+
v-for="(item, index) in group"
|
|
121
|
+
:key="index"
|
|
122
|
+
>
|
|
123
|
+
<img
|
|
124
|
+
v-if="item.type === 'image'"
|
|
125
|
+
class="thumbnail"
|
|
126
|
+
:src="item.src"
|
|
127
|
+
alt=""
|
|
128
|
+
@click="selectItem(index)"
|
|
129
|
+
>
|
|
130
|
+
<Icon
|
|
131
|
+
v-else
|
|
132
|
+
class="thumbnail"
|
|
133
|
+
icon="description"
|
|
134
|
+
@click="selectItem(index)"
|
|
135
|
+
/>
|
|
136
|
+
</template>
|
|
137
|
+
</div>
|
|
138
|
+
</div>
|
|
139
|
+
</div>
|
|
140
|
+
</template>
|
|
141
|
+
|
|
142
|
+
<style scoped>
|
|
143
|
+
.lightbox-overlay {
|
|
144
|
+
position: fixed;
|
|
145
|
+
top: 0;
|
|
146
|
+
left: 0;
|
|
147
|
+
width: 100%;
|
|
148
|
+
height: 100%;
|
|
149
|
+
background: rgba(0, 0, 0, 0.8);
|
|
150
|
+
display: flex;
|
|
151
|
+
justify-content: center;
|
|
152
|
+
align-items: center;
|
|
153
|
+
z-index: 1000;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.lightbox {
|
|
157
|
+
position: relative;
|
|
158
|
+
max-height: 90%;
|
|
159
|
+
width: 90vw;
|
|
160
|
+
text-align: center;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.close-button {
|
|
164
|
+
position: fixed;
|
|
165
|
+
top: 1rem;
|
|
166
|
+
inset-inline-end: 1rem;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.lightbox-item * {
|
|
170
|
+
max-width: 90%;
|
|
171
|
+
max-height: calc(80vh - 90px);
|
|
172
|
+
border-radius: 3px;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.navigation {
|
|
176
|
+
display: flex;
|
|
177
|
+
justify-content: space-between;
|
|
178
|
+
width: 100%;
|
|
179
|
+
position: absolute;
|
|
180
|
+
top: 50%;
|
|
181
|
+
transform: translateY(-50%);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.navigation-btn {
|
|
185
|
+
user-select: none;
|
|
186
|
+
width: var(--input-height);
|
|
187
|
+
height: var(--input-height);
|
|
188
|
+
border-radius: 100%;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.thumbnails {
|
|
192
|
+
display: flex;
|
|
193
|
+
justify-content: center;
|
|
194
|
+
margin-top: 10px;
|
|
195
|
+
overflow: auto;
|
|
196
|
+
padding: 1rem;
|
|
197
|
+
position: fixed;
|
|
198
|
+
bottom: 0;
|
|
199
|
+
left: 0;
|
|
200
|
+
right: 0;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.thumbnail {
|
|
204
|
+
height: 50px;
|
|
205
|
+
width: 50px;
|
|
206
|
+
object-fit: cover;
|
|
207
|
+
margin: 0 5px;
|
|
208
|
+
cursor: pointer;
|
|
209
|
+
opacity: 0.5;
|
|
210
|
+
border-radius: 3px;
|
|
211
|
+
transition: all 200ms ease;
|
|
212
|
+
background-color: white;
|
|
213
|
+
display: flex;
|
|
214
|
+
justify-content: center;
|
|
215
|
+
align-items: center;
|
|
216
|
+
}
|
|
217
|
+
.thumbnail:hover {
|
|
218
|
+
opacity: 1;
|
|
219
|
+
}
|
|
220
|
+
.thumbnail:active {
|
|
221
|
+
opacity: 0.8;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.thumbnail.active {
|
|
225
|
+
opacity: 1;
|
|
226
|
+
outline: 2px solid white;
|
|
227
|
+
}
|
|
228
|
+
</style>
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { App, DirectiveBinding } from 'vue'
|
|
2
|
+
import { createApp } from 'vue'
|
|
3
|
+
import { IMAGE_FORMATS_REGEXP, VIDEO_FORMATS_REGEXP } from '@bagelink/vue'
|
|
4
|
+
import Lightbox from './Lightbox.vue'
|
|
5
|
+
import type { LightboxItem } from './lightbox.types'
|
|
6
|
+
|
|
7
|
+
type OpenFunction = (item: LightboxItem, groupItems?: LightboxItem[]) => void
|
|
8
|
+
const groups: Record<string, LightboxItem[]> = {}
|
|
9
|
+
const lightboxDirective = {
|
|
10
|
+
mounted(el: HTMLElement, binding: DirectiveBinding) {
|
|
11
|
+
const lightboxInstance = createLightboxInstance()
|
|
12
|
+
if (!lightboxInstance || !lightboxInstance.open) return
|
|
13
|
+
if (binding.value.group) {
|
|
14
|
+
if (!groups[binding.value.group]) groups[binding.value.group] = []
|
|
15
|
+
groups[binding.value.group].push({
|
|
16
|
+
src: binding.value.src || binding.value,
|
|
17
|
+
type: binding.value.type || determineFileType(binding.value.src || binding.value),
|
|
18
|
+
name: binding.value.name || ''
|
|
19
|
+
})
|
|
20
|
+
}
|
|
21
|
+
el.addEventListener('click', () => {
|
|
22
|
+
const group = binding.value.group || null
|
|
23
|
+
const item: LightboxItem = {
|
|
24
|
+
src: binding.value.src || binding.value,
|
|
25
|
+
type: binding.value.type || determineFileType(binding.value.src || binding.value),
|
|
26
|
+
name: binding.value.name || '',
|
|
27
|
+
thumbnail: binding.value.thumbnail || '',
|
|
28
|
+
}
|
|
29
|
+
const lightboxInstance = createLightboxInstance()
|
|
30
|
+
if (!lightboxInstance || !lightboxInstance.open) return
|
|
31
|
+
if (binding.value.group) {
|
|
32
|
+
if (!groups[binding.value.group]) groups[binding.value.group] = []
|
|
33
|
+
groups[binding.value.group].push(item)
|
|
34
|
+
}
|
|
35
|
+
const open = lightboxInstance.open as OpenFunction
|
|
36
|
+
open(item, groups[group])
|
|
37
|
+
})
|
|
38
|
+
},
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function determineFileType(url: string): string {
|
|
42
|
+
const extension = url.split('.').pop()?.toLowerCase() || ''
|
|
43
|
+
if (IMAGE_FORMATS_REGEXP.test(extension)) return 'image'
|
|
44
|
+
if (VIDEO_FORMATS_REGEXP.test(extension)) return 'video'
|
|
45
|
+
if (['pdf'].includes(extension)) return 'pdf'
|
|
46
|
+
return 'unknown'
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function createLightboxInstance(): InstanceType<typeof Lightbox> | null {
|
|
50
|
+
const lightboxEl = document.createElement('div')
|
|
51
|
+
document.body.prepend(lightboxEl)
|
|
52
|
+
|
|
53
|
+
const app = createApp(Lightbox)
|
|
54
|
+
return app.mount(lightboxEl) as InstanceType<typeof Lightbox>
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export default {
|
|
58
|
+
install(app: App) {
|
|
59
|
+
app.directive('lightbox', lightboxDirective)
|
|
60
|
+
},
|
|
61
|
+
}
|
package/src/plugins/bagel.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
// import { vTooltip } from 'floating-vue';
|
|
2
1
|
import FloatingVue from 'floating-vue'
|
|
3
2
|
import { inject } from 'vue'
|
|
4
3
|
import type { InjectionKey, Plugin } from 'vue'
|
|
5
4
|
import { Bagel } from '@bagelink/sdk'
|
|
5
|
+
import Lightbox from '../components/lightbox'
|
|
6
6
|
import clickOutside from '../utils/clickOutside'
|
|
7
7
|
import { useLang } from '../utils'
|
|
8
8
|
|
|
@@ -37,7 +37,7 @@ export const BagelVue: Plugin = {
|
|
|
37
37
|
install: (app, options: BagelOptions) => {
|
|
38
38
|
const bagel = new Bagel({ host: options.host, onError: options.onError })
|
|
39
39
|
app.directive('click-outside', clickOutside)
|
|
40
|
-
|
|
40
|
+
app.use(Lightbox)
|
|
41
41
|
app.use(FloatingVue, {
|
|
42
42
|
themes: {
|
|
43
43
|
'bgl-theme': {
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
declare function __VLS_template(): {
|
|
2
|
-
default?(_: {}): any;
|
|
3
|
-
};
|
|
4
|
-
declare const __VLS_component: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{}>>, {}, {}>;
|
|
5
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
6
|
-
export default _default;
|
|
7
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
8
|
-
new (): {
|
|
9
|
-
$slots: S;
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
//# sourceMappingURL=Accordion.vue.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Accordion.vue.d.ts","sourceRoot":"","sources":["../../src/components/Accordion.vue"],"names":[],"mappings":"AAeA,iBAAS,cAAc;qBAoCM,GAAG;EAG/B;AAOD,QAAA,MAAM,eAAe,0NAKnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AACxG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAAE,QAAO;QAClD,MAAM,EAAE,CAAC,CAAC;KACT,CAAA;CAAE,CAAC"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
declare function __VLS_template(): {
|
|
2
|
-
head?(_: {}): any;
|
|
3
|
-
default?(_: {}): any;
|
|
4
|
-
};
|
|
5
|
-
declare const __VLS_component: import('vue').DefineComponent<__VLS_TypePropsToRuntimeProps<{
|
|
6
|
-
label?: string;
|
|
7
|
-
id?: string;
|
|
8
|
-
open?: boolean;
|
|
9
|
-
}>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
10
|
-
"update:open": (...args: any[]) => void;
|
|
11
|
-
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
12
|
-
label?: string;
|
|
13
|
-
id?: string;
|
|
14
|
-
open?: boolean;
|
|
15
|
-
}>>> & {
|
|
16
|
-
"onUpdate:open"?: ((...args: any[]) => any) | undefined;
|
|
17
|
-
}, {}, {}>;
|
|
18
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
19
|
-
export default _default;
|
|
20
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
21
|
-
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
22
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
23
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
24
|
-
} : {
|
|
25
|
-
type: import('vue').PropType<T[K]>;
|
|
26
|
-
required: true;
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
30
|
-
new (): {
|
|
31
|
-
$slots: S;
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
//# sourceMappingURL=AccordionItem.vue.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AccordionItem.vue.d.ts","sourceRoot":"","sources":["../../src/components/AccordionItem.vue"],"names":[],"mappings":"AAkDA,iBAAS,cAAc;kBA4II,GAAG;qBACA,GAAG;EAGhC;AAiBD,QAAA,MAAM,eAAe;YAMZ,MAAM;SACT,MAAM;WACJ,OAAO;;;;YAFN,MAAM;SACT,MAAM;WACJ,OAAO;;;UAGb,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AACxG,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC;AAC9M,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAAE,QAAO;QAClD,MAAM,EAAE,CAAC,CAAC;KACT,CAAA;CAAE,CAAC"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { MaterialIcons } from '..';
|
|
2
|
-
|
|
3
|
-
interface Props {
|
|
4
|
-
message: string;
|
|
5
|
-
dismissable?: boolean;
|
|
6
|
-
type?: 'info' | 'warning' | 'error';
|
|
7
|
-
icon?: MaterialIcons | 'none';
|
|
8
|
-
}
|
|
9
|
-
declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
|
|
10
|
-
type: string;
|
|
11
|
-
}>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
|
|
12
|
-
type: string;
|
|
13
|
-
}>>>, {
|
|
14
|
-
type: "info" | "warning" | "error";
|
|
15
|
-
}, {}>;
|
|
16
|
-
export default _default;
|
|
17
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
18
|
-
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
19
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
20
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
21
|
-
} : {
|
|
22
|
-
type: import('vue').PropType<T[K]>;
|
|
23
|
-
required: true;
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
type __VLS_WithDefaults<P, D> = {
|
|
27
|
-
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
28
|
-
default: D[K];
|
|
29
|
-
}> : P[K];
|
|
30
|
-
};
|
|
31
|
-
type __VLS_Prettify<T> = {
|
|
32
|
-
[K in keyof T]: T[K];
|
|
33
|
-
} & {};
|
|
34
|
-
//# sourceMappingURL=Alert.vue.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Alert.vue.d.ts","sourceRoot":"","sources":["../../src/components/Alert.vue"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAKlD,UAAU,KAAK;IACd,OAAO,EAAE,MAAM,CAAA;IACf,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAA;IACnC,IAAI,CAAC,EAAE,aAAa,GAAG,MAAM,CAAA;CAC7B;;;;;;UAFO,MAAM,GAAG,SAAS,GAAG,OAAO;;AAoIpC,wBAMG;AACH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC;AAC9M,KAAK,kBAAkB,CAAC,CAAC,EAAE,CAAC,IAAI;KAE1B,CAAC,IAAI,MAAM,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,MAAM,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;QACxE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;KACb,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CACT,CAAC;AACN,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
2
|
-
fallback?: string;
|
|
3
|
-
src?: string;
|
|
4
|
-
name?: string;
|
|
5
|
-
size?: number;
|
|
6
|
-
}>, {
|
|
7
|
-
size: number;
|
|
8
|
-
}>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
9
|
-
fallback?: string;
|
|
10
|
-
src?: string;
|
|
11
|
-
name?: string;
|
|
12
|
-
size?: number;
|
|
13
|
-
}>, {
|
|
14
|
-
size: number;
|
|
15
|
-
}>>>, {
|
|
16
|
-
size: number;
|
|
17
|
-
}, {}>;
|
|
18
|
-
export default _default;
|
|
19
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
20
|
-
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
21
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
22
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
23
|
-
} : {
|
|
24
|
-
type: import('vue').PropType<T[K]>;
|
|
25
|
-
required: true;
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
type __VLS_WithDefaults<P, D> = {
|
|
29
|
-
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
30
|
-
default: D[K];
|
|
31
|
-
}> : P[K];
|
|
32
|
-
};
|
|
33
|
-
type __VLS_Prettify<T> = {
|
|
34
|
-
[K in keyof T]: T[K];
|
|
35
|
-
} & {};
|
|
36
|
-
//# sourceMappingURL=Avatar.vue.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Avatar.vue.d.ts","sourceRoot":"","sources":["../../src/components/Avatar.vue"],"names":[],"mappings":";eAqGY,MAAM;UACX,MAAM;WACL,MAAM;WACN,MAAM;;;;eAHF,MAAM;UACX,MAAM;WACL,MAAM;WACN,MAAM;;;;UAAN,MAAM;;AATd,wBAWG;AACH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC;AAC9M,KAAK,kBAAkB,CAAC,CAAC,EAAE,CAAC,IAAI;KAE1B,CAAC,IAAI,MAAM,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,MAAM,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;QACxE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;KACb,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CACT,CAAC;AACN,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { MaterialIcons } from '..';
|
|
2
|
-
|
|
3
|
-
interface Props {
|
|
4
|
-
'color'?: 'green' | 'red' | 'blue' | 'light' | 'gray';
|
|
5
|
-
'size'?: string;
|
|
6
|
-
'text': string;
|
|
7
|
-
'icon'?: MaterialIcons;
|
|
8
|
-
'icon.end'?: MaterialIcons;
|
|
9
|
-
'iconEnd'?: MaterialIcons;
|
|
10
|
-
}
|
|
11
|
-
declare const _default: import('vue').DefineComponent<__VLS_TypePropsToRuntimeProps<Props>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>>, {}, {}>;
|
|
12
|
-
export default _default;
|
|
13
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
14
|
-
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
15
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
16
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
17
|
-
} : {
|
|
18
|
-
type: import('vue').PropType<T[K]>;
|
|
19
|
-
required: true;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
//# sourceMappingURL=Badge.vue.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Badge.vue.d.ts","sourceRoot":"","sources":["../../src/components/Badge.vue"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAIlD,UAAU,KAAK;IACd,OAAO,CAAC,EAAE,OAAO,GAAG,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAA;IACrD,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,aAAa,CAAA;IAEtB,UAAU,CAAC,EAAE,aAAa,CAAA;IAC1B,SAAS,CAAC,EAAE,aAAa,CAAA;CACzB;;AAmFD,wBAMG;AACH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
interface Props {
|
|
2
|
-
src?: string;
|
|
3
|
-
autoplay?: boolean;
|
|
4
|
-
mute?: boolean;
|
|
5
|
-
aspectRatio?: string;
|
|
6
|
-
controls?: boolean;
|
|
7
|
-
loop?: boolean;
|
|
8
|
-
}
|
|
9
|
-
declare const _default: import('vue').DefineComponent<__VLS_TypePropsToRuntimeProps<Props>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>>, {}, {}>;
|
|
10
|
-
export default _default;
|
|
11
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
12
|
-
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
13
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
14
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
15
|
-
} : {
|
|
16
|
-
type: import('vue').PropType<T[K]>;
|
|
17
|
-
required: true;
|
|
18
|
-
};
|
|
19
|
-
};
|
|
20
|
-
//# sourceMappingURL=BglVideo.vue.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BglVideo.vue.d.ts","sourceRoot":"","sources":["../../src/components/BglVideo.vue"],"names":[],"mappings":"AAIA,UAAU,KAAK;IACd,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,CAAC,EAAE,OAAO,CAAA;CACd;;AAgHD,wBAMG;AACH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC"}
|
package/dist/components/Btn.d.ts
DELETED
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
import { MaterialIcons, ThemeType } from '..';
|
|
2
|
-
|
|
3
|
-
declare function __VLS_template(): {
|
|
4
|
-
default?(_: {}): any;
|
|
5
|
-
};
|
|
6
|
-
declare const __VLS_component: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
7
|
-
disabled?: boolean;
|
|
8
|
-
icon?: MaterialIcons;
|
|
9
|
-
'icon.end'?: MaterialIcons;
|
|
10
|
-
color?: ThemeType;
|
|
11
|
-
theme?: ThemeType;
|
|
12
|
-
flat?: boolean;
|
|
13
|
-
border?: boolean;
|
|
14
|
-
outline?: boolean;
|
|
15
|
-
thin?: boolean;
|
|
16
|
-
type?: "button" | "submit" | "reset";
|
|
17
|
-
loading?: boolean;
|
|
18
|
-
role?: string;
|
|
19
|
-
value?: string;
|
|
20
|
-
to?: string;
|
|
21
|
-
href?: string;
|
|
22
|
-
round?: boolean;
|
|
23
|
-
is?: string;
|
|
24
|
-
onClick?: (e: MouseEvent) => void;
|
|
25
|
-
}>, {
|
|
26
|
-
onClick: () => "";
|
|
27
|
-
loading: boolean;
|
|
28
|
-
round: boolean;
|
|
29
|
-
disabled: boolean;
|
|
30
|
-
type: string;
|
|
31
|
-
role: string;
|
|
32
|
-
is: string;
|
|
33
|
-
border: boolean;
|
|
34
|
-
outline: boolean;
|
|
35
|
-
}>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
36
|
-
disabled?: boolean;
|
|
37
|
-
icon?: MaterialIcons;
|
|
38
|
-
'icon.end'?: MaterialIcons;
|
|
39
|
-
color?: ThemeType;
|
|
40
|
-
theme?: ThemeType;
|
|
41
|
-
flat?: boolean;
|
|
42
|
-
border?: boolean;
|
|
43
|
-
outline?: boolean;
|
|
44
|
-
thin?: boolean;
|
|
45
|
-
type?: "button" | "submit" | "reset";
|
|
46
|
-
loading?: boolean;
|
|
47
|
-
role?: string;
|
|
48
|
-
value?: string;
|
|
49
|
-
to?: string;
|
|
50
|
-
href?: string;
|
|
51
|
-
round?: boolean;
|
|
52
|
-
is?: string;
|
|
53
|
-
onClick?: (e: MouseEvent) => void;
|
|
54
|
-
}>, {
|
|
55
|
-
onClick: () => "";
|
|
56
|
-
loading: boolean;
|
|
57
|
-
round: boolean;
|
|
58
|
-
disabled: boolean;
|
|
59
|
-
type: string;
|
|
60
|
-
role: string;
|
|
61
|
-
is: string;
|
|
62
|
-
border: boolean;
|
|
63
|
-
outline: boolean;
|
|
64
|
-
}>>>, {
|
|
65
|
-
onClick: (e: MouseEvent) => void;
|
|
66
|
-
type: "button" | "submit" | "reset";
|
|
67
|
-
disabled: boolean;
|
|
68
|
-
loading: boolean;
|
|
69
|
-
role: string;
|
|
70
|
-
border: boolean;
|
|
71
|
-
outline: boolean;
|
|
72
|
-
round: boolean;
|
|
73
|
-
is: string;
|
|
74
|
-
}, {}>;
|
|
75
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
76
|
-
export default _default;
|
|
77
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
78
|
-
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
79
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
80
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
81
|
-
} : {
|
|
82
|
-
type: import('vue').PropType<T[K]>;
|
|
83
|
-
required: true;
|
|
84
|
-
};
|
|
85
|
-
};
|
|
86
|
-
type __VLS_WithDefaults<P, D> = {
|
|
87
|
-
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
88
|
-
default: D[K];
|
|
89
|
-
}> : P[K];
|
|
90
|
-
};
|
|
91
|
-
type __VLS_Prettify<T> = {
|
|
92
|
-
[K in keyof T]: T[K];
|
|
93
|
-
} & {};
|
|
94
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
95
|
-
new (): {
|
|
96
|
-
$slots: S;
|
|
97
|
-
};
|
|
98
|
-
};
|
|
99
|
-
//# sourceMappingURL=Btn.vue.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Btn.vue.d.ts","sourceRoot":"","sources":["../../src/components/Btn.vue"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AA0G7D,iBAAS,cAAc;qBA8LO,GAAG;EAGhC;AAiCD,QAAA,MAAM,eAAe;eAMN,OAAO;WACX,aAAa;iBAET,aAAa;YAChB,SAAS;YACT,SAAS;WACV,OAAO;aACL,OAAO;cACN,OAAO;WACV,OAAO;WACP,QAAQ,GAAG,QAAQ,GAAG,OAAO;cAC1B,OAAO;WACV,MAAM;YACL,MAAM;SACT,MAAM;WACJ,MAAM;YACL,OAAO;SACV,MAAM;cACD,CAAC,CAAC,EAAE,UAAU,KAAK,IAAI;;;;;;;;;;;;eAlBtB,OAAO;WACX,aAAa;iBAET,aAAa;YAChB,SAAS;YACT,SAAS;WACV,OAAO;aACL,OAAO;cACN,OAAO;WACV,OAAO;WACP,QAAQ,GAAG,QAAQ,GAAG,OAAO;cAC1B,OAAO;WACV,MAAM;YACL,MAAM;SACT,MAAM;WACJ,MAAM;YACL,OAAO;SACV,MAAM;cACD,CAAC,CAAC,EAAE,UAAU,KAAK,IAAI;;;;;;;;;;;;aAAvB,CAAC,CAAC,EAAE,UAAU,KAAK,IAAI;UAR1B,QAAQ,GAAG,QAAQ,GAAG,OAAO;cAVzB,OAAO;aAWR,OAAO;UACV,MAAM;YALJ,OAAO;aACN,OAAO;WAQT,OAAO;QACV,MAAM;MAGb,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AACxG,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC;AAC9M,KAAK,kBAAkB,CAAC,CAAC,EAAE,CAAC,IAAI;KAE1B,CAAC,IAAI,MAAM,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,MAAM,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;QACxE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;KACb,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CACT,CAAC;AACN,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC;AACxD,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAAE,QAAO;QAClD,MAAM,EAAE,CAAC,CAAC;KACT,CAAA;CAAE,CAAC"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
declare function __VLS_template(): {
|
|
2
|
-
default?(_: {}): any;
|
|
3
|
-
};
|
|
4
|
-
declare const __VLS_component: import('vue').DefineComponent<__VLS_TypePropsToRuntimeProps<{
|
|
5
|
-
label?: string;
|
|
6
|
-
thin?: boolean;
|
|
7
|
-
outline?: boolean;
|
|
8
|
-
h100?: boolean;
|
|
9
|
-
to?: string;
|
|
10
|
-
overflowX?: boolean;
|
|
11
|
-
overflowY?: boolean;
|
|
12
|
-
bg?: "gray" | "light" | "dark" | "primary" | "secondary" | "success" | "danger" | "warning" | "info" | "white" | "transparent";
|
|
13
|
-
}>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
14
|
-
label?: string;
|
|
15
|
-
thin?: boolean;
|
|
16
|
-
outline?: boolean;
|
|
17
|
-
h100?: boolean;
|
|
18
|
-
to?: string;
|
|
19
|
-
overflowX?: boolean;
|
|
20
|
-
overflowY?: boolean;
|
|
21
|
-
bg?: "gray" | "light" | "dark" | "primary" | "secondary" | "success" | "danger" | "warning" | "info" | "white" | "transparent";
|
|
22
|
-
}>>>, {}, {}>;
|
|
23
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
24
|
-
export default _default;
|
|
25
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
26
|
-
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
27
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
28
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
29
|
-
} : {
|
|
30
|
-
type: import('vue').PropType<T[K]>;
|
|
31
|
-
required: true;
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
35
|
-
new (): {
|
|
36
|
-
$slots: S;
|
|
37
|
-
};
|
|
38
|
-
};
|
|
39
|
-
//# sourceMappingURL=Card.vue.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Card.vue.d.ts","sourceRoot":"","sources":["../../src/components/Card.vue"],"names":[],"mappings":"AA+BA,iBAAS,cAAc;qBA0DO,GAAG;EAGhC;AA6BD,QAAA,MAAM,eAAe;YAMZ,MAAM;WACP,OAAO;cACJ,OAAO;WACV,OAAO;SACT,MAAM;gBACC,OAAO;gBACP,OAAO;SAEhB,MAAM,GACN,OAAO,GACP,MAAM,GACN,SAAS,GACT,WAAW,GACX,SAAS,GACT,QAAQ,GACR,SAAS,GACT,MAAM,GACN,OAAO,GACP,aAAa;;YAlBR,MAAM;WACP,OAAO;cACJ,OAAO;WACV,OAAO;SACT,MAAM;gBACC,OAAO;gBACP,OAAO;SAEhB,MAAM,GACN,OAAO,GACP,MAAM,GACN,SAAS,GACT,WAAW,GACX,SAAS,GACT,QAAQ,GACR,SAAS,GACT,MAAM,GACN,OAAO,GACP,aAAa;aAEf,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AACxG,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC;AAC9M,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAAE,QAAO;QAClD,MAAM,EAAE,CAAC,CAAC;KACT,CAAA;CAAE,CAAC"}
|