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
package/src/index.js
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
// DX Components - Vue 3 UI Component Library
|
|
2
|
+
// Export all components
|
|
3
|
+
|
|
4
|
+
// Typography
|
|
5
|
+
export * from './components/typography';
|
|
6
|
+
|
|
7
|
+
// Layout
|
|
8
|
+
export * from './components/layout';
|
|
9
|
+
|
|
10
|
+
// Atoms
|
|
11
|
+
export * from './components/atoms';
|
|
12
|
+
|
|
13
|
+
// Molecules
|
|
14
|
+
export * from './components/molecules';
|
|
15
|
+
|
|
16
|
+
// Organisms
|
|
17
|
+
export * from './components/organisms';
|
|
18
|
+
|
|
19
|
+
// Utilities
|
|
20
|
+
export * from './components/utilities';
|
|
21
|
+
|
|
22
|
+
// Composables
|
|
23
|
+
export { useSize } from './composables/useSize';
|
|
24
|
+
export {
|
|
25
|
+
useVariantClasses,
|
|
26
|
+
useVariantIcon,
|
|
27
|
+
useVariantConfig,
|
|
28
|
+
useVariantTooltip,
|
|
29
|
+
useTooltipPosition,
|
|
30
|
+
useTooltipArrow,
|
|
31
|
+
useVariantToggle,
|
|
32
|
+
useVariantBadge,
|
|
33
|
+
useVariantButton,
|
|
34
|
+
useVariantDropdownItem,
|
|
35
|
+
VARIANT_CONFIGS
|
|
36
|
+
} from './composables/useVariant';
|
|
37
|
+
export { useClassComposition } from './composables/useClassComposition';
|
|
38
|
+
export { useSpacing } from './composables/useSpacing';
|
|
39
|
+
export {
|
|
40
|
+
useTransition,
|
|
41
|
+
useAnimationTransition,
|
|
42
|
+
useTooltipCustomTransition,
|
|
43
|
+
useAnimation,
|
|
44
|
+
COLLAPSE_TRANSITION,
|
|
45
|
+
FADE_TRANSITION,
|
|
46
|
+
FADE_SCALE_TRANSITION,
|
|
47
|
+
SLIDE_RIGHT_TRANSITION,
|
|
48
|
+
SLIDE_LEFT_TRANSITION,
|
|
49
|
+
SLIDE_UP_TRANSITION,
|
|
50
|
+
SLIDE_DOWN_TRANSITION,
|
|
51
|
+
TOOLTIP_CUSTOM_TRANSITION
|
|
52
|
+
} from './composables/useAnimation';
|
|
53
|
+
export {
|
|
54
|
+
useDataAttributes,
|
|
55
|
+
useCustomDataAttributes,
|
|
56
|
+
useBooleanDataAttributes
|
|
57
|
+
} from './composables/useDataAttributes';
|
|
58
|
+
export { useMenu } from './composables/useMenu';
|
|
59
|
+
export { useTableData } from './composables/useTableData';
|
|
60
|
+
export { useTableSort } from './composables/useTableSort';
|
|
61
|
+
export { useTableFilter } from './composables/useTableFilter';
|
|
62
|
+
export { useTablePagination } from './composables/useTablePagination';
|
|
63
|
+
export { useTableSelection } from './composables/useTableSelection';
|
|
64
|
+
export { useTableColumns } from './composables/useTableColumns';
|
|
65
|
+
export { useTabsScroll } from './composables/useTabsScroll';
|
|
66
|
+
|
|
67
|
+
// Utilities
|
|
68
|
+
export {
|
|
69
|
+
sizeProp,
|
|
70
|
+
variantProp,
|
|
71
|
+
buttonVariantProp,
|
|
72
|
+
iconAnimationProp,
|
|
73
|
+
disabledProp,
|
|
74
|
+
labelProp,
|
|
75
|
+
placeholderProp,
|
|
76
|
+
errorProp,
|
|
77
|
+
helperProp,
|
|
78
|
+
} from './utils/propTypes';
|
|
79
|
+
|
|
80
|
+
export {
|
|
81
|
+
TOGGLE_PRESETS,
|
|
82
|
+
useTogglePreset
|
|
83
|
+
} from './utils/toggleButtonPresets';
|
|
84
|
+
|
|
85
|
+
// Styles
|
|
86
|
+
import './styles/index.css';
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
/* =========================================
|
|
2
|
+
DX Components - Shared Animations
|
|
3
|
+
========================================= */
|
|
4
|
+
|
|
5
|
+
/* Icon Wiggle Animation - для иконок при hover */
|
|
6
|
+
@keyframes dx-icon-wiggle {
|
|
7
|
+
0% { transform: translateX(0) rotate(0deg); }
|
|
8
|
+
25% { transform: translateX(-1px) rotate(-3deg); }
|
|
9
|
+
50% { transform: translateX(0) rotate(0deg); }
|
|
10
|
+
75% { transform: translateX(1px) rotate(3deg); }
|
|
11
|
+
100% { transform: translateX(0) rotate(0deg); }
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/* Button Wiggle Animation - для кнопок с иконками */
|
|
15
|
+
@keyframes dx-btn-wiggle {
|
|
16
|
+
0% { transform: translateX(0) rotate(0deg); }
|
|
17
|
+
25% { transform: translateX(-1px) rotate(-3deg); }
|
|
18
|
+
50% { transform: translateX(0) rotate(0deg); }
|
|
19
|
+
75% { transform: translateX(1px) rotate(3deg); }
|
|
20
|
+
100% { transform: translateX(0) rotate(0deg); }
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/* Scale Animation - увеличение элемента */
|
|
24
|
+
@keyframes dx-scale {
|
|
25
|
+
from { transform: scale(1); }
|
|
26
|
+
to { transform: scale(1.1); }
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/* Fade In/Out */
|
|
30
|
+
@keyframes dx-fade-in {
|
|
31
|
+
from { opacity: 0; }
|
|
32
|
+
to { opacity: 1; }
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@keyframes dx-fade-out {
|
|
36
|
+
from { opacity: 1; }
|
|
37
|
+
to { opacity: 0; }
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/* Slide Animations */
|
|
41
|
+
@keyframes dx-slide-in-right {
|
|
42
|
+
from { transform: translateX(100%); }
|
|
43
|
+
to { transform: translateX(0); }
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
@keyframes dx-slide-out-right {
|
|
47
|
+
from { transform: translateX(0); }
|
|
48
|
+
to { transform: translateX(100%); }
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
@keyframes dx-slide-in-left {
|
|
52
|
+
from { transform: translateX(-100%); }
|
|
53
|
+
to { transform: translateX(0); }
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
@keyframes dx-slide-out-left {
|
|
57
|
+
from { transform: translateX(0); }
|
|
58
|
+
to { transform: translateX(-100%); }
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
@keyframes dx-slide-in-up {
|
|
62
|
+
from { transform: translateY(100%); }
|
|
63
|
+
to { transform: translateY(0); }
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
@keyframes dx-slide-in-down {
|
|
67
|
+
from { transform: translateY(-100%); }
|
|
68
|
+
to { transform: translateY(0); }
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/* Bounce Animation - для Empty State и других элементов */
|
|
72
|
+
@keyframes dx-bounce-slow {
|
|
73
|
+
0%, 100% { transform: translate(0, 0) rotate(0deg); }
|
|
74
|
+
25% { transform: translate(-2px, -1px) rotate(-3deg); }
|
|
75
|
+
50% { transform: translate(2px, 1px) rotate(3deg); }
|
|
76
|
+
75% { transform: translate(-1px, 1.5px) rotate(-2deg); }
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/* Pulse Animation */
|
|
80
|
+
@keyframes dx-pulse {
|
|
81
|
+
0%, 100% { opacity: 1; }
|
|
82
|
+
50% { opacity: 0.5; }
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/* Spin Animation - для лоадеров */
|
|
86
|
+
@keyframes dx-spin {
|
|
87
|
+
from { transform: rotate(0deg); }
|
|
88
|
+
to { transform: rotate(360deg); }
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/* Shake Animation - для ошибок */
|
|
92
|
+
@keyframes dx-shake {
|
|
93
|
+
0%, 100% { transform: translateX(0); }
|
|
94
|
+
10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
|
|
95
|
+
20%, 40%, 60%, 80% { transform: translateX(4px); }
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/* Stripes Animation - для progress bar */
|
|
99
|
+
@keyframes dx-stripes {
|
|
100
|
+
0% { background-position: 1rem 0; }
|
|
101
|
+
100% { background-position: 0 0; }
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/* Utility Classes */
|
|
105
|
+
.dx-animate-wiggle {
|
|
106
|
+
animation: dx-icon-wiggle 0.28s ease-in-out;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.dx-animate-scale {
|
|
110
|
+
animation: dx-scale 0.2s ease forwards;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.dx-animate-fade-in {
|
|
114
|
+
animation: dx-fade-in 0.2s ease;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.dx-animate-fade-out {
|
|
118
|
+
animation: dx-fade-out 0.2s ease;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.dx-animate-bounce-slow {
|
|
122
|
+
animation: dx-bounce-slow 3.2s infinite ease-in-out;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.dx-animate-pulse {
|
|
126
|
+
animation: dx-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.dx-animate-spin {
|
|
130
|
+
animation: dx-spin 1s linear infinite;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.dx-animate-shake {
|
|
134
|
+
animation: dx-shake 0.5s ease-in-out;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.dx-animate-stripes {
|
|
138
|
+
animation: dx-stripes 1s linear infinite;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.dx-bg-stripes {
|
|
142
|
+
background-image: linear-gradient(
|
|
143
|
+
45deg,
|
|
144
|
+
rgba(255,255,255,0.15) 25%,
|
|
145
|
+
transparent 25%,
|
|
146
|
+
transparent 50%,
|
|
147
|
+
rgba(255,255,255,0.15) 50%,
|
|
148
|
+
rgba(255,255,255,0.15) 75%,
|
|
149
|
+
transparent 75%,
|
|
150
|
+
transparent
|
|
151
|
+
);
|
|
152
|
+
background-size: 1rem 1rem;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/* Transition Utilities */
|
|
156
|
+
.dx-transition-all {
|
|
157
|
+
transition: all 200ms ease;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.dx-transition-colors {
|
|
161
|
+
transition: color 200ms ease, background-color 200ms ease, border-color 200ms ease;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.dx-transition-transform {
|
|
165
|
+
transition: transform 200ms ease;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.dx-transition-opacity {
|
|
169
|
+
transition: opacity 200ms ease;
|
|
170
|
+
}
|
|
171
|
+
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap");
|
|
2
|
+
@import "tailwindcss";
|
|
3
|
+
@import "./animations.css";
|
|
4
|
+
|
|
5
|
+
@layer base {
|
|
6
|
+
* {
|
|
7
|
+
font-feature-settings: "cv02", "cv03", "cv04", "cv11";
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
body {
|
|
11
|
+
background-color: white;
|
|
12
|
+
color: #0f172a;
|
|
13
|
+
-webkit-font-smoothing: antialiased;
|
|
14
|
+
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
|
|
15
|
+
letter-spacing: -0.01em;
|
|
16
|
+
line-height: 1.6;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
h1, h2, h3, h4, h5, h6 {
|
|
20
|
+
font-weight: 600;
|
|
21
|
+
letter-spacing: -0.02em;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.text-xs {
|
|
25
|
+
letter-spacing: 0.025em;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
@layer components {
|
|
30
|
+
/* Base input styles */
|
|
31
|
+
.dx-input {
|
|
32
|
+
width: 100%;
|
|
33
|
+
border-radius: 0.5rem;
|
|
34
|
+
border: 1px solid #e2e8f0;
|
|
35
|
+
background-color: white;
|
|
36
|
+
padding: 0.5rem 0.75rem;
|
|
37
|
+
font-size: 0.875rem;
|
|
38
|
+
color: #0f172a;
|
|
39
|
+
transition: all 150ms ease-in-out;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.dx-input::placeholder {
|
|
43
|
+
color: #94a3b8;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.dx-input:focus {
|
|
47
|
+
border-color: #cbd5e1;
|
|
48
|
+
outline: none;
|
|
49
|
+
box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.1);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.dx-input:disabled {
|
|
53
|
+
background-color: #f8fafc;
|
|
54
|
+
color: #94a3b8;
|
|
55
|
+
cursor: not-allowed;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/* Base button styles */
|
|
59
|
+
.dx-btn {
|
|
60
|
+
display: inline-flex;
|
|
61
|
+
align-items: center;
|
|
62
|
+
justify-content: center;
|
|
63
|
+
gap: 0.5rem;
|
|
64
|
+
border-radius: 0.5rem;
|
|
65
|
+
font-size: 0.875rem;
|
|
66
|
+
font-weight: 500;
|
|
67
|
+
transition: all 150ms ease-in-out;
|
|
68
|
+
cursor: pointer;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.dx-btn:disabled {
|
|
72
|
+
opacity: 0.5;
|
|
73
|
+
cursor: not-allowed;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
@layer utilities {
|
|
78
|
+
/* Subtle icon animation */
|
|
79
|
+
@keyframes wiggle-sm {
|
|
80
|
+
0%, 100% {
|
|
81
|
+
transform: translateX(0) rotate(0deg);
|
|
82
|
+
}
|
|
83
|
+
25% {
|
|
84
|
+
transform: translateX(-1px) rotate(-2deg);
|
|
85
|
+
}
|
|
86
|
+
75% {
|
|
87
|
+
transform: translateX(1px) rotate(2deg);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.wiggle-icon {
|
|
92
|
+
transition: transform 150ms ease;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.hover-wiggle:hover .wiggle-icon {
|
|
96
|
+
animation: wiggle-sm 0.28s ease-in-out;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Система дизайна для элементов форм
|
|
3
|
+
* Единые стили, высоты и отступы для всех компонентов
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export const FORM_TOKENS = {
|
|
7
|
+
// Высоты элементов
|
|
8
|
+
heights: {
|
|
9
|
+
sm: 'h-8', // 32px - компактные формы, таблицы
|
|
10
|
+
md: 'h-10', // 40px - стандарт для всех форм
|
|
11
|
+
lg: 'h-12', // 48px - акцентные элементы, CTA
|
|
12
|
+
},
|
|
13
|
+
|
|
14
|
+
// Отступы внутри элементов
|
|
15
|
+
padding: {
|
|
16
|
+
sm: 'px-3 py-1.5',
|
|
17
|
+
md: 'px-4 py-2.5',
|
|
18
|
+
lg: 'px-5 py-3',
|
|
19
|
+
},
|
|
20
|
+
|
|
21
|
+
// Размеры текста
|
|
22
|
+
text: {
|
|
23
|
+
sm: 'text-xs',
|
|
24
|
+
md: 'text-sm',
|
|
25
|
+
lg: 'text-base',
|
|
26
|
+
},
|
|
27
|
+
|
|
28
|
+
// Базовые стили
|
|
29
|
+
base: 'rounded-xl border border-slate-200 bg-white transition-colors',
|
|
30
|
+
|
|
31
|
+
// Состояния
|
|
32
|
+
states: {
|
|
33
|
+
hover: 'hover:border-slate-300',
|
|
34
|
+
focus: 'focus:outline-none focus:ring-2 focus:ring-slate-900/10 focus:border-slate-300',
|
|
35
|
+
disabled: 'disabled:opacity-60 disabled:cursor-not-allowed disabled:bg-slate-50',
|
|
36
|
+
error: 'border-rose-300 focus:ring-rose-500/10',
|
|
37
|
+
success: 'border-emerald-300 focus:ring-emerald-500/10',
|
|
38
|
+
},
|
|
39
|
+
|
|
40
|
+
// Цвета
|
|
41
|
+
colors: {
|
|
42
|
+
text: {
|
|
43
|
+
default: 'text-slate-700',
|
|
44
|
+
placeholder: 'placeholder:text-slate-400',
|
|
45
|
+
disabled: 'text-slate-400',
|
|
46
|
+
error: 'text-rose-700',
|
|
47
|
+
success: 'text-emerald-700',
|
|
48
|
+
},
|
|
49
|
+
bg: {
|
|
50
|
+
default: 'bg-white',
|
|
51
|
+
hover: 'hover:bg-slate-50',
|
|
52
|
+
active: 'bg-slate-100',
|
|
53
|
+
disabled: 'bg-slate-50',
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
|
|
57
|
+
// Лейблы
|
|
58
|
+
label: 'block text-sm text-slate-600 mb-1 font-medium',
|
|
59
|
+
|
|
60
|
+
// Вспомогательный текст
|
|
61
|
+
helper: 'mt-1 text-xs text-slate-500',
|
|
62
|
+
|
|
63
|
+
// Текст ошибки
|
|
64
|
+
error: 'mt-1 text-xs text-rose-500',
|
|
65
|
+
|
|
66
|
+
// Badge компонент
|
|
67
|
+
badge: {
|
|
68
|
+
base: 'inline-flex items-center gap-1 px-2 py-1 text-[11px] rounded-full border font-semibold',
|
|
69
|
+
variants: {
|
|
70
|
+
slate: 'bg-slate-50 text-slate-700 border-slate-100',
|
|
71
|
+
success: 'bg-emerald-50 text-emerald-700 border-emerald-100',
|
|
72
|
+
warning: 'bg-amber-50 text-amber-700 border-amber-100',
|
|
73
|
+
danger: 'bg-rose-50 text-rose-700 border-rose-100',
|
|
74
|
+
info: 'bg-blue-50 text-blue-700 border-blue-100',
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Генерирует классы для элемента формы
|
|
81
|
+
* @param {Object} options
|
|
82
|
+
* @param {string} options.size - sm | md | lg
|
|
83
|
+
* @param {boolean} options.disabled
|
|
84
|
+
* @param {boolean} options.error
|
|
85
|
+
* @param {boolean} options.success
|
|
86
|
+
* @returns {string}
|
|
87
|
+
*/
|
|
88
|
+
export function getFormClasses({ size = 'md', disabled = false, error = false, success = false } = {}) {
|
|
89
|
+
const classes = [
|
|
90
|
+
FORM_TOKENS.base,
|
|
91
|
+
FORM_TOKENS.heights[size],
|
|
92
|
+
FORM_TOKENS.text[size],
|
|
93
|
+
FORM_TOKENS.colors.text.default,
|
|
94
|
+
FORM_TOKENS.colors.text.placeholder,
|
|
95
|
+
];
|
|
96
|
+
|
|
97
|
+
if (!disabled) {
|
|
98
|
+
classes.push(FORM_TOKENS.states.hover);
|
|
99
|
+
classes.push(FORM_TOKENS.states.focus);
|
|
100
|
+
} else {
|
|
101
|
+
classes.push(FORM_TOKENS.states.disabled);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
if (error) {
|
|
105
|
+
classes.push(FORM_TOKENS.states.error);
|
|
106
|
+
} else if (success) {
|
|
107
|
+
classes.push(FORM_TOKENS.states.success);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
return classes.join(' ');
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Генерирует классы для padding в зависимости от размера
|
|
115
|
+
* @param {string} size - sm | md | lg
|
|
116
|
+
* @returns {string}
|
|
117
|
+
*/
|
|
118
|
+
export function getPaddingClass(size = 'md') {
|
|
119
|
+
return FORM_TOKENS.padding[size] || FORM_TOKENS.padding.md;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export default FORM_TOKENS;
|
|
123
|
+
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Стандартные prop types для переиспользования в компонентах
|
|
3
|
+
*
|
|
4
|
+
* Использование:
|
|
5
|
+
* import { sizeProp, variantProp } from '@/utils/propTypes';
|
|
6
|
+
*
|
|
7
|
+
* defineProps({
|
|
8
|
+
* size: sizeProp,
|
|
9
|
+
* variant: variantProp,
|
|
10
|
+
* });
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* @typedef {'xs' | 'sm' | 'md' | 'lg' | 'xl'} Size
|
|
15
|
+
* @typedef {'info' | 'success' | 'warning' | 'danger'} Variant
|
|
16
|
+
* @typedef {'none' | 'wiggle' | 'scale' | 'rotate'} IconAnimation
|
|
17
|
+
* @typedef {'primary' | 'ghost' | 'danger' | 'success' | 'warning' | 'outline'} ButtonVariant
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
// Размеры компонентов
|
|
21
|
+
export const sizeProp = {
|
|
22
|
+
type: String,
|
|
23
|
+
default: 'md',
|
|
24
|
+
validator: (value) => ['xs', 'sm', 'md', 'lg', 'xl'].includes(value),
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
// Варианты для alert/toast/badge
|
|
28
|
+
export const variantProp = {
|
|
29
|
+
type: String,
|
|
30
|
+
default: 'info',
|
|
31
|
+
validator: (value) => ['info', 'success', 'warning', 'danger'].includes(value),
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
// Варианты для кнопок
|
|
35
|
+
export const buttonVariantProp = {
|
|
36
|
+
type: String,
|
|
37
|
+
default: 'primary',
|
|
38
|
+
validator: (value) => ['primary', 'ghost', 'danger', 'success', 'warning', 'outline'].includes(value),
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
// Анимации иконок
|
|
42
|
+
export const iconAnimationProp = {
|
|
43
|
+
type: String,
|
|
44
|
+
default: 'none',
|
|
45
|
+
validator: (value) => ['none', 'wiggle', 'scale', 'rotate'].includes(value),
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
// Отключенное состояние
|
|
49
|
+
export const disabledProp = {
|
|
50
|
+
type: Boolean,
|
|
51
|
+
default: false,
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
// Лейбл
|
|
55
|
+
export const labelProp = {
|
|
56
|
+
type: String,
|
|
57
|
+
default: '',
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
// Placeholder
|
|
61
|
+
export const placeholderProp = {
|
|
62
|
+
type: String,
|
|
63
|
+
default: '',
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
// Текст ошибки
|
|
67
|
+
export const errorProp = {
|
|
68
|
+
type: String,
|
|
69
|
+
default: '',
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
// Вспомогательный текст
|
|
73
|
+
export const helperProp = {
|
|
74
|
+
type: String,
|
|
75
|
+
default: '',
|
|
76
|
+
};
|
|
77
|
+
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import {
|
|
2
|
+
HeartIcon,
|
|
3
|
+
StarIcon,
|
|
4
|
+
BookmarkIcon,
|
|
5
|
+
BellIcon,
|
|
6
|
+
EyeIcon,
|
|
7
|
+
LockOpenIcon,
|
|
8
|
+
SunIcon,
|
|
9
|
+
SpeakerWaveIcon,
|
|
10
|
+
PlayIcon,
|
|
11
|
+
} from '@heroicons/vue/24/outline';
|
|
12
|
+
|
|
13
|
+
import {
|
|
14
|
+
HeartIcon as HeartSolid,
|
|
15
|
+
StarIcon as StarSolid,
|
|
16
|
+
BookmarkIcon as BookmarkSolid,
|
|
17
|
+
BellIcon as BellSolid,
|
|
18
|
+
EyeSlashIcon,
|
|
19
|
+
LockClosedIcon,
|
|
20
|
+
MoonIcon,
|
|
21
|
+
SpeakerXMarkIcon,
|
|
22
|
+
PauseIcon,
|
|
23
|
+
} from '@heroicons/vue/24/solid';
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Готовые конфигурации для DXToggleButton
|
|
27
|
+
*
|
|
28
|
+
* Использование:
|
|
29
|
+
* import { TOGGLE_PRESETS } from '@/utils/toggleButtonPresets';
|
|
30
|
+
*
|
|
31
|
+
* <DXToggleButton v-bind="TOGGLE_PRESETS.favorite" v-model="isFavorite" />
|
|
32
|
+
*/
|
|
33
|
+
export const TOGGLE_PRESETS = {
|
|
34
|
+
favorite: {
|
|
35
|
+
activeIcon: HeartSolid,
|
|
36
|
+
inactiveIcon: HeartIcon,
|
|
37
|
+
activeVariant: 'danger',
|
|
38
|
+
inactiveVariant: 'ghost',
|
|
39
|
+
iconAnimation: 'scale',
|
|
40
|
+
},
|
|
41
|
+
bookmark: {
|
|
42
|
+
activeIcon: BookmarkSolid,
|
|
43
|
+
inactiveIcon: BookmarkIcon,
|
|
44
|
+
activeVariant: 'warning',
|
|
45
|
+
inactiveVariant: 'ghost',
|
|
46
|
+
iconAnimation: 'scale',
|
|
47
|
+
},
|
|
48
|
+
star: {
|
|
49
|
+
activeIcon: StarSolid,
|
|
50
|
+
inactiveIcon: StarIcon,
|
|
51
|
+
activeVariant: 'warning',
|
|
52
|
+
inactiveVariant: 'ghost',
|
|
53
|
+
iconAnimation: 'scale',
|
|
54
|
+
},
|
|
55
|
+
notifications: {
|
|
56
|
+
activeIcon: BellSolid,
|
|
57
|
+
inactiveIcon: BellIcon,
|
|
58
|
+
activeVariant: 'primary',
|
|
59
|
+
inactiveVariant: 'ghost',
|
|
60
|
+
iconAnimation: 'wiggle',
|
|
61
|
+
},
|
|
62
|
+
visibility: {
|
|
63
|
+
activeIcon: EyeIcon,
|
|
64
|
+
inactiveIcon: EyeSlashIcon,
|
|
65
|
+
activeLabel: 'Visible',
|
|
66
|
+
inactiveLabel: 'Hidden',
|
|
67
|
+
activeVariant: 'success',
|
|
68
|
+
inactiveVariant: 'ghost',
|
|
69
|
+
iconAnimation: 'scale',
|
|
70
|
+
},
|
|
71
|
+
lock: {
|
|
72
|
+
activeIcon: LockClosedIcon,
|
|
73
|
+
inactiveIcon: LockOpenIcon,
|
|
74
|
+
activeLabel: 'Locked',
|
|
75
|
+
inactiveLabel: 'Unlocked',
|
|
76
|
+
activeVariant: 'danger',
|
|
77
|
+
inactiveVariant: 'success',
|
|
78
|
+
iconAnimation: 'rotate',
|
|
79
|
+
},
|
|
80
|
+
theme: {
|
|
81
|
+
activeIcon: MoonIcon,
|
|
82
|
+
inactiveIcon: SunIcon,
|
|
83
|
+
activeLabel: 'Dark',
|
|
84
|
+
inactiveLabel: 'Light',
|
|
85
|
+
activeVariant: 'primary',
|
|
86
|
+
inactiveVariant: 'warning',
|
|
87
|
+
iconAnimation: 'rotate',
|
|
88
|
+
},
|
|
89
|
+
sound: {
|
|
90
|
+
activeIcon: SpeakerXMarkIcon,
|
|
91
|
+
inactiveIcon: SpeakerWaveIcon,
|
|
92
|
+
activeVariant: 'danger',
|
|
93
|
+
inactiveVariant: 'primary',
|
|
94
|
+
iconAnimation: 'scale',
|
|
95
|
+
},
|
|
96
|
+
playPause: {
|
|
97
|
+
activeIcon: PauseIcon,
|
|
98
|
+
inactiveIcon: PlayIcon,
|
|
99
|
+
activeLabel: 'Pause',
|
|
100
|
+
inactiveLabel: 'Play',
|
|
101
|
+
activeVariant: 'warning',
|
|
102
|
+
inactiveVariant: 'success',
|
|
103
|
+
iconAnimation: 'scale',
|
|
104
|
+
},
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Хелпер для использования preset
|
|
109
|
+
* @param {string} presetName - favorite | bookmark | star | notifications и др.
|
|
110
|
+
* @returns {Object} Конфигурация для DXToggleButton
|
|
111
|
+
*/
|
|
112
|
+
export function useTogglePreset(presetName) {
|
|
113
|
+
return TOGGLE_PRESETS[presetName] || TOGGLE_PRESETS.favorite;
|
|
114
|
+
}
|
|
115
|
+
|