@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.
Files changed (133) hide show
  1. package/@types/components/cards/sCardText.vue.d.ts +2 -2
  2. package/@types/components/datePicker/sDatePickerSwitch.vue.d.ts +2 -0
  3. package/@types/components/form/index.d.ts +1 -0
  4. package/@types/components/form/radio/sRadio.vue.d.ts +3 -0
  5. package/@types/components/form/sFormRow.vue.d.ts +18 -0
  6. package/@types/components/form/sInput.vue.d.ts +1 -0
  7. package/@types/components/form/sSelect.vue.d.ts +2 -0
  8. package/@types/components/layout/sNavigationDrawer.vue.d.ts +6 -6
  9. package/@types/components/progress/sProgressCircular.vue.d.ts +1 -0
  10. package/@types/components/progress/sProgressLinear.vue.d.ts +1 -0
  11. package/@types/components/sAutocomplete.vue.d.ts +3 -0
  12. package/@types/components/slideGroup/sSlideGroup.vue.d.ts +4 -1
  13. package/@types/components/table/sTable.vue.d.ts +17 -96
  14. package/@types/components/tabs/sTabs.vue.d.ts +2 -2
  15. package/@types/configs/app.d.ts +4 -0
  16. package/@types/configs/i18n.d.ts +3 -0
  17. package/@types/configs/provider.d.ts +1 -0
  18. package/@types/constants/color.d.ts +15 -0
  19. package/@types/constants/cssVariables.d.ts +4 -0
  20. package/@types/constants/datePicker.d.ts +7 -0
  21. package/@types/constants/i18n.d.ts +3 -0
  22. package/@types/constants/index.d.ts +3 -0
  23. package/@types/constants/keyboard.d.ts +12 -0
  24. package/@types/constants/listbox.d.ts +1 -0
  25. package/@types/constants/overlay.d.ts +5 -0
  26. package/@types/constants/tabs.d.ts +4 -0
  27. package/@types/definitions/props/core/propsLink.d.ts +2 -2
  28. package/@types/definitions/props/propsAutocomplete.d.ts +6 -0
  29. package/@types/definitions/props/propsInput.d.ts +1 -0
  30. package/@types/definitions/props/propsLink.d.ts +2 -2
  31. package/@types/definitions/props/propsProgressCircular.d.ts +2 -0
  32. package/@types/definitions/props/propsProgressLinear.d.ts +2 -0
  33. package/@types/definitions/props/propsSelect.d.ts +4 -0
  34. package/@types/definitions/props/propsSlideGroup.d.ts +4 -0
  35. package/@types/definitions/props/propsTable.d.ts +1 -0
  36. package/@types/definitions/props/propsTextarea.d.ts +3 -0
  37. package/@types/helpers/colorHelpers.d.ts +1 -1
  38. package/@types/helpers/createAppStore.d.ts +4 -0
  39. package/@types/lib/color.d.ts +21 -2
  40. package/@types/lib/index.d.ts +4 -0
  41. package/@types/lib/linkLocation.d.ts +9 -0
  42. package/@types/lib/overlayPlacement.d.ts +11 -0
  43. package/@types/lib/revealInScroller.d.ts +11 -0
  44. package/@types/lib/safeArea.d.ts +3 -0
  45. package/@types/playwright.visual.config.d.ts +3 -0
  46. package/@types/services/backgroundScrollService.d.ts +8 -2
  47. package/@types/services/datePicker/datePickerItemDateService.d.ts +1 -0
  48. package/@types/services/dialogService.d.ts +4 -8
  49. package/@types/services/fieldLayoutService.d.ts +19 -0
  50. package/@types/services/formInputService.d.ts +6 -0
  51. package/@types/services/index.d.ts +7 -0
  52. package/@types/services/linkService.d.ts +11 -1
  53. package/@types/services/listboxNavigationService.d.ts +20 -0
  54. package/@types/services/menuService.d.ts +2 -0
  55. package/@types/services/overlayFocusService.d.ts +10 -0
  56. package/@types/services/routerLinkService.d.ts +19 -0
  57. package/@types/services/scrollableFocusService.d.ts +10 -0
  58. package/@types/services/surfaceTextColorService.d.ts +8 -0
  59. package/@types/services/tabsService.d.ts +9 -0
  60. package/@types/store/index.d.ts +1 -0
  61. package/@types/store/scrollLockStore.d.ts +1 -0
  62. package/@types/tests/visual/constants/a11yAudit.d.ts +4 -0
  63. package/@types/tests/visual/constants/index.d.ts +4 -0
  64. package/@types/tests/visual/constants/resizeScroll.d.ts +10 -0
  65. package/@types/tests/visual/constants/storyRender.d.ts +5 -0
  66. package/@types/tests/visual/constants/visualMatrix.d.ts +20 -0
  67. package/@types/tests/visual/schemas/index.d.ts +1 -0
  68. package/@types/tests/visual/schemas/storyIndex.d.ts +17 -0
  69. package/@types/tests/visual/types/a11yAudit.d.ts +2 -0
  70. package/@types/tests/visual/types/index.d.ts +2 -0
  71. package/@types/tests/visual/types/visualStory.d.ts +8 -0
  72. package/@types/types/app.d.ts +2 -0
  73. package/@types/types/breadcrumbs.d.ts +2 -2
  74. package/@types/types/index.d.ts +2 -0
  75. package/@types/types/link.d.ts +20 -0
  76. package/@types/types/menu.d.ts +17 -0
  77. package/@types/types/safeArea.d.ts +1 -0
  78. package/@types/types/table.d.ts +45 -0
  79. package/@types/vite.config.d.ts +1 -0
  80. package/README.md +22 -31
  81. package/dist/base.css.map +1 -1
  82. package/dist/s-ui.css +1 -1
  83. package/dist/s-ui.js +3122 -2478
  84. package/dist/s-ui.umd.cjs +1 -1
  85. package/dist/styles/components/button/mixins.scss +5 -0
  86. package/dist/styles/components/form/_variables.scss +11 -0
  87. package/dist/styles/components/form/index.scss +1 -0
  88. package/dist/styles/components/index.scss +1 -0
  89. package/dist/styles/mixins/_app.scss +7 -0
  90. package/dist/styles/tools/_safeArea.scss +8 -0
  91. package/dist/styles/tools/index.scss +1 -0
  92. package/dist/sui-api.json +10128 -0
  93. package/package.json +30 -6
  94. package/sui-plugin/.claude-plugin/plugin.json +2 -2
  95. package/sui-plugin/README.md +24 -1
  96. package/sui-plugin/skills/sui-component/SKILL.md +13 -3
  97. package/sui-plugin/skills/sui-component/references/alert.md +30 -14
  98. package/sui-plugin/skills/sui-component/references/autocomplete.md +96 -34
  99. package/sui-plugin/skills/sui-component/references/badge.md +55 -29
  100. package/sui-plugin/skills/sui-component/references/breadcrumbs.md +33 -19
  101. package/sui-plugin/skills/sui-component/references/button.md +76 -37
  102. package/sui-plugin/skills/sui-component/references/calendar.md +64 -34
  103. package/sui-plugin/skills/sui-component/references/cards.md +142 -25
  104. package/sui-plugin/skills/sui-component/references/carousel.md +107 -42
  105. package/sui-plugin/skills/sui-component/references/chip.md +52 -28
  106. package/sui-plugin/skills/sui-component/references/date-picker.md +148 -61
  107. package/sui-plugin/skills/sui-component/references/dialog.md +60 -21
  108. package/sui-plugin/skills/sui-component/references/divider.md +15 -6
  109. package/sui-plugin/skills/sui-component/references/droppable.md +36 -16
  110. package/sui-plugin/skills/sui-component/references/expansion-panels.md +107 -30
  111. package/sui-plugin/skills/sui-component/references/form.md +483 -35
  112. package/sui-plugin/skills/sui-component/references/icon.md +30 -11
  113. package/sui-plugin/skills/sui-component/references/image.md +39 -17
  114. package/sui-plugin/skills/sui-component/references/layout.md +456 -69
  115. package/sui-plugin/skills/sui-component/references/list.md +223 -52
  116. package/sui-plugin/skills/sui-component/references/menu.md +64 -28
  117. package/sui-plugin/skills/sui-component/references/overlay.md +35 -16
  118. package/sui-plugin/skills/sui-component/references/progress.md +76 -26
  119. package/sui-plugin/skills/sui-component/references/sheet.md +46 -23
  120. package/sui-plugin/skills/sui-component/references/slide-group.md +77 -38
  121. package/sui-plugin/skills/sui-component/references/snackbar.md +48 -17
  122. package/sui-plugin/skills/sui-component/references/split-view.md +51 -12
  123. package/sui-plugin/skills/sui-component/references/stepper.md +58 -23
  124. package/sui-plugin/skills/sui-component/references/table.md +123 -55
  125. package/sui-plugin/skills/sui-component/references/tabs.md +78 -30
  126. package/sui-plugin/skills/sui-component/references/toggle-button-group.md +85 -39
  127. package/sui-plugin/skills/sui-component/references/toolbar.md +92 -33
  128. package/sui-plugin/skills/sui-component/references/tooltip.md +58 -20
  129. package/sui-plugin/skills/sui-component/references/window.md +89 -29
  130. package/sui-plugin/skills/sui-form/SKILL.md +23 -16
  131. package/sui-plugin/skills/sui-getting-started/SKILL.md +60 -44
  132. package/sui-plugin/skills/sui-layout/SKILL.md +3 -1
  133. 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
- ### Props
14
-
15
- | Prop | Type | Default | Description |
16
- |------|------|---------|-------------|
17
- | `divided` | `boolean` | `false` | Border between items |
18
- | `lines` | `number` (1–6) | `undefined` | Line clamp for `SListItemSubtitle` (the subtitle clamps to 2 lines when this is unset) |
19
- | `outlined` | `boolean` | `false` | Outlined border. `color` then sets the **text** color |
20
- | `dense` | `boolean` | `false` | No list padding, 40px rows, dense title/icon/action |
21
- | `link` | `boolean` | `false` | Hover style + pointer on every item |
22
- | `text` | `boolean` | `false` | `color` sets the text color instead of the background |
23
- | `color` | `string` | `undefined` | Background color (or text color with `outlined`/`text`) |
24
- | `colorThreshold` | `number` | `undefined` | Contrast threshold for custom colors |
25
- | `tag` | `'ul' \| 'ol' \| 'div'` | `'div'` | Root element |
26
- | `inset` | `boolean` | `false` | Declared, but has no styling (no visible effect) |
27
-
28
- ### Slots
29
-
30
- | Slot | Description |
31
- |------|-------------|
32
- | `default` | `SListItem`, `SListItemGroup`, `SDivider`, … |
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
- ### Props
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
- | Prop | Type | Default | Description |
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
- ### Slots
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
- | Slot | Description |
56
- |------|-------------|
57
- | `default` | Item content |
82
+ **SListItem slots**
58
83
 
59
- ### Events
84
+ | Slot | Slot props |
85
+ | --- | --- |
86
+ | `default` | `{}` |
60
87
 
61
- | Event | Payload | Description |
62
- |-------|---------|-------------|
63
- | `click` | `Event` | Item clicked |
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
- | Prop | Type | Default | Description |
80
- |------|------|---------|-------------|
81
- | `alignCenter` | `boolean` | `false` | Vertically center the content |
82
- | `dense` | `boolean` | `false` | Dense sizing (the parent list's `dense` takes precedence) |
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
- | Prop / Model | Type | Default | Description |
91
- |--------------|------|---------|-------------|
92
- | `v-model` | `boolean` | `false` | Expanded state |
93
- | `title` | `string \| null` | `null` | Header title |
94
- | `subtitle` | `string \| null` | `null` | Header subtitle |
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
- | Slot | Description |
97
- |------|-------------|
98
- | `activator` | Replaces the default header row (no slot props; toggle `v-model` yourself) |
99
- | `default` | Items shown when expanded |
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
- ## Props
10
-
11
- | Prop | Type | Default | Description |
12
- |------|------|---------|-------------|
13
- | `location` | `string \| string[]` | `undefined` | `'bottom'`, `'top'`, `'left'`, `'right'` (combinable, e.g. `'bottom right'`). **Unset = opens over the activator** |
14
- | `closeOnContentClick` | `boolean` | `false` | Close when the menu content is clicked |
15
- | `closeOnScroll` | `boolean` | `false` | Close on window scroll |
16
- | `position` | `'fixed' \| 'absolute' \| ...` | `undefined` | `'fixed'` positions relative to the viewport (use inside fixed containers) |
17
- | `offsetX` / `offsetY` | `number \| null` | `undefined` | Extra offset in px |
18
- | `screenPadding` | `number \| null` | `undefined` | Shift left by this many px when the menu would overflow the right edge |
19
- | `contentClass` | `string \| string[] \| Record<string, boolean>` | `undefined` | Classes on the content element |
20
- | `contentStyle` | `StyleValue` | `undefined` | Styles on the content element |
21
- | `preventCloseOnClick` | `boolean` | `false` | Activator click only opens, never closes |
22
- | `disabled` | `boolean` | `false` | Passed to the activator via `attrs` (disables the trigger) |
23
- | `width` / `height` / `min*` / `max*` | `string \| number` | `undefined` | Content dimensions (min-width defaults to activator width) |
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
- ## Props
10
-
11
- | Prop | Type | Default | Description |
12
- |------|------|---------|-------------|
13
- | `value` | `boolean \| null` | `undefined` | Show/hide the slot (and scrim) |
14
- | `scrim` | `boolean` | `false` | 50% black backdrop; makes the layer `position: fixed; inset: 0` |
15
- | `zIndex` | `number` | `undefined` | z-index of the layer (only with `scrim` or `position="fixed"`) |
16
- | `position` | `'fixed' \| ...` | `undefined` | `'fixed'` wraps content in the full-viewport layer without a scrim |
17
- | `transition` | `string` | `undefined` | Vue `<Transition>` name for the content |
18
- | `disabled` | `boolean` | `false` | Disables the teleport (renders in place) |
19
-
20
- ## Slots
21
-
22
- | Slot | Scoped data | Description |
23
- |------|-------------|-------------|
24
- | `default` | `{ attrs, value }` | Content, rendered only while `value` is true. Bind `v-bind="attrs"` (adds the content class: absolute, clickable) |
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
- | Prop | Type | Default | Description |
14
- |------|------|---------|-------------|
15
- | `value` | `number \| string` | `0` | Progress 0–100 |
16
- | `indeterminate` | `boolean` | `false` | Animated, unknown duration |
17
- | `color` | `string` | `'info'` | Bar color (preset name or CSS color) |
18
- | `backgroundColor` | `string \| null` | `undefined` | Track color. Falls back to `color` |
19
- | `backgroundOpacity` | `string \| number \| null` | `undefined` | Track opacity |
20
- | `size` | `string \| number \| null` | `undefined` | Bar height (number = px) |
21
- | `position` | `'static' \| 'fixed' \| 'absolute' \| 'relative' \| 'sticky'` | `undefined` | Only `fixed` and `absolute` add positioning styles |
22
-
23
- | Slot | Description |
24
- |------|-------------|
25
- | `default` | Rendered inside the bar container (e.g. a label) |
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
- | Prop | Type | Default | Description |
36
- |------|------|---------|-------------|
37
- | `value` | `number` | `0` | Progress 0–100 (clamped) |
38
- | `indeterminate` | `boolean` | `false` | Spinning state |
39
- | `color` | `string \| null` | `undefined` | Arc color (text-color based, inherits `currentColor`) |
40
- | `size` | `number \| string` | `32` | Diameter in px. Must be numeric (`'2rem'` breaks) |
41
- | `width` | `number` | `4` | Stroke width in px |
42
- | `rotate` | `number` | `undefined` | Starting angle offset in degrees |
43
- | `theme` | `AppThemeType` | `undefined` | Theme override |
44
-
45
- | Slot | Description |
46
- |------|-------------|
47
- | `default` | Content centered in the circle |
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