@kemu-io/hs-react 0.3.3 → 0.3.4

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,6 +1,6 @@
1
- "use strict";var __importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0});const jsx_runtime_1=require("react/jsx-runtime"),react_1=require("@emotion/react"),WidgetContainer_js_1=__importDefault(require("./WidgetContainer.js")),SettingsBar_js_1=__importDefault(require("./SettingsBar.js")),WidgetBody_js_1=__importDefault(require("./WidgetBody.js")),SvgContainer_js_1=__importDefault(require("./SvgContainer.js")),KemuThemeWrapper_js_1=__importDefault(require("./KemuThemeWrapper.js")),BaseWidget=({children:e,showSettings:t=!0,onOpenSettings:i,width:s=84,height:r=134,iconWidth:n=38,iconHeight:_=38,showIcon:a=!0,customIcon:o,settingsIconColor:u="white",customTheme:l,svgContainerClassName:d,widgetContainerClassName:m,widgetBodyClassName:c})=>(0,jsx_runtime_1.jsx)(KemuThemeWrapper_js_1.default,{theme:l,children:(0,jsx_runtime_1.jsxs)(WidgetContainer_js_1.default,{className:m,width:s,height:r,css:react_1.css`
1
+ "use strict";var __importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0});const jsx_runtime_1=require("react/jsx-runtime"),react_1=require("@emotion/react"),WidgetContainer_js_1=__importDefault(require("./WidgetContainer.js")),SettingsBar_js_1=__importDefault(require("./SettingsBar.js")),WidgetBody_js_1=__importDefault(require("./WidgetBody.js")),SvgContainer_js_1=__importDefault(require("./SvgContainer.js")),KemuThemeWrapper_js_1=__importDefault(require("./KemuThemeWrapper.js")),BaseWidget=({children:e,showSettings:t=!0,onOpenSettings:i,width:s=84,height:r=134,iconWidth:n=38,iconHeight:_=38,showIcon:a=!0,customIcon:o,settingsIconColor:u="white",customTheme:d,svgContainerClassName:l,widgetContainerClassName:m,widgetBodyClassName:c})=>(0,jsx_runtime_1.jsx)(KemuThemeWrapper_js_1.default,{theme:d,children:(0,jsx_runtime_1.jsxs)(WidgetContainer_js_1.default,{className:m,width:s,height:r,css:react_1.css`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  align-items: center;
5
5
  justify-content: center;
6
- `,children:[t&&i&&(0,jsx_runtime_1.jsx)(SettingsBar_js_1.default,{iconColor:u,onSettingsClick:i}),(0,jsx_runtime_1.jsxs)(WidgetBody_js_1.default,{className:c,children:[a&&o&&(0,jsx_runtime_1.jsx)(SvgContainer_js_1.default,{width:n,height:_,className:d,children:o}),e]})]})});exports.default=BaseWidget;
6
+ `,children:[t&&i&&(0,jsx_runtime_1.jsx)(SettingsBar_js_1.default,{iconColor:u,onSettingsClick:i}),(0,jsx_runtime_1.jsxs)(WidgetBody_js_1.default,{className:c,children:[a&&o&&(0,jsx_runtime_1.jsx)(SvgContainer_js_1.default,{width:n,height:_,className:l,marginTop:t?void 0:0,children:o}),e]})]})});exports.default=BaseWidget;
@@ -15,9 +15,10 @@ export interface SvgContainerProps {
15
15
  children?: ReactNode;
16
16
  width?: number;
17
17
  height?: number;
18
+ marginTop?: number;
18
19
  className?: string;
19
20
  }
20
- declare const SvgContainer: ({ fill, children, width, height, className }: SvgContainerProps) => import("react/jsx-runtime").JSX.Element;
21
+ declare const SvgContainer: ({ fill, children, width, height, className, marginTop }: SvgContainerProps) => import("react/jsx-runtime").JSX.Element;
21
22
 
22
23
  export {
23
24
  SvgContainer as default,
@@ -1,9 +1,9 @@
1
1
  "use strict";var __importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0});const jsx_runtime_1=require("react/jsx-runtime"),styled_1=__importDefault(require("@emotion/styled")),StyledSvgContainer=styled_1.default.div`
2
2
  fill: ${e=>e.fill||"white"};
3
- margin-top: 10px;
3
+ margin-top: ${e=>e.marginTop||10}px;
4
4
 
5
5
  svg {
6
6
  width: ${e=>e.width||38}px;
7
7
  height: ${e=>e.height||38}px;
8
8
  }
9
- `,SvgContainer=({fill:e,children:t,width:i,height:l,className:r})=>(0,jsx_runtime_1.jsx)(StyledSvgContainer,{fill:e,width:i,height:l,className:r,children:t});exports.default=SvgContainer;
9
+ `,SvgContainer=({fill:e,children:t,width:i,height:r,className:l,marginTop:n})=>(0,jsx_runtime_1.jsx)(StyledSvgContainer,{fill:e,width:i,height:r,className:l,marginTop:n,children:t});exports.default=SvgContainer;
@@ -373,9 +373,10 @@ export interface SvgContainerProps {
373
373
  children?: React$1.ReactNode;
374
374
  width?: number;
375
375
  height?: number;
376
+ marginTop?: number;
376
377
  className?: string;
377
378
  }
378
- export declare const SvgContainer: ({ fill, children, width, height, className }: SvgContainerProps) => import("react/jsx-runtime").JSX.Element;
379
+ export declare const SvgContainer: ({ fill, children, width, height, className, marginTop }: SvgContainerProps) => import("react/jsx-runtime").JSX.Element;
379
380
  /**
380
381
  * A container for widget body content. Provides centered flexbox layout with padding.
381
382
  *
@@ -3,4 +3,4 @@ import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import{css}from"@emotio
3
3
  flex-direction: column;
4
4
  align-items: center;
5
5
  justify-content: center;
6
- `,children:[t&&i&&_jsx(SettingsBar,{iconColor:c,onSettingsClick:i}),_jsxs(WidgetBody,{className:l,children:[a&&m&&_jsx(SvgContainer,{width:n,height:r,className:g,children:m}),e]})]})});export default BaseWidget;
6
+ `,children:[t&&i&&_jsx(SettingsBar,{iconColor:c,onSettingsClick:i}),_jsxs(WidgetBody,{className:l,children:[a&&m&&_jsx(SvgContainer,{width:n,height:r,className:g,marginTop:t?void 0:0,children:m}),e]})]})});export default BaseWidget;
@@ -15,9 +15,10 @@ export interface SvgContainerProps {
15
15
  children?: ReactNode;
16
16
  width?: number;
17
17
  height?: number;
18
+ marginTop?: number;
18
19
  className?: string;
19
20
  }
20
- declare const SvgContainer: ({ fill, children, width, height, className }: SvgContainerProps) => import("react/jsx-runtime").JSX.Element;
21
+ declare const SvgContainer: ({ fill, children, width, height, className, marginTop }: SvgContainerProps) => import("react/jsx-runtime").JSX.Element;
21
22
 
22
23
  export {
23
24
  SvgContainer as default,
@@ -1,9 +1,9 @@
1
1
  import{jsx as _jsx}from"react/jsx-runtime";import styled from"@emotion/styled";const StyledSvgContainer=styled.div`
2
- fill: ${t=>t.fill||"white"};
3
- margin-top: 10px;
2
+ fill: ${i=>i.fill||"white"};
3
+ margin-top: ${i=>i.marginTop||10}px;
4
4
 
5
5
  svg {
6
- width: ${t=>t.width||38}px;
7
- height: ${t=>t.height||38}px;
6
+ width: ${i=>i.width||38}px;
7
+ height: ${i=>i.height||38}px;
8
8
  }
9
- `,SvgContainer=({fill:t,children:i,width:e,height:l,className:h})=>_jsx(StyledSvgContainer,{fill:t,width:e,height:l,className:h,children:i});export default SvgContainer;
9
+ `,SvgContainer=({fill:i,children:t,width:e,height:l,className:n,marginTop:r})=>_jsx(StyledSvgContainer,{fill:i,width:e,height:l,className:n,marginTop:r,children:t});export default SvgContainer;
@@ -373,9 +373,10 @@ export interface SvgContainerProps {
373
373
  children?: React$1.ReactNode;
374
374
  width?: number;
375
375
  height?: number;
376
+ marginTop?: number;
376
377
  className?: string;
377
378
  }
378
- export declare const SvgContainer: ({ fill, children, width, height, className }: SvgContainerProps) => import("react/jsx-runtime").JSX.Element;
379
+ export declare const SvgContainer: ({ fill, children, width, height, className, marginTop }: SvgContainerProps) => import("react/jsx-runtime").JSX.Element;
379
380
  /**
380
381
  * A container for widget body content. Provides centered flexbox layout with padding.
381
382
  *
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@kemu-io/hs-react",
3
3
  "type": "module",
4
- "version": "0.3.3",
4
+ "version": "0.3.4",
5
5
  "description": "Kemu Hub Service library for React",
6
6
  "author": "Kemu Pty Ltd",
7
7
  "main": "cjs/WidgetWrapper.js",