vuetify 3.7.14 → 3.7.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 +3592 -3596
- package/dist/json/importMap-labs.json +22 -22
- package/dist/json/importMap.json +172 -172
- package/dist/json/tags.json +0 -1
- package/dist/json/web-types.json +6319 -6328
- package/dist/vuetify-labs.css +2227 -2223
- package/dist/vuetify-labs.d.ts +15 -15
- package/dist/vuetify-labs.esm.js +102 -28
- package/dist/vuetify-labs.esm.js.map +1 -1
- package/dist/vuetify-labs.js +102 -28
- package/dist/vuetify-labs.min.css +2 -2
- package/dist/vuetify.css +6087 -6087
- package/dist/vuetify.d.ts +61 -61
- package/dist/vuetify.esm.js +7 -4
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +7 -4
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +6 -6
- package/dist/vuetify.min.js.map +1 -1
- package/lib/components/VList/VListItem.mjs +2 -0
- package/lib/components/VList/VListItem.mjs.map +1 -1
- package/lib/components/VOtpInput/VOtpInput.mjs +1 -1
- package/lib/components/VOtpInput/VOtpInput.mjs.map +1 -1
- package/lib/components/VSlider/slider.mjs +1 -0
- package/lib/components/VSlider/slider.mjs.map +1 -1
- package/lib/entry-bundler.mjs +1 -1
- package/lib/framework.mjs +1 -1
- package/lib/index.d.mts +61 -61
- package/lib/labs/VDateInput/VDateInput.mjs +2 -2
- package/lib/labs/VDateInput/VDateInput.mjs.map +1 -1
- package/lib/labs/VFileUpload/VFileUpload.css +5 -1
- package/lib/labs/VFileUpload/VFileUpload.sass +4 -0
- package/lib/labs/VFileUpload/_variables.scss +1 -1
- package/lib/labs/VNumberInput/VNumberInput.mjs +55 -19
- package/lib/labs/VNumberInput/VNumberInput.mjs.map +1 -1
- package/lib/labs/VNumberInput/hold.mjs +31 -0
- package/lib/labs/VNumberInput/hold.mjs.map +1 -0
- package/lib/labs/VNumberInput/index.d.mts +1 -7
- package/lib/labs/VTreeview/VTreeviewItem.mjs +11 -4
- package/lib/labs/VTreeview/VTreeviewItem.mjs.map +1 -1
- package/lib/labs/VTreeview/index.d.mts +14 -8
- package/lib/labs/components.d.mts +15 -15
- package/lib/locale/af.mjs +42 -42
- package/lib/locale/af.mjs.map +1 -1
- package/lib/locale/az.mjs +7 -7
- package/lib/locale/az.mjs.map +1 -1
- package/lib/locale/bg.mjs +7 -7
- package/lib/locale/bg.mjs.map +1 -1
- package/lib/locale/ca.mjs +25 -25
- package/lib/locale/ca.mjs.map +1 -1
- package/lib/locale/ckb.mjs +29 -29
- package/lib/locale/ckb.mjs.map +1 -1
- package/lib/locale/cs.mjs +13 -13
- package/lib/locale/cs.mjs.map +1 -1
- package/lib/locale/da.mjs +22 -22
- package/lib/locale/da.mjs.map +1 -1
- package/lib/locale/el.mjs +41 -41
- package/lib/locale/el.mjs.map +1 -1
- package/lib/locale/es.mjs +26 -26
- package/lib/locale/es.mjs.map +1 -1
- package/lib/locale/et.mjs +29 -29
- package/lib/locale/et.mjs.map +1 -1
- package/lib/locale/fa.mjs +5 -5
- package/lib/locale/fa.mjs.map +1 -1
- package/lib/locale/fi.mjs +22 -22
- package/lib/locale/fi.mjs.map +1 -1
- package/lib/locale/fr.mjs +6 -6
- package/lib/locale/fr.mjs.map +1 -1
- package/lib/locale/he.mjs +29 -29
- package/lib/locale/he.mjs.map +1 -1
- package/lib/locale/hr.mjs +28 -28
- package/lib/locale/hr.mjs.map +1 -1
- package/lib/locale/hu.mjs +10 -10
- package/lib/locale/hu.mjs.map +1 -1
- package/lib/locale/id.mjs +30 -30
- package/lib/locale/id.mjs.map +1 -1
- package/lib/locale/it.mjs +7 -7
- package/lib/locale/it.mjs.map +1 -1
- package/lib/locale/ja.mjs +9 -9
- package/lib/locale/ja.mjs.map +1 -1
- package/lib/locale/km.mjs +6 -6
- package/lib/locale/km.mjs.map +1 -1
- package/lib/locale/ko.mjs +27 -27
- package/lib/locale/ko.mjs.map +1 -1
- package/lib/locale/lt.mjs +5 -5
- package/lib/locale/lt.mjs.map +1 -1
- package/lib/locale/lv.mjs +33 -33
- package/lib/locale/lv.mjs.map +1 -1
- package/lib/locale/nl.mjs +10 -10
- package/lib/locale/nl.mjs.map +1 -1
- package/lib/locale/no.mjs +11 -11
- package/lib/locale/no.mjs.map +1 -1
- package/lib/locale/pl.mjs +7 -7
- package/lib/locale/pl.mjs.map +1 -1
- package/lib/locale/pt.mjs +11 -11
- package/lib/locale/pt.mjs.map +1 -1
- package/lib/locale/ro.mjs +9 -9
- package/lib/locale/ro.mjs.map +1 -1
- package/lib/locale/ru.mjs +6 -6
- package/lib/locale/ru.mjs.map +1 -1
- package/lib/locale/sk.mjs +5 -5
- package/lib/locale/sk.mjs.map +1 -1
- package/lib/locale/sl.mjs +4 -4
- package/lib/locale/sl.mjs.map +1 -1
- package/lib/locale/sr-Cyrl.mjs +30 -30
- package/lib/locale/sr-Cyrl.mjs.map +1 -1
- package/lib/locale/sr-Latn.mjs +28 -28
- package/lib/locale/sr-Latn.mjs.map +1 -1
- package/lib/locale/sv.mjs +17 -17
- package/lib/locale/sv.mjs.map +1 -1
- package/lib/locale/th.mjs +30 -30
- package/lib/locale/th.mjs.map +1 -1
- package/lib/locale/tr.mjs +31 -31
- package/lib/locale/tr.mjs.map +1 -1
- package/lib/locale/uk.mjs +29 -29
- package/lib/locale/uk.mjs.map +1 -1
- package/lib/locale/vi.mjs +28 -28
- package/lib/locale/vi.mjs.map +1 -1
- package/lib/locale/zh-Hans.mjs +31 -31
- package/lib/locale/zh-Hans.mjs.map +1 -1
- package/lib/locale/zh-Hant.mjs +31 -31
- package/lib/locale/zh-Hant.mjs.map +1 -1
- package/package.json +7 -2
package/lib/index.d.mts
CHANGED
|
@@ -486,26 +486,24 @@ declare module 'vue' {
|
|
|
486
486
|
$children?: VNodeChild
|
|
487
487
|
}
|
|
488
488
|
export interface GlobalComponents {
|
|
489
|
+
VApp: typeof import('vuetify/components')['VApp']
|
|
490
|
+
VAvatar: typeof import('vuetify/components')['VAvatar']
|
|
491
|
+
VBottomNavigation: typeof import('vuetify/components')['VBottomNavigation']
|
|
492
|
+
VAutocomplete: typeof import('vuetify/components')['VAutocomplete']
|
|
489
493
|
VAppBar: typeof import('vuetify/components')['VAppBar']
|
|
490
494
|
VAppBarNavIcon: typeof import('vuetify/components')['VAppBarNavIcon']
|
|
491
495
|
VAppBarTitle: typeof import('vuetify/components')['VAppBarTitle']
|
|
496
|
+
VBanner: typeof import('vuetify/components')['VBanner']
|
|
497
|
+
VBannerActions: typeof import('vuetify/components')['VBannerActions']
|
|
498
|
+
VBannerText: typeof import('vuetify/components')['VBannerText']
|
|
492
499
|
VAlert: typeof import('vuetify/components')['VAlert']
|
|
493
500
|
VAlertTitle: typeof import('vuetify/components')['VAlertTitle']
|
|
494
|
-
VApp: typeof import('vuetify/components')['VApp']
|
|
495
|
-
VAutocomplete: typeof import('vuetify/components')['VAutocomplete']
|
|
496
501
|
VBadge: typeof import('vuetify/components')['VBadge']
|
|
497
|
-
VAvatar: typeof import('vuetify/components')['VAvatar']
|
|
498
|
-
VBottomNavigation: typeof import('vuetify/components')['VBottomNavigation']
|
|
499
|
-
VBottomSheet: typeof import('vuetify/components')['VBottomSheet']
|
|
500
502
|
VBtnGroup: typeof import('vuetify/components')['VBtnGroup']
|
|
501
|
-
VBanner: typeof import('vuetify/components')['VBanner']
|
|
502
|
-
VBannerActions: typeof import('vuetify/components')['VBannerActions']
|
|
503
|
-
VBannerText: typeof import('vuetify/components')['VBannerText']
|
|
504
|
-
VBtnToggle: typeof import('vuetify/components')['VBtnToggle']
|
|
505
503
|
VBreadcrumbs: typeof import('vuetify/components')['VBreadcrumbs']
|
|
506
504
|
VBreadcrumbsItem: typeof import('vuetify/components')['VBreadcrumbsItem']
|
|
507
505
|
VBreadcrumbsDivider: typeof import('vuetify/components')['VBreadcrumbsDivider']
|
|
508
|
-
|
|
506
|
+
VBottomSheet: typeof import('vuetify/components')['VBottomSheet']
|
|
509
507
|
VCard: typeof import('vuetify/components')['VCard']
|
|
510
508
|
VCardActions: typeof import('vuetify/components')['VCardActions']
|
|
511
509
|
VCardItem: typeof import('vuetify/components')['VCardItem']
|
|
@@ -514,20 +512,18 @@ declare module 'vue' {
|
|
|
514
512
|
VCardTitle: typeof import('vuetify/components')['VCardTitle']
|
|
515
513
|
VCarousel: typeof import('vuetify/components')['VCarousel']
|
|
516
514
|
VCarouselItem: typeof import('vuetify/components')['VCarouselItem']
|
|
517
|
-
VChip: typeof import('vuetify/components')['VChip']
|
|
518
|
-
VCode: typeof import('vuetify/components')['VCode']
|
|
519
515
|
VCheckbox: typeof import('vuetify/components')['VCheckbox']
|
|
520
516
|
VCheckboxBtn: typeof import('vuetify/components')['VCheckboxBtn']
|
|
517
|
+
VBtn: typeof import('vuetify/components')['VBtn']
|
|
518
|
+
VBtnToggle: typeof import('vuetify/components')['VBtnToggle']
|
|
519
|
+
VChip: typeof import('vuetify/components')['VChip']
|
|
520
|
+
VChipGroup: typeof import('vuetify/components')['VChipGroup']
|
|
521
521
|
VCombobox: typeof import('vuetify/components')['VCombobox']
|
|
522
522
|
VCounter: typeof import('vuetify/components')['VCounter']
|
|
523
|
-
|
|
523
|
+
VCode: typeof import('vuetify/components')['VCode']
|
|
524
524
|
VColorPicker: typeof import('vuetify/components')['VColorPicker']
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
VDatePickerHeader: typeof import('vuetify/components')['VDatePickerHeader']
|
|
528
|
-
VDatePickerMonth: typeof import('vuetify/components')['VDatePickerMonth']
|
|
529
|
-
VDatePickerMonths: typeof import('vuetify/components')['VDatePickerMonths']
|
|
530
|
-
VDatePickerYears: typeof import('vuetify/components')['VDatePickerYears']
|
|
525
|
+
VDivider: typeof import('vuetify/components')['VDivider']
|
|
526
|
+
VFab: typeof import('vuetify/components')['VFab']
|
|
531
527
|
VDataTable: typeof import('vuetify/components')['VDataTable']
|
|
532
528
|
VDataTableHeaders: typeof import('vuetify/components')['VDataTableHeaders']
|
|
533
529
|
VDataTableFooter: typeof import('vuetify/components')['VDataTableFooter']
|
|
@@ -535,28 +531,28 @@ declare module 'vue' {
|
|
|
535
531
|
VDataTableRow: typeof import('vuetify/components')['VDataTableRow']
|
|
536
532
|
VDataTableVirtual: typeof import('vuetify/components')['VDataTableVirtual']
|
|
537
533
|
VDataTableServer: typeof import('vuetify/components')['VDataTableServer']
|
|
538
|
-
VDivider: typeof import('vuetify/components')['VDivider']
|
|
539
|
-
VDialog: typeof import('vuetify/components')['VDialog']
|
|
540
534
|
VExpansionPanels: typeof import('vuetify/components')['VExpansionPanels']
|
|
541
535
|
VExpansionPanel: typeof import('vuetify/components')['VExpansionPanel']
|
|
542
536
|
VExpansionPanelText: typeof import('vuetify/components')['VExpansionPanelText']
|
|
543
537
|
VExpansionPanelTitle: typeof import('vuetify/components')['VExpansionPanelTitle']
|
|
544
|
-
VField: typeof import('vuetify/components')['VField']
|
|
545
|
-
VFieldLabel: typeof import('vuetify/components')['VFieldLabel']
|
|
546
|
-
VEmptyState: typeof import('vuetify/components')['VEmptyState']
|
|
547
538
|
VFooter: typeof import('vuetify/components')['VFooter']
|
|
539
|
+
VDialog: typeof import('vuetify/components')['VDialog']
|
|
548
540
|
VFileInput: typeof import('vuetify/components')['VFileInput']
|
|
541
|
+
VEmptyState: typeof import('vuetify/components')['VEmptyState']
|
|
549
542
|
VImg: typeof import('vuetify/components')['VImg']
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
VItemGroup: typeof import('vuetify/components')['VItemGroup']
|
|
553
|
-
VItem: typeof import('vuetify/components')['VItem']
|
|
543
|
+
VField: typeof import('vuetify/components')['VField']
|
|
544
|
+
VFieldLabel: typeof import('vuetify/components')['VFieldLabel']
|
|
554
545
|
VIcon: typeof import('vuetify/components')['VIcon']
|
|
555
546
|
VComponentIcon: typeof import('vuetify/components')['VComponentIcon']
|
|
556
547
|
VSvgIcon: typeof import('vuetify/components')['VSvgIcon']
|
|
557
548
|
VLigatureIcon: typeof import('vuetify/components')['VLigatureIcon']
|
|
558
549
|
VClassIcon: typeof import('vuetify/components')['VClassIcon']
|
|
559
550
|
VInput: typeof import('vuetify/components')['VInput']
|
|
551
|
+
VInfiniteScroll: typeof import('vuetify/components')['VInfiniteScroll']
|
|
552
|
+
VItemGroup: typeof import('vuetify/components')['VItemGroup']
|
|
553
|
+
VItem: typeof import('vuetify/components')['VItem']
|
|
554
|
+
VKbd: typeof import('vuetify/components')['VKbd']
|
|
555
|
+
VLabel: typeof import('vuetify/components')['VLabel']
|
|
560
556
|
VList: typeof import('vuetify/components')['VList']
|
|
561
557
|
VListGroup: typeof import('vuetify/components')['VListGroup']
|
|
562
558
|
VListImg: typeof import('vuetify/components')['VListImg']
|
|
@@ -566,62 +562,66 @@ declare module 'vue' {
|
|
|
566
562
|
VListItemSubtitle: typeof import('vuetify/components')['VListItemSubtitle']
|
|
567
563
|
VListItemTitle: typeof import('vuetify/components')['VListItemTitle']
|
|
568
564
|
VListSubheader: typeof import('vuetify/components')['VListSubheader']
|
|
569
|
-
VMain: typeof import('vuetify/components')['VMain']
|
|
570
|
-
VLabel: typeof import('vuetify/components')['VLabel']
|
|
571
|
-
VKbd: typeof import('vuetify/components')['VKbd']
|
|
572
|
-
VPagination: typeof import('vuetify/components')['VPagination']
|
|
573
|
-
VOverlay: typeof import('vuetify/components')['VOverlay']
|
|
574
565
|
VNavigationDrawer: typeof import('vuetify/components')['VNavigationDrawer']
|
|
575
|
-
VMessages: typeof import('vuetify/components')['VMessages']
|
|
576
566
|
VMenu: typeof import('vuetify/components')['VMenu']
|
|
567
|
+
VMain: typeof import('vuetify/components')['VMain']
|
|
568
|
+
VMessages: typeof import('vuetify/components')['VMessages']
|
|
569
|
+
VOverlay: typeof import('vuetify/components')['VOverlay']
|
|
570
|
+
VOtpInput: typeof import('vuetify/components')['VOtpInput']
|
|
571
|
+
VDatePicker: typeof import('vuetify/components')['VDatePicker']
|
|
572
|
+
VDatePickerControls: typeof import('vuetify/components')['VDatePickerControls']
|
|
573
|
+
VDatePickerHeader: typeof import('vuetify/components')['VDatePickerHeader']
|
|
574
|
+
VDatePickerMonth: typeof import('vuetify/components')['VDatePickerMonth']
|
|
575
|
+
VDatePickerMonths: typeof import('vuetify/components')['VDatePickerMonths']
|
|
576
|
+
VDatePickerYears: typeof import('vuetify/components')['VDatePickerYears']
|
|
577
577
|
VProgressLinear: typeof import('vuetify/components')['VProgressLinear']
|
|
578
578
|
VProgressCircular: typeof import('vuetify/components')['VProgressCircular']
|
|
579
|
-
|
|
580
|
-
VRadioGroup: typeof import('vuetify/components')['VRadioGroup']
|
|
581
|
-
VOtpInput: typeof import('vuetify/components')['VOtpInput']
|
|
579
|
+
VPagination: typeof import('vuetify/components')['VPagination']
|
|
582
580
|
VRating: typeof import('vuetify/components')['VRating']
|
|
581
|
+
VRadioGroup: typeof import('vuetify/components')['VRadioGroup']
|
|
582
|
+
VSelect: typeof import('vuetify/components')['VSelect']
|
|
583
|
+
VSelectionControlGroup: typeof import('vuetify/components')['VSelectionControlGroup']
|
|
584
|
+
VSheet: typeof import('vuetify/components')['VSheet']
|
|
583
585
|
VSelectionControl: typeof import('vuetify/components')['VSelectionControl']
|
|
584
586
|
VSlideGroup: typeof import('vuetify/components')['VSlideGroup']
|
|
585
587
|
VSlideGroupItem: typeof import('vuetify/components')['VSlideGroupItem']
|
|
586
|
-
|
|
587
|
-
VSelectionControlGroup: typeof import('vuetify/components')['VSelectionControlGroup']
|
|
588
|
+
VSkeletonLoader: typeof import('vuetify/components')['VSkeletonLoader']
|
|
588
589
|
VSnackbar: typeof import('vuetify/components')['VSnackbar']
|
|
589
590
|
VSlider: typeof import('vuetify/components')['VSlider']
|
|
590
|
-
|
|
591
|
+
VSystemBar: typeof import('vuetify/components')['VSystemBar']
|
|
591
592
|
VStepper: typeof import('vuetify/components')['VStepper']
|
|
592
593
|
VStepperActions: typeof import('vuetify/components')['VStepperActions']
|
|
593
594
|
VStepperHeader: typeof import('vuetify/components')['VStepperHeader']
|
|
594
595
|
VStepperItem: typeof import('vuetify/components')['VStepperItem']
|
|
595
596
|
VStepperWindow: typeof import('vuetify/components')['VStepperWindow']
|
|
596
597
|
VStepperWindowItem: typeof import('vuetify/components')['VStepperWindowItem']
|
|
597
|
-
|
|
598
|
-
VTable: typeof import('vuetify/components')['VTable']
|
|
599
|
-
VSwitch: typeof import('vuetify/components')['VSwitch']
|
|
598
|
+
VTextField: typeof import('vuetify/components')['VTextField']
|
|
600
599
|
VTextarea: typeof import('vuetify/components')['VTextarea']
|
|
600
|
+
VSwitch: typeof import('vuetify/components')['VSwitch']
|
|
601
|
+
VTable: typeof import('vuetify/components')['VTable']
|
|
602
|
+
VTimeline: typeof import('vuetify/components')['VTimeline']
|
|
603
|
+
VTimelineItem: typeof import('vuetify/components')['VTimelineItem']
|
|
604
|
+
VTooltip: typeof import('vuetify/components')['VTooltip']
|
|
605
|
+
VToolbar: typeof import('vuetify/components')['VToolbar']
|
|
606
|
+
VToolbarTitle: typeof import('vuetify/components')['VToolbarTitle']
|
|
607
|
+
VToolbarItems: typeof import('vuetify/components')['VToolbarItems']
|
|
601
608
|
VTab: typeof import('vuetify/components')['VTab']
|
|
602
609
|
VTabs: typeof import('vuetify/components')['VTabs']
|
|
603
610
|
VTabsWindow: typeof import('vuetify/components')['VTabsWindow']
|
|
604
611
|
VTabsWindowItem: typeof import('vuetify/components')['VTabsWindowItem']
|
|
605
|
-
VTextField: typeof import('vuetify/components')['VTextField']
|
|
606
|
-
VToolbar: typeof import('vuetify/components')['VToolbar']
|
|
607
|
-
VToolbarTitle: typeof import('vuetify/components')['VToolbarTitle']
|
|
608
|
-
VToolbarItems: typeof import('vuetify/components')['VToolbarItems']
|
|
609
|
-
VTimeline: typeof import('vuetify/components')['VTimeline']
|
|
610
|
-
VTimelineItem: typeof import('vuetify/components')['VTimelineItem']
|
|
611
612
|
VWindow: typeof import('vuetify/components')['VWindow']
|
|
612
613
|
VWindowItem: typeof import('vuetify/components')['VWindowItem']
|
|
613
|
-
VTooltip: typeof import('vuetify/components')['VTooltip']
|
|
614
614
|
VConfirmEdit: typeof import('vuetify/components')['VConfirmEdit']
|
|
615
615
|
VDataIterator: typeof import('vuetify/components')['VDataIterator']
|
|
616
616
|
VDefaultsProvider: typeof import('vuetify/components')['VDefaultsProvider']
|
|
617
617
|
VForm: typeof import('vuetify/components')['VForm']
|
|
618
|
-
VHover: typeof import('vuetify/components')['VHover']
|
|
619
|
-
VLayout: typeof import('vuetify/components')['VLayout']
|
|
620
|
-
VLayoutItem: typeof import('vuetify/components')['VLayoutItem']
|
|
621
618
|
VContainer: typeof import('vuetify/components')['VContainer']
|
|
622
619
|
VCol: typeof import('vuetify/components')['VCol']
|
|
623
620
|
VRow: typeof import('vuetify/components')['VRow']
|
|
624
621
|
VSpacer: typeof import('vuetify/components')['VSpacer']
|
|
622
|
+
VHover: typeof import('vuetify/components')['VHover']
|
|
623
|
+
VLayout: typeof import('vuetify/components')['VLayout']
|
|
624
|
+
VLayoutItem: typeof import('vuetify/components')['VLayoutItem']
|
|
625
625
|
VLazy: typeof import('vuetify/components')['VLazy']
|
|
626
626
|
VLocaleProvider: typeof import('vuetify/components')['VLocaleProvider']
|
|
627
627
|
VNoSsr: typeof import('vuetify/components')['VNoSsr']
|
|
@@ -631,8 +631,9 @@ declare module 'vue' {
|
|
|
631
631
|
VResponsive: typeof import('vuetify/components')['VResponsive']
|
|
632
632
|
VSparkline: typeof import('vuetify/components')['VSparkline']
|
|
633
633
|
VSpeedDial: typeof import('vuetify/components')['VSpeedDial']
|
|
634
|
-
VValidation: typeof import('vuetify/components')['VValidation']
|
|
635
634
|
VThemeProvider: typeof import('vuetify/components')['VThemeProvider']
|
|
635
|
+
VVirtualScroll: typeof import('vuetify/components')['VVirtualScroll']
|
|
636
|
+
VValidation: typeof import('vuetify/components')['VValidation']
|
|
636
637
|
VFabTransition: typeof import('vuetify/components')['VFabTransition']
|
|
637
638
|
VDialogBottomTransition: typeof import('vuetify/components')['VDialogBottomTransition']
|
|
638
639
|
VDialogTopTransition: typeof import('vuetify/components')['VDialogTopTransition']
|
|
@@ -649,27 +650,26 @@ declare module 'vue' {
|
|
|
649
650
|
VExpandTransition: typeof import('vuetify/components')['VExpandTransition']
|
|
650
651
|
VExpandXTransition: typeof import('vuetify/components')['VExpandXTransition']
|
|
651
652
|
VDialogTransition: typeof import('vuetify/components')['VDialogTransition']
|
|
652
|
-
VVirtualScroll: typeof import('vuetify/components')['VVirtualScroll']
|
|
653
|
-
VFileUpload: typeof import('vuetify/labs/components')['VFileUpload']
|
|
654
|
-
VFileUploadItem: typeof import('vuetify/labs/components')['VFileUploadItem']
|
|
655
653
|
VCalendar: typeof import('vuetify/labs/components')['VCalendar']
|
|
656
654
|
VCalendarDay: typeof import('vuetify/labs/components')['VCalendarDay']
|
|
657
655
|
VCalendarHeader: typeof import('vuetify/labs/components')['VCalendarHeader']
|
|
658
656
|
VCalendarInterval: typeof import('vuetify/labs/components')['VCalendarInterval']
|
|
659
657
|
VCalendarIntervalEvent: typeof import('vuetify/labs/components')['VCalendarIntervalEvent']
|
|
660
658
|
VCalendarMonthDay: typeof import('vuetify/labs/components')['VCalendarMonthDay']
|
|
661
|
-
|
|
659
|
+
VFileUpload: typeof import('vuetify/labs/components')['VFileUpload']
|
|
660
|
+
VFileUploadItem: typeof import('vuetify/labs/components')['VFileUploadItem']
|
|
662
661
|
VPicker: typeof import('vuetify/labs/components')['VPicker']
|
|
663
662
|
VPickerTitle: typeof import('vuetify/labs/components')['VPickerTitle']
|
|
663
|
+
VNumberInput: typeof import('vuetify/labs/components')['VNumberInput']
|
|
664
664
|
VStepperVertical: typeof import('vuetify/labs/components')['VStepperVertical']
|
|
665
665
|
VStepperVerticalItem: typeof import('vuetify/labs/components')['VStepperVerticalItem']
|
|
666
666
|
VStepperVerticalActions: typeof import('vuetify/labs/components')['VStepperVerticalActions']
|
|
667
|
-
VTreeview: typeof import('vuetify/labs/components')['VTreeview']
|
|
668
|
-
VTreeviewItem: typeof import('vuetify/labs/components')['VTreeviewItem']
|
|
669
|
-
VTreeviewGroup: typeof import('vuetify/labs/components')['VTreeviewGroup']
|
|
670
667
|
VTimePicker: typeof import('vuetify/labs/components')['VTimePicker']
|
|
671
668
|
VTimePickerClock: typeof import('vuetify/labs/components')['VTimePickerClock']
|
|
672
669
|
VTimePickerControls: typeof import('vuetify/labs/components')['VTimePickerControls']
|
|
670
|
+
VTreeview: typeof import('vuetify/labs/components')['VTreeview']
|
|
671
|
+
VTreeviewItem: typeof import('vuetify/labs/components')['VTreeviewItem']
|
|
672
|
+
VTreeviewGroup: typeof import('vuetify/labs/components')['VTreeviewGroup']
|
|
673
673
|
VDateInput: typeof import('vuetify/labs/components')['VDateInput']
|
|
674
674
|
VPullToRefresh: typeof import('vuetify/labs/components')['VPullToRefresh']
|
|
675
675
|
VSnackbarQueue: typeof import('vuetify/labs/components')['VSnackbarQueue']
|
|
@@ -60,9 +60,9 @@ export const VDateInput = genericComponent()({
|
|
|
60
60
|
if (props.multiple === 'range') {
|
|
61
61
|
const start = value[0];
|
|
62
62
|
const end = value[value.length - 1];
|
|
63
|
-
return adapter.isValid(start) && adapter.isValid(end) ? `${adapter.format(start, 'keyboardDate')} - ${adapter.format(end, 'keyboardDate')}` : '';
|
|
63
|
+
return adapter.isValid(start) && adapter.isValid(end) ? `${adapter.format(adapter.date(start), 'keyboardDate')} - ${adapter.format(adapter.date(end), 'keyboardDate')}` : '';
|
|
64
64
|
}
|
|
65
|
-
return adapter.isValid(model.value) ? adapter.format(model.value, 'keyboardDate') : '';
|
|
65
|
+
return adapter.isValid(model.value) ? adapter.format(adapter.date(model.value), 'keyboardDate') : '';
|
|
66
66
|
});
|
|
67
67
|
const isInteractive = computed(() => !props.disabled && !props.readonly);
|
|
68
68
|
function onKeydown(e) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VDateInput.mjs","names":["makeVConfirmEditProps","VConfirmEdit","makeVDatePickerProps","VDatePicker","VMenu","makeVTextFieldProps","VTextField","useDate","makeFocusProps","useFocus","forwardRefs","useLocale","useProxiedModel","computed","ref","shallowRef","genericComponent","omit","propsFactory","useRender","wrapInArray","makeVDateInputProps","hideActions","Boolean","location","type","String","default","placeholder","prependIcon","weeksInMonth","hideHeader","VDateInput","name","props","emits","val","setup","_ref","slots","t","adapter","isFocused","focus","blur","model","multiple","Array","isArray","map","item","toJsDate","date","menu","vDateInputRef","display","value","length","start","end","isValid","format","isInteractive","disabled","readonly","onKeydown","e","key","target","onClick","preventDefault","stopPropagation","onSave","onUpdateModel","confirmEditProps","filterProps","datePickerProps","textFieldProps","_createVNode","_mergeProps","class","style","undefined","_Fragment","$event","onCancel","_ref2","actions","proxyModel","save","cancel","isPristine"],"sources":["../../../src/labs/VDateInput/VDateInput.tsx"],"sourcesContent":["// Components\nimport { makeVConfirmEditProps, VConfirmEdit } from '@/components/VConfirmEdit/VConfirmEdit'\nimport { makeVDatePickerProps, VDatePicker } from '@/components/VDatePicker/VDatePicker'\nimport { VMenu } from '@/components/VMenu/VMenu'\nimport { makeVTextFieldProps, VTextField } from '@/components/VTextField/VTextField'\n\n// Composables\nimport { useDate } from '@/composables/date'\nimport { makeFocusProps, useFocus } from '@/composables/focus'\nimport { forwardRefs } from '@/composables/forwardRefs'\nimport { useLocale } from '@/composables/locale'\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { computed, ref, shallowRef } from 'vue'\nimport { genericComponent, omit, propsFactory, useRender, wrapInArray } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\nimport type { StrategyProps } from '@/components/VOverlay/locationStrategies'\nimport type { VTextFieldSlots } from '@/components/VTextField/VTextField'\n\n// Types\nexport type VDateInputActionsSlot = {\n save: () => void\n cancel: () => void\n isPristine: boolean\n}\n\nexport type VDateInputSlots = Omit<VTextFieldSlots, 'default'> & {\n actions: VDateInputActionsSlot\n default: never\n}\n\nexport const makeVDateInputProps = propsFactory({\n hideActions: Boolean,\n location: {\n type: String as PropType<StrategyProps['location']>,\n default: 'bottom start',\n },\n ...makeFocusProps(),\n ...makeVConfirmEditProps(),\n ...makeVTextFieldProps({\n placeholder: 'mm/dd/yyyy',\n prependIcon: '$calendar',\n }),\n ...omit(makeVDatePickerProps({\n weeksInMonth: 'dynamic' as const,\n hideHeader: true,\n }), ['active', 'location', 'rounded']),\n}, 'VDateInput')\n\nexport const VDateInput = genericComponent<VDateInputSlots>()({\n name: 'VDateInput',\n\n props: makeVDateInputProps(),\n\n emits: {\n 'update:modelValue': (val: string) => true,\n },\n\n setup (props, { slots }) {\n const { t } = useLocale()\n const adapter = useDate()\n const { isFocused, focus, blur } = useFocus(props)\n const model = useProxiedModel(\n props,\n 'modelValue',\n props.multiple ? [] : null,\n val => Array.isArray(val) ? val.map(item => adapter.toJsDate(item)) : val ? adapter.toJsDate(val) : val,\n val => Array.isArray(val) ? val.map(item => adapter.date(item)) : val ? adapter.date(val) : val\n )\n\n const menu = shallowRef(false)\n const vDateInputRef = ref()\n\n const display = computed(() => {\n const value = wrapInArray(model.value)\n\n if (!value.length) return null\n\n if (props.multiple === true) {\n return t('$vuetify.datePicker.itemsSelected', value.length)\n }\n\n if (props.multiple === 'range') {\n const start = value[0]\n const end = value[value.length - 1]\n\n return adapter.isValid(start) && adapter.isValid(end)\n ? `${adapter.format(start, 'keyboardDate')} - ${adapter.format(end, 'keyboardDate')}`\n : ''\n }\n\n return adapter.isValid(model.value) ? adapter.format(model.value, 'keyboardDate') : ''\n })\n\n const isInteractive = computed(() => !props.disabled && !props.readonly)\n\n function onKeydown (e: KeyboardEvent) {\n if (e.key !== 'Enter') return\n\n if (!menu.value || !isFocused.value) {\n menu.value = true\n\n return\n }\n\n const target = e.target as HTMLInputElement\n\n model.value = target.value\n }\n\n function onClick (e: MouseEvent) {\n e.preventDefault()\n e.stopPropagation()\n\n menu.value = true\n }\n\n function onSave () {\n menu.value = false\n }\n\n function onUpdateModel (value: string) {\n if (value != null) return\n\n model.value = null\n }\n\n useRender(() => {\n const confirmEditProps = VConfirmEdit.filterProps(props)\n const datePickerProps = VDatePicker.filterProps(omit(props, ['active', 'location', 'rounded']))\n const textFieldProps = VTextField.filterProps(props)\n\n return (\n <VTextField\n ref={ vDateInputRef }\n { ...textFieldProps }\n class={ props.class }\n style={ props.style }\n modelValue={ display.value }\n onKeydown={ isInteractive.value ? onKeydown : undefined }\n focused={ menu.value || isFocused.value }\n onFocus={ focus }\n onBlur={ blur }\n onClick:control={ isInteractive.value ? onClick : undefined }\n onClick:prepend={ isInteractive.value ? onClick : undefined }\n onUpdate:modelValue={ onUpdateModel }\n >\n {{\n ...slots,\n default: () => (\n <>\n <VMenu\n v-model={ menu.value }\n activator=\"parent\"\n min-width=\"0\"\n location={ props.location }\n closeOnContentClick={ false }\n openOnClick={ false }\n >\n <VConfirmEdit\n { ...confirmEditProps }\n v-model={ model.value }\n onSave={ onSave }\n onCancel={ () => menu.value = false }\n >\n {{\n default: ({ actions, model: proxyModel, save, cancel, isPristine }) => {\n return (\n <VDatePicker\n { ...datePickerProps }\n modelValue={ props.hideActions ? model.value : proxyModel.value }\n onUpdate:modelValue={ val => {\n if (!props.hideActions) {\n proxyModel.value = val\n } else {\n model.value = val\n\n if (!props.multiple) menu.value = false\n }\n }}\n onMousedown={ (e: MouseEvent) => e.preventDefault() }\n >\n {{\n actions: !props.hideActions ? () => slots.actions?.({ save, cancel, isPristine }) ?? actions() : undefined,\n }}\n </VDatePicker>\n )\n },\n }}\n </VConfirmEdit>\n </VMenu>\n\n { slots.default?.() }\n </>\n ),\n }}\n </VTextField>\n )\n })\n\n return forwardRefs({}, vDateInputRef)\n },\n})\n\nexport type VDateInput = InstanceType<typeof VDateInput>\n"],"mappings":";AAAA;AAAA,SACSA,qBAAqB,EAAEC,YAAY;AAAA,SACnCC,oBAAoB,EAAEC,WAAW;AAAA,SACjCC,KAAK;AAAA,SACLC,mBAAmB,EAAEC,UAAU,sDAExC;AAAA,SACSC,OAAO;AAAA,SACPC,cAAc,EAAEC,Q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;gBAAEC,IAAI;gBAAEC,MAAM;gBAAEC;cAAW,CAAC,GAAAL,KAAA;cAChE,OAAAR,YAAA,CAAA3E,WAAA,EAAA4E,WAAA,CAESH,eAAe;gBAAA,cACP1C,KAAK,CAACZ,WAAW,GAAGuB,KAAK,CAACW,KAAK,GAAGgC,UAAU,CAAChC,KAAK;gBAAA,uBACzCpB,GAAG,IAAI;kBAC3B,IAAI,CAACF,KAAK,CAACZ,WAAW,EAAE;oBACtBkE,UAAU,CAAChC,KAAK,GAAGpB,GAAG;kBACxB,CAAC,MAAM;oBACLS,KAAK,CAACW,KAAK,GAAGpB,GAAG;oBAEjB,IAAI,CAACF,KAAK,CAACY,QAAQ,EAAEO,IAAI,CAACG,KAAK,GAAG,KAAK;kBACzC;gBACF,CAAC;gBAAA,eACcU,CAAa,IAAKA,CAAC,CAACI,cAAc,CAAC;cAAC;gBAGjDiB,OAAO,EAAE,CAACrD,KAAK,CAACZ,WAAW,GAAG,MAAMiB,KAAK,CAACgD,OAAO,GAAG;kBAAEE,IAAI;kBAAEC,MAAM;kBAAEC;gBAAW,CAAC,CAAC,IAAIJ,OAAO,CAAC,CAAC,GAAGL;cAAS;YAIlH;UAAC;QAAA,IAKL3C,KAAK,CAACZ,OAAO,GAAG,CAAC;MAEtB;IAIT,CAAC,CAAC;IAEF,OAAOjB,WAAW,CAAC,CAAC,CAAC,EAAE4C,aAAa,CAAC;EACvC;AACF,CAAC,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"VDateInput.mjs","names":["makeVConfirmEditProps","VConfirmEdit","makeVDatePickerProps","VDatePicker","VMenu","makeVTextFieldProps","VTextField","useDate","makeFocusProps","useFocus","forwardRefs","useLocale","useProxiedModel","computed","ref","shallowRef","genericComponent","omit","propsFactory","useRender","wrapInArray","makeVDateInputProps","hideActions","Boolean","location","type","String","default","placeholder","prependIcon","weeksInMonth","hideHeader","VDateInput","name","props","emits","val","setup","_ref","slots","t","adapter","isFocused","focus","blur","model","multiple","Array","isArray","map","item","toJsDate","date","menu","vDateInputRef","display","value","length","start","end","isValid","format","isInteractive","disabled","readonly","onKeydown","e","key","target","onClick","preventDefault","stopPropagation","onSave","onUpdateModel","confirmEditProps","filterProps","datePickerProps","textFieldProps","_createVNode","_mergeProps","class","style","undefined","_Fragment","$event","onCancel","_ref2","actions","proxyModel","save","cancel","isPristine"],"sources":["../../../src/labs/VDateInput/VDateInput.tsx"],"sourcesContent":["// Components\nimport { makeVConfirmEditProps, VConfirmEdit } from '@/components/VConfirmEdit/VConfirmEdit'\nimport { makeVDatePickerProps, VDatePicker } from '@/components/VDatePicker/VDatePicker'\nimport { VMenu } from '@/components/VMenu/VMenu'\nimport { makeVTextFieldProps, VTextField } from '@/components/VTextField/VTextField'\n\n// Composables\nimport { useDate } from '@/composables/date'\nimport { makeFocusProps, useFocus } from '@/composables/focus'\nimport { forwardRefs } from '@/composables/forwardRefs'\nimport { useLocale } from '@/composables/locale'\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { computed, ref, shallowRef } from 'vue'\nimport { genericComponent, omit, propsFactory, useRender, wrapInArray } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\nimport type { StrategyProps } from '@/components/VOverlay/locationStrategies'\nimport type { VTextFieldSlots } from '@/components/VTextField/VTextField'\n\n// Types\nexport type VDateInputActionsSlot = {\n save: () => void\n cancel: () => void\n isPristine: boolean\n}\n\nexport type VDateInputSlots = Omit<VTextFieldSlots, 'default'> & {\n actions: VDateInputActionsSlot\n default: never\n}\n\nexport const makeVDateInputProps = propsFactory({\n hideActions: Boolean,\n location: {\n type: String as PropType<StrategyProps['location']>,\n default: 'bottom start',\n },\n ...makeFocusProps(),\n ...makeVConfirmEditProps(),\n ...makeVTextFieldProps({\n placeholder: 'mm/dd/yyyy',\n prependIcon: '$calendar',\n }),\n ...omit(makeVDatePickerProps({\n weeksInMonth: 'dynamic' as const,\n hideHeader: true,\n }), ['active', 'location', 'rounded']),\n}, 'VDateInput')\n\nexport const VDateInput = genericComponent<VDateInputSlots>()({\n name: 'VDateInput',\n\n props: makeVDateInputProps(),\n\n emits: {\n 'update:modelValue': (val: string) => true,\n },\n\n setup (props, { slots }) {\n const { t } = useLocale()\n const adapter = useDate()\n const { isFocused, focus, blur } = useFocus(props)\n const model = useProxiedModel(\n props,\n 'modelValue',\n props.multiple ? [] : null,\n val => Array.isArray(val) ? val.map(item => adapter.toJsDate(item)) : val ? adapter.toJsDate(val) : val,\n val => Array.isArray(val) ? val.map(item => adapter.date(item)) : val ? adapter.date(val) : val\n )\n\n const menu = shallowRef(false)\n const vDateInputRef = ref()\n\n const display = computed(() => {\n const value = wrapInArray(model.value)\n\n if (!value.length) return null\n\n if (props.multiple === true) {\n return t('$vuetify.datePicker.itemsSelected', value.length)\n }\n\n if (props.multiple === 'range') {\n const start = value[0]\n const end = value[value.length - 1]\n\n return adapter.isValid(start) && adapter.isValid(end)\n ? `${adapter.format(adapter.date(start), 'keyboardDate')} - ${adapter.format(adapter.date(end), 'keyboardDate')}`\n : ''\n }\n\n return adapter.isValid(model.value) ? adapter.format(adapter.date(model.value), 'keyboardDate') : ''\n })\n\n const isInteractive = computed(() => !props.disabled && !props.readonly)\n\n function onKeydown (e: KeyboardEvent) {\n if (e.key !== 'Enter') return\n\n if (!menu.value || !isFocused.value) {\n menu.value = true\n\n return\n }\n\n const target = e.target as HTMLInputElement\n\n model.value = target.value\n }\n\n function onClick (e: MouseEvent) {\n e.preventDefault()\n e.stopPropagation()\n\n menu.value = true\n }\n\n function onSave () {\n menu.value = false\n }\n\n function onUpdateModel (value: string) {\n if (value != null) return\n\n model.value = null\n }\n\n useRender(() => {\n const confirmEditProps = VConfirmEdit.filterProps(props)\n const datePickerProps = VDatePicker.filterProps(omit(props, ['active', 'location', 'rounded']))\n const textFieldProps = VTextField.filterProps(props)\n\n return (\n <VTextField\n ref={ vDateInputRef }\n { ...textFieldProps }\n class={ props.class }\n style={ props.style }\n modelValue={ display.value }\n onKeydown={ isInteractive.value ? onKeydown : undefined }\n focused={ menu.value || isFocused.value }\n onFocus={ focus }\n onBlur={ blur }\n onClick:control={ isInteractive.value ? onClick : undefined }\n onClick:prepend={ isInteractive.value ? onClick : undefined }\n onUpdate:modelValue={ onUpdateModel }\n >\n {{\n ...slots,\n default: () => (\n <>\n <VMenu\n v-model={ menu.value }\n activator=\"parent\"\n min-width=\"0\"\n location={ props.location }\n closeOnContentClick={ false }\n openOnClick={ false }\n >\n <VConfirmEdit\n { ...confirmEditProps }\n v-model={ model.value }\n onSave={ onSave }\n onCancel={ () => menu.value = false }\n >\n {{\n default: ({ actions, model: proxyModel, save, cancel, isPristine }) => {\n return (\n <VDatePicker\n { ...datePickerProps }\n modelValue={ props.hideActions ? model.value : proxyModel.value }\n onUpdate:modelValue={ val => {\n if (!props.hideActions) {\n proxyModel.value = val\n } else {\n model.value = val\n\n if (!props.multiple) menu.value = false\n }\n }}\n onMousedown={ (e: MouseEvent) => e.preventDefault() }\n >\n {{\n actions: !props.hideActions ? () => slots.actions?.({ save, cancel, isPristine }) ?? actions() : undefined,\n }}\n </VDatePicker>\n )\n },\n }}\n </VConfirmEdit>\n </VMenu>\n\n { slots.default?.() }\n </>\n ),\n }}\n </VTextField>\n )\n })\n\n return forwardRefs({}, vDateInputRef)\n },\n})\n\nexport type VDateInput = InstanceType<typeof VDateInput>\n"],"mappings":";AAAA;AAAA,SACSA,qBAAqB,EAAEC,YAAY;AAAA,SACnCC,oBAAoB,EAAEC,WAAW;AAAA,SACjCC,KAAK;AAAA,SACLC,mBAAmB,EAAEC,UAAU,sDAExC;AAAA,SACSC,OAAO;AAAA,SACPC,cAAc,EAAEC,QAAQ;AAAA,SACxBC,WAAW;AAAA,SACXC,SAAS;AAAA,SACTC,eAAe,8CAExB;AACA,SAASC,QAAQ,EAAEC,GAAG,EAAEC,UAAU,QAAQ,KAAK;AAAA,SACtCC,gBAAgB,EAAEC,IAAI,EAAEC,YAAY,EAAEC,SAAS,EAAEC,WAAW,gCAErE;AAKA;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Ae;gBAAA,cACP1C,KAAK,CAACZ,WAAW,GAAGuB,KAAK,CAACW,KAAK,GAAGgC,UAAU,CAAChC,KAAK;gBAAA,uBACzCpB,GAAG,IAAI;kBAC3B,IAAI,CAACF,KAAK,CAACZ,WAAW,EAAE;oBACtBkE,UAAU,CAAChC,KAAK,GAAGpB,GAAG;kBACxB,CAAC,MAAM;oBACLS,KAAK,CAACW,KAAK,GAAGpB,GAAG;oBAEjB,IAAI,CAACF,KAAK,CAACY,QAAQ,EAAEO,IAAI,CAACG,KAAK,GAAG,KAAK;kBACzC;gBACF,CAAC;gBAAA,eACcU,CAAa,IAAKA,CAAC,CAACI,cAAc,CAAC;cAAC;gBAGjDiB,OAAO,EAAE,CAACrD,KAAK,CAACZ,WAAW,GAAG,MAAMiB,KAAK,CAACgD,OAAO,GAAG;kBAAEE,IAAI;kBAAEC,MAAM;kBAAEC;gBAAW,CAAC,CAAC,IAAIJ,OAAO,CAAC,CAAC,GAAGL;cAAS;YAIlH;UAAC;QAAA,IAKL3C,KAAK,CAACZ,OAAO,GAAG,CAAC;MAEtB;IAIT,CAAC,CAAC;IAEF,OAAOjB,WAAW,CAAC,CAAC,CAAC,EAAE4C,aAAa,CAAC;EACvC;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
.v-file-upload {
|
|
2
|
-
padding: 64px
|
|
2
|
+
padding: 64px 16px;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
justify-content: center;
|
|
5
5
|
align-items: center;
|
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
.v-file-upload-title {
|
|
42
42
|
font-size: 1.5rem;
|
|
43
43
|
font-weight: 600;
|
|
44
|
+
text-align: center;
|
|
44
45
|
}
|
|
45
46
|
|
|
46
47
|
.v-file-upload-icon {
|
|
@@ -64,6 +65,9 @@
|
|
|
64
65
|
justify-content: center;
|
|
65
66
|
width: 100%;
|
|
66
67
|
}
|
|
68
|
+
.v-file-upload-divider .v-divider__wrapper {
|
|
69
|
+
max-width: 100%;
|
|
70
|
+
}
|
|
67
71
|
|
|
68
72
|
.v-file-upload-items {
|
|
69
73
|
margin: 16px 0;
|
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
.v-file-upload-title
|
|
47
47
|
font-size: $file-upload-title-font-size
|
|
48
48
|
font-weight: 600
|
|
49
|
+
text-align: center
|
|
49
50
|
|
|
50
51
|
.v-file-upload-icon
|
|
51
52
|
opacity: var(--v-medium-emphasis-opacity)
|
|
@@ -67,6 +68,9 @@
|
|
|
67
68
|
justify-content: center
|
|
68
69
|
width: 100%
|
|
69
70
|
|
|
71
|
+
.v-divider__wrapper
|
|
72
|
+
max-width: 100%
|
|
73
|
+
|
|
70
74
|
.v-file-upload-items
|
|
71
75
|
margin: $file-upload-items-margin
|
|
72
76
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
@use '../../styles/settings';
|
|
3
3
|
|
|
4
4
|
$file-upload-title-font-size: 1.5rem !default;
|
|
5
|
-
$file-upload-padding: 64px
|
|
5
|
+
$file-upload-padding: 64px 16px !default;
|
|
6
6
|
$file-upload-border-radius: 4px !default;
|
|
7
7
|
$file-upload-border-width: 2px !default;
|
|
8
8
|
$file-upload-title-font-weight: 600 !default;
|
|
@@ -7,6 +7,8 @@ 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
9
|
import { makeVTextFieldProps, VTextField } from "../../components/VTextField/VTextField.mjs"; // Composables
|
|
10
|
+
import { useHold } from "./hold.mjs";
|
|
11
|
+
import { useFocus } from "../../composables/focus.mjs";
|
|
10
12
|
import { useForm } from "../../composables/form.mjs";
|
|
11
13
|
import { forwardRefs } from "../../composables/forwardRefs.mjs";
|
|
12
14
|
import { useProxiedModel } from "../../composables/proxiedModel.mjs"; // Utilities
|
|
@@ -39,7 +41,7 @@ const makeVNumberInputProps = propsFactory({
|
|
|
39
41
|
type: Number,
|
|
40
42
|
default: 0
|
|
41
43
|
},
|
|
42
|
-
...omit(makeVTextFieldProps(
|
|
44
|
+
...omit(makeVTextFieldProps(), ['modelValue', 'validationValue'])
|
|
43
45
|
}, 'VNumberInput');
|
|
44
46
|
export const VNumberInput = genericComponent()({
|
|
45
47
|
name: 'VNumberInput',
|
|
@@ -54,9 +56,19 @@ export const VNumberInput = genericComponent()({
|
|
|
54
56
|
slots
|
|
55
57
|
} = _ref;
|
|
56
58
|
const vTextFieldRef = ref();
|
|
59
|
+
const {
|
|
60
|
+
holdStart,
|
|
61
|
+
holdStop
|
|
62
|
+
} = useHold({
|
|
63
|
+
toggleUpDown
|
|
64
|
+
});
|
|
57
65
|
const form = useForm(props);
|
|
58
66
|
const controlsDisabled = computed(() => form.isDisabled.value || form.isReadonly.value);
|
|
59
|
-
const
|
|
67
|
+
const {
|
|
68
|
+
isFocused,
|
|
69
|
+
focus,
|
|
70
|
+
blur
|
|
71
|
+
} = useFocus(props);
|
|
60
72
|
function correctPrecision(val) {
|
|
61
73
|
let precision = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : props.precision;
|
|
62
74
|
const fixed = precision == null ? String(val) : val.toFixed(precision);
|
|
@@ -102,10 +114,18 @@ export const VNumberInput = genericComponent()({
|
|
|
102
114
|
const controlNodeSize = computed(() => controlVariant.value === 'split' ? 'default' : 'small');
|
|
103
115
|
const controlNodeDefaultHeight = computed(() => controlVariant.value === 'stacked' ? 'auto' : '100%');
|
|
104
116
|
const incrementSlotProps = computed(() => ({
|
|
105
|
-
|
|
117
|
+
props: {
|
|
118
|
+
onClick: onControlClick,
|
|
119
|
+
onPointerup: onControlMouseup,
|
|
120
|
+
onPointerdown: onUpControlMousedown
|
|
121
|
+
}
|
|
106
122
|
}));
|
|
107
123
|
const decrementSlotProps = computed(() => ({
|
|
108
|
-
|
|
124
|
+
props: {
|
|
125
|
+
onClick: onControlClick,
|
|
126
|
+
onPointerup: onControlMouseup,
|
|
127
|
+
onPointerdown: onDownControlMousedown
|
|
128
|
+
}
|
|
109
129
|
}));
|
|
110
130
|
watch(() => props.precision, () => formatInputValue());
|
|
111
131
|
onMounted(() => {
|
|
@@ -132,14 +152,6 @@ export const VNumberInput = genericComponent()({
|
|
|
132
152
|
if (canDecrease.value) inputText.value = correctPrecision(model.value - props.step, inferredPrecision);
|
|
133
153
|
}
|
|
134
154
|
}
|
|
135
|
-
function onClickUp(e) {
|
|
136
|
-
e.stopPropagation();
|
|
137
|
-
toggleUpDown();
|
|
138
|
-
}
|
|
139
|
-
function onClickDown(e) {
|
|
140
|
-
e.stopPropagation();
|
|
141
|
-
toggleUpDown(false);
|
|
142
|
-
}
|
|
143
155
|
function onBeforeinput(e) {
|
|
144
156
|
if (!e.data) return;
|
|
145
157
|
const existingTxt = e.target?.value;
|
|
@@ -177,8 +189,29 @@ export const VNumberInput = genericComponent()({
|
|
|
177
189
|
}
|
|
178
190
|
}
|
|
179
191
|
}
|
|
180
|
-
function
|
|
192
|
+
function onControlClick(e) {
|
|
193
|
+
e.stopPropagation();
|
|
194
|
+
}
|
|
195
|
+
function onControlMouseup(e) {
|
|
196
|
+
const el = e.currentTarget;
|
|
197
|
+
el?.releasePointerCapture(e.pointerId);
|
|
198
|
+
e.preventDefault();
|
|
199
|
+
e.stopPropagation();
|
|
200
|
+
holdStop();
|
|
201
|
+
}
|
|
202
|
+
function onUpControlMousedown(e) {
|
|
203
|
+
const el = e.currentTarget;
|
|
204
|
+
el?.setPointerCapture(e.pointerId);
|
|
205
|
+
e.preventDefault();
|
|
206
|
+
e.stopPropagation();
|
|
207
|
+
holdStart('up');
|
|
208
|
+
}
|
|
209
|
+
function onDownControlMousedown(e) {
|
|
210
|
+
const el = e.currentTarget;
|
|
211
|
+
el?.setPointerCapture(e.pointerId);
|
|
212
|
+
e.preventDefault();
|
|
181
213
|
e.stopPropagation();
|
|
214
|
+
holdStart('down');
|
|
182
215
|
}
|
|
183
216
|
function clampModel() {
|
|
184
217
|
if (controlsDisabled.value) return;
|
|
@@ -207,11 +240,11 @@ export const VNumberInput = genericComponent()({
|
|
|
207
240
|
inputText.value = model.value.toString();
|
|
208
241
|
}
|
|
209
242
|
function onFocus() {
|
|
210
|
-
|
|
243
|
+
focus();
|
|
211
244
|
trimDecimalZeros();
|
|
212
245
|
}
|
|
213
246
|
function onBlur() {
|
|
214
|
-
|
|
247
|
+
blur();
|
|
215
248
|
clampModel();
|
|
216
249
|
}
|
|
217
250
|
useRender(() => {
|
|
@@ -228,8 +261,9 @@ export const VNumberInput = genericComponent()({
|
|
|
228
261
|
"data-testid": "increment",
|
|
229
262
|
"aria-hidden": "true",
|
|
230
263
|
"icon": incrementIcon.value,
|
|
231
|
-
"onClick":
|
|
232
|
-
"
|
|
264
|
+
"onClick": onControlClick,
|
|
265
|
+
"onPointerup": onControlMouseup,
|
|
266
|
+
"onPointerdown": onUpControlMousedown,
|
|
233
267
|
"size": controlNodeSize.value,
|
|
234
268
|
"tabindex": "-1"
|
|
235
269
|
}, null) : _createVNode(VDefaultsProvider, {
|
|
@@ -258,8 +292,9 @@ export const VNumberInput = genericComponent()({
|
|
|
258
292
|
"icon": decrementIcon.value,
|
|
259
293
|
"size": controlNodeSize.value,
|
|
260
294
|
"tabindex": "-1",
|
|
261
|
-
"onClick":
|
|
262
|
-
"
|
|
295
|
+
"onClick": onControlClick,
|
|
296
|
+
"onPointerup": onControlMouseup,
|
|
297
|
+
"onPointerdown": onDownControlMousedown
|
|
263
298
|
}, null) : _createVNode(VDefaultsProvider, {
|
|
264
299
|
"key": "decrement-defaults",
|
|
265
300
|
"defaults": {
|
|
@@ -303,6 +338,7 @@ export const VNumberInput = genericComponent()({
|
|
|
303
338
|
"ref": vTextFieldRef,
|
|
304
339
|
"modelValue": inputText.value,
|
|
305
340
|
"onUpdate:modelValue": $event => inputText.value = $event,
|
|
341
|
+
"validationValue": model.value,
|
|
306
342
|
"onBeforeinput": onBeforeinput,
|
|
307
343
|
"onFocus": onFocus,
|
|
308
344
|
"onBlur": onBlur,
|