vectis-ui 0.1.0 → 0.8.0
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/README.md +40 -6
- package/dist/components/VAccordion/VAccordion.css +1 -1
- package/dist/components/VAccordion/VAccordion.d.ts +9 -16
- package/dist/components/VAccordion/VAccordion.js.map +1 -1
- package/dist/components/VAccordion/VAccordion.vue_vue_type_script_setup_true_lang.js +3 -3
- package/dist/components/VAccordion/VAccordion.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VAccordion/VAccordionItem.css +1 -1
- package/dist/components/VAccordion/VAccordionItem.d.ts +33 -19
- package/dist/components/VAccordion/VAccordionItem.js.map +1 -1
- package/dist/components/VAccordion/VAccordionItem.vue_vue_type_script_setup_true_lang.js +50 -38
- package/dist/components/VAccordion/VAccordionItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VAccordion/context.d.ts +1 -8
- package/dist/components/VAccordion/context.js.map +1 -1
- package/dist/components/VAvatar/VAvatar.css +1 -1
- package/dist/components/VAvatar/VAvatar.d.ts +44 -29
- package/dist/components/VAvatar/VAvatar.js.map +1 -1
- package/dist/components/VAvatar/VAvatar.vue_vue_type_script_setup_true_lang.js +38 -35
- package/dist/components/VAvatar/VAvatar.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VAvatar/VAvatarGroup.d.ts +5 -16
- package/dist/components/VAvatar/VAvatarGroup.js.map +1 -1
- package/dist/components/VAvatar/VAvatarGroup.vue_vue_type_script_setup_true_lang.js +7 -7
- package/dist/components/VAvatar/VAvatarGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VAvatar/context.d.ts +6 -10
- package/dist/components/VAvatar/context.js.map +1 -1
- package/dist/components/VBadge/VBadge.css +1 -1
- package/dist/components/VBadge/VBadge.d.ts +31 -10
- package/dist/components/VBadge/VBadge.js.map +1 -1
- package/dist/components/VBadge/VBadge.vue_vue_type_script_setup_true_lang.js +39 -24
- package/dist/components/VBadge/VBadge.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VBreadcrumb/VBreadcrumb.css +1 -1
- package/dist/components/VBreadcrumb/VBreadcrumb.d.ts +4 -17
- package/dist/components/VBreadcrumb/VBreadcrumb.js.map +1 -1
- package/dist/components/VBreadcrumb/VBreadcrumb.vue_vue_type_script_setup_true_lang.js +23 -25
- package/dist/components/VBreadcrumb/VBreadcrumb.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VButton/VButton.css +1 -1
- package/dist/components/VButton/VButton.d.ts +30 -10
- package/dist/components/VButton/VButton.js.map +1 -1
- package/dist/components/VButton/VButton.vue_vue_type_script_setup_true_lang.js +39 -30
- package/dist/components/VButton/VButton.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VButton/VButtonGroup.css +1 -1
- package/dist/components/VButton/VButtonGroup.d.ts +76 -13
- package/dist/components/VButton/VButtonGroup.js.map +1 -1
- package/dist/components/VButton/VButtonGroup.vue_vue_type_script_setup_true_lang.js +74 -8
- package/dist/components/VButton/VButtonGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VButton/context.d.ts +30 -0
- package/dist/components/VButton/context.js +6 -0
- package/dist/components/VButton/context.js.map +1 -0
- package/dist/components/VCalendar/VCalendar.css +1 -1
- package/dist/components/VCalendar/VCalendar.d.ts +50 -36
- package/dist/components/VCalendar/VCalendar.js.map +1 -1
- package/dist/components/VCalendar/VCalendar.vue_vue_type_script_setup_true_lang.js +99 -85
- package/dist/components/VCalendar/VCalendar.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VCalendar/VCalendarEvent.css +1 -1
- package/dist/components/VCalendar/VCalendarEvent.d.ts +5 -11
- package/dist/components/VCalendar/VCalendarEvent.js.map +1 -1
- package/dist/components/VCalendar/VCalendarEvent.vue_vue_type_script_setup_true_lang.js +7 -1
- package/dist/components/VCalendar/VCalendarEvent.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VCalendar/VCalendarMonth.css +1 -1
- package/dist/components/VCalendar/VCalendarMonth.d.ts +10 -13
- package/dist/components/VCalendar/VCalendarMonth.js.map +1 -1
- package/dist/components/VCalendar/VCalendarMonth.vue_vue_type_script_setup_true_lang.js +183 -244
- package/dist/components/VCalendar/VCalendarMonth.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VCalendar/VCalendarTimeGrid.css +1 -1
- package/dist/components/VCalendar/VCalendarTimeGrid.d.ts +15 -20
- package/dist/components/VCalendar/VCalendarTimeGrid.js.map +1 -1
- package/dist/components/VCalendar/VCalendarTimeGrid.vue_vue_type_script_setup_true_lang.js +385 -448
- package/dist/components/VCalendar/VCalendarTimeGrid.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VCalendar/VCalendarYear.css +1 -1
- package/dist/components/VCalendar/VCalendarYear.js.map +1 -1
- package/dist/components/VCalendar/VCalendarYear.vue_vue_type_script_setup_true_lang.js +53 -49
- package/dist/components/VCalendar/VCalendarYear.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VCalendar/gesture.d.ts +158 -0
- package/dist/components/VCalendar/gesture.js +170 -0
- package/dist/components/VCalendar/gesture.js.map +1 -0
- package/dist/components/VCalendar/keyboard.d.ts +9 -3
- package/dist/components/VCalendar/keyboard.js +2 -6
- package/dist/components/VCalendar/keyboard.js.map +1 -1
- package/dist/components/VCalendar/layout.d.ts +67 -54
- package/dist/components/VCalendar/layout.js +77 -69
- package/dist/components/VCalendar/layout.js.map +1 -1
- package/dist/components/VCalendar/timeGrid.d.ts +55 -0
- package/dist/components/VCalendar/timeGrid.js +71 -0
- package/dist/components/VCalendar/timeGrid.js.map +1 -0
- package/dist/components/VCalendar/types.d.ts +41 -16
- package/dist/components/VCarousel/VCarousel.css +1 -1
- package/dist/components/VCarousel/VCarousel.d.ts +21 -41
- package/dist/components/VCarousel/VCarousel.js.map +1 -1
- package/dist/components/VCarousel/VCarousel.vue_vue_type_script_setup_true_lang.js +157 -129
- package/dist/components/VCarousel/VCarousel.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VCarousel/VCarouselItem.d.ts +0 -17
- package/dist/components/VCarousel/VCarouselItem.js.map +1 -1
- package/dist/components/VCarousel/VCarouselItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VCarousel/context.d.ts +0 -12
- package/dist/components/VCarousel/context.js.map +1 -1
- package/dist/components/VCheckbox/VCheckbox.css +1 -1
- package/dist/components/VCheckbox/VCheckbox.d.ts +31 -16
- package/dist/components/VCheckbox/VCheckbox.js.map +1 -1
- package/dist/components/VCheckbox/VCheckbox.vue_vue_type_script_setup_true_lang.js +62 -29
- package/dist/components/VCheckbox/VCheckbox.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VChip/VChip.css +1 -1
- package/dist/components/VChip/VChip.d.ts +36 -26
- package/dist/components/VChip/VChip.js.map +1 -1
- package/dist/components/VChip/VChip.vue_vue_type_script_setup_true_lang.js +57 -48
- package/dist/components/VChip/VChip.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VCombobox/VCombobox.css +1 -1
- package/dist/components/VCombobox/VCombobox.d.ts +127 -31
- package/dist/components/VCombobox/VCombobox.js.map +1 -1
- package/dist/components/VCombobox/VCombobox.vue_vue_type_script_setup_true_lang.js +336 -247
- package/dist/components/VCombobox/VCombobox.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VCombobox/VComboboxGroup.css +1 -1
- package/dist/components/VCombobox/VComboboxGroup.d.ts +0 -9
- package/dist/components/VCombobox/VComboboxGroup.js.map +1 -1
- package/dist/components/VCombobox/VComboboxGroup.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/VCombobox/VComboboxGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VCombobox/VComboboxOption.css +1 -1
- package/dist/components/VCombobox/VComboboxOption.d.ts +0 -15
- package/dist/components/VCombobox/VComboboxOption.js.map +1 -1
- package/dist/components/VCombobox/VComboboxOption.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/components/VCombobox/VComboboxOption.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VCombobox/VComboboxSeparator.js.map +1 -1
- package/dist/components/VCombobox/VComboboxSeparator.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VCombobox/infiniteScroll.js.map +1 -1
- package/dist/components/VDataTable/VDataTable.css +1 -1
- package/dist/components/VDataTable/VDataTable.d.ts +50 -28
- package/dist/components/VDataTable/VDataTable.js.map +1 -1
- package/dist/components/VDataTable/VDataTable.vue_vue_type_script_setup_true_lang.js +183 -194
- package/dist/components/VDataTable/VDataTable.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VDateInput/VDateInput.css +1 -1
- package/dist/components/VDateInput/VDateInput.d.ts +90 -42
- package/dist/components/VDateInput/VDateInput.js.map +1 -1
- package/dist/components/VDateInput/VDateInput.vue_vue_type_script_setup_true_lang.js +159 -191
- package/dist/components/VDateInput/VDateInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VDatePicker/VDatePicker.css +1 -1
- package/dist/components/VDatePicker/VDatePicker.d.ts +61 -30
- package/dist/components/VDatePicker/VDatePicker.js.map +1 -1
- package/dist/components/VDatePicker/VDatePicker.vue_vue_type_script_setup_true_lang.js +243 -221
- package/dist/components/VDatePicker/VDatePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VDialog/VDialog.css +1 -1
- package/dist/components/VDialog/VDialog.d.ts +45 -33
- package/dist/components/VDialog/VDialog.js.map +1 -1
- package/dist/components/VDialog/VDialog.vue_vue_type_script_setup_true_lang.js +65 -64
- package/dist/components/VDialog/VDialog.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VDialog/VDialogAlert.d.ts +24 -20
- package/dist/components/VDialog/VDialogAlert.js.map +1 -1
- package/dist/components/VDialog/VDialogAlert.vue_vue_type_script_setup_true_lang.js +36 -25
- package/dist/components/VDialog/VDialogAlert.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VFileInput/VFileInput.css +1 -1
- package/dist/components/VFileInput/VFileInput.d.ts +78 -26
- package/dist/components/VFileInput/VFileInput.js.map +1 -1
- package/dist/components/VFileInput/VFileInput.vue_vue_type_script_setup_true_lang.js +144 -132
- package/dist/components/VFileInput/VFileInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VFilePicker/VFilePicker.css +1 -1
- package/dist/components/VFilePicker/VFilePicker.d.ts +47 -30
- package/dist/components/VFilePicker/VFilePicker.js.map +1 -1
- package/dist/components/VFilePicker/VFilePicker.vue_vue_type_script_setup_true_lang.js +166 -163
- package/dist/components/VFilePicker/VFilePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VFilePicker/fileKind.d.ts +2 -27
- package/dist/components/VFilePicker/fileKind.js +9 -8
- package/dist/components/VFilePicker/fileKind.js.map +1 -1
- package/dist/components/VHotkeys/VHotkeys.css +1 -1
- package/dist/components/VHotkeys/VHotkeys.d.ts +8 -30
- package/dist/components/VHotkeys/VHotkeys.js.map +1 -1
- package/dist/components/VHotkeys/VHotkeys.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/components/VHotkeys/VHotkeys.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VHotkeys/platform.js.map +1 -1
- package/dist/components/VIcon/VIcon.css +1 -1
- package/dist/components/VIcon/VIcon.d.ts +15 -6
- package/dist/components/VIcon/VIcon.js.map +1 -1
- package/dist/components/VIcon/VIcon.vue_vue_type_script_setup_true_lang.js +45 -37
- package/dist/components/VIcon/VIcon.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VIcon/iconProps.js.map +1 -1
- package/dist/components/VIcon/icons/index.d.ts +1 -1
- package/dist/components/VIcon/icons/index.js.map +1 -1
- package/dist/components/VIcon/icons/names.d.ts +1 -1
- package/dist/components/VIcon/icons/names.js.map +1 -1
- package/dist/components/VIcon/resolver.d.ts +3 -3
- package/dist/components/VIcon/resolver.js.map +1 -1
- package/dist/components/VIcon/types.d.ts +12 -12
- package/dist/components/VIconButton/VIconButton.css +1 -1
- package/dist/components/VIconButton/VIconButton.d.ts +28 -11
- package/dist/components/VIconButton/VIconButton.js.map +1 -1
- package/dist/components/VIconButton/VIconButton.vue_vue_type_script_setup_true_lang.js +26 -20
- package/dist/components/VIconButton/VIconButton.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VInput/VInput.css +1 -1
- package/dist/components/VInput/VInput.d.ts +26 -7
- package/dist/components/VInput/VInput.js.map +1 -1
- package/dist/components/VInput/VInput.vue_vue_type_script_setup_true_lang.js +86 -75
- package/dist/components/VInput/VInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VInput/VInputGroup.css +2 -0
- package/dist/components/VInput/VInputGroup.d.ts +47 -0
- package/dist/components/VInput/VInputGroup.js +9 -0
- package/dist/components/VInput/VInputGroup.js.map +1 -0
- package/dist/components/VInput/VInputGroup.vue_vue_type_script_setup_true_lang.js +80 -0
- package/dist/components/VInput/VInputGroup.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VInput/context.d.ts +11 -0
- package/dist/components/VInput/context.js +6 -0
- package/dist/components/VInput/context.js.map +1 -0
- package/dist/components/VInputOTP/VInputOTP.css +1 -1
- package/dist/components/VInputOTP/VInputOTP.d.ts +37 -22
- package/dist/components/VInputOTP/VInputOTP.js.map +1 -1
- package/dist/components/VInputOTP/VInputOTP.vue_vue_type_script_setup_true_lang.js +98 -61
- package/dist/components/VInputOTP/VInputOTP.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VMenu/VMenu.d.ts +23 -30
- package/dist/components/VMenu/VMenu.js.map +1 -1
- package/dist/components/VMenu/VMenu.vue_vue_type_script_setup_true_lang.js +31 -27
- package/dist/components/VMenu/VMenu.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VMenu/VMenuGroup.css +1 -1
- package/dist/components/VMenu/VMenuGroup.d.ts +12 -8
- package/dist/components/VMenu/VMenuGroup.js.map +1 -1
- package/dist/components/VMenu/VMenuGroup.vue_vue_type_script_setup_true_lang.js +11 -11
- package/dist/components/VMenu/VMenuGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VMenu/VMenuItem.css +1 -1
- package/dist/components/VMenu/VMenuItem.d.ts +11 -19
- package/dist/components/VMenu/VMenuItem.js.map +1 -1
- package/dist/components/VMenu/VMenuItem.vue_vue_type_script_setup_true_lang.js +65 -57
- package/dist/components/VMenu/VMenuItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VMenu/VMenuPanel.d.ts +14 -30
- package/dist/components/VMenu/VMenuPanel.js.map +1 -1
- package/dist/components/VMenu/VMenuPanel.vue_vue_type_script_setup_true_lang.js +43 -44
- package/dist/components/VMenu/VMenuPanel.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VMenu/context.d.ts +2 -6
- package/dist/components/VMenu/context.js.map +1 -1
- package/dist/components/VPagination/VPagination.css +1 -1
- package/dist/components/VPagination/VPagination.d.ts +60 -22
- package/dist/components/VPagination/VPagination.js.map +1 -1
- package/dist/components/VPagination/VPagination.vue_vue_type_script_setup_true_lang.js +113 -161
- package/dist/components/VPagination/VPagination.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VPopover/VPopover.css +1 -1
- package/dist/components/VPopover/VPopover.d.ts +26 -7
- package/dist/components/VPopover/VPopover.js.map +1 -1
- package/dist/components/VPopover/VPopover.vue_vue_type_script_setup_true_lang.js +43 -37
- package/dist/components/VPopover/VPopover.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VProgressCircular/VProgressCircular.css +1 -1
- package/dist/components/VProgressCircular/VProgressCircular.d.ts +15 -4
- package/dist/components/VProgressCircular/VProgressCircular.js.map +1 -1
- package/dist/components/VProgressCircular/VProgressCircular.vue_vue_type_script_setup_true_lang.js +32 -30
- package/dist/components/VProgressCircular/VProgressCircular.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VProgressLinear/VProgressLinear.css +1 -1
- package/dist/components/VProgressLinear/VProgressLinear.d.ts +23 -8
- package/dist/components/VProgressLinear/VProgressLinear.js.map +1 -1
- package/dist/components/VProgressLinear/VProgressLinear.vue_vue_type_script_setup_true_lang.js +34 -32
- package/dist/components/VProgressLinear/VProgressLinear.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VRadio/VRadio.css +1 -1
- package/dist/components/VRadio/VRadio.d.ts +36 -18
- package/dist/components/VRadio/VRadio.js.map +1 -1
- package/dist/components/VRadio/VRadio.vue_vue_type_script_setup_true_lang.js +55 -26
- package/dist/components/VRadio/VRadio.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VSeparator/VSeparator.d.ts +4 -2
- package/dist/components/VSeparator/VSeparator.js.map +1 -1
- package/dist/components/VSeparator/VSeparator.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VSideNavigation/VSideNavigation.css +1 -1
- package/dist/components/VSideNavigation/VSideNavigation.d.ts +5 -19
- package/dist/components/VSideNavigation/VSideNavigation.js.map +1 -1
- package/dist/components/VSideNavigation/VSideNavigation.vue_vue_type_script_setup_true_lang.js +5 -5
- package/dist/components/VSideNavigation/VSideNavigation.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VSideNavigation/VSideNavigationGroup.css +1 -1
- package/dist/components/VSideNavigation/VSideNavigationGroup.d.ts +9 -17
- package/dist/components/VSideNavigation/VSideNavigationGroup.js.map +1 -1
- package/dist/components/VSideNavigation/VSideNavigationGroup.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/components/VSideNavigation/VSideNavigationGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VSideNavigation/VSideNavigationItem.css +1 -1
- package/dist/components/VSideNavigation/VSideNavigationItem.d.ts +22 -30
- package/dist/components/VSideNavigation/VSideNavigationItem.js.map +1 -1
- package/dist/components/VSideNavigation/VSideNavigationItem.vue_vue_type_script_setup_true_lang.js +77 -87
- package/dist/components/VSideNavigation/VSideNavigationItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VSideNavigation/context.d.ts +0 -14
- package/dist/components/VSideNavigation/context.js.map +1 -1
- package/dist/components/VSkeletonLoader/VSkeletonLoader.css +1 -1
- package/dist/components/VSkeletonLoader/VSkeletonLoader.d.ts +9 -9
- package/dist/components/VSkeletonLoader/VSkeletonLoader.js.map +1 -1
- package/dist/components/VSkeletonLoader/VSkeletonLoader.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VSlider/VSlider.css +1 -1
- package/dist/components/VSlider/VSlider.d.ts +52 -27
- package/dist/components/VSlider/VSlider.js.map +1 -1
- package/dist/components/VSlider/VSlider.vue_vue_type_script_setup_true_lang.js +202 -118
- package/dist/components/VSlider/VSlider.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VSnackbar/VSnackbar.css +1 -1
- package/dist/components/VSnackbar/VSnackbar.d.ts +0 -23
- package/dist/components/VSnackbar/VSnackbar.js.map +1 -1
- package/dist/components/VSnackbar/VSnackbar.vue_vue_type_script_setup_true_lang.js +38 -38
- package/dist/components/VSnackbar/VSnackbar.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VSnackbar/state.d.ts +0 -27
- package/dist/components/VSnackbar/state.js.map +1 -1
- package/dist/components/VSpinner/VSpinner.css +1 -1
- package/dist/components/VSpinner/VSpinner.d.ts +6 -6
- package/dist/components/VSpinner/VSpinner.js.map +1 -1
- package/dist/components/VSpinner/VSpinner.vue_vue_type_script_setup_true_lang.js +10 -9
- package/dist/components/VSpinner/VSpinner.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VSwitch/VSwitch.css +1 -1
- package/dist/components/VSwitch/VSwitch.d.ts +35 -13
- package/dist/components/VSwitch/VSwitch.js.map +1 -1
- package/dist/components/VSwitch/VSwitch.vue_vue_type_script_setup_true_lang.js +62 -21
- package/dist/components/VSwitch/VSwitch.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VTabs/VTab.css +1 -1
- package/dist/components/VTabs/VTab.d.ts +12 -12
- package/dist/components/VTabs/VTab.js.map +1 -1
- package/dist/components/VTabs/VTab.vue_vue_type_script_setup_true_lang.js +36 -24
- package/dist/components/VTabs/VTab.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VTabs/VTabPanel.d.ts +2 -10
- package/dist/components/VTabs/VTabPanel.js.map +1 -1
- package/dist/components/VTabs/VTabPanel.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/components/VTabs/VTabPanel.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VTabs/VTabs.css +1 -1
- package/dist/components/VTabs/VTabs.d.ts +27 -18
- package/dist/components/VTabs/VTabs.js.map +1 -1
- package/dist/components/VTabs/VTabs.vue_vue_type_script_setup_true_lang.js +92 -81
- package/dist/components/VTabs/VTabs.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VTabs/context.d.ts +9 -19
- package/dist/components/VTabs/context.js +1 -1
- package/dist/components/VTabs/context.js.map +1 -1
- package/dist/components/VTextarea/VTextarea.css +1 -1
- package/dist/components/VTextarea/VTextarea.d.ts +34 -6
- package/dist/components/VTextarea/VTextarea.js.map +1 -1
- package/dist/components/VTextarea/VTextarea.vue_vue_type_script_setup_true_lang.js +91 -74
- package/dist/components/VTextarea/VTextarea.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VTimeInput/VTimeInput.css +1 -1
- package/dist/components/VTimeInput/VTimeInput.d.ts +123 -33
- package/dist/components/VTimeInput/VTimeInput.js.map +1 -1
- package/dist/components/VTimeInput/VTimeInput.vue_vue_type_script_setup_true_lang.js +294 -291
- package/dist/components/VTimeInput/VTimeInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VTimeInput/search.d.ts +24 -0
- package/dist/components/VTimeInput/search.js +22 -0
- package/dist/components/VTimeInput/search.js.map +1 -0
- package/dist/components/VTimePicker/VTimePicker.css +1 -1
- package/dist/components/VTimePicker/VTimePicker.d.ts +51 -30
- package/dist/components/VTimePicker/VTimePicker.js.map +1 -1
- package/dist/components/VTimePicker/VTimePicker.vue_vue_type_script_setup_true_lang.js +216 -151
- package/dist/components/VTimePicker/VTimePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VTimePicker/limits.d.ts +88 -0
- package/dist/components/VTimePicker/limits.js +70 -0
- package/dist/components/VTimePicker/limits.js.map +1 -0
- package/dist/components/VToast/VToast.css +1 -1
- package/dist/components/VToast/VToast.d.ts +0 -10
- package/dist/components/VToast/VToast.js.map +1 -1
- package/dist/components/VToast/VToast.vue_vue_type_script_setup_true_lang.js +10 -10
- package/dist/components/VToast/VToast.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VToast/VToaster.css +1 -1
- package/dist/components/VToast/VToaster.d.ts +0 -17
- package/dist/components/VToast/VToaster.js.map +1 -1
- package/dist/components/VToast/VToaster.vue_vue_type_script_setup_true_lang.js +29 -28
- package/dist/components/VToast/VToaster.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VToast/state.d.ts +10 -19
- package/dist/components/VToast/state.js +1 -1
- package/dist/components/VToast/state.js.map +1 -1
- package/dist/components/VToggle/VToggle.css +1 -1
- package/dist/components/VToggle/VToggle.d.ts +56 -11
- package/dist/components/VToggle/VToggle.js.map +1 -1
- package/dist/components/VToggle/VToggle.vue_vue_type_script_setup_true_lang.js +80 -46
- package/dist/components/VToggle/VToggle.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VToggle/VToggleItem.d.ts +16 -2
- package/dist/components/VToggle/VToggleItem.js +0 -2
- package/dist/components/VToggle/VToggleItem.js.map +1 -1
- package/dist/components/VToggle/VToggleItem.vue_vue_type_script_setup_true_lang.js +23 -15
- package/dist/components/VToggle/VToggleItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VToggle/context.d.ts +4 -24
- package/dist/components/VToggle/context.js.map +1 -1
- package/dist/components/VTooltip/VTooltip.css +1 -1
- package/dist/components/VTooltip/VTooltip.d.ts +9 -33
- package/dist/components/VTooltip/VTooltip.js.map +1 -1
- package/dist/components/VTooltip/VTooltip.vue_vue_type_script_setup_true_lang.js +28 -24
- package/dist/components/VTooltip/VTooltip.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VTypography/VTypography.js.map +1 -1
- package/dist/components/VTypography/VTypography.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/composables/useAriaLabel.d.ts +0 -17
- package/dist/composables/useAriaLabel.js.map +1 -1
- package/dist/composables/useClearable.d.ts +42 -0
- package/dist/composables/useClearable.js +19 -0
- package/dist/composables/useClearable.js.map +1 -0
- package/dist/composables/useControlShape.d.ts +22 -0
- package/dist/composables/useControlShape.js +13 -0
- package/dist/composables/useControlShape.js.map +1 -0
- package/dist/composables/useDetailsOpen.d.ts +22 -0
- package/dist/composables/useDetailsOpen.js +21 -0
- package/dist/composables/useDetailsOpen.js.map +1 -0
- package/dist/composables/useFieldIds.d.ts +0 -15
- package/dist/composables/useFieldIds.js +8 -7
- package/dist/composables/useFieldIds.js.map +1 -1
- package/dist/composables/useFieldPanel.d.ts +21 -18
- package/dist/composables/useFieldPanel.js +43 -23
- package/dist/composables/useFieldPanel.js.map +1 -1
- package/dist/composables/useFileDrop.d.ts +0 -22
- package/dist/composables/useFileDrop.js.map +1 -1
- package/dist/composables/useFileField.d.ts +45 -17
- package/dist/composables/useFileField.js +40 -20
- package/dist/composables/useFileField.js.map +1 -1
- package/dist/composables/useFocusoutDismiss.d.ts +0 -15
- package/dist/composables/useFocusoutDismiss.js.map +1 -1
- package/dist/composables/useIconClickHandlers.d.ts +29 -14
- package/dist/composables/useIconClickHandlers.js +15 -5
- package/dist/composables/useIconClickHandlers.js.map +1 -1
- package/dist/composables/useInertLink.d.ts +20 -0
- package/dist/composables/useInertLink.js +23 -0
- package/dist/composables/useInertLink.js.map +1 -0
- package/dist/composables/useMaskedField.d.ts +33 -10
- package/dist/composables/useMaskedField.js +45 -1
- package/dist/composables/useMaskedField.js.map +1 -1
- package/dist/composables/usePopover.d.ts +15 -1
- package/dist/composables/usePopover.js +23 -8
- package/dist/composables/usePopover.js.map +1 -1
- package/dist/composables/useProgressValue.d.ts +5 -8
- package/dist/composables/useProgressValue.js +6 -3
- package/dist/composables/useProgressValue.js.map +1 -1
- package/dist/composables/useRootAttrs.d.ts +12 -19
- package/dist/composables/useRootAttrs.js.map +1 -1
- package/dist/composables/useTimer.d.ts +8 -10
- package/dist/composables/useTimer.js.map +1 -1
- package/dist/i18n/en.d.ts +2 -10
- package/dist/i18n/en.js +18 -19
- package/dist/i18n/en.js.map +1 -1
- package/dist/i18n/fr.d.ts +2 -18
- package/dist/i18n/fr.js +18 -19
- package/dist/i18n/fr.js.map +1 -1
- package/dist/i18n/state.d.ts +44 -47
- package/dist/i18n/state.js +20 -17
- package/dist/i18n/state.js.map +1 -1
- package/dist/i18n/types.d.ts +53 -44
- package/dist/icons.d.ts +3 -3
- package/dist/index.d.ts +43 -17
- package/dist/index.js +45 -44
- package/dist/styles.css +1 -1
- package/dist/tokens/css.js.map +1 -1
- package/dist/tokens/index.d.ts +5 -1
- package/dist/tokens/primitives.js.map +1 -1
- package/dist/tokens/semantic.d.ts +5 -1
- package/dist/tokens/semantic.js +6 -2
- package/dist/tokens/semantic.js.map +1 -1
- package/dist/tokens/themes/dark.js.map +1 -1
- package/dist/tokens/types.d.ts +7 -15
- package/dist/tokens/types.js.map +1 -1
- package/dist/tokens.json +25 -5
- package/dist/types.d.ts +24 -0
- package/dist/utils/array.d.ts +3 -6
- package/dist/utils/array.js.map +1 -1
- package/dist/utils/arrowNav.d.ts +17 -17
- package/dist/utils/arrowNav.js +5 -3
- package/dist/utils/arrowNav.js.map +1 -1
- package/dist/utils/chip.d.ts +11 -15
- package/dist/utils/chip.js.map +1 -1
- package/dist/utils/css.d.ts +22 -11
- package/dist/utils/css.js +5 -2
- package/dist/utils/css.js.map +1 -1
- package/dist/utils/date.d.ts +42 -19
- package/dist/utils/date.js +97 -98
- package/dist/utils/date.js.map +1 -1
- package/dist/utils/direction.d.ts +6 -12
- package/dist/utils/direction.js.map +1 -1
- package/dist/utils/env.d.ts +5 -6
- package/dist/utils/file.d.ts +46 -58
- package/dist/utils/file.js +43 -36
- package/dist/utils/file.js.map +1 -1
- package/dist/utils/focus.d.ts +8 -17
- package/dist/utils/focus.js.map +1 -1
- package/dist/utils/hostWarns.d.ts +12 -0
- package/dist/utils/hostWarns.js +6 -0
- package/dist/utils/hostWarns.js.map +1 -0
- package/dist/utils/ids.d.ts +10 -0
- package/dist/utils/ids.js +8 -0
- package/dist/utils/ids.js.map +1 -0
- package/dist/utils/matcher.d.ts +5 -9
- package/dist/utils/matcher.js.map +1 -1
- package/dist/utils/memo.d.ts +12 -0
- package/dist/utils/memo.js +9 -0
- package/dist/utils/memo.js.map +1 -0
- package/dist/utils/number.d.ts +3 -4
- package/dist/utils/number.js.map +1 -1
- package/dist/utils/text.d.ts +20 -9
- package/dist/utils/text.js +17 -3
- package/dist/utils/text.js.map +1 -1
- package/dist/utils/time.d.ts +53 -61
- package/dist/utils/time.js +49 -45
- package/dist/utils/time.js.map +1 -1
- package/dist/utils/vnode.d.ts +8 -15
- package/dist/utils/vnode.js.map +1 -1
- package/package.json +6 -6
- package/dist/components/VToggle/VToggleItem.css +0 -2
|
@@ -1,39 +1,40 @@
|
|
|
1
1
|
import { useMessages as e } from "../../i18n/state.js";
|
|
2
|
-
import t from "
|
|
3
|
-
import n from "../
|
|
4
|
-
import r from "../
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
2
|
+
import { cssSize as t } from "../../utils/css.js";
|
|
3
|
+
import n from "../VIcon/VIcon.js";
|
|
4
|
+
import r from "../VTypography/VTypography.js";
|
|
5
|
+
import i from "../VIconButton/VIconButton.js";
|
|
6
|
+
import { close as a } from "../VIcon/icons/close.js";
|
|
7
|
+
import { Fragment as o, computed as s, createBlock as c, createCommentVNode as l, createElementBlock as u, createElementVNode as d, createTextVNode as f, createVNode as p, defineComponent as m, mergeModels as h, mergeProps as g, nextTick as _, onMounted as v, openBlock as y, ref as b, renderSlot as x, toDisplayString as S, unref as C, useAttrs as w, useId as T, useModel as E, watch as D, withCtx as O } from "vue";
|
|
7
8
|
//#region src/components/VDialog/VDialog.vue?vue&type=script&setup=true&lang.ts
|
|
8
|
-
var
|
|
9
|
+
var k = [
|
|
9
10
|
"role",
|
|
10
11
|
"aria-labelledby",
|
|
11
12
|
"aria-describedby"
|
|
12
|
-
],
|
|
13
|
+
], A = { class: "v-dialog-header" }, j = { class: "v-dialog-titles" }, M = {
|
|
13
14
|
key: 0,
|
|
14
15
|
class: "v-dialog-header-actions"
|
|
15
|
-
},
|
|
16
|
+
}, N = { class: "v-dialog-scroll" }, P = { class: "v-dialog-body" }, F = {
|
|
16
17
|
key: 0,
|
|
17
18
|
class: "v-dialog-footer"
|
|
18
|
-
},
|
|
19
|
+
}, I = /*@__PURE__*/ m({
|
|
19
20
|
inheritAttrs: !1,
|
|
20
21
|
__name: "VDialog",
|
|
21
|
-
props: /*@__PURE__*/
|
|
22
|
+
props: /*@__PURE__*/ h({
|
|
22
23
|
title: { default: void 0 },
|
|
23
24
|
subtitle: { default: void 0 },
|
|
24
|
-
width: { default:
|
|
25
|
+
width: { default: void 0 },
|
|
25
26
|
role: { default: "dialog" },
|
|
26
|
-
|
|
27
|
+
hideClose: {
|
|
27
28
|
type: Boolean,
|
|
28
|
-
default: !
|
|
29
|
+
default: !1
|
|
29
30
|
},
|
|
30
|
-
|
|
31
|
+
persistentBackdrop: {
|
|
31
32
|
type: Boolean,
|
|
32
|
-
default: !
|
|
33
|
+
default: !1
|
|
33
34
|
},
|
|
34
|
-
|
|
35
|
+
persistentEscape: {
|
|
35
36
|
type: Boolean,
|
|
36
|
-
default: !
|
|
37
|
+
default: !1
|
|
37
38
|
},
|
|
38
39
|
closeLabel: { default: void 0 }
|
|
39
40
|
}, {
|
|
@@ -44,91 +45,91 @@ var O = [
|
|
|
44
45
|
openModifiers: {}
|
|
45
46
|
}),
|
|
46
47
|
emits: ["update:open"],
|
|
47
|
-
setup(
|
|
48
|
-
let
|
|
49
|
-
...
|
|
50
|
-
closedby:
|
|
51
|
-
})),
|
|
52
|
-
function
|
|
53
|
-
|
|
48
|
+
setup(m, { expose: h }) {
|
|
49
|
+
let I = m, L = e(), R = s(() => I.closeLabel ?? L.value.common.close), z = E(m, "open"), B = w(), V = b(null), H = T(), U = T(), W = s(() => I.persistentBackdrop ? I.persistentEscape ? "none" : "closerequest" : "any"), G = s(() => ({
|
|
50
|
+
...B,
|
|
51
|
+
closedby: W.value
|
|
52
|
+
})), K = b(z.value), q = Promise.resolve();
|
|
53
|
+
function J() {
|
|
54
|
+
return z.value = !0, _(() => q);
|
|
54
55
|
}
|
|
55
|
-
function
|
|
56
|
-
|
|
56
|
+
function Y() {
|
|
57
|
+
V.value?.close();
|
|
57
58
|
}
|
|
58
|
-
let
|
|
59
|
-
onClick:
|
|
59
|
+
let X = s(() => ({
|
|
60
|
+
onClick: J,
|
|
60
61
|
"aria-haspopup": "dialog"
|
|
61
62
|
}));
|
|
62
|
-
|
|
63
|
-
e ? (
|
|
64
|
-
}),
|
|
65
|
-
|
|
63
|
+
D(z, (e) => {
|
|
64
|
+
e ? (K.value = !0, q = _(() => V.value?.showModal())) : (V.value?.close(), K.value = !1);
|
|
65
|
+
}), v(() => {
|
|
66
|
+
z.value && V.value?.showModal();
|
|
66
67
|
});
|
|
67
|
-
function
|
|
68
|
-
|
|
68
|
+
function Z() {
|
|
69
|
+
z.value = !1;
|
|
69
70
|
}
|
|
70
|
-
return
|
|
71
|
-
show:
|
|
72
|
-
close:
|
|
73
|
-
el:
|
|
74
|
-
}), (e,
|
|
71
|
+
return h({
|
|
72
|
+
show: J,
|
|
73
|
+
close: Y,
|
|
74
|
+
el: V
|
|
75
|
+
}), (e, s) => (y(), u(o, null, [x(e.$slots, "trigger", { triggerProps: X.value }), K.value ? (y(), u("dialog", g({
|
|
75
76
|
key: 0,
|
|
76
77
|
ref_key: "dialogEl",
|
|
77
|
-
ref:
|
|
78
|
-
},
|
|
78
|
+
ref: V
|
|
79
|
+
}, G.value, {
|
|
79
80
|
class: "v-dialog",
|
|
80
|
-
style: { "--dialog-width":
|
|
81
|
-
role:
|
|
82
|
-
"aria-labelledby":
|
|
83
|
-
"aria-describedby":
|
|
84
|
-
onClose:
|
|
81
|
+
style: { "--dialog-width": C(t)(m.width) },
|
|
82
|
+
role: m.role === "alertdialog" ? "alertdialog" : void 0,
|
|
83
|
+
"aria-labelledby": m.title ? C(H) : void 0,
|
|
84
|
+
"aria-describedby": m.subtitle ? C(U) : void 0,
|
|
85
|
+
onClose: Z
|
|
85
86
|
}), [
|
|
86
|
-
|
|
87
|
+
d("header", A, [x(e.$slots, "header", {}, () => [d("div", j, [m.title ? (y(), c(r, {
|
|
87
88
|
key: 0,
|
|
88
|
-
id:
|
|
89
|
+
id: C(H),
|
|
89
90
|
as: "h2",
|
|
90
91
|
variant: "heading-3",
|
|
91
92
|
class: "v-dialog-title"
|
|
92
93
|
}, {
|
|
93
|
-
default:
|
|
94
|
+
default: O(() => [f(S(m.title), 1)]),
|
|
94
95
|
_: 1
|
|
95
|
-
}, 8, ["id"])) :
|
|
96
|
+
}, 8, ["id"])) : l("", !0), m.subtitle ? (y(), c(r, {
|
|
96
97
|
key: 1,
|
|
97
|
-
id:
|
|
98
|
+
id: C(U),
|
|
98
99
|
variant: "subtitle",
|
|
99
100
|
tone: "muted",
|
|
100
101
|
class: "v-dialog-subtitle"
|
|
101
102
|
}, {
|
|
102
|
-
default:
|
|
103
|
+
default: O(() => [f(S(m.subtitle), 1)]),
|
|
103
104
|
_: 1
|
|
104
|
-
}, 8, ["id"])) :
|
|
105
|
+
}, 8, ["id"])) : l("", !0)])]), !m.hideClose || e.$slots["header-actions"] ? (y(), u("div", M, [x(e.$slots, "header-actions"), m.hideClose ? l("", !0) : (y(), c(i, {
|
|
105
106
|
key: 0,
|
|
106
107
|
class: "v-dialog-close",
|
|
107
|
-
label:
|
|
108
|
+
label: R.value,
|
|
108
109
|
variant: "ghost",
|
|
109
110
|
tone: "neutral",
|
|
110
111
|
size: "sm",
|
|
111
|
-
onClick:
|
|
112
|
+
onClick: Y
|
|
112
113
|
}, {
|
|
113
|
-
default:
|
|
114
|
+
default: O(() => [p(n, { name: C(a) }, null, 8, ["name"])]),
|
|
114
115
|
_: 1
|
|
115
|
-
}, 8, ["label"]))
|
|
116
|
-
|
|
117
|
-
|
|
116
|
+
}, 8, ["label"]))])) : l("", !0)]),
|
|
117
|
+
d("div", N, [
|
|
118
|
+
s[0] ||= d("span", {
|
|
118
119
|
class: "v-dialog-edge v-dialog-edge--top",
|
|
119
120
|
"aria-hidden": "true"
|
|
120
121
|
}, null, -1),
|
|
121
|
-
|
|
122
|
-
|
|
122
|
+
d("div", P, [x(e.$slots, "default")]),
|
|
123
|
+
s[1] ||= d("span", {
|
|
123
124
|
class: "v-dialog-edge v-dialog-edge--bottom",
|
|
124
125
|
"aria-hidden": "true"
|
|
125
126
|
}, null, -1)
|
|
126
127
|
]),
|
|
127
|
-
e.$slots.footer ? (
|
|
128
|
-
], 16,
|
|
128
|
+
e.$slots.footer ? (y(), u("footer", F, [x(e.$slots, "footer")])) : l("", !0)
|
|
129
|
+
], 16, k)) : l("", !0)], 64));
|
|
129
130
|
}
|
|
130
131
|
});
|
|
131
132
|
//#endregion
|
|
132
|
-
export {
|
|
133
|
+
export { I as default };
|
|
133
134
|
|
|
134
135
|
//# sourceMappingURL=VDialog.vue_vue_type_script_setup_true_lang.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VDialog.vue_vue_type_script_setup_true_lang.js","names":["$slots"],"sources":["../../../src/components/VDialog/VDialog.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed, nextTick, onMounted, ref, useAttrs, useId, watch } from 'vue'\n\nimport VIcon from '../VIcon/VIcon.vue'\nimport { close as closeIcon } from '../VIcon/icons/close'\nimport VIconButton from '../VIconButton/VIconButton.vue'\nimport VTypography from '../VTypography/VTypography.vue'\nimport { useMessages } from '../../i18n/state'\n\n// @core\n/**\n * A modal dialog: it takes over the page until the reader answers it.\n *\n * Almost everything that makes a modal correct comes free with the native `<dialog>`\n * element opened as a modal — it is drawn above the whole page, the background is\n * dimmed and made unusable, the focus is trapped inside it and handed back to the\n * trigger on closing, and whether a click outside or Escape dismisses it is declared\n * with an attribute rather than coded.\n *\n * The ONLY behavioural JavaScript is the bridge between `v-model:open` and the two\n * methods the platform offers no declarative equivalent for: opening as a modal, and\n * closing.\n */\ninterface DialogProps {\n /**\n * The title of the dialog, which also names it for assistive technology. It is\n * ignored when the `#header` slot replaces the whole header.\n */\n title?: string\n /** A line under the title, explaining what the dialog is asking. */\n subtitle?: string\n /**\n * How wide the dialog is, in any CSS unit. It is never allowed to exceed the width\n * of the viewport.\n */\n width?: string\n /**\n * What kind of dialog this is. `alertdialog` is for one that must be answered\n * explicitly, and it makes screen readers announce it more insistently — see\n * VDialogAlert, which is exactly that.\n */\n role?: 'dialog' | 'alertdialog'\n /** Shows the close cross in the header. */\n closable?: boolean\n /** Lets a click outside the dialog close it. */\n closeOnBackdrop?: boolean\n /** Lets the Escape key close the dialog. */\n closeOnEscape?: boolean\n /** What the close cross does, in words. It falls back to the design system dictionary. */\n closeLabel?: string\n}\n\nconst props = withDefaults(defineProps<DialogProps>(), {\n title: undefined,\n subtitle: undefined,\n width: '400px',\n role: 'dialog',\n closable: true,\n closeOnBackdrop: true,\n closeOnEscape: true,\n closeLabel: undefined,\n})\n\nconst m = useMessages()\nconst resolvedCloseLabel = computed(() => props.closeLabel ?? m.value.common.close)\n\nconst open = defineModel<boolean>('open', { default: false })\n\n/** What the trigger has to carry: the click that opens the dialog, and the fact that it does. */\ntype TriggerProps = {\n onClick: () => void\n 'aria-haspopup': 'dialog'\n}\n\ndefineSlots<{\n /** The body of the dialog. This is the part that scrolls when there is too much of it. */\n default(): unknown\n /** Replaces the title and subtitle block with content of your own. */\n header?(): unknown\n /** Extra controls in the header, placed before the close cross — a menu, a full-screen toggle. */\n headerActions?(): unknown\n /** The buttons at the foot of the dialog. */\n footer?(): unknown\n /**\n * The button that opens the dialog. Bind the `triggerProps` it receives onto it. It\n * stays rendered at all times, unlike the dialog itself.\n */\n trigger?(props: { triggerProps: TriggerProps }): unknown\n}>()\n\ndefineOptions({ inheritAttrs: false })\n\nconst attrs = useAttrs()\nconst dialogEl = ref<HTMLDialogElement | null>(null)\nconst titleId = useId()\nconst subtitleId = useId()\n\n/**\n * Which dismissals the browser itself accepts, declared as an attribute rather than\n * handled in code: everything, Escape alone, or nothing.\n *\n * One combination cannot be expressed that way — a click outside allowed while Escape\n * is not — and it falls back to allowing both. Nothing in the design system asks for\n * it, and it would be a strange thing to want.\n */\nconst closedby = computed(() =>\n props.closeOnBackdrop ? 'any' : props.closeOnEscape ? 'closerequest' : 'none',\n)\n\n// @fallback\n// The `closedby` attribute is newer than the type definitions shipped with\n// TypeScript, so writing it directly in the template would be reported as an unknown\n// attribute. Passing it inside a bound object goes through the same path as any\n// forwarded attribute, which is not checked element by element. Vue still merges the\n// `class` and `style` it may contain with the static ones below.\nconst rootAttrs = computed(() => ({ ...attrs, closedby: closedby.value }))\n\n// The dialog and its content only exist while it is open, which also spares the page\n// whatever heavy thing it contains. Every opening therefore builds a BRAND NEW\n// element, so it is always opened as a modal from a clean slate, and closing removes\n// it entirely — nothing is left behind to swallow clicks, and reopening cannot race\n// with a closing that is still finishing. The trigger, by contrast, stays rendered at\n// all times.\nconst rendered = ref(open.value)\n\nfunction show() {\n open.value = true\n}\n\nfunction requestClose() {\n // Closing the element is enough: the browser then fires its own close event, which\n // is what puts the model back in step below.\n dialogEl.value?.close()\n}\n\nconst triggerProps = computed<TriggerProps>(() => ({\n onClick: show,\n 'aria-haspopup': 'dialog',\n}))\n\n// The `<dialog>` element is asymmetric in a way that shapes this whole bridge: it\n// announces every closing with an event, but announces nothing at all when it opens —\n// where a popover reports both. So the two directions are not written the same way:\n//\n// - opening: render the element, then, once Vue has actually put it in the document,\n// open it as a modal;\n// - closing: whatever closed it — the cross, our own call, Escape, a click outside —\n// the browser's close event is what puts the model back in step, and only then is\n// the element removed.\nwatch(open, async (value) => {\n if (value) {\n rendered.value = true\n await nextTick() // the brand new <dialog> has to exist before it can be opened\n dialogEl.value?.showModal()\n } else {\n dialogEl.value?.close()\n rendered.value = false\n }\n})\n\n// @ssr\nonMounted(() => {\n // A watcher does not run during the server render, so a dialog asked to be open from\n // the start would never be opened. The element is already there — the flag above was\n // initialized from the model — it just has to be told to show itself.\n if (open.value) dialogEl.value?.showModal()\n})\n\n// The browser's own close event, whatever caused it, is what brings the model back in\n// step with reality.\nfunction onClose() {\n open.value = false\n}\n\ndefineExpose({ show, close: requestClose, el: dialogEl })\n</script>\n\n<template>\n <slot name=\"trigger\" :trigger-props=\"triggerProps\" />\n <dialog\n v-if=\"rendered\"\n ref=\"dialogEl\"\n v-bind=\"rootAttrs\"\n class=\"v-dialog\"\n :style=\"{ '--dialog-width': width }\"\n :role=\"role === 'alertdialog' ? 'alertdialog' : undefined\"\n :aria-labelledby=\"title ? titleId : undefined\"\n :aria-describedby=\"subtitle ? subtitleId : undefined\"\n @close=\"onClose\"\n >\n <!--\n The header and the footer stay put while only the body scrolls, so the scrollbar\n is confined to the body and never runs along them.\n\n The lines that appear under the header and above the footer once the body is\n scrolled are drawn by two sentinels stuck INSIDE the scrolling area, and not by\n the header and footer themselves: a container query can only style what is inside\n the container it asks about, never a sibling of it.\n -->\n <header class=\"v-dialog-header\">\n <slot name=\"header\">\n <div class=\"v-dialog-titles\">\n <VTypography\n v-if=\"title\"\n :id=\"titleId\"\n as=\"h2\"\n variant=\"heading-3\"\n class=\"v-dialog-title\"\n >\n {{ title }}\n </VTypography>\n <VTypography\n v-if=\"subtitle\"\n :id=\"subtitleId\"\n variant=\"subtitle\"\n tone=\"muted\"\n class=\"v-dialog-subtitle\"\n >\n {{ subtitle }}\n </VTypography>\n </div>\n </slot>\n <div v-if=\"closable || $slots.headerActions\" class=\"v-dialog-header-actions\">\n <slot name=\"headerActions\" />\n <VIconButton\n v-if=\"closable\"\n class=\"v-dialog-close\"\n :label=\"resolvedCloseLabel\"\n variant=\"ghost\"\n tone=\"neutral\"\n size=\"sm\"\n @click=\"requestClose\"\n >\n <VIcon :name=\"closeIcon\" />\n </VIconButton>\n </div>\n </header>\n <div class=\"v-dialog-scroll\">\n <span class=\"v-dialog-edge v-dialog-edge--top\" aria-hidden=\"true\" />\n <div class=\"v-dialog-body\">\n <slot />\n </div>\n <span class=\"v-dialog-edge v-dialog-edge--bottom\" aria-hidden=\"true\" />\n </div>\n <footer v-if=\"$slots.footer\" class=\"v-dialog-footer\">\n <slot name=\"footer\" />\n </footer>\n </dialog>\n</template>\n\n<style>\n@layer vectis.components {\n .v-dialog {\n /* The width comes from the prop, set inline. Whatever it asks for, the dialog is\n never allowed past the viewport, margins included. */\n inline-size: var(--dialog-width);\n max-inline-size: calc(100dvi - 2 * var(--vectis-space-4));\n max-block-size: calc(100dvb - 2 * var(--vectis-space-4));\n /* This puts the dialog back in the middle of the screen. The browser centres a\n modal with an automatic margin, which the design system's own reset — where\n every element loses its margins — had removed; restoring it here works because\n the component layer is stronger than the reset one. */\n margin: auto;\n /* The header and footer stay put while only the body scrolls, and hiding the\n overflow is what keeps the content inside the rounded corners. */\n display: flex;\n flex-direction: column;\n overflow: hidden;\n padding: 0;\n border: none;\n border-radius: var(--vectis-radius-overlay);\n background: var(--vectis-color-surface-overlay);\n color: var(--vectis-color-text);\n box-shadow: var(--vectis-shadow-xl);\n font-family: var(--vectis-text-family);\n }\n\n /*\n * An indispensable guard. The browser hides a closed dialog with a rule of its own,\n * but any display we declare above beats it — so without this, a closed dialog would\n * sit in the page at the top left, swallowing clicks.\n *\n * It also covers the two moments where the element exists without being open yet: the\n * frame between rendering it and opening it, and the server-rendered markup. The\n * popovers have the very same guard.\n */\n .v-dialog:not([open]) {\n display: none;\n }\n\n /* Opening a modal puts the focus on the dialog itself. No ring is drawn around the\n whole thing for that: the focus a reader needs to see is the one on the controls\n inside. */\n .v-dialog:focus-visible {\n outline: none;\n }\n\n .v-dialog-scroll {\n /* The ONLY part that scrolls. It takes whatever room is left between the header\n and the footer, which is what keeps the scrollbar confined to it. The zero\n minimum is load-bearing: without it a flex item refuses to shrink below its\n content, and nothing would ever scroll. */\n flex: 1 1 auto;\n min-block-size: 0;\n overflow-y: auto;\n display: flex;\n flex-direction: column;\n /* This makes the box something its descendants can ask questions about — namely\n whether there is content hidden above or below. It adds no containment of size. */\n container-type: scroll-state;\n }\n\n /*\n * The two sentinels: hairlines stuck to the top and the bottom of the scrolling\n * area, and descendants of it, which is what allows them to ask about its scroll\n * state. Their negative margins mean they occupy no space at all. They are\n * transparent until the rules further down reveal them.\n */\n .v-dialog-edge {\n flex: none;\n block-size: 1px;\n position: sticky;\n background: transparent;\n }\n\n .v-dialog-edge--top {\n inset-block-start: 0;\n margin-block-end: -1px;\n }\n\n .v-dialog-edge--bottom {\n inset-block-end: 0;\n margin-block-start: -1px;\n }\n\n .v-dialog-header {\n flex: none; /* stays at the top, outside whatever scrolls */\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n gap: var(--vectis-space-4);\n padding: var(--vectis-space-6) var(--vectis-space-6) var(--vectis-space-3);\n }\n\n .v-dialog-titles {\n display: flex;\n flex-direction: column;\n min-inline-size: 0;\n }\n\n /* The title and the subtitle are rendered by VTypography, which carries their type.\n Their classes remain as hooks, for a consumer's overrides and for the tests. */\n\n .v-dialog-header-actions {\n display: flex;\n align-items: center;\n gap: var(--vectis-space-1);\n /* The cross is a button, so it carries invisible padding of its own; pulling the\n row back by that amount is what makes the glyph line up with the header's edge\n rather than floating inside it. */\n margin-block-start: calc(-1 * var(--vectis-space-1));\n margin-inline-end: calc(-1 * var(--vectis-space-2));\n }\n\n .v-dialog-body {\n /* Short content is stretched to fill the space, so the footer stays at the bottom\n of the dialog rather than floating halfway up; long content keeps its natural\n height, overflows, and is what scrolls. */\n flex: 1 0 auto;\n padding: var(--vectis-space-1) var(--vectis-space-6) var(--vectis-space-3);\n color: var(--vectis-color-text);\n font-size: var(--vectis-text-body-md-size);\n line-height: var(--vectis-text-body-md-leading);\n }\n\n .v-dialog-footer {\n flex: none; /* stays at the bottom, outside whatever scrolls */\n display: flex;\n align-items: center;\n justify-content: flex-end;\n flex-wrap: wrap;\n gap: var(--vectis-space-3);\n padding: var(--vectis-space-3) var(--vectis-space-6) var(--vectis-space-6);\n }\n\n /*\n * The lines only appear when they mean something. Asking the scrolling area whether\n * it can still be scrolled upwards tells us content is hidden ABOVE, so the line\n * under the header is shown; the same question downwards reveals the one above the\n * footer. In other words each line is drawn exactly when content is passing behind\n * the edge it marks.\n *\n * This kind of query is Chrome 133 and later for now. Where it is missing the\n * sentinels simply stay transparent, which is the intended fallback.\n */\n @container scroll-state(scrollable: top) {\n .v-dialog-edge--top {\n background: var(--vectis-color-border);\n }\n }\n\n @container scroll-state(scrollable: bottom) {\n .v-dialog-edge--bottom {\n background: var(--vectis-color-border);\n }\n }\n\n /*\n * The dialog animates on the way IN and not on the way out. Since it is removed from\n * the page the moment it closes, there is nothing left to animate out — that is the\n * price of the clean slate the lazy rendering buys, and it also spares the extra\n * declarations an exit animation would need.\n *\n * The starting values below are where a freshly rendered dialog begins, before\n * settling into its open state.\n */\n .v-dialog {\n transition:\n opacity var(--vectis-duration-base) var(--vectis-ease-default),\n transform var(--vectis-duration-base) var(--vectis-ease-default);\n }\n\n @starting-style {\n .v-dialog[open] {\n opacity: 0;\n transform: scale(0.97);\n }\n }\n\n .v-dialog::backdrop {\n background: var(--vectis-color-backdrop);\n transition: opacity var(--vectis-duration-base) var(--vectis-ease-default);\n }\n\n @starting-style {\n .v-dialog[open]::backdrop {\n opacity: 0;\n }\n }\n\n @media (prefers-reduced-motion: reduce) {\n .v-dialog,\n .v-dialog::backdrop {\n transition: none;\n }\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoDA,IAAM,IAAQ,GAWR,IAAI,EAAY,GAChB,IAAqB,QAAe,EAAM,cAAc,EAAE,MAAM,OAAO,KAAK,GAE5E,IAAO,EAAoB,GAAC,MAA0B,GA0BtD,IAAQ,EAAS,GACjB,IAAW,EAA8B,IAAI,GAC7C,IAAU,EAAM,GAChB,IAAa,EAAM,GAUnB,IAAW,QACf,EAAM,kBAAkB,QAAQ,EAAM,gBAAgB,iBAAiB,MACzE,GAQM,IAAY,SAAgB;GAAE,GAAG;GAAO,UAAU,EAAS;EAAM,EAAE,GAQnE,IAAW,EAAI,EAAK,KAAK;EAE/B,SAAS,IAAO;GACd,EAAK,QAAQ;EACf;EAEA,SAAS,IAAe;GAGtB,EAAS,OAAO,MAAM;EACxB;EAEA,IAAM,IAAe,SAA8B;GACjD,SAAS;GACT,iBAAiB;EACnB,EAAE;EAuBF,AAZA,EAAM,GAAM,OAAO,MAAU;GAC3B,AAAI,KACF,EAAS,QAAQ,IACjB,MAAM,EAAS,GACf,EAAS,OAAO,UAAU,MAE1B,EAAS,OAAO,MAAM,GACtB,EAAS,QAAQ;EAErB,CAAC,GAGD,QAAgB;GAId,AAAI,EAAK,SAAO,EAAS,OAAO,UAAU;EAC5C,CAAC;EAID,SAAS,IAAU;GACjB,EAAK,QAAQ;EACf;SAEA,EAAa;GAAE;GAAM,OAAO;GAAc,IAAI;EAAS,CAAC,+BAItD,EAAqD,EAAA,QAAA,WAAA,EAA/B,cAAe,EAAA,MAAY,CAAA,GAEzC,EAAA,SAAA,EAAA,GADR,EAoES,UApET,EAoES;;YAlEH;GAAJ,KAAI;KACI,EAAA,OAAS;GACjB,OAAM;GACL,OAAK,EAAA,kBAAsB,EAAA,MAAK;GAChC,MAAM,EAAA,SAAI,gBAAA,gBAAqC,KAAA;GAC/C,mBAAiB,EAAA,QAAQ,EAAA,CAAA,IAAU,KAAA;GACnC,oBAAkB,EAAA,WAAW,EAAA,CAAA,IAAa,KAAA;GACnC;;GAWR,EAqCS,UArCT,GAqCS,CApCP,EAqBO,EAAA,QAAA,UAAA,CAAA,SAAA,CApBL,EAmBM,OAnBN,GAmBM,CAjBI,EAAA,SAAA,EAAA,GADR,EAQc,GAAA;;IANX,IAAI,EAAA,CAAA;IACL,IAAG;IACH,SAAQ;IACR,OAAM;;qBAEK,CAAA,EAAA,EAAR,EAAA,KAAK,GAAA,CAAA,CAAA,CAAA;;+BAGF,EAAA,YAAA,EAAA,GADR,EAQc,GAAA;;IANX,IAAI,EAAA,CAAA;IACL,SAAQ;IACR,MAAK;IACL,OAAM;;qBAEQ,CAAA,EAAA,EAAX,EAAA,QAAQ,GAAA,CAAA,CAAA,CAAA;;mCAIN,EAAA,YAAYA,EAAAA,OAAO,iBAAA,EAAA,GAA9B,EAaM,OAbN,GAaM,CAZJ,EAA6B,EAAA,QAAA,eAAA,GAErB,EAAA,YAAA,EAAA,GADR,EAUc,GAAA;;IARZ,OAAM;IACL,OAAO,EAAA;IACR,SAAQ;IACR,MAAK;IACL,MAAK;IACJ,SAAO;;qBAEmB,CAA3B,EAA2B,GAAA,EAAnB,MAAM,EAAA,CAAA,EAAS,GAAA,MAAA,GAAA,CAAA,MAAA,CAAA,CAAA,CAAA;;;GAI7B,EAMM,OANN,GAMM;aALJ,EAAoE,QAAA;KAA9D,OAAM;KAAmC,eAAY;;IAC3D,EAEM,OAFN,GAEM,CADJ,EAAQ,EAAA,QAAA,SAAA,CAAA,CAAA;aAEV,EAAuE,QAAA;KAAjE,OAAM;KAAsC,eAAY;;;GAElDA,EAAAA,OAAO,UAAA,EAAA,GAArB,EAES,UAFT,GAES,CADP,EAAsB,EAAA,QAAA,QAAA,CAAA,CAAA,KAAA,EAAA,IAAA,EAAA"}
|
|
1
|
+
{"version":3,"file":"VDialog.vue_vue_type_script_setup_true_lang.js","names":["$slots"],"sources":["../../../src/components/VDialog/VDialog.vue"],"sourcesContent":["<script setup lang=\"ts\">\n// @core\n/**\n * A modal dialog: it takes over the page until the reader answers it.\n *\n * Almost everything that makes a modal correct comes free with the native `<dialog>`\n * element opened as a modal — it is drawn above the whole page, the background is\n * dimmed and made unusable, the focus is trapped inside it and handed back to the\n * trigger on closing, and whether a click outside or Escape dismisses it is declared\n * with an attribute rather than coded.\n *\n * The ONLY behavioural JavaScript is the bridge between `v-model:open` and the two\n * methods the platform offers no declarative equivalent for: opening as a modal, and\n * closing.\n */\n\nimport { computed, nextTick, onMounted, ref, useAttrs, useId, watch } from 'vue'\n\nimport VIcon from '../VIcon/VIcon.vue'\nimport { close as closeIcon } from '../VIcon/icons/close'\nimport VIconButton from '../VIconButton/VIconButton.vue'\nimport VTypography from '../VTypography/VTypography.vue'\nimport { useMessages } from '../../i18n/state'\nimport { cssSize } from '../../utils/css'\n\n/** How assistive technology announces the dialog. */\nexport type DialogRole = 'dialog' | 'alertdialog'\n\ninterface DialogProps {\n /**\n * The title of the dialog, which also names it for assistive technology. It is\n * ignored when the `#header` slot replaces the whole header.\n */\n title?: string\n /** A line under the title, explaining what the dialog is asking. */\n subtitle?: string\n /**\n * How wide the dialog is: a number is read as pixels, a string as any CSS length. Left\n * out, it takes the `--vectis-control-size-dialog-width` token, 400px by default. It is\n * never allowed to exceed the width of the viewport.\n */\n width?: number | string\n /**\n * What kind of dialog this is. `alertdialog` is for one that must be answered\n * explicitly, and it makes screen readers announce it more insistently — see\n * VDialogAlert, which is exactly that.\n */\n role?: DialogRole\n /**\n * Takes the close cross out of the header, leaving the reader with Escape, the\n * backdrop and whatever the footer offers.\n */\n hideClose?: boolean\n /** Stops a click outside the dialog from closing it. */\n persistentBackdrop?: boolean\n /**\n * Stops the Escape key from closing the dialog. Note that refusing Escape while the\n * backdrop still closes cannot be expressed natively, so both routes are then\n * allowed.\n */\n persistentEscape?: boolean\n /** What the close cross does, in words. It falls back to the design system dictionary. */\n closeLabel?: string\n}\n\nconst props = withDefaults(defineProps<DialogProps>(), {\n title: undefined,\n subtitle: undefined,\n width: undefined,\n role: 'dialog',\n hideClose: false,\n persistentBackdrop: false,\n persistentEscape: false,\n closeLabel: undefined,\n})\n\nconst m = useMessages()\nconst resolvedCloseLabel = computed(() => props.closeLabel ?? m.value.common.close)\n\n/**\n * Whether the dialog is showing. It starts closed, and it is BIDIRECTIONAL: the browser\n * writes back to it whenever the dialog closes on its own, through Escape or the backdrop,\n * so a consumer never has to reset it by hand.\n */\nconst open = defineModel<boolean>('open', { default: false })\n\n/** What the trigger has to carry: the click that opens the dialog, and the fact that it does. */\nexport type DialogTriggerProps = {\n onClick: () => void\n 'aria-haspopup': 'dialog'\n}\n\ndefineSlots<{\n /** The body of the dialog. This is the part that scrolls when there is too much of it. */\n default(): unknown\n /** Replaces the title and subtitle block with content of your own. */\n header?(): unknown\n /** Extra controls in the header, placed before the close cross: a menu, a full-screen toggle. */\n 'header-actions'?(): unknown\n /** The buttons at the foot of the dialog. */\n footer?(): unknown\n /**\n * The button that opens the dialog. Bind the `triggerProps` it receives onto it. It\n * stays rendered at all times, unlike the dialog itself.\n */\n trigger?(props: { triggerProps: DialogTriggerProps }): unknown\n}>()\n\ndefineOptions({ inheritAttrs: false })\n\nconst attrs = useAttrs()\nconst dialogEl = ref<HTMLDialogElement | null>(null)\nconst titleId = useId()\nconst subtitleId = useId()\n\n/**\n * Which dismissals the browser itself accepts, declared as an attribute rather than\n * handled in code: everything, Escape alone, or nothing.\n *\n * One combination cannot be expressed that way — a click outside allowed while Escape\n * is not — and it falls back to allowing both. Nothing in the design system asks for\n * it, and it would be a strange thing to want.\n */\nconst closedby = computed(() =>\n props.persistentBackdrop ? (props.persistentEscape ? 'none' : 'closerequest') : 'any',\n)\n\n// @fallback\n// The `closedby` attribute is newer than the type definitions shipped with\n// TypeScript, so writing it directly in the template would be reported as an unknown\n// attribute. Passing it inside a bound object goes through the same path as any\n// forwarded attribute, which is not checked element by element. Vue still merges the\n// `class` and `style` it may contain with the static ones below.\nconst rootAttrs = computed(() => ({ ...attrs, closedby: closedby.value }))\n\n// The dialog and its content only exist while it is open, which also spares the page\n// whatever heavy thing it contains. Every opening therefore builds a BRAND NEW\n// element, so it is always opened as a modal from a clean slate, and closing removes\n// it entirely — nothing is left behind to swallow clicks, and reopening cannot race\n// with a closing that is still finishing. The trigger, by contrast, stays rendered at\n// all times.\nconst rendered = ref(open.value)\n\n/**\n * Settles once the dialog opened by the latest change of `open` is actually showing. The\n * opening waits for the element to be rendered, so it is always a tick behind the model.\n */\nlet opening: Promise<void> = Promise.resolve()\n\nfunction show(): Promise<void> {\n open.value = true\n // The watcher below only runs when the scheduler flushes, so `opening` is read from a\n // tick later: read at once, it would still be the promise of the previous opening.\n return nextTick(() => opening)\n}\n\nfunction requestClose() {\n // Closing the element is enough: the browser then fires its own close event, which\n // is what puts the model back in step below.\n dialogEl.value?.close()\n}\n\nconst triggerProps = computed<DialogTriggerProps>(() => ({\n onClick: show,\n 'aria-haspopup': 'dialog',\n}))\n\n// The `<dialog>` element is asymmetric in a way that shapes this whole bridge: it\n// announces every closing with an event, but announces nothing at all when it opens —\n// where a popover reports both. So the two directions are not written the same way:\n//\n// - opening: render the element, then, once Vue has actually put it in the document,\n// open it as a modal;\n// - closing: whatever closed it — the cross, our own call, Escape, a click outside —\n// the browser's close event is what puts the model back in step, and only then is\n// the element removed.\nwatch(open, (value) => {\n if (value) {\n rendered.value = true\n // the brand new <dialog> has to exist before it can be opened\n opening = nextTick(() => dialogEl.value?.showModal())\n } else {\n dialogEl.value?.close()\n rendered.value = false\n }\n})\n\n// @ssr\nonMounted(() => {\n // A watcher does not run during the server render, so a dialog asked to be open from\n // the start would never be opened. The element is already there — the flag above was\n // initialized from the model — it just has to be told to show itself.\n if (open.value) dialogEl.value?.showModal()\n})\n\n// The browser's own close event, whatever caused it, is what brings the model back in\n// step with reality.\nfunction onClose() {\n open.value = false\n}\n\ndefineExpose({\n /**\n * Opens the dialog, exactly as setting `open` does. The opening lands on the next tick,\n * once the element has been rendered: `el` is still null right after the call, and the\n * promise returned settles once the dialog is showing.\n */\n show,\n /**\n * Closes the dialog. It closes unconditionally, `persistentEscape` and\n * `persistentBackdrop` governing only the two routes the reader can take.\n */\n close: requestClose,\n /** The `<dialog>` element. It is null while closed: each opening builds a fresh one. */\n el: dialogEl,\n})\n</script>\n\n<template>\n <slot name=\"trigger\" :trigger-props=\"triggerProps\" />\n <dialog\n v-if=\"rendered\"\n ref=\"dialogEl\"\n v-bind=\"rootAttrs\"\n class=\"v-dialog\"\n :style=\"{ '--dialog-width': cssSize(width) }\"\n :role=\"role === 'alertdialog' ? 'alertdialog' : undefined\"\n :aria-labelledby=\"title ? titleId : undefined\"\n :aria-describedby=\"subtitle ? subtitleId : undefined\"\n @close=\"onClose\"\n >\n <!--\n The header and the footer stay put while only the body scrolls, so the scrollbar\n is confined to the body and never runs along them.\n\n The lines that appear under the header and above the footer once the body is\n scrolled are drawn by two sentinels stuck INSIDE the scrolling area, and not by\n the header and footer themselves: a container query can only style what is inside\n the container it asks about, never a sibling of it.\n -->\n <header class=\"v-dialog-header\">\n <slot name=\"header\">\n <div class=\"v-dialog-titles\">\n <VTypography\n v-if=\"title\"\n :id=\"titleId\"\n as=\"h2\"\n variant=\"heading-3\"\n class=\"v-dialog-title\"\n >\n {{ title }}\n </VTypography>\n <VTypography\n v-if=\"subtitle\"\n :id=\"subtitleId\"\n variant=\"subtitle\"\n tone=\"muted\"\n class=\"v-dialog-subtitle\"\n >\n {{ subtitle }}\n </VTypography>\n </div>\n </slot>\n <div v-if=\"!hideClose || $slots['header-actions']\" class=\"v-dialog-header-actions\">\n <slot name=\"header-actions\" />\n <VIconButton\n v-if=\"!hideClose\"\n class=\"v-dialog-close\"\n :label=\"resolvedCloseLabel\"\n variant=\"ghost\"\n tone=\"neutral\"\n size=\"sm\"\n @click=\"requestClose\"\n >\n <VIcon :name=\"closeIcon\" />\n </VIconButton>\n </div>\n </header>\n <div class=\"v-dialog-scroll\">\n <span class=\"v-dialog-edge v-dialog-edge--top\" aria-hidden=\"true\" />\n <div class=\"v-dialog-body\">\n <slot />\n </div>\n <span class=\"v-dialog-edge v-dialog-edge--bottom\" aria-hidden=\"true\" />\n </div>\n <footer v-if=\"$slots.footer\" class=\"v-dialog-footer\">\n <slot name=\"footer\" />\n </footer>\n </dialog>\n</template>\n\n<style>\n@layer vectis.components {\n .v-dialog {\n /* The width comes from the prop, set inline, or from the token when there is none.\n Whatever it asks for, the dialog is never allowed past the viewport, margins included.\n\n TRAP — the token is declared ON the element rather than written as a `var()` fallback.\n A custom property inherits, and a dialog opened from inside another one is its DOM\n descendant: with a fallback, an alert confirming something in an 800px dialog would\n read that dialog's inline width and open 800px wide itself, with no error anywhere. */\n --dialog-width: var(--vectis-control-size-dialog-width);\n inline-size: var(--dialog-width);\n max-inline-size: calc(100dvi - 2 * var(--vectis-space-4));\n max-block-size: calc(100dvb - 2 * var(--vectis-space-4));\n /* This puts the dialog back in the middle of the screen. The browser centres a\n modal with an automatic margin, which the design system's own reset — where\n every element loses its margins — had removed; restoring it here works because\n the component layer is stronger than the reset one. */\n margin: auto;\n /* The header and footer stay put while only the body scrolls, and hiding the\n overflow is what keeps the content inside the rounded corners. */\n display: flex;\n flex-direction: column;\n overflow: hidden;\n padding: 0;\n border: none;\n border-radius: var(--vectis-radius-overlay);\n background: var(--vectis-color-surface-overlay);\n color: var(--vectis-color-text);\n box-shadow: var(--vectis-shadow-xl);\n font-family: var(--vectis-text-family);\n }\n\n /*\n * An indispensable guard. The browser hides a closed dialog with a rule of its own,\n * but any display we declare above beats it — so without this, a closed dialog would\n * sit in the page at the top left, swallowing clicks.\n *\n * It also covers the two moments where the element exists without being open yet: the\n * frame between rendering it and opening it, and the server-rendered markup. The\n * popovers have the very same guard.\n */\n .v-dialog:not([open]) {\n display: none;\n }\n\n /* Opening a modal puts the focus on the dialog itself. No ring is drawn around the\n whole thing for that: the focus a reader needs to see is the one on the controls\n inside. */\n .v-dialog:focus-visible {\n outline: none;\n }\n\n .v-dialog-scroll {\n /* The ONLY part that scrolls. It takes whatever room is left between the header\n and the footer, which is what keeps the scrollbar confined to it. The zero\n minimum is load-bearing: without it a flex item refuses to shrink below its\n content, and nothing would ever scroll. */\n flex: 1 1 auto;\n min-block-size: 0;\n overflow-y: auto;\n display: flex;\n flex-direction: column;\n /* This makes the box something its descendants can ask questions about — namely\n whether there is content hidden above or below. It adds no containment of size. */\n container-type: scroll-state;\n }\n\n /*\n * The two sentinels: hairlines stuck to the top and the bottom of the scrolling\n * area, and descendants of it, which is what allows them to ask about its scroll\n * state. Their negative margins mean they occupy no space at all. They are\n * transparent until the rules further down reveal them.\n */\n .v-dialog-edge {\n flex: none;\n block-size: 1px;\n position: sticky;\n background: transparent;\n }\n\n .v-dialog-edge--top {\n inset-block-start: 0;\n margin-block-end: -1px;\n }\n\n .v-dialog-edge--bottom {\n inset-block-end: 0;\n margin-block-start: -1px;\n }\n\n .v-dialog-header {\n flex: none; /* stays at the top, outside whatever scrolls */\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n gap: var(--vectis-space-4);\n padding: var(--vectis-space-6) var(--vectis-space-6) var(--vectis-space-3);\n }\n\n .v-dialog-titles {\n display: flex;\n flex-direction: column;\n min-inline-size: 0;\n }\n\n /* The title and the subtitle are rendered by VTypography, which carries their type.\n Their classes remain as hooks, for a consumer's overrides and for the tests. */\n\n .v-dialog-header-actions {\n display: flex;\n align-items: center;\n gap: var(--vectis-space-1);\n /* The cross is a button, so it carries invisible padding of its own; pulling the\n row back by that amount is what makes the glyph line up with the header's edge\n rather than floating inside it. */\n margin-block-start: calc(-1 * var(--vectis-space-1));\n margin-inline-end: calc(-1 * var(--vectis-space-2));\n }\n\n .v-dialog-body {\n /* Short content is stretched to fill the space, so the footer stays at the bottom\n of the dialog rather than floating halfway up; long content keeps its natural\n height, overflows, and is what scrolls. */\n flex: 1 0 auto;\n padding: var(--vectis-space-1) var(--vectis-space-6) var(--vectis-space-3);\n font-size: var(--vectis-text-body-md-size);\n line-height: var(--vectis-text-body-md-leading);\n }\n\n .v-dialog-footer {\n flex: none; /* stays at the bottom, outside whatever scrolls */\n display: flex;\n align-items: center;\n justify-content: flex-end;\n flex-wrap: wrap;\n gap: var(--vectis-space-3);\n padding: var(--vectis-space-3) var(--vectis-space-6) var(--vectis-space-6);\n }\n\n /*\n * The lines only appear when they mean something. Asking the scrolling area whether\n * it can still be scrolled upwards tells us content is hidden ABOVE, so the line\n * under the header is shown; the same question downwards reveals the one above the\n * footer. In other words each line is drawn exactly when content is passing behind\n * the edge it marks.\n *\n * This kind of query is Chrome 133 and later for now. Where it is missing the\n * sentinels simply stay transparent, which is the intended fallback.\n */\n @container scroll-state(scrollable: top) {\n .v-dialog-edge--top {\n background: var(--vectis-color-border);\n }\n }\n\n @container scroll-state(scrollable: bottom) {\n .v-dialog-edge--bottom {\n background: var(--vectis-color-border);\n }\n }\n\n /*\n * The dialog animates on the way IN and not on the way out. Since it is removed from\n * the page the moment it closes, there is nothing left to animate out — that is the\n * price of the clean slate the lazy rendering buys, and it also spares the extra\n * declarations an exit animation would need.\n *\n * The starting values below are where a freshly rendered dialog begins, before\n * settling into its open state.\n */\n .v-dialog {\n transition:\n opacity var(--vectis-duration-base) var(--vectis-ease-default),\n transform var(--vectis-duration-base) var(--vectis-ease-default);\n }\n\n @starting-style {\n .v-dialog[open] {\n opacity: 0;\n transform: scale(0.97);\n }\n }\n\n .v-dialog::backdrop {\n background: var(--vectis-color-backdrop);\n transition: opacity var(--vectis-duration-base) var(--vectis-ease-default);\n }\n\n @starting-style {\n .v-dialog[open]::backdrop {\n opacity: 0;\n }\n }\n\n @media (prefers-reduced-motion: reduce) {\n .v-dialog,\n .v-dialog::backdrop {\n transition: none;\n }\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiEA,IAAM,IAAQ,GAWR,IAAI,EAAY,GAChB,IAAqB,QAAe,EAAM,cAAc,EAAE,MAAM,OAAO,KAAK,GAO5E,IAAO,EAAoB,GAAC,MAA0B,GA0BtD,IAAQ,EAAS,GACjB,IAAW,EAA8B,IAAI,GAC7C,IAAU,EAAM,GAChB,IAAa,EAAM,GAUnB,IAAW,QACf,EAAM,qBAAsB,EAAM,mBAAmB,SAAS,iBAAkB,KAClF,GAQM,IAAY,SAAgB;GAAE,GAAG;GAAO,UAAU,EAAS;EAAM,EAAE,GAQnE,IAAW,EAAI,EAAK,KAAK,GAM3B,IAAyB,QAAQ,QAAQ;EAE7C,SAAS,IAAsB;GAI7B,OAHA,EAAK,QAAQ,IAGN,QAAe,CAAO;EAC/B;EAEA,SAAS,IAAe;GAGtB,EAAS,OAAO,MAAM;EACxB;EAEA,IAAM,IAAe,SAAoC;GACvD,SAAS;GACT,iBAAiB;EACnB,EAAE;EAuBF,AAZA,EAAM,IAAO,MAAU;GACrB,AAAI,KACF,EAAS,QAAQ,IAEjB,IAAU,QAAe,EAAS,OAAO,UAAU,CAAC,MAEpD,EAAS,OAAO,MAAM,GACtB,EAAS,QAAQ;EAErB,CAAC,GAGD,QAAgB;GAId,AAAI,EAAK,SAAO,EAAS,OAAO,UAAU;EAC5C,CAAC;EAID,SAAS,IAAU;GACjB,EAAK,QAAQ;EACf;SAEA,EAAa;GAMX;GAKA,OAAO;GAEP,IAAI;EACN,CAAC,+BAIC,EAAqD,EAAA,QAAA,WAAA,EAA/B,cAAe,EAAA,MAAY,CAAA,GAEzC,EAAA,SAAA,EAAA,GADR,EAoES,UApET,EAoES;;YAlEH;GAAJ,KAAI;KACI,EAAA,OAAS;GACjB,OAAM;GACL,OAAK,EAAA,kBAAsB,EAAA,CAAA,CAAO,CAAC,EAAA,KAAK,EAAA;GACxC,MAAM,EAAA,SAAI,gBAAA,gBAAqC,KAAA;GAC/C,mBAAiB,EAAA,QAAQ,EAAA,CAAA,IAAU,KAAA;GACnC,oBAAkB,EAAA,WAAW,EAAA,CAAA,IAAa,KAAA;GACnC;;GAWR,EAqCS,UArCT,GAqCS,CApCP,EAqBO,EAAA,QAAA,UAAA,CAAA,SAAA,CApBL,EAmBM,OAnBN,GAmBM,CAjBI,EAAA,SAAA,EAAA,GADR,EAQc,GAAA;;IANX,IAAI,EAAA,CAAA;IACL,IAAG;IACH,SAAQ;IACR,OAAM;;qBAEK,CAAA,EAAA,EAAR,EAAA,KAAK,GAAA,CAAA,CAAA,CAAA;;+BAGF,EAAA,YAAA,EAAA,GADR,EAQc,GAAA;;IANX,IAAI,EAAA,CAAA;IACL,SAAQ;IACR,MAAK;IACL,OAAM;;qBAEQ,CAAA,EAAA,EAAX,EAAA,QAAQ,GAAA,CAAA,CAAA,CAAA;;oCAIL,EAAA,aAAaA,EAAAA,OAAM,qBAAA,EAAA,GAA/B,EAaM,OAbN,GAaM,CAZJ,EAA8B,EAAA,QAAA,gBAAA,GAErB,EAAA,yBAAA,EAAA,GADT,EAUc,GAAA;;IARZ,OAAM;IACL,OAAO,EAAA;IACR,SAAQ;IACR,MAAK;IACL,MAAK;IACJ,SAAO;;qBAEmB,CAA3B,EAA2B,GAAA,EAAnB,MAAM,EAAA,CAAA,EAAS,GAAA,MAAA,GAAA,CAAA,MAAA,CAAA,CAAA,CAAA;;;GAI7B,EAMM,OANN,GAMM;aALJ,EAAoE,QAAA;KAA9D,OAAM;KAAmC,eAAY;;IAC3D,EAEM,OAFN,GAEM,CADJ,EAAQ,EAAA,QAAA,SAAA,CAAA,CAAA;aAEV,EAAuE,QAAA;KAAjE,OAAM;KAAsC,eAAY;;;GAElDA,EAAAA,OAAO,UAAA,EAAA,GAArB,EAES,UAFT,GAES,CADP,EAAsB,EAAA,QAAA,QAAA,CAAA,CAAA,KAAA,EAAA,IAAA,EAAA"}
|
|
@@ -1,13 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* A dialog demanding an answer: confirming something irreversible, acknowledging a
|
|
3
|
-
* failure. It looks exactly like VDialog and is nothing more than VDialog with its
|
|
4
|
-
* options fixed, but those fixed options change what it is.
|
|
5
|
-
*
|
|
6
|
-
* It is announced to assistive technology as an alert rather than an ordinary dialog,
|
|
7
|
-
* and every casual way out is closed off: there is no cross, a click outside does
|
|
8
|
-
* nothing, and Escape does nothing either. The buttons in the footer are the only way
|
|
9
|
-
* to dismiss it — which is why supplying them is not optional.
|
|
10
|
-
*/
|
|
1
|
+
import { DialogTriggerProps } from './VDialog.js';
|
|
11
2
|
interface DialogAlertProps {
|
|
12
3
|
/**
|
|
13
4
|
* The question being asked, which also names the dialog for assistive technology.
|
|
@@ -17,21 +8,23 @@ interface DialogAlertProps {
|
|
|
17
8
|
/** A line under the title, spelling out the consequences of the answer. */
|
|
18
9
|
subtitle?: string;
|
|
19
10
|
/**
|
|
20
|
-
* How wide the
|
|
21
|
-
*
|
|
11
|
+
* How wide the alert is: a number is read as pixels, a string as any CSS length. Left
|
|
12
|
+
* out, it takes the `--vectis-control-size-dialog-width` token, 400px by default. It is
|
|
13
|
+
* never allowed to exceed the width of the viewport.
|
|
22
14
|
*/
|
|
23
|
-
width?: string;
|
|
15
|
+
width?: number | string;
|
|
24
16
|
}
|
|
25
17
|
type __VLS_Props = DialogAlertProps;
|
|
26
|
-
type TriggerProps = {
|
|
27
|
-
onClick: () => void;
|
|
28
|
-
'aria-haspopup': 'dialog';
|
|
29
|
-
};
|
|
30
18
|
type __VLS_Slots = {
|
|
31
19
|
/** What the alert says. */
|
|
32
20
|
default(): unknown;
|
|
33
21
|
/** Replaces the title and subtitle block with content of your own. */
|
|
34
22
|
header?(): unknown;
|
|
23
|
+
/**
|
|
24
|
+
* Extra controls in the header, where a dialog puts them before its cross: a link to help,
|
|
25
|
+
* for instance. An alert has no cross, so they sit at the end of the header alone.
|
|
26
|
+
*/
|
|
27
|
+
'header-actions'?(): unknown;
|
|
35
28
|
/**
|
|
36
29
|
* The buttons that answer the alert. They are not optional: nothing else can close
|
|
37
30
|
* this dialog.
|
|
@@ -41,21 +34,32 @@ type __VLS_Slots = {
|
|
|
41
34
|
* The button that opens the alert. Bind the `triggerProps` it receives onto it.
|
|
42
35
|
*/
|
|
43
36
|
trigger?(props: {
|
|
44
|
-
triggerProps:
|
|
37
|
+
triggerProps: DialogTriggerProps;
|
|
45
38
|
}): unknown;
|
|
46
39
|
};
|
|
47
40
|
type __VLS_ModelProps = {
|
|
41
|
+
/** Whether the alert is showing. It starts closed, and closing writes back to it. */
|
|
48
42
|
'open'?: boolean;
|
|
49
43
|
};
|
|
50
44
|
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
51
|
-
declare const __VLS_base: import('vue').DefineComponent<__VLS_PublicProps, {
|
|
45
|
+
declare const __VLS_base: import('vue').DefineComponent<__VLS_PublicProps, {
|
|
46
|
+
/**
|
|
47
|
+
* Opens the alert, exactly as setting `open` does. The opening lands on the next tick:
|
|
48
|
+
* the promise returned settles once the alert is showing.
|
|
49
|
+
*/
|
|
50
|
+
show: () => Promise<void>;
|
|
51
|
+
/** Closes it. The footer's buttons are the reader's only way out; this is yours. */
|
|
52
|
+
close: () => void | undefined;
|
|
53
|
+
/** The `<dialog>` element. It is null while closed: each opening builds a fresh one. */
|
|
54
|
+
el: import('vue').ComputedRef<HTMLDialogElement | null>;
|
|
55
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
52
56
|
"update:open": (value: boolean) => any;
|
|
53
57
|
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
54
58
|
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
55
59
|
}>, {
|
|
56
60
|
title: string;
|
|
57
61
|
subtitle: string;
|
|
58
|
-
width: string;
|
|
62
|
+
width: number | string;
|
|
59
63
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
60
64
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
61
65
|
declare const _default: typeof __VLS_export;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VDialogAlert.js","names":[],"sources":["../../../src/components/VDialog/VDialogAlert.vue"],"sourcesContent":["<script setup lang=\"ts\">\
|
|
1
|
+
{"version":3,"file":"VDialogAlert.js","names":[],"sources":["../../../src/components/VDialog/VDialogAlert.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * A dialog demanding an answer: confirming something irreversible, acknowledging a\n * failure. It looks exactly like VDialog and is nothing more than VDialog with its\n * options fixed, but those fixed options change what it is.\n *\n * It is announced to assistive technology as an alert rather than an ordinary dialog,\n * and every casual way out is closed off: there is no cross, a click outside does\n * nothing, and Escape does nothing either. The buttons in the footer are the only way\n * to dismiss it — which is why supplying them is not optional.\n */\n\nimport { computed, ref } from 'vue'\n\nimport VDialog from './VDialog.vue'\nimport type { DialogTriggerProps } from './VDialog.vue'\n\ninterface DialogAlertProps {\n /**\n * The question being asked, which also names the dialog for assistive technology.\n * It is ignored when the `#header` slot replaces the whole header.\n */\n title?: string\n /** A line under the title, spelling out the consequences of the answer. */\n subtitle?: string\n /**\n * How wide the alert is: a number is read as pixels, a string as any CSS length. Left\n * out, it takes the `--vectis-control-size-dialog-width` token, 400px by default. It is\n * never allowed to exceed the width of the viewport.\n */\n width?: number | string\n}\n\nwithDefaults(defineProps<DialogAlertProps>(), {\n title: undefined,\n subtitle: undefined,\n width: undefined,\n})\n\n/** Whether the alert is showing. It starts closed, and closing writes back to it. */\nconst open = defineModel<boolean>('open', { default: false })\n\ndefineSlots<{\n /** What the alert says. */\n default(): unknown\n /** Replaces the title and subtitle block with content of your own. */\n header?(): unknown\n /**\n * Extra controls in the header, where a dialog puts them before its cross: a link to help,\n * for instance. An alert has no cross, so they sit at the end of the header alone.\n */\n 'header-actions'?(): unknown\n /**\n * The buttons that answer the alert. They are not optional: nothing else can close\n * this dialog.\n */\n footer?(): unknown\n /**\n * The button that opens the alert. Bind the `triggerProps` it receives onto it.\n */\n trigger?(props: { triggerProps: DialogTriggerProps }): unknown\n}>()\n\n/*\n * The same three members VDialog exposes, handed straight through. This component is\n * VDialog with its options fixed, so a ref on it has to answer the same way — without\n * this, the one dialog that CANNOT be dismissed by Escape or by a click outside would\n * also be the one a consumer could not close from code.\n */\nconst dialogRef = ref<InstanceType<typeof VDialog> | null>(null)\n\ndefineExpose({\n /**\n * Opens the alert, exactly as setting `open` does. The opening lands on the next tick:\n * the promise returned settles once the alert is showing.\n */\n show: (): Promise<void> => dialogRef.value?.show() ?? Promise.resolve(),\n /** Closes it. The footer's buttons are the reader's only way out; this is yours. */\n close: () => dialogRef.value?.close(),\n /** The `<dialog>` element. It is null while closed: each opening builds a fresh one. */\n el: computed(() => dialogRef.value?.el ?? null),\n})\n</script>\n\n<template>\n <VDialog\n ref=\"dialogRef\"\n v-model:open=\"open\"\n role=\"alertdialog\"\n :title=\"title\"\n :subtitle=\"subtitle\"\n :width=\"width\"\n hide-close\n persistent-backdrop\n persistent-escape\n >\n <template v-if=\"$slots.trigger\" #trigger=\"{ triggerProps }\">\n <slot name=\"trigger\" :trigger-props=\"triggerProps\" />\n </template>\n <template v-if=\"$slots.header\" #header>\n <slot name=\"header\" />\n </template>\n <template v-if=\"$slots['header-actions']\" #header-actions>\n <slot name=\"header-actions\" />\n </template>\n <slot />\n <template v-if=\"$slots.footer\" #footer>\n <slot name=\"footer\" />\n </template>\n </VDialog>\n</template>\n"],"mappings":""}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import e from "./VDialog.js";
|
|
2
|
-
import {
|
|
2
|
+
import { computed as t, createBlock as n, createSlots as r, defineComponent as i, mergeModels as a, openBlock as o, ref as s, renderSlot as c, useModel as l, withCtx as u } from "vue";
|
|
3
3
|
//#region src/components/VDialog/VDialogAlert.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
-
var
|
|
4
|
+
var d = /*@__PURE__*/ i({
|
|
5
5
|
__name: "VDialogAlert",
|
|
6
|
-
props: /*@__PURE__*/
|
|
6
|
+
props: /*@__PURE__*/ a({
|
|
7
7
|
title: { default: void 0 },
|
|
8
8
|
subtitle: { default: void 0 },
|
|
9
|
-
width: { default:
|
|
9
|
+
width: { default: void 0 }
|
|
10
10
|
}, {
|
|
11
11
|
open: {
|
|
12
12
|
type: Boolean,
|
|
@@ -15,36 +15,47 @@ var l = /*@__PURE__*/ r({
|
|
|
15
15
|
openModifiers: {}
|
|
16
16
|
}),
|
|
17
17
|
emits: ["update:open"],
|
|
18
|
-
setup(
|
|
19
|
-
let
|
|
20
|
-
return
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
setup(i, { expose: a }) {
|
|
19
|
+
let d = l(i, "open"), f = s(null);
|
|
20
|
+
return a({
|
|
21
|
+
show: () => f.value?.show() ?? Promise.resolve(),
|
|
22
|
+
close: () => f.value?.close(),
|
|
23
|
+
el: t(() => f.value?.el ?? null)
|
|
24
|
+
}), (t, a) => (o(), n(e, {
|
|
25
|
+
ref_key: "dialogRef",
|
|
26
|
+
ref: f,
|
|
27
|
+
open: d.value,
|
|
28
|
+
"onUpdate:open": a[0] ||= (e) => d.value = e,
|
|
23
29
|
role: "alertdialog",
|
|
24
|
-
title:
|
|
25
|
-
subtitle:
|
|
26
|
-
width:
|
|
27
|
-
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
},
|
|
31
|
-
default:
|
|
30
|
+
title: i.title,
|
|
31
|
+
subtitle: i.subtitle,
|
|
32
|
+
width: i.width,
|
|
33
|
+
"hide-close": "",
|
|
34
|
+
"persistent-backdrop": "",
|
|
35
|
+
"persistent-escape": ""
|
|
36
|
+
}, r({
|
|
37
|
+
default: u(() => [c(t.$slots, "default")]),
|
|
32
38
|
_: 2
|
|
33
39
|
}, [
|
|
34
|
-
|
|
40
|
+
t.$slots.trigger ? {
|
|
35
41
|
name: "trigger",
|
|
36
|
-
fn:
|
|
42
|
+
fn: u(({ triggerProps: e }) => [c(t.$slots, "trigger", { triggerProps: e })]),
|
|
37
43
|
key: "0"
|
|
38
44
|
} : void 0,
|
|
39
|
-
|
|
45
|
+
t.$slots.header ? {
|
|
40
46
|
name: "header",
|
|
41
|
-
fn:
|
|
47
|
+
fn: u(() => [c(t.$slots, "header")]),
|
|
42
48
|
key: "1"
|
|
43
49
|
} : void 0,
|
|
44
|
-
|
|
45
|
-
name: "
|
|
46
|
-
fn:
|
|
50
|
+
t.$slots["header-actions"] ? {
|
|
51
|
+
name: "header-actions",
|
|
52
|
+
fn: u(() => [c(t.$slots, "header-actions")]),
|
|
47
53
|
key: "2"
|
|
54
|
+
} : void 0,
|
|
55
|
+
t.$slots.footer ? {
|
|
56
|
+
name: "footer",
|
|
57
|
+
fn: u(() => [c(t.$slots, "footer")]),
|
|
58
|
+
key: "3"
|
|
48
59
|
} : void 0
|
|
49
60
|
]), 1032, [
|
|
50
61
|
"open",
|
|
@@ -55,6 +66,6 @@ var l = /*@__PURE__*/ r({
|
|
|
55
66
|
}
|
|
56
67
|
});
|
|
57
68
|
//#endregion
|
|
58
|
-
export {
|
|
69
|
+
export { d as default };
|
|
59
70
|
|
|
60
71
|
//# sourceMappingURL=VDialogAlert.vue_vue_type_script_setup_true_lang.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VDialogAlert.vue_vue_type_script_setup_true_lang.js","names":["$slots"],"sources":["../../../src/components/VDialog/VDialogAlert.vue"],"sourcesContent":["<script setup lang=\"ts\">\
|
|
1
|
+
{"version":3,"file":"VDialogAlert.vue_vue_type_script_setup_true_lang.js","names":["$slots"],"sources":["../../../src/components/VDialog/VDialogAlert.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * A dialog demanding an answer: confirming something irreversible, acknowledging a\n * failure. It looks exactly like VDialog and is nothing more than VDialog with its\n * options fixed, but those fixed options change what it is.\n *\n * It is announced to assistive technology as an alert rather than an ordinary dialog,\n * and every casual way out is closed off: there is no cross, a click outside does\n * nothing, and Escape does nothing either. The buttons in the footer are the only way\n * to dismiss it — which is why supplying them is not optional.\n */\n\nimport { computed, ref } from 'vue'\n\nimport VDialog from './VDialog.vue'\nimport type { DialogTriggerProps } from './VDialog.vue'\n\ninterface DialogAlertProps {\n /**\n * The question being asked, which also names the dialog for assistive technology.\n * It is ignored when the `#header` slot replaces the whole header.\n */\n title?: string\n /** A line under the title, spelling out the consequences of the answer. */\n subtitle?: string\n /**\n * How wide the alert is: a number is read as pixels, a string as any CSS length. Left\n * out, it takes the `--vectis-control-size-dialog-width` token, 400px by default. It is\n * never allowed to exceed the width of the viewport.\n */\n width?: number | string\n}\n\nwithDefaults(defineProps<DialogAlertProps>(), {\n title: undefined,\n subtitle: undefined,\n width: undefined,\n})\n\n/** Whether the alert is showing. It starts closed, and closing writes back to it. */\nconst open = defineModel<boolean>('open', { default: false })\n\ndefineSlots<{\n /** What the alert says. */\n default(): unknown\n /** Replaces the title and subtitle block with content of your own. */\n header?(): unknown\n /**\n * Extra controls in the header, where a dialog puts them before its cross: a link to help,\n * for instance. An alert has no cross, so they sit at the end of the header alone.\n */\n 'header-actions'?(): unknown\n /**\n * The buttons that answer the alert. They are not optional: nothing else can close\n * this dialog.\n */\n footer?(): unknown\n /**\n * The button that opens the alert. Bind the `triggerProps` it receives onto it.\n */\n trigger?(props: { triggerProps: DialogTriggerProps }): unknown\n}>()\n\n/*\n * The same three members VDialog exposes, handed straight through. This component is\n * VDialog with its options fixed, so a ref on it has to answer the same way — without\n * this, the one dialog that CANNOT be dismissed by Escape or by a click outside would\n * also be the one a consumer could not close from code.\n */\nconst dialogRef = ref<InstanceType<typeof VDialog> | null>(null)\n\ndefineExpose({\n /**\n * Opens the alert, exactly as setting `open` does. The opening lands on the next tick:\n * the promise returned settles once the alert is showing.\n */\n show: (): Promise<void> => dialogRef.value?.show() ?? Promise.resolve(),\n /** Closes it. The footer's buttons are the reader's only way out; this is yours. */\n close: () => dialogRef.value?.close(),\n /** The `<dialog>` element. It is null while closed: each opening builds a fresh one. */\n el: computed(() => dialogRef.value?.el ?? null),\n})\n</script>\n\n<template>\n <VDialog\n ref=\"dialogRef\"\n v-model:open=\"open\"\n role=\"alertdialog\"\n :title=\"title\"\n :subtitle=\"subtitle\"\n :width=\"width\"\n hide-close\n persistent-backdrop\n persistent-escape\n >\n <template v-if=\"$slots.trigger\" #trigger=\"{ triggerProps }\">\n <slot name=\"trigger\" :trigger-props=\"triggerProps\" />\n </template>\n <template v-if=\"$slots.header\" #header>\n <slot name=\"header\" />\n </template>\n <template v-if=\"$slots['header-actions']\" #header-actions>\n <slot name=\"header-actions\" />\n </template>\n <slot />\n <template v-if=\"$slots.footer\" #footer>\n <slot name=\"footer\" />\n </template>\n </VDialog>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;EAwCA,IAAM,IAAO,EAAoB,GAAC,MAA0B,GA6BtD,IAAY,EAAyC,IAAI;SAE/D,EAAa;GAKX,YAA2B,EAAU,OAAO,KAAK,KAAK,QAAQ,QAAQ;GAEtE,aAAa,EAAU,OAAO,MAAM;GAEpC,IAAI,QAAe,EAAU,OAAO,MAAM,IAAI;EAChD,CAAC,mBAIC,EAwBU,GAAA;YAvBJ;GAAJ,KAAI;GACI,MAAM,EAAA;sCAAI,QAAA;GAClB,MAAK;GACJ,OAAO,EAAA;GACP,UAAU,EAAA;GACV,OAAO,EAAA;GACR,cAAA;GACA,uBAAA;GACA,qBAAA;;oBAWQ,CAAR,EAAQ,EAAA,QAAA,SAAA,CAAA,CAAA;;;GATQA,EAAAA,OAAO,UAAA;UAAU;WACsB,EADX,sBAAY,CACtD,EAAqD,EAAA,QAAA,WAAA,EAAhB,gBAAY,CAAA,CAAA,CAAA;;;GAEnCA,EAAAA,OAAO,SAAA;UAAS;gBACR,CAAtB,EAAsB,EAAA,QAAA,QAAA,CAAA,CAAA;;;GAERA,EAAAA,OAAM,oBAAA;UAAqB;gBACX,CAA9B,EAA8B,EAAA,QAAA,gBAAA,CAAA,CAAA;;;GAGhBA,EAAAA,OAAO,SAAA;UAAS;gBACR,CAAtB,EAAsB,EAAA,QAAA,QAAA,CAAA,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
@layer vectis.reset, vectis.tokens, vectis.components, vectis.utilities;
|
|
2
|
-
@layer vectis.components{.v-file-input{gap:var(--vectis-space-1);width:100%;font-family:var(--vectis-text-family);flex-direction:column;display:flex;position:relative}.v-file-input
|
|
2
|
+
@layer vectis.components{.v-file-input{gap:var(--vectis-space-1);width:100%;font-family:var(--vectis-text-family);flex-direction:column;display:flex;position:relative}.v-file-input:not([data-disabled]):not([data-readonly]) .v-file-input-control,.v-file-input:not([data-disabled]):not([data-readonly])[data-display=text] .v-input-control{cursor:pointer}.v-file-input[data-display=text] .v-input-control{text-overflow:ellipsis}.v-file-input[data-dragging] .v-input .v-input-field{--field-border-color:var(--vectis-color-accent);background:var(--vectis-color-accent-surface)}.v-file-input[data-disabled] .v-file-input-hint,.v-file-input[data-disabled] .v-file-input-counter{color:var(--vectis-color-text-subtle)}}
|