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,291 @@
|
|
|
1
|
+
import DXInput from './DXInput.vue';
|
|
2
|
+
import { ref } from 'vue';
|
|
3
|
+
import {
|
|
4
|
+
MagnifyingGlassIcon,
|
|
5
|
+
EnvelopeIcon,
|
|
6
|
+
PhoneIcon,
|
|
7
|
+
UserIcon,
|
|
8
|
+
LockClosedIcon,
|
|
9
|
+
CreditCardIcon,
|
|
10
|
+
MapPinIcon,
|
|
11
|
+
CurrencyDollarIcon,
|
|
12
|
+
CalendarIcon,
|
|
13
|
+
GlobeAltIcon,
|
|
14
|
+
CheckCircleIcon,
|
|
15
|
+
XCircleIcon,
|
|
16
|
+
} from '@heroicons/vue/24/outline';
|
|
17
|
+
|
|
18
|
+
export default {
|
|
19
|
+
title: 'Molecules/DXInput',
|
|
20
|
+
component: DXInput,
|
|
21
|
+
tags: ['autodocs'],
|
|
22
|
+
argTypes: {
|
|
23
|
+
size: {
|
|
24
|
+
control: 'select',
|
|
25
|
+
options: ['sm', 'md', 'lg'],
|
|
26
|
+
description: 'Размер поля',
|
|
27
|
+
},
|
|
28
|
+
disabled: {
|
|
29
|
+
control: 'boolean',
|
|
30
|
+
description: 'Отключенное состояние',
|
|
31
|
+
},
|
|
32
|
+
type: {
|
|
33
|
+
control: 'select',
|
|
34
|
+
options: ['text', 'email', 'number', 'tel', 'url'],
|
|
35
|
+
description: 'Тип input',
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export const Default = {
|
|
41
|
+
args: {
|
|
42
|
+
placeholder: 'Введите текст...',
|
|
43
|
+
},
|
|
44
|
+
render: (args) => ({
|
|
45
|
+
components: { DXInput },
|
|
46
|
+
setup() { return { args }; },
|
|
47
|
+
template: '<DXInput v-bind="args" />',
|
|
48
|
+
}),
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export const WithLabel = {
|
|
52
|
+
args: {
|
|
53
|
+
label: 'Email',
|
|
54
|
+
placeholder: 'example@mail.com',
|
|
55
|
+
type: 'email',
|
|
56
|
+
},
|
|
57
|
+
render: (args) => ({
|
|
58
|
+
components: { DXInput },
|
|
59
|
+
setup() { return { args }; },
|
|
60
|
+
template: '<DXInput v-bind="args" />',
|
|
61
|
+
}),
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
export const WithHelper = {
|
|
65
|
+
args: {
|
|
66
|
+
label: 'Пароль',
|
|
67
|
+
placeholder: 'Минимум 8 символов',
|
|
68
|
+
helper: 'Используйте буквы, цифры и символы',
|
|
69
|
+
type: 'password',
|
|
70
|
+
},
|
|
71
|
+
render: (args) => ({
|
|
72
|
+
components: { DXInput },
|
|
73
|
+
setup() { return { args }; },
|
|
74
|
+
template: '<DXInput v-bind="args" />',
|
|
75
|
+
}),
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
export const WithError = {
|
|
79
|
+
args: {
|
|
80
|
+
label: 'Email',
|
|
81
|
+
placeholder: 'example@mail.com',
|
|
82
|
+
error: 'Неверный формат email',
|
|
83
|
+
modelValue: 'invalid-email',
|
|
84
|
+
},
|
|
85
|
+
render: (args) => ({
|
|
86
|
+
components: { DXInput },
|
|
87
|
+
setup() { return { args }; },
|
|
88
|
+
template: '<DXInput v-bind="args" />',
|
|
89
|
+
}),
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
export const Disabled = {
|
|
93
|
+
args: {
|
|
94
|
+
label: 'Поле отключено',
|
|
95
|
+
placeholder: 'Нельзя редактировать',
|
|
96
|
+
disabled: true,
|
|
97
|
+
modelValue: 'Значение',
|
|
98
|
+
},
|
|
99
|
+
render: (args) => ({
|
|
100
|
+
components: { DXInput },
|
|
101
|
+
setup() { return { args }; },
|
|
102
|
+
template: '<DXInput v-bind="args" />',
|
|
103
|
+
}),
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
export const Sizes = {
|
|
107
|
+
render: () => ({
|
|
108
|
+
components: { DXInput },
|
|
109
|
+
template: `
|
|
110
|
+
<div class="space-y-4 max-w-md">
|
|
111
|
+
<DXInput size="sm" placeholder="Small" label="Small" />
|
|
112
|
+
<DXInput size="md" placeholder="Medium" label="Medium" />
|
|
113
|
+
<DXInput size="lg" placeholder="Large" label="Large" />
|
|
114
|
+
</div>
|
|
115
|
+
`,
|
|
116
|
+
}),
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
// С иконками
|
|
120
|
+
export const WithPrefixIcon = {
|
|
121
|
+
render: () => ({
|
|
122
|
+
components: { DXInput },
|
|
123
|
+
setup() {
|
|
124
|
+
const email = ref('');
|
|
125
|
+
return { email, EnvelopeIcon };
|
|
126
|
+
},
|
|
127
|
+
template: `
|
|
128
|
+
<DXInput
|
|
129
|
+
v-model="email"
|
|
130
|
+
label="Email"
|
|
131
|
+
placeholder="example@mail.com"
|
|
132
|
+
:prefix-icon="EnvelopeIcon"
|
|
133
|
+
/>
|
|
134
|
+
`,
|
|
135
|
+
}),
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
export const WithSuffixIcon = {
|
|
139
|
+
render: () => ({
|
|
140
|
+
components: { DXInput },
|
|
141
|
+
setup() {
|
|
142
|
+
const url = ref('https://example.com');
|
|
143
|
+
return { url, CheckCircleIcon };
|
|
144
|
+
},
|
|
145
|
+
template: `
|
|
146
|
+
<DXInput
|
|
147
|
+
v-model="url"
|
|
148
|
+
label="Website"
|
|
149
|
+
placeholder="https://..."
|
|
150
|
+
:suffix-icon="CheckCircleIcon"
|
|
151
|
+
helper="URL is valid"
|
|
152
|
+
/>
|
|
153
|
+
`,
|
|
154
|
+
}),
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
export const Search = {
|
|
158
|
+
render: () => ({
|
|
159
|
+
components: { DXInput },
|
|
160
|
+
setup() {
|
|
161
|
+
const search = ref('');
|
|
162
|
+
return { search, MagnifyingGlassIcon };
|
|
163
|
+
},
|
|
164
|
+
template: `
|
|
165
|
+
<DXInput
|
|
166
|
+
v-model="search"
|
|
167
|
+
placeholder="Search..."
|
|
168
|
+
:prefix-icon="MagnifyingGlassIcon"
|
|
169
|
+
/>
|
|
170
|
+
`,
|
|
171
|
+
}),
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
export const FormWithIcons = {
|
|
175
|
+
render: () => ({
|
|
176
|
+
components: { DXInput },
|
|
177
|
+
setup() {
|
|
178
|
+
const form = ref({
|
|
179
|
+
name: '',
|
|
180
|
+
email: '',
|
|
181
|
+
phone: '',
|
|
182
|
+
address: '',
|
|
183
|
+
});
|
|
184
|
+
return {
|
|
185
|
+
form,
|
|
186
|
+
UserIcon,
|
|
187
|
+
EnvelopeIcon,
|
|
188
|
+
PhoneIcon,
|
|
189
|
+
MapPinIcon,
|
|
190
|
+
};
|
|
191
|
+
},
|
|
192
|
+
template: `
|
|
193
|
+
<div class="space-y-4 max-w-md">
|
|
194
|
+
<DXInput
|
|
195
|
+
v-model="form.name"
|
|
196
|
+
label="Full Name"
|
|
197
|
+
placeholder="John Doe"
|
|
198
|
+
:prefix-icon="UserIcon"
|
|
199
|
+
/>
|
|
200
|
+
<DXInput
|
|
201
|
+
v-model="form.email"
|
|
202
|
+
label="Email"
|
|
203
|
+
type="email"
|
|
204
|
+
placeholder="john@example.com"
|
|
205
|
+
:prefix-icon="EnvelopeIcon"
|
|
206
|
+
/>
|
|
207
|
+
<DXInput
|
|
208
|
+
v-model="form.phone"
|
|
209
|
+
label="Phone"
|
|
210
|
+
type="tel"
|
|
211
|
+
placeholder="+1 (555) 000-0000"
|
|
212
|
+
:prefix-icon="PhoneIcon"
|
|
213
|
+
/>
|
|
214
|
+
<DXInput
|
|
215
|
+
v-model="form.address"
|
|
216
|
+
label="Address"
|
|
217
|
+
placeholder="123 Main St"
|
|
218
|
+
:prefix-icon="MapPinIcon"
|
|
219
|
+
/>
|
|
220
|
+
</div>
|
|
221
|
+
`,
|
|
222
|
+
}),
|
|
223
|
+
};
|
|
224
|
+
|
|
225
|
+
export const PaymentForm = {
|
|
226
|
+
render: () => ({
|
|
227
|
+
components: { DXInput },
|
|
228
|
+
setup() {
|
|
229
|
+
const cardNumber = ref('');
|
|
230
|
+
const amount = ref('');
|
|
231
|
+
return {
|
|
232
|
+
cardNumber,
|
|
233
|
+
amount,
|
|
234
|
+
CreditCardIcon,
|
|
235
|
+
CurrencyDollarIcon,
|
|
236
|
+
};
|
|
237
|
+
},
|
|
238
|
+
template: `
|
|
239
|
+
<div class="space-y-4 max-w-md">
|
|
240
|
+
<DXInput
|
|
241
|
+
v-model="cardNumber"
|
|
242
|
+
label="Card Number"
|
|
243
|
+
placeholder="1234 5678 9012 3456"
|
|
244
|
+
:prefix-icon="CreditCardIcon"
|
|
245
|
+
/>
|
|
246
|
+
<DXInput
|
|
247
|
+
v-model="amount"
|
|
248
|
+
label="Amount"
|
|
249
|
+
type="number"
|
|
250
|
+
placeholder="0.00"
|
|
251
|
+
:prefix-icon="CurrencyDollarIcon"
|
|
252
|
+
/>
|
|
253
|
+
</div>
|
|
254
|
+
`,
|
|
255
|
+
}),
|
|
256
|
+
};
|
|
257
|
+
|
|
258
|
+
export const AllIconTypes = {
|
|
259
|
+
render: () => ({
|
|
260
|
+
components: { DXInput },
|
|
261
|
+
setup() {
|
|
262
|
+
return {
|
|
263
|
+
MagnifyingGlassIcon,
|
|
264
|
+
EnvelopeIcon,
|
|
265
|
+
PhoneIcon,
|
|
266
|
+
UserIcon,
|
|
267
|
+
LockClosedIcon,
|
|
268
|
+
CreditCardIcon,
|
|
269
|
+
CalendarIcon,
|
|
270
|
+
MapPinIcon,
|
|
271
|
+
CurrencyDollarIcon,
|
|
272
|
+
GlobeAltIcon,
|
|
273
|
+
};
|
|
274
|
+
},
|
|
275
|
+
template: `
|
|
276
|
+
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
|
|
277
|
+
<DXInput placeholder="Search" :prefix-icon="MagnifyingGlassIcon" />
|
|
278
|
+
<DXInput placeholder="Email" :prefix-icon="EnvelopeIcon" />
|
|
279
|
+
<DXInput placeholder="Phone" :prefix-icon="PhoneIcon" />
|
|
280
|
+
<DXInput placeholder="Username" :prefix-icon="UserIcon" />
|
|
281
|
+
<DXInput placeholder="Password" type="password" :prefix-icon="LockClosedIcon" />
|
|
282
|
+
<DXInput placeholder="Card" :prefix-icon="CreditCardIcon" />
|
|
283
|
+
<DXInput placeholder="Date" :prefix-icon="CalendarIcon" />
|
|
284
|
+
<DXInput placeholder="Location" :prefix-icon="MapPinIcon" />
|
|
285
|
+
<DXInput placeholder="Price" :prefix-icon="CurrencyDollarIcon" />
|
|
286
|
+
<DXInput placeholder="Website" :prefix-icon="GlobeAltIcon" />
|
|
287
|
+
</div>
|
|
288
|
+
`,
|
|
289
|
+
}),
|
|
290
|
+
};
|
|
291
|
+
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<DXFormLabel
|
|
3
|
+
:label="label"
|
|
4
|
+
:error="error"
|
|
5
|
+
:helper="helper"
|
|
6
|
+
:required="required"
|
|
7
|
+
data-component="DXInput"
|
|
8
|
+
:data-size="size"
|
|
9
|
+
:data-disabled="disabled"
|
|
10
|
+
:data-error="!!error"
|
|
11
|
+
>
|
|
12
|
+
<div class="relative">
|
|
13
|
+
<DXIconWrapper
|
|
14
|
+
v-if="prefixIcon || $slots.prefix"
|
|
15
|
+
position="left"
|
|
16
|
+
:icon="prefixIcon"
|
|
17
|
+
:size="getIconSize()"
|
|
18
|
+
>
|
|
19
|
+
<slot name="prefix" />
|
|
20
|
+
</DXIconWrapper>
|
|
21
|
+
|
|
22
|
+
<input
|
|
23
|
+
:type="type"
|
|
24
|
+
:placeholder="placeholder"
|
|
25
|
+
:value="modelValue"
|
|
26
|
+
:disabled="disabled"
|
|
27
|
+
:class="inputClasses"
|
|
28
|
+
@input="$emit('update:modelValue', $event.target.value)"
|
|
29
|
+
/>
|
|
30
|
+
|
|
31
|
+
<DXIconWrapper
|
|
32
|
+
v-if="suffixIcon || $slots.suffix"
|
|
33
|
+
position="right"
|
|
34
|
+
:icon="suffixIcon"
|
|
35
|
+
:size="getIconSize()"
|
|
36
|
+
>
|
|
37
|
+
<slot name="suffix" />
|
|
38
|
+
</DXIconWrapper>
|
|
39
|
+
</div>
|
|
40
|
+
</DXFormLabel>
|
|
41
|
+
</template>
|
|
42
|
+
|
|
43
|
+
<script setup>
|
|
44
|
+
import { computed, useSlots, inject, onMounted, onUnmounted } from "vue";
|
|
45
|
+
import { useSize } from "@/composables/useSize";
|
|
46
|
+
import { useClassComposition } from "@/composables/useClassComposition";
|
|
47
|
+
import DXFormLabel from "../../atoms/DXFormLabel/DXFormLabel.vue";
|
|
48
|
+
import DXIconWrapper from "../../atoms/DXIconWrapper/DXIconWrapper.vue";
|
|
49
|
+
|
|
50
|
+
const slots = useSlots();
|
|
51
|
+
const inputGroup = inject("inputGroup", null);
|
|
52
|
+
|
|
53
|
+
// Генерируем уникальный ID для регистрации
|
|
54
|
+
const componentId = Date.now() + Math.random();
|
|
55
|
+
|
|
56
|
+
onMounted(() => {
|
|
57
|
+
if (inputGroup?.registerComponent) {
|
|
58
|
+
inputGroup.registerComponent('input', componentId);
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
onUnmounted(() => {
|
|
63
|
+
if (inputGroup?.unregisterComponent) {
|
|
64
|
+
inputGroup.unregisterComponent(componentId);
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
// Получаем информацию о позиции addon
|
|
69
|
+
const addonPosition = computed(() => {
|
|
70
|
+
if (!inputGroup?.getComponentPosition) {
|
|
71
|
+
return { hasLeftAddon: false, hasRightAddon: false };
|
|
72
|
+
}
|
|
73
|
+
return inputGroup.getComponentPosition(componentId);
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
const props = defineProps({
|
|
77
|
+
/** Значение поля (v-model) */
|
|
78
|
+
modelValue: [String, Number],
|
|
79
|
+
/** Тип input */
|
|
80
|
+
type: { type: String, default: "text" },
|
|
81
|
+
/** Placeholder */
|
|
82
|
+
placeholder: { type: String, default: "" },
|
|
83
|
+
/** Лейбл над полем */
|
|
84
|
+
label: { type: String, default: "" },
|
|
85
|
+
/** Обязательное поле */
|
|
86
|
+
required: { type: Boolean, default: false },
|
|
87
|
+
/** Отключенное состояние */
|
|
88
|
+
disabled: { type: Boolean, default: false },
|
|
89
|
+
/** Текст ошибки */
|
|
90
|
+
error: { type: String, default: "" },
|
|
91
|
+
/** Вспомогательный текст */
|
|
92
|
+
helper: { type: String, default: "" },
|
|
93
|
+
/** Размер: sm | md | lg */
|
|
94
|
+
size: { type: String, default: "md" },
|
|
95
|
+
/** Дополнительные классы */
|
|
96
|
+
inputClass: { type: [String, Array, Object], default: "" },
|
|
97
|
+
/** Иконка слева (Heroicon компонент) */
|
|
98
|
+
prefixIcon: { type: [Object, Function], default: null },
|
|
99
|
+
/** Иконка справа (Heroicon компонент) */
|
|
100
|
+
suffixIcon: { type: [Object, Function], default: null },
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
defineEmits(["update:modelValue"]);
|
|
104
|
+
|
|
105
|
+
// Размер иконки в зависимости от размера инпута
|
|
106
|
+
const getIconSize = () => {
|
|
107
|
+
const sizeMap = {
|
|
108
|
+
sm: 'sm',
|
|
109
|
+
md: 'md',
|
|
110
|
+
lg: 'lg',
|
|
111
|
+
};
|
|
112
|
+
return sizeMap[props.size] || 'md';
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
const BASE_CLASSES = "w-full border border-slate-200 bg-white transition-colors text-slate-700 placeholder:text-slate-400";
|
|
116
|
+
|
|
117
|
+
// Адаптивные отступы для иконок в зависимости от размера инпута
|
|
118
|
+
const getPaddingClasses = (hasIcon, position) => {
|
|
119
|
+
if (!hasIcon) return '';
|
|
120
|
+
const paddingMap = {
|
|
121
|
+
sm: position === 'left' ? 'pl-10' : 'pr-10',
|
|
122
|
+
md: position === 'left' ? 'pl-11' : 'pr-11',
|
|
123
|
+
lg: position === 'left' ? 'pl-12' : 'pr-12',
|
|
124
|
+
};
|
|
125
|
+
return paddingMap[props.size] || paddingMap.md;
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
// Получаем классы скругления в зависимости от позиции addon
|
|
129
|
+
const getBorderRadiusClasses = () => {
|
|
130
|
+
if (addonPosition.value.hasLeftAddon && addonPosition.value.hasRightAddon) {
|
|
131
|
+
return 'rounded-none'; // Оба addon - без скругления
|
|
132
|
+
} else if (addonPosition.value.hasLeftAddon) {
|
|
133
|
+
return 'rounded-l-none rounded-r-xl'; // Только слева
|
|
134
|
+
} else if (addonPosition.value.hasRightAddon) {
|
|
135
|
+
return 'rounded-l-xl rounded-r-none'; // Только справа
|
|
136
|
+
} else {
|
|
137
|
+
return 'rounded-xl'; // Нет addon - полное скругление
|
|
138
|
+
}
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
const inputClasses = computed(() =>
|
|
142
|
+
useClassComposition(
|
|
143
|
+
`${BASE_CLASSES} ${getBorderRadiusClasses()}`,
|
|
144
|
+
{
|
|
145
|
+
[useSize(props.size, 'input')]: true,
|
|
146
|
+
'hover:border-slate-300 focus:outline-none focus:ring-2 focus:ring-slate-900/10 focus:border-slate-300': !props.disabled,
|
|
147
|
+
'opacity-60 cursor-not-allowed bg-slate-50': props.disabled,
|
|
148
|
+
'border-rose-300 focus:ring-rose-500/10': props.error,
|
|
149
|
+
[getPaddingClasses(props.prefixIcon || slots.prefix, 'left')]: true,
|
|
150
|
+
[getPaddingClasses(props.suffixIcon || slots.suffix, 'right')]: true,
|
|
151
|
+
},
|
|
152
|
+
props.inputClass
|
|
153
|
+
)
|
|
154
|
+
);
|
|
155
|
+
</script>
|
|
156
|
+
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
import DXInputGroup from './DXInputGroup.vue';
|
|
2
|
+
import DXInputAddon from '../../atoms/DXInputAddon/DXInputAddon.vue';
|
|
3
|
+
import DXInput from '../DXInput/DXInput.vue';
|
|
4
|
+
import DXSelect from '../DXSelect/DXSelect.vue';
|
|
5
|
+
import DXTextarea from '../DXTextarea/DXTextarea.vue';
|
|
6
|
+
import { ref } from 'vue';
|
|
7
|
+
import {
|
|
8
|
+
GlobeAltIcon,
|
|
9
|
+
CurrencyDollarIcon,
|
|
10
|
+
MagnifyingGlassIcon,
|
|
11
|
+
} from '@heroicons/vue/24/outline';
|
|
12
|
+
|
|
13
|
+
export default {
|
|
14
|
+
title: 'Molecules/DXInputGroup',
|
|
15
|
+
component: DXInputGroup,
|
|
16
|
+
tags: ['autodocs'],
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export const Default = {
|
|
20
|
+
render: () => ({
|
|
21
|
+
components: { DXInputGroup, DXInputAddon, DXInput },
|
|
22
|
+
setup() {
|
|
23
|
+
const url = ref('');
|
|
24
|
+
return { url };
|
|
25
|
+
},
|
|
26
|
+
template: `
|
|
27
|
+
<DXInputGroup label="Website">
|
|
28
|
+
<DXInputAddon>https://</DXInputAddon>
|
|
29
|
+
<DXInput v-model="url" placeholder="example.com" />
|
|
30
|
+
</DXInputGroup>
|
|
31
|
+
`,
|
|
32
|
+
}),
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export const WithSuffix = {
|
|
36
|
+
render: () => ({
|
|
37
|
+
components: { DXInputGroup, DXInputAddon, DXInput },
|
|
38
|
+
setup() {
|
|
39
|
+
const price = ref('');
|
|
40
|
+
return { price };
|
|
41
|
+
},
|
|
42
|
+
template: `
|
|
43
|
+
<DXInputGroup label="Price">
|
|
44
|
+
<DXInput v-model="price" type="number" placeholder="0.00" />
|
|
45
|
+
<DXInputAddon>USD</DXInputAddon>
|
|
46
|
+
</DXInputGroup>
|
|
47
|
+
`,
|
|
48
|
+
}),
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export const BothSides = {
|
|
52
|
+
render: () => ({
|
|
53
|
+
components: { DXInputGroup, DXInputAddon, DXInput },
|
|
54
|
+
setup() {
|
|
55
|
+
const amount = ref('');
|
|
56
|
+
return { amount, CurrencyDollarIcon };
|
|
57
|
+
},
|
|
58
|
+
template: `
|
|
59
|
+
<DXInputGroup label="Amount">
|
|
60
|
+
<DXInputAddon :icon="CurrencyDollarIcon">$</DXInputAddon>
|
|
61
|
+
<DXInput v-model="amount" type="number" placeholder="0.00" />
|
|
62
|
+
<DXInputAddon>.00</DXInputAddon>
|
|
63
|
+
</DXInputGroup>
|
|
64
|
+
`,
|
|
65
|
+
}),
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
export const WithSelect = {
|
|
69
|
+
render: () => ({
|
|
70
|
+
components: { DXInputGroup, DXInputAddon, DXSelect },
|
|
71
|
+
setup() {
|
|
72
|
+
const country = ref('');
|
|
73
|
+
const countries = [
|
|
74
|
+
{ value: 'us', label: 'United States' },
|
|
75
|
+
{ value: 'uk', label: 'United Kingdom' },
|
|
76
|
+
{ value: 'ca', label: 'Canada' },
|
|
77
|
+
{ value: 'de', label: 'Germany' },
|
|
78
|
+
];
|
|
79
|
+
return { country, countries, GlobeAltIcon };
|
|
80
|
+
},
|
|
81
|
+
template: `
|
|
82
|
+
<DXInputGroup label="Country">
|
|
83
|
+
<DXInputAddon :icon="GlobeAltIcon" />
|
|
84
|
+
<DXSelect v-model="country" :options="countries" placeholder="Select country" />
|
|
85
|
+
</DXInputGroup>
|
|
86
|
+
`,
|
|
87
|
+
}),
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
export const WithTextarea = {
|
|
91
|
+
render: () => ({
|
|
92
|
+
components: { DXInputGroup, DXInputAddon, DXTextarea },
|
|
93
|
+
setup() {
|
|
94
|
+
const message = ref('');
|
|
95
|
+
return { message, MagnifyingGlassIcon };
|
|
96
|
+
},
|
|
97
|
+
template: `
|
|
98
|
+
<DXInputGroup label="Message">
|
|
99
|
+
<DXInputAddon :icon="MagnifyingGlassIcon" />
|
|
100
|
+
<DXTextarea v-model="message" placeholder="Enter your message..." :rows="4" />
|
|
101
|
+
</DXInputGroup>
|
|
102
|
+
`,
|
|
103
|
+
}),
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
export const Sizes = {
|
|
107
|
+
render: () => ({
|
|
108
|
+
components: { DXInputGroup, DXInputAddon, DXInput },
|
|
109
|
+
setup() {
|
|
110
|
+
const small = ref('');
|
|
111
|
+
const medium = ref('');
|
|
112
|
+
const large = ref('');
|
|
113
|
+
return { small, medium, large, GlobeAltIcon };
|
|
114
|
+
},
|
|
115
|
+
template: `
|
|
116
|
+
<div class="space-y-4 max-w-md">
|
|
117
|
+
<DXInputGroup label="Small" size="sm">
|
|
118
|
+
<DXInputAddon :icon="GlobeAltIcon">https://</DXInputAddon>
|
|
119
|
+
<DXInput v-model="small" size="sm" placeholder="example.com" />
|
|
120
|
+
</DXInputGroup>
|
|
121
|
+
|
|
122
|
+
<DXInputGroup label="Medium (default)" size="md">
|
|
123
|
+
<DXInputAddon :icon="GlobeAltIcon">https://</DXInputAddon>
|
|
124
|
+
<DXInput v-model="medium" size="md" placeholder="example.com" />
|
|
125
|
+
</DXInputGroup>
|
|
126
|
+
|
|
127
|
+
<DXInputGroup label="Large" size="lg">
|
|
128
|
+
<DXInputAddon :icon="GlobeAltIcon">https://</DXInputAddon>
|
|
129
|
+
<DXInput v-model="large" size="lg" placeholder="example.com" />
|
|
130
|
+
</DXInputGroup>
|
|
131
|
+
</div>
|
|
132
|
+
`,
|
|
133
|
+
}),
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
export const Disabled = {
|
|
137
|
+
render: () => ({
|
|
138
|
+
components: { DXInputGroup, DXInputAddon, DXInput },
|
|
139
|
+
setup() {
|
|
140
|
+
const url = ref('example.com');
|
|
141
|
+
const price = ref('100.00');
|
|
142
|
+
return { url, price, GlobeAltIcon, CurrencyDollarIcon };
|
|
143
|
+
},
|
|
144
|
+
template: `
|
|
145
|
+
<div class="space-y-4 max-w-md">
|
|
146
|
+
<DXInputGroup label="Disabled Website" disabled>
|
|
147
|
+
<DXInputAddon :icon="GlobeAltIcon">https://</DXInputAddon>
|
|
148
|
+
<DXInput v-model="url" disabled placeholder="example.com" />
|
|
149
|
+
</DXInputGroup>
|
|
150
|
+
|
|
151
|
+
<DXInputGroup label="Disabled Price" disabled>
|
|
152
|
+
<DXInputAddon :icon="CurrencyDollarIcon">$</DXInputAddon>
|
|
153
|
+
<DXInput v-model="price" type="number" disabled placeholder="0.00" />
|
|
154
|
+
<DXInputAddon>USD</DXInputAddon>
|
|
155
|
+
</DXInputGroup>
|
|
156
|
+
</div>
|
|
157
|
+
`,
|
|
158
|
+
}),
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
export const WithError = {
|
|
162
|
+
render: () => ({
|
|
163
|
+
components: { DXInputGroup, DXInputAddon, DXInput },
|
|
164
|
+
setup() {
|
|
165
|
+
const url = ref('invalid-url');
|
|
166
|
+
const price = ref('abc');
|
|
167
|
+
return { url, price, GlobeAltIcon, CurrencyDollarIcon };
|
|
168
|
+
},
|
|
169
|
+
template: `
|
|
170
|
+
<div class="space-y-4 max-w-md">
|
|
171
|
+
<DXInputGroup label="Website URL" error="Invalid URL format">
|
|
172
|
+
<DXInputAddon :icon="GlobeAltIcon">https://</DXInputAddon>
|
|
173
|
+
<DXInput v-model="url" error="Invalid URL format" placeholder="example.com" />
|
|
174
|
+
</DXInputGroup>
|
|
175
|
+
|
|
176
|
+
<DXInputGroup label="Price" error="Must be a number">
|
|
177
|
+
<DXInputAddon :icon="CurrencyDollarIcon">$</DXInputAddon>
|
|
178
|
+
<DXInput v-model="price" type="number" error="Must be a number" placeholder="0.00" />
|
|
179
|
+
<DXInputAddon>USD</DXInputAddon>
|
|
180
|
+
</DXInputGroup>
|
|
181
|
+
</div>
|
|
182
|
+
`,
|
|
183
|
+
}),
|
|
184
|
+
};
|
|
185
|
+
|
|
186
|
+
export const UseCases = {
|
|
187
|
+
render: () => ({
|
|
188
|
+
components: { DXInputGroup, DXInputAddon, DXInput, DXSelect },
|
|
189
|
+
setup() {
|
|
190
|
+
const website = ref('');
|
|
191
|
+
const price = ref('');
|
|
192
|
+
const country = ref('');
|
|
193
|
+
const countries = [
|
|
194
|
+
{ value: 'us', label: 'United States' },
|
|
195
|
+
{ value: 'uk', label: 'United Kingdom' },
|
|
196
|
+
{ value: 'ca', label: 'Canada' },
|
|
197
|
+
];
|
|
198
|
+
return {
|
|
199
|
+
website,
|
|
200
|
+
price,
|
|
201
|
+
country,
|
|
202
|
+
countries,
|
|
203
|
+
GlobeAltIcon,
|
|
204
|
+
CurrencyDollarIcon,
|
|
205
|
+
};
|
|
206
|
+
},
|
|
207
|
+
template: `
|
|
208
|
+
<div class="space-y-6 max-w-md">
|
|
209
|
+
<DXInputGroup label="Website URL">
|
|
210
|
+
<DXInputAddon :icon="GlobeAltIcon">https://</DXInputAddon>
|
|
211
|
+
<DXInput v-model="website" placeholder="example.com" />
|
|
212
|
+
</DXInputGroup>
|
|
213
|
+
|
|
214
|
+
<DXInputGroup label="Price">
|
|
215
|
+
<DXInputAddon :icon="CurrencyDollarIcon">$</DXInputAddon>
|
|
216
|
+
<DXInput v-model="price" type="number" placeholder="0.00" />
|
|
217
|
+
<DXInputAddon>USD</DXInputAddon>
|
|
218
|
+
</DXInputGroup>
|
|
219
|
+
|
|
220
|
+
<DXInputGroup label="Country">
|
|
221
|
+
<DXInputAddon :icon="GlobeAltIcon" />
|
|
222
|
+
<DXSelect v-model="country" :options="countries" placeholder="Select country" />
|
|
223
|
+
</DXInputGroup>
|
|
224
|
+
</div>
|
|
225
|
+
`,
|
|
226
|
+
}),
|
|
227
|
+
};
|
|
228
|
+
|