@smwb/ui-mcp-solid 0.1.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/LICENSE +21 -0
- package/README.md +56 -0
- package/component-meta/base/animateHeight/animateHeight.json +74 -0
- package/component-meta/base/icon/icon.json +61 -0
- package/component-meta/base/ripple/ripple.json +51 -0
- package/component-meta/clickAwayListener/clickAwayListener.json +40 -0
- package/component-meta/dataDisplay/accordion/accordion.json +79 -0
- package/component-meta/dataDisplay/avatar/avatar.avatarGroup.json +41 -0
- package/component-meta/dataDisplay/avatar/avatar.json +56 -0
- package/component-meta/dataDisplay/badge/badge.json +66 -0
- package/component-meta/dataDisplay/card/card.json +46 -0
- package/component-meta/dataDisplay/carousel/carousel.json +89 -0
- package/component-meta/dataDisplay/chat/chat.json +225 -0
- package/component-meta/dataDisplay/chat/chatAttachmentImage.json +27 -0
- package/component-meta/dataDisplay/chat/chatAttachments.json +32 -0
- package/component-meta/dataDisplay/chat/chatComposer.json +76 -0
- package/component-meta/dataDisplay/chat/chatHeader.json +60 -0
- package/component-meta/dataDisplay/chat/chatIconButton.json +38 -0
- package/component-meta/dataDisplay/chat/chatLayout.chatLayoutChat.json +20 -0
- package/component-meta/dataDisplay/chat/chatLayout.json +85 -0
- package/component-meta/dataDisplay/chat/chatMessageAvatar.json +34 -0
- package/component-meta/dataDisplay/chat/chatMessageBubble.json +91 -0
- package/component-meta/dataDisplay/chat/chatMessageIncoming.json +60 -0
- package/component-meta/dataDisplay/chat/chatMessageItem.json +65 -0
- package/component-meta/dataDisplay/chat/chatMessageOutgoing.json +60 -0
- package/component-meta/dataDisplay/chat/chatMessageSkeleton.json +39 -0
- package/component-meta/dataDisplay/chat/chatMessageStatus.json +44 -0
- package/component-meta/dataDisplay/chat/chatMessageSystem.json +29 -0
- package/component-meta/dataDisplay/chat/chatMessages.json +91 -0
- package/component-meta/dataDisplay/chat/chatOverlayLayout.chatOverlayLayoutChat.json +20 -0
- package/component-meta/dataDisplay/chat/chatOverlayLayout.json +70 -0
- package/component-meta/dataDisplay/chat/chatShell.json +71 -0
- package/component-meta/dataDisplay/chip/chip.json +104 -0
- package/component-meta/dataDisplay/expansionPanel/expansionPanel.json +85 -0
- package/component-meta/dataDisplay/imagesList/imagesList.json +57 -0
- package/component-meta/dataDisplay/imagesList/imagesListItem/imagesListItem.json +64 -0
- package/component-meta/dataDisplay/imagesList/imagesListItem/imagesListItemModal.json +32 -0
- package/component-meta/dataDisplay/list/list.json +36 -0
- package/component-meta/dataDisplay/list/listItem.json +62 -0
- package/component-meta/dataDisplay/table/table.json +59 -0
- package/component-meta/dataDisplay/table/tableBody.json +26 -0
- package/component-meta/dataDisplay/table/tableCell.json +31 -0
- package/component-meta/dataDisplay/table/tableHead.json +26 -0
- package/component-meta/dataDisplay/table/tableHeadCell.json +58 -0
- package/component-meta/dataDisplay/table/tablePagination/tablePagination.baseTablePagination.json +47 -0
- package/component-meta/dataDisplay/table/tablePagination/tablePagination.json +21 -0
- package/component-meta/dataDisplay/table/tableRow.json +36 -0
- package/component-meta/dataDisplay/treeView/treeView.json +93 -0
- package/component-meta/dataDisplay/typography/typography.json +56 -0
- package/component-meta/feedBack/message/message.json +53 -0
- package/component-meta/feedBack/modal/modal.json +92 -0
- package/component-meta/feedBack/modal/modal.modalSlot.json +22 -0
- package/component-meta/feedBack/progressIndicator/progressIndicator.circularProgress.json +22 -0
- package/component-meta/feedBack/progressIndicator/progressIndicator.json +57 -0
- package/component-meta/feedBack/skeleton/skeleton.json +61 -0
- package/component-meta/feedBack/snackbar/snackbar.json +71 -0
- package/component-meta/feedBack/snackbar/snackbar.snackbarsProvider.json +51 -0
- package/component-meta/feedBack/tooltip/tooltip.json +62 -0
- package/component-meta/inputs/button/button.json +94 -0
- package/component-meta/inputs/buttonGroups/buttonGroup.json +59 -0
- package/component-meta/inputs/checkbox/checkbox.json +89 -0
- package/component-meta/inputs/datePicker/dataPickerDays.json +87 -0
- package/component-meta/inputs/datePicker/dataPickerHeader.json +48 -0
- package/component-meta/inputs/datePicker/dataPickerInput.json +34 -0
- package/component-meta/inputs/datePicker/datePicker.json +129 -0
- package/component-meta/inputs/datePicker/datePickerActionLabel.json +55 -0
- package/component-meta/inputs/datePicker/datePickerDay.json +61 -0
- package/component-meta/inputs/datePicker/datePickerIconButton.json +18 -0
- package/component-meta/inputs/datePicker/datePickerList.json +33 -0
- package/component-meta/inputs/dateTimePicker/dateTimePicker.json +120 -0
- package/component-meta/inputs/dateTimePicker/dateTimePickerInput.json +35 -0
- package/component-meta/inputs/fileDrop/countPreview.json +40 -0
- package/component-meta/inputs/fileDrop/fileDrop.json +71 -0
- package/component-meta/inputs/fileDrop/preview.json +46 -0
- package/component-meta/inputs/fileDrop/previewWrapper.json +51 -0
- package/component-meta/inputs/fileInput/fileInput.json +61 -0
- package/component-meta/inputs/floatingButton/floatingButton.json +43 -0
- package/component-meta/inputs/radioButton/radioButton.json +90 -0
- package/component-meta/inputs/rating/rating.json +104 -0
- package/component-meta/inputs/selectField/dropdownMenu.json +107 -0
- package/component-meta/inputs/selectField/selectField.json +203 -0
- package/component-meta/inputs/slider/slider.json +133 -0
- package/component-meta/inputs/textField/textField.json +126 -0
- package/component-meta/inputs/textField/textFieldAdornment.json +47 -0
- package/component-meta/inputs/textField/textFieldWrapper.json +96 -0
- package/component-meta/inputs/timePicker/timePicker.json +75 -0
- package/component-meta/inputs/timePicker/timePickerColumns.json +37 -0
- package/component-meta/inputs/timePicker/timePickerInput.json +35 -0
- package/component-meta/inputs/timePicker/timePickerList.json +32 -0
- package/component-meta/inputs/toggle/toggle.json +90 -0
- package/component-meta/layout/appLayout/appLayout.json +88 -0
- package/component-meta/layout/divider/divider.json +56 -0
- package/component-meta/layout/grid/grid.column.json +81 -0
- package/component-meta/layout/grid/grid.container.json +36 -0
- package/component-meta/layout/grid/grid.row.json +51 -0
- package/component-meta/layout/page/page.json +41 -0
- package/component-meta/layout/pageHeader/pageHeader.json +53 -0
- package/component-meta/layout/screenDivider/screenDivider.json +57 -0
- package/component-meta/layout/sheet/sheet.json +114 -0
- package/component-meta/layout/stack/stack.json +56 -0
- package/component-meta/navigation/appBar/appBar.json +71 -0
- package/component-meta/navigation/bottomBar/bottomBar.bottomBarMenuItem.json +55 -0
- package/component-meta/navigation/bottomBar/bottomBar.json +61 -0
- package/component-meta/navigation/breadcrumbs/breadcrumbs.json +61 -0
- package/component-meta/navigation/menu/menu.json +20 -0
- package/component-meta/navigation/menu/menuDivider.json +26 -0
- package/component-meta/navigation/menu/menuFloating.json +51 -0
- package/component-meta/navigation/menu/menuItem.json +68 -0
- package/component-meta/navigation/menu/menuItemIcon.json +31 -0
- package/component-meta/navigation/menu/menuItemText.json +31 -0
- package/component-meta/navigation/menu/menuList.json +26 -0
- package/component-meta/navigation/menu/menuSubmenu.json +47 -0
- package/component-meta/navigation/pagination/pagination.json +98 -0
- package/component-meta/navigation/sidebar/sidebar.json +79 -0
- package/component-meta/navigation/sidebar/sidebar.sidebarMenuItem.json +56 -0
- package/component-meta/navigation/stepper/stepper.json +53 -0
- package/component-meta/navigation/tabs/tab/tab.json +64 -0
- package/component-meta/navigation/tabs/tabs.json +60 -0
- package/componentMeta.mjs +493 -0
- package/customizationMeta.mjs +451 -0
- package/package.json +37 -0
- package/server.mjs +169 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2022 - Summerweb LLC
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# @smwb/ui-mcp-solid
|
|
2
|
+
|
|
3
|
+
A [Model Context Protocol](https://modelcontextprotocol.io/) (MCP) **stdio server** that exposes the
|
|
4
|
+
[`@smwb/ui-solid`](https://www.npmjs.com/package/@smwb/ui-solid) component catalog and customization
|
|
5
|
+
guide to AI coding assistants (Cursor, Claude Desktop/Code, Copilot, …).
|
|
6
|
+
|
|
7
|
+

|
|
8
|
+
|
|
9
|
+
## Tools
|
|
10
|
+
|
|
11
|
+
| Tool | Purpose |
|
|
12
|
+
| --- | --- |
|
|
13
|
+
| `search_components` | Find components by name, id, description, or prop keywords |
|
|
14
|
+
| `get_component_props` | Full metadata for one component: props (types, required, descriptions) + required LESS imports (`styles.base` / `styles.entries` / `styles.dependencies` / `styles.importExample`) |
|
|
15
|
+
| `search_customization` | Global theming options and per-component customization approaches |
|
|
16
|
+
| `get_customization` | What and how to customize a component or a global topic |
|
|
17
|
+
|
|
18
|
+
## Run
|
|
19
|
+
|
|
20
|
+
```sh
|
|
21
|
+
npx -y @smwb/ui-mcp-solid
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Communicates over **stdio** only (no HTTP port); startup log goes to stderr.
|
|
25
|
+
|
|
26
|
+
### Cursor (`.cursor/mcp.json`) / Claude Desktop config
|
|
27
|
+
|
|
28
|
+
```json
|
|
29
|
+
{
|
|
30
|
+
"mcpServers": {
|
|
31
|
+
"smwb-ui-solid": {
|
|
32
|
+
"command": "npx",
|
|
33
|
+
"args": ["-y", "@smwb/ui-mcp-solid"]
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Example flow
|
|
40
|
+
|
|
41
|
+
1. `search_components` → `{ "query": "text field", "limit": 5 }`
|
|
42
|
+
2. `get_component_props` → `{ "nameOrId": "TextField" }` (or id `inputs/textField/textField`) —
|
|
43
|
+
read `styles.entries` / `styles.dependencies` / `styles.importExample` for a minimal LESS bundle
|
|
44
|
+
3. `get_customization` → `{ "nameOrId": "Button" }` or `{ "nameOrId": "global/runtime-css" }`
|
|
45
|
+
|
|
46
|
+
Component ids follow the metadata path, e.g. `dataDisplay/chat/chat`.
|
|
47
|
+
|
|
48
|
+
## How the catalog is built
|
|
49
|
+
|
|
50
|
+
Component metadata is generated from the `@smwb/ui-solid` TypeScript prop interfaces
|
|
51
|
+
(`npm run build:meta`) and shipped inside this package under `component-meta/`. LESS import hints
|
|
52
|
+
reference [`@smwb/ui-styles`](https://www.npmjs.com/package/@smwb/ui-styles).
|
|
53
|
+
|
|
54
|
+
## License
|
|
55
|
+
|
|
56
|
+
[MIT](./LICENSE)
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "AnimateHeight",
|
|
3
|
+
"description": "Animated height transition wrapper for expandable content.",
|
|
4
|
+
"extends": [
|
|
5
|
+
"JSX.HTMLAttributes<HTMLDivElement>"
|
|
6
|
+
],
|
|
7
|
+
"inheritedAttributes": "Also accepts standard HTML attributes for the underlying element (see extends clause in TypeScript).",
|
|
8
|
+
"styles": {
|
|
9
|
+
"base": [
|
|
10
|
+
"@smwb/ui-styles/less/foundation.less",
|
|
11
|
+
"@smwb/ui-styles/less/theme.less"
|
|
12
|
+
],
|
|
13
|
+
"entries": [],
|
|
14
|
+
"dependencies": [],
|
|
15
|
+
"importExample": "@import (less) \"node_modules/@smwb/ui-styles/less/foundation.less\";\n@import (less) \"node_modules/@smwb/ui-styles/less/theme.less\";"
|
|
16
|
+
},
|
|
17
|
+
"props": {
|
|
18
|
+
"animateOpacity": {
|
|
19
|
+
"type": "boolean",
|
|
20
|
+
"required": false,
|
|
21
|
+
"description": "Animate Opacity. Optional. Type: boolean."
|
|
22
|
+
},
|
|
23
|
+
"animationStateClasses": {
|
|
24
|
+
"type": "Partial<AnimationStateClasses>",
|
|
25
|
+
"required": false,
|
|
26
|
+
"description": "Animation State Classes. Optional. Type: Partial<AnimationStateClasses>."
|
|
27
|
+
},
|
|
28
|
+
"applyInlineTransitions": {
|
|
29
|
+
"type": "boolean",
|
|
30
|
+
"required": false,
|
|
31
|
+
"description": "Apply Inline Transitions. Optional. Type: boolean."
|
|
32
|
+
},
|
|
33
|
+
"contentClassName": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"required": false,
|
|
36
|
+
"description": "CSS class name for the main content area."
|
|
37
|
+
},
|
|
38
|
+
"delay": {
|
|
39
|
+
"type": "number",
|
|
40
|
+
"required": false,
|
|
41
|
+
"description": "Delay. Optional. Type: number."
|
|
42
|
+
},
|
|
43
|
+
"duration": {
|
|
44
|
+
"type": "number",
|
|
45
|
+
"required": false,
|
|
46
|
+
"description": "Duration. Optional. Type: number."
|
|
47
|
+
},
|
|
48
|
+
"easing": {
|
|
49
|
+
"type": "string",
|
|
50
|
+
"required": false,
|
|
51
|
+
"description": "Easing. Optional. Type: string."
|
|
52
|
+
},
|
|
53
|
+
"height": {
|
|
54
|
+
"type": "Height",
|
|
55
|
+
"required": true,
|
|
56
|
+
"description": "Height of the skeleton placeholder."
|
|
57
|
+
},
|
|
58
|
+
"onHeightAnimationEnd": {
|
|
59
|
+
"type": "(newHeight: Height) => void",
|
|
60
|
+
"required": false,
|
|
61
|
+
"description": "On Height Animation End. Optional. Type: (newHeight: Height) => void."
|
|
62
|
+
},
|
|
63
|
+
"onHeightAnimationStart": {
|
|
64
|
+
"type": "(newHeight: Height) => void",
|
|
65
|
+
"required": false,
|
|
66
|
+
"description": "On Height Animation Start. Optional. Type: (newHeight: Height) => void."
|
|
67
|
+
},
|
|
68
|
+
"ref": {
|
|
69
|
+
"type": "Ref<HTMLDivElement>",
|
|
70
|
+
"required": false,
|
|
71
|
+
"description": "Ref. Optional. Type: Ref<HTMLDivElement>."
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Icon",
|
|
3
|
+
"description": "Material Symbols icon wrapper with size, weight, fill, and semantic color tokens.",
|
|
4
|
+
"extends": [
|
|
5
|
+
"JSX.HTMLAttributes<HTMLSpanElement>"
|
|
6
|
+
],
|
|
7
|
+
"inheritedAttributes": "Also accepts standard HTML attributes for the underlying element (see extends clause in TypeScript).",
|
|
8
|
+
"styles": {
|
|
9
|
+
"base": [
|
|
10
|
+
"@smwb/ui-styles/less/foundation.less",
|
|
11
|
+
"@smwb/ui-styles/less/theme.less"
|
|
12
|
+
],
|
|
13
|
+
"entries": [
|
|
14
|
+
"@smwb/ui-styles/less/components/icon/icon.entry.less"
|
|
15
|
+
],
|
|
16
|
+
"dependencies": [],
|
|
17
|
+
"importExample": "@import (less) \"node_modules/@smwb/ui-styles/less/foundation.less\";\n@import (less) \"node_modules/@smwb/ui-styles/less/theme.less\";\n@import (less) \"node_modules/@smwb/ui-styles/less/components/icon/icon.entry.less\";"
|
|
18
|
+
},
|
|
19
|
+
"props": {
|
|
20
|
+
"name": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"required": true,
|
|
23
|
+
"description": "Icon name from https://fonts.google.com/icons\nExample: name={\"arrow_right_alt\"}\n/"
|
|
24
|
+
},
|
|
25
|
+
"weight": {
|
|
26
|
+
"type": "number",
|
|
27
|
+
"required": false,
|
|
28
|
+
"description": "Weight. Optional. Type: number."
|
|
29
|
+
},
|
|
30
|
+
"fill": {
|
|
31
|
+
"type": "0 | 1",
|
|
32
|
+
"required": false,
|
|
33
|
+
"description": "Fill. Optional. Type: 0 | 1."
|
|
34
|
+
},
|
|
35
|
+
"size": {
|
|
36
|
+
"type": "number | string",
|
|
37
|
+
"required": false,
|
|
38
|
+
"description": "Pixel number or any CSS length (e.g. \"1.5rem\")."
|
|
39
|
+
},
|
|
40
|
+
"grade": {
|
|
41
|
+
"type": "number",
|
|
42
|
+
"required": false,
|
|
43
|
+
"description": "Grade. Optional. Type: number."
|
|
44
|
+
},
|
|
45
|
+
"color": {
|
|
46
|
+
"type": "IconColor | (string & {})",
|
|
47
|
+
"required": false,
|
|
48
|
+
"description": "Semantic color token; `inherit` (default) keeps the text color. Any string\nis accepted for backward compatibility, but only known {\ntokens emit a color class.\n/"
|
|
49
|
+
},
|
|
50
|
+
"title": {
|
|
51
|
+
"type": "string",
|
|
52
|
+
"required": false,
|
|
53
|
+
"description": "Accessible name. When provided the icon is exposed as `role=\"img\"`;\notherwise it is `aria-hidden` (decorative).\n/"
|
|
54
|
+
},
|
|
55
|
+
"ref": {
|
|
56
|
+
"type": "Ref<HTMLSpanElement>",
|
|
57
|
+
"required": false,
|
|
58
|
+
"description": "Ref. Optional. Type: Ref<HTMLSpanElement>."
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Ripple",
|
|
3
|
+
"description": "Material-style ripple touch feedback container.",
|
|
4
|
+
"extends": [
|
|
5
|
+
"JSX.HTMLAttributes<HTMLSpanElement>"
|
|
6
|
+
],
|
|
7
|
+
"inheritedAttributes": "Also accepts standard HTML attributes for the underlying element (see extends clause in TypeScript).",
|
|
8
|
+
"styles": {
|
|
9
|
+
"base": [
|
|
10
|
+
"@smwb/ui-styles/less/foundation.less",
|
|
11
|
+
"@smwb/ui-styles/less/theme.less"
|
|
12
|
+
],
|
|
13
|
+
"entries": [
|
|
14
|
+
"@smwb/ui-styles/less/components/ripple/ripple.entry.less"
|
|
15
|
+
],
|
|
16
|
+
"dependencies": [],
|
|
17
|
+
"importExample": "@import (less) \"node_modules/@smwb/ui-styles/less/foundation.less\";\n@import (less) \"node_modules/@smwb/ui-styles/less/theme.less\";\n@import (less) \"node_modules/@smwb/ui-styles/less/components/ripple/ripple.entry.less\";"
|
|
18
|
+
},
|
|
19
|
+
"props": {
|
|
20
|
+
"actionRef": {
|
|
21
|
+
"type": "(actions: RippleActionsRef) => void",
|
|
22
|
+
"required": false,
|
|
23
|
+
"description": "Receives the imperative API once on mount."
|
|
24
|
+
},
|
|
25
|
+
"classes": {
|
|
26
|
+
"type": "RippleClasses",
|
|
27
|
+
"required": false,
|
|
28
|
+
"description": "Classes. Optional. Type: RippleClasses."
|
|
29
|
+
},
|
|
30
|
+
"center": {
|
|
31
|
+
"type": "boolean | undefined",
|
|
32
|
+
"required": false,
|
|
33
|
+
"description": "Center. Optional. Type: boolean | undefined."
|
|
34
|
+
},
|
|
35
|
+
"duration": {
|
|
36
|
+
"type": "number",
|
|
37
|
+
"required": false,
|
|
38
|
+
"description": "Ripple lifetime in ms."
|
|
39
|
+
},
|
|
40
|
+
"color": {
|
|
41
|
+
"type": "string | undefined",
|
|
42
|
+
"required": false,
|
|
43
|
+
"description": "Ripple color (any CSS color). Defaults to inherited currentColor."
|
|
44
|
+
},
|
|
45
|
+
"ref": {
|
|
46
|
+
"type": "Ref<HTMLSpanElement>",
|
|
47
|
+
"required": false,
|
|
48
|
+
"description": "Ref. Optional. Type: Ref<HTMLSpanElement>."
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "ClickAwayListener",
|
|
3
|
+
"description": "Detects pointer events outside its child and invokes a callback.",
|
|
4
|
+
"styles": {
|
|
5
|
+
"base": [
|
|
6
|
+
"@smwb/ui-styles/less/foundation.less",
|
|
7
|
+
"@smwb/ui-styles/less/theme.less"
|
|
8
|
+
],
|
|
9
|
+
"entries": [],
|
|
10
|
+
"dependencies": [],
|
|
11
|
+
"importExample": "@import (less) \"node_modules/@smwb/ui-styles/less/foundation.less\";\n@import (less) \"node_modules/@smwb/ui-styles/less/theme.less\";"
|
|
12
|
+
},
|
|
13
|
+
"props": {
|
|
14
|
+
"children": {
|
|
15
|
+
"type": "JSX.Element",
|
|
16
|
+
"required": true,
|
|
17
|
+
"description": "Child nodes rendered inside the component."
|
|
18
|
+
},
|
|
19
|
+
"mouseEvent": {
|
|
20
|
+
"type": "ClickAwayMouseEventHandler | false",
|
|
21
|
+
"required": false,
|
|
22
|
+
"description": "Mouse Event. Optional. Type: ClickAwayMouseEventHandler | false."
|
|
23
|
+
},
|
|
24
|
+
"onClickAway": {
|
|
25
|
+
"type": "(event: MouseEvent | TouchEvent) => void",
|
|
26
|
+
"required": true,
|
|
27
|
+
"description": "On Click Away. Required. Type: (event: MouseEvent | TouchEvent) => void."
|
|
28
|
+
},
|
|
29
|
+
"touchEvent": {
|
|
30
|
+
"type": "ClickAwayTouchEventHandler | false",
|
|
31
|
+
"required": false,
|
|
32
|
+
"description": "Touch Event. Optional. Type: ClickAwayTouchEventHandler | false."
|
|
33
|
+
},
|
|
34
|
+
"enabled": {
|
|
35
|
+
"type": "boolean",
|
|
36
|
+
"required": false,
|
|
37
|
+
"description": "When false, the listener is inert without unmounting the child."
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Accordion",
|
|
3
|
+
"description": "Expandable panel with a clickable header and collapsible body.",
|
|
4
|
+
"styles": {
|
|
5
|
+
"base": [
|
|
6
|
+
"@smwb/ui-styles/less/foundation.less",
|
|
7
|
+
"@smwb/ui-styles/less/theme.less"
|
|
8
|
+
],
|
|
9
|
+
"entries": [
|
|
10
|
+
"@smwb/ui-styles/less/components/accordion/accordion.entry.less"
|
|
11
|
+
],
|
|
12
|
+
"dependencies": [
|
|
13
|
+
"@smwb/ui-styles/less/components/icon/icon.entry.less"
|
|
14
|
+
],
|
|
15
|
+
"importExample": "@import (less) \"node_modules/@smwb/ui-styles/less/foundation.less\";\n@import (less) \"node_modules/@smwb/ui-styles/less/theme.less\";\n@import (less) \"node_modules/@smwb/ui-styles/less/components/accordion/accordion.entry.less\";\n@import (less) \"node_modules/@smwb/ui-styles/less/components/icon/icon.entry.less\";"
|
|
16
|
+
},
|
|
17
|
+
"props": {
|
|
18
|
+
"class": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"required": false,
|
|
21
|
+
"description": "Class. Optional. Type: string."
|
|
22
|
+
},
|
|
23
|
+
"title": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"required": false,
|
|
26
|
+
"description": "Accessible title or tooltip text."
|
|
27
|
+
},
|
|
28
|
+
"isOpenByDefault": {
|
|
29
|
+
"type": "boolean",
|
|
30
|
+
"required": false,
|
|
31
|
+
"description": "Is Open By Default. Optional. Type: boolean."
|
|
32
|
+
},
|
|
33
|
+
"open": {
|
|
34
|
+
"type": "boolean",
|
|
35
|
+
"required": false,
|
|
36
|
+
"description": "Controlled open state. When set, the component is controlled."
|
|
37
|
+
},
|
|
38
|
+
"disabled": {
|
|
39
|
+
"type": "boolean",
|
|
40
|
+
"required": false,
|
|
41
|
+
"description": "Disable toggling."
|
|
42
|
+
},
|
|
43
|
+
"icon": {
|
|
44
|
+
"type": "JSX.Element",
|
|
45
|
+
"required": false,
|
|
46
|
+
"description": "Custom expand icon (replaces the default chevron)."
|
|
47
|
+
},
|
|
48
|
+
"id": {
|
|
49
|
+
"type": "string",
|
|
50
|
+
"required": false,
|
|
51
|
+
"description": "Unique identifier for the root element."
|
|
52
|
+
},
|
|
53
|
+
"startAdornment": {
|
|
54
|
+
"type": "(isOpen: boolean) => JSX.Element",
|
|
55
|
+
"required": false,
|
|
56
|
+
"description": "Start Adornment. Optional. Type: (isOpen: boolean) => JSX.Element."
|
|
57
|
+
},
|
|
58
|
+
"noIcon": {
|
|
59
|
+
"type": "boolean",
|
|
60
|
+
"required": false,
|
|
61
|
+
"description": "No Icon. Optional. Type: boolean."
|
|
62
|
+
},
|
|
63
|
+
"onToggleClick": {
|
|
64
|
+
"type": "(e: MouseEvent & { currentTarget: HTMLButtonElement; target: Element }) => void",
|
|
65
|
+
"required": false,
|
|
66
|
+
"description": "On Toggle Click. Optional. Type: (e: MouseEvent & { currentTarget: HTMLButtonElement; target: Element }) => void."
|
|
67
|
+
},
|
|
68
|
+
"onChange": {
|
|
69
|
+
"type": "(open: boolean) => void",
|
|
70
|
+
"required": false,
|
|
71
|
+
"description": "Fired with the next open state on toggle."
|
|
72
|
+
},
|
|
73
|
+
"ref": {
|
|
74
|
+
"type": "Ref<HTMLDivElement>",
|
|
75
|
+
"required": false,
|
|
76
|
+
"description": "Ref. Optional. Type: Ref<HTMLDivElement>."
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "AvatarGroup",
|
|
3
|
+
"description": "Cluster of overlapping avatars with optional surplus counter.",
|
|
4
|
+
"extends": [
|
|
5
|
+
"JSX.HTMLAttributes<HTMLDivElement>"
|
|
6
|
+
],
|
|
7
|
+
"inheritedAttributes": "Also accepts standard HTML attributes for the underlying element (see extends clause in TypeScript).",
|
|
8
|
+
"styles": {
|
|
9
|
+
"base": [
|
|
10
|
+
"@smwb/ui-styles/less/foundation.less",
|
|
11
|
+
"@smwb/ui-styles/less/theme.less"
|
|
12
|
+
],
|
|
13
|
+
"entries": [
|
|
14
|
+
"@smwb/ui-styles/less/components/avatar/avatar.entry.less"
|
|
15
|
+
],
|
|
16
|
+
"dependencies": [],
|
|
17
|
+
"importExample": "@import (less) \"node_modules/@smwb/ui-styles/less/foundation.less\";\n@import (less) \"node_modules/@smwb/ui-styles/less/theme.less\";\n@import (less) \"node_modules/@smwb/ui-styles/less/components/avatar/avatar.entry.less\";"
|
|
18
|
+
},
|
|
19
|
+
"props": {
|
|
20
|
+
"max": {
|
|
21
|
+
"type": "number",
|
|
22
|
+
"required": false,
|
|
23
|
+
"description": "Maximum avatars to show before collapsing the rest into a \"+N\" surplus."
|
|
24
|
+
},
|
|
25
|
+
"total": {
|
|
26
|
+
"type": "number",
|
|
27
|
+
"required": false,
|
|
28
|
+
"description": "Override the total count used for the surplus label (defaults to children count)."
|
|
29
|
+
},
|
|
30
|
+
"onSurplusClick": {
|
|
31
|
+
"type": "() => void",
|
|
32
|
+
"required": false,
|
|
33
|
+
"description": "Click handler for the \"+N\" surplus chip."
|
|
34
|
+
},
|
|
35
|
+
"ref": {
|
|
36
|
+
"type": "Ref<HTMLDivElement>",
|
|
37
|
+
"required": false,
|
|
38
|
+
"description": "Ref. Optional. Type: Ref<HTMLDivElement>."
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Avatar",
|
|
3
|
+
"description": "User avatar displaying an image or initials fallback.",
|
|
4
|
+
"extends": [
|
|
5
|
+
"JSX.HTMLAttributes<HTMLDivElement>"
|
|
6
|
+
],
|
|
7
|
+
"inheritedAttributes": "Also accepts standard HTML attributes for the underlying element (see extends clause in TypeScript).",
|
|
8
|
+
"styles": {
|
|
9
|
+
"base": [
|
|
10
|
+
"@smwb/ui-styles/less/foundation.less",
|
|
11
|
+
"@smwb/ui-styles/less/theme.less"
|
|
12
|
+
],
|
|
13
|
+
"entries": [
|
|
14
|
+
"@smwb/ui-styles/less/components/avatar/avatar.entry.less"
|
|
15
|
+
],
|
|
16
|
+
"dependencies": [],
|
|
17
|
+
"importExample": "@import (less) \"node_modules/@smwb/ui-styles/less/foundation.less\";\n@import (less) \"node_modules/@smwb/ui-styles/less/theme.less\";\n@import (less) \"node_modules/@smwb/ui-styles/less/components/avatar/avatar.entry.less\";"
|
|
18
|
+
},
|
|
19
|
+
"props": {
|
|
20
|
+
"src": {
|
|
21
|
+
"type": "string | undefined",
|
|
22
|
+
"required": false,
|
|
23
|
+
"description": "Image source. Falls back to children (initials / icon) on error or when absent."
|
|
24
|
+
},
|
|
25
|
+
"alt": {
|
|
26
|
+
"type": "string | undefined",
|
|
27
|
+
"required": false,
|
|
28
|
+
"description": "Alternative text for images or icons."
|
|
29
|
+
},
|
|
30
|
+
"size": {
|
|
31
|
+
"type": "AvatarSize | number",
|
|
32
|
+
"required": false,
|
|
33
|
+
"description": "Preset size or an explicit pixel value."
|
|
34
|
+
},
|
|
35
|
+
"variant": {
|
|
36
|
+
"type": "\"circular\" | \"rounded\" | \"square\"",
|
|
37
|
+
"required": false,
|
|
38
|
+
"description": "Visual style variant."
|
|
39
|
+
},
|
|
40
|
+
"color": {
|
|
41
|
+
"type": "string",
|
|
42
|
+
"required": false,
|
|
43
|
+
"description": "Background color for the fallback (initials / icon)."
|
|
44
|
+
},
|
|
45
|
+
"imgProps": {
|
|
46
|
+
"type": "JSX.ImgHTMLAttributes<HTMLImageElement>",
|
|
47
|
+
"required": false,
|
|
48
|
+
"description": "Extra attributes forwarded to the underlying <img> (srcSet, loading…)."
|
|
49
|
+
},
|
|
50
|
+
"ref": {
|
|
51
|
+
"type": "Ref<HTMLDivElement>",
|
|
52
|
+
"required": false,
|
|
53
|
+
"description": "Ref. Optional. Type: Ref<HTMLDivElement>."
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Badge",
|
|
3
|
+
"description": "Small status or count indicator overlay.",
|
|
4
|
+
"extends": [
|
|
5
|
+
"JSX.HTMLAttributes<HTMLSpanElement>"
|
|
6
|
+
],
|
|
7
|
+
"inheritedAttributes": "Also accepts standard HTML attributes for the underlying element (see extends clause in TypeScript).",
|
|
8
|
+
"styles": {
|
|
9
|
+
"base": [
|
|
10
|
+
"@smwb/ui-styles/less/foundation.less",
|
|
11
|
+
"@smwb/ui-styles/less/theme.less"
|
|
12
|
+
],
|
|
13
|
+
"entries": [
|
|
14
|
+
"@smwb/ui-styles/less/components/badge/badge.entry.less"
|
|
15
|
+
],
|
|
16
|
+
"dependencies": [],
|
|
17
|
+
"importExample": "@import (less) \"node_modules/@smwb/ui-styles/less/foundation.less\";\n@import (less) \"node_modules/@smwb/ui-styles/less/theme.less\";\n@import (less) \"node_modules/@smwb/ui-styles/less/components/badge/badge.entry.less\";"
|
|
18
|
+
},
|
|
19
|
+
"props": {
|
|
20
|
+
"badgeContent": {
|
|
21
|
+
"type": "JSX.Element | number | string",
|
|
22
|
+
"required": false,
|
|
23
|
+
"description": "Badge Content. Optional. Type: JSX.Element | number | string."
|
|
24
|
+
},
|
|
25
|
+
"color": {
|
|
26
|
+
"type": "\"primary\" | \"success\" | \"danger\"",
|
|
27
|
+
"required": false,
|
|
28
|
+
"description": "Semantic color token."
|
|
29
|
+
},
|
|
30
|
+
"variant": {
|
|
31
|
+
"type": "\"inside\" | \"outside\"",
|
|
32
|
+
"required": false,
|
|
33
|
+
"description": "Visual style variant."
|
|
34
|
+
},
|
|
35
|
+
"vertical": {
|
|
36
|
+
"type": "\"top\" | \"bottom\"",
|
|
37
|
+
"required": false,
|
|
38
|
+
"description": "Vertical. Optional. Type: \"top\" | \"bottom\"."
|
|
39
|
+
},
|
|
40
|
+
"horizontal": {
|
|
41
|
+
"type": "\"right\" | \"left\"",
|
|
42
|
+
"required": false,
|
|
43
|
+
"description": "Horizontal. Optional. Type: \"right\" | \"left\"."
|
|
44
|
+
},
|
|
45
|
+
"max": {
|
|
46
|
+
"type": "number",
|
|
47
|
+
"required": false,
|
|
48
|
+
"description": "Cap numeric content, rendering `{max}+` when exceeded."
|
|
49
|
+
},
|
|
50
|
+
"showZero": {
|
|
51
|
+
"type": "boolean",
|
|
52
|
+
"required": false,
|
|
53
|
+
"description": "Render the badge even when content is 0."
|
|
54
|
+
},
|
|
55
|
+
"badgeAriaLabel": {
|
|
56
|
+
"type": "string",
|
|
57
|
+
"required": false,
|
|
58
|
+
"description": "Accessible label for the badge value."
|
|
59
|
+
},
|
|
60
|
+
"ref": {
|
|
61
|
+
"type": "Ref<HTMLSpanElement>",
|
|
62
|
+
"required": false,
|
|
63
|
+
"description": "Ref. Optional. Type: Ref<HTMLSpanElement>."
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Card",
|
|
3
|
+
"description": "Surface container with optional header, footer, and click handling.",
|
|
4
|
+
"extends": [
|
|
5
|
+
"JSX.HTMLAttributes<HTMLDivElement>"
|
|
6
|
+
],
|
|
7
|
+
"inheritedAttributes": "Also accepts standard HTML attributes for the underlying element (see extends clause in TypeScript).",
|
|
8
|
+
"styles": {
|
|
9
|
+
"base": [
|
|
10
|
+
"@smwb/ui-styles/less/foundation.less",
|
|
11
|
+
"@smwb/ui-styles/less/theme.less"
|
|
12
|
+
],
|
|
13
|
+
"entries": [
|
|
14
|
+
"@smwb/ui-styles/less/components/card/card.entry.less"
|
|
15
|
+
],
|
|
16
|
+
"dependencies": [],
|
|
17
|
+
"importExample": "@import (less) \"node_modules/@smwb/ui-styles/less/foundation.less\";\n@import (less) \"node_modules/@smwb/ui-styles/less/theme.less\";\n@import (less) \"node_modules/@smwb/ui-styles/less/components/card/card.entry.less\";"
|
|
18
|
+
},
|
|
19
|
+
"props": {
|
|
20
|
+
"variant": {
|
|
21
|
+
"type": "\"filled\" | \"elevated\" | \"outlined\"",
|
|
22
|
+
"required": false,
|
|
23
|
+
"description": "Visual style variant."
|
|
24
|
+
},
|
|
25
|
+
"disabled": {
|
|
26
|
+
"type": "boolean",
|
|
27
|
+
"required": false,
|
|
28
|
+
"description": "Whether the control is disabled and non-interactive."
|
|
29
|
+
},
|
|
30
|
+
"title": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"required": false,
|
|
33
|
+
"description": "Accessible title or tooltip text."
|
|
34
|
+
},
|
|
35
|
+
"footer": {
|
|
36
|
+
"type": "JSX.Element",
|
|
37
|
+
"required": false,
|
|
38
|
+
"description": "Footer slot rendered after the content."
|
|
39
|
+
},
|
|
40
|
+
"ref": {
|
|
41
|
+
"type": "Ref<HTMLDivElement>",
|
|
42
|
+
"required": false,
|
|
43
|
+
"description": "Ref. Optional. Type: Ref<HTMLDivElement>."
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|