@terreno/ui 0.0.1
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/LICENSE +203 -0
- package/README.md +160 -0
- package/dist/Accordion.d.ts +3 -0
- package/dist/Accordion.js +30 -0
- package/dist/Accordion.js.map +1 -0
- package/dist/ActionSheet.d.ts +169 -0
- package/dist/ActionSheet.js +637 -0
- package/dist/ActionSheet.js.map +1 -0
- package/dist/AddressField.d.ts +3 -0
- package/dist/AddressField.js +18 -0
- package/dist/AddressField.js.map +1 -0
- package/dist/Avatar.d.ts +3 -0
- package/dist/Avatar.js +189 -0
- package/dist/Avatar.js.map +1 -0
- package/dist/Badge.d.ts +3 -0
- package/dist/Badge.js +100 -0
- package/dist/Badge.js.map +1 -0
- package/dist/Banner.d.ts +4 -0
- package/dist/Banner.js +103 -0
- package/dist/Banner.js.map +1 -0
- package/dist/Body.d.ts +3 -0
- package/dist/Body.js +17 -0
- package/dist/Body.js.map +1 -0
- package/dist/BooleanField.d.ts +3 -0
- package/dist/BooleanField.js +89 -0
- package/dist/BooleanField.js.map +1 -0
- package/dist/Box.d.ts +3 -0
- package/dist/Box.js +289 -0
- package/dist/Box.js.map +1 -0
- package/dist/Button.d.ts +3 -0
- package/dist/Button.js +105 -0
- package/dist/Button.js.map +1 -0
- package/dist/Card.d.ts +2 -0
- package/dist/Card.js +18 -0
- package/dist/Card.js.map +1 -0
- package/dist/CheckBox.d.ts +3 -0
- package/dist/CheckBox.js +28 -0
- package/dist/CheckBox.js.map +1 -0
- package/dist/Common.d.ts +2325 -0
- package/dist/Common.js +47 -0
- package/dist/Common.js.map +1 -0
- package/dist/CommonIconTypes.d.ts +3 -0
- package/dist/CommonIconTypes.js +2 -0
- package/dist/CommonIconTypes.js.map +1 -0
- package/dist/Constants.d.ts +12685 -0
- package/dist/Constants.js +3310 -0
- package/dist/Constants.js.map +1 -0
- package/dist/CustomSelectField.d.ts +3 -0
- package/dist/CustomSelectField.js +59 -0
- package/dist/CustomSelectField.js.map +1 -0
- package/dist/DataTable.d.ts +3 -0
- package/dist/DataTable.js +190 -0
- package/dist/DataTable.js.map +1 -0
- package/dist/DateTimeActionSheet.d.ts +2 -0
- package/dist/DateTimeActionSheet.js +270 -0
- package/dist/DateTimeActionSheet.js.map +1 -0
- package/dist/DateTimeField.d.ts +3 -0
- package/dist/DateTimeField.js +514 -0
- package/dist/DateTimeField.js.map +1 -0
- package/dist/DateUtilities.d.ts +57 -0
- package/dist/DateUtilities.js +308 -0
- package/dist/DateUtilities.js.map +1 -0
- package/dist/DecimalRangeActionSheet.d.ts +6 -0
- package/dist/DecimalRangeActionSheet.js +45 -0
- package/dist/DecimalRangeActionSheet.js.map +1 -0
- package/dist/DismissButton.d.ts +3 -0
- package/dist/DismissButton.js +12 -0
- package/dist/DismissButton.js.map +1 -0
- package/dist/EmailField.d.ts +3 -0
- package/dist/EmailField.js +48 -0
- package/dist/EmailField.js.map +1 -0
- package/dist/EmojiSelector.d.ts +113 -0
- package/dist/EmojiSelector.js +322 -0
- package/dist/EmojiSelector.js.map +1 -0
- package/dist/ErrorBoundary.d.ts +19 -0
- package/dist/ErrorBoundary.js +30 -0
- package/dist/ErrorBoundary.js.map +1 -0
- package/dist/ErrorPage.d.ts +6 -0
- package/dist/ErrorPage.js +15 -0
- package/dist/ErrorPage.js.map +1 -0
- package/dist/Field.d.ts +3 -0
- package/dist/Field.js +80 -0
- package/dist/Field.js.map +1 -0
- package/dist/FlatList.d.ts +2 -0
- package/dist/FlatList.js +3 -0
- package/dist/FlatList.js.map +1 -0
- package/dist/Heading.d.ts +3 -0
- package/dist/Heading.js +43 -0
- package/dist/Heading.js.map +1 -0
- package/dist/HeightActionSheet.d.ts +11 -0
- package/dist/HeightActionSheet.js +46 -0
- package/dist/HeightActionSheet.js.map +1 -0
- package/dist/Hyperlink.d.ts +30 -0
- package/dist/Hyperlink.js +144 -0
- package/dist/Hyperlink.js.map +1 -0
- package/dist/Icon.d.ts +3 -0
- package/dist/Icon.js +15 -0
- package/dist/Icon.js.map +1 -0
- package/dist/IconButton.d.ts +3 -0
- package/dist/IconButton.js +111 -0
- package/dist/IconButton.js.map +1 -0
- package/dist/Image.d.ts +8 -0
- package/dist/Image.js +37 -0
- package/dist/Image.js.map +1 -0
- package/dist/ImageBackground.d.ts +10 -0
- package/dist/ImageBackground.js +9 -0
- package/dist/ImageBackground.js.map +1 -0
- package/dist/InfoModalIcon.d.ts +3 -0
- package/dist/InfoModalIcon.js +10 -0
- package/dist/InfoModalIcon.js.map +1 -0
- package/dist/InfoTooltipButton.d.ts +3 -0
- package/dist/InfoTooltipButton.js +6 -0
- package/dist/InfoTooltipButton.js.map +1 -0
- package/dist/Link.d.ts +3 -0
- package/dist/Link.js +10 -0
- package/dist/Link.js.map +1 -0
- package/dist/MarkdownView.d.ts +5 -0
- package/dist/MarkdownView.js +44 -0
- package/dist/MarkdownView.js.map +1 -0
- package/dist/MediaQuery.d.ts +4 -0
- package/dist/MediaQuery.js +52 -0
- package/dist/MediaQuery.js.map +1 -0
- package/dist/MobileAddressAutoComplete.d.ts +2 -0
- package/dist/MobileAddressAutoComplete.js +54 -0
- package/dist/MobileAddressAutoComplete.js.map +1 -0
- package/dist/Modal.d.ts +3 -0
- package/dist/Modal.js +127 -0
- package/dist/Modal.js.map +1 -0
- package/dist/ModalSheet.d.ts +6 -0
- package/dist/ModalSheet.js +42 -0
- package/dist/ModalSheet.js.map +1 -0
- package/dist/MultiselectField.d.ts +3 -0
- package/dist/MultiselectField.js +45 -0
- package/dist/MultiselectField.js.map +1 -0
- package/dist/NumberField.d.ts +3 -0
- package/dist/NumberField.js +60 -0
- package/dist/NumberField.js.map +1 -0
- package/dist/NumberPickerActionSheet.d.ts +7 -0
- package/dist/NumberPickerActionSheet.js +22 -0
- package/dist/NumberPickerActionSheet.js.map +1 -0
- package/dist/OpenAPIContext.d.ts +4 -0
- package/dist/OpenAPIContext.js +53 -0
- package/dist/OpenAPIContext.js.map +1 -0
- package/dist/Page.d.ts +7 -0
- package/dist/Page.js +24 -0
- package/dist/Page.js.map +1 -0
- package/dist/Pagination.d.ts +3 -0
- package/dist/Pagination.js +106 -0
- package/dist/Pagination.js.map +1 -0
- package/dist/PasswordField.d.ts +2 -0
- package/dist/PasswordField.js +6 -0
- package/dist/PasswordField.js.map +1 -0
- package/dist/Permissions.d.ts +2 -0
- package/dist/Permissions.js +35 -0
- package/dist/Permissions.js.map +1 -0
- package/dist/PhoneNumberField.d.ts +3 -0
- package/dist/PhoneNumberField.js +83 -0
- package/dist/PhoneNumberField.js.map +1 -0
- package/dist/PickerSelect.d.ts +46 -0
- package/dist/PickerSelect.js +306 -0
- package/dist/PickerSelect.js.map +1 -0
- package/dist/Radio.d.ts +3 -0
- package/dist/Radio.js +21 -0
- package/dist/Radio.js.map +1 -0
- package/dist/RadioField.d.ts +3 -0
- package/dist/RadioField.js +16 -0
- package/dist/RadioField.js.map +1 -0
- package/dist/ScrollView.d.ts +2 -0
- package/dist/ScrollView.js +3 -0
- package/dist/ScrollView.js.map +1 -0
- package/dist/SectionDivider.d.ts +2 -0
- package/dist/SectionDivider.js +12 -0
- package/dist/SectionDivider.js.map +1 -0
- package/dist/SegmentedControl.d.ts +3 -0
- package/dist/SegmentedControl.js +65 -0
- package/dist/SegmentedControl.js.map +1 -0
- package/dist/SelectBadge.d.ts +3 -0
- package/dist/SelectBadge.js +166 -0
- package/dist/SelectBadge.js.map +1 -0
- package/dist/SelectField.d.ts +3 -0
- package/dist/SelectField.js +16 -0
- package/dist/SelectField.js.map +1 -0
- package/dist/SideDrawer.d.ts +3 -0
- package/dist/SideDrawer.js +32 -0
- package/dist/SideDrawer.js.map +1 -0
- package/dist/Signature.d.ts +8 -0
- package/dist/Signature.js +21 -0
- package/dist/Signature.js.map +1 -0
- package/dist/Signature.native.d.ts +8 -0
- package/dist/Signature.native.js +26 -0
- package/dist/Signature.native.js.map +1 -0
- package/dist/SignatureField.d.ts +3 -0
- package/dist/SignatureField.js +42 -0
- package/dist/SignatureField.js.map +1 -0
- package/dist/Slider.d.ts +3 -0
- package/dist/Slider.js +78 -0
- package/dist/Slider.js.map +1 -0
- package/dist/Spinner.d.ts +3 -0
- package/dist/Spinner.js +33 -0
- package/dist/Spinner.js.map +1 -0
- package/dist/SplitPage.d.ts +2 -0
- package/dist/SplitPage.js +139 -0
- package/dist/SplitPage.js.map +1 -0
- package/dist/SplitPage.native.d.ts +2 -0
- package/dist/SplitPage.native.js +75 -0
- package/dist/SplitPage.native.js.map +1 -0
- package/dist/TapToEdit.d.ts +4 -0
- package/dist/TapToEdit.js +170 -0
- package/dist/TapToEdit.js.map +1 -0
- package/dist/TerrenoProvider.d.ts +6 -0
- package/dist/TerrenoProvider.js +10 -0
- package/dist/TerrenoProvider.js.map +1 -0
- package/dist/Text.d.ts +3 -0
- package/dist/Text.js +95 -0
- package/dist/Text.js.map +1 -0
- package/dist/TextArea.d.ts +3 -0
- package/dist/TextArea.js +6 -0
- package/dist/TextArea.js.map +1 -0
- package/dist/TextField.d.ts +3 -0
- package/dist/TextField.js +144 -0
- package/dist/TextField.js.map +1 -0
- package/dist/TextFieldNumberActionSheet.d.ts +7 -0
- package/dist/TextFieldNumberActionSheet.js +20 -0
- package/dist/TextFieldNumberActionSheet.js.map +1 -0
- package/dist/Theme.d.ts +96 -0
- package/dist/Theme.js +213 -0
- package/dist/Theme.js.map +1 -0
- package/dist/TimezonePicker.d.ts +11 -0
- package/dist/TimezonePicker.js +27 -0
- package/dist/TimezonePicker.js.map +1 -0
- package/dist/Toast.d.ts +23 -0
- package/dist/Toast.js +157 -0
- package/dist/Toast.js.map +1 -0
- package/dist/Tooltip.d.ts +3 -0
- package/dist/Tooltip.js +289 -0
- package/dist/Tooltip.js.map +1 -0
- package/dist/UnifiedAddressAutoComplete.d.ts +2 -0
- package/dist/UnifiedAddressAutoComplete.js +23 -0
- package/dist/UnifiedAddressAutoComplete.js.map +1 -0
- package/dist/Unifier.d.ts +43 -0
- package/dist/Unifier.js +154 -0
- package/dist/Unifier.js.map +1 -0
- package/dist/Utilities.d.ts +56 -0
- package/dist/Utilities.js +193 -0
- package/dist/Utilities.js.map +1 -0
- package/dist/WebAddressAutocomplete.d.ts +3 -0
- package/dist/WebAddressAutocomplete.js +61 -0
- package/dist/WebAddressAutocomplete.js.map +1 -0
- package/dist/fieldElements/FieldError.d.ts +6 -0
- package/dist/fieldElements/FieldError.js +9 -0
- package/dist/fieldElements/FieldError.js.map +1 -0
- package/dist/fieldElements/FieldHelperText.d.ts +6 -0
- package/dist/fieldElements/FieldHelperText.js +8 -0
- package/dist/fieldElements/FieldHelperText.js.map +1 -0
- package/dist/fieldElements/FieldTitle.d.ts +6 -0
- package/dist/fieldElements/FieldTitle.js +16 -0
- package/dist/fieldElements/FieldTitle.js.map +1 -0
- package/dist/fieldElements/index.d.ts +3 -0
- package/dist/fieldElements/index.js +4 -0
- package/dist/fieldElements/index.js.map +1 -0
- package/dist/icons/MobileIcon.d.ts +2 -0
- package/dist/icons/MobileIcon.js +18 -0
- package/dist/icons/MobileIcon.js.map +1 -0
- package/dist/icons/OfflineIcon.d.ts +2 -0
- package/dist/icons/OfflineIcon.js +18 -0
- package/dist/icons/OfflineIcon.js.map +1 -0
- package/dist/icons/OnlineIcon.d.ts +2 -0
- package/dist/icons/OnlineIcon.js +19 -0
- package/dist/icons/OnlineIcon.js.map +1 -0
- package/dist/icons/OutOfficeIcon.d.ts +2 -0
- package/dist/icons/OutOfficeIcon.js +18 -0
- package/dist/icons/OutOfficeIcon.js.map +1 -0
- package/dist/icons/index.d.ts +4 -0
- package/dist/icons/index.js +5 -0
- package/dist/icons/index.js.map +1 -0
- package/dist/index.d.ts +1328 -0
- package/dist/index.js +89 -0
- package/dist/index.js.map +1 -0
- package/dist/table/Table.d.ts +3 -0
- package/dist/table/Table.js +53 -0
- package/dist/table/Table.js.map +1 -0
- package/dist/table/TableBadge.d.ts +6 -0
- package/dist/table/TableBadge.js +23 -0
- package/dist/table/TableBadge.js.map +1 -0
- package/dist/table/TableBoolean.d.ts +6 -0
- package/dist/table/TableBoolean.js +37 -0
- package/dist/table/TableBoolean.js.map +1 -0
- package/dist/table/TableDate.d.ts +3 -0
- package/dist/table/TableDate.js +27 -0
- package/dist/table/TableDate.js.map +1 -0
- package/dist/table/TableHeader.d.ts +6 -0
- package/dist/table/TableHeader.js +10 -0
- package/dist/table/TableHeader.js.map +1 -0
- package/dist/table/TableHeaderCell.d.ts +6 -0
- package/dist/table/TableHeaderCell.js +54 -0
- package/dist/table/TableHeaderCell.js.map +1 -0
- package/dist/table/TableIconButton.d.ts +3 -0
- package/dist/table/TableIconButton.js +39 -0
- package/dist/table/TableIconButton.js.map +1 -0
- package/dist/table/TableNumber.d.ts +3 -0
- package/dist/table/TableNumber.js +18 -0
- package/dist/table/TableNumber.js.map +1 -0
- package/dist/table/TableRow.d.ts +6 -0
- package/dist/table/TableRow.js +22 -0
- package/dist/table/TableRow.js.map +1 -0
- package/dist/table/TableText.d.ts +3 -0
- package/dist/table/TableText.js +18 -0
- package/dist/table/TableText.js.map +1 -0
- package/dist/table/TableTitle.d.ts +3 -0
- package/dist/table/TableTitle.js +21 -0
- package/dist/table/TableTitle.js.map +1 -0
- package/dist/table/tableContext.d.ts +5 -0
- package/dist/table/tableContext.js +38 -0
- package/dist/table/tableContext.js.map +1 -0
- package/dist/useStoredState.d.ts +1 -0
- package/dist/useStoredState.js +49 -0
- package/dist/useStoredState.js.map +1 -0
- package/package.json +123 -0
- package/src/Accordion.test.tsx +104 -0
- package/src/Accordion.tsx +81 -0
- package/src/ActionSheet.tsx +881 -0
- package/src/AddressField.test.tsx +120 -0
- package/src/AddressField.tsx +122 -0
- package/src/Avatar.test.tsx +163 -0
- package/src/Avatar.tsx +298 -0
- package/src/Badge.test.tsx +116 -0
- package/src/Badge.tsx +136 -0
- package/src/Banner.tsx +200 -0
- package/src/Body.tsx +34 -0
- package/src/BooleanField.tsx +141 -0
- package/src/Box.test.tsx +662 -0
- package/src/Box.tsx +368 -0
- package/src/Button.tsx +196 -0
- package/src/Card.tsx +19 -0
- package/src/CheckBox.tsx +45 -0
- package/src/Common.ts +2787 -0
- package/src/CommonIconTypes.ts +2030 -0
- package/src/Constants.ts +3311 -0
- package/src/CustomSelectField.tsx +115 -0
- package/src/DataTable.tsx +674 -0
- package/src/DateTimeActionSheet.tsx +559 -0
- package/src/DateTimeField.test.tsx +393 -0
- package/src/DateTimeField.tsx +777 -0
- package/src/DateUtilities.test.ts +440 -0
- package/src/DateUtilities.tsx +370 -0
- package/src/DecimalRangeActionSheet.tsx +85 -0
- package/src/DismissButton.tsx +31 -0
- package/src/EmailField.tsx +66 -0
- package/src/EmojiSelector.test.tsx +61 -0
- package/src/EmojiSelector.tsx +510 -0
- package/src/ErrorBoundary.tsx +37 -0
- package/src/ErrorPage.tsx +41 -0
- package/src/Field.tsx +101 -0
- package/src/FlatList.tsx +2 -0
- package/src/Heading.tsx +66 -0
- package/src/HeightActionSheet.tsx +91 -0
- package/src/Hyperlink.tsx +179 -0
- package/src/Icon.tsx +36 -0
- package/src/IconButton.tsx +217 -0
- package/src/Image.tsx +51 -0
- package/src/ImageBackground.tsx +14 -0
- package/src/InfoModalIcon.tsx +42 -0
- package/src/InfoTooltipButton.tsx +16 -0
- package/src/Link.tsx +22 -0
- package/src/MarkdownView.tsx +67 -0
- package/src/MediaQuery.ts +46 -0
- package/src/MobileAddressAutoComplete.tsx +126 -0
- package/src/Modal.tsx +300 -0
- package/src/ModalSheet.tsx +58 -0
- package/src/MultiselectField.tsx +112 -0
- package/src/NumberField.tsx +67 -0
- package/src/NumberPickerActionSheet.tsx +51 -0
- package/src/OpenAPIContext.tsx +74 -0
- package/src/Page.tsx +105 -0
- package/src/Pagination.tsx +169 -0
- package/src/PasswordField.tsx +7 -0
- package/src/Permissions.ts +43 -0
- package/src/PhoneNumberField.tsx +109 -0
- package/src/PickerSelect.tsx +571 -0
- package/src/Radio.tsx +33 -0
- package/src/RadioField.tsx +43 -0
- package/src/ScrollView.tsx +2 -0
- package/src/SectionDivider.tsx +18 -0
- package/src/SegmentedControl.tsx +126 -0
- package/src/SelectBadge.tsx +280 -0
- package/src/SelectField.tsx +41 -0
- package/src/SideDrawer.tsx +56 -0
- package/src/Signature.native.tsx +57 -0
- package/src/Signature.tsx +44 -0
- package/src/SignatureField.tsx +92 -0
- package/src/Slider.tsx +199 -0
- package/src/Spinner.tsx +35 -0
- package/src/SplitPage.native.tsx +163 -0
- package/src/SplitPage.tsx +304 -0
- package/src/TapToEdit.tsx +292 -0
- package/src/TerrenoProvider.tsx +31 -0
- package/src/Text.tsx +123 -0
- package/src/TextArea.test.tsx +255 -0
- package/src/TextArea.tsx +8 -0
- package/src/TextField.test.tsx +487 -0
- package/src/TextField.tsx +260 -0
- package/src/TextFieldNumberActionSheet.tsx +46 -0
- package/src/Theme.tsx +248 -0
- package/src/TimezonePicker.tsx +45 -0
- package/src/Toast.tsx +234 -0
- package/src/Tooltip.tsx +407 -0
- package/src/UnifiedAddressAutoComplete.tsx +66 -0
- package/src/Unifier.ts +172 -0
- package/src/Utilities.tsx +329 -0
- package/src/WebAddressAutocomplete.tsx +84 -0
- package/src/__snapshots__/Accordion.test.tsx.snap +126 -0
- package/src/__snapshots__/AddressField.test.tsx.snap +1197 -0
- package/src/__snapshots__/Avatar.test.tsx.snap +57 -0
- package/src/__snapshots__/Badge.test.tsx.snap +55 -0
- package/src/__snapshots__/Box.test.tsx.snap +162 -0
- package/src/__snapshots__/EmojiSelector.test.tsx.snap +422 -0
- package/src/__snapshots__/TextArea.test.tsx.snap +521 -0
- package/src/__snapshots__/TextField.test.tsx.snap +569 -0
- package/src/bunSetup.ts +1235 -0
- package/src/fieldElements/FieldError.tsx +24 -0
- package/src/fieldElements/FieldHelperText.tsx +20 -0
- package/src/fieldElements/FieldTitle.tsx +31 -0
- package/src/fieldElements/index.tsx +3 -0
- package/src/icons/MobileIcon.tsx +40 -0
- package/src/icons/OfflineIcon.tsx +37 -0
- package/src/icons/OnlineIcon.tsx +39 -0
- package/src/icons/OutOfficeIcon.tsx +36 -0
- package/src/icons/index.ts +4 -0
- package/src/index.tsx +1375 -0
- package/src/polyfill.d.ts +11 -0
- package/src/table/Table.tsx +109 -0
- package/src/table/TableBadge.tsx +46 -0
- package/src/table/TableBoolean.tsx +70 -0
- package/src/table/TableDate.tsx +38 -0
- package/src/table/TableHeader.tsx +20 -0
- package/src/table/TableHeaderCell.tsx +94 -0
- package/src/table/TableIconButton.tsx +61 -0
- package/src/table/TableNumber.tsx +29 -0
- package/src/table/TableRow.tsx +67 -0
- package/src/table/TableText.tsx +29 -0
- package/src/table/TableTitle.tsx +31 -0
- package/src/table/tableContext.tsx +67 -0
- package/src/test-utils.tsx +27 -0
- package/src/types/react-native-swiper-flatlist.d.ts +56 -0
- package/src/useStoredState.test.tsx +143 -0
- package/src/useStoredState.ts +56 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2018 Pinterest Inc.
|
|
190
|
+
Copyright 2020 Josh Gachnang
|
|
191
|
+
Copyright 2022 Flourish Health Inc.
|
|
192
|
+
|
|
193
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
194
|
+
you may not use this file except in compliance with the License.
|
|
195
|
+
You may obtain a copy of the License at
|
|
196
|
+
|
|
197
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
198
|
+
|
|
199
|
+
Unless required by applicable law or agreed to in writing, software
|
|
200
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
201
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
202
|
+
See the License for the specific language governing permissions and
|
|
203
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
# @terreno/ui
|
|
2
|
+
|
|
3
|
+
[](https://app.netlify.com/sites/terreno-ui/deploys)
|
|
4
|
+
|
|
5
|
+
## Why Terreno UI?
|
|
6
|
+
Terreno UI provides a consistent UI for React Native and React Native Web,
|
|
7
|
+
support iOS, Android, and Web all in one simple repo. It has
|
|
8
|
+
theming support and is primarily designed for Expo. It provides an abstraction
|
|
9
|
+
layer over React Native components, making it easier to build responsive
|
|
10
|
+
applications that work across all platforms.
|
|
11
|
+
For example, instead of using ```<div>``` and ```<View>```, you use ```<Box>``` , which
|
|
12
|
+
translates to a flexbox-first layout system.
|
|
13
|
+
|
|
14
|
+
Ideal for designers and developers who value clarity, Terreno UI offers a
|
|
15
|
+
framework for efficient and harmonious designs. Our vision extends beyond a
|
|
16
|
+
User Interface Library to a User Experience Library, including common UX
|
|
17
|
+
patterns like login flows, allowing you to focus on unique aspects of your app.
|
|
18
|
+
|
|
19
|
+
Join us in embracing a design philosophy that prioritizes clarity and
|
|
20
|
+
coherence. With Terreno UI, build stunning applications with seamless
|
|
21
|
+
user experiences across all three platforms is a breeze.
|
|
22
|
+
|
|
23
|
+
## Our Philosophy
|
|
24
|
+
Terreno UI streamlines design by reducing unnecessary choices, allowing you to
|
|
25
|
+
create beautiful, functional interfaces without distraction. For example,
|
|
26
|
+
buttons come in a limited set of colors, with no options for custom colors,
|
|
27
|
+
ensuring consistency that you decide upfront, rather than with each new
|
|
28
|
+
feature.
|
|
29
|
+
|
|
30
|
+
## Consistent Layouts
|
|
31
|
+
Our layout system, built around the Box component and other layout elements,
|
|
32
|
+
ensures flexible yet uniform design structures. It's is flexbox-first across
|
|
33
|
+
iOS, Android, and Web, making it easy to create responsive designs that work
|
|
34
|
+
across all platforms.
|
|
35
|
+
|
|
36
|
+
## Separated Interface Elements
|
|
37
|
+
Terreno UI and interaction components follow a set of guidelines for consistency.
|
|
38
|
+
For instance, you can't add a margin to Text. Instead, you wrap the Text in a
|
|
39
|
+
Box and add the margin to the Box, maintaining a clean and predictable design
|
|
40
|
+
language that separates layout elements from interface and interaction elements.
|
|
41
|
+
|
|
42
|
+
## Accessibility
|
|
43
|
+
Accessibility is a core principle of Terreno UI. Our components are designed to
|
|
44
|
+
be fully accessible out of the box, following best practices to ensure that
|
|
45
|
+
all users, including those with disabilities, have a seamless experience. Our
|
|
46
|
+
lint rules and required accessibility props will help you build more accessible
|
|
47
|
+
applications by default.
|
|
48
|
+
|
|
49
|
+
## Developer Experience
|
|
50
|
+
Terreno UI is designed with a TypeScript-first approach, prioritizing an
|
|
51
|
+
excellent developer experience. Our consistent API across all components
|
|
52
|
+
ensures ease of learning and use. This makes it simple to design screens
|
|
53
|
+
that work seamlessly across web and mobile, with built-in support for
|
|
54
|
+
differentiating based on screen size and format.
|
|
55
|
+
|
|
56
|
+
Check out the demo app for easily seeing how the UIs work in iOS/Android/Web
|
|
57
|
+
in apps/demo.
|
|
58
|
+
|
|
59
|
+
You can see the [web demo here](https://terreno-ui.netlify.app)
|
|
60
|
+
|
|
61
|
+
# Installation
|
|
62
|
+
|
|
63
|
+
yarn add @terreno/ui
|
|
64
|
+
|
|
65
|
+
# Usage
|
|
66
|
+
|
|
67
|
+
You must wrap your app in a TerrenoProvider to use the theme, Toasts, and other features.
|
|
68
|
+
|
|
69
|
+
import { TerrenoProvider } from '@terreno/ui';
|
|
70
|
+
|
|
71
|
+
const AppRoot = (): ReactElement => {
|
|
72
|
+
return (
|
|
73
|
+
<SafeAreaProvider>
|
|
74
|
+
<TerrenoProvider>
|
|
75
|
+
<App />
|
|
76
|
+
</TerrenoProvider>
|
|
77
|
+
</SafeAreaProvider>
|
|
78
|
+
);
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
# Cursor Rules
|
|
82
|
+
If you use Cursor or compatible tools, use the rules in .cursor/rules/terreno-ui-usage.md to
|
|
83
|
+
help generate code that uses Terreno UI.
|
|
84
|
+
|
|
85
|
+
## Dev
|
|
86
|
+
|
|
87
|
+
# Install dependencies
|
|
88
|
+
yarn install
|
|
89
|
+
|
|
90
|
+
# Initial build (including type generation)
|
|
91
|
+
yarn build
|
|
92
|
+
|
|
93
|
+
# Build the UI continuously
|
|
94
|
+
yarn watch
|
|
95
|
+
|
|
96
|
+
# In a separate window, run one of the following to run the demo app:
|
|
97
|
+
yarn web
|
|
98
|
+
yarn ios
|
|
99
|
+
yarn android
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
## Dev with other projects
|
|
103
|
+
|
|
104
|
+
If you need to test your changes in another project, you can use this handy bash function:
|
|
105
|
+
|
|
106
|
+
# sync ui to different app
|
|
107
|
+
syncui() {
|
|
108
|
+
cd <PATH>/terreno/packages/ui && yarn build && rsync -avp <PATH>/terreno/packages/ui/dist/* <PATH>/app/node_modules/@terreno/ui/dist/
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
Update the paths to match your project directories. This will build and pack up @terreno/ui like it is being
|
|
112
|
+
send to NPM, then install it from the created tarball in your app. `yarn link` is also an option but React
|
|
113
|
+
Native requires extra configuration to support symlinks.
|
|
114
|
+
|
|
115
|
+
## Releasing
|
|
116
|
+
|
|
117
|
+
Releases are typically done after each pull request is merged to keep the package up-to-date.
|
|
118
|
+
|
|
119
|
+
### Publishing a new version
|
|
120
|
+
|
|
121
|
+
1. Go to the [GitHub releases page](https://github.com/FlourishHealth/terreno/releases)
|
|
122
|
+
2. Click "Draft a new release"
|
|
123
|
+
3. Create a new tag with a version number (usually a minor version bump, e.g., `1.11.0`)
|
|
124
|
+
4. Use the "Generate release notes" button to auto-populate the description
|
|
125
|
+
5. Click "Publish release"
|
|
126
|
+
|
|
127
|
+
### What happens automatically
|
|
128
|
+
|
|
129
|
+
After publishing the release, the following happens automatically via `.github/workflows/ui-publish.yml`:
|
|
130
|
+
|
|
131
|
+
1. The package version in `package.json` is updated to match your release tag
|
|
132
|
+
2. The package is built and published to NPM (takes a couple of minutes)
|
|
133
|
+
3. A pull request is automatically created with the version bump
|
|
134
|
+
4. You'll receive a Slack notification when the release is complete
|
|
135
|
+
|
|
136
|
+
### Approving the version bump PR
|
|
137
|
+
|
|
138
|
+
After the release is published, you'll get a PR that updates the version in `package.json`. You can approve and merge this PR yourself.
|
|
139
|
+
|
|
140
|
+
### Using the new version in your app
|
|
141
|
+
|
|
142
|
+
To use your newly released version of @terreno/ui in your app:
|
|
143
|
+
|
|
144
|
+
1. Navigate to your repository
|
|
145
|
+
2. Update the `@terreno/ui` version in `app/package.json`:
|
|
146
|
+
```json
|
|
147
|
+
"@terreno/ui: "1.11.0"
|
|
148
|
+
```
|
|
149
|
+
3. Run `bun install` in the `app/` directory
|
|
150
|
+
4. Create a PR with this change (requires team member approval)
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
## Upgrading dependencies
|
|
154
|
+
|
|
155
|
+
To upgrade to the latest Expo and upgrade the related dependencies:
|
|
156
|
+
|
|
157
|
+
yarn upgrades
|
|
158
|
+
|
|
159
|
+
This will upgrade Expo, upgrade Expo packages, sync the changes from apps/demo to packages/ui,
|
|
160
|
+
and update yarn.lock.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import FontAwesome6 from "@expo/vector-icons/FontAwesome6";
|
|
3
|
+
import { useEffect, useState } from "react";
|
|
4
|
+
import { Pressable, View } from "react-native";
|
|
5
|
+
import { Heading } from "./Heading";
|
|
6
|
+
import { InfoModalIcon } from "./InfoModalIcon";
|
|
7
|
+
import { Text } from "./Text";
|
|
8
|
+
import { useTheme } from "./Theme";
|
|
9
|
+
export const Accordion = ({ children, isCollapsed = false, title, subtitle, includeInfoModal = false, infoModalChildren, infoModalSubtitle, infoModalText, infoModalTitle, onToggle, }) => {
|
|
10
|
+
const { theme } = useTheme();
|
|
11
|
+
const [collapsed, setCollapsed] = useState(false);
|
|
12
|
+
// The external collapse state should override the internal collapse state.
|
|
13
|
+
useEffect(() => {
|
|
14
|
+
setCollapsed(isCollapsed);
|
|
15
|
+
}, [isCollapsed]);
|
|
16
|
+
return (_jsxs(View, { style: {
|
|
17
|
+
borderBottomColor: theme.border.default,
|
|
18
|
+
borderBottomWidth: 2,
|
|
19
|
+
borderTopColor: theme.border.default,
|
|
20
|
+
borderTopWidth: 2,
|
|
21
|
+
padding: 16,
|
|
22
|
+
width: "100%",
|
|
23
|
+
}, children: [_jsxs(View, { style: { alignItems: "center", flexDirection: "row", justifyContent: "space-between" }, children: [_jsxs(View, { style: { flexDirection: "column", gap: 4 }, children: [_jsxs(View, { style: { alignItems: "center", flexDirection: "row" }, children: [_jsx(Heading, { children: title }), includeInfoModal && infoModalTitle && (_jsx(InfoModalIcon, { infoModalChildren: infoModalChildren, infoModalSubtitle: infoModalSubtitle, infoModalText: infoModalText, infoModalTitle: infoModalTitle }))] }), subtitle && _jsx(Text, { children: subtitle })] }), _jsx(View, { children: _jsx(Pressable, { "aria-role": "button", hitSlop: { bottom: 20, left: 20, right: 20, top: 20 }, onPress: () => {
|
|
24
|
+
setCollapsed(!collapsed);
|
|
25
|
+
if (onToggle) {
|
|
26
|
+
onToggle(!collapsed);
|
|
27
|
+
}
|
|
28
|
+
}, testID: "accordion-toggle", children: _jsx(FontAwesome6, { color: theme.text.link, name: collapsed ? "chevron-down" : "chevron-up", selectable: undefined, size: 16 }) }) })] }), collapsed ? null : _jsx(View, { style: { marginTop: 8 }, children: children })] }));
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=Accordion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Accordion.js","sourceRoot":"","sources":["../src/Accordion.tsx"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import type React from "react";
|
|
2
|
+
import { Component } from "react";
|
|
3
|
+
import { Animated, type EmitterSubscription, type KeyboardEvent, type LayoutChangeEvent, type NativeScrollEvent, type NativeSyntheticEvent } from "react-native";
|
|
4
|
+
import type { ActionSheetProps } from "./Common";
|
|
5
|
+
export declare const styles: {
|
|
6
|
+
container: {
|
|
7
|
+
alignSelf: "center";
|
|
8
|
+
backgroundColor: string;
|
|
9
|
+
width: "100%";
|
|
10
|
+
};
|
|
11
|
+
indicator: {
|
|
12
|
+
alignSelf: "center";
|
|
13
|
+
backgroundColor: string;
|
|
14
|
+
borderRadius: number;
|
|
15
|
+
height: number;
|
|
16
|
+
marginVertical: number;
|
|
17
|
+
width: number;
|
|
18
|
+
};
|
|
19
|
+
parentContainer: {
|
|
20
|
+
alignItems: "center";
|
|
21
|
+
height: "100%";
|
|
22
|
+
justifyContent: "center";
|
|
23
|
+
width: "100%";
|
|
24
|
+
};
|
|
25
|
+
safearea: {
|
|
26
|
+
left: number;
|
|
27
|
+
position: "absolute";
|
|
28
|
+
top: number;
|
|
29
|
+
};
|
|
30
|
+
scrollView: {
|
|
31
|
+
backgroundColor: string;
|
|
32
|
+
height: "100%";
|
|
33
|
+
width: "100%";
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
export declare function getDeviceHeight(statusBarTranslucent: boolean | undefined): number;
|
|
37
|
+
export declare const getElevation: (elevation?: number) => {
|
|
38
|
+
boxShadow?: undefined;
|
|
39
|
+
elevation?: undefined;
|
|
40
|
+
} | {
|
|
41
|
+
boxShadow: string;
|
|
42
|
+
elevation: number;
|
|
43
|
+
};
|
|
44
|
+
export declare const SUPPORTED_ORIENTATIONS: ("portrait" | "portrait-upside-down" | "landscape" | "landscape-left" | "landscape-right")[];
|
|
45
|
+
export declare const waitAsync: (ms: number) => Promise<null>;
|
|
46
|
+
type State = {
|
|
47
|
+
modalVisible: boolean;
|
|
48
|
+
scrollable: boolean;
|
|
49
|
+
layoutHasCalled: boolean;
|
|
50
|
+
keyboard: boolean;
|
|
51
|
+
deviceHeight: number;
|
|
52
|
+
deviceWidth: number;
|
|
53
|
+
portrait: boolean;
|
|
54
|
+
safeAreaInnerHeight: number;
|
|
55
|
+
paddingTop: number;
|
|
56
|
+
};
|
|
57
|
+
declare const defaultProps: {
|
|
58
|
+
animated: boolean;
|
|
59
|
+
bottomOffset: number;
|
|
60
|
+
bounciness: number;
|
|
61
|
+
closable: boolean;
|
|
62
|
+
closeAnimationDuration: number;
|
|
63
|
+
closeOnPressBack: boolean;
|
|
64
|
+
closeOnTouchBackdrop: boolean;
|
|
65
|
+
defaultOverlayOpacity: number;
|
|
66
|
+
delayActionSheetDrawTime: number;
|
|
67
|
+
drawUnderStatusBar: boolean;
|
|
68
|
+
elevation: number;
|
|
69
|
+
extraScroll: number;
|
|
70
|
+
gestureEnabled: boolean;
|
|
71
|
+
indicatorColor: string;
|
|
72
|
+
initialOffsetFromBottom: number;
|
|
73
|
+
keyboardMode: string;
|
|
74
|
+
openAnimationSpeed: number;
|
|
75
|
+
overlayColor: string;
|
|
76
|
+
springOffset: number;
|
|
77
|
+
statusBarTranslucent: boolean;
|
|
78
|
+
};
|
|
79
|
+
type Props = Partial<typeof defaultProps> & ActionSheetProps;
|
|
80
|
+
export declare class ActionSheet extends Component<Props, State, any> {
|
|
81
|
+
static defaultProps: {
|
|
82
|
+
animated: boolean;
|
|
83
|
+
bottomOffset: number;
|
|
84
|
+
bounciness: number;
|
|
85
|
+
closable: boolean;
|
|
86
|
+
closeAnimationDuration: number;
|
|
87
|
+
closeOnPressBack: boolean;
|
|
88
|
+
closeOnTouchBackdrop: boolean;
|
|
89
|
+
defaultOverlayOpacity: number;
|
|
90
|
+
delayActionSheetDrawTime: number;
|
|
91
|
+
drawUnderStatusBar: boolean;
|
|
92
|
+
elevation: number;
|
|
93
|
+
extraScroll: number;
|
|
94
|
+
gestureEnabled: boolean;
|
|
95
|
+
indicatorColor: string;
|
|
96
|
+
initialOffsetFromBottom: number;
|
|
97
|
+
keyboardMode: string;
|
|
98
|
+
openAnimationSpeed: number;
|
|
99
|
+
overlayColor: string;
|
|
100
|
+
springOffset: number;
|
|
101
|
+
statusBarTranslucent: boolean;
|
|
102
|
+
};
|
|
103
|
+
actionSheetHeight: number;
|
|
104
|
+
keyboardDidShowListener: EmitterSubscription | null;
|
|
105
|
+
keyboardDidHideListener: EmitterSubscription | null;
|
|
106
|
+
prevScroll: number;
|
|
107
|
+
timeout: any | null;
|
|
108
|
+
offsetY: number;
|
|
109
|
+
currentOffsetFromBottom: number;
|
|
110
|
+
scrollAnimationEndValue: number;
|
|
111
|
+
hasBounced: boolean;
|
|
112
|
+
layoutHasCalled: boolean;
|
|
113
|
+
isClosing: boolean;
|
|
114
|
+
isRecoiling: boolean;
|
|
115
|
+
isReachedTop: boolean;
|
|
116
|
+
deviceLayoutCalled: boolean;
|
|
117
|
+
scrollViewRef: React.RefObject<any>;
|
|
118
|
+
safeAreaViewRef: React.RefObject<any>;
|
|
119
|
+
transformValue: Animated.Value;
|
|
120
|
+
opacityValue: Animated.Value;
|
|
121
|
+
borderRadius: Animated.Value;
|
|
122
|
+
underlayTranslateY: Animated.Value;
|
|
123
|
+
underlayScale: Animated.Value;
|
|
124
|
+
indicatorTranslateY: Animated.Value;
|
|
125
|
+
constructor(props: ActionSheetProps);
|
|
126
|
+
/**
|
|
127
|
+
* Snap ActionSheet to Offset
|
|
128
|
+
*/
|
|
129
|
+
snapToOffset: (offset: number) => void;
|
|
130
|
+
show: () => void;
|
|
131
|
+
hide: () => void;
|
|
132
|
+
/**
|
|
133
|
+
* Open/Close the ActionSheet
|
|
134
|
+
*/
|
|
135
|
+
setModalVisible: (visible: boolean) => void;
|
|
136
|
+
_hideAnimation(): void;
|
|
137
|
+
_hideModal: () => void;
|
|
138
|
+
measure: () => Promise<number>;
|
|
139
|
+
_showModal: (event: LayoutChangeEvent) => Promise<void>;
|
|
140
|
+
_openAnimation: (scrollOffset: number) => void;
|
|
141
|
+
_onScrollBegin: () => Promise<void>;
|
|
142
|
+
_onScrollBeginDrag: (event: NativeSyntheticEvent<NativeScrollEvent>) => Promise<void>;
|
|
143
|
+
_applyHeightLimiter(): void;
|
|
144
|
+
_onScrollEnd: (event: NativeSyntheticEvent<NativeScrollEvent>) => Promise<void>;
|
|
145
|
+
updateActionSheetPosition(scrollPosition: number): void;
|
|
146
|
+
_returnToPrevScrollPosition(height: number): void;
|
|
147
|
+
_scrollTo: (y: number, animated?: boolean) => void;
|
|
148
|
+
_onTouchMove: () => void;
|
|
149
|
+
_onTouchStart: () => void;
|
|
150
|
+
_onTouchEnd: () => void;
|
|
151
|
+
_onScroll: (event: NativeSyntheticEvent<NativeScrollEvent>) => void;
|
|
152
|
+
_onRequestClose: () => void;
|
|
153
|
+
_onTouchBackdrop: () => void;
|
|
154
|
+
componentDidMount(): void;
|
|
155
|
+
_onKeyboardShow: (event: KeyboardEvent) => void;
|
|
156
|
+
/**
|
|
157
|
+
* Attach this to any child ScrollView Component's onScrollEndDrag,
|
|
158
|
+
* onMomentumScrollEnd,onScrollAnimationEnd callbacks to handle the ActionSheet
|
|
159
|
+
* closing and bouncing back properly.
|
|
160
|
+
*/
|
|
161
|
+
handleChildScrollEnd: () => Promise<void>;
|
|
162
|
+
_onKeyboardHide: () => void;
|
|
163
|
+
componentWillUnmount(): void;
|
|
164
|
+
_onDeviceLayout: (_event: any) => Promise<void>;
|
|
165
|
+
getInitialScrollPosition(): number;
|
|
166
|
+
_keyExtractor: (item: any) => any;
|
|
167
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
168
|
+
}
|
|
169
|
+
export {};
|