dxd-style-code 0.1.7 → 0.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dxd-style-code.js +11974 -3725
- package/dist/dxd-style-code.umd.cjs +10 -1
- package/dist/style.css +1 -1
- package/package.json +13 -6
- package/src/components/atoms/DXAvatar/DXAvatar.stories.js +319 -0
- package/src/components/atoms/DXAvatar/DXAvatar.vue +167 -0
- package/src/components/atoms/DXAvatar/index.js +2 -0
- package/src/components/atoms/DXBackdrop/DXBackdrop.stories.js +341 -0
- package/src/components/atoms/DXBackdrop/DXBackdrop.vue +102 -0
- package/src/components/atoms/DXBackdrop/index.js +2 -0
- package/src/components/atoms/DXBadge/DXBadge.stories.js +239 -0
- package/src/components/atoms/DXBadge/DXBadge.vue +45 -0
- package/src/components/atoms/DXBadge/index.js +2 -0
- package/src/components/atoms/DXButton/DXButton.stories.js +178 -0
- package/src/components/atoms/DXButton/DXButton.vue +84 -0
- package/src/components/atoms/DXButton/index.js +2 -0
- package/src/components/atoms/DXCard/DXCard.stories.js +133 -0
- package/src/components/atoms/DXCard/DXCard.vue +46 -0
- package/src/components/atoms/DXCard/index.js +2 -0
- package/src/components/atoms/DXCheckbox/DXCheckbox.stories.js +294 -0
- package/src/components/atoms/DXCheckbox/DXCheckbox.vue +191 -0
- package/src/components/atoms/DXCheckbox/index.js +2 -0
- package/src/components/atoms/DXDivider/DXDivider.stories.js +135 -0
- package/src/components/atoms/DXDivider/DXDivider.vue +74 -0
- package/src/components/atoms/DXDivider/index.js +2 -0
- package/src/components/atoms/DXDropdownItem/DXDropdownItem.vue +116 -0
- package/src/components/atoms/DXDropdownItem/index.js +2 -0
- package/src/components/atoms/DXFormLabel/DXFormLabel.stories.js +194 -0
- package/src/components/atoms/DXFormLabel/DXFormLabel.vue +94 -0
- package/src/components/atoms/DXFormLabel/index.js +2 -0
- package/src/components/atoms/DXIcon/DXIcon.stories.js +156 -0
- package/src/components/atoms/DXIcon/DXIcon.vue +102 -0
- package/src/components/atoms/DXIcon/index.js +3 -0
- package/src/components/atoms/DXIconWrapper/DXIconWrapper.stories.js +237 -0
- package/src/components/atoms/DXIconWrapper/DXIconWrapper.vue +79 -0
- package/src/components/atoms/DXIconWrapper/index.js +2 -0
- package/src/components/atoms/DXInputAddon/DXInputAddon.stories.js +230 -0
- package/src/components/atoms/DXInputAddon/DXInputAddon.vue +64 -0
- package/src/components/atoms/DXInputAddon/index.js +2 -0
- package/src/components/atoms/DXLink/DXLink.stories.js +475 -0
- package/src/components/atoms/DXLink/DXLink.vue +229 -0
- package/src/components/atoms/DXLink/index.js +2 -0
- package/src/components/atoms/DXLoader/DXLoader.stories.js +280 -0
- package/src/components/atoms/DXLoader/DXLoader.vue +78 -0
- package/src/components/atoms/DXLoader/index.js +2 -0
- package/src/components/atoms/DXProgress/DXProgress.stories.js +312 -0
- package/src/components/atoms/DXProgress/DXProgress.vue +85 -0
- package/src/components/atoms/DXProgress/index.js +2 -0
- package/src/components/atoms/DXQuote/DXQuote.stories.js +255 -0
- package/src/components/atoms/DXQuote/DXQuote.vue +97 -0
- package/src/components/atoms/DXQuote/index.js +2 -0
- package/src/components/atoms/DXRadio/DXRadio.stories.js +277 -0
- package/src/components/atoms/DXRadio/DXRadio.vue +144 -0
- package/src/components/atoms/DXRadio/index.js +2 -0
- package/src/components/atoms/DXSkeleton/DXSkeleton.stories.js +50 -0
- package/src/components/atoms/DXSkeleton/DXSkeleton.vue +19 -0
- package/src/components/atoms/DXSkeleton/index.js +2 -0
- package/src/components/atoms/DXSlider/DXSlider.stories.js +522 -0
- package/src/components/atoms/DXSlider/DXSlider.vue +338 -0
- package/src/components/atoms/DXSlider/index.js +2 -0
- package/src/components/atoms/DXTags/DXTags.stories.js +206 -0
- package/src/components/atoms/DXTags/DXTags.vue +111 -0
- package/src/components/atoms/DXTags/index.js +2 -0
- package/src/components/atoms/DXToast/DXToast.stories.js +40 -0
- package/src/components/atoms/DXToast/DXToast.vue +32 -0
- package/src/components/atoms/DXToast/index.js +2 -0
- package/src/components/atoms/DXToggle/DXToggle.stories.js +143 -0
- package/src/components/atoms/DXToggle/DXToggle.vue +142 -0
- package/src/components/atoms/DXToggle/index.js +2 -0
- package/src/components/atoms/DXToggleButton/DXToggleButton.stories.js +513 -0
- package/src/components/atoms/DXToggleButton/DXToggleButton.vue +140 -0
- package/src/components/atoms/DXToggleButton/index.js +2 -0
- package/src/components/atoms/DXTooltip/DXTooltip.stories.js +243 -0
- package/src/components/atoms/DXTooltip/DXTooltip.vue +151 -0
- package/src/components/atoms/DXTooltip/index.js +2 -0
- package/src/components/atoms/index.js +24 -0
- package/src/components/layout/DXBox/DXBox.stories.js +238 -0
- package/src/components/layout/DXBox/DXBox.vue +198 -0
- package/src/components/layout/DXBox/index.js +2 -0
- package/src/components/layout/DXContainer/DXContainer.stories.js +147 -0
- package/src/components/layout/DXContainer/DXContainer.vue +83 -0
- package/src/components/layout/DXContainer/index.js +2 -0
- package/src/components/layout/DXFlex/DXFlex.stories.js +210 -0
- package/src/components/layout/DXFlex/DXFlex.vue +149 -0
- package/src/components/layout/DXFlex/index.js +2 -0
- package/src/components/layout/DXGrid/DXGrid.stories.js +238 -0
- package/src/components/layout/DXGrid/DXGrid.vue +167 -0
- package/src/components/layout/DXGrid/index.js +2 -0
- package/src/components/layout/DXSpacer/DXSpacer.stories.js +187 -0
- package/src/components/layout/DXSpacer/DXSpacer.vue +102 -0
- package/src/components/layout/DXSpacer/index.js +2 -0
- package/src/components/layout/DXStack/DXStack.stories.js +199 -0
- package/src/components/layout/DXStack/DXStack.vue +140 -0
- package/src/components/layout/DXStack/index.js +2 -0
- package/src/components/layout/index.js +8 -0
- package/src/components/molecules/DXActionButtons/DXActionButtons.stories.js +288 -0
- package/src/components/molecules/DXActionButtons/DXActionButtons.vue +106 -0
- package/src/components/molecules/DXActionButtons/index.js +2 -0
- package/src/components/molecules/DXAlert/DXAlert.stories.js +70 -0
- package/src/components/molecules/DXAlert/DXAlert.vue +116 -0
- package/src/components/molecules/DXAlert/index.js +2 -0
- package/src/components/molecules/DXBaseTable/DXBaseTable.stories.js +433 -0
- package/src/components/molecules/DXBaseTable/DXBaseTable.vue +459 -0
- package/src/components/molecules/DXBaseTable/index.js +4 -0
- package/src/components/molecules/DXBreadcrumb/DXBreadcrumb.stories.js +227 -0
- package/src/components/molecules/DXBreadcrumb/DXBreadcrumb.vue +96 -0
- package/src/components/molecules/DXBreadcrumb/index.js +2 -0
- package/src/components/molecules/DXButtonGroup/DXButtonGroup.stories.js +26 -0
- package/src/components/molecules/DXButtonGroup/DXButtonGroup.vue +78 -0
- package/src/components/molecules/DXButtonGroup/index.js +2 -0
- package/src/components/molecules/DXCloseButton/DXCloseButton.stories.js +53 -0
- package/src/components/molecules/DXCloseButton/DXCloseButton.vue +62 -0
- package/src/components/molecules/DXCloseButton/index.js +3 -0
- package/src/components/molecules/DXComboBox/DXComboBox.stories.js +62 -0
- package/src/components/molecules/DXComboBox/DXComboBox.vue +167 -0
- package/src/components/molecules/DXComboBox/index.js +2 -0
- package/src/components/molecules/DXCopyField/DXCopyField.stories.js +231 -0
- package/src/components/molecules/DXCopyField/DXCopyField.vue +75 -0
- package/src/components/molecules/DXCopyField/index.js +2 -0
- package/src/components/molecules/DXDataFilter/DXDataFilter.stories.js +275 -0
- package/src/components/molecules/DXDataFilter/DXDataFilter.vue +385 -0
- package/src/components/molecules/DXDataFilter/index.js +2 -0
- package/src/components/molecules/DXDatePicker/DXDatePicker.stories.js +42 -0
- package/src/components/molecules/DXDatePicker/DXDatePicker.vue +121 -0
- package/src/components/molecules/DXDatePicker/index.js +2 -0
- package/src/components/molecules/DXDropdownDivider/DXDropdownDivider.vue +30 -0
- package/src/components/molecules/DXDropdownDivider/index.js +2 -0
- package/src/components/molecules/DXFileUpload/DXFileUpload.stories.js +53 -0
- package/src/components/molecules/DXFileUpload/DXFileUpload.vue +199 -0
- package/src/components/molecules/DXFileUpload/index.js +2 -0
- package/src/components/molecules/DXFilterGroup/DXFilterGroup.stories.js +43 -0
- package/src/components/molecules/DXFilterGroup/DXFilterGroup.vue +43 -0
- package/src/components/molecules/DXFilterGroup/index.js +2 -0
- package/src/components/molecules/DXFormControl/DXFormControl.stories.js +69 -0
- package/src/components/molecules/DXFormControl/DXFormControl.vue +72 -0
- package/src/components/molecules/DXFormControl/index.js +2 -0
- package/src/components/molecules/DXInput/DXInput.stories.js +291 -0
- package/src/components/molecules/DXInput/DXInput.vue +156 -0
- package/src/components/molecules/DXInput/index.js +3 -0
- package/src/components/molecules/DXInputGroup/DXInputGroup.stories.js +228 -0
- package/src/components/molecules/DXInputGroup/DXInputGroup.vue +64 -0
- package/src/components/molecules/DXInputGroup/index.js +2 -0
- package/src/components/molecules/DXInputMask/DXInputMask.stories.js +53 -0
- package/src/components/molecules/DXInputMask/DXInputMask.vue +89 -0
- package/src/components/molecules/DXInputMask/index.js +2 -0
- package/src/components/molecules/DXMenu/DXMenu.stories.js +379 -0
- package/src/components/molecules/DXMenu/DXMenu.vue +331 -0
- package/src/components/molecules/DXMenu/README.md +479 -0
- package/src/components/molecules/DXMenu/index.js +2 -0
- package/src/components/molecules/DXPagination/DXPagination.stories.js +62 -0
- package/src/components/molecules/DXPagination/DXPagination.vue +123 -0
- package/src/components/molecules/DXPagination/index.js +2 -0
- package/src/components/molecules/DXPasswordInput/DXPasswordInput.stories.js +42 -0
- package/src/components/molecules/DXPasswordInput/DXPasswordInput.vue +74 -0
- package/src/components/molecules/DXPasswordInput/index.js +2 -0
- package/src/components/molecules/DXRadioCard/DXRadioCard.stories.js +60 -0
- package/src/components/molecules/DXRadioCard/DXRadioCard.vue +71 -0
- package/src/components/molecules/DXRadioCard/index.js +2 -0
- package/src/components/molecules/DXRadioGroup/DXRadioGroup.stories.js +297 -0
- package/src/components/molecules/DXRadioGroup/DXRadioGroup.vue +73 -0
- package/src/components/molecules/DXRadioGroup/index.js +2 -0
- package/src/components/molecules/DXRating/DXRating.stories.js +322 -0
- package/src/components/molecules/DXRating/DXRating.vue +402 -0
- package/src/components/molecules/DXRating/index.js +2 -0
- package/src/components/molecules/DXSearchBar/DXSearchBar.stories.js +357 -0
- package/src/components/molecules/DXSearchBar/DXSearchBar.vue +525 -0
- package/src/components/molecules/DXSearchBar/index.js +2 -0
- package/src/components/molecules/DXSearchSelect/DXSearchSelect.stories.js +50 -0
- package/src/components/molecules/DXSearchSelect/DXSearchSelect.vue +207 -0
- package/src/components/molecules/DXSearchSelect/index.js +2 -0
- package/src/components/molecules/DXSegmentedControl/DXSegmentedControl.stories.js +326 -0
- package/src/components/molecules/DXSegmentedControl/DXSegmentedControl.vue +116 -0
- package/src/components/molecules/DXSegmentedControl/index.js +2 -0
- package/src/components/molecules/DXSelect/DXSelect.stories.js +259 -0
- package/src/components/molecules/DXSelect/DXSelect.vue +149 -0
- package/src/components/molecules/DXSelect/index.js +3 -0
- package/src/components/molecules/DXStatCard/DXStatCard.stories.js +335 -0
- package/src/components/molecules/DXStatCard/DXStatCard.vue +309 -0
- package/src/components/molecules/DXStatCard/index.js +2 -0
- package/src/components/molecules/DXTableFiltersPanel/DXTableFiltersPanel.vue +72 -0
- package/src/components/molecules/DXTableFiltersPanel/index.js +7 -0
- package/src/components/molecules/DXTablePagination/DXTablePagination.stories.js +236 -0
- package/src/components/molecules/DXTablePagination/DXTablePagination.vue +93 -0
- package/src/components/molecules/DXTablePagination/index.js +2 -0
- package/src/components/molecules/DXTableToolbar/DXTableToolbar.stories.js +271 -0
- package/src/components/molecules/DXTableToolbar/DXTableToolbar.vue +102 -0
- package/src/components/molecules/DXTableToolbar/index.js +2 -0
- package/src/components/molecules/DXTextarea/DXTextarea.stories.js +239 -0
- package/src/components/molecules/DXTextarea/DXTextarea.vue +158 -0
- package/src/components/molecules/DXTextarea/index.js +3 -0
- package/src/components/molecules/DXTimePicker/DXTimePicker.stories.js +282 -0
- package/src/components/molecules/DXTimePicker/DXTimePicker.vue +640 -0
- package/src/components/molecules/DXTimePicker/index.js +2 -0
- package/src/components/molecules/DXValidationIcon/DXValidationIcon.stories.js +60 -0
- package/src/components/molecules/DXValidationIcon/DXValidationIcon.vue +53 -0
- package/src/components/molecules/DXValidationIcon/index.js +3 -0
- package/src/components/molecules/index.js +34 -0
- package/src/components/organisms/DXAccordion/DXAccordion.stories.js +33 -0
- package/src/components/organisms/DXAccordion/DXAccordion.vue +104 -0
- package/src/components/organisms/DXAccordion/index.js +2 -0
- package/src/components/organisms/DXAppLayout/DXAppLayout.stories.js +689 -0
- package/src/components/organisms/DXAppLayout/DXAppLayout.vue +460 -0
- package/src/components/organisms/DXAppLayout/index.js +2 -0
- package/src/components/organisms/DXAuthenticationForm/DXAuthenticationForm.stories.js +232 -0
- package/src/components/organisms/DXAuthenticationForm/DXAuthenticationForm.vue +458 -0
- package/src/components/organisms/DXAuthenticationForm/index.js +2 -0
- package/src/components/organisms/DXChartContainer/DXChartContainer.stories.js +286 -0
- package/src/components/organisms/DXChartContainer/DXChartContainer.vue +273 -0
- package/src/components/organisms/DXChartContainer/index.js +2 -0
- package/src/components/organisms/DXChatInterface/DXChatInterface.stories.js +164 -0
- package/src/components/organisms/DXChatInterface/DXChatInterface.vue +583 -0
- package/src/components/organisms/DXChatInterface/index.js +2 -0
- package/src/components/organisms/DXCommentSection/DXCommentSection.stories.js +173 -0
- package/src/components/organisms/DXCommentSection/DXCommentSection.vue +487 -0
- package/src/components/organisms/DXCommentSection/index.js +2 -0
- package/src/components/organisms/DXDashboardGrid/DXDashboardGrid.stories.js +331 -0
- package/src/components/organisms/DXDashboardGrid/DXDashboardGrid.vue +309 -0
- package/src/components/organisms/DXDashboardGrid/index.js +2 -0
- package/src/components/organisms/DXDashboardWidget/DXDashboardWidget.stories.js +271 -0
- package/src/components/organisms/DXDashboardWidget/DXDashboardWidget.vue +260 -0
- package/src/components/organisms/DXDashboardWidget/index.js +2 -0
- package/src/components/organisms/DXDataTable/DXDataTable.stories.js +247 -0
- package/src/components/organisms/DXDataTable/DXDataTable.vue +496 -0
- package/src/components/organisms/DXDataTable/index.js +2 -0
- package/src/components/organisms/DXDropdown/DXDropdown.stories.js +795 -0
- package/src/components/organisms/DXDropdown/DXDropdown.vue +238 -0
- package/src/components/organisms/DXDropdown/index.js +2 -0
- package/src/components/organisms/DXEmptyState/DXEmptyState.stories.js +37 -0
- package/src/components/organisms/DXEmptyState/DXEmptyState.vue +41 -0
- package/src/components/organisms/DXEmptyState/index.js +2 -0
- package/src/components/organisms/DXFormWizard/DXFormWizard.stories.js +378 -0
- package/src/components/organisms/DXFormWizard/DXFormWizard.vue +578 -0
- package/src/components/organisms/DXFormWizard/index.js +2 -0
- package/src/components/organisms/DXHeaderBar/DXHeaderBar.stories.js +448 -0
- package/src/components/organisms/DXHeaderBar/DXHeaderBar.vue +190 -0
- package/src/components/organisms/DXHeaderBar/index.js +2 -0
- package/src/components/organisms/DXMediaGallery/DXMediaGallery.stories.js +347 -0
- package/src/components/organisms/DXMediaGallery/DXMediaGallery.vue +422 -0
- package/src/components/organisms/DXMediaGallery/index.js +2 -0
- package/src/components/organisms/DXModal/DXModal.stories.js +138 -0
- package/src/components/organisms/DXModal/DXModal.vue +213 -0
- package/src/components/organisms/DXModal/index.js +2 -0
- package/src/components/organisms/DXNotificationCenter/DXNotificationCenter.stories.js +183 -0
- package/src/components/organisms/DXNotificationCenter/DXNotificationCenter.vue +566 -0
- package/src/components/organisms/DXNotificationCenter/index.js +2 -0
- package/src/components/organisms/DXReportGenerator/DXReportGenerator.stories.js +199 -0
- package/src/components/organisms/DXReportGenerator/DXReportGenerator.vue +344 -0
- package/src/components/organisms/DXReportGenerator/index.js +2 -0
- package/src/components/organisms/DXSettingsPanel/DXSettingsPanel.stories.js +245 -0
- package/src/components/organisms/DXSettingsPanel/DXSettingsPanel.vue +454 -0
- package/src/components/organisms/DXSettingsPanel/index.js +2 -0
- package/src/components/organisms/DXSidebar/DXSidebar.stories.js +316 -0
- package/src/components/organisms/DXSidebar/DXSidebar.vue +212 -0
- package/src/components/organisms/DXSidebar/index.js +2 -0
- package/src/components/organisms/DXSidebarMenu/DATA_STRUCTURE.md +299 -0
- package/src/components/organisms/DXSidebarMenu/DXSidebarMenu.stories.js +729 -0
- package/src/components/organisms/DXSidebarMenu/DXSidebarMenu.vue +257 -0
- package/src/components/organisms/DXSidebarMenu/DXSidebarMenuItem.vue +249 -0
- package/src/components/organisms/DXSidebarMenu/README.md +333 -0
- package/src/components/organisms/DXSidebarMenu/index.js +3 -0
- package/src/components/organisms/DXTable/DXTable.stories.js +550 -0
- package/src/components/organisms/DXTable/DXTable.vue +324 -0
- package/src/components/organisms/DXTable/index.js +2 -0
- package/src/components/organisms/DXTabs/DXTabs.stories.js +407 -0
- package/src/components/organisms/DXTabs/DXTabs.vue +301 -0
- package/src/components/organisms/DXTabs/index.js +2 -0
- package/src/components/organisms/DXUserProfileCard/DXUserProfileCard.stories.js +194 -0
- package/src/components/organisms/DXUserProfileCard/DXUserProfileCard.vue +403 -0
- package/src/components/organisms/DXUserProfileCard/index.js +2 -0
- package/src/components/organisms/DXWizard/DXWizard.stories.js +212 -0
- package/src/components/organisms/DXWizard/DXWizard.vue +615 -0
- package/src/components/organisms/DXWizard/index.js +2 -0
- package/src/components/organisms/index.js +25 -0
- package/src/components/typography/DXBlockquote/DXBlockquote.stories.js +33 -0
- package/src/components/typography/DXBlockquote/DXBlockquote.vue +44 -0
- package/src/components/typography/DXBlockquote/index.js +2 -0
- package/src/components/typography/DXCode/DXCode.stories.js +29 -0
- package/src/components/typography/DXCode/DXCode.vue +46 -0
- package/src/components/typography/DXCode/index.js +2 -0
- package/src/components/typography/DXHeading/DXHeading.stories.js +54 -0
- package/src/components/typography/DXHeading/DXHeading.vue +68 -0
- package/src/components/typography/DXHeading/index.js +2 -0
- package/src/components/typography/DXLabel/DXLabel.stories.js +40 -0
- package/src/components/typography/DXLabel/DXLabel.vue +49 -0
- package/src/components/typography/DXLabel/index.js +2 -0
- package/src/components/typography/DXList/DXList.stories.js +50 -0
- package/src/components/typography/DXList/DXList.vue +55 -0
- package/src/components/typography/DXList/index.js +2 -0
- package/src/components/typography/DXText/DXText.stories.js +47 -0
- package/src/components/typography/DXText/DXText.vue +67 -0
- package/src/components/typography/DXText/index.js +2 -0
- package/src/components/typography/index.js +8 -0
- package/src/components/utilities/DXAnimatePresence/DXAnimatePresence.stories.js +335 -0
- package/src/components/utilities/DXAnimatePresence/DXAnimatePresence.vue +207 -0
- package/src/components/utilities/DXAnimatePresence/index.js +2 -0
- package/src/components/utilities/DXBreakpointProvider/DXBreakpointProvider.stories.js +321 -0
- package/src/components/utilities/DXBreakpointProvider/DXBreakpointProvider.vue +158 -0
- package/src/components/utilities/DXBreakpointProvider/index.js +2 -0
- package/src/components/utilities/DXObserver/DXObserver.stories.js +324 -0
- package/src/components/utilities/DXObserver/DXObserver.vue +182 -0
- package/src/components/utilities/DXObserver/index.js +2 -0
- package/src/components/utilities/DXPortal/DXPortal.stories.js +267 -0
- package/src/components/utilities/DXPortal/DXPortal.vue +69 -0
- package/src/components/utilities/DXPortal/index.js +2 -0
- package/src/components/utilities/DXStaggeredAnimation/DXStaggeredAnimation.stories.js +339 -0
- package/src/components/utilities/DXStaggeredAnimation/DXStaggeredAnimation.vue +155 -0
- package/src/components/utilities/DXStaggeredAnimation/index.js +2 -0
- package/src/components/utilities/DXThemeProvider/DXThemeProvider.stories.js +327 -0
- package/src/components/utilities/DXThemeProvider/DXThemeProvider.vue +227 -0
- package/src/components/utilities/DXThemeProvider/index.js +2 -0
- package/src/components/utilities/DXTransitionGroup/DXTransitionGroup.stories.js +368 -0
- package/src/components/utilities/DXTransitionGroup/DXTransitionGroup.vue +212 -0
- package/src/components/utilities/DXTransitionGroup/index.js +2 -0
- package/src/components/utilities/index.js +9 -0
- package/src/composables/useAnimation.js +264 -0
- package/src/composables/useClassComposition.js +35 -0
- package/src/composables/useDataAttributes.js +83 -0
- package/src/composables/useMenu.js +88 -0
- package/src/composables/useSize.js +135 -0
- package/src/composables/useSpacing.js +37 -0
- package/src/composables/useTableColumns.js +88 -0
- package/src/composables/useTableData.js +82 -0
- package/src/composables/useTableFilter.js +158 -0
- package/src/composables/useTablePagination.js +89 -0
- package/src/composables/useTableSelection.js +77 -0
- package/src/composables/useTableSort.js +75 -0
- package/src/composables/useTabsScroll.js +88 -0
- package/src/composables/useVariant.js +700 -0
- package/src/index.js +86 -0
- package/src/styles/animations.css +171 -0
- package/src/styles/index.css +99 -0
- package/src/styles/tokens.js +123 -0
- package/src/utils/propTypes.js +77 -0
- package/src/utils/toggleButtonPresets.js +115 -0
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
import { ref, onMounted } from 'vue';
|
|
2
|
+
import DXPortal from './DXPortal.vue';
|
|
3
|
+
import DXModal from '../../organisms/DXModal/DXModal.vue';
|
|
4
|
+
import DXTooltip from '../../atoms/DXTooltip/DXTooltip.vue';
|
|
5
|
+
import DXButton from '../../atoms/DXButton/DXButton.vue';
|
|
6
|
+
import DXCard from '../../atoms/DXCard/DXCard.vue';
|
|
7
|
+
|
|
8
|
+
export default {
|
|
9
|
+
title: 'Utilities/DXPortal',
|
|
10
|
+
component: DXPortal,
|
|
11
|
+
tags: ['autodocs'],
|
|
12
|
+
parameters: {
|
|
13
|
+
docs: {
|
|
14
|
+
description: {
|
|
15
|
+
component: `
|
|
16
|
+
# DXPortal
|
|
17
|
+
|
|
18
|
+
Компонент-обертка над Vue Teleport для рендеринга контента вне текущей DOM-иерархии.
|
|
19
|
+
|
|
20
|
+
## Назначение
|
|
21
|
+
|
|
22
|
+
DXPortal позволяет рендерить контент в указанный контейнер (по умолчанию body), что необходимо для:
|
|
23
|
+
- Модальных окон (чтобы они были поверх всего контента)
|
|
24
|
+
- Tooltips и подсказок (чтобы они не обрезались родительскими overflow)
|
|
25
|
+
- Выпадающих меню (чтобы они правильно позиционировались)
|
|
26
|
+
- Уведомлений (чтобы они были поверх всего)
|
|
27
|
+
|
|
28
|
+
## Архитектура
|
|
29
|
+
|
|
30
|
+
### Использует
|
|
31
|
+
- Vue 3 \`Teleport\` - встроенный компонент Vue для порталов
|
|
32
|
+
|
|
33
|
+
### Используется в
|
|
34
|
+
- \`DXModal\` - для рендеринга модальных окон в body
|
|
35
|
+
- \`DXTooltip\` - для рендеринга подсказок в body
|
|
36
|
+
- \`DXDropdown\` - для рендеринга выпадающих меню
|
|
37
|
+
- \`DXToast\` - для рендеринга уведомлений
|
|
38
|
+
|
|
39
|
+
## Внутренняя логика
|
|
40
|
+
|
|
41
|
+
### Определение целевого контейнера
|
|
42
|
+
Компонент автоматически определяет целевой контейнер:
|
|
43
|
+
- \`"body"\` → рендеринг в body
|
|
44
|
+
- \`"#selector"\` → поиск элемента по ID
|
|
45
|
+
- \`".selector"\` → поиск элемента по классу
|
|
46
|
+
- \`HTMLElement\` → использование элемента напрямую
|
|
47
|
+
|
|
48
|
+
Если контейнер не найден, используется body как fallback.
|
|
49
|
+
|
|
50
|
+
### Сохранение контекста Vue
|
|
51
|
+
Teleport сохраняет контекст Vue (provide/inject, slots, события), поэтому все работает как обычно.
|
|
52
|
+
|
|
53
|
+
## Особенности
|
|
54
|
+
|
|
55
|
+
### Автоматическая очистка
|
|
56
|
+
При размонтировании компонента контент автоматически удаляется из целевого контейнера благодаря Vue Teleport.
|
|
57
|
+
|
|
58
|
+
### Несколько порталов
|
|
59
|
+
Можно использовать несколько порталов одновременно, они будут рендериться в указанные контейнеры независимо.
|
|
60
|
+
|
|
61
|
+
### Отключение портала
|
|
62
|
+
С помощью prop \`disabled\` можно временно отключить портал и рендерить контент в текущем месте (полезно для тестирования).
|
|
63
|
+
`,
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
argTypes: {
|
|
68
|
+
to: {
|
|
69
|
+
control: 'text',
|
|
70
|
+
description: 'Целевой контейнер для рендеринга. Может быть "body", селектор (#id, .class) или HTMLElement.',
|
|
71
|
+
table: {
|
|
72
|
+
type: { summary: 'string | HTMLElement' },
|
|
73
|
+
defaultValue: { summary: 'body' },
|
|
74
|
+
category: 'Behavior',
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
disabled: {
|
|
78
|
+
control: 'boolean',
|
|
79
|
+
description: 'Отключить портал (рендерить в текущем месте).',
|
|
80
|
+
table: {
|
|
81
|
+
type: { summary: 'boolean' },
|
|
82
|
+
defaultValue: { summary: 'false' },
|
|
83
|
+
category: 'Behavior',
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
export const Default = {
|
|
90
|
+
args: {
|
|
91
|
+
to: 'body',
|
|
92
|
+
},
|
|
93
|
+
parameters: {
|
|
94
|
+
docs: {
|
|
95
|
+
description: {
|
|
96
|
+
story: 'Базовое использование портала для рендеринга в body. Контент будет отрендерен в body, но сохранит контекст Vue компонента.',
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
render: (args) => ({
|
|
101
|
+
components: { DXPortal, DXCard },
|
|
102
|
+
setup() {
|
|
103
|
+
return { args };
|
|
104
|
+
},
|
|
105
|
+
template: `
|
|
106
|
+
<div class="p-4">
|
|
107
|
+
<p class="mb-4">Контент выше портала</p>
|
|
108
|
+
<DXPortal v-bind="args">
|
|
109
|
+
<DXCard class="p-4 bg-blue-50 border-blue-200">
|
|
110
|
+
<p>Этот контент рендерится в body через Portal</p>
|
|
111
|
+
</DXCard>
|
|
112
|
+
</DXPortal>
|
|
113
|
+
<p class="mt-4">Контент ниже портала</p>
|
|
114
|
+
</div>
|
|
115
|
+
`,
|
|
116
|
+
}),
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
export const WithModal = {
|
|
120
|
+
parameters: {
|
|
121
|
+
docs: {
|
|
122
|
+
description: {
|
|
123
|
+
story: 'Использование портала с модальным окном. Модальное окно рендерится в body, что позволяет ему быть поверх всего контента.',
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
},
|
|
127
|
+
render: () => ({
|
|
128
|
+
components: { DXPortal, DXModal, DXButton },
|
|
129
|
+
setup() {
|
|
130
|
+
const showModal = ref(false);
|
|
131
|
+
return { showModal };
|
|
132
|
+
},
|
|
133
|
+
template: `
|
|
134
|
+
<div class="p-4">
|
|
135
|
+
<DXButton @click="showModal = true">
|
|
136
|
+
Открыть модальное окно
|
|
137
|
+
</DXButton>
|
|
138
|
+
|
|
139
|
+
<DXPortal to="body">
|
|
140
|
+
<DXModal
|
|
141
|
+
v-if="showModal"
|
|
142
|
+
:open="showModal"
|
|
143
|
+
@close="showModal = false"
|
|
144
|
+
>
|
|
145
|
+
<h2>Модальное окно</h2>
|
|
146
|
+
<p>Это содержимое рендерится в body через Portal</p>
|
|
147
|
+
</DXModal>
|
|
148
|
+
</DXPortal>
|
|
149
|
+
</div>
|
|
150
|
+
`,
|
|
151
|
+
}),
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
export const CustomContainer = {
|
|
155
|
+
parameters: {
|
|
156
|
+
docs: {
|
|
157
|
+
description: {
|
|
158
|
+
story: 'Использование кастомного контейнера. Контент будет рендериться в указанный элемент по селектору.',
|
|
159
|
+
},
|
|
160
|
+
},
|
|
161
|
+
},
|
|
162
|
+
render: () => ({
|
|
163
|
+
components: { DXPortal, DXCard },
|
|
164
|
+
setup() {
|
|
165
|
+
onMounted(() => {
|
|
166
|
+
// Создаем кастомный контейнер если его нет
|
|
167
|
+
if (!document.getElementById('custom-portal')) {
|
|
168
|
+
const container = document.createElement('div');
|
|
169
|
+
container.id = 'custom-portal';
|
|
170
|
+
container.className = 'p-4 border-2 border-dashed border-blue-300 rounded-lg';
|
|
171
|
+
document.body.appendChild(container);
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
return {};
|
|
175
|
+
},
|
|
176
|
+
template: `
|
|
177
|
+
<div class="p-4">
|
|
178
|
+
<p class="mb-4">Контент в основном потоке</p>
|
|
179
|
+
<DXPortal to="#custom-portal">
|
|
180
|
+
<DXCard class="p-4 bg-green-50 border-green-200">
|
|
181
|
+
<p>Этот контент рендерится в кастомном контейнере</p>
|
|
182
|
+
</DXCard>
|
|
183
|
+
</DXPortal>
|
|
184
|
+
</div>
|
|
185
|
+
`,
|
|
186
|
+
}),
|
|
187
|
+
};
|
|
188
|
+
|
|
189
|
+
export const Disabled = {
|
|
190
|
+
args: {
|
|
191
|
+
to: 'body',
|
|
192
|
+
disabled: true,
|
|
193
|
+
},
|
|
194
|
+
parameters: {
|
|
195
|
+
docs: {
|
|
196
|
+
description: {
|
|
197
|
+
story: 'Отключенный портал. Контент рендерится в текущем месте вместо целевого контейнера. Полезно для тестирования или условного рендеринга.',
|
|
198
|
+
},
|
|
199
|
+
},
|
|
200
|
+
},
|
|
201
|
+
render: (args) => ({
|
|
202
|
+
components: { DXPortal, DXCard },
|
|
203
|
+
setup() {
|
|
204
|
+
return { args };
|
|
205
|
+
},
|
|
206
|
+
template: `
|
|
207
|
+
<div class="p-4">
|
|
208
|
+
<p class="mb-4">Контент выше портала</p>
|
|
209
|
+
<DXPortal v-bind="args">
|
|
210
|
+
<DXCard class="p-4 bg-yellow-50 border-yellow-200">
|
|
211
|
+
<p>Этот контент рендерится здесь (портал отключен)</p>
|
|
212
|
+
</DXCard>
|
|
213
|
+
</DXPortal>
|
|
214
|
+
<p class="mt-4">Контент ниже портала</p>
|
|
215
|
+
</div>
|
|
216
|
+
`,
|
|
217
|
+
}),
|
|
218
|
+
};
|
|
219
|
+
|
|
220
|
+
export const MultiplePortals = {
|
|
221
|
+
parameters: {
|
|
222
|
+
docs: {
|
|
223
|
+
description: {
|
|
224
|
+
story: 'Несколько порталов могут использоваться одновременно. Каждый портал независимо рендерит свой контент в указанный контейнер.',
|
|
225
|
+
},
|
|
226
|
+
},
|
|
227
|
+
},
|
|
228
|
+
render: () => ({
|
|
229
|
+
components: { DXPortal, DXCard },
|
|
230
|
+
setup() {
|
|
231
|
+
onMounted(() => {
|
|
232
|
+
// Создаем контейнеры если их нет
|
|
233
|
+
if (!document.getElementById('portal-1')) {
|
|
234
|
+
const container1 = document.createElement('div');
|
|
235
|
+
container1.id = 'portal-1';
|
|
236
|
+
container1.className = 'p-2 border border-blue-300 rounded mb-2';
|
|
237
|
+
document.body.appendChild(container1);
|
|
238
|
+
}
|
|
239
|
+
if (!document.getElementById('portal-2')) {
|
|
240
|
+
const container2 = document.createElement('div');
|
|
241
|
+
container2.id = 'portal-2';
|
|
242
|
+
container2.className = 'p-2 border border-green-300 rounded';
|
|
243
|
+
document.body.appendChild(container2);
|
|
244
|
+
}
|
|
245
|
+
});
|
|
246
|
+
return {};
|
|
247
|
+
},
|
|
248
|
+
template: `
|
|
249
|
+
<div class="p-4">
|
|
250
|
+
<p class="mb-4">Основной контент</p>
|
|
251
|
+
|
|
252
|
+
<DXPortal to="#portal-1">
|
|
253
|
+
<DXCard class="p-2 bg-blue-50">
|
|
254
|
+
Портал 1
|
|
255
|
+
</DXCard>
|
|
256
|
+
</DXPortal>
|
|
257
|
+
|
|
258
|
+
<DXPortal to="#portal-2">
|
|
259
|
+
<DXCard class="p-2 bg-green-50">
|
|
260
|
+
Портал 2
|
|
261
|
+
</DXCard>
|
|
262
|
+
</DXPortal>
|
|
263
|
+
</div>
|
|
264
|
+
`,
|
|
265
|
+
}),
|
|
266
|
+
};
|
|
267
|
+
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<Teleport :to="target" :disabled="disabled">
|
|
3
|
+
<slot />
|
|
4
|
+
</Teleport>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script setup>
|
|
8
|
+
import { computed, onMounted, onBeforeUnmount } from "vue";
|
|
9
|
+
|
|
10
|
+
const props = defineProps({
|
|
11
|
+
/**
|
|
12
|
+
* Целевой контейнер для рендеринга
|
|
13
|
+
* Может быть строкой (селектор или 'body') или DOM элементом
|
|
14
|
+
* @default 'body'
|
|
15
|
+
*/
|
|
16
|
+
to: {
|
|
17
|
+
type: [String, Object],
|
|
18
|
+
default: "body",
|
|
19
|
+
validator: (value) => {
|
|
20
|
+
if (typeof value === "string") {
|
|
21
|
+
return value === "body" || value.startsWith("#") || value.startsWith(".");
|
|
22
|
+
}
|
|
23
|
+
return value instanceof HTMLElement;
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
/** Отключить портал (рендерить в текущем месте) */
|
|
27
|
+
disabled: { type: Boolean, default: false },
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Вычисляет целевой контейнер для Teleport
|
|
32
|
+
*
|
|
33
|
+
* @description
|
|
34
|
+
* Обрабатывает различные форматы целевого контейнера:
|
|
35
|
+
* - Строка "body" → рендеринг в body
|
|
36
|
+
* - Строка-селектор (например, "#app" или ".portal-container") → поиск элемента
|
|
37
|
+
* - DOM элемент → использование напрямую
|
|
38
|
+
*
|
|
39
|
+
* Если контейнер не найден, возвращает "body" как fallback.
|
|
40
|
+
*
|
|
41
|
+
* @returns {string|HTMLElement} Целевой контейнер для Teleport
|
|
42
|
+
*/
|
|
43
|
+
const target = computed(() => {
|
|
44
|
+
// Если это строка "body", возвращаем как есть
|
|
45
|
+
if (props.to === "body") {
|
|
46
|
+
return "body";
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// Если это строка-селектор, пытаемся найти элемент
|
|
50
|
+
if (typeof props.to === "string") {
|
|
51
|
+
const element = document.querySelector(props.to);
|
|
52
|
+
if (element) {
|
|
53
|
+
return element;
|
|
54
|
+
}
|
|
55
|
+
// Если элемент не найден, возвращаем body как fallback
|
|
56
|
+
console.warn(`DXPortal: Контейнер "${props.to}" не найден, используется body`);
|
|
57
|
+
return "body";
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// Если это DOM элемент, возвращаем его
|
|
61
|
+
if (props.to instanceof HTMLElement) {
|
|
62
|
+
return props.to;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// Fallback на body
|
|
66
|
+
return "body";
|
|
67
|
+
});
|
|
68
|
+
</script>
|
|
69
|
+
|
|
@@ -0,0 +1,339 @@
|
|
|
1
|
+
import { ref } from 'vue';
|
|
2
|
+
import DXStaggeredAnimation from './DXStaggeredAnimation.vue';
|
|
3
|
+
import DXCard from '../../atoms/DXCard/DXCard.vue';
|
|
4
|
+
import DXButton from '../../atoms/DXButton/DXButton.vue';
|
|
5
|
+
import DXList from '../../molecules/DXList/DXList.vue';
|
|
6
|
+
|
|
7
|
+
export default {
|
|
8
|
+
title: 'Utilities/DXStaggeredAnimation',
|
|
9
|
+
component: DXStaggeredAnimation,
|
|
10
|
+
tags: ['autodocs'],
|
|
11
|
+
parameters: {
|
|
12
|
+
docs: {
|
|
13
|
+
description: {
|
|
14
|
+
component: `
|
|
15
|
+
# DXStaggeredAnimation
|
|
16
|
+
|
|
17
|
+
Компонент для последовательных анимаций элементов с задержкой между ними.
|
|
18
|
+
|
|
19
|
+
## Назначение
|
|
20
|
+
|
|
21
|
+
DXStaggeredAnimation применяет анимацию к дочерним элементам с последовательной задержкой,
|
|
22
|
+
создавая эффект каскадного появления. Используется для эффектных анимаций списков, сеток и карточек.
|
|
23
|
+
|
|
24
|
+
## Архитектура
|
|
25
|
+
|
|
26
|
+
### Использует
|
|
27
|
+
- CSS transitions - для анимаций
|
|
28
|
+
- \`useClassComposition\` composable - для стилей
|
|
29
|
+
- JavaScript setTimeout - для задержек
|
|
30
|
+
|
|
31
|
+
### Используется в
|
|
32
|
+
- \`DXDashboardGrid\` - для анимации виджетов
|
|
33
|
+
- \`DXList\` - для эффектного появления элементов
|
|
34
|
+
- Любые компоненты со списками элементов
|
|
35
|
+
|
|
36
|
+
## Внутренняя логика
|
|
37
|
+
|
|
38
|
+
### Направления анимации
|
|
39
|
+
- **top-to-bottom**: Элементы появляются сверху вниз
|
|
40
|
+
- **left-to-right**: Элементы появляются слева направо
|
|
41
|
+
- **right-to-left**: Элементы появляются справа налево
|
|
42
|
+
- **bottom-to-top**: Элементы появляются снизу вверх
|
|
43
|
+
|
|
44
|
+
### Типы transition
|
|
45
|
+
- **fade**: Плавное появление
|
|
46
|
+
- **fade-slide**: Появление со скольжением
|
|
47
|
+
- **scale**: Появление с масштабированием
|
|
48
|
+
|
|
49
|
+
### Задержка
|
|
50
|
+
Каждый элемент анимируется с задержкой относительно предыдущего.
|
|
51
|
+
|
|
52
|
+
## Особенности
|
|
53
|
+
|
|
54
|
+
### Автоматическое применение
|
|
55
|
+
Анимация применяется автоматически при монтировании (если \`animateOnMount={true}\`).
|
|
56
|
+
|
|
57
|
+
### Оптимизация
|
|
58
|
+
Таймеры очищаются при размонтировании для предотвращения утечек памяти.
|
|
59
|
+
`,
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
argTypes: {
|
|
64
|
+
delay: {
|
|
65
|
+
control: 'number',
|
|
66
|
+
min: 0,
|
|
67
|
+
max: 500,
|
|
68
|
+
step: 10,
|
|
69
|
+
description: 'Задержка между элементами в миллисекундах.',
|
|
70
|
+
table: {
|
|
71
|
+
type: { summary: 'number' },
|
|
72
|
+
defaultValue: { summary: '100' },
|
|
73
|
+
category: 'Animation',
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
direction: {
|
|
77
|
+
control: 'select',
|
|
78
|
+
options: ['top-to-bottom', 'left-to-right', 'right-to-left', 'bottom-to-top'],
|
|
79
|
+
description: 'Направление анимации.',
|
|
80
|
+
table: {
|
|
81
|
+
type: { summary: 'string' },
|
|
82
|
+
defaultValue: { summary: 'top-to-bottom' },
|
|
83
|
+
category: 'Animation',
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
transition: {
|
|
87
|
+
control: 'select',
|
|
88
|
+
options: ['fade', 'fade-slide', 'scale'],
|
|
89
|
+
description: 'Тип transition.',
|
|
90
|
+
table: {
|
|
91
|
+
type: { summary: 'string' },
|
|
92
|
+
defaultValue: { summary: 'fade' },
|
|
93
|
+
category: 'Animation',
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
duration: {
|
|
97
|
+
control: 'number',
|
|
98
|
+
min: 100,
|
|
99
|
+
max: 1000,
|
|
100
|
+
step: 50,
|
|
101
|
+
description: 'Длительность анимации в миллисекундах.',
|
|
102
|
+
table: {
|
|
103
|
+
type: { summary: 'number' },
|
|
104
|
+
defaultValue: { summary: '300' },
|
|
105
|
+
category: 'Animation',
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
const defaultItems = [
|
|
112
|
+
{ id: 1, name: 'Элемент 1' },
|
|
113
|
+
{ id: 2, name: 'Элемент 2' },
|
|
114
|
+
{ id: 3, name: 'Элемент 3' },
|
|
115
|
+
{ id: 4, name: 'Элемент 4' },
|
|
116
|
+
{ id: 5, name: 'Элемент 5' },
|
|
117
|
+
];
|
|
118
|
+
|
|
119
|
+
export const Default = {
|
|
120
|
+
args: {
|
|
121
|
+
delay: 100,
|
|
122
|
+
direction: 'top-to-bottom',
|
|
123
|
+
transition: 'fade',
|
|
124
|
+
},
|
|
125
|
+
parameters: {
|
|
126
|
+
docs: {
|
|
127
|
+
description: {
|
|
128
|
+
story: 'Базовая последовательная анимация списка элементов. Элементы появляются сверху вниз с задержкой.',
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
},
|
|
132
|
+
render: (args) => ({
|
|
133
|
+
components: { DXStaggeredAnimation, DXCard },
|
|
134
|
+
setup() {
|
|
135
|
+
return { args, defaultItems };
|
|
136
|
+
},
|
|
137
|
+
template: `
|
|
138
|
+
<DXStaggeredAnimation v-bind="args">
|
|
139
|
+
<DXCard
|
|
140
|
+
v-for="item in defaultItems"
|
|
141
|
+
:key="item.id"
|
|
142
|
+
class="p-4 mb-2"
|
|
143
|
+
>
|
|
144
|
+
{{ item.name }}
|
|
145
|
+
</DXCard>
|
|
146
|
+
</DXStaggeredAnimation>
|
|
147
|
+
`,
|
|
148
|
+
}),
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
export const LeftToRight = {
|
|
152
|
+
args: {
|
|
153
|
+
delay: 100,
|
|
154
|
+
direction: 'left-to-right',
|
|
155
|
+
transition: 'fade-slide',
|
|
156
|
+
},
|
|
157
|
+
parameters: {
|
|
158
|
+
docs: {
|
|
159
|
+
description: {
|
|
160
|
+
story: 'Анимация слева направо. Элементы появляются последовательно с левой стороны.',
|
|
161
|
+
},
|
|
162
|
+
},
|
|
163
|
+
},
|
|
164
|
+
render: (args) => ({
|
|
165
|
+
components: { DXStaggeredAnimation, DXCard },
|
|
166
|
+
setup() {
|
|
167
|
+
return { args, defaultItems };
|
|
168
|
+
},
|
|
169
|
+
template: `
|
|
170
|
+
<DXStaggeredAnimation v-bind="args">
|
|
171
|
+
<DXCard
|
|
172
|
+
v-for="item in defaultItems"
|
|
173
|
+
:key="item.id"
|
|
174
|
+
class="p-4 mb-2"
|
|
175
|
+
>
|
|
176
|
+
{{ item.name }}
|
|
177
|
+
</DXCard>
|
|
178
|
+
</DXStaggeredAnimation>
|
|
179
|
+
`,
|
|
180
|
+
}),
|
|
181
|
+
};
|
|
182
|
+
|
|
183
|
+
export const WithScale = {
|
|
184
|
+
args: {
|
|
185
|
+
delay: 150,
|
|
186
|
+
direction: 'top-to-bottom',
|
|
187
|
+
transition: 'scale',
|
|
188
|
+
},
|
|
189
|
+
parameters: {
|
|
190
|
+
docs: {
|
|
191
|
+
description: {
|
|
192
|
+
story: 'Анимация с масштабированием. Элементы появляются с увеличением масштаба.',
|
|
193
|
+
},
|
|
194
|
+
},
|
|
195
|
+
},
|
|
196
|
+
render: (args) => ({
|
|
197
|
+
components: { DXStaggeredAnimation, DXCard },
|
|
198
|
+
setup() {
|
|
199
|
+
return { args, defaultItems };
|
|
200
|
+
},
|
|
201
|
+
template: `
|
|
202
|
+
<DXStaggeredAnimation v-bind="args">
|
|
203
|
+
<DXCard
|
|
204
|
+
v-for="item in defaultItems"
|
|
205
|
+
:key="item.id"
|
|
206
|
+
class="p-4 mb-2"
|
|
207
|
+
>
|
|
208
|
+
{{ item.name }}
|
|
209
|
+
</DXCard>
|
|
210
|
+
</DXStaggeredAnimation>
|
|
211
|
+
`,
|
|
212
|
+
}),
|
|
213
|
+
};
|
|
214
|
+
|
|
215
|
+
export const GridLayout = {
|
|
216
|
+
parameters: {
|
|
217
|
+
docs: {
|
|
218
|
+
description: {
|
|
219
|
+
story: 'Анимация элементов в сетке. Карточки появляются последовательно в grid layout.',
|
|
220
|
+
},
|
|
221
|
+
},
|
|
222
|
+
},
|
|
223
|
+
render: () => ({
|
|
224
|
+
components: { DXStaggeredAnimation, DXCard },
|
|
225
|
+
setup() {
|
|
226
|
+
const gridItems = ref([
|
|
227
|
+
{ id: 1, title: 'Карточка 1' },
|
|
228
|
+
{ id: 2, title: 'Карточка 2' },
|
|
229
|
+
{ id: 3, title: 'Карточка 3' },
|
|
230
|
+
{ id: 4, title: 'Карточка 4' },
|
|
231
|
+
{ id: 5, title: 'Карточка 5' },
|
|
232
|
+
{ id: 6, title: 'Карточка 6' },
|
|
233
|
+
]);
|
|
234
|
+
return { gridItems };
|
|
235
|
+
},
|
|
236
|
+
template: `
|
|
237
|
+
<DXStaggeredAnimation delay="100" direction="left-to-right" transition="fade-slide">
|
|
238
|
+
<div class="grid grid-cols-3 gap-4">
|
|
239
|
+
<DXCard
|
|
240
|
+
v-for="item in gridItems"
|
|
241
|
+
:key="item.id"
|
|
242
|
+
class="p-4"
|
|
243
|
+
>
|
|
244
|
+
<h3 class="font-semibold">{{ item.title }}</h3>
|
|
245
|
+
</DXCard>
|
|
246
|
+
</div>
|
|
247
|
+
</DXStaggeredAnimation>
|
|
248
|
+
`,
|
|
249
|
+
}),
|
|
250
|
+
};
|
|
251
|
+
|
|
252
|
+
export const WithButton = {
|
|
253
|
+
parameters: {
|
|
254
|
+
docs: {
|
|
255
|
+
description: {
|
|
256
|
+
story: 'Анимация с кнопкой для повторного запуска. Нажмите кнопку, чтобы увидеть анимацию снова.',
|
|
257
|
+
},
|
|
258
|
+
},
|
|
259
|
+
},
|
|
260
|
+
render: () => ({
|
|
261
|
+
components: { DXStaggeredAnimation, DXCard, DXButton },
|
|
262
|
+
setup() {
|
|
263
|
+
const key = ref(0);
|
|
264
|
+
const items = ref(defaultItems);
|
|
265
|
+
|
|
266
|
+
const restartAnimation = () => {
|
|
267
|
+
key.value++;
|
|
268
|
+
};
|
|
269
|
+
|
|
270
|
+
return { key, items, restartAnimation };
|
|
271
|
+
},
|
|
272
|
+
template: `
|
|
273
|
+
<div class="space-y-4">
|
|
274
|
+
<DXButton @click="restartAnimation">Запустить анимацию</DXButton>
|
|
275
|
+
<DXStaggeredAnimation
|
|
276
|
+
:key="key"
|
|
277
|
+
delay="100"
|
|
278
|
+
direction="top-to-bottom"
|
|
279
|
+
transition="fade-slide"
|
|
280
|
+
>
|
|
281
|
+
<DXCard
|
|
282
|
+
v-for="item in items"
|
|
283
|
+
:key="item.id"
|
|
284
|
+
class="p-4 mb-2"
|
|
285
|
+
>
|
|
286
|
+
{{ item.name }}
|
|
287
|
+
</DXCard>
|
|
288
|
+
</DXStaggeredAnimation>
|
|
289
|
+
</div>
|
|
290
|
+
`,
|
|
291
|
+
}),
|
|
292
|
+
};
|
|
293
|
+
|
|
294
|
+
export const AllDirections = {
|
|
295
|
+
parameters: {
|
|
296
|
+
docs: {
|
|
297
|
+
description: {
|
|
298
|
+
story: 'Демонстрация всех направлений анимации.',
|
|
299
|
+
},
|
|
300
|
+
},
|
|
301
|
+
},
|
|
302
|
+
render: () => ({
|
|
303
|
+
components: { DXStaggeredAnimation, DXCard },
|
|
304
|
+
setup() {
|
|
305
|
+
const directions = [
|
|
306
|
+
{ name: 'top-to-bottom', label: 'Сверху вниз' },
|
|
307
|
+
{ name: 'left-to-right', label: 'Слева направо' },
|
|
308
|
+
{ name: 'right-to-left', label: 'Справа налево' },
|
|
309
|
+
{ name: 'bottom-to-top', label: 'Снизу вверх' },
|
|
310
|
+
];
|
|
311
|
+
return { directions, defaultItems };
|
|
312
|
+
},
|
|
313
|
+
template: `
|
|
314
|
+
<div class="space-y-8">
|
|
315
|
+
<div
|
|
316
|
+
v-for="dir in directions"
|
|
317
|
+
:key="dir.name"
|
|
318
|
+
class="space-y-2"
|
|
319
|
+
>
|
|
320
|
+
<h3 class="font-semibold">{{ dir.label }}</h3>
|
|
321
|
+
<DXStaggeredAnimation
|
|
322
|
+
:direction="dir.name"
|
|
323
|
+
delay="100"
|
|
324
|
+
transition="fade-slide"
|
|
325
|
+
>
|
|
326
|
+
<DXCard
|
|
327
|
+
v-for="item in defaultItems.slice(0, 3)"
|
|
328
|
+
:key="item.id"
|
|
329
|
+
class="p-4 mb-2"
|
|
330
|
+
>
|
|
331
|
+
{{ item.name }}
|
|
332
|
+
</DXCard>
|
|
333
|
+
</DXStaggeredAnimation>
|
|
334
|
+
</div>
|
|
335
|
+
</div>
|
|
336
|
+
`,
|
|
337
|
+
}),
|
|
338
|
+
};
|
|
339
|
+
|