@axa-fr/canopee-react 2.0.0-alpha.8 → 2.0.0-alpha.80
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 +17 -17
- package/dist/client.js +17 -17
- 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 +1 -3
- package/dist/distributeur/Action/Action.js +2 -3
- package/dist/distributeur/Button/Button.d.ts +3 -4
- package/dist/distributeur/Button/Button.js +7 -1
- 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 +1 -1
- package/dist/distributeur/Form/Checkbox/Checkbox.js +9 -4
- package/dist/distributeur/Form/Checkbox/CheckboxInput.js +2 -2
- package/dist/distributeur/Form/Checkbox/CheckboxItem.d.ts +1 -3
- package/dist/distributeur/Form/Checkbox/CheckboxItem.js +2 -2
- package/dist/distributeur/Form/Choice/Choice.d.ts +0 -2
- package/dist/distributeur/Form/Choice/ChoiceInput.js +1 -1
- package/dist/distributeur/Form/Date/Date.d.ts +2 -3
- package/dist/distributeur/Form/Date/Date.js +3 -3
- package/dist/distributeur/Form/Date/DateInput.js +1 -1
- package/dist/distributeur/Form/Experimental/DateInput.d.ts +31 -0
- package/dist/distributeur/Form/Experimental/DateInput.js +27 -0
- 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/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 +4 -7
- package/dist/distributeur/Form/Number/Number.js +4 -5
- package/dist/distributeur/Form/Number/NumberInput.js +1 -1
- package/dist/distributeur/Form/Radio/Radio.d.ts +1 -1
- package/dist/distributeur/Form/Radio/RadioInput.js +1 -1
- package/dist/distributeur/Form/Radio/RadioItem.d.ts +1 -3
- package/dist/distributeur/Form/Radio/RadioItem.js +2 -2
- package/dist/distributeur/Form/Select/Select.d.ts +3 -19
- package/dist/distributeur/Form/Select/Select.js +3 -4
- package/dist/distributeur/Form/Select/SelectBase.d.ts +3 -24
- package/dist/distributeur/Form/Select/SelectBase.js +2 -7
- package/dist/distributeur/Form/Select/SelectDefault.d.ts +3 -3
- package/dist/distributeur/Form/Select/SelectInput.js +1 -1
- 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 +2 -3
- package/dist/distributeur/Form/Text/Text.js +3 -3
- package/dist/distributeur/Form/Text/TextInput.js +1 -1
- package/dist/distributeur/Form/Textarea/Textarea.d.ts +2 -3
- package/dist/distributeur/Form/Textarea/Textarea.js +3 -3
- package/dist/distributeur/Form/Textarea/TextareaInput.js +1 -1
- 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/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 +1 -2
- 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 +6 -3
- 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/LinkAnchor.d.ts +4 -6
- package/dist/distributeur/Link/LinkAnchor.js +2 -2
- package/dist/distributeur/Messages/Message.d.ts +2 -6
- package/dist/distributeur/Messages/Message.js +3 -14
- package/dist/distributeur/ModalAgent/BooleanModal.d.ts +1 -6
- package/dist/distributeur/ModalAgent/BooleanModal.js +7 -4
- package/dist/distributeur/ModalAgent/Modal.d.ts +2 -7
- package/dist/distributeur/ModalAgent/Modal.js +7 -16
- 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/Summary/index.d.ts +1 -1
- package/dist/distributeur/Summary/index.js +1 -2
- 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 +1 -6
- package/dist/distributeur/Tag/Tag.js +2 -2
- package/dist/distributeur/Title/Title.d.ts +1 -3
- package/dist/distributeur/Title/Title.js +3 -3
- 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 +10 -24
- package/dist/distributeur.js +9 -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.js +6 -2
- 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/Checkbox/CheckboxCommon.d.ts +2 -6
- package/dist/prospect-client/Form/Checkbox/Checkbox/CheckboxCommon.js +6 -2
- package/dist/prospect-client/Form/Checkbox/CheckboxText/CheckboxTextApollo.js +1 -1
- package/dist/prospect-client/Form/Checkbox/CheckboxText/CheckboxTextCommon.d.ts +2 -6
- package/dist/prospect-client/Form/Checkbox/CheckboxText/CheckboxTextCommon.js +3 -3
- package/dist/prospect-client/Form/Checkbox/CheckboxText/CheckboxTextLF.js +1 -1
- package/dist/prospect-client/Form/Dropdown/DropdownApollo.js +1 -1
- package/dist/prospect-client/Form/Dropdown/DropdownCommon.d.ts +4 -12
- package/dist/prospect-client/Form/Dropdown/DropdownCommon.js +4 -4
- package/dist/prospect-client/Form/Dropdown/DropdownLF.js +1 -1
- package/dist/prospect-client/Form/FileUpload/InputFile/InputFileApollo.js +1 -1
- package/dist/prospect-client/Form/FileUpload/InputFile/InputFileCommon.d.ts +1 -1
- package/dist/prospect-client/Form/FileUpload/InputFile/InputFileCommon.js +1 -1
- package/dist/prospect-client/Form/FileUpload/InputFile/InputFileLF.js +1 -1
- 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.js +1 -1
- package/dist/prospect-client/Form/InputDate/InputDateCommon.d.ts +4 -12
- package/dist/prospect-client/Form/InputDate/InputDateCommon.js +5 -6
- package/dist/prospect-client/Form/InputDate/InputDateLF.js +1 -1
- package/dist/prospect-client/Form/InputPhone/InputPhoneApollo.js +1 -1
- package/dist/prospect-client/Form/InputPhone/InputPhoneCommon.d.ts +4 -12
- package/dist/prospect-client/Form/InputPhone/InputPhoneCommon.js +10 -6
- package/dist/prospect-client/Form/InputPhone/InputPhoneLF.js +1 -1
- package/dist/prospect-client/Form/InputText/InputTextApollo.js +1 -1
- package/dist/prospect-client/Form/InputText/InputTextCommon.d.ts +4 -12
- package/dist/prospect-client/Form/InputText/InputTextCommon.js +7 -6
- package/dist/prospect-client/Form/InputText/InputTextLF.js +1 -1
- 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/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/CardRadioCommon.d.ts +1 -5
- package/dist/prospect-client/Form/Radio/CardRadio/CardRadioCommon.js +4 -4
- package/dist/prospect-client/Form/Radio/CardRadioGroup/CardRadioGroupApollo.js +1 -1
- package/dist/prospect-client/Form/Radio/CardRadioGroup/CardRadioGroupCommon.d.ts +6 -30
- package/dist/prospect-client/Form/Radio/CardRadioGroup/CardRadioGroupCommon.js +5 -7
- package/dist/prospect-client/Form/Radio/CardRadioGroup/CardRadioGroupLF.js +1 -1
- package/dist/prospect-client/Form/Radio/Radio/RadioCommon.d.ts +2 -5
- package/dist/prospect-client/Form/Radio/Radio/RadioCommon.js +6 -4
- package/dist/prospect-client/Form/TextArea/TextAreaApollo.js +1 -1
- package/dist/prospect-client/Form/TextArea/TextAreaCommon.d.ts +4 -8
- package/dist/prospect-client/Form/TextArea/TextAreaCommon.js +4 -4
- package/dist/prospect-client/Form/TextArea/TextAreaLF.js +1 -1
- 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/ItemTabBar/ItemTabBarCommon.js +5 -2
- 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/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 +1 -1
- package/dist/prospect-client/Modal/ModalApollo.js +1 -3
- package/dist/prospect-client/Modal/ModalCommon.d.ts +1 -1
- package/dist/prospect-client/Modal/ModalCommon.js +1 -1
- package/dist/prospect-client/Modal/ModalLF.d.ts +1 -1
- package/dist/prospect-client/Modal/ModalLF.js +1 -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/TabMenu/TabMenu.js +1 -1
- package/dist/prospect-client/Tag/TagCommon.js +6 -2
- package/dist/prospect-client/Toggle/ToggleCommon.js +2 -2
- package/dist/prospect.d.ts +11 -7
- package/dist/prospect.js +11 -7
- package/package.json +2 -2
- package/dist/distributeur/Form/Pass/Pass.d.ts +0 -15
- 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 -26
- package/dist/distributeur/Form/Select/SelectDefaultWithOptions.js +0 -32
- 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/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
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
import { getClassName } from "../../utilities/helpers/getClassName";
|
|
2
|
-
export function getOptionClassName(className,
|
|
2
|
+
export function getOptionClassName(className, defaultClassName, disabled, variant) {
|
|
3
3
|
return getClassName({
|
|
4
4
|
baseClassName: className || defaultClassName,
|
|
5
|
-
modifiers: [
|
|
6
|
-
variant,
|
|
7
|
-
...(classModifier?.split(" ") ?? []),
|
|
8
|
-
disabled && "disabled",
|
|
9
|
-
],
|
|
5
|
+
modifiers: [variant, disabled && "disabled"],
|
|
10
6
|
className,
|
|
11
7
|
});
|
|
12
8
|
}
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import type { ReactNode } from "react";
|
|
2
|
-
export { LegacyField } from "./Deprecated/Field";
|
|
3
|
-
export { FieldForm } from "./Deprecated/FieldForm";
|
|
4
|
-
export { FieldInput } from "./Deprecated/FieldInput";
|
|
5
2
|
export { Field } from "./Field";
|
|
6
3
|
export type { ConsumerFieldProps } from "./Field";
|
|
7
4
|
export { FieldError } from "./FieldError";
|
|
@@ -11,16 +8,11 @@ export { InputList } from "./InputList";
|
|
|
11
8
|
export { MessageTypes } from "./MessageTypes";
|
|
12
9
|
export { getFirstId } from "./getFirstId";
|
|
13
10
|
export { getOptionClassName } from "./getOptionClassName";
|
|
14
|
-
export { useInputClassModifier } from "./useInputClassModifier";
|
|
15
11
|
export { useOptionsWithId } from "./useOptionsWithId";
|
|
16
12
|
export type Option = {
|
|
17
13
|
id?: string;
|
|
18
14
|
icon?: ReactNode;
|
|
19
15
|
label: ReactNode;
|
|
20
|
-
/**
|
|
21
|
-
* @deprecated Ne semble pas utilisé
|
|
22
|
-
*/
|
|
23
|
-
description?: ReactNode;
|
|
24
16
|
value: string;
|
|
25
17
|
} & React.InputHTMLAttributes<HTMLInputElement>;
|
|
26
18
|
type BaseFormEvent = {
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
export { LegacyField } from "./Deprecated/Field";
|
|
2
|
-
export { FieldForm } from "./Deprecated/FieldForm";
|
|
3
|
-
export { FieldInput } from "./Deprecated/FieldInput";
|
|
4
1
|
export { Field } from "./Field";
|
|
5
2
|
export { FieldError } from "./FieldError";
|
|
6
3
|
export { FormClassManager } from "./FormClassManager";
|
|
@@ -9,5 +6,4 @@ export { InputList } from "./InputList";
|
|
|
9
6
|
export { MessageTypes } from "./MessageTypes";
|
|
10
7
|
export { getFirstId } from "./getFirstId";
|
|
11
8
|
export { getOptionClassName } from "./getOptionClassName";
|
|
12
|
-
export { useInputClassModifier } from "./useInputClassModifier";
|
|
13
9
|
export { useOptionsWithId } from "./useOptionsWithId";
|
|
@@ -5,5 +5,5 @@ type HelpProps = Omit<ComponentPropsWithoutRef<typeof Popover>, "popoverElement"
|
|
|
5
5
|
helpButtonContent?: ReactNode;
|
|
6
6
|
variant?: "default" | "inverse";
|
|
7
7
|
};
|
|
8
|
-
export declare const HelpButton: ({ className,
|
|
8
|
+
export declare const HelpButton: ({ className, children, mode, placement, variant, helpButtonContent, }: HelpProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
export {};
|
|
@@ -5,13 +5,11 @@ import info from "@material-symbols/svg-400/rounded/info_i-fill.svg";
|
|
|
5
5
|
import { Popover } from "../Popover";
|
|
6
6
|
import { getClassName } from "../utilities/helpers/getClassName";
|
|
7
7
|
import { Svg } from "../Svg";
|
|
8
|
-
export const HelpButton = ({ className,
|
|
8
|
+
export const HelpButton = ({ className, children, mode = "click", placement = "right", variant = "default", helpButtonContent = _jsx(Svg, { src: info, alt: "Help" }), }) => {
|
|
9
9
|
const buttonClassName = classNames("btn", getClassName({
|
|
10
10
|
baseClassName: "af-btn--circle",
|
|
11
|
-
modifiers: [
|
|
12
|
-
|
|
13
|
-
...(variant === "inverse" ? ["inverse"] : []),
|
|
14
|
-
],
|
|
11
|
+
modifiers: [variant === "inverse" && "inverse"],
|
|
12
|
+
className,
|
|
15
13
|
}));
|
|
16
|
-
return (_jsx(Popover, { className: classNames("af-help-button", className),
|
|
14
|
+
return (_jsx(Popover, { className: classNames("af-help-button", className), placement: placement, mode: mode, popoverElement: children, children: _jsx("div", { className: buttonClassName, children: helpButtonContent }) }));
|
|
17
15
|
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import "@axa-fr/canopee-css/distributeur/ItemFormHelper/ItemFormHelper.css";
|
|
2
|
+
export type ItemFormHelperVariant = "todo" | "inprogress" | "validated";
|
|
3
|
+
export type ItemFormHelperProps = {
|
|
4
|
+
variant: ItemFormHelperVariant;
|
|
5
|
+
label?: string;
|
|
6
|
+
className?: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const ItemFormHelper: ({ variant, label, className, }: ItemFormHelperProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import "@axa-fr/canopee-css/distributeur/ItemFormHelper/ItemFormHelper.css";
|
|
3
|
+
import checkSvg from "@material-symbols/svg-400/outlined/check.svg";
|
|
4
|
+
import toDoSvg from "@material-symbols/svg-400/outlined/circle.svg";
|
|
5
|
+
import wipSvg from "@material-symbols/svg-400/outlined/circle-fill.svg";
|
|
6
|
+
import { Svg } from "../Svg";
|
|
7
|
+
import { getClassName } from "../utilities/helpers/getClassName";
|
|
8
|
+
const variants = {
|
|
9
|
+
todo: {
|
|
10
|
+
icon: toDoSvg,
|
|
11
|
+
defaultLabel: "à compléter",
|
|
12
|
+
},
|
|
13
|
+
inprogress: {
|
|
14
|
+
icon: wipSvg,
|
|
15
|
+
defaultLabel: "en cours",
|
|
16
|
+
},
|
|
17
|
+
validated: {
|
|
18
|
+
icon: checkSvg,
|
|
19
|
+
defaultLabel: "validé",
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
export const ItemFormHelper = ({ variant, label, className, }) => {
|
|
23
|
+
const { icon, defaultLabel } = variants[variant];
|
|
24
|
+
const displayLabel = label ?? defaultLabel;
|
|
25
|
+
const componentClassName = getClassName({
|
|
26
|
+
baseClassName: "af-item-form-helper",
|
|
27
|
+
modifiers: [variant],
|
|
28
|
+
className,
|
|
29
|
+
});
|
|
30
|
+
return (_jsxs("div", { className: componentClassName, children: [_jsx(Svg, { src: icon, width: 12, height: 12 }), _jsx("span", { children: displayLabel })] }));
|
|
31
|
+
};
|
|
@@ -2,9 +2,7 @@ import "@axa-fr/canopee-css/distributeur/Layout/Header/Header.css";
|
|
|
2
2
|
import { type ReactNode } from "react";
|
|
3
3
|
type Props = {
|
|
4
4
|
children: ReactNode;
|
|
5
|
-
/** @deprecated Use `className` instead. */
|
|
6
|
-
classModifier?: string;
|
|
7
5
|
className?: string;
|
|
8
6
|
};
|
|
9
|
-
declare const Header: ({
|
|
7
|
+
declare const Header: ({ className, children }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
10
8
|
export { Header };
|
|
@@ -4,10 +4,9 @@ import classNames from "classnames";
|
|
|
4
4
|
import {} from "react";
|
|
5
5
|
import { getClassName } from "../../utilities/helpers/getClassName";
|
|
6
6
|
const defaultClassName = "af-header";
|
|
7
|
-
const Header = ({
|
|
7
|
+
const Header = ({ className, children }) => {
|
|
8
8
|
const componentClassName = getClassName({
|
|
9
9
|
baseClassName: defaultClassName,
|
|
10
|
-
modifiers: classModifier?.split(" "),
|
|
11
10
|
className,
|
|
12
11
|
});
|
|
13
12
|
return (_jsx("div", { className: classNames("af-container", componentClassName), children: _jsx("header", { className: `${defaultClassName}__content`, role: "banner", children: children }) }));
|
|
@@ -3,7 +3,6 @@ import type { ReactNode } from "react";
|
|
|
3
3
|
import { type AnchorNavBarItem } from "../AnchorNavBar/AnchorNavBar";
|
|
4
4
|
type Props = {
|
|
5
5
|
children?: ReactNode;
|
|
6
|
-
classModifier?: string;
|
|
7
6
|
className?: string;
|
|
8
7
|
isSticky?: boolean;
|
|
9
8
|
contentLeft?: ReactNode;
|
|
@@ -13,5 +12,5 @@ type Props = {
|
|
|
13
12
|
toggleMenu?: () => void;
|
|
14
13
|
anchorNavBarItems?: AnchorNavBarItem[];
|
|
15
14
|
};
|
|
16
|
-
declare const HeaderTitle: ({ children,
|
|
15
|
+
declare const HeaderTitle: ({ children, className, isSticky, contentLeft, contentRight, subtitle, title, toggleMenu, anchorNavBarItems, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
17
16
|
export { HeaderTitle };
|
|
@@ -2,13 +2,16 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
2
2
|
import "@axa-fr/canopee-css/distributeur/Layout/Header/HeaderTitle/HeaderTitle.css";
|
|
3
3
|
import classNames from "classnames";
|
|
4
4
|
import { Action } from "../../../Action/Action";
|
|
5
|
-
import {
|
|
5
|
+
import { getClassName } from "../../../utilities";
|
|
6
6
|
import { AnchorNavBar, } from "../AnchorNavBar/AnchorNavBar";
|
|
7
7
|
import { ToggleButton } from "../ToggleButton/ToggleButton";
|
|
8
|
-
import { getClassModifier } from "./HeaderTitle.helpers";
|
|
9
8
|
const defaultClassName = "af-title-bar";
|
|
10
|
-
const HeaderTitle = ({ children,
|
|
11
|
-
const componentClassName =
|
|
9
|
+
const HeaderTitle = ({ children, className, isSticky = true, contentLeft, contentRight, subtitle, title, toggleMenu, anchorNavBarItems, }) => {
|
|
10
|
+
const componentClassName = getClassName({
|
|
11
|
+
baseClassName: defaultClassName,
|
|
12
|
+
modifiers: [isSticky && "sticky"],
|
|
13
|
+
className,
|
|
14
|
+
});
|
|
12
15
|
const isAnchorNavBarPresent = anchorNavBarItems && anchorNavBarItems.length > 0;
|
|
13
16
|
return (_jsxs(_Fragment, { children: [_jsxs("div", { className: classNames("af-container", componentClassName), children: [Boolean(toggleMenu) && (_jsx("div", { className: "burger-container", children: _jsx(ToggleButton, { idControl: "mainmenu", children: _jsx(Action, { className: "btn af-title-bar__mobile-menu af-btn--circle", id: "togglemenu", icon: "menu-hamburger", title: "Toggle menu", onClick: toggleMenu }) }) })), _jsxs("div", { className: `${defaultClassName}__leftSection`, children: [contentLeft, _jsxs("h1", { className: `${defaultClassName}__title`, children: [title, subtitle ? (_jsx("span", { className: `${defaultClassName}__subtitle`, children: subtitle })) : null] }), children] }), contentRight ? (_jsx("div", { className: `${defaultClassName}__rightSection`, children: contentRight })) : null] }), isAnchorNavBarPresent ? (_jsx(AnchorNavBar, { items: anchorNavBarItems })) : null] }));
|
|
14
17
|
};
|
|
@@ -6,10 +6,8 @@ export type TInfo = {
|
|
|
6
6
|
word: ReactNode;
|
|
7
7
|
};
|
|
8
8
|
type InfosProps = {
|
|
9
|
-
/** @deprecated Use `className` instead. */
|
|
10
|
-
classModifier?: string;
|
|
11
9
|
className?: string;
|
|
12
10
|
infos: TInfo[];
|
|
13
11
|
};
|
|
14
|
-
declare const Infos: ({ infos, className
|
|
12
|
+
declare const Infos: ({ infos, className }: InfosProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
13
|
export { Infos };
|
|
@@ -6,10 +6,9 @@ import { getClassName } from "../../../utilities/helpers/getClassName";
|
|
|
6
6
|
import "@axa-fr/canopee-css/distributeur/Layout/Header/Infos/Infos.css";
|
|
7
7
|
import { Svg } from "../../../Svg";
|
|
8
8
|
const defaultClassName = "af-contrat";
|
|
9
|
-
const Infos = ({ infos, className
|
|
9
|
+
const Infos = ({ infos, className }) => {
|
|
10
10
|
const componentClassName = getClassName({
|
|
11
11
|
baseClassName: defaultClassName,
|
|
12
|
-
modifiers: classModifier?.split(" "),
|
|
13
12
|
className,
|
|
14
13
|
});
|
|
15
14
|
return (_jsxs("div", { className: componentClassName, children: [_jsx(Svg, { className: "af-contrat__icon", src: infoIcon, "aria-hidden": "true" }), _jsx("dl", { className: `${defaultClassName}__list`, children: infos.map((info) => {
|
|
@@ -3,8 +3,6 @@ import "@axa-fr/canopee-css/distributeur/Layout/Header/Name/Name.css";
|
|
|
3
3
|
import { type MouseEvent } from "react";
|
|
4
4
|
type Props = {
|
|
5
5
|
alt?: string;
|
|
6
|
-
/** @deprecated Use `className` instead. */
|
|
7
|
-
classModifier?: string;
|
|
8
6
|
className?: string;
|
|
9
7
|
img?: string;
|
|
10
8
|
onClick?: (action: {
|
|
@@ -13,5 +11,5 @@ type Props = {
|
|
|
13
11
|
subtitle?: string;
|
|
14
12
|
title: string;
|
|
15
13
|
};
|
|
16
|
-
declare const Name: ({ alt,
|
|
14
|
+
declare const Name: ({ alt, className, img, onClick, subtitle, title, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
17
15
|
export { Name };
|
|
@@ -4,10 +4,9 @@ import "@axa-fr/canopee-css/distributeur/Layout/Header/Name/Name.css";
|
|
|
4
4
|
import {} from "react";
|
|
5
5
|
import { getClassName } from "../../../utilities/helpers/getClassName";
|
|
6
6
|
const defaultClassName = "af-header__name";
|
|
7
|
-
const Name = ({ alt = "logo",
|
|
7
|
+
const Name = ({ alt = "logo", className, img, onClick, subtitle, title, }) => {
|
|
8
8
|
const componentClassName = getClassName({
|
|
9
9
|
baseClassName: defaultClassName,
|
|
10
|
-
modifiers: classModifier?.split(" "),
|
|
11
10
|
className,
|
|
12
11
|
});
|
|
13
12
|
return (_jsxs("div", { className: componentClassName, children: [_jsx("a", { className: "af-logo", href: "/", onClick: (event) => onClick && onClick({ event }), children: _jsx("img", { className: "af-logo__brand", src: img, alt: alt }) }), _jsxs("p", { className: "af-header__title", children: [title, _jsx("span", { className: "af-header__subtitle", children: subtitle })] })] }));
|
|
@@ -19,12 +19,7 @@ const NavBar = ({ positionInit = 0, children, ...otherProps }) => {
|
|
|
19
19
|
const isCurrent = index === position;
|
|
20
20
|
return React.cloneElement(child, {
|
|
21
21
|
key: `NavBarItem`,
|
|
22
|
-
|
|
23
|
-
child.props.classModifier,
|
|
24
|
-
isCurrent ? "active" : undefined,
|
|
25
|
-
]
|
|
26
|
-
.filter((c) => Boolean(c))
|
|
27
|
-
.join(" "),
|
|
22
|
+
active: isCurrent,
|
|
28
23
|
tabIndex: isCurrent ? 0 : -1,
|
|
29
24
|
index,
|
|
30
25
|
hasFocus: isMenuFocused && isCurrent,
|
|
@@ -6,8 +6,6 @@ type Props = {
|
|
|
6
6
|
isMenuFocused?: boolean;
|
|
7
7
|
onClick: (event: MouseEvent<HTMLButtonElement>) => void;
|
|
8
8
|
className?: string;
|
|
9
|
-
/** @deprecated Use `className` instead. */
|
|
10
|
-
classModifier?: string;
|
|
11
9
|
handleKeys: (key: string) => void;
|
|
12
10
|
onFocus: (action: {
|
|
13
11
|
e: FocusEvent<HTMLUListElement>;
|
|
@@ -17,5 +15,5 @@ type Props = {
|
|
|
17
15
|
}) => void;
|
|
18
16
|
children?: ReactNode;
|
|
19
17
|
};
|
|
20
|
-
declare const NavBarBase: ({
|
|
18
|
+
declare const NavBarBase: ({ onClick, id, toggleMenuId, isMenuFocused, className, handleKeys, onFocus, onBlur, children, isVisible, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
21
19
|
export { NavBarBase };
|
|
@@ -2,13 +2,17 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import classNames from "classnames";
|
|
3
3
|
import { getClassName } from "../../../utilities/helpers/getClassName";
|
|
4
4
|
const defaultClassName = "af-nav-container";
|
|
5
|
-
const NavBarBase = ({
|
|
5
|
+
const NavBarBase = ({ onClick, id = "mainmenu", toggleMenuId = "togglemenu", isMenuFocused, className, handleKeys, onFocus, onBlur, children, isVisible, }) => {
|
|
6
6
|
const componentClassName = getClassName({
|
|
7
7
|
baseClassName: defaultClassName,
|
|
8
|
-
modifiers: classModifier?.split(" "),
|
|
9
8
|
className,
|
|
10
9
|
});
|
|
11
|
-
|
|
10
|
+
const navClassName = getClassName({
|
|
11
|
+
baseClassName: "af-nav",
|
|
12
|
+
modifiers: [isVisible && "open"],
|
|
13
|
+
className: "af-drawer left",
|
|
14
|
+
});
|
|
15
|
+
return (_jsxs("div", { className: classNames("af-container", componentClassName), children: [isVisible ? (_jsx("button", { "aria-controls": id, "aria-haspopup": "true", type: "button", onClick: onClick, className: "mask fade", id: `open-${toggleMenuId}`, "aria-label": "Close Menu" })) : null, _jsxs("nav", { className: navClassName, role: "navigation", "aria-label": "Menu principal", children: [_jsxs("div", { className: "af-nav__aside-header", children: [_jsx("h4", { className: "af-nav__aside-title", children: "Menu" }), _jsx("button", { "aria-controls": id, "aria-haspopup": "true", onClick: onClick, type: "button", className: "af-nav__aside-close", id: `close-${toggleMenuId}`, "aria-label": "Close Menu", children: "\u00D7" })] }), _jsx("ul", { onKeyDown: (e) => {
|
|
12
16
|
e.preventDefault();
|
|
13
17
|
handleKeys(e.key);
|
|
14
18
|
}, onFocus: (e) => {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { type ComponentProps, type ReactElement } from "react";
|
|
2
2
|
import { NavBarItemBase } from "./NavBarItemBase";
|
|
3
3
|
type ChildrenProps = {
|
|
4
|
-
classModifier?: string;
|
|
5
4
|
tabIndex?: number;
|
|
6
5
|
hasFocus?: boolean;
|
|
7
6
|
[key: string]: unknown;
|
|
@@ -9,6 +8,7 @@ type ChildrenProps = {
|
|
|
9
8
|
type Props = Omit<ComponentProps<typeof NavBarItemBase>, "handleKeys" | "isMenuOpen" | "position"> & {
|
|
10
9
|
ariaLabel?: string;
|
|
11
10
|
children?: ReactElement<ChildrenProps> | ReactElement<ChildrenProps>[];
|
|
11
|
+
active?: boolean;
|
|
12
12
|
};
|
|
13
|
-
declare const NavBarItem: ({ children, hasFocus, actionElt, ariaLabel, tabIndex, role, className, ...otherProps }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare const NavBarItem: ({ children, hasFocus, actionElt, ariaLabel, tabIndex, role, className, active, ...otherProps }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
14
14
|
export { NavBarItem };
|
|
@@ -2,8 +2,9 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
|
|
|
2
2
|
import React, { useCallback, useState, } from "react";
|
|
3
3
|
import { getPosition } from "../NavBar.helpers";
|
|
4
4
|
import { NavBarItemBase } from "./NavBarItemBase";
|
|
5
|
+
import { getClassName } from "../../../../utilities";
|
|
5
6
|
const defaultClassName = "af-nav__item";
|
|
6
|
-
const NavBarItem = ({ children, hasFocus = false, actionElt, ariaLabel = "", tabIndex = -1, role = "menuitem", className =
|
|
7
|
+
const NavBarItem = ({ children, hasFocus = false, actionElt, ariaLabel = "", tabIndex = -1, role = "menuitem", className, active = false, ...otherProps }) => {
|
|
7
8
|
const [isMenuOpen, setIsMenuOpen] = useState(false);
|
|
8
9
|
const [position, setPosition] = useState(0);
|
|
9
10
|
const moveBykey = useCallback((key) => {
|
|
@@ -44,11 +45,17 @@ const NavBarItem = ({ children, hasFocus = false, actionElt, ariaLabel = "", tab
|
|
|
44
45
|
}
|
|
45
46
|
}, [children, isMenuOpen, position, moveBykey, openMenu, closeMenu]);
|
|
46
47
|
const renderChild = useCallback((child, childIndex) => React.cloneElement(child, {
|
|
47
|
-
|
|
48
|
+
className: child.props.className,
|
|
49
|
+
"aria-current": childIndex === position && isMenuOpen ? "page" : undefined,
|
|
48
50
|
tabIndex: childIndex === position && isMenuOpen ? 0 : -1,
|
|
49
51
|
key: `child${childIndex}`,
|
|
50
52
|
hasFocus: hasFocus && position === childIndex && isMenuOpen,
|
|
51
53
|
}), [position, isMenuOpen, hasFocus]);
|
|
52
|
-
|
|
54
|
+
const componentClassName = getClassName({
|
|
55
|
+
baseClassName: defaultClassName,
|
|
56
|
+
modifiers: [active ? "active" : ""],
|
|
57
|
+
className,
|
|
58
|
+
});
|
|
59
|
+
return (_jsx(NavBarItemBase, { className: componentClassName, role: role, hasFocus: hasFocus, tabIndex: tabIndex, isMenuOpen: isMenuOpen, handleKeys: handleKeys, actionElt: actionElt, ...otherProps, children: children ? (_jsxs(_Fragment, { children: [_jsx("i", { className: "glyphicon glyphicon-arrow-xs-down" }, `icon${tabIndex}`), _jsx("ul", { className: "af-nav__list af-nav__list--children", role: "menu", "aria-label": ariaLabel, children: React.Children.map(children, renderChild) }, `list${tabIndex}`)] })) : null }));
|
|
53
60
|
};
|
|
54
61
|
export { NavBarItem };
|
|
@@ -4,7 +4,6 @@ type Props = HTMLAttributes<HTMLLIElement> & {
|
|
|
4
4
|
handleKeys: (event: KeyboardEvent<HTMLLIElement>) => void;
|
|
5
5
|
hasFocus?: boolean;
|
|
6
6
|
isMenuOpen?: boolean;
|
|
7
|
-
classModifier?: string;
|
|
8
7
|
};
|
|
9
|
-
export declare const NavBarItemBase: ({ tabIndex, role, children, hasFocus, handleKeys, isMenuOpen, className,
|
|
8
|
+
export declare const NavBarItemBase: ({ tabIndex, role, children, hasFocus, handleKeys, isMenuOpen, className, actionElt, ...otherProps }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
10
9
|
export {};
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect, useMemo, useRef, } from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { getClassName } from "../../../../utilities";
|
|
4
4
|
import { handleLinkFocus } from "./NavBarItemBase.helpers";
|
|
5
|
-
export const NavBarItemBase = ({ tabIndex = -1, role = "menuitem", children, hasFocus, handleKeys, isMenuOpen, className,
|
|
6
|
-
const componentClassName =
|
|
5
|
+
export const NavBarItemBase = ({ tabIndex = -1, role = "menuitem", children, hasFocus, handleKeys, isMenuOpen, className, actionElt, ...otherProps }) => {
|
|
6
|
+
const componentClassName = getClassName({
|
|
7
|
+
baseClassName: "af-nav__item",
|
|
8
|
+
className,
|
|
9
|
+
});
|
|
7
10
|
const ref = useRef(null);
|
|
8
11
|
useEffect(() => {
|
|
9
12
|
handleLinkFocus(ref?.current, hasFocus, isMenuOpen);
|
|
@@ -13,16 +13,6 @@ type Props = {
|
|
|
13
13
|
* Children elements to be rendered next to the user's name and role
|
|
14
14
|
*/
|
|
15
15
|
children?: ReactNode;
|
|
16
|
-
/**
|
|
17
|
-
* Class modifier to apply additional styles\
|
|
18
|
-
* @example
|
|
19
|
-
* ```tsx
|
|
20
|
-
* <User classModifier="custom-class" />
|
|
21
|
-
* ```
|
|
22
|
-
* This will apply the class `af-info-user--custom-class` to the component.
|
|
23
|
-
* @deprecated Use `className` instead.
|
|
24
|
-
*/
|
|
25
|
-
classModifier?: string;
|
|
26
16
|
/**
|
|
27
17
|
* classNames to override completely the component's style
|
|
28
18
|
*/
|
|
@@ -57,5 +47,5 @@ type Props = {
|
|
|
57
47
|
*/
|
|
58
48
|
title?: string;
|
|
59
49
|
};
|
|
60
|
-
declare const User: ({ children,
|
|
50
|
+
declare const User: ({ children, className, href, name, path, profile, onClick, title, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
61
51
|
export { User };
|
|
@@ -3,10 +3,9 @@ import "@axa-fr/canopee-css/distributeur/Layout/Header/User/User.css";
|
|
|
3
3
|
import { getClassName } from "../../../utilities/helpers/getClassName";
|
|
4
4
|
import { InnerUser } from "./InnerUser";
|
|
5
5
|
const defaultClassName = "af-info-user";
|
|
6
|
-
const User = ({ children,
|
|
6
|
+
const User = ({ children, className, href, name, path, profile, onClick, title = "Voir mon profil", }) => {
|
|
7
7
|
const componentClassName = getClassName({
|
|
8
8
|
baseClassName: defaultClassName,
|
|
9
|
-
modifiers: classModifier?.split(" "),
|
|
10
9
|
className,
|
|
11
10
|
});
|
|
12
11
|
return (_jsxs("div", { className: componentClassName, children: [href ? (_jsx("a", { "aria-label": "user info link", className: `${defaultClassName}__link`, href: href, title: title, onClick: (event) => onClick && onClick({ path, event }), children: _jsx(InnerUser, { name: name, profile: profile }) })) : (_jsx(InnerUser, { name: name, profile: profile })), children] }));
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import {
|
|
3
|
-
type AnchorLinkProps = {
|
|
4
|
-
leftIcon?: ReactElement<typeof Svg>;
|
|
5
|
-
rightIcon?: ReactElement<typeof Svg>;
|
|
1
|
+
import { type AnchorHTMLAttributes } from "react";
|
|
2
|
+
import { type ClickableComponentProps } from "../ClickableGhost";
|
|
3
|
+
type AnchorLinkProps = ClickableComponentProps & {
|
|
6
4
|
className?: string;
|
|
7
5
|
disabled?: boolean;
|
|
8
6
|
variant?: "default" | "reverse";
|
|
9
7
|
};
|
|
10
|
-
type LinkComponentProps =
|
|
8
|
+
type LinkComponentProps = AnchorHTMLAttributes<HTMLAnchorElement> & AnchorLinkProps;
|
|
11
9
|
declare const LinkAnchor: {
|
|
12
10
|
({ className, target, rel, leftIcon, children, rightIcon, disabled, variant, ...restProps }: LinkComponentProps): import("react/jsx-runtime").JSX.Element;
|
|
13
11
|
displayName: string;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import classnames from "classnames";
|
|
3
3
|
import {} from "react";
|
|
4
|
-
import { Svg } from "../Svg";
|
|
5
4
|
import { linkClassName } from "./linkClassName";
|
|
5
|
+
import { ClickableGhost, } from "../ClickableGhost";
|
|
6
6
|
const LinkAnchor = ({ className, target, rel, leftIcon, children, rightIcon, disabled, variant, ...restProps }) => {
|
|
7
7
|
const finalClassName = classnames(linkClassName, className, {
|
|
8
8
|
[`${linkClassName}--reverse`]: variant === "reverse",
|
|
9
9
|
});
|
|
10
|
-
return (_jsxs("a",
|
|
10
|
+
return (_jsxs(ClickableGhost, { component: "a", className: finalClassName, rel: target === "_blank" ? "noopener noreferrer" : rel, "aria-disabled": disabled ?? restProps["aria-disabled"], target: target, ...restProps, children: [leftIcon, children, rightIcon] }));
|
|
11
11
|
};
|
|
12
12
|
LinkAnchor.displayName = "LinkAnchor";
|
|
13
13
|
export { LinkAnchor };
|
|
@@ -8,7 +8,7 @@ export type MessageProps = {
|
|
|
8
8
|
title: ReactNode;
|
|
9
9
|
/**
|
|
10
10
|
* URL of an svg icon to display in the sidebar of the message.
|
|
11
|
-
* If not provided, a default icon based on the
|
|
11
|
+
* If not provided, a default icon based on the variant will be used.
|
|
12
12
|
* <strong>This not recommended to use</strong>. Only use as an escape hatch.
|
|
13
13
|
*/
|
|
14
14
|
icon?: string;
|
|
@@ -28,10 +28,6 @@ export type MessageProps = {
|
|
|
28
28
|
* <div class="my-custom-class af-alert">My message</div>
|
|
29
29
|
*/
|
|
30
30
|
className?: string;
|
|
31
|
-
/**
|
|
32
|
-
* @deprecated Use `variant` instead.
|
|
33
|
-
*/
|
|
34
|
-
classModifier?: MessageVariants | "danger";
|
|
35
31
|
/**
|
|
36
32
|
* Variant of the message.
|
|
37
33
|
* This will determine the icon and the style of the message.
|
|
@@ -44,4 +40,4 @@ export type MessageProps = {
|
|
|
44
40
|
*/
|
|
45
41
|
closeButtonAriaLabel?: string;
|
|
46
42
|
};
|
|
47
|
-
export declare const Message: ({ className, onClose, icon, title, children,
|
|
43
|
+
export declare const Message: ({ className, onClose, icon, title, children, variant, closeButtonAriaLabel, }: PropsWithChildren<MessageProps>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -21,23 +21,12 @@ const getIconUrl = (type) => {
|
|
|
21
21
|
return errorSvg;
|
|
22
22
|
}
|
|
23
23
|
};
|
|
24
|
-
const
|
|
25
|
-
if (variant) {
|
|
26
|
-
return variant;
|
|
27
|
-
}
|
|
28
|
-
if (classModifier) {
|
|
29
|
-
return classModifier === "danger" ? "warning" : classModifier;
|
|
30
|
-
}
|
|
31
|
-
return "error"; // Default variant
|
|
32
|
-
};
|
|
33
|
-
export const Message = ({ className, onClose, icon, title, children, classModifier = "error", variant, // Backward compatibility
|
|
34
|
-
closeButtonAriaLabel = "close", }) => {
|
|
35
|
-
const safeVariant = getVariant(classModifier, variant);
|
|
24
|
+
export const Message = ({ className, onClose, icon, title, children, variant = "error", closeButtonAriaLabel = "close", }) => {
|
|
36
25
|
const componentClassName = getClassName({
|
|
37
26
|
baseClassName: "af-alert",
|
|
38
|
-
modifiers: [
|
|
27
|
+
modifiers: [variant],
|
|
39
28
|
className,
|
|
40
29
|
});
|
|
41
|
-
const iconSrc = icon ?? getIconUrl(
|
|
30
|
+
const iconSrc = icon ?? getIconUrl(variant);
|
|
42
31
|
return (_jsxs("div", { className: componentClassName, role: "alert", children: [_jsx("div", { className: "af-alert__sidebar", children: _jsx("div", { className: "af-alert__indicator", children: _jsx(Svg, { src: iconSrc, className: "af-alert__icon", role: "presentation" }) }) }), _jsxs("div", { className: "af-alert__content", children: [_jsx("div", { className: "af-alert__title", children: title }), children] }), onClose ? (_jsx("button", { onClick: onClose, "aria-label": closeButtonAriaLabel, type: "button", className: "af-alert__close-button", children: _jsx(Svg, { src: closeSvg, className: "af-alert__close-icon", role: "presentation" }) })) : null] }));
|
|
43
32
|
};
|
|
@@ -30,14 +30,9 @@ export type BooleanModalProps = React.DetailedHTMLProps<React.DialogHTMLAttribut
|
|
|
30
30
|
*/
|
|
31
31
|
cancelTitle?: string;
|
|
32
32
|
className?: string;
|
|
33
|
-
/**
|
|
34
|
-
* @deprecated Use `size` prop instead.
|
|
35
|
-
* Class modifier for the modal. Can be used to apply custom styles.
|
|
36
|
-
*/
|
|
37
|
-
classModifier?: string;
|
|
38
33
|
};
|
|
39
34
|
declare const BooleanModal: {
|
|
40
|
-
({ children, title, submitTitle, cancelTitle, className,
|
|
35
|
+
({ children, title, submitTitle, cancelTitle, className, onCancel, onSubmit, closeButtonAriaLabel, ...props }: BooleanModalProps): import("react/jsx-runtime").JSX.Element;
|
|
41
36
|
displayName: string;
|
|
42
37
|
};
|
|
43
38
|
export { BooleanModal };
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import React, {} from "react";
|
|
3
|
-
import { Button,
|
|
3
|
+
import { Button, getClassName, Modal } from "../../distributeur";
|
|
4
4
|
import { Body } from "./components/Body";
|
|
5
5
|
import { Footer } from "./components/Footer";
|
|
6
6
|
import { Header } from "./components/Header";
|
|
7
7
|
const defaultClassName = "af-modal";
|
|
8
|
-
const BooleanModal = ({ children, title, submitTitle = "Valider", cancelTitle = "Annuler", className
|
|
9
|
-
const componentClassName =
|
|
10
|
-
|
|
8
|
+
const BooleanModal = ({ children, title, submitTitle = "Valider", cancelTitle = "Annuler", className, onCancel, onSubmit, closeButtonAriaLabel, ...props }) => {
|
|
9
|
+
const componentClassName = getClassName({
|
|
10
|
+
baseClassName: defaultClassName,
|
|
11
|
+
className,
|
|
12
|
+
});
|
|
13
|
+
return (_jsxs(Modal, { className: componentClassName, onOutsideTap: onCancel, title: title, ...props, children: [_jsx(Header, { onCancel: onCancel, closeButtonAriaLabel: closeButtonAriaLabel, children: title }), _jsx(Body, { children: children }), _jsxs(Footer, { children: [_jsx(Button, { variant: "secondary", onClick: onCancel, children: cancelTitle }), _jsx(Button, { onClick: onSubmit, variant: "validated", children: submitTitle })] })] }));
|
|
11
14
|
};
|
|
12
15
|
BooleanModal.displayName = "BooleanModal";
|
|
13
16
|
export { BooleanModal };
|
|
@@ -12,17 +12,12 @@ export type ModalProps = React.DetailedHTMLProps<React.DialogHTMLAttributes<HTML
|
|
|
12
12
|
title?: string;
|
|
13
13
|
className?: string;
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
16
|
-
* Class modifier for the modal. Can be used to apply custom styles.
|
|
17
|
-
*/
|
|
18
|
-
classModifier?: string;
|
|
19
|
-
/**
|
|
20
|
-
* Size of the modal. Overrides classModifier if set
|
|
15
|
+
* Size of the modal.
|
|
21
16
|
*/
|
|
22
17
|
ref?: React.Ref<HTMLDialogElement>;
|
|
23
18
|
};
|
|
24
19
|
declare const Modal: {
|
|
25
|
-
({ className, title, onOutsideTap, children,
|
|
20
|
+
({ className, title, onOutsideTap, children, size, ...props }: ModalProps): import("react/jsx-runtime").JSX.Element;
|
|
26
21
|
displayName: string;
|
|
27
22
|
};
|
|
28
23
|
export { Modal };
|
|
@@ -1,21 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import {} from "react";
|
|
3
|
-
import {
|
|
4
|
-
const Modal = ({ className, title = "", onOutsideTap, children,
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
else {
|
|
12
|
-
effectiveClassModifier = size;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
else {
|
|
16
|
-
effectiveClassModifier = classModifier;
|
|
17
|
-
}
|
|
18
|
-
const componentClassName = getComponentClassName(className, effectiveClassModifier, "af-modal");
|
|
3
|
+
import { getClassName } from "../utilities";
|
|
4
|
+
const Modal = ({ className, title = "", onOutsideTap, children, size, ...props }) => {
|
|
5
|
+
const componentClassName = getClassName({
|
|
6
|
+
baseClassName: "af-modal",
|
|
7
|
+
modifiers: [size],
|
|
8
|
+
className,
|
|
9
|
+
});
|
|
19
10
|
return (
|
|
20
11
|
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions, jsx-a11y/click-events-have-key-events
|
|
21
12
|
_jsx("dialog", { "aria-label": title, className: componentClassName, onClick: onOutsideTap, ...props, children: _jsx("div", { className: "af-modal__dialog", onClick: (event) => event.stopPropagation(), children: _jsx("div", { className: "af-modal__content", children: children }) }) }));
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
export type BodyProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
2
|
-
|
|
3
|
-
classModifier?: string;
|
|
4
|
-
};
|
|
5
|
-
declare const Body: ({ children, className, classModifier, ...otherProps }: BodyProps) => import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
export type BodyProps = React.HTMLAttributes<HTMLDivElement> & {};
|
|
2
|
+
declare const Body: ({ children, className, ...otherProps }: BodyProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
3
|
export { Body };
|