@atlaskit/panel 0.4.10 → 0.8.0

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 (108) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/cjs/components/Panel/Panel.js +25 -66
  3. package/dist/cjs/components/Panel/PanelStateless.js +47 -61
  4. package/dist/cjs/i18n/cs.js +19 -0
  5. package/dist/cjs/i18n/da.js +19 -0
  6. package/dist/cjs/i18n/de.js +19 -0
  7. package/dist/cjs/i18n/en.js +19 -0
  8. package/dist/cjs/i18n/en_GB.js +19 -0
  9. package/dist/cjs/i18n/en_ZZ.js +19 -0
  10. package/dist/cjs/i18n/es.js +19 -0
  11. package/dist/cjs/i18n/fi.js +19 -0
  12. package/dist/cjs/i18n/hu.js +19 -0
  13. package/dist/cjs/i18n/it.js +19 -0
  14. package/dist/cjs/i18n/ja.js +19 -0
  15. package/dist/cjs/i18n/ko.js +19 -0
  16. package/dist/cjs/i18n/nb.js +19 -0
  17. package/dist/cjs/i18n/nl.js +19 -0
  18. package/dist/cjs/i18n/pl.js +19 -0
  19. package/dist/cjs/i18n/pt_BR.js +19 -0
  20. package/dist/cjs/i18n/ru.js +19 -0
  21. package/dist/cjs/i18n/sv.js +19 -0
  22. package/dist/cjs/i18n/th.js +19 -0
  23. package/dist/cjs/i18n/vi.js +19 -0
  24. package/dist/cjs/i18n/zh.js +19 -0
  25. package/dist/cjs/i18n/zh_TW.js +19 -0
  26. package/dist/cjs/version.json +1 -1
  27. package/dist/es2019/components/Panel/Panel.js +17 -33
  28. package/dist/es2019/components/Panel/PanelStateless.js +43 -32
  29. package/dist/es2019/i18n/cs.js +11 -0
  30. package/dist/es2019/i18n/da.js +11 -0
  31. package/dist/es2019/i18n/de.js +11 -0
  32. package/dist/es2019/i18n/en.js +11 -0
  33. package/dist/es2019/i18n/en_GB.js +11 -0
  34. package/dist/es2019/i18n/en_ZZ.js +11 -0
  35. package/dist/es2019/i18n/es.js +11 -0
  36. package/dist/es2019/i18n/fi.js +11 -0
  37. package/dist/es2019/i18n/hu.js +11 -0
  38. package/dist/es2019/i18n/it.js +11 -0
  39. package/dist/es2019/i18n/ja.js +11 -0
  40. package/dist/es2019/i18n/ko.js +11 -0
  41. package/dist/es2019/i18n/nb.js +11 -0
  42. package/dist/es2019/i18n/nl.js +11 -0
  43. package/dist/es2019/i18n/pl.js +11 -0
  44. package/dist/es2019/i18n/pt_BR.js +11 -0
  45. package/dist/es2019/i18n/ru.js +11 -0
  46. package/dist/es2019/i18n/sv.js +11 -0
  47. package/dist/es2019/i18n/th.js +11 -0
  48. package/dist/es2019/i18n/vi.js +11 -0
  49. package/dist/es2019/i18n/zh.js +11 -0
  50. package/dist/es2019/i18n/zh_TW.js +11 -0
  51. package/dist/es2019/version.json +1 -1
  52. package/dist/esm/components/Panel/Panel.js +25 -67
  53. package/dist/esm/components/Panel/PanelStateless.js +45 -60
  54. package/dist/esm/i18n/cs.js +11 -0
  55. package/dist/esm/i18n/da.js +11 -0
  56. package/dist/esm/i18n/de.js +11 -0
  57. package/dist/esm/i18n/en.js +11 -0
  58. package/dist/esm/i18n/en_GB.js +11 -0
  59. package/dist/esm/i18n/en_ZZ.js +11 -0
  60. package/dist/esm/i18n/es.js +11 -0
  61. package/dist/esm/i18n/fi.js +11 -0
  62. package/dist/esm/i18n/hu.js +11 -0
  63. package/dist/esm/i18n/it.js +11 -0
  64. package/dist/esm/i18n/ja.js +11 -0
  65. package/dist/esm/i18n/ko.js +11 -0
  66. package/dist/esm/i18n/nb.js +11 -0
  67. package/dist/esm/i18n/nl.js +11 -0
  68. package/dist/esm/i18n/pl.js +11 -0
  69. package/dist/esm/i18n/pt_BR.js +11 -0
  70. package/dist/esm/i18n/ru.js +11 -0
  71. package/dist/esm/i18n/sv.js +11 -0
  72. package/dist/esm/i18n/th.js +11 -0
  73. package/dist/esm/i18n/vi.js +11 -0
  74. package/dist/esm/i18n/zh.js +11 -0
  75. package/dist/esm/i18n/zh_TW.js +11 -0
  76. package/dist/esm/version.json +1 -1
  77. package/dist/types/components/Panel/Panel.d.ts +3 -15
  78. package/dist/types/components/Panel/PanelStateless.d.ts +4 -8
  79. package/dist/types/i18n/cs.d.ts +11 -0
  80. package/dist/types/i18n/da.d.ts +11 -0
  81. package/dist/types/i18n/de.d.ts +11 -0
  82. package/dist/types/i18n/en.d.ts +11 -0
  83. package/dist/types/i18n/en_GB.d.ts +11 -0
  84. package/dist/types/i18n/en_ZZ.d.ts +11 -0
  85. package/dist/types/i18n/es.d.ts +11 -0
  86. package/dist/types/i18n/fi.d.ts +11 -0
  87. package/dist/types/i18n/hu.d.ts +11 -0
  88. package/dist/types/i18n/it.d.ts +11 -0
  89. package/dist/types/i18n/ja.d.ts +11 -0
  90. package/dist/types/i18n/ko.d.ts +11 -0
  91. package/dist/types/i18n/nb.d.ts +11 -0
  92. package/dist/types/i18n/nl.d.ts +11 -0
  93. package/dist/types/i18n/pl.d.ts +11 -0
  94. package/dist/types/i18n/pt_BR.d.ts +11 -0
  95. package/dist/types/i18n/ru.d.ts +11 -0
  96. package/dist/types/i18n/sv.d.ts +11 -0
  97. package/dist/types/i18n/th.d.ts +11 -0
  98. package/dist/types/i18n/vi.d.ts +11 -0
  99. package/dist/types/i18n/zh.d.ts +11 -0
  100. package/dist/types/i18n/zh_TW.d.ts +11 -0
  101. package/package.json +7 -11
  102. package/report.api.md +21 -39
  103. package/tmp/api-report-tmp.d.ts +36 -0
  104. package/dist/types-ts4.0/components/Panel/Panel.d.ts +0 -20
  105. package/dist/types-ts4.0/components/Panel/PanelStateless.d.ts +0 -19
  106. package/dist/types-ts4.0/components/Panel/index.d.ts +0 -2
  107. package/dist/types-ts4.0/components/Panel/styledPanel.d.ts +0 -10
  108. package/dist/types-ts4.0/index.d.ts +0 -1
@@ -0,0 +1,11 @@
1
+ declare const _default: {
2
+ 'bitbucket.panel-collapse.message': string;
3
+ 'bitbucket.panel-expand.message': string;
4
+ };
5
+ /**
6
+ * NOTE:
7
+ *
8
+ * This file is automatically generated by Traduki 2.0.
9
+ * DO NOT CHANGE IT BY HAND or your changes will be lost.
10
+ */
11
+ export default _default;
@@ -0,0 +1,11 @@
1
+ declare const _default: {
2
+ 'bitbucket.panel-collapse.message': string;
3
+ 'bitbucket.panel-expand.message': string;
4
+ };
5
+ /**
6
+ * NOTE:
7
+ *
8
+ * This file is automatically generated by Traduki 2.0.
9
+ * DO NOT CHANGE IT BY HAND or your changes will be lost.
10
+ */
11
+ export default _default;
@@ -0,0 +1,11 @@
1
+ declare const _default: {
2
+ 'bitbucket.panel-collapse.message': string;
3
+ 'bitbucket.panel-expand.message': string;
4
+ };
5
+ /**
6
+ * NOTE:
7
+ *
8
+ * This file is automatically generated by Traduki 2.0.
9
+ * DO NOT CHANGE IT BY HAND or your changes will be lost.
10
+ */
11
+ export default _default;
@@ -0,0 +1,11 @@
1
+ declare const _default: {
2
+ 'bitbucket.panel-collapse.message': string;
3
+ 'bitbucket.panel-expand.message': string;
4
+ };
5
+ /**
6
+ * NOTE:
7
+ *
8
+ * This file is automatically generated by Traduki 2.0.
9
+ * DO NOT CHANGE IT BY HAND or your changes will be lost.
10
+ */
11
+ export default _default;
@@ -0,0 +1,11 @@
1
+ declare const _default: {
2
+ 'bitbucket.panel-collapse.message': string;
3
+ 'bitbucket.panel-expand.message': string;
4
+ };
5
+ /**
6
+ * NOTE:
7
+ *
8
+ * This file is automatically generated by Traduki 2.0.
9
+ * DO NOT CHANGE IT BY HAND or your changes will be lost.
10
+ */
11
+ export default _default;
@@ -0,0 +1,11 @@
1
+ declare const _default: {
2
+ 'bitbucket.panel-collapse.message': string;
3
+ 'bitbucket.panel-expand.message': string;
4
+ };
5
+ /**
6
+ * NOTE:
7
+ *
8
+ * This file is automatically generated by Traduki 2.0.
9
+ * DO NOT CHANGE IT BY HAND or your changes will be lost.
10
+ */
11
+ export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/panel",
3
- "version": "0.4.10",
3
+ "version": "0.8.0",
4
4
  "description": "A React component rendering a collapsible panel",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -12,13 +12,6 @@
12
12
  "module": "dist/esm/index.js",
13
13
  "module:es2019": "dist/es2019/index.js",
14
14
  "types": "dist/types/index.d.ts",
15
- "typesVersions": {
16
- ">=4.0 <4.5": {
17
- "*": [
18
- "dist/types-ts4.0/*"
19
- ]
20
- }
21
- },
22
15
  "atlaskit:src": "src/index.ts",
23
16
  "atlassian": {
24
17
  "team": "Bitbucket: CoreX",
@@ -29,12 +22,13 @@
29
22
  }
30
23
  },
31
24
  "dependencies": {
32
- "@atlaskit/button": "^16.3.0",
33
- "@atlaskit/icon": "^21.10.0",
25
+ "@atlaskit/button": "^16.4.0",
26
+ "@atlaskit/icon": "^21.11.0",
34
27
  "@atlaskit/theme": "^12.2.0",
35
28
  "@babel/runtime": "^7.0.0",
36
29
  "react-animate-height": "^2.0.5",
37
- "react-focus-within": "^2.0.1"
30
+ "react-focus-within": "^2.0.1",
31
+ "react-intl-next": "npm:react-intl@^5.18.1"
38
32
  },
39
33
  "peerDependencies": {
40
34
  "react": "^16.8.0",
@@ -44,6 +38,8 @@
44
38
  "@atlaskit/docs": "*",
45
39
  "@atlaskit/page": "^12.2.0",
46
40
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
41
+ "@testing-library/react": "^12.1.5",
42
+ "@testing-library/user-event": "^14.4.3",
47
43
  "enzyme": "^3.10.0",
48
44
  "typescript": "4.5.5"
49
45
  },
package/report.api.md CHANGED
@@ -1,15 +1,20 @@
1
+ <!-- API Report Version: 2.3 -->
2
+
1
3
  ## API Report File for "@atlaskit/panel"
2
4
 
3
- > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
5
+ > Do not edit this file. This report is auto-generated using [API Extractor](https://api-extractor.com/).
6
+ > [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
7
+
8
+ ### Table of contents
4
9
 
5
- <!--
6
- Generated API Report version: 2.0
7
- -->
10
+ - [Main Entry Types](#main-entry-types)
8
11
 
9
- [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
12
+ ### Main Entry Types
13
+
14
+ <!--SECTION START: Main Entry Types-->
10
15
 
11
16
  ```ts
12
- import { PureComponent } from 'react';
17
+ import { FC } from 'react';
13
18
  import { ReactNode } from 'react';
14
19
 
15
20
  // @public (undocumented)
@@ -19,47 +24,24 @@ type BasePanelProps = {
19
24
  };
20
25
 
21
26
  // @public (undocumented)
22
- class Panel extends PureComponent<Props, State> {
23
- // (undocumented)
24
- static defaultProps: {
25
- isDefaultExpanded: boolean;
26
- };
27
- // (undocumented)
28
- handleChange: () => void;
29
- // (undocumented)
30
- render(): JSX.Element;
31
- // (undocumented)
32
- state: {
33
- isExpanded: boolean;
34
- };
35
- }
36
- export default Panel;
37
-
38
- // @public (undocumented)
39
- export class PanelStateless extends PureComponent<Props_2> {
40
- // (undocumented)
41
- static defaultProps: {
42
- isExpanded: boolean;
43
- };
44
- // (undocumented)
45
- render(): JSX.Element;
46
- }
47
-
48
- // @public (undocumented)
49
- type Props = BasePanelProps & {
50
- isDefaultExpanded?: boolean;
51
- };
27
+ const PanelState: FC<Props>;
28
+ export default PanelState;
52
29
 
53
30
  // @public (undocumented)
54
- type Props_2 = BasePanelProps & {
31
+ type PanelState_2 = BasePanelProps & {
55
32
  isExpanded: boolean;
56
33
  onChange: (isExpanded: boolean) => void;
57
34
  };
58
35
 
59
36
  // @public (undocumented)
60
- type State = {
61
- isExpanded: boolean;
37
+ export const PanelStateless: FC<PanelState_2>;
38
+
39
+ // @public (undocumented)
40
+ type Props = BasePanelProps & {
41
+ isDefaultExpanded?: boolean;
62
42
  };
63
43
 
64
44
  // (No @packageDocumentation comment for this package)
65
45
  ```
46
+
47
+ <!--SECTION END: Main Entry Types-->
@@ -0,0 +1,36 @@
1
+ ## API Report File for "@atlaskit/panel"
2
+
3
+ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4
+
5
+ ```ts
6
+
7
+ import { FC } from 'react';
8
+ import { ReactNode } from 'react';
9
+
10
+ // @public (undocumented)
11
+ type BasePanelProps = {
12
+ children?: ReactNode;
13
+ header?: ReactNode;
14
+ };
15
+
16
+ // @public (undocumented)
17
+ const PanelState: FC<Props>;
18
+ export default PanelState;
19
+
20
+ // @public (undocumented)
21
+ type PanelState_2 = BasePanelProps & {
22
+ isExpanded: boolean;
23
+ onChange: (isExpanded: boolean) => void;
24
+ };
25
+
26
+ // @public (undocumented)
27
+ export const PanelStateless: FC<PanelState_2>;
28
+
29
+ // @public (undocumented)
30
+ type Props = BasePanelProps & {
31
+ isDefaultExpanded?: boolean;
32
+ };
33
+
34
+ // (No @packageDocumentation comment for this package)
35
+
36
+ ```
@@ -1,20 +0,0 @@
1
- import { PureComponent } from 'react';
2
- import { BasePanelProps } from './PanelStateless';
3
- declare type Props = BasePanelProps & {
4
- /** Defines whether the panel is expanded by default. */
5
- isDefaultExpanded?: boolean;
6
- };
7
- declare type State = {
8
- isExpanded: boolean;
9
- };
10
- export default class Panel extends PureComponent<Props, State> {
11
- static defaultProps: {
12
- isDefaultExpanded: boolean;
13
- };
14
- state: {
15
- isExpanded: boolean;
16
- };
17
- handleChange: () => void;
18
- render(): JSX.Element;
19
- }
20
- export {};
@@ -1,19 +0,0 @@
1
- import { PureComponent, ReactNode } from 'react';
2
- export declare type BasePanelProps = {
3
- /** Content to be shown inside the panel. */
4
- children?: ReactNode;
5
- /** Header to render on the panel. Clicking the header expands and collapses the panel */
6
- header?: ReactNode;
7
- };
8
- export declare type Props = BasePanelProps & {
9
- /** Defines whether the panel is expanded by default. */
10
- isExpanded: boolean;
11
- /** This callback is called when panel is expanded/collapsed */
12
- onChange: (isExpanded: boolean) => void;
13
- };
14
- export default class PanelStateless extends PureComponent<Props> {
15
- static defaultProps: {
16
- isExpanded: boolean;
17
- };
18
- render(): JSX.Element;
19
- }
@@ -1,2 +0,0 @@
1
- export { default } from './Panel';
2
- export { default as PanelStateless } from './PanelStateless';
@@ -1,10 +0,0 @@
1
- import type { FC, HTMLProps } from 'react';
2
- export declare const PanelWrapper: import("styled-components").StyledComponentClass<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>, any, import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>>;
3
- export declare const ButtonWrapper: import("styled-components").StyledComponentClass<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
4
- isHidden: boolean;
5
- }, any, import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
6
- isHidden: boolean;
7
- }>;
8
- export declare const PanelHeader: FC<HTMLProps<HTMLDivElement> & {
9
- isFocused?: boolean;
10
- }>;
@@ -1 +0,0 @@
1
- export { default, PanelStateless } from './components/Panel';