@axa-fr/canopee-react 2.0.0-alpha.7 → 2.0.0-alpha.71
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 -16
- package/dist/client.js +17 -16
- 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/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/index.d.ts +6 -0
- package/dist/distributeur/Form/Experimental/index.js +6 -0
- package/dist/distributeur/Form/Experimental/types.d.ts +1 -1
- package/dist/distributeur/Form/Experimental/useInput.hook.js +1 -1
- package/dist/distributeur/Title/Title.js +1 -1
- package/dist/distributeur-experimental.d.ts +2 -0
- package/dist/distributeur-experimental.js +2 -0
- package/dist/distributeur.d.ts +3 -0
- package/dist/distributeur.js +3 -0
- 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/CardCheckboxCommon.d.ts +1 -17
- 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/Checkbox/CheckboxCommon.d.ts +2 -6
- package/dist/prospect-client/Form/Checkbox/Checkbox/CheckboxCommon.js +6 -2
- package/dist/prospect-client/Form/Checkbox/CheckboxText/CheckboxTextCommon.d.ts +1 -5
- package/dist/prospect-client/Form/Checkbox/CheckboxText/CheckboxTextCommon.js +3 -3
- package/dist/prospect-client/Form/Dropdown/DropdownCommon.d.ts +2 -10
- package/dist/prospect-client/Form/Dropdown/DropdownCommon.js +3 -3
- package/dist/prospect-client/Form/InputDate/InputDateCommon.d.ts +2 -10
- package/dist/prospect-client/Form/InputDate/InputDateCommon.js +4 -5
- package/dist/prospect-client/Form/InputPhone/InputPhoneCommon.d.ts +2 -10
- package/dist/prospect-client/Form/InputPhone/InputPhoneCommon.js +9 -5
- package/dist/prospect-client/Form/InputText/InputTextCommon.d.ts +3 -11
- package/dist/prospect-client/Form/InputText/InputTextCommon.js +6 -5
- package/dist/prospect-client/Form/ItemLabel/ItemLabelCommon.d.ts +2 -22
- package/dist/prospect-client/Form/ItemLabel/ItemLabelCommon.js +4 -5
- package/dist/prospect-client/Form/ItemMultiSelect/ItemMultiSelectApollo.d.ts +7 -0
- package/dist/prospect-client/Form/ItemMultiSelect/ItemMultiSelectApollo.js +6 -0
- package/dist/prospect-client/Form/ItemMultiSelect/ItemMultiSelectCommon.d.ts +8 -0
- package/dist/prospect-client/Form/ItemMultiSelect/ItemMultiSelectCommon.js +9 -0
- package/dist/prospect-client/Form/ItemMultiSelect/ItemMultiSelectLF.d.ts +7 -0
- package/dist/prospect-client/Form/ItemMultiSelect/ItemMultiSelectLF.js +6 -0
- package/dist/prospect-client/Form/MultiSelectList/MultiSelectListApollo.d.ts +4 -0
- package/dist/prospect-client/Form/MultiSelectList/MultiSelectListApollo.js +5 -0
- package/dist/prospect-client/Form/MultiSelectList/MultiSelectListCommon.d.ts +11 -0
- package/dist/prospect-client/Form/MultiSelectList/MultiSelectListCommon.js +2 -0
- package/dist/prospect-client/Form/MultiSelectList/MultiSelectListLF.d.ts +4 -0
- package/dist/prospect-client/Form/MultiSelectList/MultiSelectListLF.js +5 -0
- package/dist/prospect-client/Form/Radio/CardRadio/CardRadioCommon.d.ts +1 -5
- package/dist/prospect-client/Form/Radio/CardRadio/CardRadioCommon.js +4 -4
- package/dist/prospect-client/Form/Radio/CardRadioGroup/CardRadioGroupCommon.d.ts +3 -27
- package/dist/prospect-client/Form/Radio/CardRadioGroup/CardRadioGroupCommon.js +4 -6
- 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/TextAreaCommon.d.ts +2 -6
- package/dist/prospect-client/Form/TextArea/TextAreaCommon.js +3 -3
- package/dist/prospect-client/Header/HeaderApollo.d.ts +4 -0
- package/dist/prospect-client/Header/HeaderApollo.js +8 -0
- package/dist/prospect-client/Header/HeaderCommon.d.ts +22 -0
- package/dist/prospect-client/Header/HeaderCommon.js +37 -0
- package/dist/prospect-client/Header/HeaderLF.d.ts +4 -0
- package/dist/prospect-client/Header/HeaderLF.js +8 -0
- package/dist/prospect-client/Icon/IconCommon.d.ts +1 -1
- package/dist/prospect-client/Icon/IconCommon.js +8 -9
- package/dist/prospect-client/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/ContentItemDuoCommon.d.ts +1 -5
- package/dist/prospect-client/List/ContentItemDuo/ContentItemDuoCommon.js +3 -7
- 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 +2 -1
- package/dist/prospect-client/Stepper/StepperCommon.d.ts +11 -6
- package/dist/prospect-client/Stepper/StepperCommon.js +2 -3
- package/dist/prospect-client/Stepper/StepperLF.js +2 -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 -6
- package/dist/prospect.js +11 -6
- package/package.json +2 -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
package/dist/client.d.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import "@axa-fr/canopee-css/client/common/
|
|
1
|
+
import "@axa-fr/canopee-css/client/common/reboot.css";
|
|
2
2
|
import "@axa-fr/canopee-css/client/common/tokens.css";
|
|
3
3
|
import "@axa-fr/canopee-css/client/Grid/Grid.css";
|
|
4
4
|
import "@fontsource/source-sans-pro";
|
|
5
5
|
export { Accordion, accordionVariants, type AccordionVariants, } from "./prospect-client/Accordion/AccordionLF";
|
|
6
6
|
export { AccordionContextual, accordionContextualVariants, type AccordionContextualVariants, } from "./prospect-client/AccordionContextual/AccordionContextualLF";
|
|
7
7
|
export { AccordionCore } from "./prospect-client/AccordionCore/AccordionCoreLF";
|
|
8
|
+
export { AppName, type AppNameProps } from "./prospect-client/AppName/AppName";
|
|
8
9
|
export { BasePicture } from "./prospect-client/BasePicture/BasePicture";
|
|
9
10
|
export { Button, buttonVariants, type ButtonVariants, } from "./prospect-client/Button/ButtonLF";
|
|
10
|
-
export { Card, type CardProps } from "./prospect-client/Card/CardLF";
|
|
11
|
+
export { Card, cardVariants, type CardProps, type CardVariants, } from "./prospect-client/Card/CardLF";
|
|
11
12
|
export { CardMessage, cardMessageVariants, type CardMessageVariants, } from "./prospect-client/CardMessage/CardMessageLF";
|
|
12
13
|
export { ClickIcon } from "./prospect-client/ClickIcon/ClickIconLF";
|
|
13
14
|
export { ContentItemDuoAction, type ContentItemDuoActionState, } from "./prospect-client/ContentItemDuoAction/ContentItemDuoActionLF";
|
|
@@ -15,9 +16,7 @@ export { ContentItemMono } from "./prospect-client/ContentItemMono/ContentItemMo
|
|
|
15
16
|
export { DataAgent, type DataAgentProps, } from "./prospect-client/DataAgent/DataAgentLF";
|
|
16
17
|
export { Divider } from "./prospect-client/Divider/DividerLF";
|
|
17
18
|
export { Fieldset, type FieldsetProps, } from "./prospect-client/Fieldset/FieldsetLF";
|
|
18
|
-
export { CardCheckbox,
|
|
19
|
-
/** @deprecated Use `CardCheckbox` instead. */
|
|
20
|
-
CardCheckbox as CheckboxCard, } from "./prospect-client/Form/Checkbox/CardCheckbox/CardCheckboxLF";
|
|
19
|
+
export { CardCheckbox, type CardCheckboxProps, } from "./prospect-client/Form/Checkbox/CardCheckbox/CardCheckboxLF";
|
|
21
20
|
export { CardCheckboxOption } from "./prospect-client/Form/Checkbox/CardCheckboxOption/CardCheckboxOptionLF";
|
|
22
21
|
export { Checkbox } from "./prospect-client/Form/Checkbox/Checkbox/CheckboxLF";
|
|
23
22
|
export { CheckboxText } from "./prospect-client/Form/Checkbox/CheckboxText/CheckboxTextLF";
|
|
@@ -25,29 +24,27 @@ export { Dropdown } from "./prospect-client/Form/Dropdown/DropdownLF";
|
|
|
25
24
|
export { FileUpload } from "./prospect-client/Form/FileUpload/FileUpload/FileUploadLF";
|
|
26
25
|
export { InputFile } from "./prospect-client/Form/FileUpload/InputFile/InputFileLF";
|
|
27
26
|
export { ItemFile } from "./prospect-client/Form/FileUpload/ItemFile/ItemFileLF";
|
|
28
|
-
export {
|
|
29
|
-
/** @deprecated Use `InputDate` instead. */
|
|
30
|
-
InputDate as DateInput, InputDate, } from "./prospect-client/Form/InputDate/InputDateLF";
|
|
27
|
+
export { InputDate } from "./prospect-client/Form/InputDate/InputDateLF";
|
|
31
28
|
export { type OptionType } from "./prospect-client/Form/InputPhone/InputPhone.types";
|
|
32
29
|
export { InputPhone } from "./prospect-client/Form/InputPhone/InputPhoneLF";
|
|
33
|
-
export { InputText
|
|
34
|
-
/** @deprecated Use `InputText` instead. */
|
|
35
|
-
InputText as TextInput, } from "./prospect-client/Form/InputText/InputTextLF";
|
|
30
|
+
export { InputText } from "./prospect-client/Form/InputText/InputTextLF";
|
|
36
31
|
export { InputTextAtom } from "./prospect-client/Form/InputTextAtom/InputTextAtomLF";
|
|
37
32
|
export { ItemLabel } from "./prospect-client/Form/ItemLabel/ItemLabelLF";
|
|
38
33
|
export { ItemMessage, itemMessageVariants, type ItemMessageVariants, } from "./prospect-client/Form/ItemMessage/ItemMessageLF";
|
|
34
|
+
export { ItemMultiSelect, type ItemMultiSelectProps, } from "./prospect-client/Form/ItemMultiSelect/ItemMultiSelectLF";
|
|
35
|
+
export { MultiSelectList, type MultiSelectListProps, } from "./prospect-client/Form/MultiSelectList/MultiSelectListLF";
|
|
39
36
|
export { CardRadio } from "./prospect-client/Form/Radio/CardRadio/CardRadioLF";
|
|
40
37
|
export { CardRadioGroup } from "./prospect-client/Form/Radio/CardRadioGroup/CardRadioGroupLF";
|
|
41
38
|
export { Radio } from "./prospect-client/Form/Radio/Radio/RadioLF";
|
|
42
39
|
export { RadioText, type RadioTextProps, } from "./prospect-client/Form/Radio/RadioText/RadioTextLF";
|
|
43
40
|
export { TextArea } from "./prospect-client/Form/TextArea/TextAreaLF";
|
|
44
41
|
export { DebugGrid } from "./prospect-client/Grid/DebugGridLF";
|
|
42
|
+
export { Header, type HeaderProps } from "./prospect-client/Header/HeaderLF";
|
|
45
43
|
export { Heading, type HeadingLevel, type HeadingProps, } from "./prospect-client/Heading/HeadingLF";
|
|
46
44
|
export { Icon, iconSizeVariants, iconVariants, type IconSizeVariants, type IconVariants, } from "./prospect-client/Icon/IconLF";
|
|
47
|
-
export { ItemTabBar, type ItemTabBarProps, } from "./prospect-client/ItemTabBar/ItemTabBarLF";
|
|
48
45
|
export { ItemMenu, type ItemMenuProps, } from "./prospect-client/ItemMenu/ItemMenuLF";
|
|
49
|
-
export {
|
|
50
|
-
export { ExitLayout, type ExitLayoutProps, type ExitLayoutWithSubComponents, } from "./prospect-client/Layout/ExitLayout/ExitLayoutLF";
|
|
46
|
+
export { ItemTabBar, type ItemTabBarProps, } from "./prospect-client/ItemTabBar/ItemTabBarLF";
|
|
47
|
+
export { ExitLayout, type ExitLayoutProps, type ExitLayoutWithSubComponents, ExitLayoutSkeleton, type ExitLayoutSkeletonProps, } from "./prospect-client/Layout/ExitLayout/ExitLayoutLF";
|
|
51
48
|
export { Footer, type FooterProps, } from "./prospect-client/Layout/Footer/FooterLF";
|
|
52
49
|
export { FormLayout, type FormLayoutProps, } from "./prospect-client/Layout/FormLayout/FormLayout";
|
|
53
50
|
export { LevelSelector, type LevelSelectorProps, } from "./prospect-client/LevelSelector/LevelSelectorLF";
|
|
@@ -56,16 +53,18 @@ export { ClickItem, clickItemStates, clickItemVariants, type ClickItemStates, ty
|
|
|
56
53
|
export { ContentItemDuo } from "./prospect-client/List/ContentItemDuo/ContentItemDuoLF";
|
|
57
54
|
export { List, type ListProps } from "./prospect-client/List/List/ListLF";
|
|
58
55
|
export { Loader, type LoaderProps } from "./prospect-client/Loader/LoaderLF";
|
|
56
|
+
export { MenuBurger, type MenuBurgerProps, } from "./prospect-client/MenuBurger/MenuBurgerLF";
|
|
59
57
|
export { Message, messageVariants, type MessageVariants, } from "./prospect-client/Message/MessageLF";
|
|
60
|
-
export { MultiMessage, type MultiMessageItem, type MultiMessageProps, } from "./prospect-client/MultiMessage/MultiMessageLF";
|
|
61
58
|
export { Modal, ModalCore, ModalCoreBody, ModalCoreFooter, ModalCoreHeader, } from "./prospect-client/Modal/ModalLF";
|
|
59
|
+
export { MultiMessage, type MultiMessageItem, type MultiMessageProps, } from "./prospect-client/MultiMessage/MultiMessageLF";
|
|
62
60
|
export { ErrorPage, type ErrorPageProps, } from "./prospect-client/pages/ErrorPage/ErrorPageLF";
|
|
63
61
|
export { ValidPage, type ValidPageProps, } from "./prospect-client/pages/ValidPage/ValidPageLF";
|
|
64
62
|
export { ItemPagination, type ItemPaginationProps, } from "./prospect-client/Pagination/ItemPagination/ItemPaginationLF";
|
|
65
63
|
export { Pagination } from "./prospect-client/Pagination/PaginationLF";
|
|
66
64
|
export { ProgressBar } from "./prospect-client/ProgressBar/ProgressBarLF";
|
|
67
65
|
export { ProgressBarGroup } from "./prospect-client/ProgressBarGroup/ProgressBarGroupLF";
|
|
68
|
-
export { Skeleton, type SkeletonProps, } from "./prospect-client/Skeleton/
|
|
66
|
+
export { Skeleton, skeletonSizeVariants, skeletonVariants, type SkeletonActionSizeVariant, type SkeletonCircleSizeVariant, type SkeletonProps, type SkeletonSizeVariant, type SkeletonVariant, } from "./prospect-client/Skeleton/Skeleton";
|
|
67
|
+
export { SkeletonGrid, type SkeletonGridProps, } from "./prospect-client/SkeletonGrid/SkeletonGrid";
|
|
69
68
|
export { SkeletonList, type SkeletonListProps, } from "./prospect-client/SkeletonList/SkeletonListLF";
|
|
70
69
|
export { Spinner, spinnerVariants, type SpinnerVariants, } from "./prospect-client/Spinner/SpinnerLF";
|
|
71
70
|
export { Stepper } from "./prospect-client/Stepper/StepperLF";
|
|
@@ -73,8 +72,10 @@ export { Svg } from "./prospect-client/Svg/Svg";
|
|
|
73
72
|
export { TabBar, tabBarDirection, type TabBarDirection, type TabBarProps, } from "./prospect-client/TabBar/TabBarLF";
|
|
74
73
|
export { Table, type BodyColorVariants, type HeadColorVariants, type RowSizeVariants, type TableProps, } from "./prospect-client/Table/TableLF";
|
|
75
74
|
export { TableMobileCard, type TableMobileCardProps, } from "./prospect-client/TableMobileCard/TableMobileCard";
|
|
75
|
+
export { TabMenu, type TabMenuProps } from "./prospect-client/TabMenu/TabMenu";
|
|
76
76
|
export { Tag, tagVariants, type TagVariants, } from "./prospect-client/Tag/TagLF";
|
|
77
77
|
export { TagList, type TagListProps, } from "./prospect-client/TagList/TagListLF";
|
|
78
78
|
export { TimelineVertical } from "./prospect-client/TimelineVertical/TimelineVerticalLF";
|
|
79
79
|
export { Toggle } from "./prospect-client/Toggle/ToggleLF";
|
|
80
80
|
export type { GridContainerProps } from "./prospect-client/utilities/types/GridContainerProps";
|
|
81
|
+
export { MessageBar, type MessageBarProps, type MessageBarVariant, } from "./prospect-client/MessageBar/MessageBarLF";
|
package/dist/client.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import "@axa-fr/canopee-css/client/common/
|
|
1
|
+
import "@axa-fr/canopee-css/client/common/reboot.css";
|
|
2
2
|
import "@axa-fr/canopee-css/client/common/tokens.css";
|
|
3
3
|
import "@axa-fr/canopee-css/client/Grid/Grid.css";
|
|
4
4
|
import "@fontsource/source-sans-pro";
|
|
5
5
|
export { Accordion, accordionVariants, } from "./prospect-client/Accordion/AccordionLF";
|
|
6
6
|
export { AccordionContextual, accordionContextualVariants, } from "./prospect-client/AccordionContextual/AccordionContextualLF";
|
|
7
7
|
export { AccordionCore } from "./prospect-client/AccordionCore/AccordionCoreLF";
|
|
8
|
+
export { AppName } from "./prospect-client/AppName/AppName";
|
|
8
9
|
export { BasePicture } from "./prospect-client/BasePicture/BasePicture";
|
|
9
10
|
export { Button, buttonVariants, } from "./prospect-client/Button/ButtonLF";
|
|
10
|
-
export { Card } from "./prospect-client/Card/CardLF";
|
|
11
|
+
export { Card, cardVariants, } from "./prospect-client/Card/CardLF";
|
|
11
12
|
export { CardMessage, cardMessageVariants, } from "./prospect-client/CardMessage/CardMessageLF";
|
|
12
13
|
export { ClickIcon } from "./prospect-client/ClickIcon/ClickIconLF";
|
|
13
14
|
export { ContentItemDuoAction, } from "./prospect-client/ContentItemDuoAction/ContentItemDuoActionLF";
|
|
@@ -15,9 +16,7 @@ export { ContentItemMono } from "./prospect-client/ContentItemMono/ContentItemMo
|
|
|
15
16
|
export { DataAgent, } from "./prospect-client/DataAgent/DataAgentLF";
|
|
16
17
|
export { Divider } from "./prospect-client/Divider/DividerLF";
|
|
17
18
|
export { Fieldset, } from "./prospect-client/Fieldset/FieldsetLF";
|
|
18
|
-
export { CardCheckbox,
|
|
19
|
-
/** @deprecated Use `CardCheckbox` instead. */
|
|
20
|
-
CardCheckbox as CheckboxCard, } from "./prospect-client/Form/Checkbox/CardCheckbox/CardCheckboxLF";
|
|
19
|
+
export { CardCheckbox, } from "./prospect-client/Form/Checkbox/CardCheckbox/CardCheckboxLF";
|
|
21
20
|
export { CardCheckboxOption } from "./prospect-client/Form/Checkbox/CardCheckboxOption/CardCheckboxOptionLF";
|
|
22
21
|
export { Checkbox } from "./prospect-client/Form/Checkbox/Checkbox/CheckboxLF";
|
|
23
22
|
export { CheckboxText } from "./prospect-client/Form/Checkbox/CheckboxText/CheckboxTextLF";
|
|
@@ -25,29 +24,27 @@ export { Dropdown } from "./prospect-client/Form/Dropdown/DropdownLF";
|
|
|
25
24
|
export { FileUpload } from "./prospect-client/Form/FileUpload/FileUpload/FileUploadLF";
|
|
26
25
|
export { InputFile } from "./prospect-client/Form/FileUpload/InputFile/InputFileLF";
|
|
27
26
|
export { ItemFile } from "./prospect-client/Form/FileUpload/ItemFile/ItemFileLF";
|
|
28
|
-
export {
|
|
29
|
-
/** @deprecated Use `InputDate` instead. */
|
|
30
|
-
InputDate as DateInput, InputDate, } from "./prospect-client/Form/InputDate/InputDateLF";
|
|
27
|
+
export { InputDate } from "./prospect-client/Form/InputDate/InputDateLF";
|
|
31
28
|
export {} from "./prospect-client/Form/InputPhone/InputPhone.types";
|
|
32
29
|
export { InputPhone } from "./prospect-client/Form/InputPhone/InputPhoneLF";
|
|
33
|
-
export { InputText
|
|
34
|
-
/** @deprecated Use `InputText` instead. */
|
|
35
|
-
InputText as TextInput, } from "./prospect-client/Form/InputText/InputTextLF";
|
|
30
|
+
export { InputText } from "./prospect-client/Form/InputText/InputTextLF";
|
|
36
31
|
export { InputTextAtom } from "./prospect-client/Form/InputTextAtom/InputTextAtomLF";
|
|
37
32
|
export { ItemLabel } from "./prospect-client/Form/ItemLabel/ItemLabelLF";
|
|
38
33
|
export { ItemMessage, itemMessageVariants, } from "./prospect-client/Form/ItemMessage/ItemMessageLF";
|
|
34
|
+
export { ItemMultiSelect, } from "./prospect-client/Form/ItemMultiSelect/ItemMultiSelectLF";
|
|
35
|
+
export { MultiSelectList, } from "./prospect-client/Form/MultiSelectList/MultiSelectListLF";
|
|
39
36
|
export { CardRadio } from "./prospect-client/Form/Radio/CardRadio/CardRadioLF";
|
|
40
37
|
export { CardRadioGroup } from "./prospect-client/Form/Radio/CardRadioGroup/CardRadioGroupLF";
|
|
41
38
|
export { Radio } from "./prospect-client/Form/Radio/Radio/RadioLF";
|
|
42
39
|
export { RadioText, } from "./prospect-client/Form/Radio/RadioText/RadioTextLF";
|
|
43
40
|
export { TextArea } from "./prospect-client/Form/TextArea/TextAreaLF";
|
|
44
41
|
export { DebugGrid } from "./prospect-client/Grid/DebugGridLF";
|
|
42
|
+
export { Header } from "./prospect-client/Header/HeaderLF";
|
|
45
43
|
export { Heading, } from "./prospect-client/Heading/HeadingLF";
|
|
46
44
|
export { Icon, iconSizeVariants, iconVariants, } from "./prospect-client/Icon/IconLF";
|
|
47
|
-
export { ItemTabBar, } from "./prospect-client/ItemTabBar/ItemTabBarLF";
|
|
48
45
|
export { ItemMenu, } from "./prospect-client/ItemMenu/ItemMenuLF";
|
|
49
|
-
export {
|
|
50
|
-
export { ExitLayout, } from "./prospect-client/Layout/ExitLayout/ExitLayoutLF";
|
|
46
|
+
export { ItemTabBar, } from "./prospect-client/ItemTabBar/ItemTabBarLF";
|
|
47
|
+
export { ExitLayout, ExitLayoutSkeleton, } from "./prospect-client/Layout/ExitLayout/ExitLayoutLF";
|
|
51
48
|
export { Footer, } from "./prospect-client/Layout/Footer/FooterLF";
|
|
52
49
|
export { FormLayout, } from "./prospect-client/Layout/FormLayout/FormLayout";
|
|
53
50
|
export { LevelSelector, } from "./prospect-client/LevelSelector/LevelSelectorLF";
|
|
@@ -56,16 +53,18 @@ export { ClickItem, clickItemStates, clickItemVariants, } from "./prospect-clien
|
|
|
56
53
|
export { ContentItemDuo } from "./prospect-client/List/ContentItemDuo/ContentItemDuoLF";
|
|
57
54
|
export { List } from "./prospect-client/List/List/ListLF";
|
|
58
55
|
export { Loader } from "./prospect-client/Loader/LoaderLF";
|
|
56
|
+
export { MenuBurger, } from "./prospect-client/MenuBurger/MenuBurgerLF";
|
|
59
57
|
export { Message, messageVariants, } from "./prospect-client/Message/MessageLF";
|
|
60
|
-
export { MultiMessage, } from "./prospect-client/MultiMessage/MultiMessageLF";
|
|
61
58
|
export { Modal, ModalCore, ModalCoreBody, ModalCoreFooter, ModalCoreHeader, } from "./prospect-client/Modal/ModalLF";
|
|
59
|
+
export { MultiMessage, } from "./prospect-client/MultiMessage/MultiMessageLF";
|
|
62
60
|
export { ErrorPage, } from "./prospect-client/pages/ErrorPage/ErrorPageLF";
|
|
63
61
|
export { ValidPage, } from "./prospect-client/pages/ValidPage/ValidPageLF";
|
|
64
62
|
export { ItemPagination, } from "./prospect-client/Pagination/ItemPagination/ItemPaginationLF";
|
|
65
63
|
export { Pagination } from "./prospect-client/Pagination/PaginationLF";
|
|
66
64
|
export { ProgressBar } from "./prospect-client/ProgressBar/ProgressBarLF";
|
|
67
65
|
export { ProgressBarGroup } from "./prospect-client/ProgressBarGroup/ProgressBarGroupLF";
|
|
68
|
-
export { Skeleton, } from "./prospect-client/Skeleton/
|
|
66
|
+
export { Skeleton, skeletonSizeVariants, skeletonVariants, } from "./prospect-client/Skeleton/Skeleton";
|
|
67
|
+
export { SkeletonGrid, } from "./prospect-client/SkeletonGrid/SkeletonGrid";
|
|
69
68
|
export { SkeletonList, } from "./prospect-client/SkeletonList/SkeletonListLF";
|
|
70
69
|
export { Spinner, spinnerVariants, } from "./prospect-client/Spinner/SpinnerLF";
|
|
71
70
|
export { Stepper } from "./prospect-client/Stepper/StepperLF";
|
|
@@ -73,7 +72,9 @@ export { Svg } from "./prospect-client/Svg/Svg";
|
|
|
73
72
|
export { TabBar, tabBarDirection, } from "./prospect-client/TabBar/TabBarLF";
|
|
74
73
|
export { Table, } from "./prospect-client/Table/TableLF";
|
|
75
74
|
export { TableMobileCard, } from "./prospect-client/TableMobileCard/TableMobileCard";
|
|
75
|
+
export { TabMenu } from "./prospect-client/TabMenu/TabMenu";
|
|
76
76
|
export { Tag, tagVariants, } from "./prospect-client/Tag/TagLF";
|
|
77
77
|
export { TagList, } from "./prospect-client/TagList/TagListLF";
|
|
78
78
|
export { TimelineVertical } from "./prospect-client/TimelineVertical/TimelineVerticalLF";
|
|
79
79
|
export { Toggle } from "./prospect-client/Toggle/ToggleLF";
|
|
80
|
+
export { MessageBar, } from "./prospect-client/MessageBar/MessageBarLF";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import "@axa-fr/canopee-css/distributeur/MultiActionsButton/MultiActionsButton.css";
|
|
2
|
+
import { type ComponentPropsWithoutRef, type ReactNode } from "react";
|
|
3
|
+
export type ButtonMultiActionsProps = {
|
|
4
|
+
label?: string;
|
|
5
|
+
menuLabel?: string;
|
|
6
|
+
align?: "auto" | "left" | "right";
|
|
7
|
+
} & Omit<ComponentPropsWithoutRef<"button">, "children"> & {
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
};
|
|
10
|
+
export declare const ButtonMultiActions: ({ label, menuLabel, align, className, id, onClick, onKeyDown, onMouseDown, children, ...buttonProps }: ButtonMultiActionsProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import "@axa-fr/canopee-css/distributeur/MultiActionsButton/MultiActionsButton.css";
|
|
3
|
+
import chevronDown from "@material-symbols/svg-400/outlined/keyboard_arrow_down.svg";
|
|
4
|
+
import { useId, useRef, } from "react";
|
|
5
|
+
import { Button } from "../Button/Button";
|
|
6
|
+
import { Svg } from "../Svg";
|
|
7
|
+
import { getClassName } from "../utilities/helpers/getClassName";
|
|
8
|
+
export const ButtonMultiActions = ({ label = "Actions", menuLabel = "Actions supplémentaires", align = "auto", className, id, onClick, onKeyDown, onMouseDown, children, ...buttonProps }) => {
|
|
9
|
+
const generatedId = useId();
|
|
10
|
+
const menuId = `${id ?? `af-button-multi-actions-${generatedId}`}-menu`;
|
|
11
|
+
const containerRef = useRef(null);
|
|
12
|
+
const menuRef = useRef(null);
|
|
13
|
+
const triggerRef = useRef(null);
|
|
14
|
+
const handleMenuToggle = (event) => {
|
|
15
|
+
const isOpen = event.newState === "open";
|
|
16
|
+
triggerRef.current?.setAttribute("aria-expanded", String(isOpen));
|
|
17
|
+
if (!isOpen) {
|
|
18
|
+
triggerRef.current?.focus();
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
// Open the menu and focus its first item when navigating with ArrowDown
|
|
22
|
+
const handleTriggerKeyDown = (event) => {
|
|
23
|
+
onKeyDown?.(event);
|
|
24
|
+
if (event.defaultPrevented || menuRef.current?.matches(":popover-open"))
|
|
25
|
+
return;
|
|
26
|
+
if (event.key === "ArrowDown") {
|
|
27
|
+
event.preventDefault();
|
|
28
|
+
menuRef.current?.showPopover();
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
// Close the menu once an action inside it has been activated
|
|
32
|
+
const handleMenuClick = (event) => {
|
|
33
|
+
if (event.target !== event.currentTarget) {
|
|
34
|
+
menuRef.current?.hidePopover();
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
// Close the menu when the user presses Escape, returning focus to the trigger
|
|
38
|
+
const handleMenuKeyDown = (event) => {
|
|
39
|
+
if (event.key === "Escape" || event.key === "Esc") {
|
|
40
|
+
event.preventDefault();
|
|
41
|
+
menuRef.current?.hidePopover();
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
return (_jsxs("div", { className: "af-button-multi-actions", ref: containerRef, children: [_jsx(Button, { ref: triggerRef, variant: "ghost", className: getClassName({
|
|
45
|
+
baseClassName: "af-button-multi-actions__trigger",
|
|
46
|
+
modifiers: [align],
|
|
47
|
+
className,
|
|
48
|
+
}), "aria-haspopup": "menu", "aria-controls": menuId, "aria-expanded": "false", onClick: onClick, onKeyDown: handleTriggerKeyDown, onMouseDown: onMouseDown, ...buttonProps, popoverTarget: menuId, rightIcon: _jsx(Svg, { src: chevronDown, alt: "", "aria-hidden": "true", className: getClassName({
|
|
49
|
+
baseClassName: "af-button-multi-actions__icon",
|
|
50
|
+
}) }), children: label }), _jsx("div", { popover: "auto", id: menuId, role: "menu", "aria-label": menuLabel, tabIndex: -1, className: "af-button-multi-actions__menu", ref: menuRef, onToggle: handleMenuToggle, onKeyDown: handleMenuKeyDown, onClick: handleMenuClick, children: children })] }));
|
|
51
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ButtonMultiActions } from "./ButtonMultiActions";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ButtonHTMLAttributes, LabelHTMLAttributes } from "react";
|
|
2
|
+
import "@axa-fr/canopee-css/distributeur/Card/BaseCard.css";
|
|
3
|
+
type BaseCardOwnProps = {
|
|
4
|
+
orientation?: "horizontal" | "vertical";
|
|
5
|
+
};
|
|
6
|
+
type BaseCardButtonProps = BaseCardOwnProps & ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
7
|
+
component?: "button";
|
|
8
|
+
};
|
|
9
|
+
type BaseCardLabelProps = BaseCardOwnProps & LabelHTMLAttributes<HTMLLabelElement> & {
|
|
10
|
+
component: "label";
|
|
11
|
+
};
|
|
12
|
+
export type BaseCardProps = BaseCardButtonProps | BaseCardLabelProps;
|
|
13
|
+
export declare const BaseCard: (props: BaseCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { getClassName } from "../utilities/helpers/getClassName";
|
|
3
|
+
import "@axa-fr/canopee-css/distributeur/Card/BaseCard.css";
|
|
4
|
+
const isLabelCard = (props) => props.component === "label";
|
|
5
|
+
function stripCardInternalProps(props) {
|
|
6
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
7
|
+
const { component, className, children, orientation, ...rest } = props;
|
|
8
|
+
return rest;
|
|
9
|
+
}
|
|
10
|
+
export const BaseCard = (props) => {
|
|
11
|
+
const { className, children, orientation } = props;
|
|
12
|
+
const finalClassName = getClassName({
|
|
13
|
+
baseClassName: "af-basecard",
|
|
14
|
+
modifiers: [orientation],
|
|
15
|
+
className,
|
|
16
|
+
});
|
|
17
|
+
if (isLabelCard(props)) {
|
|
18
|
+
const labelProps = stripCardInternalProps(props);
|
|
19
|
+
return (_jsx("label", { className: finalClassName, ...labelProps, children: children }));
|
|
20
|
+
}
|
|
21
|
+
const { type, ...buttonProps } = stripCardInternalProps(props);
|
|
22
|
+
return (_jsx("button", { type: type === "submit" ? "submit" : "button", className: finalClassName, ...buttonProps, children: children }));
|
|
23
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import { type BaseCardProps } from "../Card/BaseCard";
|
|
3
|
+
import "@axa-fr/canopee-css/distributeur/CardButton/CardButton.css";
|
|
4
|
+
type CardButtonOwnProps = {
|
|
5
|
+
className?: string;
|
|
6
|
+
children?: ReactNode;
|
|
7
|
+
icon?: ReactNode;
|
|
8
|
+
orientation?: "horizontal" | "vertical";
|
|
9
|
+
};
|
|
10
|
+
type CardButtonAsButtonProps = CardButtonOwnProps & Omit<Extract<BaseCardProps, {
|
|
11
|
+
component?: "button";
|
|
12
|
+
}>, "className" | "children">;
|
|
13
|
+
type CardButtonAsLabelProps = CardButtonOwnProps & Omit<Extract<BaseCardProps, {
|
|
14
|
+
component: "label";
|
|
15
|
+
}>, "className" | "children">;
|
|
16
|
+
export type CardButtonProps = CardButtonAsButtonProps | CardButtonAsLabelProps;
|
|
17
|
+
export declare const CardButton: ({ className, children, icon, orientation, ...props }: CardButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { BaseCard } from "../Card/BaseCard";
|
|
3
|
+
import "@axa-fr/canopee-css/distributeur/CardButton/CardButton.css";
|
|
4
|
+
import { getClassName } from "../utilities/helpers/getClassName";
|
|
5
|
+
export const CardButton = ({ className, children = "Card Button", icon = null, orientation = "horizontal", ...props }) => {
|
|
6
|
+
const finalClassName = getClassName({
|
|
7
|
+
baseClassName: "af-card-button",
|
|
8
|
+
className,
|
|
9
|
+
modifiers: [orientation],
|
|
10
|
+
});
|
|
11
|
+
return (_jsxs(BaseCard, { className: finalClassName, ...props, children: [icon, children] }));
|
|
12
|
+
};
|
|
@@ -3,6 +3,9 @@ import type { PropsWithChildren } from "react";
|
|
|
3
3
|
type InputContainerProps = PropsWithChildren<{
|
|
4
4
|
vertical?: boolean;
|
|
5
5
|
className?: string;
|
|
6
|
+
component?: "div" | "fieldset";
|
|
7
|
+
"aria-labelledby"?: string;
|
|
8
|
+
"aria-describedby"?: string;
|
|
6
9
|
}>;
|
|
7
|
-
export declare const InputContainer: ({ children, vertical, className, }: InputContainerProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare const InputContainer: ({ children, vertical, className, component: Component, ...props }: InputContainerProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
11
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import "@axa-fr/canopee-css/distributeur/Form/Experimental/InputContainer.css";
|
|
3
3
|
import classNames from "classnames";
|
|
4
|
-
export const InputContainer = ({ children, vertical, className, }) => {
|
|
4
|
+
export const InputContainer = ({ children, vertical, className, component: Component = "div", ...props }) => {
|
|
5
5
|
const containerClass = classNames("af-input__container", { "af-input__container--vertical": vertical }, className);
|
|
6
|
-
return _jsx(
|
|
6
|
+
return (_jsx(Component, { className: containerClass, ...props, children: children }));
|
|
7
7
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import "@axa-fr/canopee-css/distributeur/Form/Experimental/InputUnit.css";
|
|
2
2
|
import type { PropsWithChildren } from "react";
|
|
3
|
-
export declare const InputUnit: ({ children }: PropsWithChildren) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare const InputUnit: ({ children }: PropsWithChildren) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import "@axa-fr/canopee-css/distributeur/Form/Experimental/InputUnit.css";
|
|
3
|
-
export const InputUnit = ({ children }) =>
|
|
3
|
+
export const InputUnit = ({ children }) => children ? _jsx("span", { className: "af-input__unit", children: children }) : null;
|
|
@@ -24,5 +24,5 @@ type Props = {
|
|
|
24
24
|
*/
|
|
25
25
|
id?: string;
|
|
26
26
|
};
|
|
27
|
-
export declare const ItemMessage: ({ variant, children, className, id }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
export declare const ItemMessage: ({ variant, children, className, id }: Props) => import("react/jsx-runtime").JSX.Element | null;
|
|
28
28
|
export {};
|
|
@@ -15,5 +15,5 @@ export const ItemMessage = ({ variant, children, className, id }) => {
|
|
|
15
15
|
modifiers: [variant],
|
|
16
16
|
});
|
|
17
17
|
const icon = variant ? iconByVariant[variant] : null;
|
|
18
|
-
return (_jsxs("div", { className: componentClassName, id: id, children: [icon ? _jsx(Svg, { src: icon, className: "af-item-message__icon" }) : null, children] }));
|
|
18
|
+
return children ? (_jsxs("div", { className: componentClassName, id: id, children: [icon ? _jsx(Svg, { src: icon, className: "af-item-message__icon" }) : null, children] })) : null;
|
|
19
19
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "@axa-fr/canopee-css/distributeur/Form/Experimental/Label.css";
|
|
2
2
|
import type { ComponentProps } from "react";
|
|
3
|
-
type LabelProps = ComponentProps<"label"> & {
|
|
3
|
+
export type LabelProps = ComponentProps<"label"> & {
|
|
4
4
|
/**
|
|
5
5
|
* Whether the label is required or not.
|
|
6
6
|
* This will add a `*` after the label text.
|
|
@@ -10,4 +10,3 @@ type LabelProps = ComponentProps<"label"> & {
|
|
|
10
10
|
required?: boolean;
|
|
11
11
|
};
|
|
12
12
|
export declare const Label: ({ children, required, ...props }: LabelProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
-
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import "@axa-fr/canopee-css/distributeur/Form/Experimental/Label.css";
|
|
2
|
+
import type { ComponentProps } from "react";
|
|
3
|
+
export type LegendProps = ComponentProps<"span"> & {
|
|
4
|
+
/**
|
|
5
|
+
* Whether the label is required or not.
|
|
6
|
+
* This will add a `*` after the label text.
|
|
7
|
+
* This is purely presentational and does not enforce any validation logic.
|
|
8
|
+
* @default false
|
|
9
|
+
*/
|
|
10
|
+
required?: boolean;
|
|
11
|
+
};
|
|
12
|
+
export declare const Legend: ({ children, required, ...props }: LegendProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import "@axa-fr/canopee-css/distributeur/Form/Experimental/Label.css";
|
|
3
|
+
export const Legend = ({ children, required = false, ...props }) => (_jsxs("span", { className: "af-label", ...props, children: [children, required ? (_jsx("span", { className: "af-label__required", "aria-hidden": true, children: "*" })) : null] }));
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import "@axa-fr/canopee-css/distributeur/Form/Experimental/Radio.css";
|
|
2
|
+
import "@axa-fr/canopee-css/distributeur/Form/Experimental/Radio/AddRadioCard.css";
|
|
3
|
+
export type AddRadioCardProps = {
|
|
4
|
+
orientation?: "horizontal" | "vertical";
|
|
5
|
+
onClick?: () => void;
|
|
6
|
+
};
|
|
7
|
+
export declare const AddRadioCard: ({ orientation, onClick, }: AddRadioCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import "@axa-fr/canopee-css/distributeur/Form/Experimental/Radio.css";
|
|
3
|
+
import "@axa-fr/canopee-css/distributeur/Form/Experimental/Radio/AddRadioCard.css";
|
|
4
|
+
import AddIcon from "@material-symbols/svg-400/rounded/add_circle-fill.svg";
|
|
5
|
+
import { CardButton } from "../../../CardButton/CardButton";
|
|
6
|
+
import { Svg } from "../../../Svg";
|
|
7
|
+
import { getClassName } from "../../../utilities/helpers/getClassName";
|
|
8
|
+
export const AddRadioCard = ({ orientation = "horizontal", onClick, }) => {
|
|
9
|
+
const addRadioCardClassName = getClassName({
|
|
10
|
+
baseClassName: "af-radio-add-card",
|
|
11
|
+
modifiers: [orientation],
|
|
12
|
+
});
|
|
13
|
+
return (_jsx(CardButton, { className: addRadioCardClassName, onClick: onClick, icon: _jsx(Svg, { src: AddIcon, "aria-hidden": "true", className: "af-basecard__icon" }), orientation: orientation, children: _jsx("span", { className: "af-radiocard__label", children: "Ajouter" }) }));
|
|
14
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import "@axa-fr/canopee-css/distributeur/Form/Experimental/Radio.css";
|
|
2
|
+
import type { ChangeEvent, InputHTMLAttributes } from "react";
|
|
3
|
+
export type RadioButtonProps = {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
value: string;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
checked?: boolean;
|
|
9
|
+
onChange?: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
10
|
+
label: string;
|
|
11
|
+
className?: string;
|
|
12
|
+
} & InputHTMLAttributes<HTMLInputElement>;
|
|
13
|
+
export declare const RadioButton: ({ id, name, label, onChange, ...props }: RadioButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import "@axa-fr/canopee-css/distributeur/Form/Experimental/Radio.css";
|
|
3
|
+
export const RadioButton = ({ id, name, label, onChange, ...props }) => (_jsxs("label", { className: "af-radio__button", htmlFor: id, children: [label, _jsx("input", { type: "radio", id: id, name: name, onChange: onChange, ...props })] }));
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import { type RadioItemProps } from "./RadioItem";
|
|
3
|
+
export type RadioCardProps = {
|
|
4
|
+
label?: string;
|
|
5
|
+
icon?: ReactNode;
|
|
6
|
+
action?: ReactNode;
|
|
7
|
+
orientation?: "horizontal" | "vertical";
|
|
8
|
+
name: string;
|
|
9
|
+
} & RadioItemProps;
|
|
10
|
+
export declare const RadioCard: ({ id, icon, label, action, orientation, ...props }: RadioCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import {} from "react";
|
|
3
|
+
import { CardButton } from "../../../CardButton/CardButton";
|
|
4
|
+
import { Svg } from "../../../Svg";
|
|
5
|
+
import { RadioItem } from "./RadioItem";
|
|
6
|
+
import { getClassName } from "../../../utilities/helpers/getClassName";
|
|
7
|
+
export const RadioCard = ({ id, icon, label, action, orientation = "horizontal", ...props }) => {
|
|
8
|
+
const radioCardClassName = getClassName({
|
|
9
|
+
baseClassName: "af-radiocard",
|
|
10
|
+
modifiers: [orientation],
|
|
11
|
+
});
|
|
12
|
+
return (_jsxs("div", { className: radioCardClassName, children: [_jsxs(CardButton, { component: "label", htmlFor: id, className: "af-radio__card", orientation: orientation, children: [_jsx(RadioItem, { id: id, ...props }), typeof icon === "string" ? (_jsx(Svg, { className: "af-basecard__icon", src: icon })) : (icon), _jsx("span", { className: "af-radiocard__label", children: label })] }), action ? _jsx("span", { className: "af-radiocard__action", children: action }) : null] }));
|
|
13
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
export type RadioGroupProps = {
|
|
3
|
+
className?: string;
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
orientation?: "horizontal" | "vertical";
|
|
6
|
+
variant?: "button" | "card";
|
|
7
|
+
};
|
|
8
|
+
export declare const RadioGroup: ({ children, orientation, variant, className, }: RadioGroupProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { getClassName } from "../../../utilities/helpers/getClassName";
|
|
3
|
+
export const RadioGroup = ({ children, orientation = "horizontal", variant = "button", className, }) => {
|
|
4
|
+
const finalClassName = getClassName({
|
|
5
|
+
baseClassName: "af-radio__group",
|
|
6
|
+
modifiers: [orientation, variant],
|
|
7
|
+
className,
|
|
8
|
+
});
|
|
9
|
+
return _jsx("div", { className: finalClassName, children: children });
|
|
10
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { InputBaseProps } from "../types";
|
|
3
|
+
import { type RadioButtonProps } from "./RadioButton";
|
|
4
|
+
import { type RadioCardProps } from "./RadioCard";
|
|
5
|
+
export type RadioInputPropsButtonVariant = InputBaseProps & {
|
|
6
|
+
variant?: "button";
|
|
7
|
+
options: RadioButtonProps[];
|
|
8
|
+
children?: ReactNode;
|
|
9
|
+
};
|
|
10
|
+
export type RadioInputPropsCardVariant = InputBaseProps & {
|
|
11
|
+
variant: "card";
|
|
12
|
+
showAddButton?: boolean;
|
|
13
|
+
orientation?: "horizontal" | "vertical";
|
|
14
|
+
onAdd: () => void;
|
|
15
|
+
options: RadioCardProps[];
|
|
16
|
+
};
|
|
17
|
+
export type RadioInputProps = RadioInputPropsCardVariant | RadioInputPropsButtonVariant;
|
|
18
|
+
export declare const RadioInput: ({ contentRight, id, labelPosition, inputClassName: inputClassNameProp, labelClassName: labelClassNameProp, helpMessage, containerClassName, required, label, errorMessage, ...props }: RadioInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { InputContainer } from "../InputContainer";
|
|
3
|
+
import { InputUnit } from "../InputUnit";
|
|
4
|
+
import { ItemMessage } from "../ItemMessage";
|
|
5
|
+
import { Legend } from "../Legend";
|
|
6
|
+
import { useInput } from "../useInput.hook";
|
|
7
|
+
import {} from "./RadioButton";
|
|
8
|
+
import {} from "./RadioCard";
|
|
9
|
+
import { RadioGroup } from "./RadioGroup";
|
|
10
|
+
import { RadioInputOptions } from "./_radioInputOptions";
|
|
11
|
+
function getLabelPosition(labelPosition, orientation) {
|
|
12
|
+
if (labelPosition) {
|
|
13
|
+
return labelPosition;
|
|
14
|
+
}
|
|
15
|
+
if (orientation === "vertical") {
|
|
16
|
+
return "topLeft";
|
|
17
|
+
}
|
|
18
|
+
return "centerLeft";
|
|
19
|
+
}
|
|
20
|
+
export const RadioInput = ({ contentRight, id, labelPosition, inputClassName: inputClassNameProp, labelClassName: labelClassNameProp, helpMessage, containerClassName, required, label, errorMessage, ...props }) => {
|
|
21
|
+
const variant = props.variant || "button";
|
|
22
|
+
const { describedBy, errorId, helperId, inputId, isContainerVertical, isInvalid, labelClassName, } = useInput({
|
|
23
|
+
id,
|
|
24
|
+
labelPosition: getLabelPosition(labelPosition, props.variant === "card" ? props.orientation : undefined),
|
|
25
|
+
inputClassName: inputClassNameProp,
|
|
26
|
+
labelClassName: labelClassNameProp,
|
|
27
|
+
errorMessage,
|
|
28
|
+
helpMessage,
|
|
29
|
+
});
|
|
30
|
+
const labelId = `${inputId}-label`;
|
|
31
|
+
return (_jsxs(InputContainer, { vertical: isContainerVertical, className: `${containerClassName} af-radio__input-container`, component: "fieldset", "aria-labelledby": labelId, "aria-describedby": describedBy, children: [_jsx(Legend, { id: labelId, required: required, className: labelClassName, children: label }), _jsx(RadioGroup, { variant: variant, className: inputClassNameProp, orientation: props.variant === "card"
|
|
32
|
+
? props.orientation || "horizontal"
|
|
33
|
+
: undefined, children: _jsx(RadioInputOptions, { inputId: inputId, isInvalid: isInvalid, describedBy: describedBy, ...props }) }), _jsx(InputUnit, { children: contentRight }), _jsx(ItemMessage, { id: helperId, children: helpMessage }), _jsx(ItemMessage, { variant: "error", id: errorId, children: errorMessage })] }));
|
|
34
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import "@axa-fr/canopee-css/distributeur/Form/Experimental/Radio.css";
|
|
2
|
+
import type { InputHTMLAttributes } from "react";
|
|
3
|
+
export type RadioItemProps = InputHTMLAttributes<HTMLInputElement>;
|
|
4
|
+
export declare const RadioItem: ({ className, ...props }: RadioItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import "@axa-fr/canopee-css/distributeur/Form/Experimental/Radio.css";
|
|
3
|
+
import { getClassName } from "../../../utilities/helpers/getClassName";
|
|
4
|
+
export const RadioItem = ({ className, ...props }) => {
|
|
5
|
+
const finalClassName = getClassName({
|
|
6
|
+
baseClassName: "af-radio__item",
|
|
7
|
+
className,
|
|
8
|
+
});
|
|
9
|
+
return _jsx("input", { type: "radio", className: finalClassName, ...props });
|
|
10
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import { type RadioItemProps } from "./RadioItem";
|
|
3
|
+
export type RadioTextProps = {
|
|
4
|
+
label: ReactNode;
|
|
5
|
+
} & RadioItemProps;
|
|
6
|
+
export declare const RadioText: ({ id, label, ...props }: RadioTextProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { RadioItem } from "./RadioItem";
|
|
3
|
+
export const RadioText = ({ id, label, ...props }) => (_jsxs("label", { htmlFor: id, className: "af-radio__text", children: [_jsx(RadioItem, { id: id, ...props }), _jsx("span", { className: "af-radio__label", children: label })] }));
|