atlas-design-system 2.1.1 → 3.1.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.
- package/CHANGELOG.md +66 -0
- package/LICENSE +15 -0
- package/README.md +13 -5
- package/dist/components/BottomSheet/BottomSheet.d.ts +2 -3
- package/dist/components/BottomSheet/BottomSheet.js +12 -13
- package/dist/components/BottomSheet/index.d.ts +1 -1
- package/dist/components/BottomSheet/index.js +1 -1
- package/dist/components/Button/Button.d.ts +0 -1
- package/dist/components/Button/Button.js +2 -7
- package/dist/components/Button/index.d.ts +0 -1
- package/dist/components/Button/index.js +0 -1
- package/dist/components/Button/styles/ButtonStyle.d.ts +0 -1
- package/dist/components/Button/styles/ButtonStyle.js +0 -1
- package/dist/components/Button/types.d.ts +0 -1
- package/dist/components/Button/types.js +0 -1
- package/dist/components/CheckboxOptionInput/CheckboxOptionInput.d.ts +1 -2
- package/dist/components/CheckboxOptionInput/CheckboxOptionInput.js +7 -21
- package/dist/components/CheckboxOptionInput/index.d.ts +1 -1
- package/dist/components/CheckboxOptionInput/index.js +1 -1
- package/dist/components/CheckboxOptionItem/CheckboxOptionItem.d.ts +0 -1
- package/dist/components/CheckboxOptionItem/CheckboxOptionItem.js +2 -10
- package/dist/components/CheckboxOptionItem/index.d.ts +1 -1
- package/dist/components/CheckboxOptionItem/index.js +1 -1
- package/dist/components/Chevron/Chevron.d.ts +1 -3
- package/dist/components/Chevron/Chevron.js +4 -6
- package/dist/components/Chevron/index.d.ts +1 -1
- package/dist/components/Chevron/index.js +1 -1
- package/dist/components/DateTimeInput/DateTimeInput.d.ts +0 -1
- package/dist/components/DateTimeInput/DateTimeInput.js +16 -40
- package/dist/components/DateTimeInput/index.d.ts +0 -1
- package/dist/components/DateTimeInput/index.js +0 -1
- package/dist/components/DragHandle/DragHandle.d.ts +2 -3
- package/dist/components/DragHandle/DragHandle.js +3 -5
- package/dist/components/DragHandle/index.d.ts +1 -1
- package/dist/components/DragHandle/index.js +1 -1
- package/dist/components/FieldError/FieldError.d.ts +2 -4
- package/dist/components/FieldError/FieldError.js +2 -6
- package/dist/components/Forms/Form/Form.d.ts +0 -1
- package/dist/components/Forms/Form/Form.js +2 -3
- package/dist/components/Forms/Form/index.d.ts +0 -1
- package/dist/components/Forms/Form/index.js +0 -1
- package/dist/components/Forms/FormDateTimeInput/FormDateTimeInput.d.ts +0 -1
- package/dist/components/Forms/FormDateTimeInput/FormDateTimeInput.js +3 -4
- package/dist/components/Forms/FormDateTimeInput/index.d.ts +0 -1
- package/dist/components/Forms/FormDateTimeInput/index.js +0 -1
- package/dist/components/Forms/FormSegmentedControl/FormSegmentedControl.d.ts +0 -1
- package/dist/components/Forms/FormSegmentedControl/FormSegmentedControl.js +4 -5
- package/dist/components/Forms/FormSegmentedControl/index.d.ts +0 -1
- package/dist/components/Forms/FormSegmentedControl/index.js +0 -1
- package/dist/components/Forms/FormSelectInput/FormSelectInput.d.ts +0 -1
- package/dist/components/Forms/FormSelectInput/FormSelectInput.js +4 -6
- package/dist/components/Forms/FormSelectInput/index.d.ts +0 -1
- package/dist/components/Forms/FormSelectInput/index.js +0 -1
- package/dist/components/Forms/FormSwitchToggle/FormSwitchToggle.d.ts +0 -1
- package/dist/components/Forms/FormSwitchToggle/FormSwitchToggle.js +2 -2
- package/dist/components/Forms/FormSwitchToggle/index.d.ts +0 -1
- package/dist/components/Forms/FormSwitchToggle/index.js +0 -1
- package/dist/components/Forms/FormTextInput/FormTextInput.d.ts +0 -1
- package/dist/components/Forms/FormTextInput/FormTextInput.js +3 -6
- package/dist/components/Forms/FormTextInput/index.d.ts +0 -1
- package/dist/components/Forms/FormTextInput/index.js +0 -1
- package/dist/components/Forms/index.d.ts +0 -1
- package/dist/components/Forms/index.js +0 -1
- package/dist/components/MenuItemDescription/MenuItemDescription.d.ts +0 -1
- package/dist/components/MenuItemDescription/MenuItemDescription.js +3 -7
- package/dist/components/MenuItemDescription/index.d.ts +1 -1
- package/dist/components/MenuItemDescription/index.js +1 -1
- package/dist/components/NavigationListRow/NavigationListRow.d.ts +3 -2
- package/dist/components/NavigationListRow/NavigationListRow.js +4 -10
- package/dist/components/NavigationListRow/index.d.ts +1 -1
- package/dist/components/NavigationListRow/index.js +1 -1
- package/dist/components/RadioOptionInput/RadioOptionInput.d.ts +1 -2
- package/dist/components/RadioOptionInput/RadioOptionInput.js +4 -17
- package/dist/components/RadioOptionInput/index.d.ts +1 -1
- package/dist/components/RadioOptionInput/index.js +1 -1
- package/dist/components/RadioOptionItem/RadioOptionItem.d.ts +0 -1
- package/dist/components/RadioOptionItem/RadioOptionItem.js +5 -13
- package/dist/components/RadioOptionItem/index.d.ts +1 -1
- package/dist/components/RadioOptionItem/index.js +1 -1
- package/dist/components/Search/Search.d.ts +2 -2
- package/dist/components/Search/Search.js +4 -14
- package/dist/components/Search/index.d.ts +1 -1
- package/dist/components/Search/index.js +1 -1
- package/dist/components/SegmentedControl/SegmentedControl.d.ts +0 -1
- package/dist/components/SegmentedControl/SegmentedControl.js +16 -28
- package/dist/components/SegmentedControl/index.d.ts +0 -1
- package/dist/components/SegmentedControl/index.js +0 -1
- package/dist/components/SelectInput/SelectInput.d.ts +0 -1
- package/dist/components/SelectInput/SelectInput.js +4 -25
- package/dist/components/SelectInput/components/SelectionItem.d.ts +0 -1
- package/dist/components/SelectInput/components/SelectionItem.js +3 -5
- package/dist/components/SelectInput/index.d.ts +0 -1
- package/dist/components/SelectInput/index.js +0 -1
- package/dist/components/SelectInput/types.d.ts +0 -1
- package/dist/components/SelectInput/types.js +0 -1
- package/dist/components/Sheet/Sheet.d.ts +2 -3
- package/dist/components/Sheet/Sheet.js +23 -37
- package/dist/components/Sheet/components/SheetHeader.d.ts +1 -2
- package/dist/components/Sheet/components/SheetHeader.js +3 -3
- package/dist/components/Sheet/index.d.ts +2 -1
- package/dist/components/Sheet/index.js +2 -1
- package/dist/components/SwitchToggle/SwitchToggle.d.ts +0 -1
- package/dist/components/SwitchToggle/SwitchToggle.js +3 -14
- package/dist/components/SwitchToggle/index.d.ts +0 -1
- package/dist/components/SwitchToggle/index.js +0 -1
- package/dist/components/Text/Text.d.ts +2 -3
- package/dist/components/Text/Text.js +3 -3
- package/dist/components/Text/index.d.ts +1 -1
- package/dist/components/Text/index.js +1 -1
- package/dist/components/TextInput/TextInput.d.ts +4 -1
- package/dist/components/TextInput/TextInput.js +10 -22
- package/dist/components/TextInput/index.d.ts +0 -1
- package/dist/components/TextInput/index.js +0 -1
- package/dist/components/TitleBar/TitleBar.d.ts +4 -2
- package/dist/components/TitleBar/TitleBar.js +8 -21
- package/dist/components/TitleBar/index.d.ts +0 -1
- package/dist/components/TitleBar/index.js +0 -1
- package/dist/components/index.d.ts +0 -1
- package/dist/components/index.js +0 -1
- package/dist/constants/animations.d.ts +0 -1
- package/dist/constants/animations.js +0 -1
- package/dist/constants/index.d.ts +0 -1
- package/dist/constants/index.js +0 -1
- package/dist/context/index.d.ts +0 -1
- package/dist/context/index.js +0 -1
- package/dist/hooks/index.d.ts +0 -1
- package/dist/hooks/index.js +0 -1
- package/dist/hooks/useInputFieldAnimatedBorder.d.ts +2 -3
- package/dist/hooks/useInputFieldAnimatedBorder.js +0 -1
- package/dist/hooks/useInputFieldFontSizeInterpolationOutputRange.d.ts +0 -1
- package/dist/hooks/useInputFieldFontSizeInterpolationOutputRange.js +0 -1
- package/dist/hooks/usePrevious.d.ts +0 -1
- package/dist/hooks/usePrevious.js +0 -1
- package/dist/hooks/useTheme.d.ts +0 -1
- package/dist/hooks/useTheme.js +0 -1
- package/dist/hooks/useThemedStyle.d.ts +0 -1
- package/dist/hooks/useThemedStyle.js +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/shared/styles/index.d.ts +0 -1
- package/dist/shared/styles/index.js +0 -1
- package/dist/themes/AtlasLightTheme.d.ts +0 -1
- package/dist/themes/AtlasLightTheme.js +0 -1
- package/dist/themes/index.d.ts +0 -1
- package/dist/themes/index.js +0 -1
- package/dist/types/index.d.ts +0 -1
- package/dist/types/index.js +0 -1
- package/dist/types/theme.d.ts +0 -1
- package/dist/types/theme.js +0 -1
- package/dist/types/typography.d.ts +0 -1
- package/dist/types/typography.js +0 -1
- package/dist/utils/animation.d.ts +0 -1
- package/dist/utils/animation.js +0 -1
- package/dist/utils/index.d.ts +0 -1
- package/dist/utils/index.js +0 -1
- package/package.json +53 -21
- package/dist/components/BottomSheet/BottomSheet.d.ts.map +0 -1
- package/dist/components/BottomSheet/BottomSheet.js.map +0 -1
- package/dist/components/BottomSheet/index.d.ts.map +0 -1
- package/dist/components/BottomSheet/index.js.map +0 -1
- package/dist/components/Button/Button.d.ts.map +0 -1
- package/dist/components/Button/Button.js.map +0 -1
- package/dist/components/Button/index.d.ts.map +0 -1
- package/dist/components/Button/index.js.map +0 -1
- package/dist/components/Button/styles/ButtonStyle.d.ts.map +0 -1
- package/dist/components/Button/styles/ButtonStyle.js.map +0 -1
- package/dist/components/Button/types.d.ts.map +0 -1
- package/dist/components/Button/types.js.map +0 -1
- package/dist/components/CheckboxOptionInput/CheckboxOptionInput.d.ts.map +0 -1
- package/dist/components/CheckboxOptionInput/CheckboxOptionInput.js.map +0 -1
- package/dist/components/CheckboxOptionInput/index.d.ts.map +0 -1
- package/dist/components/CheckboxOptionInput/index.js.map +0 -1
- package/dist/components/CheckboxOptionItem/CheckboxOptionItem.d.ts.map +0 -1
- package/dist/components/CheckboxOptionItem/CheckboxOptionItem.js.map +0 -1
- package/dist/components/CheckboxOptionItem/index.d.ts.map +0 -1
- package/dist/components/CheckboxOptionItem/index.js.map +0 -1
- package/dist/components/Chevron/Chevron.d.ts.map +0 -1
- package/dist/components/Chevron/Chevron.js.map +0 -1
- package/dist/components/Chevron/index.d.ts.map +0 -1
- package/dist/components/Chevron/index.js.map +0 -1
- package/dist/components/DateTimeInput/DateTimeInput.d.ts.map +0 -1
- package/dist/components/DateTimeInput/DateTimeInput.js.map +0 -1
- package/dist/components/DateTimeInput/index.d.ts.map +0 -1
- package/dist/components/DateTimeInput/index.js.map +0 -1
- package/dist/components/DragHandle/DragHandle.d.ts.map +0 -1
- package/dist/components/DragHandle/DragHandle.js.map +0 -1
- package/dist/components/DragHandle/index.d.ts.map +0 -1
- package/dist/components/DragHandle/index.js.map +0 -1
- package/dist/components/FieldError/FieldError.d.ts.map +0 -1
- package/dist/components/FieldError/FieldError.js.map +0 -1
- package/dist/components/Forms/Form/Form.d.ts.map +0 -1
- package/dist/components/Forms/Form/Form.js.map +0 -1
- package/dist/components/Forms/Form/index.d.ts.map +0 -1
- package/dist/components/Forms/Form/index.js.map +0 -1
- package/dist/components/Forms/FormDateTimeInput/FormDateTimeInput.d.ts.map +0 -1
- package/dist/components/Forms/FormDateTimeInput/FormDateTimeInput.js.map +0 -1
- package/dist/components/Forms/FormDateTimeInput/index.d.ts.map +0 -1
- package/dist/components/Forms/FormDateTimeInput/index.js.map +0 -1
- package/dist/components/Forms/FormSegmentedControl/FormSegmentedControl.d.ts.map +0 -1
- package/dist/components/Forms/FormSegmentedControl/FormSegmentedControl.js.map +0 -1
- package/dist/components/Forms/FormSegmentedControl/index.d.ts.map +0 -1
- package/dist/components/Forms/FormSegmentedControl/index.js.map +0 -1
- package/dist/components/Forms/FormSelectInput/FormSelectInput.d.ts.map +0 -1
- package/dist/components/Forms/FormSelectInput/FormSelectInput.js.map +0 -1
- package/dist/components/Forms/FormSelectInput/index.d.ts.map +0 -1
- package/dist/components/Forms/FormSelectInput/index.js.map +0 -1
- package/dist/components/Forms/FormSwitchToggle/FormSwitchToggle.d.ts.map +0 -1
- package/dist/components/Forms/FormSwitchToggle/FormSwitchToggle.js.map +0 -1
- package/dist/components/Forms/FormSwitchToggle/index.d.ts.map +0 -1
- package/dist/components/Forms/FormSwitchToggle/index.js.map +0 -1
- package/dist/components/Forms/FormTextInput/FormTextInput.d.ts.map +0 -1
- package/dist/components/Forms/FormTextInput/FormTextInput.js.map +0 -1
- package/dist/components/Forms/FormTextInput/index.d.ts.map +0 -1
- package/dist/components/Forms/FormTextInput/index.js.map +0 -1
- package/dist/components/Forms/index.d.ts.map +0 -1
- package/dist/components/Forms/index.js.map +0 -1
- package/dist/components/MenuItemDescription/MenuItemDescription.d.ts.map +0 -1
- package/dist/components/MenuItemDescription/MenuItemDescription.js.map +0 -1
- package/dist/components/MenuItemDescription/index.d.ts.map +0 -1
- package/dist/components/MenuItemDescription/index.js.map +0 -1
- package/dist/components/NavigationListRow/NavigationListRow.d.ts.map +0 -1
- package/dist/components/NavigationListRow/NavigationListRow.js.map +0 -1
- package/dist/components/NavigationListRow/index.d.ts.map +0 -1
- package/dist/components/NavigationListRow/index.js.map +0 -1
- package/dist/components/RadioOptionInput/RadioOptionInput.d.ts.map +0 -1
- package/dist/components/RadioOptionInput/RadioOptionInput.js.map +0 -1
- package/dist/components/RadioOptionInput/index.d.ts.map +0 -1
- package/dist/components/RadioOptionInput/index.js.map +0 -1
- package/dist/components/RadioOptionItem/RadioOptionItem.d.ts.map +0 -1
- package/dist/components/RadioOptionItem/RadioOptionItem.js.map +0 -1
- package/dist/components/RadioOptionItem/index.d.ts.map +0 -1
- package/dist/components/RadioOptionItem/index.js.map +0 -1
- package/dist/components/Search/Search.d.ts.map +0 -1
- package/dist/components/Search/Search.js.map +0 -1
- package/dist/components/Search/index.d.ts.map +0 -1
- package/dist/components/Search/index.js.map +0 -1
- package/dist/components/SegmentedControl/SegmentedControl.d.ts.map +0 -1
- package/dist/components/SegmentedControl/SegmentedControl.js.map +0 -1
- package/dist/components/SegmentedControl/index.d.ts.map +0 -1
- package/dist/components/SegmentedControl/index.js.map +0 -1
- package/dist/components/SelectInput/SelectInput.d.ts.map +0 -1
- package/dist/components/SelectInput/SelectInput.js.map +0 -1
- package/dist/components/SelectInput/components/SelectionItem.d.ts.map +0 -1
- package/dist/components/SelectInput/components/SelectionItem.js.map +0 -1
- package/dist/components/SelectInput/index.d.ts.map +0 -1
- package/dist/components/SelectInput/index.js.map +0 -1
- package/dist/components/SelectInput/types.d.ts.map +0 -1
- package/dist/components/SelectInput/types.js.map +0 -1
- package/dist/components/Sheet/Sheet.d.ts.map +0 -1
- package/dist/components/Sheet/Sheet.js.map +0 -1
- package/dist/components/Sheet/components/SheetHeader.d.ts.map +0 -1
- package/dist/components/Sheet/components/SheetHeader.js.map +0 -1
- package/dist/components/Sheet/index.d.ts.map +0 -1
- package/dist/components/Sheet/index.js.map +0 -1
- package/dist/components/SwitchToggle/SwitchToggle.d.ts.map +0 -1
- package/dist/components/SwitchToggle/SwitchToggle.js.map +0 -1
- package/dist/components/SwitchToggle/index.d.ts.map +0 -1
- package/dist/components/SwitchToggle/index.js.map +0 -1
- package/dist/components/Text/Text.d.ts.map +0 -1
- package/dist/components/Text/Text.js.map +0 -1
- package/dist/components/Text/index.d.ts.map +0 -1
- package/dist/components/Text/index.js.map +0 -1
- package/dist/components/TextInput/TextInput.d.ts.map +0 -1
- package/dist/components/TextInput/TextInput.js.map +0 -1
- package/dist/components/TextInput/index.d.ts.map +0 -1
- package/dist/components/TextInput/index.js.map +0 -1
- package/dist/components/TitleBar/TitleBar.d.ts.map +0 -1
- package/dist/components/TitleBar/TitleBar.js.map +0 -1
- package/dist/components/TitleBar/index.d.ts.map +0 -1
- package/dist/components/TitleBar/index.js.map +0 -1
- package/dist/components/index.d.ts.map +0 -1
- package/dist/components/index.js.map +0 -1
- package/dist/constants/animations.d.ts.map +0 -1
- package/dist/constants/animations.js.map +0 -1
- package/dist/constants/index.d.ts.map +0 -1
- package/dist/constants/index.js.map +0 -1
- package/dist/context/index.d.ts.map +0 -1
- package/dist/context/index.js.map +0 -1
- package/dist/hooks/index.d.ts.map +0 -1
- package/dist/hooks/index.js.map +0 -1
- package/dist/hooks/useInputFieldAnimatedBorder.d.ts.map +0 -1
- package/dist/hooks/useInputFieldAnimatedBorder.js.map +0 -1
- package/dist/hooks/useInputFieldFontSizeInterpolationOutputRange.d.ts.map +0 -1
- package/dist/hooks/useInputFieldFontSizeInterpolationOutputRange.js.map +0 -1
- package/dist/hooks/usePrevious.d.ts.map +0 -1
- package/dist/hooks/usePrevious.js.map +0 -1
- package/dist/hooks/useTheme.d.ts.map +0 -1
- package/dist/hooks/useTheme.js.map +0 -1
- package/dist/hooks/useThemedStyle.d.ts.map +0 -1
- package/dist/hooks/useThemedStyle.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/shared/styles/index.d.ts.map +0 -1
- package/dist/shared/styles/index.js.map +0 -1
- package/dist/themes/AtlasLightTheme.d.ts.map +0 -1
- package/dist/themes/AtlasLightTheme.js.map +0 -1
- package/dist/themes/index.d.ts.map +0 -1
- package/dist/themes/index.js.map +0 -1
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/index.js.map +0 -1
- package/dist/types/theme.d.ts.map +0 -1
- package/dist/types/theme.js.map +0 -1
- package/dist/types/typography.d.ts.map +0 -1
- package/dist/types/typography.js.map +0 -1
- package/dist/utils/animation.d.ts.map +0 -1
- package/dist/utils/animation.js.map +0 -1
- package/dist/utils/index.d.ts.map +0 -1
- package/dist/utils/index.js.map +0 -1
- package/example/android/app/debug.keystore +0 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [3.1.0] - 2026-11-25
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- `TitleBar` takes `backButtonLabel` (default `"Back"`) and `backButtonTestID`. The icon-only back button now has `accessibilityRole="button"` and a VoiceOver label.
|
|
13
|
+
|
|
14
|
+
### Fixed
|
|
15
|
+
|
|
16
|
+
- `Sheet` no longer closes itself when it is opened again while its fade-out is still running (for example, opened within ~200 ms of mounting or closing). Only a fade-out that runs to its end calls `setOpen(false)`.
|
|
17
|
+
- `BottomSheet` had the same race: reopening during its slide-out hid the sheet while `open` stayed `true`. Only a slide-out that runs to its end hides it now.
|
|
18
|
+
|
|
19
|
+
## [3.0.0] - 2026-09-02
|
|
20
|
+
|
|
21
|
+
### Breaking
|
|
22
|
+
|
|
23
|
+
- **The New Architecture is now required.** Minimum React Native is 0.83 and minimum React is 19.1. The legacy architecture was removed in React Native 0.85 and Reanimated 4 does not support it, so the previous `react-native: ">=0.72.0"` peer range was no longer accurate.
|
|
24
|
+
- **Reanimated 4 is now required** (`react-native-reanimated: ">=4.0.0"`), and **`react-native-worklets` is a new required peer dependency**. Consumers must switch `babel.config.js` from `react-native-reanimated/plugin` to `react-native-worklets/plugin`; `babel-preset-expo` handles this on Expo SDK ≥ 55.
|
|
25
|
+
- **`react-native-vector-icons` is replaced by `@react-native-vector-icons/ionicons`** (the scoped per-family packages introduced in v12). This peer dependency is now **required** rather than optional — `Chevron`, `TitleBar`, `DateTimeInput`, and `NavigationListRow` import it unconditionally.
|
|
26
|
+
- **`NavigationListRowProps["iconRightName"]` narrowed from `string` to `IoniconsIconName`**, the icon package's literal-union type. The type is re-exported from the package root. Names outside the Ionicons set no longer typecheck.
|
|
27
|
+
- `@react-native-community/datetimepicker` peer floor raised to `>=9.0.0` for New Architecture support.
|
|
28
|
+
- `react-native-safe-area-context` peer floor raised to `>=5.6.0`.
|
|
29
|
+
- Package no longer ships `.js.map` / `.d.ts.map` files. They previously pointed at `src/`, which is excluded from the published tarball, so they were always broken.
|
|
30
|
+
|
|
31
|
+
### Changed
|
|
32
|
+
|
|
33
|
+
- `TitleBar` now uses `SafeAreaView` from `react-native-safe-area-context` (with `edges={["top"]}`) instead of the deprecated `SafeAreaView` from `react-native`. **This changes Android behavior:** React Native's `SafeAreaView` was iOS-only and a no-op on Android, so `TitleBar` now correctly insets below the Android status bar — which is what edge-to-edge (mandatory from Expo SDK 55) requires. It also means `TitleBar` now needs a `SafeAreaProvider` ancestor, as `Sheet` and `BottomSheet` already did.
|
|
34
|
+
- `Sheet` and `BottomSheet` use `scheduleOnRN` from `react-native-worklets` in place of the deprecated `runOnJS`.
|
|
35
|
+
- `pointerEvents` moved from a prop to a style in `TextInput`, `SelectInput`, and `DateTimeInput`, following the React Native deprecation.
|
|
36
|
+
- `TextInput`'s `onBlur` now sources its text from the controlled `value` prop. React Native 0.86 retyped the blur event to `BlurEvent`, which no longer carries `text`. The public `onBlur?: (text: string) => void` signature is unchanged.
|
|
37
|
+
- TypeScript build now uses `moduleResolution: "bundler"` and `jsx: "react-jsx"`, required to read the `exports`-map types shipped by React Native 0.86, Reanimated 4, and the scoped icon packages.
|
|
38
|
+
|
|
39
|
+
### Fixed
|
|
40
|
+
|
|
41
|
+
- `Sheet` and `BottomSheet` now pass `onRequestClose` to their `Modal`, restoring Android hardware-back dismissal.
|
|
42
|
+
|
|
43
|
+
## [2.1.0] - 2026-02-26
|
|
44
|
+
|
|
45
|
+
### Added
|
|
46
|
+
|
|
47
|
+
- Button component with primary, secondary, and destructive variants
|
|
48
|
+
- Text component with typography variants and contrast levels
|
|
49
|
+
- TextInput with animated floating label and error handling
|
|
50
|
+
- SwitchToggle component
|
|
51
|
+
- SelectInput with bottom sheet picker
|
|
52
|
+
- DateTimeInput component
|
|
53
|
+
- SegmentedControl component
|
|
54
|
+
- Search input component
|
|
55
|
+
- Sheet and BottomSheet modal components
|
|
56
|
+
- TitleBar navigation component
|
|
57
|
+
- NavigationListRow component
|
|
58
|
+
- RadioOptionInput and RadioOptionItem components
|
|
59
|
+
- CheckboxOptionInput and CheckboxOptionItem components
|
|
60
|
+
- Chevron and DragHandle utility components
|
|
61
|
+
- MenuItemDescription component
|
|
62
|
+
- FieldError component
|
|
63
|
+
- Form components (Form, FormTextInput, FormSwitchToggle, FormSelectInput, FormSegmentedControl, FormDateTimeInput) with `informed` integration
|
|
64
|
+
- ThemeContext and useTheme/useThemedStyle hooks
|
|
65
|
+
- ATLAS_LIGHT default theme
|
|
66
|
+
- Animated border and font-size interpolation hooks
|
package/LICENSE
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
ISC License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026, Juan Castillo
|
|
4
|
+
|
|
5
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
|
+
purpose with or without fee is hereby granted, provided that the above
|
|
7
|
+
copyright notice and this permission notice appear in all copies.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
10
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
11
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
12
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
13
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
14
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
15
|
+
PERFORMANCE OF THIS SOFTWARE.
|
package/README.md
CHANGED
|
@@ -6,16 +6,20 @@ Designed for Atlas Workout app and EzBudget budget app.
|
|
|
6
6
|
|
|
7
7
|
## Installation
|
|
8
8
|
|
|
9
|
+
> **Atlas Design System 3.x requires the React Native New Architecture.**
|
|
10
|
+
> React Native ≥ 0.83 (Expo SDK ≥ 55) and Reanimated ≥ 4 only. For older
|
|
11
|
+
> projects, stay on `atlas-design-system@2.x`.
|
|
12
|
+
|
|
9
13
|
Atlas Design System relies on a few peer dependencies that need to be present in your project. Install everything at once with **npm**:
|
|
10
14
|
|
|
11
15
|
```bash
|
|
12
|
-
npm install atlas-design-system @react-native-community/datetimepicker informed moment react-native-reanimated react-native-
|
|
16
|
+
npm install atlas-design-system @react-native-vector-icons/ionicons @react-native-community/datetimepicker informed moment react-native-reanimated react-native-worklets react-native-safe-area-context
|
|
13
17
|
```
|
|
14
18
|
|
|
15
19
|
—or with **Yarn**:
|
|
16
20
|
|
|
17
21
|
```bash
|
|
18
|
-
yarn add atlas-design-system @react-native-community/datetimepicker informed moment react-native-reanimated react-native-
|
|
22
|
+
yarn add atlas-design-system @react-native-vector-icons/ionicons @react-native-community/datetimepicker informed moment react-native-reanimated react-native-worklets react-native-safe-area-context
|
|
19
23
|
```
|
|
20
24
|
|
|
21
25
|
After the packages are installed, make sure to install the iOS pods:
|
|
@@ -27,12 +31,16 @@ npx pod-install ios
|
|
|
27
31
|
Using **Expo**? You can rely on `expo install` to ensure the correct versions:
|
|
28
32
|
|
|
29
33
|
```bash
|
|
30
|
-
expo install atlas-design-system @react-native-community/datetimepicker react-native-reanimated react-native-
|
|
34
|
+
npx expo install atlas-design-system @react-native-vector-icons/ionicons @react-native-community/datetimepicker react-native-reanimated react-native-worklets react-native-safe-area-context
|
|
31
35
|
```
|
|
32
36
|
|
|
33
37
|
> **Note**
|
|
34
|
-
> • React Native ≥ 0.
|
|
35
|
-
> •
|
|
38
|
+
> • Requires the **New Architecture** — React Native ≥ 0.83 and React ≥ 19.1. The legacy architecture was removed in React Native 0.85, and Reanimated 4 does not support it.
|
|
39
|
+
> • Reanimated 4 moved worklets into a separate package. Your `babel.config.js` must use `react-native-worklets/plugin` (**not** the old `react-native-reanimated/plugin`). On Expo SDK ≥ 55, `babel-preset-expo` wires this up for you.
|
|
40
|
+
> • Wrap your app in `SafeAreaProvider` from `react-native-safe-area-context` — `TitleBar`, `Sheet`, and `BottomSheet` read safe-area insets.
|
|
41
|
+
> • Some peer dependencies (`@react-native-community/datetimepicker`, `informed`, `moment`) are optional — only install them if you use the components that need them. `@react-native-vector-icons/ionicons` is **required**; several components import it directly.
|
|
42
|
+
> • Follow the React-Native-Reanimated [installation guide](https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/installation/).
|
|
43
|
+
> • After installing, run `npx pod-install` to link native iOS dependencies.
|
|
36
44
|
|
|
37
45
|
## Usage
|
|
38
46
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
type
|
|
2
|
+
export type BottomSheetProps = {
|
|
3
3
|
open: boolean;
|
|
4
4
|
setOpen: (open: boolean) => void;
|
|
5
5
|
children?: React.ReactNode;
|
|
@@ -7,6 +7,5 @@ type Props = {
|
|
|
7
7
|
transparent?: boolean;
|
|
8
8
|
height: number;
|
|
9
9
|
};
|
|
10
|
-
declare const BottomSheet: ({ open, children, height, setOpen }:
|
|
10
|
+
declare const BottomSheet: ({ open, children, height, setOpen }: BottomSheetProps) => React.JSX.Element | null;
|
|
11
11
|
export default BottomSheet;
|
|
12
|
-
//# sourceMappingURL=BottomSheet.d.ts.map
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback, useEffect, useState } from "react";
|
|
2
3
|
import { Modal, Pressable, StyleSheet, useWindowDimensions, } from "react-native";
|
|
3
|
-
import Animated, { Easing, useAnimatedStyle, useSharedValue, withTiming,
|
|
4
|
+
import Animated, { Easing, useAnimatedStyle, useSharedValue, withTiming, } from "react-native-reanimated";
|
|
5
|
+
import { scheduleOnRN } from "react-native-worklets";
|
|
4
6
|
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
|
5
7
|
import { useThemedStyle } from "../../hooks";
|
|
6
8
|
const DEFAULT_EASING = Easing.bezier(0.5, 0, 0, 0.75);
|
|
@@ -14,8 +16,11 @@ const BottomSheet = ({ open, children, height, setOpen }) => {
|
|
|
14
16
|
position.value = withTiming(height, {
|
|
15
17
|
duration: 200,
|
|
16
18
|
easing: DEFAULT_EASING,
|
|
17
|
-
}, () => {
|
|
18
|
-
|
|
19
|
+
}, (finished) => {
|
|
20
|
+
// An open that cuts this slide short ends it unfinished: only a slide that ran to its end hides the sheet.
|
|
21
|
+
if (finished) {
|
|
22
|
+
scheduleOnRN(setVisible, false);
|
|
23
|
+
}
|
|
19
24
|
});
|
|
20
25
|
return;
|
|
21
26
|
}
|
|
@@ -39,14 +44,9 @@ const BottomSheet = ({ open, children, height, setOpen }) => {
|
|
|
39
44
|
if (!visible) {
|
|
40
45
|
return null;
|
|
41
46
|
}
|
|
42
|
-
return (
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}} style={styles.wrapper}/>
|
|
46
|
-
<Animated.View style={[styles.sheet, animatedStyle]}>
|
|
47
|
-
{children}
|
|
48
|
-
</Animated.View>
|
|
49
|
-
</Modal>);
|
|
47
|
+
return (_jsxs(Modal, { transparent: true, visible: true, onRequestClose: () => setOpen(false), children: [_jsx(Pressable, { onPress: () => {
|
|
48
|
+
setOpen(false);
|
|
49
|
+
}, style: styles.wrapper }), _jsx(Animated.View, { style: [styles.sheet, animatedStyle], children: children })] }));
|
|
50
50
|
};
|
|
51
51
|
export default BottomSheet;
|
|
52
52
|
const useStyles = (height) => {
|
|
@@ -68,4 +68,3 @@ const useStyles = (height) => {
|
|
|
68
68
|
},
|
|
69
69
|
}), [bottom, height]));
|
|
70
70
|
};
|
|
71
|
-
//# sourceMappingURL=BottomSheet.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { default as BottomSheet } from "./BottomSheet";
|
|
2
|
-
|
|
2
|
+
export * from "./BottomSheet";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { default as BottomSheet } from "./BottomSheet";
|
|
2
|
-
|
|
2
|
+
export * from "./BottomSheet";
|
|
@@ -1,14 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { ActivityIndicator, TouchableOpacity, } from "react-native";
|
|
3
3
|
import { Text } from "../Text";
|
|
4
4
|
import { useButtonStyles } from "./styles/ButtonStyle";
|
|
5
5
|
const Button = ({ testID, disabled = false, onPress, text, loading, containerStyle = {}, appearance = "primary", }) => {
|
|
6
6
|
const { buttonStyle, styles, textStyle } = useButtonStyles(appearance, disabled);
|
|
7
|
-
return (
|
|
8
|
-
{loading ? (<ActivityIndicator size="small" color={styles.loadingIndicator.color}/>) : (<Text category="h3" style={textStyle}>
|
|
9
|
-
{text}
|
|
10
|
-
</Text>)}
|
|
11
|
-
</TouchableOpacity>);
|
|
7
|
+
return (_jsx(TouchableOpacity, { testID: testID, style: [buttonStyle, containerStyle], onPress: onPress, disabled: disabled || loading, children: loading ? (_jsx(ActivityIndicator, { size: "small", color: styles.loadingIndicator.color })) : (_jsx(Text, { category: "h3", style: textStyle, children: text })) }));
|
|
12
8
|
};
|
|
13
9
|
export default Button;
|
|
14
|
-
//# sourceMappingURL=Button.js.map
|
|
@@ -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 CheckboxOptionInputProps<T> = {
|
|
4
|
+
export type CheckboxOptionInputProps<T> = {
|
|
5
5
|
caption?: string;
|
|
6
6
|
label: string;
|
|
7
7
|
options: Option<T>[];
|
|
@@ -13,4 +13,3 @@ type CheckboxOptionInputProps<T> = {
|
|
|
13
13
|
};
|
|
14
14
|
declare function CheckboxOptionInput<T>({ caption, label, options, onChange, renderOption, renderValues, containerStyle, placeholder, }: CheckboxOptionInputProps<T>): React.JSX.Element;
|
|
15
15
|
export default CheckboxOptionInput;
|
|
16
|
-
//# sourceMappingURL=CheckboxOptionInput.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, useEffect, useMemo } from "react";
|
|
2
3
|
import { StyleSheet, TouchableOpacity, View, } from "react-native";
|
|
3
4
|
import { useThemedStyle } from "../../hooks";
|
|
@@ -31,26 +32,12 @@ function CheckboxOptionInput({ caption, label, options = [], onChange, renderOpt
|
|
|
31
32
|
useEffect(() => {
|
|
32
33
|
setValues(selectedOptions.map((v) => v.value));
|
|
33
34
|
}, [sheetOpen]);
|
|
34
|
-
return (
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
{renderValues && renderValues(selectedOptions)}
|
|
41
|
-
<Chevron direction={sheetOpen ? "up" : "down"}/>
|
|
42
|
-
</TouchableOpacity>
|
|
43
|
-
{!!caption && <MenuItemDescription description={caption}/>}
|
|
44
|
-
</View>
|
|
45
|
-
<Sheet header={label} open={sheetOpen} setOpen={setSheetOpen} footer={<Button text="Save" onPress={handleSave}/>}>
|
|
46
|
-
{options.map((option) => {
|
|
47
|
-
return renderOption ? (renderOption(option, handleOptionPress)) : (<CheckboxOptionItem option={{
|
|
48
|
-
...option,
|
|
49
|
-
selected: !!values.find((v) => v === option.value),
|
|
50
|
-
}} onPress={() => handleOptionPress(option)} key={option.label}/>);
|
|
51
|
-
})}
|
|
52
|
-
</Sheet>
|
|
53
|
-
</>);
|
|
35
|
+
return (_jsxs(_Fragment, { children: [_jsxs(View, { style: [styles.container, containerStyle], children: [_jsx(Text, { children: label }), _jsxs(TouchableOpacity, { onPress: () => setSheetOpen(true), style: styles.valueDisplayContainer, children: [!renderValues && selectedOptions.length === 0 && (_jsx(Text, { contrast: "low", children: placeholder })), !renderValues && selectedOptions.length > 0 && (_jsx(Text, { children: selectedOptions.map((v) => v.label).join(", ") })), renderValues && renderValues(selectedOptions), _jsx(Chevron, { direction: sheetOpen ? "up" : "down" })] }), !!caption && _jsx(MenuItemDescription, { description: caption })] }), _jsx(Sheet, { header: label, open: sheetOpen, setOpen: setSheetOpen, footer: _jsx(Button, { text: "Save", onPress: handleSave }), children: options.map((option) => {
|
|
36
|
+
return renderOption ? (renderOption(option, handleOptionPress)) : (_jsx(CheckboxOptionItem, { option: {
|
|
37
|
+
...option,
|
|
38
|
+
selected: !!values.find((v) => v === option.value),
|
|
39
|
+
}, onPress: () => handleOptionPress(option) }, option.label));
|
|
40
|
+
}) })] }));
|
|
54
41
|
}
|
|
55
42
|
const useStyles = () => useThemedStyle(useCallback((t) => StyleSheet.create({
|
|
56
43
|
container: {},
|
|
@@ -62,4 +49,3 @@ const useStyles = () => useThemedStyle(useCallback((t) => StyleSheet.create({
|
|
|
62
49
|
},
|
|
63
50
|
}), []));
|
|
64
51
|
export default CheckboxOptionInput;
|
|
65
|
-
//# sourceMappingURL=CheckboxOptionInput.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { default as CheckboxOptionInput } from "./CheckboxOptionInput";
|
|
2
|
-
|
|
2
|
+
export * from "./CheckboxOptionInput";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { default as CheckboxOptionInput } from "./CheckboxOptionInput";
|
|
2
|
-
|
|
2
|
+
export * from "./CheckboxOptionInput";
|
|
@@ -6,4 +6,3 @@ export type CheckboxOptionItemProps<T> = {
|
|
|
6
6
|
renderItem?: (option: Option<T>) => React.ReactNode;
|
|
7
7
|
};
|
|
8
8
|
export default function CheckboxOptionItem<T>({ option, onPress, renderItem, disabled, }: CheckboxOptionItemProps<T>): import("react").JSX.Element;
|
|
9
|
-
//# sourceMappingURL=CheckboxOptionItem.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,15 +6,7 @@ import { Text } from "../Text";
|
|
|
5
6
|
export default function CheckboxOptionItem({ option, onPress, renderItem, disabled, }) {
|
|
6
7
|
const { label, selected } = option;
|
|
7
8
|
const styles = useStyles(selected).styles;
|
|
8
|
-
return (
|
|
9
|
-
<View style={styles.itemContent}>
|
|
10
|
-
<View style={styles.checkboxContainer}>
|
|
11
|
-
{selected && <View style={styles.checkbox}/>}
|
|
12
|
-
</View>
|
|
13
|
-
{!renderItem && <Text>{label}</Text>}
|
|
14
|
-
{renderItem && renderItem(option)}
|
|
15
|
-
</View>
|
|
16
|
-
</Pressable>);
|
|
9
|
+
return (_jsx(Pressable, { onPress: () => onPress?.(option.value), style: styles.itemContainer, disabled: disabled, children: _jsxs(View, { style: styles.itemContent, children: [_jsx(View, { style: styles.checkboxContainer, children: selected && _jsx(View, { style: styles.checkbox }) }), !renderItem && _jsx(Text, { children: label }), renderItem && renderItem(option)] }) }));
|
|
17
10
|
}
|
|
18
11
|
const useStyles = (selected) => useThemedStyle(useCallback((t) => StyleSheet.create({
|
|
19
12
|
itemContainer: {
|
|
@@ -40,4 +33,3 @@ const useStyles = (selected) => useThemedStyle(useCallback((t) => StyleSheet.cre
|
|
|
40
33
|
backgroundColor: selected ? t.colors.primary : undefined,
|
|
41
34
|
},
|
|
42
35
|
}), [selected]));
|
|
43
|
-
//# sourceMappingURL=CheckboxOptionItem.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { default as CheckboxOptionItem } from "./CheckboxOptionItem";
|
|
2
|
-
|
|
2
|
+
export * from "./CheckboxOptionItem";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { default as CheckboxOptionItem } from "./CheckboxOptionItem";
|
|
2
|
-
|
|
2
|
+
export * from "./CheckboxOptionItem";
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback, useEffect } from "react";
|
|
2
3
|
import Animated, { interpolate, useAnimatedStyle, useSharedValue, withTiming, } from "react-native-reanimated";
|
|
3
4
|
import { StyleSheet } from "react-native";
|
|
4
|
-
import IonIcons from "react-native-vector-icons/
|
|
5
|
+
import IonIcons from "@react-native-vector-icons/ionicons/static";
|
|
5
6
|
import { useThemedStyle } from "../../hooks";
|
|
6
7
|
import { DEFAULT_TIMING_CONFIG } from "../../constants/animations";
|
|
7
8
|
export default function Chevron({ direction = "down" }) {
|
|
@@ -17,9 +18,7 @@ export default function Chevron({ direction = "down" }) {
|
|
|
17
18
|
],
|
|
18
19
|
};
|
|
19
20
|
}, [rotation]);
|
|
20
|
-
return (
|
|
21
|
-
<IonIcons style={styles.chevron} name="chevron-down-outline" size={20}/>
|
|
22
|
-
</Animated.View>);
|
|
21
|
+
return (_jsx(Animated.View, { style: animatedChevronStyle, children: _jsx(IonIcons, { style: styles.chevron, name: "chevron-down-outline", size: 20 }) }));
|
|
23
22
|
}
|
|
24
23
|
const useStyles = () => useThemedStyle(useCallback((t) => StyleSheet.create({
|
|
25
24
|
chevron: {
|
|
@@ -27,4 +26,3 @@ const useStyles = () => useThemedStyle(useCallback((t) => StyleSheet.create({
|
|
|
27
26
|
color: t.colors.foreground,
|
|
28
27
|
},
|
|
29
28
|
}), []));
|
|
30
|
-
//# sourceMappingURL=Chevron.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { default as Chevron } from "./Chevron";
|
|
2
|
-
|
|
2
|
+
export * from "./Chevron";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { default as Chevron } from "./Chevron";
|
|
2
|
-
|
|
2
|
+
export * from "./Chevron";
|
|
@@ -16,4 +16,3 @@ export type DateTimeInputProps = {
|
|
|
16
16
|
};
|
|
17
17
|
declare const DateTimeInput: ({ value, onChange, testID, containerStyle, label, caption, mode, error, disabled, onSave, }: DateTimeInputProps) => React.JSX.Element;
|
|
18
18
|
export default DateTimeInput;
|
|
19
|
-
//# sourceMappingURL=DateTimeInput.d.ts.map
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback, useEffect, useState, useRef } from "react";
|
|
2
3
|
import DateTimePicker from "@react-native-community/datetimepicker";
|
|
3
4
|
import { View, TouchableOpacity, StyleSheet, } from "react-native";
|
|
4
5
|
import Animated, { interpolate, useAnimatedStyle, useSharedValue, withTiming, } from "react-native-reanimated";
|
|
5
|
-
import IonIcons from "react-native-vector-icons/
|
|
6
|
+
import IonIcons from "@react-native-vector-icons/ionicons/static";
|
|
6
7
|
import moment from "moment";
|
|
7
8
|
import { Sheet } from "../Sheet";
|
|
8
9
|
import { Text } from "../Text";
|
|
@@ -83,43 +84,18 @@ const DateTimeInput = ({ value, onChange, testID, containerStyle, label, caption
|
|
|
83
84
|
],
|
|
84
85
|
};
|
|
85
86
|
});
|
|
86
|
-
return (
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
</Text>
|
|
99
|
-
</Animated.View>
|
|
100
|
-
<IonIcons color={!disabled
|
|
101
|
-
? theme.colors.foreground
|
|
102
|
-
: theme.colors.foregroundLowContrast} name={mode === "time" ? "time-outline" : "calendar-outline"} size={20}/>
|
|
103
|
-
</Animated.View>
|
|
104
|
-
</TouchableOpacity>
|
|
105
|
-
{!!error && <FieldError error={error}/>}
|
|
106
|
-
{!!caption && <MenuItemDescription description={caption}/>}
|
|
107
|
-
</View>
|
|
108
|
-
<Sheet disableScroll header={label} open={dateSheetOpen} setOpen={setDateSheetOpen} footerPadding={70} footer={<Button text="Save" onPress={() => {
|
|
109
|
-
onSave?.(date);
|
|
110
|
-
setDateSheetOpen(false);
|
|
111
|
-
}}/>}>
|
|
112
|
-
<View style={styles.pickerContainer}>
|
|
113
|
-
<DateTimePicker value={date} style={styles.datePicker} mode={mode} themeVariant={theme.isDarkTheme ? "dark" : "light"} display="spinner" onChange={(_, newDate) => {
|
|
114
|
-
if (!newDate) {
|
|
115
|
-
return;
|
|
116
|
-
}
|
|
117
|
-
setDate(newDate);
|
|
118
|
-
onChange?.(newDate);
|
|
119
|
-
}}/>
|
|
120
|
-
</View>
|
|
121
|
-
</Sheet>
|
|
122
|
-
</>);
|
|
87
|
+
return (_jsxs(_Fragment, { children: [_jsxs(View, { testID: testID, style: [styles.container, containerStyle], children: [_jsx(TouchableOpacity, { onPress: () => setDateSheetOpen(true), disabled: disabled, 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: _jsx(Text, { contrast: "low", style: styles.value, children: moment(value).format(getFormat(mode)).toString() }) }), _jsx(IonIcons, { color: !disabled
|
|
88
|
+
? theme.colors.foreground
|
|
89
|
+
: theme.colors.foregroundLowContrast, name: mode === "time" ? "time-outline" : "calendar-outline", size: 20 })] }) }), !!error && _jsx(FieldError, { error: error }), !!caption && _jsx(MenuItemDescription, { description: caption })] }), _jsx(Sheet, { disableScroll: true, header: label, open: dateSheetOpen, setOpen: setDateSheetOpen, footerPadding: 70, footer: _jsx(Button, { text: "Save", onPress: () => {
|
|
90
|
+
onSave?.(date);
|
|
91
|
+
setDateSheetOpen(false);
|
|
92
|
+
} }), children: _jsx(View, { style: styles.pickerContainer, children: _jsx(DateTimePicker, { value: date, style: styles.datePicker, mode: mode, themeVariant: theme.isDarkTheme ? "dark" : "light", display: "spinner", onChange: (_, newDate) => {
|
|
93
|
+
if (!newDate) {
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
setDate(newDate);
|
|
97
|
+
onChange?.(newDate);
|
|
98
|
+
} }) }) })] }));
|
|
123
99
|
};
|
|
124
100
|
export default DateTimeInput;
|
|
125
101
|
const useStyles = (disabled) => useThemedStyle(useCallback((t) => StyleSheet.create({
|
|
@@ -153,6 +129,7 @@ const useStyles = (disabled) => useThemedStyle(useCallback((t) => StyleSheet.cre
|
|
|
153
129
|
labelContainer: {
|
|
154
130
|
left: t.size.baseSize * 2,
|
|
155
131
|
position: "absolute",
|
|
132
|
+
pointerEvents: "none",
|
|
156
133
|
},
|
|
157
134
|
label: {
|
|
158
135
|
color: !disabled
|
|
@@ -164,4 +141,3 @@ const useStyles = (disabled) => useThemedStyle(useCallback((t) => StyleSheet.cre
|
|
|
164
141
|
paddingHorizontal: t.size.baseSize * 0,
|
|
165
142
|
},
|
|
166
143
|
}), [disabled]));
|
|
167
|
-
//# sourceMappingURL=DateTimeInput.js.map
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
type DragHandleSize = "small" | "medium" | "large";
|
|
3
|
-
type
|
|
3
|
+
export type DragHandleProps = {
|
|
4
4
|
size?: DragHandleSize;
|
|
5
5
|
};
|
|
6
|
-
declare const DragHandle: ({ size }:
|
|
6
|
+
declare const DragHandle: ({ size }: DragHandleProps) => React.JSX.Element;
|
|
7
7
|
export default DragHandle;
|
|
8
|
-
//# sourceMappingURL=DragHandle.d.ts.map
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
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
|
const SIZE_MAP = {
|
|
@@ -8,9 +9,7 @@ const SIZE_MAP = {
|
|
|
8
9
|
};
|
|
9
10
|
const DragHandle = ({ size = "medium" }) => {
|
|
10
11
|
const styles = useStyles(size).styles;
|
|
11
|
-
return (
|
|
12
|
-
<View style={styles.handle}/>
|
|
13
|
-
</View>);
|
|
12
|
+
return (_jsx(View, { style: styles.container, children: _jsx(View, { style: styles.handle }) }));
|
|
14
13
|
};
|
|
15
14
|
export default DragHandle;
|
|
16
15
|
const useStyles = (size) => useThemedStyle(useCallback((t) => StyleSheet.create({
|
|
@@ -26,4 +25,3 @@ const useStyles = (size) => useThemedStyle(useCallback((t) => StyleSheet.create(
|
|
|
26
25
|
backgroundColor: t.colors.backgroundOnPrimary,
|
|
27
26
|
},
|
|
28
27
|
}), [size]));
|
|
29
|
-
//# sourceMappingURL=DragHandle.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { default as DragHandle } from "./DragHandle";
|
|
2
|
-
|
|
2
|
+
export * from "./DragHandle";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { default as DragHandle } from "./DragHandle";
|
|
2
|
-
|
|
2
|
+
export * from "./DragHandle";
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
type
|
|
1
|
+
export type FieldErrorProps = {
|
|
2
2
|
error: string;
|
|
3
3
|
};
|
|
4
|
-
export declare const FieldError: ({ error }:
|
|
5
|
-
export {};
|
|
6
|
-
//# sourceMappingURL=FieldError.d.ts.map
|
|
4
|
+
export declare const FieldError: ({ error }: FieldErrorProps) => import("react").JSX.Element;
|
|
@@ -1,14 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import { useCallback } from "react";
|
|
2
3
|
import { View, StyleSheet } from "react-native";
|
|
3
4
|
import { useThemedStyle } from "../../hooks";
|
|
4
5
|
import { Text } from '../Text';
|
|
5
6
|
export const FieldError = ({ error }) => {
|
|
6
7
|
const styles = useStyles().styles;
|
|
7
|
-
return (
|
|
8
|
-
<Text category="p2" status="error">
|
|
9
|
-
{error}
|
|
10
|
-
</Text>
|
|
11
|
-
</View>);
|
|
8
|
+
return (_jsx(View, { style: styles.errorContainer, children: _jsx(Text, { category: "p2", status: "error", children: error }) }));
|
|
12
9
|
};
|
|
13
10
|
const useStyles = () => useThemedStyle(useCallback(t => StyleSheet.create({
|
|
14
11
|
errorContainer: {
|
|
@@ -16,4 +13,3 @@ const useStyles = () => useThemedStyle(useCallback(t => StyleSheet.create({
|
|
|
16
13
|
marginTop: t.size.baseSize * 1,
|
|
17
14
|
},
|
|
18
15
|
}), []));
|
|
19
|
-
//# sourceMappingURL=FieldError.js.map
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import { useForm } from "informed";
|
|
2
3
|
import { View } from "react-native";
|
|
3
4
|
const Form = ({ children, ...rest }) => {
|
|
4
5
|
const { render, userProps } = useForm(rest);
|
|
5
|
-
|
|
6
|
-
return render(<View {...userProps}>{children}</View>);
|
|
6
|
+
return render(_jsx(View, { ...userProps, children: children }));
|
|
7
7
|
};
|
|
8
8
|
export default Form;
|
|
9
|
-
//# sourceMappingURL=Form.js.map
|