@impulse-ui-native/primitives 2.0.1 → 2.1.1
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/LICENSE +21 -0
- package/dist/components/atoms/button.d.mts +10 -0
- package/dist/components/atoms/button.js +60 -0
- package/dist/components/atoms/button.js.map +1 -0
- package/dist/components/atoms/icon-button.d.mts +12 -0
- package/dist/components/atoms/icon-button.js +51 -0
- package/dist/components/atoms/icon-button.js.map +1 -0
- package/dist/components/atoms/index.d.mts +18 -0
- package/dist/components/atoms/index.js +17 -0
- package/dist/components/atoms/index.js.map +1 -0
- package/dist/components/atoms/pressable.d.mts +9 -0
- package/dist/components/atoms/pressable.js +52 -0
- package/dist/components/atoms/pressable.js.map +1 -0
- package/dist/components/atoms/safe-area-view.d.mts +8 -0
- package/dist/components/atoms/safe-area-view.js +103 -0
- package/dist/components/atoms/safe-area-view.js.map +1 -0
- package/dist/components/atoms/tag.d.mts +9 -0
- package/dist/components/atoms/tag.js +82 -0
- package/dist/components/atoms/tag.js.map +1 -0
- package/dist/components/atoms/typography.d.mts +99 -0
- package/dist/components/atoms/typography.js +184 -0
- package/dist/components/atoms/typography.js.map +1 -0
- package/dist/components/atoms/view.d.mts +8 -0
- package/dist/components/atoms/view.js +27 -0
- package/dist/components/atoms/view.js.map +1 -0
- package/dist/components/controls/addon.d.mts +11 -0
- package/dist/components/controls/addon.js +72 -0
- package/dist/components/controls/addon.js.map +1 -0
- package/dist/components/controls/container.d.mts +11 -0
- package/dist/components/controls/container.js +54 -0
- package/dist/components/controls/container.js.map +1 -0
- package/dist/components/controls/control.d.mts +23 -0
- package/dist/components/controls/control.js +26 -0
- package/dist/components/controls/control.js.map +1 -0
- package/dist/components/controls/error.d.mts +11 -0
- package/dist/components/controls/error.js +33 -0
- package/dist/components/controls/error.js.map +1 -0
- package/dist/components/controls/index.d.mts +10 -0
- package/dist/components/controls/index.js +7 -0
- package/dist/components/controls/index.js.map +1 -0
- package/dist/components/controls/input.d.mts +11 -0
- package/dist/components/controls/input.js +63 -0
- package/dist/components/controls/input.js.map +1 -0
- package/dist/components/controls/label.d.mts +11 -0
- package/dist/components/controls/label.js +42 -0
- package/dist/components/controls/label.js.map +1 -0
- package/dist/components/controls/loader.d.mts +6 -0
- package/dist/components/controls/loader.js +10 -0
- package/dist/components/controls/loader.js.map +1 -0
- package/dist/components/controls/placeholder.d.mts +11 -0
- package/dist/components/controls/placeholder.js +51 -0
- package/dist/components/controls/placeholder.js.map +1 -0
- package/dist/components/controls/provider.d.mts +13 -0
- package/dist/components/controls/provider.js +19 -0
- package/dist/components/controls/provider.js.map +1 -0
- package/dist/components/controls/root.d.mts +9 -0
- package/dist/components/controls/root.js +18 -0
- package/dist/components/controls/root.js.map +1 -0
- package/dist/components/controls/value.d.mts +11 -0
- package/dist/components/controls/value.js +36 -0
- package/dist/components/controls/value.js.map +1 -0
- package/dist/components/index.d.mts +22 -0
- package/dist/components/index.js +3 -0
- package/dist/components/index.js.map +1 -0
- package/dist/constants/control-container.constants.d.mts +6 -0
- package/dist/constants/control-container.constants.js +15 -0
- package/dist/constants/control-container.constants.js.map +1 -0
- package/dist/constants/index.d.mts +3 -0
- package/dist/constants/index.js +3 -0
- package/dist/constants/index.js.map +1 -0
- package/dist/constants/safe-area-view.constants.d.mts +14 -0
- package/dist/constants/safe-area-view.constants.js +17 -0
- package/dist/constants/safe-area-view.constants.js.map +1 -0
- package/dist/hocs/create-preset.hoc.d.mts +12 -0
- package/dist/hocs/create-preset.hoc.js +38 -0
- package/dist/hocs/create-preset.hoc.js.map +1 -0
- package/dist/hocs/index.d.mts +6 -0
- package/dist/hocs/index.js +5 -0
- package/dist/hocs/index.js.map +1 -0
- package/dist/index.d.mts +25 -242
- package/dist/index.js +4 -997
- package/dist/index.js.map +1 -1
- package/dist/types/button.types.d.mts +21 -0
- package/dist/types/button.types.js +1 -0
- package/dist/types/button.types.js.map +1 -0
- package/dist/types/control-components.types.d.mts +45 -0
- package/dist/types/control-components.types.js +1 -0
- package/dist/types/control-components.types.js.map +1 -0
- package/dist/types/icon-button.types.d.mts +15 -0
- package/dist/types/icon-button.types.js +1 -0
- package/dist/types/icon-button.types.js.map +1 -0
- package/dist/types/index.d.mts +12 -0
- package/dist/types/index.js +9 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/safe-area-view.types.d.mts +5 -0
- package/dist/types/safe-area-view.types.js +1 -0
- package/dist/types/safe-area-view.types.js.map +1 -0
- package/dist/types/tag.types.d.mts +22 -0
- package/dist/types/tag.types.js +1 -0
- package/dist/types/tag.types.js.map +1 -0
- package/dist/types/typography.types.d.mts +8 -0
- package/dist/types/typography.types.js +1 -0
- package/dist/types/typography.types.js.map +1 -0
- package/dist/types/view.types.d.mts +6 -0
- package/dist/types/view.types.js +1 -0
- package/dist/types/view.types.js.map +1 -0
- package/dist/utils/controls.utils.d.mts +13 -0
- package/dist/utils/controls.utils.js +18 -0
- package/dist/utils/controls.utils.js.map +1 -0
- package/dist/utils/index.d.mts +2 -0
- package/dist/utils/index.js +2 -0
- package/dist/utils/index.js.map +1 -0
- package/package.json +11 -10
package/dist/index.d.mts
CHANGED
|
@@ -1,242 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
(props: TextProps): react_jsx_runtime.JSX.Element;
|
|
27
|
-
displayName: string;
|
|
28
|
-
}>;
|
|
29
|
-
DisplaySmall: react.MemoExoticComponent<{
|
|
30
|
-
(props: TextProps): react_jsx_runtime.JSX.Element;
|
|
31
|
-
displayName: string;
|
|
32
|
-
}>;
|
|
33
|
-
Title1: react.MemoExoticComponent<{
|
|
34
|
-
(props: TextProps): react_jsx_runtime.JSX.Element;
|
|
35
|
-
displayName: string;
|
|
36
|
-
}>;
|
|
37
|
-
Title2: react.MemoExoticComponent<{
|
|
38
|
-
(props: TextProps): react_jsx_runtime.JSX.Element;
|
|
39
|
-
displayName: string;
|
|
40
|
-
}>;
|
|
41
|
-
Title3: react.MemoExoticComponent<{
|
|
42
|
-
(props: TextProps): react_jsx_runtime.JSX.Element;
|
|
43
|
-
displayName: string;
|
|
44
|
-
}>;
|
|
45
|
-
Title4: react.MemoExoticComponent<{
|
|
46
|
-
(props: TextProps): react_jsx_runtime.JSX.Element;
|
|
47
|
-
displayName: string;
|
|
48
|
-
}>;
|
|
49
|
-
Title5: react.MemoExoticComponent<{
|
|
50
|
-
(props: TextProps): react_jsx_runtime.JSX.Element;
|
|
51
|
-
displayName: string;
|
|
52
|
-
}>;
|
|
53
|
-
Title6: react.MemoExoticComponent<{
|
|
54
|
-
(props: TextProps): react_jsx_runtime.JSX.Element;
|
|
55
|
-
displayName: string;
|
|
56
|
-
}>;
|
|
57
|
-
Subtitle1: react.MemoExoticComponent<{
|
|
58
|
-
(props: TextProps): react_jsx_runtime.JSX.Element;
|
|
59
|
-
displayName: string;
|
|
60
|
-
}>;
|
|
61
|
-
Subtitle2: react.MemoExoticComponent<{
|
|
62
|
-
(props: TextProps): react_jsx_runtime.JSX.Element;
|
|
63
|
-
displayName: string;
|
|
64
|
-
}>;
|
|
65
|
-
BodyLarge: react.MemoExoticComponent<{
|
|
66
|
-
(props: TextProps): react_jsx_runtime.JSX.Element;
|
|
67
|
-
displayName: string;
|
|
68
|
-
}>;
|
|
69
|
-
Body: react.MemoExoticComponent<{
|
|
70
|
-
(props: TextProps): react_jsx_runtime.JSX.Element;
|
|
71
|
-
displayName: string;
|
|
72
|
-
}>;
|
|
73
|
-
BodySmall: react.MemoExoticComponent<{
|
|
74
|
-
(props: TextProps): react_jsx_runtime.JSX.Element;
|
|
75
|
-
displayName: string;
|
|
76
|
-
}>;
|
|
77
|
-
Caption: react.MemoExoticComponent<{
|
|
78
|
-
(props: TextProps): react_jsx_runtime.JSX.Element;
|
|
79
|
-
displayName: string;
|
|
80
|
-
}>;
|
|
81
|
-
Label: react.MemoExoticComponent<{
|
|
82
|
-
(props: TextProps): react_jsx_runtime.JSX.Element;
|
|
83
|
-
displayName: string;
|
|
84
|
-
}>;
|
|
85
|
-
Overline: react.MemoExoticComponent<{
|
|
86
|
-
(props: TextProps): react_jsx_runtime.JSX.Element;
|
|
87
|
-
displayName: string;
|
|
88
|
-
}>;
|
|
89
|
-
Helper: react.MemoExoticComponent<{
|
|
90
|
-
(props: TextProps): react_jsx_runtime.JSX.Element;
|
|
91
|
-
displayName: string;
|
|
92
|
-
}>;
|
|
93
|
-
Code: react.MemoExoticComponent<{
|
|
94
|
-
(props: TextProps): react_jsx_runtime.JSX.Element;
|
|
95
|
-
displayName: string;
|
|
96
|
-
}>;
|
|
97
|
-
Quote: react.MemoExoticComponent<{
|
|
98
|
-
(props: TextProps): react_jsx_runtime.JSX.Element;
|
|
99
|
-
displayName: string;
|
|
100
|
-
}>;
|
|
101
|
-
Eyebrow: react.MemoExoticComponent<{
|
|
102
|
-
(props: TextProps): react_jsx_runtime.JSX.Element;
|
|
103
|
-
displayName: string;
|
|
104
|
-
}>;
|
|
105
|
-
};
|
|
106
|
-
type TypographyComponent = (typeof Typography)[keyof typeof Typography];
|
|
107
|
-
|
|
108
|
-
type ViewProps = ViewProps$1 & SpacingProps & ColorProps & ShadowProps & BorderProps & FlexProps & DimensionProps;
|
|
109
|
-
|
|
110
|
-
type SafeAreaViewProps = SafeAreaViewProps$1;
|
|
111
|
-
|
|
112
|
-
interface TextProps extends TextProps$1, TypographyProps, FlexProps, ColorProps {
|
|
113
|
-
numeric?: boolean;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
interface ButtonProps extends PressableProps, DimensionProps, SpacingProps, ShadowProps {
|
|
117
|
-
size?: ComponentSize;
|
|
118
|
-
variant?: ComponentVariant;
|
|
119
|
-
disabled?: boolean;
|
|
120
|
-
style?: ViewStyle;
|
|
121
|
-
loading?: boolean;
|
|
122
|
-
}
|
|
123
|
-
interface ButtonThemeProps {
|
|
124
|
-
size: ComponentSize;
|
|
125
|
-
variant: ComponentVariant;
|
|
126
|
-
disabled?: boolean;
|
|
127
|
-
}
|
|
128
|
-
interface PressableCoreProps extends PressableProps, Omit<ButtonProps, "style"> {
|
|
129
|
-
disabled?: boolean;
|
|
130
|
-
pressedStyle?: StyleProp<ViewStyle>;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
interface IconButtonProps extends ButtonProps {
|
|
134
|
-
icon: IconProps["icon"];
|
|
135
|
-
}
|
|
136
|
-
interface IconButtonThemeProps {
|
|
137
|
-
size: ComponentSize;
|
|
138
|
-
variant: ComponentVariant;
|
|
139
|
-
disabled?: boolean;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
interface TagProps {
|
|
143
|
-
label: string;
|
|
144
|
-
size?: ComponentSize;
|
|
145
|
-
variant?: ComponentVariant;
|
|
146
|
-
color?: TagColor;
|
|
147
|
-
closable?: boolean;
|
|
148
|
-
disabled?: boolean;
|
|
149
|
-
onClose?: () => void;
|
|
150
|
-
style?: ViewStyle;
|
|
151
|
-
onPress?: PressableProps["onPress"];
|
|
152
|
-
}
|
|
153
|
-
interface TagThemeProps {
|
|
154
|
-
size: ComponentSize;
|
|
155
|
-
variant: ComponentVariant;
|
|
156
|
-
color: TagColor;
|
|
157
|
-
disabled?: boolean;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
interface ControlComponentCommonProps {
|
|
161
|
-
placeholder?: string;
|
|
162
|
-
label?: string;
|
|
163
|
-
PrefixIcon?: IconProps["icon"];
|
|
164
|
-
Prefix?: ComponentType;
|
|
165
|
-
onPressPrefix?: PressableCoreProps["onPress"];
|
|
166
|
-
SuffixIcon?: IconProps["icon"];
|
|
167
|
-
Suffix?: ComponentType;
|
|
168
|
-
onPressSuffix?: PressableCoreProps["onPress"];
|
|
169
|
-
}
|
|
170
|
-
interface ControlComponentProps {
|
|
171
|
-
size: ComponentSize;
|
|
172
|
-
variant: ComponentVariant;
|
|
173
|
-
error: string | undefined;
|
|
174
|
-
disabled: boolean | undefined;
|
|
175
|
-
}
|
|
176
|
-
interface ControlContextData extends ControlComponentProps {
|
|
177
|
-
}
|
|
178
|
-
interface ControlContainerProps extends ViewProps$1 {
|
|
179
|
-
}
|
|
180
|
-
interface ControlLabelProps extends TextProps$1 {
|
|
181
|
-
}
|
|
182
|
-
interface ControlErrorLabelProps extends TextProps$1 {
|
|
183
|
-
}
|
|
184
|
-
interface ControlAddonProps extends ViewProps$1 {
|
|
185
|
-
icon: IconProps["icon"] | undefined;
|
|
186
|
-
onPress: PressableCoreProps["onPress"] | undefined;
|
|
187
|
-
Content: ComponentType<any> | undefined;
|
|
188
|
-
}
|
|
189
|
-
interface ControlInputProps extends TextInputProps {
|
|
190
|
-
}
|
|
191
|
-
interface ControlPlaceholderProps extends TextProps$1 {
|
|
192
|
-
}
|
|
193
|
-
interface ControlValueProps extends TextProps$1 {
|
|
194
|
-
}
|
|
195
|
-
interface ControlLoaderProps extends ActivityIndicatorProps {
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
declare const Button: react.NamedExoticComponent<PropsWithChildren<ButtonProps>>;
|
|
199
|
-
|
|
200
|
-
declare const IconButton: react.NamedExoticComponent<PropsWithChildren<IconButtonProps>>;
|
|
201
|
-
|
|
202
|
-
declare const Pressable: ({ children, disabled, pressedStyle, style, ...props }: PropsWithChildren<PressableCoreProps>) => react_jsx_runtime.JSX.Element;
|
|
203
|
-
|
|
204
|
-
declare const Tag: react.NamedExoticComponent<TagProps>;
|
|
205
|
-
|
|
206
|
-
declare const Control: {
|
|
207
|
-
Container: react.NamedExoticComponent<ControlContainerProps>;
|
|
208
|
-
Provider: react.NamedExoticComponent<react.PropsWithChildren<ControlContextData>>;
|
|
209
|
-
Root: react.NamedExoticComponent<ViewProps>;
|
|
210
|
-
Label: react.NamedExoticComponent<ControlLabelProps>;
|
|
211
|
-
Error: react.NamedExoticComponent<ControlErrorLabelProps>;
|
|
212
|
-
Addon: react.NamedExoticComponent<ControlAddonProps>;
|
|
213
|
-
Input: react.NamedExoticComponent<ControlInputProps>;
|
|
214
|
-
Placeholder: react.NamedExoticComponent<ControlPlaceholderProps>;
|
|
215
|
-
Value: react.NamedExoticComponent<ControlValueProps>;
|
|
216
|
-
Loader: react.NamedExoticComponent<object>;
|
|
217
|
-
};
|
|
218
|
-
|
|
219
|
-
declare function useControlContext(): ControlContextData;
|
|
220
|
-
|
|
221
|
-
declare function createPreset(config: (theme: AppTheme) => TypographyProps, key: TypographyPresetKey): react.MemoExoticComponent<{
|
|
222
|
-
(props: TextProps): react_jsx_runtime.JSX.Element;
|
|
223
|
-
displayName: string;
|
|
224
|
-
}>;
|
|
225
|
-
|
|
226
|
-
declare const EdgeToSpacingKeyMap: {
|
|
227
|
-
readonly top: "Top";
|
|
228
|
-
readonly bottom: "Bottom";
|
|
229
|
-
readonly left: "Left";
|
|
230
|
-
readonly right: "Right";
|
|
231
|
-
};
|
|
232
|
-
declare const EdgeToShorthandKeyMap: {
|
|
233
|
-
readonly top: "Vertical";
|
|
234
|
-
readonly bottom: "Vertical";
|
|
235
|
-
readonly left: "Horizontal";
|
|
236
|
-
readonly right: "Horizontal";
|
|
237
|
-
};
|
|
238
|
-
|
|
239
|
-
declare const ControlContainerHeight: Record<ComponentSize, number>;
|
|
240
|
-
declare const ControlFontSize: Record<ComponentSize, number>;
|
|
241
|
-
|
|
242
|
-
export { Button, type ButtonProps, type ButtonThemeProps, Control, type ControlAddonProps, type ControlComponentCommonProps, type ControlComponentProps, ControlContainerHeight, type ControlContainerProps, type ControlContextData, type ControlErrorLabelProps, ControlFontSize, type ControlInputProps, type ControlLabelProps, type ControlLoaderProps, type ControlPlaceholderProps, type ControlValueProps, EdgeToShorthandKeyMap, EdgeToSpacingKeyMap, IconButton, type IconButtonProps, type IconButtonThemeProps, Pressable, type PressableCoreProps, SafeAreaView, type SafeAreaViewProps, Tag, type TagProps, type TagThemeProps, type TextProps, Typography, type TypographyComponent, View, type ViewProps, createPreset, useControlContext };
|
|
1
|
+
export { View } from './components/atoms/view.mjs';
|
|
2
|
+
export { SafeAreaView } from './components/atoms/safe-area-view.mjs';
|
|
3
|
+
export { Typography, TypographyComponent } from './components/atoms/typography.mjs';
|
|
4
|
+
export { Button } from './components/atoms/button.mjs';
|
|
5
|
+
export { IconButton } from './components/atoms/icon-button.mjs';
|
|
6
|
+
export { Pressable } from './components/atoms/pressable.mjs';
|
|
7
|
+
export { Tag } from './components/atoms/tag.mjs';
|
|
8
|
+
export { Control } from './components/controls/control.mjs';
|
|
9
|
+
export { useControlContext } from './components/controls/provider.mjs';
|
|
10
|
+
export { createPreset } from './hocs/create-preset.hoc.mjs';
|
|
11
|
+
export { EdgeToShorthandKeyMap, EdgeToSpacingKeyMap } from './constants/safe-area-view.constants.mjs';
|
|
12
|
+
export { ControlContainerHeight, ControlFontSize } from './constants/control-container.constants.mjs';
|
|
13
|
+
export { ViewProps } from './types/view.types.mjs';
|
|
14
|
+
export { SafeAreaViewProps } from './types/safe-area-view.types.mjs';
|
|
15
|
+
export { TextProps } from './types/typography.types.mjs';
|
|
16
|
+
export { ButtonProps, ButtonThemeProps, PressableCoreProps } from './types/button.types.mjs';
|
|
17
|
+
export { IconButtonProps, IconButtonThemeProps } from './types/icon-button.types.mjs';
|
|
18
|
+
export { TagProps, TagThemeProps } from './types/tag.types.mjs';
|
|
19
|
+
export { ControlAddonProps, ControlComponentCommonProps, ControlComponentProps, ControlContainerProps, ControlContextData, ControlErrorLabelProps, ControlInputProps, ControlLabelProps, ControlLoaderProps, ControlPlaceholderProps, ControlValueProps } from './types/control-components.types.mjs';
|
|
20
|
+
import 'react';
|
|
21
|
+
import '@impulse-ui-native/theme';
|
|
22
|
+
import 'react-native';
|
|
23
|
+
import 'react/jsx-runtime';
|
|
24
|
+
import 'react-native-safe-area-context';
|
|
25
|
+
import '@impulse-ui-native/icon/types';
|