@studio-piot/native-ui 0.2.5 → 0.17.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 +22 -18
- package/dist/components/Button/Button.d.ts +20 -4
- package/dist/components/Button/Button.d.ts.map +1 -1
- package/dist/components/Button/Button.js +34 -21
- package/dist/components/Button/Button.js.map +1 -1
- package/dist/components/Button/buttonAppearance.d.ts +20 -0
- package/dist/components/Button/buttonAppearance.d.ts.map +1 -0
- package/dist/components/Button/buttonAppearance.js +28 -0
- package/dist/components/Button/buttonAppearance.js.map +1 -0
- package/dist/components/Button/buttonThemeRoles.d.ts +6 -0
- package/dist/components/Button/buttonThemeRoles.d.ts.map +1 -0
- package/dist/components/Button/buttonThemeRoles.js +8 -0
- package/dist/components/Button/buttonThemeRoles.js.map +1 -0
- package/dist/components/Button/index.d.ts +3 -1
- package/dist/components/Button/index.d.ts.map +1 -1
- package/dist/components/Button/index.js +4 -1
- package/dist/components/Button/index.js.map +1 -1
- package/dist/components/Choice/Choice.d.ts +10 -0
- package/dist/components/Choice/Choice.d.ts.map +1 -0
- package/dist/components/Choice/Choice.js +66 -0
- package/dist/components/Choice/Choice.js.map +1 -0
- package/dist/components/Choice/choiceLayout.d.ts +23 -0
- package/dist/components/Choice/choiceLayout.d.ts.map +1 -0
- package/dist/components/Choice/choiceLayout.js +32 -0
- package/dist/components/Choice/choiceLayout.js.map +1 -0
- package/dist/components/Choice/choiceThemeRoles.d.ts +9 -0
- package/dist/components/Choice/choiceThemeRoles.d.ts.map +1 -0
- package/dist/components/Choice/choiceThemeRoles.js +11 -0
- package/dist/components/Choice/choiceThemeRoles.js.map +1 -0
- package/dist/components/Choice/index.d.ts +5 -0
- package/dist/components/Choice/index.d.ts.map +1 -0
- package/dist/components/Choice/index.js +10 -0
- package/dist/components/Choice/index.js.map +1 -0
- package/dist/components/Choice/types.d.ts +33 -0
- package/dist/components/Choice/types.d.ts.map +1 -0
- package/dist/components/Choice/types.js +3 -0
- package/dist/components/Choice/types.js.map +1 -0
- package/dist/components/ErrorBanner/ErrorBanner.d.ts +1 -1
- package/dist/components/ErrorBanner/ErrorBanner.d.ts.map +1 -1
- package/dist/components/ErrorBanner/ErrorBanner.js +19 -19
- package/dist/components/ErrorBanner/ErrorBanner.js.map +1 -1
- package/dist/components/ErrorBanner/errorBannerContext.d.ts +23 -3
- package/dist/components/ErrorBanner/errorBannerContext.d.ts.map +1 -1
- package/dist/components/ErrorBanner/errorBannerContext.js +9 -5
- package/dist/components/ErrorBanner/errorBannerContext.js.map +1 -1
- package/dist/components/ErrorBanner/errorBannerLayout.d.ts +18 -0
- package/dist/components/ErrorBanner/errorBannerLayout.d.ts.map +1 -0
- package/dist/components/ErrorBanner/errorBannerLayout.js +54 -0
- package/dist/components/ErrorBanner/errorBannerLayout.js.map +1 -0
- package/dist/components/ErrorBanner/icons.d.ts +7 -5
- package/dist/components/ErrorBanner/icons.d.ts.map +1 -1
- package/dist/components/ErrorBanner/icons.js +8 -4
- package/dist/components/ErrorBanner/icons.js.map +1 -1
- package/dist/components/ErrorBanner/index.d.ts +1 -1
- package/dist/components/ErrorBanner/index.d.ts.map +1 -1
- package/dist/components/ErrorBanner/index.js.map +1 -1
- package/dist/components/Form/Form.d.ts +9 -1
- package/dist/components/Form/Form.d.ts.map +1 -1
- package/dist/components/Form/Form.js +56 -78
- package/dist/components/Form/Form.js.map +1 -1
- package/dist/components/Form/FormCloseButton.d.ts +3 -1
- package/dist/components/Form/FormCloseButton.d.ts.map +1 -1
- package/dist/components/Form/FormCloseButton.js +5 -4
- package/dist/components/Form/FormCloseButton.js.map +1 -1
- package/dist/components/Form/FormErrorBanner.d.ts +15 -0
- package/dist/components/Form/FormErrorBanner.d.ts.map +1 -0
- package/dist/components/Form/FormErrorBanner.js +30 -0
- package/dist/components/Form/FormErrorBanner.js.map +1 -0
- package/dist/components/Form/FormSubmitFooter.d.ts +17 -0
- package/dist/components/Form/FormSubmitFooter.d.ts.map +1 -0
- package/dist/components/Form/FormSubmitFooter.js +32 -0
- package/dist/components/Form/FormSubmitFooter.js.map +1 -0
- package/dist/components/Form/formThemeRoles.d.ts +7 -0
- package/dist/components/Form/formThemeRoles.d.ts.map +1 -0
- package/dist/components/Form/formThemeRoles.js +9 -0
- package/dist/components/Form/formThemeRoles.js.map +1 -0
- package/dist/components/Form/index.d.ts +1 -0
- package/dist/components/Form/index.d.ts.map +1 -1
- package/dist/components/Form/index.js +3 -1
- package/dist/components/Form/index.js.map +1 -1
- package/dist/components/Form/types.d.ts +14 -10
- package/dist/components/Form/types.d.ts.map +1 -1
- package/dist/components/FormSheet/FormSheet.d.ts +10 -0
- package/dist/components/FormSheet/FormSheet.d.ts.map +1 -0
- package/dist/components/FormSheet/FormSheet.js +153 -0
- package/dist/components/FormSheet/FormSheet.js.map +1 -0
- package/dist/components/FormSheet/formSheetLayout.d.ts +32 -0
- package/dist/components/FormSheet/formSheetLayout.d.ts.map +1 -0
- package/dist/components/FormSheet/formSheetLayout.js +43 -0
- package/dist/components/FormSheet/formSheetLayout.js.map +1 -0
- package/dist/components/FormSheet/formSheetThemeRoles.d.ts +8 -0
- package/dist/components/FormSheet/formSheetThemeRoles.d.ts.map +1 -0
- package/dist/components/FormSheet/formSheetThemeRoles.js +10 -0
- package/dist/components/FormSheet/formSheetThemeRoles.js.map +1 -0
- package/dist/components/FormSheet/index.d.ts +5 -0
- package/dist/components/FormSheet/index.d.ts.map +1 -0
- package/dist/components/FormSheet/index.js +10 -0
- package/dist/components/FormSheet/index.js.map +1 -0
- package/dist/components/FormSheet/types.d.ts +64 -0
- package/dist/components/FormSheet/types.d.ts.map +1 -0
- package/dist/components/FormSheet/types.js +3 -0
- package/dist/components/FormSheet/types.js.map +1 -0
- package/dist/components/HeaderButton/HeaderCapsule.d.ts +4 -0
- package/dist/components/HeaderButton/HeaderCapsule.d.ts.map +1 -0
- package/dist/components/HeaderButton/HeaderCapsule.js +32 -0
- package/dist/components/HeaderButton/HeaderCapsule.js.map +1 -0
- package/dist/components/HeaderButton/HeaderGroup.d.ts +4 -0
- package/dist/components/HeaderButton/HeaderGroup.d.ts.map +1 -0
- package/dist/components/HeaderButton/HeaderGroup.js +23 -0
- package/dist/components/HeaderButton/HeaderGroup.js.map +1 -0
- package/dist/components/HeaderButton/HeaderIcon.d.ts +4 -0
- package/dist/components/HeaderButton/HeaderIcon.d.ts.map +1 -0
- package/dist/components/HeaderButton/HeaderIcon.js +28 -0
- package/dist/components/HeaderButton/HeaderIcon.js.map +1 -0
- package/dist/components/HeaderButton/headerButtonLayout.d.ts +21 -0
- package/dist/components/HeaderButton/headerButtonLayout.d.ts.map +1 -0
- package/dist/components/HeaderButton/headerButtonLayout.js +34 -0
- package/dist/components/HeaderButton/headerButtonLayout.js.map +1 -0
- package/dist/components/HeaderButton/headerButtonThemeRoles.d.ts +5 -0
- package/dist/components/HeaderButton/headerButtonThemeRoles.d.ts.map +1 -0
- package/dist/components/HeaderButton/headerButtonThemeRoles.js +7 -0
- package/dist/components/HeaderButton/headerButtonThemeRoles.js.map +1 -0
- package/dist/components/HeaderButton/index.d.ts +7 -0
- package/dist/components/HeaderButton/index.d.ts.map +1 -0
- package/dist/components/HeaderButton/index.js +14 -0
- package/dist/components/HeaderButton/index.js.map +1 -0
- package/dist/components/HeaderButton/types.d.ts +40 -0
- package/dist/components/HeaderButton/types.d.ts.map +1 -0
- package/dist/components/HeaderButton/types.js +3 -0
- package/dist/components/HeaderButton/types.js.map +1 -0
- package/dist/components/HeaderWash/HeaderWash.d.ts +10 -0
- package/dist/components/HeaderWash/HeaderWash.d.ts.map +1 -0
- package/dist/components/HeaderWash/HeaderWash.js +19 -0
- package/dist/components/HeaderWash/HeaderWash.js.map +1 -0
- package/dist/components/HeaderWash/headerWashGradient.d.ts +8 -0
- package/dist/components/HeaderWash/headerWashGradient.d.ts.map +1 -0
- package/dist/components/HeaderWash/headerWashGradient.js +21 -0
- package/dist/components/HeaderWash/headerWashGradient.js.map +1 -0
- package/dist/components/HeaderWash/index.d.ts +2 -0
- package/dist/components/HeaderWash/index.d.ts.map +1 -0
- package/dist/components/HeaderWash/index.js +6 -0
- package/dist/components/HeaderWash/index.js.map +1 -0
- package/dist/components/Page/Page.d.ts +13 -0
- package/dist/components/Page/Page.d.ts.map +1 -0
- package/dist/components/Page/Page.js +49 -0
- package/dist/components/Page/Page.js.map +1 -0
- package/dist/components/Page/PageBleed.d.ts +9 -0
- package/dist/components/Page/PageBleed.d.ts.map +1 -0
- package/dist/components/Page/PageBleed.js +12 -0
- package/dist/components/Page/PageBleed.js.map +1 -0
- package/dist/components/Page/index.d.ts +5 -0
- package/dist/components/Page/index.d.ts.map +1 -0
- package/dist/components/Page/index.js +10 -0
- package/dist/components/Page/index.js.map +1 -0
- package/dist/components/Page/pageContext.d.ts +4 -0
- package/dist/components/Page/pageContext.d.ts.map +1 -0
- package/dist/components/Page/pageContext.js +11 -0
- package/dist/components/Page/pageContext.js.map +1 -0
- package/dist/components/Page/pageInsets.d.ts +26 -0
- package/dist/components/Page/pageInsets.d.ts.map +1 -0
- package/dist/components/Page/pageInsets.js +37 -0
- package/dist/components/Page/pageInsets.js.map +1 -0
- package/dist/components/Page/pageLayout.d.ts +5 -0
- package/dist/components/Page/pageLayout.d.ts.map +1 -0
- package/dist/components/Page/pageLayout.js +8 -0
- package/dist/components/Page/pageLayout.js.map +1 -0
- package/dist/components/Page/pageThemeRoles.d.ts +5 -0
- package/dist/components/Page/pageThemeRoles.d.ts.map +1 -0
- package/dist/components/Page/pageThemeRoles.js +7 -0
- package/dist/components/Page/pageThemeRoles.js.map +1 -0
- package/dist/components/Page/types.d.ts +22 -0
- package/dist/components/Page/types.d.ts.map +1 -0
- package/dist/components/Page/types.js +3 -0
- package/dist/components/Page/types.js.map +1 -0
- package/dist/components/Select/Select.d.ts +1 -1
- package/dist/components/Select/Select.d.ts.map +1 -1
- package/dist/components/Select/Select.js +8 -9
- package/dist/components/Select/Select.js.map +1 -1
- package/dist/components/Select/selectThemeRoles.d.ts +2 -0
- package/dist/components/Select/selectThemeRoles.d.ts.map +1 -1
- package/dist/components/Select/selectThemeRoles.js +2 -0
- package/dist/components/Select/selectThemeRoles.js.map +1 -1
- package/dist/components/Select/types.d.ts +4 -0
- package/dist/components/Select/types.d.ts.map +1 -1
- package/dist/components/TabAccessoryButton/TabAccessoryButton.d.ts +8 -0
- package/dist/components/TabAccessoryButton/TabAccessoryButton.d.ts.map +1 -0
- package/dist/components/TabAccessoryButton/TabAccessoryButton.js +77 -0
- package/dist/components/TabAccessoryButton/TabAccessoryButton.js.map +1 -0
- package/dist/components/TabAccessoryButton/index.d.ts +5 -0
- package/dist/components/TabAccessoryButton/index.d.ts.map +1 -0
- package/dist/components/TabAccessoryButton/index.js +11 -0
- package/dist/components/TabAccessoryButton/index.js.map +1 -0
- package/dist/components/TabAccessoryButton/tabAccessoryLayout.d.ts +27 -0
- package/dist/components/TabAccessoryButton/tabAccessoryLayout.d.ts.map +1 -0
- package/dist/components/TabAccessoryButton/tabAccessoryLayout.js +38 -0
- package/dist/components/TabAccessoryButton/tabAccessoryLayout.js.map +1 -0
- package/dist/components/TabAccessoryButton/tabAccessoryThemeRoles.d.ts +14 -0
- package/dist/components/TabAccessoryButton/tabAccessoryThemeRoles.d.ts.map +1 -0
- package/dist/components/TabAccessoryButton/tabAccessoryThemeRoles.js +19 -0
- package/dist/components/TabAccessoryButton/tabAccessoryThemeRoles.js.map +1 -0
- package/dist/components/TabAccessoryButton/types.d.ts +27 -0
- package/dist/components/TabAccessoryButton/types.d.ts.map +1 -0
- package/dist/components/TabAccessoryButton/types.js +3 -0
- package/dist/components/TabAccessoryButton/types.js.map +1 -0
- package/dist/components/index.d.ts +9 -3
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +30 -1
- package/dist/components/index.js.map +1 -1
- package/dist/index.d.ts +11 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +34 -2
- package/dist/index.js.map +1 -1
- package/dist/layout/HeaderInsetProbe.d.ts +15 -0
- package/dist/layout/HeaderInsetProbe.d.ts.map +1 -0
- package/dist/layout/HeaderInsetProbe.js +28 -0
- package/dist/layout/HeaderInsetProbe.js.map +1 -0
- package/dist/layout/headerInset.d.ts +26 -0
- package/dist/layout/headerInset.d.ts.map +1 -0
- package/dist/layout/headerInset.js +29 -0
- package/dist/layout/headerInset.js.map +1 -0
- package/dist/layout/index.d.ts +1 -0
- package/dist/layout/index.d.ts.map +1 -1
- package/dist/layout/index.js +3 -1
- package/dist/layout/index.js.map +1 -1
- package/dist/layout/sheet.d.ts +3 -0
- package/dist/layout/sheet.d.ts.map +1 -0
- package/dist/layout/sheet.js +6 -0
- package/dist/layout/sheet.js.map +1 -0
- package/dist/theme/ThemeProvider.d.ts +4 -1
- package/dist/theme/ThemeProvider.d.ts.map +1 -1
- package/dist/theme/ThemeProvider.js +5 -2
- package/dist/theme/ThemeProvider.js.map +1 -1
- package/dist/theme/index.d.ts +2 -0
- package/dist/theme/index.d.ts.map +1 -1
- package/dist/theme/index.js +6 -1
- package/dist/theme/index.js.map +1 -1
- package/dist/theme/resolveThemeSpacing.d.ts +12 -0
- package/dist/theme/resolveThemeSpacing.d.ts.map +1 -0
- package/dist/theme/resolveThemeSpacing.js +14 -0
- package/dist/theme/resolveThemeSpacing.js.map +1 -0
- package/dist/theme/types.d.ts +2 -0
- package/dist/theme/types.d.ts.map +1 -1
- package/dist/theme/useThemeSpacing.d.ts +4 -0
- package/dist/theme/useThemeSpacing.d.ts.map +1 -0
- package/dist/theme/useThemeSpacing.js +11 -0
- package/dist/theme/useThemeSpacing.js.map +1 -0
- package/docs/components/button.md +92 -38
- package/docs/components/choice.md +111 -0
- package/docs/components/error-banner.md +46 -3
- package/docs/components/form-sheet.md +140 -0
- package/docs/components/form.md +80 -45
- package/docs/components/header-button.md +310 -0
- package/docs/components/header-wash.md +40 -0
- package/docs/components/page.md +183 -0
- package/docs/components/select.md +2 -2
- package/docs/components/tab-accessory-button.md +146 -0
- package/docs/specifications/Liquid Glass header buttons in Expo Router.md +327 -0
- package/package.json +1 -1
- package/src/components/Button/Button.tsx +82 -38
- package/src/components/Button/buttonAppearance.test.ts +44 -0
- package/src/components/Button/buttonAppearance.ts +38 -0
- package/src/components/Button/buttonThemeRoles.test.ts +10 -0
- package/src/components/Button/buttonThemeRoles.ts +6 -0
- package/src/components/Button/index.ts +12 -1
- package/src/components/Choice/Choice.tsx +120 -0
- package/src/components/Choice/choiceLayout.test.ts +49 -0
- package/src/components/Choice/choiceLayout.ts +34 -0
- package/src/components/Choice/choiceThemeRoles.test.ts +15 -0
- package/src/components/Choice/choiceThemeRoles.ts +9 -0
- package/src/components/Choice/index.ts +4 -0
- package/src/components/Choice/types.ts +33 -0
- package/src/components/ErrorBanner/ErrorBanner.tsx +32 -22
- package/src/components/ErrorBanner/errorBannerContext.tsx +31 -6
- package/src/components/ErrorBanner/errorBannerLayout.test.ts +49 -0
- package/src/components/ErrorBanner/errorBannerLayout.ts +59 -0
- package/src/components/ErrorBanner/icons.tsx +25 -6
- package/src/components/ErrorBanner/index.ts +1 -0
- package/src/components/Form/Form.tsx +77 -173
- package/src/components/Form/FormCloseButton.tsx +12 -4
- package/src/components/Form/FormErrorBanner.tsx +57 -0
- package/src/components/Form/FormSubmitFooter.tsx +70 -0
- package/src/components/Form/formThemeRoles.test.ts +13 -0
- package/src/components/Form/formThemeRoles.ts +7 -0
- package/src/components/Form/index.ts +1 -0
- package/src/components/Form/types.ts +14 -10
- package/src/components/FormSheet/FormSheet.tsx +279 -0
- package/src/components/FormSheet/formSheetLayout.test.ts +66 -0
- package/src/components/FormSheet/formSheetLayout.ts +55 -0
- package/src/components/FormSheet/formSheetThemeRoles.test.ts +14 -0
- package/src/components/FormSheet/formSheetThemeRoles.ts +8 -0
- package/src/components/FormSheet/index.ts +7 -0
- package/src/components/FormSheet/types.ts +66 -0
- package/src/components/HeaderButton/HeaderCapsule.tsx +63 -0
- package/src/components/HeaderButton/HeaderGroup.tsx +36 -0
- package/src/components/HeaderButton/HeaderIcon.tsx +56 -0
- package/src/components/HeaderButton/headerButtonLayout.test.ts +47 -0
- package/src/components/HeaderButton/headerButtonLayout.ts +36 -0
- package/src/components/HeaderButton/headerButtonThemeRoles.test.ts +9 -0
- package/src/components/HeaderButton/headerButtonThemeRoles.ts +5 -0
- package/src/components/HeaderButton/index.ts +14 -0
- package/src/components/HeaderButton/types.ts +40 -0
- package/src/components/HeaderWash/HeaderWash.tsx +20 -0
- package/src/components/HeaderWash/headerWashGradient.test.ts +22 -0
- package/src/components/{Form/withAlpha.ts → HeaderWash/headerWashGradient.ts} +9 -0
- package/src/components/HeaderWash/index.ts +1 -0
- package/src/components/Page/Page.tsx +80 -0
- package/src/components/Page/PageBleed.tsx +14 -0
- package/src/components/Page/index.ts +4 -0
- package/src/components/Page/pageContext.ts +8 -0
- package/src/components/Page/pageInsets.test.ts +73 -0
- package/src/components/Page/pageInsets.ts +52 -0
- package/src/components/Page/pageThemeRoles.test.ts +9 -0
- package/src/components/Page/pageThemeRoles.ts +5 -0
- package/src/components/Page/types.ts +26 -0
- package/src/components/Select/Select.tsx +11 -4
- package/src/components/Select/selectThemeRoles.test.ts +5 -0
- package/src/components/Select/selectThemeRoles.ts +2 -0
- package/src/components/Select/types.ts +4 -0
- package/src/components/TabAccessoryButton/TabAccessoryButton.tsx +150 -0
- package/src/components/TabAccessoryButton/index.ts +12 -0
- package/src/components/TabAccessoryButton/tabAccessoryLayout.test.ts +42 -0
- package/src/components/TabAccessoryButton/tabAccessoryLayout.ts +43 -0
- package/src/components/TabAccessoryButton/tabAccessoryThemeRoles.test.ts +28 -0
- package/src/components/TabAccessoryButton/tabAccessoryThemeRoles.ts +22 -0
- package/src/components/TabAccessoryButton/types.ts +27 -0
- package/src/components/index.ts +64 -2
- package/src/index.ts +61 -2
- package/src/layout/headerInset.test.ts +60 -0
- package/src/layout/headerInset.ts +41 -0
- package/src/layout/index.ts +1 -0
- package/src/layout/sheet.ts +2 -0
- package/src/theme/ThemeProvider.tsx +9 -1
- package/src/theme/index.ts +6 -0
- package/src/theme/resolveThemeSpacing.test.ts +29 -0
- package/src/theme/resolveThemeSpacing.ts +21 -0
- package/src/theme/types.ts +3 -0
- package/src/theme/useThemeSpacing.ts +8 -0
- package/src/components/Form/withAlpha.test.ts +0 -13
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Form.js","sourceRoot":"","sources":["../../../src/components/Form/Form.tsx"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"Form.js","sourceRoot":"","sources":["../../../src/components/Form/Form.tsx"],"names":[],"mappings":";;AAmCA,oBAsHC;;AAzJD,iCAAsD;AACtD,+CAAkF;AAClF,uFAG0C;AAC1C,mFAAmE;AACnE,0DAAkF;AAClF,iEAA8D;AAC9D,gDAAqE;AACrE,oEAAyE;AACzE,uDAAoD;AACpD,yDAAsD;AACtD,qDAAoD;AAEpD,mEAAgE;AAGhE,sEAAsE;AACtE,MAAM,SAAS,GAAG,EAAE,CAAC;AAErB;;;GAGG;AACH,MAAM,iBAAiB,GAAG,EAAE,CAAC;AAE7B;;;;;;;GAOG;AACH,SAAgB,IAAI,CAAC,EACnB,QAAQ,EACR,QAAQ,EACR,MAAM,GAAG,EAAE,EACX,WAAW,GAAG,MAAM,EACpB,UAAU,GAAG,KAAK,EAClB,cAAc,GAAG,KAAK,EACtB,YAAY,GAAG,IAAI,EACnB,YAAY,EAAE,gBAAgB,EAC9B,iBAAiB,EAAE,qBAAqB,EACxC,eAAe,EAAE,mBAAmB,EACpC,qBAAqB,EAAE,yBAAyB,EAChD,qBAAqB,EACrB,gBAAgB,GACN;IACV,MAAM,OAAO,GAAG,IAAA,iCAAe,GAAE,CAAC;IAClC,MAAM,MAAM,GAAG,IAAA,kDAAiB,GAAE,CAAC;IACnC,MAAM,iBAAiB,GAAG,qBAAqB,IAAI,OAAO,CAAC,MAAM,CAAC;IAClE,MAAM,UAAU,GAAG,IAAA,6CAAqB,EACtC,mBAAmB,EACnB,iCAAgB,CAAC,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AAM,EAAE,EAAE,eAAe,EAAE,UAAU,EAAE,CAAC,YAEtD,QAAQ,GACe,EAE1B,uBAAC,mCAAgB,IACf,eAAe,EAAE,gBAAgB,EACjC,qBAAqB,EAAE,qBAAqB,EAC5C,gBAAgB,EAAE,gBAAgB,EAClC,QAAQ,EAAE,cAAc,EACxB,KAAK,EAAE,WAAW,EAClB,QAAQ,EAAE,cAAc,EACxB,OAAO,EAAE,GAAG,EAAE;oBACZ,MAAM,CAAC,OAAO,EAAE,CAAC;oBACjB,QAAQ,EAAE,CAAC;gBACb,CAAC,EACD,iBAAiB,EAAE,iBAAiB,EACpC,MAAM,EAAE,YAAY,EACpB,UAAU,EAAE,UAAU,GACtB,EAEF,uBAAC,iCAAe,IACd,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,CAAC,OAAO,EACzB,cAAc,EAAE,CAAC,MAAM,EAAE,EAAE;oBACzB,eAAe,CAAC,OAAO,GAAG,MAAM,CAAC;gBACnC,CAAC,EACD,IAAI,EAAE,MAAM,CAAC,IAAI,GACjB,IACkB,CACvB,CAAC;AACJ,CAAC;AAED,MAAM,MAAM,GAAG,yBAAU,CAAC,MAAM,CAAC;IAC/B,MAAM,EAAE;QACN,IAAI,EAAE,CAAC;KACR;IACD,OAAO,EAAE;QACP,aAAa,EAAE,EAAE;KAClB;CACF,CAAC,CAAC"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
export declare function FormCloseButton({ onPress }: {
|
|
1
|
+
export declare function FormCloseButton({ onPress, color: colorProp, }: {
|
|
2
2
|
onPress: () => void;
|
|
3
|
+
/** Defaults to theme role `formClose`. */
|
|
4
|
+
color?: string;
|
|
3
5
|
}): import("react").JSX.Element;
|
|
4
6
|
//# sourceMappingURL=FormCloseButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormCloseButton.d.ts","sourceRoot":"","sources":["../../../src/components/Form/FormCloseButton.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FormCloseButton.d.ts","sourceRoot":"","sources":["../../../src/components/Form/FormCloseButton.tsx"],"names":[],"mappings":"AAIA,wBAAgB,eAAe,CAAC,EAC9B,OAAO,EACP,KAAK,EAAE,SAAS,GACjB,EAAE;IACD,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,0CAA0C;IAC1C,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,+BAQA"}
|
|
@@ -3,10 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.FormCloseButton = FormCloseButton;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_native_1 = require("react-native");
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
const useResolvedFieldColor_1 = require("../Field/useResolvedFieldColor");
|
|
7
|
+
const formThemeRoles_1 = require("./formThemeRoles");
|
|
8
|
+
function FormCloseButton({ onPress, color: colorProp, }) {
|
|
9
|
+
const color = (0, useResolvedFieldColor_1.useResolvedFieldColor)(colorProp, formThemeRoles_1.FORM_THEME_ROLES.closeColor);
|
|
10
|
+
return ((0, jsx_runtime_1.jsx)(react_native_1.Pressable, { accessibilityRole: "button", hitSlop: 8, onPress: onPress, children: (0, jsx_runtime_1.jsx)(react_native_1.Text, { style: [styles.label, { color }], children: "Cancel" }) }));
|
|
10
11
|
}
|
|
11
12
|
const styles = react_native_1.StyleSheet.create({
|
|
12
13
|
label: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormCloseButton.js","sourceRoot":"","sources":["../../../src/components/Form/FormCloseButton.tsx"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"FormCloseButton.js","sourceRoot":"","sources":["../../../src/components/Form/FormCloseButton.tsx"],"names":[],"mappings":";;AAIA,0CAeC;;AAnBD,+CAA2D;AAC3D,0EAAuE;AACvE,qDAAoD;AAEpD,SAAgB,eAAe,CAAC,EAC9B,OAAO,EACP,KAAK,EAAE,SAAS,GAKjB;IACC,MAAM,KAAK,GAAG,IAAA,6CAAqB,EAAC,SAAS,EAAE,iCAAgB,CAAC,UAAU,CAAC,CAAC;IAE5E,OAAO,CACL,uBAAC,wBAAS,IAAC,iBAAiB,EAAC,QAAQ,EAAC,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE,OAAO,YAChE,uBAAC,mBAAI,IAAC,KAAK,EAAE,CAAC,MAAM,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,uBAAe,GAC3C,CACb,CAAC;AACJ,CAAC;AAED,MAAM,MAAM,GAAG,yBAAU,CAAC,MAAM,CAAC;IAC/B,KAAK,EAAE;QACL,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,KAAK;KAClB;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type FieldError } from "../ErrorBanner";
|
|
2
|
+
/**
|
|
3
|
+
* The screen banner wired to the nearest `ErrorBannerProvider`. Shared by
|
|
4
|
+
* `Form` and `FormSheet`. On iOS it renders in a native overlay window so it
|
|
5
|
+
* covers the native header. Android native headers do not overlap the
|
|
6
|
+
* screen, so there it sits `androidTop` below the screen top, under the header.
|
|
7
|
+
*/
|
|
8
|
+
export declare function FormErrorBanner({ open, errors, onDismiss, onHeightChange, androidTop, }: {
|
|
9
|
+
open: boolean;
|
|
10
|
+
errors: readonly FieldError[];
|
|
11
|
+
onDismiss: () => void;
|
|
12
|
+
onHeightChange: (height: number) => void;
|
|
13
|
+
androidTop?: number;
|
|
14
|
+
}): import("react").JSX.Element;
|
|
15
|
+
//# sourceMappingURL=FormErrorBanner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormErrorBanner.d.ts","sourceRoot":"","sources":["../../../src/components/Form/FormErrorBanner.tsx"],"names":[],"mappings":"AAEA,OAAO,EAGL,KAAK,UAAU,EAChB,MAAM,gBAAgB,CAAC;AAExB;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,EAC9B,IAAI,EACJ,MAAM,EACN,SAAS,EACT,cAAc,EACd,UAAc,GACf,EAAE;IACD,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,EAAE,SAAS,UAAU,EAAE,CAAC;IAC9B,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,cAAc,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,+BAqBA"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FormErrorBanner = FormErrorBanner;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_native_1 = require("react-native");
|
|
6
|
+
const react_native_screens_1 = require("react-native-screens");
|
|
7
|
+
const ErrorBanner_1 = require("../ErrorBanner");
|
|
8
|
+
/**
|
|
9
|
+
* The screen banner wired to the nearest `ErrorBannerProvider`. Shared by
|
|
10
|
+
* `Form` and `FormSheet`. On iOS it renders in a native overlay window so it
|
|
11
|
+
* covers the native header. Android native headers do not overlap the
|
|
12
|
+
* screen, so there it sits `androidTop` below the screen top, under the header.
|
|
13
|
+
*/
|
|
14
|
+
function FormErrorBanner({ open, errors, onDismiss, onHeightChange, androidTop = 0, }) {
|
|
15
|
+
const ctx = (0, ErrorBanner_1.useErrorBannerContext)();
|
|
16
|
+
const banner = ((0, jsx_runtime_1.jsx)(ErrorBanner_1.ErrorBanner, { errors: errors, onDismiss: onDismiss, onHeightChange: onHeightChange, onJump: (field) => ctx?.jump(field), open: open, safeAreaTop: react_native_1.Platform.OS === "ios" ? undefined : 0 }));
|
|
17
|
+
if (react_native_1.Platform.OS === "ios") {
|
|
18
|
+
return (0, jsx_runtime_1.jsx)(react_native_screens_1.FullWindowOverlay, { children: banner });
|
|
19
|
+
}
|
|
20
|
+
return ((0, jsx_runtime_1.jsx)(react_native_1.View, { pointerEvents: "box-none", style: [styles.below, { top: androidTop }], children: banner }));
|
|
21
|
+
}
|
|
22
|
+
const styles = react_native_1.StyleSheet.create({
|
|
23
|
+
below: {
|
|
24
|
+
position: "absolute",
|
|
25
|
+
left: 0,
|
|
26
|
+
right: 0,
|
|
27
|
+
bottom: 0,
|
|
28
|
+
},
|
|
29
|
+
});
|
|
30
|
+
//# sourceMappingURL=FormErrorBanner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormErrorBanner.js","sourceRoot":"","sources":["../../../src/components/Form/FormErrorBanner.tsx"],"names":[],"mappings":";;AAcA,0CAiCC;;AA/CD,+CAA0D;AAC1D,+DAAyD;AACzD,gDAIwB;AAExB;;;;;GAKG;AACH,SAAgB,eAAe,CAAC,EAC9B,IAAI,EACJ,MAAM,EACN,SAAS,EACT,cAAc,EACd,UAAU,GAAG,CAAC,GAOf;IACC,MAAM,GAAG,GAAG,IAAA,mCAAqB,GAAE,CAAC;IACpC,MAAM,MAAM,GAAG,CACb,uBAAC,yBAAW,IACV,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,SAAS,EACpB,cAAc,EAAE,cAAc,EAC9B,MAAM,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,EACnC,IAAI,EAAE,IAAI,EACV,WAAW,EAAE,uBAAQ,CAAC,EAAE,KAAK,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,GAClD,CACH,CAAC;IAEF,IAAI,uBAAQ,CAAC,EAAE,KAAK,KAAK,EAAE,CAAC;QAC1B,OAAO,uBAAC,wCAAiB,cAAE,MAAM,GAAqB,CAAC;IACzD,CAAC;IACD,OAAO,CACL,uBAAC,mBAAI,IAAC,aAAa,EAAC,UAAU,EAAC,KAAK,EAAE,CAAC,MAAM,CAAC,KAAK,EAAE,EAAE,GAAG,EAAE,UAAU,EAAE,CAAC,YACtE,MAAM,GACF,CACR,CAAC;AACJ,CAAC;AAED,MAAM,MAAM,GAAG,yBAAU,CAAC,MAAM,CAAC;IAC/B,KAAK,EAAE;QACL,QAAQ,EAAE,UAAU;QACpB,IAAI,EAAE,CAAC;QACP,KAAK,EAAE,CAAC;QACR,MAAM,EAAE,CAAC;KACV;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type LayoutChangeEvent } from "react-native";
|
|
2
|
+
import type { ButtonRadius } from "../Button/buttonRadius";
|
|
3
|
+
/** Sticky submit footer shared by `Form` and `FormSheet`. */
|
|
4
|
+
export declare function FormSubmitFooter({ label, onPress, submitting, disabled, radius, paddingHorizontal, backgroundColor, buttonBackgroundColor, buttonLabelColor, onLayout, }: {
|
|
5
|
+
label: string;
|
|
6
|
+
onPress: () => void;
|
|
7
|
+
submitting: boolean;
|
|
8
|
+
disabled: boolean;
|
|
9
|
+
radius: ButtonRadius;
|
|
10
|
+
paddingHorizontal: number;
|
|
11
|
+
backgroundColor: string;
|
|
12
|
+
buttonBackgroundColor?: string;
|
|
13
|
+
buttonLabelColor?: string;
|
|
14
|
+
/** Height of the bar above the home indicator, for scroll clearance. */
|
|
15
|
+
onLayout?: (event: LayoutChangeEvent) => void;
|
|
16
|
+
}): import("react").JSX.Element;
|
|
17
|
+
//# sourceMappingURL=FormSubmitFooter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormSubmitFooter.d.ts","sourceRoot":"","sources":["../../../src/components/Form/FormSubmitFooter.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAIxE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAE3D,6DAA6D;AAC7D,wBAAgB,gBAAgB,CAAC,EAC/B,KAAK,EACL,OAAO,EACP,UAAU,EACV,QAAQ,EACR,MAAM,EACN,iBAAiB,EACjB,eAAe,EACf,qBAAqB,EACrB,gBAAgB,EAChB,QAAQ,GACT,EAAE;IACD,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,EAAE,YAAY,CAAC;IACrB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,eAAe,EAAE,MAAM,CAAC;IACxB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,wEAAwE;IACxE,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAC;CAC/C,+BAwBA"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FormSubmitFooter = FormSubmitFooter;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_native_1 = require("react-native");
|
|
6
|
+
const react_native_keyboard_controller_1 = require("react-native-keyboard-controller");
|
|
7
|
+
const react_native_safe_area_context_1 = require("react-native-safe-area-context");
|
|
8
|
+
const Button_1 = require("../Button");
|
|
9
|
+
/** Sticky submit footer shared by `Form` and `FormSheet`. */
|
|
10
|
+
function FormSubmitFooter({ label, onPress, submitting, disabled, radius, paddingHorizontal, backgroundColor, buttonBackgroundColor, buttonLabelColor, onLayout, }) {
|
|
11
|
+
const insets = (0, react_native_safe_area_context_1.useSafeAreaInsets)();
|
|
12
|
+
return (
|
|
13
|
+
// The spacer is the home-indicator clearance. `opened` equals that
|
|
14
|
+
// spacer, so once the keyboard is up the spacer sits inside the
|
|
15
|
+
// keyboard and the button rests on whatever height the keyboard is.
|
|
16
|
+
(0, jsx_runtime_1.jsx)(react_native_keyboard_controller_1.KeyboardStickyView, { offset: { closed: 0, opened: insets.bottom }, children: (0, jsx_runtime_1.jsxs)(react_native_1.View, { style: [styles.shell, { backgroundColor }], children: [(0, jsx_runtime_1.jsx)(react_native_1.View, { onLayout: onLayout, style: [styles.bar, { paddingHorizontal }], children: (0, jsx_runtime_1.jsx)(Button_1.Button, { backgroundColor: buttonBackgroundColor, disabled: disabled, label: label, labelColor: buttonLabelColor, loading: submitting, onPress: onPress, radius: radius }) }), (0, jsx_runtime_1.jsx)(react_native_1.View, { style: { height: insets.bottom } })] }) }));
|
|
17
|
+
}
|
|
18
|
+
const styles = react_native_1.StyleSheet.create({
|
|
19
|
+
shell: {
|
|
20
|
+
zIndex: 2,
|
|
21
|
+
// Cast upward so the sticky footer separates from the scroll body.
|
|
22
|
+
shadowColor: "#000",
|
|
23
|
+
shadowOffset: { width: 0, height: -4 },
|
|
24
|
+
shadowOpacity: 0.08,
|
|
25
|
+
shadowRadius: 12,
|
|
26
|
+
elevation: 8,
|
|
27
|
+
},
|
|
28
|
+
bar: {
|
|
29
|
+
paddingVertical: 12,
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
//# sourceMappingURL=FormSubmitFooter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormSubmitFooter.js","sourceRoot":"","sources":["../../../src/components/Form/FormSubmitFooter.tsx"],"names":[],"mappings":";;AAOA,4CA+CC;;AAtDD,+CAAwE;AACxE,uFAAsE;AACtE,mFAAmE;AACnE,sCAAmC;AAGnC,6DAA6D;AAC7D,SAAgB,gBAAgB,CAAC,EAC/B,KAAK,EACL,OAAO,EACP,UAAU,EACV,QAAQ,EACR,MAAM,EACN,iBAAiB,EACjB,eAAe,EACf,qBAAqB,EACrB,gBAAgB,EAChB,QAAQ,GAaT;IACC,MAAM,MAAM,GAAG,IAAA,kDAAiB,GAAE,CAAC;IAEnC,OAAO;IACL,mEAAmE;IACnE,gEAAgE;IAChE,oEAAoE;IACpE,uBAAC,qDAAkB,IAAC,MAAM,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,YAC9D,wBAAC,mBAAI,IAAC,KAAK,EAAE,CAAC,MAAM,CAAC,KAAK,EAAE,EAAE,eAAe,EAAE,CAAC,aAC9C,uBAAC,mBAAI,IAAC,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,MAAM,CAAC,GAAG,EAAE,EAAE,iBAAiB,EAAE,CAAC,YAClE,uBAAC,eAAM,IACL,eAAe,EAAE,qBAAqB,EACtC,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,KAAK,EACZ,UAAU,EAAE,gBAAgB,EAC5B,OAAO,EAAE,UAAU,EACnB,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,MAAM,GACd,GACG,EACP,uBAAC,mBAAI,IAAC,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAI,IACrC,GACY,CACtB,CAAC;AACJ,CAAC;AAED,MAAM,MAAM,GAAG,yBAAU,CAAC,MAAM,CAAC;IAC/B,KAAK,EAAE;QACL,MAAM,EAAE,CAAC;QACT,mEAAmE;QACnE,WAAW,EAAE,MAAM;QACnB,YAAY,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE;QACtC,aAAa,EAAE,IAAI;QACnB,YAAY,EAAE,EAAE;QAChB,SAAS,EAAE,CAAC;KACb;IACD,GAAG,EAAE;QACH,eAAe,EAAE,EAAE;KACpB;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const FORM_THEME_ROLES: {
|
|
2
|
+
readonly backgroundColor: "formBackground";
|
|
3
|
+
readonly footerBackgroundColor: "formFooterBackground";
|
|
4
|
+
readonly closeColor: "formClose";
|
|
5
|
+
};
|
|
6
|
+
export type FormThemeColorProp = keyof typeof FORM_THEME_ROLES;
|
|
7
|
+
//# sourceMappingURL=formThemeRoles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formThemeRoles.d.ts","sourceRoot":"","sources":["../../../src/components/Form/formThemeRoles.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB;;;;CAInB,CAAC;AAEX,MAAM,MAAM,kBAAkB,GAAG,MAAM,OAAO,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FORM_THEME_ROLES = void 0;
|
|
4
|
+
exports.FORM_THEME_ROLES = {
|
|
5
|
+
backgroundColor: "formBackground",
|
|
6
|
+
footerBackgroundColor: "formFooterBackground",
|
|
7
|
+
closeColor: "formClose",
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=formThemeRoles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formThemeRoles.js","sourceRoot":"","sources":["../../../src/components/Form/formThemeRoles.ts"],"names":[],"mappings":";;;AAAa,QAAA,gBAAgB,GAAG;IAC9B,eAAe,EAAE,gBAAgB;IACjC,qBAAqB,EAAE,sBAAsB;IAC7C,UAAU,EAAE,WAAW;CACf,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Form/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,YAAY,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Form/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,KAAK,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAC7E,YAAY,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FormCloseButton = exports.Form = void 0;
|
|
3
|
+
exports.FORM_THEME_ROLES = exports.FormCloseButton = exports.Form = void 0;
|
|
4
4
|
var Form_1 = require("./Form");
|
|
5
5
|
Object.defineProperty(exports, "Form", { enumerable: true, get: function () { return Form_1.Form; } });
|
|
6
6
|
var FormCloseButton_1 = require("./FormCloseButton");
|
|
7
7
|
Object.defineProperty(exports, "FormCloseButton", { enumerable: true, get: function () { return FormCloseButton_1.FormCloseButton; } });
|
|
8
|
+
var formThemeRoles_1 = require("./formThemeRoles");
|
|
9
|
+
Object.defineProperty(exports, "FORM_THEME_ROLES", { enumerable: true, get: function () { return formThemeRoles_1.FORM_THEME_ROLES; } });
|
|
8
10
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Form/index.ts"],"names":[],"mappings":";;;AAAA,+BAA8B;AAArB,4FAAA,IAAI,OAAA;AACb,qDAAoD;AAA3C,kHAAA,eAAe,OAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Form/index.ts"],"names":[],"mappings":";;;AAAA,+BAA8B;AAArB,4FAAA,IAAI,OAAA;AACb,qDAAoD;AAA3C,kHAAA,eAAe,OAAA;AACxB,mDAA6E;AAApE,kHAAA,gBAAgB,OAAA"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import type { ReactNode } from "react";
|
|
2
2
|
import type { ButtonRadius } from "../Button/buttonRadius";
|
|
3
3
|
import type { FieldError } from "../ErrorBanner/types";
|
|
4
|
+
/**
|
|
5
|
+
* Set the title and close button in the screen's stack options
|
|
6
|
+
* (`title`, `headerLeft`), not here.
|
|
7
|
+
*/
|
|
4
8
|
export type FormProps = {
|
|
5
|
-
title: string;
|
|
6
9
|
children: ReactNode;
|
|
7
|
-
onClose: () => void;
|
|
8
10
|
onSubmit: () => void;
|
|
9
11
|
/**
|
|
10
12
|
* Field errors for the screen banner. Empty hides it.
|
|
@@ -15,19 +17,21 @@ export type FormProps = {
|
|
|
15
17
|
submitLabel?: string;
|
|
16
18
|
submitting?: boolean;
|
|
17
19
|
submitDisabled?: boolean;
|
|
18
|
-
/** App-specific Cancel control. Defaults to a plain text Cancel. */
|
|
19
|
-
closeButton?: ReactNode;
|
|
20
20
|
submitRadius?: ButtonRadius;
|
|
21
21
|
/**
|
|
22
|
-
*
|
|
23
|
-
*
|
|
22
|
+
* Native header height, from `useHeaderHeight()` in
|
|
23
|
+
* `expo-router/react-navigation`. Used to scroll an error's field clear of
|
|
24
|
+
* the header. Defaults to the status bar plus a standard bar.
|
|
25
|
+
*/
|
|
26
|
+
headerHeight?: number;
|
|
27
|
+
/**
|
|
28
|
+
* Horizontal inset for the scroll content and footer.
|
|
29
|
+
* Defaults to theme `spacing.screen`. Pass a value to override.
|
|
24
30
|
*/
|
|
25
31
|
paddingHorizontal?: number;
|
|
26
|
-
/** Defaults to theme role `
|
|
32
|
+
/** Defaults to theme role `formBackground`. */
|
|
27
33
|
backgroundColor?: string;
|
|
28
|
-
/** Defaults to theme role `
|
|
29
|
-
titleColor?: string;
|
|
30
|
-
/** Defaults to theme role `surface`. Footer ground. */
|
|
34
|
+
/** Defaults to theme role `formFooterBackground`. Footer ground. */
|
|
31
35
|
footerBackgroundColor?: string;
|
|
32
36
|
/** Defaults to theme role `buttonBackground`. */
|
|
33
37
|
buttonBackgroundColor?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/Form/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEvD,MAAM,MAAM,SAAS,GAAG;IACtB,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/Form/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEvD;;;GAGG;AACH,MAAM,MAAM,SAAS,GAAG;IACtB,QAAQ,EAAE,SAAS,CAAC;IACpB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB;;;;OAIG;IACH,MAAM,CAAC,EAAE,SAAS,UAAU,EAAE,CAAC;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,+CAA+C;IAC/C,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,oEAAoE;IACpE,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,iDAAiD;IACjD,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,4CAA4C;IAC5C,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { FormSheetProps } from "./types";
|
|
2
|
+
/**
|
|
3
|
+
* A form in a draggable sheet over a full-screen background, usually a map.
|
|
4
|
+
* Three stops: the handle and title, half the screen, and up to the native
|
|
5
|
+
* header. The submit button stays above the keyboard. Set the close button
|
|
6
|
+
* in the screen's stack options, with `headerTransparent: true` so the
|
|
7
|
+
* background shows behind the header.
|
|
8
|
+
*/
|
|
9
|
+
export declare function FormSheet({ title, children, background, onSubmit, errors, submitLabel, submitting, submitDisabled, submitRadius, initialIndex, headerHeight: headerHeightProp, paddingHorizontal: paddingHorizontalProp, backgroundColor: backgroundColorProp, titleColor: titleColorProp, footerBackgroundColor: footerBackgroundColorProp, handleColor: handleColorProp, buttonBackgroundColor, buttonLabelColor, }: FormSheetProps): import("react").JSX.Element;
|
|
10
|
+
//# sourceMappingURL=FormSheet.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormSheet.d.ts","sourceRoot":"","sources":["../../../src/components/FormSheet/FormSheet.tsx"],"names":[],"mappings":"AAiCA,OAAO,KAAK,EAAkB,cAAc,EAAsB,MAAM,SAAS,CAAC;AAalF;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,EACxB,KAAK,EACL,QAAQ,EACR,UAAU,EACV,QAAQ,EACR,MAAW,EACX,WAAoB,EACpB,UAAkB,EAClB,cAAsB,EACtB,YAAmB,EACnB,YAAgB,EAChB,YAAY,EAAE,gBAAgB,EAC9B,iBAAiB,EAAE,qBAAqB,EACxC,eAAe,EAAE,mBAAmB,EACpC,UAAU,EAAE,cAAc,EAC1B,qBAAqB,EAAE,yBAAyB,EAChD,WAAW,EAAE,eAAe,EAC5B,qBAAqB,EACrB,gBAAgB,GACjB,EAAE,cAAc,+BAgLhB"}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.FormSheet = FormSheet;
|
|
37
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
38
|
+
const bottom_sheet_1 = __importStar(require("@gorhom/bottom-sheet"));
|
|
39
|
+
const react_1 = require("react");
|
|
40
|
+
const react_native_1 = require("react-native");
|
|
41
|
+
const react_native_keyboard_controller_1 = require("react-native-keyboard-controller");
|
|
42
|
+
const react_native_safe_area_context_1 = require("react-native-safe-area-context");
|
|
43
|
+
const headerInset_1 = require("../../layout/headerInset");
|
|
44
|
+
const sheet_1 = require("../../layout/sheet");
|
|
45
|
+
const useThemeSpacing_1 = require("../../theme/useThemeSpacing");
|
|
46
|
+
const ErrorBanner_1 = require("../ErrorBanner");
|
|
47
|
+
const useResolvedFieldColor_1 = require("../Field/useResolvedFieldColor");
|
|
48
|
+
const FormErrorBanner_1 = require("../Form/FormErrorBanner");
|
|
49
|
+
const FormSubmitFooter_1 = require("../Form/FormSubmitFooter");
|
|
50
|
+
const formSheetLayout_1 = require("./formSheetLayout");
|
|
51
|
+
const formSheetThemeRoles_1 = require("./formSheetThemeRoles");
|
|
52
|
+
const EXPANDED = 2;
|
|
53
|
+
function useMeasuredHeight(initial = 0) {
|
|
54
|
+
const [height, setHeight] = (0, react_1.useState)(initial);
|
|
55
|
+
const onLayout = (0, react_1.useCallback)((event) => {
|
|
56
|
+
const next = Math.round(event.nativeEvent.layout.height);
|
|
57
|
+
setHeight((current) => (current === next ? current : next));
|
|
58
|
+
}, []);
|
|
59
|
+
return [height, onLayout];
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* A form in a draggable sheet over a full-screen background, usually a map.
|
|
63
|
+
* Three stops: the handle and title, half the screen, and up to the native
|
|
64
|
+
* header. The submit button stays above the keyboard. Set the close button
|
|
65
|
+
* in the screen's stack options, with `headerTransparent: true` so the
|
|
66
|
+
* background shows behind the header.
|
|
67
|
+
*/
|
|
68
|
+
function FormSheet({ title, children, background, onSubmit, errors = [], submitLabel = "Save", submitting = false, submitDisabled = false, submitRadius = "lg", initialIndex = 0, headerHeight: headerHeightProp, paddingHorizontal: paddingHorizontalProp, backgroundColor: backgroundColorProp, titleColor: titleColorProp, footerBackgroundColor: footerBackgroundColorProp, handleColor: handleColorProp, buttonBackgroundColor, buttonLabelColor, }) {
|
|
69
|
+
const insets = (0, react_native_safe_area_context_1.useSafeAreaInsets)();
|
|
70
|
+
const spacing = (0, useThemeSpacing_1.useThemeSpacing)();
|
|
71
|
+
const paddingHorizontal = paddingHorizontalProp ?? spacing.screen;
|
|
72
|
+
const { height: windowHeight } = (0, react_native_1.useWindowDimensions)();
|
|
73
|
+
const backgroundColor = (0, useResolvedFieldColor_1.useResolvedFieldColor)(backgroundColorProp, formSheetThemeRoles_1.FORM_SHEET_THEME_ROLES.backgroundColor);
|
|
74
|
+
const titleColor = (0, useResolvedFieldColor_1.useResolvedFieldColor)(titleColorProp, formSheetThemeRoles_1.FORM_SHEET_THEME_ROLES.titleColor);
|
|
75
|
+
const footerBackground = (0, useResolvedFieldColor_1.useResolvedFieldColor)(footerBackgroundColorProp, formSheetThemeRoles_1.FORM_SHEET_THEME_ROLES.footerBackgroundColor);
|
|
76
|
+
const handleColor = (0, useResolvedFieldColor_1.useResolvedFieldColor)(handleColorProp, formSheetThemeRoles_1.FORM_SHEET_THEME_ROLES.handleColor);
|
|
77
|
+
const keyboardHeight = (0, react_native_keyboard_controller_1.useKeyboardState)((state) => state.height);
|
|
78
|
+
const keyboardLift = Math.max(0, keyboardHeight - insets.bottom);
|
|
79
|
+
const [footerHeight, onFooterLayout] = useMeasuredHeight();
|
|
80
|
+
const [handleHeight, onHandleLayout] = useMeasuredHeight((0, formSheetLayout_1.formSheetHandleFallback)(Boolean(title)));
|
|
81
|
+
const [sheetAreaHeight, onSheetAreaLayout] = useMeasuredHeight();
|
|
82
|
+
const [snapIndex, setSnapIndex] = (0, react_1.useState)(initialIndex);
|
|
83
|
+
// Estimates until the first layout pass reports real sizes.
|
|
84
|
+
const resolvedHeader = headerHeightProp ?? (0, headerInset_1.estimateHeaderHeight)(react_native_1.Platform.OS, insets.top);
|
|
85
|
+
const resolvedFooter = footerHeight || insets.bottom + 76;
|
|
86
|
+
const resolvedArea = sheetAreaHeight || Math.max(0, windowHeight - resolvedFooter - keyboardLift);
|
|
87
|
+
const snapPoints = (0, react_1.useMemo)(() => (0, formSheetLayout_1.formSheetSnapPoints)({
|
|
88
|
+
windowHeight,
|
|
89
|
+
sheetAreaHeight: resolvedArea,
|
|
90
|
+
headerHeight: resolvedHeader,
|
|
91
|
+
handleHeight,
|
|
92
|
+
}), [handleHeight, resolvedArea, resolvedHeader, windowHeight]);
|
|
93
|
+
const sheetRef = (0, react_1.useRef)(null);
|
|
94
|
+
const scrollRef = (0, react_1.useRef)(null);
|
|
95
|
+
const contentRef = (0, react_1.useRef)(null);
|
|
96
|
+
const bannerRawHeightRef = (0, react_1.useRef)(0);
|
|
97
|
+
const bannerOverlapRef = (0, react_1.useRef)(0);
|
|
98
|
+
const scrollTopRef = (0, react_1.useRef)(0);
|
|
99
|
+
scrollTopRef.current = resolvedHeader + handleHeight;
|
|
100
|
+
const banner = (0, ErrorBanner_1.useErrorBanner)(errors);
|
|
101
|
+
// A banner row expands the sheet first, so the field has room to show.
|
|
102
|
+
const expandForJump = (0, react_1.useCallback)(() => {
|
|
103
|
+
sheetRef.current?.snapToIndex(EXPANDED);
|
|
104
|
+
bannerOverlapRef.current = (0, formSheetLayout_1.sheetBannerOverlap)(bannerRawHeightRef.current, scrollTopRef.current);
|
|
105
|
+
}, []);
|
|
106
|
+
const renderHandle = (0, react_1.useCallback)((props) => ((0, jsx_runtime_1.jsxs)(react_native_1.View, { onLayout: onHandleLayout, style: [styles.handle, { backgroundColor, paddingHorizontal }], children: [(0, jsx_runtime_1.jsx)(bottom_sheet_1.BottomSheetHandle, { ...props, indicatorStyle: { backgroundColor: handleColor } }), title ? ((0, jsx_runtime_1.jsx)(react_native_1.Text, { accessibilityRole: "header", numberOfLines: 1, style: [styles.title, { color: titleColor }], children: title })) : null] })), [backgroundColor, handleColor, onHandleLayout, paddingHorizontal, title, titleColor]);
|
|
107
|
+
const inset = {
|
|
108
|
+
top: resolvedHeader,
|
|
109
|
+
bottom: resolvedFooter + snapPoints[snapIndex],
|
|
110
|
+
bottomAtHalf: resolvedFooter + snapPoints[1],
|
|
111
|
+
};
|
|
112
|
+
return ((0, jsx_runtime_1.jsx)(ErrorBanner_1.ErrorBannerProvider, { bannerHeightRef: bannerOverlapRef, errors: errors, measureRef: contentRef, onBeforeJump: expandForJump, onDismiss: banner.dismiss, scrollRef: scrollRef, children: (0, jsx_runtime_1.jsxs)(react_native_1.View, { style: [styles.screen, { backgroundColor }], children: [(0, jsx_runtime_1.jsx)(react_native_1.View, { pointerEvents: "box-none", style: react_native_1.StyleSheet.absoluteFill, children: background(inset) }), (0, jsx_runtime_1.jsx)(react_native_1.View, { onLayout: onSheetAreaLayout, pointerEvents: "box-none", style: [styles.sheetArea, { marginBottom: keyboardLift }], children: (0, jsx_runtime_1.jsx)(bottom_sheet_1.default, { ref: sheetRef, animateOnMount: false, index: initialIndex, backgroundStyle: [styles.sheet, { backgroundColor }], enableContentPanningGesture: true, enableDynamicSizing: false, keyboardBehavior: "extend", enablePanDownToClose: false, handleComponent: renderHandle, onChange: (next) => {
|
|
113
|
+
// -1 is closed; the sheet only has three stops.
|
|
114
|
+
if (next === 0 || next === 1 || next === 2) {
|
|
115
|
+
setSnapIndex(next);
|
|
116
|
+
}
|
|
117
|
+
}, snapPoints: snapPoints, children: (0, jsx_runtime_1.jsx)(bottom_sheet_1.BottomSheetScrollView, { ref: scrollRef, contentContainerStyle: [styles.content, { paddingHorizontal }], keyboardShouldPersistTaps: "handled", children: (0, jsx_runtime_1.jsx)(react_native_1.View, { ref: contentRef, collapsable: false, style: styles.contentTop, children: children }) }) }) }), (0, jsx_runtime_1.jsx)(FormSubmitFooter_1.FormSubmitFooter, { backgroundColor: footerBackground, buttonBackgroundColor: buttonBackgroundColor, buttonLabelColor: buttonLabelColor, disabled: submitDisabled, label: submitLabel, onLayout: onFooterLayout, onPress: () => {
|
|
118
|
+
banner.present();
|
|
119
|
+
onSubmit();
|
|
120
|
+
}, paddingHorizontal: paddingHorizontal, radius: submitRadius, submitting: submitting }), (0, jsx_runtime_1.jsx)(FormErrorBanner_1.FormErrorBanner, { androidTop: resolvedHeader, errors: errors, onDismiss: banner.dismiss, onHeightChange: (height) => {
|
|
121
|
+
bannerRawHeightRef.current = height;
|
|
122
|
+
}, open: banner.open })] }) }));
|
|
123
|
+
}
|
|
124
|
+
const styles = react_native_1.StyleSheet.create({
|
|
125
|
+
screen: {
|
|
126
|
+
flex: 1,
|
|
127
|
+
},
|
|
128
|
+
sheetArea: {
|
|
129
|
+
flex: 1,
|
|
130
|
+
},
|
|
131
|
+
sheet: {
|
|
132
|
+
borderTopLeftRadius: sheet_1.SHEET_TOP_RADIUS,
|
|
133
|
+
borderTopRightRadius: sheet_1.SHEET_TOP_RADIUS,
|
|
134
|
+
},
|
|
135
|
+
handle: {
|
|
136
|
+
alignItems: "center",
|
|
137
|
+
paddingBottom: 12,
|
|
138
|
+
borderTopLeftRadius: sheet_1.SHEET_TOP_RADIUS,
|
|
139
|
+
borderTopRightRadius: sheet_1.SHEET_TOP_RADIUS,
|
|
140
|
+
},
|
|
141
|
+
title: {
|
|
142
|
+
fontSize: 17,
|
|
143
|
+
fontWeight: "600",
|
|
144
|
+
textAlign: "center",
|
|
145
|
+
},
|
|
146
|
+
content: {
|
|
147
|
+
paddingBottom: 24,
|
|
148
|
+
},
|
|
149
|
+
contentTop: {
|
|
150
|
+
paddingTop: 8,
|
|
151
|
+
},
|
|
152
|
+
});
|
|
153
|
+
//# sourceMappingURL=FormSheet.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormSheet.js","sourceRoot":"","sources":["../../../src/components/FormSheet/FormSheet.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqDA,8BAmMC;;AAxPD,qEAK8B;AAC9B,iCAA+D;AAC/D,+CAOsB;AACtB,uFAAoE;AACpE,mFAAmE;AACnE,0DAAgE;AAChE,8CAAsD;AACtD,iEAA8D;AAC9D,gDAGwB;AACxB,0EAAuE;AACvE,6DAA0D;AAC1D,+DAA4D;AAC5D,uDAI2B;AAC3B,+DAA+D;AAG/D,MAAM,QAAQ,GAAuB,CAAC,CAAC;AAEvC,SAAS,iBAAiB,CAAC,OAAO,GAAG,CAAC;IACpC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,IAAA,gBAAQ,EAAC,OAAO,CAAC,CAAC;IAC9C,MAAM,QAAQ,GAAG,IAAA,mBAAW,E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AC;IAC/B,MAAM,EAAE;QACN,IAAI,EAAE,CAAC;KACR;IACD,SAAS,EAAE;QACT,IAAI,EAAE,CAAC;KACR;IACD,KAAK,EAAE;QACL,mBAAmB,EAAE,wBAAgB;QACrC,oBAAoB,EAAE,wBAAgB;KACvC;IACD,MAAM,EAAE;QACN,UAAU,EAAE,QAAQ;QACpB,aAAa,EAAE,EAAE;QACjB,mBAAmB,EAAE,wBAAgB;QACrC,oBAAoB,EAAE,wBAAgB;KACvC;IACD,KAAK,EAAE;QACL,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,KAAK;QACjB,SAAS,EAAE,QAAQ;KACpB;IACD,OAAO,EAAE;QACP,aAAa,EAAE,EAAE;KAClB;IACD,UAAU,EAAE;QACV,UAAU,EAAE,CAAC;KACd;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export type FormSheetSnapInput = {
|
|
2
|
+
/** Full window height, used to place the middle stop at half the screen. */
|
|
3
|
+
windowHeight: number;
|
|
4
|
+
/** Height of the sheet's parent: the screen above the footer and keyboard. */
|
|
5
|
+
sheetAreaHeight: number;
|
|
6
|
+
/** Header block the expanded sheet stops beneath. */
|
|
7
|
+
headerHeight: number;
|
|
8
|
+
/** Collapsed sheet: drag handle plus title. */
|
|
9
|
+
handleHeight: number;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Three sheet heights, shortest first. Minimum is the handle. Middle puts the
|
|
13
|
+
* sheet top at half the screen. Maximum stops at the bottom of the header.
|
|
14
|
+
* Pure so it can be unit-tested.
|
|
15
|
+
*/
|
|
16
|
+
export declare function formSheetSnapPoints({ windowHeight, sheetAreaHeight, headerHeight, handleHeight, }: FormSheetSnapInput): [number, number, number];
|
|
17
|
+
/**
|
|
18
|
+
* How far the error banner reaches into the expanded sheet's scroll area,
|
|
19
|
+
* whose top sits `scrollTop` below the screen top (header plus handle).
|
|
20
|
+
* A banner row scrolls its field this much further so it is not hidden.
|
|
21
|
+
*/
|
|
22
|
+
export declare function sheetBannerOverlap(bannerHeight: number, scrollTop: number): number;
|
|
23
|
+
/** Handle heights before the first layout pass measures the real one. */
|
|
24
|
+
export declare const FORM_SHEET_HANDLE_FALLBACK: {
|
|
25
|
+
/** Drag indicator and padding. */
|
|
26
|
+
readonly indicatorOnly: 36;
|
|
27
|
+
/** Indicator plus one title line. */
|
|
28
|
+
readonly withTitle: 64;
|
|
29
|
+
};
|
|
30
|
+
/** The collapsed stop is the handle, so it must fit the title when there is one. */
|
|
31
|
+
export declare function formSheetHandleFallback(hasTitle: boolean): number;
|
|
32
|
+
//# sourceMappingURL=formSheetLayout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formSheetLayout.d.ts","sourceRoot":"","sources":["../../../src/components/FormSheet/formSheetLayout.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,kBAAkB,GAAG;IAC/B,4EAA4E;IAC5E,YAAY,EAAE,MAAM,CAAC;IACrB,8EAA8E;IAC9E,eAAe,EAAE,MAAM,CAAC;IACxB,qDAAqD;IACrD,YAAY,EAAE,MAAM,CAAC;IACrB,+CAA+C;IAC/C,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,YAAY,EACZ,eAAe,EACf,YAAY,EACZ,YAAY,GACb,EAAE,kBAAkB,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAS/C;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,YAAY,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAElF;AAED,yEAAyE;AACzE,eAAO,MAAM,0BAA0B;IACrC,kCAAkC;;IAElC,qCAAqC;;CAE7B,CAAC;AAEX,oFAAoF;AACpF,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,OAAO,GAAG,MAAM,CAIjE"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FORM_SHEET_HANDLE_FALLBACK = void 0;
|
|
4
|
+
exports.formSheetSnapPoints = formSheetSnapPoints;
|
|
5
|
+
exports.sheetBannerOverlap = sheetBannerOverlap;
|
|
6
|
+
exports.formSheetHandleFallback = formSheetHandleFallback;
|
|
7
|
+
/**
|
|
8
|
+
* Three sheet heights, shortest first. Minimum is the handle. Middle puts the
|
|
9
|
+
* sheet top at half the screen. Maximum stops at the bottom of the header.
|
|
10
|
+
* Pure so it can be unit-tested.
|
|
11
|
+
*/
|
|
12
|
+
function formSheetSnapPoints({ windowHeight, sheetAreaHeight, headerHeight, handleHeight, }) {
|
|
13
|
+
const collapsed = Math.max(1, Math.round(handleHeight));
|
|
14
|
+
const full = Math.max(collapsed, Math.round(sheetAreaHeight - headerHeight));
|
|
15
|
+
const halfRaw = Math.round(sheetAreaHeight - windowHeight / 2);
|
|
16
|
+
// The sheet needs three distinct, increasing stops even when there is
|
|
17
|
+
// almost no room, so nudge each one above the last.
|
|
18
|
+
const half = Math.max(collapsed + 1, Math.min(full, halfRaw));
|
|
19
|
+
const top = Math.max(half + 1, full);
|
|
20
|
+
return [collapsed, half, top];
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* How far the error banner reaches into the expanded sheet's scroll area,
|
|
24
|
+
* whose top sits `scrollTop` below the screen top (header plus handle).
|
|
25
|
+
* A banner row scrolls its field this much further so it is not hidden.
|
|
26
|
+
*/
|
|
27
|
+
function sheetBannerOverlap(bannerHeight, scrollTop) {
|
|
28
|
+
return Math.max(0, bannerHeight - scrollTop);
|
|
29
|
+
}
|
|
30
|
+
/** Handle heights before the first layout pass measures the real one. */
|
|
31
|
+
exports.FORM_SHEET_HANDLE_FALLBACK = {
|
|
32
|
+
/** Drag indicator and padding. */
|
|
33
|
+
indicatorOnly: 36,
|
|
34
|
+
/** Indicator plus one title line. */
|
|
35
|
+
withTitle: 64,
|
|
36
|
+
};
|
|
37
|
+
/** The collapsed stop is the handle, so it must fit the title when there is one. */
|
|
38
|
+
function formSheetHandleFallback(hasTitle) {
|
|
39
|
+
return hasTitle
|
|
40
|
+
? exports.FORM_SHEET_HANDLE_FALLBACK.withTitle
|
|
41
|
+
: exports.FORM_SHEET_HANDLE_FALLBACK.indicatorOnly;
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=formSheetLayout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formSheetLayout.js","sourceRoot":"","sources":["../../../src/components/FormSheet/formSheetLayout.ts"],"names":[],"mappings":";;;AAgBA,kDAcC;AAOD,gDAEC;AAWD,0DAIC;AA3CD;;;;GAIG;AACH,SAAgB,mBAAmB,CAAC,EAClC,YAAY,EACZ,eAAe,EACf,YAAY,EACZ,YAAY,GACO;IACnB,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC;IACxD,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,eAAe,GAAG,YAAY,CAAC,CAAC,CAAC;IAC7E,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,eAAe,GAAG,YAAY,GAAG,CAAC,CAAC,CAAC;IAC/D,sEAAsE;IACtE,oDAAoD;IACpD,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,SAAS,GAAG,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC;IAC9D,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,EAAE,IAAI,CAAC,CAAC;IACrC,OAAO,CAAC,SAAS,EAAE,IAAI,EAAE,GAAG,CAAC,CAAC;AAChC,CAAC;AAED;;;;GAIG;AACH,SAAgB,kBAAkB,CAAC,YAAoB,EAAE,SAAiB;IACxE,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,YAAY,GAAG,SAAS,CAAC,CAAC;AAC/C,CAAC;AAED,yEAAyE;AAC5D,QAAA,0BAA0B,GAAG;IACxC,kCAAkC;IAClC,aAAa,EAAE,EAAE;IACjB,qCAAqC;IACrC,SAAS,EAAE,EAAE;CACL,CAAC;AAEX,oFAAoF;AACpF,SAAgB,uBAAuB,CAAC,QAAiB;IACvD,OAAO,QAAQ;QACb,CAAC,CAAC,kCAA0B,CAAC,SAAS;QACtC,CAAC,CAAC,kCAA0B,CAAC,aAAa,CAAC;AAC/C,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const FORM_SHEET_THEME_ROLES: {
|
|
2
|
+
readonly backgroundColor: "formSheetBackground";
|
|
3
|
+
readonly titleColor: "formSheetTitle";
|
|
4
|
+
readonly footerBackgroundColor: "formSheetFooterBackground";
|
|
5
|
+
readonly handleColor: "formSheetHandle";
|
|
6
|
+
};
|
|
7
|
+
export type FormSheetThemeColorProp = keyof typeof FORM_SHEET_THEME_ROLES;
|
|
8
|
+
//# sourceMappingURL=formSheetThemeRoles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formSheetThemeRoles.d.ts","sourceRoot":"","sources":["../../../src/components/FormSheet/formSheetThemeRoles.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,sBAAsB;;;;;CAKzB,CAAC;AAEX,MAAM,MAAM,uBAAuB,GAAG,MAAM,OAAO,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FORM_SHEET_THEME_ROLES = void 0;
|
|
4
|
+
exports.FORM_SHEET_THEME_ROLES = {
|
|
5
|
+
backgroundColor: "formSheetBackground",
|
|
6
|
+
titleColor: "formSheetTitle",
|
|
7
|
+
footerBackgroundColor: "formSheetFooterBackground",
|
|
8
|
+
handleColor: "formSheetHandle",
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=formSheetThemeRoles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formSheetThemeRoles.js","sourceRoot":"","sources":["../../../src/components/FormSheet/formSheetThemeRoles.ts"],"names":[],"mappings":";;;AAAa,QAAA,sBAAsB,GAAG;IACpC,eAAe,EAAE,qBAAqB;IACtC,UAAU,EAAE,gBAAgB;IAC5B,qBAAqB,EAAE,2BAA2B;IAClD,WAAW,EAAE,iBAAiB;CACtB,CAAC"}
|