@vuetify/nightly 3.6.3-master.2024-05-05 → 3.6.3-master.2024-05-07
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/CHANGELOG.md +11 -2
- package/dist/json/attributes.json +148 -8
- package/dist/json/importMap-labs.json +16 -16
- package/dist/json/importMap.json +118 -118
- package/dist/json/tags.json +36 -1
- package/dist/json/web-types.json +436 -26
- package/dist/vuetify-labs.css +2038 -1778
- package/dist/vuetify-labs.d.ts +631 -317
- package/dist/vuetify-labs.esm.js +72 -92
- package/dist/vuetify-labs.esm.js.map +1 -1
- package/dist/vuetify-labs.js +72 -92
- package/dist/vuetify-labs.min.css +3 -3
- package/dist/vuetify.css +2396 -2136
- package/dist/vuetify.d.ts +276 -318
- package/dist/vuetify.esm.js +19 -17
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +19 -17
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +3 -3
- package/dist/vuetify.min.js +15 -15
- package/dist/vuetify.min.js.map +1 -1
- package/lib/components/VAutocomplete/VAutocomplete.mjs +1 -1
- package/lib/components/VAutocomplete/VAutocomplete.mjs.map +1 -1
- package/lib/components/VAutocomplete/index.d.mts +18 -18
- package/lib/components/VBottomSheet/index.d.mts +9 -15
- package/lib/components/VCarousel/index.d.mts +6 -6
- package/lib/components/VCombobox/index.d.mts +18 -18
- package/lib/components/VDialog/index.d.mts +27 -33
- package/lib/components/VFileInput/VFileInput.mjs +1 -1
- package/lib/components/VFileInput/VFileInput.mjs.map +1 -1
- package/lib/components/VFileInput/index.d.mts +9 -9
- package/lib/components/VImg/index.d.mts +6 -6
- package/lib/components/VList/VListItem.mjs +3 -2
- package/lib/components/VList/VListItem.mjs.map +1 -1
- package/lib/components/VList/index.d.mts +6 -6
- package/lib/components/VMenu/index.d.mts +27 -33
- package/lib/components/VOverlay/VOverlay.mjs +2 -5
- package/lib/components/VOverlay/VOverlay.mjs.map +1 -1
- package/lib/components/VOverlay/index.d.mts +9 -15
- package/lib/components/VResponsive/VResponsive.mjs +1 -1
- package/lib/components/VResponsive/VResponsive.mjs.map +1 -1
- package/lib/components/VResponsive/index.d.mts +6 -6
- package/lib/components/VSelect/index.d.mts +18 -18
- package/lib/components/VSlideGroup/VSlideGroup.mjs.map +1 -1
- package/lib/components/VSnackbar/VSnackbar.mjs.map +1 -1
- package/lib/components/VSnackbar/index.d.mts +41 -47
- package/lib/components/VSpeedDial/index.d.mts +9 -15
- package/lib/components/VTabs/VTabs.mjs +8 -3
- package/lib/components/VTabs/VTabs.mjs.map +1 -1
- package/lib/components/VToolbar/VToolbar.css +5 -5
- package/lib/components/VToolbar/_variables.scss +3 -3
- package/lib/components/VTooltip/index.d.mts +27 -33
- package/lib/components/index.d.mts +236 -278
- package/lib/composables/component.mjs +1 -1
- package/lib/composables/component.mjs.map +1 -1
- package/lib/entry-bundler.mjs +1 -1
- package/lib/framework.mjs +1 -1
- package/lib/index.d.mts +40 -40
- package/lib/labs/VNumberInput/VNumberInput.mjs +57 -81
- package/lib/labs/VNumberInput/VNumberInput.mjs.map +1 -1
- package/lib/labs/VNumberInput/index.d.mts +402 -34
- package/lib/labs/VSnackbarQueue/index.d.mts +41 -47
- package/lib/labs/VTreeview/index.d.mts +6 -6
- package/lib/labs/components.d.mts +442 -86
- package/lib/styles/generic/_colors.scss +1 -0
- package/lib/styles/main.css +260 -0
- package/package.json +2 -2
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"component.mjs","names":["propsFactory","makeComponentProps","class","String","Array","
|
1
|
+
{"version":3,"file":"component.mjs","names":["propsFactory","makeComponentProps","class","String","Array","Object","style","type","default"],"sources":["../../src/composables/component.ts"],"sourcesContent":["// Utilities\nimport { propsFactory } from '@/util/propsFactory'\n\n// Types\nimport type { PropType, StyleValue } from 'vue'\n\nexport type ClassValue = any\n\nexport interface ComponentProps {\n class: ClassValue\n style: StyleValue | undefined\n}\n\n// Composables\nexport const makeComponentProps = propsFactory({\n class: [String, Array, Object] as PropType<ClassValue>,\n style: {\n type: [String, Array, Object] as PropType<StyleValue>,\n default: null,\n },\n}, 'component')\n"],"mappings":"AAAA;AAAA,SACSA,YAAY,oCAErB;AAUA;AACA,OAAO,MAAMC,kBAAkB,GAAGD,YAAY,CAAC;EAC7CE,KAAK,EAAE,CAACC,MAAM,EAAEC,KAAK,EAAEC,MAAM,CAAyB;EACtDC,KAAK,EAAE;IACLC,IAAI,EAAE,CAACJ,MAAM,EAAEC,KAAK,EAAEC,MAAM,CAAyB;IACrDG,OAAO,EAAE;EACX;AACF,CAAC,EAAE,WAAW,CAAC","ignoreList":[]}
|
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.6.3-master.2024-05-
|
19
|
+
export const version = "3.6.3-master.2024-05-07";
|
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
@@ -494,39 +494,39 @@ declare module '@vue/runtime-core' {
|
|
494
494
|
|
495
495
|
export interface GlobalComponents {
|
496
496
|
VApp: typeof import('vuetify/components')['VApp']
|
497
|
+
VAutocomplete: typeof import('vuetify/components')['VAutocomplete']
|
498
|
+
VBadge: typeof import('vuetify/components')['VBadge']
|
499
|
+
VAvatar: typeof import('vuetify/components')['VAvatar']
|
497
500
|
VAppBar: typeof import('vuetify/components')['VAppBar']
|
498
501
|
VAppBarNavIcon: typeof import('vuetify/components')['VAppBarNavIcon']
|
499
502
|
VAppBarTitle: typeof import('vuetify/components')['VAppBarTitle']
|
500
503
|
VAlert: typeof import('vuetify/components')['VAlert']
|
501
504
|
VAlertTitle: typeof import('vuetify/components')['VAlertTitle']
|
502
|
-
VAutocomplete: typeof import('vuetify/components')['VAutocomplete']
|
503
|
-
VAvatar: typeof import('vuetify/components')['VAvatar']
|
504
505
|
VBanner: typeof import('vuetify/components')['VBanner']
|
505
506
|
VBannerActions: typeof import('vuetify/components')['VBannerActions']
|
506
507
|
VBannerText: typeof import('vuetify/components')['VBannerText']
|
507
|
-
VBadge: typeof import('vuetify/components')['VBadge']
|
508
508
|
VBottomSheet: typeof import('vuetify/components')['VBottomSheet']
|
509
509
|
VBottomNavigation: typeof import('vuetify/components')['VBottomNavigation']
|
510
|
+
VCarousel: typeof import('vuetify/components')['VCarousel']
|
511
|
+
VCarouselItem: typeof import('vuetify/components')['VCarouselItem']
|
510
512
|
VBreadcrumbs: typeof import('vuetify/components')['VBreadcrumbs']
|
511
513
|
VBreadcrumbsItem: typeof import('vuetify/components')['VBreadcrumbsItem']
|
512
514
|
VBreadcrumbsDivider: typeof import('vuetify/components')['VBreadcrumbsDivider']
|
515
|
+
VBtn: typeof import('vuetify/components')['VBtn']
|
516
|
+
VBtnGroup: typeof import('vuetify/components')['VBtnGroup']
|
517
|
+
VChip: typeof import('vuetify/components')['VChip']
|
518
|
+
VCheckbox: typeof import('vuetify/components')['VCheckbox']
|
519
|
+
VCheckboxBtn: typeof import('vuetify/components')['VCheckboxBtn']
|
520
|
+
VBtnToggle: typeof import('vuetify/components')['VBtnToggle']
|
513
521
|
VCard: typeof import('vuetify/components')['VCard']
|
514
522
|
VCardActions: typeof import('vuetify/components')['VCardActions']
|
515
523
|
VCardItem: typeof import('vuetify/components')['VCardItem']
|
516
524
|
VCardSubtitle: typeof import('vuetify/components')['VCardSubtitle']
|
517
525
|
VCardText: typeof import('vuetify/components')['VCardText']
|
518
526
|
VCardTitle: typeof import('vuetify/components')['VCardTitle']
|
519
|
-
VBtn: typeof import('vuetify/components')['VBtn']
|
520
|
-
VBtnGroup: typeof import('vuetify/components')['VBtnGroup']
|
521
|
-
VBtnToggle: typeof import('vuetify/components')['VBtnToggle']
|
522
|
-
VCarousel: typeof import('vuetify/components')['VCarousel']
|
523
|
-
VCarouselItem: typeof import('vuetify/components')['VCarouselItem']
|
524
|
-
VCheckbox: typeof import('vuetify/components')['VCheckbox']
|
525
|
-
VCheckboxBtn: typeof import('vuetify/components')['VCheckboxBtn']
|
526
|
-
VChip: typeof import('vuetify/components')['VChip']
|
527
|
-
VColorPicker: typeof import('vuetify/components')['VColorPicker']
|
528
527
|
VCode: typeof import('vuetify/components')['VCode']
|
529
528
|
VChipGroup: typeof import('vuetify/components')['VChipGroup']
|
529
|
+
VColorPicker: typeof import('vuetify/components')['VColorPicker']
|
530
530
|
VCombobox: typeof import('vuetify/components')['VCombobox']
|
531
531
|
VCounter: typeof import('vuetify/components')['VCounter']
|
532
532
|
VDataTable: typeof import('vuetify/components')['VDataTable']
|
@@ -542,18 +542,19 @@ declare module '@vue/runtime-core' {
|
|
542
542
|
VDatePickerMonth: typeof import('vuetify/components')['VDatePickerMonth']
|
543
543
|
VDatePickerMonths: typeof import('vuetify/components')['VDatePickerMonths']
|
544
544
|
VDatePickerYears: typeof import('vuetify/components')['VDatePickerYears']
|
545
|
-
VEmptyState: typeof import('vuetify/components')['VEmptyState']
|
546
545
|
VDialog: typeof import('vuetify/components')['VDialog']
|
547
546
|
VDivider: typeof import('vuetify/components')['VDivider']
|
548
|
-
VField: typeof import('vuetify/components')['VField']
|
549
|
-
VFieldLabel: typeof import('vuetify/components')['VFieldLabel']
|
550
547
|
VFab: typeof import('vuetify/components')['VFab']
|
551
548
|
VExpansionPanels: typeof import('vuetify/components')['VExpansionPanels']
|
552
549
|
VExpansionPanel: typeof import('vuetify/components')['VExpansionPanel']
|
553
550
|
VExpansionPanelText: typeof import('vuetify/components')['VExpansionPanelText']
|
554
551
|
VExpansionPanelTitle: typeof import('vuetify/components')['VExpansionPanelTitle']
|
555
|
-
|
552
|
+
VEmptyState: typeof import('vuetify/components')['VEmptyState']
|
553
|
+
VField: typeof import('vuetify/components')['VField']
|
554
|
+
VFieldLabel: typeof import('vuetify/components')['VFieldLabel']
|
556
555
|
VFooter: typeof import('vuetify/components')['VFooter']
|
556
|
+
VFileInput: typeof import('vuetify/components')['VFileInput']
|
557
|
+
VInput: typeof import('vuetify/components')['VInput']
|
557
558
|
VIcon: typeof import('vuetify/components')['VIcon']
|
558
559
|
VComponentIcon: typeof import('vuetify/components')['VComponentIcon']
|
559
560
|
VSvgIcon: typeof import('vuetify/components')['VSvgIcon']
|
@@ -561,12 +562,9 @@ declare module '@vue/runtime-core' {
|
|
561
562
|
VClassIcon: typeof import('vuetify/components')['VClassIcon']
|
562
563
|
VInfiniteScroll: typeof import('vuetify/components')['VInfiniteScroll']
|
563
564
|
VImg: typeof import('vuetify/components')['VImg']
|
564
|
-
VKbd: typeof import('vuetify/components')['VKbd']
|
565
565
|
VItemGroup: typeof import('vuetify/components')['VItemGroup']
|
566
566
|
VItem: typeof import('vuetify/components')['VItem']
|
567
|
-
|
568
|
-
VLabel: typeof import('vuetify/components')['VLabel']
|
569
|
-
VMain: typeof import('vuetify/components')['VMain']
|
567
|
+
VKbd: typeof import('vuetify/components')['VKbd']
|
570
568
|
VList: typeof import('vuetify/components')['VList']
|
571
569
|
VListGroup: typeof import('vuetify/components')['VListGroup']
|
572
570
|
VListImg: typeof import('vuetify/components')['VListImg']
|
@@ -576,48 +574,50 @@ declare module '@vue/runtime-core' {
|
|
576
574
|
VListItemSubtitle: typeof import('vuetify/components')['VListItemSubtitle']
|
577
575
|
VListItemTitle: typeof import('vuetify/components')['VListItemTitle']
|
578
576
|
VListSubheader: typeof import('vuetify/components')['VListSubheader']
|
579
|
-
|
577
|
+
VLabel: typeof import('vuetify/components')['VLabel']
|
580
578
|
VMessages: typeof import('vuetify/components')['VMessages']
|
579
|
+
VMenu: typeof import('vuetify/components')['VMenu']
|
580
|
+
VMain: typeof import('vuetify/components')['VMain']
|
581
581
|
VNavigationDrawer: typeof import('vuetify/components')['VNavigationDrawer']
|
582
|
-
VOtpInput: typeof import('vuetify/components')['VOtpInput']
|
583
582
|
VPagination: typeof import('vuetify/components')['VPagination']
|
584
|
-
|
583
|
+
VOtpInput: typeof import('vuetify/components')['VOtpInput']
|
585
584
|
VProgressLinear: typeof import('vuetify/components')['VProgressLinear']
|
585
|
+
VRating: typeof import('vuetify/components')['VRating']
|
586
586
|
VProgressCircular: typeof import('vuetify/components')['VProgressCircular']
|
587
587
|
VRadioGroup: typeof import('vuetify/components')['VRadioGroup']
|
588
|
+
VOverlay: typeof import('vuetify/components')['VOverlay']
|
588
589
|
VSelect: typeof import('vuetify/components')['VSelect']
|
589
|
-
VRating: typeof import('vuetify/components')['VRating']
|
590
|
-
VSelectionControl: typeof import('vuetify/components')['VSelectionControl']
|
591
|
-
VSelectionControlGroup: typeof import('vuetify/components')['VSelectionControlGroup']
|
592
|
-
VSkeletonLoader: typeof import('vuetify/components')['VSkeletonLoader']
|
593
590
|
VSheet: typeof import('vuetify/components')['VSheet']
|
594
|
-
|
591
|
+
VSelectionControlGroup: typeof import('vuetify/components')['VSelectionControlGroup']
|
592
|
+
VSelectionControl: typeof import('vuetify/components')['VSelectionControl']
|
593
|
+
VSlider: typeof import('vuetify/components')['VSlider']
|
595
594
|
VSlideGroup: typeof import('vuetify/components')['VSlideGroup']
|
596
595
|
VSlideGroupItem: typeof import('vuetify/components')['VSlideGroupItem']
|
597
|
-
|
596
|
+
VSkeletonLoader: typeof import('vuetify/components')['VSkeletonLoader']
|
598
597
|
VSwitch: typeof import('vuetify/components')['VSwitch']
|
599
|
-
|
600
|
-
|
601
|
-
VTable: typeof import('vuetify/components')['VTable']
|
598
|
+
VSnackbar: typeof import('vuetify/components')['VSnackbar']
|
599
|
+
VTextField: typeof import('vuetify/components')['VTextField']
|
602
600
|
VStepper: typeof import('vuetify/components')['VStepper']
|
603
601
|
VStepperActions: typeof import('vuetify/components')['VStepperActions']
|
604
602
|
VStepperHeader: typeof import('vuetify/components')['VStepperHeader']
|
605
603
|
VStepperItem: typeof import('vuetify/components')['VStepperItem']
|
606
604
|
VStepperWindow: typeof import('vuetify/components')['VStepperWindow']
|
607
605
|
VStepperWindowItem: typeof import('vuetify/components')['VStepperWindowItem']
|
606
|
+
VTable: typeof import('vuetify/components')['VTable']
|
608
607
|
VTab: typeof import('vuetify/components')['VTab']
|
609
608
|
VTabs: typeof import('vuetify/components')['VTabs']
|
610
609
|
VTabsWindow: typeof import('vuetify/components')['VTabsWindow']
|
611
610
|
VTabsWindowItem: typeof import('vuetify/components')['VTabsWindowItem']
|
612
|
-
|
611
|
+
VSystemBar: typeof import('vuetify/components')['VSystemBar']
|
613
612
|
VToolbar: typeof import('vuetify/components')['VToolbar']
|
614
613
|
VToolbarTitle: typeof import('vuetify/components')['VToolbarTitle']
|
615
614
|
VToolbarItems: typeof import('vuetify/components')['VToolbarItems']
|
616
|
-
|
615
|
+
VTextarea: typeof import('vuetify/components')['VTextarea']
|
617
616
|
VTimeline: typeof import('vuetify/components')['VTimeline']
|
618
617
|
VTimelineItem: typeof import('vuetify/components')['VTimelineItem']
|
619
618
|
VWindow: typeof import('vuetify/components')['VWindow']
|
620
619
|
VWindowItem: typeof import('vuetify/components')['VWindowItem']
|
620
|
+
VTooltip: typeof import('vuetify/components')['VTooltip']
|
621
621
|
VConfirmEdit: typeof import('vuetify/components')['VConfirmEdit']
|
622
622
|
VDataIterator: typeof import('vuetify/components')['VDataIterator']
|
623
623
|
VDefaultsProvider: typeof import('vuetify/components')['VDefaultsProvider']
|
@@ -636,11 +636,11 @@ declare module '@vue/runtime-core' {
|
|
636
636
|
VRadio: typeof import('vuetify/components')['VRadio']
|
637
637
|
VRangeSlider: typeof import('vuetify/components')['VRangeSlider']
|
638
638
|
VResponsive: typeof import('vuetify/components')['VResponsive']
|
639
|
-
VSpeedDial: typeof import('vuetify/components')['VSpeedDial']
|
640
639
|
VSparkline: typeof import('vuetify/components')['VSparkline']
|
640
|
+
VSpeedDial: typeof import('vuetify/components')['VSpeedDial']
|
641
641
|
VThemeProvider: typeof import('vuetify/components')['VThemeProvider']
|
642
|
-
VValidation: typeof import('vuetify/components')['VValidation']
|
643
642
|
VVirtualScroll: typeof import('vuetify/components')['VVirtualScroll']
|
643
|
+
VValidation: typeof import('vuetify/components')['VValidation']
|
644
644
|
VFabTransition: typeof import('vuetify/components')['VFabTransition']
|
645
645
|
VDialogBottomTransition: typeof import('vuetify/components')['VDialogBottomTransition']
|
646
646
|
VDialogTopTransition: typeof import('vuetify/components')['VDialogTopTransition']
|
@@ -657,21 +657,21 @@ declare module '@vue/runtime-core' {
|
|
657
657
|
VExpandTransition: typeof import('vuetify/components')['VExpandTransition']
|
658
658
|
VExpandXTransition: typeof import('vuetify/components')['VExpandXTransition']
|
659
659
|
VDialogTransition: typeof import('vuetify/components')['VDialogTransition']
|
660
|
-
VNumberInput: typeof import('vuetify/labs/components')['VNumberInput']
|
661
|
-
VTimePicker: typeof import('vuetify/labs/components')['VTimePicker']
|
662
|
-
VTimePickerClock: typeof import('vuetify/labs/components')['VTimePickerClock']
|
663
|
-
VTimePickerControls: typeof import('vuetify/labs/components')['VTimePickerControls']
|
664
660
|
VCalendar: typeof import('vuetify/labs/components')['VCalendar']
|
665
661
|
VCalendarDay: typeof import('vuetify/labs/components')['VCalendarDay']
|
666
662
|
VCalendarHeader: typeof import('vuetify/labs/components')['VCalendarHeader']
|
667
663
|
VCalendarInterval: typeof import('vuetify/labs/components')['VCalendarInterval']
|
668
664
|
VCalendarIntervalEvent: typeof import('vuetify/labs/components')['VCalendarIntervalEvent']
|
669
665
|
VCalendarMonthDay: typeof import('vuetify/labs/components')['VCalendarMonthDay']
|
666
|
+
VNumberInput: typeof import('vuetify/labs/components')['VNumberInput']
|
670
667
|
VPicker: typeof import('vuetify/labs/components')['VPicker']
|
671
668
|
VPickerTitle: typeof import('vuetify/labs/components')['VPickerTitle']
|
672
669
|
VTreeview: typeof import('vuetify/labs/components')['VTreeview']
|
673
670
|
VTreeviewItem: typeof import('vuetify/labs/components')['VTreeviewItem']
|
674
671
|
VTreeviewGroup: typeof import('vuetify/labs/components')['VTreeviewGroup']
|
672
|
+
VTimePicker: typeof import('vuetify/labs/components')['VTimePicker']
|
673
|
+
VTimePickerClock: typeof import('vuetify/labs/components')['VTimePickerClock']
|
674
|
+
VTimePickerControls: typeof import('vuetify/labs/components')['VTimePickerControls']
|
675
675
|
VDateInput: typeof import('vuetify/labs/components')['VDateInput']
|
676
676
|
VPullToRefresh: typeof import('vuetify/labs/components')['VPullToRefresh']
|
677
677
|
VSnackbarQueue: typeof import('vuetify/labs/components')['VSnackbarQueue']
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { mergeProps as _mergeProps, Fragment as _Fragment, createVNode as _createVNode } from "vue";
|
2
2
|
// Styles
|
3
3
|
import "./VNumberInput.css";
|
4
4
|
|
@@ -6,12 +6,10 @@ import "./VNumberInput.css";
|
|
6
6
|
import { VBtn } from "../../components/VBtn/index.mjs";
|
7
7
|
import { VDefaultsProvider } from "../../components/VDefaultsProvider/index.mjs";
|
8
8
|
import { VDivider } from "../../components/VDivider/index.mjs";
|
9
|
-
import {
|
10
|
-
import { makeVInputProps, VInput } from "../../components/VInput/VInput.mjs"; // Composables
|
11
|
-
import { makeFocusProps, useFocus } from "../../composables/focus.mjs";
|
9
|
+
import { makeVTextFieldProps, VTextField } from "../../components/VTextField/VTextField.mjs"; // Composables
|
12
10
|
import { useProxiedModel } from "../../composables/proxiedModel.mjs"; // Utilities
|
13
|
-
import { computed,
|
14
|
-
import { clamp,
|
11
|
+
import { computed, watchEffect } from 'vue';
|
12
|
+
import { clamp, genericComponent, getDecimals, omit, propsFactory, useRender } from "../../util/index.mjs"; // Types
|
15
13
|
const makeVNumberInputProps = propsFactory({
|
16
14
|
controlVariant: {
|
17
15
|
type: String,
|
@@ -31,19 +29,13 @@ const makeVNumberInputProps = propsFactory({
|
|
31
29
|
type: Number,
|
32
30
|
default: 1
|
33
31
|
},
|
34
|
-
...
|
35
|
-
...only(makeVFieldProps(), ['baseColor', 'bgColor', 'class', 'color', 'disabled', 'error', 'loading', 'reverse', 'rounded', 'style', 'theme', 'variant']),
|
36
|
-
...makeFocusProps()
|
32
|
+
...omit(makeVTextFieldProps(), ['appendInnerIcon', 'prependInnerIcon'])
|
37
33
|
}, 'VNumberInput');
|
38
34
|
export const VNumberInput = genericComponent()({
|
39
35
|
name: 'VNumberInput',
|
40
36
|
inheritAttrs: false,
|
41
37
|
props: {
|
42
|
-
...makeVNumberInputProps()
|
43
|
-
modelValue: {
|
44
|
-
type: Number,
|
45
|
-
default: undefined
|
46
|
-
}
|
38
|
+
...makeVNumberInputProps()
|
47
39
|
},
|
48
40
|
emits: {
|
49
41
|
'update:modelValue': val => true
|
@@ -55,12 +47,6 @@ export const VNumberInput = genericComponent()({
|
|
55
47
|
slots
|
56
48
|
} = _ref;
|
57
49
|
const model = useProxiedModel(props, 'modelValue');
|
58
|
-
const {
|
59
|
-
isFocused,
|
60
|
-
focus,
|
61
|
-
blur
|
62
|
-
} = useFocus(props);
|
63
|
-
const inputRef = ref();
|
64
50
|
const stepDecimals = computed(() => getDecimals(props.step));
|
65
51
|
const modelDecimals = computed(() => model.value != null ? getDecimals(model.value) : 0);
|
66
52
|
const canIncrease = computed(() => {
|
@@ -76,9 +62,6 @@ export const VNumberInput = genericComponent()({
|
|
76
62
|
model.value = clamp(model.value, props.min, props.max);
|
77
63
|
}
|
78
64
|
});
|
79
|
-
function onFocus() {
|
80
|
-
if (!isFocused.value) focus();
|
81
|
-
}
|
82
65
|
const controlVariant = computed(() => {
|
83
66
|
return props.hideInput ? 'stacked' : props.controlVariant;
|
84
67
|
});
|
@@ -108,7 +91,7 @@ export const VNumberInput = genericComponent()({
|
|
108
91
|
toggleUpDown(false);
|
109
92
|
}
|
110
93
|
function onKeydown(e) {
|
111
|
-
if (['Enter', 'ArrowLeft', 'ArrowRight', 'Backspace'].includes(e.key) || e.ctrlKey) return;
|
94
|
+
if (['Enter', 'ArrowLeft', 'ArrowRight', 'Backspace', 'Tab'].includes(e.key) || e.ctrlKey) return;
|
112
95
|
if (['ArrowDown'].includes(e.key)) {
|
113
96
|
e.preventDefault();
|
114
97
|
toggleUpDown(false);
|
@@ -125,17 +108,14 @@ export const VNumberInput = genericComponent()({
|
|
125
108
|
e.preventDefault();
|
126
109
|
}
|
127
110
|
}
|
128
|
-
function
|
129
|
-
|
130
|
-
model.value = el.value ? +el.value : undefined;
|
111
|
+
function onModelUpdate(v) {
|
112
|
+
model.value = v ? +v : undefined;
|
131
113
|
}
|
132
114
|
useRender(() => {
|
133
|
-
const fieldProps = filterFieldProps(props);
|
134
|
-
const [rootAttrs, inputAttrs] = filterInputAttrs(attrs);
|
135
115
|
const {
|
136
116
|
modelValue: _,
|
137
|
-
...
|
138
|
-
} =
|
117
|
+
...textFieldProps
|
118
|
+
} = VTextField.filterProps(props);
|
139
119
|
function controlNode() {
|
140
120
|
const defaultHeight = controlVariant.value === 'stacked' ? 'auto' : '100%';
|
141
121
|
return _createVNode("div", {
|
@@ -148,6 +128,7 @@ export const VNumberInput = genericComponent()({
|
|
148
128
|
"name": "decrement-btn",
|
149
129
|
"icon": "$expand",
|
150
130
|
"size": "small",
|
131
|
+
"tabindex": "-1",
|
151
132
|
"onClick": onClickDown
|
152
133
|
}, null) : _createVNode(VDefaultsProvider, {
|
153
134
|
"key": "decrement-defaults",
|
@@ -172,7 +153,8 @@ export const VNumberInput = genericComponent()({
|
|
172
153
|
"name": "increment-btn",
|
173
154
|
"icon": "$collapse",
|
174
155
|
"onClick": onClickUp,
|
175
|
-
"size": "small"
|
156
|
+
"size": "small",
|
157
|
+
"tabindex": "-1"
|
176
158
|
}, null) : _createVNode(VDefaultsProvider, {
|
177
159
|
"key": "increment-defaults",
|
178
160
|
"defaults": {
|
@@ -193,7 +175,36 @@ export const VNumberInput = genericComponent()({
|
|
193
175
|
"vertical": true
|
194
176
|
}, null) : undefined;
|
195
177
|
}
|
196
|
-
|
178
|
+
const appendInnerControl = controlVariant.value === 'split' ? _createVNode("div", {
|
179
|
+
"class": "v-number-input__control"
|
180
|
+
}, [_createVNode(VDivider, {
|
181
|
+
"vertical": true
|
182
|
+
}, null), _createVNode(VBtn, {
|
183
|
+
"flat": true,
|
184
|
+
"height": "100%",
|
185
|
+
"icon": "$plus",
|
186
|
+
"tile": true,
|
187
|
+
"tabindex": "-1",
|
188
|
+
"onClick": onClickUp
|
189
|
+
}, null)]) : !props.reverse ? _createVNode(_Fragment, null, [dividerNode(), controlNode()]) : undefined;
|
190
|
+
const hasAppendInner = slots['append-inner'] || appendInnerControl;
|
191
|
+
const prependInnerControl = controlVariant.value === 'split' ? _createVNode("div", {
|
192
|
+
"class": "v-number-input__control"
|
193
|
+
}, [_createVNode(VBtn, {
|
194
|
+
"flat": true,
|
195
|
+
"height": "100%",
|
196
|
+
"icon": "$minus",
|
197
|
+
"tile": true,
|
198
|
+
"tabindex": "-1",
|
199
|
+
"onClick": onClickDown
|
200
|
+
}, null), _createVNode(VDivider, {
|
201
|
+
"vertical": true
|
202
|
+
}, null)]) : props.reverse ? _createVNode(_Fragment, null, [controlNode(), dividerNode()]) : undefined;
|
203
|
+
const hasPrependInner = slots['prepend-inner'] || prependInnerControl;
|
204
|
+
return _createVNode(VTextField, _mergeProps({
|
205
|
+
"modelValue": model.value,
|
206
|
+
"onUpdate:modelValue": onModelUpdate,
|
207
|
+
"onKeydown": onKeydown,
|
197
208
|
"class": ['v-number-input', {
|
198
209
|
'v-number-input--default': controlVariant.value === 'default',
|
199
210
|
'v-number-input--hide-input': props.hideInput,
|
@@ -202,57 +213,22 @@ export const VNumberInput = genericComponent()({
|
|
202
213
|
'v-number-input--split': controlVariant.value === 'split',
|
203
214
|
'v-number-input--stacked': controlVariant.value === 'stacked'
|
204
215
|
}, props.class]
|
205
|
-
},
|
206
|
-
"focused": isFocused.value,
|
216
|
+
}, textFieldProps, {
|
207
217
|
"style": props.style
|
208
218
|
}), {
|
209
219
|
...slots,
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
...
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
return _createVNode("input", _mergeProps({
|
223
|
-
"ref": inputRef,
|
224
|
-
"type": "text",
|
225
|
-
"value": model.value,
|
226
|
-
"onInput": onInput,
|
227
|
-
"onKeydown": onKeydown,
|
228
|
-
"class": fieldClass,
|
229
|
-
"onFocus": onFocus,
|
230
|
-
"onBlur": blur
|
231
|
-
}, inputAttrs), null);
|
232
|
-
},
|
233
|
-
'append-inner': controlVariant.value === 'split' ? () => _createVNode("div", {
|
234
|
-
"class": "v-number-input__control"
|
235
|
-
}, [_createVNode(VDivider, {
|
236
|
-
"vertical": true
|
237
|
-
}, null), _createVNode(VBtn, {
|
238
|
-
"flat": true,
|
239
|
-
"height": "100%",
|
240
|
-
"icon": "$plus",
|
241
|
-
"tile": true,
|
242
|
-
"onClick": onClickUp
|
243
|
-
}, null)]) : !props.reverse ? () => _createVNode(_Fragment, null, [dividerNode(), controlNode()]) : undefined,
|
244
|
-
'prepend-inner': controlVariant.value === 'split' ? () => _createVNode("div", {
|
245
|
-
"class": "v-number-input__control"
|
246
|
-
}, [_createVNode(VBtn, {
|
247
|
-
"flat": true,
|
248
|
-
"height": "100%",
|
249
|
-
"icon": "$minus",
|
250
|
-
"tile": true,
|
251
|
-
"onClick": onClickDown
|
252
|
-
}, null), _createVNode(VDivider, {
|
253
|
-
"vertical": true
|
254
|
-
}, null)]) : props.reverse ? () => _createVNode(_Fragment, null, [controlNode(), dividerNode()]) : undefined
|
255
|
-
})
|
220
|
+
'append-inner': hasAppendInner ? function () {
|
221
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
222
|
+
args[_key] = arguments[_key];
|
223
|
+
}
|
224
|
+
return _createVNode(_Fragment, null, [slots['append-inner']?.(...args), appendInnerControl]);
|
225
|
+
} : undefined,
|
226
|
+
'prepend-inner': hasPrependInner ? function () {
|
227
|
+
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
228
|
+
args[_key2] = arguments[_key2];
|
229
|
+
}
|
230
|
+
return _createVNode(_Fragment, null, [prependInnerControl, slots['prepend-inner']?.(...args)]);
|
231
|
+
} : undefined
|
256
232
|
});
|
257
233
|
});
|
258
234
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"VNumberInput.mjs","names":["VBtn","VDefaultsProvider","VDivider","filterFieldProps","makeVFieldProps","VField","makeVInputProps","VInput","makeFocusProps","useFocus","useProxiedModel","computed","ref","watchEffect","clamp","filterInputAttrs","genericComponent","getDecimals","only","propsFactory","useRender","makeVNumberInputProps","controlVariant","type","String","default","inset","Boolean","hideInput","min","Number","Infinity","max","step","VNumberInput","name","inheritAttrs","props","modelValue","undefined","emits","val","setup","_ref","attrs","emit","slots","model","isFocused","focus","blur","inputRef","stepDecimals","modelDecimals","value","canIncrease","canDecrease","onFocus","incrementSlotProps","click","onClickUp","decrementSlotProps","onClickDown","toggleUpDown","increment","arguments","length","decimals","Math","toFixed","onKeydown","e","includes","key","ctrlKey","preventDefault","test","onInput","el","target","fieldProps","rootAttrs","inputAttrs","_","inputProps","filterProps","controlNode","defaultHeight","_createVNode","decrement","disabled","flat","height","size","icon","dividerNode","_mergeProps","reverse","class","style","_ref2","fieldClass","slotProps","_Fragment"],"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 { filterFieldProps, makeVFieldProps, VField } from '@/components/VField/VField'\nimport { makeVInputProps, VInput } from '@/components/VInput/VInput'\n\n// Composables\nimport { makeFocusProps, useFocus } from '@/composables/focus'\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { computed, ref, watchEffect } from 'vue'\nimport { clamp, filterInputAttrs, genericComponent, getDecimals, only, propsFactory, useRender } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\nimport type { VFieldSlots } from '@/components/VField/VField'\nimport type { VInputSlots } from '@/components/VInput/VInput'\n\ntype ControlSlot = {\n click: () => void\n}\n\ntype VNumberInputSlots = Omit<VInputSlots & VFieldSlots, '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 min: {\n type: Number,\n default: -Infinity,\n },\n max: {\n type: Number,\n default: Infinity,\n },\n step: {\n type: Number,\n default: 1,\n },\n\n ...only(makeVInputProps(), [\n 'density',\n 'disabled',\n 'focused',\n 'hideDetails',\n 'hint',\n 'label',\n 'persistentHint',\n 'readonly',\n ]),\n ...only(makeVFieldProps(), [\n 'baseColor',\n 'bgColor',\n 'class',\n 'color',\n 'disabled',\n 'error',\n 'loading',\n 'reverse',\n 'rounded',\n 'style',\n 'theme',\n 'variant',\n ]),\n ...makeFocusProps(),\n}, 'VNumberInput')\n\nexport const VNumberInput = genericComponent<VNumberInputSlots>()({\n name: 'VNumberInput',\n\n inheritAttrs: false,\n\n props: {\n ...makeVNumberInputProps(),\n\n modelValue: {\n type: Number,\n default: undefined,\n },\n },\n\n emits: {\n 'update:modelValue': (val: number) => true,\n },\n\n setup (props, { attrs, emit, slots }) {\n const model = useProxiedModel(props, 'modelValue')\n const { isFocused, focus, blur } = useFocus(props)\n const inputRef = ref<HTMLInputElement>()\n\n const stepDecimals = computed(() => getDecimals(props.step))\n const modelDecimals = computed(() => model.value != null ? getDecimals(model.value) : 0)\n\n const canIncrease = computed(() => {\n if (model.value == null) return true\n return model.value + props.step <= props.max\n })\n const canDecrease = computed(() => {\n if (model.value == null) return true\n return model.value - props.step >= props.min\n })\n\n watchEffect(() => {\n if (model.value != null && (model.value < props.min || model.value > props.max)) {\n model.value = clamp(model.value, props.min, props.max)\n }\n })\n\n function onFocus () {\n if (!isFocused.value) focus()\n }\n\n const controlVariant = computed(() => {\n return props.hideInput ? 'stacked' : props.controlVariant\n })\n\n const incrementSlotProps = computed(() => ({ click: onClickUp }))\n\n const decrementSlotProps = computed(() => ({ click: onClickDown }))\n\n function toggleUpDown (increment = true) {\n if (model.value == null) {\n model.value = 0\n return\n }\n\n const decimals = Math.max(modelDecimals.value, stepDecimals.value)\n if (increment) {\n if (canIncrease.value) model.value = +(((model.value + props.step).toFixed(decimals)))\n } else {\n if (canDecrease.value) model.value = +(((model.value - props.step).toFixed(decimals)))\n }\n }\n\n function onClickUp () {\n toggleUpDown()\n }\n\n function onClickDown () {\n toggleUpDown(false)\n }\n\n function onKeydown (e: KeyboardEvent) {\n if (\n ['Enter', 'ArrowLeft', 'ArrowRight', 'Backspace'].includes(e.key) ||\n e.ctrlKey\n ) return\n\n if (['ArrowDown'].includes(e.key)) {\n e.preventDefault()\n toggleUpDown(false)\n return\n }\n if (['ArrowUp'].includes(e.key)) {\n e.preventDefault()\n toggleUpDown()\n return\n }\n\n // Only numbers, +, - & . are allowed\n if (!/^[0-9\\-+.]+$/.test(e.key)) {\n e.preventDefault()\n }\n }\n\n function onInput (e: Event) {\n const el = e.target as HTMLInputElement\n model.value = el.value ? +(el.value) : undefined\n }\n\n useRender(() => {\n const fieldProps = filterFieldProps(props)\n const [rootAttrs, inputAttrs] = filterInputAttrs(attrs)\n const { modelValue: _, ...inputProps } = VInput.filterProps(props)\n\n function controlNode () {\n const defaultHeight = controlVariant.value === 'stacked' ? 'auto' : '100%'\n return (\n <div class=\"v-number-input__control\">\n {\n !slots.decrement ? (\n <VBtn\n disabled={ !canDecrease.value }\n flat\n key=\"decrement-btn\"\n height={ defaultHeight }\n name=\"decrement-btn\"\n icon=\"$expand\"\n size=\"small\"\n onClick={ onClickDown }\n />\n ) : (\n <VDefaultsProvider\n key=\"decrement-defaults\"\n defaults={{\n VBtn: {\n disabled: !canDecrease.value,\n flat: true,\n height: defaultHeight,\n size: 'small',\n icon: '$expand',\n },\n }}\n >\n { slots.decrement(decrementSlotProps.value) }\n </VDefaultsProvider>\n )\n }\n\n <VDivider\n vertical={ controlVariant.value !== 'stacked' }\n />\n\n {\n !slots.increment ? (\n <VBtn\n disabled={ !canIncrease.value }\n flat\n key=\"increment-btn\"\n height={ defaultHeight }\n name=\"increment-btn\"\n icon=\"$collapse\"\n onClick={ onClickUp }\n size=\"small\"\n />\n ) : (\n <VDefaultsProvider\n key=\"increment-defaults\"\n defaults={{\n VBtn: {\n disabled: !canIncrease.value,\n flat: true,\n height: defaultHeight,\n size: 'small',\n icon: '$collapse',\n },\n }}\n >\n { slots.increment(incrementSlotProps.value) }\n </VDefaultsProvider>\n )\n }\n </div>\n )\n }\n\n function dividerNode () {\n return !props.hideInput && !props.inset ? <VDivider vertical /> : undefined\n }\n\n return (\n <VInput\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 { ...rootAttrs }\n { ...inputProps }\n focused={ isFocused.value }\n style={ props.style }\n >\n {{\n ...slots,\n default: () => (\n <VField\n { ...fieldProps }\n active\n focused={ isFocused.value }\n >\n {{\n ...slots,\n default: ({\n props: { class: fieldClass, ...slotProps },\n }) => (\n <input\n ref={ inputRef }\n type=\"text\"\n value={ model.value }\n onInput={ onInput }\n onKeydown={ onKeydown }\n class={ fieldClass }\n onFocus={ onFocus }\n onBlur={ blur }\n { ...inputAttrs }\n />\n ),\n 'append-inner': controlVariant.value === 'split' ? () => (\n <div class=\"v-number-input__control\">\n <VDivider vertical />\n\n <VBtn\n flat\n height=\"100%\"\n icon=\"$plus\"\n tile\n onClick={ onClickUp }\n />\n </div>\n ) : (!props.reverse\n ? () => <>{ dividerNode() }{ controlNode() }</>\n : undefined),\n 'prepend-inner': controlVariant.value === 'split' ? () => (\n <div class=\"v-number-input__control\">\n <VBtn\n flat\n height=\"100%\"\n icon=\"$minus\"\n tile\n onClick={ onClickDown }\n />\n\n <VDivider vertical />\n </div>\n ) : (props.reverse\n ? () => <>{ controlNode() }{ dividerNode() }</>\n : undefined),\n }}\n </VField>\n ),\n }}\n </VInput>\n )\n })\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,gBAAgB,EAAEC,eAAe,EAAEC,MAAM;AAAA,SACzCC,eAAe,EAAEC,MAAM,8CAEhC;AAAA,SACSC,cAAc,EAAEC,QAAQ;AAAA,SACxBC,eAAe,8CAExB;AACA,SAASC,QAAQ,EAAEC,GAAG,EAAEC,WAAW,QAAQ,KAAK;AAAA,SACvCC,KAAK,EAAEC,gBAAgB,EAAEC,gBAAgB,EAAEC,WAAW,EAAEC,IAAI,EAAEC,YAAY,EAAEC,SAAS,gCAE9F;AAgBA,MAAMC,qBAAqB,GAAGF,YAAY,CAAC;EACzCG,cAAc,EAAE;IACdC,IAAI,EAAEC,MAAkC;IACxCC,OAAO,EAAE;EACX,CAAC;EACDC,KAAK,EAAEC,OAAO;EACdC,SAAS,EAAED,OAAO;EAClBE,GAAG,EAAE;IACHN,IAAI,EAAEO,MAAM;IACZL,OAAO,EAAE,CAACM;EACZ,CAAC;EACDC,GAAG,EAAE;IACHT,IAAI,EAAEO,MAAM;IACZL,OAAO,EAAEM;EACX,CAAC;EACDE,IAAI,EAAE;IACJV,IAAI,EAAEO,MAAM;IACZL,OAAO,EAAE;EACX,CAAC;EAED,GAAGP,IAAI,CAACZ,eAAe,CAAC,CAAC,EAAE,CACzB,SAAS,EACT,UAAU,EACV,SAAS,EACT,aAAa,EACb,MAAM,EACN,OAAO,EACP,gBAAgB,EAChB,UAAU,CACX,CAAC;EACF,GAAGY,IAAI,CAACd,eAAe,CAAC,CAAC,EAAE,CACzB,WAAW,EACX,SAAS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el","computed","watchEffect","clamp","genericComponent","getDecimals","omit","propsFactory","useRender","makeVNumberInputProps","controlVariant","type","String","default","inset","Boolean","hideInput","min","Number","Infinity","max","step","VNumberInput","name","inheritAttrs","props","emits","val","setup","_ref","attrs","emit","slots","model","stepDecimals","modelDecimals","value","canIncrease","canDecrease","incrementSlotProps","click","onClickUp","decrementSlotProps","onClickDown","toggleUpDown","increment","arguments","length","undefined","decimals","Math","toFixed","onKeydown","e","includes","key","ctrlKey","preventDefault","test","onModelUpdate","v","modelValue","_","textFieldProps","filterProps","controlNode","defaultHeight","_createVNode","decrement","disabled","flat","height","size","icon","dividerNode","appendInnerControl","reverse","_Fragment","hasAppendInner","prependInnerControl","hasPrependInner","_mergeProps","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 { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { computed, watchEffect } 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: () => 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 min: {\n type: Number,\n default: -Infinity,\n },\n max: {\n type: Number,\n default: Infinity,\n },\n step: {\n type: Number,\n default: 1,\n },\n\n ...omit(makeVTextFieldProps(), ['appendInnerIcon', 'prependInnerIcon']),\n}, 'VNumberInput')\n\nexport const VNumberInput = genericComponent<VNumberInputSlots>()({\n name: 'VNumberInput',\n\n inheritAttrs: false,\n\n props: {\n ...makeVNumberInputProps(),\n },\n\n emits: {\n 'update:modelValue': (val: number) => true,\n },\n\n setup (props, { attrs, emit, slots }) {\n const model = useProxiedModel(props, 'modelValue')\n\n const stepDecimals = computed(() => getDecimals(props.step))\n const modelDecimals = computed(() => model.value != null ? getDecimals(model.value) : 0)\n\n const canIncrease = computed(() => {\n if (model.value == null) return true\n return model.value + props.step <= props.max\n })\n const canDecrease = computed(() => {\n if (model.value == null) return true\n return model.value - props.step >= props.min\n })\n\n watchEffect(() => {\n if (model.value != null && (model.value < props.min || model.value > props.max)) {\n model.value = clamp(model.value, props.min, props.max)\n }\n })\n\n const controlVariant = computed(() => {\n return props.hideInput ? 'stacked' : props.controlVariant\n })\n\n const incrementSlotProps = computed(() => ({ click: onClickUp }))\n\n const decrementSlotProps = computed(() => ({ click: onClickDown }))\n\n function toggleUpDown (increment = true) {\n if (model.value == null) {\n model.value = 0\n return\n }\n\n const decimals = Math.max(modelDecimals.value, stepDecimals.value)\n if (increment) {\n if (canIncrease.value) model.value = +(((model.value + props.step).toFixed(decimals)))\n } else {\n if (canDecrease.value) model.value = +(((model.value - props.step).toFixed(decimals)))\n }\n }\n\n function onClickUp () {\n toggleUpDown()\n }\n\n function onClickDown () {\n toggleUpDown(false)\n }\n\n function onKeydown (e: KeyboardEvent) {\n if (\n ['Enter', 'ArrowLeft', 'ArrowRight', 'Backspace', 'Tab'].includes(e.key) ||\n e.ctrlKey\n ) return\n\n if (['ArrowDown'].includes(e.key)) {\n e.preventDefault()\n toggleUpDown(false)\n return\n }\n if (['ArrowUp'].includes(e.key)) {\n e.preventDefault()\n toggleUpDown()\n return\n }\n\n // Only numbers, +, - & . are allowed\n if (!/^[0-9\\-+.]+$/.test(e.key)) {\n e.preventDefault()\n }\n }\n\n function onModelUpdate (v: string) {\n model.value = v ? +(v) : undefined\n }\n\n useRender(() => {\n const { modelValue: _, ...textFieldProps } = VTextField.filterProps(props)\n\n function controlNode () {\n const defaultHeight = controlVariant.value === 'stacked' ? 'auto' : '100%'\n return (\n <div class=\"v-number-input__control\">\n {\n !slots.decrement ? (\n <VBtn\n disabled={ !canDecrease.value }\n flat\n key=\"decrement-btn\"\n height={ defaultHeight }\n name=\"decrement-btn\"\n icon=\"$expand\"\n size=\"small\"\n tabindex=\"-1\"\n onClick={ onClickDown }\n />\n ) : (\n <VDefaultsProvider\n key=\"decrement-defaults\"\n defaults={{\n VBtn: {\n disabled: !canDecrease.value,\n flat: true,\n height: defaultHeight,\n size: 'small',\n icon: '$expand',\n },\n }}\n >\n { slots.decrement(decrementSlotProps.value) }\n </VDefaultsProvider>\n )\n }\n\n <VDivider\n vertical={ controlVariant.value !== 'stacked' }\n />\n\n {\n !slots.increment ? (\n <VBtn\n disabled={ !canIncrease.value }\n flat\n key=\"increment-btn\"\n height={ defaultHeight }\n name=\"increment-btn\"\n icon=\"$collapse\"\n onClick={ onClickUp }\n size=\"small\"\n tabindex=\"-1\"\n />\n ) : (\n <VDefaultsProvider\n key=\"increment-defaults\"\n defaults={{\n VBtn: {\n disabled: !canIncrease.value,\n flat: true,\n height: defaultHeight,\n size: 'small',\n icon: '$collapse',\n },\n }}\n >\n { slots.increment(incrementSlotProps.value) }\n </VDefaultsProvider>\n )\n }\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 <VBtn\n flat\n height=\"100%\"\n icon=\"$plus\"\n tile\n tabindex=\"-1\"\n onClick={ onClickUp }\n />\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 <VBtn\n flat\n height=\"100%\"\n icon=\"$minus\"\n tile\n tabindex=\"-1\"\n onClick={ onClickDown }\n />\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 modelValue={ model.value }\n onUpdate:modelValue={ onModelUpdate }\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 >\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})\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,eAAe,8CAExB;AACA,SAASC,QAAQ,EAAEC,WAAW,QAAQ,KAAK;AAAA,SAClCC,KAAK,EAAEC,gBAAgB,EAAEC,WAAW,EAAEC,IAAI,EAAEC,YAAY,EAAEC,SAAS,gCAE5E;AAeA,MAAMC,qBAAqB,GAAGF,YAAY,CAAC;EACzCG,cAAc,EAAE;IACdC,IAAI,EAAEC,MAAkC;IACxCC,OAAO,EAAE;EACX,CAAC;EACDC,KAAK,EAAEC,OAAO;EACdC,SAAS,EAAED,OAA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