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,448 @@
|
|
|
1
|
+
import { ref } from 'vue';
|
|
2
|
+
import DXHeaderBar from './DXHeaderBar.vue';
|
|
3
|
+
import DXLink from '../../atoms/DXLink/DXLink.vue';
|
|
4
|
+
import DXButton from '../../atoms/DXButton/DXButton.vue';
|
|
5
|
+
import DXAvatar from '../../atoms/DXAvatar/DXAvatar.vue';
|
|
6
|
+
import DXInput from '../../molecules/DXInput/DXInput.vue';
|
|
7
|
+
import DXDropdown from '../DXDropdown/DXDropdown.vue';
|
|
8
|
+
import DXIcon from '../../atoms/DXIcon/DXIcon.vue';
|
|
9
|
+
import {
|
|
10
|
+
MagnifyingGlassIcon,
|
|
11
|
+
BellIcon,
|
|
12
|
+
Cog6ToothIcon,
|
|
13
|
+
Bars3Icon,
|
|
14
|
+
UserIcon,
|
|
15
|
+
} from '@heroicons/vue/24/outline';
|
|
16
|
+
|
|
17
|
+
export default {
|
|
18
|
+
title: 'Organisms/DXHeaderBar',
|
|
19
|
+
component: DXHeaderBar,
|
|
20
|
+
tags: ['autodocs'],
|
|
21
|
+
parameters: {
|
|
22
|
+
docs: {
|
|
23
|
+
description: {
|
|
24
|
+
component: `
|
|
25
|
+
# DXHeaderBar
|
|
26
|
+
|
|
27
|
+
Верхняя панель приложения с навигацией, поиском и действиями.
|
|
28
|
+
|
|
29
|
+
## Назначение
|
|
30
|
+
|
|
31
|
+
DXHeaderBar предоставляет стандартизированную верхнюю панель для приложений с:
|
|
32
|
+
- Логотипом и названием приложения
|
|
33
|
+
- Навигационными ссылками
|
|
34
|
+
- Поисковой строкой
|
|
35
|
+
- Действиями (уведомления, настройки, профиль)
|
|
36
|
+
- Адаптивным мобильным меню
|
|
37
|
+
|
|
38
|
+
## Архитектура
|
|
39
|
+
|
|
40
|
+
### Использует
|
|
41
|
+
- \`DXContainer\` - для ограничения ширины контента
|
|
42
|
+
- \`DXLink\` - для навигационных ссылок
|
|
43
|
+
- \`DXButton\` - для действий
|
|
44
|
+
- \`DXAvatar\` - для профиля пользователя
|
|
45
|
+
- \`DXInput\` - для поиска (через slot)
|
|
46
|
+
- \`DXDropdown\` - для меню профиля
|
|
47
|
+
|
|
48
|
+
### Используется в
|
|
49
|
+
- \`DXAppLayout\` - как верхняя панель приложения
|
|
50
|
+
- Любые приложения, требующие навигационную панель
|
|
51
|
+
|
|
52
|
+
## Внутренняя логика
|
|
53
|
+
|
|
54
|
+
### Адаптивность
|
|
55
|
+
- Desktop: показывает навигацию, поиск и действия
|
|
56
|
+
- Mobile: скрывает навигацию и поиск, показывает мобильное меню
|
|
57
|
+
|
|
58
|
+
### Позиционирование
|
|
59
|
+
- \`sticky\`: header остается видимым при скролле
|
|
60
|
+
- \`fixed\`: header зафиксирован вверху страницы
|
|
61
|
+
|
|
62
|
+
### Мобильное меню
|
|
63
|
+
- Drawer меню, открывается по клику на кнопку мобильного меню
|
|
64
|
+
- Закрывается по клику на кнопку закрытия или вне меню
|
|
65
|
+
|
|
66
|
+
## Особенности
|
|
67
|
+
|
|
68
|
+
### Slots
|
|
69
|
+
- \`logo\` - кастомный логотип
|
|
70
|
+
- \`navigation\` - навигационные ссылки (desktop)
|
|
71
|
+
- \`search\` - поисковая строка (desktop)
|
|
72
|
+
- \`actions\` - действия (desktop)
|
|
73
|
+
- \`mobile-menu\` - кнопка мобильного меню
|
|
74
|
+
- \`mobile-navigation\` - навигация для мобильного меню
|
|
75
|
+
`,
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
argTypes: {
|
|
80
|
+
logo: {
|
|
81
|
+
control: 'text',
|
|
82
|
+
description: 'URL логотипа приложения.',
|
|
83
|
+
table: {
|
|
84
|
+
type: { summary: 'string' },
|
|
85
|
+
defaultValue: { summary: 'null' },
|
|
86
|
+
category: 'Branding',
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
appName: {
|
|
90
|
+
control: 'text',
|
|
91
|
+
description: 'Название приложения.',
|
|
92
|
+
table: {
|
|
93
|
+
type: { summary: 'string' },
|
|
94
|
+
defaultValue: { summary: '' },
|
|
95
|
+
category: 'Branding',
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
sticky: {
|
|
99
|
+
control: 'boolean',
|
|
100
|
+
description: 'Sticky позиционирование (остается видимым при скролле).',
|
|
101
|
+
table: {
|
|
102
|
+
type: { summary: 'boolean' },
|
|
103
|
+
defaultValue: { summary: 'false' },
|
|
104
|
+
category: 'Layout',
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
fixed: {
|
|
108
|
+
control: 'boolean',
|
|
109
|
+
description: 'Fixed позиционирование (зафиксирован вверху).',
|
|
110
|
+
table: {
|
|
111
|
+
type: { summary: 'boolean' },
|
|
112
|
+
defaultValue: { summary: 'false' },
|
|
113
|
+
category: 'Layout',
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
height: {
|
|
117
|
+
control: 'select',
|
|
118
|
+
options: ['auto', 'sm', 'md', 'lg'],
|
|
119
|
+
description: 'Высота header.',
|
|
120
|
+
table: {
|
|
121
|
+
type: { summary: 'string' },
|
|
122
|
+
defaultValue: { summary: 'auto' },
|
|
123
|
+
category: 'Layout',
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
},
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
export const Default = {
|
|
130
|
+
args: {
|
|
131
|
+
appName: 'My Application',
|
|
132
|
+
},
|
|
133
|
+
parameters: {
|
|
134
|
+
docs: {
|
|
135
|
+
description: {
|
|
136
|
+
story: 'Базовый header с названием приложения.',
|
|
137
|
+
},
|
|
138
|
+
},
|
|
139
|
+
},
|
|
140
|
+
render: (args) => ({
|
|
141
|
+
components: { DXHeaderBar },
|
|
142
|
+
setup() {
|
|
143
|
+
return { args };
|
|
144
|
+
},
|
|
145
|
+
template: '<DXHeaderBar v-bind="args" />',
|
|
146
|
+
}),
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
export const WithLogo = {
|
|
150
|
+
args: {
|
|
151
|
+
appName: 'My Application',
|
|
152
|
+
logo: 'https://via.placeholder.com/32x32',
|
|
153
|
+
},
|
|
154
|
+
parameters: {
|
|
155
|
+
docs: {
|
|
156
|
+
description: {
|
|
157
|
+
story: 'Header с логотипом и названием приложения.',
|
|
158
|
+
},
|
|
159
|
+
},
|
|
160
|
+
},
|
|
161
|
+
render: (args) => ({
|
|
162
|
+
components: { DXHeaderBar },
|
|
163
|
+
setup() {
|
|
164
|
+
return { args };
|
|
165
|
+
},
|
|
166
|
+
template: '<DXHeaderBar v-bind="args" />',
|
|
167
|
+
}),
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
export const WithNavigation = {
|
|
171
|
+
args: {
|
|
172
|
+
appName: 'My Application',
|
|
173
|
+
logo: 'https://via.placeholder.com/32x32',
|
|
174
|
+
},
|
|
175
|
+
parameters: {
|
|
176
|
+
docs: {
|
|
177
|
+
description: {
|
|
178
|
+
story: 'Header с навигационными ссылками.',
|
|
179
|
+
},
|
|
180
|
+
},
|
|
181
|
+
},
|
|
182
|
+
render: (args) => ({
|
|
183
|
+
components: { DXHeaderBar, DXLink },
|
|
184
|
+
setup() {
|
|
185
|
+
return { args };
|
|
186
|
+
},
|
|
187
|
+
template: `
|
|
188
|
+
<DXHeaderBar v-bind="args">
|
|
189
|
+
<template #navigation>
|
|
190
|
+
<DXLink href="/dashboard" variant="ghost">Дашборд</DXLink>
|
|
191
|
+
<DXLink href="/projects" variant="ghost">Проекты</DXLink>
|
|
192
|
+
<DXLink href="/analytics" variant="ghost">Аналитика</DXLink>
|
|
193
|
+
</template>
|
|
194
|
+
</DXHeaderBar>
|
|
195
|
+
`,
|
|
196
|
+
}),
|
|
197
|
+
};
|
|
198
|
+
|
|
199
|
+
export const WithSearch = {
|
|
200
|
+
args: {
|
|
201
|
+
appName: 'My Application',
|
|
202
|
+
logo: 'https://via.placeholder.com/32x32',
|
|
203
|
+
},
|
|
204
|
+
parameters: {
|
|
205
|
+
docs: {
|
|
206
|
+
description: {
|
|
207
|
+
story: 'Header с поисковой строкой.',
|
|
208
|
+
},
|
|
209
|
+
},
|
|
210
|
+
},
|
|
211
|
+
render: (args) => ({
|
|
212
|
+
components: { DXHeaderBar, DXInput, DXIcon },
|
|
213
|
+
setup() {
|
|
214
|
+
const searchQuery = ref('');
|
|
215
|
+
return { args, searchQuery, MagnifyingGlassIcon };
|
|
216
|
+
},
|
|
217
|
+
template: `
|
|
218
|
+
<DXHeaderBar v-bind="args">
|
|
219
|
+
<template #search>
|
|
220
|
+
<DXInput
|
|
221
|
+
v-model="searchQuery"
|
|
222
|
+
placeholder="Поиск..."
|
|
223
|
+
size="sm"
|
|
224
|
+
>
|
|
225
|
+
<template #prefix>
|
|
226
|
+
<DXIcon :icon="MagnifyingGlassIcon" size="sm" class="text-slate-400" />
|
|
227
|
+
</template>
|
|
228
|
+
</DXInput>
|
|
229
|
+
</template>
|
|
230
|
+
</DXHeaderBar>
|
|
231
|
+
`,
|
|
232
|
+
}),
|
|
233
|
+
};
|
|
234
|
+
|
|
235
|
+
export const WithActions = {
|
|
236
|
+
args: {
|
|
237
|
+
appName: 'My Application',
|
|
238
|
+
logo: 'https://via.placeholder.com/32x32',
|
|
239
|
+
},
|
|
240
|
+
parameters: {
|
|
241
|
+
docs: {
|
|
242
|
+
description: {
|
|
243
|
+
story: 'Header с действиями (уведомления, настройки, профиль).',
|
|
244
|
+
},
|
|
245
|
+
},
|
|
246
|
+
},
|
|
247
|
+
render: (args) => ({
|
|
248
|
+
components: { DXHeaderBar, DXButton, DXAvatar, DXDropdown, DXIcon },
|
|
249
|
+
setup() {
|
|
250
|
+
const unreadCount = ref(5);
|
|
251
|
+
return {
|
|
252
|
+
args,
|
|
253
|
+
unreadCount,
|
|
254
|
+
BellIcon,
|
|
255
|
+
Cog6ToothIcon,
|
|
256
|
+
UserIcon,
|
|
257
|
+
};
|
|
258
|
+
},
|
|
259
|
+
template: `
|
|
260
|
+
<DXHeaderBar v-bind="args">
|
|
261
|
+
<template #navigation>
|
|
262
|
+
<DXLink href="/dashboard" variant="ghost">Дашборд</DXLink>
|
|
263
|
+
<DXLink href="/projects" variant="ghost">Проекты</DXLink>
|
|
264
|
+
</template>
|
|
265
|
+
<template #actions>
|
|
266
|
+
<DXButton variant="ghost" size="sm">
|
|
267
|
+
<template #icon>
|
|
268
|
+
<DXIcon :icon="BellIcon" size="md" />
|
|
269
|
+
</template>
|
|
270
|
+
</DXButton>
|
|
271
|
+
<DXButton variant="ghost" size="sm">
|
|
272
|
+
<template #icon>
|
|
273
|
+
<DXIcon :icon="Cog6ToothIcon" size="md" />
|
|
274
|
+
</template>
|
|
275
|
+
</DXButton>
|
|
276
|
+
<DXDropdown>
|
|
277
|
+
<template #trigger>
|
|
278
|
+
<DXAvatar
|
|
279
|
+
src="https://via.placeholder.com/40x40"
|
|
280
|
+
size="sm"
|
|
281
|
+
/>
|
|
282
|
+
</template>
|
|
283
|
+
<div class="p-2">
|
|
284
|
+
<div class="px-3 py-2 text-sm text-slate-700">Профиль</div>
|
|
285
|
+
<div class="px-3 py-2 text-sm text-slate-700">Настройки</div>
|
|
286
|
+
<div class="px-3 py-2 text-sm text-slate-700">Выйти</div>
|
|
287
|
+
</div>
|
|
288
|
+
</DXDropdown>
|
|
289
|
+
</template>
|
|
290
|
+
</DXHeaderBar>
|
|
291
|
+
`,
|
|
292
|
+
}),
|
|
293
|
+
};
|
|
294
|
+
|
|
295
|
+
export const FullFeatured = {
|
|
296
|
+
args: {
|
|
297
|
+
appName: 'My Application',
|
|
298
|
+
logo: 'https://via.placeholder.com/32x32',
|
|
299
|
+
sticky: true,
|
|
300
|
+
},
|
|
301
|
+
parameters: {
|
|
302
|
+
docs: {
|
|
303
|
+
description: {
|
|
304
|
+
story: 'Полнофункциональный header с навигацией, поиском, действиями и мобильным меню.',
|
|
305
|
+
},
|
|
306
|
+
},
|
|
307
|
+
},
|
|
308
|
+
render: (args) => ({
|
|
309
|
+
components: { DXHeaderBar, DXLink, DXInput, DXButton, DXAvatar, DXDropdown, DXIcon },
|
|
310
|
+
setup() {
|
|
311
|
+
const searchQuery = ref('');
|
|
312
|
+
const headerBarRef = ref(null);
|
|
313
|
+
const showMobileMenu = ref(false);
|
|
314
|
+
|
|
315
|
+
const toggleMobileMenu = () => {
|
|
316
|
+
showMobileMenu.value = !showMobileMenu.value;
|
|
317
|
+
if (headerBarRef.value) {
|
|
318
|
+
if (showMobileMenu.value) {
|
|
319
|
+
headerBarRef.value.openMobileMenu();
|
|
320
|
+
} else {
|
|
321
|
+
headerBarRef.value.closeMobileMenu();
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
};
|
|
325
|
+
|
|
326
|
+
return {
|
|
327
|
+
args,
|
|
328
|
+
searchQuery,
|
|
329
|
+
headerBarRef,
|
|
330
|
+
showMobileMenu,
|
|
331
|
+
toggleMobileMenu,
|
|
332
|
+
MagnifyingGlassIcon,
|
|
333
|
+
BellIcon,
|
|
334
|
+
Bars3Icon,
|
|
335
|
+
};
|
|
336
|
+
},
|
|
337
|
+
template: `
|
|
338
|
+
<DXHeaderBar ref="headerBarRef" v-bind="args">
|
|
339
|
+
<template #navigation>
|
|
340
|
+
<DXLink href="/dashboard" variant="ghost">Дашборд</DXLink>
|
|
341
|
+
<DXLink href="/projects" variant="ghost">Проекты</DXLink>
|
|
342
|
+
<DXLink href="/analytics" variant="ghost">Аналитика</DXLink>
|
|
343
|
+
</template>
|
|
344
|
+
<template #search>
|
|
345
|
+
<DXInput
|
|
346
|
+
v-model="searchQuery"
|
|
347
|
+
placeholder="Поиск..."
|
|
348
|
+
size="sm"
|
|
349
|
+
>
|
|
350
|
+
<template #prefix>
|
|
351
|
+
<DXIcon :icon="MagnifyingGlassIcon" size="sm" class="text-slate-400" />
|
|
352
|
+
</template>
|
|
353
|
+
</DXInput>
|
|
354
|
+
</template>
|
|
355
|
+
<template #actions>
|
|
356
|
+
<DXButton variant="ghost" size="sm">
|
|
357
|
+
<template #icon>
|
|
358
|
+
<DXIcon :icon="BellIcon" size="md" />
|
|
359
|
+
</template>
|
|
360
|
+
</DXButton>
|
|
361
|
+
<DXDropdown>
|
|
362
|
+
<template #trigger>
|
|
363
|
+
<DXAvatar
|
|
364
|
+
src="https://via.placeholder.com/40x40"
|
|
365
|
+
size="sm"
|
|
366
|
+
/>
|
|
367
|
+
</template>
|
|
368
|
+
<div class="p-2">
|
|
369
|
+
<div class="px-3 py-2 text-sm text-slate-700">Профиль</div>
|
|
370
|
+
<div class="px-3 py-2 text-sm text-slate-700">Настройки</div>
|
|
371
|
+
<div class="px-3 py-2 text-sm text-slate-700">Выйти</div>
|
|
372
|
+
</div>
|
|
373
|
+
</DXDropdown>
|
|
374
|
+
</template>
|
|
375
|
+
<template #mobile-menu>
|
|
376
|
+
<DXButton variant="ghost" size="sm" @click="toggleMobileMenu">
|
|
377
|
+
<template #icon>
|
|
378
|
+
<DXIcon :icon="Bars3Icon" size="md" />
|
|
379
|
+
</template>
|
|
380
|
+
</DXButton>
|
|
381
|
+
</template>
|
|
382
|
+
<template #mobile-navigation>
|
|
383
|
+
<DXLink href="/dashboard" variant="ghost" class="block py-2">Дашборд</DXLink>
|
|
384
|
+
<DXLink href="/projects" variant="ghost" class="block py-2">Проекты</DXLink>
|
|
385
|
+
<DXLink href="/analytics" variant="ghost" class="block py-2">Аналитика</DXLink>
|
|
386
|
+
</template>
|
|
387
|
+
</DXHeaderBar>
|
|
388
|
+
`,
|
|
389
|
+
}),
|
|
390
|
+
};
|
|
391
|
+
|
|
392
|
+
export const Sticky = {
|
|
393
|
+
args: {
|
|
394
|
+
appName: 'My Application',
|
|
395
|
+
logo: 'https://via.placeholder.com/32x32',
|
|
396
|
+
sticky: true,
|
|
397
|
+
},
|
|
398
|
+
parameters: {
|
|
399
|
+
docs: {
|
|
400
|
+
description: {
|
|
401
|
+
story: 'Sticky header, который остается видимым при скролле страницы.',
|
|
402
|
+
},
|
|
403
|
+
},
|
|
404
|
+
},
|
|
405
|
+
render: (args) => ({
|
|
406
|
+
components: { DXHeaderBar, DXLink },
|
|
407
|
+
setup() {
|
|
408
|
+
return { args };
|
|
409
|
+
},
|
|
410
|
+
template: `
|
|
411
|
+
<div>
|
|
412
|
+
<DXHeaderBar v-bind="args">
|
|
413
|
+
<template #navigation>
|
|
414
|
+
<DXLink href="/dashboard" variant="ghost">Дашборд</DXLink>
|
|
415
|
+
<DXLink href="/projects" variant="ghost">Проекты</DXLink>
|
|
416
|
+
</template>
|
|
417
|
+
</DXHeaderBar>
|
|
418
|
+
<div class="h-screen bg-slate-50 p-8">
|
|
419
|
+
<p class="text-slate-600">Прокрутите страницу вниз, чтобы увидеть sticky header</p>
|
|
420
|
+
</div>
|
|
421
|
+
</div>
|
|
422
|
+
`,
|
|
423
|
+
}),
|
|
424
|
+
};
|
|
425
|
+
|
|
426
|
+
export const Sizes = {
|
|
427
|
+
parameters: {
|
|
428
|
+
docs: {
|
|
429
|
+
description: {
|
|
430
|
+
story: 'Различные размеры header (высота).',
|
|
431
|
+
},
|
|
432
|
+
},
|
|
433
|
+
},
|
|
434
|
+
render: () => ({
|
|
435
|
+
components: { DXHeaderBar },
|
|
436
|
+
setup() {
|
|
437
|
+
return {};
|
|
438
|
+
},
|
|
439
|
+
template: `
|
|
440
|
+
<div class="space-y-4">
|
|
441
|
+
<DXHeaderBar app-name="Small" height="sm" />
|
|
442
|
+
<DXHeaderBar app-name="Medium" height="md" />
|
|
443
|
+
<DXHeaderBar app-name="Large" height="lg" />
|
|
444
|
+
</div>
|
|
445
|
+
`,
|
|
446
|
+
}),
|
|
447
|
+
};
|
|
448
|
+
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<header
|
|
3
|
+
:class="headerClasses"
|
|
4
|
+
data-component="DXHeaderBar"
|
|
5
|
+
:data-sticky="sticky"
|
|
6
|
+
:data-fixed="fixed"
|
|
7
|
+
>
|
|
8
|
+
<DXContainer :size="containerSize" :padding="containerPadding">
|
|
9
|
+
<div class="flex items-center justify-between gap-4 h-full">
|
|
10
|
+
<!-- Логотип и название -->
|
|
11
|
+
<div class="flex items-center gap-3 flex-shrink-0">
|
|
12
|
+
<DXLink
|
|
13
|
+
v-if="logo || appName"
|
|
14
|
+
:to="logoLink"
|
|
15
|
+
:href="logoHref"
|
|
16
|
+
variant="ghost"
|
|
17
|
+
class="flex items-center gap-3 hover:opacity-80 transition-opacity"
|
|
18
|
+
>
|
|
19
|
+
<img
|
|
20
|
+
v-if="logo"
|
|
21
|
+
:src="logo"
|
|
22
|
+
:alt="appName || 'Logo'"
|
|
23
|
+
class="h-8 w-auto object-contain"
|
|
24
|
+
/>
|
|
25
|
+
<h1 v-if="appName" class="text-lg font-semibold text-slate-900">
|
|
26
|
+
{{ appName }}
|
|
27
|
+
</h1>
|
|
28
|
+
</DXLink>
|
|
29
|
+
<slot name="logo" />
|
|
30
|
+
</div>
|
|
31
|
+
|
|
32
|
+
<!-- Навигация (desktop) -->
|
|
33
|
+
<nav
|
|
34
|
+
v-if="$slots.navigation"
|
|
35
|
+
class="hidden md:flex items-center gap-1 flex-1"
|
|
36
|
+
>
|
|
37
|
+
<slot name="navigation" />
|
|
38
|
+
</nav>
|
|
39
|
+
|
|
40
|
+
<!-- Поиск (desktop) -->
|
|
41
|
+
<div
|
|
42
|
+
v-if="$slots.search"
|
|
43
|
+
class="hidden md:flex items-center flex-1 max-w-md mx-4"
|
|
44
|
+
>
|
|
45
|
+
<slot name="search" />
|
|
46
|
+
</div>
|
|
47
|
+
|
|
48
|
+
<!-- Действия (desktop) -->
|
|
49
|
+
<div
|
|
50
|
+
v-if="$slots.actions"
|
|
51
|
+
class="hidden md:flex items-center gap-2 flex-shrink-0"
|
|
52
|
+
>
|
|
53
|
+
<slot name="actions" />
|
|
54
|
+
</div>
|
|
55
|
+
|
|
56
|
+
<!-- Мобильное меню -->
|
|
57
|
+
<div class="flex md:hidden items-center gap-2">
|
|
58
|
+
<slot name="mobile-menu" />
|
|
59
|
+
</div>
|
|
60
|
+
</div>
|
|
61
|
+
</DXContainer>
|
|
62
|
+
|
|
63
|
+
<!-- Мобильная навигация (drawer) -->
|
|
64
|
+
<Transition v-if="showMobileMenu && $slots['mobile-navigation']">
|
|
65
|
+
<div
|
|
66
|
+
class="md:hidden fixed inset-0 z-50 bg-white"
|
|
67
|
+
:class="mobileMenuClasses"
|
|
68
|
+
>
|
|
69
|
+
<div class="p-4">
|
|
70
|
+
<div class="flex items-center justify-between mb-4">
|
|
71
|
+
<h2 v-if="appName" class="text-lg font-semibold text-slate-900">
|
|
72
|
+
{{ appName }}
|
|
73
|
+
</h2>
|
|
74
|
+
<DXButton
|
|
75
|
+
variant="ghost"
|
|
76
|
+
size="sm"
|
|
77
|
+
@click="closeMobileMenu"
|
|
78
|
+
>
|
|
79
|
+
<template #icon>
|
|
80
|
+
<DXIcon :icon="XMarkIcon" size="md" />
|
|
81
|
+
</template>
|
|
82
|
+
</DXButton>
|
|
83
|
+
</div>
|
|
84
|
+
<nav class="space-y-2">
|
|
85
|
+
<slot name="mobile-navigation" />
|
|
86
|
+
</nav>
|
|
87
|
+
</div>
|
|
88
|
+
</div>
|
|
89
|
+
</Transition>
|
|
90
|
+
</header>
|
|
91
|
+
</template>
|
|
92
|
+
|
|
93
|
+
<script setup>
|
|
94
|
+
import { ref, computed } from "vue";
|
|
95
|
+
import { useClassComposition } from "@/composables/useClassComposition";
|
|
96
|
+
import DXContainer from "../../layout/DXContainer/DXContainer.vue";
|
|
97
|
+
import DXLink from "../../atoms/DXLink/DXLink.vue";
|
|
98
|
+
import DXButton from "../../atoms/DXButton/DXButton.vue";
|
|
99
|
+
import DXIcon from "../../atoms/DXIcon/DXIcon.vue";
|
|
100
|
+
import { XMarkIcon } from "@heroicons/vue/24/outline";
|
|
101
|
+
|
|
102
|
+
const props = defineProps({
|
|
103
|
+
/** URL логотипа */
|
|
104
|
+
logo: { type: String, default: null },
|
|
105
|
+
/** Название приложения */
|
|
106
|
+
appName: { type: String, default: "" },
|
|
107
|
+
/** Ссылка для логотипа (Vue Router) */
|
|
108
|
+
logoLink: { type: [String, Object], default: null },
|
|
109
|
+
/** Ссылка для логотипа (обычная ссылка) */
|
|
110
|
+
logoHref: { type: String, default: null },
|
|
111
|
+
/** Sticky позиционирование */
|
|
112
|
+
sticky: { type: Boolean, default: false },
|
|
113
|
+
/** Fixed позиционирование */
|
|
114
|
+
fixed: { type: Boolean, default: false },
|
|
115
|
+
/** Размер контейнера: sm | md | lg | xl | 2xl | full */
|
|
116
|
+
containerSize: { type: String, default: "lg" },
|
|
117
|
+
/** Горизонтальные отступы контейнера: none | xs | sm | md | lg | xl */
|
|
118
|
+
containerPadding: { type: String, default: "md" },
|
|
119
|
+
/** Высота header */
|
|
120
|
+
height: { type: String, default: "auto", validator: (v) => ["auto", "sm", "md", "lg"].includes(v) },
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
const emit = defineEmits(["mobile-menu-toggle"]);
|
|
124
|
+
|
|
125
|
+
const showMobileMenu = ref(false);
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Классы для header
|
|
129
|
+
*
|
|
130
|
+
* @description
|
|
131
|
+
* Вычисляет классы для header компонента, включая позиционирование (sticky/fixed),
|
|
132
|
+
* высоту и фон.
|
|
133
|
+
*
|
|
134
|
+
* @returns {Array} Массив классов для header
|
|
135
|
+
*/
|
|
136
|
+
const headerClasses = computed(() =>
|
|
137
|
+
useClassComposition(
|
|
138
|
+
"w-full bg-white border-b border-slate-200",
|
|
139
|
+
{
|
|
140
|
+
"sticky top-0 z-40": props.sticky && !props.fixed,
|
|
141
|
+
"fixed top-0 left-0 right-0 z-40": props.fixed,
|
|
142
|
+
"h-14": props.height === "sm",
|
|
143
|
+
"h-16": props.height === "md",
|
|
144
|
+
"h-20": props.height === "lg",
|
|
145
|
+
}
|
|
146
|
+
)
|
|
147
|
+
);
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Классы для мобильного меню
|
|
151
|
+
*
|
|
152
|
+
* @description
|
|
153
|
+
* Вычисляет классы для мобильного меню drawer.
|
|
154
|
+
*
|
|
155
|
+
* @returns {Array} Массив классов для мобильного меню
|
|
156
|
+
*/
|
|
157
|
+
const mobileMenuClasses = computed(() =>
|
|
158
|
+
useClassComposition("overflow-y-auto")
|
|
159
|
+
);
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* Закрытие мобильного меню
|
|
163
|
+
*
|
|
164
|
+
* @description
|
|
165
|
+
* Закрывает мобильное меню и эмитит событие.
|
|
166
|
+
*/
|
|
167
|
+
function closeMobileMenu() {
|
|
168
|
+
showMobileMenu.value = false;
|
|
169
|
+
emit("mobile-menu-toggle", false);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Открытие мобильного меню
|
|
174
|
+
*
|
|
175
|
+
* @description
|
|
176
|
+
* Открывает мобильное меню и эмитит событие.
|
|
177
|
+
*/
|
|
178
|
+
function openMobileMenu() {
|
|
179
|
+
showMobileMenu.value = true;
|
|
180
|
+
emit("mobile-menu-toggle", true);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
// Экспортируем методы для использования в родительском компоненте
|
|
184
|
+
defineExpose({
|
|
185
|
+
openMobileMenu,
|
|
186
|
+
closeMobileMenu,
|
|
187
|
+
showMobileMenu,
|
|
188
|
+
});
|
|
189
|
+
</script>
|
|
190
|
+
|