@atlaskit/dropdown-menu 12.26.1 → 12.26.3

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.
Files changed (49) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/types/checkbox/dropdown-item-checkbox-group.d.ts +2 -2
  3. package/dist/types/checkbox/dropdown-item-checkbox.d.ts +2 -2
  4. package/dist/types/dropdown-menu.d.ts +2 -2
  5. package/dist/types/internal/components/checkbox-icon.d.ts +2 -2
  6. package/dist/types/internal/components/group-title.d.ts +2 -2
  7. package/dist/types/internal/components/radio-icon.d.ts +2 -2
  8. package/dist/types/internal/context/selection-store.d.ts +1 -1
  9. package/dist/types/radio/dropdown-item-radio-group.d.ts +1 -1
  10. package/dist/types/radio/dropdown-item-radio.d.ts +2 -2
  11. package/dist/types-ts4.5/checkbox/dropdown-item-checkbox-group.d.ts +2 -2
  12. package/dist/types-ts4.5/checkbox/dropdown-item-checkbox.d.ts +2 -2
  13. package/dist/types-ts4.5/dropdown-menu.d.ts +2 -2
  14. package/dist/types-ts4.5/internal/components/checkbox-icon.d.ts +2 -2
  15. package/dist/types-ts4.5/internal/components/group-title.d.ts +2 -2
  16. package/dist/types-ts4.5/internal/components/radio-icon.d.ts +2 -2
  17. package/dist/types-ts4.5/internal/context/selection-store.d.ts +1 -1
  18. package/dist/types-ts4.5/radio/dropdown-item-radio-group.d.ts +1 -1
  19. package/dist/types-ts4.5/radio/dropdown-item-radio.d.ts +2 -2
  20. package/package.json +5 -6
  21. package/codemods/11.0.0-lite-mode.tsx +0 -51
  22. package/codemods/__tests__/11.0.0-lite-mode.test.tsx +0 -68
  23. package/codemods/__tests__/convert-position.test.tsx +0 -88
  24. package/codemods/__tests__/convert-triggerType.test.tsx +0 -183
  25. package/codemods/__tests__/deprecate-items.test.tsx +0 -108
  26. package/codemods/__tests__/deprecate-onItemActivated.test.tsx +0 -108
  27. package/codemods/__tests__/deprecate-onPositioned.test.tsx +0 -108
  28. package/codemods/__tests__/deprecate-shouldFitContainer.tsx +0 -108
  29. package/codemods/__tests__/rename-imports.tsx +0 -130
  30. package/codemods/__tests__/replace-position-to-placement.test.tsx +0 -84
  31. package/codemods/__tests__/replace-shouldAllowMultipleLine.test.tsx +0 -122
  32. package/codemods/__tests__/update-component-callsites.tsx +0 -64
  33. package/codemods/migrates/convert-trigger-type.tsx +0 -52
  34. package/codemods/migrates/deprecate-autoFocus.tsx +0 -10
  35. package/codemods/migrates/deprecate-boundariesElement.tsx +0 -9
  36. package/codemods/migrates/deprecate-isCompact.tsx +0 -10
  37. package/codemods/migrates/deprecate-isHidden.tsx +0 -10
  38. package/codemods/migrates/deprecate-isMenuFixed.tsx +0 -6
  39. package/codemods/migrates/deprecate-items.tsx +0 -6
  40. package/codemods/migrates/deprecate-onItemActivated.tsx +0 -9
  41. package/codemods/migrates/deprecate-onPositioned.tsx +0 -9
  42. package/codemods/migrates/deprecate-shouldFitContainer.tsx +0 -9
  43. package/codemods/migrates/rename-imports.tsx +0 -22
  44. package/codemods/migrates/replace-position-to-placement.tsx +0 -27
  45. package/codemods/migrates/replace-shouldAllowMultiline.tsx +0 -33
  46. package/codemods/migrates/update-component-callsites.tsx +0 -13
  47. package/codemods/utils/convert-position.tsx +0 -24
  48. package/codemods/utils/create-rename-import.tsx +0 -39
  49. package/codemods/utils/create-update-callsite.tsx +0 -31
@@ -1,39 +0,0 @@
1
- import type core from 'jscodeshift';
2
- import { type Collection } from 'jscodeshift/src/Collection';
3
-
4
- export const createRenameImportFor =
5
- ({
6
- componentName,
7
- newComponentName,
8
- packagePath,
9
- isDefaultImport,
10
- }: {
11
- componentName: string;
12
- newComponentName: string;
13
- packagePath: string;
14
- isDefaultImport: boolean;
15
- }) =>
16
- (j: core.JSCodeshift, source: Collection<Node>) => {
17
- source
18
- .find(j.ImportDeclaration)
19
- .filter((path) => path.node.source.value === packagePath)
20
- .find(j.ImportSpecifier)
21
- .filter((path) => path.node.imported.name === componentName)
22
- .replaceWith((importSpecifier) => {
23
- const specifier = j.identifier(newComponentName);
24
-
25
- let importAlias;
26
- if (importSpecifier && importSpecifier.node && importSpecifier.node.local) {
27
- importAlias =
28
- importSpecifier.node.local.name !== importSpecifier.node.imported.name
29
- ? j.identifier(importSpecifier.node.local.name)
30
- : null;
31
- }
32
-
33
- return isDefaultImport
34
- ? j.importDefaultSpecifier(importAlias || specifier)
35
- : j.importSpecifier(specifier, importAlias);
36
- });
37
-
38
- return source.toSource();
39
- };
@@ -1,31 +0,0 @@
1
- import type core from 'jscodeshift';
2
- import { type Collection } from 'jscodeshift/src/Collection';
3
-
4
- export const createUpdateCallsite =
5
- ({
6
- componentName,
7
- newComponentName,
8
- packagePath,
9
- }: {
10
- componentName: string;
11
- newComponentName: string;
12
- packagePath: string;
13
- }) =>
14
- (j: core.JSCodeshift, source: Collection<Node>) => {
15
- source
16
- .find(j.JSXElement)
17
- // @ts-ignore
18
- .filter((path) => path.node.openingElement.name.name === componentName)
19
- .replaceWith((element) => {
20
- const elementName = j.jsxIdentifier(newComponentName);
21
- const newComponent = j.jsxElement(
22
- j.jsxOpeningElement(elementName, element.node.openingElement.attributes),
23
- j.jsxClosingElement(elementName),
24
- element.node.children,
25
- );
26
-
27
- return newComponent;
28
- });
29
-
30
- return source.toSource();
31
- };