jamespot-react-components 1.3.3 → 1.3.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.
@@ -1,7 +1,8 @@
1
- export declare const EditorInput: ({ label, placeholder, initialValue, onChange, }: {
1
+ export declare const EditorInput: ({ label, placeholder, initialValue, width, onChange, }: {
2
2
  label: string;
3
3
  placeholder?: string;
4
4
  initialValue: string | undefined;
5
5
  autoFocus?: boolean;
6
+ width?: string;
6
7
  onChange: (text: string) => void;
7
8
  }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,11 @@
1
+ import { Position } from '../../Widgets/const';
2
+ import { ButtonColors } from '../../JRCButton/types';
3
+ export type Sizes = 's' | 'm' | 'l';
4
+ export declare const EditorPositionToggle: ({ label, initialValue, width, onChange, color, size, }: {
5
+ label?: string;
6
+ initialValue?: Position;
7
+ width?: string;
8
+ onChange: (value: Position) => void;
9
+ color?: ButtonColors;
10
+ size?: Sizes;
11
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,5 @@
1
- export declare const ColorInput: ({ initialValue, onChange }: {
1
+ export declare const ColorInput: ({ initialValue, onChange, width, }: {
2
2
  initialValue: string;
3
3
  onChange: (color: string) => void;
4
+ width?: string;
4
5
  }) => import("react/jsx-runtime").JSX.Element;
@@ -246,7 +246,7 @@ export declare const OptionMenu: import("styled-components").StyledComponent<"di
246
246
  accessKey?: string | undefined | undefined;
247
247
  autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {}) | undefined;
248
248
  autoFocus?: boolean | undefined | undefined;
249
- contentEditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
249
+ contentEditable?: "inherit" | (boolean | "true" | "false") | "plaintext-only" | undefined;
250
250
  contextMenu?: string | undefined | undefined;
251
251
  dir?: string | undefined | undefined;
252
252
  draggable?: (boolean | "true" | "false") | undefined;
@@ -4,10 +4,12 @@ export declare const JRCModalBox: import("styled-components").StyledComponent<"d
4
4
  isFullHeight?: boolean;
5
5
  overflow?: ModalOverflow;
6
6
  zIndex?: number;
7
+ overlayBackgroundColor?: string;
7
8
  }, never>;
8
9
  export declare const JRCModalContainerFull: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
9
10
  isFullScreen?: boolean;
10
11
  maxHeight?: string;
12
+ containerBackgroundColor?: string;
11
13
  }, never>;
12
14
  export declare const JRCModalContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
13
15
  variant?: ModalVariant;
@@ -15,12 +17,13 @@ export declare const JRCModalContainer: import("styled-components").StyledCompon
15
17
  radius?: ModalBorderRadius;
16
18
  maxHeight?: string;
17
19
  maxWidth?: string;
20
+ containerBackgroundColor?: string;
18
21
  }, never>;
19
22
  export declare const JRCModalTitle: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
20
23
  export declare const JRCModalOptions: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
21
24
  export declare const JRCModalBody: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
22
25
  $modalOverflow?: ModalOverflow;
23
- $contentBackgroundColor?: boolean;
26
+ $isContentBackgroundColor?: boolean;
24
27
  }, never>;
25
28
  export declare const JRCModalContentFull: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
26
29
  export declare const JRCModalHeader: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
@@ -13,7 +13,7 @@ export type JRCModalContentBase = {
13
13
  export type JRCModalContentProps = JRCModalContentBase & {
14
14
  isFull?: boolean;
15
15
  buttons?: JRCModalButtonType[];
16
- contentBackgroundColor?: boolean;
16
+ isContentBackgroundColor?: boolean;
17
17
  };
18
18
  export interface JRCModalButtonType {
19
19
  children: ReactNode;
@@ -31,4 +31,4 @@ export declare const ModalTitle: ({ title, subTitle }: {
31
31
  title?: ReactNode;
32
32
  subTitle?: ReactNode;
33
33
  }) => import("react/jsx-runtime").JSX.Element;
34
- export declare const JRCModalContent: ({ title, subTitle, onClickIconClose, overflow, options, children, buttons, isFull, dataCy, contentBackgroundColor, }: JRCModalContentProps) => import("react/jsx-runtime").JSX.Element;
34
+ export declare const JRCModalContent: ({ title, subTitle, onClickIconClose, overflow, options, children, buttons, isFull, dataCy, isContentBackgroundColor, }: JRCModalContentProps) => import("react/jsx-runtime").JSX.Element;
@@ -17,7 +17,9 @@ export interface JRCModalLayoutProps {
17
17
  extraTopButtons?: JRCIconButtonProps[];
18
18
  maxWidth?: string;
19
19
  variant?: ModalVariant;
20
- contentBackgroundColor?: boolean;
20
+ isContentBackgroundColor?: boolean;
21
+ overlayBackgroundColor?: string;
22
+ containerBackgroundColor?: string;
21
23
  overflow?: 'hidden' | 'scroll' | 'visible' | 'auto';
22
24
  zIndex?: number;
23
25
  }
@@ -1,2 +1,2 @@
1
1
  import { JRCModalProps } from './JRCModal.types';
2
- export declare const JRCModal: ({ children, open, closeHandler, buttons, title, subTitle, options, portalId, inPlace, ref, zIndex, enableClickAwayCloseModal, variant, maxWidth, focusOnCloseRef, extraTopButtons, overflow, contentBackgroundColor, }: JRCModalProps) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const JRCModal: ({ children, open, closeHandler, buttons, title, subTitle, options, portalId, inPlace, ref, zIndex, enableClickAwayCloseModal, variant, maxWidth, focusOnCloseRef, extraTopButtons, overflow, isContentBackgroundColor, }: JRCModalProps) => import("react/jsx-runtime").JSX.Element;
@@ -19,7 +19,7 @@ export type JRCModalBaseProps = {
19
19
  zIndex?: number;
20
20
  focusOnCloseRef?: RefObject<HTMLElement>;
21
21
  extraTopButtons?: JRCIconButtonProps[];
22
- contentBackgroundColor?: boolean;
22
+ isContentBackgroundColor?: boolean;
23
23
  };
24
24
  export type JRCModalProps = JRCModalBaseProps & {
25
25
  buttons?: JRCModalButtonType[];
@@ -0,0 +1,4 @@
1
+ export type JRCWidgetColorProps = {
2
+ backgroundColor?: string;
3
+ };
4
+ export declare const JRCWidgetColor: ({ backgroundColor }: JRCWidgetColorProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,10 @@
1
+ import { WidgetColorContent } from 'jamespot-user-api';
2
+ export interface JRCWidgetColorEditorProps extends WidgetColorContent {
3
+ uniqid: string;
4
+ content: WidgetColorContent;
5
+ onChangeContent: (uniqid: string, content: WidgetColorContent) => void;
6
+ }
7
+ /**
8
+ * Widget Color editor component
9
+ */
10
+ export declare const JRCWidgetColorEditor: ({ uniqid, content, onChangeContent }: JRCWidgetColorEditorProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,16 @@
1
+ import { jUserList } from 'jamespot-user-api';
2
+ export type JRCWidgetWelcomeProps = {
3
+ css?: {
4
+ background?: string;
5
+ textColor?: string;
6
+ fontWeight?: string;
7
+ fontSize?: string | number;
8
+ textAlign?: string;
9
+ };
10
+ message?: string;
11
+ displayMode?: string;
12
+ currentUser: jUserList;
13
+ lineBreak?: boolean;
14
+ position?: string;
15
+ };
16
+ export declare const JRCWidgetWelcome: ({ currentUser, message, lineBreak, css, position, displayMode, }: JRCWidgetWelcomeProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,56 @@
1
+ import { Meta } from '@storybook/react-webpack5';
2
+ import { JRCWidgetWelcome } from './JRCWidgetWelcome';
3
+ import { ProfileDisplayType, Position, TextFontWeight, EditorFontSize } from '../const';
4
+ declare const _default: Meta<typeof JRCWidgetWelcome>;
5
+ export default _default;
6
+ export declare const Default: {
7
+ render: import("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react-webpack5").ReactRenderer, import("./JRCWidgetWelcome").JRCWidgetWelcomeProps>;
8
+ args: {};
9
+ };
10
+ export declare const CustomMessage: {
11
+ render: import("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react-webpack5").ReactRenderer, import("./JRCWidgetWelcome").JRCWidgetWelcomeProps>;
12
+ args: {
13
+ message: string;
14
+ };
15
+ };
16
+ export declare const WithFullName: {
17
+ render: import("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react-webpack5").ReactRenderer, import("./JRCWidgetWelcome").JRCWidgetWelcomeProps>;
18
+ args: {
19
+ displayMode: ProfileDisplayType;
20
+ };
21
+ };
22
+ export declare const TopLeft: {
23
+ render: import("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react-webpack5").ReactRenderer, import("./JRCWidgetWelcome").JRCWidgetWelcomeProps>;
24
+ args: {
25
+ position: Position;
26
+ };
27
+ };
28
+ export declare const BottomRight: {
29
+ render: import("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react-webpack5").ReactRenderer, import("./JRCWidgetWelcome").JRCWidgetWelcomeProps>;
30
+ args: {
31
+ position: Position;
32
+ };
33
+ };
34
+ export declare const CustomBackground: {
35
+ render: import("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react-webpack5").ReactRenderer, import("./JRCWidgetWelcome").JRCWidgetWelcomeProps>;
36
+ args: {
37
+ css: {
38
+ background: string;
39
+ textColor: string;
40
+ fontWeight: TextFontWeight;
41
+ fontSize: EditorFontSize;
42
+ };
43
+ };
44
+ };
45
+ export declare const NoLineBreak: {
46
+ render: import("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react-webpack5").ReactRenderer, import("./JRCWidgetWelcome").JRCWidgetWelcomeProps>;
47
+ args: {
48
+ lineBreak: boolean;
49
+ };
50
+ };
51
+ export declare const InteractionTest: {
52
+ render: import("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react-webpack5").ReactRenderer, import("./JRCWidgetWelcome").JRCWidgetWelcomeProps>;
53
+ play: ({ canvasElement }: {
54
+ canvasElement: HTMLElement;
55
+ }) => Promise<void>;
56
+ };
@@ -0,0 +1,10 @@
1
+ import { WidgetWelcomeContent } from 'jamespot-user-api';
2
+ export interface JRCWidgetWelcomeEditorProps extends WidgetWelcomeContent {
3
+ uniqid: string;
4
+ content: WidgetWelcomeContent;
5
+ onChangeContent: (uniqid: string, content: WidgetWelcomeContent) => void;
6
+ }
7
+ /**
8
+ * Widget Welcome editor component
9
+ */
10
+ export declare const JRCWidgetWelcomeEditor: ({ uniqid, content, onChangeContent }: JRCWidgetWelcomeEditorProps) => import("react/jsx-runtime").JSX.Element;
@@ -27,10 +27,6 @@ export declare const EditorGalleryImageNumberOptions: {
27
27
  label: string;
28
28
  value: string;
29
29
  }[];
30
- export declare const EditorGalleryHeightModeOptions: {
31
- label: string;
32
- value: string;
33
- }[];
34
30
  export declare enum EditorFontSize {
35
31
  Size10 = 10,
36
32
  Size12 = 12,
@@ -45,10 +41,40 @@ export declare const EditorFontSizeOptions: {
45
41
  label: string;
46
42
  value: EditorFontSize;
47
43
  }[];
44
+ export declare const EditorGalleryHeightModeOptions: {
45
+ label: string;
46
+ value: string;
47
+ }[];
48
48
  export declare const EditorOpacityOptions: {
49
49
  label: string;
50
50
  value: string;
51
51
  }[];
52
+ export declare enum TextAlign {
53
+ Left = "left",
54
+ Center = "center",
55
+ Justify = "justify",
56
+ Right = "right"
57
+ }
58
+ export declare const TextAlignOptions: {
59
+ label: string;
60
+ value: TextAlign;
61
+ }[];
62
+ export declare enum Position {
63
+ TopLeft = "top-left",
64
+ TopCenter = "top-center",
65
+ TopRight = "top-right",
66
+ CenterLeft = "center-left",
67
+ Center = "center",
68
+ CenterRight = "center-right",
69
+ BottomLeft = "bottom-left",
70
+ BottomCenter = "bottom-center",
71
+ BottomRight = "bottom-right"
72
+ }
73
+ export declare const PositionOptions: {
74
+ label: string;
75
+ value: Position;
76
+ iconName: string;
77
+ }[];
52
78
  export declare enum ProfileDisplayType {
53
79
  OnlyPicture = "1",
54
80
  WithFirstName = "2",
@@ -76,6 +102,10 @@ export declare const TextFontWeightOptions: {
76
102
  label: string;
77
103
  value: TextFontWeight;
78
104
  }[];
105
+ export declare const YesNoBooleanOptions: {
106
+ label: string;
107
+ value: boolean;
108
+ }[];
79
109
  /**
80
110
  * Gets the color value by its index in the EditorColorsOptions array.
81
111
  * @param index The index of the color.
@@ -1,8 +1,10 @@
1
1
  import { jFileLittle, jUserList } from 'jamespot-user-api';
2
+ import { Position } from './const';
2
3
  export declare function imageResize(width: number, height: number, maxWidth: number, maxHeight: number): {
3
4
  width: number;
4
5
  height: number;
5
6
  };
6
7
  export declare const mockFileLittle: () => jFileLittle;
8
+ export declare function getPositionStyle(position: Position): React.CSSProperties;
7
9
  export declare const mock_jUserList: () => jUserList;
8
10
  export declare const getCurrentUserDisplayText: (displayMode: string, currentUser: jUserList) => string;
@@ -161,5 +161,9 @@ export { JRCWidgetDatasourceTableEditor } from './Widgets/JRCWidgetTable/JRCWidg
161
161
  export { JRCWidgetExcelDatasourceTableEditor } from './Widgets/JRCWidgetTable/JRCWidgetExcelDatasourceTableEditor';
162
162
  export { JRCWidgetTable } from './Widgets/JRCWidgetTable/JRCWidgetTable';
163
163
  export { JRCWidgetTableEditor } from './Widgets/JRCWidgetTable/JRCWidgetTableEditor';
164
+ export { JRCWidgetWelcome } from './Widgets/JRCWidgetWelcome/JRCWidgetWelcome';
165
+ export { JRCWidgetWelcomeEditor } from './Widgets/JRCWidgetWelcome/JRCWidgetWelcomeEditor';
164
166
  export { JRCWidgetUserProfile } from './Widgets/JRCWidgetUserProfile/JRCWidgetUserProfile';
165
167
  export { JRCWidgetUserProfileEditor } from './Widgets/JRCWidgetUserProfile/JRCWidgetUserProfileEditor';
168
+ export { JRCWidgetColor } from './Widgets/JRCWidgetColor/JRCWidgetColor';
169
+ export { JRCWidgetColorEditor } from './Widgets/JRCWidgetColor/JRCWidgetColorEditor';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jamespot-react-components",
3
- "version": "1.3.3",
3
+ "version": "1.3.5",
4
4
  "description": "",
5
5
  "main": "./build/jamespot-react-components.js",
6
6
  "types": "./build/src/index.d.ts",
@@ -65,7 +65,7 @@
65
65
  "fork-ts-checker-webpack-plugin": "^9.1.0",
66
66
  "husky": "^7.0.4",
67
67
  "identity-obj-proxy": "^3.0.0",
68
- "jamespot-user-api": "^1.3.3",
68
+ "jamespot-user-api": "^1.3.5",
69
69
  "jest": "^30.2.0",
70
70
  "jest-environment-jsdom": "^30.2.0",
71
71
  "jest-styled-components": "^7.2.0",
@@ -120,6 +120,9 @@
120
120
  "node": ">=20.17.0 <21.0.0",
121
121
  "pnpm": ">=9.9.0 <10"
122
122
  },
123
+ "dependencies": {
124
+ "html2canvas": "^1.4.1"
125
+ },
123
126
  "scripts": {
124
127
  "dev": "webpack --env NODE_ENV=development",
125
128
  "local": "webpack --env NODE_ENV=development WATCH=true",