@particle-network/ui-native 0.0.2
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/README.md +57 -0
- package/dist/components/ProgressWrapper/index.d.ts +35 -0
- package/dist/components/ProgressWrapper/index.js +120 -0
- package/dist/components/Text/index.d.ts +2 -0
- package/dist/components/Text/index.js +2 -0
- package/dist/components/Text/text.d.ts +4 -0
- package/dist/components/Text/text.js +196 -0
- package/dist/components/Text/text.types.d.ts +109 -0
- package/dist/components/Text/text.types.js +77 -0
- package/dist/components/UXButton/button.d.ts +3 -0
- package/dist/components/UXButton/button.js +74 -0
- package/dist/components/UXButton/button.styles.d.ts +53 -0
- package/dist/components/UXButton/button.styles.js +157 -0
- package/dist/components/UXButton/button.types.d.ts +18 -0
- package/dist/components/UXButton/button.types.js +0 -0
- package/dist/components/UXButton/index.d.ts +2 -0
- package/dist/components/UXButton/index.js +1 -0
- package/dist/components/UXCheckbox/checkbox-group.d.ts +8 -0
- package/dist/components/UXCheckbox/checkbox-group.js +30 -0
- package/dist/components/UXCheckbox/checkbox.d.ts +10 -0
- package/dist/components/UXCheckbox/checkbox.js +78 -0
- package/dist/components/UXCheckbox/context.d.ts +8 -0
- package/dist/components/UXCheckbox/context.js +8 -0
- package/dist/components/UXCheckbox/index.d.ts +4 -0
- package/dist/components/UXCheckbox/index.js +3 -0
- package/dist/components/UXCheckbox/types.d.ts +6 -0
- package/dist/components/UXCheckbox/types.js +0 -0
- package/dist/components/UXChip/chip.d.ts +3 -0
- package/dist/components/UXChip/chip.js +48 -0
- package/dist/components/UXChip/index.d.ts +2 -0
- package/dist/components/UXChip/index.js +1 -0
- package/dist/components/UXChip/styles.d.ts +24 -0
- package/dist/components/UXChip/styles.js +70 -0
- package/dist/components/UXChip/types.d.ts +11 -0
- package/dist/components/UXChip/types.js +0 -0
- package/dist/components/UXDivider/index.d.ts +8 -0
- package/dist/components/UXDivider/index.js +34 -0
- package/dist/components/UXHint/index.d.ts +7 -0
- package/dist/components/UXHint/index.js +19 -0
- package/dist/components/UXModal/index.d.ts +24 -0
- package/dist/components/UXModal/index.js +271 -0
- package/dist/components/UXPressable/index.d.ts +4 -0
- package/dist/components/UXPressable/index.js +36 -0
- package/dist/components/UXRadio/context.d.ts +7 -0
- package/dist/components/UXRadio/context.js +10 -0
- package/dist/components/UXRadio/index.d.ts +2 -0
- package/dist/components/UXRadio/index.js +2 -0
- package/dist/components/UXRadio/radio-group.d.ts +5 -0
- package/dist/components/UXRadio/radio-group.js +21 -0
- package/dist/components/UXRadio/radio.d.ts +5 -0
- package/dist/components/UXRadio/radio.js +67 -0
- package/dist/components/UXRadio/types.d.ts +10 -0
- package/dist/components/UXRadio/types.js +0 -0
- package/dist/components/UXSwitch/index.d.ts +2 -0
- package/dist/components/UXSwitch/index.js +1 -0
- package/dist/components/UXSwitch/styles.d.ts +16 -0
- package/dist/components/UXSwitch/styles.js +58 -0
- package/dist/components/UXSwitch/switch.d.ts +3 -0
- package/dist/components/UXSwitch/switch.js +103 -0
- package/dist/components/UXSwitch/types.d.ts +11 -0
- package/dist/components/UXSwitch/types.js +0 -0
- package/dist/components/UXTabs/context.d.ts +5 -0
- package/dist/components/UXTabs/context.js +8 -0
- package/dist/components/UXTabs/index.d.ts +4 -0
- package/dist/components/UXTabs/index.js +3 -0
- package/dist/components/UXTabs/styles.d.ts +30 -0
- package/dist/components/UXTabs/styles.js +191 -0
- package/dist/components/UXTabs/tab.d.ts +3 -0
- package/dist/components/UXTabs/tab.js +55 -0
- package/dist/components/UXTabs/tabs.d.ts +3 -0
- package/dist/components/UXTabs/tabs.js +66 -0
- package/dist/components/UXTabs/types.d.ts +23 -0
- package/dist/components/UXTabs/types.js +0 -0
- package/dist/components/UXTooltip/index.d.ts +6 -0
- package/dist/components/UXTooltip/index.js +32 -0
- package/dist/components/UXTouchableOpacity/index.d.ts +4 -0
- package/dist/components/UXTouchableOpacity/index.js +24 -0
- package/dist/components/index.d.ts +22 -0
- package/dist/components/index.js +22 -0
- package/dist/components/input/index.d.ts +3 -0
- package/dist/components/input/index.js +2 -0
- package/dist/components/input/input.d.ts +3 -0
- package/dist/components/input/input.js +138 -0
- package/dist/components/input/number-input.d.ts +3 -0
- package/dist/components/input/number-input.js +231 -0
- package/dist/components/input/styles.d.ts +31 -0
- package/dist/components/input/styles.js +102 -0
- package/dist/components/input/types.d.ts +61 -0
- package/dist/components/input/types.js +0 -0
- package/dist/components/layout/Box/box.d.ts +12 -0
- package/dist/components/layout/Box/box.js +89 -0
- package/dist/components/layout/Box/index.d.ts +3 -0
- package/dist/components/layout/Box/index.js +2 -0
- package/dist/components/layout/Box/useBox.style.d.ts +3 -0
- package/dist/components/layout/Box/useBox.style.js +141 -0
- package/dist/components/layout/Box/useBox.type.d.ts +292 -0
- package/dist/components/layout/Box/useBox.type.js +0 -0
- package/dist/components/layout/Center.d.ts +5 -0
- package/dist/components/layout/Center.js +10 -0
- package/dist/components/layout/Circle.d.ts +7 -0
- package/dist/components/layout/Circle.js +14 -0
- package/dist/components/layout/Flex/flex.d.ts +6 -0
- package/dist/components/layout/Flex/flex.js +33 -0
- package/dist/components/layout/Flex/index.d.ts +4 -0
- package/dist/components/layout/Flex/index.js +3 -0
- package/dist/components/layout/Flex/useFlex.style.d.ts +3 -0
- package/dist/components/layout/Flex/useFlex.style.js +122 -0
- package/dist/components/layout/Flex/useFlex.type.d.ts +65 -0
- package/dist/components/layout/Flex/useFlex.type.js +0 -0
- package/dist/components/layout/Flex/useFlexBox.style.d.ts +134 -0
- package/dist/components/layout/Flex/useFlexBox.style.js +26 -0
- package/dist/components/layout/HStack.d.ts +5 -0
- package/dist/components/layout/HStack.js +11 -0
- package/dist/components/layout/Square.d.ts +9 -0
- package/dist/components/layout/Square.js +14 -0
- package/dist/components/layout/VStack.d.ts +5 -0
- package/dist/components/layout/VStack.js +14 -0
- package/dist/hooks/index.d.ts +5 -0
- package/dist/hooks/index.js +5 -0
- package/dist/hooks/useColors.d.ts +7 -0
- package/dist/hooks/useColors.js +18 -0
- package/dist/hooks/useKeyboard.d.ts +4 -0
- package/dist/hooks/useKeyboard.js +29 -0
- package/dist/hooks/useRadius.d.ts +7 -0
- package/dist/hooks/useRadius.js +16 -0
- package/dist/hooks/useSpacing.d.ts +7 -0
- package/dist/hooks/useSpacing.js +16 -0
- package/dist/hooks/useTheme.d.ts +5 -0
- package/dist/hooks/useTheme.js +6 -0
- package/dist/icons/CheckboxOffIcon.d.ts +4 -0
- package/dist/icons/CheckboxOffIcon.js +21 -0
- package/dist/icons/CheckboxOnIcon.d.ts +4 -0
- package/dist/icons/CheckboxOnIcon.js +26 -0
- package/dist/icons/DotIcon.d.ts +4 -0
- package/dist/icons/DotIcon.js +23 -0
- package/dist/icons/QuestionIcon.d.ts +4 -0
- package/dist/icons/QuestionIcon.js +30 -0
- package/dist/icons/RadioOffIcon.d.ts +4 -0
- package/dist/icons/RadioOffIcon.js +22 -0
- package/dist/icons/RadioOnIcon.d.ts +4 -0
- package/dist/icons/RadioOnIcon.js +42 -0
- package/dist/icons/types.d.ts +6 -0
- package/dist/icons/types.js +0 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +4 -0
- package/dist/provider/ThemeContext.d.ts +3 -0
- package/dist/provider/ThemeContext.js +15 -0
- package/dist/provider/ThemeProvider.d.ts +10 -0
- package/dist/provider/ThemeProvider.js +31 -0
- package/dist/provider/index.d.ts +2 -0
- package/dist/provider/index.js +2 -0
- package/dist/theme/colors.d.ts +6 -0
- package/dist/theme/colors.js +17 -0
- package/dist/theme/index.d.ts +7 -0
- package/dist/theme/index.js +16 -0
- package/dist/theme/opacity.d.ts +2 -0
- package/dist/theme/opacity.js +3 -0
- package/dist/theme/radius.d.ts +3 -0
- package/dist/theme/radius.js +10 -0
- package/dist/theme/spacing.d.ts +3 -0
- package/dist/theme/spacing.js +10 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +0 -0
- package/dist/types/theme.d.ts +17 -0
- package/dist/types/theme.js +0 -0
- package/dist/utils/triggerHapticFeedback.d.ts +5 -0
- package/dist/utils/triggerHapticFeedback.js +16 -0
- package/package.json +110 -0
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import type { FlexStyle } from 'react-native';
|
|
2
|
+
import type { SpacingType } from '@particle-network/ui-shared';
|
|
3
|
+
export interface UseFlexProps {
|
|
4
|
+
/**
|
|
5
|
+
* Shorthand for the `flex` style property.
|
|
6
|
+
* If `true` is passed, the `flex` style property will be set to `1`.
|
|
7
|
+
*/
|
|
8
|
+
fill?: boolean | number;
|
|
9
|
+
/**
|
|
10
|
+
* Shorthand for `{ flexDirection: "row" }`.
|
|
11
|
+
*/
|
|
12
|
+
inline?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Shorthand for the `{ flexDirection: "column" }` style property.
|
|
15
|
+
*/
|
|
16
|
+
vertical?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Shorthand for `{ justifyContent: "center", alignItems: "center" }`.
|
|
19
|
+
*/
|
|
20
|
+
center?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* `gap` style property.
|
|
23
|
+
*/
|
|
24
|
+
gap?: SpacingType;
|
|
25
|
+
/**
|
|
26
|
+
* Shorthand for the `flexDirection` style property.
|
|
27
|
+
* 'col' | 'col-reverse' is the same as 'column' | 'column-reverse', 兼容 web Flex 写法
|
|
28
|
+
*/
|
|
29
|
+
direction?: FlexStyle['flexDirection'] | 'col' | 'col-reverse';
|
|
30
|
+
/**
|
|
31
|
+
* Shorthand for the `justifyContent` style property.
|
|
32
|
+
* If `center` prop is set to `true`, `justifyContent` will be forced to `center`.
|
|
33
|
+
*/
|
|
34
|
+
justify?: 'start' | 'end' | 'center' | 'between' | 'around' | 'evenly';
|
|
35
|
+
/**
|
|
36
|
+
* Shorthand for the `alignItems` style property.
|
|
37
|
+
* If `center` prop is set to `true`, `alignItems` will be forced to `center`.
|
|
38
|
+
*/
|
|
39
|
+
items?: 'start' | 'end' | 'center' | 'stretch' | 'baseline';
|
|
40
|
+
/**
|
|
41
|
+
* Shorthand for the `alignSelf` style property.
|
|
42
|
+
*/
|
|
43
|
+
self?: 'auto' | 'start' | 'end' | 'center' | 'stretch' | 'baseline';
|
|
44
|
+
/**
|
|
45
|
+
* Shorthand for the `alignContent` style property.
|
|
46
|
+
*/
|
|
47
|
+
content?: 'start' | 'end' | 'center' | 'stretch' | 'between' | 'around';
|
|
48
|
+
/**
|
|
49
|
+
* Shorthand for the `flexWrap` style property.
|
|
50
|
+
* If `true` is passed, the `flexWrap` style property will be set to `wrap`.
|
|
51
|
+
*/
|
|
52
|
+
wrap?: boolean | FlexStyle['flexWrap'];
|
|
53
|
+
/**
|
|
54
|
+
* Shorthand for the `flexBasis` style property.
|
|
55
|
+
*/
|
|
56
|
+
basis?: FlexStyle['flexBasis'];
|
|
57
|
+
/**
|
|
58
|
+
* Shorthand for the `flexGrow` style property.
|
|
59
|
+
*/
|
|
60
|
+
grow?: FlexStyle['flexGrow'];
|
|
61
|
+
/**
|
|
62
|
+
* Shorthand for the `flexShrink` style property.
|
|
63
|
+
*/
|
|
64
|
+
shrink?: FlexStyle['flexShrink'];
|
|
65
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { type UseBoxProps, type UseFlexProps } from '../..';
|
|
2
|
+
export declare const useFlexBoxStyle: (props: UseFlexProps & UseBoxProps) => {
|
|
3
|
+
backfaceVisibility?: "visible" | "hidden" | undefined;
|
|
4
|
+
backgroundColor?: import("react-native").ColorValue | undefined;
|
|
5
|
+
borderBlockColor?: import("react-native").ColorValue | undefined;
|
|
6
|
+
borderBlockEndColor?: import("react-native").ColorValue | undefined;
|
|
7
|
+
borderBlockStartColor?: import("react-native").ColorValue | undefined;
|
|
8
|
+
borderBottomColor?: import("react-native").ColorValue | undefined;
|
|
9
|
+
borderBottomEndRadius?: import("react-native").AnimatableNumericValue | string | undefined;
|
|
10
|
+
borderBottomLeftRadius?: import("react-native").AnimatableNumericValue | string | undefined;
|
|
11
|
+
borderBottomRightRadius?: import("react-native").AnimatableNumericValue | string | undefined;
|
|
12
|
+
borderBottomStartRadius?: import("react-native").AnimatableNumericValue | string | undefined;
|
|
13
|
+
borderColor?: import("react-native").ColorValue | undefined;
|
|
14
|
+
borderCurve?: "circular" | "continuous" | undefined;
|
|
15
|
+
borderEndColor?: import("react-native").ColorValue | undefined;
|
|
16
|
+
borderEndEndRadius?: import("react-native").AnimatableNumericValue | string | undefined;
|
|
17
|
+
borderEndStartRadius?: import("react-native").AnimatableNumericValue | string | undefined;
|
|
18
|
+
borderLeftColor?: import("react-native").ColorValue | undefined;
|
|
19
|
+
borderRadius?: import("react-native").AnimatableNumericValue | string | undefined;
|
|
20
|
+
borderRightColor?: import("react-native").ColorValue | undefined;
|
|
21
|
+
borderStartColor?: import("react-native").ColorValue | undefined;
|
|
22
|
+
borderStartEndRadius?: import("react-native").AnimatableNumericValue | string | undefined;
|
|
23
|
+
borderStartStartRadius?: import("react-native").AnimatableNumericValue | string | undefined;
|
|
24
|
+
borderStyle?: "solid" | "dotted" | "dashed" | undefined;
|
|
25
|
+
borderTopColor?: import("react-native").ColorValue | undefined;
|
|
26
|
+
borderTopEndRadius?: import("react-native").AnimatableNumericValue | string | undefined;
|
|
27
|
+
borderTopLeftRadius?: import("react-native").AnimatableNumericValue | string | undefined;
|
|
28
|
+
borderTopRightRadius?: import("react-native").AnimatableNumericValue | string | undefined;
|
|
29
|
+
borderTopStartRadius?: import("react-native").AnimatableNumericValue | string | undefined;
|
|
30
|
+
outlineColor?: import("react-native").ColorValue | undefined;
|
|
31
|
+
outlineOffset?: import("react-native").AnimatableNumericValue | undefined;
|
|
32
|
+
outlineStyle?: "solid" | "dotted" | "dashed" | undefined;
|
|
33
|
+
outlineWidth?: import("react-native").AnimatableNumericValue | undefined;
|
|
34
|
+
opacity?: import("react-native").AnimatableNumericValue | undefined;
|
|
35
|
+
elevation?: number | undefined;
|
|
36
|
+
pointerEvents?: "box-none" | "none" | "box-only" | "auto" | undefined;
|
|
37
|
+
isolation?: "auto" | "isolate" | undefined;
|
|
38
|
+
cursor?: import("react-native").CursorValue | undefined;
|
|
39
|
+
boxShadow?: ReadonlyArray<import("react-native").BoxShadowValue> | string | undefined;
|
|
40
|
+
filter?: ReadonlyArray<import("react-native").FilterFunction> | string | undefined;
|
|
41
|
+
mixBlendMode?: import("react-native").BlendMode | undefined;
|
|
42
|
+
experimental_backgroundImage?: ReadonlyArray<import("react-native").GradientValue> | string | undefined;
|
|
43
|
+
alignContent?: "flex-start" | "flex-end" | "center" | "stretch" | "space-between" | "space-around" | "space-evenly" | undefined;
|
|
44
|
+
alignItems?: import("react-native").FlexAlignType | undefined;
|
|
45
|
+
alignSelf?: "auto" | import("react-native").FlexAlignType | undefined;
|
|
46
|
+
aspectRatio?: number | string | undefined;
|
|
47
|
+
borderBottomWidth?: number | undefined;
|
|
48
|
+
borderEndWidth?: number | undefined;
|
|
49
|
+
borderLeftWidth?: number | undefined;
|
|
50
|
+
borderRightWidth?: number | undefined;
|
|
51
|
+
borderStartWidth?: number | undefined;
|
|
52
|
+
borderTopWidth?: number | undefined;
|
|
53
|
+
borderWidth?: number | undefined;
|
|
54
|
+
bottom?: import("react-native").DimensionValue | undefined;
|
|
55
|
+
boxSizing?: "border-box" | "content-box" | undefined;
|
|
56
|
+
display?: "none" | "flex" | "contents" | undefined;
|
|
57
|
+
end?: import("react-native").DimensionValue | undefined;
|
|
58
|
+
flex?: number | undefined;
|
|
59
|
+
flexBasis?: import("react-native").DimensionValue | undefined;
|
|
60
|
+
flexDirection?: "row" | "column" | "row-reverse" | "column-reverse" | undefined;
|
|
61
|
+
rowGap?: number | string | undefined;
|
|
62
|
+
gap?: number | string | undefined;
|
|
63
|
+
columnGap?: number | string | undefined;
|
|
64
|
+
flexGrow?: number | undefined;
|
|
65
|
+
flexShrink?: number | undefined;
|
|
66
|
+
flexWrap?: "wrap" | "nowrap" | "wrap-reverse" | undefined;
|
|
67
|
+
height?: import("react-native").DimensionValue | undefined;
|
|
68
|
+
justifyContent?: "flex-start" | "flex-end" | "center" | "space-between" | "space-around" | "space-evenly" | undefined;
|
|
69
|
+
left?: import("react-native").DimensionValue | undefined;
|
|
70
|
+
margin?: import("react-native").DimensionValue | undefined;
|
|
71
|
+
marginBottom?: import("react-native").DimensionValue | undefined;
|
|
72
|
+
marginEnd?: import("react-native").DimensionValue | undefined;
|
|
73
|
+
marginHorizontal?: import("react-native").DimensionValue | undefined;
|
|
74
|
+
marginLeft?: import("react-native").DimensionValue | undefined;
|
|
75
|
+
marginRight?: import("react-native").DimensionValue | undefined;
|
|
76
|
+
marginStart?: import("react-native").DimensionValue | undefined;
|
|
77
|
+
marginTop?: import("react-native").DimensionValue | undefined;
|
|
78
|
+
marginVertical?: import("react-native").DimensionValue | undefined;
|
|
79
|
+
maxHeight?: import("react-native").DimensionValue | undefined;
|
|
80
|
+
maxWidth?: import("react-native").DimensionValue | undefined;
|
|
81
|
+
minHeight?: import("react-native").DimensionValue | undefined;
|
|
82
|
+
minWidth?: import("react-native").DimensionValue | undefined;
|
|
83
|
+
overflow?: "visible" | "hidden" | "scroll" | undefined;
|
|
84
|
+
padding?: import("react-native").DimensionValue | undefined;
|
|
85
|
+
paddingBottom?: import("react-native").DimensionValue | undefined;
|
|
86
|
+
paddingEnd?: import("react-native").DimensionValue | undefined;
|
|
87
|
+
paddingHorizontal?: import("react-native").DimensionValue | undefined;
|
|
88
|
+
paddingLeft?: import("react-native").DimensionValue | undefined;
|
|
89
|
+
paddingRight?: import("react-native").DimensionValue | undefined;
|
|
90
|
+
paddingStart?: import("react-native").DimensionValue | undefined;
|
|
91
|
+
paddingTop?: import("react-native").DimensionValue | undefined;
|
|
92
|
+
paddingVertical?: import("react-native").DimensionValue | undefined;
|
|
93
|
+
position?: "absolute" | "relative" | "static" | undefined;
|
|
94
|
+
right?: import("react-native").DimensionValue | undefined;
|
|
95
|
+
start?: import("react-native").DimensionValue | undefined;
|
|
96
|
+
top?: import("react-native").DimensionValue | undefined;
|
|
97
|
+
width?: import("react-native").DimensionValue | undefined;
|
|
98
|
+
zIndex?: number | undefined;
|
|
99
|
+
direction?: "inherit" | "ltr" | "rtl" | undefined;
|
|
100
|
+
inset?: import("react-native").DimensionValue | undefined;
|
|
101
|
+
insetBlock?: import("react-native").DimensionValue | undefined;
|
|
102
|
+
insetBlockEnd?: import("react-native").DimensionValue | undefined;
|
|
103
|
+
insetBlockStart?: import("react-native").DimensionValue | undefined;
|
|
104
|
+
insetInline?: import("react-native").DimensionValue | undefined;
|
|
105
|
+
insetInlineEnd?: import("react-native").DimensionValue | undefined;
|
|
106
|
+
insetInlineStart?: import("react-native").DimensionValue | undefined;
|
|
107
|
+
marginBlock?: import("react-native").DimensionValue | undefined;
|
|
108
|
+
marginBlockEnd?: import("react-native").DimensionValue | undefined;
|
|
109
|
+
marginBlockStart?: import("react-native").DimensionValue | undefined;
|
|
110
|
+
marginInline?: import("react-native").DimensionValue | undefined;
|
|
111
|
+
marginInlineEnd?: import("react-native").DimensionValue | undefined;
|
|
112
|
+
marginInlineStart?: import("react-native").DimensionValue | undefined;
|
|
113
|
+
paddingBlock?: import("react-native").DimensionValue | undefined;
|
|
114
|
+
paddingBlockEnd?: import("react-native").DimensionValue | undefined;
|
|
115
|
+
paddingBlockStart?: import("react-native").DimensionValue | undefined;
|
|
116
|
+
paddingInline?: import("react-native").DimensionValue | undefined;
|
|
117
|
+
paddingInlineEnd?: import("react-native").DimensionValue | undefined;
|
|
118
|
+
paddingInlineStart?: import("react-native").DimensionValue | undefined;
|
|
119
|
+
shadowColor?: import("react-native").ColorValue | undefined;
|
|
120
|
+
shadowOffset?: Readonly<{
|
|
121
|
+
width: number;
|
|
122
|
+
height: number;
|
|
123
|
+
}> | undefined;
|
|
124
|
+
shadowOpacity?: import("react-native").AnimatableNumericValue | undefined;
|
|
125
|
+
shadowRadius?: number | undefined;
|
|
126
|
+
transform?: Readonly<import("react-native").MaximumOneOf<import("react-native").PerspectiveTransform & 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>[]> | string | undefined;
|
|
127
|
+
transformOrigin?: Array<string | number> | string | undefined;
|
|
128
|
+
transformMatrix?: Array<number> | undefined;
|
|
129
|
+
rotation?: import("react-native").AnimatableNumericValue | undefined;
|
|
130
|
+
scaleX?: import("react-native").AnimatableNumericValue | undefined;
|
|
131
|
+
scaleY?: import("react-native").AnimatableNumericValue | undefined;
|
|
132
|
+
translateX?: import("react-native").AnimatableNumericValue | undefined;
|
|
133
|
+
translateY?: import("react-native").AnimatableNumericValue | undefined;
|
|
134
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { useBoxStyle, useFlexStyle } from "../../index.js";
|
|
2
|
+
const useFlexBoxStyle = (props)=>{
|
|
3
|
+
const { fill, vertical, gap, inline, center, direction = 'row', justify, items, self, content, wrap, basis, grow, shrink, ...boxProps } = props;
|
|
4
|
+
const flexStyle = useFlexStyle({
|
|
5
|
+
fill,
|
|
6
|
+
vertical,
|
|
7
|
+
gap,
|
|
8
|
+
inline,
|
|
9
|
+
center,
|
|
10
|
+
direction,
|
|
11
|
+
justify,
|
|
12
|
+
items,
|
|
13
|
+
self,
|
|
14
|
+
content,
|
|
15
|
+
wrap,
|
|
16
|
+
basis,
|
|
17
|
+
grow,
|
|
18
|
+
shrink
|
|
19
|
+
});
|
|
20
|
+
const boxStyle = useBoxStyle(boxProps);
|
|
21
|
+
return {
|
|
22
|
+
...flexStyle,
|
|
23
|
+
...boxStyle
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
export { useFlexBoxStyle };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { View } from 'react-native';
|
|
3
|
+
import { type FlexProps } from '..';
|
|
4
|
+
export type HStackProps = Omit<FlexProps, 'direction' | 'vertical' | 'inline'>;
|
|
5
|
+
export declare const HStack: React.ForwardRefExoticComponent<HStackProps & React.RefAttributes<View>>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { Flex } from "../index.js";
|
|
4
|
+
const HStack = /*#__PURE__*/ forwardRef((props, ref)=>/*#__PURE__*/ jsx(Flex, {
|
|
5
|
+
ref: ref,
|
|
6
|
+
direction: "row",
|
|
7
|
+
items: "center",
|
|
8
|
+
...props
|
|
9
|
+
}));
|
|
10
|
+
HStack.displayName = 'UXHStack';
|
|
11
|
+
export { HStack };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { View } from 'react-native';
|
|
3
|
+
import { type CenterProps } from '..';
|
|
4
|
+
export type SquareProps = Omit<CenterProps, 'w' | 'h'> & {
|
|
5
|
+
size?: number;
|
|
6
|
+
};
|
|
7
|
+
export declare const Square: React.ForwardRefExoticComponent<Omit<CenterProps, "h" | "w"> & {
|
|
8
|
+
size?: number;
|
|
9
|
+
} & React.RefAttributes<View>>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { Center } from "../index.js";
|
|
4
|
+
const Square = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
5
|
+
const { size, ...restProps } = props;
|
|
6
|
+
return /*#__PURE__*/ jsx(Center, {
|
|
7
|
+
ref: ref,
|
|
8
|
+
h: size,
|
|
9
|
+
w: size,
|
|
10
|
+
...restProps
|
|
11
|
+
});
|
|
12
|
+
});
|
|
13
|
+
Square.displayName = 'UXSquare';
|
|
14
|
+
export { Square };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { View } from 'react-native';
|
|
3
|
+
import { type FlexProps } from '..';
|
|
4
|
+
export type VStackProps = Omit<FlexProps, 'direction' | 'vertical' | 'inline'>;
|
|
5
|
+
export declare const VStack: React.ForwardRefExoticComponent<VStackProps & React.RefAttributes<View>>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { Flex } from "../index.js";
|
|
4
|
+
const VStack = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
5
|
+
const { items = 'stretch', ...restProps } = props;
|
|
6
|
+
return /*#__PURE__*/ jsx(Flex, {
|
|
7
|
+
ref: ref,
|
|
8
|
+
vertical: true,
|
|
9
|
+
items: items,
|
|
10
|
+
...restProps
|
|
11
|
+
});
|
|
12
|
+
});
|
|
13
|
+
VStack.displayName = 'UXVStack';
|
|
14
|
+
export { VStack };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { useCallback } from "react";
|
|
2
|
+
import { setColorWithOpacity } from "@particle-network/ui-shared";
|
|
3
|
+
import { useTheme } from "./useTheme.js";
|
|
4
|
+
function useColors() {
|
|
5
|
+
const theme = useTheme();
|
|
6
|
+
const getColor = useCallback((name, opacity)=>{
|
|
7
|
+
if (!name) return;
|
|
8
|
+
const colorValue = theme.colors[name];
|
|
9
|
+
if ('number' == typeof opacity && opacity >= 0 && opacity <= 1) return setColorWithOpacity(colorValue, opacity);
|
|
10
|
+
return colorValue;
|
|
11
|
+
}, [
|
|
12
|
+
theme.colors
|
|
13
|
+
]);
|
|
14
|
+
return {
|
|
15
|
+
getColor
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
export { useColors };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { useEffect, useState } from "react";
|
|
2
|
+
import { Keyboard, Platform } from "react-native";
|
|
3
|
+
import useDebounce from "ahooks/es/useDebounce";
|
|
4
|
+
function useKeyboard() {
|
|
5
|
+
const [keyboardHeight, setKeyboardHeight] = useState(0);
|
|
6
|
+
const [isKeyboardVisible, setIsKeyboardVisible] = useState(false);
|
|
7
|
+
const keyboardHeightDebounce = useDebounce(keyboardHeight, {
|
|
8
|
+
wait: 200
|
|
9
|
+
});
|
|
10
|
+
useEffect(()=>{
|
|
11
|
+
const showListener = Keyboard.addListener('ios' === Platform.OS ? 'keyboardWillShow' : 'keyboardDidShow', (event)=>{
|
|
12
|
+
setKeyboardHeight(event.endCoordinates.height);
|
|
13
|
+
setIsKeyboardVisible(true);
|
|
14
|
+
});
|
|
15
|
+
const hideListener = Keyboard.addListener('ios' === Platform.OS ? 'keyboardWillHide' : 'keyboardDidHide', ()=>{
|
|
16
|
+
setKeyboardHeight(0);
|
|
17
|
+
setIsKeyboardVisible(false);
|
|
18
|
+
});
|
|
19
|
+
return ()=>{
|
|
20
|
+
showListener.remove();
|
|
21
|
+
hideListener.remove();
|
|
22
|
+
};
|
|
23
|
+
}, []);
|
|
24
|
+
return {
|
|
25
|
+
keyboardHeight: keyboardHeightDebounce,
|
|
26
|
+
isKeyboardVisible
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
export { useKeyboard };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { useCallback } from "react";
|
|
2
|
+
import { useTheme } from "./useTheme.js";
|
|
3
|
+
function useRadius() {
|
|
4
|
+
const theme = useTheme();
|
|
5
|
+
const getRadius = useCallback((size)=>{
|
|
6
|
+
if (!size) return;
|
|
7
|
+
if ('number' == typeof size) return size;
|
|
8
|
+
return theme.radius[size];
|
|
9
|
+
}, [
|
|
10
|
+
theme.radius
|
|
11
|
+
]);
|
|
12
|
+
return {
|
|
13
|
+
getRadius
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
export { useRadius };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { useCallback } from "react";
|
|
2
|
+
import { useTheme } from "./useTheme.js";
|
|
3
|
+
function useSpacing() {
|
|
4
|
+
const theme = useTheme();
|
|
5
|
+
const getSpacing = useCallback((size)=>{
|
|
6
|
+
if (void 0 === size) return;
|
|
7
|
+
if ('number' == typeof size) return size;
|
|
8
|
+
return theme.spacing[size];
|
|
9
|
+
}, [
|
|
10
|
+
theme.spacing
|
|
11
|
+
]);
|
|
12
|
+
return {
|
|
13
|
+
getSpacing
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
export { useSpacing };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import react_native_svg, { Path } from "react-native-svg";
|
|
4
|
+
import { useColors } from "../hooks/index.js";
|
|
5
|
+
const CheckboxOffIcon_CheckboxOffIcon = ({ size = 16, color = 'default', ...props })=>{
|
|
6
|
+
const { getColor } = useColors();
|
|
7
|
+
return /*#__PURE__*/ jsx(react_native_svg, {
|
|
8
|
+
fill: "none",
|
|
9
|
+
height: size,
|
|
10
|
+
viewBox: "0 0 16 16",
|
|
11
|
+
width: size,
|
|
12
|
+
...props,
|
|
13
|
+
children: /*#__PURE__*/ jsx(Path, {
|
|
14
|
+
d: "M2.46191 0.615234H13.5381C14.5577 0.615234 15.3848 1.44231 15.3848 2.46191V13.5381C15.3848 14.5577 14.5577 15.3848 13.5381 15.3848H2.46191C1.44231 15.3848 0.615234 14.5577 0.615234 13.5381V2.46191C0.615234 1.44231 1.44231 0.615234 2.46191 0.615234Z",
|
|
15
|
+
stroke: getColor(color),
|
|
16
|
+
strokeWidth: 1.23077
|
|
17
|
+
})
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
const CheckboxOffIcon = CheckboxOffIcon_CheckboxOffIcon;
|
|
21
|
+
export { CheckboxOffIcon as default };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import react_native_svg, { Path } from "react-native-svg";
|
|
4
|
+
import { useColors } from "../hooks/index.js";
|
|
5
|
+
const CheckboxOnIcon_CheckboxOnIcon = ({ size = 16, color = 'default', ...props })=>{
|
|
6
|
+
const { getColor } = useColors();
|
|
7
|
+
return /*#__PURE__*/ jsxs(react_native_svg, {
|
|
8
|
+
fill: "none",
|
|
9
|
+
height: size,
|
|
10
|
+
viewBox: "0 0 16 16",
|
|
11
|
+
width: size,
|
|
12
|
+
...props,
|
|
13
|
+
children: [
|
|
14
|
+
/*#__PURE__*/ jsx(Path, {
|
|
15
|
+
d: "M2.46154 16H13.5385C14.8979 16 16 14.8979 16 13.5385V2.46154C16 1.10207 14.8979 0 13.5385 0H2.46154C1.10207 0 0 1.10207 0 2.46154V13.5385C0 14.8979 1.10207 16 2.46154 16Z",
|
|
16
|
+
fill: getColor(color)
|
|
17
|
+
}),
|
|
18
|
+
/*#__PURE__*/ jsx(Path, {
|
|
19
|
+
d: "M6.75547 9.24601L4.84436 7.3349C4.68139 7.17193 4.47399 7.09045 4.22214 7.09045C3.97028 7.09045 3.76288 7.17193 3.59991 7.3349C3.43695 7.49786 3.35547 7.70527 3.35547 7.95712C3.35547 8.20897 3.43695 8.41638 3.59991 8.57934L6.13325 11.1127C6.31102 11.2905 6.51843 11.3793 6.75547 11.3793C6.99251 11.3793 7.19991 11.2905 7.37769 11.1127L12.3999 6.09045C12.5629 5.92749 12.6444 5.72008 12.6444 5.46823C12.6444 5.21638 12.5629 5.00897 12.3999 4.84601C12.237 4.68304 12.0295 4.60156 11.7777 4.60156C11.5258 4.60156 11.3184 4.68304 11.1555 4.84601L6.75547 9.24601Z",
|
|
20
|
+
fill: "#ffffff"
|
|
21
|
+
})
|
|
22
|
+
]
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
const CheckboxOnIcon = CheckboxOnIcon_CheckboxOnIcon;
|
|
26
|
+
export { CheckboxOnIcon as default };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import react_native_svg, { Circle } from "react-native-svg";
|
|
4
|
+
import { useColors } from "../hooks/index.js";
|
|
5
|
+
const DotIcon_DotIcon = ({ size = 16, color = 'default', ...props })=>{
|
|
6
|
+
const { getColor } = useColors();
|
|
7
|
+
const colorValue = getColor(color);
|
|
8
|
+
return /*#__PURE__*/ jsx(react_native_svg, {
|
|
9
|
+
fill: "none",
|
|
10
|
+
height: size,
|
|
11
|
+
viewBox: "0 0 5 5",
|
|
12
|
+
width: size,
|
|
13
|
+
...props,
|
|
14
|
+
children: /*#__PURE__*/ jsx(Circle, {
|
|
15
|
+
cx: 2.5,
|
|
16
|
+
cy: 2.5,
|
|
17
|
+
fill: colorValue,
|
|
18
|
+
r: 2
|
|
19
|
+
})
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
const DotIcon = DotIcon_DotIcon;
|
|
23
|
+
export { DotIcon as default };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import react_native_svg, { Circle, Path } from "react-native-svg";
|
|
4
|
+
import { useColors } from "../hooks/index.js";
|
|
5
|
+
const QuestionIcon_QuestionIcon = ({ size = 16, color = 'default', ...props })=>{
|
|
6
|
+
const { getColor } = useColors();
|
|
7
|
+
const colorValue = getColor(color);
|
|
8
|
+
return /*#__PURE__*/ jsxs(react_native_svg, {
|
|
9
|
+
fill: "none",
|
|
10
|
+
height: size,
|
|
11
|
+
viewBox: "0 0 12 12",
|
|
12
|
+
width: size,
|
|
13
|
+
...props,
|
|
14
|
+
children: [
|
|
15
|
+
/*#__PURE__*/ jsx(Circle, {
|
|
16
|
+
cx: 6,
|
|
17
|
+
cy: 6,
|
|
18
|
+
r: 5.611,
|
|
19
|
+
stroke: colorValue,
|
|
20
|
+
strokeWidth: 0.778
|
|
21
|
+
}),
|
|
22
|
+
/*#__PURE__*/ jsx(Path, {
|
|
23
|
+
d: "M7.9 4.766c-.025.468-.176.837-.929 1.554-.382.363-.622.637-.646.876a.375.375 0 0 1-.38.329c-.013 0-.025-.002-.038-.003a.37.37 0 0 1-.343-.397c.052-.504.44-.911.868-1.318.684-.652.695-.859.707-1.078a.906.906 0 0 0-.28-.697 1.22 1.22 0 0 0-.86-.35h-.003c-.626 0-1.138.488-1.138 1.085 0 .202-.17.364-.382.364a.373.373 0 0 1-.382-.365c0-.483.197-.938.556-1.28.358-.344.835-.532 1.344-.533a2.007 2.007 0 0 1 1.419.576c.34.342.513.781.488 1.237ZM6.228 8.195a.457.457 0 1 0-.458.792.457.457 0 0 0 .458-.792Z",
|
|
24
|
+
fill: colorValue
|
|
25
|
+
})
|
|
26
|
+
]
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
const QuestionIcon = QuestionIcon_QuestionIcon;
|
|
30
|
+
export { QuestionIcon as default };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import react_native_svg, { Path } from "react-native-svg";
|
|
4
|
+
import { useColors } from "../hooks/index.js";
|
|
5
|
+
const RadioOffIcon_RadioOffIcon = ({ size = 16, color = 'default', ...props })=>{
|
|
6
|
+
const { getColor } = useColors();
|
|
7
|
+
const colorValue = getColor(color);
|
|
8
|
+
return /*#__PURE__*/ jsx(react_native_svg, {
|
|
9
|
+
fill: "none",
|
|
10
|
+
height: size,
|
|
11
|
+
viewBox: "0 0 16 16",
|
|
12
|
+
width: size,
|
|
13
|
+
...props,
|
|
14
|
+
children: /*#__PURE__*/ jsx(Path, {
|
|
15
|
+
d: "M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14Z",
|
|
16
|
+
stroke: colorValue,
|
|
17
|
+
strokeWidth: 1.2
|
|
18
|
+
})
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
const RadioOffIcon = RadioOffIcon_RadioOffIcon;
|
|
22
|
+
export { RadioOffIcon as default };
|