@korsolutions/ui 0.0.61 → 0.0.63
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/dist/module/components/avatar/components/avatar-image.js.map +1 -1
- package/dist/module/components/badge/badge.js +30 -0
- package/dist/module/components/badge/badge.js.map +1 -0
- package/dist/module/components/badge/context.js.map +1 -1
- package/dist/module/components/badge/index.js +1 -6
- package/dist/module/components/badge/index.js.map +1 -1
- package/dist/module/components/badge/variants/default.js +17 -14
- package/dist/module/components/badge/variants/default.js.map +1 -1
- package/dist/module/components/badge/variants/secondary.js +17 -14
- package/dist/module/components/badge/variants/secondary.js.map +1 -1
- package/dist/module/components/input/input.js.map +1 -1
- package/dist/module/components/menu/components/menu-checkbox-item.js +4 -2
- package/dist/module/components/menu/components/menu-checkbox-item.js.map +1 -1
- package/dist/module/components/menu/components/menu-item.js +4 -2
- package/dist/module/components/menu/components/menu-item.js.map +1 -1
- package/dist/module/components/menu/components/menu-radio-item.js +4 -2
- package/dist/module/components/menu/components/menu-radio-item.js.map +1 -1
- package/dist/module/components/tabs/components/tabs-item.js +61 -0
- package/dist/module/components/tabs/components/tabs-item.js.map +1 -0
- package/dist/module/components/tabs/components/tabs-root.js +3 -2
- package/dist/module/components/tabs/components/tabs-root.js.map +1 -1
- package/dist/module/components/tabs/index.js +2 -6
- package/dist/module/components/tabs/index.js.map +1 -1
- package/dist/module/components/tabs/variants/default.js +26 -8
- package/dist/module/components/tabs/variants/default.js.map +1 -1
- package/dist/module/components/tabs/variants/line.js +24 -7
- package/dist/module/components/tabs/variants/line.js.map +1 -1
- package/dist/module/components/toast/components/toast-icon.js.map +1 -1
- package/dist/module/{components/menu → hooks}/use-organized-children.js +8 -10
- package/dist/module/hooks/use-organized-children.js.map +1 -0
- package/dist/module/themes/provider.js.map +1 -1
- package/dist/typescript/src/components/avatar/components/avatar-image.d.ts.map +1 -1
- package/dist/typescript/src/components/badge/badge.d.ts +12 -0
- package/dist/typescript/src/components/badge/badge.d.ts.map +1 -0
- package/dist/typescript/src/components/badge/context.d.ts +1 -2
- package/dist/typescript/src/components/badge/context.d.ts.map +1 -1
- package/dist/typescript/src/components/badge/index.d.ts +1 -8
- package/dist/typescript/src/components/badge/index.d.ts.map +1 -1
- package/dist/typescript/src/components/badge/types.d.ts +6 -5
- package/dist/typescript/src/components/badge/types.d.ts.map +1 -1
- package/dist/typescript/src/components/badge/variants/default.d.ts.map +1 -1
- package/dist/typescript/src/components/badge/variants/secondary.d.ts.map +1 -1
- package/dist/typescript/src/components/input/input.d.ts +1 -1
- package/dist/typescript/src/components/input/input.d.ts.map +1 -1
- package/dist/typescript/src/components/menu/components/menu-checkbox-item.d.ts.map +1 -1
- package/dist/typescript/src/components/menu/components/menu-item.d.ts.map +1 -1
- package/dist/typescript/src/components/menu/components/menu-radio-item.d.ts.map +1 -1
- package/dist/typescript/src/components/menu/types.d.ts +2 -1
- package/dist/typescript/src/components/menu/types.d.ts.map +1 -1
- package/dist/typescript/src/components/tabs/components/{tabs-trigger.d.ts → tabs-item.d.ts} +3 -3
- package/dist/typescript/src/components/tabs/components/tabs-item.d.ts.map +1 -0
- package/dist/typescript/src/components/tabs/components/tabs-root.d.ts.map +1 -1
- package/dist/typescript/src/components/tabs/index.d.ts +3 -9
- package/dist/typescript/src/components/tabs/index.d.ts.map +1 -1
- package/dist/typescript/src/components/tabs/types.d.ts +8 -7
- package/dist/typescript/src/components/tabs/types.d.ts.map +1 -1
- package/dist/typescript/src/components/tabs/variants/default.d.ts.map +1 -1
- package/dist/typescript/src/components/tabs/variants/line.d.ts.map +1 -1
- package/dist/typescript/src/components/toast/components/toast-icon.d.ts +1 -1
- package/dist/typescript/src/components/toast/components/toast-icon.d.ts.map +1 -1
- package/dist/typescript/src/hooks/use-organized-children.d.ts +5 -0
- package/dist/typescript/src/hooks/use-organized-children.d.ts.map +1 -0
- package/dist/typescript/src/themes/provider.d.ts +3 -3
- package/dist/typescript/src/themes/provider.d.ts.map +1 -1
- package/dist/typescript/src/types/props.types.d.ts +2 -1
- package/dist/typescript/src/types/props.types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/avatar/components/avatar-image.tsx +14 -2
- package/src/components/badge/badge.tsx +46 -0
- package/src/components/badge/context.ts +1 -2
- package/src/components/badge/index.ts +1 -10
- package/src/components/badge/types.ts +6 -6
- package/src/components/badge/variants/default.tsx +17 -14
- package/src/components/badge/variants/secondary.tsx +17 -14
- package/src/components/input/input.tsx +6 -2
- package/src/components/menu/components/menu-checkbox-item.tsx +9 -2
- package/src/components/menu/components/menu-item.tsx +9 -2
- package/src/components/menu/components/menu-radio-item.tsx +9 -2
- package/src/components/menu/types.ts +2 -1
- package/src/components/tabs/components/tabs-item.tsx +96 -0
- package/src/components/tabs/components/tabs-root.tsx +9 -2
- package/src/components/tabs/index.ts +3 -9
- package/src/components/tabs/types.ts +8 -7
- package/src/components/tabs/variants/default.tsx +25 -7
- package/src/components/tabs/variants/line.tsx +22 -5
- package/src/components/toast/components/toast-icon.tsx +1 -1
- package/src/{components/menu → hooks}/use-organized-children.tsx +14 -15
- package/src/themes/provider.tsx +5 -3
- package/src/types/props.types.ts +2 -1
- package/dist/module/components/badge/components/badge-label.js +0 -17
- package/dist/module/components/badge/components/badge-label.js.map +0 -1
- package/dist/module/components/badge/components/badge-root.js +0 -27
- package/dist/module/components/badge/components/badge-root.js.map +0 -1
- package/dist/module/components/menu/use-organized-children.js.map +0 -1
- package/dist/module/components/tabs/components/tabs-list.js +0 -23
- package/dist/module/components/tabs/components/tabs-list.js.map +0 -1
- package/dist/module/components/tabs/components/tabs-trigger-text.js +0 -28
- package/dist/module/components/tabs/components/tabs-trigger-text.js.map +0 -1
- package/dist/module/components/tabs/components/tabs-trigger.js +0 -45
- package/dist/module/components/tabs/components/tabs-trigger.js.map +0 -1
- package/dist/typescript/src/components/badge/components/badge-label.d.ts +0 -9
- package/dist/typescript/src/components/badge/components/badge-label.d.ts.map +0 -1
- package/dist/typescript/src/components/badge/components/badge-root.d.ts +0 -13
- package/dist/typescript/src/components/badge/components/badge-root.d.ts.map +0 -1
- package/dist/typescript/src/components/menu/use-organized-children.d.ts +0 -3
- package/dist/typescript/src/components/menu/use-organized-children.d.ts.map +0 -1
- package/dist/typescript/src/components/tabs/components/tabs-list.d.ts +0 -8
- package/dist/typescript/src/components/tabs/components/tabs-list.d.ts.map +0 -1
- package/dist/typescript/src/components/tabs/components/tabs-trigger-text.d.ts +0 -10
- package/dist/typescript/src/components/tabs/components/tabs-trigger-text.d.ts.map +0 -1
- package/dist/typescript/src/components/tabs/components/tabs-trigger.d.ts.map +0 -1
- package/src/components/badge/components/badge-label.tsx +0 -21
- package/src/components/badge/components/badge-root.tsx +0 -36
- package/src/components/tabs/components/tabs-list.tsx +0 -21
- package/src/components/tabs/components/tabs-trigger-text.tsx +0 -26
- package/src/components/tabs/components/tabs-trigger.tsx +0 -43
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { useState } from "react";
|
|
2
2
|
import { Pressable, type StyleProp, type ViewStyle } from "react-native";
|
|
3
|
+
import { useOrganizedChildren } from "../../../hooks/use-organized-children";
|
|
3
4
|
import { useMenu } from "../context";
|
|
4
5
|
import type { MenuButtonState } from "../types";
|
|
5
|
-
import { useOrganizedChildren } from "../use-organized-children";
|
|
6
6
|
|
|
7
7
|
export interface MenuItemProps {
|
|
8
8
|
children: React.ReactNode;
|
|
@@ -34,7 +34,14 @@ export function MenuItem(props: MenuItemProps) {
|
|
|
34
34
|
menu.setIsOpen((prev) => !prev);
|
|
35
35
|
};
|
|
36
36
|
|
|
37
|
-
const
|
|
37
|
+
const textStyles = menu.styles?.itemText;
|
|
38
|
+
const iconStyles = menu.styles?.itemIcon;
|
|
39
|
+
|
|
40
|
+
const organizedChildren = useOrganizedChildren(
|
|
41
|
+
props.children,
|
|
42
|
+
textStyles,
|
|
43
|
+
iconStyles,
|
|
44
|
+
);
|
|
38
45
|
|
|
39
46
|
if (props.render) {
|
|
40
47
|
return (
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { useState } from "react";
|
|
2
2
|
import { Pressable, type StyleProp, type ViewStyle } from "react-native";
|
|
3
|
+
import { useOrganizedChildren } from "../../../hooks/use-organized-children";
|
|
3
4
|
import { useMenu, useMenuRadioGroup } from "../context";
|
|
4
5
|
import type { MenuRadioItemState } from "../types";
|
|
5
|
-
import { useOrganizedChildren } from "../use-organized-children";
|
|
6
6
|
import { MenuSelectionIndicator } from "./menu-selection-indicator";
|
|
7
7
|
|
|
8
8
|
export interface MenuRadioItemProps {
|
|
@@ -46,7 +46,14 @@ export function MenuRadioItem(props: MenuRadioItemProps) {
|
|
|
46
46
|
}
|
|
47
47
|
};
|
|
48
48
|
|
|
49
|
-
const
|
|
49
|
+
const textStyles = menu.styles?.itemText;
|
|
50
|
+
const iconStyles = menu.styles?.itemIcon;
|
|
51
|
+
|
|
52
|
+
const organizedChildren = useOrganizedChildren(
|
|
53
|
+
props.children,
|
|
54
|
+
textStyles,
|
|
55
|
+
iconStyles,
|
|
56
|
+
);
|
|
50
57
|
|
|
51
58
|
if (props.render) {
|
|
52
59
|
return (
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { StyleProp, TextStyle, ViewStyle } from "react-native";
|
|
2
2
|
import type { SvgProps } from "../../types/props.types";
|
|
3
|
+
import type { IconProps } from "../icon";
|
|
3
4
|
import type { MenuContentProps } from "./components/menu-content";
|
|
4
5
|
import type { MenuOverlayProps } from "./components/menu-overlay";
|
|
5
6
|
|
|
@@ -15,7 +16,7 @@ export interface MenuStyles {
|
|
|
15
16
|
content?: MenuContentProps["style"];
|
|
16
17
|
item?: Partial<Record<MenuButtonState, StyleProp<ViewStyle>>>;
|
|
17
18
|
itemText?: StyleProp<TextStyle>;
|
|
18
|
-
itemIcon?:
|
|
19
|
+
itemIcon?: IconProps;
|
|
19
20
|
overlay?: MenuOverlayProps["style"];
|
|
20
21
|
|
|
21
22
|
group?: StyleProp<ViewStyle>;
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import React, { useState } from "react";
|
|
2
|
+
import {
|
|
3
|
+
Pressable,
|
|
4
|
+
StyleSheet,
|
|
5
|
+
type PressableProps,
|
|
6
|
+
type StyleProp,
|
|
7
|
+
type ViewStyle,
|
|
8
|
+
} from "react-native";
|
|
9
|
+
import { useOrganizedChildren } from "../../../hooks/use-organized-children";
|
|
10
|
+
import { useTabsContext } from "../context";
|
|
11
|
+
import type { TabsItemState } from "../types";
|
|
12
|
+
|
|
13
|
+
export interface TabsItemProps extends PressableProps {
|
|
14
|
+
children: React.ReactNode;
|
|
15
|
+
value: string;
|
|
16
|
+
isDisabled?: boolean;
|
|
17
|
+
style?: StyleProp<ViewStyle>;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const calculateState = (
|
|
21
|
+
isActive: boolean,
|
|
22
|
+
isDisabled: boolean,
|
|
23
|
+
isHovered: boolean,
|
|
24
|
+
): TabsItemState => {
|
|
25
|
+
if (isDisabled) {
|
|
26
|
+
return "disabled";
|
|
27
|
+
}
|
|
28
|
+
if (isActive) {
|
|
29
|
+
return "active";
|
|
30
|
+
}
|
|
31
|
+
if (isHovered) {
|
|
32
|
+
return "hovered";
|
|
33
|
+
}
|
|
34
|
+
return "default";
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export function TabsItem(props: TabsItemProps) {
|
|
38
|
+
const {
|
|
39
|
+
children,
|
|
40
|
+
value: triggerValue,
|
|
41
|
+
isDisabled = false,
|
|
42
|
+
style,
|
|
43
|
+
...pressableProps
|
|
44
|
+
} = props;
|
|
45
|
+
const { value, onChange, styles } = useTabsContext();
|
|
46
|
+
const [isHovered, setIsHovered] = useState(false);
|
|
47
|
+
const isActive = value === triggerValue;
|
|
48
|
+
const state = calculateState(isActive, isDisabled, isHovered);
|
|
49
|
+
|
|
50
|
+
const handlePress = () => {
|
|
51
|
+
if (!isDisabled) {
|
|
52
|
+
onChange(triggerValue);
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
const calculatedStyle = StyleSheet.flatten([
|
|
57
|
+
styles?.item?.default,
|
|
58
|
+
styles?.item?.[state],
|
|
59
|
+
style,
|
|
60
|
+
]);
|
|
61
|
+
|
|
62
|
+
const textStyles = StyleSheet.flatten([
|
|
63
|
+
styles?.itemText?.default,
|
|
64
|
+
styles?.itemText?.[state],
|
|
65
|
+
]);
|
|
66
|
+
|
|
67
|
+
const iconStyles = StyleSheet.flatten([
|
|
68
|
+
styles?.itemIcon?.default,
|
|
69
|
+
styles?.itemIcon?.[state],
|
|
70
|
+
]);
|
|
71
|
+
|
|
72
|
+
const organizedChildren = useOrganizedChildren(
|
|
73
|
+
children,
|
|
74
|
+
textStyles,
|
|
75
|
+
iconStyles ?? undefined,
|
|
76
|
+
);
|
|
77
|
+
|
|
78
|
+
return (
|
|
79
|
+
<Pressable
|
|
80
|
+
{...pressableProps}
|
|
81
|
+
onHoverIn={(e) => {
|
|
82
|
+
setIsHovered(true);
|
|
83
|
+
pressableProps.onHoverIn?.(e);
|
|
84
|
+
}}
|
|
85
|
+
onHoverOut={(e) => {
|
|
86
|
+
setIsHovered(false);
|
|
87
|
+
pressableProps.onHoverOut?.(e);
|
|
88
|
+
}}
|
|
89
|
+
disabled={isDisabled}
|
|
90
|
+
onPress={handlePress}
|
|
91
|
+
style={calculatedStyle}
|
|
92
|
+
>
|
|
93
|
+
{organizedChildren}
|
|
94
|
+
</Pressable>
|
|
95
|
+
);
|
|
96
|
+
}
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import React, { useMemo } from "react";
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
StyleSheet,
|
|
4
|
+
View,
|
|
5
|
+
type StyleProp,
|
|
6
|
+
type ViewProps,
|
|
7
|
+
type ViewStyle,
|
|
8
|
+
} from "react-native";
|
|
3
9
|
import { TabsContext } from "../context";
|
|
4
10
|
import { TabsVariants } from "../variants";
|
|
5
11
|
|
|
@@ -23,10 +29,11 @@ export function TabsRoot(props: TabsRootProps) {
|
|
|
23
29
|
}),
|
|
24
30
|
[value, onChange, variantStyles],
|
|
25
31
|
);
|
|
32
|
+
const composedStyles = StyleSheet.flatten([variantStyles?.root, style]);
|
|
26
33
|
|
|
27
34
|
return (
|
|
28
35
|
<TabsContext.Provider value={contextValue}>
|
|
29
|
-
<View {...viewProps} style={
|
|
36
|
+
<View {...viewProps} style={composedStyles}>
|
|
30
37
|
{children}
|
|
31
38
|
</View>
|
|
32
39
|
</TabsContext.Provider>
|
|
@@ -1,17 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TabsItem } from "./components/tabs-item";
|
|
2
2
|
import { TabsRoot } from "./components/tabs-root";
|
|
3
|
-
import { TabsTrigger } from "./components/tabs-trigger";
|
|
4
|
-
import { TabsTriggerText } from "./components/tabs-trigger-text";
|
|
5
3
|
|
|
6
4
|
export const Tabs = {
|
|
7
5
|
Root: TabsRoot,
|
|
8
|
-
|
|
9
|
-
Trigger: TabsTrigger,
|
|
10
|
-
TriggerText: TabsTriggerText,
|
|
6
|
+
Item: TabsItem,
|
|
11
7
|
};
|
|
12
8
|
|
|
13
|
-
export type {
|
|
9
|
+
export type { TabsItemProps } from "./components/tabs-item";
|
|
14
10
|
export type { TabsRootProps } from "./components/tabs-root";
|
|
15
|
-
export type { TabsTriggerProps } from "./components/tabs-trigger";
|
|
16
|
-
export type { TabsTriggerTextProps } from "./components/tabs-trigger-text";
|
|
17
11
|
export * from "./types";
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import type { StyleProp, TextStyle } from "react-native";
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
2
|
+
import type { IconProps } from "../icon";
|
|
3
|
+
import type { TabsItemProps } from "./components/tabs-item";
|
|
4
|
+
import type { TabsRootProps } from "./components/tabs-root";
|
|
4
5
|
|
|
5
|
-
export type
|
|
6
|
+
export type TabsItemState = "default" | "active" | "disabled" | "hovered";
|
|
6
7
|
|
|
7
8
|
export interface TabsStyles {
|
|
8
|
-
root?:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
root?: TabsRootProps["style"];
|
|
10
|
+
item?: Partial<Record<TabsItemState, TabsItemProps["style"]>>;
|
|
11
|
+
itemText?: Partial<Record<TabsItemState, StyleProp<TextStyle>>>;
|
|
12
|
+
itemIcon?: Partial<Record<TabsItemState, IconProps>>;
|
|
12
13
|
}
|
|
@@ -4,37 +4,55 @@ import { type TabsStyles } from "../types";
|
|
|
4
4
|
export const useTabsVariantDefault = (): TabsStyles => {
|
|
5
5
|
return useThemedStyles(
|
|
6
6
|
({ colors, radius, fontFamily, fontSize }): TabsStyles => ({
|
|
7
|
-
|
|
7
|
+
root: {
|
|
8
8
|
flexDirection: "row",
|
|
9
9
|
backgroundColor: colors.muted,
|
|
10
10
|
padding: 4,
|
|
11
11
|
borderRadius: radius,
|
|
12
12
|
gap: 4,
|
|
13
13
|
},
|
|
14
|
-
|
|
14
|
+
item: {
|
|
15
15
|
default: {
|
|
16
|
-
|
|
16
|
+
flex: 1,
|
|
17
|
+
flexDirection: "row",
|
|
18
|
+
alignItems: "center",
|
|
19
|
+
justifyContent: "center",
|
|
20
|
+
gap: 8,
|
|
21
|
+
paddingVertical: 6,
|
|
17
22
|
paddingHorizontal: 12,
|
|
18
|
-
borderRadius: radius,
|
|
23
|
+
borderRadius: radius - 2,
|
|
19
24
|
backgroundColor: "transparent",
|
|
20
25
|
},
|
|
21
26
|
active: {
|
|
22
27
|
backgroundColor: colors.background,
|
|
23
28
|
shadowColor: "#000",
|
|
24
29
|
shadowOffset: { width: 0, height: 1 },
|
|
25
|
-
shadowOpacity: 0.
|
|
30
|
+
shadowOpacity: 0.05,
|
|
26
31
|
shadowRadius: 2,
|
|
27
|
-
elevation:
|
|
32
|
+
elevation: 1,
|
|
28
33
|
},
|
|
29
34
|
disabled: {
|
|
30
35
|
opacity: 0.5,
|
|
31
36
|
},
|
|
32
37
|
},
|
|
33
|
-
|
|
38
|
+
itemText: {
|
|
34
39
|
default: {
|
|
35
40
|
color: colors.mutedForeground,
|
|
36
41
|
fontSize,
|
|
37
42
|
fontFamily,
|
|
43
|
+
fontWeight: "500",
|
|
44
|
+
},
|
|
45
|
+
active: {
|
|
46
|
+
color: colors.foreground,
|
|
47
|
+
},
|
|
48
|
+
disabled: {
|
|
49
|
+
color: colors.mutedForeground,
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
itemIcon: {
|
|
53
|
+
default: {
|
|
54
|
+
color: colors.mutedForeground,
|
|
55
|
+
size: fontSize,
|
|
38
56
|
},
|
|
39
57
|
active: {
|
|
40
58
|
color: colors.foreground,
|
|
@@ -4,16 +4,20 @@ import { useThemedStyles } from "../../../utils/use-themed-styles";
|
|
|
4
4
|
export const useTabsVariantLine = (): TabsStyles => {
|
|
5
5
|
return useThemedStyles(
|
|
6
6
|
({ colors, fontFamily, fontSize }): TabsStyles => ({
|
|
7
|
-
|
|
7
|
+
root: {
|
|
8
8
|
flexDirection: "row",
|
|
9
9
|
borderBottomWidth: 1,
|
|
10
10
|
borderBottomColor: colors.border,
|
|
11
|
-
gap: 0,
|
|
12
11
|
},
|
|
13
|
-
|
|
12
|
+
item: {
|
|
14
13
|
default: {
|
|
15
|
-
|
|
14
|
+
flexDirection: "row",
|
|
15
|
+
alignItems: "center",
|
|
16
|
+
justifyContent: "center",
|
|
17
|
+
gap: 8,
|
|
18
|
+
paddingVertical: 8,
|
|
16
19
|
paddingHorizontal: 16,
|
|
20
|
+
marginBottom: -1,
|
|
17
21
|
borderBottomWidth: 2,
|
|
18
22
|
borderBottomColor: "transparent",
|
|
19
23
|
backgroundColor: "transparent",
|
|
@@ -25,11 +29,24 @@ export const useTabsVariantLine = (): TabsStyles => {
|
|
|
25
29
|
opacity: 0.5,
|
|
26
30
|
},
|
|
27
31
|
},
|
|
28
|
-
|
|
32
|
+
itemText: {
|
|
29
33
|
default: {
|
|
30
34
|
color: colors.mutedForeground,
|
|
31
35
|
fontSize,
|
|
32
36
|
fontFamily,
|
|
37
|
+
fontWeight: "500",
|
|
38
|
+
},
|
|
39
|
+
active: {
|
|
40
|
+
color: colors.foreground,
|
|
41
|
+
},
|
|
42
|
+
disabled: {
|
|
43
|
+
color: colors.mutedForeground,
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
itemIcon: {
|
|
47
|
+
default: {
|
|
48
|
+
color: colors.mutedForeground,
|
|
49
|
+
size: fontSize,
|
|
33
50
|
},
|
|
34
51
|
active: {
|
|
35
52
|
color: colors.foreground,
|
|
@@ -1,38 +1,37 @@
|
|
|
1
1
|
import React, { useMemo } from "react";
|
|
2
|
-
import { Text } from "react-native";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { useMenu } from "./context";
|
|
6
|
-
|
|
7
|
-
export function useOrganizedChildren(children: React.ReactNode) {
|
|
8
|
-
const menu = useMenu();
|
|
2
|
+
import { Text, type StyleProp, type TextStyle } from "react-native";
|
|
3
|
+
import { Icon, type IconProps } from "../components/icon";
|
|
4
|
+
import { getElementProp } from "../utils/element-utils";
|
|
9
5
|
|
|
6
|
+
export function useOrganizedChildren(
|
|
7
|
+
children: React.ReactNode,
|
|
8
|
+
textStyle: StyleProp<TextStyle> | undefined,
|
|
9
|
+
iconProps: IconProps | undefined,
|
|
10
|
+
): React.ReactNode {
|
|
10
11
|
const organizedChildren = useMemo(() => {
|
|
11
12
|
if (typeof children === "string") {
|
|
12
|
-
return <Text style={
|
|
13
|
+
return <Text style={textStyle}>{children}</Text>;
|
|
13
14
|
}
|
|
14
15
|
if (Array.isArray(children)) {
|
|
15
16
|
return children.map((child, index) => {
|
|
16
17
|
if (typeof child === "string") {
|
|
17
18
|
return (
|
|
18
|
-
<Text key={index} style={
|
|
19
|
+
<Text key={index} style={textStyle}>
|
|
19
20
|
{child}
|
|
20
21
|
</Text>
|
|
21
22
|
);
|
|
22
23
|
} else if (React.isValidElement(child) && child.type === Icon) {
|
|
23
24
|
return React.cloneElement(child as React.ReactElement<any>, {
|
|
24
25
|
key: child.key,
|
|
25
|
-
...
|
|
26
|
-
style: [
|
|
27
|
-
menu.styles?.itemIcon?.style,
|
|
28
|
-
getElementProp(child, "style"),
|
|
29
|
-
],
|
|
26
|
+
...iconProps,
|
|
27
|
+
style: [iconProps?.style, getElementProp(child, "style")],
|
|
30
28
|
});
|
|
31
29
|
}
|
|
32
30
|
return child;
|
|
33
31
|
});
|
|
34
32
|
}
|
|
35
33
|
return children;
|
|
36
|
-
}, [children,
|
|
34
|
+
}, [children, iconProps, textStyle]);
|
|
35
|
+
|
|
37
36
|
return organizedChildren;
|
|
38
37
|
}
|
package/src/themes/provider.tsx
CHANGED
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
} from "react";
|
|
8
8
|
import { useColorScheme } from "react-native";
|
|
9
9
|
import type { ToastVariants } from "../components/toast/variants";
|
|
10
|
-
import type {
|
|
10
|
+
import type { SvgProps } from "../types/props.types";
|
|
11
11
|
import type { DeepPartial } from "../types/util.types";
|
|
12
12
|
import { defaultThemeAssets } from "./default";
|
|
13
13
|
import type {
|
|
@@ -34,10 +34,12 @@ interface ThemeContext {
|
|
|
34
34
|
|
|
35
35
|
export interface ComponentsConfig {
|
|
36
36
|
toast?: {
|
|
37
|
-
icons?: Partial<
|
|
37
|
+
icons?: Partial<
|
|
38
|
+
Record<keyof typeof ToastVariants, React.ComponentType<SvgProps>>
|
|
39
|
+
>;
|
|
38
40
|
};
|
|
39
41
|
menu?: {
|
|
40
|
-
selectionIcon?:
|
|
42
|
+
selectionIcon?: React.ComponentType<SvgProps>;
|
|
41
43
|
};
|
|
42
44
|
}
|
|
43
45
|
|
package/src/types/props.types.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type React from "react";
|
|
1
2
|
import type { ColorValue, StyleProp, TextStyle, ViewStyle } from "react-native";
|
|
2
3
|
|
|
3
4
|
export type PropsWithRender<P> = P & {
|
|
@@ -5,7 +6,7 @@ export type PropsWithRender<P> = P & {
|
|
|
5
6
|
};
|
|
6
7
|
|
|
7
8
|
export type PropsWithRequiredRender<P> = P & {
|
|
8
|
-
render:
|
|
9
|
+
render: React.ComponentType<P>;
|
|
9
10
|
};
|
|
10
11
|
|
|
11
12
|
export type SvgProps = {
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import { calculateComposedStyles } from "../../../utils/calculate-styles.js";
|
|
4
|
-
import React from "react";
|
|
5
|
-
import { Text } from "react-native";
|
|
6
|
-
import { useBadge } from "../context.js";
|
|
7
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
-
export function BadgeLabel(props) {
|
|
9
|
-
const badge = useBadge();
|
|
10
|
-
const composedStyle = calculateComposedStyles(badge.styles, badge.state, "label", props.style);
|
|
11
|
-
const Component = props.render ?? Text;
|
|
12
|
-
return /*#__PURE__*/_jsx(Component, {
|
|
13
|
-
...props,
|
|
14
|
-
style: composedStyle
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
//# sourceMappingURL=badge-label.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["calculateComposedStyles","React","Text","useBadge","jsx","_jsx","BadgeLabel","props","badge","composedStyle","styles","state","style","Component","render"],"sourceRoot":"../../../../../src","sources":["components/badge/components/badge-label.tsx"],"mappings":";;AAAA,SAASA,uBAAuB,QAAQ,oCAAiC;AACzE,OAAOC,KAAK,MAAM,OAAO;AACzB,SAAyBC,IAAI,QAAwB,cAAc;AACnE,SAASC,QAAQ,QAAQ,eAAY;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAUtC,OAAO,SAASC,UAAUA,CAACC,KAAsB,EAAE;EACjD,MAAMC,KAAK,GAAGL,QAAQ,CAAC,CAAC;EAExB,MAAMM,aAAa,GAAGT,uBAAuB,CAACQ,KAAK,CAACE,MAAM,EAAEF,KAAK,CAACG,KAAK,EAAE,OAAO,EAAEJ,KAAK,CAACK,KAAK,CAAC;EAE9F,MAAMC,SAAS,GAAGN,KAAK,CAACO,MAAM,IAAIZ,IAAI;EACtC,oBAAOG,IAAA,CAACQ,SAAS;IAAA,GAAKN,KAAK;IAAEK,KAAK,EAAEH;EAAc,CAAE,CAAC;AACvD","ignoreList":[]}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import { calculateComposedStyles } from "../../../utils/calculate-styles.js";
|
|
4
|
-
import React from "react";
|
|
5
|
-
import { View } from "react-native";
|
|
6
|
-
import { BadgeContext } from "../context.js";
|
|
7
|
-
import { BadgeVariants } from "../variants/index.js";
|
|
8
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
-
export function BadgeRoot(props) {
|
|
10
|
-
const variantStyles = BadgeVariants[props.variant || "default"]();
|
|
11
|
-
const customStyle = props.color ? {
|
|
12
|
-
backgroundColor: props.color
|
|
13
|
-
} : undefined;
|
|
14
|
-
const composedStyle = calculateComposedStyles(variantStyles, "default", "root", props.style);
|
|
15
|
-
const Component = props.render ?? View;
|
|
16
|
-
return /*#__PURE__*/_jsx(BadgeContext.Provider, {
|
|
17
|
-
value: {
|
|
18
|
-
state: "default",
|
|
19
|
-
styles: variantStyles
|
|
20
|
-
},
|
|
21
|
-
children: /*#__PURE__*/_jsx(Component, {
|
|
22
|
-
...props,
|
|
23
|
-
style: [composedStyle, customStyle]
|
|
24
|
-
})
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
//# sourceMappingURL=badge-root.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["calculateComposedStyles","React","View","BadgeContext","BadgeVariants","jsx","_jsx","BadgeRoot","props","variantStyles","variant","customStyle","color","backgroundColor","undefined","composedStyle","style","Component","render","Provider","value","state","styles","children"],"sourceRoot":"../../../../../src","sources":["components/badge/components/badge-root.tsx"],"mappings":";;AACA,SAASA,uBAAuB,QAAQ,oCAAiC;AACzE,OAAOC,KAAK,MAAM,OAAO;AACzB,SAAyBC,IAAI,QAAwB,cAAc;AACnE,SAASC,YAAY,QAAQ,eAAY;AACzC,SAASC,aAAa,QAAQ,sBAAa;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAY5C,OAAO,SAASC,SAASA,CAACC,KAAqB,EAAE;EAC/C,MAAMC,aAAa,GAAGL,aAAa,CAACI,KAAK,CAACE,OAAO,IAAI,SAAS,CAAC,CAAC,CAAC;EAEjE,MAAMC,WAAW,GAAGH,KAAK,CAACI,KAAK,GAAG;IAAEC,eAAe,EAAEL,KAAK,CAACI;EAAM,CAAC,GAAGE,SAAS;EAE9E,MAAMC,aAAa,GAAGf,uBAAuB,CAACS,aAAa,EAAE,SAAS,EAAE,MAAM,EAAED,KAAK,CAACQ,KAAK,CAAC;EAE5F,MAAMC,SAAS,GAAGT,KAAK,CAACU,MAAM,IAAIhB,IAAI;EACtC,oBACEI,IAAA,CAACH,YAAY,CAACgB,QAAQ;IACpBC,KAAK,EAAE;MACLC,KAAK,EAAE,SAAS;MAChBC,MAAM,EAAEb;IACV,CAAE;IAAAc,QAAA,eAEFjB,IAAA,CAACW,SAAS;MAAA,GAAKT,KAAK;MAAEQ,KAAK,EAAE,CAACD,aAAa,EAAEJ,WAAW;IAAE,CAAE;EAAC,CACxC,CAAC;AAE5B","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["React","useMemo","Text","getElementProp","Icon","useMenu","jsx","_jsx","useOrganizedChildren","children","menu","organizedChildren","style","styles","itemText","Array","isArray","map","child","index","isValidElement","type","cloneElement","key","itemIcon"],"sourceRoot":"../../../../src","sources":["components/menu/use-organized-children.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,OAAO,QAAQ,OAAO;AACtC,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,cAAc,QAAQ,8BAA2B;AAC1D,SAASC,IAAI,QAAQ,kBAAS;AAC9B,SAASC,OAAO,QAAQ,cAAW;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAEpC,OAAO,SAASC,oBAAoBA,CAACC,QAAyB,EAAE;EAC9D,MAAMC,IAAI,GAAGL,OAAO,CAAC,CAAC;EAEtB,MAAMM,iBAAiB,GAAGV,OAAO,CAAC,MAAM;IACtC,IAAI,OAAOQ,QAAQ,KAAK,QAAQ,EAAE;MAChC,oBAAOF,IAAA,CAACL,IAAI;QAACU,KAAK,EAAEF,IAAI,CAACG,MAAM,EAAEC,QAAS;QAAAL,QAAA,EAAEA;MAAQ,CAAO,CAAC;IAC9D;IACA,IAAIM,KAAK,CAACC,OAAO,CAACP,QAAQ,CAAC,EAAE;MAC3B,OAAOA,QAAQ,CAACQ,GAAG,CAAC,CAACC,KAAK,EAAEC,KAAK,KAAK;QACpC,IAAI,OAAOD,KAAK,KAAK,QAAQ,EAAE;UAC7B,oBACEX,IAAA,CAACL,IAAI;YAAaU,KAAK,EAAEF,IAAI,CAACG,MAAM,EAAEC,QAAS;YAAAL,QAAA,EAC5CS;UAAK,GADGC,KAEL,CAAC;QAEX,CAAC,MAAM,IAAI,aAAAnB,KAAK,CAACoB,cAAc,CAACF,KAAK,CAAC,IAAIA,KAAK,CAACG,IAAI,KAAKjB,IAAI,EAAE;UAC7D,oBAAOJ,KAAK,CAACsB,YAAY,CAACJ,KAAK,EAA6B;YAC1DK,GAAG,EAAEL,KAAK,CAACK,GAAG;YACd,GAAGb,IAAI,CAACG,MAAM,EAAEW,QAAQ;YACxBZ,KAAK,EAAE,CACLF,IAAI,CAACG,MAAM,EAAEW,QAAQ,EAAEZ,KAAK,EAC5BT,cAAc,CAACe,KAAK,EAAE,OAAO,CAAC;UAElC,CAAC,CAAC;QACJ;QACA,OAAOA,KAAK;MACd,CAAC,CAAC;IACJ;IACA,OAAOT,QAAQ;EACjB,CAAC,EAAE,CAACA,QAAQ,EAAEC,IAAI,CAACG,MAAM,EAAEW,QAAQ,CAAC,CAAC;EACrC,OAAOb,iBAAiB;AAC1B","ignoreList":[]}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import React from "react";
|
|
4
|
-
import { View } from "react-native";
|
|
5
|
-
import { useTabsContext } from "../context.js";
|
|
6
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
-
export function TabsList(props) {
|
|
8
|
-
const {
|
|
9
|
-
children,
|
|
10
|
-
style,
|
|
11
|
-
...viewProps
|
|
12
|
-
} = props;
|
|
13
|
-
const {
|
|
14
|
-
styles
|
|
15
|
-
} = useTabsContext();
|
|
16
|
-
const calculatedStyle = [styles?.list, style];
|
|
17
|
-
return /*#__PURE__*/_jsx(View, {
|
|
18
|
-
...viewProps,
|
|
19
|
-
style: calculatedStyle,
|
|
20
|
-
children: children
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
//# sourceMappingURL=tabs-list.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","useTabsContext","jsx","_jsx","TabsList","props","children","style","viewProps","styles","calculatedStyle","list"],"sourceRoot":"../../../../../src","sources":["components/tabs/components/tabs-list.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAwD,cAAc;AACnF,SAASC,cAAc,QAAQ,eAAY;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAO5C,OAAO,SAASC,QAAQA,CAACC,KAAoB,EAAE;EAC7C,MAAM;IAAEC,QAAQ;IAAEC,KAAK;IAAE,GAAGC;EAAU,CAAC,GAAGH,KAAK;EAC/C,MAAM;IAAEI;EAAO,CAAC,GAAGR,cAAc,CAAC,CAAC;EAEnC,MAAMS,eAAe,GAAG,CAACD,MAAM,EAAEE,IAAI,EAAEJ,KAAK,CAAC;EAE7C,oBACEJ,IAAA,CAACH,IAAI;IAAA,GAAKQ,SAAS;IAAED,KAAK,EAAEG,eAAgB;IAAAJ,QAAA,EACzCA;EAAQ,CACL,CAAC;AAEX","ignoreList":[]}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import React from "react";
|
|
4
|
-
import { Text } from "react-native";
|
|
5
|
-
import { useTabsContext } from "../context.js";
|
|
6
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
-
export function TabsTriggerText(props) {
|
|
8
|
-
const {
|
|
9
|
-
children,
|
|
10
|
-
value: triggerValue,
|
|
11
|
-
isDisabled,
|
|
12
|
-
style,
|
|
13
|
-
...textProps
|
|
14
|
-
} = props;
|
|
15
|
-
const {
|
|
16
|
-
value,
|
|
17
|
-
styles
|
|
18
|
-
} = useTabsContext();
|
|
19
|
-
const isActive = value === triggerValue;
|
|
20
|
-
const state = isDisabled ? "disabled" : isActive ? "active" : "default";
|
|
21
|
-
const calculatedStyle = [styles?.triggerText?.default, styles?.triggerText?.[state], style];
|
|
22
|
-
return /*#__PURE__*/_jsx(Text, {
|
|
23
|
-
...textProps,
|
|
24
|
-
style: calculatedStyle,
|
|
25
|
-
children: children
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
//# sourceMappingURL=tabs-trigger-text.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["React","Text","useTabsContext","jsx","_jsx","TabsTriggerText","props","children","value","triggerValue","isDisabled","style","textProps","styles","isActive","state","calculatedStyle","triggerText","default"],"sourceRoot":"../../../../../src","sources":["components/tabs/components/tabs-trigger-text.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAwD,cAAc;AACnF,SAASC,cAAc,QAAQ,eAAY;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAS5C,OAAO,SAASC,eAAeA,CAACC,KAA2B,EAAE;EAC3D,MAAM;IAAEC,QAAQ;IAAEC,KAAK,EAAEC,YAAY;IAAEC,UAAU;IAAEC,KAAK;IAAE,GAAGC;EAAU,CAAC,GAAGN,KAAK;EAChF,MAAM;IAAEE,KAAK;IAAEK;EAAO,CAAC,GAAGX,cAAc,CAAC,CAAC;EAE1C,MAAMY,QAAQ,GAAGN,KAAK,KAAKC,YAAY;EACvC,MAAMM,KAAK,GAAGL,UAAU,GAAG,UAAU,GAAGI,QAAQ,GAAG,QAAQ,GAAG,SAAS;EAEvE,MAAME,eAAe,GAAG,CAACH,MAAM,EAAEI,WAAW,EAAEC,OAAO,EAAEL,MAAM,EAAEI,WAAW,GAAGF,KAAK,CAAC,EAAEJ,KAAK,CAAC;EAE3F,oBACEP,IAAA,CAACH,IAAI;IAAA,GAAKW,SAAS;IAAED,KAAK,EAAEK,eAAgB;IAAAT,QAAA,EACzCA;EAAQ,CACL,CAAC;AAEX","ignoreList":[]}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import React from "react";
|
|
4
|
-
import { Pressable } from "react-native";
|
|
5
|
-
import { useTabsContext } from "../context.js";
|
|
6
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
-
const calculateState = (isActive, isDisabled) => {
|
|
8
|
-
if (isDisabled) {
|
|
9
|
-
return "disabled";
|
|
10
|
-
}
|
|
11
|
-
if (isActive) {
|
|
12
|
-
return "active";
|
|
13
|
-
}
|
|
14
|
-
return "default";
|
|
15
|
-
};
|
|
16
|
-
export function TabsTrigger(props) {
|
|
17
|
-
const {
|
|
18
|
-
children,
|
|
19
|
-
value: triggerValue,
|
|
20
|
-
isDisabled,
|
|
21
|
-
style,
|
|
22
|
-
...pressableProps
|
|
23
|
-
} = props;
|
|
24
|
-
const {
|
|
25
|
-
value,
|
|
26
|
-
onChange,
|
|
27
|
-
styles
|
|
28
|
-
} = useTabsContext();
|
|
29
|
-
const isActive = value === triggerValue;
|
|
30
|
-
const state = calculateState(isActive, isDisabled);
|
|
31
|
-
const handlePress = () => {
|
|
32
|
-
if (!isDisabled) {
|
|
33
|
-
onChange(triggerValue);
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
const calculatedStyle = [styles?.trigger?.default, styles?.trigger?.[state], style];
|
|
37
|
-
return /*#__PURE__*/_jsx(Pressable, {
|
|
38
|
-
...pressableProps,
|
|
39
|
-
disabled: isDisabled,
|
|
40
|
-
onPress: handlePress,
|
|
41
|
-
style: calculatedStyle,
|
|
42
|
-
children: children
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
//# sourceMappingURL=tabs-trigger.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["React","Pressable","useTabsContext","jsx","_jsx","calculateState","isActive","isDisabled","TabsTrigger","props","children","value","triggerValue","style","pressableProps","onChange","styles","state","handlePress","calculatedStyle","trigger","default","disabled","onPress"],"sourceRoot":"../../../../../src","sources":["components/tabs/components/tabs-trigger.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,SAAS,QAA6D,cAAc;AAC7F,SAASC,cAAc,QAAQ,eAAY;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAU5C,MAAMC,cAAc,GAAGA,CAACC,QAAiB,EAAEC,UAA+B,KAAgB;EACxF,IAAIA,UAAU,EAAE;IACd,OAAO,UAAU;EACnB;EACA,IAAID,QAAQ,EAAE;IACZ,OAAO,QAAQ;EACjB;EACA,OAAO,SAAS;AAClB,CAAC;AAED,OAAO,SAASE,WAAWA,CAACC,KAAuB,EAAE;EACnD,MAAM;IAAEC,QAAQ;IAAEC,KAAK,EAAEC,YAAY;IAAEL,UAAU;IAAEM,KAAK;IAAE,GAAGC;EAAe,CAAC,GAAGL,KAAK;EACrF,MAAM;IAAEE,KAAK;IAAEI,QAAQ;IAAEC;EAAO,CAAC,GAAGd,cAAc,CAAC,CAAC;EAEpD,MAAMI,QAAQ,GAAGK,KAAK,KAAKC,YAAY;EACvC,MAAMK,KAAK,GAAGZ,cAAc,CAACC,QAAQ,EAAEC,UAAU,CAAC;EAElD,MAAMW,WAAW,GAAGA,CAAA,KAAM;IACxB,IAAI,CAACX,UAAU,EAAE;MACfQ,QAAQ,CAACH,YAAY,CAAC;IACxB;EACF,CAAC;EAED,MAAMO,eAAe,GAAG,CAACH,MAAM,EAAEI,OAAO,EAAEC,OAAO,EAAEL,MAAM,EAAEI,OAAO,GAAGH,KAAK,CAAC,EAAEJ,KAAK,CAAC;EAEnF,oBACET,IAAA,CAACH,SAAS;IAAA,GAAKa,cAAc;IAAEQ,QAAQ,EAAEf,UAAW;IAACgB,OAAO,EAAEL,WAAY;IAACL,KAAK,EAAEM,eAAgB;IAAAT,QAAA,EAC/FA;EAAQ,CACA,CAAC;AAEhB","ignoreList":[]}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { type StyleProp, type TextStyle } from "react-native";
|
|
3
|
-
export interface BadgeLabelProps {
|
|
4
|
-
children?: string;
|
|
5
|
-
render?: (props: BadgeLabelProps) => React.ReactNode;
|
|
6
|
-
style?: StyleProp<TextStyle>;
|
|
7
|
-
}
|
|
8
|
-
export declare function BadgeLabel(props: BadgeLabelProps): React.JSX.Element;
|
|
9
|
-
//# sourceMappingURL=badge-label.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"badge-label.d.ts","sourceRoot":"","sources":["../../../../../../src/components/badge/components/badge-label.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,SAAS,EAAQ,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAGpE,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,KAAK,CAAC,SAAS,CAAC;IAErD,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,qBAOhD"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { ElementChildren } from "../../../types/element.types";
|
|
2
|
-
import React from "react";
|
|
3
|
-
import { type StyleProp, type ViewStyle } from "react-native";
|
|
4
|
-
import { BadgeVariants } from "../variants";
|
|
5
|
-
export interface BadgeRootProps {
|
|
6
|
-
variant?: keyof typeof BadgeVariants;
|
|
7
|
-
color?: string;
|
|
8
|
-
children?: ElementChildren;
|
|
9
|
-
render?: (props: BadgeRootProps) => React.ReactNode;
|
|
10
|
-
style?: StyleProp<ViewStyle>;
|
|
11
|
-
}
|
|
12
|
-
export declare function BadgeRoot(props: BadgeRootProps): React.JSX.Element;
|
|
13
|
-
//# sourceMappingURL=badge-root.d.ts.map
|