@smwb/ui-mcp-react 2.8.0 → 2.9.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/component-meta/dataDisplay/chat/chat.chatFooterComposer.json +24 -0
- package/component-meta/dataDisplay/chat/chat.json +24 -3
- package/component-meta/dataDisplay/chat/chatComposer.json +1 -1
- package/component-meta/dataDisplay/chat/chatLayout.json +2 -1
- package/component-meta/dataDisplay/chat/chatOverlayLayout.json +2 -1
- package/component-meta/dataDisplay/dagView/dagView.json +165 -0
- package/component-meta/dataDisplay/diffStat/diffStat.json +65 -0
- package/component-meta/dataDisplay/kbd/kbd.json +55 -0
- package/component-meta/dataDisplay/list/listItem.json +18 -3
- package/component-meta/dataDisplay/qrCode/qrCode.json +60 -0
- package/component-meta/dataDisplay/statusDot/statusDot.json +60 -0
- package/component-meta/dataDisplay/swimlanes/swimlanes.json +90 -0
- package/component-meta/dataDisplay/treeView/treeView.json +16 -1
- package/component-meta/inputs/button/button.json +10 -0
- package/component-meta/inputs/composer/composer.json +222 -0
- package/component-meta/layout/sheet/sheet.json +20 -0
- package/component-meta/layout/tabGroups/tabGroups.json +101 -0
- package/component-meta/navigation/appBar/appBar.json +15 -0
- package/component-meta/navigation/commandPalette/commandPalette.json +161 -0
- package/component-meta/navigation/sidebar/sidebar.json +5 -0
- package/component-meta/navigation/tabs/tab/tab.json +30 -4
- package/component-meta/navigation/tabs/tabPanel/tabPanel.json +42 -0
- package/component-meta/navigation/tabs/tabs.json +38 -5
- package/package.json +3 -3
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "CommandPalette",
|
|
3
|
+
"description": "Command Palette component from the navigation module.",
|
|
4
|
+
"ssr": {
|
|
5
|
+
"safe": true,
|
|
6
|
+
"rendering": "universal"
|
|
7
|
+
},
|
|
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/commandPalette/commandPalette.entry.less"
|
|
15
|
+
],
|
|
16
|
+
"dependencies": [
|
|
17
|
+
"@smwb/ui-styles/less/components/icon/icon.entry.less",
|
|
18
|
+
"@smwb/ui-styles/less/components/kbd/kbd.entry.less",
|
|
19
|
+
"@smwb/ui-styles/less/components/modal/modal.entry.less",
|
|
20
|
+
"@smwb/ui-styles/less/components/skeleton/skeleton.entry.less"
|
|
21
|
+
],
|
|
22
|
+
"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/commandPalette/commandPalette.entry.less\";\n@import (less) \"node_modules/@smwb/ui-styles/less/components/icon/icon.entry.less\";\n@import (less) \"node_modules/@smwb/ui-styles/less/components/kbd/kbd.entry.less\";\n@import (less) \"node_modules/@smwb/ui-styles/less/components/modal/modal.entry.less\";\n@import (less) \"node_modules/@smwb/ui-styles/less/components/skeleton/skeleton.entry.less\";"
|
|
23
|
+
},
|
|
24
|
+
"props": {
|
|
25
|
+
"open": {
|
|
26
|
+
"type": "boolean",
|
|
27
|
+
"required": false,
|
|
28
|
+
"description": "Controlled open state. The palette is controlled while this is not `undefined`."
|
|
29
|
+
},
|
|
30
|
+
"defaultOpen": {
|
|
31
|
+
"type": "boolean",
|
|
32
|
+
"required": false,
|
|
33
|
+
"description": "Open state used while `open` is `undefined`; `false` by default."
|
|
34
|
+
},
|
|
35
|
+
"onOpenChange": {
|
|
36
|
+
"type": "(open: boolean) => void",
|
|
37
|
+
"required": false,
|
|
38
|
+
"description": "Called for every request to open or close: Escape, a backdrop click, and choosing an item\nwhile `closeOnSelect`. Called in the controlled and in the uncontrolled mode."
|
|
39
|
+
},
|
|
40
|
+
"groups": {
|
|
41
|
+
"type": "CommandPaletteGroup[]",
|
|
42
|
+
"required": false,
|
|
43
|
+
"description": "Static groups, filtered locally by `filter`. A group left with no items is hidden, heading included."
|
|
44
|
+
},
|
|
45
|
+
"recent": {
|
|
46
|
+
"type": "CommandPaletteItem[]",
|
|
47
|
+
"required": false,
|
|
48
|
+
"description": "Recently used items, kept by the app: it owns the list and updates it from `onSelect`. Shown as\nthe first group while the trimmed query is empty, never filtered, and hidden while searching."
|
|
49
|
+
},
|
|
50
|
+
"recentLabel": {
|
|
51
|
+
"type": "string",
|
|
52
|
+
"required": false,
|
|
53
|
+
"description": "Heading of the recent group; `\"Recent\"` by default. That group is `{ id: \"recent\", label: recentLabel, items: recent }` in `onSelect`."
|
|
54
|
+
},
|
|
55
|
+
"query": {
|
|
56
|
+
"type": "string",
|
|
57
|
+
"required": false,
|
|
58
|
+
"description": "Controlled query. The palette is controlled while this is not `undefined`."
|
|
59
|
+
},
|
|
60
|
+
"defaultQuery": {
|
|
61
|
+
"type": "string",
|
|
62
|
+
"required": false,
|
|
63
|
+
"description": "Query used while `query` is `undefined`; `\"\"` by default. An uncontrolled field goes back to it\neach time the palette opens."
|
|
64
|
+
},
|
|
65
|
+
"onQueryChange": {
|
|
66
|
+
"type": "(query: string) => void",
|
|
67
|
+
"required": false,
|
|
68
|
+
"description": "Called for every edit of the field, in the controlled and in the uncontrolled mode."
|
|
69
|
+
},
|
|
70
|
+
"filter": {
|
|
71
|
+
"type": "CommandPaletteFilter | false",
|
|
72
|
+
"required": false,
|
|
73
|
+
"description": "Local matching of `groups`; commandPaletteFilter by default (every word of the query\noccurs in the label, the subtitle or a keyword, ignoring case and accents). `false` shows\n`groups` as given, for an app that filters or ranks them itself. Never applied to `recent` or\nto the results of `source`."
|
|
74
|
+
},
|
|
75
|
+
"source": {
|
|
76
|
+
"type": "CommandPaletteSource",
|
|
77
|
+
"required": false,
|
|
78
|
+
"description": "Loads results for the trimmed query, appended after the static groups. Called after `debounce`\nmilliseconds of quiet typing and only for a query of at least `minQueryLength` characters;\n`signal` is aborted when a newer query, a close or an unmount makes the answer useless. While a\nrequest is pending its predecessors' groups are not shown, and a rejection that is not an abort\nshows `errorText`."
|
|
79
|
+
},
|
|
80
|
+
"debounce": {
|
|
81
|
+
"type": "number",
|
|
82
|
+
"required": false,
|
|
83
|
+
"description": "Milliseconds of quiet typing before `source` is called; `200` by default."
|
|
84
|
+
},
|
|
85
|
+
"minQueryLength": {
|
|
86
|
+
"type": "number",
|
|
87
|
+
"required": false,
|
|
88
|
+
"description": "`source` is called only when the trimmed query has at least this many characters; `1` by\ndefault, so an empty query loads nothing. `0` also loads for the empty query."
|
|
89
|
+
},
|
|
90
|
+
"loading": {
|
|
91
|
+
"type": "boolean",
|
|
92
|
+
"required": false,
|
|
93
|
+
"description": "App-driven loading: shows the skeleton like a pending `source`; `false` by default."
|
|
94
|
+
},
|
|
95
|
+
"onSelect": {
|
|
96
|
+
"type": "(item: CommandPaletteItem, group: CommandPaletteGroup) => void",
|
|
97
|
+
"required": false,
|
|
98
|
+
"description": "Called for every chosen item, after the item's own `onSelect`. The place for the app to run the\ncommand and to update its `recent` list."
|
|
99
|
+
},
|
|
100
|
+
"closeOnSelect": {
|
|
101
|
+
"type": "boolean",
|
|
102
|
+
"required": false,
|
|
103
|
+
"description": "Ask to close (`onOpenChange(false)`) when an item is chosen; `true` by default."
|
|
104
|
+
},
|
|
105
|
+
"placeholder": {
|
|
106
|
+
"type": "string",
|
|
107
|
+
"required": false,
|
|
108
|
+
"description": "Placeholder of the field; `\"Type a command or search…\"` by default. It is not the field's name."
|
|
109
|
+
},
|
|
110
|
+
"searchLabel": {
|
|
111
|
+
"type": "string",
|
|
112
|
+
"required": false,
|
|
113
|
+
"description": "Accessible name of the field and, through `aria-labelledby`, of the listbox; `\"Search commands\"` by default."
|
|
114
|
+
},
|
|
115
|
+
"noResultsText": {
|
|
116
|
+
"type": "string",
|
|
117
|
+
"required": false,
|
|
118
|
+
"description": "Shown and announced when nothing matches; `\"No results\"` by default."
|
|
119
|
+
},
|
|
120
|
+
"errorText": {
|
|
121
|
+
"type": "string",
|
|
122
|
+
"required": false,
|
|
123
|
+
"description": "Shown and announced when `source` rejects; `\"Couldn't load results\"` by default."
|
|
124
|
+
},
|
|
125
|
+
"resultsAnnouncement": {
|
|
126
|
+
"type": "(count: number) => string",
|
|
127
|
+
"required": false,
|
|
128
|
+
"description": "Text of the polite status once a search has settled; `\"1 result\"` / `\"N results\"` by default.\nNot used for zero results, which announce `noResultsText`."
|
|
129
|
+
},
|
|
130
|
+
"footer": {
|
|
131
|
+
"type": "React.ReactNode",
|
|
132
|
+
"required": false,
|
|
133
|
+
"description": "Slot under the results, e.g. key hints built with `Kbd`. Drawn only when given."
|
|
134
|
+
},
|
|
135
|
+
"className": {
|
|
136
|
+
"type": "string",
|
|
137
|
+
"required": false,
|
|
138
|
+
"description": "Added to the dialog element, after `smwb-command-palette`."
|
|
139
|
+
},
|
|
140
|
+
"aria-label": {
|
|
141
|
+
"type": "string",
|
|
142
|
+
"required": false,
|
|
143
|
+
"description": "Name of the dialog; `\"Command palette\"` by default. Not set when `aria-labelledby` is given."
|
|
144
|
+
},
|
|
145
|
+
"aria-labelledby": {
|
|
146
|
+
"type": "string",
|
|
147
|
+
"required": false,
|
|
148
|
+
"description": "Id of the element that names the dialog. Wins over `aria-label`."
|
|
149
|
+
},
|
|
150
|
+
"aria-describedby": {
|
|
151
|
+
"type": "string",
|
|
152
|
+
"required": false,
|
|
153
|
+
"description": "Id of the element that describes the dialog."
|
|
154
|
+
},
|
|
155
|
+
"data-testid": {
|
|
156
|
+
"type": "string",
|
|
157
|
+
"required": false,
|
|
158
|
+
"description": "Test id of the dialog element; `\"command-palette\"` unless given."
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
@@ -78,6 +78,11 @@
|
|
|
78
78
|
"type": "string",
|
|
79
79
|
"required": false,
|
|
80
80
|
"description": "Accessible label for the built-in collapse toggle."
|
|
81
|
+
},
|
|
82
|
+
"contained": {
|
|
83
|
+
"type": "boolean",
|
|
84
|
+
"required": false,
|
|
85
|
+
"description": "Place the rail inside its container instead of pinning it to the window.\nThe sidebar stays in the page flow (`position: relative`), keeps its\nvariant width as a non-shrinking flex item and scrolls a long menu inside\nitself, so sibling content flows beside it and reflows when it collapses.\nGive the container a definite height (e.g. a fixed-height flex row) to\nmake the rail fill it; with an auto-height container the rail sizes\nitself to the menu. Defaults to `false`: the sidebar stays viewport-fixed."
|
|
81
86
|
}
|
|
82
87
|
}
|
|
83
88
|
}
|
|
@@ -18,9 +18,10 @@
|
|
|
18
18
|
"@smwb/ui-styles/less/components/tabs/tab/tab.entry.less"
|
|
19
19
|
],
|
|
20
20
|
"dependencies": [
|
|
21
|
+
"@smwb/ui-styles/less/components/icon/icon.entry.less",
|
|
21
22
|
"@smwb/ui-styles/less/components/ripple/ripple.entry.less"
|
|
22
23
|
],
|
|
23
|
-
"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/tabs/tab/tab.entry.less\";\n@import (less) \"node_modules/@smwb/ui-styles/less/components/ripple/ripple.entry.less\";"
|
|
24
|
+
"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/tabs/tab/tab.entry.less\";\n@import (less) \"node_modules/@smwb/ui-styles/less/components/icon/icon.entry.less\";\n@import (less) \"node_modules/@smwb/ui-styles/less/components/ripple/ripple.entry.less\";"
|
|
24
25
|
},
|
|
25
26
|
"props": {
|
|
26
27
|
"label": {
|
|
@@ -33,6 +34,11 @@
|
|
|
33
34
|
"required": false,
|
|
34
35
|
"description": "Is Active. Optional. Type: boolean."
|
|
35
36
|
},
|
|
37
|
+
"tabStop": {
|
|
38
|
+
"type": "boolean",
|
|
39
|
+
"required": false,
|
|
40
|
+
"description": "Whether the tab is the one in the page's Tab order (`tabIndex` 0, the others -1). `Tabs` sets\nit: the focused tab while focus is in the row, the selected one otherwise. On its own a tab\nis the stop while `isActive`."
|
|
41
|
+
},
|
|
36
42
|
"contentRef": {
|
|
37
43
|
"type": "React.Ref<unknown>",
|
|
38
44
|
"required": false,
|
|
@@ -41,7 +47,7 @@
|
|
|
41
47
|
"icon": {
|
|
42
48
|
"type": "React.ReactNode",
|
|
43
49
|
"required": false,
|
|
44
|
-
"description": "
|
|
50
|
+
"description": "Content before the label: a status marker (running, done, failed). The slot is decorative, so\nthe tab's accessible name stays the label alone and nothing is read out twice. An icon that has\nto be announced belongs in `label`, where you can give it words."
|
|
45
51
|
},
|
|
46
52
|
"stacked": {
|
|
47
53
|
"type": "boolean",
|
|
@@ -51,17 +57,37 @@
|
|
|
51
57
|
"tag": {
|
|
52
58
|
"type": "React.ElementType",
|
|
53
59
|
"required": false,
|
|
54
|
-
"description": "
|
|
60
|
+
"description": "The element to render. A tab with an `href` is an `a` unless you say otherwise."
|
|
55
61
|
},
|
|
56
62
|
"href": {
|
|
57
63
|
"type": "string",
|
|
58
64
|
"required": false,
|
|
59
|
-
"description": "
|
|
65
|
+
"description": "Navigation mode: where the tab goes. The tab is then a real link (`<a href role=\"tab\">`, with\nno `target`: a tab never opens another window), so it opens in place and middle click, copy\nlink and the like work. A router takes over the plain click in `onClick` with\n`event.preventDefault()`; `Tabs` still calls `onChange` for it. A modified or non-primary click\n(Ctrl, Meta, Shift or Alt held, or a button other than the main one) is the browser's, as\n\"open in a new tab\": the router must let it through, and `Tabs` does not call `onChange`.\nThe one exception is a middle press on a `closable` tab: it closes the tab instead, as in an\neditor, and its default is prevented so nothing opens."
|
|
60
66
|
},
|
|
61
67
|
"disabled": {
|
|
62
68
|
"type": "boolean",
|
|
63
69
|
"required": false,
|
|
64
70
|
"description": "Whether the control is disabled and non-interactive."
|
|
71
|
+
},
|
|
72
|
+
"closable": {
|
|
73
|
+
"type": "boolean",
|
|
74
|
+
"required": false,
|
|
75
|
+
"description": "Draw a close button after the tab, and let Delete or Backspace on the focused tab close it too\n(Backspace because a Mac has no Delete key); the tab lists them in `aria-keyshortcuts`. A middle\npress on the tab asks for the same thing (`reason` \"middleClick\") without selecting it. The tab\ndoes not close itself: `onClose` asks for it and the owner removes the `Tab`. The button is a\nsibling of the tab, not inside its `role=\"tab\"`, so the tab's accessible name is its label alone.\nIt is out of the Tab order (`tabIndex` -1), so the row keeps one tab stop, and a press on it takes\nno focus and never selects the tab. When the tab that has focus closes, `Tabs` moves focus to the\ntab that takes its place (the previous one if it was last), skipping disabled tabs. A disabled tab\nhas a disabled button.\n\nThe button stays in the accessibility tree, named by `closeLabel`: it is how a screen reader user\nwho cannot press Delete, as on a touch screen, closes the tab. It sits in the tab list beside its\ntab, though, and ARIA 1.2 lets a `tablist` own only `tab`s: a linter that applies that strictly\n(axe `aria-required-children`) can flag the button, and whatever `actions` holds.\n\nTo switch it off on a tab, pass `false` rather than leaving it out: a tab given `closable` or\n`actions` is wrapped in an item with them, a tab given neither is not, and moving between the two\nrecreates the tab and drops its focus."
|
|
76
|
+
},
|
|
77
|
+
"onClose": {
|
|
78
|
+
"type": "(event: React.SyntheticEvent<HTMLElement>, reason: TabCloseReason) => void",
|
|
79
|
+
"required": false,
|
|
80
|
+
"description": "Asks for the tab to close, and receives what asked for it: the close button's click (`reason`\n\"button\"), the key press of Delete or Backspace on the tab (`reason` \"key\", its default is\nprevented), the middle press on the tab (`reason` \"middleClick\", its default is prevented too),\nor the event passed to `close` by the tab's `actions` (`reason` \"actions\"). The owner removes\nthe `Tab`."
|
|
81
|
+
},
|
|
82
|
+
"closeLabel": {
|
|
83
|
+
"type": "string",
|
|
84
|
+
"required": false,
|
|
85
|
+
"description": "Accessible label of the close button. English by default; set it to localise, or to name the tab (\"Close Terminal 1\")."
|
|
86
|
+
},
|
|
87
|
+
"actions": {
|
|
88
|
+
"type": "React.ReactNode | ((api: TabActionsApi) => React.ReactNode)",
|
|
89
|
+
"required": false,
|
|
90
|
+
"description": "Content after the tab, before the close button: a trigger with a `Menu` (\"Rename\", \"Terminate\"),\nor any control. Give a function to get `{ close }` (see `TabActionsApi`). Like the close button\nthe content is a sibling of the tab, so it is not part of the tab's name; the tab's own `ref`,\n`className` and handlers stay on the `role=\"tab\"` element. It stays in the accessibility tree as\nwritten, inside the tab list (see `closable`).\n\nThe row has one tab stop, so give the trigger `tabIndex={-1}`. Shift+F10 or the Menu key on the\nfocused tab, which the tab lists in `aria-keyshortcuts`, focuses the first control in `actions`\nand clicks it, unless that control says `aria-expanded=\"true\"` (it is already open). If the\ncontrol names its popup in `aria-controls`, the first enabled `menuitem` in that element then\ntakes focus, as the WAI-ARIA menu button pattern asks: ArrowDown moves on, Enter chooses, and\nEscape hands focus back to the trigger. Without `aria-controls` focus stays on the trigger.\n\nThe row clips what overflows it: draw the menu in a portal, anchored to the trigger and with the\n`id` the trigger names. A choice that removes the tab (\"Terminate\") should call `close` with its\nevent, so that `onClose` removes the tab and `Tabs` moves focus on to the neighbour; a tab removed\nsome other way leaves focus on the page."
|
|
65
91
|
}
|
|
66
92
|
}
|
|
67
93
|
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "TabPanel",
|
|
3
|
+
"description": "Content panel of one tab, linked to it by aria-labelledby; shown while the tab is selected. Goes in the panels of Tabs.",
|
|
4
|
+
"ssr": {
|
|
5
|
+
"safe": true,
|
|
6
|
+
"rendering": "universal"
|
|
7
|
+
},
|
|
8
|
+
"extends": [
|
|
9
|
+
"React.HTMLAttributes<HTMLDivElement>"
|
|
10
|
+
],
|
|
11
|
+
"inheritedAttributes": "Also accepts standard HTML attributes for the underlying element (see extends clause in TypeScript).",
|
|
12
|
+
"styles": {
|
|
13
|
+
"base": [
|
|
14
|
+
"@smwb/ui-styles/less/foundation.less",
|
|
15
|
+
"@smwb/ui-styles/less/theme.less"
|
|
16
|
+
],
|
|
17
|
+
"entries": [
|
|
18
|
+
"@smwb/ui-styles/less/components/tabs/tabPanel/tabPanel.entry.less"
|
|
19
|
+
],
|
|
20
|
+
"dependencies": [
|
|
21
|
+
"@smwb/ui-styles/less/components/tabs/tabs.entry.less"
|
|
22
|
+
],
|
|
23
|
+
"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/tabs/tabPanel/tabPanel.entry.less\";\n@import (less) \"node_modules/@smwb/ui-styles/less/components/tabs/tabs.entry.less\";"
|
|
24
|
+
},
|
|
25
|
+
"props": {
|
|
26
|
+
"index": {
|
|
27
|
+
"type": "number",
|
|
28
|
+
"required": true,
|
|
29
|
+
"description": "The tab this panel belongs to: its index, counted as for the `value` of `Tabs`. The panel\nshows while that tab is selected and is hidden otherwise."
|
|
30
|
+
},
|
|
31
|
+
"className": {
|
|
32
|
+
"type": "string",
|
|
33
|
+
"required": false,
|
|
34
|
+
"description": "Extra class on the panel."
|
|
35
|
+
},
|
|
36
|
+
"children": {
|
|
37
|
+
"type": "React.ReactNode",
|
|
38
|
+
"required": false,
|
|
39
|
+
"description": "The panel's content. It stays in the document while the panel is hidden."
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "Tabs",
|
|
3
|
-
"description": "Tab list
|
|
3
|
+
"description": "Tab list with arrow-key navigation (manual activation), optional TabPanels, link tabs for route navigation, drag-to-reorder, an overflow menu of the clipped tabs, and close/switch keyboard chords.",
|
|
4
4
|
"ssr": {
|
|
5
5
|
"safe": true,
|
|
6
6
|
"rendering": "universal"
|
|
@@ -15,10 +15,13 @@
|
|
|
15
15
|
],
|
|
16
16
|
"dependencies": [
|
|
17
17
|
"@smwb/ui-styles/less/components/icon/icon.entry.less",
|
|
18
|
+
"@smwb/ui-styles/less/components/kbd/kbd.entry.less",
|
|
19
|
+
"@smwb/ui-styles/less/components/menu/menu.entry.less",
|
|
18
20
|
"@smwb/ui-styles/less/components/ripple/ripple.entry.less",
|
|
19
|
-
"@smwb/ui-styles/less/components/tabs/tab/tab.entry.less"
|
|
21
|
+
"@smwb/ui-styles/less/components/tabs/tab/tab.entry.less",
|
|
22
|
+
"@smwb/ui-styles/less/components/tabs/tabPanel/tabPanel.entry.less"
|
|
20
23
|
],
|
|
21
|
-
"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/tabs/tabs.entry.less\";\n@import (less) \"node_modules/@smwb/ui-styles/less/components/icon/icon.entry.less\";\n@import (less) \"node_modules/@smwb/ui-styles/less/components/ripple/ripple.entry.less\";\n@import (less) \"node_modules/@smwb/ui-styles/less/components/tabs/tab/tab.entry.less\";"
|
|
24
|
+
"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/tabs/tabs.entry.less\";\n@import (less) \"node_modules/@smwb/ui-styles/less/components/icon/icon.entry.less\";\n@import (less) \"node_modules/@smwb/ui-styles/less/components/kbd/kbd.entry.less\";\n@import (less) \"node_modules/@smwb/ui-styles/less/components/menu/menu.entry.less\";\n@import (less) \"node_modules/@smwb/ui-styles/less/components/ripple/ripple.entry.less\";\n@import (less) \"node_modules/@smwb/ui-styles/less/components/tabs/tab/tab.entry.less\";\n@import (less) \"node_modules/@smwb/ui-styles/less/components/tabs/tabPanel/tabPanel.entry.less\";"
|
|
22
25
|
},
|
|
23
26
|
"props": {
|
|
24
27
|
"value": {
|
|
@@ -29,7 +32,22 @@
|
|
|
29
32
|
"onChange": {
|
|
30
33
|
"type": "(e: React.MouseEvent<HTMLButtonElement>, index: number) => void",
|
|
31
34
|
"required": true,
|
|
32
|
-
"description": "Called with the index of the clicked tab, counted as for `value`."
|
|
35
|
+
"description": "Called with the index of the clicked tab, counted as for `value`. A tab chosen from the keyboard\n(Enter or Space on the focused tab) calls it with that click too. A modified or non-primary\nclick (Ctrl, Meta, Shift or Alt held, or a button other than the main one) on a link tab\n(`Tab` with `href`) is the browser's, as \"open in a new tab\": it does not call `onChange`."
|
|
36
|
+
},
|
|
37
|
+
"orientation": {
|
|
38
|
+
"type": "\"horizontal\" | \"vertical\"",
|
|
39
|
+
"required": false,
|
|
40
|
+
"description": "Which way the tabs run. It sets `aria-orientation` on the tab list and picks the arrow keys that\nmove between tabs: Left and Right when horizontal, Up and Down when vertical. The styles draw\na horizontal row; a vertical list is yours to lay out."
|
|
41
|
+
},
|
|
42
|
+
"panels": {
|
|
43
|
+
"type": "React.ReactNode",
|
|
44
|
+
"required": false,
|
|
45
|
+
"description": "The content of the tabs: `TabPanel`s, rendered after the tab row. With them each tab gets\n`aria-controls` its panel and each panel `aria-labelledby` its tab. Without them the tabs link\nto nothing, as before. Give a panel to every tab: a tab whose panel is left out still names it.\nA `TabPanel` placed anywhere else is not linked to the tabs and is always shown."
|
|
46
|
+
},
|
|
47
|
+
"id": {
|
|
48
|
+
"type": "string",
|
|
49
|
+
"required": false,
|
|
50
|
+
"description": "Base of the ids that link tabs and panels: tab `n` is `{id}-tab-{n}`, its panel `{id}-panel-{n}`.\nIt is also the id of the root element. A generated one by default."
|
|
33
51
|
},
|
|
34
52
|
"indicatorContent": {
|
|
35
53
|
"type": "boolean",
|
|
@@ -44,7 +62,22 @@
|
|
|
44
62
|
"scrollButtons": {
|
|
45
63
|
"type": "boolean",
|
|
46
64
|
"required": false,
|
|
47
|
-
"description": "With `scrollable`: buttons at both ends that scroll the row while it overflows."
|
|
65
|
+
"description": "With `scrollable`: buttons at both ends that scroll the row while it overflows. They are for\nthe pointer and stay out of the Tab order: the arrow keys reach every tab and scroll it into\nview."
|
|
66
|
+
},
|
|
67
|
+
"onReorder": {
|
|
68
|
+
"type": "(from: number, to: number) => void",
|
|
69
|
+
"required": false,
|
|
70
|
+
"description": "Present ⇒ the row is reorderable by dragging a tab onto another (pointer-only; there is no\nkeyboard reorder). `Tabs` does not move the tabs itself: it reports the drag with\n`onReorder(from, to)` — indexes counted as for `value` — and the owner reorders its state.\nThe tabs keep their focus through a reorder, and a reorder keeps the selection on the same tab:\nwhen the dragged tab is the selected one, its new index is reported through `onChange` too, so\na controlled owner moves its value along with its array. That report carries the drop event in\nplace of the click a keyboard or menu choice makes, so the index argument is the authoritative\none: on a drop `event.currentTarget` is the scroll area, not the moved tab."
|
|
71
|
+
},
|
|
72
|
+
"overflowMenu": {
|
|
73
|
+
"type": "boolean",
|
|
74
|
+
"required": false,
|
|
75
|
+
"description": "With `scrollable`: when the row overflows, a trigger button is rendered beside the scroller\n(in the scroll buttons' spot) that opens a menu of the tabs the viewport clips — any clipped\npart beyond a 1px tolerance counts. Each entry shows the tab's icon and label, the selected one\nis marked `aria-current=\"true\"`, and choosing one calls `onChange` for it and scrolls it into\nview. The trigger appears only after the browser has measured an overflow, so the server markup\nshows none."
|
|
76
|
+
},
|
|
77
|
+
"overflowMenuAriaLabel": {
|
|
78
|
+
"type": "string",
|
|
79
|
+
"required": false,
|
|
80
|
+
"description": "Accessible label of the overflow-menu trigger. English by default; set it to localise."
|
|
48
81
|
},
|
|
49
82
|
"dense": {
|
|
50
83
|
"type": "boolean",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smwb/ui-mcp-react",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.9.0",
|
|
4
4
|
"description": "Model Context Protocol server exposing the @smwb/ui-react (React) component catalog and customization guide.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"zod": "^4.4.3"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@smwb/ui-react": "^2.
|
|
32
|
-
"@smwb/ui-styles": "^
|
|
31
|
+
"@smwb/ui-react": "^2.9.0",
|
|
32
|
+
"@smwb/ui-styles": "^2.0.0",
|
|
33
33
|
"glob": "^13.0.6",
|
|
34
34
|
"typescript": "^6.0.3",
|
|
35
35
|
"vitest": "^2.1.9"
|