@digigov/form 0.6.9 → 0.7.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.
- package/CHANGELOG.md +24 -1
- package/Field/FieldBase.js +110 -0
- package/Field/{ConditionalField.js → FieldConditional.js} +9 -29
- package/Field/FieldContainer.js +62 -0
- package/Field/index.js +11 -251
- package/Field/types.js +5 -0
- package/Field/utils.js +146 -0
- package/Fieldset/FieldsetWithContext.js +63 -0
- package/Fieldset/index.js +4 -63
- package/Fieldset/types.js +5 -0
- package/FormBuilder.js +178 -0
- package/FormContext.js +14 -0
- package/Questions/Questions.js +105 -0
- package/Questions/QuestionsContext.js +20 -0
- package/Questions/Step/ReviewStep.js +11 -7
- package/Questions/Step/Step.js +93 -0
- package/Questions/Step/StepArrayReview.js +79 -0
- package/Questions/Step/StepContext.js +37 -0
- package/Questions/Step/StepDescription.js +2 -2
- package/Questions/Step/StepForm.js +10 -6
- package/Questions/Step/StepTitle.js +2 -2
- package/Questions/Step/getAddMoreFields.js +31 -0
- package/Questions/Step/index.js +81 -200
- package/Questions/Step/types.js +5 -0
- package/Questions/__snapshots__/index.spec.tsx.snap +461 -2499
- package/Questions/getNextStep.js +30 -0
- package/Questions/index.js +4 -150
- package/Questions/types.js +5 -0
- package/es/Field/FieldBase.js +93 -0
- package/es/Field/{ConditionalField.js → FieldConditional.js} +5 -28
- package/es/Field/FieldContainer.js +40 -0
- package/es/Field/index.js +8 -233
- package/es/Field/types.js +1 -0
- package/es/Field/utils.js +122 -0
- package/es/Fieldset/FieldsetWithContext.js +41 -0
- package/es/Fieldset/index.js +3 -51
- package/es/Fieldset/types.js +1 -0
- package/es/FormBuilder.js +148 -0
- package/es/FormContext.js +5 -0
- package/es/Questions/Questions.js +84 -0
- package/es/Questions/QuestionsContext.js +11 -0
- package/es/Questions/Step/ReviewStep.js +5 -3
- package/es/Questions/Step/Step.js +69 -0
- package/es/Questions/Step/StepArrayReview.js +50 -0
- package/es/Questions/Step/StepContext.js +27 -0
- package/es/Questions/Step/StepDescription.js +1 -1
- package/es/Questions/Step/StepForm.js +4 -2
- package/es/Questions/Step/StepTitle.js +1 -1
- package/es/Questions/Step/getAddMoreFields.js +22 -0
- package/es/Questions/Step/index.js +13 -165
- package/es/Questions/Step/types.js +1 -0
- package/es/Questions/__snapshots__/index.spec.tsx.snap +461 -2499
- package/es/Questions/getNextStep.js +23 -0
- package/es/Questions/index.js +2 -119
- package/es/Questions/index.spec.js +2 -1
- package/es/Questions/types.js +1 -0
- package/es/index.js +2 -153
- package/es/inputs/index.js +5 -4
- package/es/internal.js +31 -0
- package/es/types.js +1 -0
- package/es/utils.js +5 -3
- package/es/validators/index.js +155 -0
- package/es/validators/types.js +1 -0
- package/es/validators/utils/afm.js +35 -0
- package/es/validators/utils/file.js +52 -0
- package/es/validators/utils/iban.js +123 -0
- package/es/validators/utils/index.js +105 -0
- package/es/validators/utils/phone.js +122 -0
- package/es/validators/utils/postal_code.js +29 -0
- package/es/validators/utils/uuid4.js +20 -0
- package/{esm → es/validators}/validators.spec.js +1 -1
- package/esm/Field/FieldBase.js +93 -0
- package/esm/Field/{ConditionalField.js → FieldConditional.js} +5 -28
- package/esm/Field/FieldContainer.js +40 -0
- package/esm/Field/index.js +8 -233
- package/esm/Field/types.js +1 -0
- package/esm/Field/utils.js +122 -0
- package/esm/Fieldset/FieldsetWithContext.js +41 -0
- package/esm/Fieldset/index.js +3 -51
- package/esm/Fieldset/types.js +1 -0
- package/esm/FormBuilder.js +148 -0
- package/esm/FormContext.js +5 -0
- package/esm/Questions/Questions.js +84 -0
- package/esm/Questions/QuestionsContext.js +11 -0
- package/esm/Questions/Step/ReviewStep.js +5 -3
- package/esm/Questions/Step/Step.js +69 -0
- package/esm/Questions/Step/StepArrayReview.js +50 -0
- package/esm/Questions/Step/StepContext.js +27 -0
- package/esm/Questions/Step/StepDescription.js +1 -1
- package/esm/Questions/Step/StepForm.js +4 -2
- package/esm/Questions/Step/StepTitle.js +1 -1
- package/esm/Questions/Step/getAddMoreFields.js +22 -0
- package/esm/Questions/Step/index.js +13 -165
- package/esm/Questions/Step/types.js +1 -0
- package/esm/Questions/__snapshots__/index.spec.tsx.snap +461 -2499
- package/esm/Questions/getNextStep.js +23 -0
- package/esm/Questions/index.js +2 -119
- package/esm/Questions/index.spec.js +2 -1
- package/esm/Questions/types.js +1 -0
- package/esm/index.js +3 -154
- package/esm/inputs/index.js +5 -4
- package/esm/internal.js +31 -0
- package/esm/types.js +1 -0
- package/esm/utils.js +5 -3
- package/esm/validators/index.js +155 -0
- package/esm/validators/types.js +1 -0
- package/esm/validators/utils/afm.js +35 -0
- package/esm/validators/utils/file.js +52 -0
- package/esm/validators/utils/iban.js +123 -0
- package/esm/validators/utils/index.js +105 -0
- package/esm/validators/utils/phone.js +122 -0
- package/esm/validators/utils/postal_code.js +29 -0
- package/esm/validators/utils/uuid4.js +20 -0
- package/{es → esm/validators}/validators.spec.js +1 -1
- package/index.js +8 -191
- package/inputs/index.js +13 -5
- package/internal.js +356 -0
- package/libs/form/src/Field/FieldBase.d.ts +3 -0
- package/libs/form/src/Field/FieldConditional.d.ts +4 -0
- package/libs/form/src/Field/FieldContainer.d.ts +4 -0
- package/libs/form/src/Field/index.d.ts +1 -62
- package/libs/form/src/Field/types.d.ts +75 -0
- package/libs/form/src/Field/utils.d.ts +5 -0
- package/libs/form/src/Fieldset/FieldsetWithContext.d.ts +4 -0
- package/libs/form/src/Fieldset/index.d.ts +2 -12
- package/libs/form/src/Fieldset/types.d.ts +6 -0
- package/libs/form/src/FormBuilder.d.ts +5 -0
- package/libs/form/src/FormContext.d.ts +3 -0
- package/libs/form/src/Questions/Questions.d.ts +8 -0
- package/libs/form/src/Questions/QuestionsContext.d.ts +3 -0
- package/libs/form/src/Questions/Step/ReviewStep.d.ts +1 -0
- package/libs/form/src/Questions/Step/Step.d.ts +9 -0
- package/libs/form/src/Questions/Step/StepArrayReview.d.ts +4 -0
- package/libs/form/src/Questions/Step/StepContext.d.ts +4 -0
- package/libs/form/src/Questions/Step/StepForm.d.ts +2 -1
- package/libs/form/src/Questions/Step/getAddMoreFields.d.ts +3 -0
- package/libs/form/src/Questions/Step/index.d.ts +12 -47
- package/libs/form/src/Questions/Step/types.d.ts +31 -0
- package/libs/form/src/Questions/getNextStep.d.ts +2 -0
- package/libs/form/src/Questions/index.d.ts +1 -28
- package/libs/form/src/Questions/types.d.ts +19 -0
- package/libs/form/src/index.d.ts +2 -73
- package/libs/form/src/inputs/Checkboxes/index.d.ts +1 -1
- package/libs/form/src/inputs/DateInput/index.d.ts +1 -2
- package/libs/form/src/inputs/FileInput/index.d.ts +1 -1
- package/libs/form/src/inputs/Input/index.d.ts +1 -1
- package/libs/form/src/inputs/Label/index.d.ts +2 -1
- package/libs/form/src/inputs/Radio/index.d.ts +1 -1
- package/libs/form/src/inputs/Select/index.d.ts +1 -1
- package/libs/form/src/inputs/index.d.ts +4 -3
- package/libs/form/src/internal.d.ts +31 -0
- package/libs/form/src/types.d.ts +70 -0
- package/libs/form/src/validators/index.d.ts +8 -0
- package/libs/form/src/validators/types.d.ts +2 -0
- package/libs/form/src/validators/utils/afm.d.ts +6 -0
- package/libs/form/src/validators/utils/file.d.ts +1 -0
- package/libs/form/src/validators/utils/iban.d.ts +2 -0
- package/libs/form/src/validators/utils/index.d.ts +12 -0
- package/libs/form/src/validators/utils/phone.d.ts +9 -0
- package/libs/form/src/validators/utils/postal_code.d.ts +2 -0
- package/libs/form/src/validators/utils/uuid4.d.ts +6 -0
- package/libs/form/src/{validators.spec.d.ts → validators/validators.spec.d.ts} +0 -0
- package/libs/ui/src/core/Accordion/index.d.ts +3 -3
- package/libs/ui/src/core/Base/index.d.ts +3 -0
- package/libs/ui/src/core/Blockquote/index.d.ts +1 -1
- package/libs/ui/src/core/Button/BackButton.d.ts +1 -1
- package/libs/ui/src/core/Button/ButtonLink.d.ts +1 -1
- package/libs/ui/src/core/Button/index.d.ts +1 -1
- package/libs/ui/src/core/Divider/index.d.ts +1 -1
- package/libs/ui/src/core/Form/index.d.ts +3 -0
- package/libs/ui/src/core/Label/index.d.ts +4 -0
- package/libs/ui/src/core/Link/index.d.ts +1 -0
- package/libs/ui/src/core/NavList/NavHorizontal.d.ts +3 -0
- package/libs/ui/src/core/NavList/NavHorizontalList.d.ts +3 -0
- package/libs/ui/src/core/NavList/NavHorizontalListItem.d.ts +3 -0
- package/libs/ui/src/core/NavList/NavList.d.ts +1 -14
- package/libs/ui/src/core/NavList/NavListBase.d.ts +4 -0
- package/libs/ui/src/core/NavList/NavListItem.d.ts +1 -0
- package/libs/ui/src/core/NavList/NavListItemBase.d.ts +2 -1
- package/libs/ui/src/core/NavList/NavListSubMenu.d.ts +1 -1
- package/libs/ui/src/core/NavList/NavVertical.d.ts +3 -0
- package/libs/ui/src/core/NavList/NavVerticalItem.d.ts +3 -0
- package/libs/ui/src/core/NavList/index.d.ts +5 -0
- package/libs/ui/src/core/NavList/types.d.ts +14 -0
- package/libs/ui/src/core/SkipLink/index.d.ts +3 -0
- package/libs/ui/src/core/SvgIcon/index.d.ts +1 -0
- package/libs/ui/src/core/Table/TableFloatingScroll.d.ts +2 -0
- package/libs/ui/src/core/Table/index.d.ts +1 -0
- package/libs/ui/src/core/index.d.ts +4 -0
- package/libs/ui/src/layouts/Grid/index.d.ts +1 -0
- package/libs/ui/src/typography/Caption/index.d.ts +3 -2
- package/libs/ui/src/typography/Title/index.d.ts +2 -1
- package/libs-ui/react-core/src/Accordion/index.d.ts +3 -3
- package/libs-ui/react-core/src/AccordionControls/index.d.ts +3 -3
- package/libs-ui/react-core/src/AccordionSection/index.d.ts +3 -3
- package/libs-ui/react-core/src/AccordionSectionContent/index.d.ts +3 -3
- package/libs-ui/react-core/src/AccordionSectionHeader/index.d.ts +3 -3
- package/libs-ui/react-core/src/AccordionSectionSummary/index.d.ts +4 -3
- package/libs-ui/react-core/src/AccordionSectionSummaryHeading/index.d.ts +3 -3
- package/libs-ui/react-core/src/BackLink/index.d.ts +3 -3
- package/libs-ui/react-core/src/Base/index.d.ts +43 -0
- package/libs-ui/react-core/src/Blockquote/index.d.ts +3 -3
- package/libs-ui/react-core/src/Breadcrumbs/index.d.ts +3 -3
- package/libs-ui/react-core/src/BreadcrumbsList/index.d.ts +3 -3
- package/libs-ui/react-core/src/BreadcrumbsListItem/index.d.ts +3 -3
- package/libs-ui/react-core/src/Button/index.d.ts +3 -3
- package/libs-ui/react-core/src/ButtonGroup/index.d.ts +3 -3
- package/libs-ui/react-core/src/ButtonLink/index.d.ts +3 -3
- package/libs-ui/react-core/src/CallToAction/index.d.ts +1 -1
- package/libs-ui/react-core/src/Card/index.d.ts +3 -3
- package/libs-ui/react-core/src/CardAction/index.d.ts +3 -3
- package/libs-ui/react-core/src/CardHeading/index.d.ts +3 -3
- package/libs-ui/react-core/src/CardText/index.d.ts +3 -3
- package/libs-ui/react-core/src/CheckIcon/index.d.ts +15 -0
- package/libs-ui/react-core/src/Checkbox/index.d.ts +3 -3
- package/libs-ui/react-core/src/CheckboxItem/index.d.ts +3 -3
- package/libs-ui/react-core/src/Confirmation/index.d.ts +3 -3
- package/libs-ui/react-core/src/ConfirmationBody/index.d.ts +3 -3
- package/libs-ui/react-core/src/ConfirmationTitle/index.d.ts +3 -3
- package/libs-ui/react-core/src/DateInput/index.d.ts +3 -3
- package/libs-ui/react-core/src/DateInputItem/index.d.ts +3 -3
- package/libs-ui/react-core/src/Details/index.d.ts +3 -3
- package/libs-ui/react-core/src/DetailsContent/index.d.ts +3 -3
- package/libs-ui/react-core/src/DetailsSummary/index.d.ts +3 -3
- package/libs-ui/react-core/src/ErrorMessage/index.d.ts +3 -3
- package/libs-ui/react-core/src/ErrorSummary/index.d.ts +3 -3
- package/libs-ui/react-core/src/Field/index.d.ts +3 -3
- package/libs-ui/react-core/src/Fieldset/index.d.ts +3 -3
- package/libs-ui/react-core/src/FieldsetLegend/index.d.ts +3 -3
- package/libs-ui/react-core/src/FileUpload/index.d.ts +3 -3
- package/libs-ui/react-core/src/Form/index.d.ts +11 -0
- package/libs-ui/react-core/src/Grid/index.d.ts +3 -3
- package/libs-ui/react-core/src/Heading/index.d.ts +3 -3
- package/libs-ui/react-core/src/HeadingCaption/index.d.ts +3 -3
- package/libs-ui/react-core/src/Hidden/index.d.ts +3 -3
- package/libs-ui/react-core/src/Hint/index.d.ts +3 -3
- package/libs-ui/react-core/src/Label/index.d.ts +3 -3
- package/libs-ui/react-core/src/LabelTitle/index.d.ts +7 -7
- package/libs-ui/react-core/src/Link/index.d.ts +3 -3
- package/libs-ui/react-core/src/List/index.d.ts +3 -3
- package/libs-ui/react-core/src/ListItem/index.d.ts +3 -3
- package/libs-ui/react-core/src/NavHorizontal/index.d.ts +16 -0
- package/libs-ui/react-core/src/NavHorizontalList/index.d.ts +10 -0
- package/libs-ui/react-core/src/NavHorizontalListItem/index.d.ts +18 -0
- package/libs-ui/react-core/src/NavVertical/index.d.ts +11 -0
- package/libs-ui/react-core/src/NavVerticalItem/index.d.ts +14 -0
- package/libs-ui/react-core/src/NormalText/index.d.ts +3 -3
- package/libs-ui/react-core/src/NotificationBanner/index.d.ts +3 -3
- package/libs-ui/react-core/src/NotificationBannerContent/index.d.ts +3 -3
- package/libs-ui/react-core/src/NotificationBannerHeader/index.d.ts +3 -3
- package/libs-ui/react-core/src/NotificationBannerHeading/index.d.ts +3 -3
- package/libs-ui/react-core/src/NotificationBannerLink/index.d.ts +3 -3
- package/libs-ui/react-core/src/Paragraph/index.d.ts +3 -3
- package/libs-ui/react-core/src/PhaseBanner/index.d.ts +3 -3
- package/libs-ui/react-core/src/PhaseBannerHeaderContainer/index.d.ts +3 -3
- package/libs-ui/react-core/src/PhaseBannerTag/index.d.ts +3 -3
- package/libs-ui/react-core/src/PhaseBannerText/index.d.ts +3 -3
- package/libs-ui/react-core/src/Radio/index.d.ts +3 -3
- package/libs-ui/react-core/src/RadioItem/index.d.ts +3 -3
- package/libs-ui/react-core/src/SectionBreak/index.d.ts +3 -3
- package/libs-ui/react-core/src/Select/index.d.ts +3 -3
- package/libs-ui/react-core/src/SelectOption/index.d.ts +3 -3
- package/libs-ui/react-core/src/SkipLink/index.d.ts +10 -0
- package/libs-ui/react-core/src/SummaryList/index.d.ts +3 -3
- package/libs-ui/react-core/src/SummaryListItem/index.d.ts +3 -3
- package/libs-ui/react-core/src/SummaryListItemAction/index.d.ts +3 -3
- package/libs-ui/react-core/src/SummaryListItemKey/index.d.ts +3 -3
- package/libs-ui/react-core/src/SummaryListItemValue/index.d.ts +3 -3
- package/libs-ui/react-core/src/SvgIcon/index.d.ts +3 -3
- package/libs-ui/react-core/src/Table/index.d.ts +3 -3
- package/libs-ui/react-core/src/TableBody/index.d.ts +3 -3
- package/libs-ui/react-core/src/TableCaption/index.d.ts +3 -3
- package/libs-ui/react-core/src/TableContainer/index.d.ts +3 -3
- package/libs-ui/react-core/src/TableDataCell/index.d.ts +3 -3
- package/libs-ui/react-core/src/TableHead/index.d.ts +3 -3
- package/libs-ui/react-core/src/TableHeadCell/index.d.ts +3 -3
- package/libs-ui/react-core/src/TableNoDataRow/index.d.ts +3 -3
- package/libs-ui/react-core/src/TableRow/index.d.ts +3 -3
- package/libs-ui/react-core/src/Tabs/index.d.ts +3 -3
- package/libs-ui/react-core/src/TabsHeading/index.d.ts +3 -3
- package/libs-ui/react-core/src/TabsList/index.d.ts +3 -3
- package/libs-ui/react-core/src/TabsListItem/index.d.ts +3 -3
- package/libs-ui/react-core/src/TabsPanel/index.d.ts +3 -3
- package/libs-ui/react-core/src/TextArea/index.d.ts +3 -3
- package/libs-ui/react-core/src/TextInput/index.d.ts +3 -3
- package/libs-ui/react-core/src/UncheckIcon/index.d.ts +4 -4
- package/libs-ui/react-core/src/VisuallyHidden/index.d.ts +3 -3
- package/libs-ui/react-core/src/WarningText/index.d.ts +3 -3
- package/package.json +3 -2
- package/types.js +5 -0
- package/utils.js +6 -4
- package/validators/index.js +181 -0
- package/validators/types.js +5 -0
- package/validators/utils/afm.js +45 -0
- package/validators/utils/file.js +62 -0
- package/validators/utils/iban.js +134 -0
- package/validators/utils/index.js +210 -0
- package/validators/utils/phone.js +144 -0
- package/validators/utils/postal_code.js +40 -0
- package/validators/utils/uuid4.js +30 -0
- package/validators/validators.spec.js +88 -0
- package/es/validators.js +0 -626
- package/esm/validators.js +0 -626
- package/libs/form/src/Field/ConditionalField.d.ts +0 -17
- package/libs/form/src/validators.d.ts +0 -14
- package/validators.js +0 -662
- package/validators.spec.js +0 -88
|
@@ -1,48 +1,13 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { FieldSpec } from '@digigov/form';
|
|
3
|
-
import { FieldLabelProps } from '@digigov/form/inputs/Label';
|
|
4
|
-
declare type StepType = 'object' | 'array';
|
|
5
|
-
declare type StepReviewAnswersType = 'positive' | 'negative';
|
|
6
|
-
export interface StepAddMoreInterface {
|
|
7
|
-
title: FieldLabelProps;
|
|
8
|
-
answers: Record<StepReviewAnswersType, FieldLabelProps>;
|
|
9
|
-
}
|
|
10
|
-
export interface StepReviewInterface {
|
|
11
|
-
primaryFieldKey: string;
|
|
12
|
-
title: string;
|
|
13
|
-
caption?: string;
|
|
14
|
-
addMore: StepAddMoreInterface;
|
|
15
|
-
}
|
|
16
|
-
export interface StepInterface {
|
|
17
|
-
name: string;
|
|
18
|
-
title?: string;
|
|
19
|
-
description?: string;
|
|
20
|
-
caption?: string;
|
|
21
|
-
step?: string;
|
|
22
|
-
fields?: any;
|
|
23
|
-
initial?: any;
|
|
24
|
-
errorLabels?: any;
|
|
25
|
-
submitStep?: any;
|
|
26
|
-
review?: StepReviewInterface;
|
|
27
|
-
type?: StepType;
|
|
28
|
-
}
|
|
29
|
-
export interface StepArrayReviewInterface {
|
|
30
|
-
array: Record<string, any>[];
|
|
31
|
-
handleSubmit: (data: any) => void;
|
|
32
|
-
handleDelete: (data: any) => void;
|
|
33
|
-
}
|
|
34
|
-
export declare const StepContext: React.Context<StepInterface>;
|
|
35
|
-
/**
|
|
36
|
-
* The Step component accepts Step data as props
|
|
37
|
-
* uses composable components to provide a wholesome UX
|
|
38
|
-
*
|
|
39
|
-
*/
|
|
40
|
-
export declare const Step: React.FC<StepInterface>;
|
|
41
|
-
export declare const getAddMoreFields: (currentStep: StepInterface) => FieldSpec[];
|
|
42
|
-
export declare const StepArrayReview: React.FC<StepArrayReviewInterface>;
|
|
43
|
-
export default Step;
|
|
44
|
-
export * from '@digigov/form/Questions/Step/StepDescription';
|
|
45
|
-
export * from '@digigov/form/Questions/Step/StepForm';
|
|
46
|
-
export * from '@digigov/form/Questions/Step/StepQuote';
|
|
47
|
-
export * from '@digigov/form/Questions/Step/StepTitle';
|
|
48
1
|
export * from '@digigov/form/Questions/Step/ReviewStep';
|
|
2
|
+
export * from '@digigov/form/Questions/Step/Step';
|
|
3
|
+
export * from '@digigov/form/Questions/Step/StepArrayReview';
|
|
4
|
+
export * from '@digigov/form/Questions/Step/StepContext';
|
|
5
|
+
export { default as StepDescription } from '@digigov/form/Questions/Step/StepDescription';
|
|
6
|
+
export { default as StepForm } from '@digigov/form/Questions/Step/StepForm';
|
|
7
|
+
export { default as StepQuote } from '@digigov/form/Questions/Step/StepQuote';
|
|
8
|
+
export { default as StepTitle } from '@digigov/form/Questions/Step/StepTitle';
|
|
9
|
+
export * from '@digigov/form/Questions/Step/getAddMoreFields';
|
|
10
|
+
export * from '@digigov/form/Questions/Step/';
|
|
11
|
+
export * from '@digigov/form/Questions/Step/types';
|
|
12
|
+
import Step from '@digigov/form/Questions/Step/Step';
|
|
13
|
+
export default Step;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { LabelProps } from '@digigov/form/inputs/Label';
|
|
2
|
+
export declare type StepType = 'object' | 'array';
|
|
3
|
+
export declare type StepReviewAnswersType = 'positive' | 'negative';
|
|
4
|
+
export interface StepAddMoreInterface {
|
|
5
|
+
title: LabelProps;
|
|
6
|
+
answers: Record<StepReviewAnswersType, LabelProps>;
|
|
7
|
+
}
|
|
8
|
+
export interface StepReviewInterface {
|
|
9
|
+
primaryFieldKey: string;
|
|
10
|
+
title: string;
|
|
11
|
+
caption?: string;
|
|
12
|
+
addMore: StepAddMoreInterface;
|
|
13
|
+
}
|
|
14
|
+
export interface StepInterface {
|
|
15
|
+
name: string;
|
|
16
|
+
title?: string;
|
|
17
|
+
description?: string;
|
|
18
|
+
caption?: string;
|
|
19
|
+
step?: string;
|
|
20
|
+
fields?: any;
|
|
21
|
+
initial?: any;
|
|
22
|
+
errorLabels?: any;
|
|
23
|
+
submitStep?: any;
|
|
24
|
+
review?: StepReviewInterface;
|
|
25
|
+
type?: StepType;
|
|
26
|
+
}
|
|
27
|
+
export interface StepArrayReviewInterface {
|
|
28
|
+
array: Record<string, any>[];
|
|
29
|
+
handleSubmit: (data: any) => void;
|
|
30
|
+
handleDelete: (data: any) => void;
|
|
31
|
+
}
|
|
@@ -1,30 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { StepInterface } from '@digigov/form/Questions/Step';
|
|
3
|
-
export interface QuestionsInterface {
|
|
4
|
-
name: string;
|
|
5
|
-
steps: StepInterface[];
|
|
6
|
-
onSubmit: (...args: any[]) => void;
|
|
7
|
-
onChange?: (...args: any[]) => void;
|
|
8
|
-
onActiveStep?: (...args: any[]) => void;
|
|
9
|
-
forceStepName?: string;
|
|
10
|
-
initialData?: any;
|
|
11
|
-
localDraft?: boolean;
|
|
12
|
-
errorLabels?: Record<string, string>;
|
|
13
|
-
}
|
|
14
|
-
export interface QuestionsContextInterface {
|
|
15
|
-
currentStep: StepInterface;
|
|
16
|
-
steps: StepInterface[];
|
|
17
|
-
submitStep: (...args: any[]) => void;
|
|
18
|
-
data?: any;
|
|
19
|
-
onActiveStep?: (...args: any[]) => void;
|
|
20
|
-
}
|
|
21
|
-
export declare const QuestionsContext: React.Context<QuestionsContextInterface>;
|
|
22
|
-
/**
|
|
23
|
-
* The Question component accepts question data as props
|
|
24
|
-
* uses composable components to provide a wholesome UX
|
|
25
|
-
*
|
|
26
|
-
*/
|
|
27
|
-
export declare const Questions: React.FC<QuestionsInterface>;
|
|
1
|
+
import { Questions } from '@digigov/form/Questions/Questions';
|
|
28
2
|
export default Questions;
|
|
29
3
|
export * from '@digigov/form/Questions/Step';
|
|
30
|
-
export * from '@digigov/form';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { StepInterface } from '@digigov/form/Questions/Step/types';
|
|
2
|
+
export interface QuestionsInterface {
|
|
3
|
+
name: string;
|
|
4
|
+
steps: StepInterface[];
|
|
5
|
+
onSubmit: (...args: any[]) => void;
|
|
6
|
+
onChange?: (...args: any[]) => void;
|
|
7
|
+
onActiveStep?: (...args: any[]) => void;
|
|
8
|
+
forceStepName?: string;
|
|
9
|
+
initialData?: any;
|
|
10
|
+
localDraft?: boolean;
|
|
11
|
+
errorLabels?: Record<string, string>;
|
|
12
|
+
}
|
|
13
|
+
export interface QuestionsContextInterface {
|
|
14
|
+
currentStep: StepInterface;
|
|
15
|
+
steps: StepInterface[];
|
|
16
|
+
submitStep: (...args: any[]) => void;
|
|
17
|
+
data?: any;
|
|
18
|
+
onActiveStep?: (...args: any[]) => void;
|
|
19
|
+
}
|
package/libs/form/src/index.d.ts
CHANGED
|
@@ -1,74 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import { GridProps } from '@digigov/ui/layouts/Grid';
|
|
4
|
-
import { ValidatorSchema } from '@digigov/form/validators';
|
|
5
|
-
import { FieldComponentRegistry } from '@digigov/form/Field';
|
|
6
|
-
export * from '@digigov/form/Fieldset';
|
|
7
|
-
export * from '@digigov/form/Field';
|
|
8
|
-
export declare type FieldError = {
|
|
9
|
-
message: string;
|
|
10
|
-
};
|
|
11
|
-
export declare type LabelProps = {
|
|
12
|
-
primary?: string;
|
|
13
|
-
secondary?: string;
|
|
14
|
-
};
|
|
15
|
-
export interface FieldCondition {
|
|
16
|
-
is: string;
|
|
17
|
-
then?: Partial<FieldSpec>;
|
|
18
|
-
else?: Partial<FieldSpec>;
|
|
19
|
-
}
|
|
20
|
-
export interface FieldSpec {
|
|
21
|
-
key: string;
|
|
22
|
-
type?: 'int' | 'string' | 'boolean' | 'choice:multiple' | 'choice:single' | 'mobile_phone' | 'afm' | 'iban' | 'postal_code' | 'phone_number';
|
|
23
|
-
component?: any;
|
|
24
|
-
condition?: Record<string, FieldCondition>;
|
|
25
|
-
controlled?: boolean;
|
|
26
|
-
label?: LabelProps;
|
|
27
|
-
extra?: Record<string, any>;
|
|
28
|
-
editable?: boolean;
|
|
29
|
-
required?: boolean;
|
|
30
|
-
enabled?: boolean;
|
|
31
|
-
layout?: Record<string, GridProps['xs']>;
|
|
32
|
-
validators?: ValidatorSchema[];
|
|
33
|
-
wrapper?: 'label' | 'fieldset';
|
|
34
|
-
}
|
|
35
|
-
export interface FieldsetSpec {
|
|
36
|
-
key: string;
|
|
37
|
-
fields: string[];
|
|
38
|
-
label?: LabelProps;
|
|
39
|
-
body?: React.ReactNode;
|
|
40
|
-
}
|
|
41
|
-
export declare type FormData = UseFormOptions['defaultValues'];
|
|
42
|
-
export interface FormContextProps {
|
|
43
|
-
fieldsetsMap?: Record<string, FieldsetSpec>;
|
|
44
|
-
fieldsMap: Record<string, FieldSpec>;
|
|
45
|
-
control: UseFormMethods['control'];
|
|
46
|
-
register: UseFormMethods['register'];
|
|
47
|
-
registerField: (field: FieldSpec) => void;
|
|
48
|
-
errors: UseFormMethods['errors'];
|
|
49
|
-
componentRegistry?: FieldComponentRegistry;
|
|
50
|
-
}
|
|
51
|
-
export declare const FormContext: React.Context<FormContextProps>;
|
|
52
|
-
export interface FormBuilderProps {
|
|
53
|
-
fields?: FieldSpec[];
|
|
54
|
-
fieldsets?: FieldsetSpec[];
|
|
55
|
-
initial?: FormData;
|
|
56
|
-
onSubmit?: (data: FormData) => void | null | FieldError[];
|
|
57
|
-
mode?: UseFormOptions['mode'];
|
|
58
|
-
reValidateMode?: UseFormOptions['reValidateMode'];
|
|
59
|
-
criteriaMode?: UseFormOptions['criteriaMode'];
|
|
60
|
-
children?: React.ReactNode;
|
|
61
|
-
shouldFocusError?: boolean;
|
|
62
|
-
auto?: boolean;
|
|
63
|
-
validatorRegistry?: Record<string, ValidatorSchema>;
|
|
64
|
-
componentRegistry?: FieldComponentRegistry;
|
|
65
|
-
}
|
|
66
|
-
interface FormBaseProps extends Omit<FormBuilderProps, 'fields' | 'fieldsets' | 'auto'> {
|
|
67
|
-
fieldsetsMap?: Record<string, FieldsetSpec>;
|
|
68
|
-
fieldsMap: Record<string, FieldSpec>;
|
|
69
|
-
registerField: (field: FieldSpec) => void;
|
|
70
|
-
resolver: any;
|
|
71
|
-
}
|
|
72
|
-
export declare const FormBase: React.ForwardRefExoticComponent<FormBaseProps & React.RefAttributes<HTMLFormElement>>;
|
|
73
|
-
export declare const FormBuilder: React.ForwardRefExoticComponent<FormBuilderProps & React.RefAttributes<HTMLFormElement>>;
|
|
1
|
+
export * from '@digigov/form/internal';
|
|
2
|
+
import FormBuilder from '@digigov/form/FormBuilder';
|
|
74
3
|
export default FormBuilder;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { FieldOptionProps } from '@digigov/form/inputs/Label';
|
|
3
|
-
import { ControlledFieldProps } from '@digigov/form/Field';
|
|
3
|
+
import { ControlledFieldProps } from '@digigov/form/Field/types';
|
|
4
4
|
export interface CheckboxesProps extends Omit<ControlledFieldProps, 'extra' | 'value'> {
|
|
5
5
|
value?: string[];
|
|
6
6
|
extra: {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { UncontrolledFieldProps } from '@digigov/form/Field';
|
|
1
|
+
import { UncontrolledFieldProps } from '@digigov/form/Field/types';
|
|
3
2
|
export interface DateInputProps extends Omit<UncontrolledFieldProps, 'extra'> {
|
|
4
3
|
extra?: {
|
|
5
4
|
max?: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { UncontrolledFieldProps } from '@digigov/form/Field';
|
|
2
|
+
import { UncontrolledFieldProps } from '@digigov/form/Field/types';
|
|
3
3
|
export interface FileInputProps extends Omit<UncontrolledFieldProps, 'extra'> {
|
|
4
4
|
extra?: {
|
|
5
5
|
className?: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { UncontrolledFieldProps } from '@digigov/form/Field';
|
|
2
|
+
import { UncontrolledFieldProps } from '@digigov/form/Field/types';
|
|
3
3
|
export interface InputProps extends Omit<UncontrolledFieldProps, 'extra'> {
|
|
4
4
|
extra?: {
|
|
5
5
|
fullWidth?: boolean;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { FieldLabelProps } from '@digigov/form/types';
|
|
2
3
|
export interface FieldOptionProps {
|
|
3
4
|
label?: FieldLabelProps;
|
|
4
5
|
value: string;
|
|
5
6
|
disabled?: boolean;
|
|
6
7
|
}
|
|
7
|
-
export interface
|
|
8
|
+
export interface LabelProps {
|
|
8
9
|
primary?: string;
|
|
9
10
|
secondary?: string;
|
|
10
11
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { FieldOptionProps } from '@digigov/form/inputs/Label';
|
|
3
|
-
import { UncontrolledFieldProps } from '@digigov/form/Field';
|
|
3
|
+
import { UncontrolledFieldProps } from '@digigov/form/Field/types';
|
|
4
4
|
export interface RadioButtonsGroupProps extends Omit<UncontrolledFieldProps, 'extra'> {
|
|
5
5
|
extra: {
|
|
6
6
|
className?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { FieldOptionProps } from '@digigov/form/inputs/Label';
|
|
3
|
-
import { UncontrolledFieldProps } from '@digigov/form/Field';
|
|
3
|
+
import { UncontrolledFieldProps } from '@digigov/form/Field/types';
|
|
4
4
|
export interface SelectProps extends Omit<UncontrolledFieldProps, 'extra'> {
|
|
5
5
|
extra: {
|
|
6
6
|
className?: string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
export { default as FileInput } from '@digigov/form/inputs/FileInput';
|
|
2
|
-
export { default as Select } from '@digigov/form/inputs/Select';
|
|
3
1
|
export { default as Checkboxes } from '@digigov/form/inputs/Checkboxes';
|
|
4
|
-
export { default as
|
|
2
|
+
export { default as DateInput } from '@digigov/form/inputs/DateInput';
|
|
3
|
+
export { default as FileInput } from '@digigov/form/inputs/FileInput';
|
|
5
4
|
export { default as Input } from '@digigov/form/inputs/Input';
|
|
5
|
+
export { default as Label } from '@digigov/form/inputs/Label';
|
|
6
6
|
export { default as Radio } from '@digigov/form/inputs/Radio';
|
|
7
|
+
export { default as Select } from '@digigov/form/inputs/Select';
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export { default as Field } from '@digigov/form/Field';
|
|
2
|
+
export * from '@digigov/form/Field';
|
|
3
|
+
export { default as FieldConditional } from '@digigov/form/Field/FieldConditional';
|
|
4
|
+
export * from '@digigov/form/Field/FieldConditional';
|
|
5
|
+
export { default as Fieldset } from '@digigov/form/Fieldset';
|
|
6
|
+
export * from '@digigov/form/Fieldset';
|
|
7
|
+
export { default as FormBuilder } from '@digigov/form/FormBuilder';
|
|
8
|
+
export * from '@digigov/form/FormBuilder';
|
|
9
|
+
export { Step } from '@digigov/form/Questions/Step';
|
|
10
|
+
export * from '@digigov/form/Questions/Step';
|
|
11
|
+
export { default as Questions } from '@digigov/form/Questions';
|
|
12
|
+
export * from '@digigov/form/Questions';
|
|
13
|
+
export { default as Checkboxes } from '@digigov/form/inputs/Checkboxes';
|
|
14
|
+
export * from '@digigov/form/inputs/Checkboxes';
|
|
15
|
+
export { default as DateInput } from '@digigov/form/inputs/DateInput';
|
|
16
|
+
export * from '@digigov/form/inputs/DateInput';
|
|
17
|
+
export { default as FileInput } from '@digigov/form/inputs/FileInput';
|
|
18
|
+
export * from '@digigov/form/inputs/FileInput';
|
|
19
|
+
export { default as Input } from '@digigov/form/inputs/Input';
|
|
20
|
+
export * from '@digigov/form/inputs/Input';
|
|
21
|
+
export { default as Label } from '@digigov/form/inputs/Label';
|
|
22
|
+
export * from '@digigov/form/inputs/Label';
|
|
23
|
+
export { default as Radio } from '@digigov/form/inputs/Radio';
|
|
24
|
+
export * from '@digigov/form/inputs/Radio';
|
|
25
|
+
export { default as Select } from '@digigov/form/inputs/Select';
|
|
26
|
+
export * from '@digigov/form/inputs/Select';
|
|
27
|
+
export * from '@digigov/form/inputs';
|
|
28
|
+
export * from '@digigov/form/internal';
|
|
29
|
+
export * from '@digigov/form/types';
|
|
30
|
+
export * from '@digigov/form/utils';
|
|
31
|
+
export * from '@digigov/form/validators';
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { UseFormMethods, UseFormOptions } from 'react-hook-form';
|
|
3
|
+
import { GridProps } from '@digigov/ui/layouts/Grid';
|
|
4
|
+
import { ValidatorSchema } from '@digigov/form/validators/types';
|
|
5
|
+
import { FieldComponentRegistry } from '@digigov/form/Field/types';
|
|
6
|
+
export declare type FieldError = {
|
|
7
|
+
message: string;
|
|
8
|
+
};
|
|
9
|
+
export declare type FieldLabelProps = {
|
|
10
|
+
primary?: string;
|
|
11
|
+
secondary?: string;
|
|
12
|
+
};
|
|
13
|
+
export interface FieldCondition {
|
|
14
|
+
is: string;
|
|
15
|
+
then?: Partial<FieldSpec>;
|
|
16
|
+
else?: Partial<FieldSpec>;
|
|
17
|
+
}
|
|
18
|
+
export interface FieldSpec {
|
|
19
|
+
key: string;
|
|
20
|
+
type?: 'int' | 'string' | 'boolean' | 'choice:multiple' | 'choice:single' | 'mobile_phone' | 'afm' | 'iban' | 'postal_code' | 'phone_number' | 'array' | 'object';
|
|
21
|
+
component?: any;
|
|
22
|
+
condition?: Record<string, FieldCondition>;
|
|
23
|
+
controlled?: boolean;
|
|
24
|
+
label?: FieldLabelProps;
|
|
25
|
+
extra?: Record<string, any>;
|
|
26
|
+
editable?: boolean;
|
|
27
|
+
required?: boolean;
|
|
28
|
+
enabled?: boolean;
|
|
29
|
+
layout?: Record<string, GridProps['xs'] | GridProps['sm'] | GridProps['md'] | GridProps['lg'] | GridProps['xl']>;
|
|
30
|
+
validators?: ValidatorSchema[];
|
|
31
|
+
wrapper?: 'label' | 'fieldset';
|
|
32
|
+
}
|
|
33
|
+
export interface FieldsetSpec {
|
|
34
|
+
key: string;
|
|
35
|
+
fields: string[];
|
|
36
|
+
label?: FieldLabelProps;
|
|
37
|
+
body?: React.ReactNode;
|
|
38
|
+
}
|
|
39
|
+
export declare type FormData = UseFormOptions['defaultValues'];
|
|
40
|
+
export interface FormContextProps {
|
|
41
|
+
fieldsetsMap?: Record<string, FieldsetSpec>;
|
|
42
|
+
fieldsMap: Record<string, FieldSpec>;
|
|
43
|
+
control: UseFormMethods['control'];
|
|
44
|
+
register: UseFormMethods['register'];
|
|
45
|
+
reset: UseFormMethods['reset'];
|
|
46
|
+
registerField: (field: FieldSpec) => void;
|
|
47
|
+
errors: UseFormMethods['errors'];
|
|
48
|
+
componentRegistry?: FieldComponentRegistry;
|
|
49
|
+
}
|
|
50
|
+
export interface FormBuilderProps {
|
|
51
|
+
fields?: FieldSpec[];
|
|
52
|
+
fieldsets?: FieldsetSpec[];
|
|
53
|
+
initial?: FormData;
|
|
54
|
+
onSubmit?: (data: FormData) => void | null | FieldError[];
|
|
55
|
+
mode?: UseFormOptions['mode'];
|
|
56
|
+
reValidateMode?: UseFormOptions['reValidateMode'];
|
|
57
|
+
criteriaMode?: UseFormOptions['criteriaMode'];
|
|
58
|
+
children?: React.ReactNode;
|
|
59
|
+
shouldFocusError?: boolean;
|
|
60
|
+
auto?: boolean;
|
|
61
|
+
validatorRegistry?: Record<string, ValidatorSchema>;
|
|
62
|
+
componentRegistry?: FieldComponentRegistry;
|
|
63
|
+
grid?: boolean;
|
|
64
|
+
}
|
|
65
|
+
export interface FormBaseProps extends Omit<FormBuilderProps, 'fields' | 'fieldsets' | 'auto'> {
|
|
66
|
+
fieldsetsMap?: Record<string, FieldsetSpec>;
|
|
67
|
+
fieldsMap: Record<string, FieldSpec>;
|
|
68
|
+
registerField: (field: FieldSpec) => void;
|
|
69
|
+
resolver: any;
|
|
70
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as yup from 'yup';
|
|
2
|
+
import { FieldSpec } from '@digigov/form/types';
|
|
3
|
+
import { ValidatorSchema } from '@digigov/form/validators/types';
|
|
4
|
+
import { MutableRefObject } from 'react';
|
|
5
|
+
export declare const getYUPTypeMap: () => Record<string, yup>;
|
|
6
|
+
export interface MutableRefObjectProps {
|
|
7
|
+
}
|
|
8
|
+
export declare function useValidationSchema(fields: FieldSpec[] | MutableRefObject<MutableRefObjectProps>, validatorRegistry?: Record<string, ValidatorSchema>): Record<string, unknown> | void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const FILE_MAX_SIZE_VALIDATOR: (field: any) => any;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as yup from 'yup';
|
|
2
|
+
import { FieldSpec } from '@digigov/form/types';
|
|
3
|
+
import { ValidatorSchema } from '@digigov/form/validators/types';
|
|
4
|
+
export * from '@digigov/form/validators/utils/afm';
|
|
5
|
+
export * from '@digigov/form/validators/utils/file';
|
|
6
|
+
export * from '@digigov/form/validators/utils/iban';
|
|
7
|
+
export * from '@digigov/form/validators/utils/phone';
|
|
8
|
+
export * from '@digigov/form/validators/utils/postal_code';
|
|
9
|
+
export * from '@digigov/form/validators/utils/uuid4';
|
|
10
|
+
export declare function getYupField(field: any, yupTypeMap: any): yup.AnySchemaConstructor;
|
|
11
|
+
export declare function computeShape(fields: FieldSpec[], yupTypeMap: Record<string, ValidatorSchema>, validatorRegistry: Record<string, ValidatorSchema> | undefined): {};
|
|
12
|
+
export declare function getYupObjectShape(fields: FieldSpec[] | any, yupTypeMap: Record<string, ValidatorSchema>, validatorRegistry?: Record<string, ValidatorSchema>): yup.ObjectSchema;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare type PhoneNumberType = 'landline' | 'mobile' | null;
|
|
2
|
+
export declare function validatePhoneNumber(phoneNumber: string, countries: string[] | undefined, typeOfPhoneNumber: PhoneNumberType): boolean;
|
|
3
|
+
export declare function matchTypeOfPhoneNumber(phone: any, type: string, phoneUtil: any): boolean;
|
|
4
|
+
export declare const MOBILE_PHONE_VALIDATOR: {
|
|
5
|
+
name: string;
|
|
6
|
+
message: string;
|
|
7
|
+
test: (value: any) => boolean;
|
|
8
|
+
};
|
|
9
|
+
export declare const PHONE_NUMBER_VALIDATOR: (field: any) => any;
|
|
File without changes
|
|
@@ -6,13 +6,13 @@ import AccordionSectionSummaryHeading from '@digigov/react-core/AccordionSection
|
|
|
6
6
|
import AccordionSectionSummary from '@digigov/react-core/AccordionSectionSummary';
|
|
7
7
|
import AccordionControls from '@digigov/react-core/AccordionControls';
|
|
8
8
|
import { UseTogglableSectionsReturn } from '@digigov/ui/hooks/useTogglableSections';
|
|
9
|
-
export declare const AccordionSectionHeader: React.ForwardRefExoticComponent<Pick<import("@digigov/react-core/AccordionSectionHeader").AccordionSectionHeaderProps, "
|
|
10
|
-
export declare const AccordionItemDetails: React.ForwardRefExoticComponent<Pick<import("@digigov/react-core/AccordionSectionContent").AccordionSectionContentProps, "
|
|
9
|
+
export declare const AccordionSectionHeader: React.ForwardRefExoticComponent<Pick<import("@digigov/react-core/AccordionSectionHeader").AccordionSectionHeaderProps, "slot" | "style" | "title" | "as" | "className" | "color" | "id" | "lang" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "margin" | "marginTop" | "marginBottom" | "marginLeft" | "marginRight" | "padding" | "paddingTop" | "paddingBottom" | "paddingLeft" | "paddingRight" | "printHidden"> & React.RefAttributes<HTMLElement>>;
|
|
10
|
+
export declare const AccordionItemDetails: React.ForwardRefExoticComponent<Pick<import("@digigov/react-core/AccordionSectionContent").AccordionSectionContentProps, "slot" | "style" | "title" | "as" | "className" | "color" | "id" | "lang" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "margin" | "marginTop" | "marginBottom" | "marginLeft" | "marginRight" | "padding" | "paddingTop" | "paddingBottom" | "paddingLeft" | "paddingRight" | "printHidden"> & React.RefAttributes<HTMLDivElement>>;
|
|
11
11
|
export declare const AccordionItemSummary: ({ children, ...props }: {
|
|
12
12
|
[x: string]: any;
|
|
13
13
|
children: any;
|
|
14
14
|
}) => JSX.Element;
|
|
15
|
-
export declare const AccordionItem: React.MemoExoticComponent<React.ForwardRefExoticComponent<Pick<import("@digigov/react-core/AccordionSection").AccordionSectionProps, "
|
|
15
|
+
export declare const AccordionItem: React.MemoExoticComponent<React.ForwardRefExoticComponent<Pick<import("@digigov/react-core/AccordionSection").AccordionSectionProps, "slot" | "style" | "title" | "as" | "className" | "color" | "id" | "lang" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "open" | "onToggle" | "margin" | "marginTop" | "marginBottom" | "marginLeft" | "marginRight" | "padding" | "paddingTop" | "paddingBottom" | "paddingLeft" | "paddingRight" | "printHidden"> & React.RefAttributes<HTMLDetailsElement>>>;
|
|
16
16
|
export interface UseAccordionProps {
|
|
17
17
|
singleOpen?: boolean;
|
|
18
18
|
}
|