allaw-ui 3.4.1 → 3.4.2
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/tsconfig.tsbuildinfo +1 -0
- package/package.json +1 -1
- package/dist/app/[job]/[profile]/common/ProfileClientWrapper.d.ts +0 -0
- package/dist/app/[job]/[profile]/common/ProfileClientWrapper.js +0 -0
- package/dist/app/[job]/[profile]/page.d.ts +0 -0
- package/dist/app/[job]/[profile]/page.js +0 -0
- package/dist/components/atoms/buttons/ActionButton.d.ts +0 -18
- package/dist/components/atoms/buttons/ActionButton.js +0 -116
- package/dist/components/atoms/buttons/ActionButton.stories.d.ts +0 -108
- package/dist/components/atoms/buttons/ActionButton.stories.js +0 -167
- package/dist/components/atoms/buttons/ActionCircleButton.d.ts +0 -9
- package/dist/components/atoms/buttons/ActionCircleButton.js +0 -23
- 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.d.ts +0 -10
- package/dist/components/atoms/buttons/AgendaSlot.js +0 -7
- 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.d.ts +0 -8
- package/dist/components/atoms/buttons/FavoriteToggle.js +0 -11
- 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.d.ts +0 -9
- package/dist/components/atoms/buttons/FilterButton.js +0 -9
- 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.d.ts +0 -9
- package/dist/components/atoms/buttons/FilterButtonPrimary.js +0 -46
- 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.d.ts +0 -14
- package/dist/components/atoms/buttons/GhostButton.js +0 -11
- 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.d.ts +0 -11
- package/dist/components/atoms/buttons/IconButton.js +0 -14
- package/dist/components/atoms/buttons/IconButton.stories.d.ts +0 -49
- package/dist/components/atoms/buttons/IconButton.stories.js +0 -88
- package/dist/components/atoms/buttons/OAuthProviderButton.d.ts +0 -12
- package/dist/components/atoms/buttons/OAuthProviderButton.js +0 -165
- package/dist/components/atoms/buttons/OAuthProviderButton.stories.d.ts +0 -56
- package/dist/components/atoms/buttons/OAuthProviderButton.stories.js +0 -130
- package/dist/components/atoms/buttons/PendingDocuments.d.ts +0 -9
- package/dist/components/atoms/buttons/PendingDocuments.js +0 -15
- 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.d.ts +0 -19
- package/dist/components/atoms/buttons/PrimaryButton.js +0 -117
- package/dist/components/atoms/buttons/PrimaryButton.stories.d.ts +0 -108
- package/dist/components/atoms/buttons/PrimaryButton.stories.js +0 -168
- package/dist/components/atoms/buttons/SecondaryButton.d.ts +0 -22
- package/dist/components/atoms/buttons/SecondaryButton.js +0 -151
- 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.d.ts +0 -17
- package/dist/components/atoms/buttons/TabNavigation.js +0 -68
- 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.d.ts +0 -15
- package/dist/components/atoms/buttons/TertiaryButton.js +0 -23
- 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/buttons/index.d.ts +0 -24
- package/dist/components/atoms/buttons/index.js +0 -12
- package/dist/components/atoms/checkboxes/Checkbox.d.ts +0 -15
- package/dist/components/atoms/checkboxes/Checkbox.js +0 -20
- 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/checkboxes/index.d.ts +0 -2
- package/dist/components/atoms/checkboxes/index.js +0 -1
- package/dist/components/atoms/datepickers/Datepicker.d.ts +0 -15
- package/dist/components/atoms/datepickers/Datepicker.js +0 -151
- package/dist/components/atoms/datepickers/Datepicker.stories.d.ts +0 -90
- package/dist/components/atoms/datepickers/Datepicker.stories.js +0 -67
- package/dist/components/atoms/datepickers/index.d.ts +0 -2
- package/dist/components/atoms/datepickers/index.js +0 -1
- package/dist/components/atoms/featureCard/featureCard.d.ts +0 -15
- package/dist/components/atoms/featureCard/featureCard.js +0 -16
- 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/featureCard/index.d.ts +0 -2
- package/dist/components/atoms/featureCard/index.js +0 -1
- package/dist/components/atoms/filter/Filter.d.ts +0 -17
- package/dist/components/atoms/filter/Filter.js +0 -70
- 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/filter/index.d.ts +0 -2
- package/dist/components/atoms/filter/index.js +0 -1
- package/dist/components/atoms/filters/SingleFilter.d.ts +0 -16
- package/dist/components/atoms/filters/SingleFilter.js +0 -99
- package/dist/components/atoms/filters/SingleFilter.stories.d.ts +0 -7
- package/dist/components/atoms/filters/SingleFilter.stories.js +0 -33
- package/dist/components/atoms/filters/index.d.ts +0 -2
- package/dist/components/atoms/filters/index.js +0 -1
- package/dist/components/atoms/inputs/Input.d.ts +0 -29
- package/dist/components/atoms/inputs/Input.js +0 -94
- package/dist/components/atoms/inputs/Input.stories.d.ts +0 -63
- package/dist/components/atoms/inputs/Input.stories.js +0 -110
- package/dist/components/atoms/inputs/SearchBar.d.ts +0 -12
- package/dist/components/atoms/inputs/SearchBar.js +0 -20
- package/dist/components/atoms/inputs/SearchBar.stories.d.ts +0 -54
- package/dist/components/atoms/inputs/SearchBar.stories.js +0 -67
- package/dist/components/atoms/inputs/TextArea.d.ts +0 -25
- package/dist/components/atoms/inputs/TextArea.js +0 -77
- 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.d.ts +0 -14
- package/dist/components/atoms/inputs/VerificationCodeInput.js +0 -155
- 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/inputs/index.d.ts +0 -8
- package/dist/components/atoms/inputs/index.js +0 -4
- package/dist/components/atoms/progressBars/ProgressBar.d.ts +0 -18
- package/dist/components/atoms/progressBars/ProgressBar.js +0 -26
- 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/progressBars/index.d.ts +0 -2
- package/dist/components/atoms/progressBars/index.js +0 -1
- package/dist/components/atoms/radios/RadioButton.d.ts +0 -12
- package/dist/components/atoms/radios/RadioButton.js +0 -10
- package/dist/components/atoms/radios/RadioButton.stories.d.ts +0 -36
- package/dist/components/atoms/radios/RadioButton.stories.js +0 -75
- package/dist/components/atoms/radios/SelectCard.d.ts +0 -24
- package/dist/components/atoms/radios/SelectCard.js +0 -100
- 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/radios/index.d.ts +0 -4
- package/dist/components/atoms/radios/index.js +0 -2
- package/dist/components/atoms/selects/ComboBox.d.ts +0 -28
- package/dist/components/atoms/selects/ComboBox.js +0 -172
- 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.d.ts +0 -25
- package/dist/components/atoms/selects/Select.js +0 -240
- package/dist/components/atoms/selects/Select.stories.d.ts +0 -95
- package/dist/components/atoms/selects/Select.stories.js +0 -161
- package/dist/components/atoms/selects/SelectableListItem.d.ts +0 -14
- package/dist/components/atoms/selects/SelectableListItem.js +0 -19
- 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/selects/index.d.ts +0 -6
- package/dist/components/atoms/selects/index.js +0 -3
- package/dist/components/atoms/tags/AppointementStatusTag.d.ts +0 -8
- package/dist/components/atoms/tags/AppointementStatusTag.js +0 -42
- 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.d.ts +0 -8
- package/dist/components/atoms/tags/FolderStatusTag.js +0 -25
- 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/OtherStatusTag.d.ts +0 -13
- package/dist/components/atoms/tags/OtherStatusTag.js +0 -15
- package/dist/components/atoms/tags/OtherStatusTag.stories.d.ts +0 -97
- package/dist/components/atoms/tags/OtherStatusTag.stories.js +0 -151
- package/dist/components/atoms/tags/index.d.ts +0 -6
- package/dist/components/atoms/tags/index.js +0 -3
- package/dist/components/atoms/typography/CardDate.d.ts +0 -11
- package/dist/components/atoms/typography/CardDate.js +0 -52
- 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.d.ts +0 -16
- package/dist/components/atoms/typography/Heading.js +0 -39
- 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.d.ts +0 -15
- package/dist/components/atoms/typography/Link.js +0 -35
- 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.d.ts +0 -14
- package/dist/components/atoms/typography/Paragraph.js +0 -33
- 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.d.ts +0 -9
- package/dist/components/atoms/typography/SmallTitle.js +0 -7
- 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.d.ts +0 -9
- package/dist/components/atoms/typography/Subtitle.js +0 -7
- 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.d.ts +0 -14
- package/dist/components/atoms/typography/TinyInfo.js +0 -18
- 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/typography/index.d.ts +0 -12
- package/dist/components/atoms/typography/index.js +0 -6
- package/dist/components/atoms/uiVariables/AnimatedBorder.d.ts +0 -4
- package/dist/components/atoms/uiVariables/AnimatedBorder.js +0 -11
- 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.d.ts +0 -6
- package/dist/components/atoms/uiVariables/BorderRadius.js +0 -12
- 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.d.ts +0 -6
- package/dist/components/atoms/uiVariables/Shadows.js +0 -11
- 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.d.ts +0 -6
- package/dist/components/atoms/uiVariables/Strokes.js +0 -10
- package/dist/components/atoms/uiVariables/Strokes.stories.d.ts +0 -18
- package/dist/components/atoms/uiVariables/Strokes.stories.js +0 -34
- package/dist/components/atoms/uiVariables/index.d.ts +0 -3
- package/dist/components/atoms/uiVariables/index.js +0 -3
- package/dist/components/molecules/appointmentSlot/AppointmentSlot.d.ts +0 -26
- package/dist/components/molecules/appointmentSlot/AppointmentSlot.js +0 -109
- package/dist/components/molecules/appointmentSlot/AppointmentSlot.stories.d.ts +0 -70
- package/dist/components/molecules/appointmentSlot/AppointmentSlot.stories.js +0 -186
- package/dist/components/molecules/appointmentSlot/index.d.ts +0 -2
- package/dist/components/molecules/appointmentSlot/index.js +0 -1
- package/dist/components/molecules/banner/Banner.d.ts +0 -20
- package/dist/components/molecules/banner/Banner.js +0 -28
- 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/banner/index.d.ts +0 -2
- package/dist/components/molecules/banner/index.js +0 -1
- package/dist/components/molecules/billingCount/BillingCount.d.ts +0 -11
- package/dist/components/molecules/billingCount/BillingCount.js +0 -169
- 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/billingCount/index.d.ts +0 -2
- package/dist/components/molecules/billingCount/index.js +0 -1
- package/dist/components/molecules/blogCard/BlogCard.d.ts +0 -13
- package/dist/components/molecules/blogCard/BlogCard.js +0 -32
- 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/blogCard/index.d.ts +0 -2
- package/dist/components/molecules/blogCard/index.js +0 -1
- package/dist/components/molecules/blogFooter/BlogFooter.d.ts +0 -12
- package/dist/components/molecules/blogFooter/BlogFooter.js +0 -14
- 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/blogFooter/index.d.ts +0 -2
- package/dist/components/molecules/blogFooter/index.js +0 -1
- package/dist/components/molecules/blogHeader/BlogHeader.d.ts +0 -11
- package/dist/components/molecules/blogHeader/BlogHeader.js +0 -21
- 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/blogHeader/index.d.ts +0 -2
- package/dist/components/molecules/blogHeader/index.js +0 -1
- package/dist/components/molecules/blogText/BlogText.d.ts +0 -7
- package/dist/components/molecules/blogText/BlogText.js +0 -11
- 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/blogText/index.d.ts +0 -2
- package/dist/components/molecules/blogText/index.js +0 -1
- package/dist/components/molecules/blogTextImageBlock/BlogTextImageBlock.d.ts +0 -8
- package/dist/components/molecules/blogTextImageBlock/BlogTextImageBlock.js +0 -15
- 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/blogTextImageBlock/index.d.ts +0 -2
- package/dist/components/molecules/blogTextImageBlock/index.js +0 -1
- package/dist/components/molecules/brands/Brands.d.ts +0 -9
- package/dist/components/molecules/brands/Brands.js +0 -13
- 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/brands/index.d.ts +0 -2
- package/dist/components/molecules/brands/index.js +0 -1
- package/dist/components/molecules/breadcrumb/Breadcrumb.d.ts +0 -12
- package/dist/components/molecules/breadcrumb/Breadcrumb.js +0 -12
- 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/breadcrumb/index.d.ts +0 -2
- package/dist/components/molecules/breadcrumb/index.js +0 -1
- package/dist/components/molecules/caseCard/CaseCard.d.ts +0 -23
- package/dist/components/molecules/caseCard/CaseCard.js +0 -19
- 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/caseCard/index.d.ts +0 -2
- package/dist/components/molecules/caseCard/index.js +0 -1
- package/dist/components/molecules/caseCardCompact/CaseCardCompact.d.ts +0 -16
- package/dist/components/molecules/caseCardCompact/CaseCardCompact.js +0 -20
- 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/caseCardCompact/index.d.ts +0 -2
- package/dist/components/molecules/caseCardCompact/index.js +0 -1
- 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/caseLinkCard/CaseLinkCard.d.ts +0 -13
- package/dist/components/molecules/caseLinkCard/CaseLinkCard.js +0 -37
- package/dist/components/molecules/caseLinkCard/index.d.ts +0 -2
- package/dist/components/molecules/caseLinkCard/index.js +0 -1
- package/dist/components/molecules/checkboxForm/CheckboxForm.d.ts +0 -20
- package/dist/components/molecules/checkboxForm/CheckboxForm.js +0 -30
- 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.d.ts +0 -20
- package/dist/components/molecules/checkboxForm/ColoredCheckbox.js +0 -81
- 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/checkboxForm/index.d.ts +0 -4
- package/dist/components/molecules/checkboxForm/index.js +0 -2
- package/dist/components/molecules/clientLinkCard/ClientLinkCard.d.ts +0 -15
- package/dist/components/molecules/clientLinkCard/ClientLinkCard.js +0 -18
- 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/clientLinkCard/index.d.ts +0 -2
- package/dist/components/molecules/clientLinkCard/index.js +0 -1
- package/dist/components/molecules/contactCard/ContactCard.d.ts +0 -16
- package/dist/components/molecules/contactCard/ContactCard.js +0 -31
- package/dist/components/molecules/contactCard/ContactCard.stories.d.ts +0 -68
- package/dist/components/molecules/contactCard/ContactCard.stories.js +0 -80
- package/dist/components/molecules/contactCard/DetailedContactCard.d.ts +0 -18
- package/dist/components/molecules/contactCard/DetailedContactCard.js +0 -61
- 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/contactCard/index.d.ts +0 -4
- package/dist/components/molecules/contactCard/index.js +0 -2
- package/dist/components/molecules/datepickerForm/DatepickerForm.d.ts +0 -16
- package/dist/components/molecules/datepickerForm/DatepickerForm.js +0 -13
- package/dist/components/molecules/datepickerForm/DatepickerForm.stories.d.ts +0 -164
- package/dist/components/molecules/datepickerForm/DatepickerForm.stories.js +0 -113
- package/dist/components/molecules/datepickerForm/index.d.ts +0 -2
- package/dist/components/molecules/datepickerForm/index.js +0 -1
- package/dist/components/molecules/documentCard/DocumentCard.d.ts +0 -16
- package/dist/components/molecules/documentCard/DocumentCard.js +0 -124
- package/dist/components/molecules/documentCard/DocumentCard.stories.d.ts +0 -71
- package/dist/components/molecules/documentCard/DocumentCard.stories.js +0 -100
- package/dist/components/molecules/documentCard/index.d.ts +0 -2
- package/dist/components/molecules/documentCard/index.js +0 -1
- package/dist/components/molecules/employeeCard/EmployeeCard.d.ts +0 -15
- package/dist/components/molecules/employeeCard/EmployeeCard.js +0 -34
- 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/employeeCard/index.d.ts +0 -2
- package/dist/components/molecules/employeeCard/index.js +0 -1
- package/dist/components/molecules/entityAdminCard/EntityAdminCard.d.ts +0 -13
- package/dist/components/molecules/entityAdminCard/EntityAdminCard.js +0 -29
- package/dist/components/molecules/entityAdminCard/entityAdminCard.stories.d.ts +0 -8
- package/dist/components/molecules/entityAdminCard/entityAdminCard.stories.js +0 -35
- package/dist/components/molecules/entityCard/EntityCard.d.ts +0 -12
- package/dist/components/molecules/entityCard/EntityCard.js +0 -53
- package/dist/components/molecules/entityCard/EntityCard.stories.d.ts +0 -7
- package/dist/components/molecules/entityCard/EntityCard.stories.js +0 -30
- package/dist/components/molecules/entityCard/index.d.ts +0 -2
- package/dist/components/molecules/entityCard/index.js +0 -1
- package/dist/components/molecules/featureGrid/FeatureGrid.d.ts +0 -8
- package/dist/components/molecules/featureGrid/FeatureGrid.js +0 -27
- 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/featureGrid/index.d.ts +0 -2
- package/dist/components/molecules/featureGrid/index.js +0 -1
- package/dist/components/molecules/fileUploader/FileUploader.d.ts +0 -41
- package/dist/components/molecules/fileUploader/FileUploader.js +0 -346
- package/dist/components/molecules/fileUploader/FileUploader.stories.d.ts +0 -107
- package/dist/components/molecules/fileUploader/FileUploader.stories.js +0 -232
- package/dist/components/molecules/fileUploader/ImageCropperModal.d.ts +0 -15
- package/dist/components/molecules/fileUploader/ImageCropperModal.js +0 -212
- package/dist/components/molecules/fileUploader/index.d.ts +0 -2
- package/dist/components/molecules/fileUploader/index.js +0 -1
- package/dist/components/molecules/flexContent/FlexContent.d.ts +0 -18
- package/dist/components/molecules/flexContent/FlexContent.js +0 -21
- 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/flexContent/index.d.ts +0 -2
- package/dist/components/molecules/flexContent/index.js +0 -1
- package/dist/components/molecules/frameCTA/FrameCTA.d.ts +0 -19
- package/dist/components/molecules/frameCTA/FrameCTA.js +0 -18
- 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/frameCTA/index.d.ts +0 -2
- package/dist/components/molecules/frameCTA/index.js +0 -1
- package/dist/components/molecules/heroSection/HeroSection.d.ts +0 -21
- package/dist/components/molecules/heroSection/HeroSection.js +0 -20
- 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/heroSection/index.d.ts +0 -2
- package/dist/components/molecules/heroSection/index.js +0 -1
- package/dist/components/molecules/loadingBox/LoadingBox.d.ts +0 -12
- package/dist/components/molecules/loadingBox/LoadingBox.js +0 -11
- 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/loadingBox/index.d.ts +0 -2
- package/dist/components/molecules/loadingBox/index.js +0 -1
- package/dist/components/molecules/modal/Modal.d.ts +0 -32
- package/dist/components/molecules/modal/Modal.js +0 -97
- package/dist/components/molecules/modal/Modal.stories.d.ts +0 -87
- package/dist/components/molecules/modal/Modal.stories.js +0 -126
- package/dist/components/molecules/modal/index.d.ts +0 -2
- package/dist/components/molecules/modal/index.js +0 -1
- package/dist/components/molecules/pagination/Pagination.d.ts +0 -10
- package/dist/components/molecules/pagination/Pagination.js +0 -64
- 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/pagination/index.d.ts +0 -2
- package/dist/components/molecules/pagination/index.js +0 -1
- package/dist/components/molecules/proCard/ProCard.d.ts +0 -14
- package/dist/components/molecules/proCard/ProCard.js +0 -30
- 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/proCard/index.d.ts +0 -2
- package/dist/components/molecules/proCard/index.js +0 -1
- package/dist/components/molecules/questionAnswer/QuestionAnswer.d.ts +0 -10
- package/dist/components/molecules/questionAnswer/QuestionAnswer.js +0 -33
- 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/questionAnswer/index.d.ts +0 -2
- package/dist/components/molecules/questionAnswer/index.js +0 -1
- package/dist/components/molecules/radioForm/RadioForm.d.ts +0 -12
- package/dist/components/molecules/radioForm/RadioForm.js +0 -27
- package/dist/components/molecules/radioForm/RadioForm.stories.d.ts +0 -27
- package/dist/components/molecules/radioForm/RadioForm.stories.js +0 -52
- package/dist/components/molecules/radioForm/index.d.ts +0 -2
- package/dist/components/molecules/radioForm/index.js +0 -1
- package/dist/components/molecules/selectForm/SelectForm.d.ts +0 -19
- package/dist/components/molecules/selectForm/SelectForm.js +0 -15
- package/dist/components/molecules/selectForm/SelectForm.stories.d.ts +0 -72
- package/dist/components/molecules/selectForm/SelectForm.stories.js +0 -104
- package/dist/components/molecules/selectForm/index.d.ts +0 -2
- package/dist/components/molecules/selectForm/index.js +0 -1
- package/dist/components/molecules/stepper/ConfirmationModal.d.ts +0 -14
- package/dist/components/molecules/stepper/ConfirmationModal.js +0 -26
- package/dist/components/molecules/stepper/Stepper.d.ts +0 -51
- package/dist/components/molecules/stepper/Stepper.js +0 -156
- package/dist/components/molecules/stepper/Stepper.stories.d.ts +0 -52
- package/dist/components/molecules/stepper/Stepper.stories.js +0 -206
- package/dist/components/molecules/stepper/index.d.ts +0 -2
- package/dist/components/molecules/stepper/index.js +0 -1
- package/dist/index.d.ts +0 -109
- package/dist/index.js +0 -108
- 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
- package/dist/utils/regex.d.ts +0 -5
- package/dist/utils/regex.js +0 -7
- package/dist/utils/utils.d.ts +0 -3
- package/dist/utils/utils.js +0 -58
|
@@ -1,346 +0,0 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
11
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
12
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
13
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
14
|
-
function step(op) {
|
|
15
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
16
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
17
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
18
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
19
|
-
switch (op[0]) {
|
|
20
|
-
case 0: case 1: t = op; break;
|
|
21
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
22
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
23
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
24
|
-
default:
|
|
25
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
26
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
27
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
28
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
29
|
-
if (t[2]) _.ops.pop();
|
|
30
|
-
_.trys.pop(); continue;
|
|
31
|
-
}
|
|
32
|
-
op = body.call(thisArg, _);
|
|
33
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
34
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
import React, { useState, useRef, useEffect } from "react";
|
|
38
|
-
import Image from "next/image";
|
|
39
|
-
import styles from "./FileUploader.module.css";
|
|
40
|
-
import ImageCropperModal from "./ImageCropperModal";
|
|
41
|
-
import IconButton from "../../atoms/buttons/IconButton";
|
|
42
|
-
import TertiaryButton from "../../atoms/buttons/TertiaryButton";
|
|
43
|
-
var FileUploader = function (_a) {
|
|
44
|
-
var acceptedExtensions = _a.acceptedExtensions, maxFileSizeMB = _a.maxFileSizeMB, _b = _a.enableDragAndDrop, enableDragAndDrop = _b === void 0 ? true : _b, _c = _a.enableCropping, enableCropping = _c === void 0 ? false : _c, _d = _a.cropShape, cropShape = _d === void 0 ? "square" : _d, iconUrl = _a.iconUrl, descriptionParts = _a.descriptionParts, onFileRead = _a.onFileRead, onFileRemove = _a.onFileRemove, _e = _a.uploadProgress, uploadProgress = _e === void 0 ? 0 : _e, _f = _a.isLoading, isLoading = _f === void 0 ? false : _f, _g = _a.autoManageProgress, autoManageProgress = _g === void 0 ? false : _g, _h = _a.progressSteps, progressSteps = _h === void 0 ? 10 : _h, _j = _a.progressInterval, progressInterval = _j === void 0 ? 500 : _j, _k = _a.errorMessage, errorMessage = _k === void 0 ? null : _k, _l = _a.buttonLabel, buttonLabel = _l === void 0 ? "Choisir un fichier" : _l, _m = _a.acceptedLabel, acceptedLabel = _m === void 0 ? "Format accepté :" : _m, _o = _a.maxSizeLabel, maxSizeLabel = _o === void 0 ? "Taille maximale :" : _o, fileName = _a.fileName, fileSize = _a.fileSize, _p = _a.filePresentationLabel, filePresentationLabel = _p === void 0 ? "Voici votre fichier." : _p, initialFile = _a.initialFile, initialPreviewUrl = _a.initialPreviewUrl, initialCropMetadata = _a.initialCropMetadata, originalFileName = _a.originalFileName;
|
|
45
|
-
var _q = useState(initialFile || null), selectedFile = _q[0], setSelectedFile = _q[1];
|
|
46
|
-
var _r = useState(null), fileContent = _r[0], setFileContent = _r[1];
|
|
47
|
-
var _s = useState(false), isHovering = _s[0], setIsHovering = _s[1];
|
|
48
|
-
var _t = useState(false), showCropper = _t[0], setShowCropper = _t[1];
|
|
49
|
-
var _u = useState(initialPreviewUrl || null), previewUrl = _u[0], setPreviewUrl = _u[1];
|
|
50
|
-
var _v = useState(initialCropMetadata || null), cropMetadata = _v[0], setCropMetadata = _v[1];
|
|
51
|
-
var _w = useState(0), internalProgress = _w[0], setInternalProgress = _w[1];
|
|
52
|
-
var progressIntervalRef = useRef(null);
|
|
53
|
-
var fileInputRef = useRef(null);
|
|
54
|
-
var _x = useState(originalFileName), currentFileName = _x[0], setCurrentFileName = _x[1];
|
|
55
|
-
useEffect(function () {
|
|
56
|
-
if (initialFile) {
|
|
57
|
-
setSelectedFile(initialFile);
|
|
58
|
-
initialFile.arrayBuffer().then(function (content) {
|
|
59
|
-
setFileContent(content);
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
if (initialPreviewUrl) {
|
|
63
|
-
setPreviewUrl(initialPreviewUrl);
|
|
64
|
-
}
|
|
65
|
-
if (initialCropMetadata) {
|
|
66
|
-
setCropMetadata(initialCropMetadata);
|
|
67
|
-
}
|
|
68
|
-
if (originalFileName) {
|
|
69
|
-
setCurrentFileName(originalFileName);
|
|
70
|
-
}
|
|
71
|
-
}, [initialFile, initialPreviewUrl, initialCropMetadata, originalFileName]);
|
|
72
|
-
useEffect(function () {
|
|
73
|
-
return function () {
|
|
74
|
-
if (previewUrl && !initialPreviewUrl) {
|
|
75
|
-
URL.revokeObjectURL(previewUrl);
|
|
76
|
-
}
|
|
77
|
-
};
|
|
78
|
-
}, [previewUrl, initialPreviewUrl]);
|
|
79
|
-
var startProgressSimulation = function () {
|
|
80
|
-
stopProgressSimulation();
|
|
81
|
-
setInternalProgress(1);
|
|
82
|
-
progressIntervalRef.current = setInterval(function () {
|
|
83
|
-
setInternalProgress(function (prev) {
|
|
84
|
-
if (prev >= progressSteps) {
|
|
85
|
-
stopProgressSimulation();
|
|
86
|
-
return progressSteps;
|
|
87
|
-
}
|
|
88
|
-
return prev + 1;
|
|
89
|
-
});
|
|
90
|
-
}, progressInterval);
|
|
91
|
-
};
|
|
92
|
-
var stopProgressSimulation = function () {
|
|
93
|
-
if (progressIntervalRef.current) {
|
|
94
|
-
clearInterval(progressIntervalRef.current);
|
|
95
|
-
progressIntervalRef.current = null;
|
|
96
|
-
}
|
|
97
|
-
};
|
|
98
|
-
var resetFileInput = function () {
|
|
99
|
-
if (fileInputRef.current) {
|
|
100
|
-
fileInputRef.current.value = "";
|
|
101
|
-
}
|
|
102
|
-
};
|
|
103
|
-
var validateFile = function (file) {
|
|
104
|
-
var _a;
|
|
105
|
-
var fileExtension = ".".concat((_a = file.name.split(".").pop()) === null || _a === void 0 ? void 0 : _a.toLowerCase());
|
|
106
|
-
var isValidExtension = acceptedExtensions.includes(fileExtension);
|
|
107
|
-
var isValidSize = file.size <= maxFileSizeMB * 1024 * 1024;
|
|
108
|
-
return isValidExtension && isValidSize;
|
|
109
|
-
};
|
|
110
|
-
var isImageFile = function (file) {
|
|
111
|
-
var _a;
|
|
112
|
-
var fileExtension = ".".concat((_a = file.name.split(".").pop()) === null || _a === void 0 ? void 0 : _a.toLowerCase());
|
|
113
|
-
var imageExtensions = [".jpg", ".jpeg", ".png", ".gif", ".webp", ".bmp"];
|
|
114
|
-
return imageExtensions.includes(fileExtension);
|
|
115
|
-
};
|
|
116
|
-
var handleFileSelect = function (event) { return __awaiter(void 0, void 0, void 0, function () {
|
|
117
|
-
var file;
|
|
118
|
-
return __generator(this, function (_a) {
|
|
119
|
-
if (event.target.files && event.target.files.length > 0) {
|
|
120
|
-
file = event.target.files[0];
|
|
121
|
-
processFile(file);
|
|
122
|
-
}
|
|
123
|
-
return [2 /*return*/];
|
|
124
|
-
});
|
|
125
|
-
}); };
|
|
126
|
-
var handleDragOver = function (event) {
|
|
127
|
-
event.preventDefault();
|
|
128
|
-
setIsHovering(true);
|
|
129
|
-
};
|
|
130
|
-
var handleDragLeave = function () {
|
|
131
|
-
setIsHovering(false);
|
|
132
|
-
};
|
|
133
|
-
var handleDrop = function (event) { return __awaiter(void 0, void 0, void 0, function () {
|
|
134
|
-
var file;
|
|
135
|
-
return __generator(this, function (_a) {
|
|
136
|
-
event.preventDefault();
|
|
137
|
-
setIsHovering(false);
|
|
138
|
-
if (event.dataTransfer.files && event.dataTransfer.files.length > 0) {
|
|
139
|
-
file = event.dataTransfer.files[0];
|
|
140
|
-
processFile(file);
|
|
141
|
-
}
|
|
142
|
-
return [2 /*return*/];
|
|
143
|
-
});
|
|
144
|
-
}); };
|
|
145
|
-
var processFile = function (file) { return __awaiter(void 0, void 0, void 0, function () {
|
|
146
|
-
var content, url, error_1;
|
|
147
|
-
return __generator(this, function (_a) {
|
|
148
|
-
switch (_a.label) {
|
|
149
|
-
case 0:
|
|
150
|
-
if (!validateFile(file)) {
|
|
151
|
-
setSelectedFile(null);
|
|
152
|
-
setPreviewUrl(null);
|
|
153
|
-
setCropMetadata(null);
|
|
154
|
-
setCurrentFileName(undefined);
|
|
155
|
-
return [2 /*return*/];
|
|
156
|
-
}
|
|
157
|
-
_a.label = 1;
|
|
158
|
-
case 1:
|
|
159
|
-
_a.trys.push([1, 3, , 4]);
|
|
160
|
-
return [4 /*yield*/, file.arrayBuffer()];
|
|
161
|
-
case 2:
|
|
162
|
-
content = _a.sent();
|
|
163
|
-
setFileContent(content);
|
|
164
|
-
setCurrentFileName(file.name);
|
|
165
|
-
if (isImageFile(file)) {
|
|
166
|
-
url = URL.createObjectURL(file);
|
|
167
|
-
setPreviewUrl(url);
|
|
168
|
-
if (!enableCropping) {
|
|
169
|
-
setCropMetadata({
|
|
170
|
-
zoom: 1,
|
|
171
|
-
offsetX: 0,
|
|
172
|
-
offsetY: 0,
|
|
173
|
-
shape: cropShape,
|
|
174
|
-
});
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
else {
|
|
178
|
-
setPreviewUrl(null);
|
|
179
|
-
setCropMetadata(null);
|
|
180
|
-
}
|
|
181
|
-
if (autoManageProgress && !(enableCropping && isImageFile(file))) {
|
|
182
|
-
startProgressSimulation();
|
|
183
|
-
}
|
|
184
|
-
if (enableCropping && isImageFile(file)) {
|
|
185
|
-
setSelectedFile(file);
|
|
186
|
-
setShowCropper(true);
|
|
187
|
-
}
|
|
188
|
-
else {
|
|
189
|
-
setSelectedFile(file);
|
|
190
|
-
onFileRead === null || onFileRead === void 0 ? void 0 : onFileRead(file, content);
|
|
191
|
-
}
|
|
192
|
-
return [3 /*break*/, 4];
|
|
193
|
-
case 3:
|
|
194
|
-
error_1 = _a.sent();
|
|
195
|
-
console.error("Error reading file:", error_1);
|
|
196
|
-
setSelectedFile(null);
|
|
197
|
-
setPreviewUrl(null);
|
|
198
|
-
setCropMetadata(null);
|
|
199
|
-
setCurrentFileName(undefined);
|
|
200
|
-
return [3 /*break*/, 4];
|
|
201
|
-
case 4: return [2 /*return*/];
|
|
202
|
-
}
|
|
203
|
-
});
|
|
204
|
-
}); };
|
|
205
|
-
var openCropModal = function () {
|
|
206
|
-
if (selectedFile && isImageFile(selectedFile)) {
|
|
207
|
-
setShowCropper(true);
|
|
208
|
-
}
|
|
209
|
-
};
|
|
210
|
-
var handleCropCancel = function () {
|
|
211
|
-
setShowCropper(false);
|
|
212
|
-
};
|
|
213
|
-
var handleCropConfirm = function (cropMetadata) {
|
|
214
|
-
setShowCropper(false);
|
|
215
|
-
setCropMetadata(cropMetadata);
|
|
216
|
-
if (autoManageProgress) {
|
|
217
|
-
startProgressSimulation();
|
|
218
|
-
}
|
|
219
|
-
if (selectedFile && fileContent) {
|
|
220
|
-
onFileRead === null || onFileRead === void 0 ? void 0 : onFileRead(selectedFile, fileContent, cropMetadata);
|
|
221
|
-
}
|
|
222
|
-
};
|
|
223
|
-
var handleFileDelete = function () {
|
|
224
|
-
if (previewUrl && !initialPreviewUrl) {
|
|
225
|
-
URL.revokeObjectURL(previewUrl);
|
|
226
|
-
}
|
|
227
|
-
if (autoManageProgress) {
|
|
228
|
-
stopProgressSimulation();
|
|
229
|
-
setInternalProgress(0);
|
|
230
|
-
}
|
|
231
|
-
setSelectedFile(null);
|
|
232
|
-
setFileContent(null);
|
|
233
|
-
setPreviewUrl(null);
|
|
234
|
-
setCropMetadata(null);
|
|
235
|
-
setCurrentFileName(undefined);
|
|
236
|
-
resetFileInput();
|
|
237
|
-
onFileRemove === null || onFileRemove === void 0 ? void 0 : onFileRemove();
|
|
238
|
-
};
|
|
239
|
-
var handleNewFileClick = function () {
|
|
240
|
-
var _a;
|
|
241
|
-
(_a = fileInputRef.current) === null || _a === void 0 ? void 0 : _a.click();
|
|
242
|
-
};
|
|
243
|
-
var formatFileSize = function (size) {
|
|
244
|
-
if (size < 1024) {
|
|
245
|
-
return "".concat(size, " octets");
|
|
246
|
-
}
|
|
247
|
-
else if (size < 1024 * 1024) {
|
|
248
|
-
return "".concat((size / 1024).toFixed(2), " Ko");
|
|
249
|
-
}
|
|
250
|
-
else {
|
|
251
|
-
return "".concat((size / (1024 * 1024)).toFixed(2), " Mo");
|
|
252
|
-
}
|
|
253
|
-
};
|
|
254
|
-
var displayProgress = autoManageProgress
|
|
255
|
-
? internalProgress
|
|
256
|
-
: uploadProgress;
|
|
257
|
-
var isLoadingState = autoManageProgress
|
|
258
|
-
? internalProgress > 0 && internalProgress < progressSteps
|
|
259
|
-
: isLoading;
|
|
260
|
-
var displayFileSize = fileSize !== undefined ? fileSize : selectedFile ? selectedFile.size : 0;
|
|
261
|
-
var displayFileName = fileName || (selectedFile ? selectedFile.name : "");
|
|
262
|
-
var isSelectedImage = selectedFile && isImageFile(selectedFile);
|
|
263
|
-
return (React.createElement("div", { className: styles.upload_main_container },
|
|
264
|
-
enableDragAndDrop ? (React.createElement("div", { className: "".concat(styles.upload_container, " ").concat(isHovering ? styles.drag_over : "", " ").concat(previewUrl ? styles.upload_container_with_preview : ""), onDragOver: handleDragOver, onDragLeave: handleDragLeave, onDrop: handleDrop, onClick: function () { var _a; return !previewUrl && ((_a = fileInputRef.current) === null || _a === void 0 ? void 0 : _a.click()); } },
|
|
265
|
-
previewUrl ? (React.createElement("div", { className: "".concat(styles.preview_container, " ").concat((cropMetadata === null || cropMetadata === void 0 ? void 0 : cropMetadata.shape) === "banner" || cropShape === "banner"
|
|
266
|
-
? styles.preview_container_banner
|
|
267
|
-
: ""), onClick: function (e) {
|
|
268
|
-
var _a;
|
|
269
|
-
if (!e.target.closest(".".concat(styles.preview_image_container))) {
|
|
270
|
-
(_a = fileInputRef.current) === null || _a === void 0 ? void 0 : _a.click();
|
|
271
|
-
}
|
|
272
|
-
} },
|
|
273
|
-
React.createElement("div", { className: "".concat(styles.preview_image_container, " ").concat(styles["preview_image_".concat((cropMetadata === null || cropMetadata === void 0 ? void 0 : cropMetadata.shape) || cropShape)]), onClick: function () { return enableCropping && openCropModal(); } },
|
|
274
|
-
React.createElement("div", { className: styles.preview_image_wrapper, style: {
|
|
275
|
-
transform: cropMetadata
|
|
276
|
-
? "translate(".concat(cropMetadata.offsetX, "px, ").concat(cropMetadata.offsetY, "px) scale(").concat(cropMetadata.zoom, ")")
|
|
277
|
-
: "scale(1)",
|
|
278
|
-
} },
|
|
279
|
-
React.createElement("img", { src: previewUrl, alt: displayFileName, className: styles.preview_image, draggable: false }))),
|
|
280
|
-
enableCropping && (React.createElement("div", { className: styles.edit_button_container, onClick: function (e) {
|
|
281
|
-
e.stopPropagation();
|
|
282
|
-
openCropModal();
|
|
283
|
-
} },
|
|
284
|
-
React.createElement(IconButton, { style: "largeFilled", iconName: "allaw-icon-edit-2" }))))) : (React.createElement("div", { className: styles.upload_content },
|
|
285
|
-
React.createElement("div", { className: styles.upload_icons },
|
|
286
|
-
React.createElement("div", { className: styles.upload_file_icon },
|
|
287
|
-
React.createElement("i", { className: "allaw-icon-file" })),
|
|
288
|
-
React.createElement("div", { className: styles.upload_icon_container },
|
|
289
|
-
React.createElement("div", { className: styles.upload_icon },
|
|
290
|
-
React.createElement("i", { className: "allaw-icon-export" })))),
|
|
291
|
-
React.createElement("div", { className: styles.upload_description },
|
|
292
|
-
React.createElement("span", null,
|
|
293
|
-
"Glissez-d\u00E9posez votre fichier, ou",
|
|
294
|
-
" ",
|
|
295
|
-
React.createElement("span", { className: styles.btn_tertiary }, buttonLabel))))),
|
|
296
|
-
React.createElement("input", { id: "file-upload", ref: fileInputRef, type: "file", accept: acceptedExtensions.join(","), style: { display: "none" }, onChange: handleFileSelect }))) : (React.createElement("div", { className: styles.manual_upload_container },
|
|
297
|
-
React.createElement("button", { className: styles.file_upload_button, onClick: function () { var _a; return (_a = fileInputRef.current) === null || _a === void 0 ? void 0 : _a.click(); } },
|
|
298
|
-
React.createElement("span", { className: styles.btn_tertiary }, buttonLabel),
|
|
299
|
-
React.createElement("input", { id: "file-upload", ref: fileInputRef, type: "file", accept: acceptedExtensions.join(","), style: { display: "none" }, onChange: handleFileSelect })))),
|
|
300
|
-
previewUrl ? (React.createElement("div", { className: styles.file_info_container },
|
|
301
|
-
filePresentationLabel && (React.createElement("span", { className: styles.file_presentation_label }, filePresentationLabel)),
|
|
302
|
-
React.createElement(TertiaryButton, { label: "Charger ".concat(isSelectedImage ? "une autre image ?" : "un autre fichier ?"), color: "bleu-allaw", variant: true, onClick: handleNewFileClick }))) : (React.createElement("div", { className: styles.limits },
|
|
303
|
-
React.createElement("div", { className: styles.format },
|
|
304
|
-
React.createElement("span", { className: styles.limit_text },
|
|
305
|
-
acceptedLabel,
|
|
306
|
-
" ",
|
|
307
|
-
acceptedExtensions.join(", "))),
|
|
308
|
-
React.createElement("div", { className: styles.size },
|
|
309
|
-
React.createElement("span", { className: styles.limit_text },
|
|
310
|
-
maxSizeLabel,
|
|
311
|
-
" ",
|
|
312
|
-
maxFileSizeMB,
|
|
313
|
-
" Mo")))),
|
|
314
|
-
descriptionParts && (React.createElement("p", { className: styles.description },
|
|
315
|
-
descriptionParts.beforeLink,
|
|
316
|
-
" ",
|
|
317
|
-
React.createElement("a", { href: descriptionParts.linkUrl, target: "_blank", rel: "noopener noreferrer", className: styles.description_link }, descriptionParts.linkLabel),
|
|
318
|
-
" ",
|
|
319
|
-
descriptionParts.afterLink)),
|
|
320
|
-
errorMessage && (React.createElement("div", { className: styles.uploaded_file_container },
|
|
321
|
-
React.createElement("div", { className: styles.uploaded_file_error },
|
|
322
|
-
React.createElement("span", { className: styles.error_message }, errorMessage)))),
|
|
323
|
-
(isLoadingState || selectedFile || fileName) && (React.createElement("div", { className: styles.uploaded_file_container },
|
|
324
|
-
React.createElement("div", { className: styles.uploaded_file_content },
|
|
325
|
-
React.createElement("div", { className: styles.uploaded_file_icon }, iconUrl ? (React.createElement(Image, { src: iconUrl, alt: "File icon", className: styles.file_icon, width: 20, height: 20 })) : (React.createElement("i", { className: "allaw-icon-file" }))),
|
|
326
|
-
React.createElement("div", { className: styles.uploaded_file_name_size },
|
|
327
|
-
React.createElement("div", { className: styles.uploaded_file_name },
|
|
328
|
-
React.createElement("span", { className: styles.file_name }, displayFileName || currentFileName || "Analyse en cours..."),
|
|
329
|
-
selectedFile && (React.createElement("i", { className: "allaw-icon-check ".concat(styles.success_icon) }))),
|
|
330
|
-
React.createElement("div", { className: styles.uploaded_file_size },
|
|
331
|
-
React.createElement("span", { className: styles.file_size }, displayFileSize > 0
|
|
332
|
-
? formatFileSize(displayFileSize)
|
|
333
|
-
: (selectedFile === null || selectedFile === void 0 ? void 0 : selectedFile.size)
|
|
334
|
-
? formatFileSize(selectedFile.size)
|
|
335
|
-
: ""))),
|
|
336
|
-
selectedFile && (React.createElement("div", { className: styles.uploaded_file_delete_container },
|
|
337
|
-
React.createElement("div", { className: styles.uploaded_file_delete, onClick: handleFileDelete },
|
|
338
|
-
React.createElement("i", { className: "allaw-icon-close" }))))),
|
|
339
|
-
displayProgress > 0 && (React.createElement("div", { className: styles.uploaded_file_progress_bar },
|
|
340
|
-
React.createElement("div", { className: styles.progress_bar_container },
|
|
341
|
-
React.createElement("div", { className: styles.progress_bar_fill, style: {
|
|
342
|
-
width: "".concat((displayProgress / progressSteps) * 100, "%"),
|
|
343
|
-
} })))))),
|
|
344
|
-
showCropper && selectedFile && (React.createElement(ImageCropperModal, { file: selectedFile, shape: cropShape, onCancel: handleCropCancel, onConfirm: handleCropConfirm }))));
|
|
345
|
-
};
|
|
346
|
-
export default FileUploader;
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
declare namespace _default {
|
|
2
|
-
export let title: string;
|
|
3
|
-
export { FileUploader as component };
|
|
4
|
-
export let tags: string[];
|
|
5
|
-
export namespace parameters {
|
|
6
|
-
namespace backgrounds {
|
|
7
|
-
let _default: string;
|
|
8
|
-
export { _default as default };
|
|
9
|
-
export let values: {
|
|
10
|
-
name: string;
|
|
11
|
-
value: string;
|
|
12
|
-
}[];
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
export namespace argTypes {
|
|
16
|
-
namespace acceptedExtensions {
|
|
17
|
-
let control: string;
|
|
18
|
-
let description: string;
|
|
19
|
-
}
|
|
20
|
-
namespace maxFileSizeMB {
|
|
21
|
-
let control_1: string;
|
|
22
|
-
export { control_1 as control };
|
|
23
|
-
let description_1: string;
|
|
24
|
-
export { description_1 as description };
|
|
25
|
-
}
|
|
26
|
-
namespace enableDragAndDrop {
|
|
27
|
-
let control_2: string;
|
|
28
|
-
export { control_2 as control };
|
|
29
|
-
let description_2: string;
|
|
30
|
-
export { description_2 as description };
|
|
31
|
-
}
|
|
32
|
-
namespace enableCropping {
|
|
33
|
-
let control_3: string;
|
|
34
|
-
export { control_3 as control };
|
|
35
|
-
let description_3: string;
|
|
36
|
-
export { description_3 as description };
|
|
37
|
-
}
|
|
38
|
-
namespace cropShape {
|
|
39
|
-
export namespace control_4 {
|
|
40
|
-
let type: string;
|
|
41
|
-
let options: string[];
|
|
42
|
-
}
|
|
43
|
-
export { control_4 as control };
|
|
44
|
-
let description_4: string;
|
|
45
|
-
export { description_4 as description };
|
|
46
|
-
}
|
|
47
|
-
namespace iconUrl {
|
|
48
|
-
let control_5: string;
|
|
49
|
-
export { control_5 as control };
|
|
50
|
-
let description_5: string;
|
|
51
|
-
export { description_5 as description };
|
|
52
|
-
}
|
|
53
|
-
namespace buttonLabel {
|
|
54
|
-
let control_6: string;
|
|
55
|
-
export { control_6 as control };
|
|
56
|
-
let description_6: string;
|
|
57
|
-
export { description_6 as description };
|
|
58
|
-
}
|
|
59
|
-
namespace acceptedLabel {
|
|
60
|
-
let control_7: string;
|
|
61
|
-
export { control_7 as control };
|
|
62
|
-
let description_7: string;
|
|
63
|
-
export { description_7 as description };
|
|
64
|
-
}
|
|
65
|
-
namespace maxSizeLabel {
|
|
66
|
-
let control_8: string;
|
|
67
|
-
export { control_8 as control };
|
|
68
|
-
let description_8: string;
|
|
69
|
-
export { description_8 as description };
|
|
70
|
-
}
|
|
71
|
-
namespace uploadProgress {
|
|
72
|
-
export namespace control_9 {
|
|
73
|
-
let type_1: string;
|
|
74
|
-
export { type_1 as type };
|
|
75
|
-
export let min: number;
|
|
76
|
-
export let max: number;
|
|
77
|
-
export let step: number;
|
|
78
|
-
}
|
|
79
|
-
export { control_9 as control };
|
|
80
|
-
let description_9: string;
|
|
81
|
-
export { description_9 as description };
|
|
82
|
-
}
|
|
83
|
-
namespace isLoading {
|
|
84
|
-
let control_10: string;
|
|
85
|
-
export { control_10 as control };
|
|
86
|
-
let description_10: string;
|
|
87
|
-
export { description_10 as description };
|
|
88
|
-
}
|
|
89
|
-
namespace errorMessage {
|
|
90
|
-
let control_11: string;
|
|
91
|
-
export { control_11 as control };
|
|
92
|
-
let description_11: string;
|
|
93
|
-
export { description_11 as description };
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
export default _default;
|
|
98
|
-
export const Default: any;
|
|
99
|
-
export const WithDescription: any;
|
|
100
|
-
export const WithoutDragAndDrop: any;
|
|
101
|
-
export const WithError: any;
|
|
102
|
-
export const WithProgress: any;
|
|
103
|
-
export const MultipleExtensions: any;
|
|
104
|
-
export const WithSquareCropping: any;
|
|
105
|
-
export const WithCircleCropping: any;
|
|
106
|
-
export const WithPreloadedImage: any;
|
|
107
|
-
import FileUploader from "./FileUploader";
|