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,459 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
:style="{ maxHeight: height }"
|
|
4
|
+
:class="['border border-slate-200 rounded-2xl overflow-auto', height && 'relative']"
|
|
5
|
+
data-component="DXBaseTable"
|
|
6
|
+
>
|
|
7
|
+
<table class="min-w-full divide-y divide-slate-200">
|
|
8
|
+
<!-- Header -->
|
|
9
|
+
<thead :class="['bg-slate-50', stickyHeader && height && 'sticky top-0 z-10']">
|
|
10
|
+
<tr>
|
|
11
|
+
<!-- Checkbox Column -->
|
|
12
|
+
<th v-if="selectable" class="px-4 py-3 w-12">
|
|
13
|
+
<DXCheckbox
|
|
14
|
+
:checked="allSelected"
|
|
15
|
+
:indeterminate="someSelected"
|
|
16
|
+
@change="handleSelectAll"
|
|
17
|
+
:size="size"
|
|
18
|
+
/>
|
|
19
|
+
</th>
|
|
20
|
+
|
|
21
|
+
<!-- Data Columns -->
|
|
22
|
+
<th
|
|
23
|
+
v-for="col in columns"
|
|
24
|
+
:key="col.key"
|
|
25
|
+
:style="col.width && { width: col.width }"
|
|
26
|
+
:class="[
|
|
27
|
+
'px-4 py-3 text-left text-xs font-semibold text-slate-600 uppercase tracking-wide',
|
|
28
|
+
col.sortable !== false && 'cursor-pointer hover:bg-slate-100',
|
|
29
|
+
]"
|
|
30
|
+
@click="col.sortable !== false && handleSort(col.key)"
|
|
31
|
+
>
|
|
32
|
+
<div class="flex items-center gap-2">
|
|
33
|
+
<span>{{ col.label }}</span>
|
|
34
|
+
<DXIcon
|
|
35
|
+
v-if="sortBy === col.key"
|
|
36
|
+
:icon="sortDirection === 'asc' ? ChevronUpIcon : ChevronDownIcon"
|
|
37
|
+
size="xs"
|
|
38
|
+
class="text-slate-500"
|
|
39
|
+
/>
|
|
40
|
+
<!-- Filter Icon -->
|
|
41
|
+
<div
|
|
42
|
+
v-if="filterable && col.filterable !== false"
|
|
43
|
+
class="flex items-center"
|
|
44
|
+
@click.stop
|
|
45
|
+
>
|
|
46
|
+
<DXDropdown
|
|
47
|
+
position="bottom"
|
|
48
|
+
width="auto"
|
|
49
|
+
variant="minimal"
|
|
50
|
+
:showChevron="false"
|
|
51
|
+
>
|
|
52
|
+
<template #trigger>
|
|
53
|
+
<button
|
|
54
|
+
type="button"
|
|
55
|
+
class="p-1 rounded hover:bg-slate-100 transition-colors"
|
|
56
|
+
:class="{
|
|
57
|
+
'text-blue-600': filters[col.key],
|
|
58
|
+
'text-slate-400': !filters[col.key]
|
|
59
|
+
}"
|
|
60
|
+
@click.stop
|
|
61
|
+
>
|
|
62
|
+
<DXIcon
|
|
63
|
+
:icon="FunnelIcon"
|
|
64
|
+
size="xs"
|
|
65
|
+
:class="filters[col.key] ? 'text-blue-600' : 'text-slate-400'"
|
|
66
|
+
/>
|
|
67
|
+
</button>
|
|
68
|
+
</template>
|
|
69
|
+
<div class="p-2 min-w-[200px]">
|
|
70
|
+
<DXSearchSelect
|
|
71
|
+
:modelValue="filters[col.key] || ''"
|
|
72
|
+
@update:modelValue="handleFilter(col.key, $event)"
|
|
73
|
+
:options="props.getFilterOptions ? props.getFilterOptions(col) : []"
|
|
74
|
+
:size="size"
|
|
75
|
+
placeholder="Все"
|
|
76
|
+
:searchPlaceholder="`Поиск ${col.label.toLowerCase()}...`"
|
|
77
|
+
/>
|
|
78
|
+
</div>
|
|
79
|
+
</DXDropdown>
|
|
80
|
+
</div>
|
|
81
|
+
</div>
|
|
82
|
+
</th>
|
|
83
|
+
|
|
84
|
+
<!-- Actions Column -->
|
|
85
|
+
<th v-if="actions" class="px-4 py-3 w-20 text-right">
|
|
86
|
+
<span class="text-xs font-semibold text-slate-600 uppercase tracking-wide">
|
|
87
|
+
Действия
|
|
88
|
+
</span>
|
|
89
|
+
</th>
|
|
90
|
+
</tr>
|
|
91
|
+
</thead>
|
|
92
|
+
|
|
93
|
+
<!-- Body -->
|
|
94
|
+
<tbody class="divide-y divide-slate-200 bg-white">
|
|
95
|
+
<!-- Loading State -->
|
|
96
|
+
<tr v-if="loading">
|
|
97
|
+
<td :colspan="totalColumns" class="text-center py-12">
|
|
98
|
+
<DXLoader size="lg" />
|
|
99
|
+
<p class="mt-2 text-sm text-slate-500">Загрузка данных...</p>
|
|
100
|
+
</td>
|
|
101
|
+
</tr>
|
|
102
|
+
|
|
103
|
+
<!-- Empty State -->
|
|
104
|
+
<tr v-else-if="data.length === 0">
|
|
105
|
+
<td :colspan="totalColumns" class="text-center py-12">
|
|
106
|
+
<slot name="empty">
|
|
107
|
+
<div class="text-slate-500">
|
|
108
|
+
<p class="text-sm">Нет данных для отображения</p>
|
|
109
|
+
</div>
|
|
110
|
+
</slot>
|
|
111
|
+
</td>
|
|
112
|
+
</tr>
|
|
113
|
+
|
|
114
|
+
<!-- Data Rows -->
|
|
115
|
+
<template v-else>
|
|
116
|
+
<!-- Grouped Rows -->
|
|
117
|
+
<template v-if="groupBy">
|
|
118
|
+
<template v-for="(group, groupKey) in groupedData" :key="groupKey">
|
|
119
|
+
<tr class="bg-slate-100">
|
|
120
|
+
<td :colspan="totalColumns" class="px-4 py-2 font-semibold text-slate-700">
|
|
121
|
+
{{ groupKey }} ({{ group.length }})
|
|
122
|
+
</td>
|
|
123
|
+
</tr>
|
|
124
|
+
<tr
|
|
125
|
+
v-for="row in group"
|
|
126
|
+
:key="row.id"
|
|
127
|
+
:class="[
|
|
128
|
+
hoverable && 'hover:bg-slate-50',
|
|
129
|
+
striped && 'even:bg-slate-50',
|
|
130
|
+
isRowSelected(row.id) && 'bg-blue-50',
|
|
131
|
+
'transition-colors'
|
|
132
|
+
]"
|
|
133
|
+
@click="$emit('row-click', row)"
|
|
134
|
+
>
|
|
135
|
+
<td v-if="selectable" class="px-4 py-3">
|
|
136
|
+
<DXCheckbox
|
|
137
|
+
:checked="isRowSelected(row.id)"
|
|
138
|
+
@change="handleRowSelect(row.id)"
|
|
139
|
+
:size="size"
|
|
140
|
+
@click.stop
|
|
141
|
+
/>
|
|
142
|
+
</td>
|
|
143
|
+
|
|
144
|
+
<td
|
|
145
|
+
v-for="col in columns"
|
|
146
|
+
:key="`${row.id}-${col.key}`"
|
|
147
|
+
:class="[
|
|
148
|
+
'px-4 py-3 text-sm text-slate-700',
|
|
149
|
+
col.align === 'center' && 'text-center',
|
|
150
|
+
col.align === 'right' && 'text-right',
|
|
151
|
+
dense && 'py-2'
|
|
152
|
+
]"
|
|
153
|
+
>
|
|
154
|
+
<slot :name="`cell-${col.key}`" :row="row" :value="row[col.key]" :column="col">
|
|
155
|
+
{{ formatCell(row[col.key], col) }}
|
|
156
|
+
</slot>
|
|
157
|
+
</td>
|
|
158
|
+
|
|
159
|
+
<td v-if="actions" class="px-4 py-3 text-right">
|
|
160
|
+
<div class="flex justify-end">
|
|
161
|
+
<slot name="actions" :row="row">
|
|
162
|
+
<DXDropdown position="right" width="auto">
|
|
163
|
+
<template #trigger>
|
|
164
|
+
<DXIcon :icon="EllipsisVerticalIcon" :size="size" class="cursor-pointer" />
|
|
165
|
+
</template>
|
|
166
|
+
<DXDropdownItem :icon="PencilIcon" @click="$emit('edit', row)">
|
|
167
|
+
Редактировать
|
|
168
|
+
</DXDropdownItem>
|
|
169
|
+
<DXDropdownDivider />
|
|
170
|
+
<DXDropdownItem :icon="TrashIcon" variant="danger" @click="$emit('delete', row)">
|
|
171
|
+
Удалить
|
|
172
|
+
</DXDropdownItem>
|
|
173
|
+
</DXDropdown>
|
|
174
|
+
</slot>
|
|
175
|
+
</div>
|
|
176
|
+
</td>
|
|
177
|
+
</tr>
|
|
178
|
+
</template>
|
|
179
|
+
</template>
|
|
180
|
+
|
|
181
|
+
<!-- Regular Rows -->
|
|
182
|
+
<tr
|
|
183
|
+
v-else
|
|
184
|
+
v-for="row in data"
|
|
185
|
+
:key="row.id"
|
|
186
|
+
:class="[
|
|
187
|
+
hoverable && 'hover:bg-slate-50 cursor-pointer',
|
|
188
|
+
striped && 'even:bg-slate-50',
|
|
189
|
+
isRowSelected(row.id) && 'bg-blue-50',
|
|
190
|
+
'transition-colors'
|
|
191
|
+
]"
|
|
192
|
+
@click="$emit('row-click', row)"
|
|
193
|
+
>
|
|
194
|
+
<td v-if="selectable" class="px-4 py-3">
|
|
195
|
+
<DXCheckbox
|
|
196
|
+
:checked="isRowSelected(row.id)"
|
|
197
|
+
@change="handleRowSelect(row.id)"
|
|
198
|
+
:size="size"
|
|
199
|
+
@click.stop
|
|
200
|
+
/>
|
|
201
|
+
</td>
|
|
202
|
+
|
|
203
|
+
<td
|
|
204
|
+
v-for="col in columns"
|
|
205
|
+
:key="`${row.id}-${col.key}`"
|
|
206
|
+
:class="[
|
|
207
|
+
'px-4 py-3 text-sm text-slate-700',
|
|
208
|
+
col.align === 'center' && 'text-center',
|
|
209
|
+
col.align === 'right' && 'text-right',
|
|
210
|
+
dense && 'py-2'
|
|
211
|
+
]"
|
|
212
|
+
>
|
|
213
|
+
<slot :name="`cell-${col.key}`" :row="row" :value="row[col.key]" :column="col">
|
|
214
|
+
{{ formatCell(row[col.key], col) }}
|
|
215
|
+
</slot>
|
|
216
|
+
</td>
|
|
217
|
+
|
|
218
|
+
<td v-if="actions" class="px-4 py-3 text-right">
|
|
219
|
+
<div class="flex justify-end">
|
|
220
|
+
<slot name="actions" :row="row">
|
|
221
|
+
<DXDropdown position="right" width="auto">
|
|
222
|
+
<template #trigger>
|
|
223
|
+
<DXIcon :icon="EllipsisVerticalIcon" :size="size" class="cursor-pointer" />
|
|
224
|
+
</template>
|
|
225
|
+
<DXDropdownItem :icon="PencilIcon" @click="$emit('edit', row)">
|
|
226
|
+
Редактировать
|
|
227
|
+
</DXDropdownItem>
|
|
228
|
+
<DXDropdownDivider />
|
|
229
|
+
<DXDropdownItem :icon="TrashIcon" variant="danger" @click="$emit('delete', row)">
|
|
230
|
+
Удалить
|
|
231
|
+
</DXDropdownItem>
|
|
232
|
+
</DXDropdown>
|
|
233
|
+
</slot>
|
|
234
|
+
</div>
|
|
235
|
+
</td>
|
|
236
|
+
</tr>
|
|
237
|
+
</template>
|
|
238
|
+
</tbody>
|
|
239
|
+
</table>
|
|
240
|
+
</div>
|
|
241
|
+
</template>
|
|
242
|
+
|
|
243
|
+
<script setup>
|
|
244
|
+
import { computed } from 'vue';
|
|
245
|
+
import {
|
|
246
|
+
ChevronUpIcon,
|
|
247
|
+
ChevronDownIcon,
|
|
248
|
+
EllipsisVerticalIcon,
|
|
249
|
+
PencilIcon,
|
|
250
|
+
TrashIcon,
|
|
251
|
+
FunnelIcon,
|
|
252
|
+
} from '@heroicons/vue/24/outline';
|
|
253
|
+
|
|
254
|
+
// Components
|
|
255
|
+
import DXIcon from '../../atoms/DXIcon/DXIcon.vue';
|
|
256
|
+
import DXCheckbox from '../../atoms/DXCheckbox/DXCheckbox.vue';
|
|
257
|
+
import DXDropdown from '../../organisms/DXDropdown/DXDropdown.vue';
|
|
258
|
+
import DXDropdownItem from '../../atoms/DXDropdownItem/DXDropdownItem.vue';
|
|
259
|
+
import DXDropdownDivider from '../DXDropdownDivider/DXDropdownDivider.vue';
|
|
260
|
+
import DXLoader from '../../atoms/DXLoader/DXLoader.vue';
|
|
261
|
+
import DXSearchSelect from '../../molecules/DXSearchSelect/DXSearchSelect.vue';
|
|
262
|
+
|
|
263
|
+
const props = defineProps({
|
|
264
|
+
// Data
|
|
265
|
+
columns: {
|
|
266
|
+
type: Array,
|
|
267
|
+
required: true,
|
|
268
|
+
// [{ key, label, sortable, width, align, format }]
|
|
269
|
+
},
|
|
270
|
+
data: {
|
|
271
|
+
type: Array,
|
|
272
|
+
default: () => [],
|
|
273
|
+
},
|
|
274
|
+
|
|
275
|
+
// Sorting (controlled)
|
|
276
|
+
sortBy: {
|
|
277
|
+
type: String,
|
|
278
|
+
default: '',
|
|
279
|
+
},
|
|
280
|
+
sortDirection: {
|
|
281
|
+
type: String,
|
|
282
|
+
default: 'asc',
|
|
283
|
+
validator: (v) => ['asc', 'desc'].includes(v),
|
|
284
|
+
},
|
|
285
|
+
|
|
286
|
+
// Selection (controlled)
|
|
287
|
+
selectable: {
|
|
288
|
+
type: Boolean,
|
|
289
|
+
default: false,
|
|
290
|
+
},
|
|
291
|
+
selectedRows: {
|
|
292
|
+
type: Array,
|
|
293
|
+
default: () => [],
|
|
294
|
+
},
|
|
295
|
+
|
|
296
|
+
// Actions
|
|
297
|
+
actions: {
|
|
298
|
+
type: Boolean,
|
|
299
|
+
default: false,
|
|
300
|
+
},
|
|
301
|
+
|
|
302
|
+
// Filtering
|
|
303
|
+
filterable: {
|
|
304
|
+
type: Boolean,
|
|
305
|
+
default: false,
|
|
306
|
+
},
|
|
307
|
+
filters: {
|
|
308
|
+
type: Object,
|
|
309
|
+
default: () => ({}),
|
|
310
|
+
},
|
|
311
|
+
getFilterOptions: {
|
|
312
|
+
type: Function,
|
|
313
|
+
default: null,
|
|
314
|
+
},
|
|
315
|
+
|
|
316
|
+
// Grouping
|
|
317
|
+
groupBy: {
|
|
318
|
+
type: String,
|
|
319
|
+
},
|
|
320
|
+
|
|
321
|
+
// UI
|
|
322
|
+
size: {
|
|
323
|
+
type: String,
|
|
324
|
+
default: 'md',
|
|
325
|
+
validator: (v) => ['sm', 'md', 'lg'].includes(v),
|
|
326
|
+
},
|
|
327
|
+
height: {
|
|
328
|
+
type: String,
|
|
329
|
+
},
|
|
330
|
+
stickyHeader: {
|
|
331
|
+
type: Boolean,
|
|
332
|
+
default: true,
|
|
333
|
+
},
|
|
334
|
+
striped: {
|
|
335
|
+
type: Boolean,
|
|
336
|
+
default: false,
|
|
337
|
+
},
|
|
338
|
+
bordered: {
|
|
339
|
+
type: Boolean,
|
|
340
|
+
default: false,
|
|
341
|
+
},
|
|
342
|
+
hoverable: {
|
|
343
|
+
type: Boolean,
|
|
344
|
+
default: true,
|
|
345
|
+
},
|
|
346
|
+
dense: {
|
|
347
|
+
type: Boolean,
|
|
348
|
+
default: false,
|
|
349
|
+
},
|
|
350
|
+
|
|
351
|
+
// Loading
|
|
352
|
+
loading: {
|
|
353
|
+
type: Boolean,
|
|
354
|
+
default: false,
|
|
355
|
+
},
|
|
356
|
+
});
|
|
357
|
+
|
|
358
|
+
const emit = defineEmits([
|
|
359
|
+
'row-click',
|
|
360
|
+
'row-select',
|
|
361
|
+
'select-all',
|
|
362
|
+
'sort',
|
|
363
|
+
'filter',
|
|
364
|
+
'edit',
|
|
365
|
+
'delete',
|
|
366
|
+
]);
|
|
367
|
+
|
|
368
|
+
// Total columns count (for colspan)
|
|
369
|
+
const totalColumns = computed(() => {
|
|
370
|
+
let count = props.columns.length;
|
|
371
|
+
if (props.selectable) count++;
|
|
372
|
+
if (props.actions) count++;
|
|
373
|
+
return count;
|
|
374
|
+
});
|
|
375
|
+
|
|
376
|
+
// Grouped data
|
|
377
|
+
const groupedData = computed(() => {
|
|
378
|
+
if (!props.groupBy) return {};
|
|
379
|
+
|
|
380
|
+
return props.data.reduce((groups, row) => {
|
|
381
|
+
const key = row[props.groupBy] || 'Без группы';
|
|
382
|
+
if (!groups[key]) {
|
|
383
|
+
groups[key] = [];
|
|
384
|
+
}
|
|
385
|
+
groups[key].push(row);
|
|
386
|
+
return groups;
|
|
387
|
+
}, {});
|
|
388
|
+
});
|
|
389
|
+
|
|
390
|
+
// Selection helpers
|
|
391
|
+
const isRowSelected = (id) => {
|
|
392
|
+
return props.selectedRows.includes(id);
|
|
393
|
+
};
|
|
394
|
+
|
|
395
|
+
const allSelected = computed(() => {
|
|
396
|
+
return props.data.length > 0 && props.data.every(row => isRowSelected(row.id));
|
|
397
|
+
});
|
|
398
|
+
|
|
399
|
+
const someSelected = computed(() => {
|
|
400
|
+
return props.data.some(row => isRowSelected(row.id)) && !allSelected.value;
|
|
401
|
+
});
|
|
402
|
+
|
|
403
|
+
// Format cell value
|
|
404
|
+
const formatCell = (value, column) => {
|
|
405
|
+
if (value == null) return '-';
|
|
406
|
+
|
|
407
|
+
if (column.format) {
|
|
408
|
+
if (typeof column.format === 'function') {
|
|
409
|
+
return column.format(value);
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
return value;
|
|
414
|
+
};
|
|
415
|
+
|
|
416
|
+
// Event handlers
|
|
417
|
+
const handleSort = (column) => {
|
|
418
|
+
const newDirection =
|
|
419
|
+
props.sortBy === column && props.sortDirection === 'asc'
|
|
420
|
+
? 'desc'
|
|
421
|
+
: 'asc';
|
|
422
|
+
|
|
423
|
+
emit('sort', { column, direction: newDirection });
|
|
424
|
+
};
|
|
425
|
+
|
|
426
|
+
const handleFilter = (column, value) => {
|
|
427
|
+
emit('filter', { column, value });
|
|
428
|
+
};
|
|
429
|
+
|
|
430
|
+
const handleRowSelect = (id) => {
|
|
431
|
+
emit('row-select', { id, selected: !isRowSelected(id) });
|
|
432
|
+
};
|
|
433
|
+
|
|
434
|
+
const handleSelectAll = () => {
|
|
435
|
+
emit('select-all', !allSelected.value);
|
|
436
|
+
};
|
|
437
|
+
</script>
|
|
438
|
+
|
|
439
|
+
<style scoped>
|
|
440
|
+
/* Стили для скроллбара */
|
|
441
|
+
div ::-webkit-scrollbar {
|
|
442
|
+
width: 8px;
|
|
443
|
+
height: 8px;
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
div ::-webkit-scrollbar-track {
|
|
447
|
+
background-color: rgb(241 245 249);
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
div ::-webkit-scrollbar-thumb {
|
|
451
|
+
background-color: rgb(203 213 225);
|
|
452
|
+
border-radius: 0.25rem;
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
div ::-webkit-scrollbar-thumb:hover {
|
|
456
|
+
background-color: rgb(148 163 184);
|
|
457
|
+
}
|
|
458
|
+
</style>
|
|
459
|
+
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
import DXBreadcrumb from './DXBreadcrumb.vue';
|
|
2
|
+
import {
|
|
3
|
+
HomeIcon,
|
|
4
|
+
FolderIcon,
|
|
5
|
+
DocumentTextIcon,
|
|
6
|
+
ShoppingBagIcon,
|
|
7
|
+
TagIcon,
|
|
8
|
+
UserIcon,
|
|
9
|
+
Cog6ToothIcon,
|
|
10
|
+
ChartBarIcon,
|
|
11
|
+
InboxIcon,
|
|
12
|
+
PhotoIcon,
|
|
13
|
+
BuildingStorefrontIcon,
|
|
14
|
+
ShoppingCartIcon,
|
|
15
|
+
} from '@heroicons/vue/24/outline';
|
|
16
|
+
|
|
17
|
+
export default {
|
|
18
|
+
title: 'Molecules/DXBreadcrumb',
|
|
19
|
+
component: DXBreadcrumb,
|
|
20
|
+
tags: ['autodocs'],
|
|
21
|
+
argTypes: {
|
|
22
|
+
separator: { control: { type: 'select' }, options: ['slash', 'chevron'] },
|
|
23
|
+
size: { control: { type: 'select' }, options: ['sm', 'md', 'lg'] },
|
|
24
|
+
iconAnimation: { control: { type: 'select' }, options: ['none', 'wiggle', 'scale', 'rotate'] },
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
const items = [
|
|
29
|
+
{ label: 'Home', href: '/' },
|
|
30
|
+
{ label: 'Products', href: '/products' },
|
|
31
|
+
{ label: 'Category', href: '/products/category' },
|
|
32
|
+
{ label: 'Current Page' },
|
|
33
|
+
];
|
|
34
|
+
|
|
35
|
+
export const Default = {
|
|
36
|
+
args: { items },
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export const WithSlash = {
|
|
40
|
+
args: { items, separator: 'slash' },
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export const Short = {
|
|
44
|
+
args: {
|
|
45
|
+
items: [
|
|
46
|
+
{ label: 'Home', href: '/' },
|
|
47
|
+
{ label: 'Page' },
|
|
48
|
+
],
|
|
49
|
+
},
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
// С иконками
|
|
53
|
+
export const WithIcons = {
|
|
54
|
+
args: {
|
|
55
|
+
items: [
|
|
56
|
+
{ label: 'Home', href: '/', icon: HomeIcon },
|
|
57
|
+
{ label: 'Products', href: '/products', icon: ShoppingBagIcon },
|
|
58
|
+
{ label: 'Category', href: '/products/category', icon: TagIcon },
|
|
59
|
+
{ label: 'Product Details', icon: DocumentTextIcon },
|
|
60
|
+
],
|
|
61
|
+
},
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
export const IconsOnly = {
|
|
65
|
+
args: {
|
|
66
|
+
items: [
|
|
67
|
+
{ label: 'Home', href: '/', icon: HomeIcon },
|
|
68
|
+
{ label: 'Folder', href: '/folder', icon: FolderIcon },
|
|
69
|
+
{ label: 'Document', icon: DocumentTextIcon },
|
|
70
|
+
],
|
|
71
|
+
},
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
export const Navigation = {
|
|
75
|
+
args: {
|
|
76
|
+
items: [
|
|
77
|
+
{ label: 'Dashboard', href: '/dashboard', icon: ChartBarIcon },
|
|
78
|
+
{ label: 'Settings', href: '/settings', icon: Cog6ToothIcon },
|
|
79
|
+
{ label: 'Profile', href: '/settings/profile', icon: UserIcon },
|
|
80
|
+
{ label: 'Edit Profile', icon: UserIcon },
|
|
81
|
+
],
|
|
82
|
+
},
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
export const ECommerce = {
|
|
86
|
+
args: {
|
|
87
|
+
items: [
|
|
88
|
+
{ label: 'Store', href: '/', icon: BuildingStorefrontIcon },
|
|
89
|
+
{ label: 'Products', href: '/products', icon: ShoppingBagIcon },
|
|
90
|
+
{ label: 'Electronics', href: '/products/electronics', icon: TagIcon },
|
|
91
|
+
{ label: 'Laptops', href: '/products/electronics/laptops', icon: FolderIcon },
|
|
92
|
+
{ label: 'MacBook Pro', icon: DocumentTextIcon },
|
|
93
|
+
],
|
|
94
|
+
},
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
export const FileSystem = {
|
|
98
|
+
args: {
|
|
99
|
+
items: [
|
|
100
|
+
{ label: 'Home', href: '/', icon: HomeIcon },
|
|
101
|
+
{ label: 'Documents', href: '/documents', icon: FolderIcon },
|
|
102
|
+
{ label: 'Projects', href: '/documents/projects', icon: FolderIcon },
|
|
103
|
+
{ label: 'Images', href: '/documents/projects/images', icon: PhotoIcon },
|
|
104
|
+
{ label: 'photo.jpg', icon: PhotoIcon },
|
|
105
|
+
],
|
|
106
|
+
},
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
// С анимацией
|
|
110
|
+
export const WithAnimation = {
|
|
111
|
+
args: {
|
|
112
|
+
items: [
|
|
113
|
+
{ label: 'Home', href: '/', icon: HomeIcon },
|
|
114
|
+
{ label: 'Products', href: '/products', icon: ShoppingBagIcon },
|
|
115
|
+
{ label: 'Cart', icon: ShoppingCartIcon },
|
|
116
|
+
],
|
|
117
|
+
iconAnimation: 'wiggle',
|
|
118
|
+
},
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
export const AnimateCurrentOnly = {
|
|
122
|
+
args: {
|
|
123
|
+
items: [
|
|
124
|
+
{ label: 'Home', href: '/', icon: HomeIcon },
|
|
125
|
+
{ label: 'Inbox', href: '/inbox', icon: InboxIcon },
|
|
126
|
+
{ label: 'Message', icon: DocumentTextIcon },
|
|
127
|
+
],
|
|
128
|
+
iconAnimation: 'scale',
|
|
129
|
+
animateCurrentOnly: true,
|
|
130
|
+
},
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
export const CustomIconAnimations = {
|
|
134
|
+
args: {
|
|
135
|
+
items: [
|
|
136
|
+
{ label: 'Home', href: '/', icon: HomeIcon, iconAnimation: 'wiggle' },
|
|
137
|
+
{ label: 'Products', href: '/products', icon: ShoppingBagIcon, iconAnimation: 'scale' },
|
|
138
|
+
{ label: 'Details', icon: DocumentTextIcon, iconAnimation: 'rotate' },
|
|
139
|
+
],
|
|
140
|
+
},
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
export const Sizes = {
|
|
144
|
+
render: () => ({
|
|
145
|
+
components: { DXBreadcrumb },
|
|
146
|
+
setup() {
|
|
147
|
+
const itemsWithIcons = [
|
|
148
|
+
{ label: 'Home', href: '/', icon: HomeIcon },
|
|
149
|
+
{ label: 'Products', href: '/products', icon: ShoppingBagIcon },
|
|
150
|
+
{ label: 'Details', icon: DocumentTextIcon },
|
|
151
|
+
];
|
|
152
|
+
return { items, itemsWithIcons };
|
|
153
|
+
},
|
|
154
|
+
template: `
|
|
155
|
+
<div class="space-y-6">
|
|
156
|
+
<div>
|
|
157
|
+
<p class="text-xs text-slate-500 mb-2">Small</p>
|
|
158
|
+
<DXBreadcrumb :items="itemsWithIcons" size="sm" />
|
|
159
|
+
</div>
|
|
160
|
+
<div>
|
|
161
|
+
<p class="text-xs text-slate-500 mb-2">Medium (default)</p>
|
|
162
|
+
<DXBreadcrumb :items="itemsWithIcons" size="md" />
|
|
163
|
+
</div>
|
|
164
|
+
<div>
|
|
165
|
+
<p class="text-xs text-slate-500 mb-2">Large</p>
|
|
166
|
+
<DXBreadcrumb :items="itemsWithIcons" size="lg" />
|
|
167
|
+
</div>
|
|
168
|
+
</div>
|
|
169
|
+
`,
|
|
170
|
+
}),
|
|
171
|
+
};
|
|
172
|
+
|
|
173
|
+
export const AllVariants = {
|
|
174
|
+
render: () => ({
|
|
175
|
+
components: { DXBreadcrumb },
|
|
176
|
+
setup() {
|
|
177
|
+
const simple = [
|
|
178
|
+
{ label: 'Home', href: '/' },
|
|
179
|
+
{ label: 'Products', href: '/products' },
|
|
180
|
+
{ label: 'Current' },
|
|
181
|
+
];
|
|
182
|
+
|
|
183
|
+
const withIcons = [
|
|
184
|
+
{ label: 'Home', href: '/', icon: HomeIcon },
|
|
185
|
+
{ label: 'Products', href: '/products', icon: ShoppingBagIcon },
|
|
186
|
+
{ label: 'Current', icon: DocumentTextIcon },
|
|
187
|
+
];
|
|
188
|
+
|
|
189
|
+
const animated = [
|
|
190
|
+
{ label: 'Dashboard', href: '/', icon: ChartBarIcon },
|
|
191
|
+
{ label: 'Settings', href: '/settings', icon: Cog6ToothIcon },
|
|
192
|
+
{ label: 'Profile', icon: UserIcon },
|
|
193
|
+
];
|
|
194
|
+
|
|
195
|
+
return { simple, withIcons, animated };
|
|
196
|
+
},
|
|
197
|
+
template: `
|
|
198
|
+
<div class="space-y-8">
|
|
199
|
+
<div>
|
|
200
|
+
<h3 class="text-sm font-semibold text-slate-900 mb-3">Simple</h3>
|
|
201
|
+
<DXBreadcrumb :items="simple" />
|
|
202
|
+
</div>
|
|
203
|
+
|
|
204
|
+
<div>
|
|
205
|
+
<h3 class="text-sm font-semibold text-slate-900 mb-3">With Icons</h3>
|
|
206
|
+
<DXBreadcrumb :items="withIcons" />
|
|
207
|
+
</div>
|
|
208
|
+
|
|
209
|
+
<div>
|
|
210
|
+
<h3 class="text-sm font-semibold text-slate-900 mb-3">With Icons & Animation</h3>
|
|
211
|
+
<DXBreadcrumb :items="animated" icon-animation="scale" />
|
|
212
|
+
</div>
|
|
213
|
+
|
|
214
|
+
<div>
|
|
215
|
+
<h3 class="text-sm font-semibold text-slate-900 mb-3">Slash Separator</h3>
|
|
216
|
+
<DXBreadcrumb :items="withIcons" separator="slash" />
|
|
217
|
+
</div>
|
|
218
|
+
|
|
219
|
+
<div>
|
|
220
|
+
<h3 class="text-sm font-semibold text-slate-900 mb-3">Animate Current Only</h3>
|
|
221
|
+
<DXBreadcrumb :items="animated" icon-animation="wiggle" animate-current-only />
|
|
222
|
+
</div>
|
|
223
|
+
</div>
|
|
224
|
+
`,
|
|
225
|
+
}),
|
|
226
|
+
};
|
|
227
|
+
|