@quidgest/ui 0.27.1 → 0.29.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/CHANGELOG.md +101 -8
- package/README.md +19 -0
- package/dist/json/api.json +2787 -366
- package/dist/manifest/components.json +1 -2
- package/dist/ui.css +641 -203
- package/dist/ui.esm.js +1631 -1608
- package/dist/ui.js +1314 -1292
- package/dist/ui.min.css +1 -1
- package/dist/ui.min.js +1314 -1292
- package/dist/ui.scss +483 -152
- package/esm/components/QAccordion/QAccordion.d.ts +8 -4
- package/esm/components/QAccordion/QAccordion.d.ts.map +1 -1
- package/esm/components/QAccordion/QAccordion.vue.js +38 -30
- package/esm/components/QAccordion/QAccordionItem.d.ts +4 -1
- package/esm/components/QAccordion/QAccordionItem.d.ts.map +1 -1
- package/esm/components/QAccordion/QAccordionItem.vue.js +37 -6
- package/esm/components/QAccordion/constants.d.ts +9 -0
- package/esm/components/QAccordion/constants.d.ts.map +1 -0
- package/esm/components/QAccordion/constants.js +5 -0
- package/esm/components/QAccordion/index.d.ts +38 -14
- package/esm/components/QAccordion/index.d.ts.map +1 -1
- package/esm/components/QAccordion/types.d.ts +17 -0
- package/esm/components/QAccordion/types.d.ts.map +1 -1
- package/esm/components/QAlert/QAlert.d.ts +68 -0
- package/esm/components/QAlert/QAlert.d.ts.map +1 -0
- package/esm/components/QAlert/QAlert.vue.js +113 -0
- package/esm/components/QAlert/QAlert2.vue.js +5 -0
- package/esm/components/QAlert/constants.d.ts +25 -0
- package/esm/components/QAlert/constants.d.ts.map +1 -0
- package/esm/components/QAlert/constants.js +11 -0
- package/esm/components/QAlert/index.d.ts +56 -0
- package/esm/components/QAlert/index.d.ts.map +1 -0
- package/esm/components/QAlert/index.js +6 -0
- package/esm/components/QAlert/types.d.ts +85 -0
- package/esm/components/QAlert/types.d.ts.map +1 -0
- package/esm/components/QAvatar/QAvatar.d.ts +1 -1
- package/esm/components/QAvatar/QAvatar.d.ts.map +1 -1
- package/esm/components/QAvatar/QAvatar.vue.js +19 -12
- package/esm/components/QAvatar/index.d.ts +3 -3
- package/esm/components/QAvatar/types.d.ts +3 -2
- package/esm/components/QAvatar/types.d.ts.map +1 -1
- package/esm/components/QBadge/QBadge.d.ts +1 -1
- package/esm/components/QBadge/QBadge.d.ts.map +1 -1
- package/esm/components/QBadge/QBadge.vue.js +41 -42
- package/esm/components/QBadge/constants.d.ts +1 -1
- package/esm/components/QBadge/constants.js +1 -1
- package/esm/components/QBadge/index.d.ts +3 -3
- package/esm/components/QBadgeIndicator/QBadgeIndicator.d.ts.map +1 -1
- package/esm/components/QBadgeIndicator/QBadgeIndicator.vue.js +14 -10
- package/esm/components/QBreadcrumbs/QBreadcrumb.d.ts +17 -4
- package/esm/components/QBreadcrumbs/QBreadcrumb.d.ts.map +1 -1
- package/esm/components/QBreadcrumbs/QBreadcrumb.vue.js +12 -7
- package/esm/components/QBreadcrumbs/QBreadcrumbs.d.ts.map +1 -1
- package/esm/components/QBreadcrumbs/QBreadcrumbs.vue.js +26 -32
- package/esm/components/QBreadcrumbs/constants.d.ts +11 -2
- package/esm/components/QBreadcrumbs/constants.d.ts.map +1 -1
- package/esm/components/QBreadcrumbs/constants.js +5 -3
- package/esm/components/QBreadcrumbs/context.d.ts +5 -5
- package/esm/components/QBreadcrumbs/context.d.ts.map +1 -1
- package/esm/components/QBreadcrumbs/index.d.ts +17 -4
- package/esm/components/QBreadcrumbs/index.d.ts.map +1 -1
- package/esm/components/QBreadcrumbs/types.d.ts +2 -0
- package/esm/components/QBreadcrumbs/types.d.ts.map +1 -1
- package/esm/components/QButton/QButton.d.ts +12 -4
- package/esm/components/QButton/QButton.d.ts.map +1 -1
- package/esm/components/QButton/QButton.vue.js +118 -66
- package/esm/components/QButton/constants.d.ts +11 -0
- package/esm/components/QButton/constants.d.ts.map +1 -0
- package/esm/components/QButton/constants.js +5 -0
- package/esm/components/QButton/index.d.ts +15 -4
- package/esm/components/QButton/index.d.ts.map +1 -1
- package/esm/components/QButton/types.d.ts +52 -0
- package/esm/components/QButton/types.d.ts.map +1 -1
- package/esm/components/QButtonGroup/QButtonGroup.vue.js +18 -18
- package/esm/components/QCard/QCard.d.ts.map +1 -1
- package/esm/components/QCard/QCard.vue.js +51 -48
- package/esm/components/QCarousel/QCarousel.d.ts +1 -1
- package/esm/components/QCarousel/QCarousel.d.ts.map +1 -1
- package/esm/components/QCarousel/QCarousel.vue.js +105 -101
- package/esm/components/QCarousel/constants.d.ts +3 -2
- package/esm/components/QCarousel/constants.d.ts.map +1 -1
- package/esm/components/QCarousel/constants.js +4 -3
- package/esm/components/QCarousel/index.d.ts +3 -3
- package/esm/components/QCheckbox/QCheckbox.d.ts +18 -6
- package/esm/components/QCheckbox/QCheckbox.d.ts.map +1 -1
- package/esm/components/QCheckbox/QCheckbox.vue.js +112 -94
- package/esm/components/QCheckbox/constants.d.ts +3 -0
- package/esm/components/QCheckbox/constants.d.ts.map +1 -1
- package/esm/components/QCheckbox/constants.js +4 -2
- package/esm/components/QCheckbox/index.d.ts +57 -47
- package/esm/components/QCheckbox/index.d.ts.map +1 -1
- package/esm/components/QCheckbox/index.js +2 -3
- package/esm/components/QCheckbox/types.d.ts +10 -7
- package/esm/components/QCheckbox/types.d.ts.map +1 -1
- package/esm/components/QCollapsible/QCollapsible.d.ts +1 -1
- package/esm/components/QCollapsible/QCollapsible.vue.js +23 -23
- package/esm/components/QCollapsible/index.d.ts +3 -3
- package/esm/components/QColorPicker/QColorPicker.d.ts +19 -2
- package/esm/components/QColorPicker/QColorPicker.d.ts.map +1 -1
- package/esm/components/QColorPicker/QColorPicker.vue.js +42 -32
- package/esm/components/QColorPicker/constants.d.ts +10 -0
- package/esm/components/QColorPicker/constants.d.ts.map +1 -1
- package/esm/components/QColorPicker/constants.js +6 -2
- package/esm/components/QColorPicker/index.d.ts +63 -6
- package/esm/components/QColorPicker/index.d.ts.map +1 -1
- package/esm/components/QColorPicker/types.d.ts +11 -3
- package/esm/components/QColorPicker/types.d.ts.map +1 -1
- package/esm/components/QCombobox/QCombobox.d.ts +677 -256
- package/esm/components/QCombobox/QCombobox.d.ts.map +1 -1
- package/esm/components/QCombobox/QCombobox.vue.js +134 -114
- package/esm/components/QCombobox/constants.d.ts +10 -0
- package/esm/components/QCombobox/constants.d.ts.map +1 -1
- package/esm/components/QCombobox/constants.js +13 -5
- package/esm/components/QCombobox/index.d.ts +900 -636
- package/esm/components/QCombobox/index.d.ts.map +1 -1
- package/esm/components/QCombobox/types.d.ts +12 -2
- package/esm/components/QCombobox/types.d.ts.map +1 -1
- package/esm/components/QDateTimePicker/QDateTimePicker.d.ts +568 -49
- package/esm/components/QDateTimePicker/QDateTimePicker.d.ts.map +1 -1
- package/esm/components/QDateTimePicker/QDateTimePicker.vue.js +284 -279
- package/esm/components/QDateTimePicker/constants.d.ts +4 -0
- package/esm/components/QDateTimePicker/constants.d.ts.map +1 -1
- package/esm/components/QDateTimePicker/constants.js +12 -6
- package/esm/components/QDateTimePicker/index.d.ts +492 -32
- package/esm/components/QDateTimePicker/index.d.ts.map +1 -1
- package/esm/components/QDateTimePicker/types.d.ts +4 -2
- package/esm/components/QDateTimePicker/types.d.ts.map +1 -1
- package/esm/components/QDialog/QDialog.d.ts +2 -2
- package/esm/components/QDialog/QDialog.d.ts.map +1 -1
- package/esm/components/QDialog/QDialog.vue.js +29 -25
- package/esm/components/QDialog/QDialogProvider.d.ts.map +1 -1
- package/esm/components/QDialog/constants.d.ts +8 -0
- package/esm/components/QDialog/constants.d.ts.map +1 -1
- package/esm/components/QDialog/constants.js +9 -4
- package/esm/components/QDialog/index.d.ts +9 -9
- package/esm/components/QDialog/types.d.ts +7 -5
- package/esm/components/QDialog/types.d.ts.map +1 -1
- package/esm/components/QDropdownMenu/QDropdownMenu.d.ts +1 -1
- package/esm/components/QDropdownMenu/QDropdownMenu.vue.js +0 -1
- package/esm/components/QDropdownMenu/QDropdownMenuContent.d.ts +29 -15
- package/esm/components/QDropdownMenu/QDropdownMenuContent.d.ts.map +1 -1
- package/esm/components/QDropdownMenu/QDropdownMenuContent.vue.js +127 -112
- package/esm/components/QDropdownMenu/constants.d.ts +6 -0
- package/esm/components/QDropdownMenu/constants.d.ts.map +1 -1
- package/esm/components/QDropdownMenu/constants.js +6 -2
- package/esm/components/QDropdownMenu/index.d.ts +3 -6
- package/esm/components/QDropdownMenu/index.d.ts.map +1 -1
- package/esm/components/QDropdownMenu/types.d.ts +9 -7
- package/esm/components/QDropdownMenu/types.d.ts.map +1 -1
- package/esm/components/QField/QField.d.ts +228 -3
- package/esm/components/QField/QField.d.ts.map +1 -1
- package/esm/components/QField/QField.vue.js +99 -36
- package/esm/components/QField/constants.d.ts +11 -0
- package/esm/components/QField/constants.d.ts.map +1 -0
- package/esm/components/QField/constants.js +5 -0
- package/esm/components/QField/index.d.ts +129 -5
- package/esm/components/QField/index.d.ts.map +1 -1
- package/esm/components/QField/types.d.ts +37 -1
- package/esm/components/QField/types.d.ts.map +1 -1
- package/esm/components/QFileUpload/QFileUpload.d.ts +35 -3
- package/esm/components/QFileUpload/QFileUpload.d.ts.map +1 -1
- package/esm/components/QFileUpload/QFileUpload.vue.js +107 -85
- package/esm/components/QFileUpload/constants.d.ts +4 -0
- package/esm/components/QFileUpload/constants.d.ts.map +1 -1
- package/esm/components/QFileUpload/constants.js +6 -3
- package/esm/components/QFileUpload/index.d.ts +108 -9
- package/esm/components/QFileUpload/index.d.ts.map +1 -1
- package/esm/components/QFocusWrap/QFocusWrap.d.ts.map +1 -1
- package/esm/components/QFocusWrap/QFocusWrap.vue.js +38 -51
- package/esm/components/QIcon/QIconFont.d.ts +1 -3
- package/esm/components/QIcon/QIconFont.d.ts.map +1 -1
- package/esm/components/QIcon/QIconFont.vue.js +2 -2
- package/esm/components/QIcon/QIconSvg.d.ts +1 -3
- package/esm/components/QIcon/QIconSvg.d.ts.map +1 -1
- package/esm/components/QIcon/QIconSvg.vue.js +1 -1
- package/esm/components/QIcon/QSvgSymbol.d.ts +3 -2
- package/esm/components/QIcon/QSvgSymbol.d.ts.map +1 -1
- package/esm/components/QIcon/QSvgSymbol.vue.js +37 -28
- package/esm/components/QIcon/index.d.ts +2 -6
- package/esm/components/QIcon/index.d.ts.map +1 -1
- package/esm/components/QIcon/index.js +6 -6
- package/esm/components/QIcon/types.d.ts +7 -3
- package/esm/components/QIcon/types.d.ts.map +1 -1
- package/esm/components/QInputGroup/QInputGroup.d.ts +263 -12
- package/esm/components/QInputGroup/QInputGroup.d.ts.map +1 -1
- package/esm/components/QInputGroup/QInputGroup.vue.js +76 -35
- package/esm/components/QInputGroup/index.d.ts +138 -9
- package/esm/components/QInputGroup/index.d.ts.map +1 -1
- package/esm/components/QInputGroup/types.d.ts +15 -1
- package/esm/components/QInputGroup/types.d.ts.map +1 -1
- package/esm/components/QLabel/QLabel.d.ts.map +1 -1
- package/esm/components/QLabel/QLabel.vue.js +1 -0
- package/esm/components/QList/QList.d.ts +18 -10
- package/esm/components/QList/QList.d.ts.map +1 -1
- package/esm/components/QList/QList.vue.js +131 -125
- package/esm/components/QList/QListItem.d.ts +6 -2
- package/esm/components/QList/QListItem.d.ts.map +1 -1
- package/esm/components/QList/QListItem.vue.js +54 -41
- package/esm/components/QList/groupListItems.d.ts +25 -0
- package/esm/components/QList/groupListItems.d.ts.map +1 -0
- package/esm/components/QList/groupListItems.js +18 -0
- package/esm/components/QList/index.d.ts +14 -6
- package/esm/components/QList/index.d.ts.map +1 -1
- package/esm/components/QList/types.d.ts +23 -0
- package/esm/components/QList/types.d.ts.map +1 -1
- package/esm/components/QObfuscation/QObfuscation.d.ts +28 -3
- package/esm/components/QObfuscation/QObfuscation.d.ts.map +1 -1
- package/esm/components/QObfuscation/QObfuscation.vue.js +119 -89
- package/esm/components/QObfuscation/constants.d.ts +4 -0
- package/esm/components/QObfuscation/constants.d.ts.map +1 -1
- package/esm/components/QObfuscation/constants.js +6 -3
- package/esm/components/QObfuscation/index.d.ts +83 -9
- package/esm/components/QObfuscation/index.d.ts.map +1 -1
- package/esm/components/QOverflow/QOverflow.d.ts +6 -1
- package/esm/components/QOverflow/QOverflow.d.ts.map +1 -1
- package/esm/components/QOverflow/QOverflow.vue.js +94 -99
- package/esm/components/QOverflow/constants.d.ts +6 -3
- package/esm/components/QOverflow/constants.d.ts.map +1 -1
- package/esm/components/QOverflow/constants.js +2 -2
- package/esm/components/QOverflow/index.d.ts +3 -3
- package/esm/components/QOverlay/QOverlay.d.ts +2 -2
- package/esm/components/QOverlay/QOverlay.d.ts.map +1 -1
- package/esm/components/QOverlay/QOverlay.vue.js +125 -117
- package/esm/components/QOverlay/index.d.ts +6 -6
- package/esm/components/QOverlay/types.d.ts +9 -2
- package/esm/components/QOverlay/types.d.ts.map +1 -1
- package/esm/components/QPasswordField/QPasswordField.d.ts +412 -25
- package/esm/components/QPasswordField/QPasswordField.d.ts.map +1 -1
- package/esm/components/QPasswordField/QPasswordField.vue.js +51 -35
- package/esm/components/QPasswordField/QPasswordFieldMeterOverlay.vue.js +1 -0
- package/esm/components/QPasswordField/constants.d.ts +8 -0
- package/esm/components/QPasswordField/constants.d.ts.map +1 -1
- package/esm/components/QPasswordField/constants.js +8 -3
- package/esm/components/QPasswordField/index.d.ts +274 -15
- package/esm/components/QPasswordField/index.d.ts.map +1 -1
- package/esm/components/QPasswordField/types.d.ts +14 -2
- package/esm/components/QPasswordField/types.d.ts.map +1 -1
- package/esm/components/QPhoneField/QPhoneField.d.ts +1768 -132
- package/esm/components/QPhoneField/QPhoneField.d.ts.map +1 -1
- package/esm/components/QPhoneField/QPhoneField.vue.js +194 -168
- package/esm/components/QPhoneField/constants.d.ts +24 -0
- package/esm/components/QPhoneField/constants.d.ts.map +1 -1
- package/esm/components/QPhoneField/constants.js +14 -3
- package/esm/components/QPhoneField/index.d.ts +987 -68
- package/esm/components/QPhoneField/index.d.ts.map +1 -1
- package/esm/components/QPhoneField/types.d.ts +10 -2
- package/esm/components/QPhoneField/types.d.ts.map +1 -1
- package/esm/components/QPopover/QPopover.d.ts +1 -1
- package/esm/components/QPopover/index.d.ts +3 -3
- package/esm/components/QPropertyList/QPropertyList.d.ts.map +1 -1
- package/esm/components/QPropertyList/QPropertyList.vue.js +63 -59
- package/esm/components/QPropertyList/QPropertyListGroup.vue.js +5 -6
- package/esm/components/QPropertyList/QPropertyListPanel.vue.js +0 -1
- package/esm/components/QPropertyList/QPropertyListRow.d.ts +1 -1
- package/esm/components/QPropertyList/QPropertyListRow.vue.js +2 -2
- package/esm/components/QPropertyList/index.d.ts +2 -4
- package/esm/components/QPropertyList/index.d.ts.map +1 -1
- package/esm/components/QPropertyList/types.d.ts +0 -12
- package/esm/components/QPropertyList/types.d.ts.map +1 -1
- package/esm/components/QRadioGroup/QRadioButton.d.ts +1 -1
- package/esm/components/QRadioGroup/QRadioButton.d.ts.map +1 -1
- package/esm/components/QRadioGroup/QRadioButton.vue.js +49 -45
- package/esm/components/QRadioGroup/QRadioGroup.d.ts.map +1 -1
- package/esm/components/QRadioGroup/QRadioGroup.vue.js +56 -41
- package/esm/components/QRadioGroup/index.d.ts +3 -3
- package/esm/components/QRadioGroup/types.d.ts +5 -4
- package/esm/components/QRadioGroup/types.d.ts.map +1 -1
- package/esm/components/QRemoveScrollBar/QRemoveScrollBar.d.ts.map +1 -1
- package/esm/components/QRemoveScrollBar/QRemoveScrollBar.vue.js +7 -7
- package/esm/components/QRemoveScrollBar/utils/gap.d.ts +0 -6
- package/esm/components/QRemoveScrollBar/utils/gap.d.ts.map +1 -1
- package/esm/components/QRemoveScrollBar/utils/gap.js +12 -18
- package/esm/components/QRemoveScrollBar/utils/stylesheet.d.ts +11 -0
- package/esm/components/QRemoveScrollBar/utils/stylesheet.d.ts.map +1 -1
- package/esm/components/QRemoveScrollBar/utils/stylesheet.js +5 -5
- package/esm/components/QSection/QSection.d.ts +11 -3
- package/esm/components/QSection/QSection.d.ts.map +1 -1
- package/esm/components/QSection/QSection.vue.js +76 -21
- package/esm/components/QSection/constants.d.ts +11 -0
- package/esm/components/QSection/constants.d.ts.map +1 -0
- package/esm/components/QSection/constants.js +5 -0
- package/esm/components/QSection/index.d.ts +12 -1
- package/esm/components/QSection/index.d.ts.map +1 -1
- package/esm/components/QSection/types.d.ts +39 -0
- package/esm/components/QSection/types.d.ts.map +1 -1
- package/esm/components/QSelect/QSelect.d.ts +477 -36
- package/esm/components/QSelect/QSelect.d.ts.map +1 -1
- package/esm/components/QSelect/QSelect.vue.js +273 -212
- package/esm/components/QSelect/constants.d.ts +14 -1
- package/esm/components/QSelect/constants.d.ts.map +1 -1
- package/esm/components/QSelect/constants.js +14 -8
- package/esm/components/QSelect/index.d.ts +332 -28
- package/esm/components/QSelect/index.d.ts.map +1 -1
- package/esm/components/QSelect/types.d.ts +12 -2
- package/esm/components/QSelect/types.d.ts.map +1 -1
- package/esm/components/QSidebar/QSidebar.d.ts.map +1 -1
- package/esm/components/QSidebar/QSidebar.vue.js +68 -68
- package/esm/components/QSidebar/QSidebarAnchor.vue.js +1 -1
- package/esm/components/QSidebar/QSidebarItem.d.ts +32 -2
- package/esm/components/QSidebar/QSidebarItem.d.ts.map +1 -1
- package/esm/components/QSidebar/QSidebarItem.vue.js +1 -1
- package/esm/components/QSidebar/QSidebarPanel.d.ts.map +1 -1
- package/esm/components/QSidebar/QSidebarPanel.vue.js +5 -5
- package/esm/components/QSidebar/context.d.ts +3 -3
- package/esm/components/QSidebar/context.d.ts.map +1 -1
- package/esm/components/QSidebar/index.d.ts +16 -1
- package/esm/components/QSidebar/index.d.ts.map +1 -1
- package/esm/components/QSpinnerLoader/index.js +3 -3
- package/esm/components/QSteps/QStepHeader.d.ts.map +1 -1
- package/esm/components/QSteps/QStepHeader.vue.js +1 -0
- package/esm/components/QSteps/QSteps.d.ts +4 -4
- package/esm/components/QSteps/QSteps.d.ts.map +1 -1
- package/esm/components/QSteps/QSteps.vue.js +152 -130
- package/esm/components/QSteps/QStepsNav.vue.js +6 -6
- package/esm/components/QSteps/constants.d.ts +16 -1
- package/esm/components/QSteps/constants.d.ts.map +1 -1
- package/esm/components/QSteps/constants.js +6 -3
- package/esm/components/QSteps/index.d.ts +2 -2
- package/esm/components/QSteps/types.d.ts +13 -4
- package/esm/components/QSteps/types.d.ts.map +1 -1
- package/esm/components/QSwitch/QSwitch.d.ts +195 -0
- package/esm/components/QSwitch/QSwitch.d.ts.map +1 -1
- package/esm/components/QSwitch/QSwitch.vue.js +96 -56
- package/esm/components/QSwitch/index.d.ts +197 -2
- package/esm/components/QSwitch/index.d.ts.map +1 -1
- package/esm/components/QSwitch/types.d.ts +2 -1
- package/esm/components/QSwitch/types.d.ts.map +1 -1
- package/esm/components/QTabs/QTab.d.ts +35 -12
- package/esm/components/QTabs/QTab.d.ts.map +1 -1
- package/esm/components/QTabs/QTab.vue.js +77 -67
- package/esm/components/QTabs/QTabs.d.ts +7 -4
- package/esm/components/QTabs/QTabs.d.ts.map +1 -1
- package/esm/components/QTabs/QTabs.vue.js +94 -81
- package/esm/components/QTabs/constants.d.ts +24 -2
- package/esm/components/QTabs/constants.d.ts.map +1 -1
- package/esm/components/QTabs/constants.js +9 -0
- package/esm/components/QTabs/context.d.ts +3 -3
- package/esm/components/QTabs/context.d.ts.map +1 -1
- package/esm/components/QTabs/index.d.ts +34 -15
- package/esm/components/QTabs/index.d.ts.map +1 -1
- package/esm/components/QTabs/types.d.ts +26 -2
- package/esm/components/QTabs/types.d.ts.map +1 -1
- package/esm/components/QTextArea/QTextArea.d.ts +1 -1
- package/esm/components/QTextArea/QTextArea.d.ts.map +1 -1
- package/esm/components/QTextArea/QTextArea.vue.js +62 -47
- package/esm/components/QTextArea/index.d.ts +6 -6
- package/esm/components/QTextField/QTextField.d.ts +277 -11
- package/esm/components/QTextField/QTextField.d.ts.map +1 -1
- package/esm/components/QTextField/QTextField.vue.js +70 -55
- package/esm/components/QTextField/constants.d.ts +9 -0
- package/esm/components/QTextField/constants.d.ts.map +1 -1
- package/esm/components/QTextField/constants.js +10 -3
- package/esm/components/QTextField/index.d.ts +192 -11
- package/esm/components/QTextField/index.d.ts.map +1 -1
- package/esm/components/QTextField/index.js +4 -4
- package/esm/components/QTextField/types.d.ts +10 -2
- package/esm/components/QTextField/types.d.ts.map +1 -1
- package/esm/components/QToast/QToast.d.ts +4 -2
- package/esm/components/QToast/QToast.d.ts.map +1 -1
- package/esm/components/QToast/QToast.vue.js +157 -104
- package/esm/components/QToast/QToaster.d.ts +1 -1
- package/esm/components/QToast/QToaster.d.ts.map +1 -1
- package/esm/components/QToast/QToaster.vue.js +59 -29
- package/esm/components/QToast/constants.d.ts +18 -0
- package/esm/components/QToast/constants.d.ts.map +1 -1
- package/esm/components/QToast/constants.js +9 -2
- package/esm/components/QToast/context.d.ts +24 -0
- package/esm/components/QToast/context.d.ts.map +1 -0
- package/esm/components/QToast/context.js +4 -0
- package/esm/components/QToast/index.d.ts +12 -7
- package/esm/components/QToast/index.d.ts.map +1 -1
- package/esm/components/QToast/types.d.ts +26 -6
- package/esm/components/QToast/types.d.ts.map +1 -1
- package/esm/components/QToggle/QToggle.d.ts +2 -2
- package/esm/components/QToggle/QToggle.d.ts.map +1 -1
- package/esm/components/QToggle/QToggle.vue.js +13 -0
- package/esm/components/QToggle/index.d.ts +16 -1
- package/esm/components/QToggle/index.d.ts.map +1 -1
- package/esm/components/QToggleGroup/QToggleGroup.d.ts +3 -3
- package/esm/components/QToggleGroup/QToggleGroup.d.ts.map +1 -1
- package/esm/components/QToggleGroup/QToggleGroup.vue.js +34 -31
- package/esm/components/QToggleGroup/QToggleGroupItem.d.ts +2 -2
- package/esm/components/QToggleGroup/QToggleGroupItem.d.ts.map +1 -1
- package/esm/components/QToggleGroup/QToggleGroupItem.vue.js +20 -7
- package/esm/components/QToggleGroup/index.d.ts +9 -9
- package/esm/components/QToggleGroup/types.d.ts +8 -1
- package/esm/components/QToggleGroup/types.d.ts.map +1 -1
- package/esm/components/QTooltip/QTooltip.d.ts +1 -1
- package/esm/components/QTooltip/QTooltip.d.ts.map +1 -1
- package/esm/components/QTooltip/QTooltip.vue.js +1 -1
- package/esm/components/QTooltip/index.d.ts +3 -3
- package/esm/components/__internal__/QChevron/QChevron.vue.js +5 -5
- package/esm/components/__internal__/QClearButton/QClearButton.d.ts +1 -1
- package/esm/components/__internal__/QClearButton/QClearButton.vue.js +4 -4
- package/esm/components/__internal__/QClearButton/index.d.ts +1 -1
- package/esm/components/__internal__/QClearButton/index.d.ts.map +1 -1
- package/esm/components/__internal__/QHelpPopover/QHelpPopover.d.ts +99 -0
- package/esm/components/__internal__/QHelpPopover/QHelpPopover.d.ts.map +1 -0
- package/esm/components/__internal__/QHelpPopover/QHelpPopover.vue.js +60 -0
- package/esm/components/__internal__/QHelpPopover/QHelpPopover2.vue.js +5 -0
- package/esm/components/__internal__/QHelpPopover/constants.d.ts +9 -0
- package/esm/components/__internal__/QHelpPopover/constants.d.ts.map +1 -0
- package/esm/components/__internal__/QHelpPopover/constants.js +4 -0
- package/esm/components/__internal__/QHelpPopover/index.d.ts +98 -0
- package/esm/components/__internal__/QHelpPopover/index.d.ts.map +1 -0
- package/esm/components/__internal__/QHelpPopover/index.js +6 -0
- package/esm/components/__internal__/QHelpPopover/resolveHelp.d.ts +50 -0
- package/esm/components/__internal__/QHelpPopover/resolveHelp.d.ts.map +1 -0
- package/esm/components/__internal__/QHelpPopover/resolveHelp.js +27 -0
- package/esm/components/__internal__/QHelpPopover/types.d.ts +32 -0
- package/esm/components/__internal__/QHelpPopover/types.d.ts.map +1 -0
- package/esm/components/__internal__/QSafeTriangle/QSafeTriangle.d.ts +2 -2
- package/esm/components/__internal__/QSafeTriangle/index.d.ts +2 -2
- package/esm/components/index.d.ts +1 -0
- package/esm/components/index.d.ts.map +1 -1
- package/esm/components/index.js +132 -131
- package/esm/composables/defaults.d.ts +10 -0
- package/esm/composables/defaults.d.ts.map +1 -1
- package/esm/composables/defaults.js +8 -5
- package/esm/composables/useColor/index.d.ts +31 -21
- package/esm/composables/useColor/index.d.ts.map +1 -1
- package/esm/composables/useColor/index.js +58 -49
- package/esm/composables/useColor/types.d.ts +19 -6
- package/esm/composables/useColor/types.d.ts.map +1 -1
- package/esm/composables/useDialog/_internal.js +8 -11
- package/esm/composables/useDialog/index.js +1 -2
- package/esm/composables/useDialog/types.d.ts +3 -3
- package/esm/composables/useDialog/types.d.ts.map +1 -1
- package/esm/composables/useDropZone/index.d.ts +1 -11
- package/esm/composables/useDropZone/index.d.ts.map +1 -1
- package/esm/composables/useDropZone/index.js +23 -26
- package/esm/composables/useGroup/index.d.ts.map +1 -1
- package/esm/composables/useGroup/index.js +15 -15
- package/esm/composables/useOverlayScope/index.d.ts +29 -0
- package/esm/composables/useOverlayScope/index.d.ts.map +1 -0
- package/esm/composables/useOverlayScope/index.js +23 -0
- package/esm/composables/useTextareaAutosize/index.d.ts +3 -1
- package/esm/composables/useTextareaAutosize/index.d.ts.map +1 -1
- package/esm/composables/useTextareaAutosize/index.js +6 -6
- package/esm/composables/useToast/_internal.js +23 -23
- package/esm/composables/useToast/index.js +1 -2
- package/esm/composables/useToast/types.d.ts +3 -3
- package/esm/composables/useToast/types.d.ts.map +1 -1
- package/esm/framework.js +14 -12
- package/esm/index.d.ts +2 -3
- package/esm/index.d.ts.map +1 -1
- package/esm/symbols/overlayScope.d.ts +4 -0
- package/esm/symbols/overlayScope.d.ts.map +1 -0
- package/esm/symbols/overlayScope.js +4 -0
- package/esm/types/component.d.ts +31 -0
- package/esm/types/component.d.ts.map +1 -1
- package/esm/types/index.d.ts +1 -1
- package/esm/types/index.d.ts.map +1 -1
- package/esm/utils/color/merge.d.ts.map +1 -1
- package/esm/utils/color/parse.d.ts.map +1 -1
- package/esm/utils/color/parse.js +3 -10
- package/esm/utils/date.d.ts +35 -13
- package/esm/utils/date.d.ts.map +1 -1
- package/esm/utils/date.js +313 -253
- package/esm/utils/focus.d.ts +35 -0
- package/esm/utils/focus.d.ts.map +1 -0
- package/esm/utils/focus.js +27 -0
- package/esm/utils/mask.d.ts +1 -0
- package/esm/utils/mask.d.ts.map +1 -1
- package/esm/utils/mask.js +42 -100
- package/esm/utils/overlay.d.ts +13 -1
- package/esm/utils/overlay.d.ts.map +1 -1
- package/esm/utils/overlay.js +57 -43
- package/esm/utils/safeTriangle.d.ts.map +1 -1
- package/esm/utils/safeTriangle.js +2 -2
- package/esm/utils/setupPropsProxy.d.ts +3 -1
- package/esm/utils/setupPropsProxy.d.ts.map +1 -1
- package/esm/utils/setupPropsProxy.js +2 -2
- package/esm/utils/severity.d.ts +40 -0
- package/esm/utils/severity.d.ts.map +1 -0
- package/esm/utils/severity.js +25 -0
- package/esm/utils/theme.js +12 -12
- package/package.json +9 -6
- package/esm/components/QCheckbox/QCheckboxLabel.d.ts +0 -18
- package/esm/components/QCheckbox/QCheckboxLabel.d.ts.map +0 -1
- package/esm/components/QCheckbox/QCheckboxLabel.vue.js +0 -32
- package/esm/components/QCheckbox/QCheckboxLabel2.vue.js +0 -5
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns the rendered elements in `container` that match {@link TABBABLE_SELECTOR},
|
|
3
|
+
* in document order. Skips the focus walls of `QFocusWrap`.
|
|
4
|
+
*
|
|
5
|
+
* @param container - The element or document to search.
|
|
6
|
+
*/
|
|
7
|
+
export declare function getTabbableElements(container: ParentNode): HTMLElement[];
|
|
8
|
+
/**
|
|
9
|
+
* Finds the tabbable element next to `element` inside `container`: the first one after
|
|
10
|
+
* it in document order, or the last one before it when nothing follows. That is where
|
|
11
|
+
* Tab would have gone, so the focus order stays intact (WCAG 2.4.3).
|
|
12
|
+
*
|
|
13
|
+
* Skips elements inside `element` and elements with a negative `tabindex`.
|
|
14
|
+
*
|
|
15
|
+
* @param element - The element about to be removed.
|
|
16
|
+
* @param container - Where to look. Defaults to the whole document.
|
|
17
|
+
* @returns The element to focus, or `undefined` when the container has none.
|
|
18
|
+
*/
|
|
19
|
+
export declare function getAdjacentTabbable(element: Element, container?: ParentNode): HTMLElement | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* Finds where focus should go when `element` leaves the page while focus is inside it.
|
|
22
|
+
* Removing the focused element would otherwise drop focus on `<body>`, and screen
|
|
23
|
+
* readers lose their place.
|
|
24
|
+
*
|
|
25
|
+
* Inside an overlay, such as an open `QDialog` or `QPopover`, the search stays in the
|
|
26
|
+
* overlay's content: an element of the page behind a modal dialog is not a valid target.
|
|
27
|
+
* When nothing else in the overlay can take focus, the content element itself takes it
|
|
28
|
+
* (it has `tabindex="-1"`), so focus stays in the dialog. Outside overlays, the search
|
|
29
|
+
* covers the whole document.
|
|
30
|
+
*
|
|
31
|
+
* @param element - The element about to be removed.
|
|
32
|
+
* @returns The element to focus, or `undefined` when the page has none.
|
|
33
|
+
*/
|
|
34
|
+
export declare function getFocusTargetOnRemoval(element: Element): HTMLElement | undefined;
|
|
35
|
+
//# sourceMappingURL=focus.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"focus.d.ts","sourceRoot":"","sources":["../../src/utils/focus.ts"],"names":[],"mappings":"AA0BA;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,UAAU,GAAG,WAAW,EAAE,CAMxE;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CAClC,OAAO,EAAE,OAAO,EAChB,SAAS,GAAE,UAAkC,GAC3C,WAAW,GAAG,SAAS,CAczB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,GAAG,WAAW,GAAG,SAAS,CAKjF"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
//#region src/utils/focus.ts
|
|
2
|
+
var e = [
|
|
3
|
+
"a[href]",
|
|
4
|
+
"area[href]",
|
|
5
|
+
"input:not([disabled])",
|
|
6
|
+
"select:not([disabled])",
|
|
7
|
+
"textarea:not([disabled])",
|
|
8
|
+
"button:not([disabled])",
|
|
9
|
+
"iframe",
|
|
10
|
+
"object",
|
|
11
|
+
"embed",
|
|
12
|
+
"[tabindex]:not([tabindex=\"-1\"])",
|
|
13
|
+
"[contenteditable]"
|
|
14
|
+
].join(","), t = ".q-overlay__content";
|
|
15
|
+
function n(t) {
|
|
16
|
+
return Array.from(t.querySelectorAll(e)).filter((e) => (e.offsetWidth > 0 || e.offsetHeight > 0 || e.getClientRects().length > 0) && !e.getAttribute("data-focus-wall"));
|
|
17
|
+
}
|
|
18
|
+
function r(e, t = e.ownerDocument) {
|
|
19
|
+
let r = n(t).filter((t) => !(Number(t.getAttribute("tabindex")) < 0) && !e.contains(t)), i = r.findIndex((t) => e.compareDocumentPosition(t) & Node.DOCUMENT_POSITION_FOLLOWING);
|
|
20
|
+
return i >= 0 ? r[i] : r[r.length - 1];
|
|
21
|
+
}
|
|
22
|
+
function i(e) {
|
|
23
|
+
let n = e.closest(t);
|
|
24
|
+
return n ? r(e, n) ?? n : r(e);
|
|
25
|
+
}
|
|
26
|
+
//#endregion
|
|
27
|
+
export { r as getAdjacentTabbable, i as getFocusTargetOnRemoval, n as getTabbableElements };
|
package/esm/utils/mask.d.ts
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* - `a`: single alphabetic character, normalized to lowercase
|
|
7
7
|
* - `p`: meridiem token (`AM` or `PM` only)
|
|
8
8
|
* - `W`: variable-width alphabetic segment
|
|
9
|
+
* - `±`: a sign, `+` or `-` (the sign of a time zone offset)
|
|
9
10
|
* - any other character: fixed separator/literal
|
|
10
11
|
* @param value Raw user input.
|
|
11
12
|
* @param maskPattern Mask to apply.
|
package/esm/utils/mask.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mask.d.ts","sourceRoot":"","sources":["../../src/utils/mask.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"mask.d.ts","sourceRoot":"","sources":["../../src/utils/mask.ts"],"names":[],"mappings":"AA0FA;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,CA6GpE"}
|
package/esm/utils/mask.js
CHANGED
|
@@ -10,7 +10,7 @@ function t(e, t) {
|
|
|
10
10
|
n += 2;
|
|
11
11
|
continue;
|
|
12
12
|
}
|
|
13
|
-
if (t === "#" || t === "n" || t === "A" || t === "a" || t === "W" || t === "p") return n;
|
|
13
|
+
if (t === "#" || t === "n" || t === "A" || t === "a" || t === "W" || t === "p" || t === "±") return n;
|
|
14
14
|
n += 1;
|
|
15
15
|
}
|
|
16
16
|
return -1;
|
|
@@ -19,136 +19,78 @@ function n(e, t) {
|
|
|
19
19
|
let n = t;
|
|
20
20
|
for (; n < e.length && e[n] === " ";) n += 1;
|
|
21
21
|
let r = "", i = n;
|
|
22
|
-
for (; i < e.length && /[A-Za-z]/.test(e[i]
|
|
23
|
-
let t =
|
|
24
|
-
if (
|
|
25
|
-
|
|
26
|
-
r = `${t}M`, i += 1, i < e.length && (e[i] ?? "").toUpperCase() === "M" && (i += 1);
|
|
27
|
-
break;
|
|
28
|
-
}
|
|
29
|
-
} else if (r.length === 1 && t === "M") {
|
|
30
|
-
r += "M", i += 1;
|
|
22
|
+
for (; i < e.length && /[A-Za-z]/.test(e[i]);) {
|
|
23
|
+
let t = e[i].toUpperCase();
|
|
24
|
+
if (i += 1, t === "A" || t === "P") {
|
|
25
|
+
r = `${t}M`, i < e.length && e[i].toUpperCase() === "M" && (i += 1);
|
|
31
26
|
break;
|
|
32
27
|
}
|
|
33
|
-
i += 1;
|
|
34
28
|
}
|
|
35
|
-
for (; i < e.length && /[A-Za-z]/.test(e[i]
|
|
29
|
+
for (; i < e.length && /[A-Za-z]/.test(e[i]);) i += 1;
|
|
36
30
|
return {
|
|
37
31
|
consumed: i - t,
|
|
38
32
|
text: r
|
|
39
33
|
};
|
|
40
34
|
}
|
|
41
35
|
function r(t, n) {
|
|
42
|
-
|
|
43
|
-
for (; i < n.length;) {
|
|
44
|
-
let a = n[i];
|
|
45
|
-
if (a === "p") return r;
|
|
46
|
-
if (a === "!") {
|
|
47
|
-
let e = n[i + 1];
|
|
48
|
-
e && t[r] === e && (r += 1), i += 2;
|
|
49
|
-
continue;
|
|
50
|
-
}
|
|
51
|
-
if (a === "#" || a === "n") {
|
|
52
|
-
if (/\d/.test(t[r] ?? "")) {
|
|
53
|
-
r += 1, i += 1;
|
|
54
|
-
continue;
|
|
55
|
-
}
|
|
56
|
-
return -1;
|
|
57
|
-
}
|
|
58
|
-
if (a === "A" || a === "a") {
|
|
59
|
-
if (e(t[r] ?? "")) {
|
|
60
|
-
r += 1, i += 1;
|
|
61
|
-
continue;
|
|
62
|
-
}
|
|
63
|
-
return -1;
|
|
64
|
-
}
|
|
65
|
-
if (a === "W") {
|
|
66
|
-
let a = n[i + 1];
|
|
67
|
-
if (e(t[r] ?? "") && t[r] !== a) {
|
|
68
|
-
r += 1;
|
|
69
|
-
continue;
|
|
70
|
-
}
|
|
71
|
-
i += 1;
|
|
72
|
-
continue;
|
|
73
|
-
}
|
|
74
|
-
if (t[r] === a) {
|
|
75
|
-
r += 1, i += 1;
|
|
76
|
-
continue;
|
|
77
|
-
}
|
|
78
|
-
if (a === " " && n[i + 1] === "p") {
|
|
79
|
-
let e = t[r];
|
|
80
|
-
if ((e === void 0 || e === " " || /[A-Za-z]/.test(e)) && (i += 1, n[i] === "p")) return r;
|
|
81
|
-
}
|
|
82
|
-
return -1;
|
|
83
|
-
}
|
|
84
|
-
return -1;
|
|
85
|
-
}
|
|
86
|
-
function i(e, t, i) {
|
|
87
|
-
let a = r(e, t);
|
|
88
|
-
return a < 0 || i <= a ? "" : n(e.slice(0, i), a).text;
|
|
36
|
+
return n === "#" || n === "n" ? /\d/.test(t) : n === "p" ? /^[ap]$/i.test(t) : n === "A" || n === "a" || n === "W" ? e(t) : n === "±" ? t === "+" || t === "-" : t === n;
|
|
89
37
|
}
|
|
90
|
-
function
|
|
91
|
-
let
|
|
92
|
-
|
|
93
|
-
let r = e.toUpperCase();
|
|
94
|
-
return t ? n.length === 1 && (n === "A" || n === "P") ? r === "M" : !1 : r === "A" || r === "P";
|
|
38
|
+
function i(e, n, i) {
|
|
39
|
+
let a = t(n, i);
|
|
40
|
+
return a < 0 ? !1 : r(e, n[a]);
|
|
95
41
|
}
|
|
96
|
-
function
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
let l = t(n, r);
|
|
101
|
-
if (l < 0) return !1;
|
|
102
|
-
let u = n[l];
|
|
103
|
-
return !u || u === "!" ? !1 : u === "p" ? a(e, s !== void 0 && c !== void 0 ? i(s, n, c) : "") : o(e, u);
|
|
104
|
-
}
|
|
105
|
-
function c(t, r) {
|
|
106
|
-
let i = "", a = 0, o = 0;
|
|
107
|
-
for (; o < r.length && a < t.length;) {
|
|
108
|
-
let c = r[o], l = t[a];
|
|
42
|
+
function a(t, r) {
|
|
43
|
+
let a = "", o = 0, s = 0;
|
|
44
|
+
for (; s < r.length && o < t.length;) {
|
|
45
|
+
let c = r[s], l = t[o];
|
|
109
46
|
if (c === "!") {
|
|
110
|
-
let e = r[
|
|
47
|
+
let e = r[s + 1];
|
|
111
48
|
if (!e) break;
|
|
112
|
-
l === e ? (
|
|
49
|
+
l === e ? (a += e, o++) : a += e, s += 2;
|
|
50
|
+
continue;
|
|
51
|
+
}
|
|
52
|
+
if (c === "#") if (/\d/.test(l)) a += l, o++;
|
|
53
|
+
else {
|
|
54
|
+
o++;
|
|
113
55
|
continue;
|
|
114
56
|
}
|
|
115
|
-
if (c === "
|
|
57
|
+
else if (c === "n") /\d/.test(l) && (a += l, o++);
|
|
58
|
+
else if (c === "A" || c === "a") if (e(l)) a += c === "A" ? l.toUpperCase() : l.toLowerCase(), o++;
|
|
116
59
|
else {
|
|
117
|
-
|
|
60
|
+
o++;
|
|
118
61
|
continue;
|
|
119
62
|
}
|
|
120
|
-
else if (c === "
|
|
121
|
-
else if (c === "A" || c === "a") if (e(l)) i += c === "A" ? l.toUpperCase() : l.toLowerCase(), a++;
|
|
63
|
+
else if (c === "±") if (l === "+" || l === "-") a += l, o++;
|
|
122
64
|
else {
|
|
123
|
-
|
|
65
|
+
o++;
|
|
124
66
|
continue;
|
|
125
67
|
}
|
|
126
68
|
else if (c === "p") {
|
|
127
|
-
let e = n(t,
|
|
69
|
+
let e = n(t, o);
|
|
128
70
|
if (e.consumed === 0) break;
|
|
129
|
-
|
|
71
|
+
o += e.consumed, e.text && (a += e.text), s++;
|
|
130
72
|
continue;
|
|
131
73
|
} else if (c === "W") {
|
|
132
|
-
let n = r[
|
|
133
|
-
for (;
|
|
134
|
-
let r = t[
|
|
135
|
-
if (n && r === n &&
|
|
74
|
+
let n = r[s + 1], i = !1;
|
|
75
|
+
for (; o < t.length;) {
|
|
76
|
+
let r = t[o];
|
|
77
|
+
if (n && r === n && i) break;
|
|
136
78
|
if (e(r)) {
|
|
137
|
-
|
|
79
|
+
a += r, o++, i = !0;
|
|
138
80
|
continue;
|
|
139
81
|
}
|
|
140
82
|
if (n && r === n) break;
|
|
141
|
-
|
|
83
|
+
o++;
|
|
142
84
|
}
|
|
143
|
-
} else if (l === c)
|
|
144
|
-
else if (/\d/.test(l))
|
|
145
|
-
else if (
|
|
146
|
-
|
|
85
|
+
} else if (l === c) a += c, o++;
|
|
86
|
+
else if (/\d/.test(l)) a += c;
|
|
87
|
+
else if (i(l, r, s + 1)) {
|
|
88
|
+
a += c, s++;
|
|
147
89
|
continue;
|
|
148
|
-
} else
|
|
149
|
-
|
|
90
|
+
} else o++;
|
|
91
|
+
s++;
|
|
150
92
|
}
|
|
151
|
-
return
|
|
93
|
+
return a;
|
|
152
94
|
}
|
|
153
95
|
//#endregion
|
|
154
|
-
export {
|
|
96
|
+
export { a as applyMask };
|
package/esm/utils/overlay.d.ts
CHANGED
|
@@ -31,6 +31,13 @@ export interface Coords {
|
|
|
31
31
|
x: number;
|
|
32
32
|
y: number;
|
|
33
33
|
}
|
|
34
|
+
/**
|
|
35
|
+
* Width and height of an element.
|
|
36
|
+
*/
|
|
37
|
+
export interface Size {
|
|
38
|
+
width: number;
|
|
39
|
+
height: number;
|
|
40
|
+
}
|
|
34
41
|
/**
|
|
35
42
|
* Options for computing the position of the overlay.
|
|
36
43
|
*/
|
|
@@ -61,13 +68,18 @@ export interface ComputePositionResult {
|
|
|
61
68
|
*/
|
|
62
69
|
overlayCoords: Coords;
|
|
63
70
|
/**
|
|
64
|
-
* The computed coordinates for the arrow.
|
|
71
|
+
* The computed coordinates for the center of the arrow, from the overlay's top-left corner.
|
|
65
72
|
*/
|
|
66
73
|
arrowCoords?: Partial<Coords>;
|
|
67
74
|
/**
|
|
68
75
|
* The chosen placement of the overlay.
|
|
69
76
|
*/
|
|
70
77
|
placement: Placement;
|
|
78
|
+
/**
|
|
79
|
+
* The largest size the overlay can take and stay in view, when it does not fit at its own
|
|
80
|
+
* size. The overlay must then scroll its content.
|
|
81
|
+
*/
|
|
82
|
+
maxSize?: Size;
|
|
71
83
|
}
|
|
72
84
|
/**
|
|
73
85
|
* Computes the position of an overlay relative to an anchor element,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"overlay.d.ts","sourceRoot":"","sources":["../../src/utils/overlay.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,UAAU,CAAA;AAE/C;;GAEG;AACH,MAAM,MAAM,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,QAAQ,CAAA;AAElD;;GAEG;AACH,MAAM,MAAM,IAAI,GAAG,GAAG,GAAG,GAAG,CAAA;AAE5B;;GAEG;AACH,MAAM,MAAM,IAAI,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAA;AAEtD;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,KAAK,CAAA;AAEvC;;;;GAIG;AACH,MAAM,MAAM,SAAS,GAAG,IAAI,GAAG,GAAG,IAAI,IAAI,SAAS,EAAE,CAAA;AAErD;;GAEG;AACH,MAAM,WAAW,MAAM;IACtB,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE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,CACnC,MAAM,EAAE,MAAM,GAAG,SAAS,EAC1B,EAAE,EAAE,OAAO,GAAG,IAAI,GAAG,SAAS,GAC5B,MAAM,CAcR"}
|
package/esm/utils/overlay.js
CHANGED
|
@@ -1,59 +1,74 @@
|
|
|
1
1
|
//#region src/utils/overlay.ts
|
|
2
2
|
var e = 8;
|
|
3
|
-
function t(
|
|
4
|
-
let
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
function t(t, u, p, m) {
|
|
4
|
+
let g = m?.offset ?? 0, _ = m?.crossOffset ?? 0, v = m?.placement ?? "bottom", y = t.getBoundingClientRect(), b = u.getBoundingClientRect(), x = p?.getBoundingClientRect(), S = n(y, b, v, g), C = d(S) === "y" ? "height" : "width", w = l(y, b, S, g), T = b[C] + w - e, E = h(w) && T <= 0, D;
|
|
5
|
+
h(w) ? E || (D = T) : D = b[C];
|
|
6
|
+
let O = i(b, S, D), k = O ? {
|
|
7
|
+
width: Math.min(b.width, O.width),
|
|
8
|
+
height: Math.min(b.height, O.height)
|
|
9
|
+
} : b, A = r(o(a(c(y, k, S), S, g), S, _), k, E ? ["x", "y"] : [f(S)]), j;
|
|
10
|
+
if (m?.arrow) {
|
|
11
|
+
if (!x) throw Error("[Quidgest UI] The arrow element must exist to compute its position");
|
|
12
|
+
E || (j = s(A, y, k, x, S));
|
|
8
13
|
}
|
|
9
14
|
return {
|
|
10
|
-
overlayCoords:
|
|
11
|
-
arrowCoords:
|
|
12
|
-
placement:
|
|
15
|
+
overlayCoords: A,
|
|
16
|
+
arrowCoords: j,
|
|
17
|
+
placement: S,
|
|
18
|
+
maxSize: O
|
|
13
19
|
};
|
|
14
20
|
}
|
|
15
21
|
function n(e, t, n, r) {
|
|
16
|
-
|
|
17
|
-
|
|
22
|
+
let i = l(e, t, n, r);
|
|
23
|
+
if (h(i)) {
|
|
24
|
+
let a = {
|
|
18
25
|
top: "bottom",
|
|
19
26
|
bottom: "top",
|
|
20
27
|
left: "right",
|
|
21
28
|
right: "left"
|
|
22
|
-
}[
|
|
23
|
-
if (
|
|
24
|
-
let
|
|
25
|
-
return
|
|
29
|
+
}[p(n)], o = l(e, t, a, r);
|
|
30
|
+
if (h(o) && o <= i) return n;
|
|
31
|
+
let s = m(n);
|
|
32
|
+
return s ? `${a}-${s}` : a;
|
|
26
33
|
}
|
|
27
34
|
return n;
|
|
28
35
|
}
|
|
29
36
|
function r(t, n, r) {
|
|
30
|
-
let i =
|
|
31
|
-
return
|
|
37
|
+
let i = (e, t, n) => Math.min(Math.max(e, t), n), a = { ...t };
|
|
38
|
+
return r.includes("x") && (a.x = i(t.x, e, window.innerWidth - n.width - e)), r.includes("y") && (a.y = i(t.y, e, window.innerHeight - n.height - e)), a;
|
|
32
39
|
}
|
|
33
|
-
function i(
|
|
34
|
-
let
|
|
40
|
+
function i(t, n, r) {
|
|
41
|
+
let i = {
|
|
42
|
+
width: window.innerWidth - 2 * e,
|
|
43
|
+
height: window.innerHeight - 2 * e
|
|
44
|
+
};
|
|
45
|
+
if (r !== void 0 && (i[d(n) === "y" ? "height" : "width"] = r), !(t.width <= i.width && t.height <= i.height)) return i;
|
|
46
|
+
}
|
|
47
|
+
function a(e, t, n) {
|
|
48
|
+
let r = p(t);
|
|
35
49
|
return {
|
|
36
50
|
x: e.x + (r === "left" ? -n : r === "right" ? n : 0),
|
|
37
51
|
y: e.y + (r === "top" ? -n : r === "bottom" ? n : 0)
|
|
38
52
|
};
|
|
39
53
|
}
|
|
40
|
-
function
|
|
41
|
-
let r =
|
|
54
|
+
function o(e, t, n) {
|
|
55
|
+
let r = p(t);
|
|
42
56
|
return {
|
|
43
57
|
x: e.x + (r === "top" || r === "bottom" ? n : 0),
|
|
44
58
|
y: e.y + (r === "right" || r === "left" ? n : 0)
|
|
45
59
|
};
|
|
46
60
|
}
|
|
47
|
-
function
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
61
|
+
function s(e, t, n, r, i) {
|
|
62
|
+
let a = f(i), o = r.width / 2 / Math.SQRT2;
|
|
63
|
+
if (a === "y") {
|
|
64
|
+
let r = t.top + t.height / 2 - e.y;
|
|
65
|
+
if (r > o && r < n.height - o) return { y: r };
|
|
51
66
|
} else {
|
|
52
|
-
let
|
|
53
|
-
if (
|
|
67
|
+
let r = t.left + t.width / 2 - e.x;
|
|
68
|
+
if (r > o && r < n.width - o) return { x: r };
|
|
54
69
|
}
|
|
55
70
|
}
|
|
56
|
-
function
|
|
71
|
+
function c(e, t, n) {
|
|
57
72
|
let [r, i] = n.split("-"), a = e.x + e.width / 2 - t.width / 2, o = e.y + e.height / 2 - t.height / 2, s;
|
|
58
73
|
switch (r) {
|
|
59
74
|
case "top":
|
|
@@ -80,10 +95,9 @@ function s(e, t, n) {
|
|
|
80
95
|
y: o
|
|
81
96
|
};
|
|
82
97
|
break;
|
|
83
|
-
default: throw Error(`[Quidgest UI] Invalid placement value: ${n}`);
|
|
84
98
|
}
|
|
85
99
|
if (!i) return s;
|
|
86
|
-
let c =
|
|
100
|
+
let c = f(n) === "y" ? "height" : "width", l = f(n), u = e[c] / 2 - t[c] / 2;
|
|
87
101
|
switch (i) {
|
|
88
102
|
case "start":
|
|
89
103
|
s[l] -= u;
|
|
@@ -91,12 +105,12 @@ function s(e, t, n) {
|
|
|
91
105
|
case "end":
|
|
92
106
|
s[l] += u;
|
|
93
107
|
break;
|
|
94
|
-
default: throw Error(`[Quidgest UI] Invalid alignment value: ${i}`);
|
|
108
|
+
default: throw Error(`[Quidgest UI] Invalid alignment value: ${String(i)}`);
|
|
95
109
|
}
|
|
96
110
|
return s;
|
|
97
111
|
}
|
|
98
|
-
function
|
|
99
|
-
let i =
|
|
112
|
+
function l(e, t, n, r) {
|
|
113
|
+
let i = p(n), a = 0;
|
|
100
114
|
switch (i) {
|
|
101
115
|
case "top":
|
|
102
116
|
a = e.top - (t.height + r);
|
|
@@ -110,32 +124,32 @@ function c(e, t, n, r) {
|
|
|
110
124
|
case "right":
|
|
111
125
|
a = window.innerWidth - e.right - (t.width + r);
|
|
112
126
|
break;
|
|
113
|
-
default: throw Error(`[Quidgest UI] Invalid side value: ${i}`);
|
|
127
|
+
default: throw Error(`[Quidgest UI] Invalid side value: ${String(i)}`);
|
|
114
128
|
}
|
|
115
129
|
return a;
|
|
116
130
|
}
|
|
117
|
-
function l(e) {
|
|
118
|
-
return e === "x" ? "y" : "x";
|
|
119
|
-
}
|
|
120
131
|
function u(e) {
|
|
121
|
-
|
|
122
|
-
return ["left", "right"].includes(t) ? "x" : "y";
|
|
132
|
+
return e === "x" ? "y" : "x";
|
|
123
133
|
}
|
|
124
134
|
function d(e) {
|
|
125
|
-
|
|
135
|
+
let t = p(e);
|
|
136
|
+
return ["left", "right"].includes(t) ? "x" : "y";
|
|
126
137
|
}
|
|
127
138
|
function f(e) {
|
|
139
|
+
return u(d(e));
|
|
140
|
+
}
|
|
141
|
+
function p(e) {
|
|
128
142
|
let [t] = e.split("-");
|
|
129
143
|
return t;
|
|
130
144
|
}
|
|
131
|
-
function
|
|
145
|
+
function m(e) {
|
|
132
146
|
let [, t] = e.split("-");
|
|
133
147
|
return t;
|
|
134
148
|
}
|
|
135
|
-
function
|
|
149
|
+
function h(e) {
|
|
136
150
|
return e < 0;
|
|
137
151
|
}
|
|
138
|
-
function
|
|
152
|
+
function g(e, t) {
|
|
139
153
|
if (e !== void 0) return e;
|
|
140
154
|
if (t) {
|
|
141
155
|
let e = getComputedStyle(t).getPropertyValue("--q-overlay-arrow-gap").trim(), n = Number.parseFloat(e);
|
|
@@ -144,4 +158,4 @@ function h(e, t) {
|
|
|
144
158
|
return 8;
|
|
145
159
|
}
|
|
146
160
|
//#endregion
|
|
147
|
-
export { t as computePosition,
|
|
161
|
+
export { t as computePosition, f as getAlignmentAxis, m as getAlignmentFromPlacement, d as getMainAxis, u as getOppositeAxis, p as getSideFromPlacement, h as isOutOfBounds, g as resolveOverlayOffset };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"safeTriangle.d.ts","sourceRoot":"","s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AAI,EAClB,WAAW,CAAC,EAAE,WAAW,GAAG,IAAI,GAC9B,OAAO,CAYT"}
|
|
@@ -49,7 +49,7 @@ function i(e, t, n, r) {
|
|
|
49
49
|
if (i === "right") {
|
|
50
50
|
if (n >= t.left) return null;
|
|
51
51
|
let e = n, i = t.top, a = t.left - n, o = t.height;
|
|
52
|
-
return
|
|
52
|
+
return o <= 0 ? null : {
|
|
53
53
|
left: e,
|
|
54
54
|
top: i,
|
|
55
55
|
width: a,
|
|
@@ -60,7 +60,7 @@ function i(e, t, n, r) {
|
|
|
60
60
|
if (i === "left") {
|
|
61
61
|
if (n <= t.right) return null;
|
|
62
62
|
let e = t.right, i = t.top, a = n - t.right, o = t.height;
|
|
63
|
-
return
|
|
63
|
+
return o <= 0 ? null : {
|
|
64
64
|
left: e,
|
|
65
65
|
top: i,
|
|
66
66
|
width: a,
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { VNode } from 'vue';
|
|
2
2
|
/**
|
|
3
|
-
* Checks if a given property is defined in the `vnode` props.
|
|
3
|
+
* Checks if a given property is defined in the `vnode` props. The vnode keeps each key as
|
|
4
|
+
* the caller wrote it: a template usually writes `icon-right`, while render functions, JSX,
|
|
5
|
+
* `v-bind` objects and camel-case template props pass `iconRight`. Both count.
|
|
4
6
|
*
|
|
5
7
|
* @param vnode The Vue component's VNode instance.
|
|
6
8
|
* @param prop The property name to check.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setupPropsProxy.d.ts","sourceRoot":"","sources":["../../src/utils/setupPropsProxy.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAgB,KAAK,EAAE,MAAM,KAAK,CAAA;AAO9C
|
|
1
|
+
{"version":3,"file":"setupPropsProxy.d.ts","sourceRoot":"","sources":["../../src/utils/setupPropsProxy.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAgB,KAAK,EAAE,MAAM,KAAK,CAAA;AAO9C;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,WAKvD;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,GAAG,CAAC,CAkClD"}
|
|
@@ -4,8 +4,8 @@ import { toKebabCase as n } from "./string.js";
|
|
|
4
4
|
import { getCurrentInstance as r } from "vue";
|
|
5
5
|
//#region src/utils/setupPropsProxy.ts
|
|
6
6
|
function i(e, t) {
|
|
7
|
-
let r =
|
|
8
|
-
return r ?
|
|
7
|
+
let r = e.props;
|
|
8
|
+
return !r || !t ? !1 : r[t] !== void 0 || r[n(t)] !== void 0;
|
|
9
9
|
}
|
|
10
10
|
function a(n) {
|
|
11
11
|
let a = n, o = a.setup;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { QLive } from '../types/component';
|
|
2
|
+
export declare const SEVERITIES: readonly ["info", "success", "warning", "danger"];
|
|
3
|
+
/** A theme color that carries a severity. */
|
|
4
|
+
export type QSeverity = (typeof SEVERITIES)[number];
|
|
5
|
+
export declare const SEVERITY_ICONS: {
|
|
6
|
+
info: {
|
|
7
|
+
icon: string;
|
|
8
|
+
};
|
|
9
|
+
success: {
|
|
10
|
+
icon: string;
|
|
11
|
+
};
|
|
12
|
+
warning: {
|
|
13
|
+
icon: string;
|
|
14
|
+
};
|
|
15
|
+
danger: {
|
|
16
|
+
icon: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export declare const SEVERITY_TEXTS: {
|
|
20
|
+
info: string;
|
|
21
|
+
success: string;
|
|
22
|
+
warning: string;
|
|
23
|
+
danger: string;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Checks whether a color is one of the severity theme colors.
|
|
27
|
+
*
|
|
28
|
+
* @param color - The color value to check.
|
|
29
|
+
* @returns True for `info`, `success`, `warning` and `danger`.
|
|
30
|
+
*/
|
|
31
|
+
export declare function isSeverity(color: string): color is QSeverity;
|
|
32
|
+
/**
|
|
33
|
+
* The default politeness of a message in the given color. Warnings and errors interrupt
|
|
34
|
+
* the user. Every other color waits until they are idle.
|
|
35
|
+
*
|
|
36
|
+
* @param color - The color of the alert or toast.
|
|
37
|
+
* @returns `assertive` for `warning` and `danger`, otherwise `polite`.
|
|
38
|
+
*/
|
|
39
|
+
export declare function getDefaultLive(color: string): Exclude<QLive, 'off'>;
|
|
40
|
+
//# sourceMappingURL=severity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"severity.d.ts","sourceRoot":"","sources":["../../src/utils/severity.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAA;AAI/C,eAAO,MAAM,UAAU,mDAAoD,CAAA;AAE3E,6CAA6C;AAC7C,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAAA;AAGnD,eAAO,MAAM,cAAc;;;;;;;;;;;;;CAac,CAAA;AAIzC,eAAO,MAAM,cAAc;;;;;CAKU,CAAA;AAErC;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,SAAS,CAE5D;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAEnE"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
//#region src/utils/severity.ts
|
|
2
|
+
var e = [
|
|
3
|
+
"info",
|
|
4
|
+
"success",
|
|
5
|
+
"warning",
|
|
6
|
+
"danger"
|
|
7
|
+
], t = {
|
|
8
|
+
info: { icon: "information-outline" },
|
|
9
|
+
success: { icon: "check-circle-outline" },
|
|
10
|
+
warning: { icon: "alert-outline" },
|
|
11
|
+
danger: { icon: "alert-circle-outline" }
|
|
12
|
+
}, n = {
|
|
13
|
+
info: "Information:",
|
|
14
|
+
success: "Success:",
|
|
15
|
+
warning: "Warning:",
|
|
16
|
+
danger: "Error:"
|
|
17
|
+
};
|
|
18
|
+
function r(t) {
|
|
19
|
+
return e.includes(t);
|
|
20
|
+
}
|
|
21
|
+
function i(e) {
|
|
22
|
+
return e === "warning" || e === "danger" ? "assertive" : "polite";
|
|
23
|
+
}
|
|
24
|
+
//#endregion
|
|
25
|
+
export { e as SEVERITIES, t as SEVERITY_ICONS, n as SEVERITY_TEXTS, i as getDefaultLive, r as isSeverity };
|