@hoddy-ui/core 2.5.48 → 2.5.52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/next/components/AdaptiveStatusBarNext.tsx +1 -5
- package/next/dist/index.d.mts +9 -2
- package/next/dist/index.d.ts +9 -2
- package/next/dist/index.js +328 -432
- package/next/dist/index.js.map +1 -1
- package/next/dist/index.mjs +328 -433
- package/next/dist/index.mjs.map +1 -1
- package/next/package.json +3 -3
- package/package.json +1 -1
- package/src/Components/StarRating.tsx +4 -1
- package/src/Components/TextField.tsx +408 -485
- package/src/theme/colors.ts +24 -0
- package/src/theme/index.tsx +3 -3
- package/src/types.ts +40 -45
package/src/theme/colors.ts
CHANGED
|
@@ -70,6 +70,30 @@ export default function colors(theme: ThemeTypes) {
|
|
|
70
70
|
...extraColors?.light?.primary,
|
|
71
71
|
...extraColors?.dark?.primary,
|
|
72
72
|
},
|
|
73
|
+
error: {
|
|
74
|
+
...extraColors?.light?.error,
|
|
75
|
+
...extraColors?.dark?.error,
|
|
76
|
+
},
|
|
77
|
+
secondary: {
|
|
78
|
+
...extraColors?.light?.secondary,
|
|
79
|
+
...extraColors?.dark?.secondary,
|
|
80
|
+
},
|
|
81
|
+
warning: {
|
|
82
|
+
...extraColors?.light?.warning,
|
|
83
|
+
...extraColors?.dark?.warning,
|
|
84
|
+
},
|
|
85
|
+
success: {
|
|
86
|
+
...extraColors?.light?.success,
|
|
87
|
+
...extraColors?.dark?.success,
|
|
88
|
+
},
|
|
89
|
+
info: {
|
|
90
|
+
...extraColors?.light?.info,
|
|
91
|
+
...extraColors?.dark?.info,
|
|
92
|
+
},
|
|
93
|
+
blue: {
|
|
94
|
+
...extraColors?.light?.blue,
|
|
95
|
+
...extraColors?.dark?.blue,
|
|
96
|
+
},
|
|
73
97
|
};
|
|
74
98
|
|
|
75
99
|
const dynamicColors = theme === "dark" ? darkColors : lightColors;
|
package/src/theme/index.tsx
CHANGED
|
@@ -21,7 +21,7 @@ export const UIThemeContext = createContext<ThemeContext>({
|
|
|
21
21
|
|
|
22
22
|
function themeReducer(
|
|
23
23
|
state: ThemeState,
|
|
24
|
-
{ type, payload }: ThemeActionTypes
|
|
24
|
+
{ type, payload }: ThemeActionTypes,
|
|
25
25
|
): ThemeState {
|
|
26
26
|
// Platform
|
|
27
27
|
AsyncStorage.setItem("theme", type);
|
|
@@ -85,7 +85,7 @@ export const UIThemeProvider = ({ children }: ThemeProviderProps) => {
|
|
|
85
85
|
type: "default",
|
|
86
86
|
payload: colorScheme,
|
|
87
87
|
});
|
|
88
|
-
Appearance.setColorScheme(
|
|
88
|
+
Appearance.setColorScheme(null);
|
|
89
89
|
} else {
|
|
90
90
|
themeDispatch({
|
|
91
91
|
type: val,
|
|
@@ -97,7 +97,7 @@ export const UIThemeProvider = ({ children }: ThemeProviderProps) => {
|
|
|
97
97
|
type: "default",
|
|
98
98
|
payload: colorScheme,
|
|
99
99
|
});
|
|
100
|
-
Appearance.setColorScheme(
|
|
100
|
+
Appearance.setColorScheme(null);
|
|
101
101
|
}
|
|
102
102
|
});
|
|
103
103
|
}, [colorScheme]);
|
package/src/types.ts
CHANGED
|
@@ -156,7 +156,7 @@ export interface LocatorProps {
|
|
|
156
156
|
variant?: "contained" | "outlined";
|
|
157
157
|
onLocationSelected: (
|
|
158
158
|
location: locatorLocation | null,
|
|
159
|
-
formatted_address?: string
|
|
159
|
+
formatted_address?: string,
|
|
160
160
|
) => void;
|
|
161
161
|
label?: string;
|
|
162
162
|
error?: string;
|
|
@@ -236,14 +236,7 @@ export interface TextFieldProps extends TextInputProps {
|
|
|
236
236
|
variant?: "outlined" | "text" | "contained";
|
|
237
237
|
color?: colorTypes;
|
|
238
238
|
size?: "small" | "normal" | "large";
|
|
239
|
-
type?:
|
|
240
|
-
| "email"
|
|
241
|
-
| "tel"
|
|
242
|
-
| "password"
|
|
243
|
-
| "text"
|
|
244
|
-
| "number"
|
|
245
|
-
| "search"
|
|
246
|
-
| "date";
|
|
239
|
+
type?: "email" | "tel" | "password" | "text" | "number" | "search" | "date";
|
|
247
240
|
helperText?: string;
|
|
248
241
|
value: any;
|
|
249
242
|
start?: ReactNode;
|
|
@@ -263,6 +256,7 @@ export interface TextFieldProps extends TextInputProps {
|
|
|
263
256
|
onFocus?: () => void;
|
|
264
257
|
onBlur?: () => void;
|
|
265
258
|
selectMenuProps?: Partial<SelectMenuProps>;
|
|
259
|
+
labelAlwaysOpen?: boolean;
|
|
266
260
|
}
|
|
267
261
|
|
|
268
262
|
export interface TypographyProps extends TextProps {
|
|
@@ -272,15 +266,15 @@ export interface TypographyProps extends TextProps {
|
|
|
272
266
|
textCase?: "capitalize" | "uppercase" | "lowercase" | undefined;
|
|
273
267
|
lineHeight?: number;
|
|
274
268
|
variant?:
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
269
|
+
| "caption"
|
|
270
|
+
| "body1"
|
|
271
|
+
| "body2"
|
|
272
|
+
| "h6"
|
|
273
|
+
| "h5"
|
|
274
|
+
| "h4"
|
|
275
|
+
| "h3"
|
|
276
|
+
| "h2"
|
|
277
|
+
| "h1";
|
|
284
278
|
align?: "center" | "left" | "right";
|
|
285
279
|
gutterBottom?: number;
|
|
286
280
|
numberOfLines?: number;
|
|
@@ -321,6 +315,7 @@ export interface RatingStarsProps {
|
|
|
321
315
|
rating: number;
|
|
322
316
|
size: number;
|
|
323
317
|
color?: colorTypes | (string & {});
|
|
318
|
+
inactiveColor?: colorTypes | (string & {});
|
|
324
319
|
}
|
|
325
320
|
|
|
326
321
|
export interface RatingInputProps {
|
|
@@ -359,36 +354,36 @@ interface BaseAnimatorProps {
|
|
|
359
354
|
// Type-specific animation props using discriminated unions
|
|
360
355
|
export type AnimatorProps =
|
|
361
356
|
| (BaseAnimatorProps & {
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
357
|
+
type: "fade";
|
|
358
|
+
// No additional props for fade animation
|
|
359
|
+
})
|
|
365
360
|
| (BaseAnimatorProps & {
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
361
|
+
type: "grow";
|
|
362
|
+
initialScale?: number;
|
|
363
|
+
})
|
|
369
364
|
| (BaseAnimatorProps & {
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
365
|
+
type: "slide";
|
|
366
|
+
direction?: "up" | "down" | "left" | "right";
|
|
367
|
+
initialValue?: number;
|
|
368
|
+
})
|
|
374
369
|
| (BaseAnimatorProps & {
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
370
|
+
type: "blink";
|
|
371
|
+
blinkDuration?: number;
|
|
372
|
+
minOpacity?: number;
|
|
373
|
+
maxOpacity?: number;
|
|
374
|
+
})
|
|
380
375
|
| (BaseAnimatorProps & {
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
376
|
+
type: "float";
|
|
377
|
+
closeDuration?: number;
|
|
378
|
+
floatDistance?: number;
|
|
379
|
+
floatDuration?: number;
|
|
380
|
+
})
|
|
386
381
|
| (BaseAnimatorProps & {
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
382
|
+
type: "roll";
|
|
383
|
+
initialTranslateY?: number;
|
|
384
|
+
initialRotate?: string;
|
|
385
|
+
})
|
|
391
386
|
| (BaseAnimatorProps & {
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
387
|
+
type: "thrownup";
|
|
388
|
+
// No additional props for thrownup animation
|
|
389
|
+
});
|