@fountain-ui/core 3.0.0-alpha.20 → 3.0.0-alpha.22

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 (94) hide show
  1. package/build/commonjs/Accordion/Accordion.js +8 -4
  2. package/build/commonjs/Accordion/Accordion.js.map +1 -1
  3. package/build/commonjs/Accordion/AccordionProps.js.map +1 -1
  4. package/build/commonjs/AppBar/AppBar.js +1 -1
  5. package/build/commonjs/AppBar/AppBar.js.map +1 -1
  6. package/build/commonjs/ButtonBase/ButtonBase.js +1 -1
  7. package/build/commonjs/ButtonBase/ButtonBase.js.map +1 -1
  8. package/build/commonjs/Image/Image.js +1 -1
  9. package/build/commonjs/Image/Image.js.map +1 -1
  10. package/build/commonjs/Pagination/NumberPagination.js +3 -1
  11. package/build/commonjs/Pagination/NumberPagination.js.map +1 -1
  12. package/build/commonjs/Tab/useVariantStyleMap.js +1 -1
  13. package/build/commonjs/Tab/useVariantStyleMap.js.map +1 -1
  14. package/build/commonjs/Tabs/Tabs.js +7 -4
  15. package/build/commonjs/Tabs/Tabs.js.map +1 -1
  16. package/build/commonjs/Tabs/useTabsStyle.js +51 -26
  17. package/build/commonjs/Tabs/useTabsStyle.js.map +1 -1
  18. package/build/commonjs/TextField/TextField.js +26 -7
  19. package/build/commonjs/TextField/TextField.js.map +1 -1
  20. package/build/commonjs/TextField/useVariantStyleMap.js +6 -9
  21. package/build/commonjs/TextField/useVariantStyleMap.js.map +1 -1
  22. package/build/commonjs/Toolbar/BackButton/BackButton.js +4 -4
  23. package/build/commonjs/Toolbar/BackButton/BackButton.js.map +1 -1
  24. package/build/commonjs/hooks/useCollapsibleAppBar.js +2 -9
  25. package/build/commonjs/hooks/useCollapsibleAppBar.js.map +1 -1
  26. package/build/commonjs/hooks/useFadeInAppBar.js +1 -1
  27. package/build/commonjs/hooks/useFadeInAppBar.js.map +1 -1
  28. package/build/commonjs/internal/icons/AppBarChevronLeft.js +23 -0
  29. package/build/commonjs/internal/icons/AppBarChevronLeft.js.map +1 -0
  30. package/build/commonjs/internal/icons/Clear.js +3 -3
  31. package/build/commonjs/internal/icons/Clear.js.map +1 -1
  32. package/build/commonjs/internal/icons/Search.js +2 -2
  33. package/build/commonjs/internal/icons/Search.js.map +1 -1
  34. package/build/commonjs/internal/icons/index.js +8 -0
  35. package/build/commonjs/internal/icons/index.js.map +1 -1
  36. package/build/module/Accordion/Accordion.js +8 -4
  37. package/build/module/Accordion/Accordion.js.map +1 -1
  38. package/build/module/Accordion/AccordionProps.js.map +1 -1
  39. package/build/module/AppBar/AppBar.js +1 -1
  40. package/build/module/AppBar/AppBar.js.map +1 -1
  41. package/build/module/ButtonBase/ButtonBase.js +1 -1
  42. package/build/module/ButtonBase/ButtonBase.js.map +1 -1
  43. package/build/module/Image/Image.js +1 -1
  44. package/build/module/Image/Image.js.map +1 -1
  45. package/build/module/Pagination/NumberPagination.js +3 -1
  46. package/build/module/Pagination/NumberPagination.js.map +1 -1
  47. package/build/module/Tab/useVariantStyleMap.js +1 -1
  48. package/build/module/Tab/useVariantStyleMap.js.map +1 -1
  49. package/build/module/Tabs/Tabs.js +7 -4
  50. package/build/module/Tabs/Tabs.js.map +1 -1
  51. package/build/module/Tabs/useTabsStyle.js +51 -26
  52. package/build/module/Tabs/useTabsStyle.js.map +1 -1
  53. package/build/module/TextField/TextField.js +26 -7
  54. package/build/module/TextField/TextField.js.map +1 -1
  55. package/build/module/TextField/useVariantStyleMap.js +6 -9
  56. package/build/module/TextField/useVariantStyleMap.js.map +1 -1
  57. package/build/module/Toolbar/BackButton/BackButton.js +5 -5
  58. package/build/module/Toolbar/BackButton/BackButton.js.map +1 -1
  59. package/build/module/hooks/useCollapsibleAppBar.js +3 -9
  60. package/build/module/hooks/useCollapsibleAppBar.js.map +1 -1
  61. package/build/module/hooks/useFadeInAppBar.js +1 -1
  62. package/build/module/hooks/useFadeInAppBar.js.map +1 -1
  63. package/build/module/internal/icons/AppBarChevronLeft.js +9 -0
  64. package/build/module/internal/icons/AppBarChevronLeft.js.map +1 -0
  65. package/build/module/internal/icons/Clear.js +3 -3
  66. package/build/module/internal/icons/Clear.js.map +1 -1
  67. package/build/module/internal/icons/Search.js +2 -2
  68. package/build/module/internal/icons/Search.js.map +1 -1
  69. package/build/module/internal/icons/index.js +1 -0
  70. package/build/module/internal/icons/index.js.map +1 -1
  71. package/build/typescript/Accordion/AccordionProps.d.ts +4 -1
  72. package/build/typescript/Tabs/useTabsStyle.d.ts +2 -1
  73. package/build/typescript/hooks/useCollapsibleAppBar.d.ts +0 -1
  74. package/build/typescript/internal/icons/AppBarChevronLeft.d.ts +131 -0
  75. package/build/typescript/internal/icons/index.d.ts +1 -0
  76. package/package.json +2 -2
  77. package/src/Accordion/Accordion.tsx +7 -1
  78. package/src/Accordion/AccordionProps.ts +4 -2
  79. package/src/AppBar/AppBar.tsx +1 -1
  80. package/src/ButtonBase/ButtonBase.tsx +1 -1
  81. package/src/Image/Image.tsx +1 -1
  82. package/src/Pagination/NumberPagination.tsx +6 -1
  83. package/src/Tab/useVariantStyleMap.ts +1 -1
  84. package/src/Tabs/Tabs.tsx +12 -2
  85. package/src/Tabs/useTabsStyle.ts +36 -10
  86. package/src/TextField/TextField.tsx +28 -11
  87. package/src/TextField/useVariantStyleMap.ts +4 -6
  88. package/src/Toolbar/BackButton/BackButton.tsx +7 -5
  89. package/src/hooks/useCollapsibleAppBar.ts +3 -22
  90. package/src/hooks/useFadeInAppBar.ts +1 -1
  91. package/src/internal/icons/AppBarChevronLeft.tsx +15 -0
  92. package/src/internal/icons/Clear.tsx +3 -3
  93. package/src/internal/icons/Search.tsx +2 -2
  94. package/src/internal/icons/index.ts +1 -0
@@ -0,0 +1,131 @@
1
+ import React from 'react';
2
+ declare const _default: React.MemoExoticComponent<{
3
+ (props: {
4
+ readonly color?: "accent" | "base" | "strong" | "strongInverse" | "baseInverse" | "baseOpacity" | "baseOpacityInverse" | "weak" | "weakInverse" | "weakOpacity" | "weakOpacityInverse" | "accentAlt" | undefined;
5
+ fontFamily?: string | undefined;
6
+ fontSize?: import("react-native-svg").NumberProp | undefined;
7
+ fontWeight?: import("react-native-svg").FontWeight | undefined;
8
+ letterSpacing?: import("react-native-svg").NumberProp | undefined;
9
+ readonly fill?: import("react-native").ColorValue | undefined;
10
+ fontStyle?: import("react-native-svg").FontStyle | undefined;
11
+ testID?: string | undefined;
12
+ fontVariant?: import("react-native-svg").FontVariant | undefined;
13
+ opacity?: import("react-native-svg").NumberProp | undefined;
14
+ readonly height?: import("react-native-svg").NumberProp | undefined;
15
+ readonly width?: import("react-native-svg").NumberProp | undefined;
16
+ transform?: string | (import("react-native").PerpectiveTransform | import("react-native").RotateTransform | import("react-native").RotateXTransform | import("react-native").RotateYTransform | import("react-native").RotateZTransform | import("react-native").ScaleTransform | import("react-native").ScaleXTransform | import("react-native").ScaleYTransform | import("react-native").TranslateXTransform | import("react-native").TranslateYTransform | import("react-native").SkewXTransform | import("react-native").SkewYTransform | import("react-native").MatrixTransform)[] | import("react-native-svg").ColumnMajorTransformMatrix | undefined;
17
+ rotation?: import("react-native-svg").NumberProp | undefined;
18
+ scaleX?: import("react-native-svg").NumberProp | undefined;
19
+ scaleY?: import("react-native-svg").NumberProp | undefined;
20
+ translateX?: import("react-native-svg").NumberProp | undefined;
21
+ translateY?: import("react-native-svg").NumberProp | undefined;
22
+ readonly style?: import("@fountain-ui/styles").FountainUiStyle | import("@fountain-ui/styles").FountainUiStyle[] | undefined;
23
+ onLayout?: ((event: import("react-native").LayoutChangeEvent) => void) | undefined;
24
+ title?: string | undefined;
25
+ clipPath?: string | undefined;
26
+ marker?: string | undefined;
27
+ mask?: string | undefined;
28
+ scale?: import("react-native-svg").NumberArray | undefined;
29
+ skewX?: import("react-native-svg").NumberProp | undefined;
30
+ skewY?: import("react-native-svg").NumberProp | undefined;
31
+ readonly viewBox?: string | undefined;
32
+ preserveAspectRatio?: string | undefined;
33
+ fillOpacity?: import("react-native-svg").NumberProp | undefined;
34
+ fillRule?: import("react-native-svg").FillRule | undefined;
35
+ stroke?: import("react-native").ColorValue | undefined;
36
+ strokeWidth?: import("react-native-svg").NumberProp | undefined;
37
+ strokeOpacity?: import("react-native-svg").NumberProp | undefined;
38
+ strokeDasharray?: import("react-native-svg").NumberProp | readonly import("react-native-svg").NumberProp[] | undefined;
39
+ strokeDashoffset?: import("react-native-svg").NumberProp | undefined;
40
+ strokeLinecap?: import("react-native-svg").Linecap | undefined;
41
+ strokeLinejoin?: import("react-native-svg").Linejoin | undefined;
42
+ strokeMiterlimit?: import("react-native-svg").NumberProp | undefined;
43
+ vectorEffect?: import("react-native-svg").VectorEffect | undefined;
44
+ clipRule?: import("react-native-svg").FillRule | undefined;
45
+ translate?: import("react-native-svg").NumberArray | undefined;
46
+ origin?: import("react-native-svg").NumberArray | undefined;
47
+ originX?: import("react-native-svg").NumberProp | undefined;
48
+ originY?: import("react-native-svg").NumberProp | undefined;
49
+ skew?: import("react-native-svg").NumberArray | undefined;
50
+ x?: import("react-native-svg").NumberArray | undefined;
51
+ y?: import("react-native-svg").NumberArray | undefined;
52
+ pointerEvents?: "auto" | "none" | "box-none" | "box-only" | undefined;
53
+ onStartShouldSetResponder?: ((event: import("react-native").GestureResponderEvent) => boolean) | undefined;
54
+ onMoveShouldSetResponder?: ((event: import("react-native").GestureResponderEvent) => boolean) | undefined;
55
+ onResponderEnd?: ((event: import("react-native").GestureResponderEvent) => void) | undefined;
56
+ onResponderGrant?: ((event: import("react-native").GestureResponderEvent) => void) | undefined;
57
+ onResponderReject?: ((event: import("react-native").GestureResponderEvent) => void) | undefined;
58
+ onResponderMove?: ((event: import("react-native").GestureResponderEvent) => void) | undefined;
59
+ onResponderRelease?: ((event: import("react-native").GestureResponderEvent) => void) | undefined;
60
+ onResponderStart?: ((event: import("react-native").GestureResponderEvent) => void) | undefined;
61
+ onResponderTerminationRequest?: ((event: import("react-native").GestureResponderEvent) => boolean) | undefined;
62
+ onResponderTerminate?: ((event: import("react-native").GestureResponderEvent) => void) | undefined;
63
+ onStartShouldSetResponderCapture?: ((event: import("react-native").GestureResponderEvent) => boolean) | undefined;
64
+ onMoveShouldSetResponderCapture?: ((event: import("react-native").GestureResponderEvent) => boolean) | undefined;
65
+ disabled?: boolean | undefined;
66
+ onPress?: ((event: import("react-native").GestureResponderEvent) => void) | undefined;
67
+ onPressIn?: ((event: import("react-native").GestureResponderEvent) => void) | undefined;
68
+ onPressOut?: ((event: import("react-native").GestureResponderEvent) => void) | undefined;
69
+ onLongPress?: ((event: import("react-native").GestureResponderEvent) => void) | undefined;
70
+ delayPressIn?: number | undefined;
71
+ delayPressOut?: number | undefined;
72
+ delayLongPress?: number | undefined;
73
+ id?: string | undefined;
74
+ markerStart?: string | undefined;
75
+ markerMid?: string | undefined;
76
+ markerEnd?: string | undefined;
77
+ accessibilityLabel?: string | undefined;
78
+ accessible?: boolean | undefined;
79
+ font?: import("react-native-svg").FontObject | undefined;
80
+ fontStretch?: import("react-native-svg").FontStretch | undefined;
81
+ textAnchor?: import("react-native-svg").TextAnchor | undefined;
82
+ textDecoration?: import("react-native-svg").TextDecoration | undefined;
83
+ wordSpacing?: import("react-native-svg").NumberProp | undefined;
84
+ kerning?: import("react-native-svg").NumberProp | undefined;
85
+ fontFeatureSettings?: string | undefined;
86
+ fontVariantLigatures?: import("react-native-svg").FontVariantLigatures | undefined;
87
+ fontVariationSettings?: string | undefined;
88
+ hitSlop?: import("react-native").Insets | undefined;
89
+ removeClippedSubviews?: boolean | undefined;
90
+ nativeID?: string | undefined;
91
+ collapsable?: boolean | undefined;
92
+ needsOffscreenAlphaCompositing?: boolean | undefined;
93
+ renderToHardwareTextureAndroid?: boolean | undefined;
94
+ focusable?: boolean | undefined;
95
+ shouldRasterizeIOS?: boolean | undefined;
96
+ isTVSelectable?: boolean | undefined;
97
+ hasTVPreferredFocus?: boolean | undefined;
98
+ tvParallaxProperties?: import("react-native").TVParallaxProperties | undefined;
99
+ tvParallaxShiftDistanceX?: number | undefined;
100
+ tvParallaxShiftDistanceY?: number | undefined;
101
+ tvParallaxTiltAngle?: number | undefined;
102
+ tvParallaxMagnification?: number | undefined;
103
+ onTouchStart?: ((event: import("react-native").GestureResponderEvent) => void) | undefined;
104
+ onTouchMove?: ((event: import("react-native").GestureResponderEvent) => void) | undefined;
105
+ onTouchEnd?: ((event: import("react-native").GestureResponderEvent) => void) | undefined;
106
+ onTouchCancel?: ((event: import("react-native").GestureResponderEvent) => void) | undefined;
107
+ onTouchEndCapture?: ((event: import("react-native").GestureResponderEvent) => void) | undefined;
108
+ accessibilityActions?: readonly Readonly<{
109
+ name: string;
110
+ label?: string | undefined;
111
+ }>[] | undefined;
112
+ accessibilityRole?: import("react-native").AccessibilityRole | undefined;
113
+ accessibilityState?: import("react-native").AccessibilityState | undefined;
114
+ accessibilityHint?: string | undefined;
115
+ accessibilityValue?: import("react-native").AccessibilityValue | undefined;
116
+ onAccessibilityAction?: ((event: import("react-native").AccessibilityActionEvent) => void) | undefined;
117
+ accessibilityLabelledBy?: string | string[] | undefined;
118
+ accessibilityLiveRegion?: "none" | "polite" | "assertive" | undefined;
119
+ importantForAccessibility?: "auto" | "yes" | "no" | "no-hide-descendants" | undefined;
120
+ accessibilityElementsHidden?: boolean | undefined;
121
+ accessibilityLanguage?: string | undefined;
122
+ accessibilityViewIsModal?: boolean | undefined;
123
+ onAccessibilityEscape?: (() => void) | undefined;
124
+ onAccessibilityTap?: (() => void) | undefined;
125
+ onMagicTap?: (() => void) | undefined;
126
+ accessibilityIgnoresInvertColors?: boolean | undefined;
127
+ readonly size?: "medium" | "small" | "large" | undefined;
128
+ }): JSX.Element;
129
+ displayName: string;
130
+ }>;
131
+ export default _default;
@@ -1,3 +1,4 @@
1
+ export { default as AppBarChevronLeft } from './AppBarChevronLeft';
1
2
  export { default as Check } from './Check';
2
3
  export { default as Checkbox } from './Checkbox';
3
4
  export { default as CheckboxChecked } from './CheckboxChecked';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fountain-ui/core",
3
- "version": "3.0.0-alpha.20",
3
+ "version": "3.0.0-alpha.22",
4
4
  "author": "Fountain-UI Team",
5
5
  "description": "React components that implement Tappytoon's Fountain Design.",
6
6
  "license": "MIT",
@@ -67,5 +67,5 @@
67
67
  "publishConfig": {
68
68
  "access": "public"
69
69
  },
70
- "gitHead": "cbf3d668134714e8aa469c418335717e25d628a8"
70
+ "gitHead": "5ddf3c13c461c1e0909a2ff27e5272dbf0d357a3"
71
71
  }
@@ -48,7 +48,9 @@ export default function Accordion(props: AccordionProps) {
48
48
  RightIcon,
49
49
  LeftComponent,
50
50
  isInitialExpanded = false,
51
+ style: styleProp,
51
52
  variant = 'solid' as AccordionVariant,
53
+ ...otherProps
52
54
  } = props;
53
55
 
54
56
  const styles = useStyles();
@@ -114,10 +116,14 @@ export default function Accordion(props: AccordionProps) {
114
116
  const rootStyle = css([
115
117
  styles.root,
116
118
  containerStyle,
119
+ styleProp,
117
120
  ]);
118
121
 
119
122
  return (
120
- <Column style={rootStyle}>
123
+ <Column
124
+ style={rootStyle}
125
+ {...otherProps}
126
+ >
121
127
  <ButtonBase onPress={onPress}>
122
128
  <Row style={titleStyle}>
123
129
  <Column flexShrink={1}>
@@ -1,9 +1,11 @@
1
1
  import React from 'react';
2
+ import type { ColumnProps } from '../Column';
3
+ import type { OverridableComponentProps } from '../types';
2
4
 
3
5
  export const accordionVariants = ['solid', 'line', 'underline'] as const;
4
6
  export type AccordionVariant = typeof accordionVariants[number];
5
7
 
6
- export default interface AccordionProps {
8
+ export default interface AccordionProps extends OverridableComponentProps<Omit<ColumnProps, 'children'>, {
7
9
  /**
8
10
  * The title of the component.
9
11
  */
@@ -40,4 +42,4 @@ export default interface AccordionProps {
40
42
  * @default 'solid'
41
43
  */
42
44
  variant: AccordionVariant;
43
- }
45
+ }> {}
@@ -37,7 +37,7 @@ const AppBar = React.forwardRef<View, AppBarProps>(function AppBar(props, ref) {
37
37
  const styles = useStyles();
38
38
 
39
39
  const backgroundColorMap: Record<AppBarColor, string> = {
40
- default: theme.palette.background.default,
40
+ default: theme.palette.background.base,
41
41
  alt: theme.palette.background.alt,
42
42
  };
43
43
 
@@ -13,7 +13,7 @@ export const ORIGINAL_OPACITY = 1;
13
13
  const ACTIVE_OPACITY = .65;
14
14
 
15
15
  const ORIGINAL_SCALE = 1;
16
- const MINIFIED_SCALE = .96;
16
+ const MINIFIED_SCALE = .98;
17
17
 
18
18
  // at "node_modules/react-native/Libraries/Pressability.js"
19
19
  // const DEFAULT_MIN_PRESS_DURATION = 130;
@@ -36,7 +36,7 @@ const useStyles: UseStyles<ImageStyles> = function (): ImageStyles {
36
36
  outlined: {
37
37
  borderWidth: StyleSheet.hairlineWidth,
38
38
  borderStyle: 'solid',
39
- borderColor: theme.palette.paper.grey,
39
+ borderColor: theme.palette.border.weak,
40
40
  },
41
41
  error: {
42
42
  alignItems: 'center',
@@ -61,7 +61,12 @@ export default function NumberPagination(props: NumberPaginationProps) {
61
61
 
62
62
  return (
63
63
  <Row style={styles.root}>
64
- <Text style={currentFontStyle}>
64
+ <Text
65
+ style={[
66
+ currentFontStyle,
67
+ { fontVariant: ['tabular-nums'] },
68
+ ]}
69
+ >
65
70
  {currentPage + 1}
66
71
  </Text>
67
72
 
@@ -84,7 +84,7 @@ export default function useVariantStyleMap(variant: TabVariant, selected: boolea
84
84
  height: 49,
85
85
  justifyContent: 'flex-start',
86
86
  paddingTop: 10.5,
87
- width: 48,
87
+ maxWidth: 48,
88
88
  },
89
89
  iconContainer: {
90
90
  padding: 0.75,
package/src/Tabs/Tabs.tsx CHANGED
@@ -70,7 +70,10 @@ const Tabs = forwardRef<TabsInstance, TabsProps>(function Tabs(props, ref) {
70
70
 
71
71
  const currentIndexRef = useRef(initialIndex);
72
72
 
73
- const { container: containerStyle } = useTabsStyle(variant, size);
73
+ const {
74
+ container: containerStyle,
75
+ contentContainer: contentContainerStyle,
76
+ } = useTabsStyle(variant, size, scrollable);
74
77
 
75
78
  const setTab = (newIndex: number) => {
76
79
  const currentIndex = currentIndexRef.current;
@@ -163,6 +166,9 @@ const Tabs = forwardRef<TabsInstance, TabsProps>(function Tabs(props, ref) {
163
166
  child.props.onPress?.();
164
167
  };
165
168
 
169
+ // @ts-ignore
170
+ const tabStyle = child.props.style;
171
+
166
172
  // @ts-ignore
167
173
  const tabElement = cloneElement(child, {
168
174
  enableIndicator: !disableIndicator && !canRenderIndicator,
@@ -173,7 +179,10 @@ const Tabs = forwardRef<TabsInstance, TabsProps>(function Tabs(props, ref) {
173
179
  size,
174
180
  variant,
175
181
  indicatorSize,
176
- style: scrollable ? undefined : styles.fixedTab,
182
+ style: css([
183
+ scrollable ? undefined : styles.fixedTab,
184
+ tabStyle,
185
+ ]),
177
186
  });
178
187
 
179
188
  return (
@@ -215,6 +224,7 @@ const Tabs = forwardRef<TabsInstance, TabsProps>(function Tabs(props, ref) {
215
224
  automaticallyAdjustContentInsets={false}
216
225
  bounces={false}
217
226
  contentContainerStyle={css([
227
+ contentContainerStyle,
218
228
  scrollViewContentContainerStyle,
219
229
  ])}
220
230
  coordinates={coordinates}
@@ -6,44 +6,70 @@ import type { TabSize, TabVariant } from '../Tab';
6
6
 
7
7
  interface TabsStyle {
8
8
  container: FountainUiStyle;
9
+ contentContainer?: FountainUiStyle;
9
10
  }
10
11
 
11
- export default function useTabsStyle(variant: TabVariant, size: TabSize) {
12
+ export default function useTabsStyle(variant: TabVariant, size: TabSize, scrollable: boolean) {
12
13
  const theme = useTheme();
13
14
 
14
15
  const isTablet = useBreakpointUp('md', true, false);
15
16
 
16
17
  return useMemo<TabsStyle>(() => {
17
18
  switch (variant) {
18
- case 'circular':
19
+ case 'circular': {
20
+ const paddingHorizontal = isTablet ? 20 : (size === 'small' ? 8 : 12);
21
+
19
22
  return {
20
23
  container: {
21
24
  paddingBottom: 8,
22
- paddingHorizontal: isTablet ? 20 : (size === 'small' ? 8 : 12),
25
+ paddingHorizontal: scrollable ? 0 : paddingHorizontal,
26
+ },
27
+ contentContainer: {
28
+ paddingHorizontal: scrollable ? paddingHorizontal : 0,
23
29
  },
24
30
  };
25
- case 'circular-home':
31
+ }
32
+ case 'circular-home': {
33
+ const paddingHorizontal = isTablet ? 20 : 8;
34
+
26
35
  return {
27
36
  container: {
28
37
  paddingBottom: 8,
29
- paddingHorizontal: isTablet ? 20 : 8,
38
+ paddingHorizontal: scrollable ? 0 : paddingHorizontal,
39
+ },
40
+ contentContainer: {
41
+ paddingHorizontal: scrollable ? paddingHorizontal : 0,
30
42
  },
31
43
  };
32
- case 'bottom-navigation':
44
+ }
45
+ case 'bottom-navigation': {
46
+ const paddingHorizontal = 24;
47
+
33
48
  return {
34
49
  container: {
35
50
  borderTopColor: theme.palette.border.base,
36
51
  borderTopWidth: 0.5,
37
- paddingHorizontal: 24,
52
+ justifyContent: 'space-between',
53
+ paddingHorizontal: scrollable ? 0 : paddingHorizontal,
54
+ },
55
+ contentContainer: {
56
+ paddingHorizontal: scrollable ? paddingHorizontal : 0,
38
57
  },
39
58
  };
59
+ }
40
60
  case 'default':
41
- default:
61
+ default: {
62
+ const paddingHorizontal = isTablet ? 14 : 6;
63
+
42
64
  return {
43
65
  container: {
44
- paddingHorizontal: isTablet ? 14 : 6,
66
+ paddingHorizontal: scrollable ? 0 : paddingHorizontal,
67
+ },
68
+ contentContainer: {
69
+ paddingHorizontal: scrollable ? paddingHorizontal : 0,
45
70
  },
46
71
  };
72
+ }
47
73
  }
48
- }, [theme, variant, isTablet, size]);
74
+ }, [theme, variant, isTablet, size, scrollable]);
49
75
  }
@@ -23,6 +23,20 @@ const styles = StyleSheet.create({
23
23
  alignItems: 'flex-end',
24
24
  padding: 0,
25
25
  },
26
+ searchIconContainer: {
27
+ left: 12,
28
+ position: 'absolute',
29
+ },
30
+ loadingSinner: {
31
+ height: 19,
32
+ width: 19,
33
+ },
34
+ clearButton: {
35
+ height: 36,
36
+ position: 'absolute',
37
+ right: 2,
38
+ width: 32,
39
+ },
26
40
  });
27
41
 
28
42
  const TextField = React.forwardRef<TextInput, TextFieldProps>(function TextField(props, ref) {
@@ -113,15 +127,17 @@ const TextField = React.forwardRef<TextInput, TextFieldProps>(function TextField
113
127
 
114
128
  <Row style={containerStyle}>
115
129
  {isSearch ? (
116
- isLoading ? (
117
- <LoadingSpinner/>
118
- ) : (
119
- <Search
120
- color={'base'}
121
- height={18}
122
- width={18}
123
- />
124
- )
130
+ <View style={styles.searchIconContainer}>
131
+ {isLoading ? (
132
+ <LoadingSpinner style={styles.loadingSinner}/>
133
+ ) : (
134
+ <Search
135
+ color={'base'}
136
+ height={19}
137
+ width={19}
138
+ />
139
+ )}
140
+ </View>
125
141
  ) : null}
126
142
 
127
143
  <TextInput
@@ -143,11 +159,12 @@ const TextField = React.forwardRef<TextInput, TextFieldProps>(function TextField
143
159
  color={'base'}
144
160
  children={
145
161
  <Clear
146
- height={13.75}
147
- width={15}
162
+ height={17.31}
163
+ width={15.9}
148
164
  />
149
165
  }
150
166
  onPress={handleClear}
167
+ style={styles.clearButton}
151
168
  />
152
169
  ) : null}
153
170
 
@@ -47,6 +47,7 @@ export default function useVariantStyleMap(variant: TextFieldVariant, status: Te
47
47
  containerStyle: {
48
48
  borderBottomColor: status === 'default' && isFocused ? theme.palette.border.strong : borderColor,
49
49
  borderBottomWidth: 1,
50
+ minHeight: 60,
50
51
  },
51
52
  inputStyle: {
52
53
  paddingLeft: 0,
@@ -77,14 +78,11 @@ export default function useVariantStyleMap(variant: TextFieldVariant, status: Te
77
78
  borderColor: theme.palette.border.base,
78
79
  borderRadius: theme.shape.radius.md,
79
80
  borderWidth: 0.5,
80
- paddingLeft: theme.spacing(3),
81
- paddingRight: theme.spacing(0.5),
81
+ paddingBottom: 12,
82
+ paddingHorizontal: 39,
83
+ paddingTop: 11,
82
84
  },
83
85
  inputStyle: {
84
- paddingBottom: theme.spacing(2.5),
85
- paddingLeft: theme.spacing(2),
86
- paddingRight: theme.spacing(1),
87
- paddingTop: theme.spacing(2.25),
88
86
  ...createFontStyle(theme, {
89
87
  selector: (_) => typographyOf({
90
88
  fontSize: 16,
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { StyleSheet } from 'react-native';
3
3
  import IconButton from '../../IconButton';
4
- import { ChevronLeft } from '../../internal';
4
+ import { AppBarChevronLeft } from '../../internal';
5
5
  import type BackButtonProps from './BackButtonProps';
6
6
  import { css } from '@fountain-ui/styles';
7
7
 
@@ -33,10 +33,12 @@ export default function BackButton(props: BackButtonProps) {
33
33
  style={rootStyle}
34
34
  {...otherProps}
35
35
  >
36
- <ChevronLeft
37
- color={'strong'}
38
- size={'large'}
39
- />
36
+ <React.Fragment>
37
+ <AppBarChevronLeft
38
+ height={18}
39
+ width={10}
40
+ />
41
+ </React.Fragment>
40
42
  </IconButton>
41
43
  );
42
44
  }
@@ -1,14 +1,5 @@
1
1
  import { useCallback, useRef, useState } from 'react';
2
- import {
3
- Falsy,
4
- Keyboard,
5
- Platform,
6
- RegisteredStyle,
7
- ScrollViewProps,
8
- StyleSheet,
9
- ViewProps,
10
- ViewStyle,
11
- } from 'react-native';
2
+ import { Falsy, Keyboard, Platform, RegisteredStyle, ScrollViewProps, ViewProps, ViewStyle } from 'react-native';
12
3
  import type { WithTimingConfig } from 'react-native-reanimated';
13
4
  import {
14
5
  runOnJS,
@@ -19,7 +10,6 @@ import {
19
10
  withTiming,
20
11
  } from 'react-native-reanimated';
21
12
  import { useSafeAreaInsets } from 'react-native-safe-area-context';
22
- import { useTheme } from '@fountain-ui/styles';
23
13
  import { useHeight } from '../internal/hooks';
24
14
  import useAppbarStyles from './useAppbarStyles';
25
15
 
@@ -40,7 +30,6 @@ export interface ContentInsets {
40
30
 
41
31
  export interface Options {
42
32
  keyboardDismissMode?: 'none' | 'on-drag';
43
- dividerExposureMode?: 'always' | 'overlapped';
44
33
  supportsReverseScroll?: boolean;
45
34
  }
46
35
 
@@ -56,7 +45,6 @@ export interface CollapsibleAppBar {
56
45
 
57
46
  const defaultOptions: Required<Options> = {
58
47
  keyboardDismissMode: 'none',
59
- dividerExposureMode: 'overlapped',
60
48
  supportsReverseScroll: true,
61
49
  };
62
50
 
@@ -67,7 +55,7 @@ const SUPPORTS_DRAG_DETECTION = Platform.OS !== 'web';
67
55
  const dismissKeyboard = () => Keyboard.dismiss();
68
56
 
69
57
  export default function useCollapsibleAppBar(userOptions: Options = defaultOptions): CollapsibleAppBar {
70
- const { keyboardDismissMode, dividerExposureMode, supportsReverseScroll }: Required<Options> = {
58
+ const { keyboardDismissMode, supportsReverseScroll }: Required<Options> = {
71
59
  ...defaultOptions,
72
60
  ...userOptions,
73
61
  };
@@ -88,20 +76,13 @@ export default function useCollapsibleAppBar(userOptions: Options = defaultOptio
88
76
 
89
77
  const [isScrolled, setIsScrolled] = useState<boolean>(false);
90
78
 
91
- const theme = useTheme();
92
-
93
79
  const animatedStyle = useAnimatedStyle(() => {
94
80
  const transform = [{ translateY: translateY.value }];
95
81
 
96
82
  return {
97
83
  transform,
98
- borderColor: dividerExposureMode === 'always' || overlapped.value ? theme.palette.divider : TRANSPARENT,
99
- borderBottomWidth: StyleSheet.hairlineWidth,
100
84
  };
101
- }, [
102
- theme,
103
- dividerExposureMode,
104
- ]);
85
+ }, []);
105
86
 
106
87
  const indexRef = useRef<number>(0);
107
88
  const offsetsRef = useRef<Array<number>>([]);
@@ -76,7 +76,7 @@ export default function useFadeInAppBar(userOptions: Options = defaultOptions):
76
76
  const lastOffsetY = useSharedValue<number>(0);
77
77
  const normalized = useSharedValue<number>(0);
78
78
 
79
- const originalBackgroundColor = theme.palette.background.default;
79
+ const originalBackgroundColor = theme.palette.background.base;
80
80
  const rgbValues = useMemo(() => rgb(originalBackgroundColor), [originalBackgroundColor]);
81
81
 
82
82
  const animatedAppBarStyle = useAnimatedStyle(() => {
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import { Path } from 'react-native-svg';
3
+ import { createSvgIcon } from '../../utils';
4
+
5
+ export default createSvgIcon(
6
+ <React.Fragment>
7
+ <Path
8
+ fillRule="evenodd"
9
+ clipRule="evenodd"
10
+ d="M0.292893 9.70711C-0.0976311 9.31658 -0.0976311 8.68342 0.292893 8.29289L8.2929 0.292893C8.68342 -0.097631 9.31658 -0.097631 9.70711 0.292893C10.0976 0.683417 10.0976 1.31658 9.70711 1.70711L2.41421 9L9.70711 16.2929C10.0976 16.6834 10.0976 17.3166 9.70711 17.7071C9.31658 18.0976 8.68342 18.0976 8.29289 17.7071L0.292893 9.70711Z"
11
+ />
12
+ </React.Fragment>,
13
+ 'AppBarChevronLeft',
14
+ '0 0 10 18',
15
+ );
@@ -7,14 +7,14 @@ export default createSvgIcon(
7
7
  <Path
8
8
  fillRule="evenodd"
9
9
  clipRule="evenodd"
10
- d="M4.68306 5.68306C4.92714 5.43898 5.32286 5.43898 5.56694 5.68306L7 7.11612L8.43306 5.68306C8.67714 5.43898 9.07286 5.43898 9.31694 5.68306C9.56102 5.92714 9.56102 6.32286 9.31694 6.56694L7.88388 8L9.31694 9.43306C9.56102 9.67714 9.56102 10.0729 9.31694 10.3169C9.07286 10.561 8.67714 10.561 8.43306 10.3169L7 8.88388L5.56694 10.3169C5.32286 10.561 4.92714 10.561 4.68306 10.3169C4.43898 10.0729 4.43898 9.67714 4.68306 9.43306L6.11612 8L4.68306 6.56694C4.43898 6.32286 4.43898 5.92714 4.68306 5.68306Z"
10
+ d="M5.32076 6.32681C5.603 6.04521 6.06061 6.04521 6.34285 6.32681L7.99999 7.98019L9.65712 6.32681C9.93937 6.04521 10.397 6.04521 10.6792 6.32681C10.9615 6.60842 10.9615 7.06498 10.6792 7.34659L9.02208 8.99997L10.6792 10.6533C10.9615 10.9349 10.9615 11.3915 10.6792 11.6731C10.397 11.9547 9.93937 11.9547 9.65712 11.6731L7.99999 10.0197L6.34285 11.6731C6.06061 11.9547 5.603 11.9547 5.32076 11.6731C5.03852 11.3915 5.03852 10.9349 5.32076 10.6533L6.9779 8.99997L5.32076 7.34659C5.03852 7.06498 5.03852 6.60842 5.32076 6.32681Z"
11
11
  />
12
12
  <Path
13
13
  fillRule="evenodd"
14
14
  clipRule="evenodd"
15
- d="M7 2.375C3.8934 2.375 1.375 4.8934 1.375 8C1.375 11.1066 3.8934 13.625 7 13.625C10.1066 13.625 12.625 11.1066 12.625 8C12.625 4.8934 10.1066 2.375 7 2.375ZM0.125 8C0.125 4.20304 3.20304 1.125 7 1.125C10.797 1.125 13.875 4.20304 13.875 8C13.875 11.797 10.797 14.875 7 14.875C3.20304 14.875 0.125 11.797 0.125 8Z"
15
+ d="M7.99999 2.51017C4.40763 2.51017 1.49544 5.41575 1.49544 8.99997C1.49544 12.5842 4.40763 15.4898 7.99999 15.4898C11.5923 15.4898 14.5045 12.5842 14.5045 8.99997C14.5045 5.41575 11.5923 2.51017 7.99999 2.51017ZM0.0499878 8.99997C0.0499878 4.61926 3.60932 1.06799 7.99999 1.06799C12.3907 1.06799 15.95 4.61926 15.95 8.99997C15.95 13.3807 12.3907 16.9319 7.99999 16.9319C3.60932 16.9319 0.0499878 13.3807 0.0499878 8.99997Z"
16
16
  />
17
17
  </React.Fragment>,
18
18
  'Clear',
19
- '0 0 14 16',
19
+ '0 0 16 18',
20
20
  );
@@ -7,9 +7,9 @@ export default createSvgIcon(
7
7
  <Path
8
8
  fillRule="evenodd"
9
9
  clipRule="evenodd"
10
- d="M8.25 3.5C5.3505 3.5 3 5.8505 3 8.75C3 11.6495 5.3505 14 8.25 14C9.66548 14 10.9501 13.4398 11.8943 12.5291C11.9136 12.5042 11.9346 12.4803 11.9575 12.4575C11.9803 12.4346 12.0042 12.4136 12.0291 12.3943C12.9398 11.4501 13.5 10.1655 13.5 8.75C13.5 5.8505 11.1495 3.5 8.25 3.5ZM13.5239 12.9633C14.4476 11.8085 15 10.3438 15 8.75C15 5.02208 11.9779 2 8.25 2C4.52208 2 1.5 5.02208 1.5 8.75C1.5 12.4779 4.52208 15.5 8.25 15.5C9.84376 15.5 11.3085 14.9476 12.4633 14.0239L15.22 16.7806C15.5129 17.0735 15.9877 17.0735 16.2806 16.7806C16.5735 16.4877 16.5735 16.0129 16.2806 15.72L13.5239 12.9633Z"
10
+ d="M8.70834 3.16665C5.64776 3.16665 3.16667 5.64774 3.16667 8.70831C3.16667 11.7689 5.64776 14.25 8.70834 14.25C10.2024 14.25 11.5585 13.6587 12.5551 12.6973C12.5755 12.6711 12.5977 12.6458 12.6218 12.6217C12.6459 12.5977 12.6711 12.5754 12.6974 12.5551C13.6587 11.5584 14.25 10.2024 14.25 8.70831C14.25 5.64774 11.7689 3.16665 8.70834 3.16665ZM14.2753 13.1556C15.2503 11.9367 15.8333 10.3906 15.8333 8.70831C15.8333 4.77328 12.6434 1.58331 8.70834 1.58331C4.77331 1.58331 1.58334 4.77328 1.58334 8.70831C1.58334 12.6433 4.77331 15.8333 8.70834 15.8333C10.3906 15.8333 11.9368 15.2503 13.1557 14.2752L16.0655 17.1851C16.3747 17.4942 16.8759 17.4942 17.1851 17.1851C17.4943 16.8759 17.4943 16.3747 17.1851 16.0655L14.2753 13.1556Z"
11
11
  />
12
12
  </React.Fragment>,
13
13
  'Search',
14
- '0 0 18 19',
14
+ '0 0 19 19',
15
15
  );
@@ -1,3 +1,4 @@
1
+ export { default as AppBarChevronLeft } from './AppBarChevronLeft';
1
2
  export { default as Check } from './Check';
2
3
  export { default as Checkbox } from './Checkbox';
3
4
  export { default as CheckboxChecked } from './CheckboxChecked';