eco-vue-js 0.11.57 → 0.11.59
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/assets/icons/IconAdd.svg.js +2 -2
- package/dist/assets/icons/IconAddCircle.svg.js +2 -2
- package/dist/assets/icons/IconAddSquare.svg.js +2 -2
- package/dist/assets/icons/IconAlarm.svg.js +2 -2
- package/dist/assets/icons/IconArchiveBook.svg.js +2 -2
- package/dist/assets/icons/IconArrow.svg.js +2 -2
- package/dist/assets/icons/IconBack.svg.js +2 -2
- package/dist/assets/icons/IconBold.svg.js +2 -2
- package/dist/assets/icons/IconCancel.svg.js +2 -2
- package/dist/assets/icons/IconCandle.svg.js +2 -2
- package/dist/assets/icons/IconCelery.svg.js +2 -2
- package/dist/assets/icons/IconChart.svg.js +2 -2
- package/dist/assets/icons/IconCheck.svg.js +2 -2
- package/dist/assets/icons/IconCheckCircle.svg.js +2 -2
- package/dist/assets/icons/IconClose.svg.js +2 -2
- package/dist/assets/icons/IconCloseCircle.svg.js +2 -2
- package/dist/assets/icons/IconCodeBlock.svg.js +2 -2
- package/dist/assets/icons/IconCodeInline.svg.js +2 -2
- package/dist/assets/icons/IconCopy.svg.js +2 -2
- package/dist/assets/icons/IconCopySuccess.svg.js +2 -2
- package/dist/assets/icons/IconCopyright.svg.js +2 -2
- package/dist/assets/icons/IconDanger.svg.js +2 -2
- package/dist/assets/icons/IconDojo.svg.js +2 -2
- package/dist/assets/icons/IconDrag.svg.js +2 -2
- package/dist/assets/icons/IconEdit.svg.js +2 -2
- package/dist/assets/icons/IconEditCircle.svg.js +2 -2
- package/dist/assets/icons/IconEditSquare.svg.js +2 -2
- package/dist/assets/icons/IconElement.svg.js +2 -2
- package/dist/assets/icons/IconExport.svg.js +2 -2
- package/dist/assets/icons/IconEye.svg.js +2 -2
- package/dist/assets/icons/IconEyeSlash.svg.js +2 -2
- package/dist/assets/icons/IconFilter.svg.js +2 -2
- package/dist/assets/icons/IconFilterRemove.svg.js +2 -2
- package/dist/assets/icons/IconFinding.svg.js +2 -2
- package/dist/assets/icons/IconFolder.svg.js +2 -2
- package/dist/assets/icons/IconFolderAdd.svg.js +2 -2
- package/dist/assets/icons/IconFolderCross.svg.js +2 -2
- package/dist/assets/icons/IconGrid.svg.js +2 -2
- package/dist/assets/icons/IconHeading.svg.js +2 -2
- package/dist/assets/icons/IconItalic.svg.js +2 -2
- package/dist/assets/icons/IconJira.svg.js +2 -2
- package/dist/assets/icons/IconKey.svg.js +2 -2
- package/dist/assets/icons/IconKeySquare.svg.js +2 -2
- package/dist/assets/icons/IconLayer.svg.js +2 -2
- package/dist/assets/icons/IconLink.svg.js +2 -2
- package/dist/assets/icons/IconLinkBold.svg.js +2 -2
- package/dist/assets/icons/IconLinkOutline.svg.js +2 -2
- package/dist/assets/icons/IconLinkedIn.svg.js +2 -2
- package/dist/assets/icons/IconList.svg.js +2 -2
- package/dist/assets/icons/IconListBullet.svg.js +2 -2
- package/dist/assets/icons/IconListCheckbox.svg.js +2 -2
- package/dist/assets/icons/IconListDecrease.svg.js +2 -2
- package/dist/assets/icons/IconListIncrease.svg.js +2 -2
- package/dist/assets/icons/IconListNumbered.svg.js +2 -2
- package/dist/assets/icons/IconListSettings.svg.js +2 -2
- package/dist/assets/icons/IconLock.svg.js +2 -2
- package/dist/assets/icons/IconLockOff.svg.js +2 -2
- package/dist/assets/icons/IconLogout.svg.js +2 -2
- package/dist/assets/icons/IconMenu.svg.js +2 -2
- package/dist/assets/icons/IconMinusCircle.svg.js +2 -2
- package/dist/assets/icons/IconMoon.svg.js +2 -2
- package/dist/assets/icons/IconMore.svg.js +2 -2
- package/dist/assets/icons/IconNegate.svg.js +2 -2
- package/dist/assets/icons/IconNegativeInfo.svg.js +2 -2
- package/dist/assets/icons/IconNote.svg.js +2 -2
- package/dist/assets/icons/IconPaste.svg.js +2 -2
- package/dist/assets/icons/IconProfile.svg.js +2 -2
- package/dist/assets/icons/IconQuote.svg.js +2 -2
- package/dist/assets/icons/IconRadar.svg.js +2 -2
- package/dist/assets/icons/IconRange.svg.js +2 -2
- package/dist/assets/icons/IconRedo.svg.js +2 -2
- package/dist/assets/icons/IconRefresh.svg.js +2 -2
- package/dist/assets/icons/IconSearch.svg.js +2 -2
- package/dist/assets/icons/IconSettings.svg.js +2 -2
- package/dist/assets/icons/IconShift.svg.js +2 -2
- package/dist/assets/icons/IconSlash.svg.js +2 -2
- package/dist/assets/icons/IconSort.svg.js +2 -2
- package/dist/assets/icons/IconStar.svg.js +2 -2
- package/dist/assets/icons/IconStrikethrough.svg.js +2 -2
- package/dist/assets/icons/IconSuccess.svg.js +2 -2
- package/dist/assets/icons/IconSummary.svg.js +2 -2
- package/dist/assets/icons/IconSun.svg.js +2 -2
- package/dist/assets/icons/IconTable.svg.js +2 -2
- package/dist/assets/icons/IconTableCollapsed.svg.js +2 -2
- package/dist/assets/icons/IconTag.svg.js +2 -2
- package/dist/assets/icons/IconTask.svg.js +2 -2
- package/dist/assets/icons/IconTime.svg.js +2 -2
- package/dist/assets/icons/IconTrash.svg.js +2 -2
- package/dist/assets/icons/IconUnderline.svg.js +2 -2
- package/dist/assets/icons/IconUndo.svg.js +2 -2
- package/dist/assets/icons/IconUser.svg.js +2 -2
- package/dist/assets/icons/IconVersionControl.svg.js +2 -2
- package/dist/assets/icons/IconWarn.svg.js +2 -2
- package/dist/assets/icons/IconWeight.svg.js +2 -2
- package/dist/components/ActionsBar/WActionsBar.vue.js +3 -3
- package/dist/components/BottomSheet/WBottomSheet.vue.js +1 -1
- package/dist/components/Button/WButton.vue.js +15 -15
- package/dist/components/Button/WButtonAction.vue.js +21 -21
- package/dist/components/Button/WButtonCopy.vue.d.ts +1 -1
- package/dist/components/Button/WButtonCopy.vue.js +3 -3
- package/dist/components/Button/WButtonDropdown.vue.js +9 -9
- package/dist/components/Button/WButtonGroup.vue.js +16 -19
- package/dist/components/Button/WButtonInput.vue.js +11 -11
- package/dist/components/Button/WButtonMore.vue.js +17 -17
- package/dist/components/Button/WButtonMoreItem.vue.js +6 -6
- package/dist/components/Button/WButtonSelection.vue.js +3 -3
- package/dist/components/Button/WButtonSelectionAction.vue.js +14 -14
- package/dist/components/Button/WButtonTab.vue.js +38 -38
- package/dist/components/Button/WButtonUnselect.vue.js +7 -7
- package/dist/components/Chart/WChartLine.vue.js +18 -18
- package/dist/components/Chart/WChartLinear.vue.js +9 -9
- package/dist/components/Chart/components/ChartAxis.vue.js +6 -6
- package/dist/components/Checkbox/WCheckbox.vue.js +30 -30
- package/dist/components/Checkbox/WCheckboxGroup.vue.d.ts.map +1 -1
- package/dist/components/Checkbox/WCheckboxGroup.vue.js +17 -20
- package/dist/components/Checkbox/WCheckboxGroupMultiple.vue.d.ts.map +1 -1
- package/dist/components/Checkbox/WCheckboxGroupMultiple.vue.js +16 -19
- package/dist/components/Chip/WChip.vue.js +2 -2
- package/dist/components/Counter/WCounter.vue.js +1 -1
- package/dist/components/DatePicker/WDatePicker.vue.js +2 -2
- package/dist/components/DatePicker/WDatePickerSingle.vue.js +2 -2
- package/dist/components/DatePicker/components/CalendarDay.vue.js +9 -9
- package/dist/components/DatePicker/components/CalendarMonth.vue.js +7 -7
- package/dist/components/DatePicker/components/CalendarToggle.vue.js +2 -2
- package/dist/components/DatePicker/components/CalendarValue.vue.js +3 -3
- package/dist/components/DatePicker/components/CalendarWeek.vue.js +7 -7
- package/dist/components/Dismissable/WDismissable.vue.js +2 -2
- package/dist/components/DragContainer/WDragContainer.vue.js +2 -2
- package/dist/components/DragContainer/components/DragItem.vue.js +5 -5
- package/dist/components/DropdownMenu/WDropdownMenu.vue.d.ts.map +1 -1
- package/dist/components/DropdownMenu/WDropdownMenu.vue.js +8 -8
- package/dist/components/Expansion/WExpansion.vue.js +2 -2
- package/dist/components/Expansion/WExpansionItem.vue.js +7 -7
- package/dist/components/FieldWrapper/WFieldWrapper.vue.js +37 -37
- package/dist/components/FieldWrapper/components/FilterButton.vue.js +5 -5
- package/dist/components/FilePicker/WFilePicker.vue.d.ts +1 -1
- package/dist/components/FilePicker/WFilePicker.vue.d.ts.map +1 -1
- package/dist/components/FilePicker/WFilePicker.vue.js +17 -17
- package/dist/components/FilePicker/components/FilePickerItem.vue.js +2 -2
- package/dist/components/FilePicker/components/FilePickerSvg.vue.d.ts.map +1 -1
- package/dist/components/FilePicker/components/FilePickerSvg.vue.js +7 -7
- package/dist/components/FilterWrapper/WFilterWrapper.vue.js +1 -1
- package/dist/components/Form/WForm.vue.js +1 -1
- package/dist/components/Form/WFormValidator.vue.js +1 -1
- package/dist/components/FormAsync/WFormAsyncButtonGroup.vue.js +5 -5
- package/dist/components/FormAsync/WFormAsyncCheckboxGroup.vue.js +5 -5
- package/dist/components/FormAsync/WFormAsyncInput.vue.d.ts +2 -2
- package/dist/components/FormAsync/WFormAsyncInput.vue.js +5 -5
- package/dist/components/FormAsync/WFormAsyncSelect.vue.js +3 -3
- package/dist/components/FormAsync/WFormAsyncSelectInfiniteSingle.vue.js +3 -3
- package/dist/components/FormAsync/WFormAsyncSelectSingle.vue.js +3 -3
- package/dist/components/FormAsync/WFormAsyncSelectStringified.vue.js +3 -3
- package/dist/components/FormAsync/WFormAsyncToggle.vue.js +2 -2
- package/dist/components/HeaderBar/WHeaderBar.vue.js +1 -1
- package/dist/components/ImageViewer/WImageViewer.vue.js +6 -6
- package/dist/components/ImageViewer/components/ImageModal.vue2.js +1 -1
- package/dist/components/InfiniteList/WInfiniteList.vue.d.ts.map +1 -1
- package/dist/components/InfiniteList/WInfiniteList.vue.js +20 -20
- package/dist/components/InfiniteList/WInfiniteListWrapper.vue.js +3 -3
- package/dist/components/InfiniteList/components/InfiniteListButton.vue.js +3 -3
- package/dist/components/InfiniteList/components/InfiniteListPage.vue.d.ts +16 -1
- package/dist/components/InfiniteList/components/InfiniteListPage.vue.d.ts.map +1 -1
- package/dist/components/InfiniteList/components/InfiniteListPage.vue.js +15 -15
- package/dist/components/InfiniteList/components/InfiniteListPageTitle.vue.js +2 -2
- package/dist/components/InfiniteList/components/InfiniteListPages.vue.d.ts.map +1 -1
- package/dist/components/InfiniteList/components/InfiniteListPages.vue.js +23 -23
- package/dist/components/InfoCard/WInfoCard.vue.js +5 -5
- package/dist/components/InfoCard/WInfoCardNegative.vue.js +2 -2
- package/dist/components/Input/WInput.vue.d.ts +15 -1
- package/dist/components/Input/WInput.vue.d.ts.map +1 -1
- package/dist/components/Input/WInput.vue.js +70 -80
- package/dist/components/Input/WInputAsync.vue.d.ts +2 -2
- package/dist/components/Input/WInputAsync.vue.js +16 -16
- package/dist/components/Input/WInputDate.vue.js +7 -7
- package/dist/components/Input/WInputOptions.vue.js +6 -6
- package/dist/components/Input/WInputSuggest.vue.d.ts +12 -1
- package/dist/components/Input/WInputSuggest.vue.d.ts.map +1 -1
- package/dist/components/Input/WInputSuggest.vue.js +18 -18
- package/dist/components/Input/WInputToolbarButton.vue.js +14 -14
- package/dist/components/Input/components/ContentEditable.vue2.js +1 -1
- package/dist/components/Input/components/InputActions.vue.js +12 -12
- package/dist/components/Input/components/InputActionsButton.vue.js +12 -12
- package/dist/components/Input/components/InputToolbar.vue2.js +7 -13
- package/dist/components/Input/components/InputToolbarButton.vue.js +11 -11
- package/dist/components/Link/WLink.vue.js +5 -5
- package/dist/components/Link/WLinkArrow.vue.js +2 -2
- package/dist/components/List/WList.vue.js +49 -49
- package/dist/components/List/WListCard.vue.d.ts.map +1 -1
- package/dist/components/List/WListCard.vue.js +57 -57
- package/dist/components/List/WListCardField.vue.js +3 -3
- package/dist/components/List/WListFilter.vue.js +8 -8
- package/dist/components/List/WListHeader.vue.js +7 -7
- package/dist/components/List/WListHeaderItem.vue.js +14 -14
- package/dist/components/List/components/HeaderFieldNested.vue.js +6 -6
- package/dist/components/List/components/HeaderSettings.vue.js +13 -13
- package/dist/components/List/components/HeaderSettingsList.vue.js +16 -16
- package/dist/components/List/components/HeaderSettingsModeButton.vue.js +5 -5
- package/dist/components/List/components/HeaderSort.vue.js +5 -5
- package/dist/components/List/components/HeaderSortItem.vue.js +5 -5
- package/dist/components/List/components/ListCardAction.vue.js +3 -3
- package/dist/components/List/components/ListCardFieldNested.vue.js +20 -20
- package/dist/components/List/components/ListCardFieldNestedItem.vue.js +2 -2
- package/dist/components/List/components/ListFilterGlobal.vue2.js +13 -13
- package/dist/components/List/components/ListFilterGlobalItem.vue.js +14 -14
- package/dist/components/List/components/ListFilterLocal.vue2.js +13 -14
- package/dist/components/List/components/ListFilterSearch.vue.js +2 -2
- package/dist/components/List/components/ListFilterSelect.vue.js +4 -4
- package/dist/components/MenuItem/WMenuItem.vue.js +12 -12
- package/dist/components/Modal/WModal.vue.js +1 -1
- package/dist/components/Modal/WModalExport.vue.js +4 -4
- package/dist/components/Modal/WModalExportSimple.vue.js +4 -4
- package/dist/components/Modal/WModalImport.vue.js +3 -3
- package/dist/components/Modal/WModalStepper.vue.d.ts.map +1 -1
- package/dist/components/Modal/WModalStepper.vue.js +20 -20
- package/dist/components/Modal/WModalWrapper.vue.d.ts.map +1 -1
- package/dist/components/Modal/WModalWrapper.vue.js +10 -10
- package/dist/components/Modal/modals/Confirm/ConfirmModal.vue2.js +22 -22
- package/dist/components/Nav/WNavBar.vue.js +2 -2
- package/dist/components/Nav/WNavItem.vue.js +14 -14
- package/dist/components/Nav/WNavItemExpand.vue.d.ts.map +1 -1
- package/dist/components/Nav/WNavItemExpand.vue.js +15 -15
- package/dist/components/Notify/components/NotifyCard.vue.js +11 -11
- package/dist/components/NumberFormatter/WNumberFormatter.vue.js +4 -4
- package/dist/components/Page/WPage.vue.js +17 -17
- package/dist/components/Page/WPageTitle.vue.js +3 -3
- package/dist/components/Progress/WProgress.vue.js +1 -1
- package/dist/components/Progress/WProgressStriped.vue.js +9 -9
- package/dist/components/RouterLink/WRouterLink.vue.js +1 -1
- package/dist/components/Select/WSelect.vue.js +25 -25
- package/dist/components/Select/WSelectAsync.vue.js +27 -27
- package/dist/components/Select/WSelectAsyncList.vue.js +12 -12
- package/dist/components/Select/WSelectAsyncSingle.vue.js +7 -7
- package/dist/components/Select/WSelectSingle.vue.js +6 -6
- package/dist/components/Select/WSelectStringified.vue.js +2 -2
- package/dist/components/Select/components/SelectAsyncList.vue.js +33 -33
- package/dist/components/Select/components/SelectAsyncPrefix.vue.js +17 -17
- package/dist/components/Select/components/SelectAsyncPrefixPage.vue.d.ts.map +1 -1
- package/dist/components/Select/components/SelectAsyncPrefixPage.vue.js +10 -10
- package/dist/components/Select/components/SelectOption.vue.d.ts +15 -1
- package/dist/components/Select/components/SelectOption.vue.d.ts.map +1 -1
- package/dist/components/Select/components/SelectOption.vue.js +10 -10
- package/dist/components/Select/components/SelectOptionPrefix.vue.js +14 -14
- package/dist/components/Shine/WShine.vue.js +1 -1
- package/dist/components/Shine/WShineEffect.vue.js +2 -2
- package/dist/components/Slider/WSlider.vue.js +6 -6
- package/dist/components/Slider/WSliderRange.vue.js +6 -6
- package/dist/components/Spinner/WSpinner.vue.js +2 -2
- package/dist/components/Status/WStatusIcon.vue.js +2 -2
- package/dist/components/Tabs/WTabs.vue.d.ts.map +1 -1
- package/dist/components/Tabs/WTabs.vue.js +22 -22
- package/dist/components/Tabs/components/TabItem.vue.d.ts.map +1 -1
- package/dist/components/Tabs/components/TabItem.vue.js +5 -5
- package/dist/components/Tabs/components/TabTitleButton.vue.js +14 -14
- package/dist/components/Toggle/WToggle.vue.js +17 -17
- package/dist/components/Toggle/WToggleTheme.vue.js +2 -2
- package/dist/components/Tooltip/WTooltip.vue.js +1 -1
- package/dist/components/Tooltip/WTooltipContainer.vue.d.ts.map +1 -1
- package/dist/components/Tooltip/WTooltipContainer.vue.js +2 -2
- package/dist/components/Tooltip/components/TooltipContainer.vue.js +11 -11
- package/dist/components/VirtualScroll/WVirtualScroll.vue.js +9 -9
- package/dist/components/VirtualScroll/components/VirtualScrollPage.vue.d.ts +1 -1
- package/dist/components/VirtualScroll/components/VirtualScrollPage.vue.js +3 -3
- package/dist/utils/useQueryUpdater.d.ts.map +1 -1
- package/package.json +10 -10
|
@@ -214,17 +214,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
214
214
|
const blur = () => inputRef.value?.blur();
|
|
215
215
|
const onPaste = async (e) => {
|
|
216
216
|
if (props.loading || isDisabled.value || isReadonly.value || props.unclickable) return;
|
|
217
|
-
|
|
218
|
-
if (!text) {
|
|
219
|
-
try {
|
|
220
|
-
await checkPermissionPaste();
|
|
221
|
-
text = await navigator.clipboard.readText();
|
|
222
|
-
} catch {
|
|
223
|
-
Notify.error({ title: "Clipboard API not available" });
|
|
224
|
-
return;
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
text = text.replace(/\r\n?/g, "\n");
|
|
217
|
+
const text = e.clipboardData?.getData("text/plain").replace(/\r\n?/g, "\n") ?? "";
|
|
228
218
|
if (!text) {
|
|
229
219
|
fieldWrapperRef.value?.showMessage("Nothing to paste");
|
|
230
220
|
return;
|
|
@@ -309,9 +299,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
309
299
|
return (_ctx, _cache) => {
|
|
310
300
|
return openBlock(), createBlock(_sfc_main$1, mergeProps({ ref: "fieldWrapper" }, props, {
|
|
311
301
|
class: [_ctx.$attrs.class, {
|
|
312
|
-
"group/seamless":
|
|
302
|
+
"group/seamless": __props.seamless
|
|
313
303
|
}],
|
|
314
|
-
onClick: _cache[9] || (_cache[9] = ($event) =>
|
|
304
|
+
onClick: _cache[9] || (_cache[9] = ($event) => __props.seamless && focus())
|
|
315
305
|
}), createSlots({ _: 2 }, [
|
|
316
306
|
_ctx.$slots.title ? {
|
|
317
307
|
name: "title",
|
|
@@ -320,7 +310,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
320
310
|
]),
|
|
321
311
|
key: "0"
|
|
322
312
|
} : void 0,
|
|
323
|
-
_ctx.$slots.subtitle &&
|
|
313
|
+
_ctx.$slots.subtitle && __props.unclickable !== false ? {
|
|
324
314
|
name: "subtitle",
|
|
325
315
|
fn: withCtx(() => [
|
|
326
316
|
renderSlot(_ctx.$slots, "subtitle")
|
|
@@ -332,25 +322,25 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
332
322
|
fn: withCtx(() => [
|
|
333
323
|
createElementVNode("div", {
|
|
334
324
|
class: normalizeClass(["flex max-w-full gap-1", {
|
|
335
|
-
"flex-wrap": !
|
|
336
|
-
"overflow-hidden":
|
|
337
|
-
"w-full":
|
|
325
|
+
"flex-wrap": !__props.seamless,
|
|
326
|
+
"overflow-hidden": __props.seamless,
|
|
327
|
+
"w-full": __props.textarea
|
|
338
328
|
}])
|
|
339
329
|
}, [
|
|
340
330
|
renderSlot(_ctx.$slots, "prefix"),
|
|
341
|
-
!
|
|
331
|
+
!__props.hideInput ? (openBlock(), createElementBlock("div", {
|
|
342
332
|
key: 0,
|
|
343
333
|
class: normalizeClass([{
|
|
344
|
-
"font-mono":
|
|
345
|
-
"text-secure":
|
|
346
|
-
"h-[--w-textarea-height,10rem] min-h-[--w-textarea-height,10rem] w-full overflow-auto overscroll-contain whitespace-pre":
|
|
347
|
-
"resize-y":
|
|
348
|
-
"resize-none": !
|
|
349
|
-
"border-b border-solid border-gray-300 dark:border-gray-700":
|
|
334
|
+
"font-mono": __props.mono,
|
|
335
|
+
"text-secure": __props.textSecure && !isSecureVisible.value && __props.modelValue,
|
|
336
|
+
"h-[--w-textarea-height,10rem] min-h-[--w-textarea-height,10rem] w-full overflow-auto overscroll-contain whitespace-pre": __props.textarea,
|
|
337
|
+
"resize-y": __props.resize && __props.textarea,
|
|
338
|
+
"resize-none": !__props.resize && __props.textarea,
|
|
339
|
+
"border-b border-solid border-gray-300 dark:border-gray-700": __props.textarea
|
|
350
340
|
}, "overflow-x-auto overscroll-x-contain"])
|
|
351
341
|
}, [
|
|
352
|
-
renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps({ modelValue:
|
|
353
|
-
createTextVNode(toDisplayString(
|
|
342
|
+
renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps({ modelValue: __props.modelValue }))),
|
|
343
|
+
createTextVNode(toDisplayString(__props.modelValue || __props.emptyValue), 1)
|
|
354
344
|
], 2)) : createCommentVNode("", true)
|
|
355
345
|
], 2)
|
|
356
346
|
]),
|
|
@@ -360,23 +350,23 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
360
350
|
fn: withCtx(({ id, setFocused, focused }) => [
|
|
361
351
|
createElementVNode("div", {
|
|
362
352
|
class: normalizeClass(["relative isolate grid min-h-[--w-input-min-height,var(--w-input-height,2.75rem)] grid-cols-[auto,1fr,auto] overflow-hidden rounded-[--w-input-rounded,0.75rem] border border-solid", {
|
|
363
|
-
"focus-within:border-primary dark:focus-within:border-primary-dark focus-within:outline-primary/20 dark:focus-within:outline-primary-dark/20 focus-within:outline focus-within:outline-2": !unref(isDisabled) && !unref(isReadonly) && !
|
|
353
|
+
"focus-within:border-primary dark:focus-within:border-primary-dark focus-within:outline-primary/20 dark:focus-within:outline-primary-dark/20 focus-within:outline focus-within:outline-2": !unref(isDisabled) && !unref(isReadonly) && !__props.unclickable,
|
|
364
354
|
"cursor-text": !unref(isDisabled),
|
|
365
|
-
"border-negative dark:border-negative-dark":
|
|
355
|
+
"border-negative dark:border-negative-dark": __props.errorMessage,
|
|
366
356
|
"border-gray-300 dark:border-gray-700": !unref(isDisabled),
|
|
367
357
|
"border-gray-300/50 dark:border-gray-700/50": unref(isDisabled),
|
|
368
|
-
"border-opacity-0 group-hover/seamless:border-opacity-100 dark:border-opacity-0 dark:group-hover/seamless:border-opacity-100":
|
|
369
|
-
"bg-[--w-input-bg,inherit]": !
|
|
358
|
+
"border-opacity-0 group-hover/seamless:border-opacity-100 dark:border-opacity-0 dark:group-hover/seamless:border-opacity-100": __props.seamless && !focused,
|
|
359
|
+
"bg-[--w-input-bg,inherit]": !__props.seamless || focused
|
|
370
360
|
}]),
|
|
371
361
|
onClick: focus
|
|
372
362
|
}, [
|
|
373
|
-
!unref(isDisabled) && !unref(isReadonly) &&
|
|
363
|
+
!unref(isDisabled) && !unref(isReadonly) && __props.textarea && (__props.rich || __props.toolbarActions || _ctx.$slots.toolbar) ? (openBlock(), createBlock(unref(InputToolbar), {
|
|
374
364
|
key: 0,
|
|
375
|
-
list:
|
|
376
|
-
rich:
|
|
365
|
+
list: __props.toolbarActions,
|
|
366
|
+
rich: __props.rich === true,
|
|
377
367
|
"is-undo": historyPosition.value > 0,
|
|
378
368
|
"is-redo": historyPosition.value < history.value.length - 1,
|
|
379
|
-
"text-secure":
|
|
369
|
+
"text-secure": __props.textSecure ?? false,
|
|
380
370
|
onWrapSelection: wrapSelection,
|
|
381
371
|
onUndo: undo,
|
|
382
372
|
onRedo: redo
|
|
@@ -386,71 +376,71 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
386
376
|
]),
|
|
387
377
|
_: 3
|
|
388
378
|
}, 8, ["list", "rich", "is-undo", "is-redo", "text-secure"])) : createCommentVNode("", true),
|
|
389
|
-
|
|
379
|
+
__props.icon ? (openBlock(), createElementBlock("div", {
|
|
390
380
|
key: 1,
|
|
391
381
|
class: normalizeClass(["flex h-full w-[--w-input-height,2.75rem] select-none items-center justify-center", {
|
|
392
382
|
"text-description": !focused,
|
|
393
383
|
"text-primary dark:text-primary-dark": focused
|
|
394
384
|
}])
|
|
395
385
|
}, [
|
|
396
|
-
(openBlock(), createBlock(resolveDynamicComponent(
|
|
386
|
+
(openBlock(), createBlock(resolveDynamicComponent(__props.icon), { class: "square-[1.125em]" }))
|
|
397
387
|
], 2)) : createCommentVNode("", true),
|
|
398
388
|
createElementVNode("div", {
|
|
399
389
|
ref: "content",
|
|
400
390
|
class: normalizeClass(["group/input col-start-2 grid grid-cols-1", {
|
|
401
391
|
"py-[--w-input-gap,0.25rem] first:pl-[--w-input-gap,0.25rem] last:pr-[--w-input-gap,0.25rem]": _ctx.$slots.prefix,
|
|
402
|
-
"no-scrollbar overflow-x-auto overscroll-x-contain":
|
|
403
|
-
"overflow-hidden":
|
|
392
|
+
"no-scrollbar overflow-x-auto overscroll-x-contain": __props.noWrap && !(__props.seamless && !focused),
|
|
393
|
+
"overflow-hidden": __props.seamless && !focused
|
|
404
394
|
}])
|
|
405
395
|
}, [
|
|
406
396
|
createElementVNode("div", {
|
|
407
397
|
class: normalizeClass(["w-skeleton-w-32 flex gap-[--w-input-gap,0.25rem]", {
|
|
408
|
-
"[&:not(:has(.w-option-has-bg))]:-px--w-option-padding": !
|
|
409
|
-
"flex-wrap": !
|
|
410
|
-
"w-full min-w-max": !
|
|
398
|
+
"[&:not(:has(.w-option-has-bg))]:-px--w-option-padding": !__props.icon && !__props.textarea,
|
|
399
|
+
"flex-wrap": !__props.noWrap && !__props.seamless,
|
|
400
|
+
"w-full min-w-max": !__props.textarea && __props.noWrap
|
|
411
401
|
}])
|
|
412
402
|
}, [
|
|
413
|
-
renderSlot(_ctx.$slots, "prefix", normalizeProps(guardReactiveProps({ modelValue:
|
|
403
|
+
renderSlot(_ctx.$slots, "prefix", normalizeProps(guardReactiveProps({ modelValue: __props.modelValue }))),
|
|
414
404
|
createElementVNode("div", {
|
|
415
405
|
class: normalizeClass(["flex-1 font-normal", {
|
|
416
|
-
"w-full": !
|
|
406
|
+
"w-full": !__props.hideInput && !_ctx.$slots.prefix,
|
|
417
407
|
"w-option-has-bg-input": _ctx.$slots.prefix,
|
|
418
|
-
"resize-y":
|
|
419
|
-
"resize-none": !
|
|
420
|
-
"h-[calc(var(--w-input-height,2.75rem)-2px)]": !
|
|
421
|
-
"w-option min-w-40": !
|
|
422
|
-
"font-mono":
|
|
408
|
+
"resize-y": __props.resize && __props.textarea,
|
|
409
|
+
"resize-none": !__props.resize && __props.textarea,
|
|
410
|
+
"h-[calc(var(--w-input-height,2.75rem)-2px)]": !__props.textarea && !_ctx.$slots.suffix,
|
|
411
|
+
"w-option min-w-40": !__props.textarea && _ctx.$slots.prefix && !__props.hideInput,
|
|
412
|
+
"font-mono": __props.mono,
|
|
423
413
|
"text-black-default dark:text-gray-200": !unref(isDisabled),
|
|
424
414
|
"text-black-default/50 dark:text-gray-200/50": unref(isDisabled),
|
|
425
|
-
"-p--w-option-padding h-[--w-textarea-height,10rem] min-h-[--w-textarea-height,10rem] w-full overflow-auto overscroll-contain":
|
|
426
|
-
"absolute":
|
|
415
|
+
"-p--w-option-padding h-[--w-textarea-height,10rem] min-h-[--w-textarea-height,10rem] w-full overflow-auto overscroll-contain": __props.textarea,
|
|
416
|
+
"absolute": __props.hideInput
|
|
427
417
|
}])
|
|
428
418
|
}, [
|
|
429
419
|
createElementVNode("div", _hoisted_1, [
|
|
430
|
-
renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps({ modelValue:
|
|
431
|
-
|
|
432
|
-
(openBlock(), createBlock(resolveDynamicComponent(
|
|
420
|
+
renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps({ modelValue: __props.modelValue }))),
|
|
421
|
+
__props.placeholder && __props.textarea && !__props.modelValue && !__props.textParts?.length ? (openBlock(), createElementBlock("div", _hoisted_2, toDisplayString(__props.placeholder), 1)) : createCommentVNode("", true),
|
|
422
|
+
(openBlock(), createBlock(resolveDynamicComponent(__props.textarea ? unref(ContentEditable) : "input"), {
|
|
433
423
|
id,
|
|
434
424
|
ref: "input",
|
|
435
425
|
class: normalizeClass(["w-input sm-not:text-base min-h-full flex-1 basis-auto appearance-none border-none bg-[inherit] outline-0 placeholder:text-gray-400 disabled:cursor-not-allowed dark:placeholder:text-gray-500", {
|
|
436
|
-
"w-0 max-w-0":
|
|
437
|
-
"text-secure":
|
|
438
|
-
"[-webkit-text-fill-color:transparent]":
|
|
426
|
+
"w-0 max-w-0": __props.hideInput,
|
|
427
|
+
"text-secure": __props.textSecure && !isSecureVisible.value,
|
|
428
|
+
"[-webkit-text-fill-color:transparent]": __props.textTransparent
|
|
439
429
|
}]),
|
|
440
|
-
value:
|
|
441
|
-
placeholder:
|
|
442
|
-
type:
|
|
443
|
-
name:
|
|
430
|
+
value: __props.placeholderSecure && __props.modelValue === void 0 && !focused ? "******" : __props.modelValue,
|
|
431
|
+
placeholder: __props.placeholder,
|
|
432
|
+
type: __props.type ?? "text",
|
|
433
|
+
name: __props.name,
|
|
444
434
|
disabled: unref(isDisabled),
|
|
445
|
-
readonly: unref(isReadonly) ||
|
|
446
|
-
autocomplete:
|
|
447
|
-
size:
|
|
448
|
-
step:
|
|
449
|
-
min:
|
|
450
|
-
max:
|
|
451
|
-
spellcheck:
|
|
452
|
-
"max-length":
|
|
453
|
-
"text-parts":
|
|
435
|
+
readonly: unref(isReadonly) || __props.unclickable,
|
|
436
|
+
autocomplete: __props.autocomplete,
|
|
437
|
+
size: __props.size || void 0,
|
|
438
|
+
step: __props.step,
|
|
439
|
+
min: __props.min,
|
|
440
|
+
max: __props.max,
|
|
441
|
+
spellcheck: __props.spellcheck ? "true" : "false",
|
|
442
|
+
"max-length": __props.maxLength,
|
|
443
|
+
"text-parts": __props.textParts,
|
|
454
444
|
onInput: handleInputEvent,
|
|
455
445
|
onKeypress: _cache[0] || (_cache[0] = withKeys(withModifiers(($event) => !unref(isDisabled) && !unref(isReadonly) && _ctx.$emit("keypress:enter", $event), ["exact"]), ["enter"])),
|
|
456
446
|
onKeydown: [
|
|
@@ -465,13 +455,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
465
455
|
onFocus: ($event) => {
|
|
466
456
|
_ctx.$emit("focus", $event);
|
|
467
457
|
setFocused(true);
|
|
468
|
-
|
|
458
|
+
__props.seamless && nextTick(scrollToInput);
|
|
469
459
|
},
|
|
470
460
|
onBlur: ($event) => {
|
|
471
461
|
_ctx.$emit("blur", $event);
|
|
472
462
|
setFocused(false);
|
|
473
463
|
isSecureVisible.value = false;
|
|
474
|
-
|
|
464
|
+
contentRef.value?.scrollTo({ left: 0 });
|
|
475
465
|
},
|
|
476
466
|
onClick: _cache[4] || (_cache[4] = ($event) => _ctx.$emit("click", $event)),
|
|
477
467
|
onMousedown: _cache[5] || (_cache[5] = withModifiers(($event) => _ctx.$emit("mousedown", $event), ["stop"])),
|
|
@@ -484,17 +474,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
484
474
|
], 2)
|
|
485
475
|
], 2)
|
|
486
476
|
], 2),
|
|
487
|
-
!
|
|
477
|
+
!__props.seamless || focused ? (openBlock(), createBlock(_sfc_main$2, {
|
|
488
478
|
key: 2,
|
|
489
|
-
"model-value":
|
|
490
|
-
loading:
|
|
491
|
-
"allow-clear":
|
|
492
|
-
disabled: unref(isDisabled) ||
|
|
493
|
-
readonly: unref(isReadonly) ||
|
|
494
|
-
"text-secure":
|
|
479
|
+
"model-value": __props.modelValue,
|
|
480
|
+
loading: __props.loading,
|
|
481
|
+
"allow-clear": __props.allowClear && __props.modelValue !== "",
|
|
482
|
+
disabled: unref(isDisabled) || __props.disabledActions,
|
|
483
|
+
readonly: unref(isReadonly) || __props.unclickable === true,
|
|
484
|
+
"text-secure": __props.textSecure,
|
|
495
485
|
"is-secure-visible": isSecureVisible.value,
|
|
496
|
-
"allow-paste":
|
|
497
|
-
"allow-copy":
|
|
486
|
+
"allow-paste": __props.allowPaste,
|
|
487
|
+
"allow-copy": __props.allowCopy,
|
|
498
488
|
focused,
|
|
499
489
|
"onClick:clear": clearValue,
|
|
500
490
|
"onShow:secure": _cache[7] || (_cache[7] = ($event) => {
|
|
@@ -10,10 +10,10 @@ declare const _default: <Type extends InputType = "text">(__VLS_props: NonNullab
|
|
|
10
10
|
subtitle?(_: {}): any;
|
|
11
11
|
right?(_: {}): any;
|
|
12
12
|
prefix?(_: {
|
|
13
|
-
modelValue: string | undefined;
|
|
13
|
+
modelValue: (Type extends "number" ? number : string) | undefined;
|
|
14
14
|
}): any;
|
|
15
15
|
before?(_: {
|
|
16
|
-
modelValue: string | undefined;
|
|
16
|
+
modelValue: (Type extends "number" ? number : string) | undefined;
|
|
17
17
|
}): any;
|
|
18
18
|
};
|
|
19
19
|
emit: (e: "update:model-value", value: (Type extends "number" ? number : string) | undefined) => void;
|
|
@@ -159,10 +159,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
159
159
|
return openBlock(), createBlock(_sfc_main$1, mergeProps({ ref: "input" }, {
|
|
160
160
|
...props,
|
|
161
161
|
modelValue: value.value,
|
|
162
|
-
disabledActions: !focused.value && !hasChangesValue.value ||
|
|
163
|
-
errorMessage: errorMessageValue.value ??
|
|
164
|
-
hasChanges:
|
|
165
|
-
allowClear: !
|
|
162
|
+
disabledActions: !focused.value && !hasChangesValue.value || __props.disabledActions,
|
|
163
|
+
errorMessage: errorMessageValue.value ?? __props.errorMessage,
|
|
164
|
+
hasChanges: __props.hasChanges || hasChangesValue.value,
|
|
165
|
+
allowClear: !__props.textarea || __props.allowClear,
|
|
166
166
|
loading: void 0
|
|
167
167
|
}, {
|
|
168
168
|
class: _ctx.$attrs.class,
|
|
@@ -211,42 +211,42 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
211
211
|
]),
|
|
212
212
|
key: "4"
|
|
213
213
|
} : void 0,
|
|
214
|
-
!
|
|
214
|
+
!__props.skeleton && __props.textSecure && focused.value ? {
|
|
215
215
|
name: "bottom",
|
|
216
216
|
fn: withCtx(() => [
|
|
217
217
|
createElementVNode("div", _hoisted_1, [
|
|
218
218
|
createVNode(_sfc_main$2, {
|
|
219
219
|
"semantic-type": unref(SemanticType).SECONDARY,
|
|
220
|
-
disabled:
|
|
220
|
+
disabled: __props.disabled || __props.loading,
|
|
221
221
|
class: "basis-32",
|
|
222
222
|
onMousedown: _cache[0] || (_cache[0] = withModifiers(() => {
|
|
223
223
|
}, ["prevent"])),
|
|
224
224
|
onClick: cancel
|
|
225
225
|
}, {
|
|
226
|
-
default: withCtx(() => _cache[5] || (_cache[5] = [
|
|
227
|
-
createTextVNode(" Cancel ")
|
|
228
|
-
])),
|
|
226
|
+
default: withCtx(() => [..._cache[5] || (_cache[5] = [
|
|
227
|
+
createTextVNode(" Cancel ", -1)
|
|
228
|
+
])]),
|
|
229
229
|
_: 1
|
|
230
230
|
}, 8, ["semantic-type", "disabled"]),
|
|
231
231
|
createVNode(_sfc_main$2, {
|
|
232
232
|
"semantic-type": unref(SemanticType).PRIMARY,
|
|
233
|
-
loading:
|
|
234
|
-
disabled:
|
|
233
|
+
loading: __props.loading,
|
|
234
|
+
disabled: __props.disabled,
|
|
235
235
|
class: "basis-32",
|
|
236
236
|
onMousedown: _cache[1] || (_cache[1] = withModifiers(() => {
|
|
237
237
|
}, ["prevent"])),
|
|
238
238
|
onClick: save
|
|
239
239
|
}, {
|
|
240
|
-
default: withCtx(() => _cache[6] || (_cache[6] = [
|
|
241
|
-
createTextVNode(" Save ")
|
|
242
|
-
])),
|
|
240
|
+
default: withCtx(() => [..._cache[6] || (_cache[6] = [
|
|
241
|
+
createTextVNode(" Save ", -1)
|
|
242
|
+
])]),
|
|
243
243
|
_: 1
|
|
244
244
|
}, 8, ["semantic-type", "loading", "disabled"])
|
|
245
245
|
])
|
|
246
246
|
]),
|
|
247
247
|
key: "5"
|
|
248
248
|
} : void 0,
|
|
249
|
-
|
|
249
|
+
__props.debounce && !__props.hideDebounce ? {
|
|
250
250
|
name: "inner",
|
|
251
251
|
fn: withCtx(() => [
|
|
252
252
|
createElementVNode("div", _hoisted_2, [
|
|
@@ -271,7 +271,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
271
271
|
timeout.value ? (openBlock(), createElementBlock("div", {
|
|
272
272
|
key: timeout.value.toString(),
|
|
273
273
|
class: "bg-primary dark:bg-primary-dark relative h-full rounded-sm",
|
|
274
|
-
style: normalizeStyle({ "--debounce-duration":
|
|
274
|
+
style: normalizeStyle({ "--debounce-duration": __props.debounce + "ms" })
|
|
275
275
|
}, null, 4)) : createCommentVNode("", true)
|
|
276
276
|
]),
|
|
277
277
|
_: 1
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, useTemplateRef, ref, watch, createBlock, openBlock, mergeProps,
|
|
1
|
+
import { defineComponent, useTemplateRef, ref, watch, createBlock, openBlock, mergeProps, createSlots, withCtx, createElementVNode, withModifiers, createVNode, renderSlot } from 'vue';
|
|
2
2
|
import _sfc_main$2 from '../DatePicker/WDatePickerSingle.vue.js';
|
|
3
3
|
import _sfc_main$1 from './WInputSuggest.vue.js';
|
|
4
4
|
import { HorizontalAlign } from '../../utils/HorizontalAlign.js';
|
|
@@ -103,8 +103,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
103
103
|
}, {
|
|
104
104
|
class: _ctx.$attrs.class,
|
|
105
105
|
"onUpdate:modelValue": updateInputValue,
|
|
106
|
-
onClose: _cache[2] || (_cache[2] = ($event) => formatModelValue(
|
|
107
|
-
"onKeypress:enter": _cache[3] || (_cache[3] = ($event) =>
|
|
106
|
+
onClose: _cache[2] || (_cache[2] = ($event) => formatModelValue(__props.modelValue)),
|
|
107
|
+
"onKeypress:enter": _cache[3] || (_cache[3] = ($event) => inputComponentRef.value?.blur())
|
|
108
108
|
}), createSlots({
|
|
109
109
|
content: withCtx(() => [
|
|
110
110
|
createElementVNode("div", {
|
|
@@ -113,10 +113,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
113
113
|
}, ["prevent"]))
|
|
114
114
|
}, [
|
|
115
115
|
createVNode(_sfc_main$2, {
|
|
116
|
-
"model-value":
|
|
117
|
-
title:
|
|
118
|
-
"min-date":
|
|
119
|
-
"max-date":
|
|
116
|
+
"model-value": __props.modelValue,
|
|
117
|
+
title: __props.title,
|
|
118
|
+
"min-date": __props.minDate,
|
|
119
|
+
"max-date": __props.maxDate,
|
|
120
120
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => {
|
|
121
121
|
_ctx.$emit("update:model-value", $event);
|
|
122
122
|
formatModelValue($event);
|
|
@@ -158,15 +158,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
158
158
|
onBlur: _cache[2] || (_cache[2] = ($event) => focused.value = false)
|
|
159
159
|
}), createSlots({
|
|
160
160
|
content: withCtx(() => [
|
|
161
|
-
!
|
|
162
|
-
createElementVNode("div", _hoisted_2, toDisplayString(
|
|
161
|
+
!__props.options.length ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
162
|
+
createElementVNode("div", _hoisted_2, toDisplayString(__props.emptyStub ?? "No suggestion"), 1)
|
|
163
163
|
])) : createCommentVNode("", true),
|
|
164
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(
|
|
164
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.options, (option, index) => {
|
|
165
165
|
return openBlock(), createBlock(_sfc_main$2, {
|
|
166
166
|
key: option.id,
|
|
167
|
-
"is-selected":
|
|
167
|
+
"is-selected": __props.modelValue === __props.valueGetter(option),
|
|
168
168
|
"is-cursor": index === cursor.value,
|
|
169
|
-
loading: loadingOptionIndex.value === index &&
|
|
169
|
+
loading: loadingOptionIndex.value === index && __props.loading,
|
|
170
170
|
scroll: isCursorLocked.value,
|
|
171
171
|
class: "first:pt-4 last:pb-4",
|
|
172
172
|
onSelect: ($event) => {
|
|
@@ -181,7 +181,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
181
181
|
selected,
|
|
182
182
|
model: false
|
|
183
183
|
}, () => [
|
|
184
|
-
(openBlock(), createBlock(resolveDynamicComponent(
|
|
184
|
+
(openBlock(), createBlock(resolveDynamicComponent(__props.optionComponent), {
|
|
185
185
|
option,
|
|
186
186
|
selected,
|
|
187
187
|
model: false
|
|
@@ -1,7 +1,18 @@
|
|
|
1
1
|
import { InputSuggestProps, WrapSelection } from './types';
|
|
2
2
|
import { VNode } from 'vue';
|
|
3
3
|
declare const _default: <Type extends InputType = "text">(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
4
|
-
props: __VLS_PrettifyLocal<
|
|
4
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
5
|
+
readonly onClose?: (() => any) | undefined;
|
|
6
|
+
readonly onBlur?: ((value: FocusEvent) => any) | undefined;
|
|
7
|
+
readonly onFocus?: ((value: FocusEvent | undefined) => any) | undefined;
|
|
8
|
+
readonly onOpen?: (() => any) | undefined;
|
|
9
|
+
readonly "onUpdate:model-value"?: ((event: Type extends "number" ? number : string) => any) | undefined;
|
|
10
|
+
readonly "onClick:clear"?: (() => any) | undefined;
|
|
11
|
+
readonly "onKeypress:enter"?: ((event: KeyboardEvent) => any) | undefined;
|
|
12
|
+
readonly "onKeypress:up"?: ((event: KeyboardEvent) => any) | undefined;
|
|
13
|
+
readonly "onKeypress:down"?: ((event: KeyboardEvent) => any) | undefined;
|
|
14
|
+
readonly "onKeypress:delete"?: ((event: KeyboardEvent) => any) | undefined;
|
|
15
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onFocus" | "onBlur" | "onClose" | "onUpdate:model-value" | "onClick:clear" | "onKeypress:enter" | "onKeypress:up" | "onKeypress:down" | "onKeypress:delete" | "onOpen"> & InputSuggestProps<Type> & Partial<{}>> & import('vue').PublicProps;
|
|
5
16
|
expose(exposed: import('vue').ShallowUnwrapRef<{
|
|
6
17
|
focus: () => void;
|
|
7
18
|
blur: () => void | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WInputSuggest.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Input/WInputSuggest.vue"],"names":[],"mappings":"AAwIA;AAsPA,OAAO,KAAK,EAAC,iBAAiB,EAAE,aAAa,EAAC,MAAM,SAAS,CAAA;AAE7D,OAAO,EAAC,KAAK,KAAK,EAAgC,MAAM,KAAK,CAAA;yBAgB5C,IAAI,SAAS,SAAS,GAAG,MAAM,EAC/C,aAAa,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,EAC9D,YAAY,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,EAC3G,eAAe,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,EACjE;WA2bO,mBAAmB,CAAC,
|
|
1
|
+
{"version":3,"file":"WInputSuggest.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Input/WInputSuggest.vue"],"names":[],"mappings":"AAwIA;AAsPA,OAAO,KAAK,EAAC,iBAAiB,EAAE,aAAa,EAAC,MAAM,SAAS,CAAA;AAE7D,OAAO,EAAC,KAAK,KAAK,EAAgC,MAAM,KAAK,CAAA;yBAgB5C,IAAI,SAAS,SAAS,GAAG,MAAM,EAC/C,aAAa,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,EAC9D,YAAY,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,EAC3G,eAAe,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,EACjE;WA2bO,mBAAmB,CAAC;;;;;;;;;;;qUAAkE,CAAC,4BAA2B;oBACzG,OAAO,KAAK,EAAE,gBAAgB;;;;;;+BA5XjB,aAAa;+BACb,MAAM,aAAa,MAAM;;MA2Xc,GAAG,IAAI;WACpE,GAAG;;gBAjWD,MAAM,IAAI;iBACT,MAAM,IAAI;mBACR,MAAM,IAAI;kBACX,MAAM,IAAI;iBACX,CAAC,KAAK,EAAE;YAAC,WAAW,CAAC,EAAE,OAAO,GAAG,IAAI,CAAA;SAAC,KAAK,IAAI;gBAChD,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,KAAK,IAAI;kBACpC,CAAC,KAAK,EAAE;YAAC,OAAO,EAAE,OAAO,CAAC;YAAC,IAAI,EAAE,MAAM,IAAI,CAAC;YAAC,KAAK,EAAE,MAAM,IAAI,CAAA;SAAC,KAAK,KAAK,EAAE;;gBAN7E,MAAM,IAAI;iBACT,MAAM,IAAI;mBACR,MAAM,IAAI;kBACX,MAAM,IAAI;iBACX,CAAC,KAAK,EAAE;YAAC,WAAW,CAAC,EAAE,OAAO,GAAG,IAAI,CAAA;SAAC,KAAK,IAAI;gBAChD,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,KAAK,IAAI;kBACpC,CAAC,KAAK,EAAE;YAAC,OAAO,EAAE,OAAO,CAAC;YAAC,IAAI,EAAE,MAAM,IAAI,CAAC;YAAC,KAAK,EAAE,MAAM,IAAI,CAAA;SAAC,KAAK,KAAK,EAAE;;;YA/EjF,oBAAoB,mDAAsB,IAAI;YAC9C,gBAAgB,SAAS,aAAa,GAAG,IAAI;YAC7C,aAAa,SAAS,aAAa,GAAG,IAAI;YAC1C,eAAe,SAAS,aAAa,GAAG,IAAI;YAC5C,iBAAiB,SAAS,aAAa,GAAG,IAAI;YAC9C,MAAM,GAAG,IAAI;YACb,OAAO,GAAG,IAAI;YACd,aAAa,GAAG,IAAI;YACpB,OAAO,SAAS,UAAU,GAAG,SAAS,GAAG,IAAI;YAC7C,MAAM,SAAS,UAAU,GAAG,IAAI;;EAqalC,KACQ,OAAO,KAAK,EAAE,KAAK,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC,OAAO,WAAW,CAAC,CAAA;CAAE;AAtczE,wBAsc4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
|
|
@@ -115,32 +115,32 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
115
115
|
getCaret
|
|
116
116
|
});
|
|
117
117
|
return (_ctx, _cache) => {
|
|
118
|
-
return openBlock(), createBlock(resolveDynamicComponent(
|
|
118
|
+
return openBlock(), createBlock(resolveDynamicComponent(__props.static ? InputSuggestStatic : unref(isMobile) ? _sfc_main$1 : _sfc_main$2), mergeProps({ ref: "dropdownMenu" }, __props.static ? void 0 : unref(isMobile) ? {
|
|
119
119
|
isOpen: isOpen.value,
|
|
120
120
|
onClose: close
|
|
121
121
|
} : {
|
|
122
122
|
isOpen: isOpen.value,
|
|
123
|
-
horizontalAlign:
|
|
123
|
+
horizontalAlign: __props.horizontalAlign,
|
|
124
124
|
updateAlign: true,
|
|
125
|
-
parentElement:
|
|
126
|
-
dropdownClass:
|
|
125
|
+
parentElement: inputRef.value?.fieldRef,
|
|
126
|
+
dropdownClass: __props.dropdownClass
|
|
127
127
|
}), createSlots({
|
|
128
128
|
toggle: withCtx((toggleScope) => [
|
|
129
129
|
createVNode(_sfc_main$3, mergeProps({ ref: "input" }, {
|
|
130
130
|
...props,
|
|
131
131
|
..._ctx.$attrs,
|
|
132
|
-
title: toggleScope?.unclickable === false ?
|
|
132
|
+
title: toggleScope?.unclickable === false ? __props.mobileTitle ?? __props.title : __props.title,
|
|
133
133
|
unclickable: toggleScope?.unclickable,
|
|
134
|
-
description: toggleScope?.unclickable === false ? void 0 :
|
|
134
|
+
description: toggleScope?.unclickable === false ? void 0 : __props.description,
|
|
135
135
|
seamless: toggleScope?.unclickable === false ? false : props.seamless,
|
|
136
|
-
topText:
|
|
136
|
+
topText: __props.topText || isOpen.value && !toggleScope?.isTop
|
|
137
137
|
}, {
|
|
138
138
|
class: {
|
|
139
139
|
"cursor-pointer": !unref(isDisabled) && !unref(isReadonly),
|
|
140
140
|
"cursor-not-allowed": unref(isDisabled) && !unref(isReadonly),
|
|
141
141
|
"mb-3": unref(isMobile) && !toggleScope?.unclickable
|
|
142
142
|
},
|
|
143
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => !
|
|
143
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => !__props.loading && _ctx.$emit("update:model-value", $event)),
|
|
144
144
|
"onKeypress:enter": _cache[1] || (_cache[1] = ($event) => _ctx.$emit("keypress:enter", $event)),
|
|
145
145
|
"onKeypress:up": _cache[2] || (_cache[2] = ($event) => _ctx.$emit("keypress:up", $event)),
|
|
146
146
|
"onKeypress:down": _cache[3] || (_cache[3] = ($event) => _ctx.$emit("keypress:down", $event)),
|
|
@@ -151,14 +151,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
151
151
|
focused.value = true;
|
|
152
152
|
},
|
|
153
153
|
onBlur: ($event) => {
|
|
154
|
-
!unref(isMobile) && !
|
|
154
|
+
!unref(isMobile) && !__props.persist && close();
|
|
155
155
|
!toggleScope?.unclickable && _ctx.$emit("blur", $event);
|
|
156
156
|
focused.value = false;
|
|
157
157
|
},
|
|
158
158
|
onClick: ($event) => unref(isMobile) && toggleScope?.unclickable && open(),
|
|
159
159
|
"onClick:clear": _cache[5] || (_cache[5] = ($event) => {
|
|
160
160
|
_ctx.$emit("click:clear");
|
|
161
|
-
|
|
161
|
+
__props.closeOnClear && close();
|
|
162
162
|
})
|
|
163
163
|
}), createSlots({
|
|
164
164
|
prefix: withCtx(() => [
|
|
@@ -178,8 +178,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
178
178
|
class: normalizeClass(["square-3 text-description transition-transform", { "rotate-180": isOpen.value }])
|
|
179
179
|
}, null, 8, ["class"])
|
|
180
180
|
]),
|
|
181
|
-
_:
|
|
182
|
-
},
|
|
181
|
+
_: 1
|
|
182
|
+
}, 8, ["expanded", "onClick"])) : createCommentVNode("", true)
|
|
183
183
|
]),
|
|
184
184
|
_: 2
|
|
185
185
|
}, [
|
|
@@ -204,10 +204,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
204
204
|
]),
|
|
205
205
|
key: "2"
|
|
206
206
|
} : void 0,
|
|
207
|
-
_ctx.$slots.bottom ||
|
|
207
|
+
_ctx.$slots.bottom || __props.static && _ctx.$slots.content ? {
|
|
208
208
|
name: "bottom",
|
|
209
209
|
fn: withCtx(() => [
|
|
210
|
-
|
|
210
|
+
__props.static ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
211
211
|
_cache[6] || (_cache[6] = createElementVNode("div", { class: "pb-4" }, null, -1)),
|
|
212
212
|
renderSlot(_ctx.$slots, "content", normalizeProps(guardReactiveProps({ focused: focused.value, focus, blur })))
|
|
213
213
|
], 64)) : createCommentVNode("", true),
|
|
@@ -226,7 +226,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
226
226
|
]),
|
|
227
227
|
_: 2
|
|
228
228
|
}, [
|
|
229
|
-
!
|
|
229
|
+
!__props.static ? {
|
|
230
230
|
name: "content",
|
|
231
231
|
fn: withCtx((contentScope) => [
|
|
232
232
|
createVNode(_sfc_main$5, {
|
|
@@ -234,14 +234,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
234
234
|
class: normalizeClass(["bg-default dark:bg-default-dark w-full", {
|
|
235
235
|
"pb-[50vh]": unref(isMobile),
|
|
236
236
|
"max-h-[inherit] overflow-auto overscroll-contain rounded-xl shadow-md dark:border dark:border-solid dark:border-gray-800": !unref(isMobile),
|
|
237
|
-
"mt-5": "isTop" in contentScope && contentScope.isTop === false && (
|
|
237
|
+
"mt-5": "isTop" in contentScope && contentScope.isTop === false && (__props.errorMessage || __props.maxLength)
|
|
238
238
|
}])
|
|
239
239
|
}, {
|
|
240
240
|
default: withCtx(() => [
|
|
241
241
|
_ctx.$slots.content ? renderSlot(_ctx.$slots, "content", normalizeProps(mergeProps({ key: 0 }, { focused: focused.value, focus, blur }))) : createCommentVNode("", true)
|
|
242
242
|
]),
|
|
243
|
-
_:
|
|
244
|
-
},
|
|
243
|
+
_: 3
|
|
244
|
+
}, 8, ["parent", "class"])
|
|
245
245
|
]),
|
|
246
246
|
key: "0"
|
|
247
247
|
} : void 0
|
|
@@ -35,20 +35,20 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
35
35
|
}, 500);
|
|
36
36
|
};
|
|
37
37
|
return (_ctx, _cache) => {
|
|
38
|
-
return Array.isArray(
|
|
38
|
+
return Array.isArray(__props.value) ? (openBlock(), createBlock(_sfc_main$1, {
|
|
39
39
|
key: 0,
|
|
40
|
-
"is-open": !
|
|
40
|
+
"is-open": !__props.disabled && isOpen.value,
|
|
41
41
|
"horizontal-align": unref(HorizontalAlign).CENTER,
|
|
42
42
|
top: ""
|
|
43
43
|
}, {
|
|
44
44
|
toggle: withCtx(() => [
|
|
45
45
|
createVNode(_sfc_main$2, {
|
|
46
|
-
title:
|
|
47
|
-
icon:
|
|
48
|
-
tooltip:
|
|
49
|
-
disabled:
|
|
46
|
+
title: __props.title,
|
|
47
|
+
icon: __props.icon,
|
|
48
|
+
tooltip: __props.tooltip,
|
|
49
|
+
disabled: __props.disabled,
|
|
50
50
|
active: isOpen.value,
|
|
51
|
-
label:
|
|
51
|
+
label: __props.label,
|
|
52
52
|
onMouseenter: enter,
|
|
53
53
|
onMouseleave: leave
|
|
54
54
|
}, null, 8, ["title", "icon", "tooltip", "disabled", "active", "label"])
|
|
@@ -61,12 +61,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
61
61
|
onMousedown: _cache[0] || (_cache[0] = withModifiers(() => {
|
|
62
62
|
}, ["prevent"]))
|
|
63
63
|
}, [
|
|
64
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(
|
|
64
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.value, (item, index) => {
|
|
65
65
|
return openBlock(), createBlock(_sfc_main$2, {
|
|
66
66
|
key: index,
|
|
67
67
|
icon: item.icon,
|
|
68
68
|
title: item.title,
|
|
69
|
-
disabled:
|
|
69
|
+
disabled: __props.disabled,
|
|
70
70
|
tooltip: void 0,
|
|
71
71
|
label: item.label,
|
|
72
72
|
onClick: ($event) => _ctx.$emit("click", index)
|
|
@@ -77,11 +77,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
77
77
|
_: 1
|
|
78
78
|
}, 8, ["is-open", "horizontal-align"])) : (openBlock(), createBlock(_sfc_main$2, {
|
|
79
79
|
key: 1,
|
|
80
|
-
title:
|
|
81
|
-
icon:
|
|
82
|
-
tooltip:
|
|
83
|
-
disabled:
|
|
84
|
-
label:
|
|
80
|
+
title: __props.title,
|
|
81
|
+
icon: __props.icon,
|
|
82
|
+
tooltip: __props.tooltip,
|
|
83
|
+
disabled: __props.disabled,
|
|
84
|
+
label: __props.label,
|
|
85
85
|
onClick: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("click", void 0))
|
|
86
86
|
}, null, 8, ["title", "icon", "tooltip", "disabled", "label"]));
|
|
87
87
|
};
|