@charcuterie/ui 4.28.4 → 4.29.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/dist/CatalogPicker/CatalogPicker.d.ts +105 -0
- package/dist/CatalogPicker/CatalogPicker.d.ts.map +1 -0
- package/dist/CatalogPicker/CatalogPicker.js +152 -0
- package/dist/CatalogPicker/CatalogPicker.js.map +1 -0
- package/dist/CatalogPicker/CatalogPickerMark.d.ts +29 -0
- package/dist/CatalogPicker/CatalogPickerMark.d.ts.map +1 -0
- package/dist/CatalogPicker/CatalogPickerMark.js +35 -0
- package/dist/CatalogPicker/CatalogPickerMark.js.map +1 -0
- package/dist/CatalogPicker/CatalogPickerOption.d.ts +40 -0
- package/dist/CatalogPicker/CatalogPickerOption.d.ts.map +1 -0
- package/dist/CatalogPicker/CatalogPickerOption.js +42 -0
- package/dist/CatalogPicker/CatalogPickerOption.js.map +1 -0
- package/dist/CatalogPicker/CatalogPickerPanel.d.ts +60 -0
- package/dist/CatalogPicker/CatalogPickerPanel.d.ts.map +1 -0
- package/dist/CatalogPicker/CatalogPickerPanel.js +409 -0
- package/dist/CatalogPicker/CatalogPickerPanel.js.map +1 -0
- package/dist/CatalogPicker/CatalogPickerRail.d.ts +50 -0
- package/dist/CatalogPicker/CatalogPickerRail.d.ts.map +1 -0
- package/dist/CatalogPicker/CatalogPickerRail.js +114 -0
- package/dist/CatalogPicker/CatalogPickerRail.js.map +1 -0
- package/dist/CatalogPicker/catalogPickerDrawings.d.ts +10 -0
- package/dist/CatalogPicker/catalogPickerDrawings.d.ts.map +1 -0
- package/dist/CatalogPicker/catalogPickerDrawings.js +29 -0
- package/dist/CatalogPicker/catalogPickerDrawings.js.map +1 -0
- package/dist/CatalogPicker/catalogPickerView.d.ts +173 -0
- package/dist/CatalogPicker/catalogPickerView.d.ts.map +1 -0
- package/dist/CatalogPicker/catalogPickerView.js +235 -0
- package/dist/CatalogPicker/catalogPickerView.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/CatalogPicker/CatalogPicker.mdx +157 -0
- package/src/CatalogPicker/CatalogPicker.stories.tsx +218 -0
- package/src/CatalogPicker/CatalogPicker.test.tsx +1352 -0
- package/src/CatalogPicker/CatalogPicker.tsx +376 -0
- package/src/CatalogPicker/CatalogPickerMark.tsx +89 -0
- package/src/CatalogPicker/CatalogPickerOption.tsx +138 -0
- package/src/CatalogPicker/CatalogPickerPanel.tsx +780 -0
- package/src/CatalogPicker/CatalogPickerRail.tsx +214 -0
- package/src/CatalogPicker/catalogPicker.storyHelpers.tsx +276 -0
- package/src/CatalogPicker/catalogPickerDrawings.tsx +51 -0
- package/src/CatalogPicker/catalogPickerView.test.ts +346 -0
- package/src/CatalogPicker/catalogPickerView.ts +457 -0
- package/src/Dialog/Dialog.test.tsx +20 -289
- package/src/Field/Field.test.tsx +11 -405
- package/src/index.ts +6 -0
- package/src/sourceRules.test.ts +5 -1
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { Canvas, Meta } from "@storybook/addon-docs/blocks"
|
|
2
|
+
|
|
3
|
+
import * as CatalogPickerStories from "./CatalogPicker.stories.tsx"
|
|
4
|
+
|
|
5
|
+
<Meta of={CatalogPickerStories} />
|
|
6
|
+
|
|
7
|
+
# CatalogPicker
|
|
8
|
+
|
|
9
|
+
A picker over a large catalog — forty AI models from six providers, say — that you can
|
|
10
|
+
**browse by group** on a rail or **search across everything** at once.
|
|
11
|
+
|
|
12
|
+
<Canvas of={CatalogPickerStories.Playground} />
|
|
13
|
+
|
|
14
|
+
## When to use it, and when not
|
|
15
|
+
|
|
16
|
+
| You have | Use |
|
|
17
|
+
| --- | --- |
|
|
18
|
+
| A short list, no typing needed | `Picker` |
|
|
19
|
+
| One flat list that wants a filter | `Combobox` |
|
|
20
|
+
| A long list that falls into groups people think in — providers, accounts, vendors — and whose rows look alike until you read the end | **`CatalogPicker`** |
|
|
21
|
+
|
|
22
|
+
`Picker` has no filter, and `Combobox` filters one flat list with no way to look at just
|
|
23
|
+
one part of it. A catalog of models named "Provider · Model · slug" is exactly where both
|
|
24
|
+
fall short: every row starts the same way, and finding one means reading all of them.
|
|
25
|
+
The rail answers "show me this provider's models", and the search answers "I know the
|
|
26
|
+
name" without making the person know the provider first.
|
|
27
|
+
|
|
28
|
+
## The shape
|
|
29
|
+
|
|
30
|
+
- **The trigger** shows the chosen item's mark and label, and is named
|
|
31
|
+
`"<label>: <chosen label>"`, as `Picker`'s is. Query it as
|
|
32
|
+
`getByRole("button", { name: /^Agent: / })`.
|
|
33
|
+
- **The rail**, on the inline start: a **Favorites** star first (only when `favorites`
|
|
34
|
+
resolves to at least one item, a pinned one included), then one button per group, in
|
|
35
|
+
`groups` order. A group with no rows is left off. Each button's accessible name and tooltip is the group's
|
|
36
|
+
`label`.
|
|
37
|
+
- **The search field** at the top of the list, then **the list** for the current tab.
|
|
38
|
+
Each row shows the mark, the label, the optional `description`, a small star on a
|
|
39
|
+
favorite, and a check mark on the chosen row. The star and the check are drawn in CSS,
|
|
40
|
+
not typed, because a symbol character renders as nothing where the font lacks it.
|
|
41
|
+
- **Pinned rows** (`pinned: "start"` or `"end"`) appear at the top or bottom of every
|
|
42
|
+
tab and of the search results when they match — a "Default" that belongs to no group.
|
|
43
|
+
- **Ungrouped rows** — `groupId: null`, or a `groupId` that names no group — appear on
|
|
44
|
+
every tab, just after the pinned-start rows, and at the same place in search results.
|
|
45
|
+
No row is ever reachable only by search. Each row is listed once per view: a pinned or
|
|
46
|
+
ungrouped favorite is not listed a second time on the Favorites tab.
|
|
47
|
+
|
|
48
|
+
### One value, one row
|
|
49
|
+
|
|
50
|
+
Every item's `value` must be unique across the whole catalog, and every group's `id`
|
|
51
|
+
across `groups`. If one repeats, **the first one wins** — in the trigger, the list, the
|
|
52
|
+
check mark and Favorites alike — the later ones are dropped, and the picker logs a
|
|
53
|
+
`console.warn` naming them.
|
|
54
|
+
|
|
55
|
+
## Searching
|
|
56
|
+
|
|
57
|
+
Typing searches **every item**, whatever tab is current. The match is a case-insensitive
|
|
58
|
+
substring on the label, the description and the group's label, and **every word must
|
|
59
|
+
match**: `work lumen` finds the Lumen rows of the "Contoso (Work)" account and not the
|
|
60
|
+
others. Results sit under one heading per group, in rail order; favorites are found under
|
|
61
|
+
their group, not in a section of their own. While a query is live, no rail button is
|
|
62
|
+
pressed, because no one group is being shown.
|
|
63
|
+
|
|
64
|
+
This is not `CommandPalette`'s word-prefix match. A model's slug (`ct-lumen-4`) and a
|
|
65
|
+
version number (`4.5`) are things people type the middle of.
|
|
66
|
+
|
|
67
|
+
<Canvas of={CatalogPickerStories.AllStates} />
|
|
68
|
+
|
|
69
|
+
## Opening
|
|
70
|
+
|
|
71
|
+
Every open starts fresh: the query is empty, even when the picker is reopened while the
|
|
72
|
+
last panel is still fading out. The panel opens on **Favorites** when the chosen value is
|
|
73
|
+
a favorite or a row that every tab lists (pinned or ungrouped); otherwise on the **chosen
|
|
74
|
+
row's group**; otherwise on Favorites; otherwise on the first group. The chosen row is
|
|
75
|
+
highlighted and **centred** in the list — the rule a `Combobox` follows when it opens on
|
|
76
|
+
its chosen option. Focus goes to the search field.
|
|
77
|
+
|
|
78
|
+
Disabling an open picker closes it, and enabling it again leaves it closed.
|
|
79
|
+
|
|
80
|
+
## When the catalog changes while it is open
|
|
81
|
+
|
|
82
|
+
The highlight follows the row's `value`, not its position. If the catalog refreshes and
|
|
83
|
+
the rows move, the same row stays highlighted, so Enter chooses what the person saw. Only
|
|
84
|
+
when that row leaves the view, or becomes disabled, does the highlight move: to the
|
|
85
|
+
chosen row if the view shows it, even during a search, else the first enabled row. Each
|
|
86
|
+
row keeps its own button while a refresh leaves it in the same section, so a click already
|
|
87
|
+
pressed stays on its row. A refresh that moves the row to another section (for example, from
|
|
88
|
+
its group to the pinned rows) cancels that click instead; a click never lands on another row. If a refresh removes the rail
|
|
89
|
+
button that has focus, focus moves to the rail button that takes its place (or to the
|
|
90
|
+
search field), never to the page behind.
|
|
91
|
+
|
|
92
|
+
## Keyboard
|
|
93
|
+
|
|
94
|
+
| Where | Key | Does |
|
|
95
|
+
| --- | --- | --- |
|
|
96
|
+
| Search | ArrowDown / ArrowUp | Move the highlight, skipping disabled rows |
|
|
97
|
+
| Search | Home / End | Move the caret, as in any text field (and in `Combobox`) |
|
|
98
|
+
| Search | Enter | Choose the highlighted row and close |
|
|
99
|
+
| Search | Escape | Clear the query; on an empty query, close |
|
|
100
|
+
| Search | Tab | To the clear button while it shows, else to the rail; with neither, focus stays |
|
|
101
|
+
| Search | Shift+Tab | To the rail, else to the clear button while it shows |
|
|
102
|
+
| Clear button | Tab / Shift+Tab | To the rail, or the search field with no rail / back to the search field |
|
|
103
|
+
| Clear button | Escape | Clear the query, back in the search field |
|
|
104
|
+
| Rail | ArrowDown / ArrowUp, Home / End | Move between groups (wraps) |
|
|
105
|
+
| Rail | Enter / Space | Show that group |
|
|
106
|
+
| Rail | Tab | Back to the search field |
|
|
107
|
+
| Rail | Shift+Tab | To the clear button while it shows, else the search field |
|
|
108
|
+
| Rail | Escape | As in the search field |
|
|
109
|
+
|
|
110
|
+
Closing with Enter or Escape returns focus to the trigger. The picker consumes every
|
|
111
|
+
Escape it handles, so inside a `Dialog` the first Escape clears, the next closes the
|
|
112
|
+
picker, and the dialog stays open. While an input method editor is composing a word, its
|
|
113
|
+
Enter, Escape and arrows belong to the editor, not the picker.
|
|
114
|
+
|
|
115
|
+
<Canvas of={CatalogPickerStories.Interactive} />
|
|
116
|
+
|
|
117
|
+
## The ARIA shape, and why the rail is not a `tablist`
|
|
118
|
+
|
|
119
|
+
The trigger opens a `role="dialog"` named by the trigger. The search field is a
|
|
120
|
+
`role="combobox"` that keeps focus and moves `aria-activedescendant` through a
|
|
121
|
+
`role="listbox"` — the `Combobox` contract — and search results are labelled
|
|
122
|
+
`role="group"`s inside that listbox.
|
|
123
|
+
|
|
124
|
+
The rail looks like tabs but is a vertical **`role="toolbar"` of `aria-pressed`
|
|
125
|
+
buttons**. A tablist has to have a selected tab, and while a search runs none of them is
|
|
126
|
+
true; and a tab controls a tab panel, while what the rail changes is a listbox that the
|
|
127
|
+
search field drives too. A toolbar of toggle buttons says what is true — switches that
|
|
128
|
+
change what the list shows — and brings the APG keyboard contract with it: one tab stop,
|
|
129
|
+
the arrows move, Enter and Space press.
|
|
130
|
+
|
|
131
|
+
A mouse click on a rail button does not take focus from the search field, so a person can
|
|
132
|
+
click a group and keep typing or arrowing.
|
|
133
|
+
|
|
134
|
+
## Icons, badges and accent colors
|
|
135
|
+
|
|
136
|
+
Charcuterie ships no icons. Pass the app's own provider logos as `icon` on a group (or on
|
|
137
|
+
one item, to override its group's). A group without an icon gets an **initials badge**:
|
|
138
|
+
the first letter of its first two words, so "Tailspin Labs" is "TL".
|
|
139
|
+
|
|
140
|
+
`accentColor` (any CSS color) draws a **ring** around the mark. It is how two accounts of
|
|
141
|
+
one provider are told apart. It is never the fill behind text or the text itself, so a
|
|
142
|
+
consumer's color cannot fail the contrast gate.
|
|
143
|
+
|
|
144
|
+
## Sizes and narrow windows
|
|
145
|
+
|
|
146
|
+
`size` sets the trigger and every row in the panel, as a `Combobox`'s `itemSize` sets its
|
|
147
|
+
search field and its options; a short window steps the rows down on its own. The panel is
|
|
148
|
+
26rem wide and 28rem tall, capped to the space the window leaves, so on a 384px phone the
|
|
149
|
+
rail stays and the list narrows beside it.
|
|
150
|
+
|
|
151
|
+
<Canvas of={CatalogPickerStories.Responsive} />
|
|
152
|
+
|
|
153
|
+
## Not windowed
|
|
154
|
+
|
|
155
|
+
Every row of the current view renders. `Combobox` windows only above 100 rows and the
|
|
156
|
+
catalogs this was built for are 40 to 60. A catalog large enough to need windowing is a
|
|
157
|
+
change to this component, not a prop.
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
import { playgroundParameters } from "@charcuterie/storybook-config/story-parameters"
|
|
2
|
+
import type { Meta, StoryObj } from "@storybook/react"
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
controlSizeArgType,
|
|
6
|
+
placementArgType,
|
|
7
|
+
} from "../argTypes.storyHelpers.ts"
|
|
8
|
+
import {
|
|
9
|
+
ContainerBoard,
|
|
10
|
+
StoryCell,
|
|
11
|
+
StoryGrid,
|
|
12
|
+
StoryRow,
|
|
13
|
+
StorySection,
|
|
14
|
+
} from "../board.storyHelpers.tsx"
|
|
15
|
+
import { Field } from "../Field/Field.tsx"
|
|
16
|
+
import { CatalogPicker } from "./CatalogPicker.tsx"
|
|
17
|
+
import {
|
|
18
|
+
CATALOG_FAVORITES,
|
|
19
|
+
CATALOG_GROUPS,
|
|
20
|
+
CATALOG_ITEMS,
|
|
21
|
+
CatalogPickerHarness,
|
|
22
|
+
ClearIcon,
|
|
23
|
+
InlineCatalogPanel,
|
|
24
|
+
} from "./catalogPicker.storyHelpers.tsx"
|
|
25
|
+
|
|
26
|
+
const meta = {
|
|
27
|
+
title: "Components/Controls/CatalogPicker",
|
|
28
|
+
component: CatalogPicker,
|
|
29
|
+
parameters: { layout: "padded" },
|
|
30
|
+
argTypes: {
|
|
31
|
+
placement: placementArgType,
|
|
32
|
+
size: controlSizeArgType,
|
|
33
|
+
},
|
|
34
|
+
args: {
|
|
35
|
+
clearIcon: <ClearIcon />,
|
|
36
|
+
favorites: CATALOG_FAVORITES,
|
|
37
|
+
groups: CATALOG_GROUPS,
|
|
38
|
+
items: CATALOG_ITEMS,
|
|
39
|
+
label: "Agent",
|
|
40
|
+
onChange: () => undefined,
|
|
41
|
+
searchPlaceholder: "Search models…",
|
|
42
|
+
value: "contoso/ct-lumen-4",
|
|
43
|
+
},
|
|
44
|
+
} satisfies Meta<typeof CatalogPicker>
|
|
45
|
+
|
|
46
|
+
export default meta
|
|
47
|
+
|
|
48
|
+
type Story = StoryObj<typeof meta>
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Forty-odd invented models across six groups, with four favorites
|
|
52
|
+
* and a pinned "Default". Open it, browse a group on the rail, or type
|
|
53
|
+
* to search all of them at once.
|
|
54
|
+
*/
|
|
55
|
+
export const Playground: Story = {
|
|
56
|
+
parameters: playgroundParameters,
|
|
57
|
+
render: (args) => (
|
|
58
|
+
<CatalogPickerHarness
|
|
59
|
+
favorites={args.favorites}
|
|
60
|
+
groups={args.groups}
|
|
61
|
+
initialValue={args.value}
|
|
62
|
+
isDisabled={args.isDisabled}
|
|
63
|
+
items={args.items}
|
|
64
|
+
label={args.label}
|
|
65
|
+
placeholder={args.placeholder}
|
|
66
|
+
size={args.size}
|
|
67
|
+
/>
|
|
68
|
+
),
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* The trigger at each size, with an icon, with an initials badge, with
|
|
73
|
+
* the accent ring of a second account, and with nothing chosen.
|
|
74
|
+
*/
|
|
75
|
+
export const AllVariants: Story = {
|
|
76
|
+
render: () => (
|
|
77
|
+
<StoryGrid columns={3}>
|
|
78
|
+
{(["sm", "md", "lg"] as const).map((size) => (
|
|
79
|
+
<StoryCell key={size} label={`size="${size}"`}>
|
|
80
|
+
<CatalogPickerHarness
|
|
81
|
+
initialValue="northwind/nw-swift-3"
|
|
82
|
+
label={`Agent ${size} icon`}
|
|
83
|
+
size={size}
|
|
84
|
+
/>
|
|
85
|
+
<CatalogPickerHarness
|
|
86
|
+
initialValue="tailspin/ts-glide-2"
|
|
87
|
+
label={`Agent ${size} badge`}
|
|
88
|
+
size={size}
|
|
89
|
+
/>
|
|
90
|
+
<CatalogPickerHarness
|
|
91
|
+
initialValue="contoso-work/ct-lumen-4"
|
|
92
|
+
label={`Agent ${size} accent`}
|
|
93
|
+
size={size}
|
|
94
|
+
/>
|
|
95
|
+
<CatalogPickerHarness
|
|
96
|
+
label={`Agent ${size} empty`}
|
|
97
|
+
placeholder="Choose an agent…"
|
|
98
|
+
size={size}
|
|
99
|
+
/>
|
|
100
|
+
</StoryCell>
|
|
101
|
+
))}
|
|
102
|
+
</StoryGrid>
|
|
103
|
+
),
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* The panel drawn in place, so every state sits on one board: the
|
|
108
|
+
* Favorites tab, a group tab with a disabled row, a search across
|
|
109
|
+
* every group, and a search with no matches. The disabled trigger is
|
|
110
|
+
* last.
|
|
111
|
+
*/
|
|
112
|
+
export const AllStates: Story = {
|
|
113
|
+
render: () => (
|
|
114
|
+
<div className="flex flex-col gap-8">
|
|
115
|
+
<StoryRow>
|
|
116
|
+
<StorySection title="Favorites, with the chosen row">
|
|
117
|
+
<InlineCatalogPanel
|
|
118
|
+
label="Favorites panel"
|
|
119
|
+
value="contoso/ct-lumen-4"
|
|
120
|
+
/>
|
|
121
|
+
</StorySection>
|
|
122
|
+
|
|
123
|
+
<StorySection title="A group, with a disabled row">
|
|
124
|
+
<InlineCatalogPanel
|
|
125
|
+
label="Group panel"
|
|
126
|
+
value="fabrikam/fb-loom-7"
|
|
127
|
+
/>
|
|
128
|
+
</StorySection>
|
|
129
|
+
|
|
130
|
+
<StorySection title="Searching every group">
|
|
131
|
+
<InlineCatalogPanel
|
|
132
|
+
defaultQuery="lumen"
|
|
133
|
+
label="Search panel"
|
|
134
|
+
value="contoso/ct-lumen-4"
|
|
135
|
+
/>
|
|
136
|
+
</StorySection>
|
|
137
|
+
|
|
138
|
+
<StorySection title="No matches">
|
|
139
|
+
<InlineCatalogPanel
|
|
140
|
+
defaultQuery="zzz"
|
|
141
|
+
label="Empty panel"
|
|
142
|
+
/>
|
|
143
|
+
</StorySection>
|
|
144
|
+
</StoryRow>
|
|
145
|
+
|
|
146
|
+
<StorySection title="Disabled">
|
|
147
|
+
<StoryRow>
|
|
148
|
+
<CatalogPickerHarness
|
|
149
|
+
initialValue="contoso/ct-lumen-4"
|
|
150
|
+
isDisabled
|
|
151
|
+
label="Disabled agent"
|
|
152
|
+
/>
|
|
153
|
+
</StoryRow>
|
|
154
|
+
</StorySection>
|
|
155
|
+
</div>
|
|
156
|
+
),
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* Inside a `Field` the trigger stretches to its container, the value
|
|
161
|
+
* at the inline start and the chevron at the inline end; a name wider
|
|
162
|
+
* than the container ends in an ellipsis. The panel is sized against
|
|
163
|
+
* the window, not the container: it caps to the viewport, rail and
|
|
164
|
+
* all, on a 384px phone.
|
|
165
|
+
*/
|
|
166
|
+
export const Responsive: Story = {
|
|
167
|
+
render: () => (
|
|
168
|
+
<ContainerBoard>
|
|
169
|
+
{(width) => (
|
|
170
|
+
<div className="flex flex-col gap-4">
|
|
171
|
+
<Field label={`Agent at ${width}`}>
|
|
172
|
+
<CatalogPickerHarness
|
|
173
|
+
initialValue="northwind/nw-swift-3"
|
|
174
|
+
label={`Agent at ${width}`}
|
|
175
|
+
/>
|
|
176
|
+
</Field>
|
|
177
|
+
<Field label={`Long agent at ${width}`}>
|
|
178
|
+
<CatalogPickerHarness
|
|
179
|
+
initialValue="tailspin/ts-tailwind-research-preview-with-a-very-long-name"
|
|
180
|
+
label={`Long agent at ${width}`}
|
|
181
|
+
/>
|
|
182
|
+
</Field>
|
|
183
|
+
</div>
|
|
184
|
+
)}
|
|
185
|
+
</ContainerBoard>
|
|
186
|
+
),
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* The complete keyboard path. Open with Enter or Space; type to search
|
|
191
|
+
* every group; ArrowUp and ArrowDown move the highlight, Home and End
|
|
192
|
+
* jump; Enter chooses and closes. Tab moves to the rail, where the
|
|
193
|
+
* arrows move between groups and Enter shows one; Tab goes back to the
|
|
194
|
+
* search field. Escape clears a query, then closes and returns focus
|
|
195
|
+
* to the trigger.
|
|
196
|
+
*/
|
|
197
|
+
export const Interactive: Story = {
|
|
198
|
+
render: () => (
|
|
199
|
+
<CatalogPickerHarness
|
|
200
|
+
initialValue="northwind/nw-harbor-4"
|
|
201
|
+
label="Agent"
|
|
202
|
+
/>
|
|
203
|
+
),
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* No favorites: the rail starts at the first group, and opening lands
|
|
208
|
+
* on the chosen row's group.
|
|
209
|
+
*/
|
|
210
|
+
export const WithoutFavorites: Story = {
|
|
211
|
+
render: () => (
|
|
212
|
+
<CatalogPickerHarness
|
|
213
|
+
favorites={[]}
|
|
214
|
+
initialValue="litware/lw-margin-2"
|
|
215
|
+
label="Agent without favorites"
|
|
216
|
+
/>
|
|
217
|
+
),
|
|
218
|
+
}
|