@smwb/ui-mcp-react 2.7.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.
Files changed (75) hide show
  1. package/component-meta/base/icon/icon.json +6 -1
  2. package/component-meta/base/ripple/ripple.json +6 -1
  3. package/component-meta/connects/rt/table/table.json +1 -1
  4. package/component-meta/dataDisplay/avatar/avatar.avatarGroup.json +5 -0
  5. package/component-meta/dataDisplay/avatar/avatar.json +5 -0
  6. package/component-meta/dataDisplay/card/card.json +10 -5
  7. package/component-meta/dataDisplay/chart/chart.json +5 -0
  8. package/component-meta/dataDisplay/chat/chat.chatFooterComposer.json +24 -0
  9. package/component-meta/dataDisplay/chat/chat.json +24 -3
  10. package/component-meta/dataDisplay/chat/chatComposer.json +1 -1
  11. package/component-meta/dataDisplay/chat/chatLayout.json +7 -1
  12. package/component-meta/dataDisplay/chat/chatOverlayLayout.json +7 -1
  13. package/component-meta/dataDisplay/chip/chip.json +14 -4
  14. package/component-meta/dataDisplay/dagView/dagView.json +165 -0
  15. package/component-meta/dataDisplay/descriptionList/descriptionList.json +1 -1
  16. package/component-meta/dataDisplay/diffStat/diffStat.json +65 -0
  17. package/component-meta/dataDisplay/kanban/kanban.json +5 -0
  18. package/component-meta/dataDisplay/kanban/kanban.kanbanCard.json +5 -0
  19. package/component-meta/dataDisplay/kanban/kanban.kanbanColumn.json +5 -0
  20. package/component-meta/dataDisplay/kbd/kbd.json +55 -0
  21. package/component-meta/dataDisplay/list/list.json +5 -0
  22. package/component-meta/dataDisplay/list/listItem.json +18 -3
  23. package/component-meta/dataDisplay/meter/meter.json +5 -0
  24. package/component-meta/dataDisplay/personChip/personChip.json +5 -0
  25. package/component-meta/dataDisplay/qrCode/qrCode.json +60 -0
  26. package/component-meta/dataDisplay/stat/stat.json +5 -0
  27. package/component-meta/dataDisplay/statusDot/statusDot.json +60 -0
  28. package/component-meta/dataDisplay/swimlanes/swimlanes.json +90 -0
  29. package/component-meta/dataDisplay/table/table.json +1 -1
  30. package/component-meta/dataDisplay/table/tableCell.json +6 -1
  31. package/component-meta/dataDisplay/table/tableHeadCell.json +11 -1
  32. package/component-meta/dataDisplay/table/tableRow.json +5 -0
  33. package/component-meta/dataDisplay/thumbCard/thumbCard.json +16 -6
  34. package/component-meta/dataDisplay/treeView/treeView.json +21 -1
  35. package/component-meta/feedBack/emptyState/emptyState.json +5 -0
  36. package/component-meta/feedBack/message/message.json +5 -0
  37. package/component-meta/feedBack/skeleton/skeleton.json +7 -2
  38. package/component-meta/feedBack/tooltip/tooltip.json +4 -4
  39. package/component-meta/inputs/button/button.json +15 -0
  40. package/component-meta/inputs/buttonGroups/buttonGroup.json +5 -0
  41. package/component-meta/inputs/checkbox/checkbox.json +2 -2
  42. package/component-meta/inputs/composer/composer.json +222 -0
  43. package/component-meta/inputs/radioButton/radioButton.json +6 -1
  44. package/component-meta/inputs/rating/rating.json +11 -1
  45. package/component-meta/inputs/selectField/dropdownMenu.json +45 -0
  46. package/component-meta/inputs/selectField/selectField.json +6 -6
  47. package/component-meta/inputs/slider/slider.json +8 -3
  48. package/component-meta/inputs/textField/textField.json +3 -3
  49. package/component-meta/inputs/textField/textFieldWrapper.json +16 -1
  50. package/component-meta/inputs/toggle/toggle.json +1 -1
  51. package/component-meta/inputs/valueSlider/valueSlider.json +13 -8
  52. package/component-meta/layout/appLayout/appLayout.json +5 -0
  53. package/component-meta/layout/divider/divider.json +5 -0
  54. package/component-meta/layout/floatingWindow/floatingWindow.json +5 -0
  55. package/component-meta/layout/grid/grid.column.json +1 -1
  56. package/component-meta/layout/grid/grid.container.json +5 -0
  57. package/component-meta/layout/grid/grid.row.json +5 -0
  58. package/component-meta/layout/page/page.json +5 -0
  59. package/component-meta/layout/pageHeader/pageHeader.json +5 -0
  60. package/component-meta/layout/sectionHeader/sectionHeader.json +5 -0
  61. package/component-meta/layout/sheet/sheet.json +25 -0
  62. package/component-meta/layout/stack/stack.json +5 -0
  63. package/component-meta/layout/tabGroups/tabGroups.json +101 -0
  64. package/component-meta/navigation/appBar/appBar.json +20 -0
  65. package/component-meta/navigation/breadcrumbs/breadcrumbs.json +5 -0
  66. package/component-meta/navigation/commandPalette/commandPalette.json +161 -0
  67. package/component-meta/navigation/menu/menu.json +1 -1
  68. package/component-meta/navigation/menu/menuItem.json +1 -1
  69. package/component-meta/navigation/pagination/pagination.json +5 -0
  70. package/component-meta/navigation/sidebar/sidebar.json +5 -0
  71. package/component-meta/navigation/stepper/stepper.json +5 -0
  72. package/component-meta/navigation/tabs/tab/tab.json +30 -4
  73. package/component-meta/navigation/tabs/tabPanel/tabPanel.json +42 -0
  74. package/component-meta/navigation/tabs/tabs.json +40 -7
  75. package/package.json +3 -3
@@ -30,6 +30,11 @@
30
30
  "type": "boolean",
31
31
  "required": false,
32
32
  "description": "Remove horizontal gutters."
33
+ },
34
+ "data-testid": {
35
+ "type": "string",
36
+ "required": false,
37
+ "description": "Test id of the root `<div>`; `grid-container` unless given."
33
38
  }
34
39
  }
35
40
  }
@@ -45,6 +45,11 @@
45
45
  "type": "number",
46
46
  "required": false,
47
47
  "description": "Spacing between stacked children."
48
+ },
49
+ "data-testid": {
50
+ "type": "string",
51
+ "required": false,
52
+ "description": "Test id of the root `<div>`; `grid-row` unless given."
48
53
  }
49
54
  }
50
55
  }
@@ -40,6 +40,11 @@
40
40
  "type": "string",
41
41
  "required": false,
42
42
  "description": "Additional CSS class name(s) for the root element."
43
+ },
44
+ "data-testid": {
45
+ "type": "string",
46
+ "required": false,
47
+ "description": "Test id of the root element; `page` unless given."
43
48
  }
44
49
  }
45
50
  }
@@ -52,6 +52,11 @@
52
52
  "type": "string",
53
53
  "required": false,
54
54
  "description": "Additional CSS class name(s) for the root element."
55
+ },
56
+ "data-testid": {
57
+ "type": "string",
58
+ "required": false,
59
+ "description": "Test id of the root `<header>`; `page-header` unless given."
55
60
  }
56
61
  }
57
62
  }
@@ -63,6 +63,11 @@
63
63
  "type": "ReactNode",
64
64
  "required": false,
65
65
  "description": "A line under the title."
66
+ },
67
+ "data-testid": {
68
+ "type": "string",
69
+ "required": false,
70
+ "description": "Test id of the root `<header>`; `section-header` unless given."
66
71
  }
67
72
  }
68
73
  }
@@ -66,6 +66,26 @@
66
66
  "required": false,
67
67
  "description": "Reverse Header Actions. Optional. Type: boolean."
68
68
  },
69
+ "closeAriaLabel": {
70
+ "type": "string",
71
+ "required": false,
72
+ "description": "Accessible name of the header close button (default \"Close sheet\")."
73
+ },
74
+ "expandAriaLabel": {
75
+ "type": "string",
76
+ "required": false,
77
+ "description": "Accessible name of the size toggle while the sheet is at its normal size (default \"Expand sheet\"). The toggle\ncycles normal, expanded, collapsed and back, and its name always says what the next press does; the\nname changing is how it exposes its state. It shows the `open_in_full` icon, and `close_fullscreen` while expanded."
78
+ },
79
+ "collapseAriaLabel": {
80
+ "type": "string",
81
+ "required": false,
82
+ "description": "Accessible name of the size toggle while the sheet is expanded (default \"Collapse sheet\")."
83
+ },
84
+ "restoreAriaLabel": {
85
+ "type": "string",
86
+ "required": false,
87
+ "description": "Accessible name of the size toggle while the sheet is collapsed to its header (default \"Restore sheet size\")."
88
+ },
69
89
  "size": {
70
90
  "type": "string",
71
91
  "required": false,
@@ -115,6 +135,11 @@
115
135
  "type": "string",
116
136
  "required": false,
117
137
  "description": "Accessible label when no visible title is present."
138
+ },
139
+ "data-testid": {
140
+ "type": "string",
141
+ "required": false,
142
+ "description": "Test id of the sheet panel (the dialog); `sheet` unless given."
118
143
  }
119
144
  }
120
145
  }
@@ -55,6 +55,11 @@
55
55
  "type": "string",
56
56
  "required": false,
57
57
  "description": "Additional CSS class name(s) for the root element."
58
+ },
59
+ "data-testid": {
60
+ "type": "string",
61
+ "required": false,
62
+ "description": "Test id of the root `<div>`; `stack` unless given."
58
63
  }
59
64
  }
60
65
  }
@@ -0,0 +1,101 @@
1
+ {
2
+ "name": "TabGroups",
3
+ "description": "Tab groups in a split area: move tabs between groups by drag and drop or keyboard, split right or down, resize, close the last tab to close a group; the layout is a versioned JSON (layout/onLayoutChange).",
4
+ "ssr": {
5
+ "safe": true,
6
+ "rendering": "universal",
7
+ "note": "Renders the groups, tab rows and selected panels on the server; drag and drop and resizing run in the browser."
8
+ },
9
+ "extends": [
10
+ "Omit<React.HTMLAttributes<HTMLDivElement>, \"children\" | \"onChange\">"
11
+ ],
12
+ "inheritedAttributes": "Also accepts standard HTML attributes for the underlying element (see extends clause in TypeScript).",
13
+ "styles": {
14
+ "base": [
15
+ "@smwb/ui-styles/less/foundation.less",
16
+ "@smwb/ui-styles/less/theme.less"
17
+ ],
18
+ "entries": [
19
+ "@smwb/ui-styles/less/components/tabGroups/tabGroups.entry.less"
20
+ ],
21
+ "dependencies": [
22
+ "@smwb/ui-styles/less/components/icon/icon.entry.less",
23
+ "@smwb/ui-styles/less/components/kbd/kbd.entry.less",
24
+ "@smwb/ui-styles/less/components/menu/menu.entry.less",
25
+ "@smwb/ui-styles/less/components/tabs/tabs.entry.less"
26
+ ],
27
+ "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/tabGroups/tabGroups.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/tabs/tabs.entry.less\";"
28
+ },
29
+ "props": {
30
+ "layout": {
31
+ "type": "TabGroupsLayout | undefined",
32
+ "required": false,
33
+ "description": "The arrangement to draw: the split tree, the tabs of every group and which of them is\nselected. Controlled while it is not `undefined` — the component then draws what it is given\nand an owner that ignores `onLayoutChange` sees nothing move."
34
+ },
35
+ "defaultLayout": {
36
+ "type": "TabGroupsLayout | undefined",
37
+ "required": false,
38
+ "description": "The layout of the uncontrolled mode's first render: one empty group by default."
39
+ },
40
+ "onLayoutChange": {
41
+ "type": "((layout: TabGroupsLayout, change: TabGroupsChange) => void) | undefined",
42
+ "required": false,
43
+ "description": "Called with the new layout and what changed (`select`, `activate`, `move`, `split`, `close`,\n`resize`) in the controlled and the uncontrolled mode alike. Store the layout here; the\n`change` says which of them are worth writing (an `activate` is a focus move, not an edit)."
44
+ },
45
+ "getTab": {
46
+ "type": "(tabId: string) => TabGroupsTab | undefined",
47
+ "required": true,
48
+ "description": "What a tab shows, by its id: `undefined` draws the id as the label."
49
+ },
50
+ "renderPanel": {
51
+ "type": "(tabId: string) => React.ReactNode",
52
+ "required": true,
53
+ "description": "The content of a tab's panel, by its id. Called from the first time the tab is selected and\nkept mounted after that, so a panel keeps its state while hidden and while its tab moves."
54
+ },
55
+ "onTabClose": {
56
+ "type": "| ((tabId: string, event: React.SyntheticEvent<HTMLElement>, reason: TabCloseReason) => boolean | void) | undefined",
57
+ "required": false,
58
+ "description": "Asked before a tab closes (its close button, Delete or Backspace, a middle press or its\n`actions`), with what asked for it. Return `false` to keep the tab; anything else closes it."
59
+ },
60
+ "empty": {
61
+ "type": "React.ReactNode",
62
+ "required": false,
63
+ "description": "Drawn, centred, when nothing is open: the only group has no tabs."
64
+ },
65
+ "minGroupSize": {
66
+ "type": "number",
67
+ "required": false,
68
+ "description": "The smallest a group can be resized to, in px of its split; 120 by default."
69
+ },
70
+ "keyboardStep": {
71
+ "type": "number",
72
+ "required": false,
73
+ "description": "A separator's arrow-key step, in percent of its split; 5 by default, as `ScreenDivider`."
74
+ },
75
+ "groupActions": {
76
+ "type": "boolean",
77
+ "required": false,
78
+ "description": "Draw each group's actions button and its menu; true by default."
79
+ },
80
+ "dense": {
81
+ "type": "boolean",
82
+ "required": false,
83
+ "description": "Compact tab rows (`Tabs`' `dense`); false by default."
84
+ },
85
+ "labels": {
86
+ "type": "Partial<TabGroupsLabels> | undefined",
87
+ "required": false,
88
+ "description": "The component's texts, to localise them. English by default."
89
+ },
90
+ "id": {
91
+ "type": "string",
92
+ "required": false,
93
+ "description": "Base of the generated ids and the root's own id. Generated by default."
94
+ },
95
+ "data-testid": {
96
+ "type": "string",
97
+ "required": false,
98
+ "description": "Test id of the root element; \"tab-groups\" by default."
99
+ }
100
+ }
101
+ }
@@ -66,15 +66,35 @@
66
66
  "required": false,
67
67
  "description": "Accessible title or tooltip text."
68
68
  },
69
+ "titleAs": {
70
+ "type": "\"div\" | \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\"",
71
+ "required": false,
72
+ "description": "Tag the `title` is rendered in: a `div` (default) or a heading, `h1`–`h6`,\nfor the page's main heading. Only the tag changes — a heading is drawn with\nthe bar's own font size, weight and no margins, so it looks exactly like the\ndiv. The heading's text is the `title` itself, so pass a string or plain\nmarkup rather than a `Typography` heading."
73
+ },
69
74
  "midContentAlign": {
70
75
  "type": "\"middle\" | \"left\" | \"right\"",
71
76
  "required": false,
72
77
  "description": "Mid Content Align. Optional. Type: \"middle\" | \"left\" | \"right\"."
73
78
  },
79
+ "variant": {
80
+ "type": "\"default\" | \"window\"",
81
+ "required": false,
82
+ "description": "`window`: the bar is the title bar of a desktop app window (Electron, Tauri, an installed PWA with Window\nControls Overlay). The bar drags the window; buttons, links, fields and other controls in it stay clickable,\nand room is left for the OS window buttons (`windowControls`). In a plain browser tab it looks like `default`."
83
+ },
84
+ "windowControls": {
85
+ "type": "\"auto\" | \"left\" | \"right\" | \"none\"",
86
+ "required": false,
87
+ "description": "With `variant=\"window\"`: where the OS window buttons are, so the bar's content keeps clear of them.\n`auto` (default) takes the area from the shell's `env(titlebar-area-*)` (Window Controls Overlay, Electron\n`titleBarOverlay`) and reserves nothing without it; `left` is macOS (traffic lights, `titleBarStyle: \"hiddenInset\"`),\n`right` is Windows/Linux caption buttons drawn by the OS; `none` reserves nothing. The reserved width is\nthe `--smui-appBarWindowControlsWidth` custom property (64px on the left, 138px on the right by default)."
88
+ },
74
89
  "color": {
75
90
  "type": "AppBarColor",
76
91
  "required": false,
77
92
  "description": "Semantic background color."
93
+ },
94
+ "data-testid": {
95
+ "type": "string",
96
+ "required": false,
97
+ "description": "Test id of the root (`<header>`, or `<footer>` at the bottom); `app-bar` unless given."
78
98
  }
79
99
  }
80
100
  }
@@ -60,6 +60,11 @@
60
60
  "type": "string",
61
61
  "required": false,
62
62
  "description": "Accessible label for the expand button."
63
+ },
64
+ "data-testid": {
65
+ "type": "string",
66
+ "required": false,
67
+ "description": "Test id of the root `<nav>`; `breadcrumbs` unless given."
63
68
  }
64
69
  }
65
70
  }
@@ -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
+ }
@@ -7,7 +7,7 @@
7
7
  "note": "The trigger renders on the server; the menu surface mounts on the client."
8
8
  },
9
9
  "extends": [
10
- "MenuFloatingProps &\n React.HTMLAttributes<HTMLElement> & {\n variant?: \"static\" | \"floating\";\n dense?: boolean;\n }"
10
+ "MenuFloatingProps &\n React.HTMLAttributes<HTMLElement> & {\n variant?: \"static\" | \"floating\";\n dense?: boolean;\n /**\n * Role of the list inside the menu, `menu` by default. A component that draws\n * a list of its own on the menu's surface sets `presentation`: SelectField's\n * options are a `listbox` inside it.\n */\n listRole?: React.AriaRole;\n }"
11
11
  ],
12
12
  "inheritedAttributes": "Also accepts standard HTML attributes for the underlying element (see extends clause in TypeScript).",
13
13
  "styles": {
@@ -26,7 +26,7 @@
26
26
  "disabled": {
27
27
  "type": "boolean",
28
28
  "required": false,
29
- "description": "Whether the control is disabled and non-interactive."
29
+ "description": "Greys the item out and marks it `aria-disabled`. It takes no focus, the arrow keys\nskip it, and neither a click nor Enter or Space chooses it."
30
30
  },
31
31
  "selected": {
32
32
  "type": "boolean",
@@ -97,6 +97,11 @@
97
97
  "type": "(page: number) => void",
98
98
  "required": false,
99
99
  "description": "Callback fired when the value changes."
100
+ },
101
+ "data-testid": {
102
+ "type": "string",
103
+ "required": false,
104
+ "description": "Test id of the root `<nav>`; `pagination` unless given."
100
105
  }
101
106
  }
102
107
  }
@@ -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
  }
@@ -52,6 +52,11 @@
52
52
  "type": "(index: number) => void",
53
53
  "required": false,
54
54
  "description": "Makes steps clickable; receives the clicked step index."
55
+ },
56
+ "data-testid": {
57
+ "type": "string",
58
+ "required": false,
59
+ "description": "Test id of the stepper `<div>`; `stepper` unless given."
55
60
  }
56
61
  }
57
62
  }
@@ -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": "Icon node or image source."
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": "Tag. Optional. Type: React.ElementType."
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": "With `tag=\"a\"`: where the link goes, so the tab stays a real link."
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
+ }