@axa-fr/canopee-react 1.8.0 → 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
|
@@ -2,11 +2,6 @@ import "@axa-fr/canopee-css/distributeur/Tag/Tag.css";
|
|
|
2
2
|
import { type ComponentPropsWithRef, type PropsWithChildren } from "react";
|
|
3
3
|
export type TagVariants = "success" | "information" | "warning" | "error" | "default" | "dark" | "purple" | "gray" | "white";
|
|
4
4
|
type TagProps = ComponentPropsWithRef<"span"> & {
|
|
5
|
-
/**
|
|
6
|
-
* Modifier class to apply specific styles. Note: "danger" is deprecated, use "warning" instead. "info" is deprecated, use "information" instead
|
|
7
|
-
* @deprecated Use `variant` instead
|
|
8
|
-
*/
|
|
9
|
-
classModifier?: string;
|
|
10
5
|
/**
|
|
11
6
|
* Variant of the tag to apply specific styles.
|
|
12
7
|
* "warning" replaces the deprecated "danger
|
|
@@ -28,5 +23,8 @@ type TagProps = ComponentPropsWithRef<"span"> & {
|
|
|
28
23
|
* @param {React.Ref<HTMLSpanElement>} ref - The ref to the span element.
|
|
29
24
|
* @returns {JSX.Element} The rendered Tag component.
|
|
30
25
|
*/
|
|
31
|
-
export declare const Tag:
|
|
26
|
+
export declare const Tag: {
|
|
27
|
+
({ children, className, variant, ...otherProps }: PropsWithChildren<TagProps>): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
displayName: string;
|
|
29
|
+
};
|
|
32
30
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import "@axa-fr/canopee-css/distributeur/Tag/Tag.css";
|
|
3
|
-
import {
|
|
3
|
+
import {} from "react";
|
|
4
4
|
import { getClassName } from "../utilities/helpers/getClassName";
|
|
5
5
|
/**
|
|
6
6
|
* Tag component to display a label with various styles.
|
|
@@ -14,8 +14,8 @@ import { getClassName } from "../utilities/helpers/getClassName";
|
|
|
14
14
|
* @param {React.Ref<HTMLSpanElement>} ref - The ref to the span element.
|
|
15
15
|
* @returns {JSX.Element} The rendered Tag component.
|
|
16
16
|
*/
|
|
17
|
-
export const Tag =
|
|
18
|
-
const actualModifier = variant ||
|
|
17
|
+
export const Tag = ({ children, className, variant, ...otherProps }) => {
|
|
18
|
+
const actualModifier = variant || "default";
|
|
19
19
|
const componentClassName = getClassName({
|
|
20
20
|
baseClassName: "af-tag",
|
|
21
21
|
modifiers: [actualModifier],
|
|
@@ -27,6 +27,6 @@ export const Tag = forwardRef(({ children, className, classModifier, variant, ..
|
|
|
27
27
|
modifiers: [actualModifier],
|
|
28
28
|
className,
|
|
29
29
|
});
|
|
30
|
-
return (_jsx("span", {
|
|
31
|
-
}
|
|
30
|
+
return (_jsx("span", { className: `${componentClassName} ${badgeClassName}`, ...otherProps, children: children }));
|
|
31
|
+
};
|
|
32
32
|
Tag.displayName = "Tag";
|
|
@@ -2,12 +2,13 @@ import "@axa-fr/canopee-css/distributeur/Title/Title.css";
|
|
|
2
2
|
import { type ComponentPropsWithRef, type PropsWithChildren, type ReactElement, type ReactNode } from "react";
|
|
3
3
|
type Headings = "h2" | "h3" | "h4";
|
|
4
4
|
type TitleProps = ComponentPropsWithRef<"h2"> & {
|
|
5
|
-
/** @deprecated Use `className` instead. */
|
|
6
|
-
classModifier?: string;
|
|
7
5
|
heading?: Headings;
|
|
8
6
|
contentLeft?: ReactElement;
|
|
9
7
|
contentRight?: ReactNode;
|
|
10
8
|
withDivider?: boolean;
|
|
11
9
|
};
|
|
12
|
-
export declare const Title:
|
|
10
|
+
export declare const Title: {
|
|
11
|
+
({ className, children, heading: Heading, contentLeft, contentRight, withDivider, ...otherProps }: PropsWithChildren<TitleProps>): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
displayName: string;
|
|
13
|
+
};
|
|
13
14
|
export {};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import "@axa-fr/canopee-css/distributeur/Title/Title.css";
|
|
3
|
-
import {
|
|
3
|
+
import {} from "react";
|
|
4
4
|
import { getClassName } from "../utilities/helpers/getClassName";
|
|
5
5
|
const baseClass = "af-title";
|
|
6
|
-
export const Title =
|
|
7
|
-
const modifiers =
|
|
6
|
+
export const Title = ({ className, children, heading: Heading = "h2", contentLeft, contentRight, withDivider = true, ...otherProps }) => {
|
|
7
|
+
const modifiers = [];
|
|
8
8
|
if (!withDivider) {
|
|
9
9
|
modifiers.push("without-divider");
|
|
10
10
|
}
|
|
@@ -13,6 +13,6 @@ export const Title = forwardRef(({ className, classModifier, children, heading:
|
|
|
13
13
|
modifiers,
|
|
14
14
|
className,
|
|
15
15
|
});
|
|
16
|
-
return (_jsxs("div", { className: `${baseClass}--container`, children: [_jsxs(Heading, {
|
|
17
|
-
}
|
|
16
|
+
return (_jsxs("div", { className: `${baseClass}--container`, children: [_jsxs(Heading, { className: componentClassName, ...otherProps, children: [children, contentLeft] }), contentRight ? (_jsx("div", { className: `${baseClass}__content-right`, children: contentRight })) : null] }));
|
|
17
|
+
};
|
|
18
18
|
Title.displayName = "Title";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { BREAKPOINT } from "./utilities/constants";
|
|
2
|
-
export {
|
|
2
|
+
export { getClassName } from "./utilities/helpers/getClassName";
|
|
3
3
|
export { useIsSmallScreen } from "./utilities/hooks/useIsSmallScreen";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { BREAKPOINT } from "./utilities/constants";
|
|
2
|
-
export {
|
|
2
|
+
export { getClassName } from "./utilities/helpers/getClassName";
|
|
3
3
|
export { useIsSmallScreen } from "./utilities/hooks/useIsSmallScreen";
|
package/dist/distributeur.d.ts
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
|
+
import "@axa-fr/canopee-css/distributeur/common/layers.css";
|
|
2
|
+
import "@axa-fr/canopee-css/distributeur/common/reboot.css";
|
|
1
3
|
import "@axa-fr/canopee-css/distributeur/common/grid.css";
|
|
2
4
|
import "@axa-fr/canopee-css/distributeur/common/icons.css";
|
|
3
|
-
import "@axa-fr/canopee-css/distributeur/common/reboot.css";
|
|
4
5
|
import "@axa-fr/canopee-css/distributeur/common/tokens.css";
|
|
5
6
|
import "@axa-fr/canopee-css/distributeur/Form/core/FormCore.css";
|
|
6
7
|
import "@fontsource/source-sans-pro/400.css";
|
|
7
8
|
import "@fontsource/source-sans-pro/600.css";
|
|
8
9
|
import "@fontsource/source-sans-pro/700.css";
|
|
9
|
-
import { Message } from "./distributeur/Messages/Message";
|
|
10
|
-
import { Tag } from "./distributeur/Tag/Tag";
|
|
11
10
|
export { Action } from "./distributeur/Action/Action";
|
|
12
11
|
export { Button } from "./distributeur/Button/Button";
|
|
13
12
|
export type { ButtonVariant } from "./distributeur/Button/Button";
|
|
@@ -15,22 +14,21 @@ export { Card } from "./distributeur/Card/Card";
|
|
|
15
14
|
export { Divider } from "./distributeur/Divider/Divider";
|
|
16
15
|
export { Checkbox, CheckboxInput, CheckboxItem, CheckboxModes, } from "./distributeur/Form/Checkbox";
|
|
17
16
|
export { Choice, ChoiceInput } from "./distributeur/Form/Choice";
|
|
18
|
-
export {
|
|
17
|
+
export { Field, FieldError, FormClassManager, HelpMessage, InputList, MessageTypes, } from "./distributeur/Form/core";
|
|
19
18
|
export { Date, DateInput } from "./distributeur/Form/Date";
|
|
20
19
|
export { File, FileInput, FileTable, type FilePreview, } from "./distributeur/Form/File";
|
|
21
20
|
export { MultiSelect, MultiSelectInput } from "./distributeur/Form/MultiSelect";
|
|
22
21
|
export { NestedQuestion } from "./distributeur/Form/NestedQuestion/NestedQuestion";
|
|
23
22
|
export { Number, NumberInput } from "./distributeur/Form/Number";
|
|
24
|
-
export { Pass, PassInput } from "./distributeur/Form/Pass";
|
|
25
23
|
export { Radio, RadioInput, RadioItem, RadioModes, } from "./distributeur/Form/Radio";
|
|
26
|
-
export { Select,
|
|
27
|
-
export { Slider, SliderInput } from "./distributeur/Form/Slider";
|
|
24
|
+
export { Select, SelectInput } from "./distributeur/Form/Select";
|
|
28
25
|
export { Text, TextInput } from "./distributeur/Form/Text";
|
|
29
26
|
export { Textarea, TextareaInput } from "./distributeur/Form/Textarea";
|
|
30
27
|
export { Footer } from "./distributeur/Layout/Footer";
|
|
31
28
|
export { Header, HeaderTitle, Infos, MenuTitleWrapper, Name, NavBar, NavBarBase, NavBarItem, NavBarItemBase, NavBarItemLink, ToggleButton, User, type AnchorNavBarItem, } from "./distributeur/Layout/Header";
|
|
32
29
|
export { MainContainer } from "./distributeur/Layout/MainContainer/MainContainer";
|
|
33
30
|
export { Link, type LinkProps } from "./distributeur/Link/Link";
|
|
31
|
+
export { ButtonMultiActions, type ButtonMultiActionsProps, } from "./distributeur/ButtonMultiActions";
|
|
34
32
|
export { MandatoryMention } from "./distributeur/MandatoryMention/MandatoryMention";
|
|
35
33
|
export { BooleanModal, Modal, ModalBody, ModalFooter, ModalHeader, ModalHeaderBase, } from "./distributeur/ModalAgent";
|
|
36
34
|
export { ArticleRestitution, HeaderRestitution, Restitution, RestitutionList, SectionRestitution, SectionRestitutionColumn, SectionRestitutionRow, SectionRestitutionTitle, } from "./distributeur/Restitution";
|
|
@@ -40,28 +38,22 @@ export { Summary } from "./distributeur/Summary";
|
|
|
40
38
|
export { Svg } from "./distributeur/Svg";
|
|
41
39
|
export { Tabs } from "./distributeur/Tabs/Tabs";
|
|
42
40
|
export { Title } from "./distributeur/Title/Title";
|
|
43
|
-
export {
|
|
44
|
-
/** @deprecated Use `Tag` instead. */
|
|
45
|
-
declare const Badge: import("react").ForwardRefExoticComponent<Omit<import("react").PropsWithChildren<import("react").ClassAttributes<HTMLSpanElement> & import("react").HTMLAttributes<HTMLSpanElement> & {
|
|
46
|
-
classModifier?: string;
|
|
47
|
-
variant?: import("./distributeur").TagVariants;
|
|
48
|
-
disabled?: boolean;
|
|
49
|
-
}>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
41
|
+
export { getClassName } from "./distributeur/utilities";
|
|
50
42
|
export type { TagVariants } from "./distributeur/Tag/Tag";
|
|
51
|
-
export {
|
|
52
|
-
/**
|
|
53
|
-
* @deprecated `Alert` has been renamed `Message` in order to comply with UX naming of components. Use `Message` instead.
|
|
54
|
-
* @see {@link Message}
|
|
55
|
-
*/
|
|
56
|
-
declare const Alert: ({ className, onClose, icon, title, children, classModifier, variant, closeButtonAriaLabel, }: import("react").PropsWithChildren<import("./distributeur").MessageProps>) => import("react/jsx-runtime").JSX.Element;
|
|
43
|
+
export { Tag } from "./distributeur/Tag/Tag";
|
|
57
44
|
export * from "./distributeur/Accordion";
|
|
58
45
|
export { type MessageProps, type MessageVariants, } from "./distributeur/Messages/Message";
|
|
59
46
|
export * from "./distributeur/Popover";
|
|
60
47
|
export * from "./distributeur/Table";
|
|
61
|
-
export {
|
|
48
|
+
export { Message } from "./distributeur/Messages/Message";
|
|
62
49
|
export { HelpButton } from "./distributeur/HelpButton";
|
|
63
50
|
export { Loader } from "./distributeur/Loader/Loader";
|
|
51
|
+
export { ItemLoader, type ItemLoaderVariant, } from "./distributeur/Loader/ItemLoader";
|
|
64
52
|
export { CardData } from "./distributeur/CardData/CardData";
|
|
65
53
|
export type { CardDataVariant } from "./distributeur/CardData/CardData";
|
|
66
54
|
export { EditorialMessage, type EditorialMessageProps, type EditorialMessageType, } from "./distributeur/EditorialMessage/EditorialMessage";
|
|
67
55
|
export { Timeline, type TimelineProps, type TimelineVariants, } from "./distributeur/Timeline/Timeline";
|
|
56
|
+
export { CardButton, type CardButtonProps, } from "./distributeur/CardButton/CardButton";
|
|
57
|
+
export type { ClickableComponentProps } from "./distributeur/ClickableGhost";
|
|
58
|
+
export { BaseCard, type BaseCardProps } from "./distributeur/Card/BaseCard";
|
|
59
|
+
export { ItemFormHelper, type ItemFormHelperProps, type ItemFormHelperVariant, } from "./distributeur/ItemFormHelper/ItemFormHelper";
|
package/dist/distributeur.js
CHANGED
|
@@ -1,35 +1,33 @@
|
|
|
1
|
+
import "@axa-fr/canopee-css/distributeur/common/layers.css";
|
|
2
|
+
import "@axa-fr/canopee-css/distributeur/common/reboot.css";
|
|
1
3
|
import "@axa-fr/canopee-css/distributeur/common/grid.css";
|
|
2
4
|
import "@axa-fr/canopee-css/distributeur/common/icons.css";
|
|
3
|
-
import "@axa-fr/canopee-css/distributeur/common/reboot.css";
|
|
4
5
|
import "@axa-fr/canopee-css/distributeur/common/tokens.css";
|
|
5
6
|
import "@axa-fr/canopee-css/distributeur/Form/core/FormCore.css";
|
|
6
7
|
import "@fontsource/source-sans-pro/400.css";
|
|
7
8
|
import "@fontsource/source-sans-pro/600.css";
|
|
8
9
|
import "@fontsource/source-sans-pro/700.css";
|
|
9
|
-
import { Message } from "./distributeur/Messages/Message";
|
|
10
|
-
import { Tag } from "./distributeur/Tag/Tag";
|
|
11
10
|
export { Action } from "./distributeur/Action/Action";
|
|
12
11
|
export { Button } from "./distributeur/Button/Button";
|
|
13
12
|
export { Card } from "./distributeur/Card/Card";
|
|
14
13
|
export { Divider } from "./distributeur/Divider/Divider";
|
|
15
14
|
export { Checkbox, CheckboxInput, CheckboxItem, CheckboxModes, } from "./distributeur/Form/Checkbox";
|
|
16
15
|
export { Choice, ChoiceInput } from "./distributeur/Form/Choice";
|
|
17
|
-
export {
|
|
16
|
+
export { Field, FieldError, FormClassManager, HelpMessage, InputList, MessageTypes, } from "./distributeur/Form/core";
|
|
18
17
|
export { Date, DateInput } from "./distributeur/Form/Date";
|
|
19
18
|
export { File, FileInput, FileTable, } from "./distributeur/Form/File";
|
|
20
19
|
export { MultiSelect, MultiSelectInput } from "./distributeur/Form/MultiSelect";
|
|
21
20
|
export { NestedQuestion } from "./distributeur/Form/NestedQuestion/NestedQuestion";
|
|
22
21
|
export { Number, NumberInput } from "./distributeur/Form/Number";
|
|
23
|
-
export { Pass, PassInput } from "./distributeur/Form/Pass";
|
|
24
22
|
export { Radio, RadioInput, RadioItem, RadioModes, } from "./distributeur/Form/Radio";
|
|
25
|
-
export { Select,
|
|
26
|
-
export { Slider, SliderInput } from "./distributeur/Form/Slider";
|
|
23
|
+
export { Select, SelectInput } from "./distributeur/Form/Select";
|
|
27
24
|
export { Text, TextInput } from "./distributeur/Form/Text";
|
|
28
25
|
export { Textarea, TextareaInput } from "./distributeur/Form/Textarea";
|
|
29
26
|
export { Footer } from "./distributeur/Layout/Footer";
|
|
30
27
|
export { Header, HeaderTitle, Infos, MenuTitleWrapper, Name, NavBar, NavBarBase, NavBarItem, NavBarItemBase, NavBarItemLink, ToggleButton, User, } from "./distributeur/Layout/Header";
|
|
31
28
|
export { MainContainer } from "./distributeur/Layout/MainContainer/MainContainer";
|
|
32
29
|
export { Link } from "./distributeur/Link/Link";
|
|
30
|
+
export { ButtonMultiActions, } from "./distributeur/ButtonMultiActions";
|
|
33
31
|
export { MandatoryMention } from "./distributeur/MandatoryMention/MandatoryMention";
|
|
34
32
|
export { BooleanModal, Modal, ModalBody, ModalFooter, ModalHeader, ModalHeaderBase, } from "./distributeur/ModalAgent";
|
|
35
33
|
export { ArticleRestitution, HeaderRestitution, Restitution, RestitutionList, SectionRestitution, SectionRestitutionColumn, SectionRestitutionRow, SectionRestitutionTitle, } from "./distributeur/Restitution";
|
|
@@ -38,22 +36,19 @@ export { Summary } from "./distributeur/Summary";
|
|
|
38
36
|
export { Svg } from "./distributeur/Svg";
|
|
39
37
|
export { Tabs } from "./distributeur/Tabs/Tabs";
|
|
40
38
|
export { Title } from "./distributeur/Title/Title";
|
|
41
|
-
export {
|
|
42
|
-
|
|
43
|
-
const Badge = Tag;
|
|
44
|
-
export { Badge, Tag };
|
|
45
|
-
/**
|
|
46
|
-
* @deprecated `Alert` has been renamed `Message` in order to comply with UX naming of components. Use `Message` instead.
|
|
47
|
-
* @see {@link Message}
|
|
48
|
-
*/
|
|
49
|
-
const Alert = Message;
|
|
39
|
+
export { getClassName } from "./distributeur/utilities";
|
|
40
|
+
export { Tag } from "./distributeur/Tag/Tag";
|
|
50
41
|
export * from "./distributeur/Accordion";
|
|
51
42
|
export {} from "./distributeur/Messages/Message";
|
|
52
43
|
export * from "./distributeur/Popover";
|
|
53
44
|
export * from "./distributeur/Table";
|
|
54
|
-
export {
|
|
45
|
+
export { Message } from "./distributeur/Messages/Message";
|
|
55
46
|
export { HelpButton } from "./distributeur/HelpButton";
|
|
56
47
|
export { Loader } from "./distributeur/Loader/Loader";
|
|
48
|
+
export { ItemLoader, } from "./distributeur/Loader/ItemLoader";
|
|
57
49
|
export { CardData } from "./distributeur/CardData/CardData";
|
|
58
50
|
export { EditorialMessage, } from "./distributeur/EditorialMessage/EditorialMessage";
|
|
59
51
|
export { Timeline, } from "./distributeur/Timeline/Timeline";
|
|
52
|
+
export { CardButton, } from "./distributeur/CardButton/CardButton";
|
|
53
|
+
export { BaseCard } from "./distributeur/Card/BaseCard";
|
|
54
|
+
export { ItemFormHelper, } from "./distributeur/ItemFormHelper/ItemFormHelper";
|
|
@@ -1,19 +1,17 @@
|
|
|
1
1
|
import { type ComponentProps, type ComponentType, type MouseEventHandler, type ReactNode } from "react";
|
|
2
|
+
import type { ClickIconVariant } from "../ClickIcon/ClickIconCommon";
|
|
2
3
|
import type { IconProps } from "../Icon/IconCommon";
|
|
3
4
|
type SummaryOnClick = MouseEventHandler<HTMLElement>;
|
|
4
5
|
export type AccordionCoreProps = {
|
|
5
6
|
summary: ReactNode;
|
|
6
|
-
/**
|
|
7
|
-
* @deprecated use `open` instead
|
|
8
|
-
*/
|
|
9
|
-
isOpen?: boolean;
|
|
10
7
|
summaryProps?: Omit<ComponentProps<"summary">, "onClick">;
|
|
11
8
|
onClick?: SummaryOnClick;
|
|
12
9
|
showArrowAsClickIcon?: boolean;
|
|
10
|
+
arrowClickIconVariant?: ClickIconVariant;
|
|
13
11
|
arrowIconVariant?: IconProps["variant"];
|
|
14
12
|
} & ComponentProps<"details">;
|
|
15
13
|
export type AccordionPropsCommonProps = AccordionCoreProps & {
|
|
16
14
|
IconComponent: ComponentType<IconProps>;
|
|
17
15
|
};
|
|
18
|
-
export declare const AccordionCoreCommon: ({ summary, children, className, summaryProps,
|
|
16
|
+
export declare const AccordionCoreCommon: ({ summary, children, className, summaryProps, IconComponent, onClick, showArrowAsClickIcon, arrowClickIconVariant, arrowIconVariant, ...detailsProps }: AccordionPropsCommonProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
17
|
export {};
|
|
@@ -1,22 +1,28 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useCallback, } from "react";
|
|
3
2
|
import keyboardDown from "@material-symbols/svg-400/rounded/keyboard_arrow_down-fill.svg";
|
|
3
|
+
import { useCallback, } from "react";
|
|
4
4
|
import { getClassName } from "../utilities/getClassName";
|
|
5
|
-
export const AccordionCoreCommon = ({ summary, children, className, summaryProps,
|
|
5
|
+
export const AccordionCoreCommon = ({ summary, children, className, summaryProps, IconComponent, onClick, showArrowAsClickIcon = true, arrowClickIconVariant = "default", arrowIconVariant, ...detailsProps }) => {
|
|
6
6
|
const handleSummaryClick = useCallback((event) => {
|
|
7
7
|
if (onClick) {
|
|
8
8
|
event.preventDefault();
|
|
9
9
|
onClick(event);
|
|
10
10
|
}
|
|
11
11
|
}, [onClick]);
|
|
12
|
+
const arrowClassName = showArrowAsClickIcon
|
|
13
|
+
? getClassName({
|
|
14
|
+
baseClassName: "af-click-icon",
|
|
15
|
+
modifiers: [arrowClickIconVariant === "ghost" && arrowClickIconVariant],
|
|
16
|
+
})
|
|
17
|
+
: undefined;
|
|
12
18
|
return (_jsxs("details", { className: getClassName({
|
|
13
19
|
baseClassName: "af-apollo-accordion",
|
|
14
20
|
className,
|
|
15
|
-
}),
|
|
21
|
+
}), ...detailsProps, children: [_jsxs("summary", { onClick: handleSummaryClick, tabIndex: 0, ...summaryProps, className: getClassName({
|
|
16
22
|
baseClassName: "af-apollo-accordion__summary",
|
|
17
23
|
className: summaryProps?.className,
|
|
18
24
|
}), children: [summary, _jsx("div", { className: getClassName({
|
|
19
25
|
baseClassName: "af-accordion__arrow",
|
|
20
|
-
className:
|
|
26
|
+
className: arrowClassName,
|
|
21
27
|
}), children: _jsx(IconComponent, { src: keyboardDown, role: "presentation", variant: arrowIconVariant }) })] }), children] }));
|
|
22
28
|
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { ComponentPropsWithoutRef, ElementType } from "react";
|
|
2
|
+
import "@axa-fr/canopee-css/prospect/AppName/AppNameAll.css";
|
|
3
|
+
/**
|
|
4
|
+
* Props for the AppName component.
|
|
5
|
+
*/
|
|
6
|
+
export type AppNameProps = ComponentPropsWithoutRef<"div"> & {
|
|
7
|
+
/**
|
|
8
|
+
* Application name displayed next to the AXA logo.
|
|
9
|
+
*/
|
|
10
|
+
label: string;
|
|
11
|
+
/**
|
|
12
|
+
* Alt text for the AXA logo image.
|
|
13
|
+
* @default "Logo AXA"
|
|
14
|
+
*/
|
|
15
|
+
logoAlt?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Props forwarded to the `LogoLinkComponent` (defaults to `<a>`).
|
|
18
|
+
* @example { href: "/" }
|
|
19
|
+
* @example { to: "/" } // for React Router Link
|
|
20
|
+
*/
|
|
21
|
+
logoLinkProps?: Record<string, unknown>;
|
|
22
|
+
/**
|
|
23
|
+
* Element or component used to wrap the logo.
|
|
24
|
+
* Accepts native HTML elements (`"a"`) or custom components (e.g. `Link` from React Router or the DS).
|
|
25
|
+
* `logoLinkProps` are forwarded to it.
|
|
26
|
+
* @default "a"
|
|
27
|
+
* @example "a"
|
|
28
|
+
* @example Link // from react-router-dom or the DS
|
|
29
|
+
*/
|
|
30
|
+
LogoLinkComponent?: ElementType;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Displays the application name alongside the AXA logo.
|
|
34
|
+
* The logo can optionally be wrapped in a native anchor or a custom link component.
|
|
35
|
+
*
|
|
36
|
+
* @component
|
|
37
|
+
* @param {AppNameProps} props - AppName props.
|
|
38
|
+
* @param {string} props.label - Application name displayed next to the logo.
|
|
39
|
+
* @param {string} [props.logoAlt="Logo AXA"] - Alt text for the AXA logo image.
|
|
40
|
+
* @param {Record<string, unknown>} [props.logoLinkProps] - Props forwarded to the wrapping anchor or `LogoLinkComponent`.
|
|
41
|
+
* @param {ElementType} [props.LogoLinkComponent="a"] - Element or component used to wrap the logo. Accepts `"a"` or any custom link component (e.g. React Router `Link`).
|
|
42
|
+
* @returns {JSX.Element} The rendered AppName component.
|
|
43
|
+
*/
|
|
44
|
+
export declare const AppName: ({ label, className, logoAlt, logoLinkProps, LogoLinkComponent, ...props }: AppNameProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import logoAxa from "@axa-fr/canopee-css/logo-axa.svg";
|
|
3
|
+
import { getClassName } from "../utilities/getClassName";
|
|
4
|
+
import "@axa-fr/canopee-css/prospect/AppName/AppNameAll.css";
|
|
5
|
+
/**
|
|
6
|
+
* Displays the application name alongside the AXA logo.
|
|
7
|
+
* The logo can optionally be wrapped in a native anchor or a custom link component.
|
|
8
|
+
*
|
|
9
|
+
* @component
|
|
10
|
+
* @param {AppNameProps} props - AppName props.
|
|
11
|
+
* @param {string} props.label - Application name displayed next to the logo.
|
|
12
|
+
* @param {string} [props.logoAlt="Logo AXA"] - Alt text for the AXA logo image.
|
|
13
|
+
* @param {Record<string, unknown>} [props.logoLinkProps] - Props forwarded to the wrapping anchor or `LogoLinkComponent`.
|
|
14
|
+
* @param {ElementType} [props.LogoLinkComponent="a"] - Element or component used to wrap the logo. Accepts `"a"` or any custom link component (e.g. React Router `Link`).
|
|
15
|
+
* @returns {JSX.Element} The rendered AppName component.
|
|
16
|
+
*/
|
|
17
|
+
export const AppName = ({ label, className, logoAlt = "Logo AXA", logoLinkProps, LogoLinkComponent = "a", ...props }) => {
|
|
18
|
+
const logo = (_jsx("img", { src: logoAxa, alt: logoAlt, className: "af-app-name__logo" }));
|
|
19
|
+
return (_jsxs("div", { className: getClassName({
|
|
20
|
+
baseClassName: "af-app-name",
|
|
21
|
+
className,
|
|
22
|
+
}), ...props, children: [LogoLinkComponent ? (_jsx(LogoLinkComponent, { className: "af-app-name__logo-link", ...logoLinkProps, children: logo })) : (logo), _jsx("span", { className: "af-app-name__label", children: label })] }));
|
|
23
|
+
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import "@axa-fr/canopee-css/prospect/Card/CardApollo.css";
|
|
2
|
-
export { type CardCommonProps as CardProps, CardCommon as Card, } from "./CardCommon";
|
|
2
|
+
export { cardVariants, type CardVariants, type CardCommonProps as CardProps, CardCommon as Card, } from "./CardCommon";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import "@axa-fr/canopee-css/prospect/Card/CardApollo.css";
|
|
2
|
-
export { CardCommon as Card, } from "./CardCommon";
|
|
2
|
+
export { cardVariants, CardCommon as Card, } from "./CardCommon";
|
|
@@ -1,4 +1,32 @@
|
|
|
1
1
|
import type { ComponentProps, ElementType } from "react";
|
|
2
2
|
import { type PolymorphicComponent } from "../utilities/types/PolymorphicComponent";
|
|
3
|
-
export
|
|
4
|
-
|
|
3
|
+
export declare const cardVariants: {
|
|
4
|
+
readonly unstyled: "unstyled";
|
|
5
|
+
};
|
|
6
|
+
export type CardVariants = keyof typeof cardVariants;
|
|
7
|
+
/**
|
|
8
|
+
* Props for the Card component.
|
|
9
|
+
*
|
|
10
|
+
* @template T - The element type rendered by the card (defaults to `"div"`).
|
|
11
|
+
*/
|
|
12
|
+
export type CardCommonProps<T extends ElementType> = PolymorphicComponent<T, ComponentProps<"div"> & {
|
|
13
|
+
/**
|
|
14
|
+
* Visual variant of the card.
|
|
15
|
+
* - `"unstyled"` — removes border and padding.
|
|
16
|
+
*/
|
|
17
|
+
variant?: CardVariants;
|
|
18
|
+
}>;
|
|
19
|
+
/**
|
|
20
|
+
* Polymorphic card wrapper that adds padding and a border.
|
|
21
|
+
* The underlying HTML element can be changed via the `as` prop.
|
|
22
|
+
*
|
|
23
|
+
* @component
|
|
24
|
+
* @template T - The element type rendered by the card.
|
|
25
|
+
* @param {CardCommonProps<T>} props - Card props.
|
|
26
|
+
* @param {ElementType} [props.as="div"] - HTML element or component to render as.
|
|
27
|
+
* @param {CardVariants} [props.variant] - Visual variant of the card.
|
|
28
|
+
* @param {string} [props.className] - Additional CSS class applied to the root element.
|
|
29
|
+
* @param {ReactNode} [props.children] - Content rendered inside the card.
|
|
30
|
+
* @returns {JSX.Element} The rendered Card component.
|
|
31
|
+
*/
|
|
32
|
+
export declare const CardCommon: <T extends ElementType = "div">({ as, children, className, variant, ...props }: CardCommonProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,10 +1,27 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import {} from "../utilities/types/PolymorphicComponent";
|
|
3
3
|
import { getClassName } from "../utilities/getClassName";
|
|
4
|
-
export const
|
|
4
|
+
export const cardVariants = {
|
|
5
|
+
unstyled: "unstyled",
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Polymorphic card wrapper that adds padding and a border.
|
|
9
|
+
* The underlying HTML element can be changed via the `as` prop.
|
|
10
|
+
*
|
|
11
|
+
* @component
|
|
12
|
+
* @template T - The element type rendered by the card.
|
|
13
|
+
* @param {CardCommonProps<T>} props - Card props.
|
|
14
|
+
* @param {ElementType} [props.as="div"] - HTML element or component to render as.
|
|
15
|
+
* @param {CardVariants} [props.variant] - Visual variant of the card.
|
|
16
|
+
* @param {string} [props.className] - Additional CSS class applied to the root element.
|
|
17
|
+
* @param {ReactNode} [props.children] - Content rendered inside the card.
|
|
18
|
+
* @returns {JSX.Element} The rendered Card component.
|
|
19
|
+
*/
|
|
20
|
+
export const CardCommon = ({ as, children, className, variant, ...props }) => {
|
|
5
21
|
const Component = as || "div";
|
|
6
22
|
return (_jsx(Component, { className: getClassName({
|
|
7
23
|
baseClassName: "af-card",
|
|
24
|
+
modifiers: [variant],
|
|
8
25
|
className,
|
|
9
26
|
}), ...props, children: children }));
|
|
10
27
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import "@axa-fr/canopee-css/client/Card/CardLF.css";
|
|
2
|
-
export { type CardCommonProps as CardProps, CardCommon as Card, } from "./CardCommon";
|
|
2
|
+
export { cardVariants, type CardVariants, type CardCommonProps as CardProps, CardCommon as Card, } from "./CardCommon";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import "@axa-fr/canopee-css/client/Card/CardLF.css";
|
|
2
|
-
export { CardCommon as Card, } from "./CardCommon";
|
|
2
|
+
export { cardVariants, CardCommon as Card, } from "./CardCommon";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useMemo } from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { getClassName } from "../utilities/getClassName";
|
|
4
4
|
export const cardMessageVariants = {
|
|
5
5
|
info: "info",
|
|
6
6
|
warning: "warning",
|
|
@@ -8,8 +8,10 @@ export const cardMessageVariants = {
|
|
|
8
8
|
neutral: "neutral",
|
|
9
9
|
};
|
|
10
10
|
export const CardMessage = ({ variant = "info", title, text, className, ...props }) => {
|
|
11
|
-
const componentClassName = useMemo(() => {
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
const componentClassName = useMemo(() => getClassName({
|
|
12
|
+
baseClassName: "af-card-message",
|
|
13
|
+
modifiers: [variant],
|
|
14
|
+
className,
|
|
15
|
+
}), [className, variant]);
|
|
14
16
|
return (_jsxs("div", { ...props, className: componentClassName, children: [title ? _jsx("span", { className: "af-card-message--title", children: title }) : null, _jsx("span", { className: "af-card-message--text", children: text })] }));
|
|
15
17
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type ComponentType, type ReactElement } from "react";
|
|
2
|
-
import type { ToggleProps } from "../Toggle/ToggleCommon";
|
|
3
|
-
import type { ContentItemProps } from "../ContentItemMono/ContentItemMonoCommon";
|
|
4
2
|
import type { ButtonProps } from "../Button/ButtonCommon";
|
|
3
|
+
import type { ContentItemProps } from "../ContentItemMono/ContentItemMonoCommon";
|
|
4
|
+
import type { ToggleProps } from "../Toggle/ToggleCommon";
|
|
5
5
|
export declare const ContentItemDuoActionState: {
|
|
6
6
|
readonly edit: "edit";
|
|
7
7
|
readonly toggle: "toggle";
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import {} from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { getClassName } from "../utilities/getClassName";
|
|
4
4
|
export const ContentItemDuoActionState = {
|
|
5
5
|
edit: "edit",
|
|
6
6
|
toggle: "toggle",
|
|
7
7
|
};
|
|
8
8
|
export const ContentItemDuoActionCommon = ({ className, state, ContentItemMonoComponent, contentItemProps, ToggleComponent, ...props }) => {
|
|
9
|
-
const componentClassName =
|
|
9
|
+
const componentClassName = getClassName({
|
|
10
|
+
baseClassName: "af-content-item-duo-action",
|
|
11
|
+
className,
|
|
12
|
+
});
|
|
10
13
|
return (_jsxs("div", { className: componentClassName, children: [_jsx(ContentItemMonoComponent, { ...contentItemProps }), _jsx("div", { className: "af-action-container", children: state === "edit" ? (props.buttons) : (_jsx(ToggleComponent, { ...props.toggleProps })) })] }));
|
|
11
14
|
};
|
|
@@ -14,10 +14,6 @@ export type ContentMonoItemIconProps = {
|
|
|
14
14
|
title?: string;
|
|
15
15
|
subtitle1?: string;
|
|
16
16
|
subtitle2?: string;
|
|
17
|
-
/**
|
|
18
|
-
* @deprecated Use `iconProps` instead.
|
|
19
|
-
*/
|
|
20
|
-
icon?: string;
|
|
21
17
|
iconProps?: IconProps;
|
|
22
18
|
};
|
|
23
19
|
export type ContentMonoItemStickProps = {
|
|
@@ -4,13 +4,12 @@ import { Icon } from "../Icon/IconCommon";
|
|
|
4
4
|
import { ContentItemMonoCore, } from "./ContentItemMonoCore";
|
|
5
5
|
export const getContentItemCoreProps = ({ IconComponent, type, ...props }) => {
|
|
6
6
|
if (type === "icon") {
|
|
7
|
-
const {
|
|
7
|
+
const { iconProps, title, subtitle1, subtitle2 } = props;
|
|
8
8
|
return {
|
|
9
9
|
title,
|
|
10
10
|
primarySubtitle: subtitle1,
|
|
11
11
|
subtitle: subtitle2,
|
|
12
|
-
leftComponent:
|
|
13
|
-
(icon && _jsx(IconComponent, { "data-testid": "icon", src: icon })),
|
|
12
|
+
leftComponent: iconProps && (_jsx(IconComponent, { "data-testid": "icon", ...iconProps })),
|
|
14
13
|
};
|
|
15
14
|
}
|
|
16
15
|
if (type === "picture") {
|
|
@@ -2,10 +2,10 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
2
2
|
import { Fragment, useMemo, } from "react";
|
|
3
3
|
import { Divider } from "../Divider/DividerCommon";
|
|
4
4
|
import { BREAKPOINT } from "../utilities/constants";
|
|
5
|
-
import {
|
|
5
|
+
import { getClassName } from "../utilities/getClassName";
|
|
6
6
|
import { useIsSmallScreen } from "../utilities/hook/useIsSmallScreen";
|
|
7
7
|
export const DataAgentCommon = ({ className, agentProps, agentContractProps, contents, clickContents, texteOrias, DividerComponent, ContentItemMonoComponent, ClickItemComponent, isCompact = true, variant = "default", }) => {
|
|
8
|
-
const componentClassName = useMemo(() =>
|
|
8
|
+
const componentClassName = useMemo(() => getClassName({ baseClassName: "af-data-agent", className }), [className]);
|
|
9
9
|
const isMobile = useIsSmallScreen(BREAKPOINT.SM);
|
|
10
10
|
const renderForDefaultLayout = () => (_jsxs(_Fragment, { children: [_jsxs("section", { className: "af-data-agent__intro", children: [_jsx(ContentItemMonoComponent, { ...agentProps, type: "picture" }), agentContractProps ? (_jsx(ContentItemMonoComponent, { ...agentContractProps, type: "stick" })) : null] }), _jsx(DividerComponent, {}), contents && contents?.length > 0 ? (_jsx("section", { className: "af-data-agent__info-content", children: contents.map((content) => (_jsxs(Fragment, { children: [_jsx(ContentItemMonoComponent, { ...content, type: "icon" }), _jsx(DividerComponent, { className: "af-data-agent__line" })] }, `content--${crypto.randomUUID()}`))) })) : null, clickContents && clickContents?.length > 0 ? (_jsx("section", { className: "af-data-agent__info-click-content", children: clickContents.map((clickContent) => (_jsxs(Fragment, { children: [_jsx(ClickItemComponent, { ...clickContent, variant: "small" }), _jsx(DividerComponent, { className: "af-data-agent__line" })] }, `clickContent--${crypto.randomUUID()}`))) })) : null, Boolean(texteOrias) && (_jsx("p", { className: "af-data-agent__text-orias", children: texteOrias }))] }));
|
|
11
11
|
const renderForMobileLayout = () => (_jsx("section", { className: "af-data-agent__intro", children: _jsx(ClickItemComponent, { ...agentProps, basePictureProps: {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
type DividerProps = {
|
|
2
2
|
className?: string;
|
|
3
|
-
classModifier?: string;
|
|
4
3
|
};
|
|
5
|
-
export declare const Divider: ({ className
|
|
4
|
+
export declare const Divider: ({ className }: DividerProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
5
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useMemo } from "react";
|
|
3
|
-
import {
|
|
4
|
-
export const Divider = ({ className
|
|
5
|
-
const componentClassName = useMemo(() =>
|
|
3
|
+
import { getClassName } from "../utilities/getClassName";
|
|
4
|
+
export const Divider = ({ className }) => {
|
|
5
|
+
const componentClassName = useMemo(() => getClassName({ baseClassName: "af-divider", className }), [className]);
|
|
6
6
|
return _jsx("hr", { className: componentClassName });
|
|
7
7
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type CardCheckboxProps } from "./CardCheckboxCommon";
|
|
2
2
|
import "@axa-fr/canopee-css/prospect/Form/Checkbox/CardCheckbox/CardCheckboxApollo.css";
|
|
3
|
+
export type { CardCheckboxProps };
|
|
3
4
|
export declare const CardCheckbox: {
|
|
4
5
|
(props: CardCheckboxProps): import("react/jsx-runtime").JSX.Element;
|
|
5
6
|
displayName: string;
|