@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
|
@@ -18,7 +18,7 @@ Shared form-input props (`SInput`, `STextarea`, `SSelect`, `SCheckbox`, `SRadioG
|
|
|
18
18
|
| `rules` | `FormInputModelValueRule[]` | `undefined` | `(value) => true \| string` — a string is the error message |
|
|
19
19
|
| `id` | `string` | auto/`undefined` | Element id |
|
|
20
20
|
| `disabled` / `readonly` | `boolean \| null` | `undefined` | Disabled inputs show no errors |
|
|
21
|
-
| `hideDetails` | `boolean` | `undefined` | Hide label + error area |
|
|
21
|
+
| `hideDetails` | `boolean` | `undefined` | Hide the label above the field + error area (`SCheckbox` / `SRadio` keep their own label) |
|
|
22
22
|
| `hideError` | `boolean` | `undefined` | Hide only the error message |
|
|
23
23
|
| `error` / `dirty` | `boolean` | `undefined` | Typed; `dirty` only syncs the internal flag — neither triggers validation |
|
|
24
24
|
|
|
@@ -33,7 +33,9 @@ Shared events: `update:error` (`boolean`), `update:errors` (`string[]`), `update
|
|
|
33
33
|
|
|
34
34
|
## SForm
|
|
35
35
|
|
|
36
|
-
Renders a native `<form>` and collects child inputs.
|
|
36
|
+
Renders a native `<form novalidate>` and collects child inputs. Native browser validation is off, so `type="email"` / `required` never show the browser bubble over the SUI error; validate with `rules`. `:novalidate="false"` turns it back on. Before 1.20.0 `SForm` did not add `novalidate`; add it yourself there.
|
|
37
|
+
|
|
38
|
+
Every validated field reserves one error line under itself. For an action row (field + button: search bar, filter bar) use `SFormRow` (below), never a plain flex `<div>`, where the button lines up with the label. Field labels are inset 16px to line up with the value text inside the field.
|
|
37
39
|
|
|
38
40
|
| Model | Type | Description |
|
|
39
41
|
|-------|------|-------------|
|
|
@@ -77,6 +79,42 @@ Exposed: `validate(): boolean` — **returns `true` when there ARE errors**; `re
|
|
|
77
79
|
|
|
78
80
|
---
|
|
79
81
|
|
|
82
|
+
## SFormRow
|
|
83
|
+
|
|
84
|
+
*Since 1.20.0.* A wrapping row of text fields (`SInput`, `SNumberInput` since 1.21.0, `SSelect`, `SDatePickerInput`, `SAutocomplete`, `STextarea`) and their buttons. Each button's top and bottom match the field box: with or without a label, while an error shows, and when the row wraps at 375px. No props; slot `default`.
|
|
85
|
+
|
|
86
|
+
<!-- generated:api:start SFormRow -->
|
|
87
|
+
<!-- Generated from sui-api.json by `yarn sync:skills` (packages/app). Do not edit by hand. -->
|
|
88
|
+
|
|
89
|
+
**SFormRow props**
|
|
90
|
+
|
|
91
|
+
None.
|
|
92
|
+
|
|
93
|
+
**SFormRow slots**
|
|
94
|
+
|
|
95
|
+
| Slot | Slot props | Description |
|
|
96
|
+
| --- | --- | --- |
|
|
97
|
+
| `default` | `any` | The fields and buttons of the row. |
|
|
98
|
+
|
|
99
|
+
**SFormRow events**
|
|
100
|
+
|
|
101
|
+
None.
|
|
102
|
+
|
|
103
|
+
<!-- generated:api:end SFormRow -->
|
|
104
|
+
|
|
105
|
+
```vue
|
|
106
|
+
<SFormRow>
|
|
107
|
+
<SDatePickerInput v-model="from" label="From" />
|
|
108
|
+
<SSelect v-model="status" label="Status" :items="statuses" />
|
|
109
|
+
<SButton color="primary" @click="apply">Apply</SButton>
|
|
110
|
+
</SFormRow>
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
- `SInput` / `STextarea` / `SAutocomplete` (and `grow` `SSelect`, `block` `SDatePickerInput`) share the free width; `SSelect` / `SDatePickerInput` otherwise keep their own width; buttons keep theirs; the row wraps when they don't fit. Each field keeps its error line; buttons reserve the same space, so wrapped lines and the next row keep their gap.
|
|
114
|
+
- Don't mix a `simple` field into it (its label is shorter). Before 1.20.0 there is no `SFormRow`: put `hide-details` on the field in a flex row.
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
80
118
|
## SInput
|
|
81
119
|
|
|
82
120
|
<!-- generated:api:start SInput -->
|
|
@@ -88,8 +126,9 @@ Exposed: `validate(): boolean` — **returns `true` when there ARE errors**; `re
|
|
|
88
126
|
| --- | --- | --- | --- | --- |
|
|
89
127
|
| `allowDecimal` | `boolean \| null` | — | no | — |
|
|
90
128
|
| `appendOuter` | `string \| null` | — | no | — |
|
|
129
|
+
| `ariaLabel` | `string` | — | no | — |
|
|
91
130
|
| `ariaLabelledby` | `string` | — | no | — |
|
|
92
|
-
| `autocapitalize` | `"
|
|
131
|
+
| `autocapitalize` | `"off" \| "on" \| null` | — | no | `off`, `on` |
|
|
93
132
|
| `autocomplete` | `string \| null` | — | no | — |
|
|
94
133
|
| `autofocus` | `boolean \| null` | — | no | — |
|
|
95
134
|
| `dense` | `boolean` | — | no | — |
|
|
@@ -103,10 +142,10 @@ Exposed: `validate(): boolean` — **returns `true` when there ARE errors**; `re
|
|
|
103
142
|
| `inputmode` | `InputModeTypeText \| null` | — | no | `decimal`, `email`, `none`, `numeric`, `search`, `tel`, `text`, `url` |
|
|
104
143
|
| `isPasteDisabled` | `boolean` | — | no | — |
|
|
105
144
|
| `label` | `string \| null` | — | no | — |
|
|
106
|
-
| `max` | `
|
|
107
|
-
| `maxlength` | `
|
|
108
|
-
| `min` | `
|
|
109
|
-
| `minlength` | `
|
|
145
|
+
| `max` | `number \| string \| null` | — | no | — |
|
|
146
|
+
| `maxlength` | `number \| string \| null` | — | no | — |
|
|
147
|
+
| `min` | `number \| string \| null` | — | no | — |
|
|
148
|
+
| `minlength` | `number \| string \| null` | — | no | — |
|
|
110
149
|
| `modelValue` | `T \| null` | — | no | — |
|
|
111
150
|
| `name` | `string` | — | no | — |
|
|
112
151
|
| `pattern` | `string \| null` | — | no | — |
|
|
@@ -171,44 +210,46 @@ Model: `v-model` — `string | number | null`. Slots: `suffix`, `appendOuter` (n
|
|
|
171
210
|
|
|
172
211
|
## STextarea
|
|
173
212
|
|
|
174
|
-
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()`.
|
|
213
|
+
Props: `label`, `placeholder`, `rows` (default `2`), `cols` (default `20`), **`autogrow`** (not `autoGrow`), `resize` (default off → `resize: none`), **`counter`** (character count at the right of the error line; `12 / 200` with `maxlength`), `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()`.
|
|
175
214
|
|
|
176
215
|
<!-- generated:api:start STextarea -->
|
|
177
216
|
<!-- Generated from sui-api.json by `yarn sync:skills` (packages/app). Do not edit by hand. -->
|
|
178
217
|
|
|
179
218
|
**STextarea props**
|
|
180
219
|
|
|
181
|
-
| Prop | Type | Default | Required | Values |
|
|
182
|
-
| --- | --- | --- | --- | --- |
|
|
183
|
-
| `
|
|
184
|
-
| `
|
|
185
|
-
| `
|
|
186
|
-
| `
|
|
187
|
-
| `
|
|
188
|
-
| `
|
|
189
|
-
| `
|
|
190
|
-
| `
|
|
191
|
-
| `
|
|
192
|
-
| `
|
|
193
|
-
| `
|
|
194
|
-
| `
|
|
195
|
-
| `
|
|
196
|
-
| `
|
|
197
|
-
| `
|
|
198
|
-
| `
|
|
199
|
-
| `
|
|
200
|
-
| `
|
|
201
|
-
| `
|
|
202
|
-
| `
|
|
203
|
-
| `
|
|
204
|
-
| `
|
|
205
|
-
| `
|
|
206
|
-
| `
|
|
207
|
-
| `
|
|
208
|
-
| `
|
|
209
|
-
| `
|
|
210
|
-
| `
|
|
211
|
-
| `
|
|
220
|
+
| Prop | Type | Default | Required | Values | Description |
|
|
221
|
+
| --- | --- | --- | --- | --- | --- |
|
|
222
|
+
| `ariaLabel` | `string` | — | no | — | — |
|
|
223
|
+
| `ariaLabelledby` | `string` | — | no | — | — |
|
|
224
|
+
| `autocapitalize` | `"off" \| "on"` | — | no | `off`, `on` | — |
|
|
225
|
+
| `autocomplete` | `string` | — | no | — | — |
|
|
226
|
+
| `autofocus` | `boolean` | — | no | — | — |
|
|
227
|
+
| `autogrow` | `boolean` | — | no | — | — |
|
|
228
|
+
| `cols` | `number` | `20` | no | — | — |
|
|
229
|
+
| `counter` | `boolean` | — | no | — | Shows the character count (`12 / 200` with `maxlength`) at the right of the error line, right under the field. |
|
|
230
|
+
| `dense` | `boolean` | — | no | — | — |
|
|
231
|
+
| `dirty` | `boolean` | — | no | — | — |
|
|
232
|
+
| `disabled` | `boolean \| null` | — | no | — | — |
|
|
233
|
+
| `error` | `boolean` | — | no | — | — |
|
|
234
|
+
| `hideDetails` | `boolean` | — | no | — | — |
|
|
235
|
+
| `hideError` | `boolean` | — | no | — | — |
|
|
236
|
+
| `id` | `string` | — | no | — | — |
|
|
237
|
+
| `inputBackground` | `string` | — | no | — | — |
|
|
238
|
+
| `label` | `string` | — | no | — | — |
|
|
239
|
+
| `maxlength` | `number \| string` | — | no | — | — |
|
|
240
|
+
| `minlength` | `number \| string` | — | no | — | — |
|
|
241
|
+
| `modelValue` | `string` | `""` | no | — | — |
|
|
242
|
+
| `name` | `string` | — | no | — | — |
|
|
243
|
+
| `placeholder` | `string` | — | no | — | — |
|
|
244
|
+
| `placeholderBackground` | `string` | — | no | — | — |
|
|
245
|
+
| `readonly` | `boolean \| null` | — | no | — | — |
|
|
246
|
+
| `resize` | `boolean` | — | no | — | — |
|
|
247
|
+
| `rows` | `number` | `2` | no | — | — |
|
|
248
|
+
| `rules` | `FormInputModelValueRule[]` | — | no | — | — |
|
|
249
|
+
| `simple` | `boolean` | — | no | — | — |
|
|
250
|
+
| `size` | `SizePropertyType` | — | no | `default`, `extra`, `large`, `mini`, `small` | — |
|
|
251
|
+
| `spellcheck` | `boolean` | — | no | — | — |
|
|
252
|
+
| `tile` | `boolean` | — | no | — | — |
|
|
212
253
|
|
|
213
254
|
**STextarea slots**
|
|
214
255
|
|
|
@@ -241,56 +282,60 @@ Single-value dropdown (no `multiple`, `chips`, `clearable` or `placeholder` —
|
|
|
241
282
|
|
|
242
283
|
**SSelect props**
|
|
243
284
|
|
|
244
|
-
| Prop | Type | Default | Required | Values |
|
|
245
|
-
| --- | --- | --- | --- | --- |
|
|
246
|
-
| `activator` | `string \|
|
|
247
|
-
| `
|
|
248
|
-
| `
|
|
249
|
-
| `
|
|
250
|
-
| `
|
|
251
|
-
| `
|
|
252
|
-
| `
|
|
253
|
-
| `
|
|
254
|
-
| `
|
|
255
|
-
| `
|
|
256
|
-
| `
|
|
257
|
-
| `
|
|
258
|
-
| `
|
|
259
|
-
| `
|
|
260
|
-
| `
|
|
261
|
-
| `
|
|
262
|
-
| `
|
|
263
|
-
| `
|
|
264
|
-
| `
|
|
265
|
-
| `
|
|
266
|
-
| `
|
|
267
|
-
| `
|
|
268
|
-
| `
|
|
269
|
-
| `
|
|
270
|
-
| `
|
|
271
|
-
| `
|
|
272
|
-
| `
|
|
273
|
-
| `
|
|
274
|
-
| `
|
|
275
|
-
| `
|
|
276
|
-
| `
|
|
277
|
-
| `
|
|
278
|
-
| `
|
|
279
|
-
| `
|
|
280
|
-
| `
|
|
281
|
-
| `
|
|
282
|
-
| `
|
|
283
|
-
| `
|
|
284
|
-
| `
|
|
285
|
-
| `
|
|
286
|
-
| `
|
|
285
|
+
| Prop | Type | Default | Required | Values | Description |
|
|
286
|
+
| --- | --- | --- | --- | --- | --- |
|
|
287
|
+
| `activator` | `string \| ComponentPublicInstance \| HTMLElement \| null` | — | no | — | — |
|
|
288
|
+
| `ariaLabel` | `string \| null` | — | no | — | Accessible name when there is no visible `label` (otherwise the label names the field). |
|
|
289
|
+
| `borderRadius` | `` number \| "rounded" \| "tile" \| `${number}%` \| `${number}em` \| `${number}px` \| `${number}rem` \| `${number}vh` \| `${number}vw` \| null `` | — | no | — | — |
|
|
290
|
+
| `closeOnClick` | `boolean` | — | no | — | — |
|
|
291
|
+
| `closeOnContentClick` | `boolean` | — | no | — | — |
|
|
292
|
+
| `closeOnScroll` | `boolean` | — | no | — | — |
|
|
293
|
+
| `color` | `string` | — | no | — | — |
|
|
294
|
+
| `colorThreshold` | `number` | — | no | — | — |
|
|
295
|
+
| `contentClass` | `string \| Record<string, boolean> \| string[]` | — | no | — | — |
|
|
296
|
+
| `contentStyle` | `StyleValue` | — | no | — | — |
|
|
297
|
+
| `dense` | `boolean` | — | no | — | — |
|
|
298
|
+
| `dirty` | `boolean` | — | no | — | — |
|
|
299
|
+
| `disabled` | `boolean \| null` | — | no | — | — |
|
|
300
|
+
| `divided` | `boolean` | — | no | — | — |
|
|
301
|
+
| `error` | `boolean` | — | no | — | — |
|
|
302
|
+
| `grow` | `boolean` | — | no | — | — |
|
|
303
|
+
| `height` | `number \| string \| null` | — | no | — | — |
|
|
304
|
+
| `hideDetails` | `boolean` | — | no | — | — |
|
|
305
|
+
| `hideError` | `boolean` | — | no | — | — |
|
|
306
|
+
| `id` | `string` | — | no | — | — |
|
|
307
|
+
| `items` | `(string \| SelectItem \| null \| undefined)[]` | — | no | — | — |
|
|
308
|
+
| `label` | `string \| null` | — | no | — | — |
|
|
309
|
+
| `location` | `LocationRaw` | — | no | — | — |
|
|
310
|
+
| `maxHeight` | `number \| string \| null` | — | no | — | — |
|
|
311
|
+
| `maxWidth` | `number \| string \| null` | — | no | — | — |
|
|
312
|
+
| `menu` | `boolean` | — | no | — | — |
|
|
313
|
+
| `minHeight` | `number \| string \| null` | — | no | — | — |
|
|
314
|
+
| `minWidth` | `number \| string \| null` | — | no | — | — |
|
|
315
|
+
| `modelValue` | `T \| null` | — | no | — | — |
|
|
316
|
+
| `name` | `string \| null` | — | no | — | — |
|
|
317
|
+
| `noDataText` | `string` | — | no | — | Message shown in the open menu when `items` is empty. Without it (and without the `noData` slot) an empty menu stays blank. Put an `SEmptyState` in the `noData` slot for an icon or an action. |
|
|
318
|
+
| `offsetX` | `number \| null` | — | no | — | — |
|
|
319
|
+
| `offsetY` | `number \| null` | — | no | — | — |
|
|
320
|
+
| `outlined` | `boolean \| null` | `true` | no | — | — |
|
|
321
|
+
| `placeholder` | `string \| null` | — | no | — | Text shown in the field while nothing is selected. The label is never repeated inside the field. |
|
|
322
|
+
| `position` | `Position` | — | no | `absolute`, `fixed`, `relative`, `static`, `sticky` | — |
|
|
323
|
+
| `preventCloseOnClick` | `boolean` | — | no | — | — |
|
|
324
|
+
| `readonly` | `boolean \| null` | — | no | — | — |
|
|
325
|
+
| `rules` | `FormInputModelValueRule[]` | — | no | — | — |
|
|
326
|
+
| `screenPadding` | `number \| null` | — | no | — | — |
|
|
327
|
+
| `text` | `boolean` | — | no | — | — |
|
|
328
|
+
| `theme` | `AppThemeType` | — | no | `dark`, `light` | — |
|
|
329
|
+
| `underlined` | `boolean \| null` | — | no | — | — |
|
|
330
|
+
| `width` | `number \| string \| null` | — | no | — | — |
|
|
287
331
|
|
|
288
332
|
**SSelect slots**
|
|
289
333
|
|
|
290
|
-
| Slot | Slot props |
|
|
291
|
-
| --- | --- |
|
|
292
|
-
| `activator` | `{ item: SelectItem \| null; value: boolean \| undefined; }` |
|
|
293
|
-
| `dropdownIcon` | `{ color: string \| undefined; value: boolean \| undefined; }` |
|
|
334
|
+
| Slot | Slot props | Description |
|
|
335
|
+
| --- | --- | --- |
|
|
336
|
+
| `activator` | `{ item: SelectItem \| null; value: boolean \| undefined; }` | Replaces the selected item's text in the field. |
|
|
337
|
+
| `dropdownIcon` | `{ color: string \| undefined; value: boolean \| undefined; }` | Replaces the chevron icon. |
|
|
338
|
+
| `noData` | `any` | Replaces `noDataText` when `items` is empty, such as an `SEmptyState`. |
|
|
294
339
|
|
|
295
340
|
**SSelect events**
|
|
296
341
|
|
|
@@ -308,11 +353,14 @@ Single-value dropdown (no `multiple`, `chips`, `clearable` or `placeholder` —
|
|
|
308
353
|
**SSelect notes**
|
|
309
354
|
|
|
310
355
|
- `items`: Options
|
|
311
|
-
- `label`: Label above
|
|
356
|
+
- `label`: Label above the field (never repeated inside it)
|
|
357
|
+
- `placeholder`: Text shown in the field while nothing is selected
|
|
358
|
+
- Width: as wide as the longest option or placeholder, like a native select; a long selection is clipped with an ellipsis; a long option in the list stays on one line with an ellipsis and its full text in `title`
|
|
312
359
|
- `name`: Name of a hidden native `<select>`
|
|
313
360
|
- `dense` / `grow` / `text` / `divided`: Compact / full width / text list style / list dividers
|
|
314
361
|
- `color`: List color
|
|
315
|
-
- `outlined
|
|
362
|
+
- `outlined`: default **`true`** (matches `SInput`); `:outlined="false"` for the borderless, shadowed look
|
|
363
|
+
- `underlined` / `borderRadius`: Activator border
|
|
316
364
|
- `location`, `offsetX`, `offsetY`, …: Dropdown positioning
|
|
317
365
|
|
|
318
366
|
```ts
|
|
@@ -323,7 +371,7 @@ Model: `v-model` — `string | number | null`; `v-model:menu` — open state. Sl
|
|
|
323
371
|
|
|
324
372
|
## SCheckbox
|
|
325
373
|
|
|
326
|
-
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.
|
|
374
|
+
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. The error line sits under the box; `hideDetails` removes only the error area, never the label.
|
|
327
375
|
|
|
328
376
|
<!-- generated:api:start SCheckbox -->
|
|
329
377
|
<!-- Generated from sui-api.json by `yarn sync:skills` (packages/app). Do not edit by hand. -->
|
|
@@ -367,7 +415,7 @@ None.
|
|
|
367
415
|
|
|
368
416
|
## SRadioGroup / SRadio
|
|
369
417
|
|
|
370
|
-
Options are **`SRadio` children** — there is no `items` prop.
|
|
418
|
+
Options are **`SRadio` children** — there is no `items` prop. Long option labels wrap; the group's `hideDetails` removes only its error area (labels stay). Options have no background (before 1.20.0 a group with no value showed grey chips behind its options).
|
|
371
419
|
|
|
372
420
|
`SRadioGroup` props: `name`, `column`, `grow`, `color` (preset name), `mandatory`, `outlined` / `underlined` / `borderRadius` + shared. Model: `string | number | boolean`. Events: `change` + shared.
|
|
373
421
|
|
|
@@ -380,7 +428,7 @@ Options are **`SRadio` children** — there is no `items` prop.
|
|
|
380
428
|
|
|
381
429
|
| Prop | Type | Default | Required | Values |
|
|
382
430
|
| --- | --- | --- | --- | --- |
|
|
383
|
-
| `borderRadius` | `` number \| "
|
|
431
|
+
| `borderRadius` | `` number \| "rounded" \| "tile" \| `${number}%` \| `${number}em` \| `${number}px` \| `${number}rem` \| `${number}vh` \| `${number}vw` \| null `` | — | no | — |
|
|
384
432
|
| `color` | `string \| null` | — | no | — |
|
|
385
433
|
| `column` | `boolean \| null` | — | no | — |
|
|
386
434
|
| `continuous` | `boolean` | — | no | — |
|
|
@@ -423,20 +471,21 @@ Options are **`SRadio` children** — there is no `items` prop.
|
|
|
423
471
|
|
|
424
472
|
**SRadio props**
|
|
425
473
|
|
|
426
|
-
| Prop | Type | Default | Required | Values |
|
|
427
|
-
| --- | --- | --- | --- | --- |
|
|
428
|
-
| `activeClass` | `string \| null` | — | no | — |
|
|
429
|
-
| `
|
|
430
|
-
| `
|
|
431
|
-
| `
|
|
432
|
-
| `
|
|
433
|
-
| `
|
|
434
|
-
| `
|
|
435
|
-
| `
|
|
436
|
-
| `
|
|
437
|
-
| `
|
|
438
|
-
| `
|
|
439
|
-
| `
|
|
474
|
+
| Prop | Type | Default | Required | Values | Description |
|
|
475
|
+
| --- | --- | --- | --- | --- | --- |
|
|
476
|
+
| `activeClass` | `string \| null` | — | no | — | — |
|
|
477
|
+
| `ariaLabel` | `string \| null` | — | no | — | Accessible name for a radio without a visible `label` (for example an icon-only option). |
|
|
478
|
+
| `borderRadius` | `` number \| "rounded" \| "tile" \| `${number}%` \| `${number}em` \| `${number}px` \| `${number}rem` \| `${number}vh` \| `${number}vw` \| null `` | — | no | — | — |
|
|
479
|
+
| `disabled` | `boolean \| null` | — | no | — | — |
|
|
480
|
+
| `id` | `string` | — | no | — | — |
|
|
481
|
+
| `label` | `string \| null` | — | no | — | — |
|
|
482
|
+
| `name` | `string \| null` | — | no | — | — |
|
|
483
|
+
| `outlined` | `boolean \| null` | — | no | — | — |
|
|
484
|
+
| `readonly` | `boolean \| null` | — | no | — | — |
|
|
485
|
+
| `selected` | `boolean` | — | no | — | — |
|
|
486
|
+
| `type` | `ButtonTypeType` | — | no | `button`, `reset`, `submit` | — |
|
|
487
|
+
| `underlined` | `boolean \| null` | — | no | — | — |
|
|
488
|
+
| `value` | `boolean \| number \| string` | — | no | — | — |
|
|
440
489
|
|
|
441
490
|
**SRadio slots**
|
|
442
491
|
|
|
@@ -573,3 +622,4 @@ const submit = () => {
|
|
|
573
622
|
|
|
574
623
|
- `SRadioGroup` without `mandatory`: clicking the selected radio clears the value.
|
|
575
624
|
- `SSelect` validates when its menu opens, so a required error can appear on first open.
|
|
625
|
+
- `SSelect` / `SAutocomplete` / `SDatePickerInput` dropdowns flip or shift to stay 8px inside the viewport — no wrapper, padding or `location` workaround needed for fields at the bottom or right edge.
|
|
@@ -15,15 +15,15 @@ Types: `node_modules/@khsura/sui/@types/definitions/props/propsImage.d.ts`
|
|
|
15
15
|
| --- | --- | --- | --- | --- |
|
|
16
16
|
| `alt` | `string \| null` | — | no | — |
|
|
17
17
|
| `aspectRatio` | `number \| null` | — | no | — |
|
|
18
|
-
| `height` | `
|
|
18
|
+
| `height` | `number \| string \| null` | — | no | — |
|
|
19
19
|
| `lazyLoad` | `LazyLoad \| null` | — | no | — |
|
|
20
|
-
| `maxHeight` | `
|
|
21
|
-
| `maxWidth` | `
|
|
22
|
-
| `minHeight` | `
|
|
23
|
-
| `minWidth` | `
|
|
24
|
-
| `objectFit` | `"
|
|
20
|
+
| `maxHeight` | `number \| string \| null` | — | no | — |
|
|
21
|
+
| `maxWidth` | `number \| string \| null` | — | no | — |
|
|
22
|
+
| `minHeight` | `number \| string \| null` | — | no | — |
|
|
23
|
+
| `minWidth` | `number \| string \| null` | — | no | — |
|
|
24
|
+
| `objectFit` | `"contain" \| "cover" \| "fill" \| "none" \| "scale-down"` | — | no | `contain`, `cover`, `fill`, `none`, `scale-down` |
|
|
25
25
|
| `src` | `string \| null` | — | yes | — |
|
|
26
|
-
| `width` | `
|
|
26
|
+
| `width` | `number \| string \| null` | — | no | — |
|
|
27
27
|
|
|
28
28
|
**SImage slots**
|
|
29
29
|
|
|
@@ -57,7 +57,7 @@ None.
|
|
|
57
57
|
<!-- 16:9 cover -->
|
|
58
58
|
<SImage src="/banner.jpg" :aspect-ratio="16/9" object-fit="cover" />
|
|
59
59
|
|
|
60
|
-
<!-- Square avatar -->
|
|
60
|
+
<!-- Square image (for a user avatar with an initials fallback, use SAvatar) -->
|
|
61
61
|
<SImage src="/avatar.jpg" :aspect-ratio="1" object-fit="cover" :width="80" />
|
|
62
62
|
|
|
63
63
|
<!-- Overlay -->
|
|
@@ -68,9 +68,10 @@ None.
|
|
|
68
68
|
|
|
69
69
|
## Gotchas
|
|
70
70
|
|
|
71
|
-
- The wrapper defaults to `width: 100%; height: 100
|
|
71
|
+
- The wrapper defaults to `width: 100%; height: 100%` (`height: auto` when `aspect-ratio` is set). In a parent with no height, give it `aspect-ratio` or `height`.
|
|
72
72
|
- Use `object-fit="cover"` with `aspect-ratio` to avoid stretching.
|
|
73
|
-
-
|
|
73
|
+
- With `aspect-ratio` and no `height`, the wrapper uses `height: auto`, so the ratio sets its height even in a flex-column card (an equal-height grid). Older versions kept `height: 100%` there and the images in one row got different heights; on those, add `height="auto"`.
|
|
74
|
+
- Without a `src` the wrapper shows a neutral placeholder (the app background colour) instead of a blank gap, so a card with a missing image keeps its shape.
|
|
74
75
|
|
|
75
76
|
| ❌ | ✅ |
|
|
76
77
|
|----|----|
|