dxd-style-code 0.1.7 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dxd-style-code.js +11974 -3725
- package/dist/dxd-style-code.umd.cjs +10 -1
- package/dist/style.css +1 -1
- package/package.json +14 -6
- package/src/components/atoms/DXAvatar/DXAvatar.stories.js +319 -0
- package/src/components/atoms/DXAvatar/DXAvatar.vue +167 -0
- package/src/components/atoms/DXAvatar/index.js +2 -0
- package/src/components/atoms/DXBackdrop/DXBackdrop.stories.js +341 -0
- package/src/components/atoms/DXBackdrop/DXBackdrop.vue +102 -0
- package/src/components/atoms/DXBackdrop/index.js +2 -0
- package/src/components/atoms/DXBadge/DXBadge.stories.js +239 -0
- package/src/components/atoms/DXBadge/DXBadge.vue +45 -0
- package/src/components/atoms/DXBadge/index.js +2 -0
- package/src/components/atoms/DXButton/DXButton.stories.js +178 -0
- package/src/components/atoms/DXButton/DXButton.vue +84 -0
- package/src/components/atoms/DXButton/index.js +2 -0
- package/src/components/atoms/DXCard/DXCard.stories.js +133 -0
- package/src/components/atoms/DXCard/DXCard.vue +46 -0
- package/src/components/atoms/DXCard/index.js +2 -0
- package/src/components/atoms/DXCheckbox/DXCheckbox.stories.js +294 -0
- package/src/components/atoms/DXCheckbox/DXCheckbox.vue +191 -0
- package/src/components/atoms/DXCheckbox/index.js +2 -0
- package/src/components/atoms/DXDivider/DXDivider.stories.js +135 -0
- package/src/components/atoms/DXDivider/DXDivider.vue +74 -0
- package/src/components/atoms/DXDivider/index.js +2 -0
- package/src/components/atoms/DXDropdownItem/DXDropdownItem.vue +116 -0
- package/src/components/atoms/DXDropdownItem/index.js +2 -0
- package/src/components/atoms/DXFormLabel/DXFormLabel.stories.js +194 -0
- package/src/components/atoms/DXFormLabel/DXFormLabel.vue +94 -0
- package/src/components/atoms/DXFormLabel/index.js +2 -0
- package/src/components/atoms/DXIcon/DXIcon.stories.js +156 -0
- package/src/components/atoms/DXIcon/DXIcon.vue +102 -0
- package/src/components/atoms/DXIcon/index.js +3 -0
- package/src/components/atoms/DXIconWrapper/DXIconWrapper.stories.js +237 -0
- package/src/components/atoms/DXIconWrapper/DXIconWrapper.vue +79 -0
- package/src/components/atoms/DXIconWrapper/index.js +2 -0
- package/src/components/atoms/DXInputAddon/DXInputAddon.stories.js +230 -0
- package/src/components/atoms/DXInputAddon/DXInputAddon.vue +64 -0
- package/src/components/atoms/DXInputAddon/index.js +2 -0
- package/src/components/atoms/DXLink/DXLink.stories.js +475 -0
- package/src/components/atoms/DXLink/DXLink.vue +229 -0
- package/src/components/atoms/DXLink/index.js +2 -0
- package/src/components/atoms/DXLoader/DXLoader.stories.js +280 -0
- package/src/components/atoms/DXLoader/DXLoader.vue +78 -0
- package/src/components/atoms/DXLoader/index.js +2 -0
- package/src/components/atoms/DXProgress/DXProgress.stories.js +312 -0
- package/src/components/atoms/DXProgress/DXProgress.vue +85 -0
- package/src/components/atoms/DXProgress/index.js +2 -0
- package/src/components/atoms/DXQuote/DXQuote.stories.js +255 -0
- package/src/components/atoms/DXQuote/DXQuote.vue +97 -0
- package/src/components/atoms/DXQuote/index.js +2 -0
- package/src/components/atoms/DXRadio/DXRadio.stories.js +277 -0
- package/src/components/atoms/DXRadio/DXRadio.vue +144 -0
- package/src/components/atoms/DXRadio/index.js +2 -0
- package/src/components/atoms/DXSkeleton/DXSkeleton.stories.js +50 -0
- package/src/components/atoms/DXSkeleton/DXSkeleton.vue +19 -0
- package/src/components/atoms/DXSkeleton/index.js +2 -0
- package/src/components/atoms/DXSlider/DXSlider.stories.js +522 -0
- package/src/components/atoms/DXSlider/DXSlider.vue +338 -0
- package/src/components/atoms/DXSlider/index.js +2 -0
- package/src/components/atoms/DXTags/DXTags.stories.js +206 -0
- package/src/components/atoms/DXTags/DXTags.vue +111 -0
- package/src/components/atoms/DXTags/index.js +2 -0
- package/src/components/atoms/DXToast/DXToast.stories.js +40 -0
- package/src/components/atoms/DXToast/DXToast.vue +32 -0
- package/src/components/atoms/DXToast/index.js +2 -0
- package/src/components/atoms/DXToggle/DXToggle.stories.js +143 -0
- package/src/components/atoms/DXToggle/DXToggle.vue +142 -0
- package/src/components/atoms/DXToggle/index.js +2 -0
- package/src/components/atoms/DXToggleButton/DXToggleButton.stories.js +513 -0
- package/src/components/atoms/DXToggleButton/DXToggleButton.vue +140 -0
- package/src/components/atoms/DXToggleButton/index.js +2 -0
- package/src/components/atoms/DXTooltip/DXTooltip.stories.js +243 -0
- package/src/components/atoms/DXTooltip/DXTooltip.vue +151 -0
- package/src/components/atoms/DXTooltip/index.js +2 -0
- package/src/components/atoms/index.js +24 -0
- package/src/components/index.js +20 -0
- package/src/components/layout/DXBox/DXBox.stories.js +238 -0
- package/src/components/layout/DXBox/DXBox.vue +198 -0
- package/src/components/layout/DXBox/index.js +2 -0
- package/src/components/layout/DXContainer/DXContainer.stories.js +147 -0
- package/src/components/layout/DXContainer/DXContainer.vue +83 -0
- package/src/components/layout/DXContainer/index.js +2 -0
- package/src/components/layout/DXFlex/DXFlex.stories.js +210 -0
- package/src/components/layout/DXFlex/DXFlex.vue +149 -0
- package/src/components/layout/DXFlex/index.js +2 -0
- package/src/components/layout/DXGrid/DXGrid.stories.js +238 -0
- package/src/components/layout/DXGrid/DXGrid.vue +167 -0
- package/src/components/layout/DXGrid/index.js +2 -0
- package/src/components/layout/DXSpacer/DXSpacer.stories.js +187 -0
- package/src/components/layout/DXSpacer/DXSpacer.vue +102 -0
- package/src/components/layout/DXSpacer/index.js +2 -0
- package/src/components/layout/DXStack/DXStack.stories.js +199 -0
- package/src/components/layout/DXStack/DXStack.vue +140 -0
- package/src/components/layout/DXStack/index.js +2 -0
- package/src/components/layout/index.js +8 -0
- package/src/components/molecules/DXActionButtons/DXActionButtons.stories.js +288 -0
- package/src/components/molecules/DXActionButtons/DXActionButtons.vue +106 -0
- package/src/components/molecules/DXActionButtons/index.js +2 -0
- package/src/components/molecules/DXAlert/DXAlert.stories.js +70 -0
- package/src/components/molecules/DXAlert/DXAlert.vue +116 -0
- package/src/components/molecules/DXAlert/index.js +2 -0
- package/src/components/molecules/DXBaseTable/DXBaseTable.stories.js +433 -0
- package/src/components/molecules/DXBaseTable/DXBaseTable.vue +459 -0
- package/src/components/molecules/DXBaseTable/index.js +4 -0
- package/src/components/molecules/DXBreadcrumb/DXBreadcrumb.stories.js +227 -0
- package/src/components/molecules/DXBreadcrumb/DXBreadcrumb.vue +96 -0
- package/src/components/molecules/DXBreadcrumb/index.js +2 -0
- package/src/components/molecules/DXButtonGroup/DXButtonGroup.stories.js +26 -0
- package/src/components/molecules/DXButtonGroup/DXButtonGroup.vue +78 -0
- package/src/components/molecules/DXButtonGroup/index.js +2 -0
- package/src/components/molecules/DXCloseButton/DXCloseButton.stories.js +53 -0
- package/src/components/molecules/DXCloseButton/DXCloseButton.vue +62 -0
- package/src/components/molecules/DXCloseButton/index.js +3 -0
- package/src/components/molecules/DXComboBox/DXComboBox.stories.js +62 -0
- package/src/components/molecules/DXComboBox/DXComboBox.vue +167 -0
- package/src/components/molecules/DXComboBox/index.js +2 -0
- package/src/components/molecules/DXCopyField/DXCopyField.stories.js +231 -0
- package/src/components/molecules/DXCopyField/DXCopyField.vue +75 -0
- package/src/components/molecules/DXCopyField/index.js +2 -0
- package/src/components/molecules/DXDataFilter/DXDataFilter.stories.js +275 -0
- package/src/components/molecules/DXDataFilter/DXDataFilter.vue +385 -0
- package/src/components/molecules/DXDataFilter/index.js +2 -0
- package/src/components/molecules/DXDatePicker/DXDatePicker.stories.js +42 -0
- package/src/components/molecules/DXDatePicker/DXDatePicker.vue +121 -0
- package/src/components/molecules/DXDatePicker/index.js +2 -0
- package/src/components/molecules/DXDropdownDivider/DXDropdownDivider.vue +30 -0
- package/src/components/molecules/DXDropdownDivider/index.js +2 -0
- package/src/components/molecules/DXFileUpload/DXFileUpload.stories.js +53 -0
- package/src/components/molecules/DXFileUpload/DXFileUpload.vue +199 -0
- package/src/components/molecules/DXFileUpload/index.js +2 -0
- package/src/components/molecules/DXFilterGroup/DXFilterGroup.stories.js +43 -0
- package/src/components/molecules/DXFilterGroup/DXFilterGroup.vue +43 -0
- package/src/components/molecules/DXFilterGroup/index.js +2 -0
- package/src/components/molecules/DXFormControl/DXFormControl.stories.js +69 -0
- package/src/components/molecules/DXFormControl/DXFormControl.vue +72 -0
- package/src/components/molecules/DXFormControl/index.js +2 -0
- package/src/components/molecules/DXInput/DXInput.stories.js +291 -0
- package/src/components/molecules/DXInput/DXInput.vue +156 -0
- package/src/components/molecules/DXInput/index.js +3 -0
- package/src/components/molecules/DXInputGroup/DXInputGroup.stories.js +228 -0
- package/src/components/molecules/DXInputGroup/DXInputGroup.vue +64 -0
- package/src/components/molecules/DXInputGroup/index.js +2 -0
- package/src/components/molecules/DXInputMask/DXInputMask.stories.js +53 -0
- package/src/components/molecules/DXInputMask/DXInputMask.vue +89 -0
- package/src/components/molecules/DXInputMask/index.js +2 -0
- package/src/components/molecules/DXMenu/DXMenu.stories.js +379 -0
- package/src/components/molecules/DXMenu/DXMenu.vue +331 -0
- package/src/components/molecules/DXMenu/README.md +479 -0
- package/src/components/molecules/DXMenu/index.js +2 -0
- package/src/components/molecules/DXPagination/DXPagination.stories.js +62 -0
- package/src/components/molecules/DXPagination/DXPagination.vue +123 -0
- package/src/components/molecules/DXPagination/index.js +2 -0
- package/src/components/molecules/DXPasswordInput/DXPasswordInput.stories.js +42 -0
- package/src/components/molecules/DXPasswordInput/DXPasswordInput.vue +74 -0
- package/src/components/molecules/DXPasswordInput/index.js +2 -0
- package/src/components/molecules/DXRadioCard/DXRadioCard.stories.js +60 -0
- package/src/components/molecules/DXRadioCard/DXRadioCard.vue +71 -0
- package/src/components/molecules/DXRadioCard/index.js +2 -0
- package/src/components/molecules/DXRadioGroup/DXRadioGroup.stories.js +297 -0
- package/src/components/molecules/DXRadioGroup/DXRadioGroup.vue +73 -0
- package/src/components/molecules/DXRadioGroup/index.js +2 -0
- package/src/components/molecules/DXRating/DXRating.stories.js +322 -0
- package/src/components/molecules/DXRating/DXRating.vue +402 -0
- package/src/components/molecules/DXRating/index.js +2 -0
- package/src/components/molecules/DXSearchBar/DXSearchBar.stories.js +357 -0
- package/src/components/molecules/DXSearchBar/DXSearchBar.vue +525 -0
- package/src/components/molecules/DXSearchBar/index.js +2 -0
- package/src/components/molecules/DXSearchSelect/DXSearchSelect.stories.js +50 -0
- package/src/components/molecules/DXSearchSelect/DXSearchSelect.vue +207 -0
- package/src/components/molecules/DXSearchSelect/index.js +2 -0
- package/src/components/molecules/DXSegmentedControl/DXSegmentedControl.stories.js +326 -0
- package/src/components/molecules/DXSegmentedControl/DXSegmentedControl.vue +116 -0
- package/src/components/molecules/DXSegmentedControl/index.js +2 -0
- package/src/components/molecules/DXSelect/DXSelect.stories.js +259 -0
- package/src/components/molecules/DXSelect/DXSelect.vue +149 -0
- package/src/components/molecules/DXSelect/index.js +3 -0
- package/src/components/molecules/DXStatCard/DXStatCard.stories.js +335 -0
- package/src/components/molecules/DXStatCard/DXStatCard.vue +309 -0
- package/src/components/molecules/DXStatCard/index.js +2 -0
- package/src/components/molecules/DXTableFiltersPanel/DXTableFiltersPanel.vue +72 -0
- package/src/components/molecules/DXTableFiltersPanel/index.js +7 -0
- package/src/components/molecules/DXTablePagination/DXTablePagination.stories.js +236 -0
- package/src/components/molecules/DXTablePagination/DXTablePagination.vue +93 -0
- package/src/components/molecules/DXTablePagination/index.js +2 -0
- package/src/components/molecules/DXTableToolbar/DXTableToolbar.stories.js +271 -0
- package/src/components/molecules/DXTableToolbar/DXTableToolbar.vue +102 -0
- package/src/components/molecules/DXTableToolbar/index.js +2 -0
- package/src/components/molecules/DXTextarea/DXTextarea.stories.js +239 -0
- package/src/components/molecules/DXTextarea/DXTextarea.vue +158 -0
- package/src/components/molecules/DXTextarea/index.js +3 -0
- package/src/components/molecules/DXTimePicker/DXTimePicker.stories.js +282 -0
- package/src/components/molecules/DXTimePicker/DXTimePicker.vue +640 -0
- package/src/components/molecules/DXTimePicker/index.js +2 -0
- package/src/components/molecules/DXValidationIcon/DXValidationIcon.stories.js +60 -0
- package/src/components/molecules/DXValidationIcon/DXValidationIcon.vue +53 -0
- package/src/components/molecules/DXValidationIcon/index.js +3 -0
- package/src/components/molecules/index.js +34 -0
- package/src/components/organisms/DXAccordion/DXAccordion.stories.js +33 -0
- package/src/components/organisms/DXAccordion/DXAccordion.vue +104 -0
- package/src/components/organisms/DXAccordion/index.js +2 -0
- package/src/components/organisms/DXAppLayout/DXAppLayout.stories.js +689 -0
- package/src/components/organisms/DXAppLayout/DXAppLayout.vue +460 -0
- package/src/components/organisms/DXAppLayout/index.js +2 -0
- package/src/components/organisms/DXAuthenticationForm/DXAuthenticationForm.stories.js +232 -0
- package/src/components/organisms/DXAuthenticationForm/DXAuthenticationForm.vue +458 -0
- package/src/components/organisms/DXAuthenticationForm/index.js +2 -0
- package/src/components/organisms/DXChartContainer/DXChartContainer.stories.js +286 -0
- package/src/components/organisms/DXChartContainer/DXChartContainer.vue +273 -0
- package/src/components/organisms/DXChartContainer/index.js +2 -0
- package/src/components/organisms/DXChatInterface/DXChatInterface.stories.js +164 -0
- package/src/components/organisms/DXChatInterface/DXChatInterface.vue +583 -0
- package/src/components/organisms/DXChatInterface/index.js +2 -0
- package/src/components/organisms/DXCommentSection/DXCommentSection.stories.js +173 -0
- package/src/components/organisms/DXCommentSection/DXCommentSection.vue +487 -0
- package/src/components/organisms/DXCommentSection/index.js +2 -0
- package/src/components/organisms/DXDashboardGrid/DXDashboardGrid.stories.js +331 -0
- package/src/components/organisms/DXDashboardGrid/DXDashboardGrid.vue +309 -0
- package/src/components/organisms/DXDashboardGrid/index.js +2 -0
- package/src/components/organisms/DXDashboardWidget/DXDashboardWidget.stories.js +271 -0
- package/src/components/organisms/DXDashboardWidget/DXDashboardWidget.vue +260 -0
- package/src/components/organisms/DXDashboardWidget/index.js +2 -0
- package/src/components/organisms/DXDataTable/DXDataTable.stories.js +247 -0
- package/src/components/organisms/DXDataTable/DXDataTable.vue +496 -0
- package/src/components/organisms/DXDataTable/index.js +2 -0
- package/src/components/organisms/DXDropdown/DXDropdown.stories.js +795 -0
- package/src/components/organisms/DXDropdown/DXDropdown.vue +238 -0
- package/src/components/organisms/DXDropdown/index.js +2 -0
- package/src/components/organisms/DXEmptyState/DXEmptyState.stories.js +37 -0
- package/src/components/organisms/DXEmptyState/DXEmptyState.vue +41 -0
- package/src/components/organisms/DXEmptyState/index.js +2 -0
- package/src/components/organisms/DXFormWizard/DXFormWizard.stories.js +378 -0
- package/src/components/organisms/DXFormWizard/DXFormWizard.vue +578 -0
- package/src/components/organisms/DXFormWizard/index.js +2 -0
- package/src/components/organisms/DXHeaderBar/DXHeaderBar.stories.js +448 -0
- package/src/components/organisms/DXHeaderBar/DXHeaderBar.vue +190 -0
- package/src/components/organisms/DXHeaderBar/index.js +2 -0
- package/src/components/organisms/DXMediaGallery/DXMediaGallery.stories.js +347 -0
- package/src/components/organisms/DXMediaGallery/DXMediaGallery.vue +422 -0
- package/src/components/organisms/DXMediaGallery/index.js +2 -0
- package/src/components/organisms/DXModal/DXModal.stories.js +138 -0
- package/src/components/organisms/DXModal/DXModal.vue +213 -0
- package/src/components/organisms/DXModal/index.js +2 -0
- package/src/components/organisms/DXNotificationCenter/DXNotificationCenter.stories.js +183 -0
- package/src/components/organisms/DXNotificationCenter/DXNotificationCenter.vue +566 -0
- package/src/components/organisms/DXNotificationCenter/index.js +2 -0
- package/src/components/organisms/DXReportGenerator/DXReportGenerator.stories.js +199 -0
- package/src/components/organisms/DXReportGenerator/DXReportGenerator.vue +344 -0
- package/src/components/organisms/DXReportGenerator/index.js +2 -0
- package/src/components/organisms/DXSettingsPanel/DXSettingsPanel.stories.js +245 -0
- package/src/components/organisms/DXSettingsPanel/DXSettingsPanel.vue +454 -0
- package/src/components/organisms/DXSettingsPanel/index.js +2 -0
- package/src/components/organisms/DXSidebar/DXSidebar.stories.js +316 -0
- package/src/components/organisms/DXSidebar/DXSidebar.vue +212 -0
- package/src/components/organisms/DXSidebar/index.js +2 -0
- package/src/components/organisms/DXSidebarMenu/DATA_STRUCTURE.md +299 -0
- package/src/components/organisms/DXSidebarMenu/DXSidebarMenu.stories.js +729 -0
- package/src/components/organisms/DXSidebarMenu/DXSidebarMenu.vue +257 -0
- package/src/components/organisms/DXSidebarMenu/DXSidebarMenuItem.vue +249 -0
- package/src/components/organisms/DXSidebarMenu/README.md +333 -0
- package/src/components/organisms/DXSidebarMenu/index.js +3 -0
- package/src/components/organisms/DXTable/DXTable.stories.js +550 -0
- package/src/components/organisms/DXTable/DXTable.vue +324 -0
- package/src/components/organisms/DXTable/index.js +2 -0
- package/src/components/organisms/DXTabs/DXTabs.stories.js +407 -0
- package/src/components/organisms/DXTabs/DXTabs.vue +301 -0
- package/src/components/organisms/DXTabs/index.js +2 -0
- package/src/components/organisms/DXUserProfileCard/DXUserProfileCard.stories.js +194 -0
- package/src/components/organisms/DXUserProfileCard/DXUserProfileCard.vue +403 -0
- package/src/components/organisms/DXUserProfileCard/index.js +2 -0
- package/src/components/organisms/DXWizard/DXWizard.stories.js +212 -0
- package/src/components/organisms/DXWizard/DXWizard.vue +615 -0
- package/src/components/organisms/DXWizard/index.js +2 -0
- package/src/components/organisms/index.js +25 -0
- package/src/components/typography/DXBlockquote/DXBlockquote.stories.js +33 -0
- package/src/components/typography/DXBlockquote/DXBlockquote.vue +44 -0
- package/src/components/typography/DXBlockquote/index.js +2 -0
- package/src/components/typography/DXCode/DXCode.stories.js +29 -0
- package/src/components/typography/DXCode/DXCode.vue +46 -0
- package/src/components/typography/DXCode/index.js +2 -0
- package/src/components/typography/DXHeading/DXHeading.stories.js +54 -0
- package/src/components/typography/DXHeading/DXHeading.vue +68 -0
- package/src/components/typography/DXHeading/index.js +2 -0
- package/src/components/typography/DXLabel/DXLabel.stories.js +40 -0
- package/src/components/typography/DXLabel/DXLabel.vue +49 -0
- package/src/components/typography/DXLabel/index.js +2 -0
- package/src/components/typography/DXList/DXList.stories.js +50 -0
- package/src/components/typography/DXList/DXList.vue +55 -0
- package/src/components/typography/DXList/index.js +2 -0
- package/src/components/typography/DXText/DXText.stories.js +47 -0
- package/src/components/typography/DXText/DXText.vue +67 -0
- package/src/components/typography/DXText/index.js +2 -0
- package/src/components/typography/index.js +8 -0
- package/src/components/utilities/DXAnimatePresence/DXAnimatePresence.stories.js +335 -0
- package/src/components/utilities/DXAnimatePresence/DXAnimatePresence.vue +207 -0
- package/src/components/utilities/DXAnimatePresence/index.js +2 -0
- package/src/components/utilities/DXBreakpointProvider/DXBreakpointProvider.stories.js +321 -0
- package/src/components/utilities/DXBreakpointProvider/DXBreakpointProvider.vue +158 -0
- package/src/components/utilities/DXBreakpointProvider/index.js +2 -0
- package/src/components/utilities/DXObserver/DXObserver.stories.js +324 -0
- package/src/components/utilities/DXObserver/DXObserver.vue +182 -0
- package/src/components/utilities/DXObserver/index.js +2 -0
- package/src/components/utilities/DXPortal/DXPortal.stories.js +267 -0
- package/src/components/utilities/DXPortal/DXPortal.vue +69 -0
- package/src/components/utilities/DXPortal/index.js +2 -0
- package/src/components/utilities/DXStaggeredAnimation/DXStaggeredAnimation.stories.js +339 -0
- package/src/components/utilities/DXStaggeredAnimation/DXStaggeredAnimation.vue +155 -0
- package/src/components/utilities/DXStaggeredAnimation/index.js +2 -0
- package/src/components/utilities/DXThemeProvider/DXThemeProvider.stories.js +327 -0
- package/src/components/utilities/DXThemeProvider/DXThemeProvider.vue +227 -0
- package/src/components/utilities/DXThemeProvider/index.js +2 -0
- package/src/components/utilities/DXTransitionGroup/DXTransitionGroup.stories.js +368 -0
- package/src/components/utilities/DXTransitionGroup/DXTransitionGroup.vue +212 -0
- package/src/components/utilities/DXTransitionGroup/index.js +2 -0
- package/src/components/utilities/index.js +9 -0
- package/src/composables/useAnimation.js +264 -0
- package/src/composables/useClassComposition.js +35 -0
- package/src/composables/useDataAttributes.js +83 -0
- package/src/composables/useMenu.js +88 -0
- package/src/composables/useSize.js +135 -0
- package/src/composables/useSpacing.js +37 -0
- package/src/composables/useTableColumns.js +88 -0
- package/src/composables/useTableData.js +82 -0
- package/src/composables/useTableFilter.js +158 -0
- package/src/composables/useTablePagination.js +89 -0
- package/src/composables/useTableSelection.js +77 -0
- package/src/composables/useTableSort.js +75 -0
- package/src/composables/useTabsScroll.js +88 -0
- package/src/composables/useVariant.js +700 -0
- package/src/index.js +86 -0
- package/src/styles/animations.css +171 -0
- package/src/styles/index.css +99 -0
- package/src/styles/tokens.js +123 -0
- package/src/utils/propTypes.js +77 -0
- package/src/utils/toggleButtonPresets.js +115 -0
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<component :is="tag" :class="boxClasses" data-component="DXBox">
|
|
3
|
+
<slot />
|
|
4
|
+
</component>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script setup>
|
|
8
|
+
import { computed } from "vue";
|
|
9
|
+
import { useSpacing } from "@/composables/useSpacing";
|
|
10
|
+
import { useClassComposition } from "@/composables/useClassComposition";
|
|
11
|
+
|
|
12
|
+
const props = defineProps({
|
|
13
|
+
/** HTML тег */
|
|
14
|
+
tag: { type: String, default: "div" },
|
|
15
|
+
/** Padding: none | xs | sm | md | lg | xl */
|
|
16
|
+
p: { type: String, default: "" },
|
|
17
|
+
/** Padding X (horizontal) */
|
|
18
|
+
px: { type: String, default: "" },
|
|
19
|
+
/** Padding Y (vertical) */
|
|
20
|
+
py: { type: String, default: "" },
|
|
21
|
+
/** Margin: none | xs | sm | md | lg | xl | auto */
|
|
22
|
+
m: { type: String, default: "" },
|
|
23
|
+
/** Margin X (horizontal) */
|
|
24
|
+
mx: { type: String, default: "" },
|
|
25
|
+
/** Margin Y (vertical) */
|
|
26
|
+
my: { type: String, default: "" },
|
|
27
|
+
/** Скругление: none | sm | md | lg | xl | 2xl | full */
|
|
28
|
+
rounded: { type: String, default: "" },
|
|
29
|
+
/** Фон: white | slate | transparent */
|
|
30
|
+
bg: { type: String, default: "" },
|
|
31
|
+
/** Тень: none | sm | md | lg | xl */
|
|
32
|
+
shadow: { type: String, default: "" },
|
|
33
|
+
/** Рамка */
|
|
34
|
+
border: { type: Boolean, default: false },
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Классы padding
|
|
39
|
+
*
|
|
40
|
+
* @description
|
|
41
|
+
* Вычисляет классы для padding используя useSpacing composable.
|
|
42
|
+
* Поддерживает общий padding (p), горизонтальный (px) и вертикальный (py).
|
|
43
|
+
*
|
|
44
|
+
* @returns {string|Object} Классы padding или объект для условных классов
|
|
45
|
+
*/
|
|
46
|
+
const paddingClasses = computed(() => {
|
|
47
|
+
const classes = {};
|
|
48
|
+
|
|
49
|
+
if (props.p) {
|
|
50
|
+
const paddingClass = useSpacing(props.p, 'padding');
|
|
51
|
+
if (paddingClass) classes[paddingClass] = true;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
if (props.px) {
|
|
55
|
+
const paddingXClass = useSpacing(props.px, 'paddingX');
|
|
56
|
+
if (paddingXClass) classes[paddingXClass] = true;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
if (props.py) {
|
|
60
|
+
const paddingYClass = useSpacing(props.py, 'paddingY');
|
|
61
|
+
if (paddingYClass) classes[paddingYClass] = true;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
return Object.keys(classes).length > 0 ? classes : null;
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Классы margin
|
|
69
|
+
*
|
|
70
|
+
* @description
|
|
71
|
+
* Вычисляет классы для margin используя useSpacing composable.
|
|
72
|
+
* Поддерживает общий margin (m), горизонтальный (mx) и вертикальный (my).
|
|
73
|
+
* Для значения "auto" используется специальная обработка.
|
|
74
|
+
*
|
|
75
|
+
* @returns {string|Object} Классы margin или объект для условных классов
|
|
76
|
+
*/
|
|
77
|
+
const marginClasses = computed(() => {
|
|
78
|
+
const classes = {};
|
|
79
|
+
|
|
80
|
+
if (props.m) {
|
|
81
|
+
if (props.m === "auto") {
|
|
82
|
+
classes["m-auto"] = true;
|
|
83
|
+
} else {
|
|
84
|
+
const marginClass = useSpacing(props.m, 'margin');
|
|
85
|
+
if (marginClass) classes[marginClass] = true;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
if (props.mx) {
|
|
90
|
+
if (props.mx === "auto") {
|
|
91
|
+
classes["mx-auto"] = true;
|
|
92
|
+
} else {
|
|
93
|
+
const marginXClass = useSpacing(props.mx, 'marginX');
|
|
94
|
+
if (marginXClass) classes[marginXClass] = true;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
if (props.my) {
|
|
99
|
+
if (props.my === "auto") {
|
|
100
|
+
classes["my-auto"] = true;
|
|
101
|
+
} else {
|
|
102
|
+
const marginYClass = useSpacing(props.my, 'marginY');
|
|
103
|
+
if (marginYClass) classes[marginYClass] = true;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
return Object.keys(classes).length > 0 ? classes : null;
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Классы скругления углов
|
|
112
|
+
*
|
|
113
|
+
* @description
|
|
114
|
+
* Определяет классы для border-radius в зависимости от значения rounded prop.
|
|
115
|
+
*
|
|
116
|
+
* @returns {string|null} Tailwind CSS класс для скругления или null
|
|
117
|
+
*/
|
|
118
|
+
const roundedClass = computed(() => {
|
|
119
|
+
if (!props.rounded) return null;
|
|
120
|
+
|
|
121
|
+
const roundedClasses = {
|
|
122
|
+
none: "rounded-none",
|
|
123
|
+
sm: "rounded-sm",
|
|
124
|
+
md: "rounded-md",
|
|
125
|
+
lg: "rounded-lg",
|
|
126
|
+
xl: "rounded-xl",
|
|
127
|
+
"2xl": "rounded-2xl",
|
|
128
|
+
full: "rounded-full",
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
return roundedClasses[props.rounded] || `rounded-${props.rounded}`;
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Классы фона
|
|
136
|
+
*
|
|
137
|
+
* @description
|
|
138
|
+
* Определяет классы для background-color в зависимости от значения bg prop.
|
|
139
|
+
*
|
|
140
|
+
* @returns {string|null} Tailwind CSS класс для фона или null
|
|
141
|
+
*/
|
|
142
|
+
const bgClass = computed(() => {
|
|
143
|
+
if (!props.bg) return null;
|
|
144
|
+
|
|
145
|
+
const bgClasses = {
|
|
146
|
+
white: "bg-white",
|
|
147
|
+
slate: "bg-slate-50",
|
|
148
|
+
transparent: "bg-transparent",
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
return bgClasses[props.bg] || props.bg;
|
|
152
|
+
});
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Классы тени
|
|
156
|
+
*
|
|
157
|
+
* @description
|
|
158
|
+
* Определяет классы для box-shadow в зависимости от значения shadow prop.
|
|
159
|
+
*
|
|
160
|
+
* @returns {string|null} Tailwind CSS класс для тени или null
|
|
161
|
+
*/
|
|
162
|
+
const shadowClass = computed(() => {
|
|
163
|
+
if (!props.shadow) return null;
|
|
164
|
+
|
|
165
|
+
const shadowClasses = {
|
|
166
|
+
none: "shadow-none",
|
|
167
|
+
sm: "shadow-sm",
|
|
168
|
+
md: "shadow",
|
|
169
|
+
lg: "shadow-lg",
|
|
170
|
+
xl: "shadow-xl",
|
|
171
|
+
};
|
|
172
|
+
|
|
173
|
+
return shadowClasses[props.shadow] || `shadow-${props.shadow}`;
|
|
174
|
+
});
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* Все классы для box компонента
|
|
178
|
+
*
|
|
179
|
+
* @description
|
|
180
|
+
* Объединяет все классы стилизации (padding, margin, rounded, bg, shadow, border)
|
|
181
|
+
* с использованием useClassComposition для единообразного подхода.
|
|
182
|
+
*
|
|
183
|
+
* @returns {Array} Массив классов для применения к элементу
|
|
184
|
+
*/
|
|
185
|
+
const boxClasses = computed(() =>
|
|
186
|
+
useClassComposition(
|
|
187
|
+
paddingClasses.value,
|
|
188
|
+
marginClasses.value,
|
|
189
|
+
roundedClass.value,
|
|
190
|
+
bgClass.value,
|
|
191
|
+
shadowClass.value,
|
|
192
|
+
{
|
|
193
|
+
"border border-slate-200": props.border,
|
|
194
|
+
}
|
|
195
|
+
)
|
|
196
|
+
);
|
|
197
|
+
</script>
|
|
198
|
+
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import DXContainer from './DXContainer.vue';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Layout/DXContainer',
|
|
5
|
+
component: DXContainer,
|
|
6
|
+
tags: ['autodocs'],
|
|
7
|
+
parameters: {
|
|
8
|
+
docs: {
|
|
9
|
+
description: {
|
|
10
|
+
component: `
|
|
11
|
+
# DXContainer
|
|
12
|
+
|
|
13
|
+
Контейнер с ограниченной шириной для центрирования контента на странице.
|
|
14
|
+
|
|
15
|
+
## Назначение
|
|
16
|
+
|
|
17
|
+
DXContainer - layout компонент для создания контейнеров с ограниченной максимальной шириной.
|
|
18
|
+
Автоматически центрирует контент на больших экранах, обеспечивая оптимальную читаемость и структуру страницы.
|
|
19
|
+
|
|
20
|
+
## Архитектура
|
|
21
|
+
|
|
22
|
+
### Использует
|
|
23
|
+
- \`useSpacing\` composable - для унификации горизонтальных отступов (padding-x)
|
|
24
|
+
- \`useClassComposition\` composable - для объединения классов
|
|
25
|
+
|
|
26
|
+
### Используется в
|
|
27
|
+
- Основные layout страниц и разделов
|
|
28
|
+
- \`DXAppLayout\` - для контентной области
|
|
29
|
+
- Блоги и статьи
|
|
30
|
+
- Формы и модальные окна
|
|
31
|
+
- Любые места, где требуется ограничение ширины контента
|
|
32
|
+
|
|
33
|
+
## Внутренняя логика
|
|
34
|
+
|
|
35
|
+
### Адаптивные размеры
|
|
36
|
+
Компонент использует Tailwind классы \`max-w-screen-*\` для ограничения ширины:
|
|
37
|
+
- \`sm\` → \`max-w-screen-sm\` (640px)
|
|
38
|
+
- \`md\` → \`max-w-screen-md\` (768px)
|
|
39
|
+
- \`lg\` → \`max-w-screen-lg\` (1024px)
|
|
40
|
+
- \`xl\` → \`max-w-screen-xl\` (1280px)
|
|
41
|
+
- \`2xl\` → \`max-w-screen-2xl\` (1536px)
|
|
42
|
+
- \`full\` → \`max-w-full\` (100%)
|
|
43
|
+
|
|
44
|
+
### Автоматическое центрирование
|
|
45
|
+
По умолчанию контейнер центрируется через \`mx-auto\` (margin: 0 auto).
|
|
46
|
+
Это можно отключить через prop \`center={false}\`.
|
|
47
|
+
|
|
48
|
+
### Горизонтальные отступы
|
|
49
|
+
Компонент применяет горизонтальные отступы (padding-x) для создания пространства
|
|
50
|
+
от краев экрана на мобильных устройствах. Использует систему spacing из \`useSpacing\`.
|
|
51
|
+
|
|
52
|
+
## Особенности
|
|
53
|
+
|
|
54
|
+
### Адаптивная ширина
|
|
55
|
+
\`\`\`vue
|
|
56
|
+
<DXContainer size="lg">Content</DXContainer>
|
|
57
|
+
\`\`\`
|
|
58
|
+
|
|
59
|
+
### Без центрирования
|
|
60
|
+
\`\`\`vue
|
|
61
|
+
<DXContainer size="xl" :center="false">Left-aligned</DXContainer>
|
|
62
|
+
\`\`\`
|
|
63
|
+
|
|
64
|
+
### Кастомные отступы
|
|
65
|
+
\`\`\`vue
|
|
66
|
+
<DXContainer size="lg" padding="lg">Content with large padding</DXContainer>
|
|
67
|
+
\`\`\`
|
|
68
|
+
|
|
69
|
+
## Ограничения
|
|
70
|
+
|
|
71
|
+
- Размеры привязаны к Tailwind breakpoints
|
|
72
|
+
- Вертикальные отступы не управляются компонентом (используйте DXBox или CSS)
|
|
73
|
+
- Для кастомной максимальной ширины используйте CSS классы через \`class\` prop
|
|
74
|
+
`,
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
argTypes: {
|
|
79
|
+
size: {
|
|
80
|
+
control: 'select',
|
|
81
|
+
options: ['sm', 'md', 'lg', 'xl', '2xl', 'full'],
|
|
82
|
+
description: 'Максимальная ширина контейнера. Определяет максимальную ширину контента на больших экранах. Использует Tailwind классы max-w-screen-*.',
|
|
83
|
+
table: {
|
|
84
|
+
type: { summary: 'string' },
|
|
85
|
+
defaultValue: { summary: '"lg"' },
|
|
86
|
+
category: 'Layout',
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
center: {
|
|
90
|
+
control: 'boolean',
|
|
91
|
+
description: 'Автоматически центрировать контейнер. При true применяет mx-auto для горизонтального центрирования.',
|
|
92
|
+
table: {
|
|
93
|
+
type: { summary: 'boolean' },
|
|
94
|
+
defaultValue: { summary: 'true' },
|
|
95
|
+
category: 'Behavior',
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
padding: {
|
|
99
|
+
control: 'select',
|
|
100
|
+
options: ['none', 'xs', 'sm', 'md', 'lg', 'xl'],
|
|
101
|
+
description: 'Горизонтальные отступы (padding-x) контейнера. Создает пространство от краев экрана на мобильных устройствах. Использует систему spacing из useSpacing.',
|
|
102
|
+
table: {
|
|
103
|
+
type: { summary: 'string' },
|
|
104
|
+
defaultValue: { summary: '"md"' },
|
|
105
|
+
category: 'Spacing',
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
export const Default = {
|
|
112
|
+
args: { size: 'lg' },
|
|
113
|
+
parameters: {
|
|
114
|
+
docs: {
|
|
115
|
+
description: {
|
|
116
|
+
story: 'Базовый контейнер с размером lg. Автоматически центрируется и ограничивает ширину контента для оптимальной читаемости.',
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
},
|
|
120
|
+
render: (args) => ({
|
|
121
|
+
components: { DXContainer },
|
|
122
|
+
setup() { return { args }; },
|
|
123
|
+
template: '<DXContainer v-bind="args" class="bg-slate-100 py-8"><div class="bg-white p-4 rounded">Content inside container</div></DXContainer>',
|
|
124
|
+
}),
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
export const Sizes = {
|
|
128
|
+
parameters: {
|
|
129
|
+
docs: {
|
|
130
|
+
description: {
|
|
131
|
+
story: 'Все доступные размеры контейнера. Размер определяет максимальную ширину контента на больших экранах. На мобильных устройствах контейнер занимает всю ширину с учетом padding.',
|
|
132
|
+
},
|
|
133
|
+
},
|
|
134
|
+
},
|
|
135
|
+
render: () => ({
|
|
136
|
+
components: { DXContainer },
|
|
137
|
+
template: `
|
|
138
|
+
<div class="space-y-4">
|
|
139
|
+
<DXContainer size="sm" class="bg-blue-100 py-4"><div class="bg-white p-2 rounded">Small</div></DXContainer>
|
|
140
|
+
<DXContainer size="md" class="bg-green-100 py-4"><div class="bg-white p-2 rounded">Medium</div></DXContainer>
|
|
141
|
+
<DXContainer size="lg" class="bg-yellow-100 py-4"><div class="bg-white p-2 rounded">Large</div></DXContainer>
|
|
142
|
+
<DXContainer size="xl" class="bg-red-100 py-4"><div class="bg-white p-2 rounded">Extra Large</div></DXContainer>
|
|
143
|
+
</div>
|
|
144
|
+
`,
|
|
145
|
+
}),
|
|
146
|
+
};
|
|
147
|
+
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
:class="containerClasses"
|
|
4
|
+
data-component="DXContainer"
|
|
5
|
+
:data-size="size"
|
|
6
|
+
:data-padding="padding"
|
|
7
|
+
:data-center="center"
|
|
8
|
+
>
|
|
9
|
+
<slot />
|
|
10
|
+
</div>
|
|
11
|
+
</template>
|
|
12
|
+
|
|
13
|
+
<script setup>
|
|
14
|
+
import { computed } from "vue";
|
|
15
|
+
import { useSpacing } from "@/composables/useSpacing";
|
|
16
|
+
import { useClassComposition } from "@/composables/useClassComposition";
|
|
17
|
+
|
|
18
|
+
const props = defineProps({
|
|
19
|
+
/** Максимальная ширина: sm | md | lg | xl | 2xl | full */
|
|
20
|
+
size: { type: String, default: "lg" },
|
|
21
|
+
/** Центрировать контейнер */
|
|
22
|
+
center: { type: Boolean, default: true },
|
|
23
|
+
/** Горизонтальные отступы: none | xs | sm | md | lg | xl */
|
|
24
|
+
padding: { type: String, default: "md" },
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
const BASE_CLASSES = "w-full";
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Классы максимальной ширины контейнера
|
|
31
|
+
*
|
|
32
|
+
* @description
|
|
33
|
+
* Определяет максимальную ширину контейнера в зависимости от размера экрана.
|
|
34
|
+
* Используется для ограничения ширины контента на больших экранах.
|
|
35
|
+
*
|
|
36
|
+
* @returns {string} Tailwind CSS класс для максимальной ширины
|
|
37
|
+
*/
|
|
38
|
+
const sizeClass = computed(() => {
|
|
39
|
+
const sizeClasses = {
|
|
40
|
+
sm: "max-w-screen-sm",
|
|
41
|
+
md: "max-w-screen-md",
|
|
42
|
+
lg: "max-w-screen-lg",
|
|
43
|
+
xl: "max-w-screen-xl",
|
|
44
|
+
"2xl": "max-w-screen-2xl",
|
|
45
|
+
full: "max-w-full",
|
|
46
|
+
};
|
|
47
|
+
return sizeClasses[props.size] || sizeClasses.lg;
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Классы горизонтальных отступов
|
|
52
|
+
*
|
|
53
|
+
* @description
|
|
54
|
+
* Использует useSpacing composable для унификации отступов.
|
|
55
|
+
* Применяет горизонтальные отступы (padding-x) к контейнеру.
|
|
56
|
+
*
|
|
57
|
+
* @returns {string} Tailwind CSS класс для горизонтальных отступов
|
|
58
|
+
*/
|
|
59
|
+
const paddingClass = computed(() => {
|
|
60
|
+
return useSpacing(props.padding, 'paddingX');
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Все классы для контейнера
|
|
65
|
+
*
|
|
66
|
+
* @description
|
|
67
|
+
* Объединяет базовые классы, размер, отступы и центрирование
|
|
68
|
+
* с использованием useClassComposition для единообразного подхода.
|
|
69
|
+
*
|
|
70
|
+
* @returns {Array} Массив классов для применения к элементу
|
|
71
|
+
*/
|
|
72
|
+
const containerClasses = computed(() =>
|
|
73
|
+
useClassComposition(
|
|
74
|
+
BASE_CLASSES,
|
|
75
|
+
sizeClass.value,
|
|
76
|
+
paddingClass.value,
|
|
77
|
+
{
|
|
78
|
+
"mx-auto": props.center,
|
|
79
|
+
}
|
|
80
|
+
)
|
|
81
|
+
);
|
|
82
|
+
</script>
|
|
83
|
+
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
import DXFlex from './DXFlex.vue';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Layout/DXFlex',
|
|
5
|
+
component: DXFlex,
|
|
6
|
+
tags: ['autodocs'],
|
|
7
|
+
parameters: {
|
|
8
|
+
docs: {
|
|
9
|
+
description: {
|
|
10
|
+
component: `
|
|
11
|
+
# DXFlex
|
|
12
|
+
|
|
13
|
+
Flexbox контейнер с полным контролем над направлением, выравниванием и отступами.
|
|
14
|
+
|
|
15
|
+
## Назначение
|
|
16
|
+
|
|
17
|
+
DXFlex - мощный layout компонент для создания гибких макетов с использованием CSS Flexbox.
|
|
18
|
+
Предоставляет полный контроль над всеми аспектами flex контейнера: направлением, выравниванием, переносом и отступами.
|
|
19
|
+
|
|
20
|
+
## Архитектура
|
|
21
|
+
|
|
22
|
+
### Использует
|
|
23
|
+
- \`useSize\` composable - для унификации отступов между элементами (gap)
|
|
24
|
+
- \`useClassComposition\` composable - для объединения классов
|
|
25
|
+
|
|
26
|
+
### Используется в
|
|
27
|
+
- Навигационные панели и меню
|
|
28
|
+
- Карточки и списки элементов
|
|
29
|
+
- Формы и группы полей
|
|
30
|
+
- Заголовки и футеры
|
|
31
|
+
- Любые места, требующие гибкого расположения элементов
|
|
32
|
+
|
|
33
|
+
## Внутренняя логика
|
|
34
|
+
|
|
35
|
+
### Направление (direction)
|
|
36
|
+
Определяет главную ось flex контейнера:
|
|
37
|
+
- \`row\` - горизонтально (слева направо)
|
|
38
|
+
- \`row-reverse\` - горизонтально (справа налево)
|
|
39
|
+
- \`col\` - вертикально (сверху вниз)
|
|
40
|
+
- \`col-reverse\` - вертикально (снизу вверх)
|
|
41
|
+
|
|
42
|
+
### Выравнивание по главной оси (justify)
|
|
43
|
+
Управляет распределением элементов по главной оси:
|
|
44
|
+
- \`start\`, \`center\`, \`end\` - выравнивание
|
|
45
|
+
- \`between\` - пространство между элементами
|
|
46
|
+
- \`around\` - пространство вокруг элементов
|
|
47
|
+
- \`evenly\` - равномерное распределение
|
|
48
|
+
|
|
49
|
+
### Выравнивание по поперечной оси (align)
|
|
50
|
+
Управляет выравниванием элементов по поперечной оси:
|
|
51
|
+
- \`start\`, \`center\`, \`end\` - выравнивание
|
|
52
|
+
- \`stretch\` - растягивание на всю высоту/ширину
|
|
53
|
+
- \`baseline\` - выравнивание по базовой линии текста
|
|
54
|
+
|
|
55
|
+
### Gap система
|
|
56
|
+
Использует \`useSize\` с типом \`spacing\` для вычисления gap между элементами.
|
|
57
|
+
Это обеспечивает единообразный подход к размерам gap во всех layout компонентах.
|
|
58
|
+
|
|
59
|
+
## Особенности
|
|
60
|
+
|
|
61
|
+
### Inline flex
|
|
62
|
+
\`\`\`vue
|
|
63
|
+
<DXFlex inline justify="center" align="center">
|
|
64
|
+
Inline flex container
|
|
65
|
+
</DXFlex>
|
|
66
|
+
\`\`\`
|
|
67
|
+
|
|
68
|
+
### Полный контроль над flex
|
|
69
|
+
\`\`\`vue
|
|
70
|
+
<DXFlex
|
|
71
|
+
direction="row"
|
|
72
|
+
justify="between"
|
|
73
|
+
align="center"
|
|
74
|
+
wrap="wrap"
|
|
75
|
+
gap="lg"
|
|
76
|
+
>
|
|
77
|
+
Flexible content
|
|
78
|
+
</DXFlex>
|
|
79
|
+
\`\`\`
|
|
80
|
+
|
|
81
|
+
### Вертикальный layout
|
|
82
|
+
\`\`\`vue
|
|
83
|
+
<DXFlex direction="col" gap="md" align="stretch">
|
|
84
|
+
<div>Item 1</div>
|
|
85
|
+
<div>Item 2</div>
|
|
86
|
+
</DXFlex>
|
|
87
|
+
\`\`\`
|
|
88
|
+
|
|
89
|
+
## Ограничения
|
|
90
|
+
|
|
91
|
+
- Gap использует предопределенные значения из \`useSpacing\` (none, xs, sm, md, lg, xl)
|
|
92
|
+
- Для кастомных gap значений используйте CSS классы через \`class\` prop
|
|
93
|
+
- Для упрощенного API используйте \`DXStack\` компонент
|
|
94
|
+
`,
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
argTypes: {
|
|
99
|
+
direction: {
|
|
100
|
+
control: 'select',
|
|
101
|
+
options: ['row', 'row-reverse', 'col', 'col-reverse'],
|
|
102
|
+
description: 'Направление главной оси flex контейнера. Определяет, как элементы располагаются: горизонтально (row) или вертикально (col).',
|
|
103
|
+
table: {
|
|
104
|
+
type: { summary: 'string' },
|
|
105
|
+
defaultValue: { summary: '"row"' },
|
|
106
|
+
category: 'Layout',
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
justify: {
|
|
110
|
+
control: 'select',
|
|
111
|
+
options: ['start', 'center', 'end', 'between', 'around', 'evenly'],
|
|
112
|
+
description: 'Выравнивание элементов по главной оси (justify-content). Управляет распределением пространства между элементами.',
|
|
113
|
+
table: {
|
|
114
|
+
type: { summary: 'string' },
|
|
115
|
+
defaultValue: { summary: '"start"' },
|
|
116
|
+
category: 'Alignment',
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
align: {
|
|
120
|
+
control: 'select',
|
|
121
|
+
options: ['start', 'center', 'end', 'stretch', 'baseline'],
|
|
122
|
+
description: 'Выравнивание элементов по поперечной оси (align-items). Определяет, как элементы выравниваются перпендикулярно главной оси.',
|
|
123
|
+
table: {
|
|
124
|
+
type: { summary: 'string' },
|
|
125
|
+
defaultValue: { summary: '"center"' },
|
|
126
|
+
category: 'Alignment',
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
wrap: {
|
|
130
|
+
control: 'select',
|
|
131
|
+
options: ['nowrap', 'wrap', 'wrap-reverse'],
|
|
132
|
+
description: 'Перенос элементов на новую строку (flex-wrap). Определяет, будут ли элементы переноситься, если не помещаются в одну строку.',
|
|
133
|
+
table: {
|
|
134
|
+
type: { summary: 'string' },
|
|
135
|
+
defaultValue: { summary: '"nowrap"' },
|
|
136
|
+
category: 'Behavior',
|
|
137
|
+
},
|
|
138
|
+
},
|
|
139
|
+
gap: {
|
|
140
|
+
control: 'select',
|
|
141
|
+
options: ['none', 'xs', 'sm', 'md', 'lg', 'xl'],
|
|
142
|
+
description: 'Отступ между элементами (gap). Использует систему spacing из useSpacing для унификации отступов.',
|
|
143
|
+
table: {
|
|
144
|
+
type: { summary: 'string' },
|
|
145
|
+
defaultValue: { summary: '"md"' },
|
|
146
|
+
category: 'Spacing',
|
|
147
|
+
},
|
|
148
|
+
},
|
|
149
|
+
inline: {
|
|
150
|
+
control: 'boolean',
|
|
151
|
+
description: 'Использовать inline-flex вместо flex. Делает контейнер inline элементом, позволяя ему располагаться в строке с другими элементами.',
|
|
152
|
+
table: {
|
|
153
|
+
type: { summary: 'boolean' },
|
|
154
|
+
defaultValue: { summary: 'false' },
|
|
155
|
+
category: 'Behavior',
|
|
156
|
+
},
|
|
157
|
+
},
|
|
158
|
+
},
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
const box = '<div class="w-16 h-16 bg-slate-200 rounded-lg flex items-center justify-center">Box</div>';
|
|
162
|
+
|
|
163
|
+
export const Default = {
|
|
164
|
+
args: { justify: 'start', gap: 'md' },
|
|
165
|
+
parameters: {
|
|
166
|
+
docs: {
|
|
167
|
+
description: {
|
|
168
|
+
story: 'Базовый flex контейнер с горизонтальным направлением (row), выравниванием по началу и средним отступом между элементами. Это стандартная конфигурация для большинства случаев.',
|
|
169
|
+
},
|
|
170
|
+
},
|
|
171
|
+
},
|
|
172
|
+
render: (args) => ({
|
|
173
|
+
components: { DXFlex },
|
|
174
|
+
setup() { return { args }; },
|
|
175
|
+
template: `<DXFlex v-bind="args">${box.repeat(4)}</DXFlex>`,
|
|
176
|
+
}),
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
export const JustifyBetween = {
|
|
180
|
+
args: { justify: 'between', gap: 'md' },
|
|
181
|
+
parameters: {
|
|
182
|
+
docs: {
|
|
183
|
+
description: {
|
|
184
|
+
story: 'Flex контейнер с justify="between". Распределяет элементы с максимальным пространством между ними. Часто используется для навигационных панелей, где элементы должны быть по краям.',
|
|
185
|
+
},
|
|
186
|
+
},
|
|
187
|
+
},
|
|
188
|
+
render: (args) => ({
|
|
189
|
+
components: { DXFlex },
|
|
190
|
+
setup() { return { args }; },
|
|
191
|
+
template: `<DXFlex v-bind="args">${box.repeat(3)}</DXFlex>`,
|
|
192
|
+
}),
|
|
193
|
+
};
|
|
194
|
+
|
|
195
|
+
export const Column = {
|
|
196
|
+
args: { direction: 'col', gap: 'sm' },
|
|
197
|
+
parameters: {
|
|
198
|
+
docs: {
|
|
199
|
+
description: {
|
|
200
|
+
story: 'Вертикальный flex контейнер (direction="col"). Элементы располагаются друг под другом. Используется для создания вертикальных списков, форм и стеков элементов.',
|
|
201
|
+
},
|
|
202
|
+
},
|
|
203
|
+
},
|
|
204
|
+
render: (args) => ({
|
|
205
|
+
components: { DXFlex },
|
|
206
|
+
setup() { return { args }; },
|
|
207
|
+
template: `<DXFlex v-bind="args">${box.repeat(3)}</DXFlex>`,
|
|
208
|
+
}),
|
|
209
|
+
};
|
|
210
|
+
|