@atlaskit/ads-mcp 0.7.0 → 0.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/README.md +1 -1
- package/dist/cjs/tools/get-components/components.js +102 -70
- package/dist/es2019/tools/get-components/components.js +102 -70
- package/dist/esm/tools/get-components/components.js +102 -70
- package/dist/types/tools/get-components/components.d.ts +1 -1
- package/dist/types-ts4.5/tools/get-components/components.d.ts +1 -1
- package/index.js +12 -7
- package/package.json +2 -2
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Generates TypeScript components data for AI tooling from offerings.json files
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::d39d38cf9fe44e75308cd943349942d1>>
|
|
7
7
|
* @codegenCommand yarn workspace @af/ads-ai-tooling codegen:prototyping
|
|
8
8
|
*/
|
|
9
9
|
|
|
@@ -14,13 +14,13 @@ export const components = [{
|
|
|
14
14
|
category: 'images',
|
|
15
15
|
description: 'A component for displaying user avatars with support for images, initials, and status indicators. An avatar is a visual representation of a user or entity. It can display user images, initials, presence indicators, and status indicators. Avatars help users quickly identify people and entities in your application. They provide visual context and make interfaces more personal and engaging.',
|
|
16
16
|
status: 'general-availability',
|
|
17
|
-
examples: ['import Avatar from \'@atlaskit/avatar\';\nexport default [\n\t<Avatar src="https://example.com/avatar.jpg" name="John Doe" />,\n\t<Avatar name="Jane Smith" size="large" status="locked" />,\n\t<Avatar name="Bob Wilson" size="small" presence="online" status="approved" />,\n];'],
|
|
18
|
-
usageGuidelines: ['Use consistent sizing within the same context', 'Place avatars in logical groupings (e.g., team members)', 'Use presence indicators sparingly for real-time status only', 'Use status indicators for approval/permission states', 'Provide fallback initials when images fail to load', 'Use avatars to represent users, teams, projects, or any other entity that needs visual identification', 'Always provide meaningful names for accessibility'],
|
|
17
|
+
examples: ['import Avatar from \'@atlaskit/avatar\';\nexport default [\n\t<Avatar src="https://example.com/avatar.jpg" name="John Doe" />,\n\t<Avatar name="Jane Smith" appearance="hexagon" size="large" status="locked" />,\n\t<Avatar name="Bob Wilson" appearance="square" size="small" presence="online" status="approved" />,\n];'],
|
|
18
|
+
usageGuidelines: ['Use consistent sizing within the same context', 'Place avatars in logical groupings (e.g., team members)', 'Use presence indicators sparingly for real-time status only', 'Use status indicators for approval/permission states', 'Provide fallback initials when images fail to load', 'Use avatars to represent users, teams, projects, or any other entity that needs visual identification', 'Always provide meaningful names for accessibility', 'Use the `name` prop to include alternative text for screen readers', 'For decorative images, remove the `name` prop or leave it empty so it will be ignored by assistive technologies', "Don't use a tooltip with an avatar when it's non-interactive or disabled. The tooltip won't work for keyboard users and screen readers"],
|
|
19
19
|
contentGuidelines: ['Use full names when possible for better recognition', 'For companies/projects, use descriptive names', "Avoid generic terms like 'User' or 'Admin'", 'Use consistent naming conventions across your app', 'Keep names concise but meaningful'],
|
|
20
20
|
props: [{
|
|
21
21
|
name: 'appearance',
|
|
22
22
|
description: "Indicates the shape of the avatar. Most avatars are circular, but square avatars\ncan be used for 'container' objects.",
|
|
23
|
-
type: '"circle" | "square"'
|
|
23
|
+
type: '"circle" | "square" | "hexagon"'
|
|
24
24
|
}, {
|
|
25
25
|
name: 'as',
|
|
26
26
|
description: 'Replace the wrapping element. This accepts the name of a html tag which will\nbe used to wrap the element.',
|
|
@@ -97,7 +97,7 @@ export const components = [{
|
|
|
97
97
|
category: 'data-display',
|
|
98
98
|
description: 'A component for displaying multiple avatars in a group with overlap and overflow handling.',
|
|
99
99
|
status: 'general-availability',
|
|
100
|
-
examples: ["import AvatarGroup from '@atlaskit/avatar-group';\nexport default [\n\t<AvatarGroup\n\t\tappearance=\"stack\"\n\t\tsize=\"large\"\n\t\tonAvatarClick={console.log}\n\t\tdata={[\n\t\t\t{ key: 'uid1', name: 'Bob Smith' },\n\t\t\t{ key: 'uid2', name: '
|
|
100
|
+
examples: ["import AvatarGroup from '@atlaskit/avatar-group';\nexport default [\n\t<AvatarGroup\n\t\tappearance=\"stack\"\n\t\tsize=\"large\"\n\t\tonAvatarClick={console.log}\n\t\tdata={[\n\t\t\t{ key: 'uid1', name: 'Bob Smith' },\n\t\t\t{ key: 'uid2', name: 'Design System Team', appearance: 'square' },\n\t\t\t{ key: 'uid3', name: 'Review Agent', appearance: 'hexagon' },\n\t\t\t{ key: 'uid4', name: 'Carol Davis' },\n\t\t]}\n\t\tmaxCount={3}\n\t/>,\n];"],
|
|
101
101
|
accessibilityGuidelines: ['Provide clear labels for avatar groups', 'Use appropriate overflow handling', 'Ensure keyboard navigation support', 'Provide clear user identification'],
|
|
102
102
|
usageGuidelines: ['Use for displaying multiple users or team members', 'Consider overflow behavior for large groups', 'Use appropriate sizing for context', 'Provide clear user identification'],
|
|
103
103
|
contentGuidelines: ['Use meaningful names for users', 'Consider group context and purpose', 'Provide clear overflow indicators', 'Use consistent naming patterns'],
|
|
@@ -316,11 +316,11 @@ export const components = [{
|
|
|
316
316
|
}, {
|
|
317
317
|
name: 'iconAfter',
|
|
318
318
|
description: "Places an icon within the button, after the button's text.",
|
|
319
|
-
type: 'ComponentClass<Omit<IconProps, "size"> | Omit<NewIconProps, "
|
|
319
|
+
type: 'ComponentClass<Omit<IconProps, "size"> | Omit<NewIconProps, "spacing" | "size">, any> | FunctionComponent<Omit<IconProps, "size"> | Omit<...>>'
|
|
320
320
|
}, {
|
|
321
321
|
name: 'iconBefore',
|
|
322
322
|
description: "Places an icon within the button, before the button's text.",
|
|
323
|
-
type: 'ComponentClass<Omit<IconProps, "size"> | Omit<NewIconProps, "
|
|
323
|
+
type: 'ComponentClass<Omit<IconProps, "size"> | Omit<NewIconProps, "spacing" | "size">, any> | FunctionComponent<Omit<IconProps, "size"> | Omit<...>>'
|
|
324
324
|
}, {
|
|
325
325
|
name: 'isDisabled',
|
|
326
326
|
description: 'Disable the button to prevent user interaction.',
|
|
@@ -352,7 +352,7 @@ export const components = [{
|
|
|
352
352
|
}, {
|
|
353
353
|
name: 'spacing',
|
|
354
354
|
description: 'Controls the amount of padding in the button.',
|
|
355
|
-
type: '"
|
|
355
|
+
type: '"compact" | "default"'
|
|
356
356
|
}]
|
|
357
357
|
}, {
|
|
358
358
|
name: 'IconButton',
|
|
@@ -375,7 +375,7 @@ export const components = [{
|
|
|
375
375
|
}, {
|
|
376
376
|
name: 'icon',
|
|
377
377
|
description: 'Places an icon within the button.',
|
|
378
|
-
type: 'ComponentClass<Omit<IconProps, "size"> | Omit<NewIconProps, "
|
|
378
|
+
type: 'ComponentClass<Omit<IconProps, "size"> | Omit<NewIconProps, "spacing" | "size">, any> | FunctionComponent<Omit<IconProps, "size"> | Omit<...>>'
|
|
379
379
|
}, {
|
|
380
380
|
name: 'isDisabled',
|
|
381
381
|
description: 'Disable the button to prevent user interaction.',
|
|
@@ -419,7 +419,7 @@ export const components = [{
|
|
|
419
419
|
}, {
|
|
420
420
|
name: 'tooltip',
|
|
421
421
|
description: 'Props passed down to the Tooltip component.',
|
|
422
|
-
type: '{ testId?: string; analyticsContext?: Record<string, any>; content?: ReactNode | (({ update }: { update?: () => void; }) => ReactNode); component?: ComponentType<TooltipPrimitiveProps> | ForwardRefExoticComponent<...>; ...
|
|
422
|
+
type: '{ testId?: string; analyticsContext?: Record<string, any>; content?: ReactNode | (({ update }: { update?: () => void; }) => ReactNode); component?: ComponentType<TooltipPrimitiveProps> | ForwardRefExoticComponent<...>; ... 13 more ...; shortcut?: string[]; }'
|
|
423
423
|
}]
|
|
424
424
|
}, {
|
|
425
425
|
name: 'SplitButton',
|
|
@@ -828,15 +828,15 @@ export const components = [{
|
|
|
828
828
|
contentGuidelines: ['Use clear, readable code examples', 'Consider code formatting and indentation', 'Use meaningful variable names in examples', 'Keep code blocks focused and relevant'],
|
|
829
829
|
props: [{
|
|
830
830
|
name: 'codeBidiWarningLabel',
|
|
831
|
-
description:
|
|
831
|
+
description: 'Label for the bidi warning tooltip.',
|
|
832
832
|
type: 'string'
|
|
833
833
|
}, {
|
|
834
834
|
name: 'firstLineNumber',
|
|
835
|
-
description: 'Sets the number of the first line, if showLineNumbers is set to true
|
|
835
|
+
description: 'Sets the number of the first line, if showLineNumbers is set to true.',
|
|
836
836
|
type: 'number'
|
|
837
837
|
}, {
|
|
838
838
|
name: 'hasBidiWarnings',
|
|
839
|
-
description: 'When set to `false`, disables code decorating with bidi warnings
|
|
839
|
+
description: 'When set to `false`, disables code decorating with bidi warnings.',
|
|
840
840
|
type: 'boolean'
|
|
841
841
|
}, {
|
|
842
842
|
name: 'highlight',
|
|
@@ -852,7 +852,7 @@ export const components = [{
|
|
|
852
852
|
type: 'string'
|
|
853
853
|
}, {
|
|
854
854
|
name: 'isBidiWarningTooltipEnabled',
|
|
855
|
-
description: 'Sets whether to render tooltip with the warning or not.\nIntended to be disabled when used in a mobile view, such as in the editor via mobile bridge,\nwhere the tooltip could end up being cut off or otherwise not work as expected
|
|
855
|
+
description: 'Sets whether to render tooltip with the warning or not.\nIntended to be disabled when used in a mobile view, such as in the editor via mobile bridge,\nwhere the tooltip could end up being cut off or otherwise not work as expected.',
|
|
856
856
|
type: 'boolean'
|
|
857
857
|
}, {
|
|
858
858
|
name: 'label',
|
|
@@ -860,15 +860,15 @@ export const components = [{
|
|
|
860
860
|
type: 'string'
|
|
861
861
|
}, {
|
|
862
862
|
name: 'language',
|
|
863
|
-
description: 'Language reference designed to be populated from `SUPPORTED_LANGUAGES` in\n`design-system/code`. Run against language grammars from PrismJS (full list\navailable at [PrismJS documentation](https://prismjs.com/#supported-languages)).\n\nWhen set to "text" will not perform highlighting. If unsupported language\nprovided - code will be treated as "text" with no highlighting
|
|
864
|
-
type: '"text" | "PHP" | "php" | "php3" | "php4" | "php5" | "Java" | "java" | "CSharp" | "csharp" | "c#" | "Python" | "python" | "py" | "JavaScript" | "javascript" | "js" | "Html" | "html" | ...
|
|
863
|
+
description: 'Language reference designed to be populated from `SUPPORTED_LANGUAGES` in\n`design-system/code`. Run against language grammars from PrismJS (full list\navailable at [PrismJS documentation](https://prismjs.com/#supported-languages)).\n\nWhen set to "text" will not perform highlighting. If unsupported language\nprovided - code will be treated as "text" with no highlighting.',
|
|
864
|
+
type: '"text" | "PHP" | "php" | "php3" | "php4" | "php5" | "Java" | "java" | "CSharp" | "csharp" | "c#" | "Python" | "python" | "py" | "JavaScript" | "javascript" | "js" | "Html" | "html" | ... 234 more ... | "markdown"'
|
|
865
865
|
}, {
|
|
866
866
|
name: 'shouldShowLineNumbers',
|
|
867
|
-
description: 'Sets whether to display code line numbers or not
|
|
867
|
+
description: 'Sets whether to display code line numbers or not.',
|
|
868
868
|
type: 'boolean'
|
|
869
869
|
}, {
|
|
870
870
|
name: 'shouldWrapLongLines',
|
|
871
|
-
description: 'Sets whether long lines will create a horizontally scrolling container.\nWhen set to `true`, these lines will visually wrap instead
|
|
871
|
+
description: 'Sets whether long lines will create a horizontally scrolling container.\nWhen set to `true`, these lines will visually wrap instead.',
|
|
872
872
|
type: 'boolean'
|
|
873
873
|
}, {
|
|
874
874
|
name: 'text',
|
|
@@ -980,140 +980,140 @@ export const components = [{
|
|
|
980
980
|
contentGuidelines: ['Use clear, descriptive labels', 'Provide helpful placeholder text', 'Use appropriate date formats', 'Keep labels concise but descriptive'],
|
|
981
981
|
props: [{
|
|
982
982
|
name: 'aria-describedby',
|
|
983
|
-
description: 'Used to associate accessible descriptions to the date picker
|
|
983
|
+
description: 'Used to associate accessible descriptions to the date picker.',
|
|
984
984
|
type: 'string'
|
|
985
985
|
}, {
|
|
986
986
|
name: 'autoFocus',
|
|
987
|
-
description: 'Set the picker to autofocus on mount
|
|
987
|
+
description: 'Set the picker to autofocus on mount.',
|
|
988
988
|
type: 'boolean'
|
|
989
989
|
}, {
|
|
990
990
|
name: 'clearControlLabel',
|
|
991
|
-
description: 'Set the `aria-label` for the clear button.\nAdd the word "Clear" at the beginning of the clearControlLabel.\nFor instance, for a field to set an appointment, use "Clear appointment date and time"
|
|
991
|
+
description: 'Set the `aria-label` for the clear button.\nAdd the word "Clear" at the beginning of the clearControlLabel.\nFor instance, for a field to set an appointment, use "Clear appointment date and time".',
|
|
992
992
|
type: 'string'
|
|
993
993
|
}, {
|
|
994
994
|
name: 'dateFormat',
|
|
995
|
-
description: "Format the date with a string that is accepted by [date-fns's format\nfunction](https://date-fns.org/v1.29.0/docs/format). **This does not affect\nhow the input is parsed.** This must be done using the `parseInputValue`\nprop.\n\nNote that though we are using `date-fns` version 2, we use [the tokens from\n`date-fns` version 1](https://date-fns.org/v1.30.1/docs/format) under the\nhood
|
|
995
|
+
description: "Format the date with a string that is accepted by [date-fns's format\nfunction](https://date-fns.org/v1.29.0/docs/format). **This does not affect\nhow the input is parsed.** This must be done using the `parseInputValue`\nprop.\n\nNote that though we are using `date-fns` version 2, we use [the tokens from\n`date-fns` version 1](https://date-fns.org/v1.30.1/docs/format) under the\nhood.",
|
|
996
996
|
type: 'string'
|
|
997
997
|
}, {
|
|
998
998
|
name: 'defaultValue',
|
|
999
|
-
description: 'The default for `value
|
|
999
|
+
description: 'The default for `value`.',
|
|
1000
1000
|
type: 'string'
|
|
1001
1001
|
}, {
|
|
1002
1002
|
name: 'disabled',
|
|
1003
|
-
description: 'An array of ISO dates that should be disabled on the calendar. This does not affect what users can type into the picker
|
|
1003
|
+
description: 'An array of ISO dates that should be disabled on the calendar. This does not affect what users can type into the picker.',
|
|
1004
1004
|
type: 'string[]'
|
|
1005
1005
|
}, {
|
|
1006
1006
|
name: 'disabledDateFilter',
|
|
1007
|
-
description: 'A filter function for disabling dates on the calendar. This does not affect what users can type into the picker.\n\nThe function is called with a date string in the format `YYYY-MM-DD` and should return `true` if the date should be disabled
|
|
1008
|
-
type: '(
|
|
1007
|
+
description: 'A filter function for disabling dates on the calendar. This does not affect what users can type into the picker.\n\nThe function is called with a date string in the format `YYYY-MM-DD` and should return `true` if the date should be disabled.',
|
|
1008
|
+
type: '(date: string) => boolean'
|
|
1009
1009
|
}, {
|
|
1010
1010
|
name: 'formatDisplayLabel',
|
|
1011
|
-
description: "A function for formatting the date displayed in the input. By default composes together [`date-fns`'s parse method](https://date-fns.org/v1.29.0/docs/parse) and [`date-fns`'s format method](https://date-fns.org/v1.29.0/docs/format) to return a correctly formatted date string.\n\nNote that this does not affect how the input is parsed. This must be done using the `parseInputValue` prop
|
|
1011
|
+
description: "A function for formatting the date displayed in the input. By default composes together [`date-fns`'s parse method](https://date-fns.org/v1.29.0/docs/parse) and [`date-fns`'s format method](https://date-fns.org/v1.29.0/docs/format) to return a correctly formatted date string.\n\nNote that this does not affect how the input is parsed. This must be done using the `parseInputValue` prop.",
|
|
1012
1012
|
type: '(value: string, dateFormat: string) => string'
|
|
1013
1013
|
}, {
|
|
1014
1014
|
name: 'id',
|
|
1015
|
-
description: 'Set the id of the field.\nAssociates a `<label></label>` with the field
|
|
1015
|
+
description: 'Set the id of the field.\nAssociates a `<label></label>` with the field.',
|
|
1016
1016
|
type: 'string'
|
|
1017
1017
|
}, {
|
|
1018
1018
|
name: 'inputLabel',
|
|
1019
|
-
description:
|
|
1019
|
+
description: 'The name of the input, used when `shouldShowCalendarButton` is true. See `shouldShowCalendarButton` description for more details.',
|
|
1020
1020
|
type: 'string'
|
|
1021
1021
|
}, {
|
|
1022
1022
|
name: 'inputLabelId',
|
|
1023
|
-
description: 'The ID of the label for the input, used when `shouldShowCalendarButton` is\ntrue. See `shouldShowCalendarButton` description for more details
|
|
1023
|
+
description: 'The ID of the label for the input, used when `shouldShowCalendarButton` is\ntrue. See `shouldShowCalendarButton` description for more details.',
|
|
1024
1024
|
type: 'string'
|
|
1025
1025
|
}, {
|
|
1026
1026
|
name: 'isDisabled',
|
|
1027
|
-
description: 'Set if the picker is disabled
|
|
1027
|
+
description: 'Set if the picker is disabled.',
|
|
1028
1028
|
type: 'boolean'
|
|
1029
1029
|
}, {
|
|
1030
1030
|
name: 'isInvalid',
|
|
1031
|
-
description: 'Set if the picker has an invalid value
|
|
1031
|
+
description: 'Set if the picker has an invalid value.',
|
|
1032
1032
|
type: 'boolean'
|
|
1033
1033
|
}, {
|
|
1034
1034
|
name: 'isOpen',
|
|
1035
|
-
description: 'Set if the picker is open
|
|
1035
|
+
description: 'Set if the picker is open.',
|
|
1036
1036
|
type: 'boolean'
|
|
1037
1037
|
}, {
|
|
1038
1038
|
name: 'isRequired',
|
|
1039
|
-
description: 'Set the field as required
|
|
1039
|
+
description: 'Set the field as required.',
|
|
1040
1040
|
type: 'boolean'
|
|
1041
1041
|
}, {
|
|
1042
1042
|
name: 'label',
|
|
1043
|
-
description: 'Accessible name for the Date Picker Select, rendered as `aria-label`. This will override any other method of providing a label
|
|
1043
|
+
description: 'Accessible name for the Date Picker Select, rendered as `aria-label`. This will override any other method of providing a label.',
|
|
1044
1044
|
type: 'string'
|
|
1045
1045
|
}, {
|
|
1046
1046
|
name: 'locale',
|
|
1047
|
-
description: 'Locale used to format the date and calendar. See [DateTimeFormat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat)
|
|
1047
|
+
description: 'Locale used to format the date and calendar. See [DateTimeFormat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat).',
|
|
1048
1048
|
type: 'string'
|
|
1049
1049
|
}, {
|
|
1050
1050
|
name: 'maxDate',
|
|
1051
|
-
description: 'The latest enabled date. Dates after this are disabled on the calendar. This does not affect what users can type into the picker
|
|
1051
|
+
description: 'The latest enabled date. Dates after this are disabled on the calendar. This does not affect what users can type into the picker.',
|
|
1052
1052
|
type: 'string'
|
|
1053
1053
|
}, {
|
|
1054
1054
|
name: 'menuInnerWrapper',
|
|
1055
|
-
description: 'This overrides the inner wrapper the Calendar.\n@private Please use this with extreme caution, this API may be changed in the future
|
|
1055
|
+
description: 'This overrides the inner wrapper the Calendar.\n@private Please use this with extreme caution, this API may be changed in the future.',
|
|
1056
1056
|
type: 'ComponentClass<{ children: ReactNode; }, any> | FunctionComponent<{ children: ReactNode; }>'
|
|
1057
1057
|
}, {
|
|
1058
1058
|
name: 'minDate',
|
|
1059
|
-
description: 'The earliest enabled date. Dates before this are disabled on the calendar. This does not affect what users can type into the picker
|
|
1059
|
+
description: 'The earliest enabled date. Dates before this are disabled on the calendar. This does not affect what users can type into the picker.',
|
|
1060
1060
|
type: 'string'
|
|
1061
1061
|
}, {
|
|
1062
1062
|
name: 'name',
|
|
1063
|
-
description: 'The name of the field
|
|
1063
|
+
description: 'The name of the field.',
|
|
1064
1064
|
type: 'string'
|
|
1065
1065
|
}, {
|
|
1066
1066
|
name: 'nextMonthLabel',
|
|
1067
|
-
description: 'The aria-label attribute associated with the next-month arrow
|
|
1067
|
+
description: 'The aria-label attribute associated with the next-month arrow.',
|
|
1068
1068
|
type: 'string'
|
|
1069
1069
|
}, {
|
|
1070
1070
|
name: 'onBlur',
|
|
1071
|
-
description: 'Called when the field is blurred
|
|
1072
|
-
type: '
|
|
1071
|
+
description: 'Called when the field is blurred.',
|
|
1072
|
+
type: '(event: FocusEvent<HTMLInputElement, Element>) => void'
|
|
1073
1073
|
}, {
|
|
1074
1074
|
name: 'onChange',
|
|
1075
|
-
description: 'Called when the value changes. The only argument is an ISO time or empty string
|
|
1076
|
-
type: '(
|
|
1075
|
+
description: 'Called when the value changes. The only argument is an ISO time or empty string.',
|
|
1076
|
+
type: '(value: string) => void'
|
|
1077
1077
|
}, {
|
|
1078
1078
|
name: 'onFocus',
|
|
1079
|
-
description: 'Called when the field is focused
|
|
1080
|
-
type: '
|
|
1079
|
+
description: 'Called when the field is focused.',
|
|
1080
|
+
type: '(event: FocusEvent<HTMLInputElement, Element>) => void'
|
|
1081
1081
|
}, {
|
|
1082
1082
|
name: 'openCalendarLabel',
|
|
1083
|
-
description: 'The label associated with the button to open the calendar, rendered via the\n`shouldShowCalendarButton` prop. If a `label` prop is provided, this\ncalendar button label will be prefixed by the value of `label`. If no\n`label` prop is provided, this prefix should be manually added. For\nexample,\n\n```tsx\n<label id="label" htmlFor="datepicker">Desired Appointment Date</label>\n<DatePicker\n\tid="datepicker"\n\tshouldShowCalendarButton\n\tinputLabel="Desired Appointment Date"\n\topenCalendarLabel="open calendar"\n/>\n
|
|
1083
|
+
description: 'The label associated with the button to open the calendar, rendered via the\n`shouldShowCalendarButton` prop. If a `label` prop is provided, this\ncalendar button label will be prefixed by the value of `label`. If no\n`label` prop is provided, this prefix should be manually added. For\nexample,\n\n```tsx\n<label id="label" htmlFor="datepicker">Desired Appointment Date</label>\n<DatePicker\n\tid="datepicker"\n\tshouldShowCalendarButton\n\tinputLabel="Desired Appointment Date"\n\topenCalendarLabel="open calendar"\n/>\n```',
|
|
1084
1084
|
type: 'string'
|
|
1085
1085
|
}, {
|
|
1086
1086
|
name: 'parseInputValue',
|
|
1087
|
-
description: 'A function for parsing input characters and transforming them into a Date object.\nBy default parses the date string based off the locale. Note that this does\nnot affect how the resulting value is displayed in the input. Use the\n`dateFormat` or `formatDisplayLabel` prop to handle how the value is\ndisplayed
|
|
1087
|
+
description: 'A function for parsing input characters and transforming them into a Date object.\nBy default parses the date string based off the locale. Note that this does\nnot affect how the resulting value is displayed in the input. Use the\n`dateFormat` or `formatDisplayLabel` prop to handle how the value is\ndisplayed.',
|
|
1088
1088
|
type: '(date: string, dateFormat: string) => Date'
|
|
1089
1089
|
}, {
|
|
1090
1090
|
name: 'placeholder',
|
|
1091
|
-
description: 'Placeholder text displayed in input
|
|
1091
|
+
description: 'Placeholder text displayed in input.',
|
|
1092
1092
|
type: 'string'
|
|
1093
1093
|
}, {
|
|
1094
1094
|
name: 'previousMonthLabel',
|
|
1095
|
-
description: 'The aria-label attribute associated with the previous-month arrow
|
|
1095
|
+
description: 'The aria-label attribute associated with the previous-month arrow.',
|
|
1096
1096
|
type: 'string'
|
|
1097
1097
|
}, {
|
|
1098
1098
|
name: 'selectProps',
|
|
1099
1099
|
description: '',
|
|
1100
|
-
type: 'Omit<SelectProps<OptionType, false>, "aria-
|
|
1100
|
+
type: 'Omit<SelectProps<OptionType, false>, "aria-describedby" | "placeholder" | "aria-label" | "inputId"> & { \'aria-describedby\'?: never; \'aria-label\'?: never; inputId?: never; placeholder?: never; }'
|
|
1101
1101
|
}, {
|
|
1102
1102
|
name: 'shouldShowCalendarButton',
|
|
1103
|
-
description: 'Provides a functional calendar button that opens the calendar picker that\nlives on the right side of the date picker.\n\nThe accessible name for this button is caculated using either the `label`,\n`inputLabel`, or `inputLabelId` props, along with the `openCalendarLabel`\nprop
|
|
1103
|
+
description: 'Provides a functional calendar button that opens the calendar picker that\nlives on the right side of the date picker.\n\nThe accessible name for this button is caculated using either the `label`,\n`inputLabel`, or `inputLabelId` props, along with the `openCalendarLabel`\nprop.',
|
|
1104
1104
|
type: 'boolean'
|
|
1105
1105
|
}, {
|
|
1106
1106
|
name: 'spacing',
|
|
1107
|
-
description: 'The spacing for the select control.\n\nCompact is `gridSize() * 4`, default is `gridSize * 5
|
|
1108
|
-
type: '"
|
|
1107
|
+
description: 'The spacing for the select control.\n\nCompact is `gridSize() * 4`, default is `gridSize * 5`.',
|
|
1108
|
+
type: '"default" | "compact"'
|
|
1109
1109
|
}, {
|
|
1110
1110
|
name: 'value',
|
|
1111
|
-
description: 'The ISO time used as the input value
|
|
1111
|
+
description: 'The ISO time used as the input value.',
|
|
1112
1112
|
type: 'string'
|
|
1113
1113
|
}, {
|
|
1114
1114
|
name: 'weekStartDay',
|
|
1115
|
-
description: 'Start day of the week for the calendar.\n- `0` sunday (default value)\n- `1` monday\n- `2` tuesday\n- `3` wednesday\n- `4` thursday\n- `5` friday\n- `6` saturday
|
|
1116
|
-
type: '0 |
|
|
1115
|
+
description: 'Start day of the week for the calendar.\n- `0` sunday (default value)\n- `1` monday\n- `2` tuesday\n- `3` wednesday\n- `4` thursday\n- `5` friday\n- `6` saturday',
|
|
1116
|
+
type: '0 | 1 | 2 | 3 | 4 | 5 | 6'
|
|
1117
1117
|
}]
|
|
1118
1118
|
}, {
|
|
1119
1119
|
name: 'TimePicker',
|
|
@@ -1612,7 +1612,7 @@ export const components = [{
|
|
|
1612
1612
|
description: 'A component for displaying brief messages.',
|
|
1613
1613
|
status: 'general-availability',
|
|
1614
1614
|
examples: ['import Flag, { FlagGroup } from \'@atlaskit/flag\';\nimport InfoIcon from \'@atlaskit/icon/core/status-information\';\nexport default [\n\t<FlagGroup>\n\t\t<Flag\n\t\t\tid="flag-1"\n\t\t\ticon={<InfoIcon label="Info" />}\n\t\t\ttitle="Success"\n\t\t\tdescription="Your changes have been saved successfully."\n\t\t\tappearance="success"\n\t\t/>\n\t</FlagGroup>,\n\t<FlagGroup>\n\t\t<Flag\n\t\t\tid="flag-2"\n\t\t\ticon={<InfoIcon label="Warning" />}\n\t\t\ttitle="Warning"\n\t\t\tdescription="This action cannot be undone."\n\t\t\tappearance="warning"\n\t\t\tactions={[\n\t\t\t\t{\n\t\t\t\t\tcontent: \'Proceed\',\n\t\t\t\t\tonClick: () => console.log(\'Proceed clicked\'),\n\t\t\t\t},\n\t\t\t]}\n\t\t/>\n\t</FlagGroup>,\n\t<FlagGroup>\n\t\t<Flag\n\t\t\tid="flag-3"\n\t\t\ticon={<InfoIcon label="Error" />}\n\t\t\ttitle="Error"\n\t\t\tdescription="Something went wrong. Please try again."\n\t\t\tappearance="error"\n\t\t\tactions={[\n\t\t\t\t{\n\t\t\t\t\tcontent: \'Retry\',\n\t\t\t\t\tonClick: () => console.log(\'Retry clicked\'),\n\t\t\t\t},\n\t\t\t]}\n\t\t/>\n\t</FlagGroup>,\n];'],
|
|
1615
|
-
accessibilityGuidelines: ['Ensure flag content is announced by screen readers', 'Use appropriate timing for auto-dismiss', 'Provide clear action options', 'Consider screen reader announcement conflicts'],
|
|
1615
|
+
accessibilityGuidelines: ['Ensure flag content is announced by screen readers', 'Use appropriate timing for auto-dismiss', 'Provide clear action options', 'Consider screen reader announcement conflicts', 'Use an h2 heading level for the title', 'Use the `headingLevel` prop to maintain proper heading hierarchy'],
|
|
1616
1616
|
usageGuidelines: ['Use for confirmations and alerts needing minimal interaction', 'Display event-driven messages', 'Position at bottom left of screen', 'Consider auto-dismiss timing'],
|
|
1617
1617
|
contentGuidelines: ['Be clear about what went wrong for errors', 'Provide specific steps to resolve issues', 'Use a helpful, non-threatening tone', 'Clearly state potential consequences for warnings', 'Confirm outcome then get out of the way for success messages'],
|
|
1618
1618
|
props: [{
|
|
@@ -1679,11 +1679,15 @@ export const components = [{
|
|
|
1679
1679
|
category: 'form',
|
|
1680
1680
|
description: 'A component for building forms with validation and state management.',
|
|
1681
1681
|
status: 'general-availability',
|
|
1682
|
-
examples: ['import Button from \'@atlaskit/button/new\';\nimport { Checkbox } from \'@atlaskit/checkbox\';\nimport Form, { CheckboxField, ErrorMessage, Field, FormFooter, FormHeader } from \'@atlaskit/form\';\nimport TextField from \'@atlaskit/textfield\';\nexport default [\n\t<Form onSubmit={(data) => console.log(\'validated form\', data)}>\n\t\t
|
|
1682
|
+
examples: ['import Button from \'@atlaskit/button/new\';\nimport { Checkbox } from \'@atlaskit/checkbox\';\nimport Form, { CheckboxField, ErrorMessage, Field, FormFooter, FormHeader } from \'@atlaskit/form\';\nimport TextField from \'@atlaskit/textfield\';\nexport default [\n\t<Form onSubmit={(data) => console.log(\'validated form\', data)}>\n\t\t<FormHeader title="Basic Form">\n\t\t\t<p>Fill out the form below</p>\n\t\t</FormHeader>\n\t\t<Field\n\t\t\tname="username"\n\t\t\tlabel="Username"\n\t\t\tisRequired\n\t\t\tvalidate={(value) => (value && value.length < 3 ? \'Too short\' : undefined)}\n\t\t>\n\t\t\t{({ fieldProps, error }) => (\n\t\t\t\t<>\n\t\t\t\t\t<TextField {...fieldProps} />\n\t\t\t\t\t{error && <ErrorMessage>Username must be at least 3 characters</ErrorMessage>}\n\t\t\t\t</>\n\t\t\t)}\n\t\t</Field>\n\t\t<CheckboxField name="terms" value="terms">\n\t\t\t{({ fieldProps }) => <Checkbox {...fieldProps} label="I accept the terms" />}\n\t\t</CheckboxField>\n\t\t<FormFooter>\n\t\t\t<Button type="submit" appearance="primary">\n\t\t\t\tCreate Account\n\t\t\t</Button>\n\t\t</FormFooter>\n\t</Form>,\n];'],
|
|
1683
1683
|
accessibilityGuidelines: ['Provide clear labels for all form fields', 'Use appropriate error messaging', 'Ensure keyboard navigation between fields', 'Mark required fields clearly', 'Provide helpful validation feedback'],
|
|
1684
1684
|
usageGuidelines: ['Use for complex forms with validation', 'Provide clear field labels and instructions', 'Use single column layout for better comprehension', 'Mark required fields with asterisk (*)', 'Provide specific error messages'],
|
|
1685
1685
|
contentGuidelines: ['Use clear, concise labels', 'Write helpful placeholder text', 'Provide specific error messages', 'Use consistent terminology', 'Always include a visible label (exception: search fields)', 'Match field length to intended content length'],
|
|
1686
1686
|
props: [{
|
|
1687
|
+
name: 'autocomplete',
|
|
1688
|
+
description: "Indicates whether the value of the form's controls can be automatically completed by the browser. It is `on` by default.",
|
|
1689
|
+
type: '"off" | "on"'
|
|
1690
|
+
}, {
|
|
1687
1691
|
name: 'children',
|
|
1688
1692
|
description: 'The contents rendered inside of the form. This is a function where the props will be passed from the form. The function props you can access are `dirty`, `submitting` and `disabled`.\n You can read more about these props in [react-final form documentation](https://final-form.org/docs/final-form/types/FormState).',
|
|
1689
1693
|
type: '(() => void) | React.ReactNode | ((args: FormChildrenArgs<FormValues>) => React.ReactNode)'
|
|
@@ -1691,14 +1695,38 @@ export const components = [{
|
|
|
1691
1695
|
name: 'formProps',
|
|
1692
1696
|
description: 'When `Form` renders JSX children directly and not using a function to\nspread `formProps` manually, the properties in this `formProps` prop will\nbe spread on an internally rendered HTML `form` element.',
|
|
1693
1697
|
type: '{ [x: string]: any; } & ExcludeReservedFormProps'
|
|
1698
|
+
}, {
|
|
1699
|
+
name: 'id',
|
|
1700
|
+
description: '`id` attribute applied to the `form` element.',
|
|
1701
|
+
type: 'string'
|
|
1694
1702
|
}, {
|
|
1695
1703
|
name: 'isDisabled',
|
|
1696
1704
|
description: 'Sets the form and its fields as disabled. Users cannot edit or focus on the fields.',
|
|
1697
1705
|
type: 'boolean'
|
|
1706
|
+
}, {
|
|
1707
|
+
name: 'label',
|
|
1708
|
+
description: 'Accessible name to be applied to the form element. Maps to the `aria-label` attribute.',
|
|
1709
|
+
type: 'string'
|
|
1710
|
+
}, {
|
|
1711
|
+
name: 'labelId',
|
|
1712
|
+
description: 'ID of the element that has the accessible name to be applied to the form element. Maps to the `aria-labelledby` attribute.',
|
|
1713
|
+
type: 'string'
|
|
1714
|
+
}, {
|
|
1715
|
+
name: 'name',
|
|
1716
|
+
description: '`name` attribute applied to the `form` element.',
|
|
1717
|
+
type: 'string'
|
|
1718
|
+
}, {
|
|
1719
|
+
name: 'noValidate',
|
|
1720
|
+
description: 'Indicates if the inputs within the form will bypass HTML5 constraint\nvalidation when submitted. This is not recommended to be used because it\ncan cause experiences to be inaccessible. It is `false` by default but will\nbe set to `true` in the future to increase accessibility, so it is **not recommended**.',
|
|
1721
|
+
type: 'boolean'
|
|
1698
1722
|
}, {
|
|
1699
1723
|
name: 'onSubmit',
|
|
1700
1724
|
description: 'Event handler called when the form is submitted. Fields must be free of validation errors.',
|
|
1701
1725
|
type: '(values: FormValues, form: FormApi<FormValues>, callback?: (errors?: Record<string, string>) => void) => void | Object | Promise<...>'
|
|
1726
|
+
}, {
|
|
1727
|
+
name: 'xcss',
|
|
1728
|
+
description: 'Apply a subset of permitted styles powered by Atlassian Design System design tokens.',
|
|
1729
|
+
type: 'false | (XCSSValue<"flex" | "grid" | "fill" | "stroke" | "all" | "bottom" | "left" | "right" | "top" | "clip" | "accentColor" | "alignContent" | "alignItems" | "alignSelf" | "alignTracks" | ... 458 more ... | "vectorEffect", DesignTokenStyles, ""> & ... 4 more ... & { ...; })'
|
|
1702
1730
|
}]
|
|
1703
1731
|
}, {
|
|
1704
1732
|
name: 'Heading',
|
|
@@ -1730,7 +1758,7 @@ export const components = [{
|
|
|
1730
1758
|
}, {
|
|
1731
1759
|
name: 'size',
|
|
1732
1760
|
description: 'Heading size. This value is detached from the specific heading level applied to allow for more flexibility.\nUse instead of the deprecated `level` prop.',
|
|
1733
|
-
type: '"
|
|
1761
|
+
type: '"xxlarge" | "xlarge" | "large" | "medium" | "small" | "xsmall" | "xxsmall"'
|
|
1734
1762
|
}]
|
|
1735
1763
|
}, {
|
|
1736
1764
|
name: 'HeadingContextProvider',
|
|
@@ -2605,7 +2633,7 @@ export const components = [{
|
|
|
2605
2633
|
contentGuidelines: ['Use for appropriate layout purposes', 'Maintain consistent spacing and layout patterns', 'Consider accessibility and semantic structure'],
|
|
2606
2634
|
props: [{
|
|
2607
2635
|
name: 'as',
|
|
2608
|
-
description: "The DOM element to render as the Box.\n- This cannot be any SVG-related element such as `'svg'`, `'animate', `'circle'`, and many more\n- This cannot be a `'a'` (use the `Anchor` primitive instead)\n- This cannot be a `'button'` (use the `Anchor` primitive instead)
|
|
2636
|
+
description: "The DOM element to render as the Box.\n- This cannot be any SVG-related element such as `'svg'`, `'animate', `'circle'`, and many more\n- This cannot be a `'a'` (use the `Anchor` primitive instead)\n- This cannot be a `'button'` (use the `Anchor` primitive instead)",
|
|
2609
2637
|
type: '"object" | "style" | "abbr" | "address" | "area" | "article" | "aside" | "audio" | "b" | "base" | "bdi" | "bdo" | "big" | "blockquote" | "body" | "br" | "canvas" | "caption" | "center" | ... 97 more ... | "webview"'
|
|
2610
2638
|
}, {
|
|
2611
2639
|
name: 'backgroundColor',
|
|
@@ -2684,7 +2712,7 @@ export const components = [{
|
|
|
2684
2712
|
contentGuidelines: ['Use for appropriate focusable content', 'Maintain consistent focus patterns', 'Consider keyboard navigation flow'],
|
|
2685
2713
|
props: [{
|
|
2686
2714
|
name: 'as',
|
|
2687
|
-
description:
|
|
2715
|
+
description: 'The DOM element to render as the Focusable element.',
|
|
2688
2716
|
type: '"symbol" | "object" | "style" | "abbr" | "address" | "area" | "article" | "aside" | "audio" | "b" | "base" | "bdi" | "bdo" | "big" | "blockquote" | "body" | "br" | "canvas" | "caption" | ... 155 more ... | "view"'
|
|
2689
2717
|
}, {
|
|
2690
2718
|
name: 'children',
|
|
@@ -2948,7 +2976,7 @@ export const components = [{
|
|
|
2948
2976
|
}, {
|
|
2949
2977
|
name: 'color',
|
|
2950
2978
|
description: 'Token representing text color with a built-in fallback value.\nWill apply inverse text color automatically if placed within a Box with bold background color.\nDefaults to `color.text` if not nested in other Text components.',
|
|
2951
|
-
type: '
|
|
2979
|
+
type: '"inherit" | TextColor'
|
|
2952
2980
|
}, {
|
|
2953
2981
|
name: 'id',
|
|
2954
2982
|
description: 'The [HTML `id` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id).',
|
|
@@ -2964,7 +2992,7 @@ export const components = [{
|
|
|
2964
2992
|
}, {
|
|
2965
2993
|
name: 'size',
|
|
2966
2994
|
description: 'Text size.',
|
|
2967
|
-
type: '"small" | "
|
|
2995
|
+
type: '"small" | "large" | "medium" | "UNSAFE_small"'
|
|
2968
2996
|
}, {
|
|
2969
2997
|
name: 'weight',
|
|
2970
2998
|
description: 'The [HTML `font-weight` attribute](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight).',
|
|
@@ -3065,11 +3093,11 @@ export const components = [{
|
|
|
3065
3093
|
type: '"default" | "help" | "inverted" | "primary"'
|
|
3066
3094
|
}, {
|
|
3067
3095
|
name: 'ariaControls',
|
|
3068
|
-
description:
|
|
3096
|
+
description: 'If interaction is enabled, use `ariaControls` to tell assistive technology what elements are controlled by the progress indicator.',
|
|
3069
3097
|
type: 'string'
|
|
3070
3098
|
}, {
|
|
3071
3099
|
name: 'ariaLabel',
|
|
3072
|
-
description:
|
|
3100
|
+
description: 'Describes what the indicator represents to assistive technology. The selected index number will be appended to the label.',
|
|
3073
3101
|
type: 'string'
|
|
3074
3102
|
}, {
|
|
3075
3103
|
name: 'onSelect',
|
|
@@ -3322,7 +3350,7 @@ export const components = [{
|
|
|
3322
3350
|
}, {
|
|
3323
3351
|
name: 'appearance',
|
|
3324
3352
|
description: '',
|
|
3325
|
-
type: '"
|
|
3353
|
+
type: '"default" | "subtle" | "none"'
|
|
3326
3354
|
}, {
|
|
3327
3355
|
name: 'autoFocus',
|
|
3328
3356
|
description: 'Focus the control when it is mounted. There are very few cases that this should be used, and using incorrectly may violate accessibility guidelines.',
|
|
@@ -3498,7 +3526,7 @@ export const components = [{
|
|
|
3498
3526
|
}, {
|
|
3499
3527
|
name: 'menuPlacement',
|
|
3500
3528
|
description: "Default placement of the menu in relation to the control. 'auto' will flip\nwhen there isn't enough space below the control.",
|
|
3501
|
-
type: '"
|
|
3529
|
+
type: '"auto" | "bottom" | "top"'
|
|
3502
3530
|
}, {
|
|
3503
3531
|
name: 'menuPortalTarget',
|
|
3504
3532
|
description: 'Whether the menu should use a portal, and where it should attach\n\nAn example can be found in the [Portaling](https://react-select.com/advanced#portaling) documentation',
|
|
@@ -3590,7 +3618,7 @@ export const components = [{
|
|
|
3590
3618
|
}, {
|
|
3591
3619
|
name: 'spacing',
|
|
3592
3620
|
description: 'This prop affects the height of the select control. Compact is gridSize() * 4, default is gridSize * 5',
|
|
3593
|
-
type: '"
|
|
3621
|
+
type: '"compact" | "default"'
|
|
3594
3622
|
}, {
|
|
3595
3623
|
name: 'tabIndex',
|
|
3596
3624
|
description: "Sets the tabIndex attribute on the input for focus. Since focus is already managed, the only acceptable value to be used is '-1' in rare cases when removing this field from the document tab order is required.",
|
|
@@ -4071,6 +4099,10 @@ export const components = [{
|
|
|
4071
4099
|
name: 'position',
|
|
4072
4100
|
description: 'Where the tooltip should appear relative to its target.\nIf set to `"mouse"`, the tooltip will display next to the mouse pointer instead.\nMake sure to utilize the `mousePosition` if you want to customize where the tooltip will show in relation to the mouse.',
|
|
4073
4101
|
type: 'Placement | "mouse"'
|
|
4102
|
+
}, {
|
|
4103
|
+
name: 'shortcut',
|
|
4104
|
+
description: 'Display a keyboard shortcut in the tooltip.\n\nKeys will be displayed as individual keyboard key segments after the tooltip content.\n\nThis prop requires the `platform-dst-tooltip-shortcuts` feature flag to be enabled.',
|
|
4105
|
+
type: 'string[]'
|
|
4074
4106
|
}, {
|
|
4075
4107
|
name: 'strategy',
|
|
4076
4108
|
description: 'Use this to define the strategy of popper.',
|