@kaushverse/pickify 1.2.6 → 1.2.8
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/index.d.mts +46 -16
- package/dist/index.d.ts +46 -16
- package/dist/index.js +266 -140
- package/dist/index.mjs +276 -130
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -2,7 +2,7 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
2
2
|
import React$1 from 'react';
|
|
3
3
|
import { TextStyle, ViewStyle, Animated } from 'react-native';
|
|
4
4
|
|
|
5
|
-
type IconRenderer = (props: {
|
|
5
|
+
type IconRenderer$1 = (props: {
|
|
6
6
|
name?: string;
|
|
7
7
|
size?: number;
|
|
8
8
|
color?: string;
|
|
@@ -52,7 +52,7 @@ type Props$1 = {
|
|
|
52
52
|
renderTab?: (tab: Group, isActive: boolean, onPress: () => void) => React$1.ReactNode;
|
|
53
53
|
renderItem?: (item: Option, isSelected: boolean) => React$1.ReactNode;
|
|
54
54
|
renderContainer?: (children: React$1.ReactNode) => React$1.ReactNode;
|
|
55
|
-
renderIcon?: IconRenderer;
|
|
55
|
+
renderIcon?: IconRenderer$1;
|
|
56
56
|
onSelect: (value: string) => void;
|
|
57
57
|
onClose: () => void;
|
|
58
58
|
};
|
|
@@ -82,7 +82,7 @@ type MultiPickerItemProps = {
|
|
|
82
82
|
label: string;
|
|
83
83
|
selected: boolean;
|
|
84
84
|
onPress: () => void;
|
|
85
|
-
renderItemIcon?: IconRenderer;
|
|
85
|
+
renderItemIcon?: IconRenderer$1;
|
|
86
86
|
styles?: MultiPickerItemStyles;
|
|
87
87
|
};
|
|
88
88
|
type MultiPickerGroupStyles = {
|
|
@@ -95,7 +95,7 @@ type MultiPickerGroupStyles = {
|
|
|
95
95
|
type MultiPickerGroupProps = {
|
|
96
96
|
label: string;
|
|
97
97
|
children: React.ReactNode;
|
|
98
|
-
renderGroupIcon?: IconRenderer;
|
|
98
|
+
renderGroupIcon?: IconRenderer$1;
|
|
99
99
|
styles?: MultiPickerGroupStyles;
|
|
100
100
|
defaultOpen: boolean;
|
|
101
101
|
};
|
|
@@ -121,14 +121,19 @@ type MultiPickerProps = {
|
|
|
121
121
|
label?: string;
|
|
122
122
|
placeholder?: string;
|
|
123
123
|
error?: string;
|
|
124
|
-
renderInputIcon?: IconRenderer;
|
|
125
|
-
renderGroupIcon?: IconRenderer;
|
|
126
|
-
renderItemIcon?: IconRenderer;
|
|
124
|
+
renderInputIcon?: IconRenderer$1;
|
|
125
|
+
renderGroupIcon?: IconRenderer$1;
|
|
126
|
+
renderItemIcon?: IconRenderer$1;
|
|
127
127
|
styles?: MultiPickerStyles;
|
|
128
128
|
};
|
|
129
129
|
|
|
130
130
|
declare function MultiPickerModal({ visible, setVisible, selectedValues, options, groups, onChange, label, placeholder, error, renderInputIcon, renderGroupIcon, renderItemIcon, styles, }: MultiPickerProps): react_jsx_runtime.JSX.Element;
|
|
131
131
|
|
|
132
|
+
type IconRenderer = (props: {
|
|
133
|
+
name: string;
|
|
134
|
+
size: number;
|
|
135
|
+
color: string;
|
|
136
|
+
}) => React$1.ReactNode;
|
|
132
137
|
type Action = {
|
|
133
138
|
icon: string;
|
|
134
139
|
onPress?: () => void;
|
|
@@ -142,23 +147,48 @@ type FloatingButtonStyles = {
|
|
|
142
147
|
secondaryButton?: ViewStyle;
|
|
143
148
|
circleContainer?: ViewStyle;
|
|
144
149
|
};
|
|
145
|
-
type
|
|
150
|
+
type FloatingButtonProps = {
|
|
151
|
+
/** List of actions to display when menu is open */
|
|
146
152
|
actions: Action[];
|
|
153
|
+
/** Layout direction: vertical, horizontal, or circle */
|
|
147
154
|
mode?: "vertical" | "horizontal" | "circle";
|
|
155
|
+
/** Radius for circle mode (distance from main button) */
|
|
148
156
|
radius?: number;
|
|
157
|
+
/** Custom renderer for the main icon */
|
|
149
158
|
renderMainIcon?: IconRenderer;
|
|
159
|
+
/** Custom renderer for action icons */
|
|
150
160
|
renderItemIcon?: IconRenderer;
|
|
161
|
+
/** Custom styles for different parts */
|
|
151
162
|
styles?: FloatingButtonStyles;
|
|
163
|
+
/** Additional style for the container */
|
|
152
164
|
style?: ViewStyle;
|
|
165
|
+
/** Name of the main icon (default: 'add') */
|
|
153
166
|
mainIconName?: string;
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
167
|
+
/** Controls menu open state (optional, for controlled mode) */
|
|
168
|
+
open?: boolean;
|
|
169
|
+
/** Callback when menu opens/closes */
|
|
170
|
+
onToggle?: (isOpen: boolean) => void;
|
|
171
|
+
/** Animation configuration (optional) */
|
|
172
|
+
animationConfig?: Partial<Animated.SpringAnimationConfig>;
|
|
173
|
+
};
|
|
174
|
+
type FloatingButtonRef = {
|
|
175
|
+
openMenu: () => void;
|
|
176
|
+
closeMenu: () => void;
|
|
158
177
|
toggleMenu: () => void;
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
178
|
+
};
|
|
179
|
+
declare const FloatingButton: React$1.ForwardRefExoticComponent<FloatingButtonProps & React$1.RefAttributes<FloatingButtonRef>>;
|
|
180
|
+
|
|
181
|
+
type SearchItem = {
|
|
182
|
+
text: string;
|
|
183
|
+
color?: string;
|
|
184
|
+
};
|
|
185
|
+
type Props = {
|
|
186
|
+
data: SearchItem[];
|
|
187
|
+
onSearch?: (text: string) => void;
|
|
188
|
+
renderLeftIcon: () => React$1.ReactNode;
|
|
189
|
+
renderRightIcons?: () => React$1.ReactNode;
|
|
190
|
+
};
|
|
191
|
+
declare function AnimatedSearchBar({ data, onSearch, renderLeftIcon, renderRightIcons, }: Props): react_jsx_runtime.JSX.Element;
|
|
162
192
|
|
|
163
193
|
declare function MultiPickerItem({ label, selected, onPress, renderItemIcon, styles: customStyles, }: MultiPickerItemProps): react_jsx_runtime.JSX.Element;
|
|
164
194
|
|
|
@@ -168,4 +198,4 @@ declare const toggleValue: (arr: string[], value: string) => string[];
|
|
|
168
198
|
|
|
169
199
|
declare const groupOptions: (options: Option[], config: Record<string, string[]>) => Group[];
|
|
170
200
|
|
|
171
|
-
export { FloatingButton, type Group, type MultiGroup, type MultiOption, MultiPickerGroup, type MultiPickerGroupProps, type MultiPickerGroupStyles, MultiPickerItem, type MultiPickerItemProps, type MultiPickerItemStyles, MultiPickerModal, type MultiPickerProps, type MultiPickerStyles, type Option, PickerModal, type PickerStyles, type Props$1 as Props, type Theme, groupOptions, toggleValue };
|
|
201
|
+
export { AnimatedSearchBar, FloatingButton, type Group, type MultiGroup, type MultiOption, MultiPickerGroup, type MultiPickerGroupProps, type MultiPickerGroupStyles, MultiPickerItem, type MultiPickerItemProps, type MultiPickerItemStyles, MultiPickerModal, type MultiPickerProps, type MultiPickerStyles, type Option, PickerModal, type PickerStyles, type Props$1 as Props, type Theme, groupOptions, toggleValue };
|
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
2
2
|
import React$1 from 'react';
|
|
3
3
|
import { TextStyle, ViewStyle, Animated } from 'react-native';
|
|
4
4
|
|
|
5
|
-
type IconRenderer = (props: {
|
|
5
|
+
type IconRenderer$1 = (props: {
|
|
6
6
|
name?: string;
|
|
7
7
|
size?: number;
|
|
8
8
|
color?: string;
|
|
@@ -52,7 +52,7 @@ type Props$1 = {
|
|
|
52
52
|
renderTab?: (tab: Group, isActive: boolean, onPress: () => void) => React$1.ReactNode;
|
|
53
53
|
renderItem?: (item: Option, isSelected: boolean) => React$1.ReactNode;
|
|
54
54
|
renderContainer?: (children: React$1.ReactNode) => React$1.ReactNode;
|
|
55
|
-
renderIcon?: IconRenderer;
|
|
55
|
+
renderIcon?: IconRenderer$1;
|
|
56
56
|
onSelect: (value: string) => void;
|
|
57
57
|
onClose: () => void;
|
|
58
58
|
};
|
|
@@ -82,7 +82,7 @@ type MultiPickerItemProps = {
|
|
|
82
82
|
label: string;
|
|
83
83
|
selected: boolean;
|
|
84
84
|
onPress: () => void;
|
|
85
|
-
renderItemIcon?: IconRenderer;
|
|
85
|
+
renderItemIcon?: IconRenderer$1;
|
|
86
86
|
styles?: MultiPickerItemStyles;
|
|
87
87
|
};
|
|
88
88
|
type MultiPickerGroupStyles = {
|
|
@@ -95,7 +95,7 @@ type MultiPickerGroupStyles = {
|
|
|
95
95
|
type MultiPickerGroupProps = {
|
|
96
96
|
label: string;
|
|
97
97
|
children: React.ReactNode;
|
|
98
|
-
renderGroupIcon?: IconRenderer;
|
|
98
|
+
renderGroupIcon?: IconRenderer$1;
|
|
99
99
|
styles?: MultiPickerGroupStyles;
|
|
100
100
|
defaultOpen: boolean;
|
|
101
101
|
};
|
|
@@ -121,14 +121,19 @@ type MultiPickerProps = {
|
|
|
121
121
|
label?: string;
|
|
122
122
|
placeholder?: string;
|
|
123
123
|
error?: string;
|
|
124
|
-
renderInputIcon?: IconRenderer;
|
|
125
|
-
renderGroupIcon?: IconRenderer;
|
|
126
|
-
renderItemIcon?: IconRenderer;
|
|
124
|
+
renderInputIcon?: IconRenderer$1;
|
|
125
|
+
renderGroupIcon?: IconRenderer$1;
|
|
126
|
+
renderItemIcon?: IconRenderer$1;
|
|
127
127
|
styles?: MultiPickerStyles;
|
|
128
128
|
};
|
|
129
129
|
|
|
130
130
|
declare function MultiPickerModal({ visible, setVisible, selectedValues, options, groups, onChange, label, placeholder, error, renderInputIcon, renderGroupIcon, renderItemIcon, styles, }: MultiPickerProps): react_jsx_runtime.JSX.Element;
|
|
131
131
|
|
|
132
|
+
type IconRenderer = (props: {
|
|
133
|
+
name: string;
|
|
134
|
+
size: number;
|
|
135
|
+
color: string;
|
|
136
|
+
}) => React$1.ReactNode;
|
|
132
137
|
type Action = {
|
|
133
138
|
icon: string;
|
|
134
139
|
onPress?: () => void;
|
|
@@ -142,23 +147,48 @@ type FloatingButtonStyles = {
|
|
|
142
147
|
secondaryButton?: ViewStyle;
|
|
143
148
|
circleContainer?: ViewStyle;
|
|
144
149
|
};
|
|
145
|
-
type
|
|
150
|
+
type FloatingButtonProps = {
|
|
151
|
+
/** List of actions to display when menu is open */
|
|
146
152
|
actions: Action[];
|
|
153
|
+
/** Layout direction: vertical, horizontal, or circle */
|
|
147
154
|
mode?: "vertical" | "horizontal" | "circle";
|
|
155
|
+
/** Radius for circle mode (distance from main button) */
|
|
148
156
|
radius?: number;
|
|
157
|
+
/** Custom renderer for the main icon */
|
|
149
158
|
renderMainIcon?: IconRenderer;
|
|
159
|
+
/** Custom renderer for action icons */
|
|
150
160
|
renderItemIcon?: IconRenderer;
|
|
161
|
+
/** Custom styles for different parts */
|
|
151
162
|
styles?: FloatingButtonStyles;
|
|
163
|
+
/** Additional style for the container */
|
|
152
164
|
style?: ViewStyle;
|
|
165
|
+
/** Name of the main icon (default: 'add') */
|
|
153
166
|
mainIconName?: string;
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
167
|
+
/** Controls menu open state (optional, for controlled mode) */
|
|
168
|
+
open?: boolean;
|
|
169
|
+
/** Callback when menu opens/closes */
|
|
170
|
+
onToggle?: (isOpen: boolean) => void;
|
|
171
|
+
/** Animation configuration (optional) */
|
|
172
|
+
animationConfig?: Partial<Animated.SpringAnimationConfig>;
|
|
173
|
+
};
|
|
174
|
+
type FloatingButtonRef = {
|
|
175
|
+
openMenu: () => void;
|
|
176
|
+
closeMenu: () => void;
|
|
158
177
|
toggleMenu: () => void;
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
178
|
+
};
|
|
179
|
+
declare const FloatingButton: React$1.ForwardRefExoticComponent<FloatingButtonProps & React$1.RefAttributes<FloatingButtonRef>>;
|
|
180
|
+
|
|
181
|
+
type SearchItem = {
|
|
182
|
+
text: string;
|
|
183
|
+
color?: string;
|
|
184
|
+
};
|
|
185
|
+
type Props = {
|
|
186
|
+
data: SearchItem[];
|
|
187
|
+
onSearch?: (text: string) => void;
|
|
188
|
+
renderLeftIcon: () => React$1.ReactNode;
|
|
189
|
+
renderRightIcons?: () => React$1.ReactNode;
|
|
190
|
+
};
|
|
191
|
+
declare function AnimatedSearchBar({ data, onSearch, renderLeftIcon, renderRightIcons, }: Props): react_jsx_runtime.JSX.Element;
|
|
162
192
|
|
|
163
193
|
declare function MultiPickerItem({ label, selected, onPress, renderItemIcon, styles: customStyles, }: MultiPickerItemProps): react_jsx_runtime.JSX.Element;
|
|
164
194
|
|
|
@@ -168,4 +198,4 @@ declare const toggleValue: (arr: string[], value: string) => string[];
|
|
|
168
198
|
|
|
169
199
|
declare const groupOptions: (options: Option[], config: Record<string, string[]>) => Group[];
|
|
170
200
|
|
|
171
|
-
export { FloatingButton, type Group, type MultiGroup, type MultiOption, MultiPickerGroup, type MultiPickerGroupProps, type MultiPickerGroupStyles, MultiPickerItem, type MultiPickerItemProps, type MultiPickerItemStyles, MultiPickerModal, type MultiPickerProps, type MultiPickerStyles, type Option, PickerModal, type PickerStyles, type Props$1 as Props, type Theme, groupOptions, toggleValue };
|
|
201
|
+
export { AnimatedSearchBar, FloatingButton, type Group, type MultiGroup, type MultiOption, MultiPickerGroup, type MultiPickerGroupProps, type MultiPickerGroupStyles, MultiPickerItem, type MultiPickerItemProps, type MultiPickerItemStyles, MultiPickerModal, type MultiPickerProps, type MultiPickerStyles, type Option, PickerModal, type PickerStyles, type Props$1 as Props, type Theme, groupOptions, toggleValue };
|