@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
@@ -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
- ## Props
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
- | Prop | Type | Default | Description |
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
- ## Slots
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
- | Slot | Description |
25
- |------|-------------|
26
- | `default` | Content in an absolutely positioned layer over the image (full width/height) |
28
+ **SImage slots**
27
29
 
28
- ## Events
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%`. In a parent with no height, give it `aspect-ratio` or `height`.
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
  |----|----|