@shaquillehinds/react-native-dropdown-selector 0.0.4 → 0.0.6

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.
Files changed (71) hide show
  1. package/README.md +3 -0
  2. package/lib/commonjs/DropDownSelector/DropDownSelector.js +8 -107
  3. package/lib/commonjs/DropDownSelector/DropDownSelector.js.map +1 -1
  4. package/lib/commonjs/DropDownSelector/components/DropDownSelector.button.js +60 -0
  5. package/lib/commonjs/DropDownSelector/components/DropDownSelector.button.js.map +1 -0
  6. package/lib/commonjs/DropDownSelector/components/DropDownSelectorList/DropDownColumn.js +49 -0
  7. package/lib/commonjs/DropDownSelector/components/DropDownSelectorList/DropDownColumn.js.map +1 -0
  8. package/lib/commonjs/DropDownSelector/components/DropDownSelectorList/DropDownRow.js +52 -0
  9. package/lib/commonjs/DropDownSelector/components/DropDownSelectorList/DropDownRow.js.map +1 -0
  10. package/lib/commonjs/DropDownSelector/components/DropDownSelectorList/DropDownSelector.list.js +57 -0
  11. package/lib/commonjs/DropDownSelector/components/DropDownSelectorList/DropDownSelector.list.js.map +1 -0
  12. package/lib/commonjs/DropDownSelector/components/DropDownSelectorList/index.js +17 -0
  13. package/lib/commonjs/DropDownSelector/components/DropDownSelectorList/index.js.map +1 -0
  14. package/lib/commonjs/DropDownSelector/svgs/ChevronUp.js.map +1 -1
  15. package/lib/module/DropDownSelector/DropDownSelector.js +9 -108
  16. package/lib/module/DropDownSelector/DropDownSelector.js.map +1 -1
  17. package/lib/module/DropDownSelector/components/DropDownSelector.button.js +56 -0
  18. package/lib/module/DropDownSelector/components/DropDownSelector.button.js.map +1 -0
  19. package/lib/module/DropDownSelector/components/DropDownSelectorList/DropDownColumn.js +45 -0
  20. package/lib/module/DropDownSelector/components/DropDownSelectorList/DropDownColumn.js.map +1 -0
  21. package/lib/module/DropDownSelector/components/DropDownSelectorList/DropDownRow.js +48 -0
  22. package/lib/module/DropDownSelector/components/DropDownSelectorList/DropDownRow.js.map +1 -0
  23. package/lib/module/DropDownSelector/components/DropDownSelectorList/DropDownSelector.list.js +53 -0
  24. package/lib/module/DropDownSelector/components/DropDownSelectorList/DropDownSelector.list.js.map +1 -0
  25. package/lib/module/DropDownSelector/components/DropDownSelectorList/index.js +4 -0
  26. package/lib/module/DropDownSelector/components/DropDownSelectorList/index.js.map +1 -0
  27. package/lib/module/DropDownSelector/svgs/ChevronUp.js.map +1 -1
  28. package/lib/typescript/commonjs/src/DropDownSelector/DropDownSelector.controller.d.ts +23 -4
  29. package/lib/typescript/commonjs/src/DropDownSelector/DropDownSelector.controller.d.ts.map +1 -1
  30. package/lib/typescript/commonjs/src/DropDownSelector/DropDownSelector.d.ts.map +1 -1
  31. package/lib/typescript/commonjs/src/DropDownSelector/DropDownSelector.types.d.ts +8 -0
  32. package/lib/typescript/commonjs/src/DropDownSelector/DropDownSelector.types.d.ts.map +1 -1
  33. package/lib/typescript/commonjs/src/DropDownSelector/components/DropDownSelector.button.d.ts +7 -0
  34. package/lib/typescript/commonjs/src/DropDownSelector/components/DropDownSelector.button.d.ts.map +1 -0
  35. package/lib/typescript/commonjs/src/DropDownSelector/components/DropDownSelectorList/DropDownColumn.d.ts +7 -0
  36. package/lib/typescript/commonjs/src/DropDownSelector/components/DropDownSelectorList/DropDownColumn.d.ts.map +1 -0
  37. package/lib/typescript/commonjs/src/DropDownSelector/components/DropDownSelectorList/DropDownRow.d.ts +7 -0
  38. package/lib/typescript/commonjs/src/DropDownSelector/components/DropDownSelectorList/DropDownRow.d.ts.map +1 -0
  39. package/lib/typescript/commonjs/src/DropDownSelector/components/DropDownSelectorList/DropDownSelector.list.d.ts +7 -0
  40. package/lib/typescript/commonjs/src/DropDownSelector/components/DropDownSelectorList/DropDownSelector.list.d.ts.map +1 -0
  41. package/lib/typescript/commonjs/src/DropDownSelector/components/DropDownSelectorList/index.d.ts +2 -0
  42. package/lib/typescript/commonjs/src/DropDownSelector/components/DropDownSelectorList/index.d.ts.map +1 -0
  43. package/lib/typescript/commonjs/src/DropDownSelector/svgs/ChevronUp.d.ts +2 -4
  44. package/lib/typescript/commonjs/src/DropDownSelector/svgs/ChevronUp.d.ts.map +1 -1
  45. package/lib/typescript/module/src/DropDownSelector/DropDownSelector.controller.d.ts +23 -4
  46. package/lib/typescript/module/src/DropDownSelector/DropDownSelector.controller.d.ts.map +1 -1
  47. package/lib/typescript/module/src/DropDownSelector/DropDownSelector.d.ts.map +1 -1
  48. package/lib/typescript/module/src/DropDownSelector/DropDownSelector.types.d.ts +8 -0
  49. package/lib/typescript/module/src/DropDownSelector/DropDownSelector.types.d.ts.map +1 -1
  50. package/lib/typescript/module/src/DropDownSelector/components/DropDownSelector.button.d.ts +7 -0
  51. package/lib/typescript/module/src/DropDownSelector/components/DropDownSelector.button.d.ts.map +1 -0
  52. package/lib/typescript/module/src/DropDownSelector/components/DropDownSelectorList/DropDownColumn.d.ts +7 -0
  53. package/lib/typescript/module/src/DropDownSelector/components/DropDownSelectorList/DropDownColumn.d.ts.map +1 -0
  54. package/lib/typescript/module/src/DropDownSelector/components/DropDownSelectorList/DropDownRow.d.ts +7 -0
  55. package/lib/typescript/module/src/DropDownSelector/components/DropDownSelectorList/DropDownRow.d.ts.map +1 -0
  56. package/lib/typescript/module/src/DropDownSelector/components/DropDownSelectorList/DropDownSelector.list.d.ts +7 -0
  57. package/lib/typescript/module/src/DropDownSelector/components/DropDownSelectorList/DropDownSelector.list.d.ts.map +1 -0
  58. package/lib/typescript/module/src/DropDownSelector/components/DropDownSelectorList/index.d.ts +2 -0
  59. package/lib/typescript/module/src/DropDownSelector/components/DropDownSelectorList/index.d.ts.map +1 -0
  60. package/lib/typescript/module/src/DropDownSelector/svgs/ChevronUp.d.ts +2 -4
  61. package/lib/typescript/module/src/DropDownSelector/svgs/ChevronUp.d.ts.map +1 -1
  62. package/package.json +3 -4
  63. package/src/DropDownSelector/DropDownSelector.controller.tsx +4 -0
  64. package/src/DropDownSelector/DropDownSelector.tsx +4 -153
  65. package/src/DropDownSelector/DropDownSelector.types.ts +8 -0
  66. package/src/DropDownSelector/components/DropDownSelector.button.tsx +72 -0
  67. package/src/DropDownSelector/components/DropDownSelectorList/DropDownColumn.tsx +65 -0
  68. package/src/DropDownSelector/components/DropDownSelectorList/DropDownRow.tsx +66 -0
  69. package/src/DropDownSelector/components/DropDownSelectorList/DropDownSelector.list.tsx +74 -0
  70. package/src/DropDownSelector/components/DropDownSelectorList/index.tsx +1 -0
  71. package/src/DropDownSelector/svgs/ChevronUp.tsx +2 -1
package/README.md CHANGED
@@ -5,7 +5,10 @@ A beautifully animated, fully customizable dropdown selector for React Native th
5
5
  [![npm version](https://img.shields.io/npm/v/@shaquillehinds/react-native-dropdown-selector.svg)](https://www.npmjs.com/package/@shaquillehinds/react-native-dropdown-selector)
6
6
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
7
7
 
8
+ <p align="center">
8
9
  <img src="https://raw.githubusercontent.com/shaquillehinds/react-native-dropdown-selector/master/assets/dropdownselector.gif" alt="example" height="500"/>
10
+ <img src="https://raw.githubusercontent.com/shaquillehinds/react-native-dropdown-selector/master/assets/dropdownselector2.gif" alt="example" height="500"/>
11
+ </p>
9
12
 
10
13
  ## ✨ Features
11
14
 
@@ -5,10 +5,9 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.DropDownSelector = DropDownSelector;
7
7
  var _reactNativeEssentials = require("@shaquillehinds/react-native-essentials");
8
- var _ChevronUp = require("./svgs/ChevronUp.js");
9
- var _reactNative = require("react-native");
10
- var _reactNativeGestureHandler = require("react-native-gesture-handler");
11
8
  var _DropDownSelectorController = require("./DropDownSelector.controller.js");
9
+ var _DropDownSelectorButton = require("./components/DropDownSelector.button.js");
10
+ var _index = require("./components/DropDownSelectorList/index.js");
12
11
  var _jsxRuntime = require("react/jsx-runtime");
13
12
  function DropDownSelector(props) {
14
13
  const controller = (0, _DropDownSelectorController.DropDownSelectorController)(props);
@@ -27,113 +26,15 @@ function DropDownSelector(props) {
27
26
  component: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeEssentials.ModalWrapper, {
28
27
  enableBackgroundContentPress: true,
29
28
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeEssentials.ModalForegroundWrapper, {
30
- children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
31
- style: !props.disableShadow ? {
32
- ...(0, _reactNativeEssentials.shadowStyles)({
33
- shadowOpacity: 0.15
34
- })
35
- } : undefined,
36
- children: [!props.disableShadow && _reactNativeEssentials.isAndroid && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeEssentials.AnimateComponent, {
37
- ref: controller.animateAndroidShadowRef,
38
- initialPosition: 0,
39
- style: controller.androidShadowAnimatedStyle,
40
- autoStart: true,
41
- toPosition: controller.androidShadowAnimationConfig
42
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeGestureHandler.ScrollView, {
43
- ref: controller.scrollViewRef,
44
- nestedScrollEnabled: true,
45
- showsVerticalScrollIndicator: false,
46
- overScrollMode: "never",
47
- ...props.dropdownScrollViewProps,
48
- style: [controller.scrollViewStyle, props.dropdownScrollViewProps?.style],
49
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeEssentials.AnimateComponent, {
50
- ref: controller.animateComponentRef,
51
- style: controller.selectionItemsListAnimatedStyle,
52
- initialPosition: controller.canRenderDown ? -controller.relativeY(110) : controller.relativeY(110),
53
- autoStart: true,
54
- toPosition: props.expandAnimationConfig ? {
55
- ...props.expandAnimationConfig,
56
- toValue: 0
57
- } : controller.selectionItemsListAnimationConfig,
58
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeEssentials.Layout, {
59
- borderRadius: "soft",
60
- backgroundColor: '#FAFAFA',
61
- padding: controller.canRenderDown ? [5, 0, 0, 0] : [0, 0, 5, 0],
62
- ...props.dropdownContentContainerProps,
63
- onLayout: controller.handleSelectionItemsListLayout,
64
- children: props.items.map(item => props.DropdownItemComponent ? /*#__PURE__*/(0, _jsxRuntime.jsx)(props.DropdownItemComponent, {
65
- item: item,
66
- isSelected: item.value === props.selectedItem
67
- }, item.label) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNativeEssentials.TouchableLayout, {
68
- flexDirection: "row",
69
- center: true,
70
- spaceBetween: true,
71
- padding: [1, 5],
72
- ...props.dropdownItemProps,
73
- onPress: () => {
74
- props.onSelect(item.value);
75
- controller.setShowItems(false);
76
- props.onDropdownItemPress?.(item);
77
- },
78
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeEssentials.Layout, {
79
- width: '85%',
80
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeEssentials.BaseText, {
81
- numberOfLines: 1,
82
- ...props.dropdownItemTextProps,
83
- children: item.label
84
- })
85
- }), item.value === props.selectedItem ? props.DropdownItemSelectedIcon ? /*#__PURE__*/(0, _jsxRuntime.jsx)(props.DropdownItemSelectedIcon, {
86
- item: item
87
- }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeEssentials.RadioIcon, {
88
- isSelected: true
89
- }) : null]
90
- }, item.label))
91
- })
92
- })
93
- })]
29
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.DropDownSelectorList, {
30
+ props: props,
31
+ controller: controller
94
32
  })
95
33
  })
96
34
  })
97
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNativeEssentials.RNPressableLayout, {
98
- disabled: props.isDisabled,
99
- activeOpacity: 1,
100
- flexDirection: "row",
101
- backgroundColor: 'white',
102
- borderRadius: "medium",
103
- padding: [1, 5],
104
- spaceBetween: true,
105
- center: true,
106
- ...props.dropdownButtonProps,
107
- style: [{
108
- zIndex: _reactNativeEssentials.maxZIndex + 3,
109
- ...(0, _reactNativeEssentials.shadowStyles)({
110
- shadowOpacity: 0.1
111
- })
112
- }, props.dropdownButtonProps?.style],
113
- onPress: e => {
114
- controller.pageYRef.current = e.nativeEvent.pageY;
115
- controller.setShowItems(prev => !prev);
116
- props.dropdownButtonProps?.onPress?.(e);
117
- },
118
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeEssentials.BaseText, {
119
- numberOfLines: 1,
120
- ...props.dropdownButtonTextProps,
121
- style: {
122
- maxWidth: '90%'
123
- },
124
- children: controller.label || props.placeholder || 'Select an item'
125
- }), props.DropdownButtonIcon ? /*#__PURE__*/(0, _jsxRuntime.jsx)(props.DropdownButtonIcon, {
126
- isOpen: controller.showItems,
127
- expandDirection: props.expandDirection || controller.canRenderDown ? 'down' : 'up'
128
- }) : controller.canRenderDown === null ? undefined : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeEssentials.AnimateComponent, {
129
- ref: controller.animateChevronRef,
130
- style: controller.chevronAnimatedStyle,
131
- initialPosition: controller.canRenderDown ? -1 : 1,
132
- toPosition: controller.chevronAnimationConfig,
133
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChevronUp.ChevronUp, {
134
- color: 'black'
135
- })
136
- })]
35
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_DropDownSelectorButton.DropDownSelectorButton, {
36
+ props: props,
37
+ controller: controller
137
38
  })]
138
39
  });
139
40
  }
@@ -1 +1 @@
1
- {"version":3,"names":["_reactNativeEssentials","require","_ChevronUp","_reactNative","_reactNativeGestureHandler","_DropDownSelectorController","_jsxRuntime","DropDownSelector","props","controller","DropDownSelectorController","jsxs","Layout","containerProps","style","zIndex","maxZIndex","onLayout","handleLayout","children","jsx","ComponentMounter","showComponent","showItems","setShowComponent","setShowItems","unMountDelayInMilliSeconds","onComponentShow","onOpen","onComponentClose","onClose","component","ModalWrapper","enableBackgroundContentPress","ModalForegroundWrapper","View","disableShadow","shadowStyles","shadowOpacity","undefined","isAndroid","AnimateComponent","ref","animateAndroidShadowRef","initialPosition","androidShadowAnimatedStyle","autoStart","toPosition","androidShadowAnimationConfig","ScrollView","scrollViewRef","nestedScrollEnabled","showsVerticalScrollIndicator","overScrollMode","dropdownScrollViewProps","scrollViewStyle","animateComponentRef","selectionItemsListAnimatedStyle","canRenderDown","relativeY","expandAnimationConfig","toValue","selectionItemsListAnimationConfig","borderRadius","backgroundColor","padding","dropdownContentContainerProps","handleSelectionItemsListLayout","items","map","item","DropdownItemComponent","isSelected","value","selectedItem","label","TouchableLayout","flexDirection","center","spaceBetween","dropdownItemProps","onPress","onSelect","onDropdownItemPress","width","BaseText","numberOfLines","dropdownItemTextProps","DropdownItemSelectedIcon","RadioIcon","RNPressableLayout","disabled","isDisabled","activeOpacity","dropdownButtonProps","e","pageYRef","current","nativeEvent","pageY","prev","dropdownButtonTextProps","maxWidth","placeholder","DropdownButtonIcon","isOpen","expandDirection","animateChevronRef","chevronAnimatedStyle","chevronAnimationConfig","ChevronUp","color"],"sourceRoot":"../../../src","sources":["DropDownSelector/DropDownSelector.tsx"],"mappings":";;;;;;AAAA,IAAAA,sBAAA,GAAAC,OAAA;AAcA,IAAAC,UAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,0BAAA,GAAAH,OAAA;AACA,IAAAI,2BAAA,GAAAJ,OAAA;AAA2E,IAAAK,WAAA,GAAAL,OAAA;AAGpE,SAASM,gBAAgBA,CAAIC,KAA+B,EAAE;EACnE,MAAMC,UAAU,GAAG,IAAAC,sDAA0B,EAACF,KAAK,CAAC;EAEpD,oBACE,IAAAF,WAAA,CAAAK,IAAA,EAACX,sBAAA,CAAAY,MAAM;IAAA,GACDJ,KAAK,CAACK,cAAc;IACxBC,KAAK,EAAE,CAAC;MAAEC,MAAM,EAAEC;IAAU,CAAC,EAAER,KAAK,CAACK,cAAc,EAAEC,KAAK,CAAE;IAC5DG,QAAQ,EAAER,UAAU,CAACS,YAAa;IAAAC,QAAA,gBAElC,IAAAb,WAAA,CAAAc,GAAA,EAACpB,sBAAA,CAAAqB,gBAAgB;MACfC,aAAa,EAAEb,UAAU,CAACc,SAAU;MACpCC,gBAAgB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;QACvChE,eAAe,EAAEnC,UAAU,CAACiD,aAAa,GAAG,CAAC,CAAC,GAAG,CAAE;QACnDX,UAAU,EAAEtC,UAAU,CAACoG,sBAAuB;QAAA1F,QAAA,eAE9C,IAAAb,WAAA,CAAAc,GAAA,EAAClB,UAAA,CAAA4G,SAAS;UAACC,KAAK,EAAE;QAAQ,CAAE;MAAC,CACb,CACnB;IAAA,CACgB,CAAC;EAAA,CACd,CAAC;AAEb","ignoreList":[]}
1
+ {"version":3,"names":["_reactNativeEssentials","require","_DropDownSelectorController","_DropDownSelectorButton","_index","_jsxRuntime","DropDownSelector","props","controller","DropDownSelectorController","jsxs","Layout","containerProps","style","zIndex","maxZIndex","onLayout","handleLayout","children","jsx","ComponentMounter","showComponent","showItems","setShowComponent","setShowItems","unMountDelayInMilliSeconds","onComponentShow","onOpen","onComponentClose","onClose","component","ModalWrapper","enableBackgroundContentPress","ModalForegroundWrapper","DropDownSelectorList","DropDownSelectorButton"],"sourceRoot":"../../../src","sources":["DropDownSelector/DropDownSelector.tsx"],"mappings":";;;;;;AAAA,IAAAA,sBAAA,GAAAC,OAAA;AAOA,IAAAC,2BAAA,GAAAD,OAAA;AAEA,IAAAE,uBAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAAyE,IAAAI,WAAA,GAAAJ,OAAA;AAElE,SAASK,gBAAgBA,CAAIC,KAA+B,EAAE;EACnE,MAAMC,UAAU,GAAG,IAAAC,sDAA0B,EAACF,KAAK,CAAC;EAEpD,oBACE,IAAAF,WAAA,CAAAK,IAAA,EAACV,sBAAA,CAAAW,MAAM;IAAA,GACDJ,KAAK,CAACK,cAAc;IACxBC,KAAK,EAAE,CAAC;MAAEC,MAAM,EAAEC;IAAU,CAAC,EAAER,KAAK,CAACK,cAAc,EAAEC,KAAK,CAAE;IAC5DG,QAAQ,EAAER,UAAU,CAACS,YAAa;IAAAC,QAAA,gBAElC,IAAAb,WAAA,CAAAc,GAAA,EAACnB,sBAAA,CAAAoB,gBAAgB;MACfC,aAAa,EAAEb,UAAU,CAACc,SAAU;MACpCC,gBAAgB,EAAEf,UAAU,CAACgB,YAAa;MAC1CC,0BAA0B,EAAEjB,UAAU,CAACiB,0BAA2B;MAClEC,eAAe,EAAEnB,KAAK,CAACoB,MAAO;MAC9BC,gBAAgB,EAAErB,KAAK,CAACsB,OAAQ;MAChCC,SAAS,eACP,IAAAzB,WAAA,CAAAc,GAAA,EAACnB,sBAAA,CAAA+B,YAAY;QAACC,4BAA4B;QAAAd,QAAA,eACxC,IAAAb,WAAA,CAAAc,GAAA,EAACnB,sBAAA,CAAAiC,sBAAsB;UAAAf,QAAA,eACrB,IAAAb,WAAA,CAAAc,GAAA,EAACf,MAAA,CAAA8B,oBAAoB;YAAC3B,KAAK,EAAEA,KAAM;YAACC,UAAU,EAAEA;UAAW,CAAE;QAAC,CACxC;MAAC,CACb;IACf,CACF,CAAC,eACF,IAAAH,WAAA,CAAAc,GAAA,EAAChB,uBAAA,CAAAgC,sBAAsB;MAAC5B,KAAK,EAAEA,KAAM;MAACC,UAAU,EAAEA;IAAW,CAAE,CAAC;EAAA,CAC1D,CAAC;AAEb","ignoreList":[]}
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.DropDownSelectorButton = DropDownSelectorButton;
7
+ var _reactNativeEssentials = require("@shaquillehinds/react-native-essentials");
8
+ var _ChevronUp = require("../svgs/ChevronUp.js");
9
+ var _jsxRuntime = require("react/jsx-runtime");
10
+ function DropDownSelectorButton({
11
+ props,
12
+ controller
13
+ }) {
14
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNativeEssentials.RNPressableLayout, {
15
+ disabled: props.isDisabled,
16
+ activeOpacity: 1,
17
+ flexDirection: "row",
18
+ backgroundColor: 'white',
19
+ borderRadius: "medium",
20
+ padding: [1, 5],
21
+ spaceBetween: true,
22
+ center: true,
23
+ ...props.dropdownButtonProps,
24
+ style: [{
25
+ zIndex: _reactNativeEssentials.maxZIndex + 3,
26
+ ...(0, _reactNativeEssentials.shadowStyles)({
27
+ shadowOpacity: 0.1
28
+ })
29
+ }, props.dropdownButtonProps?.style],
30
+ onPress: e => {
31
+ controller.pageYRef.current = e.nativeEvent.pageY;
32
+ controller.setShowItems(prev => !prev);
33
+ props.dropdownButtonProps?.onPress?.(e);
34
+ },
35
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeEssentials.BaseText, {
36
+ numberOfLines: 1,
37
+ ...props.dropdownButtonTextProps,
38
+ style: [{
39
+ maxWidth: '90%'
40
+ }, props.dropdownButtonTextProps?.style],
41
+ children: controller.label || props.placeholder || 'Select an item'
42
+ }), props.DropdownButtonIcon ? /*#__PURE__*/(0, _jsxRuntime.jsx)(props.DropdownButtonIcon, {
43
+ isOpen: controller.showItems,
44
+ expandDirection: props.expandDirection || controller.canRenderDown ? 'down' : 'up'
45
+ }) : controller.canRenderDown === null ? undefined : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeEssentials.Layout, {
46
+ ...props.dropdownButtonIconContainerProps,
47
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeEssentials.AnimateComponent, {
48
+ ref: controller.animateChevronRef,
49
+ style: controller.chevronAnimatedStyle,
50
+ initialPosition: controller.canRenderDown ? -1 : 1,
51
+ toPosition: controller.chevronAnimationConfig,
52
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChevronUp.ChevronUp, {
53
+ color: 'black',
54
+ ...props.dropdownButtonIconProps
55
+ })
56
+ })
57
+ })]
58
+ });
59
+ }
60
+ //# sourceMappingURL=DropDownSelector.button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_reactNativeEssentials","require","_ChevronUp","_jsxRuntime","DropDownSelectorButton","props","controller","jsxs","RNPressableLayout","disabled","isDisabled","activeOpacity","flexDirection","backgroundColor","borderRadius","padding","spaceBetween","center","dropdownButtonProps","style","zIndex","maxZIndex","shadowStyles","shadowOpacity","onPress","e","pageYRef","current","nativeEvent","pageY","setShowItems","prev","children","jsx","BaseText","numberOfLines","dropdownButtonTextProps","maxWidth","label","placeholder","DropdownButtonIcon","isOpen","showItems","expandDirection","canRenderDown","undefined","Layout","dropdownButtonIconContainerProps","AnimateComponent","ref","animateChevronRef","chevronAnimatedStyle","initialPosition","toPosition","chevronAnimationConfig","ChevronUp","color","dropdownButtonIconProps"],"sourceRoot":"../../../../src","sources":["DropDownSelector/components/DropDownSelector.button.tsx"],"mappings":";;;;;;AAAA,IAAAA,sBAAA,GAAAC,OAAA;AAUA,IAAAC,UAAA,GAAAD,OAAA;AAA8C,IAAAE,WAAA,GAAAF,OAAA;AAEvC,SAASG,sBAAsBA,CAAI;EACxCC,KAAK;EACLC;AAIF,CAAC,EAAE;EACD,oBACE,IAAAH,WAAA,CAAAI,IAAA,EAACP,sBAAA,CAAAQ,iBAAiB;IAChBC,QAAQ,EAAEJ,KAAK,CAACK,UAAW;IAC3BC,aAAa,EAAE,CAAE;IACjBC,aAAa,EAAC,KAAK;IACnBC,eAAe,EAAE,OAAQ;IACzBC,YAAY,EAAC,QAAQ;IACrBC,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,CAAE;IAChBC,YAAY;IACZC,MAAM;IAAA,GACFZ,KAAK,CAACa,mBAAmB;IAC7BC,KAAK,EAAE,CACL;MACEC,MAAM,EAAEC,gCAAS,GAAG,CAAC;MACrB,GAAG,IAAAC,mCAAY,EAAC;QAAEC,aAAa,EAAE;MAAI,CAAC;IACxC,CAAC,EACDlB,KAAK,CAACa,mBAAmB,EAAEC,KAAK,CAChC;IACFK,OAAO,EAAGC,CAAC,IAAK;MACdnB,UAAU,CAACoB,QAAQ,CAACC,OAAO,GAAGF,CAAC,CAACG,WAAW,CAACC,KAAK;MACjDvB,UAAU,CAACwB,YAAY,CAAEC,IAAI,IAAK,CAACA,IAAI,CAAC;MACxC1B,KAAK,CAACa,mBAAmB,EAAEM,OAAO,GAAGC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CAAC;AAExB","ignoreList":[]}
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.DropDownColumn = DropDownColumn;
7
+ var _reactNativeEssentials = require("@shaquillehinds/react-native-essentials");
8
+ var _jsxRuntime = require("react/jsx-runtime");
9
+ function DropDownColumn({
10
+ controller,
11
+ props
12
+ }) {
13
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeEssentials.Layout, {
14
+ borderRadius: "soft",
15
+ backgroundColor: '#FAFAFA',
16
+ padding: controller.canRenderDown ? [5, 0, 0, 0] : [0, 0, 5, 0],
17
+ ...props.dropdownContentContainerProps,
18
+ onLayout: controller.handleSelectionItemsListLayout,
19
+ children: props.items.map(item => props.DropdownItemComponent ? /*#__PURE__*/(0, _jsxRuntime.jsx)(props.DropdownItemComponent, {
20
+ item: item,
21
+ isSelected: item.value === props.selectedItem
22
+ }, item.label) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNativeEssentials.TouchableLayout, {
23
+ flexDirection: "row",
24
+ center: true,
25
+ spaceBetween: true,
26
+ padding: [1, 5],
27
+ ...props.dropdownItemProps,
28
+ onPress: () => {
29
+ props.onSelect(item.value);
30
+ controller.setShowItems(false);
31
+ props.onDropdownItemPress?.(item);
32
+ },
33
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeEssentials.Layout, {
34
+ width: '85%',
35
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeEssentials.BaseText, {
36
+ numberOfLines: 1,
37
+ ...props.dropdownItemTextProps,
38
+ children: item.label
39
+ })
40
+ }), item.value === props.selectedItem ? props.DropdownItemSelectedIcon ? /*#__PURE__*/(0, _jsxRuntime.jsx)(props.DropdownItemSelectedIcon, {
41
+ item: item
42
+ }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeEssentials.RadioIcon, {
43
+ isSelected: true,
44
+ selectedColor: props.DropdownSelectedItemIconColor
45
+ }) : null]
46
+ }, item.label))
47
+ });
48
+ }
49
+ //# sourceMappingURL=DropDownColumn.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_reactNativeEssentials","require","_jsxRuntime","DropDownColumn","controller","props","jsx","Layout","borderRadius","backgroundColor","padding","canRenderDown","dropdownContentContainerProps","onLayout","handleSelectionItemsListLayout","children","items","map","item","DropdownItemComponent","isSelected","value","selectedItem","label","jsxs","TouchableLayout","flexDirection","center","spaceBetween","dropdownItemProps","onPress","onSelect","setShowItems","onDropdownItemPress","width","BaseText","numberOfLines","dropdownItemTextProps","DropdownItemSelectedIcon","RadioIcon","selectedColor","DropdownSelectedItemIconColor"],"sourceRoot":"../../../../../src","sources":["DropDownSelector/components/DropDownSelectorList/DropDownColumn.tsx"],"mappings":";;;;;;AAAA,IAAAA,sBAAA,GAAAC,OAAA;AAKiD,IAAAC,WAAA,GAAAD,OAAA;AAG1C,SAASE,cAAcA,CAAI;EAChCC,UAAU;EACVC;AAIF,CAAC,EAAE;EACD,oBACE,IAAAH,WAAA,CAAAI,GAAA,EAACN,sBAAA,CAAAO,MAAM;IACLC,YAAY,EAAC,MAAM;IACnBC,eAAe,EAAE,SAAU;IAC3BC,OAAO,EAAEN,UAAU,CAACO,aAAa,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAE;IAAA,GAC5DN,KAAK,CAACO,6BAA6B;IACvCC,QAAQ,EAAET,UAAU,CAACU,8BAA+B;IAAAC,QAAA,EAEnDV,KAAK,CAACW,KAAK,CAACC,GAAG,CAAEC,IAAI,IACpBb,KAAK,CAACc,qBAAqB,gBACzB,IAAAjB,WAAA,CAAAI,GAAA,EAACD,KAAK,CAACc,qBAAqB;MAE1BD,IAAI,EAAEA,IAAK;MACXE,UAAU,EAAEF,IAAI,CAACG,KAAK,KAAKhB,KAAK,CAACiB;IAAa,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exports.DropDownRow = DropDownRow;
7
+ var _reactNativeEssentials = require("@shaquillehinds/react-native-essentials");
8
+ var _jsxRuntime = require("react/jsx-runtime");
9
+ function DropDownRow({
10
+ controller,
11
+ props
12
+ }) {
13
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeEssentials.Layout, {
14
+ borderRadius: "soft",
15
+ backgroundColor: '#FAFAFA',
16
+ padding: controller.canRenderDown ? [5, 0, 0, 0] : [0, 0, 5, 0],
17
+ showsHorizontalScrollIndicator: false,
18
+ ...props.dropdownContentContainerProps,
19
+ flexDirection: "row",
20
+ scrollable: true,
21
+ horizontal: true,
22
+ onLayout: controller.handleSelectionItemsListLayout,
23
+ children: props.items.map(item => props.DropdownItemComponent ? /*#__PURE__*/(0, _jsxRuntime.jsx)(props.DropdownItemComponent, {
24
+ item: item,
25
+ isSelected: item.value === props.selectedItem
26
+ }, item.label) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNativeEssentials.TouchableLayout, {
27
+ height: 4,
28
+ padding: [0, 3],
29
+ spaceEnd: true,
30
+ center: true,
31
+ ...props.dropdownItemProps,
32
+ style: [props.dropdownItemProps?.style],
33
+ onPress: () => {
34
+ props.onSelect(item.value);
35
+ controller.setShowItems(false);
36
+ props.onDropdownItemPress?.(item);
37
+ },
38
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeEssentials.BaseText, {
39
+ numberOfLines: 1,
40
+ ...props.dropdownItemTextProps,
41
+ children: item.label
42
+ }), item.value === props.selectedItem ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeEssentials.Layout, {
43
+ absolute: true,
44
+ top: 0,
45
+ square: 1,
46
+ backgroundColor: props.DropdownSelectedItemIconColor || '#888',
47
+ borderRadius: "full"
48
+ }) : null]
49
+ }, item.label))
50
+ });
51
+ }
52
+ //# sourceMappingURL=DropDownRow.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_reactNativeEssentials","require","_jsxRuntime","DropDownRow","controller","props","jsx","Layout","borderRadius","backgroundColor","padding","canRenderDown","showsHorizontalScrollIndicator","dropdownContentContainerProps","flexDirection","scrollable","horizontal","onLayout","handleSelectionItemsListLayout","children","items","map","item","DropdownItemComponent","isSelected","value","selectedItem","label","jsxs","TouchableLayout","height","spaceEnd","center","dropdownItemProps","style","onPress","onSelect","setShowItems","onDropdownItemPress","BaseText","numberOfLines","dropdownItemTextProps","absolute","top","square","DropdownSelectedItemIconColor"],"sourceRoot":"../../../../../src","sources":["DropDownSelector/components/DropDownSelectorList/DropDownRow.tsx"],"mappings":";;;;;;AAAA,IAAAA,sBAAA,GAAAC,OAAA;AAIiD,IAAAC,WAAA,GAAAD,OAAA;AAG1C,SAASE,WAAWA,CAAI;EAC7BC,UAAU;EACVC;AAIF,CAAC,EAAE;EACD,oBACE,IAAAH,WAAA,CAAAI,GAAA,EAACN,sBAAA,CAAAO,MAAM;IACLC,YAAY,EAAC,MAAM;IACnBC,eAAe,EAAE,SAAU;IAC3BC,OAAO,EAAEN,UAAU,CAACO,aAAa,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAE;IAChEC,8BAA8B,EAAE,KAAM;IAAA,GAClCP,KAAK,CAACQ,6BAA6B;IACvCC,aAAa,EAAC,KAAK;IACnBC,UAAU;IACVC,UAAU;IACVC,QAAQ,EAAEb,UAAU,CAACc,8BAA+B;IAAAC,QAAA,EAEnDd,KAAK,CAACe,KAAK,CAACC,GAAG,CAAEC,IAAI,IACpBjB,KAAK,CAACkB,qBAAqB,gBACzB,IAAArB,WAAA,CAAAI,GAAA,EAACD,KAAK,CAACkB,qBAAqB;MAE1BD,IAAI,EAAEA,IAAK;MACXE,UAAU,EAAEF,IAAI,CAACG,KAAK,KAAKpB,KAAK,CAACqB;IAAa,GAFzCJ,IAAI,CAACK,KAGX,CAAC,gBAEF,IAAAzB,WAAA,CAAA0B,IAAA,EAAC5B,sBAAA,CAAA6B,eAAe;MAEdC,MAAM,EAAE,CAAE;MACVpB,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,CAAE;MAChBqB,QAAQ;MACRC,MAAM;MAAA,GACF3B,KAAK,CAAC4B,iBAAiB;MAC3BC,KAAK,EAAE,CAAC7B,KAAK,CAAC4B,iBAAiB,EAAEC,KAAK,CAAE;MACxCC,OAAO,EAAEA,CAAA,KAAM;QACb9B,KAAK,CAAC+B,QAAQ,CAACd,IAAI,CAACG,KAAK,CAAC;QAC1BrB,UAAU,CAACiC,YAAY,CAAC,KAAK,CAAC;QAC9BhC,KAAK,CAACiC,mBAAmB,GAAGhB,IAAI,CAAC;MACnC,CAAE;MAAAH,QAAA,gBAEF,IAAAjB,WAAA,CAAAI,GAAA,EAACN,sBAAA,CAAAuC,QAAQ;QAACC,aAAa,EAAE,CAAE;QAAA,GAAKnC,KAAK,CAACoC,qBAAqB;QAAAtB,QAAA,EACxDG,IAAI,CAACK;MAAK,CACH,CAAC,EACVL,IAAI,CAACG,KAAK,KAAKpB,KAAK,CAACqB,YAAY,gBAChC,IAAAxB,WAAA,CAAAI,GAAA,EAACN,sBAAA,CAAAO,MAAM;QACLmC,QAAQ;QACRC,GAAG,EAAE,CAAE;QACPC,MAAM,EAAE,CAAE;QACVnC,eAAe,EAAEJ,KAAK,CAACwC,6BAA6B,IAAI,MAAO;QAC/DrC,YAAY,EAAC;MAAM,CACpB,CAAC,GACA,IAAI;IAAA,GAxBHc,IAAI,CAACK,KAyBK,CAErB;EAAC,CACK,CAAC;AAEb","ignoreList":[]}
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.DropDownSelectorList = DropDownSelectorList;
7
+ var _reactNativeEssentials = require("@shaquillehinds/react-native-essentials");
8
+ var _reactNative = require("react-native");
9
+ var _reactNativeGestureHandler = require("react-native-gesture-handler");
10
+ var _DropDownColumn = require("./DropDownColumn.js");
11
+ var _DropDownRow = require("./DropDownRow.js");
12
+ var _jsxRuntime = require("react/jsx-runtime");
13
+ function DropDownSelectorList({
14
+ props,
15
+ controller
16
+ }) {
17
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
18
+ style: !props.disableShadow ? {
19
+ ...(0, _reactNativeEssentials.shadowStyles)({
20
+ shadowOpacity: 0.15
21
+ })
22
+ } : undefined,
23
+ children: [!props.disableShadow && _reactNativeEssentials.isAndroid && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeEssentials.AnimateComponent, {
24
+ ref: controller.animateAndroidShadowRef,
25
+ initialPosition: 0,
26
+ style: controller.androidShadowAnimatedStyle,
27
+ autoStart: true,
28
+ toPosition: controller.androidShadowAnimationConfig
29
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeGestureHandler.ScrollView, {
30
+ ref: controller.scrollViewRef,
31
+ scrollEnabled: props.dropDownItemsLayout === 'row',
32
+ nestedScrollEnabled: true,
33
+ showsVerticalScrollIndicator: false,
34
+ overScrollMode: "never",
35
+ ...props.dropdownScrollViewProps,
36
+ style: [controller.scrollViewStyle, props.dropdownScrollViewProps?.style],
37
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeEssentials.AnimateComponent, {
38
+ ref: controller.animateComponentRef,
39
+ style: controller.selectionItemsListAnimatedStyle,
40
+ initialPosition: controller.canRenderDown ? -controller.relativeY(110) : controller.relativeY(110),
41
+ autoStart: true,
42
+ toPosition: props.expandAnimationConfig ? {
43
+ ...props.expandAnimationConfig,
44
+ toValue: 0
45
+ } : controller.selectionItemsListAnimationConfig,
46
+ children: props.dropDownItemsLayout === 'row' ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_DropDownRow.DropDownRow, {
47
+ controller: controller,
48
+ props: props
49
+ }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_DropDownColumn.DropDownColumn, {
50
+ controller: controller,
51
+ props: props
52
+ })
53
+ })
54
+ })]
55
+ });
56
+ }
57
+ //# sourceMappingURL=DropDownSelector.list.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_reactNativeEssentials","require","_reactNative","_reactNativeGestureHandler","_DropDownColumn","_DropDownRow","_jsxRuntime","DropDownSelectorList","props","controller","jsxs","View","style","disableShadow","shadowStyles","shadowOpacity","undefined","children","isAndroid","jsx","AnimateComponent","ref","animateAndroidShadowRef","initialPosition","androidShadowAnimatedStyle","autoStart","toPosition","androidShadowAnimationConfig","ScrollView","scrollViewRef","scrollEnabled","dropDownItemsLayout","nestedScrollEnabled","showsVerticalScrollIndicator","overScrollMode","dropdownScrollViewProps","scrollViewStyle","animateComponentRef","selectionItemsListAnimatedStyle","canRenderDown","relativeY","expandAnimationConfig","toValue","selectionItemsListAnimationConfig","DropDownRow","DropDownColumn"],"sourceRoot":"../../../../../src","sources":["DropDownSelector/components/DropDownSelectorList/DropDownSelector.list.tsx"],"mappings":";;;;;;AAAA,IAAAA,sBAAA,GAAAC,OAAA;AAKA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,0BAAA,GAAAF,OAAA;AAGA,IAAAG,eAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AAA4C,IAAAK,WAAA,GAAAL,OAAA;AAErC,SAASM,oBAAoBA,CAAI;EACtCC,KAAK;EACLC;AAIF,CAAC,EAAE;EACD,oBACE,IAAAH,WAAA,CAAAI,IAAA,EAACR,YAAA,CAAAS,IAAI;IACHC,KAAK,EACH,CAACJ,KAAK,CAACK,aAAa,GAChB;MAAE,GAAG,IAAAC,mCAAY,EAAC;QAAEC,aAAa,EAAE;MAAK,CAAC;IAAE,CAAC,GAC5CC,SACL;IAAAC,QAAA,GAEA,CAACT,KAAK,CAACK,aAAa,IAAIK,gCAAS,iBAChC,IAAAZ,WAAA,CAAAa,GAAA,EAACnB,sBAAA,CAAAoB,gBAAgB;MACfC,GAAG,EAAEZ,UAAU,CAACa,uBAAwB;MACxCC,e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EA;QAAM,CAAE;MACxD,CACe;IAAC,CACT,CAAC;EAAA,CACT,CAAC;AAEX","ignoreList":[]}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ var _DropDownSelectorList = require("./DropDownSelector.list.js");
7
+ Object.keys(_DropDownSelectorList).forEach(function (key) {
8
+ if (key === "default" || key === "__esModule") return;
9
+ if (key in exports && exports[key] === _DropDownSelectorList[key]) return;
10
+ Object.defineProperty(exports, key, {
11
+ enumerable: true,
12
+ get: function () {
13
+ return _DropDownSelectorList[key];
14
+ }
15
+ });
16
+ });
17
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_DropDownSelectorList","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get"],"sourceRoot":"../../../../../src","sources":["DropDownSelector/components/DropDownSelectorList/index.tsx"],"mappings":";;;;;AAAA,IAAAA,qBAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,qBAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,qBAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,qBAAA,CAAAK,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_reactNativeEssentials","require","_reactNativeSvg","_interopRequireWildcard","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ChevronUp","size","color","jsx","width","normalize","height","viewBox","fill","children","Path","d"],"sourceRoot":"../../../../src","sources":["DropDownSelector/svgs/ChevronUp.tsx"],"mappings":";;;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S,EAACJ,IAAI,IAAI,EAAE,CAAE;IAC7BK,MAAM,EAAE,IAAAD,gCAAS,EAACJ,IAAI,IAAI,EAAE,CAAE;IAC9BM,OAAO,EAAC,WAAW;IACnBC,IAAI,EAAC,MAAM;IAAAC,QAAA,eAEX,IAAA7B,WAAA,CAAAuB,GAAA,EAACzB,eAAA,CAAAgC,IAAI;MACHC,CAAC,EAAC,maAAma;MACraH,IAAI,EAAEN,KAAK,IAAI;IAAU,CAC1B;EAAC,CACC,CAAC;AAEV","ignoreList":[]}
1
+ {"version":3,"names":["_reactNativeEssentials","require","_reactNativeSvg","_interopRequireWildcard","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ChevronUp","size","color","jsx","width","normalize","height","viewBox","fill","children","Path","d"],"sourceRoot":"../../../../src","sources":["DropDownSelector/svgs/ChevronUp.tsx"],"mappings":";;;;;;AAAA,IAAAA,sBAAA,GAAAC,OAAA;AACA,IAAAC,eAAA,GAAAC,uBAAA,CAAAF,OAAA;AAA6C,IAAAG,WAAA,GAAAH,OAAA;AAAA,SAAAE,wBAAAE,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAJ,uBAAA,YAAAA,CAAAE,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA,EAAAC,CAAA;AAGtC,SAASkB,SAASA,CAAC;EAAEC,IAAI;EAAEC;AAA+B,CAAC,EAAE;EAClE,oBACE,IAAAtB,WAAA,CAAAuB,GAAA,EAACzB,eAAA,CAAAa,OAAG;IACFa,KAAK,EAAE,IAAAC,gCAAS,EAACJ,IAAI,IAAI,EAAE,CAAE;IAC7BK,MAAM,EAAE,IAAAD,gCAAS,EAACJ,IAAI,IAAI,EAAE,CAAE;IAC9BM,OAAO,EAAC,WAAW;IACnBC,IAAI,EAAC,MAAM;IAAAC,QAAA,eAEX,IAAA7B,WAAA,CAAAuB,GAAA,EAACzB,eAAA,CAAAgC,IAAI;MACHC,CAAC,EAAC,maAAma;MACraH,IAAI,EAAEN,KAAK,IAAI;IAAU,CAC1B;EAAC,CACC,CAAC;AAEV","ignoreList":[]}
@@ -1,10 +1,9 @@
1
1
  "use strict";
2
2
 
3
- import { AnimateComponent, BaseText, isAndroid, Layout, RNPressableLayout, shadowStyles, maxZIndex, TouchableLayout, ComponentMounter, ModalForegroundWrapper, ModalWrapper, RadioIcon } from '@shaquillehinds/react-native-essentials';
4
- import { ChevronUp } from "./svgs/ChevronUp.js";
5
- import { View } from 'react-native';
6
- import { ScrollView } from 'react-native-gesture-handler';
3
+ import { Layout, maxZIndex, ComponentMounter, ModalForegroundWrapper, ModalWrapper } from '@shaquillehinds/react-native-essentials';
7
4
  import { DropDownSelectorController } from "./DropDownSelector.controller.js";
5
+ import { DropDownSelectorButton } from "./components/DropDownSelector.button.js";
6
+ import { DropDownSelectorList } from "./components/DropDownSelectorList/index.js";
8
7
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
9
8
  export function DropDownSelector(props) {
10
9
  const controller = DropDownSelectorController(props);
@@ -23,113 +22,15 @@ export function DropDownSelector(props) {
23
22
  component: /*#__PURE__*/_jsx(ModalWrapper, {
24
23
  enableBackgroundContentPress: true,
25
24
  children: /*#__PURE__*/_jsx(ModalForegroundWrapper, {
26
- children: /*#__PURE__*/_jsxs(View, {
27
- style: !props.disableShadow ? {
28
- ...shadowStyles({
29
- shadowOpacity: 0.15
30
- })
31
- } : undefined,
32
- children: [!props.disableShadow && isAndroid && /*#__PURE__*/_jsx(AnimateComponent, {
33
- ref: controller.animateAndroidShadowRef,
34
- initialPosition: 0,
35
- style: controller.androidShadowAnimatedStyle,
36
- autoStart: true,
37
- toPosition: controller.androidShadowAnimationConfig
38
- }), /*#__PURE__*/_jsx(ScrollView, {
39
- ref: controller.scrollViewRef,
40
- nestedScrollEnabled: true,
41
- showsVerticalScrollIndicator: false,
42
- overScrollMode: "never",
43
- ...props.dropdownScrollViewProps,
44
- style: [controller.scrollViewStyle, props.dropdownScrollViewProps?.style],
45
- children: /*#__PURE__*/_jsx(AnimateComponent, {
46
- ref: controller.animateComponentRef,
47
- style: controller.selectionItemsListAnimatedStyle,
48
- initialPosition: controller.canRenderDown ? -controller.relativeY(110) : controller.relativeY(110),
49
- autoStart: true,
50
- toPosition: props.expandAnimationConfig ? {
51
- ...props.expandAnimationConfig,
52
- toValue: 0
53
- } : controller.selectionItemsListAnimationConfig,
54
- children: /*#__PURE__*/_jsx(Layout, {
55
- borderRadius: "soft",
56
- backgroundColor: '#FAFAFA',
57
- padding: controller.canRenderDown ? [5, 0, 0, 0] : [0, 0, 5, 0],
58
- ...props.dropdownContentContainerProps,
59
- onLayout: controller.handleSelectionItemsListLayout,
60
- children: props.items.map(item => props.DropdownItemComponent ? /*#__PURE__*/_jsx(props.DropdownItemComponent, {
61
- item: item,
62
- isSelected: item.value === props.selectedItem
63
- }, item.label) : /*#__PURE__*/_jsxs(TouchableLayout, {
64
- flexDirection: "row",
65
- center: true,
66
- spaceBetween: true,
67
- padding: [1, 5],
68
- ...props.dropdownItemProps,
69
- onPress: () => {
70
- props.onSelect(item.value);
71
- controller.setShowItems(false);
72
- props.onDropdownItemPress?.(item);
73
- },
74
- children: [/*#__PURE__*/_jsx(Layout, {
75
- width: '85%',
76
- children: /*#__PURE__*/_jsx(BaseText, {
77
- numberOfLines: 1,
78
- ...props.dropdownItemTextProps,
79
- children: item.label
80
- })
81
- }), item.value === props.selectedItem ? props.DropdownItemSelectedIcon ? /*#__PURE__*/_jsx(props.DropdownItemSelectedIcon, {
82
- item: item
83
- }) : /*#__PURE__*/_jsx(RadioIcon, {
84
- isSelected: true
85
- }) : null]
86
- }, item.label))
87
- })
88
- })
89
- })]
25
+ children: /*#__PURE__*/_jsx(DropDownSelectorList, {
26
+ props: props,
27
+ controller: controller
90
28
  })
91
29
  })
92
30
  })
93
- }), /*#__PURE__*/_jsxs(RNPressableLayout, {
94
- disabled: props.isDisabled,
95
- activeOpacity: 1,
96
- flexDirection: "row",
97
- backgroundColor: 'white',
98
- borderRadius: "medium",
99
- padding: [1, 5],
100
- spaceBetween: true,
101
- center: true,
102
- ...props.dropdownButtonProps,
103
- style: [{
104
- zIndex: maxZIndex + 3,
105
- ...shadowStyles({
106
- shadowOpacity: 0.1
107
- })
108
- }, props.dropdownButtonProps?.style],
109
- onPress: e => {
110
- controller.pageYRef.current = e.nativeEvent.pageY;
111
- controller.setShowItems(prev => !prev);
112
- props.dropdownButtonProps?.onPress?.(e);
113
- },
114
- children: [/*#__PURE__*/_jsx(BaseText, {
115
- numberOfLines: 1,
116
- ...props.dropdownButtonTextProps,
117
- style: {
118
- maxWidth: '90%'
119
- },
120
- children: controller.label || props.placeholder || 'Select an item'
121
- }), props.DropdownButtonIcon ? /*#__PURE__*/_jsx(props.DropdownButtonIcon, {
122
- isOpen: controller.showItems,
123
- expandDirection: props.expandDirection || controller.canRenderDown ? 'down' : 'up'
124
- }) : controller.canRenderDown === null ? undefined : /*#__PURE__*/_jsx(AnimateComponent, {
125
- ref: controller.animateChevronRef,
126
- style: controller.chevronAnimatedStyle,
127
- initialPosition: controller.canRenderDown ? -1 : 1,
128
- toPosition: controller.chevronAnimationConfig,
129
- children: /*#__PURE__*/_jsx(ChevronUp, {
130
- color: 'black'
131
- })
132
- })]
31
+ }), /*#__PURE__*/_jsx(DropDownSelectorButton, {
32
+ props: props,
33
+ controller: controller
133
34
  })]
134
35
  });
135
36
  }
@@ -1 +1 @@
1
- {"version":3,"names":["AnimateComponent","BaseText","isAndroid","Layout","RNPressableLayout","shadowStyles","maxZIndex","TouchableLayout","ComponentMounter","ModalForegroundWrapper","ModalWrapper","RadioIcon","ChevronUp","View","ScrollView","DropDownSelectorController","jsx","_jsx","jsxs","_jsxs","DropDownSelector","props","controller","containerProps","style","zIndex","onLayout","handleLayout","children","showComponent","showItems","setShowComponent","setShowItems","unMountDelayInMilliSeconds","onComponentShow","onOpen","onComponentClose","onClose","component","enableBackgroundContentPress","disableShadow","shadowOpacity","undefined","ref","animateAndroidShadowRef","initialPosition","androidShadowAnimatedStyle","autoStart","toPosition","androidShadowAnimationConfig","scrollViewRef","nestedScrollEnabled","showsVerticalScrollIndicator","overScrollMode","dropdownScrollViewProps","scrollViewStyle","animateComponentRef","selectionItemsListAnimatedStyle","canRenderDown","relativeY","expandAnimationConfig","toValue","selectionItemsListAnimationConfig","borderRadius","backgroundColor","padding","dropdownContentContainerProps","handleSelectionItemsListLayout","items","map","item","DropdownItemComponent","isSelected","value","selectedItem","label","flexDirection","center","spaceBetween","dropdownItemProps","onPress","onSelect","onDropdownItemPress","width","numberOfLines","dropdownItemTextProps","DropdownItemSelectedIcon","disabled","isDisabled","activeOpacity","dropdownButtonProps","e","pageYRef","current","nativeEvent","pageY","prev","dropdownButtonTextProps","maxWidth","placeholder","DropdownButtonIcon","isOpen","expandDirection","animateChevronRef","chevronAnimatedStyle","chevronAnimationConfig","color"],"sourceRoot":"../../../src","sources":["DropDownSelector/DropDownSelector.tsx"],"mappings":";;AAAA,SACEA,gBAAgB,EAChBC,QAAQ,EACRC,SAAS,EACTC,MAAM,EACNC,iBAAiB,EACjBC,YAAY,EACZC,SAAS,EACTC,eAAe,EACfC,gBAAgB,EAChBC,sBAAsB,EACtBC,YAAY,EACZC,SAAS,QACJ,yCAAyC;AAChD,SAASC,SAAS,QAAQ,qBAAkB;AAC5C,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,UAAU,QAAQ,8BAA8B;AACzD,SAASC,0BAA0B,QAAQ,kCAA+B;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAG3E,OAAO,SAASC,gBAAgBA,CAAIC,KAA+B,EAAE;EACnE,MAAMC,UAAU,GAAGP,0BAA0B,CAACM,KAAK,CAAC;EAEpD,oBACEF,KAAA,CAAChB,MAAM;IAAA,GACDkB,KAAK,CAACE,cAAc;IACxBC,KAAK,EAAE,CAAC;MAAEC,MAAM,EAAEnB;IAAU,CAAC,EAAEe,KAAK,CAACE,cAAc,EAAEC,KAAK,CAAE;IAC5DE,QAAQ,EAAEJ,UAAU,CAACK,YAAa;IAAAC,QAAA,gBAElCX,IAAA,CAACT,gBAAgB;MACfqB,aAAa,EAAEP,UAAU,CAACQ,SAAU;MACpCC,gBAAgB,EAAET,UAAU,CAACU,YAAa;MAC1CC,0BAA0B,EAAEX,UAAU,CAACW,0BAA2B;MAClEC,eAAe,EAAEb,KAAK,CAACc,MAAO;MAC9BC,gBAAgB,EAAEf,KAAK,CAACgB,OAAQ;MAChCC,SAAS,eACPrB,IAAA,CAACP,YAAY;QAAC6B,4BAA4B;QAAAX,QAAA,eACxCX,IAAA,CA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AAK,CAAC8E,WAAW,IAAI;MAAgB,CAClD,CAAC,EACV9E,KAAK,CAAC+E,kBAAkB,gBACvBnF,IAAA,CAACI,KAAK,CAAC+E,kBAAkB;QACvBC,MAAM,EAAE/E,UAAU,CAACQ,SAAU;QAC7BwE,eAAe,EACbjF,KAAK,CAACiF,eAAe,IAAIhF,UAAU,CAACoC,aAAa,GAAG,MAAM,GAAG;MAC9D,CACF,CAAC,GACApC,UAAU,CAACoC,aAAa,KAAK,IAAI,GAAGhB,SAAS,gBAC/CzB,IAAA,CAACjB,gBAAgB;QACf2C,GAAG,EAAErB,UAAU,CAACiF,iBAAkB;QAClC/E,KAAK,EAAEF,UAAU,CAACkF,oBAAqB;QACvC3D,eAAe,EAAEvB,UAAU,CAACoC,aAAa,GAAG,CAAC,CAAC,GAAG,CAAE;QACnDV,UAAU,EAAE1B,UAAU,CAACmF,sBAAuB;QAAA7E,QAAA,eAE9CX,IAAA,CAACL,SAAS;UAAC8F,KAAK,EAAE;QAAQ,CAAE;MAAC,CACb,CACnB;IAAA,CACgB,CAAC;EAAA,CACd,CAAC;AAEb","ignoreList":[]}
1
+ {"version":3,"names":["Layout","maxZIndex","ComponentMounter","ModalForegroundWrapper","ModalWrapper","DropDownSelectorController","DropDownSelectorButton","DropDownSelectorList","jsx","_jsx","jsxs","_jsxs","DropDownSelector","props","controller","containerProps","style","zIndex","onLayout","handleLayout","children","showComponent","showItems","setShowComponent","setShowItems","unMountDelayInMilliSeconds","onComponentShow","onOpen","onComponentClose","onClose","component","enableBackgroundContentPress"],"sourceRoot":"../../../src","sources":["DropDownSelector/DropDownSelector.tsx"],"mappings":";;AAAA,SACEA,MAAM,EACNC,SAAS,EACTC,gBAAgB,EAChBC,sBAAsB,EACtBC,YAAY,QACP,yCAAyC;AAChD,SAASC,0BAA0B,QAAQ,kCAA+B;AAE1E,SAASC,sBAAsB,QAAQ,yCAAsC;AAC7E,SAASC,oBAAoB,QAAQ,4CAAmC;AAAC,SAAAC,GAAA,IAA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