atlas-design-system 2.1.1 → 3.0.0

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 (309) hide show
  1. package/CHANGELOG.md +55 -0
  2. package/LICENSE +15 -0
  3. package/README.md +13 -5
  4. package/dist/components/BottomSheet/BottomSheet.d.ts +2 -3
  5. package/dist/components/BottomSheet/BottomSheet.js +8 -12
  6. package/dist/components/BottomSheet/index.d.ts +1 -1
  7. package/dist/components/BottomSheet/index.js +1 -1
  8. package/dist/components/Button/Button.d.ts +0 -1
  9. package/dist/components/Button/Button.js +2 -7
  10. package/dist/components/Button/index.d.ts +0 -1
  11. package/dist/components/Button/index.js +0 -1
  12. package/dist/components/Button/styles/ButtonStyle.d.ts +0 -1
  13. package/dist/components/Button/styles/ButtonStyle.js +0 -1
  14. package/dist/components/Button/types.d.ts +0 -1
  15. package/dist/components/Button/types.js +0 -1
  16. package/dist/components/CheckboxOptionInput/CheckboxOptionInput.d.ts +1 -2
  17. package/dist/components/CheckboxOptionInput/CheckboxOptionInput.js +7 -21
  18. package/dist/components/CheckboxOptionInput/index.d.ts +1 -1
  19. package/dist/components/CheckboxOptionInput/index.js +1 -1
  20. package/dist/components/CheckboxOptionItem/CheckboxOptionItem.d.ts +0 -1
  21. package/dist/components/CheckboxOptionItem/CheckboxOptionItem.js +2 -10
  22. package/dist/components/CheckboxOptionItem/index.d.ts +1 -1
  23. package/dist/components/CheckboxOptionItem/index.js +1 -1
  24. package/dist/components/Chevron/Chevron.d.ts +1 -3
  25. package/dist/components/Chevron/Chevron.js +4 -6
  26. package/dist/components/Chevron/index.d.ts +1 -1
  27. package/dist/components/Chevron/index.js +1 -1
  28. package/dist/components/DateTimeInput/DateTimeInput.d.ts +0 -1
  29. package/dist/components/DateTimeInput/DateTimeInput.js +16 -40
  30. package/dist/components/DateTimeInput/index.d.ts +0 -1
  31. package/dist/components/DateTimeInput/index.js +0 -1
  32. package/dist/components/DragHandle/DragHandle.d.ts +2 -3
  33. package/dist/components/DragHandle/DragHandle.js +3 -5
  34. package/dist/components/DragHandle/index.d.ts +1 -1
  35. package/dist/components/DragHandle/index.js +1 -1
  36. package/dist/components/FieldError/FieldError.d.ts +2 -4
  37. package/dist/components/FieldError/FieldError.js +2 -6
  38. package/dist/components/Forms/Form/Form.d.ts +0 -1
  39. package/dist/components/Forms/Form/Form.js +2 -3
  40. package/dist/components/Forms/Form/index.d.ts +0 -1
  41. package/dist/components/Forms/Form/index.js +0 -1
  42. package/dist/components/Forms/FormDateTimeInput/FormDateTimeInput.d.ts +0 -1
  43. package/dist/components/Forms/FormDateTimeInput/FormDateTimeInput.js +3 -4
  44. package/dist/components/Forms/FormDateTimeInput/index.d.ts +0 -1
  45. package/dist/components/Forms/FormDateTimeInput/index.js +0 -1
  46. package/dist/components/Forms/FormSegmentedControl/FormSegmentedControl.d.ts +0 -1
  47. package/dist/components/Forms/FormSegmentedControl/FormSegmentedControl.js +4 -5
  48. package/dist/components/Forms/FormSegmentedControl/index.d.ts +0 -1
  49. package/dist/components/Forms/FormSegmentedControl/index.js +0 -1
  50. package/dist/components/Forms/FormSelectInput/FormSelectInput.d.ts +0 -1
  51. package/dist/components/Forms/FormSelectInput/FormSelectInput.js +4 -6
  52. package/dist/components/Forms/FormSelectInput/index.d.ts +0 -1
  53. package/dist/components/Forms/FormSelectInput/index.js +0 -1
  54. package/dist/components/Forms/FormSwitchToggle/FormSwitchToggle.d.ts +0 -1
  55. package/dist/components/Forms/FormSwitchToggle/FormSwitchToggle.js +2 -2
  56. package/dist/components/Forms/FormSwitchToggle/index.d.ts +0 -1
  57. package/dist/components/Forms/FormSwitchToggle/index.js +0 -1
  58. package/dist/components/Forms/FormTextInput/FormTextInput.d.ts +0 -1
  59. package/dist/components/Forms/FormTextInput/FormTextInput.js +3 -6
  60. package/dist/components/Forms/FormTextInput/index.d.ts +0 -1
  61. package/dist/components/Forms/FormTextInput/index.js +0 -1
  62. package/dist/components/Forms/index.d.ts +0 -1
  63. package/dist/components/Forms/index.js +0 -1
  64. package/dist/components/MenuItemDescription/MenuItemDescription.d.ts +0 -1
  65. package/dist/components/MenuItemDescription/MenuItemDescription.js +3 -7
  66. package/dist/components/MenuItemDescription/index.d.ts +1 -1
  67. package/dist/components/MenuItemDescription/index.js +1 -1
  68. package/dist/components/NavigationListRow/NavigationListRow.d.ts +3 -2
  69. package/dist/components/NavigationListRow/NavigationListRow.js +4 -10
  70. package/dist/components/NavigationListRow/index.d.ts +1 -1
  71. package/dist/components/NavigationListRow/index.js +1 -1
  72. package/dist/components/RadioOptionInput/RadioOptionInput.d.ts +1 -2
  73. package/dist/components/RadioOptionInput/RadioOptionInput.js +4 -17
  74. package/dist/components/RadioOptionInput/index.d.ts +1 -1
  75. package/dist/components/RadioOptionInput/index.js +1 -1
  76. package/dist/components/RadioOptionItem/RadioOptionItem.d.ts +0 -1
  77. package/dist/components/RadioOptionItem/RadioOptionItem.js +5 -13
  78. package/dist/components/RadioOptionItem/index.d.ts +1 -1
  79. package/dist/components/RadioOptionItem/index.js +1 -1
  80. package/dist/components/Search/Search.d.ts +2 -2
  81. package/dist/components/Search/Search.js +4 -14
  82. package/dist/components/Search/index.d.ts +1 -1
  83. package/dist/components/Search/index.js +1 -1
  84. package/dist/components/SegmentedControl/SegmentedControl.d.ts +0 -1
  85. package/dist/components/SegmentedControl/SegmentedControl.js +16 -28
  86. package/dist/components/SegmentedControl/index.d.ts +0 -1
  87. package/dist/components/SegmentedControl/index.js +0 -1
  88. package/dist/components/SelectInput/SelectInput.d.ts +0 -1
  89. package/dist/components/SelectInput/SelectInput.js +4 -25
  90. package/dist/components/SelectInput/components/SelectionItem.d.ts +0 -1
  91. package/dist/components/SelectInput/components/SelectionItem.js +3 -5
  92. package/dist/components/SelectInput/index.d.ts +0 -1
  93. package/dist/components/SelectInput/index.js +0 -1
  94. package/dist/components/SelectInput/types.d.ts +0 -1
  95. package/dist/components/SelectInput/types.js +0 -1
  96. package/dist/components/Sheet/Sheet.d.ts +2 -3
  97. package/dist/components/Sheet/Sheet.js +19 -36
  98. package/dist/components/Sheet/components/SheetHeader.d.ts +1 -2
  99. package/dist/components/Sheet/components/SheetHeader.js +3 -3
  100. package/dist/components/Sheet/index.d.ts +2 -1
  101. package/dist/components/Sheet/index.js +2 -1
  102. package/dist/components/SwitchToggle/SwitchToggle.d.ts +0 -1
  103. package/dist/components/SwitchToggle/SwitchToggle.js +3 -14
  104. package/dist/components/SwitchToggle/index.d.ts +0 -1
  105. package/dist/components/SwitchToggle/index.js +0 -1
  106. package/dist/components/Text/Text.d.ts +2 -3
  107. package/dist/components/Text/Text.js +3 -3
  108. package/dist/components/Text/index.d.ts +1 -1
  109. package/dist/components/Text/index.js +1 -1
  110. package/dist/components/TextInput/TextInput.d.ts +4 -1
  111. package/dist/components/TextInput/TextInput.js +10 -22
  112. package/dist/components/TextInput/index.d.ts +0 -1
  113. package/dist/components/TextInput/index.js +0 -1
  114. package/dist/components/TitleBar/TitleBar.d.ts +0 -1
  115. package/dist/components/TitleBar/TitleBar.js +7 -20
  116. package/dist/components/TitleBar/index.d.ts +0 -1
  117. package/dist/components/TitleBar/index.js +0 -1
  118. package/dist/components/index.d.ts +0 -1
  119. package/dist/components/index.js +0 -1
  120. package/dist/constants/animations.d.ts +0 -1
  121. package/dist/constants/animations.js +0 -1
  122. package/dist/constants/index.d.ts +0 -1
  123. package/dist/constants/index.js +0 -1
  124. package/dist/context/index.d.ts +0 -1
  125. package/dist/context/index.js +0 -1
  126. package/dist/hooks/index.d.ts +0 -1
  127. package/dist/hooks/index.js +0 -1
  128. package/dist/hooks/useInputFieldAnimatedBorder.d.ts +2 -3
  129. package/dist/hooks/useInputFieldAnimatedBorder.js +0 -1
  130. package/dist/hooks/useInputFieldFontSizeInterpolationOutputRange.d.ts +0 -1
  131. package/dist/hooks/useInputFieldFontSizeInterpolationOutputRange.js +0 -1
  132. package/dist/hooks/usePrevious.d.ts +0 -1
  133. package/dist/hooks/usePrevious.js +0 -1
  134. package/dist/hooks/useTheme.d.ts +0 -1
  135. package/dist/hooks/useTheme.js +0 -1
  136. package/dist/hooks/useThemedStyle.d.ts +0 -1
  137. package/dist/hooks/useThemedStyle.js +0 -1
  138. package/dist/index.d.ts +0 -1
  139. package/dist/index.js +0 -1
  140. package/dist/shared/styles/index.d.ts +0 -1
  141. package/dist/shared/styles/index.js +0 -1
  142. package/dist/themes/AtlasLightTheme.d.ts +0 -1
  143. package/dist/themes/AtlasLightTheme.js +0 -1
  144. package/dist/themes/index.d.ts +0 -1
  145. package/dist/themes/index.js +0 -1
  146. package/dist/types/index.d.ts +0 -1
  147. package/dist/types/index.js +0 -1
  148. package/dist/types/theme.d.ts +0 -1
  149. package/dist/types/theme.js +0 -1
  150. package/dist/types/typography.d.ts +0 -1
  151. package/dist/types/typography.js +0 -1
  152. package/dist/utils/animation.d.ts +0 -1
  153. package/dist/utils/animation.js +0 -1
  154. package/dist/utils/index.d.ts +0 -1
  155. package/dist/utils/index.js +0 -1
  156. package/package.json +53 -21
  157. package/dist/components/BottomSheet/BottomSheet.d.ts.map +0 -1
  158. package/dist/components/BottomSheet/BottomSheet.js.map +0 -1
  159. package/dist/components/BottomSheet/index.d.ts.map +0 -1
  160. package/dist/components/BottomSheet/index.js.map +0 -1
  161. package/dist/components/Button/Button.d.ts.map +0 -1
  162. package/dist/components/Button/Button.js.map +0 -1
  163. package/dist/components/Button/index.d.ts.map +0 -1
  164. package/dist/components/Button/index.js.map +0 -1
  165. package/dist/components/Button/styles/ButtonStyle.d.ts.map +0 -1
  166. package/dist/components/Button/styles/ButtonStyle.js.map +0 -1
  167. package/dist/components/Button/types.d.ts.map +0 -1
  168. package/dist/components/Button/types.js.map +0 -1
  169. package/dist/components/CheckboxOptionInput/CheckboxOptionInput.d.ts.map +0 -1
  170. package/dist/components/CheckboxOptionInput/CheckboxOptionInput.js.map +0 -1
  171. package/dist/components/CheckboxOptionInput/index.d.ts.map +0 -1
  172. package/dist/components/CheckboxOptionInput/index.js.map +0 -1
  173. package/dist/components/CheckboxOptionItem/CheckboxOptionItem.d.ts.map +0 -1
  174. package/dist/components/CheckboxOptionItem/CheckboxOptionItem.js.map +0 -1
  175. package/dist/components/CheckboxOptionItem/index.d.ts.map +0 -1
  176. package/dist/components/CheckboxOptionItem/index.js.map +0 -1
  177. package/dist/components/Chevron/Chevron.d.ts.map +0 -1
  178. package/dist/components/Chevron/Chevron.js.map +0 -1
  179. package/dist/components/Chevron/index.d.ts.map +0 -1
  180. package/dist/components/Chevron/index.js.map +0 -1
  181. package/dist/components/DateTimeInput/DateTimeInput.d.ts.map +0 -1
  182. package/dist/components/DateTimeInput/DateTimeInput.js.map +0 -1
  183. package/dist/components/DateTimeInput/index.d.ts.map +0 -1
  184. package/dist/components/DateTimeInput/index.js.map +0 -1
  185. package/dist/components/DragHandle/DragHandle.d.ts.map +0 -1
  186. package/dist/components/DragHandle/DragHandle.js.map +0 -1
  187. package/dist/components/DragHandle/index.d.ts.map +0 -1
  188. package/dist/components/DragHandle/index.js.map +0 -1
  189. package/dist/components/FieldError/FieldError.d.ts.map +0 -1
  190. package/dist/components/FieldError/FieldError.js.map +0 -1
  191. package/dist/components/Forms/Form/Form.d.ts.map +0 -1
  192. package/dist/components/Forms/Form/Form.js.map +0 -1
  193. package/dist/components/Forms/Form/index.d.ts.map +0 -1
  194. package/dist/components/Forms/Form/index.js.map +0 -1
  195. package/dist/components/Forms/FormDateTimeInput/FormDateTimeInput.d.ts.map +0 -1
  196. package/dist/components/Forms/FormDateTimeInput/FormDateTimeInput.js.map +0 -1
  197. package/dist/components/Forms/FormDateTimeInput/index.d.ts.map +0 -1
  198. package/dist/components/Forms/FormDateTimeInput/index.js.map +0 -1
  199. package/dist/components/Forms/FormSegmentedControl/FormSegmentedControl.d.ts.map +0 -1
  200. package/dist/components/Forms/FormSegmentedControl/FormSegmentedControl.js.map +0 -1
  201. package/dist/components/Forms/FormSegmentedControl/index.d.ts.map +0 -1
  202. package/dist/components/Forms/FormSegmentedControl/index.js.map +0 -1
  203. package/dist/components/Forms/FormSelectInput/FormSelectInput.d.ts.map +0 -1
  204. package/dist/components/Forms/FormSelectInput/FormSelectInput.js.map +0 -1
  205. package/dist/components/Forms/FormSelectInput/index.d.ts.map +0 -1
  206. package/dist/components/Forms/FormSelectInput/index.js.map +0 -1
  207. package/dist/components/Forms/FormSwitchToggle/FormSwitchToggle.d.ts.map +0 -1
  208. package/dist/components/Forms/FormSwitchToggle/FormSwitchToggle.js.map +0 -1
  209. package/dist/components/Forms/FormSwitchToggle/index.d.ts.map +0 -1
  210. package/dist/components/Forms/FormSwitchToggle/index.js.map +0 -1
  211. package/dist/components/Forms/FormTextInput/FormTextInput.d.ts.map +0 -1
  212. package/dist/components/Forms/FormTextInput/FormTextInput.js.map +0 -1
  213. package/dist/components/Forms/FormTextInput/index.d.ts.map +0 -1
  214. package/dist/components/Forms/FormTextInput/index.js.map +0 -1
  215. package/dist/components/Forms/index.d.ts.map +0 -1
  216. package/dist/components/Forms/index.js.map +0 -1
  217. package/dist/components/MenuItemDescription/MenuItemDescription.d.ts.map +0 -1
  218. package/dist/components/MenuItemDescription/MenuItemDescription.js.map +0 -1
  219. package/dist/components/MenuItemDescription/index.d.ts.map +0 -1
  220. package/dist/components/MenuItemDescription/index.js.map +0 -1
  221. package/dist/components/NavigationListRow/NavigationListRow.d.ts.map +0 -1
  222. package/dist/components/NavigationListRow/NavigationListRow.js.map +0 -1
  223. package/dist/components/NavigationListRow/index.d.ts.map +0 -1
  224. package/dist/components/NavigationListRow/index.js.map +0 -1
  225. package/dist/components/RadioOptionInput/RadioOptionInput.d.ts.map +0 -1
  226. package/dist/components/RadioOptionInput/RadioOptionInput.js.map +0 -1
  227. package/dist/components/RadioOptionInput/index.d.ts.map +0 -1
  228. package/dist/components/RadioOptionInput/index.js.map +0 -1
  229. package/dist/components/RadioOptionItem/RadioOptionItem.d.ts.map +0 -1
  230. package/dist/components/RadioOptionItem/RadioOptionItem.js.map +0 -1
  231. package/dist/components/RadioOptionItem/index.d.ts.map +0 -1
  232. package/dist/components/RadioOptionItem/index.js.map +0 -1
  233. package/dist/components/Search/Search.d.ts.map +0 -1
  234. package/dist/components/Search/Search.js.map +0 -1
  235. package/dist/components/Search/index.d.ts.map +0 -1
  236. package/dist/components/Search/index.js.map +0 -1
  237. package/dist/components/SegmentedControl/SegmentedControl.d.ts.map +0 -1
  238. package/dist/components/SegmentedControl/SegmentedControl.js.map +0 -1
  239. package/dist/components/SegmentedControl/index.d.ts.map +0 -1
  240. package/dist/components/SegmentedControl/index.js.map +0 -1
  241. package/dist/components/SelectInput/SelectInput.d.ts.map +0 -1
  242. package/dist/components/SelectInput/SelectInput.js.map +0 -1
  243. package/dist/components/SelectInput/components/SelectionItem.d.ts.map +0 -1
  244. package/dist/components/SelectInput/components/SelectionItem.js.map +0 -1
  245. package/dist/components/SelectInput/index.d.ts.map +0 -1
  246. package/dist/components/SelectInput/index.js.map +0 -1
  247. package/dist/components/SelectInput/types.d.ts.map +0 -1
  248. package/dist/components/SelectInput/types.js.map +0 -1
  249. package/dist/components/Sheet/Sheet.d.ts.map +0 -1
  250. package/dist/components/Sheet/Sheet.js.map +0 -1
  251. package/dist/components/Sheet/components/SheetHeader.d.ts.map +0 -1
  252. package/dist/components/Sheet/components/SheetHeader.js.map +0 -1
  253. package/dist/components/Sheet/index.d.ts.map +0 -1
  254. package/dist/components/Sheet/index.js.map +0 -1
  255. package/dist/components/SwitchToggle/SwitchToggle.d.ts.map +0 -1
  256. package/dist/components/SwitchToggle/SwitchToggle.js.map +0 -1
  257. package/dist/components/SwitchToggle/index.d.ts.map +0 -1
  258. package/dist/components/SwitchToggle/index.js.map +0 -1
  259. package/dist/components/Text/Text.d.ts.map +0 -1
  260. package/dist/components/Text/Text.js.map +0 -1
  261. package/dist/components/Text/index.d.ts.map +0 -1
  262. package/dist/components/Text/index.js.map +0 -1
  263. package/dist/components/TextInput/TextInput.d.ts.map +0 -1
  264. package/dist/components/TextInput/TextInput.js.map +0 -1
  265. package/dist/components/TextInput/index.d.ts.map +0 -1
  266. package/dist/components/TextInput/index.js.map +0 -1
  267. package/dist/components/TitleBar/TitleBar.d.ts.map +0 -1
  268. package/dist/components/TitleBar/TitleBar.js.map +0 -1
  269. package/dist/components/TitleBar/index.d.ts.map +0 -1
  270. package/dist/components/TitleBar/index.js.map +0 -1
  271. package/dist/components/index.d.ts.map +0 -1
  272. package/dist/components/index.js.map +0 -1
  273. package/dist/constants/animations.d.ts.map +0 -1
  274. package/dist/constants/animations.js.map +0 -1
  275. package/dist/constants/index.d.ts.map +0 -1
  276. package/dist/constants/index.js.map +0 -1
  277. package/dist/context/index.d.ts.map +0 -1
  278. package/dist/context/index.js.map +0 -1
  279. package/dist/hooks/index.d.ts.map +0 -1
  280. package/dist/hooks/index.js.map +0 -1
  281. package/dist/hooks/useInputFieldAnimatedBorder.d.ts.map +0 -1
  282. package/dist/hooks/useInputFieldAnimatedBorder.js.map +0 -1
  283. package/dist/hooks/useInputFieldFontSizeInterpolationOutputRange.d.ts.map +0 -1
  284. package/dist/hooks/useInputFieldFontSizeInterpolationOutputRange.js.map +0 -1
  285. package/dist/hooks/usePrevious.d.ts.map +0 -1
  286. package/dist/hooks/usePrevious.js.map +0 -1
  287. package/dist/hooks/useTheme.d.ts.map +0 -1
  288. package/dist/hooks/useTheme.js.map +0 -1
  289. package/dist/hooks/useThemedStyle.d.ts.map +0 -1
  290. package/dist/hooks/useThemedStyle.js.map +0 -1
  291. package/dist/index.d.ts.map +0 -1
  292. package/dist/index.js.map +0 -1
  293. package/dist/shared/styles/index.d.ts.map +0 -1
  294. package/dist/shared/styles/index.js.map +0 -1
  295. package/dist/themes/AtlasLightTheme.d.ts.map +0 -1
  296. package/dist/themes/AtlasLightTheme.js.map +0 -1
  297. package/dist/themes/index.d.ts.map +0 -1
  298. package/dist/themes/index.js.map +0 -1
  299. package/dist/types/index.d.ts.map +0 -1
  300. package/dist/types/index.js.map +0 -1
  301. package/dist/types/theme.d.ts.map +0 -1
  302. package/dist/types/theme.js.map +0 -1
  303. package/dist/types/typography.d.ts.map +0 -1
  304. package/dist/types/typography.js.map +0 -1
  305. package/dist/utils/animation.d.ts.map +0 -1
  306. package/dist/utils/animation.js.map +0 -1
  307. package/dist/utils/index.d.ts.map +0 -1
  308. package/dist/utils/index.js.map +0 -1
  309. package/example/android/app/debug.keystore +0 -0
@@ -1,3 +1,4 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
1
2
  import { useField } from "informed";
2
3
  import { DateTimeInput } from "../../DateTimeInput";
3
4
  const FormDateTimeInput = (props) => {
@@ -5,9 +6,7 @@ const FormDateTimeInput = (props) => {
5
6
  type: "date",
6
7
  ...props,
7
8
  });
8
- return render(<DateTimeInput
9
- //@ts-expect-error no types yet
10
- error={fieldState.error} value={informed.value} onSave={fieldApi.setValue} {...userProps}/>);
9
+ const error = fieldState.error;
10
+ return render(_jsx(DateTimeInput, { error: error, value: informed.value, onSave: fieldApi.setValue, ...userProps }));
11
11
  };
12
12
  export default FormDateTimeInput;
13
- //# sourceMappingURL=FormDateTimeInput.js.map
@@ -1,2 +1 @@
1
1
  export { default as FormDateTimeInput } from "./FormDateTimeInput";
2
- //# sourceMappingURL=index.d.ts.map
@@ -1,2 +1 @@
1
1
  export { default as FormDateTimeInput } from "./FormDateTimeInput";
2
- //# sourceMappingURL=index.js.map
@@ -6,4 +6,3 @@ export type FormSegmentedControlProps<T> = Omit<SegmentedControlProps<T>, "optio
6
6
  };
7
7
  declare function FormSegmentedControl<T>(props: FieldProps<FormSegmentedControlProps<T>>): JSX.Element;
8
8
  export default FormSegmentedControl;
9
- //# sourceMappingURL=FormSegmentedControl.d.ts.map
@@ -1,3 +1,4 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
1
2
  import { useField } from "informed";
2
3
  import { useMemo } from "react";
3
4
  import { SegmentedControl, } from "../../SegmentedControl";
@@ -14,11 +15,9 @@ function FormSegmentedControl(props) {
14
15
  };
15
16
  });
16
17
  }, [userProps.options, value]);
17
- return render(<SegmentedControl onChange={(v) => {
18
+ const error = fieldState.error;
19
+ return render(_jsx(SegmentedControl, { onChange: (v) => {
18
20
  fieldApi.setValue(v.value);
19
- }}
20
- //@ts-expect-error no types yet :(
21
- error={fieldState.error} {...userProps} options={options}/>);
21
+ }, error: error, ...userProps, options: options }));
22
22
  }
23
23
  export default FormSegmentedControl;
24
- //# sourceMappingURL=FormSegmentedControl.js.map
@@ -1,3 +1,2 @@
1
1
  export { default as FormSegmentedControl } from "./FormSegmentedControl";
2
2
  export type { FormSegmentedControlProps } from "./FormSegmentedControl";
3
- //# sourceMappingURL=index.d.ts.map
@@ -1,2 +1 @@
1
1
  export { default as FormSegmentedControl } from "./FormSegmentedControl";
2
- //# sourceMappingURL=index.js.map
@@ -7,4 +7,3 @@ export type FormSelectInputProps<T> = Omit<SelectInputProps<T>, "options"> & {
7
7
  type Props<T> = FieldProps<FormSelectInputProps<T>>;
8
8
  declare function FormSelectInput<T>(props: Props<T>): JSX.Element;
9
9
  export default FormSelectInput;
10
- //# sourceMappingURL=FormSelectInput.d.ts.map
@@ -1,3 +1,4 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
1
2
  import { useField } from "informed";
2
3
  import { useMemo } from "react";
3
4
  import { SelectInput } from "../../SelectInput";
@@ -6,7 +7,7 @@ function FormSelectInput(props) {
6
7
  ...props,
7
8
  });
8
9
  const { value } = informed;
9
- const { error } = fieldState;
10
+ const error = fieldState.error;
10
11
  const options = useMemo(() => {
11
12
  return userProps.options.map((v) => {
12
13
  return {
@@ -15,11 +16,8 @@ function FormSelectInput(props) {
15
16
  };
16
17
  });
17
18
  }, [userProps.options, value]);
18
- return render(<SelectInput onChange={(v) => {
19
+ return render(_jsx(SelectInput, { onChange: (v) => {
19
20
  fieldApi.setValue(v.value);
20
- }}
21
- //@ts-expect-error no types yet :(
22
- error={error} {...userProps} options={options}/>);
21
+ }, error: error, ...userProps, options: options }));
23
22
  }
24
23
  export default FormSelectInput;
25
- //# sourceMappingURL=FormSelectInput.js.map
@@ -1,3 +1,2 @@
1
1
  export { default as FormSelectInput } from "./FormSelectInput";
2
2
  export type { FormSelectInputProps } from "./FormSelectInput";
3
- //# sourceMappingURL=index.d.ts.map
@@ -1,2 +1 @@
1
1
  export { default as FormSelectInput } from "./FormSelectInput";
2
- //# sourceMappingURL=index.js.map
@@ -2,4 +2,3 @@ import { FieldProps } from "informed";
2
2
  import { SwitchToggleProps } from "../../SwitchToggle";
3
3
  declare const FormSwitchToggle: (props: FieldProps<SwitchToggleProps>) => JSX.Element;
4
4
  export default FormSwitchToggle;
5
- //# sourceMappingURL=FormSwitchToggle.d.ts.map
@@ -1,3 +1,4 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
1
2
  import { useField } from "informed";
2
3
  import { SwitchToggle } from "../../SwitchToggle";
3
4
  const FormSwitchToggle = (props) => {
@@ -6,7 +7,6 @@ const FormSwitchToggle = (props) => {
6
7
  ...props,
7
8
  });
8
9
  const { value } = informed;
9
- return render(<SwitchToggle value={value} onChange={fieldApi.setValue} {...userProps}/>);
10
+ return render(_jsx(SwitchToggle, { value: value, onChange: fieldApi.setValue, ...userProps }));
10
11
  };
11
12
  export default FormSwitchToggle;
12
- //# sourceMappingURL=FormSwitchToggle.js.map
@@ -1,2 +1 @@
1
1
  export { default as FormSwitchToggle } from "./FormSwitchToggle";
2
- //# sourceMappingURL=index.d.ts.map
@@ -1,2 +1 @@
1
1
  export { default as FormSwitchToggle } from "./FormSwitchToggle";
2
- //# sourceMappingURL=index.js.map
@@ -2,4 +2,3 @@ import { FieldProps } from 'informed';
2
2
  import { TextInputProps } from '../../TextInput';
3
3
  declare const FormTextInput: (props: FieldProps<TextInputProps>) => JSX.Element;
4
4
  export default FormTextInput;
5
- //# sourceMappingURL=FormTextInput.d.ts.map
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { useField } from 'informed';
3
3
  import { TextInput } from '../../TextInput';
4
4
  const FormTextInput = (props) => {
@@ -7,10 +7,7 @@ const FormTextInput = (props) => {
7
7
  ...props,
8
8
  });
9
9
  const { value } = informed;
10
- const { error } = fieldState;
11
- return render(<TextInput
12
- //@ts-expect-error no types yet
13
- error={error} onChangeText={fieldApi.setValue} {...userProps} value={value}/>);
10
+ const error = fieldState.error;
11
+ return render(_jsx(TextInput, { error: error, onChangeText: fieldApi.setValue, ...userProps, value: value }));
14
12
  };
15
13
  export default FormTextInput;
16
- //# sourceMappingURL=FormTextInput.js.map
@@ -1,2 +1 @@
1
1
  export { default as FormTextInput } from "./FormTextInput";
2
- //# sourceMappingURL=index.d.ts.map
@@ -1,2 +1 @@
1
1
  export { default as FormTextInput } from "./FormTextInput";
2
- //# sourceMappingURL=index.js.map
@@ -4,4 +4,3 @@ export * from './FormTextInput';
4
4
  export * from './FormDateTimeInput';
5
5
  export * from './FormSelectInput';
6
6
  export * from './FormSegmentedControl';
7
- //# sourceMappingURL=index.d.ts.map
@@ -4,4 +4,3 @@ export * from './FormTextInput';
4
4
  export * from './FormDateTimeInput';
5
5
  export * from './FormSelectInput';
6
6
  export * from './FormSegmentedControl';
7
- //# sourceMappingURL=index.js.map
@@ -4,4 +4,3 @@ export type MenuItemDescriptionProps = {
4
4
  };
5
5
  declare const MenuItemDescription: ({ description }: MenuItemDescriptionProps) => React.JSX.Element;
6
6
  export default MenuItemDescription;
7
- //# sourceMappingURL=MenuItemDescription.d.ts.map
@@ -1,14 +1,11 @@
1
- import React, { useCallback } from "react";
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useCallback } from "react";
2
3
  import { StyleSheet, View } from "react-native";
3
4
  import { useThemedStyle } from "../../hooks";
4
5
  import { Text } from "../Text";
5
6
  const MenuItemDescription = ({ description }) => {
6
7
  const styles = useStyles().styles;
7
- return (<View style={styles.descriptionContainer}>
8
- <Text category="p2" contrast="low">
9
- {description}
10
- </Text>
11
- </View>);
8
+ return (_jsx(View, { style: styles.descriptionContainer, children: _jsx(Text, { category: "p2", contrast: "low", children: description }) }));
12
9
  };
13
10
  const useStyles = () => useThemedStyle(useCallback((theme) => StyleSheet.create({
14
11
  descriptionContainer: {
@@ -17,4 +14,3 @@ const useStyles = () => useThemedStyle(useCallback((theme) => StyleSheet.create(
17
14
  },
18
15
  }), []));
19
16
  export default MenuItemDescription;
20
- //# sourceMappingURL=MenuItemDescription.js.map
@@ -1,2 +1,2 @@
1
1
  export { default as MenuItemDescription } from "./MenuItemDescription";
2
- //# sourceMappingURL=index.d.ts.map
2
+ export * from "./MenuItemDescription";
@@ -1,2 +1,2 @@
1
1
  export { default as MenuItemDescription } from "./MenuItemDescription";
2
- //# sourceMappingURL=index.js.map
2
+ export * from "./MenuItemDescription";
@@ -1,5 +1,7 @@
1
1
  import React from "react";
2
2
  import { StyleProp, ViewStyle } from "react-native";
3
+ import { IoniconsIconName } from "@react-native-vector-icons/ionicons/static";
4
+ export type { IoniconsIconName };
3
5
  export type NavigationListRowProps = {
4
6
  label: string;
5
7
  caption?: string;
@@ -8,8 +10,7 @@ export type NavigationListRowProps = {
8
10
  defaultPadding?: boolean;
9
11
  containerStyle?: StyleProp<ViewStyle>;
10
12
  iconRight?: React.ReactNode;
11
- iconRightName?: string;
13
+ iconRightName?: IoniconsIconName;
12
14
  };
13
15
  declare const NavigationListRow: ({ label, caption, onPress, disabled, defaultPadding, containerStyle, iconRight, iconRightName, }: NavigationListRowProps) => React.JSX.Element;
14
16
  export default NavigationListRow;
15
- //# sourceMappingURL=NavigationListRow.d.ts.map
@@ -1,17 +1,12 @@
1
- import React, { useCallback } from "react";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useCallback } from "react";
2
3
  import { StyleSheet, View, TouchableOpacity, } from "react-native";
3
- import IonIcons from "react-native-vector-icons/Ionicons";
4
+ import IonIcons from "@react-native-vector-icons/ionicons/static";
4
5
  import { Text } from "../Text";
5
6
  import { useThemedStyle } from "../../hooks/useThemedStyle";
6
7
  const NavigationListRow = ({ label, caption, onPress, disabled, defaultPadding = true, containerStyle = {}, iconRight, iconRightName = "chevron-forward-outline", }) => {
7
8
  const styles = useStyles(defaultPadding).styles;
8
- return (<TouchableOpacity disabled={disabled} style={[styles.container, containerStyle]} onPress={onPress}>
9
- <View style={styles.content}>
10
- <Text category="h3">{label}</Text>
11
- {caption && <Text contrast="low">{caption}</Text>}
12
- </View>
13
- {iconRight ? (iconRight) : (<IonIcons style={styles.chevronRight} size={18} name={iconRightName}/>)}
14
- </TouchableOpacity>);
9
+ return (_jsxs(TouchableOpacity, { disabled: disabled, style: [styles.container, containerStyle], onPress: onPress, children: [_jsxs(View, { style: styles.content, children: [_jsx(Text, { category: "h3", children: label }), caption && _jsx(Text, { contrast: "low", children: caption })] }), iconRight ? (iconRight) : (_jsx(IonIcons, { style: styles.chevronRight, size: 18, name: iconRightName }))] }));
15
10
  };
16
11
  export default NavigationListRow;
17
12
  const useStyles = (defaultPadding) => useThemedStyle(useCallback((t) => StyleSheet.create({
@@ -29,4 +24,3 @@ const useStyles = (defaultPadding) => useThemedStyle(useCallback((t) => StyleShe
29
24
  color: t.colors.foregroundHighContrast,
30
25
  },
31
26
  }), [defaultPadding]));
32
- //# sourceMappingURL=NavigationListRow.js.map
@@ -1,2 +1,2 @@
1
1
  export { default as NavigationListRow } from "./NavigationListRow";
2
- //# sourceMappingURL=index.d.ts.map
2
+ export * from "./NavigationListRow";
@@ -1,2 +1,2 @@
1
1
  export { default as NavigationListRow } from "./NavigationListRow";
2
- //# sourceMappingURL=index.js.map
2
+ export * from "./NavigationListRow";
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  import { StyleProp, ViewStyle } from "react-native";
3
3
  import { Option } from "../SelectInput/types";
4
- type RadioOptionInputProps<T> = {
4
+ export type RadioOptionInputProps<T> = {
5
5
  caption?: string;
6
6
  label: string;
7
7
  options: Option<T>[];
@@ -12,4 +12,3 @@ type RadioOptionInputProps<T> = {
12
12
  };
13
13
  export declare function RadioOptionInput<T>({ caption, label, options, onChange, renderOption, renderValue, containerStyle, }: RadioOptionInputProps<T>): React.JSX.Element;
14
14
  export default RadioOptionInput;
15
- //# sourceMappingURL=RadioOptionInput.d.ts.map
@@ -1,3 +1,4 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
1
2
  import React, { useCallback, useMemo } from "react";
2
3
  import { StyleSheet, TouchableOpacity, View, } from "react-native";
3
4
  import { useThemedStyle } from "../../hooks";
@@ -16,22 +17,9 @@ export function RadioOptionInput({ caption, label, options = [], onChange, rende
16
17
  onChange(option);
17
18
  setSheetOpen(false);
18
19
  }, [onChange]);
19
- return (<>
20
- <View style={[styles.container, containerStyle]}>
21
- <Text>{label}</Text>
22
- <TouchableOpacity onPress={() => setSheetOpen(true)} style={styles.valueDisplayContainer}>
23
- {!renderValue && <Text>{value?.label}</Text>}
24
- {renderValue && renderValue(value)}
25
- <Chevron direction={sheetOpen ? "up" : "down"}/>
26
- </TouchableOpacity>
27
- {!!caption && <MenuItemDescription description={caption}/>}
28
- </View>
29
- <Sheet header={label} open={sheetOpen} setOpen={setSheetOpen}>
30
- {options.map((option) => {
31
- return renderOption ? (renderOption(option, handleOptionPress)) : (<RadioOptionItem option={option} onPress={() => handleOptionPress(option)} key={option.value}/>);
32
- })}
33
- </Sheet>
34
- </>);
20
+ return (_jsxs(_Fragment, { children: [_jsxs(View, { style: [styles.container, containerStyle], children: [_jsx(Text, { children: label }), _jsxs(TouchableOpacity, { onPress: () => setSheetOpen(true), style: styles.valueDisplayContainer, children: [!renderValue && _jsx(Text, { children: value?.label }), renderValue && renderValue(value), _jsx(Chevron, { direction: sheetOpen ? "up" : "down" })] }), !!caption && _jsx(MenuItemDescription, { description: caption })] }), _jsx(Sheet, { header: label, open: sheetOpen, setOpen: setSheetOpen, children: options.map((option) => {
21
+ return renderOption ? (renderOption(option, handleOptionPress)) : (_jsx(RadioOptionItem, { option: option, onPress: () => handleOptionPress(option) }, option.value));
22
+ }) })] }));
35
23
  }
36
24
  const useStyles = () => useThemedStyle(useCallback((t) => StyleSheet.create({
37
25
  container: {},
@@ -43,4 +31,3 @@ const useStyles = () => useThemedStyle(useCallback((t) => StyleSheet.create({
43
31
  },
44
32
  }), []));
45
33
  export default RadioOptionInput;
46
- //# sourceMappingURL=RadioOptionInput.js.map
@@ -1,2 +1,2 @@
1
1
  export { default as RadioOptionInput } from "./RadioOptionInput";
2
- //# sourceMappingURL=index.d.ts.map
2
+ export * from "./RadioOptionInput";
@@ -1,2 +1,2 @@
1
1
  export { default as RadioOptionInput } from "./RadioOptionInput";
2
- //# sourceMappingURL=index.js.map
2
+ export * from "./RadioOptionInput";
@@ -7,4 +7,3 @@ export type RadioOptionItemProps<T> = {
7
7
  };
8
8
  export declare function RadioOptionItem<T>({ option, onPress, renderItem, disabled, }: RadioOptionItemProps<T>): import("react").JSX.Element;
9
9
  export default RadioOptionItem;
10
- //# sourceMappingURL=RadioOptionItem.d.ts.map
@@ -1,3 +1,4 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
2
  import { useCallback } from "react";
2
3
  import { Pressable, View, StyleSheet } from "react-native";
3
4
  import { useThemedStyle } from "../../hooks";
@@ -5,18 +6,10 @@ import { Text } from "../Text";
5
6
  export function RadioOptionItem({ option, onPress, renderItem, disabled, }) {
6
7
  const { label, value, selected } = option;
7
8
  const styles = useStyles(selected).styles;
8
- return (<Pressable onPress={() => onPress?.(value)} style={styles.itemContainer} disabled={disabled || !onPress}>
9
- <View style={styles.itemContent}>
10
- <View style={[
11
- styles.radioContainer,
12
- disabled && styles.radioContainerDisabled,
13
- ]}>
14
- {selected && <View style={styles.radio}/>}
15
- </View>
16
- {!renderItem && (<Text contrast={disabled ? "low" : "high"}>{label}</Text>)}
17
- {renderItem && renderItem(option)}
18
- </View>
19
- </Pressable>);
9
+ return (_jsx(Pressable, { onPress: () => onPress?.(value), style: styles.itemContainer, disabled: disabled || !onPress, children: _jsxs(View, { style: styles.itemContent, children: [_jsx(View, { style: [
10
+ styles.radioContainer,
11
+ disabled && styles.radioContainerDisabled,
12
+ ], children: selected && _jsx(View, { style: styles.radio }) }), !renderItem && (_jsx(Text, { contrast: disabled ? "low" : "high", children: label })), renderItem && renderItem(option)] }) }));
20
13
  }
21
14
  const useStyles = (selected) => useThemedStyle(useCallback((t) => StyleSheet.create({
22
15
  itemContainer: {
@@ -48,4 +41,3 @@ const useStyles = (selected) => useThemedStyle(useCallback((t) => StyleSheet.cre
48
41
  },
49
42
  }), [selected]));
50
43
  export default RadioOptionItem;
51
- //# sourceMappingURL=RadioOptionItem.js.map
@@ -1,2 +1,2 @@
1
1
  export { default as RadioOptionItem } from "./RadioOptionItem";
2
- //# sourceMappingURL=index.d.ts.map
2
+ export * from "./RadioOptionItem";
@@ -1,2 +1,2 @@
1
1
  export { default as RadioOptionItem } from "./RadioOptionItem";
2
- //# sourceMappingURL=index.js.map
2
+ export * from "./RadioOptionItem";
@@ -1,10 +1,11 @@
1
1
  import React from "react";
2
2
  import { ViewStyle, ReturnKeyType, StyleProp, TextInputProps } from "react-native";
3
- type SearchProps = {
3
+ export type SearchProps = {
4
4
  searchQuery: string;
5
5
  onChangeText: (text: string) => void;
6
6
  rightComponent?: React.ReactNode;
7
7
  onPressFilter?: () => void;
8
+ /** @deprecated Use `label` instead. */
8
9
  placeholder?: string;
9
10
  label: string;
10
11
  containerStyle?: StyleProp<ViewStyle>;
@@ -12,4 +13,3 @@ type SearchProps = {
12
13
  } & Omit<TextInputProps, "returnKeyType" | "onFocus" | "onBlur" | "onChangeText">;
13
14
  declare const Search: ({ searchQuery, onChangeText, placeholder, containerStyle, returnKeyType, label, ...rest }: SearchProps) => React.JSX.Element;
14
15
  export default Search;
15
- //# sourceMappingURL=Search.d.ts.map
@@ -1,4 +1,5 @@
1
- import React, { useCallback, useRef, useState } from "react";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useCallback, useRef, useState } from "react";
2
3
  import { StyleSheet, View, TouchableOpacity, } from "react-native";
3
4
  import Animated, { useSharedValue, useAnimatedStyle, interpolate, withTiming, Easing, } from "react-native-reanimated";
4
5
  import { TextInput, Text } from "../../components";
@@ -27,22 +28,12 @@ const Search = ({ searchQuery, onChangeText, placeholder, containerStyle = {}, r
27
28
  }), [focused, minWidth]);
28
29
  const onPressCancel = useCallback(() => {
29
30
  onChangeText("");
30
- // @ts-expect-error not yet typed
31
- inputRef?.current?.blur();
31
+ inputRef.current?.blur();
32
32
  }, [inputRef]);
33
33
  const onLayout = (e) => {
34
34
  setMinWidth(e.nativeEvent.layout.width);
35
35
  };
36
- return (<View style={[styles.searchBarContainer, containerStyle]} onLayout={onLayout}>
37
- <Animated.View style={[animatedSearchInput, styles.animatedContainer]}>
38
- <TextInput ref={inputRef} value={searchQuery} onFocus={onFocus} onBlur={onBlur} returnKeyType={returnKeyType ?? "search"} label={label || placeholder || "Enter search term"} onChangeText={onChangeText} {...rest}/>
39
- </Animated.View>
40
- <Animated.View style={animatedCancelButtonStyle}>
41
- <TouchableOpacity style={styles.cancelButton} onPress={onPressCancel}>
42
- <Text style={styles.cancelButtonText}>Cancel</Text>
43
- </TouchableOpacity>
44
- </Animated.View>
45
- </View>);
36
+ return (_jsxs(View, { style: [styles.searchBarContainer, containerStyle], onLayout: onLayout, children: [_jsx(Animated.View, { style: [animatedSearchInput, styles.animatedContainer], children: _jsx(TextInput, { ref: inputRef, value: searchQuery, onFocus: onFocus, onBlur: onBlur, returnKeyType: returnKeyType ?? "search", label: label || placeholder || "Enter search term", onChangeText: onChangeText, ...rest }) }), _jsx(Animated.View, { style: animatedCancelButtonStyle, children: _jsx(TouchableOpacity, { style: styles.cancelButton, onPress: onPressCancel, children: _jsx(Text, { style: styles.cancelButtonText, children: "Cancel" }) }) })] }));
46
37
  };
47
38
  export default Search;
48
39
  const useStyles = () => useThemedStyle(useCallback((theme) => StyleSheet.create({
@@ -65,4 +56,3 @@ const useStyles = () => useThemedStyle(useCallback((theme) => StyleSheet.create(
65
56
  color: theme.colors.primary,
66
57
  },
67
58
  }), []));
68
- //# sourceMappingURL=Search.js.map
@@ -1,2 +1,2 @@
1
1
  export { default as Search } from "./Search";
2
- //# sourceMappingURL=index.d.ts.map
2
+ export * from "./Search";
@@ -1,2 +1,2 @@
1
1
  export { default as Search } from "./Search";
2
- //# sourceMappingURL=index.js.map
2
+ export * from "./Search";
@@ -9,4 +9,3 @@ export type SegmentedControlProps<T> = {
9
9
  };
10
10
  declare function SegmentedControl<T>({ label, options, silenceWarning, error, caption, onChange, }: SegmentedControlProps<T>): import("react").JSX.Element;
11
11
  export default SegmentedControl;
12
- //# sourceMappingURL=SegmentedControl.d.ts.map
@@ -1,3 +1,4 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
2
  import { View, StyleSheet, Pressable, } from "react-native";
2
3
  import { useCallback } from "react";
3
4
  import { useThemedStyle } from "../../hooks";
@@ -9,33 +10,21 @@ function SegmentedControl({ label, options = [], silenceWarning, error, caption,
9
10
  if (options.length > 4 && !silenceWarning) {
10
11
  console.warn("SegmentedControl should have 4 or fewer options, consider using a SelectInput instead");
11
12
  }
12
- return (<View style={styles.container}>
13
- <Text numberOfLines={1}>{label}</Text>
14
- <View style={styles.contentContainer}>
15
- {!options.length && <Text>No options</Text>}
16
- {options.map((option, index, list) => {
17
- const optionStyle = [styles.optionContainer];
18
- if (index === 0) {
19
- optionStyle.push(styles.firstOptionContainer);
20
- }
21
- if (index === list.length - 1) {
22
- optionStyle.push(styles.lastOptionContainer);
23
- }
24
- if (option.selected) {
25
- optionStyle.push(styles.selectedOptionContainer);
26
- }
27
- return (<Pressable onPress={() => {
28
- onChange(option);
29
- }} style={optionStyle} key={option.value + option.label}>
30
- <Text style={option.selected ? styles.selectedOptionText : undefined}>
31
- {option.label}
32
- </Text>
33
- </Pressable>);
34
- })}
35
- </View>
36
- {!!error && <FieldError error={error}/>}
37
- {!!caption && <MenuItemDescription description={caption}/>}
38
- </View>);
13
+ return (_jsxs(View, { style: styles.container, children: [_jsx(Text, { numberOfLines: 1, children: label }), _jsxs(View, { style: styles.contentContainer, children: [!options.length && _jsx(Text, { children: "No options" }), options.map((option, index, list) => {
14
+ const optionStyle = [styles.optionContainer];
15
+ if (index === 0) {
16
+ optionStyle.push(styles.firstOptionContainer);
17
+ }
18
+ if (index === list.length - 1) {
19
+ optionStyle.push(styles.lastOptionContainer);
20
+ }
21
+ if (option.selected) {
22
+ optionStyle.push(styles.selectedOptionContainer);
23
+ }
24
+ return (_jsx(Pressable, { onPress: () => {
25
+ onChange(option);
26
+ }, style: optionStyle, children: _jsx(Text, { style: option.selected ? styles.selectedOptionText : undefined, children: option.label }) }, option.value + option.label));
27
+ })] }), !!error && _jsx(FieldError, { error: error }), !!caption && _jsx(MenuItemDescription, { description: caption })] }));
39
28
  }
40
29
  export default SegmentedControl;
41
30
  function scaleBorderRadius(originalRadius, originalSize, newSize) {
@@ -83,4 +72,3 @@ const useStyles = () => useThemedStyle(useCallback((t) => StyleSheet.create({
83
72
  color: t.colors.foregroundOnPrimary,
84
73
  },
85
74
  }), []));
86
- //# sourceMappingURL=SegmentedControl.js.map
@@ -1,3 +1,2 @@
1
1
  export { default as SegmentedControl } from "./SegmentedControl";
2
2
  export * from "./SegmentedControl";
3
- //# sourceMappingURL=index.d.ts.map
@@ -1,3 +1,2 @@
1
1
  export { default as SegmentedControl } from "./SegmentedControl";
2
2
  export * from "./SegmentedControl";
3
- //# sourceMappingURL=index.js.map
@@ -12,4 +12,3 @@ export type SelectInputProps<T> = {
12
12
  };
13
13
  declare function SelectInput<T>({ caption, label, options, onChange, error, renderOption, containerStyle, }: SelectInputProps<T>): React.JSX.Element;
14
14
  export default SelectInput;
15
- //# sourceMappingURL=SelectInput.d.ts.map
@@ -1,4 +1,5 @@
1
- import React, { useCallback, useEffect, useMemo, useRef, useState, } from "react";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useCallback, useEffect, useMemo, useRef, useState, } from "react";
2
3
  import { StyleSheet, TouchableOpacity, View, } from "react-native";
3
4
  import Animated, { Extrapolation, interpolate, useAnimatedStyle, useSharedValue, withTiming, } from "react-native-reanimated";
4
5
  import { Sheet } from "../Sheet";
@@ -71,29 +72,7 @@ function SelectInput({ caption, label, options = [], onChange, error, renderOpti
71
72
  onChange(option);
72
73
  setSheetOpen(false);
73
74
  }, []);
74
- return (<View style={containerStyle}>
75
- <TouchableOpacity onPress={() => setSheetOpen(true)}>
76
- <Animated.View style={[styles.itemContainer, animatedBorderStyle]}>
77
- <View pointerEvents="none" style={styles.labelContainer}>
78
- <Animated.Text style={[styles.label, animatedLabelStyles]}>
79
- {label}
80
- </Animated.Text>
81
- </View>
82
- <Animated.View style={animatedValueStyle}>
83
- {!!value && (<Text contrast="low" style={styles.value}>
84
- {value.label}
85
- </Text>)}
86
- </Animated.View>
87
- <Chevron direction={sheetOpen ? "up" : "down"}/>
88
- </Animated.View>
89
- </TouchableOpacity>
90
- {!!caption && <MenuItemDescription description={caption}/>}
91
- <Sheet open={sheetOpen} setOpen={setSheetOpen} header={label}>
92
- {options.map((option, i) => renderOption ? (renderOption(option, handleOptionPress)) : (<TouchableOpacity onPress={() => handleOptionPress(option)} key={i + option.label}>
93
- <SelectionItem option={option}/>
94
- </TouchableOpacity>))}
95
- </Sheet>
96
- </View>);
75
+ return (_jsxs(View, { style: containerStyle, children: [_jsx(TouchableOpacity, { onPress: () => setSheetOpen(true), children: _jsxs(Animated.View, { style: [styles.itemContainer, animatedBorderStyle], children: [_jsx(View, { style: styles.labelContainer, children: _jsx(Animated.Text, { style: [styles.label, animatedLabelStyles], children: label }) }), _jsx(Animated.View, { style: animatedValueStyle, children: !!value && (_jsx(Text, { contrast: "low", style: styles.value, children: value.label })) }), _jsx(Chevron, { direction: sheetOpen ? "up" : "down" })] }) }), !!caption && _jsx(MenuItemDescription, { description: caption }), _jsx(Sheet, { open: sheetOpen, setOpen: setSheetOpen, header: label, children: options.map((option, i) => renderOption ? (renderOption(option, handleOptionPress)) : (_jsx(TouchableOpacity, { onPress: () => handleOptionPress(option), children: _jsx(SelectionItem, { option: option }) }, i + option.label))) })] }));
97
76
  }
98
77
  const useStyles = () => useThemedStyle(useCallback((theme) => StyleSheet.create({
99
78
  chevron: {
@@ -120,6 +99,7 @@ const useStyles = () => useThemedStyle(useCallback((theme) => StyleSheet.create(
120
99
  labelContainer: {
121
100
  left: theme.size.baseSize * 2,
122
101
  position: "absolute",
102
+ pointerEvents: "none",
123
103
  },
124
104
  label: {
125
105
  color: theme.colors.foregroundHighContrast,
@@ -134,4 +114,3 @@ const useStyles = () => useThemedStyle(useCallback((theme) => StyleSheet.create(
134
114
  },
135
115
  }), []));
136
116
  export default SelectInput;
137
- //# sourceMappingURL=SelectInput.js.map
@@ -3,4 +3,3 @@ export type SelectionItemProps<T> = {
3
3
  option: Option<T>;
4
4
  };
5
5
  export default function SelectionItem<T>({ option }: SelectionItemProps<T>): import("react").JSX.Element;
6
- //# sourceMappingURL=SelectionItem.d.ts.map