@bagelink/vue 1.2.139 → 1.2.143
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/AddressSearch.vue.d.ts.map +1 -1
- package/dist/components/BglVideo.vue.d.ts +3 -1
- package/dist/components/BglVideo.vue.d.ts.map +1 -1
- package/dist/components/Carousel2.vue.d.ts +89 -0
- package/dist/components/Carousel2.vue.d.ts.map +1 -0
- package/dist/components/Dropdown.vue.d.ts.map +1 -1
- package/dist/components/Modal.vue.d.ts +1 -1
- package/dist/components/Modal.vue.d.ts.map +1 -1
- package/dist/components/Slider.vue.d.ts +1 -1
- package/dist/components/Slider.vue.d.ts.map +1 -1
- package/dist/components/calendar/views/CalendarPopover.vue.d.ts +2 -2
- package/dist/components/calendar/views/CalendarPopover.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/SelectInput.vue.d.ts.map +1 -1
- package/dist/components/lightbox/Lightbox.vue.d.ts.map +1 -1
- package/dist/index.cjs +4447 -4431
- package/dist/index.mjs +4448 -4432
- package/dist/style.css +181 -174
- package/package.json +1 -1
- package/src/components/BglVideo.vue +43 -5
- package/src/components/NavBar.vue +1 -1
- package/src/components/form/BagelForm.vue +3 -3
- package/src/components/form/inputs/TextInput.vue +15 -15
- package/src/components/layout/Tabs.vue +1 -1
- package/src/components/lightbox/Lightbox.vue +3 -0
- package/dist/components/Icon.vue.d.ts +0 -16
- package/dist/components/Icon.vue.d.ts.map +0 -1
- package/dist/components/form/BglFieldSet.vue.d.ts +0 -25
- package/dist/components/form/BglFieldSet.vue.d.ts.map +0 -1
- package/dist/iconify-0J3vK-m1.cjs +0 -1693
- package/dist/iconify-Bc1B42Ak.cjs +0 -1771
- package/dist/iconify-BiLGk5km.js +0 -1693
- package/dist/iconify-DVnNdzog.js +0 -1771
- package/dist/types/timeago.d.ts +0 -23
- package/dist/types/timeago.d.ts.map +0 -1
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
import { useIntersectionObserver } from '@vueuse/core'
|
|
2
3
|
import { watch } from 'vue'
|
|
3
4
|
|
|
5
|
+
type Autoplay = boolean | 'visible'
|
|
4
6
|
interface Props {
|
|
5
7
|
src?: string
|
|
6
|
-
autoplay?:
|
|
8
|
+
autoplay?: Autoplay
|
|
7
9
|
mute?: boolean
|
|
8
10
|
aspectRatio?: string
|
|
9
11
|
controls?: boolean
|
|
@@ -16,8 +18,17 @@ const props = defineProps<Props>()
|
|
|
16
18
|
|
|
17
19
|
const videoFormat = $computed(() => props.src?.split('.').pop()?.split('?').shift()?.toLowerCase() || 'mp4')
|
|
18
20
|
|
|
21
|
+
const videoContainer = $ref<HTMLElement | null>()
|
|
22
|
+
|
|
23
|
+
const isYoutubeShort = $computed(() => {
|
|
24
|
+
return props.src?.includes('youtube.com/shorts/') || false
|
|
25
|
+
})
|
|
26
|
+
|
|
19
27
|
const aspectRatio = $computed(
|
|
20
|
-
() =>
|
|
28
|
+
() => {
|
|
29
|
+
if (isYoutubeShort) return '9/16' // Vertical aspect ratio for Shorts
|
|
30
|
+
return props.aspectRatio?.replace(':', '/') || '16/9'
|
|
31
|
+
}
|
|
21
32
|
)
|
|
22
33
|
|
|
23
34
|
const video = $ref<HTMLVideoElement | null>()
|
|
@@ -30,6 +41,21 @@ function pause() {
|
|
|
30
41
|
video?.pause()
|
|
31
42
|
}
|
|
32
43
|
|
|
44
|
+
// Setup intersection observer for autoplay="visible"
|
|
45
|
+
if (props.autoplay === 'visible') {
|
|
46
|
+
useIntersectionObserver(
|
|
47
|
+
videoContainer,
|
|
48
|
+
([{ isIntersecting }]) => {
|
|
49
|
+
if (isIntersecting) {
|
|
50
|
+
play()
|
|
51
|
+
} else {
|
|
52
|
+
pause()
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
{ threshold: 0.3 } // Start playing when 30% of the video is visible
|
|
56
|
+
)
|
|
57
|
+
}
|
|
58
|
+
|
|
33
59
|
watch(() => props.status, (status) => {
|
|
34
60
|
if (status === 'play') play()
|
|
35
61
|
if (status === 'pause') pause()
|
|
@@ -47,7 +73,14 @@ const embedType = $computed<'YouTube' | 'Vimeo' | undefined>(() => {
|
|
|
47
73
|
const videoUrl = $computed(() => {
|
|
48
74
|
if (embedType) {
|
|
49
75
|
if (embedType === 'YouTube') {
|
|
50
|
-
|
|
76
|
+
// Extract video ID from YouTube regular or Shorts URL
|
|
77
|
+
let videoId = ''
|
|
78
|
+
if (props.src?.includes('youtube.com/shorts/')) {
|
|
79
|
+
videoId = props.src.split('/shorts/')[1]?.split('?')[0] || ''
|
|
80
|
+
} else {
|
|
81
|
+
videoId = props.src?.split(/v=|youtu\.be\//)[1]?.split('&')?.[0] || ''
|
|
82
|
+
}
|
|
83
|
+
|
|
51
84
|
const queryParams = new URLSearchParams({
|
|
52
85
|
autoplay: props.autoplay ? '1' : '0',
|
|
53
86
|
controls: '0',
|
|
@@ -69,7 +102,7 @@ const videoUrl = $computed(() => {
|
|
|
69
102
|
</script>
|
|
70
103
|
|
|
71
104
|
<template>
|
|
72
|
-
<div class="bgl_vid" :class="{ vid_empty: !src }">
|
|
105
|
+
<div ref="videoContainer" class="bgl_vid" :class="{ vid_empty: !src, vid_short: isYoutubeShort }">
|
|
73
106
|
<iframe
|
|
74
107
|
v-if="embedType"
|
|
75
108
|
:src="videoUrl"
|
|
@@ -82,7 +115,7 @@ const videoUrl = $computed(() => {
|
|
|
82
115
|
<video
|
|
83
116
|
v-else-if="src"
|
|
84
117
|
ref="video"
|
|
85
|
-
:autoplay="autoplay"
|
|
118
|
+
:autoplay="autoplay === true"
|
|
86
119
|
:muted="mute"
|
|
87
120
|
:loop="loop"
|
|
88
121
|
:style="{ aspectRatio }"
|
|
@@ -109,4 +142,9 @@ const videoUrl = $computed(() => {
|
|
|
109
142
|
background: var(--input-bg);
|
|
110
143
|
border-radius: var(--input-border-radius);
|
|
111
144
|
}
|
|
145
|
+
|
|
146
|
+
.bgl_vid.vid_short {
|
|
147
|
+
max-width: 56.25vh; /* Limit width for shorts to maintain aspect ratio */
|
|
148
|
+
margin: 0 auto;
|
|
149
|
+
}
|
|
112
150
|
</style>
|
|
@@ -141,9 +141,9 @@ defineExpose({ form, isDirty, validateForm, checkValidity })
|
|
|
141
141
|
<slot
|
|
142
142
|
name="submit"
|
|
143
143
|
:submit="handleSubmit"
|
|
144
|
-
:isDirty
|
|
145
|
-
:validateForm
|
|
146
|
-
:formState
|
|
144
|
+
:isDirty="isDirty"
|
|
145
|
+
:validateForm="validateForm"
|
|
146
|
+
:formState="formState"
|
|
147
147
|
/>
|
|
148
148
|
</form>
|
|
149
149
|
|
|
@@ -103,18 +103,18 @@ onMounted(() => {
|
|
|
103
103
|
|
|
104
104
|
<input
|
|
105
105
|
v-if="!multiline && !autoheight && !code && inputRows < 2"
|
|
106
|
-
:id
|
|
106
|
+
:id="id"
|
|
107
107
|
ref="input"
|
|
108
108
|
v-model.trim="inputVal"
|
|
109
|
-
:name
|
|
110
|
-
:title
|
|
111
|
-
:autocomplete
|
|
109
|
+
:name="name"
|
|
110
|
+
:title="title"
|
|
111
|
+
:autocomplete="autocomplete"
|
|
112
112
|
:type="type"
|
|
113
113
|
:rows="1"
|
|
114
114
|
:placeholder="placeholder || label"
|
|
115
|
-
:disabled
|
|
116
|
-
:required
|
|
117
|
-
:pattern
|
|
115
|
+
:disabled="disabled"
|
|
116
|
+
:required="required"
|
|
117
|
+
:pattern="pattern"
|
|
118
118
|
v-bind="nativeInputAttrs"
|
|
119
119
|
@focusout="onFocusout"
|
|
120
120
|
@focus="onFocus"
|
|
@@ -122,17 +122,17 @@ onMounted(() => {
|
|
|
122
122
|
>
|
|
123
123
|
<textarea
|
|
124
124
|
v-else
|
|
125
|
-
:id
|
|
125
|
+
:id="id"
|
|
126
126
|
ref="input"
|
|
127
127
|
v-model="inputVal"
|
|
128
|
-
:name
|
|
129
|
-
:title
|
|
130
|
-
:type
|
|
128
|
+
:name="name"
|
|
129
|
+
:title="title"
|
|
130
|
+
:type="type"
|
|
131
131
|
:rows="inputRows"
|
|
132
132
|
:placeholder="placeholder || label"
|
|
133
|
-
:disabled
|
|
134
|
-
:required
|
|
135
|
-
:pattern
|
|
133
|
+
:disabled="disabled"
|
|
134
|
+
:required="required"
|
|
135
|
+
:pattern="pattern"
|
|
136
136
|
v-bind="nativeInputAttrs"
|
|
137
137
|
@input="updateInputVal"
|
|
138
138
|
@focusout="onFocusout"
|
|
@@ -145,7 +145,7 @@ onMounted(() => {
|
|
|
145
145
|
/>
|
|
146
146
|
<Icon
|
|
147
147
|
v-if="icon"
|
|
148
|
-
:icon
|
|
148
|
+
:icon="icon"
|
|
149
149
|
/>
|
|
150
150
|
</label>
|
|
151
151
|
</div>
|
|
@@ -41,7 +41,7 @@ const tabComponent = defineComponent({
|
|
|
41
41
|
|
|
42
42
|
z
|
|
43
43
|
<template>
|
|
44
|
-
<TabsNav v-model="slctTab" :flat :tabs :group class="mb-05" />
|
|
44
|
+
<TabsNav v-model="slctTab" :flat="flat" :tabs="tabs" :group class="mb-05" />
|
|
45
45
|
<div v-if="currentTab">
|
|
46
46
|
<template v-if="slots[currentTab]">
|
|
47
47
|
<slot :name="currentTab" />
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { IconType } from '..';
|
|
2
|
-
type __VLS_Props = {
|
|
3
|
-
icon?: IconType;
|
|
4
|
-
name?: IconType;
|
|
5
|
-
size?: number | string;
|
|
6
|
-
color?: string;
|
|
7
|
-
round?: boolean;
|
|
8
|
-
weight?: number | string;
|
|
9
|
-
fontAwesome?: boolean;
|
|
10
|
-
fill?: boolean;
|
|
11
|
-
};
|
|
12
|
-
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
13
|
-
size: number | string;
|
|
14
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
15
|
-
export default _default;
|
|
16
|
-
//# sourceMappingURL=Icon.vue.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Icon.vue.d.ts","sourceRoot":"","sources":["../../src/components/Icon.vue"],"names":[],"mappings":"AAoIA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAK7C,KAAK,WAAW,GAAG;IAClB,IAAI,CAAC,EAAE,QAAQ,CAAA;IACf,IAAI,CAAC,EAAE,QAAQ,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACtB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACxB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,IAAI,CAAC,EAAE,OAAO,CAAA;CACd,CAAC;;UANM,MAAM,GAAG,MAAM;;AAgIvB,wBAOG"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
declare function __VLS_template(): {
|
|
2
|
-
attrs: Partial<{}>;
|
|
3
|
-
slots: {
|
|
4
|
-
default?(_: {}): any;
|
|
5
|
-
};
|
|
6
|
-
refs: {
|
|
7
|
-
fieldSet: HTMLFieldSetElement;
|
|
8
|
-
};
|
|
9
|
-
rootEl: HTMLFieldSetElement;
|
|
10
|
-
};
|
|
11
|
-
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
12
|
-
declare const __VLS_component: import('vue').DefineComponent<{}, {
|
|
13
|
-
validateForm: () => boolean | undefined;
|
|
14
|
-
isDirty: import('@vue-macros/reactivity-transform/macros.js').ReactiveVariable<false> | import('@vue-macros/reactivity-transform/macros.js').ReactiveVariable<true>;
|
|
15
|
-
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
16
|
-
fieldSet: HTMLFieldSetElement;
|
|
17
|
-
}, HTMLFieldSetElement>;
|
|
18
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
19
|
-
export default _default;
|
|
20
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
21
|
-
new (): {
|
|
22
|
-
$slots: S;
|
|
23
|
-
};
|
|
24
|
-
};
|
|
25
|
-
//# sourceMappingURL=BglFieldSet.vue.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BglFieldSet.vue.d.ts","sourceRoot":"","sources":["../../../src/components/form/BglFieldSet.vue"],"names":[],"mappings":"AAsBA,iBAAS,cAAc;WA0BT,OAAO,IAA6B;;yBAXrB,GAAG;;;;;;EAgB/B;AAQD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;uBAQnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAEpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|