@khsura/sui 0.0.0-stage → 1.18.3
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 +153 -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 +39 -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 +210 -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/package.json +68 -4
- package/sui-plugin/.claude-plugin/plugin.json +10 -0
- package/sui-plugin/README.md +73 -0
- package/sui-plugin/skills/sui-component/SKILL.md +133 -0
- package/sui-plugin/skills/sui-component/references/alert.md +53 -0
- package/sui-plugin/skills/sui-component/references/autocomplete.md +110 -0
- package/sui-plugin/skills/sui-component/references/badge.md +80 -0
- package/sui-plugin/skills/sui-component/references/breadcrumbs.md +67 -0
- package/sui-plugin/skills/sui-component/references/button.md +74 -0
- package/sui-plugin/skills/sui-component/references/calendar.md +120 -0
- package/sui-plugin/skills/sui-component/references/cards.md +97 -0
- package/sui-plugin/skills/sui-component/references/carousel.md +113 -0
- package/sui-plugin/skills/sui-component/references/chip.md +68 -0
- package/sui-plugin/skills/sui-component/references/date-picker.md +140 -0
- package/sui-plugin/skills/sui-component/references/dialog.md +82 -0
- package/sui-plugin/skills/sui-component/references/divider.md +52 -0
- package/sui-plugin/skills/sui-component/references/droppable.md +68 -0
- package/sui-plugin/skills/sui-component/references/expansion-panels.md +108 -0
- package/sui-plugin/skills/sui-component/references/form.md +175 -0
- package/sui-plugin/skills/sui-component/references/icon.md +61 -0
- package/sui-plugin/skills/sui-component/references/image.md +56 -0
- package/sui-plugin/skills/sui-component/references/layout.md +226 -0
- package/sui-plugin/skills/sui-component/references/list.md +153 -0
- package/sui-plugin/skills/sui-component/references/menu.md +74 -0
- package/sui-plugin/skills/sui-component/references/overlay.md +48 -0
- package/sui-plugin/skills/sui-component/references/progress.md +78 -0
- package/sui-plugin/skills/sui-component/references/sheet.md +58 -0
- package/sui-plugin/skills/sui-component/references/slide-group.md +123 -0
- package/sui-plugin/skills/sui-component/references/snackbar.md +59 -0
- package/sui-plugin/skills/sui-component/references/split-view.md +59 -0
- package/sui-plugin/skills/sui-component/references/stepper.md +92 -0
- package/sui-plugin/skills/sui-component/references/table.md +151 -0
- package/sui-plugin/skills/sui-component/references/tabs.md +88 -0
- package/sui-plugin/skills/sui-component/references/toggle-button-group.md +109 -0
- package/sui-plugin/skills/sui-component/references/toolbar.md +101 -0
- package/sui-plugin/skills/sui-component/references/tooltip.md +65 -0
- package/sui-plugin/skills/sui-component/references/window.md +75 -0
- package/sui-plugin/skills/sui-form/SKILL.md +225 -0
- package/sui-plugin/skills/sui-getting-started/SKILL.md +374 -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
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
# Form Components
|
|
2
|
+
|
|
3
|
+
**Import:** `import { SForm, SInput, STextarea, SSelect, SCheckbox, SRadio, SRadioGroup, SSwitch, SFormInputError } from '@khsura/sui'`
|
|
4
|
+
**Types:** `import type { FormComponent, SelectItem, FormInputModelValueRule } from '@khsura/sui'`
|
|
5
|
+
|
|
6
|
+
`SAutocomplete` → see [autocomplete.md](./autocomplete.md). `SDatePickerInput` → see [date-picker.md](./date-picker.md).
|
|
7
|
+
|
|
8
|
+
Types: `node_modules/@khsura/sui/@types/definitions/props/props{Input,Textarea,Select,Checkbox,RadioGroup,Switch,FormInput}.d.ts`
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Validation model (read first)
|
|
13
|
+
|
|
14
|
+
Shared form-input props (`SInput`, `STextarea`, `SSelect`, `SCheckbox`, `SRadioGroup`, `SDatePickerInput`):
|
|
15
|
+
|
|
16
|
+
| Prop | Type | Default | Description |
|
|
17
|
+
|------|------|---------|-------------|
|
|
18
|
+
| `rules` | `FormInputModelValueRule[]` | `undefined` | `(value) => true \| string` — a string is the error message |
|
|
19
|
+
| `id` | `string` | auto/`undefined` | Element id |
|
|
20
|
+
| `disabled` / `readonly` | `boolean \| null` | `undefined` | Disabled inputs show no errors |
|
|
21
|
+
| `hideDetails` | `boolean` | `undefined` | Hide label + error area |
|
|
22
|
+
| `hideError` | `boolean` | `undefined` | Hide only the error message |
|
|
23
|
+
| `error` / `dirty` | `boolean` | `undefined` | Typed; `dirty` only syncs the internal flag — neither triggers validation |
|
|
24
|
+
|
|
25
|
+
Shared events: `update:error` (`boolean`), `update:errors` (`string[]`), `update:dirty` (`boolean`), plus `change` where noted.
|
|
26
|
+
|
|
27
|
+
- Rules run when the value changes (or the `disabled` prop changes) and when `SForm.validate()` is called. Not on mount.
|
|
28
|
+
- Only the **first** error is shown, rendered as HTML — never put user input in a message.
|
|
29
|
+
- `SSwitch` and `SAutocomplete` do **not** run rules and do not register with `SForm`.
|
|
30
|
+
- `getFormInputModelValueRules({ t })` (exported) builds common rules (`required`, `maxLength`, `numeric`, …) from vue-i18n `formRules.*` messages.
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## SForm
|
|
35
|
+
|
|
36
|
+
Renders a native `<form>` and collects child inputs.
|
|
37
|
+
|
|
38
|
+
| Model | Type | Description |
|
|
39
|
+
|-------|------|-------------|
|
|
40
|
+
| `v-model` | `boolean` | `true` when there are no errors (updated after validation) |
|
|
41
|
+
| `v-model:errors` | `string[]` | All current error messages |
|
|
42
|
+
| `v-model:error` | `boolean` | `true` when there are errors |
|
|
43
|
+
|
|
44
|
+
| Event | Payload | Description |
|
|
45
|
+
|-------|---------|-------------|
|
|
46
|
+
| `submit` | `Event` | Native submit — **not** prevented; use `@submit.prevent` |
|
|
47
|
+
|
|
48
|
+
Exposed: `validate(): boolean` — **returns `true` when there ARE errors**; `resetValidation()`.
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## SInput
|
|
53
|
+
|
|
54
|
+
| Prop | Type | Default | Description |
|
|
55
|
+
|------|------|---------|-------------|
|
|
56
|
+
| `label` | `string \| null` | `undefined` | Label above the field |
|
|
57
|
+
| `placeholder` | `string \| null` | `undefined` | Placeholder |
|
|
58
|
+
| `type` | `'text' \| 'email' \| 'number' \| 'password' \| 'search' \| 'tel' \| 'url' \| 'date' \| 'datetime-local' \| 'time' \| 'week'` | native (`text`) | Input type |
|
|
59
|
+
| `inputmode` | `'none' \| 'text' \| 'numeric' \| 'decimal' \| 'email' \| 'tel' \| 'url' \| 'search'` | `undefined` | Mobile keyboard |
|
|
60
|
+
| `suffix` / `appendOuter` | `string \| null` | `undefined` | Text inside / outside the field (or use the slots) |
|
|
61
|
+
| `simple` | `boolean \| null` | `undefined` | Underline-only style |
|
|
62
|
+
| `dense` / `tile` / `textRight` | `boolean` | `undefined` | Compact / square / right-aligned |
|
|
63
|
+
| `min` / `max` | `string \| number \| null` | `undefined` | Bounds (enforced for `type="number"`) |
|
|
64
|
+
| `positive` / `allowDecimal` | `boolean \| null` | `undefined` | Number input: >0 only / accept decimals |
|
|
65
|
+
| `usePreviousValueWhenExceeded` | `boolean \| null` | `undefined` | Over `max`: keep the previous value instead of clamping |
|
|
66
|
+
| `minlength` / `maxlength` / `pattern` | — | `undefined` | Native attributes |
|
|
67
|
+
| `name`, `autocomplete`, `autocapitalize`, `autofocus`, `spellcheck`, `ariaLabelledby` | — | `undefined` | Native attributes |
|
|
68
|
+
| `isPasteDisabled` | `boolean` | `undefined` | Block paste |
|
|
69
|
+
| `inputBackground` / `placeholderBackground` | `string \| null` | `undefined` | Field / placeholder background (preset or CSS color) |
|
|
70
|
+
| `size` | `'mini' \| 'small' \| 'default' \| 'large' \| 'extra'` | `undefined` | Preset size |
|
|
71
|
+
|
|
72
|
+
Model: `v-model` — `string | number | null`. Slots: `suffix`, `appendOuter` (no `label` slot). Events: `change`, `input`, `focus`, `blur`, `keydown`, `paste`, `autocomplete` + shared. Exposed: `validate()`.
|
|
73
|
+
|
|
74
|
+
## STextarea
|
|
75
|
+
|
|
76
|
+
Props: `label`, `placeholder`, `rows` (default `2`), `cols` (default `20`), **`autogrow`** (not `autoGrow`), `resize` (default off → `resize: none`), `simple`, `dense`, `tile`, `minlength`, `maxlength`, `name`, `autocomplete`, `autocapitalize`, `autofocus`, `spellcheck`, `ariaLabelledby`, `inputBackground`, `placeholderBackground`, `size` + shared. Model: `string` (`null` → `''`). Events: `change`, `input`, `blur`, `keydown` + shared. No slots. Exposed: `validate()`.
|
|
77
|
+
|
|
78
|
+
## SSelect
|
|
79
|
+
|
|
80
|
+
Single-value dropdown (no `multiple`, `chips`, `clearable` or `placeholder` — use [SAutocomplete](./autocomplete.md) for those).
|
|
81
|
+
|
|
82
|
+
| Prop | Type | Default | Description |
|
|
83
|
+
|------|------|---------|-------------|
|
|
84
|
+
| `items` | `Array<SelectItem \| string \| null \| undefined>` | `undefined` | Options |
|
|
85
|
+
| `label` | `string \| null` | `undefined` | Label above, **and** the text shown while nothing is selected |
|
|
86
|
+
| `name` | `string \| null` | `undefined` | Name of a hidden native `<select>` |
|
|
87
|
+
| `dense` / `grow` / `text` / `divided` | `boolean` | `undefined` | Compact / full width / text list style / list dividers |
|
|
88
|
+
| `color` | `string` | `undefined` | List color |
|
|
89
|
+
| `outlined` / `underlined` / `borderRadius` | border props | `undefined` | Activator border |
|
|
90
|
+
| `location`, `offsetX`, `offsetY`, … | menu props | `undefined` | Dropdown positioning |
|
|
91
|
+
|
|
92
|
+
```ts
|
|
93
|
+
interface SelectItem { text: string; value: string | number | null | undefined; disabled?: boolean }
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Model: `v-model` — `string | number | null`; `v-model:menu` — open state. Slots: `activator` `{ item, value }`, `dropdownIcon` `{ color, value }`. Events: shared only (`change` is not emitted — use `update:modelValue`).
|
|
97
|
+
|
|
98
|
+
## SCheckbox
|
|
99
|
+
|
|
100
|
+
Boolean only. Props: `label`, `color` (preset name only), `size` (`'default' | 'large'`), `block`, `bordered` + shared. Model: `boolean`. Events: `change` (`boolean`) + shared. No `value`, `indeterminate` or array/group model.
|
|
101
|
+
|
|
102
|
+
## SRadioGroup / SRadio
|
|
103
|
+
|
|
104
|
+
Options are **`SRadio` children** — there is no `items` prop.
|
|
105
|
+
|
|
106
|
+
`SRadioGroup` props: `name`, `column`, `grow`, `color` (preset name), `mandatory`, `outlined` / `underlined` / `borderRadius` + shared. Model: `string | number | boolean`. Events: `change` + shared.
|
|
107
|
+
|
|
108
|
+
`SRadio` props: `value` (falls back to `:key`), `label`, `id`, `name`, `disabled`, `readonly`, `outlined`, `type` (button type). Slot `label` `{ attrs }`. Event `update:checked` (`boolean`).
|
|
109
|
+
|
|
110
|
+
## SSwitch
|
|
111
|
+
|
|
112
|
+
Props: `label`, `color`, `id`, `disabled`, `readonly`. Model: `boolean`. Slot: `label`. Rules/`hideDetails` are typed but ignored — no error display, not registered with `SForm`.
|
|
113
|
+
|
|
114
|
+
## SFormInputError
|
|
115
|
+
|
|
116
|
+
Props: `errors: string[]` (shows the first, as HTML), `simple: boolean`. For custom inputs.
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
## Usage
|
|
121
|
+
|
|
122
|
+
```vue
|
|
123
|
+
<script setup lang="ts">
|
|
124
|
+
import { ref } from 'vue'
|
|
125
|
+
import type { FormComponent } from '@khsura/sui'
|
|
126
|
+
|
|
127
|
+
const formRef = ref<FormComponent | null>(null)
|
|
128
|
+
const valid = ref(false)
|
|
129
|
+
const model = ref({ name: '', email: '', country: null, agree: false, plan: 'free', notify: true })
|
|
130
|
+
const required = (v: unknown) => !!v || 'Required'
|
|
131
|
+
|
|
132
|
+
const submit = () => {
|
|
133
|
+
const hasErrors = formRef.value?.validate()
|
|
134
|
+
if (hasErrors) return
|
|
135
|
+
save(model.value)
|
|
136
|
+
}
|
|
137
|
+
</script>
|
|
138
|
+
|
|
139
|
+
<template>
|
|
140
|
+
<SForm ref="formRef" v-model="valid" @submit.prevent="submit">
|
|
141
|
+
<SInput v-model="model.name" label="Name" :rules="[required]" />
|
|
142
|
+
<SInput v-model="model.email" label="Email" type="email" :rules="[required, v => /.+@.+/.test(String(v)) || 'Invalid email']" />
|
|
143
|
+
<SSelect
|
|
144
|
+
v-model="model.country"
|
|
145
|
+
label="Country"
|
|
146
|
+
:items="[{ text: 'Canada', value: 'ca' }, { text: 'Japan', value: 'jp' }]"
|
|
147
|
+
:rules="[required]"
|
|
148
|
+
/>
|
|
149
|
+
<SCheckbox v-model="model.agree" label="I agree" :rules="[v => !!v || 'You must agree']" />
|
|
150
|
+
<SRadioGroup v-model="model.plan" mandatory>
|
|
151
|
+
<SRadio value="free" label="Free" />
|
|
152
|
+
<SRadio value="pro" label="Pro" />
|
|
153
|
+
</SRadioGroup>
|
|
154
|
+
<SSwitch v-model="model.notify" label="Email notifications" />
|
|
155
|
+
<SButton type="submit" color="primary">Save</SButton>
|
|
156
|
+
</SForm>
|
|
157
|
+
</template>
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
## Gotchas
|
|
161
|
+
|
|
162
|
+
| ❌ | ✅ |
|
|
163
|
+
|----|----|
|
|
164
|
+
| `if (form.validate()) submit()` | `validate()` returns `true` when there **are** errors: `if (!form.validate()) submit()` |
|
|
165
|
+
| `<SForm @submit="…">` | `@submit.prevent` — otherwise the page reloads |
|
|
166
|
+
| `:dirty="true"` to show errors | Call `formRef.validate()` (or change the value) |
|
|
167
|
+
| `{ title: 'Canada', value: 'ca' }` | `{ text: 'Canada', value: 'ca' }` |
|
|
168
|
+
| `<SRadioGroup :items="…">` | `SRadio` children |
|
|
169
|
+
| `<STextarea auto-grow>` | `<STextarea autogrow>` |
|
|
170
|
+
| `<SInput><template #label>` | No `label` slot — use the `label` prop |
|
|
171
|
+
| `<SCheckbox size="small">` | Only `'default' \| 'large'` |
|
|
172
|
+
| `rules` on `SSwitch` / `SAutocomplete` | Validate those values yourself |
|
|
173
|
+
|
|
174
|
+
- `SRadioGroup` without `mandatory`: clicking the selected radio clears the value.
|
|
175
|
+
- `SSelect` validates when its menu opens, so a required error can appear on first open.
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# SIcon
|
|
2
|
+
|
|
3
|
+
**Import:** `import { SIcon } from '@khsura/sui'`
|
|
4
|
+
|
|
5
|
+
> **Required setup: load the MDI font yourself.** SIcon only adds CSS classes (`s_icon mdi mdi-<name>`) to an empty `<span>`. `@khsura/sui` does **not** ship or load the Material Design Icons font. Without it, every SIcon renders **nothing**: no error, just blank space.
|
|
6
|
+
>
|
|
7
|
+
> ```bash
|
|
8
|
+
> npm i @mdi/font
|
|
9
|
+
> ```
|
|
10
|
+
> ```ts
|
|
11
|
+
> // main.ts (Vite / Vue)
|
|
12
|
+
> import '@mdi/font/css/materialdesignicons.css'
|
|
13
|
+
> ```
|
|
14
|
+
> ```ts
|
|
15
|
+
> // nuxt.config.ts
|
|
16
|
+
> export default defineNuxtConfig({ css: ['@mdi/font/css/materialdesignicons.css'] })
|
|
17
|
+
> ```
|
|
18
|
+
|
|
19
|
+
Renders a Material Design Icon (MDI) by class name as `<span aria-hidden="true" class="s_icon mdi mdi-home …">`. Supports size, color, spin, and 180° rotation.
|
|
20
|
+
|
|
21
|
+
Types: `node_modules/@khsura/sui/@types/definitions/props/propsIcon.d.ts`
|
|
22
|
+
|
|
23
|
+
## Props
|
|
24
|
+
|
|
25
|
+
| Prop | Type | Default | Description |
|
|
26
|
+
|------|------|---------|-------------|
|
|
27
|
+
| `icon` | `string` | **required** | Full MDI class name including the `mdi-` prefix, e.g. `'mdi-home'`, `'mdi-heart-outline'` |
|
|
28
|
+
| `size` | `'mini' \| 'small' \| 'default' \| 'large' \| 'extra' \| number \| string` | `undefined` (default size) | Preset name → size class. A number or CSS length → inline `font-size` |
|
|
29
|
+
| `color` | `string` | `undefined` | Text color: preset/app color name or any CSS color |
|
|
30
|
+
| `theme` | `'light' \| 'dark'` | `undefined` | Force light/dark styling (ignored when `color` is a preset) |
|
|
31
|
+
| `spin` | `boolean` | `false` | Continuous rotation animation |
|
|
32
|
+
| `rotated` | `boolean` | `false` | Rotate 180° (animated) |
|
|
33
|
+
| `extra` | `Array<string>` | `undefined` | Extra classes added to the span, e.g. MDI helpers `'mdi-flip-h'`, `'mdi-rotate-90'` |
|
|
34
|
+
|
|
35
|
+
## Slots
|
|
36
|
+
|
|
37
|
+
None.
|
|
38
|
+
|
|
39
|
+
## Events
|
|
40
|
+
|
|
41
|
+
None. SIcon has `aria-hidden="true"`. Wrap it in a button for click handling.
|
|
42
|
+
|
|
43
|
+
## Usage
|
|
44
|
+
|
|
45
|
+
```vue
|
|
46
|
+
<SIcon icon="mdi-home" />
|
|
47
|
+
<SIcon icon="mdi-heart" color="error" />
|
|
48
|
+
<SIcon icon="mdi-star" size="large" />
|
|
49
|
+
<SIcon icon="mdi-star" :size="48" />
|
|
50
|
+
<SIcon icon="mdi-loading" spin />
|
|
51
|
+
<SIcon icon="mdi-chevron-down" :rotated="isOpen" />
|
|
52
|
+
<SIcon icon="mdi-arrow-right" :extra="['mdi-flip-h']" />
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Gotchas
|
|
56
|
+
|
|
57
|
+
| ❌ | ✅ |
|
|
58
|
+
|----|----|
|
|
59
|
+
| Using SIcon without loading `@mdi/font` CSS | Import `@mdi/font/css/materialdesignicons.css` once at app entry |
|
|
60
|
+
| `<SIcon icon="home" />` | `<SIcon icon="mdi-home" />`. The `mdi-` prefix is required |
|
|
61
|
+
| `<SIcon icon="mdi-x" @click="close" />` for an action | Put the icon in a button (it is `aria-hidden`) |
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# SImage
|
|
2
|
+
|
|
3
|
+
**Import:** `import { SImage } from '@khsura/sui'`
|
|
4
|
+
|
|
5
|
+
An `<img>` inside a wrapper `<div>`. Supports aspect ratio, object-fit, size limits, and an overlay slot. The image always uses native lazy loading (`loading="lazy"`).
|
|
6
|
+
|
|
7
|
+
Types: `node_modules/@khsura/sui/@types/definitions/props/propsImage.d.ts`
|
|
8
|
+
|
|
9
|
+
## Props
|
|
10
|
+
|
|
11
|
+
| Prop | Type | Default | Description |
|
|
12
|
+
|------|------|---------|-------------|
|
|
13
|
+
| `src` | `string \| null` | **required** | Image URL. When it is falsy, no `<img>` is rendered (the slot still renders) |
|
|
14
|
+
| `alt` | `string \| null` | `''` | Alt text |
|
|
15
|
+
| `objectFit` | `'fill' \| 'contain' \| 'cover' \| 'none' \| 'scale-down'` | `undefined` | CSS `object-fit` for the `<img>` |
|
|
16
|
+
| `aspectRatio` | `number` | `undefined` | Width/height ratio applied to the wrapper (e.g. `16/9`, `1`) |
|
|
17
|
+
| `lazyLoad` | `LazyLoad` (`'lazy' \| 'eager' \| 'auto'`) | `undefined` | Declared but **currently ignored**: `loading` is always `lazy` |
|
|
18
|
+
| `width` / `height` | `string \| number` | `undefined` | Wrapper dimensions (the wrapper is `100%` × `100%` otherwise) |
|
|
19
|
+
| `maxWidth` / `maxHeight` | `string \| number` | `undefined` | Max dimensions |
|
|
20
|
+
| `minWidth` / `minHeight` | `string \| number` | `undefined` | Min dimensions |
|
|
21
|
+
|
|
22
|
+
## Slots
|
|
23
|
+
|
|
24
|
+
| Slot | Description |
|
|
25
|
+
|------|-------------|
|
|
26
|
+
| `default` | Content in an absolutely positioned layer over the image (full width/height) |
|
|
27
|
+
|
|
28
|
+
## Events
|
|
29
|
+
|
|
30
|
+
None.
|
|
31
|
+
|
|
32
|
+
## Usage
|
|
33
|
+
|
|
34
|
+
```vue
|
|
35
|
+
<SImage src="/photo.jpg" alt="A photo" />
|
|
36
|
+
|
|
37
|
+
<!-- 16:9 cover -->
|
|
38
|
+
<SImage src="/banner.jpg" :aspect-ratio="16/9" object-fit="cover" />
|
|
39
|
+
|
|
40
|
+
<!-- Square avatar -->
|
|
41
|
+
<SImage src="/avatar.jpg" :aspect-ratio="1" object-fit="cover" :width="80" />
|
|
42
|
+
|
|
43
|
+
<!-- Overlay -->
|
|
44
|
+
<SImage src="/photo.jpg" :aspect-ratio="4/3" object-fit="cover">
|
|
45
|
+
<div class="caption">Caption text</div>
|
|
46
|
+
</SImage>
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Gotchas
|
|
50
|
+
|
|
51
|
+
- The wrapper defaults to `width: 100%; height: 100%`. In a parent with no height, give it `aspect-ratio` or `height`.
|
|
52
|
+
- Use `object-fit="cover"` with `aspect-ratio` to avoid stretching.
|
|
53
|
+
|
|
54
|
+
| ❌ | ✅ |
|
|
55
|
+
|----|----|
|
|
56
|
+
| `<SImage src="/hero.jpg" lazy-load="eager" />` to load eagerly | Not supported. Use a plain `<img loading="eager">` for above-the-fold images |
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
# Layout Components
|
|
2
|
+
|
|
3
|
+
**Import:**
|
|
4
|
+
```ts
|
|
5
|
+
import {
|
|
6
|
+
SApp, SLayout, SMain,
|
|
7
|
+
SAppBar, SAppBarTitle,
|
|
8
|
+
SNavigationDrawer, SFooter, SBottomNavigation,
|
|
9
|
+
SContainer, SRow, SColumn, SSpacer,
|
|
10
|
+
} from '@khsura/sui'
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Layout parts register with a parent layout. That layout tracks app-bar height, drawer widths, and footer/bottom-nav height, and `SMain` offsets itself by them.
|
|
14
|
+
|
|
15
|
+
Types: `node_modules/@khsura/sui/@types/definitions/props/props<AppBar|NavigationDrawer|Main|Footer|BottomNavigation|Layout|Container|Row|Column>.d.ts`
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## How layouts are linked (read this first)
|
|
20
|
+
|
|
21
|
+
- **`SApp`** is the root. It provides the app state and is itself an *app-level* layout. Wrap the whole app in it (after installing the `createSUI()` plugin).
|
|
22
|
+
- **`SLayout`** creates a layout scope. Children find it by name:
|
|
23
|
+
- SLayout without `name` → children **without `for`** join it as the **app-level** layout (inside `SApp`).
|
|
24
|
+
- SLayout with `name="x"` → **every** child needs `for="x"`. A child without `for` joins the app-level layout instead, so offsets silently break.
|
|
25
|
+
- **App-level vs nested.** A layout is app-level when its name equals the plugin name (`'sui'` by default, so: no `name`) or when it has the `app` prop. A named layout (`name="x"` with no `app` prop on it and its children) is a *nested* layout:
|
|
26
|
+
- `SNavigationDrawer` is `position: absolute` inside the layout (not fixed), and `permanent` has **no effect**.
|
|
27
|
+
- `SFooter` ignores `position`. `SBottomNavigation` is not fixed unless you set `position="fixed"`.
|
|
28
|
+
- `SMain` renders `<section>` with `min-height: 100%` instead of `<main>` with `100vh`.
|
|
29
|
+
- Without `SApp`, an unnamed `SLayout` and its children do **not** link up.
|
|
30
|
+
- Below the `md` breakpoint (or with `forceMobile`), a drawer becomes a mobile overlay. It does not push `SMain`, opens by swiping in from the screen edge, and closes on an outside click.
|
|
31
|
+
|
|
32
|
+
```vue
|
|
33
|
+
<!-- Recommended: app-level layout -->
|
|
34
|
+
<SApp>
|
|
35
|
+
<SLayout>
|
|
36
|
+
<SAppBar position="fixed" />
|
|
37
|
+
<SNavigationDrawer v-model="drawer" />
|
|
38
|
+
<SMain><RouterView /></SMain>
|
|
39
|
+
</SLayout>
|
|
40
|
+
</SApp>
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## SApp / SLayout
|
|
46
|
+
|
|
47
|
+
| Prop | Type | Default | Description |
|
|
48
|
+
|------|------|---------|-------------|
|
|
49
|
+
| `name` | `string` | plugin name (`'sui'`) | Layout name. Children link with `for` |
|
|
50
|
+
| `app` | `boolean` | `true` on SApp, `false` on SLayout | Treat as the app-level layout |
|
|
51
|
+
| `width` / `height` / `min*` / `max*` | `string \| number` | — | SLayout only: dimensions |
|
|
52
|
+
|
|
53
|
+
Slot: `default`. SLayout is a flex column, `position: relative`.
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## SAppBar
|
|
58
|
+
|
|
59
|
+
Built on SToolbar. It renders a `<header>`.
|
|
60
|
+
|
|
61
|
+
| Prop | Type | Default | Description |
|
|
62
|
+
|------|------|---------|-------------|
|
|
63
|
+
| `for` / `app` | `string` / `boolean` | — | Layout link (see above) |
|
|
64
|
+
| `position` | `'fixed' \| 'absolute' \| 'static' \| 'relative' \| 'sticky'` | `undefined` (in flow) | `SMain` adds a top margin only when `fixed` |
|
|
65
|
+
| `elevateOnScroll` | `boolean` | `false` | Shadow after scrolling (needs `fixed`/`absolute`) |
|
|
66
|
+
| `hideOnScroll` | `boolean` | `false` | Hide on scroll down, show on scroll up |
|
|
67
|
+
| `scrollTarget` / `scrollThreshold` | `string \| HTMLElement` / `number` | window / `64` | Scroll source and threshold |
|
|
68
|
+
| `height` | `number \| string` | `64` | Bar height |
|
|
69
|
+
| `density` | `'default' \| 'comfortable' \| 'compact'` | — | Height preset |
|
|
70
|
+
| `extended` | `boolean` | auto (`true` when `#extension` is used) | Show the extension row |
|
|
71
|
+
| `extensionHeight` | `number \| string` | `48` | Extension height |
|
|
72
|
+
| `fixedExtension` | `boolean` | `false` | Keep only the extension visible (fixed) |
|
|
73
|
+
| `title` | `string` | — | Title text |
|
|
74
|
+
| `color` | `string` | `'appBar'` | Background |
|
|
75
|
+
| `elevation`, `outlined`, `underlined`, `borderRadius`, `tag` | — | `tag: 'header'` | Shared props |
|
|
76
|
+
|
|
77
|
+
**Slots:** `default`, `extension`. SAppBar does **not** forward `prepend`/`append`, so put everything in `default` and use `SSpacer`.
|
|
78
|
+
|
|
79
|
+
## SAppBarTitle
|
|
80
|
+
|
|
81
|
+
Props: `text`, `color`, `tag`. Slots: `default` (or `text`).
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## SNavigationDrawer
|
|
86
|
+
|
|
87
|
+
| Prop | Type | Default | Description |
|
|
88
|
+
|------|------|---------|-------------|
|
|
89
|
+
| `for` / `app` | `string` / `boolean` | — | Layout link |
|
|
90
|
+
| `v-model` | `boolean` | closed until first resize check | Open state. On desktop it auto-opens and on mobile it auto-closes (unless `persistent`) |
|
|
91
|
+
| `location` | `'left' \| 'right' \| 'bottom'` | `'left'` | Side. `bottom` is always mobile-style |
|
|
92
|
+
| `permanent` | `boolean` | `false` | Always open on desktop (**app-level layout only**) |
|
|
93
|
+
| `persistent` | `boolean` | `false` | Desktop: ignore outside clicks and resizes |
|
|
94
|
+
| `miniVariant` | `boolean` | `false` | Collapsed width (`v-model:mini-variant`) |
|
|
95
|
+
| `miniVariantWidth` | `string \| number` | `256` when not numeric | Mini width (set it, e.g. `56`) |
|
|
96
|
+
| `expandOnHover` | `boolean` | `false` | Mini until hovered |
|
|
97
|
+
| `forceMobile` | `boolean` | `false` | Use mobile behaviour on desktop |
|
|
98
|
+
| `touchless` | `boolean` | `false` | Disable swipe and hover handlers |
|
|
99
|
+
| `activator` | `string \| HTMLElement \| component` | — | Only **excluded from click-outside**. It does **not** toggle the drawer |
|
|
100
|
+
| `width` | `string \| number` | `256` | Width. Use `v-model:width` with `resizable` |
|
|
101
|
+
| `resizable` | `boolean` | `false` | Drag handle on the inner edge (desktop, not mini). Arrow keys resize by 16px |
|
|
102
|
+
| `minWidth` / `maxWidth` | `number` | `200` / `720` | Resize limits |
|
|
103
|
+
| `height` | `string \| number` | `100vh` when app-level, else `100%` | Height. App-level = the drawer has `app`, or its `for` is the app's name |
|
|
104
|
+
| `position`, `elevation` | — | — | Shared props |
|
|
105
|
+
| `tag` | `'nav' \| 'div' \| 'section'` | `nav` when app-level, else `aside` | Root element |
|
|
106
|
+
| `hideOverlay` | `boolean` | `false` | Declared. The scrim is not rendered in the current version |
|
|
107
|
+
|
|
108
|
+
**Slots:** `prepend`, `default` (scope `{ on }`: `click`, `transitionend`, `mouseenter`, `mouseleave` handlers), `append`.
|
|
109
|
+
**Events:** `update:modelValue`, `update:width` (resize end), `update:miniVariant`, `transitionend`.
|
|
110
|
+
|
|
111
|
+
A left and a right drawer can share one layout. Each one offsets its own side of `SMain`:
|
|
112
|
+
|
|
113
|
+
```vue
|
|
114
|
+
<SNavigationDrawer v-model="isNavOpen" />
|
|
115
|
+
<SNavigationDrawer v-model="isChatOpen" v-model:width="chatWidth" location="right"
|
|
116
|
+
persistent resizable :min-width="320" :max-width="640" />
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## SMain
|
|
122
|
+
|
|
123
|
+
Props: `for`, `app`, `tag` (default `main` at app level, `section` otherwise). Slot: `default`. Margins follow the drawers (left/right), a `fixed` app bar (top), and the bottom navigation (app level) or footer (nested).
|
|
124
|
+
|
|
125
|
+
## SFooter
|
|
126
|
+
|
|
127
|
+
| Prop | Type | Default | Description |
|
|
128
|
+
|------|------|---------|-------------|
|
|
129
|
+
| `for` / `app` | — | — | Layout link |
|
|
130
|
+
| `position` | `'fixed' \| 'absolute' \| …` | — | Applied only in an app-level layout |
|
|
131
|
+
| `inset` / `padless` | `boolean` | `false` | Inset / no padding |
|
|
132
|
+
| `color`, `elevation`, `height`, `width`, `min*`/`max*` | — | — | Shared props |
|
|
133
|
+
| `tag` | `'footer' \| 'div'` | `'footer'` | Root element |
|
|
134
|
+
|
|
135
|
+
Slot: `default`. Its width tracks the drawers.
|
|
136
|
+
|
|
137
|
+
## SBottomNavigation
|
|
138
|
+
|
|
139
|
+
| Prop | Type | Default | Description |
|
|
140
|
+
|------|------|---------|-------------|
|
|
141
|
+
| `v-model` | `string \| number \| …` | — | `value` of the selected child `SButton` |
|
|
142
|
+
| `height` | `string \| number` | — | **Set it.** Without it the bar collapses and SMain gets no bottom offset |
|
|
143
|
+
| `activeClass` | `string` | — | Class added to the selected button. **There is no active styling without it** |
|
|
144
|
+
| `mandatory` | `boolean` | `false` | Always keep one selected |
|
|
145
|
+
| `grow` / `shift` / `horizontal` / `dense` / `bordered` | `boolean` | `false` | Layout variants |
|
|
146
|
+
| `hideOnScroll` | `boolean` | `false` | Hide on scroll. It also overwrites `v-model` with a boolean, so avoid combining it with selection |
|
|
147
|
+
| `position` | — | fixed at app level | Set `fixed` in a nested layout |
|
|
148
|
+
| `for` / `app`, `tag`, `width`, border props | — | — | Shared props |
|
|
149
|
+
|
|
150
|
+
Slot: `default`. Use `SButton`s with a `value`.
|
|
151
|
+
|
|
152
|
+
```vue
|
|
153
|
+
<SBottomNavigation v-model="tab" :height="56" active-class="s_textColor__primary" grow>
|
|
154
|
+
<SButton value="home"><SIcon icon="mdi-home" /><span>Home</span></SButton>
|
|
155
|
+
<SButton value="search"><SIcon icon="mdi-magnify" /><span>Search</span></SButton>
|
|
156
|
+
</SBottomNavigation>
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
---
|
|
160
|
+
|
|
161
|
+
## Grid: SContainer / SRow / SColumn / SSpacer
|
|
162
|
+
|
|
163
|
+
The column component is **`SColumn`**. There is no `SCol`.
|
|
164
|
+
|
|
165
|
+
**SContainer:** `fluid`, `narrow`, `wide`, `padless`, `fill` (color applies to the outer box), `color`, `tag`. Slot `default`.
|
|
166
|
+
|
|
167
|
+
**SRow:**
|
|
168
|
+
|
|
169
|
+
| Prop | Type | Description |
|
|
170
|
+
|------|------|-------------|
|
|
171
|
+
| `align` | `'start' \| 'center' \| 'end' \| 'stretch' \| 'baseline'` | Cross-axis |
|
|
172
|
+
| `justify` | `'start' \| 'center' \| 'end' \| 'spaceBetween' \| 'spaceAround'` | Main-axis (**camelCase**) |
|
|
173
|
+
| `noGutters` / `noOuterGutters` / `dense` / `fillHeight` | `boolean` | Gutters / height |
|
|
174
|
+
| `gap` | `number \| string` | Custom gap (replaces gutters) |
|
|
175
|
+
| `contentClass` / `contentStyle` | — | Inner wrapper class/style |
|
|
176
|
+
|
|
177
|
+
**SColumn:** `cols`, `sm`, `md`, `lg` (`1`–`12 \| 'auto' \| 'grow'`), `order` (number), `alignSelf`, `contentClass`/`contentStyle`. There is no `xl`.
|
|
178
|
+
|
|
179
|
+
**SSpacer:** `flex-grow: 1`, with no props.
|
|
180
|
+
|
|
181
|
+
```vue
|
|
182
|
+
<SContainer>
|
|
183
|
+
<SRow justify="spaceBetween" align="center">
|
|
184
|
+
<SColumn :cols="12" :md="6">Left</SColumn>
|
|
185
|
+
<SColumn :cols="12" :md="6">Right</SColumn>
|
|
186
|
+
</SRow>
|
|
187
|
+
</SContainer>
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
---
|
|
191
|
+
|
|
192
|
+
## Full example
|
|
193
|
+
|
|
194
|
+
```vue
|
|
195
|
+
<SApp>
|
|
196
|
+
<SLayout>
|
|
197
|
+
<SAppBar position="fixed" elevate-on-scroll>
|
|
198
|
+
<SButton variant="icon" @click="drawer = !drawer"><SIcon icon="mdi-menu" /></SButton>
|
|
199
|
+
<SAppBarTitle>My App</SAppBarTitle>
|
|
200
|
+
<SSpacer />
|
|
201
|
+
<SButton variant="icon"><SIcon icon="mdi-account" /></SButton>
|
|
202
|
+
</SAppBar>
|
|
203
|
+
<SNavigationDrawer v-model="drawer">
|
|
204
|
+
<SList dense>
|
|
205
|
+
<SListItem :to="{ name: 'home' }">
|
|
206
|
+
<SListItemContent><SListItemTitle>Home</SListItemTitle></SListItemContent>
|
|
207
|
+
</SListItem>
|
|
208
|
+
</SList>
|
|
209
|
+
</SNavigationDrawer>
|
|
210
|
+
<SMain><SContainer><RouterView /></SContainer></SMain>
|
|
211
|
+
</SLayout>
|
|
212
|
+
</SApp>
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
## Gotchas
|
|
216
|
+
|
|
217
|
+
| ❌ | ✅ |
|
|
218
|
+
|----|----|
|
|
219
|
+
| `<SLayout name="app">` + `<SMain>` (no `for`) | Add `for="app"` to every child, or drop `name` |
|
|
220
|
+
| `<SNavigationDrawer permanent>` in a named layout | `permanent` works only at app level (no `name`, or `app` on the layout and its children) |
|
|
221
|
+
| `<SNavigationDrawer activator="#btn">` with no `v-model` | Bind `v-model` and toggle it from the button |
|
|
222
|
+
| `<SAppBar><template #prepend>…` | Not forwarded. Put content in `default` |
|
|
223
|
+
| `<SRow justify="space-between">` | `justify="spaceBetween"` |
|
|
224
|
+
| `<SCol>` | `<SColumn>` |
|
|
225
|
+
| `<SBottomNavigation v-model="tab">` with no `height`/`active-class` | Set `:height` and `active-class` |
|
|
226
|
+
| `<SAppBar elevate-on-scroll>` with no position | Add `position="fixed"` |
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
# List Components
|
|
2
|
+
|
|
3
|
+
**Import:** `import { SList, SListItem, SListItemTitle, SListItemSubtitle, SListItemIcon, SListItemAction, SListItemContent, SListItemGroup } from '@khsura/sui'`
|
|
4
|
+
|
|
5
|
+
List layout for navigation, menus, options, and data rows. `SList` passes its props down to its children through provide/inject, so the sub-components only work inside the right parent (see Gotchas).
|
|
6
|
+
|
|
7
|
+
Types: `node_modules/@khsura/sui/@types/definitions/props/propsList.d.ts`, `propsListItem.d.ts`, `propsListMediaItem.d.ts`
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## SList
|
|
12
|
+
|
|
13
|
+
### Props
|
|
14
|
+
|
|
15
|
+
| Prop | Type | Default | Description |
|
|
16
|
+
|------|------|---------|-------------|
|
|
17
|
+
| `divided` | `boolean` | `false` | Border between items |
|
|
18
|
+
| `lines` | `number` (1–6) | `undefined` | Line clamp for `SListItemSubtitle` (the subtitle clamps to 2 lines when this is unset) |
|
|
19
|
+
| `outlined` | `boolean` | `false` | Outlined border. `color` then sets the **text** color |
|
|
20
|
+
| `dense` | `boolean` | `false` | No list padding, 40px rows, dense title/icon/action |
|
|
21
|
+
| `link` | `boolean` | `false` | Hover style + pointer on every item |
|
|
22
|
+
| `text` | `boolean` | `false` | `color` sets the text color instead of the background |
|
|
23
|
+
| `color` | `string` | `undefined` | Background color (or text color with `outlined`/`text`) |
|
|
24
|
+
| `colorThreshold` | `number` | `undefined` | Contrast threshold for custom colors |
|
|
25
|
+
| `tag` | `'ul' \| 'ol' \| 'div'` | `'div'` | Root element |
|
|
26
|
+
| `inset` | `boolean` | `false` | Declared, but has no styling (no visible effect) |
|
|
27
|
+
|
|
28
|
+
### Slots
|
|
29
|
+
|
|
30
|
+
| Slot | Description |
|
|
31
|
+
|------|-------------|
|
|
32
|
+
| `default` | `SListItem`, `SListItemGroup`, `SDivider`, … |
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## SListItem
|
|
37
|
+
|
|
38
|
+
A flex row with a minimum height of 48px (40px when the list is `dense`).
|
|
39
|
+
|
|
40
|
+
### Props
|
|
41
|
+
|
|
42
|
+
| Prop | Type | Default | Description |
|
|
43
|
+
|------|------|---------|-------------|
|
|
44
|
+
| `link` | `boolean` | `false` | Hover background + pointer (automatic when `href`/`to` is set) |
|
|
45
|
+
| `selectable` | `boolean` | `false` | Only sets `cursor: pointer`. It does **not** add selected styling |
|
|
46
|
+
| `lines` | `number` (1–6) | `undefined` | Subtitle line clamp for this item (overrides the list's `lines`) |
|
|
47
|
+
| `disabled` | `boolean` | `false` | Disabled state |
|
|
48
|
+
| `href` | `string` | `undefined` | Render as `<a>` |
|
|
49
|
+
| `to` | `RouteLocationRaw` | `undefined` | Render as `router-link` |
|
|
50
|
+
| `target` / `rel` | `string` | `undefined` | Link attributes |
|
|
51
|
+
| `tag` | `'li' \| 'div'` | `'div'` | Root element (when not a link) |
|
|
52
|
+
|
|
53
|
+
### Slots
|
|
54
|
+
|
|
55
|
+
| Slot | Description |
|
|
56
|
+
|------|-------------|
|
|
57
|
+
| `default` | Item content |
|
|
58
|
+
|
|
59
|
+
### Events
|
|
60
|
+
|
|
61
|
+
| Event | Payload | Description |
|
|
62
|
+
|-------|---------|-------------|
|
|
63
|
+
| `click` | `Event` | Item clicked |
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## SListItemContent / SListItemTitle / SListItemSubtitle
|
|
68
|
+
|
|
69
|
+
`default` slot only, with no props.
|
|
70
|
+
|
|
71
|
+
- `SListItemContent` wraps the title and subtitle. It **must be inside an `SListItem`** (it throws otherwise).
|
|
72
|
+
- `SListItemTitle` is the primary line. It **must be inside an `SList`** (it throws otherwise).
|
|
73
|
+
- `SListItemSubtitle` is the secondary line, clamped to 2 lines by default. It **must be inside both `SList` and `SListItem`**.
|
|
74
|
+
|
|
75
|
+
## SListItemIcon / SListItemAction
|
|
76
|
+
|
|
77
|
+
Leading icon area and trailing action area. `default` slot.
|
|
78
|
+
|
|
79
|
+
| Prop | Type | Default | Description |
|
|
80
|
+
|------|------|---------|-------------|
|
|
81
|
+
| `alignCenter` | `boolean` | `false` | Vertically center the content |
|
|
82
|
+
| `dense` | `boolean` | `false` | Dense sizing (the parent list's `dense` takes precedence) |
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## SListItemGroup
|
|
87
|
+
|
|
88
|
+
A collapsible sub-list. By default it renders a clickable header row (title, subtitle, chevron). The children are rendered in a nested `SList` that inherits the parent list's props. **It must be inside an `SList`.**
|
|
89
|
+
|
|
90
|
+
| Prop / Model | Type | Default | Description |
|
|
91
|
+
|--------------|------|---------|-------------|
|
|
92
|
+
| `v-model` | `boolean` | `false` | Expanded state |
|
|
93
|
+
| `title` | `string \| null` | `null` | Header title |
|
|
94
|
+
| `subtitle` | `string \| null` | `null` | Header subtitle |
|
|
95
|
+
|
|
96
|
+
| Slot | Description |
|
|
97
|
+
|------|-------------|
|
|
98
|
+
| `activator` | Replaces the default header row (no slot props; toggle `v-model` yourself) |
|
|
99
|
+
| `default` | Items shown when expanded |
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
## Usage
|
|
104
|
+
|
|
105
|
+
```vue
|
|
106
|
+
<SList>
|
|
107
|
+
<SListItem v-for="user in users" :key="user.id">
|
|
108
|
+
<SListItemContent>
|
|
109
|
+
<SListItemTitle>{{ user.name }}</SListItemTitle>
|
|
110
|
+
<SListItemSubtitle>{{ user.email }}</SListItemSubtitle>
|
|
111
|
+
</SListItemContent>
|
|
112
|
+
</SListItem>
|
|
113
|
+
</SList>
|
|
114
|
+
|
|
115
|
+
<!-- Icons + actions -->
|
|
116
|
+
<SList divided>
|
|
117
|
+
<SListItem v-for="file in files" :key="file.id">
|
|
118
|
+
<SListItemIcon align-center><SIcon icon="mdi-file" /></SListItemIcon>
|
|
119
|
+
<SListItemContent>
|
|
120
|
+
<SListItemTitle>{{ file.name }}</SListItemTitle>
|
|
121
|
+
</SListItemContent>
|
|
122
|
+
<SListItemAction align-center>
|
|
123
|
+
<SButton variant="icon" @click="deleteFile(file)"><SIcon icon="mdi-delete" /></SButton>
|
|
124
|
+
</SListItemAction>
|
|
125
|
+
</SListItem>
|
|
126
|
+
</SList>
|
|
127
|
+
|
|
128
|
+
<!-- Router links (hover styling is automatic) -->
|
|
129
|
+
<SList dense>
|
|
130
|
+
<SListItem :to="{ name: 'dashboard' }">
|
|
131
|
+
<SListItemContent><SListItemTitle>Dashboard</SListItemTitle></SListItemContent>
|
|
132
|
+
</SListItem>
|
|
133
|
+
</SList>
|
|
134
|
+
|
|
135
|
+
<!-- Collapsible group -->
|
|
136
|
+
<SList>
|
|
137
|
+
<SListItemGroup v-model="settingsOpen" title="Settings">
|
|
138
|
+
<SListItem link @click="openProfile">
|
|
139
|
+
<SListItemContent><SListItemTitle>Profile</SListItemTitle></SListItemContent>
|
|
140
|
+
</SListItem>
|
|
141
|
+
</SListItemGroup>
|
|
142
|
+
</SList>
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
## Gotchas
|
|
146
|
+
|
|
147
|
+
| ❌ | ✅ |
|
|
148
|
+
|----|----|
|
|
149
|
+
| `<SListItemTitle>` used outside an `SList` (e.g. in a card) | Throws `List props not found`. Use it only inside `SList` |
|
|
150
|
+
| `<SListItem><SListItemTitle/></SListItem>` with no content wrapper, then adding a subtitle | Wrap title + subtitle in `SListItemContent` |
|
|
151
|
+
| `<SListItem selectable>` expecting a selected highlight | Manage the active state yourself (e.g. a class), since `selectable` only changes the cursor |
|
|
152
|
+
| `<SListItemGroup>` used for single/multi selection | It only expands and collapses. Track selection yourself |
|
|
153
|
+
| `<SList inset>` | No effect |
|