@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,21 +0,0 @@
|
|
|
1
|
-
import { type ComponentPropsWithoutRef, type ReactNode } from "react";
|
|
2
|
-
import { FieldForm } from "./FieldForm";
|
|
3
|
-
type FieldProps = Omit<ComponentPropsWithoutRef<typeof FieldForm>, "children"> & {
|
|
4
|
-
label: ReactNode;
|
|
5
|
-
children?: ReactNode;
|
|
6
|
-
id?: string;
|
|
7
|
-
classModifier?: string;
|
|
8
|
-
classNameContainerLabel?: string;
|
|
9
|
-
classNameContainerInput?: string;
|
|
10
|
-
isVisible?: boolean;
|
|
11
|
-
roleContainer?: string;
|
|
12
|
-
ariaLabelContainer?: string;
|
|
13
|
-
isLabelContainerLinkedToInput?: boolean;
|
|
14
|
-
errorId?: string;
|
|
15
|
-
};
|
|
16
|
-
/**
|
|
17
|
-
* @deprecated This component is deprecated and will be removed in future versions. Use components with labels instead, such as `TextInput`
|
|
18
|
-
* or `SelectInput`.
|
|
19
|
-
*/
|
|
20
|
-
export declare const LegacyField: ({ id, message, messageType, label, children, forceDisplayMessage, classModifier, className, classNameContainerLabel, classNameContainerInput, isVisible, roleContainer, ariaLabelContainer, isLabelContainerLinkedToInput, errorId, }: FieldProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
21
|
-
export {};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import classNames from "classnames";
|
|
3
|
-
import {} from "react";
|
|
4
|
-
import { getComponentClassName } from "../../../utilities";
|
|
5
|
-
import { FieldError } from "../FieldError";
|
|
6
|
-
import { MessageTypes } from "../MessageTypes";
|
|
7
|
-
import { FieldForm } from "./FieldForm";
|
|
8
|
-
/**
|
|
9
|
-
* @deprecated This component is deprecated and will be removed in future versions. Use components with labels instead, such as `TextInput`
|
|
10
|
-
* or `SelectInput`.
|
|
11
|
-
*/
|
|
12
|
-
export const LegacyField = ({ id = "", message = "", messageType = MessageTypes.error, label, children, forceDisplayMessage, classModifier = "", className, classNameContainerLabel = "col-md-2", classNameContainerInput = "col-md-10", isVisible = true, roleContainer, ariaLabelContainer, isLabelContainerLinkedToInput = true, errorId, }) => {
|
|
13
|
-
if (!isVisible) {
|
|
14
|
-
return null;
|
|
15
|
-
}
|
|
16
|
-
const componentClassName = getComponentClassName(className, classModifier, "row af-form__group");
|
|
17
|
-
return (_jsxs("div", { className: componentClassName, role: roleContainer, "aria-label": ariaLabelContainer, children: [_jsx("div", { className: classNameContainerLabel, children: _jsx("label", { className: classNames({
|
|
18
|
-
"af-form__group-label--required": classModifier.includes("required"),
|
|
19
|
-
}, "af-form__group-label"), htmlFor: isLabelContainerLinkedToInput ? id : undefined, children: label }) }), _jsxs(FieldForm, { className: classNameContainerInput, message: message, messageType: messageType, forceDisplayMessage: forceDisplayMessage, children: [children, _jsx(FieldError, { message: message, messageType: messageType, errorId: errorId })] })] }));
|
|
20
|
-
};
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import { type BaseSyntheticEvent, type Dispatch, type ReactElement, type ReactNode, type SetStateAction } from "react";
|
|
2
|
-
import { FormClassManager } from "../FormClassManager";
|
|
3
|
-
import { MessageTypes } from "../MessageTypes";
|
|
4
|
-
type TMessage = {
|
|
5
|
-
message?: string;
|
|
6
|
-
messageType?: MessageTypes;
|
|
7
|
-
};
|
|
8
|
-
declare const INITIAL_STATE: {
|
|
9
|
-
hasLostFocusOnce: boolean;
|
|
10
|
-
hasFocus: boolean;
|
|
11
|
-
hasChange: boolean;
|
|
12
|
-
memory: TMessage;
|
|
13
|
-
};
|
|
14
|
-
type EventFunction = {
|
|
15
|
-
onChange?: (event: BaseSyntheticEvent) => void;
|
|
16
|
-
onBlur?: (event: BaseSyntheticEvent) => void;
|
|
17
|
-
onFocus?: (event: BaseSyntheticEvent) => void;
|
|
18
|
-
};
|
|
19
|
-
type FieldFormProps = TMessage & {
|
|
20
|
-
className?: string;
|
|
21
|
-
classModifier?: string;
|
|
22
|
-
forceDisplayMessage?: boolean;
|
|
23
|
-
children: ReactNode;
|
|
24
|
-
setStateMemoryFn?: typeof setStateMemory;
|
|
25
|
-
onChangeByStateFn?: typeof onChangeByState;
|
|
26
|
-
setStateOnBlurFn?: typeof setStateOnBlur;
|
|
27
|
-
setStateOnFocusFn?: typeof setStateOnFocus;
|
|
28
|
-
initialState?: typeof INITIAL_STATE;
|
|
29
|
-
};
|
|
30
|
-
type SetState = (prevState: typeof INITIAL_STATE) => typeof INITIAL_STATE;
|
|
31
|
-
export declare const setStateMemory: ({ message, messageType }: TMessage) => SetState;
|
|
32
|
-
export declare const setStateHasChange: () => SetState;
|
|
33
|
-
export declare const onChangeByState: (setState: Dispatch<SetStateAction<{
|
|
34
|
-
hasLostFocusOnce: boolean;
|
|
35
|
-
hasFocus: boolean;
|
|
36
|
-
hasChange: boolean;
|
|
37
|
-
memory: TMessage;
|
|
38
|
-
}>>, stateHasChange: boolean, setStateHasChangeFn?: () => SetState) => false | void;
|
|
39
|
-
export declare const setStateOnBlur: () => SetState;
|
|
40
|
-
export declare const setStateOnFocus: ({ message, messageType }: TMessage) => SetState;
|
|
41
|
-
type GetMessageInfoProps = typeof INITIAL_STATE & Required<Pick<FieldFormProps, "message" | "messageType" | "forceDisplayMessage">>;
|
|
42
|
-
export declare const getMessageInfo: ({ forceDisplayMessage, hasLostFocusOnce, hasFocus, memory, hasChange, message, messageType, }: GetMessageInfoProps) => Pick<FieldFormProps, "message" | "messageType">;
|
|
43
|
-
type EventWrapperProps = {
|
|
44
|
-
props: EventFunction;
|
|
45
|
-
} & Pick<AddPropsClone, "wrapper">;
|
|
46
|
-
export declare const eventWrapper: ({ wrapper, props }: EventWrapperProps) => {
|
|
47
|
-
onChange: (ev: BaseSyntheticEvent) => void;
|
|
48
|
-
onBlur: (ev: BaseSyntheticEvent) => void;
|
|
49
|
-
onFocus: (ev: BaseSyntheticEvent) => void;
|
|
50
|
-
};
|
|
51
|
-
type AddPropsClone = Omit<RenderChildrenProps, "children"> & {
|
|
52
|
-
child: ReactElement<Record<string, unknown>>;
|
|
53
|
-
classModifier: string;
|
|
54
|
-
name: string;
|
|
55
|
-
getMessageClassModifierFn?: typeof FormClassManager.getMessageClassModifier;
|
|
56
|
-
eventWrapperFn?: ({ wrapper, props }: EventWrapperProps) => {
|
|
57
|
-
onChange: (ev: BaseSyntheticEvent) => void;
|
|
58
|
-
onBlur: (ev: BaseSyntheticEvent) => void;
|
|
59
|
-
onFocus: (ev: BaseSyntheticEvent) => void;
|
|
60
|
-
};
|
|
61
|
-
};
|
|
62
|
-
export declare const addPropsClone: ({ message, messageType, classModifier, wrapper, child, name, getMessageClassModifierFn, eventWrapperFn, }: AddPropsClone) => {
|
|
63
|
-
isVisible: boolean;
|
|
64
|
-
message?: undefined;
|
|
65
|
-
classModifier?: undefined;
|
|
66
|
-
} | {
|
|
67
|
-
message: string | undefined;
|
|
68
|
-
isVisible?: undefined;
|
|
69
|
-
classModifier?: undefined;
|
|
70
|
-
} | {
|
|
71
|
-
classModifier: string;
|
|
72
|
-
isVisible?: undefined;
|
|
73
|
-
message?: undefined;
|
|
74
|
-
} | {
|
|
75
|
-
classModifier: string;
|
|
76
|
-
onChange: (ev: BaseSyntheticEvent) => void;
|
|
77
|
-
onBlur: (ev: BaseSyntheticEvent) => void;
|
|
78
|
-
onFocus: (ev: BaseSyntheticEvent) => void;
|
|
79
|
-
isVisible?: undefined;
|
|
80
|
-
message?: undefined;
|
|
81
|
-
} | {
|
|
82
|
-
onChange: (ev: BaseSyntheticEvent) => void;
|
|
83
|
-
onBlur: (ev: BaseSyntheticEvent) => void;
|
|
84
|
-
onFocus: (ev: BaseSyntheticEvent) => void;
|
|
85
|
-
isVisible?: undefined;
|
|
86
|
-
message?: undefined;
|
|
87
|
-
classModifier?: undefined;
|
|
88
|
-
} | {
|
|
89
|
-
isVisible?: undefined;
|
|
90
|
-
message?: undefined;
|
|
91
|
-
classModifier?: undefined;
|
|
92
|
-
};
|
|
93
|
-
type RenderChildrenProps = {
|
|
94
|
-
wrapper: EventFunction;
|
|
95
|
-
} & Partial<Pick<FieldFormProps, "children">> & ReturnType<typeof getMessageInfo>;
|
|
96
|
-
export declare const renderedChildren: ({ children, wrapper, message, messageType, }: RenderChildrenProps) => ReactNode;
|
|
97
|
-
/**
|
|
98
|
-
* @deprecated This component is deprecated and will be removed in future versions.
|
|
99
|
-
* This was an internal component used to manage the state of the form fields.
|
|
100
|
-
* It is not recommended to use it directly in your code as it is not a public API.
|
|
101
|
-
*/
|
|
102
|
-
export declare const FieldForm: ({ children, message, messageType, className, classModifier, forceDisplayMessage, setStateMemoryFn, onChangeByStateFn, setStateOnBlurFn, setStateOnFocusFn, initialState, }: FieldFormProps) => import("react/jsx-runtime").JSX.Element;
|
|
103
|
-
export {};
|
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Children, cloneElement, isValidElement, useEffect, useRef, useState, } from "react";
|
|
3
|
-
import { getComponentClassName } from "../../../utilities";
|
|
4
|
-
import { FormClassManager } from "../FormClassManager";
|
|
5
|
-
import { MessageTypes } from "../MessageTypes";
|
|
6
|
-
const defaultClassName = "md-10";
|
|
7
|
-
const INITIAL_STATE = {
|
|
8
|
-
hasLostFocusOnce: false,
|
|
9
|
-
hasFocus: false,
|
|
10
|
-
hasChange: false,
|
|
11
|
-
memory: { message: "", messageType: MessageTypes.error },
|
|
12
|
-
};
|
|
13
|
-
export const setStateMemory = ({ message, messageType = MessageTypes.error }) => (prevState) => ({
|
|
14
|
-
...prevState,
|
|
15
|
-
memory: {
|
|
16
|
-
message,
|
|
17
|
-
messageType,
|
|
18
|
-
},
|
|
19
|
-
});
|
|
20
|
-
export const setStateHasChange = () => (prevState) => ({
|
|
21
|
-
...prevState,
|
|
22
|
-
hasChange: true,
|
|
23
|
-
});
|
|
24
|
-
export const onChangeByState = (setState, stateHasChange, setStateHasChangeFn = setStateHasChange) => !stateHasChange && setState(setStateHasChangeFn());
|
|
25
|
-
export const setStateOnBlur = () => (prevState) => ({
|
|
26
|
-
...prevState,
|
|
27
|
-
hasLostFocusOnce: true,
|
|
28
|
-
hasFocus: false,
|
|
29
|
-
});
|
|
30
|
-
export const setStateOnFocus = ({ message, messageType = MessageTypes.error }) => (prevState) => ({
|
|
31
|
-
...prevState,
|
|
32
|
-
hasFocus: true,
|
|
33
|
-
memory: { message, messageType },
|
|
34
|
-
});
|
|
35
|
-
export const getMessageInfo = ({ forceDisplayMessage, hasLostFocusOnce, hasFocus, memory, hasChange, message, messageType, }) => {
|
|
36
|
-
const isDisplayMessage = hasLostFocusOnce || forceDisplayMessage || (hasChange && !hasFocus);
|
|
37
|
-
if (!isDisplayMessage) {
|
|
38
|
-
return {
|
|
39
|
-
message: "",
|
|
40
|
-
messageType: "",
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
return hasFocus
|
|
44
|
-
? memory
|
|
45
|
-
: {
|
|
46
|
-
message,
|
|
47
|
-
messageType,
|
|
48
|
-
};
|
|
49
|
-
};
|
|
50
|
-
export const eventWrapper = ({ wrapper, props }) => ({
|
|
51
|
-
onChange: (ev) => {
|
|
52
|
-
wrapper?.onChange?.(ev);
|
|
53
|
-
if (props.onChange) {
|
|
54
|
-
props.onChange(ev);
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
onBlur: (ev) => {
|
|
58
|
-
wrapper?.onBlur?.(ev);
|
|
59
|
-
if (props.onBlur) {
|
|
60
|
-
props.onBlur(ev);
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
|
-
onFocus: (ev) => {
|
|
64
|
-
wrapper?.onFocus?.(ev);
|
|
65
|
-
if (props.onFocus) {
|
|
66
|
-
props.onFocus(ev);
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
|
-
});
|
|
70
|
-
export const addPropsClone = ({ message, messageType, classModifier, wrapper, child, name, getMessageClassModifierFn = FormClassManager.getMessageClassModifier, eventWrapperFn = eventWrapper, }) => {
|
|
71
|
-
const messageClassModifier = getMessageClassModifierFn(messageType, message, classModifier);
|
|
72
|
-
const displayName = child.type.displayName ?? name;
|
|
73
|
-
switch (displayName) {
|
|
74
|
-
case "HelpMessage":
|
|
75
|
-
return { isVisible: !message };
|
|
76
|
-
case "FieldError":
|
|
77
|
-
return { message };
|
|
78
|
-
case "FieldInput":
|
|
79
|
-
return { classModifier: messageClassModifier };
|
|
80
|
-
case "EnhancedInputRadio":
|
|
81
|
-
case "EnhancedInputCheckbox":
|
|
82
|
-
return {
|
|
83
|
-
...eventWrapperFn({ wrapper, props: child.props }),
|
|
84
|
-
classModifier: messageClassModifier,
|
|
85
|
-
};
|
|
86
|
-
case "EnhancedInput":
|
|
87
|
-
return {
|
|
88
|
-
...eventWrapperFn({ wrapper, props: child.props }),
|
|
89
|
-
};
|
|
90
|
-
default:
|
|
91
|
-
return {};
|
|
92
|
-
}
|
|
93
|
-
};
|
|
94
|
-
export const renderedChildren = ({ children, wrapper, message, messageType, }) => Children.map(children, (child) => {
|
|
95
|
-
if (!isValidElement(child) || typeof child.type === "string") {
|
|
96
|
-
return child;
|
|
97
|
-
}
|
|
98
|
-
const props = {
|
|
99
|
-
...child.props,
|
|
100
|
-
};
|
|
101
|
-
if (child.props.children) {
|
|
102
|
-
const subChildren = renderedChildren({
|
|
103
|
-
children: child.props
|
|
104
|
-
.children,
|
|
105
|
-
wrapper,
|
|
106
|
-
message,
|
|
107
|
-
messageType,
|
|
108
|
-
});
|
|
109
|
-
if (subChildren !== null) {
|
|
110
|
-
props.children = subChildren;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
return cloneElement(child, {
|
|
114
|
-
...props,
|
|
115
|
-
...addPropsClone({
|
|
116
|
-
...child.type,
|
|
117
|
-
name: child.type.name,
|
|
118
|
-
message,
|
|
119
|
-
messageType,
|
|
120
|
-
classModifier: props.classModifier,
|
|
121
|
-
wrapper,
|
|
122
|
-
child: child,
|
|
123
|
-
}),
|
|
124
|
-
});
|
|
125
|
-
});
|
|
126
|
-
/**
|
|
127
|
-
* @deprecated This component is deprecated and will be removed in future versions.
|
|
128
|
-
* This was an internal component used to manage the state of the form fields.
|
|
129
|
-
* It is not recommended to use it directly in your code as it is not a public API.
|
|
130
|
-
*/
|
|
131
|
-
export const FieldForm = ({ children, message = "", messageType = MessageTypes.error, className = defaultClassName, classModifier = "", forceDisplayMessage = false, setStateMemoryFn = setStateMemory, onChangeByStateFn = onChangeByState, setStateOnBlurFn = setStateOnBlur, setStateOnFocusFn = setStateOnFocus, initialState = INITIAL_STATE, }) => {
|
|
132
|
-
const [state, setState] = useState(initialState);
|
|
133
|
-
const previousForceDisplayMessage = useRef(forceDisplayMessage);
|
|
134
|
-
useEffect(() => {
|
|
135
|
-
if (previousForceDisplayMessage.current !== forceDisplayMessage) {
|
|
136
|
-
setState(setStateMemoryFn({ message, messageType }));
|
|
137
|
-
}
|
|
138
|
-
}, [
|
|
139
|
-
forceDisplayMessage,
|
|
140
|
-
message,
|
|
141
|
-
messageType,
|
|
142
|
-
previousForceDisplayMessage,
|
|
143
|
-
setState,
|
|
144
|
-
setStateMemoryFn,
|
|
145
|
-
]);
|
|
146
|
-
// for particular case on particular browers which does not throw onFocus or onBlur event
|
|
147
|
-
const onChange = () => onChangeByStateFn(setState, state?.hasChange);
|
|
148
|
-
const onBlur = () => setState(setStateOnBlurFn());
|
|
149
|
-
const onFocus = () => setState(setStateOnFocusFn({ message, messageType }));
|
|
150
|
-
const childrenCloned = renderedChildren({
|
|
151
|
-
children,
|
|
152
|
-
wrapper: { onFocus, onChange, onBlur },
|
|
153
|
-
...getMessageInfo({
|
|
154
|
-
...state,
|
|
155
|
-
forceDisplayMessage,
|
|
156
|
-
message,
|
|
157
|
-
messageType,
|
|
158
|
-
}),
|
|
159
|
-
});
|
|
160
|
-
const subComponentClassName = getComponentClassName(className, classModifier, defaultClassName);
|
|
161
|
-
return _jsx("div", { className: subComponentClassName, children: childrenCloned });
|
|
162
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from "react";
|
|
2
|
-
type FieldProps = {
|
|
3
|
-
isVisible?: boolean;
|
|
4
|
-
className?: string;
|
|
5
|
-
classModifier?: string;
|
|
6
|
-
children?: ReactNode;
|
|
7
|
-
};
|
|
8
|
-
/**
|
|
9
|
-
* @deprecated This component is deprecated and will be removed in future versions.
|
|
10
|
-
* This was an internal component and it is not recommended to use it directly in your code as it is not a public API.
|
|
11
|
-
*/
|
|
12
|
-
export declare const FieldInput: {
|
|
13
|
-
({ children, className, classModifier, isVisible, }: FieldProps): import("react/jsx-runtime").JSX.Element | null;
|
|
14
|
-
displayName: string;
|
|
15
|
-
};
|
|
16
|
-
export {};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { getComponentClassName } from "../../../utilities";
|
|
3
|
-
/**
|
|
4
|
-
* @deprecated This component is deprecated and will be removed in future versions.
|
|
5
|
-
* This was an internal component and it is not recommended to use it directly in your code as it is not a public API.
|
|
6
|
-
*/
|
|
7
|
-
export const FieldInput = ({ children, className = "", classModifier = "", isVisible = true, }) => {
|
|
8
|
-
if (!isVisible) {
|
|
9
|
-
return null;
|
|
10
|
-
}
|
|
11
|
-
const newClassName = getComponentClassName(className, classModifier, "");
|
|
12
|
-
return _jsx("div", { className: newClassName, children: children });
|
|
13
|
-
};
|
|
14
|
-
FieldInput.displayName = "FieldInput";
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export function useInputClassModifier(classModifier, disabled, hasChildren, required = false) {
|
|
2
|
-
return {
|
|
3
|
-
inputClassModifier: [
|
|
4
|
-
classModifier ?? "",
|
|
5
|
-
hasChildren ? "hasinfobulle" : "",
|
|
6
|
-
].join(" "),
|
|
7
|
-
inputFieldClassModifier: [
|
|
8
|
-
classModifier ?? "",
|
|
9
|
-
disabled ? "disabled" : "",
|
|
10
|
-
required ? "required" : "",
|
|
11
|
-
].join(" "),
|
|
12
|
-
};
|
|
13
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const getClassModifier: (classModifier?: string, isSticky?: boolean) => string | undefined;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @deprecated This function is deprecated and will be removed in a future release. Use getClassName instead.
|
|
3
|
-
* Generates a component class name string based on provided class names and modifiers.
|
|
4
|
-
*
|
|
5
|
-
* @param {string} [className] - The base class name.
|
|
6
|
-
* @param {string} [classModifier] - A space-separated string of class modifiers.
|
|
7
|
-
* @param {string} [defaultClassName] - The default class name to use if className is not provided.
|
|
8
|
-
* @returns {string} The generated class name string.
|
|
9
|
-
*/
|
|
10
|
-
export declare const getComponentClassName: (className?: string, classModifier?: string, defaultClassName?: string) => string;
|
|
11
|
-
type getComponentClassNameWithUserClassnameParams = {
|
|
12
|
-
userClassName?: string;
|
|
13
|
-
classModifier?: string;
|
|
14
|
-
componentClassName: string;
|
|
15
|
-
};
|
|
16
|
-
/**
|
|
17
|
-
* @deprecated This function is deprecated and will be removed in a future release. Use getClassName instead.
|
|
18
|
-
*/
|
|
19
|
-
export declare const getComponentClassNameWithUserClassname: ({ componentClassName, userClassName, classModifier, }: getComponentClassNameWithUserClassnameParams) => string;
|
|
20
|
-
export {};
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import classNames from "classnames";
|
|
2
|
-
const getLastClassName = (classNameToUse) => {
|
|
3
|
-
if (!classNameToUse) {
|
|
4
|
-
return null;
|
|
5
|
-
}
|
|
6
|
-
return classNameToUse.split(" ").filter(Boolean).at(-1);
|
|
7
|
-
};
|
|
8
|
-
const listClassModifier = (classModifier) => {
|
|
9
|
-
if (!classModifier) {
|
|
10
|
-
return [];
|
|
11
|
-
}
|
|
12
|
-
return classModifier.split(" ");
|
|
13
|
-
};
|
|
14
|
-
/**
|
|
15
|
-
* @deprecated This function is deprecated and will be removed in a future release. Use getClassName instead.
|
|
16
|
-
* Generates a component class name string based on provided class names and modifiers.
|
|
17
|
-
*
|
|
18
|
-
* @param {string} [className] - The base class name.
|
|
19
|
-
* @param {string} [classModifier] - A space-separated string of class modifiers.
|
|
20
|
-
* @param {string} [defaultClassName] - The default class name to use if className is not provided.
|
|
21
|
-
* @returns {string} The generated class name string.
|
|
22
|
-
*/
|
|
23
|
-
export const getComponentClassName = (className, classModifier, defaultClassName) => {
|
|
24
|
-
const classNameToUse = className || defaultClassName;
|
|
25
|
-
// Fail fast, when no className or defaultClassName we don't want to loop on modifier
|
|
26
|
-
if (!classNameToUse) {
|
|
27
|
-
return "";
|
|
28
|
-
}
|
|
29
|
-
const classWithoutModifier = getLastClassName(classNameToUse);
|
|
30
|
-
const modifiers = listClassModifier(classModifier);
|
|
31
|
-
const modifiersObject = modifiers
|
|
32
|
-
.filter((it) => /\S/.test(it))
|
|
33
|
-
.map((it) => {
|
|
34
|
-
return `${classWithoutModifier}--${it}`;
|
|
35
|
-
});
|
|
36
|
-
return classNames(classNameToUse, modifiersObject);
|
|
37
|
-
};
|
|
38
|
-
/**
|
|
39
|
-
* @deprecated This function is deprecated and will be removed in a future release. Use getClassName instead.
|
|
40
|
-
*/
|
|
41
|
-
export const getComponentClassNameWithUserClassname = ({ componentClassName, userClassName, classModifier, }) => {
|
|
42
|
-
// Fail fast, when no className or componentClassName we don't want to loop on modifier
|
|
43
|
-
if (!componentClassName) {
|
|
44
|
-
return "";
|
|
45
|
-
}
|
|
46
|
-
const classWithoutModifier = getLastClassName(componentClassName);
|
|
47
|
-
const modifiers = listClassModifier(classModifier);
|
|
48
|
-
const modifiersObject = modifiers
|
|
49
|
-
.filter((it) => /\S/.test(it))
|
|
50
|
-
.map((it) => {
|
|
51
|
-
return `${classWithoutModifier}--${it}`;
|
|
52
|
-
});
|
|
53
|
-
return classNames(componentClassName, modifiersObject, userClassName);
|
|
54
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from "react";
|
|
2
|
-
type isLoadingAndChildrenProps = {
|
|
3
|
-
children: ReactNode;
|
|
4
|
-
isLoading: boolean;
|
|
5
|
-
} | {
|
|
6
|
-
children?: undefined;
|
|
7
|
-
isLoading?: boolean;
|
|
8
|
-
};
|
|
9
|
-
export type SkeletonProps = {
|
|
10
|
-
className?: string;
|
|
11
|
-
grid: number[][];
|
|
12
|
-
"aria-busy"?: boolean;
|
|
13
|
-
"aria-label"?: string;
|
|
14
|
-
maxCols?: number;
|
|
15
|
-
colGap?: number;
|
|
16
|
-
rowGap?: number;
|
|
17
|
-
} & isLoadingAndChildrenProps;
|
|
18
|
-
export declare const Skeleton: ({ className, grid, "aria-busy": ariaBusy, "aria-label": ariaLabel, maxCols, colGap, rowGap, isLoading, children, }: SkeletonProps) => string | number | bigint | boolean | import("react/jsx-runtime").JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | null | undefined;
|
|
19
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { getClassName } from "../utilities/getClassName";
|
|
3
|
-
const CLASS_NAME = "af-skeleton";
|
|
4
|
-
export const Skeleton = ({ className, grid = [], "aria-busy": ariaBusy = true, "aria-label": ariaLabel = "Chargement", maxCols = 12, colGap = 16, rowGap = 8, isLoading = true, children, }) => isLoading ? (_jsx("div", { className: getClassName({
|
|
5
|
-
baseClassName: `${CLASS_NAME}-container`,
|
|
6
|
-
className,
|
|
7
|
-
}), "aria-label": ariaLabel, role: "status", "aria-busy": ariaBusy, style: {
|
|
8
|
-
"--max-cols": maxCols,
|
|
9
|
-
"--col-gap": `calc(${colGap} / var(--font-size-base) * 1rem)`,
|
|
10
|
-
"--row-gap": `calc(${rowGap} / var(--font-size-base) * 1rem)`,
|
|
11
|
-
}, children: grid.map((cols, indexRow) => cols.map((colSize, indexCol) => (_jsx("div", { style: { "--col-size": colSize }, className: CLASS_NAME }, `${indexRow}-${indexCol}`)))) })) : (children);
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import classNames from "classnames";
|
|
2
|
-
const getLastClassName = (defaultClassName) => {
|
|
3
|
-
if (!defaultClassName) {
|
|
4
|
-
return null;
|
|
5
|
-
}
|
|
6
|
-
return defaultClassName.split(" ").filter(Boolean).at(-1);
|
|
7
|
-
};
|
|
8
|
-
const listClassModifier = (classModifier) => {
|
|
9
|
-
if (!classModifier) {
|
|
10
|
-
return [];
|
|
11
|
-
}
|
|
12
|
-
return classModifier.split(" ");
|
|
13
|
-
};
|
|
14
|
-
/**
|
|
15
|
-
* @deprecated This function is deprecated and will be removed in a future release. Use getClassName instead.
|
|
16
|
-
*/
|
|
17
|
-
export const getComponentClassName = (defaultClassName, className, classModifier) => {
|
|
18
|
-
// Fail fast, when no defaultClassName we don't want to loop on modifier
|
|
19
|
-
if (!defaultClassName) {
|
|
20
|
-
return "";
|
|
21
|
-
}
|
|
22
|
-
const classWithoutModifier = getLastClassName(defaultClassName);
|
|
23
|
-
const modifiers = listClassModifier(classModifier);
|
|
24
|
-
const modifiersObject = modifiers
|
|
25
|
-
.filter((it) => /\S/.test(it))
|
|
26
|
-
.map((it) => {
|
|
27
|
-
return `${classWithoutModifier}--${it}`;
|
|
28
|
-
});
|
|
29
|
-
return classNames(defaultClassName, className, modifiersObject);
|
|
30
|
-
};
|