@reillymc/react-native-components 0.11.6 → 0.11.9
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/components/toast/Toast.js +1 -1
- package/lib/components/toast/Toast.styles.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/hooks/useTheme.js +1 -1
- package/lib/hooks/useThemedStyles.js +1 -1
- package/lib/providers/ThemeContext.js +1 -1
- package/lib/providers/ThemeProvider.js +1 -1
- package/lib/theme/index.js +1 -1
- package/lib/theme/styles.js +1 -1
- package/lib/theme/theme.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/components/toast/Toast.d.ts +6 -3
- package/lib/types/components/toast/Toast.d.ts.map +1 -1
- package/lib/types/components/toast/Toast.styles.d.ts +1 -1
- package/lib/types/components/toast/Toast.styles.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/hooks/useTheme.d.ts +6 -1
- package/lib/types/hooks/useTheme.d.ts.map +1 -1
- package/lib/types/hooks/useThemedStyles.d.ts +4 -3
- package/lib/types/hooks/useThemedStyles.d.ts.map +1 -1
- package/lib/types/providers/ThemeContext.d.ts +4 -4
- package/lib/types/providers/ThemeContext.d.ts.map +1 -1
- package/lib/types/providers/ThemeProvider.d.ts +9 -6
- package/lib/types/providers/ThemeProvider.d.ts.map +1 -1
- package/lib/types/theme/index.d.ts +3 -3
- package/lib/types/theme/index.d.ts.map +1 -1
- package/lib/types/theme/styles.d.ts +7 -2
- package/lib/types/theme/styles.d.ts.map +1 -1
- package/lib/types/theme/theme.d.ts +6 -7
- package/lib/types/theme/theme.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,48 @@
|
|
|
1
|
+
import type { FC, ReactNode, RefObject } from "react";
|
|
2
|
+
import type { LayoutChangeEvent, StyleProp, TextInput, View, ViewStyle } from "react-native";
|
|
3
|
+
import type { AnimatedRef } from "react-native-reanimated";
|
|
4
|
+
export type ContainerGeometry = {
|
|
5
|
+
parentY: number;
|
|
6
|
+
parentHeight: number;
|
|
7
|
+
offsetY: number;
|
|
8
|
+
contentHeight: number;
|
|
9
|
+
inverted: boolean;
|
|
10
|
+
visibleAreaHeight: number;
|
|
11
|
+
maxHeight: number;
|
|
12
|
+
parentX?: number;
|
|
13
|
+
parentWidth?: number;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Public surface exposed to the container's render prop.
|
|
17
|
+
*/
|
|
18
|
+
export type ContainerPlacement = {
|
|
19
|
+
inverted: boolean;
|
|
20
|
+
maxHeight: number;
|
|
21
|
+
};
|
|
22
|
+
export type AnchoredContainerStyles = {
|
|
23
|
+
parentMargin: number;
|
|
24
|
+
};
|
|
25
|
+
export type AnchoredContainerChildren = ReactNode | ((placement: ContainerPlacement) => ReactNode);
|
|
26
|
+
export type MountProps = {
|
|
27
|
+
geometry: ContainerGeometry | undefined;
|
|
28
|
+
onLayout: (event: LayoutChangeEvent) => void;
|
|
29
|
+
children: AnchoredContainerChildren;
|
|
30
|
+
containerStyle?: StyleProp<ViewStyle>;
|
|
31
|
+
};
|
|
32
|
+
export interface AnchoredContainerProps {
|
|
33
|
+
parentRef: RefObject<TextInput | null>;
|
|
34
|
+
/**
|
|
35
|
+
* Animated ref to the anchor view. Used by the iOS overlay mount to keep
|
|
36
|
+
* the container attached while scrolling. When omitted, iOS falls back to the
|
|
37
|
+
* in-tree inline mount.
|
|
38
|
+
*/
|
|
39
|
+
anchorRef?: AnimatedRef<View>;
|
|
40
|
+
show?: boolean;
|
|
41
|
+
position?: "auto" | "above";
|
|
42
|
+
gap?: number;
|
|
43
|
+
onInvertedChange?: (inverted: boolean) => void;
|
|
44
|
+
children?: AnchoredContainerChildren;
|
|
45
|
+
containerStyle?: StyleProp<ViewStyle>;
|
|
46
|
+
}
|
|
47
|
+
export declare const AnchoredContainer: FC<AnchoredContainerProps>;
|
|
48
|
+
//# sourceMappingURL=AnchoredContainer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AnchoredContainer.d.ts","sourceRoot":"","sources":["../../../../../src/components/container/anchoredContainer/AnchoredContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,KAAK,EACR,iBAAiB,EACjB,SAAS,EACT,SAAS,EACT,IAAI,EACJ,SAAS,EACZ,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAK3D,MAAM,MAAM,iBAAiB,GAAG;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,OAAO,CAAC;IAClB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC7B,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG;IAClC,YAAY,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAC/B,SAAS,GACT,CAAC,CAAC,SAAS,EAAE,kBAAkB,KAAK,SAAS,CAAC,CAAC;AAErD,MAAM,MAAM,UAAU,GAAG;IACrB,QAAQ,EAAE,iBAAiB,GAAG,SAAS,CAAC;IACxC,QAAQ,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC7C,QAAQ,EAAE,yBAAyB,CAAC;IACpC,cAAc,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CACzC,CAAC;AAEF,MAAM,WAAW,sBAAsB;IACnC,SAAS,EAAE,SAAS,CAAC,SAAS,GAAG,IAAI,CAAC,CAAC;IAEvC;;;;OAIG;IACH,SAAS,CAAC,EAAE,WAAW,CAAC,IAAI,CAAC,CAAC;IAE9B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC5B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IAC/C,QAAQ,CAAC,EAAE,yBAAyB,CAAC;IACrC,cAAc,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CACzC;AAED,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,sBAAsB,CA6BxD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AnchoredContainer.ios.d.ts","sourceRoot":"","sources":["../../../../../src/components/container/anchoredContainer/AnchoredContainer.ios.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAKlE,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,sBAAsB,CA6CxD,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { Theme } from "../../../theme/theme";
|
|
2
|
+
import type { AnchoredContainerStyles } from "./AnchoredContainer";
|
|
3
|
+
export declare const defaultAnchoredContainerStyles: ({ spacing, }: Theme) => AnchoredContainerStyles;
|
|
4
|
+
//# sourceMappingURL=AnchoredContainer.styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AnchoredContainer.styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/container/anchoredContainer/AnchoredContainer.styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAEnE,eAAO,MAAM,8BAA8B,GAAI,cAE5C,KAAK,KAAG,uBAET,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AnchoredContainer.web.d.ts","sourceRoot":"","sources":["../../../../../src/components/container/anchoredContainer/AnchoredContainer.web.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,EAA4C,MAAM,OAAO,CAAC;AAY1E,OAAO,KAAK,EACR,sBAAsB,EAEzB,MAAM,qBAAqB,CAAC;AAY7B,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,sBAAsB,CA6JxD,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { FC } from "react";
|
|
2
|
+
import { type StyleProp, type ViewStyle } from "react-native";
|
|
3
|
+
import type { MountProps } from "./AnchoredContainer";
|
|
4
|
+
export type InlineMountProps = MountProps & {
|
|
5
|
+
style: StyleProp<ViewStyle>;
|
|
6
|
+
};
|
|
7
|
+
export declare const InlineMount: FC<InlineMountProps>;
|
|
8
|
+
//# sourceMappingURL=InlineMount.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InlineMount.d.ts","sourceRoot":"","sources":["../../../../../src/components/container/anchoredContainer/InlineMount.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EAAE,KAAK,SAAS,EAAQ,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAGtD,MAAM,MAAM,gBAAgB,GAAG,UAAU,GAAG;IACxC,KAAK,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC/B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CAY5C,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type FC } from "react";
|
|
2
|
+
import { View } from "react-native";
|
|
3
|
+
import { type AnimatedRef } from "react-native-reanimated";
|
|
4
|
+
import type { MountProps } from "./AnchoredContainer";
|
|
5
|
+
export type OverlayMountProps = MountProps & {
|
|
6
|
+
anchorRef: AnimatedRef<View>;
|
|
7
|
+
margin: number;
|
|
8
|
+
};
|
|
9
|
+
export declare const OverlayMount: FC<OverlayMountProps>;
|
|
10
|
+
//# sourceMappingURL=OverlayMount.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OverlayMount.d.ts","sourceRoot":"","sources":["../../../../../src/components/container/anchoredContainer/OverlayMount.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,EAAe,MAAM,OAAO,CAAC;AAC7C,OAAO,EAAc,IAAI,EAAE,MAAM,cAAc,CAAC;AAChD,OAAiB,EACb,KAAK,WAAW,EAKnB,MAAM,yBAAyB,CAAC;AAGjC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAGtD,MAAM,MAAM,iBAAiB,GAAG,UAAU,GAAG;IACzC,SAAS,EAAE,WAAW,CAAC,IAAI,CAAC,CAAC;IAC7B,MAAM,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,iBAAiB,CA8D9C,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ContainerGeometry, ContainerPlacement } from "./AnchoredContainer";
|
|
2
|
+
export declare const EMPTY_CONTAINER_GEOMETRY: ContainerGeometry;
|
|
3
|
+
export declare const EMPTY_PLACEMENT: ContainerPlacement;
|
|
4
|
+
export declare const getContainerPlacement: (geometry: ContainerGeometry | undefined) => ContainerPlacement;
|
|
5
|
+
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -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.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B,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;AAClB,YAAY,EACR,sBAAsB,EACtB,uBAAuB,EACvB,kBAAkB,EAClB,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,EAA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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,EAAE,MAAM,cAAc,CAAC;AAE9C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAEvD,OAAO,EAAmB,KAAK,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAGtE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAiB,KAAK,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAE9E,MAAM,MAAM,mBAAmB,GAAG,SAAS,GAAG,UAAU,GAAG,SAAS,CAAC;AAErE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putPlaceholders = {
|
|
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,IAAI,CAAC;IAClB,IAAI,EAAE,MAAM,IAAI,CAAC;CACpB;AAED,MAAM,MAAM,sBAAsB,CAAC,CAAC,GAAG,MAAM,IAAI,IAAI,CACjD,cAAc,EACZ,gBAAgB,GAChB,eAAe,GACf,gBAAgB,GAChB,QAAQ,GACR,SAAS,GACT,YAAY,GACZ,aAAa,GACb,iBAAiB,GACjB,WAAW,GACX,iBAAiB,GACjB,WAAW,GACX,UAAU,GACV,SAAS,GACT,YAAY,CACjB,GAAG;IACA,KAAK,CAAC,EAA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
|
+
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"}
|