jamespot-react-components 1.0.219 → 1.0.221

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,4 +1,4 @@
1
- export declare const CSSColorPicker: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
1
+ export declare const CSSColorPicker: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {
2
2
  disabled?: boolean | undefined;
3
3
  }, never>;
4
4
  export declare const CSSColorPickerIcon: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
@@ -2,6 +2,7 @@ import * as React from 'react';
2
2
  export declare const CONTAINER_PADDING = 32;
3
3
  export interface JRCAppContainerProps {
4
4
  children: React.ReactNode;
5
+ maxWidth?: string;
5
6
  }
6
- declare const JRCAppContainer: (props: JRCAppContainerProps) => React.JSX.Element;
7
+ declare const JRCAppContainer: ({ maxWidth, children }: JRCAppContainerProps) => React.JSX.Element;
7
8
  export { JRCAppContainer };
@@ -39,7 +39,7 @@ export declare const transformColor: (color?: string) => JRCIconProps['color'];
39
39
  * Button styling. May be used as a <a> tag
40
40
  */
41
41
  export declare const Button: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {
42
- themeButton: ButtonType;
42
+ $themeButton: ButtonType;
43
43
  hasLabel: boolean;
44
44
  } & Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & DataCy & {
45
45
  /** Color of the background of the button */
@@ -1,48 +1,20 @@
1
1
  import { Colors, ColorsOrShades } from '../../styles/theme';
2
2
  import { ButtonColors } from './JRCButton';
3
- declare const defaultLinkStyle: {
4
- color: string;
5
- background: string;
6
- border: string;
7
- active: {
8
- background: string;
9
- border: string;
10
- 'text-decoration': string;
11
- };
12
- hover: {
13
- background: string;
14
- border: string;
15
- 'text-decoration': string;
16
- };
17
- };
18
- type Config = {
3
+ export type ButtonType = {
19
4
  color: Colors;
20
5
  background: Colors;
21
6
  border: Colors;
22
7
  active: {
23
8
  background: ColorsOrShades;
24
9
  border: ColorsOrShades;
10
+ 'text-decoration'?: 'underline' | 'none';
25
11
  };
26
12
  hover: {
27
13
  background: ColorsOrShades;
28
14
  border: ColorsOrShades;
15
+ 'text-decoration'?: 'underline' | 'none';
29
16
  };
30
17
  };
31
- type ButtonConfig = Record<'contained' | 'outlined', Record<ButtonColors | 'disabled', Config>> & Record<'link', Record<ButtonColors | 'disabled', typeof defaultLinkStyle>>;
18
+ type ButtonConfig = Record<'contained' | 'outlined', Record<ButtonColors | 'disabled', ButtonType>> & Record<'link', Record<ButtonColors | 'disabled', ButtonType>>;
32
19
  export declare const BUTTON_CONFIG: ButtonConfig;
33
- export type ButtonType = {
34
- color: string;
35
- background: string;
36
- border: string;
37
- active: {
38
- background: string;
39
- border: string;
40
- 'text-decoration'?: string;
41
- };
42
- hover: {
43
- background: string;
44
- border: string;
45
- 'text-decoration'?: string;
46
- };
47
- };
48
20
  export {};
@@ -27,7 +27,7 @@ export type JRCButtonDropdownProps = {
27
27
  export type ButtonProps = {
28
28
  borderLeft?: boolean;
29
29
  borderRight?: boolean;
30
- themeButton: ButtonType;
30
+ $themeButton: ButtonType;
31
31
  open?: boolean;
32
32
  darker?: boolean;
33
33
  };
@@ -36,7 +36,7 @@ export type OpenDirection = {
36
36
  };
37
37
  export type MenuWithTitleProps = OpenDirection & {
38
38
  label: string;
39
- themeButton: ButtonProps['themeButton'];
39
+ themeButton: ButtonProps['$themeButton'];
40
40
  children: React.ReactNode;
41
41
  };
42
42
  export type DropdownOptionProps = {
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- type EmptySpaceBgColor = 'sandLight' | 'sky15';
2
+ type EmptySpaceBgColor = 'sandLight' | 'sky15' | 'transparent';
3
3
  export type JRCEmptySpaceProps = {
4
4
  img: string;
5
5
  imgAlt?: string;
@@ -1,6 +1,7 @@
1
1
  import { FastCssProps } from '../Common/FastCss';
2
+ export type FlexDirection = 'row' | 'row-reverse' | 'column' | 'column-reverse';
2
3
  type FlexBoxProps = Omit<FastCssProps, 'display'> & {
3
- direction?: 'row' | 'column' | 'row-reverse' | 'column-reverse';
4
+ direction?: FlexDirection;
4
5
  inline?: boolean;
5
6
  flex?: boolean | string;
6
7
  gap?: number;
@@ -9,7 +10,7 @@ type FlexBoxProps = Omit<FastCssProps, 'display'> & {
9
10
  childFull?: boolean;
10
11
  };
11
12
  export declare const JRCFlexBox: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, Omit<FastCssProps, "display"> & {
12
- direction?: "row" | "column" | "row-reverse" | "column-reverse" | undefined;
13
+ direction?: FlexDirection | undefined;
13
14
  inline?: boolean | undefined;
14
15
  flex?: string | boolean | undefined;
15
16
  gap?: number | undefined;
@@ -1,9 +1,15 @@
1
1
  import * as React from 'react';
2
+ import { LayoutMode } from './template.type';
2
3
  export type JRCTemplateBaseProps = {
3
4
  children: React.ReactNode;
4
5
  isLoading: boolean;
6
+ loader?: React.ReactNode;
5
7
  title?: React.ReactNode;
8
+ mode?: LayoutMode;
9
+ maxWidth?: string;
6
10
  };
7
11
  export declare const ChildrenContainerStyle: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
8
- export declare const ChildrenContainer: (props: JRCTemplateBaseProps) => React.JSX.Element;
12
+ export declare const Title: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
13
+ export declare const Main: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
14
+ export declare const ChildrenContainer: ({ title, isLoading, loader, children }: Omit<JRCTemplateBaseProps, 'maxWidth'>) => React.JSX.Element;
9
15
  export declare const JRCTemplateBase: React.FC<any>;
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
- export type LayoutMode = 'fluid' | 'center';
2
+ import { FlexDirection } from '../JRCFlex/JRCFlexBox';
3
+ export type LayoutMode = 'fluid' | 'center' | 'centerTop';
3
4
  export type ColumnPosition = 'left' | 'right';
4
5
  export type JRCBasicAutoMarginContainerProps = {
5
6
  children: React.ReactNode;
@@ -8,6 +9,8 @@ export type JRCContainerProps = {
8
9
  children: React.ReactNode;
9
10
  className?: string;
10
11
  mode?: LayoutMode;
12
+ maxWidth?: string;
13
+ flexDirection?: FlexDirection;
11
14
  };
12
15
  export type JRCColumnProps = {
13
16
  children: React.ReactNode;
@@ -16,12 +19,14 @@ export type JRCColumnProps = {
16
19
  padding?: string;
17
20
  mode?: LayoutMode;
18
21
  position?: ColumnPosition;
22
+ flex?: boolean;
19
23
  };
20
24
  export type JRCMainColumnProps = {
21
25
  children: React.ReactNode;
22
26
  className?: string;
23
27
  mode?: LayoutMode;
24
28
  padding?: string;
29
+ flex?: boolean;
25
30
  };
26
31
  export type JRCTabEntry = {
27
32
  key: string;
@@ -127,21 +127,20 @@ export declare const Primary: Story<{
127
127
  } | {
128
128
  limit?: number | boolean | undefined;
129
129
  limitValue?: number | undefined;
130
- closing?: boolean | undefined;
131
- isClosed?: boolean | undefined;
130
+ closing?: boolean | 0 | 1 | undefined;
131
+ isClosed?: boolean | 0 | 1 | undefined;
132
132
  } | {
133
133
  widgets?: import("jamespot-user-api").WidgetBaseType[] | undefined;
134
134
  arr?: import("jamespot-user-api").WidgetQuickSurveyContentArr[] | undefined;
135
135
  css?: Record<string, string> | undefined;
136
- closing?: boolean | undefined;
137
- isClosed?: boolean | undefined;
138
- userTotal?: number | undefined;
139
- open?: boolean | undefined;
140
- multi?: boolean | undefined;
141
- showResult?: boolean | undefined;
142
- isNotDisabled?: boolean | undefined;
143
- seeResponseAfter?: boolean | undefined;
144
- anonymize?: boolean | undefined;
136
+ closing?: boolean | 0 | 1 | undefined;
137
+ isClosed?: boolean | 0 | 1 | undefined;
138
+ open?: boolean | 0 | 1 | undefined;
139
+ multi?: boolean | 0 | 1 | undefined;
140
+ showResult?: boolean | 0 | 1 | undefined;
141
+ isNotDisabled?: boolean | 0 | 1 | undefined;
142
+ seeResponseAfter?: boolean | 0 | 1 | undefined;
143
+ anonymize?: boolean | 0 | 1 | undefined;
145
144
  }), args_1: boolean, ...args_2: unknown[]) => void;
146
145
  onStateChange: (args_0: {
147
146
  busy?: boolean | undefined;
@@ -3,8 +3,8 @@ import React from 'react';
3
3
  export declare const JRCWidgetPresence: ({ limit, limitValue, userAvailableList, userUnavailableList, userValue, userAvailableTotal, userUnavailableTotal, isClosed, handleClickAvailable, handleClickUnavailable, handleOpenUsersModal, }: {
4
4
  limit?: number | boolean | undefined;
5
5
  limitValue?: number | undefined;
6
- closing?: boolean | undefined;
7
- isClosed?: boolean | undefined;
6
+ closing?: boolean | 0 | 1 | undefined;
7
+ isClosed?: boolean | 0 | 1 | undefined;
8
8
  } & {
9
9
  userAvailableList: jUserLittle[];
10
10
  userUnavailableList: jUserLittle[];
@@ -1,16 +1,16 @@
1
- import { WidgetQuickSurveyContentArr, WidgetQuickSurveyResponses } from 'jamespot-user-api';
1
+ import { WidgetQuickSurveyContentArr, WidgetQuickSurveyResponses, WidgetLegacyMixedBoolean } from 'jamespot-user-api';
2
2
  import React from 'react';
3
3
  type JRCWidgetQuickSurveyProps = {
4
4
  limit: number;
5
5
  values: WidgetQuickSurveyContentArr[];
6
6
  userResponses?: WidgetQuickSurveyResponses;
7
- canCloseSurvey: boolean;
8
- isClosed?: boolean;
9
- open?: boolean;
10
- userHasAlreadyVoted?: boolean;
11
- anonymize?: boolean;
12
- seeResponseAfter?: boolean;
13
- canUpdate?: boolean;
7
+ canCloseSurvey: WidgetLegacyMixedBoolean;
8
+ isClosed?: WidgetLegacyMixedBoolean;
9
+ open?: WidgetLegacyMixedBoolean;
10
+ userHasAlreadyVoted?: WidgetLegacyMixedBoolean;
11
+ anonymize?: WidgetLegacyMixedBoolean;
12
+ seeResponseAfter?: WidgetLegacyMixedBoolean;
13
+ canUpdate?: WidgetLegacyMixedBoolean;
14
14
  handleClickFile?: (entry: WidgetQuickSurveyContentArr) => void;
15
15
  handleCloseSurvey: () => void;
16
16
  handleProgressBarClick: (index: number) => void;
@@ -121,19 +121,18 @@ export declare const useEditorContext: <T = EditorBaseContext<{
121
121
  } | {
122
122
  limit?: number | boolean | undefined;
123
123
  limitValue?: number | undefined;
124
- closing?: boolean | undefined;
125
- isClosed?: boolean | undefined;
124
+ closing?: boolean | 0 | 1 | undefined;
125
+ isClosed?: boolean | 0 | 1 | undefined;
126
126
  } | {
127
127
  widgets?: import("jamespot-user-api").WidgetBaseType[] | undefined;
128
128
  arr?: import("jamespot-user-api").WidgetQuickSurveyContentArr[] | undefined;
129
129
  css?: Record<string, string> | undefined;
130
- closing?: boolean | undefined;
131
- isClosed?: boolean | undefined;
132
- userTotal?: number | undefined;
133
- open?: boolean | undefined;
134
- multi?: boolean | undefined;
135
- showResult?: boolean | undefined;
136
- isNotDisabled?: boolean | undefined;
137
- seeResponseAfter?: boolean | undefined;
138
- anonymize?: boolean | undefined;
130
+ closing?: boolean | 0 | 1 | undefined;
131
+ isClosed?: boolean | 0 | 1 | undefined;
132
+ open?: boolean | 0 | 1 | undefined;
133
+ multi?: boolean | 0 | 1 | undefined;
134
+ showResult?: boolean | 0 | 1 | undefined;
135
+ isNotDisabled?: boolean | 0 | 1 | undefined;
136
+ seeResponseAfter?: boolean | 0 | 1 | undefined;
137
+ anonymize?: boolean | 0 | 1 | undefined;
139
138
  })>>() => T;
@@ -2,6 +2,7 @@ import * as array from './utils.array';
2
2
  import * as color from './utils.color';
3
3
  import * as date from './utils.date';
4
4
  import * as document from './utils.document';
5
+ import * as icons from './utils.icons';
5
6
  import * as image from './utils.image';
6
7
  import * as file from './utils.files';
7
8
  import * as misc from './utils.misc';
@@ -9,4 +10,4 @@ import * as object from './utils.object';
9
10
  import * as regexp from './utils.regexp';
10
11
  import * as string from './utils.string';
11
12
  import * as time from './utils.time';
12
- export { array, color, date, document, file, image, misc, object, regexp, string, time };
13
+ export { array, color, date, document, file, icons, image, misc, object, regexp, string, time };
@@ -0,0 +1 @@
1
+ export declare const list: string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jamespot-react-components",
3
- "version": "1.0.219",
3
+ "version": "1.0.221",
4
4
  "description": "",
5
5
  "main": "./build/jamespot-react-components.js",
6
6
  "types": "./build/src/index.d.ts",
@@ -80,7 +80,7 @@
80
80
  "chroma-js": "^2.1.1",
81
81
  "classnames": "^2.3.1",
82
82
  "dompurify": "^3.0.5",
83
- "jamespot-user-api": "^1.0.200",
83
+ "jamespot-user-api": "^1.0.202",
84
84
  "moment": "2.29.4",
85
85
  "react": "^17.x",
86
86
  "react-beautiful-dnd": "^13.1.1",