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,116 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<button
|
|
3
|
+
type="button"
|
|
4
|
+
:class="allClasses"
|
|
5
|
+
class="group"
|
|
6
|
+
:disabled="disabled"
|
|
7
|
+
@click="handleClick"
|
|
8
|
+
@keydown.enter="handleClick"
|
|
9
|
+
data-component="DXDropdownItem"
|
|
10
|
+
:data-variant="variant"
|
|
11
|
+
:data-size="size"
|
|
12
|
+
:data-disabled="disabled"
|
|
13
|
+
>
|
|
14
|
+
<DXIcon
|
|
15
|
+
v-if="icon"
|
|
16
|
+
:icon="icon"
|
|
17
|
+
:size="iconSize"
|
|
18
|
+
:animation="iconAnimation"
|
|
19
|
+
:group-hover="true"
|
|
20
|
+
class="flex-shrink-0"
|
|
21
|
+
/>
|
|
22
|
+
<span class="flex-1 text-left">
|
|
23
|
+
<slot />
|
|
24
|
+
</span>
|
|
25
|
+
<DXIcon
|
|
26
|
+
v-if="submenu"
|
|
27
|
+
:icon="ChevronRightIcon"
|
|
28
|
+
size="xs"
|
|
29
|
+
:animation="iconAnimation"
|
|
30
|
+
:group-hover="true"
|
|
31
|
+
class="text-slate-400 flex-shrink-0"
|
|
32
|
+
/>
|
|
33
|
+
<DXBadge v-if="badge" :variant="badgeVariant" size="sm" class="flex-shrink-0">{{ badge }}</DXBadge>
|
|
34
|
+
</button>
|
|
35
|
+
</template>
|
|
36
|
+
|
|
37
|
+
<script setup>
|
|
38
|
+
import { inject, computed } from "vue";
|
|
39
|
+
import { useSize } from "@/composables/useSize";
|
|
40
|
+
import { useVariantDropdownItem } from "@/composables/useVariant";
|
|
41
|
+
import { useClassComposition } from "@/composables/useClassComposition";
|
|
42
|
+
import { ChevronRightIcon } from "@heroicons/vue/24/outline";
|
|
43
|
+
import DXIcon from "../DXIcon/DXIcon.vue";
|
|
44
|
+
import DXBadge from "../DXBadge/DXBadge.vue";
|
|
45
|
+
|
|
46
|
+
const props = defineProps({
|
|
47
|
+
/** Иконка (Heroicon компонент) */
|
|
48
|
+
icon: { type: [Object, Function], default: null },
|
|
49
|
+
/** Вариант: default | danger | success */
|
|
50
|
+
variant: {
|
|
51
|
+
type: String,
|
|
52
|
+
default: 'default',
|
|
53
|
+
validator: (value) => ['default', 'danger', 'success'].includes(value)
|
|
54
|
+
},
|
|
55
|
+
/** Размер: sm | md */
|
|
56
|
+
size: {
|
|
57
|
+
type: String,
|
|
58
|
+
default: 'md',
|
|
59
|
+
validator: (value) => ['sm', 'md'].includes(value)
|
|
60
|
+
},
|
|
61
|
+
/** Отключенное состояние */
|
|
62
|
+
disabled: { type: Boolean, default: false },
|
|
63
|
+
/** Показать индикатор подменю */
|
|
64
|
+
submenu: { type: Boolean, default: false },
|
|
65
|
+
/** Закрыть dropdown при клике */
|
|
66
|
+
closeOnClick: { type: Boolean, default: true },
|
|
67
|
+
/** Текст badge */
|
|
68
|
+
badge: { type: [String, Number], default: null },
|
|
69
|
+
/** Вариант badge */
|
|
70
|
+
badgeVariant: { type: String, default: 'slate' },
|
|
71
|
+
/** Анимация иконки: none | wiggle | scale | rotate */
|
|
72
|
+
iconAnimation: {
|
|
73
|
+
type: String,
|
|
74
|
+
default: 'wiggle',
|
|
75
|
+
validator: (value) => ['none', 'wiggle', 'scale', 'rotate'].includes(value)
|
|
76
|
+
},
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
const emit = defineEmits(["click"]);
|
|
80
|
+
|
|
81
|
+
const dropdown = inject("dropdown", null);
|
|
82
|
+
|
|
83
|
+
const BASE_CLASSES = "w-full flex items-center gap-3 rounded-lg transition-colors";
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Все классы для dropdown item
|
|
87
|
+
*/
|
|
88
|
+
const allClasses = computed(() =>
|
|
89
|
+
useClassComposition(
|
|
90
|
+
BASE_CLASSES,
|
|
91
|
+
useVariantDropdownItem(props.variant),
|
|
92
|
+
useSize(props.size, 'button'),
|
|
93
|
+
{
|
|
94
|
+
'opacity-60 cursor-not-allowed': props.disabled,
|
|
95
|
+
}
|
|
96
|
+
)
|
|
97
|
+
);
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Размер иконки в зависимости от размера item
|
|
101
|
+
*/
|
|
102
|
+
const iconSize = computed(() => props.size === 'sm' ? 'xs' : 'sm');
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Обработчик клика
|
|
106
|
+
*/
|
|
107
|
+
const handleClick = (event) => {
|
|
108
|
+
if (props.disabled) return;
|
|
109
|
+
|
|
110
|
+
emit("click", event);
|
|
111
|
+
|
|
112
|
+
if (props.closeOnClick && dropdown?.close) {
|
|
113
|
+
dropdown.close();
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
</script>
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
import DXFormLabel from './DXFormLabel.vue';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Atoms/DXFormLabel',
|
|
5
|
+
component: DXFormLabel,
|
|
6
|
+
tags: ['autodocs'],
|
|
7
|
+
argTypes: {
|
|
8
|
+
label: {
|
|
9
|
+
control: 'text',
|
|
10
|
+
description: 'Label text'
|
|
11
|
+
},
|
|
12
|
+
error: {
|
|
13
|
+
control: 'text',
|
|
14
|
+
description: 'Error message'
|
|
15
|
+
},
|
|
16
|
+
helper: {
|
|
17
|
+
control: 'text',
|
|
18
|
+
description: 'Helper text'
|
|
19
|
+
},
|
|
20
|
+
success: {
|
|
21
|
+
control: 'text',
|
|
22
|
+
description: 'Success message'
|
|
23
|
+
},
|
|
24
|
+
required: {
|
|
25
|
+
control: 'boolean',
|
|
26
|
+
description: 'Show required asterisk'
|
|
27
|
+
},
|
|
28
|
+
showValidationIcon: {
|
|
29
|
+
control: 'boolean',
|
|
30
|
+
description: 'Show validation icon in messages'
|
|
31
|
+
},
|
|
32
|
+
maxLength: {
|
|
33
|
+
control: 'number',
|
|
34
|
+
description: 'Maximum length for character count'
|
|
35
|
+
},
|
|
36
|
+
currentLength: {
|
|
37
|
+
control: 'number',
|
|
38
|
+
description: 'Current length for character count'
|
|
39
|
+
},
|
|
40
|
+
showCount: {
|
|
41
|
+
control: 'boolean',
|
|
42
|
+
description: 'Show character count'
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
// Default story with label and helper
|
|
48
|
+
export const Default = {
|
|
49
|
+
args: {
|
|
50
|
+
label: 'Email Address',
|
|
51
|
+
helper: 'We will never share your email with anyone else.',
|
|
52
|
+
},
|
|
53
|
+
render: (args) => ({
|
|
54
|
+
components: { DXFormLabel },
|
|
55
|
+
setup() {
|
|
56
|
+
return { args };
|
|
57
|
+
},
|
|
58
|
+
template: `
|
|
59
|
+
<DXFormLabel v-bind="args">
|
|
60
|
+
<input
|
|
61
|
+
type="email"
|
|
62
|
+
placeholder="Enter your email"
|
|
63
|
+
class="w-full h-10 px-4 py-2.5 text-sm rounded-xl border border-slate-200 bg-white text-slate-700 placeholder:text-slate-400 focus:outline-none focus:ring-2 focus:ring-slate-900/10 focus:border-slate-300"
|
|
64
|
+
/>
|
|
65
|
+
</DXFormLabel>
|
|
66
|
+
`,
|
|
67
|
+
}),
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
// With error message
|
|
71
|
+
export const WithError = {
|
|
72
|
+
args: {
|
|
73
|
+
label: 'Username',
|
|
74
|
+
error: 'Username is already taken',
|
|
75
|
+
showValidationIcon: true,
|
|
76
|
+
},
|
|
77
|
+
render: (args) => ({
|
|
78
|
+
components: { DXFormLabel },
|
|
79
|
+
setup() {
|
|
80
|
+
return { args };
|
|
81
|
+
},
|
|
82
|
+
template: `
|
|
83
|
+
<DXFormLabel v-bind="args">
|
|
84
|
+
<input
|
|
85
|
+
type="text"
|
|
86
|
+
placeholder="Choose a username"
|
|
87
|
+
class="w-full h-10 px-4 py-2.5 text-sm rounded-xl border border-rose-300 bg-white text-slate-700 placeholder:text-slate-400 focus:outline-none focus:ring-2 focus:ring-rose-500/10"
|
|
88
|
+
/>
|
|
89
|
+
</DXFormLabel>
|
|
90
|
+
`,
|
|
91
|
+
}),
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
// With required indicator
|
|
95
|
+
export const Required = {
|
|
96
|
+
args: {
|
|
97
|
+
label: 'Full Name',
|
|
98
|
+
required: true,
|
|
99
|
+
helper: 'Please enter your legal name',
|
|
100
|
+
},
|
|
101
|
+
render: (args) => ({
|
|
102
|
+
components: { DXFormLabel },
|
|
103
|
+
setup() {
|
|
104
|
+
return { args };
|
|
105
|
+
},
|
|
106
|
+
template: `
|
|
107
|
+
<DXFormLabel v-bind="args">
|
|
108
|
+
<input
|
|
109
|
+
type="text"
|
|
110
|
+
placeholder="John Doe"
|
|
111
|
+
class="w-full h-10 px-4 py-2.5 text-sm rounded-xl border border-slate-200 bg-white text-slate-700 placeholder:text-slate-400 focus:outline-none focus:ring-2 focus:ring-slate-900/10 focus:border-slate-300"
|
|
112
|
+
/>
|
|
113
|
+
</DXFormLabel>
|
|
114
|
+
`,
|
|
115
|
+
}),
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
// With character count
|
|
119
|
+
export const WithCharacterCount = {
|
|
120
|
+
args: {
|
|
121
|
+
label: 'Bio',
|
|
122
|
+
helper: 'Tell us about yourself',
|
|
123
|
+
maxLength: 150,
|
|
124
|
+
currentLength: 45,
|
|
125
|
+
showCount: true,
|
|
126
|
+
},
|
|
127
|
+
render: (args) => ({
|
|
128
|
+
components: { DXFormLabel },
|
|
129
|
+
setup() {
|
|
130
|
+
return { args };
|
|
131
|
+
},
|
|
132
|
+
template: `
|
|
133
|
+
<DXFormLabel v-bind="args">
|
|
134
|
+
<textarea
|
|
135
|
+
placeholder="Write your bio..."
|
|
136
|
+
rows="3"
|
|
137
|
+
class="w-full px-4 py-3 text-sm rounded-xl border border-slate-200 bg-white text-slate-700 placeholder:text-slate-400 focus:outline-none focus:ring-2 focus:ring-slate-900/10 focus:border-slate-300"
|
|
138
|
+
>This is my bio text that takes up some space...</textarea>
|
|
139
|
+
</DXFormLabel>
|
|
140
|
+
`,
|
|
141
|
+
}),
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
// With success message
|
|
145
|
+
export const WithSuccess = {
|
|
146
|
+
args: {
|
|
147
|
+
label: 'Email Verification',
|
|
148
|
+
success: 'Email verified successfully!',
|
|
149
|
+
showValidationIcon: true,
|
|
150
|
+
},
|
|
151
|
+
render: (args) => ({
|
|
152
|
+
components: { DXFormLabel },
|
|
153
|
+
setup() {
|
|
154
|
+
return { args };
|
|
155
|
+
},
|
|
156
|
+
template: `
|
|
157
|
+
<DXFormLabel v-bind="args">
|
|
158
|
+
<input
|
|
159
|
+
type="email"
|
|
160
|
+
value="user@example.com"
|
|
161
|
+
class="w-full h-10 px-4 py-2.5 text-sm rounded-xl border border-emerald-300 bg-white text-slate-700 focus:outline-none focus:ring-2 focus:ring-emerald-500/10"
|
|
162
|
+
/>
|
|
163
|
+
</DXFormLabel>
|
|
164
|
+
`,
|
|
165
|
+
}),
|
|
166
|
+
};
|
|
167
|
+
|
|
168
|
+
// All features combined
|
|
169
|
+
export const Complete = {
|
|
170
|
+
args: {
|
|
171
|
+
label: 'Description',
|
|
172
|
+
required: true,
|
|
173
|
+
helper: 'Provide a detailed description',
|
|
174
|
+
maxLength: 200,
|
|
175
|
+
currentLength: 125,
|
|
176
|
+
showCount: true,
|
|
177
|
+
},
|
|
178
|
+
render: (args) => ({
|
|
179
|
+
components: { DXFormLabel },
|
|
180
|
+
setup() {
|
|
181
|
+
return { args };
|
|
182
|
+
},
|
|
183
|
+
template: `
|
|
184
|
+
<DXFormLabel v-bind="args">
|
|
185
|
+
<textarea
|
|
186
|
+
placeholder="Enter description..."
|
|
187
|
+
rows="4"
|
|
188
|
+
class="w-full px-4 py-3 text-sm rounded-xl border border-slate-200 bg-white text-slate-700 placeholder:text-slate-400 focus:outline-none focus:ring-2 focus:ring-slate-900/10 focus:border-slate-300"
|
|
189
|
+
>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</textarea>
|
|
190
|
+
</DXFormLabel>
|
|
191
|
+
`,
|
|
192
|
+
}),
|
|
193
|
+
};
|
|
194
|
+
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="w-full" data-component="DXFormLabel">
|
|
3
|
+
<!-- Label with optional required indicator -->
|
|
4
|
+
<div v-if="label || showCount" class="flex items-center justify-between mb-1">
|
|
5
|
+
<label v-if="label" class="text-sm font-medium text-slate-700">
|
|
6
|
+
{{ label }}
|
|
7
|
+
<span v-if="required" class="text-rose-500 ml-0.5">*</span>
|
|
8
|
+
</label>
|
|
9
|
+
|
|
10
|
+
<!-- Character count -->
|
|
11
|
+
<span v-if="showCount && maxLength" class="text-xs text-slate-500">
|
|
12
|
+
{{ currentLength }} / {{ maxLength }}
|
|
13
|
+
</span>
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
<!-- Slot for input/textarea/select -->
|
|
17
|
+
<slot />
|
|
18
|
+
|
|
19
|
+
<!-- Error message -->
|
|
20
|
+
<p v-if="error" class="mt-1 text-xs text-rose-500 flex items-center gap-1">
|
|
21
|
+
<DXIcon v-if="showValidationIcon" :icon="errorIcon" size="xs" animation="none" class="text-rose-500" />
|
|
22
|
+
{{ error }}
|
|
23
|
+
</p>
|
|
24
|
+
|
|
25
|
+
<!-- Helper text (only shown if no error) -->
|
|
26
|
+
<p v-else-if="helper" class="mt-1 text-xs text-slate-500">
|
|
27
|
+
{{ helper }}
|
|
28
|
+
</p>
|
|
29
|
+
|
|
30
|
+
<!-- Success message -->
|
|
31
|
+
<p v-if="success && !error" class="mt-1 text-xs text-emerald-600 flex items-center gap-1">
|
|
32
|
+
<DXIcon v-if="showValidationIcon" :icon="successIcon" size="xs" animation="none" class="text-emerald-500" />
|
|
33
|
+
{{ success }}
|
|
34
|
+
</p>
|
|
35
|
+
</div>
|
|
36
|
+
</template>
|
|
37
|
+
|
|
38
|
+
<script setup>
|
|
39
|
+
import { computed } from 'vue';
|
|
40
|
+
import { ExclamationCircleIcon, CheckCircleIcon } from '@heroicons/vue/24/solid';
|
|
41
|
+
import DXIcon from '../DXIcon/DXIcon.vue';
|
|
42
|
+
|
|
43
|
+
const props = defineProps({
|
|
44
|
+
/** Label text */
|
|
45
|
+
label: {
|
|
46
|
+
type: String,
|
|
47
|
+
default: ''
|
|
48
|
+
},
|
|
49
|
+
/** Error message */
|
|
50
|
+
error: {
|
|
51
|
+
type: String,
|
|
52
|
+
default: ''
|
|
53
|
+
},
|
|
54
|
+
/** Helper text */
|
|
55
|
+
helper: {
|
|
56
|
+
type: String,
|
|
57
|
+
default: ''
|
|
58
|
+
},
|
|
59
|
+
/** Success message */
|
|
60
|
+
success: {
|
|
61
|
+
type: String,
|
|
62
|
+
default: ''
|
|
63
|
+
},
|
|
64
|
+
/** Show required asterisk */
|
|
65
|
+
required: {
|
|
66
|
+
type: Boolean,
|
|
67
|
+
default: false
|
|
68
|
+
},
|
|
69
|
+
/** Show validation icon in messages */
|
|
70
|
+
showValidationIcon: {
|
|
71
|
+
type: Boolean,
|
|
72
|
+
default: true
|
|
73
|
+
},
|
|
74
|
+
/** Maximum length for character count */
|
|
75
|
+
maxLength: {
|
|
76
|
+
type: Number,
|
|
77
|
+
default: 0
|
|
78
|
+
},
|
|
79
|
+
/** Current length for character count */
|
|
80
|
+
currentLength: {
|
|
81
|
+
type: Number,
|
|
82
|
+
default: 0
|
|
83
|
+
},
|
|
84
|
+
/** Show character count */
|
|
85
|
+
showCount: {
|
|
86
|
+
type: Boolean,
|
|
87
|
+
default: false
|
|
88
|
+
},
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
const errorIcon = computed(() => ExclamationCircleIcon);
|
|
92
|
+
const successIcon = computed(() => CheckCircleIcon);
|
|
93
|
+
</script>
|
|
94
|
+
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import DXIcon from './DXIcon.vue';
|
|
2
|
+
import {
|
|
3
|
+
HeartIcon,
|
|
4
|
+
StarIcon,
|
|
5
|
+
BellIcon,
|
|
6
|
+
HomeIcon,
|
|
7
|
+
UserIcon,
|
|
8
|
+
Cog6ToothIcon,
|
|
9
|
+
MagnifyingGlassIcon,
|
|
10
|
+
ShoppingCartIcon,
|
|
11
|
+
EnvelopeIcon,
|
|
12
|
+
PhoneIcon,
|
|
13
|
+
} from '@heroicons/vue/24/outline';
|
|
14
|
+
import {
|
|
15
|
+
HeartIcon as HeartIconSolid,
|
|
16
|
+
StarIcon as StarIconSolid,
|
|
17
|
+
} from '@heroicons/vue/24/solid';
|
|
18
|
+
|
|
19
|
+
export default {
|
|
20
|
+
title: 'Atoms/DXIcon',
|
|
21
|
+
component: DXIcon,
|
|
22
|
+
tags: ['autodocs'],
|
|
23
|
+
argTypes: {
|
|
24
|
+
size: {
|
|
25
|
+
control: 'select',
|
|
26
|
+
options: ['xs', 'sm', 'md', 'lg', 'xl'],
|
|
27
|
+
},
|
|
28
|
+
animation: {
|
|
29
|
+
control: 'select',
|
|
30
|
+
options: ['none', 'wiggle', 'scale', 'rotate'],
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export const Default = {
|
|
36
|
+
args: {
|
|
37
|
+
icon: HeartIcon,
|
|
38
|
+
size: 'md',
|
|
39
|
+
animation: 'none',
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export const Sizes = () => ({
|
|
44
|
+
components: { DXIcon },
|
|
45
|
+
setup() {
|
|
46
|
+
return { HeartIcon };
|
|
47
|
+
},
|
|
48
|
+
template: `
|
|
49
|
+
<div class="flex items-center gap-4">
|
|
50
|
+
<DXIcon :icon="HeartIcon" size="xs" />
|
|
51
|
+
<DXIcon :icon="HeartIcon" size="sm" />
|
|
52
|
+
<DXIcon :icon="HeartIcon" size="md" />
|
|
53
|
+
<DXIcon :icon="HeartIcon" size="lg" />
|
|
54
|
+
<DXIcon :icon="HeartIcon" size="xl" />
|
|
55
|
+
</div>
|
|
56
|
+
`,
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
export const Animations = () => ({
|
|
60
|
+
components: { DXIcon },
|
|
61
|
+
setup() {
|
|
62
|
+
return { HeartIcon, StarIcon, BellIcon, Cog6ToothIcon };
|
|
63
|
+
},
|
|
64
|
+
template: `
|
|
65
|
+
<div class="flex items-center gap-8">
|
|
66
|
+
<div class="text-center">
|
|
67
|
+
<DXIcon :icon="HeartIcon" size="xl" animation="none" />
|
|
68
|
+
<p class="text-xs mt-2 text-slate-600">None</p>
|
|
69
|
+
</div>
|
|
70
|
+
<div class="text-center">
|
|
71
|
+
<DXIcon :icon="StarIcon" size="xl" animation="wiggle" />
|
|
72
|
+
<p class="text-xs mt-2 text-slate-600">Wiggle</p>
|
|
73
|
+
</div>
|
|
74
|
+
<div class="text-center">
|
|
75
|
+
<DXIcon :icon="BellIcon" size="xl" animation="scale" />
|
|
76
|
+
<p class="text-xs mt-2 text-slate-600">Scale</p>
|
|
77
|
+
</div>
|
|
78
|
+
<div class="text-center">
|
|
79
|
+
<DXIcon :icon="Cog6ToothIcon" size="xl" animation="rotate" />
|
|
80
|
+
<p class="text-xs mt-2 text-slate-600">Rotate</p>
|
|
81
|
+
</div>
|
|
82
|
+
</div>
|
|
83
|
+
`,
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
export const IconGallery = () => ({
|
|
87
|
+
components: { DXIcon },
|
|
88
|
+
setup() {
|
|
89
|
+
return {
|
|
90
|
+
icons: [
|
|
91
|
+
{ name: 'Heart', icon: HeartIcon },
|
|
92
|
+
{ name: 'Star', icon: StarIcon },
|
|
93
|
+
{ name: 'Bell', icon: BellIcon },
|
|
94
|
+
{ name: 'Home', icon: HomeIcon },
|
|
95
|
+
{ name: 'User', icon: UserIcon },
|
|
96
|
+
{ name: 'Settings', icon: Cog6ToothIcon },
|
|
97
|
+
{ name: 'Search', icon: MagnifyingGlassIcon },
|
|
98
|
+
{ name: 'Cart', icon: ShoppingCartIcon },
|
|
99
|
+
{ name: 'Email', icon: EnvelopeIcon },
|
|
100
|
+
{ name: 'Phone', icon: PhoneIcon },
|
|
101
|
+
],
|
|
102
|
+
};
|
|
103
|
+
},
|
|
104
|
+
template: `
|
|
105
|
+
<div class="grid grid-cols-5 gap-6">
|
|
106
|
+
<div v-for="item in icons" :key="item.name" class="text-center">
|
|
107
|
+
<DXIcon :icon="item.icon" size="xl" animation="scale" class="text-slate-700 mx-auto" />
|
|
108
|
+
<p class="text-xs mt-2 text-slate-600">{{ item.name }}</p>
|
|
109
|
+
</div>
|
|
110
|
+
</div>
|
|
111
|
+
`,
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
export const OutlineVsSolid = () => ({
|
|
115
|
+
components: { DXIcon },
|
|
116
|
+
setup() {
|
|
117
|
+
return { HeartIcon, HeartIconSolid, StarIcon, StarIconSolid };
|
|
118
|
+
},
|
|
119
|
+
template: `
|
|
120
|
+
<div class="flex items-center gap-8">
|
|
121
|
+
<div class="text-center">
|
|
122
|
+
<DXIcon :icon="HeartIcon" size="xl" animation="scale" class="text-slate-700" />
|
|
123
|
+
<p class="text-xs mt-2 text-slate-600">Outline</p>
|
|
124
|
+
</div>
|
|
125
|
+
<div class="text-center">
|
|
126
|
+
<DXIcon :icon="HeartIconSolid" size="xl" animation="scale" class="text-rose-500" />
|
|
127
|
+
<p class="text-xs mt-2 text-slate-600">Solid</p>
|
|
128
|
+
</div>
|
|
129
|
+
<div class="text-center">
|
|
130
|
+
<DXIcon :icon="StarIcon" size="xl" animation="wiggle" class="text-slate-700" />
|
|
131
|
+
<p class="text-xs mt-2 text-slate-600">Outline</p>
|
|
132
|
+
</div>
|
|
133
|
+
<div class="text-center">
|
|
134
|
+
<DXIcon :icon="StarIconSolid" size="xl" animation="wiggle" class="text-amber-500" />
|
|
135
|
+
<p class="text-xs mt-2 text-slate-600">Solid</p>
|
|
136
|
+
</div>
|
|
137
|
+
</div>
|
|
138
|
+
`,
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
export const WithColors = () => ({
|
|
142
|
+
components: { DXIcon },
|
|
143
|
+
setup() {
|
|
144
|
+
return { HeartIcon };
|
|
145
|
+
},
|
|
146
|
+
template: `
|
|
147
|
+
<div class="flex items-center gap-4">
|
|
148
|
+
<DXIcon :icon="HeartIcon" size="xl" animation="scale" class="text-rose-500" />
|
|
149
|
+
<DXIcon :icon="HeartIcon" size="xl" animation="scale" class="text-blue-500" />
|
|
150
|
+
<DXIcon :icon="HeartIcon" size="xl" animation="scale" class="text-emerald-500" />
|
|
151
|
+
<DXIcon :icon="HeartIcon" size="xl" animation="scale" class="text-amber-500" />
|
|
152
|
+
<DXIcon :icon="HeartIcon" size="xl" animation="scale" class="text-purple-500" />
|
|
153
|
+
</div>
|
|
154
|
+
`,
|
|
155
|
+
});
|
|
156
|
+
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<component
|
|
3
|
+
:is="icon"
|
|
4
|
+
:class="allClasses"
|
|
5
|
+
data-component="DXIcon"
|
|
6
|
+
:data-size="size"
|
|
7
|
+
:data-animation="animation"
|
|
8
|
+
/>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script setup>
|
|
12
|
+
import { computed } from "vue";
|
|
13
|
+
import { useSize } from "@/composables/useSize";
|
|
14
|
+
import { useAnimation } from "@/composables/useAnimation";
|
|
15
|
+
|
|
16
|
+
const props = defineProps({
|
|
17
|
+
/** Heroicon компонент */
|
|
18
|
+
icon: { type: [Object, Function], required: true },
|
|
19
|
+
/** Размер: xs | sm | md | lg | xl */
|
|
20
|
+
size: { type: String, default: "md" },
|
|
21
|
+
/** Анимация при hover: none | wiggle | scale | rotate */
|
|
22
|
+
animation: { type: String, default: "none" },
|
|
23
|
+
/** Использовать group-hover вместо обычного hover */
|
|
24
|
+
groupHover: { type: Boolean, default: false },
|
|
25
|
+
/** Дополнительные классы */
|
|
26
|
+
class: { type: [String, Array, Object], default: "" },
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
const allClasses = computed(() => [
|
|
30
|
+
useSize(props.size, 'icon'),
|
|
31
|
+
useAnimation(props.animation, 'icon', props.groupHover),
|
|
32
|
+
props.class,
|
|
33
|
+
]);
|
|
34
|
+
</script>
|
|
35
|
+
|
|
36
|
+
<style>
|
|
37
|
+
/* Wiggle animation - тряска при hover */
|
|
38
|
+
@keyframes icon-wiggle {
|
|
39
|
+
0% { transform: translateX(0) rotate(0deg); }
|
|
40
|
+
25% { transform: translateX(-1px) rotate(-3deg); }
|
|
41
|
+
50% { transform: translateX(0) rotate(0deg); }
|
|
42
|
+
75% { transform: translateX(1px) rotate(3deg); }
|
|
43
|
+
100% { transform: translateX(0) rotate(0deg); }
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/* Regular hover */
|
|
47
|
+
.dx-icon-wiggle {
|
|
48
|
+
transition: transform 150ms ease;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.dx-icon-wiggle:hover {
|
|
52
|
+
animation: icon-wiggle 0.28s ease-in-out;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/* Group hover */
|
|
56
|
+
.dx-icon-wiggle-group {
|
|
57
|
+
transition: transform 150ms ease;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.group:hover .dx-icon-wiggle-group {
|
|
61
|
+
animation: icon-wiggle 0.28s ease-in-out;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/* Scale animation - увеличение при hover */
|
|
65
|
+
/* Regular hover */
|
|
66
|
+
.dx-icon-scale {
|
|
67
|
+
transition: transform 200ms ease;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.dx-icon-scale:hover {
|
|
71
|
+
transform: scale(1.1);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/* Group hover */
|
|
75
|
+
.dx-icon-scale-group {
|
|
76
|
+
transition: transform 200ms ease;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.group:hover .dx-icon-scale-group {
|
|
80
|
+
transform: scale(1.1);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/* Rotate animation - поворот при hover */
|
|
84
|
+
/* Regular hover */
|
|
85
|
+
.dx-icon-rotate {
|
|
86
|
+
transition: transform 250ms ease;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.dx-icon-rotate:hover {
|
|
90
|
+
transform: rotate(90deg);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/* Group hover */
|
|
94
|
+
.dx-icon-rotate-group {
|
|
95
|
+
transition: transform 250ms ease;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.group:hover .dx-icon-rotate-group {
|
|
99
|
+
transform: rotate(90deg);
|
|
100
|
+
}
|
|
101
|
+
</style>
|
|
102
|
+
|