@inseefr/lunatic 3.2.0 → 3.2.1

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.
@@ -3,7 +3,7 @@ import type { PropsWithChildren } from 'react';
3
3
  /**
4
4
  * Surround a question giving additional context with label / description / declarations
5
5
  */
6
- export declare const Question: ({ components, ...props }: LunaticComponentProps<'Question'>) => import("react/jsx-runtime").JSX.Element;
7
- type CustomProps = PropsWithChildren<Omit<LunaticComponentProps<'Question'>, 'components'>>;
6
+ export declare const Question: (props: LunaticComponentProps<'Question'>) => import("react/jsx-runtime").JSX.Element;
7
+ type CustomProps = PropsWithChildren<LunaticComponentProps<'Question'>>;
8
8
  export declare const CustomQuestion: import("react").ComponentType<CustomProps>;
9
9
  export {};
@@ -5,8 +5,8 @@ import { Declarations } from '../shared/Declarations/Declarations';
5
5
  /**
6
6
  * Surround a question giving additional context with label / description / declarations
7
7
  */
8
- export const Question = ({ components, ...props }) => {
9
- const { errors, disabled, readOnly } = props;
8
+ export const Question = (props) => {
9
+ const { errors, disabled, readOnly, components } = props;
10
10
  return (_jsx(CustomQuestion, { ...props, children: _jsx(LunaticComponents, { components: components, componentProps: () => ({
11
11
  errors,
12
12
  disabled,
@@ -1 +1 @@
1
- {"version":3,"file":"Question.js","sourceRoot":"","sources":["../../../src/components/Question/Question.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AAGnE;;GAEG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,EACxB,UAAU,EACV,GAAG,KAAK,EAC2B,EAAE,EAAE;IACvC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAC7C,OAAO,CACN,KAAC,cAAc,OAAK,KAAK,YACxB,KAAC,iBAAiB,IACjB,UAAU,EAAE,UAAU,EACtB,cAAc,EAAE,GAAG,EAAE,CAAC,CAAC;gBACtB,MAAM;gBACN,QAAQ;gBACR,QAAQ;aACR,CAAC,GACD,GACc,CACjB,CAAC;AACH,CAAC,CAAC;AAMF,MAAM,CAAC,MAAM,cAAc,GAAG,kBAAkB,CAC/C,UAAU,EACV,CAAC,KAAK,EAAE,EAAE;IACT,MAAM,EAAE,EAAE,EAAE,WAAW,EAAE,YAAY,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IACjE,OAAO,CACN,+BACC,kBAAQ,EAAE,EAAE,mBAAmB,EAAE,EAAE,aAClC,uBAAK,KAAK,GAAM,EAChB,YAAG,SAAS,EAAC,qBAAqB,EAAC,EAAE,EAAE,wBAAwB,EAAE,EAAE,YACjE,WAAW,GACT,IACI,EACT,KAAC,YAAY,IACZ,IAAI,EAAC,qBAAqB,EAC1B,YAAY,EAAE,YAAY,EAC1B,EAAE,EAAE,EAAE,GACL,EACD,QAAQ,IACC,CACX,CAAC;AACH,CAAC,CACD,CAAC"}
1
+ {"version":3,"file":"Question.js","sourceRoot":"","sources":["../../../src/components/Question/Question.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AAGnE;;GAEG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,KAAwC,EAAE,EAAE;IACpE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,GAAG,KAAK,CAAC;IACzD,OAAO,CACN,KAAC,cAAc,OAAK,KAAK,YACxB,KAAC,iBAAiB,IACjB,UAAU,EAAE,UAAU,EACtB,cAAc,EAAE,GAAG,EAAE,CAAC,CAAC;gBACtB,MAAM;gBACN,QAAQ;gBACR,QAAQ;aACR,CAAC,GACD,GACc,CACjB,CAAC;AACH,CAAC,CAAC;AAIF,MAAM,CAAC,MAAM,cAAc,GAAG,kBAAkB,CAC/C,UAAU,EACV,CAAC,KAAK,EAAE,EAAE;IACT,MAAM,EAAE,EAAE,EAAE,WAAW,EAAE,YAAY,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IACjE,OAAO,CACN,+BACC,kBAAQ,EAAE,EAAE,mBAAmB,EAAE,EAAE,aAClC,uBAAK,KAAK,GAAM,EAChB,YAAG,SAAS,EAAC,qBAAqB,EAAC,EAAE,EAAE,wBAAwB,EAAE,EAAE,YACjE,WAAW,GACT,IACI,EACT,KAAC,YAAY,IACZ,IAAI,EAAC,qBAAqB,EAC1B,YAAY,EAAE,YAAY,EAC1B,EAAE,EAAE,EAAE,GACL,EACD,QAAQ,IACC,CACX,CAAC;AACH,CAAC,CACD,CAAC"}
@@ -73,7 +73,7 @@ export declare const library: {
73
73
  } | undefined;
74
74
  componentType?: "Switch" | undefined;
75
75
  }>;
76
- Question: ({ components, ...props }: Pick<import("./type").LunaticBaseProps<unknown>, "label" | "description" | "declarations" | "id" | "errors" | "disabled" | "readOnly"> & import("./type").LunaticExtraProps & {
76
+ Question: (props: Pick<import("./type").LunaticBaseProps<unknown>, "label" | "description" | "declarations" | "id" | "errors" | "disabled" | "readOnly"> & import("./type").LunaticExtraProps & {
77
77
  components: LunaticComponentProps<keyof import("./type").ComponentPropsByType>[];
78
78
  componentType?: "Question" | undefined;
79
79
  }) => import("react/jsx-runtime").JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inseefr/lunatic",
3
- "version": "3.2.0",
3
+ "version": "3.2.1",
4
4
  "description": "Library of questionnaire components",
5
5
  "type": "module",
6
6
  "repository": {