@dgui/react-web 0.3.2-beta.1 → 0.4.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.
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  declare const SceneSwiperSlide: import("react").NamedExoticComponent<SceneProps>;
3
3
  export type SceneProps = {
4
- drawerId: string;
5
- tabId: string;
4
+ readonly drawerId: string;
5
+ readonly tabId: string;
6
6
  };
7
7
  export default SceneSwiperSlide;
@@ -11,7 +11,7 @@ const Scene = ({ tabId, drawerId }) => {
11
11
  const gatewayId = (0, react_1.useMemo)(() => {
12
12
  return `drawer-${drawerId}-${tabId}`;
13
13
  }, []);
14
- return ((0, jsx_runtime_1.jsx)(react_web_shared_1.WebBaseHorse, Object.assign({ swipe: swipe }, { children: (0, jsx_runtime_1.jsx)(WebGateway_1.WebGatewayDest, { gatewayId: gatewayId }) })));
14
+ return ((0, jsx_runtime_1.jsx)(react_web_shared_1.WebBaseHorse, { swipe: swipe, children: (0, jsx_runtime_1.jsx)(WebGateway_1.WebGatewayDest, { gatewayId: gatewayId }) }));
15
15
  };
16
16
  Scene.displayName = 'WebDrawersTabsSceneContextScene';
17
17
  const SceneSwiperSlide = (0, react_1.memo)(Scene);
@@ -3,5 +3,5 @@ import { type WebBaseCarouselProps } from '@dgui/react-web-shared';
3
3
  declare const _default: import("react").NamedExoticComponent<ContextProps>;
4
4
  export default _default;
5
5
  export type ContextProps = WebBaseCarouselProps & {
6
- drawerId: string;
6
+ readonly drawerId: string;
7
7
  };
@@ -19,7 +19,7 @@ const Context = ({ drawerId }) => {
19
19
  drawerId,
20
20
  tabOrder
21
21
  ]);
22
- return ((0, jsx_runtime_1.jsx)(react_web_shared_1.WebBaseCarousel, Object.assign({ onSelectTab: selectTab, swipe: false, tabIndex: tabIndex }, { children: tabs })));
22
+ return ((0, jsx_runtime_1.jsx)(react_web_shared_1.WebBaseCarousel, { onSelectTab: selectTab, swipe: false, tabIndex: tabIndex, children: tabs }));
23
23
  };
24
24
  Context.displayName = 'WebDrawersTabsSceneContext';
25
25
  exports.default = (0, react_1.memo)(Context);
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  declare const SceneSwiperSlide: import("react").NamedExoticComponent<SceneProps>;
3
3
  export type SceneProps = {
4
- drawerId: string;
4
+ readonly drawerId: string;
5
5
  };
6
6
  export default SceneSwiperSlide;
@@ -15,9 +15,9 @@ const Scene = ({ drawerId }) => {
15
15
  const gatewayId = (0, react_1.useMemo)(() => {
16
16
  return `drawer-${drawerId}`;
17
17
  }, []);
18
- return ((0, jsx_runtime_1.jsx)(react_web_shared_1.WebBaseHorse, Object.assign({ swipe: swipe }, { children: tabs ?
18
+ return ((0, jsx_runtime_1.jsx)(react_web_shared_1.WebBaseHorse, { swipe: swipe, children: tabs ?
19
19
  ((0, jsx_runtime_1.jsx)(Context_1.default, { drawerId: drawerId })) :
20
- ((0, jsx_runtime_1.jsx)(WebGateway_1.WebGatewayDest, { gatewayId: gatewayId })) })));
20
+ ((0, jsx_runtime_1.jsx)(WebGateway_1.WebGatewayDest, { gatewayId: gatewayId })) }));
21
21
  };
22
22
  Scene.displayName = 'WebDrawersTabsScene';
23
23
  const SceneSwiperSlide = (0, react_1.memo)(Scene);
@@ -18,7 +18,7 @@ const Drawers = () => {
18
18
  }, [
19
19
  drawerOrder
20
20
  ]);
21
- return ((0, jsx_runtime_1.jsx)(react_web_shared_1.WebBaseCarousel, Object.assign({ onSelectTab: selectDrawer, tabIndex: drawerIndex }, { children: drawers })));
21
+ return ((0, jsx_runtime_1.jsx)(react_web_shared_1.WebBaseCarousel, { onSelectTab: selectDrawer, tabIndex: drawerIndex, children: drawers }));
22
22
  };
23
23
  Drawers.displayName = 'WebDrawersTabs';
24
24
  exports.default = (0, react_1.memo)(Drawers);
@@ -14,7 +14,7 @@ const Drawers = ({ children }) => {
14
14
  const appBar = (0, react_1.useMemo)(() => {
15
15
  return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(WebGateway_1.WebGatewayDest, { gatewayId: 'ReactWebDigestDrawerBar' }), (0, jsx_runtime_1.jsx)(Tabs_1.default, {})] }));
16
16
  }, []);
17
- return ((0, jsx_runtime_1.jsx)(WebDrawers_1.default, Object.assign({ drawerContent: appBar, open: drawerOpen }, { children: children })));
17
+ return ((0, jsx_runtime_1.jsx)(WebDrawers_1.default, { drawerContent: appBar, open: drawerOpen, children: children }));
18
18
  };
19
19
  Drawers.displayName = 'WebDrawers';
20
20
  exports.default = Drawers;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  declare const SceneSwiperSlide: import("react").NamedExoticComponent<SceneProps>;
3
3
  export type SceneProps = {
4
- tabId: string;
4
+ readonly tabId: string;
5
5
  };
6
6
  export default SceneSwiperSlide;
@@ -11,7 +11,7 @@ const Scene = ({ tabId }) => {
11
11
  const gatewayId = (0, react_1.useMemo)(() => {
12
12
  return `tab-${tabId}`;
13
13
  }, []);
14
- return ((0, jsx_runtime_1.jsx)(react_web_shared_1.WebBaseHorse, Object.assign({ swipe: swipe }, { children: (0, jsx_runtime_1.jsx)(WebGateway_1.WebGatewayDest, { gatewayId: gatewayId }) })));
14
+ return ((0, jsx_runtime_1.jsx)(react_web_shared_1.WebBaseHorse, { swipe: swipe, children: (0, jsx_runtime_1.jsx)(WebGateway_1.WebGatewayDest, { gatewayId: gatewayId }) }));
15
15
  };
16
16
  const SceneSwiperSlide = (0, react_1.memo)(Scene);
17
17
  SceneSwiperSlide.displayName = 'SceneSwiperSlide';
@@ -19,6 +19,6 @@ const Tabs = () => {
19
19
  }, [
20
20
  tabOrder
21
21
  ]);
22
- return ((0, jsx_runtime_1.jsx)(react_web_shared_1.WebBaseCarousel, Object.assign({ onSelectTab: selectTab, tabIndex: tabIndex }, { children: tabs })));
22
+ return ((0, jsx_runtime_1.jsx)(react_web_shared_1.WebBaseCarousel, { onSelectTab: selectTab, tabIndex: tabIndex, children: tabs }));
23
23
  };
24
24
  exports.default = (0, react_1.memo)(Tabs);
@@ -32,6 +32,6 @@ const AppBar = () => {
32
32
  handleSelectTab,
33
33
  tabOrder
34
34
  ]);
35
- return ((0, jsx_runtime_1.jsxs)(WebContainer_1.default, Object.assign({ style: styles.tabBar }, { children: [(0, jsx_runtime_1.jsx)(DrawerToggle_1.default, {}), (0, jsx_runtime_1.jsx)(WebTabBar_1.WebTabBar, { children: tabs })] })));
35
+ return ((0, jsx_runtime_1.jsxs)(WebContainer_1.default, { style: styles.tabBar, children: [(0, jsx_runtime_1.jsx)(DrawerToggle_1.default, {}), (0, jsx_runtime_1.jsx)(WebTabBar_1.WebTabBar, { children: tabs })] }));
36
36
  };
37
37
  exports.default = AppBar;
@@ -7,7 +7,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
7
7
  const AppBar_1 = __importDefault(require("./AppBar"));
8
8
  const react_web_shared_1 = require("@dgui/react-web-shared");
9
9
  const WebAppBar = ({ children }) => {
10
- return ((0, jsx_runtime_1.jsx)(react_web_shared_1.WebBaseGateway, Object.assign({ gatewayId: 'ReactWebDigestAppBar' }, { children: children !== null && children !== void 0 ? children : (0, jsx_runtime_1.jsx)(AppBar_1.default, {}) })));
10
+ return ((0, jsx_runtime_1.jsx)(react_web_shared_1.WebBaseGateway, { gatewayId: 'ReactWebDigestAppBar', children: children !== null && children !== void 0 ? children : (0, jsx_runtime_1.jsx)(AppBar_1.default, {}) }));
11
11
  };
12
12
  WebAppBar.displayName = 'WebAppBar';
13
13
  exports.default = WebAppBar;
@@ -32,7 +32,7 @@ const WebDrawer = (_a) => {
32
32
  removeDrawer(drawerId);
33
33
  };
34
34
  }, []);
35
- return ((0, jsx_runtime_1.jsx)(react_web_shared_1.WebBaseGateway, Object.assign({ gatewayId: gatewayId }, { children: children })));
35
+ return ((0, jsx_runtime_1.jsx)(react_web_shared_1.WebBaseGateway, { gatewayId: gatewayId, children: children }));
36
36
  };
37
37
  WebDrawer.displayName = 'WebDrawer';
38
38
  exports.default = WebDrawer;
@@ -26,7 +26,7 @@ const DrawerBar = () => {
26
26
  handleSelectDrawer,
27
27
  drawerOrder
28
28
  ]);
29
- return ((0, jsx_runtime_1.jsx)("div", Object.assign({ style: styles.drawerBar }, { children: (0, jsx_runtime_1.jsx)(WebTabBar_1.WebTabBar, { children: tabs }) })));
29
+ return ((0, jsx_runtime_1.jsx)("div", { style: styles.drawerBar, children: (0, jsx_runtime_1.jsx)(WebTabBar_1.WebTabBar, { children: tabs }) }));
30
30
  };
31
31
  DrawerBar.displayName = 'WebDrawerBar';
32
32
  exports.default = DrawerBar;
@@ -7,7 +7,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
7
7
  const DrawerBar_1 = __importDefault(require("./DrawerBar"));
8
8
  const react_web_shared_1 = require("@dgui/react-web-shared");
9
9
  const WebDrawerBar = ({ children }) => {
10
- return ((0, jsx_runtime_1.jsx)(react_web_shared_1.WebBaseGateway, Object.assign({ gatewayId: 'ReactWebDigestDrawerBar' }, { children: children !== null && children !== void 0 ? children : (0, jsx_runtime_1.jsx)(DrawerBar_1.default, {}) })));
10
+ return ((0, jsx_runtime_1.jsx)(react_web_shared_1.WebBaseGateway, { gatewayId: 'ReactWebDigestDrawerBar', children: children !== null && children !== void 0 ? children : (0, jsx_runtime_1.jsx)(DrawerBar_1.default, {}) }));
11
11
  };
12
12
  WebDrawerBar.displayName = 'WebDrawerBar';
13
13
  exports.default = WebDrawerBar;
@@ -30,7 +30,7 @@ const WebTab = (_a) => {
30
30
  removeTab(tabId);
31
31
  };
32
32
  }, []);
33
- return ((0, jsx_runtime_1.jsx)(react_web_shared_1.WebBaseGateway, Object.assign({ gatewayId: gatewayId }, { children: children })));
33
+ return ((0, jsx_runtime_1.jsx)(react_web_shared_1.WebBaseGateway, { gatewayId: gatewayId, children: children }));
34
34
  };
35
35
  WebTab.displayName = 'WebTab';
36
36
  exports.default = WebTab;
@@ -14,7 +14,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
14
14
  const jsx_runtime_1 = require("react/jsx-runtime");
15
15
  const WebContainer = (_a) => {
16
16
  var { children, style } = _a, props = __rest(_a, ["children", "style"]);
17
- return ((0, jsx_runtime_1.jsx)("div", Object.assign({}, props, { style: style }, { children: children })));
17
+ return ((0, jsx_runtime_1.jsx)("div", Object.assign({}, props, { style: style, children: children })));
18
18
  };
19
19
  WebContainer.displayName = 'WebContainer';
20
20
  exports.default = WebContainer;
@@ -2,10 +2,10 @@ import { type FunctionComponent, type PropsWithChildren, type ReactNode } from '
2
2
  declare const WebDrawers: FunctionComponent<WebDrawersProps>;
3
3
  export default WebDrawers;
4
4
  export type WebDrawersProps = PropsWithChildren<{
5
- animationTime?: number;
6
- drawerContent?: ReactNode;
7
- drawerWidth?: number;
8
- opacity?: number;
9
- open?: boolean;
10
- position?: 'left' | 'right';
5
+ readonly animationTime?: number;
6
+ readonly drawerContent?: ReactNode;
7
+ readonly drawerWidth?: number;
8
+ readonly opacity?: number;
9
+ readonly open?: boolean;
10
+ readonly position?: 'left' | 'right';
11
11
  }>;
@@ -19,7 +19,7 @@ const styles = {
19
19
  }
20
20
  };
21
21
  const WebDrawers = ({ animationTime = 150, children, drawerContent, drawerWidth = 400, opacity = 0.6, open = true, position = 'left' }) => {
22
- return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ style: styles.drawerWrap }, { children: [children, (0, jsx_runtime_1.jsx)(react_modern_drawer_1.default, Object.assign({ direction: position, duration: animationTime, enableOverlay: false, open: open, overlayOpacity: opacity, size: drawerWidth, style: styles.drawer }, { children: drawerContent }))] })));
22
+ return ((0, jsx_runtime_1.jsxs)("div", { style: styles.drawerWrap, children: [children, (0, jsx_runtime_1.jsx)(react_modern_drawer_1.default, { direction: position, duration: animationTime, enableOverlay: false, open: open, overlayOpacity: opacity, size: drawerWidth, style: styles.drawer, children: drawerContent })] }));
23
23
  };
24
24
  WebDrawers.displayName = 'WebDrawers';
25
25
  exports.default = WebDrawers;
@@ -12,6 +12,6 @@ const styles = {
12
12
  }
13
13
  };
14
14
  const WebTabBar = ({ children }) => {
15
- return ((0, jsx_runtime_1.jsx)(WebContainer_1.default, Object.assign({ style: styles.tabBar }, { children: children })));
15
+ return ((0, jsx_runtime_1.jsx)(WebContainer_1.default, { style: styles.tabBar, children: children }));
16
16
  };
17
17
  exports.default = WebTabBar;
@@ -2,8 +2,8 @@
2
2
  declare const _default: import("react").NamedExoticComponent<WebTabBarTabProps>;
3
3
  export default _default;
4
4
  export type WebTabBarTabProps = {
5
- onSelectTab: (tabIndex: number, tabId: string) => void;
6
- tabId: string;
7
- tabIndex: number;
8
- tabTitle?: string;
5
+ readonly onSelectTab: (tabIndex: number, tabId: string) => void;
6
+ readonly tabId: string;
7
+ readonly tabIndex: number;
8
+ readonly tabTitle?: string;
9
9
  };
@@ -4,7 +4,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
4
4
  const react_shared_1 = require("@dgui/react-shared");
5
5
  const react_web_shared_1 = require("@dgui/react-web-shared");
6
6
  const Providers = ({ children, drawerIndex, drawerOpen, onDrawerToggle, onSelectDrawer, onSelectTab, tabIndex }) => {
7
- return ((0, jsx_runtime_1.jsx)(react_shared_1.Providers, Object.assign({ drawerIndex: drawerIndex, drawerOpen: drawerOpen, onDrawerToggle: onDrawerToggle, onSelectDrawer: onSelectDrawer, onSelectTab: onSelectTab, tabIndex: tabIndex }, { children: (0, jsx_runtime_1.jsx)(react_web_shared_1.WebBaseGatewayProvider, { children: children }) })));
7
+ return ((0, jsx_runtime_1.jsx)(react_shared_1.Providers, { drawerIndex: drawerIndex, drawerOpen: drawerOpen, onDrawerToggle: onDrawerToggle, onSelectDrawer: onSelectDrawer, onSelectTab: onSelectTab, tabIndex: tabIndex, children: (0, jsx_runtime_1.jsx)(react_web_shared_1.WebBaseGatewayProvider, { children: children }) }));
8
8
  };
9
9
  Providers.displayName = 'WebProviders';
10
10
  exports.default = Providers;
@@ -9,7 +9,7 @@ const Tabs_1 = __importDefault(require("./Components/Tabs"));
9
9
  const WebGateway_1 = require("./Generics/WebGateway");
10
10
  const Providers_1 = __importDefault(require("./Providers"));
11
11
  const ReactWebDigest = ({ children, drawerIndex, drawerOpen, onDrawerToggle, onSelectDrawer, onSelectTab, tabIndex }) => {
12
- return ((0, jsx_runtime_1.jsxs)(Providers_1.default, Object.assign({ drawerIndex: drawerIndex, drawerOpen: drawerOpen, onDrawerToggle: onDrawerToggle, onSelectDrawer: onSelectDrawer, onSelectTab: onSelectTab, tabIndex: tabIndex }, { children: [(0, jsx_runtime_1.jsx)(WebGateway_1.WebGatewayDest, { gatewayId: 'ReactWebDigestAppBar' }), (0, jsx_runtime_1.jsx)(Drawers_1.default, { children: (0, jsx_runtime_1.jsx)(Tabs_1.default, {}) }), children] })));
12
+ return ((0, jsx_runtime_1.jsxs)(Providers_1.default, { drawerIndex: drawerIndex, drawerOpen: drawerOpen, onDrawerToggle: onDrawerToggle, onSelectDrawer: onSelectDrawer, onSelectTab: onSelectTab, tabIndex: tabIndex, children: [(0, jsx_runtime_1.jsx)(WebGateway_1.WebGatewayDest, { gatewayId: 'ReactWebDigestAppBar' }), (0, jsx_runtime_1.jsx)(Drawers_1.default, { children: (0, jsx_runtime_1.jsx)(Tabs_1.default, {}) }), children] }));
13
13
  };
14
14
  ReactWebDigest.displayName = 'ReactWebDigest';
15
15
  exports.default = ReactWebDigest;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@dgui/react-web",
3
3
  "title": "Digested React GUI Web Components",
4
4
  "license": "LGPL-3.0-or-later",
5
- "version": "0.3.2-beta.1",
5
+ "version": "0.4.0",
6
6
  "private": false,
7
7
  "description": "Web Components for a boilerplate React GUI",
8
8
  "author": "wallzero @wallzeroblog (http://wallzero.com)",
@@ -43,30 +43,30 @@
43
43
  "set:version": "npm version --allow-same-version --no-commit-hooks --no-git-tag-version --no-workspaces-update $(npm --silent view $(node -p \"require('./package.json').name\") version)"
44
44
  },
45
45
  "devDependencies": {
46
- "@digest/eslint-config-jest": "^4.2.2",
47
- "@digest/eslint-config-react": "^4.2.2",
48
- "@digest/eslint-config-typescript": "^4.2.2",
49
- "@digest/jest-junit": "^4.2.2",
50
- "@digest/jest-react": "^4.2.2",
51
- "@digest/jest-typescript": "^4.2.2",
52
- "@digest/typescript": "^4.2.2",
53
- "@types/jest": "^29.5.1",
54
- "@types/react": "^18.0.38",
55
- "@types/react-dom": "^18.0.11",
46
+ "@digest/eslint-config-jest": "^4.2.5",
47
+ "@digest/eslint-config-react": "^4.2.5",
48
+ "@digest/eslint-config-typescript": "^4.2.5",
49
+ "@digest/jest-junit": "^4.2.5",
50
+ "@digest/jest-react": "^4.2.5",
51
+ "@digest/jest-typescript": "^4.2.5",
52
+ "@digest/typescript": "^4.2.5",
53
+ "@types/jest": "^29.5.3",
54
+ "@types/react": "^18.2.18",
55
+ "@types/react-dom": "^18.2.7",
56
56
  "@types/react-test-renderer": "^18.0.0",
57
57
  "cross-env": "^7.0.3",
58
- "jest-environment-jsdom": "^29.5.0",
58
+ "jest-environment-jsdom": "^29.6.2",
59
59
  "jest-environment-jsdom-global": "^4.0.0",
60
60
  "npm-run-all": "^4.1.5",
61
61
  "react": "^18.2.0",
62
62
  "react-dom": "^18.2.0",
63
63
  "react-modern-drawer": "^1.2.0",
64
64
  "react-test-renderer": "^18.2.0",
65
- "rimraf": "^5.0.0"
65
+ "rimraf": "^5.0.1"
66
66
  },
67
67
  "dependencies": {
68
- "@dgui/react-shared": "^0.3.2-beta.1",
69
- "@dgui/react-web-shared": "^0.3.2-beta.1"
68
+ "@dgui/react-shared": "^0.4.0",
69
+ "@dgui/react-web-shared": "^0.4.0"
70
70
  },
71
71
  "peerDependencies": {
72
72
  "react": "^16.0.0 || ^17.0.0 || ^18.0.0",
@@ -82,5 +82,5 @@
82
82
  "react-dom",
83
83
  "typescript"
84
84
  ],
85
- "gitHead": "d7041d722670220288a98743c02810b000cf8020"
85
+ "gitHead": "94c816e2bceb058183cbe0f4dfacb1c7dd6c9d86"
86
86
  }