@sincpro/mobile-ui 0.7.2 → 1.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/README.md +575 -230
- package/dist/Actions/Actions.Button.d.ts +98 -93
- package/dist/Actions/Actions.Button.js +58 -52
- package/dist/Actions/Actions.FAB.d.ts +3 -1
- package/dist/Actions/Actions.FAB.js +12 -8
- package/dist/Actions/Actions.FilterButton.d.ts +10 -2
- package/dist/Actions/Actions.FilterButton.js +23 -8
- package/dist/Actions/Actions.IconButton.d.ts +36 -33
- package/dist/Actions/Actions.IconButton.js +10 -6
- package/dist/Actions/index.d.ts +12 -12
- package/dist/Actions/index.js +6 -6
- package/dist/Dialog/BottomSheet/BottomSheet.Root.js +1 -1
- package/dist/Dialog/BottomSheet/index.d.ts +1 -1
- package/dist/Dialog/BottomSheet/index.js +1 -1
- package/dist/Dialog/Confirmation.context.js +3 -3
- package/dist/Dialog/Dialog.ActionSheet.d.ts +2 -1
- package/dist/Dialog/Dialog.ActionSheet.js +19 -9
- package/dist/Dialog/Dialog.Confirmation.js +7 -7
- package/dist/Dialog/Dialog.EditValue.js +4 -4
- package/dist/Dialog/Dialog.NativeSheet.d.ts +10 -0
- package/dist/Dialog/Dialog.NativeSheet.js +21 -0
- package/dist/Dialog/Dialog.Sheet.d.ts +5 -1
- package/dist/Dialog/Dialog.Sheet.js +19 -11
- package/dist/Dialog/index.d.ts +5 -5
- package/dist/Dialog/index.js +5 -5
- package/dist/Display/Display.Accordion.js +5 -5
- package/dist/Display/Display.Avatar.d.ts +30 -30
- package/dist/Display/Display.Avatar.js +2 -2
- package/dist/Display/Display.AvatarGroup.js +3 -3
- package/dist/Display/Display.Badge.d.ts +3 -3
- package/dist/Display/Display.Badge.js +1 -1
- package/dist/Display/Display.Card.d.ts +15 -15
- package/dist/Display/Display.Card.js +4 -4
- package/dist/Display/Display.Carousel.js +2 -2
- package/dist/Display/Display.Chip.d.ts +3 -3
- package/dist/Display/Display.Chip.js +12 -12
- package/dist/Display/Display.CircleButton.d.ts +1 -1
- package/dist/Display/Display.CircleButton.js +3 -3
- package/dist/Display/Display.CopyableText.d.ts +9 -2
- package/dist/Display/Display.CopyableText.js +76 -8
- package/dist/Display/Display.CountRecords.js +2 -2
- package/dist/Display/Display.DataTable.js +2 -2
- package/dist/Display/Display.Date.d.ts +1 -1
- package/dist/Display/Display.Date.js +5 -5
- package/dist/Display/Display.Divider.d.ts +24 -24
- package/dist/Display/Display.Divider.js +1 -1
- package/dist/Display/Display.GradientSurface.d.ts +58 -39
- package/dist/Display/Display.GradientSurface.js +31 -15
- package/dist/Display/Display.Icon.d.ts +1 -1
- package/dist/Display/Display.Icon.js +2 -1
- package/dist/Display/Display.IconBadge.js +3 -3
- package/dist/Display/Display.Image.js +4 -4
- package/dist/Display/Display.KeyValue.d.ts +11 -4
- package/dist/Display/Display.KeyValue.js +8 -6
- package/dist/Display/Display.ListGroup.d.ts +23 -0
- package/dist/Display/Display.ListGroup.js +17 -0
- package/dist/Display/Display.ListItem.d.ts +16 -2
- package/dist/Display/Display.ListItem.js +29 -12
- package/dist/Display/Display.Logo.d.ts +3 -3
- package/dist/Display/Display.Logo.js +2 -2
- package/dist/Display/Display.MediaCard.js +4 -4
- package/dist/Display/Display.MediaEmbed.js +7 -7
- package/dist/Display/Display.MenuButton.d.ts +4 -4
- package/dist/Display/Display.MenuButton.js +6 -6
- package/dist/Display/Display.MenuCard.d.ts +1 -1
- package/dist/Display/Display.MenuCard.js +3 -3
- package/dist/Display/Display.MenuGrid.d.ts +1 -1
- package/dist/Display/Display.MenuGrid.js +1 -1
- package/dist/Display/Display.Monetary.d.ts +1 -1
- package/dist/Display/Display.Monetary.js +2 -2
- package/dist/Display/Display.Pattern.d.ts +33 -12
- package/dist/Display/Display.Pattern.js +60 -14
- package/dist/Display/Display.PriceTag.js +2 -2
- package/dist/Display/Display.ProductCard.js +7 -7
- package/dist/Display/Display.Rating.js +3 -3
- package/dist/Display/Display.SearchHistory.js +6 -6
- package/dist/Display/Display.SectionHeader.d.ts +11 -1
- package/dist/Display/Display.SectionHeader.js +14 -5
- package/dist/Display/Display.Stat.js +2 -2
- package/dist/Display/Display.StatCard.js +4 -4
- package/dist/Display/Display.StatusDot.js +3 -3
- package/dist/Display/Display.Story.js +3 -3
- package/dist/Display/Display.StoryTray.js +5 -5
- package/dist/Display/Display.StoryViewer.js +4 -4
- package/dist/Display/Display.SwipeableRow.d.ts +3 -1
- package/dist/Display/Display.SwipeableRow.js +7 -7
- package/dist/Display/Display.Tag.js +2 -2
- package/dist/Display/Display.Timeline.js +4 -4
- package/dist/Display/Display.Tooltip.js +3 -3
- package/dist/Display/index.d.ts +49 -45
- package/dist/Display/index.js +44 -42
- package/dist/Feedback/ErrorBoundary.d.ts +1 -1
- package/dist/Feedback/ErrorBoundary.js +1 -1
- package/dist/Feedback/Feedback.Banner.d.ts +3 -3
- package/dist/Feedback/Feedback.Banner.js +6 -6
- package/dist/Feedback/Feedback.DomainSplashScreen.js +5 -4
- package/dist/Feedback/Feedback.Empty.js +3 -3
- package/dist/Feedback/Feedback.EmptyState.d.ts +2 -1
- package/dist/Feedback/Feedback.EmptyState.js +7 -7
- package/dist/Feedback/Feedback.Error.d.ts +3 -1
- package/dist/Feedback/Feedback.Error.js +7 -6
- package/dist/Feedback/Feedback.Loading.d.ts +1 -1
- package/dist/Feedback/Feedback.Loading.js +2 -2
- package/dist/Feedback/Feedback.PermissionCard.js +5 -5
- package/dist/Feedback/Feedback.Progress.js +2 -2
- package/dist/Feedback/Feedback.ProgressCircle.js +1 -1
- package/dist/Feedback/Feedback.Skeleton.js +2 -2
- package/dist/Feedback/Feedback.Spinner.js +3 -3
- package/dist/Feedback/Feedback.Splash.d.ts +1 -1
- package/dist/Feedback/Feedback.Splash.js +7 -6
- package/dist/Feedback/Toast.context.js +7 -7
- package/dist/Feedback/index.d.ts +13 -13
- package/dist/Feedback/index.js +13 -13
- package/dist/Form/Form.Button.d.ts +2 -2
- package/dist/Form/Form.Button.js +1 -1
- package/dist/Form/Form.Checkbox.d.ts +4 -1
- package/dist/Form/Form.Checkbox.js +5 -5
- package/dist/Form/Form.ControlledCheckbox.js +1 -1
- package/dist/Form/Form.ControlledInput.js +1 -1
- package/dist/Form/Form.ControlledMonetaryInput.js +1 -1
- package/dist/Form/Form.ControlledRadioButton.js +1 -1
- package/dist/Form/Form.DatePicker.d.ts +2 -1
- package/dist/Form/Form.DatePicker.js +8 -7
- package/dist/Form/Form.Dropdown.js +7 -7
- package/dist/Form/Form.FAB.d.ts +2 -2
- package/dist/Form/Form.FAB.js +1 -1
- package/dist/Form/Form.FilterButton.d.ts +2 -2
- package/dist/Form/Form.FilterButton.js +1 -1
- package/dist/Form/Form.FractionalQuantityInput.js +4 -4
- package/dist/Form/Form.IconButton.d.ts +2 -2
- package/dist/Form/Form.IconButton.js +1 -1
- package/dist/Form/Form.Input.d.ts +5 -3
- package/dist/Form/Form.Input.js +5 -5
- package/dist/Form/Form.InputField.d.ts +1 -1
- package/dist/Form/Form.InputField.js +3 -3
- package/dist/Form/Form.KeyboardForm.d.ts +11 -0
- package/dist/Form/Form.KeyboardForm.js +9 -0
- package/dist/Form/Form.KeyboardToolbar.d.ts +21 -0
- package/dist/Form/Form.KeyboardToolbar.js +70 -0
- package/dist/Form/Form.MonetaryInput.js +5 -4
- package/dist/Form/Form.PasswordInput.d.ts +1 -1
- package/dist/Form/Form.PasswordInput.js +3 -3
- package/dist/Form/Form.PinInput.js +5 -5
- package/dist/Form/Form.QuantitySelector.js +3 -3
- package/dist/Form/Form.RadioButton.js +4 -4
- package/dist/Form/Form.SearchBar.js +4 -4
- package/dist/Form/Form.Select.d.ts +3 -1
- package/dist/Form/Form.Select.js +27 -14
- package/dist/Form/Form.Slider.js +3 -3
- package/dist/Form/Form.Switch.js +4 -4
- package/dist/Form/Form.TextInput.js +3 -3
- package/dist/Form/index.d.ts +33 -27
- package/dist/Form/index.js +29 -25
- package/dist/Navigation/Navigation.AppBar.d.ts +11 -6
- package/dist/Navigation/Navigation.AppBar.js +16 -16
- package/dist/Navigation/Navigation.BottomNav.d.ts +4 -2
- package/dist/Navigation/Navigation.BottomNav.js +34 -21
- package/dist/Navigation/Navigation.CollapsingHeader.d.ts +1 -1
- package/dist/Navigation/Navigation.CollapsingHeader.js +3 -3
- package/dist/Navigation/Navigation.FloatingBar.js +2 -2
- package/dist/Navigation/Navigation.Header.js +6 -6
- package/dist/Navigation/Navigation.HeaderToolbar.js +5 -5
- package/dist/Navigation/Navigation.Menu.js +6 -6
- package/dist/Navigation/Navigation.MenuSection.js +2 -2
- package/dist/Navigation/Navigation.RowItem.d.ts +2 -2
- package/dist/Navigation/Navigation.RowItem.js +4 -4
- package/dist/Navigation/Navigation.SearchBar.d.ts +6 -1
- package/dist/Navigation/Navigation.SearchBar.js +33 -12
- package/dist/Navigation/Navigation.SearchSuggestions.d.ts +14 -0
- package/dist/Navigation/Navigation.SearchSuggestions.js +7 -0
- package/dist/Navigation/Navigation.SegmentedControl.d.ts +3 -1
- package/dist/Navigation/Navigation.SegmentedControl.js +6 -5
- package/dist/Navigation/Navigation.Steps.js +5 -5
- package/dist/Navigation/Navigation.TabIcon.js +2 -2
- package/dist/Navigation/Navigation.TabItem.js +2 -2
- package/dist/Navigation/Navigation.Tabs.js +5 -5
- package/dist/Navigation/index.d.ts +23 -19
- package/dist/Navigation/index.js +17 -15
- package/dist/Typography/Typography.Heading.d.ts +1 -1
- package/dist/Typography/Typography.Heading.js +2 -2
- package/dist/Typography/Typography.SelectableText.d.ts +10 -0
- package/dist/Typography/Typography.SelectableText.js +16 -0
- package/dist/Typography/Typography.Text.d.ts +2 -2
- package/dist/Typography/Typography.Text.js +5 -19
- package/dist/Typography/index.d.ts +5 -2
- package/dist/Typography/index.js +5 -2
- package/dist/branding.d.ts +22 -0
- package/dist/branding.js +20 -3
- package/dist/icons/AddItemIcon.d.ts +1 -1
- package/dist/icons/ArrangeCircle.d.ts +1 -1
- package/dist/icons/ArrowDownIcon.d.ts +1 -1
- package/dist/icons/ArrowUpIcon.d.ts +1 -1
- package/dist/icons/BoxIcon.d.ts +1 -1
- package/dist/icons/BoxTimeIcon.d.ts +1 -1
- package/dist/icons/CalendarIcon.d.ts +1 -1
- package/dist/icons/CardIcon.d.ts +1 -1
- package/dist/icons/CashierIcon.d.ts +1 -1
- package/dist/icons/DuoIcon.d.ts +1 -1
- package/dist/icons/HomeIcon.d.ts +1 -1
- package/dist/icons/HomeIconOutlined.d.ts +1 -1
- package/dist/icons/LogoIcon.d.ts +1 -1
- package/dist/icons/MoneyReceiveIcon.d.ts +1 -1
- package/dist/icons/PinIcon.d.ts +1 -1
- package/dist/icons/PrinterIcon.d.ts +1 -1
- package/dist/icons/ProfileIcon.d.ts +1 -1
- package/dist/icons/SettingsIcon.d.ts +1 -1
- package/dist/icons/SinpeIcon.d.ts +1 -1
- package/dist/icons/ToggleOffIcon.d.ts +1 -1
- package/dist/icons/WalletMoneyIcon.d.ts +1 -1
- package/dist/index.d.ts +24 -23
- package/dist/index.js +26 -24
- package/dist/layouts/AuthContainer.d.ts +9 -3
- package/dist/layouts/AuthContainer.js +8 -8
- package/dist/layouts/Container.js +1 -1
- package/dist/layouts/GradientContainer.js +1 -1
- package/dist/layouts/ScrollContainer.js +1 -1
- package/dist/layouts/TabNavigatorLayout.js +4 -4
- package/dist/primitives/AspectRatio.js +1 -1
- package/dist/primitives/BaseButton.d.ts +92 -87
- package/dist/primitives/BaseButton.js +52 -54
- package/dist/primitives/Box.js +1 -1
- package/dist/primitives/Pressable.js +1 -1
- package/dist/primitives/Row.js +1 -1
- package/dist/primitives/Stack.js +1 -1
- package/dist/primitives/index.d.ts +6 -6
- package/dist/primitives/index.js +6 -6
- package/dist/theme/active.d.ts +1 -1
- package/dist/theme/active.js +14 -1
- package/dist/theme/build.d.ts +33 -0
- package/dist/theme/build.js +118 -0
- package/dist/theme/color.d.ts +26 -0
- package/dist/theme/color.js +109 -0
- package/dist/theme/components/index.d.ts +1 -1
- package/dist/theme/components/index.js +1 -1
- package/dist/theme/contrast.d.ts +29 -0
- package/dist/theme/contrast.js +57 -0
- package/dist/theme/css-vars.d.ts +3 -1
- package/dist/theme/css-vars.js +29 -3
- package/dist/theme/dark.d.ts +3 -4
- package/dist/theme/dark.js +91 -48
- package/dist/theme/default.d.ts +5 -1
- package/dist/theme/default.js +89 -41
- package/dist/theme/define.d.ts +4 -1
- package/dist/theme/define.js +4 -1
- package/dist/theme/globals.css +61 -46
- package/dist/theme/index.d.ts +14 -10
- package/dist/theme/index.js +13 -9
- package/dist/theme/theme.d.ts +1 -1
- package/dist/theme/theme.js +2 -2
- package/dist/theme/types.d.ts +77 -16
- package/dist/theme/types.js +13 -3
- package/dist/theme/typography.d.ts +19 -4
- package/dist/theme/typography.js +45 -28
- package/dist/theme/useTheme.d.ts +1 -1
- package/dist/theme/useTheme.js +1 -1
- package/dist/theme/validate.d.ts +16 -0
- package/dist/theme/validate.js +200 -0
- package/dist/tokens/index.d.ts +2 -2
- package/dist/tokens/index.js +2 -2
- package/dist/utils/criteria.d.ts +56 -0
- package/dist/utils/criteria.js +99 -0
- package/dist/utils/reorder.d.ts +4 -0
- package/dist/utils/reorder.js +32 -0
- package/dist/views/AppSplashView.d.ts +2 -2
- package/dist/views/AppSplashView.js +3 -3
- package/dist/views/AuthFormView.d.ts +5 -2
- package/dist/views/AuthFormView.js +5 -5
- package/dist/views/FormViewV2.d.ts +9 -4
- package/dist/views/FormViewV2.js +44 -25
- package/dist/views/ListViewV2.d.ts +12 -9
- package/dist/views/ListViewV2.js +49 -36
- package/dist/views/Wizard/Wizard.context.js +1 -1
- package/dist/views/Wizard/Wizard.d.ts +1 -1
- package/dist/views/Wizard/Wizard.js +1 -1
- package/dist/views/Wizard/index.d.ts +4 -4
- package/dist/views/Wizard/index.js +2 -2
- package/dist/views/types/IFormView.d.ts +1 -1
- package/dist/views/types/IListView.d.ts +1 -1
- package/dist/widgets/CircleButton.d.ts +2 -2
- package/dist/widgets/CircleButton.js +1 -1
- package/dist/widgets/CollectionOptions.d.ts +15 -0
- package/dist/widgets/CollectionOptions.js +127 -0
- package/dist/widgets/FilterBar.d.ts +21 -0
- package/dist/widgets/FilterBar.js +14 -0
- package/dist/widgets/FilterBuilder.d.ts +10 -0
- package/dist/widgets/FilterBuilder.js +115 -0
- package/dist/widgets/GeoPermissionCard.js +3 -3
- package/dist/widgets/HomeHeader.js +3 -3
- package/dist/widgets/JSONViewer.js +2 -2
- package/dist/widgets/MenuCard.d.ts +2 -2
- package/dist/widgets/MenuCard.js +1 -1
- package/dist/widgets/MenuGrid.d.ts +3 -3
- package/dist/widgets/MenuGrid.js +1 -1
- package/dist/widgets/MenuSection.d.ts +2 -2
- package/dist/widgets/MenuSection.js +1 -1
- package/dist/widgets/PromoBanner.js +3 -3
- package/dist/widgets/PromoModal.js +3 -3
- package/dist/widgets/QueryChoice.d.ts +10 -0
- package/dist/widgets/QueryChoice.js +13 -0
- package/dist/widgets/QuickActions.js +3 -3
- package/dist/widgets/ReorderableList.d.ts +51 -0
- package/dist/widgets/ReorderableList.js +138 -0
- package/dist/widgets/ScreenHeader.js +2 -2
- package/dist/widgets/TimeZoneSelector.d.ts +1 -1
- package/dist/widgets/TimeZoneSelector.js +4 -4
- package/dist/widgets/TimeZoneSelectorModal.d.ts +1 -1
- package/dist/widgets/TimeZoneSelectorModal.js +5 -5
- package/dist/widgets/index.d.ts +20 -16
- package/dist/widgets/index.js +13 -10
- package/package.json +70 -50
- package/tailwind.preset.js +19 -0
- package/dist/icons/icon_getters.d.ts +0 -6
- package/dist/icons/icon_getters.js +0 -23
|
@@ -13,6 +13,6 @@ export declare class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBo
|
|
|
13
13
|
static getDerivedStateFromError(error: Error): ErrorBoundaryState;
|
|
14
14
|
componentDidCatch(error: Error, errorInfo: React.ErrorInfo): void;
|
|
15
15
|
handleRetry: () => void;
|
|
16
|
-
render(): string | number | bigint | boolean |
|
|
16
|
+
render(): string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | React.JSX.Element | null | undefined;
|
|
17
17
|
}
|
|
18
18
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "nativewind/jsx-runtime";
|
|
2
|
-
import FeedbackError from "
|
|
2
|
+
import FeedbackError from "./Feedback.Error.js";
|
|
3
3
|
import { Component } from "react";
|
|
4
4
|
export class ErrorBoundary extends Component {
|
|
5
5
|
constructor(props) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type VariantProps } from "../theme/tw";
|
|
1
|
+
import { type VariantProps } from "../theme/tw.js";
|
|
2
2
|
import type { ReactNode } from "react";
|
|
3
3
|
declare const banner: import("tailwind-variants").TVReturnType<{
|
|
4
4
|
tone: {
|
|
@@ -46,7 +46,7 @@ declare const banner: import("tailwind-variants").TVReturnType<{
|
|
|
46
46
|
root: string;
|
|
47
47
|
title: string;
|
|
48
48
|
message: string;
|
|
49
|
-
}, import("tailwind-variants").
|
|
49
|
+
}, import("tailwind-variants").TVReturnTypeLike<{
|
|
50
50
|
tone: {
|
|
51
51
|
info: {
|
|
52
52
|
root: string;
|
|
@@ -69,7 +69,7 @@ declare const banner: import("tailwind-variants").TVReturnType<{
|
|
|
69
69
|
root: string;
|
|
70
70
|
title: string;
|
|
71
71
|
message: string;
|
|
72
|
-
}
|
|
72
|
+
}>>;
|
|
73
73
|
export interface BannerProps extends VariantProps<typeof banner> {
|
|
74
74
|
message: string;
|
|
75
75
|
title?: string;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
2
|
-
import Icon from "../Display/Display.Icon";
|
|
3
|
-
import Pressable from "../primitives/Pressable";
|
|
4
|
-
import { theme } from "../theme";
|
|
5
|
-
import { tv } from "../theme/tw";
|
|
6
|
-
import { Typography } from "../Typography";
|
|
2
|
+
import Icon from "../Display/Display.Icon.js";
|
|
3
|
+
import Pressable from "../primitives/Pressable.js";
|
|
4
|
+
import { theme } from "../theme/index.js";
|
|
5
|
+
import { tv } from "../theme/tw.js";
|
|
6
|
+
import { Typography } from "../Typography/index.js";
|
|
7
7
|
import { View } from "react-native";
|
|
8
8
|
const banner = tv({
|
|
9
9
|
slots: {
|
|
@@ -30,6 +30,6 @@ const iconByTone = {
|
|
|
30
30
|
function Banner({ message, title, tone = "info", onClose, action, className, testID, }) {
|
|
31
31
|
const styles = banner({ tone });
|
|
32
32
|
const icon = iconByTone[tone ?? "info"];
|
|
33
|
-
return (_jsxs(View, { className: styles.root({ className }), testID: testID, children: [_jsx(Icon, { color: icon.color, name: icon.name, size: 20 }), _jsxs(View, { className: "flex-1 gap-0.5", children: [title ? _jsx(Typography.Text, { className: styles.title(), children: title }) : null, _jsx(Typography.Text, { className: styles.message(), children: message }), action ? _jsx(View, { className: "mt-2", children: action }) : null] }), onClose ? (_jsx(Pressable, { accessibilityLabel: "Cerrar", hitSlop: 8, onPress: onClose, children: _jsx(Icon, { color: theme.icon.secondary, name: "close", size: 18 }) })) : null] }));
|
|
33
|
+
return (_jsxs(View, { accessibilityLiveRegion: tone === "danger" ? "assertive" : "polite", accessibilityRole: tone === "danger" ? "alert" : undefined, className: styles.root({ className }), testID: testID, children: [_jsx(Icon, { color: icon.color, name: icon.name, size: 20 }), _jsxs(View, { className: "flex-1 gap-0.5", children: [title ? _jsx(Typography.Text, { className: styles.title(), children: title }) : null, _jsx(Typography.Text, { className: styles.message(), children: message }), action ? _jsx(View, { className: "mt-2", children: action }) : null] }), onClose ? (_jsx(Pressable, { accessibilityLabel: "Cerrar", accessibilityRole: "button", hitSlop: 8, onPress: onClose, children: _jsx(Icon, { color: theme.icon.secondary, name: "close", size: 18 }) })) : null] }));
|
|
34
34
|
}
|
|
35
35
|
export default Banner;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
2
|
-
import GradientSurface from "../Display/Display.GradientSurface";
|
|
3
|
-
import Pattern from "../Display/Display.Pattern";
|
|
4
|
-
import {
|
|
2
|
+
import GradientSurface from "../Display/Display.GradientSurface.js";
|
|
3
|
+
import Pattern from "../Display/Display.Pattern.js";
|
|
4
|
+
import { theme } from "../theme/index.js";
|
|
5
|
+
import { Typography } from "../Typography/index.js";
|
|
5
6
|
import { useCallback, useEffect, useState } from "react";
|
|
6
7
|
import { StyleSheet, View } from "react-native";
|
|
7
8
|
import Animated, { Easing, useAnimatedStyle, useSharedValue, withTiming, } from "react-native-reanimated";
|
|
@@ -58,7 +59,7 @@ function DomainSplashScreen({ domainName, isLoading, children, onComplete, minDu
|
|
|
58
59
|
const splashStyle = useAnimatedStyle(() => ({
|
|
59
60
|
opacity: opacityValue.value,
|
|
60
61
|
}));
|
|
61
|
-
return (_jsxs(View, { style: styles.container, children: [children, _jsx(Animated.View, { pointerEvents: isLoading ? "auto" : "none", style: [StyleSheet.absoluteFill, splashStyle], children: _jsxs(GradientSurface, { preset: "
|
|
62
|
+
return (_jsxs(View, { style: styles.container, children: [children, _jsx(Animated.View, { pointerEvents: isLoading ? "auto" : "none", style: [StyleSheet.absoluteFill, splashStyle], children: _jsxs(GradientSurface, { preset: "warm", radius: "none", style: { position: "absolute", top: 0, left: 0, right: 0, bottom: 0 }, children: [_jsx(Pattern, { color: theme.primary, kind: "dots", opacity: 0.14, size: 26 }), _jsx(View, { className: "flex-1 justify-center items-center px-8", children: _jsxs(View, { className: "w-full items-center gap-5", children: [_jsx(Typography.Text, { bold: true, style: { color: "#FFFFFF", fontSize: 24, letterSpacing: 0.5 }, children: isComplete ? "¡Listo!" : `Cargando ${domainName}` }), !isComplete && (_jsx(View, { className: "w-full rounded-full h-1.5 overflow-hidden", style: { backgroundColor: "rgba(255,255,255,0.18)" }, children: _jsx(Animated.View, { className: "rounded-full h-1.5", style: [{ backgroundColor: theme.primary }, progressBarStyle] }) })), isComplete && (_jsxs(Typography.Text, { style: { color: "rgba(255,255,255,0.8)", fontSize: 13 }, children: ["Ya puedes comenzar a usar ", domainName, "."] }))] }) })] }) })] }));
|
|
62
63
|
}
|
|
63
64
|
const styles = StyleSheet.create({
|
|
64
65
|
container: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
2
|
-
import Icon from "../Display/Display.Icon";
|
|
3
|
-
import { cn } from "../theme/tw";
|
|
4
|
-
import { Typography } from "../Typography";
|
|
2
|
+
import Icon from "../Display/Display.Icon.js";
|
|
3
|
+
import { cn } from "../theme/tw.js";
|
|
4
|
+
import { Typography } from "../Typography/index.js";
|
|
5
5
|
import { View } from "react-native";
|
|
6
6
|
function Empty({ handleGoHome, className }) {
|
|
7
7
|
return (_jsxs(View, { className: cn("flex-1 items-center justify-center px-4", className), children: [_jsx(Icon, { name: "sad-cry", size: 80, type: "fontawesome5" }), _jsx(Typography.Text, { className: "pt-4 text-text-primary", semibold: true, variant: "h3", children: "\u00A1Oops!" }), _jsx(Typography.Text, { className: "pt-2 text-center text-base leading-5.5 text-text-secondary", variant: "h5", children: "No se encontraron registros disponibles." })] }));
|
|
@@ -10,6 +10,7 @@ export interface EmptyStateProps {
|
|
|
10
10
|
children?: ReactNode;
|
|
11
11
|
className?: string;
|
|
12
12
|
testID?: string;
|
|
13
|
+
accessibleSizing?: boolean;
|
|
13
14
|
}
|
|
14
|
-
declare function EmptyState({ title, description, icon, image, actionLabel, onAction, children, className, testID, }: EmptyStateProps): import("react").JSX.Element;
|
|
15
|
+
declare function EmptyState({ title, description, icon, image, actionLabel, onAction, children, className, testID, accessibleSizing, }: EmptyStateProps): import("react").JSX.Element;
|
|
15
16
|
export default EmptyState;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
2
|
-
import Icon from "../Display/Display.Icon";
|
|
3
|
-
import { BaseButton } from "../primitives/BaseButton";
|
|
4
|
-
import { theme } from "../theme";
|
|
5
|
-
import { cn } from "../theme/tw";
|
|
6
|
-
import { Typography } from "../Typography";
|
|
2
|
+
import Icon from "../Display/Display.Icon.js";
|
|
3
|
+
import { BaseButton } from "../primitives/BaseButton.js";
|
|
4
|
+
import { theme } from "../theme/index.js";
|
|
5
|
+
import { cn } from "../theme/tw.js";
|
|
6
|
+
import { Typography } from "../Typography/index.js";
|
|
7
7
|
import { Image, View } from "react-native";
|
|
8
|
-
function EmptyState({ title, description, icon = "file-tray-outline", image, actionLabel, onAction, children, className, testID, }) {
|
|
9
|
-
return (_jsxs(View, { className: cn("flex-1 items-center justify-center px-8 gap-3", className), testID: testID, children: [image ? (_jsx(Image, { resizeMode: "contain", source: image, style: { width: 140, height: 140 } })) : (_jsx(View, { className: "w-20 h-20 rounded-full bg-bg-muted items-center justify-center", children: _jsx(Icon, { color: theme.icon.tertiary, name: icon, size: 40 }) })), _jsx(Typography.Text, { align: "center", className: "text-text-primary", semibold: true, variant: "subtitle", children: title }), description ? (_jsx(Typography.Text, { align: "center", className: "text-text-secondary", variant: "body", children: description })) : null, actionLabel && onAction ? (_jsx(View, { className: "mt-2", children: _jsx(BaseButton, { onPress: onAction, title: actionLabel, variant: "primary" }) })) : null, children] }));
|
|
8
|
+
function EmptyState({ title, description, icon = "file-tray-outline", image, actionLabel, onAction, children, className, testID, accessibleSizing = false, }) {
|
|
9
|
+
return (_jsxs(View, { className: cn("flex-1 items-center justify-center px-8 gap-3", className), testID: testID, children: [image ? (_jsx(Image, { resizeMode: "contain", source: image, style: { width: 140, height: 140 } })) : (_jsx(View, { className: "w-20 h-20 rounded-full bg-bg-muted items-center justify-center", children: _jsx(Icon, { color: theme.icon.tertiary, name: icon, size: 40 }) })), _jsx(Typography.Text, { accessibilityRole: "header", align: "center", className: "text-text-primary", semibold: true, variant: "subtitle", children: title }), description ? (_jsx(Typography.Text, { align: "center", className: "text-text-secondary", variant: "body", children: description })) : null, actionLabel && onAction ? (_jsx(View, { className: "mt-2", children: _jsx(BaseButton, { accessibleSizing: accessibleSizing, onPress: onAction, title: actionLabel, variant: "primary" }) })) : null, children] }));
|
|
10
10
|
}
|
|
11
11
|
export default EmptyState;
|
|
@@ -4,6 +4,8 @@ interface ErrorProps {
|
|
|
4
4
|
onBack?: () => void;
|
|
5
5
|
onHome?: () => void;
|
|
6
6
|
className?: string;
|
|
7
|
+
accessibleSizing?: boolean;
|
|
8
|
+
testID?: string;
|
|
7
9
|
}
|
|
8
|
-
declare function Error({ message, onRetry, onBack, onHome, className }: ErrorProps): import("react").JSX.Element;
|
|
10
|
+
declare function Error({ message, onRetry, onBack, onHome, className, accessibleSizing, testID, }: ErrorProps): import("react").JSX.Element;
|
|
9
11
|
export default Error;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
2
|
-
import Icon from "../Display/Display.Icon";
|
|
3
|
-
import Button from "../
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import Icon from "../Display/Display.Icon.js";
|
|
3
|
+
import Button from "../primitives/BaseButton.js";
|
|
4
|
+
import { theme } from "../theme/index.js";
|
|
5
|
+
import { cn } from "../theme/tw.js";
|
|
6
|
+
import { Typography } from "../Typography/index.js";
|
|
6
7
|
import { View } from "react-native";
|
|
7
|
-
function Error({ message, onRetry, onBack, onHome, className }) {
|
|
8
|
-
return (_jsxs(View, { className: cn("flex-1 items-center justify-center px-4", className), children: [_jsx(Icon, { color:
|
|
8
|
+
function Error({ message, onRetry, onBack, onHome, className, accessibleSizing = false, testID, }) {
|
|
9
|
+
return (_jsxs(View, { className: cn("flex-1 items-center justify-center px-4", className), testID: testID, children: [_jsx(Icon, { color: theme.danger, name: "exclamation-circle", size: 80, type: "fontawesome5" }), _jsx(Typography.Text, { accessibilityRole: "header", className: "pt-4 text-text-primary", semibold: true, variant: "h3", children: "\u00A1Error!" }), _jsx(Typography.Text, { accessibilityLiveRegion: "polite", className: "pt-2 text-center text-base leading-5.5 text-text-secondary", variant: "h5", children: message || "Ocurrió un error al cargar la información" }), _jsxs(View, { className: "mt-8 w-full gap-3", children: [onRetry && (_jsx(Button, { accessibleSizing: accessibleSizing, className: "w-full", onPress: onRetry, title: "Reintentar" })), onBack && (_jsx(Button, { accessibleSizing: accessibleSizing, className: "w-full", onPress: onBack, title: "Volver", variant: "secondary" })), onHome && (_jsx(Button, { accessibleSizing: accessibleSizing, className: "w-full", onPress: onHome, title: "Ir al inicio", variant: "outline" }))] })] }));
|
|
9
10
|
}
|
|
10
11
|
export default Error;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "nativewind/jsx-runtime";
|
|
2
|
-
import Spinner from "
|
|
3
|
-
import { cn } from "../theme/tw";
|
|
2
|
+
import Spinner from "./Feedback.Spinner.js";
|
|
3
|
+
import { cn } from "../theme/tw.js";
|
|
4
4
|
import { View } from "react-native";
|
|
5
5
|
function LoadingState({ message = "Cargando…", size = "small", variant = "spinner", style = {}, className, }) {
|
|
6
6
|
return (_jsx(View, { className: cn("flex-1 justify-center items-center", className), style: style, children: _jsx(Spinner, { className: "mb-5", size: size, text: message, variant: variant }) }));
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
2
|
-
import Icon from "../Display/Display.Icon";
|
|
3
|
-
import { BaseButton } from "../primitives/BaseButton";
|
|
4
|
-
import { theme } from "../theme";
|
|
5
|
-
import { cn } from "../theme/tw";
|
|
6
|
-
import { Typography } from "../Typography";
|
|
2
|
+
import Icon from "../Display/Display.Icon.js";
|
|
3
|
+
import { BaseButton } from "../primitives/BaseButton.js";
|
|
4
|
+
import { theme } from "../theme/index.js";
|
|
5
|
+
import { cn } from "../theme/tw.js";
|
|
6
|
+
import { Typography } from "../Typography/index.js";
|
|
7
7
|
import { View } from "react-native";
|
|
8
8
|
function PermissionCard({ title, description, granted = false, icon = "lock-closed", grantedLabel = "Permiso activo", deniedLabel = "Permiso inactivo", actionLabel = "Permitir", loading = false, onRequest, className, testID, }) {
|
|
9
9
|
return (_jsx(View, { className: cn("bg-bg-card rounded-xl p-4 border border-border-light", className), style: theme.shadow.sm, testID: testID, children: _jsxs(View, { className: "flex-row items-start gap-3", children: [_jsx(Icon, { color: granted ? theme.success : theme.danger, name: granted ? "checkmark-circle" : icon, size: 32 }), _jsxs(View, { className: "flex-1 gap-1", children: [_jsx(Typography.Text, { className: "text-text-primary", semibold: true, variant: "body", children: title }), description ? (_jsx(Typography.Text, { className: "text-text-secondary", variant: "bodySmall", children: description })) : null, _jsx(Typography.Text, { style: { color: granted ? theme.success : theme.danger }, variant: "bodySmall", children: granted ? grantedLabel : deniedLabel }), !granted && onRequest ? (_jsx(View, { className: "mt-2 self-start", children: _jsx(BaseButton, { loading: loading, onPress: onRequest, size: "small", title: actionLabel }) })) : null] })] }) }));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "nativewind/jsx-runtime";
|
|
2
|
-
import { cn } from "../theme/tw";
|
|
3
|
-
import { motion } from "../tokens/motion";
|
|
2
|
+
import { cn } from "../theme/tw.js";
|
|
3
|
+
import { motion } from "../tokens/motion.js";
|
|
4
4
|
import { useEffect, useRef } from "react";
|
|
5
5
|
import { Animated, Easing, View } from "react-native";
|
|
6
6
|
function clamp(n) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "nativewind/jsx-runtime";
|
|
2
|
-
import { cn } from "../theme/tw";
|
|
3
|
-
import { motion } from "../tokens/motion";
|
|
2
|
+
import { cn } from "../theme/tw.js";
|
|
3
|
+
import { motion } from "../tokens/motion.js";
|
|
4
4
|
import { useEffect, useRef } from "react";
|
|
5
5
|
import { Animated, Easing } from "react-native";
|
|
6
6
|
function Skeleton({ width = "100%", height = 16, radius = 8, circle = false, className, style, }) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
2
|
-
import { theme } from "../theme";
|
|
3
|
-
import { cn } from "../theme/tw";
|
|
4
|
-
import { Typography } from "../Typography";
|
|
2
|
+
import { theme } from "../theme/index.js";
|
|
3
|
+
import { cn } from "../theme/tw.js";
|
|
4
|
+
import { Typography } from "../Typography/index.js";
|
|
5
5
|
import { useEffect } from "react";
|
|
6
6
|
import { ActivityIndicator, View } from "react-native";
|
|
7
7
|
import Animated, { Easing, useAnimatedStyle, useSharedValue, withDelay, withRepeat, withSequence, withTiming, } from "react-native-reanimated";
|
|
@@ -13,5 +13,5 @@ interface SplashScreenProps {
|
|
|
13
13
|
subtitle?: string;
|
|
14
14
|
children?: ReactNode;
|
|
15
15
|
}
|
|
16
|
-
declare function Splash({ isReady, logo, minDuration, message, variant, title, subtitle, children, }: SplashScreenProps): string | number | bigint | boolean |
|
|
16
|
+
declare function Splash({ isReady, logo, minDuration, message, variant, title, subtitle, children, }: SplashScreenProps): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import("react").JSX.Element | null | undefined;
|
|
17
17
|
export default Splash;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
2
|
-
import GradientSurface from "../Display/Display.GradientSurface";
|
|
3
|
-
import Pattern from "../Display/Display.Pattern";
|
|
4
|
-
import Loading from "
|
|
5
|
-
import GradientContainer from "../layouts/GradientContainer";
|
|
6
|
-
import {
|
|
2
|
+
import GradientSurface from "../Display/Display.GradientSurface.js";
|
|
3
|
+
import Pattern from "../Display/Display.Pattern.js";
|
|
4
|
+
import Loading from "./Feedback.Loading.js";
|
|
5
|
+
import GradientContainer from "../layouts/GradientContainer.js";
|
|
6
|
+
import { theme } from "../theme/index.js";
|
|
7
|
+
import { Typography } from "../Typography/index.js";
|
|
7
8
|
import { useEffect, useRef, useState } from "react";
|
|
8
9
|
import { ActivityIndicator, Image, View } from "react-native";
|
|
9
10
|
function renderLogo(logo) {
|
|
@@ -13,7 +14,7 @@ function renderLogo(logo) {
|
|
|
13
14
|
return _jsx(Image, { className: "w-[250px] h-[200px] mb-12", resizeMode: "contain", source: logo });
|
|
14
15
|
}
|
|
15
16
|
function HeroSplash({ logo, message, title, subtitle, }) {
|
|
16
|
-
return (_jsxs(GradientSurface, { className: "flex-1 items-center justify-center", preset: "
|
|
17
|
+
return (_jsxs(GradientSurface, { className: "flex-1 items-center justify-center", preset: "warm", radius: "none", children: [_jsx(Pattern, { color: theme.primary, kind: "dots", opacity: 0.16, size: 26 }), _jsxs(View, { className: "items-center", children: [logo ? (_jsx(Image, { className: "w-28 h-28 mb-7", resizeMode: "contain", source: logo, style: { shadowColor: theme.primary, shadowOpacity: 0.7, shadowRadius: 28 } })) : null, title ? (_jsx(Typography.Text, { bold: true, style: { color: "#FFFFFF", fontSize: 28, letterSpacing: 1 }, children: title })) : null, subtitle ? (_jsx(Typography.Text, { style: { color: "rgba(255,255,255,0.6)", fontSize: 13, marginTop: 6 }, children: subtitle })) : null, _jsx(View, { className: "mt-10", children: _jsx(ActivityIndicator, { accessibilityLabel: message, color: theme.primary, size: "small" }) })] })] }));
|
|
17
18
|
}
|
|
18
19
|
function Splash({ isReady, logo, minDuration = 800, message = "Inicializando...", variant = "default", title, subtitle, children, }) {
|
|
19
20
|
const [showContent, setShowContent] = useState(false);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
2
|
-
import Icon from "../Display/Display.Icon";
|
|
3
|
-
import Pressable from "../primitives/Pressable";
|
|
4
|
-
import { theme } from "../theme";
|
|
5
|
-
import { tv } from "../theme/tw";
|
|
6
|
-
import { Typography } from "../Typography";
|
|
2
|
+
import Icon from "../Display/Display.Icon.js";
|
|
3
|
+
import Pressable from "../primitives/Pressable.js";
|
|
4
|
+
import { theme } from "../theme/index.js";
|
|
5
|
+
import { tv } from "../theme/tw.js";
|
|
6
|
+
import { Typography } from "../Typography/index.js";
|
|
7
7
|
import { createContext, useCallback, useContext, useMemo, useRef, useState, } from "react";
|
|
8
8
|
import { ActivityIndicator, View } from "react-native";
|
|
9
9
|
import Animated, { FadeInDown, FadeInUp, FadeOutDown, FadeOutUp, } from "react-native-reanimated";
|
|
@@ -32,10 +32,10 @@ function ToastItem({ entry, onHide, position, }) {
|
|
|
32
32
|
const exiting = position === "top" ? FadeOutUp : FadeOutDown;
|
|
33
33
|
const resolvedDuration = entry.duration ?? (variant === "loading" ? 0 : DEFAULT_DURATION);
|
|
34
34
|
const showClose = entry.dismissible ?? resolvedDuration === 0;
|
|
35
|
-
return (_jsxs(Animated.View, { accessibilityLiveRegion: "polite", accessible: true, className: styles.root(), entering: entering.duration(220), exiting: exiting.duration(180), children: [variant === "loading" ? (_jsx(ActivityIndicator, { color: theme.
|
|
35
|
+
return (_jsxs(Animated.View, { accessibilityLiveRegion: "polite", accessible: true, className: styles.root(), entering: entering.duration(220), exiting: exiting.duration(180), children: [variant === "loading" ? (_jsx(ActivityIndicator, { color: theme.text.accent, size: "small" })) : (_jsx(Icon, { color: iconByVariant[variant].color, name: iconByVariant[variant].name, size: 22 })), _jsxs(View, { className: "flex-1", children: [entry.title ? (_jsx(Typography.Text, { className: styles.title(), children: entry.title })) : null, _jsx(Typography.Text, { className: styles.message(), children: entry.message })] }), entry.action ? (_jsx(Pressable, { accessibilityLabel: entry.action.label, onPress: () => {
|
|
36
36
|
entry.action?.onPress();
|
|
37
37
|
onHide(entry.id);
|
|
38
|
-
}, children: _jsx(Typography.Text, { className: "text-
|
|
38
|
+
}, children: _jsx(Typography.Text, { className: "text-text-accent text-sm font-semibold", children: entry.action.label }) })) : null, showClose ? (_jsx(Pressable, { accessibilityLabel: "Cerrar", hitSlop: 8, onPress: () => onHide(entry.id), children: _jsx(Icon, { color: theme.text.tertiary, name: "close", size: 18 }) })) : null] }));
|
|
39
39
|
}
|
|
40
40
|
export function ToastProvider({ children, position = "bottom", }) {
|
|
41
41
|
const insets = useSafeAreaInsets();
|
package/dist/Feedback/index.d.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import Banner from "
|
|
2
|
-
import Empty from "
|
|
3
|
-
import EmptyState from "
|
|
4
|
-
import Error from "
|
|
5
|
-
import Loading from "
|
|
6
|
-
import PermissionCard from "
|
|
7
|
-
import Progress from "
|
|
8
|
-
import ProgressCircle from "
|
|
9
|
-
import Skeleton from "
|
|
10
|
-
import SplashScreen from "
|
|
11
|
-
export { ErrorBoundary } from "
|
|
12
|
-
export { type ToastAction, type ToastContextValue, type ToastOptions, type ToastPromiseMessages, ToastProvider, type ToastVariant, useToast, } from "
|
|
1
|
+
import Banner from "./Feedback.Banner.js";
|
|
2
|
+
import Empty from "./Feedback.Empty.js";
|
|
3
|
+
import EmptyState from "./Feedback.EmptyState.js";
|
|
4
|
+
import Error from "./Feedback.Error.js";
|
|
5
|
+
import Loading from "./Feedback.Loading.js";
|
|
6
|
+
import PermissionCard from "./Feedback.PermissionCard.js";
|
|
7
|
+
import Progress from "./Feedback.Progress.js";
|
|
8
|
+
import ProgressCircle from "./Feedback.ProgressCircle.js";
|
|
9
|
+
import Skeleton from "./Feedback.Skeleton.js";
|
|
10
|
+
import SplashScreen from "./Feedback.Splash.js";
|
|
11
|
+
export { ErrorBoundary } from "./ErrorBoundary.js";
|
|
12
|
+
export { type ToastAction, type ToastContextValue, type ToastOptions, type ToastPromiseMessages, ToastProvider, type ToastVariant, useToast, } from "./Toast.context.js";
|
|
13
13
|
export declare const Feedback: {
|
|
14
14
|
Loading: typeof Loading;
|
|
15
|
-
Spinner: import("react").FC<import("
|
|
15
|
+
Spinner: import("react").FC<import("./Feedback.Spinner.js").SpinnerProps>;
|
|
16
16
|
Skeleton: typeof Skeleton;
|
|
17
17
|
Progress: typeof Progress;
|
|
18
18
|
ProgressCircle: typeof ProgressCircle;
|
package/dist/Feedback/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import Banner from "
|
|
2
|
-
import Empty from "
|
|
3
|
-
import EmptyState from "
|
|
4
|
-
import Error from "
|
|
5
|
-
import Loading from "
|
|
6
|
-
import PermissionCard from "
|
|
7
|
-
import Progress from "
|
|
8
|
-
import ProgressCircle from "
|
|
9
|
-
import Skeleton from "
|
|
10
|
-
import Spinner from "
|
|
11
|
-
import SplashScreen from "
|
|
12
|
-
export { ErrorBoundary } from "
|
|
13
|
-
export { ToastProvider, useToast, } from "
|
|
1
|
+
import Banner from "./Feedback.Banner.js";
|
|
2
|
+
import Empty from "./Feedback.Empty.js";
|
|
3
|
+
import EmptyState from "./Feedback.EmptyState.js";
|
|
4
|
+
import Error from "./Feedback.Error.js";
|
|
5
|
+
import Loading from "./Feedback.Loading.js";
|
|
6
|
+
import PermissionCard from "./Feedback.PermissionCard.js";
|
|
7
|
+
import Progress from "./Feedback.Progress.js";
|
|
8
|
+
import ProgressCircle from "./Feedback.ProgressCircle.js";
|
|
9
|
+
import Skeleton from "./Feedback.Skeleton.js";
|
|
10
|
+
import Spinner from "./Feedback.Spinner.js";
|
|
11
|
+
import SplashScreen from "./Feedback.Splash.js";
|
|
12
|
+
export { ErrorBoundary } from "./ErrorBoundary.js";
|
|
13
|
+
export { ToastProvider, useToast, } from "./Toast.context.js";
|
|
14
14
|
export const Feedback = {
|
|
15
15
|
Loading,
|
|
16
16
|
Spinner,
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/** @deprecated Use `Actions.Button` from `@sincpro/mobile-ui/Actions` instead. */
|
|
2
|
-
export type { ButtonIconProps, ButtonProps } from "../Actions/Actions.Button";
|
|
3
|
-
export { default as ButtonWithIcon, default, } from "../Actions/Actions.Button";
|
|
2
|
+
export type { ButtonIconProps, ButtonProps } from "../Actions/Actions.Button.js";
|
|
3
|
+
export { default as ButtonWithIcon, default, } from "../Actions/Actions.Button.js";
|
package/dist/Form/Form.Button.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as ButtonWithIcon, default, } from "../Actions/Actions.Button";
|
|
1
|
+
export { default as ButtonWithIcon, default, } from "../Actions/Actions.Button.js";
|
|
@@ -7,7 +7,10 @@ interface RowCheckBoxProps {
|
|
|
7
7
|
isChecked?: boolean;
|
|
8
8
|
onCheck?: (isChecked: boolean) => void;
|
|
9
9
|
disabled?: boolean;
|
|
10
|
+
accessibilityLabel?: string;
|
|
11
|
+
accessibleSizing?: boolean;
|
|
10
12
|
className?: string;
|
|
13
|
+
testID?: string;
|
|
11
14
|
}
|
|
12
|
-
declare function RowCheckBox({ mainText, subText, rightText, rightComponent, leftComponent, isChecked, onCheck, disabled, className, }: RowCheckBoxProps): import("react").JSX.Element;
|
|
15
|
+
declare function RowCheckBox({ mainText, subText, rightText, rightComponent, leftComponent, isChecked, onCheck, disabled, accessibilityLabel, accessibleSizing, className, testID, }: RowCheckBoxProps): import("react").JSX.Element;
|
|
13
16
|
export default RowCheckBox;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
2
|
-
import { theme } from "../theme";
|
|
3
|
-
import { cn } from "../theme/tw";
|
|
4
|
-
import { Typography } from "../Typography";
|
|
2
|
+
import { theme } from "../theme/index.js";
|
|
3
|
+
import { cn } from "../theme/tw.js";
|
|
4
|
+
import { Typography } from "../Typography/index.js";
|
|
5
5
|
import { Checkbox } from "expo-checkbox";
|
|
6
6
|
import { Pressable, View } from "react-native";
|
|
7
|
-
function RowCheckBox({ mainText, subText, rightText, rightComponent, leftComponent, isChecked = false, onCheck = () => { }, disabled = false, className, }) {
|
|
7
|
+
function RowCheckBox({ mainText, subText, rightText, rightComponent, leftComponent, isChecked = false, onCheck = () => { }, disabled = false, accessibilityLabel, accessibleSizing = false, className, testID, }) {
|
|
8
8
|
const handlePress = () => {
|
|
9
9
|
if (!disabled) {
|
|
10
10
|
onCheck(!isChecked);
|
|
@@ -25,6 +25,6 @@ function RowCheckBox({ mainText, subText, rightText, rightComponent, leftCompone
|
|
|
25
25
|
}
|
|
26
26
|
return null;
|
|
27
27
|
};
|
|
28
|
-
return (_jsxs(Pressable, { className: cn("flex-row justify-between items-center", disabled && "opacity-50", className), disabled: disabled, onPress: handlePress, children: [_jsx(View, { children: renderLeftComponent() }), _jsxs(View, { className: "flex-row items-center", children: [renderRightComponent(), _jsx(Checkbox, { className: "ml-2", color: theme.
|
|
28
|
+
return (_jsxs(Pressable, { accessibilityLabel: accessibilityLabel ?? [mainText, subText, rightText].filter(Boolean).join(", "), accessibilityRole: "checkbox", accessibilityState: { checked: isChecked, disabled }, className: cn("flex-row justify-between items-center", disabled && "opacity-50", className), disabled: disabled, onPress: handlePress, style: accessibleSizing ? { minHeight: 48, paddingVertical: 8 } : undefined, testID: testID, children: [_jsx(View, { children: renderLeftComponent() }), _jsxs(View, { className: "flex-row items-center", children: [renderRightComponent(), _jsx(Checkbox, { className: "ml-2", color: theme.primary, disabled: disabled, pointerEvents: "none", value: isChecked })] })] }));
|
|
29
29
|
}
|
|
30
30
|
export default RowCheckBox;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "nativewind/jsx-runtime";
|
|
2
|
-
import Checkbox from "
|
|
2
|
+
import Checkbox from "./Form.Checkbox.js";
|
|
3
3
|
import { Controller } from "react-hook-form";
|
|
4
4
|
function ControlledCheckbox({ control, name, label, subText, }) {
|
|
5
5
|
return (_jsx(Controller, { control: control, name: name, render: ({ field: { onChange, value } }) => (_jsx(Checkbox, { isChecked: value || false, mainText: label, onCheck: onChange, subText: subText })) }));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "nativewind/jsx-runtime";
|
|
2
|
-
import Input from "
|
|
2
|
+
import Input from "./Form.Input.js";
|
|
3
3
|
import { Controller } from "react-hook-form";
|
|
4
4
|
function ControlledInput({ control, name, label, placeholder, keyboardType, autoCapitalize, multiline, numberOfLines, rules, error, }) {
|
|
5
5
|
return (_jsx(Controller, { control: control, name: name, render: ({ field: { onChange, onBlur, value } }) => (_jsx(Input, { autoCapitalize: autoCapitalize, error: error, keyboardType: keyboardType, label: label, multiline: multiline, numberOfLines: numberOfLines, onBlur: onBlur, onChangeText: onChange, placeholder: placeholder, value: value })), rules: rules }));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "nativewind/jsx-runtime";
|
|
2
|
-
import MonetaryInput from "
|
|
2
|
+
import MonetaryInput from "./Form.MonetaryInput.js";
|
|
3
3
|
import { Controller } from "react-hook-form";
|
|
4
4
|
function ControlledMonetaryInput({ control, name, label, placeholder, currency = "CRC", rules, error, }) {
|
|
5
5
|
return (_jsx(Controller, { control: control, name: name, render: ({ field: { onChange, onBlur, value } }) => (_jsx(MonetaryInput, { amount: value, currencySymbol: currency, onChange: onChange, placeholder: placeholder })), rules: rules }));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "nativewind/jsx-runtime";
|
|
2
|
-
import RadioButton from "
|
|
2
|
+
import RadioButton from "./Form.RadioButton.js";
|
|
3
3
|
import { Controller } from "react-hook-form";
|
|
4
4
|
function ControlledRadioButton({ control, name, label, value, }) {
|
|
5
5
|
return (_jsx(Controller, { control: control, name: name, render: ({ field: { onChange, value: selectedValue } }) => (_jsx(RadioButton, { label: label, onPress: () => onChange(value), selected: selectedValue === value })) }));
|
|
@@ -8,6 +8,7 @@ export interface DatePickerProps {
|
|
|
8
8
|
minimumDate?: Date;
|
|
9
9
|
maximumDate?: Date;
|
|
10
10
|
disabled?: boolean;
|
|
11
|
+
accessibleSizing?: boolean;
|
|
11
12
|
className?: string;
|
|
12
13
|
testID?: string;
|
|
13
14
|
}
|
|
@@ -16,5 +17,5 @@ export interface DatePickerProps {
|
|
|
16
17
|
* (`@react-native-community/datetimepicker`) — a case where native wins (expected UX).
|
|
17
18
|
* Subpath `Form/DatePicker`; **optional** peer dep.
|
|
18
19
|
*/
|
|
19
|
-
declare function DatePicker({ value, onChange, mode, label, placeholder, format, minimumDate, maximumDate, disabled, className, testID, }: DatePickerProps): import("react").JSX.Element;
|
|
20
|
+
declare function DatePicker({ value, onChange, mode, label, placeholder, format, minimumDate, maximumDate, disabled, accessibleSizing, className, testID, }: DatePickerProps): import("react").JSX.Element;
|
|
20
21
|
export default DatePicker;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
2
2
|
import DateTimePicker from "@react-native-community/datetimepicker";
|
|
3
|
-
import Icon from "../Display/Display.Icon";
|
|
4
|
-
import Pressable from "../primitives/Pressable";
|
|
5
|
-
import {
|
|
6
|
-
import { cn } from "../theme/tw";
|
|
7
|
-
import { Typography } from "../Typography";
|
|
3
|
+
import Icon from "../Display/Display.Icon.js";
|
|
4
|
+
import Pressable from "../primitives/Pressable.js";
|
|
5
|
+
import { useTheme } from "../theme/index.js";
|
|
6
|
+
import { cn } from "../theme/tw.js";
|
|
7
|
+
import { Typography } from "../Typography/index.js";
|
|
8
8
|
import { useState } from "react";
|
|
9
9
|
import { Platform, View } from "react-native";
|
|
10
10
|
function defaultFormat(value, mode) {
|
|
@@ -24,8 +24,9 @@ const iconByMode = {
|
|
|
24
24
|
* (`@react-native-community/datetimepicker`) — a case where native wins (expected UX).
|
|
25
25
|
* Subpath `Form/DatePicker`; **optional** peer dep.
|
|
26
26
|
*/
|
|
27
|
-
function DatePicker({ value, onChange, mode = "date", label, placeholder = "Seleccionar…", format, minimumDate, maximumDate, disabled = false, className, testID, }) {
|
|
27
|
+
function DatePicker({ value, onChange, mode = "date", label, placeholder = "Seleccionar…", format, minimumDate, maximumDate, disabled = false, accessibleSizing = false, className, testID, }) {
|
|
28
28
|
const [open, setOpen] = useState(false);
|
|
29
|
+
const theme = useTheme();
|
|
29
30
|
const fmt = format ?? ((d) => defaultFormat(d, mode));
|
|
30
31
|
const handleValueChange = (_event, date) => {
|
|
31
32
|
if (Platform.OS === "android")
|
|
@@ -33,6 +34,6 @@ function DatePicker({ value, onChange, mode = "date", label, placeholder = "Sele
|
|
|
33
34
|
if (date)
|
|
34
35
|
onChange(date);
|
|
35
36
|
};
|
|
36
|
-
return (_jsxs(View, { className: cn("gap-1", className), testID: testID, children: [label ? (_jsx(Typography.Text, { className: "font-medium text-text-primary", variant: "bodySmall", children: label })) : null, _jsxs(Pressable, { accessibilityHint: "Abre el selector de fecha", accessibilityLabel: label ?? placeholder, accessibilityRole: "button", accessibilityState: { disabled }, className: "flex-row items-center justify-between rounded-lg border border-input bg-bg-card px-3 min-h-[44px]", disabled: disabled, onPress: () => setOpen(true), children: [_jsx(Typography.Text, { className: cn("flex-1 text-sm", value ? "text-text-primary" : "text-text-tertiary"), children: value ? fmt(value) : placeholder }), _jsx(Icon, { color: theme.icon.secondary, name: iconByMode[mode], size: 18 })] }), open ? (_jsx(DateTimePicker, { maximumDate: maximumDate, minimumDate: minimumDate, mode: mode === "datetime" ? "date" : mode, onDismiss: () => setOpen(false), onValueChange: handleValueChange, value: value ?? new Date() })) : null] }));
|
|
37
|
+
return (_jsxs(View, { className: cn("gap-1", className), testID: testID, children: [label ? (_jsx(Typography.Text, { className: "font-medium text-text-primary", variant: "bodySmall", children: label })) : null, _jsxs(Pressable, { accessibilityHint: "Abre el selector de fecha", accessibilityLabel: label ?? placeholder, accessibilityRole: "button", accessibilityState: { disabled }, accessibilityValue: { text: value ? fmt(value) : placeholder }, className: "flex-row items-center justify-between rounded-lg border border-input bg-bg-card px-3 min-h-[44px]", disabled: disabled, onPress: () => setOpen(true), style: accessibleSizing ? { minHeight: 48 } : undefined, children: [_jsx(Typography.Text, { className: cn("flex-1 text-sm", value ? "text-text-primary" : "text-text-tertiary"), children: value ? fmt(value) : placeholder }), _jsx(Icon, { color: theme.icon.secondary, name: iconByMode[mode], size: 18 })] }), open ? (_jsx(DateTimePicker, { maximumDate: maximumDate, minimumDate: minimumDate, mode: mode === "datetime" ? "date" : mode, onDismiss: () => setOpen(false), onValueChange: handleValueChange, value: value ?? new Date() })) : null] }));
|
|
37
38
|
}
|
|
38
39
|
export default DatePicker;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "nativewind/jsx-runtime";
|
|
2
|
-
import { Display } from "../Display";
|
|
3
|
-
import { theme } from "../theme";
|
|
4
|
-
import { Typography } from "../Typography";
|
|
2
|
+
import { Display } from "../Display/index.js";
|
|
3
|
+
import { theme } from "../theme/index.js";
|
|
4
|
+
import { Typography } from "../Typography/index.js";
|
|
5
5
|
import { useState } from "react";
|
|
6
6
|
import { Modal, TouchableOpacity, TouchableWithoutFeedback, View } from "react-native";
|
|
7
7
|
import { tv } from "tailwind-variants";
|
|
@@ -63,13 +63,13 @@ function DropdownButton({ title, options, variant = "secondary", size = "small",
|
|
|
63
63
|
const styles = dropdown({ variant, size });
|
|
64
64
|
const textColorClass = {
|
|
65
65
|
primary: "text-text-on-primary",
|
|
66
|
-
outline: "text-
|
|
67
|
-
secondary: "text-
|
|
66
|
+
outline: "text-text-accent",
|
|
67
|
+
secondary: "text-text-accent",
|
|
68
68
|
}[variant];
|
|
69
69
|
const iconColor = {
|
|
70
70
|
primary: theme.text.onPrimary,
|
|
71
|
-
outline: theme.
|
|
72
|
-
secondary: theme.
|
|
71
|
+
outline: theme.text.accent,
|
|
72
|
+
secondary: theme.text.accent,
|
|
73
73
|
}[variant];
|
|
74
74
|
const textVariant = {
|
|
75
75
|
large: "body",
|
package/dist/Form/Form.FAB.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/** @deprecated Use `Actions.FAB` from `@sincpro/mobile-ui/Actions` instead. */
|
|
2
|
-
export type { FABProps } from "../Actions/Actions.FAB";
|
|
3
|
-
export { default } from "../Actions/Actions.FAB";
|
|
2
|
+
export type { FABProps } from "../Actions/Actions.FAB.js";
|
|
3
|
+
export { default } from "../Actions/Actions.FAB.js";
|
package/dist/Form/Form.FAB.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from "../Actions/Actions.FAB";
|
|
1
|
+
export { default } from "../Actions/Actions.FAB.js";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/** @deprecated Use `Actions.FilterButton` from `@sincpro/mobile-ui/Actions` instead. */
|
|
2
|
-
export type { FilterButtonProps } from "../Actions/Actions.FilterButton";
|
|
3
|
-
export { FilterButton, FilterButtonGroup, } from "../Actions/Actions.FilterButton";
|
|
2
|
+
export type { FilterButtonGroupProps, FilterButtonProps, } from "../Actions/Actions.FilterButton.js";
|
|
3
|
+
export { FilterButton, FilterButtonGroup, } from "../Actions/Actions.FilterButton.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { FilterButton, FilterButtonGroup, } from "../Actions/Actions.FilterButton";
|
|
1
|
+
export { FilterButton, FilterButtonGroup, } from "../Actions/Actions.FilterButton.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
|
|
2
|
-
import { Dialog } from "../Dialog";
|
|
3
|
-
import { Display } from "../Display";
|
|
4
|
-
import { Typography } from "../Typography";
|
|
5
|
-
import { normalizeQuantity, roundTo } from "../utils/quantity";
|
|
2
|
+
import { Dialog } from "../Dialog/index.js";
|
|
3
|
+
import { Display } from "../Display/index.js";
|
|
4
|
+
import { Typography } from "../Typography/index.js";
|
|
5
|
+
import { normalizeQuantity, roundTo } from "../utils/quantity.js";
|
|
6
6
|
import { useCallback, useMemo, useState } from "react";
|
|
7
7
|
import { TouchableOpacity, View } from "react-native";
|
|
8
8
|
import { tv } from "tailwind-variants";
|