@situaction/traquiste-mobile 1.0.0 → 1.1.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/README.md +60 -90
- package/build/components/AssociationTag/AssociationTag.d.ts +19 -0
- package/build/components/AssociationTag/AssociationTag.d.ts.map +1 -0
- package/build/components/AssociationTag/AssociationTag.js +29 -0
- package/build/components/AssociationTag/AssociationTag.js.map +1 -0
- package/build/components/AssociationTag/AssociationTag.styles.d.ts +21 -0
- package/build/components/AssociationTag/AssociationTag.styles.d.ts.map +1 -0
- package/build/components/AssociationTag/AssociationTag.styles.js +26 -0
- package/build/components/AssociationTag/AssociationTag.styles.js.map +1 -0
- package/build/components/AssociationTag/index.d.ts +3 -0
- package/build/components/AssociationTag/index.d.ts.map +1 -0
- package/build/components/AssociationTag/index.js +2 -0
- package/build/components/AssociationTag/index.js.map +1 -0
- package/build/components/BottomSheet/BottomSheet.d.ts +36 -0
- package/build/components/BottomSheet/BottomSheet.d.ts.map +1 -0
- package/build/components/BottomSheet/BottomSheet.js +76 -0
- package/build/components/BottomSheet/BottomSheet.js.map +1 -0
- package/build/components/BottomSheet/BottomSheet.styles.d.ts +32 -0
- package/build/components/BottomSheet/BottomSheet.styles.d.ts.map +1 -0
- package/build/components/BottomSheet/BottomSheet.styles.js +31 -0
- package/build/components/BottomSheet/BottomSheet.styles.js.map +1 -0
- package/build/components/BottomSheet/index.d.ts +3 -0
- package/build/components/BottomSheet/index.d.ts.map +1 -0
- package/build/components/BottomSheet/index.js +2 -0
- package/build/components/BottomSheet/index.js.map +1 -0
- package/build/components/Button/Button.d.ts +5 -1
- package/build/components/Button/Button.d.ts.map +1 -1
- package/build/components/Button/Button.js +11 -5
- package/build/components/Button/Button.js.map +1 -1
- package/build/components/ButtonAction/ButtonAction.d.ts +5 -1
- package/build/components/ButtonAction/ButtonAction.d.ts.map +1 -1
- package/build/components/ButtonAction/ButtonAction.js +2 -2
- package/build/components/ButtonAction/ButtonAction.js.map +1 -1
- package/build/components/ButtonMap/ButtonMap.d.ts +5 -1
- package/build/components/ButtonMap/ButtonMap.d.ts.map +1 -1
- package/build/components/ButtonMap/ButtonMap.js +11 -9
- package/build/components/ButtonMap/ButtonMap.js.map +1 -1
- package/build/components/ButtonMenu/ButtonMenu.d.ts +5 -1
- package/build/components/ButtonMenu/ButtonMenu.d.ts.map +1 -1
- package/build/components/ButtonMenu/ButtonMenu.js +15 -15
- package/build/components/ButtonMenu/ButtonMenu.js.map +1 -1
- package/build/components/Calendar/Calendar.d.ts +4 -0
- package/build/components/Calendar/Calendar.d.ts.map +1 -0
- package/build/components/Calendar/Calendar.i18n.d.ts +34 -0
- package/build/components/Calendar/Calendar.i18n.d.ts.map +1 -0
- package/build/components/Calendar/Calendar.i18n.js +34 -0
- package/build/components/Calendar/Calendar.i18n.js.map +1 -0
- package/build/components/Calendar/Calendar.js +172 -0
- package/build/components/Calendar/Calendar.js.map +1 -0
- package/build/components/Calendar/Calendar.styles.d.ts +254 -0
- package/build/components/Calendar/Calendar.styles.d.ts.map +1 -0
- package/build/components/Calendar/Calendar.styles.js +231 -0
- package/build/components/Calendar/Calendar.styles.js.map +1 -0
- package/build/components/Calendar/Calendar.types.d.ts +62 -0
- package/build/components/Calendar/Calendar.types.d.ts.map +1 -0
- package/build/components/Calendar/Calendar.types.js +2 -0
- package/build/components/Calendar/Calendar.types.js.map +1 -0
- package/build/components/Calendar/CalendarDay.d.ts +4 -0
- package/build/components/Calendar/CalendarDay.d.ts.map +1 -0
- package/build/components/Calendar/CalendarDay.js +52 -0
- package/build/components/Calendar/CalendarDay.js.map +1 -0
- package/build/components/Calendar/CalendarHeader.d.ts +4 -0
- package/build/components/Calendar/CalendarHeader.d.ts.map +1 -0
- package/build/components/Calendar/CalendarHeader.js +16 -0
- package/build/components/Calendar/CalendarHeader.js.map +1 -0
- package/build/components/Calendar/CalendarLegend.d.ts +3 -0
- package/build/components/Calendar/CalendarLegend.d.ts.map +1 -0
- package/build/components/Calendar/CalendarLegend.js +38 -0
- package/build/components/Calendar/CalendarLegend.js.map +1 -0
- package/build/components/Calendar/CalendarYearPicker.d.ts +19 -0
- package/build/components/Calendar/CalendarYearPicker.d.ts.map +1 -0
- package/build/components/Calendar/CalendarYearPicker.js +158 -0
- package/build/components/Calendar/CalendarYearPicker.js.map +1 -0
- package/build/components/Calendar/index.d.ts +5 -0
- package/build/components/Calendar/index.d.ts.map +1 -0
- package/build/components/Calendar/index.js +3 -0
- package/build/components/Calendar/index.js.map +1 -0
- package/build/components/Card/Card.d.ts +25 -0
- package/build/components/Card/Card.d.ts.map +1 -0
- package/build/components/Card/Card.js +31 -0
- package/build/components/Card/Card.js.map +1 -0
- package/build/components/Card/Card.styles.d.ts +15 -0
- package/build/components/Card/Card.styles.d.ts.map +1 -0
- package/build/components/Card/Card.styles.js +18 -0
- package/build/components/Card/Card.styles.js.map +1 -0
- package/build/components/Card/index.d.ts +3 -0
- package/build/components/Card/index.d.ts.map +1 -0
- package/build/components/Card/index.js +2 -0
- package/build/components/Card/index.js.map +1 -0
- package/build/components/CardEquip/CardEquip.d.ts +60 -0
- package/build/components/CardEquip/CardEquip.d.ts.map +1 -0
- package/build/components/CardEquip/CardEquip.js +106 -0
- package/build/components/CardEquip/CardEquip.js.map +1 -0
- package/build/components/CardEquip/CardEquip.styles.d.ts +125 -0
- package/build/components/CardEquip/CardEquip.styles.d.ts.map +1 -0
- package/build/components/CardEquip/CardEquip.styles.js +139 -0
- package/build/components/CardEquip/CardEquip.styles.js.map +1 -0
- package/build/components/CardEquip/index.d.ts +3 -0
- package/build/components/CardEquip/index.d.ts.map +1 -0
- package/build/components/CardEquip/index.js +2 -0
- package/build/components/CardEquip/index.js.map +1 -0
- package/build/components/CardProfile/CardProfile.d.ts +55 -0
- package/build/components/CardProfile/CardProfile.d.ts.map +1 -0
- package/build/components/CardProfile/CardProfile.js +74 -0
- package/build/components/CardProfile/CardProfile.js.map +1 -0
- package/build/components/CardProfile/CardProfile.styles.d.ts +62 -0
- package/build/components/CardProfile/CardProfile.styles.d.ts.map +1 -0
- package/build/components/CardProfile/CardProfile.styles.js +65 -0
- package/build/components/CardProfile/CardProfile.styles.js.map +1 -0
- package/build/components/CardProfile/index.d.ts +3 -0
- package/build/components/CardProfile/index.d.ts.map +1 -0
- package/build/components/CardProfile/index.js +2 -0
- package/build/components/CardProfile/index.js.map +1 -0
- package/build/components/Checkbox/Checkbox.d.ts +28 -0
- package/build/components/Checkbox/Checkbox.d.ts.map +1 -0
- package/build/components/Checkbox/Checkbox.js +78 -0
- package/build/components/Checkbox/Checkbox.js.map +1 -0
- package/build/components/Checkbox/Checkbox.styles.d.ts +34 -0
- package/build/components/Checkbox/Checkbox.styles.d.ts.map +1 -0
- package/build/components/Checkbox/Checkbox.styles.js +39 -0
- package/build/components/Checkbox/Checkbox.styles.js.map +1 -0
- package/build/components/Checkbox/Checkbox.types.d.ts +25 -0
- package/build/components/Checkbox/Checkbox.types.d.ts.map +1 -0
- package/build/components/Checkbox/Checkbox.types.js +5 -0
- package/build/components/Checkbox/Checkbox.types.js.map +1 -0
- package/build/components/Checkbox/index.d.ts +3 -0
- package/build/components/Checkbox/index.d.ts.map +1 -0
- package/build/components/Checkbox/index.js +2 -0
- package/build/components/Checkbox/index.js.map +1 -0
- package/build/components/Cluster/Cluster.d.ts +23 -0
- package/build/components/Cluster/Cluster.d.ts.map +1 -0
- package/build/components/Cluster/Cluster.js +34 -0
- package/build/components/Cluster/Cluster.js.map +1 -0
- package/build/components/Cluster/Cluster.styles.d.ts +33 -0
- package/build/components/Cluster/Cluster.styles.d.ts.map +1 -0
- package/build/components/Cluster/Cluster.styles.js +34 -0
- package/build/components/Cluster/Cluster.styles.js.map +1 -0
- package/build/components/Cluster/index.d.ts +3 -0
- package/build/components/Cluster/index.d.ts.map +1 -0
- package/build/components/Cluster/index.js +2 -0
- package/build/components/Cluster/index.js.map +1 -0
- package/build/components/ColorPicker/ColorPicker.d.ts +20 -0
- package/build/components/ColorPicker/ColorPicker.d.ts.map +1 -0
- package/build/components/ColorPicker/ColorPicker.js +17 -0
- package/build/components/ColorPicker/ColorPicker.js.map +1 -0
- package/build/components/ColorPicker/ColorPicker.styles.d.ts +10 -0
- package/build/components/ColorPicker/ColorPicker.styles.d.ts.map +1 -0
- package/build/components/ColorPicker/ColorPicker.styles.js +11 -0
- package/build/components/ColorPicker/ColorPicker.styles.js.map +1 -0
- package/build/components/ColorPicker/index.d.ts +3 -0
- package/build/components/ColorPicker/index.d.ts.map +1 -0
- package/build/components/ColorPicker/index.js +2 -0
- package/build/components/ColorPicker/index.js.map +1 -0
- package/build/components/ColorSwatch/ColorSwatch.d.ts +20 -0
- package/build/components/ColorSwatch/ColorSwatch.d.ts.map +1 -0
- package/build/components/ColorSwatch/ColorSwatch.js +35 -0
- package/build/components/ColorSwatch/ColorSwatch.js.map +1 -0
- package/build/components/ColorSwatch/ColorSwatch.styles.d.ts +16 -0
- package/build/components/ColorSwatch/ColorSwatch.styles.d.ts.map +1 -0
- package/build/components/ColorSwatch/ColorSwatch.styles.js +19 -0
- package/build/components/ColorSwatch/ColorSwatch.styles.js.map +1 -0
- package/build/components/ColorSwatch/index.d.ts +3 -0
- package/build/components/ColorSwatch/index.d.ts.map +1 -0
- package/build/components/ColorSwatch/index.js +2 -0
- package/build/components/ColorSwatch/index.js.map +1 -0
- package/build/components/FileCard/FileCard.d.ts +29 -0
- package/build/components/FileCard/FileCard.d.ts.map +1 -0
- package/build/components/FileCard/FileCard.js +66 -0
- package/build/components/FileCard/FileCard.js.map +1 -0
- package/build/components/FileCard/FileCard.styles.d.ts +54 -0
- package/build/components/FileCard/FileCard.styles.d.ts.map +1 -0
- package/build/components/FileCard/FileCard.styles.js +56 -0
- package/build/components/FileCard/FileCard.styles.js.map +1 -0
- package/build/components/FileCard/index.d.ts +3 -0
- package/build/components/FileCard/index.d.ts.map +1 -0
- package/build/components/FileCard/index.js +2 -0
- package/build/components/FileCard/index.js.map +1 -0
- package/build/components/FilterChip/FilterChip.d.ts +5 -1
- package/build/components/FilterChip/FilterChip.d.ts.map +1 -1
- package/build/components/FilterChip/FilterChip.js +12 -11
- package/build/components/FilterChip/FilterChip.js.map +1 -1
- package/build/components/FilterNav/FilterNav.d.ts +53 -0
- package/build/components/FilterNav/FilterNav.d.ts.map +1 -0
- package/build/components/FilterNav/FilterNav.js +39 -0
- package/build/components/FilterNav/FilterNav.js.map +1 -0
- package/build/components/FilterNav/FilterNav.styles.d.ts +10 -0
- package/build/components/FilterNav/FilterNav.styles.d.ts.map +1 -0
- package/build/components/FilterNav/FilterNav.styles.js +11 -0
- package/build/components/FilterNav/FilterNav.styles.js.map +1 -0
- package/build/components/FilterNav/index.d.ts +3 -0
- package/build/components/FilterNav/index.d.ts.map +1 -0
- package/build/components/FilterNav/index.js +2 -0
- package/build/components/FilterNav/index.js.map +1 -0
- package/build/components/ImgPicker/ImgPicker.d.ts +47 -0
- package/build/components/ImgPicker/ImgPicker.d.ts.map +1 -0
- package/build/components/ImgPicker/ImgPicker.js +49 -0
- package/build/components/ImgPicker/ImgPicker.js.map +1 -0
- package/build/components/ImgPicker/ImgPicker.styles.d.ts +18 -0
- package/build/components/ImgPicker/ImgPicker.styles.d.ts.map +1 -0
- package/build/components/ImgPicker/ImgPicker.styles.js +19 -0
- package/build/components/ImgPicker/ImgPicker.styles.js.map +1 -0
- package/build/components/ImgPicker/index.d.ts +3 -0
- package/build/components/ImgPicker/index.d.ts.map +1 -0
- package/build/components/ImgPicker/index.js +2 -0
- package/build/components/ImgPicker/index.js.map +1 -0
- package/build/components/InlineInfo/InlineInfo.d.ts +60 -0
- package/build/components/InlineInfo/InlineInfo.d.ts.map +1 -0
- package/build/components/InlineInfo/InlineInfo.js +115 -0
- package/build/components/InlineInfo/InlineInfo.js.map +1 -0
- package/build/components/InlineInfo/InlineInfo.styles.d.ts +42 -0
- package/build/components/InlineInfo/InlineInfo.styles.d.ts.map +1 -0
- package/build/components/InlineInfo/InlineInfo.styles.js +50 -0
- package/build/components/InlineInfo/InlineInfo.styles.js.map +1 -0
- package/build/components/InlineInfo/index.d.ts +3 -0
- package/build/components/InlineInfo/index.d.ts.map +1 -0
- package/build/components/InlineInfo/index.js +2 -0
- package/build/components/InlineInfo/index.js.map +1 -0
- package/build/components/Input/Input.d.ts +57 -0
- package/build/components/Input/Input.d.ts.map +1 -0
- package/build/components/Input/Input.js +104 -0
- package/build/components/Input/Input.js.map +1 -0
- package/build/components/Input/Input.styles.d.ts +34 -0
- package/build/components/Input/Input.styles.d.ts.map +1 -0
- package/build/components/Input/Input.styles.js +35 -0
- package/build/components/Input/Input.styles.js.map +1 -0
- package/build/components/Input/index.d.ts +3 -0
- package/build/components/Input/index.d.ts.map +1 -0
- package/build/components/Input/index.js +2 -0
- package/build/components/Input/index.js.map +1 -0
- package/build/components/ListItem/ListItem.d.ts +42 -0
- package/build/components/ListItem/ListItem.d.ts.map +1 -0
- package/build/components/ListItem/ListItem.js +66 -0
- package/build/components/ListItem/ListItem.js.map +1 -0
- package/build/components/ListItem/ListItem.styles.d.ts +66 -0
- package/build/components/ListItem/ListItem.styles.d.ts.map +1 -0
- package/build/components/ListItem/ListItem.styles.js +70 -0
- package/build/components/ListItem/ListItem.styles.js.map +1 -0
- package/build/components/ListItem/index.d.ts +3 -0
- package/build/components/ListItem/index.d.ts.map +1 -0
- package/build/components/ListItem/index.js +2 -0
- package/build/components/ListItem/index.js.map +1 -0
- package/build/components/MapPin/MapPin.d.ts +61 -0
- package/build/components/MapPin/MapPin.d.ts.map +1 -0
- package/build/components/MapPin/MapPin.js +118 -0
- package/build/components/MapPin/MapPin.js.map +1 -0
- package/build/components/MapPin/MapPin.styles.d.ts +93 -0
- package/build/components/MapPin/MapPin.styles.d.ts.map +1 -0
- package/build/components/MapPin/MapPin.styles.js +101 -0
- package/build/components/MapPin/MapPin.styles.js.map +1 -0
- package/build/components/MapPin/index.d.ts +3 -0
- package/build/components/MapPin/index.d.ts.map +1 -0
- package/build/components/MapPin/index.js +2 -0
- package/build/components/MapPin/index.js.map +1 -0
- package/build/components/MediaPicker/MediaPicker.d.ts +74 -0
- package/build/components/MediaPicker/MediaPicker.d.ts.map +1 -0
- package/build/components/MediaPicker/MediaPicker.js +43 -0
- package/build/components/MediaPicker/MediaPicker.js.map +1 -0
- package/build/components/MediaPicker/MediaPicker.styles.d.ts +30 -0
- package/build/components/MediaPicker/MediaPicker.styles.d.ts.map +1 -0
- package/build/components/MediaPicker/MediaPicker.styles.js +31 -0
- package/build/components/MediaPicker/MediaPicker.styles.js.map +1 -0
- package/build/components/MediaPicker/index.d.ts +3 -0
- package/build/components/MediaPicker/index.d.ts.map +1 -0
- package/build/components/MediaPicker/index.js +2 -0
- package/build/components/MediaPicker/index.js.map +1 -0
- package/build/components/PhotoCard/PhotoCard.d.ts +28 -0
- package/build/components/PhotoCard/PhotoCard.d.ts.map +1 -0
- package/build/components/PhotoCard/PhotoCard.js +53 -0
- package/build/components/PhotoCard/PhotoCard.js.map +1 -0
- package/build/components/PhotoCard/PhotoCard.styles.d.ts +47 -0
- package/build/components/PhotoCard/PhotoCard.styles.d.ts.map +1 -0
- package/build/components/PhotoCard/PhotoCard.styles.js +45 -0
- package/build/components/PhotoCard/PhotoCard.styles.js.map +1 -0
- package/build/components/PhotoCard/index.d.ts +3 -0
- package/build/components/PhotoCard/index.d.ts.map +1 -0
- package/build/components/PhotoCard/index.js +2 -0
- package/build/components/PhotoCard/index.js.map +1 -0
- package/build/components/ProgressStep/ProgressStep.d.ts +9 -0
- package/build/components/ProgressStep/ProgressStep.d.ts.map +1 -0
- package/build/components/ProgressStep/ProgressStep.js +23 -0
- package/build/components/ProgressStep/ProgressStep.js.map +1 -0
- package/build/components/ProgressStep/ProgressStep.styles.d.ts +12 -0
- package/build/components/ProgressStep/ProgressStep.styles.d.ts.map +1 -0
- package/build/components/ProgressStep/ProgressStep.styles.js +13 -0
- package/build/components/ProgressStep/ProgressStep.styles.js.map +1 -0
- package/build/components/ProgressStep/index.d.ts +3 -0
- package/build/components/ProgressStep/index.d.ts.map +1 -0
- package/build/components/ProgressStep/index.js +2 -0
- package/build/components/ProgressStep/index.js.map +1 -0
- package/build/components/RadioButton/RadioButton.d.ts +29 -0
- package/build/components/RadioButton/RadioButton.d.ts.map +1 -0
- package/build/components/RadioButton/RadioButton.js +71 -0
- package/build/components/RadioButton/RadioButton.js.map +1 -0
- package/build/components/RadioButton/RadioButton.styles.d.ts +27 -0
- package/build/components/RadioButton/RadioButton.styles.d.ts.map +1 -0
- package/build/components/RadioButton/RadioButton.styles.js +30 -0
- package/build/components/RadioButton/RadioButton.styles.js.map +1 -0
- package/build/components/RadioButton/index.d.ts +3 -0
- package/build/components/RadioButton/index.d.ts.map +1 -0
- package/build/components/RadioButton/index.js +2 -0
- package/build/components/RadioButton/index.js.map +1 -0
- package/build/components/SearchBar/SearchBar.d.ts +33 -0
- package/build/components/SearchBar/SearchBar.d.ts.map +1 -0
- package/build/components/SearchBar/SearchBar.js +83 -0
- package/build/components/SearchBar/SearchBar.js.map +1 -0
- package/build/components/SearchBar/SearchBar.styles.d.ts +19 -0
- package/build/components/SearchBar/SearchBar.styles.d.ts.map +1 -0
- package/build/components/SearchBar/SearchBar.styles.js +21 -0
- package/build/components/SearchBar/SearchBar.styles.js.map +1 -0
- package/build/components/SearchBar/index.d.ts +3 -0
- package/build/components/SearchBar/index.d.ts.map +1 -0
- package/build/components/SearchBar/index.js +2 -0
- package/build/components/SearchBar/index.js.map +1 -0
- package/build/components/Spinner/Spinner.d.ts +12 -0
- package/build/components/Spinner/Spinner.d.ts.map +1 -0
- package/build/components/Spinner/Spinner.js +80 -0
- package/build/components/Spinner/Spinner.js.map +1 -0
- package/build/components/Spinner/Spinner.styles.d.ts +21 -0
- package/build/components/Spinner/Spinner.styles.d.ts.map +1 -0
- package/build/components/Spinner/Spinner.styles.js +22 -0
- package/build/components/Spinner/Spinner.styles.js.map +1 -0
- package/build/components/Spinner/index.d.ts +3 -0
- package/build/components/Spinner/index.d.ts.map +1 -0
- package/build/components/Spinner/index.js +2 -0
- package/build/components/Spinner/index.js.map +1 -0
- package/build/components/StepSheet/StepSheet.d.ts +77 -0
- package/build/components/StepSheet/StepSheet.d.ts.map +1 -0
- package/build/components/StepSheet/StepSheet.js +30 -0
- package/build/components/StepSheet/StepSheet.js.map +1 -0
- package/build/components/StepSheet/StepSheet.styles.d.ts +6 -0
- package/build/components/StepSheet/StepSheet.styles.d.ts.map +1 -0
- package/build/components/StepSheet/StepSheet.styles.js +7 -0
- package/build/components/StepSheet/StepSheet.styles.js.map +1 -0
- package/build/components/StepSheet/index.d.ts +3 -0
- package/build/components/StepSheet/index.d.ts.map +1 -0
- package/build/components/StepSheet/index.js +2 -0
- package/build/components/StepSheet/index.js.map +1 -0
- package/build/components/Stepper/Stepper.d.ts +50 -0
- package/build/components/Stepper/Stepper.d.ts.map +1 -0
- package/build/components/Stepper/Stepper.js +48 -0
- package/build/components/Stepper/Stepper.js.map +1 -0
- package/build/components/Stepper/Stepper.styles.d.ts +27 -0
- package/build/components/Stepper/Stepper.styles.d.ts.map +1 -0
- package/build/components/Stepper/Stepper.styles.js +28 -0
- package/build/components/Stepper/Stepper.styles.js.map +1 -0
- package/build/components/Stepper/index.d.ts +3 -0
- package/build/components/Stepper/index.d.ts.map +1 -0
- package/build/components/Stepper/index.js +2 -0
- package/build/components/Stepper/index.js.map +1 -0
- package/build/components/Switch/Switch.d.ts +29 -0
- package/build/components/Switch/Switch.d.ts.map +1 -0
- package/build/components/Switch/Switch.js +83 -0
- package/build/components/Switch/Switch.js.map +1 -0
- package/build/components/Switch/Switch.styles.d.ts +29 -0
- package/build/components/Switch/Switch.styles.d.ts.map +1 -0
- package/build/components/Switch/Switch.styles.js +26 -0
- package/build/components/Switch/Switch.styles.js.map +1 -0
- package/build/components/Switch/index.d.ts +3 -0
- package/build/components/Switch/index.d.ts.map +1 -0
- package/build/components/Switch/index.js +2 -0
- package/build/components/Switch/index.js.map +1 -0
- package/build/components/Tab/Tab.d.ts +50 -0
- package/build/components/Tab/Tab.d.ts.map +1 -0
- package/build/components/Tab/Tab.js +117 -0
- package/build/components/Tab/Tab.js.map +1 -0
- package/build/components/Tab/Tab.styles.d.ts +55 -0
- package/build/components/Tab/Tab.styles.d.ts.map +1 -0
- package/build/components/Tab/Tab.styles.js +60 -0
- package/build/components/Tab/Tab.styles.js.map +1 -0
- package/build/components/Tab/index.d.ts +3 -0
- package/build/components/Tab/index.d.ts.map +1 -0
- package/build/components/Tab/index.js +2 -0
- package/build/components/Tab/index.js.map +1 -0
- package/build/components/Tag/Tag.d.ts +4 -0
- package/build/components/Tag/Tag.d.ts.map +1 -0
- package/build/components/Tag/Tag.js +40 -0
- package/build/components/Tag/Tag.js.map +1 -0
- package/build/components/Tag/Tag.styles.d.ts +33 -0
- package/build/components/Tag/Tag.styles.d.ts.map +1 -0
- package/build/components/Tag/Tag.styles.js +43 -0
- package/build/components/Tag/Tag.styles.js.map +1 -0
- package/build/components/Tag/Tag.types.d.ts +23 -0
- package/build/components/Tag/Tag.types.d.ts.map +1 -0
- package/build/components/Tag/Tag.types.js +2 -0
- package/build/components/Tag/Tag.types.js.map +1 -0
- package/build/components/Tag/index.d.ts +3 -0
- package/build/components/Tag/index.d.ts.map +1 -0
- package/build/components/Tag/index.js +2 -0
- package/build/components/Tag/index.js.map +1 -0
- package/build/components/navigation/GeneralNav/GeneralNav.d.ts +19 -0
- package/build/components/navigation/GeneralNav/GeneralNav.d.ts.map +1 -0
- package/build/components/navigation/GeneralNav/GeneralNav.js +27 -0
- package/build/components/navigation/GeneralNav/GeneralNav.js.map +1 -0
- package/build/components/navigation/GeneralNav/GeneralNav.styles.d.ts +33 -0
- package/build/components/navigation/GeneralNav/GeneralNav.styles.d.ts.map +1 -0
- package/build/components/navigation/GeneralNav/GeneralNav.styles.js +35 -0
- package/build/components/navigation/GeneralNav/GeneralNav.styles.js.map +1 -0
- package/build/components/navigation/GeneralNav/index.d.ts +3 -0
- package/build/components/navigation/GeneralNav/index.d.ts.map +1 -0
- package/build/components/navigation/GeneralNav/index.js +2 -0
- package/build/components/navigation/GeneralNav/index.js.map +1 -0
- package/build/components/navigation/MobileCanva/MobileCanva.d.ts +11 -0
- package/build/components/navigation/MobileCanva/MobileCanva.d.ts.map +1 -0
- package/build/components/navigation/MobileCanva/MobileCanva.js +45 -0
- package/build/components/navigation/MobileCanva/MobileCanva.js.map +1 -0
- package/build/components/navigation/MobileCanva/MobileCanva.styles.d.ts +93 -0
- package/build/components/navigation/MobileCanva/MobileCanva.styles.d.ts.map +1 -0
- package/build/components/navigation/MobileCanva/MobileCanva.styles.js +94 -0
- package/build/components/navigation/MobileCanva/MobileCanva.styles.js.map +1 -0
- package/build/components/navigation/MobileCanva/MobileCanva.types.d.ts +21 -0
- package/build/components/navigation/MobileCanva/MobileCanva.types.d.ts.map +1 -0
- package/build/components/navigation/MobileCanva/MobileCanva.types.js +2 -0
- package/build/components/navigation/MobileCanva/MobileCanva.types.js.map +1 -0
- package/build/components/navigation/MobileCanva/index.d.ts +3 -0
- package/build/components/navigation/MobileCanva/index.d.ts.map +1 -0
- package/build/components/navigation/MobileCanva/index.js +2 -0
- package/build/components/navigation/MobileCanva/index.js.map +1 -0
- package/build/components/navigation/PageNav/PageNav.d.ts +46 -0
- package/build/components/navigation/PageNav/PageNav.d.ts.map +1 -0
- package/build/components/navigation/PageNav/PageNav.js +48 -0
- package/build/components/navigation/PageNav/PageNav.js.map +1 -0
- package/build/components/navigation/PageNav/PageNav.styles.d.ts +60 -0
- package/build/components/navigation/PageNav/PageNav.styles.d.ts.map +1 -0
- package/build/components/navigation/PageNav/PageNav.styles.js +60 -0
- package/build/components/navigation/PageNav/PageNav.styles.js.map +1 -0
- package/build/components/navigation/PageNav/index.d.ts +3 -0
- package/build/components/navigation/PageNav/index.d.ts.map +1 -0
- package/build/components/navigation/PageNav/index.js +2 -0
- package/build/components/navigation/PageNav/index.js.map +1 -0
- package/build/components/navigation/TabBar/TabBar.d.ts +22 -0
- package/build/components/navigation/TabBar/TabBar.d.ts.map +1 -0
- package/build/components/navigation/TabBar/TabBar.js +13 -0
- package/build/components/navigation/TabBar/TabBar.js.map +1 -0
- package/build/components/navigation/TabBar/TabBar.styles.d.ts +14 -0
- package/build/components/navigation/TabBar/TabBar.styles.d.ts.map +1 -0
- package/build/components/navigation/TabBar/TabBar.styles.js +16 -0
- package/build/components/navigation/TabBar/TabBar.styles.js.map +1 -0
- package/build/components/navigation/TabBar/index.d.ts +3 -0
- package/build/components/navigation/TabBar/index.d.ts.map +1 -0
- package/build/components/navigation/TabBar/index.js +2 -0
- package/build/components/navigation/TabBar/index.js.map +1 -0
- package/build/context/BottomSheetContext.d.ts +42 -0
- package/build/context/BottomSheetContext.d.ts.map +1 -0
- package/build/context/BottomSheetContext.js +51 -0
- package/build/context/BottomSheetContext.js.map +1 -0
- package/build/context/ThemeContext.d.ts +5 -1
- package/build/context/ThemeContext.d.ts.map +1 -1
- package/build/context/ThemeContext.js +4 -2
- package/build/context/ThemeContext.js.map +1 -1
- package/build/index.d.ts +75 -1
- package/build/index.d.ts.map +1 -1
- package/build/index.js +37 -0
- package/build/index.js.map +1 -1
- package/build/theme/tokens/dark.d.ts.map +1 -1
- package/build/theme/tokens/dark.js +263 -10
- package/build/theme/tokens/dark.js.map +1 -1
- package/build/theme/tokens/light.d.ts.map +1 -1
- package/build/theme/tokens/light.js +252 -7
- package/build/theme/tokens/light.js.map +1 -1
- package/build/theme/type.d.ts +398 -0
- package/build/theme/type.d.ts.map +1 -1
- package/build/theme/type.js.map +1 -1
- package/package.json +8 -5
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FilterNav — horizontal scrollable bar of filter chips.
|
|
3
|
+
*
|
|
4
|
+
* Layout (Figma exact):
|
|
5
|
+
* - First slot: icon-only chip (FunnelSimple) → opens the global filter sheet
|
|
6
|
+
* - Remaining slots: icon+label FilterChips, one per item
|
|
7
|
+
*
|
|
8
|
+
* Controlled: `selected` lives on each item in `items`.
|
|
9
|
+
* The component only fires callbacks — overlays are managed by the parent.
|
|
10
|
+
*/
|
|
11
|
+
import React from 'react';
|
|
12
|
+
import type { StyleProp, ViewStyle } from 'react-native';
|
|
13
|
+
export interface FilterNavItem {
|
|
14
|
+
/** Unique identifier — returned by onItemPress */
|
|
15
|
+
id: string;
|
|
16
|
+
/** Chip label */
|
|
17
|
+
label: string;
|
|
18
|
+
/** Left icon (Phosphor element, rendered at 20 px) */
|
|
19
|
+
icon?: React.ReactElement;
|
|
20
|
+
/** Whether this filter is currently active/selected */
|
|
21
|
+
selected?: boolean;
|
|
22
|
+
/** Disabled — no interaction */
|
|
23
|
+
disabled?: boolean;
|
|
24
|
+
}
|
|
25
|
+
export interface FilterNavAction {
|
|
26
|
+
/** Unique identifier */
|
|
27
|
+
id: string;
|
|
28
|
+
/** Icon to display (Phosphor element, rendered at 20 px) */
|
|
29
|
+
icon: React.ReactElement;
|
|
30
|
+
/** Called when this action chip is pressed */
|
|
31
|
+
onPress?: () => void;
|
|
32
|
+
/** Accessibility label for screen readers */
|
|
33
|
+
accessibilityLabel?: string;
|
|
34
|
+
}
|
|
35
|
+
export interface FilterNavProps {
|
|
36
|
+
/** List of filter chips to render */
|
|
37
|
+
items: FilterNavItem[];
|
|
38
|
+
/**
|
|
39
|
+
* Leading icon-only chips rendered before the filter chips.
|
|
40
|
+
* When provided, replaces the default single FunnelSimple chip.
|
|
41
|
+
*/
|
|
42
|
+
actions?: FilterNavAction[];
|
|
43
|
+
/** Called when the default leading funnel button is pressed (ignored when actions is provided) */
|
|
44
|
+
onFilterPress?: () => void;
|
|
45
|
+
/** Called with the item id when any filter chip is pressed */
|
|
46
|
+
onItemPress?: (id: string) => void;
|
|
47
|
+
/** Additional style applied to the scroll container */
|
|
48
|
+
style?: StyleProp<ViewStyle>;
|
|
49
|
+
/** Test identifier for automated testing */
|
|
50
|
+
testID?: string;
|
|
51
|
+
}
|
|
52
|
+
export declare const FilterNav: ({ items, actions, onFilterPress, onItemPress, style, testID, }: FilterNavProps) => React.JSX.Element;
|
|
53
|
+
//# sourceMappingURL=FilterNav.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FilterNav.d.ts","sourceRoot":"","sources":["../../../src/components/FilterNav/FilterNav.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAUzD,MAAM,WAAW,aAAa;IAC5B,kDAAkD;IAClD,EAAE,EAAE,MAAM,CAAC;IACX,iBAAiB;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,sDAAsD;IACtD,IAAI,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;IAC1B,uDAAuD;IACvD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gCAAgC;IAChC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,eAAe;IAC9B,wBAAwB;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,4DAA4D;IAC5D,IAAI,EAAE,KAAK,CAAC,YAAY,CAAC;IACzB,8CAA8C;IAC9C,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,6CAA6C;IAC7C,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,cAAc;IAC7B,qCAAqC;IACrC,KAAK,EAAE,aAAa,EAAE,CAAC;IACvB;;;OAGG;IACH,OAAO,CAAC,EAAE,eAAe,EAAE,CAAC;IAC5B,kGAAkG;IAClG,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,8DAA8D;IAC9D,WAAW,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,uDAAuD;IACvD,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,4CAA4C;IAC5C,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAMD,eAAO,MAAM,SAAS,GAAI,gEAOvB,cAAc,sBAkEhB,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FilterNav — horizontal scrollable bar of filter chips.
|
|
3
|
+
*
|
|
4
|
+
* Layout (Figma exact):
|
|
5
|
+
* - First slot: icon-only chip (FunnelSimple) → opens the global filter sheet
|
|
6
|
+
* - Remaining slots: icon+label FilterChips, one per item
|
|
7
|
+
*
|
|
8
|
+
* Controlled: `selected` lives on each item in `items`.
|
|
9
|
+
* The component only fires callbacks — overlays are managed by the parent.
|
|
10
|
+
*/
|
|
11
|
+
import React from 'react';
|
|
12
|
+
import { ScrollView } from 'react-native';
|
|
13
|
+
import { FunnelSimple } from 'phosphor-react-native';
|
|
14
|
+
import { FilterChip } from '../FilterChip';
|
|
15
|
+
import { useTheme } from '../../context/ThemeContext';
|
|
16
|
+
import { styles } from './FilterNav.styles';
|
|
17
|
+
// ---------------------------------------------------------------------------
|
|
18
|
+
// Component
|
|
19
|
+
// ---------------------------------------------------------------------------
|
|
20
|
+
export const FilterNav = ({ items, actions, onFilterPress, onItemPress, style, testID, }) => {
|
|
21
|
+
const { colors } = useTheme();
|
|
22
|
+
return (<ScrollView horizontal showsHorizontalScrollIndicator={false} contentContainerStyle={[styles.container, style]} testID={testID}>
|
|
23
|
+
{/* Leading icon-only chips */}
|
|
24
|
+
{actions
|
|
25
|
+
? actions.map((action) => (<FilterChip key={action.id} type="icon" iconLeft={React.cloneElement(action.icon, { size: 20, color: colors.filterChip.default.icon })} onPress={action.onPress} accessibilityLabel={action.accessibilityLabel}/>))
|
|
26
|
+
: (<FilterChip type="icon" iconLeft={<FunnelSimple size={20} weight="duotone" color={colors.filterChip.default.icon}/>} onPress={onFilterPress} accessibilityLabel="Filtres"/>)}
|
|
27
|
+
|
|
28
|
+
{/* Filter chips */}
|
|
29
|
+
{items.map((item) => (<FilterChip key={item.id} type="icon-text" label={item.label} selected={item.selected} disabled={item.disabled} iconLeft={item.icon
|
|
30
|
+
? React.cloneElement(item.icon, {
|
|
31
|
+
size: 20,
|
|
32
|
+
color: item.selected
|
|
33
|
+
? colors.filterChip.selected.icon
|
|
34
|
+
: colors.filterChip.default.icon,
|
|
35
|
+
})
|
|
36
|
+
: undefined} onPress={() => onItemPress?.(item.id)}/>))}
|
|
37
|
+
</ScrollView>);
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=FilterNav.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FilterNav.js","sourceRoot":"","sources":["../../../src/components/FilterNav/FilterNav.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAgD5C,8EAA8E;AAC9E,YAAY;AACZ,8EAA8E;AAE9E,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,EACxB,KAAK,EACL,OAAO,EACP,aAAa,EACb,WAAW,EACX,KAAK,EACL,MAAM,GACS,EAAE,EAAE;IACnB,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,CAAC;IAE9B,OAAO,CACL,CAAC,UAAU,CACT,UAAU,CACV,8BAA8B,CAAC,CAAC,KAAK,CAAC,CACtC,qBAAqB,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC,CACjD,MAAM,CAAC,CAAC,MAAM,CAAC,CAEf;MAAA,CAAC,6BAA6B,CAC9B;MAAA,CAAC,OAAO;YACN,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC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UAAU,CAAC,QAAQ,CAAC,IAAI;wBACjC,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI;iBACnC,CACF;gBACH,CAAC,CAAC,SACN,CAAC,CACD,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,EACtC,CACH,CAAC,CACJ;IAAA,EAAE,UAAU,CAAC,CACd,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/**\n * FilterNav — horizontal scrollable bar of filter chips.\n *\n * Layout (Figma exact):\n * - First slot: icon-only chip (FunnelSimple) → opens the global filter sheet\n * - Remaining slots: icon+label FilterChips, one per item\n *\n * Controlled: `selected` lives on each item in `items`.\n * The component only fires callbacks — overlays are managed by the parent.\n */\nimport React from 'react';\nimport { ScrollView } from 'react-native';\nimport type { StyleProp, ViewStyle } from 'react-native';\nimport { FunnelSimple } from 'phosphor-react-native';\nimport { FilterChip } from '../FilterChip';\nimport { useTheme } from '../../context/ThemeContext';\nimport { styles } from './FilterNav.styles';\n\n// ---------------------------------------------------------------------------\n// Types\n// ---------------------------------------------------------------------------\n\nexport interface FilterNavItem {\n /** Unique identifier — returned by onItemPress */\n id: string;\n /** Chip label */\n label: string;\n /** Left icon (Phosphor element, rendered at 20 px) */\n icon?: React.ReactElement;\n /** Whether this filter is currently active/selected */\n selected?: boolean;\n /** Disabled — no interaction */\n disabled?: boolean;\n}\n\nexport interface FilterNavAction {\n /** Unique identifier */\n id: string;\n /** Icon to display (Phosphor element, rendered at 20 px) */\n icon: React.ReactElement;\n /** Called when this action chip is pressed */\n onPress?: () => void;\n /** Accessibility label for screen readers */\n accessibilityLabel?: string;\n}\n\nexport interface FilterNavProps {\n /** List of filter chips to render */\n items: FilterNavItem[];\n /**\n * Leading icon-only chips rendered before the filter chips.\n * When provided, replaces the default single FunnelSimple chip.\n */\n actions?: FilterNavAction[];\n /** Called when the default leading funnel button is pressed (ignored when actions is provided) */\n onFilterPress?: () => void;\n /** Called with the item id when any filter chip is pressed */\n onItemPress?: (id: string) => void;\n /** Additional style applied to the scroll container */\n style?: StyleProp<ViewStyle>;\n /** Test identifier for automated testing */\n testID?: string;\n}\n\n// ---------------------------------------------------------------------------\n// Component\n// ---------------------------------------------------------------------------\n\nexport const FilterNav = ({\n items,\n actions,\n onFilterPress,\n onItemPress,\n style,\n testID,\n}: FilterNavProps) => {\n const { colors } = useTheme();\n\n return (\n <ScrollView\n horizontal\n showsHorizontalScrollIndicator={false}\n contentContainerStyle={[styles.container, style]}\n testID={testID}\n >\n {/* Leading icon-only chips */}\n {actions\n ? actions.map((action) => (\n <FilterChip\n key={action.id}\n type=\"icon\"\n iconLeft={React.cloneElement(\n action.icon as React.ReactElement<{ size?: number; color?: string }>,\n { size: 20, color: colors.filterChip.default.icon },\n )}\n onPress={action.onPress}\n accessibilityLabel={action.accessibilityLabel}\n />\n ))\n : (\n <FilterChip\n type=\"icon\"\n iconLeft={\n <FunnelSimple\n size={20}\n weight=\"duotone\"\n color={colors.filterChip.default.icon}\n />\n }\n onPress={onFilterPress}\n accessibilityLabel=\"Filtres\"\n />\n )\n }\n\n {/* Filter chips */}\n {items.map((item) => (\n <FilterChip\n key={item.id}\n type=\"icon-text\"\n label={item.label}\n selected={item.selected}\n disabled={item.disabled}\n iconLeft={\n item.icon\n ? React.cloneElement(\n item.icon as React.ReactElement<{ size?: number; color?: string }>,\n {\n size: 20,\n color: item.selected\n ? colors.filterChip.selected.icon\n : colors.filterChip.default.icon,\n },\n )\n : undefined\n }\n onPress={() => onItemPress?.(item.id)}\n />\n ))}\n </ScrollView>\n );\n};\n\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FilterNav.styles.d.ts","sourceRoot":"","sources":["../../../src/components/FilterNav/FilterNav.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,MAAM;;;;;;;;CAQjB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FilterNav.styles.js","sourceRoot":"","sources":["../../../src/components/FilterNav/FilterNav.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,MAAM,CAAC,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IACtC,SAAS,EAAE;QACT,aAAa,EAAE,KAAK;QACpB,UAAU,EAAK,QAAQ;QACvB,GAAG,EAAY,CAAC;QAChB,WAAW,EAAI,EAAE;QACjB,YAAY,EAAG,EAAE;KAClB;CACF,CAAC,CAAC","sourcesContent":["import { StyleSheet } from 'react-native';\n\nexport const styles = StyleSheet.create({\n container: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: 6,\n paddingLeft: 10,\n paddingRight: 10,\n },\n});\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/FilterNav/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/FilterNav/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC","sourcesContent":["export { FilterNav } from './FilterNav';\nexport type { FilterNavProps, FilterNavItem } from './FilterNav';\n"]}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ImgPicker — horizontal image slot row used in the image-mode MediaPicker.
|
|
3
|
+
*
|
|
4
|
+
* Layout (Figma "_Img picker"):
|
|
5
|
+
* - Principale slot (PhotoCard, fixed left)
|
|
6
|
+
* - Vertical divider
|
|
7
|
+
* - Additional slots (PhotoCards, horizontal scroll)
|
|
8
|
+
*
|
|
9
|
+
* Fully controlled: principale and additionalImages are independent — removing
|
|
10
|
+
* principale leaves its slot empty (no promotion from additional).
|
|
11
|
+
*/
|
|
12
|
+
import type { StyleProp, ViewStyle } from 'react-native';
|
|
13
|
+
export interface ImgPickerImageItem {
|
|
14
|
+
/** Unique identifier */
|
|
15
|
+
id: string;
|
|
16
|
+
/** Image URI */
|
|
17
|
+
uri: string;
|
|
18
|
+
}
|
|
19
|
+
export interface ImgPickerProps {
|
|
20
|
+
/** Controlled principale image. If undefined, the principale slot is shown empty. */
|
|
21
|
+
principale?: ImgPickerImageItem;
|
|
22
|
+
/** Controlled additional image slots (scrollable, independent from principale). */
|
|
23
|
+
additionalImages?: ImgPickerImageItem[];
|
|
24
|
+
/**
|
|
25
|
+
* Number of additional empty slots shown on first render.
|
|
26
|
+
* Default: 2 (matches Figma).
|
|
27
|
+
*/
|
|
28
|
+
initialAdditionalSlots?: number;
|
|
29
|
+
/**
|
|
30
|
+
* Maximum total images allowed (1 principale + additional).
|
|
31
|
+
* When reached, no more empty slot is appended.
|
|
32
|
+
* Default: undefined (no limit).
|
|
33
|
+
*/
|
|
34
|
+
maxImages?: number;
|
|
35
|
+
/** Called when the user taps the empty principale slot */
|
|
36
|
+
onAddPrincipale?: () => void;
|
|
37
|
+
/** Called when the user taps an empty additional slot */
|
|
38
|
+
onAddAdditional?: () => void;
|
|
39
|
+
/** Called with the image id when the user taps the X remove button */
|
|
40
|
+
onRemoveImage?: (id: string) => void;
|
|
41
|
+
/** Badge label on the principale slot — defaults to "Principale" */
|
|
42
|
+
principaleLabel?: string;
|
|
43
|
+
style?: StyleProp<ViewStyle>;
|
|
44
|
+
testID?: string;
|
|
45
|
+
}
|
|
46
|
+
export declare const ImgPicker: ({ principale, additionalImages, initialAdditionalSlots, maxImages, onAddPrincipale, onAddAdditional, onRemoveImage, principaleLabel, style, testID, }: ImgPickerProps) => import("react").JSX.Element;
|
|
47
|
+
//# sourceMappingURL=ImgPicker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ImgPicker.d.ts","sourceRoot":"","sources":["../../../src/components/ImgPicker/ImgPicker.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AASzD,MAAM,WAAW,kBAAkB;IACjC,wBAAwB;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,gBAAgB;IAChB,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,cAAc;IAC7B,qFAAqF;IACrF,UAAU,CAAC,EAAE,kBAAkB,CAAC;IAChC,mFAAmF;IACnF,gBAAgB,CAAC,EAAE,kBAAkB,EAAE,CAAC;IACxC;;;OAGG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0DAA0D;IAC1D,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;IAC7B,yDAAyD;IACzD,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;IAC7B,sEAAsE;IACtE,aAAa,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,oEAAoE;IACpE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAMD,eAAO,MAAM,SAAS,GAAI,uJAWvB,cAAc,gCA6DhB,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ImgPicker — horizontal image slot row used in the image-mode MediaPicker.
|
|
3
|
+
*
|
|
4
|
+
* Layout (Figma "_Img picker"):
|
|
5
|
+
* - Principale slot (PhotoCard, fixed left)
|
|
6
|
+
* - Vertical divider
|
|
7
|
+
* - Additional slots (PhotoCards, horizontal scroll)
|
|
8
|
+
*
|
|
9
|
+
* Fully controlled: principale and additionalImages are independent — removing
|
|
10
|
+
* principale leaves its slot empty (no promotion from additional).
|
|
11
|
+
*/
|
|
12
|
+
import { ScrollView, View } from 'react-native';
|
|
13
|
+
import { useTheme } from '../../context/ThemeContext';
|
|
14
|
+
import { PhotoCard } from '../PhotoCard';
|
|
15
|
+
import { styles } from './ImgPicker.styles';
|
|
16
|
+
// ---------------------------------------------------------------------------
|
|
17
|
+
// Component
|
|
18
|
+
// ---------------------------------------------------------------------------
|
|
19
|
+
export const ImgPicker = ({ principale, additionalImages = [], initialAdditionalSlots = 2, maxImages, onAddPrincipale, onAddAdditional, onRemoveImage, principaleLabel = 'Principale', style, testID, }) => {
|
|
20
|
+
const { colors } = useTheme();
|
|
21
|
+
const totalCount = (principale ? 1 : 0) + additionalImages.length;
|
|
22
|
+
// Append 1 empty slot unless we've hit the maxImages cap
|
|
23
|
+
const canAddMore = maxImages == null || totalCount < maxImages;
|
|
24
|
+
// Show at least initialAdditionalSlots, grow as additional images are added
|
|
25
|
+
const additionalCount = Math.max(initialAdditionalSlots, additionalImages.length + (canAddMore ? 1 : 0));
|
|
26
|
+
return (<ScrollView horizontal showsHorizontalScrollIndicator={false} contentContainerStyle={[styles.row, style]} testID={testID}>
|
|
27
|
+
{/* Principale slot — independent from additional */}
|
|
28
|
+
<PhotoCard uri={principale?.uri} principale principaleLabel={principaleLabel} onPress={principale ? undefined : onAddPrincipale} onRemove={principale && onRemoveImage
|
|
29
|
+
? () => onRemoveImage(principale.id)
|
|
30
|
+
: undefined}/>
|
|
31
|
+
|
|
32
|
+
{/* Vertical divider */}
|
|
33
|
+
<View style={styles.dividerWrapper}>
|
|
34
|
+
<View style={[
|
|
35
|
+
styles.dividerLine,
|
|
36
|
+
{ backgroundColor: colors.mediaPicker.photoCard.border },
|
|
37
|
+
]}/>
|
|
38
|
+
</View>
|
|
39
|
+
|
|
40
|
+
{/* Additional slots */}
|
|
41
|
+
{Array.from({ length: additionalCount }).map((_, i) => {
|
|
42
|
+
const img = additionalImages[i];
|
|
43
|
+
return (<PhotoCard key={img ? img.id : `empty-${i}`} uri={img?.uri} principale={false} onPress={img ? undefined : onAddAdditional} onRemove={img && onRemoveImage
|
|
44
|
+
? () => onRemoveImage(img.id)
|
|
45
|
+
: undefined}/>);
|
|
46
|
+
})}
|
|
47
|
+
</ScrollView>);
|
|
48
|
+
};
|
|
49
|
+
//# sourceMappingURL=ImgPicker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ImgPicker.js","sourceRoot":"","sources":["../../../src/components/ImgPicker/ImgPicker.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEhD,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAyC5C,8EAA8E;AAC9E,YAAY;AACZ,8EAA8E;AAE9E,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,EACxB,UAAU,EACV,gBAAgB,GAAG,EAAE,EACrB,sBAAsB,GAAG,CAAC,EAC1B,SAAS,EACT,eAAe,EACf,eAAe,EACf,aAAa,EACb,eAAe,GAAG,YAAY,EAC9B,KAAK,EACL,MAAM,GACS,EAAE,EAAE;IACnB,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,CAAC;IAE9B,MAAM,UAAU,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,gBAAgB,CAAC,MAAM,CAAC;IAClE,yDAAyD;IACzD,MAAM,UAAU,GAAG,SAAS,IAAI,IAAI,IAAI,UAAU,GAAG,SAAS,CAAC;IAC/D,4EAA4E;IAC5E,MAAM,eAAe,GAAG,IAAI,CAAC,GAAG,CAC9B,sBAAsB,EACtB,gBAAgB,CAAC,MAAM,GAAG,CAAC,UAAU,CAAC,CAAC,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C,EAAE,CAAC,CACjC,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,CACd,UAAU,CAAC,CAAC,KAAK,CAAC,CAClB,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,eAAe,CAAC,CAC3C,QAAQ,CAAC,CACP,GAAG,IAAI,aAAa;oBAClB,CAAC,CAAC,GAAG,EAAE,CAAC,aAAa,CAAC,GAAG,CAAC,EAAE,CAAC;oBAC7B,CAAC,CAAC,SACN,CAAC,EACD,CACH,CAAC;QACJ,CAAC,CAAC,CACJ;IAAA,EAAE,UAAU,CAAC,CACd,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/**\n * ImgPicker — horizontal image slot row used in the image-mode MediaPicker.\n *\n * Layout (Figma \"_Img picker\"):\n * - Principale slot (PhotoCard, fixed left)\n * - Vertical divider\n * - Additional slots (PhotoCards, horizontal scroll)\n *\n * Fully controlled: principale and additionalImages are independent — removing\n * principale leaves its slot empty (no promotion from additional).\n */\n\nimport { ScrollView, View } from 'react-native';\nimport type { StyleProp, ViewStyle } from 'react-native';\nimport { useTheme } from '../../context/ThemeContext';\nimport { PhotoCard } from '../PhotoCard';\nimport { styles } from './ImgPicker.styles';\n\n// ---------------------------------------------------------------------------\n// Types\n// ---------------------------------------------------------------------------\n\nexport interface ImgPickerImageItem {\n /** Unique identifier */\n id: string;\n /** Image URI */\n uri: string;\n}\n\nexport interface ImgPickerProps {\n /** Controlled principale image. If undefined, the principale slot is shown empty. */\n principale?: ImgPickerImageItem;\n /** Controlled additional image slots (scrollable, independent from principale). */\n additionalImages?: ImgPickerImageItem[];\n /**\n * Number of additional empty slots shown on first render.\n * Default: 2 (matches Figma).\n */\n initialAdditionalSlots?: number;\n /**\n * Maximum total images allowed (1 principale + additional).\n * When reached, no more empty slot is appended.\n * Default: undefined (no limit).\n */\n maxImages?: number;\n /** Called when the user taps the empty principale slot */\n onAddPrincipale?: () => void;\n /** Called when the user taps an empty additional slot */\n onAddAdditional?: () => void;\n /** Called with the image id when the user taps the X remove button */\n onRemoveImage?: (id: string) => void;\n /** Badge label on the principale slot — defaults to \"Principale\" */\n principaleLabel?: string;\n style?: StyleProp<ViewStyle>;\n testID?: string;\n}\n\n// ---------------------------------------------------------------------------\n// Component\n// ---------------------------------------------------------------------------\n\nexport const ImgPicker = ({\n principale,\n additionalImages = [],\n initialAdditionalSlots = 2,\n maxImages,\n onAddPrincipale,\n onAddAdditional,\n onRemoveImage,\n principaleLabel = 'Principale',\n style,\n testID,\n}: ImgPickerProps) => {\n const { colors } = useTheme();\n\n const totalCount = (principale ? 1 : 0) + additionalImages.length;\n // Append 1 empty slot unless we've hit the maxImages cap\n const canAddMore = maxImages == null || totalCount < maxImages;\n // Show at least initialAdditionalSlots, grow as additional images are added\n const additionalCount = Math.max(\n initialAdditionalSlots,\n additionalImages.length + (canAddMore ? 1 : 0),\n );\n\n return (\n <ScrollView\n horizontal\n showsHorizontalScrollIndicator={false}\n contentContainerStyle={[styles.row, style]}\n testID={testID}\n >\n {/* Principale slot — independent from additional */}\n <PhotoCard\n uri={principale?.uri}\n principale\n principaleLabel={principaleLabel}\n onPress={principale ? undefined : onAddPrincipale}\n onRemove={\n principale && onRemoveImage\n ? () => onRemoveImage(principale.id)\n : undefined\n }\n />\n\n {/* Vertical divider */}\n <View style={styles.dividerWrapper}>\n <View\n style={[\n styles.dividerLine,\n { backgroundColor: colors.mediaPicker.photoCard.border },\n ]}\n />\n </View>\n\n {/* Additional slots */}\n {Array.from({ length: additionalCount }).map((_, i) => {\n const img = additionalImages[i];\n return (\n <PhotoCard\n key={img ? img.id : `empty-${i}`}\n uri={img?.uri}\n principale={false}\n onPress={img ? undefined : onAddAdditional}\n onRemove={\n img && onRemoveImage\n ? () => onRemoveImage(img.id)\n : undefined\n }\n />\n );\n })}\n </ScrollView>\n );\n};\n\n"]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare const styles: {
|
|
2
|
+
row: {
|
|
3
|
+
flexDirection: "row";
|
|
4
|
+
alignItems: "flex-start";
|
|
5
|
+
gap: number;
|
|
6
|
+
};
|
|
7
|
+
dividerWrapper: {
|
|
8
|
+
paddingHorizontal: number;
|
|
9
|
+
alignSelf: "stretch";
|
|
10
|
+
justifyContent: "center";
|
|
11
|
+
};
|
|
12
|
+
dividerLine: {
|
|
13
|
+
width: number;
|
|
14
|
+
height: number;
|
|
15
|
+
borderRadius: number;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=ImgPicker.styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ImgPicker.styles.d.ts","sourceRoot":"","sources":["../../../src/components/ImgPicker/ImgPicker.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;CAgBjB,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { StyleSheet } from 'react-native';
|
|
2
|
+
export const styles = StyleSheet.create({
|
|
3
|
+
row: {
|
|
4
|
+
flexDirection: 'row',
|
|
5
|
+
alignItems: 'flex-start',
|
|
6
|
+
gap: 4,
|
|
7
|
+
},
|
|
8
|
+
dividerWrapper: {
|
|
9
|
+
paddingHorizontal: 10,
|
|
10
|
+
alignSelf: 'stretch',
|
|
11
|
+
justifyContent: 'center',
|
|
12
|
+
},
|
|
13
|
+
dividerLine: {
|
|
14
|
+
width: 2,
|
|
15
|
+
height: 140,
|
|
16
|
+
borderRadius: 9999,
|
|
17
|
+
},
|
|
18
|
+
});
|
|
19
|
+
//# sourceMappingURL=ImgPicker.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ImgPicker.styles.js","sourceRoot":"","sources":["../../../src/components/ImgPicker/ImgPicker.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,MAAM,CAAC,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IACtC,GAAG,EAAE;QACH,aAAa,EAAE,KAAK;QACpB,UAAU,EAAE,YAAY;QACxB,GAAG,EAAE,CAAC;KACP;IACD,cAAc,EAAE;QACd,iBAAiB,EAAE,EAAE;QACrB,SAAS,EAAE,SAAS;QACpB,cAAc,EAAE,QAAQ;KACzB;IACD,WAAW,EAAE;QACX,KAAK,EAAE,CAAC;QACR,MAAM,EAAE,GAAG;QACX,YAAY,EAAE,IAAI;KACnB;CACF,CAAC,CAAC","sourcesContent":["import { StyleSheet } from 'react-native';\n\nexport const styles = StyleSheet.create({\n row: {\n flexDirection: 'row',\n alignItems: 'flex-start',\n gap: 4,\n },\n dividerWrapper: {\n paddingHorizontal: 10,\n alignSelf: 'stretch',\n justifyContent: 'center',\n },\n dividerLine: {\n width: 2,\n height: 140,\n borderRadius: 9999,\n },\n});\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ImgPicker/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,YAAY,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/ImgPicker/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC","sourcesContent":["export { ImgPicker } from './ImgPicker';\nexport type { ImgPickerProps, ImgPickerImageItem } from './ImgPicker';\n"]}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* InlineInfo — contextual information banner.
|
|
3
|
+
* Composed on top of Card. Icon and title sit on the same row,
|
|
4
|
+
* message text is displayed below.
|
|
5
|
+
* Figma: node 5361:3109 (Default) · 5361:3108 (Error)
|
|
6
|
+
*/
|
|
7
|
+
import React from 'react';
|
|
8
|
+
export type InlineInfoVariant = 'info' | 'success' | 'warning' | 'error' | 'neutral';
|
|
9
|
+
export interface InlineInfoAction {
|
|
10
|
+
/** Action link label */
|
|
11
|
+
label: string;
|
|
12
|
+
/** Called when the action link is pressed */
|
|
13
|
+
onPress: () => void;
|
|
14
|
+
}
|
|
15
|
+
export interface InlineInfoProps {
|
|
16
|
+
/** Visual variant — determines the color scheme and default icon */
|
|
17
|
+
variant?: InlineInfoVariant;
|
|
18
|
+
/** Title displayed on the same line as the icon */
|
|
19
|
+
title: string;
|
|
20
|
+
/** Message text displayed below the title */
|
|
21
|
+
message: string | React.ReactNode;
|
|
22
|
+
/**
|
|
23
|
+
* Icon displayed to the left of the title.
|
|
24
|
+
* - `undefined` (default) — uses the variant's default Phosphor icon
|
|
25
|
+
* - `null` — hides the icon
|
|
26
|
+
* - ReactNode — custom icon
|
|
27
|
+
*/
|
|
28
|
+
icon?: React.ReactNode | null;
|
|
29
|
+
/** Optional action link shown below the message */
|
|
30
|
+
action?: InlineInfoAction;
|
|
31
|
+
/**
|
|
32
|
+
* Called when the banner is dismissed — either by the user pressing × or by auto-close.
|
|
33
|
+
* When provided, shows a dismiss (×) button in the top-right corner.
|
|
34
|
+
*/
|
|
35
|
+
onDismiss?: () => void;
|
|
36
|
+
/**
|
|
37
|
+
* Auto-close delay in milliseconds.
|
|
38
|
+
* When set, `onDismiss` is called automatically after the given delay.
|
|
39
|
+
* Requires `onDismiss` to be defined.
|
|
40
|
+
*/
|
|
41
|
+
autoClose?: number;
|
|
42
|
+
/**
|
|
43
|
+
* Controls banner visibility.
|
|
44
|
+
* When `false` the component renders nothing — combine with `onDismiss`
|
|
45
|
+
* and `autoClose` for a toast-like behaviour.
|
|
46
|
+
* @default true
|
|
47
|
+
*/
|
|
48
|
+
visible?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Custom accent color (hex string, e.g. `"#4a6cf7"`).
|
|
51
|
+
* Overrides the variant's default border, icon and text colors.
|
|
52
|
+
* A light tint (~10 % opacity) is applied automatically as the background.
|
|
53
|
+
*/
|
|
54
|
+
color?: string;
|
|
55
|
+
/** Test ID for automated testing */
|
|
56
|
+
testID?: string;
|
|
57
|
+
}
|
|
58
|
+
export declare function InlineInfo({ variant, visible, title, message, icon, action, onDismiss, autoClose, color, testID, }: InlineInfoProps): React.JSX.Element | null;
|
|
59
|
+
export default InlineInfo;
|
|
60
|
+
//# sourceMappingURL=InlineInfo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InlineInfo.d.ts","sourceRoot":"","sources":["../../../src/components/InlineInfo/InlineInfo.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAoB,MAAM,OAAO,CAAC;AAazC,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;AAErF,MAAM,WAAW,gBAAgB;IAC/B,wBAAwB;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,6CAA6C;IAC7C,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,MAAM,WAAW,eAAe;IAC9B,oEAAoE;IACpE,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B,mDAAmD;IACnD,KAAK,EAAE,MAAM,CAAC;IACd,6CAA6C;IAC7C,OAAO,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;IAClC;;;;;OAKG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,IAAI,CAAC;IAC9B,mDAAmD;IACnD,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oCAAoC;IACpC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAwDD,wBAAgB,UAAU,CAAC,EACzB,OAAgB,EAChB,OAAc,EACd,KAAK,EACL,OAAO,EACP,IAAI,EACJ,MAAM,EACN,SAAS,EACT,SAAS,EACT,KAAK,EACL,MAAM,GACP,EAAE,eAAe,4BAuFjB;AAED,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* InlineInfo — contextual information banner.
|
|
3
|
+
* Composed on top of Card. Icon and title sit on the same row,
|
|
4
|
+
* message text is displayed below.
|
|
5
|
+
* Figma: node 5361:3109 (Default) · 5361:3108 (Error)
|
|
6
|
+
*/
|
|
7
|
+
import React, { useEffect } from 'react';
|
|
8
|
+
import { View, Text, TouchableOpacity } from 'react-native';
|
|
9
|
+
import { Info, CheckCircle, Warning, WarningCircle, X, } from 'phosphor-react-native';
|
|
10
|
+
import { Card } from '../Card';
|
|
11
|
+
import { useTheme } from '../../context/ThemeContext';
|
|
12
|
+
import { styles } from './InlineInfo.styles';
|
|
13
|
+
function useVariantStyle(variant) {
|
|
14
|
+
const { colors } = useTheme();
|
|
15
|
+
switch (variant) {
|
|
16
|
+
case 'success':
|
|
17
|
+
return {
|
|
18
|
+
background: colors.success.light,
|
|
19
|
+
borderColor: colors.success.default,
|
|
20
|
+
textColor: colors.success.dark,
|
|
21
|
+
iconColor: colors.success.default,
|
|
22
|
+
};
|
|
23
|
+
case 'warning':
|
|
24
|
+
return {
|
|
25
|
+
background: colors.warning.light,
|
|
26
|
+
borderColor: colors.warning.default,
|
|
27
|
+
textColor: colors.warning.dark,
|
|
28
|
+
iconColor: colors.warning.default,
|
|
29
|
+
};
|
|
30
|
+
case 'error':
|
|
31
|
+
return {
|
|
32
|
+
background: colors.error.light,
|
|
33
|
+
borderColor: colors.error.default,
|
|
34
|
+
textColor: colors.error.default,
|
|
35
|
+
iconColor: colors.error.default,
|
|
36
|
+
};
|
|
37
|
+
// info and neutral both use the warm default card style (Figma "Default")
|
|
38
|
+
default:
|
|
39
|
+
return {
|
|
40
|
+
background: colors.background.secondary,
|
|
41
|
+
borderColor: colors.border.window,
|
|
42
|
+
textColor: colors.text.primary,
|
|
43
|
+
iconColor: colors.text.primary,
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
function defaultIcon(variant, color) {
|
|
48
|
+
const props = { size: 18, weight: 'fill', color };
|
|
49
|
+
switch (variant) {
|
|
50
|
+
case 'success': return <CheckCircle {...props}/>;
|
|
51
|
+
case 'warning': return <Warning {...props}/>;
|
|
52
|
+
case 'error': return <WarningCircle {...props}/>;
|
|
53
|
+
default: return <Info {...props}/>;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
export function InlineInfo({ variant = 'info', visible = true, title, message, icon, action, onDismiss, autoClose, color, testID, }) {
|
|
57
|
+
const { colors } = useTheme();
|
|
58
|
+
const v = useVariantStyle(variant);
|
|
59
|
+
// Auto-close: call onDismiss after autoClose ms, only while visible
|
|
60
|
+
useEffect(() => {
|
|
61
|
+
if (!visible || autoClose === undefined || onDismiss === undefined)
|
|
62
|
+
return;
|
|
63
|
+
const timer = setTimeout(onDismiss, autoClose);
|
|
64
|
+
return () => clearTimeout(timer);
|
|
65
|
+
}, [visible, autoClose, onDismiss]);
|
|
66
|
+
if (!visible)
|
|
67
|
+
return null;
|
|
68
|
+
// When a custom color is provided, override accent and compute a light background tint.
|
|
69
|
+
// React Native accepts 8-char hex (#RRGGBBAA) natively, so appending '1a' ≈ 10 % opacity.
|
|
70
|
+
const resolvedStyle = color
|
|
71
|
+
? {
|
|
72
|
+
background: color + '1a',
|
|
73
|
+
borderColor: color,
|
|
74
|
+
textColor: color,
|
|
75
|
+
iconColor: color,
|
|
76
|
+
}
|
|
77
|
+
: v;
|
|
78
|
+
const resolvedIcon = icon === null
|
|
79
|
+
? null
|
|
80
|
+
: icon !== undefined
|
|
81
|
+
? icon
|
|
82
|
+
: defaultIcon(variant, resolvedStyle.iconColor);
|
|
83
|
+
const needsAlert = variant === 'warning' || variant === 'error';
|
|
84
|
+
return (<Card testID={testID} style={{ backgroundColor: resolvedStyle.background, borderColor: resolvedStyle.borderColor }}>
|
|
85
|
+
<View style={styles.column} accessibilityRole={needsAlert ? 'alert' : undefined}>
|
|
86
|
+
{/* Title row: icon + title on the same line */}
|
|
87
|
+
<View style={styles.dismissWrapper}>
|
|
88
|
+
<View style={[styles.titleRow, { flex: 1 }]}>
|
|
89
|
+
{resolvedIcon !== null && resolvedIcon}
|
|
90
|
+
<Text style={[styles.title, { color: resolvedStyle.textColor }]} numberOfLines={1}>
|
|
91
|
+
{title}
|
|
92
|
+
</Text>
|
|
93
|
+
</View>
|
|
94
|
+
|
|
95
|
+
{onDismiss !== undefined && (<TouchableOpacity style={styles.dismissButton} onPress={onDismiss} activeOpacity={0.7} accessibilityLabel="Fermer">
|
|
96
|
+
<X size={16} color={colors.text.tertiary}/>
|
|
97
|
+
</TouchableOpacity>)}
|
|
98
|
+
</View>
|
|
99
|
+
|
|
100
|
+
{/* Message */}
|
|
101
|
+
{typeof message === 'string' ? (<Text style={[styles.message, { color: resolvedStyle.textColor }]}>
|
|
102
|
+
{message}
|
|
103
|
+
</Text>) : (message)}
|
|
104
|
+
|
|
105
|
+
{/* Optional action */}
|
|
106
|
+
{action !== undefined && (<TouchableOpacity style={styles.action} onPress={action.onPress} activeOpacity={0.7}>
|
|
107
|
+
<Text style={[styles.actionText, { color: resolvedStyle.textColor }]}>
|
|
108
|
+
{action.label}
|
|
109
|
+
</Text>
|
|
110
|
+
</TouchableOpacity>)}
|
|
111
|
+
</View>
|
|
112
|
+
</Card>);
|
|
113
|
+
}
|
|
114
|
+
export default InlineInfo;
|
|
115
|
+
//# sourceMappingURL=InlineInfo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InlineInfo.js","sourceRoot":"","sources":["../../../src/components/InlineInfo/InlineInfo.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,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I,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,UAAU,EAAE,EAAE,KAAK,EAAE,aAAa,CAAC,SAAS,EAAE,CAAC,CAAC,CACnE;cAAA,CAAC,MAAM,CAAC,KAAK,CACf;YAAA,EAAE,IAAI,CACR;UAAA,EAAE,gBAAgB,CAAC,CACpB,CACH;MAAA,EAAE,IAAI,CACR;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC;AAED,eAAe,UAAU,CAAC","sourcesContent":["/**\n * InlineInfo — contextual information banner.\n * Composed on top of Card. Icon and title sit on the same row,\n * message text is displayed below.\n * Figma: node 5361:3109 (Default) · 5361:3108 (Error)\n */\nimport React, { useEffect } from 'react';\nimport { View, Text, TouchableOpacity } from 'react-native';\nimport {\n Info,\n CheckCircle,\n Warning,\n WarningCircle,\n X,\n} from 'phosphor-react-native';\nimport { Card } from '../Card';\nimport { useTheme } from '../../context/ThemeContext';\nimport { styles } from './InlineInfo.styles';\n\nexport type InlineInfoVariant = 'info' | 'success' | 'warning' | 'error' | 'neutral';\n\nexport interface InlineInfoAction {\n /** Action link label */\n label: string;\n /** Called when the action link is pressed */\n onPress: () => void;\n}\n\nexport interface InlineInfoProps {\n /** Visual variant — determines the color scheme and default icon */\n variant?: InlineInfoVariant;\n /** Title displayed on the same line as the icon */\n title: string;\n /** Message text displayed below the title */\n message: string | React.ReactNode;\n /**\n * Icon displayed to the left of the title.\n * - `undefined` (default) — uses the variant's default Phosphor icon\n * - `null` — hides the icon\n * - ReactNode — custom icon\n */\n icon?: React.ReactNode | null;\n /** Optional action link shown below the message */\n action?: InlineInfoAction;\n /**\n * Called when the banner is dismissed — either by the user pressing × or by auto-close.\n * When provided, shows a dismiss (×) button in the top-right corner.\n */\n onDismiss?: () => void;\n /**\n * Auto-close delay in milliseconds.\n * When set, `onDismiss` is called automatically after the given delay.\n * Requires `onDismiss` to be defined.\n */\n autoClose?: number;\n /**\n * Controls banner visibility.\n * When `false` the component renders nothing — combine with `onDismiss`\n * and `autoClose` for a toast-like behaviour.\n * @default true\n */\n visible?: boolean;\n /**\n * Custom accent color (hex string, e.g. `\"#4a6cf7\"`).\n * Overrides the variant's default border, icon and text colors.\n * A light tint (~10 % opacity) is applied automatically as the background.\n */\n color?: string;\n /** Test ID for automated testing */\n testID?: string;\n}\n\n// Per-variant resolved colors\ninterface VariantStyle {\n background: string;\n borderColor: string;\n textColor: string;\n iconColor: string;\n}\n\nfunction useVariantStyle(variant: InlineInfoVariant): VariantStyle {\n const { colors } = useTheme();\n\n switch (variant) {\n case 'success':\n return {\n background: colors.success.light,\n borderColor: colors.success.default,\n textColor: colors.success.dark,\n iconColor: colors.success.default,\n };\n case 'warning':\n return {\n background: colors.warning.light,\n borderColor: colors.warning.default,\n textColor: colors.warning.dark,\n iconColor: colors.warning.default,\n };\n case 'error':\n return {\n background: colors.error.light,\n borderColor: colors.error.default,\n textColor: colors.error.default,\n iconColor: colors.error.default,\n };\n // info and neutral both use the warm default card style (Figma \"Default\")\n default:\n return {\n background: colors.background.secondary,\n borderColor: colors.border.window,\n textColor: colors.text.primary,\n iconColor: colors.text.primary,\n };\n }\n}\n\nfunction defaultIcon(variant: InlineInfoVariant, color: string): React.ReactElement {\n const props = { size: 18, weight: 'fill' as const, color };\n switch (variant) {\n case 'success': return <CheckCircle {...props} />;\n case 'warning': return <Warning {...props} />;\n case 'error': return <WarningCircle {...props} />;\n default: return <Info {...props} />;\n }\n}\n\nexport function InlineInfo({\n variant = 'info',\n visible = true,\n title,\n message,\n icon,\n action,\n onDismiss,\n autoClose,\n color,\n testID,\n}: InlineInfoProps) {\n const { colors } = useTheme();\n const v = useVariantStyle(variant);\n\n // Auto-close: call onDismiss after autoClose ms, only while visible\n useEffect(() => {\n if (!visible || autoClose === undefined || onDismiss === undefined) return;\n const timer = setTimeout(onDismiss, autoClose);\n return () => clearTimeout(timer);\n }, [visible, autoClose, onDismiss]);\n\n if (!visible) return null;\n\n // When a custom color is provided, override accent and compute a light background tint.\n // React Native accepts 8-char hex (#RRGGBBAA) natively, so appending '1a' ≈ 10 % opacity.\n const resolvedStyle: VariantStyle = color\n ? {\n background: color + '1a',\n borderColor: color,\n textColor: color,\n iconColor: color,\n }\n : v;\n\n const resolvedIcon: React.ReactNode | null =\n icon === null\n ? null\n : icon !== undefined\n ? icon\n : defaultIcon(variant, resolvedStyle.iconColor);\n\n const needsAlert = variant === 'warning' || variant === 'error';\n\n return (\n <Card\n testID={testID}\n style={{ backgroundColor: resolvedStyle.background, borderColor: resolvedStyle.borderColor }}\n >\n <View\n style={styles.column}\n accessibilityRole={needsAlert ? 'alert' : undefined}\n >\n {/* Title row: icon + title on the same line */}\n <View style={styles.dismissWrapper}>\n <View style={[styles.titleRow, { flex: 1 }]}>\n {resolvedIcon !== null && resolvedIcon}\n <Text style={[styles.title, { color: resolvedStyle.textColor }]} numberOfLines={1}>\n {title}\n </Text>\n </View>\n\n {onDismiss !== undefined && (\n <TouchableOpacity\n style={styles.dismissButton}\n onPress={onDismiss}\n activeOpacity={0.7}\n accessibilityLabel=\"Fermer\"\n >\n <X size={16} color={colors.text.tertiary} />\n </TouchableOpacity>\n )}\n </View>\n\n {/* Message */}\n {typeof message === 'string' ? (\n <Text style={[styles.message, { color: resolvedStyle.textColor }]}>\n {message}\n </Text>\n ) : (\n message\n )}\n\n {/* Optional action */}\n {action !== undefined && (\n <TouchableOpacity\n style={styles.action}\n onPress={action.onPress}\n activeOpacity={0.7}\n >\n <Text style={[styles.actionText, { color: resolvedStyle.textColor }]}>\n {action.label}\n </Text>\n </TouchableOpacity>\n )}\n </View>\n </Card>\n );\n}\n\nexport default InlineInfo;\n"]}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export declare const styles: {
|
|
2
|
+
column: {
|
|
3
|
+
gap: number;
|
|
4
|
+
};
|
|
5
|
+
titleRow: {
|
|
6
|
+
flexDirection: "row";
|
|
7
|
+
alignItems: "center";
|
|
8
|
+
gap: number;
|
|
9
|
+
minHeight: number;
|
|
10
|
+
};
|
|
11
|
+
title: {
|
|
12
|
+
fontSize: number;
|
|
13
|
+
fontWeight: "700";
|
|
14
|
+
lineHeight: number;
|
|
15
|
+
flex: number;
|
|
16
|
+
};
|
|
17
|
+
message: {
|
|
18
|
+
fontSize: number;
|
|
19
|
+
fontWeight: "500";
|
|
20
|
+
lineHeight: number;
|
|
21
|
+
};
|
|
22
|
+
action: {
|
|
23
|
+
marginTop: number;
|
|
24
|
+
alignSelf: "flex-start";
|
|
25
|
+
};
|
|
26
|
+
actionText: {
|
|
27
|
+
fontSize: number;
|
|
28
|
+
fontWeight: "600";
|
|
29
|
+
lineHeight: number;
|
|
30
|
+
textDecorationLine: "underline";
|
|
31
|
+
};
|
|
32
|
+
dismissWrapper: {
|
|
33
|
+
flexDirection: "row";
|
|
34
|
+
alignItems: "flex-start";
|
|
35
|
+
};
|
|
36
|
+
dismissButton: {
|
|
37
|
+
padding: number;
|
|
38
|
+
marginLeft: number;
|
|
39
|
+
flexShrink: number;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
//# sourceMappingURL=InlineInfo.styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InlineInfo.styles.d.ts","sourceRoot":"","sources":["../../../src/components/InlineInfo/InlineInfo.styles.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4CjB,CAAC"}
|