@bagelink/vue 0.0.742 → 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 +15 -30
- 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 +320 -271
- package/dist/index.mjs +320 -271
- package/dist/style.css +69 -41
- 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/CheckInput.vue +3 -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 +4 -2
- 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,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
|
@@ -231,7 +231,8 @@ select {
|
|
|
231
231
|
width: 100%;
|
|
232
232
|
}
|
|
233
233
|
|
|
234
|
-
[dir='rtl'] .bagel-input input[type="email"]
|
|
234
|
+
[dir='rtl'] .bagel-input input[type="email"],
|
|
235
|
+
[dir='rtl'] .tel-input input[type="tel"] {
|
|
235
236
|
direction: ltr;
|
|
236
237
|
text-align: right;
|
|
237
238
|
}
|
|
@@ -251,7 +252,8 @@ select {
|
|
|
251
252
|
.bagel-input .bgl_btn:focus,
|
|
252
253
|
.bagel-input button:focus {
|
|
253
254
|
outline-color: rgba(0, 0, 0, 0.05);
|
|
254
|
-
box-shadow: inset 0 0 10px #
|
|
255
|
+
box-shadow: inset 0 0 10px #00000021;
|
|
256
|
+
outline-color: var(--input-bg);
|
|
255
257
|
|
|
256
258
|
}
|
|
257
259
|
|
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
|
}
|