@situaction/traquiste-mobile 1.0.0 → 1.2.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 +61 -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 +12 -6
- 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 +17 -17
- 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 +257 -0
- package/build/components/Calendar/Calendar.styles.d.ts.map +1 -0
- package/build/components/Calendar/Calendar.styles.js +234 -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 +77 -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 +55 -25
- 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 +103 -0
- package/build/components/Input/Input.js.map +1 -0
- package/build/components/Input/Input.styles.d.ts +39 -0
- package/build/components/Input/Input.styles.d.ts.map +1 -0
- package/build/components/Input/Input.styles.js +40 -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/ListGroup/ListGroup.d.ts +24 -0
- package/build/components/ListGroup/ListGroup.d.ts.map +1 -0
- package/build/components/ListGroup/ListGroup.js +44 -0
- package/build/components/ListGroup/ListGroup.js.map +1 -0
- package/build/components/ListGroup/index.d.ts +3 -0
- package/build/components/ListGroup/index.d.ts.map +1 -0
- package/build/components/ListGroup/index.js +2 -0
- package/build/components/ListGroup/index.js.map +1 -0
- package/build/components/ListItem/ListItem.d.ts +44 -0
- package/build/components/ListItem/ListItem.d.ts.map +1 -0
- package/build/components/ListItem/ListItem.js +69 -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 +89 -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 +52 -0
- package/build/components/Tab/Tab.d.ts.map +1 -0
- package/build/components/Tab/Tab.js +121 -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 +35 -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 +21 -0
- package/build/components/navigation/GeneralNav/GeneralNav.d.ts.map +1 -0
- package/build/components/navigation/GeneralNav/GeneralNav.js +25 -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 +77 -1
- package/build/index.d.ts.map +1 -1
- package/build/index.js +38 -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
package/README.md
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
|
|
2
1
|
# @situaction/traquiste-mobile
|
|
3
2
|
|
|
4
3
|
React Native UI component library for Traquiste — built with Expo + TypeScript strict + native StyleSheet.
|
|
5
4
|
|
|
6
5
|
## Requirements
|
|
7
6
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
-
|
|
7
|
+
Your project must target:
|
|
8
|
+
|
|
9
|
+
- Expo >= 50
|
|
10
|
+
- React >= 18
|
|
11
|
+
- React Native >= 0.74
|
|
11
12
|
|
|
12
13
|
## Installation
|
|
13
14
|
|
|
@@ -15,109 +16,79 @@ React Native UI component library for Traquiste — built with Expo + TypeScript
|
|
|
15
16
|
npm install @situaction/traquiste-mobile
|
|
16
17
|
```
|
|
17
18
|
|
|
18
|
-
Peer dependencies
|
|
19
|
-
|
|
20
|
-
```sh
|
|
21
|
-
npm install expo react react-native
|
|
22
|
-
```
|
|
19
|
+
### Peer dependencies
|
|
23
20
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
## Development
|
|
27
|
-
|
|
28
|
-
### 1. Clone and install
|
|
21
|
+
Install the following packages in your app if not already present:
|
|
29
22
|
|
|
30
23
|
```sh
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
### 2. Build the library
|
|
38
|
-
|
|
39
|
-
```sh
|
|
40
|
-
npm run build
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
### 3. First time — build the native binary
|
|
44
|
-
|
|
45
|
-
The `example/ios/` directory is not committed and must be generated locally.
|
|
46
|
-
|
|
47
|
-
```sh
|
|
48
|
-
cd example
|
|
49
|
-
|
|
50
|
-
# iOS simulator
|
|
51
|
-
npx expo run:ios
|
|
52
|
-
|
|
53
|
-
# iOS device (connect via USB)
|
|
54
|
-
npx expo run:ios --device
|
|
24
|
+
npm install expo react react-native \
|
|
25
|
+
@gorhom/bottom-sheet \
|
|
26
|
+
react-native-reanimated \
|
|
27
|
+
react-native-gesture-handler \
|
|
28
|
+
react-native-safe-area-context \
|
|
29
|
+
phosphor-react-native
|
|
55
30
|
```
|
|
56
31
|
|
|
57
|
-
>
|
|
32
|
+
> `@gorhom/bottom-sheet` requires additional setup — follow the [official guide](https://ui.gorhom.dev/components/bottom-sheet/installation).
|
|
58
33
|
|
|
59
|
-
|
|
34
|
+
## Setup
|
|
60
35
|
|
|
61
|
-
|
|
62
|
-
npm test
|
|
63
|
-
```
|
|
36
|
+
Wrap your app with `ThemeProvider` at the root:
|
|
64
37
|
|
|
65
|
-
|
|
38
|
+
```tsx
|
|
39
|
+
import { ThemeProvider } from '@situaction/traquiste-mobile';
|
|
66
40
|
|
|
67
|
-
|
|
68
|
-
|
|
41
|
+
export default function App() {
|
|
42
|
+
return (
|
|
43
|
+
<ThemeProvider>
|
|
44
|
+
{/* your app */}
|
|
45
|
+
</ThemeProvider>
|
|
46
|
+
);
|
|
47
|
+
}
|
|
69
48
|
```
|
|
70
49
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
### 5. Run Storybook
|
|
50
|
+
### Custom theme
|
|
74
51
|
|
|
75
|
-
```
|
|
76
|
-
|
|
52
|
+
```tsx
|
|
53
|
+
<ThemeProvider
|
|
54
|
+
light={myLightTokens} // override default light tokens
|
|
55
|
+
dark={myDarkTokens} // override default dark tokens
|
|
56
|
+
colorScheme="dark" // force a color scheme (default: system)
|
|
57
|
+
fontFamily="Inter" // override font family (default: 'Urbanist')
|
|
58
|
+
>
|
|
77
59
|
```
|
|
78
60
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
|
90
|
-
|
|
|
91
|
-
| `
|
|
92
|
-
| `
|
|
93
|
-
| `
|
|
94
|
-
| `
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
|
103
|
-
| ------ | ------- |
|
|
104
|
-
| `feat:` | Minor release (1.x.0) |
|
|
105
|
-
| `fix:` | Patch release (1.0.x) |
|
|
106
|
-
| `feat!:` / `BREAKING CHANGE` | Major release (x.0.0) |
|
|
107
|
-
| `chore:` / `docs:` / `test:` | No release |
|
|
108
|
-
|
|
109
|
-
Branches:
|
|
110
|
-
|
|
111
|
-
- `master` → published as `latest` on npm
|
|
112
|
-
- `develop` → published as `next` on npm (prerelease)
|
|
61
|
+
## Components
|
|
62
|
+
|
|
63
|
+
| Component | Description |
|
|
64
|
+
|-----------|-------------|
|
|
65
|
+
| `Button` | Primary, ghost, tertiary, destructive variants |
|
|
66
|
+
| `ButtonAction` | Icon-only action button |
|
|
67
|
+
| `ButtonMap` | Floating map action button |
|
|
68
|
+
| `ButtonMenu` | Tab bar menu button with badge |
|
|
69
|
+
| `Card` / `CardEquip` / `CardProfile` | Equipment and profile cards |
|
|
70
|
+
| `FilterChip` / `FilterNav` | Filter chips and filter bar |
|
|
71
|
+
| `Input` | Text field with label, icons, helper text |
|
|
72
|
+
| `ListItem` | Flexible list row with leading/trailing/primaryLabel slots |
|
|
73
|
+
| `ListGroup` | Selectable list group with section title and check icon |
|
|
74
|
+
| `MapPin` / `Cluster` | Map markers for react-native-maps |
|
|
75
|
+
| `Tag` / `AssociationTag` | Labels and MAC address badges |
|
|
76
|
+
| `Calendar` | Date picker with range selection |
|
|
77
|
+
| `MediaPicker` | Photo and file upload cards |
|
|
78
|
+
| `BottomSheet` | Controlled bottom sheet with theming |
|
|
79
|
+
| `SearchBar` | Search input with clear button |
|
|
80
|
+
| `Checkbox` / `RadioButton` / `Switch` | Form controls |
|
|
81
|
+
| `Spinner` / `ProgressStep` / `Stepper` | Progress indicators |
|
|
82
|
+
| `GeneralNav` / `PageNav` | Navigation headers |
|
|
83
|
+
| `Tab` / `TabBar` | Tab navigation — line & button variants, showContainerBorder |
|
|
84
|
+
| `ColorPicker` / `ColorSwatch` | Color selection |
|
|
113
85
|
|
|
114
86
|
## Stack
|
|
115
87
|
|
|
116
|
-
- Expo SDK 55 / React Native 0.83
|
|
117
|
-
- TypeScript strict
|
|
118
|
-
-
|
|
119
|
-
-
|
|
120
|
-
- Zero external styling libraries
|
|
88
|
+
- Expo SDK 55 / React Native 0.83 / React 19
|
|
89
|
+
- TypeScript strict — zero `any`
|
|
90
|
+
- Native `StyleSheet` only — no external styling library
|
|
91
|
+
- `phosphor-react-native` for icons
|
|
121
92
|
|
|
122
93
|
## License
|
|
123
94
|
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AssociationTag — compact rectangular badge with text and optional left/right icons.
|
|
3
|
+
* Used to display beacon/tracker MAC addresses in CardEquip; reusable elsewhere.
|
|
4
|
+
*/
|
|
5
|
+
import React from 'react';
|
|
6
|
+
export interface AssociationTagProps {
|
|
7
|
+
/** Label text */
|
|
8
|
+
text: string;
|
|
9
|
+
/** Icon displayed on the left */
|
|
10
|
+
iconLeft?: React.ReactNode;
|
|
11
|
+
/** Icon displayed on the right */
|
|
12
|
+
iconRight?: React.ReactNode;
|
|
13
|
+
/** Background color override */
|
|
14
|
+
backgroundColor?: string;
|
|
15
|
+
/** Text and icon color override */
|
|
16
|
+
textColor?: string;
|
|
17
|
+
}
|
|
18
|
+
export declare function AssociationTag({ text, iconLeft, iconRight, backgroundColor, textColor, }: AssociationTagProps): React.JSX.Element;
|
|
19
|
+
//# sourceMappingURL=AssociationTag.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AssociationTag.d.ts","sourceRoot":"","sources":["../../../src/components/AssociationTag/AssociationTag.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,MAAM,WAAW,mBAAmB;IAClC,iBAAiB;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,iCAAiC;IACjC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,kCAAkC;IAClC,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC5B,gCAAgC;IAChC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,mCAAmC;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,cAAc,CAAC,EAC7B,IAAI,EACJ,QAAQ,EACR,SAAS,EACT,eAAe,EACf,SAAS,GACV,EAAE,mBAAmB,qBA2BrB"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AssociationTag — compact rectangular badge with text and optional left/right icons.
|
|
3
|
+
* Used to display beacon/tracker MAC addresses in CardEquip; reusable elsewhere.
|
|
4
|
+
*/
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import { Text, View } from 'react-native';
|
|
7
|
+
import { useTheme } from '../../context/ThemeContext';
|
|
8
|
+
import { styles } from './AssociationTag.styles';
|
|
9
|
+
export function AssociationTag({ text, iconLeft, iconRight, backgroundColor, textColor, }) {
|
|
10
|
+
const { colors, fontFamily } = useTheme();
|
|
11
|
+
const resolvedBg = backgroundColor ?? colors.success.light;
|
|
12
|
+
const resolvedText = textColor ?? colors.text.primary;
|
|
13
|
+
return (<View style={[styles.container, { backgroundColor: resolvedBg }]}>
|
|
14
|
+
{iconLeft != null && (<View style={styles.iconWrapper}>
|
|
15
|
+
{React.isValidElement(iconLeft)
|
|
16
|
+
? React.cloneElement(iconLeft, { color: resolvedText })
|
|
17
|
+
: iconLeft}
|
|
18
|
+
</View>)}
|
|
19
|
+
<Text style={[styles.text, { color: resolvedText, fontFamily }]} numberOfLines={1}>
|
|
20
|
+
{text}
|
|
21
|
+
</Text>
|
|
22
|
+
{iconRight != null && (<View style={styles.iconWrapper}>
|
|
23
|
+
{React.isValidElement(iconRight)
|
|
24
|
+
? React.cloneElement(iconRight, { color: resolvedText })
|
|
25
|
+
: iconRight}
|
|
26
|
+
</View>)}
|
|
27
|
+
</View>);
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=AssociationTag.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AssociationTag.js","sourceRoot":"","sources":["../../../src/components/AssociationTag/AssociationTag.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAejD,MAAM,UAAU,cAAc,CAAC,EAC7B,IAAI,EACJ,QAAQ,EACR,SAAS,EACT,eAAe,EACf,SAAS,GACW;IACpB,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,QAAQ,EAAE,CAAC;IAE1C,MAAM,UAAU,GAAG,eAAe,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;IAC3D,MAAM,YAAY,GAAG,SAAS,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC;IAEtD,OAAO,CACL,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,EAAE,EAAE,eAAe,EAAE,UAAU,EAAE,CAAC,CAAC,CAC/D;MAAA,CAAC,QAAQ,IAAI,IAAI,IAAI,CACnB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,CAC9B;UAAA,CAAC,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC;gBAC7B,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC,QAAkD,EAAE,EAAE,KAAK,EAAE,YAAY,EAAE,CAAC;gBACjG,CAAC,CAAC,QAAQ,CACd;QAAA,EAAE,IAAI,CAAC,CACR,CACD;MAAA,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAChF;QAAA,CAAC,IAAI,CACP;MAAA,EAAE,IAAI,CACN;MAAA,CAAC,SAAS,IAAI,IAAI,IAAI,CACpB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,CAC9B;UAAA,CAAC,KAAK,CAAC,cAAc,CAAC,SAAS,CAAC;gBAC9B,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC,SAAmD,EAAE,EAAE,KAAK,EAAE,YAAY,EAAE,CAAC;gBAClG,CAAC,CAAC,SAAS,CACf;QAAA,EAAE,IAAI,CAAC,CACR,CACH;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC","sourcesContent":["/**\n * AssociationTag — compact rectangular badge with text and optional left/right icons.\n * Used to display beacon/tracker MAC addresses in CardEquip; reusable elsewhere.\n */\nimport React from 'react';\nimport { Text, View } from 'react-native';\nimport { useTheme } from '../../context/ThemeContext';\nimport { styles } from './AssociationTag.styles';\n\nexport interface AssociationTagProps {\n /** Label text */\n text: string;\n /** Icon displayed on the left */\n iconLeft?: React.ReactNode;\n /** Icon displayed on the right */\n iconRight?: React.ReactNode;\n /** Background color override */\n backgroundColor?: string;\n /** Text and icon color override */\n textColor?: string;\n}\n\nexport function AssociationTag({\n text,\n iconLeft,\n iconRight,\n backgroundColor,\n textColor,\n}: AssociationTagProps) {\n const { colors, fontFamily } = useTheme();\n\n const resolvedBg = backgroundColor ?? colors.success.light;\n const resolvedText = textColor ?? colors.text.primary;\n\n return (\n <View style={[styles.container, { backgroundColor: resolvedBg }]}>\n {iconLeft != null && (\n <View style={styles.iconWrapper}>\n {React.isValidElement(iconLeft)\n ? React.cloneElement(iconLeft as React.ReactElement<{ color?: string }>, { color: resolvedText })\n : iconLeft}\n </View>\n )}\n <Text style={[styles.text, { color: resolvedText, fontFamily }]} numberOfLines={1}>\n {text}\n </Text>\n {iconRight != null && (\n <View style={styles.iconWrapper}>\n {React.isValidElement(iconRight)\n ? React.cloneElement(iconRight as React.ReactElement<{ color?: string }>, { color: resolvedText })\n : iconRight}\n </View>\n )}\n </View>\n );\n}"]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare const styles: {
|
|
2
|
+
container: {
|
|
3
|
+
flexDirection: "row";
|
|
4
|
+
alignItems: "center";
|
|
5
|
+
justifyContent: "center";
|
|
6
|
+
gap: number;
|
|
7
|
+
paddingVertical: number;
|
|
8
|
+
paddingHorizontal: number;
|
|
9
|
+
borderRadius: number;
|
|
10
|
+
};
|
|
11
|
+
iconWrapper: {
|
|
12
|
+
flexShrink: number;
|
|
13
|
+
};
|
|
14
|
+
text: {
|
|
15
|
+
fontSize: number;
|
|
16
|
+
fontWeight: "600";
|
|
17
|
+
fontFamily: string;
|
|
18
|
+
flexShrink: number;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=AssociationTag.styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AssociationTag.styles.d.ts","sourceRoot":"","sources":["../../../src/components/AssociationTag/AssociationTag.styles.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;CAmBjB,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Static styles for the AssociationTag component.
|
|
3
|
+
* Dynamic colors (background, text) are applied inline in AssociationTag.tsx.
|
|
4
|
+
*/
|
|
5
|
+
import { StyleSheet } from 'react-native';
|
|
6
|
+
export const styles = StyleSheet.create({
|
|
7
|
+
container: {
|
|
8
|
+
flexDirection: 'row',
|
|
9
|
+
alignItems: 'center',
|
|
10
|
+
justifyContent: 'center',
|
|
11
|
+
gap: 4,
|
|
12
|
+
paddingVertical: 4,
|
|
13
|
+
paddingHorizontal: 6,
|
|
14
|
+
borderRadius: 2,
|
|
15
|
+
},
|
|
16
|
+
iconWrapper: {
|
|
17
|
+
flexShrink: 0,
|
|
18
|
+
},
|
|
19
|
+
text: {
|
|
20
|
+
fontSize: 10,
|
|
21
|
+
fontWeight: '600',
|
|
22
|
+
fontFamily: 'Urbanist',
|
|
23
|
+
flexShrink: 1,
|
|
24
|
+
},
|
|
25
|
+
});
|
|
26
|
+
//# sourceMappingURL=AssociationTag.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AssociationTag.styles.js","sourceRoot":"","sources":["../../../src/components/AssociationTag/AssociationTag.styles.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,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,EAAE,QAAQ;QACpB,cAAc,EAAE,QAAQ;QACxB,GAAG,EAAE,CAAC;QACN,eAAe,EAAE,CAAC;QAClB,iBAAiB,EAAE,CAAC;QACpB,YAAY,EAAE,CAAC;KAChB;IACD,WAAW,EAAE;QACX,UAAU,EAAE,CAAC;KACd;IACD,IAAI,EAAE;QACJ,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,KAAK;QACjB,UAAU,EAAE,UAAU;QACtB,UAAU,EAAE,CAAC;KACd;CACF,CAAC,CAAC","sourcesContent":["/**\n * Static styles for the AssociationTag component.\n * Dynamic colors (background, text) are applied inline in AssociationTag.tsx.\n */\nimport { StyleSheet } from 'react-native';\n\nexport const styles = StyleSheet.create({\n container: {\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'center',\n gap: 4,\n paddingVertical: 4,\n paddingHorizontal: 6,\n borderRadius: 2,\n },\n iconWrapper: {\n flexShrink: 0,\n },\n text: {\n fontSize: 10,\n fontWeight: '600',\n fontFamily: 'Urbanist',\n flexShrink: 1,\n },\n});"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/AssociationTag/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,YAAY,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/AssociationTag/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC","sourcesContent":["export { AssociationTag } from './AssociationTag';\nexport type { AssociationTagProps } from './AssociationTag';"]}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/** Bottom sheet — controllable via isOpen/onClose with optional gestures, backdrop and close button */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export type BottomSheetProps = {
|
|
4
|
+
/** Sheet content */
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
/** Whether the sheet is open */
|
|
7
|
+
isOpen: boolean;
|
|
8
|
+
/** Called when the sheet opens */
|
|
9
|
+
onOpen?: () => void;
|
|
10
|
+
/** Called when the sheet closes */
|
|
11
|
+
onClose?: () => void;
|
|
12
|
+
/** Initial height as a fraction of screen height (0 to 1) */
|
|
13
|
+
size?: number;
|
|
14
|
+
/** Allow sliding up to expand to full screen (default: true) */
|
|
15
|
+
expandable?: boolean;
|
|
16
|
+
/** Allow sliding down to close (default: true) */
|
|
17
|
+
closeable?: boolean;
|
|
18
|
+
/** Show a close button (default: false) */
|
|
19
|
+
showCloseButton?: boolean;
|
|
20
|
+
/** Position of the close button (default: 'right') */
|
|
21
|
+
closeButtonPosition?: 'left' | 'right';
|
|
22
|
+
/** Show dark backdrop behind the sheet (default: true) */
|
|
23
|
+
backdrop?: boolean;
|
|
24
|
+
/** Block interactions with content behind the sheet even without a visible backdrop (default: false) */
|
|
25
|
+
blockBackground?: boolean;
|
|
26
|
+
/** Close the sheet when the backdrop is pressed (default: false) */
|
|
27
|
+
closeOnBackdropPress?: boolean;
|
|
28
|
+
/** Auto-size the sheet based on content height instead of a fixed snap point (default: false) */
|
|
29
|
+
autoSize?: boolean;
|
|
30
|
+
/** How the sheet reacts when the keyboard opens */
|
|
31
|
+
keyboardBehavior?: 'extend' | 'fillParent' | 'interactive';
|
|
32
|
+
/** Whether the sheet restores its position when the keyboard closes */
|
|
33
|
+
keyboardBlurBehavior?: 'none' | 'restore';
|
|
34
|
+
};
|
|
35
|
+
export declare const BottomSheet: ({ children, isOpen, onOpen, onClose, size, expandable, closeable, showCloseButton, closeButtonPosition, backdrop, blockBackground, closeOnBackdropPress, autoSize, keyboardBehavior, keyboardBlurBehavior, }: BottomSheetProps) => React.JSX.Element;
|
|
36
|
+
//# sourceMappingURL=BottomSheet.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BottomSheet.d.ts","sourceRoot":"","sources":["../../../src/components/BottomSheet/BottomSheet.tsx"],"names":[],"mappings":"AAAA,uGAAuG;AACvG,OAAO,KAA4D,MAAM,OAAO,CAAC;AAYjF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,oBAAoB;IACpB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,gCAAgC;IAChC,MAAM,EAAE,OAAO,CAAC;IAChB,kCAAkC;IAClC,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,mCAAmC;IACnC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,6DAA6D;IAC7D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gEAAgE;IAChE,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,kDAAkD;IAClD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,2CAA2C;IAC3C,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,sDAAsD;IACtD,mBAAmB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IACvC,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,wGAAwG;IACxG,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,oEAAoE;IACpE,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,iGAAiG;IACjG,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,mDAAmD;IACnD,gBAAgB,CAAC,EAAE,QAAQ,GAAG,YAAY,GAAG,aAAa,CAAC;IAC3D,uEAAuE;IACvE,oBAAoB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC3C,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,8MAgBzB,gBAAgB,sBAiHlB,CAAC"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/** Bottom sheet — controllable via isOpen/onClose with optional gestures, backdrop and close button */
|
|
2
|
+
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
3
|
+
import { View, TouchableOpacity } from 'react-native';
|
|
4
|
+
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
5
|
+
import RNBottomSheet, { BottomSheetView, BottomSheetBackdrop, } from '@gorhom/bottom-sheet';
|
|
6
|
+
import { XIcon } from 'phosphor-react-native';
|
|
7
|
+
import { useTheme } from '../../context/ThemeContext';
|
|
8
|
+
import { styles } from './BottomSheet.styles';
|
|
9
|
+
export const BottomSheet = ({ children, isOpen, onOpen, onClose, size = 0.5, expandable = true, closeable = true, showCloseButton = false, closeButtonPosition = 'right', backdrop = true, blockBackground = false, closeOnBackdropPress = false, autoSize = false, keyboardBehavior, keyboardBlurBehavior = 'restore', }) => {
|
|
10
|
+
const ref = useRef(null);
|
|
11
|
+
// Freeze the initial open state so gorhom starts in the right position on mount
|
|
12
|
+
const [initialIndex] = useState(() => (isOpen ? 0 : -1));
|
|
13
|
+
const didMountRef = useRef(false);
|
|
14
|
+
const { bottom } = useSafeAreaInsets();
|
|
15
|
+
const { colors } = useTheme();
|
|
16
|
+
const snapPoints = autoSize
|
|
17
|
+
? undefined
|
|
18
|
+
: expandable
|
|
19
|
+
? [`${Math.round(size * 100)}%`, '100%']
|
|
20
|
+
: [`${Math.round(size * 100)}%`];
|
|
21
|
+
const themedStyles = useMemo(() => ({
|
|
22
|
+
background: {
|
|
23
|
+
borderWidth: 1,
|
|
24
|
+
borderColor: colors.bottomSheet.border,
|
|
25
|
+
borderTopLeftRadius: 16,
|
|
26
|
+
borderTopRightRadius: 16,
|
|
27
|
+
borderBottomLeftRadius: 0,
|
|
28
|
+
borderBottomRightRadius: 0,
|
|
29
|
+
backgroundColor: colors.bottomSheet.background,
|
|
30
|
+
},
|
|
31
|
+
handle: {
|
|
32
|
+
backgroundColor: colors.bottomSheet.handle,
|
|
33
|
+
width: 36,
|
|
34
|
+
height: 4,
|
|
35
|
+
},
|
|
36
|
+
}), [colors]);
|
|
37
|
+
useEffect(() => {
|
|
38
|
+
// Skip the initial mount — gorhom's index prop handles the initial state
|
|
39
|
+
if (!didMountRef.current) {
|
|
40
|
+
didMountRef.current = true;
|
|
41
|
+
if (isOpen)
|
|
42
|
+
onOpen?.();
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
if (isOpen) {
|
|
46
|
+
ref.current?.snapToIndex(0);
|
|
47
|
+
onOpen?.();
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
ref.current?.close();
|
|
51
|
+
}
|
|
52
|
+
}, [isOpen, onOpen]);
|
|
53
|
+
const handleChange = useCallback((index) => {
|
|
54
|
+
if (index === -1)
|
|
55
|
+
onClose?.();
|
|
56
|
+
}, [onClose]);
|
|
57
|
+
const renderBackdrop = useCallback((props) => (<BottomSheetBackdrop {...props} disappearsOnIndex={-1} appearsOnIndex={0} pressBehavior={closeOnBackdropPress ? 'close' : 'none'} opacity={backdrop ? 0.5 : 0}/>), [backdrop, closeOnBackdropPress]);
|
|
58
|
+
const closeButtonStyle = [
|
|
59
|
+
styles.closeButton,
|
|
60
|
+
closeButtonPosition === 'left' ? styles.closeLeft : styles.closeRight,
|
|
61
|
+
];
|
|
62
|
+
return (<RNBottomSheet ref={ref} index={initialIndex} snapPoints={snapPoints} enableDynamicSizing={autoSize} enablePanDownToClose={closeable} enableOverDrag={false} enableHandlePanningGesture={expandable || closeable} enableContentPanningGesture={expandable || closeable} onChange={handleChange} keyboardBehavior={keyboardBehavior} keyboardBlurBehavior={keyboardBlurBehavior} backdropComponent={backdrop || blockBackground ? renderBackdrop : undefined} handleIndicatorStyle={expandable || closeable ? themedStyles.handle : styles.handleHidden} backgroundStyle={themedStyles.background} style={styles.shadow}>
|
|
63
|
+
{autoSize ? (<BottomSheetView style={styles.content}>
|
|
64
|
+
{showCloseButton && (<TouchableOpacity onPress={onClose} style={closeButtonStyle} hitSlop={8}>
|
|
65
|
+
<XIcon size={20} color={colors.bottomSheet.closeIcon}/>
|
|
66
|
+
</TouchableOpacity>)}
|
|
67
|
+
{children}
|
|
68
|
+
</BottomSheetView>) : (<View style={[styles.content, { paddingBottom: bottom }]}>
|
|
69
|
+
{showCloseButton && (<TouchableOpacity onPress={onClose} style={closeButtonStyle} hitSlop={8}>
|
|
70
|
+
<XIcon size={20} color={colors.bottomSheet.closeIcon}/>
|
|
71
|
+
</TouchableOpacity>)}
|
|
72
|
+
{children}
|
|
73
|
+
</View>)}
|
|
74
|
+
</RNBottomSheet>);
|
|
75
|
+
};
|
|
76
|
+
//# sourceMappingURL=BottomSheet.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BottomSheet.js","sourceRoot":"","sources":["../../../src/components/BottomSheet/BottomSheet.tsx"],"names":[],"mappings":"AAAA,uGAAuG;AACvG,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjF,OAAO,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,aAAa,EAAE,EACpB,eAAe,EACf,mBAA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CAAC,MAAM,CAAC,CAErB;MAAA,CAAC,QAAQ,CAAC,CAAC,CAAC,CACV,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CACrC;UAAA,CAAC,eAAe,IAAI,CAClB,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,gBAAgB,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CACtE;cAAA,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,SAAS,CAAC,EACvD;YAAA,EAAE,gBAAgB,CAAC,CACpB,CACD;UAAA,CAAC,QAAQ,CACX;QAAA,EAAE,eAAe,CAAC,CACnB,CAAC,CAAC,CAAC,CACF,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,EAAE,EAAE,aAAa,EAAE,MAAM,EAAE,CAAC,CAAC,CACvD;UAAA,CAAC,eAAe,IAAI,CAClB,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,gBAAgB,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CACtE;cAAA,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,SAAS,CAAC,EACvD;YAAA,EAAE,gBAAgB,CAAC,CACpB,CACD;UAAA,CAAC,QAAQ,CACX;QAAA,EAAE,IAAI,CAAC,CACR,CACH;IAAA,EAAE,aAAa,CAAC,CACjB,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/** Bottom sheet — controllable via isOpen/onClose with optional gestures, backdrop and close button */\nimport React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport { View, TouchableOpacity } from 'react-native';\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\nimport RNBottomSheet, {\n BottomSheetView,\n BottomSheetBackdrop,\n} from '@gorhom/bottom-sheet';\nimport type { BottomSheetBackdropProps } from '@gorhom/bottom-sheet';\nimport { XIcon } from 'phosphor-react-native';\nimport { useTheme } from '../../context/ThemeContext';\nimport { styles } from './BottomSheet.styles';\n\nexport type BottomSheetProps = {\n /** Sheet content */\n children: React.ReactNode;\n /** Whether the sheet is open */\n isOpen: boolean;\n /** Called when the sheet opens */\n onOpen?: () => void;\n /** Called when the sheet closes */\n onClose?: () => void;\n /** Initial height as a fraction of screen height (0 to 1) */\n size?: number;\n /** Allow sliding up to expand to full screen (default: true) */\n expandable?: boolean;\n /** Allow sliding down to close (default: true) */\n closeable?: boolean;\n /** Show a close button (default: false) */\n showCloseButton?: boolean;\n /** Position of the close button (default: 'right') */\n closeButtonPosition?: 'left' | 'right';\n /** Show dark backdrop behind the sheet (default: true) */\n backdrop?: boolean;\n /** Block interactions with content behind the sheet even without a visible backdrop (default: false) */\n blockBackground?: boolean;\n /** Close the sheet when the backdrop is pressed (default: false) */\n closeOnBackdropPress?: boolean;\n /** Auto-size the sheet based on content height instead of a fixed snap point (default: false) */\n autoSize?: boolean;\n /** How the sheet reacts when the keyboard opens */\n keyboardBehavior?: 'extend' | 'fillParent' | 'interactive';\n /** Whether the sheet restores its position when the keyboard closes */\n keyboardBlurBehavior?: 'none' | 'restore';\n};\n\nexport const BottomSheet = ({\n children,\n isOpen,\n onOpen,\n onClose,\n size = 0.5,\n expandable = true,\n closeable = true,\n showCloseButton = false,\n closeButtonPosition = 'right',\n backdrop = true,\n blockBackground = false,\n closeOnBackdropPress = false,\n autoSize = false,\n keyboardBehavior,\n keyboardBlurBehavior = 'restore',\n}: BottomSheetProps) => {\n const ref = useRef<RNBottomSheet>(null);\n // Freeze the initial open state so gorhom starts in the right position on mount\n const [initialIndex] = useState(() => (isOpen ? 0 : -1));\n const didMountRef = useRef(false);\n const { bottom } = useSafeAreaInsets();\n const { colors } = useTheme();\n\n const snapPoints = autoSize\n ? undefined\n : expandable\n ? [`${Math.round(size * 100)}%`, '100%']\n : [`${Math.round(size * 100)}%`];\n\n const themedStyles = useMemo(\n () => ({\n background: {\n borderWidth: 1,\n borderColor: colors.bottomSheet.border,\n borderTopLeftRadius: 16,\n borderTopRightRadius: 16,\n borderBottomLeftRadius: 0,\n borderBottomRightRadius: 0,\n backgroundColor: colors.bottomSheet.background,\n },\n handle: {\n backgroundColor: colors.bottomSheet.handle,\n width: 36,\n height: 4,\n },\n }),\n [colors],\n );\n\n useEffect(() => {\n // Skip the initial mount — gorhom's index prop handles the initial state\n if (!didMountRef.current) {\n didMountRef.current = true;\n if (isOpen) onOpen?.();\n return;\n }\n if (isOpen) {\n ref.current?.snapToIndex(0);\n onOpen?.();\n } else {\n ref.current?.close();\n }\n }, [isOpen, onOpen]);\n\n const handleChange = useCallback(\n (index: number) => {\n if (index === -1) onClose?.();\n },\n [onClose],\n );\n\n const renderBackdrop = useCallback(\n (props: BottomSheetBackdropProps) => (\n <BottomSheetBackdrop\n {...props}\n disappearsOnIndex={-1}\n appearsOnIndex={0}\n pressBehavior={closeOnBackdropPress ? 'close' : 'none'}\n opacity={backdrop ? 0.5 : 0}\n />\n ),\n [backdrop, closeOnBackdropPress],\n );\n\n const closeButtonStyle = [\n styles.closeButton,\n closeButtonPosition === 'left' ? styles.closeLeft : styles.closeRight,\n ];\n\n return (\n <RNBottomSheet\n ref={ref}\n index={initialIndex}\n snapPoints={snapPoints}\n enableDynamicSizing={autoSize}\n enablePanDownToClose={closeable}\n enableOverDrag={false}\n enableHandlePanningGesture={expandable || closeable}\n enableContentPanningGesture={expandable || closeable}\n onChange={handleChange}\n keyboardBehavior={keyboardBehavior}\n keyboardBlurBehavior={keyboardBlurBehavior}\n backdropComponent={backdrop || blockBackground ? renderBackdrop : undefined}\n handleIndicatorStyle={expandable || closeable ? themedStyles.handle : styles.handleHidden}\n backgroundStyle={themedStyles.background}\n style={styles.shadow}\n >\n {autoSize ? (\n <BottomSheetView style={styles.content}>\n {showCloseButton && (\n <TouchableOpacity onPress={onClose} style={closeButtonStyle} hitSlop={8}>\n <XIcon size={20} color={colors.bottomSheet.closeIcon} />\n </TouchableOpacity>\n )}\n {children}\n </BottomSheetView>\n ) : (\n <View style={[styles.content, { paddingBottom: bottom }]}>\n {showCloseButton && (\n <TouchableOpacity onPress={onClose} style={closeButtonStyle} hitSlop={8}>\n <XIcon size={20} color={colors.bottomSheet.closeIcon} />\n </TouchableOpacity>\n )}\n {children}\n </View>\n )}\n </RNBottomSheet>\n );\n};"]}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export declare const styles: {
|
|
2
|
+
content: {
|
|
3
|
+
flex: number;
|
|
4
|
+
};
|
|
5
|
+
handleHidden: {
|
|
6
|
+
height: number;
|
|
7
|
+
width: number;
|
|
8
|
+
};
|
|
9
|
+
closeButton: {
|
|
10
|
+
position: "absolute";
|
|
11
|
+
top: number;
|
|
12
|
+
padding: number;
|
|
13
|
+
zIndex: number;
|
|
14
|
+
};
|
|
15
|
+
closeRight: {
|
|
16
|
+
right: number;
|
|
17
|
+
};
|
|
18
|
+
closeLeft: {
|
|
19
|
+
left: number;
|
|
20
|
+
};
|
|
21
|
+
shadow: {
|
|
22
|
+
shadowColor: string;
|
|
23
|
+
shadowOffset: {
|
|
24
|
+
width: number;
|
|
25
|
+
height: number;
|
|
26
|
+
};
|
|
27
|
+
shadowOpacity: number;
|
|
28
|
+
shadowRadius: number;
|
|
29
|
+
elevation: number;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=BottomSheet.styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BottomSheet.styles.d.ts","sourceRoot":"","sources":["../../../src/components/BottomSheet/BottomSheet.styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2BjB,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/** Static layout styles for BottomSheet — all colors injected via useTheme() */
|
|
2
|
+
import { StyleSheet } from 'react-native';
|
|
3
|
+
export const styles = StyleSheet.create({
|
|
4
|
+
content: {
|
|
5
|
+
flex: 1,
|
|
6
|
+
},
|
|
7
|
+
handleHidden: {
|
|
8
|
+
height: 0,
|
|
9
|
+
width: 0,
|
|
10
|
+
},
|
|
11
|
+
closeButton: {
|
|
12
|
+
position: 'absolute',
|
|
13
|
+
top: 10,
|
|
14
|
+
padding: 4,
|
|
15
|
+
zIndex: 1,
|
|
16
|
+
},
|
|
17
|
+
closeRight: {
|
|
18
|
+
right: 10,
|
|
19
|
+
},
|
|
20
|
+
closeLeft: {
|
|
21
|
+
left: 10,
|
|
22
|
+
},
|
|
23
|
+
shadow: {
|
|
24
|
+
shadowColor: '#0f0f0f',
|
|
25
|
+
shadowOffset: { width: 0, height: -4 },
|
|
26
|
+
shadowOpacity: 0.08,
|
|
27
|
+
shadowRadius: 12,
|
|
28
|
+
elevation: 8,
|
|
29
|
+
},
|
|
30
|
+
});
|
|
31
|
+
//# sourceMappingURL=BottomSheet.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BottomSheet.styles.js","sourceRoot":"","sources":["../../../src/components/BottomSheet/BottomSheet.styles.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,MAAM,CAAC,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IACtC,OAAO,EAAE;QACP,IAAI,EAAE,CAAC;KACR;IACD,YAAY,EAAE;QACZ,MAAM,EAAE,CAAC;QACT,KAAK,EAAE,CAAC;KACT;IACD,WAAW,EAAE;QACX,QAAQ,EAAE,UAAU;QACpB,GAAG,EAAE,EAAE;QACP,OAAO,EAAE,CAAC;QACV,MAAM,EAAE,CAAC;KACV;IACD,UAAU,EAAE;QACV,KAAK,EAAE,EAAE;KACV;IACD,SAAS,EAAE;QACT,IAAI,EAAE,EAAE;KACT;IACD,MAAM,EAAE;QACN,WAAW,EAAE,SAAS;QACtB,YAAY,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE;QACtC,aAAa,EAAE,IAAI;QACnB,YAAY,EAAE,EAAE;QAChB,SAAS,EAAE,CAAC;KACb;CACF,CAAC,CAAC","sourcesContent":["/** Static layout styles for BottomSheet — all colors injected via useTheme() */\nimport { StyleSheet } from 'react-native';\n\nexport const styles = StyleSheet.create({\n content: {\n flex: 1,\n },\n handleHidden: {\n height: 0,\n width: 0,\n },\n closeButton: {\n position: 'absolute',\n top: 10,\n padding: 4,\n zIndex: 1,\n },\n closeRight: {\n right: 10,\n },\n closeLeft: {\n left: 10,\n },\n shadow: {\n shadowColor: '#0f0f0f',\n shadowOffset: { width: 0, height: -4 },\n shadowOpacity: 0.08,\n shadowRadius: 12,\n elevation: 8,\n },\n});"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/BottomSheet/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,YAAY,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/BottomSheet/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC","sourcesContent":["export { BottomSheet } from './BottomSheet';\nexport type { BottomSheetProps } from './BottomSheet';"]}
|
|
@@ -26,6 +26,10 @@ export interface ButtonProps {
|
|
|
26
26
|
onPress?: () => void;
|
|
27
27
|
/** Additional container styles */
|
|
28
28
|
style?: StyleProp<ViewStyle>;
|
|
29
|
+
/** Accessibility label for screen readers — defaults to label when omitted */
|
|
30
|
+
accessibilityLabel?: string;
|
|
31
|
+
/** Test identifier */
|
|
32
|
+
testID?: string;
|
|
29
33
|
}
|
|
30
|
-
export declare function Button({ variant, size, content, label, iconLeft, iconRight, disabled, onPress, style, }: ButtonProps): React.JSX.Element;
|
|
34
|
+
export declare function Button({ variant, size, content, label, iconLeft, iconRight, disabled, onPress, style, accessibilityLabel, testID, }: ButtonProps): React.JSX.Element;
|
|
31
35
|
//# sourceMappingURL=Button.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/components/Button/Button.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAmB,MAAM,OAAO,CAAC;AAExC,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGzD,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,UAAU,GAAG,OAAO,GAAG,aAAa,CAAC;AAC7E,MAAM,MAAM,UAAU,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,CAAC;AAChD,MAAM,MAAM,aAAa,GAAG,WAAW,GAAG,mBAAmB,GAAG,WAAW,CAAC;AAE5E,MAAM,WAAW,WAAW;IAC1B,4BAA4B;IAC5B,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,kBAAkB;IAClB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,qBAAqB;IACrB,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,wDAAwD;IACxD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0CAA0C;IAC1C,QAAQ,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;IAC9B,2CAA2C;IAC3C,SAAS,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;IAC/B,qBAAqB;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,oBAAoB;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,kCAAkC;IAClC,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,C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AkB,EAClB,MAAM,GACP,EAAE,WAAW,qBAiFb"}
|
|
@@ -13,9 +13,9 @@ const SIZE_TOKENS = {
|
|
|
13
13
|
XL: { height: 60, paddingVertical: 16, paddingHorizontal: 32, gap: 12, borderRadius: 8, iconSize: 24, fontSize: 18, lineHeight: 26 },
|
|
14
14
|
};
|
|
15
15
|
// --- Component ---
|
|
16
|
-
export function Button({ variant = 'primary', size = 'M', content = 'icon-both', label, iconLeft, iconRight, disabled = false, onPress, style, }) {
|
|
16
|
+
export function Button({ variant = 'primary', size = 'M', content = 'icon-both', label, iconLeft, iconRight, disabled = false, onPress, style, accessibilityLabel, testID, }) {
|
|
17
17
|
const [pressed, setPressed] = useState(false);
|
|
18
|
-
const { colors } = useTheme();
|
|
18
|
+
const { colors, fontFamily } = useTheme();
|
|
19
19
|
const sizeTokens = SIZE_TOKENS[size];
|
|
20
20
|
const state = disabled ? 'disabled' : pressed ? 'pressed' : 'default';
|
|
21
21
|
const colorTokens = colors.button[variant][state];
|
|
@@ -40,8 +40,8 @@ export function Button({ variant = 'primary', size = 'M', content = 'icon-both',
|
|
|
40
40
|
color: colorTokens.text,
|
|
41
41
|
fontSize: sizeTokens.fontSize,
|
|
42
42
|
lineHeight: sizeTokens.lineHeight,
|
|
43
|
-
fontFamily
|
|
44
|
-
fontWeight: '500',
|
|
43
|
+
fontFamily,
|
|
44
|
+
fontWeight: (variant === 'ghost' ? '600' : '500'),
|
|
45
45
|
};
|
|
46
46
|
// Clone icon elements to inject size and color from active theme state
|
|
47
47
|
const cloneIcon = (icon) => {
|
|
@@ -53,12 +53,18 @@ export function Button({ variant = 'primary', size = 'M', content = 'icon-both',
|
|
|
53
53
|
...icon.props,
|
|
54
54
|
});
|
|
55
55
|
};
|
|
56
|
+
const sharedA11y = {
|
|
57
|
+
accessibilityRole: 'button',
|
|
58
|
+
accessibilityLabel: accessibilityLabel ?? label,
|
|
59
|
+
accessibilityState: { disabled },
|
|
60
|
+
testID,
|
|
61
|
+
};
|
|
56
62
|
if (isIconOnly) {
|
|
57
|
-
return (<Pressable pointerEvents={disabled ? 'none' : 'auto'} onPressIn={() => setPressed(true)} onPressOut={() => setPressed(false)} onPress={disabled ? undefined : onPress} style={[containerStyle, style]}>
|
|
63
|
+
return (<Pressable pointerEvents={disabled ? 'none' : 'auto'} onPressIn={() => setPressed(true)} onPressOut={() => setPressed(false)} onPress={disabled ? undefined : onPress} style={[containerStyle, style]} {...sharedA11y}>
|
|
58
64
|
{cloneIcon(iconLeft)}
|
|
59
65
|
</Pressable>);
|
|
60
66
|
}
|
|
61
|
-
return (<Pressable pointerEvents={disabled ? 'none' : 'auto'} onPressIn={() => setPressed(true)} onPressOut={() => setPressed(false)} onPress={disabled ? undefined : onPress} style={[containerStyle, style]}>
|
|
67
|
+
return (<Pressable pointerEvents={disabled ? 'none' : 'auto'} onPressIn={() => setPressed(true)} onPressOut={() => setPressed(false)} onPress={disabled ? undefined : onPress} style={[containerStyle, style]} {...sharedA11y}>
|
|
62
68
|
{cloneIcon(iconLeft)}
|
|
63
69
|
{label != null && <Text style={textStyle}>{label}</Text>}
|
|
64
70
|
{cloneIcon(iconRight)}
|