@staffbase/design-mcp 19.0.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/README.md +75 -0
- package/dist/data/components.json +1118 -0
- package/dist/data/docs.json +226 -0
- package/dist/data/icons.json +2344 -0
- package/dist/data/meta.json +4 -0
- package/dist/data/package_instructions.md +187 -0
- package/dist/data/tokens.json +4449 -0
- package/dist/server.d.ts +6 -0
- package/dist/server.js +451 -0
- package/dist/server.js.map +1 -0
- package/package.json +48 -0
|
@@ -0,0 +1,1118 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"name": "ActionMenu",
|
|
4
|
+
"category": "Other",
|
|
5
|
+
"deprecated": true,
|
|
6
|
+
"replacement": "Menu",
|
|
7
|
+
"compoundMembers": [],
|
|
8
|
+
"examples": []
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"name": "ActionMenuContent",
|
|
12
|
+
"category": "Other",
|
|
13
|
+
"deprecated": true,
|
|
14
|
+
"replacement": "Menu",
|
|
15
|
+
"compoundMembers": [],
|
|
16
|
+
"examples": []
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"name": "ActionMenuItem",
|
|
20
|
+
"category": "Other",
|
|
21
|
+
"deprecated": true,
|
|
22
|
+
"replacement": "Menu",
|
|
23
|
+
"compoundMembers": [],
|
|
24
|
+
"propsInterface": "export declare interface ActionMenuItemProps extends ButtonHTMLAttributes<HTMLButtonElement> {\r\n icon?: ReactElement;\r\n description?: string;\r\n variant?: ActionItemVariant;\r\n}",
|
|
25
|
+
"examples": []
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"name": "ActionMenuLinkItem",
|
|
29
|
+
"category": "Other",
|
|
30
|
+
"deprecated": true,
|
|
31
|
+
"replacement": "Menu",
|
|
32
|
+
"compoundMembers": [],
|
|
33
|
+
"propsInterface": "export declare interface ActionMenuLinkItemProps extends AnchorHTMLAttributes<HTMLAnchorElement> {\r\n icon?: ReactElement;\r\n description?: string;\r\n variant?: ActionItemVariant;\r\n /* Excluded from this release type: _dataindex */\r\n}",
|
|
34
|
+
"examples": []
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"name": "ActionMenuTrigger",
|
|
38
|
+
"category": "Other",
|
|
39
|
+
"deprecated": true,
|
|
40
|
+
"replacement": "Menu",
|
|
41
|
+
"compoundMembers": [],
|
|
42
|
+
"examples": []
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"name": "AlertDialog",
|
|
46
|
+
"category": "Components",
|
|
47
|
+
"description": "Alert dialogs interrupt the user to confirm a critical or destructive action. Use for actions that cannot be undone.",
|
|
48
|
+
"figmaUrl": "https://www.figma.com/design/jKlhl09SG2Mk7SWLievNvM/%F0%9F%A7%B0-Design-System-Components?node-id=45327-19566",
|
|
49
|
+
"sourcePath": "packages/design/src/components/alertDialog",
|
|
50
|
+
"docPage": "components/alert-dialog",
|
|
51
|
+
"deprecated": false,
|
|
52
|
+
"compoundMembers": [
|
|
53
|
+
{
|
|
54
|
+
"name": "Root",
|
|
55
|
+
"signature": "typeof AlertDialog_2.Root"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"name": "Trigger",
|
|
59
|
+
"signature": "(props: TriggerProps) => JSX.Element"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"name": "Popup",
|
|
63
|
+
"signature": "ForwardRefExoticComponent<Omit<PopupProps, \"ref\"> & RefAttributes<HTMLDivElement>>"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"name": "Cancel",
|
|
67
|
+
"signature": "ForwardRefExoticComponent<Omit<Omit< ButtonProps, \"ref\"> & RefAttributes<HTMLButtonElement>, \"ref\"> & RefAttributes<HTMLButtonElement>>"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"name": "Action",
|
|
71
|
+
"signature": "ForwardRefExoticComponent<Omit<Omit< ButtonProps, \"ref\"> & RefAttributes<HTMLButtonElement>, \"ref\"> & RefAttributes<HTMLButtonElement>>"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"name": "Title",
|
|
75
|
+
"signature": "ForwardRefExoticComponent<Omit< AlertDialogTitleProps, \"ref\"> & RefAttributes<HTMLHeadingElement>>"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"name": "Description",
|
|
79
|
+
"signature": "ForwardRefExoticComponent<Omit< AlertDialogDescriptionProps, \"ref\"> & RefAttributes<HTMLParagraphElement>>"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"name": "Icon",
|
|
83
|
+
"signature": "ForwardRefExoticComponent<Omit< ClassAttributes<HTMLDivElement> & HTMLAttributes<HTMLDivElement> & {\r\n children: ReactNode;\r\n }, \"ref\"> & RefAttributes<HTMLDivElement>>"
|
|
84
|
+
}
|
|
85
|
+
],
|
|
86
|
+
"examples": [
|
|
87
|
+
{
|
|
88
|
+
"variant": "default",
|
|
89
|
+
"code": "import {AlertDialog, BinIcon, Button} from '@staffbase/design';\n\n<AlertDialog.Root>\n <AlertDialog.Trigger>\n <Button color=\"critical\">Delete item</Button>\n </AlertDialog.Trigger>\n <AlertDialog.Popup>\n <AlertDialog.Icon>\n <BinIcon />\n </AlertDialog.Icon>\n <AlertDialog.Title>Delete this item?</AlertDialog.Title>\n <AlertDialog.Description>\n This action cannot be undone. The item will be permanently removed.\n </AlertDialog.Description>\n <AlertDialog.Action color=\"critical\">Delete</AlertDialog.Action>\n <AlertDialog.Cancel>Cancel</AlertDialog.Cancel>\n </AlertDialog.Popup>\n</AlertDialog.Root>"
|
|
90
|
+
}
|
|
91
|
+
]
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"name": "Avatar",
|
|
95
|
+
"category": "Other",
|
|
96
|
+
"deprecated": false,
|
|
97
|
+
"compoundMembers": [],
|
|
98
|
+
"propsInterface": "export declare interface AvatarProps {\r\n /**\r\n * The `alt` attribute for the rendered `img` element\r\n */\r\n alt?: string;\r\n /**\r\n * Color of the avatar if no `img` is rendered\r\n * @default purple\r\n */\r\n color?: AvatarColor;\r\n /**\r\n * Will be used as fallback content\r\n */\r\n children?: ReactNode;\r\n /**\r\n * The `src` attribute for the rendered `img` element\r\n */\r\n src?: string;\r\n /**\r\n * The size of the avatar\r\n * @default 32\r\n */\r\n size?: AvatarSize;\r\n /**\r\n * Optional classname prop for styling\r\n */\r\n className?: string;\r\n}",
|
|
99
|
+
"examples": []
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"name": "Badge",
|
|
103
|
+
"category": "Other",
|
|
104
|
+
"deprecated": false,
|
|
105
|
+
"compoundMembers": [],
|
|
106
|
+
"propsInterface": "export declare interface BadgeProps {\r\n /**\r\n * Visually hidden text to explain the status or value.\r\n */\r\n a11yDescription: string;\r\n /**\r\n * Position where the badge should appear, relative to the preceding DOM element.\r\n */\r\n position?: BadgePosition;\r\n /**\r\n * Refers to the number displayed on the badge\r\n */\r\n value?: number;\r\n /**\r\n * Color of the badge\r\n */\r\n variant?: BadgeVariant;\r\n /**\r\n * When true, returns 9+ when the value is greater than 9\r\n */\r\n truncate?: boolean;\r\n /**\r\n * Optional classname prop for styling\r\n */\r\n className?: string;\r\n}",
|
|
107
|
+
"examples": []
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"name": "Banner",
|
|
111
|
+
"category": "Components",
|
|
112
|
+
"description": "Banners communicate prominent messages, such as system status, errors, or important information.",
|
|
113
|
+
"figmaUrl": "https://www.figma.com/design/jKlhl09SG2Mk7SWLievNvM/%F0%9F%A7%B0-Design-System-Components?m=dev&node-id=45327-13804",
|
|
114
|
+
"sourcePath": "packages/design/src/components/banner",
|
|
115
|
+
"docPage": "components/banner",
|
|
116
|
+
"deprecated": false,
|
|
117
|
+
"compoundMembers": [],
|
|
118
|
+
"propsInterface": "export declare interface BannerProps extends HTMLAttributes<HTMLDivElement> {\r\n /** The content of the Banner. */\r\n children: ReactNode;\r\n /** Defines the semantics / use case of Banner. */\r\n variant?: 'info' | 'success' | 'warning' | 'critical';\r\n /** Changes the size of the Banner. */\r\n size?: 'sm' | 'md';\r\n /** Optional className prop for styling. Targets the outermost component layer. */\r\n className?: string;\r\n /** Changes the style of the banner */\r\n layout?: 'standalone' | 'bleed';\r\n}",
|
|
119
|
+
"examples": [
|
|
120
|
+
{
|
|
121
|
+
"variant": "default",
|
|
122
|
+
"code": "import {Banner} from '@staffbase/design';\n\n<Banner>\n Info banner\n <Banner.CloseButton aria-label=\"Close message\" />\n</Banner>"
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"variant": "Variants",
|
|
126
|
+
"code": "import {Banner} from '@staffbase/design';\n\n<Banner>Info banner (default)</Banner>\n<Banner variant=\"success\">Success banner</Banner>\n<Banner variant=\"warning\">Warning banner</Banner>\n<Banner variant=\"critical\">Critical banner</Banner>"
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"variant": "Sizes",
|
|
130
|
+
"code": "import {Banner} from '@staffbase/design';\n\n<Banner size=\"sm\">Small banner (default)</Banner>\n<Banner size=\"md\">Medium banner</Banner>"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"variant": "Layouts",
|
|
134
|
+
"code": "import {Banner} from '@staffbase/design';\n\n<Banner>Standalone banner (default)</Banner>\n<Banner layout=\"bleed\">Full bleed banner</Banner>"
|
|
135
|
+
}
|
|
136
|
+
]
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"name": "BottomSheet",
|
|
140
|
+
"category": "Components",
|
|
141
|
+
"description": "Bottom sheets surface content or actions from the bottom of the viewport, typically on smaller screens.",
|
|
142
|
+
"figmaUrl": "https://www.figma.com/design/jKlhl09SG2Mk7SWLievNvM/%F0%9F%A7%B0-Design-System-Components?node-id=817-25314",
|
|
143
|
+
"sourcePath": "packages/design/src/components/bottomSheet",
|
|
144
|
+
"docPage": "components/bottom-sheet",
|
|
145
|
+
"deprecated": false,
|
|
146
|
+
"compoundMembers": [
|
|
147
|
+
{
|
|
148
|
+
"name": "Root",
|
|
149
|
+
"signature": "typeof Drawer.Root"
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"name": "Popup",
|
|
153
|
+
"signature": "ForwardRefExoticComponent<Omit<PopupProps_2, \"ref\"> & RefAttributes<HTMLDivElement>>"
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"name": "Trigger",
|
|
157
|
+
"signature": "(props: TriggerProps_2) => JSX.Element"
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"name": "Close",
|
|
161
|
+
"signature": "ForwardRefExoticComponent<Omit<CloseProps, \"ref\"> & RefAttributes<HTMLButtonElement>>"
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
"name": "Back",
|
|
165
|
+
"signature": "ForwardRefExoticComponent<Omit<BackProps, \"ref\"> & RefAttributes<HTMLButtonElement>>"
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
"name": "Description",
|
|
169
|
+
"signature": "ForwardRefExoticComponent<Omit< DrawerDescriptionProps, \"ref\"> & RefAttributes<HTMLParagraphElement>>"
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"name": "Title",
|
|
173
|
+
"signature": "ForwardRefExoticComponent<Omit< DrawerTitleProps, \"ref\"> & RefAttributes<HTMLHeadingElement>>"
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"name": "Action",
|
|
177
|
+
"signature": "ForwardRefExoticComponent<Omit< DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, \"ref\"> & RefAttributes<HTMLButtonElement>>"
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
"name": "Header",
|
|
181
|
+
"signature": "ForwardRefExoticComponent<Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, \"ref\"> & RefAttributes<HTMLDivElement>>"
|
|
182
|
+
}
|
|
183
|
+
],
|
|
184
|
+
"examples": [
|
|
185
|
+
{
|
|
186
|
+
"variant": "default",
|
|
187
|
+
"code": "import {BottomSheet, Button} from '@staffbase/design';\n\n<BottomSheet.Root>\n <BottomSheet.Trigger>\n <Button>Open BottomSheet</Button>\n </BottomSheet.Trigger>\n <BottomSheet.Popup>\n <BottomSheet.Header>\n <BottomSheet.Back aria-label=\"Back\" />\n <BottomSheet.Title>Sheet title</BottomSheet.Title>\n <BottomSheet.Description>Sheet description.</BottomSheet.Description>\n <BottomSheet.Close aria-label=\"Close\" />\n </BottomSheet.Header>\n <BottomSheet.Action>Confirm</BottomSheet.Action>\n </BottomSheet.Popup>\n</BottomSheet.Root>"
|
|
188
|
+
}
|
|
189
|
+
]
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
"name": "Button",
|
|
193
|
+
"category": "Components",
|
|
194
|
+
"description": "Buttons trigger an action or event, such as submitting a form, opening a dialog, or performing a destructive action.",
|
|
195
|
+
"figmaUrl": "https://www.figma.com/design/jKlhl09SG2Mk7SWLievNvM/%F0%9F%A7%B0-Design-System-Components?node-id=840-16058&m=dev",
|
|
196
|
+
"sourcePath": "packages/design/src/components/button",
|
|
197
|
+
"docPage": "components/button",
|
|
198
|
+
"deprecated": false,
|
|
199
|
+
"compoundMembers": [],
|
|
200
|
+
"propsInterface": "export declare interface ButtonProps extends ComponentProps<'button'> {\r\n variant?: 'solid' | 'outline' | 'ghost';\r\n color?: 'primary' | 'neutral' | 'critical';\r\n iconOnly?: boolean;\r\n children: ReactNode;\r\n}",
|
|
201
|
+
"examples": [
|
|
202
|
+
{
|
|
203
|
+
"variant": "default",
|
|
204
|
+
"code": "import {Button} from '@staffbase/design';\n\n<Button variant=\"solid\" color=\"primary\">Button</Button>"
|
|
205
|
+
}
|
|
206
|
+
]
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
"name": "ButtonDeprecated",
|
|
210
|
+
"category": "Other",
|
|
211
|
+
"deprecated": true,
|
|
212
|
+
"compoundMembers": [],
|
|
213
|
+
"propsInterface": "export declare interface ButtonDeprecatedProps extends BaseButtonProps {\r\n /**\r\n * Refers to the child element of the button\r\n */\r\n children?: string;\r\n /**\r\n * Disabled state of the button\r\n */\r\n disabled?: boolean;\r\n /**\r\n * The icon of the button\r\n */\r\n icon?: ReactElement<SVGAttributes<SVGElement>>;\r\n}",
|
|
214
|
+
"examples": []
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
"name": "Card",
|
|
218
|
+
"category": "Components",
|
|
219
|
+
"description": "Cards group related content and actions into a single, contained surface.",
|
|
220
|
+
"figmaUrl": "https://www.figma.com/design/jKlhl09SG2Mk7SWLievNvM/%F0%9F%A7%B0-Design-System-Components?m=dev&node-id=45327-11082",
|
|
221
|
+
"sourcePath": "packages/design/src/components/card",
|
|
222
|
+
"docPage": "components/card",
|
|
223
|
+
"deprecated": false,
|
|
224
|
+
"compoundMembers": [],
|
|
225
|
+
"examples": [
|
|
226
|
+
{
|
|
227
|
+
"variant": "default",
|
|
228
|
+
"code": "import {Card} from '@staffbase/design';\n\n<Card className='p-3'>\n <h3 className='text-title-md font-bold'>Title</h3>\n <p>This is a card containing related content.</p>\n</Card>"
|
|
229
|
+
}
|
|
230
|
+
]
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
"name": "Checkbox",
|
|
234
|
+
"category": "Other",
|
|
235
|
+
"deprecated": false,
|
|
236
|
+
"compoundMembers": [],
|
|
237
|
+
"propsInterface": "export declare interface CheckboxProps extends Pick<InputHTMLAttributes<HTMLInputElement>, 'checked' | 'disabled' | 'onChange' | 'defaultChecked' | 'id' | 'name' | 'tabIndex' | 'readOnly' | 'className'> {\r\n label: string;\r\n description?: string;\r\n errorMessage?: string;\r\n hasError?: boolean;\r\n errorAriaLive?: 'off' | 'assertive' | 'polite';\r\n requiredLabel?: string;\r\n}",
|
|
238
|
+
"examples": []
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
"name": "CheckboxGroup",
|
|
242
|
+
"category": "Other",
|
|
243
|
+
"deprecated": false,
|
|
244
|
+
"compoundMembers": [],
|
|
245
|
+
"propsInterface": "export declare interface CheckboxGroupProps {\r\n options: CheckboxOption[];\r\n description?: string;\r\n errorMessage?: string;\r\n disableAll?: boolean;\r\n hasError?: boolean;\r\n label?: string;\r\n value?: string[];\r\n onChange?: (option: CheckboxOption) => void;\r\n errorAriaLive?: 'off' | 'assertive' | 'polite';\r\n className?: string;\r\n}",
|
|
246
|
+
"examples": []
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
"name": "Dialog",
|
|
250
|
+
"category": "Components",
|
|
251
|
+
"description": "Dialogs present focused content or actions in a modal overlay above the main page.",
|
|
252
|
+
"figmaUrl": "https://www.figma.com/design/jKlhl09SG2Mk7SWLievNvM/%F0%9F%A7%B0-Design-System-Components?node-id=817-25314",
|
|
253
|
+
"sourcePath": "packages/design/src/components/dialog",
|
|
254
|
+
"docPage": "components/dialog",
|
|
255
|
+
"deprecated": false,
|
|
256
|
+
"compoundMembers": [
|
|
257
|
+
{
|
|
258
|
+
"name": "Root",
|
|
259
|
+
"signature": "typeof Dialog_2.Root"
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
"name": "Popup",
|
|
263
|
+
"signature": "ForwardRefExoticComponent<Omit<PopupProps_3, \"ref\"> & RefAttributes<HTMLDivElement>>"
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
"name": "Trigger",
|
|
267
|
+
"signature": "(props: TriggerProps_3) => JSX.Element"
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
"name": "Close",
|
|
271
|
+
"signature": "ForwardRefExoticComponent<Omit<CloseProps_2, \"ref\"> & RefAttributes<HTMLButtonElement>>"
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
"name": "Description",
|
|
275
|
+
"signature": "ForwardRefExoticComponent<Omit< AlertDialogDescriptionProps, \"ref\"> & RefAttributes<HTMLParagraphElement>>"
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
"name": "Title",
|
|
279
|
+
"signature": "ForwardRefExoticComponent<Omit< AlertDialogTitleProps, \"ref\"> & RefAttributes<HTMLHeadingElement>>"
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
"name": "Header",
|
|
283
|
+
"signature": "ForwardRefExoticComponent<Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, \"ref\"> & RefAttributes<HTMLDivElement>>"
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
"name": "Footer",
|
|
287
|
+
"signature": "ForwardRefExoticComponent<Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, \"ref\"> & RefAttributes<HTMLDivElement>>"
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
"name": "Body",
|
|
291
|
+
"signature": "ForwardRefExoticComponent<Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, \"ref\"> & RefAttributes<HTMLDivElement>>"
|
|
292
|
+
}
|
|
293
|
+
],
|
|
294
|
+
"examples": [
|
|
295
|
+
{
|
|
296
|
+
"variant": "default",
|
|
297
|
+
"code": "import {Button, CloseIcon, Dialog} from '@staffbase/design';\n\n<Dialog.Root>\n <Dialog.Trigger>\n <Button>Open Dialog</Button>\n </Dialog.Trigger>\n <Dialog.Popup>\n <Dialog.Header>\n <Dialog.Title>Dialog title</Dialog.Title>\n <Dialog.Close>\n <Button variant=\"ghost\" color=\"neutral\" iconOnly aria-label=\"Close\"><CloseIcon /></Button>\n </Dialog.Close>\n </Dialog.Header>\n <Dialog.Body>\n <Dialog.Description>This is a description of the dialog content.</Dialog.Description>\n </Dialog.Body>\n <Dialog.Footer>\n <Dialog.Close>\n <Button color=\"neutral\">Cancel</Button>\n </Dialog.Close>\n <Button>Confirm</Button>\n </Dialog.Footer>\n </Dialog.Popup>\n</Dialog.Root>"
|
|
298
|
+
}
|
|
299
|
+
]
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
"name": "Divider",
|
|
303
|
+
"category": "Other",
|
|
304
|
+
"deprecated": true,
|
|
305
|
+
"replacement": "Separator",
|
|
306
|
+
"compoundMembers": [],
|
|
307
|
+
"propsInterface": "export declare interface DividerProps extends HTMLAttributes<HTMLHRElement> {\r\n dividerPosition?: 'horizontal' | 'vertical';\r\n fullWidth?: boolean;\r\n /**\r\n * The padding of the divider in pixels\r\n * @default '24'\r\n */\r\n padding?: number;\r\n}",
|
|
308
|
+
"examples": []
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
"name": "EmptyState",
|
|
312
|
+
"category": "Other",
|
|
313
|
+
"deprecated": false,
|
|
314
|
+
"compoundMembers": [],
|
|
315
|
+
"propsInterface": "export declare interface EmptyStateProps {\r\n /**\r\n * Defines the title of the component\r\n */\r\n title: string;\r\n /**\r\n * The icon of the component\r\n */\r\n icon?: ReactElement<HTMLAttributes<HTMLElement>, string>;\r\n /**\r\n * The two icon sizes\r\n * @default 40px\r\n */\r\n iconSize?: IconSize;\r\n /**\r\n * The body text which appears below the \"title\" of the component\r\n */\r\n body?: string;\r\n /**\r\n * Optional classname prop for styling\r\n */\r\n className?: string;\r\n}",
|
|
316
|
+
"examples": []
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
"name": "Field",
|
|
320
|
+
"category": "Components",
|
|
321
|
+
"description": "Fields group form controls with labels, descriptions, and validation messages to provide clear context and accessibility.",
|
|
322
|
+
"figmaUrl": "https://www.figma.com/design/jKlhl09SG2Mk7SWLievNvM/%F0%9F%A7%B0-Design-System-Components?m=dev&node-id=45327-14241",
|
|
323
|
+
"sourcePath": "packages/design/src/components/field",
|
|
324
|
+
"docPage": "components/field",
|
|
325
|
+
"deprecated": false,
|
|
326
|
+
"compoundMembers": [
|
|
327
|
+
{
|
|
328
|
+
"name": "Root",
|
|
329
|
+
"signature": "ForwardRefExoticComponent<Omit< FieldRootProps, \"ref\"> & RefAttributes<HTMLDivElement>>"
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
"name": "Label",
|
|
333
|
+
"signature": "ForwardRefExoticComponent<Omit< FieldLabelProps & {\r\n requiredLabel?: string;\r\n }, \"ref\"> & RefAttributes<HTMLElement>>"
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
"name": "Description",
|
|
337
|
+
"signature": "ForwardRefExoticComponent<Omit< FieldDescriptionProps, \"ref\"> & RefAttributes<HTMLParagraphElement>>"
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
"name": "Error",
|
|
341
|
+
"signature": "ForwardRefExoticComponent<Omit< FieldErrorProps, \"ref\"> & RefAttributes<HTMLDivElement>>"
|
|
342
|
+
}
|
|
343
|
+
],
|
|
344
|
+
"examples": [
|
|
345
|
+
{
|
|
346
|
+
"variant": "default",
|
|
347
|
+
"code": "import {Field, TextField} from '@staffbase/design';\n\n<Field.Root className=\"max-w-75\">\n <Field.Label>Name</Field.Label>\n <Field.Description>Enter your full name.</Field.Description>\n <TextField />\n</Field.Root>"
|
|
348
|
+
},
|
|
349
|
+
{
|
|
350
|
+
"variant": "Required label",
|
|
351
|
+
"code": "import {Field, TextField} from '@staffbase/design';\n\n<Field.Root className=\"max-w-75\">\n <Field.Label requiredLabel=\"Required\">Email</Field.Label>\n <TextField type=\"email\" aria-required />\n</Field.Root>"
|
|
352
|
+
},
|
|
353
|
+
{
|
|
354
|
+
"variant": "Invalid state",
|
|
355
|
+
"code": "import {Field, TextField} from '@staffbase/design';\n\n<Field.Root invalid className=\"max-w-75\">\n <Field.Label>Password</Field.Label>\n <TextField type=\"password\" />\n <Field.Error match>Password must be at least 8 characters.</Field.Error>\n</Field.Root>"
|
|
356
|
+
}
|
|
357
|
+
]
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
"name": "FileUpload",
|
|
361
|
+
"category": "Other",
|
|
362
|
+
"deprecated": false,
|
|
363
|
+
"compoundMembers": [],
|
|
364
|
+
"propsInterface": "export declare interface FileUploadProps {\r\n onDrop: DropzoneOptions['onDrop'];\r\n disabled?: boolean;\r\n children: ReactNode | ReactNode[];\r\n variant: Variants;\r\n ref?: MutableRefObject<FileUploadRef | undefined>;\r\n accept?: DropzoneOptions['accept'];\r\n className?: string;\r\n}",
|
|
365
|
+
"examples": []
|
|
366
|
+
},
|
|
367
|
+
{
|
|
368
|
+
"name": "Filter",
|
|
369
|
+
"category": "Other",
|
|
370
|
+
"deprecated": false,
|
|
371
|
+
"compoundMembers": [
|
|
372
|
+
{
|
|
373
|
+
"name": "displayName",
|
|
374
|
+
"signature": "string"
|
|
375
|
+
}
|
|
376
|
+
],
|
|
377
|
+
"examples": []
|
|
378
|
+
},
|
|
379
|
+
{
|
|
380
|
+
"name": "GhostButton",
|
|
381
|
+
"category": "Other",
|
|
382
|
+
"deprecated": true,
|
|
383
|
+
"compoundMembers": [],
|
|
384
|
+
"propsInterface": "export declare interface GhostButtonProps extends BaseGhostButtonProps {\r\n /**\r\n * Refers to the child element of the ghost button\r\n */\r\n children?: string;\r\n /**\r\n * Disabled state of the ghost button\r\n */\r\n disabled?: boolean;\r\n /**\r\n * The icon of the button\r\n */\r\n icon?: ReactElement<SVGAttributes<SVGElement>>;\r\n}",
|
|
385
|
+
"examples": []
|
|
386
|
+
},
|
|
387
|
+
{
|
|
388
|
+
"name": "Growl",
|
|
389
|
+
"category": "Other",
|
|
390
|
+
"deprecated": false,
|
|
391
|
+
"compoundMembers": [],
|
|
392
|
+
"propsInterface": "export declare interface GrowlProps {\r\n /**\r\n * Refers to the child element of the growl\r\n */\r\n children: ReactNode;\r\n /**\r\n * The colors of the component\r\n */\r\n variant?: GrowlVariant;\r\n /**\r\n * optional className prop for styling\r\n */\r\n className?: string;\r\n}",
|
|
393
|
+
"examples": []
|
|
394
|
+
},
|
|
395
|
+
{
|
|
396
|
+
"name": "GrowlContainer",
|
|
397
|
+
"category": "Other",
|
|
398
|
+
"deprecated": false,
|
|
399
|
+
"compoundMembers": [],
|
|
400
|
+
"examples": []
|
|
401
|
+
},
|
|
402
|
+
{
|
|
403
|
+
"name": "HelpButton",
|
|
404
|
+
"category": "Other",
|
|
405
|
+
"deprecated": false,
|
|
406
|
+
"compoundMembers": [],
|
|
407
|
+
"propsInterface": "export declare interface HelpButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {\r\n /**\r\n * `title` is required to introduce machine-readable text to the component\r\n */\r\n title: string;\r\n}",
|
|
408
|
+
"examples": []
|
|
409
|
+
},
|
|
410
|
+
{
|
|
411
|
+
"name": "IconButton",
|
|
412
|
+
"category": "Other",
|
|
413
|
+
"deprecated": true,
|
|
414
|
+
"compoundMembers": [],
|
|
415
|
+
"propsInterface": "export declare interface IconButtonProps extends Omit<BaseButtonProps, 'children'> {\r\n icon: ReactElement<SVGAttributes<SVGElement>>;\r\n}",
|
|
416
|
+
"examples": []
|
|
417
|
+
},
|
|
418
|
+
{
|
|
419
|
+
"name": "IconGhostButton",
|
|
420
|
+
"category": "Other",
|
|
421
|
+
"deprecated": true,
|
|
422
|
+
"compoundMembers": [],
|
|
423
|
+
"propsInterface": "export declare interface IconGhostButtonProps extends Omit<BaseGhostButtonProps, 'children'> {\r\n icon: ReactElement<SVGAttributes<SVGElement>>;\r\n}",
|
|
424
|
+
"examples": []
|
|
425
|
+
},
|
|
426
|
+
{
|
|
427
|
+
"name": "iconNames",
|
|
428
|
+
"category": "Other",
|
|
429
|
+
"deprecated": false,
|
|
430
|
+
"compoundMembers": [],
|
|
431
|
+
"examples": []
|
|
432
|
+
},
|
|
433
|
+
{
|
|
434
|
+
"name": "LoadingSpinner",
|
|
435
|
+
"category": "Components",
|
|
436
|
+
"description": "Loading spinners indicate that content is loading or an action is in progress.",
|
|
437
|
+
"figmaUrl": "https://www.figma.com/design/jKlhl09SG2Mk7SWLievNvM/%F0%9F%A7%B0-Design-System-Components?m=dev&node-id=45327-12704",
|
|
438
|
+
"sourcePath": "packages/design/src/components/loadingSpinner",
|
|
439
|
+
"docPage": "components/loading-spinner",
|
|
440
|
+
"deprecated": false,
|
|
441
|
+
"compoundMembers": [],
|
|
442
|
+
"examples": [
|
|
443
|
+
{
|
|
444
|
+
"variant": "default",
|
|
445
|
+
"code": "import {LoadingSpinner} from '@staffbase/design';\n\n<LoadingSpinner aria-label=\"Loading...\" size={48} />"
|
|
446
|
+
},
|
|
447
|
+
{
|
|
448
|
+
"variant": "Sizes",
|
|
449
|
+
"code": "import {LoadingSpinner} from '@staffbase/design';\n\n<LoadingSpinner aria-label=\"Loading\" size={12} />\n<LoadingSpinner aria-label=\"Loading\" size={24} />\n<LoadingSpinner aria-label=\"Loading\" size={48} />\n<LoadingSpinner aria-label=\"Loading\" size={64} />"
|
|
450
|
+
},
|
|
451
|
+
{
|
|
452
|
+
"variant": "With progress",
|
|
453
|
+
"code": "import {LoadingSpinner} from '@staffbase/design';\n\n<LoadingSpinner aria-label=\"Uploading\" size={48} progress={40} />"
|
|
454
|
+
}
|
|
455
|
+
]
|
|
456
|
+
},
|
|
457
|
+
{
|
|
458
|
+
"name": "Menu",
|
|
459
|
+
"category": "Components",
|
|
460
|
+
"description": "Menus display a list of actions or options that a user can choose. They open from a trigger and close on selection.",
|
|
461
|
+
"figmaUrl": "https://www.figma.com/design/jKlhl09SG2Mk7SWLievNvM/%F0%9F%A7%B0-Design-System-Components?node-id=1223-97491",
|
|
462
|
+
"sourcePath": "packages/design/src/components/menu",
|
|
463
|
+
"docPage": "components/menu",
|
|
464
|
+
"deprecated": false,
|
|
465
|
+
"compoundMembers": [
|
|
466
|
+
{
|
|
467
|
+
"name": "Root",
|
|
468
|
+
"signature": "(props: Menu_2.Root.Props) => JSX.Element"
|
|
469
|
+
},
|
|
470
|
+
{
|
|
471
|
+
"name": "Trigger",
|
|
472
|
+
"signature": "(props: TriggerProps_4) => JSX.Element"
|
|
473
|
+
},
|
|
474
|
+
{
|
|
475
|
+
"name": "Popup",
|
|
476
|
+
"signature": "ForwardRefExoticComponent<Omit<PopupProps_4, \"ref\"> & RefAttributes<HTMLDivElement>>"
|
|
477
|
+
},
|
|
478
|
+
{
|
|
479
|
+
"name": "Item",
|
|
480
|
+
"signature": "ForwardRefExoticComponent<Omit<ItemProps, \"ref\"> & RefAttributes<HTMLElement>>"
|
|
481
|
+
},
|
|
482
|
+
{
|
|
483
|
+
"name": "Separator",
|
|
484
|
+
"signature": "ForwardRefExoticComponent<Omit< SeparatorProps, \"ref\"> & RefAttributes<HTMLDivElement>>"
|
|
485
|
+
},
|
|
486
|
+
{
|
|
487
|
+
"name": "Group",
|
|
488
|
+
"signature": "ForwardRefExoticComponent<Omit< ContextMenuGroupProps, \"ref\"> & RefAttributes<HTMLDivElement>>"
|
|
489
|
+
},
|
|
490
|
+
{
|
|
491
|
+
"name": "GroupLabel",
|
|
492
|
+
"signature": "ForwardRefExoticComponent<Omit< ContextMenuGroupLabelProps, \"ref\"> & RefAttributes<HTMLDivElement>>"
|
|
493
|
+
},
|
|
494
|
+
{
|
|
495
|
+
"name": "RadioItem",
|
|
496
|
+
"signature": "ForwardRefExoticComponent<Omit< ContextMenuRadioItemProps, \"ref\"> & RefAttributes<HTMLElement>>"
|
|
497
|
+
},
|
|
498
|
+
{
|
|
499
|
+
"name": "RadioGroup",
|
|
500
|
+
"signature": "NamedExoticComponent<Omit< ContextMenuRadioGroupProps, \"ref\"> & RefAttributes<HTMLDivElement>>"
|
|
501
|
+
},
|
|
502
|
+
{
|
|
503
|
+
"name": "SubMenuRoot",
|
|
504
|
+
"signature": "typeof Menu_2.SubmenuRoot"
|
|
505
|
+
},
|
|
506
|
+
{
|
|
507
|
+
"name": "SubMenuTrigger",
|
|
508
|
+
"signature": "ForwardRefExoticComponent<Omit<SubMenuTriggerProps, \"ref\"> & RefAttributes<HTMLElement>>"
|
|
509
|
+
}
|
|
510
|
+
],
|
|
511
|
+
"examples": [
|
|
512
|
+
{
|
|
513
|
+
"variant": "default",
|
|
514
|
+
"code": "import {AddIcon, Button, Menu} from '@staffbase/design';\n\n<Menu.Root>\n <Menu.Trigger>\n <Button color=\"neutral\">Open menu</Button>\n </Menu.Trigger>\n <Menu.Popup>\n <Menu.Item leadingIcon={<AddIcon />} description=\"Save your favourites\">\n Add to Library\n </Menu.Item>\n <Menu.Item>Add to Playlist</Menu.Item>\n <Menu.Separator />\n <Menu.Item variant=\"critical\">Delete</Menu.Item>\n </Menu.Popup>\n</Menu.Root>"
|
|
515
|
+
}
|
|
516
|
+
]
|
|
517
|
+
},
|
|
518
|
+
{
|
|
519
|
+
"name": "Modal",
|
|
520
|
+
"category": "Other",
|
|
521
|
+
"deprecated": true,
|
|
522
|
+
"replacement": "Dialog",
|
|
523
|
+
"compoundMembers": [],
|
|
524
|
+
"propsInterface": "export declare interface ModalProps {\r\n /**\r\n * The title of the modal component.\r\n */\r\n title: string;\r\n /**\r\n * Optional addon element displayed next to the title (e.g., Badge, Pill).\r\n */\r\n titleAddon?: ReactNode;\r\n /**\r\n * The text of the cancel button.\r\n */\r\n cancelButtonText?: string;\r\n /**\r\n * The callback function called when a click on a cancel button or outside the modal occurs.\r\n */\r\n onCancel: () => void;\r\n /**\r\n * The text of the header button.\r\n */\r\n headerButtonText?: string;\r\n /**\r\n * The optional callback function called when the header button is clicked.\r\n */\r\n onHeaderButtonClick?: () => void;\r\n /**\r\n * The text of the footer button.\r\n */\r\n footerButtonText?: string;\r\n /**\r\n * The variant of the confirmation button.\r\n * @default 'primary'\r\n */\r\n footerButtonVariant?: ButtonVariant;\r\n /**\r\n * The optional callback function called when the footer button is clicked.\r\n */\r\n onFooterButtonClick?: () => void;\r\n /**\r\n * Disables the footer button.\r\n */\r\n disableFooterButton?: boolean;\r\n /**\r\n * Controls the visibility of the modal.\r\n * @default false\r\n */\r\n isOpen?: boolean;\r\n /**\r\n * Controls the ability to scroll the Modal Content\r\n * @default false\r\n */\r\n scroll?: boolean;\r\n /**\r\n * optional main content of the modal\r\n */\r\n children?: ReactNode;\r\n /**\r\n * Controls the visibility of the close button.\r\n * @default false\r\n */\r\n showHeaderCancelButton?: boolean;\r\n /**\r\n * Controls the visibility of the confirm button in the header.\r\n * @default false\r\n */\r\n showHeaderButton?: boolean;\r\n /**\r\n * Controls whether the optional header button is either a Button or a GhostButton\r\n * @default true\r\n */\r\n headerButtonIsGhost?: boolean;\r\n /**\r\n * The optional content of the header\r\n */\r\n headerContent?: ReactNode;\r\n /**\r\n * Controls the visibility of the optional footer\r\n * @default false\r\n */\r\n hideFooter?: boolean;\r\n /**\r\n * The optional content of the footer\r\n */\r\n footerContent?: ReactNode;\r\n /**\r\n * Optional classname prop for styling\r\n */\r\n className?: string;\r\n /**\r\n * Optional additional classname prop for styling modal overlay (usefull for lifting modal dialog above other elements using z-index)\r\n */\r\n overlayClassName?: string;\r\n /**\r\n * Controls the visibility of the modal when a click outside the modal occurs.\r\n * @default false\r\n */\r\n keepOnBackdropClick?: boolean;\r\n}",
|
|
525
|
+
"examples": []
|
|
526
|
+
},
|
|
527
|
+
{
|
|
528
|
+
"name": "ModalDialog",
|
|
529
|
+
"category": "Other",
|
|
530
|
+
"deprecated": true,
|
|
531
|
+
"replacement": "Alert",
|
|
532
|
+
"compoundMembers": [],
|
|
533
|
+
"propsInterface": "export declare interface ModalDialogProps {\r\n /**\r\n * The text of the cancel button.\r\n */\r\n cancelButtonText: string;\r\n /**\r\n * The text of the confirmation button.\r\n */\r\n confirmButtonText: string;\r\n /**\r\n * The variant of the confirmation button.\r\n * @default 'primary'\r\n */\r\n confirmButtonVariant?: ButtonVariant;\r\n /**\r\n * An optional icon to display.\r\n */\r\n icon?: ReactElement<SVGAttributes<SVGElement>>;\r\n /**\r\n * Controls the visibility of the modal dialog.\r\n */\r\n isOpen: boolean;\r\n /**\r\n * The callback function called when the confirmation button is clicked.\r\n */\r\n onConfirm: () => void;\r\n /**\r\n * The callback function called when the cancel button is clicked.\r\n */\r\n onCancel: () => void;\r\n /**\r\n * The text content of the modal dialog.\r\n */\r\n text: string;\r\n /**\r\n * The title of the modal dialog.\r\n */\r\n title: string;\r\n /**\r\n * Optional classname prop for styling\r\n */\r\n className?: string;\r\n /**\r\n * Optional additional classname prop for styling modal overlay (usefull for lifting modal dialog above other elements using z-index)\r\n */\r\n overlayClassName?: string;\r\n}",
|
|
534
|
+
"examples": []
|
|
535
|
+
},
|
|
536
|
+
{
|
|
537
|
+
"name": "NumberStepper",
|
|
538
|
+
"category": "Components",
|
|
539
|
+
"description": "Number steppers let the user enter a numeric value with increment and decrement controls.",
|
|
540
|
+
"figmaUrl": "https://www.figma.com/design/jKlhl09SG2Mk7SWLievNvM/%F0%9F%A7%B0-Design-System-Components?m=dev&node-id=45327-14087",
|
|
541
|
+
"sourcePath": "packages/design/src/components/numberStepper",
|
|
542
|
+
"docPage": "components/number-stepper",
|
|
543
|
+
"deprecated": false,
|
|
544
|
+
"compoundMembers": [
|
|
545
|
+
{
|
|
546
|
+
"name": "Root",
|
|
547
|
+
"signature": "ForwardRefExoticComponent<Omit< NumberFieldRootProps, \"ref\"> & RefAttributes<HTMLDivElement>>"
|
|
548
|
+
},
|
|
549
|
+
{
|
|
550
|
+
"name": "Increment",
|
|
551
|
+
"signature": "ForwardRefExoticComponent<Omit< NumberFieldIncrementProps, \"ref\"> & RefAttributes<HTMLButtonElement>>"
|
|
552
|
+
},
|
|
553
|
+
{
|
|
554
|
+
"name": "Input",
|
|
555
|
+
"signature": "ForwardRefExoticComponent<Omit< NumberFieldInputProps, \"ref\"> & RefAttributes<HTMLInputElement>>"
|
|
556
|
+
},
|
|
557
|
+
{
|
|
558
|
+
"name": "Decrement",
|
|
559
|
+
"signature": "ForwardRefExoticComponent<Omit< NumberFieldDecrementProps, \"ref\"> & RefAttributes<HTMLButtonElement>>"
|
|
560
|
+
}
|
|
561
|
+
],
|
|
562
|
+
"examples": [
|
|
563
|
+
{
|
|
564
|
+
"variant": "default",
|
|
565
|
+
"code": "import {Field, NumberStepper} from '@staffbase/design';\n\n<Field.Root>\n <Field.Label>Amount</Field.Label>\n <Field.Description>Enter a value between 0 and 10.</Field.Description>\n <NumberStepper.Root defaultValue={0} min={0} max={10}>\n <NumberStepper.Decrement />\n <NumberStepper.Input />\n <NumberStepper.Increment />\n </NumberStepper.Root>\n</Field.Root>"
|
|
566
|
+
}
|
|
567
|
+
]
|
|
568
|
+
},
|
|
569
|
+
{
|
|
570
|
+
"name": "Pill",
|
|
571
|
+
"category": "Components",
|
|
572
|
+
"description": "Pills label, categorise, or tag content. Use them to highlight short status or metadata.",
|
|
573
|
+
"figmaUrl": "https://www.figma.com/design/jKlhl09SG2Mk7SWLievNvM/%F0%9F%A7%B0-Design-System-Components?m=dev&node-id=45327-11485",
|
|
574
|
+
"sourcePath": "packages/design/src/components/pill",
|
|
575
|
+
"docPage": "components/pill",
|
|
576
|
+
"deprecated": false,
|
|
577
|
+
"compoundMembers": [],
|
|
578
|
+
"examples": [
|
|
579
|
+
{
|
|
580
|
+
"variant": "default",
|
|
581
|
+
"code": "import {Pill} from '@staffbase/design';\n\n<Pill>Pill</Pill>"
|
|
582
|
+
}
|
|
583
|
+
]
|
|
584
|
+
},
|
|
585
|
+
{
|
|
586
|
+
"name": "PlainGrowl",
|
|
587
|
+
"category": "Other",
|
|
588
|
+
"deprecated": false,
|
|
589
|
+
"compoundMembers": [],
|
|
590
|
+
"examples": []
|
|
591
|
+
},
|
|
592
|
+
{
|
|
593
|
+
"name": "Popover",
|
|
594
|
+
"category": "Components",
|
|
595
|
+
"description": "Popovers display floating content anchored to a trigger element. Use them for non-modal contextual information or actions.",
|
|
596
|
+
"figmaUrl": "https://www.figma.com/design/jKlhl09SG2Mk7SWLievNvM/%F0%9F%A7%B0-Design-System-Components?m=dev&node-id=45327-12357",
|
|
597
|
+
"sourcePath": "packages/design/src/components/popover",
|
|
598
|
+
"docPage": "components/popover",
|
|
599
|
+
"deprecated": false,
|
|
600
|
+
"compoundMembers": [
|
|
601
|
+
{
|
|
602
|
+
"name": "Root",
|
|
603
|
+
"signature": "FC<RadixPopover.PopoverProps>"
|
|
604
|
+
},
|
|
605
|
+
{
|
|
606
|
+
"name": "Content",
|
|
607
|
+
"signature": "ForwardRefExoticComponent<ContentProps & RefAttributes<HTMLDivElement>>"
|
|
608
|
+
},
|
|
609
|
+
{
|
|
610
|
+
"name": "Trigger",
|
|
611
|
+
"signature": "ForwardRefExoticComponent<Omit<RadixPopover.PopoverTriggerProps & RefAttributes<HTMLButtonElement>, \"ref\"> & RefAttributes<HTMLButtonElement>>"
|
|
612
|
+
},
|
|
613
|
+
{
|
|
614
|
+
"name": "Close",
|
|
615
|
+
"signature": "ForwardRefExoticComponent<PopoverCloseProps & RefAttributes<HTMLButtonElement>>"
|
|
616
|
+
},
|
|
617
|
+
{
|
|
618
|
+
"name": "Anchor",
|
|
619
|
+
"signature": "ForwardRefExoticComponent<RadixPopover.PopoverAnchorProps & RefAttributes<HTMLDivElement>>"
|
|
620
|
+
}
|
|
621
|
+
],
|
|
622
|
+
"examples": [
|
|
623
|
+
{
|
|
624
|
+
"variant": "default",
|
|
625
|
+
"code": "import {Button, InfoIcon, Popover} from '@staffbase/design';\n\n<Popover.Root>\n <Popover.Trigger>\n <Button color=\"neutral\"><InfoIcon />Contributors</Button>\n </Popover.Trigger>\n <Popover.Content className=\"w-[336px]\" side=\"right\">\n <Popover.Close title=\"Close\" />\n <p className=\"text-body-sm mb-1\">\n Contributors can read, publish, and edit their own posts.\n </p>\n <Button variant=\"ghost\" color=\"neutral\">See Support Portal</Button>\n </Popover.Content>\n</Popover.Root>"
|
|
626
|
+
}
|
|
627
|
+
]
|
|
628
|
+
},
|
|
629
|
+
{
|
|
630
|
+
"name": "Radio",
|
|
631
|
+
"category": "Other",
|
|
632
|
+
"deprecated": false,
|
|
633
|
+
"compoundMembers": [],
|
|
634
|
+
"propsInterface": "export declare interface RadioProps {\r\n /**\r\n * The radio is checked\r\n */\r\n checked?: boolean;\r\n /**\r\n * The optional description text\r\n */\r\n description?: string;\r\n /**\r\n * Whether the option is disabled\r\n */\r\n disabled?: boolean;\r\n /**\r\n * The required label of the radio\r\n */\r\n label: string;\r\n /**\r\n * The onChange event occurs when selecting the radio value/option\r\n */\r\n onChange?: (e: ChangeEvent<HTMLInputElement>) => void;\r\n /**\r\n * The required name of the radio to reference the data\r\n */\r\n name: string;\r\n /**\r\n * The required value of the radio\r\n */\r\n value: string;\r\n /**\r\n * Error state of the radio\r\n */\r\n hasError?: boolean;\r\n /**\r\n * Optional classname prop for styling\r\n */\r\n className?: string;\r\n /**\r\n * Optional id prop\r\n */\r\n id?: string;\r\n}",
|
|
635
|
+
"examples": []
|
|
636
|
+
},
|
|
637
|
+
{
|
|
638
|
+
"name": "RadioGroup",
|
|
639
|
+
"category": "Other",
|
|
640
|
+
"deprecated": false,
|
|
641
|
+
"compoundMembers": [],
|
|
642
|
+
"propsInterface": "export declare interface RadioGroupProps {\r\n groupDescription?: string;\r\n disableAll?: boolean;\r\n groupLabel?: string;\r\n onChange?: (e: ChangeEvent<HTMLInputElement>) => void;\r\n options: RadioProps[];\r\n groupErrorMessage?: string;\r\n errorAriaLive?: 'off' | 'assertive' | 'polite' | undefined;\r\n requiredLabel?: string;\r\n /**\r\n * Optional classname prop for styling\r\n */\r\n className?: string;\r\n}",
|
|
643
|
+
"examples": []
|
|
644
|
+
},
|
|
645
|
+
{
|
|
646
|
+
"name": "SearchableMultiSelect",
|
|
647
|
+
"category": "Components",
|
|
648
|
+
"description": "Searchable multi selects let the user filter a list of options by typing and pick several. Selected values appear as chips inside the input.",
|
|
649
|
+
"figmaUrl": "",
|
|
650
|
+
"sourcePath": "packages/design/src/components/searchableMultiSelect",
|
|
651
|
+
"docPage": "components/searchable-multi-select",
|
|
652
|
+
"deprecated": false,
|
|
653
|
+
"compoundMembers": [
|
|
654
|
+
{
|
|
655
|
+
"name": "Root",
|
|
656
|
+
"signature": "<Value, Multiple extends boolean | undefined = true>(props: Omit<Combobox.Root.Props<Value, Multiple>, \"ref\">) => JSX.Element"
|
|
657
|
+
},
|
|
658
|
+
{
|
|
659
|
+
"name": "List",
|
|
660
|
+
"signature": "ForwardRefExoticComponent<Omit< AutocompleteListProps, \"ref\"> & RefAttributes<HTMLDivElement>>"
|
|
661
|
+
},
|
|
662
|
+
{
|
|
663
|
+
"name": "Group",
|
|
664
|
+
"signature": "ForwardRefExoticComponent<Omit< AutocompleteGroupProps, \"ref\"> & RefAttributes<HTMLDivElement>>"
|
|
665
|
+
},
|
|
666
|
+
{
|
|
667
|
+
"name": "GroupLabel",
|
|
668
|
+
"signature": "ForwardRefExoticComponent<Omit< AutocompleteGroupLabelProps, \"ref\"> & RefAttributes<HTMLDivElement>>"
|
|
669
|
+
},
|
|
670
|
+
{
|
|
671
|
+
"name": "Popup",
|
|
672
|
+
"signature": "ForwardRefExoticComponent<Omit<PopupProps_5, \"ref\"> & RefAttributes<HTMLDivElement>>"
|
|
673
|
+
},
|
|
674
|
+
{
|
|
675
|
+
"name": "Item",
|
|
676
|
+
"signature": "ForwardRefExoticComponent<Omit< ComboboxItemProps, \"ref\"> & RefAttributes<HTMLDivElement>>"
|
|
677
|
+
},
|
|
678
|
+
{
|
|
679
|
+
"name": "Separator",
|
|
680
|
+
"signature": "ForwardRefExoticComponent<Omit< SeparatorProps, \"ref\"> & RefAttributes<HTMLDivElement>>"
|
|
681
|
+
},
|
|
682
|
+
{
|
|
683
|
+
"name": "Input",
|
|
684
|
+
"signature": "ForwardRefExoticComponent<Omit< AutocompleteInputProps, \"ref\"> & RefAttributes<HTMLInputElement>>"
|
|
685
|
+
},
|
|
686
|
+
{
|
|
687
|
+
"name": "Value",
|
|
688
|
+
"signature": "(props: ValueProps) => JSX.Element"
|
|
689
|
+
},
|
|
690
|
+
{
|
|
691
|
+
"name": "Chip",
|
|
692
|
+
"signature": "ForwardRefExoticComponent<Omit< ComboboxChipProps, \"ref\"> & RefAttributes<HTMLDivElement>>"
|
|
693
|
+
},
|
|
694
|
+
{
|
|
695
|
+
"name": "Empty",
|
|
696
|
+
"signature": "ForwardRefExoticComponent<Omit< AutocompleteEmptyProps, \"ref\"> & RefAttributes<HTMLDivElement>>"
|
|
697
|
+
},
|
|
698
|
+
{
|
|
699
|
+
"name": "Collection",
|
|
700
|
+
"signature": "typeof Combobox.Collection"
|
|
701
|
+
},
|
|
702
|
+
{
|
|
703
|
+
"name": "Status",
|
|
704
|
+
"signature": "ForwardRefExoticComponent<Omit< AutocompleteStatusProps, \"ref\"> & RefAttributes<HTMLDivElement>>"
|
|
705
|
+
}
|
|
706
|
+
],
|
|
707
|
+
"examples": [
|
|
708
|
+
{
|
|
709
|
+
"variant": "default",
|
|
710
|
+
"code": "import {Field, LanguageGlobeIcon, SearchableMultiSelect} from '@staffbase/design';\n\nconst langs = [\n{id: 'js', value: 'JavaScript'},\n{id: 'ts', value: 'TypeScript'},\n{id: 'py', value: 'Python'},\n{id: 'go', value: 'Go'},\n];\n\n<Field.Root className=\"max-w-[400px]\">\n <Field.Label>Programming languages</Field.Label>\n <SearchableMultiSelect.Root items={langs}>\n <SearchableMultiSelect.Value leadingIcon={<LanguageGlobeIcon />}>\n {(value) => (\n <>\n {value.map((language) => (\n <SearchableMultiSelect.Chip key={language.id}>\n {language.value}\n </SearchableMultiSelect.Chip>\n ))}\n <SearchableMultiSelect.Input\n placeholder={value.length > 0 ? '' : 'e.g. TypeScript'}\n />\n </>\n )}\n </SearchableMultiSelect.Value>\n <SearchableMultiSelect.Popup>\n <SearchableMultiSelect.Empty>No languages found.</SearchableMultiSelect.Empty>\n <SearchableMultiSelect.List>\n {(language) => (\n <SearchableMultiSelect.Item key={language.id} value={language}>\n {language.value}\n </SearchableMultiSelect.Item>\n )}\n </SearchableMultiSelect.List>\n </SearchableMultiSelect.Popup>\n </SearchableMultiSelect.Root>\n</Field.Root>"
|
|
711
|
+
}
|
|
712
|
+
]
|
|
713
|
+
},
|
|
714
|
+
{
|
|
715
|
+
"name": "SearchableSingleSelect",
|
|
716
|
+
"category": "Components",
|
|
717
|
+
"description": "Searchable single selects let the user filter a list of options by typing and pick one. Use them when the list is long enough to benefit from search.",
|
|
718
|
+
"figmaUrl": "https://www.figma.com/design/jKlhl09SG2Mk7SWLievNvM/%F0%9F%A7%B0-Design-System-Components?m=dev&node-id=45327-11729",
|
|
719
|
+
"sourcePath": "packages/design/src/components/searchableSingleSelect",
|
|
720
|
+
"docPage": "components/searchable-single-select",
|
|
721
|
+
"deprecated": false,
|
|
722
|
+
"compoundMembers": [
|
|
723
|
+
{
|
|
724
|
+
"name": "Root",
|
|
725
|
+
"signature": "typeof Combobox.Root"
|
|
726
|
+
},
|
|
727
|
+
{
|
|
728
|
+
"name": "List",
|
|
729
|
+
"signature": "ForwardRefExoticComponent<Omit< AutocompleteListProps, \"ref\"> & RefAttributes<HTMLDivElement>>"
|
|
730
|
+
},
|
|
731
|
+
{
|
|
732
|
+
"name": "Group",
|
|
733
|
+
"signature": "ForwardRefExoticComponent<Omit< AutocompleteGroupProps, \"ref\"> & RefAttributes<HTMLDivElement>>"
|
|
734
|
+
},
|
|
735
|
+
{
|
|
736
|
+
"name": "Status",
|
|
737
|
+
"signature": "ForwardRefExoticComponent<Omit< AutocompleteStatusProps, \"ref\"> & RefAttributes<HTMLDivElement>>"
|
|
738
|
+
},
|
|
739
|
+
{
|
|
740
|
+
"name": "Collection",
|
|
741
|
+
"signature": "typeof Combobox.Collection"
|
|
742
|
+
},
|
|
743
|
+
{
|
|
744
|
+
"name": "GroupLabel",
|
|
745
|
+
"signature": "ForwardRefExoticComponent<Omit< AutocompleteGroupLabelProps, \"ref\"> & RefAttributes<HTMLDivElement>>"
|
|
746
|
+
},
|
|
747
|
+
{
|
|
748
|
+
"name": "Popup",
|
|
749
|
+
"signature": "ForwardRefExoticComponent<Omit<PopupProps_6, \"ref\"> & RefAttributes<HTMLDivElement>>"
|
|
750
|
+
},
|
|
751
|
+
{
|
|
752
|
+
"name": "Item",
|
|
753
|
+
"signature": "ForwardRefExoticComponent<Omit< ComboboxItemProps, \"ref\"> & RefAttributes<HTMLDivElement>>"
|
|
754
|
+
},
|
|
755
|
+
{
|
|
756
|
+
"name": "ItemIndicator",
|
|
757
|
+
"signature": "ForwardRefExoticComponent<Omit< ComboboxItemIndicatorProps, \"ref\"> & RefAttributes<HTMLSpanElement>>"
|
|
758
|
+
},
|
|
759
|
+
{
|
|
760
|
+
"name": "Separator",
|
|
761
|
+
"signature": "ForwardRefExoticComponent<Omit< SeparatorProps, \"ref\"> & RefAttributes<HTMLDivElement>>"
|
|
762
|
+
},
|
|
763
|
+
{
|
|
764
|
+
"name": "Input",
|
|
765
|
+
"signature": "ForwardRefExoticComponent<Omit<InputProps, \"ref\"> & RefAttributes<HTMLInputElement>>"
|
|
766
|
+
},
|
|
767
|
+
{
|
|
768
|
+
"name": "Empty",
|
|
769
|
+
"signature": "ForwardRefExoticComponent<Omit< AutocompleteEmptyProps, \"ref\"> & RefAttributes<HTMLDivElement>>"
|
|
770
|
+
}
|
|
771
|
+
],
|
|
772
|
+
"propsInterface": "export declare interface SearchableSingleSelectProps<TOption extends BaseOption> extends SingleSelectBaseProps<TOption> {\r\n /**\r\n * Value of the input field.\r\n */\r\n inputValue: string;\r\n /**\r\n * Callback to handle user-input.\r\n */\r\n onInputChange: (next: string) => void;\r\n /**\r\n * Optional ref to attach to the select trigger.\r\n */\r\n triggerRef?: Ref<HTMLElement>;\r\n /**\r\n * Determines if the single select should allow user-input.\r\n */\r\n searchable: true;\r\n ariaLabelledBy?: string;\r\n}",
|
|
773
|
+
"examples": [
|
|
774
|
+
{
|
|
775
|
+
"variant": "default",
|
|
776
|
+
"code": "import {Field, SearchableSingleSelect} from '@staffbase/design';\n\nconst fruits = ['Apple', 'Banana', 'Orange', 'Mango'];\n\n<Field.Root className=\"max-w-[300px]\">\n <Field.Label>Favourite fruit</Field.Label>\n <SearchableSingleSelect.Root items={fruits}>\n <SearchableSingleSelect.Input placeholder=\"e.g. Apple\" />\n <SearchableSingleSelect.Popup>\n <SearchableSingleSelect.Empty>No fruits found.</SearchableSingleSelect.Empty>\n <SearchableSingleSelect.List>\n {(item) => (\n <SearchableSingleSelect.Item key={item} value={item}>\n {item}\n </SearchableSingleSelect.Item>\n )}\n </SearchableSingleSelect.List>\n </SearchableSingleSelect.Popup>\n </SearchableSingleSelect.Root>\n</Field.Root>"
|
|
777
|
+
}
|
|
778
|
+
]
|
|
779
|
+
},
|
|
780
|
+
{
|
|
781
|
+
"name": "SearchInput",
|
|
782
|
+
"category": "Other",
|
|
783
|
+
"deprecated": false,
|
|
784
|
+
"compoundMembers": [],
|
|
785
|
+
"propsInterface": "export declare interface SearchInputProps extends SearchBaseInputProps {\r\n /**\r\n * Callback function called when cancel button is clicked\r\n */\r\n onClear?: () => void;\r\n /**\r\n * Callback function called when the wrapping search form is submitted\r\n */\r\n onSubmit?: () => void;\r\n}",
|
|
786
|
+
"examples": []
|
|
787
|
+
},
|
|
788
|
+
{
|
|
789
|
+
"name": "SegmentedControl",
|
|
790
|
+
"category": "Components",
|
|
791
|
+
"description": "Segmented controls let the user choose one option from a small set of mutually exclusive choices, presented inline.",
|
|
792
|
+
"figmaUrl": "",
|
|
793
|
+
"sourcePath": "packages/design/src/components/segmentedControl",
|
|
794
|
+
"docPage": "components/segmented-control",
|
|
795
|
+
"deprecated": false,
|
|
796
|
+
"compoundMembers": [
|
|
797
|
+
{
|
|
798
|
+
"name": "Root",
|
|
799
|
+
"signature": "ForwardRefExoticComponent<Omit<RootProps, \"ref\"> & RefAttributes<HTMLDivElement>>"
|
|
800
|
+
},
|
|
801
|
+
{
|
|
802
|
+
"name": "Item",
|
|
803
|
+
"signature": "ForwardRefExoticComponent<Omit<Radio_2.Root.Props<any>, \"ref\"> & RefAttributes<HTMLSpanElement>>"
|
|
804
|
+
}
|
|
805
|
+
],
|
|
806
|
+
"examples": [
|
|
807
|
+
{
|
|
808
|
+
"variant": "default",
|
|
809
|
+
"code": "import {SegmentedControl} from '@staffbase/design';\n\n<SegmentedControl.Root defaultValue=\"list\" aria-label=\"View options\">\n <SegmentedControl.Item value=\"list\">List</SegmentedControl.Item>\n <SegmentedControl.Item value=\"grid\">Grid</SegmentedControl.Item>\n</SegmentedControl.Root>"
|
|
810
|
+
},
|
|
811
|
+
{
|
|
812
|
+
"variant": "With icons",
|
|
813
|
+
"code": "import {BulletListIcon, GridIcon, SegmentedControl} from '@staffbase/design';\n\n<SegmentedControl.Root defaultValue=\"list\" aria-label=\"View options\">\n <SegmentedControl.Item value=\"list\">\n <BulletListIcon />\n List\n </SegmentedControl.Item>\n <SegmentedControl.Item value=\"grid\">\n <GridIcon />\n Grid\n </SegmentedControl.Item>\n</SegmentedControl.Root>"
|
|
814
|
+
},
|
|
815
|
+
{
|
|
816
|
+
"variant": "Variants",
|
|
817
|
+
"code": "import {SegmentedControl} from '@staffbase/design';\n\n<SegmentedControl.Root variant=\"studio\" defaultValue=\"list\" aria-label=\"Studio\">\n <SegmentedControl.Item value=\"list\">List</SegmentedControl.Item>\n <SegmentedControl.Item value=\"grid\">Grid</SegmentedControl.Item>\n</SegmentedControl.Root>\n\n<SegmentedControl.Root variant=\"content\" defaultValue=\"list\" aria-label=\"Content\">\n <SegmentedControl.Item value=\"list\">List</SegmentedControl.Item>\n <SegmentedControl.Item value=\"grid\">Grid</SegmentedControl.Item>\n</SegmentedControl.Root>"
|
|
818
|
+
}
|
|
819
|
+
]
|
|
820
|
+
},
|
|
821
|
+
{
|
|
822
|
+
"name": "Select",
|
|
823
|
+
"category": "Components",
|
|
824
|
+
"description": "Selects let the user choose a single option from a fixed list. Use them when the available options are known in advance.",
|
|
825
|
+
"figmaUrl": "",
|
|
826
|
+
"sourcePath": "packages/design/src/components/select",
|
|
827
|
+
"docPage": "components/select",
|
|
828
|
+
"deprecated": false,
|
|
829
|
+
"compoundMembers": [
|
|
830
|
+
{
|
|
831
|
+
"name": "Root",
|
|
832
|
+
"signature": "typeof Select_2.Root"
|
|
833
|
+
},
|
|
834
|
+
{
|
|
835
|
+
"name": "Popup",
|
|
836
|
+
"signature": "ForwardRefExoticComponent<Omit<PopupProps_7, \"ref\"> & RefAttributes<HTMLDivElement>>"
|
|
837
|
+
},
|
|
838
|
+
{
|
|
839
|
+
"name": "Trigger",
|
|
840
|
+
"signature": "ForwardRefExoticComponent<Omit<TriggerProps_5, \"ref\"> & RefAttributes<HTMLButtonElement>>"
|
|
841
|
+
},
|
|
842
|
+
{
|
|
843
|
+
"name": "List",
|
|
844
|
+
"signature": "ForwardRefExoticComponent<Omit< SelectListProps, \"ref\"> & RefAttributes<HTMLDivElement>>"
|
|
845
|
+
},
|
|
846
|
+
{
|
|
847
|
+
"name": "Item",
|
|
848
|
+
"signature": "ForwardRefExoticComponent<Omit< SelectItemProps, \"ref\"> & RefAttributes<HTMLElement>>"
|
|
849
|
+
},
|
|
850
|
+
{
|
|
851
|
+
"name": "ItemIndicator",
|
|
852
|
+
"signature": "ForwardRefExoticComponent<Omit< SelectItemIndicatorProps, \"ref\"> & RefAttributes<HTMLSpanElement>>"
|
|
853
|
+
},
|
|
854
|
+
{
|
|
855
|
+
"name": "Separator",
|
|
856
|
+
"signature": "ForwardRefExoticComponent<Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, \"ref\"> & RefAttributes<HTMLDivElement>>"
|
|
857
|
+
},
|
|
858
|
+
{
|
|
859
|
+
"name": "Value",
|
|
860
|
+
"signature": "ForwardRefExoticComponent<Omit< SelectValueProps, \"ref\"> & RefAttributes<HTMLSpanElement>>"
|
|
861
|
+
},
|
|
862
|
+
{
|
|
863
|
+
"name": "Group",
|
|
864
|
+
"signature": "ForwardRefExoticComponent<Omit< SelectGroupProps, \"ref\"> & RefAttributes<HTMLDivElement>>"
|
|
865
|
+
},
|
|
866
|
+
{
|
|
867
|
+
"name": "GroupLabel",
|
|
868
|
+
"signature": "ForwardRefExoticComponent<Omit< SelectGroupLabelProps, \"ref\"> & RefAttributes<HTMLDivElement>>"
|
|
869
|
+
}
|
|
870
|
+
],
|
|
871
|
+
"examples": [
|
|
872
|
+
{
|
|
873
|
+
"variant": "default",
|
|
874
|
+
"code": "import {Field, Select} from '@staffbase/design';\n\nconst fonts = [\n{label: 'Sans-serif', value: 'sans'},\n{label: 'Serif', value: 'serif'},\n{label: 'Monospace', value: 'mono'},\n];\n\n<Field.Root>\n <Field.Label>Font family</Field.Label>\n <Select.Root items={fonts}>\n <Select.Trigger className=\"w-60\">\n <Select.Value />\n </Select.Trigger>\n <Select.Popup>\n <Select.List>\n {fonts.map(({label, value}) => (\n <Select.Item key={value} value={value}>\n {label}\n </Select.Item>\n ))}\n </Select.List>\n </Select.Popup>\n </Select.Root>\n</Field.Root>"
|
|
875
|
+
}
|
|
876
|
+
]
|
|
877
|
+
},
|
|
878
|
+
{
|
|
879
|
+
"name": "Separator",
|
|
880
|
+
"category": "Components",
|
|
881
|
+
"description": "Separators visually divide groups of content using a thin horizontal or vertical line.",
|
|
882
|
+
"figmaUrl": "https://www.figma.com/design/jKlhl09SG2Mk7SWLievNvM/%F0%9F%A7%B0-Design-System-Components?node-id=840-15642",
|
|
883
|
+
"sourcePath": "packages/design/src/components/separator",
|
|
884
|
+
"docPage": "components/separator",
|
|
885
|
+
"deprecated": false,
|
|
886
|
+
"compoundMembers": [],
|
|
887
|
+
"examples": [
|
|
888
|
+
{
|
|
889
|
+
"variant": "default",
|
|
890
|
+
"code": "import {Separator} from '@staffbase/design';\n\n<div>\n <p>Top content</p>\n <Separator orientation=\"horizontal\" />\n <p>Bottom content</p>\n</div>"
|
|
891
|
+
},
|
|
892
|
+
{
|
|
893
|
+
"variant": "Vertical",
|
|
894
|
+
"code": "import {Separator} from '@staffbase/design';\n\n<div class=\"flex gap-2\">\n <span>Left</span>\n <Separator orientation=\"vertical\" />\n <span>Right</span>\n</div>"
|
|
895
|
+
}
|
|
896
|
+
]
|
|
897
|
+
},
|
|
898
|
+
{
|
|
899
|
+
"name": "SingleSelect",
|
|
900
|
+
"category": "Other",
|
|
901
|
+
"deprecated": true,
|
|
902
|
+
"replacement": "Select",
|
|
903
|
+
"compoundMembers": [],
|
|
904
|
+
"examples": []
|
|
905
|
+
},
|
|
906
|
+
{
|
|
907
|
+
"name": "Skeleton",
|
|
908
|
+
"category": "Components",
|
|
909
|
+
"description": "Skeletons indicate loading content using placeholder shapes. They reduce perceived wait time while data loads.",
|
|
910
|
+
"figmaUrl": "https://www.figma.com/design/jKlhl09SG2Mk7SWLievNvM/%F0%9F%A7%B0-Design-System-Components?node-id=42328-675",
|
|
911
|
+
"sourcePath": "packages/design/src/components/skeleton",
|
|
912
|
+
"docPage": "components/skeleton",
|
|
913
|
+
"deprecated": false,
|
|
914
|
+
"compoundMembers": [
|
|
915
|
+
{
|
|
916
|
+
"name": "Avatar",
|
|
917
|
+
"signature": "ForwardRefExoticComponent<Omit<AvatarProps_2, \"ref\"> & RefAttributes<HTMLDivElement>>"
|
|
918
|
+
},
|
|
919
|
+
{
|
|
920
|
+
"name": "Text",
|
|
921
|
+
"signature": "ForwardRefExoticComponent<Omit<TextProps, \"ref\"> & RefAttributes<HTMLDivElement>>"
|
|
922
|
+
},
|
|
923
|
+
{
|
|
924
|
+
"name": "Box",
|
|
925
|
+
"signature": "ForwardRefExoticComponent<Omit<Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, \"children\">, \"ref\"> & RefAttributes<HTMLDivElement>>"
|
|
926
|
+
}
|
|
927
|
+
],
|
|
928
|
+
"examples": [
|
|
929
|
+
{
|
|
930
|
+
"variant": "default",
|
|
931
|
+
"code": "import {Skeleton} from '@staffbase/design';\n\n<div className=\"flex gap-3\">\n <Skeleton.Avatar size={48} />\n <div className=\"flex-1\">\n <Skeleton.Text lines={3} />\n </div>\n</div>"
|
|
932
|
+
},
|
|
933
|
+
{
|
|
934
|
+
"variant": "Box",
|
|
935
|
+
"code": "import {Skeleton} from '@staffbase/design';\n\n<Skeleton.Box className=\"aspect-4/3 h-20\" />\n<Skeleton.Box className=\"size-16\" />\n<Skeleton.Box className=\"h-[40px] w-[400px]\" />"
|
|
936
|
+
}
|
|
937
|
+
]
|
|
938
|
+
},
|
|
939
|
+
{
|
|
940
|
+
"name": "StyleChip",
|
|
941
|
+
"category": "Components",
|
|
942
|
+
"description": "Style chips display a short label, often used to indicate file types or formats.",
|
|
943
|
+
"figmaUrl": "",
|
|
944
|
+
"sourcePath": "packages/design/src/components/styleChip",
|
|
945
|
+
"docPage": "components/style-chip",
|
|
946
|
+
"deprecated": false,
|
|
947
|
+
"compoundMembers": [],
|
|
948
|
+
"examples": [
|
|
949
|
+
{
|
|
950
|
+
"variant": "default",
|
|
951
|
+
"code": "import {StyleChip} from '@staffbase/design';\n\n<StyleChip>PNG</StyleChip>\n<StyleChip>JPG</StyleChip>\n<StyleChip>PDF</StyleChip>\n<StyleChip>SVG</StyleChip>"
|
|
952
|
+
}
|
|
953
|
+
]
|
|
954
|
+
},
|
|
955
|
+
{
|
|
956
|
+
"name": "Switch",
|
|
957
|
+
"category": "Components",
|
|
958
|
+
"description": "Switches toggle a single setting on or off. The change takes effect immediately.",
|
|
959
|
+
"figmaUrl": "https://www.figma.com/design/jKlhl09SG2Mk7SWLievNvM/%F0%9F%A7%B0-Design-System-Components?node-id=3443-147140",
|
|
960
|
+
"sourcePath": "packages/design/src/components/switch",
|
|
961
|
+
"docPage": "components/switch",
|
|
962
|
+
"deprecated": false,
|
|
963
|
+
"compoundMembers": [],
|
|
964
|
+
"examples": [
|
|
965
|
+
{
|
|
966
|
+
"variant": "default",
|
|
967
|
+
"code": "import {Field, Switch} from '@staffbase/design';\n\n<Field.Root className=\"flex gap-2\">\n <Switch />\n <div>\n <Field.Label>Enable notifications</Field.Label>\n <Field.Description>Receive updates via email.</Field.Description>\n </div>\n</Field.Root>"
|
|
968
|
+
}
|
|
969
|
+
]
|
|
970
|
+
},
|
|
971
|
+
{
|
|
972
|
+
"name": "Tabs",
|
|
973
|
+
"category": "Components",
|
|
974
|
+
"description": "Tabs organise content into separate views, allowing the user to switch between them.",
|
|
975
|
+
"figmaUrl": "https://www.figma.com/design/jKlhl09SG2Mk7SWLievNvM/%F0%9F%A7%B0-Design-System-Components?node-id=840-16383",
|
|
976
|
+
"sourcePath": "packages/design/src/components/tabs",
|
|
977
|
+
"docPage": "components/tabs",
|
|
978
|
+
"deprecated": false,
|
|
979
|
+
"compoundMembers": [
|
|
980
|
+
{
|
|
981
|
+
"name": "Root",
|
|
982
|
+
"signature": "ForwardRefExoticComponent<Omit<RadixTabs.TabsProps & RefAttributes<HTMLDivElement>, \"ref\"> & RefAttributes<HTMLDivElement>>"
|
|
983
|
+
},
|
|
984
|
+
{
|
|
985
|
+
"name": "List",
|
|
986
|
+
"signature": "ForwardRefExoticComponent<Omit<RadixTabs.TabsListProps & RefAttributes<HTMLDivElement>, \"ref\"> & RefAttributes<HTMLDivElement>>"
|
|
987
|
+
},
|
|
988
|
+
{
|
|
989
|
+
"name": "Trigger",
|
|
990
|
+
"signature": "ForwardRefExoticComponent<Omit<RadixTabs.TabsTriggerProps & RefAttributes<HTMLButtonElement>, \"ref\"> & RefAttributes<HTMLButtonElement>>"
|
|
991
|
+
},
|
|
992
|
+
{
|
|
993
|
+
"name": "Content",
|
|
994
|
+
"signature": "ForwardRefExoticComponent<Omit<RadixTabs.TabsContentProps & RefAttributes<HTMLDivElement>, \"ref\"> & RefAttributes<HTMLDivElement>>"
|
|
995
|
+
}
|
|
996
|
+
],
|
|
997
|
+
"examples": [
|
|
998
|
+
{
|
|
999
|
+
"variant": "default",
|
|
1000
|
+
"code": "import {Tabs} from '@staffbase/design';\n\n<Tabs.Root defaultValue=\"tab1\">\n <Tabs.List className=\"mb-4\">\n <Tabs.Trigger value=\"tab1\">Tab Item 1</Tabs.Trigger>\n <Tabs.Trigger value=\"tab2\">Tab Item 2</Tabs.Trigger>\n <Tabs.Trigger value=\"tab3\">Tab Item 3</Tabs.Trigger>\n </Tabs.List>\n <Tabs.Content value=\"tab1\">Tab Content 1</Tabs.Content>\n <Tabs.Content value=\"tab2\">Tab Content 2</Tabs.Content>\n <Tabs.Content value=\"tab3\">Tab Content 3</Tabs.Content>\n</Tabs.Root>"
|
|
1001
|
+
}
|
|
1002
|
+
]
|
|
1003
|
+
},
|
|
1004
|
+
{
|
|
1005
|
+
"name": "TextArea",
|
|
1006
|
+
"category": "Components",
|
|
1007
|
+
"description": "Text areas allow the user to enter multi-line text, such as comments or descriptions.",
|
|
1008
|
+
"figmaUrl": "https://www.figma.com/design/jKlhl09SG2Mk7SWLievNvM/%F0%9F%A7%B0-Design-System-Components?node-id=33071-5911",
|
|
1009
|
+
"sourcePath": "packages/design/src/components/textArea",
|
|
1010
|
+
"docPage": "components/text-area",
|
|
1011
|
+
"deprecated": false,
|
|
1012
|
+
"compoundMembers": [],
|
|
1013
|
+
"examples": [
|
|
1014
|
+
{
|
|
1015
|
+
"variant": "default",
|
|
1016
|
+
"code": "import {Field, TextArea} from '@staffbase/design';\n\n<Field.Root className=\"w-[400px]\">\n <Field.Label>Description</Field.Label>\n <Field.Description>Enter a brief description.</Field.Description>\n <TextArea rows={4} />\n</Field.Root>"
|
|
1017
|
+
},
|
|
1018
|
+
{
|
|
1019
|
+
"variant": "Invalid",
|
|
1020
|
+
"code": "import {Field, TextArea} from '@staffbase/design';\n\n<Field.Root invalid className=\"w-[400px]\">\n <Field.Label>Description</Field.Label>\n <TextArea />\n <Field.Error match>This field is required.</Field.Error>\n</Field.Root>"
|
|
1021
|
+
}
|
|
1022
|
+
]
|
|
1023
|
+
},
|
|
1024
|
+
{
|
|
1025
|
+
"name": "TextAreaDeprecated",
|
|
1026
|
+
"category": "Other",
|
|
1027
|
+
"deprecated": true,
|
|
1028
|
+
"compoundMembers": [],
|
|
1029
|
+
"propsInterface": "export declare interface TextAreaDeprecatedProps extends Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'onChange' | 'maxLength'> {\r\n label: string;\r\n inputId?: string;\r\n description?: string;\r\n handleValueChange?: (event: ChangeEvent<HTMLTextAreaElement>) => void;\r\n errorAriaLive?: 'off' | 'assertive' | 'polite' | undefined;\r\n errorMessage?: string;\r\n limit?: number;\r\n resizable?: boolean;\r\n requiredLabel?: string;\r\n}",
|
|
1030
|
+
"examples": []
|
|
1031
|
+
},
|
|
1032
|
+
{
|
|
1033
|
+
"name": "TextField",
|
|
1034
|
+
"category": "Components",
|
|
1035
|
+
"description": "Text fields let the user enter a single line of text, such as a name or email address.",
|
|
1036
|
+
"figmaUrl": "https://www.figma.com/design/jKlhl09SG2Mk7SWLievNvM/%F0%9F%A7%B0-Design-System-Components?node-id=784-13824",
|
|
1037
|
+
"sourcePath": "packages/design/src/components/textField",
|
|
1038
|
+
"docPage": "components/text-field",
|
|
1039
|
+
"deprecated": false,
|
|
1040
|
+
"compoundMembers": [],
|
|
1041
|
+
"examples": [
|
|
1042
|
+
{
|
|
1043
|
+
"variant": "default",
|
|
1044
|
+
"code": "import {Field, TextField} from '@staffbase/design';\n\n<Field.Root className=\"max-w-[300px]\">\n <Field.Label>Name</Field.Label>\n <Field.Description>Enter your full name.</Field.Description>\n <TextField />\n</Field.Root>"
|
|
1045
|
+
},
|
|
1046
|
+
{
|
|
1047
|
+
"variant": "With icons",
|
|
1048
|
+
"code": "import {Field, HomeIcon, TextField} from '@staffbase/design';\n\n<Field.Root className=\"max-w-[300px]\">\n <Field.Label>Address</Field.Label>\n <TextField leadingIcon={<HomeIcon />} />\n</Field.Root>"
|
|
1049
|
+
},
|
|
1050
|
+
{
|
|
1051
|
+
"variant": "Invalid",
|
|
1052
|
+
"code": "import {Field, TextField} from '@staffbase/design';\n\n<Field.Root invalid className=\"max-w-[300px]\">\n <Field.Label>Email</Field.Label>\n <TextField />\n <Field.Error match>Enter a valid email address.</Field.Error>\n</Field.Root>"
|
|
1053
|
+
}
|
|
1054
|
+
]
|
|
1055
|
+
},
|
|
1056
|
+
{
|
|
1057
|
+
"name": "TextInput",
|
|
1058
|
+
"category": "Other",
|
|
1059
|
+
"deprecated": true,
|
|
1060
|
+
"replacement": "TextField",
|
|
1061
|
+
"compoundMembers": [],
|
|
1062
|
+
"propsInterface": "export declare interface TextInputProps extends InputHTMLAttributes<HTMLInputElement> {\r\n /**\r\n * Label shown above the input field\r\n */\r\n label: string;\r\n /**\r\n * Sets the type of the input field.\r\n * @default 'text'\r\n */\r\n type?: 'email' | 'url' | 'text' | 'password' | 'search' | 'time';\r\n /**\r\n * Optional Icon to be shown inside the input field\r\n */\r\n icon?: ReactElement<SVGAttributes<SVGElement>>;\r\n /**\r\n * Controls the position of the icon at the beginning or the end of the input field (optional)\r\n * @default 'leading'\r\n */\r\n iconPosition?: 'trailing' | 'leading';\r\n /**\r\n * Optional input id\r\n */\r\n id?: string;\r\n /**\r\n * Optional required attribute that appears after the `label`\r\n */\r\n requiredLabel?: string;\r\n /**\r\n * Optional description to be shown below the input field\r\n */\r\n description?: string;\r\n /**\r\n * Error message to be shown as hint below the input field\r\n */\r\n errorMessage?: string;\r\n /**\r\n * Optional ghost variant\r\n */\r\n variant?: 'default' | 'ghost';\r\n}",
|
|
1063
|
+
"examples": []
|
|
1064
|
+
},
|
|
1065
|
+
{
|
|
1066
|
+
"name": "Toggle",
|
|
1067
|
+
"category": "Other",
|
|
1068
|
+
"deprecated": true,
|
|
1069
|
+
"replacement": "Switch",
|
|
1070
|
+
"compoundMembers": [],
|
|
1071
|
+
"propsInterface": "export declare interface ToggleProps {\r\n /**\r\n * Refers to the checked state of the toggle\r\n */\r\n checked?: boolean;\r\n /**\r\n * Disables the toggle, label and optional description\r\n */\r\n disabled?: boolean;\r\n /**\r\n * Optional description below the label\r\n */\r\n description?: string;\r\n /**\r\n * Required label of the toggle\r\n */\r\n label: string;\r\n /**\r\n * Sets or returns the value of the name attribute\r\n */\r\n name: string;\r\n /**\r\n * The event when the value of the toggle has been changed\r\n */\r\n onChange?: (e: ChangeEvent<HTMLInputElement>) => void;\r\n /**\r\n * The reference object of the toggle\r\n */\r\n ref?: RefObject<HTMLInputElement>;\r\n /**\r\n * Refers to space between the label and toggle and if true, it takes position to the end of the container\r\n */\r\n spaceBetween?: boolean;\r\n /**\r\n * Optional classname prop for styling\r\n */\r\n className?: string;\r\n}",
|
|
1072
|
+
"examples": []
|
|
1073
|
+
},
|
|
1074
|
+
{
|
|
1075
|
+
"name": "Tooltip",
|
|
1076
|
+
"category": "Components",
|
|
1077
|
+
"description": "Tooltips display a short label or description when the user hovers or focuses on an element.",
|
|
1078
|
+
"figmaUrl": "https://www.figma.com/design/jKlhl09SG2Mk7SWLievNvM/%F0%9F%A7%B0-Design-System-Components?node-id=817-24822",
|
|
1079
|
+
"sourcePath": "packages/design/src/components/tooltip",
|
|
1080
|
+
"docPage": "components/tooltip",
|
|
1081
|
+
"deprecated": false,
|
|
1082
|
+
"compoundMembers": [
|
|
1083
|
+
{
|
|
1084
|
+
"name": "Root",
|
|
1085
|
+
"signature": "(props: Tooltip_2.Root.Props) => JSX.Element"
|
|
1086
|
+
},
|
|
1087
|
+
{
|
|
1088
|
+
"name": "Content",
|
|
1089
|
+
"signature": "ForwardRefExoticComponent<Omit<TooltipContentProps, \"ref\"> & RefAttributes<HTMLDivElement>>"
|
|
1090
|
+
},
|
|
1091
|
+
{
|
|
1092
|
+
"name": "Trigger",
|
|
1093
|
+
"signature": "(props: TooltipTriggerProps) => JSX.Element"
|
|
1094
|
+
}
|
|
1095
|
+
],
|
|
1096
|
+
"examples": [
|
|
1097
|
+
{
|
|
1098
|
+
"variant": "default",
|
|
1099
|
+
"code": "import {Button, SettingsIcon, Tooltip} from '@staffbase/design';\n\n<Tooltip.Root>\n <Tooltip.Trigger>\n <Button variant=\"ghost\" color=\"neutral\" iconOnly aria-label=\"Settings\"><SettingsIcon /></Button>\n </Tooltip.Trigger>\n <Tooltip.Content is=\"label\" side=\"bottom\">\n Settings\n </Tooltip.Content>\n</Tooltip.Root>"
|
|
1100
|
+
}
|
|
1101
|
+
]
|
|
1102
|
+
},
|
|
1103
|
+
{
|
|
1104
|
+
"name": "TooltipDeprecated",
|
|
1105
|
+
"category": "Other",
|
|
1106
|
+
"deprecated": true,
|
|
1107
|
+
"replacement": "Tooltip",
|
|
1108
|
+
"compoundMembers": [],
|
|
1109
|
+
"examples": []
|
|
1110
|
+
},
|
|
1111
|
+
{
|
|
1112
|
+
"name": "useActionMenuContext",
|
|
1113
|
+
"category": "Other",
|
|
1114
|
+
"deprecated": false,
|
|
1115
|
+
"compoundMembers": [],
|
|
1116
|
+
"examples": []
|
|
1117
|
+
}
|
|
1118
|
+
]
|