allaw-ui 0.1.71 → 1.0.0
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/assets/allaw-font.eot +0 -0
- package/dist/assets/allaw-font.svg +15 -0
- package/dist/assets/allaw-font.ttf +0 -0
- package/dist/assets/allaw-font.woff +0 -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.css +17 -0
- package/dist/components/atoms/buttons/IconButton.d.ts +11 -0
- package/dist/components/atoms/buttons/IconButton.js +19 -0
- package/dist/components/atoms/buttons/IconButton.stories.d.ts +48 -0
- package/dist/components/atoms/buttons/IconButton.stories.js +76 -0
- package/dist/components/atoms/buttons/OAuthProviderButton.css +25 -23
- package/dist/components/atoms/buttons/OAuthProviderButton.d.ts +12 -0
- package/dist/components/atoms/buttons/OAuthProviderButton.js +176 -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.css +1 -0
- package/dist/components/atoms/buttons/PrimaryButton.d.ts +17 -0
- package/dist/components/atoms/buttons/PrimaryButton.js +117 -0
- package/dist/components/atoms/buttons/PrimaryButton.stories.d.ts +86 -0
- package/dist/components/atoms/buttons/PrimaryButton.stories.js +147 -0
- package/dist/components/atoms/buttons/SecondaryButton.css +66 -0
- package/dist/components/atoms/buttons/SecondaryButton.d.ts +19 -0
- package/dist/components/atoms/buttons/SecondaryButton.js +117 -0
- package/dist/components/atoms/buttons/SecondaryButton.stories.d.ts +72 -0
- package/dist/components/atoms/buttons/SecondaryButton.stories.js +149 -0
- package/dist/components/atoms/buttons/TabNavigation.css +78 -9
- package/dist/components/atoms/buttons/TabNavigation.d.ts +15 -0
- package/dist/components/atoms/buttons/TabNavigation.js +10 -0
- package/dist/components/atoms/buttons/TabNavigation.stories.d.ts +44 -0
- package/dist/components/atoms/buttons/TabNavigation.stories.js +66 -0
- package/dist/components/atoms/buttons/TertiaryButton.css +15 -6
- package/dist/components/atoms/buttons/TertiaryButton.d.ts +11 -0
- package/dist/components/atoms/buttons/TertiaryButton.js +10 -0
- package/dist/components/atoms/buttons/TertiaryButton.stories.d.ts +42 -0
- package/dist/components/atoms/buttons/TertiaryButton.stories.js +60 -0
- package/dist/components/atoms/buttons/index.d.ts +22 -0
- package/dist/components/atoms/buttons/index.js +11 -0
- package/dist/components/atoms/buttons/{PendingDocuments.css → pendingDocuments.module.css} +9 -8
- package/dist/components/atoms/checkboxes/Checkbox.d.ts +14 -0
- package/dist/components/atoms/checkboxes/Checkbox.js +19 -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 +14 -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/datepicker.css +241 -0
- package/dist/components/atoms/datepickers/index.d.ts +2 -0
- package/dist/components/atoms/datepickers/index.js +1 -0
- package/dist/components/atoms/filter/Basefiler.css +1 -1
- 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 +17 -0
- package/dist/components/atoms/filters/SingleFilter.js +81 -0
- package/dist/components/atoms/filters/SingleFilter.stories.d.ts +7 -0
- package/dist/components/atoms/filters/SingleFilter.stories.js +34 -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 +26 -0
- package/dist/components/atoms/inputs/Input.js +86 -0
- package/dist/components/atoms/inputs/Input.stories.d.ts +62 -0
- package/dist/components/atoms/inputs/Input.stories.js +101 -0
- package/dist/components/atoms/inputs/SearchBar.css +1 -1
- 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.css +1 -1
- package/dist/components/atoms/inputs/TextArea.d.ts +23 -0
- package/dist/components/atoms/inputs/TextArea.js +66 -0
- package/dist/components/atoms/inputs/TextArea.stories.d.ts +70 -0
- package/dist/components/atoms/inputs/TextArea.stories.js +113 -0
- package/dist/components/atoms/inputs/index.d.ts +6 -0
- package/dist/components/atoms/inputs/index.js +3 -0
- package/dist/components/atoms/progressBars/ProgressBar.css +20 -15
- package/dist/components/atoms/progressBars/ProgressBar.d.ts +18 -0
- package/dist/components/atoms/progressBars/ProgressBar.js +25 -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 +11 -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/index.d.ts +2 -0
- package/dist/components/atoms/radios/index.js +1 -0
- package/dist/components/atoms/selects/ComboBox.css +5 -3
- package/dist/components/atoms/selects/ComboBox.d.ts +27 -0
- package/dist/components/atoms/selects/ComboBox.js +172 -0
- package/dist/components/atoms/selects/ComboBox.stories.d.ts +94 -0
- package/dist/components/atoms/selects/ComboBox.stories.js +122 -0
- package/dist/components/atoms/selects/Select.d.ts +24 -0
- package/dist/components/atoms/selects/Select.js +154 -0
- package/dist/components/atoms/selects/{Select.css → Select.module.css} +16 -15
- package/dist/components/atoms/selects/Select.stories.d.ts +86 -0
- package/dist/components/atoms/selects/Select.stories.js +154 -0
- package/dist/components/atoms/selects/SelectableListItem.d.ts +13 -0
- package/dist/components/atoms/selects/SelectableListItem.js +18 -0
- package/dist/components/atoms/selects/SelectableListItem.module.css +157 -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.css +10 -8
- 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.css +54 -1
- 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 +10 -0
- package/dist/components/atoms/typography/Heading.js +7 -0
- package/dist/components/atoms/typography/Heading.stories.d.ts +45 -0
- package/dist/components/atoms/typography/Heading.stories.js +90 -0
- package/dist/components/atoms/typography/Link.d.ts +13 -0
- package/dist/components/atoms/typography/Link.js +35 -0
- package/dist/components/atoms/typography/Link.module.css +60 -0
- package/dist/components/atoms/typography/Link.stories.d.ts +57 -0
- package/dist/components/atoms/typography/Link.stories.js +105 -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 +13 -0
- package/dist/components/atoms/typography/TinyInfo.js +15 -0
- package/dist/components/atoms/typography/TinyInfo.stories.d.ts +52 -0
- package/dist/components/atoms/typography/TinyInfo.stories.js +97 -0
- package/dist/components/atoms/typography/cardDate.css +135 -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.css +55 -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.css +46 -3
- 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/billingCount/BillingCount.css +28 -0
- package/dist/components/molecules/billingCount/BillingCount.d.ts +8 -0
- package/dist/components/molecules/billingCount/BillingCount.js +75 -0
- package/dist/components/molecules/billingCount/BillingCount.stories.d.ts +21 -0
- package/dist/components/molecules/billingCount/BillingCount.stories.js +44 -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 +33 -0
- package/dist/components/molecules/blogCard/BlogCard.module.css +148 -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.module.css +48 -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.module.css +150 -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.module.css +59 -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.module.css +108 -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/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.css +54 -48
- 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/caseCardCompact.css +80 -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.css +79 -35
- 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 +18 -0
- package/dist/components/molecules/checkboxForm/CheckboxForm.js +24 -0
- package/dist/components/molecules/checkboxForm/CheckboxForm.stories.d.ts +90 -0
- package/dist/components/molecules/checkboxForm/CheckboxForm.stories.js +149 -0
- package/dist/components/molecules/checkboxForm/index.d.ts +2 -0
- package/dist/components/molecules/checkboxForm/index.js +1 -0
- package/dist/components/molecules/clientLinkCard/ClientLinkCard.css +59 -28
- 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 +34 -0
- package/dist/components/molecules/contactCard/ContactCard.stories.d.ts +83 -0
- package/dist/components/molecules/contactCard/ContactCard.stories.js +86 -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/contactCard.module.css +140 -0
- package/dist/components/molecules/contactCard/{ContactCard.css → detailedContactCard.css} +43 -105
- 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/datepickerForm.css +6 -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.css +8 -1
- package/dist/components/molecules/documentCard/DocumentCard.d.ts +16 -0
- package/dist/components/molecules/documentCard/DocumentCard.js +119 -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/loadingBox/LoadingBox.css +7 -8
- 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/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/pagination/pagination.css +120 -0
- package/dist/components/molecules/proCard/ProCard.d.ts +13 -0
- package/dist/components/molecules/proCard/ProCard.js +25 -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/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.css +1 -1
- package/dist/components/molecules/selectForm/SelectForm.d.ts +18 -0
- package/dist/components/molecules/selectForm/SelectForm.js +15 -0
- package/dist/components/molecules/selectForm/SelectForm.stories.d.ts +58 -0
- package/dist/components/molecules/selectForm/SelectForm.stories.js +96 -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/Stepper.css +17 -4
- package/dist/components/molecules/stepper/Stepper.d.ts +35 -0
- package/dist/components/molecules/stepper/Stepper.js +113 -0
- package/dist/components/molecules/stepper/Stepper.stories.d.ts +42 -0
- package/dist/components/molecules/stepper/Stepper.stories.js +132 -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 +76 -0
- package/dist/index.js +88 -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/stories/header.css +32 -0
- package/dist/stories/page.css +69 -0
- package/dist/styles/colors.css +3 -0
- package/dist/styles/colors.module.css +107 -0
- package/dist/styles/global.css +1 -0
- package/dist/styles/icons.css +76 -107
- package/dist/utils/regex.d.ts +5 -0
- package/dist/utils/regex.js +7 -0
- package/dist/utils/utils.d.ts +2 -0
- package/dist/utils/utils.js +48 -0
- package/package.json +18 -14
- package/dist/tsconfig.tsbuildinfo +0 -1
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
import React, { forwardRef, useState, useRef, useEffect, useMemo } from "react";
|
|
14
|
+
import ReactDatePicker from "react-datepicker";
|
|
15
|
+
import ReactDOM from "react-dom";
|
|
16
|
+
import "react-datepicker/dist/react-datepicker.css";
|
|
17
|
+
import "./datepicker.css";
|
|
18
|
+
import "../../../styles/global.css";
|
|
19
|
+
import { fr } from "date-fns/locale";
|
|
20
|
+
import { format } from "date-fns";
|
|
21
|
+
var CustomInput = forwardRef(function (_a, ref) {
|
|
22
|
+
var value = _a.value, onClick = _a.onClick, placeholder = _a.placeholder;
|
|
23
|
+
var _b = useState(placeholder), displayedPlaceholder = _b[0], setDisplayedPlaceholder = _b[1];
|
|
24
|
+
var containerRef = useRef(null);
|
|
25
|
+
var testRef = useRef(null);
|
|
26
|
+
useEffect(function () {
|
|
27
|
+
var checkTextFit = function () {
|
|
28
|
+
if (containerRef.current && testRef.current && placeholder) {
|
|
29
|
+
// Élément de test invisible pour mesurer la largeur réelle du texte complet
|
|
30
|
+
testRef.current.style.visibility = "hidden";
|
|
31
|
+
testRef.current.style.position = "absolute";
|
|
32
|
+
testRef.current.textContent = placeholder;
|
|
33
|
+
var containerWidth = containerRef.current.offsetWidth;
|
|
34
|
+
var textWidth = testRef.current.offsetWidth;
|
|
35
|
+
// Ajouter une marge pour l'icône et le padding (40px)
|
|
36
|
+
setDisplayedPlaceholder(textWidth + 40 > containerWidth ? "Date" : placeholder);
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
checkTextFit();
|
|
40
|
+
window.addEventListener("resize", checkTextFit);
|
|
41
|
+
return function () { return window.removeEventListener("resize", checkTextFit); };
|
|
42
|
+
}, [placeholder]);
|
|
43
|
+
return (React.createElement("button", { type: "button", className: "datepicker", onClick: onClick, ref: ref },
|
|
44
|
+
React.createElement("span", { className: "datepicker-content", ref: containerRef },
|
|
45
|
+
React.createElement("span", { className: "datepicker-text" }, value || displayedPlaceholder),
|
|
46
|
+
React.createElement("i", { className: "datepicker-icon allaw-icon-calendar" })),
|
|
47
|
+
React.createElement("span", { className: "datepicker-test-text", ref: testRef, "aria-hidden": "true" })));
|
|
48
|
+
});
|
|
49
|
+
CustomInput.displayName = "CustomInput";
|
|
50
|
+
var Datepicker = function (_a) {
|
|
51
|
+
var value = _a.value, onChange = _a.onChange, _b = _a.placeholder, placeholder = _b === void 0 ? "Sélectionner une date" : _b, _c = _a.yearDropdownItemNumber, yearDropdownItemNumber = _c === void 0 ? 10 : _c, maxDaysInPast = _a.maxDaysInPast, minDate = _a.minDate;
|
|
52
|
+
var _d = useState(value), selectedDate = _d[0], setSelectedDate = _d[1];
|
|
53
|
+
var _e = useState(false), isOpen = _e[0], setIsOpen = _e[1];
|
|
54
|
+
var _f = useState({ top: 0, left: 0 }), position = _f[0], setPosition = _f[1];
|
|
55
|
+
var buttonRef = useRef(null);
|
|
56
|
+
var calendarRef = useRef(null);
|
|
57
|
+
var _g = useState("bottom"), placement = _g[0], setPlacement = _g[1];
|
|
58
|
+
useEffect(function () {
|
|
59
|
+
setSelectedDate(value);
|
|
60
|
+
}, [value]);
|
|
61
|
+
var updatePosition = function () {
|
|
62
|
+
if (buttonRef.current) {
|
|
63
|
+
var rect = buttonRef.current.getBoundingClientRect();
|
|
64
|
+
var windowHeight = window.innerHeight;
|
|
65
|
+
var calendarHeight = 360; // Hauteur approximative du calendrier
|
|
66
|
+
// Vérifier s'il y a assez d'espace en dessous
|
|
67
|
+
var spaceBelow = windowHeight - rect.bottom;
|
|
68
|
+
var shouldShowBelow = spaceBelow >= calendarHeight;
|
|
69
|
+
setPlacement(shouldShowBelow ? "bottom" : "top");
|
|
70
|
+
// Calcul de la position horizontale centrée
|
|
71
|
+
var buttonCenter = rect.left + rect.width / 2;
|
|
72
|
+
var calendarWidth = 300; // Largeur du calendrier
|
|
73
|
+
var leftPosition = buttonCenter - calendarWidth / 2;
|
|
74
|
+
// Ajuster si le calendrier dépasse de l'écran
|
|
75
|
+
if (leftPosition + calendarWidth > window.innerWidth) {
|
|
76
|
+
leftPosition = window.innerWidth - calendarWidth - 16;
|
|
77
|
+
}
|
|
78
|
+
if (leftPosition < 16) {
|
|
79
|
+
leftPosition = 16;
|
|
80
|
+
}
|
|
81
|
+
// Calcul de la position verticale
|
|
82
|
+
var topPosition = shouldShowBelow
|
|
83
|
+
? rect.bottom + window.scrollY + 8 // 8px de marge en dessous du bouton
|
|
84
|
+
: rect.top + window.scrollY - calendarHeight - 8; // 8px de marge au-dessus du bouton
|
|
85
|
+
setPosition({
|
|
86
|
+
top: topPosition,
|
|
87
|
+
left: leftPosition + window.scrollX,
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
useEffect(function () {
|
|
92
|
+
if (isOpen) {
|
|
93
|
+
updatePosition();
|
|
94
|
+
window.addEventListener("scroll", updatePosition);
|
|
95
|
+
window.addEventListener("resize", updatePosition);
|
|
96
|
+
}
|
|
97
|
+
return function () {
|
|
98
|
+
window.removeEventListener("scroll", updatePosition);
|
|
99
|
+
window.removeEventListener("resize", updatePosition);
|
|
100
|
+
};
|
|
101
|
+
}, [isOpen]);
|
|
102
|
+
var handleDateChange = function (date) {
|
|
103
|
+
// console.log("Avant l'appel à onChange :", date);
|
|
104
|
+
setSelectedDate(date || undefined);
|
|
105
|
+
if (date) {
|
|
106
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(date);
|
|
107
|
+
}
|
|
108
|
+
// console.log("Après l'appel à onChange :", date);
|
|
109
|
+
setIsOpen(false);
|
|
110
|
+
};
|
|
111
|
+
var handleClickOutside = function (event) {
|
|
112
|
+
if (buttonRef.current &&
|
|
113
|
+
!buttonRef.current.contains(event.target) &&
|
|
114
|
+
calendarRef.current &&
|
|
115
|
+
!calendarRef.current.contains(event.target)) {
|
|
116
|
+
setIsOpen(false);
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
useEffect(function () {
|
|
120
|
+
if (isOpen) {
|
|
121
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
122
|
+
}
|
|
123
|
+
else {
|
|
124
|
+
document.removeEventListener("mousedown", handleClickOutside);
|
|
125
|
+
}
|
|
126
|
+
return function () {
|
|
127
|
+
document.removeEventListener("mousedown", handleClickOutside);
|
|
128
|
+
};
|
|
129
|
+
}, [isOpen]);
|
|
130
|
+
// Calcul de la date minimale
|
|
131
|
+
var calculatedMinDate = useMemo(function () {
|
|
132
|
+
if (minDate)
|
|
133
|
+
return minDate;
|
|
134
|
+
if (maxDaysInPast) {
|
|
135
|
+
var date = new Date();
|
|
136
|
+
date.setDate(date.getDate() - maxDaysInPast);
|
|
137
|
+
return date;
|
|
138
|
+
}
|
|
139
|
+
return new Date(new Date().setFullYear(new Date().getFullYear() - yearDropdownItemNumber));
|
|
140
|
+
}, [minDate, maxDaysInPast, yearDropdownItemNumber]);
|
|
141
|
+
return (React.createElement("div", { className: "datepicker-container", ref: buttonRef },
|
|
142
|
+
React.createElement(CustomInput, { value: selectedDate
|
|
143
|
+
? format(selectedDate, "dd MMMM yyyy", { locale: fr })
|
|
144
|
+
: "", onClick: function () { return setIsOpen(!isOpen); }, placeholder: placeholder }),
|
|
145
|
+
isOpen &&
|
|
146
|
+
ReactDOM.createPortal(React.createElement("div", { ref: calendarRef, className: "datepicker-portal ".concat(placement), style: __assign({ left: "".concat(position.left, "px") }, (placement === "bottom"
|
|
147
|
+
? { top: "".concat(position.top, "px") }
|
|
148
|
+
: { top: "".concat(position.top, "px") })) },
|
|
149
|
+
React.createElement(ReactDatePicker, { selected: selectedDate, onChange: handleDateChange, locale: fr, inline: true, dateFormat: "dd MMMM yyyy", calendarClassName: "custom-calendar", showMonthDropdown: true, showYearDropdown: true, dropdownMode: "select", maxDate: new Date(), minDate: calculatedMinDate })), document.body)));
|
|
150
|
+
};
|
|
151
|
+
export default Datepicker;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
declare namespace _default {
|
|
2
|
+
export let title: string;
|
|
3
|
+
export { Datepicker 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 yearDropdownItemNumber {
|
|
17
|
+
namespace control {
|
|
18
|
+
let type: string;
|
|
19
|
+
}
|
|
20
|
+
let description: string;
|
|
21
|
+
let defaultValue: number;
|
|
22
|
+
}
|
|
23
|
+
namespace maxDaysInPast {
|
|
24
|
+
export namespace control_1 {
|
|
25
|
+
let type_1: string;
|
|
26
|
+
export { type_1 as type };
|
|
27
|
+
}
|
|
28
|
+
export { control_1 as control };
|
|
29
|
+
let description_1: string;
|
|
30
|
+
export { description_1 as description };
|
|
31
|
+
}
|
|
32
|
+
namespace minDate {
|
|
33
|
+
export namespace control_2 {
|
|
34
|
+
let type_2: string;
|
|
35
|
+
export { type_2 as type };
|
|
36
|
+
}
|
|
37
|
+
export { control_2 as control };
|
|
38
|
+
let description_2: string;
|
|
39
|
+
export { description_2 as description };
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
export default _default;
|
|
44
|
+
export namespace Default {
|
|
45
|
+
namespace args {
|
|
46
|
+
export let placeholder: string;
|
|
47
|
+
let yearDropdownItemNumber_1: number;
|
|
48
|
+
export { yearDropdownItemNumber_1 as yearDropdownItemNumber };
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
export namespace WithValue {
|
|
52
|
+
export namespace args_1 {
|
|
53
|
+
export let value: Date;
|
|
54
|
+
let placeholder_1: string;
|
|
55
|
+
export { placeholder_1 as placeholder };
|
|
56
|
+
let yearDropdownItemNumber_2: number;
|
|
57
|
+
export { yearDropdownItemNumber_2 as yearDropdownItemNumber };
|
|
58
|
+
}
|
|
59
|
+
export { args_1 as args };
|
|
60
|
+
}
|
|
61
|
+
export namespace WithMaxDaysInPast {
|
|
62
|
+
export namespace args_2 {
|
|
63
|
+
let placeholder_2: string;
|
|
64
|
+
export { placeholder_2 as placeholder };
|
|
65
|
+
let maxDaysInPast_1: number;
|
|
66
|
+
export { maxDaysInPast_1 as maxDaysInPast };
|
|
67
|
+
}
|
|
68
|
+
export { args_2 as args };
|
|
69
|
+
}
|
|
70
|
+
export namespace WithMinDate {
|
|
71
|
+
export namespace args_3 {
|
|
72
|
+
let placeholder_3: string;
|
|
73
|
+
export { placeholder_3 as placeholder };
|
|
74
|
+
let minDate_1: Date;
|
|
75
|
+
export { minDate_1 as minDate };
|
|
76
|
+
}
|
|
77
|
+
export { args_3 as args };
|
|
78
|
+
}
|
|
79
|
+
export namespace WithBothConstraints {
|
|
80
|
+
export namespace args_4 {
|
|
81
|
+
let placeholder_4: string;
|
|
82
|
+
export { placeholder_4 as placeholder };
|
|
83
|
+
let maxDaysInPast_2: number;
|
|
84
|
+
export { maxDaysInPast_2 as maxDaysInPast };
|
|
85
|
+
let minDate_2: Date;
|
|
86
|
+
export { minDate_2 as minDate };
|
|
87
|
+
}
|
|
88
|
+
export { args_4 as args };
|
|
89
|
+
}
|
|
90
|
+
import Datepicker from "./Datepicker";
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import Datepicker from "./Datepicker";
|
|
3
|
+
import "../../../styles/global.css";
|
|
4
|
+
import "react-datepicker/dist/react-datepicker.css";
|
|
5
|
+
import { fr } from "date-fns/locale";
|
|
6
|
+
export default {
|
|
7
|
+
title: "Components/Atoms/Datepickers/Datepicker",
|
|
8
|
+
component: Datepicker,
|
|
9
|
+
tags: ["autodocs"],
|
|
10
|
+
parameters: {
|
|
11
|
+
backgrounds: {
|
|
12
|
+
default: "light",
|
|
13
|
+
values: [
|
|
14
|
+
{ name: "light", value: "#ffffff" },
|
|
15
|
+
{ name: "grey", value: "#728ea7" },
|
|
16
|
+
{ name: "dark", value: "#171e25" },
|
|
17
|
+
],
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
argTypes: {
|
|
21
|
+
yearDropdownItemNumber: {
|
|
22
|
+
control: { type: "number" },
|
|
23
|
+
description: "Nombre d'années à afficher dans la liste déroulante",
|
|
24
|
+
defaultValue: 10,
|
|
25
|
+
},
|
|
26
|
+
maxDaysInPast: {
|
|
27
|
+
control: { type: "number" },
|
|
28
|
+
description: "Nombre maximum de jours dans le passé sélectionnables",
|
|
29
|
+
},
|
|
30
|
+
minDate: {
|
|
31
|
+
control: { type: "date" },
|
|
32
|
+
description: "Date minimale sélectionnable",
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
export var Default = {
|
|
37
|
+
args: {
|
|
38
|
+
placeholder: "Sélectionner une date",
|
|
39
|
+
yearDropdownItemNumber: 10,
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
export var WithValue = {
|
|
43
|
+
args: {
|
|
44
|
+
value: new Date("2022-11-10"),
|
|
45
|
+
placeholder: "Sélectionner une date",
|
|
46
|
+
yearDropdownItemNumber: 10,
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
export var WithMaxDaysInPast = {
|
|
50
|
+
args: {
|
|
51
|
+
placeholder: "Sélectionner une date",
|
|
52
|
+
maxDaysInPast: 10,
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
export var WithMinDate = {
|
|
56
|
+
args: {
|
|
57
|
+
placeholder: "Sélectionner une date",
|
|
58
|
+
minDate: new Date("2024-01-01"),
|
|
59
|
+
},
|
|
60
|
+
};
|
|
61
|
+
export var WithBothConstraints = {
|
|
62
|
+
args: {
|
|
63
|
+
placeholder: "Sélectionner une date",
|
|
64
|
+
maxDaysInPast: 30,
|
|
65
|
+
minDate: new Date("2024-01-01"),
|
|
66
|
+
},
|
|
67
|
+
};
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
.datepicker-container {
|
|
2
|
+
position: relative;
|
|
3
|
+
width: 100%;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.datepicker {
|
|
7
|
+
display: flex;
|
|
8
|
+
height: 40px;
|
|
9
|
+
padding: 8px 16px;
|
|
10
|
+
justify-content: space-between;
|
|
11
|
+
align-items: center;
|
|
12
|
+
border-radius: 8px;
|
|
13
|
+
background: var(--Primary-Light-grey, #f4f7fb);
|
|
14
|
+
border: none;
|
|
15
|
+
cursor: pointer;
|
|
16
|
+
min-width: 120px;
|
|
17
|
+
width: 100%;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.datepicker:hover {
|
|
21
|
+
background: var(--grey-venom, #e6edf5);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.datepicker-content {
|
|
25
|
+
display: flex;
|
|
26
|
+
align-items: center;
|
|
27
|
+
gap: 8px;
|
|
28
|
+
width: 100%;
|
|
29
|
+
justify-content: space-between;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.datepicker-text {
|
|
33
|
+
color: var(--Primary-Mid-black, #171e25);
|
|
34
|
+
font-family: "Open Sans";
|
|
35
|
+
font-size: 16px;
|
|
36
|
+
font-style: normal;
|
|
37
|
+
font-weight: 700;
|
|
38
|
+
line-height: normal;
|
|
39
|
+
white-space: nowrap;
|
|
40
|
+
overflow: hidden;
|
|
41
|
+
text-overflow: ellipsis;
|
|
42
|
+
flex: 1;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.datepicker-icon {
|
|
46
|
+
color: var(--Primary-Dark-grey, #456073);
|
|
47
|
+
font-size: 16px;
|
|
48
|
+
flex-shrink: 0;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.datepicker-test-text {
|
|
52
|
+
visibility: hidden;
|
|
53
|
+
position: absolute;
|
|
54
|
+
white-space: nowrap;
|
|
55
|
+
font-family: "Open Sans";
|
|
56
|
+
font-size: 16px;
|
|
57
|
+
font-weight: 700;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/* Customisation du calendrier */
|
|
61
|
+
.custom-calendar {
|
|
62
|
+
border: none !important;
|
|
63
|
+
font-family: "Open Sans";
|
|
64
|
+
font-size: 16px;
|
|
65
|
+
width: 300px !important;
|
|
66
|
+
padding: 16px;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.react-datepicker__month-container {
|
|
70
|
+
width: 100%;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.react-datepicker__header {
|
|
74
|
+
background: white;
|
|
75
|
+
border: none;
|
|
76
|
+
padding: 0;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.react-datepicker__day-names {
|
|
80
|
+
display: flex;
|
|
81
|
+
justify-content: space-between;
|
|
82
|
+
padding: 16px 8px;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.react-datepicker__day-name {
|
|
86
|
+
color: var(--Primary-Dark-grey, #456073);
|
|
87
|
+
font-weight: 600;
|
|
88
|
+
width: 36px;
|
|
89
|
+
margin: 0;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.react-datepicker__month {
|
|
93
|
+
margin: 0;
|
|
94
|
+
padding: 8px;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.react-datepicker__day {
|
|
98
|
+
width: 36px;
|
|
99
|
+
height: 36px;
|
|
100
|
+
line-height: 36px;
|
|
101
|
+
margin: 0;
|
|
102
|
+
border-radius: 18px;
|
|
103
|
+
color: var(--Primary-Dark-grey, #456073);
|
|
104
|
+
font-family: "Open Sans";
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.react-datepicker__day:hover {
|
|
108
|
+
background: var(--grey-venom, #e6edf5);
|
|
109
|
+
border-radius: 18px;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.react-datepicker__day--selected {
|
|
113
|
+
background: var(--bleu-allaw, #1985e8) !important;
|
|
114
|
+
border-radius: 18px !important;
|
|
115
|
+
color: white !important;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.react-datepicker__day--keyboard-selected {
|
|
119
|
+
background: var(--grey-venom, #e6edf5);
|
|
120
|
+
border-radius: 18px;
|
|
121
|
+
color: var(--Primary-Mid-black, #171e25);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.react-datepicker__day--keyboard-selected:not([aria-disabled="true"]):hover,
|
|
125
|
+
.react-datepicker__month-text--keyboard-selected:not(
|
|
126
|
+
[aria-disabled="true"]
|
|
127
|
+
):hover,
|
|
128
|
+
.react-datepicker__quarter-text--keyboard-selected:not(
|
|
129
|
+
[aria-disabled="true"]
|
|
130
|
+
):hover,
|
|
131
|
+
.react-datepicker__year-text--keyboard-selected:not(
|
|
132
|
+
[aria-disabled="true"]
|
|
133
|
+
):hover {
|
|
134
|
+
background-color: var(--bleu-allaw, #25beeb);
|
|
135
|
+
color: white;
|
|
136
|
+
border-radius: 18px;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.custom-header {
|
|
140
|
+
margin-bottom: 16px;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.year-dropdown,
|
|
144
|
+
.month-dropdown {
|
|
145
|
+
padding: 8px;
|
|
146
|
+
min-width: 100px;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/* Style pour mobile */
|
|
150
|
+
@media (max-width: 768px) {
|
|
151
|
+
.datepicker {
|
|
152
|
+
width: 100%;
|
|
153
|
+
min-width: unset;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.datepicker-portal {
|
|
158
|
+
position: absolute;
|
|
159
|
+
z-index: 9999;
|
|
160
|
+
background: white;
|
|
161
|
+
border: 1px solid var(--grey-venom, #e6edf5);
|
|
162
|
+
border-radius: 8px;
|
|
163
|
+
box-shadow: 0px 4px 8px 0px rgba(9, 30, 66, 0.15);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/* Suppression des styles top et bottom qui ne sont plus nécessaires */
|
|
167
|
+
.datepicker-portal.top,
|
|
168
|
+
.datepicker-portal.bottom {
|
|
169
|
+
transform: none; /* Suppression de la transformation */
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/* Customisation des flèches de navigation */
|
|
173
|
+
.react-datepicker__navigation {
|
|
174
|
+
padding: 8px;
|
|
175
|
+
border-radius: 18px;
|
|
176
|
+
margin: 8px;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.react-datepicker__navigation--previous {
|
|
180
|
+
left: 1px;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.react-datepicker__navigation--next {
|
|
184
|
+
right: 1px;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.react-datepicker__navigation:hover {
|
|
188
|
+
background: var(--grey-venom, #e6edf5);
|
|
189
|
+
border-radius: 18px;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/* Padding pour le mois en cours */
|
|
193
|
+
.react-datepicker__current-month {
|
|
194
|
+
padding-bottom: 18px;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.react-datepicker__current-month.react-datepicker__current-month--hasYearDropdown.react-datepicker__current-month--hasMonthDropdown {
|
|
198
|
+
padding-bottom: 16px;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.react-datepicker__month-select,
|
|
202
|
+
.react-datepicker__year-select {
|
|
203
|
+
font-size: 16px;
|
|
204
|
+
font-family: "Open Sans";
|
|
205
|
+
padding: 6px 10px;
|
|
206
|
+
border-radius: 8px;
|
|
207
|
+
border: 1px solid var(--grey-venom, #e6edf5);
|
|
208
|
+
background-color: white;
|
|
209
|
+
cursor: pointer;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.react-datepicker__month-select:hover,
|
|
213
|
+
.react-datepicker__year-select:hover {
|
|
214
|
+
background: var(--grey-venom, #e6edf5);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.react-datepicker__navigation-icon.react-datepicker__navigation-icon--previous {
|
|
218
|
+
left: 1px;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.react-datepicker__navigation-icon.react-datepicker__navigation-icon--next {
|
|
222
|
+
right: 1px;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.react-datepicker__day:not([aria-disabled="true"]):hover,
|
|
226
|
+
.react-datepicker__month-text:not([aria-disabled="true"]):hover,
|
|
227
|
+
.react-datepicker__quarter-text:not([aria-disabled="true"]):hover,
|
|
228
|
+
.react-datepicker__year-text:not([aria-disabled="true"]):hover {
|
|
229
|
+
border-radius: 18px;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.react-datepicker__day--disabled {
|
|
233
|
+
color: var(--venom-grey-dark, #d1dce8) !important;
|
|
234
|
+
cursor: not-allowed;
|
|
235
|
+
transition: all 0.2s ease;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.react-datepicker__day--disabled:hover {
|
|
239
|
+
background: none !important;
|
|
240
|
+
cursor: not-allowed;
|
|
241
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Datepicker } from "./Datepicker";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import "./Basefiler.css";
|
|
2
|
+
import React from "react";
|
|
3
|
+
export type FilterProps = {
|
|
4
|
+
defaultSelectedValue?: string;
|
|
5
|
+
filterData: {
|
|
6
|
+
value: string;
|
|
7
|
+
name: string;
|
|
8
|
+
}[];
|
|
9
|
+
setFilter: (selectedValue: string) => void;
|
|
10
|
+
children?: React.ReactNode;
|
|
11
|
+
required?: boolean;
|
|
12
|
+
showNumIndic?: boolean;
|
|
13
|
+
showBackdrop?: boolean;
|
|
14
|
+
isStatusTag?: boolean;
|
|
15
|
+
};
|
|
16
|
+
declare const BaseFilter: ({ showNumIndic, required, defaultSelectedValue, filterData, setFilter, showBackdrop, children, ...props }: FilterProps) => React.JSX.Element;
|
|
17
|
+
export default BaseFilter;
|
|
@@ -0,0 +1,70 @@
|
|
|
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
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
import "./Basefiler.css";
|
|
24
|
+
import { FilterButtonPrimary, PrimaryButton } from "../buttons";
|
|
25
|
+
import { TinyInfo } from "../typography";
|
|
26
|
+
import React, { useState } from "react";
|
|
27
|
+
var BaseFilter = function (_a) {
|
|
28
|
+
var _b = _a.showNumIndic, showNumIndic = _b === void 0 ? false : _b, _c = _a.required, required = _c === void 0 ? true : _c, defaultSelectedValue = _a.defaultSelectedValue, filterData = _a.filterData, setFilter = _a.setFilter, _d = _a.showBackdrop, showBackdrop = _d === void 0 ? false : _d, children = _a.children, props = __rest(_a, ["showNumIndic", "required", "defaultSelectedValue", "filterData", "setFilter", "showBackdrop", "children"]);
|
|
29
|
+
var _e = useState(false), isOpen = _e[0], setIsOpen = _e[1];
|
|
30
|
+
var _f = useState(defaultSelectedValue || ""), selectedValue = _f[0], setSelectedValue = _f[1];
|
|
31
|
+
var handleClose = function () {
|
|
32
|
+
setFilter(selectedValue);
|
|
33
|
+
setIsOpen(false);
|
|
34
|
+
};
|
|
35
|
+
var handleButtonTap = function () {
|
|
36
|
+
isOpen ? handleClose() : setIsOpen(true);
|
|
37
|
+
};
|
|
38
|
+
var Item = function (_a) {
|
|
39
|
+
var name = _a.name, value = _a.value;
|
|
40
|
+
return (React.createElement("button", { className: "item", onClick: function () { setSelectedValue(value); handleClose(); } },
|
|
41
|
+
React.createElement("div", { className: "round" },
|
|
42
|
+
React.createElement("div", { className: selectedValue === value ? "selected" : "notSelected" })),
|
|
43
|
+
React.createElement("span", null, name)));
|
|
44
|
+
};
|
|
45
|
+
var SmallItem = function (_a) {
|
|
46
|
+
var name = _a.name, value = _a.value;
|
|
47
|
+
return (React.createElement("button", { className: "smallItem", onClick: function () { setSelectedValue(value); } },
|
|
48
|
+
React.createElement("div", { className: "round" },
|
|
49
|
+
React.createElement("div", { className: selectedValue === value ? "selected" : "notSelected" })),
|
|
50
|
+
React.createElement("span", null, name)));
|
|
51
|
+
};
|
|
52
|
+
return (React.createElement(React.Fragment, null,
|
|
53
|
+
React.createElement("div", __assign({ className: "baseFilter" }, props),
|
|
54
|
+
React.createElement(FilterButtonPrimary, { onClick: handleButtonTap, zIndex: "100" },
|
|
55
|
+
children,
|
|
56
|
+
React.createElement("p", { style: { color: "#25BEEB", fontWeight: "600" } }, showNumIndic && "(".concat(selectedValue.length, ")"))),
|
|
57
|
+
isOpen && (React.createElement("div", { className: "options" }, filterData && filterData.length > 0 &&
|
|
58
|
+
filterData.map(function (item, idx) { return (React.createElement(Item, { name: item.name, value: item.value, key: idx })); }))),
|
|
59
|
+
React.createElement("div", { className: "optionsSmall", style: { bottom: isOpen ? "0" : "-100%" } },
|
|
60
|
+
React.createElement("div", { className: "row" },
|
|
61
|
+
React.createElement("div", { style: { minWidth: "20px" } }),
|
|
62
|
+
React.createElement(TinyInfo, { text: children, variant: "bold14", color: "noir" }),
|
|
63
|
+
React.createElement("button", { className: "closeButton", onClick: handleClose },
|
|
64
|
+
React.createElement("i", { className: "allaw-icon-close" }))),
|
|
65
|
+
React.createElement("div", { className: "choices" }, filterData && filterData.length > 0 &&
|
|
66
|
+
filterData.map(function (item, idx) { return (React.createElement(SmallItem, { name: item.name, value: item.value, key: idx })); })),
|
|
67
|
+
React.createElement(PrimaryButton, { label: "Voir les r\u00E9sultats", onClick: handleClose }))),
|
|
68
|
+
isOpen && (React.createElement("div", { className: "backdrop", onClick: handleClose }))));
|
|
69
|
+
};
|
|
70
|
+
export default BaseFilter;
|