@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
|
@@ -6,32 +6,55 @@ A plain surface with the app `card` background. It supports color, elevation, bo
|
|
|
6
6
|
|
|
7
7
|
Types: `node_modules/@khsura/sui/@types/definitions/props/propsSheet.d.ts`
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
|
15
|
-
|
|
|
16
|
-
| `
|
|
17
|
-
| `
|
|
18
|
-
| `
|
|
19
|
-
| `
|
|
20
|
-
| `
|
|
21
|
-
| `
|
|
22
|
-
| `maxWidth`
|
|
23
|
-
| `
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
|
28
|
-
|
|
29
|
-
| `
|
|
30
|
-
|
|
31
|
-
|
|
9
|
+
<!-- generated:api:start SSheet -->
|
|
10
|
+
<!-- Generated from sui-api.json by `yarn sync:skills` (packages/app). Do not edit by hand. -->
|
|
11
|
+
|
|
12
|
+
**SSheet props**
|
|
13
|
+
|
|
14
|
+
| Prop | Type | Default | Required | Values |
|
|
15
|
+
| --- | --- | --- | --- | --- |
|
|
16
|
+
| `borderRadius` | `` number \| "tile" \| "rounded" \| `${number}em` \| `${number}px` \| `${number}rem` \| `${number}%` \| `${number}vh` \| `${number}vw` \| null `` | — | no | — |
|
|
17
|
+
| `color` | `string` | — | no | — |
|
|
18
|
+
| `colorThreshold` | `number` | — | no | — |
|
|
19
|
+
| `elevation` | `"" \| 0 \| 1 \| 2 \| 22 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10 \| 11 \| 12 \| 13 \| 14 \| 15 \| 16 \| 17 \| 18 \| 19 \| 20 \| 21 \| 23 \| 24 \| "1" \| "2" \| "3" \| "4" \| "5" \| "6" \| "7" \| "8" \| "9" \| "10" \| "11" \| "12" \| "13" \| "14" \| "15" \| "16" \| "17" \| "18" \| "19" \| "20" \| "21" \| "22" \| "23" \| "24" \| null` | — | no | — |
|
|
20
|
+
| `height` | `string \| number \| null` | — | no | — |
|
|
21
|
+
| `maxHeight` | `string \| number \| null` | — | no | — |
|
|
22
|
+
| `maxWidth` | `string \| number \| null` | — | no | — |
|
|
23
|
+
| `minHeight` | `string \| number \| null` | — | no | — |
|
|
24
|
+
| `minWidth` | `string \| number \| null` | — | no | — |
|
|
25
|
+
| `outlined` | `boolean \| null` | — | no | — |
|
|
26
|
+
| `tag` | `HtmlTagName \| null` | — | no | `a`, `abbr`, `acronym`, `address`, `applet`, `area`, `article`, `aside`, `audio`, `b`, `base`, `basefont`, `bdi`, `bdo`, `big`, `blockquote`, `body`, `br`, `button`, `canvas`, `caption`, `center`, `cite`, `code`, `col`, `colgroup`, `data`, `datalist`, `dd`, `del`, `details`, `dfn`, `dialog`, `dir`, `div`, `dl`, `dt`, `em`, `embed`, `fieldset`, `figcaption`, `figure`, `font`, `footer`, `form`, `frame`, `frameset`, `h1`, `h1> to <h6`, `h2`, `h3`, `h4`, `h5`, `h6`, `head`, `header`, `hr`, `html`, `i`, `iframe`, `img`, `input`, `ins`, `kbd`, `label`, `legend`, `li`, `link`, `main`, `map`, `mark`, `meta`, `meter`, `nav`, `noframes`, `noscript`, `object`, `ol`, `optgroup`, `option`, `output`, `p`, `param`, `picture`, `pre`, `progress`, `q`, `rp`, `rt`, `ruby`, `s`, `samp`, `script`, `section`, `select`, `small`, `source`, `span`, `strike`, `strong`, `style`, `sub`, `summary`, `sup`, `svg`, `table`, `tbody`, `td`, `template`, `textarea`, `tfoot`, `th`, `thead`, `time`, `title`, `tr`, `track`, `tt`, `u`, `ul`, `var`, `video`, `wbr` |
|
|
27
|
+
| `theme` | `AppThemeType` | — | no | `dark`, `light` |
|
|
28
|
+
| `underlined` | `boolean \| null` | — | no | — |
|
|
29
|
+
| `width` | `string \| number \| null` | — | no | — |
|
|
30
|
+
|
|
31
|
+
**SSheet slots**
|
|
32
|
+
|
|
33
|
+
| Slot | Slot props |
|
|
34
|
+
| --- | --- |
|
|
35
|
+
| `default` | `{}` |
|
|
36
|
+
|
|
37
|
+
**SSheet events**
|
|
32
38
|
|
|
33
39
|
None.
|
|
34
40
|
|
|
41
|
+
<!-- generated:api:end SSheet -->
|
|
42
|
+
|
|
43
|
+
**SSheet notes**
|
|
44
|
+
|
|
45
|
+
- `color`: Background: preset/app color name or CSS color
|
|
46
|
+
- `colorThreshold`: Luminance threshold used to pick light/dark text on a custom color
|
|
47
|
+
- `theme`: Force light/dark text styling
|
|
48
|
+
- `elevation`: Shadow depth (default: `undefined` (no shadow))
|
|
49
|
+
- `outlined`: Border
|
|
50
|
+
- `underlined`: Bottom border only
|
|
51
|
+
- `borderRadius`: Border radius
|
|
52
|
+
- `tag`: Root element (default: `'div'`)
|
|
53
|
+
- `width` / `height`: Dimensions
|
|
54
|
+
- `maxWidth` / `maxHeight`: Max dimensions
|
|
55
|
+
- `minWidth` / `minHeight`: Min dimensions
|
|
56
|
+
- `default` (slot): Sheet content
|
|
57
|
+
|
|
35
58
|
## Usage
|
|
36
59
|
|
|
37
60
|
```vue
|
|
@@ -10,57 +10,96 @@ Types: `node_modules/@khsura/sui/@types/definitions/props/propsSlideGroup.d.ts`
|
|
|
10
10
|
|
|
11
11
|
## SSlideGroup
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
|
19
|
-
|
|
|
20
|
-
| `
|
|
21
|
-
| `
|
|
22
|
-
| `
|
|
23
|
-
| `
|
|
24
|
-
| `
|
|
25
|
-
| `
|
|
13
|
+
<!-- generated:api:start SSlideGroup -->
|
|
14
|
+
<!-- Generated from sui-api.json by `yarn sync:skills` (packages/app). Do not edit by hand. -->
|
|
15
|
+
|
|
16
|
+
**SSlideGroup props**
|
|
17
|
+
|
|
18
|
+
| Prop | Type | Default | Required | Values | Description |
|
|
19
|
+
| --- | --- | --- | --- | --- | --- |
|
|
20
|
+
| `activeClass` | `string \| null` | — | no | — | — |
|
|
21
|
+
| `centerActive` | `boolean` | — | no | — | — |
|
|
22
|
+
| `contentClass` | `string \| string[] \| Record<string, boolean>` | — | no | — | — |
|
|
23
|
+
| `contentStyle` | `StyleValue` | — | no | — | — |
|
|
24
|
+
| `mandatory` | `boolean` | — | no | — | — |
|
|
25
|
+
| `modelValue` | `GroupItemValue[]` | `[]` | no | — | — |
|
|
26
|
+
| `multiple` | `boolean` | — | no | — | — |
|
|
27
|
+
| `nextAriaLabel` | `string` | `"Next"` | no | — | Accessible name of the next arrow button. Defaults to `'Next'`. |
|
|
28
|
+
| `prevAriaLabel` | `string` | `"Previous"` | no | — | Accessible name of the previous arrow button. Defaults to `'Previous'`. |
|
|
29
|
+
| `scrollable` | `boolean \| null` | — | no | — | — |
|
|
30
|
+
| `slideStep` | `number \| null` | — | no | — | — |
|
|
31
|
+
|
|
32
|
+
**SSlideGroup slots**
|
|
33
|
+
|
|
34
|
+
| Slot | Slot props |
|
|
35
|
+
| --- | --- |
|
|
36
|
+
| `default` | `{}` |
|
|
37
|
+
| `left` | `{ attrs: { disabled: boolean; }; on: { click: () => Promise<void>; }; }` |
|
|
38
|
+
| `right` | `{ attrs: { disabled: boolean; }; on: { click: () => Promise<void>; }; }` |
|
|
39
|
+
|
|
40
|
+
**SSlideGroup events**
|
|
41
|
+
|
|
42
|
+
| Event | Payload |
|
|
43
|
+
| --- | --- |
|
|
44
|
+
| `update:modelValue` | `[value: GroupItemValue[]]` |
|
|
45
|
+
|
|
46
|
+
<!-- generated:api:end SSlideGroup -->
|
|
47
|
+
|
|
48
|
+
**SSlideGroup notes**
|
|
49
|
+
|
|
50
|
+
- `modelValue` (`v-model`): Selected item identifiers — **always an array**, even for single selection
|
|
51
|
+
- `multiple`: Allow several selected items
|
|
52
|
+
- `mandatory`: Keep at least one selected (auto-selects the first item when empty)
|
|
53
|
+
- `scrollable`: `true` = native swipe/scroll, **no arrows**. `false` = arrows (shown only when items overflow), no manual scrolling
|
|
54
|
+
- `slideStep`: Items to move per arrow click (default: one viewport width)
|
|
55
|
+
- `centerActive`: Scroll the clicked/selected item to the center
|
|
56
|
+
- `activeClass`: Class added to selected items
|
|
57
|
+
- `contentClass`: Class for the inner content row
|
|
58
|
+
- `contentStyle`: Style for the inner content row
|
|
59
|
+
- `default` (slot): `SSlideItem` components
|
|
60
|
+
- `left` (slot): Custom "previous" button
|
|
61
|
+
- `right` (slot): Custom "next" button
|
|
62
|
+
- `update:modelValue` (event): Selection changed
|
|
26
63
|
|
|
27
64
|
`GroupItemValue` = `string | number | boolean | symbol`.
|
|
28
65
|
|
|
29
|
-
|
|
66
|
+
---
|
|
30
67
|
|
|
31
|
-
|
|
32
|
-
|------|-------------|-------------|
|
|
33
|
-
| `default` | — | `SSlideItem` components |
|
|
34
|
-
| `left` | `{ attrs: { disabled }, on: { click } }` | Custom "previous" button |
|
|
35
|
-
| `right` | `{ attrs: { disabled }, on: { click } }` | Custom "next" button |
|
|
68
|
+
## SSlideItem
|
|
36
69
|
|
|
37
|
-
|
|
70
|
+
Must be inside `SSlideGroup` (throws otherwise). Clicking the item toggles its selection.
|
|
38
71
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
| `update:modelValue` | `GroupItemValue[]` | Selection changed |
|
|
72
|
+
<!-- generated:api:start SSlideItem -->
|
|
73
|
+
<!-- Generated from sui-api.json by `yarn sync:skills` (packages/app). Do not edit by hand. -->
|
|
42
74
|
|
|
43
|
-
|
|
75
|
+
**SSlideItem props**
|
|
44
76
|
|
|
45
|
-
|
|
77
|
+
| Prop | Type | Default | Required | Values |
|
|
78
|
+
| --- | --- | --- | --- | --- |
|
|
79
|
+
| `activeClass` | `string \| null` | — | no | — |
|
|
80
|
+
| `disabled` | `boolean` | — | no | — |
|
|
81
|
+
| `index` | `GroupItemValue \| null` | — | no | — |
|
|
46
82
|
|
|
47
|
-
|
|
83
|
+
**SSlideItem slots**
|
|
48
84
|
|
|
49
|
-
|
|
85
|
+
| Slot | Slot props |
|
|
86
|
+
| --- | --- |
|
|
87
|
+
| `default` | `{ isSelected: boolean; }` |
|
|
50
88
|
|
|
51
|
-
|
|
52
|
-
|------|------|---------|-------------|
|
|
53
|
-
| `index` | `GroupItemValue \| null` | vnode `key` | Identifier stored in the group's `v-model`. Falls back to the `:key`, then to an auto id |
|
|
54
|
-
| `disabled` | `boolean` | `false` | Dim the item and block clicks |
|
|
55
|
-
| `activeClass` | `string \| null` | `undefined` | Class added when selected |
|
|
89
|
+
**SSlideItem events**
|
|
56
90
|
|
|
57
|
-
|
|
91
|
+
None.
|
|
92
|
+
|
|
93
|
+
<!-- generated:api:end SSlideItem -->
|
|
58
94
|
|
|
59
|
-
|
|
95
|
+
**SSlideItem notes**
|
|
60
96
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
97
|
+
- `index`: Identifier stored in the group's `v-model`. Falls back to the `:key`, then to an auto id (default: vnode `key`)
|
|
98
|
+
- `disabled`: Dim the item and block clicks
|
|
99
|
+
- `activeClass`: Class added when selected
|
|
100
|
+
- `default` (slot): Item content
|
|
101
|
+
|
|
102
|
+
There is **no `value` prop** — use `index` or `:key`.
|
|
64
103
|
|
|
65
104
|
---
|
|
66
105
|
|
|
@@ -119,5 +158,5 @@ const activeFilters = ref<string[]>([])
|
|
|
119
158
|
| `#default="{ isSelected, select }"` + `@click="select"` | Only `isSelected` exists; the item itself toggles on click |
|
|
120
159
|
| `scrollable` to get arrows | Arrows appear when `scrollable` is **off** and items overflow |
|
|
121
160
|
|
|
122
|
-
-
|
|
161
|
+
- Each slot's `attrs.disabled` is `true` only at that arrow's own edge, so `v-bind="attrs"` is enough for a custom arrow. Before 1.20.0 the `right` slot's `attrs.disabled` mirrored the *previous* button's state; there, compute your own disabled state for a custom "next" button.
|
|
123
162
|
- `disabled` on an item blocks clicks via CSS (`pointer-events: none`) and dims it.
|
|
@@ -6,27 +6,55 @@ Brief, non-blocking message fixed to the bottom (default) or top of the screen.
|
|
|
6
6
|
|
|
7
7
|
Types: `node_modules/@khsura/sui/@types/definitions/props/propsSnackbar.d.ts`
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
|
15
|
-
|
|
|
16
|
-
| `
|
|
9
|
+
<!-- generated:api:start SSnackbar -->
|
|
10
|
+
<!-- Generated from sui-api.json by `yarn sync:skills` (packages/app). Do not edit by hand. -->
|
|
11
|
+
|
|
12
|
+
**SSnackbar props**
|
|
13
|
+
|
|
14
|
+
| Prop | Type | Default | Required | Values |
|
|
15
|
+
| --- | --- | --- | --- | --- |
|
|
16
|
+
| `activator` | `string \| HTMLElement \| ComponentPublicInstance \| null` | — | no | — |
|
|
17
|
+
| `borderRadius` | `` number \| "tile" \| "rounded" \| `${number}em` \| `${number}px` \| `${number}rem` \| `${number}%` \| `${number}vh` \| `${number}vw` \| null `` | — | no | — |
|
|
18
|
+
| `disabled` | `boolean \| null` | — | no | — |
|
|
19
|
+
| `location` | `"top" \| "bottom" \| null` | — | no | `bottom`, `top` |
|
|
20
|
+
| `modelValue` | `boolean` | — | no | — |
|
|
21
|
+
| `multiLine` | `boolean \| null` | — | no | — |
|
|
22
|
+
| `outlined` | `boolean \| null` | — | no | — |
|
|
23
|
+
| `preventCloseOnClick` | `boolean` | — | no | — |
|
|
24
|
+
| `readonly` | `boolean \| null` | — | no | — |
|
|
25
|
+
| `timeout` | `number \| null` | — | no | — |
|
|
26
|
+
| `underlined` | `boolean \| null` | — | no | — |
|
|
27
|
+
|
|
28
|
+
**SSnackbar slots**
|
|
29
|
+
|
|
30
|
+
| Slot | Slot props |
|
|
31
|
+
| --- | --- |
|
|
32
|
+
| `action` | `{}` |
|
|
33
|
+
| `activator` | `{ on: { click: () => void; }; attrs: Partial<PropsRequired<{ disabled: boolean \| null \| undefined; readonly: boolean \| null \| undefined; }>>; }` |
|
|
34
|
+
| `default` | `{}` |
|
|
35
|
+
|
|
36
|
+
**SSnackbar events**
|
|
37
|
+
|
|
38
|
+
| Event | Payload |
|
|
39
|
+
| --- | --- |
|
|
40
|
+
| `update:modelValue` | `[value: boolean \| undefined]` |
|
|
41
|
+
|
|
42
|
+
<!-- generated:api:end SSnackbar -->
|
|
43
|
+
|
|
44
|
+
**SSnackbar notes**
|
|
45
|
+
|
|
46
|
+
- `timeout`: Auto-close after N ms. Unset/`0` = stays until `v-model` is set to `false`
|
|
47
|
+
- `location`: Screen edge (default: `undefined` (bottom))
|
|
48
|
+
- `multiLine`: Wrap long text instead of truncating with ellipsis
|
|
49
|
+
- `disabled`: Passed to the activator via `attrs`
|
|
50
|
+
- `activator` (slot): Optional trigger; bind both `v-on="on"` and `v-bind="attrs"`
|
|
51
|
+
- `default` (slot): Message
|
|
52
|
+
- `action` (slot): Buttons on the right
|
|
17
53
|
|
|
18
54
|
## Model
|
|
19
55
|
|
|
20
56
|
`v-model: boolean` — visibility. The timeout restarts each time it becomes `true`.
|
|
21
57
|
|
|
22
|
-
## Slots
|
|
23
|
-
|
|
24
|
-
| Slot | Scoped data | Description |
|
|
25
|
-
|------|-------------|-------------|
|
|
26
|
-
| `activator` | `{ on, attrs }` | Optional trigger; bind both `v-on="on"` and `v-bind="attrs"` |
|
|
27
|
-
| `default` | — | Message |
|
|
28
|
-
| `action` | — | Buttons on the right |
|
|
29
|
-
|
|
30
58
|
## Events
|
|
31
59
|
|
|
32
60
|
None — use `v-model`.
|
|
@@ -40,7 +68,7 @@ None — use `v-model`.
|
|
|
40
68
|
<SSnackbar v-model="offline" location="top">
|
|
41
69
|
Connection lost.
|
|
42
70
|
<template #action>
|
|
43
|
-
<SButton variant="text"
|
|
71
|
+
<SButton variant="text" @click="retry">Retry</SButton>
|
|
44
72
|
<SButton variant="icon" @click="offline = false"><SIcon icon="mdi-close" /></SButton>
|
|
45
73
|
</template>
|
|
46
74
|
</SSnackbar>
|
|
@@ -53,7 +81,10 @@ None — use `v-model`.
|
|
|
53
81
|
## Gotchas
|
|
54
82
|
|
|
55
83
|
- No `color` prop — colors come from the theme's `snackbar` color.
|
|
84
|
+
- The snackbar is dark (`#424242`) in both themes. Give a `variant="text"` (or `variant="icon"`) action **no** `color`: it takes the snackbar's light text colour, so the readable action is `<SButton variant="text">Undo</SButton>`. Since 1.20.0 a preset `color` (`warning`, `primary`, ...) inside the snackbar uses a variant that reaches 4.5:1 on it, but adds nothing over the default. A CSS colour (`color="#1976d2"`) is used as is, so pick a light one such as `color="#ffffff"`. Before 1.20.0 an action without `color` kept the page's dark text colour (about 1.3:1) and `primary`, `secondary`, `success`, `info` and `error` were below 4.5:1 (`primary` 2.18:1), so use `color="warning"` or a light CSS colour there.
|
|
85
|
+
- One snackbar per location: two open at the same `location` overlap. Show one at a time (or one `top`, one bottom); a queue component for stacking is planned.
|
|
56
86
|
- `outlined`, `underlined` and `borderRadius` appear in the prop types but are not applied.
|
|
57
87
|
- Without `timeout`, provide a close action in `#action`.
|
|
58
88
|
- Single-line by default: long text is cut with an ellipsis — use `multi-line`.
|
|
59
89
|
- The app must be wrapped in `<SApp>` (the snackbar teleports into its overlay container).
|
|
90
|
+
- On an iPhone with `viewport-fit=cover` the snackbar clears the home indicator (or the notch with `location="top"`) by itself.
|
|
@@ -10,17 +10,37 @@ Types: `node_modules/@khsura/sui/@types/definitions/props/propsSplitView.d.ts`
|
|
|
10
10
|
|
|
11
11
|
## SSplitView
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
| `vertical` | `boolean` | `false` | Stack panes top/bottom instead of side by side |
|
|
16
|
-
| `height` | `string \| number` | `'100%'` | Container height (number = px) |
|
|
17
|
-
| `width` | `string \| number` | `'100%'` | Container width (number = px) |
|
|
13
|
+
<!-- generated:api:start SSplitView -->
|
|
14
|
+
<!-- Generated from sui-api.json by `yarn sync:skills` (packages/app). Do not edit by hand. -->
|
|
18
15
|
|
|
19
|
-
|
|
16
|
+
**SSplitView props**
|
|
17
|
+
|
|
18
|
+
| Prop | Type | Default | Required | Values |
|
|
19
|
+
| --- | --- | --- | --- | --- |
|
|
20
|
+
| `height` | `string \| number` | `"100%"` | no | — |
|
|
21
|
+
| `vertical` | `boolean` | — | no | — |
|
|
22
|
+
| `width` | `string \| number` | `"100%"` | no | — |
|
|
23
|
+
|
|
24
|
+
**SSplitView slots**
|
|
25
|
+
|
|
26
|
+
| Slot | Slot props |
|
|
27
|
+
| --- | --- |
|
|
28
|
+
| `default` | `{}` |
|
|
29
|
+
|
|
30
|
+
**SSplitView events**
|
|
20
31
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
32
|
+
None.
|
|
33
|
+
|
|
34
|
+
<!-- generated:api:end SSplitView -->
|
|
35
|
+
|
|
36
|
+
**SSplitView notes**
|
|
37
|
+
|
|
38
|
+
- `vertical`: Stack panes top/bottom instead of side by side
|
|
39
|
+
- `height`: Container height (number = px)
|
|
40
|
+
- `width`: Container width (number = px)
|
|
41
|
+
- `default` (slot): `SSplitViewItem` components
|
|
42
|
+
|
|
43
|
+
No min/max size props.
|
|
24
44
|
|
|
25
45
|
No events.
|
|
26
46
|
|
|
@@ -28,9 +48,28 @@ No events.
|
|
|
28
48
|
|
|
29
49
|
No props. Renders the pane plus a resize handle after it. The last item's handle is hidden.
|
|
30
50
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
51
|
+
<!-- generated:api:start SSplitViewItem -->
|
|
52
|
+
<!-- Generated from sui-api.json by `yarn sync:skills` (packages/app). Do not edit by hand. -->
|
|
53
|
+
|
|
54
|
+
**SSplitViewItem props**
|
|
55
|
+
|
|
56
|
+
None.
|
|
57
|
+
|
|
58
|
+
**SSplitViewItem slots**
|
|
59
|
+
|
|
60
|
+
| Slot | Slot props |
|
|
61
|
+
| --- | --- |
|
|
62
|
+
| `default` | `{}` |
|
|
63
|
+
|
|
64
|
+
**SSplitViewItem events**
|
|
65
|
+
|
|
66
|
+
None.
|
|
67
|
+
|
|
68
|
+
<!-- generated:api:end SSplitViewItem -->
|
|
69
|
+
|
|
70
|
+
**SSplitViewItem notes**
|
|
71
|
+
|
|
72
|
+
- `default` (slot): Pane content
|
|
34
73
|
|
|
35
74
|
---
|
|
36
75
|
|
|
@@ -10,41 +10,76 @@ Types: `node_modules/@khsura/sui/@types/definitions/props/propsStepper.d.ts`, `p
|
|
|
10
10
|
|
|
11
11
|
## SStepper
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
<!-- generated:api:start SStepper -->
|
|
14
|
+
<!-- Generated from sui-api.json by `yarn sync:skills` (packages/app). Do not edit by hand. -->
|
|
14
15
|
|
|
15
|
-
|
|
16
|
-
|------|------|---------|-------------|
|
|
17
|
-
| `modelValue` | `number` | `undefined` | Current step number (use `v-model`) |
|
|
18
|
-
| `items` | `Array<{ step: number; text?: string; editable?: boolean }>` | `[]` | Step definitions. Used only when the default slot is empty |
|
|
19
|
-
| `shrink` | `boolean` | `false` | Shrink to content width |
|
|
16
|
+
**SStepper props**
|
|
20
17
|
|
|
21
|
-
|
|
18
|
+
| Prop | Type | Default | Required | Values |
|
|
19
|
+
| --- | --- | --- | --- | --- |
|
|
20
|
+
| `items` | `{ editable?: boolean \| undefined; step: number; text?: string \| undefined; }[]` | `[]` | no | — |
|
|
21
|
+
| `modelValue` | `number` | — | no | — |
|
|
22
|
+
| `shrink` | `boolean` | — | no | — |
|
|
23
|
+
| `tag` | `HtmlTagName \| null` | — | no | `a`, `abbr`, `acronym`, `address`, `applet`, `area`, `article`, `aside`, `audio`, `b`, `base`, `basefont`, `bdi`, `bdo`, `big`, `blockquote`, `body`, `br`, `button`, `canvas`, `caption`, `center`, `cite`, `code`, `col`, `colgroup`, `data`, `datalist`, `dd`, `del`, `details`, `dfn`, `dialog`, `dir`, `div`, `dl`, `dt`, `em`, `embed`, `fieldset`, `figcaption`, `figure`, `font`, `footer`, `form`, `frame`, `frameset`, `h1`, `h1> to <h6`, `h2`, `h3`, `h4`, `h5`, `h6`, `head`, `header`, `hr`, `html`, `i`, `iframe`, `img`, `input`, `ins`, `kbd`, `label`, `legend`, `li`, `link`, `main`, `map`, `mark`, `meta`, `meter`, `nav`, `noframes`, `noscript`, `object`, `ol`, `optgroup`, `option`, `output`, `p`, `param`, `picture`, `pre`, `progress`, `q`, `rp`, `rt`, `ruby`, `s`, `samp`, `script`, `section`, `select`, `small`, `source`, `span`, `strike`, `strong`, `style`, `sub`, `summary`, `sup`, `svg`, `table`, `tbody`, `td`, `template`, `textarea`, `tfoot`, `th`, `thead`, `time`, `title`, `tr`, `track`, `tt`, `u`, `ul`, `var`, `video`, `wbr` |
|
|
24
|
+
|
|
25
|
+
**SStepper slots**
|
|
26
|
+
|
|
27
|
+
| Slot | Slot props |
|
|
28
|
+
| --- | --- |
|
|
29
|
+
| `default` | `{ value: number \| undefined; }` |
|
|
30
|
+
|
|
31
|
+
**SStepper events**
|
|
22
32
|
|
|
23
|
-
|
|
33
|
+
| Event | Payload |
|
|
34
|
+
| --- | --- |
|
|
35
|
+
| `update:modelValue` | `[value: number]` |
|
|
24
36
|
|
|
25
|
-
|
|
26
|
-
|------|-------------|-------------|
|
|
27
|
-
| `default` | `{ value }` (current step) | `SStepperStep` components. Replaces `items` rendering |
|
|
37
|
+
<!-- generated:api:end SStepper -->
|
|
28
38
|
|
|
29
|
-
|
|
39
|
+
**SStepper notes**
|
|
30
40
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
41
|
+
- `modelValue`: Current step number (use `v-model`)
|
|
42
|
+
- `items`: Step definitions. Used only when the default slot is empty
|
|
43
|
+
- `shrink`: Shrink to content width
|
|
44
|
+
- `default` (slot): `SStepperStep` components. Replaces `items` rendering
|
|
45
|
+
- `update:modelValue` (event): Emitted when an `editable` step is clicked. Clamped to the lowest/highest registered step
|
|
46
|
+
|
|
47
|
+
`tag` exists in the type but is ignored (root is always a `div`).
|
|
34
48
|
|
|
35
49
|
---
|
|
36
50
|
|
|
37
51
|
## SStepperStep
|
|
38
52
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
53
|
+
<!-- generated:api:start SStepperStep -->
|
|
54
|
+
<!-- Generated from sui-api.json by `yarn sync:skills` (packages/app). Do not edit by hand. -->
|
|
55
|
+
|
|
56
|
+
**SStepperStep props**
|
|
57
|
+
|
|
58
|
+
| Prop | Type | Default | Required | Values |
|
|
59
|
+
| --- | --- | --- | --- | --- |
|
|
60
|
+
| `disabled` | `boolean` | — | no | — |
|
|
61
|
+
| `editable` | `boolean` | — | no | — |
|
|
62
|
+
| `step` | `number` | — | yes | — |
|
|
63
|
+
| `tag` | `HtmlTagName \| null` | — | no | `a`, `abbr`, `acronym`, `address`, `applet`, `area`, `article`, `aside`, `audio`, `b`, `base`, `basefont`, `bdi`, `bdo`, `big`, `blockquote`, `body`, `br`, `button`, `canvas`, `caption`, `center`, `cite`, `code`, `col`, `colgroup`, `data`, `datalist`, `dd`, `del`, `details`, `dfn`, `dialog`, `dir`, `div`, `dl`, `dt`, `em`, `embed`, `fieldset`, `figcaption`, `figure`, `font`, `footer`, `form`, `frame`, `frameset`, `h1`, `h1> to <h6`, `h2`, `h3`, `h4`, `h5`, `h6`, `head`, `header`, `hr`, `html`, `i`, `iframe`, `img`, `input`, `ins`, `kbd`, `label`, `legend`, `li`, `link`, `main`, `map`, `mark`, `meta`, `meter`, `nav`, `noframes`, `noscript`, `object`, `ol`, `optgroup`, `option`, `output`, `p`, `param`, `picture`, `pre`, `progress`, `q`, `rp`, `rt`, `ruby`, `s`, `samp`, `script`, `section`, `select`, `small`, `source`, `span`, `strike`, `strong`, `style`, `sub`, `summary`, `sup`, `svg`, `table`, `tbody`, `td`, `template`, `textarea`, `tfoot`, `th`, `thead`, `time`, `title`, `tr`, `track`, `tt`, `u`, `ul`, `var`, `video`, `wbr` |
|
|
64
|
+
|
|
65
|
+
**SStepperStep slots**
|
|
66
|
+
|
|
67
|
+
| Slot | Slot props |
|
|
68
|
+
| --- | --- |
|
|
69
|
+
| `default` | `{}` |
|
|
70
|
+
|
|
71
|
+
**SStepperStep events**
|
|
72
|
+
|
|
73
|
+
None.
|
|
74
|
+
|
|
75
|
+
<!-- generated:api:end SStepperStep -->
|
|
76
|
+
|
|
77
|
+
**SStepperStep notes**
|
|
44
78
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
79
|
+
- `step`: Step number (default: **required**)
|
|
80
|
+
- `editable`: Clicking the step jumps to it (forward or back)
|
|
81
|
+
- `disabled`: Disabled styling only. Does not block clicks on an `editable` step
|
|
82
|
+
- `default` (slot): Step label
|
|
48
83
|
|
|
49
84
|
Steps with `step < modelValue` show a checkmark (visited). `step === modelValue` is current. Must be a child of `SStepper` (throws otherwise).
|
|
50
85
|
|