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,341 @@
|
|
|
1
|
+
import DXBackdrop from './DXBackdrop.vue';
|
|
2
|
+
import DXButton from '../DXButton/DXButton.vue';
|
|
3
|
+
import { ref, computed } from 'vue';
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Atoms/DXBackdrop',
|
|
7
|
+
component: DXBackdrop,
|
|
8
|
+
tags: ['autodocs'],
|
|
9
|
+
argTypes: {
|
|
10
|
+
blur: {
|
|
11
|
+
control: 'select',
|
|
12
|
+
options: ['none', 'sm', 'md', 'lg', 'xl'],
|
|
13
|
+
description: 'Уровень размытия backdrop'
|
|
14
|
+
},
|
|
15
|
+
backgroundColor: {
|
|
16
|
+
control: 'text',
|
|
17
|
+
description: 'Цвет фона (Tailwind класс или CSS значение): bg-slate-900/40 | bg-black/50 | rgb(...)'
|
|
18
|
+
},
|
|
19
|
+
zIndex: {
|
|
20
|
+
control: 'select',
|
|
21
|
+
options: ['0', '10', '20', '30', '40', '50', 'auto'],
|
|
22
|
+
description: 'z-index backdrop'
|
|
23
|
+
},
|
|
24
|
+
dismissible: {
|
|
25
|
+
control: 'boolean',
|
|
26
|
+
description: 'Можно ли закрыть кликом'
|
|
27
|
+
},
|
|
28
|
+
lockScroll: {
|
|
29
|
+
control: 'boolean',
|
|
30
|
+
description: 'Блокировать скролл body'
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
// 1. Default - базовый backdrop
|
|
36
|
+
export const Default = {
|
|
37
|
+
render: () => ({
|
|
38
|
+
components: { DXBackdrop, DXButton },
|
|
39
|
+
setup() {
|
|
40
|
+
const show = ref(false);
|
|
41
|
+
return { show };
|
|
42
|
+
},
|
|
43
|
+
template: `
|
|
44
|
+
<div>
|
|
45
|
+
<DXButton @click="show = true">Показать Backdrop</DXButton>
|
|
46
|
+
<DXBackdrop :show="show" @close="show = false" />
|
|
47
|
+
</div>
|
|
48
|
+
`,
|
|
49
|
+
}),
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
// 2. BlurLevels - разные уровни размытия
|
|
53
|
+
export const BlurLevels = {
|
|
54
|
+
render: () => ({
|
|
55
|
+
components: { DXBackdrop, DXButton },
|
|
56
|
+
setup() {
|
|
57
|
+
const blurs = ['none', 'sm', 'md', 'lg', 'xl'];
|
|
58
|
+
const currentBlur = ref(null);
|
|
59
|
+
return { blurs, currentBlur };
|
|
60
|
+
},
|
|
61
|
+
template: `
|
|
62
|
+
<div class="flex flex-wrap gap-4">
|
|
63
|
+
<DXButton
|
|
64
|
+
v-for="blur in blurs"
|
|
65
|
+
:key="blur"
|
|
66
|
+
@click="currentBlur = blur"
|
|
67
|
+
size="sm"
|
|
68
|
+
>
|
|
69
|
+
Blur: {{ blur }}
|
|
70
|
+
</DXButton>
|
|
71
|
+
<DXBackdrop
|
|
72
|
+
:show="currentBlur !== null"
|
|
73
|
+
:blur="currentBlur"
|
|
74
|
+
@close="currentBlur = null"
|
|
75
|
+
>
|
|
76
|
+
<div class="flex items-center justify-center h-full">
|
|
77
|
+
<div class="text-center text-white">
|
|
78
|
+
<div class="text-3xl font-bold mb-2">{{ currentBlur }}</div>
|
|
79
|
+
<div class="text-sm opacity-80">Кликните на backdrop чтобы закрыть</div>
|
|
80
|
+
</div>
|
|
81
|
+
</div>
|
|
82
|
+
</DXBackdrop>
|
|
83
|
+
</div>
|
|
84
|
+
`,
|
|
85
|
+
}),
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
// 3. Colors - разные цвета
|
|
89
|
+
export const Colors = {
|
|
90
|
+
render: () => ({
|
|
91
|
+
components: { DXBackdrop, DXButton },
|
|
92
|
+
setup() {
|
|
93
|
+
const colors = [
|
|
94
|
+
{ name: 'Slate', value: 'slate-900' },
|
|
95
|
+
{ name: 'Gray', value: 'gray-900' },
|
|
96
|
+
{ name: 'Black', value: 'black' },
|
|
97
|
+
{ name: 'White', value: 'white' }
|
|
98
|
+
];
|
|
99
|
+
const currentColor = ref(null);
|
|
100
|
+
const backgroundColor = computed(() => {
|
|
101
|
+
if (!currentColor.value) return 'bg-slate-900/40';
|
|
102
|
+
return `bg-${currentColor.value.value}/40`;
|
|
103
|
+
});
|
|
104
|
+
return { colors, currentColor, backgroundColor };
|
|
105
|
+
},
|
|
106
|
+
template: `
|
|
107
|
+
<div class="flex flex-wrap gap-4">
|
|
108
|
+
<DXButton
|
|
109
|
+
v-for="color in colors"
|
|
110
|
+
:key="color.value"
|
|
111
|
+
@click="currentColor = color"
|
|
112
|
+
size="sm"
|
|
113
|
+
>
|
|
114
|
+
{{ color.name }}
|
|
115
|
+
</DXButton>
|
|
116
|
+
<DXBackdrop
|
|
117
|
+
:show="currentColor !== null"
|
|
118
|
+
:background-color="backgroundColor"
|
|
119
|
+
@close="currentColor = null"
|
|
120
|
+
>
|
|
121
|
+
<div class="flex items-center justify-center h-full">
|
|
122
|
+
<div class="text-center" :class="currentColor?.value === 'white' ? 'text-slate-900' : 'text-white'">
|
|
123
|
+
<div class="text-3xl font-bold mb-2">{{ currentColor?.name }}</div>
|
|
124
|
+
<div class="text-sm opacity-80">Цвет: {{ currentColor?.value }}</div>
|
|
125
|
+
</div>
|
|
126
|
+
</div>
|
|
127
|
+
</DXBackdrop>
|
|
128
|
+
</div>
|
|
129
|
+
`,
|
|
130
|
+
}),
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
// 4. WithContent - backdrop с контентом (модалка внутри)
|
|
134
|
+
export const WithContent = {
|
|
135
|
+
render: () => ({
|
|
136
|
+
components: { DXBackdrop, DXButton },
|
|
137
|
+
setup() {
|
|
138
|
+
const show = ref(false);
|
|
139
|
+
return { show };
|
|
140
|
+
},
|
|
141
|
+
template: `
|
|
142
|
+
<div>
|
|
143
|
+
<DXButton @click="show = true">Открыть модалку</DXButton>
|
|
144
|
+
<DXBackdrop :show="show" @close="show = false">
|
|
145
|
+
<div class="flex items-center justify-center h-full p-4">
|
|
146
|
+
<div class="bg-white rounded-2xl p-6 max-w-md w-full shadow-2xl">
|
|
147
|
+
<h2 class="text-xl font-bold mb-4 text-slate-900">Модальное окно</h2>
|
|
148
|
+
<p class="text-slate-600 mb-4">
|
|
149
|
+
Это пример содержимого внутри backdrop.
|
|
150
|
+
Backdrop предоставляет фон с размытием,
|
|
151
|
+
а контент рендерится через slot.
|
|
152
|
+
</p>
|
|
153
|
+
<div class="flex gap-2">
|
|
154
|
+
<DXButton @click="show = false" variant="primary">Закрыть</DXButton>
|
|
155
|
+
<DXButton @click="show = false" variant="secondary">Отмена</DXButton>
|
|
156
|
+
</div>
|
|
157
|
+
</div>
|
|
158
|
+
</div>
|
|
159
|
+
</DXBackdrop>
|
|
160
|
+
</div>
|
|
161
|
+
`,
|
|
162
|
+
}),
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
// 5. NotDismissible - backdrop без возможности закрытия
|
|
166
|
+
export const NotDismissible = {
|
|
167
|
+
render: () => ({
|
|
168
|
+
components: { DXBackdrop, DXButton },
|
|
169
|
+
setup() {
|
|
170
|
+
const show = ref(false);
|
|
171
|
+
return { show };
|
|
172
|
+
},
|
|
173
|
+
template: `
|
|
174
|
+
<div>
|
|
175
|
+
<DXButton @click="show = true">Открыть (не закрывается кликом)</DXButton>
|
|
176
|
+
<DXBackdrop :show="show" :dismissible="false">
|
|
177
|
+
<div class="flex items-center justify-center h-full p-4">
|
|
178
|
+
<div class="bg-white rounded-2xl p-6 max-w-md w-full shadow-2xl">
|
|
179
|
+
<h2 class="text-xl font-bold mb-4 text-slate-900">Важное уведомление</h2>
|
|
180
|
+
<p class="text-slate-600 mb-4">
|
|
181
|
+
Этот backdrop нельзя закрыть кликом по фону.
|
|
182
|
+
Только через кнопку закрытия.
|
|
183
|
+
</p>
|
|
184
|
+
<DXButton @click="show = false" variant="primary" block>
|
|
185
|
+
Понятно, закрыть
|
|
186
|
+
</DXButton>
|
|
187
|
+
</div>
|
|
188
|
+
</div>
|
|
189
|
+
</DXBackdrop>
|
|
190
|
+
</div>
|
|
191
|
+
`,
|
|
192
|
+
}),
|
|
193
|
+
};
|
|
194
|
+
|
|
195
|
+
// 6. CustomZIndex - разные z-index
|
|
196
|
+
export const CustomZIndex = {
|
|
197
|
+
render: () => ({
|
|
198
|
+
components: { DXBackdrop, DXButton },
|
|
199
|
+
setup() {
|
|
200
|
+
const show1 = ref(false);
|
|
201
|
+
const show2 = ref(false);
|
|
202
|
+
return { show1, show2 };
|
|
203
|
+
},
|
|
204
|
+
template: `
|
|
205
|
+
<div class="flex gap-4">
|
|
206
|
+
<DXButton @click="show1 = true">Backdrop z-10</DXButton>
|
|
207
|
+
<DXButton @click="show2 = true">Backdrop z-20</DXButton>
|
|
208
|
+
|
|
209
|
+
<DXBackdrop :show="show1" z-index="10" @close="show1 = false" background-color="bg-slate-900/30">
|
|
210
|
+
<div class="flex items-center justify-center h-full">
|
|
211
|
+
<div class="bg-white rounded-2xl p-6 max-w-md shadow-2xl">
|
|
212
|
+
<h3 class="font-bold mb-2">z-index: 10</h3>
|
|
213
|
+
<p class="text-sm text-slate-600 mb-4">Нижний слой</p>
|
|
214
|
+
<DXButton @click="show1 = false" size="sm">Закрыть</DXButton>
|
|
215
|
+
</div>
|
|
216
|
+
</div>
|
|
217
|
+
</DXBackdrop>
|
|
218
|
+
|
|
219
|
+
<DXBackdrop :show="show2" z-index="20" @close="show2 = false">
|
|
220
|
+
<div class="flex items-center justify-center h-full">
|
|
221
|
+
<div class="bg-white rounded-2xl p-6 max-w-md shadow-2xl">
|
|
222
|
+
<h3 class="font-bold mb-2">z-index: 20</h3>
|
|
223
|
+
<p class="text-sm text-slate-600 mb-4">Верхний слой</p>
|
|
224
|
+
<DXButton @click="show2 = false" size="sm">Закрыть</DXButton>
|
|
225
|
+
</div>
|
|
226
|
+
</div>
|
|
227
|
+
</DXBackdrop>
|
|
228
|
+
</div>
|
|
229
|
+
`,
|
|
230
|
+
}),
|
|
231
|
+
};
|
|
232
|
+
|
|
233
|
+
// 7. NoBlur - backdrop без размытия
|
|
234
|
+
export const NoBlur = {
|
|
235
|
+
render: () => ({
|
|
236
|
+
components: { DXBackdrop, DXButton },
|
|
237
|
+
setup() {
|
|
238
|
+
const show = ref(false);
|
|
239
|
+
return { show };
|
|
240
|
+
},
|
|
241
|
+
template: `
|
|
242
|
+
<div>
|
|
243
|
+
<DXButton @click="show = true">Без размытия</DXButton>
|
|
244
|
+
<DXBackdrop :show="show" blur="none" background-color="bg-slate-900/60" @close="show = false">
|
|
245
|
+
<div class="flex items-center justify-center h-full">
|
|
246
|
+
<div class="text-center text-white">
|
|
247
|
+
<div class="text-3xl font-bold mb-2">Без размытия</div>
|
|
248
|
+
<div class="text-sm opacity-80">Только затемнение без backdrop-blur</div>
|
|
249
|
+
</div>
|
|
250
|
+
</div>
|
|
251
|
+
</DXBackdrop>
|
|
252
|
+
</div>
|
|
253
|
+
`,
|
|
254
|
+
}),
|
|
255
|
+
};
|
|
256
|
+
|
|
257
|
+
// 8. Interactive - интерактивный пример с настройками
|
|
258
|
+
export const Interactive = {
|
|
259
|
+
render: () => ({
|
|
260
|
+
components: { DXBackdrop, DXButton },
|
|
261
|
+
setup() {
|
|
262
|
+
const show = ref(false);
|
|
263
|
+
const blur = ref('md');
|
|
264
|
+
const opacity = ref('40');
|
|
265
|
+
const color = ref('slate-900');
|
|
266
|
+
|
|
267
|
+
const backgroundColor = computed(() => {
|
|
268
|
+
const tailwindOpacities = ['0', '5', '10', '20', '30', '40', '50', '60', '70', '80', '90', '95', '100'];
|
|
269
|
+
if (tailwindOpacities.includes(String(opacity.value))) {
|
|
270
|
+
return `bg-${color.value}/${opacity.value}`;
|
|
271
|
+
}
|
|
272
|
+
const colorMap = {
|
|
273
|
+
'slate-900': 'rgb(15 23 42',
|
|
274
|
+
'gray-900': 'rgb(17 24 39',
|
|
275
|
+
'black': 'rgb(0 0 0',
|
|
276
|
+
'white': 'rgb(255 255 255',
|
|
277
|
+
};
|
|
278
|
+
const rgb = colorMap[color.value] || colorMap['slate-900'];
|
|
279
|
+
return `${rgb} / ${opacity.value}%)`;
|
|
280
|
+
});
|
|
281
|
+
|
|
282
|
+
return { show, blur, opacity, color, backgroundColor };
|
|
283
|
+
},
|
|
284
|
+
template: `
|
|
285
|
+
<div>
|
|
286
|
+
<div class="flex flex-col gap-4 mb-4 p-4 bg-slate-50 rounded-xl">
|
|
287
|
+
<div>
|
|
288
|
+
<label class="block text-sm font-medium mb-2">Размытие:</label>
|
|
289
|
+
<div class="flex gap-2">
|
|
290
|
+
<DXButton
|
|
291
|
+
v-for="b in ['none', 'sm', 'md', 'lg', 'xl']"
|
|
292
|
+
:key="b"
|
|
293
|
+
:variant="blur === b ? 'primary' : 'secondary'"
|
|
294
|
+
size="sm"
|
|
295
|
+
@click="blur = b"
|
|
296
|
+
>
|
|
297
|
+
{{ b }}
|
|
298
|
+
</DXButton>
|
|
299
|
+
</div>
|
|
300
|
+
</div>
|
|
301
|
+
|
|
302
|
+
<div>
|
|
303
|
+
<label class="block text-sm font-medium mb-2">Прозрачность: {{ opacity }}%</label>
|
|
304
|
+
<input
|
|
305
|
+
type="range"
|
|
306
|
+
v-model="opacity"
|
|
307
|
+
min="0"
|
|
308
|
+
max="100"
|
|
309
|
+
step="5"
|
|
310
|
+
class="w-full"
|
|
311
|
+
/>
|
|
312
|
+
</div>
|
|
313
|
+
|
|
314
|
+
<DXButton @click="show = true">Показать backdrop</DXButton>
|
|
315
|
+
</div>
|
|
316
|
+
|
|
317
|
+
<DXBackdrop
|
|
318
|
+
:show="show"
|
|
319
|
+
:blur="blur"
|
|
320
|
+
:background-color="backgroundColor"
|
|
321
|
+
@close="show = false"
|
|
322
|
+
>
|
|
323
|
+
<div class="flex items-center justify-center h-full">
|
|
324
|
+
<div class="bg-white rounded-2xl p-6 max-w-md shadow-2xl">
|
|
325
|
+
<h3 class="font-bold mb-4">Настройки backdrop</h3>
|
|
326
|
+
<div class="space-y-2 text-sm text-slate-600 mb-4">
|
|
327
|
+
<p><strong>Blur:</strong> {{ blur }}</p>
|
|
328
|
+
<p><strong>Opacity:</strong> {{ opacity }}%</p>
|
|
329
|
+
<p><strong>Color:</strong> {{ color }}</p>
|
|
330
|
+
</div>
|
|
331
|
+
<DXButton @click="show = false" variant="primary" block>
|
|
332
|
+
Закрыть
|
|
333
|
+
</DXButton>
|
|
334
|
+
</div>
|
|
335
|
+
</div>
|
|
336
|
+
</DXBackdrop>
|
|
337
|
+
</div>
|
|
338
|
+
`,
|
|
339
|
+
}),
|
|
340
|
+
};
|
|
341
|
+
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<Teleport to="body">
|
|
3
|
+
<Transition v-bind="FADE_TRANSITION">
|
|
4
|
+
<div
|
|
5
|
+
v-if="show"
|
|
6
|
+
:class="backdropClasses"
|
|
7
|
+
@click="handleClick"
|
|
8
|
+
data-component="DXBackdrop"
|
|
9
|
+
:data-blur="blur"
|
|
10
|
+
:data-dismissible="dismissible"
|
|
11
|
+
>
|
|
12
|
+
<slot />
|
|
13
|
+
</div>
|
|
14
|
+
</Transition>
|
|
15
|
+
</Teleport>
|
|
16
|
+
</template>
|
|
17
|
+
|
|
18
|
+
<script setup>
|
|
19
|
+
import { computed, watch, onBeforeUnmount } from 'vue';
|
|
20
|
+
|
|
21
|
+
// Fade transition configuration (Tailwind classes)
|
|
22
|
+
const FADE_TRANSITION = {
|
|
23
|
+
enterActiveClass: 'transition-opacity duration-200 ease-out',
|
|
24
|
+
enterFromClass: 'opacity-0',
|
|
25
|
+
enterToClass: 'opacity-100',
|
|
26
|
+
leaveActiveClass: 'transition-opacity duration-200 ease-in',
|
|
27
|
+
leaveFromClass: 'opacity-100',
|
|
28
|
+
leaveToClass: 'opacity-0',
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
const props = defineProps({
|
|
32
|
+
/** Показать/скрыть backdrop */
|
|
33
|
+
show: { type: Boolean, default: false },
|
|
34
|
+
/** Уровень размытия: none | sm | md | lg | xl */
|
|
35
|
+
blur: { type: String, default: 'sm', validator: (v) => ['none', 'sm', 'md', 'lg', 'xl'].includes(v)},
|
|
36
|
+
/** Цвет фона (Tailwind класс): bg-slate-900/40 | bg-black/50 */
|
|
37
|
+
backgroundColor: { type: String, default: 'bg-slate-900/40' },
|
|
38
|
+
/** z-index: 0 | 10 | 20 | 30 | 40 | 50 | auto */
|
|
39
|
+
zIndex: {
|
|
40
|
+
type: String,
|
|
41
|
+
default: '50',
|
|
42
|
+
validator: (v) => ['0', '10', '20', '30', '40', '50', 'auto'].includes(v)
|
|
43
|
+
},
|
|
44
|
+
/** Можно ли закрыть кликом */
|
|
45
|
+
dismissible: { type: Boolean, default: true },
|
|
46
|
+
/** Блокировать скролл body */
|
|
47
|
+
lockScroll: { type: Boolean, default: true }
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
const emit = defineEmits(['click', 'close']);
|
|
51
|
+
|
|
52
|
+
// Blur classes mapping
|
|
53
|
+
const BLUR_CLASSES = {
|
|
54
|
+
none: 'backdrop-blur-none',
|
|
55
|
+
sm: 'backdrop-blur-sm',
|
|
56
|
+
md: 'backdrop-blur',
|
|
57
|
+
lg: 'backdrop-blur-lg',
|
|
58
|
+
xl: 'backdrop-blur-xl',
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
// Z-index classes mapping
|
|
62
|
+
const Z_INDEX_CLASSES = {
|
|
63
|
+
'0': 'z-0',
|
|
64
|
+
'10': 'z-10',
|
|
65
|
+
'20': 'z-20',
|
|
66
|
+
'30': 'z-30',
|
|
67
|
+
'40': 'z-40',
|
|
68
|
+
'50': 'z-50',
|
|
69
|
+
'auto': 'z-auto',
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
const backdropClasses = computed(() => [
|
|
73
|
+
'fixed inset-0',
|
|
74
|
+
BLUR_CLASSES[props.blur],
|
|
75
|
+
props.backgroundColor || 'bg-slate-900/40',
|
|
76
|
+
Z_INDEX_CLASSES[props.zIndex] || 'z-50',
|
|
77
|
+
props.dismissible && 'cursor-pointer',
|
|
78
|
+
]);
|
|
79
|
+
|
|
80
|
+
const handleClick = (event) => {
|
|
81
|
+
if (event.target === event.currentTarget) {
|
|
82
|
+
emit('click', event);
|
|
83
|
+
if (props.dismissible) {
|
|
84
|
+
emit('close');
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
// Lock/unlock body scroll
|
|
90
|
+
watch(() => props.show, (isShown) => {
|
|
91
|
+
if (props.lockScroll) {
|
|
92
|
+
document.body.classList.toggle('overflow-hidden', isShown);
|
|
93
|
+
}
|
|
94
|
+
}, { immediate: true });
|
|
95
|
+
|
|
96
|
+
onBeforeUnmount(() => {
|
|
97
|
+
if (props.lockScroll) {
|
|
98
|
+
document.body.classList.remove('overflow-hidden');
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
</script>
|
|
102
|
+
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
import DXBadge from './DXBadge.vue';
|
|
2
|
+
import {
|
|
3
|
+
CheckCircleIcon,
|
|
4
|
+
XCircleIcon,
|
|
5
|
+
ExclamationTriangleIcon,
|
|
6
|
+
InformationCircleIcon,
|
|
7
|
+
ClockIcon,
|
|
8
|
+
FireIcon,
|
|
9
|
+
BoltIcon,
|
|
10
|
+
SparklesIcon,
|
|
11
|
+
StarIcon,
|
|
12
|
+
XMarkIcon,
|
|
13
|
+
} from '@heroicons/vue/24/solid';
|
|
14
|
+
|
|
15
|
+
export default {
|
|
16
|
+
title: 'Atoms/DXBadge',
|
|
17
|
+
component: DXBadge,
|
|
18
|
+
tags: ['autodocs'],
|
|
19
|
+
argTypes: {
|
|
20
|
+
variant: {
|
|
21
|
+
control: 'select',
|
|
22
|
+
options: ['slate', 'success', 'warning', 'danger', 'info'],
|
|
23
|
+
description: 'Вариант оформления',
|
|
24
|
+
},
|
|
25
|
+
size: {
|
|
26
|
+
control: 'select',
|
|
27
|
+
options: ['sm', 'md'],
|
|
28
|
+
description: 'Размер бейджа',
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export const Default = {
|
|
34
|
+
args: {
|
|
35
|
+
variant: 'slate',
|
|
36
|
+
},
|
|
37
|
+
render: (args) => ({
|
|
38
|
+
components: { DXBadge },
|
|
39
|
+
setup() { return { args }; },
|
|
40
|
+
template: '<DXBadge v-bind="args">Статус</DXBadge>',
|
|
41
|
+
}),
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export const Success = {
|
|
45
|
+
args: {
|
|
46
|
+
variant: 'success',
|
|
47
|
+
},
|
|
48
|
+
render: (args) => ({
|
|
49
|
+
components: { DXBadge },
|
|
50
|
+
setup() { return { args }; },
|
|
51
|
+
template: '<DXBadge v-bind="args">Активен</DXBadge>',
|
|
52
|
+
}),
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
export const Warning = {
|
|
56
|
+
args: {
|
|
57
|
+
variant: 'warning',
|
|
58
|
+
},
|
|
59
|
+
render: (args) => ({
|
|
60
|
+
components: { DXBadge },
|
|
61
|
+
setup() { return { args }; },
|
|
62
|
+
template: '<DXBadge v-bind="args">Ожидание</DXBadge>',
|
|
63
|
+
}),
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
export const Danger = {
|
|
67
|
+
args: {
|
|
68
|
+
variant: 'danger',
|
|
69
|
+
},
|
|
70
|
+
render: (args) => ({
|
|
71
|
+
components: { DXBadge },
|
|
72
|
+
setup() { return { args }; },
|
|
73
|
+
template: '<DXBadge v-bind="args">Ошибка</DXBadge>',
|
|
74
|
+
}),
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
export const Info = {
|
|
78
|
+
args: {
|
|
79
|
+
variant: 'info',
|
|
80
|
+
},
|
|
81
|
+
render: (args) => ({
|
|
82
|
+
components: { DXBadge },
|
|
83
|
+
setup() { return { args }; },
|
|
84
|
+
template: '<DXBadge v-bind="args">Информация</DXBadge>',
|
|
85
|
+
}),
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
export const AllVariants = {
|
|
89
|
+
render: () => ({
|
|
90
|
+
components: { DXBadge },
|
|
91
|
+
template: `
|
|
92
|
+
<div class="flex flex-wrap gap-2">
|
|
93
|
+
<DXBadge variant="slate">Slate</DXBadge>
|
|
94
|
+
<DXBadge variant="success">Success</DXBadge>
|
|
95
|
+
<DXBadge variant="warning">Warning</DXBadge>
|
|
96
|
+
<DXBadge variant="danger">Danger</DXBadge>
|
|
97
|
+
<DXBadge variant="info">Info</DXBadge>
|
|
98
|
+
</div>
|
|
99
|
+
`,
|
|
100
|
+
}),
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
export const WithIconLeft = {
|
|
104
|
+
render: () => ({
|
|
105
|
+
components: { DXBadge },
|
|
106
|
+
setup() {
|
|
107
|
+
return { CheckCircleIcon, ExclamationTriangleIcon, XCircleIcon, InformationCircleIcon };
|
|
108
|
+
},
|
|
109
|
+
template: `
|
|
110
|
+
<div class="flex flex-wrap gap-2">
|
|
111
|
+
<DXBadge variant="success" :icon-left="CheckCircleIcon">Активен</DXBadge>
|
|
112
|
+
<DXBadge variant="warning" :icon-left="ExclamationTriangleIcon">Ожидание</DXBadge>
|
|
113
|
+
<DXBadge variant="danger" :icon-left="XCircleIcon">Ошибка</DXBadge>
|
|
114
|
+
<DXBadge variant="info" :icon-left="InformationCircleIcon">Новое</DXBadge>
|
|
115
|
+
</div>
|
|
116
|
+
`,
|
|
117
|
+
}),
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
export const WithIconRight = {
|
|
121
|
+
render: () => ({
|
|
122
|
+
components: { DXBadge },
|
|
123
|
+
setup() {
|
|
124
|
+
return { ClockIcon, FireIcon, BoltIcon, StarIcon };
|
|
125
|
+
},
|
|
126
|
+
template: `
|
|
127
|
+
<div class="flex flex-wrap gap-2">
|
|
128
|
+
<DXBadge variant="slate" :icon-right="ClockIcon">Скоро</DXBadge>
|
|
129
|
+
<DXBadge variant="danger" :icon-right="FireIcon">Горячее</DXBadge>
|
|
130
|
+
<DXBadge variant="warning" :icon-right="BoltIcon">Быстро</DXBadge>
|
|
131
|
+
<DXBadge variant="info" :icon-right="StarIcon">Новинка</DXBadge>
|
|
132
|
+
</div>
|
|
133
|
+
`,
|
|
134
|
+
}),
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
export const WithBothIcons = {
|
|
138
|
+
render: () => ({
|
|
139
|
+
components: { DXBadge },
|
|
140
|
+
setup() {
|
|
141
|
+
return { CheckCircleIcon, XMarkIcon, SparklesIcon };
|
|
142
|
+
},
|
|
143
|
+
template: `
|
|
144
|
+
<div class="flex flex-wrap gap-2">
|
|
145
|
+
<DXBadge variant="success" :icon-left="CheckCircleIcon" :icon-right="XMarkIcon">
|
|
146
|
+
Закрываемый
|
|
147
|
+
</DXBadge>
|
|
148
|
+
<DXBadge variant="info" :icon-left="SparklesIcon" :icon-right="SparklesIcon">
|
|
149
|
+
Премиум
|
|
150
|
+
</DXBadge>
|
|
151
|
+
</div>
|
|
152
|
+
`,
|
|
153
|
+
}),
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
export const Sizes = {
|
|
157
|
+
render: () => ({
|
|
158
|
+
components: { DXBadge },
|
|
159
|
+
setup() {
|
|
160
|
+
return { CheckCircleIcon };
|
|
161
|
+
},
|
|
162
|
+
template: `
|
|
163
|
+
<div class="space-y-4">
|
|
164
|
+
<div>
|
|
165
|
+
<p class="text-sm font-medium text-slate-700 mb-2">Small (sm, default)</p>
|
|
166
|
+
<div class="flex flex-wrap gap-2 items-center">
|
|
167
|
+
<DXBadge variant="slate" size="sm">Slate</DXBadge>
|
|
168
|
+
<DXBadge variant="success" size="sm" :icon-left="CheckCircleIcon">Success</DXBadge>
|
|
169
|
+
<DXBadge variant="warning" size="sm">Warning</DXBadge>
|
|
170
|
+
<DXBadge variant="danger" size="sm">Danger</DXBadge>
|
|
171
|
+
<DXBadge variant="info" size="sm">Info</DXBadge>
|
|
172
|
+
</div>
|
|
173
|
+
</div>
|
|
174
|
+
|
|
175
|
+
<div>
|
|
176
|
+
<p class="text-sm font-medium text-slate-700 mb-2">Medium (md)</p>
|
|
177
|
+
<div class="flex flex-wrap gap-2 items-center">
|
|
178
|
+
<DXBadge variant="slate" size="md">Slate</DXBadge>
|
|
179
|
+
<DXBadge variant="success" size="md" :icon-left="CheckCircleIcon">Success</DXBadge>
|
|
180
|
+
<DXBadge variant="warning" size="md">Warning</DXBadge>
|
|
181
|
+
<DXBadge variant="danger" size="md">Danger</DXBadge>
|
|
182
|
+
<DXBadge variant="info" size="md">Info</DXBadge>
|
|
183
|
+
</div>
|
|
184
|
+
</div>
|
|
185
|
+
|
|
186
|
+
<div>
|
|
187
|
+
<p class="text-sm font-medium text-slate-700 mb-2">Size Comparison</p>
|
|
188
|
+
<div class="flex flex-wrap gap-3 items-center">
|
|
189
|
+
<DXBadge variant="info" size="sm">Small Badge</DXBadge>
|
|
190
|
+
<DXBadge variant="info" size="md">Medium Badge</DXBadge>
|
|
191
|
+
</div>
|
|
192
|
+
</div>
|
|
193
|
+
</div>
|
|
194
|
+
`,
|
|
195
|
+
}),
|
|
196
|
+
};
|
|
197
|
+
|
|
198
|
+
export const IconsShowcase = {
|
|
199
|
+
render: () => ({
|
|
200
|
+
components: { DXBadge },
|
|
201
|
+
setup() {
|
|
202
|
+
return {
|
|
203
|
+
CheckCircleIcon,
|
|
204
|
+
XCircleIcon,
|
|
205
|
+
ExclamationTriangleIcon,
|
|
206
|
+
InformationCircleIcon,
|
|
207
|
+
FireIcon,
|
|
208
|
+
BoltIcon,
|
|
209
|
+
ClockIcon,
|
|
210
|
+
StarIcon,
|
|
211
|
+
SparklesIcon,
|
|
212
|
+
};
|
|
213
|
+
},
|
|
214
|
+
template: `
|
|
215
|
+
<div class="space-y-4">
|
|
216
|
+
<div>
|
|
217
|
+
<h3 class="text-sm font-semibold text-slate-700 mb-2">Статусы</h3>
|
|
218
|
+
<div class="flex flex-wrap gap-2">
|
|
219
|
+
<DXBadge variant="success" :icon-left="CheckCircleIcon">Завершено</DXBadge>
|
|
220
|
+
<DXBadge variant="warning" :icon-left="ClockIcon">В процессе</DXBadge>
|
|
221
|
+
<DXBadge variant="danger" :icon-left="XCircleIcon">Отклонено</DXBadge>
|
|
222
|
+
<DXBadge variant="info" :icon-left="InformationCircleIcon">Новый</DXBadge>
|
|
223
|
+
</div>
|
|
224
|
+
</div>
|
|
225
|
+
|
|
226
|
+
<div>
|
|
227
|
+
<h3 class="text-sm font-semibold text-slate-700 mb-2">Специальные</h3>
|
|
228
|
+
<div class="flex flex-wrap gap-2">
|
|
229
|
+
<DXBadge variant="danger" :icon-left="FireIcon">Популярное</DXBadge>
|
|
230
|
+
<DXBadge variant="warning" :icon-left="BoltIcon">Срочно</DXBadge>
|
|
231
|
+
<DXBadge variant="info" :icon-left="StarIcon">Избранное</DXBadge>
|
|
232
|
+
<DXBadge variant="success" :icon-left="SparklesIcon">Новинка</DXBadge>
|
|
233
|
+
</div>
|
|
234
|
+
</div>
|
|
235
|
+
</div>
|
|
236
|
+
`,
|
|
237
|
+
}),
|
|
238
|
+
};
|
|
239
|
+
|