@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
|
@@ -10,26 +10,50 @@ Types: `node_modules/@khsura/sui/@types/definitions/props/propsList.d.ts`, `prop
|
|
|
10
10
|
|
|
11
11
|
## SList
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
|
19
|
-
|
|
|
20
|
-
| `
|
|
21
|
-
| `
|
|
22
|
-
| `
|
|
23
|
-
| `
|
|
24
|
-
| `
|
|
25
|
-
| `
|
|
26
|
-
| `
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
|
31
|
-
|
|
32
|
-
|
|
13
|
+
<!-- generated:api:start SList -->
|
|
14
|
+
<!-- Generated from sui-api.json by `yarn sync:skills` (packages/app). Do not edit by hand. -->
|
|
15
|
+
|
|
16
|
+
**SList props**
|
|
17
|
+
|
|
18
|
+
| Prop | Type | Default | Required | Values |
|
|
19
|
+
| --- | --- | --- | --- | --- |
|
|
20
|
+
| `color` | `string` | — | no | — |
|
|
21
|
+
| `colorThreshold` | `number` | — | no | — |
|
|
22
|
+
| `dense` | `boolean \| null` | — | no | — |
|
|
23
|
+
| `divided` | `boolean` | — | no | — |
|
|
24
|
+
| `inset` | `boolean \| null` | — | no | — |
|
|
25
|
+
| `lines` | `number \| null` | — | no | — |
|
|
26
|
+
| `link` | `boolean \| null` | — | no | — |
|
|
27
|
+
| `outlined` | `boolean \| null` | — | no | — |
|
|
28
|
+
| `tag` | `"div" \| "ol" \| "ul" \| null` | — | no | `div`, `ol`, `ul` |
|
|
29
|
+
| `text` | `boolean \| null` | — | no | — |
|
|
30
|
+
| `theme` | `AppThemeType` | — | no | `dark`, `light` |
|
|
31
|
+
|
|
32
|
+
**SList slots**
|
|
33
|
+
|
|
34
|
+
| Slot | Slot props |
|
|
35
|
+
| --- | --- |
|
|
36
|
+
| `default` | `{}` |
|
|
37
|
+
|
|
38
|
+
**SList events**
|
|
39
|
+
|
|
40
|
+
None.
|
|
41
|
+
|
|
42
|
+
<!-- generated:api:end SList -->
|
|
43
|
+
|
|
44
|
+
**SList notes**
|
|
45
|
+
|
|
46
|
+
- `divided`: Border between items
|
|
47
|
+
- `lines`: Line clamp for `SListItemSubtitle` (the subtitle clamps to 2 lines when this is unset)
|
|
48
|
+
- `outlined`: Outlined border. `color` then sets the **text** color
|
|
49
|
+
- `dense`: No list padding, 40px rows, dense title/icon/action
|
|
50
|
+
- `link`: Hover style + pointer on every item
|
|
51
|
+
- `text`: `color` sets the text color instead of the background
|
|
52
|
+
- `color`: Background color (or text color with `outlined`/`text`)
|
|
53
|
+
- `colorThreshold`: Contrast threshold for custom colors
|
|
54
|
+
- `tag`: Root element (default: `'div'`)
|
|
55
|
+
- `inset`: Declared, but has no styling (no visible effect)
|
|
56
|
+
- `default` (slot): `SListItem`, `SListItemGroup`, `SDivider`, …
|
|
33
57
|
|
|
34
58
|
---
|
|
35
59
|
|
|
@@ -37,30 +61,50 @@ Types: `node_modules/@khsura/sui/@types/definitions/props/propsList.d.ts`, `prop
|
|
|
37
61
|
|
|
38
62
|
A flex row with a minimum height of 48px (40px when the list is `dense`).
|
|
39
63
|
|
|
40
|
-
|
|
64
|
+
<!-- generated:api:start SListItem -->
|
|
65
|
+
<!-- Generated from sui-api.json by `yarn sync:skills` (packages/app). Do not edit by hand. -->
|
|
41
66
|
|
|
42
|
-
|
|
43
|
-
|------|------|---------|-------------|
|
|
44
|
-
| `link` | `boolean` | `false` | Hover background + pointer (automatic when `href`/`to` is set) |
|
|
45
|
-
| `selectable` | `boolean` | `false` | Only sets `cursor: pointer`. It does **not** add selected styling |
|
|
46
|
-
| `lines` | `number` (1–6) | `undefined` | Subtitle line clamp for this item (overrides the list's `lines`) |
|
|
47
|
-
| `disabled` | `boolean` | `false` | Disabled state |
|
|
48
|
-
| `href` | `string` | `undefined` | Render as `<a>` |
|
|
49
|
-
| `to` | `RouteLocationRaw` | `undefined` | Render as `router-link` |
|
|
50
|
-
| `target` / `rel` | `string` | `undefined` | Link attributes |
|
|
51
|
-
| `tag` | `'li' \| 'div'` | `'div'` | Root element (when not a link) |
|
|
67
|
+
**SListItem props**
|
|
52
68
|
|
|
53
|
-
|
|
69
|
+
| Prop | Type | Default | Required | Values |
|
|
70
|
+
| --- | --- | --- | --- | --- |
|
|
71
|
+
| `disabled` | `boolean \| null` | — | no | — |
|
|
72
|
+
| `href` | `string` | — | no | — |
|
|
73
|
+
| `lines` | `number \| null` | — | no | — |
|
|
74
|
+
| `link` | `boolean \| null` | — | no | — |
|
|
75
|
+
| `readonly` | `boolean \| null` | — | no | — |
|
|
76
|
+
| `rel` | `string` | — | no | — |
|
|
77
|
+
| `selectable` | `boolean \| null` | — | no | — |
|
|
78
|
+
| `tag` | `"div" \| "li" \| null` | — | no | `div`, `li` |
|
|
79
|
+
| `target` | `"_blank" \| "_self" \| "_parent" \| "_top"` | — | no | `_blank`, `_parent`, `_self`, `_top` |
|
|
80
|
+
| `to` | `LinkLocation \| null` | — | no | — |
|
|
54
81
|
|
|
55
|
-
|
|
56
|
-
|------|-------------|
|
|
57
|
-
| `default` | Item content |
|
|
82
|
+
**SListItem slots**
|
|
58
83
|
|
|
59
|
-
|
|
84
|
+
| Slot | Slot props |
|
|
85
|
+
| --- | --- |
|
|
86
|
+
| `default` | `{}` |
|
|
60
87
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
|
88
|
+
**SListItem events**
|
|
89
|
+
|
|
90
|
+
| Event | Payload |
|
|
91
|
+
| --- | --- |
|
|
92
|
+
| `click` | `[value: Event]` |
|
|
93
|
+
|
|
94
|
+
<!-- generated:api:end SListItem -->
|
|
95
|
+
|
|
96
|
+
**SListItem notes**
|
|
97
|
+
|
|
98
|
+
- `link`: Hover background + pointer (automatic when `href`/`to` is set)
|
|
99
|
+
- `selectable`: Only sets `cursor: pointer`. It does **not** add selected styling
|
|
100
|
+
- `lines`: Subtitle line clamp for this item (overrides the list's `lines`)
|
|
101
|
+
- `disabled`: Disabled state
|
|
102
|
+
- `href`: Render as `<a>`
|
|
103
|
+
- `to`: Render as `router-link` (plain `<a href>` without vue-router)
|
|
104
|
+
- `target` / `rel`: Link attributes
|
|
105
|
+
- `tag`: Root element (when not a link) (default: `'div'`)
|
|
106
|
+
- `default` (slot): Item content
|
|
107
|
+
- `click` (event): Item clicked
|
|
64
108
|
|
|
65
109
|
---
|
|
66
110
|
|
|
@@ -72,14 +116,117 @@ A flex row with a minimum height of 48px (40px when the list is `dense`).
|
|
|
72
116
|
- `SListItemTitle` is the primary line. It **must be inside an `SList`** (it throws otherwise).
|
|
73
117
|
- `SListItemSubtitle` is the secondary line, clamped to 2 lines by default. It **must be inside both `SList` and `SListItem`**.
|
|
74
118
|
|
|
119
|
+
<!-- generated:api:start SListItemContent -->
|
|
120
|
+
<!-- Generated from sui-api.json by `yarn sync:skills` (packages/app). Do not edit by hand. -->
|
|
121
|
+
|
|
122
|
+
**SListItemContent props**
|
|
123
|
+
|
|
124
|
+
None.
|
|
125
|
+
|
|
126
|
+
**SListItemContent slots**
|
|
127
|
+
|
|
128
|
+
| Slot | Slot props |
|
|
129
|
+
| --- | --- |
|
|
130
|
+
| `default` | `{}` |
|
|
131
|
+
|
|
132
|
+
**SListItemContent events**
|
|
133
|
+
|
|
134
|
+
None.
|
|
135
|
+
|
|
136
|
+
<!-- generated:api:end SListItemContent -->
|
|
137
|
+
|
|
138
|
+
<!-- generated:api:start SListItemTitle -->
|
|
139
|
+
<!-- Generated from sui-api.json by `yarn sync:skills` (packages/app). Do not edit by hand. -->
|
|
140
|
+
|
|
141
|
+
**SListItemTitle props**
|
|
142
|
+
|
|
143
|
+
None.
|
|
144
|
+
|
|
145
|
+
**SListItemTitle slots**
|
|
146
|
+
|
|
147
|
+
| Slot | Slot props |
|
|
148
|
+
| --- | --- |
|
|
149
|
+
| `default` | `{}` |
|
|
150
|
+
|
|
151
|
+
**SListItemTitle events**
|
|
152
|
+
|
|
153
|
+
None.
|
|
154
|
+
|
|
155
|
+
<!-- generated:api:end SListItemTitle -->
|
|
156
|
+
|
|
157
|
+
<!-- generated:api:start SListItemSubtitle -->
|
|
158
|
+
<!-- Generated from sui-api.json by `yarn sync:skills` (packages/app). Do not edit by hand. -->
|
|
159
|
+
|
|
160
|
+
**SListItemSubtitle props**
|
|
161
|
+
|
|
162
|
+
None.
|
|
163
|
+
|
|
164
|
+
**SListItemSubtitle slots**
|
|
165
|
+
|
|
166
|
+
| Slot | Slot props |
|
|
167
|
+
| --- | --- |
|
|
168
|
+
| `default` | `{}` |
|
|
169
|
+
|
|
170
|
+
**SListItemSubtitle events**
|
|
171
|
+
|
|
172
|
+
None.
|
|
173
|
+
|
|
174
|
+
<!-- generated:api:end SListItemSubtitle -->
|
|
175
|
+
|
|
75
176
|
## SListItemIcon / SListItemAction
|
|
76
177
|
|
|
77
178
|
Leading icon area and trailing action area. `default` slot.
|
|
78
179
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
180
|
+
`SListItemContent` keeps a minimum width of `min(40%, 160px)`. When the icon and the actions leave less room than that (two text buttons on a phone), the list item moves the `SListItemAction` onto its own line below the text, aligned to the right edge, instead of squeezing the title to one letter. (Older versions squeezed it.)
|
|
181
|
+
|
|
182
|
+
<!-- generated:api:start SListItemIcon -->
|
|
183
|
+
<!-- Generated from sui-api.json by `yarn sync:skills` (packages/app). Do not edit by hand. -->
|
|
184
|
+
|
|
185
|
+
**SListItemIcon props**
|
|
186
|
+
|
|
187
|
+
| Prop | Type | Default | Required | Values |
|
|
188
|
+
| --- | --- | --- | --- | --- |
|
|
189
|
+
| `alignCenter` | `boolean \| null` | — | no | — |
|
|
190
|
+
| `dense` | `boolean \| null` | — | no | — |
|
|
191
|
+
|
|
192
|
+
**SListItemIcon slots**
|
|
193
|
+
|
|
194
|
+
| Slot | Slot props |
|
|
195
|
+
| --- | --- |
|
|
196
|
+
| `default` | `{}` |
|
|
197
|
+
|
|
198
|
+
**SListItemIcon events**
|
|
199
|
+
|
|
200
|
+
None.
|
|
201
|
+
|
|
202
|
+
<!-- generated:api:end SListItemIcon -->
|
|
203
|
+
|
|
204
|
+
**SListItemIcon notes**
|
|
205
|
+
|
|
206
|
+
- `alignCenter`: Vertically center the content
|
|
207
|
+
- `dense`: Dense sizing (the parent list's `dense` takes precedence)
|
|
208
|
+
|
|
209
|
+
<!-- generated:api:start SListItemAction -->
|
|
210
|
+
<!-- Generated from sui-api.json by `yarn sync:skills` (packages/app). Do not edit by hand. -->
|
|
211
|
+
|
|
212
|
+
**SListItemAction props**
|
|
213
|
+
|
|
214
|
+
| Prop | Type | Default | Required | Values |
|
|
215
|
+
| --- | --- | --- | --- | --- |
|
|
216
|
+
| `alignCenter` | `boolean \| null` | — | no | — |
|
|
217
|
+
| `dense` | `boolean \| null` | — | no | — |
|
|
218
|
+
|
|
219
|
+
**SListItemAction slots**
|
|
220
|
+
|
|
221
|
+
| Slot | Slot props |
|
|
222
|
+
| --- | --- |
|
|
223
|
+
| `default` | `{}` |
|
|
224
|
+
|
|
225
|
+
**SListItemAction events**
|
|
226
|
+
|
|
227
|
+
None.
|
|
228
|
+
|
|
229
|
+
<!-- generated:api:end SListItemAction -->
|
|
83
230
|
|
|
84
231
|
---
|
|
85
232
|
|
|
@@ -87,16 +234,39 @@ Leading icon area and trailing action area. `default` slot.
|
|
|
87
234
|
|
|
88
235
|
A collapsible sub-list. By default it renders a clickable header row (title, subtitle, chevron). The children are rendered in a nested `SList` that inherits the parent list's props. **It must be inside an `SList`.**
|
|
89
236
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
237
|
+
<!-- generated:api:start SListItemGroup -->
|
|
238
|
+
<!-- Generated from sui-api.json by `yarn sync:skills` (packages/app). Do not edit by hand. -->
|
|
239
|
+
|
|
240
|
+
**SListItemGroup props**
|
|
241
|
+
|
|
242
|
+
| Prop | Type | Default | Required | Values |
|
|
243
|
+
| --- | --- | --- | --- | --- |
|
|
244
|
+
| `modelValue` | `boolean` | `false` | no | — |
|
|
245
|
+
| `subtitle` | `string \| null` | `null` | no | — |
|
|
246
|
+
| `title` | `string \| null` | `null` | no | — |
|
|
247
|
+
|
|
248
|
+
**SListItemGroup slots**
|
|
249
|
+
|
|
250
|
+
| Slot | Slot props |
|
|
251
|
+
| --- | --- |
|
|
252
|
+
| `activator` | `{}` |
|
|
253
|
+
| `default` | `{}` |
|
|
254
|
+
|
|
255
|
+
**SListItemGroup events**
|
|
256
|
+
|
|
257
|
+
| Event | Payload |
|
|
258
|
+
| --- | --- |
|
|
259
|
+
| `update:modelValue` | `[value: boolean]` |
|
|
260
|
+
|
|
261
|
+
<!-- generated:api:end SListItemGroup -->
|
|
262
|
+
|
|
263
|
+
**SListItemGroup notes**
|
|
95
264
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
265
|
+
- `v-model`: Expanded state
|
|
266
|
+
- `title`: Header title
|
|
267
|
+
- `subtitle`: Header subtitle
|
|
268
|
+
- `activator` (slot): Replaces the default header row (no slot props; toggle `v-model` yourself)
|
|
269
|
+
- `default` (slot): Items shown when expanded
|
|
100
270
|
|
|
101
271
|
---
|
|
102
272
|
|
|
@@ -151,3 +321,4 @@ A collapsible sub-list. By default it renders a clickable header row (title, sub
|
|
|
151
321
|
| `<SListItem selectable>` expecting a selected highlight | Manage the active state yourself (e.g. a class), since `selectable` only changes the cursor |
|
|
152
322
|
| `<SListItemGroup>` used for single/multi selection | It only expands and collapses. Track selection yourself |
|
|
153
323
|
| `<SList inset>` | No effect |
|
|
324
|
+
| Shrinking the actions (or the title's font) so two text buttons fit next to a long title on a phone | Not needed: the actions move below the text when it would get narrower than `min(40%, 160px)` |
|
|
@@ -6,39 +6,72 @@ Floating popup anchored to an activator. Clicking the activator toggles it; clic
|
|
|
6
6
|
|
|
7
7
|
Types: `node_modules/@khsura/sui/@types/definitions/props/propsMenu.d.ts`
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
|
15
|
-
|
|
|
16
|
-
| `
|
|
17
|
-
| `
|
|
18
|
-
| `
|
|
19
|
-
| `
|
|
20
|
-
| `
|
|
21
|
-
| `
|
|
22
|
-
| `disabled` | `boolean
|
|
23
|
-
| `
|
|
9
|
+
<!-- generated:api:start SMenu -->
|
|
10
|
+
<!-- Generated from sui-api.json by `yarn sync:skills` (packages/app). Do not edit by hand. -->
|
|
11
|
+
|
|
12
|
+
**SMenu props**
|
|
13
|
+
|
|
14
|
+
| Prop | Type | Default | Required | Values |
|
|
15
|
+
| --- | --- | --- | --- | --- |
|
|
16
|
+
| `activator` | `string \| HTMLElement \| ComponentPublicInstance \| null` | — | no | — |
|
|
17
|
+
| `closeOnClick` | `boolean` | — | no | — |
|
|
18
|
+
| `closeOnContentClick` | `boolean` | — | no | — |
|
|
19
|
+
| `closeOnScroll` | `boolean` | — | no | — |
|
|
20
|
+
| `contentClass` | `string \| string[] \| Record<string, boolean>` | — | no | — |
|
|
21
|
+
| `contentStyle` | `StyleValue` | — | no | — |
|
|
22
|
+
| `disabled` | `boolean \| null` | — | no | — |
|
|
23
|
+
| `height` | `string \| number \| null` | — | no | — |
|
|
24
|
+
| `location` | `LocationRaw` | — | no | — |
|
|
25
|
+
| `maxHeight` | `string \| number \| null` | — | no | — |
|
|
26
|
+
| `maxWidth` | `string \| number \| null` | — | no | — |
|
|
27
|
+
| `minHeight` | `string \| number \| null` | — | no | — |
|
|
28
|
+
| `minWidth` | `string \| number \| null` | — | no | — |
|
|
29
|
+
| `modelValue` | `boolean` | — | no | — |
|
|
30
|
+
| `offsetX` | `number \| null` | — | no | — |
|
|
31
|
+
| `offsetY` | `number \| null` | — | no | — |
|
|
32
|
+
| `position` | `Position` | — | no | `absolute`, `fixed`, `relative`, `static`, `sticky` |
|
|
33
|
+
| `preventCloseOnClick` | `boolean` | — | no | — |
|
|
34
|
+
| `readonly` | `boolean \| null` | — | no | — |
|
|
35
|
+
| `screenPadding` | `number \| null` | — | no | — |
|
|
36
|
+
| `width` | `string \| number \| null` | — | no | — |
|
|
37
|
+
|
|
38
|
+
**SMenu slots**
|
|
39
|
+
|
|
40
|
+
| Slot | Slot props |
|
|
41
|
+
| --- | --- |
|
|
42
|
+
| `activator` | `{ on: { click: () => void; }; attrs: Partial<PropsRequired<{ disabled: boolean \| null \| undefined; readonly: boolean \| null \| undefined; }>>; }` |
|
|
43
|
+
| `default` | `{}` |
|
|
44
|
+
|
|
45
|
+
**SMenu events**
|
|
46
|
+
|
|
47
|
+
| Event | Payload |
|
|
48
|
+
| --- | --- |
|
|
49
|
+
| `close` | `[]` |
|
|
50
|
+
| `update:modelValue` | `[value: boolean \| undefined]` |
|
|
51
|
+
|
|
52
|
+
<!-- generated:api:end SMenu -->
|
|
53
|
+
|
|
54
|
+
**SMenu notes**
|
|
55
|
+
|
|
56
|
+
- `location`: `'bottom'`, `'top'`, `'left'`, `'right'` (combinable, e.g. `'bottom right'`). **Unset = opens over the activator**
|
|
57
|
+
- `closeOnContentClick`: Close when the menu content is clicked
|
|
58
|
+
- `closeOnScroll`: Close on window scroll
|
|
59
|
+
- `position`: `'fixed'` positions relative to the viewport (use inside fixed containers)
|
|
60
|
+
- `offsetX` / `offsetY`: Extra offset in px
|
|
61
|
+
- `screenPadding`: Gap in px the menu keeps from the viewport edges (default 8)
|
|
62
|
+
- `contentClass`: Classes on the content element
|
|
63
|
+
- `contentStyle`: Styles on the content element
|
|
64
|
+
- `preventCloseOnClick`: Activator click only opens, never closes
|
|
65
|
+
- `disabled`: Passed to the activator via `attrs` (disables the trigger)
|
|
66
|
+
- `width` / `height` / `min*` / `max*`: Content dimensions (min-width defaults to activator width)
|
|
67
|
+
- `activator` (slot): Trigger. Bind **both** `v-on="on"` and `v-bind="attrs"`
|
|
68
|
+
- `default` (slot): Menu content
|
|
69
|
+
- `close` (event): Emitted whenever the model changes to `false`
|
|
24
70
|
|
|
25
71
|
## Model
|
|
26
72
|
|
|
27
73
|
`v-model: boolean` — optional; the menu works uncontrolled too.
|
|
28
74
|
|
|
29
|
-
## Slots
|
|
30
|
-
|
|
31
|
-
| Slot | Scoped data | Description |
|
|
32
|
-
|------|-------------|-------------|
|
|
33
|
-
| `activator` | `{ on, attrs }` | Trigger. Bind **both** `v-on="on"` and `v-bind="attrs"` |
|
|
34
|
-
| `default` | — | Menu content |
|
|
35
|
-
|
|
36
|
-
## Events
|
|
37
|
-
|
|
38
|
-
| Event | Payload | Description |
|
|
39
|
-
|-------|---------|-------------|
|
|
40
|
-
| `close` | — | Emitted whenever the model changes to `false` |
|
|
41
|
-
|
|
42
75
|
## Usage
|
|
43
76
|
|
|
44
77
|
```vue
|
|
@@ -72,3 +105,6 @@ Types: `node_modules/@khsura/sui/@types/definitions/props/propsMenu.d.ts`
|
|
|
72
105
|
|
|
73
106
|
- The app must be wrapped in `<SApp>` (menus teleport into its overlay container).
|
|
74
107
|
- `closeOnClick` exists in the prop types but has no effect; outside clicks always close the menu.
|
|
108
|
+
- The menu stays inside the viewport: it flips above or below its activator when the other side has room, otherwise shifts, and keeps an 8px gutter from every edge (`screenPadding` overrides the gutter). It follows its activator when the page or a scroll container scrolls, so a row menu inside an `SList` or table is safe.
|
|
109
|
+
- The menu is as wide as its items (capped at 90vw), so list titles are not cut off.
|
|
110
|
+
- Esc closes the menu and returns focus to the activator.
|
|
@@ -6,22 +6,41 @@ Low-level layer primitive. Teleports its slot into the overlay container rendere
|
|
|
6
6
|
|
|
7
7
|
Types: `node_modules/@khsura/sui/@types/definitions/props/propsOverlay.d.ts`
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
|
15
|
-
|
|
|
16
|
-
| `
|
|
17
|
-
| `
|
|
18
|
-
| `
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
9
|
+
<!-- generated:api:start SOverlay -->
|
|
10
|
+
<!-- Generated from sui-api.json by `yarn sync:skills` (packages/app). Do not edit by hand. -->
|
|
11
|
+
|
|
12
|
+
**SOverlay props**
|
|
13
|
+
|
|
14
|
+
| Prop | Type | Default | Required | Values |
|
|
15
|
+
| --- | --- | --- | --- | --- |
|
|
16
|
+
| `disabled` | `boolean` | — | no | — |
|
|
17
|
+
| `position` | `Position` | — | no | `absolute`, `fixed`, `relative`, `static`, `sticky` |
|
|
18
|
+
| `scrim` | `boolean` | — | no | — |
|
|
19
|
+
| `transition` | `string` | — | no | — |
|
|
20
|
+
| `value` | `boolean \| null` | — | no | — |
|
|
21
|
+
| `zIndex` | `number` | — | no | — |
|
|
22
|
+
|
|
23
|
+
**SOverlay slots**
|
|
24
|
+
|
|
25
|
+
| Slot | Slot props |
|
|
26
|
+
| --- | --- |
|
|
27
|
+
| `default` | `{ attrs: { class: string; }; value: true; }` |
|
|
28
|
+
|
|
29
|
+
**SOverlay events**
|
|
30
|
+
|
|
31
|
+
None.
|
|
32
|
+
|
|
33
|
+
<!-- generated:api:end SOverlay -->
|
|
34
|
+
|
|
35
|
+
**SOverlay notes**
|
|
36
|
+
|
|
37
|
+
- `value`: Show/hide the slot (and scrim)
|
|
38
|
+
- `scrim`: 50% black backdrop; makes the layer `position: fixed; inset: 0`
|
|
39
|
+
- `zIndex`: z-index of the layer (only with `scrim` or `position="fixed"`)
|
|
40
|
+
- `position`: `'fixed'` wraps content in the full-viewport layer without a scrim
|
|
41
|
+
- `transition`: Vue `<Transition>` name for the content
|
|
42
|
+
- `disabled`: Disables the teleport (renders in place)
|
|
43
|
+
- `default` (slot): Content, rendered only while `value` is true. Bind `v-bind="attrs"` (adds the content class: absolute, clickable)
|
|
25
44
|
|
|
26
45
|
## Events
|
|
27
46
|
|
|
@@ -10,19 +10,44 @@ Types: `node_modules/@khsura/sui/@types/definitions/props/propsProgressLinear.d.
|
|
|
10
10
|
|
|
11
11
|
Horizontal progress bar.
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
|
19
|
-
|
|
|
20
|
-
| `
|
|
21
|
-
| `
|
|
22
|
-
|
|
23
|
-
|
|
|
24
|
-
|
|
25
|
-
| `
|
|
13
|
+
<!-- generated:api:start SProgressLinear -->
|
|
14
|
+
<!-- Generated from sui-api.json by `yarn sync:skills` (packages/app). Do not edit by hand. -->
|
|
15
|
+
|
|
16
|
+
**SProgressLinear props**
|
|
17
|
+
|
|
18
|
+
| Prop | Type | Default | Required | Values | Description |
|
|
19
|
+
| --- | --- | --- | --- | --- | --- |
|
|
20
|
+
| `ariaLabel` | `string` | `"Loading"` | no | — | Accessible name of the progress bar. Defaults to `'Loading'`; name what is loading when you can. |
|
|
21
|
+
| `backgroundColor` | `string \| null` | — | no | — | — |
|
|
22
|
+
| `backgroundOpacity` | `string \| number \| null` | — | no | — | — |
|
|
23
|
+
| `color` | `string` | `"info"` | no | — | — |
|
|
24
|
+
| `indeterminate` | `boolean` | — | no | — | — |
|
|
25
|
+
| `position` | `Position` | — | no | `absolute`, `fixed`, `relative`, `static`, `sticky` | — |
|
|
26
|
+
| `size` | `string \| number \| null` | — | no | — | — |
|
|
27
|
+
| `value` | `string \| number` | `0` | no | — | — |
|
|
28
|
+
|
|
29
|
+
**SProgressLinear slots**
|
|
30
|
+
|
|
31
|
+
| Slot | Slot props |
|
|
32
|
+
| --- | --- |
|
|
33
|
+
| `default` | `{}` |
|
|
34
|
+
|
|
35
|
+
**SProgressLinear events**
|
|
36
|
+
|
|
37
|
+
None.
|
|
38
|
+
|
|
39
|
+
<!-- generated:api:end SProgressLinear -->
|
|
40
|
+
|
|
41
|
+
**SProgressLinear notes**
|
|
42
|
+
|
|
43
|
+
- `value`: Progress 0–100
|
|
44
|
+
- `indeterminate`: Animated, unknown duration
|
|
45
|
+
- `color`: Bar color (preset name or CSS color)
|
|
46
|
+
- `backgroundColor`: Track color. Falls back to `color`
|
|
47
|
+
- `backgroundOpacity`: Track opacity
|
|
48
|
+
- `size`: Bar height (number = px)
|
|
49
|
+
- `position`: Only `fixed` and `absolute` add positioning styles
|
|
50
|
+
- `default` (slot): Rendered inside the bar container (e.g. a label)
|
|
26
51
|
|
|
27
52
|
No events.
|
|
28
53
|
|
|
@@ -32,19 +57,44 @@ No events.
|
|
|
32
57
|
|
|
33
58
|
Circular progress / spinner.
|
|
34
59
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
|
41
|
-
|
|
|
42
|
-
| `
|
|
43
|
-
| `
|
|
44
|
-
|
|
45
|
-
|
|
|
46
|
-
|
|
47
|
-
| `
|
|
60
|
+
<!-- generated:api:start SProgressCircular -->
|
|
61
|
+
<!-- Generated from sui-api.json by `yarn sync:skills` (packages/app). Do not edit by hand. -->
|
|
62
|
+
|
|
63
|
+
**SProgressCircular props**
|
|
64
|
+
|
|
65
|
+
| Prop | Type | Default | Required | Values | Description |
|
|
66
|
+
| --- | --- | --- | --- | --- | --- |
|
|
67
|
+
| `ariaLabel` | `string` | `"Loading"` | no | — | Accessible name of the progress bar. Defaults to `'Loading'`; name what is loading when you can. |
|
|
68
|
+
| `color` | `string \| null` | — | no | — | — |
|
|
69
|
+
| `indeterminate` | `boolean` | — | no | — | — |
|
|
70
|
+
| `rotate` | `number` | — | no | — | — |
|
|
71
|
+
| `size` | `string \| number` | `32` | no | — | — |
|
|
72
|
+
| `theme` | `AppThemeType` | — | no | `dark`, `light` | — |
|
|
73
|
+
| `value` | `number` | `0` | no | — | — |
|
|
74
|
+
| `width` | `number` | `4` | no | — | — |
|
|
75
|
+
|
|
76
|
+
**SProgressCircular slots**
|
|
77
|
+
|
|
78
|
+
| Slot | Slot props |
|
|
79
|
+
| --- | --- |
|
|
80
|
+
| `default` | `{}` |
|
|
81
|
+
|
|
82
|
+
**SProgressCircular events**
|
|
83
|
+
|
|
84
|
+
None.
|
|
85
|
+
|
|
86
|
+
<!-- generated:api:end SProgressCircular -->
|
|
87
|
+
|
|
88
|
+
**SProgressCircular notes**
|
|
89
|
+
|
|
90
|
+
- `value`: Progress 0–100 (clamped)
|
|
91
|
+
- `indeterminate`: Spinning state
|
|
92
|
+
- `color`: Arc color (text-color based, inherits `currentColor`)
|
|
93
|
+
- `size`: Diameter in px. Must be numeric (`'2rem'` breaks)
|
|
94
|
+
- `width`: Stroke width in px
|
|
95
|
+
- `rotate`: Starting angle offset in degrees
|
|
96
|
+
- `theme`: Theme override
|
|
97
|
+
- `default` (slot): Content centered in the circle
|
|
48
98
|
|
|
49
99
|
No events.
|
|
50
100
|
|