@axa-fr/canopee-react 1.8.1-alpha.1 → 2.0.0-RC.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/dist/client.d.ts +21 -19
- package/dist/client.js +21 -19
- package/dist/distributeur/Accordion/Accordion.d.ts +1 -3
- package/dist/distributeur/Accordion/Accordion.js +2 -5
- package/dist/distributeur/Accordion/CollapseCard.d.ts +1 -3
- package/dist/distributeur/Accordion/CollapseCard.js +2 -4
- package/dist/distributeur/Accordion/Header.d.ts +1 -3
- package/dist/distributeur/Accordion/Header.js +1 -2
- package/dist/distributeur/Action/Action.d.ts +8 -4
- package/dist/distributeur/Action/Action.js +4 -5
- package/dist/distributeur/Button/Button.d.ts +9 -7
- package/dist/distributeur/Button/Button.js +8 -2
- package/dist/distributeur/ButtonMultiActions/ButtonMultiActions.d.ts +10 -0
- package/dist/distributeur/ButtonMultiActions/ButtonMultiActions.js +51 -0
- package/dist/distributeur/ButtonMultiActions/index.d.ts +2 -0
- package/dist/distributeur/ButtonMultiActions/index.js +1 -0
- package/dist/distributeur/Card/BaseCard.d.ts +14 -0
- package/dist/distributeur/Card/BaseCard.js +23 -0
- package/dist/distributeur/CardButton/CardButton.d.ts +18 -0
- package/dist/distributeur/CardButton/CardButton.js +12 -0
- package/dist/distributeur/ClickableGhost.d.ts +36 -0
- package/dist/distributeur/ClickableGhost.js +26 -0
- package/dist/distributeur/Form/Checkbox/Checkbox.d.ts +6 -3
- package/dist/distributeur/Form/Checkbox/Checkbox.js +11 -6
- package/dist/distributeur/Form/Checkbox/CheckboxInput.d.ts +6 -3
- package/dist/distributeur/Form/Checkbox/CheckboxInput.js +5 -5
- package/dist/distributeur/Form/Checkbox/CheckboxItem.d.ts +7 -5
- package/dist/distributeur/Form/Checkbox/CheckboxItem.js +5 -5
- package/dist/distributeur/Form/Choice/Choice.d.ts +6 -5
- package/dist/distributeur/Form/Choice/Choice.js +4 -4
- package/dist/distributeur/Form/Choice/ChoiceInput.d.ts +6 -3
- package/dist/distributeur/Form/Choice/ChoiceInput.js +2 -4
- package/dist/distributeur/Form/Date/Date.d.ts +5 -3
- package/dist/distributeur/Form/Date/Date.js +5 -5
- package/dist/distributeur/Form/Date/DateInput.d.ts +4 -1
- package/dist/distributeur/Form/Date/DateInput.js +2 -4
- package/dist/distributeur/Form/Experimental/DateInput.d.ts +31 -0
- package/dist/distributeur/Form/Experimental/DateInput.js +27 -0
- package/dist/distributeur/Form/Experimental/Input.d.ts +5 -1
- package/dist/distributeur/Form/Experimental/Input.js +4 -4
- package/dist/distributeur/Form/Experimental/InputContainer.d.ts +4 -1
- package/dist/distributeur/Form/Experimental/InputContainer.js +2 -2
- package/dist/distributeur/Form/Experimental/InputUnit.d.ts +1 -1
- package/dist/distributeur/Form/Experimental/InputUnit.js +1 -1
- package/dist/distributeur/Form/Experimental/ItemMessage.d.ts +1 -1
- package/dist/distributeur/Form/Experimental/ItemMessage.js +1 -1
- package/dist/distributeur/Form/Experimental/Label.d.ts +1 -2
- package/dist/distributeur/Form/Experimental/Legend.d.ts +12 -0
- package/dist/distributeur/Form/Experimental/Legend.js +3 -0
- package/dist/distributeur/Form/Experimental/Radio/AddRadioCard.d.ts +7 -0
- package/dist/distributeur/Form/Experimental/Radio/AddRadioCard.js +14 -0
- package/dist/distributeur/Form/Experimental/Radio/RadioButton.d.ts +13 -0
- package/dist/distributeur/Form/Experimental/Radio/RadioButton.js +3 -0
- package/dist/distributeur/Form/Experimental/Radio/RadioCard.d.ts +10 -0
- package/dist/distributeur/Form/Experimental/Radio/RadioCard.js +13 -0
- package/dist/distributeur/Form/Experimental/Radio/RadioGroup.d.ts +8 -0
- package/dist/distributeur/Form/Experimental/Radio/RadioGroup.js +10 -0
- package/dist/distributeur/Form/Experimental/Radio/RadioInput.d.ts +18 -0
- package/dist/distributeur/Form/Experimental/Radio/RadioInput.js +34 -0
- package/dist/distributeur/Form/Experimental/Radio/RadioItem.d.ts +4 -0
- package/dist/distributeur/Form/Experimental/Radio/RadioItem.js +10 -0
- package/dist/distributeur/Form/Experimental/Radio/RadioText.d.ts +6 -0
- package/dist/distributeur/Form/Experimental/Radio/RadioText.js +3 -0
- package/dist/distributeur/Form/Experimental/Radio/_radioInputOptions.d.ts +8 -0
- package/dist/distributeur/Form/Experimental/Radio/_radioInputOptions.js +7 -0
- package/dist/distributeur/Form/Experimental/Select.d.ts +8 -0
- package/dist/distributeur/Form/Experimental/Select.js +16 -0
- package/dist/distributeur/Form/Experimental/SelectInput.d.ts +36 -0
- package/dist/distributeur/Form/Experimental/SelectInput.js +26 -0
- package/dist/distributeur/Form/Experimental/TextInput.d.ts +4 -1
- package/dist/distributeur/Form/Experimental/TextInput.js +4 -4
- package/dist/distributeur/Form/Experimental/index.d.ts +11 -0
- package/dist/distributeur/Form/Experimental/index.js +9 -0
- package/dist/distributeur/Form/Experimental/types.d.ts +1 -1
- package/dist/distributeur/Form/Experimental/useInput.hook.js +1 -1
- package/dist/distributeur/Form/File/File.d.ts +1 -3
- package/dist/distributeur/Form/File/File.js +1 -2
- package/dist/distributeur/Form/File/FileInput.d.ts +3 -1
- package/dist/distributeur/Form/File/FileInput.js +2 -2
- package/dist/distributeur/Form/File/FileLine.d.ts +1 -2
- package/dist/distributeur/Form/File/FileLine.js +6 -3
- package/dist/distributeur/Form/File/FileTable.d.ts +1 -2
- package/dist/distributeur/Form/File/FileTable.js +6 -3
- package/dist/distributeur/Form/MultiSelect/MultiSelectInput.js +1 -1
- package/dist/distributeur/Form/NestedQuestion/NestedQuestion.js +7 -3
- package/dist/distributeur/Form/Number/Number.d.ts +5 -5
- package/dist/distributeur/Form/Number/Number.js +6 -7
- package/dist/distributeur/Form/Number/NumberInput.js +1 -1
- package/dist/distributeur/Form/Radio/Radio.d.ts +12 -23
- package/dist/distributeur/Form/Radio/Radio.js +4 -4
- package/dist/distributeur/Form/Radio/RadioInput.d.ts +6 -3
- package/dist/distributeur/Form/Radio/RadioInput.js +4 -4
- package/dist/distributeur/Form/Radio/RadioItem.d.ts +4 -3
- package/dist/distributeur/Form/Radio/RadioItem.js +5 -5
- package/dist/distributeur/Form/Select/Select.d.ts +8 -340
- package/dist/distributeur/Form/Select/Select.js +5 -6
- package/dist/distributeur/Form/Select/SelectBase.d.ts +6 -23
- package/dist/distributeur/Form/Select/SelectBase.js +4 -9
- package/dist/distributeur/Form/Select/SelectDefault.d.ts +7 -4
- package/dist/distributeur/Form/Select/SelectDefault.js +4 -4
- package/dist/distributeur/Form/Select/SelectInput.d.ts +9 -376
- package/dist/distributeur/Form/Select/SelectInput.js +2 -4
- package/dist/distributeur/Form/Select/index.d.ts +0 -1
- package/dist/distributeur/Form/Select/index.js +0 -1
- package/dist/distributeur/Form/Text/Text.d.ts +5 -3
- package/dist/distributeur/Form/Text/Text.js +5 -5
- package/dist/distributeur/Form/Text/TextInput.d.ts +4 -1
- package/dist/distributeur/Form/Text/TextInput.js +2 -4
- package/dist/distributeur/Form/Textarea/Textarea.d.ts +8 -4
- package/dist/distributeur/Form/Textarea/Textarea.js +5 -5
- package/dist/distributeur/Form/Textarea/TextareaInput.d.ts +4 -1
- package/dist/distributeur/Form/Textarea/TextareaInput.js +2 -4
- package/dist/distributeur/Form/core/Field.d.ts +4 -23
- package/dist/distributeur/Form/core/Field.js +23 -16
- package/dist/distributeur/Form/core/FieldError.js +5 -2
- package/dist/distributeur/Form/core/getOptionClassName.d.ts +1 -1
- package/dist/distributeur/Form/core/getOptionClassName.js +2 -6
- package/dist/distributeur/Form/core/index.d.ts +0 -8
- package/dist/distributeur/Form/core/index.js +0 -4
- package/dist/distributeur/HelpButton/index.d.ts +1 -1
- package/dist/distributeur/HelpButton/index.js +4 -6
- package/dist/distributeur/ItemFormHelper/ItemFormHelper.d.ts +8 -0
- package/dist/distributeur/ItemFormHelper/ItemFormHelper.js +31 -0
- package/dist/distributeur/Layout/Footer/Footer.d.ts +5 -3
- package/dist/distributeur/Layout/Footer/Footer.js +2 -2
- package/dist/distributeur/Layout/Header/Header.d.ts +1 -3
- package/dist/distributeur/Layout/Header/Header.js +1 -2
- package/dist/distributeur/Layout/Header/HeaderTitle/HeaderTitle.d.ts +1 -2
- package/dist/distributeur/Layout/Header/HeaderTitle/HeaderTitle.js +7 -4
- package/dist/distributeur/Layout/Header/Infos/Infos.d.ts +1 -3
- package/dist/distributeur/Layout/Header/Infos/Infos.js +1 -2
- package/dist/distributeur/Layout/Header/Name/Name.d.ts +1 -3
- package/dist/distributeur/Layout/Header/Name/Name.js +2 -3
- package/dist/distributeur/Layout/Header/NavBar/NavBar.js +1 -6
- package/dist/distributeur/Layout/Header/NavBar/NavBarBase.d.ts +1 -3
- package/dist/distributeur/Layout/Header/NavBar/NavBarBase.js +7 -3
- package/dist/distributeur/Layout/Header/NavBar/NavBarItem/NavBarItem.d.ts +2 -2
- package/dist/distributeur/Layout/Header/NavBar/NavBarItem/NavBarItem.js +10 -3
- package/dist/distributeur/Layout/Header/NavBar/NavBarItem/NavBarItemBase.d.ts +1 -2
- package/dist/distributeur/Layout/Header/NavBar/NavBarItem/NavBarItemBase.js +7 -4
- package/dist/distributeur/Layout/Header/User/User.d.ts +1 -11
- package/dist/distributeur/Layout/Header/User/User.js +1 -2
- package/dist/distributeur/Link/Link.d.ts +4 -1
- package/dist/distributeur/Link/Link.js +3 -4
- package/dist/distributeur/Link/LinkAnchor.d.ts +8 -7
- package/dist/distributeur/Link/LinkAnchor.js +5 -5
- package/dist/distributeur/Loader/ItemLoader.d.ts +4 -0
- package/dist/distributeur/Loader/ItemLoader.js +8 -0
- package/dist/distributeur/Loader/Loader.d.ts +7 -10
- package/dist/distributeur/Loader/Loader.js +12 -27
- package/dist/distributeur/Loader/SquareLoader.d.ts +15 -0
- package/dist/distributeur/Loader/SquareLoader.js +33 -0
- package/dist/distributeur/Messages/Message.d.ts +2 -6
- package/dist/distributeur/Messages/Message.js +3 -14
- package/dist/distributeur/ModalAgent/BooleanModal.d.ts +4 -6
- package/dist/distributeur/ModalAgent/BooleanModal.js +9 -6
- package/dist/distributeur/ModalAgent/Modal.d.ts +5 -7
- package/dist/distributeur/ModalAgent/Modal.js +10 -19
- package/dist/distributeur/ModalAgent/components/Body.d.ts +2 -5
- package/dist/distributeur/ModalAgent/components/Body.js +1 -2
- package/dist/distributeur/ModalAgent/components/Footer.d.ts +2 -5
- package/dist/distributeur/ModalAgent/components/Footer.js +1 -2
- package/dist/distributeur/ModalAgent/components/Header.d.ts +1 -11
- package/dist/distributeur/ModalAgent/components/Header.js +2 -3
- package/dist/distributeur/ModalAgent/components/HeaderBase.d.ts +2 -5
- package/dist/distributeur/ModalAgent/components/HeaderBase.js +1 -2
- package/dist/distributeur/Popover/AnimatedPopover.d.ts +1 -3
- package/dist/distributeur/Popover/AnimatedPopover.js +1 -2
- package/dist/distributeur/Popover/Popover.d.ts +1 -3
- package/dist/distributeur/Popover/Popover.js +2 -2
- package/dist/distributeur/Popover/Popover.types.d.ts +0 -2
- package/dist/distributeur/Popover/PopoverBase.d.ts +1 -3
- package/dist/distributeur/Popover/PopoverBase.js +2 -2
- package/dist/distributeur/Popover/PopoverClick.d.ts +1 -1
- package/dist/distributeur/Popover/PopoverClick.js +2 -2
- package/dist/distributeur/Popover/PopoverOver.d.ts +1 -1
- package/dist/distributeur/Popover/PopoverOver.js +2 -2
- package/dist/distributeur/Restitution/ArticleRestitution.d.ts +2 -5
- package/dist/distributeur/Restitution/ArticleRestitution.js +1 -2
- package/dist/distributeur/Restitution/HeaderRestitution.d.ts +1 -3
- package/dist/distributeur/Restitution/HeaderRestitution.js +1 -2
- package/dist/distributeur/Restitution/Restitution.d.ts +1 -3
- package/dist/distributeur/Restitution/Restitution.js +2 -2
- package/dist/distributeur/Restitution/SectionRestitution.d.ts +1 -3
- package/dist/distributeur/Restitution/SectionRestitution.js +1 -2
- package/dist/distributeur/Restitution/SectionRestitutionColumn.d.ts +1 -3
- package/dist/distributeur/Restitution/SectionRestitutionColumn.js +1 -2
- package/dist/distributeur/Restitution/SectionRestitutionRow.d.ts +1 -3
- package/dist/distributeur/Restitution/SectionRestitutionRow.js +5 -9
- package/dist/distributeur/Restitution/SectionRestitutionTitle.d.ts +1 -3
- package/dist/distributeur/Restitution/SectionRestitutionTitle.js +1 -2
- package/dist/distributeur/Steps/Step.d.ts +1 -1
- package/dist/distributeur/Steps/Step.js +4 -4
- package/dist/distributeur/Steps/StepBase.d.ts +1 -3
- package/dist/distributeur/Steps/StepBase.js +1 -2
- package/dist/distributeur/Steps/Steps.d.ts +1 -3
- package/dist/distributeur/Steps/Steps.js +1 -2
- package/dist/distributeur/Steps/VerticalStep.d.ts +2 -8
- package/dist/distributeur/Summary/index.d.ts +1 -1
- package/dist/distributeur/Summary/index.js +1 -2
- package/dist/distributeur/Svg/svgInjector.js +1 -0
- package/dist/distributeur/Table/Pagination/Items.d.ts +1 -2
- package/dist/distributeur/Table/Pagination/Items.js +8 -8
- package/dist/distributeur/Table/Pagination/Pager.d.ts +1 -2
- package/dist/distributeur/Table/Pagination/Pager.js +6 -3
- package/dist/distributeur/Table/Pagination/Paging.d.ts +1 -1
- package/dist/distributeur/Table/Pagination/Paging.js +6 -3
- package/dist/distributeur/Table/TBody.d.ts +1 -5
- package/dist/distributeur/Table/TBody.js +1 -2
- package/dist/distributeur/Table/THead.d.ts +2 -5
- package/dist/distributeur/Table/THead.js +1 -2
- package/dist/distributeur/Table/Table.d.ts +6 -33
- package/dist/distributeur/Table/Table.js +1 -10
- package/dist/distributeur/Table/Td.d.ts +1 -5
- package/dist/distributeur/Table/Td.js +1 -2
- package/dist/distributeur/Table/Th.d.ts +2 -4
- package/dist/distributeur/Table/Th.js +2 -2
- package/dist/distributeur/Table/Tr.d.ts +2 -5
- package/dist/distributeur/Table/Tr.js +1 -2
- package/dist/distributeur/Table/index.d.ts +1 -1
- package/dist/distributeur/Tabs/components/Tab.d.ts +0 -4
- package/dist/distributeur/Tabs/components/TabsStateless.d.ts +3 -7
- package/dist/distributeur/Tabs/components/TabsStateless.js +2 -2
- package/dist/distributeur/Tag/Tag.d.ts +4 -6
- package/dist/distributeur/Tag/Tag.js +5 -5
- package/dist/distributeur/Title/Title.d.ts +4 -3
- package/dist/distributeur/Title/Title.js +5 -5
- package/dist/distributeur/utilities.d.ts +1 -1
- package/dist/distributeur/utilities.js +1 -1
- package/dist/distributeur-experimental.d.ts +2 -0
- package/dist/distributeur-experimental.js +2 -0
- package/dist/distributeur.d.ts +13 -21
- package/dist/distributeur.js +12 -17
- package/dist/prospect-client/AccordionCore/AccordionCoreCommon.d.ts +3 -5
- package/dist/prospect-client/AccordionCore/AccordionCoreCommon.js +10 -4
- package/dist/prospect-client/AppName/AppName.d.ts +44 -0
- package/dist/prospect-client/AppName/AppName.js +23 -0
- package/dist/prospect-client/Card/CardApollo.d.ts +1 -1
- package/dist/prospect-client/Card/CardApollo.js +1 -1
- package/dist/prospect-client/Card/CardCommon.d.ts +30 -2
- package/dist/prospect-client/Card/CardCommon.js +18 -1
- package/dist/prospect-client/Card/CardLF.d.ts +1 -1
- package/dist/prospect-client/Card/CardLF.js +1 -1
- package/dist/prospect-client/CardMessage/CardMessageCommon.js +6 -4
- package/dist/prospect-client/ContentItemDuoAction/ContentItemDuoActionCommon.d.ts +2 -2
- package/dist/prospect-client/ContentItemDuoAction/ContentItemDuoActionCommon.js +5 -2
- package/dist/prospect-client/ContentItemMono/ContentItemMonoCommon.d.ts +0 -4
- package/dist/prospect-client/ContentItemMono/ContentItemMonoCommon.js +2 -3
- package/dist/prospect-client/DataAgent/DataAgentCommon.js +2 -2
- package/dist/prospect-client/Divider/DividerCommon.d.ts +1 -2
- package/dist/prospect-client/Divider/DividerCommon.js +3 -3
- package/dist/prospect-client/Form/Checkbox/CardCheckbox/CardCheckboxApollo.d.ts +1 -0
- package/dist/prospect-client/Form/Checkbox/CardCheckbox/CardCheckboxApollo.js +1 -1
- package/dist/prospect-client/Form/Checkbox/CardCheckbox/CardCheckboxCommon.d.ts +2 -18
- package/dist/prospect-client/Form/Checkbox/CardCheckbox/CardCheckboxCommon.js +4 -4
- package/dist/prospect-client/Form/Checkbox/CardCheckbox/CardCheckboxLF.d.ts +1 -0
- package/dist/prospect-client/Form/Checkbox/CardCheckbox/CardCheckboxLF.js +1 -1
- package/dist/prospect-client/Form/Checkbox/CardCheckboxOption/CardCheckboxOptionCommon.d.ts +4 -1
- package/dist/prospect-client/Form/Checkbox/CardCheckboxOption/CardCheckboxOptionCommon.js +3 -3
- package/dist/prospect-client/Form/Checkbox/Checkbox/CheckboxCommon.d.ts +2 -3
- package/dist/prospect-client/Form/Checkbox/Checkbox/CheckboxCommon.js +7 -3
- package/dist/prospect-client/Form/Checkbox/CheckboxText/CheckboxTextApollo.d.ts +4 -1
- package/dist/prospect-client/Form/Checkbox/CheckboxText/CheckboxTextApollo.js +2 -3
- package/dist/prospect-client/Form/Checkbox/CheckboxText/CheckboxTextCommon.d.ts +5 -6
- package/dist/prospect-client/Form/Checkbox/CheckboxText/CheckboxTextCommon.js +5 -5
- package/dist/prospect-client/Form/Checkbox/CheckboxText/CheckboxTextLF.d.ts +4 -1
- package/dist/prospect-client/Form/Checkbox/CheckboxText/CheckboxTextLF.js +2 -3
- package/dist/prospect-client/Form/Dropdown/DropdownApollo.js +1 -1
- package/dist/prospect-client/Form/Dropdown/DropdownCommon.d.ts +7 -13
- package/dist/prospect-client/Form/Dropdown/DropdownCommon.js +6 -6
- package/dist/prospect-client/Form/Dropdown/DropdownLF.js +1 -1
- package/dist/prospect-client/Form/FileUpload/FileUpload/FileUploadApollo.d.ts +4 -1
- package/dist/prospect-client/Form/FileUpload/FileUpload/FileUploadApollo.js +1 -2
- package/dist/prospect-client/Form/FileUpload/FileUpload/FileUploadCommon.d.ts +4 -1
- package/dist/prospect-client/Form/FileUpload/FileUpload/FileUploadCommon.js +4 -4
- package/dist/prospect-client/Form/FileUpload/FileUpload/FileUploadLF.d.ts +4 -1
- package/dist/prospect-client/Form/FileUpload/FileUpload/FileUploadLF.js +1 -2
- package/dist/prospect-client/Form/FileUpload/InputFile/InputFileApollo.d.ts +4 -1
- package/dist/prospect-client/Form/FileUpload/InputFile/InputFileApollo.js +4 -5
- package/dist/prospect-client/Form/FileUpload/InputFile/InputFileCommon.d.ts +5 -2
- package/dist/prospect-client/Form/FileUpload/InputFile/InputFileCommon.js +5 -7
- package/dist/prospect-client/Form/FileUpload/InputFile/InputFileLF.d.ts +4 -1
- package/dist/prospect-client/Form/FileUpload/InputFile/InputFileLF.js +2 -3
- package/dist/prospect-client/Form/FileUpload/ItemFile/ItemFileApollo.js +1 -1
- package/dist/prospect-client/Form/FileUpload/ItemFile/ItemFileCommon.d.ts +1 -1
- package/dist/prospect-client/Form/FileUpload/ItemFile/ItemFileLF.js +1 -1
- package/dist/prospect-client/Form/InputDate/InputDateApollo.d.ts +4 -1
- package/dist/prospect-client/Form/InputDate/InputDateApollo.js +2 -3
- package/dist/prospect-client/Form/InputDate/InputDateAtom.d.ts +4 -1
- package/dist/prospect-client/Form/InputDate/InputDateAtom.js +2 -2
- package/dist/prospect-client/Form/InputDate/InputDateCommon.d.ts +7 -13
- package/dist/prospect-client/Form/InputDate/InputDateCommon.js +8 -9
- package/dist/prospect-client/Form/InputDate/InputDateLF.d.ts +4 -1
- package/dist/prospect-client/Form/InputDate/InputDateLF.js +2 -3
- package/dist/prospect-client/Form/InputDate/InputDateTextAtom.d.ts +4 -1
- package/dist/prospect-client/Form/InputDate/InputDateTextAtom.js +4 -4
- package/dist/prospect-client/Form/InputPhone/InputPhoneApollo.js +1 -1
- package/dist/prospect-client/Form/InputPhone/InputPhoneCommon.d.ts +7 -13
- package/dist/prospect-client/Form/InputPhone/InputPhoneCommon.js +12 -8
- package/dist/prospect-client/Form/InputPhone/InputPhoneLF.js +1 -1
- package/dist/prospect-client/Form/InputText/InputTextApollo.d.ts +4 -1
- package/dist/prospect-client/Form/InputText/InputTextApollo.js +2 -3
- package/dist/prospect-client/Form/InputText/InputTextCommon.d.ts +7 -13
- package/dist/prospect-client/Form/InputText/InputTextCommon.js +9 -8
- package/dist/prospect-client/Form/InputText/InputTextLF.d.ts +4 -1
- package/dist/prospect-client/Form/InputText/InputTextLF.js +2 -3
- package/dist/prospect-client/Form/InputTextAtom/InputTextAtomCommon.d.ts +4 -2
- package/dist/prospect-client/Form/InputTextAtom/InputTextAtomCommon.js +4 -5
- package/dist/prospect-client/Form/ItemLabel/ItemLabelCommon.d.ts +2 -22
- package/dist/prospect-client/Form/ItemLabel/ItemLabelCommon.js +4 -5
- package/dist/prospect-client/Form/ItemMessage/{ItemMessageCommon.d.ts → ItemMessage.d.ts} +1 -0
- package/dist/prospect-client/Form/ItemMessage/{ItemMessageCommon.js → ItemMessage.js} +10 -9
- package/dist/prospect-client/Form/ItemMultiSelect/ItemMultiSelectApollo.d.ts +7 -0
- package/dist/prospect-client/Form/ItemMultiSelect/ItemMultiSelectApollo.js +6 -0
- package/dist/prospect-client/Form/ItemMultiSelect/ItemMultiSelectCommon.d.ts +8 -0
- package/dist/prospect-client/Form/ItemMultiSelect/ItemMultiSelectCommon.js +9 -0
- package/dist/prospect-client/Form/ItemMultiSelect/ItemMultiSelectLF.d.ts +7 -0
- package/dist/prospect-client/Form/ItemMultiSelect/ItemMultiSelectLF.js +6 -0
- package/dist/prospect-client/Form/MultiSelectList/MultiSelectListApollo.d.ts +4 -0
- package/dist/prospect-client/Form/MultiSelectList/MultiSelectListApollo.js +5 -0
- package/dist/prospect-client/Form/MultiSelectList/MultiSelectListCommon.d.ts +11 -0
- package/dist/prospect-client/Form/MultiSelectList/MultiSelectListCommon.js +2 -0
- package/dist/prospect-client/Form/MultiSelectList/MultiSelectListLF.d.ts +4 -0
- package/dist/prospect-client/Form/MultiSelectList/MultiSelectListLF.js +5 -0
- package/dist/prospect-client/Form/Radio/CardRadio/CardRadioApollo.d.ts +3 -0
- package/dist/prospect-client/Form/Radio/CardRadio/CardRadioApollo.js +6 -0
- package/dist/prospect-client/Form/Radio/{CardRadioOption/CardRadioOptionCommon.d.ts → CardRadio/CardRadioCommon.d.ts} +7 -8
- package/dist/prospect-client/Form/Radio/CardRadio/CardRadioCommon.js +16 -0
- package/dist/prospect-client/Form/Radio/CardRadio/CardRadioLF.d.ts +3 -0
- package/dist/prospect-client/Form/Radio/CardRadio/CardRadioLF.js +6 -0
- package/dist/prospect-client/Form/Radio/CardRadioGroup/CardRadioGroupApollo.js +3 -3
- package/dist/prospect-client/Form/Radio/CardRadioGroup/CardRadioGroupCommon.d.ts +9 -33
- package/dist/prospect-client/Form/Radio/CardRadioGroup/CardRadioGroupCommon.js +6 -8
- package/dist/prospect-client/Form/Radio/CardRadioGroup/CardRadioGroupLF.js +3 -3
- package/dist/prospect-client/Form/Radio/Radio/RadioCommon.d.ts +2 -2
- package/dist/prospect-client/Form/Radio/Radio/RadioCommon.js +7 -5
- package/dist/prospect-client/Form/TextArea/TextAreaApollo.d.ts +4 -1
- package/dist/prospect-client/Form/TextArea/TextAreaApollo.js +2 -3
- package/dist/prospect-client/Form/TextArea/TextAreaCommon.d.ts +7 -8
- package/dist/prospect-client/Form/TextArea/TextAreaCommon.js +6 -6
- package/dist/prospect-client/Form/TextArea/TextAreaLF.d.ts +4 -1
- package/dist/prospect-client/Form/TextArea/TextAreaLF.js +2 -3
- package/dist/prospect-client/Header/HeaderApollo.d.ts +4 -0
- package/dist/prospect-client/Header/HeaderApollo.js +8 -0
- package/dist/prospect-client/Header/HeaderCommon.d.ts +22 -0
- package/dist/prospect-client/Header/HeaderCommon.js +37 -0
- package/dist/prospect-client/Header/HeaderLF.d.ts +4 -0
- package/dist/prospect-client/Header/HeaderLF.js +8 -0
- package/dist/prospect-client/Icon/IconCommon.d.ts +1 -1
- package/dist/prospect-client/Icon/IconCommon.js +8 -9
- package/dist/prospect-client/ItemMenu/ItemMenuApollo.d.ts +2 -0
- package/dist/prospect-client/ItemMenu/ItemMenuApollo.js +2 -0
- package/dist/prospect-client/ItemMenu/ItemMenuCommon.d.ts +22 -0
- package/dist/prospect-client/ItemMenu/ItemMenuCommon.js +18 -0
- package/dist/prospect-client/ItemMenu/ItemMenuLF.d.ts +2 -0
- package/dist/prospect-client/ItemMenu/ItemMenuLF.js +2 -0
- package/dist/prospect-client/ItemTabBar/ItemTabBarCommon.d.ts +4 -1
- package/dist/prospect-client/ItemTabBar/ItemTabBarCommon.js +9 -6
- package/dist/prospect-client/Layout/ExitLayout/ExitLayoutApollo.d.ts +12 -0
- package/dist/prospect-client/Layout/ExitLayout/ExitLayoutApollo.js +12 -0
- package/dist/prospect-client/Layout/ExitLayout/ExitLayoutLF.d.ts +12 -0
- package/dist/prospect-client/Layout/ExitLayout/ExitLayoutLF.js +12 -0
- package/dist/prospect-client/Layout/ExitLayout/ExitLayoutSkeleton.d.ts +23 -0
- package/dist/prospect-client/Layout/ExitLayout/ExitLayoutSkeleton.js +17 -0
- package/dist/prospect-client/Link/LinkCommon.d.ts +1 -5
- package/dist/prospect-client/Link/LinkCommon.js +2 -2
- package/dist/prospect-client/List/ClickItem/ClickItemCommon.d.ts +1 -0
- package/dist/prospect-client/List/ContentItemDuo/ContentItemDuoApollo.js +1 -1
- package/dist/prospect-client/List/ContentItemDuo/ContentItemDuoCommon.d.ts +3 -7
- package/dist/prospect-client/List/ContentItemDuo/ContentItemDuoCommon.js +3 -7
- package/dist/prospect-client/List/ContentItemDuo/ContentItemDuoLF.js +1 -1
- package/dist/prospect-client/List/List/ListCommon.d.ts +27 -2
- package/dist/prospect-client/List/List/ListCommon.js +12 -0
- package/dist/prospect-client/Loader/LoaderCommon.d.ts +4 -1
- package/dist/prospect-client/Loader/LoaderCommon.js +4 -4
- package/dist/prospect-client/MenuBurger/MenuBurgerApollo.d.ts +4 -0
- package/dist/prospect-client/MenuBurger/MenuBurgerApollo.js +8 -0
- package/dist/prospect-client/MenuBurger/MenuBurgerCommon.d.ts +60 -0
- package/dist/prospect-client/MenuBurger/MenuBurgerCommon.js +34 -0
- package/dist/prospect-client/MenuBurger/MenuBurgerLF.d.ts +4 -0
- package/dist/prospect-client/MenuBurger/MenuBurgerLF.js +8 -0
- package/dist/prospect-client/MessageBar/MessageBarAction.d.ts +8 -0
- package/dist/prospect-client/MessageBar/MessageBarAction.js +11 -0
- package/dist/prospect-client/MessageBar/MessageBarApollo.d.ts +5 -0
- package/dist/prospect-client/MessageBar/MessageBarApollo.js +7 -0
- package/dist/prospect-client/MessageBar/MessageBarCommon.d.ts +26 -0
- package/dist/prospect-client/MessageBar/MessageBarCommon.js +33 -0
- package/dist/prospect-client/MessageBar/MessageBarDescription.d.ts +6 -0
- package/dist/prospect-client/MessageBar/MessageBarDescription.js +8 -0
- package/dist/prospect-client/MessageBar/MessageBarLF.d.ts +5 -0
- package/dist/prospect-client/MessageBar/MessageBarLF.js +7 -0
- package/dist/prospect-client/MessageBar/MessageBarSummary.d.ts +11 -0
- package/dist/prospect-client/MessageBar/MessageBarSummary.js +2 -0
- package/dist/prospect-client/MessageBar/types.d.ts +1 -0
- package/dist/prospect-client/MessageBar/types.js +1 -0
- package/dist/prospect-client/Modal/ModalApollo.d.ts +4 -1
- package/dist/prospect-client/Modal/ModalApollo.js +2 -5
- package/dist/prospect-client/Modal/ModalCommon.d.ts +4 -1
- package/dist/prospect-client/Modal/ModalCommon.js +1 -2
- package/dist/prospect-client/Modal/ModalLF.d.ts +4 -1
- package/dist/prospect-client/Modal/ModalLF.js +2 -5
- package/dist/prospect-client/Modal/components/ModalCore.d.ts +4 -1
- package/dist/prospect-client/Modal/components/ModalCore.js +3 -3
- package/dist/prospect-client/Modal/components/ModalCoreHeaderCommon.d.ts +0 -7
- package/dist/prospect-client/Modal/components/ModalCoreHeaderCommon.js +2 -12
- package/dist/prospect-client/Modal/types.d.ts +0 -15
- package/dist/prospect-client/ProgressBarGroup/ProgressBarGroupCommon.d.ts +1 -5
- package/dist/prospect-client/ProgressBarGroup/ProgressBarGroupCommon.js +1 -1
- package/dist/prospect-client/Skeleton/Skeleton.d.ts +61 -0
- package/dist/prospect-client/Skeleton/Skeleton.js +41 -0
- package/dist/prospect-client/SkeletonGrid/SkeletonGrid.d.ts +51 -0
- package/dist/prospect-client/SkeletonGrid/SkeletonGrid.js +37 -0
- package/dist/prospect-client/SkeletonList/SkeletonListApollo.d.ts +7 -0
- package/dist/prospect-client/SkeletonList/SkeletonListApollo.js +8 -2
- package/dist/prospect-client/SkeletonList/SkeletonListCommon.d.ts +21 -4
- package/dist/prospect-client/SkeletonList/SkeletonListCommon.js +18 -2
- package/dist/prospect-client/SkeletonList/SkeletonListLF.d.ts +7 -0
- package/dist/prospect-client/SkeletonList/SkeletonListLF.js +8 -2
- package/dist/prospect-client/Stepper/StepperApollo.js +3 -1
- package/dist/prospect-client/Stepper/StepperCommon.d.ts +13 -7
- package/dist/prospect-client/Stepper/StepperCommon.js +3 -4
- package/dist/prospect-client/Stepper/StepperLF.js +3 -1
- package/dist/prospect-client/TabBar/TabBarCommon.js +6 -3
- package/dist/prospect-client/TabMenu/TabMenu.d.ts +36 -0
- package/dist/prospect-client/TabMenu/TabMenu.helpers.d.ts +1 -0
- package/dist/prospect-client/TabMenu/TabMenu.helpers.js +12 -0
- package/dist/prospect-client/TabMenu/TabMenu.js +39 -0
- package/dist/prospect-client/Tag/TagCommon.js +6 -2
- package/dist/prospect-client/TagList/TagListApollo.d.ts +4 -0
- package/dist/prospect-client/TagList/TagListApollo.js +5 -0
- package/dist/prospect-client/TagList/TagListCommon.d.ts +10 -0
- package/dist/prospect-client/TagList/TagListCommon.js +16 -0
- package/dist/prospect-client/TagList/TagListLF.d.ts +4 -0
- package/dist/prospect-client/TagList/TagListLF.js +5 -0
- package/dist/prospect-client/Toggle/ToggleApollo.d.ts +4 -1
- package/dist/prospect-client/Toggle/ToggleApollo.js +1 -2
- package/dist/prospect-client/Toggle/ToggleCommon.d.ts +4 -3
- package/dist/prospect-client/Toggle/ToggleCommon.js +5 -5
- package/dist/prospect-client/Toggle/ToggleLF.d.ts +4 -1
- package/dist/prospect-client/Toggle/ToggleLF.js +1 -2
- package/dist/prospect.d.ts +17 -11
- package/dist/prospect.js +17 -11
- package/package.json +3 -3
- package/dist/distributeur/Form/Pass/Pass.d.ts +0 -12
- package/dist/distributeur/Form/Pass/Pass.js +0 -13
- package/dist/distributeur/Form/Pass/PassInput.d.ts +0 -13
- package/dist/distributeur/Form/Pass/PassInput.js +0 -34
- package/dist/distributeur/Form/Pass/index.d.ts +0 -2
- package/dist/distributeur/Form/Pass/index.js +0 -2
- package/dist/distributeur/Form/Select/SelectDefaultWithOptions.d.ts +0 -23
- package/dist/distributeur/Form/Select/SelectDefaultWithOptions.js +0 -39
- package/dist/distributeur/Form/Slider/Slider.d.ts +0 -28
- package/dist/distributeur/Form/Slider/Slider.js +0 -40
- package/dist/distributeur/Form/Slider/SliderInput.d.ts +0 -9
- package/dist/distributeur/Form/Slider/SliderInput.js +0 -11
- package/dist/distributeur/Form/Slider/index.d.ts +0 -3
- package/dist/distributeur/Form/Slider/index.js +0 -3
- package/dist/distributeur/Form/core/Deprecated/Field.d.ts +0 -21
- package/dist/distributeur/Form/core/Deprecated/Field.js +0 -20
- package/dist/distributeur/Form/core/Deprecated/FieldForm.d.ts +0 -103
- package/dist/distributeur/Form/core/Deprecated/FieldForm.js +0 -162
- package/dist/distributeur/Form/core/Deprecated/FieldInput.d.ts +0 -16
- package/dist/distributeur/Form/core/Deprecated/FieldInput.js +0 -14
- package/dist/distributeur/Form/core/useInputClassModifier.d.ts +0 -4
- package/dist/distributeur/Form/core/useInputClassModifier.js +0 -13
- package/dist/distributeur/Layout/Header/HeaderTitle/HeaderTitle.helpers.d.ts +0 -1
- package/dist/distributeur/Layout/Header/HeaderTitle/HeaderTitle.helpers.js +0 -6
- package/dist/distributeur/utilities/helpers/getComponentClassName.d.ts +0 -20
- package/dist/distributeur/utilities/helpers/getComponentClassName.js +0 -54
- package/dist/prospect-client/Form/ItemMessage/ItemMessageApollo.d.ts +0 -2
- package/dist/prospect-client/Form/ItemMessage/ItemMessageApollo.js +0 -2
- package/dist/prospect-client/Form/ItemMessage/ItemMessageLF.d.ts +0 -2
- package/dist/prospect-client/Form/ItemMessage/ItemMessageLF.js +0 -2
- package/dist/prospect-client/Form/Radio/CardRadioOption/CardRadioOptionApollo.d.ts +0 -3
- package/dist/prospect-client/Form/Radio/CardRadioOption/CardRadioOptionApollo.js +0 -6
- package/dist/prospect-client/Form/Radio/CardRadioOption/CardRadioOptionCommon.js +0 -16
- package/dist/prospect-client/Form/Radio/CardRadioOption/CardRadioOptionLF.d.ts +0 -3
- package/dist/prospect-client/Form/Radio/CardRadioOption/CardRadioOptionLF.js +0 -6
- package/dist/prospect-client/Skeleton/SkeletonApollo.d.ts +0 -2
- package/dist/prospect-client/Skeleton/SkeletonApollo.js +0 -2
- package/dist/prospect-client/Skeleton/SkeletonCommon.d.ts +0 -19
- package/dist/prospect-client/Skeleton/SkeletonCommon.js +0 -11
- package/dist/prospect-client/Skeleton/SkeletonLF.d.ts +0 -2
- package/dist/prospect-client/Skeleton/SkeletonLF.js +0 -2
- package/dist/prospect-client/utilities/getComponentClassName.d.ts +0 -4
- package/dist/prospect-client/utilities/getComponentClassName.js +0 -30
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { RadioItem } from "./RadioItem";
|
|
3
|
+
export const RadioText = ({ id, label, ...props }) => (_jsxs("label", { htmlFor: id, className: "af-radio__text", children: [_jsx(RadioItem, { id: id, ...props }), _jsx("span", { className: "af-radio__label", children: label })] }));
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { RadioInputPropsButtonVariant, RadioInputPropsCardVariant } from "./RadioInput";
|
|
2
|
+
type RadioInputOptionsProps = {
|
|
3
|
+
inputId: string;
|
|
4
|
+
isInvalid: boolean;
|
|
5
|
+
describedBy?: string;
|
|
6
|
+
} & (Pick<RadioInputPropsCardVariant, "variant" | "options" | "showAddButton" | "orientation" | "onAdd"> | Pick<RadioInputPropsButtonVariant, "variant" | "options">);
|
|
7
|
+
export declare const RadioInputOptions: ({ inputId, isInvalid, describedBy, ...props }: RadioInputOptionsProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { AddRadioCard } from "./AddRadioCard";
|
|
3
|
+
import { RadioButton } from "./RadioButton";
|
|
4
|
+
import { RadioCard } from "./RadioCard";
|
|
5
|
+
export const RadioInputOptions = ({ inputId, isInvalid, describedBy, ...props }) => (_jsxs(_Fragment, { children: [!props.variant || props.variant === "button"
|
|
6
|
+
? props.options.map((o) => (_jsx(RadioButton, { ...o }, `${inputId}-${o.value}`)))
|
|
7
|
+
: null, props.variant === "card" ? (_jsxs(_Fragment, { children: [props.options.map((o) => (_jsx(RadioCard, { id: `${inputId}-${o.value}`, ...o, "aria-invalid": isInvalid, "aria-describedby": describedBy, orientation: props.orientation || "horizontal" }, `${inputId}-${o.value}`))), props.showAddButton ? (_jsx(AddRadioCard, { orientation: props.orientation || "horizontal", onClick: props.onAdd })) : null] })) : null] }));
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import "@axa-fr/canopee-css/distributeur/Form/Experimental/Input.css";
|
|
2
|
+
import "@axa-fr/canopee-css/distributeur/Form/Experimental/Select.css";
|
|
3
|
+
import { type ComponentPropsWithRef } from "react";
|
|
4
|
+
declare const Select: {
|
|
5
|
+
({ className, children, ...otherProps }: ComponentPropsWithRef<"select">): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
displayName: string;
|
|
7
|
+
};
|
|
8
|
+
export { Select };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import "@axa-fr/canopee-css/distributeur/Form/Experimental/Input.css";
|
|
3
|
+
import "@axa-fr/canopee-css/distributeur/Form/Experimental/Select.css";
|
|
4
|
+
import {} from "react";
|
|
5
|
+
import icon from "@material-symbols/svg-700/rounded/arrow_drop_down-fill.svg";
|
|
6
|
+
import { getClassName } from "../../utilities/helpers/getClassName";
|
|
7
|
+
import { Svg } from "../../Svg";
|
|
8
|
+
const Select = ({ className, children, ...otherProps }) => {
|
|
9
|
+
const componentClassName = getClassName({
|
|
10
|
+
baseClassName: "af-input__input",
|
|
11
|
+
className,
|
|
12
|
+
});
|
|
13
|
+
return (_jsxs(_Fragment, { children: [_jsx("select", { className: componentClassName, ...otherProps, children: children }), _jsx(Svg, { className: "af-input__select-icon", src: icon })] }));
|
|
14
|
+
};
|
|
15
|
+
Select.displayName = "Select";
|
|
16
|
+
export { Select };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { type ComponentProps, type ReactNode } from "react";
|
|
2
|
+
import { Select } from "./Select";
|
|
3
|
+
import type { InputBaseProps } from "./types";
|
|
4
|
+
export type SelectInputProps = Omit<ComponentProps<typeof Select>, "children"> & InputBaseProps & {
|
|
5
|
+
/**
|
|
6
|
+
* The content of the select, as JSX.
|
|
7
|
+
* This allows you to render `<option>` elements, and to group them with `<optgroup>`.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```tsx
|
|
11
|
+
* options={
|
|
12
|
+
* <optgroup label="Europe">
|
|
13
|
+
* <option value="FR">France</option>
|
|
14
|
+
* <option value="ES">Spain</option>
|
|
15
|
+
* </optgroup>
|
|
16
|
+
* }
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
options: ReactNode;
|
|
20
|
+
/**
|
|
21
|
+
* The text of the empty option rendered before the options, when no value is selected.
|
|
22
|
+
* Pass `null` to not render any placeholder option.
|
|
23
|
+
* @default "- Select -"
|
|
24
|
+
*/
|
|
25
|
+
placeholder?: string | null;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* This component renders a label, a select field and optionnally help and error messages.
|
|
29
|
+
* It can be customized to render the label on top, or on the left of the select.
|
|
30
|
+
* It also supports adding a unit on the right of the select.
|
|
31
|
+
*/
|
|
32
|
+
declare const SelectInput: {
|
|
33
|
+
({ contentRight, id, labelPosition, inputClassName: inputClassNameProp, labelClassName: labelClassNameProp, helpMessage, containerClassName, required, label, errorMessage, options, placeholder, ...props }: SelectInputProps): import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
displayName: string;
|
|
35
|
+
};
|
|
36
|
+
export { SelectInput };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import {} from "react";
|
|
3
|
+
import { InputContainer } from "./InputContainer";
|
|
4
|
+
import { InputUnit } from "./InputUnit";
|
|
5
|
+
import { ItemMessage } from "./ItemMessage";
|
|
6
|
+
import { Label } from "./Label";
|
|
7
|
+
import { Select } from "./Select";
|
|
8
|
+
import { useInput } from "./useInput.hook";
|
|
9
|
+
/**
|
|
10
|
+
* This component renders a label, a select field and optionnally help and error messages.
|
|
11
|
+
* It can be customized to render the label on top, or on the left of the select.
|
|
12
|
+
* It also supports adding a unit on the right of the select.
|
|
13
|
+
*/
|
|
14
|
+
const SelectInput = ({ contentRight, id, labelPosition, inputClassName: inputClassNameProp, labelClassName: labelClassNameProp, helpMessage, containerClassName, required, label, errorMessage, options, placeholder = "- Select -", ...props }) => {
|
|
15
|
+
const { describedBy, errorId, helperId, inputClassName, inputId, isContainerVertical, isInvalid, labelClassName, } = useInput({
|
|
16
|
+
id,
|
|
17
|
+
labelPosition,
|
|
18
|
+
inputClassName: inputClassNameProp,
|
|
19
|
+
labelClassName: labelClassNameProp,
|
|
20
|
+
errorMessage,
|
|
21
|
+
helpMessage,
|
|
22
|
+
});
|
|
23
|
+
return (_jsxs(InputContainer, { vertical: isContainerVertical, className: containerClassName, children: [_jsx(Label, { htmlFor: inputId, required: required, className: labelClassName, children: label }), _jsxs(Select, { ...props, className: inputClassName, id: inputId, "aria-describedby": describedBy, "aria-invalid": isInvalid, children: [placeholder === null ? null : _jsx("option", { value: "", children: placeholder }), options] }), contentRight ? _jsx(InputUnit, { children: contentRight }) : null, helpMessage ? (_jsx(ItemMessage, { id: helperId, children: helpMessage })) : null, errorMessage ? (_jsx(ItemMessage, { variant: "error", id: errorId, children: errorMessage })) : null] }));
|
|
24
|
+
};
|
|
25
|
+
SelectInput.displayName = "SelectInput";
|
|
26
|
+
export { SelectInput };
|
|
@@ -7,5 +7,8 @@ export type TextInputProps = Omit<ComponentProps<typeof Input>, "children"> & In
|
|
|
7
7
|
* It can be customized to render the label on top, or on the left of the input.
|
|
8
8
|
* It also supports adding a unit on the right of the input.
|
|
9
9
|
*/
|
|
10
|
-
declare const TextInput:
|
|
10
|
+
declare const TextInput: {
|
|
11
|
+
({ contentRight, id, labelPosition, inputClassName: inputClassNameProp, labelClassName: labelClassNameProp, helpMessage, containerClassName, required, label, errorMessage, ...props }: TextInputProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
displayName: string;
|
|
13
|
+
};
|
|
11
14
|
export { TextInput };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import {} from "react";
|
|
3
3
|
import { Input } from "./Input";
|
|
4
4
|
import { InputContainer } from "./InputContainer";
|
|
5
5
|
import { InputUnit } from "./InputUnit";
|
|
@@ -11,7 +11,7 @@ import { useInput } from "./useInput.hook";
|
|
|
11
11
|
* It can be customized to render the label on top, or on the left of the input.
|
|
12
12
|
* It also supports adding a unit on the right of the input.
|
|
13
13
|
*/
|
|
14
|
-
const TextInput =
|
|
14
|
+
const TextInput = ({ contentRight, id, labelPosition, inputClassName: inputClassNameProp, labelClassName: labelClassNameProp, helpMessage, containerClassName, required, label, errorMessage, ...props }) => {
|
|
15
15
|
const { describedBy, errorId, helperId, inputClassName, inputId, isContainerVertical, isInvalid, labelClassName, } = useInput({
|
|
16
16
|
id,
|
|
17
17
|
labelPosition,
|
|
@@ -20,7 +20,7 @@ const TextInput = forwardRef(({ contentRight, id, labelPosition, inputClassName:
|
|
|
20
20
|
errorMessage,
|
|
21
21
|
helpMessage,
|
|
22
22
|
});
|
|
23
|
-
return (_jsxs(InputContainer, { vertical: isContainerVertical, className: containerClassName, children: [_jsx(Label, { htmlFor: inputId, required: required, className: labelClassName, children: label }), _jsx(Input, { ...props, className: inputClassName, id: inputId,
|
|
24
|
-
}
|
|
23
|
+
return (_jsxs(InputContainer, { vertical: isContainerVertical, className: containerClassName, children: [_jsx(Label, { htmlFor: inputId, required: required, className: labelClassName, children: label }), _jsx(Input, { ...props, className: inputClassName, id: inputId, "aria-describedby": describedBy, "aria-invalid": isInvalid }), contentRight ? _jsx(InputUnit, { children: contentRight }) : null, helpMessage ? (_jsx(ItemMessage, { id: helperId, children: helpMessage })) : null, errorMessage ? (_jsx(ItemMessage, { variant: "error", id: errorId, children: errorMessage })) : null] }));
|
|
24
|
+
};
|
|
25
25
|
TextInput.displayName = "TextInput";
|
|
26
26
|
export { TextInput };
|
|
@@ -1,9 +1,20 @@
|
|
|
1
|
+
export { DateInput } from "./DateInput";
|
|
2
|
+
export type { DateInputProps } from "./DateInput";
|
|
1
3
|
export { Input } from "./Input";
|
|
2
4
|
export { InputContainer } from "./InputContainer";
|
|
3
5
|
export { InputUnit } from "./InputUnit";
|
|
4
6
|
export { ItemMessage } from "./ItemMessage";
|
|
5
7
|
export { Label } from "./Label";
|
|
8
|
+
export { Select } from "./Select";
|
|
9
|
+
export { SelectInput } from "./SelectInput";
|
|
10
|
+
export type { SelectInputProps } from "./SelectInput";
|
|
6
11
|
export { TextInput } from "./TextInput";
|
|
7
12
|
export type { TextInputProps } from "./TextInput";
|
|
8
13
|
export type { InputBaseProps, LabelPosition, SingleLineLabelPosition, } from "./types";
|
|
9
14
|
export { useInput } from "./useInput.hook";
|
|
15
|
+
export { RadioButton, type RadioButtonProps } from "./Radio/RadioButton";
|
|
16
|
+
export { RadioCard, type RadioCardProps } from "./Radio/RadioCard";
|
|
17
|
+
export { RadioGroup, type RadioGroupProps } from "./Radio/RadioGroup";
|
|
18
|
+
export { RadioInput, type RadioInputProps, type RadioInputPropsButtonVariant, type RadioInputPropsCardVariant, } from "./Radio/RadioInput";
|
|
19
|
+
export { RadioItem, type RadioItemProps } from "./Radio/RadioItem";
|
|
20
|
+
export { RadioText, type RadioTextProps } from "./Radio/RadioText";
|
|
@@ -1,7 +1,16 @@
|
|
|
1
|
+
export { DateInput } from "./DateInput";
|
|
1
2
|
export { Input } from "./Input";
|
|
2
3
|
export { InputContainer } from "./InputContainer";
|
|
3
4
|
export { InputUnit } from "./InputUnit";
|
|
4
5
|
export { ItemMessage } from "./ItemMessage";
|
|
5
6
|
export { Label } from "./Label";
|
|
7
|
+
export { Select } from "./Select";
|
|
8
|
+
export { SelectInput } from "./SelectInput";
|
|
6
9
|
export { TextInput } from "./TextInput";
|
|
7
10
|
export { useInput } from "./useInput.hook";
|
|
11
|
+
export { RadioButton } from "./Radio/RadioButton";
|
|
12
|
+
export { RadioCard } from "./Radio/RadioCard";
|
|
13
|
+
export { RadioGroup } from "./Radio/RadioGroup";
|
|
14
|
+
export { RadioInput, } from "./Radio/RadioInput";
|
|
15
|
+
export { RadioItem } from "./Radio/RadioItem";
|
|
16
|
+
export { RadioText } from "./Radio/RadioText";
|
|
@@ -35,7 +35,7 @@ export type InputBaseProps = {
|
|
|
35
35
|
* - `leftAbove` will place the label above the input, aligned to the left. This is used to have the label above the input.
|
|
36
36
|
* @default "centerLeft"
|
|
37
37
|
*/
|
|
38
|
-
labelPosition?:
|
|
38
|
+
labelPosition?: LabelPosition;
|
|
39
39
|
/**
|
|
40
40
|
* The help message to display below the input.
|
|
41
41
|
*/
|
|
@@ -11,7 +11,7 @@ export const useInput = (props) => {
|
|
|
11
11
|
});
|
|
12
12
|
const labelClassName = getClassName({
|
|
13
13
|
baseClassName: "af-label",
|
|
14
|
-
modifiers: [props.labelPosition === "
|
|
14
|
+
modifiers: [props.labelPosition === "topLeft" && "top-left"],
|
|
15
15
|
className: props.labelClassName,
|
|
16
16
|
});
|
|
17
17
|
const errorId = isInvalid ? `${inputId}-description` : undefined;
|
|
@@ -2,8 +2,6 @@ import { type DropzoneInputProps, type DropzoneOptions, type FileRejection } fro
|
|
|
2
2
|
import type { FileActions } from "./constants";
|
|
3
3
|
type Dropzone = DropzoneInputProps & DropzoneOptions;
|
|
4
4
|
type Props = Omit<Dropzone, "onDrop" | "onChange"> & {
|
|
5
|
-
/** @deprecated Use `className` instead. */
|
|
6
|
-
classModifier?: string;
|
|
7
5
|
label?: string;
|
|
8
6
|
icon?: string;
|
|
9
7
|
onChange: (data: onChangeProps) => void;
|
|
@@ -22,5 +20,5 @@ type onChangeProps = {
|
|
|
22
20
|
values: CustomFile[];
|
|
23
21
|
errors?: CustomFile<FileRejection>[];
|
|
24
22
|
};
|
|
25
|
-
declare const File: ({ className,
|
|
23
|
+
declare const File: ({ className, id, name, disabled, onChange, multiple, maxSize, minSize, accept, readOnly, placeholder, label, icon, ...otherProps }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
26
24
|
export { File };
|
|
@@ -3,7 +3,7 @@ import { useId } from "react";
|
|
|
3
3
|
import { useDropzone, } from "react-dropzone";
|
|
4
4
|
import { Button } from "../../Button/Button";
|
|
5
5
|
import { getClassName } from "../../utilities/helpers/getClassName";
|
|
6
|
-
const File = ({ className,
|
|
6
|
+
const File = ({ className, id, name, disabled, onChange, multiple = true, maxSize = 20000000, minSize = 0, accept, readOnly, placeholder = "Glissez/déposez vos fichiers", label = "Parcourir", icon = "open", ...otherProps }) => {
|
|
7
7
|
const valueId = useId();
|
|
8
8
|
const errorsId = useId();
|
|
9
9
|
const handleOnChange = (acceptedFiles, rejectedFiles) => {
|
|
@@ -56,7 +56,6 @@ const File = ({ className, classModifier, id, name, disabled, onChange, multiple
|
|
|
56
56
|
});
|
|
57
57
|
const componentClassName = getClassName({
|
|
58
58
|
baseClassName: "af-form__file-input",
|
|
59
|
-
modifiers: classModifier?.split(" "),
|
|
60
59
|
className,
|
|
61
60
|
});
|
|
62
61
|
return (_jsxs("div", { className: componentClassName, children: [_jsxs("div", { ...getRootProps({ className: "drop-box" }), children: [_jsx("input", { ...getInputProps({ id, name, readOnly, ...otherProps }) }), _jsx("div", { children: placeholder })] }), _jsx(Button, { className: "af-btn--file", leftIcon: _jsx("i", { className: `glyphicon glyphicon-${icon}` }), onClick: open, disabled: disabled, children: label })] }));
|
|
@@ -8,6 +8,8 @@ type FileTableProps = ComponentPropsWithoutRef<typeof FileTable>;
|
|
|
8
8
|
type Props = ConsumerFieldProps & FileProps & Pick<FileTableProps, "values" | "errors"> & {
|
|
9
9
|
fileLabel?: string;
|
|
10
10
|
helpMessage?: ReactNode;
|
|
11
|
+
} & {
|
|
12
|
+
tableClassName?: string;
|
|
11
13
|
};
|
|
12
|
-
declare const FileInput: ({ values, id, name, onChange, label, errors, fileLabel,
|
|
14
|
+
declare const FileInput: ({ values, id, name, onChange, label, errors, fileLabel, children, ...otherFileProps }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
13
15
|
export { FileInput };
|
|
@@ -4,7 +4,7 @@ import { useId } from "react";
|
|
|
4
4
|
import { Field } from "../core";
|
|
5
5
|
import { File } from "./File";
|
|
6
6
|
import { FileTable } from "./FileTable";
|
|
7
|
-
const FileInput = ({ values = [], id, name = "", onChange, label, errors, fileLabel,
|
|
7
|
+
const FileInput = ({ values = [], id, name = "", onChange, label, errors, fileLabel, children, ...otherFileProps }) => {
|
|
8
8
|
const onDeleteClick = (selectedId, selectInputId) => {
|
|
9
9
|
const newValues = values.filter((element) => element.id !== selectedId);
|
|
10
10
|
onChange({
|
|
@@ -16,6 +16,6 @@ const FileInput = ({ values = [], id, name = "", onChange, label, errors, fileLa
|
|
|
16
16
|
};
|
|
17
17
|
const generatedId = useId();
|
|
18
18
|
const actualId = id ?? generatedId;
|
|
19
|
-
return (_jsx(Field, { label: label, labelPosition: "top", id: actualId,
|
|
19
|
+
return (_jsx(Field, { label: label, labelPosition: "top", id: actualId, fieldClassNameSuffix: "file", ...otherFileProps, renderInput: ({ inputClassName: inputClassModifiers, id: inputId, ariaInvalid, errorId, ...inputProps }) => (_jsxs(_Fragment, { children: [_jsx(File, { id: inputId, name: name, onChange: onChange, className: inputClassModifiers, label: fileLabel, "aria-describedby": errorId, "aria-invalid": ariaInvalid, ...inputProps }), children] })), appendChildren: _jsx(FileTable, { errors: errors, values: values, onClick: (selectedId) => onDeleteClick(selectedId, actualId), className: otherFileProps.tableClassName }) }));
|
|
20
20
|
};
|
|
21
21
|
export { FileInput };
|
|
@@ -2,8 +2,7 @@ import type { CustomFile } from "./File";
|
|
|
2
2
|
type Props = CustomFile & {
|
|
3
3
|
onClick: (id: string) => void;
|
|
4
4
|
className?: string;
|
|
5
|
-
classModifier?: string;
|
|
6
5
|
disabled?: boolean;
|
|
7
6
|
};
|
|
8
|
-
declare const FileLine: ({ className,
|
|
7
|
+
declare const FileLine: ({ className, file, disabled, id, onClick }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
9
8
|
export { FileLine };
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
const FileLine = ({ className,
|
|
4
|
-
const componentClassName =
|
|
2
|
+
import { getClassName } from "../../utilities";
|
|
3
|
+
const FileLine = ({ className, file, disabled, id, onClick }) => {
|
|
4
|
+
const componentClassName = getClassName({
|
|
5
|
+
baseClassName: "af-form__file-line",
|
|
6
|
+
className,
|
|
7
|
+
});
|
|
5
8
|
return (_jsxs("li", { className: componentClassName, children: [file && file.type && file.type.startsWith("image") ? (_jsx("i", { className: "glyphicon glyphicon-picture" })) : (_jsx("i", { className: "glyphicon glyphicon-file" })), _jsx("span", { children: file.name }), _jsx("span", { children: file.size }), _jsx("button", { disabled: disabled, type: "button", className: "af-link af-link--delete-file", onClick: () => onClick(id), children: _jsx("span", { className: "af-link__text", children: "Supprimer" }) })] }));
|
|
6
9
|
};
|
|
7
10
|
export { FileLine };
|
|
@@ -7,8 +7,7 @@ type Props = Pick<FileLineProps, "onClick"> & {
|
|
|
7
7
|
errors?: FileRejection[];
|
|
8
8
|
values?: CustomFile[];
|
|
9
9
|
className?: string;
|
|
10
|
-
classModifier?: string;
|
|
11
10
|
disabled?: boolean;
|
|
12
11
|
};
|
|
13
|
-
declare const FileTable: ({ errors, values, className,
|
|
12
|
+
declare const FileTable: ({ errors, values, className, disabled, onClick }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
14
13
|
export { FileTable };
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { getClassName } from "../../utilities";
|
|
3
3
|
import { FileErrors } from "./FileErrors";
|
|
4
4
|
import { FileLine } from "./FileLine";
|
|
5
|
-
const FileTable = ({ errors, values, className,
|
|
6
|
-
const componentClassName =
|
|
5
|
+
const FileTable = ({ errors, values, className, disabled, onClick }) => {
|
|
6
|
+
const componentClassName = getClassName({
|
|
7
|
+
baseClassName: "af-file-table",
|
|
8
|
+
className: `custom-table-file ${className ?? ""}`,
|
|
9
|
+
});
|
|
7
10
|
return (_jsxs("div", { className: componentClassName, children: [errors && errors.length > 0 ? _jsx(FileErrors, { errors: errors }) : null, values && values.length > 0 ? (_jsx("ul", { className: "af-form__file-list", children: values.map(({ file, id }) => (_jsx(FileLine, { disabled: disabled, file: file, onClick: onClick, id: id }, id))) })) : null] }));
|
|
8
11
|
};
|
|
9
12
|
export { FileTable };
|
|
@@ -4,7 +4,7 @@ import {} from "react";
|
|
|
4
4
|
import { Field } from "../core";
|
|
5
5
|
import { MultiSelect } from "./MultiSelect";
|
|
6
6
|
const MultiSelectInput = ({ label, children, ...multiSelectProps }) => {
|
|
7
|
-
return (_jsx(Field, { label: label, ...multiSelectProps,
|
|
7
|
+
return (_jsx(Field, { label: label, ...multiSelectProps, fieldClassNameSuffix: "select", renderInput: ({ id, ariaInvalid, errorId, ...props }) => {
|
|
8
8
|
return (_jsxs(_Fragment, { children: [_jsx(MultiSelect, { id: id, "aria-invalid": ariaInvalid, "aria-describedby": errorId, ...props }), children] }));
|
|
9
9
|
} }));
|
|
10
10
|
};
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import "@axa-fr/canopee-css/distributeur/Form/NestedQuestion/NestedQuestion.css";
|
|
3
|
-
import {
|
|
3
|
+
import { getClassName } from "../../utilities";
|
|
4
|
+
const baseClassName = "af-form__nested-question";
|
|
4
5
|
export const NestedQuestion = ({ children, className, }) => {
|
|
5
|
-
const componentClassName =
|
|
6
|
-
|
|
6
|
+
const componentClassName = getClassName({
|
|
7
|
+
baseClassName,
|
|
8
|
+
className,
|
|
9
|
+
});
|
|
10
|
+
return (_jsxs("section", { className: componentClassName, children: [_jsx("div", { className: `${baseClassName}-arrow` }), _jsx("section", { children: children })] }));
|
|
7
11
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "@axa-fr/canopee-css/distributeur/Form/Text/Text.css";
|
|
2
2
|
import { type ComponentPropsWithRef } from "react";
|
|
3
|
-
type Props = Omit<ComponentPropsWithRef<"input">, "type"> & {
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
type Props = Omit<ComponentPropsWithRef<"input">, "type"> & {};
|
|
4
|
+
declare const NumberComponent: {
|
|
5
|
+
({ id, className, required, ...otherProps }: Props): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
displayName: string;
|
|
6
7
|
};
|
|
7
|
-
|
|
8
|
-
export { Number };
|
|
8
|
+
export { NumberComponent as Number };
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import "@axa-fr/canopee-css/distributeur/Form/Text/Text.css";
|
|
3
|
-
import {
|
|
3
|
+
import { useId } from "react";
|
|
4
4
|
import { getClassName } from "../../utilities/helpers/getClassName";
|
|
5
|
-
const
|
|
5
|
+
const NumberComponent = ({ id, className, required, ...otherProps }) => {
|
|
6
6
|
const inputUseId = useId();
|
|
7
7
|
const inputId = id ?? inputUseId;
|
|
8
8
|
const componentClassName = getClassName({
|
|
9
9
|
baseClassName: "af-form__input-text",
|
|
10
|
-
modifiers: classModifier?.split(" "),
|
|
11
10
|
className,
|
|
12
11
|
});
|
|
13
|
-
return (_jsx("input", { className: componentClassName, id: inputId, type: "number",
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export { Number };
|
|
12
|
+
return (_jsx("input", { className: componentClassName, id: inputId, type: "number", required: required, ...otherProps }));
|
|
13
|
+
};
|
|
14
|
+
NumberComponent.displayName = "Number";
|
|
15
|
+
export { NumberComponent as Number };
|
|
@@ -3,5 +3,5 @@ import {} from "react";
|
|
|
3
3
|
import { Field } from "../core";
|
|
4
4
|
import { Number } from "./Number";
|
|
5
5
|
export const NumberInput = ({ children, ...props }) => {
|
|
6
|
-
return (_jsx(Field, { ...props, renderInput: ({ id,
|
|
6
|
+
return (_jsx(Field, { ...props, renderInput: ({ id, inputClassName, ariaInvalid, errorId, ...inputProps }) => (_jsxs(_Fragment, { children: [_jsx(Number, { id: id, className: inputClassName, "aria-describedby": errorId, "aria-invalid": ariaInvalid, ...inputProps }), children] })) }));
|
|
7
7
|
};
|
|
@@ -1,33 +1,22 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef } from "react";
|
|
1
2
|
import type { Option } from "../core";
|
|
3
|
+
import { RadioCardGroup } from "./RadioCardGroup";
|
|
4
|
+
import { RadioItem } from "./RadioItem";
|
|
2
5
|
export declare enum RadioModes {
|
|
3
6
|
classic = "classic",
|
|
4
7
|
default = "default",
|
|
5
8
|
inline = "inline",
|
|
6
9
|
cardRadio = "cardRadio"
|
|
7
10
|
}
|
|
8
|
-
|
|
11
|
+
type Props = {
|
|
9
12
|
options: Option[];
|
|
10
|
-
} & Omit<
|
|
11
|
-
options: ({
|
|
12
|
-
id?: string;
|
|
13
|
-
icon?: import("react").ReactNode;
|
|
14
|
-
label: import("react").ReactNode;
|
|
15
|
-
description?: import("react").ReactNode;
|
|
16
|
-
value: string;
|
|
17
|
-
} & import("react").InputHTMLAttributes<HTMLInputElement> & {
|
|
18
|
-
action?: import("react").ReactNode;
|
|
19
|
-
})[];
|
|
20
|
-
orientation?: "horizontal" | "vertical";
|
|
21
|
-
}, "ref"> & {
|
|
22
|
-
mode: "cardRadio";
|
|
23
|
-
}) | Omit<{
|
|
24
|
-
options: Option[];
|
|
25
|
-
} & Omit<Omit<Omit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "type" | "checked"> & {
|
|
26
|
-
classModifier?: string;
|
|
27
|
-
optionClassName?: string;
|
|
28
|
-
label?: import("react").ReactNode;
|
|
29
|
-
isChecked?: boolean;
|
|
30
|
-
}, "ref"> & import("react").RefAttributes<HTMLInputElement>, "className" | "id" | "label"> & {
|
|
13
|
+
} & ((Omit<ComponentPropsWithRef<typeof RadioItem>, "id" | "label"> & {
|
|
31
14
|
mode?: "classic" | "default" | "inline";
|
|
32
|
-
}
|
|
15
|
+
}) | (ComponentPropsWithRef<typeof RadioCardGroup> & {
|
|
16
|
+
mode: "cardRadio";
|
|
17
|
+
}));
|
|
18
|
+
declare const Radio: {
|
|
19
|
+
({ options, value, children, disabled, ...otherProps }: Props): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
displayName: string;
|
|
21
|
+
};
|
|
33
22
|
export { Radio };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createElement as _createElement } from "react";
|
|
2
2
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import classNames from "classnames";
|
|
4
|
-
import {
|
|
4
|
+
import {} from "react";
|
|
5
5
|
import { RadioCardGroup } from "./RadioCardGroup";
|
|
6
6
|
import { RadioItem } from "./RadioItem";
|
|
7
7
|
export var RadioModes;
|
|
@@ -23,7 +23,7 @@ const getClassNameMode = (mode) => {
|
|
|
23
23
|
return "af-form__radio-custom";
|
|
24
24
|
}
|
|
25
25
|
};
|
|
26
|
-
const Radio =
|
|
26
|
+
const Radio = ({ options, value = "", children, disabled, ...otherProps }) => {
|
|
27
27
|
const { mode, ...onlyNecessaryProps } = otherProps;
|
|
28
28
|
const classNameMode = getClassNameMode(mode ?? "default");
|
|
29
29
|
if (mode === "cardRadio") {
|
|
@@ -31,7 +31,7 @@ const Radio = forwardRef(({ options, value = "", children, disabled, ...otherPro
|
|
|
31
31
|
}
|
|
32
32
|
return (_jsxs(_Fragment, { children: [_jsx("div", { className: classNames("af-form__radio-group", [
|
|
33
33
|
{ "af-form__radio-group-classic": mode === RadioModes.classic },
|
|
34
|
-
]), children: options.map((option) => (_createElement(RadioItem, { ...onlyNecessaryProps, key: option.value, isChecked: option.value === value, disabled: option.disabled || disabled, className: classNameMode,
|
|
35
|
-
}
|
|
34
|
+
]), children: options.map((option) => (_createElement(RadioItem, { ...onlyNecessaryProps, key: option.value, isChecked: option.value === value, disabled: option.disabled || disabled, className: classNameMode, ...option }))) }), children] }));
|
|
35
|
+
};
|
|
36
36
|
Radio.displayName = "EnhancedInputRadio";
|
|
37
37
|
export { Radio };
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type ComponentPropsWithRef } from "react";
|
|
2
2
|
import { type ConsumerFieldProps } from "../core";
|
|
3
3
|
import { Radio } from "./Radio";
|
|
4
|
-
type RadioInputProps = ConsumerFieldProps &
|
|
5
|
-
declare const RadioInput:
|
|
4
|
+
type RadioInputProps = ConsumerFieldProps & ComponentPropsWithRef<typeof Radio>;
|
|
5
|
+
declare const RadioInput: {
|
|
6
|
+
({ label, mode, options, children, ...props }: RadioInputProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
displayName: string;
|
|
8
|
+
};
|
|
6
9
|
export { RadioInput };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import {} from "react";
|
|
3
3
|
import { Field, useOptionsWithId } from "../core";
|
|
4
4
|
import { Radio, RadioModes } from "./Radio";
|
|
5
|
-
const RadioInput =
|
|
5
|
+
const RadioInput = ({ label, mode = "default", options, children, ...props }) => {
|
|
6
6
|
const labelPosition = mode === RadioModes.classic ? "top" : "center";
|
|
7
7
|
const newOptions = useOptionsWithId(options);
|
|
8
|
-
return (_jsx(Field, { label: label, labelPosition: labelPosition, roleContainer: "radiogroup", ...props, renderInput: ({
|
|
9
|
-
}
|
|
8
|
+
return (_jsx(Field, { label: label, labelPosition: labelPosition, roleContainer: "radiogroup", ...props, renderInput: ({ inputClassName, ...radioProps }) => (_jsx(Radio, { options: newOptions, mode: mode, className: inputClassName, ...radioProps, children: children })) }));
|
|
9
|
+
};
|
|
10
10
|
RadioInput.displayName = "EnhancedInputRadio";
|
|
11
11
|
export { RadioInput };
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import "@axa-fr/canopee-css/distributeur/Form/Radio/Radio.css";
|
|
2
2
|
import { type ComponentPropsWithRef, type ReactNode } from "react";
|
|
3
3
|
type Props = Omit<ComponentPropsWithRef<"input">, "checked" | "type"> & {
|
|
4
|
-
/** @deprecated Use `className` instead. */
|
|
5
|
-
classModifier?: string;
|
|
6
4
|
optionClassName?: string;
|
|
7
5
|
label?: ReactNode;
|
|
8
6
|
isChecked?: boolean;
|
|
9
7
|
};
|
|
10
|
-
declare const RadioItem:
|
|
8
|
+
declare const RadioItem: {
|
|
9
|
+
({ value, id, isChecked, label, className, disabled, ...otherProps }: Props): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
displayName: string;
|
|
11
|
+
};
|
|
11
12
|
export { RadioItem };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import "@axa-fr/canopee-css/distributeur/Form/Radio/Radio.css";
|
|
3
|
-
import {
|
|
3
|
+
import { useId } from "react";
|
|
4
4
|
import { getOptionClassName } from "../core";
|
|
5
|
-
const RadioItem =
|
|
6
|
-
const optionClassName = getOptionClassName(className,
|
|
5
|
+
const RadioItem = ({ value = "", id, isChecked, label, className = "", disabled = false, ...otherProps }) => {
|
|
6
|
+
const optionClassName = getOptionClassName(className, "af-form__radio", disabled);
|
|
7
7
|
const generatedId = useId();
|
|
8
8
|
const newId = id ?? generatedId;
|
|
9
|
-
return (_jsxs("div", { className: optionClassName, children: [_jsx("input", { ...otherProps, className: "af-form__input-radio", id: newId, type: "radio", value: value, checked: isChecked,
|
|
10
|
-
}
|
|
9
|
+
return (_jsxs("div", { className: optionClassName, children: [_jsx("input", { ...otherProps, className: "af-form__input-radio", id: newId, type: "radio", value: value, checked: isChecked, disabled: disabled }), _jsx("label", { className: "af-form__label", htmlFor: newId, children: _jsx("span", { className: "af-form__description", children: label }) })] }, value));
|
|
10
|
+
};
|
|
11
11
|
RadioItem.displayName = "RadioItem";
|
|
12
12
|
export { RadioItem };
|