fluent-styles 1.62.3 → 1.62.5

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 (136) hide show
  1. package/lib/commonjs/badge/index.js +13 -8
  2. package/lib/commonjs/badge/index.js.map +1 -1
  3. package/lib/commonjs/button/index.js +4 -3
  4. package/lib/commonjs/button/index.js.map +1 -1
  5. package/lib/commonjs/card/index.js +23 -15
  6. package/lib/commonjs/card/index.js.map +1 -1
  7. package/lib/commonjs/checkBox/index.js +5 -3
  8. package/lib/commonjs/checkBox/index.js.map +1 -1
  9. package/lib/commonjs/dropdown/index.js +10 -6
  10. package/lib/commonjs/dropdown/index.js.map +1 -1
  11. package/lib/commonjs/header/index.js +59 -55
  12. package/lib/commonjs/header/index.js.map +1 -1
  13. package/lib/commonjs/image/index.js +5 -3
  14. package/lib/commonjs/image/index.js.map +1 -1
  15. package/lib/commonjs/index.js +7 -0
  16. package/lib/commonjs/index.js.map +1 -1
  17. package/lib/commonjs/input/index.js +5 -3
  18. package/lib/commonjs/input/index.js.map +1 -1
  19. package/lib/commonjs/page/index.js +20 -4
  20. package/lib/commonjs/page/index.js.map +1 -1
  21. package/lib/commonjs/safeAreaView/index.js +4 -0
  22. package/lib/commonjs/safeAreaView/index.js.map +1 -1
  23. package/lib/commonjs/seperator/index.js +5 -3
  24. package/lib/commonjs/seperator/index.js.map +1 -1
  25. package/lib/commonjs/shape/cycle.js +5 -3
  26. package/lib/commonjs/shape/cycle.js.map +1 -1
  27. package/lib/commonjs/shape/index.js +6 -3
  28. package/lib/commonjs/shape/index.js.map +1 -1
  29. package/lib/commonjs/slider/index.js +72 -22
  30. package/lib/commonjs/slider/index.js.map +1 -1
  31. package/lib/commonjs/spinner/index.js +17 -11
  32. package/lib/commonjs/spinner/index.js.map +1 -1
  33. package/lib/commonjs/utiles/styled.js +14 -32
  34. package/lib/commonjs/utiles/styled.js.map +1 -1
  35. package/lib/module/badge/index.js +10 -8
  36. package/lib/module/badge/index.js.map +1 -1
  37. package/lib/module/button/index.js +4 -3
  38. package/lib/module/button/index.js.map +1 -1
  39. package/lib/module/card/index.js +20 -15
  40. package/lib/module/card/index.js.map +1 -1
  41. package/lib/module/checkBox/index.js +5 -4
  42. package/lib/module/checkBox/index.js.map +1 -1
  43. package/lib/module/dropdown/index.js +9 -7
  44. package/lib/module/dropdown/index.js.map +1 -1
  45. package/lib/module/header/index.js +52 -48
  46. package/lib/module/header/index.js.map +1 -1
  47. package/lib/module/image/index.js +4 -3
  48. package/lib/module/image/index.js.map +1 -1
  49. package/lib/module/index.js +1 -1
  50. package/lib/module/index.js.map +1 -1
  51. package/lib/module/input/index.js +5 -4
  52. package/lib/module/input/index.js.map +1 -1
  53. package/lib/module/page/index.js +21 -4
  54. package/lib/module/page/index.js.map +1 -1
  55. package/lib/module/safeAreaView/index.js +4 -0
  56. package/lib/module/safeAreaView/index.js.map +1 -1
  57. package/lib/module/seperator/index.js +4 -3
  58. package/lib/module/seperator/index.js.map +1 -1
  59. package/lib/module/shape/cycle.js +4 -3
  60. package/lib/module/shape/cycle.js.map +1 -1
  61. package/lib/module/shape/index.js +6 -3
  62. package/lib/module/shape/index.js.map +1 -1
  63. package/lib/module/slider/index.js +72 -22
  64. package/lib/module/slider/index.js.map +1 -1
  65. package/lib/module/spinner/index.js +13 -10
  66. package/lib/module/spinner/index.js.map +1 -1
  67. package/lib/module/utiles/styled.js +13 -31
  68. package/lib/module/utiles/styled.js.map +1 -1
  69. package/lib/typescript/badge/index.d.ts +13 -6
  70. package/lib/typescript/badge/index.d.ts.map +1 -1
  71. package/lib/typescript/button/index.d.ts +12 -8
  72. package/lib/typescript/button/index.d.ts.map +1 -1
  73. package/lib/typescript/card/index.d.ts +37 -10
  74. package/lib/typescript/card/index.d.ts.map +1 -1
  75. package/lib/typescript/checkBox/index.d.ts +12 -1
  76. package/lib/typescript/checkBox/index.d.ts.map +1 -1
  77. package/lib/typescript/dialog/index.d.ts +6 -3
  78. package/lib/typescript/dialog/index.d.ts.map +1 -1
  79. package/lib/typescript/divider/index.d.ts +6 -3
  80. package/lib/typescript/divider/index.d.ts.map +1 -1
  81. package/lib/typescript/dropdown/index.d.ts +12 -2
  82. package/lib/typescript/dropdown/index.d.ts.map +1 -1
  83. package/lib/typescript/header/index.d.ts +6 -8
  84. package/lib/typescript/header/index.d.ts.map +1 -1
  85. package/lib/typescript/image/index.d.ts +9 -4
  86. package/lib/typescript/image/index.d.ts.map +1 -1
  87. package/lib/typescript/index.d.ts +1 -1
  88. package/lib/typescript/index.d.ts.map +1 -1
  89. package/lib/typescript/input/index.d.ts +12 -1
  90. package/lib/typescript/input/index.d.ts.map +1 -1
  91. package/lib/typescript/page/index.d.ts +17 -7
  92. package/lib/typescript/page/index.d.ts.map +1 -1
  93. package/lib/typescript/pressable/index.d.ts +6 -3
  94. package/lib/typescript/pressable/index.d.ts.map +1 -1
  95. package/lib/typescript/safeAreaProvider/index.d.ts +6 -3
  96. package/lib/typescript/safeAreaProvider/index.d.ts.map +1 -1
  97. package/lib/typescript/safeAreaView/index.d.ts +6 -3
  98. package/lib/typescript/safeAreaView/index.d.ts.map +1 -1
  99. package/lib/typescript/scrollView/index.d.ts +6 -3
  100. package/lib/typescript/scrollView/index.d.ts.map +1 -1
  101. package/lib/typescript/seperator/index.d.ts +7 -2
  102. package/lib/typescript/seperator/index.d.ts.map +1 -1
  103. package/lib/typescript/shape/cycle.d.ts +12 -4
  104. package/lib/typescript/shape/cycle.d.ts.map +1 -1
  105. package/lib/typescript/shape/index.d.ts +7 -4
  106. package/lib/typescript/shape/index.d.ts.map +1 -1
  107. package/lib/typescript/slider/index.d.ts +27 -5
  108. package/lib/typescript/slider/index.d.ts.map +1 -1
  109. package/lib/typescript/spacer/index.d.ts +6 -3
  110. package/lib/typescript/spacer/index.d.ts.map +1 -1
  111. package/lib/typescript/spinner/index.d.ts +18 -3
  112. package/lib/typescript/spinner/index.d.ts.map +1 -1
  113. package/lib/typescript/stack/index.d.ts +18 -9
  114. package/lib/typescript/stack/index.d.ts.map +1 -1
  115. package/lib/typescript/text/index.d.ts +6 -3
  116. package/lib/typescript/text/index.d.ts.map +1 -1
  117. package/lib/typescript/utiles/styled.d.ts +7 -4
  118. package/lib/typescript/utiles/styled.d.ts.map +1 -1
  119. package/package.json +1 -1
  120. package/src/badge/index.tsx +7 -17
  121. package/src/button/index.tsx +7 -12
  122. package/src/card/index.tsx +21 -23
  123. package/src/checkBox/index.tsx +16 -21
  124. package/src/dropdown/index.tsx +59 -67
  125. package/src/header/index.tsx +119 -112
  126. package/src/image/index.tsx +2 -2
  127. package/src/index.ts +1 -1
  128. package/src/input/index.tsx +56 -59
  129. package/src/page/index.tsx +21 -3
  130. package/src/safeAreaView/index.tsx +6 -2
  131. package/src/seperator/index.tsx +4 -10
  132. package/src/shape/cycle.tsx +10 -12
  133. package/src/shape/index.tsx +7 -3
  134. package/src/slider/index.tsx +82 -46
  135. package/src/spinner/index.tsx +49 -55
  136. package/src/utiles/styled.tsx +14 -27
@@ -8,7 +8,6 @@ import {
8
8
  import { styled } from "../utiles/styled";
9
9
  import { getStatusBarHeight } from "../utiles/statusBar";
10
10
  import { Stack } from "../stack";
11
- import StatusBar, { StatusBarProps } from "./statusBar";
12
11
  import { StyleShape, ShapeProps } from "../shape";
13
12
  import { StyledText, StyledTextProps } from "../text";
14
13
  import { ChevronLeft } from "../icons";
@@ -35,8 +34,6 @@ export interface HeaderProps extends ViewProps, ViewStyle {
35
34
  backArrowProps?: BackArrowProps;
36
35
  shapeProps?: ShapeProps;
37
36
  onBackPress?: () => void;
38
- showStatusBar?: boolean;
39
- statusBarProps?: StatusBarProps;
40
37
  skipStatusBarOnAndroid?: boolean;
41
38
  skipStatusBarOnIOS?: boolean;
42
39
  children?: React.ReactNode;
@@ -44,7 +41,7 @@ export interface HeaderProps extends ViewProps, ViewStyle {
44
41
 
45
42
  // ─── Container ────────────────────────────────────────────────────────────────
46
43
 
47
- const StyledHeaderContainer = styled<ViewProps & ViewStyle>(View, {
44
+ const StyledHeaderContainer = styled<HeaderProps>(View, {
48
45
  base: {
49
46
  position: "relative",
50
47
  flexDirection: "row",
@@ -72,128 +69,138 @@ Full.displayName = "StyledHeader.Full";
72
69
 
73
70
  // ─── StyledHeader ─────────────────────────────────────────────────────────────
74
71
 
75
- const HeaderComponent = React.forwardRef<
76
- React.ComponentPropsWithRef<typeof StyledHeaderContainer>,
77
- HeaderProps
78
- >(
79
- (
80
- {
81
- // built-in title/icon layout props
82
- showBackArrow,
83
- backArrowProps,
84
- showStatusBar = true,
85
- onBackPress,
86
- title,
87
- titleAlignment = "left",
88
- titleProps,
89
- leftIcon,
90
- rightIcon,
91
- shapeProps,
92
- statusBarProps,
93
- skipStatusBarOnAndroid = true,
94
- skipStatusBarOnIOS = true,
95
- // children covers StyledHeader.Full usage
96
- children,
97
- ...rest
98
- },
99
- ref,
100
- ) => {
101
- // ── Left slot ─────────────────────────────────────────────────────────
102
- const renderLeft = () => (
103
- <Stack flex={1} horizontal alignItems="center" justifyContent="flex-start">
104
- {showBackArrow && (
105
- <StyledPressable onPress={onBackPress ?? backArrowProps?.onPress}>
106
- <StyleShape
107
- cycle
108
-
109
- {...shapeProps}
110
- >
111
- <ChevronLeft
112
- size={backArrowProps?.size ?? 24}
113
- color={backArrowProps?.color ?? theme.colors.gray[700]}
114
- strokeWidth={backArrowProps?.strokeWidth}
115
- />
116
- </StyleShape>
117
- </StyledPressable>
118
-
119
- )}
120
- {leftIcon}
121
- {titleAlignment === "left" && title && (
72
+ const HeaderComponent = ({
73
+ showBackArrow,
74
+ backArrowProps,
75
+ onBackPress,
76
+ title,
77
+ titleAlignment = "left",
78
+ titleProps,
79
+ leftIcon,
80
+ rightIcon,
81
+ shapeProps,
82
+ skipStatusBarOnAndroid = true,
83
+ skipStatusBarOnIOS = true,
84
+ children,
85
+ // Pull ref directly from props
86
+ ref,
87
+ ...rest
88
+ }: HeaderProps & { ref?: React.Ref<View> }) => {
89
+
90
+ // ── Left slot ─────────────────────────────────────────────────────────
91
+ const renderBackIcon = () => (
92
+ <>
93
+ {showBackArrow && (
94
+ <StyledPressable onPress={onBackPress ?? backArrowProps?.onPress} flexDirection="row" alignItems="center" justifyContent="flex-start">
95
+ <StyleShape
96
+ cycle
97
+
98
+ {...shapeProps}
99
+ >
100
+ <ChevronLeft
101
+ size={backArrowProps?.size ?? 24}
102
+ color={backArrowProps?.color ?? theme.colors.gray[700]}
103
+ strokeWidth={backArrowProps?.strokeWidth}
104
+ />
105
+ </StyleShape>
106
+ </StyledPressable>
107
+
108
+ )}
109
+ </>
110
+ );
111
+
112
+ // ── Left slot ─────────────────────────────────────────────────────────
113
+ const renderLeft = () => (
114
+ <>
115
+ {titleAlignment === "left" && title && (
116
+ <Stack flex={1} horizontal alignItems="center" justifyContent="flex-start">
117
+ {leftIcon}
122
118
  <StyledText
123
119
  marginLeft={showBackArrow || leftIcon ? 8 : 0}
124
120
  {...titleProps}
125
121
  >
126
122
  {title}
127
123
  </StyledText>
128
- )}
129
- </Stack>
130
- );
131
-
132
- // ── Center slot ───────────────────────────────────────────────────────
133
- const renderCenter = () => {
134
- if (titleAlignment !== "center" || !title) return null;
135
- return (
136
- <Stack flex={2} alignItems="center" justifyContent="center">
137
- <StyledText numberOfLines={1} {...titleProps}>
138
- {title}
139
- </StyledText>
140
124
  </Stack>
141
- );
142
- };
143
-
144
- // ── Right slot ────────────────────────────────────────────────────────
145
- const renderRight = () => (
146
- <Stack flex={1} horizontal alignItems="center" justifyContent="flex-end">
147
- {titleAlignment === "right" && title && (
148
- <StyledText marginRight={rightIcon ? 8 : 0} {...titleProps}>
149
- {title}
150
- </StyledText>
151
- )}
152
- {rightIcon}
153
- </Stack>
154
- );
125
+ )}
126
+ </>
155
127
 
156
- // ── When children is present (e.g. StyledHeader.Full usage), render
157
- // them directly inside the container — skip the built-in layout slots.
158
- const renderContent = () => {
159
- if (children) return <>{children}</>;
160
- return (
161
- <>
162
- {renderLeft()}
163
- {renderCenter()}
164
- {renderRight()}
165
- </>
166
- );
167
- };
128
+ );
168
129
 
130
+ // ── Center slot ───────────────────────────────────────────────────────
131
+ const renderCenter = () => {
169
132
  return (
170
- <Stack vertical>
171
- {showStatusBar && <StatusBar {...statusBarProps} />}
172
- <StyledHeaderContainer
173
- ref={ref}
174
- marginTop={getStatusBarHeight({
175
- skipAndroid: skipStatusBarOnAndroid,
176
- skipIos: skipStatusBarOnIOS,
177
- })}
178
- {...rest}
179
- >
180
- {renderContent()}
181
- </StyledHeaderContainer>
182
- </Stack>
133
+ <>
134
+ {
135
+ titleAlignment === "center" && title && (
136
+ <Stack flex={1} horizontal alignItems="center" justifyContent="center">
137
+ <StyledText numberOfLines={1} {...titleProps}>
138
+ {title}
139
+ </StyledText>
140
+ </Stack>
141
+
142
+ )
143
+ }
144
+ </>
183
145
  );
184
- },
185
- );
186
-
187
- // ─── Composition ──────────────────────────────────────────────────────────────
188
-
189
- interface HeaderComponent
190
- extends React.ForwardRefExoticComponent<
191
- HeaderProps & React.RefAttributes<View>
192
- > {
146
+ };
147
+
148
+ // ── Right slot ────────────────────────────────────────────────────────
149
+ const renderRight = () => (
150
+ <>
151
+ {titleAlignment === "right" && title && (
152
+ <StyledText marginRight={rightIcon ? 8 : 0} {...titleProps}>
153
+ {title}
154
+ </StyledText>
155
+ )}
156
+ {
157
+ rightIcon && (
158
+ <> {rightIcon}</>
159
+ )
160
+ }
161
+
162
+ </>
163
+ );
164
+
165
+ // ── When children is present (e.g. StyledHeader.Full usage), render
166
+ // them directly inside the container — skip the built-in layout slots.
167
+ const renderContent = () => {
168
+ if (children) return <>{children}</>;
169
+ return (
170
+ <>
171
+ {renderBackIcon()}
172
+ {renderLeft()}
173
+ {renderCenter()}
174
+ {renderRight()}
175
+ </>
176
+ );
177
+ };
178
+
179
+ return (
180
+ <StyledHeaderContainer
181
+ ref={ref}
182
+ marginTop={getStatusBarHeight({
183
+ skipAndroid: skipStatusBarOnAndroid,
184
+ skipIos: skipStatusBarOnIOS,
185
+ })}
186
+ {...rest}
187
+ >
188
+ {renderContent()}
189
+ </StyledHeaderContainer>
190
+ );
191
+ };
192
+
193
+
194
+ // ─── Composition (React 19 Style) ─────────────────────────────────────────────
195
+
196
+ // Define the static property on the function type
197
+ interface StyledHeaderType {
198
+ (props: HeaderProps & { ref?: React.Ref<View> }): React.ReactElement | null;
193
199
  Full: typeof Full;
200
+ displayName?: string;
194
201
  }
195
202
 
196
- const StyledHeader = HeaderComponent as HeaderComponent;
203
+ const StyledHeader = HeaderComponent as StyledHeaderType;
197
204
 
198
205
  StyledHeader.Full = Full;
199
206
  StyledHeader.displayName = "StyledHeader";
@@ -33,13 +33,13 @@ interface _StyledImageProps extends Omit<StyledImageProps, 'height' | 'width'> {
33
33
  width?: DimensionValue;
34
34
  }
35
35
 
36
- const StyledImage = React.forwardRef<React.ComponentRef<typeof Image>, _StyledImageProps>(({ height = 100, width = 100, ...props }: _StyledImageProps, ref) => {
36
+ const StyledImage = ({ height = 100, width = 100, ref, ...props }: _StyledImageProps & { ref?: React.Ref<React.ComponentRef<typeof Image>> }) => {
37
37
  const { cycle, size, ...rest } = props;
38
38
  const sizeStyle: ImageStyle = cycle
39
39
  ? { height: Number(size) as DimensionValue, width: Number(size) as DimensionValue, borderRadius: 9999 }
40
40
  : { height: height as DimensionValue, width: width as DimensionValue };
41
41
  return <Image {...rest} style={[props.style, sizeStyle]} ref={ref} />;
42
- });
42
+ };
43
43
 
44
44
  export { StyledImage, StyledImageBackground };
45
45
  export type { StyledImageProps, StyledImageBackgroundProps };
package/src/index.ts CHANGED
@@ -6,7 +6,7 @@ export { StyledText, type StyledTextProps } from './text'
6
6
  export { StyledSafeAreaProvider, type StyledSafeAreaProviderProps } from './safeAreaProvider'
7
7
  export { StyledSafeAreaView, type StyledSafeAreaViewProps } from './safeAreaView'
8
8
  export { StyledScrollView, type StyledScrollViewProps } from './scrollView'
9
- export { StyleShape, type ShapeProps } from './shape'
9
+ export { StyledShape, StyleShape, type ShapeProps } from './shape'
10
10
  export { StyledPage, type StyledPageProps } from './page'
11
11
  export { StyledHeader, type HeaderProps } from './header'
12
12
  export { StyledSpacer, type SpacerProps } from './spacer'
@@ -1,5 +1,4 @@
1
1
  import React, {
2
- forwardRef,
3
2
  useCallback,
4
3
  useImperativeHandle,
5
4
  useRef,
@@ -337,63 +336,62 @@ const ad = StyleSheet.create({
337
336
 
338
337
  // ─── StyledTextInput ──────────────────────────────────────────────────────────
339
338
 
340
- export const StyledTextInput = forwardRef<React.ComponentRef<typeof TextInputBase>, StyledTextInputProps>(
341
- (
342
- {
343
- // Label / meta
344
- label,
345
- labelProps,
346
- required = false,
347
- helperText,
348
- helperProps,
349
- errorMessage,
350
- errorProps,
351
- error = false,
352
-
353
- // Counter
354
- showCounter = false,
355
-
356
- // Icons
357
- leftIcon,
358
- rightIcon,
359
- leftAddon,
360
- rightAddon,
361
-
362
- // Clear + loading
363
- clearable = false,
364
- loading = false,
365
-
366
- // Appearance
367
- variant = 'outline',
368
- size = 'md',
369
- borderColor: borderColorProp,
370
- focusColor = theme.colors.indigo?.[500] ?? '#6366f1',
371
- floatLabel = false,
372
-
373
- // Styles
374
- containerStyle,
375
- inputWrapStyle,
376
- inputStyle,
377
-
378
- // Pass-through style props
379
- fontSize: fontSizeProp,
380
- fontWeight: fontWeightProp,
381
-
382
- // TextInput props
383
- value,
384
- defaultValue,
385
- onChangeText,
386
- placeholder,
387
- editable = true,
388
- multiline = false,
389
- numberOfLines,
390
- maxLength,
391
- onFocus: onFocusProp,
392
- onBlur: onBlurProp,
393
- ...rest
394
- },
339
+ export const StyledTextInput = (
340
+ {
341
+ // Label / meta
342
+ label,
343
+ labelProps,
344
+ required = false,
345
+ helperText,
346
+ helperProps,
347
+ errorMessage,
348
+ errorProps,
349
+ error = false,
350
+
351
+ // Counter
352
+ showCounter = false,
353
+
354
+ // Icons
355
+ leftIcon,
356
+ rightIcon,
357
+ leftAddon,
358
+ rightAddon,
359
+
360
+ // Clear + loading
361
+ clearable = false,
362
+ loading = false,
363
+
364
+ // Appearance
365
+ variant = 'outline',
366
+ size = 'md',
367
+ borderColor: borderColorProp,
368
+ focusColor = theme.colors.indigo?.[500] ?? '#6366f1',
369
+ floatLabel = false,
370
+
371
+ // Styles
372
+ containerStyle,
373
+ inputWrapStyle,
374
+ inputStyle,
375
+
376
+ // Pass-through style props
377
+ fontSize: fontSizeProp,
378
+ fontWeight: fontWeightProp,
379
+
380
+ // TextInput props
381
+ value,
382
+ defaultValue,
383
+ onChangeText,
384
+ placeholder,
385
+ editable = true,
386
+ multiline = false,
387
+ numberOfLines,
388
+ maxLength,
389
+ onFocus: onFocusProp,
390
+ onBlur: onBlurProp,
395
391
  ref,
396
- ) => {
392
+ ...rest
393
+ }: StyledTextInputProps & { ref?: React.Ref<React.ComponentRef<typeof TextInputBase>> },
394
+ ) => {
397
395
  const [focused, setFocused] = useState(false)
398
396
  const [localValue, setLocalValue] = useState(defaultValue ?? '')
399
397
  const inputRef = useRef<TextInput>(null)
@@ -617,8 +615,7 @@ export const StyledTextInput = forwardRef<React.ComponentRef<typeof TextInputBas
617
615
 
618
616
  </View>
619
617
  )
620
- },
621
- )
618
+ };
622
619
 
623
620
  StyledTextInput.displayName = 'StyledTextInput'
624
621
  export { StyledTextInput as StyledInput }
@@ -1,18 +1,36 @@
1
1
  import React from 'react';
2
2
  import { StyledSafeAreaView, StyledSafeAreaViewProps } from '../safeAreaView';
3
+ import { StatusBar, StatusBarProps } from 'react-native';
4
+ import { StyledHeader } from '../header';
3
5
 
4
- type StyledPageProps = StyledSafeAreaViewProps & {
5
- children?: React.ReactNode;
6
+ interface StyledPageProps extends StyledSafeAreaViewProps {
7
+ statusBarProps?: StatusBarProps;
8
+ showStatusBar?: boolean;
9
+ statusBarStyle?: StatusBarProps['barStyle'];
10
+ statusBarBackgroundColor?: StatusBarProps['backgroundColor'];
11
+ hideStatusBarOnAndroid?: boolean;
12
+ hideStatusBarOnIOS?: boolean;
13
+ translucentStatusBar?: boolean;
6
14
  }
7
15
 
8
- const StyledPage = ({ children, ...props }: StyledPageProps) => {
16
+ interface StyledPageType {
17
+ (props: React.PropsWithChildren<StyledPageProps>): React.ReactNode;
18
+ Header: typeof StyledHeader;
19
+ displayName?: string;
20
+ }
21
+
22
+ const Page = ({ children, statusBarProps, showStatusBar = true, statusBarStyle, statusBarBackgroundColor, hideStatusBarOnAndroid, hideStatusBarOnIOS, translucentStatusBar, ...props }: React.PropsWithChildren<StyledPageProps>) => {
9
23
  return (
10
24
  <StyledSafeAreaView {...props}>
25
+ {showStatusBar && <StatusBar hidden={hideStatusBarOnAndroid || hideStatusBarOnIOS} barStyle={statusBarStyle} backgroundColor={statusBarBackgroundColor} translucent={translucentStatusBar} {...statusBarProps} />}
11
26
  {children}
12
27
  </StyledSafeAreaView>
13
28
  )
14
29
  }
15
30
 
31
+ const StyledPage = Page as StyledPageType;
32
+
33
+ StyledPage.Header = StyledHeader;
16
34
  StyledPage.displayName = 'StyledPage';
17
35
 
18
36
  export { StyledPage };
@@ -4,13 +4,17 @@ import {
4
4
  } from 'react-native-safe-area-context';
5
5
  import { styled } from '../utiles/styled';
6
6
  import { ViewStyleProps, ViewStyle } from '../utiles/viewStyleProps';
7
+ import { viewStyleStringVariants } from '../utiles/viewStyleVariants';
7
8
 
8
9
  type StyledSafeAreaViewProps = SafeAreaViewProps & ViewStyleProps;
9
10
 
10
11
  const StyledSafeAreaView = styled<StyledSafeAreaViewProps>(SafeAreaView, {
11
12
  base: {
12
- flex: 1,
13
- } as ViewStyle
13
+ flex: 1,
14
+ } as ViewStyle,
15
+ variants: {
16
+ ...viewStyleStringVariants,
17
+ }
14
18
  });
15
19
 
16
20
  export { StyledSafeAreaView };
@@ -10,14 +10,9 @@ interface SeperatorProps extends StackProps {
10
10
  rightLabelProps?: React.ComponentProps<typeof StyledText>;
11
11
  }
12
12
 
13
- const StyledSeperator = React.forwardRef<
14
- React.ComponentRef<typeof Stack>,
15
- SeperatorProps
16
- >(
17
- (
18
- { leftLabel, leftLabelProps, rightLabel, rightLabelProps, ...rest },
19
- ref,
20
- ) => {
13
+ const StyledSeperator = (
14
+ { leftLabel, leftLabelProps, rightLabel, rightLabelProps, ref, ...rest }: SeperatorProps & { ref?: React.Ref<React.ComponentRef<typeof Stack>> },
15
+ ) => {
21
16
  return (
22
17
  <Stack
23
18
  horizontal
@@ -50,8 +45,7 @@ const StyledSeperator = React.forwardRef<
50
45
  }
51
46
  </Stack>
52
47
  );
53
- },
54
- );
48
+ };
55
49
 
56
50
  StyledSeperator.displayName = "StyledSeperator";
57
51
 
@@ -114,18 +114,16 @@ interface StyledCycleProps extends CycleComponentProps {
114
114
  * </LinearGradient>
115
115
  * </StyledCycle>
116
116
  */
117
- const StyledCycle = React.forwardRef<View, StyledCycleProps>(
118
- (
119
- {
120
- children,
121
- ...rest
122
- },
123
- ref
124
- ) => (
125
- <CycleBase ref={ref} {...rest}>
126
- {children}
127
- </CycleBase>
128
- )
117
+ const StyledCycle = (
118
+ {
119
+ children,
120
+ ref,
121
+ ...rest
122
+ }: StyledCycleProps & { ref?: React.Ref<View> }
123
+ ) => (
124
+ <CycleBase ref={ref} {...rest}>
125
+ {children}
126
+ </CycleBase>
129
127
  );
130
128
 
131
129
  StyledCycle.displayName = 'StyledCycle';
@@ -1,6 +1,7 @@
1
1
 
2
2
  import { View, ViewProps, ViewStyle } from 'react-native';
3
3
  import { styled } from '../utiles/styled';
4
+ import { viewStyleStringVariants, viewStyleVariants } from '../utiles/viewStyleVariants';
4
5
 
5
6
  type ShapeVariants = {
6
7
  cycle?: boolean | [boolean, ViewStyle];
@@ -9,7 +10,7 @@ type ShapeVariants = {
9
10
 
10
11
  type ShapeProps = ShapeVariants & ViewProps & ViewStyle;
11
12
 
12
- const StyleShape = styled<ShapeProps>(View, {
13
+ const StyledShape = styled<ShapeProps>(View, {
13
14
  base: {
14
15
  position: 'relative',
15
16
  } as ViewStyle,
@@ -31,8 +32,11 @@ const StyleShape = styled<ShapeProps>(View, {
31
32
  }
32
33
  return { height: Number(selected), width: Number(selected) };
33
34
  },
34
- } as any
35
+ ...viewStyleVariants,
36
+ ...viewStyleStringVariants,
37
+ } as any,
35
38
  });
36
39
 
37
- export { StyleShape };
40
+
41
+ export { StyledShape, StyledShape as StyleShape };
38
42
  export type { ShapeProps };