@atlaskit/ads-mcp 0.2.3 → 0.2.5

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