@sincpro/mobile-ui 0.1.4 → 0.2.1
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/README.md +36 -9
- package/{lib → dist}/providers/index.js +1 -1
- package/{lib → dist}/views/FormViewV2.js +2 -2
- package/{lib → dist}/views/ListViewV2.js +2 -2
- package/dist/views/types/UIItem.js +1 -0
- package/{lib → dist}/widgets/ScreenHeader.d.ts +1 -1
- package/{lib → dist}/widgets/ScreenHeader.js +11 -4
- package/package.json +40 -7
- package/lib/providers/index.d.ts +0 -0
- /package/{lib → dist}/Dialog/BottomSheet/BottomSheet.Root.d.ts +0 -0
- /package/{lib → dist}/Dialog/BottomSheet/BottomSheet.Root.js +0 -0
- /package/{lib → dist}/Dialog/BottomSheet/index.d.ts +0 -0
- /package/{lib → dist}/Dialog/BottomSheet/index.js +0 -0
- /package/{lib → dist}/Dialog/Confirmation.context.d.ts +0 -0
- /package/{lib → dist}/Dialog/Confirmation.context.js +0 -0
- /package/{lib → dist}/Dialog/Dialog.Confirmation.d.ts +0 -0
- /package/{lib → dist}/Dialog/Dialog.Confirmation.js +0 -0
- /package/{lib → dist}/Dialog/Dialog.EditValue.d.ts +0 -0
- /package/{lib → dist}/Dialog/Dialog.EditValue.js +0 -0
- /package/{lib → dist}/Dialog/index.d.ts +0 -0
- /package/{lib → dist}/Dialog/index.js +0 -0
- /package/{lib → dist}/Display/Display.Avatar.d.ts +0 -0
- /package/{lib → dist}/Display/Display.Avatar.js +0 -0
- /package/{lib → dist}/Display/Display.Badge.d.ts +0 -0
- /package/{lib → dist}/Display/Display.Badge.js +0 -0
- /package/{lib → dist}/Display/Display.CopyableText.d.ts +0 -0
- /package/{lib → dist}/Display/Display.CopyableText.js +0 -0
- /package/{lib → dist}/Display/Display.CountRecords.d.ts +0 -0
- /package/{lib → dist}/Display/Display.CountRecords.js +0 -0
- /package/{lib → dist}/Display/Display.Date.d.ts +0 -0
- /package/{lib → dist}/Display/Display.Date.js +0 -0
- /package/{lib → dist}/Display/Display.Divider.d.ts +0 -0
- /package/{lib → dist}/Display/Display.Divider.js +0 -0
- /package/{lib → dist}/Display/Display.Icon.d.ts +0 -0
- /package/{lib → dist}/Display/Display.Icon.js +0 -0
- /package/{lib → dist}/Display/Display.Logo.d.ts +0 -0
- /package/{lib → dist}/Display/Display.Logo.js +0 -0
- /package/{lib → dist}/Display/Display.MenuButton.d.ts +0 -0
- /package/{lib → dist}/Display/Display.MenuButton.js +0 -0
- /package/{lib → dist}/Display/Display.Monetary.d.ts +0 -0
- /package/{lib → dist}/Display/Display.Monetary.js +0 -0
- /package/{lib → dist}/Display/index.d.ts +0 -0
- /package/{lib → dist}/Display/index.js +0 -0
- /package/{lib → dist}/Feedback/ErrorBoundary.d.ts +0 -0
- /package/{lib → dist}/Feedback/ErrorBoundary.js +0 -0
- /package/{lib → dist}/Feedback/Feedback.DomainSplashScreen.d.ts +0 -0
- /package/{lib → dist}/Feedback/Feedback.DomainSplashScreen.js +0 -0
- /package/{lib → dist}/Feedback/Feedback.Empty.d.ts +0 -0
- /package/{lib → dist}/Feedback/Feedback.Empty.js +0 -0
- /package/{lib → dist}/Feedback/Feedback.Error.d.ts +0 -0
- /package/{lib → dist}/Feedback/Feedback.Error.js +0 -0
- /package/{lib → dist}/Feedback/Feedback.Loading.d.ts +0 -0
- /package/{lib → dist}/Feedback/Feedback.Loading.js +0 -0
- /package/{lib → dist}/Feedback/Feedback.Spinner.d.ts +0 -0
- /package/{lib → dist}/Feedback/Feedback.Spinner.js +0 -0
- /package/{lib → dist}/Feedback/Feedback.Splash.d.ts +0 -0
- /package/{lib → dist}/Feedback/Feedback.Splash.js +0 -0
- /package/{lib → dist}/Feedback/index.d.ts +0 -0
- /package/{lib → dist}/Feedback/index.js +0 -0
- /package/{lib → dist}/Form/Form.Button.d.ts +0 -0
- /package/{lib → dist}/Form/Form.Button.js +0 -0
- /package/{lib → dist}/Form/Form.Checkbox.d.ts +0 -0
- /package/{lib → dist}/Form/Form.Checkbox.js +0 -0
- /package/{lib → dist}/Form/Form.ControlledCheckbox.d.ts +0 -0
- /package/{lib → dist}/Form/Form.ControlledCheckbox.js +0 -0
- /package/{lib → dist}/Form/Form.ControlledDropdown.d.ts +0 -0
- /package/{lib → dist}/Form/Form.ControlledDropdown.js +0 -0
- /package/{lib → dist}/Form/Form.ControlledInput.d.ts +0 -0
- /package/{lib → dist}/Form/Form.ControlledInput.js +0 -0
- /package/{lib → dist}/Form/Form.ControlledMonetaryInput.d.ts +0 -0
- /package/{lib → dist}/Form/Form.ControlledMonetaryInput.js +0 -0
- /package/{lib → dist}/Form/Form.ControlledRadioButton.d.ts +0 -0
- /package/{lib → dist}/Form/Form.ControlledRadioButton.js +0 -0
- /package/{lib → dist}/Form/Form.Dropdown.d.ts +0 -0
- /package/{lib → dist}/Form/Form.Dropdown.js +0 -0
- /package/{lib → dist}/Form/Form.FilterButton.d.ts +0 -0
- /package/{lib → dist}/Form/Form.FilterButton.js +0 -0
- /package/{lib → dist}/Form/Form.FractionalQuantityInput.d.ts +0 -0
- /package/{lib → dist}/Form/Form.FractionalQuantityInput.js +0 -0
- /package/{lib → dist}/Form/Form.IconButton.d.ts +0 -0
- /package/{lib → dist}/Form/Form.IconButton.js +0 -0
- /package/{lib → dist}/Form/Form.Input.d.ts +0 -0
- /package/{lib → dist}/Form/Form.Input.js +0 -0
- /package/{lib → dist}/Form/Form.InputField.d.ts +0 -0
- /package/{lib → dist}/Form/Form.InputField.js +0 -0
- /package/{lib → dist}/Form/Form.MonetaryInput.d.ts +0 -0
- /package/{lib → dist}/Form/Form.MonetaryInput.js +0 -0
- /package/{lib → dist}/Form/Form.PasswordInput.d.ts +0 -0
- /package/{lib → dist}/Form/Form.PasswordInput.js +0 -0
- /package/{lib → dist}/Form/Form.QuantitySelector.d.ts +0 -0
- /package/{lib → dist}/Form/Form.QuantitySelector.js +0 -0
- /package/{lib → dist}/Form/Form.RadioButton.d.ts +0 -0
- /package/{lib → dist}/Form/Form.RadioButton.js +0 -0
- /package/{lib → dist}/Form/Form.SearchBar.d.ts +0 -0
- /package/{lib → dist}/Form/Form.SearchBar.js +0 -0
- /package/{lib → dist}/Form/Form.TextInput.d.ts +0 -0
- /package/{lib → dist}/Form/Form.TextInput.js +0 -0
- /package/{lib → dist}/Form/index.d.ts +0 -0
- /package/{lib → dist}/Form/index.js +0 -0
- /package/{lib → dist}/Navigation/Navigation.Header.d.ts +0 -0
- /package/{lib → dist}/Navigation/Navigation.Header.js +0 -0
- /package/{lib → dist}/Navigation/Navigation.HeaderToolbar.d.ts +0 -0
- /package/{lib → dist}/Navigation/Navigation.HeaderToolbar.js +0 -0
- /package/{lib → dist}/Navigation/Navigation.RowItem.d.ts +0 -0
- /package/{lib → dist}/Navigation/Navigation.RowItem.js +0 -0
- /package/{lib → dist}/Navigation/Navigation.TabIcon.d.ts +0 -0
- /package/{lib → dist}/Navigation/Navigation.TabIcon.js +0 -0
- /package/{lib → dist}/Navigation/Navigation.TabItem.d.ts +0 -0
- /package/{lib → dist}/Navigation/Navigation.TabItem.js +0 -0
- /package/{lib → dist}/Navigation/index.d.ts +0 -0
- /package/{lib → dist}/Navigation/index.js +0 -0
- /package/{lib → dist}/Typography/Typography.Heading.d.ts +0 -0
- /package/{lib → dist}/Typography/Typography.Heading.js +0 -0
- /package/{lib → dist}/Typography/Typography.Text.d.ts +0 -0
- /package/{lib → dist}/Typography/Typography.Text.js +0 -0
- /package/{lib → dist}/Typography/index.d.ts +0 -0
- /package/{lib → dist}/Typography/index.js +0 -0
- /package/{lib → dist}/icons/AddItemIcon.d.ts +0 -0
- /package/{lib → dist}/icons/AddItemIcon.js +0 -0
- /package/{lib → dist}/icons/ArrangeCircle.d.ts +0 -0
- /package/{lib → dist}/icons/ArrangeCircle.js +0 -0
- /package/{lib → dist}/icons/ArrowDownIcon.d.ts +0 -0
- /package/{lib → dist}/icons/ArrowDownIcon.js +0 -0
- /package/{lib → dist}/icons/ArrowUpIcon.d.ts +0 -0
- /package/{lib → dist}/icons/ArrowUpIcon.js +0 -0
- /package/{lib → dist}/icons/BoxIcon.d.ts +0 -0
- /package/{lib → dist}/icons/BoxIcon.js +0 -0
- /package/{lib → dist}/icons/BoxTimeIcon.d.ts +0 -0
- /package/{lib → dist}/icons/BoxTimeIcon.js +0 -0
- /package/{lib → dist}/icons/CalendarIcon.d.ts +0 -0
- /package/{lib → dist}/icons/CalendarIcon.js +0 -0
- /package/{lib → dist}/icons/CardIcon.d.ts +0 -0
- /package/{lib → dist}/icons/CardIcon.js +0 -0
- /package/{lib → dist}/icons/CashierIcon.d.ts +0 -0
- /package/{lib → dist}/icons/CashierIcon.js +0 -0
- /package/{lib → dist}/icons/CreditIcon.d.ts +0 -0
- /package/{lib → dist}/icons/CreditIcon.js +0 -0
- /package/{lib → dist}/icons/DuoIcon.d.ts +0 -0
- /package/{lib → dist}/icons/DuoIcon.js +0 -0
- /package/{lib → dist}/icons/HomeIcon.d.ts +0 -0
- /package/{lib → dist}/icons/HomeIcon.js +0 -0
- /package/{lib → dist}/icons/HomeIconOutlined.d.ts +0 -0
- /package/{lib → dist}/icons/HomeIconOutlined.js +0 -0
- /package/{lib → dist}/icons/LogoIcon.d.ts +0 -0
- /package/{lib → dist}/icons/LogoIcon.js +0 -0
- /package/{lib → dist}/icons/MoneyReceiveIcon.d.ts +0 -0
- /package/{lib → dist}/icons/MoneyReceiveIcon.js +0 -0
- /package/{lib → dist}/icons/OdooIcon.d.ts +0 -0
- /package/{lib → dist}/icons/OdooIcon.js +0 -0
- /package/{lib → dist}/icons/PinIcon.d.ts +0 -0
- /package/{lib → dist}/icons/PinIcon.js +0 -0
- /package/{lib → dist}/icons/PrinterIcon.d.ts +0 -0
- /package/{lib → dist}/icons/PrinterIcon.js +0 -0
- /package/{lib → dist}/icons/ProfileIcon.d.ts +0 -0
- /package/{lib → dist}/icons/ProfileIcon.js +0 -0
- /package/{lib → dist}/icons/SettingsIcon.d.ts +0 -0
- /package/{lib → dist}/icons/SettingsIcon.js +0 -0
- /package/{lib → dist}/icons/SinpeIcon.d.ts +0 -0
- /package/{lib → dist}/icons/SinpeIcon.js +0 -0
- /package/{lib → dist}/icons/ToggleOffIcon.d.ts +0 -0
- /package/{lib → dist}/icons/ToggleOffIcon.js +0 -0
- /package/{lib → dist}/icons/WalletMoneyIcon.d.ts +0 -0
- /package/{lib → dist}/icons/WalletMoneyIcon.js +0 -0
- /package/{lib → dist}/icons/icon_getters.d.ts +0 -0
- /package/{lib → dist}/icons/icon_getters.js +0 -0
- /package/{lib → dist}/icons/props.d.ts +0 -0
- /package/{lib → dist}/icons/props.js +0 -0
- /package/{lib → dist}/index.d.ts +0 -0
- /package/{lib → dist}/index.js +0 -0
- /package/{lib → dist}/layouts/AuthContainer.d.ts +0 -0
- /package/{lib → dist}/layouts/AuthContainer.js +0 -0
- /package/{lib → dist}/layouts/Container.d.ts +0 -0
- /package/{lib → dist}/layouts/Container.js +0 -0
- /package/{lib → dist}/layouts/GradientContainer.d.ts +0 -0
- /package/{lib → dist}/layouts/GradientContainer.js +0 -0
- /package/{lib → dist}/layouts/PlainLayout.d.ts +0 -0
- /package/{lib → dist}/layouts/PlainLayout.js +0 -0
- /package/{lib → dist}/layouts/ScrollContainer.d.ts +0 -0
- /package/{lib → dist}/layouts/ScrollContainer.js +0 -0
- /package/{lib → dist}/layouts/TabNavigatorLayout.d.ts +0 -0
- /package/{lib → dist}/layouts/TabNavigatorLayout.js +0 -0
- /package/{lib → dist}/notifications/index.d.ts +0 -0
- /package/{lib → dist}/notifications/index.js +0 -0
- /package/{lib → dist}/primitives/BaseButton.d.ts +0 -0
- /package/{lib → dist}/primitives/BaseButton.js +0 -0
- /package/{lib → dist}/primitives/Box.d.ts +0 -0
- /package/{lib → dist}/primitives/Box.js +0 -0
- /package/{lib → dist}/primitives/Row.d.ts +0 -0
- /package/{lib → dist}/primitives/Row.js +0 -0
- /package/{lib → dist}/primitives/Stack.d.ts +0 -0
- /package/{lib → dist}/primitives/Stack.js +0 -0
- /package/{lib → dist}/primitives/index.d.ts +0 -0
- /package/{lib → dist}/primitives/index.js +0 -0
- /package/{lib/utils/icon.js → dist/providers/index.d.ts} +0 -0
- /package/{lib → dist}/theme/active.d.ts +0 -0
- /package/{lib → dist}/theme/active.js +0 -0
- /package/{lib → dist}/theme/components/ThemedActivityIndicator.d.ts +0 -0
- /package/{lib → dist}/theme/components/ThemedActivityIndicator.js +0 -0
- /package/{lib → dist}/theme/components/index.d.ts +0 -0
- /package/{lib → dist}/theme/components/index.js +0 -0
- /package/{lib → dist}/theme/css-vars.d.ts +0 -0
- /package/{lib → dist}/theme/css-vars.js +0 -0
- /package/{lib → dist}/theme/default.d.ts +0 -0
- /package/{lib → dist}/theme/default.js +0 -0
- /package/{lib → dist}/theme/define.d.ts +0 -0
- /package/{lib → dist}/theme/define.js +0 -0
- /package/{lib → dist}/theme/globals.css +0 -0
- /package/{lib → dist}/theme/index.d.ts +0 -0
- /package/{lib → dist}/theme/index.js +0 -0
- /package/{lib → dist}/theme/theme.d.ts +0 -0
- /package/{lib → dist}/theme/theme.js +0 -0
- /package/{lib → dist}/theme/tw.d.ts +0 -0
- /package/{lib → dist}/theme/tw.js +0 -0
- /package/{lib → dist}/theme/types.d.ts +0 -0
- /package/{lib → dist}/theme/types.js +0 -0
- /package/{lib → dist}/theme/typography.d.ts +0 -0
- /package/{lib → dist}/theme/typography.js +0 -0
- /package/{lib → dist}/theme/useTheme.d.ts +0 -0
- /package/{lib → dist}/theme/useTheme.js +0 -0
- /package/{lib → dist}/utils/date.d.ts +0 -0
- /package/{lib → dist}/utils/date.js +0 -0
- /package/{lib → dist}/utils/icon.d.ts +0 -0
- /package/{lib/utils/timezone.js → dist/utils/icon.js} +0 -0
- /package/{lib → dist}/utils/monetary.d.ts +0 -0
- /package/{lib → dist}/utils/monetary.js +0 -0
- /package/{lib → dist}/utils/quantity.d.ts +0 -0
- /package/{lib → dist}/utils/quantity.js +0 -0
- /package/{lib → dist}/utils/serializer.d.ts +0 -0
- /package/{lib → dist}/utils/serializer.js +0 -0
- /package/{lib → dist}/utils/timezone.d.ts +0 -0
- /package/{lib/views/types/IFormView.js → dist/utils/timezone.js} +0 -0
- /package/{lib → dist}/views/AuthFormView.d.ts +0 -0
- /package/{lib → dist}/views/AuthFormView.js +0 -0
- /package/{lib → dist}/views/FormViewV2.context.d.ts +0 -0
- /package/{lib → dist}/views/FormViewV2.context.js +0 -0
- /package/{lib → dist}/views/FormViewV2.d.ts +0 -0
- /package/{lib → dist}/views/ListViewV2.context.d.ts +0 -0
- /package/{lib → dist}/views/ListViewV2.context.js +0 -0
- /package/{lib → dist}/views/ListViewV2.d.ts +0 -0
- /package/{lib → dist}/views/Wizard/Wizard.context.d.ts +0 -0
- /package/{lib → dist}/views/Wizard/Wizard.context.js +0 -0
- /package/{lib → dist}/views/Wizard/Wizard.d.ts +0 -0
- /package/{lib → dist}/views/Wizard/Wizard.js +0 -0
- /package/{lib → dist}/views/Wizard/index.d.ts +0 -0
- /package/{lib → dist}/views/Wizard/index.js +0 -0
- /package/{lib → dist}/views/types/IFormView.d.ts +0 -0
- /package/{lib/views/types/UIItem.js → dist/views/types/IFormView.js} +0 -0
- /package/{lib → dist}/views/types/IListView.d.ts +0 -0
- /package/{lib → dist}/views/types/IListView.js +0 -0
- /package/{lib → dist}/views/types/UIItem.d.ts +0 -0
- /package/{lib → dist}/widgets/CircleButton.d.ts +0 -0
- /package/{lib → dist}/widgets/CircleButton.js +0 -0
- /package/{lib → dist}/widgets/GeoPermissionCard.d.ts +0 -0
- /package/{lib → dist}/widgets/GeoPermissionCard.js +0 -0
- /package/{lib → dist}/widgets/HomeHeader.d.ts +0 -0
- /package/{lib → dist}/widgets/HomeHeader.js +0 -0
- /package/{lib → dist}/widgets/JSONViewer.d.ts +0 -0
- /package/{lib → dist}/widgets/JSONViewer.js +0 -0
- /package/{lib → dist}/widgets/MenuCard.d.ts +0 -0
- /package/{lib → dist}/widgets/MenuCard.js +0 -0
- /package/{lib → dist}/widgets/MenuGrid.d.ts +0 -0
- /package/{lib → dist}/widgets/MenuGrid.js +0 -0
- /package/{lib → dist}/widgets/TimeZoneSelector.d.ts +0 -0
- /package/{lib → dist}/widgets/TimeZoneSelector.js +0 -0
- /package/{lib → dist}/widgets/TimeZoneSelectorModal.d.ts +0 -0
- /package/{lib → dist}/widgets/TimeZoneSelectorModal.js +0 -0
- /package/{lib → dist}/widgets/index.d.ts +0 -0
- /package/{lib → dist}/widgets/index.js +0 -0
- /package/{lib/tailwind.preset.js → tailwind.preset.js} +0 -0
package/README.md
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
# @sincpro/
|
|
1
|
+
# @sincpro/mobile-ui
|
|
2
|
+
|
|
3
|
+
> 🤖 **Agentes de IA:** leé [`AGENTS.md`](AGENTS.md) (orientación del ecosistema, patrones) y [`docs/GOTCHAS.md`](docs/GOTCHAS.md) (trampas conocidas).
|
|
2
4
|
|
|
3
5
|
Sincpro Mobile design system: generic, presentational React Native components.
|
|
4
6
|
|
|
@@ -9,24 +11,49 @@ Sincpro Mobile design system: generic, presentational React Native components.
|
|
|
9
11
|
## Install
|
|
10
12
|
|
|
11
13
|
```bash
|
|
12
|
-
|
|
14
|
+
npx expo install @sincpro/mobile-ui
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Peer dependencies (provided by the host app): `react`, `react-native`, `nativewind`, `react-native-reanimated`, `react-native-svg`, `react-native-safe-area-context`, `react-native-keyboard-controller`, `react-native-worklets`, `react-hook-form`, `react-native-currency-input`, `@expo/vector-icons`, `@expo-google-fonts/montserrat`, and the expo modules listed in `package.json`.
|
|
18
|
+
|
|
19
|
+
## Tailwind preset (required)
|
|
20
|
+
|
|
21
|
+
The components use design tokens exposed as Tailwind classes (`bg-primary`, `text-text-secondary`, …) backed by CSS variables. The consumer app wires them via the shipped preset and content globs:
|
|
22
|
+
|
|
23
|
+
```js
|
|
24
|
+
// tailwind.config.js
|
|
25
|
+
module.exports = {
|
|
26
|
+
presets: [require("@sincpro/mobile-ui/tailwind.preset")],
|
|
27
|
+
content: ["./App.tsx", "./src/**/*.{ts,tsx}", "./node_modules/@sincpro/mobile-ui/**/*.js"],
|
|
28
|
+
theme: { extend: { colors: { brand: "#FF6600" } } },
|
|
29
|
+
};
|
|
13
30
|
```
|
|
14
31
|
|
|
15
|
-
|
|
32
|
+
The token values are CSS variables; override them (a custom theme) in your global CSS `:root`, or inject at runtime with `vars()`. The framework's `createAppShell({ theme })` does this automatically.
|
|
16
33
|
|
|
17
34
|
## Usage
|
|
18
35
|
|
|
19
36
|
```tsx
|
|
20
|
-
import { Form } from "@sincpro/
|
|
21
|
-
import { Display } from "@sincpro/
|
|
22
|
-
import { theme } from "@sincpro/
|
|
23
|
-
import { formatDate } from "@sincpro/mobile_ui/lib/date";
|
|
37
|
+
import { Form } from "@sincpro/mobile-ui/Form";
|
|
38
|
+
import { Display } from "@sincpro/mobile-ui/Display";
|
|
39
|
+
import { theme } from "@sincpro/mobile-ui/theme";
|
|
24
40
|
```
|
|
25
41
|
|
|
42
|
+
## Storybook (on-device, Expo)
|
|
43
|
+
|
|
44
|
+
Visualiza los componentes en simulador/dispositivo con Storybook React Native (dev-only, no se publica):
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
make storybook # expo start (Expo Go / dev build)
|
|
48
|
+
make storybook-android # expo run:android
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Las stories viven en `.rnstorybook/stories/**/*.stories.tsx` e importan desde `@sincpro/mobile-ui/*`. El harness (`App.tsx`, `metro.config.js`, `.rnstorybook/`) está excluido del paquete publicado (`files: ["dist", ...]`).
|
|
52
|
+
|
|
26
53
|
## Structure
|
|
27
54
|
|
|
28
55
|
- `Form`, `Display`, `Dialog`, `Feedback`, `Typography`, `Navigation`, `primitives` — component categories
|
|
29
56
|
- `views` — compound views (ListViewV2, FormViewV2, Wizard)
|
|
30
57
|
- `widgets` — generic composed widgets (HomeHeader, MenuGrid, GeoPermissionCard, TimeZoneSelector)
|
|
31
|
-
- `theme` — design tokens + tailwind-variants helpers
|
|
32
|
-
- `
|
|
58
|
+
- `theme` — design tokens + tailwind-variants helpers (`defineTheme`, `extendTheme`, `themeToVars`)
|
|
59
|
+
- `utils` — generic utilities (date, monetary, quantity, serializer, icon, timezone)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
export {};
|
|
2
2
|
// Empty - all providers removed
|
|
@@ -3,7 +3,7 @@ import { ErrorBoundary, Feedback } from "../Feedback";
|
|
|
3
3
|
import Container from "../layouts/Container";
|
|
4
4
|
import { theme } from "../theme";
|
|
5
5
|
import { FormViewProvider, useFormView } from "../views/FormViewV2.context";
|
|
6
|
-
import ScreenHeader from "../widgets/ScreenHeader";
|
|
6
|
+
import ScreenHeader, { EVariantScreenHeader } from "../widgets/ScreenHeader";
|
|
7
7
|
import React from "react";
|
|
8
8
|
import { RefreshControl, View } from "react-native";
|
|
9
9
|
import { KeyboardAwareScrollView } from "react-native-keyboard-controller";
|
|
@@ -12,7 +12,7 @@ function FormViewRoot({ name, description, item, isLoading = false, isEmpty = fa
|
|
|
12
12
|
const wrapperProps = withContainer ? {} : { style: { flex: 1 } };
|
|
13
13
|
return (_jsx(FormViewProvider, { description: description, errorMessage: errorMessage, hasError: hasError, isEmpty: isEmpty, isLoading: isLoading, item: item, name: name, onBack: onBack, onRefresh: onRefresh, onRetry: onRetry, readonly: readonly, children: _jsx(ErrorBoundary, { children: _jsx(Wrapper, { ...wrapperProps, children: children }) }) }));
|
|
14
14
|
}
|
|
15
|
-
function Header({ variant =
|
|
15
|
+
function Header({ variant = EVariantScreenHeader.FLAT_HEADER, logoSource, children, }) {
|
|
16
16
|
const { name, description, onBack } = useFormView();
|
|
17
17
|
return (_jsx(_Fragment, { children: _jsx(ScreenHeader, { logoSource: logoSource, onBack: onBack, subtitle: description ? description : `Seleccionar ${name}`, title: name, variant: variant, children: children }) }));
|
|
18
18
|
}
|
|
@@ -9,7 +9,7 @@ import { cn, tv } from "../theme/tw";
|
|
|
9
9
|
import { Typography } from "../Typography";
|
|
10
10
|
import { ListViewProvider, useListView } from "../views/ListViewV2.context";
|
|
11
11
|
import { toRowItems } from "../views/types/IListView";
|
|
12
|
-
import ScreenHeader from "../widgets/ScreenHeader";
|
|
12
|
+
import ScreenHeader, { EVariantScreenHeader } from "../widgets/ScreenHeader";
|
|
13
13
|
import React, { useCallback, useEffect, useMemo, useState } from "react";
|
|
14
14
|
import { FlatList, RefreshControl, ScrollView, TouchableOpacity, View, } from "react-native";
|
|
15
15
|
function ListViewRoot({ name, description, items, isLoading = false, hasError = false, errorMessage, readonly = false, onRefresh, onRetry, onPressItem, onDeleteItem, onSearch, onBack, backgroundColor, withContainer = true, children, }) {
|
|
@@ -20,7 +20,7 @@ function ListViewRoot({ name, description, items, isLoading = false, hasError =
|
|
|
20
20
|
// Propagate contentWithMargin to ContentList via context
|
|
21
21
|
return (_jsx(ListViewProvider, { description: description, errorMessage: errorMessage, hasError: hasError, isLoading: isLoading, items: items, name: name, onBack: onBack, onDeleteItem: onDeleteItem, onPressItem: onPressItem, onRefresh: onRefresh, onRetry: onRetry, onSearch: onSearch, readonly: readonly, children: _jsx(ErrorBoundary, { children: _jsx(Wrapper, { ...wrapperProps, children: children }) }) }));
|
|
22
22
|
}
|
|
23
|
-
function Header({ variant =
|
|
23
|
+
function Header({ variant = EVariantScreenHeader.ROUNDED_HEADER, children, }) {
|
|
24
24
|
const { name, description, onBack } = useListView();
|
|
25
25
|
return (_jsx(ScreenHeader, { onBack: onBack, subtitle: description ? description : `Seleccionar ${name}`, title: name, variant: variant, children: children }));
|
|
26
26
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ImageSourcePropType } from "react-native";
|
|
2
|
-
export declare
|
|
2
|
+
export declare enum EVariantScreenHeader {
|
|
3
3
|
FLAT_HEADER = "FLAT_HEADER",
|
|
4
4
|
ROUNDED_HEADER = "ROUNDED_HEADER",
|
|
5
5
|
LOGO_WITH_BACK_BUTTON = "LOGO_WITH_BACK_BUTTON",
|
|
@@ -4,15 +4,22 @@ import { Navigation } from "../Navigation";
|
|
|
4
4
|
import { View } from "react-native";
|
|
5
5
|
const Header = Navigation.Header;
|
|
6
6
|
const HeaderToolbar = Navigation.HeaderToolbar;
|
|
7
|
+
export var EVariantScreenHeader;
|
|
8
|
+
(function (EVariantScreenHeader) {
|
|
9
|
+
EVariantScreenHeader["FLAT_HEADER"] = "FLAT_HEADER";
|
|
10
|
+
EVariantScreenHeader["ROUNDED_HEADER"] = "ROUNDED_HEADER";
|
|
11
|
+
EVariantScreenHeader["LOGO_WITH_BACK_BUTTON"] = "LOGO_WITH_BACK_BUTTON";
|
|
12
|
+
EVariantScreenHeader["ONLY_LOGO"] = "ONLY_LOGO";
|
|
13
|
+
})(EVariantScreenHeader || (EVariantScreenHeader = {}));
|
|
7
14
|
function ScreenHeader({ variant, title = "Distribución", subtitle, logoSource, onBack, children, }) {
|
|
8
15
|
switch (variant) {
|
|
9
|
-
case
|
|
16
|
+
case EVariantScreenHeader.FLAT_HEADER:
|
|
10
17
|
return (_jsxs(_Fragment, { children: [_jsx(HeaderToolbar, { flat: true, onBack: onBack, subtitle: subtitle, title: title, withBackground: true }), _jsx(View, { children: children })] }));
|
|
11
|
-
case
|
|
18
|
+
case EVariantScreenHeader.ROUNDED_HEADER:
|
|
12
19
|
return (_jsx(GradientContainer, { className: "pt-0.5 shadow-lg shadow-black/70 rounded-b-[18px] pb-6", children: _jsx(HeaderToolbar, { flat: true, onBack: onBack, subtitle: subtitle, title: title, withBackground: false, children: children }) }));
|
|
13
|
-
case
|
|
20
|
+
case EVariantScreenHeader.LOGO_WITH_BACK_BUTTON:
|
|
14
21
|
return (_jsx(Header, { backButton: true, handleBackButton: onBack, logoSource: logoSource, title: "" }));
|
|
15
|
-
case
|
|
22
|
+
case EVariantScreenHeader.ONLY_LOGO:
|
|
16
23
|
return _jsx(Header, { logoSource: logoSource, title: title });
|
|
17
24
|
default:
|
|
18
25
|
return null;
|
package/package.json
CHANGED
|
@@ -1,19 +1,35 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sincpro/mobile-ui",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Sincpro Mobile design system: generic, presentational React Native components (no domain logic)",
|
|
5
|
-
"main": "
|
|
6
|
-
"
|
|
7
|
-
"types": "./lib/index.d.ts",
|
|
8
|
-
"react-native": "./lib/index.js",
|
|
9
|
-
"source": "./sincpro_mobile_ui/index.ts",
|
|
5
|
+
"main": "expo/AppEntry.js",
|
|
6
|
+
"types": "./dist/index.d.ts",
|
|
10
7
|
"publishConfig": {
|
|
11
8
|
"access": "public"
|
|
12
9
|
},
|
|
13
10
|
"files": [
|
|
14
|
-
"
|
|
11
|
+
"dist",
|
|
12
|
+
"tailwind.preset.js",
|
|
15
13
|
"README.md"
|
|
16
14
|
],
|
|
15
|
+
"exports": {
|
|
16
|
+
".": "./dist/index.js",
|
|
17
|
+
"./theme": "./dist/theme/index.js",
|
|
18
|
+
"./Dialog": "./dist/Dialog/index.js",
|
|
19
|
+
"./Dialog/BottomSheet": "./dist/Dialog/BottomSheet/index.js",
|
|
20
|
+
"./Display": "./dist/Display/index.js",
|
|
21
|
+
"./Feedback": "./dist/Feedback/index.js",
|
|
22
|
+
"./Form": "./dist/Form/index.js",
|
|
23
|
+
"./Navigation": "./dist/Navigation/index.js",
|
|
24
|
+
"./Typography": "./dist/Typography/index.js",
|
|
25
|
+
"./primitives": "./dist/primitives/index.js",
|
|
26
|
+
"./widgets": "./dist/widgets/index.js",
|
|
27
|
+
"./views/Wizard": "./dist/views/Wizard/index.js",
|
|
28
|
+
"./tailwind.preset": "./tailwind.preset.js",
|
|
29
|
+
"./theme/globals.css": "./dist/theme/globals.css",
|
|
30
|
+
"./*": "./dist/*.js",
|
|
31
|
+
"./package.json": "./package.json"
|
|
32
|
+
},
|
|
17
33
|
"prettier": {
|
|
18
34
|
"printWidth": 94
|
|
19
35
|
},
|
|
@@ -56,30 +72,47 @@
|
|
|
56
72
|
"devDependencies": {
|
|
57
73
|
"@expo-google-fonts/montserrat": "^0.4.2",
|
|
58
74
|
"@expo/vector-icons": "^15.0.3",
|
|
75
|
+
"@gorhom/bottom-sheet": "^5",
|
|
76
|
+
"@react-native-async-storage/async-storage": "^2",
|
|
77
|
+
"@react-native-community/datetimepicker": "8.4.4",
|
|
78
|
+
"@storybook/addon-ondevice-actions": "^10.4.5",
|
|
79
|
+
"@storybook/addon-ondevice-controls": "^10.4.5",
|
|
80
|
+
"@storybook/react-native": "^10.4.5",
|
|
59
81
|
"@types/big.js": "^6.2.2",
|
|
60
82
|
"@types/react": "~19.1.10",
|
|
83
|
+
"babel-plugin-module-resolver": "^5.0.3",
|
|
61
84
|
"eslint": "^9.35.0",
|
|
62
85
|
"eslint-config-expo": "~10.0.0",
|
|
63
86
|
"eslint-config-prettier": "^10.1.8",
|
|
64
87
|
"eslint-plugin-prettier": "^5.5.4",
|
|
65
88
|
"eslint-plugin-react": "^7.37.2",
|
|
66
89
|
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
90
|
+
"expo": "~54.0.35",
|
|
67
91
|
"expo-checkbox": "~5.0.8",
|
|
68
92
|
"expo-clipboard": "~8.0.8",
|
|
69
93
|
"expo-linear-gradient": "~15.0.8",
|
|
70
94
|
"expo-localization": "~17.0.9",
|
|
95
|
+
"expo-status-bar": "~3.0.9",
|
|
71
96
|
"nativewind": "^4.0.1",
|
|
72
97
|
"prettier": "^3.6.2",
|
|
73
98
|
"react": "19.1.0",
|
|
74
99
|
"react-hook-form": "^7.62.0",
|
|
75
100
|
"react-native": "0.81.5",
|
|
76
101
|
"react-native-currency-input": "^1.1.1",
|
|
102
|
+
"react-native-gesture-handler": "~2.28.0",
|
|
77
103
|
"react-native-keyboard-controller": "1.18.5",
|
|
78
104
|
"react-native-reanimated": "~4.1.1",
|
|
79
105
|
"react-native-safe-area-context": "~5.6.0",
|
|
80
106
|
"react-native-svg": "15.12.1",
|
|
81
107
|
"react-native-worklets": "0.5.1",
|
|
108
|
+
"storybook": "^10.4.5",
|
|
109
|
+
"tailwindcss": "^3.4.17",
|
|
82
110
|
"tsc-alias": "^1.8.17",
|
|
83
111
|
"typescript": "~5.9.2"
|
|
112
|
+
},
|
|
113
|
+
"scripts": {
|
|
114
|
+
"start": "expo start",
|
|
115
|
+
"android": "expo run:android",
|
|
116
|
+
"ios": "expo run:ios"
|
|
84
117
|
}
|
|
85
118
|
}
|
package/lib/providers/index.d.ts
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|