@axa-fr/design-system-look-and-feel-react 0.2.0-beta.339 → 0.2.0-beta.347

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.
Files changed (99) hide show
  1. package/package.json +21 -17
  2. package/dist/Accordion/Accordion.stories.d.ts +0 -7
  3. package/dist/Accordion/Accordion.stories.js +0 -40
  4. package/dist/Accordion/__tests__/Accordion.test.d.ts +0 -1
  5. package/dist/Accordion/__tests__/Accordion.test.js +0 -50
  6. package/dist/Accordion/__tests__/AccordionTagDateContainer.test.d.ts +0 -1
  7. package/dist/Accordion/__tests__/AccordionTagDateContainer.test.js +0 -23
  8. package/dist/AccordionCore/AccordionCore.stories.d.ts +0 -8
  9. package/dist/AccordionCore/AccordionCore.stories.js +0 -41
  10. package/dist/AccordionCore/__tests__/AccordionCore.test.d.ts +0 -1
  11. package/dist/AccordionCore/__tests__/AccordionCore.test.js +0 -47
  12. package/dist/Alert/Alert.stories.d.ts +0 -6
  13. package/dist/Alert/Alert.stories.js +0 -37
  14. package/dist/Alert/__tests__/Alert.test.d.ts +0 -1
  15. package/dist/Alert/__tests__/Alert.test.js +0 -33
  16. package/dist/Button/Button.stories.d.ts +0 -22
  17. package/dist/Button/Button.stories.js +0 -99
  18. package/dist/Card/Card.stories.d.ts +0 -6
  19. package/dist/Card/Card.stories.js +0 -40
  20. package/dist/Card/__tests__/Card.test.d.ts +0 -1
  21. package/dist/Card/__tests__/Card.test.js +0 -27
  22. package/dist/Form/Checkbox/Checkbox.stories.d.ts +0 -6
  23. package/dist/Form/Checkbox/Checkbox.stories.js +0 -38
  24. package/dist/Form/Checkbox/CheckboxSelect.stories.d.ts +0 -6
  25. package/dist/Form/Checkbox/CheckboxSelect.stories.js +0 -55
  26. package/dist/Form/FileUpload/FIleUpload.stories.d.ts +0 -6
  27. package/dist/Form/FileUpload/FIleUpload.stories.js +0 -54
  28. package/dist/Form/InputError/InputError.stories.d.ts +0 -5
  29. package/dist/Form/InputError/InputError.stories.js +0 -12
  30. package/dist/Form/Radio/Radio.stories.d.ts +0 -6
  31. package/dist/Form/Radio/Radio.stories.js +0 -38
  32. package/dist/Form/Radio/RadioSelect.stories.d.ts +0 -8
  33. package/dist/Form/Radio/RadioSelect.stories.js +0 -112
  34. package/dist/Form/Select/Select.stories.d.ts +0 -10
  35. package/dist/Form/Select/Select.stories.js +0 -31
  36. package/dist/Form/Text/Text.stories.d.ts +0 -9
  37. package/dist/Form/Text/Text.stories.js +0 -51
  38. package/dist/IconBg/IconBg.stories.d.ts +0 -5
  39. package/dist/IconBg/IconBg.stories.js +0 -23
  40. package/dist/IconBg/__tests__/IconBg.test.d.ts +0 -1
  41. package/dist/IconBg/__tests__/IconBg.test.js +0 -22
  42. package/dist/Layout/Footer/Footer.stories.d.ts +0 -14
  43. package/dist/Layout/Footer/Footer.stories.js +0 -48
  44. package/dist/Layout/Header/Header.stories.d.ts +0 -10
  45. package/dist/Layout/Header/Header.stories.js +0 -52
  46. package/dist/Layout/Header/NavBar/NavBar.stories.d.ts +0 -8
  47. package/dist/Layout/Header/NavBar/NavBar.stories.js +0 -17
  48. package/dist/Layout/Header/PreviousLink/PreviousLink.stories.d.ts +0 -8
  49. package/dist/Layout/Header/PreviousLink/PreviousLink.stories.js +0 -16
  50. package/dist/Link/Link.stories.d.ts +0 -5
  51. package/dist/Link/Link.stories.js +0 -14
  52. package/dist/List/ClickList/ClickItem/__tests__/ClickItem.test.d.ts +0 -1
  53. package/dist/List/ClickList/ClickItem/__tests__/ClickItem.test.js +0 -62
  54. package/dist/List/ClickList/ClickList.stories.d.ts +0 -7
  55. package/dist/List/ClickList/ClickList.stories.js +0 -103
  56. package/dist/List/ClickList/__tests__/ClickList.client.test.d.ts +0 -1
  57. package/dist/List/ClickList/__tests__/ClickList.client.test.js +0 -18
  58. package/dist/List/ContentItemDuo/ContentItemDuo.stories.d.ts +0 -28
  59. package/dist/List/ContentItemDuo/ContentItemDuo.stories.js +0 -86
  60. package/dist/List/ContentItemDuo/__tests__/ContentItemDuo.test.d.ts +0 -1
  61. package/dist/List/ContentItemDuo/__tests__/ContentItemDuo.test.js +0 -40
  62. package/dist/List/ContentItemMono/ContentItemMono.stories.d.ts +0 -16
  63. package/dist/List/ContentItemMono/ContentItemMono.stories.js +0 -99
  64. package/dist/List/ContentItemMono/__tests__/ContentItemMono.test.d.ts +0 -1
  65. package/dist/List/ContentItemMono/__tests__/ContentItemMono.test.js +0 -45
  66. package/dist/List/ContentTabList/ContentTabItem/__tests__/ContentTabItem.test.d.ts +0 -1
  67. package/dist/List/ContentTabList/ContentTabItem/__tests__/ContentTabItem.test.js +0 -100
  68. package/dist/List/ContentTabList/ContentTabList.stories.d.ts +0 -7
  69. package/dist/List/ContentTabList/ContentTabList.stories.js +0 -78
  70. package/dist/List/ContentTabList/__tests__/ContentTabList.test.d.ts +0 -1
  71. package/dist/List/ContentTabList/__tests__/ContentTabList.test.js +0 -57
  72. package/dist/List/List.stories.d.ts +0 -8
  73. package/dist/List/List.stories.js +0 -31
  74. package/dist/List/__tests__/List.test.d.ts +0 -1
  75. package/dist/List/__tests__/List.test.js +0 -30
  76. package/dist/Loader/Loader.stories.d.ts +0 -6
  77. package/dist/Loader/Loader.stories.js +0 -15
  78. package/dist/ModalClient/Modal.stories.d.ts +0 -7
  79. package/dist/ModalClient/Modal.stories.js +0 -37
  80. package/dist/Pagination/Pagination.stories.d.ts +0 -11
  81. package/dist/Pagination/Pagination.stories.js +0 -19
  82. package/dist/Stepper/Stepper.stories.d.ts +0 -16
  83. package/dist/Stepper/Stepper.stories.js +0 -23
  84. package/dist/Svg/Svg.stories.d.ts +0 -7
  85. package/dist/Svg/Svg.stories.js +0 -40
  86. package/dist/Svg/__tests__/Svg.test.d.ts +0 -1
  87. package/dist/Svg/__tests__/Svg.test.js +0 -38
  88. package/dist/Tabs/Tabs.stories.d.ts +0 -17
  89. package/dist/Tabs/Tabs.stories.js +0 -89
  90. package/dist/Tag/Tag.stories.d.ts +0 -5
  91. package/dist/Tag/Tag.stories.js +0 -22
  92. package/dist/Tag/__test__/Tag.test.d.ts +0 -1
  93. package/dist/Tag/__test__/Tag.test.js +0 -18
  94. package/dist/Title/Title.stories.d.ts +0 -6
  95. package/dist/Title/Title.stories.js +0 -45
  96. package/dist/Title/__tests__/Title.test.d.ts +0 -1
  97. package/dist/Title/__tests__/Title.test.js +0 -28
  98. package/dist/Title/__tests__/TitleWithSubtitles.test.d.ts +0 -1
  99. package/dist/Title/__tests__/TitleWithSubtitles.test.js +0 -14
@@ -1,38 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { Checkbox } from "./Checkbox";
3
- const meta = {
4
- title: "Components/Form/Input/Checkbox",
5
- component: Checkbox,
6
- argTypes: {},
7
- };
8
- export default meta;
9
- export const CheckboxStory = {
10
- name: "Basic",
11
- render: ({ ...args }) => _jsx(Checkbox, { ...args }),
12
- args: {
13
- label: "J'accepte de fournir à AXA mes coordonnées ainsi que les données relatives à mon projet et ma situation. Ces dernières seront transmises à mon conseiller AXA qui pourra me contacter pour m'accompagner.",
14
- name: "option1",
15
- value: "option1",
16
- },
17
- argTypes: {
18
- label: {
19
- control: { type: "text" },
20
- },
21
- name: {
22
- control: { type: "text" },
23
- },
24
- value: {
25
- control: { type: "text" },
26
- },
27
- errorMessage: {
28
- control: { type: "text" },
29
- },
30
- disabled: {
31
- control: { type: "boolean" },
32
- },
33
- checked: {
34
- control: { type: "boolean" },
35
- },
36
- onChange: { action: "onChange" },
37
- },
38
- };
@@ -1,6 +0,0 @@
1
- import { Meta, StoryObj } from "@storybook/react";
2
- import { ComponentProps } from "react";
3
- import { CheckboxSelect } from "./CheckboxSelect";
4
- declare const meta: Meta;
5
- export default meta;
6
- export declare const CheckboxSelectStory: StoryObj<ComponentProps<typeof CheckboxSelect>>;
@@ -1,55 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import home from "@material-symbols/svg-400/outlined/home.svg";
3
- import { Svg } from "../../Svg";
4
- import { CheckboxSelect } from "./CheckboxSelect";
5
- const meta = {
6
- title: "Components/Form/Input/Checkbox/Select",
7
- component: CheckboxSelect,
8
- argTypes: {},
9
- };
10
- export default meta;
11
- export const CheckboxSelectStory = {
12
- name: "Select",
13
- render: ({ ...args }) => _jsx(CheckboxSelect, { ...args }),
14
- args: {
15
- type: "vertical",
16
- options: [
17
- {
18
- label: "Paris",
19
- description: "Capitale de la France",
20
- subtitle: "Nord",
21
- name: "paris",
22
- value: "paris",
23
- icon: _jsx(Svg, { src: home }),
24
- },
25
- {
26
- label: "Bruxelles",
27
- description: "Capitale de la Belgique",
28
- name: "bruxelles",
29
- value: "bruxelles",
30
- icon: _jsx(Svg, { src: home }),
31
- },
32
- {
33
- label: "Lille",
34
- name: "lille",
35
- value: "lille",
36
- icon: _jsx(Svg, { src: home }),
37
- disabled: true,
38
- checked: true,
39
- },
40
- ],
41
- },
42
- argTypes: {
43
- type: {
44
- control: { type: "inline-radio" },
45
- options: ["vertical", "horizontal"],
46
- },
47
- options: {
48
- control: { type: "object" },
49
- },
50
- errorMessage: {
51
- control: { type: "text" },
52
- },
53
- onChange: { action: "onChange" },
54
- },
55
- };
@@ -1,6 +0,0 @@
1
- import type { Meta, StoryObj } from "@storybook/react";
2
- import { FileUpload } from "./FileUpload";
3
- declare const meta: Meta<typeof Text>;
4
- export default meta;
5
- type Story = StoryObj<typeof FileUpload>;
6
- export declare const FileUploadStory: Story;
@@ -1,54 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { FileUpload } from "./FileUpload";
3
- const meta = {
4
- title: "Components/Form/Input/FileUpload",
5
- };
6
- export default meta;
7
- export const FileUploadStory = {
8
- name: "FileUpload",
9
- render: ({ onChange, onView, onDelete, ...args }) => (_jsx(FileUpload, { onChange: onChange, onView: onView, onDelete: onDelete, ...args })),
10
- args: {
11
- id: "file-input",
12
- className: "",
13
- label: "Label",
14
- files: [
15
- {
16
- id: "1",
17
- name: " IMG_8904587880.jpg",
18
- size: 109936,
19
- isLoading: false,
20
- },
21
- {
22
- id: "2",
23
- name: " IMG_465510680.jpg",
24
- size: 5010,
25
- isLoading: true,
26
- },
27
- {
28
- id: "3",
29
- name: " IMG_8904587880.jpg",
30
- size: 23000000,
31
- isLoading: true,
32
- },
33
- ],
34
- globalError: "Erreur",
35
- errors: [
36
- {
37
- id: "3",
38
- message: "Votre fichier fait plus de 19 Mo.",
39
- },
40
- ],
41
- accept: "image/jpeg, image/png, application/*",
42
- buttonLabel: "Importer fichier",
43
- instructions: "2 fichiers max. / pdf, png, jpg, jpeg, gif / 19 Mo par fichier",
44
- dropzoneDescription: "Glissez/déposez vos fichiers",
45
- required: false,
46
- isMobile: false,
47
- multiple: false,
48
- },
49
- argTypes: {
50
- onChange: { action: "onChange" },
51
- onView: { action: "onView" },
52
- onDelete: { action: "onDelete" },
53
- },
54
- };
@@ -1,5 +0,0 @@
1
- import { Meta, StoryObj } from "@storybook/react";
2
- import { InputError } from "./InputError";
3
- declare const meta: Meta<typeof InputError>;
4
- export default meta;
5
- export declare const Default: StoryObj<typeof InputError>;
@@ -1,12 +0,0 @@
1
- import { InputError } from "./InputError";
2
- const meta = {
3
- title: "Components/Form/InputError",
4
- component: InputError,
5
- };
6
- export default meta;
7
- export const Default = {
8
- name: "Default",
9
- args: {
10
- message: "Error Message",
11
- },
12
- };
@@ -1,6 +0,0 @@
1
- import { Meta, StoryObj } from "@storybook/react";
2
- import { ComponentProps } from "react";
3
- import { Radio } from "./Radio";
4
- declare const meta: Meta;
5
- export default meta;
6
- export declare const RadioStory: StoryObj<ComponentProps<typeof Radio>>;
@@ -1,38 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { Radio } from "./Radio";
3
- const meta = {
4
- title: "Components/Form/Input/Radio",
5
- component: Radio,
6
- argTypes: {},
7
- };
8
- export default meta;
9
- export const RadioStory = {
10
- name: "Basic",
11
- render: ({ ...args }) => _jsx(Radio, { ...args }),
12
- args: {
13
- label: "J'accepte de fournir à AXA mes coordonnées ainsi que les données relatives à mon projet et ma situation. Ces dernières seront transmises à mon conseiller AXA qui pourra me contacter pour m'accompagner.",
14
- name: "option1",
15
- value: "option1",
16
- },
17
- argTypes: {
18
- label: {
19
- control: { type: "text" },
20
- },
21
- name: {
22
- control: { type: "text" },
23
- },
24
- value: {
25
- control: { type: "text" },
26
- },
27
- errorMessage: {
28
- control: { type: "text" },
29
- },
30
- disabled: {
31
- control: { type: "boolean" },
32
- },
33
- checked: {
34
- control: { type: "boolean" },
35
- },
36
- onChange: { action: "onChange" },
37
- },
38
- };
@@ -1,8 +0,0 @@
1
- import { Meta, StoryObj } from "@storybook/react";
2
- import { ComponentProps } from "react";
3
- import { RadioSelect } from "./RadioSelect";
4
- declare const meta: Meta;
5
- export default meta;
6
- export declare const RadioSelectStory: StoryObj<ComponentProps<typeof RadioSelect>>;
7
- export declare const RadioSelectDisabledStory: StoryObj<ComponentProps<typeof RadioSelect>>;
8
- export declare const RadioSelectWithLabel: StoryObj<ComponentProps<typeof RadioSelect>>;
@@ -1,112 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import home from "@material-symbols/svg-400/outlined/home.svg";
3
- import { Svg } from "../../Svg";
4
- import { RadioSelect } from "./RadioSelect";
5
- const meta = {
6
- title: "Components/Form/Input/Radio/Select",
7
- component: RadioSelect,
8
- argTypes: {},
9
- };
10
- export default meta;
11
- const storyOptions = [
12
- {
13
- label: "Paris",
14
- description: "Capitale de la France",
15
- subtitle: "Nord",
16
- value: "paris",
17
- icon: _jsx(Svg, { src: home }),
18
- },
19
- {
20
- label: "Bruxelles",
21
- description: "Capitale de la Belgique",
22
- value: "bruxelles",
23
- icon: _jsx(Svg, { src: home }),
24
- },
25
- {
26
- label: "Lille",
27
- value: "lille",
28
- icon: _jsx(Svg, { src: home }),
29
- },
30
- ];
31
- export const RadioSelectStory = {
32
- name: "Select",
33
- render: ({ ...args }) => _jsx(RadioSelect, { ...args }),
34
- args: {
35
- type: "vertical",
36
- "aria-label": "Quelle ville ?",
37
- name: "cities",
38
- options: storyOptions,
39
- },
40
- argTypes: {
41
- type: {
42
- control: { type: "inline-radio" },
43
- options: ["vertical", "horizontal"],
44
- },
45
- errorMessage: {
46
- control: { type: "text" },
47
- },
48
- onChange: { action: "onChange" },
49
- },
50
- };
51
- export const RadioSelectDisabledStory = {
52
- name: "SelectDisabled",
53
- render: ({ ...args }) => _jsx(RadioSelect, { ...args }),
54
- args: {
55
- type: "vertical",
56
- "aria-label": "Quelle ville ?",
57
- name: "cities",
58
- options: [
59
- {
60
- label: "Paris",
61
- description: "Capitale de la France",
62
- subtitle: "Nord",
63
- value: "paris",
64
- icon: _jsx(Svg, { src: home }),
65
- },
66
- {
67
- label: "Bruxelles",
68
- description: "Capitale de la Belgique",
69
- value: "bruxelles",
70
- icon: _jsx(Svg, { src: home }),
71
- },
72
- {
73
- label: "Lille",
74
- value: "lille",
75
- icon: _jsx(Svg, { src: home }),
76
- checked: true,
77
- },
78
- ],
79
- isDisabled: true,
80
- },
81
- argTypes: {
82
- type: {
83
- control: { type: "inline-radio" },
84
- options: ["vertical", "horizontal"],
85
- },
86
- errorMessage: {
87
- control: { type: "text" },
88
- },
89
- onChange: { action: "onChange" },
90
- },
91
- };
92
- export const RadioSelectWithLabel = {
93
- name: "SelectWithLabel",
94
- render: ({ ...args }) => _jsx(RadioSelect, { ...args }),
95
- args: {
96
- type: "vertical",
97
- label: "Quelle ville ?",
98
- isRequired: true,
99
- name: "cities",
100
- options: storyOptions,
101
- },
102
- argTypes: {
103
- type: {
104
- control: { type: "inline-radio" },
105
- options: ["vertical", "horizontal"],
106
- },
107
- errorMessage: {
108
- control: { type: "text" },
109
- },
110
- onChange: { action: "onChange" },
111
- },
112
- };
@@ -1,10 +0,0 @@
1
- import { Meta, StoryObj } from "@storybook/react";
2
- import { ComponentProps } from "react";
3
- import { Select } from "./Select";
4
- declare const meta: Meta<typeof Select>;
5
- export default meta;
6
- type StoryProps = ComponentProps<typeof Select>;
7
- type Story = StoryObj<StoryProps> & {
8
- required?: boolean;
9
- };
10
- export declare const SelectStory: Story;
@@ -1,31 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { Select } from "./Select";
3
- const options = [
4
- { value: "fun", label: "For fun" },
5
- { value: "work", label: "For work" },
6
- { value: "drink", label: "For drink" },
7
- ];
8
- const meta = {
9
- component: Select,
10
- title: "Components/Form/Input/Select",
11
- };
12
- export default meta;
13
- export const SelectStory = {
14
- name: "Select",
15
- tags: ["Form", "Input"],
16
- render: ({ onChange, ...args }) => (_jsx("div", { style: { width: 300 }, children: _jsx(Select, { onChange: onChange, ...args }) })),
17
- args: {
18
- className: "",
19
- options,
20
- label: "Label",
21
- id: "nameid",
22
- disabled: false,
23
- required: false,
24
- placeholder: "Placeholder",
25
- noOptionsMessage: "Pas d'option",
26
- errorLabel: "",
27
- },
28
- argTypes: {
29
- onChange: { action: "onChange" },
30
- },
31
- };
@@ -1,9 +0,0 @@
1
- import type { Meta, StoryObj } from "@storybook/react";
2
- import { Text } from "./Text";
3
- declare const meta: Meta<typeof Text>;
4
- export default meta;
5
- type Story = StoryObj<typeof Text>;
6
- export declare const TextStory: Story;
7
- export declare const TextWithDescriptionStory: Story;
8
- export declare const TextOnErrorStory: Story;
9
- export declare const TextWithButton: Story;
@@ -1,51 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { Text } from "./Text";
3
- const meta = {
4
- component: Text,
5
- title: "Components/Form/Input/Text",
6
- args: {
7
- value: "John Doe",
8
- label: "Label",
9
- placeholder: "¨Placeholder",
10
- helper: "Informations complémentaires",
11
- name: "name",
12
- id: "nameid",
13
- disabled: false,
14
- required: false,
15
- className: "",
16
- type: "text",
17
- buttonLabel: "",
18
- },
19
- argTypes: {
20
- onChange: { action: "onChange" },
21
- },
22
- };
23
- export default meta;
24
- const render = ({ onChange, ...args }) => (_jsx(Text, { onChange: onChange, ...args }));
25
- export const TextStory = {
26
- name: "Text",
27
- render,
28
- };
29
- export const TextWithDescriptionStory = {
30
- name: "Text with description",
31
- render,
32
- args: {
33
- description: "Description",
34
- },
35
- };
36
- export const TextOnErrorStory = {
37
- name: "Text on error",
38
- render,
39
- args: {
40
- classModifier: "error",
41
- description: "Description",
42
- error: "Error Message",
43
- },
44
- };
45
- export const TextWithButton = {
46
- name: "Text with button",
47
- render,
48
- args: {
49
- buttonLabel: "En savoir plus",
50
- },
51
- };
@@ -1,5 +0,0 @@
1
- import type { Meta, StoryObj } from "@storybook/react";
2
- import { IconBg } from ".";
3
- declare const meta: Meta<typeof IconBg>;
4
- export default meta;
5
- export declare const Default: StoryObj<typeof IconBg>;
@@ -1,23 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import article from "@material-symbols/svg-400/outlined/article-fill.svg";
3
- import { IconBg } from ".";
4
- import { Svg } from "../Svg";
5
- const meta = {
6
- title: "Components/IconBg",
7
- parameters: {
8
- backgrounds: {
9
- default: "dark",
10
- },
11
- },
12
- component: IconBg,
13
- };
14
- export default meta;
15
- export const Default = {
16
- name: "IconBg",
17
- render: (args) => _jsx(IconBg, { ...args }),
18
- args: {
19
- children: _jsx(Svg, { src: article }),
20
- isDisabled: false,
21
- classModifier: "secondary",
22
- },
23
- };
@@ -1 +0,0 @@
1
- export {};
@@ -1,22 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { render, screen } from "@testing-library/react";
3
- import { IconBg } from "..";
4
- describe("IconBg", () => {
5
- it("should render children", () => {
6
- render(_jsx(IconBg, { children: "An IconBg" }));
7
- const iconBg = screen.getByText("An IconBg");
8
- expect(iconBg).toHaveClass("af-icon-bg");
9
- });
10
- it("should have custom class", () => {
11
- render(_jsx(IconBg, { className: "custom-class", children: "An IconBg" }));
12
- expect(screen.getByText("An IconBg")).toHaveClass("custom-class");
13
- });
14
- it("should have custom class with modifier", () => {
15
- render(_jsx(IconBg, { className: "custom-class", classModifier: "modifier", children: "An IconBg" }));
16
- expect(screen.getByText("An IconBg")).toHaveClass("custom-class custom-class--modifier");
17
- });
18
- it("should be disabled", () => {
19
- render(_jsx(IconBg, { className: "custom-class", isDisabled: true, children: "An IconBg" }));
20
- expect(screen.getByText("An IconBg")).toHaveClass("custom-class custom-class--disabled");
21
- });
22
- });
@@ -1,14 +0,0 @@
1
- import type { Meta, StoryObj } from "@storybook/react";
2
- import { Footer } from "./Footer";
3
- import { SocialMedia } from "./MenuIcons";
4
- import { Link } from "./MenuLink";
5
- declare const meta: Meta<typeof Footer>;
6
- export default meta;
7
- type StoryProps = Omit<React.ComponentProps<typeof Footer>, "links" | "socialMedias" | "copyright" | "expandLinkText"> & {
8
- links: Link[];
9
- socialMedias?: SocialMedia[];
10
- copyright: string;
11
- expandLinkText: string;
12
- };
13
- type Story = StoryObj<StoryProps>;
14
- export declare const Playground: Story;
@@ -1,48 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { Footer } from "./Footer";
3
- const meta = {
4
- component: Footer,
5
- title: "Components/Footer",
6
- parameters: {
7
- layout: "centered",
8
- },
9
- };
10
- export default meta;
11
- export const Playground = {
12
- name: "Footer",
13
- render: ({ links, socialMedias, copyright, expandLinkText }) => (_jsx(Footer, { links: links, socialMedias: socialMedias, copyright: copyright, expandLinkText: expandLinkText })),
14
- args: {
15
- links: [
16
- {
17
- link: "https://www.axa.fr/qui-sommes-nous.html",
18
- text: "À propos",
19
- },
20
- {
21
- link: "https://www.axa.fr/configuration-securite/mentions-legales.html",
22
- text: "Mentions légales",
23
- },
24
- {
25
- link: "https://www.axa.fr/configuration-securite/donnees-personnelles.html",
26
- text: "Données personnelles",
27
- },
28
- {
29
- link: "https://www.axa.fr/configuration-securite/politique-cookies.html",
30
- text: "Cookies",
31
- },
32
- ],
33
- socialMedias: [
34
- { icon: "facebook", link: "https://www.facebook.com/axafrance" },
35
- { icon: "twitter", link: "https://twitter.com/AXAFrance" },
36
- {
37
- icon: "youtube",
38
- link: "https://www.youtube.com/user/AXAFranceChaine",
39
- },
40
- {
41
- icon: "linkedin",
42
- link: "https://www.linkedin.com/company/axa-france/",
43
- },
44
- ],
45
- expandLinkText: "Liens utiles",
46
- copyright: `@AXA ${new Date().getFullYear()} - Tous droits réservés`,
47
- },
48
- };
@@ -1,10 +0,0 @@
1
- import type { Meta, StoryObj } from "@storybook/react";
2
- import { Header } from "./Header";
3
- declare const meta: Meta<typeof Header>;
4
- export default meta;
5
- type Story = StoryObj<React.ComponentProps<typeof Header>>;
6
- export declare const Default: Story;
7
- export declare const HeaderWithNavBar: StoryObj<typeof Header>;
8
- export declare const HeaderWithNavBarAndRightItem: StoryObj<typeof Header>;
9
- export declare const HeaderWithLinksAndRightItemAndPreviousLink: StoryObj<typeof Header>;
10
- export declare const HeaderWithLinksAndRightItemAndPreviousLinkAndActiveLink: StoryObj<typeof Header>;
@@ -1,52 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import person from "@material-symbols/svg-400/outlined/person-fill.svg";
3
- import lock from "@material-symbols/svg-400/outlined/lock-fill.svg";
4
- import { Svg } from "../../Svg";
5
- import { Button, ButtonVariants } from "../..";
6
- import { Header } from "./Header";
7
- const meta = {
8
- component: Header,
9
- title: "Components/Header",
10
- };
11
- export default meta;
12
- export const Default = {
13
- name: "Header",
14
- render: () => _jsx(Header, {}),
15
- };
16
- export const HeaderWithNavBar = {
17
- name: "Header with navigation bar",
18
- render: () => (_jsxs(Header, { children: [_jsx("a", { className: "af-navbar-item__link", href: "/mes-contrats", target: "_", children: "MES CONTRATS" }, "MES CONTRATS link"), _jsx("a", { className: "af-navbar-item__link", href: "/mes-avantages", target: "_", children: "MES AVANTAGES" }, "MES AVANTAGES link"), _jsx("a", { className: "af-navbar-item__link", href: "/mes-documents", target: "_", children: "MES DOCUMENTS" }, "MES DOCUMENTS link")] })),
19
- };
20
- export const HeaderWithNavBarAndRightItem = {
21
- name: "Header with navigation bar and right item",
22
- render: ({ rightItem }) => (_jsxs(Header, { rightItem: rightItem, children: [_jsx("a", { className: "af-navbar-item__link", href: "/mes-contrats", children: "MES CONTRATS" }, "MES CONTRATS link"), _jsx("a", { className: "af-navbar-item__link", href: "/mes-avantages", children: "MES AVANTAGES" }, "MES AVANTAGES link"), _jsx("a", { className: "af-navbar-item__link", href: "/mes-documents", children: "MES DOCUMENTS" }, "MES DOCUMENTS link")] })),
23
- args: {
24
- rightItem: [
25
- _jsx(Button, { iconLeft: _jsx(Svg, { src: lock, fill: "#00008f" }), variant: ButtonVariants.secondary, children: "Espace Banque" }, "Banking Space Button"),
26
- _jsx(Button, { iconLeft: _jsx(Svg, { src: person, fill: "#00008f" }), variant: ButtonVariants.ghost, children: "Mon Profil" }, "Profile Button"),
27
- ],
28
- },
29
- };
30
- export const HeaderWithLinksAndRightItemAndPreviousLink = {
31
- name: "Header with links, right item and Previous link",
32
- render: ({ previousLink, rightItem }) => (_jsxs(Header, { previousLink: previousLink, rightItem: rightItem, children: [_jsx("a", { className: "af-navbar-item__link", href: "/mes-contrats", children: "MES CONTRATS" }, "MES CONTRATS link"), _jsx("a", { className: "af-navbar-item__link", href: "/mes-avantages", children: "MES AVANTAGES" }, "MES AVANTAGES link"), _jsx("a", { className: "af-navbar-item__link", href: "/mes-documents", children: "MES DOCUMENTS" }, "MES DOCUMENTS link")] })),
33
- args: {
34
- previousLink: (_jsx("a", { href: "/mes-contrats", children: "Retour \u00E0 mes contrats" }, "Previous link")),
35
- rightItem: [
36
- _jsx(Button, { iconLeft: _jsx(Svg, { src: lock, fill: "#00008f" }), variant: ButtonVariants.secondary, children: "Espace Banque" }, "Banking Space Button"),
37
- _jsx(Button, { iconLeft: _jsx(Svg, { src: person, fill: "#00008f" }), variant: ButtonVariants.ghost, children: "Mon Profil" }, "Profile Button"),
38
- ],
39
- },
40
- };
41
- export const HeaderWithLinksAndRightItemAndPreviousLinkAndActiveLink = {
42
- name: "Header with links, right item, Previous link and active link",
43
- render: ({ defaultActiveLink, previousLink, rightItem }) => (_jsxs(Header, { defaultActiveLink: defaultActiveLink, previousLink: previousLink, rightItem: rightItem, children: [_jsx("a", { className: "af-navbar-item__link", href: "/mes-contrats", children: "MES CONTRATS" }, "MES CONTRATS link"), _jsx("a", { className: "af-navbar-item__link", href: "/mes-avantages", children: "MES AVANTAGES" }, "MES AVANTAGES link"), _jsx("a", { className: "af-navbar-item__link", href: "/mes-documents", children: "MES DOCUMENTS" }, "MES DOCUMENTS link")] })),
44
- args: {
45
- defaultActiveLink: 0,
46
- previousLink: (_jsx("a", { href: "/mes-contrats", children: "Retour \u00E0 mes contrats" }, "Previous link")),
47
- rightItem: [
48
- _jsx(Button, { iconLeft: _jsx(Svg, { src: lock, fill: "#00008f" }), variant: ButtonVariants.secondary, children: "Espace Banque" }, "Banking Space Button"),
49
- _jsx(Button, { iconLeft: _jsx(Svg, { src: person, fill: "#00008f" }), variant: ButtonVariants.ghost, children: "Mon Profil" }, "Profile Button"),
50
- ],
51
- },
52
- };
@@ -1,8 +0,0 @@
1
- import type { Meta, StoryObj } from "@storybook/react";
2
- import type React from "react";
3
- import { NavBar } from "./NavBar";
4
- declare const meta: Meta<typeof NavBar>;
5
- export default meta;
6
- type StoryProps = React.ComponentProps<typeof NavBar>;
7
- type Story = StoryObj<StoryProps>;
8
- export declare const Default: Story;