@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,29 +6,49 @@ An `<img>` inside a wrapper `<div>`. Supports aspect ratio, object-fit, size lim
|
|
|
6
6
|
|
|
7
7
|
Types: `node_modules/@khsura/sui/@types/definitions/props/propsImage.d.ts`
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
<!-- generated:api:start SImage -->
|
|
10
|
+
<!-- Generated from sui-api.json by `yarn sync:skills` (packages/app). Do not edit by hand. -->
|
|
10
11
|
|
|
11
|
-
|
|
12
|
-
|------|------|---------|-------------|
|
|
13
|
-
| `src` | `string \| null` | **required** | Image URL. When it is falsy, no `<img>` is rendered (the slot still renders) |
|
|
14
|
-
| `alt` | `string \| null` | `''` | Alt text |
|
|
15
|
-
| `objectFit` | `'fill' \| 'contain' \| 'cover' \| 'none' \| 'scale-down'` | `undefined` | CSS `object-fit` for the `<img>` |
|
|
16
|
-
| `aspectRatio` | `number` | `undefined` | Width/height ratio applied to the wrapper (e.g. `16/9`, `1`) |
|
|
17
|
-
| `lazyLoad` | `LazyLoad` (`'lazy' \| 'eager' \| 'auto'`) | `undefined` | Declared but **currently ignored**: `loading` is always `lazy` |
|
|
18
|
-
| `width` / `height` | `string \| number` | `undefined` | Wrapper dimensions (the wrapper is `100%` × `100%` otherwise) |
|
|
19
|
-
| `maxWidth` / `maxHeight` | `string \| number` | `undefined` | Max dimensions |
|
|
20
|
-
| `minWidth` / `minHeight` | `string \| number` | `undefined` | Min dimensions |
|
|
12
|
+
**SImage props**
|
|
21
13
|
|
|
22
|
-
|
|
14
|
+
| Prop | Type | Default | Required | Values |
|
|
15
|
+
| --- | --- | --- | --- | --- |
|
|
16
|
+
| `alt` | `string \| null` | — | no | — |
|
|
17
|
+
| `aspectRatio` | `number \| null` | — | no | — |
|
|
18
|
+
| `height` | `string \| number \| null` | — | no | — |
|
|
19
|
+
| `lazyLoad` | `LazyLoad \| null` | — | no | — |
|
|
20
|
+
| `maxHeight` | `string \| number \| null` | — | no | — |
|
|
21
|
+
| `maxWidth` | `string \| number \| null` | — | no | — |
|
|
22
|
+
| `minHeight` | `string \| number \| null` | — | no | — |
|
|
23
|
+
| `minWidth` | `string \| number \| null` | — | no | — |
|
|
24
|
+
| `objectFit` | `"fill" \| "none" \| "contain" \| "cover" \| "scale-down"` | — | no | `contain`, `cover`, `fill`, `none`, `scale-down` |
|
|
25
|
+
| `src` | `string \| null` | — | yes | — |
|
|
26
|
+
| `width` | `string \| number \| null` | — | no | — |
|
|
23
27
|
|
|
24
|
-
|
|
25
|
-
|------|-------------|
|
|
26
|
-
| `default` | Content in an absolutely positioned layer over the image (full width/height) |
|
|
28
|
+
**SImage slots**
|
|
27
29
|
|
|
28
|
-
|
|
30
|
+
| Slot | Slot props |
|
|
31
|
+
| --- | --- |
|
|
32
|
+
| `default` | `{}` |
|
|
33
|
+
|
|
34
|
+
**SImage events**
|
|
29
35
|
|
|
30
36
|
None.
|
|
31
37
|
|
|
38
|
+
<!-- generated:api:end SImage -->
|
|
39
|
+
|
|
40
|
+
**SImage notes**
|
|
41
|
+
|
|
42
|
+
- `src`: Image URL. When it is falsy, no `<img>` is rendered (the slot still renders) (default: **required**)
|
|
43
|
+
- `alt`: Alt text (default: `''`)
|
|
44
|
+
- `objectFit`: CSS `object-fit` for the `<img>`
|
|
45
|
+
- `aspectRatio`: Width/height ratio applied to the wrapper (e.g. `16/9`, `1`)
|
|
46
|
+
- `lazyLoad`: Declared but **currently ignored**: `loading` is always `lazy`
|
|
47
|
+
- `width` / `height`: Wrapper dimensions (the wrapper is `100%` × `100%` otherwise)
|
|
48
|
+
- `maxWidth` / `maxHeight`: Max dimensions
|
|
49
|
+
- `minWidth` / `minHeight`: Min dimensions
|
|
50
|
+
- `default` (slot): Content in an absolutely positioned layer over the image (full width/height)
|
|
51
|
+
|
|
32
52
|
## Usage
|
|
33
53
|
|
|
34
54
|
```vue
|
|
@@ -48,8 +68,10 @@ None.
|
|
|
48
68
|
|
|
49
69
|
## Gotchas
|
|
50
70
|
|
|
51
|
-
- The wrapper defaults to `width: 100%; height: 100
|
|
71
|
+
- The wrapper defaults to `width: 100%; height: 100%` (`height: auto` when `aspect-ratio` is set). In a parent with no height, give it `aspect-ratio` or `height`.
|
|
52
72
|
- Use `object-fit="cover"` with `aspect-ratio` to avoid stretching.
|
|
73
|
+
- With `aspect-ratio` and no `height`, the wrapper uses `height: auto`, so the ratio sets its height even in a flex-column card (an equal-height grid). Older versions kept `height: 100%` there and the images in one row got different heights; on those, add `height="auto"`.
|
|
74
|
+
- Without a `src` the wrapper shows a neutral placeholder (the app background colour) instead of a blank gap, so a card with a missing image keeps its shape.
|
|
53
75
|
|
|
54
76
|
| ❌ | ✅ |
|
|
55
77
|
|----|----|
|