@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
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { StyleSheet } from 'react-native';
|
|
2
|
+
export const styles = StyleSheet.create({
|
|
3
|
+
wrapper: {
|
|
4
|
+
flexDirection: 'row',
|
|
5
|
+
alignItems: 'center',
|
|
6
|
+
gap: 8,
|
|
7
|
+
alignSelf: 'flex-start',
|
|
8
|
+
},
|
|
9
|
+
track: {
|
|
10
|
+
overflow: 'hidden',
|
|
11
|
+
// shadow on track
|
|
12
|
+
shadowOffset: { width: 0, height: 4 },
|
|
13
|
+
shadowOpacity: 1,
|
|
14
|
+
shadowRadius: 5,
|
|
15
|
+
elevation: 2,
|
|
16
|
+
},
|
|
17
|
+
thumb: {
|
|
18
|
+
position: 'absolute',
|
|
19
|
+
// shadow on thumb (visible before overflow:hidden clips it)
|
|
20
|
+
shadowOffset: { width: 0, height: 4 },
|
|
21
|
+
shadowOpacity: 1,
|
|
22
|
+
shadowRadius: 5,
|
|
23
|
+
elevation: 2,
|
|
24
|
+
},
|
|
25
|
+
});
|
|
26
|
+
//# sourceMappingURL=Switch.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Switch.styles.js","sourceRoot":"","sources":["../../../src/components/Switch/Switch.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,MAAM,CAAC,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IACtC,OAAO,EAAE;QACP,aAAa,EAAE,KAAK;QACpB,UAAU,EAAE,QAAQ;QACpB,GAAG,EAAE,CAAC;QACN,SAAS,EAAE,YAAY;KACxB;IACD,KAAK,EAAE;QACL,QAAQ,EAAE,QAAQ;QAClB,kBAAkB;QAClB,YAAY,EAAG,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE;QACtC,aAAa,EAAE,CAAC;QAChB,YAAY,EAAG,CAAC;QAChB,SAAS,EAAM,CAAC;KACjB;IACD,KAAK,EAAE;QACL,QAAQ,EAAM,UAAU;QACxB,4DAA4D;QAC5D,YAAY,EAAG,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE;QACtC,aAAa,EAAE,CAAC;QAChB,YAAY,EAAG,CAAC;QAChB,SAAS,EAAM,CAAC;KACjB;CACF,CAAC,CAAC","sourcesContent":["import { StyleSheet } from 'react-native';\n\nexport const styles = StyleSheet.create({\n wrapper: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: 8,\n alignSelf: 'flex-start',\n },\n track: {\n overflow: 'hidden',\n // shadow on track\n shadowOffset: { width: 0, height: 4 },\n shadowOpacity: 1,\n shadowRadius: 5,\n elevation: 2,\n },\n thumb: {\n position: 'absolute',\n // shadow on thumb (visible before overflow:hidden clips it)\n shadowOffset: { width: 0, height: 4 },\n shadowOpacity: 1,\n shadowRadius: 5,\n elevation: 2,\n },\n});\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Switch/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Switch/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC","sourcesContent":["export { Switch } from './Switch';\nexport type { SwitchProps, SwitchSize } from './Switch';\n"]}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tab — horizontal tab navigation bar.
|
|
3
|
+
*
|
|
4
|
+
* Two visual variants:
|
|
5
|
+
* - 'line' → underline indicator. Full-width strip, each tab flex:1.
|
|
6
|
+
* - 'button' → pill/segmented container. Active tab gets a card background.
|
|
7
|
+
*
|
|
8
|
+
* Controlled: activeIndex + onChange always required.
|
|
9
|
+
* Optional horizontal ScrollView when `scrollable` is true.
|
|
10
|
+
*/
|
|
11
|
+
import React from 'react';
|
|
12
|
+
import type { StyleProp, ViewStyle } from 'react-native';
|
|
13
|
+
export interface TabItem {
|
|
14
|
+
/** Tab label text — optional when icon is provided */
|
|
15
|
+
label?: string;
|
|
16
|
+
/** Optional Phosphor icon — rendered at 20px */
|
|
17
|
+
icon?: React.ReactElement;
|
|
18
|
+
/** Disabled — no interaction, muted color */
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
}
|
|
21
|
+
export interface TabProps {
|
|
22
|
+
/** Tab definitions */
|
|
23
|
+
items: TabItem[];
|
|
24
|
+
/** Index of the currently active tab — controlled */
|
|
25
|
+
activeIndex: number;
|
|
26
|
+
/** Called with the new index when the user taps a tab */
|
|
27
|
+
onChange: (index: number) => void;
|
|
28
|
+
/**
|
|
29
|
+
* Visual variant:
|
|
30
|
+
* - 'line' → underline indicator, tabs stretch to fill width
|
|
31
|
+
* - 'button' → pill/segmented container
|
|
32
|
+
*/
|
|
33
|
+
variant?: 'line' | 'button';
|
|
34
|
+
/** When true, wraps tabs in a horizontal ScrollView (for many tabs) */
|
|
35
|
+
scrollable?: boolean;
|
|
36
|
+
/** Hides the container border/background — line: only active indicator visible, button: only active pill visible */
|
|
37
|
+
showContainerBorder?: boolean;
|
|
38
|
+
/** When true, truncates labels with "…" — defaults to false (full text, no wrap) */
|
|
39
|
+
truncateLabels?: boolean;
|
|
40
|
+
/** Forces the container to fill 100% of its parent width */
|
|
41
|
+
fullWidth?: boolean;
|
|
42
|
+
/** Each tab gets flex:1 and shares the container width equally — implies fullWidth */
|
|
43
|
+
stretchItems?: boolean;
|
|
44
|
+
/** Horizontal alignment of tabs within the container — defaults to 'left' */
|
|
45
|
+
align?: 'left' | 'center' | 'right';
|
|
46
|
+
/** Additional styles on the outer wrapper */
|
|
47
|
+
style?: StyleProp<ViewStyle>;
|
|
48
|
+
/** Test ID for automated testing */
|
|
49
|
+
testID?: string;
|
|
50
|
+
}
|
|
51
|
+
export declare const Tab: ({ items, activeIndex, onChange, variant, scrollable, showContainerBorder, truncateLabels, fullWidth, stretchItems, align, style, testID, }: TabProps) => React.JSX.Element;
|
|
52
|
+
//# sourceMappingURL=Tab.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tab.d.ts","sourceRoot":"","sources":["../../../src/components/Tab/Tab.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAQzD,MAAM,WAAW,OAAO;IACtB,sDAAsD;IACtD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gDAAgD;IAChD,IAAI,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;IAC1B,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,QAAQ;IACvB,sBAAsB;IACtB,KAAK,EAAE,OAAO,EAAE,CAAC;IACjB,qDAAqD;IACrD,WAAW,EAAE,MAAM,CAAC;IACpB,yDAAyD;IACzD,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;IAC5B,uEAAuE;IACvE,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,oHAAoH;IACpH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,oFAAoF;IACpF,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,4DAA4D;IAC5D,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,sFAAsF;IACtF,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,6EAA6E;IAC7E,KAAK,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;IACpC,6CAA6C;IAC7C,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,oCAAoC;IACpC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAMD,eAAO,MAAM,GAAG,GAAI,4IAajB,QAAQ,sBAkKV,CAAC"}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tab — horizontal tab navigation bar.
|
|
3
|
+
*
|
|
4
|
+
* Two visual variants:
|
|
5
|
+
* - 'line' → underline indicator. Full-width strip, each tab flex:1.
|
|
6
|
+
* - 'button' → pill/segmented container. Active tab gets a card background.
|
|
7
|
+
*
|
|
8
|
+
* Controlled: activeIndex + onChange always required.
|
|
9
|
+
* Optional horizontal ScrollView when `scrollable` is true.
|
|
10
|
+
*/
|
|
11
|
+
import React from 'react';
|
|
12
|
+
import { Pressable, ScrollView, Text, View, } from 'react-native';
|
|
13
|
+
import { useTheme } from '../../context/ThemeContext';
|
|
14
|
+
import { styles } from './Tab.styles';
|
|
15
|
+
// ---------------------------------------------------------------------------
|
|
16
|
+
// Component
|
|
17
|
+
// ---------------------------------------------------------------------------
|
|
18
|
+
export const Tab = ({ items, activeIndex, onChange, variant = 'line', scrollable = false, showContainerBorder = true, truncateLabels = false, fullWidth = false, stretchItems = false, align = 'left', style, testID, }) => {
|
|
19
|
+
const { colors } = useTheme();
|
|
20
|
+
const t = colors.tabs;
|
|
21
|
+
const justifyContent = align === 'center' ? 'center' :
|
|
22
|
+
align === 'right' ? 'flex-end' :
|
|
23
|
+
'flex-start';
|
|
24
|
+
// stretchItems implies full-width container
|
|
25
|
+
const effectiveFullWidth = fullWidth || stretchItems;
|
|
26
|
+
// items get flex:1 when stretchItems or truncateLabels (truncation needs a bounded width)
|
|
27
|
+
const itemFlex = !scrollable && (stretchItems || truncateLabels);
|
|
28
|
+
// autoSize: shrink to content when items are intrinsic width and container not forced full
|
|
29
|
+
const sizeStyle = !itemFlex && !effectiveFullWidth ? styles.autoSize : undefined;
|
|
30
|
+
// -----------------------------------------------------------------------
|
|
31
|
+
// Line variant
|
|
32
|
+
// -----------------------------------------------------------------------
|
|
33
|
+
if (variant === 'line') {
|
|
34
|
+
const tabs = items.map((item, index) => {
|
|
35
|
+
const isActive = index === activeIndex;
|
|
36
|
+
const isDisabled = item.disabled ?? false;
|
|
37
|
+
const textColor = isDisabled
|
|
38
|
+
? t.line.disabled.text
|
|
39
|
+
: isActive
|
|
40
|
+
? t.line.active.text
|
|
41
|
+
: t.line.inactive.text;
|
|
42
|
+
const iconElement = item.icon
|
|
43
|
+
? React.cloneElement(item.icon, {
|
|
44
|
+
color: textColor,
|
|
45
|
+
size: 20,
|
|
46
|
+
})
|
|
47
|
+
: null;
|
|
48
|
+
return (<Pressable key={index} onPress={isDisabled ? undefined : () => onChange(index)} accessibilityRole="tab" accessibilityState={{ selected: isActive, disabled: isDisabled }} style={[
|
|
49
|
+
styles.lineTab,
|
|
50
|
+
itemFlex && styles.lineTabFlex,
|
|
51
|
+
{
|
|
52
|
+
borderBottomWidth: 2,
|
|
53
|
+
borderBottomColor: isActive ? t.line.active.indicator : 'transparent',
|
|
54
|
+
marginBottom: -1,
|
|
55
|
+
},
|
|
56
|
+
]}>
|
|
57
|
+
{iconElement}
|
|
58
|
+
{item.label != null && (<Text numberOfLines={truncateLabels ? 1 : undefined} style={[styles.label, { color: textColor }]}>{item.label}</Text>)}
|
|
59
|
+
</Pressable>);
|
|
60
|
+
});
|
|
61
|
+
const container = (<View style={[
|
|
62
|
+
styles.lineContainer,
|
|
63
|
+
{
|
|
64
|
+
borderBottomColor: showContainerBorder ? t.line.containerBorder : 'transparent',
|
|
65
|
+
justifyContent,
|
|
66
|
+
},
|
|
67
|
+
sizeStyle,
|
|
68
|
+
style,
|
|
69
|
+
]} testID={testID}>
|
|
70
|
+
{scrollable ? (<ScrollView horizontal showsHorizontalScrollIndicator={false} contentContainerStyle={styles.lineScrollContent}>
|
|
71
|
+
{tabs}
|
|
72
|
+
</ScrollView>) : (tabs)}
|
|
73
|
+
</View>);
|
|
74
|
+
return container;
|
|
75
|
+
}
|
|
76
|
+
// -----------------------------------------------------------------------
|
|
77
|
+
// Button variant
|
|
78
|
+
// -----------------------------------------------------------------------
|
|
79
|
+
const tabs = items.map((item, index) => {
|
|
80
|
+
const isActive = index === activeIndex;
|
|
81
|
+
const isDisabled = item.disabled ?? false;
|
|
82
|
+
const textColor = isDisabled
|
|
83
|
+
? t.button.disabled.text
|
|
84
|
+
: isActive
|
|
85
|
+
? t.button.active.text
|
|
86
|
+
: t.button.default.text;
|
|
87
|
+
const iconElement = item.icon
|
|
88
|
+
? React.cloneElement(item.icon, {
|
|
89
|
+
color: textColor,
|
|
90
|
+
size: 20,
|
|
91
|
+
})
|
|
92
|
+
: null;
|
|
93
|
+
return (<Pressable key={index} onPress={isDisabled ? undefined : () => onChange(index)} accessibilityRole="tab" accessibilityState={{ selected: isActive, disabled: isDisabled }} style={[
|
|
94
|
+
styles.buttonTab,
|
|
95
|
+
itemFlex && styles.buttonTabFlex,
|
|
96
|
+
{
|
|
97
|
+
borderWidth: 1,
|
|
98
|
+
borderColor: isActive ? t.button.active.border : 'transparent',
|
|
99
|
+
backgroundColor: isActive ? t.button.active.background : 'transparent',
|
|
100
|
+
},
|
|
101
|
+
]}>
|
|
102
|
+
{iconElement}
|
|
103
|
+
{item.label != null && (<Text numberOfLines={truncateLabels ? 1 : undefined} style={[styles.label, { color: textColor }]}>{item.label}</Text>)}
|
|
104
|
+
</Pressable>);
|
|
105
|
+
});
|
|
106
|
+
return (<View style={[
|
|
107
|
+
styles.buttonContainer,
|
|
108
|
+
{
|
|
109
|
+
backgroundColor: showContainerBorder ? t.button.container.background : 'transparent',
|
|
110
|
+
borderColor: showContainerBorder ? t.button.container.border : 'transparent',
|
|
111
|
+
justifyContent,
|
|
112
|
+
},
|
|
113
|
+
sizeStyle,
|
|
114
|
+
style,
|
|
115
|
+
]} testID={testID}>
|
|
116
|
+
{scrollable ? (<ScrollView horizontal showsHorizontalScrollIndicator={false} contentContainerStyle={styles.buttonScrollContent}>
|
|
117
|
+
{tabs}
|
|
118
|
+
</ScrollView>) : (tabs)}
|
|
119
|
+
</View>);
|
|
120
|
+
};
|
|
121
|
+
//# sourceMappingURL=Tab.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tab.js","sourceRoot":"","sources":["../../../src/components/Tab/Tab.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,SAAS,EACT,UAAU,EACV,IAAI,EACJ,IAAI,GACL,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AA8CtC,8EAA8E;AAC9E,YAAY;AACZ,8EAA8E;AAE9E,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC,EAClB,KAAK,EACL,WAAW,EACX,QAAQ,EACR,OAAO,GAAG,MAAM,EAChB,UAAU,GAAG,KAAK,EAClB,mBAAmB,GAAG,IAAI,EAC1B,cAAc,GAAG,KAAK,EACtB,SAAS,GAAG,KAAK,EACjB,YAAY,GAAG,KAAK,EACpB,KAAK,GAAG,MAAM,EACd,KAAK,EACL,MAAM,GACG,EAAE,EAAE;IACb,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,CAAC;IAC9B,MAAM,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC;IAEtB,MAAM,cAAc,GAClB,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;QAC/B,KAAK,KAAK,OAAO,CAAE,CAAC,CAAC,UAAU,CAAC,CAAC;YACjC,YAAY,CAAC;IAEf,4CAA4C;IAC5C,MAAM,kBAAkB,GAAG,SAAS,IAAI,YAAY,CAAC;IACrD,0FAA0F;IAC1F,MAAM,QAAQ,GAAG,CAAC,UAAU,IAAI,CAAC,YAAY,IAAI,cAAc,CAAC,CAAC;IACjE,2FAA2F;I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ab — horizontal tab navigation bar.\n *\n * Two visual variants:\n * - 'line' → underline indicator. Full-width strip, each tab flex:1.\n * - 'button' → pill/segmented container. Active tab gets a card background.\n *\n * Controlled: activeIndex + onChange always required.\n * Optional horizontal ScrollView when `scrollable` is true.\n */\nimport React from 'react';\nimport {\n Pressable,\n ScrollView,\n Text,\n View,\n} from 'react-native';\nimport type { StyleProp, ViewStyle } from 'react-native';\nimport { useTheme } from '../../context/ThemeContext';\nimport { styles } from './Tab.styles';\n\n// ---------------------------------------------------------------------------\n// Types\n// ---------------------------------------------------------------------------\n\nexport interface TabItem {\n /** Tab label text — optional when icon is provided */\n label?: string;\n /** Optional Phosphor icon — rendered at 20px */\n icon?: React.ReactElement;\n /** Disabled — no interaction, muted color */\n disabled?: boolean;\n}\n\nexport interface TabProps {\n /** Tab definitions */\n items: TabItem[];\n /** Index of the currently active tab — controlled */\n activeIndex: number;\n /** Called with the new index when the user taps a tab */\n onChange: (index: number) => void;\n /**\n * Visual variant:\n * - 'line' → underline indicator, tabs stretch to fill width\n * - 'button' → pill/segmented container\n */\n variant?: 'line' | 'button';\n /** When true, wraps tabs in a horizontal ScrollView (for many tabs) */\n scrollable?: boolean;\n /** Hides the container border/background — line: only active indicator visible, button: only active pill visible */\n showContainerBorder?: boolean;\n /** When true, truncates labels with \"…\" — defaults to false (full text, no wrap) */\n truncateLabels?: boolean;\n /** Forces the container to fill 100% of its parent width */\n fullWidth?: boolean;\n /** Each tab gets flex:1 and shares the container width equally — implies fullWidth */\n stretchItems?: boolean;\n /** Horizontal alignment of tabs within the container — defaults to 'left' */\n align?: 'left' | 'center' | 'right';\n /** Additional styles on the outer wrapper */\n style?: StyleProp<ViewStyle>;\n /** Test ID for automated testing */\n testID?: string;\n}\n\n// ---------------------------------------------------------------------------\n// Component\n// ---------------------------------------------------------------------------\n\nexport const Tab = ({\n items,\n activeIndex,\n onChange,\n variant = 'line',\n scrollable = false,\n showContainerBorder = true,\n truncateLabels = false,\n fullWidth = false,\n stretchItems = false,\n align = 'left',\n style,\n testID,\n}: TabProps) => {\n const { colors } = useTheme();\n const t = colors.tabs;\n\n const justifyContent =\n align === 'center' ? 'center' :\n align === 'right' ? 'flex-end' :\n 'flex-start';\n\n // stretchItems implies full-width container\n const effectiveFullWidth = fullWidth || stretchItems;\n // items get flex:1 when stretchItems or truncateLabels (truncation needs a bounded width)\n const itemFlex = !scrollable && (stretchItems || truncateLabels);\n // autoSize: shrink to content when items are intrinsic width and container not forced full\n const sizeStyle = !itemFlex && !effectiveFullWidth ? styles.autoSize : undefined;\n\n // -----------------------------------------------------------------------\n // Line variant\n // -----------------------------------------------------------------------\n if (variant === 'line') {\n const tabs = items.map((item, index) => {\n const isActive = index === activeIndex;\n const isDisabled = item.disabled ?? false;\n\n const textColor = isDisabled\n ? t.line.disabled.text\n : isActive\n ? t.line.active.text\n : t.line.inactive.text;\n\n const iconElement = item.icon\n ? React.cloneElement(item.icon as React.ReactElement<{ color?: string; size?: number }>, {\n color: textColor,\n size: 20,\n })\n : null;\n\n return (\n <Pressable\n key={index}\n onPress={isDisabled ? undefined : () => onChange(index)}\n accessibilityRole=\"tab\"\n accessibilityState={{ selected: isActive, disabled: isDisabled }}\n style={[\n styles.lineTab,\n itemFlex && styles.lineTabFlex,\n {\n borderBottomWidth: 2,\n borderBottomColor: isActive ? t.line.active.indicator : 'transparent',\n marginBottom: -1,\n },\n ]}\n >\n {iconElement}\n {item.label != null && (\n <Text numberOfLines={truncateLabels ? 1 : undefined} style={[styles.label, { color: textColor }]}>{item.label}</Text>\n )}\n </Pressable>\n );\n });\n\n const container = (\n <View\n style={[\n styles.lineContainer,\n {\n borderBottomColor: showContainerBorder ? t.line.containerBorder : 'transparent',\n justifyContent,\n },\n sizeStyle,\n style,\n ]}\n testID={testID}\n >\n {scrollable ? (\n <ScrollView\n horizontal\n showsHorizontalScrollIndicator={false}\n contentContainerStyle={styles.lineScrollContent}\n >\n {tabs}\n </ScrollView>\n ) : (\n tabs\n )}\n </View>\n );\n\n return container;\n }\n\n // -----------------------------------------------------------------------\n // Button variant\n // -----------------------------------------------------------------------\n const tabs = items.map((item, index) => {\n const isActive = index === activeIndex;\n const isDisabled = item.disabled ?? false;\n\n const textColor = isDisabled\n ? t.button.disabled.text\n : isActive\n ? t.button.active.text\n : t.button.default.text;\n\n const iconElement = item.icon\n ? React.cloneElement(item.icon as React.ReactElement<{ color?: string; size?: number }>, {\n color: textColor,\n size: 20,\n })\n : null;\n\n return (\n <Pressable\n key={index}\n onPress={isDisabled ? undefined : () => onChange(index)}\n accessibilityRole=\"tab\"\n accessibilityState={{ selected: isActive, disabled: isDisabled }}\n style={[\n styles.buttonTab,\n itemFlex && styles.buttonTabFlex,\n {\n borderWidth: 1,\n borderColor: isActive ? t.button.active.border : 'transparent',\n backgroundColor: isActive ? t.button.active.background : 'transparent',\n },\n ]}\n >\n {iconElement}\n {item.label != null && (\n <Text numberOfLines={truncateLabels ? 1 : undefined} style={[styles.label, { color: textColor }]}>{item.label}</Text>\n )}\n </Pressable>\n );\n });\n\n return (\n <View\n style={[\n styles.buttonContainer,\n {\n backgroundColor: showContainerBorder ? t.button.container.background : 'transparent',\n borderColor: showContainerBorder ? t.button.container.border : 'transparent',\n justifyContent,\n },\n sizeStyle,\n style,\n ]}\n testID={testID}\n >\n {scrollable ? (\n <ScrollView\n horizontal\n showsHorizontalScrollIndicator={false}\n contentContainerStyle={styles.buttonScrollContent}\n >\n {tabs}\n </ScrollView>\n ) : (\n tabs\n )}\n </View>\n );\n};\n\n"]}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
export declare const styles: {
|
|
2
|
+
autoSize: {
|
|
3
|
+
alignSelf: "flex-start";
|
|
4
|
+
};
|
|
5
|
+
lineContainer: {
|
|
6
|
+
flexDirection: "row";
|
|
7
|
+
borderBottomWidth: number;
|
|
8
|
+
alignItems: "flex-end";
|
|
9
|
+
};
|
|
10
|
+
lineTab: {
|
|
11
|
+
flexDirection: "row";
|
|
12
|
+
alignItems: "center";
|
|
13
|
+
justifyContent: "center";
|
|
14
|
+
gap: number;
|
|
15
|
+
minHeight: number;
|
|
16
|
+
paddingHorizontal: number;
|
|
17
|
+
paddingVertical: number;
|
|
18
|
+
};
|
|
19
|
+
lineTabFlex: {
|
|
20
|
+
flex: number;
|
|
21
|
+
};
|
|
22
|
+
lineScrollContent: {
|
|
23
|
+
flexDirection: "row";
|
|
24
|
+
};
|
|
25
|
+
buttonContainer: {
|
|
26
|
+
flexDirection: "row";
|
|
27
|
+
borderWidth: number;
|
|
28
|
+
borderRadius: number;
|
|
29
|
+
padding: number;
|
|
30
|
+
gap: number;
|
|
31
|
+
};
|
|
32
|
+
buttonTab: {
|
|
33
|
+
flexDirection: "row";
|
|
34
|
+
alignItems: "center";
|
|
35
|
+
justifyContent: "center";
|
|
36
|
+
gap: number;
|
|
37
|
+
borderRadius: number;
|
|
38
|
+
paddingHorizontal: number;
|
|
39
|
+
paddingVertical: number;
|
|
40
|
+
};
|
|
41
|
+
buttonTabFlex: {
|
|
42
|
+
flex: number;
|
|
43
|
+
};
|
|
44
|
+
buttonScrollContent: {
|
|
45
|
+
flexDirection: "row";
|
|
46
|
+
gap: number;
|
|
47
|
+
};
|
|
48
|
+
label: {
|
|
49
|
+
fontFamily: string;
|
|
50
|
+
fontSize: number;
|
|
51
|
+
fontWeight: "600";
|
|
52
|
+
lineHeight: number;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
//# sourceMappingURL=Tab.styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tab.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Tab/Tab.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4DjB,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { StyleSheet } from 'react-native';
|
|
2
|
+
export const styles = StyleSheet.create({
|
|
3
|
+
// -- Shared
|
|
4
|
+
autoSize: {
|
|
5
|
+
alignSelf: 'flex-start',
|
|
6
|
+
},
|
|
7
|
+
// -- Line variant
|
|
8
|
+
lineContainer: {
|
|
9
|
+
flexDirection: 'row',
|
|
10
|
+
borderBottomWidth: 1,
|
|
11
|
+
alignItems: 'flex-end',
|
|
12
|
+
},
|
|
13
|
+
lineTab: {
|
|
14
|
+
flexDirection: 'row',
|
|
15
|
+
alignItems: 'center',
|
|
16
|
+
justifyContent: 'center',
|
|
17
|
+
gap: 4,
|
|
18
|
+
minHeight: 40,
|
|
19
|
+
paddingHorizontal: 16,
|
|
20
|
+
paddingVertical: 8,
|
|
21
|
+
},
|
|
22
|
+
lineTabFlex: {
|
|
23
|
+
flex: 1,
|
|
24
|
+
},
|
|
25
|
+
lineScrollContent: {
|
|
26
|
+
flexDirection: 'row',
|
|
27
|
+
},
|
|
28
|
+
// -- Button variant
|
|
29
|
+
buttonContainer: {
|
|
30
|
+
flexDirection: 'row',
|
|
31
|
+
borderWidth: 1,
|
|
32
|
+
borderRadius: 6,
|
|
33
|
+
padding: 2,
|
|
34
|
+
gap: 4,
|
|
35
|
+
},
|
|
36
|
+
buttonTab: {
|
|
37
|
+
flexDirection: 'row',
|
|
38
|
+
alignItems: 'center',
|
|
39
|
+
justifyContent: 'center',
|
|
40
|
+
gap: 4,
|
|
41
|
+
borderRadius: 4,
|
|
42
|
+
paddingHorizontal: 12,
|
|
43
|
+
paddingVertical: 6,
|
|
44
|
+
},
|
|
45
|
+
buttonTabFlex: {
|
|
46
|
+
flex: 1,
|
|
47
|
+
},
|
|
48
|
+
buttonScrollContent: {
|
|
49
|
+
flexDirection: 'row',
|
|
50
|
+
gap: 4,
|
|
51
|
+
},
|
|
52
|
+
// -- Shared
|
|
53
|
+
label: {
|
|
54
|
+
fontFamily: 'Urbanist',
|
|
55
|
+
fontSize: 14,
|
|
56
|
+
fontWeight: '600',
|
|
57
|
+
lineHeight: 20,
|
|
58
|
+
},
|
|
59
|
+
});
|
|
60
|
+
//# sourceMappingURL=Tab.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tab.styles.js","sourceRoot":"","sources":["../../../src/components/Tab/Tab.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,MAAM,CAAC,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IACtC,YAAY;IACZ,QAAQ,EAAE;QACR,SAAS,EAAE,YAAY;KACxB;IAED,kBAAkB;IAClB,aAAa,EAAE;QACb,aAAa,EAAI,KAAK;QACtB,iBAAiB,EAAE,CAAC;QACpB,UAAU,EAAO,UAAU;KAC5B;IACD,OAAO,EAAE;QACP,aAAa,EAAG,KAAK;QACrB,UAAU,EAAM,QAAQ;QACxB,cAAc,EAAE,QAAQ;QACxB,GAAG,EAAa,CAAC;QACjB,SAAS,EAAO,EAAE;QAClB,iBAAiB,EAAE,EAAE;QACrB,eAAe,EAAI,CAAC;KACrB;IACD,WAAW,EAAE;QACX,IAAI,EAAE,CAAC;KACR;IACD,iBAAiB,EAAE;QACjB,aAAa,EAAE,KAAK;KACrB;IAED,oBAAoB;IACpB,eAAe,EAAE;QACf,aAAa,EAAE,KAAK;QACpB,WAAW,EAAI,CAAC;QAChB,YAAY,EAAG,CAAC;QAChB,OAAO,EAAQ,CAAC;QAChB,GAAG,EAAY,CAAC;KACjB;IACD,SAAS,EAAE;QACT,aAAa,EAAM,KAAK;QACxB,UAAU,EAAS,QAAQ;QAC3B,cAAc,EAAK,QAAQ;QAC3B,GAAG,EAAgB,CAAC;QACpB,YAAY,EAAO,CAAC;QACpB,iBAAiB,EAAE,EAAE;QACrB,eAAe,EAAI,CAAC;KACrB;IACD,aAAa,EAAE;QACb,IAAI,EAAE,CAAC;KACR;IACD,mBAAmB,EAAE;QACnB,aAAa,EAAE,KAAK;QACpB,GAAG,EAAY,CAAC;KACjB;IAED,YAAY;IACZ,KAAK,EAAE;QACL,UAAU,EAAG,UAAU;QACvB,QAAQ,EAAK,EAAE;QACf,UAAU,EAAG,KAAK;QAClB,UAAU,EAAG,EAAE;KAChB;CACF,CAAC,CAAC","sourcesContent":["import { StyleSheet } from 'react-native';\n\nexport const styles = StyleSheet.create({\n // -- Shared\n autoSize: {\n alignSelf: 'flex-start',\n },\n\n // -- Line variant\n lineContainer: {\n flexDirection: 'row',\n borderBottomWidth: 1,\n alignItems: 'flex-end',\n },\n lineTab: {\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'center',\n gap: 4,\n minHeight: 40,\n paddingHorizontal: 16,\n paddingVertical: 8,\n },\n lineTabFlex: {\n flex: 1,\n },\n lineScrollContent: {\n flexDirection: 'row',\n },\n\n // -- Button variant\n buttonContainer: {\n flexDirection: 'row',\n borderWidth: 1,\n borderRadius: 6,\n padding: 2,\n gap: 4,\n },\n buttonTab: {\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'center',\n gap: 4,\n borderRadius: 4,\n paddingHorizontal: 12,\n paddingVertical: 6,\n },\n buttonTabFlex: {\n flex: 1,\n },\n buttonScrollContent: {\n flexDirection: 'row',\n gap: 4,\n },\n\n // -- Shared\n label: {\n fontFamily: 'Urbanist',\n fontSize: 14,\n fontWeight: '600',\n lineHeight: 20,\n },\n});"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Tab/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,YAAY,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Tab/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC","sourcesContent":["export { Tab } from './Tab';\nexport type { TabProps, TabItem } from './Tab';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tag.d.ts","sourceRoot":"","sources":["../../../src/components/Tag/Tag.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAG5C,wBAAgB,GAAG,CAAC,EAClB,KAAK,EACL,IAAW,EACX,KAAc,EACd,QAAgB,EAChB,KAAK,EACL,SAAS,EACT,QAAQ,EACR,OAAO,GACR,EAAE,QAAQ,+BA6CV;AAED,eAAe,GAAG,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tag component — compact label badge with optional icon slot and close button.
|
|
3
|
+
* Colors come from colors.tag.purple / colors.tag.disabled via useTheme().
|
|
4
|
+
*/
|
|
5
|
+
import { Pressable, Text, View } from 'react-native';
|
|
6
|
+
import { X } from 'phosphor-react-native';
|
|
7
|
+
import { useTheme } from '../../context/ThemeContext';
|
|
8
|
+
import { getBorderRadius, getSizeTokens, styles } from './Tag.styles';
|
|
9
|
+
export function Tag({ label, size = 'md', shape = 'pill', disabled = false, color, textColor, iconLeft, onClose, }) {
|
|
10
|
+
const { colors, fontFamily } = useTheme();
|
|
11
|
+
const tagColors = disabled ? colors.tag.disabled : colors.tag.purple;
|
|
12
|
+
const sizeTokens = getSizeTokens(size);
|
|
13
|
+
const borderRadius = getBorderRadius(size, shape);
|
|
14
|
+
// Custom color prop overrides background; textColor overrides text/icon
|
|
15
|
+
const resolvedBg = !disabled && color ? color : tagColors.background;
|
|
16
|
+
const resolvedText = !disabled && textColor ? textColor : tagColors.text;
|
|
17
|
+
const resolvedIcon = !disabled && textColor ? textColor : tagColors.icon;
|
|
18
|
+
const containerStyle = {
|
|
19
|
+
paddingHorizontal: sizeTokens.paddingHorizontal,
|
|
20
|
+
paddingVertical: sizeTokens.paddingVertical,
|
|
21
|
+
gap: sizeTokens.gap,
|
|
22
|
+
borderRadius,
|
|
23
|
+
backgroundColor: resolvedBg,
|
|
24
|
+
};
|
|
25
|
+
return (<View style={[styles.row, containerStyle]}>
|
|
26
|
+
{iconLeft != null && (<View style={{ width: sizeTokens.iconSize, height: sizeTokens.iconSize, alignItems: 'center', justifyContent: 'center' }}>
|
|
27
|
+
{iconLeft}
|
|
28
|
+
</View>)}
|
|
29
|
+
|
|
30
|
+
<Text style={[styles.label, { fontSize: sizeTokens.fontSize, lineHeight: sizeTokens.lineHeight, color: resolvedText, fontFamily }]} numberOfLines={1}>
|
|
31
|
+
{label}
|
|
32
|
+
</Text>
|
|
33
|
+
|
|
34
|
+
{onClose != null && (<Pressable style={[styles.closeHitZone, { width: sizeTokens.closeHitZone, height: sizeTokens.closeHitZone }]} onPress={disabled ? undefined : onClose} accessibilityRole="button" accessibilityLabel="Remove tag" pointerEvents={disabled ? 'none' : 'auto'}>
|
|
35
|
+
<X size={sizeTokens.closeSize} color={resolvedIcon} weight="bold"/>
|
|
36
|
+
</Pressable>)}
|
|
37
|
+
</View>);
|
|
38
|
+
}
|
|
39
|
+
export default Tag;
|
|
40
|
+
//# sourceMappingURL=Tag.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tag.js","sourceRoot":"","sources":["../../../src/components/Tag/Tag.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,CAAC,EAAE,MAAM,uBAAuB,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAEtD,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEtE,MAAM,UAAU,GAAG,CAAC,EAClB,KAAK,EACL,IAAI,GAAG,IAAI,EACX,KAAK,GAAG,MAAM,EACd,QAAQ,GAAG,KAAK,EAChB,KAAK,EACL,SAAS,EACT,QAAQ,EACR,OAAO,GACE;IACT,MAAM,EAAE,MAA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,CACR,CAED;;MAAA,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,UAAU,CAAC,QAAQ,EAAE,UAAU,EAAE,UAAU,CAAC,UAAU,EAAE,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CACnJ;QAAA,CAAC,KAAK,CACR;MAAA,EAAE,IAAI,CAEN;;MAAA,CAAC,OAAO,IAAI,IAAI,IAAI,CAClB,CAAC,SAAS,CACR,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,YAAY,EAAE,EAAE,KAAK,EAAE,UAAU,CAAC,YAAY,EAAE,MAAM,EAAE,UAAU,CAAC,YAAY,EAAE,CAAC,CAAC,CAClG,OAAO,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,CACxC,iBAAiB,CAAC,QAAQ,CAC1B,kBAAkB,CAAC,YAAY,CAC/B,aAAa,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAE1C;UAAA,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,CAAC,YAAY,CAAC,CAAC,MAAM,CAAC,MAAM,EACnE;QAAA,EAAE,SAAS,CAAC,CACb,CACH;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC;AAED,eAAe,GAAG,CAAC","sourcesContent":["/**\n * Tag component — compact label badge with optional icon slot and close button.\n * Colors come from colors.tag.purple / colors.tag.disabled via useTheme().\n */\nimport { Pressable, Text, View } from 'react-native';\nimport { X } from 'phosphor-react-native';\nimport { useTheme } from '../../context/ThemeContext';\nimport type { TagProps } from './Tag.types';\nimport { getBorderRadius, getSizeTokens, styles } from './Tag.styles';\n\nexport function Tag({\n label,\n size = 'md',\n shape = 'pill',\n disabled = false,\n color,\n textColor,\n iconLeft,\n onClose,\n}: TagProps) {\n const { colors, fontFamily } = useTheme();\n const tagColors = disabled ? colors.tag.disabled : colors.tag.purple;\n\n const sizeTokens = getSizeTokens(size);\n const borderRadius = getBorderRadius(size, shape);\n\n // Custom color prop overrides background; textColor overrides text/icon\n const resolvedBg = !disabled && color ? color : tagColors.background;\n const resolvedText = !disabled && textColor ? textColor : tagColors.text;\n const resolvedIcon = !disabled && textColor ? textColor : tagColors.icon;\n\n const containerStyle = {\n paddingHorizontal: sizeTokens.paddingHorizontal,\n paddingVertical: sizeTokens.paddingVertical,\n gap: sizeTokens.gap,\n borderRadius,\n backgroundColor: resolvedBg,\n };\n\n return (\n <View style={[styles.row, containerStyle]}>\n {iconLeft != null && (\n <View style={{ width: sizeTokens.iconSize, height: sizeTokens.iconSize, alignItems: 'center', justifyContent: 'center' }}>\n {iconLeft}\n </View>\n )}\n\n <Text style={[styles.label, { fontSize: sizeTokens.fontSize, lineHeight: sizeTokens.lineHeight, color: resolvedText, fontFamily }]} numberOfLines={1}>\n {label}\n </Text>\n\n {onClose != null && (\n <Pressable\n style={[styles.closeHitZone, { width: sizeTokens.closeHitZone, height: sizeTokens.closeHitZone }]}\n onPress={disabled ? undefined : onClose}\n accessibilityRole=\"button\"\n accessibilityLabel=\"Remove tag\"\n pointerEvents={disabled ? 'none' : 'auto'}\n >\n <X size={sizeTokens.closeSize} color={resolvedIcon} weight=\"bold\" />\n </Pressable>\n )}\n </View>\n );\n}\n\nexport default Tag;"]}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { TagSize, TagShape } from './Tag.types';
|
|
2
|
+
interface SizeTokens {
|
|
3
|
+
paddingHorizontal: number;
|
|
4
|
+
paddingVertical: number;
|
|
5
|
+
fontSize: number;
|
|
6
|
+
lineHeight: number;
|
|
7
|
+
iconSize: number;
|
|
8
|
+
closeSize: number;
|
|
9
|
+
closeHitZone: number;
|
|
10
|
+
gap: number;
|
|
11
|
+
}
|
|
12
|
+
export declare function getSizeTokens(size: TagSize): SizeTokens;
|
|
13
|
+
export declare function getBorderRadius(size: TagSize, shape: TagShape): number;
|
|
14
|
+
export declare const styles: {
|
|
15
|
+
row: {
|
|
16
|
+
flexDirection: "row";
|
|
17
|
+
alignItems: "center";
|
|
18
|
+
alignSelf: "flex-start";
|
|
19
|
+
borderWidth: number;
|
|
20
|
+
borderColor: string;
|
|
21
|
+
};
|
|
22
|
+
label: {
|
|
23
|
+
fontFamily: string;
|
|
24
|
+
fontWeight: "600";
|
|
25
|
+
flexShrink: number;
|
|
26
|
+
includeFontPadding: false;
|
|
27
|
+
textAlignVertical: "center";
|
|
28
|
+
};
|
|
29
|
+
closeHitZone: {
|
|
30
|
+
alignItems: "center";
|
|
31
|
+
justifyContent: "center";
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
export {};
|
|
35
|
+
//# sourceMappingURL=Tag.styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tag.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Tag/Tag.styles.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAIrD,UAAU,UAAU;IAClB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,eAAe,EAAE,MAAM,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;CACb;AAkBD,wBAAgB,aAAa,CAAC,IAAI,EAAE,OAAO,GAAG,UAAU,CAEvD;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,GAAG,MAAM,CAEtE;AAID,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;CAmBjB,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/** Layout tokens and static styles for the Tag component — colors come from useTheme() */
|
|
2
|
+
import { StyleSheet } from 'react-native';
|
|
3
|
+
const SIZE_TOKENS = {
|
|
4
|
+
xs: { paddingHorizontal: 6, paddingVertical: 4, fontSize: 10, lineHeight: 12, iconSize: 12, closeSize: 8, closeHitZone: 12, gap: 4 },
|
|
5
|
+
sm: { paddingHorizontal: 8, paddingVertical: 4, fontSize: 12, lineHeight: 14, iconSize: 14, closeSize: 10, closeHitZone: 14, gap: 4 },
|
|
6
|
+
md: { paddingHorizontal: 10, paddingVertical: 6, fontSize: 13, lineHeight: 16, iconSize: 16, closeSize: 12, closeHitZone: 16, gap: 4 },
|
|
7
|
+
lg: { paddingHorizontal: 12, paddingVertical: 8, fontSize: 14, lineHeight: 18, iconSize: 18, closeSize: 14, closeHitZone: 18, gap: 6 },
|
|
8
|
+
};
|
|
9
|
+
const BORDER_RADIUS_ROUNDED = {
|
|
10
|
+
xs: 2,
|
|
11
|
+
sm: 4,
|
|
12
|
+
md: 6,
|
|
13
|
+
lg: 8,
|
|
14
|
+
};
|
|
15
|
+
// --- Helpers ---
|
|
16
|
+
export function getSizeTokens(size) {
|
|
17
|
+
return SIZE_TOKENS[size];
|
|
18
|
+
}
|
|
19
|
+
export function getBorderRadius(size, shape) {
|
|
20
|
+
return shape === 'pill' ? 9999 : BORDER_RADIUS_ROUNDED[size];
|
|
21
|
+
}
|
|
22
|
+
// --- Static styles ---
|
|
23
|
+
export const styles = StyleSheet.create({
|
|
24
|
+
row: {
|
|
25
|
+
flexDirection: 'row',
|
|
26
|
+
alignItems: 'center',
|
|
27
|
+
alignSelf: 'flex-start',
|
|
28
|
+
borderWidth: 1,
|
|
29
|
+
borderColor: 'transparent',
|
|
30
|
+
},
|
|
31
|
+
label: {
|
|
32
|
+
fontFamily: 'Urbanist',
|
|
33
|
+
fontWeight: '600',
|
|
34
|
+
flexShrink: 1,
|
|
35
|
+
includeFontPadding: false,
|
|
36
|
+
textAlignVertical: 'center',
|
|
37
|
+
},
|
|
38
|
+
closeHitZone: {
|
|
39
|
+
alignItems: 'center',
|
|
40
|
+
justifyContent: 'center',
|
|
41
|
+
},
|
|
42
|
+
});
|
|
43
|
+
//# sourceMappingURL=Tag.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tag.styles.js","sourceRoot":"","sources":["../../../src/components/Tag/Tag.styles.ts"],"names":[],"mappings":"AAAA,0FAA0F;AAC1F,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAgB1C,MAAM,WAAW,GAAgC;IAC/C,EAAE,EAAE,EAAE,iBAAiB,EAAE,CAAC,EAAG,eAAe,EAAE,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,SAAS,EAAE,CAAC,EAAG,YAAY,EAAE,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE;IACtI,EAAE,EAAE,EAAE,iBAAiB,EAAE,CAAC,EAAG,eAAe,EAAE,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,YAAY,EAAE,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE;IACtI,EAAE,EAAE,EAAE,iBAAiB,EAAE,EAAE,EAAE,eAAe,EAAE,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,YAAY,EAAE,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE;IACtI,EAAE,EAAE,EAAE,iBAAiB,EAAE,EAAE,EAAE,eAAe,EAAE,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,YAAY,EAAE,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE;CACvI,CAAC;AAEF,MAAM,qBAAqB,GAA4B;IACrD,EAAE,EAAE,CAAC;IACL,EAAE,EAAE,CAAC;IACL,EAAE,EAAE,CAAC;IACL,EAAE,EAAE,CAAC;CACN,CAAC;AAEF,kBAAkB;AAElB,MAAM,UAAU,aAAa,CAAC,IAAa;IACzC,OAAO,WAAW,CAAC,IAAI,CAAC,CAAC;AAC3B,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,IAAa,EAAE,KAAe;IAC5D,OAAO,KAAK,KAAK,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC;AAC/D,CAAC;AAED,wBAAwB;AAExB,MAAM,CAAC,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IACtC,GAAG,EAAE;QACH,aAAa,EAAE,KAAK;QACpB,UAAU,EAAE,QAAQ;QACpB,SAAS,EAAE,YAAY;QACvB,WAAW,EAAE,CAAC;QACd,WAAW,EAAE,aAAa;KAC3B;IACD,KAAK,EAAE;QACL,UAAU,EAAE,UAAU;QACtB,UAAU,EAAE,KAAK;QACjB,UAAU,EAAE,CAAC;QACb,kBAAkB,EAAE,KAAK;QACzB,iBAAiB,EAAE,QAAQ;KAC5B;IACD,YAAY,EAAE;QACZ,UAAU,EAAE,QAAQ;QACpB,cAAc,EAAE,QAAQ;KACzB;CACF,CAAC,CAAC","sourcesContent":["/** Layout tokens and static styles for the Tag component — colors come from useTheme() */\nimport { StyleSheet } from 'react-native';\nimport type { TagSize, TagShape } from './Tag.types';\n\n// --- Size tokens ---\n\ninterface SizeTokens {\n paddingHorizontal: number;\n paddingVertical: number;\n fontSize: number;\n lineHeight: number;\n iconSize: number;\n closeSize: number;\n closeHitZone: number;\n gap: number;\n}\n\nconst SIZE_TOKENS: Record<TagSize, SizeTokens> = {\n xs: { paddingHorizontal: 6, paddingVertical: 4, fontSize: 10, lineHeight: 12, iconSize: 12, closeSize: 8, closeHitZone: 12, gap: 4 },\n sm: { paddingHorizontal: 8, paddingVertical: 4, fontSize: 12, lineHeight: 14, iconSize: 14, closeSize: 10, closeHitZone: 14, gap: 4 },\n md: { paddingHorizontal: 10, paddingVertical: 6, fontSize: 13, lineHeight: 16, iconSize: 16, closeSize: 12, closeHitZone: 16, gap: 4 },\n lg: { paddingHorizontal: 12, paddingVertical: 8, fontSize: 14, lineHeight: 18, iconSize: 18, closeSize: 14, closeHitZone: 18, gap: 6 },\n};\n\nconst BORDER_RADIUS_ROUNDED: Record<TagSize, number> = {\n xs: 2,\n sm: 4,\n md: 6,\n lg: 8,\n};\n\n// --- Helpers ---\n\nexport function getSizeTokens(size: TagSize): SizeTokens {\n return SIZE_TOKENS[size];\n}\n\nexport function getBorderRadius(size: TagSize, shape: TagShape): number {\n return shape === 'pill' ? 9999 : BORDER_RADIUS_ROUNDED[size];\n}\n\n// --- Static styles ---\n\nexport const styles = StyleSheet.create({\n row: {\n flexDirection: 'row',\n alignItems: 'center',\n alignSelf: 'flex-start',\n borderWidth: 1,\n borderColor: 'transparent',\n },\n label: {\n fontFamily: 'Urbanist',\n fontWeight: '600',\n flexShrink: 1,\n includeFontPadding: false,\n textAlignVertical: 'center',\n },\n closeHitZone: {\n alignItems: 'center',\n justifyContent: 'center',\n },\n});"]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** Types for the Tag component */
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
export type TagSize = 'xs' | 'sm' | 'md' | 'lg';
|
|
4
|
+
export type TagShape = 'pill' | 'rounded';
|
|
5
|
+
export interface TagProps {
|
|
6
|
+
/** Tag label text */
|
|
7
|
+
label: string;
|
|
8
|
+
/** Size */
|
|
9
|
+
size?: TagSize;
|
|
10
|
+
/** Shape — pill (9999px) or rounded */
|
|
11
|
+
shape?: TagShape;
|
|
12
|
+
/** Disabled state — uses colors.tag.disabled tokens */
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
/** Optional left slot — icon or avatar node */
|
|
15
|
+
iconLeft?: ReactNode;
|
|
16
|
+
/** Custom background color override (hex) — overrides colors.tag.purple.background */
|
|
17
|
+
color?: string;
|
|
18
|
+
/** Custom text/icon color override — used alongside color prop */
|
|
19
|
+
textColor?: string;
|
|
20
|
+
/** Called when close button is pressed — shows close button when defined */
|
|
21
|
+
onClose?: () => void;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=Tag.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tag.types.d.ts","sourceRoot":"","sources":["../../../src/components/Tag/Tag.types.ts"],"names":[],"mappings":"AAAA,kCAAkC;AAClC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,MAAM,OAAO,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAChD,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,SAAS,CAAC;AAC1C,MAAM,WAAW,QAAQ;IACvB,qBAAqB;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW;IACX,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,uCAAuC;IACvC,KAAK,CAAC,EAAE,QAAQ,CAAC;IACjB,uDAAuD;IACvD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,+CAA+C;IAC/C,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,sFAAsF;IACtF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kEAAkE;IAClE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,4EAA4E;IAC5E,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tag.types.js","sourceRoot":"","sources":["../../../src/components/Tag/Tag.types.ts"],"names":[],"mappings":"","sourcesContent":["/** Types for the Tag component */\nimport type { ReactNode } from 'react';\n\nexport type TagSize = 'xs' | 'sm' | 'md' | 'lg';\nexport type TagShape = 'pill' | 'rounded';\nexport interface TagProps {\n /** Tag label text */\n label: string;\n /** Size */\n size?: TagSize;\n /** Shape — pill (9999px) or rounded */\n shape?: TagShape;\n /** Disabled state — uses colors.tag.disabled tokens */\n disabled?: boolean;\n /** Optional left slot — icon or avatar node */\n iconLeft?: ReactNode;\n /** Custom background color override (hex) — overrides colors.tag.purple.background */\n color?: string;\n /** Custom text/icon color override — used alongside color prop */\n textColor?: string;\n /** Called when close button is pressed — shows close button when defined */\n onClose?: () => void;\n}"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Tag/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,YAAY,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Tag/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC","sourcesContent":["export { Tag } from './Tag';\nexport type { TagProps, TagSize, TagShape } from './Tag.types';"]}
|