@khsura/sui-mcp 0.1.0 → 0.3.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/README.md +17 -6
- package/dist/guides/packages/app/docs/classes.md +1 -1
- package/dist/guides/plugins/sui-plugin/skills/sui-getting-started/SKILL.md +32 -7
- package/dist/index.js +697 -92
- package/dist/recipes/activator-overlays.md +1 -0
- package/dist/recipes/activator-overlays.vue +1 -1
- package/dist/recipes/app-shell.md +1 -1
- package/dist/recipes/centered-page.md +11 -0
- package/dist/recipes/centered-page.vue +44 -0
- package/dist/recipes/filter-bar.md +11 -0
- package/dist/recipes/filter-bar.vue +70 -0
- package/dist/recipes/responsive-grid.md +4 -1
- package/dist/recipes/responsive-grid.vue +37 -2
- package/dist/recipes/validated-form.md +6 -2
- package/dist/recipes/validated-form.vue +28 -8
- package/dist/sui-api.json +115 -5
- package/package.json +1 -1
|
@@ -10,4 +10,5 @@ components: SDialog, SMenu, STooltip, SSnackbar, SButton, SCard, SCardTitle, SCa
|
|
|
10
10
|
- `SMenu` stays open on content clicks unless you add `close-on-content-click`.
|
|
11
11
|
- `SDialog` has no background of its own; put an `SCard` inside. It has no Escape-key handling.
|
|
12
12
|
- `SSnackbar` has no `color` prop. Without `timeout` it stays until `v-model` turns `false`, so give it a close action.
|
|
13
|
+
- The snackbar is dark (`#424242`) in both themes. Give a text action button **no** `color`: it takes the snackbar's light text colour and is readable. Since 1.20.0 a preset `color` (`warning`, `primary`, ...) on a snackbar action uses a variant tuned to reach 4.5:1 on the snackbar, but it adds nothing over the default. A CSS colour (`color="#1976d2"`) is used as is, so pick a light one (`color="#ffffff"`). Before 1.20.0 an action without `color` kept the page's dark text colour and `primary`, `secondary`, `success`, `info` and `error` were below 4.5:1, so use `color="warning"` or a light CSS colour there.
|
|
13
14
|
- All four teleport into the container `<SApp>` renders; they do not appear without it.
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
<SSnackbar v-model="isSnackbarOpen" :timeout="SNACKBAR_TIMEOUT_MS">
|
|
39
39
|
Project deleted.
|
|
40
40
|
<template #action>
|
|
41
|
-
<SButton variant="text"
|
|
41
|
+
<SButton variant="text" @click="isSnackbarOpen = false">Close</SButton>
|
|
42
42
|
</template>
|
|
43
43
|
</SSnackbar>
|
|
44
44
|
</SRow>
|
|
@@ -7,7 +7,7 @@ components: SLayout, SAppBar, SAppBarTitle, SNavigationDrawer, SMain, SFooter, S
|
|
|
7
7
|
- Wrap the app in `<SApp>` once (App.vue) after `app.use(createSUI())`; this shell goes inside it.
|
|
8
8
|
- `SLayout name="shell"` is a named layout, so **every** child needs `for="shell"`. A child without `for` joins the app-level layout and the offsets silently break.
|
|
9
9
|
- Give the named layout a height (`height="100vh"` for a full page). Its drawer is `position: absolute` inside it.
|
|
10
|
-
- Below the `md` breakpoint the drawer is temporary: it slides over the content, opens on an edge swipe and closes on an outside click. From `md` up it pushes `SMain`.
|
|
10
|
+
- Below the `md` breakpoint the drawer is temporary: it slides over the content and dims the layout behind it, opens on an edge swipe and closes on an outside click or a tap on the dimmed area. From `md` up it pushes `SMain`. It opens itself on desktop and closes itself on mobile at load, so starting the model from `useDisplay()` only avoids a first-frame flicker.
|
|
11
11
|
- `activator` on the drawer only excludes the toggle button from outside-click handling; toggle `v-model` yourself.
|
|
12
12
|
- `SAppBar` needs `position="fixed"` for `SMain` to get a top offset. It has no `prepend`/`append` slots; use `SSpacer` to push items apart.
|
|
13
13
|
- Icon-only buttons need an `aria-label`.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Centered page
|
|
3
|
+
whenToUse: A page with one card centred in the viewport and no app bar or drawer, such as a login, sign-up, error or empty-state page.
|
|
4
|
+
components: SCard, SCardTitle, SCardText, SForm, SInput, SButton
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
- Render the page as a **direct child of `SApp`**: App.vue is `<SApp><RouterView /></SApp>` and this component is the routed page (or put the `<div>` straight inside `<SApp>`).
|
|
8
|
+
- `SApp` is a flex column at least as tall as the viewport (`min-height: 100dvh`). A direct child with `s_height--fill` grows to fill it (since `@khsura/sui` 1.20.0), so `s_display__flex s_justify__center s_align__center` on that child centres the card vertically and horizontally.
|
|
9
|
+
- Do not add a `min-height: 100vh` wrapper: `SApp` already fills the viewport. Before 1.20.0, `s_height--fill` under `SApp` resolved to the content height and the card stuck to the top; use `style="min-height: 100dvh"` on the child there instead.
|
|
10
|
+
- Inside an app shell (`SLayout` / `SMain`), this pattern does not apply: `s_height--fill` only grows a **direct** child of `SApp`.
|
|
11
|
+
- `:max-width` plus `s_width--fill` makes the card full width on phones and capped on wider screens; `s_pa__4` keeps it off the screen edges.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="s_display__flex s_justify__center s_align__center s_height--fill s_pa__4">
|
|
3
|
+
<SCard :max-width="420" :elevation="4" class="s_width--fill">
|
|
4
|
+
<SCardTitle>Sign in</SCardTitle>
|
|
5
|
+
<SCardText>
|
|
6
|
+
<SForm @submit.prevent="submit">
|
|
7
|
+
<SInput
|
|
8
|
+
v-model="form.email"
|
|
9
|
+
label="Email"
|
|
10
|
+
type="text"
|
|
11
|
+
inputmode="email"
|
|
12
|
+
autocomplete="email"
|
|
13
|
+
:rules="[required]"
|
|
14
|
+
/>
|
|
15
|
+
<SInput
|
|
16
|
+
v-model="form.password"
|
|
17
|
+
label="Password"
|
|
18
|
+
type="password"
|
|
19
|
+
autocomplete="current-password"
|
|
20
|
+
:rules="[required]"
|
|
21
|
+
/>
|
|
22
|
+
<SButton type="submit" color="primary" block class="s_mt__2">Sign in</SButton>
|
|
23
|
+
</SForm>
|
|
24
|
+
<p v-if="signedInEmail" class="s_text--body__2 s_mt__3" role="status">Signed in as {{ signedInEmail }}.</p>
|
|
25
|
+
</SCardText>
|
|
26
|
+
</SCard>
|
|
27
|
+
</div>
|
|
28
|
+
</template>
|
|
29
|
+
|
|
30
|
+
<script setup lang="ts">
|
|
31
|
+
import { reactive, ref } from 'vue'
|
|
32
|
+
import { SButton, SCard, SCardText, SCardTitle, SForm, SInput } from '@khsura/sui'
|
|
33
|
+
|
|
34
|
+
// A rule returns true to pass or an error string to fail.
|
|
35
|
+
const required = (value: unknown) => Boolean(value) || 'This field is required'
|
|
36
|
+
const form = reactive({ email: '', password: '' })
|
|
37
|
+
const signedInEmail = ref('')
|
|
38
|
+
|
|
39
|
+
const submit = () => {
|
|
40
|
+
if (form.email && form.password) {
|
|
41
|
+
signedInEmail.value = form.email
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
</script>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Filter bar
|
|
3
|
+
whenToUse: A search field with its button, or a row of filter fields (date, select) with an Apply button above a list or table.
|
|
4
|
+
components: SFormRow, SForm, SInput, SDatePickerInput, SSelect, SButton, SCard, SCardText
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
- Put fields and the buttons that act on them in an `SFormRow` (since 1.20.0), never a plain flex `<div>`. A field is a label, its box and a reserved error line, so in a plain flex row the button lines up with the label or floats above the fields; `SFormRow` lines each button up with the field box, with or without a label and while an error shows.
|
|
8
|
+
- `SFormRow` wraps on a phone: `SInput` takes the free width, `SSelect` and `SDatePickerInput` keep their own width (add `grow` / `block` to stretch them), buttons keep theirs. Do not add `block` to a button in the row.
|
|
9
|
+
- Keep the fields' error lines (no `hide-details`): the row and the button use them as the gap to the next row. A row whose fields all use `hide-details` adds the same gap below itself.
|
|
10
|
+
- Before 1.20.0 there is no `SFormRow`: put `hide-details` on the field in a flex row so it renders no label or error line, and give it a `placeholder` or `aria-label` instead.
|
|
11
|
+
- A search runs on submit: make the button `type="submit"` inside an `SForm`, so Enter in the field searches too.
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<SCard :max-width="720" class="s_mx__auto">
|
|
3
|
+
<SCardText>
|
|
4
|
+
<SForm ref="formRef" @submit.prevent="search">
|
|
5
|
+
<SFormRow>
|
|
6
|
+
<SInput v-model="filters.query" label="Search" :rules="[required]" />
|
|
7
|
+
<SButton type="submit" color="primary">Search</SButton>
|
|
8
|
+
</SFormRow>
|
|
9
|
+
<SFormRow>
|
|
10
|
+
<SDatePickerInput v-model="filters.from" label="From" type="date" />
|
|
11
|
+
<SDatePickerInput v-model="filters.to" label="To" type="date" />
|
|
12
|
+
<SSelect v-model="filters.status" label="Status" :items="statuses" />
|
|
13
|
+
<SButton color="primary" outlined @click="reset">Reset</SButton>
|
|
14
|
+
</SFormRow>
|
|
15
|
+
</SForm>
|
|
16
|
+
<p class="s_text--body__2">{{ summary }}</p>
|
|
17
|
+
</SCardText>
|
|
18
|
+
</SCard>
|
|
19
|
+
</template>
|
|
20
|
+
|
|
21
|
+
<script setup lang="ts">
|
|
22
|
+
import { computed, ref } from 'vue'
|
|
23
|
+
import {
|
|
24
|
+
type SelectItem,
|
|
25
|
+
SButton,
|
|
26
|
+
SCard,
|
|
27
|
+
SCardText,
|
|
28
|
+
SDatePickerInput,
|
|
29
|
+
SForm,
|
|
30
|
+
SFormRow,
|
|
31
|
+
SInput,
|
|
32
|
+
SSelect,
|
|
33
|
+
} from '@khsura/sui'
|
|
34
|
+
|
|
35
|
+
interface Filters {
|
|
36
|
+
query: string
|
|
37
|
+
from: string | null
|
|
38
|
+
to: string | null
|
|
39
|
+
status: string | null
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const statuses: SelectItem[] = [
|
|
43
|
+
{ text: 'Open', value: 'open' },
|
|
44
|
+
{ text: 'Closed', value: 'closed' },
|
|
45
|
+
]
|
|
46
|
+
|
|
47
|
+
const emptyFilters = (): Filters => ({ query: '', from: null, to: null, status: null })
|
|
48
|
+
// A rule returns true to pass or an error string to fail.
|
|
49
|
+
const required = (value: unknown) => Boolean(value) || 'Enter a search term'
|
|
50
|
+
const formRef = ref<InstanceType<typeof SForm> | null>(null)
|
|
51
|
+
const filters = ref<Filters>(emptyFilters())
|
|
52
|
+
const searchedFor = ref('')
|
|
53
|
+
const summary = computed(() => (searchedFor.value ? `Results for "${searchedFor.value}"` : 'No search yet'))
|
|
54
|
+
|
|
55
|
+
const search = () => {
|
|
56
|
+
// validate() returns true when the form HAS errors.
|
|
57
|
+
if (formRef.value?.validate()) {
|
|
58
|
+
return
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// Replace with your API call.
|
|
62
|
+
searchedFor.value = filters.value.query
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
const reset = () => {
|
|
66
|
+
filters.value = emptyFilters()
|
|
67
|
+
searchedFor.value = ''
|
|
68
|
+
formRef.value?.resetValidation()
|
|
69
|
+
}
|
|
70
|
+
</script>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Responsive grid
|
|
3
3
|
whenToUse: Cards or panels that stack on phones and sit side by side on wider screens.
|
|
4
|
-
components: SContainer, SRow, SColumn, SCard, SButton
|
|
4
|
+
components: SContainer, SRow, SColumn, SCard, SCardTitle, SCardText, SImage, SButton
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
- The 12-column grid is `SContainer` > `SRow` > `SColumn`. The column component is `SColumn`; there is no `SCol` and no `xl` prop.
|
|
@@ -9,3 +9,6 @@ components: SContainer, SRow, SColumn, SCard, SButton
|
|
|
9
9
|
- `cols` also takes `'auto'` (fit content) and `'grow'`.
|
|
10
10
|
- `SRow justify` values are camelCase: `spaceBetween`, `spaceAround`. `align` is the cross axis.
|
|
11
11
|
- Use `gap`, `dense` or `no-gutters` on `SRow` to change spacing instead of overriding margins.
|
|
12
|
+
- Equal-height cards: columns in one `SRow` line already share a height, so give each `SCard` `height="100%"`. Do not make the card `display: flex; flex-direction: column` to stretch it: `SImage` is `height: 100%` by default and shrinks in a flex column, so the images end up with different heights. Give `SImage` `:aspect-ratio` and `height="auto"` so it keeps its ratio.
|
|
13
|
+
- Two or more `block` buttons in one flex row overflow: `block` is `width: 100%` and does not shrink. Put each in its own `SColumn` instead.
|
|
14
|
+
- `SContainer` adds side padding only. Add top and bottom spacing yourself (`class="s_py__4"`) so the first card is not flush with the top of the viewport.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<SContainer>
|
|
2
|
+
<SContainer class="s_py__4">
|
|
3
3
|
<SRow>
|
|
4
4
|
<SColumn :cols="12" :md="8">
|
|
5
5
|
<SCard class="s_pa__4" :height="160">
|
|
@@ -24,6 +24,22 @@
|
|
|
24
24
|
</SColumn>
|
|
25
25
|
</SRow>
|
|
26
26
|
|
|
27
|
+
<SRow>
|
|
28
|
+
<SColumn v-for="product in products" :key="product.name" :cols="12" :sm="6" :lg="3">
|
|
29
|
+
<SCard height="100%" outlined>
|
|
30
|
+
<SImage
|
|
31
|
+
:src="product.image"
|
|
32
|
+
:alt="product.name"
|
|
33
|
+
:aspect-ratio="IMAGE_ASPECT_RATIO"
|
|
34
|
+
height="auto"
|
|
35
|
+
object-fit="cover"
|
|
36
|
+
/>
|
|
37
|
+
<SCardTitle>{{ product.name }}</SCardTitle>
|
|
38
|
+
<SCardText>{{ product.description }}</SCardText>
|
|
39
|
+
</SCard>
|
|
40
|
+
</SColumn>
|
|
41
|
+
</SRow>
|
|
42
|
+
|
|
27
43
|
<SRow justify="spaceBetween" align="center">
|
|
28
44
|
<SColumn cols="auto">
|
|
29
45
|
<span class="s_text--subtitle__1">Showing 4 of 12</span>
|
|
@@ -36,7 +52,13 @@
|
|
|
36
52
|
</template>
|
|
37
53
|
|
|
38
54
|
<script setup lang="ts">
|
|
39
|
-
import { SButton, SCard, SColumn, SContainer, SRow } from '@khsura/sui'
|
|
55
|
+
import { SButton, SCard, SCardText, SCardTitle, SColumn, SContainer, SImage, SRow } from '@khsura/sui'
|
|
56
|
+
|
|
57
|
+
interface Product {
|
|
58
|
+
name: string
|
|
59
|
+
description: string
|
|
60
|
+
image: string
|
|
61
|
+
}
|
|
40
62
|
|
|
41
63
|
interface Stat {
|
|
42
64
|
label: string
|
|
@@ -49,4 +71,17 @@ const stats: Stat[] = [
|
|
|
49
71
|
{ label: 'Customers', value: '912' },
|
|
50
72
|
{ label: 'Refunds', value: '14' },
|
|
51
73
|
]
|
|
74
|
+
|
|
75
|
+
const IMAGE_ASPECT_RATIO = 4 / 3
|
|
76
|
+
|
|
77
|
+
const products: Product[] = [
|
|
78
|
+
{ name: 'Desk lamp', description: 'Warm light.', image: 'https://picsum.photos/seed/lamp/400/300' },
|
|
79
|
+
{
|
|
80
|
+
name: 'Wireless headphones with a long name',
|
|
81
|
+
description: 'A longer description that wraps onto several lines, so this card is the tallest in the row.',
|
|
82
|
+
image: 'https://picsum.photos/seed/headphones/400/300',
|
|
83
|
+
},
|
|
84
|
+
{ name: 'Notebook', description: 'Dotted pages.', image: 'https://picsum.photos/seed/notebook/400/300' },
|
|
85
|
+
{ name: 'Mug', description: 'Keeps coffee warm.', image: 'https://picsum.photos/seed/mug/400/300' },
|
|
86
|
+
]
|
|
52
87
|
</script>
|
|
@@ -8,6 +8,10 @@ components: SForm, SInput, SSelect, SDatePickerInput, SCheckbox, SButton, SCard,
|
|
|
8
8
|
- A rule is `(value: unknown) => true | string`. Return an error string to fail; returning `false` shows no message.
|
|
9
9
|
- Put inputs with `rules` inside `SForm` so `validate()` checks them. `SAutocomplete` and `SSwitch` never run rules; check them yourself in `submit`.
|
|
10
10
|
- `SSelect` items are `SelectItem[]` (`{ text, value }`) or `string[]`. It has no `multiple`/`clearable`/`placeholder`; use `SAutocomplete` for those.
|
|
11
|
-
- `
|
|
12
|
-
-
|
|
11
|
+
- `SForm` renders `<form novalidate>`, so `type="email"`, `url` or `number` on an input never shows the browser's own bubble over SUI's error text: check the format with a rule. Add `inputmode` and `autocomplete` (e.g. `autocomplete="email"`) for the mobile keyboard and autofill. Before 1.20.0 `SForm` did not add `novalidate`: there the browser validated on submit and blocked the submit handler, so add `novalidate` to the `SForm` yourself.
|
|
12
|
+
- `SDatePickerInput type="date"` writes `'YYYY-MM-DD'`. Start an empty date as `null`; `''` also means no date (before 1.20.0 `''` opened the picker on "Invalid date", so keep `null` if you support older versions). Add `block` to it and `grow` to `SSelect` so they fill the form width like `SInput`.
|
|
13
|
+
- `hide-details` hides a text field's label above the field and its error line; `SCheckbox` keeps its own label. Use `hide-error` to drop just the error line. Before 1.20.0 `hide-details` also hid the `SCheckbox` label (its only text), so use `hide-error` there.
|
|
14
|
+
- Disable the submit button only **after a failed submit, while errors remain**: bind `v-model:error="hasErrors"` on `SForm`, set `submitAttempted = true` at the start of `submit`, and put `:disabled="submitAttempted && hasErrors"` on the button. It re-enables as soon as every rule passes, because each field re-validates when its value changes. Do not disable it from page load: a disabled button gives no reason and cannot be focused. Keep the inline error messages, they tell the user why it is disabled.
|
|
15
|
+
- `:loading` on the submit `SButton` already disables it; do not bind `:disabled` to `isSubmitting` as well.
|
|
16
|
+
- Give the submit button `class="s_mt__2"`: a field's error line ends right where the next element starts, so without it the last error message sits on the button.
|
|
13
17
|
- For translated messages use `getFormInputModelValueRules({ t })` from `@khsura/sui` instead of inline rules.
|
|
@@ -2,13 +2,29 @@
|
|
|
2
2
|
<SCard :max-width="560" class="s_mx__auto">
|
|
3
3
|
<SCardTitle>Create account</SCardTitle>
|
|
4
4
|
<SCardText>
|
|
5
|
-
<SForm ref="formRef" @submit.prevent="submit">
|
|
5
|
+
<SForm ref="formRef" v-model:error="hasErrors" @submit.prevent="submit">
|
|
6
6
|
<SInput v-model="form.name" label="Full name" :rules="[required]" />
|
|
7
|
-
<SInput
|
|
7
|
+
<SInput
|
|
8
|
+
v-model="form.email"
|
|
9
|
+
label="Email"
|
|
10
|
+
type="text"
|
|
11
|
+
inputmode="email"
|
|
12
|
+
autocomplete="email"
|
|
13
|
+
:rules="[required, email]"
|
|
14
|
+
/>
|
|
8
15
|
<SSelect v-model="form.role" label="Role" :items="roles" grow :rules="[required]" />
|
|
9
16
|
<SDatePickerInput v-model="form.startDate" label="Start date" type="date" block :rules="[required]" />
|
|
10
17
|
<SCheckbox v-model="form.acceptTerms" label="I accept the terms" :rules="[mustAccept]" />
|
|
11
|
-
<SButton
|
|
18
|
+
<SButton
|
|
19
|
+
type="submit"
|
|
20
|
+
color="primary"
|
|
21
|
+
block
|
|
22
|
+
class="s_mt__2"
|
|
23
|
+
:loading="isSubmitting"
|
|
24
|
+
:disabled="submitAttempted && hasErrors"
|
|
25
|
+
>
|
|
26
|
+
Create account
|
|
27
|
+
</SButton>
|
|
12
28
|
</SForm>
|
|
13
29
|
<p v-if="submittedName" class="s_text--body__2 s_mt__3">Account created for {{ submittedName }}.</p>
|
|
14
30
|
</SCardText>
|
|
@@ -34,7 +50,7 @@ interface AccountForm {
|
|
|
34
50
|
name: string
|
|
35
51
|
email: string
|
|
36
52
|
role: string | null
|
|
37
|
-
startDate: string
|
|
53
|
+
startDate: string | null
|
|
38
54
|
acceptTerms: boolean
|
|
39
55
|
}
|
|
40
56
|
|
|
@@ -52,14 +68,18 @@ const email = (value: unknown) => (typeof value === 'string' && EMAIL_PATTERN.te
|
|
|
52
68
|
const mustAccept = (value: unknown) => value === true || 'You must accept the terms'
|
|
53
69
|
const formRef = ref<InstanceType<typeof SForm> | null>(null)
|
|
54
70
|
const isSubmitting = ref(false)
|
|
71
|
+
// Kept in sync by SForm (v-model:error): true while any field shows an error.
|
|
72
|
+
const hasErrors = ref(false)
|
|
73
|
+
// The button stays enabled until the first submit, so a user can always try and see why it fails.
|
|
74
|
+
const submitAttempted = ref(false)
|
|
55
75
|
const submittedName = ref('')
|
|
56
|
-
const form = ref<AccountForm>({ name: '', email: '', role: null, startDate:
|
|
76
|
+
const form = ref<AccountForm>({ name: '', email: '', role: null, startDate: null, acceptTerms: false })
|
|
57
77
|
|
|
58
78
|
const submit = async () => {
|
|
59
|
-
|
|
60
|
-
const hasErrors = formRef.value?.validate()
|
|
79
|
+
submitAttempted.value = true
|
|
61
80
|
|
|
62
|
-
|
|
81
|
+
// validate() returns true when the form HAS errors.
|
|
82
|
+
if (formRef.value?.validate()) {
|
|
63
83
|
return
|
|
64
84
|
}
|
|
65
85
|
|
package/dist/sui-api.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"package": "@khsura/sui",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"generatedAt": "2026-11-
|
|
3
|
+
"version": "1.20.0",
|
|
4
|
+
"generatedAt": "2026-11-22T03:01:49.821Z",
|
|
5
5
|
"components": [
|
|
6
6
|
{
|
|
7
7
|
"name": "SAlert",
|
|
@@ -621,6 +621,12 @@
|
|
|
621
621
|
"required": false,
|
|
622
622
|
"description": ""
|
|
623
623
|
},
|
|
624
|
+
{
|
|
625
|
+
"name": "ariaLabel",
|
|
626
|
+
"type": "string | null | undefined",
|
|
627
|
+
"required": false,
|
|
628
|
+
"description": ""
|
|
629
|
+
},
|
|
624
630
|
{
|
|
625
631
|
"name": "autocomplete",
|
|
626
632
|
"type": "string | undefined",
|
|
@@ -634,6 +640,13 @@
|
|
|
634
640
|
"required": false,
|
|
635
641
|
"description": ""
|
|
636
642
|
},
|
|
643
|
+
{
|
|
644
|
+
"name": "clearAriaLabel",
|
|
645
|
+
"type": "string | undefined",
|
|
646
|
+
"required": false,
|
|
647
|
+
"default": "\"Clear\"",
|
|
648
|
+
"description": ""
|
|
649
|
+
},
|
|
637
650
|
{
|
|
638
651
|
"name": "clearable",
|
|
639
652
|
"type": "boolean | undefined",
|
|
@@ -762,6 +775,13 @@
|
|
|
762
775
|
"required": false,
|
|
763
776
|
"description": ""
|
|
764
777
|
},
|
|
778
|
+
{
|
|
779
|
+
"name": "loadingAriaLabel",
|
|
780
|
+
"type": "string | undefined",
|
|
781
|
+
"required": false,
|
|
782
|
+
"default": "\"Loading\"",
|
|
783
|
+
"description": ""
|
|
784
|
+
},
|
|
765
785
|
{
|
|
766
786
|
"name": "location",
|
|
767
787
|
"type": "LocationRaw",
|
|
@@ -1551,7 +1571,7 @@
|
|
|
1551
1571
|
},
|
|
1552
1572
|
{
|
|
1553
1573
|
"name": "to",
|
|
1554
|
-
"type": "
|
|
1574
|
+
"type": "LinkLocation | null | undefined",
|
|
1555
1575
|
"required": false,
|
|
1556
1576
|
"description": ""
|
|
1557
1577
|
},
|
|
@@ -2118,7 +2138,7 @@
|
|
|
2118
2138
|
},
|
|
2119
2139
|
{
|
|
2120
2140
|
"name": "to",
|
|
2121
|
-
"type": "
|
|
2141
|
+
"type": "LinkLocation | null | undefined",
|
|
2122
2142
|
"required": false,
|
|
2123
2143
|
"description": ""
|
|
2124
2144
|
},
|
|
@@ -4685,6 +4705,20 @@
|
|
|
4685
4705
|
"slots": [],
|
|
4686
4706
|
"events": []
|
|
4687
4707
|
},
|
|
4708
|
+
{
|
|
4709
|
+
"name": "SFormRow",
|
|
4710
|
+
"family": "form",
|
|
4711
|
+
"file": "components/form/sFormRow.vue",
|
|
4712
|
+
"props": [],
|
|
4713
|
+
"slots": [
|
|
4714
|
+
{
|
|
4715
|
+
"name": "default",
|
|
4716
|
+
"type": "any",
|
|
4717
|
+
"description": "The fields and buttons of the row."
|
|
4718
|
+
}
|
|
4719
|
+
],
|
|
4720
|
+
"events": []
|
|
4721
|
+
},
|
|
4688
4722
|
{
|
|
4689
4723
|
"name": "SIcon",
|
|
4690
4724
|
"family": "core",
|
|
@@ -4845,6 +4879,12 @@
|
|
|
4845
4879
|
"required": false,
|
|
4846
4880
|
"description": ""
|
|
4847
4881
|
},
|
|
4882
|
+
{
|
|
4883
|
+
"name": "ariaLabel",
|
|
4884
|
+
"type": "string | undefined",
|
|
4885
|
+
"required": false,
|
|
4886
|
+
"description": ""
|
|
4887
|
+
},
|
|
4848
4888
|
{
|
|
4849
4889
|
"name": "ariaLabelledby",
|
|
4850
4890
|
"type": "string | undefined",
|
|
@@ -5384,7 +5424,7 @@
|
|
|
5384
5424
|
},
|
|
5385
5425
|
{
|
|
5386
5426
|
"name": "to",
|
|
5387
|
-
"type": "
|
|
5427
|
+
"type": "LinkLocation | null | undefined",
|
|
5388
5428
|
"required": false,
|
|
5389
5429
|
"description": ""
|
|
5390
5430
|
}
|
|
@@ -6128,6 +6168,13 @@
|
|
|
6128
6168
|
"family": "progress",
|
|
6129
6169
|
"file": "components/progress/sProgressCircular.vue",
|
|
6130
6170
|
"props": [
|
|
6171
|
+
{
|
|
6172
|
+
"name": "ariaLabel",
|
|
6173
|
+
"type": "string | undefined",
|
|
6174
|
+
"required": false,
|
|
6175
|
+
"default": "\"Loading\"",
|
|
6176
|
+
"description": "Accessible name of the progress bar. Defaults to `'Loading'`; name what is loading when you can."
|
|
6177
|
+
},
|
|
6131
6178
|
{
|
|
6132
6179
|
"name": "color",
|
|
6133
6180
|
"type": "string | null | undefined",
|
|
@@ -6192,6 +6239,13 @@
|
|
|
6192
6239
|
"family": "progress",
|
|
6193
6240
|
"file": "components/progress/sProgressLinear.vue",
|
|
6194
6241
|
"props": [
|
|
6242
|
+
{
|
|
6243
|
+
"name": "ariaLabel",
|
|
6244
|
+
"type": "string | undefined",
|
|
6245
|
+
"required": false,
|
|
6246
|
+
"default": "\"Loading\"",
|
|
6247
|
+
"description": "Accessible name of the progress bar. Defaults to `'Loading'`; name what is loading when you can."
|
|
6248
|
+
},
|
|
6195
6249
|
{
|
|
6196
6250
|
"name": "backgroundColor",
|
|
6197
6251
|
"type": "string | null | undefined",
|
|
@@ -6264,6 +6318,12 @@
|
|
|
6264
6318
|
"required": false,
|
|
6265
6319
|
"description": ""
|
|
6266
6320
|
},
|
|
6321
|
+
{
|
|
6322
|
+
"name": "ariaLabel",
|
|
6323
|
+
"type": "string | null | undefined",
|
|
6324
|
+
"required": false,
|
|
6325
|
+
"description": "Accessible name for a radio without a visible `label` (for example an icon-only option)."
|
|
6326
|
+
},
|
|
6267
6327
|
{
|
|
6268
6328
|
"name": "borderRadius",
|
|
6269
6329
|
"type": "number | \"tile\" | \"rounded\" | `${number}em` | `${number}px` | `${number}rem` | `${number}%` | `${number}vh` | `${number}vw` | null | undefined",
|
|
@@ -6599,6 +6659,12 @@
|
|
|
6599
6659
|
"required": false,
|
|
6600
6660
|
"description": ""
|
|
6601
6661
|
},
|
|
6662
|
+
{
|
|
6663
|
+
"name": "ariaLabel",
|
|
6664
|
+
"type": "string | null | undefined",
|
|
6665
|
+
"required": false,
|
|
6666
|
+
"description": "Accessible name when there is no visible `label` (otherwise the label names the field)."
|
|
6667
|
+
},
|
|
6602
6668
|
{
|
|
6603
6669
|
"name": "borderRadius",
|
|
6604
6670
|
"type": "number | \"tile\" | \"rounded\" | `${number}em` | `${number}px` | `${number}rem` | `${number}%` | `${number}vh` | `${number}vw` | null | undefined",
|
|
@@ -6783,8 +6849,15 @@
|
|
|
6783
6849
|
"name": "outlined",
|
|
6784
6850
|
"type": "boolean | null | undefined",
|
|
6785
6851
|
"required": false,
|
|
6852
|
+
"default": "true",
|
|
6786
6853
|
"description": ""
|
|
6787
6854
|
},
|
|
6855
|
+
{
|
|
6856
|
+
"name": "placeholder",
|
|
6857
|
+
"type": "string | null | undefined",
|
|
6858
|
+
"required": false,
|
|
6859
|
+
"description": "Text shown in the field while nothing is selected. The label is never repeated inside the field."
|
|
6860
|
+
},
|
|
6788
6861
|
{
|
|
6789
6862
|
"name": "position",
|
|
6790
6863
|
"type": "Position",
|
|
@@ -7172,6 +7245,20 @@
|
|
|
7172
7245
|
"required": false,
|
|
7173
7246
|
"description": ""
|
|
7174
7247
|
},
|
|
7248
|
+
{
|
|
7249
|
+
"name": "nextAriaLabel",
|
|
7250
|
+
"type": "string | undefined",
|
|
7251
|
+
"required": false,
|
|
7252
|
+
"default": "\"Next\"",
|
|
7253
|
+
"description": "Accessible name of the next arrow button. Defaults to `'Next'`."
|
|
7254
|
+
},
|
|
7255
|
+
{
|
|
7256
|
+
"name": "prevAriaLabel",
|
|
7257
|
+
"type": "string | undefined",
|
|
7258
|
+
"required": false,
|
|
7259
|
+
"default": "\"Previous\"",
|
|
7260
|
+
"description": "Accessible name of the previous arrow button. Defaults to `'Previous'`."
|
|
7261
|
+
},
|
|
7175
7262
|
{
|
|
7176
7263
|
"name": "scrollable",
|
|
7177
7264
|
"type": "boolean | null | undefined",
|
|
@@ -8113,6 +8200,12 @@
|
|
|
8113
8200
|
"required": false,
|
|
8114
8201
|
"description": ""
|
|
8115
8202
|
},
|
|
8203
|
+
{
|
|
8204
|
+
"name": "loadingText",
|
|
8205
|
+
"type": "string | undefined",
|
|
8206
|
+
"required": false,
|
|
8207
|
+
"description": ""
|
|
8208
|
+
},
|
|
8116
8209
|
{
|
|
8117
8210
|
"name": "multiSort",
|
|
8118
8211
|
"type": "boolean | undefined",
|
|
@@ -8254,6 +8347,11 @@
|
|
|
8254
8347
|
"type": "any",
|
|
8255
8348
|
"description": "Label of the items-per-page selector in the pagination."
|
|
8256
8349
|
},
|
|
8350
|
+
{
|
|
8351
|
+
"name": "loadingData",
|
|
8352
|
+
"type": "any",
|
|
8353
|
+
"description": "Shown instead of the rows while `loading` is set and `items` is still empty."
|
|
8354
|
+
},
|
|
8257
8355
|
{
|
|
8258
8356
|
"name": "noData",
|
|
8259
8357
|
"type": "any",
|
|
@@ -8495,6 +8593,12 @@
|
|
|
8495
8593
|
"family": "form",
|
|
8496
8594
|
"file": "components/form/sTextarea.vue",
|
|
8497
8595
|
"props": [
|
|
8596
|
+
{
|
|
8597
|
+
"name": "ariaLabel",
|
|
8598
|
+
"type": "string | undefined",
|
|
8599
|
+
"required": false,
|
|
8600
|
+
"description": ""
|
|
8601
|
+
},
|
|
8498
8602
|
{
|
|
8499
8603
|
"name": "ariaLabelledby",
|
|
8500
8604
|
"type": "string | undefined",
|
|
@@ -8536,6 +8640,12 @@
|
|
|
8536
8640
|
"default": "20",
|
|
8537
8641
|
"description": ""
|
|
8538
8642
|
},
|
|
8643
|
+
{
|
|
8644
|
+
"name": "counter",
|
|
8645
|
+
"type": "boolean | undefined",
|
|
8646
|
+
"required": false,
|
|
8647
|
+
"description": "Shows the character count (`12 / 200` with `maxlength`) at the right of the error line, right under the field."
|
|
8648
|
+
},
|
|
8539
8649
|
{
|
|
8540
8650
|
"name": "dense",
|
|
8541
8651
|
"type": "boolean | undefined",
|