@atlaskit/ads-mcp 1.12.11 → 1.12.13
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 +15 -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 +5 -5
- package/dist/cjs/tools/get-atlaskit-utilities/atlaskit-utilities.codegen.js +2 -2
- package/dist/cjs/tools/get-lint-rules/lint-rules-structured-content.codegen.js +41 -25
- package/dist/cjs/tools/migration-guides/migrations/onboarding-with-motion.js +5 -5
- 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 +5 -5
- package/dist/es2019/tools/get-atlaskit-utilities/atlaskit-utilities.codegen.js +2 -2
- package/dist/es2019/tools/get-lint-rules/lint-rules-structured-content.codegen.js +41 -25
- package/dist/es2019/tools/migration-guides/migrations/onboarding-with-motion.js +23 -30
- 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 +5 -5
- package/dist/esm/tools/get-atlaskit-utilities/atlaskit-utilities.codegen.js +2 -2
- package/dist/esm/tools/get-lint-rules/lint-rules-structured-content.codegen.js +41 -25
- package/dist/esm/tools/migration-guides/migrations/onboarding-with-motion.js +5 -5
- 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/dist/types/tools/get-lint-rules/lint-rules-structured-content.codegen.d.ts +1 -1
- package/package.json +3 -3
|
@@ -8,16 +8,16 @@ var additionalResources = 'Visit https://hello.atlassian.net/wiki/spaces/DST/pag
|
|
|
8
8
|
var onboardingWithMotion = exports.onboardingWithMotion = {
|
|
9
9
|
id: 'motion',
|
|
10
10
|
title: 'Single Step Spotlight with Motion Migration',
|
|
11
|
-
description: 'Migrate a single step spotlight with entrance animation from @atlaskit/onboarding to @atlaskit/spotlight
|
|
11
|
+
description: 'Migrate a single step spotlight with entrance animation from @atlaskit/onboarding to @atlaskit/spotlight, which owns its default motion',
|
|
12
12
|
fromPackage: '@atlaskit/onboarding',
|
|
13
13
|
toPackage: '@atlaskit/spotlight',
|
|
14
14
|
examples: [{
|
|
15
15
|
title: 'Migrate spotlight with transition animation',
|
|
16
|
-
description: '
|
|
16
|
+
description: 'Remove SpotlightTransition because @atlaskit/spotlight applies its default motion internally',
|
|
17
17
|
before: "import React, { useState } from 'react';\nimport Button from '@atlaskit/button/default/button';\nimport {\n Spotlight,\n SpotlightManager,\n SpotlightTarget,\n SpotlightTransition,\n} from '@atlaskit/onboarding';\n\nconst OnboardingSpotlightWithTransition = () => {\n const [isSpotlightActive, setIsSpotlightActive] = useState(false);\n const start = () => setIsSpotlightActive(true);\n const end = () => setIsSpotlightActive(false);\n\n return (\n <SpotlightManager>\n <SpotlightTarget name=\"my-target\">\n <Button>Target Element</Button>\n </SpotlightTarget>\n <div>\n <Button appearance=\"primary\" onClick={start}>\n Show spotlight\n </Button>\n </div>\n <SpotlightTransition>\n {isSpotlightActive && (\n <Spotlight\n actions={[\n {\n onClick: end,\n text: 'Got it',\n },\n ]}\n heading=\"Feature Heading\"\n target=\"my-target\"\n key=\"my-target\"\n >\n This is the spotlight body content describing the feature.\n </Spotlight>\n )}\n </SpotlightTransition>\n </SpotlightManager>\n );\n};",
|
|
18
|
-
after: "import React, { useState } from 'react';\nimport Button from '@atlaskit/button/default/button';\nimport {
|
|
19
|
-
explanation: "Key changes when migrating a spotlight with transition animation:\n-
|
|
18
|
+
after: "import React, { useState } from 'react';\nimport Button from '@atlaskit/button/default/button';\nimport { Text } from '@atlaskit/primitives/compiled';\nimport { PopoverContent } from '@atlaskit/spotlight/popover-content';\nimport { PopoverProvider } from '@atlaskit/spotlight/popover-provider';\nimport { PopoverTarget } from '@atlaskit/spotlight/popover-target';\nimport { SpotlightActions } from '@atlaskit/spotlight/actions';\nimport { SpotlightBody } from '@atlaskit/spotlight/body';\nimport { SpotlightCard } from '@atlaskit/spotlight/card';\nimport { SpotlightControls } from '@atlaskit/spotlight/controls';\nimport { SpotlightDismissControl } from '@atlaskit/spotlight/dismiss-control';\nimport { SpotlightFooter } from '@atlaskit/spotlight/footer';\nimport { SpotlightHeader } from '@atlaskit/spotlight/header';\nimport { SpotlightHeadline } from '@atlaskit/spotlight/headline';\nimport { SpotlightPrimaryAction } from '@atlaskit/spotlight/primary-action';\n\nconst SpotlightWithMotion = () => {\n const [isVisible, setIsVisible] = useState(false);\n const dismiss = () => setIsVisible(false);\n const done = () => setIsVisible(false);\n\n return (\n <PopoverProvider>\n <PopoverTarget>\n <Button onClick={() => setIsVisible(true)}>Target Element</Button>\n </PopoverTarget>\n <PopoverContent done={done} dismiss={dismiss} placement=\"bottom-start\" isVisible={isVisible}>\n <SpotlightCard>\n <SpotlightHeader>\n <SpotlightHeadline>Feature Heading</SpotlightHeadline>\n <SpotlightControls>\n <SpotlightDismissControl />\n </SpotlightControls>\n </SpotlightHeader>\n <SpotlightBody>\n <Text>This is the spotlight body content describing the feature.</Text>\n </SpotlightBody>\n <SpotlightFooter>\n <SpotlightActions>\n <SpotlightPrimaryAction onClick={done}>Got it</SpotlightPrimaryAction>\n </SpotlightActions>\n </SpotlightFooter>\n </SpotlightCard>\n </PopoverContent>\n </PopoverProvider>\n );\n};",
|
|
19
|
+
explanation: "Key changes when migrating a spotlight with transition animation:\n- Remove SpotlightTransition; PopoverContent applies the default spotlight motion internally\n- Do not add a separate @atlaskit/motion wrapper around SpotlightCard\n- Pass motion={null} to PopoverContent only when motion must be disabled\n- Pass a custom motion component to PopoverContent's motion prop only when the default treatment does not meet the approved design\n- All other migration changes from single step spotlight apply (PopoverProvider, compositional components, etc.)"
|
|
20
20
|
}],
|
|
21
|
-
bestPractices: ['
|
|
21
|
+
bestPractices: ['Use the default motion owned by PopoverContent', 'Pass motion={null} to PopoverContent to disable motion, or pass a custom motion component only for an approved custom treatment'],
|
|
22
22
|
additionalResources: additionalResources
|
|
23
23
|
};
|