@khsura/sui 1.19.0 → 1.21.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/@types/components/avatar/index.d.ts +2 -0
- package/@types/components/avatar/sAvatar.vue.d.ts +13 -0
- package/@types/components/avatar/sAvatarGroup.vue.d.ts +16 -0
- package/@types/components/cards/sCardText.vue.d.ts +2 -2
- package/@types/components/datePicker/sDatePickerSwitch.vue.d.ts +2 -0
- package/@types/components/form/index.d.ts +2 -0
- package/@types/components/form/radio/sRadio.vue.d.ts +3 -0
- package/@types/components/form/sFormRow.vue.d.ts +18 -0
- package/@types/components/form/sInput.vue.d.ts +1 -0
- package/@types/components/form/sNumberInput.vue.d.ts +29 -0
- package/@types/components/form/sSelect.vue.d.ts +10 -3
- package/@types/components/index.d.ts +5 -0
- package/@types/components/layout/sNavigationDrawer.vue.d.ts +6 -6
- package/@types/components/progress/sProgressCircular.vue.d.ts +1 -0
- package/@types/components/progress/sProgressLinear.vue.d.ts +1 -0
- package/@types/components/sAutocomplete.vue.d.ts +11 -1
- package/@types/components/sEmptyState.vue.d.ts +26 -0
- package/@types/components/sFileInput.vue.d.ts +35 -0
- package/@types/components/sPagination.vue.d.ts +21 -0
- package/@types/components/sSkeletonLoader.vue.d.ts +19 -0
- package/@types/components/slideGroup/sSlideGroup.vue.d.ts +4 -1
- package/@types/components/table/sTable.vue.d.ts +2 -0
- package/@types/components/tabs/sTabs.vue.d.ts +2 -2
- package/@types/components/toggleButtonGroup/sToggleButtonGroup.vue.d.ts +2 -0
- package/@types/configs/app.d.ts +4 -0
- package/@types/configs/fileInput.d.ts +5 -0
- package/@types/configs/i18n.d.ts +3 -0
- package/@types/configs/index.d.ts +2 -0
- package/@types/configs/provider.d.ts +2 -0
- package/@types/configs/skeletonLoader.d.ts +57 -0
- package/@types/constants/avatar.d.ts +3 -0
- package/@types/constants/color.d.ts +15 -0
- package/@types/constants/cssVariables.d.ts +4 -0
- package/@types/constants/datePicker.d.ts +7 -0
- package/@types/constants/fileInput.d.ts +31 -0
- package/@types/constants/i18n.d.ts +3 -0
- package/@types/constants/index.d.ts +8 -0
- package/@types/constants/keyboard.d.ts +12 -0
- package/@types/constants/layout.d.ts +2 -0
- package/@types/constants/listbox.d.ts +1 -0
- package/@types/constants/numberInput.d.ts +22 -0
- package/@types/constants/overlay.d.ts +5 -0
- package/@types/constants/pagination.d.ts +20 -0
- package/@types/constants/skeletonLoader.d.ts +33 -0
- package/@types/constants/tabs.d.ts +10 -0
- package/@types/definitions/props/core/propsLink.d.ts +2 -2
- package/@types/definitions/props/index.d.ts +7 -0
- package/@types/definitions/props/propsAutocomplete.d.ts +8 -0
- package/@types/definitions/props/propsAvatar.d.ts +13 -0
- package/@types/definitions/props/propsAvatarGroup.d.ts +8 -0
- package/@types/definitions/props/propsEmptyState.d.ts +17 -0
- package/@types/definitions/props/propsFileInput.d.ts +41 -0
- package/@types/definitions/props/propsInput.d.ts +1 -0
- package/@types/definitions/props/propsLink.d.ts +2 -2
- package/@types/definitions/props/propsNumberInput.d.ts +46 -0
- package/@types/definitions/props/propsPagination.d.ts +32 -0
- package/@types/definitions/props/propsProgressCircular.d.ts +2 -0
- package/@types/definitions/props/propsProgressLinear.d.ts +2 -0
- package/@types/definitions/props/propsRow.d.ts +1 -0
- package/@types/definitions/props/propsSelect.d.ts +6 -0
- package/@types/definitions/props/propsSkeletonLoader.d.ts +18 -0
- package/@types/definitions/props/propsSlideGroup.d.ts +4 -0
- package/@types/definitions/props/propsTable.d.ts +1 -0
- package/@types/definitions/props/propsTabs.d.ts +4 -0
- package/@types/definitions/props/propsTextarea.d.ts +3 -0
- package/@types/helpers/colorHelpers.d.ts +1 -1
- package/@types/helpers/createAppStore.d.ts +4 -0
- package/@types/helpers/fileInputRules.d.ts +18 -0
- package/@types/helpers/index.d.ts +1 -0
- package/@types/lib/color.d.ts +21 -2
- package/@types/lib/escapeHtml.d.ts +2 -0
- package/@types/lib/flattenVNodes.d.ts +2 -0
- package/@types/lib/index.d.ts +7 -0
- package/@types/lib/linkLocation.d.ts +9 -0
- package/@types/lib/numberInput.d.ts +23 -0
- package/@types/lib/overlayPlacement.d.ts +11 -0
- package/@types/lib/revealInScroller.d.ts +25 -0
- package/@types/lib/safeArea.d.ts +3 -0
- package/@types/playwright.visual.config.d.ts +3 -0
- package/@types/services/appBarService.d.ts +14 -0
- package/@types/services/backgroundScrollService.d.ts +8 -2
- package/@types/services/core/layoutCoreService.d.ts +4 -0
- package/@types/services/datePicker/datePickerItemDateService.d.ts +1 -0
- package/@types/services/dialogService.d.ts +4 -8
- package/@types/services/fieldLayoutService.d.ts +19 -0
- package/@types/services/formInputService.d.ts +6 -0
- package/@types/services/index.d.ts +9 -0
- package/@types/services/layoutProviderService.d.ts +6 -0
- package/@types/services/layoutService.d.ts +4 -0
- package/@types/services/linkService.d.ts +11 -1
- package/@types/services/listboxNavigationService.d.ts +20 -0
- package/@types/services/menuService.d.ts +2 -0
- package/@types/services/overlayFocusService.d.ts +10 -0
- package/@types/services/paginationService.d.ts +39 -0
- package/@types/services/routerLinkService.d.ts +19 -0
- package/@types/services/scrollableFocusService.d.ts +10 -0
- package/@types/services/skeletonLoaderService.d.ts +22 -0
- package/@types/services/surfaceTextColorService.d.ts +8 -0
- package/@types/services/tabsService.d.ts +14 -0
- package/@types/store/index.d.ts +1 -0
- package/@types/store/scrollLockStore.d.ts +1 -0
- package/@types/tests/visual/constants/a11yAudit.d.ts +4 -0
- package/@types/tests/visual/constants/index.d.ts +4 -0
- package/@types/tests/visual/constants/resizeScroll.d.ts +10 -0
- package/@types/tests/visual/constants/storyRender.d.ts +5 -0
- package/@types/tests/visual/constants/visualMatrix.d.ts +20 -0
- package/@types/tests/visual/schemas/index.d.ts +1 -0
- package/@types/tests/visual/schemas/storyIndex.d.ts +17 -0
- package/@types/tests/visual/types/a11yAudit.d.ts +2 -0
- package/@types/tests/visual/types/index.d.ts +2 -0
- package/@types/tests/visual/types/visualStory.d.ts +8 -0
- package/@types/types/app.d.ts +2 -0
- package/@types/types/breadcrumbs.d.ts +2 -2
- package/@types/types/emits.d.ts +12 -0
- package/@types/types/fileInput.d.ts +28 -0
- package/@types/types/index.d.ts +6 -0
- package/@types/types/link.d.ts +20 -0
- package/@types/types/menu.d.ts +17 -0
- package/@types/types/numberInput.d.ts +12 -0
- package/@types/types/pagination.d.ts +17 -0
- package/@types/types/safeArea.d.ts +1 -0
- package/@types/types/skeletonLoader.d.ts +16 -0
- package/@types/vite.config.d.ts +1 -0
- package/README.md +12 -0
- package/dist/base.css.map +1 -1
- package/dist/s-ui.css +1 -1
- package/dist/s-ui.js +4792 -3038
- package/dist/s-ui.umd.cjs +1 -1
- package/dist/styles/components/avatar/_variables.scss +17 -0
- package/dist/styles/components/avatar/index.scss +1 -0
- package/dist/styles/components/button/mixins.scss +5 -0
- package/dist/styles/components/form/_variables.scss +11 -0
- package/dist/styles/components/form/index.scss +1 -0
- package/dist/styles/components/index.scss +2 -0
- package/dist/styles/mixins/_app.scss +7 -0
- package/dist/styles/tools/_safeArea.scss +8 -0
- package/dist/styles/tools/index.scss +1 -0
- package/dist/sui-api.json +1295 -212
- package/package.json +15 -4
- package/sui-plugin/.claude-plugin/plugin.json +1 -1
- package/sui-plugin/skills/sui-component/SKILL.md +21 -6
- package/sui-plugin/skills/sui-component/references/autocomplete.md +54 -46
- package/sui-plugin/skills/sui-component/references/avatar-group.md +66 -0
- package/sui-plugin/skills/sui-component/references/avatar.md +76 -0
- package/sui-plugin/skills/sui-component/references/badge.md +4 -4
- package/sui-plugin/skills/sui-component/references/breadcrumbs.md +3 -2
- package/sui-plugin/skills/sui-component/references/button.md +13 -13
- package/sui-plugin/skills/sui-component/references/calendar.md +1 -1
- package/sui-plugin/skills/sui-component/references/cards.md +12 -12
- package/sui-plugin/skills/sui-component/references/carousel.md +9 -9
- package/sui-plugin/skills/sui-component/references/chip.md +1 -1
- package/sui-plugin/skills/sui-component/references/date-picker.md +14 -13
- package/sui-plugin/skills/sui-component/references/dialog.md +11 -10
- package/sui-plugin/skills/sui-component/references/droppable.md +8 -8
- package/sui-plugin/skills/sui-component/references/empty-state.md +104 -0
- package/sui-plugin/skills/sui-component/references/expansion-panels.md +1 -1
- package/sui-plugin/skills/sui-component/references/file-input.md +106 -0
- package/sui-plugin/skills/sui-component/references/form.md +155 -105
- package/sui-plugin/skills/sui-component/references/image.md +11 -10
- package/sui-plugin/skills/sui-component/references/layout.md +53 -49
- package/sui-plugin/skills/sui-component/references/list.md +6 -3
- package/sui-plugin/skills/sui-component/references/menu.md +12 -9
- package/sui-plugin/skills/sui-component/references/number-input.md +102 -0
- package/sui-plugin/skills/sui-component/references/pagination.md +83 -0
- package/sui-plugin/skills/sui-component/references/progress.md +20 -18
- package/sui-plugin/skills/sui-component/references/sheet.md +8 -8
- package/sui-plugin/skills/sui-component/references/skeleton-loader.md +75 -0
- package/sui-plugin/skills/sui-component/references/slide-group.md +14 -12
- package/sui-plugin/skills/sui-component/references/snackbar.md +7 -5
- package/sui-plugin/skills/sui-component/references/split-view.md +2 -2
- package/sui-plugin/skills/sui-component/references/table.md +10 -3
- package/sui-plugin/skills/sui-component/references/tabs.md +19 -13
- package/sui-plugin/skills/sui-component/references/toggle-button-group.md +5 -4
- package/sui-plugin/skills/sui-component/references/toolbar.md +5 -5
- package/sui-plugin/skills/sui-component/references/tooltip.md +10 -9
- package/sui-plugin/skills/sui-component/references/window.md +6 -1
- package/sui-plugin/skills/sui-form/SKILL.md +25 -17
- package/sui-plugin/skills/sui-getting-started/SKILL.md +32 -7
- package/sui-plugin/skills/sui-layout/SKILL.md +3 -1
- package/sui-plugin/skills/sui-utilities/docs/classes.md +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@khsura/sui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.21.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/khsura/sui.git",
|
|
@@ -18,12 +18,17 @@
|
|
|
18
18
|
"stylelint": "yarn g:stylelint ./**/*.{vue,css,scss}",
|
|
19
19
|
"test": "yarn g:vitest run --project unit",
|
|
20
20
|
"test-storybook": "yarn g:vitest --project storybook",
|
|
21
|
+
"test:consumer": "bash scripts/consumerSmoke/runConsumerSmoke.sh",
|
|
22
|
+
"test:visual": "bash scripts/visual/runVisualInDocker.sh",
|
|
23
|
+
"test:visual:update": "bash scripts/visual/runVisualInDocker.sh --update",
|
|
24
|
+
"test:visual:container": "storybook build --quiet && playwright test -c playwright.visual.config.ts",
|
|
21
25
|
"release": "yarn g:publish",
|
|
22
26
|
"storybook:dev": "storybook dev --port 6006",
|
|
23
27
|
"storybook:build": "storybook build",
|
|
24
28
|
"build:api": "yarn g:vite-node scripts/apiMetadata/generateApiMetadata.ts",
|
|
25
29
|
"sync:skills": "yarn g:vite-node scripts/apiMetadata/syncSkillTables.ts",
|
|
26
|
-
"check:skills": "yarn g:vite-node scripts/apiMetadata/syncSkillTables.ts --check"
|
|
30
|
+
"check:skills": "yarn g:vite-node scripts/apiMetadata/syncSkillTables.ts --check",
|
|
31
|
+
"scaffold:component": "yarn g:vite-node scripts/scaffoldComponent/scaffoldComponent.ts"
|
|
27
32
|
},
|
|
28
33
|
"files": [
|
|
29
34
|
"dist",
|
|
@@ -59,11 +64,16 @@
|
|
|
59
64
|
"@vueuse/core": "^14.3.0",
|
|
60
65
|
"dayjs": "^1.11.21",
|
|
61
66
|
"uuid": "^14.0.1",
|
|
62
|
-
"vue": "^3.5.39",
|
|
63
67
|
"vue-i18n": "^11.4.6",
|
|
64
68
|
"zod": "^4.4.3"
|
|
65
69
|
},
|
|
70
|
+
"peerDependencies": {
|
|
71
|
+
"vue": "^3.5.41"
|
|
72
|
+
},
|
|
66
73
|
"devDependencies": {
|
|
74
|
+
"@axe-core/playwright": "4.14.0",
|
|
75
|
+
"@mdi/font": "6.5.95",
|
|
76
|
+
"@playwright/test": "1.61.1",
|
|
67
77
|
"@storybook/addon-a11y": "^10.4.6",
|
|
68
78
|
"@storybook/addon-docs": "^10.4.6",
|
|
69
79
|
"@storybook/addon-links": "^10.4.6",
|
|
@@ -76,9 +86,10 @@
|
|
|
76
86
|
"eslint-plugin-storybook": "10.4.6",
|
|
77
87
|
"http-server": "^14.1.1",
|
|
78
88
|
"lodash.merge": "^4.6.2",
|
|
79
|
-
"playwright": "
|
|
89
|
+
"playwright": "1.61.1",
|
|
80
90
|
"storybook": "^10.4.6",
|
|
81
91
|
"vitest": "^4.1.9",
|
|
92
|
+
"vue": "^3.5.41",
|
|
82
93
|
"vue-component-meta": "^3.3.6"
|
|
83
94
|
}
|
|
84
95
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sui-plugin",
|
|
3
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.
|
|
4
|
+
"version": "1.37.0",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Sura Kh",
|
|
7
7
|
"email": "sura0111@gmail.com"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
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.
|
|
3
|
+
description: Look up and use any component from @khsura/sui (SButton, SCard, SDialog, SMenu, STooltip, STable, SList, STabs, SStepper, SCarousel, SExpansionPanels, SDatePicker, SNumberInput, SCalendar, SToggleButtonGroup, SSlideGroup, SToolbar, SSplitView, SDroppable, SBadge, SChip, SAvatar, SPagination, SEmptyState, SSkeletonLoader, SFileInput, 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
4
|
argument-hint: [component name or description of what you need]
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -22,6 +22,8 @@ All components import from `@khsura/sui`. App setup (registry, `SApp`, styles, `
|
|
|
22
22
|
|---|---|
|
|
23
23
|
| `SAlert` | [references/alert.md](references/alert.md) |
|
|
24
24
|
| `SAutocomplete` | [references/autocomplete.md](references/autocomplete.md) |
|
|
25
|
+
| `SAvatar` | [references/avatar.md](references/avatar.md) |
|
|
26
|
+
| `SAvatarGroup` | [references/avatar-group.md](references/avatar-group.md) |
|
|
25
27
|
| `SBadge` | [references/badge.md](references/badge.md) |
|
|
26
28
|
| `SBreadcrumbs` | [references/breadcrumbs.md](references/breadcrumbs.md) |
|
|
27
29
|
| `SButton` | [references/button.md](references/button.md) |
|
|
@@ -33,16 +35,21 @@ All components import from `@khsura/sui`. App setup (registry, `SApp`, styles, `
|
|
|
33
35
|
| `SDialog` | [references/dialog.md](references/dialog.md) |
|
|
34
36
|
| `SDivider` | [references/divider.md](references/divider.md) |
|
|
35
37
|
| `SDroppable` | [references/droppable.md](references/droppable.md) |
|
|
38
|
+
| `SEmptyState` | [references/empty-state.md](references/empty-state.md) |
|
|
36
39
|
| `SExpansionPanels`, `SExpansionPanel`, `SExpansionPanelHeader`, `SExpansionPanelContent` | [references/expansion-panels.md](references/expansion-panels.md) |
|
|
37
|
-
| `
|
|
40
|
+
| `SFileInput` | [references/file-input.md](references/file-input.md) |
|
|
41
|
+
| `SForm`, `SFormRow`, `SInput`, `STextarea`, `SSelect`, `SCheckbox`, `SRadioGroup`, `SRadio`, `SSwitch` | [references/form.md](references/form.md) (and the **sui-form** skill) |
|
|
38
42
|
| `SIcon` | [references/icon.md](references/icon.md) |
|
|
39
43
|
| `SImage` | [references/image.md](references/image.md) |
|
|
40
44
|
| `SApp`, `SLayout`, `SAppBar`, `SNavigationDrawer`, `SMain`, `SFooter`, `SBottomNavigation`, `SContainer`, `SRow`, `SColumn`, `SSpacer` | [references/layout.md](references/layout.md) (and the **sui-layout** skill) |
|
|
41
45
|
| `SList`, `SListItem`, `SListItemIcon`, `SListItemContent`, `SListItemTitle`, `SListItemSubtitle`, `SListItemAction`, `SListItemGroup` | [references/list.md](references/list.md) |
|
|
42
46
|
| `SMenu` | [references/menu.md](references/menu.md) |
|
|
47
|
+
| `SNumberInput` (since 1.21.0) | [references/number-input.md](references/number-input.md) (numbers: quantities, money, percentages) |
|
|
43
48
|
| `SOverlay` | [references/overlay.md](references/overlay.md) |
|
|
49
|
+
| `SPagination` | [references/pagination.md](references/pagination.md) |
|
|
44
50
|
| `SProgressLinear`, `SProgressCircular` | [references/progress.md](references/progress.md) |
|
|
45
51
|
| `SSheet` | [references/sheet.md](references/sheet.md) |
|
|
52
|
+
| `SSkeletonLoader` | [references/skeleton-loader.md](references/skeleton-loader.md) |
|
|
46
53
|
| `SSlideGroup`, `SSlideItem` | [references/slide-group.md](references/slide-group.md) |
|
|
47
54
|
| `SSnackbar` | [references/snackbar.md](references/snackbar.md) |
|
|
48
55
|
| `SSplitView`, `SSplitViewItem` | [references/split-view.md](references/split-view.md) |
|
|
@@ -60,10 +67,10 @@ All components import from `@khsura/sui`. App setup (registry, `SApp`, styles, `
|
|
|
60
67
|
|
|
61
68
|
| ❌ Name | ✅ Use instead |
|
|
62
69
|
|---|---|
|
|
63
|
-
| `SSkeletonLoader` | `SProgressCircular indeterminate` in a centered div |
|
|
64
70
|
| `STextField` | `SInput` (single line) or `STextarea` (multi-line) |
|
|
71
|
+
| `SFileUpload` / `<SInput type="file">` | `SFileInput` (`variant="dropzone"` for a drop area) |
|
|
65
72
|
| `SCol` | `SColumn` |
|
|
66
|
-
| `STablePagination` (not exported) | `STable`'s built-in pagination |
|
|
73
|
+
| `STablePagination` (not exported) | `STable`'s built-in pagination, or `SPagination` for a standalone pager |
|
|
67
74
|
| `SNavigationDrawer` inside a feature component | App shell only — use `<SDialog location="end">` for feature slide-in panels |
|
|
68
75
|
|
|
69
76
|
---
|
|
@@ -107,7 +114,7 @@ Popups teleport into the container rendered by `<SApp>` — without `SApp` at th
|
|
|
107
114
|
|
|
108
115
|
| Prop | Renders | For |
|
|
109
116
|
|---|---|---|
|
|
110
|
-
| `to` | `router-link` | internal route |
|
|
117
|
+
| `to` | `router-link` (plain `<a href>` without vue-router) | internal route |
|
|
111
118
|
| `href` | `<a>` | external URL (`target`, `rel` go with it) |
|
|
112
119
|
| neither | `div` or `tag` | not a link |
|
|
113
120
|
|
|
@@ -130,6 +137,14 @@ Navigating from `@click` renders a `div` — no middle-click, "copy link", or li
|
|
|
130
137
|
| `var(--s-color-surface-variant)` | `color-mix(in srgb, #{s_getAppColor('text')} 8%, transparent)` |
|
|
131
138
|
|
|
132
139
|
- **`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`
|
|
140
|
+
- **`s_getAppColor` keys:** `appBar`, `title`, `text`, `secondaryText`, `anchor`, `background`, `card`, `button`, `switch`, `border`, `disabled`, `snackbar`, `inputPlaceholderShown`, `textErrorHover`, `textError`, `focusRing`
|
|
134
141
|
|
|
135
142
|
The variables are set on `<SApp>`, so they only resolve inside it. More helpers: **sui-utilities**.
|
|
143
|
+
|
|
144
|
+
## Accessibility
|
|
145
|
+
|
|
146
|
+
- **Icon-only buttons need `aria-label`:** `<SButton variant="icon" aria-label="Close"><SIcon icon="mdi-close" /></SButton>`. Without it the button has no name (axe `button-name`, critical). The same goes for a link that wraps only an image.
|
|
147
|
+
- **Text on a colour is picked by WCAG contrast** (light or dark theme text, whichever contrasts more). Don't hard-code `color: white` on `color="success"` chips; the default `success` (`#2e7d32`) and light `secondary` (`#cc4125`) already reach 4.5:1 with their text. Passing `colorThreshold` switches back to the old YIQ brightness rule. A preset used as text (`color` on a text button, an outlined chip, `s_textColor__<name>`) is drawn with `--s-color-<name>--readable`, adjusted to 4.5:1 on the background and cards.
|
|
148
|
+
- **Keyboard:** SSelect and SAutocomplete are comboboxes (arrow keys move the highlighted option, Enter picks, Esc closes), STabs uses arrow keys / Home / End with one Tab stop, SRadioGroup uses native radio arrow keys, editable SStepper steps are buttons. Don't add your own `@keydown` handlers or `tabindex` for these.
|
|
149
|
+
- **Focus ring:** components draw a 2px `focusRing` outline under `:focus-visible`. Don't remove it with `outline: none`; for your own focusable element use `@include s_focusRing();`.
|
|
150
|
+
- SProgressCircular / SProgressLinear are named `Loading` by default; pass `aria-label` to say what loads. Full checklist: `docs/a11y.md` in the package and https://sui.surakh.com/.
|
|
@@ -11,54 +11,60 @@ Types: `node_modules/@khsura/sui/@types/definitions/props/propsAutocomplete.d.ts
|
|
|
11
11
|
|
|
12
12
|
**SAutocomplete props**
|
|
13
13
|
|
|
14
|
-
| Prop | Type | Default | Required | Values |
|
|
15
|
-
| --- | --- | --- | --- | --- |
|
|
16
|
-
| `activator` | `string \|
|
|
17
|
-
| `allowUnlisted` | `boolean` | — | no | — |
|
|
18
|
-
| `
|
|
19
|
-
| `
|
|
20
|
-
| `
|
|
21
|
-
| `
|
|
22
|
-
| `
|
|
23
|
-
| `
|
|
24
|
-
| `
|
|
25
|
-
| `
|
|
26
|
-
| `
|
|
27
|
-
| `
|
|
28
|
-
| `
|
|
29
|
-
| `
|
|
30
|
-
| `
|
|
31
|
-
| `
|
|
32
|
-
| `
|
|
33
|
-
| `
|
|
34
|
-
| `
|
|
35
|
-
| `
|
|
36
|
-
| `
|
|
37
|
-
| `
|
|
38
|
-
| `
|
|
39
|
-
| `
|
|
40
|
-
| `
|
|
41
|
-
| `
|
|
42
|
-
| `
|
|
43
|
-
| `
|
|
44
|
-
| `
|
|
45
|
-
| `
|
|
46
|
-
| `
|
|
47
|
-
| `
|
|
48
|
-
| `
|
|
49
|
-
| `
|
|
50
|
-
| `
|
|
51
|
-
| `
|
|
52
|
-
| `
|
|
53
|
-
| `
|
|
54
|
-
| `
|
|
55
|
-
| `
|
|
56
|
-
| `
|
|
57
|
-
| `
|
|
14
|
+
| Prop | Type | Default | Required | Values | Description |
|
|
15
|
+
| --- | --- | --- | --- | --- | --- |
|
|
16
|
+
| `activator` | `string \| ComponentPublicInstance \| HTMLElement \| null` | — | no | — | — |
|
|
17
|
+
| `allowUnlisted` | `boolean` | — | no | — | — |
|
|
18
|
+
| `ariaLabel` | `string \| null` | — | no | — | — |
|
|
19
|
+
| `autocomplete` | `string` | `"off"` | no | — | — |
|
|
20
|
+
| `chips` | `boolean` | — | no | — | — |
|
|
21
|
+
| `clearAriaLabel` | `string` | `"Clear"` | no | — | — |
|
|
22
|
+
| `clearable` | `boolean` | — | no | — | — |
|
|
23
|
+
| `closableChips` | `boolean` | — | no | — | — |
|
|
24
|
+
| `closeOnClick` | `boolean` | — | no | — | — |
|
|
25
|
+
| `closeOnContentClick` | `boolean` | — | no | — | — |
|
|
26
|
+
| `closeOnScroll` | `boolean` | — | no | — | — |
|
|
27
|
+
| `contentClass` | `string \| Record<string, boolean> \| string[]` | — | no | — | — |
|
|
28
|
+
| `contentStyle` | `StyleValue` | — | no | — | — |
|
|
29
|
+
| `debounce` | `number` | `500` | no | — | — |
|
|
30
|
+
| `delimiter` | `string \| RegExp \| string[]` | — | no | — | — |
|
|
31
|
+
| `dense` | `boolean` | — | no | — | — |
|
|
32
|
+
| `disabled` | `boolean \| null` | — | no | — | — |
|
|
33
|
+
| `divided` | `boolean` | — | no | — | — |
|
|
34
|
+
| `filter` | `((item: SelectItem, queryText: string) => boolean)` | — | no | — | — |
|
|
35
|
+
| `filterMode` | `"contains" \| "exact" \| "none" \| "start"` | `"contains"` | no | `contains`, `exact`, `none`, `start` | — |
|
|
36
|
+
| `height` | `number \| string \| null` | — | no | — | — |
|
|
37
|
+
| `hideDetails` | `boolean` | — | no | — | — |
|
|
38
|
+
| `id` | `string` | — | no | — | — |
|
|
39
|
+
| `items` | `SelectItem[] \| string[]` | — | no | — | — |
|
|
40
|
+
| `label` | `string \| null` | — | no | — | — |
|
|
41
|
+
| `loading` | `boolean` | — | no | — | — |
|
|
42
|
+
| `loadingAriaLabel` | `string` | `"Loading"` | no | — | — |
|
|
43
|
+
| `location` | `LocationRaw` | `"bottom"` | no | — | — |
|
|
44
|
+
| `maxHeight` | `number \| string \| null` | — | no | — | — |
|
|
45
|
+
| `maxWidth` | `number \| string \| null` | — | no | — | — |
|
|
46
|
+
| `minHeight` | `number \| string \| null` | — | no | — | — |
|
|
47
|
+
| `minWidth` | `number \| string \| null` | — | no | — | — |
|
|
48
|
+
| `modelValue` | `(AutocompleteModelType<T> & (AutocompleteModelType<T> \| null))` | — | no | — | — |
|
|
49
|
+
| `multiple` | `T` | — | no | — | — |
|
|
50
|
+
| `name` | `string` | — | no | — | — |
|
|
51
|
+
| `noDataText` | `string` | — | no | — | Message shown in the open menu when no item matches the query (and there is no "Add" option). Without it (and without the `noData` slot) the menu stays blank. Put an `SEmptyState` in the `noData` slot for an icon or an action. |
|
|
52
|
+
| `offsetX` | `number \| null` | — | no | — | — |
|
|
53
|
+
| `offsetY` | `number \| null` | — | no | — | — |
|
|
54
|
+
| `onUpdateSearchInput` | `((value: string) => void)` | — | no | — | — |
|
|
55
|
+
| `placeholder` | `string` | — | no | — | — |
|
|
56
|
+
| `position` | `Position` | — | no | `absolute`, `fixed`, `relative`, `static`, `sticky` | — |
|
|
57
|
+
| `preventCloseOnClick` | `boolean` | — | no | — | — |
|
|
58
|
+
| `readonly` | `boolean \| null` | — | no | — | — |
|
|
59
|
+
| `screenPadding` | `number \| null` | — | no | — | — |
|
|
60
|
+
| `size` | `SizePropertyType` | — | no | `default`, `extra`, `large`, `mini`, `small` | — |
|
|
61
|
+
| `width` | `number \| string \| null` | — | no | — | — |
|
|
58
62
|
|
|
59
63
|
**SAutocomplete slots**
|
|
60
64
|
|
|
61
|
-
|
|
65
|
+
| Slot | Slot props | Description |
|
|
66
|
+
| --- | --- | --- |
|
|
67
|
+
| `noData` | `{ query: string; }` | Replaces `noDataText` when no option is left, such as an `SEmptyState`. Receives the typed `query`. |
|
|
62
68
|
|
|
63
69
|
**SAutocomplete events**
|
|
64
70
|
|
|
@@ -91,7 +97,7 @@ None.
|
|
|
91
97
|
- `hideDetails`: Hide the label
|
|
92
98
|
- `placeholder`: Input placeholder
|
|
93
99
|
- `autocomplete`: Native `autocomplete` attribute
|
|
94
|
-
- `size`:
|
|
100
|
+
- `size`: Input font size, as on `SInput` (`large` 1.25rem, `extra` 1.5rem, never below 16px)
|
|
95
101
|
- `location`: Dropdown position (flips automatically)
|
|
96
102
|
- `offsetX` / `offsetY`: Dropdown offset
|
|
97
103
|
- `update:modelValue` (event): Selection changed
|
|
@@ -165,3 +171,5 @@ const searchUsers = async (query: string) => {
|
|
|
165
171
|
- Single mode, no chips: the selected item's text is shown in the input itself.
|
|
166
172
|
- Selected items keep their labels when `items` is replaced (async results), so chips don't go blank.
|
|
167
173
|
- Toggling `multiple` at runtime drops a single value when switching back to single mode.
|
|
174
|
+
- The list opens on the roomier side of the field and stays 8px inside the viewport (shifted left near the right edge); no placement workaround needed.
|
|
175
|
+
- A long option stays on one line and ends in an ellipsis; its full text is in the option's `title`. No custom item slot needed for long labels.
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# SAvatarGroup
|
|
2
|
+
|
|
3
|
+
**Import:** `import { SAvatarGroup } from '@khsura/sui'`
|
|
4
|
+
|
|
5
|
+
A row of overlapping `SAvatar`s, such as project members (`role="group"`). With `max`, it shows the first `max` avatars and one "+N" avatar for the rest. See [avatar.md](avatar.md) for the avatar itself.
|
|
6
|
+
|
|
7
|
+
Types: `node_modules/@khsura/sui/@types/definitions/props/propsAvatarGroup.d.ts`
|
|
8
|
+
|
|
9
|
+
Docs: https://sui.surakh.com/?path=/docs/ui-components-avatargroup--docs
|
|
10
|
+
|
|
11
|
+
<!-- generated:api:start SAvatarGroup -->
|
|
12
|
+
<!-- Generated from sui-api.json by `yarn sync:skills` (packages/app). Do not edit by hand. -->
|
|
13
|
+
|
|
14
|
+
**SAvatarGroup props**
|
|
15
|
+
|
|
16
|
+
| Prop | Type | Default | Required | Values | Description |
|
|
17
|
+
| --- | --- | --- | --- | --- | --- |
|
|
18
|
+
| `color` | `string` | — | no | — | — |
|
|
19
|
+
| `colorThreshold` | `number` | — | no | — | — |
|
|
20
|
+
| `max` | `number` | — | no | — | The most avatars shown. The rest collapse into one "+N" avatar. Shows every avatar when unset. |
|
|
21
|
+
| `moreLabel` | `string` | — | no | — | Accessible name of the "+N" avatar. `{count}` is replaced with the number of hidden avatars. Defaults to `{count} more`. |
|
|
22
|
+
| `size` | `SizePropertyUnionType` | — | no | — | — |
|
|
23
|
+
| `theme` | `AppThemeType` | — | no | `dark`, `light` | — |
|
|
24
|
+
|
|
25
|
+
**SAvatarGroup slots**
|
|
26
|
+
|
|
27
|
+
| Slot | Slot props |
|
|
28
|
+
| --- | --- |
|
|
29
|
+
| `default` | `any` |
|
|
30
|
+
| `more` | `{ count: number; }` |
|
|
31
|
+
|
|
32
|
+
**SAvatarGroup events**
|
|
33
|
+
|
|
34
|
+
None.
|
|
35
|
+
|
|
36
|
+
<!-- generated:api:end SAvatarGroup -->
|
|
37
|
+
|
|
38
|
+
**SAvatarGroup notes**
|
|
39
|
+
|
|
40
|
+
- `size` applies to every avatar that has no `size` of its own.
|
|
41
|
+
- `color`, `colorThreshold` and `theme` style the "+N" avatar.
|
|
42
|
+
- `more` slot (`{ count }`) replaces the "+N" avatar.
|
|
43
|
+
- Without `max`, a long group wraps onto more lines instead of overflowing.
|
|
44
|
+
|
|
45
|
+
## Usage
|
|
46
|
+
|
|
47
|
+
```vue
|
|
48
|
+
<SAvatarGroup :max="3" size="small" color="primary" aria-label="Project members">
|
|
49
|
+
<SAvatar
|
|
50
|
+
v-for="member in members"
|
|
51
|
+
:key="member.id"
|
|
52
|
+
:image="member.photoUrl"
|
|
53
|
+
:text="member.initials"
|
|
54
|
+
:alt="member.name"
|
|
55
|
+
/>
|
|
56
|
+
</SAvatarGroup>
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Gotchas
|
|
60
|
+
|
|
61
|
+
| ❌ | ✅ |
|
|
62
|
+
|----|----|
|
|
63
|
+
| `<SAvatarGroup><div v-for="m in members"><SAvatar … /></div></SAvatarGroup>` (no overlap) | `<SAvatarGroup><SAvatar v-for="m in members" :key="m.id" … /></SAvatarGroup>` |
|
|
64
|
+
| `members.slice(0, 3)` plus a hand-made "+N" element | `<SAvatarGroup :max="3">` with every member |
|
|
65
|
+
| A tooltip around each avatar in the group | Wrap the whole group, or show the names in a list |
|
|
66
|
+
| `<SAvatar>` without `alt` in a group (names are not visible) | `:alt="member.name"` on each avatar |
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# SAvatar
|
|
2
|
+
|
|
3
|
+
**Import:** `import { SAvatar } from '@khsura/sui'`
|
|
4
|
+
|
|
5
|
+
A round picture of a person or thing. It shows the `image`; when there is no image or it fails to load, the `text` initials; without those, the `icon` (`mdi-account` by default). Use it instead of a hand-built `<div>` + `<img>`. For overlapping avatars with a "+N", see [avatar-group.md](avatar-group.md).
|
|
6
|
+
|
|
7
|
+
Types: `node_modules/@khsura/sui/@types/definitions/props/propsAvatar.d.ts`
|
|
8
|
+
|
|
9
|
+
Docs: https://sui.surakh.com/?path=/docs/ui-components-avatar--docs
|
|
10
|
+
|
|
11
|
+
<!-- generated:api:start SAvatar -->
|
|
12
|
+
<!-- Generated from sui-api.json by `yarn sync:skills` (packages/app). Do not edit by hand. -->
|
|
13
|
+
|
|
14
|
+
**SAvatar props**
|
|
15
|
+
|
|
16
|
+
| Prop | Type | Default | Required | Values | Description |
|
|
17
|
+
| --- | --- | --- | --- | --- | --- |
|
|
18
|
+
| `alt` | `string` | — | no | — | Accessible name of the avatar, usually the person's name. Used as the image `alt` and as the `aria-label`. Leave it empty for a decorative avatar. |
|
|
19
|
+
| `borderRadius` | `` number \| "rounded" \| "tile" \| `${number}%` \| `${number}em` \| `${number}px` \| `${number}rem` \| `${number}vh` \| `${number}vw` \| null `` | — | no | — | — |
|
|
20
|
+
| `color` | `string` | — | no | — | — |
|
|
21
|
+
| `colorThreshold` | `number` | — | no | — | — |
|
|
22
|
+
| `icon` | `string` | — | no | — | Material Design icon shown when there is neither an image nor text. Defaults to `mdi-account`. |
|
|
23
|
+
| `image` | `string` | — | no | — | Image URL. When it is missing or fails to load, the avatar shows `text`, then `icon`. Do not put an `<img>` in the slot. |
|
|
24
|
+
| `outlined` | `boolean \| null` | — | no | — | — |
|
|
25
|
+
| `size` | `SizePropertyUnionType` | — | no | — | — |
|
|
26
|
+
| `text` | `string` | — | no | — | Initials shown when there is no image or it fails to load. Keep it to 1–3 characters, such as `JD`, not a full name. |
|
|
27
|
+
| `theme` | `AppThemeType` | — | no | `dark`, `light` | — |
|
|
28
|
+
|
|
29
|
+
**SAvatar slots**
|
|
30
|
+
|
|
31
|
+
| Slot | Slot props |
|
|
32
|
+
| --- | --- |
|
|
33
|
+
| `default` | `any` |
|
|
34
|
+
|
|
35
|
+
**SAvatar events**
|
|
36
|
+
|
|
37
|
+
None.
|
|
38
|
+
|
|
39
|
+
<!-- generated:api:end SAvatar -->
|
|
40
|
+
|
|
41
|
+
**SAvatar notes**
|
|
42
|
+
|
|
43
|
+
- `size`: a preset (`mini` 24 px, `small` 32, `default` 40, `large` 48, `extra` 56) or any length (`64`, `'4rem'`). In an `SAvatarGroup` the group's size is the default.
|
|
44
|
+
- `borderRadius`: round by default; `rounded` gives rounded corners, `tile` square ones.
|
|
45
|
+
- `outlined`: a border in `color` and no background.
|
|
46
|
+
- `alt` sets `role="img"` and `aria-label`; without it the avatar is decorative and its initials are read as text.
|
|
47
|
+
|
|
48
|
+
## Usage
|
|
49
|
+
|
|
50
|
+
```vue
|
|
51
|
+
<!-- Photo, falling back to initials, then the account icon -->
|
|
52
|
+
<SAvatar :image="user.photoUrl" :text="user.initials" :alt="user.name" color="primary" />
|
|
53
|
+
|
|
54
|
+
<SAvatar text="JD" color="secondary" size="small" />
|
|
55
|
+
<SAvatar icon="mdi-domain" outlined color="primary" />
|
|
56
|
+
|
|
57
|
+
<!-- Leading item of a list item, chip or card title: sized and spaced for you -->
|
|
58
|
+
<SListItem>
|
|
59
|
+
<SAvatar :image="user.photoUrl" :alt="user.name" />
|
|
60
|
+
<SListItemContent><SListItemTitle>{{ user.name }}</SListItemTitle></SListItemContent>
|
|
61
|
+
</SListItem>
|
|
62
|
+
<SChip><SAvatar text="JD" color="primary" /> Jane Doe</SChip>
|
|
63
|
+
<SCardTitle><SAvatar :image="user.photoUrl" :alt="user.name" /> {{ user.name }}</SCardTitle>
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Gotchas
|
|
67
|
+
|
|
68
|
+
| ❌ | ✅ |
|
|
69
|
+
|----|----|
|
|
70
|
+
| `<SAvatar><img :src="url" /></SAvatar>` (no fallback when it fails) | `<SAvatar :image="url" :text="initials" :alt="name" />` |
|
|
71
|
+
| `<SAvatar :src="url" />` (Vuetify / Quasar name) | `<SAvatar :image="url" />` |
|
|
72
|
+
| `<SAvatar text="Jane Doe" />` (clipped to "JA") | `<SAvatar text="JD" alt="Jane Doe" />` |
|
|
73
|
+
| `<SAvatar style="width: 64px; height: 64px">` (font and icon keep the old size) | `<SAvatar :size="64">` |
|
|
74
|
+
| `<SAvatar rounded="0">` / `tile` (Vuetify props) | `<SAvatar border-radius="tile">` |
|
|
75
|
+
| `<SImage … style="border-radius: 50%">` for a user picture | `<SAvatar :image="url" :alt="name" />` |
|
|
76
|
+
| `<div class="avatar" style="border-radius:50%;background:…">JD</div>` | `<SAvatar text="JD" color="primary" />` |
|
|
@@ -16,14 +16,14 @@ Types: `node_modules/@khsura/sui/@types/definitions/props/propsBadge.d.ts`
|
|
|
16
16
|
| `bottom` | `boolean` | — | no | — |
|
|
17
17
|
| `color` | `string` | — | no | — |
|
|
18
18
|
| `colorThreshold` | `number` | — | no | — |
|
|
19
|
-
| `content` | `
|
|
19
|
+
| `content` | `number \| string` | — | no | — |
|
|
20
20
|
| `dot` | `boolean` | — | no | — |
|
|
21
21
|
| `icon` | `string` | — | no | — |
|
|
22
22
|
| `inline` | `boolean` | — | no | — |
|
|
23
23
|
| `label` | `string` | — | no | — |
|
|
24
24
|
| `left` | `boolean` | — | no | — |
|
|
25
|
-
| `offsetX` | `
|
|
26
|
-
| `offsetY` | `
|
|
25
|
+
| `offsetX` | `number \| string` | — | no | — |
|
|
26
|
+
| `offsetY` | `number \| string` | — | no | — |
|
|
27
27
|
| `overlap` | `boolean` | — | no | — |
|
|
28
28
|
| `theme` | `AppThemeType` | — | no | `dark`, `light` |
|
|
29
29
|
| `tile` | `boolean` | — | no | — |
|
|
@@ -82,7 +82,7 @@ None.
|
|
|
82
82
|
<template #badge>
|
|
83
83
|
<SIcon icon="mdi-check" />
|
|
84
84
|
</template>
|
|
85
|
-
<
|
|
85
|
+
<SAvatar image="avatar.jpg" text="JD" alt="Jane Doe" />
|
|
86
86
|
</SBadge>
|
|
87
87
|
|
|
88
88
|
<!-- Bottom-right -->
|
|
@@ -43,7 +43,7 @@ None.
|
|
|
43
43
|
```ts
|
|
44
44
|
interface BreadcrumbsItem {
|
|
45
45
|
text: string | number
|
|
46
|
-
to?:
|
|
46
|
+
to?: LinkLocation // renders router-link (plain <a href> without vue-router)
|
|
47
47
|
href?: string // renders <a>
|
|
48
48
|
disabled?: boolean // renders plain <span>
|
|
49
49
|
link?: boolean // declared on the type, not used by the component
|
|
@@ -77,4 +77,5 @@ Each item renders as `router-link` if `to` is set, else `<a>` if `href` is set,
|
|
|
77
77
|
- The **last item is disabled automatically** (current page) unless you set `disabled: false` on it explicitly.
|
|
78
78
|
- Disabled items ignore `color`.
|
|
79
79
|
- Pass `to` or `href` per item, not both — `to` wins.
|
|
80
|
-
- `to`
|
|
80
|
+
- vue-router is optional: without it a `to` item renders a plain `<a href>`; use a path, not a route `name`.
|
|
81
|
+
- The first crumb starts at the content edge (no list indent), so it lines up with the cards below. Older versions inherited a 1.5em `<ol>` indent; don't add a negative margin.
|
|
@@ -15,18 +15,18 @@ Types: `node_modules/@khsura/sui/@types/definitions/props/propsButton.d.ts`
|
|
|
15
15
|
| --- | --- | --- | --- | --- |
|
|
16
16
|
| `activeClass` | `string \| null` | — | no | — |
|
|
17
17
|
| `block` | `boolean` | — | no | — |
|
|
18
|
-
| `borderRadius` | `` number \| "
|
|
18
|
+
| `borderRadius` | `` number \| "rounded" \| "tile" \| `${number}%` \| `${number}em` \| `${number}px` \| `${number}rem` \| `${number}vh` \| `${number}vw` \| null `` | — | no | — |
|
|
19
19
|
| `color` | `string` | — | no | — |
|
|
20
20
|
| `colorThreshold` | `number` | — | no | — |
|
|
21
21
|
| `disabled` | `boolean \| null` | — | no | — |
|
|
22
|
-
| `elevation` | `"" \|
|
|
23
|
-
| `height` | `
|
|
22
|
+
| `elevation` | `"" \| "1" \| "2" \| "3" \| "4" \| "5" \| "6" \| "7" \| "8" \| "9" \| "10" \| "11" \| "12" \| "13" \| "14" \| "15" \| "16" \| "17" \| "18" \| "19" \| "20" \| "21" \| "22" \| "23" \| "24" \| 0 \| 1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10 \| 11 \| 12 \| 13 \| 14 \| 15 \| 16 \| 17 \| 18 \| 19 \| 20 \| 21 \| 22 \| 23 \| 24 \| null` | — | no | — |
|
|
23
|
+
| `height` | `number \| string \| null` | — | no | — |
|
|
24
24
|
| `href` | `string \| null` | — | no | — |
|
|
25
25
|
| `loading` | `boolean` | — | no | — |
|
|
26
|
-
| `maxHeight` | `
|
|
27
|
-
| `maxWidth` | `
|
|
28
|
-
| `minHeight` | `
|
|
29
|
-
| `minWidth` | `
|
|
26
|
+
| `maxHeight` | `number \| string \| null` | — | no | — |
|
|
27
|
+
| `maxWidth` | `number \| string \| null` | — | no | — |
|
|
28
|
+
| `minHeight` | `number \| string \| null` | — | no | — |
|
|
29
|
+
| `minWidth` | `number \| string \| null` | — | no | — |
|
|
30
30
|
| `outlined` | `boolean \| null` | — | no | — |
|
|
31
31
|
| `readonly` | `boolean \| null` | — | no | — |
|
|
32
32
|
| `rel` | `string \| null` | — | no | — |
|
|
@@ -34,14 +34,14 @@ Types: `node_modules/@khsura/sui/@types/definitions/props/propsButton.d.ts`
|
|
|
34
34
|
| `selected` | `boolean` | — | no | — |
|
|
35
35
|
| `size` | `SizePropertyType` | — | no | `default`, `extra`, `large`, `mini`, `small` |
|
|
36
36
|
| `tag` | `"a" \| "button" \| null` | `"button"` | no | `a`, `button` |
|
|
37
|
-
| `target` | `"_blank" \| "
|
|
37
|
+
| `target` | `"_blank" \| "_parent" \| "_self" \| "_top"` | — | no | `_blank`, `_parent`, `_self`, `_top` |
|
|
38
38
|
| `theme` | `AppThemeType` | — | no | `dark`, `light` |
|
|
39
|
-
| `to` | `
|
|
39
|
+
| `to` | `LinkLocation \| null` | — | no | — |
|
|
40
40
|
| `type` | `ButtonTypeType` | — | no | `button`, `reset`, `submit` |
|
|
41
41
|
| `underlined` | `boolean \| null` | — | no | — |
|
|
42
|
-
| `value` | `
|
|
43
|
-
| `variant` | `"
|
|
44
|
-
| `width` | `
|
|
42
|
+
| `value` | `boolean \| number \| string` | — | no | — |
|
|
43
|
+
| `variant` | `"fab" \| "icon" \| "text" \| null` | — | no | `fab`, `icon`, `text` |
|
|
44
|
+
| `width` | `number \| string \| null` | — | no | — |
|
|
45
45
|
|
|
46
46
|
**SButton slots**
|
|
47
47
|
|
|
@@ -73,7 +73,7 @@ Types: `node_modules/@khsura/sui/@types/definitions/props/propsButton.d.ts`
|
|
|
73
73
|
- `underlined`: Underlined style
|
|
74
74
|
- `borderRadius`: Custom radius (`8`, `'8px'`, `'1rem'`, ...)
|
|
75
75
|
- `href`: Renders an `<a href>`
|
|
76
|
-
- `to`: Renders a `router-link`
|
|
76
|
+
- `to`: Renders a `router-link` when the app uses vue-router; without it, a plain `<a href>` (a route given by `name` gets no `href`, so pass a path)
|
|
77
77
|
- `target`: Only applied with `href`
|
|
78
78
|
- `rel`: Only applied with `href`
|
|
79
79
|
- `tag`: Root tag when neither `href` nor `to` is set
|
|
@@ -18,7 +18,7 @@ Types: `node_modules/@khsura/sui/@types/definitions/props/propsCalendar.d.ts`
|
|
|
18
18
|
| `color` | `string` | — | no | — |
|
|
19
19
|
| `colorThreshold` | `number` | — | no | — |
|
|
20
20
|
| `eventColor` | `((event: T) => string)` | — | no | — |
|
|
21
|
-
| `eventOverlapMode` | `"
|
|
21
|
+
| `eventOverlapMode` | `"column" \| "stacked"` | — | no | `column`, `stacked` |
|
|
22
22
|
| `events` | `T[]` | — | no | — |
|
|
23
23
|
| `focus` | `string` | — | no | — |
|
|
24
24
|
| `hideHeader` | `boolean` | — | no | — |
|
|
@@ -17,24 +17,24 @@ Types: `node_modules/@khsura/sui/@types/definitions/props/propsCard.d.ts`
|
|
|
17
17
|
|
|
18
18
|
| Prop | Type | Default | Required | Values |
|
|
19
19
|
| --- | --- | --- | --- | --- |
|
|
20
|
-
| `borderRadius` | `` number \| "
|
|
20
|
+
| `borderRadius` | `` number \| "rounded" \| "tile" \| `${number}%` \| `${number}em` \| `${number}px` \| `${number}rem` \| `${number}vh` \| `${number}vw` \| null `` | — | no | — |
|
|
21
21
|
| `color` | `string` | — | no | — |
|
|
22
22
|
| `colorThreshold` | `number` | — | no | — |
|
|
23
|
-
| `elevation` | `"" \|
|
|
24
|
-
| `height` | `
|
|
23
|
+
| `elevation` | `"" \| "1" \| "2" \| "3" \| "4" \| "5" \| "6" \| "7" \| "8" \| "9" \| "10" \| "11" \| "12" \| "13" \| "14" \| "15" \| "16" \| "17" \| "18" \| "19" \| "20" \| "21" \| "22" \| "23" \| "24" \| 0 \| 1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10 \| 11 \| 12 \| 13 \| 14 \| 15 \| 16 \| 17 \| 18 \| 19 \| 20 \| 21 \| 22 \| 23 \| 24 \| null` | — | no | — |
|
|
24
|
+
| `height` | `number \| string \| null` | — | no | — |
|
|
25
25
|
| `href` | `string \| null` | — | no | — |
|
|
26
|
-
| `maxHeight` | `
|
|
27
|
-
| `maxWidth` | `
|
|
28
|
-
| `minHeight` | `
|
|
29
|
-
| `minWidth` | `
|
|
26
|
+
| `maxHeight` | `number \| string \| null` | — | no | — |
|
|
27
|
+
| `maxWidth` | `number \| string \| null` | — | no | — |
|
|
28
|
+
| `minHeight` | `number \| string \| null` | — | no | — |
|
|
29
|
+
| `minWidth` | `number \| string \| null` | — | no | — |
|
|
30
30
|
| `outlined` | `boolean \| null` | — | no | — |
|
|
31
31
|
| `rel` | `string \| null` | — | no | — |
|
|
32
32
|
| `tag` | `HtmlTagName \| null` | — | no | `a`, `abbr`, `acronym`, `address`, `applet`, `area`, `article`, `aside`, `audio`, `b`, `base`, `basefont`, `bdi`, `bdo`, `big`, `blockquote`, `body`, `br`, `button`, `canvas`, `caption`, `center`, `cite`, `code`, `col`, `colgroup`, `data`, `datalist`, `dd`, `del`, `details`, `dfn`, `dialog`, `dir`, `div`, `dl`, `dt`, `em`, `embed`, `fieldset`, `figcaption`, `figure`, `font`, `footer`, `form`, `frame`, `frameset`, `h1`, `h1> to <h6`, `h2`, `h3`, `h4`, `h5`, `h6`, `head`, `header`, `hr`, `html`, `i`, `iframe`, `img`, `input`, `ins`, `kbd`, `label`, `legend`, `li`, `link`, `main`, `map`, `mark`, `meta`, `meter`, `nav`, `noframes`, `noscript`, `object`, `ol`, `optgroup`, `option`, `output`, `p`, `param`, `picture`, `pre`, `progress`, `q`, `rp`, `rt`, `ruby`, `s`, `samp`, `script`, `section`, `select`, `small`, `source`, `span`, `strike`, `strong`, `style`, `sub`, `summary`, `sup`, `svg`, `table`, `tbody`, `td`, `template`, `textarea`, `tfoot`, `th`, `thead`, `time`, `title`, `tr`, `track`, `tt`, `u`, `ul`, `var`, `video`, `wbr` |
|
|
33
|
-
| `target` | `"_blank" \| "
|
|
33
|
+
| `target` | `"_blank" \| "_parent" \| "_self" \| "_top"` | — | no | `_blank`, `_parent`, `_self`, `_top` |
|
|
34
34
|
| `theme` | `AppThemeType` | — | no | `dark`, `light` |
|
|
35
|
-
| `to` | `
|
|
35
|
+
| `to` | `LinkLocation \| null` | — | no | — |
|
|
36
36
|
| `underlined` | `boolean \| null` | — | no | — |
|
|
37
|
-
| `width` | `
|
|
37
|
+
| `width` | `number \| string \| null` | — | no | — |
|
|
38
38
|
|
|
39
39
|
**SCard slots**
|
|
40
40
|
|
|
@@ -59,7 +59,7 @@ None.
|
|
|
59
59
|
- `borderRadius`: Border radius override
|
|
60
60
|
- `tag`: Root element (ignored when `href`/`to` is set) (default: `'div'`)
|
|
61
61
|
- `href`: Render as `<a>`
|
|
62
|
-
- `to`: Render as `router-link` (takes precedence over `href
|
|
62
|
+
- `to`: Render as `router-link` (takes precedence over `href`; plain `<a href>` without vue-router)
|
|
63
63
|
- `target`: Link target
|
|
64
64
|
- `rel`: Link rel
|
|
65
65
|
- `width` / `height`: Dimensions
|
|
@@ -86,7 +86,7 @@ Each takes only `tag` (default `'div'`) and a `default` slot. No events.
|
|
|
86
86
|
|
|
87
87
|
Spacing between adjacent title → subtitle → text is tightened automatically.
|
|
88
88
|
|
|
89
|
-
`SCardTitle` is a flex row
|
|
89
|
+
`SCardTitle` is a flex row (so it can hold an icon, `SSpacer` and buttons). The `s_textAlign__*` classes, responsive ones included, also set the matching `justify-content` on it, so `class="s_textAlign__center"` centres the title. `s_justify__center` works too. A long title wraps between words; a single word wider than the card is split. (Before 1.20.0 `SCardTitle` ignored `s_textAlign__*`, so use `s_justify__*` there, and split titles at any letter.)
|
|
90
90
|
|
|
91
91
|
<!-- generated:api:start SCardTitle -->
|
|
92
92
|
<!-- Generated from sui-api.json by `yarn sync:skills` (packages/app). Do not edit by hand. -->
|
|
@@ -24,7 +24,7 @@ Types: `node_modules/@khsura/sui/@types/definitions/props/propsCarousel.d.ts`, `
|
|
|
24
24
|
| `cycle` | `boolean` | `true` | no | — |
|
|
25
25
|
| `delimiterIcon` | `string` | `"mdi-circle"` | no | — |
|
|
26
26
|
| `disabled` | `boolean \| null` | — | no | — |
|
|
27
|
-
| `height` | `
|
|
27
|
+
| `height` | `number \| string` | `500` | no | — |
|
|
28
28
|
| `hideArrows` | `boolean` | — | no | — |
|
|
29
29
|
| `hideDelimiterBackground` | `boolean` | — | no | — |
|
|
30
30
|
| `hideDelimiters` | `boolean` | — | no | — |
|
|
@@ -98,17 +98,17 @@ Each item renders an `SImage`. Your default-slot content is drawn as an overlay
|
|
|
98
98
|
| `activeClass` | `string \| null` | — | no | — |
|
|
99
99
|
| `alt` | `string \| null` | — | no | — |
|
|
100
100
|
| `aspectRatio` | `number \| null` | — | no | — |
|
|
101
|
-
| `height` | `
|
|
101
|
+
| `height` | `number \| string \| null` | — | no | — |
|
|
102
102
|
| `lazyLoad` | `LazyLoad \| null` | — | no | — |
|
|
103
|
-
| `maxHeight` | `
|
|
104
|
-
| `maxWidth` | `
|
|
105
|
-
| `minHeight` | `
|
|
106
|
-
| `minWidth` | `
|
|
107
|
-
| `objectFit` | `"
|
|
103
|
+
| `maxHeight` | `number \| string \| null` | — | no | — |
|
|
104
|
+
| `maxWidth` | `number \| string \| null` | — | no | — |
|
|
105
|
+
| `minHeight` | `number \| string \| null` | — | no | — |
|
|
106
|
+
| `minWidth` | `number \| string \| null` | — | no | — |
|
|
107
|
+
| `objectFit` | `"contain" \| "cover" \| "fill" \| "none" \| "scale-down"` | — | no | `contain`, `cover`, `fill`, `none`, `scale-down` |
|
|
108
108
|
| `selected` | `boolean` | — | no | — |
|
|
109
109
|
| `src` | `string \| null` | — | yes | — |
|
|
110
|
-
| `value` | `
|
|
111
|
-
| `width` | `
|
|
110
|
+
| `value` | `boolean \| number \| string` | — | no | — |
|
|
111
|
+
| `width` | `number \| string \| null` | — | no | — |
|
|
112
112
|
|
|
113
113
|
**SCarouselItem slots**
|
|
114
114
|
|