@7shifts/sous-chef 4.4.1 → 4.5.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/forms/ColorField/ColorOverlay/ColorOverlay.d.ts +1 -1
- package/dist/forms/ColorField/ColorOverlay/domain.d.ts +27 -0
- package/dist/foundation/tokens/color/color-constants.d.ts +23 -0
- package/dist/foundation/tokens/color/color-types.d.ts +1 -1
- package/dist/icons/components/image/IconSchool.d.ts +10 -0
- package/dist/icons/components/image/index.d.ts +1 -0
- package/dist/index.css +69 -139
- package/dist/index.css.map +1 -1
- package/dist/index.js +542 -362
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +534 -363
- package/dist/index.modern.js.map +1 -1
- package/dist/overlay/DropdownListItem/DropdownListItem.d.ts +3 -1
- package/dist/overlay/hooks/useSubmenu.d.ts +1 -0
- package/llms-instructions/guidelines/Accordion.guidelines.md +36 -0
- package/llms-instructions/guidelines/ActionList.guidelines.md +59 -0
- package/llms-instructions/guidelines/Avatar.guidelines.md +51 -0
- package/llms-instructions/guidelines/Badge.guidelines.md +40 -0
- package/llms-instructions/guidelines/Breadcrumbs.guidelines.md +41 -0
- package/llms-instructions/guidelines/Button.guidelines.md +41 -0
- package/llms-instructions/guidelines/Calendar.guidelines.md +40 -0
- package/llms-instructions/guidelines/Card.guidelines.md +58 -0
- package/llms-instructions/guidelines/Chip.guidelines.md +64 -0
- package/llms-instructions/guidelines/CircularProgress.guidelines.md +28 -0
- package/llms-instructions/guidelines/DataTable.guidelines.md +88 -0
- package/llms-instructions/guidelines/DateFilter.guidelines.md +32 -0
- package/llms-instructions/guidelines/Dropdown.guidelines.md +54 -0
- package/llms-instructions/guidelines/EmptyState.guidelines.md +58 -0
- package/llms-instructions/guidelines/Forms.guidelines.md +99 -0
- package/llms-instructions/guidelines/HintModal.guidelines.md +47 -0
- package/llms-instructions/guidelines/Icons.guidelines.md +59 -0
- package/llms-instructions/guidelines/InkIllustrations.guidelines.md +38 -0
- package/llms-instructions/guidelines/InlineBanner.guidelines.md +52 -0
- package/llms-instructions/guidelines/Link.guidelines.md +26 -0
- package/llms-instructions/guidelines/MicroBanner.guidelines.md +21 -0
- package/llms-instructions/guidelines/Modal.guidelines.md +52 -0
- package/llms-instructions/guidelines/PaginationControls.guidelines.md +21 -0
- package/llms-instructions/guidelines/Paywall.guidelines.md +57 -0
- package/llms-instructions/guidelines/PersistentBanner.guidelines.md +33 -0
- package/llms-instructions/guidelines/Pill.guidelines.md +55 -0
- package/llms-instructions/guidelines/Popover.guidelines.md +42 -0
- package/llms-instructions/guidelines/ProgressBar.guidelines.md +35 -0
- package/llms-instructions/guidelines/SegmentedControl.guidelines.md +21 -0
- package/llms-instructions/guidelines/Skeleton.guidelines.md +30 -0
- package/llms-instructions/guidelines/Spinner.guidelines.md +32 -0
- package/llms-instructions/guidelines/Toast.guidelines.md +34 -0
- package/llms-instructions/guidelines/Toggle.guidelines.md +19 -0
- package/llms-instructions/guidelines/ToolbarSelect.guidelines.md +22 -0
- package/llms-instructions/guidelines/Tooltip.guidelines.md +45 -0
- package/llms-instructions/llms-components.md +61 -261
- package/llms-instructions/llms-icons-and-illustrations.md +2 -0
- package/llms-instructions/llms-tokens.md +97 -16
- package/package.json +6 -1
|
@@ -1,425 +1,225 @@
|
|
|
1
|
+
<!-- AUTO-GENERATED by scripts/build-llms-components.js. Do not edit manually. Run `yarn build-llms-components` to regenerate. -->
|
|
2
|
+
|
|
1
3
|
# @7shifts/sous-chef — Component Reference
|
|
2
4
|
|
|
3
5
|
All component APIs and use cases are defined in the Storybook MCP. You can get detailed information about any specific component.
|
|
4
6
|
|
|
5
|
-
In this document, you will find
|
|
7
|
+
In this document, you will find a list of the available components grouped by category, with a short description of what each one does.
|
|
8
|
+
|
|
9
|
+
If you want information (props, guidelines) about an specific component, you can use the tool sous-chef_get_component_details, providing the name of the component as an argument.
|
|
6
10
|
|
|
7
11
|
## Actions
|
|
8
12
|
|
|
9
|
-
|
|
13
|
+
Actions are the components a user interacts with to trigger behaviour or navigate.
|
|
10
14
|
|
|
11
15
|
### Button
|
|
12
16
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
```tsx
|
|
16
|
-
<Button>
|
|
17
|
-
<IconPencil />
|
|
18
|
-
Edit
|
|
19
|
-
</Button>
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
Also, the icon size is inferred by the `Button` component.
|
|
17
|
+
Default buttons are used for secondary, understated, or redundant actions. If you don't know what a button should be, it's probably this.
|
|
23
18
|
|
|
24
19
|
### Link
|
|
25
20
|
|
|
21
|
+
Links are used to redirect to other pages. Usually external sources are opened on a separate browser tab.
|
|
22
|
+
|
|
26
23
|
### PaginationControls
|
|
27
24
|
|
|
28
|
-
|
|
25
|
+
PaginationControls renders a Previous and Next button pair for moving through a paginated data set. It handles keyboard shortcuts globally and can optionally scroll the viewport to a target element when the page changes.
|
|
29
26
|
|
|
30
27
|
### Toggle
|
|
31
28
|
|
|
32
|
-
|
|
33
|
-
The `Toggle` component is used when there is no `Save` button to persist the data, so when the user changes its value, it is automatically persisted, usually in settings.
|
|
29
|
+
Toggle lets a user switch a single setting on or off with an immediate effect. The change takes effect the moment the toggle is flipped — no save or confirm step required.
|
|
34
30
|
|
|
35
31
|
## Controls
|
|
36
32
|
|
|
37
33
|
Controls contains the components that are usually used in toolbars, for example in a list filter.
|
|
38
34
|
|
|
39
|
-
Components available:
|
|
40
|
-
|
|
41
35
|
### DateFilter
|
|
42
36
|
|
|
43
|
-
|
|
44
|
-
DON'T use it in a form with a submit button. Inside a form, you should use the `DateField`, `DateRangeField`, or `WeekField` components for picking a date.
|
|
37
|
+
To filter content on the page by dates, which can be done by either day, week, or month.
|
|
45
38
|
|
|
46
39
|
### SegmentedControl
|
|
47
40
|
|
|
48
|
-
Segmented
|
|
49
|
-
DON'T use it as tabs. Sous Chef does not have a `Tab` component yet, so if you need one, check whether there is an application-specific `Tab` component to use. If not, then you need to create one.
|
|
41
|
+
Segmented Control is typically used in a toolbar to switch between different views. It can have as many options as needed.
|
|
50
42
|
|
|
51
43
|
### ToolbarSelect
|
|
52
44
|
|
|
53
|
-
|
|
45
|
+
ToolbarSelect is a compact dropdown filter for use in toolbars. It lets a user narrow page content or a paired component content by selecting from a predefined list of options.
|
|
54
46
|
|
|
55
47
|
## Empty States
|
|
56
48
|
|
|
57
|
-
|
|
49
|
+
Empty states are shown when there is no data or content to display.
|
|
58
50
|
|
|
59
51
|
### EmptyState
|
|
60
52
|
|
|
61
|
-
|
|
62
|
-
Use this component when you want to show an empty state inside a modal or for a first-time user experience.
|
|
53
|
+
Empty states are moments in a user’s experience which appear when the application’s content can’t be shown for a number of reasons.
|
|
63
54
|
|
|
64
55
|
### Paywall
|
|
65
56
|
|
|
66
|
-
|
|
57
|
+
Paywalls should be displayed when a user’s account does not have the proper subscription tier to use a specific feature or part of a feature. They should typically contain actions to enable and learn more about the feature behind the paywall.
|
|
67
58
|
|
|
68
59
|
## Feedback
|
|
69
60
|
|
|
70
61
|
Feedback components bring information to the user's attention.
|
|
71
62
|
|
|
72
|
-
Components available:
|
|
73
|
-
|
|
74
63
|
### CircularProgress
|
|
75
64
|
|
|
76
|
-
|
|
65
|
+
The CircularProgress component is used to indicate the overall progress of something that has a set number of things to be completed.
|
|
77
66
|
|
|
78
67
|
### InlineBanner
|
|
79
68
|
|
|
80
|
-
|
|
81
|
-
If you want a smaller banner, then use the `MicroBanner` component.
|
|
82
|
-
|
|
83
|
-
When rendering it in a page using the `Page` component, you can place it in the `banner` prop.
|
|
69
|
+
InlineBanner displays a contextual message inline within a page or section
|
|
84
70
|
|
|
85
71
|
### MicroBanner
|
|
86
72
|
|
|
87
|
-
|
|
73
|
+
MicroBanner component for compact information display with or without a call to action
|
|
88
74
|
|
|
89
75
|
### PersistentBanner
|
|
90
76
|
|
|
91
|
-
|
|
77
|
+
Persistent Banner component is used to provide overarching information in the application. It is usually placed above the main nav bar.
|
|
92
78
|
|
|
93
79
|
### ProgressBar
|
|
94
80
|
|
|
95
|
-
|
|
81
|
+
The ProgressBar component is used to indicate the overall progress for a task with a varying amount of steps to complete.
|
|
96
82
|
|
|
97
83
|
### Skeleton
|
|
98
84
|
|
|
99
|
-
|
|
100
|
-
Use this component when you want to create a loading state for some view, for example a card, or something else.
|
|
85
|
+
Skeleton renders an animated placeholder that mirrors the shape of content while it is loading. It reduces perceived wait time by showing the user where content will appear before it arrives. It will begin to show a loading animation after 3.5 seconds to reduce user frustration on long loading pages.
|
|
101
86
|
|
|
102
87
|
### Spinner
|
|
103
88
|
|
|
104
|
-
|
|
89
|
+
Used to notify users that their action is being processed or when a partial or full page is being loaded.
|
|
105
90
|
|
|
106
91
|
### Toast
|
|
107
92
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
```
|
|
111
|
-
toast('User updated')
|
|
112
|
-
```
|
|
93
|
+
Toasts are used to inform the user about an action that happened.
|
|
113
94
|
|
|
114
95
|
## Forms
|
|
115
96
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
Components available:
|
|
119
|
-
|
|
120
|
-
### AsyncSelectField
|
|
121
|
-
|
|
122
|
-
It is similar to the `SelectField`; however, it has a `loadOptions` prop that returns a `Promise` to load the data. With `SelectField`, you need to pass the `options` prop directly.
|
|
123
|
-
Use this component when you DON'T have all the options upfront and you need to fetch data from an API, or when your endpoint is paginated.
|
|
124
|
-
|
|
125
|
-
### CheckboxField
|
|
126
|
-
|
|
127
|
-
Simple checkbox field.
|
|
97
|
+
Form components are used to collect user input and data.
|
|
128
98
|
|
|
129
99
|
### ColorField
|
|
130
100
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
### CurrencyField
|
|
134
|
-
|
|
135
|
-
Used when the user needs to type a currency value.
|
|
136
|
-
|
|
137
|
-
### DateField
|
|
138
|
-
|
|
139
|
-
Used when the user needs to pick up a SINGLE date. If the user needs a range then use the `DateRangeField`. If the user needs a week, then use the `WeekField`.
|
|
140
|
-
|
|
141
|
-
### DateRangeField
|
|
142
|
-
|
|
143
|
-
Used when the user wants to pick a range of dates (start and end).
|
|
144
|
-
|
|
145
|
-
### Form
|
|
146
|
-
|
|
147
|
-
This is the component that holds the form state, usually through the `formik` prop, and is responsible for submitting the data.
|
|
101
|
+
Color fields allow users to select a color from a predefined set of options. They are ideal for settings or configurations where color selection is necessary.
|
|
148
102
|
|
|
149
103
|
### FormFeedback
|
|
150
104
|
|
|
151
|
-
|
|
105
|
+
FormFeedback is used to indicate an error within a form, for example when there is invalid or missing data in a form field.
|
|
152
106
|
|
|
153
107
|
### FormFooter
|
|
154
108
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
### FormRow
|
|
158
|
-
|
|
159
|
-
Used when you need to place form fields on the same row. It distributes the space evenly between the form fields.
|
|
160
|
-
For forms, give preference to `FormRow` instead of the `Inline` component.
|
|
109
|
+
`FormFooter` contains the CTAs for a `Form` and handles all the `Button` styling when the `actions` prop is used.
|
|
161
110
|
|
|
162
111
|
### FormSection
|
|
163
112
|
|
|
164
|
-
|
|
165
|
-
You can also use it as a card with the `as="card"` prop. In forms, if you see form fields inside a card, it is usually a `FormSection` component with the `as="card"` prop.
|
|
166
|
-
|
|
167
|
-
### MultiSelectField
|
|
168
|
-
|
|
169
|
-
Similar to the `SelectField` but for selecting multiple options.
|
|
170
|
-
|
|
171
|
-
### NumberField
|
|
172
|
-
|
|
173
|
-
Form field for informing numbers.
|
|
174
|
-
|
|
175
|
-
### PasswordField
|
|
176
|
-
|
|
177
|
-
Used for entering passwords. Unlike the other form fields, this component does not have a `caption` prop. Instead, it handles the configured password criteria in the caption, for example when the password is too weak.
|
|
178
|
-
|
|
179
|
-
### PercentageField
|
|
180
|
-
|
|
181
|
-
Used for informing a percentage number.
|
|
113
|
+
`FormSection` provides visual seperation between sections within a `Form` and can have a title and subtitle.
|
|
182
114
|
|
|
183
115
|
### PhoneField
|
|
184
116
|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
### PillSelectField
|
|
188
|
-
|
|
189
|
-
It is similar to the `SelectField` but all the options are shown side-by-side in the screen. Use this component when you have just a few options to display.
|
|
190
|
-
|
|
191
|
-
### RadioGroupField
|
|
192
|
-
|
|
193
|
-
Used when the user needs to select only one option. Options can also be displayed as cards when using the `RadioGroupBoxOption` as children.
|
|
194
|
-
|
|
195
|
-
Subcomponents:
|
|
196
|
-
|
|
197
|
-
- RadioGroupOption
|
|
198
|
-
- RadioGroupBoxOption
|
|
199
|
-
|
|
200
|
-
### SelectField
|
|
201
|
-
|
|
202
|
-
Used when you need to select only one option from the dropdown.
|
|
203
|
-
|
|
204
|
-
### TextAreaField
|
|
205
|
-
|
|
206
|
-
Similar to the `TextField` but it can have multiple lines and can also have toolbar at the bottom where you can place some buttons.
|
|
207
|
-
|
|
208
|
-
### TextField
|
|
209
|
-
|
|
210
|
-
This is the main component for typing a text in a form.
|
|
211
|
-
|
|
212
|
-
### TimeField
|
|
213
|
-
|
|
214
|
-
Used for pick a specific time. If you need a range of times then use the `TimeRangeField`.
|
|
215
|
-
|
|
216
|
-
### TimeRangeField
|
|
217
|
-
|
|
218
|
-
Used when you need to select a start time and an end time.
|
|
219
|
-
|
|
220
|
-
### WeekField
|
|
221
|
-
|
|
222
|
-
Used when you need to select a week. This component will give you the start of the week to be saved in the form state.
|
|
117
|
+
A field for entering phone numbers. It includes a selection field for country code and can validate phone numbers.
|
|
223
118
|
|
|
224
119
|
## Media
|
|
225
120
|
|
|
226
|
-
|
|
121
|
+
Media components display compact visual or status information, such as avatars and labels.
|
|
227
122
|
|
|
228
123
|
### Avatar
|
|
229
124
|
|
|
230
|
-
|
|
231
|
-
You can also pass letters as children, usually initials. In that case, you can set the `color` prop if you want a specific color.
|
|
232
|
-
You can also show a user image passing the `url` prop.
|
|
125
|
+
Avatar represents a person or entity — such as a company, location, department, or role — with a visual identifier. It appears wherever a person or entity's identity needs to be communicated at a glance.
|
|
233
126
|
|
|
234
127
|
### Badge
|
|
235
128
|
|
|
236
|
-
|
|
129
|
+
Badge is a small circular indicator used to draw attention to something associated with another element — a count, a status, or a quick action. It always appears in relation to something else, never on its own.
|
|
237
130
|
|
|
238
131
|
### Chip
|
|
239
132
|
|
|
240
|
-
A chip is similar looking to pill, but is instead used to convey system status such as "New", "Beta", or "Add-on"
|
|
133
|
+
A chip is similar looking to pill, but is instead used to convey system status such as "New", "Beta", or "Add-on"
|
|
241
134
|
|
|
242
135
|
### Pill
|
|
243
136
|
|
|
244
|
-
A Pill is used to inform users on the status of a nearby object or of an action that’s been taken.
|
|
137
|
+
A Pill is used to inform users on the status of a nearby object or of an action that’s been taken. The default state is used to convey general status or state, such as: Pending Unavailable, Inactive.
|
|
245
138
|
|
|
246
139
|
## Layout
|
|
247
140
|
|
|
248
|
-
|
|
141
|
+
Layout components structure and arrange the content of a page.
|
|
249
142
|
|
|
250
|
-
###
|
|
143
|
+
### CalloutCard
|
|
251
144
|
|
|
252
|
-
|
|
253
|
-
When using it inside a form, check whether it is more suitable to use a `FormSection` component instead.
|
|
145
|
+
CalloutCards are containers to present a new product or feature to users.
|
|
254
146
|
|
|
255
|
-
###
|
|
147
|
+
### Card
|
|
256
148
|
|
|
257
|
-
|
|
258
|
-
Pay special attention to the `flex` prop. It is an array of elements, each of which can be a string or number, where each element sets the `flex` prop for a child element. For example:
|
|
149
|
+
Cards are containers to introduce division between content.
|
|
259
150
|
|
|
260
|
-
|
|
261
|
-
<Inline flex={['0 1 auto', 1]}>
|
|
262
|
-
<div>item 1</div>
|
|
263
|
-
<div>item 2</div>
|
|
264
|
-
</Inline>
|
|
265
|
-
```
|
|
151
|
+
### Inline
|
|
266
152
|
|
|
267
|
-
|
|
153
|
+
Layout component to easily line elements up in a row.
|
|
268
154
|
|
|
269
155
|
### Page
|
|
270
156
|
|
|
271
|
-
|
|
272
|
-
IMPORTANT: It should not be used for high-level app layout, such as the nav bar and top bar. Also, if it has a small left menu, it is probably a `PageLayout` component.
|
|
273
|
-
|
|
274
|
-
For examples of how to set up a page layout, refer to the [Composing components](llms-composing-components.md) document.
|
|
275
|
-
|
|
276
|
-
### PageLayout
|
|
277
|
-
|
|
278
|
-
It should be used to hold a group of pages where there is a left side menu (using the `menu` prop). Usually, when the user clicks on a menu item it should navigate to some specific route.
|
|
279
|
-
In its children, it should contain a router where each route renders a component that uses a `Page` component.
|
|
280
|
-
|
|
281
|
-
For examples of how to set up a page layout, refer to the [Composing components](llms-composing-components.md) document.
|
|
157
|
+
The Page component is used to control the elements within a page. It can be full width or restricted using the `size` prop. To better see it, open this example on a full page.
|
|
282
158
|
|
|
283
159
|
### Stack
|
|
284
160
|
|
|
285
|
-
|
|
286
|
-
Pay special attention to the `flex` prop. It is an array of elements, each of which can be a string or number, where each element sets the `flex` prop for a child element. For example:
|
|
287
|
-
|
|
288
|
-
```tsx
|
|
289
|
-
<Inline flex={['0 1 auto', 1]}>
|
|
290
|
-
<div>item 1</div>
|
|
291
|
-
<div>item 2</div>
|
|
292
|
-
</Inline>
|
|
293
|
-
```
|
|
294
|
-
|
|
295
|
-
It is literally setting the CSS `flex: 0 1 auto;` to the first element and `flex: 1` to the second element.
|
|
161
|
+
Layout component to easily stack elements up in a column.
|
|
296
162
|
|
|
297
163
|
## Lists
|
|
298
164
|
|
|
299
165
|
Components used to display a list of data.
|
|
300
166
|
|
|
301
|
-
Available components:
|
|
302
|
-
|
|
303
167
|
### Accordion
|
|
304
168
|
|
|
305
169
|
Accordions are lists used to group information into collapsible sections. Only one section can be open at a time.
|
|
306
|
-
Don't use this component if you have columns, in that case, use the `DataTable` component instead.
|
|
307
170
|
|
|
308
171
|
### ActionList
|
|
309
172
|
|
|
310
|
-
|
|
311
|
-
It is usually used on dashboard pages.
|
|
312
|
-
|
|
313
|
-
Subcomponents:
|
|
314
|
-
|
|
315
|
-
- ActionListItem
|
|
173
|
+
A list of tasks or items that require user attention and can be completed with an action. Each item should have at least one clear action for the user to take.
|
|
316
174
|
|
|
317
175
|
### DataTable
|
|
318
176
|
|
|
319
|
-
|
|
320
|
-
With this component, you can build simple tables by passing an array of `items`, but you can also build more complex use cases, such as sortable columns, pagination, and editable cells.
|
|
321
|
-
|
|
322
|
-
Subcomponents:
|
|
323
|
-
|
|
324
|
-
- DataTableRow
|
|
325
|
-
- DataTableCell
|
|
326
|
-
- DataTableEditableCell
|
|
327
|
-
|
|
328
|
-
For examples of how to compose tables, refer to the [Composing components](llms-composing-components.md) document.
|
|
177
|
+
DataTable displays structured data in rows and columns. Use it when data is inherently tabular — each row represents a record and each column represents an attribute of that record.
|
|
329
178
|
|
|
330
179
|
## Navigation
|
|
331
180
|
|
|
332
|
-
|
|
181
|
+
Navigation components help a user move around the application and understand where they are.
|
|
333
182
|
|
|
334
183
|
### Breadcrumbs
|
|
335
184
|
|
|
336
|
-
|
|
185
|
+
Used on top of pages to let the user navigate back to parent routes. IMPORTANT: It requires the `react-router-dom` Router to be present on a upper level of the document tree.
|
|
186
|
+
|
|
187
|
+
### PrimaryNav
|
|
188
|
+
|
|
189
|
+
PrimaryNav is the main navigation component for Sous Chef. It provides a vertical navigation menu with support for nested sub-items, badges, and a footer section. The navigation can be expanded or collapsed, and it highlights the active item based on the current selection. The component is designed to be flexible and customizable, allowing for various use cases within the application.
|
|
337
190
|
|
|
338
191
|
## Overlay
|
|
339
192
|
|
|
340
193
|
Overlays are components that render on top of the main page.
|
|
341
194
|
|
|
342
|
-
Available components:
|
|
343
|
-
|
|
344
195
|
### Calendar
|
|
345
196
|
|
|
346
|
-
It is a standalone
|
|
347
|
-
Use this component outside of a Form context. If you are in a form, then use the form fields for picking a date.
|
|
197
|
+
Calendar is a date-picking overlay that anchors to a trigger element and lets the user select a single day or a full week. It is not a form field — it is a standalone panel that you control the opening and closing of yourself. In most cases, a `DateField` or `DateRangeField` is the right choice; reach for Calendar directly when you need more control over how and when the picker appears.
|
|
348
198
|
|
|
349
199
|
### Dropdown
|
|
350
200
|
|
|
351
201
|
A Dropdown is where you can have menu options that are hidden until the user clicks or hovers on a trigger element.
|
|
352
|
-
If you want to render a more complex interaction or content within a dropdown, consider using a Popover instead.
|
|
353
|
-
|
|
354
|
-
Subcomponents:
|
|
355
|
-
|
|
356
|
-
- DropdownList
|
|
357
|
-
- DropdownListItem
|
|
358
|
-
- DropdownListItemSelectable
|
|
359
|
-
- DropdownListItemDivider
|
|
360
202
|
|
|
361
203
|
### HintModal
|
|
362
204
|
|
|
363
|
-
HintModal can be used to provide tips or guidance to users on a page. It
|
|
364
|
-
It shows on the bottom-right side of the screen.
|
|
365
|
-
For larger information or forms, use the `Modal` component instead.
|
|
205
|
+
HintModal can be used to provide tips or guidance to users on a page. It not typically triggered by a button, instead it should be rendered when a user navigates to a page where they might require additional guidance.
|
|
366
206
|
|
|
367
207
|
### Modal
|
|
368
208
|
|
|
369
|
-
|
|
370
|
-
It already handles the `header` and `subHeader`.
|
|
371
|
-
|
|
372
|
-
Subcomponents:
|
|
373
|
-
|
|
374
|
-
- ModalBody
|
|
375
|
-
- ModalFooter
|
|
376
|
-
|
|
377
|
-
When using a form inside a modal, refer to the [Composing components](llms-composing-components.md) document, as it has some special configuration to work well in a modal.
|
|
209
|
+
Modal is a focused overlay that interrupts the current experience and demands the user's attention. It blocks all interaction with the rest of the page until the user responds — making it best suited for decisions, confirmations, and self-contained flows where that level of focus is warranted.
|
|
378
210
|
|
|
379
211
|
### Popover
|
|
380
212
|
|
|
381
|
-
|
|
382
|
-
For small overlays, like a text with a title, use the `Tooltip` instead.
|
|
213
|
+
A Popover is a type of dropdown but it is meant to be used for more complex interactions and content that goes beyond a list of actions. If you find yourself needing to put a form, information, or multiple actions within a dropdown, it's probably best to use a Popover instead of a Dropdown.
|
|
383
214
|
|
|
384
215
|
### Tooltip
|
|
385
216
|
|
|
386
|
-
|
|
217
|
+
Tooltip is a small, non-interactive label that appears on hover to provide a brief explanation. It is the lightest overlay in the system — low interruption, no interaction, disappears when the user moves away. Its job is to add micro-clarity: explaining an icon, defining an abbreviation, or surfacing supplementary detail without cluttering the UI.
|
|
387
218
|
|
|
388
219
|
## Typography
|
|
389
220
|
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
This is the atomic component for rendering text and headings. You can use the `as` prop to set how it will be displayed:
|
|
221
|
+
Typography components are used to display text in various styles and hierarchies.
|
|
393
222
|
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
```tsx
|
|
397
|
-
<Text as="h1">Title</Text>
|
|
398
|
-
```
|
|
399
|
-
|
|
400
|
-
You can give emphasis to a text using the `emphasis` prop:
|
|
401
|
-
|
|
402
|
-
Example:
|
|
403
|
-
|
|
404
|
-
```tsx
|
|
405
|
-
<Text emphasis="bold">Title</Text>
|
|
406
|
-
<Text emphasis=["bold", "italic"]>Title</Text> // with multiple emphasis
|
|
407
|
-
```
|
|
408
|
-
|
|
409
|
-
If you want to give emphasis just to some parts of the text you can use the sub components:
|
|
410
|
-
|
|
411
|
-
Example:
|
|
412
|
-
|
|
413
|
-
```tsx
|
|
414
|
-
<Text>
|
|
415
|
-
Example of a <Bold>bold</Bold> text and <Italic>italic</Italic> text.
|
|
416
|
-
</Text>
|
|
417
|
-
```
|
|
418
|
-
|
|
419
|
-
The subcomponents use a `span` tag under the hood, so they do not break the DOM structure.
|
|
420
|
-
|
|
421
|
-
Subcomponents:
|
|
223
|
+
### Text
|
|
422
224
|
|
|
423
|
-
|
|
424
|
-
- Bold
|
|
425
|
-
- Underline
|
|
225
|
+
The Text component is used to format text style, size, line spacing, alignment, and color.
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
<!-- AUTO-GENERATED by scripts/build-llms-icons-and-illustrations.js. Do not edit manually. Run `yarn build-llms-icons-and-illustrations` to regenerate. -->
|
|
2
|
+
|
|
1
3
|
# Sous Chef Design System - Icons and Illustrations
|
|
2
4
|
|
|
3
5
|
In Sous Chef, icons and ink illustrations are treated as normal React components.
|