@khsura/sui 0.0.0-stage → 1.19.0
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/.claude-plugin/marketplace.json +18 -0
- package/@types/components/badge/index.d.ts +1 -0
- package/@types/components/badge/sBadge.vue.d.ts +18 -0
- package/@types/components/badge/sBadgeContent.vue.d.ts +14 -0
- package/@types/components/calendar/index.d.ts +1 -0
- package/@types/components/calendar/sCalendar.vue.d.ts +52 -0
- package/@types/components/calendar/sCalendarMonthly.vue.d.ts +51 -0
- package/@types/components/calendar/sCalendarWeekly.vue.d.ts +75 -0
- package/@types/components/cards/index.d.ts +5 -0
- package/@types/components/cards/sCard.vue.d.ts +14 -0
- package/@types/components/cards/sCardActions.vue.d.ts +15 -0
- package/@types/components/cards/sCardSubtitle.vue.d.ts +15 -0
- package/@types/components/cards/sCardText.vue.d.ts +15 -0
- package/@types/components/cards/sCardTitle.vue.d.ts +15 -0
- package/@types/components/carousel/index.d.ts +2 -0
- package/@types/components/carousel/sCarousel.vue.d.ts +34 -0
- package/@types/components/carousel/sCarouselItem.vue.d.ts +14 -0
- package/@types/components/datePicker/index.d.ts +2 -0
- package/@types/components/datePicker/sDatePicker.vue.d.ts +22 -0
- package/@types/components/datePicker/sDatePickerDate.vue.d.ts +12 -0
- package/@types/components/datePicker/sDatePickerInput.vue.d.ts +31 -0
- package/@types/components/datePicker/sDatePickerMonth.vue.d.ts +12 -0
- package/@types/components/datePicker/sDatePickerSwitch.vue.d.ts +15 -0
- package/@types/components/datePicker/sDatePickerTitle.vue.d.ts +16 -0
- package/@types/components/datePicker/sDatePickerYear.vue.d.ts +12 -0
- package/@types/components/expansionPanel/index.d.ts +4 -0
- package/@types/components/expansionPanel/sExpansionPanel.vue.d.ts +17 -0
- package/@types/components/expansionPanel/sExpansionPanelContent.vue.d.ts +15 -0
- package/@types/components/expansionPanel/sExpansionPanelHeader.vue.d.ts +21 -0
- package/@types/components/expansionPanel/sExpansionPanels.vue.d.ts +24 -0
- package/@types/components/form/common/index.d.ts +1 -0
- package/@types/components/form/common/sFormInputError.vue.d.ts +25 -0
- package/@types/components/form/index.d.ts +7 -0
- package/@types/components/form/radio/index.d.ts +2 -0
- package/@types/components/form/radio/sRadio.vue.d.ts +32 -0
- package/@types/components/form/radio/sRadioGroup.vue.d.ts +35 -0
- package/@types/components/form/sCheckbox.vue.d.ts +22 -0
- package/@types/components/form/sForm.vue.d.ts +31 -0
- package/@types/components/form/sInput.vue.d.ts +73 -0
- package/@types/components/form/sSelect.vue.d.ts +64 -0
- package/@types/components/form/sTextarea.vue.d.ts +38 -0
- package/@types/components/grids/index.d.ts +4 -0
- package/@types/components/grids/sColumn.vue.d.ts +14 -0
- package/@types/components/grids/sContainer.vue.d.ts +14 -0
- package/@types/components/grids/sRow.vue.d.ts +14 -0
- package/@types/components/grids/sSpacer.vue.d.ts +13 -0
- package/@types/components/index.d.ts +36 -0
- package/@types/components/layout/index.d.ts +8 -0
- package/@types/components/layout/sApp.vue.d.ts +15 -0
- package/@types/components/layout/sAppBar.vue.d.ts +22 -0
- package/@types/components/layout/sAppBarTitle.vue.d.ts +16 -0
- package/@types/components/layout/sBottomNavigation.vue.d.ts +24 -0
- package/@types/components/layout/sFooter.vue.d.ts +18 -0
- package/@types/components/layout/sLayout.vue.d.ts +14 -0
- package/@types/components/layout/sMain.vue.d.ts +14 -0
- package/@types/components/layout/sNavigationDrawer.vue.d.ts +45 -0
- package/@types/components/list/index.d.ts +8 -0
- package/@types/components/list/sList.vue.d.ts +14 -0
- package/@types/components/list/sListItem.vue.d.ts +18 -0
- package/@types/components/list/sListItemAction.vue.d.ts +14 -0
- package/@types/components/list/sListItemContent.vue.d.ts +13 -0
- package/@types/components/list/sListItemGroup.vue.d.ts +47 -0
- package/@types/components/list/sListItemIcon.vue.d.ts +14 -0
- package/@types/components/list/sListItemSubtitle.vue.d.ts +13 -0
- package/@types/components/list/sListItemTitle.vue.d.ts +13 -0
- package/@types/components/progress/index.d.ts +2 -0
- package/@types/components/progress/sProgressCircular.vue.d.ts +18 -0
- package/@types/components/progress/sProgressLinear.vue.d.ts +17 -0
- package/@types/components/sAlert.vue.d.ts +14 -0
- package/@types/components/sAutocomplete.vue.d.ts +57 -0
- package/@types/components/sBreadcrumbs.vue.d.ts +16 -0
- package/@types/components/sButton.vue.d.ts +20 -0
- package/@types/components/sChip.vue.d.ts +24 -0
- package/@types/components/sDialog.vue.d.ts +33 -0
- package/@types/components/sDivider.vue.d.ts +4 -0
- package/@types/components/sDroppable.vue.d.ts +28 -0
- package/@types/components/sIcon.vue.d.ts +4 -0
- package/@types/components/sImage.vue.d.ts +14 -0
- package/@types/components/sMenu.vue.d.ts +36 -0
- package/@types/components/sOverlay.vue.d.ts +26 -0
- package/@types/components/sSheet.vue.d.ts +14 -0
- package/@types/components/sSnackbar.vue.d.ts +35 -0
- package/@types/components/sSubheader.vue.d.ts +13 -0
- package/@types/components/sSwitch.vue.d.ts +23 -0
- package/@types/components/sTooltip.vue.d.ts +25 -0
- package/@types/components/slideGroup/index.d.ts +2 -0
- package/@types/components/slideGroup/sSlideGroup.vue.d.ts +42 -0
- package/@types/components/slideGroup/sSlideItem.vue.d.ts +17 -0
- package/@types/components/splitViews/index.d.ts +2 -0
- package/@types/components/splitViews/sSplitView.vue.d.ts +17 -0
- package/@types/components/splitViews/sSplitViewItem.vue.d.ts +13 -0
- package/@types/components/stepper/index.d.ts +2 -0
- package/@types/components/stepper/sStepper.vue.d.ts +26 -0
- package/@types/components/stepper/sStepperStep.vue.d.ts +14 -0
- package/@types/components/table/index.d.ts +3 -0
- package/@types/components/table/sTable.vue.d.ts +72 -0
- package/@types/components/table/sTableBodyCell.vue.d.ts +22 -0
- package/@types/components/table/sTableHeadCell.vue.d.ts +24 -0
- package/@types/components/table/sTablePagination.vue.d.ts +33 -0
- package/@types/components/tabs/index.d.ts +2 -0
- package/@types/components/tabs/sTab.vue.d.ts +14 -0
- package/@types/components/tabs/sTabs.vue.d.ts +20 -0
- package/@types/components/toggleButtonGroup/index.d.ts +2 -0
- package/@types/components/toggleButtonGroup/sToggleButton.vue.d.ts +14 -0
- package/@types/components/toggleButtonGroup/sToggleButtonGroup.vue.d.ts +31 -0
- package/@types/components/toolbar/index.d.ts +3 -0
- package/@types/components/toolbar/sToolbar.vue.d.ts +23 -0
- package/@types/components/toolbar/sToolbarItem.vue.d.ts +5 -0
- package/@types/components/toolbar/sToolbarTitle.vue.d.ts +16 -0
- package/@types/components/window/index.d.ts +2 -0
- package/@types/components/window/sWindow.vue.d.ts +57 -0
- package/@types/components/window/sWindowItem.vue.d.ts +13 -0
- package/@types/componentsTypes.d.ts +8 -0
- package/@types/configs/app.d.ts +72 -0
- package/@types/configs/color.d.ts +2 -0
- package/@types/configs/core/breakpoint.d.ts +9 -0
- package/@types/configs/core/index.d.ts +1 -0
- package/@types/configs/datePicker.d.ts +34 -0
- package/@types/configs/grids.d.ts +3 -0
- package/@types/configs/i18n.d.ts +73 -0
- package/@types/configs/iconSizes.d.ts +7 -0
- package/@types/configs/index.d.ts +11 -0
- package/@types/configs/provider.d.ts +42 -0
- package/@types/configs/size.d.ts +2 -0
- package/@types/configs/toolbar.d.ts +11 -0
- package/@types/configs/transitions.d.ts +2 -0
- package/@types/constants/alert.d.ts +52 -0
- package/@types/constants/app.d.ts +7 -0
- package/@types/constants/button.d.ts +5 -0
- package/@types/constants/color.d.ts +318 -0
- package/@types/constants/cssVariables.d.ts +4 -0
- package/@types/constants/datePicker.d.ts +14 -0
- package/@types/constants/form.d.ts +9 -0
- package/@types/constants/grids.d.ts +14 -0
- package/@types/constants/i18n.d.ts +68 -0
- package/@types/constants/imageLoader.d.ts +13 -0
- package/@types/constants/index.d.ts +20 -0
- package/@types/constants/layout.d.ts +10 -0
- package/@types/constants/lazyLoad.d.ts +5 -0
- package/@types/constants/materialDesignIcon.d.ts +3 -0
- package/@types/constants/menuDimensions.d.ts +2 -0
- package/@types/constants/navigationDrawer.d.ts +8 -0
- package/@types/constants/overlay.d.ts +1 -0
- package/@types/constants/position.d.ts +1 -0
- package/@types/constants/size.d.ts +7 -0
- package/@types/constants/toolbar.d.ts +7 -0
- package/@types/constants/transition.d.ts +6 -0
- package/@types/definitions/app.d.ts +22 -0
- package/@types/definitions/emits/emitsTable.d.ts +18 -0
- package/@types/definitions/emits/index.d.ts +1 -0
- package/@types/definitions/index.d.ts +4 -0
- package/@types/definitions/props/core/index.d.ts +18 -0
- package/@types/definitions/props/core/propsActivator.d.ts +6 -0
- package/@types/definitions/props/core/propsBorder.d.ts +5 -0
- package/@types/definitions/props/core/propsButtonVariant.d.ts +3 -0
- package/@types/definitions/props/core/propsColor.d.ts +6 -0
- package/@types/definitions/props/core/propsComponentTheme.d.ts +4 -0
- package/@types/definitions/props/core/propsContent.d.ts +5 -0
- package/@types/definitions/props/core/propsDisabled.d.ts +4 -0
- package/@types/definitions/props/core/propsElevation.d.ts +3 -0
- package/@types/definitions/props/core/propsGroup.d.ts +6 -0
- package/@types/definitions/props/core/propsGroupItem.d.ts +6 -0
- package/@types/definitions/props/core/propsLayoutBase.d.ts +3 -0
- package/@types/definitions/props/core/propsLink.d.ts +7 -0
- package/@types/definitions/props/core/propsLocation.d.ts +6 -0
- package/@types/definitions/props/core/propsMeasurableStyles.d.ts +8 -0
- package/@types/definitions/props/core/propsPosition.d.ts +4 -0
- package/@types/definitions/props/core/propsTag.d.ts +4 -0
- package/@types/definitions/props/core/propsTextColor.d.ts +3 -0
- package/@types/definitions/props/core/propsToggleButtonGroupVariant.d.ts +3 -0
- package/@types/definitions/props/index.d.ts +70 -0
- package/@types/definitions/props/propsAlert.d.ts +7 -0
- package/@types/definitions/props/propsApp.d.ts +2 -0
- package/@types/definitions/props/propsAppBar.d.ts +9 -0
- package/@types/definitions/props/propsAutocomplete.d.ts +40 -0
- package/@types/definitions/props/propsBadge.d.ts +19 -0
- package/@types/definitions/props/propsBottomNavigation.d.ts +14 -0
- package/@types/definitions/props/propsBreadcrumbs.d.ts +7 -0
- package/@types/definitions/props/propsButton.d.ts +10 -0
- package/@types/definitions/props/propsCalendar.d.ts +27 -0
- package/@types/definitions/props/propsCard.d.ts +2 -0
- package/@types/definitions/props/propsCarousel.d.ts +12 -0
- package/@types/definitions/props/propsCarouselItem.d.ts +3 -0
- package/@types/definitions/props/propsCheckbox.d.ts +9 -0
- package/@types/definitions/props/propsChip.d.ts +7 -0
- package/@types/definitions/props/propsColumn.d.ts +10 -0
- package/@types/definitions/props/propsContainer.d.ts +8 -0
- package/@types/definitions/props/propsDatePicker.d.ts +15 -0
- package/@types/definitions/props/propsDatePickerFormat.d.ts +5 -0
- package/@types/definitions/props/propsDatePickerInput.d.ts +18 -0
- package/@types/definitions/props/propsDatePickerItem.d.ts +18 -0
- package/@types/definitions/props/propsDatePickerItemSwitch.d.ts +9 -0
- package/@types/definitions/props/propsDatePickerItemTitle.d.ts +3 -0
- package/@types/definitions/props/propsDialog.d.ts +10 -0
- package/@types/definitions/props/propsDivider.d.ts +3 -0
- package/@types/definitions/props/propsDroppable.d.ts +2 -0
- package/@types/definitions/props/propsExpansionPanels.d.ts +8 -0
- package/@types/definitions/props/propsFooter.d.ts +6 -0
- package/@types/definitions/props/propsFormInput.d.ts +10 -0
- package/@types/definitions/props/propsIcon.d.ts +10 -0
- package/@types/definitions/props/propsImage.d.ts +9 -0
- package/@types/definitions/props/propsImageLoader.d.ts +11 -0
- package/@types/definitions/props/propsInput.d.ts +32 -0
- package/@types/definitions/props/propsLayout.d.ts +6 -0
- package/@types/definitions/props/propsLayoutProvider.d.ts +4 -0
- package/@types/definitions/props/propsLink.d.ts +7 -0
- package/@types/definitions/props/propsList.d.ts +10 -0
- package/@types/definitions/props/propsListItem.d.ts +7 -0
- package/@types/definitions/props/propsListMediaItem.d.ts +4 -0
- package/@types/definitions/props/propsMain.d.ts +4 -0
- package/@types/definitions/props/propsMenu.d.ts +9 -0
- package/@types/definitions/props/propsNavigationDrawer.d.ts +20 -0
- package/@types/definitions/props/propsOverlay.d.ts +8 -0
- package/@types/definitions/props/propsProgressCircular.d.ts +8 -0
- package/@types/definitions/props/propsProgressLinear.d.ts +9 -0
- package/@types/definitions/props/propsRadioGroup.d.ts +9 -0
- package/@types/definitions/props/propsRow.d.ts +11 -0
- package/@types/definitions/props/propsScrollable.d.ts +5 -0
- package/@types/definitions/props/propsSelect.d.ts +13 -0
- package/@types/definitions/props/propsSheet.d.ts +2 -0
- package/@types/definitions/props/propsSingleGroup.d.ts +6 -0
- package/@types/definitions/props/propsSingleGroupItem.d.ts +5 -0
- package/@types/definitions/props/propsSizePreset.d.ts +4 -0
- package/@types/definitions/props/propsSizeUnion.d.ts +4 -0
- package/@types/definitions/props/propsSlideGroup.d.ts +11 -0
- package/@types/definitions/props/propsSnackbar.d.ts +6 -0
- package/@types/definitions/props/propsSplitView.d.ts +9 -0
- package/@types/definitions/props/propsStepper.d.ts +10 -0
- package/@types/definitions/props/propsStepperStep.d.ts +6 -0
- package/@types/definitions/props/propsSwitch.d.ts +5 -0
- package/@types/definitions/props/propsTab.d.ts +5 -0
- package/@types/definitions/props/propsTable.d.ts +58 -0
- package/@types/definitions/props/propsTabs.d.ts +12 -0
- package/@types/definitions/props/propsTextarea.d.ts +25 -0
- package/@types/definitions/props/propsToggleButton.d.ts +3 -0
- package/@types/definitions/props/propsToggleButtonGroup.d.ts +8 -0
- package/@types/definitions/props/propsToolbar.d.ts +11 -0
- package/@types/definitions/props/propsToolbarTitle.d.ts +4 -0
- package/@types/definitions/props/propsTooltip.d.ts +9 -0
- package/@types/definitions/props/propsWindow.d.ts +13 -0
- package/@types/definitions/props/propsWindowItem.d.ts +2 -0
- package/@types/definitions/provider.d.ts +20 -0
- package/@types/directives/index.d.ts +2 -0
- package/@types/directives/resize.d.ts +2 -0
- package/@types/directives/scroll.d.ts +2 -0
- package/@types/helpers/autocompleteHelpers.d.ts +7 -0
- package/@types/helpers/colorHelpers.d.ts +3 -0
- package/@types/helpers/createAppStore.d.ts +77 -0
- package/@types/helpers/display.d.ts +1 -0
- package/@types/helpers/index.d.ts +6 -0
- package/@types/helpers/selectItemHelpers.d.ts +4 -0
- package/@types/helpers/tableHelpers.d.ts +9 -0
- package/@types/helpers/themeHelpers.d.ts +2 -0
- package/@types/index.d.ts +10 -0
- package/@types/lib/browser.d.ts +26 -0
- package/@types/lib/button.d.ts +3 -0
- package/@types/lib/color.d.ts +19 -0
- package/@types/lib/compositionApi.d.ts +2 -0
- package/@types/lib/formatNumber.d.ts +1 -0
- package/@types/lib/getCleanSetObject.d.ts +5 -0
- package/@types/lib/getNumericCssAttribute.d.ts +1 -0
- package/@types/lib/getNumericValue.d.ts +13 -0
- package/@types/lib/getPluginName.d.ts +1 -0
- package/@types/lib/htmlClass.d.ts +1 -0
- package/@types/lib/htmlToText.d.ts +2 -0
- package/@types/lib/index.d.ts +12 -0
- package/@types/lib/isEmpty.d.ts +1 -0
- package/@types/lib/retry.d.ts +1 -0
- package/@types/lib/scroll.d.ts +13 -0
- package/@types/lib/wait.d.ts +1 -0
- package/@types/modules/index.d.ts +1 -0
- package/@types/modules/sUI.d.ts +2 -0
- package/@types/repositories/calendarRepository.d.ts +3 -0
- package/@types/repositories/colorRepository.d.ts +14 -0
- package/@types/repositories/columnRepository.d.ts +9 -0
- package/@types/repositories/core/appProviderRepository.d.ts +4 -0
- package/@types/repositories/datePicker.d.ts +18 -0
- package/@types/repositories/form.d.ts +66 -0
- package/@types/repositories/htmlClassRepository.d.ts +1 -0
- package/@types/repositories/index.d.ts +9 -0
- package/@types/repositories/positionRepository.d.ts +10 -0
- package/@types/repositories/tableRepository.d.ts +2 -0
- package/@types/repositories/touchRepository.d.ts +4 -0
- package/@types/services/appBarService.d.ts +41 -0
- package/@types/services/appService.d.ts +6 -0
- package/@types/services/autocompleteService.d.ts +42 -0
- package/@types/services/backgroundScrollService.d.ts +4 -0
- package/@types/services/borderService.d.ts +12 -0
- package/@types/services/calendar/calendarEventService.d.ts +5 -0
- package/@types/services/calendar/calendarMonthlyService.d.ts +14 -0
- package/@types/services/calendar/calendarService.d.ts +8 -0
- package/@types/services/calendar/calendarWeeklyService.d.ts +28 -0
- package/@types/services/calendar/index.d.ts +8 -0
- package/@types/services/calendar/useCalendarDateFormatters.d.ts +6 -0
- package/@types/services/calendar/useCalendarEventHandlers.d.ts +19 -0
- package/@types/services/calendar/useCalendarWeeklyAllDayEvents.d.ts +20 -0
- package/@types/services/calendar/useCalendarWeeklyEventPositioning.d.ts +23 -0
- package/@types/services/colorService.d.ts +19 -0
- package/@types/services/columnService.d.ts +8 -0
- package/@types/services/componentDefaultsService.d.ts +1 -0
- package/@types/services/componentThemeService.d.ts +6 -0
- package/@types/services/core/activatorService.d.ts +16 -0
- package/@types/services/core/clickOutsideService.d.ts +9 -0
- package/@types/services/core/contentService.d.ts +13 -0
- package/@types/services/core/expandableItemCoreService.d.ts +4 -0
- package/@types/services/core/groupCoreItemService.d.ts +11 -0
- package/@types/services/core/groupCoreService.d.ts +16 -0
- package/@types/services/core/index.d.ts +9 -0
- package/@types/services/core/layoutCoreService.d.ts +21 -0
- package/@types/services/core/locationService.d.ts +11 -0
- package/@types/services/core/tableCellCommonService.d.ts +8 -0
- package/@types/services/datePicker/datePickerInputService.d.ts +9 -0
- package/@types/services/datePicker/datePickerItemCoreService.d.ts +30 -0
- package/@types/services/datePicker/datePickerItemDateService.d.ts +18 -0
- package/@types/services/datePicker/datePickerItemMonthService.d.ts +17 -0
- package/@types/services/datePicker/datePickerItemSwitchService.d.ts +11 -0
- package/@types/services/datePicker/datePickerItemTitleService.d.ts +8 -0
- package/@types/services/datePicker/datePickerItemYearService.d.ts +17 -0
- package/@types/services/datePicker/datePickerService.d.ts +7 -0
- package/@types/services/datePicker/index.d.ts +7 -0
- package/@types/services/dialogService.d.ts +32 -0
- package/@types/services/disabledService.d.ts +12 -0
- package/@types/services/displayService.d.ts +24 -0
- package/@types/services/elevationService.d.ts +6 -0
- package/@types/services/expandableItemService.d.ts +5 -0
- package/@types/services/expandableService.d.ts +5 -0
- package/@types/services/formInputService.d.ts +8 -0
- package/@types/services/groupItemService.d.ts +10 -0
- package/@types/services/groupService.d.ts +16 -0
- package/@types/services/index.d.ts +43 -0
- package/@types/services/layoutProviderService.d.ts +28 -0
- package/@types/services/layoutService.d.ts +24 -0
- package/@types/services/linkService.d.ts +21 -0
- package/@types/services/listMediaItemService.d.ts +8 -0
- package/@types/services/measurableStylesService.d.ts +11 -0
- package/@types/services/menuService.d.ts +35 -0
- package/@types/services/navigationDrawerResizeService.d.ts +10 -0
- package/@types/services/navigationDrawerService.d.ts +6 -0
- package/@types/services/positionService.d.ts +10 -0
- package/@types/services/resizeService.d.ts +4 -0
- package/@types/services/scrollService.d.ts +8 -0
- package/@types/services/scrollableService.d.ts +15 -0
- package/@types/services/singleGroupItemService.d.ts +10 -0
- package/@types/services/singleGroupService.d.ts +34 -0
- package/@types/services/sizeService.d.ts +12 -0
- package/@types/services/slideGroupService.d.ts +19 -0
- package/@types/services/table/index.d.ts +3 -0
- package/@types/services/table/tableBodyCellService.d.ts +9 -0
- package/@types/services/table/tableHeadCellService.d.ts +8 -0
- package/@types/services/table/tableService.d.ts +179 -0
- package/@types/services/tagService.d.ts +9 -0
- package/@types/services/textColorService.d.ts +15 -0
- package/@types/services/themeService.d.ts +5 -0
- package/@types/services/toolbarService.d.ts +7 -0
- package/@types/services/touchService.d.ts +2 -0
- package/@types/store/index.d.ts +5 -0
- package/@types/types/app.d.ts +36 -0
- package/@types/types/autocomplete.d.ts +7 -0
- package/@types/types/breadcrumbs.d.ts +8 -0
- package/@types/types/button.d.ts +1 -0
- package/@types/types/calendar.d.ts +61 -0
- package/@types/types/core/color.d.ts +2 -0
- package/@types/types/core/emit.d.ts +1 -0
- package/@types/types/core/form.d.ts +2 -0
- package/@types/types/core/group.d.ts +1 -0
- package/@types/types/core/index.d.ts +4 -0
- package/@types/types/datePicker.d.ts +12 -0
- package/@types/types/display.d.ts +9 -0
- package/@types/types/emits.d.ts +17 -0
- package/@types/types/form.d.ts +9 -0
- package/@types/types/grids.d.ts +2 -0
- package/@types/types/html.d.ts +1 -0
- package/@types/types/icon.d.ts +1 -0
- package/@types/types/index.d.ts +24 -0
- package/@types/types/input.d.ts +3 -0
- package/@types/types/location.d.ts +2 -0
- package/@types/types/materialDesignIcon.d.ts +2 -0
- package/@types/types/menu.d.ts +9 -0
- package/@types/types/resize.d.ts +12 -0
- package/@types/types/scroll.d.ts +26 -0
- package/@types/types/select.d.ts +6 -0
- package/@types/types/size.d.ts +2 -0
- package/@types/types/table.d.ts +84 -0
- package/@types/types/tag.d.ts +1 -0
- package/@types/types/toolbar.d.ts +2 -0
- package/@types/types/touch.d.ts +28 -0
- package/@types/validators/index.d.ts +1 -0
- package/@types/validators/numeric.d.ts +1 -0
- package/@types/vendors/dayjs.d.ts +2 -0
- package/@types/vendors/merge.d.ts +2 -0
- package/@types/vite.config.d.ts +2 -0
- package/@types/vitest.config.d.ts +2 -0
- package/README.md +189 -2
- package/dist/base.css +7282 -0
- package/dist/base.css.map +1 -0
- package/dist/s-ui.css +2 -0
- package/dist/s-ui.js +8976 -0
- package/dist/s-ui.umd.cjs +1 -0
- package/dist/styles/_helpers.scss +9 -0
- package/dist/styles/components/appBar/_variables.scss +4 -0
- package/dist/styles/components/appBar/index.scss +1 -0
- package/dist/styles/components/button/_variables.scss +51 -0
- package/dist/styles/components/button/index.scss +2 -0
- package/dist/styles/components/button/mixins.scss +60 -0
- package/dist/styles/components/cards/index.scss +1 -0
- package/dist/styles/components/cards/variables.scss +5 -0
- package/dist/styles/components/icon/_variables.scss +14 -0
- package/dist/styles/components/icon/index.scss +1 -0
- package/dist/styles/components/index.scss +10 -0
- package/dist/styles/components/layout/_mixins.scss +7 -0
- package/dist/styles/components/layout/_variables.scss +6 -0
- package/dist/styles/components/layout/index.scss +2 -0
- package/dist/styles/components/list/_mixins.scss +53 -0
- package/dist/styles/components/list/index.scss +1 -0
- package/dist/styles/components/menu/_mixins.scss +11 -0
- package/dist/styles/components/menu/index.scss +1 -0
- package/dist/styles/components/table/_mixins.scss +51 -0
- package/dist/styles/components/table/index.scss +1 -0
- package/dist/styles/components/toggleButton/_variables.scss +4 -0
- package/dist/styles/components/toggleButton/index.scss +1 -0
- package/dist/styles/components/window/_variables.scss +2 -0
- package/dist/styles/components/window/index.scss +1 -0
- package/dist/styles/generic/_common.scss +95 -0
- package/dist/styles/generic/_reset.scss +357 -0
- package/dist/styles/generic/_transitions.scss +83 -0
- package/dist/styles/generic/index.scss +3 -0
- package/dist/styles/index.scss +6 -0
- package/dist/styles/lib/_functions.scss +86 -0
- package/dist/styles/lib/index.scss +1 -0
- package/dist/styles/mixins/_app.scss +13 -0
- package/dist/styles/mixins/_border.scss +104 -0
- package/dist/styles/mixins/_dark.scss +31 -0
- package/dist/styles/mixins/_display.scss +9 -0
- package/dist/styles/mixins/_elevation.scss +15 -0
- package/dist/styles/mixins/_grids.scss +66 -0
- package/dist/styles/mixins/_media.scss +14 -0
- package/dist/styles/mixins/_text.scss +44 -0
- package/dist/styles/mixins/_utilities.scss +68 -0
- package/dist/styles/mixins/index.scss +10 -0
- package/dist/styles/modules/breakpoints.module.scss +10 -0
- package/dist/styles/tools/_breakpoint.scss +20 -0
- package/dist/styles/tools/_color.scss +35 -0
- package/dist/styles/tools/index.scss +2 -0
- package/dist/styles/variables/_border.scss +19 -0
- package/dist/styles/variables/_colors.scss +34 -0
- package/dist/styles/variables/_elevations.scss +98 -0
- package/dist/styles/variables/_font.scss +8 -0
- package/dist/styles/variables/_grid.scss +36 -0
- package/dist/styles/variables/_headings.scss +100 -0
- package/dist/styles/variables/_spacers.scss +17 -0
- package/dist/styles/variables/_transitions.scss +16 -0
- package/dist/styles/variables/_utilities.scss +360 -0
- package/dist/styles/variables/index.scss +9 -0
- package/dist/sui-api.json +10018 -0
- package/package.json +82 -4
- package/sui-plugin/.claude-plugin/plugin.json +10 -0
- package/sui-plugin/README.md +96 -0
- package/sui-plugin/skills/sui-component/SKILL.md +135 -0
- package/sui-plugin/skills/sui-component/references/alert.md +69 -0
- package/sui-plugin/skills/sui-component/references/autocomplete.md +167 -0
- package/sui-plugin/skills/sui-component/references/badge.md +106 -0
- package/sui-plugin/skills/sui-component/references/breadcrumbs.md +80 -0
- package/sui-plugin/skills/sui-component/references/button.md +113 -0
- package/sui-plugin/skills/sui-component/references/calendar.md +150 -0
- package/sui-plugin/skills/sui-component/references/cards.md +214 -0
- package/sui-plugin/skills/sui-component/references/carousel.md +178 -0
- package/sui-plugin/skills/sui-component/references/chip.md +92 -0
- package/sui-plugin/skills/sui-component/references/date-picker.md +226 -0
- package/sui-plugin/skills/sui-component/references/dialog.md +120 -0
- package/sui-plugin/skills/sui-component/references/divider.md +61 -0
- package/sui-plugin/skills/sui-component/references/droppable.md +88 -0
- package/sui-plugin/skills/sui-component/references/expansion-panels.md +185 -0
- package/sui-plugin/skills/sui-component/references/form.md +575 -0
- package/sui-plugin/skills/sui-component/references/icon.md +80 -0
- package/sui-plugin/skills/sui-component/references/image.md +77 -0
- package/sui-plugin/skills/sui-component/references/layout.md +612 -0
- package/sui-plugin/skills/sui-component/references/list.md +321 -0
- package/sui-plugin/skills/sui-component/references/menu.md +107 -0
- package/sui-plugin/skills/sui-component/references/overlay.md +67 -0
- package/sui-plugin/skills/sui-component/references/progress.md +126 -0
- package/sui-plugin/skills/sui-component/references/sheet.md +81 -0
- package/sui-plugin/skills/sui-component/references/slide-group.md +160 -0
- package/sui-plugin/skills/sui-component/references/snackbar.md +88 -0
- package/sui-plugin/skills/sui-component/references/split-view.md +98 -0
- package/sui-plugin/skills/sui-component/references/stepper.md +127 -0
- package/sui-plugin/skills/sui-component/references/table.md +213 -0
- package/sui-plugin/skills/sui-component/references/tabs.md +133 -0
- package/sui-plugin/skills/sui-component/references/toggle-button-group.md +155 -0
- package/sui-plugin/skills/sui-component/references/toolbar.md +160 -0
- package/sui-plugin/skills/sui-component/references/tooltip.md +102 -0
- package/sui-plugin/skills/sui-component/references/window.md +130 -0
- package/sui-plugin/skills/sui-form/SKILL.md +227 -0
- package/sui-plugin/skills/sui-getting-started/SKILL.md +365 -0
- package/sui-plugin/skills/sui-layout/SKILL.md +111 -0
- package/sui-plugin/skills/sui-utilities/SKILL.md +40 -0
- package/sui-plugin/skills/sui-utilities/docs/classes.md +487 -0
- package/sui-plugin/skills/sui-utilities/docs/directives.md +200 -0
- package/sui-plugin/skills/sui-utilities/docs/helpers.md +583 -0
package/package.json
CHANGED
|
@@ -1,6 +1,84 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@khsura/sui",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
"version": "1.19.0",
|
|
4
|
+
"repository": {
|
|
5
|
+
"type": "git",
|
|
6
|
+
"url": "git+https://github.com/khsura/sui.git",
|
|
7
|
+
"directory": "packages/app"
|
|
8
|
+
},
|
|
9
|
+
"homepage": "https://sui.surakh.com/",
|
|
10
|
+
"type": "module",
|
|
11
|
+
"scripts": {
|
|
12
|
+
"prebuild": "yarn g:rimraf dist && yarn g:rimraf @types && yarn g:rimraf .claude-plugin && yarn g:rimraf sui-plugin",
|
|
13
|
+
"build:style": "yarn g:sass styles/index.scss dist/base.css",
|
|
14
|
+
"build:type": "yarn g:vue-tsc -p tsconfig.build.json && yarn g:tsc-alias -p tsconfig.build.json",
|
|
15
|
+
"build:plugin": "cp -R ../../.claude-plugin . && cp -R ../../plugins/sui-plugin .",
|
|
16
|
+
"build": "yarn prebuild && yarn build:type && yarn g:vite build && yarn build:api && yarn sync:skills && yarn build:style && cp -R styles dist/styles && yarn build:plugin",
|
|
17
|
+
"lint": "yarn g:eslint",
|
|
18
|
+
"stylelint": "yarn g:stylelint ./**/*.{vue,css,scss}",
|
|
19
|
+
"test": "yarn g:vitest run --project unit",
|
|
20
|
+
"test-storybook": "yarn g:vitest --project storybook",
|
|
21
|
+
"release": "yarn g:publish",
|
|
22
|
+
"storybook:dev": "storybook dev --port 6006",
|
|
23
|
+
"storybook:build": "storybook build",
|
|
24
|
+
"build:api": "yarn g:vite-node scripts/apiMetadata/generateApiMetadata.ts",
|
|
25
|
+
"sync:skills": "yarn g:vite-node scripts/apiMetadata/syncSkillTables.ts",
|
|
26
|
+
"check:skills": "yarn g:vite-node scripts/apiMetadata/syncSkillTables.ts --check"
|
|
27
|
+
},
|
|
28
|
+
"files": [
|
|
29
|
+
"dist",
|
|
30
|
+
"@types",
|
|
31
|
+
".claude-plugin",
|
|
32
|
+
"sui-plugin"
|
|
33
|
+
],
|
|
34
|
+
"publishConfig": {
|
|
35
|
+
"access": "public",
|
|
36
|
+
"registry": "https://registry.npmjs.org/"
|
|
37
|
+
},
|
|
38
|
+
"main": "./dist/s-ui.umd.cjs",
|
|
39
|
+
"module": "./dist/s-ui.js",
|
|
40
|
+
"types": "./@types/index.d.ts",
|
|
41
|
+
"exports": {
|
|
42
|
+
"./base.css": "./dist/base.css",
|
|
43
|
+
"./style.css": "./dist/s-ui.css",
|
|
44
|
+
"./style.scss": "./dist/styles/index.scss",
|
|
45
|
+
"./helpers.scss": "./dist/styles/_helpers.scss",
|
|
46
|
+
".": {
|
|
47
|
+
"import": {
|
|
48
|
+
"types": "./@types/index.d.ts",
|
|
49
|
+
"default": "./dist/s-ui.js"
|
|
50
|
+
},
|
|
51
|
+
"require": {
|
|
52
|
+
"types": "./@types/index.d.ts",
|
|
53
|
+
"default": "./dist/s-ui.umd.cjs"
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"dependencies": {
|
|
58
|
+
"@vueuse/components": "^14.3.0",
|
|
59
|
+
"@vueuse/core": "^14.3.0",
|
|
60
|
+
"dayjs": "^1.11.21",
|
|
61
|
+
"uuid": "^14.0.1",
|
|
62
|
+
"vue": "^3.5.39",
|
|
63
|
+
"vue-i18n": "^11.4.6",
|
|
64
|
+
"zod": "^4.4.3"
|
|
65
|
+
},
|
|
66
|
+
"devDependencies": {
|
|
67
|
+
"@storybook/addon-a11y": "^10.4.6",
|
|
68
|
+
"@storybook/addon-docs": "^10.4.6",
|
|
69
|
+
"@storybook/addon-links": "^10.4.6",
|
|
70
|
+
"@storybook/addon-mcp": "^0.7.0",
|
|
71
|
+
"@storybook/addon-vitest": "^10.4.6",
|
|
72
|
+
"@storybook/vue3-vite": "^10.4.6",
|
|
73
|
+
"@types/lodash.merge": "^4.6.9",
|
|
74
|
+
"@vitest/browser-playwright": "^4.1.9",
|
|
75
|
+
"chokidar": "^5.0.0",
|
|
76
|
+
"eslint-plugin-storybook": "10.4.6",
|
|
77
|
+
"http-server": "^14.1.1",
|
|
78
|
+
"lodash.merge": "^4.6.2",
|
|
79
|
+
"playwright": "^1.61.1",
|
|
80
|
+
"storybook": "^10.4.6",
|
|
81
|
+
"vitest": "^4.1.9",
|
|
82
|
+
"vue-component-meta": "^3.3.6"
|
|
83
|
+
}
|
|
84
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "sui-plugin",
|
|
3
|
+
"description": "Skills for building Vue 3 / Nuxt apps with @khsura/sui — setup (npm install, styles, icons, theming, i18n), per-component references, forms, layouts and utilities",
|
|
4
|
+
"version": "1.9.0",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "Sura Kh",
|
|
7
|
+
"email": "sura0111@gmail.com"
|
|
8
|
+
},
|
|
9
|
+
"repository": "https://github.com/khsura/sui"
|
|
10
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# sui-plugin
|
|
2
|
+
|
|
3
|
+
Claude Code plugin that gives Claude expert knowledge of the **`@khsura/sui`** Vue 3 component framework. Install it in an app that uses `@khsura/sui` (Vue or Nuxt) and Claude can set the library up, and generate idiomatic SUI components, forms, and layouts for you.
|
|
4
|
+
|
|
5
|
+
The library itself installs from the public npm registry (`npm i @khsura/sui` / `yarn add @khsura/sui`). Component docs and live examples: [Storybook — sui.surakh.com](https://sui.surakh.com/).
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
/plugin marketplace add khsura/sui
|
|
11
|
+
/plugin install sui-plugin@sui-framework
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
To install straight from GitHub:
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
/plugin marketplace add github:khsura/sui
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Or add to your project's `.claude/settings.json`:
|
|
21
|
+
|
|
22
|
+
```json
|
|
23
|
+
{
|
|
24
|
+
"extraKnownMarketplaces": {
|
|
25
|
+
"sui-framework": {
|
|
26
|
+
"source": { "source": "github", "repo": "khsura/sui" }
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"enabledPlugins": {
|
|
30
|
+
"sui-plugin@sui-framework": true
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Pair it with the SUI MCP server
|
|
36
|
+
|
|
37
|
+
The skills teach Claude how SUI works; [`@khsura/sui-mcp`](../../packages/mcp/README.md) gives any AI client (Claude Code, Cursor, VS Code, Windsurf) the exact component API of the `@khsura/sui` version your project installs, tested recipes, and a template validator. Set it up from your app's folder:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
npx -y @khsura/sui-mcp config # detects your client and writes its MCP config
|
|
41
|
+
npx -y @khsura/sui-mcp config --dry-run # show the planned changes first
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
For Claude Code this adds a `sui` server to the project's `.mcp.json`:
|
|
45
|
+
|
|
46
|
+
```json
|
|
47
|
+
{
|
|
48
|
+
"mcpServers": {
|
|
49
|
+
"sui": { "command": "npx", "args": ["-y", "@khsura/sui-mcp"] }
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
With both installed, Claude checks `get_component_api` before using an unfamiliar component, starts from `get_recipe` for common patterns, and runs `validate_sui_template` on the templates it writes. Per-client snippets: the [MCP README](../../packages/mcp/README.md) and the **AI / MCP** page in [Storybook](https://sui.surakh.com/).
|
|
55
|
+
|
|
56
|
+
## Skills
|
|
57
|
+
|
|
58
|
+
| Skill | When to use |
|
|
59
|
+
| --- | --- |
|
|
60
|
+
| [`sui-getting-started`](./skills/sui-getting-started/SKILL.md) | Installing `@khsura/sui` from npm (and migrating off GitHub Packages), setting up the SUI MCP server, `SApp` + `createSUI`, styles and `@mdi/font`, Nuxt module, theme colors / dark mode, component defaults, vue-i18n, types, common mistakes. |
|
|
61
|
+
| [`sui-component`](./skills/sui-component/SKILL.md) | Using a specific component (`SButton`, `SCard`, `STable`, …) — routes to one per-family reference in `references/` with props, slots, events, examples and gotchas. |
|
|
62
|
+
| [`sui-form`](./skills/sui-form/SKILL.md) | Building validated forms with `SInput`, `SSelect`, `SCheckbox`, etc., including `rules` validation. |
|
|
63
|
+
| [`sui-layout`](./skills/sui-layout/SKILL.md) | Scaffolding app shells with `SLayout`, `SAppBar`, `SNavigationDrawer`, `SMain`, `SFooter`, `SBottomNavigation`. |
|
|
64
|
+
| [`sui-utilities`](./skills/sui-utilities/SKILL.md) | Looking up SUI utility classes (`s_*`), Vue directives, and SCSS helpers / mixins; restyling components without `:deep()`. |
|
|
65
|
+
|
|
66
|
+
Each skill lives in its own folder with a `SKILL.md` describing when Claude should invoke it.
|
|
67
|
+
|
|
68
|
+
## Maintenance
|
|
69
|
+
|
|
70
|
+
The plugin must work in consumer apps, where only the published package (`node_modules/@khsura/sui/dist` and `@types`) exists. Skills must not point at repository-only paths; bundle the content instead.
|
|
71
|
+
|
|
72
|
+
- `skills/sui-utilities/docs/` holds copies of `packages/app/docs/{classes,directives,helpers}.md`.
|
|
73
|
+
- `skills/sui-component/references/` holds copies of `packages/app/docs/components/*.md`, corrected against the component source and `definitions/props` (plus `alert.md`, written from source).
|
|
74
|
+
|
|
75
|
+
Update the copy and the original together whenever a component or its docs change, and bump `.claude-plugin/plugin.json` `version`.
|
|
76
|
+
|
|
77
|
+
Install the plugin rather than copying skill files into a project (`.agents/skills/`, `.claude/skills/`): copies drift out of date as SUI changes.
|
|
78
|
+
|
|
79
|
+
## Example prompts
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
/sui-component SAutocomplete with multiple selection
|
|
83
|
+
/sui-form registration form with email, password, confirm password
|
|
84
|
+
/sui-layout admin dashboard with nav drawer and toolbar
|
|
85
|
+
/sui-utilities flex utility classes
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## Repository
|
|
89
|
+
|
|
90
|
+
Skills are maintained alongside the library at [github.com/khsura/sui](https://github.com/khsura/sui). Open an issue if a component is missing coverage, or edit the matching `SKILL.md` and send a PR.
|
|
91
|
+
|
|
92
|
+
## Related
|
|
93
|
+
|
|
94
|
+
- [`@khsura/sui`](https://github.com/khsura/sui/tree/main/packages/app) — the UI library this plugin documents
|
|
95
|
+
- [`@khsura/sui-nuxt`](https://github.com/khsura/sui-nuxt) — the Nuxt module
|
|
96
|
+
- [`marketplace.json`](https://github.com/khsura/sui/blob/main/.claude-plugin/marketplace.json) — the Claude Code marketplace catalog
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sui-component
|
|
3
|
+
description: Look up and use any component from @khsura/sui (SButton, SCard, SDialog, SMenu, STooltip, STable, SList, STabs, SStepper, SCarousel, SExpansionPanels, SDatePicker, SCalendar, SToggleButtonGroup, SSlideGroup, SToolbar, SSplitView, SDroppable, SBadge, SChip, SIcon, SImage, SAlert, SOverlay, …) in a Vue or Nuxt app. Use when writing or fixing template code with an S-prefixed component, choosing props/slots/events, debugging a SUI component that renders wrong or ignores a prop, or styling SUI components with theme colors. Loads one per-family reference file with the verified props table, slots, events, example and gotchas.
|
|
4
|
+
argument-hint: [component name or description of what you need]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Help the user use this SUI component: $ARGUMENTS
|
|
8
|
+
|
|
9
|
+
1. Find the component in the **Reference index** below and read **only** that reference file.
|
|
10
|
+
2. Give the import, the props you use, and a complete working example built from the reference.
|
|
11
|
+
3. If a prop isn't in the reference, check `node_modules/@khsura/sui/@types/definitions/props/props<Component>.d.ts` before using it. Never guess — unknown props are silently ignored.
|
|
12
|
+
|
|
13
|
+
In each reference, the props / slots / events tables between `generated:api` markers are generated from the package's `sui-api.json`, so they list every prop with its exact type. The **notes** list under each table and the prose around it explain behaviour and gotchas.
|
|
14
|
+
|
|
15
|
+
All components import from `@khsura/sui`. App setup (registry, `SApp`, styles, `@mdi/font`): **sui-getting-started**.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Reference index
|
|
20
|
+
|
|
21
|
+
| Component(s) | Reference |
|
|
22
|
+
|---|---|
|
|
23
|
+
| `SAlert` | [references/alert.md](references/alert.md) |
|
|
24
|
+
| `SAutocomplete` | [references/autocomplete.md](references/autocomplete.md) |
|
|
25
|
+
| `SBadge` | [references/badge.md](references/badge.md) |
|
|
26
|
+
| `SBreadcrumbs` | [references/breadcrumbs.md](references/breadcrumbs.md) |
|
|
27
|
+
| `SButton` | [references/button.md](references/button.md) |
|
|
28
|
+
| `SCalendar` | [references/calendar.md](references/calendar.md) |
|
|
29
|
+
| `SCard`, `SCardTitle`, `SCardSubtitle`, `SCardText`, `SCardActions` | [references/cards.md](references/cards.md) |
|
|
30
|
+
| `SCarousel`, `SCarouselItem` | [references/carousel.md](references/carousel.md) |
|
|
31
|
+
| `SChip` | [references/chip.md](references/chip.md) |
|
|
32
|
+
| `SDatePicker`, `SDatePickerInput` | [references/date-picker.md](references/date-picker.md) |
|
|
33
|
+
| `SDialog` | [references/dialog.md](references/dialog.md) |
|
|
34
|
+
| `SDivider` | [references/divider.md](references/divider.md) |
|
|
35
|
+
| `SDroppable` | [references/droppable.md](references/droppable.md) |
|
|
36
|
+
| `SExpansionPanels`, `SExpansionPanel`, `SExpansionPanelHeader`, `SExpansionPanelContent` | [references/expansion-panels.md](references/expansion-panels.md) |
|
|
37
|
+
| `SForm`, `SInput`, `STextarea`, `SSelect`, `SCheckbox`, `SRadioGroup`, `SRadio`, `SSwitch` | [references/form.md](references/form.md) (and the **sui-form** skill) |
|
|
38
|
+
| `SIcon` | [references/icon.md](references/icon.md) |
|
|
39
|
+
| `SImage` | [references/image.md](references/image.md) |
|
|
40
|
+
| `SApp`, `SLayout`, `SAppBar`, `SNavigationDrawer`, `SMain`, `SFooter`, `SBottomNavigation`, `SContainer`, `SRow`, `SColumn`, `SSpacer` | [references/layout.md](references/layout.md) (and the **sui-layout** skill) |
|
|
41
|
+
| `SList`, `SListItem`, `SListItemIcon`, `SListItemContent`, `SListItemTitle`, `SListItemSubtitle`, `SListItemAction`, `SListItemGroup` | [references/list.md](references/list.md) |
|
|
42
|
+
| `SMenu` | [references/menu.md](references/menu.md) |
|
|
43
|
+
| `SOverlay` | [references/overlay.md](references/overlay.md) |
|
|
44
|
+
| `SProgressLinear`, `SProgressCircular` | [references/progress.md](references/progress.md) |
|
|
45
|
+
| `SSheet` | [references/sheet.md](references/sheet.md) |
|
|
46
|
+
| `SSlideGroup`, `SSlideItem` | [references/slide-group.md](references/slide-group.md) |
|
|
47
|
+
| `SSnackbar` | [references/snackbar.md](references/snackbar.md) |
|
|
48
|
+
| `SSplitView`, `SSplitViewItem` | [references/split-view.md](references/split-view.md) |
|
|
49
|
+
| `SStepper`, `SStepperStep` | [references/stepper.md](references/stepper.md) |
|
|
50
|
+
| `STable`, `STableHeadCell`, `STableBodyCell` | [references/table.md](references/table.md) |
|
|
51
|
+
| `STabs`, `STab` | [references/tabs.md](references/tabs.md) |
|
|
52
|
+
| `SToggleButtonGroup`, `SToggleButton` | [references/toggle-button-group.md](references/toggle-button-group.md) |
|
|
53
|
+
| `SToolbar`, `SToolbarTitle`, `SToolbarItem` | [references/toolbar.md](references/toolbar.md) |
|
|
54
|
+
| `STooltip` | [references/tooltip.md](references/tooltip.md) |
|
|
55
|
+
| `SWindow`, `SWindowItem` (exported since `@khsura/sui` 1.18) | [references/window.md](references/window.md) |
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## Components that do NOT exist
|
|
60
|
+
|
|
61
|
+
| ❌ Name | ✅ Use instead |
|
|
62
|
+
|---|---|
|
|
63
|
+
| `SSkeletonLoader` | `SProgressCircular indeterminate` in a centered div |
|
|
64
|
+
| `STextField` | `SInput` (single line) or `STextarea` (multi-line) |
|
|
65
|
+
| `SCol` | `SColumn` |
|
|
66
|
+
| `STablePagination` (not exported) | `STable`'s built-in pagination |
|
|
67
|
+
| `SNavigationDrawer` inside a feature component | App shell only — use `<SDialog location="end">` for feature slide-in panels |
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## Activator slot
|
|
72
|
+
|
|
73
|
+
**SDialog, SMenu, SSnackbar** — bind **both** `v-on="on"` and `v-bind="attrs"`:
|
|
74
|
+
|
|
75
|
+
```vue
|
|
76
|
+
<SMenu location="bottom">
|
|
77
|
+
<template #activator="{ on, attrs }">
|
|
78
|
+
<SButton v-on="on" v-bind="attrs">Open</SButton>
|
|
79
|
+
</template>
|
|
80
|
+
…
|
|
81
|
+
</SMenu>
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
**STooltip** passes no slot scope — put the trigger in `#activator` as is; see [references/tooltip.md](references/tooltip.md).
|
|
85
|
+
|
|
86
|
+
Popups teleport into the container rendered by `<SApp>` — without `SApp` at the app root they never show.
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
## Unknown props are silent no-ops
|
|
91
|
+
|
|
92
|
+
| ❌ Does nothing | ✅ Do this instead |
|
|
93
|
+
|---|---|
|
|
94
|
+
| `<SDialog title="...">` | Heading inside the content: `<SCard><SCardTitle>…</SCardTitle>…</SCard>` |
|
|
95
|
+
| `<SSelect clearable / chips / multiple / placeholder>` | `SAutocomplete` |
|
|
96
|
+
| `<SInput persistent-hint hint="...">` | Render helper text yourself |
|
|
97
|
+
| `app` on `SMain` / `SFooter` / `SAppBar` | Remove it; placement comes from `SLayout` |
|
|
98
|
+
| `<SCheckbox indeterminate>` / `:value` | `SCheckbox` is a single boolean `v-model` |
|
|
99
|
+
| `<SToggleButton value="...">` | Buttons are identified by index / `key`; see [references/toggle-button-group.md](references/toggle-button-group.md) |
|
|
100
|
+
| `<SButton variant="outlined">` | `variant` is `fab` \| `text` \| `icon` only; use `outlined` boolean prop or `color` |
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
## Linking: `to` for a route, `href` for a URL
|
|
105
|
+
|
|
106
|
+
`SButton`, `SCard` and `SListItem` take both; pass **one**, never both.
|
|
107
|
+
|
|
108
|
+
| Prop | Renders | For |
|
|
109
|
+
|---|---|---|
|
|
110
|
+
| `to` | `router-link` | internal route |
|
|
111
|
+
| `href` | `<a>` | external URL (`target`, `rel` go with it) |
|
|
112
|
+
| neither | `div` or `tag` | not a link |
|
|
113
|
+
|
|
114
|
+
Navigating from `@click` renders a `div` — no middle-click, "copy link", or link semantics. Prefer `to` / `href`.
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
## SCSS colors — use the helpers, not invented CSS variables
|
|
119
|
+
|
|
120
|
+
`@use '@khsura/sui/helpers.scss' as *;` then:
|
|
121
|
+
|
|
122
|
+
| ❌ Invalid | ✅ Correct |
|
|
123
|
+
|---|---|
|
|
124
|
+
| `var(--s-color-on-surface)` | `s_getAppColor('text')` |
|
|
125
|
+
| `rgba(var(--s-color-on-surface), 0.6)` | `color-mix(in srgb, #{s_getAppColor('text')} 60%, transparent)` |
|
|
126
|
+
| `rgb(var(--s-color-primary))` (it's a hex, not RGB channels) | `s_getPresetColor('primary')` |
|
|
127
|
+
| `rgba(var(--s-color-warning), 0.1)` | `color-mix(in srgb, #{s_getPresetColor('warning')} 10%, transparent)` |
|
|
128
|
+
| `var(--s-color-outline)` | `s_getAppColor('border')` |
|
|
129
|
+
| `var(--s-color-on-primary)` | `s_getPresetColor('primary', true)` |
|
|
130
|
+
| `var(--s-color-surface-variant)` | `color-mix(in srgb, #{s_getAppColor('text')} 8%, transparent)` |
|
|
131
|
+
|
|
132
|
+
- **`s_getPresetColor` keys:** `primary`, `secondary`, `success`, `info`, `warning`, `important`, `error` (+ any you add in `createSUI({ themes })`)
|
|
133
|
+
- **`s_getAppColor` keys:** `appBar`, `title`, `text`, `secondaryText`, `anchor`, `background`, `card`, `button`, `switch`, `border`, `disabled`, `snackbar`, `inputPlaceholderShown`, `textErrorHover`
|
|
134
|
+
|
|
135
|
+
The variables are set on `<SApp>`, so they only resolve inside it. More helpers: **sui-utilities**.
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# SAlert
|
|
2
|
+
|
|
3
|
+
**Import:** `import { SAlert } from '@khsura/sui'`
|
|
4
|
+
|
|
5
|
+
Simple colored message box (flex row, vertically centered, rounded). It has no icon, title, type or dismiss button — compose those yourself in the slot.
|
|
6
|
+
|
|
7
|
+
Types: `node_modules/@khsura/sui/@types/definitions/props/propsAlert.d.ts`
|
|
8
|
+
|
|
9
|
+
<!-- generated:api:start SAlert -->
|
|
10
|
+
<!-- Generated from sui-api.json by `yarn sync:skills` (packages/app). Do not edit by hand. -->
|
|
11
|
+
|
|
12
|
+
**SAlert props**
|
|
13
|
+
|
|
14
|
+
| Prop | Type | Default | Required | Values |
|
|
15
|
+
| --- | --- | --- | --- | --- |
|
|
16
|
+
| `color` | `string` | — | no | — |
|
|
17
|
+
| `colorThreshold` | `number` | — | no | — |
|
|
18
|
+
| `dense` | `boolean` | — | no | — |
|
|
19
|
+
| `fixedHeight` | `boolean` | — | no | — |
|
|
20
|
+
| `minHeight` | `number` | — | no | — |
|
|
21
|
+
| `size` | `SizePropertyType` | — | no | `default`, `extra`, `large`, `mini`, `small` |
|
|
22
|
+
| `theme` | `AppThemeType` | — | no | `dark`, `light` |
|
|
23
|
+
|
|
24
|
+
**SAlert slots**
|
|
25
|
+
|
|
26
|
+
| Slot | Slot props |
|
|
27
|
+
| --- | --- |
|
|
28
|
+
| `default` | `{}` |
|
|
29
|
+
|
|
30
|
+
**SAlert events**
|
|
31
|
+
|
|
32
|
+
None.
|
|
33
|
+
|
|
34
|
+
<!-- generated:api:end SAlert -->
|
|
35
|
+
|
|
36
|
+
**SAlert notes**
|
|
37
|
+
|
|
38
|
+
- `color`: Preset name or CSS color (default background = theme `card` color)
|
|
39
|
+
- `colorThreshold`: Luminance threshold for automatic light/dark text
|
|
40
|
+
- `size`: Padding, font size and min-height (default: `'default'`)
|
|
41
|
+
- `dense`: Smaller padding and min-height
|
|
42
|
+
- `minHeight`: Min height in px (default: computed from `size`)
|
|
43
|
+
- `fixedHeight`: `height: 100%; overflow: hidden`, and render even when empty (reserves space)
|
|
44
|
+
- `default` (slot): Alert content. **If empty, nothing is rendered** (unless `fixedHeight`)
|
|
45
|
+
|
|
46
|
+
## Usage
|
|
47
|
+
|
|
48
|
+
```vue
|
|
49
|
+
<SAlert color="error">Payment failed. Please try again.</SAlert>
|
|
50
|
+
|
|
51
|
+
<SAlert color="success" dense size="small">Saved</SAlert>
|
|
52
|
+
|
|
53
|
+
<!-- Icon + dismiss composed manually -->
|
|
54
|
+
<SAlert v-if="showWarning" color="warning">
|
|
55
|
+
<SIcon icon="mdi-alert" />
|
|
56
|
+
<span style="flex: 1">Your session expires soon.</span>
|
|
57
|
+
<SButton variant="icon" @click="showWarning = false"><SIcon icon="mdi-close" /></SButton>
|
|
58
|
+
</SAlert>
|
|
59
|
+
|
|
60
|
+
<!-- Form error slot that keeps its height when there is no message -->
|
|
61
|
+
<SAlert color="error" fixed-height>{{ errorMessage }}</SAlert>
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Gotchas
|
|
65
|
+
|
|
66
|
+
| ❌ | ✅ |
|
|
67
|
+
|----|----|
|
|
68
|
+
| `<SAlert type="error" title="..." closable>` | Those props don't exist — use `color` and compose content in the slot |
|
|
69
|
+
| `<SAlert icon="mdi-alert">` | Nest `<SIcon>` in the slot (needs `@mdi/font` loaded) |
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
# SAutocomplete
|
|
2
|
+
|
|
3
|
+
**Import:** `import { SAutocomplete } from '@khsura/sui'`
|
|
4
|
+
|
|
5
|
+
Searchable dropdown input with filtering, multiple selection, chips, free-text entries and async search.
|
|
6
|
+
|
|
7
|
+
Types: `node_modules/@khsura/sui/@types/definitions/props/propsAutocomplete.d.ts`
|
|
8
|
+
|
|
9
|
+
<!-- generated:api:start SAutocomplete -->
|
|
10
|
+
<!-- Generated from sui-api.json by `yarn sync:skills` (packages/app). Do not edit by hand. -->
|
|
11
|
+
|
|
12
|
+
**SAutocomplete props**
|
|
13
|
+
|
|
14
|
+
| Prop | Type | Default | Required | Values |
|
|
15
|
+
| --- | --- | --- | --- | --- |
|
|
16
|
+
| `activator` | `string \| HTMLElement \| ComponentPublicInstance \| null` | — | no | — |
|
|
17
|
+
| `allowUnlisted` | `boolean` | — | no | — |
|
|
18
|
+
| `autocomplete` | `string` | `"off"` | no | — |
|
|
19
|
+
| `chips` | `boolean` | — | no | — |
|
|
20
|
+
| `clearable` | `boolean` | — | no | — |
|
|
21
|
+
| `closableChips` | `boolean` | — | no | — |
|
|
22
|
+
| `closeOnClick` | `boolean` | — | no | — |
|
|
23
|
+
| `closeOnContentClick` | `boolean` | — | no | — |
|
|
24
|
+
| `closeOnScroll` | `boolean` | — | no | — |
|
|
25
|
+
| `contentClass` | `string \| string[] \| Record<string, boolean>` | — | no | — |
|
|
26
|
+
| `contentStyle` | `StyleValue` | — | no | — |
|
|
27
|
+
| `debounce` | `number` | `500` | no | — |
|
|
28
|
+
| `delimiter` | `string \| RegExp \| string[]` | — | no | — |
|
|
29
|
+
| `dense` | `boolean` | — | no | — |
|
|
30
|
+
| `disabled` | `boolean \| null` | — | no | — |
|
|
31
|
+
| `divided` | `boolean` | — | no | — |
|
|
32
|
+
| `filter` | `((item: SelectItem, queryText: string) => boolean)` | — | no | — |
|
|
33
|
+
| `filterMode` | `"start" \| "contains" \| "exact" \| "none"` | `"contains"` | no | `contains`, `exact`, `none`, `start` |
|
|
34
|
+
| `height` | `string \| number \| null` | — | no | — |
|
|
35
|
+
| `hideDetails` | `boolean` | — | no | — |
|
|
36
|
+
| `id` | `string` | — | no | — |
|
|
37
|
+
| `items` | `string[] \| SelectItem[]` | — | no | — |
|
|
38
|
+
| `label` | `string \| null` | — | no | — |
|
|
39
|
+
| `loading` | `boolean` | — | no | — |
|
|
40
|
+
| `location` | `LocationRaw` | `"bottom"` | no | — |
|
|
41
|
+
| `maxHeight` | `string \| number \| null` | — | no | — |
|
|
42
|
+
| `maxWidth` | `string \| number \| null` | — | no | — |
|
|
43
|
+
| `minHeight` | `string \| number \| null` | — | no | — |
|
|
44
|
+
| `minWidth` | `string \| number \| null` | — | no | — |
|
|
45
|
+
| `modelValue` | `(AutocompleteModelType<T> & (AutocompleteModelType<T> \| null))` | — | no | — |
|
|
46
|
+
| `multiple` | `T` | — | no | — |
|
|
47
|
+
| `name` | `string` | — | no | — |
|
|
48
|
+
| `offsetX` | `number \| null` | — | no | — |
|
|
49
|
+
| `offsetY` | `number \| null` | — | no | — |
|
|
50
|
+
| `onUpdateSearchInput` | `((value: string) => void)` | — | no | — |
|
|
51
|
+
| `placeholder` | `string` | — | no | — |
|
|
52
|
+
| `position` | `Position` | — | no | `absolute`, `fixed`, `relative`, `static`, `sticky` |
|
|
53
|
+
| `preventCloseOnClick` | `boolean` | — | no | — |
|
|
54
|
+
| `readonly` | `boolean \| null` | — | no | — |
|
|
55
|
+
| `screenPadding` | `number \| null` | — | no | — |
|
|
56
|
+
| `size` | `SizePropertyType` | — | no | `default`, `extra`, `large`, `mini`, `small` |
|
|
57
|
+
| `width` | `string \| number \| null` | — | no | — |
|
|
58
|
+
|
|
59
|
+
**SAutocomplete slots**
|
|
60
|
+
|
|
61
|
+
None.
|
|
62
|
+
|
|
63
|
+
**SAutocomplete events**
|
|
64
|
+
|
|
65
|
+
| Event | Payload |
|
|
66
|
+
| --- | --- |
|
|
67
|
+
| `createItem` | `[SelectItem]` |
|
|
68
|
+
| `searchItem` | `[string]` |
|
|
69
|
+
| `update:modelValue` | `[value: AutocompleteModelType<T> \| null \| undefined]` |
|
|
70
|
+
|
|
71
|
+
<!-- generated:api:end SAutocomplete -->
|
|
72
|
+
|
|
73
|
+
**SAutocomplete notes**
|
|
74
|
+
|
|
75
|
+
- `modelValue` (`v-model`): Selected item `value`(s)
|
|
76
|
+
- `items`: Options
|
|
77
|
+
- `multiple`: Multi-select; model becomes an array (default: `false`)
|
|
78
|
+
- `chips`: Show selected items as chips
|
|
79
|
+
- `closableChips`: × icon on each selected item (works with or without `chips`)
|
|
80
|
+
- `allowUnlisted`: Allow typed values not in `items`; adds an `Add "…"` row and emits `createItem`
|
|
81
|
+
- `filterMode`: Built-in, case-insensitive filter
|
|
82
|
+
- `filter`: Custom filter (overrides `filterMode` unless it is `'none'`)
|
|
83
|
+
- `debounce`: Delay before `searchItem` is emitted
|
|
84
|
+
- `delimiter`: Keys that commit the typed text (like Enter)
|
|
85
|
+
- `loading`: Show a spinner (hides the clear button)
|
|
86
|
+
- `clearable`: Clear button when a value is set
|
|
87
|
+
- `divided`: Dividers between list items
|
|
88
|
+
- `dense`: Dense list
|
|
89
|
+
- `label`: Label above the field
|
|
90
|
+
- `id`: Input id (label `for`) (default: auto)
|
|
91
|
+
- `hideDetails`: Hide the label
|
|
92
|
+
- `placeholder`: Input placeholder
|
|
93
|
+
- `autocomplete`: Native `autocomplete` attribute
|
|
94
|
+
- `size`: Preset size
|
|
95
|
+
- `location`: Dropdown position (flips automatically)
|
|
96
|
+
- `offsetX` / `offsetY`: Dropdown offset
|
|
97
|
+
- `update:modelValue` (event): Selection changed
|
|
98
|
+
- `searchItem` (`@search-item`) (event): Current query, `debounce` ms after the last keydown — use for async search
|
|
99
|
+
- `createItem` (`@create-item`) (event): An unlisted value was added (`allowUnlisted`)
|
|
100
|
+
|
|
101
|
+
`name` and `disabled` are typed but have no effect (see Gotchas). There is **no `rules` prop**.
|
|
102
|
+
|
|
103
|
+
```ts
|
|
104
|
+
interface SelectItem {
|
|
105
|
+
text: string // displayed text
|
|
106
|
+
value: string | number | null | undefined
|
|
107
|
+
disabled?: boolean
|
|
108
|
+
}
|
|
109
|
+
// string[] items use the string as both text and value
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
## Usage
|
|
113
|
+
|
|
114
|
+
```vue
|
|
115
|
+
<!-- Basic -->
|
|
116
|
+
<SAutocomplete v-model="city" :items="cities" label="City" placeholder="Search…" />
|
|
117
|
+
<!-- cities: [{ text: 'New York', value: 'nyc' }]; city === 'nyc' -->
|
|
118
|
+
|
|
119
|
+
<!-- Multiple with closable chips -->
|
|
120
|
+
<SAutocomplete v-model="tags" :items="allTags" multiple chips closable-chips />
|
|
121
|
+
|
|
122
|
+
<!-- Async server-side search -->
|
|
123
|
+
<SAutocomplete
|
|
124
|
+
v-model="userId"
|
|
125
|
+
:items="userResults"
|
|
126
|
+
:loading="isSearching"
|
|
127
|
+
filter-mode="none"
|
|
128
|
+
:debounce="300"
|
|
129
|
+
@search-item="searchUsers"
|
|
130
|
+
/>
|
|
131
|
+
|
|
132
|
+
<!-- Free-text tags, comma commits -->
|
|
133
|
+
<SAutocomplete
|
|
134
|
+
v-model="labels"
|
|
135
|
+
:items="knownLabels"
|
|
136
|
+
multiple
|
|
137
|
+
chips
|
|
138
|
+
allow-unlisted
|
|
139
|
+
delimiter=","
|
|
140
|
+
@create-item="item => saveLabel(item.text)"
|
|
141
|
+
/>
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
```ts
|
|
145
|
+
const searchUsers = async (query: string) => {
|
|
146
|
+
if (!query) return
|
|
147
|
+
isSearching.value = true
|
|
148
|
+
userResults.value = await api.searchUsers(query) // map to { text, value }
|
|
149
|
+
isSearching.value = false
|
|
150
|
+
}
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
## Gotchas
|
|
154
|
+
|
|
155
|
+
| ❌ | ✅ |
|
|
156
|
+
|----|----|
|
|
157
|
+
| `@update:search-input="…"` | `@search-item="…"` — `update:search-input` is never emitted |
|
|
158
|
+
| `{ title: 'New York', value: 'nyc' }` | `{ text: 'New York', value: 'nyc' }` |
|
|
159
|
+
| `:rules="[…]"` inside `SForm` | Not supported — SAutocomplete does not register with `SForm`; validate the model yourself |
|
|
160
|
+
| `disabled` to lock the field | Has no effect on the input; render read-only text or a disabled `SSelect` instead |
|
|
161
|
+
| `name="country"` for native forms | Input name is always `autocomplete`; submit the model value yourself |
|
|
162
|
+
| Debouncing `@search-item` again | It is already debounced (`debounce`, default 500 ms) |
|
|
163
|
+
|
|
164
|
+
- Single mode: typing text that doesn't match an item exactly and blurring **clears** the model (unless `allowUnlisted`).
|
|
165
|
+
- Single mode, no chips: the selected item's text is shown in the input itself.
|
|
166
|
+
- Selected items keep their labels when `items` is replaced (async results), so chips don't go blank.
|
|
167
|
+
- Toggling `multiple` at runtime drops a single value when switching back to single mode.
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# SBadge
|
|
2
|
+
|
|
3
|
+
**Import:** `import { SBadge } from '@khsura/sui'`
|
|
4
|
+
|
|
5
|
+
Overlays a small notification indicator on another element. Supports number/text, dot, and icon modes. (The inner `SBadgeContent` is internal — not exported, not importable from `@khsura/sui`.)
|
|
6
|
+
|
|
7
|
+
Types: `node_modules/@khsura/sui/@types/definitions/props/propsBadge.d.ts`
|
|
8
|
+
|
|
9
|
+
<!-- generated:api:start SBadge -->
|
|
10
|
+
<!-- Generated from sui-api.json by `yarn sync:skills` (packages/app). Do not edit by hand. -->
|
|
11
|
+
|
|
12
|
+
**SBadge props**
|
|
13
|
+
|
|
14
|
+
| Prop | Type | Default | Required | Values |
|
|
15
|
+
| --- | --- | --- | --- | --- |
|
|
16
|
+
| `bottom` | `boolean` | — | no | — |
|
|
17
|
+
| `color` | `string` | — | no | — |
|
|
18
|
+
| `colorThreshold` | `number` | — | no | — |
|
|
19
|
+
| `content` | `string \| number` | — | no | — |
|
|
20
|
+
| `dot` | `boolean` | — | no | — |
|
|
21
|
+
| `icon` | `string` | — | no | — |
|
|
22
|
+
| `inline` | `boolean` | — | no | — |
|
|
23
|
+
| `label` | `string` | — | no | — |
|
|
24
|
+
| `left` | `boolean` | — | no | — |
|
|
25
|
+
| `offsetX` | `string \| number` | — | no | — |
|
|
26
|
+
| `offsetY` | `string \| number` | — | no | — |
|
|
27
|
+
| `overlap` | `boolean` | — | no | — |
|
|
28
|
+
| `theme` | `AppThemeType` | — | no | `dark`, `light` |
|
|
29
|
+
| `tile` | `boolean` | — | no | — |
|
|
30
|
+
| `transitionName` | `STransition` | — | no | — |
|
|
31
|
+
| `value` | `boolean` | — | no | — |
|
|
32
|
+
|
|
33
|
+
**SBadge slots**
|
|
34
|
+
|
|
35
|
+
| Slot | Slot props |
|
|
36
|
+
| --- | --- |
|
|
37
|
+
| `badge` | `{}` |
|
|
38
|
+
| `default` | `{}` |
|
|
39
|
+
|
|
40
|
+
**SBadge events**
|
|
41
|
+
|
|
42
|
+
None.
|
|
43
|
+
|
|
44
|
+
<!-- generated:api:end SBadge -->
|
|
45
|
+
|
|
46
|
+
**SBadge notes**
|
|
47
|
+
|
|
48
|
+
- `value`: Show the badge. **No default — the badge is hidden unless you pass `value`** (default: `undefined` (falsy))
|
|
49
|
+
- `content`: Text/number inside the badge. Falsy values (`0`, `''`) render an empty badge
|
|
50
|
+
- `icon`: MDI icon inside the badge (wins over `content`)
|
|
51
|
+
- `label`: `aria-label` of the badge (`role="status"`, `aria-live="polite"`)
|
|
52
|
+
- `color`: Preset name or CSS color for the badge background (default: `undefined` (primary))
|
|
53
|
+
- `colorThreshold`: Contrast threshold for auto text color
|
|
54
|
+
- `theme`: Per-component theme override
|
|
55
|
+
- `dot`: Dot mode — 9px circle, ignores `content`/`icon`
|
|
56
|
+
- `overlap`: Pull the badge further onto the child's corner
|
|
57
|
+
- `inline`: Render next to the content instead of absolutely positioned
|
|
58
|
+
- `bottom`: Position at the bottom
|
|
59
|
+
- `left`: Position on the left (with `inline`, badge renders before the content)
|
|
60
|
+
- `tile`: Square corners
|
|
61
|
+
- `offsetX`: Horizontal offset (replaces the built-in spacer)
|
|
62
|
+
- `offsetY`: Vertical offset
|
|
63
|
+
- `transitionName`: Named transition for show/hide
|
|
64
|
+
- `default` (slot): The element the badge wraps
|
|
65
|
+
- `badge` (slot): Custom badge content — overrides `content`, `icon` and `dot` content
|
|
66
|
+
|
|
67
|
+
## Usage
|
|
68
|
+
|
|
69
|
+
```vue
|
|
70
|
+
<!-- Number badge on an icon -->
|
|
71
|
+
<SBadge :value="cartCount > 0" :content="cartCount" color="error" overlap>
|
|
72
|
+
<SIcon icon="mdi-cart" />
|
|
73
|
+
</SBadge>
|
|
74
|
+
|
|
75
|
+
<!-- Dot badge -->
|
|
76
|
+
<SBadge value dot color="success" overlap>
|
|
77
|
+
<SIcon icon="mdi-bell" />
|
|
78
|
+
</SBadge>
|
|
79
|
+
|
|
80
|
+
<!-- Custom badge content via slot -->
|
|
81
|
+
<SBadge value overlap>
|
|
82
|
+
<template #badge>
|
|
83
|
+
<SIcon icon="mdi-check" />
|
|
84
|
+
</template>
|
|
85
|
+
<SImage src="avatar.jpg" />
|
|
86
|
+
</SBadge>
|
|
87
|
+
|
|
88
|
+
<!-- Bottom-right -->
|
|
89
|
+
<SBadge value :content="3" bottom color="primary" overlap>
|
|
90
|
+
<SIcon icon="mdi-account" />
|
|
91
|
+
</SBadge>
|
|
92
|
+
|
|
93
|
+
<!-- Inline (no overlap) -->
|
|
94
|
+
<SBadge value inline :content="5" color="secondary">Messages</SBadge>
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
## Gotchas
|
|
98
|
+
|
|
99
|
+
| ❌ | ✅ |
|
|
100
|
+
|----|----|
|
|
101
|
+
| `<SBadge :content="3">` — nothing shows | `<SBadge value :content="3">` (or `:value="true"`) |
|
|
102
|
+
| `:content="0"` to show a zero count | `:content="String(count)"` — `0` is falsy and renders an empty pill |
|
|
103
|
+
| Expecting a hidden badge to stay in the DOM | Hidden badge is removed (`v-if`) |
|
|
104
|
+
|
|
105
|
+
- Default position is top-right of the wrapped element; `overlap` moves it onto the edge.
|
|
106
|
+
- Changing `content`/`icon` briefly re-mounts the badge (re-plays `transitionName`).
|