@bagelink/vue 0.0.815 → 0.0.819
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/AccordionItem.vue.d.ts +8 -0
- package/dist/components/AccordionItem.vue.d.ts.map +1 -1
- package/dist/components/Carousel.vue.d.ts.map +1 -1
- package/dist/components/Pill.vue.d.ts +12 -14
- package/dist/components/Pill.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/FileUpload.vue.d.ts.map +1 -1
- package/dist/index.cjs +90 -51
- package/dist/index.mjs +91 -52
- package/dist/style.css +84 -76
- package/package.json +11 -11
- package/src/components/AccordionItem.vue +42 -11
- package/src/components/Carousel.vue +39 -7
- package/src/components/Pill.vue +27 -33
- package/src/components/form/inputs/FileUpload.vue +6 -0
package/src/components/Pill.vue
CHANGED
|
@@ -3,40 +3,34 @@ import type { MaterialIcons, ThemeType } from '@bagelink/vue'
|
|
|
3
3
|
import { Btn, MaterialIcon } from '@bagelink/vue'
|
|
4
4
|
import { useSlots } from 'vue'
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
disabled: false,
|
|
28
|
-
border: false,
|
|
29
|
-
outline: false,
|
|
30
|
-
btnStart: true
|
|
31
|
-
},
|
|
32
|
-
)
|
|
6
|
+
interface BtnProp {
|
|
7
|
+
icon: MaterialIcons
|
|
8
|
+
onClick: () => void
|
|
9
|
+
value: string
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const props = defineProps<{
|
|
13
|
+
disabled?: boolean
|
|
14
|
+
icon?: MaterialIcons
|
|
15
|
+
iconEnd: MaterialIcons
|
|
16
|
+
color?: ThemeType
|
|
17
|
+
theme?: ThemeType
|
|
18
|
+
flat?: boolean
|
|
19
|
+
border?: boolean
|
|
20
|
+
outline?: boolean
|
|
21
|
+
loading?: boolean
|
|
22
|
+
value?: string
|
|
23
|
+
round?: boolean
|
|
24
|
+
btn: BtnProp
|
|
25
|
+
btnEnd: BtnProp
|
|
26
|
+
}>()
|
|
33
27
|
|
|
34
28
|
const slots = useSlots()
|
|
35
29
|
|
|
36
30
|
const computedTheme = $computed(
|
|
37
31
|
() => {
|
|
38
32
|
if (props.disabled) return 'gray-light'
|
|
39
|
-
return (props.color || props.theme)
|
|
33
|
+
return (props.color || props.theme) as ThemeType
|
|
40
34
|
},
|
|
41
35
|
)
|
|
42
36
|
|
|
@@ -91,8 +85,8 @@ const computedBackgroundColor = $computed(
|
|
|
91
85
|
<div class="bgl_pill-flex">
|
|
92
86
|
<div v-if="loading" class="loading" />
|
|
93
87
|
<div v-else>
|
|
94
|
-
<div v-if="
|
|
95
|
-
<Btn class="bgl_pill-btn
|
|
88
|
+
<div v-if="btn" class="flex h-100">
|
|
89
|
+
<Btn class="bgl_pill-btn" thin v-bind="btn" />
|
|
96
90
|
</div>
|
|
97
91
|
</div>
|
|
98
92
|
<MaterialIcon v-if="icon" :icon="icon" />
|
|
@@ -100,11 +94,11 @@ const computedBackgroundColor = $computed(
|
|
|
100
94
|
<template v-if="!slots.default && value">
|
|
101
95
|
{{ value }}
|
|
102
96
|
</template>
|
|
103
|
-
<MaterialIcon v-if="
|
|
97
|
+
<MaterialIcon v-if="iconEnd" :icon="iconEnd" />
|
|
104
98
|
<div v-if="loading" class="loading" />
|
|
105
99
|
<div v-else>
|
|
106
|
-
<div v-if="
|
|
107
|
-
<Btn class="bgl_pill-btn" thin
|
|
100
|
+
<div v-if="btnEnd" class="flex h-100">
|
|
101
|
+
<Btn class="bgl_pill-btn" thin v-bind="btnEnd" />
|
|
108
102
|
</div>
|
|
109
103
|
</div>
|
|
110
104
|
</div>
|
|
@@ -48,6 +48,12 @@ onMounted(() => {
|
|
|
48
48
|
if (!props.files && [file_bindkeys].flat().length > 0) {
|
|
49
49
|
const ids = [file_bindkeys].flat().filter(Boolean) as (string | number)[] | undefined
|
|
50
50
|
if (!ids?.length) return
|
|
51
|
+
if (bindKey === 'url') {
|
|
52
|
+
ids.forEach((url) => {
|
|
53
|
+
storageFiles.push({ url } as StorageFile)
|
|
54
|
+
})
|
|
55
|
+
return
|
|
56
|
+
}
|
|
51
57
|
if (props.multiple) {
|
|
52
58
|
ids.forEach((id) => {
|
|
53
59
|
void bagel
|