@reillymc/react-native-components 0.11.7 → 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/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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EACH,KAAK,YAAY,EACjB,SAAS,EACT,eAAe,GAClB,MAAM,mBAAmB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EACH,KAAK,YAAY,EACjB,SAAS,EACT,eAAe,GAClB,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Splits a value into controlled (prop-driven) or uncontrolled (internal)
|
|
3
|
+
* state. `isControlled` is determined by the caller (e.g. whether the prop key
|
|
4
|
+
* was supplied) so that clearing back to `undefined` keeps working in
|
|
5
|
+
* controlled mode.
|
|
6
|
+
*/
|
|
7
|
+
export declare const useControlledState: <T>(isControlled: boolean, value: T | undefined, defaultValue: T | undefined) => readonly [T | undefined, (nextValue: T | undefined) => void];
|
|
8
|
+
//# sourceMappingURL=useControlledState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useControlledState.d.ts","sourceRoot":"","sources":["../../../src/hooks/useControlledState.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,GAAI,CAAC,EAChC,cAAc,OAAO,EACrB,OAAO,CAAC,GAAG,SAAS,EACpB,cAAc,CAAC,GAAG,SAAS,0CAQE,CAAC,GAAG,SAAS,UAO7C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePersistentKeyboardHeight.d.ts","sourceRoot":"","sources":["../../../src/hooks/usePersistentKeyboardHeight.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"usePersistentKeyboardHeight.d.ts","sourceRoot":"","sources":["../../../src/hooks/usePersistentKeyboardHeight.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,2BAA2B;;CAkBvC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DeepPartial } from "@reillymc/es-utils";
|
|
2
|
-
import type { ActionStyles, AlertIndicatorStyles, AvatarStyles, ButtonBaseStyles, ButtonStyles, DropdownInputStyles,
|
|
2
|
+
import type { ActionStyles, AlertIndicatorStyles, AnchoredContainerStyles, AvatarStyles, ButtonBaseStyles, ButtonStyles, DropdownInputStyles, HighlightedTextStyles, IconActionBaseStyles, IconActionStyles, IconBaseStyles, IconButtonBaseStyles, IconButtonStyles, IconStyles, InputActionStyles, InputBaseStyles, InputScaffoldStyles, InteractiveIconStyles, InteractiveTextStyles, ListItemStyles, MenuItemStyles, MenuStyles, RatingInputStyles, RatingStyles, SelectionInputStyles, SwipeActionStyles, TagStyles, TextStyles, ToastStyles, ToggleInputStyles } from "../components";
|
|
3
3
|
import type { Theme } from "./theme";
|
|
4
4
|
export type Styles = {
|
|
5
5
|
text: TextStyles;
|
|
@@ -37,7 +37,7 @@ export type Styles = {
|
|
|
37
37
|
menu: MenuStyles;
|
|
38
38
|
menuItem: MenuItemStyles;
|
|
39
39
|
swipeAction: SwipeActionStyles;
|
|
40
|
-
|
|
40
|
+
anchoredContainer: AnchoredContainerStyles;
|
|
41
41
|
tag: TagStyles;
|
|
42
42
|
};
|
|
43
43
|
export type StyleOverrides = DeepPartial<Styles>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/theme/styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGtD,OAAO,KAAK,EACR,YAAY,EACZ,oBAAoB,EACpB,YAAY,EACZ,gBAAgB,EAChB,YAAY,EACZ,mBAAmB,EACnB,
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/theme/styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGtD,OAAO,KAAK,EACR,YAAY,EACZ,oBAAoB,EACpB,uBAAuB,EACvB,YAAY,EACZ,gBAAgB,EAChB,YAAY,EACZ,mBAAmB,EACnB,qBAAqB,EACrB,oBAAoB,EACpB,gBAAgB,EAChB,cAAc,EACd,oBAAoB,EACpB,gBAAgB,EAChB,UAAU,EACV,iBAAiB,EACjB,eAAe,EACf,mBAAmB,EACnB,qBAAqB,EACrB,qBAAqB,EACrB,cAAc,EACd,cAAc,EACd,UAAU,EACV,iBAAiB,EACjB,YAAY,EACZ,oBAAoB,EACpB,iBAAiB,EACjB,SAAS,EACT,UAAU,EACV,WAAW,EACX,iBAAiB,EACpB,MAAM,eAAe,CAAC;AA8BvB,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAErC,MAAM,MAAM,MAAM,GAAG;IACjB,IAAI,EAAE,UAAU,CAAC;IACjB,eAAe,EAAE,qBAAqB,CAAC;IACvC,eAAe,EAAE,qBAAqB,CAAC;IAEvC,IAAI,EAAE,UAAU,CAAC;IACjB,QAAQ,EAAE,cAAc,CAAC;IACzB,eAAe,EAAE,qBAAqB,CAAC;IAEvC,MAAM,EAAE,YAAY,CAAC;IACrB,UAAU,EAAE,gBAAgB,CAAC;IAC7B,cAAc,EAAE,oBAAoB,CAAC;IAErC,UAAU,EAAE,gBAAgB,CAAC;IAC7B,MAAM,EAAE,YAAY,CAAC;IACrB,cAAc,EAAE,oBAAoB,CAAC;IACrC,UAAU,EAAE,gBAAgB,CAAC;IAE7B,SAAS,EAAE,eAAe,CAAC;IAC3B,aAAa,EAAE,mBAAmB,CAAC;IACnC,WAAW,EAAE,iBAAiB,CAAC;IAC/B,WAAW,EAAE,iBAAiB,CAAC;IAC/B,cAAc,EAAE,oBAAoB,CAAC;IACrC,WAAW,EAAE,iBAAiB,CAAC;IAE/B,MAAM,EAAE,YAAY,CAAC;IACrB,cAAc,EAAE,oBAAoB,CAAC;IAErC,aAAa,EAAE,mBAAmB,CAAC;IACnC,QAAQ,EAAE,cAAc,CAAC;IACzB,MAAM,EAAE,YAAY,CAAC;IACrB,MAAM,EAAE;QACJ,MAAM,EAAE;YACJ,QAAQ,EAAE;iBACL,IAAI,IAAI,OAAO,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM;aAClD,CAAC;SACL,CAAC;KACL,CAAC;IACF,KAAK,EAAE,WAAW,CAAC;IACnB,IAAI,EAAE,UAAU,CAAC;IACjB,QAAQ,EAAE,cAAc,CAAC;IACzB,WAAW,EAAE,iBAAiB,CAAC;IAC/B,iBAAiB,EAAE,uBAAuB,CAAC;IAC3C,GAAG,EAAE,SAAS,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC;AAEjD,MAAM,MAAM,YAAY,GAAG,CAAC,KAAK,EAAE,KAAK,KAAK,MAAM,CAAC;AAEpD;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,EAAE,YAyChC,CAAC;AAEH,eAAO,MAAM,WAAW,GACpB,QAAQ,MAAM,EACd,YAAW,cAAc,GAAG,SAAc,KAC3C,MAAsC,CAAC;AAE1C;;;GAGG;AACH,eAAO,MAAM,YAAY,GACrB,OAAO,KAAK,EACZ,YAAY,cAAc,KAC3B,MAA4D,CAAC;AAEhE,eAAO,MAAM,eAAe,GAAI,CAAC,EAAE,MAAM,CAAC,EAAE,UAAU,OAAO,KAAG,CACI,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reillymc/react-native-components",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.9",
|
|
4
4
|
"description": "A collection of React Native components and resources",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -75,10 +75,11 @@
|
|
|
75
75
|
"@babel/preset-typescript": "^7.27.1",
|
|
76
76
|
"@biomejs/biome": "2.4.9",
|
|
77
77
|
"@expo/metro-runtime": "~56.0.15",
|
|
78
|
-
"@react-native/babel-preset": "0.85.3",
|
|
79
78
|
"@react-native-vector-icons/octicons": "^21.1.2",
|
|
79
|
+
"@react-native/babel-preset": "0.85.3",
|
|
80
80
|
"@types/lodash.merge": "^4.6.9",
|
|
81
81
|
"@types/react": "~19.2.0",
|
|
82
|
+
"@types/react-dom": "~19.2.0",
|
|
82
83
|
"babel-plugin-react-compiler": "^1.0.0",
|
|
83
84
|
"babel-preset-expo": "~56.0.0",
|
|
84
85
|
"dependency-cruiser": "^17.0.1",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var _jsxFileName="/home/runner/work/ReactNativeComponents/ReactNativeComponents/src/components/container/FloatingContainer.tsx";function _slicedToArray(r,e){return _arrayWithHoles(r)||_iterableToArrayLimit(r,e)||_unsupportedIterableToArray(r,e)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1;}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r;}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return;}finally{if(o)throw n;}}return a;}}function _arrayWithHoles(r){if(Array.isArray(r))return r;}import{c as _c}from"react/compiler-runtime";import{useRef,useState}from"react";import{I18nManager,KeyboardAvoidingView,Platform,StyleSheet,useWindowDimensions,View}from"react-native";import{useSafeAreaInsets}from"react-native-safe-area-context";import{FullWindowOverlay}from"react-native-screens";import{useThemedStyles}from"../../hooks";import{jsx as _jsx}from"react/jsx-runtime";var EMPTY_PANEL_LAYOUT={parentY:0,parentHeight:0,inverted:false,visibleAreaHeight:0};export var FloatingContainer=t0=>{var $=_c(20);var parentRef=t0.parentRef,show=t0.show,t1=t0.position,containerStyle=t0.containerStyle,children=t0.children;var position=t1===undefined?"auto":t1;var containerRef=useRef(null);var _useState=useState(),_useState2=_slicedToArray(_useState,2),layout=_useState2[0],setLayout=_useState2[1];var t2;if($[0]!==layout){t2={props:{layout}};$[0]=layout;$[1]=t2;}else{t2=$[1];}var _useThemedStyles=useThemedStyles("floatingContainer",createStyles,t2),_useThemedStyles2=_slicedToArray(_useThemedStyles,1),styles=_useThemedStyles2[0];var _useWindowDimensions=useWindowDimensions(),screenHeight=_useWindowDimensions.height,screenWidth=_useWindowDimensions.width;var _useSafeAreaInsets=useSafeAreaInsets(),top=_useSafeAreaInsets.top;var _useState3=useState(screenHeight),_useState4=_slicedToArray(_useState3,2),visibleAreaHeight=_useState4[0],setVisibleAreaHeight=_useState4[1];var t3;if($[2]===Symbol.for("react.memo_cache_sentinel")){t3=e=>{setVisibleAreaHeight(e.nativeEvent.layout.height);};$[2]=t3;}else{t3=$[2];}var onVisibleAreaLayout=t3;var t4;if($[3]!==parentRef||$[4]!==position||$[5]!==top||$[6]!==visibleAreaHeight){t4=e_0=>{parentRef.current?.measureInWindow((parentX,parentY,parentWidth,parentHeight)=>{var panelHeight=e_0.nativeEvent.layout.height;var parentBottom=parentY+parentHeight;var availableBelow=visibleAreaHeight-top-parentBottom;var inverted=position==="above"||availableBelow<panelHeight;setLayout({parentY,parentHeight,inverted,visibleAreaHeight,parentX,parentWidth});});};$[3]=parentRef;$[4]=position;$[5]=top;$[6]=visibleAreaHeight;$[7]=t4;}else{t4=$[7];}var onPanelLayout=t4;var panelX=layout?.parentX!==undefined&&layout.parentWidth!==undefined?I18nManager.isRTL?screenWidth-layout.parentX-layout.parentWidth:layout.parentX:layout?.parentX;var t5;if($[8]===Symbol.for("react.memo_cache_sentinel")){t5=Platform.select({ios:"padding"});$[8]=t5;}else{t5=$[8];}var t6;if($[9]!==children||$[10]!==containerStyle||$[11]!==layout||$[12]!==onPanelLayout||$[13]!==panelX||$[14]!==show||$[15]!==styles.container){t6=show&&_jsx(View,{ref:containerRef,onLayout:onPanelLayout,style:[styles.container,panelX!==undefined&&{left:panelX},containerStyle],children:typeof children==="function"?children(layout??EMPTY_PANEL_LAYOUT):children});$[9]=children;$[10]=containerStyle;$[11]=layout;$[12]=onPanelLayout;$[13]=panelX;$[14]=show;$[15]=styles.container;$[16]=t6;}else{t6=$[16];}var t7;if($[17]!==styles.keyboardView||$[18]!==t6){t7=_jsx(FullWindowOverlay,{children:_jsx(KeyboardAvoidingView,{behavior:t5,style:styles.keyboardView,onLayout:onVisibleAreaLayout,children:t6})});$[17]=styles.keyboardView;$[18]=t6;$[19]=t7;}else{t7=$[19];}return t7;};var createStyles=({styles:{floatingContainer}},{layout})=>StyleSheet.create({keyboardView:{...StyleSheet.absoluteFill,pointerEvents:"box-none"},container:layout?{position:"absolute",zIndex:10,width:layout.parentWidth,overflow:"hidden",top:layout.inverted?undefined:layout.parentY+layout.parentHeight,bottom:layout.inverted?layout.visibleAreaHeight-layout.parentY:undefined,marginTop:floatingContainer.parentMargin,marginBottom:floatingContainer.parentMargin}:{opacity:0,pointerEvents:"box-none"}});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export var defaultFloatingContainerStyles=({spacing})=>({parentMargin:spacing.small});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var _jsxFileName="/home/runner/work/ReactNativeComponents/ReactNativeComponents/src/components/container/FloatingContainer.web.tsx";function _slicedToArray(r,e){return _arrayWithHoles(r)||_iterableToArrayLimit(r,e)||_unsupportedIterableToArray(r,e)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1;}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r;}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return;}finally{if(o)throw n;}}return a;}}function _arrayWithHoles(r){if(Array.isArray(r))return r;}import{c as _c}from"react/compiler-runtime";import{useRef,useState}from"react";import{StyleSheet,useWindowDimensions,View}from"react-native";import{useSafeAreaInsets}from"react-native-safe-area-context";import{usePersistentKeyboardHeight,useThemedStyles}from"../../hooks";import{jsx as _jsx}from"react/jsx-runtime";var EMPTY_PANEL_LAYOUT={parentY:0,parentHeight:0,inverted:false,visibleAreaHeight:0};export var FloatingContainer=t0=>{var $=_c(19);var parentRef=t0.parentRef,show=t0.show,t1=t0.position,containerStyle=t0.containerStyle,children=t0.children;var position=t1===undefined?"auto":t1;var containerRef=useRef(null);var _useState=useState(),_useState2=_slicedToArray(_useState,2),layout=_useState2[0],setLayout=_useState2[1];var t2;if($[0]!==layout){t2={props:{layout}};$[0]=layout;$[1]=t2;}else{t2=$[1];}var _useThemedStyles=useThemedStyles("floatingContainer",createStyles,t2),_useThemedStyles2=_slicedToArray(_useThemedStyles,1),styles=_useThemedStyles2[0];var _useWindowDimensions=useWindowDimensions(),screenHeight=_useWindowDimensions.height;var _useSafeAreaInsets=useSafeAreaInsets(),top=_useSafeAreaInsets.top;var _usePersistentKeyboar=usePersistentKeyboardHeight(),keyboardHeight=_usePersistentKeyboar.keyboardHeight;var t3;if($[2]!==keyboardHeight||$[3]!==parentRef||$[4]!==position||$[5]!==screenHeight||$[6]!==top){t3=e=>{parentRef.current?.measureInWindow((_ix,parentY,_iw,parentHeight)=>{var panelHeight=e.nativeEvent.layout.height;var size=parentY+parentHeight+panelHeight;var screenMaxHeight=screenHeight-keyboardHeight-top;setLayout({parentY,parentHeight,inverted:position==="above"||size>screenMaxHeight,visibleAreaHeight:screenMaxHeight});});};$[2]=keyboardHeight;$[3]=parentRef;$[4]=position;$[5]=screenHeight;$[6]=top;$[7]=t3;}else{t3=$[7];}var onLayout=t3;var t4;if($[8]!==containerStyle||$[9]!==styles.container){t4=[styles.container,containerStyle];$[8]=containerStyle;$[9]=styles.container;$[10]=t4;}else{t4=$[10];}var t5;if($[11]!==children||$[12]!==layout||$[13]!==show){t5=show&&(typeof children==="function"?children(layout??EMPTY_PANEL_LAYOUT):children);$[11]=children;$[12]=layout;$[13]=show;$[14]=t5;}else{t5=$[14];}var t6;if($[15]!==onLayout||$[16]!==t4||$[17]!==t5){t6=_jsx(View,{ref:containerRef,style:t4,onLayout:onLayout,children:t5});$[15]=onLayout;$[16]=t4;$[17]=t5;$[18]=t6;}else{t6=$[18];}return t6;};var createStyles=({styles:{floatingContainer}},{layout})=>StyleSheet.create({container:{position:"absolute",bottom:layout?.inverted?layout.parentHeight:undefined,opacity:layout?1:0,zIndex:10,width:"100%",overflow:"hidden",top:layout?.inverted?undefined:layout?.parentHeight,marginTop:layout?.inverted?undefined:floatingContainer.parentMargin,marginBottom:layout?.inverted?floatingContainer.parentMargin:undefined}});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var _jsxFileName="/home/runner/work/ReactNativeComponents/ReactNativeComponents/src/components/input/DropdownInput.tsx";var _excluded=["label","helpText","hasError","mandatory","containerStyle"];function _objectWithoutProperties(e,t){if(null==e)return{};var o,r,i=_objectWithoutPropertiesLoose(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(r=0;r<n.length;r++)o=n[r],-1===t.indexOf(o)&&{}.propertyIsEnumerable.call(e,o)&&(i[o]=e[o]);}return i;}function _objectWithoutPropertiesLoose(r,e){if(null==r)return{};var t={};for(var n in r)if({}.hasOwnProperty.call(r,n)){if(-1!==e.indexOf(n))continue;t[n]=r[n];}return t;}import{c as _c}from"react/compiler-runtime";import{DropdownInputBase}from"./DropdownInputBase";import{InputScaffold}from"./InputScaffold";import{jsx as _jsx}from"react/jsx-runtime";export var DropdownInput=t0=>{var $=_c(16);var containerStyle;var hasError;var helpText;var label;var mandatory;var props;if($[0]!==t0){label=t0.label;helpText=t0.helpText;hasError=t0.hasError;mandatory=t0.mandatory;containerStyle=t0.containerStyle;props=_objectWithoutProperties(t0,_excluded);$[0]=t0;$[1]=containerStyle;$[2]=hasError;$[3]=helpText;$[4]=label;$[5]=mandatory;$[6]=props;}else{containerStyle=$[1];hasError=$[2];helpText=$[3];label=$[4];mandatory=$[5];props=$[6];}var t1;if($[7]!==props){t1=_jsx(DropdownInputBase,{...props});$[7]=props;$[8]=t1;}else{t1=$[8];}var t2;if($[9]!==containerStyle||$[10]!==hasError||$[11]!==helpText||$[12]!==label||$[13]!==mandatory||$[14]!==t1){t2=_jsx(InputScaffold,{label:label,helpText:helpText,mandatory:mandatory,hasError:hasError,containerStyle:containerStyle,children:t1});$[9]=containerStyle;$[10]=hasError;$[11]=helpText;$[12]=label;$[13]=mandatory;$[14]=t1;$[15]=t2;}else{t2=$[15];}return t2;};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var _jsxFileName="/home/runner/work/ReactNativeComponents/ReactNativeComponents/src/components/input/DropdownInputBase.tsx";var _excluded=["items","selectedValue","minimumSearchLength","maxSuggestionCount","selectBehaviour","panelPosition","onSelect","textValue","onChangeText","onBlur","ref"];function _slicedToArray(r,e){return _arrayWithHoles(r)||_iterableToArrayLimit(r,e)||_unsupportedIterableToArray(r,e)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1;}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r;}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return;}finally{if(o)throw n;}}return a;}}function _arrayWithHoles(r){if(Array.isArray(r))return r;}function _objectWithoutProperties(e,t){if(null==e)return{};var o,r,i=_objectWithoutPropertiesLoose(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(r=0;r<n.length;r++)o=n[r],-1===t.indexOf(o)&&{}.propertyIsEnumerable.call(e,o)&&(i[o]=e[o]);}return i;}function _objectWithoutPropertiesLoose(r,e){if(null==r)return{};var t={};for(var n in r)if({}.hasOwnProperty.call(r,n)){if(-1!==e.indexOf(n))continue;t[n]=r[n];}return t;}import{c as _c}from"react/compiler-runtime";import{useDeferredValue,useState}from"react";import{useForwardedRef}from"../../hooks";import{FloatingContainer}from"../container";import{Menu,MenuItem}from"../menu";import{InputBase}from"./InputBase";import{jsx as _jsx,Fragment as _Fragment,jsxs as _jsxs}from"react/jsx-runtime";var EMPTY_ITEMS=[];var isSelectableItem=({item,label,description},search,selectedValue)=>{var itemId="id"in item?item.id:item.value;if(selectedValue!==undefined&&itemId===selectedValue)return false;if(label===search)return false;return label.includes(search)||!!description?.includes(search);};export var DropdownInputBase=t0=>{var $=_c(36);var onBlur;var onChangeText;var onSelect;var panelPosition;var props;var ref;var selectedValue;var t1;var t2;var t3;var t4;var textValue;if($[0]!==t0){t1=t0.items;selectedValue=t0.selectedValue;t2=t0.minimumSearchLength;t3=t0.maxSuggestionCount;t4=t0.selectBehaviour;panelPosition=t0.panelPosition;onSelect=t0.onSelect;textValue=t0.textValue;onChangeText=t0.onChangeText;onBlur=t0.onBlur;ref=t0.ref;props=_objectWithoutProperties(t0,_excluded);$[0]=t0;$[1]=onBlur;$[2]=onChangeText;$[3]=onSelect;$[4]=panelPosition;$[5]=props;$[6]=ref;$[7]=selectedValue;$[8]=t1;$[9]=t2;$[10]=t3;$[11]=t4;$[12]=textValue;}else{onBlur=$[1];onChangeText=$[2];onSelect=$[3];panelPosition=$[4];props=$[5];ref=$[6];selectedValue=$[7];t1=$[8];t2=$[9];t3=$[10];t4=$[11];textValue=$[12];}var items=t1===undefined?EMPTY_ITEMS:t1;var minimumSearchLength=t2===undefined?1:t2;var maxSuggestionCount=t3===undefined?5:t3;var selectBehaviour=t4===undefined?"blurAndSelect":t4;var _useState=useState(false),_useState2=_slicedToArray(_useState,2),hasFocus=_useState2[0],setHasFocus=_useState2[1];var inputRef=useForwardedRef(ref);var normalizedItems=items.map(_temp);var t5;if($[13]!==selectedValue){t5=t6=>{var item_0=t6.item;if("id"in item_0){return item_0.id===selectedValue;}return item_0.value===selectedValue;};$[13]=selectedValue;$[14]=t5;}else{t5=$[14];}var existingItem=normalizedItems.find(t5);var existingItemLabel=existingItem?.item.label;var t6;if($[15]===Symbol.for("react.memo_cache_sentinel")){t6=()=>{setHasFocus(true);};$[15]=t6;}else{t6=$[15];}var handleFocus=t6;var t7;if($[16]!==inputRef||$[17]!==onSelect||$[18]!==selectBehaviour||$[19]!==selectedValue){t7=item_1=>{var selectedItemId="id"in item_1?item_1.id:item_1.value;var isAlreadySelected=selectedValue!==undefined&&selectedValue===selectedItemId;if(!isAlreadySelected){onSelect(item_1);}if(selectBehaviour==="blurAndSelect"){inputRef.current?.blur();}};$[16]=inputRef;$[17]=onSelect;$[18]=selectBehaviour;$[19]=selectedValue;$[20]=t7;}else{t7=$[20];}var handleSelect=t7;var inputText=textValue??existingItemLabel??"";var deferredInputText=useDeferredValue(inputText);var search=deferredInputText.toLowerCase();var handleBlur=e=>{var blurSearch=inputText.toLowerCase();var existingItem_0=normalizedItems.find(t8=>{var label=t8.label;return label===blurSearch;})?.item;if(existingItem_0){var existingItemId="id"in existingItem_0?existingItem_0.id:existingItem_0.value;var isAlreadySelected_0=selectedValue!==undefined&&selectedValue===existingItemId;if(!isAlreadySelected_0){onSelect(existingItem_0);}}setHasFocus(false);onBlur?.(e);};var handleChangeText=text=>{var didMatchSelection=selectedValue!==undefined&&existingItemLabel!==undefined&&text!==existingItemLabel;if(didMatchSelection){onSelect(undefined);}onChangeText?.(text);};var isSelectionActive=selectedValue!==undefined&&existingItemLabel!==undefined&&inputText===existingItemLabel;var filteredItems=[];for(var normalized of normalizedItems){if(filteredItems.length>=maxSuggestionCount){break;}if(isSelectableItem(normalized,search,selectedValue)){filteredItems.push(normalized.item);}}var showDropdownPanel=hasFocus&&!isSelectionActive&&!!filteredItems.length&&inputText.length>=minimumSearchLength;var t9;if($[21]!==handleBlur||$[22]!==handleChangeText||$[23]!==handleFocus||$[24]!==inputRef||$[25]!==inputText||$[26]!==props){t9=_jsx(InputBase,{...props,ref:inputRef,value:inputText,onFocus:handleFocus,onBlur:handleBlur,onChangeText:handleChangeText,autoCorrect:false,spellCheck:false});$[21]=handleBlur;$[22]=handleChangeText;$[23]=handleFocus;$[24]=inputRef;$[25]=inputText;$[26]=props;$[27]=t9;}else{t9=$[27];}var t10=t11=>{var inverted=t11.inverted;return _jsx(Menu,{reverse:inverted,children:filteredItems.map(item_2=>_jsx(MenuItem,{label:item_2.label,description:item_2.description,searchValue:deferredInputText,onPress:()=>handleSelect(item_2)},"id"in item_2?item_2.id:item_2.value))});};var t12;if($[28]!==inputRef||$[29]!==panelPosition||$[30]!==showDropdownPanel||$[31]!==t10){t12=_jsx(FloatingContainer,{parentRef:inputRef,show:showDropdownPanel,position:panelPosition,children:t10});$[28]=inputRef;$[29]=panelPosition;$[30]=showDropdownPanel;$[31]=t10;$[32]=t12;}else{t12=$[32];}var t13;if($[33]!==t12||$[34]!==t9){t13=_jsxs(_Fragment,{children:[t9,t12]});$[33]=t12;$[34]=t9;$[35]=t13;}else{t13=$[35];}return t13;};function _temp(item){return{item,label:item.label.toLowerCase(),description:item.description?.toLowerCase()};}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { type FC, type ReactNode, type RefObject } from "react";
|
|
2
|
-
import { type StyleProp, type TextInput, type ViewStyle } from "react-native";
|
|
3
|
-
export type PanelLayout = {
|
|
4
|
-
parentY: number;
|
|
5
|
-
parentHeight: number;
|
|
6
|
-
inverted: boolean;
|
|
7
|
-
visibleAreaHeight: number;
|
|
8
|
-
parentX?: number;
|
|
9
|
-
parentWidth?: number;
|
|
10
|
-
};
|
|
11
|
-
export type FloatingContainerStyles = {
|
|
12
|
-
parentMargin: number;
|
|
13
|
-
};
|
|
14
|
-
export interface FloatingContainerProps {
|
|
15
|
-
parentRef: RefObject<TextInput | null>;
|
|
16
|
-
show?: boolean;
|
|
17
|
-
position?: "auto" | "above";
|
|
18
|
-
children?: ReactNode | ((panelLayout: PanelLayout) => ReactNode);
|
|
19
|
-
containerStyle?: StyleProp<ViewStyle>;
|
|
20
|
-
}
|
|
21
|
-
export declare const FloatingContainer: FC<FloatingContainerProps>;
|
|
22
|
-
//# sourceMappingURL=FloatingContainer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FloatingContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/container/FloatingContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,EAAE,EACP,KAAK,SAAS,EACd,KAAK,SAAS,EAGjB,MAAM,OAAO,CAAC;AACf,OAAO,EAKH,KAAK,SAAS,EAEd,KAAK,SAAS,EAGd,KAAK,SAAS,EACjB,MAAM,cAAc,CAAC;AAMtB,MAAM,MAAM,WAAW,GAAG;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;IAClB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG;IAClC,YAAY,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,MAAM,WAAW,sBAAsB;IACnC,SAAS,EAAE,SAAS,CAAC,SAAS,GAAG,IAAI,CAAC,CAAC;IACvC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC5B,QAAQ,CAAC,EAAE,SAAS,GAAG,CAAC,CAAC,WAAW,EAAE,WAAW,KAAK,SAAS,CAAC,CAAC;IACjE,cAAc,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CACzC;AASD,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,sBAAsB,CA+ExD,CAAC"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { Theme } from "../../theme/theme";
|
|
2
|
-
import type { FloatingContainerStyles } from "./FloatingContainer";
|
|
3
|
-
export declare const defaultFloatingContainerStyles: ({ spacing, }: Theme) => FloatingContainerStyles;
|
|
4
|
-
//# sourceMappingURL=FloatingContainer.styles.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FloatingContainer.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/container/FloatingContainer.styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAEnE,eAAO,MAAM,8BAA8B,GAAI,cAE5C,KAAK,KAAG,uBAET,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FloatingContainer.web.d.ts","sourceRoot":"","sources":["../../../../src/components/container/FloatingContainer.web.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,EAAoB,MAAM,OAAO,CAAC;AAclD,OAAO,KAAK,EAAE,sBAAsB,EAAe,MAAM,qBAAqB,CAAC;AAS/E,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,sBAAsB,CAgDxD,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { type DropdownInputBaseProps } from "./DropdownInputBase";
|
|
2
|
-
import { type InputScaffoldFieldProps } from "./InputScaffold";
|
|
3
|
-
export interface DropdownInputStyles {
|
|
4
|
-
panelGap: number;
|
|
5
|
-
}
|
|
6
|
-
export type DropdownInputProps<T = string> = Pick<DropdownInputBaseProps<T>, "autoCapitalize" | "returnKeyType" | "returnKeyLabel" | "onBlur" | "placeholder" | "onChangeText" | "textValue" | "clearButtonMode" | "maxLength" | "onSubmitEditing" | "autoFocus" | "submitBehavior" | "disabled" | "variant" | "items" | "selectedValue" | "minimumSearchLength" | "maxSuggestionCount" | "panelPosition" | "onSelect" | "ref" | "selectBehaviour"> & 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
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownInput.d.ts","sourceRoot":"","sources":["../../../../src/components/input/DropdownInput.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEH,KAAK,sBAAsB,EAC9B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAiB,KAAK,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAE9E,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,WAAW,GACX,iBAAiB,GACjB,WAAW,GACX,iBAAiB,GACjB,WAAW,GACX,gBAAgB,GAChB,UAAU,GACV,SAAS,GACT,OAAO,GACP,eAAe,GACf,qBAAqB,GACrB,oBAAoB,GACpB,eAAe,GACf,UAAU,GACV,KAAK,GACL,iBAAiB,CACtB,GACG,uBAAuB,CAAC;AAC5B,eAAO,MAAM,aAAa,GAAI,CAAC,EAAG,oEAO/B,kBAAkB,CAAC,CAAC,CAAC,gCAUvB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownInput.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/input/DropdownInput.styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAE3D,eAAO,MAAM,0BAA0B,GACnC,QAAQ,KAAK,KACd,mBAED,CAAC"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { type RefObject } from "react";
|
|
2
|
-
import type { TextInput as DefaultTextInput } from "react-native";
|
|
3
|
-
import type { ValueItem, ValueItemComplex, ValueItemSimple } from "../../common";
|
|
4
|
-
import { type FloatingContainerProps } from "../container";
|
|
5
|
-
import { type InputBaseProps } from "./InputBase";
|
|
6
|
-
export type DropdownInputBaseProps<T = string> = Pick<InputBaseProps, "autoCapitalize" | "returnKeyType" | "returnKeyLabel" | "onBlur" | "placeholder" | "onChangeText" | "clearButtonMode" | "maxLength" | "onSubmitEditing" | "autoFocus" | "submitBehavior" | "disabled" | "variant" | "inputStyle"> & {
|
|
7
|
-
textValue?: string;
|
|
8
|
-
items?: Array<ValueItem<T>>;
|
|
9
|
-
/**
|
|
10
|
-
* The currently selected item.
|
|
11
|
-
* If not provided, the input will be in an unselected state.
|
|
12
|
-
*/
|
|
13
|
-
selectedValue?: T extends string | number ? ValueItemSimple<T>["value"] : ValueItemComplex<T>["id"];
|
|
14
|
-
/**
|
|
15
|
-
* Defines the behaviour when an item is selected.
|
|
16
|
-
* - "select": Selects the item and keeps the input focused.
|
|
17
|
-
* - "blurAndSelect": Selects the item and blurs the input.
|
|
18
|
-
*/
|
|
19
|
-
selectBehaviour?: "select" | "blurAndSelect";
|
|
20
|
-
/**
|
|
21
|
-
* Minimum number of characters that need to be entered before the dropdown is shown.
|
|
22
|
-
* @default 1
|
|
23
|
-
*/
|
|
24
|
-
minimumSearchLength?: number;
|
|
25
|
-
/**
|
|
26
|
-
* Maximum number of dropdown items to show.
|
|
27
|
-
* @default 5
|
|
28
|
-
*/
|
|
29
|
-
maxSuggestionCount?: number;
|
|
30
|
-
panelPosition?: FloatingContainerProps["position"];
|
|
31
|
-
/**
|
|
32
|
-
* Callback on selection (or clearing of selection) of valid dropdown value.
|
|
33
|
-
*/
|
|
34
|
-
onSelect: (e: ValueItem<T> | undefined) => void;
|
|
35
|
-
ref?: RefObject<DefaultTextInput | null>;
|
|
36
|
-
};
|
|
37
|
-
export declare const DropdownInputBase: <T>({ items, selectedValue, minimumSearchLength, maxSuggestionCount, selectBehaviour, panelPosition, onSelect, textValue, onChangeText, onBlur, ref, ...props }: DropdownInputBaseProps<T>) => import("react").JSX.Element;
|
|
38
|
-
//# sourceMappingURL=DropdownInputBase.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownInputBase.d.ts","sourceRoot":"","sources":["../../../../src/components/input/DropdownInputBase.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAA8B,MAAM,OAAO,CAAC;AACnE,OAAO,KAAK,EAAa,SAAS,IAAI,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAE7E,OAAO,KAAK,EACR,SAAS,EACT,gBAAgB,EAChB,eAAe,EAClB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAqB,KAAK,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAE9E,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7D,MAAM,MAAM,sBAAsB,CAAC,CAAC,GAAG,MAAM,IAAI,IAAI,CACjD,cAAc,EACZ,gBAAgB,GAChB,eAAe,GACf,gBAAgB,GAChB,QAAQ,GACR,aAAa,GACb,cAAc,GACd,iBAAiB,GACjB,WAAW,GACX,iBAAiB,GACjB,WAAW,GACX,gBAAgB,GAChB,UAAU,GACV,SAAS,GACT,YAAY,CACjB,GAAG;IACA,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;IAE5B;;;OAGG;IACH,aAAa,CAAC,EAAE,CAAC,SAAS,MAAM,GAAG,MAAM,GACnC,eAAe,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,GAC3B,gBAAgB,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IAEhC;;;;OAIG;IACH,eAAe,CAAC,EAAE,QAAQ,GAAG,eAAe,CAAC;IAE7C;;;OAGG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAE7B;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAE5B,aAAa,CAAC,EAAE,sBAAsB,CAAC,UAAU,CAAC,CAAC;IAEnD;;OAEG;IACH,QAAQ,EAAE,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC,GAAG,SAAS,KAAK,IAAI,CAAC;IAEhD,GAAG,CAAC,EAAE,SAAS,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAC;CAC5C,CAAC;AAuBF,eAAO,MAAM,iBAAiB,GAAI,CAAC,EAAG,6JAanC,sBAAsB,CAAC,CAAC,CAAC,gCAiI3B,CAAC"}
|
/package/lib/components/input/{DropdownInput.styles.js → dropdownInput/DropdownInput.styles.js}
RENAMED
|
File without changes
|