@forge/react 11.10.0-next.3 → 11.10.0-next.5

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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # @forge/react
2
2
 
3
+ ## 11.10.0-next.5
4
+
5
+ ### Minor Changes
6
+
7
+ - 62fcf09: Added props to Global component
8
+
9
+ ## 11.10.0-next.4
10
+
11
+ ### Minor Changes
12
+
13
+ - 37d13e9: Added Global component
14
+
3
15
  ## 11.10.0-next.3
4
16
 
5
17
  ### Minor Changes
@@ -0,0 +1,31 @@
1
+ import type { ReactElement, ReactNode } from 'react';
2
+ declare type GlobalElements = ReactElement<GlobalExpandableMenuItemProps> | ReactElement<GlobalLinkMenuItemProps> | ReactElement<GlobalSidebarProps> | ReactElement<GlobalMainProps> | ReactElement<GlobalProps>;
3
+ declare type NotGlobalComponents<T> = T extends GlobalElements ? never : T;
4
+ interface GlobalLinkMenuItemProps {
5
+ href: string;
6
+ label: string;
7
+ children?: never;
8
+ }
9
+ interface GlobalExpandableMenuItemProps {
10
+ children: ReactElement<GlobalLinkMenuItemProps> | ReactElement<GlobalLinkMenuItemProps>[];
11
+ label: string;
12
+ }
13
+ interface GlobalSidebarProps {
14
+ forYouUrl?: string;
15
+ children: ReactElement<GlobalLinkMenuItemProps> | ReactElement<GlobalExpandableMenuItemProps> | Array<ReactElement<GlobalLinkMenuItemProps> | ReactElement<GlobalExpandableMenuItemProps>>;
16
+ }
17
+ interface GlobalMainProps {
18
+ children: NotGlobalComponents<ReactNode>;
19
+ }
20
+ interface GlobalProps {
21
+ children: [ReactElement<GlobalSidebarProps, typeof Global.Sidebar>, ReactElement<GlobalMainProps, typeof Global.Main>] | [ReactElement<GlobalMainProps, typeof Global.Main>, ReactElement<GlobalSidebarProps, typeof Global.Sidebar>];
22
+ }
23
+ export declare const Global: {
24
+ (props: GlobalProps): import("react/jsx-runtime").JSX.Element;
25
+ Main(props: GlobalMainProps): import("react/jsx-runtime").JSX.Element;
26
+ Sidebar({ children, forYouUrl }: GlobalSidebarProps): import("react/jsx-runtime").JSX.Element;
27
+ ExpandMenuItem({ label, children }: GlobalExpandableMenuItemProps): import("react/jsx-runtime").JSX.Element;
28
+ LinkMenuItem(props: GlobalLinkMenuItemProps): import("react/jsx-runtime").JSX.Element;
29
+ };
30
+ export {};
31
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/global/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGrD,aAAK,cAAc,GACf,YAAY,CAAC,6BAA6B,CAAC,GAC3C,YAAY,CAAC,uBAAuB,CAAC,GACrC,YAAY,CAAC,kBAAkB,CAAC,GAChC,YAAY,CAAC,eAAe,CAAC,GAC7B,YAAY,CAAC,WAAW,CAAC,CAAC;AAE9B,aAAK,mBAAmB,CAAC,CAAC,IAAI,CAAC,SAAS,cAAc,GAAG,KAAK,GAAG,CAAC,CAAC;AAEnE,UAAU,uBAAuB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,KAAK,CAAC;CAElB;AAED,UAAU,6BAA6B;IACrC,QAAQ,EAAE,YAAY,CAAC,uBAAuB,CAAC,GAAG,YAAY,CAAC,uBAAuB,CAAC,EAAE,CAAC;IAC1F,KAAK,EAAE,MAAM,CAAC;CAEf;AAED,UAAU,kBAAkB;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EACJ,YAAY,CAAC,uBAAuB,CAAC,GACrC,YAAY,CAAC,6BAA6B,CAAC,GAC3C,KAAK,CAAC,YAAY,CAAC,uBAAuB,CAAC,GAAG,YAAY,CAAC,6BAA6B,CAAC,CAAC,CAAC;CAEhG;AAED,UAAU,eAAe;IACvB,QAAQ,EAAE,mBAAmB,CAAC,SAAS,CAAC,CAAC;CAE1C;AAED,UAAU,WAAW;IACnB,QAAQ,EACJ,CAAC,YAAY,CAAC,kBAAkB,EAAE,OAAO,MAAM,CAAC,OAAO,CAAC,EAAE,YAAY,CAAC,eAAe,EAAE,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC,GAC5G,CAAC,YAAY,CAAC,eAAe,EAAE,OAAO,MAAM,CAAC,IAAI,CAAC,EAAE,YAAY,CAAC,kBAAkB,EAAE,OAAO,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;CAElH;AAiBD,eAAO,MAAM,MAAM;YAAW,WAAW;gBAInB,eAAe;qCAIM,kBAAkB;wCAIf,6BAA6B;wBAI7C,uBAAuB;CAdpD,CAAC"}
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Global = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const GlobalPrimitive = 'Global';
6
+ const GlobalMainPrimitive = 'Global.Main';
7
+ const GlobalSidebarPrimitive = 'Global.Sidebar';
8
+ const GlobalExpandMenuItemPrimitive = 'Global.ExpandMenuItem';
9
+ const GlobalLinkMenuItemPrimitive = 'Global.LinkMenuItem';
10
+ // Top level component
11
+ const Global = (props) => {
12
+ return (0, jsx_runtime_1.jsx)(GlobalPrimitive, { children: props.children });
13
+ };
14
+ exports.Global = Global;
15
+ exports.Global.Main = (props) => {
16
+ return (0, jsx_runtime_1.jsx)(GlobalMainPrimitive, { children: props.children });
17
+ };
18
+ exports.Global.Sidebar = ({ children, forYouUrl }) => {
19
+ return (0, jsx_runtime_1.jsx)(GlobalSidebarPrimitive, { forYouUrl: forYouUrl, children: children });
20
+ };
21
+ exports.Global.ExpandMenuItem = ({ label, children }) => {
22
+ return (0, jsx_runtime_1.jsx)(GlobalExpandMenuItemPrimitive, { label: label, children: children });
23
+ };
24
+ exports.Global.LinkMenuItem = (props) => {
25
+ return (0, jsx_runtime_1.jsx)(GlobalLinkMenuItemPrimitive, { ...props });
26
+ };
@@ -6,6 +6,7 @@ export { Popup } from './popup';
6
6
  export { Comment } from './comment';
7
7
  export { AdfRenderer } from './adf-renderer';
8
8
  export { UserPickerValue } from '../types/index';
9
+ export { Global } from './global';
9
10
  declare type UserProps = {
10
11
  accountId: string;
11
12
  hideDisplayName?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,WAAW,EACX,eAAe,IAAI,SAAS,EAC5B,qBAAqB,IAAI,eAAe,EACxC,cAAc,EACd,UAAU,EACX,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,kBAAkB,IAAI,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAC5F,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEjD,aAAK,SAAS,GAAG;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B,CAAC;AACF;;;;GAIG;AACH,eAAO,MAAM,IAAI,UAAgC,SAAS,KAAK,YAAY,CAAC;AAE5E,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAAC;IAC1D,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,KAAK,CAAC,EAAE,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G;AACH,eAAO,MAAM,KAAK,UAAiC,UAAU,KAAK,YAAY,CAAC;AAE/E;;GAEG;AACH,cAAc,qBAAqB,CAAC;AAIpC,UAAU,uBAAuB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,KAAK,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAC3C,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;CACzB;AACD,aAAK,kBAAkB,GAAG,uBAAuB,GAAG,uBAAuB,CAAC;AAC5E,eAAO,MAAM,aAAa,UAAyC,kBAAkB,KAAK,YAAY,CAAC"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CheckboxGroup = exports.Frame = exports.Strong = exports.Strike = exports.Em = exports.UserGroup = exports.UserPicker = exports.Link = exports.Image = exports.User = exports.AdfRenderer = exports.Comment = exports.Popup = exports.InlineEdit = exports.DynamicTable = void 0;
3
+ exports.CheckboxGroup = exports.Frame = exports.Strong = exports.Strike = exports.Em = exports.UserGroup = exports.UserPicker = exports.Link = exports.Image = exports.User = exports.Global = exports.AdfRenderer = exports.Comment = exports.Popup = exports.InlineEdit = exports.DynamicTable = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  var dynamic_table_1 = require("./dynamic-table");
6
6
  Object.defineProperty(exports, "DynamicTable", { enumerable: true, get: function () { return dynamic_table_1.DynamicTable; } });
@@ -12,6 +12,8 @@ var comment_1 = require("./comment");
12
12
  Object.defineProperty(exports, "Comment", { enumerable: true, get: function () { return comment_1.Comment; } });
13
13
  var adf_renderer_1 = require("./adf-renderer");
14
14
  Object.defineProperty(exports, "AdfRenderer", { enumerable: true, get: function () { return adf_renderer_1.AdfRenderer; } });
15
+ var global_1 = require("./global");
16
+ Object.defineProperty(exports, "Global", { enumerable: true, get: function () { return global_1.Global; } });
15
17
  /**
16
18
  * A component that represents a user, displaying details such as name and profile picture.
17
19
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forge/react",
3
- "version": "11.10.0-next.3",
3
+ "version": "11.10.0-next.5",
4
4
  "description": "Forge React reconciler",
5
5
  "author": "Atlassian",
6
6
  "license": "SEE LICENSE IN LICENSE.txt",
@@ -22,6 +22,10 @@
22
22
  "./jira": {
23
23
  "types": "./out/components/jira/index.d.ts",
24
24
  "default": "./out/components/jira/index.js"
25
+ },
26
+ "./global": {
27
+ "types": "./out/components/global/index.d.ts",
28
+ "default": "./out/components/global/index.js"
25
29
  }
26
30
  },
27
31
  "dependencies": {