react-native-terra-ui 0.1.1 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +90 -0
- package/lib/module/components/avatar/Avatar.js +118 -35
- package/lib/module/components/avatar/Avatar.js.map +1 -1
- package/lib/module/components/box/Box.js +15 -2
- package/lib/module/components/box/Box.js.map +1 -1
- package/lib/module/components/box/utils.js +4 -1
- package/lib/module/components/box/utils.js.map +1 -1
- package/lib/module/components/button/Button.js +7 -14
- package/lib/module/components/button/Button.js.map +1 -1
- package/lib/module/components/chip/Chip.js +372 -0
- package/lib/module/components/chip/Chip.js.map +1 -0
- package/lib/module/components/chip/index.js +4 -0
- package/lib/module/components/chip/index.js.map +1 -0
- package/lib/module/components/chip/types.js +2 -0
- package/lib/module/components/chip/types.js.map +1 -0
- package/lib/module/components/chip/utils.js +36 -0
- package/lib/module/components/chip/utils.js.map +1 -0
- package/lib/module/components/empty-state/EmptyState.js +200 -0
- package/lib/module/components/empty-state/EmptyState.js.map +1 -0
- package/lib/module/components/empty-state/index.js +4 -0
- package/lib/module/components/empty-state/index.js.map +1 -0
- package/lib/module/components/empty-state/types.js +2 -0
- package/lib/module/components/empty-state/types.js.map +1 -0
- package/lib/module/components/header/header-buttons.js +31 -36
- package/lib/module/components/header/header-buttons.js.map +1 -1
- package/lib/module/components/header/index.js +1 -1
- package/lib/module/components/header/index.js.map +1 -1
- package/lib/module/components/header/parts/HeaderGradientOverlay.js +38 -0
- package/lib/module/components/header/parts/HeaderGradientOverlay.js.map +1 -0
- package/lib/module/components/header/variants/LargeTitleHeader/index.js +69 -99
- package/lib/module/components/header/variants/LargeTitleHeader/index.js.map +1 -1
- package/lib/module/components/header/variants/TitleHeader/index.js +32 -63
- package/lib/module/components/header/variants/TitleHeader/index.js.map +1 -1
- package/lib/module/components/icon/Icon.js +20 -8
- package/lib/module/components/icon/Icon.js.map +1 -1
- package/lib/module/components/image/Image.js +54 -0
- package/lib/module/components/image/Image.js.map +1 -0
- package/lib/module/components/image/index.js +4 -0
- package/lib/module/components/image/index.js.map +1 -0
- package/lib/module/components/image/types.js +4 -0
- package/lib/module/components/image/types.js.map +1 -0
- package/lib/module/components/index.js +4 -0
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/components/portal/Portal.js +42 -0
- package/lib/module/components/portal/Portal.js.map +1 -0
- package/lib/module/components/portal/PortalContext.js +1 -16
- package/lib/module/components/portal/PortalContext.js.map +1 -1
- package/lib/module/components/portal/PortalHost.js +16 -14
- package/lib/module/components/portal/PortalHost.js.map +1 -1
- package/lib/module/components/portal/PortalProvider.js +51 -19
- package/lib/module/components/portal/PortalProvider.js.map +1 -1
- package/lib/module/components/portal/index.js +1 -1
- package/lib/module/components/portal/index.js.map +1 -1
- package/lib/module/components/screen/Screen.js +25 -28
- package/lib/module/components/screen/Screen.js.map +1 -1
- package/lib/module/components/screen/ScreenContext.js +7 -5
- package/lib/module/components/screen/ScreenContext.js.map +1 -1
- package/lib/module/components/screen/ScreenFlashList.js +144 -0
- package/lib/module/components/screen/ScreenFlashList.js.map +1 -0
- package/lib/module/components/screen/ScreenFlatList.js +88 -27
- package/lib/module/components/screen/ScreenFlatList.js.map +1 -1
- package/lib/module/components/screen/ScreenScrollView.js +101 -34
- package/lib/module/components/screen/ScreenScrollView.js.map +1 -1
- package/lib/module/components/screen/index.js +1 -0
- package/lib/module/components/screen/index.js.map +1 -1
- package/lib/module/components/screen/parts/BottomSafeArea.js +62 -0
- package/lib/module/components/screen/parts/BottomSafeArea.js.map +1 -0
- package/lib/module/components/screen/parts/ScreenPlaceholder.js +50 -0
- package/lib/module/components/screen/parts/ScreenPlaceholder.js.map +1 -0
- package/lib/module/components/screen/types.js +4 -0
- package/lib/module/components/screen/types.js.map +1 -0
- package/lib/module/components/screen/utils.js +12 -9
- package/lib/module/components/screen/utils.js.map +1 -1
- package/lib/module/components/surface/Surface.js +16 -9
- package/lib/module/components/surface/Surface.js.map +1 -1
- package/lib/module/components/text/Text.js +23 -5
- package/lib/module/components/text/Text.js.map +1 -1
- package/lib/module/components/toast/Toast.js +8 -8
- package/lib/module/components/toast/Toast.js.map +1 -1
- package/lib/module/components/toolbar/Toolbar.js +268 -0
- package/lib/module/components/toolbar/Toolbar.js.map +1 -0
- package/lib/module/components/toolbar/index.js +4 -0
- package/lib/module/components/toolbar/index.js.map +1 -0
- package/lib/module/context/ThemeProvider.js +5 -2
- package/lib/module/context/ThemeProvider.js.map +1 -1
- package/lib/module/{components/icon/utils.js → theme/defaults/icons.js} +1 -1
- package/lib/module/theme/defaults/icons.js.map +1 -0
- package/lib/module/theme/defaults/image.js +30 -0
- package/lib/module/theme/defaults/image.js.map +1 -0
- package/lib/module/theme/index.js +1 -1
- package/lib/module/theme/{configure.js → registry.js} +21 -28
- package/lib/module/theme/registry.js.map +1 -0
- package/lib/module/theme/runtime.js +1 -1
- package/lib/module/theme/theme.js +91 -10
- package/lib/module/theme/theme.js.map +1 -1
- package/lib/module/theme/tokens/dark.js +59 -68
- package/lib/module/theme/tokens/dark.js.map +1 -1
- package/lib/module/theme/tokens/light.js +49 -67
- package/lib/module/theme/tokens/light.js.map +1 -1
- package/lib/module/theme/tokens/primitives.js +241 -20
- package/lib/module/theme/tokens/primitives.js.map +1 -1
- package/lib/module/utils/accent-utils.js +4 -4
- package/lib/module/utils/accent-utils.js.map +1 -1
- package/lib/typescript/src/components/avatar/Avatar.d.ts.map +1 -1
- package/lib/typescript/src/components/avatar/types.d.ts +4 -4
- package/lib/typescript/src/components/avatar/types.d.ts.map +1 -1
- package/lib/typescript/src/components/box/Box.d.ts.map +1 -1
- package/lib/typescript/src/components/box/utils.d.ts +6 -1
- package/lib/typescript/src/components/box/utils.d.ts.map +1 -1
- package/lib/typescript/src/components/button/Button.d.ts +1 -1
- package/lib/typescript/src/components/button/Button.d.ts.map +1 -1
- package/lib/typescript/src/components/chip/Chip.d.ts +24 -0
- package/lib/typescript/src/components/chip/Chip.d.ts.map +1 -0
- package/lib/typescript/src/components/chip/index.d.ts +4 -0
- package/lib/typescript/src/components/chip/index.d.ts.map +1 -0
- package/lib/typescript/src/components/chip/types.d.ts +8 -0
- package/lib/typescript/src/components/chip/types.d.ts.map +1 -0
- package/lib/typescript/src/components/chip/utils.d.ts +8 -0
- package/lib/typescript/src/components/chip/utils.d.ts.map +1 -0
- package/lib/typescript/src/components/empty-state/EmptyState.d.ts +45 -0
- package/lib/typescript/src/components/empty-state/EmptyState.d.ts.map +1 -0
- package/lib/typescript/src/components/empty-state/index.d.ts +4 -0
- package/lib/typescript/src/components/empty-state/index.d.ts.map +1 -0
- package/lib/typescript/src/components/empty-state/types.d.ts +6 -0
- package/lib/typescript/src/components/empty-state/types.d.ts.map +1 -0
- package/lib/typescript/src/components/header/header-buttons.d.ts +27 -0
- package/lib/typescript/src/components/header/header-buttons.d.ts.map +1 -1
- package/lib/typescript/src/components/header/index.d.ts +1 -1
- package/lib/typescript/src/components/header/index.d.ts.map +1 -1
- package/lib/typescript/src/components/header/parts/HeaderGradientOverlay.d.ts +7 -0
- package/lib/typescript/src/components/header/parts/HeaderGradientOverlay.d.ts.map +1 -0
- package/lib/typescript/src/components/header/variants/LargeTitleHeader/index.d.ts +1 -1
- package/lib/typescript/src/components/header/variants/LargeTitleHeader/index.d.ts.map +1 -1
- package/lib/typescript/src/components/header/variants/TitleHeader/index.d.ts +18 -7
- package/lib/typescript/src/components/header/variants/TitleHeader/index.d.ts.map +1 -1
- package/lib/typescript/src/components/icon/Icon.d.ts.map +1 -1
- package/lib/typescript/src/components/image/Image.d.ts +16 -0
- package/lib/typescript/src/components/image/Image.d.ts.map +1 -0
- package/lib/typescript/src/components/image/index.d.ts +3 -0
- package/lib/typescript/src/components/image/index.d.ts.map +1 -0
- package/lib/typescript/src/components/image/types.d.ts +7 -0
- package/lib/typescript/src/components/image/types.d.ts.map +1 -0
- package/lib/typescript/src/components/index.d.ts +4 -0
- package/lib/typescript/src/components/index.d.ts.map +1 -1
- package/lib/typescript/src/components/portal/Portal.d.ts +26 -0
- package/lib/typescript/src/components/portal/Portal.d.ts.map +1 -0
- package/lib/typescript/src/components/portal/PortalContext.d.ts +11 -14
- package/lib/typescript/src/components/portal/PortalContext.d.ts.map +1 -1
- package/lib/typescript/src/components/portal/PortalHost.d.ts +9 -4
- package/lib/typescript/src/components/portal/PortalHost.d.ts.map +1 -1
- package/lib/typescript/src/components/portal/PortalProvider.d.ts +3 -3
- package/lib/typescript/src/components/portal/PortalProvider.d.ts.map +1 -1
- package/lib/typescript/src/components/portal/index.d.ts +4 -2
- package/lib/typescript/src/components/portal/index.d.ts.map +1 -1
- package/lib/typescript/src/components/screen/Screen.d.ts +18 -13
- package/lib/typescript/src/components/screen/Screen.d.ts.map +1 -1
- package/lib/typescript/src/components/screen/ScreenContext.d.ts +12 -9
- package/lib/typescript/src/components/screen/ScreenContext.d.ts.map +1 -1
- package/lib/typescript/src/components/screen/ScreenFlashList.d.ts +43 -0
- package/lib/typescript/src/components/screen/ScreenFlashList.d.ts.map +1 -0
- package/lib/typescript/src/components/screen/ScreenFlatList.d.ts +17 -7
- package/lib/typescript/src/components/screen/ScreenFlatList.d.ts.map +1 -1
- package/lib/typescript/src/components/screen/ScreenScrollView.d.ts +51 -16
- package/lib/typescript/src/components/screen/ScreenScrollView.d.ts.map +1 -1
- package/lib/typescript/src/components/screen/index.d.ts +3 -0
- package/lib/typescript/src/components/screen/index.d.ts.map +1 -1
- package/lib/typescript/src/components/screen/parts/BottomSafeArea.d.ts +30 -0
- package/lib/typescript/src/components/screen/parts/BottomSafeArea.d.ts.map +1 -0
- package/lib/typescript/src/components/screen/parts/ScreenPlaceholder.d.ts +22 -0
- package/lib/typescript/src/components/screen/parts/ScreenPlaceholder.d.ts.map +1 -0
- package/lib/typescript/src/components/screen/types.d.ts +42 -0
- package/lib/typescript/src/components/screen/types.d.ts.map +1 -0
- package/lib/typescript/src/components/screen/utils.d.ts +9 -9
- package/lib/typescript/src/components/screen/utils.d.ts.map +1 -1
- package/lib/typescript/src/components/surface/Surface.d.ts +7 -0
- package/lib/typescript/src/components/surface/Surface.d.ts.map +1 -1
- package/lib/typescript/src/components/text/Text.d.ts.map +1 -1
- package/lib/typescript/src/components/toolbar/Toolbar.d.ts +115 -0
- package/lib/typescript/src/components/toolbar/Toolbar.d.ts.map +1 -0
- package/lib/typescript/src/components/toolbar/index.d.ts +3 -0
- package/lib/typescript/src/components/toolbar/index.d.ts.map +1 -0
- package/lib/typescript/src/context/ThemeProvider.d.ts.map +1 -1
- package/lib/typescript/src/{components/icon/utils.d.ts → theme/defaults/icons.d.ts} +2 -2
- package/lib/typescript/src/theme/defaults/icons.d.ts.map +1 -0
- package/lib/typescript/src/theme/defaults/image.d.ts +4 -0
- package/lib/typescript/src/theme/defaults/image.d.ts.map +1 -0
- package/lib/typescript/src/theme/index.d.ts +1 -1
- package/lib/typescript/src/theme/index.d.ts.map +1 -1
- package/lib/typescript/src/theme/{configure.d.ts → registry.d.ts} +1 -1
- package/lib/typescript/src/theme/registry.d.ts.map +1 -0
- package/lib/typescript/src/theme/theme.d.ts +21 -1
- package/lib/typescript/src/theme/theme.d.ts.map +1 -1
- package/lib/typescript/src/theme/tokens/dark.d.ts +41 -64
- package/lib/typescript/src/theme/tokens/dark.d.ts.map +1 -1
- package/lib/typescript/src/theme/tokens/light.d.ts +44 -65
- package/lib/typescript/src/theme/tokens/light.d.ts.map +1 -1
- package/lib/typescript/src/theme/tokens/primitives.d.ts +228 -17
- package/lib/typescript/src/theme/tokens/primitives.d.ts.map +1 -1
- package/lib/typescript/src/theme/types.d.ts +65 -35
- package/lib/typescript/src/theme/types.d.ts.map +1 -1
- package/package.json +23 -9
- package/skills/terra-ui/SKILL.md +193 -0
- package/skills/terra-ui/references/recipes.md +198 -0
- package/skills/terra-ui/references/troubleshooting.md +112 -0
- package/src/components/avatar/Avatar.tsx +128 -38
- package/src/components/avatar/types.ts +5 -5
- package/src/components/box/Box.tsx +13 -1
- package/src/components/box/utils.ts +10 -0
- package/src/components/button/Button.tsx +7 -15
- package/src/components/chip/Chip.tsx +444 -0
- package/src/components/chip/index.ts +3 -0
- package/src/components/chip/types.ts +15 -0
- package/src/components/chip/utils.ts +34 -0
- package/src/components/empty-state/EmptyState.tsx +209 -0
- package/src/components/empty-state/index.ts +3 -0
- package/src/components/empty-state/types.ts +5 -0
- package/src/components/header/header-buttons.tsx +33 -45
- package/src/components/header/index.ts +2 -0
- package/src/components/header/parts/HeaderGradientOverlay.tsx +29 -0
- package/src/components/header/variants/LargeTitleHeader/index.tsx +68 -102
- package/src/components/header/variants/TitleHeader/index.tsx +47 -56
- package/src/components/icon/Icon.tsx +20 -15
- package/src/components/image/Image.tsx +48 -0
- package/src/components/image/index.ts +2 -0
- package/src/components/image/types.ts +7 -0
- package/src/components/index.ts +4 -0
- package/src/components/portal/Portal.tsx +55 -0
- package/src/components/portal/PortalContext.tsx +14 -22
- package/src/components/portal/PortalHost.tsx +17 -10
- package/src/components/portal/PortalProvider.tsx +58 -21
- package/src/components/portal/index.ts +4 -2
- package/src/components/screen/Screen.tsx +45 -59
- package/src/components/screen/ScreenContext.tsx +19 -12
- package/src/components/screen/ScreenFlashList.tsx +196 -0
- package/src/components/screen/ScreenFlatList.tsx +100 -39
- package/src/components/screen/ScreenScrollView.tsx +114 -53
- package/src/components/screen/index.ts +3 -0
- package/src/components/screen/parts/BottomSafeArea.tsx +60 -0
- package/src/components/screen/parts/ScreenPlaceholder.tsx +55 -0
- package/src/components/screen/types.ts +43 -0
- package/src/components/screen/utils.ts +29 -15
- package/src/components/surface/Surface.tsx +17 -20
- package/src/components/text/Text.tsx +23 -5
- package/src/components/toast/Toast.tsx +8 -8
- package/src/components/toolbar/Toolbar.tsx +353 -0
- package/src/components/toolbar/index.ts +6 -0
- package/src/context/ThemeProvider.tsx +5 -4
- package/src/{components/icon/utils.tsx → theme/defaults/icons.tsx} +1 -1
- package/src/theme/defaults/image.tsx +34 -0
- package/src/theme/index.ts +1 -1
- package/src/theme/{configure.ts → registry.ts} +19 -34
- package/src/theme/runtime.ts +1 -1
- package/src/theme/theme.ts +127 -13
- package/src/theme/tokens/dark.ts +60 -69
- package/src/theme/tokens/light.ts +50 -68
- package/src/theme/tokens/primitives.ts +248 -20
- package/src/theme/types.ts +67 -35
- package/src/utils/accent-utils.ts +4 -4
- package/lib/module/components/icon/utils.js.map +0 -1
- package/lib/module/theme/configure.js.map +0 -1
- package/lib/typescript/src/components/icon/utils.d.ts.map +0 -1
- package/lib/typescript/src/theme/configure.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"header-buttons.d.ts","sourceRoot":"","sources":["../../../../../src/components/header/header-buttons.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"header-buttons.d.ts","sourceRoot":"","sources":["../../../../../src/components/header/header-buttons.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAW,KAAK,kBAAkB,EAAE,MAAM,qBAAY,CAAC;AAE9D;;;;;GAKG;AACH,MAAM,MAAM,iBAAiB,GAAG,kBAAkB,CAAC;AAEnD;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,YAAY,sDAAiB,CAAC;AAE3C,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;AAE5D,MAAM,WAAW,uBAAuB;IACtC,SAAS,CAAC,EAAE,MAAM,OAAO,CAAC;IAC1B,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,MAAM,WAAW,kBAAkB;IACjC,0EAA0E;IAC1E,aAAa,CAAC,EAAE,mBAAmB,CAAC;IACpC,6CAA6C;IAC7C,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,kEAAkE;IAClE,UAAU,CAAC,EAAE,uBAAuB,CAAC;CACtC;AAWD,wBAAgB,mBAAmB,CAAC,EAClC,aAAsB,EACtB,UAAU,EACV,SAAS,GACV,EAAE,kBAAkB,sCA4BpB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { Header } from './Header.js';
|
|
2
|
-
export { type HeaderDismissAction, HeaderDismissButton, type HeaderDismissNavigation, type HeaderDismissProps, } from './header-buttons.js';
|
|
2
|
+
export { HeaderButton, type HeaderButtonProps, type HeaderDismissAction, HeaderDismissButton, type HeaderDismissNavigation, type HeaderDismissProps, } from './header-buttons.js';
|
|
3
3
|
export type { LargeTitleHeaderProps } from './variants/LargeTitleHeader/index.js';
|
|
4
4
|
export { LargeTitleHeader } from './variants/LargeTitleHeader/index.js';
|
|
5
5
|
export type { TitleHeaderProps } from './variants/TitleHeader/index.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/header/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAU,CAAC;AAClC,OAAO,EACL,KAAK,mBAAmB,EACxB,mBAAmB,EACnB,KAAK,uBAAuB,EAC5B,KAAK,kBAAkB,GACxB,MAAM,qBAAkB,CAAC;AAC1B,YAAY,EAAE,qBAAqB,EAAE,MAAM,sCAA6B,CAAC;AACzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAA6B,CAAC;AAC/D,YAAY,EAAE,gBAAgB,EAAE,MAAM,iCAAwB,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAwB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/header/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAU,CAAC;AAClC,OAAO,EACL,YAAY,EACZ,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,mBAAmB,EACnB,KAAK,uBAAuB,EAC5B,KAAK,kBAAkB,GACxB,MAAM,qBAAkB,CAAC;AAC1B,YAAY,EAAE,qBAAqB,EAAE,MAAM,sCAA6B,CAAC;AACzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAA6B,CAAC;AAC/D,YAAY,EAAE,gBAAgB,EAAE,MAAM,iCAAwB,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAwB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export interface HeaderGradientOverlayProps {
|
|
2
|
+
/** Fill color, fading from fully opaque to 90% opacity along the gradient. */
|
|
3
|
+
color: string;
|
|
4
|
+
}
|
|
5
|
+
/** Vertical fade-out overlay behind header content, shared by header variants. */
|
|
6
|
+
export declare function HeaderGradientOverlay({ color }: HeaderGradientOverlayProps): import("react").JSX.Element;
|
|
7
|
+
//# sourceMappingURL=HeaderGradientOverlay.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HeaderGradientOverlay.d.ts","sourceRoot":"","sources":["../../../../../../src/components/header/parts/HeaderGradientOverlay.tsx"],"names":[],"mappings":"AAQA,MAAM,WAAW,0BAA0B;IACzC,8EAA8E;IAC9E,KAAK,EAAE,MAAM,CAAC;CACf;AAED,kFAAkF;AAClF,wBAAgB,qBAAqB,CAAC,EAAE,KAAK,EAAE,EAAE,0BAA0B,+BAc1E"}
|
|
@@ -21,5 +21,5 @@ export interface LargeTitleHeaderProps extends TitleHeaderProps {
|
|
|
21
21
|
* </Screen.Header>
|
|
22
22
|
* ```
|
|
23
23
|
*/
|
|
24
|
-
export declare function LargeTitleHeader({ title, caption,
|
|
24
|
+
export declare function LargeTitleHeader({ title, caption, LeftToolbar, RightToolbar, dismissAction, navigation, onDismiss, titleAlignment, isLargeTitleHidden, bg, }: LargeTitleHeaderProps): import("react").JSX.Element;
|
|
25
25
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/header/variants/LargeTitleHeader/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/header/variants/LargeTitleHeader/index.tsx"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAgB,CAAC;AASvD,MAAM,WAAW,qBAAsB,SAAQ,gBAAgB;IAC7D,2DAA2D;IAC3D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,yEAAyE;IACzE,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AA0DD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,KAAK,EACL,OAAO,EACP,WAAW,EACX,YAAY,EACZ,aAAsB,EACtB,UAAU,EACV,SAAS,EACT,cAAyB,EACzB,kBAA0B,EAC1B,EAAsB,GACvB,EAAE,qBAAqB,+BAyIvB"}
|
|
@@ -1,12 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
2
|
import type { ColorToken } from '../../../../theme/types';
|
|
3
3
|
import { type HeaderDismissProps } from '../../header-buttons.js';
|
|
4
4
|
export interface TitleHeaderProps extends HeaderDismissProps {
|
|
5
5
|
title?: string;
|
|
6
|
-
/**
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Leading-side actions, wrapped in a `Toolbar` row. Pass `Toolbar.Group` /
|
|
8
|
+
* `Toolbar.Button` children directly — no `Toolbar` of your own.
|
|
9
|
+
*/
|
|
10
|
+
LeftToolbar?: ReactNode;
|
|
11
|
+
/**
|
|
12
|
+
* Trailing-side actions, wrapped in a `Toolbar` row. Pass `Toolbar.Group` /
|
|
13
|
+
* `Toolbar.Button` children directly — no `Toolbar` of your own.
|
|
14
|
+
*/
|
|
15
|
+
RightToolbar?: ReactNode;
|
|
10
16
|
/** Title placement within the bar. Defaults to `'center'`. */
|
|
11
17
|
titleAlignment?: 'center' | 'left';
|
|
12
18
|
/** Background color token. Defaults to `surface.default`. */
|
|
@@ -20,9 +26,14 @@ export interface TitleHeaderProps extends HeaderDismissProps {
|
|
|
20
26
|
* @example
|
|
21
27
|
* ```tsx
|
|
22
28
|
* <Screen.Header>
|
|
23
|
-
* <Header.Title
|
|
29
|
+
* <Header.Title
|
|
30
|
+
* title="Stats"
|
|
31
|
+
* RightToolbar={
|
|
32
|
+
* <Toolbar.Button icon="add" accessibilityLabel="Add" onPress={add} />
|
|
33
|
+
* }
|
|
34
|
+
* />
|
|
24
35
|
* </Screen.Header>
|
|
25
36
|
* ```
|
|
26
37
|
*/
|
|
27
|
-
export declare function TitleHeader({ title,
|
|
38
|
+
export declare function TitleHeader({ title, LeftToolbar, RightToolbar, dismissAction, navigation, onDismiss, titleAlignment, bg, }: TitleHeaderProps): import("react").JSX.Element;
|
|
28
39
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/header/variants/TitleHeader/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/header/variants/TitleHeader/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKvC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAK/C,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,yBAAsB,CAAC;AAG9B,MAAM,WAAW,gBAAiB,SAAQ,kBAAkB;IAC1D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB;;;OAGG;IACH,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,8DAA8D;IAC9D,cAAc,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC;IACnC,6DAA6D;IAC7D,EAAE,CAAC,EAAE,UAAU,CAAC;CACjB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,WAAW,EACX,YAAY,EACZ,aAAsB,EACtB,UAAU,EACV,SAAS,EACT,cAAyB,EACzB,EAAsB,GACvB,EAAE,gBAAgB,+BA2DlB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../../../../src/components/icon/Icon.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAKpD,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAG9D,MAAM,WAAW,SAAU,SAAQ,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC;IAC5D,gEAAgE;IAChE,IAAI,EAAE,aAAa,CAAC;IACpB,iEAAiE;IACjE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,sEAAsE;IACtE,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,IAAI,
|
|
1
|
+
{"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../../../../src/components/icon/Icon.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAKpD,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAG9D,MAAM,WAAW,SAAU,SAAQ,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC;IAC5D,gEAAgE;IAChE,IAAI,EAAE,aAAa,CAAC;IACpB,iEAAiE;IACjE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,sEAAsE;IACtE,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,IAAI,uLAgChB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ImageProps } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Renders the image implementation configured via
|
|
4
|
+
* `configureTerraUI({ image })` (defaults to React Native's `Image`).
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```tsx
|
|
8
|
+
* <Image
|
|
9
|
+
* source={{ uri: 'https://example.com/photo.jpg' }}
|
|
10
|
+
* contentFit="cover"
|
|
11
|
+
* style={{ width: 40, height: 40 }}
|
|
12
|
+
* />
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
export declare function Image({ contentFit, width, height, radius, style, ...rest }: ImageProps): import("react").JSX.Element;
|
|
16
|
+
//# sourceMappingURL=Image.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Image.d.ts","sourceRoot":"","sources":["../../../../../src/components/image/Image.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAS,CAAC;AAE1C;;;;;;;;;;;;GAYG;AACH,wBAAgB,KAAK,CAAC,EACpB,UAAoB,EACpB,KAAK,EACL,MAAM,EACN,MAAe,EACf,KAAK,EACL,GAAG,IAAI,EACR,EAAE,UAAU,+BAQZ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/image/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,YAAS,CAAC;AAChC,YAAY,EAAE,UAAU,EAAE,MAAM,YAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/image/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/D,MAAM,WAAW,UAAW,SAAQ,eAAe;IACjD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,SAAS,CAAC;CACpB"}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
export * from './avatar/index.js';
|
|
2
2
|
export * from './box/index.js';
|
|
3
3
|
export * from './button/index.js';
|
|
4
|
+
export * from './chip/index.js';
|
|
5
|
+
export * from './empty-state/index.js';
|
|
4
6
|
export * from './header/index.js';
|
|
5
7
|
export * from './icon/index.js';
|
|
8
|
+
export * from './image/index.js';
|
|
6
9
|
export * from './page-indicator/index.js';
|
|
7
10
|
export * from './portal/index.js';
|
|
8
11
|
export * from './screen/index.js';
|
|
@@ -11,4 +14,5 @@ export * from './spinner/index.js';
|
|
|
11
14
|
export * from './surface/index.js';
|
|
12
15
|
export * from './text/index.js';
|
|
13
16
|
export * from './toast/index.js';
|
|
17
|
+
export * from './toolbar/index.js';
|
|
14
18
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAU,CAAC;AACzB,cAAc,gBAAO,CAAC;AACtB,cAAc,mBAAU,CAAC;AACzB,cAAc,mBAAU,CAAC;AACzB,cAAc,iBAAQ,CAAC;AACvB,cAAc,2BAAkB,CAAC;AACjC,cAAc,mBAAU,CAAC;AACzB,cAAc,mBAAU,CAAC;AACzB,cAAc,iBAAQ,CAAC;AACvB,cAAc,oBAAW,CAAC;AAC1B,cAAc,oBAAW,CAAC;AAC1B,cAAc,iBAAQ,CAAC;AACvB,cAAc,kBAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAU,CAAC;AACzB,cAAc,gBAAO,CAAC;AACtB,cAAc,mBAAU,CAAC;AACzB,cAAc,iBAAQ,CAAC;AACvB,cAAc,wBAAe,CAAC;AAC9B,cAAc,mBAAU,CAAC;AACzB,cAAc,iBAAQ,CAAC;AACvB,cAAc,kBAAS,CAAC;AACxB,cAAc,2BAAkB,CAAC;AACjC,cAAc,mBAAU,CAAC;AACzB,cAAc,mBAAU,CAAC;AACzB,cAAc,iBAAQ,CAAC;AACvB,cAAc,oBAAW,CAAC;AAC1B,cAAc,oBAAW,CAAC;AAC1B,cAAc,iBAAQ,CAAC;AACvB,cAAc,kBAAS,CAAC;AACxB,cAAc,oBAAW,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type FC, type ReactNode } from 'react';
|
|
2
|
+
import { type PortalHostProps } from './PortalHost.js';
|
|
3
|
+
import { type PortalProviderProps } from './PortalProvider.js';
|
|
4
|
+
export interface PortalProps {
|
|
5
|
+
/** Name of the `PortalHost` to teleport `children` into. */
|
|
6
|
+
hostName: string;
|
|
7
|
+
children?: ReactNode;
|
|
8
|
+
}
|
|
9
|
+
type PortalWithCompatApi = FC<PortalProps> & {
|
|
10
|
+
Provider: FC<PortalProviderProps>;
|
|
11
|
+
Host: FC<PortalHostProps>;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Declaratively teleports `children` into the `PortalHost` named `hostName`,
|
|
15
|
+
* for as long as this component stays mounted.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```tsx
|
|
19
|
+
* <Portal hostName="screen-header">
|
|
20
|
+
* <LargeTitle />
|
|
21
|
+
* </Portal>
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
export declare const Portal: PortalWithCompatApi;
|
|
25
|
+
export {};
|
|
26
|
+
//# sourceMappingURL=Portal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Portal.d.ts","sourceRoot":"","sources":["../../../../../src/components/portal/Portal.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,EAAE,KAAK,SAAS,EAAiC,MAAM,OAAO,CAAC;AAG/E,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,iBAAc,CAAC;AAChE,OAAO,EAAkB,KAAK,mBAAmB,EAAE,MAAM,qBAAkB,CAAC;AAI5E,MAAM,WAAW,WAAW;IAC1B,4DAA4D;IAC5D,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAuBD,KAAK,mBAAmB,GAAG,EAAE,CAAC,WAAW,CAAC,GAAG;IAC3C,QAAQ,EAAE,EAAE,CAAC,mBAAmB,CAAC,CAAC;IAClC,IAAI,EAAE,EAAE,CAAC,eAAe,CAAC,CAAC;CAC3B,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,MAAM,EAGb,mBAAmB,CAAC"}
|
|
@@ -1,19 +1,16 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
|
+
export interface PortalEntry {
|
|
3
|
+
key: number;
|
|
4
|
+
node: ReactNode;
|
|
5
|
+
}
|
|
6
|
+
export type PortalStore = Record<string, PortalEntry[]>;
|
|
2
7
|
export interface PortalContextValue {
|
|
3
|
-
/**
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
|
|
8
|
+
/** Portal entries currently registered, keyed by host name. */
|
|
9
|
+
portals: PortalStore;
|
|
10
|
+
/** Register (or replace) the entry `key` under `hostName`. */
|
|
11
|
+
upsertPortal: (hostName: string, key: number, node: ReactNode) => void;
|
|
12
|
+
/** Remove the entry `key` previously registered under `hostName`. */
|
|
13
|
+
removePortal: (hostName: string, key: number) => void;
|
|
9
14
|
}
|
|
10
15
|
export declare const PortalContext: import("react").Context<PortalContextValue | null>;
|
|
11
|
-
/**
|
|
12
|
-
* Access the nearest {@link PortalProvider}. Used by components that need to
|
|
13
|
-
* teleport content into a `PortalHost` rendered elsewhere in the tree (e.g. the
|
|
14
|
-
* large-title header injecting its title into the scroll content).
|
|
15
|
-
*
|
|
16
|
-
* @throws if called outside a `PortalProvider`.
|
|
17
|
-
*/
|
|
18
|
-
export declare function usePortal(): PortalContextValue;
|
|
19
16
|
//# sourceMappingURL=PortalContext.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PortalContext.d.ts","sourceRoot":"","sources":["../../../../../src/components/portal/PortalContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,SAAS,
|
|
1
|
+
{"version":3,"file":"PortalContext.d.ts","sourceRoot":"","sources":["../../../../../src/components/portal/PortalContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAEtD,MAAM,WAAW,WAAW;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,SAAS,CAAC;CACjB;AAED,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,WAAW,EAAE,CAAC,CAAC;AAExD,MAAM,WAAW,kBAAkB;IACjC,+DAA+D;IAC/D,OAAO,EAAE,WAAW,CAAC;IACrB,8DAA8D;IAC9D,YAAY,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,KAAK,IAAI,CAAC;IACvE,qEAAqE;IACrE,YAAY,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;CACvD;AAED,eAAO,MAAM,aAAa,oDAAiD,CAAC"}
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
+
import { type ViewProps } from 'react-native';
|
|
2
|
+
export type PortalHostProps = Omit<ViewProps, 'children'> & {
|
|
3
|
+
/** Renders every `Portal` registered under this host name, in insertion order. */
|
|
4
|
+
name: string;
|
|
5
|
+
};
|
|
1
6
|
/**
|
|
2
|
-
* Renders every
|
|
3
|
-
* {@link PortalProvider}
|
|
4
|
-
*
|
|
7
|
+
* Renders every entry currently registered under `name` on the nearest
|
|
8
|
+
* {@link PortalProvider}. Place it where teleported content should appear
|
|
9
|
+
* (e.g. at the top of a `Screen.ScrollView`).
|
|
5
10
|
*/
|
|
6
|
-
export declare function PortalHost(): import("react").JSX.Element;
|
|
11
|
+
export declare function PortalHost({ name, ...viewProps }: PortalHostProps): import("react").JSX.Element;
|
|
7
12
|
//# sourceMappingURL=PortalHost.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PortalHost.d.ts","sourceRoot":"","sources":["../../../../../src/components/portal/PortalHost.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PortalHost.d.ts","sourceRoot":"","sources":["../../../../../src/components/portal/PortalHost.tsx"],"names":[],"mappings":"AACA,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAIpD,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,GAAG;IAC1D,kFAAkF;IAClF,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,EAAE,IAAI,EAAE,GAAG,SAAS,EAAE,EAAE,eAAe,+BAWjE"}
|
|
@@ -3,9 +3,9 @@ export interface PortalProviderProps {
|
|
|
3
3
|
children: ReactNode;
|
|
4
4
|
}
|
|
5
5
|
/**
|
|
6
|
-
* Holds a registry of teleported content
|
|
7
|
-
*
|
|
8
|
-
*
|
|
6
|
+
* Holds a registry of teleported content, keyed by host name. Descendant
|
|
7
|
+
* `Portal` components register/unregister entries; a `PortalHost` placed
|
|
8
|
+
* anywhere below renders the entries for its `name`.
|
|
9
9
|
*/
|
|
10
10
|
export declare function PortalProvider({ children }: PortalProviderProps): import("react").JSX.Element;
|
|
11
11
|
//# sourceMappingURL=PortalProvider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PortalProvider.d.ts","sourceRoot":"","sources":["../../../../../src/components/portal/PortalProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAkC,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"PortalProvider.d.ts","sourceRoot":"","sources":["../../../../../src/components/portal/PortalProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAkC,MAAM,OAAO,CAAC;AAQvE,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,EAAE,QAAQ,EAAE,EAAE,mBAAmB,+BA+D/D"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
export type {
|
|
2
|
-
export {
|
|
1
|
+
export type { PortalProps } from './Portal.js';
|
|
2
|
+
export { Portal } from './Portal.js';
|
|
3
|
+
export type { PortalContextValue, PortalEntry } from './PortalContext.js';
|
|
4
|
+
export type { PortalHostProps } from './PortalHost.js';
|
|
3
5
|
export { PortalHost } from './PortalHost.js';
|
|
4
6
|
export type { PortalProviderProps } from './PortalProvider.js';
|
|
5
7
|
export { PortalProvider } from './PortalProvider.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/portal/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/portal/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,WAAW,EAAE,MAAM,aAAU,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAU,CAAC;AAClC,YAAY,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,oBAAiB,CAAC;AACvE,YAAY,EAAE,eAAe,EAAE,MAAM,iBAAc,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAc,CAAC;AAC1C,YAAY,EAAE,mBAAmB,EAAE,MAAM,qBAAkB,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAkB,CAAC"}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { type ComponentPropsWithoutRef, type ComponentRef, type ElementType, Fragment, forwardRef, type PropsWithChildren, type ReactNode } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { View } from 'react-native';
|
|
3
|
+
import type { ViewProps } from 'react-native-svg/lib/typescript/fabric/utils';
|
|
3
4
|
import type { ColorToken } from '../../theme/types';
|
|
5
|
+
import { ScreenFlashList } from './ScreenFlashList.js';
|
|
4
6
|
import { ScreenFlatList } from './ScreenFlatList.js';
|
|
5
7
|
import { ScreenScrollView } from './ScreenScrollView.js';
|
|
8
|
+
import type { ScreenMargins } from './types.js';
|
|
6
9
|
export type ScreenHeaderProps<T extends ElementType = typeof Fragment> = PropsWithChildren<{
|
|
7
10
|
/**
|
|
8
11
|
* Component to render the header as. Defaults to `Fragment` (no
|
|
@@ -24,29 +27,31 @@ export type ScreenHeaderProps<T extends ElementType = typeof Fragment> = PropsWi
|
|
|
24
27
|
* ```
|
|
25
28
|
*/
|
|
26
29
|
declare function ScreenHeader<T extends ElementType = typeof Fragment>({ children, as, ...rest }: ScreenHeaderProps<T>): import("react").JSX.Element;
|
|
27
|
-
|
|
30
|
+
declare namespace ScreenHeader {
|
|
31
|
+
var displayName: string;
|
|
32
|
+
}
|
|
33
|
+
export interface ScreenProps extends ViewProps {
|
|
28
34
|
children: ReactNode;
|
|
29
35
|
/** Background color token. Defaults to the `background` token. */
|
|
30
36
|
bg?: ColorToken;
|
|
31
|
-
/**
|
|
32
|
-
* Safe-area edges to inset. Defaults are header-aware: `[]` when a
|
|
33
|
-
* `Screen.Header` is present (the header owns the top inset), otherwise
|
|
34
|
-
* `['top', 'bottom']`. An explicit value is respected, except `top` is
|
|
35
|
-
* dropped when a header is present.
|
|
36
|
-
*/
|
|
37
|
-
edges?: Edge[];
|
|
38
37
|
/** Hosted inside a tab navigator? Exposed via `useScreen()`. Default false. */
|
|
39
38
|
inTabView?: boolean;
|
|
40
39
|
/**
|
|
41
|
-
*
|
|
42
|
-
*
|
|
40
|
+
* Which axes of `layout.screen.margin` the scroll containers pad their
|
|
41
|
+
* content with. Default `'all'`. Overridable per scroll container.
|
|
42
|
+
*/
|
|
43
|
+
margins?: ScreenMargins;
|
|
44
|
+
/**
|
|
45
|
+
* @deprecated Use `margins` — `false` maps to `margins="none"`. Ignored when
|
|
46
|
+
* `margins` is set.
|
|
43
47
|
*/
|
|
44
|
-
|
|
48
|
+
hasMargins?: boolean;
|
|
45
49
|
}
|
|
46
|
-
type ScreenComponent = ReturnType<typeof forwardRef<ComponentRef<typeof
|
|
50
|
+
type ScreenComponent = ReturnType<typeof forwardRef<ComponentRef<typeof View>, ScreenProps>> & {
|
|
47
51
|
Header: typeof ScreenHeader;
|
|
48
52
|
ScrollView: typeof ScreenScrollView;
|
|
49
53
|
FlatList: typeof ScreenFlatList;
|
|
54
|
+
FlashList: typeof ScreenFlashList;
|
|
50
55
|
};
|
|
51
56
|
export declare const Screen: ScreenComponent;
|
|
52
57
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Screen.d.ts","sourceRoot":"","sources":["../../../../../src/components/screen/Screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,wBAAwB,EAC7B,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,QAAQ,EACR,UAAU,EAEV,KAAK,iBAAiB,EACtB,KAAK,SAAS,EAEf,MAAM,OAAO,CAAC;AACf,OAAO,
|
|
1
|
+
{"version":3,"file":"Screen.d.ts","sourceRoot":"","sources":["../../../../../src/components/screen/Screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,wBAAwB,EAC7B,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,QAAQ,EACR,UAAU,EAEV,KAAK,iBAAiB,EACtB,KAAK,SAAS,EAEf,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8CAA8C,CAAC;AAE9E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAI/C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAmB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAkB,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAoB,CAAC;AACtD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAS,CAAC;AAE7C,MAAM,MAAM,iBAAiB,CAAC,CAAC,SAAS,WAAW,GAAG,OAAO,QAAQ,IACnE,iBAAiB,CACf;IACE;;;;OAIG;IACH,EAAE,CAAC,EAAE,CAAC,CAAC;CACR,GAAG,IAAI,CAAC,wBAAwB,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,CAClD,CAAC;AAEJ;;;;;;;;;;;GAWG;AACH,iBAAS,YAAY,CAAC,CAAC,SAAS,WAAW,GAAG,OAAO,QAAQ,EAAE,EAC7D,QAAQ,EACR,EAAE,EACF,GAAG,IAAI,EACR,EAAE,iBAAiB,CAAC,CAAC,CAAC,+BAGtB;kBAPQ,YAAY;;;AAyBrB,MAAM,WAAW,WAAY,SAAQ,SAAS;IAC5C,QAAQ,EAAE,SAAS,CAAC;IACpB,kEAAkE;IAClE,EAAE,CAAC,EAAE,UAAU,CAAC;IAChB,+EAA+E;IAC/E,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,KAAK,eAAe,GAAG,UAAU,CAC/B,OAAO,UAAU,CAAC,YAAY,CAAC,OAAO,IAAI,CAAC,EAAE,WAAW,CAAC,CAC1D,GAAG;IACF,MAAM,EAAE,OAAO,YAAY,CAAC;IAC5B,UAAU,EAAE,OAAO,gBAAgB,CAAC;IACpC,QAAQ,EAAE,OAAO,cAAc,CAAC;IAChC,SAAS,EAAE,OAAO,eAAe,CAAC;CACnC,CAAC;AA4CF,eAAO,MAAM,MAAM,iBAAa,CAAC"}
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
2
|
import Animated, { type AnimatedRef, type ScrollHandlerProcessed, type SharedValue } from 'react-native-reanimated';
|
|
3
|
+
import type { ScreenMargins } from './types.js';
|
|
3
4
|
export type ScreenScrollRef = AnimatedRef<Animated.ScrollView>;
|
|
5
|
+
/** `PortalHost` name shared by `Screen.ScrollView` / `Screen.FlatList` and header variants that portal content into them. */
|
|
6
|
+
export declare const SCREEN_HEADER_PORTAL_HOST = "screen-header";
|
|
4
7
|
export interface ScreenContextValue {
|
|
5
8
|
/**
|
|
6
|
-
*
|
|
7
|
-
* Overridable per `Screen.ScrollView` / `Screen.FlatList
|
|
9
|
+
* Which axes scroll containers pad with `layout.screen.margin`.
|
|
10
|
+
* Overridable per `Screen.ScrollView` / `Screen.FlatList` /
|
|
11
|
+
* `Screen.FlashList` via their own `margins` prop.
|
|
8
12
|
*/
|
|
9
|
-
margins:
|
|
13
|
+
margins: ScreenMargins;
|
|
10
14
|
/** Whether a `Screen.Header` is present. Used by scroll containers to add top inset. */
|
|
11
15
|
hasHeader: boolean;
|
|
12
16
|
/**
|
|
@@ -32,24 +36,23 @@ export interface ScreenContextValue {
|
|
|
32
36
|
scrollRef: ScreenScrollRef;
|
|
33
37
|
/** Scroll handler that mirrors offset into `scrollY`. */
|
|
34
38
|
scrollHandler: ScrollHandlerProcessed<Record<string, unknown>>;
|
|
35
|
-
|
|
36
|
-
isInTabView: boolean;
|
|
39
|
+
background?: string;
|
|
37
40
|
}
|
|
38
41
|
export declare const ScreenContext: import("react").Context<ScreenContextValue | null>;
|
|
39
42
|
export interface ScreenScrollProviderProps {
|
|
40
43
|
children: ReactNode;
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
margins?: boolean;
|
|
44
|
+
/** Which axes scroll containers pad with `layout.screen.margin`. Default `'all'`. */
|
|
45
|
+
margins?: ScreenMargins;
|
|
44
46
|
/** Whether a `Screen.Header` child is present. Default false. */
|
|
45
47
|
hasHeader?: boolean;
|
|
48
|
+
background?: string;
|
|
46
49
|
}
|
|
47
50
|
/**
|
|
48
51
|
* Owns the screen's shared scroll ref, offset, snap offsets, and header collapse
|
|
49
52
|
* metrics. Header variants call {@link ScreenContextValue.setHeaderCollapseHeight};
|
|
50
53
|
* scroll containers bind the ref via {@link useScreen}.
|
|
51
54
|
*/
|
|
52
|
-
export declare function ScreenScrollProvider({
|
|
55
|
+
export declare function ScreenScrollProvider({ background, children, margins, hasHeader, }: ScreenScrollProviderProps): import("react").JSX.Element;
|
|
53
56
|
/**
|
|
54
57
|
* Access the enclosing `Screen`'s shared scroll state, ref, and snap offsets.
|
|
55
58
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScreenContext.d.ts","sourceRoot":"","sources":["../../../../../src/components/screen/ScreenContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,SAAS,EAKf,MAAM,OAAO,CAAC;AAEf,OAAO,QAAQ,EAAE,EACf,KAAK,WAAW,EAChB,KAAK,sBAAsB,EAC3B,KAAK,WAAW,EAIjB,MAAM,yBAAyB,CAAC;AAEjC,MAAM,MAAM,eAAe,GAAG,WAAW,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;AAE/D,MAAM,WAAW,kBAAkB;IACjC
|
|
1
|
+
{"version":3,"file":"ScreenContext.d.ts","sourceRoot":"","sources":["../../../../../src/components/screen/ScreenContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,SAAS,EAKf,MAAM,OAAO,CAAC;AAEf,OAAO,QAAQ,EAAE,EACf,KAAK,WAAW,EAChB,KAAK,sBAAsB,EAC3B,KAAK,WAAW,EAIjB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAS,CAAC;AAE7C,MAAM,MAAM,eAAe,GAAG,WAAW,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;AAE/D,6HAA6H;AAC7H,eAAO,MAAM,yBAAyB,kBAAkB,CAAC;AAEzD,MAAM,WAAW,kBAAkB;IACjC;;;;OAIG;IACH,OAAO,EAAE,aAAa,CAAC;IACvB,wFAAwF;IACxF,SAAS,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,OAAO,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC7B;;;;OAIG;IACH,oBAAoB,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC1C;;;OAGG;IACH,iBAAiB,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;IACxC,sEAAsE;IACtE,uBAAuB,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAClD,sFAAsF;IACtF,SAAS,EAAE,eAAe,CAAC;IAC3B,yDAAyD;IACzD,aAAa,EAAE,sBAAsB,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IAE/D,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,aAAa,oDAAiD,CAAC;AAE5E,MAAM,WAAW,yBAAyB;IACxC,QAAQ,EAAE,SAAS,CAAC;IACpB,qFAAqF;IACrF,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,iEAAiE;IACjE,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,EACnC,UAA0B,EAC1B,QAAQ,EACR,OAAe,EACf,SAAiB,GAClB,EAAE,yBAAyB,+BAiD3B;AAED;;;;;;;;;GASG;AACH,wBAAgB,SAAS,IAAI,kBAAkB,CAM9C"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { type FlashListProps } from '@shopify/flash-list';
|
|
2
|
+
import type { ScreenScrollableProps } from './types.js';
|
|
3
|
+
export interface ScreenFlashListProps<T> extends Omit<FlashListProps<T>, 'horizontal'>, ScreenScrollableProps {
|
|
4
|
+
/**
|
|
5
|
+
* Extra bottom padding on the list content — clearance for a tab bar or home
|
|
6
|
+
* indicator. Defaults to the `layout.screen.margin.y` token when margins are
|
|
7
|
+
* enabled, otherwise `0`.
|
|
8
|
+
*/
|
|
9
|
+
bottomInset?: number;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* `FlashList` variant of `Screen.ScrollView`: mirrors scroll offset into the
|
|
13
|
+
* screen's shared `scrollY`, hosts the portal target above the list, and
|
|
14
|
+
* applies token-driven content padding.
|
|
15
|
+
*
|
|
16
|
+
* Requires `@shopify/flash-list` — it is a peer dependency of
|
|
17
|
+
* `react-native-terra-ui` and must be installed in the consuming app.
|
|
18
|
+
*
|
|
19
|
+
* Note: unlike `Screen.FlatList`, this does not bind the screen's shared
|
|
20
|
+
* imperative `scrollRef` — `FlashList`'s ref exposes a different (non
|
|
21
|
+
* Reanimated-compatible) imperative API.
|
|
22
|
+
*
|
|
23
|
+
* Shares `loading` / `LoadingComponent` / `EmptyComponent` / `margins` /
|
|
24
|
+
* `horizontal` with `Screen.ScrollView`, so a screen can swap one container for
|
|
25
|
+
* another without relearning its API.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```tsx
|
|
29
|
+
* <Screen.FlashList data={items} renderItem={({ item }) => <Row item={item} />} />
|
|
30
|
+
* ```
|
|
31
|
+
*
|
|
32
|
+
* @example Loading and empty placeholders
|
|
33
|
+
* ```tsx
|
|
34
|
+
* <Screen.FlashList
|
|
35
|
+
* data={items}
|
|
36
|
+
* loading={isLoading}
|
|
37
|
+
* EmptyComponent={<EmptyState icon="status.info" title="Nothing yet" fill />}
|
|
38
|
+
* renderItem={({ item }) => <Row item={item} />}
|
|
39
|
+
* />
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
export declare function ScreenFlashList<T>({ data, style, contentContainerStyle, ListHeaderComponent, ListFooterComponent, ListEmptyComponent, horizontal, loading, LoadingComponent, EmptyComponent, margins, bottomInset, onScroll, ...rest }: ScreenFlashListProps<T>): import("react").JSX.Element;
|
|
43
|
+
//# sourceMappingURL=ScreenFlashList.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScreenFlashList.d.ts","sourceRoot":"","sources":["../../../../../src/components/screen/ScreenFlashList.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAkBrE,OAAO,KAAK,EAAiB,qBAAqB,EAAE,MAAM,YAAS,CAAC;AAOpE,MAAM,WAAW,oBAAoB,CAAC,CAAC,CACrC,SAAQ,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,YAAY,CAAC,EAC3C,qBAAqB;IACvB;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,EACjC,IAAI,EACJ,KAAK,EACL,qBAAqB,EACrB,mBAAmB,EACnB,mBAAmB,EACnB,kBAAkB,EAClB,UAAkB,EAClB,OAAe,EACf,gBAAgB,EAChB,cAAc,EACd,OAAO,EACP,WAAW,EACX,QAAQ,EACR,GAAG,IAAI,EACR,EAAE,oBAAoB,CAAC,CAAC,CAAC,+BAkFzB"}
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import { type FlatListProps } from 'react-native';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
* Apply `layout.screen.margin` padding. Defaults to the enclosing `Screen`'s
|
|
5
|
-
* `margins` value.
|
|
6
|
-
*/
|
|
7
|
-
margins?: boolean;
|
|
2
|
+
import type { ScreenScrollableProps } from './types.js';
|
|
3
|
+
export interface ScreenFlatListProps<T> extends Omit<FlatListProps<T>, 'CellRendererComponent' | 'horizontal'>, ScreenScrollableProps {
|
|
8
4
|
/**
|
|
9
5
|
* Extra bottom padding on the list content — clearance for a tab bar or home
|
|
10
6
|
* indicator. Defaults to the `layout.screen.margin.y` token when margins are
|
|
@@ -17,10 +13,24 @@ export interface ScreenFlatListProps<T> extends Omit<FlatListProps<T>, 'CellRend
|
|
|
17
13
|
* ref, mirrors offset into `scrollY`, hosts the portal target above the list,
|
|
18
14
|
* and applies token-driven content padding.
|
|
19
15
|
*
|
|
16
|
+
* Shares `loading` / `LoadingComponent` / `EmptyComponent` / `margins` /
|
|
17
|
+
* `horizontal` with `Screen.ScrollView`, so a screen can swap one container for
|
|
18
|
+
* another without relearning its API.
|
|
19
|
+
*
|
|
20
20
|
* @example
|
|
21
21
|
* ```tsx
|
|
22
22
|
* <Screen.FlatList data={items} renderItem={({ item }) => <Row item={item} />} />
|
|
23
23
|
* ```
|
|
24
|
+
*
|
|
25
|
+
* @example Loading and empty placeholders
|
|
26
|
+
* ```tsx
|
|
27
|
+
* <Screen.FlatList
|
|
28
|
+
* data={items}
|
|
29
|
+
* loading={isLoading}
|
|
30
|
+
* EmptyComponent={<EmptyState icon="status.info" title="Nothing yet" fill />}
|
|
31
|
+
* renderItem={({ item }) => <Row item={item} />}
|
|
32
|
+
* />
|
|
33
|
+
* ```
|
|
24
34
|
*/
|
|
25
|
-
export declare function ScreenFlatList<T>({ style, contentContainerStyle, ListHeaderComponent, margins, bottomInset, onScroll, ...rest }: ScreenFlatListProps<T>): import("react").JSX.Element;
|
|
35
|
+
export declare function ScreenFlatList<T>({ data, style, contentContainerStyle, ListHeaderComponent, ListFooterComponent, ListEmptyComponent, horizontal, loading, LoadingComponent, EmptyComponent, margins, bottomInset, onScroll, ...rest }: ScreenFlatListProps<T>): import("react").JSX.Element;
|
|
26
36
|
//# sourceMappingURL=ScreenFlatList.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScreenFlatList.d.ts","sourceRoot":"","sources":["../../../../../src/components/screen/ScreenFlatList.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ScreenFlatList.d.ts","sourceRoot":"","sources":["../../../../../src/components/screen/ScreenFlatList.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAInB,MAAM,cAAc,CAAC;AAatB,OAAO,KAAK,EAAiB,qBAAqB,EAAE,MAAM,YAAS,CAAC;AAGpE,MAAM,WAAW,mBAAmB,CAAC,CAAC,CACpC,SAAQ,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,uBAAuB,GAAG,YAAY,CAAC,EACpE,qBAAqB;IACvB;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,EAChC,IAAI,EACJ,KAAK,EACL,qBAAqB,EACrB,mBAAmB,EACnB,mBAAmB,EACnB,kBAAkB,EAClB,UAAkB,EAClB,OAAe,EACf,gBAAgB,EAChB,cAAc,EACd,OAAO,EACP,WAAW,EACX,QAAQ,EACR,GAAG,IAAI,EACR,EAAE,mBAAmB,CAAC,CAAC,CAAC,+BA2ExB"}
|