allaw-ui 5.4.1 → 5.4.3
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/components/atoms/buttons/ActionButton.d.ts +1 -1
- package/dist/components/atoms/buttons/ActionButton.js +2 -2
- package/dist/components/molecules/proSwitch/ProSwitchModal.js +0 -2
- package/package.json +12 -19
- package/dist/components/atoms/buttons/ActionButton.stories.d.ts +0 -110
- package/dist/components/atoms/buttons/ActionButton.stories.js +0 -171
- package/dist/components/atoms/buttons/ActionCircleButton.stories.d.ts +0 -35
- package/dist/components/atoms/buttons/ActionCircleButton.stories.js +0 -54
- package/dist/components/atoms/buttons/AgendaSlot.stories.d.ts +0 -41
- package/dist/components/atoms/buttons/AgendaSlot.stories.js +0 -77
- package/dist/components/atoms/buttons/FavoriteToggle.stories.d.ts +0 -23
- package/dist/components/atoms/buttons/FavoriteToggle.stories.js +0 -61
- package/dist/components/atoms/buttons/FilterButton.stories.d.ts +0 -36
- package/dist/components/atoms/buttons/FilterButton.stories.js +0 -56
- package/dist/components/atoms/buttons/FilterButtonPrimary.stories.d.ts +0 -7
- package/dist/components/atoms/buttons/FilterButtonPrimary.stories.js +0 -26
- package/dist/components/atoms/buttons/GhostButton.stories.d.ts +0 -79
- package/dist/components/atoms/buttons/GhostButton.stories.js +0 -95
- package/dist/components/atoms/buttons/IconButton.stories.d.ts +0 -51
- package/dist/components/atoms/buttons/IconButton.stories.js +0 -100
- package/dist/components/atoms/buttons/InboxButton.stories.d.ts +0 -68
- package/dist/components/atoms/buttons/InboxButton.stories.js +0 -143
- package/dist/components/atoms/buttons/OAuthProviderButton.stories.d.ts +0 -67
- package/dist/components/atoms/buttons/OAuthProviderButton.stories.js +0 -168
- package/dist/components/atoms/buttons/PendingDocuments.stories.d.ts +0 -52
- package/dist/components/atoms/buttons/PendingDocuments.stories.js +0 -67
- package/dist/components/atoms/buttons/PrimaryButton.stories.d.ts +0 -121
- package/dist/components/atoms/buttons/PrimaryButton.stories.js +0 -187
- package/dist/components/atoms/buttons/SecondaryButton.stories.d.ts +0 -97
- package/dist/components/atoms/buttons/SecondaryButton.stories.js +0 -177
- package/dist/components/atoms/buttons/TabNavigation.stories.d.ts +0 -81
- package/dist/components/atoms/buttons/TabNavigation.stories.js +0 -178
- package/dist/components/atoms/buttons/TertiaryButton.stories.d.ts +0 -70
- package/dist/components/atoms/buttons/TertiaryButton.stories.js +0 -128
- package/dist/components/atoms/checkboxes/Checkbox.stories.d.ts +0 -77
- package/dist/components/atoms/checkboxes/Checkbox.stories.js +0 -123
- package/dist/components/atoms/datepickers/Datepicker.stories.d.ts +0 -167
- package/dist/components/atoms/datepickers/Datepicker.stories.js +0 -113
- package/dist/components/atoms/featureCard/featureCard.stories.d.ts +0 -21
- package/dist/components/atoms/featureCard/featureCard.stories.js +0 -101
- package/dist/components/atoms/filter/Filter.stories.d.ts +0 -9
- package/dist/components/atoms/filter/Filter.stories.js +0 -77
- package/dist/components/atoms/filters/SingleFilter.stories.d.ts +0 -10
- package/dist/components/atoms/filters/SingleFilter.stories.js +0 -84
- package/dist/components/atoms/inputs/Input.stories.d.ts +0 -85
- package/dist/components/atoms/inputs/Input.stories.js +0 -169
- package/dist/components/atoms/inputs/SearchBar.stories.d.ts +0 -142
- package/dist/components/atoms/inputs/SearchBar.stories.js +0 -197
- package/dist/components/atoms/inputs/TextArea.stories.d.ts +0 -95
- package/dist/components/atoms/inputs/TextArea.stories.js +0 -141
- package/dist/components/atoms/inputs/VerificationCodeInput.stories.d.ts +0 -81
- package/dist/components/atoms/inputs/VerificationCodeInput.stories.js +0 -89
- package/dist/components/atoms/progressBars/ProgressBar.stories.d.ts +0 -83
- package/dist/components/atoms/progressBars/ProgressBar.stories.js +0 -88
- package/dist/components/atoms/radios/RadioButton.stories.d.ts +0 -38
- package/dist/components/atoms/radios/RadioButton.stories.js +0 -87
- package/dist/components/atoms/radios/SelectCard.stories.d.ts +0 -92
- package/dist/components/atoms/radios/SelectCard.stories.js +0 -192
- package/dist/components/atoms/selects/ComboBox.stories.d.ts +0 -116
- package/dist/components/atoms/selects/ComboBox.stories.js +0 -136
- package/dist/components/atoms/selects/Select.stories.d.ts +0 -133
- package/dist/components/atoms/selects/Select.stories.js +0 -299
- package/dist/components/atoms/selects/SelectableListItem.stories.d.ts +0 -33
- package/dist/components/atoms/selects/SelectableListItem.stories.js +0 -53
- package/dist/components/atoms/tags/AppointementStatusTag.stories.d.ts +0 -17
- package/dist/components/atoms/tags/AppointementStatusTag.stories.js +0 -70
- package/dist/components/atoms/tags/FolderStatusTag.stories.d.ts +0 -28
- package/dist/components/atoms/tags/FolderStatusTag.stories.js +0 -51
- package/dist/components/atoms/tags/InlineTag.stories.d.ts +0 -109
- package/dist/components/atoms/tags/InlineTag.stories.js +0 -159
- package/dist/components/atoms/tags/OtherStatusTag.stories.d.ts +0 -99
- package/dist/components/atoms/tags/OtherStatusTag.stories.js +0 -160
- package/dist/components/atoms/typography/CardDate.stories.d.ts +0 -119
- package/dist/components/atoms/typography/CardDate.stories.js +0 -103
- package/dist/components/atoms/typography/Heading.stories.d.ts +0 -79
- package/dist/components/atoms/typography/Heading.stories.js +0 -150
- package/dist/components/atoms/typography/Link.stories.d.ts +0 -72
- package/dist/components/atoms/typography/Link.stories.js +0 -164
- package/dist/components/atoms/typography/Paragraph.stories.d.ts +0 -56
- package/dist/components/atoms/typography/Paragraph.stories.js +0 -97
- package/dist/components/atoms/typography/SmallTitle.stories.d.ts +0 -42
- package/dist/components/atoms/typography/SmallTitle.stories.js +0 -72
- package/dist/components/atoms/typography/Subtitle.stories.d.ts +0 -40
- package/dist/components/atoms/typography/Subtitle.stories.js +0 -60
- package/dist/components/atoms/typography/TinyInfo.stories.d.ts +0 -58
- package/dist/components/atoms/typography/TinyInfo.stories.js +0 -117
- package/dist/components/atoms/uiVariables/AnimatedBorder.stories.d.ts +0 -17
- package/dist/components/atoms/uiVariables/AnimatedBorder.stories.js +0 -20
- package/dist/components/atoms/uiVariables/BorderRadius.stories.d.ts +0 -18
- package/dist/components/atoms/uiVariables/BorderRadius.stories.js +0 -34
- package/dist/components/atoms/uiVariables/Shadows.stories.d.ts +0 -18
- package/dist/components/atoms/uiVariables/Shadows.stories.js +0 -34
- package/dist/components/atoms/uiVariables/Strokes.stories.d.ts +0 -18
- package/dist/components/atoms/uiVariables/Strokes.stories.js +0 -34
- package/dist/components/molecules/AiText/aiText.stories.d.ts +0 -43
- package/dist/components/molecules/AiText/aiText.stories.js +0 -216
- package/dist/components/molecules/DataStepper/Stepper.stories.d.ts +0 -8
- package/dist/components/molecules/DataStepper/Stepper.stories.js +0 -248
- package/dist/components/molecules/appointmentCard/AppointmentCard.stories.d.ts +0 -37
- package/dist/components/molecules/appointmentCard/AppointmentCard.stories.js +0 -106
- package/dist/components/molecules/appointmentSlot/AppointmentSlot.stories.d.ts +0 -95
- package/dist/components/molecules/appointmentSlot/AppointmentSlot.stories.js +0 -204
- package/dist/components/molecules/banner/Banner.stories.d.ts +0 -31
- package/dist/components/molecules/banner/Banner.stories.js +0 -123
- package/dist/components/molecules/billingCount/BillingCount.stories.d.ts +0 -22
- package/dist/components/molecules/billingCount/BillingCount.stories.js +0 -49
- package/dist/components/molecules/blogCard/BlogCard.stories.d.ts +0 -10
- package/dist/components/molecules/blogCard/BlogCard.stories.js +0 -33
- package/dist/components/molecules/blogFooter/BlogFooter.stories.d.ts +0 -60
- package/dist/components/molecules/blogFooter/BlogFooter.stories.js +0 -67
- package/dist/components/molecules/blogHeader/BlogHeader.stories.d.ts +0 -49
- package/dist/components/molecules/blogHeader/BlogHeader.stories.js +0 -63
- package/dist/components/molecules/blogText/BlogText.stories.d.ts +0 -31
- package/dist/components/molecules/blogText/BlogText.stories.js +0 -51
- package/dist/components/molecules/blogTextImageBlock/BlogTextImageBlock.stories.d.ts +0 -37
- package/dist/components/molecules/blogTextImageBlock/BlogTextImageBlock.stories.js +0 -58
- package/dist/components/molecules/brands/Brands.stories.d.ts +0 -8
- package/dist/components/molecules/brands/Brands.stories.js +0 -66
- package/dist/components/molecules/breadcrumb/Breadcrumb.stories.d.ts +0 -24
- package/dist/components/molecules/breadcrumb/Breadcrumb.stories.js +0 -54
- package/dist/components/molecules/caseCard/CaseCard.stories.d.ts +0 -114
- package/dist/components/molecules/caseCard/CaseCard.stories.js +0 -200
- package/dist/components/molecules/caseCardCompact/CaseCardCompact.stories.d.ts +0 -11
- package/dist/components/molecules/caseCardCompact/CaseCardCompact.stories.js +0 -59
- package/dist/components/molecules/caseLinkCard/CaseCardLink.stories.d.ts +0 -9
- package/dist/components/molecules/caseLinkCard/CaseCardLink.stories.js +0 -37
- package/dist/components/molecules/checkboxForm/CheckboxForm.stories.d.ts +0 -94
- package/dist/components/molecules/checkboxForm/CheckboxForm.stories.js +0 -157
- package/dist/components/molecules/checkboxForm/ColoredCheckbox.stories.d.ts +0 -108
- package/dist/components/molecules/checkboxForm/ColoredCheckbox.stories.js +0 -141
- package/dist/components/molecules/clientLinkCard/ClientLinkCard.stories.d.ts +0 -11
- package/dist/components/molecules/clientLinkCard/ClientLinkCard.stories.js +0 -59
- package/dist/components/molecules/contactCard/ContactCard.stories.d.ts +0 -69
- package/dist/components/molecules/contactCard/ContactCard.stories.js +0 -84
- package/dist/components/molecules/contactCard/ContactCardEdit.stories.d.ts +0 -88
- package/dist/components/molecules/contactCard/ContactCardEdit.stories.js +0 -106
- package/dist/components/molecules/contactCard/DetailedContactCard.stories.d.ts +0 -94
- package/dist/components/molecules/contactCard/DetailedContactCard.stories.js +0 -83
- package/dist/components/molecules/datepickerForm/DatepickerForm.stories.d.ts +0 -291
- package/dist/components/molecules/datepickerForm/DatepickerForm.stories.js +0 -185
- package/dist/components/molecules/documentCard/DocumentCard.stories.d.ts +0 -72
- package/dist/components/molecules/documentCard/DocumentCard.stories.js +0 -108
- package/dist/components/molecules/employeeCard/EmployeeCard.stories.d.ts +0 -74
- package/dist/components/molecules/employeeCard/EmployeeCard.stories.js +0 -65
- package/dist/components/molecules/emptyMessage/EmptyMessage.stories.d.ts +0 -75
- package/dist/components/molecules/emptyMessage/EmptyMessage.stories.js +0 -115
- package/dist/components/molecules/entityAdminCard/entityAdminCard.stories.d.ts +0 -10
- package/dist/components/molecules/entityAdminCard/entityAdminCard.stories.js +0 -50
- package/dist/components/molecules/entityCard/EntityCard.stories.d.ts +0 -22
- package/dist/components/molecules/entityCard/EntityCard.stories.js +0 -63
- package/dist/components/molecules/featureGrid/FeatureGrid.stories.d.ts +0 -7
- package/dist/components/molecules/featureGrid/FeatureGrid.stories.js +0 -97
- package/dist/components/molecules/fileCard/FileCard.stories.d.ts +0 -42
- package/dist/components/molecules/fileCard/FileCard.stories.js +0 -185
- package/dist/components/molecules/fileUploader/FileUploader.stories.d.ts +0 -120
- package/dist/components/molecules/fileUploader/FileUploader.stories.js +0 -269
- package/dist/components/molecules/flexContent/FlexContent.stories.d.ts +0 -9
- package/dist/components/molecules/flexContent/FlexContent.stories.js +0 -47
- package/dist/components/molecules/frameCTA/FrameCTA.stories.d.ts +0 -8
- package/dist/components/molecules/frameCTA/FrameCTA.stories.js +0 -58
- package/dist/components/molecules/heroSection/HeroSection.stories.d.ts +0 -46
- package/dist/components/molecules/heroSection/HeroSection.stories.js +0 -100
- package/dist/components/molecules/loadingBox/LoadingBox.stories.d.ts +0 -54
- package/dist/components/molecules/loadingBox/LoadingBox.stories.js +0 -128
- package/dist/components/molecules/modal/Modal.stories.d.ts +0 -128
- package/dist/components/molecules/modal/Modal.stories.js +0 -373
- package/dist/components/molecules/notification/Notification.stories.d.ts +0 -377
- package/dist/components/molecules/notification/Notification.stories.js +0 -205
- package/dist/components/molecules/pagination/Pagination.stories.d.ts +0 -44
- package/dist/components/molecules/pagination/Pagination.stories.js +0 -59
- package/dist/components/molecules/proCard/ProCard.stories.d.ts +0 -49
- package/dist/components/molecules/proCard/ProCard.stories.js +0 -69
- package/dist/components/molecules/proSwitch/AvatarBubble.stories.d.ts +0 -112
- package/dist/components/molecules/proSwitch/AvatarBubble.stories.js +0 -255
- package/dist/components/molecules/proSwitch/AvatarToggleGroup.stories.d.ts +0 -88
- package/dist/components/molecules/proSwitch/AvatarToggleGroup.stories.js +0 -328
- package/dist/components/molecules/proSwitch/ProSwitch.stories.d.ts +0 -9
- package/dist/components/molecules/proSwitch/ProSwitch.stories.js +0 -152
- package/dist/components/molecules/proSwitch/ProSwitchModal.stories.d.ts +0 -62
- package/dist/components/molecules/proSwitch/ProSwitchModal.stories.js +0 -269
- package/dist/components/molecules/questionAnswer/QuestionAnswer.stories.d.ts +0 -17
- package/dist/components/molecules/questionAnswer/QuestionAnswer.stories.js +0 -48
- package/dist/components/molecules/radioForm/RadioForm.stories.d.ts +0 -37
- package/dist/components/molecules/radioForm/RadioForm.stories.js +0 -75
- package/dist/components/molecules/rangeSlider/RangeSlider.stories.d.ts +0 -96
- package/dist/components/molecules/rangeSlider/RangeSlider.stories.js +0 -162
- package/dist/components/molecules/section/Section.stories.d.ts +0 -42
- package/dist/components/molecules/section/Section.stories.js +0 -162
- package/dist/components/molecules/segmentedControl/segmentedControl.stories.d.ts +0 -70
- package/dist/components/molecules/segmentedControl/segmentedControl.stories.js +0 -185
- package/dist/components/molecules/selectForm/SelectForm.stories.d.ts +0 -79
- package/dist/components/molecules/selectForm/SelectForm.stories.js +0 -113
- package/dist/components/molecules/stepper/Stepper.stories.d.ts +0 -62
- package/dist/components/molecules/stepper/Stepper.stories.js +0 -215
- package/dist/stories/Header.d.ts +0 -13
- package/dist/stories/Header.js +0 -20
- package/dist/stories/Header.stories.d.ts +0 -18
- package/dist/stories/Header.stories.js +0 -26
- package/dist/stories/Page.d.ts +0 -3
- package/dist/stories/Page.js +0 -37
- package/dist/stories/Page.stories.d.ts +0 -12
- package/dist/stories/Page.stories.js +0 -76
|
@@ -1,328 +0,0 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
import React, { useState } from "react";
|
|
13
|
-
import { action } from "@storybook/addon-actions";
|
|
14
|
-
import AvatarToggleGroup from "./AvatarToggleGroup";
|
|
15
|
-
import "../../../styles/global.css";
|
|
16
|
-
export default {
|
|
17
|
-
title: "Components/Molecules/ProSwitch/AvatarToggleGroup",
|
|
18
|
-
component: AvatarToggleGroup,
|
|
19
|
-
tags: ["autodocs"],
|
|
20
|
-
argTypes: {
|
|
21
|
-
pros: {
|
|
22
|
-
control: "object",
|
|
23
|
-
description: "Liste des professionnels à afficher",
|
|
24
|
-
},
|
|
25
|
-
mode: {
|
|
26
|
-
control: {
|
|
27
|
-
type: "select",
|
|
28
|
-
options: ["single", "multiple"],
|
|
29
|
-
},
|
|
30
|
-
description: "Mode de sélection (single ou multiple)",
|
|
31
|
-
},
|
|
32
|
-
selected: {
|
|
33
|
-
control: "object",
|
|
34
|
-
description: "Liste des IDs des pros sélectionnés",
|
|
35
|
-
},
|
|
36
|
-
maxVisible: {
|
|
37
|
-
control: {
|
|
38
|
-
type: "number",
|
|
39
|
-
min: 1,
|
|
40
|
-
max: 10,
|
|
41
|
-
},
|
|
42
|
-
description: "Nombre maximum d'avatars visibles (optionnel)",
|
|
43
|
-
},
|
|
44
|
-
disabled: {
|
|
45
|
-
control: "boolean",
|
|
46
|
-
description: "État désactivé",
|
|
47
|
-
},
|
|
48
|
-
onSelect: {
|
|
49
|
-
action: "selected",
|
|
50
|
-
description: "Callback appelé lors de la sélection",
|
|
51
|
-
},
|
|
52
|
-
onOpenPortal: {
|
|
53
|
-
action: "portal opened",
|
|
54
|
-
description: "Callback appelé à l'ouverture de la modal",
|
|
55
|
-
},
|
|
56
|
-
showTooltips: {
|
|
57
|
-
control: "boolean",
|
|
58
|
-
description: "Afficher les tooltips sur chaque avatar",
|
|
59
|
-
},
|
|
60
|
-
tooltipId: {
|
|
61
|
-
control: "text",
|
|
62
|
-
description: "ID personnalisé pour les tooltips",
|
|
63
|
-
},
|
|
64
|
-
},
|
|
65
|
-
parameters: {
|
|
66
|
-
backgrounds: {
|
|
67
|
-
default: "light",
|
|
68
|
-
values: [
|
|
69
|
-
{ name: "light", value: "#ffffff" },
|
|
70
|
-
{ name: "grey", value: "#728ea7" },
|
|
71
|
-
{ name: "figma", value: "#404040" },
|
|
72
|
-
{ name: "dark", value: "#171e25" },
|
|
73
|
-
],
|
|
74
|
-
},
|
|
75
|
-
},
|
|
76
|
-
};
|
|
77
|
-
// Données de test
|
|
78
|
-
var samplePros = [
|
|
79
|
-
{
|
|
80
|
-
token: "t1",
|
|
81
|
-
proUserId: "1",
|
|
82
|
-
name: "Dupont",
|
|
83
|
-
firstName: "Jean",
|
|
84
|
-
profilePictureLink: "https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?w=150&h=150&fit=crop&crop=face",
|
|
85
|
-
profession: "AVOCAT",
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
token: "t2",
|
|
89
|
-
proUserId: "2",
|
|
90
|
-
name: "Martin",
|
|
91
|
-
firstName: "Marie",
|
|
92
|
-
profilePictureLink: "https://images.unsplash.com/photo-1494790108755-2616b612b786?w=150&h=150&fit=crop&crop=face",
|
|
93
|
-
profession: "NOTAIRE",
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
token: "t3",
|
|
97
|
-
proUserId: "3",
|
|
98
|
-
name: "Durand",
|
|
99
|
-
firstName: "Pierre",
|
|
100
|
-
profilePictureLink: "https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?w=150&h=150&fit=crop&crop=face",
|
|
101
|
-
profession: "AVOCAT",
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
token: "t4",
|
|
105
|
-
proUserId: "4",
|
|
106
|
-
name: "Bernard",
|
|
107
|
-
firstName: "Sophie",
|
|
108
|
-
profilePictureLink: "https://images.unsplash.com/photo-1438761681033-6461ffad8d80?w=150&h=150&fit=crop&crop=face",
|
|
109
|
-
profession: "COMMISSAIRE",
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
token: "t5",
|
|
113
|
-
proUserId: "5",
|
|
114
|
-
name: "Petit",
|
|
115
|
-
firstName: "Lucas",
|
|
116
|
-
profilePictureLink: "https://images.unsplash.com/photo-1500648767791-00dcc994a43e?w=150&h=150&fit=crop&crop=face",
|
|
117
|
-
profession: "AVOCAT",
|
|
118
|
-
},
|
|
119
|
-
{
|
|
120
|
-
token: "t6",
|
|
121
|
-
proUserId: "6",
|
|
122
|
-
name: "Rousseau",
|
|
123
|
-
firstName: "Emma",
|
|
124
|
-
profilePictureLink: "https://images.unsplash.com/photo-1502823403499-6ccfcf4fb453?w=150&h=150&fit=crop&crop=face",
|
|
125
|
-
profession: "NOTAIRE",
|
|
126
|
-
},
|
|
127
|
-
{
|
|
128
|
-
token: "t7",
|
|
129
|
-
proUserId: "7",
|
|
130
|
-
name: "Leroy",
|
|
131
|
-
firstName: "François",
|
|
132
|
-
profilePictureLink: "https://images.unsplash.com/photo-1506794778202-cad84cf45f1d?w=150&h=150&fit=crop&crop=face",
|
|
133
|
-
profession: "AVOCAT",
|
|
134
|
-
},
|
|
135
|
-
{
|
|
136
|
-
token: "t8",
|
|
137
|
-
proUserId: "8",
|
|
138
|
-
name: "Moreau",
|
|
139
|
-
firstName: "Alice",
|
|
140
|
-
profilePictureLink: "https://images.unsplash.com/photo-1544005313-94ddf0286df2?w=150&h=150&fit=crop&crop=face",
|
|
141
|
-
profession: "COMMISSAIRE",
|
|
142
|
-
},
|
|
143
|
-
];
|
|
144
|
-
var Template = function (args) {
|
|
145
|
-
var _a = useState(args.selected || []), selected = _a[0], setSelected = _a[1];
|
|
146
|
-
var handleSelect = function (selectedPros) {
|
|
147
|
-
setSelected(selectedPros.map(function (pro) { return pro.proUserId; }));
|
|
148
|
-
action("onSelect")(selectedPros);
|
|
149
|
-
};
|
|
150
|
-
return (React.createElement("div", { style: { padding: "20px", maxWidth: "600px" } },
|
|
151
|
-
React.createElement(AvatarToggleGroup, __assign({}, args, { selected: selected, onSelect: handleSelect })),
|
|
152
|
-
React.createElement("div", { style: { marginTop: "20px", fontSize: "14px", color: "#666" } },
|
|
153
|
-
React.createElement("strong", null, "S\u00E9lection actuelle :"),
|
|
154
|
-
" ",
|
|
155
|
-
selected.join(", ") || "Aucune",
|
|
156
|
-
React.createElement("br", null),
|
|
157
|
-
React.createElement("small", null, "\uD83D\uDCA1 Testez le hover sur les avatars pour voir les tooltips"),
|
|
158
|
-
args.mode === "multiple" && (React.createElement(React.Fragment, null,
|
|
159
|
-
React.createElement("br", null),
|
|
160
|
-
React.createElement("small", null, "\uD83D\uDD12 En mode multiple, impossible de d\u00E9s\u00E9lectionner le dernier pro"))))));
|
|
161
|
-
};
|
|
162
|
-
export var Default = Template.bind({});
|
|
163
|
-
Default.args = {
|
|
164
|
-
pros: samplePros.slice(0, 3),
|
|
165
|
-
mode: "single",
|
|
166
|
-
selected: ["1"],
|
|
167
|
-
disabled: false,
|
|
168
|
-
showTooltips: true,
|
|
169
|
-
tooltipId: "avatar-toggle-tooltip",
|
|
170
|
-
};
|
|
171
|
-
export var Multiple = Template.bind({});
|
|
172
|
-
Multiple.args = {
|
|
173
|
-
pros: samplePros.slice(0, 4),
|
|
174
|
-
mode: "multiple",
|
|
175
|
-
selected: ["1", "3"],
|
|
176
|
-
disabled: false,
|
|
177
|
-
showTooltips: true,
|
|
178
|
-
tooltipId: "avatar-toggle-tooltip",
|
|
179
|
-
};
|
|
180
|
-
export var WithManyPros = Template.bind({});
|
|
181
|
-
WithManyPros.args = {
|
|
182
|
-
pros: samplePros,
|
|
183
|
-
mode: "multiple",
|
|
184
|
-
selected: ["1", "3", "5"],
|
|
185
|
-
disabled: false,
|
|
186
|
-
showTooltips: true,
|
|
187
|
-
tooltipId: "avatar-toggle-tooltip",
|
|
188
|
-
};
|
|
189
|
-
export var Disabled = Template.bind({});
|
|
190
|
-
Disabled.args = {
|
|
191
|
-
pros: samplePros.slice(0, 3),
|
|
192
|
-
mode: "single",
|
|
193
|
-
selected: ["1"],
|
|
194
|
-
disabled: true,
|
|
195
|
-
showTooltips: true,
|
|
196
|
-
tooltipId: "avatar-toggle-tooltip",
|
|
197
|
-
};
|
|
198
|
-
export var WithMaxVisible = Template.bind({});
|
|
199
|
-
WithMaxVisible.args = {
|
|
200
|
-
pros: samplePros,
|
|
201
|
-
mode: "multiple",
|
|
202
|
-
selected: ["1", "2"],
|
|
203
|
-
maxVisible: 3,
|
|
204
|
-
disabled: false,
|
|
205
|
-
showTooltips: true,
|
|
206
|
-
tooltipId: "avatar-toggle-tooltip",
|
|
207
|
-
};
|
|
208
|
-
export var SingleWithInitials = Template.bind({});
|
|
209
|
-
SingleWithInitials.args = {
|
|
210
|
-
pros: [
|
|
211
|
-
{
|
|
212
|
-
token: "t1",
|
|
213
|
-
proUserId: "1",
|
|
214
|
-
name: "Dupont",
|
|
215
|
-
firstName: "Jean",
|
|
216
|
-
profilePictureLink: "", // Pas d'image pour forcer les initiales
|
|
217
|
-
profession: "AVOCAT",
|
|
218
|
-
},
|
|
219
|
-
{
|
|
220
|
-
token: "t2",
|
|
221
|
-
proUserId: "2",
|
|
222
|
-
name: "Martin",
|
|
223
|
-
firstName: "Marie",
|
|
224
|
-
profilePictureLink: "",
|
|
225
|
-
profession: "NOTAIRE",
|
|
226
|
-
},
|
|
227
|
-
{
|
|
228
|
-
token: "t3",
|
|
229
|
-
proUserId: "3",
|
|
230
|
-
name: "Durand",
|
|
231
|
-
firstName: "Pierre",
|
|
232
|
-
profilePictureLink: "",
|
|
233
|
-
profession: "AVOCAT",
|
|
234
|
-
},
|
|
235
|
-
],
|
|
236
|
-
mode: "single",
|
|
237
|
-
selected: ["1"],
|
|
238
|
-
disabled: false,
|
|
239
|
-
showTooltips: true,
|
|
240
|
-
tooltipId: "avatar-toggle-tooltip",
|
|
241
|
-
};
|
|
242
|
-
export var ResponsiveTest = function () {
|
|
243
|
-
var _a = useState(["1"]), selected = _a[0], setSelected = _a[1];
|
|
244
|
-
var handleSelect = function (selectedPros) {
|
|
245
|
-
setSelected(selectedPros.map(function (pro) { return pro.proUserId; }));
|
|
246
|
-
action("onSelect")(selectedPros);
|
|
247
|
-
};
|
|
248
|
-
return (React.createElement("div", { style: { padding: "20px" } },
|
|
249
|
-
React.createElement("h3", { style: { marginBottom: "20px" } }, "Test Responsive - Redimensionnez la fen\u00EAtre"),
|
|
250
|
-
React.createElement("div", { style: {
|
|
251
|
-
border: "1px solid #ccc",
|
|
252
|
-
padding: "20px",
|
|
253
|
-
marginBottom: "20px",
|
|
254
|
-
maxWidth: "100%",
|
|
255
|
-
overflow: "hidden",
|
|
256
|
-
} },
|
|
257
|
-
React.createElement(AvatarToggleGroup, { pros: samplePros, mode: "multiple", selected: selected, onSelect: handleSelect, onOpenPortal: function () { return action("Portal opened")(); }, showTooltips: true, tooltipId: "responsive-test-tooltip" })),
|
|
258
|
-
React.createElement("div", { style: { fontSize: "14px", color: "#666" } },
|
|
259
|
-
React.createElement("strong", null, "S\u00E9lection :"),
|
|
260
|
-
" ",
|
|
261
|
-
selected.join(", ") || "Aucune")));
|
|
262
|
-
};
|
|
263
|
-
export var InteractiveDemo = function () {
|
|
264
|
-
var _a = useState("single"), mode = _a[0], setMode = _a[1];
|
|
265
|
-
var _b = useState(["1"]), selected = _b[0], setSelected = _b[1];
|
|
266
|
-
var _c = useState(false), disabled = _c[0], setDisabled = _c[1];
|
|
267
|
-
var handleSelect = function (selectedPros) {
|
|
268
|
-
setSelected(selectedPros.map(function (pro) { return pro.proUserId; }));
|
|
269
|
-
action("onSelect")(selectedPros);
|
|
270
|
-
};
|
|
271
|
-
return (React.createElement("div", { style: { padding: "20px" } },
|
|
272
|
-
React.createElement("div", { style: {
|
|
273
|
-
marginBottom: "20px",
|
|
274
|
-
display: "flex",
|
|
275
|
-
gap: "20px",
|
|
276
|
-
alignItems: "center",
|
|
277
|
-
} },
|
|
278
|
-
React.createElement("label", null,
|
|
279
|
-
React.createElement("input", { type: "radio", name: "mode", value: "single", checked: mode === "single", onChange: function (e) { return setMode(e.target.value); } }),
|
|
280
|
-
"Single"),
|
|
281
|
-
React.createElement("label", null,
|
|
282
|
-
React.createElement("input", { type: "radio", name: "mode", value: "multiple", checked: mode === "multiple", onChange: function (e) { return setMode(e.target.value); } }),
|
|
283
|
-
"Multiple"),
|
|
284
|
-
React.createElement("label", null,
|
|
285
|
-
React.createElement("input", { type: "checkbox", checked: disabled, onChange: function (e) { return setDisabled(e.target.checked); } }),
|
|
286
|
-
"Disabled")),
|
|
287
|
-
React.createElement("div", { style: {
|
|
288
|
-
border: "1px solid #ccc",
|
|
289
|
-
padding: "20px",
|
|
290
|
-
marginBottom: "20px",
|
|
291
|
-
} },
|
|
292
|
-
React.createElement(AvatarToggleGroup, { pros: samplePros.slice(0, 5), mode: mode, selected: selected, onSelect: handleSelect, disabled: disabled, onOpenPortal: function () { return action("Portal opened")(); }, showTooltips: true, tooltipId: "interactive-demo-tooltip" })),
|
|
293
|
-
React.createElement("div", { style: { fontSize: "14px", color: "#666" } },
|
|
294
|
-
React.createElement("strong", null, "Mode :"),
|
|
295
|
-
" ",
|
|
296
|
-
mode,
|
|
297
|
-
" | ",
|
|
298
|
-
React.createElement("strong", null, "S\u00E9lection :"),
|
|
299
|
-
" ",
|
|
300
|
-
selected.join(", ") || "Aucune",
|
|
301
|
-
React.createElement("br", null),
|
|
302
|
-
"\uD83D\uDCA1 Survolez les avatars pour voir les tooltips",
|
|
303
|
-
mode === "multiple" && (React.createElement(React.Fragment, null,
|
|
304
|
-
React.createElement("br", null),
|
|
305
|
-
"\uD83D\uDD12 En mode multiple, impossible de d\u00E9s\u00E9lectionner le dernier pro")))));
|
|
306
|
-
};
|
|
307
|
-
export var TooltipTest = function () {
|
|
308
|
-
var _a = useState(["1"]), selected = _a[0], setSelected = _a[1];
|
|
309
|
-
var handleSelect = function (selectedPros) {
|
|
310
|
-
setSelected(selectedPros.map(function (pro) { return pro.proUserId; }));
|
|
311
|
-
action("onSelect")(selectedPros);
|
|
312
|
-
};
|
|
313
|
-
return (React.createElement("div", { style: { padding: "20px" } },
|
|
314
|
-
React.createElement("h3", { style: { marginBottom: "10px" } }, "Test des Tooltips"),
|
|
315
|
-
React.createElement("p", { style: { marginBottom: "20px", fontSize: "14px", color: "#666" } }, "\uD83D\uDCA1 Survolez chaque avatar pour voir le tooltip avec le nom complet"),
|
|
316
|
-
React.createElement("div", { style: {
|
|
317
|
-
border: "1px solid #ccc",
|
|
318
|
-
padding: "20px",
|
|
319
|
-
marginBottom: "20px",
|
|
320
|
-
} },
|
|
321
|
-
React.createElement(AvatarToggleGroup, { pros: samplePros.slice(0, 6), mode: "multiple", selected: selected, onSelect: handleSelect, showTooltips: true, tooltipId: "tooltip-test" })),
|
|
322
|
-
React.createElement("div", { style: { fontSize: "14px", color: "#666" } },
|
|
323
|
-
React.createElement("strong", null, "S\u00E9lection :"),
|
|
324
|
-
" ",
|
|
325
|
-
selected.join(", ") || "Aucune",
|
|
326
|
-
React.createElement("br", null),
|
|
327
|
-
React.createElement("small", null, "\u2705 Tooltips activ\u00E9s sur tous les avatars"))));
|
|
328
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
declare namespace _default {
|
|
2
|
-
export let title: string;
|
|
3
|
-
export { ProSwitch as component };
|
|
4
|
-
}
|
|
5
|
-
export default _default;
|
|
6
|
-
export function SingleSelect(): React.JSX.Element;
|
|
7
|
-
export function MultiSelectOverflow(): React.JSX.Element;
|
|
8
|
-
import ProSwitch from "./ProSwitch";
|
|
9
|
-
import React from "react";
|
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
import React, { useState } from "react";
|
|
2
|
-
import { action } from "@storybook/addon-actions";
|
|
3
|
-
import ProSwitch from "./ProSwitch";
|
|
4
|
-
export default {
|
|
5
|
-
title: "Components/Molecules/ProSwitch/ProSwitch",
|
|
6
|
-
component: ProSwitch,
|
|
7
|
-
};
|
|
8
|
-
var samplePros = [
|
|
9
|
-
{
|
|
10
|
-
token: "t1",
|
|
11
|
-
proUserId: "1",
|
|
12
|
-
name: "Dupont",
|
|
13
|
-
firstName: "Jean",
|
|
14
|
-
profilePictureLink: "https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?w=150&h=150&fit=crop&crop=face",
|
|
15
|
-
profession: "AVOCAT",
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
token: "t2",
|
|
19
|
-
proUserId: "2",
|
|
20
|
-
name: "Martin",
|
|
21
|
-
firstName: "Marie",
|
|
22
|
-
profilePictureLink: "",
|
|
23
|
-
profession: "NOTAIRE",
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
token: "t3",
|
|
27
|
-
proUserId: "3",
|
|
28
|
-
name: "Durand",
|
|
29
|
-
firstName: "Pierre",
|
|
30
|
-
profilePictureLink: "https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?w=150&h=150&fit=crop&crop=face",
|
|
31
|
-
profession: "AVOCAT",
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
token: "t4",
|
|
35
|
-
proUserId: "4",
|
|
36
|
-
name: "Bernard",
|
|
37
|
-
firstName: "Sophie",
|
|
38
|
-
profilePictureLink: "",
|
|
39
|
-
profession: "COMMISSAIRE",
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
token: "t5",
|
|
43
|
-
proUserId: "5",
|
|
44
|
-
name: "Petit",
|
|
45
|
-
firstName: "Lucas",
|
|
46
|
-
profilePictureLink: "https://images.unsplash.com/photo-1500648767791-00dcc994a43e?w=150&h=150&fit=crop&crop=face",
|
|
47
|
-
profession: "AVOCAT",
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
token: "t6",
|
|
51
|
-
proUserId: "6",
|
|
52
|
-
name: "Rousseau",
|
|
53
|
-
firstName: "Emma",
|
|
54
|
-
profilePictureLink: "",
|
|
55
|
-
profession: "NOTAIRE",
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
token: "t7",
|
|
59
|
-
proUserId: "7",
|
|
60
|
-
name: "Leroy",
|
|
61
|
-
firstName: "François",
|
|
62
|
-
profilePictureLink: "https://images.unsplash.com/photo-1506794778202-cad84cf45f1d?w=150&h=150&fit=crop&crop=face",
|
|
63
|
-
profession: "AVOCAT",
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
token: "t8",
|
|
67
|
-
proUserId: "8",
|
|
68
|
-
name: "Moreau",
|
|
69
|
-
firstName: "Alice",
|
|
70
|
-
profilePictureLink: "",
|
|
71
|
-
profession: "COMMISSAIRE",
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
token: "t9",
|
|
75
|
-
proUserId: "9",
|
|
76
|
-
name: "Girard",
|
|
77
|
-
firstName: "Paul",
|
|
78
|
-
profilePictureLink: "",
|
|
79
|
-
profession: "AVOCAT",
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
token: "t10",
|
|
83
|
-
proUserId: "10",
|
|
84
|
-
name: "Fabre",
|
|
85
|
-
firstName: "Julie",
|
|
86
|
-
profilePictureLink: "",
|
|
87
|
-
profession: "NOTAIRE",
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
token: "t11",
|
|
91
|
-
proUserId: "11",
|
|
92
|
-
name: "Simon",
|
|
93
|
-
firstName: "Antoine",
|
|
94
|
-
profilePictureLink: "",
|
|
95
|
-
profession: "AVOCAT",
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
token: "t12",
|
|
99
|
-
proUserId: "12",
|
|
100
|
-
name: "Michel",
|
|
101
|
-
firstName: "Claire",
|
|
102
|
-
profilePictureLink: "",
|
|
103
|
-
profession: "COMMISSAIRE",
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
token: "t13",
|
|
107
|
-
proUserId: "13",
|
|
108
|
-
name: "Garcia",
|
|
109
|
-
firstName: "Hugo",
|
|
110
|
-
profilePictureLink: "",
|
|
111
|
-
profession: "AVOCAT",
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
token: "t14",
|
|
115
|
-
proUserId: "14",
|
|
116
|
-
name: "David",
|
|
117
|
-
firstName: "Sarah",
|
|
118
|
-
profilePictureLink: "",
|
|
119
|
-
profession: "NOTAIRE",
|
|
120
|
-
},
|
|
121
|
-
{
|
|
122
|
-
token: "t15",
|
|
123
|
-
proUserId: "15",
|
|
124
|
-
name: "Robert",
|
|
125
|
-
firstName: "Nicolas",
|
|
126
|
-
profilePictureLink: "",
|
|
127
|
-
profession: "AVOCAT",
|
|
128
|
-
},
|
|
129
|
-
];
|
|
130
|
-
export var SingleSelect = function () {
|
|
131
|
-
var _a = useState(["1"]), selected = _a[0], setSelected = _a[1];
|
|
132
|
-
return (React.createElement("div", { style: { padding: "20px" } },
|
|
133
|
-
React.createElement("h3", { style: { marginBottom: "10px" } }, "Mode Single avec Tooltips"),
|
|
134
|
-
React.createElement(ProSwitch, { pros: samplePros.slice(0, 15), selected: selected, mode: "single", onSelect: function (pros) {
|
|
135
|
-
setSelected(pros.map(function (p) { return p.proUserId; }));
|
|
136
|
-
action("onSelect")(pros);
|
|
137
|
-
}, onOrderChange: action("onOrderChange"), showTooltips: true, tooltipId: "single-select-tooltip" }),
|
|
138
|
-
React.createElement("div", { style: { marginTop: "10px", fontSize: "12px", color: "#666" } }, "\uD83D\uDCA1 Survolez les avatars pour voir les tooltips")));
|
|
139
|
-
};
|
|
140
|
-
export var MultiSelectOverflow = function () {
|
|
141
|
-
var _a = useState(["1", "2"]), selected = _a[0], setSelected = _a[1];
|
|
142
|
-
return (React.createElement("div", { style: { width: 200, padding: "20px" } },
|
|
143
|
-
React.createElement("h3", { style: { marginBottom: "10px" } }, "Mode Multiple avec Blocage"),
|
|
144
|
-
React.createElement(ProSwitch, { pros: samplePros, selected: selected, mode: "multiple", onSelect: function (pros) {
|
|
145
|
-
setSelected(pros.map(function (p) { return p.proUserId; }));
|
|
146
|
-
action("onSelect")(pros);
|
|
147
|
-
}, onOrderChange: action("onOrderChange"), showTooltips: true, tooltipId: "multi-select-tooltip" }),
|
|
148
|
-
React.createElement("div", { style: { marginTop: "10px", fontSize: "12px", color: "#666" } },
|
|
149
|
-
"\uD83D\uDCA1 Survolez les avatars pour voir les tooltips",
|
|
150
|
-
React.createElement("br", null),
|
|
151
|
-
"\uD83D\uDD12 Essayez de d\u00E9s\u00E9lectionner le dernier pro (impossible)")));
|
|
152
|
-
};
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
declare namespace _default {
|
|
2
|
-
export let title: string;
|
|
3
|
-
export { ProSwitchModal as component };
|
|
4
|
-
export let tags: string[];
|
|
5
|
-
export namespace argTypes {
|
|
6
|
-
namespace open {
|
|
7
|
-
let control: boolean;
|
|
8
|
-
}
|
|
9
|
-
namespace pros {
|
|
10
|
-
let control_1: boolean;
|
|
11
|
-
export { control_1 as control };
|
|
12
|
-
}
|
|
13
|
-
namespace selected {
|
|
14
|
-
let control_2: boolean;
|
|
15
|
-
export { control_2 as control };
|
|
16
|
-
}
|
|
17
|
-
namespace mode {
|
|
18
|
-
export namespace control_3 {
|
|
19
|
-
let type: string;
|
|
20
|
-
let options: string[];
|
|
21
|
-
}
|
|
22
|
-
export { control_3 as control };
|
|
23
|
-
}
|
|
24
|
-
namespace onClosePortal {
|
|
25
|
-
let action: string;
|
|
26
|
-
}
|
|
27
|
-
namespace onOpenPortal {
|
|
28
|
-
let action_1: string;
|
|
29
|
-
export { action_1 as action };
|
|
30
|
-
}
|
|
31
|
-
namespace onOrderChange {
|
|
32
|
-
let action_2: string;
|
|
33
|
-
export { action_2 as action };
|
|
34
|
-
}
|
|
35
|
-
namespace onSelect {
|
|
36
|
-
let action_3: string;
|
|
37
|
-
export { action_3 as action };
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
export namespace parameters {
|
|
41
|
-
namespace backgrounds {
|
|
42
|
-
let _default: string;
|
|
43
|
-
export { _default as default };
|
|
44
|
-
export let values: {
|
|
45
|
-
name: string;
|
|
46
|
-
value: string;
|
|
47
|
-
}[];
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
export default _default;
|
|
52
|
-
export const Default: any;
|
|
53
|
-
export const Single: any;
|
|
54
|
-
export const Reorder: any;
|
|
55
|
-
export const Scroll: any;
|
|
56
|
-
export const FallbackInitiales: any;
|
|
57
|
-
export const Responsive: any;
|
|
58
|
-
export const ResponsiveMobile: any;
|
|
59
|
-
export const FewProfiles: any;
|
|
60
|
-
export function TestBlocking(): React.JSX.Element;
|
|
61
|
-
import ProSwitchModal from "./ProSwitchModal";
|
|
62
|
-
import React from "react";
|