@atlaskit/button 16.3.10 → 16.4.1

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 (50) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/codemods/15.1.1-data-testid.tsx +10 -12
  3. package/codemods/__tests__/15.0.0-lite-mode/optimistic.tsx +6 -12
  4. package/codemods/__tests__/15.0.0-lite-mode/shared.tsx +1 -2
  5. package/codemods/__tests__/15.1.1-data-testid/rename-data-testid.tsx +1 -2
  6. package/codemods/helpers/helpers-generic.tsx +10 -12
  7. package/dist/cjs/button-group.js +5 -5
  8. package/dist/cjs/entry-points/standard-button.js +1 -1
  9. package/dist/cjs/shared/button-base.js +9 -9
  10. package/dist/cjs/shared/css.js +14 -12
  11. package/dist/cjs/version.json +1 -1
  12. package/dist/es2019/button-group.js +2 -2
  13. package/dist/es2019/entry-points/standard-button.js +1 -1
  14. package/dist/es2019/shared/button-base.js +4 -4
  15. package/dist/es2019/shared/css.js +13 -12
  16. package/dist/es2019/version.json +1 -1
  17. package/dist/esm/button-group.js +2 -2
  18. package/dist/esm/entry-points/standard-button.js +1 -1
  19. package/dist/esm/shared/button-base.js +4 -4
  20. package/dist/esm/shared/css.js +13 -12
  21. package/dist/esm/version.json +1 -1
  22. package/dist/types/button-group.d.ts +2 -1
  23. package/dist/types/custom-theme-button/custom-theme-button-types.d.ts +1 -1
  24. package/dist/types/custom-theme-button/theme.d.ts +1 -1
  25. package/dist/types/entry-points/standard-button.d.ts +1 -1
  26. package/dist/types/shared/block-events.d.ts +1 -0
  27. package/dist/types/shared/button-base.d.ts +1 -1
  28. package/dist/types/shared/css.d.ts +5 -5
  29. package/package.json +5 -13
  30. package/report.api.md +58 -117
  31. package/dist/types-ts4.0/button-group.d.ts +0 -11
  32. package/dist/types-ts4.0/button.d.ts +0 -15
  33. package/dist/types-ts4.0/custom-theme-button/custom-theme-button-types.d.ts +0 -22
  34. package/dist/types-ts4.0/custom-theme-button/custom-theme-button.d.ts +0 -10
  35. package/dist/types-ts4.0/custom-theme-button/index.d.ts +0 -2
  36. package/dist/types-ts4.0/custom-theme-button/theme.d.ts +0 -21
  37. package/dist/types-ts4.0/entry-points/button-group.d.ts +0 -1
  38. package/dist/types-ts4.0/entry-points/custom-theme-button.d.ts +0 -2
  39. package/dist/types-ts4.0/entry-points/loading-button.d.ts +0 -2
  40. package/dist/types-ts4.0/entry-points/standard-button.d.ts +0 -7
  41. package/dist/types-ts4.0/entry-points/types.d.ts +0 -4
  42. package/dist/types-ts4.0/index.d.ts +0 -8
  43. package/dist/types-ts4.0/loading-button.d.ts +0 -15
  44. package/dist/types-ts4.0/shared/block-events.d.ts +0 -3
  45. package/dist/types-ts4.0/shared/button-base.d.ts +0 -10
  46. package/dist/types-ts4.0/shared/colors.d.ts +0 -31
  47. package/dist/types-ts4.0/shared/css.d.ts +0 -22
  48. package/dist/types-ts4.0/shared/get-is-only-single-icon.d.ts +0 -2
  49. package/dist/types-ts4.0/shared/loading-spinner.d.ts +0 -5
  50. package/dist/types-ts4.0/types.d.ts +0 -89
@@ -1,89 +0,0 @@
1
- import React from 'react';
2
- import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
3
- export declare type Appearance = 'default' | 'danger' | 'link' | 'primary' | 'subtle' | 'subtle-link' | 'warning';
4
- export declare type Spacing = 'compact' | 'default' | 'none';
5
- declare type Combine<First, Second> = Omit<First, keyof Second> & Second;
6
- export declare type BaseOwnProps = {
7
- /**
8
- * The base styling to apply to the button
9
- */
10
- appearance?: Appearance;
11
- /**
12
- * Set the button to autofocus on mount
13
- */
14
- autoFocus?: boolean;
15
- /**
16
- * Add a classname to the button
17
- */
18
- className?: string;
19
- /**
20
- * Used to 'overlay' something over a button. This is commonly used to display a loading spinner
21
- */
22
- overlay?: React.ReactNode;
23
- /**
24
- * Provides a url for buttons being used as a link
25
- */
26
- href?: string;
27
- /**
28
- * Places an icon within the button, after the button's text
29
- */
30
- iconAfter?: React.ReactChild;
31
- /**
32
- * Places an icon within the button, before the button's text
33
- */
34
- iconBefore?: React.ReactChild;
35
- /**
36
- * Set if the button is disabled
37
- */
38
- isDisabled?: boolean;
39
- /**
40
- * Change the style to indicate the button is selected
41
- */
42
- isSelected?: boolean;
43
- /**
44
- * Handler to be called on blur
45
- */
46
- onBlur?: React.FocusEventHandler<HTMLElement>;
47
- /**
48
- * Handler to be called on click. The second argument can be used to track analytics data. See the tutorial in the analytics-next package for details
49
- */
50
- onClick?: (e: React.MouseEvent<HTMLElement>, analyticsEvent: UIAnalyticsEvent) => void;
51
- /**
52
- * Handler to be called on focus
53
- */
54
- onFocus?: React.FocusEventHandler<HTMLElement>;
55
- /**
56
- * Set the amount of padding in the button
57
- */
58
- spacing?: Spacing;
59
- /**
60
- * Pass target down to a link within the button component, if a href is provided
61
- */
62
- target?: React.AnchorHTMLAttributes<HTMLAnchorElement>['target'];
63
- /**
64
- * Pass type down to a button
65
- */
66
- type?: React.ButtonHTMLAttributes<HTMLButtonElement>['type'];
67
- /**
68
- * Option to fit button width to its parent width
69
- */
70
- shouldFitContainer?: boolean;
71
- /**
72
- * Text content to be rendered in the button
73
- */
74
- children?: React.ReactNode;
75
- /**
76
- * A `testId` prop is provided for specified elements, which is a unique string that appears as a data attribute `data-testid` in the rendered code, serving as a hook for automated tests
77
- */
78
- testId?: string;
79
- component?: React.ComponentType<React.AllHTMLAttributes<HTMLElement>> | React.ElementType;
80
- /**
81
- * Additional information to be included in the `context` of analytics events that come from button
82
- */
83
- analyticsContext?: Record<string, any>;
84
- };
85
- export declare type BaseProps = Combine<Combine<Omit<React.AllHTMLAttributes<HTMLElement>, 'disabled'>, {
86
- 'data-testid'?: never;
87
- 'data-has-overlay'?: never;
88
- }>, BaseOwnProps>;
89
- export {};