react-native-terra-ui 0.11.10 → 0.11.12

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.
Files changed (59) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/lib/module/components/box/Box.js +35 -10
  3. package/lib/module/components/box/Box.js.map +1 -1
  4. package/lib/module/components/header/hooks/use-header-color.js +16 -0
  5. package/lib/module/components/header/hooks/use-header-color.js.map +1 -0
  6. package/lib/module/components/header/hooks/use-large-title-header.js +81 -0
  7. package/lib/module/components/header/hooks/use-large-title-header.js.map +1 -0
  8. package/lib/module/components/header/parts/HeaderAccessory.js +21 -6
  9. package/lib/module/components/header/parts/HeaderAccessory.js.map +1 -1
  10. package/lib/module/components/header/parts/HeaderBar.js +122 -0
  11. package/lib/module/components/header/parts/HeaderBar.js.map +1 -0
  12. package/lib/module/components/header/parts/HeaderGradientOverlay.js +20 -76
  13. package/lib/module/components/header/parts/HeaderGradientOverlay.js.map +1 -1
  14. package/lib/module/components/header/parts/HeaderSurface.js +16 -37
  15. package/lib/module/components/header/parts/HeaderSurface.js.map +1 -1
  16. package/lib/module/components/header/variants/LargeTitleHeader/index.js +51 -388
  17. package/lib/module/components/header/variants/LargeTitleHeader/index.js.map +1 -1
  18. package/lib/module/components/header/variants/LargeTitleHeader/parts/LargeTitleContent.js +72 -0
  19. package/lib/module/components/header/variants/LargeTitleHeader/parts/LargeTitleContent.js.map +1 -0
  20. package/lib/module/components/header/variants/TitleHeader/index.js +32 -161
  21. package/lib/module/components/header/variants/TitleHeader/index.js.map +1 -1
  22. package/lib/module/components/surface/Surface.js +2 -0
  23. package/lib/module/components/surface/Surface.js.map +1 -1
  24. package/lib/typescript/src/components/box/Box.d.ts +28 -4
  25. package/lib/typescript/src/components/box/Box.d.ts.map +1 -1
  26. package/lib/typescript/src/components/header/hooks/use-header-color.d.ts +4 -0
  27. package/lib/typescript/src/components/header/hooks/use-header-color.d.ts.map +1 -0
  28. package/lib/typescript/src/components/header/hooks/use-large-title-header.d.ts +36 -0
  29. package/lib/typescript/src/components/header/hooks/use-large-title-header.d.ts.map +1 -0
  30. package/lib/typescript/src/components/header/parts/HeaderAccessory.d.ts +8 -5
  31. package/lib/typescript/src/components/header/parts/HeaderAccessory.d.ts.map +1 -1
  32. package/lib/typescript/src/components/header/parts/HeaderBar.d.ts +17 -0
  33. package/lib/typescript/src/components/header/parts/HeaderBar.d.ts.map +1 -0
  34. package/lib/typescript/src/components/header/parts/HeaderGradientOverlay.d.ts +12 -15
  35. package/lib/typescript/src/components/header/parts/HeaderGradientOverlay.d.ts.map +1 -1
  36. package/lib/typescript/src/components/header/parts/HeaderSurface.d.ts +8 -9
  37. package/lib/typescript/src/components/header/parts/HeaderSurface.d.ts.map +1 -1
  38. package/lib/typescript/src/components/header/variants/LargeTitleHeader/index.d.ts +3 -23
  39. package/lib/typescript/src/components/header/variants/LargeTitleHeader/index.d.ts.map +1 -1
  40. package/lib/typescript/src/components/header/variants/LargeTitleHeader/parts/LargeTitleContent.d.ts +11 -0
  41. package/lib/typescript/src/components/header/variants/LargeTitleHeader/parts/LargeTitleContent.d.ts.map +1 -0
  42. package/lib/typescript/src/components/header/variants/TitleHeader/index.d.ts +3 -19
  43. package/lib/typescript/src/components/header/variants/TitleHeader/index.d.ts.map +1 -1
  44. package/lib/typescript/src/components/surface/Surface.d.ts +1 -1
  45. package/lib/typescript/src/components/surface/Surface.d.ts.map +1 -1
  46. package/lib/typescript/src/components/toast/Toast.d.ts +1 -1
  47. package/lib/typescript/src/components/toast/Toast.d.ts.map +1 -1
  48. package/package.json +1 -1
  49. package/src/components/box/Box.tsx +59 -16
  50. package/src/components/header/hooks/use-header-color.ts +14 -0
  51. package/src/components/header/hooks/use-large-title-header.ts +78 -0
  52. package/src/components/header/parts/HeaderAccessory.tsx +26 -7
  53. package/src/components/header/parts/HeaderBar.tsx +125 -0
  54. package/src/components/header/parts/HeaderGradientOverlay.tsx +18 -70
  55. package/src/components/header/parts/HeaderSurface.tsx +16 -35
  56. package/src/components/header/variants/LargeTitleHeader/index.tsx +44 -371
  57. package/src/components/header/variants/LargeTitleHeader/parts/LargeTitleContent.tsx +88 -0
  58. package/src/components/header/variants/TitleHeader/index.tsx +32 -149
  59. package/src/components/surface/Surface.tsx +2 -1
@@ -0,0 +1,72 @@
1
+ "use strict";
2
+
3
+ import { Text } from "react-native-unistyles/components/native/Text";
4
+ import Animated from "react-native-reanimated";
5
+ import { StyleSheet, useUnistyles } from "react-native-unistyles";
6
+ import { FONT_WEIGHT_VALUE } from "../../../../../utils/typography.js";
7
+ import { isTextTitle } from "../../../utils.js";
8
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
9
+ export function LargeTitleContent({
10
+ title,
11
+ overline,
12
+ subtitle,
13
+ hasAccessoryBelow,
14
+ onHeightChange,
15
+ animatedStyle
16
+ }) {
17
+ const {
18
+ theme
19
+ } = useUnistyles();
20
+ // Layout height excludes the collapse transform.
21
+ const handleLayout = event => onHeightChange?.(event.nativeEvent.layout.height);
22
+ return /*#__PURE__*/_jsxs(Animated.View, {
23
+ style: [styles.portalContent(hasAccessoryBelow), animatedStyle],
24
+ onLayout: handleLayout,
25
+ children: [!!overline && /*#__PURE__*/_jsx(Text, {
26
+ style: styles.overline,
27
+ maxFontSizeMultiplier: theme.typography.variants["label-sm"].maxFontSizeMultiplier,
28
+ children: overline
29
+ }), isTextTitle(title) ? /*#__PURE__*/_jsx(Text, {
30
+ style: styles.largeTitle,
31
+ maxFontSizeMultiplier: theme.typography.variants["headline-lg"].maxFontSizeMultiplier,
32
+ children: title
33
+ }) : title, !!subtitle && /*#__PURE__*/_jsx(Text, {
34
+ style: styles.subtitle,
35
+ maxFontSizeMultiplier: theme.typography.variants["body-lg"].maxFontSizeMultiplier,
36
+ children: subtitle
37
+ })]
38
+ });
39
+ }
40
+ const styles = StyleSheet.create(theme => ({
41
+ portalContent: hasAccessoryBelow => ({
42
+ gap: theme.spacing["1"] / 2,
43
+ // Include the gap in the measured height used to position the accessory.
44
+ paddingBottom: hasAccessoryBelow ? theme.spacing["2"] : 0,
45
+ paddingHorizontal: theme.layout.screen.padding.x,
46
+ uni__dependencies: [0]
47
+ }),
48
+ overline: {
49
+ fontSize: theme.typography.variants["label-sm"].fontSize,
50
+ lineHeight: theme.typography.variants["label-sm"].lineHeight,
51
+ letterSpacing: theme.typography.variants["label-sm"].letterSpacing,
52
+ fontWeight: FONT_WEIGHT_VALUE[theme.typography.variants["label-sm"].fontWeight],
53
+ color: theme.color["text.tertiary"] ?? "",
54
+ uni__dependencies: [0]
55
+ },
56
+ largeTitle: {
57
+ fontSize: theme.typography.variants["headline-lg"].fontSize,
58
+ lineHeight: theme.typography.variants["headline-lg"].lineHeight,
59
+ letterSpacing: theme.typography.variants["headline-lg"].letterSpacing,
60
+ fontWeight: FONT_WEIGHT_VALUE[theme.typography.variants["headline-lg"].fontWeight],
61
+ color: theme.color["text.primary"] ?? "",
62
+ uni__dependencies: [0]
63
+ },
64
+ subtitle: {
65
+ fontSize: theme.typography.variants["body-lg"].fontSize,
66
+ lineHeight: theme.typography.variants["body-lg"].lineHeight,
67
+ letterSpacing: theme.typography.variants["body-lg"].letterSpacing,
68
+ color: theme.color["text.tertiary"] ?? "",
69
+ uni__dependencies: [0]
70
+ }
71
+ }));
72
+ //# sourceMappingURL=LargeTitleContent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Animated","StyleSheet","useUnistyles","FONT_WEIGHT_VALUE","isTextTitle","jsx","_jsx","jsxs","_jsxs","LargeTitleContent","title","overline","subtitle","hasAccessoryBelow","onHeightChange","animatedStyle","theme","handleLayout","event","nativeEvent","layout","height","View","style","styles","portalContent","onLayout","children","Text","maxFontSizeMultiplier","typography","variants","largeTitle","create","gap","spacing","paddingBottom","paddingHorizontal","screen","padding","x","uni__dependencies","fontSize","lineHeight","letterSpacing","fontWeight","color"],"sourceRoot":"../../../../../../../src","sources":["components/header/variants/LargeTitleHeader/parts/LargeTitleContent.tsx"],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a,aAAa;IACrEC,UAAU,EAAE1C,iBAAiB,CAACa,KAAK,CAACc,UAAU,CAACC,QAAQ,CAAC,aAAa,CAAC,CAACc,UAAU,CAAC;IAClFC,KAAK,EAAG9B,KAAK,CAAC8B,KAAK,CAAmD,cAAc,CAAC,IAAI,EAAE;IAAAL,iBAAA;EAC7F,CAAC;EACD7B,QAAQ,EAAE;IACR8B,QAAQ,EAAE1B,KAAK,CAACc,UAAU,CAACC,QAAQ,CAAC,SAAS,CAAC,CAACW,QAAQ;IACvDC,UAAU,EAAE3B,KAAK,CAACc,UAAU,CAACC,QAAQ,CAAC,SAAS,CAAC,CAACY,UAAU;IAC3DC,aAAa,EAAE5B,KAAK,CAACc,UAAU,CAACC,QAAQ,CAAC,SAAS,CAAC,CAACa,aAAa;IACjEE,KAAK,EAAG9B,KAAK,CAAC8B,KAAK,CAAmD,eAAe,CAAC,IAAI,EAAE;IAAAL,iBAAA;EAC9F;AACF,CAAC,CAAC,CAAC","ignoreList":[]}
@@ -1,36 +1,15 @@
1
1
  "use strict";
2
2
 
3
3
  import { View } from "react-native-unistyles/components/native/View";
4
- import { Text } from "react-native-unistyles/components/native/Text";
5
- import { useCallback, useContext } from "react";
6
- import { StyleSheet, useUnistyles } from "react-native-unistyles";
7
- import { resolveThemeColor } from "../../../../utils/resolve-theme-color.js";
8
- import { FONT_WEIGHT_VALUE } from "../../../../utils/typography.js";
4
+ import { useContext } from "react";
5
+ import { StyleSheet } from "react-native-unistyles";
9
6
  import { useHeaderBackground } from "../../../screen/parts/ScreenHeaderAppearance.js";
10
7
  import { ScreenContext } from "../../../screen/ScreenContext.js";
11
- import { Toolbar } from "../../../toolbar/index.js";
12
- import { HeaderDismissButton } from "../../header-buttons.js";
8
+ import { useHeaderColor } from "../../hooks/use-header-color.js";
13
9
  import { HeaderAccessory } from "../../parts/HeaderAccessory.js";
14
- import { HeaderSurface } from "../../parts/HeaderSurface.js";
15
- import { isCustomTitle, isTextTitle } from "../../utils.js";
16
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
17
- /**
18
- * Compact title bar (leading slot · title · trailing slot) with a top safe-area
19
- * inset outside Screen. Within Screen, the root owns safe-area clearance. The inline counterpart to `Header.LargeTitle`; use it for screens that
20
- * don't need a collapsing large title.
21
- *
22
- * @example
23
- * ```tsx
24
- * <Screen.Header>
25
- * <Header.Title
26
- * title="Stats"
27
- * trailingActions={
28
- * <Toolbar.Button icon="add" accessibilityLabel="Add" onPress={add} />
29
- * }
30
- * />
31
- * </Screen.Header>
32
- * ```
33
- */
10
+ import { HeaderBar } from "../../parts/HeaderBar.js";
11
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
12
+ /** Compact header. Screen owns the safe area when present; standalone headers reserve it here. */
34
13
  export function TitleHeader({
35
14
  title,
36
15
  leadingActions,
@@ -39,79 +18,34 @@ export function TitleHeader({
39
18
  RightToolbar,
40
19
  accessory,
41
20
  accessoryPadding = "x",
42
- dismissAction = "none",
43
- navigation,
44
- onDismiss,
45
21
  titleAlignment = "center",
46
22
  background,
47
- bg
23
+ bg,
24
+ ...dismissProps
48
25
  }) {
49
- const {
50
- theme
51
- } = useUnistyles();
52
26
  const screen = useContext(ScreenContext);
53
- const colorToken = background ?? bg;
54
- const bgColor = (colorToken ? resolveThemeColor(colorToken, theme) : screen?.background) ?? theme.color["surface.canvas"];
55
- useHeaderBackground(bgColor);
56
- const leadingContent = leadingActions !== undefined ? leadingActions : LeftToolbar;
57
- const trailingContent = trailingActions !== undefined ? trailingActions : RightToolbar;
58
- const setAccessoryInset = screen?.setHeaderAccessoryHeight;
59
- // Compact headers always reserve the accessory height as top padding.
60
- const handleAccessoryHeightChange = useCallback(height => setAccessoryInset?.(height), [setAccessoryInset]);
61
- const isTransparent = bgColor === "transparent";
62
- const gradientColor = bgColor;
63
- const _styles = styles;
64
- {
65
- const styles = _styles.useVariants({
66
- titleAlignment
67
- });
68
- const leading = dismissAction === "back" ? /*#__PURE__*/_jsxs(_Fragment, {
69
- children: [/*#__PURE__*/_jsx(HeaderDismissButton, {
70
- dismissAction: dismissAction,
71
- navigation: navigation,
72
- onDismiss: onDismiss
73
- }), leadingContent]
74
- }) : leadingContent;
75
- const trailing = dismissAction === "close" ? /*#__PURE__*/_jsxs(_Fragment, {
76
- children: [trailingContent, /*#__PURE__*/_jsx(HeaderDismissButton, {
77
- dismissAction: dismissAction,
78
- navigation: navigation,
79
- onDismiss: onDismiss
80
- })]
81
- }) : trailingContent;
82
- return /*#__PURE__*/_jsxs(View, {
83
- style: styles.container,
84
- children: [/*#__PURE__*/_jsx(View, {
85
- style: styles.safeArea(isTransparent, bgColor, screen !== null)
86
- }), /*#__PURE__*/_jsxs(View, {
87
- style: styles.barGroup,
88
- children: [/*#__PURE__*/_jsx(HeaderSurface, {
89
- color: gradientColor
90
- }), /*#__PURE__*/_jsxs(View, {
91
- style: styles.bar,
92
- children: [leading != null && /*#__PURE__*/_jsx(Toolbar, {
93
- children: leading
94
- }), /*#__PURE__*/_jsx(View, {
95
- style: styles.titleContainer,
96
- pointerEvents: isCustomTitle(title) ? "box-none" : "none",
97
- children: isTextTitle(title) ? String(title).trim().length > 0 && /*#__PURE__*/_jsx(Text, {
98
- style: styles.title,
99
- children: title
100
- }) : title
101
- }), trailing != null && /*#__PURE__*/_jsx(Toolbar, {
102
- style: styles.trailing,
103
- children: trailing
104
- })]
105
- }), accessory != null && /*#__PURE__*/_jsx(HeaderAccessory, {
106
- padding: accessoryPadding,
107
- onHeightChange: handleAccessoryHeightChange,
108
- children: accessory
109
- })]
110
- })]
111
- });
112
- }
27
+ const color = useHeaderColor(background ?? bg);
28
+ useHeaderBackground(color);
29
+ return /*#__PURE__*/_jsxs(View, {
30
+ style: styles.container,
31
+ children: [/*#__PURE__*/_jsx(View, {
32
+ style: styles.safeArea(color, screen !== null)
33
+ }), /*#__PURE__*/_jsx(HeaderBar, {
34
+ ...dismissProps,
35
+ title: title,
36
+ titleAlignment: titleAlignment,
37
+ color: color,
38
+ leading: leadingActions !== undefined ? leadingActions : LeftToolbar,
39
+ trailing: trailingActions !== undefined ? trailingActions : RightToolbar
40
+ }), accessory != null && /*#__PURE__*/_jsx(HeaderAccessory, {
41
+ padding: accessoryPadding,
42
+ color: color,
43
+ onHeightChange: screen?.setHeaderAccessoryHeight,
44
+ children: accessory
45
+ })]
46
+ });
113
47
  }
114
- const styles = StyleSheet.create((theme, runtime) => ({
48
+ const styles = StyleSheet.create((_, runtime) => ({
115
49
  container: {
116
50
  position: "absolute",
117
51
  top: 0,
@@ -119,73 +53,10 @@ const styles = StyleSheet.create((theme, runtime) => ({
119
53
  right: 0,
120
54
  zIndex: 1000
121
55
  },
122
- safeArea: (isTransparent, bgColor, withinScreen) => ({
56
+ safeArea: (color, withinScreen) => ({
123
57
  height: withinScreen ? 0 : runtime.insets.top,
124
- backgroundColor: isTransparent ? "transparent" : bgColor,
58
+ backgroundColor: color,
125
59
  uni__dependencies: [9]
126
- }),
127
- // Anchors the absolutely positioned surface over the bar and the accessory both.
128
- barGroup: {
129
- position: "relative"
130
- },
131
- bar: {
132
- height: theme.layout.header.height,
133
- flexDirection: "row",
134
- alignItems: "center",
135
- paddingHorizontal: theme.layout.screen.padding.x,
136
- gap: theme.spacing["3"],
137
- justifyContent: "space-between",
138
- uni__dependencies: [0]
139
- },
140
- // A centered title is absolutely positioned, so it leaves the flex row. With
141
- // no leading slot the trailing toolbar would be the only in-flow child and
142
- // `space-between` would park it on the left — the auto margin pins it right.
143
- trailing: {
144
- justifyContent: "flex-end",
145
- variants: {
146
- titleAlignment: {
147
- center: {
148
- marginLeft: "auto"
149
- },
150
- left: {}
151
- }
152
- },
153
- uni__dependencies: [4]
154
- },
155
- titleContainer: {
156
- variants: {
157
- titleAlignment: {
158
- center: {
159
- position: "absolute",
160
- left: 0,
161
- right: 0,
162
- alignItems: "center"
163
- },
164
- left: {
165
- flex: 1,
166
- alignItems: "flex-start"
167
- }
168
- }
169
- },
170
- uni__dependencies: [4]
171
- },
172
- title: {
173
- fontSize: theme.typography.variants["title-md"].fontSize,
174
- lineHeight: theme.typography.variants["title-md"].lineHeight,
175
- letterSpacing: theme.typography.variants["title-md"].letterSpacing,
176
- fontWeight: FONT_WEIGHT_VALUE[theme.typography.variants["title-md"].fontWeight],
177
- color: theme.color["text.primary"] ?? "",
178
- variants: {
179
- titleAlignment: {
180
- center: {
181
- textAlign: "center"
182
- },
183
- left: {
184
- textAlign: "left"
185
- }
186
- }
187
- },
188
- uni__dependencies: [0, 4]
189
- }
60
+ })
190
61
  }));
191
62
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["useCallback","useContext","StyleSheet","useUnistyles","resolveThemeColor","FONT_WEIGHT_VALUE","useHeaderBackground","ScreenContext","Toolbar","HeaderDismissButton","HeaderAccessory","HeaderSurface","isCustomTitle","isTextTitle","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","TitleHeader","title","leadingActions","trailingActions","LeftToolbar","RightToolbar","accessory","accessoryPadding","dismissAction","navigation","onDismiss","titleAlignment","background","bg","theme","screen","colorToken","bgColor","color","leadingContent","undefined","trailingContent","setAccessoryInset","setHeaderAccessoryHeight","handleAccessoryHeightChange","height","isTransparent","gradientColor","_styles","styles","useVariants","leading","children","trailing","View","style","container","safeArea","barGroup","bar","titleContainer","pointerEvents","String","trim","length","Text","padding","onHeightChange","create","runtime","position","top","left","right","zIndex","withinScreen","insets","backgroundColor","uni__dependencies","layout","header","flexDirection","alignItems","paddingHorizontal","x","gap","spacing","justifyContent","variants","center","marginLeft","flex","fontSize","typography","lineHeight","letterSpacing","fontWeight","textAlign"],"sourceRoot":"../../../../../../src","sources":["components/header/variants/TitleHeader/index.tsx"],"mappings":";;;;AAAA,SAAyBA,WAAW,EAAEC,UAAU,QAAQ,OAAO;AAG/D,SAASC,UAAU,EAAEC,YAAY,QAAQ,wBAAwB;AAGjE,SAASC,iBAAiB;AAC1B,SAASC,iBAAiB;AAC1B,SAASC,mBAAmB;AAC5B,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U,CAAC,CAACQ,UAAU,CAAC;IAC/E1D,KAAK,EAAGJ,KAAK,CAACI,KAAK,CAAmD,cAAc,CAAC,IAAI,EAAE;IAC3FkD,QAAQ,EAAE;MACRzD,cAAc,EAAE;QACd0D,MAAM,EAAE;UAAEQ,SAAS,EAAE;QAAS,CAAC;QAC/BzB,IAAI,EAAE;UAAEyB,SAAS,EAAE;QAAO;MAC5B;IACF,CAAC;IAAAnB,iBAAA;EACH;AACF,CAAC,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["useContext","StyleSheet","useHeaderBackground","ScreenContext","useHeaderColor","HeaderAccessory","HeaderBar","jsx","_jsx","jsxs","_jsxs","TitleHeader","title","leadingActions","trailingActions","LeftToolbar","RightToolbar","accessory","accessoryPadding","titleAlignment","background","bg","dismissProps","screen","color","View","style","styles","container","children","safeArea","leading","undefined","trailing","padding","onHeightChange","setHeaderAccessoryHeight","create","_","runtime","position","top","left","right","zIndex","withinScreen","height","insets","backgroundColor","uni__dependencies"],"sourceRoot":"../../../../../../src","sources":["components/header/variants/TitleHeader/index.tsx"],"mappings":";;;AAAA,SAAyBA,UAAU,QAAQ,OAAO;AAGlD,SAASC,UAAU,QAAQ,wBAAwB;AAGnD,SAASC,mBAAmB;AAC5B,SAASC,aAAa;AAEtB,SAASC,cAAc;AACvB,SAASC,eAAe;AACxB,SAASC,SAAS;AAAgC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AA4ClD;AACA,OAAO,SAASC,WAAWA,CAAC;EAC1BC,KAAK;EACLC,cAAc;EACdC,eAAe;EACfC,WAAW;EACXC,YAAY;EACZC,SAAS;EACTC,gBAAgB,GAAG,GAAG;EACtBC,cAAc,GAAG,QAAQ;EACzBC,UAAU;EACVC,EAAE;EACF,GAAGC;AACa,CAAC,EAAE;EACnB,MAAMC,MAAM,GAAGvB,UAAU,CAACG,aAAa,CAAC;EACxC,MAAMqB,KAAK,GAAGpB,cAAc,CAACgB,UAAU,IAA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veElevation = (variant, elevation) => {
61
61
  */
62
62
  export const Surface = /*#__PURE__*/forwardRef(function Surface({
63
63
  variant = "base",
64
+ p = "3",
64
65
  elevation,
65
66
  radius,
66
67
  borderWidth,
@@ -71,6 +72,7 @@ export const Surface = /*#__PURE__*/forwardRef(function Surface({
71
72
  return /*#__PURE__*/_jsx(Box, {
72
73
  ref: ref,
73
74
  background: VARIANT_BG[variant],
75
+ p: p,
74
76
  radius: radius ?? getDefaultRadius("surface"),
75
77
  borderWidth: borderWidth ?? variantBorder.borderWidth,
76
78
  borderColor: borderColor ?? variantBorder.borderColor,
@@ -1 +1 @@
1
- {"version":3,"names":["forwardRef","getDefaultRadius","getSurfaceElevation","Box","jsx","_jsx","VARIANT_BG","base","raised","sunken","transparent","VARIANT_BORDER","borderWidth","borderColor","resolveElevation","variant","elevation","undefined","Surface","radius","rest","ref","variantBorder","background"],"sourceRoot":"../../../../src","sources":["components/surface/Surface.tsx"],"mappings":";;AAAA,SAA4BA,UAAU,QAAQ,OAAO;AAGrD,SAASC,gBAAgB,EAAEC,mBAAmB;AAE9C,SAAgCC,GAAG;;AAEnC;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAgBA,MAAMC,UAA8C,GAAG;EACrDC,IAAI,EAAE,iBAAiB;EACvBC,MAAM,EAAE,gBAAgB;EACxBC,MAAM,EAAE,gBAAgB;EACxBC,WAAW,EAAE;AACf,CAAC;;AAED;AACA,MAAMC,cAAoG,GAAG;EAC3GJ,IAAI,EAAE,CAAC,CAAC;EACRC,MAAM,EAAE;IAAEI,WAAW,EAAE,UAAU;IAAEC,WAAW,EAAE;EAAgB,CAAC;EACjEJ,MAAM,EAAE;IAAEG,WAAW,EAAE,UAAU;IAAEC,WAAW,EAAE;EAAiB,CAAC;EAClEH,WAAW,EAAE,CAAC;AAChB,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,MAAMI,gBAAgB,GAAGA,CAACC,OAAuB,EAAEC,SAAwB,KAAmB;EAC5F,IAAID,OAAO,KAAK,aAAa,EAAE,OAAO,MAAM;EAC5C,IAAIC,SAAS,KAAKC,SAAS,EAAE,OAAOD,SAAS;EAC7C,IAAID,OAAO,KAAK,QAAQ,EAAE,OAAO,IAAI;EACrC,OAAOb,mBAAmB,CAAC,CAAC;AAC9B,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMgB,OAAO,gBAAGlB,UAAU,CAA0C,SAASkB,OAAOA,CACzF;EAAEH,OAAO,GAAG,MAAM;EAAEC,SAAS;EAAEG,MAAM;EAAEP,WAAW;EAAEC,WAAW;EAAE,GAAGO;AAAK,CAAC,EAC1EC,GAAG,EACH;EACA,MAAMC,aAAa,GAAGX,cAAc,CAACI,OAAO,CAAC;EAE7C,oBACEV,IAAA,CAACF,GAAG;IACFkB,GAAG,EAAEA,GAAI;IACTE,UAAU,EAAEjB,UAAU,CAACS,OAAO,CAAE;IAChCI,MAAM,EAAEA,MAAM,IAAIlB,gBAAgB,CAAC,SAAS,CAAE;IAC9CW,WAAW,EAAEA,WAAW,IAAIU,aAAa,CAACV,WAAY;IACtDC,WAAW,EAAEA,WAAW,IAAIS,aAAa,CAACT,WAAY;IACtDG,SAAS,EAAEF,gBAAgB,CAACC,OAAO,EAAEC,SAAS,CAAE;IAAA,GAC5CI;EAAI,CACT,CAAC;AAEN,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["forwardRef","getDefaultRadius","getSurfaceElevation","Box","jsx","_jsx","VARIANT_BG","base","raised","sunken","transparent","VARIANT_BORDER","borderWidth","borderColor","resolveElevation","variant","elevation","undefined","Surface","p","radius","rest","ref","variantBorder","background"],"sourceRoot":"../../../../src","sources":["components/surface/Surface.tsx"],"mappings":";;AAAA,SAA4BA,UAAU,QAAQ,OAAO;AAGrD,SAASC,gBAAgB,EAAEC,mBAAmB;AAE9C,SAAgCC,GAAG;;AAEnC;AAAA,SA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,gBAAgB,CAAC,SAAS,CAAE;IAC9CW,WAAW,EAAEA,WAAW,IAAIW,aAAa,CAACX,WAAY;IACtDC,WAAW,EAAEA,WAAW,IAAIU,aAAa,CAACV,WAAY;IACtDG,SAAS,EAAEF,gBAAgB,CAACC,OAAO,EAAEC,SAAS,CAAE;IAAA,GAC5CK;EAAI,CACT,CAAC;AAEN,CAAC,CAAC","ignoreList":[]}
@@ -1,12 +1,36 @@
1
- import { type ViewProps } from "react-native";
1
+ import { type ComponentPropsWithRef, type ElementType, type ReactElement } from "react";
2
+ import { View } from "react-native";
2
3
  import { type BoxStyleProps } from "./utils.js";
3
- export interface BoxProps extends ViewProps, BoxStyleProps {
4
- /** Merge Box's style/props onto a single child instead of rendering a View. */
4
+ /** Props owned by Box itself — everything else belongs to the rendered element. */
5
+ interface BoxOwnProps extends BoxStyleProps {
6
+ /** Merge Box's style/props onto a single child instead of rendering an element. Takes precedence over `as`. */
5
7
  asChild?: boolean;
6
8
  }
9
+ /**
10
+ * Props of `Box` when cast as `T`. Token style-props plus everything the
11
+ * rendered component accepts — `<Box as={Pressable} onPress={…} />` type-checks
12
+ * against `Pressable`, not `View`.
13
+ */
14
+ export type BoxProps<T extends ElementType = typeof View> = BoxOwnProps & {
15
+ /** Render as this component instead of `View`. It must accept a `style` prop. */
16
+ as?: T;
17
+ } & Omit<ComponentPropsWithRef<T>, keyof BoxOwnProps | "as">;
7
18
  /**
8
19
  * Base layout primitive: a `View` styled through theme-token props.
9
20
  * The only component family exposing token style-props.
21
+ *
22
+ * Pass `as` to cast it as another component — the token style-props still
23
+ * resolve, and the rest of the props are typed against that component.
24
+ * Note that `as` renders a component Box does not own, so a Unistyles style
25
+ * handed to it only stays theme-reactive if that component's own module runs
26
+ * through the Unistyles Babel plugin (see the stylesheet note below).
27
+ *
28
+ * @example
29
+ * ```tsx
30
+ * <Box row gap="2" p="4" />
31
+ * <Box as={Pressable} onPress={onPress} p="3" radius="md" />
32
+ * ```
10
33
  */
11
- export declare const Box: import("react").ForwardRefExoticComponent<BoxProps & import("react").RefAttributes<import("react-native/types_generated/src/private/webapis/dom/nodes/ReactNativeElement").default>>;
34
+ export declare const Box: <T extends ElementType = typeof View>(props: BoxProps<T>) => ReactElement | null;
35
+ export {};
12
36
  //# sourceMappingURL=Box.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Box.d.ts","sourceRoot":"","sources":["../../../../../src/components/box/Box.tsx"],"names":[],"mappings":"AACA,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAKpD,OAAO,EAAuB,KAAK,aAAa,EAAmB,MAAM,YAAS,CAAC;AAEnF,MAAM,WAAW,QAAS,SAAQ,SAAS,EAAE,aAAa;IACxD,+EAA+E;IAC/E,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAID;;;GAGG;AACH,eAAO,MAAM,GAAG,sLA6Bd,CAAC"}
1
+ {"version":3,"file":"Box.d.ts","sourceRoot":"","sources":["../../../../../src/components/box/Box.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,WAAW,EAEhB,KAAK,YAAY,EAElB,MAAM,OAAO,CAAC;AACf,OAAO,EAAkB,IAAI,EAAkB,MAAM,cAAc,CAAC;AAKpE,OAAO,EAAuB,KAAK,aAAa,EAAmB,MAAM,YAAS,CAAC;AAEnF,mFAAmF;AACnF,UAAU,WAAY,SAAQ,aAAa;IACzC,+GAA+G;IAC/G,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;GAIG;AACH,MAAM,MAAM,QAAQ,CAAC,CAAC,SAAS,WAAW,GAAG,OAAO,IAAI,IAAI,WAAW,GAAG;IACxE,iFAAiF;IACjF,EAAE,CAAC,EAAE,CAAC,CAAC;CACR,GAAG,IAAI,CAAC,qBAAqB,CAAC,CAAC,CAAC,EAAE,MAAM,WAAW,GAAG,IAAI,CAAC,CAAC;AA6C7D;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,GAAG,EAA4B,CAAC,CAAC,SAAS,WAAW,GAAG,OAAO,IAAI,EAC9E,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,KACf,YAAY,GAAG,IAAI,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { ColorToken } from "../../../theme/types";
2
+ /** Explicit header color wins, then Screen, then the theme canvas. */
3
+ export declare function useHeaderColor(token?: ColorToken): string;
4
+ //# sourceMappingURL=use-header-color.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-header-color.d.ts","sourceRoot":"","sources":["../../../../../../src/components/header/hooks/use-header-color.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAI/C,sEAAsE;AACtE,wBAAgB,cAAc,CAAC,KAAK,CAAC,EAAE,UAAU,UAIhD"}
@@ -0,0 +1,36 @@
1
+ import type { HeaderAccessoryBehavior } from "../types.js";
2
+ interface LargeTitleLayoutOptions {
3
+ hasAccessory: boolean;
4
+ accessoryBehavior: HeaderAccessoryBehavior;
5
+ isLargeTitleHidden: boolean;
6
+ }
7
+ /** Coordinates measured layout and UI-thread animation without animating accessory padding. */
8
+ export declare function useLargeTitleHeader({ hasAccessory, accessoryBehavior, isLargeTitleHidden, }: LargeTitleLayoutOptions): {
9
+ isSticky: boolean;
10
+ accessoryOffset: number;
11
+ reservedAccessoryHeight: number;
12
+ setAccessoryHeight: import("react").Dispatch<import("react").SetStateAction<number>>;
13
+ setLargeTitleHeight: import("react").Dispatch<import("react").SetStateAction<number>>;
14
+ accessoryStyle: import("react-native-reanimated/lib/typescript/hook/commonTypes").AnimatedStyleHandle<{
15
+ transform: {
16
+ translateY: number;
17
+ }[];
18
+ }>;
19
+ surfaceStyle: import("react-native-reanimated/lib/typescript/hook/commonTypes").AnimatedStyleHandle<{
20
+ opacity: number;
21
+ }>;
22
+ compactTitleStyle: import("react-native-reanimated/lib/typescript/hook/commonTypes").AnimatedStyleHandle<{
23
+ opacity: number;
24
+ transform: {
25
+ translateY: number;
26
+ }[];
27
+ }>;
28
+ largeTitleStyle: import("react-native-reanimated/lib/typescript/hook/commonTypes").AnimatedStyleHandle<{
29
+ opacity: number;
30
+ transform: {
31
+ translateY: number;
32
+ }[];
33
+ }>;
34
+ };
35
+ export {};
36
+ //# sourceMappingURL=use-large-title-header.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-large-title-header.d.ts","sourceRoot":"","sources":["../../../../../../src/components/header/hooks/use-large-title-header.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,aAAU,CAAC;AAExD,UAAU,uBAAuB;IAC/B,YAAY,EAAE,OAAO,CAAC;IACtB,iBAAiB,EAAE,uBAAuB,CAAC;IAC3C,kBAAkB,EAAE,OAAO,CAAC;CAC7B;AAED,+FAA+F;AAC/F,wBAAgB,mBAAmB,CAAC,EAClC,YAAY,EACZ,iBAAiB,EACjB,kBAAkB,GACnB,EAAE,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;EA0DzB"}
@@ -1,17 +1,20 @@
1
- import { type ReactNode } from "react";
2
- import { type StyleProp, type ViewStyle } from "react-native";
1
+ import { type ComponentProps, type ReactNode } from "react";
2
+ import Animated from "react-native-reanimated";
3
3
  import type { HeaderAccessoryPadding } from "../types.js";
4
+ import { type HeaderSurfaceProps } from "./HeaderSurface.js";
4
5
  export interface HeaderAccessoryProps {
5
6
  children: ReactNode;
6
7
  /** Horizontal padding around the accessory. */
7
8
  padding: HeaderAccessoryPadding;
9
+ color: string;
10
+ surfaceStyle?: HeaderSurfaceProps["animatedStyle"];
8
11
  /** Reports layout height in dp; reports zero on cleanup to release reserved space. */
9
- onHeightChange: (height: number) => void;
12
+ onHeightChange?: (height: number) => void;
10
13
  /** Additional styles for the accessory container. */
11
- style?: StyleProp<ViewStyle>;
14
+ style?: ComponentProps<typeof Animated.View>["style"];
12
15
  }
13
16
  /** Measures accessory content so the header can reserve space in the scroll container. */
14
- export declare function HeaderAccessory({ children, padding, onHeightChange, style }: HeaderAccessoryProps): import("react").JSX.Element;
17
+ export declare function HeaderAccessory({ children, padding, color, surfaceStyle, onHeightChange, style, }: HeaderAccessoryProps): import("react").JSX.Element;
15
18
  /** Reserves scroll-content space for the sticky accessory rendered in the header overlay. */
16
19
  export declare function HeaderAccessorySpacer({ height }: {
17
20
  height: number;
@@ -1 +1 @@
1
- {"version":3,"file":"HeaderAccessory.d.ts","sourceRoot":"","sources":["../../../../../../src/components/header/parts/HeaderAccessory.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAA0B,MAAM,OAAO,CAAC;AAC/D,OAAO,EAA0B,KAAK,SAAS,EAAQ,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAK5F,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,aAAU,CAAC;AAEvD,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,SAAS,CAAC;IACpB,+CAA+C;IAC/C,OAAO,EAAE,sBAAsB,CAAC;IAChC,sFAAsF;IACtF,cAAc,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,qDAAqD;IACrD,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,0FAA0F;AAC1F,wBAAgB,eAAe,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,cAAc,EAAE,KAAK,EAAE,EAAE,oBAAoB,+BAkBjG;AAED,6FAA6F;AAC7F,wBAAgB,qBAAqB,CAAC,EAAE,MAAM,EAAE,EAAE;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,+BAEnE"}
1
+ {"version":3,"file":"HeaderAccessory.d.ts","sourceRoot":"","sources":["../../../../../../src/components/header/parts/HeaderAccessory.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,SAAS,EAAwC,MAAM,OAAO,CAAC;AAGlG,OAAO,QAAQ,MAAM,yBAAyB,CAAC;AAG/C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,aAAU,CAAC;AACvD,OAAO,EAAiB,KAAK,kBAAkB,EAAE,MAAM,oBAAiB,CAAC;AAEzE,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,SAAS,CAAC;IACpB,+CAA+C;IAC/C,OAAO,EAAE,sBAAsB,CAAC;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,kBAAkB,CAAC,eAAe,CAAC,CAAC;IACnD,sFAAsF;IACtF,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,qDAAqD;IACrD,KAAK,CAAC,EAAE,cAAc,CAAC,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC;CACvD;AAED,0FAA0F;AAC1F,wBAAgB,eAAe,CAAC,EAC9B,QAAQ,EACR,OAAO,EACP,KAAK,EACL,YAAY,EACZ,cAAc,EACd,KAAK,GACN,EAAE,oBAAoB,+BAwBtB;AAED,6FAA6F;AAC7F,wBAAgB,qBAAqB,CAAC,EAAE,MAAM,EAAE,EAAE;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,+BAEnE"}
@@ -0,0 +1,17 @@
1
+ import type { ComponentProps, ReactNode } from "react";
2
+ import Animated from "react-native-reanimated";
3
+ import { type HeaderDismissProps } from "../header-buttons.js";
4
+ import { type HeaderSurfaceProps } from "./HeaderSurface.js";
5
+ interface HeaderBarProps extends HeaderDismissProps {
6
+ title?: ReactNode;
7
+ leading?: ReactNode;
8
+ trailing?: ReactNode;
9
+ titleAlignment: "center" | "left";
10
+ color: string;
11
+ surfaceStyle?: HeaderSurfaceProps["animatedStyle"];
12
+ titleStyle?: ComponentProps<typeof Animated.View>["style"];
13
+ }
14
+ /** Shared compact bar. Only the title and background animate; actions stay interactive. */
15
+ export declare function HeaderBar({ title, leading, trailing, titleAlignment, color, surfaceStyle, titleStyle, dismissAction, navigation, onDismiss, }: HeaderBarProps): import("react").JSX.Element;
16
+ export {};
17
+ //# sourceMappingURL=HeaderBar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HeaderBar.d.ts","sourceRoot":"","sources":["../../../../../../src/components/header/parts/HeaderBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvD,OAAO,QAAQ,MAAM,yBAAyB,CAAC;AAK/C,OAAO,EAAuB,KAAK,kBAAkB,EAAE,MAAM,sBAAmB,CAAC;AAEjF,OAAO,EAAiB,KAAK,kBAAkB,EAAE,MAAM,oBAAiB,CAAC;AAEzE,UAAU,cAAe,SAAQ,kBAAkB;IACjD,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,cAAc,EAAE,QAAQ,GAAG,MAAM,CAAC;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,kBAAkB,CAAC,eAAe,CAAC,CAAC;IACnD,UAAU,CAAC,EAAE,cAAc,CAAC,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC;CAC5D;AAED,2FAA2F;AAC3F,wBAAgB,SAAS,CAAC,EACxB,KAAK,EACL,OAAO,EACP,QAAQ,EACR,cAAc,EACd,KAAK,EACL,YAAY,EACZ,UAAU,EACV,aAAsB,EACtB,UAAU,EACV,SAAS,GACV,EAAE,cAAc,+BAsChB"}
@@ -1,24 +1,21 @@
1
1
  /**
2
- * How far the overlay extends below the bar's bottom edge, in dp.
3
- *
4
- * The fade needs more room than the bar alone can give it: confined to the bar,
5
- * the curve has to be steep enough to read as a band. Overhanging lets the tail
6
- * finish in open space, so the header releases content instead of cutting it.
2
+ * Opacity at the overlay's bottom edge. The top is fully opaque, so the header
3
+ * thins slightly toward the boundary rather than cutting content off square —
4
+ * but never far enough to read as see-through.
7
5
  */
8
- export declare const HEADER_FADE_EXTENT = 8;
6
+ export declare const HEADER_FADE_END_OPACITY = 0.85;
9
7
  export interface HeaderGradientOverlayProps {
10
- /** Fill color, fading to fully transparent along the overlay. */
8
+ /** Fill color, ramped from opaque to {@link HEADER_FADE_END_OPACITY}. */
11
9
  color: string;
10
+ startOpacity?: number;
11
+ endOpacity?: number;
12
12
  }
13
13
  /**
14
- * Vertical fade-out overlay behind header content, shared by header variants.
15
- *
16
- * Reaches zero rather than stopping short. An overlay ending at partial opacity
17
- * leaves a hard step wherever it is clipped, and that step is far more visible
18
- * than the fade it was meant to hide — it is what cuts content off square as it
19
- * scrolls under the header.
14
+ * Vertical fade behind header content, shared by header variants.
20
15
  *
21
- * Callers size it to overhang the bar by {@link HEADER_FADE_EXTENT}.
16
+ * A two-stop linear ramp spanning the overlay's own box: it neither overhangs
17
+ * the surface nor reserves a band inside it, so callers size the surface and
18
+ * the ramp simply spans whatever they gave it.
22
19
  */
23
- export declare function HeaderGradientOverlay({ color }: HeaderGradientOverlayProps): import("react").JSX.Element;
20
+ export declare function HeaderGradientOverlay({ color, startOpacity, endOpacity, }: HeaderGradientOverlayProps): import("react").JSX.Element;
24
21
  //# sourceMappingURL=HeaderGradientOverlay.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"HeaderGradientOverlay.d.ts","sourceRoot":"","sources":["../../../../../../src/components/header/parts/HeaderGradientOverlay.tsx"],"names":[],"mappings":"AAIA;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,IAAI,CAAC;AAsDpC,MAAM,WAAW,0BAA0B;IACzC,iEAAiE;IACjE,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CAAC,EAAE,KAAK,EAAE,EAAE,0BAA0B,+BAe1E"}
1
+ {"version":3,"file":"HeaderGradientOverlay.d.ts","sourceRoot":"","sources":["../../../../../../src/components/header/parts/HeaderGradientOverlay.tsx"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,OAAO,CAAC;AAE5C,MAAM,WAAW,0BAA0B;IACzC,yEAAyE;IACzE,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,EACpC,KAAK,EACL,YAAgB,EAChB,UAAoC,GACrC,EAAE,0BAA0B,+BAc5B"}
@@ -3,20 +3,19 @@ type HeaderOpacityStyle = ReturnType<typeof useAnimatedStyle<{
3
3
  opacity: number;
4
4
  }>>;
5
5
  export interface HeaderSurfaceProps {
6
- /** Fill color, fading to fully transparent along the bottom edge. */
6
+ /** Fill color, ramped toward the surface's bottom edge. */
7
7
  color: string;
8
8
  /** Opacity style for variants that fade the whole surface in as they collapse. */
9
9
  animatedStyle?: HeaderOpacityStyle;
10
- /**
11
- * Height of the bottom gradient in dp. The region above it uses a solid fill.
12
- * @defaultValue The themed bar height plus `HEADER_FADE_EXTENT`.
13
- */
14
- fadeHeight?: number;
10
+ /** Continue the bar's gradient from 0.85 to 0.80 beneath an accessory. */
11
+ accessory?: boolean;
15
12
  }
16
13
  /**
17
- * Header background with a solid fill and a bottom gradient.
18
- * A fixed gradient height keeps tall accessories from becoming translucent.
14
+ * Header background with matching gradient boundaries for the bar and accessory.
15
+ *
16
+ * The ramp spans the surface itself: it is sized by the caller and stays inside
17
+ * those bounds, so a taller surface stretches the fade rather than adding to it.
19
18
  */
20
- export declare function HeaderSurface({ color, animatedStyle, fadeHeight }: HeaderSurfaceProps): import("react").JSX.Element;
19
+ export declare function HeaderSurface({ color, animatedStyle, accessory }: HeaderSurfaceProps): import("react").JSX.Element;
21
20
  export {};
22
21
  //# sourceMappingURL=HeaderSurface.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"HeaderSurface.d.ts","sourceRoot":"","sources":["../../../../../../src/components/header/parts/HeaderSurface.tsx"],"names":[],"mappings":"AAEA,OAAiB,EAAE,KAAK,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAK1E,KAAK,kBAAkB,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC,CAAC;AAEnF,MAAM,WAAW,kBAAkB;IACjC,qEAAqE;IACrE,KAAK,EAAE,MAAM,CAAC;IACd,kFAAkF;IAClF,aAAa,CAAC,EAAE,kBAAkB,CAAC;IACnC;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,EAAE,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,EAAE,kBAAkB,+BASrF"}
1
+ {"version":3,"file":"HeaderSurface.d.ts","sourceRoot":"","sources":["../../../../../../src/components/header/parts/HeaderSurface.tsx"],"names":[],"mappings":"AAAA,OAAiB,EAAE,KAAK,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAK1E,KAAK,kBAAkB,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC,CAAC;AAEnF,MAAM,WAAW,kBAAkB;IACjC,2DAA2D;IAC3D,KAAK,EAAE,MAAM,CAAC;IACd,kFAAkF;IAClF,aAAa,CAAC,EAAE,kBAAkB,CAAC;IACnC,0EAA0E;IAC1E,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,EAAE,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,EAAE,kBAAkB,+BAUpF"}