@digigov/form 1.2.0-dcbd7ded → 2.0.0-0c4be34e
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/Field/FieldBase/index.js +104 -76
- package/Field/FieldBase.js.map +7 -0
- package/Field/FieldBaseContainer/index.js +29 -37
- package/Field/FieldBaseContainer.js.map +7 -0
- package/Field/FieldConditional/index.js +79 -53
- package/Field/FieldConditional.js.map +7 -0
- package/Field/index.js +102 -63
- package/Field/index.js.map +7 -0
- package/Field/types/index.js +1 -1
- package/Field/types.d.ts +40 -5
- package/Field/types.js.map +7 -0
- package/Field/utils/calculateField/index.js +27 -0
- package/{inputs/Input/__stories__/Default → Field/utils/calculateField}/package.json +1 -1
- package/Field/utils/calculateField.d.ts +2 -0
- package/Field/utils/calculateField.js.map +7 -0
- package/Field/utils/evaluateFieldWithConditions/index.js +26 -0
- package/Field/utils/evaluateFieldWithConditions/package.json +6 -0
- package/Field/utils/evaluateFieldWithConditions.d.ts +2 -0
- package/Field/utils/evaluateFieldWithConditions.js.map +7 -0
- package/Field/utils/index.d.ts +4 -0
- package/Field/utils/index.js +41 -116
- package/Field/utils/index.js.map +7 -0
- package/Field/utils/useField/index.js +51 -0
- package/{FormBuilder/FormBuilder → Field/utils/useField}/package.json +1 -1
- package/Field/utils/useField.d.ts +2 -0
- package/Field/utils/useField.js.map +7 -0
- package/FieldArray/FieldArray.stories/index.js +12 -6
- package/FieldArray/FieldArray.stories.d.ts +2 -2
- package/FieldArray/FieldArray.stories.js.map +7 -0
- package/FieldArray/__stories__/Default/index.js +87 -80
- package/FieldArray/__stories__/Default.d.ts +2 -2
- package/FieldArray/__stories__/Default.js.map +7 -0
- package/FieldArray/__stories__/WithExactLength/index.js +87 -80
- package/FieldArray/__stories__/WithExactLength.d.ts +2 -2
- package/FieldArray/__stories__/WithExactLength.js.map +7 -0
- package/FieldArray/index.d.ts +1 -0
- package/FieldArray/index.js +73 -59
- package/FieldArray/index.js.map +7 -0
- package/FieldArray/index.test.d.ts +1 -0
- package/FieldObject/index.d.ts +3 -0
- package/FieldObject/index.js +70 -52
- package/FieldObject/index.js.map +7 -0
- package/Fieldset/FieldsetWithContext/index.js +27 -31
- package/Fieldset/FieldsetWithContext.js.map +7 -0
- package/Fieldset/index.d.ts +1 -1
- package/Fieldset/index.js +27 -29
- package/Fieldset/index.js.map +7 -0
- package/Fieldset/types/index.js +1 -1
- package/Fieldset/types.d.ts +3 -2
- package/Fieldset/types.js.map +7 -0
- package/Form.stories/index.js +7 -3
- package/Form.stories.js.map +7 -0
- package/FormBuilder/FormBuilder.stories/index.js +10 -5
- package/FormBuilder/FormBuilder.stories.d.ts +1 -1
- package/FormBuilder/FormBuilder.stories.js.map +7 -0
- package/FormBuilder/__stories__/Default/index.js +27 -21
- package/FormBuilder/__stories__/Default.d.ts +2 -2
- package/FormBuilder/__stories__/Default.js.map +7 -0
- package/FormBuilder/index.d.ts +8 -1
- package/FormBuilder/index.js +158 -2
- package/FormBuilder/index.js.map +7 -0
- package/FormBuilder/index.test.d.ts +1 -0
- package/FormBuilder/scenarios.test.d.ts +88 -0
- package/FormContext/index.js +7 -3
- package/FormContext.js.map +7 -0
- package/MultiplicityField/MultiplicityField.stories/index.js +20 -10
- package/MultiplicityField/MultiplicityField.stories.d.ts +6 -6
- package/MultiplicityField/MultiplicityField.stories.js.map +7 -0
- package/MultiplicityField/__stories__/Default/index.js +90 -85
- package/MultiplicityField/__stories__/Default.d.ts +2 -2
- package/MultiplicityField/__stories__/Default.js.map +7 -0
- package/MultiplicityField/__stories__/PreviewDisplay/index.js +70 -72
- package/MultiplicityField/__stories__/PreviewDisplay.d.ts +2 -2
- package/MultiplicityField/__stories__/PreviewDisplay.js.map +7 -0
- package/MultiplicityField/__stories__/WithExactLength/index.js +87 -80
- package/MultiplicityField/__stories__/WithExactLength.d.ts +2 -2
- package/MultiplicityField/__stories__/WithExactLength.js.map +7 -0
- package/MultiplicityField/__stories__/WithMaxLength/index.js +90 -83
- package/MultiplicityField/__stories__/WithMaxLength.d.ts +2 -2
- package/MultiplicityField/__stories__/WithMaxLength.js.map +7 -0
- package/MultiplicityField/__stories__/WithMinAndMaxLength/index.js +91 -84
- package/MultiplicityField/__stories__/WithMinAndMaxLength.d.ts +2 -2
- package/MultiplicityField/__stories__/WithMinAndMaxLength.js.map +7 -0
- package/MultiplicityField/__stories__/WithMinLength/index.js +90 -83
- package/MultiplicityField/__stories__/WithMinLength.d.ts +2 -2
- package/MultiplicityField/__stories__/WithMinLength.js.map +7 -0
- package/MultiplicityField/add-objects/index.js +137 -132
- package/MultiplicityField/add-objects.d.ts +2 -1
- package/MultiplicityField/add-objects.js.map +7 -0
- package/MultiplicityField/index.d.ts +2 -19
- package/MultiplicityField/index.js +113 -106
- package/MultiplicityField/index.js.map +7 -0
- package/MultiplicityField/index.test.d.ts +1 -0
- package/MultiplicityField/types/index.js +1 -0
- package/{validators/validators.spec → MultiplicityField/types}/package.json +1 -1
- package/MultiplicityField/types.d.ts +18 -0
- package/MultiplicityField/types.js.map +7 -0
- package/Questions/Questions/index.js +48 -56
- package/Questions/Questions.js.map +7 -0
- package/Questions/Questions.stories/index.js +10 -5
- package/Questions/Questions.stories.d.ts +1 -1
- package/Questions/Questions.stories.js.map +7 -0
- package/Questions/QuestionsContext/index.js +9 -9
- package/Questions/QuestionsContext.d.ts +0 -1
- package/Questions/QuestionsContext.js.map +7 -0
- package/Questions/Step/ReviewStep/index.js +35 -47
- package/Questions/Step/ReviewStep.js.map +7 -0
- package/Questions/Step/Step/index.js +39 -47
- package/Questions/Step/Step.js.map +7 -0
- package/Questions/Step/StepArrayReview/index.js +41 -45
- package/Questions/Step/StepArrayReview.js.map +7 -0
- package/Questions/Step/StepContext/index.js +15 -19
- package/Questions/Step/StepContext.d.ts +0 -1
- package/Questions/Step/StepContext.js.map +7 -0
- package/Questions/Step/StepDescription/index.js +22 -22
- package/Questions/Step/StepDescription.js.map +7 -0
- package/Questions/Step/StepForm/index.js +33 -43
- package/Questions/Step/StepForm.js.map +7 -0
- package/Questions/Step/StepQuote/index.js +10 -9
- package/Questions/Step/StepQuote.js.map +7 -0
- package/Questions/Step/StepTitle/index.js +41 -38
- package/Questions/Step/StepTitle.d.ts +2 -1
- package/Questions/Step/StepTitle.js.map +7 -0
- package/Questions/Step/getAddMoreFields/index.js +28 -20
- package/Questions/Step/getAddMoreFields.js.map +7 -0
- package/Questions/Step/index.d.ts +0 -1
- package/Questions/Step/index.js +16 -13
- package/Questions/Step/index.js.map +7 -0
- package/Questions/Step/types/index.js +1 -1
- package/Questions/Step/types.d.ts +1 -0
- package/Questions/Step/types.js.map +7 -0
- package/Questions/__stories__/Default/index.js +106 -100
- package/Questions/__stories__/Default.d.ts +2 -2
- package/Questions/__stories__/Default.js.map +7 -0
- package/Questions/getNextStep/index.js +12 -10
- package/Questions/getNextStep.js.map +7 -0
- package/Questions/index.js +7 -3
- package/Questions/index.js.map +7 -0
- package/Questions/index.test.d.ts +1 -0
- package/Questions/types/index.js +1 -1
- package/Questions/types.d.ts +1 -0
- package/Questions/types.js.map +7 -0
- package/cjs/Field/FieldBase/index.js +136 -82
- package/cjs/Field/FieldBase.js.map +7 -0
- package/cjs/Field/FieldBaseContainer/index.js +61 -43
- package/cjs/Field/FieldBaseContainer.js.map +7 -0
- package/cjs/Field/FieldConditional/index.js +111 -59
- package/cjs/Field/FieldConditional.js.map +7 -0
- package/cjs/Field/index.js +131 -72
- package/cjs/Field/index.js.map +7 -0
- package/cjs/Field/types/index.js +16 -5
- package/cjs/Field/types.js.map +7 -0
- package/cjs/Field/utils/calculateField/index.js +50 -0
- package/cjs/Field/utils/calculateField.js.map +7 -0
- package/cjs/Field/utils/evaluateFieldWithConditions/index.js +49 -0
- package/cjs/Field/utils/evaluateFieldWithConditions.js.map +7 -0
- package/cjs/Field/utils/index.js +85 -139
- package/cjs/Field/utils/index.js.map +7 -0
- package/cjs/Field/utils/useField/index.js +74 -0
- package/cjs/Field/utils/useField.js.map +7 -0
- package/cjs/FieldArray/FieldArray.stories/index.js +46 -36
- package/cjs/FieldArray/FieldArray.stories.js.map +7 -0
- package/cjs/FieldArray/__stories__/Default/index.js +119 -89
- package/cjs/FieldArray/__stories__/Default.js.map +7 -0
- package/cjs/FieldArray/__stories__/WithExactLength/index.js +119 -89
- package/cjs/FieldArray/__stories__/WithExactLength.js.map +7 -0
- package/cjs/FieldArray/index.js +105 -65
- package/cjs/FieldArray/index.js.map +7 -0
- package/cjs/FieldObject/index.js +99 -61
- package/cjs/FieldObject/index.js.map +7 -0
- package/cjs/Fieldset/FieldsetWithContext/index.js +54 -40
- package/cjs/Fieldset/FieldsetWithContext.js.map +7 -0
- package/cjs/Fieldset/index.js +61 -39
- package/cjs/Fieldset/index.js.map +7 -0
- package/cjs/Fieldset/types/index.js +16 -5
- package/cjs/Fieldset/types.js.map +7 -0
- package/cjs/Form.stories/index.js +25 -8
- package/cjs/Form.stories.js.map +7 -0
- package/cjs/FormBuilder/FormBuilder.stories/index.js +43 -24
- package/cjs/FormBuilder/FormBuilder.stories.js.map +7 -0
- package/cjs/FormBuilder/__stories__/Default/index.js +60 -31
- package/cjs/FormBuilder/__stories__/Default.js.map +7 -0
- package/cjs/FormBuilder/index.js +194 -8
- package/cjs/FormBuilder/index.js.map +7 -0
- package/cjs/FormContext/index.js +29 -8
- package/cjs/FormContext.js.map +7 -0
- package/cjs/MultiplicityField/MultiplicityField.stories/index.js +58 -84
- package/cjs/MultiplicityField/MultiplicityField.stories.js.map +7 -0
- package/cjs/MultiplicityField/__stories__/Default/index.js +122 -94
- package/cjs/MultiplicityField/__stories__/Default.js.map +7 -0
- package/cjs/MultiplicityField/__stories__/PreviewDisplay/index.js +85 -81
- package/cjs/MultiplicityField/__stories__/PreviewDisplay.js.map +7 -0
- package/cjs/MultiplicityField/__stories__/WithExactLength/index.js +119 -89
- package/cjs/MultiplicityField/__stories__/WithExactLength.js.map +7 -0
- package/cjs/MultiplicityField/__stories__/WithMaxLength/index.js +122 -92
- package/cjs/MultiplicityField/__stories__/WithMaxLength.js.map +7 -0
- package/cjs/MultiplicityField/__stories__/WithMinAndMaxLength/index.js +123 -93
- package/cjs/MultiplicityField/__stories__/WithMinAndMaxLength.js.map +7 -0
- package/cjs/MultiplicityField/__stories__/WithMinLength/index.js +122 -92
- package/cjs/MultiplicityField/__stories__/WithMinLength.js.map +7 -0
- package/cjs/MultiplicityField/add-objects/index.js +164 -138
- package/cjs/MultiplicityField/add-objects.js.map +7 -0
- package/cjs/MultiplicityField/index.js +141 -115
- package/cjs/MultiplicityField/index.js.map +7 -0
- package/cjs/MultiplicityField/types/index.js +16 -0
- package/cjs/MultiplicityField/types.js.map +7 -0
- package/cjs/Questions/Questions/index.js +80 -65
- package/cjs/Questions/Questions.js.map +7 -0
- package/cjs/Questions/Questions.stories/index.js +43 -24
- package/cjs/Questions/Questions.stories.js.map +7 -0
- package/cjs/Questions/QuestionsContext/index.js +31 -14
- package/cjs/Questions/QuestionsContext.js.map +7 -0
- package/cjs/Questions/Step/ReviewStep/index.js +61 -56
- package/cjs/Questions/Step/ReviewStep.js.map +7 -0
- package/cjs/Questions/Step/Step/index.js +71 -56
- package/cjs/Questions/Step/Step.js.map +7 -0
- package/cjs/Questions/Step/StepArrayReview/index.js +65 -54
- package/cjs/Questions/Step/StepArrayReview.js.map +7 -0
- package/cjs/Questions/Step/StepContext/index.js +37 -24
- package/cjs/Questions/Step/StepContext.js.map +7 -0
- package/cjs/Questions/Step/StepDescription/index.js +55 -31
- package/cjs/Questions/Step/StepDescription.js.map +7 -0
- package/cjs/Questions/Step/StepForm/index.js +65 -52
- package/cjs/Questions/Step/StepForm.js.map +7 -0
- package/cjs/Questions/Step/StepQuote/index.js +42 -15
- package/cjs/Questions/Step/StepQuote.js.map +7 -0
- package/cjs/Questions/Step/StepTitle/index.js +72 -47
- package/cjs/Questions/Step/StepTitle.js.map +7 -0
- package/cjs/Questions/Step/getAddMoreFields/index.js +50 -25
- package/cjs/Questions/Step/getAddMoreFields.js.map +7 -0
- package/cjs/Questions/Step/index.js +59 -143
- package/cjs/Questions/Step/index.js.map +7 -0
- package/cjs/Questions/Step/types/index.js +16 -5
- package/cjs/Questions/Step/types.js.map +7 -0
- package/cjs/Questions/__stories__/Default/index.js +132 -109
- package/cjs/Questions/__stories__/Default.js.map +7 -0
- package/cjs/Questions/getNextStep/index.js +33 -14
- package/cjs/Questions/getNextStep.js.map +7 -0
- package/cjs/Questions/index.js +29 -19
- package/cjs/Questions/index.js.map +7 -0
- package/cjs/Questions/types/index.js +16 -5
- package/cjs/Questions/types.js.map +7 -0
- package/cjs/index.js +47 -20
- package/cjs/index.js.map +7 -0
- package/cjs/inputs/AutoCompleteInput/AutoComplete.stories/index.js +46 -24
- package/cjs/inputs/AutoCompleteInput/AutoComplete.stories.js.map +7 -0
- package/cjs/inputs/AutoCompleteInput/__stories__/Default/index.js +72 -51
- package/cjs/inputs/AutoCompleteInput/__stories__/Default.js.map +7 -0
- package/cjs/inputs/AutoCompleteInput/__stories__/Multiple/index.js +77 -0
- package/cjs/inputs/AutoCompleteInput/__stories__/Multiple.js.map +7 -0
- package/cjs/inputs/AutoCompleteInput/index.js +91 -46
- package/cjs/inputs/AutoCompleteInput/index.js.map +7 -0
- package/cjs/inputs/Checkboxes/Checkboxes.stories/index.js +49 -48
- package/cjs/inputs/Checkboxes/Checkboxes.stories.js.map +7 -0
- package/cjs/inputs/Checkboxes/__stories__/Conditional/index.js +120 -89
- package/cjs/inputs/Checkboxes/__stories__/Conditional.js.map +7 -0
- package/cjs/inputs/Checkboxes/__stories__/Default/index.js +73 -46
- package/cjs/inputs/Checkboxes/__stories__/Default.js.map +7 -0
- package/cjs/inputs/Checkboxes/__stories__/WithDivider/index.js +74 -47
- package/cjs/inputs/Checkboxes/__stories__/WithDivider.js.map +7 -0
- package/cjs/inputs/Checkboxes/index.js +100 -96
- package/cjs/inputs/Checkboxes/index.js.map +7 -0
- package/cjs/inputs/DateInput/DateInput.stories/index.js +43 -24
- package/cjs/inputs/DateInput/DateInput.stories.js.map +7 -0
- package/cjs/inputs/DateInput/__stories__/Default/index.js +51 -28
- package/cjs/inputs/DateInput/__stories__/Default.js.map +7 -0
- package/cjs/inputs/DateInput/index.js +121 -109
- package/cjs/inputs/DateInput/index.js.map +7 -0
- package/cjs/inputs/FileInput/FileInput.stories/index.js +43 -24
- package/cjs/inputs/FileInput/FileInput.stories.js.map +7 -0
- package/cjs/inputs/FileInput/__stories__/Default/index.js +57 -26
- package/cjs/inputs/FileInput/__stories__/Default.js.map +7 -0
- package/cjs/inputs/FileInput/index.js +75 -63
- package/cjs/inputs/FileInput/index.js.map +7 -0
- package/cjs/inputs/ImageInput/ImageInput.stories/index.js +49 -48
- package/cjs/inputs/ImageInput/ImageInput.stories.js.map +7 -0
- package/cjs/inputs/ImageInput/__stories__/Default/index.js +58 -33
- package/cjs/inputs/ImageInput/__stories__/Default.js.map +7 -0
- package/cjs/inputs/ImageInput/__stories__/MaxSize/index.js +69 -0
- package/cjs/inputs/ImageInput/__stories__/MaxSize.js.map +7 -0
- package/cjs/inputs/ImageInput/__stories__/WithInvalidImageDimension/index.js +66 -40
- package/cjs/inputs/ImageInput/__stories__/WithInvalidImageDimension.js.map +7 -0
- package/cjs/inputs/ImageInput/__stories__/WithInvalidImageSize/index.js +62 -37
- package/cjs/inputs/ImageInput/__stories__/WithInvalidImageSize.js.map +7 -0
- package/cjs/inputs/ImageInput/index.js +90 -83
- package/cjs/inputs/ImageInput/index.js.map +7 -0
- package/cjs/inputs/Input/Input.stories/index.js +70 -132
- package/cjs/inputs/Input/Input.stories.js.map +7 -0
- package/cjs/inputs/Input/__stories__/AFM/index.js +60 -29
- package/cjs/inputs/Input/__stories__/AFM.js.map +7 -0
- package/cjs/inputs/Input/__stories__/Boolean/index.js +61 -30
- package/cjs/inputs/Input/__stories__/Boolean.js.map +7 -0
- package/cjs/inputs/Input/__stories__/IBAN/index.js +61 -30
- package/cjs/inputs/Input/__stories__/IBAN.js.map +7 -0
- package/cjs/inputs/Input/__stories__/Integer/index.js +75 -38
- package/cjs/inputs/Input/__stories__/Integer.js.map +7 -0
- package/cjs/inputs/Input/__stories__/LandlineNumber/index.js +65 -33
- package/cjs/inputs/Input/__stories__/LandlineNumber.js.map +7 -0
- package/cjs/inputs/Input/__stories__/MobilePhone/index.js +65 -33
- package/cjs/inputs/Input/__stories__/MobilePhone.js.map +7 -0
- package/cjs/inputs/Input/__stories__/PhoneNumber/index.js +64 -32
- package/cjs/inputs/Input/__stories__/PhoneNumber.js.map +7 -0
- package/cjs/inputs/Input/__stories__/PostalCode/index.js +61 -31
- package/cjs/inputs/Input/__stories__/PostalCode.js.map +7 -0
- package/cjs/inputs/Input/__stories__/String/index.js +64 -0
- package/cjs/inputs/Input/__stories__/String.js.map +7 -0
- package/cjs/inputs/Input/__stories__/TextWithLimit/index.js +64 -0
- package/cjs/inputs/Input/__stories__/TextWithLimit.js.map +7 -0
- package/cjs/inputs/Input/index.js +98 -71
- package/cjs/inputs/Input/index.js.map +7 -0
- package/cjs/inputs/Input/inputsInputScenarios/index.js +439 -0
- package/cjs/inputs/Input/inputsInputScenarios.js.map +7 -0
- package/cjs/inputs/Label/Label.stories/index.js +43 -24
- package/cjs/inputs/Label/Label.stories.js.map +7 -0
- package/cjs/inputs/Label/__stories__/Default/index.js +68 -33
- package/cjs/inputs/Label/__stories__/Default.js.map +7 -0
- package/cjs/inputs/Label/index.js +45 -24
- package/cjs/inputs/Label/index.js.map +7 -0
- package/cjs/inputs/OtpInput/OtpInput.stories/index.js +43 -24
- package/cjs/inputs/OtpInput/OtpInput.stories.js.map +7 -0
- package/cjs/inputs/OtpInput/__stories__/Default/index.js +59 -34
- package/cjs/inputs/OtpInput/__stories__/Default.js.map +7 -0
- package/cjs/inputs/OtpInput/index.js +142 -112
- package/cjs/inputs/OtpInput/index.js.map +7 -0
- package/cjs/inputs/Radio/Radio.stories/index.js +49 -48
- package/cjs/inputs/Radio/Radio.stories.js.map +7 -0
- package/cjs/inputs/Radio/__stories__/Conditional/index.js +120 -89
- package/cjs/inputs/Radio/__stories__/Conditional.js.map +7 -0
- package/cjs/inputs/Radio/__stories__/Default/index.js +77 -51
- package/cjs/inputs/Radio/__stories__/Default.js.map +7 -0
- package/cjs/inputs/Radio/__stories__/WithDivider/index.js +78 -52
- package/cjs/inputs/Radio/__stories__/WithDivider.js.map +7 -0
- package/cjs/inputs/Radio/index.js +130 -61
- package/cjs/inputs/Radio/index.js.map +7 -0
- package/cjs/inputs/Select/Select.stories/index.js +43 -24
- package/cjs/inputs/Select/Select.stories.js.map +7 -0
- package/cjs/inputs/Select/__stories__/Default/index.js +82 -57
- package/cjs/inputs/Select/__stories__/Default.js.map +7 -0
- package/cjs/inputs/Select/index.js +54 -36
- package/cjs/inputs/Select/index.js.map +7 -0
- package/cjs/inputs/index.js +62 -69
- package/cjs/inputs/index.js.map +7 -0
- package/cjs/inputs/inputsScenarios/index.js +533 -0
- package/cjs/inputs/inputsScenarios.js.map +7 -0
- package/cjs/internal/index.js +36 -346
- package/cjs/internal.js.map +7 -0
- package/cjs/lazy/index.js +355 -516
- package/cjs/lazy.js.map +7 -0
- package/cjs/locales/el/index.js +35 -0
- package/cjs/locales/el.js.map +7 -0
- package/cjs/registry/index.js +260 -142
- package/cjs/registry.js.map +7 -0
- package/cjs/types/index.js +22 -5
- package/cjs/types.js.map +7 -0
- package/cjs/utils/index.js +79 -83
- package/cjs/utils.js.map +7 -0
- package/cjs/validators/index.js +115 -163
- package/cjs/validators/index.js.map +7 -0
- package/cjs/validators/types/index.js +16 -5
- package/cjs/validators/types.js.map +7 -0
- package/cjs/validators/utils/afm/index.js +38 -21
- package/cjs/validators/utils/afm.js.map +7 -0
- package/cjs/validators/utils/date/index.js +138 -0
- package/cjs/validators/utils/date.js.map +7 -0
- package/cjs/validators/utils/file/index.js +44 -47
- package/cjs/validators/utils/file.js.map +7 -0
- package/cjs/validators/utils/iban/index.js +36 -17
- package/cjs/validators/utils/iban.js.map +7 -0
- package/cjs/validators/utils/image/index.js +88 -112
- package/cjs/validators/utils/image.js.map +7 -0
- package/cjs/validators/utils/index.js +97 -159
- package/cjs/validators/utils/index.js.map +7 -0
- package/cjs/validators/utils/int/index.js +34 -12
- package/cjs/validators/utils/int.js.map +7 -0
- package/cjs/validators/utils/number/index.js +33 -11
- package/cjs/validators/utils/number.js.map +7 -0
- package/cjs/validators/utils/otp/index.js +35 -13
- package/cjs/validators/utils/otp.js.map +7 -0
- package/cjs/validators/utils/phone/index.js +113 -58
- package/cjs/validators/utils/phone.js.map +7 -0
- package/cjs/validators/utils/postal_code/index.js +36 -16
- package/cjs/validators/utils/postal_code.js.map +7 -0
- package/cjs/validators/utils/text_limit/index.js +40 -25
- package/cjs/validators/utils/text_limit.js.map +7 -0
- package/cjs/validators/utils/uuid4/index.js +34 -13
- package/cjs/validators/utils/uuid4.js.map +7 -0
- package/index.d.ts +4 -1
- package/index.js +13 -4
- package/index.js.map +7 -0
- package/inputs/AutoCompleteInput/AutoComplete.stories/index.js +12 -5
- package/inputs/AutoCompleteInput/AutoComplete.stories.d.ts +2 -1
- package/inputs/AutoCompleteInput/AutoComplete.stories.js.map +7 -0
- package/inputs/AutoCompleteInput/__stories__/Default/index.js +40 -42
- package/inputs/AutoCompleteInput/__stories__/Default.d.ts +3 -2
- package/inputs/AutoCompleteInput/__stories__/Default.js.map +7 -0
- package/inputs/AutoCompleteInput/__stories__/Multiple/index.js +44 -0
- package/inputs/AutoCompleteInput/__stories__/Multiple/package.json +6 -0
- package/inputs/AutoCompleteInput/__stories__/Multiple.d.ts +3 -0
- package/inputs/AutoCompleteInput/__stories__/Multiple.js.map +7 -0
- package/inputs/AutoCompleteInput/index.d.ts +2 -2
- package/inputs/AutoCompleteInput/index.js +61 -37
- package/inputs/AutoCompleteInput/index.js.map +7 -0
- package/inputs/AutoCompleteInput/index.test.d.ts +1 -0
- package/inputs/Checkboxes/Checkboxes.stories/index.js +14 -7
- package/inputs/Checkboxes/Checkboxes.stories.d.ts +3 -3
- package/inputs/Checkboxes/Checkboxes.stories.js.map +7 -0
- package/inputs/Checkboxes/__stories__/Conditional/index.js +88 -80
- package/inputs/Checkboxes/__stories__/Conditional.d.ts +3 -2
- package/inputs/Checkboxes/__stories__/Conditional.js.map +7 -0
- package/inputs/Checkboxes/__stories__/Default/index.js +40 -36
- package/inputs/Checkboxes/__stories__/Default.d.ts +2 -2
- package/inputs/Checkboxes/__stories__/Default.js.map +7 -0
- package/inputs/Checkboxes/__stories__/WithDivider/index.js +41 -37
- package/inputs/Checkboxes/__stories__/WithDivider.d.ts +2 -2
- package/inputs/Checkboxes/__stories__/WithDivider.js.map +7 -0
- package/inputs/Checkboxes/index.d.ts +2 -1
- package/inputs/Checkboxes/index.js +72 -87
- package/inputs/Checkboxes/index.js.map +7 -0
- package/inputs/Checkboxes/index.test.d.ts +1 -0
- package/inputs/DateInput/DateInput.stories/index.js +10 -5
- package/inputs/DateInput/DateInput.stories.d.ts +1 -1
- package/inputs/DateInput/DateInput.stories.js.map +7 -0
- package/inputs/DateInput/__stories__/Default/index.js +18 -18
- package/inputs/DateInput/__stories__/Default.d.ts +2 -2
- package/inputs/DateInput/__stories__/Default.js.map +7 -0
- package/inputs/DateInput/index.d.ts +3 -4
- package/inputs/DateInput/index.js +91 -99
- package/inputs/DateInput/index.js.map +7 -0
- package/inputs/DateInput/index.test.d.ts +1 -0
- package/inputs/FileInput/FileInput.stories/index.js +10 -5
- package/inputs/FileInput/FileInput.stories.d.ts +1 -1
- package/inputs/FileInput/FileInput.stories.js.map +7 -0
- package/inputs/FileInput/__stories__/Default/index.js +24 -16
- package/inputs/FileInput/__stories__/Default.d.ts +2 -2
- package/inputs/FileInput/__stories__/Default.js.map +7 -0
- package/inputs/FileInput/index.js +43 -54
- package/inputs/FileInput/index.js.map +7 -0
- package/inputs/FileInput/index.test.d.ts +1 -0
- package/inputs/ImageInput/ImageInput.stories/index.js +14 -7
- package/inputs/ImageInput/ImageInput.stories.d.ts +3 -3
- package/inputs/ImageInput/ImageInput.stories.js.map +7 -0
- package/inputs/ImageInput/__stories__/Default/index.js +25 -23
- package/inputs/ImageInput/__stories__/Default.d.ts +2 -2
- package/inputs/ImageInput/__stories__/Default.js.map +7 -0
- package/inputs/ImageInput/__stories__/MaxSize/index.js +36 -0
- package/inputs/ImageInput/__stories__/MaxSize/package.json +6 -0
- package/inputs/ImageInput/__stories__/MaxSize.d.ts +3 -0
- package/inputs/ImageInput/__stories__/MaxSize.js.map +7 -0
- package/inputs/ImageInput/__stories__/WithInvalidImageDimension/index.js +33 -30
- package/inputs/ImageInput/__stories__/WithInvalidImageDimension.d.ts +2 -2
- package/inputs/ImageInput/__stories__/WithInvalidImageDimension.js.map +7 -0
- package/inputs/ImageInput/__stories__/WithInvalidImageSize/index.js +29 -27
- package/inputs/ImageInput/__stories__/WithInvalidImageSize.d.ts +2 -2
- package/inputs/ImageInput/__stories__/WithInvalidImageSize.js.map +7 -0
- package/inputs/ImageInput/index.js +58 -75
- package/inputs/ImageInput/index.js.map +7 -0
- package/inputs/ImageInput/index.test.d.ts +1 -0
- package/inputs/Input/Input.stories/index.js +28 -14
- package/inputs/Input/Input.stories.d.ts +10 -10
- package/inputs/Input/Input.stories.js.map +7 -0
- package/inputs/Input/__stories__/AFM/index.js +27 -19
- package/inputs/Input/__stories__/AFM.d.ts +2 -2
- package/inputs/Input/__stories__/AFM.js.map +7 -0
- package/inputs/Input/__stories__/Boolean/index.js +28 -20
- package/inputs/Input/__stories__/Boolean.d.ts +2 -2
- package/inputs/Input/__stories__/Boolean.js.map +7 -0
- package/inputs/Input/__stories__/IBAN/index.js +28 -20
- package/inputs/Input/__stories__/IBAN.d.ts +2 -2
- package/inputs/Input/__stories__/IBAN.js.map +7 -0
- package/inputs/Input/__stories__/Integer/index.js +43 -29
- package/inputs/Input/__stories__/Integer.d.ts +2 -2
- package/inputs/Input/__stories__/Integer.js.map +7 -0
- package/inputs/Input/__stories__/LandlineNumber/index.js +32 -23
- package/inputs/Input/__stories__/LandlineNumber.d.ts +2 -2
- package/inputs/Input/__stories__/LandlineNumber.js.map +7 -0
- package/inputs/Input/__stories__/MobilePhone/index.js +32 -23
- package/inputs/Input/__stories__/MobilePhone.d.ts +2 -2
- package/inputs/Input/__stories__/MobilePhone.js.map +7 -0
- package/inputs/Input/__stories__/PhoneNumber/index.js +31 -22
- package/inputs/Input/__stories__/PhoneNumber.d.ts +2 -2
- package/inputs/Input/__stories__/PhoneNumber.js.map +7 -0
- package/inputs/Input/__stories__/PostalCode/index.js +28 -21
- package/inputs/Input/__stories__/PostalCode.d.ts +2 -2
- package/inputs/Input/__stories__/PostalCode.js.map +7 -0
- package/inputs/Input/__stories__/String/index.js +31 -0
- package/inputs/Input/__stories__/String/package.json +6 -0
- package/inputs/Input/__stories__/String.d.ts +3 -0
- package/inputs/Input/__stories__/String.js.map +7 -0
- package/inputs/Input/__stories__/TextWithLimit/index.js +31 -0
- package/inputs/Input/__stories__/TextWithLimit/package.json +6 -0
- package/inputs/Input/__stories__/TextWithLimit.d.ts +3 -0
- package/inputs/Input/__stories__/TextWithLimit.js.map +7 -0
- package/inputs/Input/index.js +67 -66
- package/inputs/Input/index.js.map +7 -0
- package/inputs/Input/index.test.d.ts +1 -0
- package/inputs/Input/inputsInputScenarios/index.js +406 -0
- package/inputs/Input/inputsInputScenarios/package.json +6 -0
- package/inputs/Input/inputsInputScenarios.d.ts +57 -0
- package/inputs/Input/inputsInputScenarios.js.map +7 -0
- package/inputs/Label/Label.stories/index.js +10 -5
- package/inputs/Label/Label.stories.d.ts +1 -1
- package/inputs/Label/Label.stories.js.map +7 -0
- package/inputs/Label/__stories__/Default/index.js +35 -23
- package/inputs/Label/__stories__/Default.d.ts +2 -2
- package/inputs/Label/__stories__/Default.js.map +7 -0
- package/inputs/Label/index.d.ts +1 -3
- package/inputs/Label/index.js +12 -17
- package/inputs/Label/index.js.map +7 -0
- package/inputs/Label/index.test.d.ts +1 -0
- package/inputs/OtpInput/OtpInput.stories/index.js +10 -5
- package/inputs/OtpInput/OtpInput.stories.d.ts +1 -1
- package/inputs/OtpInput/OtpInput.stories.js.map +7 -0
- package/inputs/OtpInput/__stories__/Default/index.js +26 -24
- package/inputs/OtpInput/__stories__/Default.d.ts +2 -2
- package/inputs/OtpInput/__stories__/Default.js.map +7 -0
- package/inputs/OtpInput/index.d.ts +9 -2
- package/inputs/OtpInput/index.js +109 -103
- package/inputs/OtpInput/index.js.map +7 -0
- package/inputs/OtpInput/index.test.d.ts +1 -0
- package/inputs/Radio/Radio.stories/index.js +14 -7
- package/inputs/Radio/Radio.stories.d.ts +3 -3
- package/inputs/Radio/Radio.stories.js.map +7 -0
- package/inputs/Radio/__stories__/Conditional/index.js +88 -80
- package/inputs/Radio/__stories__/Conditional.d.ts +3 -2
- package/inputs/Radio/__stories__/Conditional.js.map +7 -0
- package/inputs/Radio/__stories__/Default/index.js +44 -41
- package/inputs/Radio/__stories__/Default.d.ts +2 -2
- package/inputs/Radio/__stories__/Default.js.map +7 -0
- package/inputs/Radio/__stories__/WithDivider/index.js +45 -42
- package/inputs/Radio/__stories__/WithDivider.d.ts +2 -2
- package/inputs/Radio/__stories__/WithDivider.js.map +7 -0
- package/inputs/Radio/index.d.ts +6 -1
- package/inputs/Radio/index.js +101 -55
- package/inputs/Radio/index.js.map +7 -0
- package/inputs/Radio/index.test.d.ts +1 -0
- package/inputs/Select/Select.stories/index.js +10 -5
- package/inputs/Select/Select.stories.d.ts +1 -1
- package/inputs/Select/Select.stories.js.map +7 -0
- package/inputs/Select/__stories__/Default/index.js +49 -47
- package/inputs/Select/__stories__/Default.d.ts +2 -2
- package/inputs/Select/__stories__/Default.js.map +7 -0
- package/inputs/Select/index.d.ts +1 -1
- package/inputs/Select/index.js +26 -31
- package/inputs/Select/index.js.map +7 -0
- package/inputs/Select/index.test.d.ts +1 -0
- package/inputs/index.js +21 -9
- package/inputs/index.js.map +7 -0
- package/inputs/inputsScenarios/index.js +499 -0
- package/inputs/inputsScenarios/package.json +6 -0
- package/inputs/inputsScenarios.d.ts +296 -0
- package/inputs/inputsScenarios.js.map +7 -0
- package/internal/index.js +10 -34
- package/internal.d.ts +2 -31
- package/internal.js.map +7 -0
- package/lazy/index.js +327 -395
- package/lazy.d.ts +41 -31
- package/lazy.js.map +7 -0
- package/locales/el/index.js +6 -0
- package/{Questions/index.spec → locales/el}/package.json +1 -1
- package/locales/el.d.ts +2 -0
- package/locales/el.js.map +7 -0
- package/package.json +7 -8
- package/registry/index.js +232 -134
- package/registry.d.ts +8 -1
- package/registry.js.map +7 -0
- package/src/Field/FieldBase.tsx +3 -0
- package/src/Field/FieldBaseContainer.tsx +2 -2
- package/src/Field/FieldConditional.tsx +5 -1
- package/src/Field/index.tsx +22 -3
- package/src/Field/types.tsx +68 -5
- package/src/Field/utils/calculateField.ts +49 -0
- package/src/Field/utils/evaluateFieldWithConditions.ts +30 -0
- package/src/Field/utils/index.ts +76 -0
- package/src/Field/utils/useField.ts +54 -0
- package/src/FieldArray/FieldArray.stories.js +2 -2
- package/src/FieldArray/index.test.tsx +25 -0
- package/src/FieldArray/index.tsx +20 -9
- package/src/FieldObject/index.tsx +18 -5
- package/src/Fieldset/index.tsx +5 -5
- package/src/Fieldset/types.tsx +5 -3
- package/src/FormBuilder/FormBuilder.stories.js +1 -1
- package/{FormBuilder/FormBuilder.mdx → src/FormBuilder/doc.mdx} +20 -33
- package/src/FormBuilder/index.test.tsx +21 -0
- package/src/FormBuilder/index.tsx +177 -1
- package/src/FormBuilder/scenarios.test.tsx +1864 -0
- package/src/FormContext.tsx +1 -2
- package/src/MultiplicityField/MultiplicityField.stories.js +6 -6
- package/src/MultiplicityField/__stories__/PreviewDisplay.tsx +2 -2
- package/src/MultiplicityField/__stories__/WithExactLength.tsx +1 -1
- package/src/MultiplicityField/__stories__/WithMaxLength.tsx +1 -1
- package/src/MultiplicityField/__stories__/WithMinAndMaxLength.tsx +1 -1
- package/src/MultiplicityField/__stories__/WithMinLength.tsx +1 -1
- package/src/MultiplicityField/add-objects.tsx +31 -15
- package/{MultiplicityField/MultiplicityField.mdx → src/MultiplicityField/doc.mdx} +12 -16
- package/src/MultiplicityField/index.test.tsx +41 -0
- package/src/MultiplicityField/index.tsx +20 -34
- package/src/MultiplicityField/types.ts +21 -0
- package/src/Questions/Questions.stories.js +1 -1
- package/src/Questions/Questions.tsx +4 -4
- package/src/Questions/Step/StepArrayReview.tsx +1 -1
- package/src/Questions/Step/StepTitle.tsx +5 -3
- package/src/Questions/Step/index.ts +0 -1
- package/src/Questions/Step/types.tsx +1 -0
- package/src/Questions/__snapshots__/index.spec.tsx.snap +72 -587
- package/src/Questions/{index.mdx → doc.mdx} +13 -16
- package/src/Questions/index.spec.tsx +9 -5
- package/src/Questions/index.test.tsx +21 -0
- package/src/Questions/types.tsx +1 -0
- package/src/create-simple-form.mdx +2 -6
- package/{index.mdx → src/doc.mdx} +4 -8
- package/src/index.ts +4 -1
- package/src/inputs/AutoCompleteInput/AutoComplete.stories.js +2 -1
- package/src/inputs/AutoCompleteInput/__stories__/Default.tsx +19 -18
- package/src/inputs/AutoCompleteInput/__stories__/Multiple.tsx +47 -0
- package/src/inputs/AutoCompleteInput/doc.mdx +18 -0
- package/src/inputs/AutoCompleteInput/index.test.tsx +25 -0
- package/src/inputs/AutoCompleteInput/index.tsx +45 -29
- package/src/inputs/Checkboxes/Checkboxes.stories.js +3 -3
- package/src/inputs/Checkboxes/__stories__/Conditional.tsx +2 -3
- package/src/inputs/Checkboxes/doc.mdx +23 -0
- package/src/inputs/Checkboxes/index.test.tsx +29 -0
- package/src/inputs/Checkboxes/index.tsx +38 -33
- package/src/inputs/DateInput/DateInput.stories.js +1 -1
- package/src/inputs/DateInput/__stories__/Default.tsx +16 -15
- package/src/inputs/DateInput/doc.mdx +16 -0
- package/src/inputs/DateInput/index.test.tsx +21 -0
- package/src/inputs/DateInput/index.tsx +8 -6
- package/src/inputs/FileInput/FileInput.stories.js +1 -1
- package/src/inputs/FileInput/doc.mdx +15 -0
- package/src/inputs/FileInput/index.test.tsx +21 -0
- package/src/inputs/FileInput/index.tsx +7 -8
- package/src/inputs/ImageInput/ImageInput.stories.js +3 -3
- package/src/inputs/ImageInput/__stories__/MaxSize.tsx +37 -0
- package/src/inputs/ImageInput/__stories__/WithInvalidImageDimension.tsx +2 -0
- package/src/inputs/ImageInput/doc.mdx +23 -0
- package/src/inputs/ImageInput/index.test.tsx +33 -0
- package/src/inputs/ImageInput/index.tsx +10 -15
- package/src/inputs/Input/Input.stories.js +10 -10
- package/src/inputs/Input/__stories__/LandlineNumber.tsx +2 -1
- package/src/inputs/Input/__stories__/MobilePhone.tsx +1 -0
- package/src/inputs/Input/__stories__/PhoneNumber.tsx +1 -0
- package/src/inputs/Input/__stories__/PostalCode.tsx +1 -0
- package/src/inputs/Input/__stories__/{Default.tsx → String.tsx} +2 -2
- package/src/inputs/Input/__stories__/{TextWithCharacterLimit.tsx → TextWithLimit.tsx} +2 -2
- package/src/inputs/Input/doc.mdx +56 -0
- package/src/inputs/Input/index.test.tsx +57 -0
- package/src/inputs/Input/index.tsx +32 -29
- package/src/inputs/Input/inputsInputScenarios.ts +404 -0
- package/src/inputs/Label/Label.stories.js +1 -1
- package/src/inputs/Label/__stories__/Default.tsx +3 -1
- package/src/inputs/Label/doc.mdx +14 -0
- package/src/inputs/Label/index.test.tsx +21 -0
- package/src/inputs/Label/index.tsx +3 -10
- package/src/inputs/OtpInput/OtpInput.stories.js +1 -1
- package/src/inputs/OtpInput/doc.mdx +16 -0
- package/src/inputs/OtpInput/index.test.tsx +21 -0
- package/src/inputs/OtpInput/index.tsx +4 -3
- package/src/inputs/Radio/Radio.stories.js +3 -3
- package/src/inputs/Radio/__stories__/Conditional.tsx +4 -1
- package/src/inputs/Radio/doc.mdx +23 -0
- package/src/inputs/Radio/index.test.tsx +29 -0
- package/src/inputs/Radio/index.tsx +78 -9
- package/src/inputs/Select/Select.stories.js +1 -1
- package/src/inputs/Select/doc.mdx +13 -0
- package/src/inputs/Select/index.test.tsx +21 -0
- package/src/inputs/Select/index.tsx +5 -3
- package/src/inputs/inputsScenarios.ts +496 -0
- package/src/installation.mdx +2 -5
- package/src/internal.ts +2 -31
- package/src/lazy.js +322 -59
- package/src/locales/el.ts +3 -0
- package/src/registry.js +129 -41
- package/src/types.tsx +11 -64
- package/src/utils.ts +34 -33
- package/src/validators/index.ts +38 -71
- package/src/validators/utils/date.ts +107 -0
- package/src/validators/utils/file.ts +11 -9
- package/src/validators/utils/index.ts +1 -0
- package/src/validators/utils/phone.ts +63 -72
- package/src/validators/utils/postal_code.ts +1 -1
- package/src/validators/utils/uuid4.ts +2 -1
- package/src/validators/validators.spec.ts +6 -40
- package/types/index.js +2 -1
- package/types.d.ts +6 -35
- package/types.js.map +7 -0
- package/utils/index.js +57 -77
- package/utils.js.map +7 -0
- package/validators/index.js +92 -148
- package/validators/index.js.map +7 -0
- package/validators/types/index.js +1 -1
- package/validators/types.js.map +7 -0
- package/validators/utils/afm/index.js +16 -16
- package/validators/utils/afm.js.map +7 -0
- package/validators/utils/date/index.js +103 -0
- package/validators/utils/date/package.json +6 -0
- package/validators/utils/date.d.ts +9 -0
- package/validators/utils/date.js.map +7 -0
- package/validators/utils/file/index.js +22 -42
- package/validators/utils/file.js.map +7 -0
- package/validators/utils/iban/index.js +14 -12
- package/validators/utils/iban.js.map +7 -0
- package/validators/utils/image/index.js +66 -106
- package/validators/utils/image.js.map +7 -0
- package/validators/utils/index.d.ts +1 -0
- package/validators/utils/index.js +55 -48
- package/validators/utils/index.js.map +7 -0
- package/validators/utils/int/index.js +12 -7
- package/validators/utils/int.js.map +7 -0
- package/validators/utils/number/index.js +11 -6
- package/validators/utils/number.js.map +7 -0
- package/validators/utils/otp/index.js +13 -8
- package/validators/utils/otp.js.map +7 -0
- package/validators/utils/phone/index.js +89 -51
- package/validators/utils/phone.d.ts +1 -1
- package/validators/utils/phone.js.map +7 -0
- package/validators/utils/postal_code/index.js +14 -11
- package/validators/utils/postal_code.d.ts +1 -1
- package/validators/utils/postal_code.js.map +7 -0
- package/validators/utils/text_limit/index.js +18 -20
- package/validators/utils/text_limit.js.map +7 -0
- package/validators/utils/uuid4/index.js +12 -8
- package/validators/utils/uuid4.js.map +7 -0
- package/Field/utils.d.ts +0 -5
- package/FieldArray/FieldArray.stories.playwright.json +0 -353
- package/FormBuilder/FormBuilder/index.js +0 -152
- package/FormBuilder/FormBuilder.d.ts +0 -5
- package/FormBuilder/FormBuilder.stories.playwright.json +0 -52
- package/MultiplicityField/MultiplicityField.stories.playwright.json +0 -1370
- package/Questions/__snapshots__/index.spec.tsx.snap +0 -596
- package/Questions/index.mdx +0 -415
- package/Questions/index.spec/index.js +0 -59
- package/cjs/Field/index.mdx +0 -6
- package/cjs/FieldArray/FieldArray.stories.playwright.json +0 -353
- package/cjs/FormBuilder/FormBuilder/index.js +0 -162
- package/cjs/FormBuilder/FormBuilder.mdx +0 -256
- package/cjs/FormBuilder/FormBuilder.stories.playwright.json +0 -52
- package/cjs/MultiplicityField/MultiplicityField.mdx +0 -590
- package/cjs/MultiplicityField/MultiplicityField.stories.playwright.json +0 -1370
- package/cjs/Questions/__snapshots__/index.spec.tsx.snap +0 -596
- package/cjs/Questions/index.mdx +0 -415
- package/cjs/Questions/index.spec/index.js +0 -63
- package/cjs/create-simple-form.mdx +0 -539
- package/cjs/index.mdx +0 -51
- package/cjs/inputs/Checkboxes/Checkboxes.stories.playwright.json +0 -85
- package/cjs/inputs/Checkboxes/index.mdx +0 -0
- package/cjs/inputs/DateInput/DateInput.stories.playwright.json +0 -72
- package/cjs/inputs/FileInput/FileInput.stories.playwright.json +0 -75
- package/cjs/inputs/ImageInput/ImageInput.stories.playwright.json +0 -77
- package/cjs/inputs/Input/Input.stories.playwright.json +0 -376
- package/cjs/inputs/Input/__stories__/Default/index.js +0 -33
- package/cjs/inputs/Input/__stories__/TextWithCharacterLimit/index.js +0 -39
- package/cjs/inputs/Input/index.mdx +0 -8
- package/cjs/inputs/Label/Label.stories.playwright.json +0 -40
- package/cjs/inputs/Label/index.mdx +0 -0
- package/cjs/inputs/Radio/Radio.stories.playwright.json +0 -73
- package/cjs/inputs/Radio/index.mdx +0 -0
- package/cjs/inputs/Select/Select.stories.playwright.json +0 -22
- package/cjs/installation.mdx +0 -68
- package/cjs/validators/validators.spec/index.js +0 -87
- package/create-simple-form.mdx +0 -539
- package/inputs/Checkboxes/Checkboxes.stories.playwright.json +0 -85
- package/inputs/Checkboxes/index.mdx +0 -0
- package/inputs/DateInput/DateInput.stories.playwright.json +0 -72
- package/inputs/FileInput/FileInput.stories.playwright.json +0 -75
- package/inputs/ImageInput/ImageInput.stories.playwright.json +0 -77
- package/inputs/Input/Input.stories.playwright.json +0 -376
- package/inputs/Input/__stories__/Default/index.js +0 -23
- package/inputs/Input/__stories__/Default.d.ts +0 -3
- package/inputs/Input/__stories__/TextWithCharacterLimit/index.js +0 -29
- package/inputs/Input/__stories__/TextWithCharacterLimit/package.json +0 -6
- package/inputs/Input/__stories__/TextWithCharacterLimit.d.ts +0 -3
- package/inputs/Input/index.mdx +0 -8
- package/inputs/Label/Label.stories.playwright.json +0 -40
- package/inputs/Label/index.mdx +0 -0
- package/inputs/Radio/Radio.stories.playwright.json +0 -73
- package/inputs/Radio/index.mdx +0 -0
- package/inputs/Select/Select.stories.playwright.json +0 -22
- package/installation.mdx +0 -68
- package/src/Field/index.mdx +0 -6
- package/src/Field/utils.ts +0 -191
- package/src/FieldArray/FieldArray.stories.playwright.json +0 -353
- package/src/FormBuilder/FormBuilder.mdx +0 -256
- package/src/FormBuilder/FormBuilder.stories.playwright.json +0 -52
- package/src/FormBuilder/FormBuilder.tsx +0 -166
- package/src/MultiplicityField/MultiplicityField.mdx +0 -590
- package/src/MultiplicityField/MultiplicityField.stories.playwright.json +0 -1370
- package/src/index.mdx +0 -51
- package/src/inputs/Checkboxes/Checkboxes.stories.playwright.json +0 -85
- package/src/inputs/Checkboxes/index.mdx +0 -0
- package/src/inputs/DateInput/DateInput.stories.playwright.json +0 -72
- package/src/inputs/FileInput/FileInput.stories.playwright.json +0 -75
- package/src/inputs/ImageInput/ImageInput.stories.playwright.json +0 -77
- package/src/inputs/Input/Input.stories.playwright.json +0 -376
- package/src/inputs/Input/index.mdx +0 -8
- package/src/inputs/Label/Label.stories.playwright.json +0 -40
- package/src/inputs/Label/index.mdx +0 -0
- package/src/inputs/Radio/Radio.stories.playwright.json +0 -73
- package/src/inputs/Radio/index.mdx +0 -0
- package/src/inputs/Select/Select.stories.playwright.json +0 -22
- package/validators/validators.spec/index.js +0 -85
- /package/{Field/index.mdx → src/Field/doc.mdx} +0 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/inputs/FileInput/index.tsx"],
|
|
4
|
+
"sourcesContent": ["import React, { useState } from 'react';\nimport { UncontrolledFieldProps } from '@digigov/form/Field/types';\nimport { Button } from '@digigov/ui/form/Button';\nimport { FileUpload, FileUploadContainer } from '@digigov/ui/form/FileUpload';\nimport { useTranslation } from '@digigov/ui/i18n';\nimport { Hint } from '@digigov/ui/typography/Hint';\nimport { Paragraph } from '@digigov/ui/typography/Paragraph';\nexport interface FileInputProps extends Omit<UncontrolledFieldProps, 'extra'> {\n extra?: {\n className?: string;\n multiple?: boolean;\n accept?: string;\n limit: {\n maxSize?: number;\n };\n };\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const FileInput: React.FC<any> = React.forwardRef(function FileInput(\n { name, disabled, reset, onChange, ...props },\n ref: any\n) {\n const { t } = useTranslation();\n const [files, setFiles] = useState<string[] | undefined>([]);\n const handleChange = (e) => {\n const target = e.target as HTMLInputElement;\n const selectedFiles = Array.from(\n target.files as ArrayLike<{ name: string }>\n ).map(({ name }) => name);\n setFiles(selectedFiles);\n // proceed calling the onChange provided\n // by react-hook-form\n onChange(e);\n };\n return (\n <>\n <FileUploadContainer hasFiles={files && files.length > 0}>\n {files?.length ? (\n <>\n <Paragraph>\n <b>{t('upload.file')}:</b> {`${files.join(', ')}`}\n </Paragraph>\n </>\n ) : (\n <Hint>{t('upload.no_file')}</Hint>\n )}\n <FileUpload\n ref={ref}\n hasFiles={!!files?.length}\n name={name}\n disabled={disabled}\n onChange={handleChange}\n {...{ ...props, required: undefined }}\n >\n {files?.length ? t('upload.change_file') : t('upload.choose_file')}\n </FileUpload>\n {files !== undefined && files.length > 0 && (\n <>\n <Button\n variant=\"link\"\n onClick={(event) => {\n event.preventDefault();\n reset({ [name]: '' });\n setFiles(undefined);\n }}\n >\n {t('upload.reset_file')}\n </Button>\n </>\n )}\n </FileUploadContainer>\n </>\n );\n});\n\nexport default FileInput;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAgC;AAEhC,oBAAuB;AACvB,wBAAgD;AAChD,kBAA+B;AAC/B,kBAAqB;AACrB,uBAA0B;AAanB,MAAM,YAA2B,aAAAA,QAAM,WAAW,SAASC,WAChE,EAAE,MAAM,UAAU,OAAO,UAAU,GAAG,MAAM,GAC5C,KACA;AACA,QAAM,EAAE,EAAE,QAAI,4BAAe;AAC7B,QAAM,CAAC,OAAO,QAAQ,QAAI,uBAA+B,CAAC,CAAC;AAC3D,QAAM,eAAe,CAAC,MAAM;AAC1B,UAAM,SAAS,EAAE;AACjB,UAAM,gBAAgB,MAAM;AAAA,MAC1B,OAAO;AAAA,IACT,EAAE,IAAI,CAAC,EAAE,MAAAC,MAAK,MAAMA,KAAI;AACxB,aAAS,aAAa;AAGtB,aAAS,CAAC;AAAA,EACZ;AACA,SACE,6BAAAF,QAAA,2BAAAA,QAAA,gBACE,6BAAAA,QAAA,cAAC,yCAAoB,UAAU,SAAS,MAAM,SAAS,KACpD,OAAO,SACN,6BAAAA,QAAA,2BAAAA,QAAA,gBACE,6BAAAA,QAAA,cAAC,kCACC,6BAAAA,QAAA,cAAC,WAAG,EAAE,aAAa,GAAE,GAAC,GAAI,KAAE,GAAG,MAAM,KAAK,IAAI,CAAC,EACjD,CACF,IAEA,6BAAAA,QAAA,cAAC,wBAAM,EAAE,gBAAgB,CAAE,GAE7B,6BAAAA,QAAA;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,UAAU,CAAC,CAAC,OAAO;AAAA,MACnB;AAAA,MACA;AAAA,MACA,UAAU;AAAA,MACT,GAAG,EAAE,GAAG,OAAO,UAAU,OAAU;AAAA;AAAA,IAEnC,OAAO,SAAS,EAAE,oBAAoB,IAAI,EAAE,oBAAoB;AAAA,EACnE,GACC,UAAU,UAAa,MAAM,SAAS,KACrC,6BAAAA,QAAA,2BAAAA,QAAA,gBACE,6BAAAA,QAAA;AAAA,IAAC;AAAA;AAAA,MACC,SAAQ;AAAA,MACR,SAAS,CAAC,UAAU;AAClB,cAAM,eAAe;AACrB,cAAM,EAAE,CAAC,IAAI,GAAG,GAAG,CAAC;AACpB,iBAAS,MAAS;AAAA,MACpB;AAAA;AAAA,IAEC,EAAE,mBAAmB;AAAA,EACxB,CACF,CAEJ,CACF;AAEJ,CAAC;AAED,IAAO,oBAAQ;",
|
|
6
|
+
"names": ["React", "FileInput", "name"]
|
|
7
|
+
}
|
|
@@ -1,50 +1,51 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var
|
|
4
|
-
Object.
|
|
5
|
-
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
var ImageInput_stories_exports = {};
|
|
29
|
+
__export(ImageInput_stories_exports, {
|
|
30
|
+
Default: () => import_Default.Default,
|
|
31
|
+
MaxSize: () => import_MaxSize.MaxSize,
|
|
32
|
+
WithInvalidImageDimension: () => import_WithInvalidImageDimension.WithInvalidImageDimension,
|
|
33
|
+
default: () => ImageInput_stories_default
|
|
6
34
|
});
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
35
|
+
module.exports = __toCommonJS(ImageInput_stories_exports);
|
|
36
|
+
var import_ImageInput = __toESM(require("@digigov/form/inputs/ImageInput"));
|
|
37
|
+
var import_Default = require("@digigov/form/inputs/ImageInput/__stories__/Default");
|
|
38
|
+
var import_WithInvalidImageDimension = require("@digigov/form/inputs/ImageInput/__stories__/WithInvalidImageDimension");
|
|
39
|
+
var import_MaxSize = require("@digigov/form/inputs/ImageInput/__stories__/MaxSize");
|
|
40
|
+
var ImageInput_stories_default = {
|
|
41
|
+
title: "Digigov Form/inputs/ImageInput",
|
|
42
|
+
component: import_ImageInput.default,
|
|
43
|
+
displayName: "ImageInput"
|
|
44
|
+
};
|
|
45
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
46
|
+
0 && (module.exports = {
|
|
47
|
+
Default,
|
|
48
|
+
MaxSize,
|
|
49
|
+
WithInvalidImageDimension
|
|
21
50
|
});
|
|
22
|
-
|
|
23
|
-
Object.keys(_WithInvalidImageSize).forEach(function (key) {
|
|
24
|
-
if (key === "default" || key === "__esModule") return;
|
|
25
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
26
|
-
if (key in exports && exports[key] === _WithInvalidImageSize[key]) return;
|
|
27
|
-
Object.defineProperty(exports, key, {
|
|
28
|
-
enumerable: true,
|
|
29
|
-
get: function get() {
|
|
30
|
-
return _WithInvalidImageSize[key];
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
});
|
|
34
|
-
var _WithInvalidImageDimension = require("@digigov/form/inputs/ImageInput/__stories__/WithInvalidImageDimension");
|
|
35
|
-
Object.keys(_WithInvalidImageDimension).forEach(function (key) {
|
|
36
|
-
if (key === "default" || key === "__esModule") return;
|
|
37
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
38
|
-
if (key in exports && exports[key] === _WithInvalidImageDimension[key]) return;
|
|
39
|
-
Object.defineProperty(exports, key, {
|
|
40
|
-
enumerable: true,
|
|
41
|
-
get: function get() {
|
|
42
|
-
return _WithInvalidImageDimension[key];
|
|
43
|
-
}
|
|
44
|
-
});
|
|
45
|
-
});
|
|
46
|
-
var _default = exports["default"] = {
|
|
47
|
-
title: 'Digigov Form/inputs/ImageInput',
|
|
48
|
-
component: _ImageInput["default"],
|
|
49
|
-
displayName: 'ImageInput'
|
|
50
|
-
};
|
|
51
|
+
//# sourceMappingURL=ImageInput.stories.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/inputs/ImageInput/ImageInput.stories.js"],
|
|
4
|
+
"sourcesContent": ["import ImageInput from '@digigov/form/inputs/ImageInput';\nexport default {\n title: 'Digigov Form/inputs/ImageInput',\n component: ImageInput,\n displayName: 'ImageInput',\n};\nexport { Default } from '@digigov/form/inputs/ImageInput/__stories__/Default';\nexport { WithInvalidImageDimension } from '@digigov/form/inputs/ImageInput/__stories__/WithInvalidImageDimension';\nexport { MaxSize } from '@digigov/form/inputs/ImageInput/__stories__/MaxSize';\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAAuB;AAMvB,qBAAwB;AACxB,uCAA0C;AAC1C,qBAAwB;AAPxB,IAAO,6BAAQ;AAAA,EACb,OAAO;AAAA,EACP,WAAW,kBAAAA;AAAA,EACX,aAAa;AACf;",
|
|
6
|
+
"names": ["ImageInput"]
|
|
7
|
+
}
|
|
@@ -1,38 +1,63 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
Object.
|
|
6
|
-
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
var Default_exports = {};
|
|
29
|
+
__export(Default_exports, {
|
|
30
|
+
Default: () => Default,
|
|
31
|
+
default: () => Default_default
|
|
7
32
|
});
|
|
8
|
-
exports
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
33
|
+
module.exports = __toCommonJS(Default_exports);
|
|
34
|
+
var import_react = __toESM(require("react"));
|
|
35
|
+
var import_form = __toESM(require("@digigov/form"));
|
|
36
|
+
var import_Button = require("@digigov/ui/form/Button");
|
|
37
|
+
const FIELDS = [
|
|
38
|
+
{
|
|
39
|
+
key: "image",
|
|
40
|
+
type: "image",
|
|
41
|
+
required: true,
|
|
42
|
+
label: {
|
|
43
|
+
primary: "\u0391\u03BD\u03AD\u03B2\u03B1\u03C3\u03BC\u03B1 \u03C6\u03C9\u03C4\u03BF\u03B3\u03C1\u03B1\u03C6\u03AF\u03B1\u03C2"
|
|
44
|
+
}
|
|
20
45
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
var Default = exports.Default = function Default() {
|
|
26
|
-
return /*#__PURE__*/_react["default"].createElement(_form["default"], {
|
|
46
|
+
];
|
|
47
|
+
const Default = () => /* @__PURE__ */ import_react.default.createElement(
|
|
48
|
+
import_form.default,
|
|
49
|
+
{
|
|
27
50
|
fields: FIELDS,
|
|
28
|
-
onSubmit:
|
|
51
|
+
onSubmit: (data) => {
|
|
29
52
|
console.log(data);
|
|
30
53
|
}
|
|
31
|
-
},
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
54
|
+
},
|
|
55
|
+
/* @__PURE__ */ import_react.default.createElement(import_form.Fieldset, null, FIELDS.map((field) => /* @__PURE__ */ import_react.default.createElement(import_form.Field, { key: field.key, name: field.key }))),
|
|
56
|
+
/* @__PURE__ */ import_react.default.createElement(import_Button.Button, { type: "submit" }, "\u03A3\u03C5\u03BD\u03AD\u03C7\u03B5\u03B9\u03B1")
|
|
57
|
+
);
|
|
58
|
+
var Default_default = Default;
|
|
59
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
60
|
+
0 && (module.exports = {
|
|
61
|
+
Default
|
|
62
|
+
});
|
|
63
|
+
//# sourceMappingURL=Default.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/inputs/ImageInput/__stories__/Default.tsx"],
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport FormBuilder, { Field, Fieldset } from '@digigov/form';\nimport { FieldSpec } from '@digigov/form/types';\nimport { Button } from '@digigov/ui/form/Button';\nconst FIELDS: FieldSpec[] = [\n {\n key: 'image',\n type: 'image',\n required: true,\n label: {\n primary: '\u0391\u03BD\u03AD\u03B2\u03B1\u03C3\u03BC\u03B1 \u03C6\u03C9\u03C4\u03BF\u03B3\u03C1\u03B1\u03C6\u03AF\u03B1\u03C2',\n },\n },\n];\n\nexport const Default = () => (\n <FormBuilder\n fields={FIELDS}\n onSubmit={(data) => {\n console.log(data);\n }}\n >\n <Fieldset>\n {FIELDS.map((field) => (\n <Field key={field.key} name={field.key} />\n ))}\n </Fieldset>\n <Button type=\"submit\">\u03A3\u03C5\u03BD\u03AD\u03C7\u03B5\u03B9\u03B1</Button>\n </FormBuilder>\n);\nexport default Default;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,kBAA6C;AAE7C,oBAAuB;AACvB,MAAM,SAAsB;AAAA,EAC1B;AAAA,IACE,KAAK;AAAA,IACL,MAAM;AAAA,IACN,UAAU;AAAA,IACV,OAAO;AAAA,MACL,SAAS;AAAA,IACX;AAAA,EACF;AACF;AAEO,MAAM,UAAU,MACrB,6BAAAA,QAAA;AAAA,EAAC,YAAAC;AAAA,EAAA;AAAA,IACC,QAAQ;AAAA,IACR,UAAU,CAAC,SAAS;AAClB,cAAQ,IAAI,IAAI;AAAA,IAClB;AAAA;AAAA,EAEA,6BAAAD,QAAA,cAAC,4BACE,OAAO,IAAI,CAAC,UACX,6BAAAA,QAAA,cAAC,qBAAM,KAAK,MAAM,KAAK,MAAM,MAAM,KAAK,CACzC,CACH;AAAA,EACA,6BAAAA,QAAA,cAAC,wBAAO,MAAK,YAAS,kDAAQ;AAChC;AAEF,IAAO,kBAAQ;",
|
|
6
|
+
"names": ["React", "FormBuilder"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
var MaxSize_exports = {};
|
|
29
|
+
__export(MaxSize_exports, {
|
|
30
|
+
MaxSize: () => MaxSize,
|
|
31
|
+
default: () => MaxSize_default
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(MaxSize_exports);
|
|
34
|
+
var import_react = __toESM(require("react"));
|
|
35
|
+
var import_form = __toESM(require("@digigov/form"));
|
|
36
|
+
var import_Button = require("@digigov/ui/form/Button");
|
|
37
|
+
const FIELDS = [
|
|
38
|
+
{
|
|
39
|
+
key: "image",
|
|
40
|
+
type: "image",
|
|
41
|
+
required: true,
|
|
42
|
+
label: {
|
|
43
|
+
primary: "\u0391\u03BD\u03AD\u03B2\u03B1\u03C3\u03BC\u03B1 \u03C6\u03C9\u03C4\u03BF\u03B3\u03C1\u03B1\u03C6\u03AF\u03B1\u03C2",
|
|
44
|
+
secondary: "\u039C\u03AD\u03B3\u03B9\u03C3\u03C4\u03BF \u03BC\u03AD\u03B3\u03B5\u03B8\u03BF\u03C2 \u03C6\u03C9\u03C4\u03BF\u03B3\u03C1\u03B1\u03C6\u03AF\u03B1\u03C2: 10KB."
|
|
45
|
+
},
|
|
46
|
+
extra: {
|
|
47
|
+
limit: {
|
|
48
|
+
maxSize: 1e3
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
];
|
|
53
|
+
const MaxSize = () => /* @__PURE__ */ import_react.default.createElement(
|
|
54
|
+
import_form.default,
|
|
55
|
+
{
|
|
56
|
+
fields: FIELDS,
|
|
57
|
+
onSubmit: (data) => {
|
|
58
|
+
console.log(data);
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
/* @__PURE__ */ import_react.default.createElement(import_form.Fieldset, null, FIELDS.map((field) => /* @__PURE__ */ import_react.default.createElement(import_form.Field, { key: field.key, name: field.key }))),
|
|
62
|
+
/* @__PURE__ */ import_react.default.createElement(import_Button.Button, { type: "submit" }, "\u03A3\u03C5\u03BD\u03AD\u03C7\u03B5\u03B9\u03B1")
|
|
63
|
+
);
|
|
64
|
+
var MaxSize_default = MaxSize;
|
|
65
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
66
|
+
0 && (module.exports = {
|
|
67
|
+
MaxSize
|
|
68
|
+
});
|
|
69
|
+
//# sourceMappingURL=MaxSize.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/inputs/ImageInput/__stories__/MaxSize.tsx"],
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport FormBuilder, { Field, Fieldset } from '@digigov/form';\nimport { FieldSpec } from '@digigov/form/types';\nimport { Button } from '@digigov/ui/form/Button';\nconst FIELDS: FieldSpec[] = [\n {\n key: 'image',\n type: 'image',\n required: true,\n label: {\n primary: '\u0391\u03BD\u03AD\u03B2\u03B1\u03C3\u03BC\u03B1 \u03C6\u03C9\u03C4\u03BF\u03B3\u03C1\u03B1\u03C6\u03AF\u03B1\u03C2',\n secondary: '\u039C\u03AD\u03B3\u03B9\u03C3\u03C4\u03BF \u03BC\u03AD\u03B3\u03B5\u03B8\u03BF\u03C2 \u03C6\u03C9\u03C4\u03BF\u03B3\u03C1\u03B1\u03C6\u03AF\u03B1\u03C2: 10KB.',\n },\n extra: {\n limit: {\n maxSize: 1000,\n },\n },\n },\n];\n\nexport const MaxSize = () => (\n <FormBuilder\n fields={FIELDS}\n onSubmit={(data) => {\n console.log(data);\n }}\n >\n <Fieldset>\n {FIELDS.map((field) => (\n <Field key={field.key} name={field.key} />\n ))}\n </Fieldset>\n <Button type=\"submit\">\u03A3\u03C5\u03BD\u03AD\u03C7\u03B5\u03B9\u03B1</Button>\n </FormBuilder>\n);\nexport default MaxSize;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,kBAA6C;AAE7C,oBAAuB;AACvB,MAAM,SAAsB;AAAA,EAC1B;AAAA,IACE,KAAK;AAAA,IACL,MAAM;AAAA,IACN,UAAU;AAAA,IACV,OAAO;AAAA,MACL,SAAS;AAAA,MACT,WAAW;AAAA,IACb;AAAA,IACA,OAAO;AAAA,MACL,OAAO;AAAA,QACL,SAAS;AAAA,MACX;AAAA,IACF;AAAA,EACF;AACF;AAEO,MAAM,UAAU,MACrB,6BAAAA,QAAA;AAAA,EAAC,YAAAC;AAAA,EAAA;AAAA,IACC,QAAQ;AAAA,IACR,UAAU,CAAC,SAAS;AAClB,cAAQ,IAAI,IAAI;AAAA,IAClB;AAAA;AAAA,EAEA,6BAAAD,QAAA,cAAC,4BACE,OAAO,IAAI,CAAC,UACX,6BAAAA,QAAA,cAAC,qBAAM,KAAK,MAAM,KAAK,MAAM,MAAM,KAAK,CACzC,CACH;AAAA,EACA,6BAAAA,QAAA,cAAC,wBAAO,MAAK,YAAS,kDAAQ;AAChC;AAEF,IAAO,kBAAQ;",
|
|
6
|
+
"names": ["React", "FormBuilder"]
|
|
7
|
+
}
|
|
@@ -1,46 +1,72 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
Object.
|
|
6
|
-
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
var WithInvalidImageDimension_exports = {};
|
|
29
|
+
__export(WithInvalidImageDimension_exports, {
|
|
30
|
+
WithInvalidImageDimension: () => WithInvalidImageDimension,
|
|
31
|
+
default: () => WithInvalidImageDimension_default
|
|
7
32
|
});
|
|
8
|
-
exports
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
33
|
+
module.exports = __toCommonJS(WithInvalidImageDimension_exports);
|
|
34
|
+
var import_react = __toESM(require("react"));
|
|
35
|
+
var import_form = __toESM(require("@digigov/form"));
|
|
36
|
+
var import_Button = require("@digigov/ui/form/Button");
|
|
37
|
+
const FIELDS = [
|
|
38
|
+
{
|
|
39
|
+
key: "image",
|
|
40
|
+
type: "image",
|
|
41
|
+
required: true,
|
|
42
|
+
label: {
|
|
43
|
+
primary: "\u0391\u03BD\u03AD\u03B2\u03B1\u03C3\u03BC\u03B1 \u03C6\u03C9\u03C4\u03BF\u03B3\u03C1\u03B1\u03C6\u03AF\u03B1\u03C2",
|
|
44
|
+
secondary: "\u039F\u03B9 \u03B5\u03C0\u03B9\u03C4\u03C1\u03B5\u03C0\u03CC\u03BC\u03B5\u03BD\u03B5\u03C2 \u03B4\u03B9\u03B1\u03C3\u03C4\u03AC\u03C3\u03B5\u03B9\u03C2 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03B3\u03B9\u03B1 \u03C4\u03BF \u03CD\u03C8\u03BF\u03C2 \u03B1\u03C0\u03CC 100 \u03BC\u03AD\u03C7\u03C1\u03B9 400 \u03BA\u03B1\u03B9 \u03B3\u03B9\u03B1 \u03C4\u03BF \u03C0\u03BB\u03AC\u03C4\u03BF\u03C2 \u03B1\u03C0\u03CC 100 \u03BC\u03AD\u03C7\u03C1\u03B9 400."
|
|
45
|
+
},
|
|
46
|
+
extra: {
|
|
47
|
+
limit: {
|
|
48
|
+
maxHeight: 400,
|
|
49
|
+
maxWidth: 400,
|
|
50
|
+
minHeight: 100,
|
|
51
|
+
minWidth: 100
|
|
52
|
+
}
|
|
27
53
|
}
|
|
28
54
|
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
var WithInvalidImageDimension = exports.WithInvalidImageDimension = function WithInvalidImageDimension() {
|
|
34
|
-
return /*#__PURE__*/_react["default"].createElement(_form["default"], {
|
|
55
|
+
];
|
|
56
|
+
const WithInvalidImageDimension = () => /* @__PURE__ */ import_react.default.createElement(
|
|
57
|
+
import_form.default,
|
|
58
|
+
{
|
|
35
59
|
fields: FIELDS,
|
|
36
|
-
onSubmit:
|
|
60
|
+
onSubmit: (data) => {
|
|
37
61
|
console.log(data);
|
|
38
62
|
}
|
|
39
|
-
},
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
63
|
+
},
|
|
64
|
+
/* @__PURE__ */ import_react.default.createElement(import_form.Fieldset, null, FIELDS.map((field) => /* @__PURE__ */ import_react.default.createElement(import_form.Field, { key: field.key, name: field.key }))),
|
|
65
|
+
/* @__PURE__ */ import_react.default.createElement(import_Button.Button, { type: "submit" }, "\u03A3\u03C5\u03BD\u03AD\u03C7\u03B5\u03B9\u03B1")
|
|
66
|
+
);
|
|
67
|
+
var WithInvalidImageDimension_default = WithInvalidImageDimension;
|
|
68
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
69
|
+
0 && (module.exports = {
|
|
70
|
+
WithInvalidImageDimension
|
|
71
|
+
});
|
|
72
|
+
//# sourceMappingURL=WithInvalidImageDimension.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/inputs/ImageInput/__stories__/WithInvalidImageDimension.tsx"],
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport FormBuilder, { Field, Fieldset } from '@digigov/form';\nimport { FieldSpec } from '@digigov/form/types';\nimport { Button } from '@digigov/ui/form/Button';\nconst FIELDS: FieldSpec[] = [\n {\n key: 'image',\n type: 'image',\n required: true,\n label: {\n primary: '\u0391\u03BD\u03AD\u03B2\u03B1\u03C3\u03BC\u03B1 \u03C6\u03C9\u03C4\u03BF\u03B3\u03C1\u03B1\u03C6\u03AF\u03B1\u03C2',\n secondary:\n '\u039F\u03B9 \u03B5\u03C0\u03B9\u03C4\u03C1\u03B5\u03C0\u03CC\u03BC\u03B5\u03BD\u03B5\u03C2 \u03B4\u03B9\u03B1\u03C3\u03C4\u03AC\u03C3\u03B5\u03B9\u03C2 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03B3\u03B9\u03B1 \u03C4\u03BF \u03CD\u03C8\u03BF\u03C2 \u03B1\u03C0\u03CC 100 \u03BC\u03AD\u03C7\u03C1\u03B9 400 \u03BA\u03B1\u03B9 \u03B3\u03B9\u03B1 \u03C4\u03BF \u03C0\u03BB\u03AC\u03C4\u03BF\u03C2 \u03B1\u03C0\u03CC 100 \u03BC\u03AD\u03C7\u03C1\u03B9 400.',\n },\n extra: {\n limit: {\n maxHeight: 400,\n maxWidth: 400,\n minHeight: 100,\n minWidth: 100,\n },\n },\n },\n];\n\nexport const WithInvalidImageDimension = () => (\n <FormBuilder\n fields={FIELDS}\n onSubmit={(data) => {\n console.log(data);\n }}\n >\n <Fieldset>\n {FIELDS.map((field) => (\n <Field key={field.key} name={field.key} />\n ))}\n </Fieldset>\n <Button type=\"submit\">\u03A3\u03C5\u03BD\u03AD\u03C7\u03B5\u03B9\u03B1</Button>\n </FormBuilder>\n);\nexport default WithInvalidImageDimension;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,kBAA6C;AAE7C,oBAAuB;AACvB,MAAM,SAAsB;AAAA,EAC1B;AAAA,IACE,KAAK;AAAA,IACL,MAAM;AAAA,IACN,UAAU;AAAA,IACV,OAAO;AAAA,MACL,SAAS;AAAA,MACT,WACE;AAAA,IACJ;AAAA,IACA,OAAO;AAAA,MACL,OAAO;AAAA,QACL,WAAW;AAAA,QACX,UAAU;AAAA,QACV,WAAW;AAAA,QACX,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AACF;AAEO,MAAM,4BAA4B,MACvC,6BAAAA,QAAA;AAAA,EAAC,YAAAC;AAAA,EAAA;AAAA,IACC,QAAQ;AAAA,IACR,UAAU,CAAC,SAAS;AAClB,cAAQ,IAAI,IAAI;AAAA,IAClB;AAAA;AAAA,EAEA,6BAAAD,QAAA,cAAC,4BACE,OAAO,IAAI,CAAC,UACX,6BAAAA,QAAA,cAAC,qBAAM,KAAK,MAAM,KAAK,MAAM,MAAM,KAAK,CACzC,CACH;AAAA,EACA,6BAAAA,QAAA,cAAC,wBAAO,MAAK,YAAS,kDAAQ;AAChC;AAEF,IAAO,oCAAQ;",
|
|
6
|
+
"names": ["React", "FormBuilder"]
|
|
7
|
+
}
|
|
@@ -1,43 +1,68 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
Object.
|
|
6
|
-
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
var WithInvalidImageSize_exports = {};
|
|
29
|
+
__export(WithInvalidImageSize_exports, {
|
|
30
|
+
WithInvalidImageSize: () => WithInvalidImageSize,
|
|
31
|
+
default: () => WithInvalidImageSize_default
|
|
7
32
|
});
|
|
8
|
-
exports
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
33
|
+
module.exports = __toCommonJS(WithInvalidImageSize_exports);
|
|
34
|
+
var import_react = __toESM(require("react"));
|
|
35
|
+
var import_form = __toESM(require("@digigov/form"));
|
|
36
|
+
var import_Button = require("@digigov/ui/form/Button");
|
|
37
|
+
const FIELDS = [
|
|
38
|
+
{
|
|
39
|
+
key: "image",
|
|
40
|
+
type: "image",
|
|
41
|
+
required: true,
|
|
42
|
+
label: {
|
|
43
|
+
primary: "\u0391\u03BD\u03AD\u03B2\u03B1\u03C3\u03BC\u03B1 \u03C6\u03C9\u03C4\u03BF\u03B3\u03C1\u03B1\u03C6\u03AF\u03B1\u03C2"
|
|
44
|
+
},
|
|
45
|
+
extra: {
|
|
46
|
+
limit: {
|
|
47
|
+
maxSize: 300
|
|
48
|
+
}
|
|
24
49
|
}
|
|
25
50
|
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
var WithInvalidImageSize = exports.WithInvalidImageSize = function WithInvalidImageSize() {
|
|
31
|
-
return /*#__PURE__*/_react["default"].createElement(_form["default"], {
|
|
51
|
+
];
|
|
52
|
+
const WithInvalidImageSize = () => /* @__PURE__ */ import_react.default.createElement(
|
|
53
|
+
import_form.default,
|
|
54
|
+
{
|
|
32
55
|
fields: FIELDS,
|
|
33
|
-
onSubmit:
|
|
56
|
+
onSubmit: (data) => {
|
|
34
57
|
console.log(data);
|
|
35
58
|
}
|
|
36
|
-
},
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
59
|
+
},
|
|
60
|
+
/* @__PURE__ */ import_react.default.createElement(import_form.Fieldset, null, FIELDS.map((field) => /* @__PURE__ */ import_react.default.createElement(import_form.Field, { key: field.key, name: field.key }))),
|
|
61
|
+
/* @__PURE__ */ import_react.default.createElement(import_Button.Button, { type: "submit" }, "\u03A3\u03C5\u03BD\u03AD\u03C7\u03B5\u03B9\u03B1")
|
|
62
|
+
);
|
|
63
|
+
var WithInvalidImageSize_default = WithInvalidImageSize;
|
|
64
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
65
|
+
0 && (module.exports = {
|
|
66
|
+
WithInvalidImageSize
|
|
67
|
+
});
|
|
68
|
+
//# sourceMappingURL=WithInvalidImageSize.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/inputs/ImageInput/__stories__/WithInvalidImageSize.tsx"],
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport FormBuilder, { Field, Fieldset } from '@digigov/form';\nimport { FieldSpec } from '@digigov/form/types';\nimport { Button } from '@digigov/ui/form/Button';\nconst FIELDS: FieldSpec[] = [\n {\n key: 'image',\n type: 'image',\n required: true,\n label: {\n primary: '\u0391\u03BD\u03AD\u03B2\u03B1\u03C3\u03BC\u03B1 \u03C6\u03C9\u03C4\u03BF\u03B3\u03C1\u03B1\u03C6\u03AF\u03B1\u03C2',\n },\n extra: {\n limit: {\n maxSize: 300,\n },\n },\n },\n];\n\nexport const WithInvalidImageSize = () => (\n <FormBuilder\n fields={FIELDS}\n onSubmit={(data) => {\n console.log(data);\n }}\n >\n <Fieldset>\n {FIELDS.map((field) => (\n <Field key={field.key} name={field.key} />\n ))}\n </Fieldset>\n <Button type=\"submit\">\u03A3\u03C5\u03BD\u03AD\u03C7\u03B5\u03B9\u03B1</Button>\n </FormBuilder>\n);\nexport default WithInvalidImageSize;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,kBAA6C;AAE7C,oBAAuB;AACvB,MAAM,SAAsB;AAAA,EAC1B;AAAA,IACE,KAAK;AAAA,IACL,MAAM;AAAA,IACN,UAAU;AAAA,IACV,OAAO;AAAA,MACL,SAAS;AAAA,IACX;AAAA,IACA,OAAO;AAAA,MACL,OAAO;AAAA,QACL,SAAS;AAAA,MACX;AAAA,IACF;AAAA,EACF;AACF;AAEO,MAAM,uBAAuB,MAClC,6BAAAA,QAAA;AAAA,EAAC,YAAAC;AAAA,EAAA;AAAA,IACC,QAAQ;AAAA,IACR,UAAU,CAAC,SAAS;AAClB,cAAQ,IAAI,IAAI;AAAA,IAClB;AAAA;AAAA,EAEA,6BAAAD,QAAA,cAAC,4BACE,OAAO,IAAI,CAAC,UACX,6BAAAA,QAAA,cAAC,qBAAM,KAAK,MAAM,KAAK,MAAM,MAAM,KAAK,CACzC,CACH;AAAA,EACA,6BAAAA,QAAA,cAAC,wBAAO,MAAK,YAAS,kDAAQ;AAChC;AAEF,IAAO,+BAAQ;",
|
|
6
|
+
"names": ["React", "FormBuilder"]
|
|
7
|
+
}
|