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,44 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<blockquote
|
|
3
|
+
:class="blockquoteClasses"
|
|
4
|
+
data-component="DXBlockquote"
|
|
5
|
+
:data-variant="variant"
|
|
6
|
+
>
|
|
7
|
+
<slot />
|
|
8
|
+
<footer v-if="cite || $slots.cite" class="mt-2 text-sm text-slate-500">
|
|
9
|
+
— <cite><slot name="cite">{{ cite }}</slot></cite>
|
|
10
|
+
</footer>
|
|
11
|
+
</blockquote>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<script setup>
|
|
15
|
+
import { computed } from "vue";
|
|
16
|
+
|
|
17
|
+
const props = defineProps({
|
|
18
|
+
/** Вариант: default | bordered | highlighted */
|
|
19
|
+
variant: { type: String, default: "bordered" },
|
|
20
|
+
/** Размер: sm | md | lg */
|
|
21
|
+
size: { type: String, default: "md" },
|
|
22
|
+
/** Источник цитаты */
|
|
23
|
+
cite: { type: String, default: "" },
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
const sizeClasses = {
|
|
27
|
+
sm: "text-sm",
|
|
28
|
+
md: "text-base",
|
|
29
|
+
lg: "text-lg",
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
const variantClasses = {
|
|
33
|
+
default: "text-slate-600 italic",
|
|
34
|
+
bordered: "border-l-4 border-slate-300 pl-4 text-slate-600 italic",
|
|
35
|
+
highlighted: "bg-slate-50 border-l-4 border-slate-400 pl-4 pr-4 py-3 rounded-r-lg text-slate-700",
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
const blockquoteClasses = computed(() => [
|
|
39
|
+
sizeClasses[props.size] || sizeClasses.md,
|
|
40
|
+
variantClasses[props.variant] || variantClasses.bordered,
|
|
41
|
+
"leading-relaxed",
|
|
42
|
+
]);
|
|
43
|
+
</script>
|
|
44
|
+
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import DXCode from './DXCode.vue';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Typography/DXCode',
|
|
5
|
+
component: DXCode,
|
|
6
|
+
tags: ['autodocs'],
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export const Inline = {
|
|
10
|
+
render: () => ({
|
|
11
|
+
components: { DXCode },
|
|
12
|
+
template: '<p>Используйте <DXCode>npm install</DXCode> для установки.</p>',
|
|
13
|
+
}),
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export const Block = {
|
|
17
|
+
args: { block: true },
|
|
18
|
+
render: (args) => ({
|
|
19
|
+
components: { DXCode },
|
|
20
|
+
setup() { return { args }; },
|
|
21
|
+
template: `<DXCode v-bind="args">const greeting = "Hello World";
|
|
22
|
+
console.log(greeting);
|
|
23
|
+
|
|
24
|
+
function add(a, b) {
|
|
25
|
+
return a + b;
|
|
26
|
+
}</DXCode>`,
|
|
27
|
+
}),
|
|
28
|
+
};
|
|
29
|
+
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<component
|
|
3
|
+
:is="block ? 'pre' : 'code'"
|
|
4
|
+
:class="codeClasses"
|
|
5
|
+
data-component="DXCode"
|
|
6
|
+
:data-block="block"
|
|
7
|
+
>
|
|
8
|
+
<code v-if="block"><slot /></code>
|
|
9
|
+
<slot v-else />
|
|
10
|
+
</component>
|
|
11
|
+
</template>
|
|
12
|
+
|
|
13
|
+
<script setup>
|
|
14
|
+
import { computed } from "vue";
|
|
15
|
+
|
|
16
|
+
const props = defineProps({
|
|
17
|
+
/** Блочный код (pre) или inline */
|
|
18
|
+
block: { type: Boolean, default: false },
|
|
19
|
+
/** Размер: xs | sm | md */
|
|
20
|
+
size: { type: String, default: "sm" },
|
|
21
|
+
/** Показывать номера строк (только для block) */
|
|
22
|
+
lineNumbers: { type: Boolean, default: false },
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
const sizeClasses = {
|
|
26
|
+
xs: "text-xs",
|
|
27
|
+
sm: "text-sm",
|
|
28
|
+
md: "text-base",
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
const codeClasses = computed(() => {
|
|
32
|
+
if (props.block) {
|
|
33
|
+
return [
|
|
34
|
+
"block w-full overflow-x-auto rounded-xl bg-slate-900 text-slate-100 p-4",
|
|
35
|
+
sizeClasses[props.size] || sizeClasses.sm,
|
|
36
|
+
"font-mono leading-relaxed",
|
|
37
|
+
];
|
|
38
|
+
}
|
|
39
|
+
return [
|
|
40
|
+
"inline-block px-1.5 py-0.5 rounded bg-slate-100 text-slate-800",
|
|
41
|
+
sizeClasses[props.size] || sizeClasses.sm,
|
|
42
|
+
"font-mono",
|
|
43
|
+
];
|
|
44
|
+
});
|
|
45
|
+
</script>
|
|
46
|
+
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import DXHeading from './DXHeading.vue';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Typography/DXHeading',
|
|
5
|
+
component: DXHeading,
|
|
6
|
+
tags: ['autodocs'],
|
|
7
|
+
argTypes: {
|
|
8
|
+
level: { control: { type: 'select' }, options: [1, 2, 3, 4, 5, 6] },
|
|
9
|
+
size: { control: { type: 'select' }, options: ['xs', 'sm', 'md', 'lg', 'xl', '2xl', '3xl', '4xl'] },
|
|
10
|
+
weight: { control: { type: 'select' }, options: ['normal', 'medium', 'semibold', 'bold'] },
|
|
11
|
+
color: { control: { type: 'select' }, options: ['default', 'muted', 'primary', 'success', 'warning', 'danger'] },
|
|
12
|
+
},
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export const Default = {
|
|
16
|
+
args: { level: 1 },
|
|
17
|
+
render: (args) => ({
|
|
18
|
+
components: { DXHeading },
|
|
19
|
+
setup() { return { args }; },
|
|
20
|
+
template: '<DXHeading v-bind="args">Заголовок страницы</DXHeading>',
|
|
21
|
+
}),
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export const AllLevels = {
|
|
25
|
+
render: () => ({
|
|
26
|
+
components: { DXHeading },
|
|
27
|
+
template: `
|
|
28
|
+
<div class="space-y-4">
|
|
29
|
+
<DXHeading :level="1">Heading 1</DXHeading>
|
|
30
|
+
<DXHeading :level="2">Heading 2</DXHeading>
|
|
31
|
+
<DXHeading :level="3">Heading 3</DXHeading>
|
|
32
|
+
<DXHeading :level="4">Heading 4</DXHeading>
|
|
33
|
+
<DXHeading :level="5">Heading 5</DXHeading>
|
|
34
|
+
<DXHeading :level="6">Heading 6</DXHeading>
|
|
35
|
+
</div>
|
|
36
|
+
`,
|
|
37
|
+
}),
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export const Colors = {
|
|
41
|
+
render: () => ({
|
|
42
|
+
components: { DXHeading },
|
|
43
|
+
template: `
|
|
44
|
+
<div class="space-y-2">
|
|
45
|
+
<DXHeading :level="3" color="default">Default Color</DXHeading>
|
|
46
|
+
<DXHeading :level="3" color="muted">Muted Color</DXHeading>
|
|
47
|
+
<DXHeading :level="3" color="success">Success Color</DXHeading>
|
|
48
|
+
<DXHeading :level="3" color="warning">Warning Color</DXHeading>
|
|
49
|
+
<DXHeading :level="3" color="danger">Danger Color</DXHeading>
|
|
50
|
+
</div>
|
|
51
|
+
`,
|
|
52
|
+
}),
|
|
53
|
+
};
|
|
54
|
+
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<component
|
|
3
|
+
:is="tag"
|
|
4
|
+
:class="headingClasses"
|
|
5
|
+
data-component="DXHeading"
|
|
6
|
+
:data-level="level"
|
|
7
|
+
:data-weight="weight"
|
|
8
|
+
:data-color="color"
|
|
9
|
+
>
|
|
10
|
+
<slot />
|
|
11
|
+
</component>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<script setup>
|
|
15
|
+
import { computed } from "vue";
|
|
16
|
+
import { useVariantText } from "@/composables/useVariant";
|
|
17
|
+
|
|
18
|
+
const props = defineProps({
|
|
19
|
+
/** Уровень заголовка: 1-6 */
|
|
20
|
+
level: { type: [Number, String], default: 1 },
|
|
21
|
+
/** Размер (переопределяет level): xs | sm | md | lg | xl | 2xl | 3xl | 4xl */
|
|
22
|
+
size: { type: String, default: "" },
|
|
23
|
+
/** Вес шрифта: normal | medium | semibold | bold */
|
|
24
|
+
weight: { type: String, default: "semibold" },
|
|
25
|
+
/** Цвет: default | muted | primary | success | warning | danger */
|
|
26
|
+
color: { type: String, default: "default" },
|
|
27
|
+
/** Обрезать текст с ... */
|
|
28
|
+
truncate: { type: Boolean, default: false },
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
const tag = computed(() => `h${props.level}`);
|
|
32
|
+
|
|
33
|
+
const sizeClasses = {
|
|
34
|
+
xs: "text-xs",
|
|
35
|
+
sm: "text-sm",
|
|
36
|
+
md: "text-base",
|
|
37
|
+
lg: "text-lg",
|
|
38
|
+
xl: "text-xl",
|
|
39
|
+
"2xl": "text-2xl",
|
|
40
|
+
"3xl": "text-3xl",
|
|
41
|
+
"4xl": "text-4xl",
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
const levelSizes = {
|
|
45
|
+
1: "text-4xl",
|
|
46
|
+
2: "text-3xl",
|
|
47
|
+
3: "text-2xl",
|
|
48
|
+
4: "text-xl",
|
|
49
|
+
5: "text-lg",
|
|
50
|
+
6: "text-base",
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
const weightClasses = {
|
|
54
|
+
normal: "font-normal",
|
|
55
|
+
medium: "font-medium",
|
|
56
|
+
semibold: "font-semibold",
|
|
57
|
+
bold: "font-bold",
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
const headingClasses = computed(() => [
|
|
61
|
+
props.size ? sizeClasses[props.size] : levelSizes[props.level],
|
|
62
|
+
weightClasses[props.weight] || weightClasses.semibold,
|
|
63
|
+
useVariantText(props.color),
|
|
64
|
+
"tracking-tight",
|
|
65
|
+
props.truncate && "truncate",
|
|
66
|
+
]);
|
|
67
|
+
</script>
|
|
68
|
+
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import DXLabel from './DXLabel.vue';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Typography/DXLabel',
|
|
5
|
+
component: DXLabel,
|
|
6
|
+
tags: ['autodocs'],
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export const Default = {
|
|
10
|
+
args: {},
|
|
11
|
+
render: (args) => ({
|
|
12
|
+
components: { DXLabel },
|
|
13
|
+
setup() { return { args }; },
|
|
14
|
+
template: '<DXLabel v-bind="args">Email адрес</DXLabel>',
|
|
15
|
+
}),
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export const Required = {
|
|
19
|
+
args: { required: true },
|
|
20
|
+
render: (args) => ({
|
|
21
|
+
components: { DXLabel },
|
|
22
|
+
setup() { return { args }; },
|
|
23
|
+
template: '<DXLabel v-bind="args">Обязательное поле</DXLabel>',
|
|
24
|
+
}),
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export const Sizes = {
|
|
28
|
+
render: () => ({
|
|
29
|
+
components: { DXLabel },
|
|
30
|
+
template: `
|
|
31
|
+
<div class="space-y-2">
|
|
32
|
+
<DXLabel size="xs">Extra Small Label</DXLabel>
|
|
33
|
+
<DXLabel size="sm">Small Label (default)</DXLabel>
|
|
34
|
+
<DXLabel size="md">Medium Label</DXLabel>
|
|
35
|
+
<DXLabel size="lg">Large Label</DXLabel>
|
|
36
|
+
</div>
|
|
37
|
+
`,
|
|
38
|
+
}),
|
|
39
|
+
};
|
|
40
|
+
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<label
|
|
3
|
+
:class="labelClasses"
|
|
4
|
+
:for="htmlFor"
|
|
5
|
+
data-component="DXLabel"
|
|
6
|
+
>
|
|
7
|
+
<slot />
|
|
8
|
+
<span v-if="required" class="text-rose-500 ml-0.5">*</span>
|
|
9
|
+
</label>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<script setup>
|
|
13
|
+
import { computed } from "vue";
|
|
14
|
+
import { useVariantText } from "@/composables/useVariant";
|
|
15
|
+
|
|
16
|
+
const props = defineProps({
|
|
17
|
+
/** ID связанного input */
|
|
18
|
+
htmlFor: { type: String, default: "" },
|
|
19
|
+
/** Размер: xs | sm | md | lg */
|
|
20
|
+
size: { type: String, default: "sm" },
|
|
21
|
+
/** Вес шрифта: normal | medium | semibold */
|
|
22
|
+
weight: { type: String, default: "medium" },
|
|
23
|
+
/** Цвет: default | muted | primary */
|
|
24
|
+
color: { type: String, default: "default" },
|
|
25
|
+
/** Обязательное поле */
|
|
26
|
+
required: { type: Boolean, default: false },
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
const sizeClasses = {
|
|
30
|
+
xs: "text-xs",
|
|
31
|
+
sm: "text-sm",
|
|
32
|
+
md: "text-base",
|
|
33
|
+
lg: "text-lg",
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
const weightClasses = {
|
|
37
|
+
normal: "font-normal",
|
|
38
|
+
medium: "font-medium",
|
|
39
|
+
semibold: "font-semibold",
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
const labelClasses = computed(() => [
|
|
43
|
+
"block",
|
|
44
|
+
sizeClasses[props.size] || sizeClasses.sm,
|
|
45
|
+
weightClasses[props.weight] || weightClasses.medium,
|
|
46
|
+
useVariantText(props.color),
|
|
47
|
+
]);
|
|
48
|
+
</script>
|
|
49
|
+
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import DXList from './DXList.vue';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Typography/DXList',
|
|
5
|
+
component: DXList,
|
|
6
|
+
tags: ['autodocs'],
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export const Unordered = {
|
|
10
|
+
render: () => ({
|
|
11
|
+
components: { DXList },
|
|
12
|
+
template: `
|
|
13
|
+
<DXList>
|
|
14
|
+
<li>Первый элемент</li>
|
|
15
|
+
<li>Второй элемент</li>
|
|
16
|
+
<li>Третий элемент</li>
|
|
17
|
+
</DXList>
|
|
18
|
+
`,
|
|
19
|
+
}),
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export const Ordered = {
|
|
23
|
+
args: { ordered: true },
|
|
24
|
+
render: (args) => ({
|
|
25
|
+
components: { DXList },
|
|
26
|
+
setup() { return { args }; },
|
|
27
|
+
template: `
|
|
28
|
+
<DXList v-bind="args">
|
|
29
|
+
<li>Шаг первый</li>
|
|
30
|
+
<li>Шаг второй</li>
|
|
31
|
+
<li>Шаг третий</li>
|
|
32
|
+
</DXList>
|
|
33
|
+
`,
|
|
34
|
+
}),
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export const NoMarker = {
|
|
38
|
+
args: { marker: 'none' },
|
|
39
|
+
render: (args) => ({
|
|
40
|
+
components: { DXList },
|
|
41
|
+
setup() { return { args }; },
|
|
42
|
+
template: `
|
|
43
|
+
<DXList v-bind="args">
|
|
44
|
+
<li>Элемент без маркера</li>
|
|
45
|
+
<li>Ещё один элемент</li>
|
|
46
|
+
</DXList>
|
|
47
|
+
`,
|
|
48
|
+
}),
|
|
49
|
+
};
|
|
50
|
+
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<component
|
|
3
|
+
:is="ordered ? 'ol' : 'ul'"
|
|
4
|
+
:class="listClasses"
|
|
5
|
+
data-component="DXList"
|
|
6
|
+
>
|
|
7
|
+
<slot />
|
|
8
|
+
</component>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script setup>
|
|
12
|
+
import { computed } from "vue";
|
|
13
|
+
|
|
14
|
+
const props = defineProps({
|
|
15
|
+
/** Нумерованный список */
|
|
16
|
+
ordered: { type: Boolean, default: false },
|
|
17
|
+
/** Стиль маркеров: disc | circle | square | decimal | none */
|
|
18
|
+
marker: { type: String, default: "" },
|
|
19
|
+
/** Размер: sm | md | lg */
|
|
20
|
+
size: { type: String, default: "md" },
|
|
21
|
+
/** Отступ между элементами: none | sm | md | lg */
|
|
22
|
+
spacing: { type: String, default: "sm" },
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
const sizeClasses = {
|
|
26
|
+
sm: "text-sm",
|
|
27
|
+
md: "text-base",
|
|
28
|
+
lg: "text-lg",
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
const spacingClasses = {
|
|
32
|
+
none: "space-y-0",
|
|
33
|
+
sm: "space-y-1",
|
|
34
|
+
md: "space-y-2",
|
|
35
|
+
lg: "space-y-3",
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
const markerClasses = {
|
|
39
|
+
disc: "list-disc",
|
|
40
|
+
circle: "list-circle",
|
|
41
|
+
square: "list-square",
|
|
42
|
+
decimal: "list-decimal",
|
|
43
|
+
none: "list-none",
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
const listClasses = computed(() => [
|
|
47
|
+
sizeClasses[props.size] || sizeClasses.md,
|
|
48
|
+
spacingClasses[props.spacing] || spacingClasses.sm,
|
|
49
|
+
props.marker
|
|
50
|
+
? markerClasses[props.marker]
|
|
51
|
+
: (props.ordered ? "list-decimal" : "list-disc"),
|
|
52
|
+
"pl-5 text-slate-700",
|
|
53
|
+
]);
|
|
54
|
+
</script>
|
|
55
|
+
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import DXText from './DXText.vue';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Typography/DXText',
|
|
5
|
+
component: DXText,
|
|
6
|
+
tags: ['autodocs'],
|
|
7
|
+
argTypes: {
|
|
8
|
+
size: { control: { type: 'select' }, options: ['xs', 'sm', 'md', 'lg', 'xl'] },
|
|
9
|
+
weight: { control: { type: 'select' }, options: ['normal', 'medium', 'semibold', 'bold'] },
|
|
10
|
+
color: { control: { type: 'select' }, options: ['default', 'muted', 'primary', 'success', 'warning', 'danger'] },
|
|
11
|
+
align: { control: { type: 'select' }, options: ['left', 'center', 'right', 'justify'] },
|
|
12
|
+
},
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export const Default = {
|
|
16
|
+
args: {},
|
|
17
|
+
render: (args) => ({
|
|
18
|
+
components: { DXText },
|
|
19
|
+
setup() { return { args }; },
|
|
20
|
+
template: '<DXText v-bind="args">Это обычный текстовый параграф с настройками по умолчанию.</DXText>',
|
|
21
|
+
}),
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export const Sizes = {
|
|
25
|
+
render: () => ({
|
|
26
|
+
components: { DXText },
|
|
27
|
+
template: `
|
|
28
|
+
<div class="space-y-2">
|
|
29
|
+
<DXText size="xs">Extra Small Text</DXText>
|
|
30
|
+
<DXText size="sm">Small Text</DXText>
|
|
31
|
+
<DXText size="md">Medium Text (default)</DXText>
|
|
32
|
+
<DXText size="lg">Large Text</DXText>
|
|
33
|
+
<DXText size="xl">Extra Large Text</DXText>
|
|
34
|
+
</div>
|
|
35
|
+
`,
|
|
36
|
+
}),
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export const Truncated = {
|
|
40
|
+
args: { truncate: true },
|
|
41
|
+
render: (args) => ({
|
|
42
|
+
components: { DXText },
|
|
43
|
+
setup() { return { args }; },
|
|
44
|
+
template: '<div class="w-48"><DXText v-bind="args">Это очень длинный текст который будет обрезан с многоточием</DXText></div>',
|
|
45
|
+
}),
|
|
46
|
+
};
|
|
47
|
+
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<component
|
|
3
|
+
:is="tag"
|
|
4
|
+
:class="textClasses"
|
|
5
|
+
data-component="DXText"
|
|
6
|
+
:data-size="size"
|
|
7
|
+
:data-weight="weight"
|
|
8
|
+
:data-color="color"
|
|
9
|
+
>
|
|
10
|
+
<slot />
|
|
11
|
+
</component>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<script setup>
|
|
15
|
+
import { computed } from "vue";
|
|
16
|
+
import { useVariantText } from "@/composables/useVariant";
|
|
17
|
+
|
|
18
|
+
const props = defineProps({
|
|
19
|
+
/** Тег: p | span | div */
|
|
20
|
+
tag: { type: String, default: "p" },
|
|
21
|
+
/** Размер: xs | sm | md | lg | xl */
|
|
22
|
+
size: { type: String, default: "md" },
|
|
23
|
+
/** Вес шрифта: normal | medium | semibold | bold */
|
|
24
|
+
weight: { type: String, default: "normal" },
|
|
25
|
+
/** Цвет: default | muted | primary | success | warning | danger */
|
|
26
|
+
color: { type: String, default: "default" },
|
|
27
|
+
/** Выравнивание: left | center | right | justify */
|
|
28
|
+
align: { type: String, default: "left" },
|
|
29
|
+
/** Обрезать текст с ... */
|
|
30
|
+
truncate: { type: Boolean, default: false },
|
|
31
|
+
/** Максимум строк (line-clamp) */
|
|
32
|
+
lines: { type: Number, default: 0 },
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
const sizeClasses = {
|
|
36
|
+
xs: "text-xs",
|
|
37
|
+
sm: "text-sm",
|
|
38
|
+
md: "text-base",
|
|
39
|
+
lg: "text-lg",
|
|
40
|
+
xl: "text-xl",
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
const weightClasses = {
|
|
44
|
+
normal: "font-normal",
|
|
45
|
+
medium: "font-medium",
|
|
46
|
+
semibold: "font-semibold",
|
|
47
|
+
bold: "font-bold",
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
const alignClasses = {
|
|
51
|
+
left: "text-left",
|
|
52
|
+
center: "text-center",
|
|
53
|
+
right: "text-right",
|
|
54
|
+
justify: "text-justify",
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
const textClasses = computed(() => [
|
|
58
|
+
sizeClasses[props.size] || sizeClasses.md,
|
|
59
|
+
weightClasses[props.weight] || weightClasses.normal,
|
|
60
|
+
useVariantText(props.color),
|
|
61
|
+
alignClasses[props.align] || alignClasses.left,
|
|
62
|
+
"leading-relaxed",
|
|
63
|
+
props.truncate && "truncate",
|
|
64
|
+
props.lines > 0 && `line-clamp-${props.lines}`,
|
|
65
|
+
]);
|
|
66
|
+
</script>
|
|
67
|
+
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// Typography components
|
|
2
|
+
export { default as DXHeading } from './DXHeading';
|
|
3
|
+
export { default as DXText } from './DXText';
|
|
4
|
+
export { default as DXLabel } from './DXLabel';
|
|
5
|
+
export { default as DXCode } from './DXCode';
|
|
6
|
+
export { default as DXBlockquote } from './DXBlockquote';
|
|
7
|
+
export { default as DXList } from './DXList';
|
|
8
|
+
|