@bagelink/vue 0.0.744 → 0.0.747
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/Accordion.vue.d.ts +8 -3
- package/dist/components/Accordion.vue.d.ts.map +1 -1
- package/dist/components/AccordionItem.vue.d.ts +13 -17
- package/dist/components/AccordionItem.vue.d.ts.map +1 -1
- package/dist/components/AddressSearch.vue.d.ts +2 -2
- package/dist/components/AddressSearch.vue.d.ts.map +1 -1
- package/dist/components/Alert.vue.d.ts +2 -23
- package/dist/components/Alert.vue.d.ts.map +1 -1
- package/dist/components/Avatar.vue.d.ts +4 -25
- package/dist/components/Avatar.vue.d.ts.map +1 -1
- package/dist/components/Badge.vue.d.ts +1 -10
- package/dist/components/Badge.vue.d.ts.map +1 -1
- package/dist/components/BglVideo.vue.d.ts +1 -10
- package/dist/components/BglVideo.vue.d.ts.map +1 -1
- package/dist/components/Btn.vue.d.ts +11 -43
- package/dist/components/Btn.vue.d.ts.map +1 -1
- package/dist/components/Card.vue.d.ts +10 -14
- package/dist/components/Card.vue.d.ts.map +1 -1
- package/dist/components/Carousel.vue.d.ts +22 -15
- package/dist/components/Carousel.vue.d.ts.map +1 -1
- package/dist/components/DataPreview.vue.d.ts +11 -15
- package/dist/components/DataPreview.vue.d.ts.map +1 -1
- package/dist/components/DropDown.vue.d.ts +713 -14
- package/dist/components/DropDown.vue.d.ts.map +1 -1
- package/dist/components/Flag.vue.d.ts +1 -10
- package/dist/components/Flag.vue.d.ts.map +1 -1
- package/dist/components/ListItem.vue.d.ts +11 -15
- package/dist/components/ListItem.vue.d.ts.map +1 -1
- package/dist/components/ListView.vue.d.ts +9 -4
- package/dist/components/ListView.vue.d.ts.map +1 -1
- package/dist/components/MapEmbed.vue.d.ts +4 -33
- package/dist/components/MapEmbed.vue.d.ts.map +1 -1
- package/dist/components/MaterialIcon.vue.d.ts +3 -12
- package/dist/components/MaterialIcon.vue.d.ts.map +1 -1
- package/dist/components/Modal.vue.d.ts +15 -19
- package/dist/components/Modal.vue.d.ts.map +1 -1
- package/dist/components/ModalConfirm.vue.d.ts +5 -14
- package/dist/components/ModalConfirm.vue.d.ts.map +1 -1
- package/dist/components/ModalForm.vue.d.ts +4 -15
- package/dist/components/ModalForm.vue.d.ts.map +1 -1
- package/dist/components/NavBar.vue.d.ts +14 -38
- package/dist/components/NavBar.vue.d.ts.map +1 -1
- package/dist/components/PageTitle.vue.d.ts +11 -6
- package/dist/components/PageTitle.vue.d.ts.map +1 -1
- package/dist/components/RouterWrapper.vue.d.ts +1 -1
- package/dist/components/RouterWrapper.vue.d.ts.map +1 -1
- package/dist/components/TableSchema.vue.d.ts +18 -15
- package/dist/components/TableSchema.vue.d.ts.map +1 -1
- package/dist/components/Title.vue.d.ts +11 -6
- package/dist/components/Title.vue.d.ts.map +1 -1
- package/dist/components/TopBar.vue.d.ts +8 -3
- package/dist/components/TopBar.vue.d.ts.map +1 -1
- package/dist/components/dashboard/Lineart.vue.d.ts +3 -12
- package/dist/components/dashboard/Lineart.vue.d.ts.map +1 -1
- package/dist/components/form/BglField.vue.d.ts +8 -8
- package/dist/components/form/BglField.vue.d.ts.map +1 -1
- package/dist/components/form/BglForm.vue.d.ts +27 -41
- package/dist/components/form/BglForm.vue.d.ts.map +1 -1
- package/dist/components/form/BglMultiStepForm.vue.d.ts +27 -45
- package/dist/components/form/BglMultiStepForm.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/CheckInput.vue.d.ts +12 -28
- package/dist/components/form/inputs/CheckInput.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/Checkbox.vue.d.ts +11 -15
- package/dist/components/form/inputs/Checkbox.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/ColorPicker.vue.d.ts +6 -27
- package/dist/components/form/inputs/ColorPicker.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/DateInput.vue.d.ts +6 -31
- package/dist/components/form/inputs/DateInput.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/DatePicker.vue.d.ts +5 -14
- package/dist/components/form/inputs/DatePicker.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/FileUpload.vue.d.ts +74 -78
- package/dist/components/form/inputs/FileUpload.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/JSONInput.vue.d.ts +6 -33
- package/dist/components/form/inputs/JSONInput.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/PasswordInput.vue.d.ts +5 -14
- package/dist/components/form/inputs/PasswordInput.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/RadioGroup.vue.d.ts +12 -12
- package/dist/components/form/inputs/RadioGroup.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/RadioPillsInput.vue.d.ts +6 -31
- package/dist/components/form/inputs/RadioPillsInput.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/RichText.vue.d.ts +5 -14
- package/dist/components/form/inputs/RichText.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/RichText2/Toolbar.vue.d.ts +5 -14
- package/dist/components/form/inputs/RichText2/Toolbar.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/RichText2/index.vue.d.ts +5 -14
- package/dist/components/form/inputs/RichText2/index.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/SelectInput.vue.d.ts +228 -16
- package/dist/components/form/inputs/SelectInput.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/SignaturePad.vue.d.ts +5 -26
- package/dist/components/form/inputs/SignaturePad.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/TableField.vue.d.ts +6 -29
- package/dist/components/form/inputs/TableField.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/TelInput.vue.d.ts +6 -59
- package/dist/components/form/inputs/TelInput.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/TextInput.vue.d.ts +6 -31
- package/dist/components/form/inputs/TextInput.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/ToggleInput.vue.d.ts +12 -28
- package/dist/components/form/inputs/ToggleInput.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/index.d.ts +0 -1
- package/dist/components/form/inputs/index.d.ts.map +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/layout/BottomMenu.vue.d.ts +10 -14
- package/dist/components/layout/BottomMenu.vue.d.ts.map +1 -1
- package/dist/components/layout/Layout.vue.d.ts +9 -35
- package/dist/components/layout/Layout.vue.d.ts.map +1 -1
- package/dist/components/layout/SidebarMenu.vue.d.ts +15 -19
- package/dist/components/layout/SidebarMenu.vue.d.ts.map +1 -1
- package/dist/components/layout/TabbedLayout.vue.d.ts +15 -19
- package/dist/components/layout/TabbedLayout.vue.d.ts.map +1 -1
- package/dist/components/layout/Tabs.vue.d.ts +12 -16
- package/dist/components/layout/Tabs.vue.d.ts.map +1 -1
- package/dist/components/layout/TabsBody.vue.d.ts +10 -14
- package/dist/components/layout/TabsBody.vue.d.ts.map +1 -1
- package/dist/components/layout/TabsNav.vue.d.ts +5 -14
- package/dist/components/layout/TabsNav.vue.d.ts.map +1 -1
- package/dist/components/layout/tabsManager.d.ts +1 -1
- package/dist/components/lightbox/Lightbox.vue.d.ts +1 -2
- package/dist/components/lightbox/Lightbox.vue.d.ts.map +1 -1
- package/dist/composables/index.d.ts +2 -2
- package/dist/composables/index.d.ts.map +1 -1
- package/dist/index.cjs +314 -267
- package/dist/index.mjs +314 -267
- package/dist/style.css +58 -32
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/utils/BagelFormUtils.d.ts +88 -216
- package/dist/utils/BagelFormUtils.d.ts.map +1 -1
- package/dist/utils/lang.d.ts +3 -3
- package/package.json +1 -1
- package/src/components/AddressSearch.vue +3 -2
- package/src/components/Dropdown.vue +72 -0
- package/src/components/ListItem.vue +9 -1
- package/src/components/ModalConfirm.vue +1 -1
- package/src/components/form/inputs/PasswordInput.vue +7 -1
- package/src/components/form/inputs/SelectInput.vue +82 -83
- package/src/components/form/inputs/TelInput.vue +51 -50
- package/src/components/form/inputs/index.ts +0 -2
- package/src/components/index.ts +1 -0
- package/src/components/lightbox/Lightbox.vue +1 -1
- package/src/composables/index.ts +9 -3
- package/src/styles/inputs.css +1 -1
- package/src/styles/layout.css +4 -0
- package/src/styles/mobilLayout.css +4 -0
- package/src/styles/modal.css +2 -2
- package/src/styles/text.css +8 -0
- package/src/types/index.ts +3 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BagelFormUtils.d.ts","sourceRoot":"","sources":["../../src/utils/BagelFormUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,KAAK,cAAc,EAAE,KAAK,KAAK,EAAE,KAAK,MAAM,EAAY,MAAM,eAAe,CAAA;AAGjG,UAAU,YAAY;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAA;CACjB;AAED,KAAK,WAAW,GAAG,YAAY,CAAA;AAE/B,UAAU,gBAAiB,SAAQ,YAAY;IAC9C,IAAI,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,OAAO,CAAA;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,SAAS,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,UAAU,gBAAiB,SAAQ,YAAY;IAC9C,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,WAAW,CAAC,EAAE,OAAO,CAAA;CACrB;AAED,UAAU,eAAgB,SAAQ,YAAY;IAC7C,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;CACb;AAED,KAAK,eAAe,GAAG,YAAY,CAAA;AAEnC,wBAAgB,YAAY,CAAC,CAAC,EAAE,EAAE,CAAC,EAA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F;AAED,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,GAAG,KAAK,GAAG,SAAS,CASvF"}
|
package/dist/utils/lang.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
declare function $tdb<T extends Record<string, string>>(langEl?: T): string;
|
|
2
2
|
export declare function useLang(): {
|
|
3
|
-
lang: import('vue').WritableComputedRef<string>;
|
|
3
|
+
lang: import('vue').WritableComputedRef<string, string>;
|
|
4
4
|
$tdb: typeof $tdb;
|
|
5
|
-
availableLangs: import('vue').WritableComputedRef<string[]>;
|
|
6
|
-
defaultLang: import('vue').WritableComputedRef<string>;
|
|
5
|
+
availableLangs: import('vue').WritableComputedRef<string[], string[]>;
|
|
6
|
+
defaultLang: import('vue').WritableComputedRef<string, string>;
|
|
7
7
|
};
|
|
8
8
|
export {};
|
|
9
9
|
//# sourceMappingURL=lang.d.ts.map
|
package/package.json
CHANGED
|
@@ -22,7 +22,6 @@ async function searchAddresses() {
|
|
|
22
22
|
const geocodeUrl = `https://nominatim.openstreetmap.org/search?format=json&q=${encodeURI(addressURL)}`
|
|
23
23
|
const res = await fetch(geocodeUrl)
|
|
24
24
|
searchResults = await res.json() || []
|
|
25
|
-
console.log(suggestion)
|
|
26
25
|
suggestion?.show()
|
|
27
26
|
}
|
|
28
27
|
</script>
|
|
@@ -30,7 +29,9 @@ async function searchAddresses() {
|
|
|
30
29
|
<template>
|
|
31
30
|
<div class="relative">
|
|
32
31
|
<Dropdown ref="suggestion" :noAutoFocus="true" placement="bottom-start">
|
|
33
|
-
<
|
|
32
|
+
<template #trigger>
|
|
33
|
+
<TextInput v-model="addressInput" placeholder="Enter address" @debounce="searchAddresses" />
|
|
34
|
+
</template>
|
|
34
35
|
<template #popper>
|
|
35
36
|
<ListView class="-mt-2 hm-300px">
|
|
36
37
|
<ListItem v-for="(result, index) in searchResults" :key="index" icon="location_on" :title="result.display_name" @click="emitAddress(result)" />
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { Btn, type MaterialIcons } from '@bagelink/vue'
|
|
3
|
+
import { Dropdown as DDown } from 'floating-vue'
|
|
4
|
+
|
|
5
|
+
export declare type Side = 'top' | 'right' | 'bottom' | 'left' | 'auto'
|
|
6
|
+
export declare type Alignment = 'start' | 'end'
|
|
7
|
+
export declare type AlignedPlacement = `${Side}-${Alignment}`
|
|
8
|
+
|
|
9
|
+
defineProps<{
|
|
10
|
+
value?: string
|
|
11
|
+
thin?: boolean
|
|
12
|
+
flat?: boolean
|
|
13
|
+
disabled?: boolean
|
|
14
|
+
icon?: MaterialIcons
|
|
15
|
+
triggerClass?: string
|
|
16
|
+
// 'icon.end'?: MaterialIcons
|
|
17
|
+
border?: boolean
|
|
18
|
+
outline?: boolean
|
|
19
|
+
round?: boolean
|
|
20
|
+
placement?: 'auto' | AlignedPlacement
|
|
21
|
+
noAutoFocus?: boolean
|
|
22
|
+
// theme
|
|
23
|
+
// referenceNode
|
|
24
|
+
// shown
|
|
25
|
+
// showGroup
|
|
26
|
+
// ariaId
|
|
27
|
+
// disabled
|
|
28
|
+
// positioningDisabled
|
|
29
|
+
// placement
|
|
30
|
+
// delay
|
|
31
|
+
// distance
|
|
32
|
+
// skidding
|
|
33
|
+
// triggers
|
|
34
|
+
// showTriggers
|
|
35
|
+
// hideTriggers
|
|
36
|
+
// popperTriggers
|
|
37
|
+
// popperShowTriggers
|
|
38
|
+
// popperHideTriggers
|
|
39
|
+
// container
|
|
40
|
+
// boundary
|
|
41
|
+
// strategy
|
|
42
|
+
// autoHide
|
|
43
|
+
// handleResize
|
|
44
|
+
// instantMove
|
|
45
|
+
// eagerMount
|
|
46
|
+
// popperClass
|
|
47
|
+
// computeTransformOrigin
|
|
48
|
+
// autoMinSize
|
|
49
|
+
// autoSize
|
|
50
|
+
// autoMaxSize
|
|
51
|
+
// autoBoundaryMaxSize
|
|
52
|
+
// preventOverflow
|
|
53
|
+
// overflowPadding
|
|
54
|
+
|
|
55
|
+
}>()
|
|
56
|
+
const emit = defineEmits(['show', 'hide'])
|
|
57
|
+
const ddownRef = $ref<typeof DDown>()
|
|
58
|
+
const show = () => ddownRef?.show()
|
|
59
|
+
const hide = () => ddownRef?.hide()
|
|
60
|
+
defineExpose({ show, hide })
|
|
61
|
+
</script>
|
|
62
|
+
|
|
63
|
+
<template>
|
|
64
|
+
<DDown ref="ddownRef" :disabled="disabled" :noAutoFocus="noAutoFocus" :placement="placement" @hide="emit('hide')" @show="emit('show')">
|
|
65
|
+
<slot name="trigger">
|
|
66
|
+
<Btn :class="triggerClass" :icon="icon" :value="value" :thin="thin" :flat="thin" />
|
|
67
|
+
</slot>
|
|
68
|
+
<template #popper>
|
|
69
|
+
<slot />
|
|
70
|
+
</template>
|
|
71
|
+
</DDown>
|
|
72
|
+
</template>
|
|
@@ -17,7 +17,7 @@ defineProps<{
|
|
|
17
17
|
<component
|
|
18
18
|
:is="to ? 'RouterLink' : 'div'"
|
|
19
19
|
:to="to"
|
|
20
|
-
class="flex gap-
|
|
20
|
+
class="flex gap-05 list-item"
|
|
21
21
|
:class="{ 'notClickable': !(to || onClick), 'no-border-list': flat }"
|
|
22
22
|
@click="onClick"
|
|
23
23
|
>
|
|
@@ -59,6 +59,14 @@ defineProps<{
|
|
|
59
59
|
bottom: 0;
|
|
60
60
|
border-bottom: 1px solid var(--border-color);
|
|
61
61
|
}
|
|
62
|
+
.list-item:last-child::after {
|
|
63
|
+
content: '';
|
|
64
|
+
position: absolute;
|
|
65
|
+
left: 0;
|
|
66
|
+
right: 0;
|
|
67
|
+
bottom: 0;
|
|
68
|
+
border-bottom: none;
|
|
69
|
+
}
|
|
62
70
|
|
|
63
71
|
.list-item:hover,
|
|
64
72
|
.list-item.router-link-active {
|
|
@@ -21,7 +21,7 @@ function select(val: boolean) {
|
|
|
21
21
|
{{ message }}
|
|
22
22
|
</p>
|
|
23
23
|
<template #footer>
|
|
24
|
-
<Btn flat thin value="Cancel" @click="select(false)" />
|
|
24
|
+
<Btn flat thin class="color-black" value="Cancel" @click="select(false)" />
|
|
25
25
|
<Btn color="green" value="Confirm" @click="select(true)" />
|
|
26
26
|
</template>
|
|
27
27
|
</Modal>
|
|
@@ -20,6 +20,12 @@ const inputType = $computed(() => showPwd.value ? 'text' : 'password')
|
|
|
20
20
|
<template>
|
|
21
21
|
<div class="relative">
|
|
22
22
|
<TextInput v-model="password" class="mb-0" :type="inputType" v-bind="txtInputProps" />
|
|
23
|
-
<Btn flat thin class="
|
|
23
|
+
<Btn flat thin class="mx-05 m-password position-bottom-end" :icon="toggleShowPwdIcon" @click="showPwd = !showPwd" />
|
|
24
24
|
</div>
|
|
25
25
|
</template>
|
|
26
|
+
|
|
27
|
+
<style>
|
|
28
|
+
.m-password{
|
|
29
|
+
margin-block: calc(var(--input-height) / 2 - 15px);
|
|
30
|
+
}
|
|
31
|
+
</style>
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
2
|
import { onMounted, watch } from 'vue'
|
|
3
|
-
import { Dropdown } from 'floating-vue'
|
|
4
3
|
import 'floating-vue/style.css'
|
|
5
4
|
import {
|
|
6
5
|
Btn,
|
|
7
6
|
Card,
|
|
7
|
+
Dropdown,
|
|
8
8
|
Icon,
|
|
9
9
|
type MaterialIcons,
|
|
10
10
|
type Option,
|
|
@@ -182,95 +182,94 @@ onMounted(() => {
|
|
|
182
182
|
ref="dropdown"
|
|
183
183
|
placement="bottom-start"
|
|
184
184
|
class="bagel-input selectinput"
|
|
185
|
-
@click.stop
|
|
186
185
|
@hide="updateOpen(false)"
|
|
187
186
|
>
|
|
188
|
-
<
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
<
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
<
|
|
206
|
-
|
|
187
|
+
<template #trigger>
|
|
188
|
+
<label>
|
|
189
|
+
{{ label }}
|
|
190
|
+
<div class="flex gap-05">
|
|
191
|
+
<button
|
|
192
|
+
:disabled="disabled"
|
|
193
|
+
type="button"
|
|
194
|
+
class="selectinput-btn"
|
|
195
|
+
:class="{ isEmpty: selectedItemCount === 0 }"
|
|
196
|
+
@keydown="openOptions"
|
|
197
|
+
@click="updateOpen(true)"
|
|
198
|
+
>
|
|
199
|
+
<Icon v-if="icon" :icon="icon" />
|
|
200
|
+
<p v-if="!hideLabel">
|
|
201
|
+
{{ selectedLabel }}
|
|
202
|
+
</p>
|
|
203
|
+
|
|
204
|
+
<div v-if="clearable && selectedItemCount > 0" class="ms-auto ps-05 me-05">
|
|
205
|
+
<Btn
|
|
206
|
+
flat
|
|
207
|
+
thin
|
|
208
|
+
icon="clear"
|
|
209
|
+
class="color-gray"
|
|
210
|
+
@click="selectedItems = []; emitUpdate()"
|
|
211
|
+
/>
|
|
212
|
+
</div>
|
|
213
|
+
<Icon
|
|
214
|
+
v-if="!disabled"
|
|
207
215
|
thin
|
|
208
|
-
|
|
209
|
-
class="color-gray"
|
|
210
|
-
@click="selectedItems = []; emitUpdate()"
|
|
216
|
+
v-bind="{ icon: open ? 'unfold_less' : 'unfold_more' }"
|
|
211
217
|
/>
|
|
212
|
-
</
|
|
213
|
-
<
|
|
214
|
-
v-if="
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
v-if="required"
|
|
221
|
-
tabindex="-1"
|
|
222
|
-
style="width: 0; height: 0; position: absolute; opacity: 0; z-index: -1"
|
|
223
|
-
:value="selectedItems"
|
|
224
|
-
required
|
|
225
|
-
@input="updateOpen(true)"
|
|
226
|
-
>
|
|
227
|
-
</div>
|
|
228
|
-
</label>
|
|
229
|
-
<template #popper>
|
|
230
|
-
<Card
|
|
231
|
-
class="p-05"
|
|
232
|
-
:style="{ width: fullWidth ? '100%' : 'auto' }"
|
|
233
|
-
>
|
|
234
|
-
<TextInput
|
|
235
|
-
v-if="searchable"
|
|
236
|
-
ref="searchInput"
|
|
237
|
-
v-model="search"
|
|
238
|
-
dense
|
|
239
|
-
placeholder="Search"
|
|
240
|
-
icon="search"
|
|
241
|
-
/>
|
|
242
|
-
<div class="selectinput-options" :class="{ multiselect }">
|
|
243
|
-
<div
|
|
244
|
-
v-for="(option, i) in filteredOptions"
|
|
245
|
-
:key="`${option}${i}`"
|
|
246
|
-
class="selectinput-option hover gap-1 align-items-center"
|
|
247
|
-
:class="{ selected: isSelected(option) }"
|
|
248
|
-
role="option"
|
|
249
|
-
tabindex="0"
|
|
250
|
-
:aria-selected="isSelected(option)"
|
|
251
|
-
@click="select(option)"
|
|
252
|
-
@keydown.enter="select(option)"
|
|
218
|
+
</button>
|
|
219
|
+
<input
|
|
220
|
+
v-if="required"
|
|
221
|
+
tabindex="-1"
|
|
222
|
+
style="width: 0; height: 0; position: absolute; opacity: 0; z-index: -1"
|
|
223
|
+
:value="selectedItems"
|
|
224
|
+
required
|
|
225
|
+
@input="updateOpen(true)"
|
|
253
226
|
>
|
|
254
|
-
<template v-if="multiselect">
|
|
255
|
-
<Icon
|
|
256
|
-
v-if="isSelected(option)" :size="1.1
|
|
257
|
-
" icon="select_check_box"
|
|
258
|
-
/>
|
|
259
|
-
<Icon
|
|
260
|
-
v-if="!isSelected(option)"
|
|
261
|
-
class="opacity-3"
|
|
262
|
-
icon="check_box_outline_blank"
|
|
263
|
-
:size="1.1"
|
|
264
|
-
/>
|
|
265
|
-
</template>
|
|
266
|
-
<span class="block">
|
|
267
|
-
{{ getLabel(option) }}
|
|
268
|
-
</span>
|
|
269
|
-
</div>
|
|
270
227
|
</div>
|
|
271
|
-
|
|
272
|
-
</Card>
|
|
228
|
+
</label>
|
|
273
229
|
</template>
|
|
230
|
+
<Card
|
|
231
|
+
class="p-05"
|
|
232
|
+
:style="{ width: fullWidth ? '100%' : 'auto' }"
|
|
233
|
+
>
|
|
234
|
+
<TextInput
|
|
235
|
+
v-if="searchable"
|
|
236
|
+
ref="searchInput"
|
|
237
|
+
v-model="search"
|
|
238
|
+
dense
|
|
239
|
+
placeholder="Search"
|
|
240
|
+
icon="search"
|
|
241
|
+
/>
|
|
242
|
+
<div class="selectinput-options" :class="{ multiselect }">
|
|
243
|
+
<div
|
|
244
|
+
v-for="(option, i) in filteredOptions"
|
|
245
|
+
:key="`${option}${i}`"
|
|
246
|
+
class="selectinput-option hover gap-1 align-items-center"
|
|
247
|
+
:class="{ selected: isSelected(option) }"
|
|
248
|
+
role="option"
|
|
249
|
+
tabindex="0"
|
|
250
|
+
:aria-selected="isSelected(option)"
|
|
251
|
+
@click="select(option)"
|
|
252
|
+
@keydown.enter="select(option)"
|
|
253
|
+
>
|
|
254
|
+
<template v-if="multiselect">
|
|
255
|
+
<Icon
|
|
256
|
+
v-if="isSelected(option)" :size="1.1
|
|
257
|
+
" icon="select_check_box"
|
|
258
|
+
/>
|
|
259
|
+
<Icon
|
|
260
|
+
v-if="!isSelected(option)"
|
|
261
|
+
class="opacity-3"
|
|
262
|
+
icon="check_box_outline_blank"
|
|
263
|
+
:size="1.1"
|
|
264
|
+
/>
|
|
265
|
+
</template>
|
|
266
|
+
<span class="block">
|
|
267
|
+
{{ getLabel(option) }}
|
|
268
|
+
</span>
|
|
269
|
+
</div>
|
|
270
|
+
</div>
|
|
271
|
+
<slot name="last" />
|
|
272
|
+
</Card>
|
|
274
273
|
</Dropdown>
|
|
275
274
|
</template>
|
|
276
275
|
|
|
@@ -260,6 +260,8 @@ function findCountryByDialCode(dialCode: number) {
|
|
|
260
260
|
return filteredCountries.find(country => Number(country.dialCode) === dialCode)
|
|
261
261
|
}
|
|
262
262
|
|
|
263
|
+
const phoneDropdown = $ref<typeof Dropdown>()
|
|
264
|
+
|
|
263
265
|
function chooseCountry(country?: string) {
|
|
264
266
|
if (!country) return
|
|
265
267
|
const parsedCountry = findCountry(country)
|
|
@@ -274,6 +276,7 @@ function chooseCountry(country?: string) {
|
|
|
274
276
|
|
|
275
277
|
activeCountryCode = parsedCountry.iso2 || ''
|
|
276
278
|
// emitInput(phone);
|
|
279
|
+
phoneDropdown?.hide()
|
|
277
280
|
}
|
|
278
281
|
|
|
279
282
|
function onBlur() { emit('blur') }
|
|
@@ -325,62 +328,60 @@ function handleInput(e: KeyboardEvent) {
|
|
|
325
328
|
>
|
|
326
329
|
<Dropdown
|
|
327
330
|
v-if="!computedDropDownOptions.hide"
|
|
328
|
-
|
|
331
|
+
ref="phoneDropdown"
|
|
332
|
+
placement="bottom-start"
|
|
329
333
|
:disabled="computedDropDownOptions.disabled"
|
|
330
334
|
@hide="open = false"
|
|
331
335
|
>
|
|
332
|
-
<
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
</span>
|
|
342
|
-
<template #popper="{ hide }">
|
|
343
|
-
<div class="p-075 tel-countryp-dropdown">
|
|
344
|
-
<TextInput
|
|
345
|
-
v-if="searchable"
|
|
346
|
-
v-model="searchQuery"
|
|
347
|
-
aria-label="Search by country name or country code"
|
|
348
|
-
placeholder="Search"
|
|
349
|
-
icon="search"
|
|
336
|
+
<template #trigger>
|
|
337
|
+
<span
|
|
338
|
+
class="flex gap-05"
|
|
339
|
+
@click="open = true"
|
|
340
|
+
>
|
|
341
|
+
<Icon :icon="open ? 'collapse_all' : 'expand_all'" />
|
|
342
|
+
<Flag
|
|
343
|
+
v-if="computedDropDownOptions.showFlags && activeCountryCode"
|
|
344
|
+
:country="activeCountryCode"
|
|
350
345
|
/>
|
|
346
|
+
</span>
|
|
347
|
+
</template>
|
|
348
|
+
<div class="p-075 tel-countryp-dropdown">
|
|
349
|
+
<TextInput
|
|
350
|
+
v-if="searchable"
|
|
351
|
+
v-model="searchQuery"
|
|
352
|
+
aria-label="Search by country name or country code"
|
|
353
|
+
placeholder="Search"
|
|
354
|
+
icon="search"
|
|
355
|
+
/>
|
|
351
356
|
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
+
<ul
|
|
358
|
+
class="overflow-y p-0"
|
|
359
|
+
:style="{ 'max-height': '400px' }"
|
|
360
|
+
:class="dropdownOpenDirection"
|
|
361
|
+
role="listbox"
|
|
362
|
+
>
|
|
363
|
+
<li
|
|
364
|
+
v-for="(pb, index) in sortedCountries"
|
|
365
|
+
:key="pb.iso2 + isPreferred(pb)"
|
|
366
|
+
role="option"
|
|
367
|
+
class="flex gap-075"
|
|
368
|
+
tabindex="-1"
|
|
369
|
+
:aria-selected="activeCountryCode === pb.iso2 && !isPreferred(pb)
|
|
370
|
+
"
|
|
371
|
+
@click="chooseCountry(pb.iso2)"
|
|
372
|
+
@mousemove="selectedIndex = index"
|
|
357
373
|
>
|
|
358
|
-
<
|
|
359
|
-
v-
|
|
360
|
-
:
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
"
|
|
370
|
-
@mousemove="selectedIndex = index"
|
|
371
|
-
>
|
|
372
|
-
<Flag
|
|
373
|
-
v-if="computedDropDownOptions.showFlags"
|
|
374
|
-
:country="pb.iso2"
|
|
375
|
-
/>
|
|
376
|
-
<p class="tel-country">{{ pb.name }}</p>
|
|
377
|
-
<span v-if="computedDropDownOptions.showDialCodeInList">
|
|
378
|
-
+{{ pb.dialCode }}
|
|
379
|
-
</span>
|
|
380
|
-
</li>
|
|
381
|
-
</ul>
|
|
382
|
-
</div>
|
|
383
|
-
</template>
|
|
374
|
+
<Flag
|
|
375
|
+
v-if="computedDropDownOptions.showFlags"
|
|
376
|
+
:country="pb.iso2"
|
|
377
|
+
/>
|
|
378
|
+
<p class="tel-country">{{ pb.name }}</p>
|
|
379
|
+
<span v-if="computedDropDownOptions.showDialCodeInList">
|
|
380
|
+
+{{ pb.dialCode }}
|
|
381
|
+
</span>
|
|
382
|
+
</li>
|
|
383
|
+
</ul>
|
|
384
|
+
</div>
|
|
384
385
|
</Dropdown>
|
|
385
386
|
|
|
386
387
|
<!-- ref="refInput" -->
|
|
@@ -16,5 +16,3 @@ export { default as SignaturePad } from './SignaturePad.vue'
|
|
|
16
16
|
export { default as RichText2 } from './RichText2/index.vue'
|
|
17
17
|
export { default as RadioGroup } from './RadioGroup.vue'
|
|
18
18
|
export { default as PasswordInput } from './PasswordInput.vue'
|
|
19
|
-
|
|
20
|
-
export { Dropdown } from 'floating-vue'
|
package/src/components/index.ts
CHANGED
|
@@ -24,6 +24,7 @@ export { default as ModalConfirm } from './ModalConfirm.vue'
|
|
|
24
24
|
export { default as MapEmbed } from './MapEmbed.vue'
|
|
25
25
|
export { default as Flag } from './Flag.vue'
|
|
26
26
|
export { default as AddressSearch } from './AddressSearch.vue'
|
|
27
|
+
export { default as Dropdown } from './Dropdown.vue'
|
|
27
28
|
|
|
28
29
|
export * from './form'
|
|
29
30
|
export * from './dashboard'
|
|
@@ -88,7 +88,7 @@ defineExpose({ open, close })
|
|
|
88
88
|
/>
|
|
89
89
|
</div>
|
|
90
90
|
<div class="bgl-lightbox relative txt-center" @click.stop>
|
|
91
|
-
<Btn flat class="fixed top-1
|
|
91
|
+
<Btn flat class="fixed top-1 start-1 color-white" icon="close" @click="close" />
|
|
92
92
|
<div class="bgl-lightbox-item">
|
|
93
93
|
<template v-if="currentItem?.type === 'image'">
|
|
94
94
|
<img :src="currentItem?.src" alt="Preview" class="vw90 lightbox-image">
|
package/src/composables/index.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { type BglFormSchemaFnT, type BglFormSchemaT, getFallbackSchema } from '@bagelink/vue'
|
|
1
|
+
import { type BglFormSchemaFnT, type BglFormSchemaT, type IfAny, getFallbackSchema } from '@bagelink/vue'
|
|
2
|
+
|
|
2
3
|
import type { Ref, UnwrapRef } from 'vue'
|
|
3
4
|
import { ref, watch } from 'vue'
|
|
4
5
|
|
|
@@ -25,9 +26,14 @@ export function useBglSchema<T = Record<string, unknown>>(
|
|
|
25
26
|
return getFallbackSchema(data, showFields)
|
|
26
27
|
}
|
|
27
28
|
|
|
28
|
-
export function useLocalStorage<T>(
|
|
29
|
+
export function useLocalStorage<T>(
|
|
30
|
+
key: string,
|
|
31
|
+
initialValue: T
|
|
32
|
+
): [T] extends [Ref<any, any>] ?
|
|
33
|
+
IfAny<T, Ref<T, T>, T> :
|
|
34
|
+
Ref<UnwrapRef<T>, T | UnwrapRef<T>> {
|
|
29
35
|
const storedValue = localStorage.getItem(key)
|
|
30
|
-
const initial = storedValue ? JSON.parse(storedValue) : initialValue
|
|
36
|
+
const initial = storedValue !== null ? JSON.parse(storedValue) : initialValue
|
|
31
37
|
const value = ref<T>(initial)
|
|
32
38
|
|
|
33
39
|
watch(() => value.value, (val) => {
|
package/src/styles/inputs.css
CHANGED
package/src/styles/layout.css
CHANGED
package/src/styles/modal.css
CHANGED
package/src/styles/text.css
CHANGED
|
@@ -370,6 +370,10 @@
|
|
|
370
370
|
word-break: break-word;
|
|
371
371
|
}
|
|
372
372
|
|
|
373
|
+
.word-break-all {
|
|
374
|
+
word-break: break-all;
|
|
375
|
+
}
|
|
376
|
+
|
|
373
377
|
.uppercase {
|
|
374
378
|
text-transform: uppercase;
|
|
375
379
|
}
|
|
@@ -809,6 +813,10 @@
|
|
|
809
813
|
word-break: break-word;
|
|
810
814
|
}
|
|
811
815
|
|
|
816
|
+
.m_word-break-all {
|
|
817
|
+
word-break: break-all;
|
|
818
|
+
}
|
|
819
|
+
|
|
812
820
|
.m_uppercase {
|
|
813
821
|
text-transform: uppercase;
|
|
814
822
|
}
|