@khsura/sui 1.18.3 → 1.20.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/cards/sCardText.vue.d.ts +2 -2
- package/@types/components/datePicker/sDatePickerSwitch.vue.d.ts +2 -0
- package/@types/components/form/index.d.ts +1 -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/sSelect.vue.d.ts +2 -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 +3 -0
- package/@types/components/slideGroup/sSlideGroup.vue.d.ts +4 -1
- package/@types/components/table/sTable.vue.d.ts +17 -96
- package/@types/components/tabs/sTabs.vue.d.ts +2 -2
- package/@types/configs/app.d.ts +4 -0
- package/@types/configs/i18n.d.ts +3 -0
- package/@types/configs/provider.d.ts +1 -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/i18n.d.ts +3 -0
- package/@types/constants/index.d.ts +3 -0
- package/@types/constants/keyboard.d.ts +12 -0
- package/@types/constants/listbox.d.ts +1 -0
- package/@types/constants/overlay.d.ts +5 -0
- package/@types/constants/tabs.d.ts +4 -0
- package/@types/definitions/props/core/propsLink.d.ts +2 -2
- package/@types/definitions/props/propsAutocomplete.d.ts +6 -0
- package/@types/definitions/props/propsInput.d.ts +1 -0
- package/@types/definitions/props/propsLink.d.ts +2 -2
- package/@types/definitions/props/propsProgressCircular.d.ts +2 -0
- package/@types/definitions/props/propsProgressLinear.d.ts +2 -0
- package/@types/definitions/props/propsSelect.d.ts +4 -0
- package/@types/definitions/props/propsSlideGroup.d.ts +4 -0
- package/@types/definitions/props/propsTable.d.ts +1 -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/lib/color.d.ts +21 -2
- package/@types/lib/index.d.ts +4 -0
- package/@types/lib/linkLocation.d.ts +9 -0
- package/@types/lib/overlayPlacement.d.ts +11 -0
- package/@types/lib/revealInScroller.d.ts +11 -0
- package/@types/lib/safeArea.d.ts +3 -0
- package/@types/playwright.visual.config.d.ts +3 -0
- package/@types/services/backgroundScrollService.d.ts +8 -2
- 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 +7 -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/routerLinkService.d.ts +19 -0
- package/@types/services/scrollableFocusService.d.ts +10 -0
- package/@types/services/surfaceTextColorService.d.ts +8 -0
- package/@types/services/tabsService.d.ts +9 -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/index.d.ts +2 -0
- package/@types/types/link.d.ts +20 -0
- package/@types/types/menu.d.ts +17 -0
- package/@types/types/safeArea.d.ts +1 -0
- package/@types/types/table.d.ts +45 -0
- package/@types/vite.config.d.ts +1 -0
- package/README.md +22 -31
- package/dist/base.css.map +1 -1
- package/dist/s-ui.css +1 -1
- package/dist/s-ui.js +3122 -2478
- package/dist/s-ui.umd.cjs +1 -1
- 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 +1 -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 +10128 -0
- package/package.json +30 -6
- package/sui-plugin/.claude-plugin/plugin.json +2 -2
- package/sui-plugin/README.md +24 -1
- package/sui-plugin/skills/sui-component/SKILL.md +13 -3
- package/sui-plugin/skills/sui-component/references/alert.md +30 -14
- package/sui-plugin/skills/sui-component/references/autocomplete.md +96 -34
- package/sui-plugin/skills/sui-component/references/badge.md +55 -29
- package/sui-plugin/skills/sui-component/references/breadcrumbs.md +33 -19
- package/sui-plugin/skills/sui-component/references/button.md +76 -37
- package/sui-plugin/skills/sui-component/references/calendar.md +64 -34
- package/sui-plugin/skills/sui-component/references/cards.md +142 -25
- package/sui-plugin/skills/sui-component/references/carousel.md +107 -42
- package/sui-plugin/skills/sui-component/references/chip.md +52 -28
- package/sui-plugin/skills/sui-component/references/date-picker.md +148 -61
- package/sui-plugin/skills/sui-component/references/dialog.md +60 -21
- package/sui-plugin/skills/sui-component/references/divider.md +15 -6
- package/sui-plugin/skills/sui-component/references/droppable.md +36 -16
- package/sui-plugin/skills/sui-component/references/expansion-panels.md +107 -30
- package/sui-plugin/skills/sui-component/references/form.md +483 -35
- package/sui-plugin/skills/sui-component/references/icon.md +30 -11
- package/sui-plugin/skills/sui-component/references/image.md +39 -17
- package/sui-plugin/skills/sui-component/references/layout.md +456 -69
- package/sui-plugin/skills/sui-component/references/list.md +223 -52
- package/sui-plugin/skills/sui-component/references/menu.md +64 -28
- package/sui-plugin/skills/sui-component/references/overlay.md +35 -16
- package/sui-plugin/skills/sui-component/references/progress.md +76 -26
- package/sui-plugin/skills/sui-component/references/sheet.md +46 -23
- package/sui-plugin/skills/sui-component/references/slide-group.md +77 -38
- package/sui-plugin/skills/sui-component/references/snackbar.md +48 -17
- package/sui-plugin/skills/sui-component/references/split-view.md +51 -12
- package/sui-plugin/skills/sui-component/references/stepper.md +58 -23
- package/sui-plugin/skills/sui-component/references/table.md +123 -55
- package/sui-plugin/skills/sui-component/references/tabs.md +78 -30
- package/sui-plugin/skills/sui-component/references/toggle-button-group.md +85 -39
- package/sui-plugin/skills/sui-component/references/toolbar.md +92 -33
- package/sui-plugin/skills/sui-component/references/tooltip.md +58 -20
- package/sui-plugin/skills/sui-component/references/window.md +89 -29
- package/sui-plugin/skills/sui-form/SKILL.md +23 -16
- package/sui-plugin/skills/sui-getting-started/SKILL.md +60 -44
- 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
|
|-------|------|-------------|
|
|
@@ -41,53 +43,323 @@ Renders a native `<form>` and collects child inputs.
|
|
|
41
43
|
| `v-model:errors` | `string[]` | All current error messages |
|
|
42
44
|
| `v-model:error` | `boolean` | `true` when there are errors |
|
|
43
45
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
46
|
+
<!-- generated:api:start SForm -->
|
|
47
|
+
<!-- Generated from sui-api.json by `yarn sync:skills` (packages/app). Do not edit by hand. -->
|
|
48
|
+
|
|
49
|
+
**SForm props**
|
|
50
|
+
|
|
51
|
+
| Prop | Type | Default | Required | Values |
|
|
52
|
+
| --- | --- | --- | --- | --- |
|
|
53
|
+
| `error` | `boolean` | — | no | — |
|
|
54
|
+
| `errors` | `string[]` | `[]` | no | — |
|
|
55
|
+
| `modelValue` | `boolean` | — | no | — |
|
|
56
|
+
|
|
57
|
+
**SForm slots**
|
|
58
|
+
|
|
59
|
+
| Slot | Slot props |
|
|
60
|
+
| --- | --- |
|
|
61
|
+
| `default` | `{}` |
|
|
62
|
+
|
|
63
|
+
**SForm events**
|
|
64
|
+
|
|
65
|
+
| Event | Payload |
|
|
66
|
+
| --- | --- |
|
|
67
|
+
| `submit` | `[Event]` |
|
|
68
|
+
| `update:error` | `[value: boolean \| undefined]` |
|
|
69
|
+
| `update:errors` | `[value: string[]]` |
|
|
70
|
+
| `update:modelValue` | `[value: boolean \| undefined]` |
|
|
71
|
+
|
|
72
|
+
<!-- generated:api:end SForm -->
|
|
73
|
+
|
|
74
|
+
**SForm notes**
|
|
75
|
+
|
|
76
|
+
- `submit` (event): Native submit — **not** prevented; use `@submit.prevent`
|
|
47
77
|
|
|
48
78
|
Exposed: `validate(): boolean` — **returns `true` when there ARE errors**; `resetValidation()`.
|
|
49
79
|
|
|
50
80
|
---
|
|
51
81
|
|
|
82
|
+
## SFormRow
|
|
83
|
+
|
|
84
|
+
*Since 1.20.0.* A wrapping row of text fields (`SInput`, `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
|
+
|
|
52
118
|
## SInput
|
|
53
119
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
|
60
|
-
|
|
|
61
|
-
| `
|
|
62
|
-
| `
|
|
63
|
-
| `
|
|
64
|
-
| `
|
|
65
|
-
| `
|
|
66
|
-
| `
|
|
67
|
-
| `
|
|
68
|
-
| `
|
|
69
|
-
| `
|
|
70
|
-
| `
|
|
120
|
+
<!-- generated:api:start SInput -->
|
|
121
|
+
<!-- Generated from sui-api.json by `yarn sync:skills` (packages/app). Do not edit by hand. -->
|
|
122
|
+
|
|
123
|
+
**SInput props**
|
|
124
|
+
|
|
125
|
+
| Prop | Type | Default | Required | Values |
|
|
126
|
+
| --- | --- | --- | --- | --- |
|
|
127
|
+
| `allowDecimal` | `boolean \| null` | — | no | — |
|
|
128
|
+
| `appendOuter` | `string \| null` | — | no | — |
|
|
129
|
+
| `ariaLabel` | `string` | — | no | — |
|
|
130
|
+
| `ariaLabelledby` | `string` | — | no | — |
|
|
131
|
+
| `autocapitalize` | `"on" \| "off" \| null` | — | no | `off`, `on` |
|
|
132
|
+
| `autocomplete` | `string \| null` | — | no | — |
|
|
133
|
+
| `autofocus` | `boolean \| null` | — | no | — |
|
|
134
|
+
| `dense` | `boolean` | — | no | — |
|
|
135
|
+
| `dirty` | `boolean` | — | no | — |
|
|
136
|
+
| `disabled` | `boolean \| null` | — | no | — |
|
|
137
|
+
| `error` | `boolean` | — | no | — |
|
|
138
|
+
| `hideDetails` | `boolean` | — | no | — |
|
|
139
|
+
| `hideError` | `boolean` | — | no | — |
|
|
140
|
+
| `id` | `string` | — | no | — |
|
|
141
|
+
| `inputBackground` | `string \| null` | — | no | — |
|
|
142
|
+
| `inputmode` | `InputModeTypeText \| null` | — | no | `decimal`, `email`, `none`, `numeric`, `search`, `tel`, `text`, `url` |
|
|
143
|
+
| `isPasteDisabled` | `boolean` | — | no | — |
|
|
144
|
+
| `label` | `string \| null` | — | no | — |
|
|
145
|
+
| `max` | `string \| number \| null` | — | no | — |
|
|
146
|
+
| `maxlength` | `string \| number \| null` | — | no | — |
|
|
147
|
+
| `min` | `string \| number \| null` | — | no | — |
|
|
148
|
+
| `minlength` | `string \| number \| null` | — | no | — |
|
|
149
|
+
| `modelValue` | `T \| null` | — | no | — |
|
|
150
|
+
| `name` | `string` | — | no | — |
|
|
151
|
+
| `pattern` | `string \| null` | — | no | — |
|
|
152
|
+
| `placeholder` | `string \| null` | — | no | — |
|
|
153
|
+
| `placeholderBackground` | `string \| null` | — | no | — |
|
|
154
|
+
| `positive` | `boolean \| null` | — | no | — |
|
|
155
|
+
| `readonly` | `boolean \| null` | — | no | — |
|
|
156
|
+
| `rules` | `FormInputModelValueRule[]` | — | no | — |
|
|
157
|
+
| `simple` | `boolean \| null` | — | no | — |
|
|
158
|
+
| `size` | `SizePropertyType` | — | no | `default`, `extra`, `large`, `mini`, `small` |
|
|
159
|
+
| `spellcheck` | `boolean \| null` | — | no | — |
|
|
160
|
+
| `suffix` | `string \| null` | — | no | — |
|
|
161
|
+
| `textRight` | `boolean \| null` | — | no | — |
|
|
162
|
+
| `tile` | `boolean` | — | no | — |
|
|
163
|
+
| `type` | `InputTypeText \| null` | — | no | `date`, `datetime-local`, `email`, `number`, `password`, `search`, `tel`, `text`, `time`, `url`, `week` |
|
|
164
|
+
| `usePreviousValueWhenExceeded` | `boolean \| null` | — | no | — |
|
|
165
|
+
|
|
166
|
+
**SInput slots**
|
|
167
|
+
|
|
168
|
+
| Slot | Slot props |
|
|
169
|
+
| --- | --- |
|
|
170
|
+
| `appendOuter` | `{}` |
|
|
171
|
+
| `suffix` | `{}` |
|
|
172
|
+
|
|
173
|
+
**SInput events**
|
|
174
|
+
|
|
175
|
+
| Event | Payload |
|
|
176
|
+
| --- | --- |
|
|
177
|
+
| `autocomplete` | `[HTMLInputElement \| null]` |
|
|
178
|
+
| `blur` | `[Event]` |
|
|
179
|
+
| `change` | `[string \| number \| null]` |
|
|
180
|
+
| `focus` | `[Event]` |
|
|
181
|
+
| `input` | `[Event]` |
|
|
182
|
+
| `keydown` | `[KeyboardEvent]` |
|
|
183
|
+
| `paste` | `[ClipboardEvent]` |
|
|
184
|
+
| `update:dirty` | `[boolean]` |
|
|
185
|
+
| `update:error` | `[boolean]` |
|
|
186
|
+
| `update:errors` | `[string[]]` |
|
|
187
|
+
| `update:modelValue` | `[value: T \| null \| undefined]` |
|
|
188
|
+
|
|
189
|
+
<!-- generated:api:end SInput -->
|
|
190
|
+
|
|
191
|
+
**SInput notes**
|
|
192
|
+
|
|
193
|
+
- `label`: Label above the field
|
|
194
|
+
- `placeholder`: Placeholder
|
|
195
|
+
- `type`: Input type (default: native (`text`))
|
|
196
|
+
- `inputmode`: Mobile keyboard
|
|
197
|
+
- `suffix` / `appendOuter`: Text inside / outside the field (or use the slots)
|
|
198
|
+
- `simple`: Underline-only style
|
|
199
|
+
- `dense` / `tile` / `textRight`: Compact / square / right-aligned
|
|
200
|
+
- `min` / `max`: Bounds (enforced for `type="number"`)
|
|
201
|
+
- `positive` / `allowDecimal`: Number input: >0 only / accept decimals
|
|
202
|
+
- `usePreviousValueWhenExceeded`: Over `max`: keep the previous value instead of clamping
|
|
203
|
+
- `minlength` / `maxlength` / `pattern`: Native attributes
|
|
204
|
+
- `name`, `autocomplete`, `autocapitalize`, `autofocus`, `spellcheck`, `ariaLabelledby`: Native attributes
|
|
205
|
+
- `isPasteDisabled`: Block paste
|
|
206
|
+
- `inputBackground` / `placeholderBackground`: Field / placeholder background (preset or CSS color)
|
|
207
|
+
- `size`: Preset size
|
|
71
208
|
|
|
72
209
|
Model: `v-model` — `string | number | null`. Slots: `suffix`, `appendOuter` (no `label` slot). Events: `change`, `input`, `focus`, `blur`, `keydown`, `paste`, `autocomplete` + shared. Exposed: `validate()`.
|
|
73
210
|
|
|
74
211
|
## STextarea
|
|
75
212
|
|
|
76
|
-
Props: `label`, `placeholder`, `rows` (default `2`), `cols` (default `20`), **`autogrow`** (not `autoGrow`), `resize` (default off → `resize: none`), `simple`, `dense`, `tile`, `minlength`, `maxlength`, `name`, `autocomplete`, `autocapitalize`, `autofocus`, `spellcheck`, `ariaLabelledby`, `inputBackground`, `placeholderBackground`, `size` + shared. Model: `string` (`null` → `''`). Events: `change`, `input`, `blur`, `keydown` + shared. No slots. Exposed: `validate()`.
|
|
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()`.
|
|
214
|
+
|
|
215
|
+
<!-- generated:api:start STextarea -->
|
|
216
|
+
<!-- Generated from sui-api.json by `yarn sync:skills` (packages/app). Do not edit by hand. -->
|
|
217
|
+
|
|
218
|
+
**STextarea props**
|
|
219
|
+
|
|
220
|
+
| Prop | Type | Default | Required | Values | Description |
|
|
221
|
+
| --- | --- | --- | --- | --- | --- |
|
|
222
|
+
| `ariaLabel` | `string` | — | no | — | — |
|
|
223
|
+
| `ariaLabelledby` | `string` | — | no | — | — |
|
|
224
|
+
| `autocapitalize` | `"on" \| "off"` | — | 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` | `string \| number` | — | no | — | — |
|
|
240
|
+
| `minlength` | `string \| number` | — | 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 | — | — |
|
|
253
|
+
|
|
254
|
+
**STextarea slots**
|
|
255
|
+
|
|
256
|
+
None.
|
|
257
|
+
|
|
258
|
+
**STextarea events**
|
|
259
|
+
|
|
260
|
+
| Event | Payload |
|
|
261
|
+
| --- | --- |
|
|
262
|
+
| `autocomplete` | `[HTMLInputElement \| null]` |
|
|
263
|
+
| `blur` | `[Event]` |
|
|
264
|
+
| `change` | `[string]` |
|
|
265
|
+
| `focus` | `[Event]` |
|
|
266
|
+
| `input` | `[Event]` |
|
|
267
|
+
| `keydown` | `[KeyboardEvent]` |
|
|
268
|
+
| `paste` | `[ClipboardEvent]` |
|
|
269
|
+
| `update:dirty` | `[boolean]` |
|
|
270
|
+
| `update:error` | `[boolean]` |
|
|
271
|
+
| `update:errors` | `[string[]]` |
|
|
272
|
+
| `update:modelValue` | `[value: string]` |
|
|
273
|
+
|
|
274
|
+
<!-- generated:api:end STextarea -->
|
|
77
275
|
|
|
78
276
|
## SSelect
|
|
79
277
|
|
|
80
278
|
Single-value dropdown (no `multiple`, `chips`, `clearable` or `placeholder` — use [SAutocomplete](./autocomplete.md) for those).
|
|
81
279
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
|
88
|
-
|
|
|
89
|
-
| `
|
|
90
|
-
| `
|
|
280
|
+
<!-- generated:api:start SSelect -->
|
|
281
|
+
<!-- Generated from sui-api.json by `yarn sync:skills` (packages/app). Do not edit by hand. -->
|
|
282
|
+
|
|
283
|
+
**SSelect props**
|
|
284
|
+
|
|
285
|
+
| Prop | Type | Default | Required | Values | Description |
|
|
286
|
+
| --- | --- | --- | --- | --- | --- |
|
|
287
|
+
| `activator` | `string \| HTMLElement \| ComponentPublicInstance \| null` | — | no | — | — |
|
|
288
|
+
| `ariaLabel` | `string \| null` | — | no | — | Accessible name when there is no visible `label` (otherwise the label names the field). |
|
|
289
|
+
| `borderRadius` | `` number \| "tile" \| "rounded" \| `${number}em` \| `${number}px` \| `${number}rem` \| `${number}%` \| `${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 \| string[] \| Record<string, boolean>` | — | 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` | `string \| number \| 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` | `string \| number \| null` | — | no | — | — |
|
|
311
|
+
| `maxWidth` | `string \| number \| null` | — | no | — | — |
|
|
312
|
+
| `menu` | `boolean` | — | no | — | — |
|
|
313
|
+
| `minHeight` | `string \| number \| null` | — | no | — | — |
|
|
314
|
+
| `minWidth` | `string \| number \| null` | — | no | — | — |
|
|
315
|
+
| `modelValue` | `T \| null` | — | no | — | — |
|
|
316
|
+
| `name` | `string \| null` | — | no | — | — |
|
|
317
|
+
| `offsetX` | `number \| null` | — | no | — | — |
|
|
318
|
+
| `offsetY` | `number \| null` | — | no | — | — |
|
|
319
|
+
| `outlined` | `boolean \| null` | `true` | no | — | — |
|
|
320
|
+
| `placeholder` | `string \| null` | — | no | — | Text shown in the field while nothing is selected. The label is never repeated inside the field. |
|
|
321
|
+
| `position` | `Position` | — | no | `absolute`, `fixed`, `relative`, `static`, `sticky` | — |
|
|
322
|
+
| `preventCloseOnClick` | `boolean` | — | no | — | — |
|
|
323
|
+
| `readonly` | `boolean \| null` | — | no | — | — |
|
|
324
|
+
| `rules` | `FormInputModelValueRule[]` | — | no | — | — |
|
|
325
|
+
| `screenPadding` | `number \| null` | — | no | — | — |
|
|
326
|
+
| `text` | `boolean` | — | no | — | — |
|
|
327
|
+
| `theme` | `AppThemeType` | — | no | `dark`, `light` | — |
|
|
328
|
+
| `underlined` | `boolean \| null` | — | no | — | — |
|
|
329
|
+
| `width` | `string \| number \| null` | — | no | — | — |
|
|
330
|
+
|
|
331
|
+
**SSelect slots**
|
|
332
|
+
|
|
333
|
+
| Slot | Slot props |
|
|
334
|
+
| --- | --- |
|
|
335
|
+
| `activator` | `{ item: SelectItem \| null; value: boolean \| undefined; }` |
|
|
336
|
+
| `dropdownIcon` | `{ color: string \| undefined; value: boolean \| undefined; }` |
|
|
337
|
+
|
|
338
|
+
**SSelect events**
|
|
339
|
+
|
|
340
|
+
| Event | Payload |
|
|
341
|
+
| --- | --- |
|
|
342
|
+
| `change` | `[T \| null]` |
|
|
343
|
+
| `update:dirty` | `[boolean]` |
|
|
344
|
+
| `update:error` | `[boolean]` |
|
|
345
|
+
| `update:errors` | `[string[]]` |
|
|
346
|
+
| `update:menu` | `[value: boolean \| undefined]` |
|
|
347
|
+
| `update:modelValue` | `[value: T \| null \| undefined]` |
|
|
348
|
+
|
|
349
|
+
<!-- generated:api:end SSelect -->
|
|
350
|
+
|
|
351
|
+
**SSelect notes**
|
|
352
|
+
|
|
353
|
+
- `items`: Options
|
|
354
|
+
- `label`: Label above the field (never repeated inside it)
|
|
355
|
+
- `placeholder`: Text shown in the field while nothing is selected
|
|
356
|
+
- 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`
|
|
357
|
+
- `name`: Name of a hidden native `<select>`
|
|
358
|
+
- `dense` / `grow` / `text` / `divided`: Compact / full width / text list style / list dividers
|
|
359
|
+
- `color`: List color
|
|
360
|
+
- `outlined`: default **`true`** (matches `SInput`); `:outlined="false"` for the borderless, shadowed look
|
|
361
|
+
- `underlined` / `borderRadius`: Activator border
|
|
362
|
+
- `location`, `offsetX`, `offsetY`, …: Dropdown positioning
|
|
91
363
|
|
|
92
364
|
```ts
|
|
93
365
|
interface SelectItem { text: string; value: string | number | null | undefined; disabled?: boolean }
|
|
@@ -97,24 +369,199 @@ Model: `v-model` — `string | number | null`; `v-model:menu` — open state. Sl
|
|
|
97
369
|
|
|
98
370
|
## SCheckbox
|
|
99
371
|
|
|
100
|
-
Boolean only. Props: `label`, `color` (preset name only), `size` (`'default' | 'large'`), `block`, `bordered` + shared. Model: `boolean`. Events: `change` (`boolean`) + shared. No `value`, `indeterminate` or array/group model.
|
|
372
|
+
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.
|
|
373
|
+
|
|
374
|
+
<!-- generated:api:start SCheckbox -->
|
|
375
|
+
<!-- Generated from sui-api.json by `yarn sync:skills` (packages/app). Do not edit by hand. -->
|
|
376
|
+
|
|
377
|
+
**SCheckbox props**
|
|
378
|
+
|
|
379
|
+
| Prop | Type | Default | Required | Values |
|
|
380
|
+
| --- | --- | --- | --- | --- |
|
|
381
|
+
| `block` | `boolean` | — | no | — |
|
|
382
|
+
| `bordered` | `boolean` | — | no | — |
|
|
383
|
+
| `color` | `PresetColor` | — | no | — |
|
|
384
|
+
| `colorThreshold` | `number` | — | no | — |
|
|
385
|
+
| `dirty` | `boolean` | — | no | — |
|
|
386
|
+
| `disabled` | `boolean \| null` | — | no | — |
|
|
387
|
+
| `error` | `boolean` | — | no | — |
|
|
388
|
+
| `hideDetails` | `boolean` | — | no | — |
|
|
389
|
+
| `hideError` | `boolean` | — | no | — |
|
|
390
|
+
| `id` | `string` | — | no | — |
|
|
391
|
+
| `label` | `string` | — | no | — |
|
|
392
|
+
| `modelValue` | `boolean` | — | no | — |
|
|
393
|
+
| `readonly` | `boolean \| null` | — | no | — |
|
|
394
|
+
| `rules` | `FormInputModelValueRule[]` | — | no | — |
|
|
395
|
+
| `size` | `"default" \| "large"` | — | no | `default`, `large` |
|
|
396
|
+
| `theme` | `AppThemeType` | — | no | `dark`, `light` |
|
|
397
|
+
|
|
398
|
+
**SCheckbox slots**
|
|
399
|
+
|
|
400
|
+
None.
|
|
401
|
+
|
|
402
|
+
**SCheckbox events**
|
|
403
|
+
|
|
404
|
+
| Event | Payload |
|
|
405
|
+
| --- | --- |
|
|
406
|
+
| `change` | `[value: boolean]` |
|
|
407
|
+
| `update:dirty` | `[value: boolean]` |
|
|
408
|
+
| `update:error` | `[value: boolean]` |
|
|
409
|
+
| `update:errors` | `[value: string[]]` |
|
|
410
|
+
| `update:modelValue` | `[value: boolean \| undefined]` |
|
|
411
|
+
|
|
412
|
+
<!-- generated:api:end SCheckbox -->
|
|
101
413
|
|
|
102
414
|
## SRadioGroup / SRadio
|
|
103
415
|
|
|
104
|
-
Options are **`SRadio` children** — there is no `items` prop.
|
|
416
|
+
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).
|
|
105
417
|
|
|
106
418
|
`SRadioGroup` props: `name`, `column`, `grow`, `color` (preset name), `mandatory`, `outlined` / `underlined` / `borderRadius` + shared. Model: `string | number | boolean`. Events: `change` + shared.
|
|
107
419
|
|
|
108
420
|
`SRadio` props: `value` (falls back to `:key`), `label`, `id`, `name`, `disabled`, `readonly`, `outlined`, `type` (button type). Slot `label` `{ attrs }`. Event `update:checked` (`boolean`).
|
|
109
421
|
|
|
422
|
+
<!-- generated:api:start SRadioGroup -->
|
|
423
|
+
<!-- Generated from sui-api.json by `yarn sync:skills` (packages/app). Do not edit by hand. -->
|
|
424
|
+
|
|
425
|
+
**SRadioGroup props**
|
|
426
|
+
|
|
427
|
+
| Prop | Type | Default | Required | Values |
|
|
428
|
+
| --- | --- | --- | --- | --- |
|
|
429
|
+
| `borderRadius` | `` number \| "tile" \| "rounded" \| `${number}em` \| `${number}px` \| `${number}rem` \| `${number}%` \| `${number}vh` \| `${number}vw` \| null `` | — | no | — |
|
|
430
|
+
| `color` | `string \| null` | — | no | — |
|
|
431
|
+
| `column` | `boolean \| null` | — | no | — |
|
|
432
|
+
| `continuous` | `boolean` | — | no | — |
|
|
433
|
+
| `dirty` | `boolean` | — | no | — |
|
|
434
|
+
| `disabled` | `boolean \| null` | — | no | — |
|
|
435
|
+
| `error` | `boolean` | — | no | — |
|
|
436
|
+
| `grow` | `boolean \| null` | — | no | — |
|
|
437
|
+
| `hideDetails` | `boolean` | — | no | — |
|
|
438
|
+
| `hideError` | `boolean` | — | no | — |
|
|
439
|
+
| `id` | `string` | — | no | — |
|
|
440
|
+
| `mandatory` | `boolean` | — | no | — |
|
|
441
|
+
| `modelValue` | `GroupItemValue` | — | no | — |
|
|
442
|
+
| `name` | `string` | — | no | — |
|
|
443
|
+
| `outlined` | `boolean \| null` | — | no | — |
|
|
444
|
+
| `readonly` | `boolean \| null` | — | no | — |
|
|
445
|
+
| `rules` | `FormInputModelValueRule[]` | — | no | — |
|
|
446
|
+
| `underlined` | `boolean \| null` | — | no | — |
|
|
447
|
+
|
|
448
|
+
**SRadioGroup slots**
|
|
449
|
+
|
|
450
|
+
| Slot | Slot props |
|
|
451
|
+
| --- | --- |
|
|
452
|
+
| `default` | `{}` |
|
|
453
|
+
|
|
454
|
+
**SRadioGroup events**
|
|
455
|
+
|
|
456
|
+
| Event | Payload |
|
|
457
|
+
| --- | --- |
|
|
458
|
+
| `change` | `[value: GroupItemValue \| null]` |
|
|
459
|
+
| `update:dirty` | `[value: boolean]` |
|
|
460
|
+
| `update:error` | `[value: boolean]` |
|
|
461
|
+
| `update:errors` | `[value: string[]]` |
|
|
462
|
+
| `update:menu` | `[value: boolean \| null \| undefined]` |
|
|
463
|
+
| `update:modelValue` | `[value: GroupItemValue \| undefined]` |
|
|
464
|
+
|
|
465
|
+
<!-- generated:api:end SRadioGroup -->
|
|
466
|
+
|
|
467
|
+
<!-- generated:api:start SRadio -->
|
|
468
|
+
<!-- Generated from sui-api.json by `yarn sync:skills` (packages/app). Do not edit by hand. -->
|
|
469
|
+
|
|
470
|
+
**SRadio props**
|
|
471
|
+
|
|
472
|
+
| Prop | Type | Default | Required | Values | Description |
|
|
473
|
+
| --- | --- | --- | --- | --- | --- |
|
|
474
|
+
| `activeClass` | `string \| null` | — | no | — | — |
|
|
475
|
+
| `ariaLabel` | `string \| null` | — | no | — | Accessible name for a radio without a visible `label` (for example an icon-only option). |
|
|
476
|
+
| `borderRadius` | `` number \| "tile" \| "rounded" \| `${number}em` \| `${number}px` \| `${number}rem` \| `${number}%` \| `${number}vh` \| `${number}vw` \| null `` | — | no | — | — |
|
|
477
|
+
| `disabled` | `boolean \| null` | — | no | — | — |
|
|
478
|
+
| `id` | `string` | — | no | — | — |
|
|
479
|
+
| `label` | `string \| null` | — | no | — | — |
|
|
480
|
+
| `name` | `string \| null` | — | no | — | — |
|
|
481
|
+
| `outlined` | `boolean \| null` | — | no | — | — |
|
|
482
|
+
| `readonly` | `boolean \| null` | — | no | — | — |
|
|
483
|
+
| `selected` | `boolean` | — | no | — | — |
|
|
484
|
+
| `type` | `ButtonTypeType` | — | no | `button`, `reset`, `submit` | — |
|
|
485
|
+
| `underlined` | `boolean \| null` | — | no | — | — |
|
|
486
|
+
| `value` | `string \| number \| boolean` | — | no | — | — |
|
|
487
|
+
|
|
488
|
+
**SRadio slots**
|
|
489
|
+
|
|
490
|
+
| Slot | Slot props |
|
|
491
|
+
| --- | --- |
|
|
492
|
+
| `label` | `{ attrs: { class: { s_radio__label: boolean; 's_radio__label--checked': boolean; }; }; }` |
|
|
493
|
+
|
|
494
|
+
**SRadio events**
|
|
495
|
+
|
|
496
|
+
| Event | Payload |
|
|
497
|
+
| --- | --- |
|
|
498
|
+
| `update:checked` | `[value: boolean]` |
|
|
499
|
+
|
|
500
|
+
<!-- generated:api:end SRadio -->
|
|
501
|
+
|
|
110
502
|
## SSwitch
|
|
111
503
|
|
|
112
504
|
Props: `label`, `color`, `id`, `disabled`, `readonly`. Model: `boolean`. Slot: `label`. Rules/`hideDetails` are typed but ignored — no error display, not registered with `SForm`.
|
|
113
505
|
|
|
506
|
+
<!-- generated:api:start SSwitch -->
|
|
507
|
+
<!-- Generated from sui-api.json by `yarn sync:skills` (packages/app). Do not edit by hand. -->
|
|
508
|
+
|
|
509
|
+
**SSwitch props**
|
|
510
|
+
|
|
511
|
+
| Prop | Type | Default | Required | Values |
|
|
512
|
+
| --- | --- | --- | --- | --- |
|
|
513
|
+
| `color` | `string` | — | no | — |
|
|
514
|
+
| `colorThreshold` | `number` | — | no | — |
|
|
515
|
+
| `dirty` | `boolean` | — | no | — |
|
|
516
|
+
| `disabled` | `boolean \| null` | — | no | — |
|
|
517
|
+
| `error` | `boolean` | — | no | — |
|
|
518
|
+
| `hideDetails` | `boolean` | — | no | — |
|
|
519
|
+
| `hideError` | `boolean` | — | no | — |
|
|
520
|
+
| `id` | `string` | — | no | — |
|
|
521
|
+
| `label` | `string \| null` | — | no | — |
|
|
522
|
+
| `modelValue` | `boolean` | — | no | — |
|
|
523
|
+
| `readonly` | `boolean \| null` | — | no | — |
|
|
524
|
+
| `rules` | `FormInputModelValueRule[]` | — | no | — |
|
|
525
|
+
| `theme` | `AppThemeType` | — | no | `dark`, `light` |
|
|
526
|
+
|
|
527
|
+
**SSwitch slots**
|
|
528
|
+
|
|
529
|
+
| Slot | Slot props |
|
|
530
|
+
| --- | --- |
|
|
531
|
+
| `label` | `{}` |
|
|
532
|
+
|
|
533
|
+
**SSwitch events**
|
|
534
|
+
|
|
535
|
+
| Event | Payload |
|
|
536
|
+
| --- | --- |
|
|
537
|
+
| `update:modelValue` | `[value: boolean \| undefined]` |
|
|
538
|
+
|
|
539
|
+
<!-- generated:api:end SSwitch -->
|
|
540
|
+
|
|
114
541
|
## SFormInputError
|
|
115
542
|
|
|
116
543
|
Props: `errors: string[]` (shows the first, as HTML), `simple: boolean`. For custom inputs.
|
|
117
544
|
|
|
545
|
+
<!-- generated:api:start SFormInputError -->
|
|
546
|
+
<!-- Generated from sui-api.json by `yarn sync:skills` (packages/app). Do not edit by hand. -->
|
|
547
|
+
|
|
548
|
+
**SFormInputError props**
|
|
549
|
+
|
|
550
|
+
| Prop | Type | Default | Required | Values |
|
|
551
|
+
| --- | --- | --- | --- | --- |
|
|
552
|
+
| `errors` | `string[]` | `[]` | no | — |
|
|
553
|
+
| `simple` | `boolean \| null` | `false` | no | — |
|
|
554
|
+
|
|
555
|
+
**SFormInputError slots**
|
|
556
|
+
|
|
557
|
+
None.
|
|
558
|
+
|
|
559
|
+
**SFormInputError events**
|
|
560
|
+
|
|
561
|
+
None.
|
|
562
|
+
|
|
563
|
+
<!-- generated:api:end SFormInputError -->
|
|
564
|
+
|
|
118
565
|
---
|
|
119
566
|
|
|
120
567
|
## Usage
|
|
@@ -139,7 +586,7 @@ const submit = () => {
|
|
|
139
586
|
<template>
|
|
140
587
|
<SForm ref="formRef" v-model="valid" @submit.prevent="submit">
|
|
141
588
|
<SInput v-model="model.name" label="Name" :rules="[required]" />
|
|
142
|
-
<SInput v-model="model.email" label="Email" type="email" :rules="[required, v => /.+@.+/.test(String(v)) || 'Invalid email']" />
|
|
589
|
+
<SInput v-model="model.email" label="Email" type="text" inputmode="email" autocomplete="email" :rules="[required, v => /.+@.+/.test(String(v)) || 'Invalid email']" />
|
|
143
590
|
<SSelect
|
|
144
591
|
v-model="model.country"
|
|
145
592
|
label="Country"
|
|
@@ -173,3 +620,4 @@ const submit = () => {
|
|
|
173
620
|
|
|
174
621
|
- `SRadioGroup` without `mandatory`: clicking the selected radio clears the value.
|
|
175
622
|
- `SSelect` validates when its menu opens, so a required error can appear on first open.
|
|
623
|
+
- `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.
|
|
@@ -20,22 +20,41 @@ Renders a Material Design Icon (MDI) by class name as `<span aria-hidden="true"
|
|
|
20
20
|
|
|
21
21
|
Types: `node_modules/@khsura/sui/@types/definitions/props/propsIcon.d.ts`
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
<!-- generated:api:start SIcon -->
|
|
24
|
+
<!-- Generated from sui-api.json by `yarn sync:skills` (packages/app). Do not edit by hand. -->
|
|
24
25
|
|
|
25
|
-
|
|
26
|
-
|------|------|---------|-------------|
|
|
27
|
-
| `icon` | `string` | **required** | Full MDI class name including the `mdi-` prefix, e.g. `'mdi-home'`, `'mdi-heart-outline'` |
|
|
28
|
-
| `size` | `'mini' \| 'small' \| 'default' \| 'large' \| 'extra' \| number \| string` | `undefined` (default size) | Preset name → size class. A number or CSS length → inline `font-size` |
|
|
29
|
-
| `color` | `string` | `undefined` | Text color: preset/app color name or any CSS color |
|
|
30
|
-
| `theme` | `'light' \| 'dark'` | `undefined` | Force light/dark styling (ignored when `color` is a preset) |
|
|
31
|
-
| `spin` | `boolean` | `false` | Continuous rotation animation |
|
|
32
|
-
| `rotated` | `boolean` | `false` | Rotate 180° (animated) |
|
|
33
|
-
| `extra` | `Array<string>` | `undefined` | Extra classes added to the span, e.g. MDI helpers `'mdi-flip-h'`, `'mdi-rotate-90'` |
|
|
26
|
+
**SIcon props**
|
|
34
27
|
|
|
35
|
-
|
|
28
|
+
| Prop | Type | Default | Required | Values |
|
|
29
|
+
| --- | --- | --- | --- | --- |
|
|
30
|
+
| `color` | `string \| null` | — | no | — |
|
|
31
|
+
| `extra` | `string[] \| null` | — | no | — |
|
|
32
|
+
| `icon` | `string` | — | yes | — |
|
|
33
|
+
| `rotated` | `boolean \| null` | — | no | — |
|
|
34
|
+
| `size` | `SizePropertyUnionType` | — | no | — |
|
|
35
|
+
| `spin` | `boolean` | — | no | — |
|
|
36
|
+
| `theme` | `AppThemeType` | — | no | `dark`, `light` |
|
|
37
|
+
|
|
38
|
+
**SIcon slots**
|
|
39
|
+
|
|
40
|
+
None.
|
|
41
|
+
|
|
42
|
+
**SIcon events**
|
|
36
43
|
|
|
37
44
|
None.
|
|
38
45
|
|
|
46
|
+
<!-- generated:api:end SIcon -->
|
|
47
|
+
|
|
48
|
+
**SIcon notes**
|
|
49
|
+
|
|
50
|
+
- `icon`: Full MDI class name including the `mdi-` prefix, e.g. `'mdi-home'`, `'mdi-heart-outline'` (default: **required**)
|
|
51
|
+
- `size`: Preset name → size class. A number or CSS length → inline `font-size` (default: `undefined` (default size))
|
|
52
|
+
- `color`: Text color: preset/app color name or any CSS color
|
|
53
|
+
- `theme`: Force light/dark styling (ignored when `color` is a preset)
|
|
54
|
+
- `spin`: Continuous rotation animation
|
|
55
|
+
- `rotated`: Rotate 180° (animated)
|
|
56
|
+
- `extra`: Extra classes added to the span, e.g. MDI helpers `'mdi-flip-h'`, `'mdi-rotate-90'`
|
|
57
|
+
|
|
39
58
|
## Events
|
|
40
59
|
|
|
41
60
|
None. SIcon has `aria-hidden="true"`. Wrap it in a button for click handling.
|