@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;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CA8EpD,CAAC;AAEF,eAAe,YAAY,CAAC"}
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: "relative", children: [_jsx("div", { className: "w-full bg-gray-200 rounded-full h-2.5", children: _jsx("div", { className: "bg-blue-600 h-2.5 rounded-full transition-all duration-300 ease-out", style: { width: `${progressPercent}%` } }) }), _jsx("div", { className: "flex justify-between mt-1", children: groupes.map((groupe, index) => (_jsxs("div", { className: `flex flex-col items-center ${index <= currentIndex ? 'text-blue-600' : 'text-gray-400'}`, style: { width: `${100 / totalGroupes}%` }, children: [_jsx("div", { className: `w-3 h-3 rounded-full -mt-3 border-2 ${index < currentIndex
21
- ? 'bg-blue-600 border-blue-600'
22
- : index === currentIndex
23
- ? 'bg-white border-blue-600'
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rsuci/shared-form-components",
3
- "version": "1.0.36",
3
+ "version": "1.0.37",
4
4
  "description": "Composants partagés de rendu de formulaires RSU v2 - Package local pour frontend Admin et Public",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",