@atlaskit/ads-mcp 1.12.0 → 1.12.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 +14 -0
- package/dist/cjs/tools/get-all-components/components.codegen.js +2 -2
- package/dist/cjs/tools/get-atlaskit-components/atlaskit-components.codegen.js +2 -2
- package/dist/cjs/tools/get-atlaskit-hooks/atlaskit-hooks.codegen.js +49 -49
- package/dist/cjs/tools/get-atlaskit-utilities/atlaskit-utilities.codegen.js +2 -2
- package/dist/es2019/tools/get-all-components/components.codegen.js +2 -2
- package/dist/es2019/tools/get-atlaskit-components/atlaskit-components.codegen.js +2 -2
- package/dist/es2019/tools/get-atlaskit-hooks/atlaskit-hooks.codegen.js +49 -49
- package/dist/es2019/tools/get-atlaskit-utilities/atlaskit-utilities.codegen.js +2 -2
- package/dist/esm/tools/get-all-components/components.codegen.js +2 -2
- package/dist/esm/tools/get-atlaskit-components/atlaskit-components.codegen.js +2 -2
- package/dist/esm/tools/get-atlaskit-hooks/atlaskit-hooks.codegen.js +49 -49
- package/dist/esm/tools/get-atlaskit-utilities/atlaskit-utilities.codegen.js +2 -2
- package/dist/types/tools/get-all-components/components.codegen.d.ts +1 -1
- package/dist/types/tools/get-atlaskit-components/atlaskit-components.codegen.d.ts +1 -1
- package/dist/types/tools/get-atlaskit-hooks/atlaskit-hooks.codegen.d.ts +1 -1
- package/dist/types/tools/get-atlaskit-utilities/atlaskit-utilities.codegen.d.ts +1 -1
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Structured content hooks from design-system *.docs.tsx files
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::32cbac9200091bcd2203fac2c2bc0734>>
|
|
7
7
|
* @codegenCommand afm workspace @af/ads-ai-tooling codegen
|
|
8
8
|
*/
|
|
9
9
|
/* eslint-disable @repo/internal/react/boolean-prop-naming-convention -- not our types */
|
|
@@ -1059,6 +1059,54 @@ export const atlaskitHooks = [{
|
|
|
1059
1059
|
},
|
|
1060
1060
|
package: '@atlassian/jira-create-work-items',
|
|
1061
1061
|
examples: []
|
|
1062
|
+
}, {
|
|
1063
|
+
name: 'useCloseCurrentPanel',
|
|
1064
|
+
description: 'For internal Atlassian use only: Get a callback that closes the current panel inside LayoutWithPanel or PanelsRenderer. Internal Atlassian package; not available for use outside Atlassian.',
|
|
1065
|
+
status: 'open-beta',
|
|
1066
|
+
keywords: ['panel', 'context', 'state', 'close', 'open'],
|
|
1067
|
+
category: 'layout',
|
|
1068
|
+
package: '@atlassian/panel-system',
|
|
1069
|
+
examples: ["import Button from '@atlaskit/button/default/button';\nimport { Main } from '@atlaskit/navigation-system/layout/main';\nimport { PanelLayout } from '@atlaskit/navigation-system/layout/panel-layout';\nimport { Root } from '@atlaskit/navigation-system/layout/root';\nimport { Text } from '@atlaskit/primitives/compiled/text';\nimport { PanelActionClose } from '@atlassian/panel-system/panel-action/close';\nimport { PanelActionGroup } from '@atlassian/panel-system/panel-action/group';\nimport { PanelBody } from '@atlassian/panel-system/panel-body';\nimport { PanelContainer } from '@atlassian/panel-system/panel-container';\nimport { PanelContent } from '@atlassian/panel-system/panel-content';\nimport { useCloseCurrentPanel, useCurrentPanel } from '@atlassian/panel-system/panel-context';\nimport { PanelDisclaimer } from '@atlassian/panel-system/panel-disclaimer';\nimport { PanelFooter } from '@atlassian/panel-system/panel-footer';\nimport { PanelHeader } from '@atlassian/panel-system/panel-header';\nimport { usePanelManager } from '@atlassian/panel-system/panel-manager';\nimport { PanelProvider } from '@atlassian/panel-system/panel-provider';\nimport { PanelRouter } from '@atlassian/panel-system/panel-router';\nimport { PanelTitle } from '@atlassian/panel-system/panel-title';\nimport { PanelsRenderer } from '@atlassian/panel-system/panels-renderer';\nfunction ProjectSummary() {\n\tconst panel = useCurrentPanel<{ summary: string }>();\n\tconst closePanel = useCloseCurrentPanel();\n\treturn (\n\t\t<PanelContainer>\n\t\t\t<PanelHeader>\n\t\t\t\t<PanelTitle>Project summary</PanelTitle>\n\t\t\t\t<PanelActionGroup>\n\t\t\t\t\t<PanelActionClose label=\"Close project summary\" onClick={closePanel} />\n\t\t\t\t</PanelActionGroup>\n\t\t\t</PanelHeader>\n\t\t\t<PanelContent>\n\t\t\t\t<PanelBody>\n\t\t\t\t\t<Text as=\"p\">{panel.params.summary}</Text>\n\t\t\t\t</PanelBody>\n\t\t\t</PanelContent>\n\t\t\t<PanelFooter\n\t\t\t\tdisclaimer={\n\t\t\t\t\t<PanelDisclaimer>AI-generated content. Verify important details.</PanelDisclaimer>\n\t\t\t\t}\n\t\t\t>\n\t\t\t\t<Button onClick={closePanel}>Done</Button>\n\t\t\t</PanelFooter>\n\t\t</PanelContainer>\n\t);\n}\nfunction ProjectContent() {\n\tconst { state, manager } = usePanelManager();\n\treturn (\n\t\t<PanelLayout\n\t\t\tisPanelOpen={state.activePanel !== null}\n\t\t\tpanelKey={state.activePanel?.instanceId}\n\t\t\tpanelLabel=\"Project summary\"\n\t\t\tresizeLabel=\"Resize project summary\"\n\t\t\tpanel={\n\t\t\t\t<PanelsRenderer>\n\t\t\t\t\t<PanelRouter />\n\t\t\t\t</PanelsRenderer>\n\t\t\t}\n\t\t>\n\t\t\t<Button\n\t\t\t\tonClick={() =>\n\t\t\t\t\tmanager.openPanel({\n\t\t\t\t\t\tinstanceId: 'project-summary',\n\t\t\t\t\t\tparams: {\n\t\t\t\t\t\t\tsummary:\n\t\t\t\t\t\t\t\t'The release checklist is ready for review. Two work items remain in progress.',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tpanelContent: <ProjectSummary />,\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t>\n\t\t\t\tView project summary\n\t\t\t</Button>\n\t\t</PanelLayout>\n\t);\n}\n// Internal Atlassian package. Prefer LayoutWithPanel for the standard integration.\n// Use this composition when the app needs to own its PanelLayout and PanelRouter.\nexport default function CustomRenderingExample(): React.JSX.Element {\n\treturn (\n\t\t<PanelProvider>\n\t\t\t<Root>\n\t\t\t\t<Main>\n\t\t\t\t\t<ProjectContent />\n\t\t\t\t</Main>\n\t\t\t</Root>\n\t\t</PanelProvider>\n\t);\n}"]
|
|
1070
|
+
}, {
|
|
1071
|
+
name: 'useCurrentPanel',
|
|
1072
|
+
description: 'For internal Atlassian use only: Read the current panel and typed runtime parameters inside LayoutWithPanel or PanelsRenderer. Internal Atlassian package; not available for use outside Atlassian.',
|
|
1073
|
+
status: 'open-beta',
|
|
1074
|
+
keywords: ['panel', 'context', 'state', 'close', 'open'],
|
|
1075
|
+
category: 'layout',
|
|
1076
|
+
package: '@atlassian/panel-system',
|
|
1077
|
+
examples: ["import Button from '@atlaskit/button/default/button';\nimport { Main } from '@atlaskit/navigation-system/layout/main';\nimport { PanelLayout } from '@atlaskit/navigation-system/layout/panel-layout';\nimport { Root } from '@atlaskit/navigation-system/layout/root';\nimport { Text } from '@atlaskit/primitives/compiled/text';\nimport { PanelActionClose } from '@atlassian/panel-system/panel-action/close';\nimport { PanelActionGroup } from '@atlassian/panel-system/panel-action/group';\nimport { PanelBody } from '@atlassian/panel-system/panel-body';\nimport { PanelContainer } from '@atlassian/panel-system/panel-container';\nimport { PanelContent } from '@atlassian/panel-system/panel-content';\nimport { useCloseCurrentPanel, useCurrentPanel } from '@atlassian/panel-system/panel-context';\nimport { PanelDisclaimer } from '@atlassian/panel-system/panel-disclaimer';\nimport { PanelFooter } from '@atlassian/panel-system/panel-footer';\nimport { PanelHeader } from '@atlassian/panel-system/panel-header';\nimport { usePanelManager } from '@atlassian/panel-system/panel-manager';\nimport { PanelProvider } from '@atlassian/panel-system/panel-provider';\nimport { PanelRouter } from '@atlassian/panel-system/panel-router';\nimport { PanelTitle } from '@atlassian/panel-system/panel-title';\nimport { PanelsRenderer } from '@atlassian/panel-system/panels-renderer';\nfunction ProjectSummary() {\n\tconst panel = useCurrentPanel<{ summary: string }>();\n\tconst closePanel = useCloseCurrentPanel();\n\treturn (\n\t\t<PanelContainer>\n\t\t\t<PanelHeader>\n\t\t\t\t<PanelTitle>Project summary</PanelTitle>\n\t\t\t\t<PanelActionGroup>\n\t\t\t\t\t<PanelActionClose label=\"Close project summary\" onClick={closePanel} />\n\t\t\t\t</PanelActionGroup>\n\t\t\t</PanelHeader>\n\t\t\t<PanelContent>\n\t\t\t\t<PanelBody>\n\t\t\t\t\t<Text as=\"p\">{panel.params.summary}</Text>\n\t\t\t\t</PanelBody>\n\t\t\t</PanelContent>\n\t\t\t<PanelFooter\n\t\t\t\tdisclaimer={\n\t\t\t\t\t<PanelDisclaimer>AI-generated content. Verify important details.</PanelDisclaimer>\n\t\t\t\t}\n\t\t\t>\n\t\t\t\t<Button onClick={closePanel}>Done</Button>\n\t\t\t</PanelFooter>\n\t\t</PanelContainer>\n\t);\n}\nfunction ProjectContent() {\n\tconst { state, manager } = usePanelManager();\n\treturn (\n\t\t<PanelLayout\n\t\t\tisPanelOpen={state.activePanel !== null}\n\t\t\tpanelKey={state.activePanel?.instanceId}\n\t\t\tpanelLabel=\"Project summary\"\n\t\t\tresizeLabel=\"Resize project summary\"\n\t\t\tpanel={\n\t\t\t\t<PanelsRenderer>\n\t\t\t\t\t<PanelRouter />\n\t\t\t\t</PanelsRenderer>\n\t\t\t}\n\t\t>\n\t\t\t<Button\n\t\t\t\tonClick={() =>\n\t\t\t\t\tmanager.openPanel({\n\t\t\t\t\t\tinstanceId: 'project-summary',\n\t\t\t\t\t\tparams: {\n\t\t\t\t\t\t\tsummary:\n\t\t\t\t\t\t\t\t'The release checklist is ready for review. Two work items remain in progress.',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tpanelContent: <ProjectSummary />,\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t>\n\t\t\t\tView project summary\n\t\t\t</Button>\n\t\t</PanelLayout>\n\t);\n}\n// Internal Atlassian package. Prefer LayoutWithPanel for the standard integration.\n// Use this composition when the app needs to own its PanelLayout and PanelRouter.\nexport default function CustomRenderingExample(): React.JSX.Element {\n\treturn (\n\t\t<PanelProvider>\n\t\t\t<Root>\n\t\t\t\t<Main>\n\t\t\t\t\t<ProjectContent />\n\t\t\t\t</Main>\n\t\t\t</Root>\n\t\t</PanelProvider>\n\t);\n}"]
|
|
1078
|
+
}, {
|
|
1079
|
+
name: 'usePanel',
|
|
1080
|
+
description: 'For internal Atlassian use only: Read the current panel and its close function inside the context supplied by LayoutWithPanel or PanelsRenderer. Internal Atlassian package; not available for use outside Atlassian.',
|
|
1081
|
+
status: 'open-beta',
|
|
1082
|
+
keywords: ['panel', 'context', 'state', 'close', 'open'],
|
|
1083
|
+
category: 'layout',
|
|
1084
|
+
package: '@atlassian/panel-system',
|
|
1085
|
+
examples: ["import React, { useState } from 'react';\nimport Button from '@atlaskit/button/default/button';\nimport { Main } from '@atlaskit/navigation-system/layout/main';\nimport { Root } from '@atlaskit/navigation-system/layout/root';\nimport { Stack } from '@atlaskit/primitives/compiled/stack';\nimport { Text } from '@atlaskit/primitives/compiled/text';\nimport { LayoutWithPanel } from '@atlassian/panel-system/layout-with-panel';\nimport { PanelActionCloseSmart } from '@atlassian/panel-system/panel-action/close-smart';\nimport { PanelActionGroup } from '@atlassian/panel-system/panel-action/group';\nimport { PanelActionNewTab } from '@atlassian/panel-system/panel-action/new-tab';\nimport { PanelBody } from '@atlassian/panel-system/panel-body';\nimport { PanelContainer } from '@atlassian/panel-system/panel-container';\nimport { PanelContent } from '@atlassian/panel-system/panel-content';\nimport { usePanel } from '@atlassian/panel-system/panel-context';\nimport { PanelFooter } from '@atlassian/panel-system/panel-footer';\nimport { PanelHeader } from '@atlassian/panel-system/panel-header';\nimport { usePanelActions, usePanelState } from '@atlassian/panel-system/panel-manager';\nimport { PanelProvider } from '@atlassian/panel-system/panel-provider';\nimport { PanelSubheader } from '@atlassian/panel-system/panel-subheader';\nimport { PanelTitle } from '@atlassian/panel-system/panel-title';\nimport { SubheaderInlineEdit } from '@atlassian/panel-system/subheader-inline-edit';\nfunction WorkItemDetails() {\n\tconst { panel, closePanel } = usePanel<{ title: string }>();\n\tconst [title, setTitle] = useState(panel.params.title);\n\treturn (\n\t\t<PanelContainer>\n\t\t\t<PanelHeader>\n\t\t\t\t<PanelTitle>Work item</PanelTitle>\n\t\t\t\t<PanelActionGroup>\n\t\t\t\t\t<PanelActionNewTab href=\"/browse/PROJ-42\" label=\"Open work item in a new tab\" />\n\t\t\t\t\t<PanelActionCloseSmart label=\"Close work item\" />\n\t\t\t\t</PanelActionGroup>\n\t\t\t</PanelHeader>\n\t\t\t<PanelContent>\n\t\t\t\t<PanelSubheader\n\t\t\t\t\ttitle={title}\n\t\t\t\t\tinlineEdit={\n\t\t\t\t\t\t<SubheaderInlineEdit\n\t\t\t\t\t\t\tdefaultValue={title}\n\t\t\t\t\t\t\tplaceholder=\"Add a work item title\"\n\t\t\t\t\t\t\teditButtonLabel=\"Edit work item title\"\n\t\t\t\t\t\t\tconfirmButtonLabel=\"Confirm title\"\n\t\t\t\t\t\t\tcancelButtonLabel=\"Cancel editing\"\n\t\t\t\t\t\t\tonConfirm={setTitle}\n\t\t\t\t\t\t/>\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t\t<PanelBody>\n\t\t\t\t\t<Stack space=\"space.200\">\n\t\t\t\t\t\t<Text as=\"p\">PROJ-42 · In progress</Text>\n\t\t\t\t\t\t<Text as=\"p\">Review the release checklist with the project team.</Text>\n\t\t\t\t\t\t<Text as=\"p\">\n\t\t\t\t\t\t\tThis example keeps title edits locally. Connect confirmation to your app's save\n\t\t\t\t\t\t\toperation.\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t</Stack>\n\t\t\t\t</PanelBody>\n\t\t\t</PanelContent>\n\t\t\t<PanelFooter>\n\t\t\t\t<Button onClick={closePanel}>Done</Button>\n\t\t\t</PanelFooter>\n\t\t</PanelContainer>\n\t);\n}\nfunction ProjectContent() {\n\tconst manager = usePanelActions();\n\tconst { activePanel } = usePanelState();\n\treturn (\n\t\t<LayoutWithPanel panelLabel=\"Work item details\" resizeLabel=\"Resize work item details\">\n\t\t\t<Button\n\t\t\t\tisSelected={activePanel?.instanceId === 'PROJ-42'}\n\t\t\t\tonClick={() =>\n\t\t\t\t\tmanager.openPanel({\n\t\t\t\t\t\tinstanceId: 'PROJ-42',\n\t\t\t\t\t\tparams: { title: 'Prepare the release checklist' },\n\t\t\t\t\t\tpanelContent: <WorkItemDetails />,\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t>\n\t\t\t\tView PROJ-42\n\t\t\t</Button>\n\t\t</LayoutWithPanel>\n\t);\n}\n// Internal Atlassian package. This example uses already-loaded React content.\n// For lazy EntryPoints, prefer Trigger inside the app's Relay environment provider.\nexport default function ContextualDetailsExample(): React.JSX.Element {\n\treturn (\n\t\t<PanelProvider>\n\t\t\t<Root>\n\t\t\t\t<Main>\n\t\t\t\t\t<ProjectContent />\n\t\t\t\t</Main>\n\t\t\t</Root>\n\t\t</PanelProvider>\n\t);\n}"]
|
|
1086
|
+
}, {
|
|
1087
|
+
name: 'usePanelActions',
|
|
1088
|
+
description: 'For internal Atlassian use only: Access stable panel actions when a consumer only needs to open, close, or resize panels. Requires PanelProvider. Internal Atlassian package; not available for use outside Atlassian.',
|
|
1089
|
+
status: 'open-beta',
|
|
1090
|
+
keywords: ['panel', 'context', 'state', 'close', 'open'],
|
|
1091
|
+
category: 'layout',
|
|
1092
|
+
package: '@atlassian/panel-system',
|
|
1093
|
+
examples: ["import React, { useState } from 'react';\nimport Button from '@atlaskit/button/default/button';\nimport { Main } from '@atlaskit/navigation-system/layout/main';\nimport { Root } from '@atlaskit/navigation-system/layout/root';\nimport { Stack } from '@atlaskit/primitives/compiled/stack';\nimport { Text } from '@atlaskit/primitives/compiled/text';\nimport { LayoutWithPanel } from '@atlassian/panel-system/layout-with-panel';\nimport { PanelActionCloseSmart } from '@atlassian/panel-system/panel-action/close-smart';\nimport { PanelActionGroup } from '@atlassian/panel-system/panel-action/group';\nimport { PanelActionNewTab } from '@atlassian/panel-system/panel-action/new-tab';\nimport { PanelBody } from '@atlassian/panel-system/panel-body';\nimport { PanelContainer } from '@atlassian/panel-system/panel-container';\nimport { PanelContent } from '@atlassian/panel-system/panel-content';\nimport { usePanel } from '@atlassian/panel-system/panel-context';\nimport { PanelFooter } from '@atlassian/panel-system/panel-footer';\nimport { PanelHeader } from '@atlassian/panel-system/panel-header';\nimport { usePanelActions, usePanelState } from '@atlassian/panel-system/panel-manager';\nimport { PanelProvider } from '@atlassian/panel-system/panel-provider';\nimport { PanelSubheader } from '@atlassian/panel-system/panel-subheader';\nimport { PanelTitle } from '@atlassian/panel-system/panel-title';\nimport { SubheaderInlineEdit } from '@atlassian/panel-system/subheader-inline-edit';\nfunction WorkItemDetails() {\n\tconst { panel, closePanel } = usePanel<{ title: string }>();\n\tconst [title, setTitle] = useState(panel.params.title);\n\treturn (\n\t\t<PanelContainer>\n\t\t\t<PanelHeader>\n\t\t\t\t<PanelTitle>Work item</PanelTitle>\n\t\t\t\t<PanelActionGroup>\n\t\t\t\t\t<PanelActionNewTab href=\"/browse/PROJ-42\" label=\"Open work item in a new tab\" />\n\t\t\t\t\t<PanelActionCloseSmart label=\"Close work item\" />\n\t\t\t\t</PanelActionGroup>\n\t\t\t</PanelHeader>\n\t\t\t<PanelContent>\n\t\t\t\t<PanelSubheader\n\t\t\t\t\ttitle={title}\n\t\t\t\t\tinlineEdit={\n\t\t\t\t\t\t<SubheaderInlineEdit\n\t\t\t\t\t\t\tdefaultValue={title}\n\t\t\t\t\t\t\tplaceholder=\"Add a work item title\"\n\t\t\t\t\t\t\teditButtonLabel=\"Edit work item title\"\n\t\t\t\t\t\t\tconfirmButtonLabel=\"Confirm title\"\n\t\t\t\t\t\t\tcancelButtonLabel=\"Cancel editing\"\n\t\t\t\t\t\t\tonConfirm={setTitle}\n\t\t\t\t\t\t/>\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t\t<PanelBody>\n\t\t\t\t\t<Stack space=\"space.200\">\n\t\t\t\t\t\t<Text as=\"p\">PROJ-42 · In progress</Text>\n\t\t\t\t\t\t<Text as=\"p\">Review the release checklist with the project team.</Text>\n\t\t\t\t\t\t<Text as=\"p\">\n\t\t\t\t\t\t\tThis example keeps title edits locally. Connect confirmation to your app's save\n\t\t\t\t\t\t\toperation.\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t</Stack>\n\t\t\t\t</PanelBody>\n\t\t\t</PanelContent>\n\t\t\t<PanelFooter>\n\t\t\t\t<Button onClick={closePanel}>Done</Button>\n\t\t\t</PanelFooter>\n\t\t</PanelContainer>\n\t);\n}\nfunction ProjectContent() {\n\tconst manager = usePanelActions();\n\tconst { activePanel } = usePanelState();\n\treturn (\n\t\t<LayoutWithPanel panelLabel=\"Work item details\" resizeLabel=\"Resize work item details\">\n\t\t\t<Button\n\t\t\t\tisSelected={activePanel?.instanceId === 'PROJ-42'}\n\t\t\t\tonClick={() =>\n\t\t\t\t\tmanager.openPanel({\n\t\t\t\t\t\tinstanceId: 'PROJ-42',\n\t\t\t\t\t\tparams: { title: 'Prepare the release checklist' },\n\t\t\t\t\t\tpanelContent: <WorkItemDetails />,\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t>\n\t\t\t\tView PROJ-42\n\t\t\t</Button>\n\t\t</LayoutWithPanel>\n\t);\n}\n// Internal Atlassian package. This example uses already-loaded React content.\n// For lazy EntryPoints, prefer Trigger inside the app's Relay environment provider.\nexport default function ContextualDetailsExample(): React.JSX.Element {\n\treturn (\n\t\t<PanelProvider>\n\t\t\t<Root>\n\t\t\t\t<Main>\n\t\t\t\t\t<ProjectContent />\n\t\t\t\t</Main>\n\t\t\t</Root>\n\t\t</PanelProvider>\n\t);\n}"]
|
|
1094
|
+
}, {
|
|
1095
|
+
name: 'usePanelManager',
|
|
1096
|
+
description: 'For internal Atlassian use only: Read both panel state and actions inside PanelProvider. Prefer usePanelActions for action-only consumers. Internal Atlassian package; not available for use outside Atlassian.',
|
|
1097
|
+
status: 'open-beta',
|
|
1098
|
+
keywords: ['panel', 'context', 'state', 'close', 'open'],
|
|
1099
|
+
category: 'layout',
|
|
1100
|
+
package: '@atlassian/panel-system',
|
|
1101
|
+
examples: ["import Button from '@atlaskit/button/default/button';\nimport { Main } from '@atlaskit/navigation-system/layout/main';\nimport { PanelLayout } from '@atlaskit/navigation-system/layout/panel-layout';\nimport { Root } from '@atlaskit/navigation-system/layout/root';\nimport { Text } from '@atlaskit/primitives/compiled/text';\nimport { PanelActionClose } from '@atlassian/panel-system/panel-action/close';\nimport { PanelActionGroup } from '@atlassian/panel-system/panel-action/group';\nimport { PanelBody } from '@atlassian/panel-system/panel-body';\nimport { PanelContainer } from '@atlassian/panel-system/panel-container';\nimport { PanelContent } from '@atlassian/panel-system/panel-content';\nimport { useCloseCurrentPanel, useCurrentPanel } from '@atlassian/panel-system/panel-context';\nimport { PanelDisclaimer } from '@atlassian/panel-system/panel-disclaimer';\nimport { PanelFooter } from '@atlassian/panel-system/panel-footer';\nimport { PanelHeader } from '@atlassian/panel-system/panel-header';\nimport { usePanelManager } from '@atlassian/panel-system/panel-manager';\nimport { PanelProvider } from '@atlassian/panel-system/panel-provider';\nimport { PanelRouter } from '@atlassian/panel-system/panel-router';\nimport { PanelTitle } from '@atlassian/panel-system/panel-title';\nimport { PanelsRenderer } from '@atlassian/panel-system/panels-renderer';\nfunction ProjectSummary() {\n\tconst panel = useCurrentPanel<{ summary: string }>();\n\tconst closePanel = useCloseCurrentPanel();\n\treturn (\n\t\t<PanelContainer>\n\t\t\t<PanelHeader>\n\t\t\t\t<PanelTitle>Project summary</PanelTitle>\n\t\t\t\t<PanelActionGroup>\n\t\t\t\t\t<PanelActionClose label=\"Close project summary\" onClick={closePanel} />\n\t\t\t\t</PanelActionGroup>\n\t\t\t</PanelHeader>\n\t\t\t<PanelContent>\n\t\t\t\t<PanelBody>\n\t\t\t\t\t<Text as=\"p\">{panel.params.summary}</Text>\n\t\t\t\t</PanelBody>\n\t\t\t</PanelContent>\n\t\t\t<PanelFooter\n\t\t\t\tdisclaimer={\n\t\t\t\t\t<PanelDisclaimer>AI-generated content. Verify important details.</PanelDisclaimer>\n\t\t\t\t}\n\t\t\t>\n\t\t\t\t<Button onClick={closePanel}>Done</Button>\n\t\t\t</PanelFooter>\n\t\t</PanelContainer>\n\t);\n}\nfunction ProjectContent() {\n\tconst { state, manager } = usePanelManager();\n\treturn (\n\t\t<PanelLayout\n\t\t\tisPanelOpen={state.activePanel !== null}\n\t\t\tpanelKey={state.activePanel?.instanceId}\n\t\t\tpanelLabel=\"Project summary\"\n\t\t\tresizeLabel=\"Resize project summary\"\n\t\t\tpanel={\n\t\t\t\t<PanelsRenderer>\n\t\t\t\t\t<PanelRouter />\n\t\t\t\t</PanelsRenderer>\n\t\t\t}\n\t\t>\n\t\t\t<Button\n\t\t\t\tonClick={() =>\n\t\t\t\t\tmanager.openPanel({\n\t\t\t\t\t\tinstanceId: 'project-summary',\n\t\t\t\t\t\tparams: {\n\t\t\t\t\t\t\tsummary:\n\t\t\t\t\t\t\t\t'The release checklist is ready for review. Two work items remain in progress.',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tpanelContent: <ProjectSummary />,\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t>\n\t\t\t\tView project summary\n\t\t\t</Button>\n\t\t</PanelLayout>\n\t);\n}\n// Internal Atlassian package. Prefer LayoutWithPanel for the standard integration.\n// Use this composition when the app needs to own its PanelLayout and PanelRouter.\nexport default function CustomRenderingExample(): React.JSX.Element {\n\treturn (\n\t\t<PanelProvider>\n\t\t\t<Root>\n\t\t\t\t<Main>\n\t\t\t\t\t<ProjectContent />\n\t\t\t\t</Main>\n\t\t\t</Root>\n\t\t</PanelProvider>\n\t);\n}"]
|
|
1102
|
+
}, {
|
|
1103
|
+
name: 'usePanelState',
|
|
1104
|
+
description: 'For internal Atlassian use only: Read active-panel and preferred-width state inside PanelProvider. Internal Atlassian package; not available for use outside Atlassian.',
|
|
1105
|
+
status: 'open-beta',
|
|
1106
|
+
keywords: ['panel', 'context', 'state', 'close', 'open'],
|
|
1107
|
+
category: 'layout',
|
|
1108
|
+
package: '@atlassian/panel-system',
|
|
1109
|
+
examples: ["import React, { useState } from 'react';\nimport Button from '@atlaskit/button/default/button';\nimport { Main } from '@atlaskit/navigation-system/layout/main';\nimport { Root } from '@atlaskit/navigation-system/layout/root';\nimport { Stack } from '@atlaskit/primitives/compiled/stack';\nimport { Text } from '@atlaskit/primitives/compiled/text';\nimport { LayoutWithPanel } from '@atlassian/panel-system/layout-with-panel';\nimport { PanelActionCloseSmart } from '@atlassian/panel-system/panel-action/close-smart';\nimport { PanelActionGroup } from '@atlassian/panel-system/panel-action/group';\nimport { PanelActionNewTab } from '@atlassian/panel-system/panel-action/new-tab';\nimport { PanelBody } from '@atlassian/panel-system/panel-body';\nimport { PanelContainer } from '@atlassian/panel-system/panel-container';\nimport { PanelContent } from '@atlassian/panel-system/panel-content';\nimport { usePanel } from '@atlassian/panel-system/panel-context';\nimport { PanelFooter } from '@atlassian/panel-system/panel-footer';\nimport { PanelHeader } from '@atlassian/panel-system/panel-header';\nimport { usePanelActions, usePanelState } from '@atlassian/panel-system/panel-manager';\nimport { PanelProvider } from '@atlassian/panel-system/panel-provider';\nimport { PanelSubheader } from '@atlassian/panel-system/panel-subheader';\nimport { PanelTitle } from '@atlassian/panel-system/panel-title';\nimport { SubheaderInlineEdit } from '@atlassian/panel-system/subheader-inline-edit';\nfunction WorkItemDetails() {\n\tconst { panel, closePanel } = usePanel<{ title: string }>();\n\tconst [title, setTitle] = useState(panel.params.title);\n\treturn (\n\t\t<PanelContainer>\n\t\t\t<PanelHeader>\n\t\t\t\t<PanelTitle>Work item</PanelTitle>\n\t\t\t\t<PanelActionGroup>\n\t\t\t\t\t<PanelActionNewTab href=\"/browse/PROJ-42\" label=\"Open work item in a new tab\" />\n\t\t\t\t\t<PanelActionCloseSmart label=\"Close work item\" />\n\t\t\t\t</PanelActionGroup>\n\t\t\t</PanelHeader>\n\t\t\t<PanelContent>\n\t\t\t\t<PanelSubheader\n\t\t\t\t\ttitle={title}\n\t\t\t\t\tinlineEdit={\n\t\t\t\t\t\t<SubheaderInlineEdit\n\t\t\t\t\t\t\tdefaultValue={title}\n\t\t\t\t\t\t\tplaceholder=\"Add a work item title\"\n\t\t\t\t\t\t\teditButtonLabel=\"Edit work item title\"\n\t\t\t\t\t\t\tconfirmButtonLabel=\"Confirm title\"\n\t\t\t\t\t\t\tcancelButtonLabel=\"Cancel editing\"\n\t\t\t\t\t\t\tonConfirm={setTitle}\n\t\t\t\t\t\t/>\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t\t<PanelBody>\n\t\t\t\t\t<Stack space=\"space.200\">\n\t\t\t\t\t\t<Text as=\"p\">PROJ-42 · In progress</Text>\n\t\t\t\t\t\t<Text as=\"p\">Review the release checklist with the project team.</Text>\n\t\t\t\t\t\t<Text as=\"p\">\n\t\t\t\t\t\t\tThis example keeps title edits locally. Connect confirmation to your app's save\n\t\t\t\t\t\t\toperation.\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t</Stack>\n\t\t\t\t</PanelBody>\n\t\t\t</PanelContent>\n\t\t\t<PanelFooter>\n\t\t\t\t<Button onClick={closePanel}>Done</Button>\n\t\t\t</PanelFooter>\n\t\t</PanelContainer>\n\t);\n}\nfunction ProjectContent() {\n\tconst manager = usePanelActions();\n\tconst { activePanel } = usePanelState();\n\treturn (\n\t\t<LayoutWithPanel panelLabel=\"Work item details\" resizeLabel=\"Resize work item details\">\n\t\t\t<Button\n\t\t\t\tisSelected={activePanel?.instanceId === 'PROJ-42'}\n\t\t\t\tonClick={() =>\n\t\t\t\t\tmanager.openPanel({\n\t\t\t\t\t\tinstanceId: 'PROJ-42',\n\t\t\t\t\t\tparams: { title: 'Prepare the release checklist' },\n\t\t\t\t\t\tpanelContent: <WorkItemDetails />,\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t>\n\t\t\t\tView PROJ-42\n\t\t\t</Button>\n\t\t</LayoutWithPanel>\n\t);\n}\n// Internal Atlassian package. This example uses already-loaded React content.\n// For lazy EntryPoints, prefer Trigger inside the app's Relay environment provider.\nexport default function ContextualDetailsExample(): React.JSX.Element {\n\treturn (\n\t\t<PanelProvider>\n\t\t\t<Root>\n\t\t\t\t<Main>\n\t\t\t\t\t<ProjectContent />\n\t\t\t\t</Main>\n\t\t\t</Root>\n\t\t</PanelProvider>\n\t);\n}"]
|
|
1062
1110
|
}, {
|
|
1063
1111
|
name: 'useAllMessages',
|
|
1064
1112
|
description: 'Returns every non-dismissed message in a placement with a placement-bound wrapper. Use it when one surface renders messages from multiple templates.',
|
|
@@ -2064,52 +2112,4 @@ export const atlaskitHooks = [{
|
|
|
2064
2112
|
category: 'studio',
|
|
2065
2113
|
package: '@atlassian/studio-browse-kit',
|
|
2066
2114
|
examples: []
|
|
2067
|
-
}, {
|
|
2068
|
-
name: 'useCloseCurrentPanel',
|
|
2069
|
-
description: 'For internal Atlassian use only: Get a callback that closes the current panel inside LayoutWithPanel or PanelsRenderer. Internal Atlassian package; not available for use outside Atlassian.',
|
|
2070
|
-
status: 'open-beta',
|
|
2071
|
-
keywords: ['panel', 'context', 'state', 'close', 'open'],
|
|
2072
|
-
category: 'layout',
|
|
2073
|
-
package: '@atlassian/panel-system',
|
|
2074
|
-
examples: ["import Button from '@atlaskit/button/default/button';\nimport { Main } from '@atlaskit/navigation-system/layout/main';\nimport { PanelLayout } from '@atlaskit/navigation-system/layout/panel-layout';\nimport { Root } from '@atlaskit/navigation-system/layout/root';\nimport { Text } from '@atlaskit/primitives/compiled/text';\nimport { PanelActionClose } from '@atlassian/panel-system/panel-action/close';\nimport { PanelActionGroup } from '@atlassian/panel-system/panel-action/group';\nimport { PanelBody } from '@atlassian/panel-system/panel-body';\nimport { PanelContainer } from '@atlassian/panel-system/panel-container';\nimport { PanelContent } from '@atlassian/panel-system/panel-content';\nimport { useCloseCurrentPanel, useCurrentPanel } from '@atlassian/panel-system/panel-context';\nimport { PanelDisclaimer } from '@atlassian/panel-system/panel-disclaimer';\nimport { PanelFooter } from '@atlassian/panel-system/panel-footer';\nimport { PanelHeader } from '@atlassian/panel-system/panel-header';\nimport { usePanelManager } from '@atlassian/panel-system/panel-manager';\nimport { PanelProvider } from '@atlassian/panel-system/panel-provider';\nimport { PanelRouter } from '@atlassian/panel-system/panel-router';\nimport { PanelTitle } from '@atlassian/panel-system/panel-title';\nimport { PanelsRenderer } from '@atlassian/panel-system/panels-renderer';\nfunction ProjectSummary() {\n\tconst panel = useCurrentPanel<{ summary: string }>();\n\tconst closePanel = useCloseCurrentPanel();\n\treturn (\n\t\t<PanelContainer>\n\t\t\t<PanelHeader>\n\t\t\t\t<PanelTitle>Project summary</PanelTitle>\n\t\t\t\t<PanelActionGroup>\n\t\t\t\t\t<PanelActionClose label=\"Close project summary\" onClick={closePanel} />\n\t\t\t\t</PanelActionGroup>\n\t\t\t</PanelHeader>\n\t\t\t<PanelContent>\n\t\t\t\t<PanelBody>\n\t\t\t\t\t<Text as=\"p\">{panel.params.summary}</Text>\n\t\t\t\t</PanelBody>\n\t\t\t</PanelContent>\n\t\t\t<PanelFooter\n\t\t\t\tdisclaimer={\n\t\t\t\t\t<PanelDisclaimer>AI-generated content. Verify important details.</PanelDisclaimer>\n\t\t\t\t}\n\t\t\t>\n\t\t\t\t<Button onClick={closePanel}>Done</Button>\n\t\t\t</PanelFooter>\n\t\t</PanelContainer>\n\t);\n}\nfunction ProjectContent() {\n\tconst { state, manager } = usePanelManager();\n\treturn (\n\t\t<PanelLayout\n\t\t\tisPanelOpen={state.activePanel !== null}\n\t\t\tpanelKey={state.activePanel?.instanceId}\n\t\t\tpanelLabel=\"Project summary\"\n\t\t\tresizeLabel=\"Resize project summary\"\n\t\t\tpanel={\n\t\t\t\t<PanelsRenderer>\n\t\t\t\t\t<PanelRouter />\n\t\t\t\t</PanelsRenderer>\n\t\t\t}\n\t\t>\n\t\t\t<Button\n\t\t\t\tonClick={() =>\n\t\t\t\t\tmanager.openPanel({\n\t\t\t\t\t\tinstanceId: 'project-summary',\n\t\t\t\t\t\tparams: {\n\t\t\t\t\t\t\tsummary:\n\t\t\t\t\t\t\t\t'The release checklist is ready for review. Two work items remain in progress.',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tpanelContent: <ProjectSummary />,\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t>\n\t\t\t\tView project summary\n\t\t\t</Button>\n\t\t</PanelLayout>\n\t);\n}\n// Internal Atlassian package. Prefer LayoutWithPanel for the standard integration.\n// Use this composition when the app needs to own its PanelLayout and PanelRouter.\nexport default function CustomRenderingExample(): React.JSX.Element {\n\treturn (\n\t\t<PanelProvider>\n\t\t\t<Root>\n\t\t\t\t<Main>\n\t\t\t\t\t<ProjectContent />\n\t\t\t\t</Main>\n\t\t\t</Root>\n\t\t</PanelProvider>\n\t);\n}"]
|
|
2075
|
-
}, {
|
|
2076
|
-
name: 'useCurrentPanel',
|
|
2077
|
-
description: 'For internal Atlassian use only: Read the current panel and typed runtime parameters inside LayoutWithPanel or PanelsRenderer. Internal Atlassian package; not available for use outside Atlassian.',
|
|
2078
|
-
status: 'open-beta',
|
|
2079
|
-
keywords: ['panel', 'context', 'state', 'close', 'open'],
|
|
2080
|
-
category: 'layout',
|
|
2081
|
-
package: '@atlassian/panel-system',
|
|
2082
|
-
examples: ["import Button from '@atlaskit/button/default/button';\nimport { Main } from '@atlaskit/navigation-system/layout/main';\nimport { PanelLayout } from '@atlaskit/navigation-system/layout/panel-layout';\nimport { Root } from '@atlaskit/navigation-system/layout/root';\nimport { Text } from '@atlaskit/primitives/compiled/text';\nimport { PanelActionClose } from '@atlassian/panel-system/panel-action/close';\nimport { PanelActionGroup } from '@atlassian/panel-system/panel-action/group';\nimport { PanelBody } from '@atlassian/panel-system/panel-body';\nimport { PanelContainer } from '@atlassian/panel-system/panel-container';\nimport { PanelContent } from '@atlassian/panel-system/panel-content';\nimport { useCloseCurrentPanel, useCurrentPanel } from '@atlassian/panel-system/panel-context';\nimport { PanelDisclaimer } from '@atlassian/panel-system/panel-disclaimer';\nimport { PanelFooter } from '@atlassian/panel-system/panel-footer';\nimport { PanelHeader } from '@atlassian/panel-system/panel-header';\nimport { usePanelManager } from '@atlassian/panel-system/panel-manager';\nimport { PanelProvider } from '@atlassian/panel-system/panel-provider';\nimport { PanelRouter } from '@atlassian/panel-system/panel-router';\nimport { PanelTitle } from '@atlassian/panel-system/panel-title';\nimport { PanelsRenderer } from '@atlassian/panel-system/panels-renderer';\nfunction ProjectSummary() {\n\tconst panel = useCurrentPanel<{ summary: string }>();\n\tconst closePanel = useCloseCurrentPanel();\n\treturn (\n\t\t<PanelContainer>\n\t\t\t<PanelHeader>\n\t\t\t\t<PanelTitle>Project summary</PanelTitle>\n\t\t\t\t<PanelActionGroup>\n\t\t\t\t\t<PanelActionClose label=\"Close project summary\" onClick={closePanel} />\n\t\t\t\t</PanelActionGroup>\n\t\t\t</PanelHeader>\n\t\t\t<PanelContent>\n\t\t\t\t<PanelBody>\n\t\t\t\t\t<Text as=\"p\">{panel.params.summary}</Text>\n\t\t\t\t</PanelBody>\n\t\t\t</PanelContent>\n\t\t\t<PanelFooter\n\t\t\t\tdisclaimer={\n\t\t\t\t\t<PanelDisclaimer>AI-generated content. Verify important details.</PanelDisclaimer>\n\t\t\t\t}\n\t\t\t>\n\t\t\t\t<Button onClick={closePanel}>Done</Button>\n\t\t\t</PanelFooter>\n\t\t</PanelContainer>\n\t);\n}\nfunction ProjectContent() {\n\tconst { state, manager } = usePanelManager();\n\treturn (\n\t\t<PanelLayout\n\t\t\tisPanelOpen={state.activePanel !== null}\n\t\t\tpanelKey={state.activePanel?.instanceId}\n\t\t\tpanelLabel=\"Project summary\"\n\t\t\tresizeLabel=\"Resize project summary\"\n\t\t\tpanel={\n\t\t\t\t<PanelsRenderer>\n\t\t\t\t\t<PanelRouter />\n\t\t\t\t</PanelsRenderer>\n\t\t\t}\n\t\t>\n\t\t\t<Button\n\t\t\t\tonClick={() =>\n\t\t\t\t\tmanager.openPanel({\n\t\t\t\t\t\tinstanceId: 'project-summary',\n\t\t\t\t\t\tparams: {\n\t\t\t\t\t\t\tsummary:\n\t\t\t\t\t\t\t\t'The release checklist is ready for review. Two work items remain in progress.',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tpanelContent: <ProjectSummary />,\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t>\n\t\t\t\tView project summary\n\t\t\t</Button>\n\t\t</PanelLayout>\n\t);\n}\n// Internal Atlassian package. Prefer LayoutWithPanel for the standard integration.\n// Use this composition when the app needs to own its PanelLayout and PanelRouter.\nexport default function CustomRenderingExample(): React.JSX.Element {\n\treturn (\n\t\t<PanelProvider>\n\t\t\t<Root>\n\t\t\t\t<Main>\n\t\t\t\t\t<ProjectContent />\n\t\t\t\t</Main>\n\t\t\t</Root>\n\t\t</PanelProvider>\n\t);\n}"]
|
|
2083
|
-
}, {
|
|
2084
|
-
name: 'usePanel',
|
|
2085
|
-
description: 'For internal Atlassian use only: Read the current panel and its close function inside the context supplied by LayoutWithPanel or PanelsRenderer. Internal Atlassian package; not available for use outside Atlassian.',
|
|
2086
|
-
status: 'open-beta',
|
|
2087
|
-
keywords: ['panel', 'context', 'state', 'close', 'open'],
|
|
2088
|
-
category: 'layout',
|
|
2089
|
-
package: '@atlassian/panel-system',
|
|
2090
|
-
examples: ["import React, { useState } from 'react';\nimport Button from '@atlaskit/button/default/button';\nimport { Main } from '@atlaskit/navigation-system/layout/main';\nimport { Root } from '@atlaskit/navigation-system/layout/root';\nimport { Stack } from '@atlaskit/primitives/compiled/stack';\nimport { Text } from '@atlaskit/primitives/compiled/text';\nimport { LayoutWithPanel } from '@atlassian/panel-system/layout-with-panel';\nimport { PanelActionCloseSmart } from '@atlassian/panel-system/panel-action/close-smart';\nimport { PanelActionGroup } from '@atlassian/panel-system/panel-action/group';\nimport { PanelActionNewTab } from '@atlassian/panel-system/panel-action/new-tab';\nimport { PanelBody } from '@atlassian/panel-system/panel-body';\nimport { PanelContainer } from '@atlassian/panel-system/panel-container';\nimport { PanelContent } from '@atlassian/panel-system/panel-content';\nimport { usePanel } from '@atlassian/panel-system/panel-context';\nimport { PanelFooter } from '@atlassian/panel-system/panel-footer';\nimport { PanelHeader } from '@atlassian/panel-system/panel-header';\nimport { usePanelActions, usePanelState } from '@atlassian/panel-system/panel-manager';\nimport { PanelProvider } from '@atlassian/panel-system/panel-provider';\nimport { PanelSubheader } from '@atlassian/panel-system/panel-subheader';\nimport { PanelTitle } from '@atlassian/panel-system/panel-title';\nimport { SubheaderInlineEdit } from '@atlassian/panel-system/subheader-inline-edit';\nfunction WorkItemDetails() {\n\tconst { panel, closePanel } = usePanel<{ title: string }>();\n\tconst [title, setTitle] = useState(panel.params.title);\n\treturn (\n\t\t<PanelContainer>\n\t\t\t<PanelHeader>\n\t\t\t\t<PanelTitle>Work item</PanelTitle>\n\t\t\t\t<PanelActionGroup>\n\t\t\t\t\t<PanelActionNewTab href=\"/browse/PROJ-42\" label=\"Open work item in a new tab\" />\n\t\t\t\t\t<PanelActionCloseSmart label=\"Close work item\" />\n\t\t\t\t</PanelActionGroup>\n\t\t\t</PanelHeader>\n\t\t\t<PanelContent>\n\t\t\t\t<PanelSubheader\n\t\t\t\t\ttitle={title}\n\t\t\t\t\tinlineEdit={\n\t\t\t\t\t\t<SubheaderInlineEdit\n\t\t\t\t\t\t\tdefaultValue={title}\n\t\t\t\t\t\t\tplaceholder=\"Add a work item title\"\n\t\t\t\t\t\t\teditButtonLabel=\"Edit work item title\"\n\t\t\t\t\t\t\tconfirmButtonLabel=\"Confirm title\"\n\t\t\t\t\t\t\tcancelButtonLabel=\"Cancel editing\"\n\t\t\t\t\t\t\tonConfirm={setTitle}\n\t\t\t\t\t\t/>\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t\t<PanelBody>\n\t\t\t\t\t<Stack space=\"space.200\">\n\t\t\t\t\t\t<Text as=\"p\">PROJ-42 · In progress</Text>\n\t\t\t\t\t\t<Text as=\"p\">Review the release checklist with the project team.</Text>\n\t\t\t\t\t\t<Text as=\"p\">\n\t\t\t\t\t\t\tThis example keeps title edits locally. Connect confirmation to your app's save\n\t\t\t\t\t\t\toperation.\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t</Stack>\n\t\t\t\t</PanelBody>\n\t\t\t</PanelContent>\n\t\t\t<PanelFooter>\n\t\t\t\t<Button onClick={closePanel}>Done</Button>\n\t\t\t</PanelFooter>\n\t\t</PanelContainer>\n\t);\n}\nfunction ProjectContent() {\n\tconst manager = usePanelActions();\n\tconst { activePanel } = usePanelState();\n\treturn (\n\t\t<LayoutWithPanel panelLabel=\"Work item details\" resizeLabel=\"Resize work item details\">\n\t\t\t<Button\n\t\t\t\tisSelected={activePanel?.instanceId === 'PROJ-42'}\n\t\t\t\tonClick={() =>\n\t\t\t\t\tmanager.openPanel({\n\t\t\t\t\t\tinstanceId: 'PROJ-42',\n\t\t\t\t\t\tparams: { title: 'Prepare the release checklist' },\n\t\t\t\t\t\tpanelContent: <WorkItemDetails />,\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t>\n\t\t\t\tView PROJ-42\n\t\t\t</Button>\n\t\t</LayoutWithPanel>\n\t);\n}\n// Internal Atlassian package. This example uses already-loaded React content.\n// For lazy EntryPoints, prefer Trigger inside the app's Relay environment provider.\nexport default function ContextualDetailsExample(): React.JSX.Element {\n\treturn (\n\t\t<PanelProvider>\n\t\t\t<Root>\n\t\t\t\t<Main>\n\t\t\t\t\t<ProjectContent />\n\t\t\t\t</Main>\n\t\t\t</Root>\n\t\t</PanelProvider>\n\t);\n}"]
|
|
2091
|
-
}, {
|
|
2092
|
-
name: 'usePanelActions',
|
|
2093
|
-
description: 'For internal Atlassian use only: Access stable panel actions when a consumer only needs to open, close, or resize panels. Requires PanelProvider. Internal Atlassian package; not available for use outside Atlassian.',
|
|
2094
|
-
status: 'open-beta',
|
|
2095
|
-
keywords: ['panel', 'context', 'state', 'close', 'open'],
|
|
2096
|
-
category: 'layout',
|
|
2097
|
-
package: '@atlassian/panel-system',
|
|
2098
|
-
examples: ["import React, { useState } from 'react';\nimport Button from '@atlaskit/button/default/button';\nimport { Main } from '@atlaskit/navigation-system/layout/main';\nimport { Root } from '@atlaskit/navigation-system/layout/root';\nimport { Stack } from '@atlaskit/primitives/compiled/stack';\nimport { Text } from '@atlaskit/primitives/compiled/text';\nimport { LayoutWithPanel } from '@atlassian/panel-system/layout-with-panel';\nimport { PanelActionCloseSmart } from '@atlassian/panel-system/panel-action/close-smart';\nimport { PanelActionGroup } from '@atlassian/panel-system/panel-action/group';\nimport { PanelActionNewTab } from '@atlassian/panel-system/panel-action/new-tab';\nimport { PanelBody } from '@atlassian/panel-system/panel-body';\nimport { PanelContainer } from '@atlassian/panel-system/panel-container';\nimport { PanelContent } from '@atlassian/panel-system/panel-content';\nimport { usePanel } from '@atlassian/panel-system/panel-context';\nimport { PanelFooter } from '@atlassian/panel-system/panel-footer';\nimport { PanelHeader } from '@atlassian/panel-system/panel-header';\nimport { usePanelActions, usePanelState } from '@atlassian/panel-system/panel-manager';\nimport { PanelProvider } from '@atlassian/panel-system/panel-provider';\nimport { PanelSubheader } from '@atlassian/panel-system/panel-subheader';\nimport { PanelTitle } from '@atlassian/panel-system/panel-title';\nimport { SubheaderInlineEdit } from '@atlassian/panel-system/subheader-inline-edit';\nfunction WorkItemDetails() {\n\tconst { panel, closePanel } = usePanel<{ title: string }>();\n\tconst [title, setTitle] = useState(panel.params.title);\n\treturn (\n\t\t<PanelContainer>\n\t\t\t<PanelHeader>\n\t\t\t\t<PanelTitle>Work item</PanelTitle>\n\t\t\t\t<PanelActionGroup>\n\t\t\t\t\t<PanelActionNewTab href=\"/browse/PROJ-42\" label=\"Open work item in a new tab\" />\n\t\t\t\t\t<PanelActionCloseSmart label=\"Close work item\" />\n\t\t\t\t</PanelActionGroup>\n\t\t\t</PanelHeader>\n\t\t\t<PanelContent>\n\t\t\t\t<PanelSubheader\n\t\t\t\t\ttitle={title}\n\t\t\t\t\tinlineEdit={\n\t\t\t\t\t\t<SubheaderInlineEdit\n\t\t\t\t\t\t\tdefaultValue={title}\n\t\t\t\t\t\t\tplaceholder=\"Add a work item title\"\n\t\t\t\t\t\t\teditButtonLabel=\"Edit work item title\"\n\t\t\t\t\t\t\tconfirmButtonLabel=\"Confirm title\"\n\t\t\t\t\t\t\tcancelButtonLabel=\"Cancel editing\"\n\t\t\t\t\t\t\tonConfirm={setTitle}\n\t\t\t\t\t\t/>\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t\t<PanelBody>\n\t\t\t\t\t<Stack space=\"space.200\">\n\t\t\t\t\t\t<Text as=\"p\">PROJ-42 · In progress</Text>\n\t\t\t\t\t\t<Text as=\"p\">Review the release checklist with the project team.</Text>\n\t\t\t\t\t\t<Text as=\"p\">\n\t\t\t\t\t\t\tThis example keeps title edits locally. Connect confirmation to your app's save\n\t\t\t\t\t\t\toperation.\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t</Stack>\n\t\t\t\t</PanelBody>\n\t\t\t</PanelContent>\n\t\t\t<PanelFooter>\n\t\t\t\t<Button onClick={closePanel}>Done</Button>\n\t\t\t</PanelFooter>\n\t\t</PanelContainer>\n\t);\n}\nfunction ProjectContent() {\n\tconst manager = usePanelActions();\n\tconst { activePanel } = usePanelState();\n\treturn (\n\t\t<LayoutWithPanel panelLabel=\"Work item details\" resizeLabel=\"Resize work item details\">\n\t\t\t<Button\n\t\t\t\tisSelected={activePanel?.instanceId === 'PROJ-42'}\n\t\t\t\tonClick={() =>\n\t\t\t\t\tmanager.openPanel({\n\t\t\t\t\t\tinstanceId: 'PROJ-42',\n\t\t\t\t\t\tparams: { title: 'Prepare the release checklist' },\n\t\t\t\t\t\tpanelContent: <WorkItemDetails />,\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t>\n\t\t\t\tView PROJ-42\n\t\t\t</Button>\n\t\t</LayoutWithPanel>\n\t);\n}\n// Internal Atlassian package. This example uses already-loaded React content.\n// For lazy EntryPoints, prefer Trigger inside the app's Relay environment provider.\nexport default function ContextualDetailsExample(): React.JSX.Element {\n\treturn (\n\t\t<PanelProvider>\n\t\t\t<Root>\n\t\t\t\t<Main>\n\t\t\t\t\t<ProjectContent />\n\t\t\t\t</Main>\n\t\t\t</Root>\n\t\t</PanelProvider>\n\t);\n}"]
|
|
2099
|
-
}, {
|
|
2100
|
-
name: 'usePanelManager',
|
|
2101
|
-
description: 'For internal Atlassian use only: Read both panel state and actions inside PanelProvider. Prefer usePanelActions for action-only consumers. Internal Atlassian package; not available for use outside Atlassian.',
|
|
2102
|
-
status: 'open-beta',
|
|
2103
|
-
keywords: ['panel', 'context', 'state', 'close', 'open'],
|
|
2104
|
-
category: 'layout',
|
|
2105
|
-
package: '@atlassian/panel-system',
|
|
2106
|
-
examples: ["import Button from '@atlaskit/button/default/button';\nimport { Main } from '@atlaskit/navigation-system/layout/main';\nimport { PanelLayout } from '@atlaskit/navigation-system/layout/panel-layout';\nimport { Root } from '@atlaskit/navigation-system/layout/root';\nimport { Text } from '@atlaskit/primitives/compiled/text';\nimport { PanelActionClose } from '@atlassian/panel-system/panel-action/close';\nimport { PanelActionGroup } from '@atlassian/panel-system/panel-action/group';\nimport { PanelBody } from '@atlassian/panel-system/panel-body';\nimport { PanelContainer } from '@atlassian/panel-system/panel-container';\nimport { PanelContent } from '@atlassian/panel-system/panel-content';\nimport { useCloseCurrentPanel, useCurrentPanel } from '@atlassian/panel-system/panel-context';\nimport { PanelDisclaimer } from '@atlassian/panel-system/panel-disclaimer';\nimport { PanelFooter } from '@atlassian/panel-system/panel-footer';\nimport { PanelHeader } from '@atlassian/panel-system/panel-header';\nimport { usePanelManager } from '@atlassian/panel-system/panel-manager';\nimport { PanelProvider } from '@atlassian/panel-system/panel-provider';\nimport { PanelRouter } from '@atlassian/panel-system/panel-router';\nimport { PanelTitle } from '@atlassian/panel-system/panel-title';\nimport { PanelsRenderer } from '@atlassian/panel-system/panels-renderer';\nfunction ProjectSummary() {\n\tconst panel = useCurrentPanel<{ summary: string }>();\n\tconst closePanel = useCloseCurrentPanel();\n\treturn (\n\t\t<PanelContainer>\n\t\t\t<PanelHeader>\n\t\t\t\t<PanelTitle>Project summary</PanelTitle>\n\t\t\t\t<PanelActionGroup>\n\t\t\t\t\t<PanelActionClose label=\"Close project summary\" onClick={closePanel} />\n\t\t\t\t</PanelActionGroup>\n\t\t\t</PanelHeader>\n\t\t\t<PanelContent>\n\t\t\t\t<PanelBody>\n\t\t\t\t\t<Text as=\"p\">{panel.params.summary}</Text>\n\t\t\t\t</PanelBody>\n\t\t\t</PanelContent>\n\t\t\t<PanelFooter\n\t\t\t\tdisclaimer={\n\t\t\t\t\t<PanelDisclaimer>AI-generated content. Verify important details.</PanelDisclaimer>\n\t\t\t\t}\n\t\t\t>\n\t\t\t\t<Button onClick={closePanel}>Done</Button>\n\t\t\t</PanelFooter>\n\t\t</PanelContainer>\n\t);\n}\nfunction ProjectContent() {\n\tconst { state, manager } = usePanelManager();\n\treturn (\n\t\t<PanelLayout\n\t\t\tisPanelOpen={state.activePanel !== null}\n\t\t\tpanelKey={state.activePanel?.instanceId}\n\t\t\tpanelLabel=\"Project summary\"\n\t\t\tresizeLabel=\"Resize project summary\"\n\t\t\tpanel={\n\t\t\t\t<PanelsRenderer>\n\t\t\t\t\t<PanelRouter />\n\t\t\t\t</PanelsRenderer>\n\t\t\t}\n\t\t>\n\t\t\t<Button\n\t\t\t\tonClick={() =>\n\t\t\t\t\tmanager.openPanel({\n\t\t\t\t\t\tinstanceId: 'project-summary',\n\t\t\t\t\t\tparams: {\n\t\t\t\t\t\t\tsummary:\n\t\t\t\t\t\t\t\t'The release checklist is ready for review. Two work items remain in progress.',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tpanelContent: <ProjectSummary />,\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t>\n\t\t\t\tView project summary\n\t\t\t</Button>\n\t\t</PanelLayout>\n\t);\n}\n// Internal Atlassian package. Prefer LayoutWithPanel for the standard integration.\n// Use this composition when the app needs to own its PanelLayout and PanelRouter.\nexport default function CustomRenderingExample(): React.JSX.Element {\n\treturn (\n\t\t<PanelProvider>\n\t\t\t<Root>\n\t\t\t\t<Main>\n\t\t\t\t\t<ProjectContent />\n\t\t\t\t</Main>\n\t\t\t</Root>\n\t\t</PanelProvider>\n\t);\n}"]
|
|
2107
|
-
}, {
|
|
2108
|
-
name: 'usePanelState',
|
|
2109
|
-
description: 'For internal Atlassian use only: Read active-panel and preferred-width state inside PanelProvider. Internal Atlassian package; not available for use outside Atlassian.',
|
|
2110
|
-
status: 'open-beta',
|
|
2111
|
-
keywords: ['panel', 'context', 'state', 'close', 'open'],
|
|
2112
|
-
category: 'layout',
|
|
2113
|
-
package: '@atlassian/panel-system',
|
|
2114
|
-
examples: ["import React, { useState } from 'react';\nimport Button from '@atlaskit/button/default/button';\nimport { Main } from '@atlaskit/navigation-system/layout/main';\nimport { Root } from '@atlaskit/navigation-system/layout/root';\nimport { Stack } from '@atlaskit/primitives/compiled/stack';\nimport { Text } from '@atlaskit/primitives/compiled/text';\nimport { LayoutWithPanel } from '@atlassian/panel-system/layout-with-panel';\nimport { PanelActionCloseSmart } from '@atlassian/panel-system/panel-action/close-smart';\nimport { PanelActionGroup } from '@atlassian/panel-system/panel-action/group';\nimport { PanelActionNewTab } from '@atlassian/panel-system/panel-action/new-tab';\nimport { PanelBody } from '@atlassian/panel-system/panel-body';\nimport { PanelContainer } from '@atlassian/panel-system/panel-container';\nimport { PanelContent } from '@atlassian/panel-system/panel-content';\nimport { usePanel } from '@atlassian/panel-system/panel-context';\nimport { PanelFooter } from '@atlassian/panel-system/panel-footer';\nimport { PanelHeader } from '@atlassian/panel-system/panel-header';\nimport { usePanelActions, usePanelState } from '@atlassian/panel-system/panel-manager';\nimport { PanelProvider } from '@atlassian/panel-system/panel-provider';\nimport { PanelSubheader } from '@atlassian/panel-system/panel-subheader';\nimport { PanelTitle } from '@atlassian/panel-system/panel-title';\nimport { SubheaderInlineEdit } from '@atlassian/panel-system/subheader-inline-edit';\nfunction WorkItemDetails() {\n\tconst { panel, closePanel } = usePanel<{ title: string }>();\n\tconst [title, setTitle] = useState(panel.params.title);\n\treturn (\n\t\t<PanelContainer>\n\t\t\t<PanelHeader>\n\t\t\t\t<PanelTitle>Work item</PanelTitle>\n\t\t\t\t<PanelActionGroup>\n\t\t\t\t\t<PanelActionNewTab href=\"/browse/PROJ-42\" label=\"Open work item in a new tab\" />\n\t\t\t\t\t<PanelActionCloseSmart label=\"Close work item\" />\n\t\t\t\t</PanelActionGroup>\n\t\t\t</PanelHeader>\n\t\t\t<PanelContent>\n\t\t\t\t<PanelSubheader\n\t\t\t\t\ttitle={title}\n\t\t\t\t\tinlineEdit={\n\t\t\t\t\t\t<SubheaderInlineEdit\n\t\t\t\t\t\t\tdefaultValue={title}\n\t\t\t\t\t\t\tplaceholder=\"Add a work item title\"\n\t\t\t\t\t\t\teditButtonLabel=\"Edit work item title\"\n\t\t\t\t\t\t\tconfirmButtonLabel=\"Confirm title\"\n\t\t\t\t\t\t\tcancelButtonLabel=\"Cancel editing\"\n\t\t\t\t\t\t\tonConfirm={setTitle}\n\t\t\t\t\t\t/>\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t\t<PanelBody>\n\t\t\t\t\t<Stack space=\"space.200\">\n\t\t\t\t\t\t<Text as=\"p\">PROJ-42 · In progress</Text>\n\t\t\t\t\t\t<Text as=\"p\">Review the release checklist with the project team.</Text>\n\t\t\t\t\t\t<Text as=\"p\">\n\t\t\t\t\t\t\tThis example keeps title edits locally. Connect confirmation to your app's save\n\t\t\t\t\t\t\toperation.\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t</Stack>\n\t\t\t\t</PanelBody>\n\t\t\t</PanelContent>\n\t\t\t<PanelFooter>\n\t\t\t\t<Button onClick={closePanel}>Done</Button>\n\t\t\t</PanelFooter>\n\t\t</PanelContainer>\n\t);\n}\nfunction ProjectContent() {\n\tconst manager = usePanelActions();\n\tconst { activePanel } = usePanelState();\n\treturn (\n\t\t<LayoutWithPanel panelLabel=\"Work item details\" resizeLabel=\"Resize work item details\">\n\t\t\t<Button\n\t\t\t\tisSelected={activePanel?.instanceId === 'PROJ-42'}\n\t\t\t\tonClick={() =>\n\t\t\t\t\tmanager.openPanel({\n\t\t\t\t\t\tinstanceId: 'PROJ-42',\n\t\t\t\t\t\tparams: { title: 'Prepare the release checklist' },\n\t\t\t\t\t\tpanelContent: <WorkItemDetails />,\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t>\n\t\t\t\tView PROJ-42\n\t\t\t</Button>\n\t\t</LayoutWithPanel>\n\t);\n}\n// Internal Atlassian package. This example uses already-loaded React content.\n// For lazy EntryPoints, prefer Trigger inside the app's Relay environment provider.\nexport default function ContextualDetailsExample(): React.JSX.Element {\n\treturn (\n\t\t<PanelProvider>\n\t\t\t<Root>\n\t\t\t\t<Main>\n\t\t\t\t\t<ProjectContent />\n\t\t\t\t</Main>\n\t\t\t</Root>\n\t\t</PanelProvider>\n\t);\n}"]
|
|
2115
2115
|
}];
|