dxd-style-code 0.1.7 → 0.1.9
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 +14 -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/index.js +20 -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,729 @@
|
|
|
1
|
+
import { ref } from 'vue';
|
|
2
|
+
import DXSidebarMenu from './DXSidebarMenu.vue';
|
|
3
|
+
import DXButton from '../../atoms/DXButton/DXButton.vue';
|
|
4
|
+
import DXCard from '../../atoms/DXCard/DXCard.vue';
|
|
5
|
+
import {
|
|
6
|
+
HomeIcon,
|
|
7
|
+
ChartBarIcon,
|
|
8
|
+
UsersIcon,
|
|
9
|
+
Cog6ToothIcon,
|
|
10
|
+
DocumentTextIcon,
|
|
11
|
+
FolderIcon,
|
|
12
|
+
InboxIcon,
|
|
13
|
+
CalendarIcon,
|
|
14
|
+
BellIcon,
|
|
15
|
+
ShoppingCartIcon,
|
|
16
|
+
CreditCardIcon,
|
|
17
|
+
UserCircleIcon,
|
|
18
|
+
ArrowRightOnRectangleIcon,
|
|
19
|
+
} from '@heroicons/vue/24/outline';
|
|
20
|
+
|
|
21
|
+
export default {
|
|
22
|
+
title: 'Organisms/DXSidebarMenu',
|
|
23
|
+
component: DXSidebarMenu,
|
|
24
|
+
tags: ['autodocs'],
|
|
25
|
+
argTypes: {
|
|
26
|
+
showHeader: {
|
|
27
|
+
control: { type: 'boolean' },
|
|
28
|
+
description: 'Показывать header (undefined = автоматически)'
|
|
29
|
+
},
|
|
30
|
+
headerSize: {
|
|
31
|
+
control: { type: 'select' },
|
|
32
|
+
options: ['sm', 'md', 'lg']
|
|
33
|
+
},
|
|
34
|
+
width: { control: { type: 'select' }, options: ['sm', 'md', 'lg', 'full'] },
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export const Default = {
|
|
39
|
+
render: () => ({
|
|
40
|
+
components: { DXSidebarMenu },
|
|
41
|
+
setup() {
|
|
42
|
+
const activeItem = ref('/home');
|
|
43
|
+
|
|
44
|
+
// Данные меню - видны в "Show code"
|
|
45
|
+
const sections = [
|
|
46
|
+
{
|
|
47
|
+
items: [
|
|
48
|
+
{
|
|
49
|
+
id: 'home',
|
|
50
|
+
label: 'Главная',
|
|
51
|
+
icon: HomeIcon,
|
|
52
|
+
to: '/home',
|
|
53
|
+
badge: '5',
|
|
54
|
+
badgeVariant: 'danger'
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
id: 'analytics',
|
|
58
|
+
label: 'Аналитика',
|
|
59
|
+
icon: ChartBarIcon,
|
|
60
|
+
to: '/analytics',
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
id: 'users',
|
|
64
|
+
label: 'Пользователи',
|
|
65
|
+
icon: UsersIcon,
|
|
66
|
+
to: '/users',
|
|
67
|
+
badge: '12',
|
|
68
|
+
badgeVariant: 'info'
|
|
69
|
+
},
|
|
70
|
+
],
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
title: 'Контент',
|
|
74
|
+
items: [
|
|
75
|
+
{
|
|
76
|
+
id: 'documents',
|
|
77
|
+
label: 'Документы',
|
|
78
|
+
icon: DocumentTextIcon,
|
|
79
|
+
children: [
|
|
80
|
+
{ id: 'all-docs', label: 'Все документы', to: '/documents/all' },
|
|
81
|
+
{ id: 'my-docs', label: 'Мои документы', to: '/documents/my' },
|
|
82
|
+
{ id: 'shared', label: 'Общие', to: '/documents/shared', badge: '3' },
|
|
83
|
+
]
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
id: 'folders',
|
|
87
|
+
label: 'Папки',
|
|
88
|
+
icon: FolderIcon,
|
|
89
|
+
to: '/folders'
|
|
90
|
+
},
|
|
91
|
+
],
|
|
92
|
+
},
|
|
93
|
+
];
|
|
94
|
+
|
|
95
|
+
const handleItemClick = (item) => {
|
|
96
|
+
console.log('Clicked:', item);
|
|
97
|
+
activeItem.value = item.to || item.id;
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
return { sections, activeItem, handleItemClick };
|
|
101
|
+
},
|
|
102
|
+
template: `
|
|
103
|
+
<div class="h-screen flex">
|
|
104
|
+
<DXSidebarMenu
|
|
105
|
+
title="Меню"
|
|
106
|
+
width="md"
|
|
107
|
+
:collapsible="true"
|
|
108
|
+
:searchable="false"
|
|
109
|
+
:bordered="true"
|
|
110
|
+
:sections="sections"
|
|
111
|
+
:activeItem="activeItem"
|
|
112
|
+
@item-click="handleItemClick"
|
|
113
|
+
/>
|
|
114
|
+
<div class="flex-1 p-8 bg-slate-50">
|
|
115
|
+
<h1 class="text-2xl font-bold mb-4">Основной контент</h1>
|
|
116
|
+
<p class="text-slate-600">Активный элемент: {{ activeItem }}</p>
|
|
117
|
+
</div>
|
|
118
|
+
</div>
|
|
119
|
+
`,
|
|
120
|
+
}),
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
export const WithSearch = {
|
|
124
|
+
render: () => ({
|
|
125
|
+
components: { DXSidebarMenu },
|
|
126
|
+
setup() {
|
|
127
|
+
const activeItem = ref('/home');
|
|
128
|
+
|
|
129
|
+
const sections = [
|
|
130
|
+
{
|
|
131
|
+
items: [
|
|
132
|
+
{ id: 'home', label: 'Главная', icon: HomeIcon, to: '/home' },
|
|
133
|
+
{ id: 'analytics', label: 'Аналитика', icon: ChartBarIcon, to: '/analytics' },
|
|
134
|
+
{ id: 'users', label: 'Пользователи', icon: UsersIcon, to: '/users', badge: '12' },
|
|
135
|
+
],
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
title: 'Контент',
|
|
139
|
+
items: [
|
|
140
|
+
{ id: 'documents', label: 'Документы', icon: DocumentTextIcon, to: '/documents' },
|
|
141
|
+
{ id: 'folders', label: 'Папки', icon: FolderIcon, to: '/folders' },
|
|
142
|
+
{ id: 'inbox', label: 'Входящие', icon: InboxIcon, to: '/inbox', badge: '25' },
|
|
143
|
+
],
|
|
144
|
+
},
|
|
145
|
+
];
|
|
146
|
+
|
|
147
|
+
return { sections, activeItem };
|
|
148
|
+
},
|
|
149
|
+
template: `
|
|
150
|
+
<div class="h-screen flex">
|
|
151
|
+
<DXSidebarMenu
|
|
152
|
+
title="Навигация"
|
|
153
|
+
:sections="sections"
|
|
154
|
+
:activeItem="activeItem"
|
|
155
|
+
searchable
|
|
156
|
+
/>
|
|
157
|
+
<div class="flex-1 p-8 bg-slate-50">
|
|
158
|
+
<h1 class="text-2xl font-bold">Поиск по меню</h1>
|
|
159
|
+
<p class="text-slate-600 mt-2">Начните вводить название пункта меню</p>
|
|
160
|
+
</div>
|
|
161
|
+
</div>
|
|
162
|
+
`,
|
|
163
|
+
}),
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
export const Compact = {
|
|
167
|
+
render: () => ({
|
|
168
|
+
components: { DXSidebarMenu },
|
|
169
|
+
setup() {
|
|
170
|
+
const activeItem = ref('/home');
|
|
171
|
+
const compact = ref(true);
|
|
172
|
+
|
|
173
|
+
const sections = [
|
|
174
|
+
{
|
|
175
|
+
items: [
|
|
176
|
+
{ id: 'home', label: 'Главная', icon: HomeIcon, to: '/home' },
|
|
177
|
+
{ id: 'analytics', label: 'Аналитика', icon: ChartBarIcon, to: '/analytics' },
|
|
178
|
+
{ id: 'users', label: 'Пользователи', icon: UsersIcon, to: '/users' },
|
|
179
|
+
],
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
title: 'Настройки',
|
|
183
|
+
items: [
|
|
184
|
+
{ id: 'calendar', label: 'Календарь', icon: CalendarIcon, to: '/calendar' },
|
|
185
|
+
{ id: 'settings', label: 'Настройки', icon: Cog6ToothIcon, to: '/settings' },
|
|
186
|
+
],
|
|
187
|
+
},
|
|
188
|
+
];
|
|
189
|
+
|
|
190
|
+
return { sections, activeItem, compact };
|
|
191
|
+
},
|
|
192
|
+
template: `
|
|
193
|
+
<div class="h-screen flex">
|
|
194
|
+
<DXSidebarMenu
|
|
195
|
+
:sections="sections"
|
|
196
|
+
:activeItem="activeItem"
|
|
197
|
+
:compact="compact"
|
|
198
|
+
collapsible
|
|
199
|
+
@update:compact="compact = $event"
|
|
200
|
+
/>
|
|
201
|
+
<div class="flex-1 p-8 bg-slate-50">
|
|
202
|
+
<h1 class="text-2xl font-bold">Компактный режим</h1>
|
|
203
|
+
<p class="text-slate-600 mt-2">Кликните на иконку стрелки, чтобы развернуть</p>
|
|
204
|
+
</div>
|
|
205
|
+
</div>
|
|
206
|
+
`,
|
|
207
|
+
}),
|
|
208
|
+
};
|
|
209
|
+
|
|
210
|
+
export const SimpleExample = {
|
|
211
|
+
render: () => ({
|
|
212
|
+
components: { DXSidebarMenu },
|
|
213
|
+
setup() {
|
|
214
|
+
const activeItem = ref('/');
|
|
215
|
+
|
|
216
|
+
// Минимальный пример данных
|
|
217
|
+
const sections = [
|
|
218
|
+
{
|
|
219
|
+
items: [
|
|
220
|
+
{ id: 'home', label: 'Главная', icon: HomeIcon, to: '/' },
|
|
221
|
+
{ id: 'users', label: 'Пользователи', icon: UsersIcon, to: '/users' },
|
|
222
|
+
{ id: 'settings', label: 'Настройки', icon: Cog6ToothIcon, to: '/settings' },
|
|
223
|
+
]
|
|
224
|
+
}
|
|
225
|
+
];
|
|
226
|
+
|
|
227
|
+
return { sections, activeItem };
|
|
228
|
+
},
|
|
229
|
+
template: `
|
|
230
|
+
<div class="h-screen flex">
|
|
231
|
+
<DXSidebarMenu
|
|
232
|
+
title="Простое меню"
|
|
233
|
+
:sections="sections"
|
|
234
|
+
:activeItem="activeItem"
|
|
235
|
+
/>
|
|
236
|
+
<main class="flex-1 p-8 bg-slate-50">
|
|
237
|
+
<h1 class="text-2xl font-bold">Минимальный пример</h1>
|
|
238
|
+
</main>
|
|
239
|
+
</div>
|
|
240
|
+
`,
|
|
241
|
+
}),
|
|
242
|
+
};
|
|
243
|
+
|
|
244
|
+
export const WithBadges = {
|
|
245
|
+
render: () => ({
|
|
246
|
+
components: { DXSidebarMenu },
|
|
247
|
+
setup() {
|
|
248
|
+
const activeItem = ref('/home');
|
|
249
|
+
|
|
250
|
+
const sections = [
|
|
251
|
+
{
|
|
252
|
+
items: [
|
|
253
|
+
{
|
|
254
|
+
id: 'home',
|
|
255
|
+
label: 'Главная',
|
|
256
|
+
icon: HomeIcon,
|
|
257
|
+
to: '/home'
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
id: 'inbox',
|
|
261
|
+
label: 'Входящие',
|
|
262
|
+
icon: InboxIcon,
|
|
263
|
+
to: '/inbox',
|
|
264
|
+
badge: '25',
|
|
265
|
+
badgeVariant: 'danger'
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
id: 'notifications',
|
|
269
|
+
label: 'Уведомления',
|
|
270
|
+
icon: BellIcon,
|
|
271
|
+
to: '/notifications',
|
|
272
|
+
badge: '99+',
|
|
273
|
+
badgeVariant: 'warning'
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
id: 'users',
|
|
277
|
+
label: 'Пользователи',
|
|
278
|
+
icon: UsersIcon,
|
|
279
|
+
to: '/users',
|
|
280
|
+
badge: '156',
|
|
281
|
+
badgeVariant: 'info'
|
|
282
|
+
},
|
|
283
|
+
]
|
|
284
|
+
}
|
|
285
|
+
];
|
|
286
|
+
|
|
287
|
+
return { sections, activeItem };
|
|
288
|
+
},
|
|
289
|
+
template: `
|
|
290
|
+
<div class="h-screen flex">
|
|
291
|
+
<DXSidebarMenu
|
|
292
|
+
title="Со счетчиками"
|
|
293
|
+
:sections="sections"
|
|
294
|
+
:activeItem="activeItem"
|
|
295
|
+
/>
|
|
296
|
+
<div class="flex-1 p-8 bg-slate-50">
|
|
297
|
+
<h1 class="text-2xl font-bold">Badges/Счетчики</h1>
|
|
298
|
+
<p class="text-slate-600 mt-2">Варианты: info, success, warning, danger</p>
|
|
299
|
+
</div>
|
|
300
|
+
</div>
|
|
301
|
+
`,
|
|
302
|
+
}),
|
|
303
|
+
};
|
|
304
|
+
|
|
305
|
+
export const WithSubmenu = {
|
|
306
|
+
render: () => ({
|
|
307
|
+
components: { DXSidebarMenu },
|
|
308
|
+
setup() {
|
|
309
|
+
const activeItem = ref('/home');
|
|
310
|
+
|
|
311
|
+
const sections = [
|
|
312
|
+
{
|
|
313
|
+
items: [
|
|
314
|
+
{ id: 'home', label: 'Главная', icon: HomeIcon, to: '/home' },
|
|
315
|
+
{
|
|
316
|
+
id: 'settings',
|
|
317
|
+
label: 'Настройки',
|
|
318
|
+
icon: Cog6ToothIcon,
|
|
319
|
+
children: [
|
|
320
|
+
{ id: 'profile', label: 'Профиль', to: '/settings/profile' },
|
|
321
|
+
{ id: 'security', label: 'Безопасность', to: '/settings/security' },
|
|
322
|
+
{ id: 'notifications', label: 'Уведомления', to: '/settings/notifications' },
|
|
323
|
+
]
|
|
324
|
+
},
|
|
325
|
+
]
|
|
326
|
+
}
|
|
327
|
+
];
|
|
328
|
+
|
|
329
|
+
return { sections, activeItem };
|
|
330
|
+
},
|
|
331
|
+
template: `
|
|
332
|
+
<div class="h-screen flex">
|
|
333
|
+
<DXSidebarMenu
|
|
334
|
+
title="С подменю"
|
|
335
|
+
:sections="sections"
|
|
336
|
+
:activeItem="activeItem"
|
|
337
|
+
/>
|
|
338
|
+
<div class="flex-1 p-8 bg-slate-50">
|
|
339
|
+
<h1 class="text-2xl font-bold">Вложенное меню</h1>
|
|
340
|
+
<p class="text-slate-600 mt-2">Кликните на "Настройки" чтобы раскрыть подменю</p>
|
|
341
|
+
</div>
|
|
342
|
+
</div>
|
|
343
|
+
`,
|
|
344
|
+
}),
|
|
345
|
+
};
|
|
346
|
+
|
|
347
|
+
export const WithCustomHeader = {
|
|
348
|
+
render: () => ({
|
|
349
|
+
components: { DXSidebarMenu },
|
|
350
|
+
setup() {
|
|
351
|
+
const activeItem = ref('/home');
|
|
352
|
+
|
|
353
|
+
const sections = [
|
|
354
|
+
{
|
|
355
|
+
items: [
|
|
356
|
+
{ id: 'home', label: 'Главная', icon: HomeIcon, to: '/home' },
|
|
357
|
+
{ id: 'analytics', label: 'Аналитика', icon: ChartBarIcon, to: '/analytics' },
|
|
358
|
+
{ id: 'users', label: 'Пользователи', icon: UsersIcon, to: '/users' },
|
|
359
|
+
]
|
|
360
|
+
}
|
|
361
|
+
];
|
|
362
|
+
|
|
363
|
+
return { sections, activeItem };
|
|
364
|
+
},
|
|
365
|
+
template: `
|
|
366
|
+
<div class="h-screen flex">
|
|
367
|
+
<DXSidebarMenu
|
|
368
|
+
:sections="sections"
|
|
369
|
+
:activeItem="activeItem"
|
|
370
|
+
>
|
|
371
|
+
<template #header>
|
|
372
|
+
<div class="flex items-center gap-3 w-full">
|
|
373
|
+
<div class="w-10 h-10 rounded-xl bg-gradient-to-br from-emerald-500 to-teal-600 flex items-center justify-center">
|
|
374
|
+
<span class="text-white font-bold text-lg">D</span>
|
|
375
|
+
</div>
|
|
376
|
+
<div class="flex-1">
|
|
377
|
+
<h2 class="text-sm font-bold text-slate-900">DXD System</h2>
|
|
378
|
+
<p class="text-xs text-slate-500">Design & Development</p>
|
|
379
|
+
</div>
|
|
380
|
+
</div>
|
|
381
|
+
</template>
|
|
382
|
+
</DXSidebarMenu>
|
|
383
|
+
<div class="flex-1 p-8 bg-slate-50">
|
|
384
|
+
<h1 class="text-2xl font-bold">Кастомный заголовок</h1>
|
|
385
|
+
</div>
|
|
386
|
+
</div>
|
|
387
|
+
`,
|
|
388
|
+
}),
|
|
389
|
+
};
|
|
390
|
+
|
|
391
|
+
export const EcommerceExample = {
|
|
392
|
+
render: () => ({
|
|
393
|
+
components: { DXSidebarMenu, DXButton },
|
|
394
|
+
setup() {
|
|
395
|
+
const activeItem = ref('/');
|
|
396
|
+
|
|
397
|
+
const sections = [
|
|
398
|
+
{
|
|
399
|
+
items: [
|
|
400
|
+
{ id: 'home', label: 'Главная', icon: HomeIcon, to: '/' },
|
|
401
|
+
{
|
|
402
|
+
id: 'orders',
|
|
403
|
+
label: 'Заказы',
|
|
404
|
+
icon: ShoppingCartIcon,
|
|
405
|
+
to: '/orders',
|
|
406
|
+
badge: '8',
|
|
407
|
+
badgeVariant: 'danger'
|
|
408
|
+
},
|
|
409
|
+
]
|
|
410
|
+
},
|
|
411
|
+
{
|
|
412
|
+
title: 'Продажи',
|
|
413
|
+
items: [
|
|
414
|
+
{ id: 'products', label: 'Товары', icon: InboxIcon, to: '/products' },
|
|
415
|
+
{
|
|
416
|
+
id: 'customers',
|
|
417
|
+
label: 'Клиенты',
|
|
418
|
+
icon: UsersIcon,
|
|
419
|
+
to: '/customers',
|
|
420
|
+
badge: '156'
|
|
421
|
+
},
|
|
422
|
+
{ id: 'payments', label: 'Платежи', icon: CreditCardIcon, to: '/payments' },
|
|
423
|
+
]
|
|
424
|
+
},
|
|
425
|
+
{
|
|
426
|
+
title: 'Отчеты',
|
|
427
|
+
items: [
|
|
428
|
+
{ id: 'analytics', label: 'Аналитика', icon: ChartBarIcon, to: '/analytics' },
|
|
429
|
+
{ id: 'reports', label: 'Отчеты', icon: DocumentTextIcon, to: '/reports' },
|
|
430
|
+
]
|
|
431
|
+
}
|
|
432
|
+
];
|
|
433
|
+
|
|
434
|
+
const handleItemClick = (item) => {
|
|
435
|
+
activeItem.value = item.to || item.id;
|
|
436
|
+
};
|
|
437
|
+
|
|
438
|
+
return { sections, activeItem, handleItemClick, UserCircleIcon, ArrowRightOnRectangleIcon };
|
|
439
|
+
},
|
|
440
|
+
template: `
|
|
441
|
+
<div class="h-screen flex">
|
|
442
|
+
<DXSidebarMenu
|
|
443
|
+
:sections="sections"
|
|
444
|
+
:activeItem="activeItem"
|
|
445
|
+
width="md"
|
|
446
|
+
searchable
|
|
447
|
+
@item-click="handleItemClick"
|
|
448
|
+
>
|
|
449
|
+
<template #header>
|
|
450
|
+
<div class="flex items-center gap-3">
|
|
451
|
+
<div class="w-10 h-10 rounded-xl bg-gradient-to-br from-blue-500 to-purple-600 flex items-center justify-center text-white font-bold text-lg">
|
|
452
|
+
S
|
|
453
|
+
</div>
|
|
454
|
+
<div class="flex-1">
|
|
455
|
+
<h2 class="text-sm font-bold text-slate-900">Shop Admin</h2>
|
|
456
|
+
<p class="text-xs text-slate-500">v1.0.0</p>
|
|
457
|
+
</div>
|
|
458
|
+
</div>
|
|
459
|
+
</template>
|
|
460
|
+
|
|
461
|
+
<template #footer>
|
|
462
|
+
<div class="space-y-2">
|
|
463
|
+
<button class="w-full flex items-center gap-3 px-4 py-2.5 rounded-xl text-slate-600 hover:bg-slate-100 transition-colors">
|
|
464
|
+
<component :is="UserCircleIcon" class="w-5 h-5" />
|
|
465
|
+
<span class="text-sm font-medium">Профиль</span>
|
|
466
|
+
</button>
|
|
467
|
+
<button class="w-full flex items-center gap-3 px-4 py-2.5 rounded-xl text-rose-600 hover:bg-rose-50 transition-colors">
|
|
468
|
+
<component :is="ArrowRightOnRectangleIcon" class="w-5 h-5" />
|
|
469
|
+
<span class="text-sm font-medium">Выйти</span>
|
|
470
|
+
</button>
|
|
471
|
+
</div>
|
|
472
|
+
</template>
|
|
473
|
+
</DXSidebarMenu>
|
|
474
|
+
|
|
475
|
+
<div class="flex-1 p-8 bg-slate-50">
|
|
476
|
+
<h1 class="text-2xl font-bold mb-4">E-commerce Dashboard</h1>
|
|
477
|
+
<p class="text-slate-600">Активная страница: <code class="bg-white px-2 py-1 rounded">{{ activeItem }}</code></p>
|
|
478
|
+
</div>
|
|
479
|
+
</div>
|
|
480
|
+
`,
|
|
481
|
+
}),
|
|
482
|
+
};
|
|
483
|
+
|
|
484
|
+
export const InsideCard = {
|
|
485
|
+
render: () => ({
|
|
486
|
+
components: { DXSidebarMenu, DXCard },
|
|
487
|
+
setup() {
|
|
488
|
+
const activeItem = ref('/home');
|
|
489
|
+
|
|
490
|
+
const sections = [
|
|
491
|
+
{
|
|
492
|
+
items: [
|
|
493
|
+
{
|
|
494
|
+
id: 'home',
|
|
495
|
+
label: 'Главная',
|
|
496
|
+
icon: HomeIcon,
|
|
497
|
+
to: '/home',
|
|
498
|
+
badge: '5',
|
|
499
|
+
badgeVariant: 'danger'
|
|
500
|
+
},
|
|
501
|
+
{
|
|
502
|
+
id: 'analytics',
|
|
503
|
+
label: 'Аналитика',
|
|
504
|
+
icon: ChartBarIcon,
|
|
505
|
+
to: '/analytics',
|
|
506
|
+
},
|
|
507
|
+
{
|
|
508
|
+
id: 'users',
|
|
509
|
+
label: 'Пользователи',
|
|
510
|
+
icon: UsersIcon,
|
|
511
|
+
to: '/users',
|
|
512
|
+
badge: '12',
|
|
513
|
+
badgeVariant: 'info'
|
|
514
|
+
},
|
|
515
|
+
],
|
|
516
|
+
},
|
|
517
|
+
{
|
|
518
|
+
title: 'Настройки',
|
|
519
|
+
items: [
|
|
520
|
+
{
|
|
521
|
+
id: 'calendar',
|
|
522
|
+
label: 'Календарь',
|
|
523
|
+
icon: CalendarIcon,
|
|
524
|
+
to: '/calendar'
|
|
525
|
+
},
|
|
526
|
+
{
|
|
527
|
+
id: 'settings',
|
|
528
|
+
label: 'Настройки',
|
|
529
|
+
icon: Cog6ToothIcon,
|
|
530
|
+
children: [
|
|
531
|
+
{ id: 'profile', label: 'Профиль', to: '/settings/profile' },
|
|
532
|
+
{ id: 'security', label: 'Безопасность', to: '/settings/security' },
|
|
533
|
+
{ id: 'notifications', label: 'Уведомления', to: '/settings/notifications' },
|
|
534
|
+
]
|
|
535
|
+
},
|
|
536
|
+
],
|
|
537
|
+
},
|
|
538
|
+
];
|
|
539
|
+
|
|
540
|
+
const handleItemClick = (item) => {
|
|
541
|
+
activeItem.value = item.to || item.id;
|
|
542
|
+
};
|
|
543
|
+
|
|
544
|
+
return { sections, activeItem, handleItemClick };
|
|
545
|
+
},
|
|
546
|
+
template: `
|
|
547
|
+
<div class="p-8 bg-slate-50 min-h-screen">
|
|
548
|
+
<h1 class="text-2xl font-bold mb-6">Меню внутри карточки</h1>
|
|
549
|
+
|
|
550
|
+
<div class="grid grid-cols-3 gap-6">
|
|
551
|
+
<!-- Меню в карточке -->
|
|
552
|
+
<DXCard class="col-span-1">
|
|
553
|
+
<DXSidebarMenu
|
|
554
|
+
title="Навигация"
|
|
555
|
+
:sections="sections"
|
|
556
|
+
:activeItem="activeItem"
|
|
557
|
+
variant="embedded"
|
|
558
|
+
:collapsible="false"
|
|
559
|
+
:bordered="false"
|
|
560
|
+
@item-click="handleItemClick"
|
|
561
|
+
/>
|
|
562
|
+
</DXCard>
|
|
563
|
+
|
|
564
|
+
<!-- Основной контент -->
|
|
565
|
+
<div class="col-span-2">
|
|
566
|
+
<DXCard>
|
|
567
|
+
<h2 class="text-xl font-semibold mb-4">Контент страницы</h2>
|
|
568
|
+
<p class="text-slate-600 mb-4">
|
|
569
|
+
Меню находится в карточке слева. Используйте <code class="bg-slate-100 px-2 py-1 rounded">variant="embedded"</code>
|
|
570
|
+
для встраивания меню в контейнеры.
|
|
571
|
+
</p>
|
|
572
|
+
<div class="p-4 bg-slate-50 rounded-lg">
|
|
573
|
+
<p class="text-sm font-medium text-slate-700 mb-2">Активный элемент:</p>
|
|
574
|
+
<code class="text-sm bg-white px-3 py-2 rounded border border-slate-200">{{ activeItem }}</code>
|
|
575
|
+
</div>
|
|
576
|
+
</DXCard>
|
|
577
|
+
</div>
|
|
578
|
+
</div>
|
|
579
|
+
</div>
|
|
580
|
+
`,
|
|
581
|
+
}),
|
|
582
|
+
};
|
|
583
|
+
|
|
584
|
+
// 10. NoHeader - без header
|
|
585
|
+
export const NoHeader = {
|
|
586
|
+
render: () => ({
|
|
587
|
+
components: { DXSidebarMenu },
|
|
588
|
+
setup() {
|
|
589
|
+
const activeItem = ref('/home');
|
|
590
|
+
const sections = [
|
|
591
|
+
{
|
|
592
|
+
items: [
|
|
593
|
+
{ id: 'home', label: 'Главная', icon: HomeIcon, to: '/home' },
|
|
594
|
+
{ id: 'analytics', label: 'Аналитика', icon: ChartBarIcon, to: '/analytics' },
|
|
595
|
+
{ id: 'users', label: 'Пользователи', icon: UsersIcon, to: '/users' },
|
|
596
|
+
],
|
|
597
|
+
},
|
|
598
|
+
];
|
|
599
|
+
const handleItemClick = (item) => {
|
|
600
|
+
activeItem.value = item.to || item.id;
|
|
601
|
+
};
|
|
602
|
+
return { sections, activeItem, handleItemClick };
|
|
603
|
+
},
|
|
604
|
+
template: `
|
|
605
|
+
<div class="h-screen flex">
|
|
606
|
+
<DXSidebarMenu
|
|
607
|
+
:sections="sections"
|
|
608
|
+
:activeItem="activeItem"
|
|
609
|
+
:showHeader="false"
|
|
610
|
+
@item-click="handleItemClick"
|
|
611
|
+
/>
|
|
612
|
+
<div class="flex-1 p-8">
|
|
613
|
+
<h2 class="text-2xl font-bold">Sidebar без header</h2>
|
|
614
|
+
</div>
|
|
615
|
+
</div>
|
|
616
|
+
`,
|
|
617
|
+
}),
|
|
618
|
+
};
|
|
619
|
+
|
|
620
|
+
// 11. SmallHeader - компактный header
|
|
621
|
+
export const SmallHeader = {
|
|
622
|
+
render: () => ({
|
|
623
|
+
components: { DXSidebarMenu },
|
|
624
|
+
setup() {
|
|
625
|
+
const activeItem = ref('/home');
|
|
626
|
+
const sections = [
|
|
627
|
+
{
|
|
628
|
+
items: [
|
|
629
|
+
{ id: 'home', label: 'Главная', icon: HomeIcon, to: '/home' },
|
|
630
|
+
{ id: 'analytics', label: 'Аналитика', icon: ChartBarIcon, to: '/analytics' },
|
|
631
|
+
{ id: 'users', label: 'Пользователи', icon: UsersIcon, to: '/users' },
|
|
632
|
+
],
|
|
633
|
+
},
|
|
634
|
+
];
|
|
635
|
+
const handleItemClick = (item) => {
|
|
636
|
+
activeItem.value = item.to || item.id;
|
|
637
|
+
};
|
|
638
|
+
return { sections, activeItem, handleItemClick };
|
|
639
|
+
},
|
|
640
|
+
template: `
|
|
641
|
+
<div class="h-screen flex">
|
|
642
|
+
<DXSidebarMenu
|
|
643
|
+
title="Компактный"
|
|
644
|
+
:sections="sections"
|
|
645
|
+
:activeItem="activeItem"
|
|
646
|
+
headerSize="sm"
|
|
647
|
+
@item-click="handleItemClick"
|
|
648
|
+
/>
|
|
649
|
+
<div class="flex-1 p-8">
|
|
650
|
+
<h2 class="text-2xl font-bold">Маленький header (sm)</h2>
|
|
651
|
+
</div>
|
|
652
|
+
</div>
|
|
653
|
+
`,
|
|
654
|
+
}),
|
|
655
|
+
};
|
|
656
|
+
|
|
657
|
+
// 12. LargeHeader - большой header
|
|
658
|
+
export const LargeHeader = {
|
|
659
|
+
render: () => ({
|
|
660
|
+
components: { DXSidebarMenu },
|
|
661
|
+
setup() {
|
|
662
|
+
const activeItem = ref('/home');
|
|
663
|
+
const sections = [
|
|
664
|
+
{
|
|
665
|
+
items: [
|
|
666
|
+
{ id: 'home', label: 'Главная', icon: HomeIcon, to: '/home' },
|
|
667
|
+
{ id: 'analytics', label: 'Аналитика', icon: ChartBarIcon, to: '/analytics' },
|
|
668
|
+
{ id: 'users', label: 'Пользователи', icon: UsersIcon, to: '/users' },
|
|
669
|
+
],
|
|
670
|
+
},
|
|
671
|
+
];
|
|
672
|
+
const handleItemClick = (item) => {
|
|
673
|
+
activeItem.value = item.to || item.id;
|
|
674
|
+
};
|
|
675
|
+
return { sections, activeItem, handleItemClick };
|
|
676
|
+
},
|
|
677
|
+
template: `
|
|
678
|
+
<div class="h-screen flex">
|
|
679
|
+
<DXSidebarMenu
|
|
680
|
+
title="Большой заголовок"
|
|
681
|
+
:sections="sections"
|
|
682
|
+
:activeItem="activeItem"
|
|
683
|
+
headerSize="lg"
|
|
684
|
+
@item-click="handleItemClick"
|
|
685
|
+
/>
|
|
686
|
+
<div class="flex-1 p-8">
|
|
687
|
+
<h2 class="text-2xl font-bold">Большой header (lg)</h2>
|
|
688
|
+
</div>
|
|
689
|
+
</div>
|
|
690
|
+
`,
|
|
691
|
+
}),
|
|
692
|
+
};
|
|
693
|
+
|
|
694
|
+
// 13. AutoHideHeader - автоматическое скрытие header
|
|
695
|
+
export const AutoHideHeader = {
|
|
696
|
+
render: () => ({
|
|
697
|
+
components: { DXSidebarMenu },
|
|
698
|
+
setup() {
|
|
699
|
+
const activeItem = ref('/home');
|
|
700
|
+
const sections = [
|
|
701
|
+
{
|
|
702
|
+
items: [
|
|
703
|
+
{ id: 'home', label: 'Главная', icon: HomeIcon, to: '/home' },
|
|
704
|
+
{ id: 'analytics', label: 'Аналитика', icon: ChartBarIcon, to: '/analytics' },
|
|
705
|
+
{ id: 'users', label: 'Пользователи', icon: UsersIcon, to: '/users' },
|
|
706
|
+
],
|
|
707
|
+
},
|
|
708
|
+
];
|
|
709
|
+
const handleItemClick = (item) => {
|
|
710
|
+
activeItem.value = item.to || item.id;
|
|
711
|
+
};
|
|
712
|
+
return { sections, activeItem, handleItemClick };
|
|
713
|
+
},
|
|
714
|
+
template: `
|
|
715
|
+
<div class="h-screen flex">
|
|
716
|
+
<DXSidebarMenu
|
|
717
|
+
:sections="sections"
|
|
718
|
+
:activeItem="activeItem"
|
|
719
|
+
:collapsible="false"
|
|
720
|
+
@item-click="handleItemClick"
|
|
721
|
+
/>
|
|
722
|
+
<div class="flex-1 p-8">
|
|
723
|
+
<h2 class="text-2xl font-bold">Header скрывается автоматически</h2>
|
|
724
|
+
<p class="text-slate-600 mt-2">Нет title, слота header и collapsible=false</p>
|
|
725
|
+
</div>
|
|
726
|
+
</div>
|
|
727
|
+
`,
|
|
728
|
+
}),
|
|
729
|
+
};
|