@atlaskit/forge-react-types 0.42.14 → 0.42.16
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 +14 -0
- package/dist/cjs/components/__generated__/LinkMenuItemProps.codegen.js +5 -0
- package/dist/es2019/components/__generated__/LinkMenuItemProps.codegen.js +1 -0
- package/dist/esm/components/__generated__/LinkMenuItemProps.codegen.js +1 -0
- package/package.json +7 -6
- package/src/components/__generated__/LinkMenuItemProps.codegen.tsx +116 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/forge-react-types
|
|
2
2
|
|
|
3
|
+
## 0.42.16
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 0.42.15
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`c3685aa4e6cc0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c3685aa4e6cc0) -
|
|
14
|
+
Add LinkMenuItem
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 0.42.14
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/forge-react-types",
|
|
3
|
-
"version": "0.42.
|
|
3
|
+
"version": "0.42.16",
|
|
4
4
|
"description": "Component types for Forge UI Kit React components",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -31,12 +31,13 @@
|
|
|
31
31
|
"@atlaskit/form": "^12.2.0",
|
|
32
32
|
"@atlaskit/inline-edit": "^15.3.0",
|
|
33
33
|
"@atlaskit/modal-dialog": "^14.3.0",
|
|
34
|
+
"@atlaskit/navigation-system": "^2.0.0",
|
|
34
35
|
"@atlaskit/popup": "^4.3.0",
|
|
35
|
-
"@atlaskit/primitives": "^14.
|
|
36
|
+
"@atlaskit/primitives": "^14.12.0",
|
|
36
37
|
"@atlaskit/progress-bar": "^4.0.0",
|
|
37
38
|
"@atlaskit/progress-tracker": "^10.3.0",
|
|
38
39
|
"@atlaskit/radio": "^8.2.0",
|
|
39
|
-
"@atlaskit/section-message": "^8.
|
|
40
|
+
"@atlaskit/section-message": "^8.6.0",
|
|
40
41
|
"@atlaskit/select": "^21.2.0",
|
|
41
42
|
"@atlaskit/spinner": "^19.0.0",
|
|
42
43
|
"@atlaskit/tabs": "^18.1.0",
|
|
@@ -45,7 +46,7 @@
|
|
|
45
46
|
"@atlaskit/textarea": "^8.0.0",
|
|
46
47
|
"@atlaskit/textfield": "^8.0.0",
|
|
47
48
|
"@atlaskit/toggle": "^15.1.0",
|
|
48
|
-
"@atlaskit/tokens": "^6.
|
|
49
|
+
"@atlaskit/tokens": "^6.1.0",
|
|
49
50
|
"@atlaskit/tooltip": "^20.4.0",
|
|
50
51
|
"@babel/runtime": "^7.0.0"
|
|
51
52
|
},
|
|
@@ -54,8 +55,8 @@
|
|
|
54
55
|
},
|
|
55
56
|
"devDependencies": {
|
|
56
57
|
"@atlassian/codegen": "^0.1.0",
|
|
57
|
-
"@atlassian/forge-ui": "^32.
|
|
58
|
-
"@types/node": "~20.16.
|
|
58
|
+
"@atlassian/forge-ui": "^32.31.0",
|
|
59
|
+
"@types/node": "~20.16.15",
|
|
59
60
|
"lodash": "^4.17.21",
|
|
60
61
|
"react": "^18.2.0",
|
|
61
62
|
"ts-morph": "^17.0.0",
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
3
|
+
*
|
|
4
|
+
* Extract component prop types from UIKit 2 components - LinkMenuItemProps
|
|
5
|
+
*
|
|
6
|
+
* @codegen <<SignedSource::4a1f543c49be8d37af271ad72f46c373>>
|
|
7
|
+
* @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
|
|
8
|
+
* @codegenDependency ../../../../forge-ui/src/components/UIKit/link-menu-item/__generated__/index.partial.tsx <<SignedSource::8943197e8ce5439de1d6f88dda81d55b>>
|
|
9
|
+
*/
|
|
10
|
+
/* eslint @repo/internal/codegen/signed-source-integrity: "warn" */
|
|
11
|
+
|
|
12
|
+
import React from 'react';
|
|
13
|
+
import { LinkMenuItem as PlatformLinkMenuItem } from '@atlaskit/navigation-system/side-nav-items/link-menu-item';
|
|
14
|
+
|
|
15
|
+
type PlatformLinkMenuItemProps = React.ComponentProps<typeof PlatformLinkMenuItem>;
|
|
16
|
+
type Element = string | number | boolean | React.ReactNode;
|
|
17
|
+
|
|
18
|
+
export type LinkMenuItemProps = Pick<
|
|
19
|
+
PlatformLinkMenuItemProps,
|
|
20
|
+
| 'children'
|
|
21
|
+
| 'testId'
|
|
22
|
+
| 'isContentTooltipDisabled'
|
|
23
|
+
| 'isDragging'
|
|
24
|
+
| 'hasDragIndicator'
|
|
25
|
+
| 'description'
|
|
26
|
+
| 'target'
|
|
27
|
+
| 'isSelected'
|
|
28
|
+
| 'href'
|
|
29
|
+
| 'elemBefore'
|
|
30
|
+
| 'elemAfter'
|
|
31
|
+
| 'actions'
|
|
32
|
+
| 'actionsOnHover'
|
|
33
|
+
| 'dropIndicator'
|
|
34
|
+
> & {
|
|
35
|
+
/**
|
|
36
|
+
* Called when the user has clicked on the trigger content.
|
|
37
|
+
*/
|
|
38
|
+
onClick?: () => void;
|
|
39
|
+
/**
|
|
40
|
+
* `ReactNode` to be placed visually before the `children`.
|
|
41
|
+
*
|
|
42
|
+
* This `ReactNode` will be rendered visually on top of the main
|
|
43
|
+
* interactive element for the menu item. If this element does not
|
|
44
|
+
* contain an interactive element (`button` or `a`) then `pointer-events`
|
|
45
|
+
* will be set to `none` on this slot so that users can click through
|
|
46
|
+
* this element onto the main interactive element of the menu item.
|
|
47
|
+
*
|
|
48
|
+
* If you want to collapse the `elemBefore` so it takes up no space,
|
|
49
|
+
* then pass in the `COLLAPSE_ELEM_BEFORE` symbol. Keep in mind that
|
|
50
|
+
* collapsing the `elemBefore` can break visual alignment and
|
|
51
|
+
* will make it difficult for users to visually distinguish levels
|
|
52
|
+
* in the side navigation.
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
*
|
|
56
|
+
* ```tsx
|
|
57
|
+
* <MenuItemButton elemBefore={<HomeIcon label="home" />}>Home</MenuItemButton>
|
|
58
|
+
*
|
|
59
|
+
* // collapse the elemBefore
|
|
60
|
+
* <MenuItemButton elemBefore={COLLAPSE_ELEM_BEFORE}>Home</MenuItemButton>
|
|
61
|
+
* ```
|
|
62
|
+
*/
|
|
63
|
+
elemBefore?: Element;
|
|
64
|
+
/**
|
|
65
|
+
* `ReactNode` to be placed visually after the `children`.
|
|
66
|
+
*
|
|
67
|
+
* It is intended for static content (e.g. a `Lozenge`).
|
|
68
|
+
*
|
|
69
|
+
* If both `elemAfter` and `actionsOnHover` are provided, `elemAfter` will
|
|
70
|
+
* not be displayed when the item is hovered over or expanded. This is
|
|
71
|
+
* because the `actionsOnHover` will be displayed instead.
|
|
72
|
+
*
|
|
73
|
+
* This `ReactNode` will be rendered visually on top of the main
|
|
74
|
+
* interactive element for the menu item. If this element does not
|
|
75
|
+
* contain an interactive element (`button` or `a`) then `pointer-events`
|
|
76
|
+
* will be set to `none` on this slot so that users can click through
|
|
77
|
+
* this element onto the main interactive element of the menu item.
|
|
78
|
+
*/
|
|
79
|
+
elemAfter?: Element;
|
|
80
|
+
/**
|
|
81
|
+
* `ReactNode` to be placed visually after the `children`.
|
|
82
|
+
*
|
|
83
|
+
* It is intended for additional actions (e.g. IconButtons).
|
|
84
|
+
*
|
|
85
|
+
* They will not be rendered when the menu item is disabled.
|
|
86
|
+
*/
|
|
87
|
+
actions?: Element;
|
|
88
|
+
/**
|
|
89
|
+
* `ReactNode` to be placed visually after the `children` and will
|
|
90
|
+
* only be displayed on hover or focus.
|
|
91
|
+
*
|
|
92
|
+
* It is intended for additional actions (e.g. IconButtons).
|
|
93
|
+
*
|
|
94
|
+
* This `ReactNode` will replace `elemAfter` on hover or focus.
|
|
95
|
+
*
|
|
96
|
+
* They will not be rendered when the menu item is disabled.
|
|
97
|
+
*
|
|
98
|
+
* This `ReactNode` will be rendered visually on top of the main
|
|
99
|
+
* interactive element for the menu item. If this element does not
|
|
100
|
+
* contain an interactive element (`button` or `a`) then `pointer-events`
|
|
101
|
+
* will be set to `none` on this slot so that users can click through
|
|
102
|
+
* this element onto the main interactive element of the menu item.
|
|
103
|
+
*/
|
|
104
|
+
actionsOnHover?: Element;
|
|
105
|
+
/**
|
|
106
|
+
* A slot to render drop indicators for drag and drop operations on the menu item.
|
|
107
|
+
*/
|
|
108
|
+
dropIndicator?: Element;
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* A menu item that is wrapped in an anchor tag <a>. This is the most common type of menu item, as most menu items are used to send people to another location.
|
|
113
|
+
*
|
|
114
|
+
* @see [LinkMenuItem](https://developer.atlassian.com/platform/forge/ui-kit/components/link-menu-item/) in UI Kit documentation for more information
|
|
115
|
+
*/
|
|
116
|
+
export type TLinkMenuItem<T> = (props: LinkMenuItemProps) => T;
|