sit-onyx 1.0.0-beta.99 → 1.0.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 +1 -5
- package/dist/components/OnyxAccordion/OnyxAccordion.d.vue.ts +26 -0
- package/dist/components/OnyxAccordion/types.d.ts +45 -0
- package/dist/components/OnyxAccordionItem/OnyxAccordionItem.d.vue.ts +37 -0
- package/dist/components/OnyxAccordionItem/types.d.ts +17 -0
- package/dist/components/OnyxAlertModal/OnyxAlertModal.d.vue.ts +69 -0
- package/dist/components/OnyxAlertModal/types.d.ts +8 -0
- package/dist/components/OnyxAppLayout/OnyxAppLayout.d.vue.ts +50 -0
- package/dist/components/OnyxAppLayout/types.d.ts +3 -1
- package/dist/components/OnyxAvatar/OnyxAvatar.d.vue.ts +5 -0
- package/dist/components/OnyxAvatar/types.d.ts +16 -4
- package/dist/components/OnyxAvatarStack/{OnyxAvatarStack.vue.d.ts → OnyxAvatarStack.d.vue.ts} +1 -1
- package/dist/components/OnyxBadge/{OnyxBadge.vue.d.ts → OnyxBadge.d.vue.ts} +4 -4
- package/dist/components/OnyxBadge/types.d.ts +2 -2
- package/dist/components/{OnyxDialog/OnyxDialog.vue.d.ts → OnyxBasicDialog/OnyxBasicDialog.d.vue.ts} +12 -7
- package/dist/components/OnyxBasicDialog/types.d.ts +35 -0
- package/dist/components/OnyxBasicPopover/OnyxBasicPopover.d.vue.ts +64 -0
- package/dist/components/OnyxBasicPopover/types.d.ts +37 -0
- package/dist/components/OnyxBottomBar/OnyxBottomBar.d.vue.ts +36 -0
- package/dist/components/OnyxBottomBar/types.d.ts +7 -0
- package/dist/components/OnyxBreadcrumb/OnyxBreadcrumb.d.vue.ts +32 -0
- package/dist/components/OnyxBreadcrumb/types.d.ts +32 -0
- package/dist/components/OnyxBreadcrumbItem/OnyxBreadcrumbItem.d.vue.ts +33 -0
- package/dist/components/OnyxBreadcrumbItem/types.d.ts +15 -0
- package/dist/components/OnyxButton/ButtonOrLinkLayout.d.vue.ts +33 -0
- package/dist/components/OnyxButton/OnyxButton.d.vue.ts +26 -0
- package/dist/components/OnyxButton/types.d.ts +14 -4
- package/dist/components/{OnyxHeadline/OnyxHeadline.vue.d.ts → OnyxCard/OnyxCard.d.vue.ts} +6 -4
- package/dist/components/OnyxCard/types.d.ts +9 -0
- package/dist/components/OnyxCheckbox/{OnyxCheckbox.vue.d.ts → OnyxCheckbox.d.vue.ts} +7 -7
- package/dist/components/OnyxCheckbox/types.d.ts +3 -5
- package/dist/components/OnyxCheckboxGroup/{OnyxCheckboxGroup.vue.d.ts → OnyxCheckboxGroup.d.vue.ts} +7 -7
- package/dist/components/OnyxCheckboxGroup/types.d.ts +9 -20
- package/dist/components/OnyxDataGrid/OnyxDataGrid.d.vue.ts +16 -0
- package/dist/components/OnyxDataGrid/OnyxDataGridRenderer/{OnyxDataGridRenderer.vue.d.ts → OnyxDataGridRenderer.d.vue.ts} +6 -8
- package/dist/components/OnyxDataGrid/OnyxDataGridRenderer/types.d.ts +34 -14
- package/dist/components/OnyxDataGrid/features/{HeaderCell.vue.d.ts → HeaderCell.d.vue.ts} +1 -1
- package/dist/components/OnyxDataGrid/features/all.d.ts +15 -2
- package/dist/components/OnyxDataGrid/features/base/base.d.ts +52 -0
- package/dist/components/OnyxDataGrid/features/base/types.d.ts +8 -0
- package/dist/components/OnyxDataGrid/features/filtering/filtering.d.ts +31 -0
- package/dist/components/OnyxDataGrid/features/filtering/types.d.ts +66 -0
- package/dist/components/OnyxDataGrid/features/hideColumns/hideColumns.d.ts +43 -0
- package/dist/components/OnyxDataGrid/features/hideColumns/types.d.ts +13 -0
- package/dist/components/OnyxDataGrid/features/index.d.ts +225 -15
- package/dist/components/OnyxDataGrid/features/pagination/pagination.d.ts +28 -0
- package/dist/components/OnyxDataGrid/features/pagination/types.d.ts +51 -0
- package/dist/components/OnyxDataGrid/features/renderer.d.ts +71 -0
- package/dist/components/OnyxDataGrid/features/resizing/resizing.d.ts +51 -0
- package/dist/components/OnyxDataGrid/features/resizing/types.d.ts +7 -0
- package/dist/components/OnyxDataGrid/features/selection/selection.d.ts +17 -0
- package/dist/components/OnyxDataGrid/features/selection/types.d.ts +39 -0
- package/dist/components/OnyxDataGrid/features/sorting/{SortAction.vue.d.ts → SortAction.d.vue.ts} +2 -2
- package/dist/components/OnyxDataGrid/features/sorting/defaults.d.ts +9 -0
- package/dist/components/OnyxDataGrid/features/sorting/sorting.d.ts +34 -4
- package/dist/components/OnyxDataGrid/features/sorting/types.d.ts +13 -18
- package/dist/components/OnyxDataGrid/features/stickyColumns/stickyColumns.d.ts +13 -0
- package/dist/components/OnyxDataGrid/features/stickyColumns/types.d.ts +14 -0
- package/dist/components/OnyxDataGrid/types.d.ts +79 -5
- package/dist/components/OnyxDataGrid/types.spec-d.d.ts +1 -0
- package/dist/components/OnyxDatePicker/OnyxDatePicker.d.vue.ts +20 -0
- package/dist/components/OnyxDatePicker/types.d.ts +3 -2
- package/dist/components/OnyxDialog/OnyxDialog.d.vue.ts +68 -0
- package/dist/components/OnyxDialog/types.d.ts +4 -24
- package/dist/components/OnyxEmpty/{OnyxEmpty.vue.d.ts → OnyxEmpty.d.vue.ts} +10 -2
- package/dist/components/OnyxErrorTooltip/{OnyxErrorTooltip.vue.d.ts → OnyxErrorTooltip.d.vue.ts} +7 -3
- package/dist/components/OnyxExternalLinkIcon/OnyxExternalLinkIcon.d.vue.ts +5 -0
- package/dist/components/OnyxExternalLinkIcon/types.d.ts +2 -5
- package/dist/components/OnyxFAB/OnyxFAB.d.vue.ts +34 -0
- package/dist/components/OnyxFAB/types.d.ts +13 -0
- package/dist/components/OnyxFABButton/OnyxFABButton.d.vue.ts +5 -0
- package/dist/components/OnyxFABButton/types.d.ts +22 -0
- package/dist/components/OnyxFABItem/OnyxFABItem.d.vue.ts +3 -0
- package/dist/components/OnyxFABItem/types.d.ts +17 -0
- package/dist/components/OnyxFileCard/OnyxFileCard.d.vue.ts +34 -0
- package/dist/components/OnyxFileCard/types.d.ts +49 -0
- package/dist/components/OnyxFileTypeIcon/OnyxFileTypeIcon.d.vue.ts +3 -0
- package/dist/components/OnyxFileTypeIcon/types.d.ts +13 -0
- package/dist/components/OnyxFileUpload/OnyxFileUpload.d.vue.ts +40 -0
- package/dist/components/OnyxFileUpload/types.d.ts +91 -0
- package/dist/components/OnyxFilterTag/OnyxFilterTag.d.vue.ts +10 -0
- package/dist/components/OnyxFilterTag/types.d.ts +8 -0
- package/dist/components/OnyxForm/OnyxForm.core.d.ts +46 -17
- package/dist/components/OnyxForm/{OnyxForm.vue.d.ts → OnyxForm.d.vue.ts} +4 -4
- package/dist/components/OnyxForm/types.d.ts +3 -3
- package/dist/components/OnyxFormElement/FormMessage.d.vue.ts +13 -0
- package/dist/components/OnyxFormElement/OnyxFormElement.ct-utils.d.ts +2 -2
- package/dist/components/OnyxFormElement/OnyxFormElement.d.vue.ts +27 -0
- package/dist/components/OnyxFormElement/types.d.ts +22 -19
- package/dist/components/OnyxGlobalFAB/OnyxGlobalFAB.d.vue.ts +2 -0
- package/dist/components/OnyxGlobalFAB/useGlobalFAB.d.ts +56 -0
- package/dist/components/OnyxHeadline/OnyxHeadline.d.vue.ts +28 -0
- package/dist/components/OnyxHeadline/types.d.ts +18 -2
- package/dist/components/OnyxIcon/OnyxIcon.d.vue.ts +3 -0
- package/dist/components/OnyxIcon/types.d.ts +5 -1
- package/dist/components/OnyxIconButton/OnyxIconButton.d.vue.ts +27 -0
- package/dist/components/OnyxIconButton/types.d.ts +6 -6
- package/dist/components/OnyxImage/OnyxImage.d.vue.ts +6 -0
- package/dist/components/OnyxImage/types.d.ts +43 -0
- package/dist/components/OnyxInfoCard/OnyxInfoCard.d.vue.ts +42 -0
- package/dist/components/OnyxInfoCard/types.d.ts +21 -0
- package/dist/components/OnyxInfoTooltip/OnyxInfoTooltip.d.vue.ts +12 -0
- package/dist/components/OnyxInfoTooltip/types.d.ts +2 -2
- package/dist/components/OnyxInput/OnyxInput.d.vue.ts +62 -0
- package/dist/components/OnyxInput/types.d.ts +5 -64
- package/dist/components/OnyxLink/{OnyxLink.vue.d.ts → OnyxLink.d.vue.ts} +4 -4
- package/dist/components/OnyxLink/types.d.ts +3 -10
- package/dist/components/OnyxListItem/{OnyxListItem.vue.d.ts → OnyxListItem.d.vue.ts} +4 -4
- package/dist/components/OnyxListItem/types.d.ts +2 -2
- package/dist/components/OnyxLoadingIndicator/OnyxCircleSpinner.d.vue.ts +2 -0
- package/dist/components/OnyxLoadingIndicator/OnyxLoadingDots.d.vue.ts +2 -0
- package/dist/components/OnyxLoadingIndicator/OnyxLoadingIndicator.d.vue.ts +5 -0
- package/dist/components/OnyxMiniSearch/OnyxMiniSearch.d.vue.ts +16 -0
- package/dist/components/OnyxMiniSearch/types.d.ts +5 -3
- package/dist/components/OnyxMobileNavButton/{OnyxMobileNavButton.vue.d.ts → OnyxMobileNavButton.d.vue.ts} +4 -4
- package/dist/components/OnyxMobileNavButton/types.d.ts +4 -0
- package/dist/components/{OnyxModalDialog/OnyxModalDialog.vue.d.ts → OnyxModal/OnyxModal.d.vue.ts} +17 -8
- package/dist/components/OnyxModal/types.d.ts +2 -0
- package/dist/components/OnyxMoreList/{OnyxMoreList.vue.d.ts → OnyxMoreList.d.vue.ts} +11 -6
- package/dist/components/OnyxMoreList/types.d.ts +12 -3
- package/dist/components/OnyxNavAppArea/{OnyxNavAppArea.vue.d.ts → OnyxNavAppArea.d.vue.ts} +5 -3
- package/dist/components/OnyxNavAppArea/types.d.ts +2 -1
- package/dist/components/OnyxNavBar/OnyxNavBar.d.vue.ts +44 -0
- package/dist/components/OnyxNavBar/modules/OnyxColorSchemeDialog/OnyxColorSchemeDialog.d.vue.ts +12 -0
- package/dist/components/OnyxNavBar/modules/OnyxColorSchemeDialog/types.d.ts +3 -3
- package/dist/components/OnyxNavBar/modules/OnyxColorSchemeMenuItem/OnyxColorSchemeMenuItem.d.vue.ts +8 -0
- package/dist/components/OnyxNavBar/modules/OnyxColorSchemeMenuItem/types.d.ts +1 -1
- package/dist/components/OnyxNavBar/modules/OnyxFlyoutMenu/{OnyxFlyoutMenu.vue.d.ts → OnyxFlyoutMenu.d.vue.ts} +9 -12
- package/dist/components/OnyxNavBar/modules/OnyxFlyoutMenu/types.d.ts +11 -7
- package/dist/components/OnyxNavBar/modules/OnyxLanguageMenuItem/OnyxLanguageMenuItem.d.vue.ts +16 -0
- package/dist/components/OnyxNavBar/modules/OnyxLanguageMenuItem/types.d.ts +11 -0
- package/dist/components/OnyxNavBar/modules/OnyxMenuItem/OnyxMenuItem.d.vue.ts +427 -0
- package/dist/components/OnyxNavBar/modules/OnyxMenuItem/types.d.ts +13 -9
- package/dist/components/OnyxNavBar/modules/OnyxNavItem/OnyxNavItem.d.vue.ts +185 -0
- package/dist/components/OnyxNavBar/modules/OnyxNavItem/types.d.ts +19 -2
- package/dist/components/OnyxNavBar/modules/OnyxNavItemFacade/OnyxNavItemFacade.d.vue.ts +41 -0
- package/dist/components/OnyxNavBar/modules/OnyxTimer/OnyxTimer.d.vue.ts +12 -0
- package/dist/components/OnyxNavBar/modules/OnyxUserMenu/{OnyxUserMenu.vue.d.ts → OnyxUserMenu.d.vue.ts} +7 -7
- package/dist/components/OnyxNavBar/modules/OnyxUserMenu/{UserMenuLayout.vue.d.ts → UserMenuLayout.d.vue.ts} +13 -13
- package/dist/components/OnyxNavBar/modules/OnyxUserMenu/types.d.ts +13 -7
- package/dist/components/OnyxNavBar/modules/index.d.ts +17 -17
- package/dist/components/OnyxNavBar/types.d.ts +53 -12
- package/dist/components/OnyxNotificationCard/OnyxNotificationCard.d.vue.ts +48 -0
- package/dist/components/OnyxNotificationCard/types.d.ts +25 -0
- package/dist/components/OnyxNotificationDot/OnyxNotificationDot.d.vue.ts +29 -0
- package/dist/components/OnyxNotificationDot/types.d.ts +11 -0
- package/dist/components/OnyxNotificationMessage/OnyxNotificationMessage.d.vue.ts +40 -0
- package/dist/components/OnyxNotificationMessage/types.d.ts +17 -0
- package/dist/components/OnyxNotifications/OnyxNotifications.d.vue.ts +2 -0
- package/dist/components/OnyxNotifications/useNotification.d.ts +60 -0
- package/dist/components/OnyxPageLayout/OnyxPageLayout.d.vue.ts +66 -0
- package/dist/components/OnyxPageLayout/types.d.ts +11 -8
- package/dist/components/OnyxPagination/OnyxPagination.d.vue.ts +10 -0
- package/dist/components/OnyxPagination/OnyxSelectPagination.d.vue.ts +9 -0
- package/dist/components/OnyxPagination/types.d.ts +6 -1
- package/dist/components/OnyxProgressItem/OnyxProgressItem.d.vue.ts +31 -0
- package/dist/components/OnyxProgressItem/types.d.ts +31 -0
- package/dist/components/OnyxProgressSteps/OnyxProgressSteps.d.vue.ts +41 -0
- package/dist/components/OnyxProgressSteps/types.d.ts +30 -0
- package/dist/components/OnyxRadioButton/{OnyxRadioButton.vue.d.ts → OnyxRadioButton.d.vue.ts} +7 -7
- package/dist/components/OnyxRadioButton/types.d.ts +2 -10
- package/dist/components/OnyxRadioGroup/{OnyxRadioGroup.vue.d.ts → OnyxRadioGroup.d.vue.ts} +9 -9
- package/dist/components/OnyxRadioGroup/types.d.ts +6 -19
- package/dist/components/OnyxResizeHandle/OnyxResizeHandle.d.vue.ts +16 -0
- package/dist/components/OnyxResizeHandle/types.d.ts +23 -0
- package/dist/components/OnyxRipple/OnyxRipple.d.vue.ts +6 -0
- package/dist/components/OnyxRouterLink/OnyxRouterLink.d.vue.ts +21 -0
- package/dist/components/OnyxRouterLink/types.d.ts +22 -0
- package/dist/components/OnyxSegmentedControl/OnyxSegmentedControl.d.vue.ts +17 -0
- package/dist/components/OnyxSegmentedControl/types.d.ts +28 -0
- package/dist/components/OnyxSegmentedControlElement/OnyxSegmentedControlElement.d.vue.ts +7 -0
- package/dist/components/OnyxSegmentedControlElement/types.d.ts +5 -0
- package/dist/components/OnyxSelect/{OnyxSelect.vue.d.ts → OnyxSelect.d.vue.ts} +13 -12
- package/dist/components/OnyxSelect/types.d.ts +34 -47
- package/dist/components/OnyxSelectDialog/OnyxSelectDialog.d.vue.ts +28 -0
- package/dist/components/OnyxSelectDialog/types.d.ts +30 -0
- package/dist/components/OnyxSelectInput/{OnyxSelectInput.vue.d.ts → OnyxSelectInput.d.vue.ts} +6 -8
- package/dist/components/OnyxSelectInput/types.d.ts +2 -24
- package/dist/components/OnyxSelectOption/{OnyxSelectOption.vue.d.ts → OnyxSelectOption.d.vue.ts} +5 -5
- package/dist/components/OnyxSelectOption/types.d.ts +2 -2
- package/dist/components/OnyxSeparator/OnyxSeparator.d.vue.ts +5 -0
- package/dist/components/OnyxSeparator/types.d.ts +7 -0
- package/dist/components/OnyxSidebar/OnyxSidebar.d.vue.ts +190 -0
- package/dist/components/OnyxSidebar/modules/OnyxSidebarItem/OnyxSidebarItem.d.vue.ts +28 -0
- package/dist/components/OnyxSidebar/modules/OnyxSidebarItem/types.d.ts +9 -0
- package/dist/components/OnyxSidebar/modules/index.d.ts +2 -0
- package/dist/components/OnyxSidebar/types.d.ts +40 -0
- package/dist/components/OnyxSkeleton/OnyxSkeleton.d.vue.ts +2 -0
- package/dist/components/OnyxStepper/OnyxStepper.d.vue.ts +22 -0
- package/dist/components/OnyxStepper/types.d.ts +26 -32
- package/dist/components/OnyxSwitch/OnyxSwitch.d.vue.ts +22 -0
- package/dist/components/OnyxSwitch/types.d.ts +3 -29
- package/dist/components/OnyxSystemButton/OnyxSystemButton.d.vue.ts +8 -0
- package/dist/components/OnyxSystemButton/types.d.ts +2 -2
- package/dist/components/OnyxTab/{OnyxTab.vue.d.ts → OnyxTab.d.vue.ts} +4 -4
- package/dist/components/OnyxTab/types.d.ts +2 -2
- package/dist/components/OnyxTable/OnyxTable.d.vue.ts +24 -0
- package/dist/components/OnyxTable/types.d.ts +43 -1
- package/dist/components/OnyxTabs/{OnyxTabs.vue.d.ts → OnyxTabs.d.vue.ts} +4 -6
- package/dist/components/OnyxTabs/types.d.ts +6 -6
- package/dist/components/OnyxTag/OnyxTag.d.vue.ts +6 -0
- package/dist/components/OnyxTag/types.d.ts +25 -2
- package/dist/components/OnyxTextarea/OnyxTextarea.d.vue.ts +22 -0
- package/dist/components/OnyxTextarea/types.d.ts +2 -5
- package/dist/components/OnyxToast/OnyxToast.d.vue.ts +2 -0
- package/dist/components/OnyxToast/useToast.d.ts +2 -2
- package/dist/components/OnyxToastMessage/OnyxToastMessage.d.vue.ts +12 -0
- package/dist/components/OnyxToastMessage/types.d.ts +2 -2
- package/dist/components/OnyxTooltip/OnyxTooltip.ct-utils.d.ts +1 -1
- package/dist/components/OnyxTooltip/{OnyxTooltip.vue.d.ts → OnyxTooltip.d.vue.ts} +22 -12
- package/dist/components/OnyxTooltip/types.d.ts +31 -15
- package/dist/components/OnyxVisuallyHidden/{OnyxVisuallyHidden.vue.d.ts → OnyxVisuallyHidden.d.vue.ts} +3 -3
- package/dist/components/examples/ComponentShowcase/ComponentShowcase.d.vue.ts +9 -0
- package/dist/components/illustrations/OnyxErrorSVG/OnyxErrorSVG.d.vue.ts +2 -0
- package/dist/components/illustrations/OnyxFileUploadSVG/OnyxFileUploadSVG.d.vue.ts +3 -0
- package/dist/components/illustrations/OnyxFileUploadSVG/types.d.ts +10 -0
- package/dist/components/illustrations/index.d.ts +3 -0
- package/dist/composables/animation.d.ts +5 -0
- package/dist/composables/checkAll.d.ts +3 -3
- package/dist/composables/density.d.ts +1 -1
- package/dist/composables/required.d.ts +6 -12
- package/dist/composables/scrollEnd.d.ts +2 -2
- package/dist/composables/themeTransition.d.ts +2 -2
- package/dist/composables/useAnchorPositionPolyfill.d.ts +20 -0
- package/dist/composables/useAutoFocus.d.ts +5 -0
- package/dist/composables/useCustomValidity.d.ts +21 -13
- package/dist/composables/useErrorClass.d.ts +2 -2
- package/dist/composables/useFileSize.d.ts +10 -0
- package/dist/composables/useIntersectionObserver.d.ts +25 -0
- package/dist/composables/useLenientMaxLengthValidation.ct-utils.d.ts +3 -0
- package/dist/composables/useLenientMaxLengthValidation.d.ts +93 -0
- package/dist/composables/useLink.d.ts +29 -0
- package/dist/composables/useLink.spec-d.d.ts +1 -0
- package/dist/composables/useMoreList.d.ts +15 -7
- package/dist/composables/useOpenAlignment.d.ts +13 -0
- package/dist/composables/useOpenDirection.d.ts +5 -5
- package/dist/composables/useRelativeTimeFormat.d.ts +23 -0
- package/dist/composables/useResizeObserver.d.ts +6 -2
- package/dist/composables/useRipple.d.ts +5 -5
- package/dist/composables/useSkeletonState.d.ts +1 -1
- package/dist/composables/useTimer.d.ts +3 -3
- package/dist/composables/useVModel.d.ts +34 -0
- package/dist/composables/useVModel.spec-d.d.ts +1 -0
- package/dist/i18n/datetime-formats.d.ts +22 -0
- package/dist/i18n/index.d.ts +24 -12
- package/dist/i18n/locales/de-DE.json +96 -2
- package/dist/i18n/locales/en-US.json +94 -9
- package/{src/i18n/locales/en-US.json → dist/i18n/locales/en-US.json.d.ts} +98 -10
- package/dist/i18n/number-formats.d.ts +6 -0
- package/dist/index.d.ts +176 -106
- package/dist/index.esm-bundler.js +13471 -0
- package/dist/index.esm-bundler.js.map +1 -0
- package/dist/index.js +9574 -4712
- package/dist/style.css +1 -1
- package/dist/types/components.d.ts +7 -9
- package/dist/types/index.d.ts +7 -8
- package/dist/types/utils.d.ts +66 -1
- package/dist/types/utils.spec-d.d.ts +1 -0
- package/dist/utils/attrs.d.ts +35 -4
- package/dist/utils/breakpoints.d.ts +17 -0
- package/dist/utils/console.d.ts +11 -0
- package/dist/utils/dom.d.ts +5 -0
- package/dist/utils/feature.d.ts +15 -0
- package/dist/utils/file.d.ts +10 -0
- package/dist/utils/numbers.d.ts +29 -9
- package/dist/utils/objects.d.ts +18 -0
- package/dist/utils/plugin.d.ts +11 -2
- package/dist/utils/router.d.ts +9 -0
- package/dist/utils/storybook.d.ts +43 -2
- package/dist/utils/strings.d.ts +13 -0
- package/package.json +34 -24
- package/src/styles/breakpoints.scss +14 -10
- package/src/styles/fonts.scss +7 -7
- package/src/styles/global.css +3 -3
- package/src/styles/grid.ct.tsx +186 -73
- package/src/styles/grid.scss +139 -38
- package/src/styles/index.scss +1 -2
- package/src/styles/layers.scss +1 -1
- package/src/styles/mixins/checkbox.scss +18 -4
- package/src/styles/mixins/input.scss +24 -5
- package/src/styles/mixins/layers.scss +6 -0
- package/src/styles/mixins/list.scss +1 -1
- package/src/styles/mixins/sizes.scss +12 -8
- package/src/styles/mixins/visibility.scss +11 -0
- package/src/styles/root.scss +7 -2
- package/src/styles/variables/density-compact.css +2 -2
- package/src/styles/variables/density-cozy.css +2 -2
- package/src/styles/variables/density-default.css +2 -2
- package/src/styles/variables/spacing.css +1 -1
- package/src/styles/variables/themes/onyx.css +387 -0
- package/src/styles/variables/themes/value.css +217 -159
- package/dist/components/OnyxAlertDialog/OnyxAlertDialog.vue.d.ts +0 -60
- package/dist/components/OnyxAlertDialog/types.d.ts +0 -8
- package/dist/components/OnyxAppLayout/OnyxAppLayout.vue.d.ts +0 -36
- package/dist/components/OnyxAvatar/OnyxAvatar.vue.d.ts +0 -28
- package/dist/components/OnyxButton/OnyxButton.vue.d.ts +0 -10
- package/dist/components/OnyxDataGrid/OnyxDataGrid.vue.d.ts +0 -17
- package/dist/components/OnyxDataGrid/features/sorting/TestCase.vue.d.ts +0 -9
- package/dist/components/OnyxDatePicker/OnyxDatePicker.vue.d.ts +0 -17
- package/dist/components/OnyxExternalLinkIcon/OnyxExternalLinkIcon.vue.d.ts +0 -5
- package/dist/components/OnyxFormElement/FormMessage.vue.d.ts +0 -13
- package/dist/components/OnyxFormElement/OnyxFormElement.vue.d.ts +0 -29
- package/dist/components/OnyxIcon/OnyxIcon.vue.d.ts +0 -3
- package/dist/components/OnyxIconButton/OnyxIconButton.vue.d.ts +0 -27
- package/dist/components/OnyxInfoTooltip/OnyxInfoTooltip.vue.d.ts +0 -6
- package/dist/components/OnyxInput/OnyxInput.vue.d.ts +0 -24
- package/dist/components/OnyxLoadingIndicator/OnyxCircleSpinner.vue.d.ts +0 -2
- package/dist/components/OnyxLoadingIndicator/OnyxLoadingDots.vue.d.ts +0 -2
- package/dist/components/OnyxLoadingIndicator/OnyxLoadingIndicator.vue.d.ts +0 -5
- package/dist/components/OnyxMiniSearch/OnyxMiniSearch.vue.d.ts +0 -14
- package/dist/components/OnyxModalDialog/types.d.ts +0 -2
- package/dist/components/OnyxNavBar/OnyxNavBar.vue.d.ts +0 -91
- package/dist/components/OnyxNavBar/modules/OnyxColorSchemeDialog/OnyxColorSchemeDialog.vue.d.ts +0 -11
- package/dist/components/OnyxNavBar/modules/OnyxColorSchemeMenuItem/OnyxColorSchemeMenuItem.vue.d.ts +0 -8
- package/dist/components/OnyxNavBar/modules/OnyxMenuItem/OnyxMenuItem.vue.d.ts +0 -28
- package/dist/components/OnyxNavBar/modules/OnyxNavButton/NavButtonLayout.vue.d.ts +0 -48
- package/dist/components/OnyxNavBar/modules/OnyxNavButton/OnyxNavButton.vue.d.ts +0 -122
- package/dist/components/OnyxNavBar/modules/OnyxNavButton/types.d.ts +0 -19
- package/dist/components/OnyxNavBar/modules/OnyxNavItem/OnyxNavItem.vue.d.ts +0 -31
- package/dist/components/OnyxNavBar/modules/OnyxNavSeparator/OnyxNavSeparator.vue.d.ts +0 -5
- package/dist/components/OnyxNavBar/modules/OnyxNavSeparator/types.d.ts +0 -3
- package/dist/components/OnyxNavBar/modules/OnyxTimer/OnyxTimer.vue.d.ts +0 -7
- package/dist/components/OnyxPageLayout/OnyxPageLayout.vue.d.ts +0 -30
- package/dist/components/OnyxPagination/OnyxPagination.vue.d.ts +0 -9
- package/dist/components/OnyxPagination/OnyxSelectPagination.vue.d.ts +0 -7
- package/dist/components/OnyxRipple/OnyxRipple.vue.d.ts +0 -4
- package/dist/components/OnyxSkeleton/OnyxSkeleton.vue.d.ts +0 -2
- package/dist/components/OnyxStepper/OnyxStepper.vue.d.ts +0 -21
- package/dist/components/OnyxSwitch/OnyxSwitch.vue.d.ts +0 -15
- package/dist/components/OnyxSystemButton/OnyxSystemButton.vue.d.ts +0 -8
- package/dist/components/OnyxSystemButton/examples/WithFlyoutMenu.vue.d.ts +0 -2
- package/dist/components/OnyxSystemButton/examples/WithTooltip.vue.d.ts +0 -2
- package/dist/components/OnyxTable/OnyxTable.vue.d.ts +0 -57
- package/dist/components/OnyxTag/OnyxTag.vue.d.ts +0 -5
- package/dist/components/OnyxTextarea/OnyxTextarea.vue.d.ts +0 -17
- package/dist/components/OnyxToast/OnyxToast.vue.d.ts +0 -2
- package/dist/components/OnyxToast/StorybookExample.vue.d.ts +0 -2
- package/dist/components/OnyxToastMessage/OnyxToastMessage.vue.d.ts +0 -12
- package/dist/components/examples/ComponentShowcase/ComponentShowcase.vue.d.ts +0 -9
- package/dist/components/examples/DataGrid/SortingDataGrid.vue.d.ts +0 -26
- package/dist/components/examples/FormExample/FormExample.vue.d.ts +0 -3
- package/dist/components/examples/GridPlayground/EditGridElementDialog/EditGridElementDialog.vue.d.ts +0 -26
- package/dist/components/examples/GridPlayground/GridBadge/GridBadge.vue.d.ts +0 -17
- package/dist/components/examples/GridPlayground/GridElement/GridElement.vue.d.ts +0 -42
- package/dist/components/examples/GridPlayground/GridOverlay/GridOverlay.vue.d.ts +0 -10
- package/dist/components/examples/GridPlayground/GridPlayground.vue.d.ts +0 -2
- package/dist/composables/asymmetricComputed.d.ts +0 -13
- package/dist/composables/useManagedState.d.ts +0 -31
- package/dist/composables/useWedgePosition.d.ts +0 -13
- package/dist/index.cjs +0 -183
- package/dist/playwright/a11y.d.ts +0 -28
- package/dist/playwright/screenshots.d.ts +0 -33
- package/dist/types/themes.d.ts +0 -2
- package/dist/utils/index.d.ts +0 -4
- package/src/i18n/locales/de-DE.json +0 -135
- package/src/i18n/locales/ko-KR.json +0 -27
- package/src/styles/variables/themes/digits-dark.css +0 -129
- package/src/styles/variables/themes/digits-light.css +0 -129
- package/src/styles/variables/themes/kaufland-dark.css +0 -129
- package/src/styles/variables/themes/kaufland-light.css +0 -129
- package/src/styles/variables/themes/lidl-dark.css +0 -129
- package/src/styles/variables/themes/lidl-light.css +0 -129
- package/src/styles/variables/themes/onyx-dark.css +0 -129
- package/src/styles/variables/themes/onyx-light.css +0 -129
- package/src/styles/variables/themes/schwarz-dark.css +0 -129
- package/src/styles/variables/themes/schwarz-light.css +0 -129
|
@@ -1,27 +1,35 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import { MaybeRefOrGetter } from 'vue';
|
|
2
|
+
import { DateValue, OnyxDatePickerProps } from '../components/OnyxDatePicker/types.js';
|
|
3
|
+
import { InputType } from '../components/OnyxInput/types.js';
|
|
4
|
+
import { default as enUS } from '../i18n/locales/en-US.json';
|
|
5
|
+
import { MaxLength } from './useLenientMaxLengthValidation.js';
|
|
5
6
|
export type CustomMessageType = string | FormMessages;
|
|
6
7
|
export type CustomValidityProp = {
|
|
7
8
|
/**
|
|
8
|
-
* Custom error message to show.
|
|
9
|
+
* Custom error message to show. Takes precedence over intrinsic error messages.
|
|
9
10
|
*/
|
|
10
|
-
|
|
11
|
+
error?: CustomMessageType;
|
|
11
12
|
};
|
|
12
13
|
export type UseCustomValidityOptions = {
|
|
13
14
|
/**
|
|
14
|
-
*
|
|
15
|
+
* Explicitly set custom error. Any non-nullish value will set the input to be invalid.
|
|
16
|
+
* If both, `options.customError` and `options.props.error` are provided, the message from the props will take precedence.
|
|
15
17
|
*/
|
|
16
|
-
|
|
18
|
+
error?: MaybeRefOrGetter<CustomMessageType | undefined>;
|
|
19
|
+
/**
|
|
20
|
+
* Component props as defined with `const props = defineProps()`.
|
|
21
|
+
* These prop values are used for the error messages of the native validation errors.
|
|
22
|
+
*/
|
|
23
|
+
props: {
|
|
24
|
+
error?: CustomMessageType;
|
|
17
25
|
modelValue?: unknown;
|
|
18
26
|
type?: InputType | OnyxDatePickerProps["type"];
|
|
19
|
-
maxlength?:
|
|
27
|
+
maxlength?: MaxLength;
|
|
20
28
|
minlength?: number;
|
|
21
29
|
min?: DateValue;
|
|
22
30
|
max?: DateValue;
|
|
23
|
-
|
|
24
|
-
}
|
|
31
|
+
validStepSize?: number;
|
|
32
|
+
};
|
|
25
33
|
/**
|
|
26
34
|
* Component emit as defined with `const emit = defineEmits()`
|
|
27
35
|
*/
|
|
@@ -60,7 +68,7 @@ export declare const getFormMessages: (customMessage?: CustomMessageType) => For
|
|
|
60
68
|
* Returns a string combining short + long message or just the customMessage if it was provided as single string.
|
|
61
69
|
* Will be used e.g. for customInvalidity and showing a tooltip e.g. in RadioButtons
|
|
62
70
|
*/
|
|
63
|
-
export declare const getFormMessageText: (
|
|
71
|
+
export declare const getFormMessageText: (error?: CustomMessageType) => string | undefined;
|
|
64
72
|
/**
|
|
65
73
|
* Composable for unified handling of custom messages for form components.
|
|
66
74
|
* Will call `setCustomValidity()` accordingly and emit the "validityChange" event
|
|
@@ -90,5 +98,5 @@ export declare const useCustomValidity: (options: UseCustomValidityOptions) => {
|
|
|
90
98
|
/**
|
|
91
99
|
* A custom error or the default translation of the first invalid state if one exists.
|
|
92
100
|
*/
|
|
93
|
-
errorMessages: import(
|
|
101
|
+
errorMessages: import('vue').ComputedRef<FormMessages | undefined>;
|
|
94
102
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
2
|
/**
|
|
3
3
|
* All possible `showError` values.
|
|
4
4
|
*/
|
|
@@ -11,4 +11,4 @@ export declare const ShowErrorModes: readonly [true, false, "touched"];
|
|
|
11
11
|
* See [:user-invalid](https://drafts.csswg.org/selectors/#user-invalid-pseudo).
|
|
12
12
|
*/
|
|
13
13
|
export type ShowErrorMode = (typeof ShowErrorModes)[number];
|
|
14
|
-
export declare const useErrorClass: (showError: Readonly<Ref<ShowErrorMode>>) => import(
|
|
14
|
+
export declare const useErrorClass: (showError: Readonly<Ref<ShowErrorMode>>) => import('vue').ComputedRef<"onyx-form-element--immediate-invalid" | "onyx-form-element--suppress-invalid" | "onyx-form-element--touched-invalid">;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BinaryPrefixedSize } from '../utils/numbers.js';
|
|
2
|
+
/**
|
|
3
|
+
* Small composable for formatting file sizes with i18n.
|
|
4
|
+
*/
|
|
5
|
+
export declare const useFileSize: () => {
|
|
6
|
+
/**
|
|
7
|
+
* Formats the given file size to a human readable string.
|
|
8
|
+
*/
|
|
9
|
+
formatFileSize: import('vue').ComputedRef<(size: number | BinaryPrefixedSize) => string>;
|
|
10
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { VueTemplateRefElement } from './useResizeObserver.js';
|
|
3
|
+
export type UseIntersectionObserverOptions = {
|
|
4
|
+
/**
|
|
5
|
+
* Sets the root element to use for intersection checking.
|
|
6
|
+
*
|
|
7
|
+
* @default null
|
|
8
|
+
*/
|
|
9
|
+
root?: Element | null;
|
|
10
|
+
/**
|
|
11
|
+
* Margin around the root element.
|
|
12
|
+
*
|
|
13
|
+
* @default '0px'
|
|
14
|
+
*/
|
|
15
|
+
rootMargin?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Thresholds at which to trigger the callback.
|
|
18
|
+
*
|
|
19
|
+
* @default [0]
|
|
20
|
+
*/
|
|
21
|
+
thresholds?: number | number[];
|
|
22
|
+
};
|
|
23
|
+
export declare const useIntersectionObserver: (target?: Ref<VueTemplateRefElement>, options?: UseIntersectionObserverOptions) => {
|
|
24
|
+
isIntersecting: Ref<boolean, boolean>;
|
|
25
|
+
};
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { MaybeRefOrGetter } from 'vue';
|
|
2
|
+
import { Nullable } from '../types/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* @see [MDN autocapitalize](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autocapitalize)
|
|
5
|
+
*/
|
|
6
|
+
export declare const AUTOCAPITALIZE: readonly ["none", "sentences", "words", "characters"];
|
|
7
|
+
export type Autocapitalize = (typeof AUTOCAPITALIZE)[number];
|
|
8
|
+
/**
|
|
9
|
+
* Same as TypeScript native "Autofill" type but without "AutoFillSection" because
|
|
10
|
+
* the Vue compiler currently can not handle it (too complex union type).
|
|
11
|
+
*
|
|
12
|
+
* @since TypeScript version 5.2
|
|
13
|
+
*/
|
|
14
|
+
export type Autocomplete = Exclude<AutoFill, AutoFillSection | "">;
|
|
15
|
+
export type MaxLength = number | {
|
|
16
|
+
/**
|
|
17
|
+
* Maximum number of characters that are allowed to be entered.
|
|
18
|
+
*/
|
|
19
|
+
max: number;
|
|
20
|
+
/**
|
|
21
|
+
* Restricts the user from typing more characters than allowed.
|
|
22
|
+
*/
|
|
23
|
+
strict?: boolean;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Shared types for all kind of text inputs, namely: `<input type="text">` and `<textarea>`
|
|
27
|
+
*/
|
|
28
|
+
export type SharedTextInputProps = {
|
|
29
|
+
/**
|
|
30
|
+
* Maximum number of characters that are allowed to be entered.
|
|
31
|
+
* Warning: when the value is (pre)set programmatically,
|
|
32
|
+
* the input invalidity will not be detected by the browser, it will only turn invalid
|
|
33
|
+
* as soon as a user interacts with the input (types something).
|
|
34
|
+
*/
|
|
35
|
+
maxlength?: MaxLength;
|
|
36
|
+
/**
|
|
37
|
+
* If `true`, a character counter will be displayed if `maxLength` is set.
|
|
38
|
+
*/
|
|
39
|
+
withCounter?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Minimum number of characters that have to to be entered.
|
|
42
|
+
* Warning: when the value is (pre)set programmatically,
|
|
43
|
+
* the input invalidity will not be detected by the browser, it will only turn invalid
|
|
44
|
+
* as soon as a user interacts with the input (types something).
|
|
45
|
+
*/
|
|
46
|
+
minlength?: number;
|
|
47
|
+
/**
|
|
48
|
+
* If and how text should be automatically be capitalized when using non-physical keyboards
|
|
49
|
+
* (such as virtual keyboard on mobile devices or voice input).
|
|
50
|
+
*
|
|
51
|
+
* Has no effect when `type` is set to "url", "email" or "password".
|
|
52
|
+
*
|
|
53
|
+
* @see [MDN autocapitalize](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autocapitalize)
|
|
54
|
+
*/
|
|
55
|
+
autocapitalize?: Autocapitalize;
|
|
56
|
+
/**
|
|
57
|
+
* Specify how to provide automated assistance in filling out the input.
|
|
58
|
+
* Some autocomplete values might required specific browser permissions to be allowed by the user.
|
|
59
|
+
* Also browsers might require a `name` property.
|
|
60
|
+
*
|
|
61
|
+
* @see [MDN autocomplete](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete)
|
|
62
|
+
*/
|
|
63
|
+
autocomplete?: Autocomplete;
|
|
64
|
+
/**
|
|
65
|
+
* Current input value.
|
|
66
|
+
*/
|
|
67
|
+
modelValue?: Nullable<string>;
|
|
68
|
+
};
|
|
69
|
+
export type HtmlTextInputElements = HTMLInputElement | HTMLTextAreaElement;
|
|
70
|
+
export type UseTextInputOptions = {
|
|
71
|
+
modelValue: MaybeRefOrGetter<string | undefined | null>;
|
|
72
|
+
props: SharedTextInputProps;
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* This composable returns a computed property `maxLengthError` that checks if the `modelValue` prop is longer than the specified `maxlength`.
|
|
76
|
+
* If so, it returns a custom error message.
|
|
77
|
+
*
|
|
78
|
+
* The native [maxlength attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/maxlength) restricts the user from entering more characters then allowed.
|
|
79
|
+
* This custom validation circumvents that restrictions.
|
|
80
|
+
*/
|
|
81
|
+
export declare const useLenientMaxLengthValidation: (options: UseTextInputOptions) => {
|
|
82
|
+
/**
|
|
83
|
+
* Custom maxlength error, if we are unable to use the native maxlength attribute.
|
|
84
|
+
*/
|
|
85
|
+
maxLengthError: import('vue').ComputedRef<{
|
|
86
|
+
longMessage: string;
|
|
87
|
+
shortMessage: string;
|
|
88
|
+
} | undefined>;
|
|
89
|
+
/**
|
|
90
|
+
* In strict mode, the native maxlength attribute is used.
|
|
91
|
+
*/
|
|
92
|
+
maxLength: import('vue').ComputedRef<number | undefined>;
|
|
93
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { InjectionKey, Ref } from 'vue';
|
|
2
|
+
import { SharedLinkProps } from '../components/OnyxRouterLink/types.js';
|
|
3
|
+
/**
|
|
4
|
+
* Internal behavior of the `OnyxRouterLink`. Should be used for navigation. Considers the user provided [router](https://onyx.schwarz/development/router.html).
|
|
5
|
+
*/
|
|
6
|
+
export declare const useLink: () => {
|
|
7
|
+
navigate: (e: MouseEvent, href: string) => void;
|
|
8
|
+
currentRoute: import('vue').ComputedRef<{
|
|
9
|
+
path: string;
|
|
10
|
+
hash?: string;
|
|
11
|
+
} | undefined>;
|
|
12
|
+
isActive: import('vue').ComputedRef<(link?: string | SharedLinkProps) => boolean>;
|
|
13
|
+
};
|
|
14
|
+
export type ProvideRouterOptions = {
|
|
15
|
+
/**
|
|
16
|
+
* Programmatically navigate to a new URL.
|
|
17
|
+
* @see https://router.vuejs.org/api/interfaces/Router.html#push-
|
|
18
|
+
*/
|
|
19
|
+
push: (to: string) => void;
|
|
20
|
+
/**
|
|
21
|
+
* Currently active route.
|
|
22
|
+
* @see https://router.vuejs.org/api/interfaces/Router.html#currentRoute
|
|
23
|
+
*/
|
|
24
|
+
currentRoute: Ref<string | {
|
|
25
|
+
path: string;
|
|
26
|
+
hash?: string;
|
|
27
|
+
}>;
|
|
28
|
+
};
|
|
29
|
+
export declare const ROUTER_INJECTION_KEY: InjectionKey<ProvideRouterOptions>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { InjectionKey, MaybeRefOrGetter, Ref } from 'vue';
|
|
2
|
+
import { VueTemplateRefElement } from './useResizeObserver.js';
|
|
3
3
|
/**
|
|
4
4
|
* Injection key for providing "more" data to child components of a list to e.g. render a "+3 more" indicator.
|
|
5
5
|
*/
|
|
@@ -17,6 +17,12 @@ export type UseMoreListOptions = {
|
|
|
17
17
|
* Vue template ref for the more indicator element that might be shown if not all elements are visible.
|
|
18
18
|
*/
|
|
19
19
|
moreIndicatorRef: Ref<VueTemplateRefElement>;
|
|
20
|
+
/**
|
|
21
|
+
* From which direction the list items should start to be hidden, when space is limited.
|
|
22
|
+
*
|
|
23
|
+
* @default "rtl"
|
|
24
|
+
*/
|
|
25
|
+
direction: MaybeRefOrGetter<"rtl" | "ltr">;
|
|
20
26
|
};
|
|
21
27
|
/**
|
|
22
28
|
* Composable for managing a list of components where e.g. a "+3" more indicator should be shown if not all components
|
|
@@ -40,7 +46,7 @@ export type UseMoreListOptions = {
|
|
|
40
46
|
* <template>
|
|
41
47
|
* <div ref="parentRef" class="more-list">
|
|
42
48
|
* <div ref="listRef" class="more-list__elements">
|
|
43
|
-
* <
|
|
49
|
+
* <OnyxNavItem v-for="i in 16" ref="componentRefs" :key="i" :label="`Nav button ${i}`" />
|
|
44
50
|
* </div>
|
|
45
51
|
*
|
|
46
52
|
* <div ref="moreIndicatorRef" class="more-list__indicator">
|
|
@@ -73,19 +79,21 @@ export type UseMoreListOptions = {
|
|
|
73
79
|
export declare const useMoreList: (options: UseMoreListOptions) => {
|
|
74
80
|
/**
|
|
75
81
|
* IDs of currently completely visible components in the list.
|
|
82
|
+
* Initially `undefined`, in that case treat all components as visible.
|
|
76
83
|
*/
|
|
77
|
-
visibleElements: Ref<string[], string[]>;
|
|
84
|
+
visibleElements: Ref<string[] | undefined, string[] | undefined>;
|
|
78
85
|
/**
|
|
79
86
|
* IDs of currently fully or partially hidden components in the list.
|
|
87
|
+
* Initially `undefined`, in that case treat all components as visible.
|
|
80
88
|
*/
|
|
81
|
-
hiddenElements: Ref<string[], string[]>;
|
|
89
|
+
hiddenElements: Ref<string[] | undefined, string[] | undefined>;
|
|
82
90
|
/**
|
|
83
91
|
* Map of widths for all components in the list. Key = component ID.
|
|
84
92
|
* Components in the list must inject this map and add a ref for their width to it.
|
|
85
93
|
*
|
|
86
94
|
* @see `useMoreListChild()`
|
|
87
95
|
*/
|
|
88
|
-
componentMap: import(
|
|
96
|
+
componentMap: import('vue').Reactive<Map<string, number>>;
|
|
89
97
|
};
|
|
90
98
|
/**
|
|
91
99
|
* Composable that must be implemented in all list children when using `useMoreList` to correctly observe the visibility of the elements.
|
|
@@ -111,5 +119,5 @@ export declare const useMoreListChild: (injectionKey: MoreListInjectionKey) => {
|
|
|
111
119
|
* Whether the component is currently visible.
|
|
112
120
|
* Should hide itself visually (e.g. using `v-show="isVisible"`).
|
|
113
121
|
*/
|
|
114
|
-
isVisible: import(
|
|
122
|
+
isVisible: import('vue').ComputedRef<boolean>;
|
|
115
123
|
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ShallowRef } from 'vue';
|
|
2
|
+
export type OpenAlignment = "center" | "left" | "right";
|
|
3
|
+
export declare const useOpenAlignment: (element: Readonly<ShallowRef<Element | null>>, tooltipElement: Readonly<ShallowRef<Element | null>>, defaultPosition?: OpenAlignment) => {
|
|
4
|
+
/**
|
|
5
|
+
* Direction in which the popover should open to.
|
|
6
|
+
*/
|
|
7
|
+
openAlignment: import('vue').Ref<OpenAlignment, OpenAlignment>;
|
|
8
|
+
/**
|
|
9
|
+
* Detects in which direction a popover should be opened, depending on the available space in each direction.
|
|
10
|
+
* Should only be called onBeforeMount or later to support server side rendering.
|
|
11
|
+
*/
|
|
12
|
+
updateOpenAlignment: () => void;
|
|
13
|
+
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ShallowRef } from 'vue';
|
|
2
2
|
export type OpenDirection = "top" | "bottom";
|
|
3
|
-
export declare const useOpenDirection: (element:
|
|
3
|
+
export declare const useOpenDirection: (element: Readonly<ShallowRef<Element | null | undefined>>, defaultDirection?: OpenDirection) => {
|
|
4
4
|
/**
|
|
5
|
-
* Direction in which the
|
|
5
|
+
* Direction in which the popover should open to.
|
|
6
6
|
*/
|
|
7
|
-
openDirection: import(
|
|
7
|
+
openDirection: import('vue').Ref<OpenDirection, OpenDirection>;
|
|
8
8
|
/**
|
|
9
|
-
* Detects in which direction a
|
|
9
|
+
* Detects in which direction a popover should be opened, depending on the available space in each direction.
|
|
10
10
|
* Should only be called onBeforeMount or later to support server side rendering.
|
|
11
11
|
*/
|
|
12
12
|
updateOpenDirection: () => void;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { MaybeRef } from 'vue';
|
|
2
|
+
import { DateValue } from '../components/OnyxDatePicker/types.js';
|
|
3
|
+
export type UseRelativeTimeFormatOptions = {
|
|
4
|
+
/**
|
|
5
|
+
* Time/date to format.
|
|
6
|
+
*/
|
|
7
|
+
time: MaybeRef<DateValue>;
|
|
8
|
+
/**
|
|
9
|
+
* Options to use for the formatter.
|
|
10
|
+
*/
|
|
11
|
+
options?: MaybeRef<Intl.RelativeTimeFormatOptions>;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Reactive wrapper/utilities around the `Intl.RelativeTimeFormat` API.
|
|
15
|
+
*/
|
|
16
|
+
export declare const useRelativeTimeFormat: (options: UseRelativeTimeFormatOptions) => {
|
|
17
|
+
/**
|
|
18
|
+
* Formatted relative time string.
|
|
19
|
+
*
|
|
20
|
+
* @example "42 minutes ago"
|
|
21
|
+
*/
|
|
22
|
+
timeAgo: import('vue').ComputedRef<string>;
|
|
23
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
2
|
export type UseResizeObserverOptions = {
|
|
3
3
|
/**
|
|
4
4
|
* Sets which box model the observer will observe changes to.
|
|
@@ -13,7 +13,11 @@ export type UseResizeObserverOptions = {
|
|
|
13
13
|
export type VueTemplateRefElement = Element | {
|
|
14
14
|
$el: Element;
|
|
15
15
|
} | null | undefined;
|
|
16
|
-
export declare const useResizeObserver: (
|
|
16
|
+
export declare const useResizeObserver: (
|
|
17
|
+
/**
|
|
18
|
+
* Target to observe. If undefined, the documentElement will be observed.
|
|
19
|
+
*/
|
|
20
|
+
target?: Ref<VueTemplateRefElement>, options?: UseResizeObserverOptions) => {
|
|
17
21
|
width: Ref<number, number>;
|
|
18
22
|
height: Ref<number, number>;
|
|
19
23
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ShallowRef } from 'vue';
|
|
2
2
|
export type RippleInstance = {
|
|
3
3
|
id: string;
|
|
4
4
|
left: string;
|
|
5
5
|
top: string;
|
|
6
6
|
animationEnded: boolean;
|
|
7
7
|
};
|
|
8
|
-
export declare const useRipple: (container:
|
|
9
|
-
isPointerDown: Ref<boolean, boolean>;
|
|
10
|
-
ripples: import(
|
|
8
|
+
export declare const useRipple: (container: Readonly<ShallowRef<Pick<HTMLElement, "getBoundingClientRect"> | null>>) => {
|
|
9
|
+
isPointerDown: import('vue').Ref<boolean, boolean>;
|
|
10
|
+
ripples: import('vue').Reactive<Map<string, RippleInstance>>;
|
|
11
11
|
startRipple: (event: MouseEvent) => string | undefined;
|
|
12
12
|
hideRipples: () => void;
|
|
13
13
|
hideRipple: (el: Pick<HTMLElement, "dataset">) => void;
|
|
14
|
-
events: Ref<Record<string, (event: MouseEvent) => void>, Record<string, (event: MouseEvent) => void>>;
|
|
14
|
+
events: import('vue').Ref<Record<string, (event: MouseEvent) => void>, Record<string, (event: MouseEvent) => void>>;
|
|
15
15
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
2
|
/**
|
|
3
3
|
* Composable for managing a single timer.
|
|
4
4
|
*/
|
|
@@ -6,9 +6,9 @@ export declare const useTimer: (endTime: Ref<ConstructorParameters<typeof Date>[
|
|
|
6
6
|
/**
|
|
7
7
|
* Time (in milliseconds) that the timer has left.
|
|
8
8
|
*/
|
|
9
|
-
timeLeft: Ref<number, number
|
|
9
|
+
timeLeft: Readonly<Ref<number, number>>;
|
|
10
10
|
/**
|
|
11
11
|
* Whether the timer is ended.
|
|
12
12
|
*/
|
|
13
|
-
isEnded: import(
|
|
13
|
+
isEnded: import('vue').ComputedRef<boolean>;
|
|
14
14
|
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { Nullable, PrimitiveType } from '../types/index.js';
|
|
3
|
+
export type UseVModelOptions<TProps extends object, TKey extends keyof TProps & string, TValue extends TProps[TKey] = TProps[TKey], TDefaultValue = undefined | (TValue extends Nullable<PrimitiveType> ? TValue : () => TValue), TComputed extends Nullable<TValue> = TDefaultValue extends undefined | null ? TValue : NonNullable<TValue>, TEmit extends (...args: any[]) => void = (evt: `update:${TKey}`, value: TComputed) => void> = {
|
|
4
|
+
key: TKey;
|
|
5
|
+
props: TProps;
|
|
6
|
+
emit: TEmit;
|
|
7
|
+
default?: TDefaultValue;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Composable for managing the v-model behavior of a prop.
|
|
11
|
+
* It's behavior differs from the `defineModel` behavior, in that it will always prefer the bound value over the internal state.
|
|
12
|
+
* This allows for better control over the component's state, e.g. a flyout can be kept open even when it was supposed to close.
|
|
13
|
+
*
|
|
14
|
+
* There is currently no way to differentiate between an explicitly bound `undefined` prop value (e.g. `<Comp :value="undefined" />`) and a implicit `undefined` from not defined prop (e.g. `<Comp />`).
|
|
15
|
+
* Therefore for `null` or `undefined` values, the internal state or default value will always be used.
|
|
16
|
+
*
|
|
17
|
+
* For default values with non-primitive types, it's required to use a factory function that returns the default value to avoid mutating the former value.
|
|
18
|
+
*
|
|
19
|
+
* @example ```typescript
|
|
20
|
+
* const props = defineProps<{
|
|
21
|
+
* modelValue?: string;
|
|
22
|
+
* }>();
|
|
23
|
+
*
|
|
24
|
+
* const emit = defineEmits<{ "update:modelValue": [string] }>();
|
|
25
|
+
*
|
|
26
|
+
* const modelValue = useVModel({
|
|
27
|
+
* props,
|
|
28
|
+
* emit,
|
|
29
|
+
* key: "modelValue",
|
|
30
|
+
* default: "",
|
|
31
|
+
* });
|
|
32
|
+
```
|
|
33
|
+
*/
|
|
34
|
+
export declare const useVModel: <TProps extends object, TKey extends keyof TProps & string, TValue extends TProps[TKey] = TProps[TKey], TDefaultValue = undefined | (TValue extends Nullable<PrimitiveType> ? TValue : () => TValue), TComputed extends Nullable<TValue> = TDefaultValue extends undefined | null ? TValue : NonNullable<TValue>, TEmit extends (...args: any[]) => void = (evt: `update:${TKey}`, value: TComputed) => void>(options: UseVModelOptions<TProps, TKey, TValue, TDefaultValue, TComputed, TEmit>) => Ref<TComputed>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export declare const DATETIME_FORMATS: {
|
|
2
|
+
date: {
|
|
3
|
+
dateStyle: "medium";
|
|
4
|
+
};
|
|
5
|
+
"datetime-local": {
|
|
6
|
+
dateStyle: "medium";
|
|
7
|
+
timeStyle: "short";
|
|
8
|
+
};
|
|
9
|
+
time: {
|
|
10
|
+
timeStyle: "short";
|
|
11
|
+
};
|
|
12
|
+
timestamp: {
|
|
13
|
+
year: "numeric";
|
|
14
|
+
month: "2-digit";
|
|
15
|
+
day: "2-digit";
|
|
16
|
+
hour: "2-digit";
|
|
17
|
+
minute: "2-digit";
|
|
18
|
+
second: "2-digit";
|
|
19
|
+
timeZoneName: "shortOffset";
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
export type DatetimeFormat = keyof typeof DATETIME_FORMATS;
|
package/dist/i18n/index.d.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import { App, InjectionKey, MaybeRef } from 'vue';
|
|
2
|
+
import { DateValue } from '../components/OnyxDatePicker/types.js';
|
|
3
|
+
import { FlattenedKeysOf } from '../types/i18n.js';
|
|
4
|
+
import { DeepPartial } from '../types/utils.js';
|
|
5
|
+
import { DatetimeFormat } from './datetime-formats.js';
|
|
6
|
+
import { default as enUS } from './locales/en-US.json';
|
|
7
|
+
import { NumberFormat } from './number-formats.js';
|
|
5
8
|
/**
|
|
6
9
|
* The type of the imported `enUS` above is a concrete type so the value type of each message
|
|
7
10
|
* is e.g. "{ myKey: 'HelloWorld'}" but it should be "{ myKey: string }".
|
|
@@ -14,6 +17,8 @@ type GetTypeOfTranslations<T> = T extends object ? {
|
|
|
14
17
|
/** Available translations that are used by onyx components. */
|
|
15
18
|
export type OnyxTranslations = GetTypeOfTranslations<typeof enUS>;
|
|
16
19
|
export type OnyxTranslationKey = FlattenedKeysOf<OnyxTranslations>;
|
|
20
|
+
export type OnyxNumberFormatOptions = NumberFormat | Intl.NumberFormatOptions;
|
|
21
|
+
export type OnyxDateFormatOptions = DatetimeFormat | Intl.DateTimeFormatOptions;
|
|
17
22
|
export type ProvideI18nOptions = {
|
|
18
23
|
/**
|
|
19
24
|
* Current locale / language to use.
|
|
@@ -63,28 +68,35 @@ export type TranslationFunction = (key: OnyxTranslationKey,
|
|
|
63
68
|
placeholders?: Record<string, string | number | undefined> & {
|
|
64
69
|
n?: number;
|
|
65
70
|
}) => string;
|
|
66
|
-
export declare const I18N_INJECTION_KEY: InjectionKey<
|
|
71
|
+
export declare const I18N_INJECTION_KEY: InjectionKey<OnyxI18n>;
|
|
72
|
+
export type OnyxI18n = ReturnType<typeof createI18n>;
|
|
67
73
|
/**
|
|
68
74
|
* Creates a new i18n instance.
|
|
69
75
|
*/
|
|
70
|
-
declare const createI18n: (options?: ProvideI18nOptions) => {
|
|
71
|
-
t: Readonly<import(
|
|
72
|
-
locale: Readonly<import(
|
|
76
|
+
export declare const createI18n: (options?: ProvideI18nOptions) => {
|
|
77
|
+
t: Readonly<import('vue').Ref<TranslationFunction, TranslationFunction>>;
|
|
78
|
+
locale: Readonly<import('vue').Ref<string, string>>;
|
|
79
|
+
d: import('vue').ComputedRef<(date: DateValue, format?: OnyxDateFormatOptions) => string>;
|
|
80
|
+
n: import('vue').ComputedRef<(value: number, format?: OnyxNumberFormatOptions) => string>;
|
|
73
81
|
};
|
|
74
82
|
/**
|
|
75
83
|
* Provides a global i18n instance that is used by onyx.
|
|
76
84
|
* Must only be called once in the `App.vue` file of a project that consumes onyx.
|
|
77
85
|
*/
|
|
78
86
|
export declare const provideI18n: (app: App, options?: ProvideI18nOptions) => {
|
|
79
|
-
t: Readonly<import(
|
|
80
|
-
locale: Readonly<import(
|
|
87
|
+
t: Readonly<import('vue').Ref<TranslationFunction, TranslationFunction>>;
|
|
88
|
+
locale: Readonly<import('vue').Ref<string, string>>;
|
|
89
|
+
d: import('vue').ComputedRef<(date: DateValue, format?: OnyxDateFormatOptions) => string>;
|
|
90
|
+
n: import('vue').ComputedRef<(value: number, format?: OnyxNumberFormatOptions) => string>;
|
|
81
91
|
};
|
|
82
92
|
/**
|
|
83
93
|
* Injects the onyx i18n instance.
|
|
84
94
|
* Creates a fallback if provide was never called.
|
|
85
95
|
*/
|
|
86
96
|
export declare const injectI18n: () => {
|
|
87
|
-
t: Readonly<import(
|
|
88
|
-
locale: Readonly<import(
|
|
97
|
+
t: Readonly<import('vue').Ref<TranslationFunction, TranslationFunction>>;
|
|
98
|
+
locale: Readonly<import('vue').Ref<string, string>>;
|
|
99
|
+
d: import('vue').ComputedRef<(date: DateValue, format?: OnyxDateFormatOptions) => string>;
|
|
100
|
+
n: import('vue').ComputedRef<(value: number, format?: OnyxNumberFormatOptions) => string>;
|
|
89
101
|
};
|
|
90
102
|
export {};
|