jamespot-react-components 1.2.43 → 1.2.44
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/build/jamespot-react-components.js +933 -881
- package/build/jamespot-react-components.js.map +1 -1
- package/build/src/components/Common/Article/ArticleCard.d.ts +8 -0
- package/build/src/components/JRCAudience/JRCAudience.d.ts +9 -0
- package/build/src/components/JRCAudience/JRCAudienceAvatar.d.ts +8 -0
- package/build/src/components/JRCAvatar/JRCAvatar.d.ts +1 -0
- package/build/src/components/JRCButton/Button.d.ts +2 -1
- package/build/src/components/JRCButton/JRCButton.d.ts +2 -1
- package/build/src/components/JRCButton/types.d.ts +4 -2
- package/build/src/components/JRCButtonDropdown/JRCButtonDropdown.styles.d.ts +2 -1
- package/build/src/components/JRCCalendar/CalendarStyle.d.ts +4 -3
- package/build/src/components/JRCCalendar/JRCCalendar.d.ts +5 -33
- package/build/src/components/JRCCalendar/JRCCalendarEvent.d.ts +3 -2
- package/build/src/components/JRCCalendar/types.d.ts +23 -14
- package/build/src/components/JRCEmptySpace/JRCEmptySpace.d.ts +1 -1
- package/build/src/components/JRCHref/JRCHref.d.ts +4 -2
- package/build/src/components/index.d.ts +2 -0
- package/build/src/index.d.ts +1 -0
- package/build/src/styles/theme.d.ts +2 -2
- package/build/src/types.d.ts +1 -1
- package/build/src/utils/utils.color.d.ts +1 -1
- package/package.json +5 -5
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jArticleList } from 'jamespot-user-api';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
export declare const ArticleCard: ({ article, icon, color, audience, }: {
|
|
4
|
+
article: jArticleList;
|
|
5
|
+
icon: string;
|
|
6
|
+
color: string;
|
|
7
|
+
audience?: ReactNode;
|
|
8
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jObjectLittle } from 'jamespot-user-api';
|
|
2
|
+
export type JRCAudienceProps = {
|
|
3
|
+
list: jObjectLittle[];
|
|
4
|
+
limit?: number;
|
|
5
|
+
size?: number;
|
|
6
|
+
filter?: string[];
|
|
7
|
+
hideDescription?: boolean;
|
|
8
|
+
};
|
|
9
|
+
export declare const JRCAudience: ({ list, limit, size, filter, hideDescription }: JRCAudienceProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
type JRCAudienceAvatarProps = {
|
|
2
|
+
mainType: string;
|
|
3
|
+
uri: string;
|
|
4
|
+
size: number;
|
|
5
|
+
timestamp?: number;
|
|
6
|
+
};
|
|
7
|
+
export declare const JRCAudienceAvatar: ({ mainType, uri, size, timestamp }: JRCAudienceAvatarProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -17,7 +17,8 @@ export declare const Button: import("react").ForwardRefExoticComponent<Omit<impo
|
|
|
17
17
|
hasLicense?: boolean;
|
|
18
18
|
label?: string;
|
|
19
19
|
noMargin?: boolean;
|
|
20
|
-
size?: "
|
|
20
|
+
size?: import("./types").ButtonSizes;
|
|
21
21
|
srOnly?: string;
|
|
22
22
|
borderRadius?: "right";
|
|
23
|
+
borderRadiusMode?: "default" | "max";
|
|
23
24
|
} & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -18,9 +18,10 @@ export declare const JRCButton: import("react").ForwardRefExoticComponent<Omit<i
|
|
|
18
18
|
hasLicense?: boolean;
|
|
19
19
|
label?: string;
|
|
20
20
|
noMargin?: boolean;
|
|
21
|
-
size?: "
|
|
21
|
+
size?: import("./types").ButtonSizes;
|
|
22
22
|
srOnly?: string;
|
|
23
23
|
borderRadius?: "right";
|
|
24
|
+
borderRadiusMode?: "default" | "max";
|
|
24
25
|
} & {
|
|
25
26
|
/** tooltip tooltip props */
|
|
26
27
|
tooltip?: Omit<JRCTooltipProps, "children">;
|
|
@@ -17,7 +17,8 @@ export type ButtonType = {
|
|
|
17
17
|
'text-decoration'?: 'underline' | 'none';
|
|
18
18
|
};
|
|
19
19
|
};
|
|
20
|
-
export type ButtonColors = 'primary' | 'valid' | 'danger' | 'secondary' | 'cancel' | 'neutral' | 'white';
|
|
20
|
+
export type ButtonColors = 'primary' | 'primaryLight' | 'valid' | 'validLight' | 'danger' | 'dangerLight' | 'secondary' | 'cancel' | 'neutral' | 'white';
|
|
21
|
+
export type ButtonSizes = 'm' | 's';
|
|
21
22
|
export type ButtonProps = ComponentPropsWithoutRef<'button'> & DataCy & {
|
|
22
23
|
/** Color of the background of the button */
|
|
23
24
|
color?: ButtonColors;
|
|
@@ -44,9 +45,10 @@ export type ButtonProps = ComponentPropsWithoutRef<'button'> & DataCy & {
|
|
|
44
45
|
label?: string;
|
|
45
46
|
/** Disable margins **/
|
|
46
47
|
noMargin?: boolean;
|
|
47
|
-
size?:
|
|
48
|
+
size?: ButtonSizes;
|
|
48
49
|
srOnly?: string;
|
|
49
50
|
borderRadius?: 'right';
|
|
51
|
+
borderRadiusMode?: 'default' | 'max';
|
|
50
52
|
};
|
|
51
53
|
export type StyledButtonProps = {
|
|
52
54
|
$themeButton: ButtonType;
|
|
@@ -14,9 +14,10 @@ export declare const MarginLessJRCButton: import("styled-components").StyledComp
|
|
|
14
14
|
hasLicense?: boolean;
|
|
15
15
|
label?: string;
|
|
16
16
|
noMargin?: boolean;
|
|
17
|
-
size?: "
|
|
17
|
+
size?: import("../JRCButton/types").ButtonSizes;
|
|
18
18
|
srOnly?: string;
|
|
19
19
|
borderRadius?: "right";
|
|
20
|
+
borderRadiusMode?: "default" | "max";
|
|
20
21
|
} & {
|
|
21
22
|
tooltip?: Omit<import("../..").JRCTooltipProps, "children">;
|
|
22
23
|
} & import("react").RefAttributes<HTMLButtonElement>>, import("styled-components").DefaultTheme, ButtonProps & {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export declare const CalendarStyle: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
fullScreen?: boolean;
|
|
2
|
+
$fluid?: boolean;
|
|
3
|
+
$loading?: boolean;
|
|
4
|
+
$fullScreen?: boolean;
|
|
5
|
+
$view: "list" | "grid";
|
|
5
6
|
}, never>;
|
|
@@ -1,34 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
events?: CalendarEventWithExtensions<CalendarEventViewAbstractType, ['socialEventRecord']>[];
|
|
6
|
-
loading?: boolean;
|
|
7
|
-
onChangeDates?: (start: Date, end: Date) => void;
|
|
8
|
-
onError: (errorMsg?: string) => void;
|
|
9
|
-
onSuccess: (message: string) => void;
|
|
10
|
-
handler: {
|
|
11
|
-
global: Pick<JGlobalApi, 'updateAction' | 'removeAction'>;
|
|
12
|
-
calendar: Pick<JCalendarApi, 'reviveSubmit'>;
|
|
13
|
-
article: Pick<JArticleApi, 'delete'>;
|
|
14
|
-
};
|
|
15
|
-
defaultView: CalendarView;
|
|
16
|
-
eventModalExtraComponent?: (event: CalendarEventWithExtensions<CalendarEventViewAbstractType, ['socialEventRecord']>) => ReactNode;
|
|
17
|
-
onChangeView?: (view: {
|
|
18
|
-
label: string;
|
|
19
|
-
value: CalendarView;
|
|
20
|
-
}) => void;
|
|
21
|
-
fullScreen?: boolean;
|
|
22
|
-
deportedToolbar?: {
|
|
23
|
-
onChangeLabel?: (label: string) => void;
|
|
24
|
-
onCalendarApiInit?: (api?: CalendarApi) => void;
|
|
25
|
-
view?: {
|
|
26
|
-
label: string;
|
|
27
|
-
value: CalendarView;
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
|
-
onDeleteEvent: () => void;
|
|
31
|
-
onClickUpdateEvent?: (event: CalendarEventWithExtensions<CalendarEventViewAbstractType, ['socialEventRecord']>) => void;
|
|
1
|
+
import { CalendarView, JRCCalendarProps } from './types';
|
|
2
|
+
export type CalendarOption = {
|
|
3
|
+
label: string;
|
|
4
|
+
value: CalendarView;
|
|
32
5
|
};
|
|
33
|
-
export
|
|
34
|
-
export declare const JRCCalendar: ({ events, loading, onChangeDates, onError, handler, onSuccess, defaultView, eventModalExtraComponent, onChangeView, fullScreen, deportedToolbar, onDeleteEvent, onClickUpdateEvent, }: JRCCalendarProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare const JRCCalendar: ({ events, loading, views, handler, defaultView, fluid, mode, fullScreen, deportedToolbar, withPadding, eventModalExtraComponent, onChangeView, onChangeDates, onError, onSuccess, onDeleteEvent, onClickUpdateEvent, }: JRCCalendarProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -6,6 +6,7 @@ export type JRCCalendarEventProps = {
|
|
|
6
6
|
start: Date | null;
|
|
7
7
|
end: Date | null;
|
|
8
8
|
status: UserResponseStatus | null;
|
|
9
|
+
mode: JRCCalendarMode;
|
|
9
10
|
display: CalendarView;
|
|
10
11
|
onClick: (id: number) => void;
|
|
11
12
|
audience: Pick<Audience, '_url' | 'title' | 'uri'>[];
|
|
@@ -29,5 +30,5 @@ export type JRCCalendarEventProps = {
|
|
|
29
30
|
subscriptionModifiers: SubscriptionModifiers;
|
|
30
31
|
urlGestion?: string;
|
|
31
32
|
};
|
|
32
|
-
import { CalendarView } from './types';
|
|
33
|
-
export declare const JRCCalendarEvent: ({ status, title, start, end, display, id: stringId, onClick, audience, allDay, textColor, backgroundColor, address, image, type, isVisio, handler, onError, onSuccess, noGestion, setSubscriptionModifiers, uri, canSubscribe, subscriptionModifiers, urlGestion, }: JRCCalendarEventProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
33
|
+
import { CalendarView, JRCCalendarMode } from './types';
|
|
34
|
+
export declare const JRCCalendarEvent: ({ status, title, start, end, display, mode, id: stringId, onClick, audience, allDay, textColor, backgroundColor, address, image, type, isVisio, handler, onError, onSuccess, noGestion, setSubscriptionModifiers, uri, canSubscribe, subscriptionModifiers, urlGestion, }: JRCCalendarEventProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -3,23 +3,22 @@ import { Audience, CalendarEventViewAbstractType, CalendarEventWithExtensions, J
|
|
|
3
3
|
import { ReactNode } from 'react';
|
|
4
4
|
import { SubscriptionModifiers } from './JRCEventStatusButton';
|
|
5
5
|
export type CalendarView = 'dayGridMonth' | 'timeGridWeek' | 'timeGridDay' | 'list';
|
|
6
|
+
export type CalendarEvent = CalendarEventWithExtensions<CalendarEventViewAbstractType, ['socialEventRecord']>;
|
|
7
|
+
export type CalendarHandler = {
|
|
8
|
+
global: Pick<JGlobalApi, 'updateAction' | 'removeAction'>;
|
|
9
|
+
calendar: Pick<JCalendarApi, 'reviveSubmit'>;
|
|
10
|
+
article: Pick<JArticleApi, 'delete'>;
|
|
11
|
+
};
|
|
12
|
+
export type JRCCalendarMode = 'full' | 'compact';
|
|
6
13
|
export type JRCCalendarProps = {
|
|
7
|
-
events?:
|
|
14
|
+
events?: CalendarEvent[];
|
|
8
15
|
loading?: boolean;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
handler: {
|
|
13
|
-
global: Pick<JGlobalApi, 'updateAction' | 'removeAction'>;
|
|
14
|
-
calendar: Pick<JCalendarApi, 'reviveSubmit'>;
|
|
15
|
-
article: Pick<JArticleApi, 'delete'>;
|
|
16
|
-
};
|
|
16
|
+
views?: CalendarView[];
|
|
17
|
+
withPadding?: boolean;
|
|
18
|
+
handler: CalendarHandler;
|
|
17
19
|
defaultView: CalendarView;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
label: string;
|
|
21
|
-
value: CalendarView;
|
|
22
|
-
}) => void;
|
|
20
|
+
fluid?: boolean;
|
|
21
|
+
mode?: JRCCalendarMode;
|
|
23
22
|
fullScreen?: boolean;
|
|
24
23
|
deportedToolbar?: {
|
|
25
24
|
onChangeLabel?: (label: string) => void;
|
|
@@ -29,6 +28,16 @@ export type JRCCalendarProps = {
|
|
|
29
28
|
value: CalendarView;
|
|
30
29
|
};
|
|
31
30
|
};
|
|
31
|
+
eventModalExtraComponent?: (event: CalendarEvent) => ReactNode;
|
|
32
|
+
onChangeDates?: (start: Date, end: Date) => void;
|
|
33
|
+
onError: (errorMsg?: string) => void;
|
|
34
|
+
onSuccess: (message: string) => void;
|
|
35
|
+
onChangeView?: (view: {
|
|
36
|
+
label: string;
|
|
37
|
+
value: CalendarView;
|
|
38
|
+
}) => void;
|
|
39
|
+
onDeleteEvent: () => void;
|
|
40
|
+
onClickUpdateEvent?: (event: CalendarEvent) => void;
|
|
32
41
|
};
|
|
33
42
|
export type JRCCalendarEventProps = {
|
|
34
43
|
id: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { DataCy } from '../../types/dataAttributes';
|
|
2
|
-
import { ButtonColors } from '../JRCButton/types';
|
|
3
1
|
import { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
+
import { DataCy } from '../../types/dataAttributes';
|
|
3
|
+
import { ButtonColors, ButtonSizes, ButtonType } from '../JRCButton/types';
|
|
4
4
|
/**
|
|
5
5
|
* Props type for JRCLinkToArticle and JRCLinkToUser
|
|
6
6
|
* @member idObject number : id of the record
|
|
@@ -25,6 +25,8 @@ type ButtonProps = {
|
|
|
25
25
|
noMargin?: boolean;
|
|
26
26
|
hasLabel?: boolean;
|
|
27
27
|
as: 'button';
|
|
28
|
+
size?: ButtonSizes;
|
|
29
|
+
themeCustom?: ButtonType;
|
|
28
30
|
};
|
|
29
31
|
/**
|
|
30
32
|
* Props type for JRCStyledHref
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export { BETA_JRCDoubleClick } from './Beta/BETA_JRCDoubleClick/BETA_JRCDoubleClick';
|
|
2
2
|
export { BETA_JRCDragAndDrop } from './Beta/BETA_JRCDragAndDrop/BETA_JRCDragAndDrop';
|
|
3
|
+
export { ArticleCard } from './Common/Article/ArticleCard';
|
|
4
|
+
export { JRCAudience } from './JRCAudience/JRCAudience';
|
|
3
5
|
export { JRCConditionalWrapper } from './Common/JRCConditionalWrapper';
|
|
4
6
|
export { JRCDraggingPlaceholder } from './Common/JRCDraggingPlaceholder';
|
|
5
7
|
export { SkipToContent } from './Common/SkipToContent';
|
package/build/src/index.d.ts
CHANGED
|
@@ -38,4 +38,5 @@ export { useTimeout } from './hooks/UseTimeout';
|
|
|
38
38
|
export { useWindowSize } from './hooks/useWindowSize';
|
|
39
39
|
export * from './types';
|
|
40
40
|
export { modifyColorBrightness } from './styles/utils';
|
|
41
|
+
export { getColor } from './styles/theme';
|
|
41
42
|
export { Utils } from './utils';
|
|
@@ -19,11 +19,11 @@ export type ThemeConfigOptions = {
|
|
|
19
19
|
bgColorNotLogged: string;
|
|
20
20
|
forest: string;
|
|
21
21
|
};
|
|
22
|
-
export type Colors = 'primary' | 'secondary' | 'headerColor' | 'headerTextColor' | 'headerUserBackground' | 'headerUserTextColor' | 'headerSearchBarTextColor' | 'headerSearchBarBackgroundColor' | 'navBackground' | 'navTextColor' | 'lavender' | 'orange' | 'yellow' | 'green' | 'navy' | 'overseas' | 'night1' | 'night2' | 'sandLight' | 'raspberry' | 'sky' | 'sky15' | 'sand' | 'forest' | 'grey0' | 'grey1' | 'grey2' | 'grey3' | 'grey4' | 'grey5' | 'grey6' | 'black' | 'black10' | 'black15' | 'black20' | 'white' | 'transparent';
|
|
22
|
+
export type Colors = 'primary' | 'primaryLight' | 'primaryTextLight' | 'secondary' | 'headerColor' | 'headerTextColor' | 'headerUserBackground' | 'headerUserTextColor' | 'headerSearchBarTextColor' | 'headerSearchBarBackgroundColor' | 'navBackground' | 'navTextColor' | 'lavender' | 'orange' | 'orangeLight' | 'orangeTextLight' | 'yellow' | 'green' | 'greenLight' | 'greenTextLight' | 'navy' | 'overseas' | 'night1' | 'night2' | 'sandLight' | 'raspberry' | 'sky' | 'sky15' | 'sand' | 'forest' | 'grey0' | 'grey1' | 'grey2' | 'grey3' | 'grey4' | 'grey5' | 'grey6' | 'black' | 'black10' | 'black15' | 'black20' | 'white' | 'transparent';
|
|
23
23
|
type ThemeConfigColorType = {
|
|
24
24
|
[color in Colors]: string;
|
|
25
25
|
};
|
|
26
|
-
export type Shades = 'primaryL15' | 'primaryL80' | 'primaryL90' | 'primaryD20' | 'secondaryL15' | 'secondaryL80' | 'secondaryL90' | 'secondaryD20' | 'greenL20' | 'greenL80' | 'greenL90' | 'greenD20' | 'raspberryL95' | 'orangeL15' | 'orangeL80' | 'orangeL90' | 'orangeD20' | 'yellowL80' | 'yellowL90';
|
|
26
|
+
export type Shades = 'primaryL15' | 'primaryL80' | 'primaryL90' | 'primaryD20' | 'primaryLight' | 'primaryLightHover' | 'secondaryL15' | 'secondaryL80' | 'secondaryL90' | 'secondaryD20' | 'greenL20' | 'greenL80' | 'greenL90' | 'greenD20' | 'greenLight' | 'greenLightHover' | 'raspberryL95' | 'orangeL15' | 'orangeL80' | 'orangeL90' | 'orangeD20' | 'orangeLight' | 'orangeLightHover' | 'yellowL80' | 'yellowL90';
|
|
27
27
|
type ThemeConfigShadeType = {
|
|
28
28
|
[color in Shades]: string;
|
|
29
29
|
};
|
package/build/src/types.d.ts
CHANGED
|
@@ -47,7 +47,7 @@ export type { JRCValidationButtonProps } from './components/JRCButton/JRCValidat
|
|
|
47
47
|
export type { JRCButtonDownloadProps } from './components/JRCButtonDownload/JRCButtonDownload';
|
|
48
48
|
export type { JRCButtonDropdownOptionProps, JRCButtonDropdownProps, } from './components/JRCButtonDropdown/JRCButtonDropdown.types';
|
|
49
49
|
export type { JRCButtonFileProps } from './components/JRCButtonFile/JRCButtonFile';
|
|
50
|
-
export type { CalendarView } from './components/JRCCalendar/types';
|
|
50
|
+
export type { CalendarView, CalendarEvent, JRCCalendarProps } from './components/JRCCalendar/types';
|
|
51
51
|
export type { JRCCardProps } from './components/JRCCard/JRCCard';
|
|
52
52
|
export type { JRCCardImgProps } from './components/JRCCard/JRCCardImg';
|
|
53
53
|
export type { JRCColumnCenterProps } from './components/JRCColumnCenter/JRCColumnCenter';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jamespot-react-components",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.44",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./build/jamespot-react-components.js",
|
|
6
6
|
"types": "./build/src/index.d.ts",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"html-webpack-plugin": "^5.6.4",
|
|
69
69
|
"husky": "^7.0.4",
|
|
70
70
|
"identity-obj-proxy": "^3.0.0",
|
|
71
|
-
"jamespot-user-api": "^1.2.
|
|
71
|
+
"jamespot-user-api": "^1.2.44",
|
|
72
72
|
"jest": "^30.1.2",
|
|
73
73
|
"jest-environment-jsdom": "^30.1.2",
|
|
74
74
|
"jest-styled-components": "^7.2.0",
|
|
@@ -118,11 +118,11 @@
|
|
|
118
118
|
},
|
|
119
119
|
"lint-staged": {
|
|
120
120
|
"*.{js,jsx,ts,tsx}": [
|
|
121
|
-
"
|
|
122
|
-
"
|
|
121
|
+
"eslint --ext .ts,.tsx --fix",
|
|
122
|
+
"prettier --write"
|
|
123
123
|
],
|
|
124
124
|
"*.{json,md}": [
|
|
125
|
-
"
|
|
125
|
+
"prettier --write"
|
|
126
126
|
]
|
|
127
127
|
},
|
|
128
128
|
"engines": {
|