@valiantys/atlassian-app-frontend 3.0.0-alpha-31 → 3.0.0-alpha-32

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.
@@ -1 +1 @@
1
- "use strict";const o=require("react/jsx-runtime"),i=require("react"),u=require("../panel-stateless/index.cjs.js"),d=({isDefaultExpanded:t=!1,children:s,header:n,headingSize:a})=>{const[e,r]=i.useState(t),c=()=>{r(!e)};return o.jsx(u,{header:n,isExpanded:e,headingSize:a,onChange:c,children:s})};module.exports=d;
1
+ "use strict";const u=require("react/jsx-runtime"),d=require("react"),l=require("../panel-stateless/index.cjs.js"),x=({isDefaultExpanded:n=!1,children:a,header:r,headingSize:c,onChange:e})=>{const[t,i]=d.useState(n),o=()=>{const s=!t;i(s),e&&e(s)};return u.jsx(l,{header:r,isExpanded:t,headingSize:c,onChange:o,children:a})};module.exports=x;
@@ -1,26 +1,28 @@
1
- import { jsx as r } from "react/jsx-runtime";
2
- import { useState as d } from "react";
3
- import l from "../panel-stateless/index.es.js";
4
- const i = ({
5
- isDefaultExpanded: t = !1,
6
- children: a,
7
- header: n,
8
- headingSize: s
1
+ import { jsx as l } from "react/jsx-runtime";
2
+ import { useState as f } from "react";
3
+ import i from "../panel-stateless/index.es.js";
4
+ const x = ({
5
+ isDefaultExpanded: n = !1,
6
+ children: s,
7
+ header: o,
8
+ headingSize: r,
9
+ onChange: e
9
10
  }) => {
10
- const [e, o] = d(t);
11
- return /* @__PURE__ */ r(
12
- l,
11
+ const [t, d] = f(n);
12
+ return /* @__PURE__ */ l(
13
+ i,
13
14
  {
14
- header: n,
15
- isExpanded: e,
16
- headingSize: s,
15
+ header: o,
16
+ isExpanded: t,
17
+ headingSize: r,
17
18
  onChange: () => {
18
- o(!e);
19
+ const a = !t;
20
+ d(a), e && e(a);
19
21
  },
20
- children: a
22
+ children: s
21
23
  }
22
24
  );
23
25
  };
24
26
  export {
25
- i as default
27
+ x as default
26
28
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@valiantys/atlassian-app-frontend",
3
- "version": "3.0.0-alpha-31",
3
+ "version": "3.0.0-alpha-32",
4
4
  "description": "This library provides an Atlassian Forge Custom UI wrapper component that handles all the setup necessary to support an app that can run deployed or in standalone mode",
5
5
  "exports": {
6
6
  "./atlassian-app": {
@@ -25,6 +25,7 @@ export declare const PanelStateless: FC<PanelState>;
25
25
  declare type Props = BasePanelProps & {
26
26
  /** Defines whether the panel is expanded by default. */
27
27
  isDefaultExpanded?: boolean;
28
+ onChange?: (isExpanded: boolean) => void;
28
29
  };
29
30
 
30
31
  export { }