@axa-fr/design-system-apollo-react 1.0.5-alpha.314 → 1.0.5-alpha.319
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/dist/Grid/DebugGridApollo.d.ts +4 -5
- package/dist/Grid/DebugGridApollo.js +3 -14
- package/dist/Grid/DebugGridCommon.d.ts +7 -2
- package/dist/Grid/DebugGridCommon.js +14 -3
- package/dist/Grid/DebugGridLF.d.ts +4 -5
- package/dist/Grid/DebugGridLF.js +3 -14
- package/dist/Stepper/StepperCommon.d.ts +3 -2
- package/dist/Stepper/StepperCommon.js +4 -3
- package/package.json +3 -3
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import "
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
import { type DebugGridCommonProps } from "./DebugGridCommon";
|
|
2
|
+
type DebugGridProps<P = object> = Omit<DebugGridCommonProps<P>, "CardCheckbox">;
|
|
3
|
+
export declare const DebugGrid: <P = object>({ ...props }: DebugGridProps<P>) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export {};
|
|
@@ -1,17 +1,6 @@
|
|
|
1
|
-
import { jsx as _jsx
|
|
2
|
-
import "@axa-fr/design-system-apollo-css/dist/Grid/DebugGrid.scss";
|
|
3
|
-
import { useState } from "react";
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
2
|
import { CardCheckbox } from "../Form/Checkbox/CardCheckbox/CardCheckboxApollo";
|
|
5
3
|
import { DebugGridCommon } from "./DebugGridCommon";
|
|
6
|
-
export const DebugGrid = ({
|
|
7
|
-
|
|
8
|
-
const handleChecked = () => setChecked(!checked);
|
|
9
|
-
return (_jsxs(_Fragment, { children: [_jsx(CardCheckbox, { type: "horizontal", options: [
|
|
10
|
-
{
|
|
11
|
-
name: "debuggrid",
|
|
12
|
-
label: "Grid",
|
|
13
|
-
checked,
|
|
14
|
-
onClick: handleChecked,
|
|
15
|
-
},
|
|
16
|
-
] }), _jsx(DebugGridCommon, { cols: cols })] }));
|
|
4
|
+
export const DebugGrid = ({ ...props }) => {
|
|
5
|
+
return (_jsx(DebugGridCommon, { ...props, CardCheckbox: CardCheckbox }));
|
|
17
6
|
};
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import "@axa-fr/design-system-apollo-css/dist/Grid/DebugGrid.scss";
|
|
2
|
-
|
|
2
|
+
import type { ComponentProps, ComponentType } from "react";
|
|
3
|
+
import type { CardCheckboxCommon } from "../Form/Checkbox/CardCheckbox/CardCheckboxCommon";
|
|
4
|
+
export type DebugGridCommonProps<P = object> = P & {
|
|
3
5
|
cols?: number;
|
|
4
|
-
|
|
6
|
+
isCheckedByDefault?: boolean;
|
|
7
|
+
CardCheckbox: ComponentType<Partial<ComponentProps<typeof CardCheckboxCommon>>>;
|
|
8
|
+
};
|
|
9
|
+
export declare const DebugGridCommon: <P = object>({ cols, isCheckedByDefault, CardCheckbox, ...props }: DebugGridCommonProps<P>) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,5 +1,16 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import "@axa-fr/design-system-apollo-css/dist/Grid/DebugGrid.scss";
|
|
3
|
-
export const DebugGridCommon = ({ cols = 12 }) => {
|
|
4
|
-
|
|
3
|
+
export const DebugGridCommon = ({ cols = 12, isCheckedByDefault = false, CardCheckbox, ...props }) => {
|
|
4
|
+
// The forceVisible prop is a hidden prop to force the component's visibility when building the storybook
|
|
5
|
+
const forceVisible = props?.forceVisible || false;
|
|
6
|
+
if (process.env.NODE_ENV === "production" && !forceVisible) {
|
|
7
|
+
return null;
|
|
8
|
+
}
|
|
9
|
+
return (_jsxs(_Fragment, { children: [_jsx(CardCheckbox, { type: "horizontal", options: [
|
|
10
|
+
{
|
|
11
|
+
name: "debuggrid",
|
|
12
|
+
label: "Grid",
|
|
13
|
+
defaultChecked: isCheckedByDefault,
|
|
14
|
+
},
|
|
15
|
+
] }), _jsx("div", { className: "debug-grid", role: "presentation", children: _jsx("div", { className: "grid", children: [...Array(cols).keys()].map((col) => (_jsx("div", { className: "cols" }, col))) }) })] }));
|
|
5
16
|
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import "
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
import { type DebugGridCommonProps } from "./DebugGridCommon";
|
|
2
|
+
type DebugGridProps<P = object> = Omit<DebugGridCommonProps<P>, "CardCheckbox">;
|
|
3
|
+
export declare const DebugGrid: <P = object>({ ...props }: DebugGridProps<P>) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export {};
|
package/dist/Grid/DebugGridLF.js
CHANGED
|
@@ -1,17 +1,6 @@
|
|
|
1
|
-
import { jsx as _jsx
|
|
2
|
-
import "@axa-fr/design-system-apollo-css/dist/Grid/DebugGrid.scss";
|
|
3
|
-
import { useState } from "react";
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
2
|
import { CardCheckbox } from "../Form/Checkbox/CardCheckbox/CardCheckboxLF";
|
|
5
3
|
import { DebugGridCommon } from "./DebugGridCommon";
|
|
6
|
-
export const DebugGrid = ({
|
|
7
|
-
|
|
8
|
-
const handleChecked = () => setChecked(!checked);
|
|
9
|
-
return (_jsxs(_Fragment, { children: [_jsx(CardCheckbox, { type: "horizontal", options: [
|
|
10
|
-
{
|
|
11
|
-
name: "debuggrid",
|
|
12
|
-
label: "Grid",
|
|
13
|
-
checked,
|
|
14
|
-
onClick: handleChecked,
|
|
15
|
-
},
|
|
16
|
-
] }), _jsx(DebugGridCommon, { cols: cols })] }));
|
|
4
|
+
export const DebugGrid = ({ ...props }) => {
|
|
5
|
+
return (_jsx(DebugGridCommon, { ...props, CardCheckbox: CardCheckbox }));
|
|
17
6
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ComponentType, HTMLAttributes } from "react";
|
|
1
|
+
import { ComponentType, type HTMLAttributes } from "react";
|
|
2
2
|
import { ProgressBarGroupProps } from "../ProgressBarGroup/ProgressBarGroupCommon";
|
|
3
3
|
export type StepperProps = {
|
|
4
4
|
currentStepProgress?: number;
|
|
@@ -8,6 +8,7 @@ export type StepperProps = {
|
|
|
8
8
|
nbSteps?: 3 | 4 | 5 | 6 | 7 | 8;
|
|
9
9
|
helper?: string;
|
|
10
10
|
message?: string;
|
|
11
|
+
titleLevel?: 1 | 2 | 3;
|
|
11
12
|
ProgressBarGroupComponent: ComponentType<Omit<ProgressBarGroupProps, "ProgressBarComponent">>;
|
|
12
13
|
} & Omit<HTMLAttributes<HTMLDivElement>, "role">;
|
|
13
|
-
export declare const Stepper: ({ currentStepProgress, currentTitle, nbSteps, currentStep, currentSubtitle, className, ProgressBarGroupComponent, helper, message, ...props }: StepperProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare const Stepper: ({ currentStepProgress, currentTitle, nbSteps, currentStep, currentSubtitle, className, ProgressBarGroupComponent, helper, message, titleLevel, ...props }: StepperProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useId } from "react";
|
|
2
|
+
import { useId, } from "react";
|
|
3
3
|
import { ItemMessage } from "../Form/ItemMessage/ItemMessageCommon";
|
|
4
|
-
export const Stepper = ({ currentStepProgress, currentTitle, nbSteps, currentStep, currentSubtitle, className, ProgressBarGroupComponent, helper, message, ...props }) => {
|
|
4
|
+
export const Stepper = ({ currentStepProgress, currentTitle, nbSteps, currentStep, currentSubtitle, className, ProgressBarGroupComponent, helper, message, titleLevel = 2, ...props }) => {
|
|
5
5
|
const stepperId = useId();
|
|
6
|
-
|
|
6
|
+
const Title = `h${titleLevel}`;
|
|
7
|
+
return (_jsxs("div", { className: "af-stepper", ...props, children: [_jsxs("div", { className: "af-stepper__header", children: [_jsx(Title, { className: "af-stepper__title", "aria-describedby": stepperId, children: currentTitle }), Boolean(currentSubtitle) && (_jsx("p", { className: "af-stepper__subtitle", children: currentSubtitle }))] }), _jsx(ProgressBarGroupComponent, { label: currentTitle, className: className, currentStep: currentStep, nbSteps: nbSteps, currentStepProgress: currentStepProgress }), Boolean(helper) && _jsx("span", { className: "af-stepper__helper", children: helper }), _jsx(ItemMessage, { message: message, messageType: "success" })] }));
|
|
7
8
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@axa-fr/design-system-apollo-react",
|
|
3
|
-
"version": "1.0.5-alpha.
|
|
3
|
+
"version": "1.0.5-alpha.319",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
},
|
|
47
47
|
"homepage": "https://github.com/AxaFrance/design-system#readme",
|
|
48
48
|
"peerDependencies": {
|
|
49
|
-
"@axa-fr/design-system-apollo-css": "1.0.5-alpha.
|
|
50
|
-
"@axa-fr/design-system-look-and-feel-css": "1.0.5-alpha.
|
|
49
|
+
"@axa-fr/design-system-apollo-css": "1.0.5-alpha.319",
|
|
50
|
+
"@axa-fr/design-system-look-and-feel-css": "1.0.5-alpha.319",
|
|
51
51
|
"@material-symbols/svg-400": ">= 0.19.0",
|
|
52
52
|
"react": ">= 18"
|
|
53
53
|
},
|