@kemu-io/hs-react 0.3.0 → 0.3.1
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/cjs/components/BaseWidget.d.ts +6 -1
- package/cjs/components/BaseWidget.js +2 -2
- package/cjs/components/SettingsDialog.js +1 -1
- package/cjs/components/SvgContainer.d.ts +4 -1
- package/cjs/components/SvgContainer.js +3 -3
- package/cjs/components/index.d.ts +10 -2
- package/mjs/components/BaseWidget.d.ts +6 -1
- package/mjs/components/BaseWidget.js +2 -2
- package/mjs/components/SettingsDialog.js +1 -1
- package/mjs/components/SvgContainer.d.ts +4 -1
- package/mjs/components/SvgContainer.js +3 -3
- package/mjs/components/index.d.ts +10 -2
- package/package.json +1 -1
|
@@ -47,12 +47,17 @@ export interface BaseWidgetProps {
|
|
|
47
47
|
onOpenSettings?: () => void;
|
|
48
48
|
width?: number;
|
|
49
49
|
height?: number;
|
|
50
|
+
iconWidth?: number;
|
|
51
|
+
iconHeight?: number;
|
|
50
52
|
showIcon?: boolean;
|
|
51
53
|
customIcon?: ReactNode;
|
|
52
54
|
settingsIconColor?: string;
|
|
53
55
|
customTheme?: Theme;
|
|
56
|
+
svgContainerClassName?: string;
|
|
57
|
+
widgetContainerClassName?: string;
|
|
58
|
+
widgetBodyClassName?: string;
|
|
54
59
|
}
|
|
55
|
-
declare const BaseWidget: ({ children, showSettings, onOpenSettings, width, height, showIcon, customIcon, settingsIconColor, customTheme, }: BaseWidgetProps) => import("react/jsx-runtime.js").JSX.Element;
|
|
60
|
+
declare const BaseWidget: ({ children, showSettings, onOpenSettings, width, height, iconWidth, iconHeight, showIcon, customIcon, settingsIconColor, customTheme, svgContainerClassName, widgetContainerClassName, widgetBodyClassName, }: BaseWidgetProps) => import("react/jsx-runtime.js").JSX.Element;
|
|
56
61
|
|
|
57
62
|
export {
|
|
58
63
|
BaseWidget as default,
|
|
@@ -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:
|
|
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`
|
|
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:
|
|
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;
|
|
@@ -13,8 +13,11 @@ import { ReactNode } from 'react';
|
|
|
13
13
|
export interface SvgContainerProps {
|
|
14
14
|
fill?: string;
|
|
15
15
|
children?: ReactNode;
|
|
16
|
+
width?: number;
|
|
17
|
+
height?: number;
|
|
18
|
+
className?: string;
|
|
16
19
|
}
|
|
17
|
-
declare const SvgContainer: ({ fill, children }: SvgContainerProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
declare const SvgContainer: ({ fill, children, width, height, className }: SvgContainerProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
21
|
|
|
19
22
|
export {
|
|
20
23
|
SvgContainer as default,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
margin-top: 10px;
|
|
4
4
|
|
|
5
5
|
svg {
|
|
6
|
-
width:
|
|
7
|
-
height:
|
|
6
|
+
width: ${e=>e.width||38}px;
|
|
7
|
+
height: ${e=>e.height||38}px;
|
|
8
8
|
}
|
|
9
|
-
`,SvgContainer=({fill:e,children:t})=>(0,jsx_runtime_1.jsx)(StyledSvgContainer,{fill:e,children:t});exports.default=SvgContainer;
|
|
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;
|
|
@@ -82,12 +82,17 @@ export interface BaseWidgetProps {
|
|
|
82
82
|
onOpenSettings?: () => void;
|
|
83
83
|
width?: number;
|
|
84
84
|
height?: number;
|
|
85
|
+
iconWidth?: number;
|
|
86
|
+
iconHeight?: number;
|
|
85
87
|
showIcon?: boolean;
|
|
86
88
|
customIcon?: React$1.ReactNode;
|
|
87
89
|
settingsIconColor?: string;
|
|
88
90
|
customTheme?: Theme;
|
|
91
|
+
svgContainerClassName?: string;
|
|
92
|
+
widgetContainerClassName?: string;
|
|
93
|
+
widgetBodyClassName?: string;
|
|
89
94
|
}
|
|
90
|
-
export declare const BaseWidget: ({ children, showSettings, onOpenSettings, width, height, showIcon, customIcon, settingsIconColor, customTheme, }: BaseWidgetProps) => import("react/jsx-runtime.js").JSX.Element;
|
|
95
|
+
export declare const BaseWidget: ({ children, showSettings, onOpenSettings, width, height, iconWidth, iconHeight, showIcon, customIcon, settingsIconColor, customTheme, svgContainerClassName, widgetContainerClassName, widgetBodyClassName, }: BaseWidgetProps) => import("react/jsx-runtime.js").JSX.Element;
|
|
91
96
|
/**
|
|
92
97
|
* A checkbox field component with label, wrapped in a horizontal field layout.
|
|
93
98
|
*
|
|
@@ -364,8 +369,11 @@ export declare const SettingsDialog: ({ title, open, noHeader, onClose, onSave,
|
|
|
364
369
|
export interface SvgContainerProps {
|
|
365
370
|
fill?: string;
|
|
366
371
|
children?: React$1.ReactNode;
|
|
372
|
+
width?: number;
|
|
373
|
+
height?: number;
|
|
374
|
+
className?: string;
|
|
367
375
|
}
|
|
368
|
-
export declare const SvgContainer: ({ fill, children }: SvgContainerProps) => import("react/jsx-runtime").JSX.Element;
|
|
376
|
+
export declare const SvgContainer: ({ fill, children, width, height, className }: SvgContainerProps) => import("react/jsx-runtime").JSX.Element;
|
|
369
377
|
/**
|
|
370
378
|
* A container for widget body content. Provides centered flexbox layout with padding.
|
|
371
379
|
*
|
|
@@ -47,12 +47,17 @@ export interface BaseWidgetProps {
|
|
|
47
47
|
onOpenSettings?: () => void;
|
|
48
48
|
width?: number;
|
|
49
49
|
height?: number;
|
|
50
|
+
iconWidth?: number;
|
|
51
|
+
iconHeight?: number;
|
|
50
52
|
showIcon?: boolean;
|
|
51
53
|
customIcon?: ReactNode;
|
|
52
54
|
settingsIconColor?: string;
|
|
53
55
|
customTheme?: Theme;
|
|
56
|
+
svgContainerClassName?: string;
|
|
57
|
+
widgetContainerClassName?: string;
|
|
58
|
+
widgetBodyClassName?: string;
|
|
54
59
|
}
|
|
55
|
-
declare const BaseWidget: ({ children, showSettings, onOpenSettings, width, height, showIcon, customIcon, settingsIconColor, customTheme, }: BaseWidgetProps) => import("react/jsx-runtime.js").JSX.Element;
|
|
60
|
+
declare const BaseWidget: ({ children, showSettings, onOpenSettings, width, height, iconWidth, iconHeight, showIcon, customIcon, settingsIconColor, customTheme, svgContainerClassName, widgetContainerClassName, widgetBodyClassName, }: BaseWidgetProps) => import("react/jsx-runtime.js").JSX.Element;
|
|
56
61
|
|
|
57
62
|
export {
|
|
58
63
|
BaseWidget as default,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import{css}from"@emotion/react";import WidgetContainer from"./WidgetContainer.js";import SettingsBar from"./SettingsBar.js";import WidgetBody from"./WidgetBody.js";import SvgContainer from"./SvgContainer.js";import KemuThemeWrapper from"./KemuThemeWrapper.js";const BaseWidget=({children:e,showSettings:t=!0,onOpenSettings:i,width:s=84,height:o=134,showIcon:
|
|
1
|
+
import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import{css}from"@emotion/react";import WidgetContainer from"./WidgetContainer.js";import SettingsBar from"./SettingsBar.js";import WidgetBody from"./WidgetBody.js";import SvgContainer from"./SvgContainer.js";import KemuThemeWrapper from"./KemuThemeWrapper.js";const BaseWidget=({children:e,showSettings:t=!0,onOpenSettings:i,width:s=84,height:o=134,iconWidth:n=38,iconHeight:r=38,showIcon:a=!0,customIcon:m,settingsIconColor:c="white",customTheme:d,svgContainerClassName:g,widgetContainerClassName:h,widgetBodyClassName:l})=>_jsx(KemuThemeWrapper,{theme:d,children:_jsxs(WidgetContainer,{className:h,width:s,height:o,css:css`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
align-items: center;
|
|
5
5
|
justify-content: center;
|
|
6
|
-
`,children:[t&&i&&_jsx(SettingsBar,{iconColor:
|
|
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;
|
|
@@ -13,8 +13,11 @@ import { ReactNode } from 'react';
|
|
|
13
13
|
export interface SvgContainerProps {
|
|
14
14
|
fill?: string;
|
|
15
15
|
children?: ReactNode;
|
|
16
|
+
width?: number;
|
|
17
|
+
height?: number;
|
|
18
|
+
className?: string;
|
|
16
19
|
}
|
|
17
|
-
declare const SvgContainer: ({ fill, children }: SvgContainerProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
declare const SvgContainer: ({ fill, children, width, height, className }: SvgContainerProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
21
|
|
|
19
22
|
export {
|
|
20
23
|
SvgContainer as default,
|
|
@@ -3,7 +3,7 @@ import{jsx as _jsx}from"react/jsx-runtime";import styled from"@emotion/styled";c
|
|
|
3
3
|
margin-top: 10px;
|
|
4
4
|
|
|
5
5
|
svg {
|
|
6
|
-
width:
|
|
7
|
-
height:
|
|
6
|
+
width: ${t=>t.width||38}px;
|
|
7
|
+
height: ${t=>t.height||38}px;
|
|
8
8
|
}
|
|
9
|
-
`,SvgContainer=({fill:t,children:i})=>_jsx(StyledSvgContainer,{fill:t,children:i});export default SvgContainer;
|
|
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;
|
|
@@ -82,12 +82,17 @@ export interface BaseWidgetProps {
|
|
|
82
82
|
onOpenSettings?: () => void;
|
|
83
83
|
width?: number;
|
|
84
84
|
height?: number;
|
|
85
|
+
iconWidth?: number;
|
|
86
|
+
iconHeight?: number;
|
|
85
87
|
showIcon?: boolean;
|
|
86
88
|
customIcon?: React$1.ReactNode;
|
|
87
89
|
settingsIconColor?: string;
|
|
88
90
|
customTheme?: Theme;
|
|
91
|
+
svgContainerClassName?: string;
|
|
92
|
+
widgetContainerClassName?: string;
|
|
93
|
+
widgetBodyClassName?: string;
|
|
89
94
|
}
|
|
90
|
-
export declare const BaseWidget: ({ children, showSettings, onOpenSettings, width, height, showIcon, customIcon, settingsIconColor, customTheme, }: BaseWidgetProps) => import("react/jsx-runtime.js").JSX.Element;
|
|
95
|
+
export declare const BaseWidget: ({ children, showSettings, onOpenSettings, width, height, iconWidth, iconHeight, showIcon, customIcon, settingsIconColor, customTheme, svgContainerClassName, widgetContainerClassName, widgetBodyClassName, }: BaseWidgetProps) => import("react/jsx-runtime.js").JSX.Element;
|
|
91
96
|
/**
|
|
92
97
|
* A checkbox field component with label, wrapped in a horizontal field layout.
|
|
93
98
|
*
|
|
@@ -364,8 +369,11 @@ export declare const SettingsDialog: ({ title, open, noHeader, onClose, onSave,
|
|
|
364
369
|
export interface SvgContainerProps {
|
|
365
370
|
fill?: string;
|
|
366
371
|
children?: React$1.ReactNode;
|
|
372
|
+
width?: number;
|
|
373
|
+
height?: number;
|
|
374
|
+
className?: string;
|
|
367
375
|
}
|
|
368
|
-
export declare const SvgContainer: ({ fill, children }: SvgContainerProps) => import("react/jsx-runtime").JSX.Element;
|
|
376
|
+
export declare const SvgContainer: ({ fill, children, width, height, className }: SvgContainerProps) => import("react/jsx-runtime").JSX.Element;
|
|
369
377
|
/**
|
|
370
378
|
* A container for widget body content. Provides centered flexbox layout with padding.
|
|
371
379
|
*
|