@reillymc/react-native-components 0.11.7 → 0.11.10
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/lib/components/container/anchoredContainer/AnchoredContainer.ios.js +1 -0
- package/lib/components/container/anchoredContainer/AnchoredContainer.js +1 -0
- package/lib/components/container/anchoredContainer/AnchoredContainer.styles.js +1 -0
- package/lib/components/container/anchoredContainer/AnchoredContainer.web.js +1 -0
- package/lib/components/container/anchoredContainer/InlineMount.js +1 -0
- package/lib/components/container/anchoredContainer/OverlayMount.js +1 -0
- package/lib/components/container/anchoredContainer/helpers.js +1 -0
- package/lib/components/container/anchoredContainer/index.js +1 -0
- package/lib/components/container/anchoredContainer/useAnchoredContainerPosition.js +1 -0
- package/lib/components/container/index.js +1 -1
- package/lib/components/index.js +1 -1
- package/lib/components/input/CounterInput.js +1 -1
- package/lib/components/input/NumberInput.js +1 -1
- package/lib/components/input/SelectionInput.js +1 -1
- package/lib/components/input/TimeInput.js +1 -1
- package/lib/components/input/dropdownInput/DropdownBlurGuard.js +1 -0
- package/lib/components/input/dropdownInput/DropdownBlurGuard.web.js +1 -0
- package/lib/components/input/dropdownInput/DropdownInput.js +1 -0
- package/lib/components/input/dropdownInput/DropdownInputBase.js +1 -0
- package/lib/components/input/dropdownInput/helpers.js +1 -0
- package/lib/components/input/dropdownInput/index.js +1 -0
- package/lib/components/input/dropdownInput/useDropdownController.js +1 -0
- package/lib/components/input/index.js +1 -1
- package/lib/components/menu/Menu.js +1 -1
- package/lib/components/menu/Menu.styles.js +1 -1
- package/lib/components/menu/MenuItem.js +1 -1
- package/lib/hooks/index.js +1 -1
- package/lib/hooks/useControlledState.js +1 -0
- package/lib/hooks/usePersistentKeyboardHeight.js +1 -1
- package/lib/theme/styles.js +1 -1
- package/lib/types/components/container/anchoredContainer/AnchoredContainer.d.ts +48 -0
- package/lib/types/components/container/anchoredContainer/AnchoredContainer.d.ts.map +1 -0
- package/lib/types/components/container/anchoredContainer/AnchoredContainer.ios.d.ts +4 -0
- package/lib/types/components/container/anchoredContainer/AnchoredContainer.ios.d.ts.map +1 -0
- package/lib/types/components/container/anchoredContainer/AnchoredContainer.styles.d.ts +4 -0
- package/lib/types/components/container/anchoredContainer/AnchoredContainer.styles.d.ts.map +1 -0
- package/lib/types/components/container/anchoredContainer/AnchoredContainer.web.d.ts +4 -0
- package/lib/types/components/container/anchoredContainer/AnchoredContainer.web.d.ts.map +1 -0
- package/lib/types/components/container/anchoredContainer/InlineMount.d.ts +8 -0
- package/lib/types/components/container/anchoredContainer/InlineMount.d.ts.map +1 -0
- package/lib/types/components/container/anchoredContainer/OverlayMount.d.ts +10 -0
- package/lib/types/components/container/anchoredContainer/OverlayMount.d.ts.map +1 -0
- package/lib/types/components/container/anchoredContainer/helpers.d.ts +5 -0
- package/lib/types/components/container/anchoredContainer/helpers.d.ts.map +1 -0
- package/lib/types/components/container/anchoredContainer/index.d.ts +3 -0
- package/lib/types/components/container/anchoredContainer/index.d.ts.map +1 -0
- package/lib/types/components/container/anchoredContainer/useAnchoredContainerPosition.d.ts +29 -0
- package/lib/types/components/container/anchoredContainer/useAnchoredContainerPosition.d.ts.map +1 -0
- package/lib/types/components/container/index.d.ts +2 -1
- package/lib/types/components/container/index.d.ts.map +1 -1
- package/lib/types/components/index.d.ts +4 -4
- package/lib/types/components/index.d.ts.map +1 -1
- package/lib/types/components/input/CounterInput.d.ts +3 -1
- package/lib/types/components/input/CounterInput.d.ts.map +1 -1
- package/lib/types/components/input/InputBase.d.ts +2 -2
- package/lib/types/components/input/InputBase.d.ts.map +1 -1
- package/lib/types/components/input/NumberInput.d.ts +12 -4
- package/lib/types/components/input/NumberInput.d.ts.map +1 -1
- package/lib/types/components/input/NumberInputBase.d.ts +2 -2
- package/lib/types/components/input/NumberInputBase.d.ts.map +1 -1
- package/lib/types/components/input/SelectionInput.d.ts +5 -5
- package/lib/types/components/input/SelectionInput.d.ts.map +1 -1
- package/lib/types/components/input/TimeInput.d.ts +5 -2
- package/lib/types/components/input/TimeInput.d.ts.map +1 -1
- package/lib/types/components/input/dropdownInput/DropdownBlurGuard.d.ts +8 -0
- package/lib/types/components/input/dropdownInput/DropdownBlurGuard.d.ts.map +1 -0
- package/lib/types/components/input/dropdownInput/DropdownBlurGuard.web.d.ts +9 -0
- package/lib/types/components/input/dropdownInput/DropdownBlurGuard.web.d.ts.map +1 -0
- package/lib/types/components/input/dropdownInput/DropdownInput.d.ts +8 -0
- package/lib/types/components/input/dropdownInput/DropdownInput.d.ts.map +1 -0
- package/lib/types/components/input/{DropdownInput.styles.d.ts → dropdownInput/DropdownInput.styles.d.ts} +1 -1
- package/lib/types/components/input/dropdownInput/DropdownInput.styles.d.ts.map +1 -0
- package/lib/types/components/input/dropdownInput/DropdownInputBase.d.ts +72 -0
- package/lib/types/components/input/dropdownInput/DropdownInputBase.d.ts.map +1 -0
- package/lib/types/components/input/dropdownInput/helpers.d.ts +13 -0
- package/lib/types/components/input/dropdownInput/helpers.d.ts.map +1 -0
- package/lib/types/components/input/dropdownInput/index.d.ts +4 -0
- package/lib/types/components/input/dropdownInput/index.d.ts.map +1 -0
- package/lib/types/components/input/dropdownInput/useDropdownController.d.ts +43 -0
- package/lib/types/components/input/dropdownInput/useDropdownController.d.ts.map +1 -0
- package/lib/types/components/input/index.d.ts +3 -5
- package/lib/types/components/input/index.d.ts.map +1 -1
- package/lib/types/components/menu/Menu.d.ts +17 -6
- package/lib/types/components/menu/Menu.d.ts.map +1 -1
- package/lib/types/components/menu/Menu.styles.d.ts.map +1 -1
- package/lib/types/components/menu/MenuItem.d.ts +1 -0
- package/lib/types/components/menu/MenuItem.d.ts.map +1 -1
- package/lib/types/hooks/index.d.ts +1 -0
- package/lib/types/hooks/index.d.ts.map +1 -1
- package/lib/types/hooks/useControlledState.d.ts +8 -0
- package/lib/types/hooks/useControlledState.d.ts.map +1 -0
- package/lib/types/hooks/usePersistentKeyboardHeight.d.ts.map +1 -1
- package/lib/types/theme/styles.d.ts +2 -2
- package/lib/types/theme/styles.d.ts.map +1 -1
- package/package.json +3 -2
- package/lib/components/container/FloatingContainer.js +0 -1
- package/lib/components/container/FloatingContainer.styles.js +0 -1
- package/lib/components/container/FloatingContainer.web.js +0 -1
- package/lib/components/input/DropdownInput.js +0 -1
- package/lib/components/input/DropdownInputBase.js +0 -1
- package/lib/types/components/container/FloatingContainer.d.ts +0 -22
- package/lib/types/components/container/FloatingContainer.d.ts.map +0 -1
- package/lib/types/components/container/FloatingContainer.styles.d.ts +0 -4
- package/lib/types/components/container/FloatingContainer.styles.d.ts.map +0 -1
- package/lib/types/components/container/FloatingContainer.web.d.ts +0 -4
- package/lib/types/components/container/FloatingContainer.web.d.ts.map +0 -1
- package/lib/types/components/input/DropdownInput.d.ts +0 -8
- package/lib/types/components/input/DropdownInput.d.ts.map +0 -1
- package/lib/types/components/input/DropdownInput.styles.d.ts.map +0 -1
- package/lib/types/components/input/DropdownInputBase.d.ts +0 -38
- package/lib/types/components/input/DropdownInputBase.d.ts.map +0 -1
- /package/lib/components/input/{DropdownInput.styles.js → dropdownInput/DropdownInput.styles.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../../src/components/container/anchoredContainer/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,iBAAiB,EACjB,kBAAkB,EACrB,MAAM,qBAAqB,CAAC;AAE7B,eAAO,MAAM,wBAAwB,EAAE,iBAQtC,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,kBAG7B,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAC9B,UAAU,iBAAiB,GAAG,SAAS,KACxC,kBAGsB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/container/anchoredContainer/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACR,sBAAsB,EACtB,uBAAuB,EACvB,kBAAkB,GACrB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type LayoutChangeEvent } from "react-native";
|
|
2
|
+
import type { AnchoredContainerProps, ContainerGeometry } from "./AnchoredContainer";
|
|
3
|
+
type AnchoredContainerPositionOptions = Pick<AnchoredContainerProps, "parentRef" | "show" | "position" | "gap" | "onInvertedChange">;
|
|
4
|
+
export declare const useAnchoredContainerPosition: ({ parentRef, show, position, gap, onInvertedChange, }: AnchoredContainerPositionOptions) => {
|
|
5
|
+
geometry: ContainerGeometry | undefined;
|
|
6
|
+
inlineStyle: {
|
|
7
|
+
position: "absolute";
|
|
8
|
+
zIndex: number;
|
|
9
|
+
elevation: number;
|
|
10
|
+
left: number;
|
|
11
|
+
right: number;
|
|
12
|
+
top: number;
|
|
13
|
+
opacity?: undefined;
|
|
14
|
+
pointerEvents?: undefined;
|
|
15
|
+
} | {
|
|
16
|
+
position: "absolute";
|
|
17
|
+
opacity: number;
|
|
18
|
+
pointerEvents: "none";
|
|
19
|
+
zIndex?: undefined;
|
|
20
|
+
elevation?: undefined;
|
|
21
|
+
left?: undefined;
|
|
22
|
+
right?: undefined;
|
|
23
|
+
top?: undefined;
|
|
24
|
+
};
|
|
25
|
+
margin: number;
|
|
26
|
+
onLayout: (e: LayoutChangeEvent) => void;
|
|
27
|
+
};
|
|
28
|
+
export {};
|
|
29
|
+
//# sourceMappingURL=useAnchoredContainerPosition.d.ts.map
|
package/lib/types/components/container/anchoredContainer/useAnchoredContainerPosition.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAnchoredContainerPosition.d.ts","sourceRoot":"","sources":["../../../../../src/components/container/anchoredContainer/useAnchoredContainerPosition.ts"],"names":[],"mappings":"AACA,OAAO,EACH,KAAK,iBAAiB,EAIzB,MAAM,cAAc,CAAC;AAQtB,OAAO,KAAK,EACR,sBAAsB,EACtB,iBAAiB,EACpB,MAAM,qBAAqB,CAAC;AAE7B,KAAK,gCAAgC,GAAG,IAAI,CACxC,sBAAsB,EACtB,WAAW,GAAG,MAAM,GAAG,UAAU,GAAG,KAAK,GAAG,kBAAkB,CACjE,CAAC;AAEF,eAAO,MAAM,4BAA4B,GAAI,uDAM1C,gCAAgC;;;;;;;;;;;;;;;;;;;;;;kBA2DV,iBAAiB;CA6BzC,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export type { AnchoredContainerProps, AnchoredContainerStyles, ContainerPlacement, } from "./anchoredContainer";
|
|
2
|
+
export { AnchoredContainer } from "./anchoredContainer";
|
|
2
3
|
export { FormContainer, type FormContainerProps } from "./FormContainer";
|
|
3
4
|
export { FormRow, type FormRowProps } from "./FormRow";
|
|
4
5
|
export { Panel, type PanelProps } from "./Panel";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/container/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/container/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACR,sBAAsB,EACtB,uBAAuB,EACvB,kBAAkB,GACrB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACzE,OAAO,EAAE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,WAAW,CAAC;AACvD,OAAO,EAAE,KAAK,EAAE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -4,12 +4,12 @@ export { AlertIndicator, type AlertIndicatorProps, type AlertIndicatorStyles, }
|
|
|
4
4
|
export { Avatar, type AvatarProps, type AvatarStyles } from "./avatar";
|
|
5
5
|
export type { ButtonBaseProps, ButtonBaseStyles, ButtonProps, ButtonStyles, IconButtonBaseProps, IconButtonBaseStyles, IconButtonProps, IconButtonStyles, } from "./button";
|
|
6
6
|
export { Button, ButtonBase, IconButton, IconButtonBase, } from "./button";
|
|
7
|
-
export type {
|
|
8
|
-
export {
|
|
7
|
+
export type { AnchoredContainerProps, AnchoredContainerStyles, ContainerPlacement, FormContainerProps, FormRowProps, PanelProps, } from "./container";
|
|
8
|
+
export { AnchoredContainer, FormContainer, FormRow, Panel, } from "./container";
|
|
9
9
|
export type { IconBaseProps, IconBaseStyles, IconComponentProps, IconProps, IconStyles, InteractiveIconStyles, } from "./icon";
|
|
10
10
|
export { Icon, IconBase } from "./icon";
|
|
11
|
-
export type { CounterInputIcons, CounterInputProps, DropdownInputProps, DropdownInputStyles, FractionValue, InputActionProps, InputActionStyles, InputBaseProps, InputBaseStyles, InputRowContainerProps, InputScaffoldIcons, InputScaffoldProps, InputScaffoldStyles, NumberInputIcons, NumberInputProps, NumberInputValue, NumberValue, RangeValue, RatingInputIcons, RatingInputProps, RatingInputStyles, SelectionInputIcons, SelectionInputProps, SelectionInputStyles, TextInputProps, TextInputStyles, TimeInputIcons, TimeInputProps, TimeInputValue, ToggleInputIcons, ToggleInputProps, ToggleInputStyles, } from "./input";
|
|
12
|
-
export { CounterInput, DropdownInput,
|
|
11
|
+
export type { CounterInputIcons, CounterInputProps, DropdownInputProps, DropdownInputStyles, FractionValue, InputActionProps, InputActionStyles, InputBaseProps, InputBaseStyles, InputRowContainerProps, InputScaffoldIcons, InputScaffoldProps, InputScaffoldStyles, NumberInputIcons, NumberInputPlaceholders, NumberInputProps, NumberInputValue, NumberValue, RangeValue, RatingInputIcons, RatingInputProps, RatingInputStyles, SelectionInputIcons, SelectionInputProps, SelectionInputStyles, TextInputProps, TextInputStyles, TimeInputIcons, TimeInputProps, TimeInputValue, ToggleInputIcons, ToggleInputProps, ToggleInputStyles, } from "./input";
|
|
12
|
+
export { CounterInput, DropdownInput, InputAction, InputBase, InputRowContainer, InputScaffold, NumberInput, RatingInput, SelectionInput, TextInput, TimeInput, ToggleInput, } from "./input";
|
|
13
13
|
export { ListItem, ListItemAlert, ListItemAvatar, ListItemFooter, type ListItemProps, ListItemRow, type ListItemStyles, } from "./listItem";
|
|
14
14
|
export type { MenuItemProps, MenuItemStyles, MenuProps, MenuStyles, } from "./menu";
|
|
15
15
|
export { Menu, MenuItem, } from "./menu";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACR,eAAe,EACf,WAAW,EACX,YAAY,EACZ,mBAAmB,EACnB,oBAAoB,EACpB,eAAe,EACf,gBAAgB,GACnB,MAAM,UAAU,CAAC;AAClB,OAAO,EACH,MAAM,EACN,UAAU,EACV,UAAU,EACV,cAAc,GACjB,MAAM,UAAU,CAAC;AAClB,OAAO,EACH,cAAc,EACd,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,GAC5B,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,KAAK,YAAY,EAAE,MAAM,UAAU,CAAC;AACvE,YAAY,EACR,eAAe,EACf,gBAAgB,EAChB,WAAW,EACX,YAAY,EACZ,mBAAmB,EACnB,oBAAoB,EACpB,eAAe,EACf,gBAAgB,GACnB,MAAM,UAAU,CAAC;AAClB,OAAO,EACH,MAAM,EACN,UAAU,EACV,UAAU,EACV,cAAc,GACjB,MAAM,UAAU,CAAC;AAClB,YAAY,EACR,sBAAsB,EACtB,uBAAuB,EACvB,kBAAkB,EAClB,YAAY,EACZ,UAAU,GACb,MAAM,aAAa,CAAC;AACrB,OAAO,EACH,iBAAiB,EACjB,aAAa,EACb,OAAO,EACP,KAAK,GACR,MAAM,aAAa,CAAC;AACrB,YAAY,EACR,aAAa,EACb,cAAc,EACd,kBAAkB,EAClB,SAAS,EACT,UAAU,EACV,qBAAqB,GACxB,MAAM,QAAQ,CAAC;AAChB,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AACxC,YAAY,EACR,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EACnB,aAAa,EACb,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,EACd,eAAe,EACf,sBAAsB,EACtB,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EACnB,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,WAAW,EACX,UAAU,EACV,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACnB,oBAAoB,EACpB,cAAc,EACd,eAAe,EACf,cAAc,EACd,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,GACpB,MAAM,SAAS,CAAC;AACjB,OAAO,EACH,YAAY,EACZ,aAAa,EACb,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACR,eAAe,EACf,WAAW,EACX,YAAY,EACZ,mBAAmB,EACnB,oBAAoB,EACpB,eAAe,EACf,gBAAgB,GACnB,MAAM,UAAU,CAAC;AAClB,OAAO,EACH,MAAM,EACN,UAAU,EACV,UAAU,EACV,cAAc,GACjB,MAAM,UAAU,CAAC;AAClB,OAAO,EACH,cAAc,EACd,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,GAC5B,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,KAAK,YAAY,EAAE,MAAM,UAAU,CAAC;AACvE,YAAY,EACR,eAAe,EACf,gBAAgB,EAChB,WAAW,EACX,YAAY,EACZ,mBAAmB,EACnB,oBAAoB,EACpB,eAAe,EACf,gBAAgB,GACnB,MAAM,UAAU,CAAC;AAClB,OAAO,EACH,MAAM,EACN,UAAU,EACV,UAAU,EACV,cAAc,GACjB,MAAM,UAAU,CAAC;AACl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IAAI,EACJ,QAAQ,GACX,MAAM,QAAQ,CAAC;AAChB,OAAO,EACH,cAAc,EACd,MAAM,EACN,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,aAAa,EACb,aAAa,GAChB,MAAM,UAAU,CAAC;AAClB,OAAO,EACH,WAAW,EACX,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,kBAAkB,EAClB,KAAK,uBAAuB,GAC/B,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACpE,YAAY,EACR,oBAAoB,EACpB,qBAAqB,EACrB,qBAAqB,EACrB,SAAS,EACT,UAAU,GACb,MAAM,QAAQ,CAAC;AAChB,OAAO,EACH,eAAe,EACf,IAAI,GACP,MAAM,QAAQ,CAAC;AAChB,OAAO,EAAE,KAAK,EAAE,KAAK,UAAU,EAAE,KAAK,WAAW,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -3,7 +3,9 @@ import type { ComponentIconAssets } from "../../theme";
|
|
|
3
3
|
import { type InputScaffoldFieldProps } from "./InputScaffold";
|
|
4
4
|
import { type NumberInputBaseProps } from "./NumberInputBase";
|
|
5
5
|
export type CounterInputIcons = ComponentIconAssets<"decrease" | "increase">;
|
|
6
|
-
export interface CounterInputProps extends Omit<NumberInputBaseProps, "style" | "inputStyle">, InputScaffoldFieldProps {
|
|
6
|
+
export interface CounterInputProps extends Omit<NumberInputBaseProps, "value" | "onChange" | "onChangeText" | "style" | "inputStyle">, InputScaffoldFieldProps {
|
|
7
|
+
value?: string;
|
|
8
|
+
onChange?: (value: string) => void;
|
|
7
9
|
disableKeyboardInput?: boolean;
|
|
8
10
|
interval?: number;
|
|
9
11
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CounterInput.d.ts","sourceRoot":"","sources":["../../../../src/components/input/CounterInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAIhC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAGvD,OAAO,EAAiB,KAAK,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAC9E,OAAO,EAAmB,KAAK,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAE/E,MAAM,MAAM,iBAAiB,GAAG,mBAAmB,CAAC,UAAU,GAAG,UAAU,CAAC,CAAC;AAE7E,MAAM,WAAW,iBACb,SAAQ,IAAI,
|
|
1
|
+
{"version":3,"file":"CounterInput.d.ts","sourceRoot":"","sources":["../../../../src/components/input/CounterInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAIhC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAGvD,OAAO,EAAiB,KAAK,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAC9E,OAAO,EAAmB,KAAK,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAE/E,MAAM,MAAM,iBAAiB,GAAG,mBAAmB,CAAC,UAAU,GAAG,UAAU,CAAC,CAAC;AAE7E,MAAM,WAAW,iBACb,SAAQ,IAAI,CACJ,oBAAoB,EACpB,OAAO,GAAG,UAAU,GAAG,cAAc,GAAG,OAAO,GAAG,YAAY,CACjE,EACD,uBAAuB;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,iBAAiB,CAgF9C,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { FC,
|
|
1
|
+
import type { FC, RefObject } from "react";
|
|
2
2
|
import { type ColorValue, TextInput, type TextInputProps } from "react-native";
|
|
3
3
|
import type { DeepPartial } from "@reillymc/es-utils";
|
|
4
4
|
export type InputState = "enabled" | "disabled";
|
|
@@ -22,7 +22,7 @@ export interface InputBaseProps extends Omit<TextInputProps, "editable" | "style
|
|
|
22
22
|
variant?: InputVariant;
|
|
23
23
|
style?: DeepPartial<InputBaseStyles>;
|
|
24
24
|
inputStyle?: TextInputProps["style"];
|
|
25
|
-
ref?:
|
|
25
|
+
ref?: RefObject<TextInput | null>;
|
|
26
26
|
}
|
|
27
27
|
export declare const InputBase: FC<InputBaseProps>;
|
|
28
28
|
//# sourceMappingURL=InputBase.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputBase.d.ts","sourceRoot":"","sources":["../../../../src/components/input/InputBase.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"InputBase.d.ts","sourceRoot":"","sources":["../../../../src/components/input/InputBase.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,EACH,KAAK,UAAU,EAEf,SAAS,EACT,KAAK,cAAc,EACtB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAKtD,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,UAAU,CAAC;AAChD,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,SAAS,CAAC;AAEjD,MAAM,WAAW,eAAe;IAC5B,SAAS,EAAE;QACP,MAAM,EAAE,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;QACrC,OAAO,EAAE,MAAM,CAAC;QAChB,YAAY,EAAE,MAAM,CAAC;QACrB,eAAe,EAAE,MAAM,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;KACnD,CAAC;IACF,IAAI,EAAE;QACF,QAAQ,EAAE,MAAM,CAAC;QACjB,UAAU,EAAE,MAAM,CAAC;QACnB,KAAK,EAAE,MAAM,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;QACtC,gBAAgB,EAAE,UAAU,CAAC;KAChC,CAAC;CACL;AAED,MAAM,WAAW,cACb,SAAQ,IAAI,CAAC,cAAc,EAAE,UAAU,GAAG,OAAO,CAAC;IAClD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,KAAK,CAAC,EAAE,WAAW,CAAC,eAAe,CAAC,CAAC;IACrC,UAAU,CAAC,EAAE,cAAc,CAAC,OAAO,CAAC,CAAC;IACrC,GAAG,CAAC,EAAE,SAAS,CAAC,SAAS,GAAG,IAAI,CAAC,CAAC;CACrC;AAED,eAAO,MAAM,SAAS,EAAE,EAAE,CAAC,cAAc,CA6BxC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { FC,
|
|
1
|
+
import type { FC, RefObject } from "react";
|
|
2
2
|
import { type TextInput as DefaultTextInput } from "react-native";
|
|
3
3
|
import type { ComponentIconAssets } from "../../theme";
|
|
4
4
|
import { type InputScaffoldFieldProps } from "./InputScaffold";
|
|
@@ -17,13 +17,21 @@ export type FractionValue = {
|
|
|
17
17
|
};
|
|
18
18
|
type Representations = "number" | "fraction" | "range";
|
|
19
19
|
export type NumberInputValue = NumberValue | FractionValue | RangeValue;
|
|
20
|
+
export type NumberInputPlaceholders = {
|
|
21
|
+
value?: string;
|
|
22
|
+
start?: string;
|
|
23
|
+
end?: string;
|
|
24
|
+
whole?: string;
|
|
25
|
+
numerator?: string;
|
|
26
|
+
denominator?: string;
|
|
27
|
+
};
|
|
20
28
|
export type NumberInputIcons = ComponentIconAssets<"number" | "range" | "fraction">;
|
|
21
|
-
export interface NumberInputProps extends Pick<NumberInputBaseProps, "disabled" | "
|
|
29
|
+
export interface NumberInputProps extends Pick<NumberInputBaseProps, "disabled" | "maxLength" | "onSubmitEditing" | "clearButtonMode" | "variant">, InputScaffoldFieldProps {
|
|
22
30
|
keyboardType?: "decimal-pad" | "number-pad";
|
|
23
31
|
enabledRepresentations?: Representations[];
|
|
24
32
|
value?: NumberInputValue;
|
|
25
|
-
|
|
26
|
-
ref?:
|
|
33
|
+
placeholder?: NumberInputPlaceholders;
|
|
34
|
+
ref?: RefObject<DefaultTextInput | null>;
|
|
27
35
|
onChange?: (e: NumberInputValue) => void;
|
|
28
36
|
}
|
|
29
37
|
export declare const NumberInput: FC<NumberInputProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NumberInput.d.ts","sourceRoot":"","sources":["../../../../src/components/input/NumberInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"NumberInput.d.ts","sourceRoot":"","sources":["../../../../src/components/input/NumberInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,EACH,KAAK,SAAS,IAAI,gBAAgB,EAGrC,MAAM,cAAc,CAAC;AAGtB,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAIvD,OAAO,EAAiB,KAAK,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAC9E,OAAO,EAAmB,KAAK,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAE/E,MAAM,MAAM,WAAW,GAAG;IAAE,cAAc,EAAE,QAAQ,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AACtE,MAAM,MAAM,UAAU,GAAG;IAAE,cAAc,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAE,CAAC;AAC9E,MAAM,MAAM,aAAa,GAAG;IACxB,cAAc,EAAE,UAAU,CAAC;IAC3B,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;CACnC,CAAC;AAEF,KAAK,eAAe,GAAG,QAAQ,GAAG,UAAU,GAAG,OAAO,CAAC;AA2CvD,MAAM,MAAM,gBAAgB,GAAG,WAAW,GAAG,aAAa,GAAG,UAAU,CAAC;AAExE,MAAM,MAAM,uBAAuB,GAAG;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAaF,MAAM,MAAM,gBAAgB,GAAG,mBAAmB,CAC9C,QAAQ,GAAG,OAAO,GAAG,UAAU,CAClC,CAAC;AAEF,MAAM,WAAW,gBACb,SAAQ,IAAI,CACJ,oBAAoB,EAClB,UAAU,GACV,WAAW,GACX,iBAAiB,GACjB,iBAAiB,GACjB,SAAS,CACd,EACD,uBAAuB;IAC3B,YAAY,CAAC,EAAE,aAAa,GAAG,YAAY,CAAC;IAE5C,sBAAsB,CAAC,EAAE,eAAe,EAAE,CAAC;IAE3C,KAAK,CAAC,EAAE,gBAAgB,CAAC;IAEzB,WAAW,CAAC,EAAE,uBAAuB,CAAC;IAEtC,GAAG,CAAC,EAAE,SAAS,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAC;IAEzC,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,gBAAgB,KAAK,IAAI,CAAC;CAC5C;AAED,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CAwL5C,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { FC,
|
|
1
|
+
import type { FC, RefObject } from "react";
|
|
2
2
|
import type { TextInput, TextInputChangeEvent } from "react-native";
|
|
3
3
|
import { type InputBaseProps } from "./InputBase";
|
|
4
4
|
export type NumberInputBaseStyles = never;
|
|
@@ -6,7 +6,7 @@ export interface NumberInputBaseProps extends InputBaseProps {
|
|
|
6
6
|
keyboardType?: "decimal-pad" | "number-pad";
|
|
7
7
|
min?: number;
|
|
8
8
|
max?: number;
|
|
9
|
-
ref?:
|
|
9
|
+
ref?: RefObject<TextInput | null>;
|
|
10
10
|
/**
|
|
11
11
|
* Validates number entry and returns string.
|
|
12
12
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NumberInputBase.d.ts","sourceRoot":"","sources":["../../../../src/components/input/NumberInputBase.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"NumberInputBase.d.ts","sourceRoot":"","sources":["../../../../src/components/input/NumberInputBase.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,SAAS,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAEpE,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7D,MAAM,MAAM,qBAAqB,GAAG,KAAK,CAAC;AAa1C,MAAM,WAAW,oBAAqB,SAAQ,cAAc;IACxD,YAAY,CAAC,EAAE,aAAa,GAAG,YAAY,CAAC;IAE5C,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb,GAAG,CAAC,EAAE,SAAS,CAAC,SAAS,GAAG,IAAI,CAAC,CAAC;IAElC;;OAEG;IACH,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAEtC;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,oBAAoB,KAAK,IAAI,CAAC;CAChD;AAED,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CAgBpD,CAAC"}
|
|
@@ -18,11 +18,11 @@ export type SelectionInputStyles = {
|
|
|
18
18
|
export type SelectionInputIcons = ComponentIconAssets<"showOptions">;
|
|
19
19
|
interface SingleSelection<T> {
|
|
20
20
|
selectionMode: "single";
|
|
21
|
-
|
|
21
|
+
value?: ValueItem<T>;
|
|
22
22
|
}
|
|
23
23
|
interface MultiSelection<T> {
|
|
24
24
|
selectionMode: "multi";
|
|
25
|
-
|
|
25
|
+
value?: Array<ValueItem<T>>;
|
|
26
26
|
}
|
|
27
27
|
export type SelectionProps<T = string> = Pick<InputBaseProps, "placeholder"> & (SingleSelection<T> | MultiSelection<T>) & {
|
|
28
28
|
items?: Array<ValueItem<T>>;
|
|
@@ -30,11 +30,11 @@ export type SelectionProps<T = string> = Pick<InputBaseProps, "placeholder"> & (
|
|
|
30
30
|
export type SelectionInputProps<T = string> = Pick<InputBaseProps, "disabled" | "variant"> & InputScaffoldFieldProps & SelectionProps<T> & {
|
|
31
31
|
hideLabel?: boolean;
|
|
32
32
|
style?: DeepPartial<SelectionInputStyles>;
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
onChange?: (value: ValueItem<T> | Array<ValueItem<T>> | undefined) => void;
|
|
34
|
+
onOpen?: () => void;
|
|
35
35
|
};
|
|
36
36
|
export declare const SelectionInput: {
|
|
37
|
-
<T>({ label, disabled: disabledProp, placeholder, hideLabel, selectionMode,
|
|
37
|
+
<T>({ label, disabled: disabledProp, placeholder, hideLabel, selectionMode, value, style: styleOverrides, variant, onOpen, onChange, ...props }: SelectionInputProps<T>): import("react").JSX.Element;
|
|
38
38
|
displayName: string;
|
|
39
39
|
};
|
|
40
40
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectionInput.d.ts","sourceRoot":"","sources":["../../../../src/components/input/SelectionInput.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAoB,MAAM,cAAc,CAAC;AACjE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEtD,OAAO,KAAK,EAAE,SAAS,E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,CAAC,CAAC,CAAC,GAAG,SAAS,KACpD,IAAI,CAAC;IACV,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB,CAAC;AAKN,eAAO,MAAM,cAAc;KAAI,CAAC,+IAY7B,mBAAmB,CAAC,CAAC,CAAC;;CAkFxB,CAAC"}
|
|
@@ -7,10 +7,13 @@ export type TimeInputValue = {
|
|
|
7
7
|
minutes: string;
|
|
8
8
|
};
|
|
9
9
|
export type TimeInputIcons = ComponentIconAssets<"time">;
|
|
10
|
+
export type TimeInputPlaceholders = {
|
|
11
|
+
hours?: string;
|
|
12
|
+
minutes?: string;
|
|
13
|
+
};
|
|
10
14
|
export interface TimeInputProps extends Pick<NumberInputBaseProps, "disabled" | "onSubmitEditing" | "clearButtonMode" | "variant">, InputScaffoldFieldProps {
|
|
11
15
|
value?: TimeInputValue;
|
|
12
|
-
|
|
13
|
-
minutesPlaceholder?: string;
|
|
16
|
+
placeholder?: TimeInputPlaceholders;
|
|
14
17
|
onChange?: (e: TimeInputValue) => void;
|
|
15
18
|
}
|
|
16
19
|
export declare const TimeInput: FC<TimeInputProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TimeInput.d.ts","sourceRoot":"","sources":["../../../../src/components/input/TimeInput.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,EAAoB,MAAM,OAAO,CAAC;AAQlD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAKvD,OAAO,EAAiB,KAAK,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAC9E,OAAO,EAAmB,KAAK,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAE/E,MAAM,MAAM,cAAc,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAIhE,MAAM,MAAM,cAAc,GAAG,mBAAmB,CAAC,MAAM,CAAC,CAAC;AAEzD,MAAM,WAAW,cACb,SAAQ,IAAI,CACJ,oBAAoB,EACpB,UAAU,GAAG,iBAAiB,GAAG,iBAAiB,GAAG,SAAS,CACjE,EACD,uBAAuB;IAC3B,KAAK,CAAC,EAAE,cAAc,CAAC;IAEvB,
|
|
1
|
+
{"version":3,"file":"TimeInput.d.ts","sourceRoot":"","sources":["../../../../src/components/input/TimeInput.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,EAAoB,MAAM,OAAO,CAAC;AAQlD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAKvD,OAAO,EAAiB,KAAK,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAC9E,OAAO,EAAmB,KAAK,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAE/E,MAAM,MAAM,cAAc,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAIhE,MAAM,MAAM,cAAc,GAAG,mBAAmB,CAAC,MAAM,CAAC,CAAC;AAEzD,MAAM,MAAM,qBAAqB,GAAG;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,WAAW,cACb,SAAQ,IAAI,CACJ,oBAAoB,EACpB,UAAU,GAAG,iBAAiB,GAAG,iBAAiB,GAAG,SAAS,CACjE,EACD,uBAAuB;IAC3B,KAAK,CAAC,EAAE,cAAc,CAAC;IAEvB,WAAW,CAAC,EAAE,qBAAqB,CAAC;IAEpC,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,cAAc,KAAK,IAAI,CAAC;CAC1C;AAED,eAAO,MAAM,SAAS,EAAE,EAAE,CAAC,cAAc,CAqHxC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { PropsWithChildren } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Prevents the input from losing focus when interacting with the dropdown.
|
|
4
|
+
* On native this is a no-op; on web it cancels the default `mousedown`
|
|
5
|
+
* behaviour so a click on a menu item can complete without blurring the input.
|
|
6
|
+
*/
|
|
7
|
+
export declare const DropdownBlurGuard: ({ children }: PropsWithChildren) => import("react").ReactNode;
|
|
8
|
+
//# sourceMappingURL=DropdownBlurGuard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DropdownBlurGuard.d.ts","sourceRoot":"","sources":["../../../../../src/components/input/dropdownInput/DropdownBlurGuard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAE/C;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,GAAI,cAAc,iBAAiB,8BAAa,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { PropsWithChildren } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Prevents the input from losing focus when interacting with the dropdown.
|
|
4
|
+
* Cancels the default `mousedown` behaviour (which would blur the input and
|
|
5
|
+
* unmount the dropdown before the click lands) so a click on a menu item can
|
|
6
|
+
* complete.
|
|
7
|
+
*/
|
|
8
|
+
export declare const DropdownBlurGuard: ({ children }: PropsWithChildren) => import("react").JSX.Element;
|
|
9
|
+
//# sourceMappingURL=DropdownBlurGuard.web.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DropdownBlurGuard.web.d.ts","sourceRoot":"","sources":["../../../../../src/components/input/dropdownInput/DropdownBlurGuard.web.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAW/C;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,GAAI,cAAc,iBAAiB,gCAEhE,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type InputScaffoldFieldProps } from "../InputScaffold";
|
|
2
|
+
import { type DropdownInputBaseProps } from "./DropdownInputBase";
|
|
3
|
+
export interface DropdownInputStyles {
|
|
4
|
+
panelGap: number;
|
|
5
|
+
}
|
|
6
|
+
export type DropdownInputProps<T = string> = Pick<DropdownInputBaseProps<T>, "autoCapitalize" | "returnKeyType" | "returnKeyLabel" | "onBlur" | "placeholder" | "onChangeText" | "controllerRef" | "clearButtonMode" | "maxLength" | "onSubmitEditing" | "autoFocus" | "disabled" | "variant" | "items" | "value" | "defaultValue" | "onChange" | "openOnFocus" | "allowsCustomValue" | "blurOnSelect" | "filterItems" | "minimumSearchLength" | "maxSuggestionCount" | "maxContainerHeight" | "containerPosition" | "ref"> & InputScaffoldFieldProps;
|
|
7
|
+
export declare const DropdownInput: <T>({ label, helpText, hasError, mandatory, containerStyle, ...props }: DropdownInputProps<T>) => import("react").JSX.Element;
|
|
8
|
+
//# sourceMappingURL=DropdownInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DropdownInput.d.ts","sourceRoot":"","sources":["../../../../../src/components/input/dropdownInput/DropdownInput.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAC/E,OAAO,EAEH,KAAK,sBAAsB,EAC9B,MAAM,qBAAqB,CAAC;AAE7B,MAAM,WAAW,mBAAmB;IAChC,QAAQ,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,MAAM,kBAAkB,CAAC,CAAC,GAAG,MAAM,IAAI,IAAI,CAC7C,sBAAsB,CAAC,CAAC,CAAC,EACvB,gBAAgB,GAChB,eAAe,GACf,gBAAgB,GAChB,QAAQ,GACR,aAAa,GACb,cAAc,GACd,eAAe,GACf,iBAAiB,GACjB,WAAW,GACX,iBAAiB,GACjB,WAAW,GACX,UAAU,GACV,SAAS,GACT,OAAO,GACP,OAAO,GACP,cAAc,GACd,UAAU,GACV,aAAa,GACb,mBAAmB,GACnB,cAAc,GACd,aAAa,GACb,qBAAqB,GACrB,oBAAoB,GACpB,oBAAoB,GACpB,mBAAmB,GACnB,KAAK,CACV,GACG,uBAAuB,CAAC;AAC5B,eAAO,MAAM,aAAa,GAAI,CAAC,EAAG,oEAO/B,kBAAkB,CAAC,CAAC,CAAC,gCAUvB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Theme } from "
|
|
1
|
+
import type { Theme } from "../../../theme/theme";
|
|
2
2
|
import type { DropdownInputStyles } from "./DropdownInput";
|
|
3
3
|
export declare const defaultDropdownInputStyles: (_theme: Theme) => DropdownInputStyles;
|
|
4
4
|
//# sourceMappingURL=DropdownInput.styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DropdownInput.styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/input/dropdownInput/DropdownInput.styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAE3D,eAAO,MAAM,0BAA0B,GACnC,QAAQ,KAAK,KACd,mBAED,CAAC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { type RefObject } from "react";
|
|
2
|
+
import { type TextInput as DefaultTextInput } from "react-native";
|
|
3
|
+
import type { ValueItem } from "../../../common";
|
|
4
|
+
import { type AnchoredContainerProps } from "../../container";
|
|
5
|
+
import { type InputBaseProps } from "../InputBase";
|
|
6
|
+
import { type DropdownValue } from "./helpers";
|
|
7
|
+
export type { DropdownValue } from "./helpers";
|
|
8
|
+
export interface DropdownInputHandle {
|
|
9
|
+
setInputValue: (text: string) => void;
|
|
10
|
+
clear: () => void;
|
|
11
|
+
open: () => void;
|
|
12
|
+
close: () => void;
|
|
13
|
+
focus: () => void;
|
|
14
|
+
blur: () => void;
|
|
15
|
+
}
|
|
16
|
+
export type DropdownInputBaseProps<T = string> = Pick<InputBaseProps, "autoCapitalize" | "returnKeyType" | "returnKeyLabel" | "onBlur" | "onFocus" | "onKeyPress" | "placeholder" | "clearButtonMode" | "maxLength" | "onSubmitEditing" | "autoFocus" | "disabled" | "variant" | "inputStyle"> & {
|
|
17
|
+
items?: Array<ValueItem<T>>;
|
|
18
|
+
/**
|
|
19
|
+
* The selected item's key. Controlled when supplied; otherwise the
|
|
20
|
+
* component manages selection internally (seed it with `defaultValue`).
|
|
21
|
+
*/
|
|
22
|
+
value?: DropdownValue<T>;
|
|
23
|
+
/** Initial selection for uncontrolled usage. */
|
|
24
|
+
defaultValue?: DropdownValue<T>;
|
|
25
|
+
/**
|
|
26
|
+
* Called when the selection changes. The item is `undefined` for a custom
|
|
27
|
+
* (free-typed) value; `inputValue` is always the current input text.
|
|
28
|
+
*/
|
|
29
|
+
onChange?: (item: ValueItem<T> | undefined, inputValue: string) => void;
|
|
30
|
+
/**
|
|
31
|
+
* Notification for text changes: user typing, imperative set/clear, and
|
|
32
|
+
* reverts to the selected label on blur/escape. Not called on selection
|
|
33
|
+
* (use `onChange` for that).
|
|
34
|
+
*/
|
|
35
|
+
onChangeText?: (text: string) => void;
|
|
36
|
+
/** Imperative controls (set text, clear, open/close, focus/blur). */
|
|
37
|
+
controllerRef?: RefObject<DropdownInputHandle | null>;
|
|
38
|
+
/**
|
|
39
|
+
* Whether focusing the input opens the list of all options.
|
|
40
|
+
* @default true
|
|
41
|
+
*/
|
|
42
|
+
openOnFocus?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Whether free-typed values that don't match an item are kept and reported
|
|
45
|
+
* through `onChange` (rather than reverting to the selected item on blur).
|
|
46
|
+
* @default false
|
|
47
|
+
*/
|
|
48
|
+
allowsCustomValue?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Whether selecting an item blurs (and closes) the input.
|
|
51
|
+
* @default true
|
|
52
|
+
*/
|
|
53
|
+
blurOnSelect?: boolean;
|
|
54
|
+
/** Overrides the default label/description matching. */
|
|
55
|
+
filterItems?: (item: ValueItem<T>, query: string) => boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Minimum number of characters required before typed suggestions appear.
|
|
58
|
+
* @default 1
|
|
59
|
+
*/
|
|
60
|
+
minimumSearchLength?: number;
|
|
61
|
+
/** Optional cap on the number of rendered items. */
|
|
62
|
+
maxSuggestionCount?: number;
|
|
63
|
+
/**
|
|
64
|
+
* Maximum height of the dropdown container. When items overflow the
|
|
65
|
+
* container becomes scrollable. Defaults to the themed `menu.maxHeight`.
|
|
66
|
+
*/
|
|
67
|
+
maxContainerHeight?: number;
|
|
68
|
+
containerPosition?: AnchoredContainerProps["position"];
|
|
69
|
+
ref?: RefObject<DefaultTextInput | null>;
|
|
70
|
+
};
|
|
71
|
+
export declare const DropdownInputBase: <T>(props: DropdownInputBaseProps<T>) => import("react").JSX.Element;
|
|
72
|
+
//# sourceMappingURL=DropdownInputBase.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DropdownInputBase.d.ts","sourceRoot":"","sources":["../../../../../src/components/input/dropdownInput/DropdownInputBase.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAiC,MAAM,OAAO,CAAC;AACtE,OAAO,EACH,KAAK,SAAS,IAAI,gBAAgB,EAGrC,MAAM,cAAc,CAAC;AAGtB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAMjD,OAAO,EAEH,KAAK,sBAAsB,EAC9B,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9D,OAAO,EAAE,KAAK,aAAa,EAAc,MAAM,WAAW,CAAC;AAG3D,YAAY,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE/C,MAAM,WAAW,mBAAmB;IAChC,aAAa,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,KAAK,EAAE,MAAM,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B,CAAC,EAAE,MAAM,CAAC;IAE5B,iBAAiB,CAAC,EAAE,sBAAsB,CAAC,UAAU,CAAC,CAAC;IAEvD,GAAG,CAAC,EAAE,SAAS,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAC;CAC5C,CAAC;AAIF,eAAO,MAAM,iBAAiB,GAAI,CAAC,EAAG,OAAO,sBAAsB,CAAC,CAAC,CAAC,gCAoJrE,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ValueItem } from "../../../common";
|
|
2
|
+
export type DropdownValue<T> = T extends string | number ? T : string;
|
|
3
|
+
export declare const getItemKey: <T>(item: ValueItem<T>) => DropdownValue<T>;
|
|
4
|
+
export type DropdownFilterOptions<T> = {
|
|
5
|
+
filterItems?: (item: ValueItem<T>, query: string) => boolean;
|
|
6
|
+
maxSuggestionCount?: number;
|
|
7
|
+
minimumSearchLength?: number;
|
|
8
|
+
};
|
|
9
|
+
export declare const filterDropdownItems: <T>(items: Array<ValueItem<T>>, query: string, { filterItems, maxSuggestionCount, minimumSearchLength, }: DropdownFilterOptions<T>) => {
|
|
10
|
+
filteredItems: ValueItem<T>[];
|
|
11
|
+
meetsMinimum: boolean;
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../../src/components/input/dropdownInput/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEjD,MAAM,MAAM,aAAa,CAAC,CAAC,IAAI,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,CAAC,GAAG,MAAM,CAAC;AAEtE,eAAO,MAAM,UAAU,GAAI,CAAC,EAAE,MAAM,SAAS,CAAC,CAAC,CAAC,KAAG,aAAa,CAAC,CAAC,CACL,CAAC;AAE9D,MAAM,MAAM,qBAAqB,CAAC,CAAC,IAAI;IACnC,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC;IAC7D,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAChC,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,CAAC,EACjC,OAAO,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,EAC1B,OAAO,MAAM,EACb,2DAIG,qBAAqB,CAAC,CAAC,CAAC;;;CAiC9B,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export type { DropdownInputProps, DropdownInputStyles, } from "./DropdownInput";
|
|
2
|
+
export { DropdownInput } from "./DropdownInput";
|
|
3
|
+
export { DropdownInputBase, type DropdownInputBaseProps, type DropdownInputHandle, type DropdownValue, } from "./DropdownInputBase";
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/input/dropdownInput/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACR,kBAAkB,EAClB,mBAAmB,GACtB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EACH,iBAAiB,EACjB,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,EACxB,KAAK,aAAa,GACrB,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { type RefObject } from "react";
|
|
2
|
+
import type { BlurEvent, TextInput as DefaultTextInput, FocusEvent, TextInputKeyPressEvent } from "react-native";
|
|
3
|
+
import type { ValueItem } from "../../../common";
|
|
4
|
+
import type { InputBaseProps } from "../InputBase";
|
|
5
|
+
import { type DropdownValue } from "./helpers";
|
|
6
|
+
export type DropdownControllerOptions<T> = {
|
|
7
|
+
items: Array<ValueItem<T>>;
|
|
8
|
+
value: DropdownValue<T> | undefined;
|
|
9
|
+
defaultValue: DropdownValue<T> | undefined;
|
|
10
|
+
isValueControlled: boolean;
|
|
11
|
+
onChange?: (item: ValueItem<T> | undefined, inputValue: string) => void;
|
|
12
|
+
onChangeText?: (text: string) => void;
|
|
13
|
+
onFocus?: InputBaseProps["onFocus"];
|
|
14
|
+
onBlur?: InputBaseProps["onBlur"];
|
|
15
|
+
onKeyPress?: InputBaseProps["onKeyPress"];
|
|
16
|
+
onSubmitEditing?: InputBaseProps["onSubmitEditing"];
|
|
17
|
+
openOnFocus: boolean;
|
|
18
|
+
allowsCustomValue: boolean;
|
|
19
|
+
blurOnSelect: boolean;
|
|
20
|
+
filterItems?: (item: ValueItem<T>, query: string) => boolean;
|
|
21
|
+
minimumSearchLength: number;
|
|
22
|
+
maxSuggestionCount?: number;
|
|
23
|
+
inputRef: RefObject<DefaultTextInput | null>;
|
|
24
|
+
isMenuInverted?: boolean;
|
|
25
|
+
};
|
|
26
|
+
export declare const useDropdownController: <T>({ items, value, defaultValue, isValueControlled, onChange, onChangeText, onFocus, onBlur, onKeyPress, onSubmitEditing, openOnFocus, allowsCustomValue, blurOnSelect, filterItems, minimumSearchLength, maxSuggestionCount, inputRef, isMenuInverted, }: DropdownControllerOptions<T>) => {
|
|
27
|
+
displayText: string;
|
|
28
|
+
query: string;
|
|
29
|
+
filteredItems: ValueItem<T>[];
|
|
30
|
+
showContainer: boolean;
|
|
31
|
+
activeIndex: number;
|
|
32
|
+
handleFocus: (e: FocusEvent) => void;
|
|
33
|
+
handleBlur: (e: BlurEvent) => void;
|
|
34
|
+
handleChangeText: (next: string) => void;
|
|
35
|
+
handleKeyPress: (e: TextInputKeyPressEvent) => void;
|
|
36
|
+
handleSubmitEditing: (e: import("react-native").TextInputSubmitEditingEvent) => void;
|
|
37
|
+
selectItem: (item: ValueItem<T>) => void;
|
|
38
|
+
setInputValue: (next: string) => void;
|
|
39
|
+
clear: () => void;
|
|
40
|
+
open: () => void;
|
|
41
|
+
close: () => void;
|
|
42
|
+
};
|
|
43
|
+
//# sourceMappingURL=useDropdownController.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDropdownController.d.ts","sourceRoot":"","sources":["../../../../../src/components/input/dropdownInput/useDropdownController.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAoB,MAAM,OAAO,CAAC;AACzD,OAAO,KAAK,EACR,SAAS,EACT,SAAS,IAAI,gBAAgB,EAC7B,UAAU,EACV,sBAAsB,EACzB,MAAM,cAAc,CAAC;AAEtB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,KAAK,aAAa,EAAmC,MAAM,WAAW,CAAC;AAQhF,MAAM,MAAM,yBAAyB,CAAC,CAAC,IAAI;IACvC,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;IAC3B,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC;IACpC,YAAY,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC;IAC3C,iBAAiB,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,GAAG,SAAS,EAAE,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IACxE,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,OAAO,CAAC,EAAE,cAAc,CAAC,SAAS,CAAC,CAAC;IACpC,MAAM,CAAC,EAAE,cAAc,CAAC,QAAQ,CAAC,CAAC;IAClC,UAAU,CAAC,EAAE,cAAc,CAAC,YAAY,CAAC,CAAC;IAC1C,eAAe,CAAC,EAAE,cAAc,CAAC,iBAAiB,CAAC,CAAC;IACpD,WAAW,EAAE,OAAO,CAAC;IACrB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,YAAY,EAAE,OAAO,CAAC;IACtB,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC;IAC7D,mBAAmB,EAAE,MAAM,CAAC;IAC5B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,EAAE,SAAS,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAC;IAC7C,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAAI,CAAC,EAAE,wPAmBtC,yBAAyB,CAAC,CAAC,CAAC;;;;;;;;6BAyFK,MAAM;;;uBA7CZ,SAAS,CAAC,CAAC,CAAC;0BAkJT,MAAM;;;;CAqCtC,CAAC"}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
export type { CounterInputIcons, CounterInputProps } from "./CounterInput";
|
|
2
2
|
export { CounterInput } from "./CounterInput";
|
|
3
|
-
export type
|
|
4
|
-
export { DropdownInput } from "./DropdownInput";
|
|
5
|
-
export { DropdownInputBase, type DropdownInputBaseProps, } from "./DropdownInputBase";
|
|
3
|
+
export { DropdownInput, type DropdownInputProps, type DropdownInputStyles, } from "./dropdownInput";
|
|
6
4
|
export type { InputActionProps, InputActionStyles, } from "./InputAction";
|
|
7
5
|
export { InputAction } from "./InputAction";
|
|
8
6
|
export type { InputBaseProps, InputBaseStyles } from "./InputBase";
|
|
@@ -11,7 +9,7 @@ export type { InputRowContainerProps } from "./InputRowContainer";
|
|
|
11
9
|
export { InputRowContainer } from "./InputRowContainer";
|
|
12
10
|
export type { InputScaffoldIcons, InputScaffoldProps, InputScaffoldStyles, } from "./InputScaffold";
|
|
13
11
|
export { InputScaffold } from "./InputScaffold";
|
|
14
|
-
export type { FractionValue, NumberInputIcons, NumberInputProps, NumberInputValue, NumberValue, RangeValue, } from "./NumberInput";
|
|
12
|
+
export type { FractionValue, NumberInputIcons, NumberInputPlaceholders, NumberInputProps, NumberInputValue, NumberValue, RangeValue, } from "./NumberInput";
|
|
15
13
|
export { NumberInput } from "./NumberInput";
|
|
16
14
|
export type { RatingInputIcons, RatingInputProps, RatingInputStyles, } from "./RatingInput";
|
|
17
15
|
export { RatingInput } from "./RatingInput";
|
|
@@ -19,7 +17,7 @@ export type { SelectionInputIcons, SelectionInputProps, SelectionInputStyles, }
|
|
|
19
17
|
export { SelectionInput } from "./SelectionInput";
|
|
20
18
|
export type { TextInputProps, TextInputStyles } from "./TextInput";
|
|
21
19
|
export { TextInput } from "./TextInput";
|
|
22
|
-
export type { TimeInputIcons, TimeInputProps, TimeInputValue, } from "./TimeInput";
|
|
20
|
+
export type { TimeInputIcons, TimeInputPlaceholders, TimeInputProps, TimeInputValue, } from "./TimeInput";
|
|
23
21
|
export { TimeInput } from "./TimeInput";
|
|
24
22
|
export type { ToggleInputIcons, ToggleInputProps, ToggleInputStyles, } from "./ToggleInput";
|
|
25
23
|
export { ToggleInput } from "./ToggleInput";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/input/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAC3E,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/input/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAC3E,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EACH,aAAa,EACb,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,GAC3B,MAAM,iBAAiB,CAAC;AACzB,YAAY,EACR,gBAAgB,EAChB,iBAAiB,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,5 +1,4 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import { type ColorValue } from "react-native";
|
|
1
|
+
import { type ColorValue, type FlatListProps, type ListRenderItem } from "react-native";
|
|
3
2
|
import type { DeepPartial } from "@reillymc/es-utils";
|
|
4
3
|
export type MenuStyles = {
|
|
5
4
|
parentMargin: number;
|
|
@@ -7,10 +6,22 @@ export type MenuStyles = {
|
|
|
7
6
|
borderRadius: number;
|
|
8
7
|
padding: number;
|
|
9
8
|
gap: number;
|
|
9
|
+
maxHeight: number;
|
|
10
10
|
};
|
|
11
|
-
export type MenuProps =
|
|
12
|
-
|
|
11
|
+
export type MenuProps<T = unknown> = {
|
|
12
|
+
data: ReadonlyArray<T>;
|
|
13
|
+
renderItem: ListRenderItem<T>;
|
|
14
|
+
keyExtractor: (item: T, index: number) => string;
|
|
13
15
|
reverse?: boolean;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
+
maxHeight?: number;
|
|
17
|
+
onScroll?: FlatListProps<T>["onScroll"];
|
|
18
|
+
showsScrollIndicator?: boolean;
|
|
19
|
+
style?: DeepPartial<MenuStyles>;
|
|
20
|
+
/**
|
|
21
|
+
* Passthrough for list features such as pagination/async loading
|
|
22
|
+
* (`onEndReached`, `ListFooterComponent`, `refreshing`, …).
|
|
23
|
+
*/
|
|
24
|
+
listProps?: Omit<FlatListProps<T>, "data" | "renderItem" | "keyExtractor" | "inverted" | "horizontal" | "style" | "contentContainerStyle" | "showsVerticalScrollIndicator">;
|
|
25
|
+
};
|
|
26
|
+
export declare const Menu: <T>({ data, renderItem, keyExtractor, reverse, maxHeight, onScroll, showsScrollIndicator, style, listProps, }: MenuProps<T>) => import("react").JSX.Element;
|
|
16
27
|
//# sourceMappingURL=Menu.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Menu.d.ts","sourceRoot":"","sources":["../../../../src/components/menu/Menu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"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,"file":"Menu.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/menu/Menu.styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE/C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEzC,eAAO,MAAM,iBAAiB,GAAI,OAAO,KAAK,KAAG,
|
|
1
|
+
{"version":3,"file":"Menu.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/menu/Menu.styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE/C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEzC,eAAO,MAAM,iBAAiB,GAAI,OAAO,KAAK,KAAG,UAWhD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuItem.d.ts","sourceRoot":"","sources":["../../../../src/components/menu/MenuItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAOhC,MAAM,MAAM,cAAc,GAAG;IACzB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,MAAM,WAAW,aAAa;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,eAAO,MAAM,QAAQ,EAAE,EAAE,CAAC,aAAa,
|
|
1
|
+
{"version":3,"file":"MenuItem.d.ts","sourceRoot":"","sources":["../../../../src/components/menu/MenuItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAOhC,MAAM,MAAM,cAAc,GAAG;IACzB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,MAAM,WAAW,aAAa;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,eAAO,MAAM,QAAQ,EAAE,EAAE,CAAC,aAAa,CAiCtC,CAAC"}
|