allaw-ui 3.4.3 → 3.4.4
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/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 +18 -0
- package/dist/components/atoms/buttons/ActionButton.js +116 -0
- package/dist/components/atoms/buttons/ActionButton.stories.d.ts +108 -0
- package/dist/components/atoms/buttons/ActionButton.stories.js +167 -0
- package/dist/components/atoms/buttons/ActionCircleButton.d.ts +9 -0
- package/dist/components/atoms/buttons/ActionCircleButton.js +23 -0
- package/dist/components/atoms/buttons/ActionCircleButton.stories.d.ts +35 -0
- package/dist/components/atoms/buttons/ActionCircleButton.stories.js +54 -0
- package/dist/components/atoms/buttons/AgendaSlot.d.ts +10 -0
- package/dist/components/atoms/buttons/AgendaSlot.js +7 -0
- package/dist/components/atoms/buttons/AgendaSlot.stories.d.ts +41 -0
- package/dist/components/atoms/buttons/AgendaSlot.stories.js +77 -0
- package/dist/components/atoms/buttons/FavoriteToggle.d.ts +8 -0
- package/dist/components/atoms/buttons/FavoriteToggle.js +11 -0
- package/dist/components/atoms/buttons/FavoriteToggle.stories.d.ts +23 -0
- package/dist/components/atoms/buttons/FavoriteToggle.stories.js +61 -0
- package/dist/components/atoms/buttons/FilterButton.d.ts +9 -0
- package/dist/components/atoms/buttons/FilterButton.js +9 -0
- package/dist/components/atoms/buttons/FilterButton.stories.d.ts +36 -0
- package/dist/components/atoms/buttons/FilterButton.stories.js +56 -0
- package/dist/components/atoms/buttons/FilterButtonPrimary.d.ts +9 -0
- package/dist/components/atoms/buttons/FilterButtonPrimary.js +46 -0
- package/dist/components/atoms/buttons/FilterButtonPrimary.stories.d.ts +7 -0
- package/dist/components/atoms/buttons/FilterButtonPrimary.stories.js +26 -0
- package/dist/components/atoms/buttons/GhostButton.d.ts +14 -0
- package/dist/components/atoms/buttons/GhostButton.js +11 -0
- package/dist/components/atoms/buttons/GhostButton.stories.d.ts +79 -0
- package/dist/components/atoms/buttons/GhostButton.stories.js +95 -0
- package/dist/components/atoms/buttons/IconButton.d.ts +11 -0
- package/dist/components/atoms/buttons/IconButton.js +14 -0
- package/dist/components/atoms/buttons/IconButton.stories.d.ts +49 -0
- package/dist/components/atoms/buttons/IconButton.stories.js +88 -0
- package/dist/components/atoms/buttons/OAuthProviderButton.d.ts +12 -0
- package/dist/components/atoms/buttons/OAuthProviderButton.js +165 -0
- package/dist/components/atoms/buttons/OAuthProviderButton.stories.d.ts +56 -0
- package/dist/components/atoms/buttons/OAuthProviderButton.stories.js +130 -0
- package/dist/components/atoms/buttons/PendingDocuments.d.ts +9 -0
- package/dist/components/atoms/buttons/PendingDocuments.js +15 -0
- package/dist/components/atoms/buttons/PendingDocuments.stories.d.ts +52 -0
- package/dist/components/atoms/buttons/PendingDocuments.stories.js +67 -0
- package/dist/components/atoms/buttons/PrimaryButton.d.ts +19 -0
- package/dist/components/atoms/buttons/PrimaryButton.js +117 -0
- package/dist/components/atoms/buttons/PrimaryButton.stories.d.ts +108 -0
- package/dist/components/atoms/buttons/PrimaryButton.stories.js +168 -0
- package/dist/components/atoms/buttons/SecondaryButton.d.ts +22 -0
- package/dist/components/atoms/buttons/SecondaryButton.js +151 -0
- package/dist/components/atoms/buttons/SecondaryButton.stories.d.ts +97 -0
- package/dist/components/atoms/buttons/SecondaryButton.stories.js +177 -0
- package/dist/components/atoms/buttons/TabNavigation.d.ts +17 -0
- package/dist/components/atoms/buttons/TabNavigation.js +68 -0
- package/dist/components/atoms/buttons/TabNavigation.stories.d.ts +81 -0
- package/dist/components/atoms/buttons/TabNavigation.stories.js +178 -0
- package/dist/components/atoms/buttons/TertiaryButton.d.ts +15 -0
- package/dist/components/atoms/buttons/TertiaryButton.js +23 -0
- package/dist/components/atoms/buttons/TertiaryButton.stories.d.ts +70 -0
- package/dist/components/atoms/buttons/TertiaryButton.stories.js +128 -0
- package/dist/components/atoms/buttons/index.d.ts +24 -0
- package/dist/components/atoms/buttons/index.js +12 -0
- package/dist/components/atoms/checkboxes/Checkbox.d.ts +15 -0
- package/dist/components/atoms/checkboxes/Checkbox.js +20 -0
- package/dist/components/atoms/checkboxes/Checkbox.stories.d.ts +77 -0
- package/dist/components/atoms/checkboxes/Checkbox.stories.js +123 -0
- package/dist/components/atoms/checkboxes/index.d.ts +2 -0
- package/dist/components/atoms/checkboxes/index.js +1 -0
- package/dist/components/atoms/datepickers/Datepicker.d.ts +15 -0
- package/dist/components/atoms/datepickers/Datepicker.js +151 -0
- package/dist/components/atoms/datepickers/Datepicker.stories.d.ts +90 -0
- package/dist/components/atoms/datepickers/Datepicker.stories.js +67 -0
- package/dist/components/atoms/datepickers/index.d.ts +2 -0
- package/dist/components/atoms/datepickers/index.js +1 -0
- package/dist/components/atoms/featureCard/featureCard.d.ts +15 -0
- package/dist/components/atoms/featureCard/featureCard.js +16 -0
- package/dist/components/atoms/featureCard/featureCard.stories.d.ts +21 -0
- package/dist/components/atoms/featureCard/featureCard.stories.js +101 -0
- package/dist/components/atoms/featureCard/index.d.ts +2 -0
- package/dist/components/atoms/featureCard/index.js +1 -0
- package/dist/components/atoms/filter/Filter.d.ts +17 -0
- package/dist/components/atoms/filter/Filter.js +70 -0
- package/dist/components/atoms/filter/Filter.stories.d.ts +9 -0
- package/dist/components/atoms/filter/Filter.stories.js +77 -0
- package/dist/components/atoms/filter/index.d.ts +2 -0
- package/dist/components/atoms/filter/index.js +1 -0
- package/dist/components/atoms/filters/SingleFilter.d.ts +16 -0
- package/dist/components/atoms/filters/SingleFilter.js +99 -0
- package/dist/components/atoms/filters/SingleFilter.stories.d.ts +7 -0
- package/dist/components/atoms/filters/SingleFilter.stories.js +33 -0
- package/dist/components/atoms/filters/index.d.ts +2 -0
- package/dist/components/atoms/filters/index.js +1 -0
- package/dist/components/atoms/inputs/Input.d.ts +29 -0
- package/dist/components/atoms/inputs/Input.js +94 -0
- package/dist/components/atoms/inputs/Input.stories.d.ts +63 -0
- package/dist/components/atoms/inputs/Input.stories.js +110 -0
- package/dist/components/atoms/inputs/SearchBar.d.ts +12 -0
- package/dist/components/atoms/inputs/SearchBar.js +20 -0
- package/dist/components/atoms/inputs/SearchBar.stories.d.ts +54 -0
- package/dist/components/atoms/inputs/SearchBar.stories.js +67 -0
- package/dist/components/atoms/inputs/TextArea.d.ts +25 -0
- package/dist/components/atoms/inputs/TextArea.js +77 -0
- package/dist/components/atoms/inputs/TextArea.stories.d.ts +95 -0
- package/dist/components/atoms/inputs/TextArea.stories.js +141 -0
- package/dist/components/atoms/inputs/VerificationCodeInput.d.ts +14 -0
- package/dist/components/atoms/inputs/VerificationCodeInput.js +155 -0
- package/dist/components/atoms/inputs/VerificationCodeInput.stories.d.ts +81 -0
- package/dist/components/atoms/inputs/VerificationCodeInput.stories.js +89 -0
- package/dist/components/atoms/inputs/index.d.ts +8 -0
- package/dist/components/atoms/inputs/index.js +4 -0
- package/dist/components/atoms/progressBars/ProgressBar.d.ts +18 -0
- package/dist/components/atoms/progressBars/ProgressBar.js +26 -0
- package/dist/components/atoms/progressBars/ProgressBar.stories.d.ts +83 -0
- package/dist/components/atoms/progressBars/ProgressBar.stories.js +88 -0
- package/dist/components/atoms/progressBars/index.d.ts +2 -0
- package/dist/components/atoms/progressBars/index.js +1 -0
- package/dist/components/atoms/radios/RadioButton.d.ts +12 -0
- package/dist/components/atoms/radios/RadioButton.js +10 -0
- package/dist/components/atoms/radios/RadioButton.stories.d.ts +36 -0
- package/dist/components/atoms/radios/RadioButton.stories.js +75 -0
- package/dist/components/atoms/radios/SelectCard.d.ts +24 -0
- package/dist/components/atoms/radios/SelectCard.js +100 -0
- package/dist/components/atoms/radios/SelectCard.stories.d.ts +92 -0
- package/dist/components/atoms/radios/SelectCard.stories.js +192 -0
- package/dist/components/atoms/radios/index.d.ts +4 -0
- package/dist/components/atoms/radios/index.js +2 -0
- package/dist/components/atoms/selects/ComboBox.d.ts +28 -0
- package/dist/components/atoms/selects/ComboBox.js +172 -0
- package/dist/components/atoms/selects/ComboBox.stories.d.ts +116 -0
- package/dist/components/atoms/selects/ComboBox.stories.js +136 -0
- package/dist/components/atoms/selects/Select.d.ts +25 -0
- package/dist/components/atoms/selects/Select.js +240 -0
- package/dist/components/atoms/selects/Select.stories.d.ts +95 -0
- package/dist/components/atoms/selects/Select.stories.js +161 -0
- package/dist/components/atoms/selects/SelectableListItem.d.ts +14 -0
- package/dist/components/atoms/selects/SelectableListItem.js +19 -0
- package/dist/components/atoms/selects/SelectableListItem.stories.d.ts +33 -0
- package/dist/components/atoms/selects/SelectableListItem.stories.js +53 -0
- package/dist/components/atoms/selects/index.d.ts +6 -0
- package/dist/components/atoms/selects/index.js +3 -0
- package/dist/components/atoms/tags/AppointementStatusTag.d.ts +8 -0
- package/dist/components/atoms/tags/AppointementStatusTag.js +42 -0
- package/dist/components/atoms/tags/AppointementStatusTag.stories.d.ts +17 -0
- package/dist/components/atoms/tags/AppointementStatusTag.stories.js +70 -0
- package/dist/components/atoms/tags/FolderStatusTag.d.ts +8 -0
- package/dist/components/atoms/tags/FolderStatusTag.js +25 -0
- package/dist/components/atoms/tags/FolderStatusTag.stories.d.ts +28 -0
- package/dist/components/atoms/tags/FolderStatusTag.stories.js +51 -0
- package/dist/components/atoms/tags/OtherStatusTag.d.ts +13 -0
- package/dist/components/atoms/tags/OtherStatusTag.js +15 -0
- package/dist/components/atoms/tags/OtherStatusTag.stories.d.ts +97 -0
- package/dist/components/atoms/tags/OtherStatusTag.stories.js +151 -0
- package/dist/components/atoms/tags/index.d.ts +6 -0
- package/dist/components/atoms/tags/index.js +3 -0
- package/dist/components/atoms/typography/CardDate.d.ts +11 -0
- package/dist/components/atoms/typography/CardDate.js +52 -0
- package/dist/components/atoms/typography/CardDate.stories.d.ts +119 -0
- package/dist/components/atoms/typography/CardDate.stories.js +103 -0
- package/dist/components/atoms/typography/Heading.d.ts +16 -0
- package/dist/components/atoms/typography/Heading.js +39 -0
- package/dist/components/atoms/typography/Heading.stories.d.ts +79 -0
- package/dist/components/atoms/typography/Heading.stories.js +150 -0
- package/dist/components/atoms/typography/Link.d.ts +15 -0
- package/dist/components/atoms/typography/Link.js +35 -0
- package/dist/components/atoms/typography/Link.stories.d.ts +72 -0
- package/dist/components/atoms/typography/Link.stories.js +164 -0
- package/dist/components/atoms/typography/Paragraph.d.ts +14 -0
- package/dist/components/atoms/typography/Paragraph.js +33 -0
- package/dist/components/atoms/typography/Paragraph.stories.d.ts +56 -0
- package/dist/components/atoms/typography/Paragraph.stories.js +97 -0
- package/dist/components/atoms/typography/SmallTitle.d.ts +9 -0
- package/dist/components/atoms/typography/SmallTitle.js +7 -0
- package/dist/components/atoms/typography/SmallTitle.stories.d.ts +42 -0
- package/dist/components/atoms/typography/SmallTitle.stories.js +72 -0
- package/dist/components/atoms/typography/Subtitle.d.ts +9 -0
- package/dist/components/atoms/typography/Subtitle.js +7 -0
- package/dist/components/atoms/typography/Subtitle.stories.d.ts +40 -0
- package/dist/components/atoms/typography/Subtitle.stories.js +60 -0
- package/dist/components/atoms/typography/TinyInfo.d.ts +14 -0
- package/dist/components/atoms/typography/TinyInfo.js +18 -0
- package/dist/components/atoms/typography/TinyInfo.stories.d.ts +58 -0
- package/dist/components/atoms/typography/TinyInfo.stories.js +117 -0
- package/dist/components/atoms/typography/index.d.ts +12 -0
- package/dist/components/atoms/typography/index.js +6 -0
- package/dist/components/atoms/uiVariables/AnimatedBorder.d.ts +4 -0
- package/dist/components/atoms/uiVariables/AnimatedBorder.js +11 -0
- package/dist/components/atoms/uiVariables/AnimatedBorder.stories.d.ts +17 -0
- package/dist/components/atoms/uiVariables/AnimatedBorder.stories.js +20 -0
- package/dist/components/atoms/uiVariables/BorderRadius.d.ts +6 -0
- package/dist/components/atoms/uiVariables/BorderRadius.js +12 -0
- package/dist/components/atoms/uiVariables/BorderRadius.stories.d.ts +18 -0
- package/dist/components/atoms/uiVariables/BorderRadius.stories.js +34 -0
- package/dist/components/atoms/uiVariables/Shadows.d.ts +6 -0
- package/dist/components/atoms/uiVariables/Shadows.js +11 -0
- package/dist/components/atoms/uiVariables/Shadows.stories.d.ts +18 -0
- package/dist/components/atoms/uiVariables/Shadows.stories.js +34 -0
- package/dist/components/atoms/uiVariables/Strokes.d.ts +6 -0
- package/dist/components/atoms/uiVariables/Strokes.js +10 -0
- package/dist/components/atoms/uiVariables/Strokes.stories.d.ts +18 -0
- package/dist/components/atoms/uiVariables/Strokes.stories.js +34 -0
- package/dist/components/atoms/uiVariables/index.d.ts +3 -0
- package/dist/components/atoms/uiVariables/index.js +3 -0
- package/dist/components/molecules/appointmentSlot/AppointmentSlot.d.ts +26 -0
- package/dist/components/molecules/appointmentSlot/AppointmentSlot.js +109 -0
- package/dist/components/molecules/appointmentSlot/AppointmentSlot.stories.d.ts +70 -0
- package/dist/components/molecules/appointmentSlot/AppointmentSlot.stories.js +186 -0
- package/dist/components/molecules/appointmentSlot/index.d.ts +2 -0
- package/dist/components/molecules/appointmentSlot/index.js +1 -0
- package/dist/components/molecules/banner/Banner.d.ts +20 -0
- package/dist/components/molecules/banner/Banner.js +28 -0
- package/dist/components/molecules/banner/Banner.stories.d.ts +31 -0
- package/dist/components/molecules/banner/Banner.stories.js +123 -0
- package/dist/components/molecules/banner/index.d.ts +2 -0
- package/dist/components/molecules/banner/index.js +1 -0
- package/dist/components/molecules/billingCount/BillingCount.d.ts +11 -0
- package/dist/components/molecules/billingCount/BillingCount.js +169 -0
- package/dist/components/molecules/billingCount/BillingCount.stories.d.ts +22 -0
- package/dist/components/molecules/billingCount/BillingCount.stories.js +49 -0
- package/dist/components/molecules/billingCount/index.d.ts +2 -0
- package/dist/components/molecules/billingCount/index.js +1 -0
- package/dist/components/molecules/blogCard/BlogCard.d.ts +13 -0
- package/dist/components/molecules/blogCard/BlogCard.js +32 -0
- package/dist/components/molecules/blogCard/BlogCard.stories.d.ts +10 -0
- package/dist/components/molecules/blogCard/BlogCard.stories.js +33 -0
- package/dist/components/molecules/blogCard/index.d.ts +2 -0
- package/dist/components/molecules/blogCard/index.js +1 -0
- package/dist/components/molecules/blogFooter/BlogFooter.d.ts +12 -0
- package/dist/components/molecules/blogFooter/BlogFooter.js +14 -0
- package/dist/components/molecules/blogFooter/BlogFooter.stories.d.ts +60 -0
- package/dist/components/molecules/blogFooter/BlogFooter.stories.js +67 -0
- package/dist/components/molecules/blogFooter/index.d.ts +2 -0
- package/dist/components/molecules/blogFooter/index.js +1 -0
- package/dist/components/molecules/blogHeader/BlogHeader.d.ts +11 -0
- package/dist/components/molecules/blogHeader/BlogHeader.js +21 -0
- package/dist/components/molecules/blogHeader/BlogHeader.stories.d.ts +49 -0
- package/dist/components/molecules/blogHeader/BlogHeader.stories.js +63 -0
- package/dist/components/molecules/blogHeader/index.d.ts +2 -0
- package/dist/components/molecules/blogHeader/index.js +1 -0
- package/dist/components/molecules/blogText/BlogText.d.ts +7 -0
- package/dist/components/molecules/blogText/BlogText.js +11 -0
- package/dist/components/molecules/blogText/BlogText.stories.d.ts +31 -0
- package/dist/components/molecules/blogText/BlogText.stories.js +51 -0
- package/dist/components/molecules/blogText/index.d.ts +2 -0
- package/dist/components/molecules/blogText/index.js +1 -0
- package/dist/components/molecules/blogTextImageBlock/BlogTextImageBlock.d.ts +8 -0
- package/dist/components/molecules/blogTextImageBlock/BlogTextImageBlock.js +15 -0
- package/dist/components/molecules/blogTextImageBlock/BlogTextImageBlock.stories.d.ts +37 -0
- package/dist/components/molecules/blogTextImageBlock/BlogTextImageBlock.stories.js +58 -0
- package/dist/components/molecules/blogTextImageBlock/index.d.ts +2 -0
- package/dist/components/molecules/blogTextImageBlock/index.js +1 -0
- package/dist/components/molecules/brands/Brands.d.ts +9 -0
- package/dist/components/molecules/brands/Brands.js +13 -0
- package/dist/components/molecules/brands/Brands.stories.d.ts +8 -0
- package/dist/components/molecules/brands/Brands.stories.js +66 -0
- package/dist/components/molecules/brands/index.d.ts +2 -0
- package/dist/components/molecules/brands/index.js +1 -0
- package/dist/components/molecules/breadcrumb/Breadcrumb.d.ts +12 -0
- package/dist/components/molecules/breadcrumb/Breadcrumb.js +12 -0
- package/dist/components/molecules/breadcrumb/Breadcrumb.stories.d.ts +24 -0
- package/dist/components/molecules/breadcrumb/Breadcrumb.stories.js +54 -0
- package/dist/components/molecules/breadcrumb/index.d.ts +2 -0
- package/dist/components/molecules/breadcrumb/index.js +1 -0
- package/dist/components/molecules/caseCard/CaseCard.d.ts +23 -0
- package/dist/components/molecules/caseCard/CaseCard.js +19 -0
- package/dist/components/molecules/caseCard/CaseCard.stories.d.ts +114 -0
- package/dist/components/molecules/caseCard/CaseCard.stories.js +200 -0
- package/dist/components/molecules/caseCard/index.d.ts +2 -0
- package/dist/components/molecules/caseCard/index.js +1 -0
- package/dist/components/molecules/caseCardCompact/CaseCardCompact.d.ts +16 -0
- package/dist/components/molecules/caseCardCompact/CaseCardCompact.js +20 -0
- package/dist/components/molecules/caseCardCompact/CaseCardCompact.stories.d.ts +11 -0
- package/dist/components/molecules/caseCardCompact/CaseCardCompact.stories.js +59 -0
- package/dist/components/molecules/caseCardCompact/index.d.ts +2 -0
- package/dist/components/molecules/caseCardCompact/index.js +1 -0
- package/dist/components/molecules/caseLinkCard/CaseCardLink.stories.d.ts +9 -0
- package/dist/components/molecules/caseLinkCard/CaseCardLink.stories.js +37 -0
- package/dist/components/molecules/caseLinkCard/CaseLinkCard.d.ts +13 -0
- package/dist/components/molecules/caseLinkCard/CaseLinkCard.js +37 -0
- package/dist/components/molecules/caseLinkCard/index.d.ts +2 -0
- package/dist/components/molecules/caseLinkCard/index.js +1 -0
- package/dist/components/molecules/checkboxForm/CheckboxForm.d.ts +20 -0
- package/dist/components/molecules/checkboxForm/CheckboxForm.js +30 -0
- package/dist/components/molecules/checkboxForm/CheckboxForm.stories.d.ts +94 -0
- package/dist/components/molecules/checkboxForm/CheckboxForm.stories.js +157 -0
- package/dist/components/molecules/checkboxForm/ColoredCheckbox.d.ts +20 -0
- package/dist/components/molecules/checkboxForm/ColoredCheckbox.js +81 -0
- package/dist/components/molecules/checkboxForm/ColoredCheckbox.stories.d.ts +108 -0
- package/dist/components/molecules/checkboxForm/ColoredCheckbox.stories.js +141 -0
- package/dist/components/molecules/checkboxForm/index.d.ts +4 -0
- package/dist/components/molecules/checkboxForm/index.js +2 -0
- package/dist/components/molecules/clientLinkCard/ClientLinkCard.d.ts +15 -0
- package/dist/components/molecules/clientLinkCard/ClientLinkCard.js +18 -0
- package/dist/components/molecules/clientLinkCard/ClientLinkCard.stories.d.ts +11 -0
- package/dist/components/molecules/clientLinkCard/ClientLinkCard.stories.js +59 -0
- package/dist/components/molecules/clientLinkCard/index.d.ts +2 -0
- package/dist/components/molecules/clientLinkCard/index.js +1 -0
- package/dist/components/molecules/contactCard/ContactCard.d.ts +16 -0
- package/dist/components/molecules/contactCard/ContactCard.js +31 -0
- package/dist/components/molecules/contactCard/ContactCard.stories.d.ts +68 -0
- package/dist/components/molecules/contactCard/ContactCard.stories.js +80 -0
- package/dist/components/molecules/contactCard/DetailedContactCard.d.ts +18 -0
- package/dist/components/molecules/contactCard/DetailedContactCard.js +61 -0
- package/dist/components/molecules/contactCard/DetailedContactCard.stories.d.ts +94 -0
- package/dist/components/molecules/contactCard/DetailedContactCard.stories.js +83 -0
- package/dist/components/molecules/contactCard/index.d.ts +4 -0
- package/dist/components/molecules/contactCard/index.js +2 -0
- package/dist/components/molecules/datepickerForm/DatepickerForm.d.ts +16 -0
- package/dist/components/molecules/datepickerForm/DatepickerForm.js +13 -0
- package/dist/components/molecules/datepickerForm/DatepickerForm.stories.d.ts +164 -0
- package/dist/components/molecules/datepickerForm/DatepickerForm.stories.js +113 -0
- package/dist/components/molecules/datepickerForm/index.d.ts +2 -0
- package/dist/components/molecules/datepickerForm/index.js +1 -0
- package/dist/components/molecules/documentCard/DocumentCard.d.ts +16 -0
- package/dist/components/molecules/documentCard/DocumentCard.js +124 -0
- package/dist/components/molecules/documentCard/DocumentCard.stories.d.ts +71 -0
- package/dist/components/molecules/documentCard/DocumentCard.stories.js +100 -0
- package/dist/components/molecules/documentCard/index.d.ts +2 -0
- package/dist/components/molecules/documentCard/index.js +1 -0
- package/dist/components/molecules/employeeCard/EmployeeCard.d.ts +15 -0
- package/dist/components/molecules/employeeCard/EmployeeCard.js +34 -0
- package/dist/components/molecules/employeeCard/EmployeeCard.stories.d.ts +74 -0
- package/dist/components/molecules/employeeCard/EmployeeCard.stories.js +65 -0
- package/dist/components/molecules/employeeCard/index.d.ts +2 -0
- package/dist/components/molecules/employeeCard/index.js +1 -0
- package/dist/components/molecules/entityAdminCard/EntityAdminCard.d.ts +13 -0
- package/dist/components/molecules/entityAdminCard/EntityAdminCard.js +34 -0
- package/dist/components/molecules/entityAdminCard/entityAdminCard.stories.d.ts +8 -0
- package/dist/components/molecules/entityAdminCard/entityAdminCard.stories.js +34 -0
- package/dist/components/molecules/entityCard/EntityCard.d.ts +12 -0
- package/dist/components/molecules/entityCard/EntityCard.js +53 -0
- package/dist/components/molecules/entityCard/EntityCard.stories.d.ts +7 -0
- package/dist/components/molecules/entityCard/EntityCard.stories.js +30 -0
- package/dist/components/molecules/entityCard/index.d.ts +2 -0
- package/dist/components/molecules/entityCard/index.js +1 -0
- package/dist/components/molecules/featureGrid/FeatureGrid.d.ts +8 -0
- package/dist/components/molecules/featureGrid/FeatureGrid.js +27 -0
- package/dist/components/molecules/featureGrid/FeatureGrid.stories.d.ts +7 -0
- package/dist/components/molecules/featureGrid/FeatureGrid.stories.js +97 -0
- package/dist/components/molecules/featureGrid/index.d.ts +2 -0
- package/dist/components/molecules/featureGrid/index.js +1 -0
- package/dist/components/molecules/fileUploader/FileUploader.d.ts +41 -0
- package/dist/components/molecules/fileUploader/FileUploader.js +346 -0
- package/dist/components/molecules/fileUploader/FileUploader.stories.d.ts +107 -0
- package/dist/components/molecules/fileUploader/FileUploader.stories.js +232 -0
- package/dist/components/molecules/fileUploader/ImageCropperModal.d.ts +15 -0
- package/dist/components/molecules/fileUploader/ImageCropperModal.js +212 -0
- package/dist/components/molecules/fileUploader/index.d.ts +2 -0
- package/dist/components/molecules/fileUploader/index.js +1 -0
- package/dist/components/molecules/flexContent/FlexContent.d.ts +18 -0
- package/dist/components/molecules/flexContent/FlexContent.js +21 -0
- package/dist/components/molecules/flexContent/FlexContent.stories.d.ts +9 -0
- package/dist/components/molecules/flexContent/FlexContent.stories.js +47 -0
- package/dist/components/molecules/flexContent/index.d.ts +2 -0
- package/dist/components/molecules/flexContent/index.js +1 -0
- package/dist/components/molecules/frameCTA/FrameCTA.d.ts +19 -0
- package/dist/components/molecules/frameCTA/FrameCTA.js +18 -0
- package/dist/components/molecules/frameCTA/FrameCTA.stories.d.ts +8 -0
- package/dist/components/molecules/frameCTA/FrameCTA.stories.js +58 -0
- package/dist/components/molecules/frameCTA/index.d.ts +2 -0
- package/dist/components/molecules/frameCTA/index.js +1 -0
- package/dist/components/molecules/heroSection/HeroSection.d.ts +21 -0
- package/dist/components/molecules/heroSection/HeroSection.js +20 -0
- package/dist/components/molecules/heroSection/HeroSection.stories.d.ts +46 -0
- package/dist/components/molecules/heroSection/HeroSection.stories.js +100 -0
- package/dist/components/molecules/heroSection/index.d.ts +2 -0
- package/dist/components/molecules/heroSection/index.js +1 -0
- package/dist/components/molecules/loadingBox/LoadingBox.d.ts +12 -0
- package/dist/components/molecules/loadingBox/LoadingBox.js +11 -0
- package/dist/components/molecules/loadingBox/LoadingBox.stories.d.ts +54 -0
- package/dist/components/molecules/loadingBox/LoadingBox.stories.js +128 -0
- package/dist/components/molecules/loadingBox/index.d.ts +2 -0
- package/dist/components/molecules/loadingBox/index.js +1 -0
- package/dist/components/molecules/modal/Modal.d.ts +32 -0
- package/dist/components/molecules/modal/Modal.js +97 -0
- package/dist/components/molecules/modal/Modal.stories.d.ts +87 -0
- package/dist/components/molecules/modal/Modal.stories.js +126 -0
- package/dist/components/molecules/modal/index.d.ts +2 -0
- package/dist/components/molecules/modal/index.js +1 -0
- package/dist/components/molecules/pagination/Pagination.d.ts +10 -0
- package/dist/components/molecules/pagination/Pagination.js +64 -0
- package/dist/components/molecules/pagination/Pagination.stories.d.ts +44 -0
- package/dist/components/molecules/pagination/Pagination.stories.js +59 -0
- package/dist/components/molecules/pagination/index.d.ts +2 -0
- package/dist/components/molecules/pagination/index.js +1 -0
- package/dist/components/molecules/proCard/ProCard.d.ts +14 -0
- package/dist/components/molecules/proCard/ProCard.js +30 -0
- package/dist/components/molecules/proCard/ProCard.stories.d.ts +49 -0
- package/dist/components/molecules/proCard/ProCard.stories.js +69 -0
- package/dist/components/molecules/proCard/index.d.ts +2 -0
- package/dist/components/molecules/proCard/index.js +1 -0
- package/dist/components/molecules/questionAnswer/QuestionAnswer.d.ts +10 -0
- package/dist/components/molecules/questionAnswer/QuestionAnswer.js +33 -0
- package/dist/components/molecules/questionAnswer/QuestionAnswer.stories.d.ts +17 -0
- package/dist/components/molecules/questionAnswer/QuestionAnswer.stories.js +48 -0
- package/dist/components/molecules/questionAnswer/index.d.ts +2 -0
- package/dist/components/molecules/questionAnswer/index.js +1 -0
- package/dist/components/molecules/radioForm/RadioForm.d.ts +12 -0
- package/dist/components/molecules/radioForm/RadioForm.js +27 -0
- package/dist/components/molecules/radioForm/RadioForm.stories.d.ts +27 -0
- package/dist/components/molecules/radioForm/RadioForm.stories.js +52 -0
- package/dist/components/molecules/radioForm/index.d.ts +2 -0
- package/dist/components/molecules/radioForm/index.js +1 -0
- package/dist/components/molecules/selectForm/SelectForm.d.ts +19 -0
- package/dist/components/molecules/selectForm/SelectForm.js +15 -0
- package/dist/components/molecules/selectForm/SelectForm.stories.d.ts +72 -0
- package/dist/components/molecules/selectForm/SelectForm.stories.js +104 -0
- package/dist/components/molecules/selectForm/index.d.ts +2 -0
- package/dist/components/molecules/selectForm/index.js +1 -0
- package/dist/components/molecules/stepper/ConfirmationModal.d.ts +14 -0
- package/dist/components/molecules/stepper/ConfirmationModal.js +26 -0
- package/dist/components/molecules/stepper/Stepper.d.ts +51 -0
- package/dist/components/molecules/stepper/Stepper.js +156 -0
- package/dist/components/molecules/stepper/Stepper.stories.d.ts +52 -0
- package/dist/components/molecules/stepper/Stepper.stories.js +206 -0
- package/dist/components/molecules/stepper/index.d.ts +2 -0
- package/dist/components/molecules/stepper/index.js +1 -0
- package/dist/index.d.ts +108 -0
- package/dist/index.js +108 -0
- package/dist/stories/Header.d.ts +13 -0
- package/dist/stories/Header.js +20 -0
- package/dist/stories/Header.stories.d.ts +18 -0
- package/dist/stories/Header.stories.js +26 -0
- package/dist/stories/Page.d.ts +3 -0
- package/dist/stories/Page.js +37 -0
- package/dist/stories/Page.stories.d.ts +12 -0
- package/dist/stories/Page.stories.js +76 -0
- package/dist/utils/regex.d.ts +5 -0
- package/dist/utils/regex.js +7 -0
- package/dist/utils/utils.d.ts +3 -0
- package/dist/utils/utils.js +58 -0
- package/package.json +1 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import React, { useState, useEffect, useCallback, forwardRef, useImperativeHandle, useRef, } from "react";
|
|
2
|
+
import "./Input.css";
|
|
3
|
+
import "../../../styles/global.css";
|
|
4
|
+
import "../../../styles/icons.css";
|
|
5
|
+
import { commonRegex } from "../../../utils/regex";
|
|
6
|
+
import TinyInfo from "../typography/TinyInfo";
|
|
7
|
+
import Paragraph from "../typography/Paragraph";
|
|
8
|
+
var Input = forwardRef(function (_a, ref) {
|
|
9
|
+
var title = _a.title, _b = _a.style, style = _b === void 0 ? "default" : _b, rowChange = _a.rowChange, placeholder = _a.placeholder, endIcon = _a.endIcon, _c = _a.isRequired, isRequired = _c === void 0 ? false : _c, validate = _a.validate, onError = _a.onError, onChange = _a.onChange, propValue = _a.value, _d = _a.type, type = _d === void 0 ? "text" : _d, propError = _a.error, _e = _a.color, color = _e === void 0 ? "noir" : _e, _f = _a.variant, variant = _f === void 0 ? "medium" : _f, onKeyDown = _a.onKeyDown, name = _a.name, _g = _a.disableZoom, disableZoom = _g === void 0 ? false : _g;
|
|
10
|
+
var _h = useState(false), isPasswordVisible = _h[0], setIsPasswordVisible = _h[1];
|
|
11
|
+
var _j = useState(propValue || ""), value = _j[0], setValue = _j[1];
|
|
12
|
+
var _k = useState(propError || ""), error = _k[0], setError = _k[1];
|
|
13
|
+
var _l = useState(false), isTouched = _l[0], setIsTouched = _l[1];
|
|
14
|
+
var inputRef = useRef(null);
|
|
15
|
+
useEffect(function () {
|
|
16
|
+
setValue(propValue || "");
|
|
17
|
+
}, [propValue]);
|
|
18
|
+
useEffect(function () {
|
|
19
|
+
setError(propError || "");
|
|
20
|
+
}, [propError]);
|
|
21
|
+
var validateInput = useCallback(function () {
|
|
22
|
+
var _a;
|
|
23
|
+
// console.log(`Input ${title}: Validating input`);
|
|
24
|
+
var currentValue = ((_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.value) || value;
|
|
25
|
+
// console.log(`Input ${title}: Current value: "${currentValue}"`);
|
|
26
|
+
var errorMessage = "";
|
|
27
|
+
if (isRequired && currentValue.trim() === "") {
|
|
28
|
+
errorMessage = "Ce champ est requis";
|
|
29
|
+
}
|
|
30
|
+
else if (validate && currentValue) {
|
|
31
|
+
var regex = typeof validate === "string" ? commonRegex[validate] : validate;
|
|
32
|
+
// console.log(`Input ${title}: Regex used: ${regex}`);
|
|
33
|
+
if (!regex.test(currentValue)) {
|
|
34
|
+
errorMessage = "Veuillez vérifier votre saisie";
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
setError(errorMessage);
|
|
38
|
+
setIsTouched(true);
|
|
39
|
+
// console.log(
|
|
40
|
+
// `Input ${title}: Validation result - ${errorMessage ? "invalid" : "valid"}`
|
|
41
|
+
// );
|
|
42
|
+
onError === null || onError === void 0 ? void 0 : onError(errorMessage);
|
|
43
|
+
return !errorMessage;
|
|
44
|
+
}, [isRequired, value, validate, onError, title]);
|
|
45
|
+
useImperativeHandle(ref, function () { return ({
|
|
46
|
+
validate: validateInput,
|
|
47
|
+
}); });
|
|
48
|
+
var handleChange = function (e) {
|
|
49
|
+
var newValue = e.target.value;
|
|
50
|
+
// console.log(`Input ${title}: Value changed to "${newValue}"`);
|
|
51
|
+
setValue(newValue);
|
|
52
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
53
|
+
if (isTouched) {
|
|
54
|
+
validateInput();
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
var handleBlur = function () {
|
|
58
|
+
// console.log(`Input ${title}: Blur event triggered`);
|
|
59
|
+
setIsTouched(true);
|
|
60
|
+
validateInput();
|
|
61
|
+
};
|
|
62
|
+
var renderEndIcon = function () {
|
|
63
|
+
if (style === "variation" && endIcon) {
|
|
64
|
+
return (React.createElement("button", { className: "Input-icon-button" },
|
|
65
|
+
React.createElement("i", { className: endIcon })));
|
|
66
|
+
}
|
|
67
|
+
if (style === "password") {
|
|
68
|
+
return (React.createElement("button", { type: "button", className: "Input-button", onClick: function (e) {
|
|
69
|
+
e.preventDefault();
|
|
70
|
+
e.stopPropagation();
|
|
71
|
+
setIsPasswordVisible(function (prev) { return !prev; });
|
|
72
|
+
} }, isPasswordVisible ? "CACHER" : "AFFICHER"));
|
|
73
|
+
}
|
|
74
|
+
return null;
|
|
75
|
+
};
|
|
76
|
+
return (React.createElement("div", { className: "Input Input-".concat(style) },
|
|
77
|
+
React.createElement("div", { className: "Input-title-container" },
|
|
78
|
+
React.createElement(Paragraph, { variant: variant, color: color, text: title }),
|
|
79
|
+
isRequired && title && (React.createElement("span", { className: "Input-required" },
|
|
80
|
+
"\u00A0",
|
|
81
|
+
"*"))),
|
|
82
|
+
React.createElement("div", { className: "Input-wrapper" },
|
|
83
|
+
React.createElement("div", { className: "Input-container" },
|
|
84
|
+
React.createElement("div", { className: "Input-input" },
|
|
85
|
+
React.createElement("input", { ref: inputRef, type: style === "password" && !isPasswordVisible ? "password" : type, placeholder: placeholder, className: "Input-placeholder ".concat(disableZoom ? "Input-no-zoom" : ""), value: value, onChange: function (e) {
|
|
86
|
+
handleChange(e);
|
|
87
|
+
rowChange && rowChange(e);
|
|
88
|
+
}, name: name, onKeyDown: onKeyDown, onBlur: handleBlur })),
|
|
89
|
+
renderEndIcon()),
|
|
90
|
+
error && isTouched && (React.createElement("div", { className: "error-message" },
|
|
91
|
+
React.createElement(TinyInfo, { variant: "medium12", color: "actions-error", text: error }))))));
|
|
92
|
+
});
|
|
93
|
+
Input.displayName = "Input";
|
|
94
|
+
export default Input;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
export const ActionsData: {};
|
|
2
|
+
declare namespace _default {
|
|
3
|
+
export let title: string;
|
|
4
|
+
export { Input as component };
|
|
5
|
+
export let tags: string[];
|
|
6
|
+
export let excludeStories: RegExp;
|
|
7
|
+
export namespace args {
|
|
8
|
+
let endIcon: string;
|
|
9
|
+
}
|
|
10
|
+
export namespace argTypes {
|
|
11
|
+
export namespace style {
|
|
12
|
+
namespace control {
|
|
13
|
+
let type: string;
|
|
14
|
+
let options: string[];
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
export namespace endIcon_1 {
|
|
18
|
+
export namespace control_1 {
|
|
19
|
+
let type_1: string;
|
|
20
|
+
export { type_1 as type };
|
|
21
|
+
}
|
|
22
|
+
export { control_1 as control };
|
|
23
|
+
}
|
|
24
|
+
export { endIcon_1 as endIcon };
|
|
25
|
+
export namespace isRequired {
|
|
26
|
+
let control_2: string;
|
|
27
|
+
export { control_2 as control };
|
|
28
|
+
}
|
|
29
|
+
export namespace validate {
|
|
30
|
+
export namespace control_3 {
|
|
31
|
+
let type_2: string;
|
|
32
|
+
export { type_2 as type };
|
|
33
|
+
}
|
|
34
|
+
export { control_3 as control };
|
|
35
|
+
}
|
|
36
|
+
export namespace variant {
|
|
37
|
+
export namespace control_4 {
|
|
38
|
+
let type_3: string;
|
|
39
|
+
export { type_3 as type };
|
|
40
|
+
let options_1: string[];
|
|
41
|
+
export { options_1 as options };
|
|
42
|
+
}
|
|
43
|
+
export { control_4 as control };
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
export namespace parameters {
|
|
47
|
+
namespace backgrounds {
|
|
48
|
+
let _default: string;
|
|
49
|
+
export { _default as default };
|
|
50
|
+
export let values: {
|
|
51
|
+
name: string;
|
|
52
|
+
value: string;
|
|
53
|
+
}[];
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
export default _default;
|
|
58
|
+
export const Default: any;
|
|
59
|
+
export const Variation: any;
|
|
60
|
+
export const Password: any;
|
|
61
|
+
export const WithValidation: any;
|
|
62
|
+
export const PasswordWithError: any;
|
|
63
|
+
import Input from "./Input";
|
|
@@ -0,0 +1,110 @@
|
|
|
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 from "react";
|
|
13
|
+
import { useForm, FormProvider } from "react-hook-form";
|
|
14
|
+
import Input from "./Input";
|
|
15
|
+
import "../../../styles/global.css";
|
|
16
|
+
import "../../../styles/icons.css";
|
|
17
|
+
export var ActionsData = {};
|
|
18
|
+
export default {
|
|
19
|
+
title: "Components/Atoms/Inputs/Input",
|
|
20
|
+
component: Input,
|
|
21
|
+
tags: ["autodocs"],
|
|
22
|
+
excludeStories: /.*Data$/,
|
|
23
|
+
args: __assign(__assign({}, ActionsData), { endIcon: "allaw-icon-edit-2" }),
|
|
24
|
+
argTypes: {
|
|
25
|
+
style: {
|
|
26
|
+
control: {
|
|
27
|
+
type: "radio",
|
|
28
|
+
options: ["default", "variation", "password"],
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
endIcon: {
|
|
32
|
+
control: {
|
|
33
|
+
type: "text",
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
isRequired: {
|
|
37
|
+
control: "boolean",
|
|
38
|
+
},
|
|
39
|
+
validate: {
|
|
40
|
+
control: {
|
|
41
|
+
type: "text",
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
variant: {
|
|
45
|
+
control: {
|
|
46
|
+
type: "select",
|
|
47
|
+
options: ["bold", "semiBold", "medium"],
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
parameters: {
|
|
52
|
+
backgrounds: {
|
|
53
|
+
default: "light",
|
|
54
|
+
values: [
|
|
55
|
+
{ name: "light", value: "#ffffff" },
|
|
56
|
+
{ name: "grey", value: "#728ea7" },
|
|
57
|
+
{ name: "figma", value: "#404040" },
|
|
58
|
+
{ name: "dark", value: "#171e25" },
|
|
59
|
+
],
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
};
|
|
63
|
+
var Template = function (args) {
|
|
64
|
+
var methods = useForm();
|
|
65
|
+
return (React.createElement(FormProvider, __assign({}, methods),
|
|
66
|
+
React.createElement(Input, __assign({}, args))));
|
|
67
|
+
};
|
|
68
|
+
export var Default = Template.bind({});
|
|
69
|
+
Default.args = {
|
|
70
|
+
name: "defaultInput",
|
|
71
|
+
title: "Nommer le rendez-vous",
|
|
72
|
+
placeholder: "Entrez le motif du rendez-vous",
|
|
73
|
+
style: "default",
|
|
74
|
+
isRequired: false,
|
|
75
|
+
variant: "medium",
|
|
76
|
+
};
|
|
77
|
+
export var Variation = Template.bind({});
|
|
78
|
+
Variation.args = {
|
|
79
|
+
name: "variationInput",
|
|
80
|
+
title: "Adresse e-mail",
|
|
81
|
+
placeholder: "Entrez le motif du rendez-vous",
|
|
82
|
+
style: "variation",
|
|
83
|
+
isRequired: true,
|
|
84
|
+
};
|
|
85
|
+
export var Password = Template.bind({});
|
|
86
|
+
Password.args = {
|
|
87
|
+
name: "passwordInput",
|
|
88
|
+
title: "Mot de passe",
|
|
89
|
+
placeholder: "Entrez le nouveau mot de passe",
|
|
90
|
+
style: "password",
|
|
91
|
+
isRequired: false,
|
|
92
|
+
};
|
|
93
|
+
export var WithValidation = Template.bind({});
|
|
94
|
+
WithValidation.args = {
|
|
95
|
+
name: "validationInput",
|
|
96
|
+
title: "Email",
|
|
97
|
+
placeholder: "Entrez votre email",
|
|
98
|
+
style: "default",
|
|
99
|
+
isRequired: true,
|
|
100
|
+
validate: "email",
|
|
101
|
+
};
|
|
102
|
+
export var PasswordWithError = Template.bind({});
|
|
103
|
+
PasswordWithError.args = {
|
|
104
|
+
name: "passwordInputError",
|
|
105
|
+
title: "Mot de passe",
|
|
106
|
+
placeholder: "Entrez votre mot de passe",
|
|
107
|
+
style: "password",
|
|
108
|
+
isRequired: true,
|
|
109
|
+
error: "Le mot de passe doit contenir au moins 8 caractères",
|
|
110
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./SearchBar.css";
|
|
3
|
+
import "../../../styles/global.css";
|
|
4
|
+
import "../../../styles/icons.css";
|
|
5
|
+
export interface SearchBarProps {
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
endIcon?: string;
|
|
8
|
+
value?: string;
|
|
9
|
+
onChange?: (value: string) => void;
|
|
10
|
+
}
|
|
11
|
+
declare const SearchBar: React.FC<SearchBarProps>;
|
|
12
|
+
export default SearchBar;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React, { useState } from "react";
|
|
2
|
+
import "./SearchBar.css";
|
|
3
|
+
import "../../../styles/global.css";
|
|
4
|
+
import "../../../styles/icons.css";
|
|
5
|
+
var SearchBar = function (_a) {
|
|
6
|
+
var _b = _a.placeholder, placeholder = _b === void 0 ? "Faites une recherche" : _b, _c = _a.endIcon, endIcon = _c === void 0 ? "allaw-icon-search" : _c, _d = _a.value, controlledValue = _d === void 0 ? "" : _d, onChange = _a.onChange;
|
|
7
|
+
var _e = useState(controlledValue), value = _e[0], setValue = _e[1];
|
|
8
|
+
var handleChange = function (event) {
|
|
9
|
+
var newValue = event.target.value;
|
|
10
|
+
setValue(newValue);
|
|
11
|
+
if (onChange) {
|
|
12
|
+
onChange(newValue);
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
return (React.createElement("div", { className: "SearchBar" },
|
|
16
|
+
React.createElement("input", { type: "text", placeholder: placeholder, className: "SearchBar-placeholder", value: controlledValue || value, onChange: handleChange }),
|
|
17
|
+
React.createElement("button", { className: "SearchBar-icon-button" },
|
|
18
|
+
React.createElement("i", { className: endIcon }))));
|
|
19
|
+
};
|
|
20
|
+
export default SearchBar;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
export namespace ActionsData {
|
|
2
|
+
namespace onChange {
|
|
3
|
+
let action: string;
|
|
4
|
+
}
|
|
5
|
+
}
|
|
6
|
+
declare namespace _default {
|
|
7
|
+
export let title: string;
|
|
8
|
+
export { SearchBar as component };
|
|
9
|
+
export let tags: string[];
|
|
10
|
+
export let excludeStories: RegExp;
|
|
11
|
+
export namespace args {
|
|
12
|
+
let endIcon: string;
|
|
13
|
+
}
|
|
14
|
+
export namespace argTypes {
|
|
15
|
+
export namespace placeholder {
|
|
16
|
+
namespace control {
|
|
17
|
+
let type: string;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
export namespace endIcon_1 {
|
|
21
|
+
export namespace control_1 {
|
|
22
|
+
let type_1: string;
|
|
23
|
+
export { type_1 as type };
|
|
24
|
+
}
|
|
25
|
+
export { control_1 as control };
|
|
26
|
+
}
|
|
27
|
+
export { endIcon_1 as endIcon };
|
|
28
|
+
export namespace value {
|
|
29
|
+
export namespace control_2 {
|
|
30
|
+
let type_2: string;
|
|
31
|
+
export { type_2 as type };
|
|
32
|
+
}
|
|
33
|
+
export { control_2 as control };
|
|
34
|
+
}
|
|
35
|
+
export namespace onChange_1 {
|
|
36
|
+
let action_1: string;
|
|
37
|
+
export { action_1 as action };
|
|
38
|
+
}
|
|
39
|
+
export { onChange_1 as onChange };
|
|
40
|
+
}
|
|
41
|
+
export namespace parameters {
|
|
42
|
+
namespace backgrounds {
|
|
43
|
+
let _default: string;
|
|
44
|
+
export { _default as default };
|
|
45
|
+
export let values: {
|
|
46
|
+
name: string;
|
|
47
|
+
value: string;
|
|
48
|
+
}[];
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
export default _default;
|
|
53
|
+
export const Default: any;
|
|
54
|
+
import SearchBar from "./SearchBar";
|
|
@@ -0,0 +1,67 @@
|
|
|
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 SearchBar from "./SearchBar";
|
|
14
|
+
import "../../../styles/global.css";
|
|
15
|
+
import "../../../styles/icons.css";
|
|
16
|
+
export var ActionsData = {
|
|
17
|
+
onChange: { action: "changed" },
|
|
18
|
+
};
|
|
19
|
+
export default {
|
|
20
|
+
title: "Components/Atoms/Inputs/SearchBar",
|
|
21
|
+
component: SearchBar,
|
|
22
|
+
tags: ["autodocs"],
|
|
23
|
+
excludeStories: /.*Data$/,
|
|
24
|
+
args: __assign(__assign({}, ActionsData), { endIcon: "allaw-icon-search" }),
|
|
25
|
+
argTypes: {
|
|
26
|
+
placeholder: {
|
|
27
|
+
control: {
|
|
28
|
+
type: "text",
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
endIcon: {
|
|
32
|
+
control: {
|
|
33
|
+
type: "text",
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
value: {
|
|
37
|
+
control: {
|
|
38
|
+
type: "text",
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
onChange: { action: "changed" },
|
|
42
|
+
},
|
|
43
|
+
parameters: {
|
|
44
|
+
backgrounds: {
|
|
45
|
+
default: "light",
|
|
46
|
+
values: [
|
|
47
|
+
{ name: "light", value: "#ffffff" },
|
|
48
|
+
{ name: "grey", value: "#728ea7" },
|
|
49
|
+
{ name: "figma", value: "#404040" },
|
|
50
|
+
{ name: "dark", value: "#171e25" },
|
|
51
|
+
],
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
var Template = function (args) {
|
|
56
|
+
var _a = useState(""), value = _a[0], setValue = _a[1];
|
|
57
|
+
return (React.createElement(SearchBar, __assign({}, args, { value: value, onChange: function (newValue) {
|
|
58
|
+
setValue(newValue);
|
|
59
|
+
args.onChange(newValue);
|
|
60
|
+
} })));
|
|
61
|
+
};
|
|
62
|
+
export var Default = Template.bind({});
|
|
63
|
+
Default.args = {
|
|
64
|
+
placeholder: "Faites une recherche",
|
|
65
|
+
endIcon: "allaw-icon-search",
|
|
66
|
+
onChange: function (value) { return console.log("Search value:", value); },
|
|
67
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "../../../styles/global.css";
|
|
3
|
+
import { commonRegex } from "../../../utils/regex";
|
|
4
|
+
import "./TextArea.css";
|
|
5
|
+
export interface TextAreaProps {
|
|
6
|
+
title: string;
|
|
7
|
+
style?: "default" | "variation";
|
|
8
|
+
placeholder: string;
|
|
9
|
+
isRequired?: boolean;
|
|
10
|
+
validate?: RegExp | keyof typeof commonRegex;
|
|
11
|
+
onError?: (error: string) => void;
|
|
12
|
+
onChange?: (e: React.ChangeEvent<HTMLTextAreaElement>) => void;
|
|
13
|
+
value?: string;
|
|
14
|
+
error?: string;
|
|
15
|
+
maxHeight?: number;
|
|
16
|
+
minHeight?: number;
|
|
17
|
+
variant?: "bold" | "semiBold" | "medium";
|
|
18
|
+
color?: "bleu-allaw" | "mid-grey" | "dark-grey" | "noir" | "pure-white" | "grey-venom" | "venom-grey-dark";
|
|
19
|
+
dataTestId?: string;
|
|
20
|
+
}
|
|
21
|
+
export interface TextAreaRef {
|
|
22
|
+
validate: () => boolean;
|
|
23
|
+
}
|
|
24
|
+
declare const TextArea: React.ForwardRefExoticComponent<TextAreaProps & React.RefAttributes<TextAreaRef>>;
|
|
25
|
+
export default TextArea;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
// TextArea.tsx
|
|
2
|
+
import React, { forwardRef, useCallback, useEffect, useImperativeHandle, useRef, useState, } from "react";
|
|
3
|
+
import "../../../styles/global.css";
|
|
4
|
+
import { commonRegex } from "../../../utils/regex";
|
|
5
|
+
import Paragraph from "../typography/Paragraph";
|
|
6
|
+
import TinyInfo from "../typography/TinyInfo";
|
|
7
|
+
import "./TextArea.css";
|
|
8
|
+
var TextArea = forwardRef(function (_a, ref) {
|
|
9
|
+
var title = _a.title, _b = _a.style, style = _b === void 0 ? "default" : _b, placeholder = _a.placeholder, _c = _a.isRequired, isRequired = _c === void 0 ? false : _c, validate = _a.validate, onError = _a.onError, onChange = _a.onChange, propValue = _a.value, propError = _a.error, _d = _a.maxHeight, maxHeight = _d === void 0 ? 400 : _d, minHeight = _a.minHeight, _e = _a.variant, variant = _e === void 0 ? "medium" : _e, _f = _a.color, color = _f === void 0 ? "noir" : _f, dataTestId = _a.dataTestId;
|
|
10
|
+
var _g = useState(propValue || ""), value = _g[0], setValue = _g[1];
|
|
11
|
+
var _h = useState(propError || ""), error = _h[0], setError = _h[1];
|
|
12
|
+
var _j = useState(false), isTouched = _j[0], setIsTouched = _j[1];
|
|
13
|
+
var textareaRef = useRef(null);
|
|
14
|
+
useEffect(function () {
|
|
15
|
+
setValue(propValue || "");
|
|
16
|
+
}, [propValue]);
|
|
17
|
+
useEffect(function () {
|
|
18
|
+
setError(propError || "");
|
|
19
|
+
}, [propError]);
|
|
20
|
+
var validateTextArea = useCallback(function () {
|
|
21
|
+
var _a;
|
|
22
|
+
var currentValue = ((_a = textareaRef.current) === null || _a === void 0 ? void 0 : _a.value) || value;
|
|
23
|
+
var errorMessage = "";
|
|
24
|
+
if (isRequired && currentValue.trim() === "") {
|
|
25
|
+
errorMessage = "Ce champ est requis";
|
|
26
|
+
}
|
|
27
|
+
else if (validate && currentValue) {
|
|
28
|
+
var regex = typeof validate === "string" ? commonRegex[validate] : validate;
|
|
29
|
+
if (!regex.test(currentValue)) {
|
|
30
|
+
errorMessage = "Veuillez vérifier votre saisie";
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
setError(errorMessage);
|
|
34
|
+
setIsTouched(true);
|
|
35
|
+
onError === null || onError === void 0 ? void 0 : onError(errorMessage);
|
|
36
|
+
return !errorMessage;
|
|
37
|
+
}, [isRequired, value, validate, onError]);
|
|
38
|
+
useImperativeHandle(ref, function () { return ({
|
|
39
|
+
validate: validateTextArea,
|
|
40
|
+
}); });
|
|
41
|
+
var handleChange = function (e) {
|
|
42
|
+
var newValue = e.target.value;
|
|
43
|
+
setValue(newValue);
|
|
44
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(e);
|
|
45
|
+
if (isTouched) {
|
|
46
|
+
validateTextArea();
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
var handleBlur = function () {
|
|
50
|
+
setIsTouched(true);
|
|
51
|
+
validateTextArea();
|
|
52
|
+
};
|
|
53
|
+
// Préparer les styles du textarea
|
|
54
|
+
var textareaStyle = {
|
|
55
|
+
maxHeight: "".concat(maxHeight, "px"),
|
|
56
|
+
};
|
|
57
|
+
// Ajouter minHeight si spécifiée, sans transition
|
|
58
|
+
if (minHeight !== undefined) {
|
|
59
|
+
textareaStyle.minHeight = "".concat(minHeight, "px");
|
|
60
|
+
textareaStyle.transition = "none";
|
|
61
|
+
}
|
|
62
|
+
return (React.createElement("div", { className: "TextArea text-area-".concat(style) },
|
|
63
|
+
React.createElement("div", { className: "text-area-title-container" },
|
|
64
|
+
React.createElement(Paragraph, { variant: variant, color: color, text: title }),
|
|
65
|
+
isRequired && title && (React.createElement("span", { className: "text-area-required" },
|
|
66
|
+
"\u00A0",
|
|
67
|
+
"*"))),
|
|
68
|
+
React.createElement("div", { className: "text-area-container" },
|
|
69
|
+
React.createElement("div", { className: "text-area-input", "data-testid": dataTestId || "text-area" },
|
|
70
|
+
React.createElement("textarea", { ref: textareaRef, placeholder: placeholder, className: minHeight !== undefined
|
|
71
|
+
? "text-area-placeholder no-transition"
|
|
72
|
+
: "text-area-placeholder", value: value, onChange: handleChange, onBlur: handleBlur, style: textareaStyle, "data-testid": dataTestId || "text-area" })),
|
|
73
|
+
error && isTouched && (React.createElement("div", { className: "error-message" },
|
|
74
|
+
React.createElement(TinyInfo, { variant: "medium12", color: "actions-error", text: error }))))));
|
|
75
|
+
});
|
|
76
|
+
TextArea.displayName = "TextArea";
|
|
77
|
+
export default TextArea;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
export const ActionsData: {};
|
|
2
|
+
declare namespace _default {
|
|
3
|
+
export let title: string;
|
|
4
|
+
export { TextArea as component };
|
|
5
|
+
export let tags: string[];
|
|
6
|
+
export let excludeStories: RegExp;
|
|
7
|
+
export let args: {};
|
|
8
|
+
export namespace argTypes {
|
|
9
|
+
namespace style {
|
|
10
|
+
namespace control {
|
|
11
|
+
let type: string;
|
|
12
|
+
let options: string[];
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
namespace isRequired {
|
|
16
|
+
let control_1: string;
|
|
17
|
+
export { control_1 as control };
|
|
18
|
+
}
|
|
19
|
+
namespace validate {
|
|
20
|
+
export namespace control_2 {
|
|
21
|
+
let type_1: string;
|
|
22
|
+
export { type_1 as type };
|
|
23
|
+
}
|
|
24
|
+
export { control_2 as control };
|
|
25
|
+
}
|
|
26
|
+
namespace maxHeight {
|
|
27
|
+
export namespace control_3 {
|
|
28
|
+
let type_2: string;
|
|
29
|
+
export { type_2 as type };
|
|
30
|
+
export let min: number;
|
|
31
|
+
export let max: number;
|
|
32
|
+
export let step: number;
|
|
33
|
+
}
|
|
34
|
+
export { control_3 as control };
|
|
35
|
+
}
|
|
36
|
+
namespace minHeight {
|
|
37
|
+
export namespace control_4 {
|
|
38
|
+
let type_3: string;
|
|
39
|
+
export { type_3 as type };
|
|
40
|
+
let min_1: number;
|
|
41
|
+
export { min_1 as min };
|
|
42
|
+
let max_1: number;
|
|
43
|
+
export { max_1 as max };
|
|
44
|
+
let step_1: number;
|
|
45
|
+
export { step_1 as step };
|
|
46
|
+
}
|
|
47
|
+
export { control_4 as control };
|
|
48
|
+
export let description: string;
|
|
49
|
+
export namespace table {
|
|
50
|
+
export namespace type_4 {
|
|
51
|
+
let summary: string;
|
|
52
|
+
}
|
|
53
|
+
export { type_4 as type };
|
|
54
|
+
export namespace defaultValue {
|
|
55
|
+
let summary_1: number;
|
|
56
|
+
export { summary_1 as summary };
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
namespace variant {
|
|
61
|
+
export namespace control_5 {
|
|
62
|
+
let type_5: string;
|
|
63
|
+
export { type_5 as type };
|
|
64
|
+
let options_1: string[];
|
|
65
|
+
export { options_1 as options };
|
|
66
|
+
}
|
|
67
|
+
export { control_5 as control };
|
|
68
|
+
}
|
|
69
|
+
namespace color {
|
|
70
|
+
export namespace control_6 {
|
|
71
|
+
let type_6: string;
|
|
72
|
+
export { type_6 as type };
|
|
73
|
+
let options_2: string[];
|
|
74
|
+
export { options_2 as options };
|
|
75
|
+
}
|
|
76
|
+
export { control_6 as control };
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
export namespace parameters {
|
|
80
|
+
namespace backgrounds {
|
|
81
|
+
let _default: string;
|
|
82
|
+
export { _default as default };
|
|
83
|
+
export let values: {
|
|
84
|
+
name: string;
|
|
85
|
+
value: string;
|
|
86
|
+
}[];
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
export default _default;
|
|
91
|
+
export const Default: any;
|
|
92
|
+
export const Variation: any;
|
|
93
|
+
export const WithValidation: any;
|
|
94
|
+
export const LargeMinHeight: any;
|
|
95
|
+
import TextArea from "./TextArea";
|