@studio-piot/native-ui 0.2.5 → 0.16.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 +8 -0
- package/dist/components/Choice/Choice.d.ts.map +1 -0
- package/dist/components/Choice/Choice.js +60 -0
- package/dist/components/Choice/Choice.js.map +1 -0
- package/dist/components/Choice/choiceLayout.d.ts +7 -0
- package/dist/components/Choice/choiceLayout.d.ts.map +1 -0
- package/dist/components/Choice/choiceLayout.js +13 -0
- package/dist/components/Choice/choiceLayout.js.map +1 -0
- package/dist/components/Choice/choiceThemeRoles.d.ts +8 -0
- package/dist/components/Choice/choiceThemeRoles.d.ts.map +1 -0
- package/dist/components/Choice/choiceThemeRoles.js +10 -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 +26 -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 +88 -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 +109 -0
- package/src/components/Choice/choiceLayout.test.ts +14 -0
- package/src/components/Choice/choiceLayout.ts +9 -0
- package/src/components/Choice/choiceThemeRoles.test.ts +14 -0
- package/src/components/Choice/choiceThemeRoles.ts +8 -0
- package/src/components/Choice/index.ts +4 -0
- package/src/components/Choice/types.ts +26 -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
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PageBleed = PageBleed;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_native_1 = require("react-native");
|
|
6
|
+
const pageContext_1 = require("./pageContext");
|
|
7
|
+
const pageInsets_1 = require("./pageInsets");
|
|
8
|
+
/** Takes one section of a `Page` out to the screen edges, e.g. a full-width image or map. */
|
|
9
|
+
function PageBleed({ children, style }) {
|
|
10
|
+
return (0, jsx_runtime_1.jsx)(react_native_1.View, { style: [(0, pageInsets_1.pageBleedStyle)((0, pageContext_1.usePageSideInset)()), style], children: children });
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=PageBleed.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PageBleed.js","sourceRoot":"","sources":["../../../src/components/Page/PageBleed.tsx"],"names":[],"mappings":";;AAWA,8BAEC;;AAbD,+CAAoE;AAEpE,+CAAiD;AACjD,6CAA8C;AAO9C,6FAA6F;AAC7F,SAAgB,SAAS,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAkB;IAC3D,OAAO,uBAAC,mBAAI,IAAC,KAAK,EAAE,CAAC,IAAA,2BAAc,EAAC,IAAA,8BAAgB,GAAE,CAAC,EAAE,KAAK,CAAC,YAAG,QAAQ,GAAQ,CAAC;AACrF,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { Page } from "./Page";
|
|
2
|
+
export { PageBleed, type PageBleedProps } from "./PageBleed";
|
|
3
|
+
export { PAGE_THEME_ROLES, type PageThemeColorProp } from "./pageThemeRoles";
|
|
4
|
+
export type { PageProps, PageTabAccessory } from "./types";
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Page/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,KAAK,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAC7E,YAAY,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PAGE_THEME_ROLES = exports.PageBleed = exports.Page = void 0;
|
|
4
|
+
var Page_1 = require("./Page");
|
|
5
|
+
Object.defineProperty(exports, "Page", { enumerable: true, get: function () { return Page_1.Page; } });
|
|
6
|
+
var PageBleed_1 = require("./PageBleed");
|
|
7
|
+
Object.defineProperty(exports, "PageBleed", { enumerable: true, get: function () { return PageBleed_1.PageBleed; } });
|
|
8
|
+
var pageThemeRoles_1 = require("./pageThemeRoles");
|
|
9
|
+
Object.defineProperty(exports, "PAGE_THEME_ROLES", { enumerable: true, get: function () { return pageThemeRoles_1.PAGE_THEME_ROLES; } });
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Page/index.ts"],"names":[],"mappings":";;;AAAA,+BAA8B;AAArB,4FAAA,IAAI,OAAA;AACb,yCAA6D;AAApD,sGAAA,SAAS,OAAA;AAClB,mDAA6E;AAApE,kHAAA,gBAAgB,OAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pageContext.d.ts","sourceRoot":"","sources":["../../../src/components/Page/pageContext.ts"],"names":[],"mappings":"AAEA,iEAAiE;AACjE,eAAO,MAAM,gBAAgB,iCAAmB,CAAC;AAEjD,wBAAgB,gBAAgB,IAAI,MAAM,CAEzC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PageInsetContext = void 0;
|
|
4
|
+
exports.usePageSideInset = usePageSideInset;
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
/** Side inset of the nearest `Page` content, for `PageBleed`. */
|
|
7
|
+
exports.PageInsetContext = (0, react_1.createContext)(0);
|
|
8
|
+
function usePageSideInset() {
|
|
9
|
+
return (0, react_1.useContext)(exports.PageInsetContext);
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=pageContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pageContext.js","sourceRoot":"","sources":["../../../src/components/Page/pageContext.ts"],"names":[],"mappings":";;;AAKA,4CAEC;AAPD,iCAAkD;AAElD,iEAAiE;AACpD,QAAA,gBAAgB,GAAG,IAAA,qBAAa,EAAC,CAAC,CAAC,CAAC;AAEjD,SAAgB,gBAAgB;IAC9B,OAAO,IAAA,kBAAU,EAAC,wBAAgB,CAAC,CAAC;AACtC,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/** Side padding the page content actually has. Pure so it can be unit-tested. */
|
|
2
|
+
export declare function pageSideInset(padded: boolean, screen: number): number;
|
|
3
|
+
/** Pulls a section out to the screen edges by cancelling the page side inset. */
|
|
4
|
+
export declare function pageBleedStyle(sideInset: number): {
|
|
5
|
+
marginHorizontal: number;
|
|
6
|
+
};
|
|
7
|
+
export type PageInsets = {
|
|
8
|
+
top?: number;
|
|
9
|
+
left?: number;
|
|
10
|
+
bottom?: number;
|
|
11
|
+
right?: number;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* iOS adds `contentInset` on top of the automatic inset, so a negative top
|
|
15
|
+
* equal to the header height cancels only the header clearance; the tab
|
|
16
|
+
* bar clearance stays automatic. Android has no automatic inset, so there
|
|
17
|
+
* is nothing to cancel. Pure so it can be unit-tested.
|
|
18
|
+
*/
|
|
19
|
+
export declare function pageContentInset(os: string, contentUnderHeader: number | undefined, contentInset: PageInsets | undefined): PageInsets | undefined;
|
|
20
|
+
/** Gap above the first item. None when the content starts under the header. */
|
|
21
|
+
export declare function pagePaddingTop({ padded, underHeader, pageTop, }: {
|
|
22
|
+
padded: boolean;
|
|
23
|
+
underHeader: boolean;
|
|
24
|
+
pageTop: number;
|
|
25
|
+
}): number;
|
|
26
|
+
//# sourceMappingURL=pageInsets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pageInsets.d.ts","sourceRoot":"","sources":["../../../src/components/Page/pageInsets.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,wBAAgB,aAAa,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAErE;AAED,iFAAiF;AACjF,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG;IAAE,gBAAgB,EAAE,MAAM,CAAA;CAAE,CAG9E;AAED,MAAM,MAAM,UAAU,GAAG;IACvB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC9B,EAAE,EAAE,MAAM,EACV,kBAAkB,EAAE,MAAM,GAAG,SAAS,EACtC,YAAY,EAAE,UAAU,GAAG,SAAS,GACnC,UAAU,GAAG,SAAS,CAUxB;AAED,+EAA+E;AAC/E,wBAAgB,cAAc,CAAC,EAC7B,MAAM,EACN,WAAW,EACX,OAAO,GACR,EAAE;IACD,MAAM,EAAE,OAAO,CAAC;IAChB,WAAW,EAAE,OAAO,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;CACjB,GAAG,MAAM,CAET"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.pageSideInset = pageSideInset;
|
|
4
|
+
exports.pageBleedStyle = pageBleedStyle;
|
|
5
|
+
exports.pageContentInset = pageContentInset;
|
|
6
|
+
exports.pagePaddingTop = pagePaddingTop;
|
|
7
|
+
/** Side padding the page content actually has. Pure so it can be unit-tested. */
|
|
8
|
+
function pageSideInset(padded, screen) {
|
|
9
|
+
return padded ? screen : 0;
|
|
10
|
+
}
|
|
11
|
+
/** Pulls a section out to the screen edges by cancelling the page side inset. */
|
|
12
|
+
function pageBleedStyle(sideInset) {
|
|
13
|
+
// `0 - 0` keeps +0 rather than -0, so equality checks stay simple.
|
|
14
|
+
return { marginHorizontal: sideInset === 0 ? 0 : -sideInset };
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* iOS adds `contentInset` on top of the automatic inset, so a negative top
|
|
18
|
+
* equal to the header height cancels only the header clearance; the tab
|
|
19
|
+
* bar clearance stays automatic. Android has no automatic inset, so there
|
|
20
|
+
* is nothing to cancel. Pure so it can be unit-tested.
|
|
21
|
+
*/
|
|
22
|
+
function pageContentInset(os, contentUnderHeader, contentInset) {
|
|
23
|
+
if (contentUnderHeader == null || os !== "ios") {
|
|
24
|
+
return contentInset;
|
|
25
|
+
}
|
|
26
|
+
return {
|
|
27
|
+
top: (contentInset?.top ?? 0) - contentUnderHeader,
|
|
28
|
+
left: contentInset?.left ?? 0,
|
|
29
|
+
bottom: contentInset?.bottom ?? 0,
|
|
30
|
+
right: contentInset?.right ?? 0,
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
/** Gap above the first item. None when the content starts under the header. */
|
|
34
|
+
function pagePaddingTop({ padded, underHeader, pageTop, }) {
|
|
35
|
+
return padded && !underHeader ? pageTop : 0;
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=pageInsets.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pageInsets.js","sourceRoot":"","sources":["../../../src/components/Page/pageInsets.ts"],"names":[],"mappings":";;AACA,sCAEC;AAGD,wCAGC;AAeD,4CAcC;AAGD,wCAUC;AAnDD,iFAAiF;AACjF,SAAgB,aAAa,CAAC,MAAe,EAAE,MAAc;IAC3D,OAAO,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AAC7B,CAAC;AAED,iFAAiF;AACjF,SAAgB,cAAc,CAAC,SAAiB;IAC9C,mEAAmE;IACnE,OAAO,EAAE,gBAAgB,EAAE,SAAS,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC;AAChE,CAAC;AASD;;;;;GAKG;AACH,SAAgB,gBAAgB,CAC9B,EAAU,EACV,kBAAsC,EACtC,YAAoC;IAEpC,IAAI,kBAAkB,IAAI,IAAI,IAAI,EAAE,KAAK,KAAK,EAAE,CAAC;QAC/C,OAAO,YAAY,CAAC;IACtB,CAAC;IACD,OAAO;QACL,GAAG,EAAE,CAAC,YAAY,EAAE,GAAG,IAAI,CAAC,CAAC,GAAG,kBAAkB;QAClD,IAAI,EAAE,YAAY,EAAE,IAAI,IAAI,CAAC;QAC7B,MAAM,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;QACjC,KAAK,EAAE,YAAY,EAAE,KAAK,IAAI,CAAC;KAChC,CAAC;AACJ,CAAC;AAED,+EAA+E;AAC/E,SAAgB,cAAc,CAAC,EAC7B,MAAM,EACN,WAAW,EACX,OAAO,GAKR;IACC,OAAO,MAAM,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;AAC9C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pageLayout.d.ts","sourceRoot":"","sources":["../../../src/components/Page/pageLayout.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,eAAO,MAAM,gBAAgB,KAAK,CAAC;AACnC,6DAA6D;AAC7D,eAAO,MAAM,mBAAmB,KAAK,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PAGE_PADDING_BOTTOM = exports.PAGE_PADDING_TOP = void 0;
|
|
4
|
+
/** Gap between the header (or large title) and the first item. */
|
|
5
|
+
exports.PAGE_PADDING_TOP = 16;
|
|
6
|
+
/** Gap after the last item, inside the tab bar clearance. */
|
|
7
|
+
exports.PAGE_PADDING_BOTTOM = 24;
|
|
8
|
+
//# sourceMappingURL=pageLayout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pageLayout.js","sourceRoot":"","sources":["../../../src/components/Page/pageLayout.ts"],"names":[],"mappings":";;;AAAA,kEAAkE;AACrD,QAAA,gBAAgB,GAAG,EAAE,CAAC;AACnC,6DAA6D;AAChD,QAAA,mBAAmB,GAAG,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pageThemeRoles.d.ts","sourceRoot":"","sources":["../../../src/components/Page/pageThemeRoles.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB;;CAEnB,CAAC;AAEX,MAAM,MAAM,kBAAkB,GAAG,MAAM,OAAO,gBAAgB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pageThemeRoles.js","sourceRoot":"","sources":["../../../src/components/Page/pageThemeRoles.ts"],"names":[],"mappings":";;;AAAa,QAAA,gBAAgB,GAAG;IAC9B,eAAe,EAAE,gBAAgB;CACzB,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { ReactNode, Ref } from "react";
|
|
2
|
+
import type { ScrollView, ScrollViewProps } from "react-native";
|
|
3
|
+
import type { TabAccessoryButtonProps } from "../TabAccessoryButton/types";
|
|
4
|
+
/** The in-screen `TabAccessoryButton` (Android and iOS 18 and earlier). */
|
|
5
|
+
export type PageTabAccessory = Omit<TabAccessoryButtonProps, "placement" | "variant" | "color">;
|
|
6
|
+
export type PageProps = Omit<ScrollViewProps, "contentInsetAdjustmentBehavior"> & {
|
|
7
|
+
children?: ReactNode;
|
|
8
|
+
ref?: Ref<ScrollView>;
|
|
9
|
+
/** Renders the floating fallback pill and adds bottom room for it. */
|
|
10
|
+
tabAccessory?: PageTabAccessory;
|
|
11
|
+
/** Screen fill. Defaults to theme role `background`. */
|
|
12
|
+
backgroundColor?: string;
|
|
13
|
+
/** Screen-edge, top and bottom padding on the content. Default `true`. */
|
|
14
|
+
padded?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Start the content at the very top, behind the header, e.g. for a hero
|
|
17
|
+
* image. Pass the header height: `useHeaderHeight()` from
|
|
18
|
+
* `expo-router/react-navigation`. The tab bar clearance is kept.
|
|
19
|
+
*/
|
|
20
|
+
contentUnderHeader?: number;
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/Page/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,KAAK,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAE3E,2EAA2E;AAC3E,MAAM,MAAM,gBAAgB,GAAG,IAAI,CACjC,uBAAuB,EACvB,WAAW,GAAG,SAAS,GAAG,OAAO,CAClC,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,IAAI,CAAC,eAAe,EAAE,gCAAgC,CAAC,GAAG;IAChF,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,GAAG,CAAC,EAAE,GAAG,CAAC,UAAU,CAAC,CAAC;IACtB,sEAAsE;IACtE,YAAY,CAAC,EAAE,gBAAgB,CAAC;IAChC,wDAAwD;IACxD,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,0EAA0E;IAC1E,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/components/Page/types.ts"],"names":[],"mappings":""}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { SelectProps } from "./types";
|
|
2
2
|
export declare function Select({ name, value, onChange, options, placeholder, label, description, error, sheetTitle, closeButton,
|
|
3
3
|
/** Max sheet height as a fraction of the window (largest value wins). Default `[0.25, 0.5, 0.75]` → 75%. */
|
|
4
|
-
detents, initialDetent: _initialDetent, radius, editable, backgroundColor: backgroundColorProp, textColor: textColorProp, placeholderColor: placeholderColorProp, labelColor: labelColorProp, descriptionColor: descriptionColorProp, borderColor: borderColorProp, errorColor: errorColorProp, selectedColor: selectedColorProp, style, }: SelectProps): import("react").JSX.Element;
|
|
4
|
+
detents, initialDetent: _initialDetent, radius, editable, backgroundColor: backgroundColorProp, textColor: textColorProp, placeholderColor: placeholderColorProp, labelColor: labelColorProp, descriptionColor: descriptionColorProp, borderColor: borderColorProp, errorColor: errorColorProp, selectedColor: selectedColorProp, closeBackgroundColor: closeBackgroundColorProp, closeIconColor: closeIconColorProp, style, }: SelectProps): import("react").JSX.Element;
|
|
5
5
|
//# sourceMappingURL=Select.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../src/components/Select/Select.tsx"],"names":[],"mappings":"AAkCA,OAAO,KAAK,EAAgB,WAAW,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../src/components/Select/Select.tsx"],"names":[],"mappings":"AAkCA,OAAO,KAAK,EAAgB,WAAW,EAAE,MAAM,SAAS,CAAC;AAYzD,wBAAgB,MAAM,CAAC,EACrB,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,OAAO,EACP,WAAgC,EAChC,KAAK,EACL,WAAW,EACX,KAAK,EACL,UAAU,EACV,WAAW;AACX,4GAA4G;AAC5G,OAAqC,EACrC,aAAa,EAAE,cAAc,EAC7B,MAAa,EACb,QAAe,EACf,eAAe,EAAE,mBAAmB,EACpC,SAAS,EAAE,aAAa,EACxB,gBAAgB,EAAE,oBAAoB,EACtC,UAAU,EAAE,cAAc,EAC1B,gBAAgB,EAAE,oBAAoB,EACtC,WAAW,EAAE,eAAe,EAC5B,UAAU,EAAE,cAAc,EAC1B,aAAa,EAAE,iBAAiB,EAChC,oBAAoB,EAAE,wBAAwB,EAC9C,cAAc,EAAE,kBAAkB,EAClC,KAAK,GACN,EAAE,WAAW,+BAkQb"}
|
|
@@ -6,15 +6,14 @@ const react_1 = require("react");
|
|
|
6
6
|
const react_native_1 = require("react-native");
|
|
7
7
|
const bottom_sheet_1 = require("@gorhom/bottom-sheet");
|
|
8
8
|
const react_native_screens_1 = require("react-native-screens");
|
|
9
|
+
const sheet_1 = require("../../layout/sheet");
|
|
9
10
|
const buttonRadius_1 = require("../Button/buttonRadius");
|
|
10
11
|
const ErrorBanner_1 = require("../ErrorBanner");
|
|
11
12
|
const useResolvedFieldColor_1 = require("../Field/useResolvedFieldColor");
|
|
12
|
-
const useThemeColor_1 = require("../../theme/useThemeColor");
|
|
13
13
|
const resolveSelectDetentIndex_1 = require("./resolveSelectDetentIndex");
|
|
14
14
|
const SelectCloseButton_1 = require("./SelectCloseButton");
|
|
15
15
|
const selectThemeRoles_1 = require("./selectThemeRoles");
|
|
16
16
|
const BACKDROP_OPACITY = 0.72;
|
|
17
|
-
const SHEET_TOP_RADIUS = 20;
|
|
18
17
|
/** Renders the sheet above React Navigation native modals (iOS). */
|
|
19
18
|
function SheetContainer({ children }) {
|
|
20
19
|
if (react_native_1.Platform.OS === "ios") {
|
|
@@ -24,7 +23,7 @@ function SheetContainer({ children }) {
|
|
|
24
23
|
}
|
|
25
24
|
function Select({ name, value, onChange, options, placeholder = "Select an option", label, description, error, sheetTitle, closeButton,
|
|
26
25
|
/** Max sheet height as a fraction of the window (largest value wins). Default `[0.25, 0.5, 0.75]` → 75%. */
|
|
27
|
-
detents = [...resolveSelectDetentIndex_1.DEFAULT_SELECT_DETENTS], initialDetent: _initialDetent, radius = "xl", editable = true, backgroundColor: backgroundColorProp, textColor: textColorProp, placeholderColor: placeholderColorProp, labelColor: labelColorProp, descriptionColor: descriptionColorProp, borderColor: borderColorProp, errorColor: errorColorProp, selectedColor: selectedColorProp, style, }) {
|
|
26
|
+
detents = [...resolveSelectDetentIndex_1.DEFAULT_SELECT_DETENTS], initialDetent: _initialDetent, radius = "xl", editable = true, backgroundColor: backgroundColorProp, textColor: textColorProp, placeholderColor: placeholderColorProp, labelColor: labelColorProp, descriptionColor: descriptionColorProp, borderColor: borderColorProp, errorColor: errorColorProp, selectedColor: selectedColorProp, closeBackgroundColor: closeBackgroundColorProp, closeIconColor: closeIconColorProp, style, }) {
|
|
28
27
|
const modalRef = (0, react_1.useRef)(null);
|
|
29
28
|
const { height: windowHeight } = (0, react_native_1.useWindowDimensions)();
|
|
30
29
|
const backgroundColor = (0, useResolvedFieldColor_1.useResolvedFieldColor)(backgroundColorProp, selectThemeRoles_1.SELECT_THEME_ROLES.backgroundColor);
|
|
@@ -36,8 +35,8 @@ detents = [...resolveSelectDetentIndex_1.DEFAULT_SELECT_DETENTS], initialDetent:
|
|
|
36
35
|
const errorColor = (0, useResolvedFieldColor_1.useResolvedFieldColor)(errorColorProp, selectThemeRoles_1.SELECT_THEME_ROLES.errorColor);
|
|
37
36
|
const selectedColor = (0, useResolvedFieldColor_1.useResolvedFieldColor)(selectedColorProp, selectThemeRoles_1.SELECT_THEME_ROLES.selectedColor);
|
|
38
37
|
// Resolved on the trigger tree (has ThemeProvider), then passed into the portal.
|
|
39
|
-
const closeDiscColor = (0,
|
|
40
|
-
const closeIconColor = (0,
|
|
38
|
+
const closeDiscColor = (0, useResolvedFieldColor_1.useResolvedFieldColor)(closeBackgroundColorProp, selectThemeRoles_1.SELECT_THEME_ROLES.closeBackgroundColor);
|
|
39
|
+
const closeIconColor = (0, useResolvedFieldColor_1.useResolvedFieldColor)(closeIconColorProp, selectThemeRoles_1.SELECT_THEME_ROLES.closeIconColor);
|
|
41
40
|
const dismissBanner = (0, ErrorBanner_1.useErrorBannerDismiss)();
|
|
42
41
|
const { viewRef, listed } = (0, ErrorBanner_1.useErrorBannerField)(name, () => {
|
|
43
42
|
modalRef.current?.present();
|
|
@@ -70,8 +69,8 @@ detents = [...resolveSelectDetentIndex_1.DEFAULT_SELECT_DETENTS], initialDetent:
|
|
|
70
69
|
styles.handleRoot,
|
|
71
70
|
{
|
|
72
71
|
backgroundColor,
|
|
73
|
-
borderTopLeftRadius: SHEET_TOP_RADIUS,
|
|
74
|
-
borderTopRightRadius: SHEET_TOP_RADIUS,
|
|
72
|
+
borderTopLeftRadius: sheet_1.SHEET_TOP_RADIUS,
|
|
73
|
+
borderTopRightRadius: sheet_1.SHEET_TOP_RADIUS,
|
|
75
74
|
},
|
|
76
75
|
], children: [(0, jsx_runtime_1.jsx)(bottom_sheet_1.BottomSheetHandle, { ...props, indicatorStyle: {
|
|
77
76
|
backgroundColor: placeholderColor,
|
|
@@ -103,8 +102,8 @@ detents = [...resolveSelectDetentIndex_1.DEFAULT_SELECT_DETENTS], initialDetent:
|
|
|
103
102
|
{ color: isPlaceholder ? placeholderColor : textColor, flex: 1 },
|
|
104
103
|
], children: display }), (0, jsx_runtime_1.jsx)(react_native_1.Text, { accessibilityElementsHidden: true, importantForAccessibility: "no", style: [styles.chevron, { color: placeholderColor }], children: "\u203A" })] }), inlineError ? ((0, jsx_runtime_1.jsx)(react_native_1.Text, { style: [styles.helper, { color: errorColor }], children: inlineError })) : description ? ((0, jsx_runtime_1.jsx)(react_native_1.Text, { style: [styles.helper, { color: descriptionColor }], children: description })) : null, (0, jsx_runtime_1.jsx)(bottom_sheet_1.BottomSheetModal, { ref: modalRef, backdropComponent: renderBackdrop, backgroundStyle: {
|
|
105
104
|
backgroundColor,
|
|
106
|
-
borderTopLeftRadius: SHEET_TOP_RADIUS,
|
|
107
|
-
borderTopRightRadius: SHEET_TOP_RADIUS,
|
|
105
|
+
borderTopLeftRadius: sheet_1.SHEET_TOP_RADIUS,
|
|
106
|
+
borderTopRightRadius: sheet_1.SHEET_TOP_RADIUS,
|
|
108
107
|
}, containerComponent: SheetContainer, enableDynamicSizing: true, enablePanDownToClose: true, handleComponent: renderHandle, handleStyle: styles.handleShell, maxDynamicContentSize: maxDynamicContentSize, stackBehavior: "push", children: (0, jsx_runtime_1.jsx)(bottom_sheet_1.BottomSheetScrollView, { contentContainerStyle: styles.sheetContent, enableFooterMarginAdjustment: false, children: options.length === 0 ? ((0, jsx_runtime_1.jsx)(react_native_1.Text, { style: [styles.empty, { color: placeholderColor }], children: "No options" })) : (options.map((option) => {
|
|
109
108
|
const isSelected = option.value === value;
|
|
110
109
|
return ((0, jsx_runtime_1.jsxs)(react_native_1.Pressable, { accessibilityRole: "button", accessibilityState: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.js","sourceRoot":"","sources":["../../../src/components/Select/Select.tsx"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"Select.js","sourceRoot":"","sources":["../../../src/components/Select/Select.tsx"],"names":[],"mappings":";;AA8CA,wBA6RC;;AA3UD,iCAMe;AACf,+CAOsB;AACtB,uDAO8B;AAC9B,+DAAyD;AACzD,8CAAsD;AACtD,yDAA2D;AAC3D,gDAGwB;AACxB,0EAA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AE,EAAE;KACb;IACD,WAAW,EAAE;QACX,aAAa,EAAE,CAAC;KACjB;IACD,UAAU,EAAE;QACV,QAAQ,EAAE,QAAQ;KACnB;IACD,YAAY,EAAE;QACZ,aAAa,EAAE,EAAE;KAClB;IACD,MAAM,EAAE;QACN,aAAa,EAAE,KAAK;QACpB,UAAU,EAAE,QAAQ;QACpB,GAAG,EAAE,EAAE;QACP,iBAAiB,EAAE,EAAE;QACrB,UAAU,EAAE,CAAC;QACb,aAAa,EAAE,EAAE;KAClB;IACD,aAAa,EAAE;QACb,MAAM,EAAE,yBAAU,CAAC,aAAa;KACjC;IACD,UAAU,EAAE;QACV,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,KAAK;KAClB;IACD,KAAK,EAAE;QACL,QAAQ,EAAE,EAAE;QACZ,iBAAiB,EAAE,EAAE;QACrB,eAAe,EAAE,EAAE;KACpB;IACD,MAAM,EAAE;QACN,SAAS,EAAE,EAAE;QACb,iBAAiB,EAAE,EAAE;QACrB,aAAa,EAAE,KAAK;QACpB,UAAU,EAAE,QAAQ;QACpB,GAAG,EAAE,EAAE;KACR;IACD,aAAa,EAAE;QACb,OAAO,EAAE,GAAG;KACb;IACD,WAAW,EAAE;QACX,QAAQ,EAAE,EAAE;KACb;IACD,KAAK,EAAE;QACL,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,KAAK;KAClB;CACF,CAAC,CAAC"}
|
|
@@ -7,6 +7,8 @@ export declare const SELECT_THEME_ROLES: {
|
|
|
7
7
|
readonly borderColor: "fieldBorder";
|
|
8
8
|
readonly errorColor: "fieldError";
|
|
9
9
|
readonly selectedColor: "fieldSelectSelected";
|
|
10
|
+
readonly closeBackgroundColor: "selectCloseBackground";
|
|
11
|
+
readonly closeIconColor: "selectCloseIcon";
|
|
10
12
|
};
|
|
11
13
|
export type SelectThemeColorProp = keyof typeof SELECT_THEME_ROLES;
|
|
12
14
|
//# sourceMappingURL=selectThemeRoles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selectThemeRoles.d.ts","sourceRoot":"","sources":["../../../src/components/Select/selectThemeRoles.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB
|
|
1
|
+
{"version":3,"file":"selectThemeRoles.d.ts","sourceRoot":"","sources":["../../../src/components/Select/selectThemeRoles.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB;;;;;;;;;;;CAWrB,CAAC;AAEX,MAAM,MAAM,oBAAoB,GAAG,MAAM,OAAO,kBAAkB,CAAC"}
|
|
@@ -10,5 +10,7 @@ exports.SELECT_THEME_ROLES = {
|
|
|
10
10
|
borderColor: "fieldBorder",
|
|
11
11
|
errorColor: "fieldError",
|
|
12
12
|
selectedColor: "fieldSelectSelected",
|
|
13
|
+
closeBackgroundColor: "selectCloseBackground",
|
|
14
|
+
closeIconColor: "selectCloseIcon",
|
|
13
15
|
};
|
|
14
16
|
//# sourceMappingURL=selectThemeRoles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selectThemeRoles.js","sourceRoot":"","sources":["../../../src/components/Select/selectThemeRoles.ts"],"names":[],"mappings":";;;AAAa,QAAA,kBAAkB,GAAG;IAChC,eAAe,EAAE,iBAAiB;IAClC,SAAS,EAAE,WAAW;IACtB,gBAAgB,EAAE,kBAAkB;IACpC,UAAU,EAAE,YAAY;IACxB,gBAAgB,EAAE,kBAAkB;IACpC,WAAW,EAAE,aAAa;IAC1B,UAAU,EAAE,YAAY;IACxB,aAAa,EAAE,qBAAqB;
|
|
1
|
+
{"version":3,"file":"selectThemeRoles.js","sourceRoot":"","sources":["../../../src/components/Select/selectThemeRoles.ts"],"names":[],"mappings":";;;AAAa,QAAA,kBAAkB,GAAG;IAChC,eAAe,EAAE,iBAAiB;IAClC,SAAS,EAAE,WAAW;IACtB,gBAAgB,EAAE,kBAAkB;IACpC,UAAU,EAAE,YAAY;IACxB,gBAAgB,EAAE,kBAAkB;IACpC,WAAW,EAAE,aAAa;IAC1B,UAAU,EAAE,YAAY;IACxB,aAAa,EAAE,qBAAqB;IACpC,oBAAoB,EAAE,uBAAuB;IAC7C,cAAc,EAAE,iBAAiB;CACzB,CAAC"}
|
|
@@ -34,6 +34,10 @@ export type SelectProps = {
|
|
|
34
34
|
borderColor?: string;
|
|
35
35
|
errorColor?: string;
|
|
36
36
|
selectedColor?: string;
|
|
37
|
+
/** Sheet close disc. Defaults to theme role `selectCloseBackground`. */
|
|
38
|
+
closeBackgroundColor?: string;
|
|
39
|
+
/** Sheet close cross. Defaults to theme role `selectCloseIcon`. */
|
|
40
|
+
closeIconColor?: string;
|
|
37
41
|
style?: StyleProp<ViewStyle>;
|
|
38
42
|
};
|
|
39
43
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/Select/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAE3D,MAAM,MAAM,YAAY,GAAG;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GACzB,SAAS,GACT,CAAC,CAAC,OAAO,EAAE,MAAM,IAAI,KAAK,SAAS,CAAC,CAAC;AAEzC,MAAM,MAAM,WAAW,GAAG;IACxB,+EAA+E;IAC/E,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,WAAW,CAAC,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ottom tabs. On iOS 26+ it is content for
|
|
4
|
+
* `NativeTabs.BottomAccessory`, which draws the glass. Elsewhere it floats
|
|
5
|
+
* a filled pill at the bottom of the screen.
|
|
6
|
+
*/
|
|
7
|
+
export declare function TabAccessoryButton(props: TabAccessoryButtonProps): import("react").JSX.Element | null;
|
|
8
|
+
//# sourceMappingURL=TabAccessoryButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TabAccessoryButton.d.ts","sourceRoot":"","sources":["../../../src/components/TabAccessoryButton/TabAccessoryButton.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAIvD;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,sCAYhE"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TabAccessoryButton = TabAccessoryButton;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_native_1 = require("react-native");
|
|
6
|
+
const useThemeSpacing_1 = require("../../theme/useThemeSpacing");
|
|
7
|
+
const Button_1 = require("../Button");
|
|
8
|
+
const useResolvedFieldColor_1 = require("../Field/useResolvedFieldColor");
|
|
9
|
+
const headerButtonLayout_1 = require("../HeaderButton/headerButtonLayout");
|
|
10
|
+
const tabAccessoryLayout_1 = require("./tabAccessoryLayout");
|
|
11
|
+
const tabAccessoryThemeRoles_1 = require("./tabAccessoryThemeRoles");
|
|
12
|
+
const GLASS = (0, headerButtonLayout_1.supportsLiquidGlass)(react_native_1.Platform.OS, react_native_1.Platform.Version);
|
|
13
|
+
/**
|
|
14
|
+
* Action above the bottom tabs. On iOS 26+ it is content for
|
|
15
|
+
* `NativeTabs.BottomAccessory`, which draws the glass. Elsewhere it floats
|
|
16
|
+
* a filled pill at the bottom of the screen.
|
|
17
|
+
*/
|
|
18
|
+
function TabAccessoryButton(props) {
|
|
19
|
+
if (!(0, tabAccessoryLayout_1.tabAccessoryVisible)(props.placement, GLASS)) {
|
|
20
|
+
return null;
|
|
21
|
+
}
|
|
22
|
+
if (props.placement === "screen") {
|
|
23
|
+
return (0, jsx_runtime_1.jsx)(FloatingPill, { ...props });
|
|
24
|
+
}
|
|
25
|
+
return props.variant === "filled" ? ((0, jsx_runtime_1.jsx)(FilledContent, { ...props })) : ((0, jsx_runtime_1.jsx)(GlassContent, { ...props }));
|
|
26
|
+
}
|
|
27
|
+
function GlassContent({ label, onPress, icon, disabled = false, color: colorProp, }) {
|
|
28
|
+
const color = (0, useResolvedFieldColor_1.useResolvedFieldColor)(colorProp, (0, tabAccessoryThemeRoles_1.tabAccessoryRoles)("glass").content);
|
|
29
|
+
return ((0, jsx_runtime_1.jsxs)(react_native_1.Pressable, { accessibilityLabel: label, accessibilityRole: "button", accessibilityState: { disabled }, disabled: disabled, onPress: onPress, style: ({ pressed }) => [
|
|
30
|
+
styles.content,
|
|
31
|
+
{ opacity: disabled ? 0.4 : pressed ? 0.5 : 1 },
|
|
32
|
+
], children: [icon?.({ color, size: tabAccessoryLayout_1.TAB_ACCESSORY_ICON_SIZE }), (0, jsx_runtime_1.jsx)(react_native_1.Text, { style: [styles.label, { color }], children: label })] }));
|
|
33
|
+
}
|
|
34
|
+
/** Covers the accessory glass edge to edge, so there is no shape inside the glass. */
|
|
35
|
+
function FilledContent({ label, onPress, icon, disabled = false, backgroundColor: backgroundColorProp, labelColor: labelColorProp, }) {
|
|
36
|
+
const roles = (0, tabAccessoryThemeRoles_1.tabAccessoryRoles)("filled");
|
|
37
|
+
const fill = (0, useResolvedFieldColor_1.useResolvedFieldColor)(backgroundColorProp, roles.fill);
|
|
38
|
+
const color = (0, useResolvedFieldColor_1.useResolvedFieldColor)(labelColorProp, roles.content);
|
|
39
|
+
return ((0, jsx_runtime_1.jsxs)(react_native_1.Pressable, { accessibilityLabel: label, accessibilityRole: "button", accessibilityState: { disabled }, disabled: disabled, onPress: onPress, style: ({ pressed }) => [
|
|
40
|
+
styles.content,
|
|
41
|
+
styles.filled,
|
|
42
|
+
{ backgroundColor: fill, opacity: disabled ? 0.4 : pressed ? 0.75 : 1 },
|
|
43
|
+
], children: [icon?.({ color, size: tabAccessoryLayout_1.TAB_ACCESSORY_ICON_SIZE }), (0, jsx_runtime_1.jsx)(react_native_1.Text, { style: [styles.label, { color }], children: label })] }));
|
|
44
|
+
}
|
|
45
|
+
function FloatingPill({ label, onPress, icon, disabled, backgroundColor, labelColor, }) {
|
|
46
|
+
const { screen } = (0, useThemeSpacing_1.useThemeSpacing)();
|
|
47
|
+
return ((0, jsx_runtime_1.jsx)(react_native_1.View, { pointerEvents: "box-none", style: [styles.floating, { left: screen, right: screen, bottom: screen }], children: (0, jsx_runtime_1.jsx)(Button_1.Button, { backgroundColor: backgroundColor, disabled: disabled, icon: icon, label: label, labelColor: labelColor, onPress: onPress, radius: "full", style: styles.pillShadow }) }));
|
|
48
|
+
}
|
|
49
|
+
const styles = react_native_1.StyleSheet.create({
|
|
50
|
+
content: {
|
|
51
|
+
flex: 1,
|
|
52
|
+
alignSelf: "stretch",
|
|
53
|
+
flexDirection: "row",
|
|
54
|
+
alignItems: "center",
|
|
55
|
+
justifyContent: "center",
|
|
56
|
+
gap: 8,
|
|
57
|
+
paddingHorizontal: 16,
|
|
58
|
+
},
|
|
59
|
+
filled: {
|
|
60
|
+
borderRadius: 999,
|
|
61
|
+
},
|
|
62
|
+
label: {
|
|
63
|
+
fontSize: tabAccessoryLayout_1.TAB_ACCESSORY_FONT_SIZE,
|
|
64
|
+
fontWeight: "600",
|
|
65
|
+
},
|
|
66
|
+
floating: {
|
|
67
|
+
position: "absolute",
|
|
68
|
+
},
|
|
69
|
+
pillShadow: {
|
|
70
|
+
shadowColor: "#000000",
|
|
71
|
+
shadowOpacity: 0.18,
|
|
72
|
+
shadowRadius: 12,
|
|
73
|
+
shadowOffset: { width: 0, height: 6 },
|
|
74
|
+
elevation: 6,
|
|
75
|
+
},
|
|
76
|
+
});
|
|
77
|
+
//# sourceMappingURL=TabAccessoryButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TabAccessoryButton.js","sourceRoot":"","sources":["../../../src/components/TabAccessoryButton/TabAccessoryButton.tsx"],"names":[],"mappings":";;AAoBA,gDAYC;;AAhCD,+CAA2E;AAC3E,iEAA8D;AAC9D,sCAAmC;AACnC,0EAAuE;AACvE,2EAAyE;AACzE,6DAI8B;AAC9B,qEAA6D;AAG7D,MAAM,KAAK,GAAG,IAAA,wCAAmB,EAAC,uBAAQ,CAAC,EAAE,EAAE,uBAAQ,CAAC,OAAO,CAAC,CAAC;AAEjE;;;;GAIG;AACH,SAAgB,kBAAkB,CAAC,KAA8B;IAC/D,IAAI,CAAC,IAAA,wCAAmB,EAAC,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC;QACjD,OAAO,IAAI,CAAC;IACd,CAAC;IACD,IAAI,KAAK,CAAC,SAAS,KAAK,QAAQ,EAAE,CAAC;QACjC,OAAO,uBAAC,YAAY,OAAK,KAAK,GAAI,CAAC;IACrC,CAAC;IACD,OAAO,KAAK,CAAC,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,CAClC,uBAAC,aAAa,OAAK,KAAK,GAAI,CAC7B,CAAC,CAAC,CAAC,CACF,uBAAC,YAAY,OAAK,KAAK,GAAI,CAC5B,CAAC;AACJ,CAAC;AAED,SAAS,YAAY,CAAC,EACpB,KAAK,EACL,OAAO,EACP,IAAI,EACJ,QAAQ,GAAG,KAAK,EAChB,KAAK,EAAE,SAAS,GACQ;IACxB,MAAM,KAAK,GAAG,IAAA,6CAAqB,EAAC,SAAS,EAAE,IAAA,0CAAiB,EAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC;IAEnF,OAAO,CACL,wBAAC,wBAAS,IACR,kBAAkB,EAAE,KAAK,EACzB,iBAAiB,EAAC,QAAQ,EAC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AAG;KAClB;IACD,KAAK,EAAE;QACL,QAAQ,EAAE,4CAAuB;QACjC,UAAU,EAAE,KAAK;KAClB;IACD,QAAQ,EAAE;QACR,QAAQ,EAAE,UAAU;KACrB;IACD,UAAU,EAAE;QACV,WAAW,EAAE,SAAS;QACtB,aAAa,EAAE,IAAI;QACnB,YAAY,EAAE,EAAE;QAChB,YAAY,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE;QACrC,SAAS,EAAE,CAAC;KACb;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { TabAccessoryButton } from "./TabAccessoryButton";
|
|
2
|
+
export { TAB_ACCESSORY_SCREEN_INSET, tabAccessoryScreenInset, type TabAccessoryPlacement, } from "./tabAccessoryLayout";
|
|
3
|
+
export { TAB_ACCESSORY_THEME_ROLES, type TabAccessoryThemeColorProp, type TabAccessoryVariant, } from "./tabAccessoryThemeRoles";
|
|
4
|
+
export type { TabAccessoryButtonProps } from "./types";
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/TabAccessoryButton/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EACL,0BAA0B,EAC1B,uBAAuB,EACvB,KAAK,qBAAqB,GAC3B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,yBAAyB,EACzB,KAAK,0BAA0B,EAC/B,KAAK,mBAAmB,GACzB,MAAM,0BAA0B,CAAC;AAClC,YAAY,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TAB_ACCESSORY_THEME_ROLES = exports.tabAccessoryScreenInset = exports.TAB_ACCESSORY_SCREEN_INSET = exports.TabAccessoryButton = void 0;
|
|
4
|
+
var TabAccessoryButton_1 = require("./TabAccessoryButton");
|
|
5
|
+
Object.defineProperty(exports, "TabAccessoryButton", { enumerable: true, get: function () { return TabAccessoryButton_1.TabAccessoryButton; } });
|
|
6
|
+
var tabAccessoryLayout_1 = require("./tabAccessoryLayout");
|
|
7
|
+
Object.defineProperty(exports, "TAB_ACCESSORY_SCREEN_INSET", { enumerable: true, get: function () { return tabAccessoryLayout_1.TAB_ACCESSORY_SCREEN_INSET; } });
|
|
8
|
+
Object.defineProperty(exports, "tabAccessoryScreenInset", { enumerable: true, get: function () { return tabAccessoryLayout_1.tabAccessoryScreenInset; } });
|
|
9
|
+
var tabAccessoryThemeRoles_1 = require("./tabAccessoryThemeRoles");
|
|
10
|
+
Object.defineProperty(exports, "TAB_ACCESSORY_THEME_ROLES", { enumerable: true, get: function () { return tabAccessoryThemeRoles_1.TAB_ACCESSORY_THEME_ROLES; } });
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/TabAccessoryButton/index.ts"],"names":[],"mappings":";;;AAAA,2DAA0D;AAAjD,wHAAA,kBAAkB,OAAA;AAC3B,2DAI8B;AAH5B,gIAAA,0BAA0B,OAAA;AAC1B,6HAAA,uBAAuB,OAAA;AAGzB,mEAIkC;AAHhC,mIAAA,yBAAyB,OAAA"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export type TabAccessoryPlacement = "accessory" | "screen";
|
|
2
|
+
export declare const TAB_ACCESSORY_ICON_SIZE = 20;
|
|
3
|
+
export declare const TAB_ACCESSORY_FONT_SIZE = 17;
|
|
4
|
+
/** Same minimum height as `Button`. */
|
|
5
|
+
export declare const TAB_ACCESSORY_FALLBACK_HEIGHT = 52;
|
|
6
|
+
/**
|
|
7
|
+
* Bottom padding for a screen's scroll content so the fallback pill never
|
|
8
|
+
* hides the last item. The pill sits `screen` above the tabs (the same gap
|
|
9
|
+
* as its sides), so the content needs that gap below and above it.
|
|
10
|
+
* Pass `useThemeSpacing().screen`. Pure so it can be unit-tested.
|
|
11
|
+
*/
|
|
12
|
+
export declare function tabAccessoryScreenInset(screen: number): number;
|
|
13
|
+
/** `tabAccessoryScreenInset` with the default 16 spacing. */
|
|
14
|
+
export declare const TAB_ACCESSORY_SCREEN_INSET: number;
|
|
15
|
+
/**
|
|
16
|
+
* Mount one copy in `NativeTabs.BottomAccessory` and one in the screen;
|
|
17
|
+
* each renders only where it belongs. iOS 26+ has the glass accessory,
|
|
18
|
+
* other platforms float a pill inside the screen. Pure so it can be unit-tested.
|
|
19
|
+
*/
|
|
20
|
+
export declare function tabAccessoryVisible(placement: TabAccessoryPlacement, glass: boolean): boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Extra bottom room a scrolling screen needs for its in-screen copy.
|
|
23
|
+
* Only the fallback pill floats over the screen; on iOS 26+ the accessory
|
|
24
|
+
* is part of the native tab bar. Pure so it can be unit-tested.
|
|
25
|
+
*/
|
|
26
|
+
export declare function tabAccessoryScreenClearance(glass: boolean, screen: number): number;
|
|
27
|
+
//# sourceMappingURL=tabAccessoryLayout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tabAccessoryLayout.d.ts","sourceRoot":"","sources":["../../../src/components/TabAccessoryButton/tabAccessoryLayout.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,qBAAqB,GAAG,WAAW,GAAG,QAAQ,CAAC;AAE3D,eAAO,MAAM,uBAAuB,KAAK,CAAC;AAC1C,eAAO,MAAM,uBAAuB,KAAK,CAAC;AAC1C,uCAAuC;AACvC,eAAO,MAAM,6BAA6B,KAAK,CAAC;AAEhD;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAE9D;AAED,6DAA6D;AAC7D,eAAO,MAAM,0BAA0B,QAA8B,CAAC;AAEtE;;;;GAIG;AACH,wBAAgB,mBAAmB,CACjC,SAAS,EAAE,qBAAqB,EAChC,KAAK,EAAE,OAAO,GACb,OAAO,CAET;AAED;;;;GAIG;AACH,wBAAgB,2BAA2B,CACzC,KAAK,EAAE,OAAO,EACd,MAAM,EAAE,MAAM,GACb,MAAM,CAER"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TAB_ACCESSORY_SCREEN_INSET = exports.TAB_ACCESSORY_FALLBACK_HEIGHT = exports.TAB_ACCESSORY_FONT_SIZE = exports.TAB_ACCESSORY_ICON_SIZE = void 0;
|
|
4
|
+
exports.tabAccessoryScreenInset = tabAccessoryScreenInset;
|
|
5
|
+
exports.tabAccessoryVisible = tabAccessoryVisible;
|
|
6
|
+
exports.tabAccessoryScreenClearance = tabAccessoryScreenClearance;
|
|
7
|
+
exports.TAB_ACCESSORY_ICON_SIZE = 20;
|
|
8
|
+
exports.TAB_ACCESSORY_FONT_SIZE = 17;
|
|
9
|
+
/** Same minimum height as `Button`. */
|
|
10
|
+
exports.TAB_ACCESSORY_FALLBACK_HEIGHT = 52;
|
|
11
|
+
/**
|
|
12
|
+
* Bottom padding for a screen's scroll content so the fallback pill never
|
|
13
|
+
* hides the last item. The pill sits `screen` above the tabs (the same gap
|
|
14
|
+
* as its sides), so the content needs that gap below and above it.
|
|
15
|
+
* Pass `useThemeSpacing().screen`. Pure so it can be unit-tested.
|
|
16
|
+
*/
|
|
17
|
+
function tabAccessoryScreenInset(screen) {
|
|
18
|
+
return exports.TAB_ACCESSORY_FALLBACK_HEIGHT + screen * 2;
|
|
19
|
+
}
|
|
20
|
+
/** `tabAccessoryScreenInset` with the default 16 spacing. */
|
|
21
|
+
exports.TAB_ACCESSORY_SCREEN_INSET = tabAccessoryScreenInset(16);
|
|
22
|
+
/**
|
|
23
|
+
* Mount one copy in `NativeTabs.BottomAccessory` and one in the screen;
|
|
24
|
+
* each renders only where it belongs. iOS 26+ has the glass accessory,
|
|
25
|
+
* other platforms float a pill inside the screen. Pure so it can be unit-tested.
|
|
26
|
+
*/
|
|
27
|
+
function tabAccessoryVisible(placement, glass) {
|
|
28
|
+
return placement === "accessory" ? glass : !glass;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Extra bottom room a scrolling screen needs for its in-screen copy.
|
|
32
|
+
* Only the fallback pill floats over the screen; on iOS 26+ the accessory
|
|
33
|
+
* is part of the native tab bar. Pure so it can be unit-tested.
|
|
34
|
+
*/
|
|
35
|
+
function tabAccessoryScreenClearance(glass, screen) {
|
|
36
|
+
return glass ? 0 : tabAccessoryScreenInset(screen);
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=tabAccessoryLayout.js.map
|