@atlaskit/ads-mcp 0.0.1
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/CHANGELOG.md +1 -0
- package/LICENSE.md +11 -0
- package/README.md +29 -0
- package/build/tsconfig.json +17 -0
- package/dist/cjs/index.js +95 -0
- package/dist/cjs/instructions.js +7 -0
- package/dist/cjs/schema.js +11 -0
- package/dist/cjs/tools/get-component-details/index.js +88 -0
- package/dist/cjs/tools/get-components/components.js +2044 -0
- package/dist/cjs/tools/get-components/index.js +56 -0
- package/dist/cjs/tools/get-icons/index.js +64 -0
- package/dist/cjs/tools/get-tokens/index.js +50 -0
- package/dist/cjs/tools/get-tokens/tokens.js +778 -0
- package/dist/es2019/index.js +49 -0
- package/dist/es2019/instructions.js +5 -0
- package/dist/es2019/schema.js +13 -0
- package/dist/es2019/tools/get-component-details/index.js +51 -0
- package/dist/es2019/tools/get-components/components.js +2941 -0
- package/dist/es2019/tools/get-components/index.js +32 -0
- package/dist/es2019/tools/get-icons/index.js +45 -0
- package/dist/es2019/tools/get-tokens/index.js +31 -0
- package/dist/es2019/tools/get-tokens/tokens.js +772 -0
- package/dist/esm/index.js +92 -0
- package/dist/esm/instructions.js +1 -0
- package/dist/esm/schema.js +4 -0
- package/dist/esm/tools/get-component-details/index.js +81 -0
- package/dist/esm/tools/get-components/components.js +2038 -0
- package/dist/esm/tools/get-components/index.js +49 -0
- package/dist/esm/tools/get-icons/index.js +57 -0
- package/dist/esm/tools/get-tokens/index.js +43 -0
- package/dist/esm/tools/get-tokens/tokens.js +772 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/instructions.d.ts +1 -0
- package/dist/types/schema.d.ts +9 -0
- package/dist/types/tools/get-component-details/index.d.ts +39 -0
- package/dist/types/tools/get-components/components.d.ts +20 -0
- package/dist/types/tools/get-components/index.d.ts +23 -0
- package/dist/types/tools/get-icons/index.d.ts +23 -0
- package/dist/types/tools/get-tokens/index.d.ts +23 -0
- package/dist/types/tools/get-tokens/tokens.d.ts +15 -0
- package/dist/types-ts4.5/index.d.ts +1 -0
- package/dist/types-ts4.5/instructions.d.ts +1 -0
- package/dist/types-ts4.5/schema.d.ts +15 -0
- package/dist/types-ts4.5/tools/get-component-details/index.d.ts +39 -0
- package/dist/types-ts4.5/tools/get-components/components.d.ts +20 -0
- package/dist/types-ts4.5/tools/get-components/index.d.ts +23 -0
- package/dist/types-ts4.5/tools/get-icons/index.d.ts +23 -0
- package/dist/types-ts4.5/tools/get-tokens/index.d.ts +23 -0
- package/dist/types-ts4.5/tools/get-tokens/tokens.d.ts +15 -0
- package/index.js +5 -0
- package/package.json +43 -0
- package/src/index.tsx +70 -0
- package/src/instructions.tsx +5 -0
- package/src/schema.tsx +19 -0
- package/src/tools/get-component-details/index.tsx +64 -0
- package/src/tools/get-components/components.tsx +3477 -0
- package/src/tools/get-components/index.tsx +36 -0
- package/src/tools/get-icons/index.tsx +49 -0
- package/src/tools/get-tokens/index.tsx +35 -0
- package/src/tools/get-tokens/tokens.tsx +726 -0
- package/tsconfig.app.json +42 -0
- package/tsconfig.dev.json +38 -0
- package/tsconfig.json +14 -0
|
@@ -0,0 +1,2941 @@
|
|
|
1
|
+
export const components = [{
|
|
2
|
+
name: 'Button',
|
|
3
|
+
packageName: '@atlaskit/button/new',
|
|
4
|
+
description: 'A versatile button component with multiple appearances and states.',
|
|
5
|
+
releasePhase: 'general_availability',
|
|
6
|
+
category: 'Forms and Input',
|
|
7
|
+
example: `import Button from '@atlaskit/button/new';
|
|
8
|
+
import CopyIcon from '@atlaskit/icon/core/copy';
|
|
9
|
+
import AddIcon from '@atlaskit/icon/core/add';
|
|
10
|
+
|
|
11
|
+
<Button appearance="success" iconAfter={AddIcon}>Create</Button>
|
|
12
|
+
<Button appearance="primary" iconBefore={CopyIcon}>Copy text</Button>`,
|
|
13
|
+
props: [{
|
|
14
|
+
name: 'appearance',
|
|
15
|
+
description: 'Visual style of the button',
|
|
16
|
+
type: "'default' | 'danger' | 'primary' | 'subtle' | 'warning' | 'discovery'"
|
|
17
|
+
}, {
|
|
18
|
+
name: 'spacing',
|
|
19
|
+
description: 'Spacing around the button',
|
|
20
|
+
type: "'compact' | 'default'"
|
|
21
|
+
}, {
|
|
22
|
+
name: 'isLoading',
|
|
23
|
+
description: 'Loading state',
|
|
24
|
+
type: 'boolean'
|
|
25
|
+
}, {
|
|
26
|
+
name: 'isDisabled',
|
|
27
|
+
description: 'Disabled state',
|
|
28
|
+
type: 'boolean'
|
|
29
|
+
}, {
|
|
30
|
+
name: 'isSelected',
|
|
31
|
+
description: 'Selected state',
|
|
32
|
+
type: 'boolean'
|
|
33
|
+
}, {
|
|
34
|
+
name: 'iconBefore',
|
|
35
|
+
description: 'Icon component to display before text',
|
|
36
|
+
type: 'IconProp'
|
|
37
|
+
}, {
|
|
38
|
+
name: 'iconAfter',
|
|
39
|
+
description: 'Icon component to display after text',
|
|
40
|
+
type: 'IconProp'
|
|
41
|
+
}, {
|
|
42
|
+
name: 'onClick',
|
|
43
|
+
description: 'Click handler with analytics event data',
|
|
44
|
+
type: '(e: MouseEvent, analyticsEvent: UIAnalyticsEvent) => void'
|
|
45
|
+
}]
|
|
46
|
+
}, {
|
|
47
|
+
name: 'IconButton',
|
|
48
|
+
packageName: '@atlaskit/button/new',
|
|
49
|
+
description: 'A button that displays only an icon with an optional tooltip.',
|
|
50
|
+
releasePhase: 'general_availability',
|
|
51
|
+
category: 'Forms and Input',
|
|
52
|
+
example: `import { IconButton } from '@atlaskit/button/new';
|
|
53
|
+
import EditIcon from '@atlaskit/icon/core/edit';
|
|
54
|
+
import AddIcon from '@atlaskit/icon/core/add';
|
|
55
|
+
|
|
56
|
+
// Default icon button
|
|
57
|
+
<IconButton icon={EditIcon} label="Edit" />
|
|
58
|
+
|
|
59
|
+
// Primary appearance with tooltip
|
|
60
|
+
<IconButton
|
|
61
|
+
appearance="primary"
|
|
62
|
+
icon={AddIcon}
|
|
63
|
+
label="Create page"
|
|
64
|
+
isTooltipDisabled={false}
|
|
65
|
+
/>
|
|
66
|
+
|
|
67
|
+
// Circle shape with custom icon color
|
|
68
|
+
<IconButton
|
|
69
|
+
shape="circle"
|
|
70
|
+
icon={(iconProps) => (
|
|
71
|
+
<StarIcon
|
|
72
|
+
{...iconProps}
|
|
73
|
+
primaryColor={token('color.icon.accent.orange')}
|
|
74
|
+
/>
|
|
75
|
+
)}
|
|
76
|
+
label="Add to favorites"
|
|
77
|
+
/>`,
|
|
78
|
+
props: [{
|
|
79
|
+
name: 'icon',
|
|
80
|
+
description: 'Icon component to display',
|
|
81
|
+
type: 'IconProp | ((props: IconProps) => ReactNode)'
|
|
82
|
+
}, {
|
|
83
|
+
name: 'label',
|
|
84
|
+
description: 'Accessible label and tooltip content',
|
|
85
|
+
type: 'string'
|
|
86
|
+
}, {
|
|
87
|
+
name: 'appearance',
|
|
88
|
+
description: 'Visual style of the button',
|
|
89
|
+
type: "'default' | 'primary' | 'subtle'"
|
|
90
|
+
}, {
|
|
91
|
+
name: 'shape',
|
|
92
|
+
description: 'Shape of the button',
|
|
93
|
+
type: "'default' | 'circle'"
|
|
94
|
+
}, {
|
|
95
|
+
name: 'isTooltipDisabled',
|
|
96
|
+
description: 'Whether to disable the tooltip',
|
|
97
|
+
type: 'boolean'
|
|
98
|
+
}, {
|
|
99
|
+
name: 'spacing',
|
|
100
|
+
description: 'Button spacing',
|
|
101
|
+
type: "'default' | 'compact'"
|
|
102
|
+
}]
|
|
103
|
+
}, {
|
|
104
|
+
name: 'SplitButton',
|
|
105
|
+
packageName: '@atlaskit/button/new',
|
|
106
|
+
description: 'A button that splits into a primary action and a dropdown menu.',
|
|
107
|
+
releasePhase: 'general_availability',
|
|
108
|
+
category: 'Forms and Input',
|
|
109
|
+
example: `import Button, { IconButton, SplitButton } from '@atlaskit/button/new';
|
|
110
|
+
import DropdownMenu, { DropdownItem, DropdownItemGroup } from '@atlaskit/dropdown-menu';
|
|
111
|
+
import ChevronDownIcon from '@atlaskit/icon/core/chevron-down';
|
|
112
|
+
|
|
113
|
+
// Default split button
|
|
114
|
+
<SplitButton>
|
|
115
|
+
<Button>Link work item</Button>
|
|
116
|
+
<DropdownMenu<HTMLButtonElement>
|
|
117
|
+
shouldRenderToParent
|
|
118
|
+
trigger={({ triggerRef, ...triggerProps }) => (
|
|
119
|
+
<IconButton
|
|
120
|
+
ref={triggerRef}
|
|
121
|
+
{...triggerProps}
|
|
122
|
+
icon={ChevronDownIcon}
|
|
123
|
+
label="More link work item options"
|
|
124
|
+
/>
|
|
125
|
+
)}
|
|
126
|
+
>
|
|
127
|
+
<DropdownItemGroup>
|
|
128
|
+
<DropdownItem>Option one</DropdownItem>
|
|
129
|
+
<DropdownItem>Option two</DropdownItem>
|
|
130
|
+
</DropdownItemGroup>
|
|
131
|
+
</DropdownMenu>
|
|
132
|
+
</SplitButton>
|
|
133
|
+
|
|
134
|
+
// Primary appearance
|
|
135
|
+
<SplitButton appearance="primary">
|
|
136
|
+
<Button>Update</Button>
|
|
137
|
+
<DropdownMenu<HTMLButtonElement>
|
|
138
|
+
shouldRenderToParent
|
|
139
|
+
trigger={({ triggerRef, ...triggerProps }) => (
|
|
140
|
+
<IconButton
|
|
141
|
+
ref={triggerRef}
|
|
142
|
+
{...triggerProps}
|
|
143
|
+
icon={ChevronDownIcon}
|
|
144
|
+
label="More update options"
|
|
145
|
+
/>
|
|
146
|
+
)}
|
|
147
|
+
>
|
|
148
|
+
<DropdownItemGroup>
|
|
149
|
+
<DropdownItem>Option one</DropdownItem>
|
|
150
|
+
<DropdownItem>Option two</DropdownItem>
|
|
151
|
+
</DropdownItemGroup>
|
|
152
|
+
</DropdownMenu>
|
|
153
|
+
</SplitButton>`,
|
|
154
|
+
props: [{
|
|
155
|
+
name: 'appearance',
|
|
156
|
+
description: 'The style variation for child buttons',
|
|
157
|
+
type: "'default' | 'primary'"
|
|
158
|
+
}, {
|
|
159
|
+
name: 'spacing',
|
|
160
|
+
description: 'Controls the amount of padding in the child buttons',
|
|
161
|
+
type: "'default' | 'compact'"
|
|
162
|
+
}, {
|
|
163
|
+
name: 'isDisabled',
|
|
164
|
+
description: 'Whether all child buttons should be disabled',
|
|
165
|
+
type: 'boolean'
|
|
166
|
+
}, {
|
|
167
|
+
name: 'children',
|
|
168
|
+
description: 'Primary action button and secondary action button/dropdown',
|
|
169
|
+
type: 'ReactNode'
|
|
170
|
+
}]
|
|
171
|
+
}, {
|
|
172
|
+
name: 'LinkButton',
|
|
173
|
+
packageName: '@atlaskit/button/new',
|
|
174
|
+
description: 'A button that renders as an anchor tag for navigation.',
|
|
175
|
+
releasePhase: 'general_availability',
|
|
176
|
+
category: 'Forms and Input',
|
|
177
|
+
example: `import { LinkButton } from '@atlaskit/button/new';
|
|
178
|
+
import AddIcon from '@atlaskit/icon/core/add';
|
|
179
|
+
|
|
180
|
+
// Default link button
|
|
181
|
+
<LinkButton href="https://atlassian.com/">Default Link button</LinkButton>
|
|
182
|
+
|
|
183
|
+
// Primary appearance with icon
|
|
184
|
+
<LinkButton
|
|
185
|
+
appearance="primary"
|
|
186
|
+
href="https://atlassian.com/"
|
|
187
|
+
iconBefore={AddIcon}
|
|
188
|
+
>
|
|
189
|
+
Primary link button
|
|
190
|
+
</LinkButton>
|
|
191
|
+
|
|
192
|
+
// Subtle appearance with target blank
|
|
193
|
+
<LinkButton
|
|
194
|
+
appearance="subtle"
|
|
195
|
+
href="https://atlassian.com/"
|
|
196
|
+
target="_blank"
|
|
197
|
+
>
|
|
198
|
+
Opens in new window
|
|
199
|
+
</LinkButton>
|
|
200
|
+
|
|
201
|
+
// With router configuration
|
|
202
|
+
<LinkButton<MyRouterLinkConfig>
|
|
203
|
+
href={{
|
|
204
|
+
to: '/about',
|
|
205
|
+
replace: true,
|
|
206
|
+
}}
|
|
207
|
+
>
|
|
208
|
+
Router link
|
|
209
|
+
</LinkButton>`,
|
|
210
|
+
props: [{
|
|
211
|
+
name: 'href',
|
|
212
|
+
description: 'URL or router configuration object',
|
|
213
|
+
type: 'string | RouterLinkConfig'
|
|
214
|
+
}, {
|
|
215
|
+
name: 'appearance',
|
|
216
|
+
description: 'Visual style of the button',
|
|
217
|
+
type: "'default' | 'primary' | 'subtle' | 'warning' | 'danger'"
|
|
218
|
+
}, {
|
|
219
|
+
name: 'target',
|
|
220
|
+
description: 'Link target attribute',
|
|
221
|
+
type: 'string'
|
|
222
|
+
}, {
|
|
223
|
+
name: 'isDisabled',
|
|
224
|
+
description: 'Disabled state (removes href and adds aria-disabled)',
|
|
225
|
+
type: 'boolean'
|
|
226
|
+
}, {
|
|
227
|
+
name: 'iconBefore',
|
|
228
|
+
description: 'Icon component to display before text',
|
|
229
|
+
type: 'IconProp'
|
|
230
|
+
}, {
|
|
231
|
+
name: 'iconAfter',
|
|
232
|
+
description: 'Icon component to display after text',
|
|
233
|
+
type: 'IconProp'
|
|
234
|
+
}]
|
|
235
|
+
}, {
|
|
236
|
+
name: 'ButtonGroup',
|
|
237
|
+
packageName: '@atlaskit/button',
|
|
238
|
+
description: 'A component for grouping related buttons together.',
|
|
239
|
+
releasePhase: 'general_availability',
|
|
240
|
+
category: 'Forms and Input',
|
|
241
|
+
example: `import Button, { ButtonGroup } from '@atlaskit/button/new';
|
|
242
|
+
import AudioIcon from '@atlaskit/icon/core/audio';
|
|
243
|
+
|
|
244
|
+
// Default button group
|
|
245
|
+
<ButtonGroup>
|
|
246
|
+
<Button>First button</Button>
|
|
247
|
+
<Button>Second button</Button>
|
|
248
|
+
<Button>Third button</Button>
|
|
249
|
+
</ButtonGroup>
|
|
250
|
+
|
|
251
|
+
// Button group with primary appearance
|
|
252
|
+
<ButtonGroup>
|
|
253
|
+
<Button appearance="primary">Save</Button>
|
|
254
|
+
<Button appearance="primary">Edit</Button>
|
|
255
|
+
<Button appearance="primary">Delete</Button>
|
|
256
|
+
</ButtonGroup>
|
|
257
|
+
|
|
258
|
+
// Button group with mixed button types
|
|
259
|
+
<ButtonGroup>
|
|
260
|
+
<Button>Default</Button>
|
|
261
|
+
<Button appearance="primary">Primary</Button>
|
|
262
|
+
<Button appearance="warning">Warning</Button>
|
|
263
|
+
<Button appearance="danger">Error</Button>
|
|
264
|
+
</ButtonGroup>
|
|
265
|
+
|
|
266
|
+
// Button group with icons
|
|
267
|
+
<ButtonGroup>
|
|
268
|
+
<Button>Good times</Button>
|
|
269
|
+
<Button iconAfter={AudioIcon}>Boogie</Button>
|
|
270
|
+
<Button iconAfter={AudioIcon}>Boogie more</Button>
|
|
271
|
+
</ButtonGroup>`,
|
|
272
|
+
props: [{
|
|
273
|
+
name: 'children',
|
|
274
|
+
description: 'The buttons to be grouped together',
|
|
275
|
+
type: 'ReactNode'
|
|
276
|
+
}, {
|
|
277
|
+
name: 'label',
|
|
278
|
+
description: 'Accessible label for the button group',
|
|
279
|
+
type: 'string'
|
|
280
|
+
}, {
|
|
281
|
+
name: 'appearance',
|
|
282
|
+
description: 'The appearance to apply to all buttons in the group',
|
|
283
|
+
type: "'default' | 'primary' | 'warning' | 'danger'"
|
|
284
|
+
}, {
|
|
285
|
+
name: 'titleId',
|
|
286
|
+
description: 'ID of the heading that labels this group',
|
|
287
|
+
type: 'string'
|
|
288
|
+
}]
|
|
289
|
+
}, {
|
|
290
|
+
name: 'Checkbox',
|
|
291
|
+
packageName: '@atlaskit/checkbox',
|
|
292
|
+
description: 'A checkbox input component with label support.',
|
|
293
|
+
releasePhase: 'general_availability',
|
|
294
|
+
category: 'Forms and Input',
|
|
295
|
+
example: `import { Checkbox } from '@atlaskit/checkbox';
|
|
296
|
+
|
|
297
|
+
// Default checkbox
|
|
298
|
+
<Checkbox
|
|
299
|
+
value="default"
|
|
300
|
+
label="Default checkbox"
|
|
301
|
+
onChange={event => console.log(event.target.checked)}
|
|
302
|
+
name="checkbox-default"
|
|
303
|
+
/>
|
|
304
|
+
|
|
305
|
+
// Controlled checkbox
|
|
306
|
+
const [isChecked, setIsChecked] = useState(true);
|
|
307
|
+
<Checkbox
|
|
308
|
+
isChecked={isChecked}
|
|
309
|
+
onChange={event => setIsChecked(event.target.checked)}
|
|
310
|
+
label={\`Controlled checkbox: \${isChecked}\`}
|
|
311
|
+
value="controlled"
|
|
312
|
+
name="checkbox-controlled"
|
|
313
|
+
/>
|
|
314
|
+
|
|
315
|
+
// Uncontrolled with default checked
|
|
316
|
+
<Checkbox
|
|
317
|
+
defaultChecked
|
|
318
|
+
label="Checked by default"
|
|
319
|
+
value="default-checked"
|
|
320
|
+
onChange={onChange}
|
|
321
|
+
name="checkbox-default-checked"
|
|
322
|
+
/>
|
|
323
|
+
|
|
324
|
+
// Disabled state
|
|
325
|
+
<Checkbox
|
|
326
|
+
isDisabled
|
|
327
|
+
label="Disabled checkbox"
|
|
328
|
+
value="disabled"
|
|
329
|
+
name="checkbox-disabled"
|
|
330
|
+
/>
|
|
331
|
+
|
|
332
|
+
// Invalid state
|
|
333
|
+
<Checkbox
|
|
334
|
+
isInvalid
|
|
335
|
+
label="Invalid checkbox"
|
|
336
|
+
value="invalid"
|
|
337
|
+
name="checkbox-invalid"
|
|
338
|
+
/>
|
|
339
|
+
|
|
340
|
+
// Indeterminate state
|
|
341
|
+
<Checkbox
|
|
342
|
+
isIndeterminate
|
|
343
|
+
label="Indeterminate checkbox"
|
|
344
|
+
value="indeterminate"
|
|
345
|
+
name="checkbox-indeterminate"
|
|
346
|
+
/>`,
|
|
347
|
+
props: [{
|
|
348
|
+
name: 'label',
|
|
349
|
+
description: 'Text label for the checkbox',
|
|
350
|
+
type: 'string'
|
|
351
|
+
}, {
|
|
352
|
+
name: 'value',
|
|
353
|
+
description: 'Value of the checkbox when checked',
|
|
354
|
+
type: 'string'
|
|
355
|
+
}, {
|
|
356
|
+
name: 'name',
|
|
357
|
+
description: 'Name attribute of the input element',
|
|
358
|
+
type: 'string'
|
|
359
|
+
}, {
|
|
360
|
+
name: 'isChecked',
|
|
361
|
+
description: 'Controlled checked state',
|
|
362
|
+
type: 'boolean'
|
|
363
|
+
}, {
|
|
364
|
+
name: 'defaultChecked',
|
|
365
|
+
description: 'Initial checked state for uncontrolled component',
|
|
366
|
+
type: 'boolean'
|
|
367
|
+
}, {
|
|
368
|
+
name: 'isDisabled',
|
|
369
|
+
description: 'Whether the checkbox is disabled',
|
|
370
|
+
type: 'boolean'
|
|
371
|
+
}, {
|
|
372
|
+
name: 'isInvalid',
|
|
373
|
+
description: 'Whether the checkbox shows an error state',
|
|
374
|
+
type: 'boolean'
|
|
375
|
+
}, {
|
|
376
|
+
name: 'isIndeterminate',
|
|
377
|
+
description: 'Whether the checkbox is in an indeterminate state',
|
|
378
|
+
type: 'boolean'
|
|
379
|
+
}, {
|
|
380
|
+
name: 'onChange',
|
|
381
|
+
description: 'Handler called when the checked state changes',
|
|
382
|
+
type: '(event: ChangeEvent<HTMLInputElement>) => void'
|
|
383
|
+
}]
|
|
384
|
+
}, {
|
|
385
|
+
name: 'Radio',
|
|
386
|
+
packageName: '@atlaskit/radio',
|
|
387
|
+
description: 'A radio input component for selecting a single option from a list.',
|
|
388
|
+
releasePhase: 'general_availability',
|
|
389
|
+
category: 'Forms and Input',
|
|
390
|
+
example: `import { Radio, RadioGroup } from '@atlaskit/radio';
|
|
391
|
+
|
|
392
|
+
// Single radio button
|
|
393
|
+
<Radio
|
|
394
|
+
value="default"
|
|
395
|
+
label="Default radio"
|
|
396
|
+
name="radio-default"
|
|
397
|
+
isChecked={true}
|
|
398
|
+
onChange={event => console.log(event.target.checked)}
|
|
399
|
+
/>
|
|
400
|
+
|
|
401
|
+
// Radio group with options
|
|
402
|
+
const options = [
|
|
403
|
+
{ name: 'color', value: 'red', label: 'Red' },
|
|
404
|
+
{ name: 'color', value: 'blue', label: 'Blue' },
|
|
405
|
+
{ name: 'color', value: 'yellow', label: 'Yellow' },
|
|
406
|
+
{ name: 'color', value: 'green', label: 'Green' },
|
|
407
|
+
{ name: 'color', value: 'black', label: 'Black' },
|
|
408
|
+
];
|
|
409
|
+
|
|
410
|
+
<RadioGroup
|
|
411
|
+
options={options}
|
|
412
|
+
defaultValue="blue"
|
|
413
|
+
onChange={event => console.log(event.currentTarget.value)}
|
|
414
|
+
/>
|
|
415
|
+
|
|
416
|
+
// Controlled radio group
|
|
417
|
+
const [value, setValue] = useState('red');
|
|
418
|
+
<RadioGroup
|
|
419
|
+
options={options}
|
|
420
|
+
value={value}
|
|
421
|
+
onChange={event => setValue(event.currentTarget.value)}
|
|
422
|
+
/>
|
|
423
|
+
|
|
424
|
+
// Disabled radio
|
|
425
|
+
<Radio
|
|
426
|
+
value="disabled"
|
|
427
|
+
label="Disabled radio"
|
|
428
|
+
name="radio-disabled"
|
|
429
|
+
isDisabled={true}
|
|
430
|
+
onChange={onChange}
|
|
431
|
+
/>
|
|
432
|
+
|
|
433
|
+
// Invalid radio
|
|
434
|
+
<Radio
|
|
435
|
+
value="invalid"
|
|
436
|
+
label="Invalid radio"
|
|
437
|
+
name="radio-invalid"
|
|
438
|
+
isInvalid={true}
|
|
439
|
+
onChange={onChange}
|
|
440
|
+
/>`,
|
|
441
|
+
props: [{
|
|
442
|
+
name: 'value',
|
|
443
|
+
description: 'Value of the radio input',
|
|
444
|
+
type: 'string'
|
|
445
|
+
}, {
|
|
446
|
+
name: 'label',
|
|
447
|
+
description: 'Label text for the radio input',
|
|
448
|
+
type: 'string'
|
|
449
|
+
}, {
|
|
450
|
+
name: 'name',
|
|
451
|
+
description: 'Name attribute of the input element',
|
|
452
|
+
type: 'string'
|
|
453
|
+
}, {
|
|
454
|
+
name: 'isChecked',
|
|
455
|
+
description: 'Whether the radio is checked',
|
|
456
|
+
type: 'boolean'
|
|
457
|
+
}, {
|
|
458
|
+
name: 'isDisabled',
|
|
459
|
+
description: 'Whether the radio is disabled',
|
|
460
|
+
type: 'boolean'
|
|
461
|
+
}, {
|
|
462
|
+
name: 'isInvalid',
|
|
463
|
+
description: 'Whether the radio shows an error state',
|
|
464
|
+
type: 'boolean'
|
|
465
|
+
}, {
|
|
466
|
+
name: 'isRequired',
|
|
467
|
+
description: 'Whether the radio is required in a form',
|
|
468
|
+
type: 'boolean'
|
|
469
|
+
}, {
|
|
470
|
+
name: 'onChange',
|
|
471
|
+
description: 'Handler called when the radio selection changes',
|
|
472
|
+
type: '(event: ChangeEvent<HTMLInputElement>) => void'
|
|
473
|
+
}]
|
|
474
|
+
}, {
|
|
475
|
+
name: 'Select',
|
|
476
|
+
packageName: '@atlaskit/select',
|
|
477
|
+
description: 'A flexible select component for single and multi-selection.',
|
|
478
|
+
releasePhase: 'general_availability',
|
|
479
|
+
category: 'Forms and Input',
|
|
480
|
+
example: `import Select, { CheckboxSelect, CountrySelect } from '@atlaskit/select';
|
|
481
|
+
|
|
482
|
+
// Single select
|
|
483
|
+
<Select
|
|
484
|
+
inputId="single-select"
|
|
485
|
+
options={[
|
|
486
|
+
{ label: 'Adelaide', value: 'adelaide' },
|
|
487
|
+
{ label: 'Brisbane', value: 'brisbane' },
|
|
488
|
+
{ label: 'Canberra', value: 'canberra' },
|
|
489
|
+
{ label: 'Darwin', value: 'darwin' },
|
|
490
|
+
{ label: 'Melbourne', value: 'melbourne' },
|
|
491
|
+
]}
|
|
492
|
+
placeholder="Choose a city"
|
|
493
|
+
/>
|
|
494
|
+
|
|
495
|
+
// Multi select
|
|
496
|
+
<Select
|
|
497
|
+
inputId="multi-select"
|
|
498
|
+
options={[
|
|
499
|
+
{ label: 'Red', value: 'red' },
|
|
500
|
+
{ label: 'Blue', value: 'blue' },
|
|
501
|
+
{ label: 'Yellow', value: 'yellow' },
|
|
502
|
+
{ label: 'Green', value: 'green' },
|
|
503
|
+
]}
|
|
504
|
+
isMulti
|
|
505
|
+
placeholder="Choose colors"
|
|
506
|
+
/>
|
|
507
|
+
|
|
508
|
+
// Grouped options
|
|
509
|
+
<Select
|
|
510
|
+
inputId="grouped-select"
|
|
511
|
+
options={[
|
|
512
|
+
{
|
|
513
|
+
label: 'New South Wales',
|
|
514
|
+
options: [
|
|
515
|
+
{ label: 'Sydney', value: 's' },
|
|
516
|
+
{ label: 'Newcastle', value: 'n' },
|
|
517
|
+
],
|
|
518
|
+
},
|
|
519
|
+
{
|
|
520
|
+
label: 'Queensland',
|
|
521
|
+
options: [
|
|
522
|
+
{ label: 'Brisbane', value: 'b' },
|
|
523
|
+
{ label: 'Gold Coast', value: 'g' },
|
|
524
|
+
],
|
|
525
|
+
},
|
|
526
|
+
]}
|
|
527
|
+
placeholder="Choose a city"
|
|
528
|
+
/>
|
|
529
|
+
|
|
530
|
+
// Checkbox select
|
|
531
|
+
<CheckboxSelect
|
|
532
|
+
inputId="checkbox-select"
|
|
533
|
+
options={[
|
|
534
|
+
{ label: 'Option 1', value: '1' },
|
|
535
|
+
{ label: 'Option 2', value: '2' },
|
|
536
|
+
{ label: 'Option 3', value: '3' },
|
|
537
|
+
]}
|
|
538
|
+
placeholder="Select options"
|
|
539
|
+
/>
|
|
540
|
+
|
|
541
|
+
// Country select
|
|
542
|
+
<CountrySelect
|
|
543
|
+
inputId="country-select"
|
|
544
|
+
placeholder="Choose a country"
|
|
545
|
+
/>`,
|
|
546
|
+
props: [{
|
|
547
|
+
name: 'options',
|
|
548
|
+
description: 'Array of options to display in the dropdown',
|
|
549
|
+
type: 'Array<{ label: string; value: string; isDisabled?: boolean }> | Array<{ label: string; options: Array<{ label: string; value: string }> }>'
|
|
550
|
+
}, {
|
|
551
|
+
name: 'value',
|
|
552
|
+
description: 'The selected value(s)',
|
|
553
|
+
type: 'Option | Option[] | null'
|
|
554
|
+
}, {
|
|
555
|
+
name: 'defaultValue',
|
|
556
|
+
description: 'The default selected value(s)',
|
|
557
|
+
type: 'Option | Option[] | null'
|
|
558
|
+
}, {
|
|
559
|
+
name: 'isMulti',
|
|
560
|
+
description: 'Allow multiple selections',
|
|
561
|
+
type: 'boolean'
|
|
562
|
+
}, {
|
|
563
|
+
name: 'isDisabled',
|
|
564
|
+
description: 'Disable the select',
|
|
565
|
+
type: 'boolean'
|
|
566
|
+
}, {
|
|
567
|
+
name: 'isLoading',
|
|
568
|
+
description: 'Show loading state',
|
|
569
|
+
type: 'boolean'
|
|
570
|
+
}, {
|
|
571
|
+
name: 'isClearable',
|
|
572
|
+
description: 'Allow clearing of selected value',
|
|
573
|
+
type: 'boolean'
|
|
574
|
+
}, {
|
|
575
|
+
name: 'isSearchable',
|
|
576
|
+
description: 'Allow filtering of options',
|
|
577
|
+
type: 'boolean'
|
|
578
|
+
}, {
|
|
579
|
+
name: 'placeholder',
|
|
580
|
+
description: 'Placeholder text',
|
|
581
|
+
type: 'string'
|
|
582
|
+
}, {
|
|
583
|
+
name: 'onChange',
|
|
584
|
+
description: 'Handler for value changes',
|
|
585
|
+
type: '(value: Option | Option[] | null) => void'
|
|
586
|
+
}, {
|
|
587
|
+
name: 'appearance',
|
|
588
|
+
description: 'Visual style of the select',
|
|
589
|
+
type: "'default' | 'subtle' | 'none'"
|
|
590
|
+
}, {
|
|
591
|
+
name: 'formatOptionLabel',
|
|
592
|
+
description: 'Custom option label renderer',
|
|
593
|
+
type: '(data: Option, formatOptionLabelMeta: FormatOptionLabelMeta) => ReactNode',
|
|
594
|
+
exampleValue: '(option, meta) => <span style={{ color: option.color }}>{option.label} ({meta.context})</span>'
|
|
595
|
+
}, {
|
|
596
|
+
name: 'noOptionsMessage',
|
|
597
|
+
description: 'Custom no options message',
|
|
598
|
+
type: '(obj: { inputValue: string }) => ReactNode',
|
|
599
|
+
exampleValue: '({ inputValue }) => <em>No results found for "{inputValue}"</em>'
|
|
600
|
+
}]
|
|
601
|
+
}, {
|
|
602
|
+
name: 'DateTimePicker',
|
|
603
|
+
packageName: '@atlaskit/datetime-picker',
|
|
604
|
+
description: 'A component for selecting both date and time values.',
|
|
605
|
+
releasePhase: 'general_availability',
|
|
606
|
+
category: 'Forms and Input',
|
|
607
|
+
example: `import { DateTimePicker } from '@atlaskit/datetime-picker';
|
|
608
|
+
import { Label } from '@atlaskit/form';
|
|
609
|
+
|
|
610
|
+
// Basic usage
|
|
611
|
+
<>
|
|
612
|
+
<Label htmlFor="datetime">Appointment date and time</Label>
|
|
613
|
+
<DateTimePicker
|
|
614
|
+
id="datetime"
|
|
615
|
+
clearControlLabel="Clear appointment"
|
|
616
|
+
datePickerProps={{
|
|
617
|
+
shouldShowCalendarButton: true,
|
|
618
|
+
label: 'Appointment date'
|
|
619
|
+
}}
|
|
620
|
+
timePickerProps={{ label: 'Appointment time' }}
|
|
621
|
+
/>
|
|
622
|
+
</>
|
|
623
|
+
|
|
624
|
+
// With form validation
|
|
625
|
+
<Form onSubmit={formState => console.log('form submitted', formState)}>
|
|
626
|
+
{({ formProps }) => (
|
|
627
|
+
<form {...formProps}>
|
|
628
|
+
<Field name="datetime-picker" label="Scheduled run time" isRequired>
|
|
629
|
+
{({ fieldProps }) => (
|
|
630
|
+
<DateTimePicker
|
|
631
|
+
{...fieldProps}
|
|
632
|
+
clearControlLabel="Clear scheduled run time"
|
|
633
|
+
datePickerProps={{
|
|
634
|
+
shouldShowCalendarButton: true,
|
|
635
|
+
label: 'Scheduled run time, date'
|
|
636
|
+
}}
|
|
637
|
+
timePickerProps={{ label: 'Scheduled run time, time' }}
|
|
638
|
+
/>
|
|
639
|
+
)}
|
|
640
|
+
</Field>
|
|
641
|
+
</form>
|
|
642
|
+
)}
|
|
643
|
+
</Form>
|
|
644
|
+
|
|
645
|
+
// With custom formatting
|
|
646
|
+
<DateTimePicker
|
|
647
|
+
datePickerProps={{
|
|
648
|
+
dateFormat: 'YYYY-MM-DD',
|
|
649
|
+
placeholder: '2021-06-10',
|
|
650
|
+
shouldShowCalendarButton: true,
|
|
651
|
+
label: 'Date'
|
|
652
|
+
}}
|
|
653
|
+
timePickerProps={{
|
|
654
|
+
timeFormat: 'HH:mm',
|
|
655
|
+
placeholder: '13:30',
|
|
656
|
+
label: 'Time'
|
|
657
|
+
}}
|
|
658
|
+
clearControlLabel="Clear date and time"
|
|
659
|
+
/>`,
|
|
660
|
+
props: [{
|
|
661
|
+
name: 'datePickerProps',
|
|
662
|
+
description: 'Props to be passed to the DatePicker component',
|
|
663
|
+
type: 'DatePickerProps'
|
|
664
|
+
}, {
|
|
665
|
+
name: 'timePickerProps',
|
|
666
|
+
description: 'Props to be passed to the TimePicker component',
|
|
667
|
+
type: 'TimePickerProps'
|
|
668
|
+
}, {
|
|
669
|
+
name: 'value',
|
|
670
|
+
description: 'The current value in ISO format',
|
|
671
|
+
type: 'string'
|
|
672
|
+
}, {
|
|
673
|
+
name: 'defaultValue',
|
|
674
|
+
description: 'The default value in ISO format',
|
|
675
|
+
type: 'string'
|
|
676
|
+
}, {
|
|
677
|
+
name: 'onChange',
|
|
678
|
+
description: 'Callback when the value changes',
|
|
679
|
+
type: '(value: string | null) => void'
|
|
680
|
+
}, {
|
|
681
|
+
name: 'isDisabled',
|
|
682
|
+
description: 'Whether the input is disabled',
|
|
683
|
+
type: 'boolean'
|
|
684
|
+
}, {
|
|
685
|
+
name: 'locale',
|
|
686
|
+
description: 'The locale to use for formatting',
|
|
687
|
+
type: 'string'
|
|
688
|
+
}, {
|
|
689
|
+
name: 'clearControlLabel',
|
|
690
|
+
description: 'Aria label for the clear button',
|
|
691
|
+
type: 'string'
|
|
692
|
+
}]
|
|
693
|
+
}, {
|
|
694
|
+
name: 'FocusRing',
|
|
695
|
+
packageName: '@atlaskit/focus-ring',
|
|
696
|
+
description: 'A utility component for managing focus styles.',
|
|
697
|
+
releasePhase: 'general_availability',
|
|
698
|
+
category: 'Forms and Input',
|
|
699
|
+
example: `import FocusRing from '@atlaskit/focus-ring';
|
|
700
|
+
|
|
701
|
+
<FocusRing>
|
|
702
|
+
<button>Focusable element</button>
|
|
703
|
+
</FocusRing>`,
|
|
704
|
+
props: []
|
|
705
|
+
}, {
|
|
706
|
+
name: 'Form',
|
|
707
|
+
packageName: '@atlaskit/form',
|
|
708
|
+
description: 'A component for building forms with validation and state management.',
|
|
709
|
+
releasePhase: 'general_availability',
|
|
710
|
+
category: 'Forms and Input',
|
|
711
|
+
example: `import Form, { Field, FormFooter, FormHeader, FormSection, HelperMessage, ErrorMessage } from '@atlaskit/form';
|
|
712
|
+
import Button from '@atlaskit/button/new';
|
|
713
|
+
import TextField from '@atlaskit/textfield';
|
|
714
|
+
import { Checkbox } from '@atlaskit/checkbox';
|
|
715
|
+
|
|
716
|
+
// Basic form with validation
|
|
717
|
+
<Form onSubmit={data => console.log('form data', data)}>
|
|
718
|
+
{({ formProps }) => (
|
|
719
|
+
<form {...formProps}>
|
|
720
|
+
<FormHeader title="Sign in">
|
|
721
|
+
<p>Required fields are marked with an asterisk *</p>
|
|
722
|
+
</FormHeader>
|
|
723
|
+
|
|
724
|
+
<FormSection>
|
|
725
|
+
<Field name="username" label="Username" isRequired>
|
|
726
|
+
{({ fieldProps, error }) => (
|
|
727
|
+
<>
|
|
728
|
+
<TextField autoComplete="username" {...fieldProps} />
|
|
729
|
+
{!error && <HelperMessage>You can use letters, numbers & periods.</HelperMessage>}
|
|
730
|
+
{error && <ErrorMessage>This username is already in use.</ErrorMessage>}
|
|
731
|
+
</>
|
|
732
|
+
)}
|
|
733
|
+
</Field>
|
|
734
|
+
|
|
735
|
+
<Field
|
|
736
|
+
name="password"
|
|
737
|
+
label="Password"
|
|
738
|
+
isRequired
|
|
739
|
+
validate={value => (value && value.length < 8 ? 'TOO_SHORT' : undefined)}
|
|
740
|
+
>
|
|
741
|
+
{({ fieldProps, error, valid }) => (
|
|
742
|
+
<>
|
|
743
|
+
<TextField type="password" {...fieldProps} />
|
|
744
|
+
{!error && !valid && (
|
|
745
|
+
<HelperMessage>
|
|
746
|
+
Use 8 or more characters with letters, numbers & symbols.
|
|
747
|
+
</HelperMessage>
|
|
748
|
+
)}
|
|
749
|
+
{error && <ErrorMessage>Password must be at least 8 characters.</ErrorMessage>}
|
|
750
|
+
</>
|
|
751
|
+
)}
|
|
752
|
+
</Field>
|
|
753
|
+
|
|
754
|
+
<Field name="remember" defaultValue={false}>
|
|
755
|
+
{({ fieldProps }) => (
|
|
756
|
+
<Checkbox {...fieldProps} label="Remember me" />
|
|
757
|
+
)}
|
|
758
|
+
</Field>
|
|
759
|
+
</FormSection>
|
|
760
|
+
|
|
761
|
+
<FormFooter>
|
|
762
|
+
<Button type="submit" appearance="primary">Sign in</Button>
|
|
763
|
+
</FormFooter>
|
|
764
|
+
</form>
|
|
765
|
+
)}
|
|
766
|
+
</Form>`,
|
|
767
|
+
props: [{
|
|
768
|
+
name: 'onSubmit',
|
|
769
|
+
description: 'Callback when the form is submitted with valid data',
|
|
770
|
+
type: '(data: FormData) => void | Promise<void | { [key: string]: string }>'
|
|
771
|
+
}, {
|
|
772
|
+
name: 'children',
|
|
773
|
+
description: 'Render prop that provides form state and helpers',
|
|
774
|
+
type: '(renderProps: FormRenderProps) => ReactNode'
|
|
775
|
+
}, {
|
|
776
|
+
name: 'defaultValues',
|
|
777
|
+
description: 'Initial values for form fields',
|
|
778
|
+
type: 'FormData'
|
|
779
|
+
}, {
|
|
780
|
+
name: 'onValidate',
|
|
781
|
+
description: 'Custom validation function for the entire form',
|
|
782
|
+
type: '(data: FormData) => void | { [key: string]: string }'
|
|
783
|
+
}, {
|
|
784
|
+
name: 'shouldValidateOnBlur',
|
|
785
|
+
description: 'Whether to validate fields when they lose focus',
|
|
786
|
+
type: 'boolean'
|
|
787
|
+
}, {
|
|
788
|
+
name: 'shouldValidateOnChange',
|
|
789
|
+
description: 'Whether to validate fields as they change',
|
|
790
|
+
type: 'boolean'
|
|
791
|
+
}]
|
|
792
|
+
}, {
|
|
793
|
+
name: 'Range',
|
|
794
|
+
packageName: '@atlaskit/range',
|
|
795
|
+
description: 'A component for selecting a value from a range of values.',
|
|
796
|
+
releasePhase: 'general_availability',
|
|
797
|
+
category: 'Forms and Input',
|
|
798
|
+
example: `import Range from '@atlaskit/range';
|
|
799
|
+
|
|
800
|
+
<Range
|
|
801
|
+
value={50}
|
|
802
|
+
min={0}
|
|
803
|
+
max={100}
|
|
804
|
+
step={1}
|
|
805
|
+
onChange={value => console.log(value)}
|
|
806
|
+
/>`,
|
|
807
|
+
props: []
|
|
808
|
+
}, {
|
|
809
|
+
name: 'TextArea',
|
|
810
|
+
packageName: '@atlaskit/textarea',
|
|
811
|
+
description: 'A component for entering multi-line text input.',
|
|
812
|
+
releasePhase: 'general_availability',
|
|
813
|
+
category: 'Forms and Input',
|
|
814
|
+
example: `import TextArea from '@atlaskit/textarea';
|
|
815
|
+
|
|
816
|
+
<TextArea
|
|
817
|
+
placeholder="Enter text here"
|
|
818
|
+
resize="auto"
|
|
819
|
+
maxHeight="20vh"
|
|
820
|
+
name="area"
|
|
821
|
+
defaultValue="Add a message here"
|
|
822
|
+
/>`,
|
|
823
|
+
props: []
|
|
824
|
+
}, {
|
|
825
|
+
name: 'TextField',
|
|
826
|
+
packageName: '@atlaskit/textfield',
|
|
827
|
+
description: 'A single-line text input component.',
|
|
828
|
+
releasePhase: 'general_availability',
|
|
829
|
+
category: 'Forms and Input',
|
|
830
|
+
example: `import TextField from '@atlaskit/textfield';
|
|
831
|
+
|
|
832
|
+
<TextField
|
|
833
|
+
value="Text content"
|
|
834
|
+
onChange={(e) => console.log(e.target.value)}
|
|
835
|
+
/>`,
|
|
836
|
+
props: [{
|
|
837
|
+
name: 'value',
|
|
838
|
+
description: 'Text content',
|
|
839
|
+
type: 'string'
|
|
840
|
+
}, {
|
|
841
|
+
name: 'onChange',
|
|
842
|
+
description: 'Change handler',
|
|
843
|
+
type: '(e: ChangeEvent) => void'
|
|
844
|
+
}, {
|
|
845
|
+
name: 'isDisabled',
|
|
846
|
+
description: 'Disabled state',
|
|
847
|
+
type: 'boolean'
|
|
848
|
+
}, {
|
|
849
|
+
name: 'isRequired',
|
|
850
|
+
description: 'Required field',
|
|
851
|
+
type: 'boolean'
|
|
852
|
+
}, {
|
|
853
|
+
name: 'type',
|
|
854
|
+
description: 'Input type',
|
|
855
|
+
type: 'string'
|
|
856
|
+
}]
|
|
857
|
+
}, {
|
|
858
|
+
name: 'Toggle',
|
|
859
|
+
packageName: '@atlaskit/toggle',
|
|
860
|
+
description: 'A toggle switch component.',
|
|
861
|
+
releasePhase: 'general_availability',
|
|
862
|
+
category: 'Forms and Input',
|
|
863
|
+
example: `import Toggle from '@atlaskit/toggle';
|
|
864
|
+
|
|
865
|
+
<Toggle
|
|
866
|
+
id="toggle-1"
|
|
867
|
+
label="Toggle switch"
|
|
868
|
+
onChange={(event) => console.log(event.target.checked)}
|
|
869
|
+
isChecked={false}
|
|
870
|
+
/>`,
|
|
871
|
+
props: [{
|
|
872
|
+
name: 'id',
|
|
873
|
+
description: 'Unique identifier for the toggle',
|
|
874
|
+
type: 'string'
|
|
875
|
+
}, {
|
|
876
|
+
name: 'label',
|
|
877
|
+
description: 'Label for the toggle',
|
|
878
|
+
type: 'string'
|
|
879
|
+
}, {
|
|
880
|
+
name: 'onChange',
|
|
881
|
+
description: 'Change handler',
|
|
882
|
+
type: '(event: ChangeEvent) => void'
|
|
883
|
+
}, {
|
|
884
|
+
name: 'isChecked',
|
|
885
|
+
description: 'Checked state',
|
|
886
|
+
type: 'boolean'
|
|
887
|
+
}]
|
|
888
|
+
}, {
|
|
889
|
+
name: 'Avatar',
|
|
890
|
+
packageName: '@atlaskit/avatar',
|
|
891
|
+
description: 'A component for displaying user avatars with support for images, initials, and status indicators.',
|
|
892
|
+
releasePhase: 'general_availability',
|
|
893
|
+
category: 'Images and Icons',
|
|
894
|
+
example: `import Avatar from '@atlaskit/avatar';
|
|
895
|
+
|
|
896
|
+
<Avatar
|
|
897
|
+
src="https://example.com/avatar.jpg"
|
|
898
|
+
status="online"
|
|
899
|
+
size="large"
|
|
900
|
+
/>`,
|
|
901
|
+
props: [{
|
|
902
|
+
name: 'appearance',
|
|
903
|
+
description: 'Shape of the avatar',
|
|
904
|
+
type: "'circle' | 'square'"
|
|
905
|
+
}, {
|
|
906
|
+
name: 'size',
|
|
907
|
+
description: 'Size of the avatar',
|
|
908
|
+
type: "'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge'"
|
|
909
|
+
}, {
|
|
910
|
+
name: 'presence',
|
|
911
|
+
description: 'Presence indicator',
|
|
912
|
+
type: "'online' | 'busy' | 'focus' | 'offline' | ReactNode"
|
|
913
|
+
}, {
|
|
914
|
+
name: 'status',
|
|
915
|
+
description: 'Status indicator',
|
|
916
|
+
type: "'approved' | 'declined' | 'locked' | ReactNode"
|
|
917
|
+
}]
|
|
918
|
+
}, {
|
|
919
|
+
name: 'AvatarGroup',
|
|
920
|
+
packageName: '@atlaskit/avatar-group',
|
|
921
|
+
description: 'A component for displaying multiple avatars in a group with overlap and overflow handling.',
|
|
922
|
+
releasePhase: 'general_availability',
|
|
923
|
+
category: 'Images and Icons',
|
|
924
|
+
example: `import AvatarGroup from '@atlaskit/avatar-group';
|
|
925
|
+
|
|
926
|
+
<AvatarGroup
|
|
927
|
+
avatars={[
|
|
928
|
+
{ src: 'avatar1.jpg', name: 'User 1' },
|
|
929
|
+
{ src: 'avatar2.jpg', name: 'User 2' },
|
|
930
|
+
{ src: 'avatar3.jpg', name: 'User 3' }
|
|
931
|
+
]}
|
|
932
|
+
maxCount={3}
|
|
933
|
+
/>`,
|
|
934
|
+
props: [{
|
|
935
|
+
name: 'avatars',
|
|
936
|
+
description: 'Array of avatar objects',
|
|
937
|
+
type: 'Array<{ src: string, name: string }>'
|
|
938
|
+
}, {
|
|
939
|
+
name: 'maxCount',
|
|
940
|
+
description: 'Maximum number of avatars to show',
|
|
941
|
+
type: 'number'
|
|
942
|
+
}, {
|
|
943
|
+
name: 'size',
|
|
944
|
+
description: 'Size of avatars',
|
|
945
|
+
type: "'small' | 'medium' | 'large' | 'xlarge'"
|
|
946
|
+
}, {
|
|
947
|
+
name: 'showMoreButtonProps',
|
|
948
|
+
description: 'Props for overflow button',
|
|
949
|
+
type: 'object'
|
|
950
|
+
}]
|
|
951
|
+
}, {
|
|
952
|
+
name: 'Icon',
|
|
953
|
+
packageName: '@atlaskit/icon',
|
|
954
|
+
description: "These the new icons are part of Atlassian's visual refresh. Please use the Icon explorer to see the list of hundreds of icons and their purposes in full detail.",
|
|
955
|
+
releasePhase: 'beta',
|
|
956
|
+
category: 'Images and Icons',
|
|
957
|
+
example: `import AddIcon from '@atlaskit/icon/core/add';
|
|
958
|
+
import CopyIcon from '@atlaskit/icon/core/copy';
|
|
959
|
+
import EditIcon from '@atlaskit/icon/core/edit';
|
|
960
|
+
import TrashIcon from '@atlaskit/icon/core/trash';
|
|
961
|
+
import StarIcon from '@atlaskit/icon/core/star';
|
|
962
|
+
import CommentIcon from '@atlaskit/icon/core/comment';
|
|
963
|
+
|
|
964
|
+
// Basic usage
|
|
965
|
+
<AddIcon label="Add" />
|
|
966
|
+
<CopyIcon label="Copy" />
|
|
967
|
+
<EditIcon label="Edit" />
|
|
968
|
+
|
|
969
|
+
// With different sizes
|
|
970
|
+
<TrashIcon label="Delete" size="small" />
|
|
971
|
+
<StarIcon label="Star" size="medium" />
|
|
972
|
+
<CommentIcon label="Comment" size="large" />`,
|
|
973
|
+
props: [{
|
|
974
|
+
name: 'label',
|
|
975
|
+
description: 'Accessibility label for the icon',
|
|
976
|
+
type: 'string'
|
|
977
|
+
}, {
|
|
978
|
+
name: 'size',
|
|
979
|
+
description: 'Size of the icon',
|
|
980
|
+
type: "'small' | 'medium' | 'large'"
|
|
981
|
+
}, {
|
|
982
|
+
name: 'primaryColor',
|
|
983
|
+
description: 'Primary color of the icon',
|
|
984
|
+
type: 'string'
|
|
985
|
+
}, {
|
|
986
|
+
name: 'secondaryColor',
|
|
987
|
+
description: 'Secondary color of the icon',
|
|
988
|
+
type: 'string'
|
|
989
|
+
}, {
|
|
990
|
+
name: 'testId',
|
|
991
|
+
description: 'Test ID for automated testing',
|
|
992
|
+
type: 'string'
|
|
993
|
+
}]
|
|
994
|
+
}, {
|
|
995
|
+
name: 'Image',
|
|
996
|
+
packageName: '@atlaskit/image',
|
|
997
|
+
description: "A component for displaying images with theme support. This component is in Beta phase, meaning it's stable at version 1.0+ but may receive improvements based on customer feedback. Breaking changes will only be made in major releases.",
|
|
998
|
+
releasePhase: 'beta',
|
|
999
|
+
category: 'Images and Icons',
|
|
1000
|
+
example: `import Image from '@atlaskit/image';
|
|
1001
|
+
|
|
1002
|
+
<Image
|
|
1003
|
+
src="image-url"
|
|
1004
|
+
alt="Image description"
|
|
1005
|
+
width={200}
|
|
1006
|
+
height={200}
|
|
1007
|
+
testId="image-test"
|
|
1008
|
+
/>`,
|
|
1009
|
+
props: [{
|
|
1010
|
+
name: 'src',
|
|
1011
|
+
description: 'URL of the image',
|
|
1012
|
+
type: 'string'
|
|
1013
|
+
}, {
|
|
1014
|
+
name: 'alt',
|
|
1015
|
+
description: 'Alternative text for the image',
|
|
1016
|
+
type: 'string'
|
|
1017
|
+
}, {
|
|
1018
|
+
name: 'width',
|
|
1019
|
+
description: 'Width of the image in pixels',
|
|
1020
|
+
type: 'number'
|
|
1021
|
+
}, {
|
|
1022
|
+
name: 'height',
|
|
1023
|
+
description: 'Height of the image in pixels',
|
|
1024
|
+
type: 'number'
|
|
1025
|
+
}, {
|
|
1026
|
+
name: 'testId',
|
|
1027
|
+
description: 'Test ID for automated testing',
|
|
1028
|
+
type: 'string'
|
|
1029
|
+
}]
|
|
1030
|
+
}, {
|
|
1031
|
+
name: 'PageHeader',
|
|
1032
|
+
packageName: '@atlaskit/page-header',
|
|
1033
|
+
description: 'A component for page headers.',
|
|
1034
|
+
releasePhase: 'general_availability',
|
|
1035
|
+
category: 'Layout and Structure',
|
|
1036
|
+
example: `import PageHeader from '@atlaskit/page-header';
|
|
1037
|
+
|
|
1038
|
+
<PageHeader
|
|
1039
|
+
breadcrumbs={<Breadcrumbs />}
|
|
1040
|
+
actions={<Actions />}
|
|
1041
|
+
bottomBar={<BottomBar />}
|
|
1042
|
+
testId="page-header-test"
|
|
1043
|
+
>
|
|
1044
|
+
Page Title
|
|
1045
|
+
</PageHeader>`,
|
|
1046
|
+
props: [{
|
|
1047
|
+
name: 'breadcrumbs',
|
|
1048
|
+
description: 'Breadcrumb navigation',
|
|
1049
|
+
type: 'ReactNode'
|
|
1050
|
+
}, {
|
|
1051
|
+
name: 'actions',
|
|
1052
|
+
description: 'Actions to display in the header',
|
|
1053
|
+
type: 'ReactNode'
|
|
1054
|
+
}, {
|
|
1055
|
+
name: 'bottomBar',
|
|
1056
|
+
description: 'Content to display in the bottom bar',
|
|
1057
|
+
type: 'ReactNode'
|
|
1058
|
+
}, {
|
|
1059
|
+
name: 'children',
|
|
1060
|
+
description: 'The title of the page',
|
|
1061
|
+
type: 'ReactNode'
|
|
1062
|
+
}, {
|
|
1063
|
+
name: 'testId',
|
|
1064
|
+
description: 'A unique string that appears as a data attribute data-testid in the rendered code',
|
|
1065
|
+
type: 'string'
|
|
1066
|
+
}]
|
|
1067
|
+
}, {
|
|
1068
|
+
name: 'ProgressBar',
|
|
1069
|
+
packageName: '@atlaskit/progress-bar',
|
|
1070
|
+
description: 'A component for displaying progress.',
|
|
1071
|
+
releasePhase: 'general_availability',
|
|
1072
|
+
category: 'Loading',
|
|
1073
|
+
example: `import ProgressBar from '@atlaskit/progress-bar';
|
|
1074
|
+
|
|
1075
|
+
<ProgressBar
|
|
1076
|
+
value={0.5}
|
|
1077
|
+
isIndeterminate={false}
|
|
1078
|
+
appearance="default"
|
|
1079
|
+
ariaLabel="Loading progress"
|
|
1080
|
+
testId="progress-bar-test"
|
|
1081
|
+
/>`,
|
|
1082
|
+
props: [{
|
|
1083
|
+
name: 'value',
|
|
1084
|
+
description: 'Sets the value of the progress bar, between 0 and 1 inclusive',
|
|
1085
|
+
type: 'number'
|
|
1086
|
+
}, {
|
|
1087
|
+
name: 'isIndeterminate',
|
|
1088
|
+
description: 'Shows the progress bar in an indeterminate state when true',
|
|
1089
|
+
type: 'boolean'
|
|
1090
|
+
}, {
|
|
1091
|
+
name: 'appearance',
|
|
1092
|
+
description: 'The visual style of the progress bar',
|
|
1093
|
+
type: "'default' | 'success' | 'inverse'"
|
|
1094
|
+
}, {
|
|
1095
|
+
name: 'ariaLabel',
|
|
1096
|
+
description: 'Descriptive label associated with the progress bar for accessibility',
|
|
1097
|
+
type: 'string'
|
|
1098
|
+
}, {
|
|
1099
|
+
name: 'testId',
|
|
1100
|
+
description: 'A unique string that appears as a data attribute data-testid in the rendered code',
|
|
1101
|
+
type: 'string'
|
|
1102
|
+
}]
|
|
1103
|
+
}, {
|
|
1104
|
+
name: 'Spinner',
|
|
1105
|
+
packageName: '@atlaskit/spinner',
|
|
1106
|
+
description: 'A loading spinner component.',
|
|
1107
|
+
releasePhase: 'general_availability',
|
|
1108
|
+
category: 'Loading',
|
|
1109
|
+
example: `import Spinner from '@atlaskit/spinner';
|
|
1110
|
+
|
|
1111
|
+
<Spinner size="large" />`,
|
|
1112
|
+
props: [{
|
|
1113
|
+
name: 'size',
|
|
1114
|
+
description: 'Size of the spinner',
|
|
1115
|
+
type: "'small' | 'medium' | 'large'"
|
|
1116
|
+
}, {
|
|
1117
|
+
name: 'appearance',
|
|
1118
|
+
description: 'Visual style of the spinner',
|
|
1119
|
+
type: "'inherit' | 'invert'"
|
|
1120
|
+
}, {
|
|
1121
|
+
name: 'delay',
|
|
1122
|
+
description: 'Delay in milliseconds before showing the spinner',
|
|
1123
|
+
type: 'number'
|
|
1124
|
+
}]
|
|
1125
|
+
}, {
|
|
1126
|
+
name: 'Skeleton',
|
|
1127
|
+
packageName: '@atlaskit/skeleton',
|
|
1128
|
+
description: 'A loading placeholder component.',
|
|
1129
|
+
releasePhase: 'general_availability',
|
|
1130
|
+
category: 'Loading',
|
|
1131
|
+
example: `import Skeleton from '@atlaskit/skeleton';
|
|
1132
|
+
|
|
1133
|
+
<Skeleton height="20px" width="200px" />`,
|
|
1134
|
+
props: [{
|
|
1135
|
+
name: 'height',
|
|
1136
|
+
description: 'Height of the skeleton',
|
|
1137
|
+
type: 'string | number'
|
|
1138
|
+
}, {
|
|
1139
|
+
name: 'width',
|
|
1140
|
+
description: 'Width of the skeleton',
|
|
1141
|
+
type: 'string | number'
|
|
1142
|
+
}, {
|
|
1143
|
+
name: 'isShimmering',
|
|
1144
|
+
description: 'Enables the shimmer animation effect',
|
|
1145
|
+
type: 'boolean'
|
|
1146
|
+
}]
|
|
1147
|
+
}, {
|
|
1148
|
+
name: 'Banner',
|
|
1149
|
+
packageName: '@atlaskit/banner',
|
|
1150
|
+
description: 'A component for displaying important messages or announcements.',
|
|
1151
|
+
releasePhase: 'general_availability',
|
|
1152
|
+
category: 'Messaging',
|
|
1153
|
+
example: `import Banner from '@atlaskit/banner';
|
|
1154
|
+
|
|
1155
|
+
<Banner
|
|
1156
|
+
appearance="announcement"
|
|
1157
|
+
isOpen={true}
|
|
1158
|
+
icon={<Icon />}
|
|
1159
|
+
>
|
|
1160
|
+
Important announcement
|
|
1161
|
+
</Banner>`,
|
|
1162
|
+
props: [{
|
|
1163
|
+
name: 'appearance',
|
|
1164
|
+
description: 'Visual style of the banner',
|
|
1165
|
+
type: "'announcement' | 'error' | 'warning'"
|
|
1166
|
+
}, {
|
|
1167
|
+
name: 'isOpen',
|
|
1168
|
+
description: 'Control visibility',
|
|
1169
|
+
type: 'boolean'
|
|
1170
|
+
}, {
|
|
1171
|
+
name: 'icon',
|
|
1172
|
+
description: 'Optional icon',
|
|
1173
|
+
type: 'ReactNode'
|
|
1174
|
+
}, {
|
|
1175
|
+
name: 'children',
|
|
1176
|
+
description: 'Banner content',
|
|
1177
|
+
type: 'ReactNode'
|
|
1178
|
+
}]
|
|
1179
|
+
}, {
|
|
1180
|
+
name: 'Flag',
|
|
1181
|
+
packageName: '@atlaskit/flag',
|
|
1182
|
+
description: 'A component for displaying brief messages.',
|
|
1183
|
+
releasePhase: 'general_availability',
|
|
1184
|
+
category: 'Messaging',
|
|
1185
|
+
example: `import Flag, { FlagGroup } from '@atlaskit/flag';
|
|
1186
|
+
|
|
1187
|
+
<FlagGroup>
|
|
1188
|
+
<Flag
|
|
1189
|
+
id="flag-1"
|
|
1190
|
+
icon={<Icon label="Info" />}
|
|
1191
|
+
title="Flag Title"
|
|
1192
|
+
description="Flag description"
|
|
1193
|
+
actions={[
|
|
1194
|
+
{
|
|
1195
|
+
content: 'Action',
|
|
1196
|
+
onClick: () => {},
|
|
1197
|
+
testId: 'action-test'
|
|
1198
|
+
}
|
|
1199
|
+
]}
|
|
1200
|
+
appearance="normal"
|
|
1201
|
+
testId="flag-test"
|
|
1202
|
+
/>
|
|
1203
|
+
</FlagGroup>`,
|
|
1204
|
+
props: [{
|
|
1205
|
+
name: 'id',
|
|
1206
|
+
description: 'A unique identifier used for rendering and onDismissed callbacks',
|
|
1207
|
+
type: 'number | string'
|
|
1208
|
+
}, {
|
|
1209
|
+
name: 'icon',
|
|
1210
|
+
description: 'The icon displayed in the top-left of the flag. Should be an instance of @atlaskit/icon',
|
|
1211
|
+
type: 'ReactNode'
|
|
1212
|
+
}, {
|
|
1213
|
+
name: 'title',
|
|
1214
|
+
description: 'The bold text shown at the top of the flag',
|
|
1215
|
+
type: 'ReactNode'
|
|
1216
|
+
}, {
|
|
1217
|
+
name: 'description',
|
|
1218
|
+
description: 'The secondary content shown below the flag title',
|
|
1219
|
+
type: 'ReactNode'
|
|
1220
|
+
}, {
|
|
1221
|
+
name: 'actions',
|
|
1222
|
+
description: 'Array of clickable actions to be shown at the bottom of the flag',
|
|
1223
|
+
type: 'Array<{ content: ReactNode, onClick?: (e: React.MouseEvent<HTMLElement>, analyticsEvent: UIAnalyticsEvent) => void, href?: string, target?: string, testId?: string }>'
|
|
1224
|
+
}, {
|
|
1225
|
+
name: 'appearance',
|
|
1226
|
+
description: "Makes the flag appearance bold. Setting this to anything other than 'normal' hides the dismiss button",
|
|
1227
|
+
type: "'error' | 'info' | 'normal' | 'success' | 'warning'"
|
|
1228
|
+
}]
|
|
1229
|
+
}, {
|
|
1230
|
+
name: 'InlineMessage',
|
|
1231
|
+
packageName: '@atlaskit/inline-message',
|
|
1232
|
+
description: 'A component for displaying inline messages.',
|
|
1233
|
+
releasePhase: 'general_availability',
|
|
1234
|
+
category: 'Messaging',
|
|
1235
|
+
example: `import InlineMessage from '@atlaskit/inline-message';
|
|
1236
|
+
|
|
1237
|
+
<InlineMessage
|
|
1238
|
+
title="Inline Message Title"
|
|
1239
|
+
secondaryText="Secondary text"
|
|
1240
|
+
appearance="info"
|
|
1241
|
+
testId="inline-message-test"
|
|
1242
|
+
>
|
|
1243
|
+
<p>Content that appears in the dialog when opened</p>
|
|
1244
|
+
</InlineMessage>`,
|
|
1245
|
+
props: [{
|
|
1246
|
+
name: 'title',
|
|
1247
|
+
description: 'Text to display first, bolded for emphasis',
|
|
1248
|
+
type: 'ReactNode'
|
|
1249
|
+
}, {
|
|
1250
|
+
name: 'secondaryText',
|
|
1251
|
+
description: 'Text to display second',
|
|
1252
|
+
type: 'ReactNode'
|
|
1253
|
+
}, {
|
|
1254
|
+
name: 'appearance',
|
|
1255
|
+
description: 'Set the icon to be used before the title',
|
|
1256
|
+
type: "'connectivity' | 'confirmation' | 'info' | 'warning' | 'error'"
|
|
1257
|
+
}, {
|
|
1258
|
+
name: 'placement',
|
|
1259
|
+
description: 'The placement to be passed to the inline dialog',
|
|
1260
|
+
type: "'bottom-start' | 'bottom-center' | 'bottom-end' | 'top-start' | 'top-center' | 'top-end' | 'right-start' | 'right-center' | 'right-end' | 'left-start' | 'left-center' | 'left-end'"
|
|
1261
|
+
}]
|
|
1262
|
+
}, {
|
|
1263
|
+
name: 'Onboarding',
|
|
1264
|
+
packageName: '@atlaskit/onboarding',
|
|
1265
|
+
description: 'A component for feature onboarding.',
|
|
1266
|
+
releasePhase: 'general_availability',
|
|
1267
|
+
category: 'Messaging',
|
|
1268
|
+
example: `import { Spotlight } from '@atlaskit/onboarding';
|
|
1269
|
+
|
|
1270
|
+
<Spotlight
|
|
1271
|
+
target="target-element"
|
|
1272
|
+
content="Feature description"
|
|
1273
|
+
/>`,
|
|
1274
|
+
props: [{
|
|
1275
|
+
name: 'target',
|
|
1276
|
+
description: 'Target element ID',
|
|
1277
|
+
type: 'string'
|
|
1278
|
+
}, {
|
|
1279
|
+
name: 'content',
|
|
1280
|
+
description: 'Onboarding content',
|
|
1281
|
+
type: 'string'
|
|
1282
|
+
}, {
|
|
1283
|
+
name: 'actions',
|
|
1284
|
+
description: 'Action buttons',
|
|
1285
|
+
type: 'ReactNode[]'
|
|
1286
|
+
}]
|
|
1287
|
+
}, {
|
|
1288
|
+
name: 'SectionMessage',
|
|
1289
|
+
packageName: '@atlaskit/section-message',
|
|
1290
|
+
description: 'A component for section-level messages.',
|
|
1291
|
+
releasePhase: 'general_availability',
|
|
1292
|
+
category: 'Messaging',
|
|
1293
|
+
example: `import SectionMessage from '@atlaskit/section-message';
|
|
1294
|
+
|
|
1295
|
+
<SectionMessage
|
|
1296
|
+
appearance="information"
|
|
1297
|
+
title="Section Message Title"
|
|
1298
|
+
testId="section-message-test"
|
|
1299
|
+
>
|
|
1300
|
+
<p>Section message content</p>
|
|
1301
|
+
<SectionMessage.Actions>
|
|
1302
|
+
<SectionMessage.Action href="#">Action</SectionMessage.Action>
|
|
1303
|
+
</SectionMessage.Actions>
|
|
1304
|
+
</SectionMessage>`,
|
|
1305
|
+
props: [{
|
|
1306
|
+
name: 'appearance',
|
|
1307
|
+
description: 'The appearance styling to use for the section message',
|
|
1308
|
+
type: "'information' | 'warning' | 'error' | 'success' | 'discovery'"
|
|
1309
|
+
}, {
|
|
1310
|
+
name: 'children',
|
|
1311
|
+
description: 'The main content of the section message',
|
|
1312
|
+
type: 'ReactNode'
|
|
1313
|
+
}, {
|
|
1314
|
+
name: 'title',
|
|
1315
|
+
description: 'The heading of the section message',
|
|
1316
|
+
type: 'string'
|
|
1317
|
+
}, {
|
|
1318
|
+
name: 'actions',
|
|
1319
|
+
description: 'Actions for the user to take after reading the section message',
|
|
1320
|
+
type: 'ReactElement | ReactElement<SectionMessageActionProps>[]'
|
|
1321
|
+
}, {
|
|
1322
|
+
name: 'icon',
|
|
1323
|
+
description: 'An Icon component to be rendered instead of the default icon',
|
|
1324
|
+
type: 'React.ElementType'
|
|
1325
|
+
}, {
|
|
1326
|
+
name: 'testId',
|
|
1327
|
+
description: 'A unique string that appears as a data attribute data-testid in the rendered code',
|
|
1328
|
+
type: 'string'
|
|
1329
|
+
}]
|
|
1330
|
+
}, {
|
|
1331
|
+
name: 'Breadcrumbs',
|
|
1332
|
+
packageName: '@atlaskit/breadcrumbs',
|
|
1333
|
+
description: 'A navigation component showing the current page hierarchy.',
|
|
1334
|
+
releasePhase: 'general_availability',
|
|
1335
|
+
category: 'Navigation',
|
|
1336
|
+
example: `import Breadcrumbs, { BreadcrumbsItem } from '@atlaskit/breadcrumbs';
|
|
1337
|
+
|
|
1338
|
+
<Breadcrumbs>
|
|
1339
|
+
<BreadcrumbsItem href="/">Home</BreadcrumbsItem>
|
|
1340
|
+
<BreadcrumbsItem href="/products">Products</BreadcrumbsItem>
|
|
1341
|
+
<BreadcrumbsItem>Current Page</BreadcrumbsItem>
|
|
1342
|
+
</Breadcrumbs>`,
|
|
1343
|
+
props: [{
|
|
1344
|
+
name: 'children',
|
|
1345
|
+
description: 'Breadcrumb items',
|
|
1346
|
+
type: 'ReactNode'
|
|
1347
|
+
}, {
|
|
1348
|
+
name: 'maxItems',
|
|
1349
|
+
description: 'Maximum number of items to show before truncating',
|
|
1350
|
+
type: 'number'
|
|
1351
|
+
}, {
|
|
1352
|
+
name: 'separator',
|
|
1353
|
+
description: 'Custom separator between breadcrumb items',
|
|
1354
|
+
type: 'ReactNode'
|
|
1355
|
+
}]
|
|
1356
|
+
}, {
|
|
1357
|
+
name: 'Link',
|
|
1358
|
+
packageName: '@atlaskit/link',
|
|
1359
|
+
description: 'A component for navigation links.',
|
|
1360
|
+
releasePhase: 'general_availability',
|
|
1361
|
+
category: 'Navigation',
|
|
1362
|
+
example: `import Link from '@atlaskit/link';
|
|
1363
|
+
|
|
1364
|
+
<Link href="/path">Link text</Link>`,
|
|
1365
|
+
props: [{
|
|
1366
|
+
name: 'href',
|
|
1367
|
+
description: 'Link destination',
|
|
1368
|
+
type: 'string'
|
|
1369
|
+
}, {
|
|
1370
|
+
name: 'children',
|
|
1371
|
+
description: 'Link content',
|
|
1372
|
+
type: 'ReactNode'
|
|
1373
|
+
}, {
|
|
1374
|
+
name: 'isDisabled',
|
|
1375
|
+
description: 'Disabled state',
|
|
1376
|
+
type: 'boolean'
|
|
1377
|
+
}]
|
|
1378
|
+
}, {
|
|
1379
|
+
name: 'Menu',
|
|
1380
|
+
packageName: '@atlaskit/menu',
|
|
1381
|
+
description: 'A component for displaying menus.',
|
|
1382
|
+
releasePhase: 'general_availability',
|
|
1383
|
+
category: 'Navigation',
|
|
1384
|
+
example: `import { MenuGroup, Section, ButtonItem, LinkItem, CustomItem } from '@atlaskit/menu';
|
|
1385
|
+
|
|
1386
|
+
<MenuGroup spacing="cozy" testId="menu-test">
|
|
1387
|
+
<Section title="Section Title">
|
|
1388
|
+
<ButtonItem>Button Item</ButtonItem>
|
|
1389
|
+
<LinkItem href="/path">Link Item</LinkItem>
|
|
1390
|
+
<CustomItem component={CustomComponent}>Custom Item</CustomItem>
|
|
1391
|
+
</Section>
|
|
1392
|
+
</MenuGroup>`,
|
|
1393
|
+
props: [{
|
|
1394
|
+
name: 'children',
|
|
1395
|
+
description: 'Children of the menu group, generally Section components',
|
|
1396
|
+
type: 'ReactNode'
|
|
1397
|
+
}, {
|
|
1398
|
+
name: 'isLoading',
|
|
1399
|
+
description: 'Used to tell assistive technologies that the menu group is loading',
|
|
1400
|
+
type: 'boolean'
|
|
1401
|
+
}, {
|
|
1402
|
+
name: 'spacing',
|
|
1403
|
+
description: 'Configure the density of the menu group content',
|
|
1404
|
+
type: "'compact' | 'cozy'"
|
|
1405
|
+
}, {
|
|
1406
|
+
name: 'role',
|
|
1407
|
+
description: 'Override the accessibility role for the element',
|
|
1408
|
+
type: 'string'
|
|
1409
|
+
}, {
|
|
1410
|
+
name: 'testId',
|
|
1411
|
+
description: 'A unique string that appears as a data attribute data-testid in the rendered code',
|
|
1412
|
+
type: 'string'
|
|
1413
|
+
}]
|
|
1414
|
+
}, {
|
|
1415
|
+
name: 'Pagination',
|
|
1416
|
+
packageName: '@atlaskit/pagination',
|
|
1417
|
+
description: 'A component for pagination controls.',
|
|
1418
|
+
releasePhase: 'general_availability',
|
|
1419
|
+
category: 'Navigation',
|
|
1420
|
+
example: `import Pagination from '@atlaskit/pagination';
|
|
1421
|
+
|
|
1422
|
+
<Pagination
|
|
1423
|
+
pages={[1, 2, 3, 4, 5]}
|
|
1424
|
+
defaultSelectedIndex={0}
|
|
1425
|
+
label="pagination"
|
|
1426
|
+
pageLabel="page"
|
|
1427
|
+
previousLabel="previous"
|
|
1428
|
+
nextLabel="next"
|
|
1429
|
+
max={7}
|
|
1430
|
+
onChange={(event, page) => console.log(page)}
|
|
1431
|
+
testId="pagination-test"
|
|
1432
|
+
/>`,
|
|
1433
|
+
props: [{
|
|
1434
|
+
name: 'pages',
|
|
1435
|
+
description: 'Array of the pages to display',
|
|
1436
|
+
type: 'T[]'
|
|
1437
|
+
}, {
|
|
1438
|
+
name: 'defaultSelectedIndex',
|
|
1439
|
+
description: 'Index of the page to be selected by default',
|
|
1440
|
+
type: 'number'
|
|
1441
|
+
}, {
|
|
1442
|
+
name: 'label',
|
|
1443
|
+
description: 'The aria-label for the pagination nav wrapper',
|
|
1444
|
+
type: 'string'
|
|
1445
|
+
}, {
|
|
1446
|
+
name: 'pageLabel',
|
|
1447
|
+
description: 'The aria-label for the individual page numbers',
|
|
1448
|
+
type: 'string'
|
|
1449
|
+
}, {
|
|
1450
|
+
name: 'max',
|
|
1451
|
+
description: 'Maximum number of pages to be displayed in the pagination',
|
|
1452
|
+
type: 'number'
|
|
1453
|
+
}, {
|
|
1454
|
+
name: 'onChange',
|
|
1455
|
+
description: 'The onChange handler which is called when the page is changed',
|
|
1456
|
+
type: '(event: SyntheticEvent, page: T, analyticsEvent?: UIAnalyticsEvent) => void'
|
|
1457
|
+
}]
|
|
1458
|
+
}, {
|
|
1459
|
+
name: 'Tabs',
|
|
1460
|
+
packageName: '@atlaskit/tabs',
|
|
1461
|
+
description: 'A component for tabbed navigation.',
|
|
1462
|
+
releasePhase: 'general_availability',
|
|
1463
|
+
category: 'Navigation',
|
|
1464
|
+
example: `import Tabs, { Tab, TabList, TabPanel } from '@atlaskit/tabs';
|
|
1465
|
+
|
|
1466
|
+
<Tabs>
|
|
1467
|
+
<TabList>
|
|
1468
|
+
<Tab>Tab 1</Tab>
|
|
1469
|
+
<Tab>Tab 2</Tab>
|
|
1470
|
+
</TabList>
|
|
1471
|
+
<TabPanel>Content 1</TabPanel>
|
|
1472
|
+
<TabPanel>Content 2</TabPanel>
|
|
1473
|
+
</Tabs>`,
|
|
1474
|
+
props: [{
|
|
1475
|
+
name: 'children',
|
|
1476
|
+
description: 'Tab content',
|
|
1477
|
+
type: 'ReactNode'
|
|
1478
|
+
}, {
|
|
1479
|
+
name: 'selected',
|
|
1480
|
+
description: 'Selected tab index',
|
|
1481
|
+
type: 'number'
|
|
1482
|
+
}, {
|
|
1483
|
+
name: 'onChange',
|
|
1484
|
+
description: 'Tab change handler',
|
|
1485
|
+
type: '(index: number) => void'
|
|
1486
|
+
}]
|
|
1487
|
+
}, {
|
|
1488
|
+
name: 'NavigationSystem',
|
|
1489
|
+
packageName: '@atlassian/navigation-system',
|
|
1490
|
+
description: 'A modern navigation system for Atlassian products that provides a flexible and accessible layout structure.',
|
|
1491
|
+
releasePhase: 'early_access',
|
|
1492
|
+
category: 'Navigation',
|
|
1493
|
+
example: `import React, { useState } from 'react';
|
|
1494
|
+
import AKBanner from '@atlaskit/banner';
|
|
1495
|
+
import { Banner } from '@atlassian/navigation-system/layout/banner';
|
|
1496
|
+
import { Main } from '@atlassian/navigation-system/layout/main';
|
|
1497
|
+
import { PanelSplitter } from '@atlassian/navigation-system/layout/panel-splitter';
|
|
1498
|
+
import { Root } from '@atlassian/navigation-system/layout/root';
|
|
1499
|
+
import { SideNav, SideNavContent, SideNavFooter, SideNavToggleButton } from '@atlassian/navigation-system/layout/side-nav';
|
|
1500
|
+
import { TopBar } from '@atlassian/navigation-system/layout/top-bar';
|
|
1501
|
+
import { CommonActions, Help, HomeActions, NavLogo, UserActions } from '@atlassian/navigation-system/top-nav';
|
|
1502
|
+
|
|
1503
|
+
<Root>
|
|
1504
|
+
<TopBar>
|
|
1505
|
+
<HomeActions>
|
|
1506
|
+
<SideNavToggleButton
|
|
1507
|
+
collapseLabel="Collapse sidebar"
|
|
1508
|
+
expandLabel="Expand sidebar"
|
|
1509
|
+
/>
|
|
1510
|
+
<NavLogo
|
|
1511
|
+
href="#"
|
|
1512
|
+
logo={AtlassianLogo}
|
|
1513
|
+
icon={AtlassianIcon}
|
|
1514
|
+
label="Home page"
|
|
1515
|
+
/>
|
|
1516
|
+
</HomeActions>
|
|
1517
|
+
<CommonActions />
|
|
1518
|
+
<UserActions />
|
|
1519
|
+
</TopBar>
|
|
1520
|
+
<SideNav>
|
|
1521
|
+
<SideNavContent />
|
|
1522
|
+
<SideNavFooter />
|
|
1523
|
+
</SideNav>
|
|
1524
|
+
<Main id="main-container" isFixed />
|
|
1525
|
+
</Root>`,
|
|
1526
|
+
props: []
|
|
1527
|
+
}, {
|
|
1528
|
+
name: 'Blanket',
|
|
1529
|
+
packageName: '@atlaskit/blanket',
|
|
1530
|
+
description: 'A component for overlays.',
|
|
1531
|
+
releasePhase: 'general_availability',
|
|
1532
|
+
category: 'Overlays and Layering',
|
|
1533
|
+
example: `import Blanket from '@atlaskit/blanket';
|
|
1534
|
+
|
|
1535
|
+
<Blanket isTinted />`,
|
|
1536
|
+
props: [{
|
|
1537
|
+
name: 'isTinted',
|
|
1538
|
+
description: 'Tinted overlay',
|
|
1539
|
+
type: 'boolean'
|
|
1540
|
+
}, {
|
|
1541
|
+
name: 'onBlanketClicked',
|
|
1542
|
+
description: 'Click handler',
|
|
1543
|
+
type: '() => void'
|
|
1544
|
+
}]
|
|
1545
|
+
}, {
|
|
1546
|
+
name: 'Drawer',
|
|
1547
|
+
packageName: '@atlaskit/drawer',
|
|
1548
|
+
description: 'A sliding panel component.',
|
|
1549
|
+
releasePhase: 'general_availability',
|
|
1550
|
+
category: 'Overlays and Layering',
|
|
1551
|
+
example: `import Drawer from '@atlaskit/drawer';
|
|
1552
|
+
|
|
1553
|
+
<Drawer
|
|
1554
|
+
isOpen={true}
|
|
1555
|
+
onClose={() => {}}
|
|
1556
|
+
width="wide"
|
|
1557
|
+
>
|
|
1558
|
+
Drawer content
|
|
1559
|
+
</Drawer>`,
|
|
1560
|
+
props: [{
|
|
1561
|
+
name: 'isOpen',
|
|
1562
|
+
description: 'Controls the visibility of the drawer',
|
|
1563
|
+
type: 'boolean'
|
|
1564
|
+
}, {
|
|
1565
|
+
name: 'width',
|
|
1566
|
+
description: 'Width of the drawer',
|
|
1567
|
+
type: "'narrow' | 'medium' | 'wide'"
|
|
1568
|
+
}, {
|
|
1569
|
+
name: 'onClose',
|
|
1570
|
+
description: 'Handler called when drawer is closed',
|
|
1571
|
+
type: '() => void'
|
|
1572
|
+
}, {
|
|
1573
|
+
name: 'children',
|
|
1574
|
+
description: 'Content to display in the drawer',
|
|
1575
|
+
type: 'ReactNode'
|
|
1576
|
+
}]
|
|
1577
|
+
}, {
|
|
1578
|
+
name: 'Popup',
|
|
1579
|
+
packageName: '@atlaskit/popup',
|
|
1580
|
+
description: 'A component for displaying popup content.',
|
|
1581
|
+
releasePhase: 'general_availability',
|
|
1582
|
+
category: 'Overlays and Layering',
|
|
1583
|
+
example: `import Popup from '@atlaskit/popup';
|
|
1584
|
+
|
|
1585
|
+
<Popup
|
|
1586
|
+
content="Popup content"
|
|
1587
|
+
isOpen={true}
|
|
1588
|
+
>
|
|
1589
|
+
<button>Trigger</button>
|
|
1590
|
+
</Popup>`,
|
|
1591
|
+
props: [{
|
|
1592
|
+
name: 'content',
|
|
1593
|
+
description: 'Popup content',
|
|
1594
|
+
type: 'ReactNode'
|
|
1595
|
+
}, {
|
|
1596
|
+
name: 'isOpen',
|
|
1597
|
+
description: 'Open state',
|
|
1598
|
+
type: 'boolean'
|
|
1599
|
+
}, {
|
|
1600
|
+
name: 'onClose',
|
|
1601
|
+
description: 'Close handler',
|
|
1602
|
+
type: '() => void'
|
|
1603
|
+
}, {
|
|
1604
|
+
name: 'placement',
|
|
1605
|
+
description: 'Popup placement',
|
|
1606
|
+
type: 'string'
|
|
1607
|
+
}]
|
|
1608
|
+
}, {
|
|
1609
|
+
name: 'Tooltip',
|
|
1610
|
+
packageName: '@atlaskit/tooltip',
|
|
1611
|
+
description: 'A component for displaying tooltips.',
|
|
1612
|
+
releasePhase: 'general_availability',
|
|
1613
|
+
category: 'Overlays and Layering',
|
|
1614
|
+
example: `import Tooltip from '@atlaskit/tooltip';
|
|
1615
|
+
|
|
1616
|
+
<Tooltip content="Tooltip content">
|
|
1617
|
+
<button>Hover me</button>
|
|
1618
|
+
</Tooltip>`,
|
|
1619
|
+
props: [{
|
|
1620
|
+
name: 'content',
|
|
1621
|
+
description: 'Tooltip content',
|
|
1622
|
+
type: 'ReactNode'
|
|
1623
|
+
}, {
|
|
1624
|
+
name: 'children',
|
|
1625
|
+
description: 'Trigger element',
|
|
1626
|
+
type: 'ReactNode'
|
|
1627
|
+
}, {
|
|
1628
|
+
name: 'position',
|
|
1629
|
+
description: 'Tooltip position',
|
|
1630
|
+
type: 'string'
|
|
1631
|
+
}]
|
|
1632
|
+
}, {
|
|
1633
|
+
name: 'Badge',
|
|
1634
|
+
packageName: '@atlaskit/badge',
|
|
1635
|
+
description: 'A component for displaying status indicators or counts.',
|
|
1636
|
+
releasePhase: 'general_availability',
|
|
1637
|
+
category: 'Status Indicators',
|
|
1638
|
+
example: `import Badge from '@atlaskit/badge';
|
|
1639
|
+
|
|
1640
|
+
// Status badge
|
|
1641
|
+
<Badge appearance="added">New</Badge>
|
|
1642
|
+
|
|
1643
|
+
// Count badge
|
|
1644
|
+
<Badge max={99} value={100}>100</Badge>`,
|
|
1645
|
+
props: [{
|
|
1646
|
+
name: 'appearance',
|
|
1647
|
+
description: 'Visual style of the badge',
|
|
1648
|
+
type: "'added' | 'default' | 'important' | 'primary' | 'removed'"
|
|
1649
|
+
}, {
|
|
1650
|
+
name: 'value',
|
|
1651
|
+
description: 'Number to display',
|
|
1652
|
+
type: 'number'
|
|
1653
|
+
}, {
|
|
1654
|
+
name: 'max',
|
|
1655
|
+
description: "Maximum value before showing '+'",
|
|
1656
|
+
type: 'number'
|
|
1657
|
+
}, {
|
|
1658
|
+
name: 'children',
|
|
1659
|
+
description: 'Custom content',
|
|
1660
|
+
type: 'ReactNode'
|
|
1661
|
+
}]
|
|
1662
|
+
}, {
|
|
1663
|
+
name: 'EmptyState',
|
|
1664
|
+
packageName: '@atlaskit/empty-state',
|
|
1665
|
+
description: 'A component for empty states.',
|
|
1666
|
+
releasePhase: 'general_availability',
|
|
1667
|
+
category: 'Status Indicators',
|
|
1668
|
+
example: `import EmptyState from '@atlaskit/empty-state';
|
|
1669
|
+
|
|
1670
|
+
<EmptyState
|
|
1671
|
+
header="No items"
|
|
1672
|
+
description="Add items to get started"
|
|
1673
|
+
/>`,
|
|
1674
|
+
props: [{
|
|
1675
|
+
name: 'header',
|
|
1676
|
+
description: 'Empty state header',
|
|
1677
|
+
type: 'string'
|
|
1678
|
+
}, {
|
|
1679
|
+
name: 'description',
|
|
1680
|
+
description: 'Empty state description',
|
|
1681
|
+
type: 'string'
|
|
1682
|
+
}, {
|
|
1683
|
+
name: 'imageUrl',
|
|
1684
|
+
description: 'Optional image URL',
|
|
1685
|
+
type: 'string'
|
|
1686
|
+
}]
|
|
1687
|
+
}, {
|
|
1688
|
+
name: 'Lozenge',
|
|
1689
|
+
packageName: '@atlaskit/lozenge',
|
|
1690
|
+
description: 'A component for status indicators.',
|
|
1691
|
+
releasePhase: 'general_availability',
|
|
1692
|
+
category: 'Status Indicators',
|
|
1693
|
+
example: `import Lozenge from '@atlaskit/lozenge';
|
|
1694
|
+
|
|
1695
|
+
<Lozenge appearance="success">Success</Lozenge>`,
|
|
1696
|
+
props: [{
|
|
1697
|
+
name: 'appearance',
|
|
1698
|
+
description: 'Visual style',
|
|
1699
|
+
type: "'success' | 'removed' | 'inprogress'"
|
|
1700
|
+
}, {
|
|
1701
|
+
name: 'children',
|
|
1702
|
+
description: 'Lozenge content',
|
|
1703
|
+
type: 'ReactNode'
|
|
1704
|
+
}, {
|
|
1705
|
+
name: 'isBold',
|
|
1706
|
+
description: 'Bold style',
|
|
1707
|
+
type: 'boolean'
|
|
1708
|
+
}]
|
|
1709
|
+
}, {
|
|
1710
|
+
name: 'ProgressIndicator',
|
|
1711
|
+
packageName: '@atlaskit/progress-indicator',
|
|
1712
|
+
description: 'A component for showing progress through steps.',
|
|
1713
|
+
releasePhase: 'general_availability',
|
|
1714
|
+
category: 'Status Indicators',
|
|
1715
|
+
example: `import { ProgressIndicator } from '@atlaskit/progress-indicator';
|
|
1716
|
+
|
|
1717
|
+
<ProgressIndicator
|
|
1718
|
+
selectedIndex={1}
|
|
1719
|
+
values={['Step 1', 'Step 2', 'Step 3']}
|
|
1720
|
+
/>`,
|
|
1721
|
+
props: [{
|
|
1722
|
+
name: 'selectedIndex',
|
|
1723
|
+
description: 'Current step',
|
|
1724
|
+
type: 'number'
|
|
1725
|
+
}, {
|
|
1726
|
+
name: 'values',
|
|
1727
|
+
description: 'Step labels',
|
|
1728
|
+
type: 'string[]'
|
|
1729
|
+
}, {
|
|
1730
|
+
name: 'onSelect',
|
|
1731
|
+
description: 'Step selection handler',
|
|
1732
|
+
type: '(index: number) => void'
|
|
1733
|
+
}]
|
|
1734
|
+
}, {
|
|
1735
|
+
name: 'ProgressTracker',
|
|
1736
|
+
packageName: '@atlaskit/progress-tracker',
|
|
1737
|
+
description: 'A component for tracking progress through a journey.',
|
|
1738
|
+
releasePhase: 'general_availability',
|
|
1739
|
+
category: 'Status Indicators',
|
|
1740
|
+
example: `import { ProgressTracker } from '@atlaskit/progress-tracker';
|
|
1741
|
+
|
|
1742
|
+
<ProgressTracker
|
|
1743
|
+
items={[
|
|
1744
|
+
{ id: '1', label: 'Step 1', percentageComplete: 100 },
|
|
1745
|
+
{ id: '2', label: 'Step 2', percentageComplete: 50 },
|
|
1746
|
+
]}
|
|
1747
|
+
/>`,
|
|
1748
|
+
props: [{
|
|
1749
|
+
name: 'items',
|
|
1750
|
+
description: 'Progress items',
|
|
1751
|
+
type: 'Array<{id: string, label: string, percentageComplete: number}>'
|
|
1752
|
+
}, {
|
|
1753
|
+
name: 'current',
|
|
1754
|
+
description: 'Current item ID',
|
|
1755
|
+
type: 'string'
|
|
1756
|
+
}]
|
|
1757
|
+
}, {
|
|
1758
|
+
name: 'Tag',
|
|
1759
|
+
packageName: '@atlaskit/tag',
|
|
1760
|
+
description: 'A component for displaying tags.',
|
|
1761
|
+
releasePhase: 'general_availability',
|
|
1762
|
+
category: 'Status Indicators',
|
|
1763
|
+
example: `import Tag from '@atlaskit/tag';
|
|
1764
|
+
|
|
1765
|
+
<Tag text="Tag" />`,
|
|
1766
|
+
props: [{
|
|
1767
|
+
name: 'text',
|
|
1768
|
+
description: 'Tag text',
|
|
1769
|
+
type: 'string'
|
|
1770
|
+
}, {
|
|
1771
|
+
name: 'appearance',
|
|
1772
|
+
description: 'Visual style',
|
|
1773
|
+
type: "'default' | 'rounded'"
|
|
1774
|
+
}, {
|
|
1775
|
+
name: 'color',
|
|
1776
|
+
description: 'Tag color',
|
|
1777
|
+
type: 'string'
|
|
1778
|
+
}]
|
|
1779
|
+
}, {
|
|
1780
|
+
name: 'TagGroup',
|
|
1781
|
+
packageName: '@atlaskit/tag-group',
|
|
1782
|
+
description: 'A component for managing multiple tags.',
|
|
1783
|
+
releasePhase: 'general_availability',
|
|
1784
|
+
category: 'Status Indicators',
|
|
1785
|
+
example: `import TagGroup from '@atlaskit/tag-group';
|
|
1786
|
+
|
|
1787
|
+
<TagGroup>
|
|
1788
|
+
<Tag text="Tag 1" />
|
|
1789
|
+
<Tag text="Tag 2" />
|
|
1790
|
+
</TagGroup>`,
|
|
1791
|
+
props: [{
|
|
1792
|
+
name: 'children',
|
|
1793
|
+
description: 'Tag components',
|
|
1794
|
+
type: 'ReactNode'
|
|
1795
|
+
}, {
|
|
1796
|
+
name: 'alignment',
|
|
1797
|
+
description: 'Tag alignment',
|
|
1798
|
+
type: "'start' | 'end'"
|
|
1799
|
+
}]
|
|
1800
|
+
}, {
|
|
1801
|
+
name: 'Code',
|
|
1802
|
+
packageName: '@atlaskit/code',
|
|
1803
|
+
description: 'A component for displaying code snippets.',
|
|
1804
|
+
releasePhase: 'general_availability',
|
|
1805
|
+
category: 'Text and Data Display',
|
|
1806
|
+
example: `<Code>const greeting = 'Hello, world!';</Code>`,
|
|
1807
|
+
props: [{
|
|
1808
|
+
name: 'children',
|
|
1809
|
+
description: 'Content to be rendered in the inline code block',
|
|
1810
|
+
type: 'ReactNode'
|
|
1811
|
+
}, {
|
|
1812
|
+
name: 'testId',
|
|
1813
|
+
description: 'A unique string that appears as a data attribute data-testid in the rendered code, serving as a hook for automated tests',
|
|
1814
|
+
type: 'string'
|
|
1815
|
+
}, {
|
|
1816
|
+
name: 'codeBidiWarnings',
|
|
1817
|
+
description: 'When set to false, disables code decorating with bidi warnings',
|
|
1818
|
+
type: 'boolean'
|
|
1819
|
+
}, {
|
|
1820
|
+
name: 'codeBidiWarningLabel',
|
|
1821
|
+
description: 'Label for the bidi warning tooltip',
|
|
1822
|
+
type: 'string'
|
|
1823
|
+
}, {
|
|
1824
|
+
name: 'codeBidiWarningTooltipEnabled',
|
|
1825
|
+
description: 'Sets whether to render tooltip with the warning or not',
|
|
1826
|
+
type: 'boolean'
|
|
1827
|
+
}]
|
|
1828
|
+
}, {
|
|
1829
|
+
name: 'Heading',
|
|
1830
|
+
packageName: '@atlaskit/heading',
|
|
1831
|
+
description: 'A typography component used to display text in defined sizes and styles.',
|
|
1832
|
+
releasePhase: 'beta',
|
|
1833
|
+
category: 'Text and Data Display',
|
|
1834
|
+
example: `import Heading from '@atlaskit/heading';
|
|
1835
|
+
|
|
1836
|
+
<Heading size="xxlarge">Page title</Heading>`,
|
|
1837
|
+
props: [{
|
|
1838
|
+
name: 'size',
|
|
1839
|
+
description: 'Heading size. This value is detached from the specific heading level applied to allow for more flexibility',
|
|
1840
|
+
type: "'xxlarge' | 'xlarge' | 'large' | 'medium' | 'small' | 'xsmall' | 'xxsmall'"
|
|
1841
|
+
}, {
|
|
1842
|
+
name: 'as',
|
|
1843
|
+
description: 'Allows the component to be rendered as the specified DOM element, overriding a default element set by level prop',
|
|
1844
|
+
type: "'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'div' | 'span'"
|
|
1845
|
+
}, {
|
|
1846
|
+
name: 'color',
|
|
1847
|
+
description: 'Token representing text color with a built-in fallback value. Will apply inverse text color automatically if placed within a Box with bold background color. Defaults to color.text',
|
|
1848
|
+
type: "'color.text' | 'color.text.inverse' | 'color.text.warning.inverse'"
|
|
1849
|
+
}, {
|
|
1850
|
+
name: 'children',
|
|
1851
|
+
description: 'The text of the heading',
|
|
1852
|
+
type: 'ReactNode'
|
|
1853
|
+
}, {
|
|
1854
|
+
name: 'id',
|
|
1855
|
+
description: 'Unique identifier for the heading DOM element',
|
|
1856
|
+
type: 'string'
|
|
1857
|
+
}, {
|
|
1858
|
+
name: 'testId',
|
|
1859
|
+
description: 'A unique string that appears as a data attribute data-testid in the rendered code, serving as a hook for automated tests',
|
|
1860
|
+
type: 'string'
|
|
1861
|
+
}]
|
|
1862
|
+
}, {
|
|
1863
|
+
name: 'InlineEdit',
|
|
1864
|
+
packageName: '@atlaskit/inline-edit',
|
|
1865
|
+
description: 'A component for inline editing.',
|
|
1866
|
+
releasePhase: 'general_availability',
|
|
1867
|
+
category: 'Text and Data Display',
|
|
1868
|
+
example: `import InlineEdit from '@atlaskit/inline-edit';
|
|
1869
|
+
|
|
1870
|
+
<InlineEdit
|
|
1871
|
+
defaultValue="Editable text"
|
|
1872
|
+
onConfirm={(value) => console.log(value)}
|
|
1873
|
+
readView={() => <div>Read view</div>}
|
|
1874
|
+
editView={(fieldProps) => <input {...fieldProps} />}
|
|
1875
|
+
testId="inline-edit-test"
|
|
1876
|
+
/>`,
|
|
1877
|
+
props: [{
|
|
1878
|
+
name: 'defaultValue',
|
|
1879
|
+
description: 'The user input entered into the field during editView',
|
|
1880
|
+
type: 'any'
|
|
1881
|
+
}, {
|
|
1882
|
+
name: 'editButtonLabel',
|
|
1883
|
+
description: 'Accessibility label for button to enter editView',
|
|
1884
|
+
type: 'string'
|
|
1885
|
+
}, {
|
|
1886
|
+
name: 'editLabel',
|
|
1887
|
+
description: "Append 'edit' to the end of the button label",
|
|
1888
|
+
type: 'string'
|
|
1889
|
+
}, {
|
|
1890
|
+
name: 'hideActionButtons',
|
|
1891
|
+
description: 'Whether to display confirm and cancel action buttons',
|
|
1892
|
+
type: 'boolean'
|
|
1893
|
+
}, {
|
|
1894
|
+
name: 'isRequired',
|
|
1895
|
+
description: 'Whether the input value can be confirmed as empty',
|
|
1896
|
+
type: 'boolean'
|
|
1897
|
+
}, {
|
|
1898
|
+
name: 'onConfirm',
|
|
1899
|
+
description: 'Handler to save and confirm value',
|
|
1900
|
+
type: '(value: any, analyticsEvent: UIAnalyticsEvent) => void'
|
|
1901
|
+
}]
|
|
1902
|
+
}, {
|
|
1903
|
+
name: 'TableTree',
|
|
1904
|
+
packageName: '@atlaskit/table-tree',
|
|
1905
|
+
description: 'A component for displaying hierarchical data.',
|
|
1906
|
+
releasePhase: 'general_availability',
|
|
1907
|
+
category: 'Text and Data Display',
|
|
1908
|
+
example: `import TableTree from '@atlaskit/table-tree';
|
|
1909
|
+
|
|
1910
|
+
<TableTree
|
|
1911
|
+
headers={['Column 1', 'Column 2']}
|
|
1912
|
+
columns={[Cell, Cell]}
|
|
1913
|
+
items={[
|
|
1914
|
+
{ content: 'Row 1', children: [{ content: 'Child 1' }] }
|
|
1915
|
+
]}
|
|
1916
|
+
label="Table description"
|
|
1917
|
+
/>`,
|
|
1918
|
+
props: [{
|
|
1919
|
+
name: 'children',
|
|
1920
|
+
description: 'Table contents when composing with internal components',
|
|
1921
|
+
type: 'ReactNode'
|
|
1922
|
+
}, {
|
|
1923
|
+
name: 'columns',
|
|
1924
|
+
description: 'Components to render cells in each column',
|
|
1925
|
+
type: 'ElementType[]'
|
|
1926
|
+
}, {
|
|
1927
|
+
name: 'columnWidths',
|
|
1928
|
+
description: 'Widths of table columns',
|
|
1929
|
+
type: 'ColumnWidth[]'
|
|
1930
|
+
}, {
|
|
1931
|
+
name: 'headers',
|
|
1932
|
+
description: 'Header text for table columns',
|
|
1933
|
+
type: 'string[]'
|
|
1934
|
+
}, {
|
|
1935
|
+
name: 'items',
|
|
1936
|
+
description: 'Data to render the table',
|
|
1937
|
+
type: 'Array<{ content: ReactNode, children?: Array<{ content: ReactNode }> }>'
|
|
1938
|
+
}]
|
|
1939
|
+
}, {
|
|
1940
|
+
name: 'VisuallyHidden',
|
|
1941
|
+
packageName: '@atlaskit/visually-hidden',
|
|
1942
|
+
description: 'A utility component for accessibility.',
|
|
1943
|
+
releasePhase: 'general_availability',
|
|
1944
|
+
category: 'Text and Data Display',
|
|
1945
|
+
example: `import VisuallyHidden from '@atlaskit/visually-hidden';
|
|
1946
|
+
|
|
1947
|
+
<VisuallyHidden>
|
|
1948
|
+
<span>Hidden content</span>
|
|
1949
|
+
</VisuallyHidden>`,
|
|
1950
|
+
props: [{
|
|
1951
|
+
name: 'children',
|
|
1952
|
+
description: 'The element or elements that should be hidden',
|
|
1953
|
+
type: 'ReactNode'
|
|
1954
|
+
}, {
|
|
1955
|
+
name: 'role',
|
|
1956
|
+
description: 'An ARIA role attribute to aid screen readers',
|
|
1957
|
+
type: 'string'
|
|
1958
|
+
}, {
|
|
1959
|
+
name: 'id',
|
|
1960
|
+
description: 'An id may be appropriate for this component if used in conjunction with aria-describedby on a paired element',
|
|
1961
|
+
type: 'string'
|
|
1962
|
+
}, {
|
|
1963
|
+
name: 'testId',
|
|
1964
|
+
description: 'A unique string that appears as a data attribute data-testid in the rendered code, serving as a hook for automated tests',
|
|
1965
|
+
type: 'string'
|
|
1966
|
+
}]
|
|
1967
|
+
}, {
|
|
1968
|
+
name: 'Box',
|
|
1969
|
+
packageName: '@atlaskit/primitives/compiled',
|
|
1970
|
+
description: 'A fundamental layout primitive that provides a base for building other components. Box is a generic container that provides managed access to design tokens.',
|
|
1971
|
+
releasePhase: 'general_availability',
|
|
1972
|
+
category: 'Primitives',
|
|
1973
|
+
example: `import { cssMap } from '@atlaskit/css';
|
|
1974
|
+
import { Box } from '@atlaskit/primitives/compiled';
|
|
1975
|
+
import { token } from '@atlaskit/tokens';
|
|
1976
|
+
|
|
1977
|
+
<Box backgroundColor="color.background.accent.blue.subtlest">
|
|
1978
|
+
Content
|
|
1979
|
+
</Box>
|
|
1980
|
+
|
|
1981
|
+
// A section with custom styling
|
|
1982
|
+
const styles = cssMap({
|
|
1983
|
+
root: {
|
|
1984
|
+
padding: token('space.200'),
|
|
1985
|
+
border: \`\${token('border.width')} solid \${token('color.border')}\`,
|
|
1986
|
+
}
|
|
1987
|
+
});
|
|
1988
|
+
|
|
1989
|
+
<Box xcss={styles.root} as="section">
|
|
1990
|
+
Styled content
|
|
1991
|
+
</Box>`,
|
|
1992
|
+
props: [{
|
|
1993
|
+
name: 'as',
|
|
1994
|
+
description: 'The DOM element to render as the Box. Defaults to "div". Note: SVG elements, "button", and "a" are excluded.',
|
|
1995
|
+
type: 'Exclude<keyof JSX.IntrinsicElements, SVGElements | "button" | "a">',
|
|
1996
|
+
exampleValue: 'as="section"'
|
|
1997
|
+
}, {
|
|
1998
|
+
name: 'children',
|
|
1999
|
+
description: 'Elements to be rendered inside the Box',
|
|
2000
|
+
type: 'ReactNode'
|
|
2001
|
+
}, {
|
|
2002
|
+
name: 'backgroundColor',
|
|
2003
|
+
description: 'Token representing background color with a built-in fallback value.',
|
|
2004
|
+
type: `'elevation.surface' | 'elevation.surface.hovered' | 'elevation.surface.pressed' | 'elevation.surface.overlay' | 'elevation.surface.overlay.hovered' | 'elevation.surface.overlay.pressed' | 'elevation.surface.raised' | 'elevation.surface.raised.hovered' | 'elevation.surface.raised.pressed' | 'elevation.surface.sunken' | 'utility.elevation.surface.current' | 'color.background.accent.lime.subtlest' | 'color.background.accent.lime.subtlest.hovered' | 'color.background.accent.lime.subtlest.pressed' | 'color.background.accent.lime.subtler' | 'color.background.accent.lime.subtler.hovered' | 'color.background.accent.lime.subtler.pressed' | 'color.background.accent.lime.subtle' | 'color.background.accent.lime.subtle.hovered' | 'color.background.accent.lime.subtle.pressed' | 'color.background.accent.lime.bolder' | 'color.background.accent.lime.bolder.hovered' | 'color.background.accent.lime.bolder.pressed' | 'color.background.accent.red.subtlest' | 'color.background.accent.red.subtlest.hovered' | 'color.background.accent.red.subtlest.pressed' | 'color.background.accent.red.subtler' | 'color.background.accent.red.subtler.hovered' | 'color.background.accent.red.subtler.pressed' | 'color.background.accent.red.subtle' | 'color.background.accent.red.subtle.hovered' | 'color.background.accent.red.subtle.pressed' | 'color.background.accent.red.bolder' | 'color.background.accent.red.bolder.hovered' | 'color.background.accent.red.bolder.pressed' | 'color.background.accent.orange.subtlest' | 'color.background.accent.orange.subtlest.hovered' | 'color.background.accent.orange.subtlest.pressed' | 'color.background.accent.orange.subtler' | 'color.background.accent.orange.subtler.hovered' | 'color.background.accent.orange.subtler.pressed' | 'color.background.accent.orange.subtle' | 'color.background.accent.orange.subtle.hovered' | 'color.background.accent.orange.subtle.pressed' | 'color.background.accent.orange.bolder' | 'color.background.accent.orange.bolder.hovered' | 'color.background.accent.orange.bolder.pressed' | 'color.background.accent.yellow.subtlest' | 'color.background.accent.yellow.subtlest.hovered' | 'color.background.accent.yellow.subtlest.pressed' | 'color.background.accent.yellow.subtler' | 'color.background.accent.yellow.subtler.hovered' | 'color.background.accent.yellow.subtler.pressed' | 'color.background.accent.yellow.subtle' | 'color.background.accent.yellow.subtle.hovered' | 'color.background.accent.yellow.subtle.pressed' | 'color.background.accent.yellow.bolder' | 'color.background.accent.yellow.bolder.hovered' | 'color.background.accent.yellow.bolder.pressed' | 'color.background.accent.green.subtlest' | 'color.background.accent.green.subtlest.hovered' | 'color.background.accent.green.subtlest.pressed' | 'color.background.accent.green.subtler' | 'color.background.accent.green.subtler.hovered' | 'color.background.accent.green.subtler.pressed' | 'color.background.accent.green.subtle' | 'color.background.accent.green.subtle.hovered' | 'color.background.accent.green.subtle.pressed' | 'color.background.accent.green.bolder' | 'color.background.accent.green.bolder.hovered' | 'color.background.accent.green.bolder.pressed' | 'color.background.accent.teal.subtlest' | 'color.background.accent.teal.subtlest.hovered' | 'color.background.accent.teal.subtlest.pressed' | 'color.background.accent.teal.subtler' | 'color.background.accent.teal.subtler.hovered' | 'color.background.accent.teal.subtler.pressed' | 'color.background.accent.teal.subtle' | 'color.background.accent.teal.subtle.hovered' | 'color.background.accent.teal.subtle.pressed' | 'color.background.accent.teal.bolder' | 'color.background.accent.teal.bolder.hovered' | 'color.background.accent.teal.bolder.pressed' | 'color.background.accent.blue.subtlest' | 'color.background.accent.blue.subtlest.hovered' | 'color.background.accent.blue.subtlest.pressed' | 'color.background.accent.blue.subtler' | 'color.background.accent.blue.subtler.hovered' | 'color.background.accent.blue.subtler.pressed' | 'color.background.accent.blue.subtle' | 'color.background.accent.blue.subtle.hovered' | 'color.background.accent.blue.subtle.pressed' | 'color.background.accent.blue.bolder' | 'color.background.accent.blue.bolder.hovered' | 'color.background.accent.blue.bolder.pressed' | 'color.background.accent.purple.subtlest' | 'color.background.accent.purple.subtlest.hovered' | 'color.background.accent.purple.subtlest.pressed' | 'color.background.accent.purple.subtler' | 'color.background.accent.purple.subtler.hovered' | 'color.background.accent.purple.subtler.pressed' | 'color.background.accent.purple.subtle' | 'color.background.accent.purple.subtle.hovered' | 'color.background.accent.purple.subtle.pressed' | 'color.background.accent.purple.bolder' | 'color.background.accent.purple.bolder.hovered' | 'color.background.accent.purple.bolder.pressed' | 'color.background.accent.magenta.subtlest' | 'color.background.accent.magenta.subtlest.hovered' | 'color.background.accent.magenta.subtlest.pressed' | 'color.background.accent.magenta.subtler' | 'color.background.accent.magenta.subtler.hovered' | 'color.background.accent.magenta.subtler.pressed' | 'color.background.accent.magenta.subtle' | 'color.background.accent.magenta.subtle.hovered' | 'color.background.accent.magenta.subtle.pressed' | 'color.background.accent.magenta.bolder' | 'color.background.accent.magenta.bolder.hovered' | 'color.background.accent.magenta.bolder.pressed' | 'color.background.accent.gray.subtlest' | 'color.background.accent.gray.subtlest.hovered' | 'color.background.accent.gray.subtlest.pressed' | 'color.background.accent.gray.subtler' | 'color.background.accent.gray.subtler.hovered' | 'color.background.accent.gray.subtler.pressed' | 'color.background.accent.gray.subtle' | 'color.background.accent.gray.subtle.hovered' | 'color.background.accent.gray.subtle.pressed' | 'color.background.accent.gray.bolder' | 'color.background.accent.gray.bolder.hovered' | 'color.background.accent.gray.bolder.pressed' | 'color.background.disabled' | 'color.background.input' | 'color.background.input.hovered' | 'color.background.input.pressed' | 'color.background.inverse.subtle' | 'color.background.inverse.subtle.hovered' | 'color.background.inverse.subtle.pressed' | 'color.background.neutral' | 'color.background.neutral.hovered' | 'color.background.neutral.pressed' | 'color.background.neutral.subtle' | 'color.background.neutral.subtle.hovered' | 'color.background.neutral.subtle.pressed' | 'color.background.neutral.bold' | 'color.background.neutral.bold.hovered' | 'color.background.neutral.bold.pressed' | 'color.background.selected' | 'color.background.selected.hovered' | 'color.background.selected.pressed' | 'color.background.selected.bold' | 'color.background.selected.bold.hovered' | 'color.background.selected.bold.pressed' | 'color.background.brand.subtlest' | 'color.background.brand.subtlest.hovered' | 'color.background.brand.subtlest.pressed' | 'color.background.brand.bold' | 'color.background.brand.bold.hovered' | 'color.background.brand.bold.pressed' | 'color.background.brand.boldest' | 'color.background.brand.boldest.hovered' | 'color.background.brand.boldest.pressed' | 'color.background.danger' | 'color.background.danger.hovered' | 'color.background.danger.pressed' | 'color.background.danger.bold' | 'color.background.danger.bold.hovered' | 'color.background.danger.bold.pressed' | 'color.background.warning' | 'color.background.warning.hovered' | 'color.background.warning.pressed' | 'color.background.warning.bold' | 'color.background.warning.bold.hovered' | 'color.background.warning.bold.pressed' | 'color.background.success' | 'color.background.success.hovered' | 'color.background.success.pressed' | 'color.background.success.bold' | 'color.background.success.bold.hovered' | 'color.background.success.bold.pressed' | 'color.background.discovery' | 'color.background.discovery.hovered' | 'color.background.discovery.pressed' | 'color.background.discovery.bold' | 'color.background.discovery.bold.hovered' | 'color.background.discovery.bold.pressed' | 'color.background.information' | 'color.background.information.hovered' | 'color.background.information.pressed' | 'color.background.information.bold' | 'color.background.information.bold.hovered' | 'color.background.information.bold.pressed' | 'color.blanket' | 'color.blanket.selected' | 'color.blanket.danger' | 'color.skeleton' | 'color.skeleton.subtle'`
|
|
2005
|
+
}, {
|
|
2006
|
+
name: 'style',
|
|
2007
|
+
description: 'Inline styles to be applied to the Box (only use as last resort)',
|
|
2008
|
+
type: 'CSSProperties'
|
|
2009
|
+
}, {
|
|
2010
|
+
name: 'xcss',
|
|
2011
|
+
description: 'Apply a subset of permitted styles powered by Atlassian Design System design tokens.',
|
|
2012
|
+
type: 'StrictXCSSProp',
|
|
2013
|
+
exampleValue: 'xcss={cx(styles.root, isHovered && styles.hover)}'
|
|
2014
|
+
}, {
|
|
2015
|
+
name: 'ref',
|
|
2016
|
+
description: 'Forwarded ref',
|
|
2017
|
+
type: 'Ref'
|
|
2018
|
+
}, {
|
|
2019
|
+
name: 'testId',
|
|
2020
|
+
description: 'Test ID for automated testing',
|
|
2021
|
+
type: 'string'
|
|
2022
|
+
}, {
|
|
2023
|
+
name: 'role',
|
|
2024
|
+
description: 'ARIA role attribute',
|
|
2025
|
+
type: 'string'
|
|
2026
|
+
}]
|
|
2027
|
+
}, {
|
|
2028
|
+
name: 'Pressable',
|
|
2029
|
+
packageName: '@atlaskit/primitives/compiled',
|
|
2030
|
+
description: 'A primitive for creating interactive elements with consistent press states.',
|
|
2031
|
+
releasePhase: 'general_availability',
|
|
2032
|
+
category: 'Primitives',
|
|
2033
|
+
example: `import { Pressable } from '@atlaskit/primitives/compiled';
|
|
2034
|
+
import { cssMap } from '@atlaskit/css';
|
|
2035
|
+
import { token } from '@atlaskit/tokens';
|
|
2036
|
+
|
|
2037
|
+
const styles = cssMap({
|
|
2038
|
+
pressable: {
|
|
2039
|
+
backgroundColor: token('color.background.brand.subtlest'),
|
|
2040
|
+
'&:hover': {
|
|
2041
|
+
backgroundColor: token('color.background.brand.subtlest.hovered')
|
|
2042
|
+
}
|
|
2043
|
+
}
|
|
2044
|
+
});
|
|
2045
|
+
|
|
2046
|
+
<Pressable xcss={styles.pressable} onClick={() => console.log('Pressed!')}>
|
|
2047
|
+
Hover me
|
|
2048
|
+
</Pressable>`,
|
|
2049
|
+
props: [{
|
|
2050
|
+
name: 'children',
|
|
2051
|
+
description: 'Elements to be rendered inside the Pressable',
|
|
2052
|
+
type: 'ReactNode'
|
|
2053
|
+
}, {
|
|
2054
|
+
name: 'onClick',
|
|
2055
|
+
description: 'Handler called on click with analytics event',
|
|
2056
|
+
type: '(e: MouseEvent, analyticsEvent: UIAnalyticsEvent) => void'
|
|
2057
|
+
}, {
|
|
2058
|
+
name: 'isDisabled',
|
|
2059
|
+
description: 'Whether the button is disabled',
|
|
2060
|
+
type: 'boolean'
|
|
2061
|
+
}, {
|
|
2062
|
+
name: 'interactionName',
|
|
2063
|
+
description: 'Optional name for React UFO press interactions',
|
|
2064
|
+
type: 'string'
|
|
2065
|
+
}, {
|
|
2066
|
+
name: 'componentName',
|
|
2067
|
+
description: 'Optional component name for analytics events',
|
|
2068
|
+
type: 'string'
|
|
2069
|
+
}, {
|
|
2070
|
+
name: 'analyticsContext',
|
|
2071
|
+
description: 'Additional information for analytics events',
|
|
2072
|
+
type: 'Record<string, any>',
|
|
2073
|
+
exampleValue: "{ source: 'form', action: 'submit' }"
|
|
2074
|
+
}, {
|
|
2075
|
+
name: 'ref',
|
|
2076
|
+
description: 'Forwarded ref',
|
|
2077
|
+
type: 'Ref'
|
|
2078
|
+
}, {
|
|
2079
|
+
name: 'testId',
|
|
2080
|
+
description: 'Test ID for automated testing',
|
|
2081
|
+
type: 'string'
|
|
2082
|
+
}, {
|
|
2083
|
+
name: 'role',
|
|
2084
|
+
description: 'ARIA role attribute',
|
|
2085
|
+
type: 'string'
|
|
2086
|
+
}]
|
|
2087
|
+
}, {
|
|
2088
|
+
name: 'Text',
|
|
2089
|
+
packageName: '@atlaskit/primitives/compiled',
|
|
2090
|
+
description: 'A primitive for rendering text with consistent typography styles.',
|
|
2091
|
+
releasePhase: 'general_availability',
|
|
2092
|
+
category: 'Primitives',
|
|
2093
|
+
example: `import { Text } from '@atlaskit/primitives/compiled';
|
|
2094
|
+
|
|
2095
|
+
<Text>Regular text</Text>
|
|
2096
|
+
<Text weight="bold">Heading text</Text>
|
|
2097
|
+
<Text color="color.text.accent.blue">
|
|
2098
|
+
Accent text
|
|
2099
|
+
</Text>`,
|
|
2100
|
+
props: [{
|
|
2101
|
+
name: 'as',
|
|
2102
|
+
description: 'HTML tag to be rendered. Defaults to `span`.',
|
|
2103
|
+
type: "'span' | 'p' | 'strong' | 'em'"
|
|
2104
|
+
}, {
|
|
2105
|
+
name: 'children',
|
|
2106
|
+
description: 'Elements rendered within the Text element',
|
|
2107
|
+
type: 'ReactNode'
|
|
2108
|
+
}, {
|
|
2109
|
+
name: 'color',
|
|
2110
|
+
description: 'Token representing text color with a built-in fallback value. Will apply inverse text color automatically if placed within a Box with bold background color. Defaults to "color.text" if not nested in other Text components.',
|
|
2111
|
+
type: `'inherit' | 'color.text' | 'color.text.accent.lime' | 'color.text.accent.lime.bolder' | 'color.text.accent.red' | 'color.text.accent.red.bolder' | 'color.text.accent.orange' | 'color.text.accent.orange.bolder' | 'color.text.accent.yellow' | 'color.text.accent.yellow.bolder' | 'color.text.accent.green' | 'color.text.accent.green.bolder' | 'color.text.accent.teal' | 'color.text.accent.teal.bolder' | 'color.text.accent.blue' | 'color.text.accent.blue.bolder' | 'color.text.accent.purple' | 'color.text.accent.purple.bolder' | 'color.text.accent.magenta' | 'color.text.accent.magenta.bolder' | 'color.text.accent.gray' | 'color.text.accent.gray.bolder' | 'color.text.disabled' | 'color.text.inverse' | 'color.text.selected' | 'color.text.brand' | 'color.text.danger' | 'color.text.warning' | 'color.text.warning.inverse' | 'color.text.success' | 'color.text.discovery' | 'color.text.information' | 'color.text.subtlest' | 'color.text.subtle' | 'color.link' | 'color.link.pressed' | 'color.link.visited' | 'color.link.visited.pressed'`
|
|
2112
|
+
}, {
|
|
2113
|
+
name: 'id',
|
|
2114
|
+
description: 'The HTML id attribute',
|
|
2115
|
+
type: 'string'
|
|
2116
|
+
}, {
|
|
2117
|
+
name: 'maxLines',
|
|
2118
|
+
description: 'The number of lines to limit the provided text to. Text will be truncated with an ellipsis. When maxLines=1, wordBreak defaults to break-all to match the behaviour of text-overflow: ellipsis.',
|
|
2119
|
+
type: 'number'
|
|
2120
|
+
}, {
|
|
2121
|
+
name: 'align',
|
|
2122
|
+
description: 'Text alignment',
|
|
2123
|
+
type: "'center' | 'end' | 'start'"
|
|
2124
|
+
}, {
|
|
2125
|
+
name: 'size',
|
|
2126
|
+
description: 'Text size',
|
|
2127
|
+
type: "'medium' | 'UNSAFE_small' | 'large' | 'small'"
|
|
2128
|
+
}, {
|
|
2129
|
+
name: 'weight',
|
|
2130
|
+
description: 'The HTML font-weight attribute',
|
|
2131
|
+
type: "'bold' | 'medium' | 'regular' | 'semibold'"
|
|
2132
|
+
}, {
|
|
2133
|
+
name: 'xcss',
|
|
2134
|
+
description: 'Apply a subset of permitted styles powered by Atlassian Design System design tokens',
|
|
2135
|
+
type: 'StrictXCSSProp',
|
|
2136
|
+
exampleValue: 'xcss={cx(styles.root, isHovered && styles.hover)}'
|
|
2137
|
+
}, {
|
|
2138
|
+
name: 'ref',
|
|
2139
|
+
description: 'Forwarded ref',
|
|
2140
|
+
type: 'Ref'
|
|
2141
|
+
}, {
|
|
2142
|
+
name: 'testId',
|
|
2143
|
+
description: 'Test ID for automated testing',
|
|
2144
|
+
type: 'string'
|
|
2145
|
+
}, {
|
|
2146
|
+
name: 'role',
|
|
2147
|
+
description: 'ARIA role attribute',
|
|
2148
|
+
type: 'string'
|
|
2149
|
+
}]
|
|
2150
|
+
}, {
|
|
2151
|
+
name: 'Calendar',
|
|
2152
|
+
packageName: '@atlaskit/calendar',
|
|
2153
|
+
description: "A calendar component for date selection and display. This component is in Beta phase, meaning it's stable at version 1.0+ but may receive improvements based on customer feedback. Breaking changes will only be made in major releases.",
|
|
2154
|
+
releasePhase: 'beta',
|
|
2155
|
+
category: 'Forms and Input',
|
|
2156
|
+
example: `import Calendar from '@atlaskit/calendar';
|
|
2157
|
+
|
|
2158
|
+
// Single date selection
|
|
2159
|
+
<Calendar
|
|
2160
|
+
selected={[new Date()]}
|
|
2161
|
+
onChange={(date) => console.log(date)}
|
|
2162
|
+
/>
|
|
2163
|
+
|
|
2164
|
+
// Multiple date selection
|
|
2165
|
+
<Calendar
|
|
2166
|
+
selected={['2024-03-20', '2024-03-21']}
|
|
2167
|
+
onChange={(dates) => console.log(dates)}
|
|
2168
|
+
/>`,
|
|
2169
|
+
props: [{
|
|
2170
|
+
name: 'selected',
|
|
2171
|
+
description: 'Currently selected date(s). Can be a single Date object or an array of date strings in YYYY-MM-DD format',
|
|
2172
|
+
type: 'string[]'
|
|
2173
|
+
}, {
|
|
2174
|
+
name: 'onChange',
|
|
2175
|
+
description: 'Handler for date selection changes',
|
|
2176
|
+
type: '(date: string[]) => void'
|
|
2177
|
+
}, {
|
|
2178
|
+
name: 'disabled',
|
|
2179
|
+
description: 'Array of disabled dates (YYYY-MM-DD)',
|
|
2180
|
+
type: 'string[]'
|
|
2181
|
+
}, {
|
|
2182
|
+
name: 'minDate',
|
|
2183
|
+
description: 'Minimum selectable date (YYYY-MM-DD)',
|
|
2184
|
+
type: 'string'
|
|
2185
|
+
}, {
|
|
2186
|
+
name: 'maxDate',
|
|
2187
|
+
description: 'Maximum selectable date (YYYY-MM-DD)',
|
|
2188
|
+
type: 'string'
|
|
2189
|
+
}, {
|
|
2190
|
+
name: 'day',
|
|
2191
|
+
description: 'Currently focused day (0 for no focus)',
|
|
2192
|
+
type: 'number'
|
|
2193
|
+
}, {
|
|
2194
|
+
name: 'defaultDay',
|
|
2195
|
+
description: 'Default focused day',
|
|
2196
|
+
type: 'number'
|
|
2197
|
+
}, {
|
|
2198
|
+
name: 'defaultMonth',
|
|
2199
|
+
description: 'Default month (1-12)',
|
|
2200
|
+
type: 'number'
|
|
2201
|
+
}, {
|
|
2202
|
+
name: 'defaultYear',
|
|
2203
|
+
description: 'Default year',
|
|
2204
|
+
type: 'number'
|
|
2205
|
+
}, {
|
|
2206
|
+
name: 'defaultSelected',
|
|
2207
|
+
description: 'Default selected dates (YYYY-MM-DD)',
|
|
2208
|
+
type: 'string[]'
|
|
2209
|
+
}, {
|
|
2210
|
+
name: 'defaultPreviouslySelected',
|
|
2211
|
+
description: 'Default previously selected dates',
|
|
2212
|
+
type: 'string[]'
|
|
2213
|
+
}, {
|
|
2214
|
+
name: 'disabledDateFilter',
|
|
2215
|
+
description: 'Function to filter disabled dates',
|
|
2216
|
+
type: '(date: string) => boolean'
|
|
2217
|
+
}, {
|
|
2218
|
+
name: 'month',
|
|
2219
|
+
description: 'Current month (1-12)',
|
|
2220
|
+
type: 'number'
|
|
2221
|
+
}, {
|
|
2222
|
+
name: 'nextMonthLabel',
|
|
2223
|
+
description: 'Aria label for next month button',
|
|
2224
|
+
type: 'string'
|
|
2225
|
+
}, {
|
|
2226
|
+
name: 'onBlur',
|
|
2227
|
+
description: 'Blur handler',
|
|
2228
|
+
type: 'FocusEventHandler'
|
|
2229
|
+
}, {
|
|
2230
|
+
name: 'onFocus',
|
|
2231
|
+
description: 'Focus handler',
|
|
2232
|
+
type: 'FocusEventHandler'
|
|
2233
|
+
}, {
|
|
2234
|
+
name: 'onSelect',
|
|
2235
|
+
description: 'Selection handler',
|
|
2236
|
+
type: '(event: SelectEvent, analyticsEvent: UIAnalyticsEvent) => void'
|
|
2237
|
+
}, {
|
|
2238
|
+
name: 'previouslySelected',
|
|
2239
|
+
description: 'Previously selected dates',
|
|
2240
|
+
type: 'string[]'
|
|
2241
|
+
}, {
|
|
2242
|
+
name: 'previousMonthLabel',
|
|
2243
|
+
description: 'Aria label for previous month button',
|
|
2244
|
+
type: 'string'
|
|
2245
|
+
}, {
|
|
2246
|
+
name: 'style',
|
|
2247
|
+
description: 'Custom styles',
|
|
2248
|
+
type: 'CSSProperties'
|
|
2249
|
+
}, {
|
|
2250
|
+
name: 'tabIndex',
|
|
2251
|
+
description: 'Tab index',
|
|
2252
|
+
type: '-1 | 0'
|
|
2253
|
+
}, {
|
|
2254
|
+
name: 'testId',
|
|
2255
|
+
description: 'Test ID for automated tests',
|
|
2256
|
+
type: 'string'
|
|
2257
|
+
}, {
|
|
2258
|
+
name: 'today',
|
|
2259
|
+
description: "Today's date (YYYY-MM-DD)",
|
|
2260
|
+
type: 'string'
|
|
2261
|
+
}, {
|
|
2262
|
+
name: 'weekStartDay',
|
|
2263
|
+
description: 'First day of week (0=Sunday)',
|
|
2264
|
+
type: '0-6'
|
|
2265
|
+
}, {
|
|
2266
|
+
name: 'year',
|
|
2267
|
+
description: 'Current year',
|
|
2268
|
+
type: 'number'
|
|
2269
|
+
}, {
|
|
2270
|
+
name: 'locale',
|
|
2271
|
+
description: 'Locale for date formatting',
|
|
2272
|
+
type: 'string'
|
|
2273
|
+
}]
|
|
2274
|
+
}, {
|
|
2275
|
+
name: 'DynamicTable',
|
|
2276
|
+
packageName: '@atlaskit/dynamic-table',
|
|
2277
|
+
description: 'A component for displaying dynamic data tables.',
|
|
2278
|
+
releasePhase: 'general_availability',
|
|
2279
|
+
category: 'Text and Data Display',
|
|
2280
|
+
example: `import DynamicTable from '@atlaskit/dynamic-table';
|
|
2281
|
+
|
|
2282
|
+
<DynamicTable
|
|
2283
|
+
head={{
|
|
2284
|
+
cells: [
|
|
2285
|
+
{ content: 'Header 1', isSortable: true },
|
|
2286
|
+
{ content: 'Header 2' }
|
|
2287
|
+
]
|
|
2288
|
+
}}
|
|
2289
|
+
rows={[
|
|
2290
|
+
{
|
|
2291
|
+
cells: [
|
|
2292
|
+
{ content: 'Cell 1', key: 'cell1' },
|
|
2293
|
+
{ content: 'Cell 2', key: 'cell2' }
|
|
2294
|
+
]
|
|
2295
|
+
}
|
|
2296
|
+
]}
|
|
2297
|
+
rowsPerPage={10}
|
|
2298
|
+
defaultPage={1}
|
|
2299
|
+
loadingSpinnerSize="large"
|
|
2300
|
+
isLoading={false}
|
|
2301
|
+
testId="dynamic-table-test"
|
|
2302
|
+
/>`,
|
|
2303
|
+
props: [{
|
|
2304
|
+
name: 'caption',
|
|
2305
|
+
description: 'Caption for the table styled as a heading',
|
|
2306
|
+
type: 'ReactNode'
|
|
2307
|
+
}, {
|
|
2308
|
+
name: 'head',
|
|
2309
|
+
description: 'Configuration for table headers',
|
|
2310
|
+
type: '{ cells: Array<{ content: ReactNode, isSortable?: boolean, width?: number }> }'
|
|
2311
|
+
}, {
|
|
2312
|
+
name: 'rows',
|
|
2313
|
+
description: 'Data rows for the table',
|
|
2314
|
+
type: 'Array<{ cells: Array<{ content: ReactNode, key: string }> }>'
|
|
2315
|
+
}, {
|
|
2316
|
+
name: 'emptyView',
|
|
2317
|
+
description: 'Content shown when the table has no data',
|
|
2318
|
+
type: 'ReactElement'
|
|
2319
|
+
}, {
|
|
2320
|
+
name: 'loadingSpinnerSize',
|
|
2321
|
+
description: 'Size of the loading spinner',
|
|
2322
|
+
type: "'large' | 'small'"
|
|
2323
|
+
}, {
|
|
2324
|
+
name: 'isLoading',
|
|
2325
|
+
description: 'Whether the table is in a loading state',
|
|
2326
|
+
type: 'boolean'
|
|
2327
|
+
}, {
|
|
2328
|
+
name: 'loadingLabel',
|
|
2329
|
+
description: 'Accessible name for loading state',
|
|
2330
|
+
type: 'string'
|
|
2331
|
+
}, {
|
|
2332
|
+
name: 'isFixedSize',
|
|
2333
|
+
description: 'Force columns to use initial width',
|
|
2334
|
+
type: 'boolean'
|
|
2335
|
+
}, {
|
|
2336
|
+
name: 'rowsPerPage',
|
|
2337
|
+
description: 'Number of rows per page',
|
|
2338
|
+
type: 'number'
|
|
2339
|
+
}, {
|
|
2340
|
+
name: 'totalRows',
|
|
2341
|
+
description: 'Total number of rows for pagination',
|
|
2342
|
+
type: 'number'
|
|
2343
|
+
}, {
|
|
2344
|
+
name: 'onSetPage',
|
|
2345
|
+
description: 'Handler for page changes',
|
|
2346
|
+
type: '(page: number, analyticsEvent?: UIAnalyticsEvent) => void'
|
|
2347
|
+
}, {
|
|
2348
|
+
name: 'onSort',
|
|
2349
|
+
description: 'Handler for column sorting',
|
|
2350
|
+
type: "(sortKey: string, sortOrder: 'ASC' | 'DESC', analyticsEvent?: UIAnalyticsEvent) => void"
|
|
2351
|
+
}, {
|
|
2352
|
+
name: 'onPageRowsUpdate',
|
|
2353
|
+
description: 'Handler for page row updates',
|
|
2354
|
+
type: 'Array<{ cells: Array<{ content: ReactNode, key: string }> }>) => void'
|
|
2355
|
+
}, {
|
|
2356
|
+
name: 'page',
|
|
2357
|
+
description: 'Current page number',
|
|
2358
|
+
type: 'number'
|
|
2359
|
+
}, {
|
|
2360
|
+
name: 'defaultPage',
|
|
2361
|
+
description: 'Initial page number',
|
|
2362
|
+
type: 'number'
|
|
2363
|
+
}, {
|
|
2364
|
+
name: 'sortKey',
|
|
2365
|
+
description: 'Column key for sorting',
|
|
2366
|
+
type: 'string'
|
|
2367
|
+
}, {
|
|
2368
|
+
name: 'defaultSortKey',
|
|
2369
|
+
description: 'Initial sort column',
|
|
2370
|
+
type: 'string'
|
|
2371
|
+
}, {
|
|
2372
|
+
name: 'sortOrder',
|
|
2373
|
+
description: 'Sort direction',
|
|
2374
|
+
type: "'ASC' | 'DESC'"
|
|
2375
|
+
}, {
|
|
2376
|
+
name: 'defaultSortOrder',
|
|
2377
|
+
description: 'Initial sort direction',
|
|
2378
|
+
type: "'ASC' | 'DESC'"
|
|
2379
|
+
}, {
|
|
2380
|
+
name: 'isRankable',
|
|
2381
|
+
description: 'Enable drag and drop sorting',
|
|
2382
|
+
type: 'boolean'
|
|
2383
|
+
}, {
|
|
2384
|
+
name: 'isRankingDisabled',
|
|
2385
|
+
description: 'Disable row dropping',
|
|
2386
|
+
type: 'boolean'
|
|
2387
|
+
}, {
|
|
2388
|
+
name: 'onRankStart',
|
|
2389
|
+
description: 'Handler for drag start',
|
|
2390
|
+
type: '(rankStart: { index: number }) => void'
|
|
2391
|
+
}, {
|
|
2392
|
+
name: 'onRankEnd',
|
|
2393
|
+
description: 'Handler for drop complete',
|
|
2394
|
+
type: '(rankEnd: { index: number, newIndex: number }) => void'
|
|
2395
|
+
}, {
|
|
2396
|
+
name: 'paginationi18n',
|
|
2397
|
+
description: 'Pagination labels',
|
|
2398
|
+
type: '{ label: string, next: string, pageLabel?: string, prev: string }'
|
|
2399
|
+
}, {
|
|
2400
|
+
name: 'highlightedRowIndex',
|
|
2401
|
+
description: 'Index(es) of highlighted rows',
|
|
2402
|
+
type: 'number | number[]'
|
|
2403
|
+
}, {
|
|
2404
|
+
name: 'testId',
|
|
2405
|
+
description: 'Test ID for automated testing',
|
|
2406
|
+
type: 'string'
|
|
2407
|
+
}, {
|
|
2408
|
+
name: 'label',
|
|
2409
|
+
description: 'Accessible label for the table',
|
|
2410
|
+
type: 'string'
|
|
2411
|
+
}]
|
|
2412
|
+
}, {
|
|
2413
|
+
name: 'ModalDialog',
|
|
2414
|
+
packageName: '@atlaskit/modal-dialog',
|
|
2415
|
+
description: 'A modal dialog component for important content.',
|
|
2416
|
+
releasePhase: 'general_availability',
|
|
2417
|
+
category: 'Messaging',
|
|
2418
|
+
example: `import React, { Fragment, useCallback, useState } from 'react';
|
|
2419
|
+
import Button from '@atlaskit/button/new';
|
|
2420
|
+
import Modal, {
|
|
2421
|
+
ModalBody,
|
|
2422
|
+
ModalFooter,
|
|
2423
|
+
ModalHeader,
|
|
2424
|
+
ModalTitle,
|
|
2425
|
+
ModalTransition,
|
|
2426
|
+
} from '@atlaskit/modal-dialog';
|
|
2427
|
+
|
|
2428
|
+
export default function Example() {
|
|
2429
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
2430
|
+
const openModal = useCallback(() => setIsOpen(true), []);
|
|
2431
|
+
const closeModal = useCallback(() => setIsOpen(false), []);
|
|
2432
|
+
|
|
2433
|
+
return (
|
|
2434
|
+
<Fragment>
|
|
2435
|
+
<Button aria-haspopup="dialog" appearance="primary" onClick={openModal}>
|
|
2436
|
+
Open modal
|
|
2437
|
+
</Button>
|
|
2438
|
+
|
|
2439
|
+
<ModalTransition>
|
|
2440
|
+
{isOpen && (
|
|
2441
|
+
<Modal onClose={closeModal}>
|
|
2442
|
+
<ModalHeader hasCloseButton>
|
|
2443
|
+
<ModalTitle>Default modal header</ModalTitle>
|
|
2444
|
+
</ModalHeader>
|
|
2445
|
+
<ModalBody>
|
|
2446
|
+
Your modal content.
|
|
2447
|
+
</ModalBody>
|
|
2448
|
+
<ModalFooter>
|
|
2449
|
+
<Button appearance="subtle">About modals</Button>
|
|
2450
|
+
<Button appearance="primary" onClick={closeModal}>
|
|
2451
|
+
Close
|
|
2452
|
+
</Button>
|
|
2453
|
+
</ModalFooter>
|
|
2454
|
+
</Modal>
|
|
2455
|
+
)}
|
|
2456
|
+
</ModalTransition>
|
|
2457
|
+
</Fragment>
|
|
2458
|
+
);
|
|
2459
|
+
}`,
|
|
2460
|
+
props: [{
|
|
2461
|
+
name: 'autoFocus',
|
|
2462
|
+
description: 'Focus is moved to the first interactive element or specified element',
|
|
2463
|
+
type: 'boolean | RefObject<HTMLElement>'
|
|
2464
|
+
}, {
|
|
2465
|
+
name: 'children',
|
|
2466
|
+
description: 'Contents of the modal dialog',
|
|
2467
|
+
type: 'ReactNode'
|
|
2468
|
+
}, {
|
|
2469
|
+
name: 'focusLockAllowlist',
|
|
2470
|
+
description: 'Callback to allowlist nodes for interaction outside focus lock',
|
|
2471
|
+
type: 'function'
|
|
2472
|
+
}, {
|
|
2473
|
+
name: 'height',
|
|
2474
|
+
description: 'Height of the modal dialog',
|
|
2475
|
+
type: 'number | string'
|
|
2476
|
+
}, {
|
|
2477
|
+
name: 'width',
|
|
2478
|
+
description: 'Width of the modal dialog',
|
|
2479
|
+
type: "'small' | 'medium' | 'large' | 'x-large' | number | string"
|
|
2480
|
+
}, {
|
|
2481
|
+
name: 'onClose',
|
|
2482
|
+
description: 'Callback when modal requests to close',
|
|
2483
|
+
type: '(KeyboardOrMouseEvent, UIAnalyticsEvent) => void'
|
|
2484
|
+
}, {
|
|
2485
|
+
name: 'onCloseComplete',
|
|
2486
|
+
description: 'Callback when modal finishes closing',
|
|
2487
|
+
type: '(element: HTMLElement) => void'
|
|
2488
|
+
}, {
|
|
2489
|
+
name: 'onOpenComplete',
|
|
2490
|
+
description: 'Callback when modal finishes opening',
|
|
2491
|
+
type: '(node: HTMLElement, isAppearing: boolean) => void'
|
|
2492
|
+
}, {
|
|
2493
|
+
name: 'onStackChange',
|
|
2494
|
+
description: 'Callback when modal changes stack position',
|
|
2495
|
+
type: '(stackIndex: number) => void'
|
|
2496
|
+
}, {
|
|
2497
|
+
name: 'shouldScrollInViewport',
|
|
2498
|
+
description: 'Set scroll boundary to viewport instead of modal body',
|
|
2499
|
+
type: 'boolean'
|
|
2500
|
+
}, {
|
|
2501
|
+
name: 'shouldCloseOnOverlayClick',
|
|
2502
|
+
description: 'Close modal when clicking the blanket',
|
|
2503
|
+
type: 'boolean'
|
|
2504
|
+
}, {
|
|
2505
|
+
name: 'shouldCloseOnEscapePress',
|
|
2506
|
+
description: 'Close modal when pressing escape',
|
|
2507
|
+
type: 'boolean'
|
|
2508
|
+
}, {
|
|
2509
|
+
name: 'shouldReturnFocus',
|
|
2510
|
+
description: 'Controls focus behavior on modal exit',
|
|
2511
|
+
type: 'boolean | RefObject<HTMLElement>'
|
|
2512
|
+
}, {
|
|
2513
|
+
name: 'isBlanketHidden',
|
|
2514
|
+
description: 'Remove blanket tinted background',
|
|
2515
|
+
type: 'boolean'
|
|
2516
|
+
}, {
|
|
2517
|
+
name: 'stackIndex',
|
|
2518
|
+
description: 'Position in modal stack (0 is highest)',
|
|
2519
|
+
type: 'number'
|
|
2520
|
+
}, {
|
|
2521
|
+
name: 'label',
|
|
2522
|
+
description: 'Accessibility label when no modal title is present',
|
|
2523
|
+
type: 'string'
|
|
2524
|
+
}, {
|
|
2525
|
+
name: 'testId',
|
|
2526
|
+
description: 'Test ID for automated testing',
|
|
2527
|
+
type: 'string'
|
|
2528
|
+
}]
|
|
2529
|
+
}, {
|
|
2530
|
+
name: 'Anchor',
|
|
2531
|
+
packageName: '@atlaskit/primitives/compiled',
|
|
2532
|
+
description: 'A primitive for creating accessible links.',
|
|
2533
|
+
releasePhase: 'general_availability',
|
|
2534
|
+
category: 'Primitives',
|
|
2535
|
+
example: `import { Anchor } from '@atlaskit/primitives/compiled';
|
|
2536
|
+
|
|
2537
|
+
<Anchor href="https://example.com">
|
|
2538
|
+
Visit example.com
|
|
2539
|
+
</Anchor>`,
|
|
2540
|
+
props: [{
|
|
2541
|
+
name: 'children',
|
|
2542
|
+
description: 'Elements to be rendered inside the Anchor',
|
|
2543
|
+
type: 'ReactNode'
|
|
2544
|
+
}, {
|
|
2545
|
+
name: 'onClick',
|
|
2546
|
+
description: 'Handler called on click with analytics event',
|
|
2547
|
+
type: '(e: MouseEvent, analyticsEvent: UIAnalyticsEvent) => void'
|
|
2548
|
+
}, {
|
|
2549
|
+
name: 'interactionName',
|
|
2550
|
+
description: 'Optional name for React UFO press interactions',
|
|
2551
|
+
type: 'string'
|
|
2552
|
+
}, {
|
|
2553
|
+
name: 'componentName',
|
|
2554
|
+
description: 'Optional component name for analytics events',
|
|
2555
|
+
type: 'string'
|
|
2556
|
+
}, {
|
|
2557
|
+
name: 'analyticsContext',
|
|
2558
|
+
description: 'Additional information for analytics events',
|
|
2559
|
+
type: 'Record<string, any>',
|
|
2560
|
+
exampleValue: "{ source: 'form', action: 'submit' }"
|
|
2561
|
+
}, {
|
|
2562
|
+
name: 'newWindowLabel',
|
|
2563
|
+
description: 'Override text for new window links',
|
|
2564
|
+
type: 'string'
|
|
2565
|
+
}, {
|
|
2566
|
+
name: 'ref',
|
|
2567
|
+
description: 'Forwarded ref',
|
|
2568
|
+
type: 'Ref'
|
|
2569
|
+
}, {
|
|
2570
|
+
name: 'testId',
|
|
2571
|
+
description: 'Test ID for automated testing',
|
|
2572
|
+
type: 'string'
|
|
2573
|
+
}, {
|
|
2574
|
+
name: 'role',
|
|
2575
|
+
description: 'ARIA role attribute',
|
|
2576
|
+
type: 'string'
|
|
2577
|
+
}]
|
|
2578
|
+
}, {
|
|
2579
|
+
name: 'Bleed',
|
|
2580
|
+
packageName: '@atlaskit/primitives/compiled',
|
|
2581
|
+
description: 'A utility for creating negative margin effects.',
|
|
2582
|
+
releasePhase: 'general_availability',
|
|
2583
|
+
category: 'Primitives',
|
|
2584
|
+
example: `import { Bleed } from '@atlaskit/primitives/compiled';
|
|
2585
|
+
|
|
2586
|
+
<Bleed
|
|
2587
|
+
inline="space.200"
|
|
2588
|
+
block="space.100"
|
|
2589
|
+
>
|
|
2590
|
+
Content that bleeds on all sides
|
|
2591
|
+
</Bleed>`,
|
|
2592
|
+
props: [{
|
|
2593
|
+
name: 'children',
|
|
2594
|
+
description: 'Elements to be rendered inside the Bleed',
|
|
2595
|
+
type: 'ReactNode'
|
|
2596
|
+
}, {
|
|
2597
|
+
name: 'all',
|
|
2598
|
+
description: 'Bleed along both axes',
|
|
2599
|
+
type: "'space.025' | 'space.050' | 'space.100' | 'space.150' | 'space.200'"
|
|
2600
|
+
}, {
|
|
2601
|
+
name: 'inline',
|
|
2602
|
+
description: 'Bleed along the inline axis',
|
|
2603
|
+
type: "'space.025' | 'space.050' | 'space.100' | 'space.150' | 'space.200'"
|
|
2604
|
+
}, {
|
|
2605
|
+
name: 'block',
|
|
2606
|
+
description: 'Bleed along the block axis',
|
|
2607
|
+
type: "'space.025' | 'space.050' | 'space.100' | 'space.150' | 'space.200'"
|
|
2608
|
+
}, {
|
|
2609
|
+
name: 'testId',
|
|
2610
|
+
description: 'Test ID for automated testing',
|
|
2611
|
+
type: 'string'
|
|
2612
|
+
}, {
|
|
2613
|
+
name: 'role',
|
|
2614
|
+
description: 'ARIA role attribute',
|
|
2615
|
+
type: 'string'
|
|
2616
|
+
}]
|
|
2617
|
+
}, {
|
|
2618
|
+
name: 'Show',
|
|
2619
|
+
packageName: '@atlaskit/primitives/compiled',
|
|
2620
|
+
description: 'A primitive for conditionally showing content at specific breakpoints. By default, content is hidden and will be shown at the specified breakpoint.',
|
|
2621
|
+
releasePhase: 'general_availability',
|
|
2622
|
+
category: 'Primitives',
|
|
2623
|
+
example: `import { Show } from '@atlaskit/primitives/compiled';
|
|
2624
|
+
|
|
2625
|
+
// Show content above medium breakpoint
|
|
2626
|
+
<Show above="md">
|
|
2627
|
+
<div>This content shows on medium screens and up</div>
|
|
2628
|
+
</Show>
|
|
2629
|
+
|
|
2630
|
+
// Show content below medium breakpoint
|
|
2631
|
+
<Show below="md">
|
|
2632
|
+
<div>This content shows on small screens and down</div>
|
|
2633
|
+
</Show>`,
|
|
2634
|
+
props: [{
|
|
2635
|
+
name: 'above',
|
|
2636
|
+
description: 'Shows content above the specified breakpoint',
|
|
2637
|
+
type: "'xs' | 'sm' | 'md' | 'lg' | 'xl'"
|
|
2638
|
+
}, {
|
|
2639
|
+
name: 'below',
|
|
2640
|
+
description: 'Shows content below the specified breakpoint',
|
|
2641
|
+
type: "'xs' | 'sm' | 'md' | 'lg' | 'xl'"
|
|
2642
|
+
}, {
|
|
2643
|
+
name: 'as',
|
|
2644
|
+
description: 'The DOM element to render as. Defaults to "div"',
|
|
2645
|
+
type: "'article' | 'aside' | 'dialog' | 'div' | 'footer' | 'header' | 'li' | 'main' | 'nav' | 'ol' | 'section' | 'span' | 'ul'"
|
|
2646
|
+
}, {
|
|
2647
|
+
name: 'children',
|
|
2648
|
+
description: 'Content to be conditionally shown',
|
|
2649
|
+
type: 'ReactNode'
|
|
2650
|
+
}, {
|
|
2651
|
+
name: 'xcss',
|
|
2652
|
+
description: 'Apply a subset of permitted styles powered by Atlassian Design System design tokens',
|
|
2653
|
+
type: 'StrictXCSSProp',
|
|
2654
|
+
exampleValue: 'xcss={cx(styles.root, isHovered && styles.hover)}'
|
|
2655
|
+
}, {
|
|
2656
|
+
name: 'testId',
|
|
2657
|
+
description: 'Test ID for automated testing',
|
|
2658
|
+
type: 'string'
|
|
2659
|
+
}, {
|
|
2660
|
+
name: 'role',
|
|
2661
|
+
description: 'ARIA role attribute',
|
|
2662
|
+
type: 'string'
|
|
2663
|
+
}]
|
|
2664
|
+
}, {
|
|
2665
|
+
name: 'Hide',
|
|
2666
|
+
packageName: '@atlaskit/primitives/compiled',
|
|
2667
|
+
description: 'A primitive for conditionally hiding content at specific breakpoints. By default, content is shown and will be hidden at the specified breakpoint.',
|
|
2668
|
+
releasePhase: 'general_availability',
|
|
2669
|
+
category: 'Primitives',
|
|
2670
|
+
example: `import { Hide } from '@atlaskit/primitives/compiled';
|
|
2671
|
+
|
|
2672
|
+
<Hide above="md">
|
|
2673
|
+
<div>This content hides on medium screens and up</div>
|
|
2674
|
+
</Hide>
|
|
2675
|
+
|
|
2676
|
+
<Hide below="md">
|
|
2677
|
+
<div>This content hides on small screens and down</div>
|
|
2678
|
+
</Hide>`,
|
|
2679
|
+
props: [{
|
|
2680
|
+
name: 'above',
|
|
2681
|
+
description: 'Hides content above the specified breakpoint',
|
|
2682
|
+
type: "'xs' | 'sm' | 'md' | 'lg' | 'xl'"
|
|
2683
|
+
}, {
|
|
2684
|
+
name: 'below',
|
|
2685
|
+
description: 'Hides content below the specified breakpoint',
|
|
2686
|
+
type: "'xs' | 'sm' | 'md' | 'lg' | 'xl'"
|
|
2687
|
+
}, {
|
|
2688
|
+
name: 'as',
|
|
2689
|
+
description: 'The DOM element to render as. Defaults to "div"',
|
|
2690
|
+
type: "'article' | 'aside' | 'dialog' | 'div' | 'footer' | 'header' | 'li' | 'main' | 'nav' | 'ol' | 'section' | 'span' | 'ul'"
|
|
2691
|
+
}, {
|
|
2692
|
+
name: 'children',
|
|
2693
|
+
description: 'Content to be conditionally hidden',
|
|
2694
|
+
type: 'ReactNode'
|
|
2695
|
+
}, {
|
|
2696
|
+
name: 'xcss',
|
|
2697
|
+
description: 'Apply a subset of permitted styles powered by Atlassian Design System design tokens',
|
|
2698
|
+
type: 'StrictXCSSProp',
|
|
2699
|
+
exampleValue: 'xcss={cx(styles.root, isHovered && styles.hover)}'
|
|
2700
|
+
}, {
|
|
2701
|
+
name: 'testId',
|
|
2702
|
+
description: 'Test ID for automated testing',
|
|
2703
|
+
type: 'string'
|
|
2704
|
+
}, {
|
|
2705
|
+
name: 'role',
|
|
2706
|
+
description: 'ARIA role attribute',
|
|
2707
|
+
type: 'string'
|
|
2708
|
+
}]
|
|
2709
|
+
}, {
|
|
2710
|
+
name: 'Flex',
|
|
2711
|
+
packageName: '@atlaskit/primitives/compiled',
|
|
2712
|
+
description: 'A primitive for creating flexible layouts using flexbox.',
|
|
2713
|
+
releasePhase: 'general_availability',
|
|
2714
|
+
category: 'Primitives',
|
|
2715
|
+
example: `import { Flex } from '@atlaskit/primitives/compiled';
|
|
2716
|
+
|
|
2717
|
+
<Flex gap="space.100" alignItems="center">
|
|
2718
|
+
<div>Item 1</div>
|
|
2719
|
+
<div>Item 2</div>
|
|
2720
|
+
<div>Item 3</div>
|
|
2721
|
+
</Flex>
|
|
2722
|
+
|
|
2723
|
+
// With responsive props
|
|
2724
|
+
<Flex
|
|
2725
|
+
gap={['space.100', 'space.200', 'space.300']}
|
|
2726
|
+
alignItems={['start', 'center', 'end']}
|
|
2727
|
+
>
|
|
2728
|
+
<div>Item 1</div>
|
|
2729
|
+
<div>Item 2</div>
|
|
2730
|
+
<div>Item 3</div>
|
|
2731
|
+
</Flex>`,
|
|
2732
|
+
props: [{
|
|
2733
|
+
name: 'alignItems',
|
|
2734
|
+
description: 'Aligns flex items along the cross axis',
|
|
2735
|
+
type: "'baseline' | 'center' | 'end' | 'start' | 'stretch'"
|
|
2736
|
+
}, {
|
|
2737
|
+
name: 'as',
|
|
2738
|
+
description: 'The DOM element to render as. Defaults to "div"',
|
|
2739
|
+
type: "'div' | 'span' | 'ul' | 'ol' | 'li' | 'dl'"
|
|
2740
|
+
}, {
|
|
2741
|
+
name: 'children',
|
|
2742
|
+
description: 'Elements to be rendered inside the Flex container',
|
|
2743
|
+
type: 'ReactNode'
|
|
2744
|
+
}, {
|
|
2745
|
+
name: 'direction',
|
|
2746
|
+
description: 'Direction of the flex container',
|
|
2747
|
+
type: "'column' | 'column-reverse' | 'row' | 'row-reverse'"
|
|
2748
|
+
}, {
|
|
2749
|
+
name: 'gap',
|
|
2750
|
+
description: 'Space between flex items',
|
|
2751
|
+
type: "'space.0' | 'space.025' | 'space.050' | 'space.075' | 'space.100' | 'space.150' | 'space.200' | 'space.250' | 'space.300' | 'space.400' | 'space.500' | 'space.600' | 'space.800' | 'space.1000'"
|
|
2752
|
+
}, {
|
|
2753
|
+
name: 'justify',
|
|
2754
|
+
description: 'Aligns flex items along the main axis',
|
|
2755
|
+
type: "'center' | 'end' | 'space-around' | 'space-between' | 'space-evenly' | 'start'"
|
|
2756
|
+
}, {
|
|
2757
|
+
name: 'wrap',
|
|
2758
|
+
description: 'Controls whether flex items can wrap to multiple lines',
|
|
2759
|
+
type: 'boolean'
|
|
2760
|
+
}, {
|
|
2761
|
+
name: 'xcss',
|
|
2762
|
+
description: 'Apply a subset of permitted styles powered by Atlassian Design System design tokens',
|
|
2763
|
+
type: 'StrictXCSSProp',
|
|
2764
|
+
exampleValue: 'xcss={cx(styles.root, isHovered && styles.hover)}'
|
|
2765
|
+
}, {
|
|
2766
|
+
name: 'testId',
|
|
2767
|
+
description: 'Test ID for automated testing',
|
|
2768
|
+
type: 'string'
|
|
2769
|
+
}, {
|
|
2770
|
+
name: 'role',
|
|
2771
|
+
description: 'ARIA role attribute',
|
|
2772
|
+
type: 'string'
|
|
2773
|
+
}]
|
|
2774
|
+
}, {
|
|
2775
|
+
name: 'Grid',
|
|
2776
|
+
packageName: '@atlaskit/primitives/compiled',
|
|
2777
|
+
description: 'A primitive for creating grid layouts.',
|
|
2778
|
+
releasePhase: 'general_availability',
|
|
2779
|
+
category: 'Primitives',
|
|
2780
|
+
example: `import { Grid } from '@atlaskit/primitives/compiled';
|
|
2781
|
+
|
|
2782
|
+
<Grid
|
|
2783
|
+
templateColumns="repeat(3, 1fr)"
|
|
2784
|
+
gap="space.100"
|
|
2785
|
+
>
|
|
2786
|
+
<div>Item 1</div>
|
|
2787
|
+
<div>Item 2</div>
|
|
2788
|
+
<div>Item 3</div>
|
|
2789
|
+
</Grid>
|
|
2790
|
+
|
|
2791
|
+
// With responsive props
|
|
2792
|
+
<Grid
|
|
2793
|
+
templateColumns={['1fr', 'repeat(2, 1fr)', 'repeat(3, 1fr)']}
|
|
2794
|
+
gap={['space.100', 'space.200', 'space.300']}
|
|
2795
|
+
>
|
|
2796
|
+
<div>Item 1</div>
|
|
2797
|
+
<div>Item 2</div>
|
|
2798
|
+
<div>Item 3</div>
|
|
2799
|
+
</Grid>`,
|
|
2800
|
+
props: [{
|
|
2801
|
+
name: 'as',
|
|
2802
|
+
description: 'The DOM element to render as. Defaults to "div"',
|
|
2803
|
+
type: "'div' | 'span' | 'ul' | 'ol'"
|
|
2804
|
+
}, {
|
|
2805
|
+
name: 'children',
|
|
2806
|
+
description: 'Elements to be rendered inside the Grid container',
|
|
2807
|
+
type: 'ReactNode'
|
|
2808
|
+
}, {
|
|
2809
|
+
name: 'columnGap',
|
|
2810
|
+
description: 'Space between grid columns',
|
|
2811
|
+
type: "'space.0' | 'space.025' | 'space.050' | 'space.075' | 'space.100' | 'space.150' | 'space.200' | 'space.250' | 'space.300' | 'space.400' | 'space.500' | 'space.600' | 'space.800' | 'space.1000'"
|
|
2812
|
+
}, {
|
|
2813
|
+
name: 'gap',
|
|
2814
|
+
description: 'Space between grid items (both rows and columns)',
|
|
2815
|
+
type: "'space.0' | 'space.025' | 'space.050' | 'space.075' | 'space.100' | 'space.150' | 'space.200' | 'space.250' | 'space.300' | 'space.400' | 'space.500' | 'space.600' | 'space.800' | 'space.1000'"
|
|
2816
|
+
}, {
|
|
2817
|
+
name: 'rowGap',
|
|
2818
|
+
description: 'Space between grid rows',
|
|
2819
|
+
type: "'space.0' | 'space.025' | 'space.050' | 'space.075' | 'space.100' | 'space.150' | 'space.200' | 'space.250' | 'space.300' | 'space.400' | 'space.500' | 'space.600' | 'space.800' | 'space.1000'"
|
|
2820
|
+
}, {
|
|
2821
|
+
name: 'templateColumns',
|
|
2822
|
+
description: 'Defines the columns of the grid with a space-separated list of values',
|
|
2823
|
+
type: 'string'
|
|
2824
|
+
}, {
|
|
2825
|
+
name: 'templateRows',
|
|
2826
|
+
description: 'Defines the rows of the grid with a space-separated list of values',
|
|
2827
|
+
type: 'string'
|
|
2828
|
+
}, {
|
|
2829
|
+
name: 'xcss',
|
|
2830
|
+
description: 'Apply a subset of permitted styles powered by Atlassian Design System design tokens',
|
|
2831
|
+
type: 'StrictXCSSProp',
|
|
2832
|
+
exampleValue: 'xcss={cx(styles.root, isHovered && styles.hover)}'
|
|
2833
|
+
}, {
|
|
2834
|
+
name: 'testId',
|
|
2835
|
+
description: 'Test ID for automated testing',
|
|
2836
|
+
type: 'string'
|
|
2837
|
+
}, {
|
|
2838
|
+
name: 'role',
|
|
2839
|
+
description: 'ARIA role attribute',
|
|
2840
|
+
type: 'string'
|
|
2841
|
+
}]
|
|
2842
|
+
}, {
|
|
2843
|
+
name: 'Stack',
|
|
2844
|
+
packageName: '@atlaskit/primitives/compiled',
|
|
2845
|
+
description: 'A primitive for creating vertical stacks of content with consistent spacing.',
|
|
2846
|
+
releasePhase: 'general_availability',
|
|
2847
|
+
category: 'Primitives',
|
|
2848
|
+
example: `import { Stack } from '@atlaskit/primitives/compiled';
|
|
2849
|
+
|
|
2850
|
+
<Stack gap="space.100">
|
|
2851
|
+
<div>Item 1</div>
|
|
2852
|
+
<div>Item 2</div>
|
|
2853
|
+
<div>Item 3</div>
|
|
2854
|
+
</Stack>
|
|
2855
|
+
|
|
2856
|
+
// With responsive props
|
|
2857
|
+
<Stack gap={['space.100', 'space.200', 'space.300']}>
|
|
2858
|
+
<div>Item 1</div>
|
|
2859
|
+
<div>Item 2</div>
|
|
2860
|
+
<div>Item 3</div>
|
|
2861
|
+
</Stack>`,
|
|
2862
|
+
props: [{
|
|
2863
|
+
name: 'as',
|
|
2864
|
+
description: 'The DOM element to render as. Defaults to "div"',
|
|
2865
|
+
type: "'div' | 'span' | 'ul' | 'ol'"
|
|
2866
|
+
}, {
|
|
2867
|
+
name: 'children',
|
|
2868
|
+
description: 'Elements to be rendered inside the Stack container',
|
|
2869
|
+
type: 'ReactNode'
|
|
2870
|
+
}, {
|
|
2871
|
+
name: 'gap',
|
|
2872
|
+
description: 'Space between stack items',
|
|
2873
|
+
type: "'space.0' | 'space.025' | 'space.050' | 'space.075' | 'space.100' | 'space.150' | 'space.200' | 'space.250' | 'space.300' | 'space.400' | 'space.500' | 'space.600' | 'space.800' | 'space.1000'"
|
|
2874
|
+
}, {
|
|
2875
|
+
name: 'xcss',
|
|
2876
|
+
description: 'Apply a subset of permitted styles powered by Atlassian Design System design tokens',
|
|
2877
|
+
type: 'StrictXCSSProp',
|
|
2878
|
+
exampleValue: 'xcss={cx(styles.root, isHovered && styles.hover)}'
|
|
2879
|
+
}, {
|
|
2880
|
+
name: 'testId',
|
|
2881
|
+
description: 'Test ID for automated testing',
|
|
2882
|
+
type: 'string'
|
|
2883
|
+
}, {
|
|
2884
|
+
name: 'role',
|
|
2885
|
+
description: 'ARIA role attribute',
|
|
2886
|
+
type: 'string'
|
|
2887
|
+
}]
|
|
2888
|
+
}, {
|
|
2889
|
+
name: 'Inline',
|
|
2890
|
+
packageName: '@atlaskit/primitives/compiled',
|
|
2891
|
+
description: 'A primitive for creating horizontal layouts with consistent spacing that can wrap to multiple lines.',
|
|
2892
|
+
releasePhase: 'general_availability',
|
|
2893
|
+
category: 'Primitives',
|
|
2894
|
+
example: `import { Inline } from '@atlaskit/primitives/compiled';
|
|
2895
|
+
|
|
2896
|
+
<Inline gap="space.100" alignItems="center">
|
|
2897
|
+
<div>Item 1</div>
|
|
2898
|
+
<div>Item 2</div>
|
|
2899
|
+
<div>Item 3</div>
|
|
2900
|
+
</Inline>
|
|
2901
|
+
|
|
2902
|
+
// With responsive props
|
|
2903
|
+
<Inline
|
|
2904
|
+
gap={['space.100', 'space.200', 'space.300']}
|
|
2905
|
+
alignItems={['start', 'center', 'end']}
|
|
2906
|
+
>
|
|
2907
|
+
<div>Item 1</div>
|
|
2908
|
+
<div>Item 2</div>
|
|
2909
|
+
<div>Item 3</div>
|
|
2910
|
+
</Inline>`,
|
|
2911
|
+
props: [{
|
|
2912
|
+
name: 'alignItems',
|
|
2913
|
+
description: 'Aligns items along the cross axis',
|
|
2914
|
+
type: "'baseline' | 'center' | 'end' | 'start' | 'stretch'"
|
|
2915
|
+
}, {
|
|
2916
|
+
name: 'as',
|
|
2917
|
+
description: 'The DOM element to render as. Defaults to "div"',
|
|
2918
|
+
type: "'div' | 'span' | 'ul' | 'ol' | 'li' | 'dl'"
|
|
2919
|
+
}, {
|
|
2920
|
+
name: 'children',
|
|
2921
|
+
description: 'Elements to be rendered inside the Inline container',
|
|
2922
|
+
type: 'ReactNode'
|
|
2923
|
+
}, {
|
|
2924
|
+
name: 'gap',
|
|
2925
|
+
description: 'Space between inline items',
|
|
2926
|
+
type: "'space.0' | 'space.025' | 'space.050' | 'space.075' | 'space.100' | 'space.150' | 'space.200' | 'space.250' | 'space.300' | 'space.400' | 'space.500' | 'space.600' | 'space.800' | 'space.1000'"
|
|
2927
|
+
}, {
|
|
2928
|
+
name: 'xcss',
|
|
2929
|
+
description: 'Apply a subset of permitted styles powered by Atlassian Design System design tokens',
|
|
2930
|
+
type: 'StrictXCSSProp',
|
|
2931
|
+
exampleValue: 'xcss={cx(styles.root, isHovered && styles.hover)}'
|
|
2932
|
+
}, {
|
|
2933
|
+
name: 'testId',
|
|
2934
|
+
description: 'Test ID for automated testing',
|
|
2935
|
+
type: 'string'
|
|
2936
|
+
}, {
|
|
2937
|
+
name: 'role',
|
|
2938
|
+
description: 'ARIA role attribute',
|
|
2939
|
+
type: 'string'
|
|
2940
|
+
}]
|
|
2941
|
+
}];
|