@rsuci/shared-form-components 1.0.36 → 1.0.37
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.
|
@@ -13,6 +13,7 @@ export interface FormProgressProps {
|
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
15
|
* Barre de progression indiquant l'avancement dans le formulaire
|
|
16
|
+
* Présentation avec dégradé et layout amélioré
|
|
16
17
|
*/
|
|
17
18
|
export declare const FormProgress: React.FC<FormProgressProps>;
|
|
18
19
|
export default FormProgress;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormProgress.d.ts","sourceRoot":"","sources":["../../../src/components/form-renderer/FormProgress.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,WAAW,iBAAiB;IAChC,sCAAsC;IACtC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,8BAA8B;IAC9B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,iCAAiC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED
|
|
1
|
+
{"version":3,"file":"FormProgress.d.ts","sourceRoot":"","sources":["../../../src/components/form-renderer/FormProgress.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,WAAW,iBAAiB;IAChC,sCAAsC;IACtC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,8BAA8B;IAC9B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,iCAAiC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAyDpD,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -7,6 +7,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
7
7
|
import { useFormRendererContext } from './FormRendererContext';
|
|
8
8
|
/**
|
|
9
9
|
* Barre de progression indiquant l'avancement dans le formulaire
|
|
10
|
+
* Présentation avec dégradé et layout amélioré
|
|
10
11
|
*/
|
|
11
12
|
export const FormProgress = ({ showLabels = false, showPercentage = true, className = '' }) => {
|
|
12
13
|
const { navigation, groupesWithInstances, formulaire } = useFormRendererContext();
|
|
@@ -17,10 +18,9 @@ export const FormProgress = ({ showLabels = false, showPercentage = true, classN
|
|
|
17
18
|
if (totalGroupes === 0) {
|
|
18
19
|
return null;
|
|
19
20
|
}
|
|
20
|
-
return (_jsxs("div", { className: `w-full ${className}`, children: [_jsxs("div", { className: "
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
: 'bg-white border-gray-300'}` }), showLabels && (_jsx("span", { className: "text-xs mt-1 truncate max-w-full text-center", children: groupe.designation }))] }, groupe.code))) })] }), _jsxs("div", { className: "flex justify-between items-center mt-2 text-sm text-gray-600", children: [_jsxs("span", { children: ["Groupe ", currentIndex + 1, " sur ", totalGroupes] }), showPercentage && (_jsxs("span", { className: "font-medium text-blue-600", children: [progressPercent, "%"] }))] })] }));
|
|
21
|
+
return (_jsxs("div", { className: `w-full ${className}`, children: [_jsxs("div", { className: "flex justify-between items-center mb-2", children: [_jsx("span", { className: "text-sm font-medium text-gray-700", children: "Progression du formulaire" }), _jsxs("span", { className: "text-sm text-gray-600", children: ["Section ", currentIndex + 1, "/", totalGroupes] })] }), _jsx("div", { className: "relative", children: _jsx("div", { className: "w-full bg-gray-200 rounded-full h-3 overflow-hidden", children: _jsx("div", { className: "h-full rounded-full transition-all duration-300 ease-out", style: {
|
|
22
|
+
width: `${progressPercent}%`,
|
|
23
|
+
background: 'linear-gradient(90deg, #3B82F6 0%, #10B981 50%, #F59E0B 100%)'
|
|
24
|
+
} }) }) }), showPercentage && (_jsx("div", { className: "flex justify-end mt-1", children: _jsxs("span", { className: "text-sm text-gray-600", children: [progressPercent, "% compl\u00E9t\u00E9"] }) }))] }));
|
|
25
25
|
};
|
|
26
26
|
export default FormProgress;
|
package/package.json
CHANGED