@vuetify/nightly 3.7.4-master.2024-11-14 → 3.7.4-master.2024-11-15
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/json/attributes.json +2878 -2878
- package/dist/json/importMap-labs.json +8 -8
- package/dist/json/importMap.json +156 -156
- package/dist/json/web-types.json +5425 -5425
- package/dist/vuetify-labs.css +2707 -2707
- package/dist/vuetify-labs.esm.js +7 -5
- package/dist/vuetify-labs.esm.js.map +1 -1
- package/dist/vuetify-labs.js +7 -5
- package/dist/vuetify-labs.min.css +2 -2
- package/dist/vuetify.css +992 -992
- package/dist/vuetify.d.ts +49 -49
- package/dist/vuetify.esm.js +3 -3
- package/dist/vuetify.js +3 -3
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +3 -3
- package/lib/entry-bundler.mjs +1 -1
- package/lib/framework.mjs +1 -1
- package/lib/index.d.mts +49 -49
- package/lib/labs/VNumberInput/VNumberInput.mjs +4 -2
- package/lib/labs/VNumberInput/VNumberInput.mjs.map +1 -1
- package/package.json +1 -1
package/dist/vuetify.min.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* Vuetify v3.7.4-master.2024-11-
|
2
|
+
* Vuetify v3.7.4-master.2024-11-15
|
3
3
|
* Forged by John Leider
|
4
4
|
* Released under the MIT License.
|
5
5
|
*/
|
@@ -2099,8 +2099,8 @@ if(d.install(e),e.provide(xt,u),e.provide(yn,c),e.provide(wa,d),e.provide(Lt,v),
|
|
2099
2099
|
else{const{mount:a}=e
|
2100
2100
|
e.mount=function(){const l=a(...arguments)
|
2101
2101
|
return t.nextTick((()=>c.update())),e.mount=a,l}}kt.reset(),("boolean"!=typeof __VUE_OPTIONS_API__||__VUE_OPTIONS_API__)&&e.mixin({computed:{$vuetify(){return t.reactive({defaults:uf.call(this,xt),display:uf.call(this,yn),theme:uf.call(this,wa),icons:uf.call(this,Lt),locale:uf.call(this,ga),date:uf.call(this,gu)})}}})},defaults:u,display:c,theme:d,icons:v,locale:p,date:f,goTo:m}}function uf(e){const t=this.$,a=t.parent?.provides??t.vnode.appContext?.provides
|
2102
|
-
if(a&&e in a)return a[e]}sf.version="3.7.4-master.2024-11-
|
2103
|
-
const cf=function(){return sf({components:Qp,directives:rf,...arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}})},df="3.7.4-master.2024-11-
|
2102
|
+
if(a&&e in a)return a[e]}sf.version="3.7.4-master.2024-11-15"
|
2103
|
+
const cf=function(){return sf({components:Qp,directives:rf,...arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}})},df="3.7.4-master.2024-11-15"
|
2104
2104
|
cf.version=df,e.blueprints=Qt,e.components=Qp,e.createVuetify=cf,e.directives=rf,e.useDate=yu,e.useDefaults=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0
|
2105
2105
|
const{props:a,provideSubDefaults:l}=_t(e,t)
|
2106
2106
|
return l(),a},e.useDisplay=Nn,e.useGoTo=Bn,e.useLayout=oa,e.useLocale=ya,e.useRtl=Va,e.useTheme=Na,e.version=df}))
|
package/lib/entry-bundler.mjs
CHANGED
@@ -16,7 +16,7 @@ export const createVuetify = function () {
|
|
16
16
|
...options
|
17
17
|
});
|
18
18
|
};
|
19
|
-
export const version = "3.7.4-master.2024-11-
|
19
|
+
export const version = "3.7.4-master.2024-11-15";
|
20
20
|
createVuetify.version = version;
|
21
21
|
export { blueprints, components, directives };
|
22
22
|
export * from "./composables/index.mjs";
|
package/lib/framework.mjs
CHANGED
package/lib/index.d.mts
CHANGED
@@ -486,37 +486,39 @@ declare module 'vue' {
|
|
486
486
|
$children?: VNodeChild
|
487
487
|
}
|
488
488
|
export interface GlobalComponents {
|
489
|
+
VApp: typeof import('vuetify/components')['VApp']
|
489
490
|
VAppBar: typeof import('vuetify/components')['VAppBar']
|
490
491
|
VAppBarNavIcon: typeof import('vuetify/components')['VAppBarNavIcon']
|
491
492
|
VAppBarTitle: typeof import('vuetify/components')['VAppBarTitle']
|
492
|
-
VApp: typeof import('vuetify/components')['VApp']
|
493
493
|
VAlert: typeof import('vuetify/components')['VAlert']
|
494
494
|
VAlertTitle: typeof import('vuetify/components')['VAlertTitle']
|
495
|
-
VAvatar: typeof import('vuetify/components')['VAvatar']
|
496
|
-
VBadge: typeof import('vuetify/components')['VBadge']
|
497
495
|
VAutocomplete: typeof import('vuetify/components')['VAutocomplete']
|
496
|
+
VBanner: typeof import('vuetify/components')['VBanner']
|
497
|
+
VBannerActions: typeof import('vuetify/components')['VBannerActions']
|
498
|
+
VBannerText: typeof import('vuetify/components')['VBannerText']
|
498
499
|
VBottomNavigation: typeof import('vuetify/components')['VBottomNavigation']
|
500
|
+
VAvatar: typeof import('vuetify/components')['VAvatar']
|
499
501
|
VBottomSheet: typeof import('vuetify/components')['VBottomSheet']
|
502
|
+
VBadge: typeof import('vuetify/components')['VBadge']
|
500
503
|
VBreadcrumbs: typeof import('vuetify/components')['VBreadcrumbs']
|
501
504
|
VBreadcrumbsItem: typeof import('vuetify/components')['VBreadcrumbsItem']
|
502
505
|
VBreadcrumbsDivider: typeof import('vuetify/components')['VBreadcrumbsDivider']
|
503
506
|
VBtn: typeof import('vuetify/components')['VBtn']
|
504
507
|
VBtnGroup: typeof import('vuetify/components')['VBtnGroup']
|
505
|
-
VCarousel: typeof import('vuetify/components')['VCarousel']
|
506
|
-
VCarouselItem: typeof import('vuetify/components')['VCarouselItem']
|
507
508
|
VBtnToggle: typeof import('vuetify/components')['VBtnToggle']
|
509
|
+
VChip: typeof import('vuetify/components')['VChip']
|
510
|
+
VChipGroup: typeof import('vuetify/components')['VChipGroup']
|
508
511
|
VCard: typeof import('vuetify/components')['VCard']
|
509
512
|
VCardActions: typeof import('vuetify/components')['VCardActions']
|
510
513
|
VCardItem: typeof import('vuetify/components')['VCardItem']
|
511
514
|
VCardSubtitle: typeof import('vuetify/components')['VCardSubtitle']
|
512
515
|
VCardText: typeof import('vuetify/components')['VCardText']
|
513
516
|
VCardTitle: typeof import('vuetify/components')['VCardTitle']
|
514
|
-
|
515
|
-
|
516
|
-
VCheckboxBtn: typeof import('vuetify/components')['VCheckboxBtn']
|
517
|
-
VChip: typeof import('vuetify/components')['VChip']
|
517
|
+
VCarousel: typeof import('vuetify/components')['VCarousel']
|
518
|
+
VCarouselItem: typeof import('vuetify/components')['VCarouselItem']
|
518
519
|
VCode: typeof import('vuetify/components')['VCode']
|
519
520
|
VCombobox: typeof import('vuetify/components')['VCombobox']
|
521
|
+
VCounter: typeof import('vuetify/components')['VCounter']
|
520
522
|
VDataTable: typeof import('vuetify/components')['VDataTable']
|
521
523
|
VDataTableHeaders: typeof import('vuetify/components')['VDataTableHeaders']
|
522
524
|
VDataTableFooter: typeof import('vuetify/components')['VDataTableFooter']
|
@@ -524,28 +526,19 @@ declare module 'vue' {
|
|
524
526
|
VDataTableRow: typeof import('vuetify/components')['VDataTableRow']
|
525
527
|
VDataTableVirtual: typeof import('vuetify/components')['VDataTableVirtual']
|
526
528
|
VDataTableServer: typeof import('vuetify/components')['VDataTableServer']
|
527
|
-
VColorPicker: typeof import('vuetify/components')['VColorPicker']
|
528
|
-
VBanner: typeof import('vuetify/components')['VBanner']
|
529
|
-
VBannerActions: typeof import('vuetify/components')['VBannerActions']
|
530
|
-
VBannerText: typeof import('vuetify/components')['VBannerText']
|
531
529
|
VDatePicker: typeof import('vuetify/components')['VDatePicker']
|
532
530
|
VDatePickerControls: typeof import('vuetify/components')['VDatePickerControls']
|
533
531
|
VDatePickerHeader: typeof import('vuetify/components')['VDatePickerHeader']
|
534
532
|
VDatePickerMonth: typeof import('vuetify/components')['VDatePickerMonth']
|
535
533
|
VDatePickerMonths: typeof import('vuetify/components')['VDatePickerMonths']
|
536
534
|
VDatePickerYears: typeof import('vuetify/components')['VDatePickerYears']
|
537
|
-
|
535
|
+
VEmptyState: typeof import('vuetify/components')['VEmptyState']
|
538
536
|
VDialog: typeof import('vuetify/components')['VDialog']
|
539
537
|
VDivider: typeof import('vuetify/components')['VDivider']
|
540
|
-
VEmptyState: typeof import('vuetify/components')['VEmptyState']
|
541
538
|
VFab: typeof import('vuetify/components')['VFab']
|
542
|
-
VExpansionPanels: typeof import('vuetify/components')['VExpansionPanels']
|
543
|
-
VExpansionPanel: typeof import('vuetify/components')['VExpansionPanel']
|
544
|
-
VExpansionPanelText: typeof import('vuetify/components')['VExpansionPanelText']
|
545
|
-
VExpansionPanelTitle: typeof import('vuetify/components')['VExpansionPanelTitle']
|
546
|
-
VFileInput: typeof import('vuetify/components')['VFileInput']
|
547
539
|
VField: typeof import('vuetify/components')['VField']
|
548
540
|
VFieldLabel: typeof import('vuetify/components')['VFieldLabel']
|
541
|
+
VFileInput: typeof import('vuetify/components')['VFileInput']
|
549
542
|
VFooter: typeof import('vuetify/components')['VFooter']
|
550
543
|
VImg: typeof import('vuetify/components')['VImg']
|
551
544
|
VIcon: typeof import('vuetify/components')['VIcon']
|
@@ -553,12 +546,18 @@ declare module 'vue' {
|
|
553
546
|
VSvgIcon: typeof import('vuetify/components')['VSvgIcon']
|
554
547
|
VLigatureIcon: typeof import('vuetify/components')['VLigatureIcon']
|
555
548
|
VClassIcon: typeof import('vuetify/components')['VClassIcon']
|
549
|
+
VInput: typeof import('vuetify/components')['VInput']
|
556
550
|
VItemGroup: typeof import('vuetify/components')['VItemGroup']
|
557
551
|
VItem: typeof import('vuetify/components')['VItem']
|
558
552
|
VInfiniteScroll: typeof import('vuetify/components')['VInfiniteScroll']
|
559
|
-
VInput: typeof import('vuetify/components')['VInput']
|
560
553
|
VKbd: typeof import('vuetify/components')['VKbd']
|
554
|
+
VMain: typeof import('vuetify/components')['VMain']
|
561
555
|
VLabel: typeof import('vuetify/components')['VLabel']
|
556
|
+
VMenu: typeof import('vuetify/components')['VMenu']
|
557
|
+
VPagination: typeof import('vuetify/components')['VPagination']
|
558
|
+
VOtpInput: typeof import('vuetify/components')['VOtpInput']
|
559
|
+
VNavigationDrawer: typeof import('vuetify/components')['VNavigationDrawer']
|
560
|
+
VProgressLinear: typeof import('vuetify/components')['VProgressLinear']
|
562
561
|
VList: typeof import('vuetify/components')['VList']
|
563
562
|
VListGroup: typeof import('vuetify/components')['VListGroup']
|
564
563
|
VListImg: typeof import('vuetify/components')['VListImg']
|
@@ -568,25 +567,22 @@ declare module 'vue' {
|
|
568
567
|
VListItemSubtitle: typeof import('vuetify/components')['VListItemSubtitle']
|
569
568
|
VListItemTitle: typeof import('vuetify/components')['VListItemTitle']
|
570
569
|
VListSubheader: typeof import('vuetify/components')['VListSubheader']
|
571
|
-
VMain: typeof import('vuetify/components')['VMain']
|
572
|
-
VMenu: typeof import('vuetify/components')['VMenu']
|
573
|
-
VNavigationDrawer: typeof import('vuetify/components')['VNavigationDrawer']
|
574
|
-
VMessages: typeof import('vuetify/components')['VMessages']
|
575
|
-
VOtpInput: typeof import('vuetify/components')['VOtpInput']
|
576
|
-
VPagination: typeof import('vuetify/components')['VPagination']
|
577
570
|
VProgressCircular: typeof import('vuetify/components')['VProgressCircular']
|
578
571
|
VOverlay: typeof import('vuetify/components')['VOverlay']
|
579
|
-
|
572
|
+
VMessages: typeof import('vuetify/components')['VMessages']
|
580
573
|
VRadioGroup: typeof import('vuetify/components')['VRadioGroup']
|
581
574
|
VRating: typeof import('vuetify/components')['VRating']
|
582
|
-
VSelect: typeof import('vuetify/components')['VSelect']
|
583
575
|
VSelectionControl: typeof import('vuetify/components')['VSelectionControl']
|
584
|
-
|
576
|
+
VSelect: typeof import('vuetify/components')['VSelect']
|
577
|
+
VSkeletonLoader: typeof import('vuetify/components')['VSkeletonLoader']
|
585
578
|
VSheet: typeof import('vuetify/components')['VSheet']
|
586
579
|
VSlideGroup: typeof import('vuetify/components')['VSlideGroup']
|
587
580
|
VSlideGroupItem: typeof import('vuetify/components')['VSlideGroupItem']
|
588
|
-
VSlider: typeof import('vuetify/components')['VSlider']
|
589
581
|
VSnackbar: typeof import('vuetify/components')['VSnackbar']
|
582
|
+
VSystemBar: typeof import('vuetify/components')['VSystemBar']
|
583
|
+
VTextarea: typeof import('vuetify/components')['VTextarea']
|
584
|
+
VSlider: typeof import('vuetify/components')['VSlider']
|
585
|
+
VTable: typeof import('vuetify/components')['VTable']
|
590
586
|
VStepper: typeof import('vuetify/components')['VStepper']
|
591
587
|
VStepperActions: typeof import('vuetify/components')['VStepperActions']
|
592
588
|
VStepperHeader: typeof import('vuetify/components')['VStepperHeader']
|
@@ -598,17 +594,21 @@ declare module 'vue' {
|
|
598
594
|
VTabs: typeof import('vuetify/components')['VTabs']
|
599
595
|
VTabsWindow: typeof import('vuetify/components')['VTabsWindow']
|
600
596
|
VTabsWindowItem: typeof import('vuetify/components')['VTabsWindowItem']
|
601
|
-
VTable: typeof import('vuetify/components')['VTable']
|
602
|
-
VSystemBar: typeof import('vuetify/components')['VSystemBar']
|
603
|
-
VTextarea: typeof import('vuetify/components')['VTextarea']
|
604
|
-
VTimeline: typeof import('vuetify/components')['VTimeline']
|
605
|
-
VTimelineItem: typeof import('vuetify/components')['VTimelineItem']
|
606
|
-
VTextField: typeof import('vuetify/components')['VTextField']
|
607
597
|
VToolbar: typeof import('vuetify/components')['VToolbar']
|
608
598
|
VToolbarTitle: typeof import('vuetify/components')['VToolbarTitle']
|
609
599
|
VToolbarItems: typeof import('vuetify/components')['VToolbarItems']
|
610
600
|
VTooltip: typeof import('vuetify/components')['VTooltip']
|
611
|
-
|
601
|
+
VSelectionControlGroup: typeof import('vuetify/components')['VSelectionControlGroup']
|
602
|
+
VTimeline: typeof import('vuetify/components')['VTimeline']
|
603
|
+
VTimelineItem: typeof import('vuetify/components')['VTimelineItem']
|
604
|
+
VWindow: typeof import('vuetify/components')['VWindow']
|
605
|
+
VWindowItem: typeof import('vuetify/components')['VWindowItem']
|
606
|
+
VExpansionPanels: typeof import('vuetify/components')['VExpansionPanels']
|
607
|
+
VExpansionPanel: typeof import('vuetify/components')['VExpansionPanel']
|
608
|
+
VExpansionPanelText: typeof import('vuetify/components')['VExpansionPanelText']
|
609
|
+
VExpansionPanelTitle: typeof import('vuetify/components')['VExpansionPanelTitle']
|
610
|
+
VCheckbox: typeof import('vuetify/components')['VCheckbox']
|
611
|
+
VCheckboxBtn: typeof import('vuetify/components')['VCheckboxBtn']
|
612
612
|
VConfirmEdit: typeof import('vuetify/components')['VConfirmEdit']
|
613
613
|
VDataIterator: typeof import('vuetify/components')['VDataIterator']
|
614
614
|
VDefaultsProvider: typeof import('vuetify/components')['VDefaultsProvider']
|
@@ -616,23 +616,20 @@ declare module 'vue' {
|
|
616
616
|
VCol: typeof import('vuetify/components')['VCol']
|
617
617
|
VRow: typeof import('vuetify/components')['VRow']
|
618
618
|
VSpacer: typeof import('vuetify/components')['VSpacer']
|
619
|
+
VForm: typeof import('vuetify/components')['VForm']
|
619
620
|
VHover: typeof import('vuetify/components')['VHover']
|
620
|
-
VWindow: typeof import('vuetify/components')['VWindow']
|
621
|
-
VWindowItem: typeof import('vuetify/components')['VWindowItem']
|
622
|
-
VLazy: typeof import('vuetify/components')['VLazy']
|
623
|
-
VLayout: typeof import('vuetify/components')['VLayout']
|
624
|
-
VLayoutItem: typeof import('vuetify/components')['VLayoutItem']
|
625
621
|
VLocaleProvider: typeof import('vuetify/components')['VLocaleProvider']
|
626
|
-
VForm: typeof import('vuetify/components')['VForm']
|
627
622
|
VNoSsr: typeof import('vuetify/components')['VNoSsr']
|
628
623
|
VParallax: typeof import('vuetify/components')['VParallax']
|
624
|
+
VColorPicker: typeof import('vuetify/components')['VColorPicker']
|
629
625
|
VRadio: typeof import('vuetify/components')['VRadio']
|
630
|
-
VRangeSlider: typeof import('vuetify/components')['VRangeSlider']
|
631
626
|
VResponsive: typeof import('vuetify/components')['VResponsive']
|
632
627
|
VSparkline: typeof import('vuetify/components')['VSparkline']
|
633
628
|
VSpeedDial: typeof import('vuetify/components')['VSpeedDial']
|
634
629
|
VThemeProvider: typeof import('vuetify/components')['VThemeProvider']
|
630
|
+
VValidation: typeof import('vuetify/components')['VValidation']
|
635
631
|
VVirtualScroll: typeof import('vuetify/components')['VVirtualScroll']
|
632
|
+
VLazy: typeof import('vuetify/components')['VLazy']
|
636
633
|
VFabTransition: typeof import('vuetify/components')['VFabTransition']
|
637
634
|
VDialogBottomTransition: typeof import('vuetify/components')['VDialogBottomTransition']
|
638
635
|
VDialogTopTransition: typeof import('vuetify/components')['VDialogTopTransition']
|
@@ -649,7 +646,10 @@ declare module 'vue' {
|
|
649
646
|
VExpandTransition: typeof import('vuetify/components')['VExpandTransition']
|
650
647
|
VExpandXTransition: typeof import('vuetify/components')['VExpandXTransition']
|
651
648
|
VDialogTransition: typeof import('vuetify/components')['VDialogTransition']
|
652
|
-
|
649
|
+
VRangeSlider: typeof import('vuetify/components')['VRangeSlider']
|
650
|
+
VLayout: typeof import('vuetify/components')['VLayout']
|
651
|
+
VLayoutItem: typeof import('vuetify/components')['VLayoutItem']
|
652
|
+
VTextField: typeof import('vuetify/components')['VTextField']
|
653
653
|
VCalendar: typeof import('vuetify/labs/components')['VCalendar']
|
654
654
|
VCalendarDay: typeof import('vuetify/labs/components')['VCalendarDay']
|
655
655
|
VCalendarHeader: typeof import('vuetify/labs/components')['VCalendarHeader']
|
@@ -658,18 +658,18 @@ declare module 'vue' {
|
|
658
658
|
VCalendarMonthDay: typeof import('vuetify/labs/components')['VCalendarMonthDay']
|
659
659
|
VPicker: typeof import('vuetify/labs/components')['VPicker']
|
660
660
|
VPickerTitle: typeof import('vuetify/labs/components')['VPickerTitle']
|
661
|
-
VNumberInput: typeof import('vuetify/labs/components')['VNumberInput']
|
662
661
|
VTimePicker: typeof import('vuetify/labs/components')['VTimePicker']
|
663
662
|
VTimePickerClock: typeof import('vuetify/labs/components')['VTimePickerClock']
|
664
663
|
VTimePickerControls: typeof import('vuetify/labs/components')['VTimePickerControls']
|
664
|
+
VNumberInput: typeof import('vuetify/labs/components')['VNumberInput']
|
665
665
|
VStepperVertical: typeof import('vuetify/labs/components')['VStepperVertical']
|
666
666
|
VStepperVerticalItem: typeof import('vuetify/labs/components')['VStepperVerticalItem']
|
667
667
|
VStepperVerticalActions: typeof import('vuetify/labs/components')['VStepperVerticalActions']
|
668
668
|
VTreeview: typeof import('vuetify/labs/components')['VTreeview']
|
669
669
|
VTreeviewItem: typeof import('vuetify/labs/components')['VTreeviewItem']
|
670
670
|
VTreeviewGroup: typeof import('vuetify/labs/components')['VTreeviewGroup']
|
671
|
-
VDateInput: typeof import('vuetify/labs/components')['VDateInput']
|
672
|
-
VPullToRefresh: typeof import('vuetify/labs/components')['VPullToRefresh']
|
673
671
|
VSnackbarQueue: typeof import('vuetify/labs/components')['VSnackbarQueue']
|
672
|
+
VPullToRefresh: typeof import('vuetify/labs/components')['VPullToRefresh']
|
673
|
+
VDateInput: typeof import('vuetify/labs/components')['VDateInput']
|
674
674
|
}
|
675
675
|
}
|
@@ -165,7 +165,8 @@ export const VNumberInput = genericComponent()({
|
|
165
165
|
"flat": true,
|
166
166
|
"key": "increment-btn",
|
167
167
|
"height": controlNodeDefaultHeight.value,
|
168
|
-
"
|
168
|
+
"data-testid": "increment",
|
169
|
+
"aria-hidden": "true",
|
169
170
|
"icon": incrementIcon.value,
|
170
171
|
"onClick": onClickUp,
|
171
172
|
"onMousedown": onControlMousedown,
|
@@ -192,7 +193,8 @@ export const VNumberInput = genericComponent()({
|
|
192
193
|
"flat": true,
|
193
194
|
"key": "decrement-btn",
|
194
195
|
"height": controlNodeDefaultHeight.value,
|
195
|
-
"
|
196
|
+
"data-testid": "decrement",
|
197
|
+
"aria-hidden": "true",
|
196
198
|
"icon": decrementIcon.value,
|
197
199
|
"size": controlNodeSize.value,
|
198
200
|
"tabindex": "-1",
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"VNumberInput.mjs","names":["VBtn","VDefaultsProvider","VDivider","makeVTextFieldProps","VTextField","useForm","forwardRefs","useProxiedModel","computed","nextTick","onMounted","ref","clamp","genericComponent","getDecimals","omit","propsFactory","useRender","makeVNumberInputProps","controlVariant","type","String","default","inset","Boolean","hideInput","modelValue","Number","min","MIN_SAFE_INTEGER","max","MAX_SAFE_INTEGER","step","VNumberInput","name","props","emits","val","setup","_ref","slots","_model","model","get","value","set","isNaN","vTextFieldRef","stepDecimals","modelDecimals","form","controlsDisabled","disabled","readonly","isReadonly","canIncrease","canDecrease","incrementIcon","decrementIcon","controlNodeSize","controlNodeDefaultHeight","incrementSlotProps","click","onClickUp","decrementSlotProps","onClickDown","clampModel","toggleUpDown","increment","arguments","length","undefined","decimals","Math","toFixed","e","stopPropagation","onBeforeinput","data","existingTxt","target","selectionStart","selectionEnd","potentialNewInputVal","slice","test","preventDefault","onKeydown","includes","key","ctrlKey","onControlMousedown","inputText","_","textFieldProps","filterProps","incrementControlNode","_createVNode","flat","height","size","icon","decrementControlNode","decrement","controlNode","dividerNode","appendInnerControl","reverse","_Fragment","hasAppendInner","prependInnerControl","hasPrependInner","_mergeProps","$event","class","style","_len","args","Array","_key","_len2","_key2"],"sources":["../../../src/labs/VNumberInput/VNumberInput.tsx"],"sourcesContent":["// Styles\nimport './VNumberInput.sass'\n\n// Components\nimport { VBtn } from '../../components/VBtn'\nimport { VDefaultsProvider } from '../../components/VDefaultsProvider'\nimport { VDivider } from '../../components/VDivider'\nimport { makeVTextFieldProps, VTextField } from '@/components/VTextField/VTextField'\n\n// Composables\nimport { useForm } from '@/composables/form'\nimport { forwardRefs } from '@/composables/forwardRefs'\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { computed, nextTick, onMounted, ref } from 'vue'\nimport { clamp, genericComponent, getDecimals, omit, propsFactory, useRender } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\nimport type { VTextFieldSlots } from '@/components/VTextField/VTextField'\n\ntype ControlSlot = {\n click: (e: MouseEvent) => void\n}\n\ntype VNumberInputSlots = Omit<VTextFieldSlots, 'default'> & {\n increment: ControlSlot\n decrement: ControlSlot\n}\n\ntype ControlVariant = 'default' | 'stacked' | 'split'\n\nconst makeVNumberInputProps = propsFactory({\n controlVariant: {\n type: String as PropType<ControlVariant>,\n default: 'default',\n },\n inset: Boolean,\n hideInput: Boolean,\n modelValue: {\n type: Number as PropType<Number | null>,\n default: null,\n },\n min: {\n type: Number,\n default: Number.MIN_SAFE_INTEGER,\n },\n max: {\n type: Number,\n default: Number.MAX_SAFE_INTEGER,\n },\n step: {\n type: Number,\n default: 1,\n },\n\n ...omit(makeVTextFieldProps({}), ['appendInnerIcon', 'modelValue', 'prependInnerIcon']),\n}, 'VNumberInput')\n\nexport const VNumberInput = genericComponent<VNumberInputSlots>()({\n name: 'VNumberInput',\n\n props: {\n ...makeVNumberInputProps(),\n },\n\n emits: {\n 'update:modelValue': (val: number) => true,\n },\n\n setup (props, { slots }) {\n const _model = useProxiedModel(props, 'modelValue')\n\n const model = computed({\n get: () => _model.value,\n set (val) {\n if (val === null) {\n _model.value = null\n return\n }\n\n if (!isNaN(+val) && +val <= props.max && +val >= props.min) {\n _model.value = +val\n }\n },\n })\n\n const vTextFieldRef = ref<VTextField | undefined>()\n\n const stepDecimals = computed(() => getDecimals(props.step))\n const modelDecimals = computed(() => typeof model.value === 'number' ? getDecimals(model.value) : 0)\n\n const form = useForm()\n const controlsDisabled = computed(() => (\n props.disabled || props.readonly || form?.isReadonly.value\n ))\n\n const canIncrease = computed(() => {\n if (controlsDisabled.value) return false\n return (model.value ?? 0) as number + props.step <= props.max\n })\n const canDecrease = computed(() => {\n if (controlsDisabled.value) return false\n return (model.value ?? 0) as number - props.step >= props.min\n })\n\n const controlVariant = computed(() => {\n return props.hideInput ? 'stacked' : props.controlVariant\n })\n\n const incrementIcon = computed(() => controlVariant.value === 'split' ? '$plus' : '$collapse')\n const decrementIcon = computed(() => controlVariant.value === 'split' ? '$minus' : '$expand')\n const controlNodeSize = computed(() => controlVariant.value === 'split' ? 'default' : 'small')\n const controlNodeDefaultHeight = computed(() => controlVariant.value === 'stacked' ? 'auto' : '100%')\n\n const incrementSlotProps = computed(() => ({ click: onClickUp }))\n\n const decrementSlotProps = computed(() => ({ click: onClickDown }))\n\n onMounted(() => {\n if (!props.readonly && !props.disabled) {\n clampModel()\n }\n })\n\n function toggleUpDown (increment = true) {\n if (controlsDisabled.value) return\n if (model.value == null) {\n model.value = clamp(0, props.min, props.max)\n return\n }\n\n const decimals = Math.max(modelDecimals.value, stepDecimals.value)\n if (increment) {\n if (canIncrease.value) model.value = +((((model.value as number) + props.step).toFixed(decimals)))\n } else {\n if (canDecrease.value) model.value = +((((model.value as number) - props.step).toFixed(decimals)))\n }\n }\n\n function onClickUp (e: MouseEvent) {\n e.stopPropagation()\n toggleUpDown()\n }\n\n function onClickDown (e: MouseEvent) {\n e.stopPropagation()\n toggleUpDown(false)\n }\n\n function onBeforeinput (e: InputEvent) {\n if (!e.data) return\n const existingTxt = (e.target as HTMLInputElement)?.value\n const selectionStart = (e.target as HTMLInputElement)?.selectionStart\n const selectionEnd = (e.target as HTMLInputElement)?.selectionEnd\n const potentialNewInputVal =\n existingTxt\n ? existingTxt.slice(0, selectionStart as number | undefined) + e.data + existingTxt.slice(selectionEnd as number | undefined)\n : e.data\n // Only numbers, \"-\", \".\" are allowed\n // AND \"-\", \".\" are allowed only once\n // AND \"-\" is only allowed at the start\n if (!/^-?(\\d+(\\.\\d*)?|(\\.\\d+)|\\d*|\\.)$/.test(potentialNewInputVal)) {\n e.preventDefault()\n }\n }\n\n async function onKeydown (e: KeyboardEvent) {\n if (\n ['Enter', 'ArrowLeft', 'ArrowRight', 'Backspace', 'Delete', 'Tab'].includes(e.key) ||\n e.ctrlKey\n ) return\n\n if (['ArrowDown', 'ArrowUp'].includes(e.key)) {\n e.preventDefault()\n clampModel()\n // _model is controlled, so need to wait until props['modelValue'] is updated\n await nextTick()\n if (e.key === 'ArrowDown') {\n toggleUpDown(false)\n } else {\n toggleUpDown()\n }\n }\n }\n\n function onControlMousedown (e: MouseEvent) {\n e.stopPropagation()\n }\n\n function clampModel () {\n if (!vTextFieldRef.value) return\n const inputText = vTextFieldRef.value.value\n if (inputText && !isNaN(+inputText)) {\n model.value = clamp(+(inputText), props.min, props.max)\n } else {\n model.value = null\n }\n }\n\n useRender(() => {\n const { modelValue: _, ...textFieldProps } = VTextField.filterProps(props)\n\n function incrementControlNode () {\n return !slots.increment ? (\n <VBtn\n disabled={ !canIncrease.value }\n flat\n key=\"increment-btn\"\n height={ controlNodeDefaultHeight.value }\n name=\"increment-btn\"\n icon={ incrementIcon.value }\n onClick={ onClickUp }\n onMousedown={ onControlMousedown }\n size={ controlNodeSize.value }\n tabindex=\"-1\"\n />\n ) : (\n <VDefaultsProvider\n key=\"increment-defaults\"\n defaults={{\n VBtn: {\n disabled: !canIncrease.value,\n flat: true,\n height: controlNodeDefaultHeight.value,\n size: controlNodeSize.value,\n icon: incrementIcon.value,\n },\n }}\n >\n { slots.increment(incrementSlotProps.value) }\n </VDefaultsProvider>\n )\n }\n\n function decrementControlNode () {\n return !slots.decrement ? (\n <VBtn\n disabled={ !canDecrease.value }\n flat\n key=\"decrement-btn\"\n height={ controlNodeDefaultHeight.value }\n name=\"decrement-btn\"\n icon={ decrementIcon.value }\n size={ controlNodeSize.value }\n tabindex=\"-1\"\n onClick={ onClickDown }\n onMousedown={ onControlMousedown }\n />\n ) : (\n <VDefaultsProvider\n key=\"decrement-defaults\"\n defaults={{\n VBtn: {\n disabled: !canDecrease.value,\n flat: true,\n height: controlNodeDefaultHeight.value,\n size: controlNodeSize.value,\n icon: decrementIcon.value,\n },\n }}\n >\n { slots.decrement(decrementSlotProps.value) }\n </VDefaultsProvider>\n )\n }\n\n function controlNode () {\n return (\n <div class=\"v-number-input__control\">\n { decrementControlNode() }\n\n <VDivider\n vertical={ controlVariant.value !== 'stacked' }\n />\n\n { incrementControlNode() }\n </div>\n )\n }\n\n function dividerNode () {\n return !props.hideInput && !props.inset ? <VDivider vertical /> : undefined\n }\n\n const appendInnerControl =\n controlVariant.value === 'split'\n ? (\n <div class=\"v-number-input__control\">\n <VDivider vertical />\n\n { incrementControlNode() }\n </div>\n ) : (!props.reverse\n ? <>{ dividerNode() }{ controlNode() }</>\n : undefined)\n\n const hasAppendInner = slots['append-inner'] || appendInnerControl\n\n const prependInnerControl =\n controlVariant.value === 'split'\n ? (\n <div class=\"v-number-input__control\">\n { decrementControlNode() }\n\n <VDivider vertical />\n </div>\n ) : (props.reverse\n ? <>{ controlNode() }{ dividerNode() }</>\n : undefined)\n\n const hasPrependInner = slots['prepend-inner'] || prependInnerControl\n\n return (\n <VTextField\n ref={ vTextFieldRef }\n v-model={ model.value }\n onBeforeinput={ onBeforeinput }\n onChange={ clampModel }\n onKeydown={ onKeydown }\n class={[\n 'v-number-input',\n {\n 'v-number-input--default': controlVariant.value === 'default',\n 'v-number-input--hide-input': props.hideInput,\n 'v-number-input--inset': props.inset,\n 'v-number-input--reverse': props.reverse,\n 'v-number-input--split': controlVariant.value === 'split',\n 'v-number-input--stacked': controlVariant.value === 'stacked',\n },\n props.class,\n ]}\n { ...textFieldProps }\n style={ props.style }\n inputmode=\"decimal\"\n >\n {{\n ...slots,\n 'append-inner': hasAppendInner ? (...args) => (\n <>\n { slots['append-inner']?.(...args) }\n { appendInnerControl }\n </>\n ) : undefined,\n 'prepend-inner': hasPrependInner ? (...args) => (\n <>\n { prependInnerControl }\n { slots['prepend-inner']?.(...args) }\n </>\n ) : undefined,\n }}\n </VTextField>\n )\n })\n\n return forwardRefs({}, vTextFieldRef)\n },\n})\n\nexport type VNumberInput = InstanceType<typeof VNumberInput>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,IAAI;AAAA,SACJC,iBAAiB;AAAA,SACjBC,QAAQ;AAAA,SACRC,mBAAmB,EAAEC,UAAU,sDAExC;AAAA,SACSC,OAAO;AAAA,SACPC,WAAW;AAAA,SACXC,eAAe,8CAExB;AACA,SAASC,QAAQ,EAAEC,QAAQ,EAAEC,SAAS,EAAEC,GAAG,QAAQ,KAAK;AAAA,SAC/CC,KAAK,EAAEC,gBAAgB,EAAEC,WAAW,EAAEC,IAAI,EAAEC,YAAY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,CAAC,GAAG,GAAG6E,IAAI,CAAC;QAAA,CAEtC,GAAG9C;MAAS;IAIrB,CAAC,CAAC;IAEF,OAAOjE,WAAW,CAAC,CAAC,CAAC,EAAEyC,aAAa,CAAC;EACvC;AACF,CAAC,CAAC","ignoreList":[]}
|
1
|
+
{"version":3,"file":"VNumberInput.mjs","names":["VBtn","VDefaultsProvider","VDivider","makeVTextFieldProps","VTextField","useForm","forwardRefs","useProxiedModel","computed","nextTick","onMounted","ref","clamp","genericComponent","getDecimals","omit","propsFactory","useRender","makeVNumberInputProps","controlVariant","type","String","default","inset","Boolean","hideInput","modelValue","Number","min","MIN_SAFE_INTEGER","max","MAX_SAFE_INTEGER","step","VNumberInput","name","props","emits","val","setup","_ref","slots","_model","model","get","value","set","isNaN","vTextFieldRef","stepDecimals","modelDecimals","form","controlsDisabled","disabled","readonly","isReadonly","canIncrease","canDecrease","incrementIcon","decrementIcon","controlNodeSize","controlNodeDefaultHeight","incrementSlotProps","click","onClickUp","decrementSlotProps","onClickDown","clampModel","toggleUpDown","increment","arguments","length","undefined","decimals","Math","toFixed","e","stopPropagation","onBeforeinput","data","existingTxt","target","selectionStart","selectionEnd","potentialNewInputVal","slice","test","preventDefault","onKeydown","includes","key","ctrlKey","onControlMousedown","inputText","_","textFieldProps","filterProps","incrementControlNode","_createVNode","flat","height","size","icon","decrementControlNode","decrement","controlNode","dividerNode","appendInnerControl","reverse","_Fragment","hasAppendInner","prependInnerControl","hasPrependInner","_mergeProps","$event","class","style","_len","args","Array","_key","_len2","_key2"],"sources":["../../../src/labs/VNumberInput/VNumberInput.tsx"],"sourcesContent":["// Styles\nimport './VNumberInput.sass'\n\n// Components\nimport { VBtn } from '../../components/VBtn'\nimport { VDefaultsProvider } from '../../components/VDefaultsProvider'\nimport { VDivider } from '../../components/VDivider'\nimport { makeVTextFieldProps, VTextField } from '@/components/VTextField/VTextField'\n\n// Composables\nimport { useForm } from '@/composables/form'\nimport { forwardRefs } from '@/composables/forwardRefs'\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { computed, nextTick, onMounted, ref } from 'vue'\nimport { clamp, genericComponent, getDecimals, omit, propsFactory, useRender } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\nimport type { VTextFieldSlots } from '@/components/VTextField/VTextField'\n\ntype ControlSlot = {\n click: (e: MouseEvent) => void\n}\n\ntype VNumberInputSlots = Omit<VTextFieldSlots, 'default'> & {\n increment: ControlSlot\n decrement: ControlSlot\n}\n\ntype ControlVariant = 'default' | 'stacked' | 'split'\n\nconst makeVNumberInputProps = propsFactory({\n controlVariant: {\n type: String as PropType<ControlVariant>,\n default: 'default',\n },\n inset: Boolean,\n hideInput: Boolean,\n modelValue: {\n type: Number as PropType<Number | null>,\n default: null,\n },\n min: {\n type: Number,\n default: Number.MIN_SAFE_INTEGER,\n },\n max: {\n type: Number,\n default: Number.MAX_SAFE_INTEGER,\n },\n step: {\n type: Number,\n default: 1,\n },\n\n ...omit(makeVTextFieldProps({}), ['appendInnerIcon', 'modelValue', 'prependInnerIcon']),\n}, 'VNumberInput')\n\nexport const VNumberInput = genericComponent<VNumberInputSlots>()({\n name: 'VNumberInput',\n\n props: {\n ...makeVNumberInputProps(),\n },\n\n emits: {\n 'update:modelValue': (val: number) => true,\n },\n\n setup (props, { slots }) {\n const _model = useProxiedModel(props, 'modelValue')\n\n const model = computed({\n get: () => _model.value,\n set (val) {\n if (val === null) {\n _model.value = null\n return\n }\n\n if (!isNaN(+val) && +val <= props.max && +val >= props.min) {\n _model.value = +val\n }\n },\n })\n\n const vTextFieldRef = ref<VTextField | undefined>()\n\n const stepDecimals = computed(() => getDecimals(props.step))\n const modelDecimals = computed(() => typeof model.value === 'number' ? getDecimals(model.value) : 0)\n\n const form = useForm()\n const controlsDisabled = computed(() => (\n props.disabled || props.readonly || form?.isReadonly.value\n ))\n\n const canIncrease = computed(() => {\n if (controlsDisabled.value) return false\n return (model.value ?? 0) as number + props.step <= props.max\n })\n const canDecrease = computed(() => {\n if (controlsDisabled.value) return false\n return (model.value ?? 0) as number - props.step >= props.min\n })\n\n const controlVariant = computed(() => {\n return props.hideInput ? 'stacked' : props.controlVariant\n })\n\n const incrementIcon = computed(() => controlVariant.value === 'split' ? '$plus' : '$collapse')\n const decrementIcon = computed(() => controlVariant.value === 'split' ? '$minus' : '$expand')\n const controlNodeSize = computed(() => controlVariant.value === 'split' ? 'default' : 'small')\n const controlNodeDefaultHeight = computed(() => controlVariant.value === 'stacked' ? 'auto' : '100%')\n\n const incrementSlotProps = computed(() => ({ click: onClickUp }))\n\n const decrementSlotProps = computed(() => ({ click: onClickDown }))\n\n onMounted(() => {\n if (!props.readonly && !props.disabled) {\n clampModel()\n }\n })\n\n function toggleUpDown (increment = true) {\n if (controlsDisabled.value) return\n if (model.value == null) {\n model.value = clamp(0, props.min, props.max)\n return\n }\n\n const decimals = Math.max(modelDecimals.value, stepDecimals.value)\n if (increment) {\n if (canIncrease.value) model.value = +((((model.value as number) + props.step).toFixed(decimals)))\n } else {\n if (canDecrease.value) model.value = +((((model.value as number) - props.step).toFixed(decimals)))\n }\n }\n\n function onClickUp (e: MouseEvent) {\n e.stopPropagation()\n toggleUpDown()\n }\n\n function onClickDown (e: MouseEvent) {\n e.stopPropagation()\n toggleUpDown(false)\n }\n\n function onBeforeinput (e: InputEvent) {\n if (!e.data) return\n const existingTxt = (e.target as HTMLInputElement)?.value\n const selectionStart = (e.target as HTMLInputElement)?.selectionStart\n const selectionEnd = (e.target as HTMLInputElement)?.selectionEnd\n const potentialNewInputVal =\n existingTxt\n ? existingTxt.slice(0, selectionStart as number | undefined) + e.data + existingTxt.slice(selectionEnd as number | undefined)\n : e.data\n // Only numbers, \"-\", \".\" are allowed\n // AND \"-\", \".\" are allowed only once\n // AND \"-\" is only allowed at the start\n if (!/^-?(\\d+(\\.\\d*)?|(\\.\\d+)|\\d*|\\.)$/.test(potentialNewInputVal)) {\n e.preventDefault()\n }\n }\n\n async function onKeydown (e: KeyboardEvent) {\n if (\n ['Enter', 'ArrowLeft', 'ArrowRight', 'Backspace', 'Delete', 'Tab'].includes(e.key) ||\n e.ctrlKey\n ) return\n\n if (['ArrowDown', 'ArrowUp'].includes(e.key)) {\n e.preventDefault()\n clampModel()\n // _model is controlled, so need to wait until props['modelValue'] is updated\n await nextTick()\n if (e.key === 'ArrowDown') {\n toggleUpDown(false)\n } else {\n toggleUpDown()\n }\n }\n }\n\n function onControlMousedown (e: MouseEvent) {\n e.stopPropagation()\n }\n\n function clampModel () {\n if (!vTextFieldRef.value) return\n const inputText = vTextFieldRef.value.value\n if (inputText && !isNaN(+inputText)) {\n model.value = clamp(+(inputText), props.min, props.max)\n } else {\n model.value = null\n }\n }\n\n useRender(() => {\n const { modelValue: _, ...textFieldProps } = VTextField.filterProps(props)\n\n function incrementControlNode () {\n return !slots.increment ? (\n <VBtn\n disabled={ !canIncrease.value }\n flat\n key=\"increment-btn\"\n height={ controlNodeDefaultHeight.value }\n data-testid=\"increment\"\n aria-hidden=\"true\"\n icon={ incrementIcon.value }\n onClick={ onClickUp }\n onMousedown={ onControlMousedown }\n size={ controlNodeSize.value }\n tabindex=\"-1\"\n />\n ) : (\n <VDefaultsProvider\n key=\"increment-defaults\"\n defaults={{\n VBtn: {\n disabled: !canIncrease.value,\n flat: true,\n height: controlNodeDefaultHeight.value,\n size: controlNodeSize.value,\n icon: incrementIcon.value,\n },\n }}\n >\n { slots.increment(incrementSlotProps.value) }\n </VDefaultsProvider>\n )\n }\n\n function decrementControlNode () {\n return !slots.decrement ? (\n <VBtn\n disabled={ !canDecrease.value }\n flat\n key=\"decrement-btn\"\n height={ controlNodeDefaultHeight.value }\n data-testid=\"decrement\"\n aria-hidden=\"true\"\n icon={ decrementIcon.value }\n size={ controlNodeSize.value }\n tabindex=\"-1\"\n onClick={ onClickDown }\n onMousedown={ onControlMousedown }\n />\n ) : (\n <VDefaultsProvider\n key=\"decrement-defaults\"\n defaults={{\n VBtn: {\n disabled: !canDecrease.value,\n flat: true,\n height: controlNodeDefaultHeight.value,\n size: controlNodeSize.value,\n icon: decrementIcon.value,\n },\n }}\n >\n { slots.decrement(decrementSlotProps.value) }\n </VDefaultsProvider>\n )\n }\n\n function controlNode () {\n return (\n <div class=\"v-number-input__control\">\n { decrementControlNode() }\n\n <VDivider\n vertical={ controlVariant.value !== 'stacked' }\n />\n\n { incrementControlNode() }\n </div>\n )\n }\n\n function dividerNode () {\n return !props.hideInput && !props.inset ? <VDivider vertical /> : undefined\n }\n\n const appendInnerControl =\n controlVariant.value === 'split'\n ? (\n <div class=\"v-number-input__control\">\n <VDivider vertical />\n\n { incrementControlNode() }\n </div>\n ) : (!props.reverse\n ? <>{ dividerNode() }{ controlNode() }</>\n : undefined)\n\n const hasAppendInner = slots['append-inner'] || appendInnerControl\n\n const prependInnerControl =\n controlVariant.value === 'split'\n ? (\n <div class=\"v-number-input__control\">\n { decrementControlNode() }\n\n <VDivider vertical />\n </div>\n ) : (props.reverse\n ? <>{ controlNode() }{ dividerNode() }</>\n : undefined)\n\n const hasPrependInner = slots['prepend-inner'] || prependInnerControl\n\n return (\n <VTextField\n ref={ vTextFieldRef }\n v-model={ model.value }\n onBeforeinput={ onBeforeinput }\n onChange={ clampModel }\n onKeydown={ onKeydown }\n class={[\n 'v-number-input',\n {\n 'v-number-input--default': controlVariant.value === 'default',\n 'v-number-input--hide-input': props.hideInput,\n 'v-number-input--inset': props.inset,\n 'v-number-input--reverse': props.reverse,\n 'v-number-input--split': controlVariant.value === 'split',\n 'v-number-input--stacked': controlVariant.value === 'stacked',\n },\n props.class,\n ]}\n { ...textFieldProps }\n style={ props.style }\n inputmode=\"decimal\"\n >\n {{\n ...slots,\n 'append-inner': hasAppendInner ? (...args) => (\n <>\n { slots['append-inner']?.(...args) }\n { appendInnerControl }\n </>\n ) : undefined,\n 'prepend-inner': hasPrependInner ? (...args) => (\n <>\n { prependInnerControl }\n { slots['prepend-inner']?.(...args) }\n </>\n ) : undefined,\n }}\n </VTextField>\n )\n })\n\n return forwardRefs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