@sincpro/mobile-ui 0.1.2 → 0.1.3
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/lib/Dialog/BottomSheet/BottomSheet.Root.d.ts +320 -0
- package/lib/Dialog/BottomSheet/BottomSheet.Root.js +380 -0
- package/lib/Dialog/BottomSheet/index.d.ts +1 -0
- package/lib/Dialog/BottomSheet/index.js +1 -0
- package/lib/Dialog/Confirmation.context.d.ts +21 -0
- package/lib/Dialog/Confirmation.context.js +67 -0
- package/lib/Dialog/Dialog.Confirmation.d.ts +12 -0
- package/lib/Dialog/Dialog.Confirmation.js +9 -0
- package/lib/Dialog/Dialog.EditValue.d.ts +25 -0
- package/lib/Dialog/Dialog.EditValue.js +16 -0
- package/lib/Dialog/index.d.ts +19 -0
- package/lib/Dialog/index.js +11 -0
- package/lib/Display/Display.Avatar.d.ts +52 -0
- package/lib/Display/Display.Avatar.js +40 -0
- package/lib/Display/Display.Badge.d.ts +108 -0
- package/lib/Display/Display.Badge.js +54 -0
- package/lib/Display/Display.CopyableText.d.ts +13 -0
- package/lib/Display/Display.CopyableText.js +14 -0
- package/lib/Display/Display.CountRecords.d.ts +8 -0
- package/lib/Display/Display.CountRecords.js +8 -0
- package/lib/Display/Display.Date.d.ts +18 -0
- package/lib/Display/Display.Date.js +14 -0
- package/lib/Display/Display.Divider.d.ts +44 -0
- package/lib/Display/Display.Divider.js +27 -0
- package/lib/Display/Display.Icon.d.ts +15 -0
- package/lib/Display/Display.Icon.js +35 -0
- package/lib/Display/Display.Logo.d.ts +55 -0
- package/lib/Display/Display.Logo.js +36 -0
- package/lib/Display/Display.MenuButton.d.ts +103 -0
- package/lib/Display/Display.MenuButton.js +50 -0
- package/lib/Display/Display.Monetary.d.ts +19 -0
- package/lib/Display/Display.Monetary.js +9 -0
- package/lib/Display/index.d.ts +22 -0
- package/lib/Display/index.js +25 -0
- package/lib/Feedback/ErrorBoundary.d.ts +18 -0
- package/lib/Feedback/ErrorBoundary.js +28 -0
- package/lib/Feedback/Feedback.DomainSplashScreen.d.ts +10 -0
- package/lib/Feedback/Feedback.DomainSplashScreen.js +67 -0
- package/lib/Feedback/Feedback.Empty.d.ts +6 -0
- package/lib/Feedback/Feedback.Empty.js +9 -0
- package/lib/Feedback/Feedback.Error.d.ts +9 -0
- package/lib/Feedback/Feedback.Error.js +10 -0
- package/lib/Feedback/Feedback.Loading.d.ts +8 -0
- package/lib/Feedback/Feedback.Loading.js +8 -0
- package/lib/Feedback/Feedback.Spinner.d.ts +11 -0
- package/lib/Feedback/Feedback.Spinner.js +8 -0
- package/lib/Feedback/Feedback.Splash.d.ts +11 -0
- package/lib/Feedback/Feedback.Splash.js +37 -0
- package/lib/Feedback/index.d.ts +13 -0
- package/lib/Feedback/index.js +14 -0
- package/lib/Form/Form.Button.d.ts +145 -0
- package/lib/Form/Form.Button.js +272 -0
- package/lib/Form/Form.Checkbox.d.ts +13 -0
- package/lib/Form/Form.Checkbox.js +30 -0
- package/lib/Form/Form.ControlledCheckbox.d.ts +9 -0
- package/lib/Form/Form.ControlledCheckbox.js +7 -0
- package/lib/Form/Form.ControlledDropdown.d.ts +14 -0
- package/lib/Form/Form.ControlledDropdown.js +4 -0
- package/lib/Form/Form.ControlledInput.d.ts +15 -0
- package/lib/Form/Form.ControlledInput.js +7 -0
- package/lib/Form/Form.ControlledMonetaryInput.d.ts +12 -0
- package/lib/Form/Form.ControlledMonetaryInput.js +7 -0
- package/lib/Form/Form.ControlledRadioButton.d.ts +9 -0
- package/lib/Form/Form.ControlledRadioButton.js +7 -0
- package/lib/Form/Form.Dropdown.d.ts +14 -0
- package/lib/Form/Form.Dropdown.js +85 -0
- package/lib/Form/Form.FilterButton.d.ts +12 -0
- package/lib/Form/Form.FilterButton.js +34 -0
- package/lib/Form/Form.FractionalQuantityInput.d.ts +13 -0
- package/lib/Form/Form.FractionalQuantityInput.js +118 -0
- package/lib/Form/Form.IconButton.d.ts +67 -0
- package/lib/Form/Form.IconButton.js +64 -0
- package/lib/Form/Form.Input.d.ts +9 -0
- package/lib/Form/Form.Input.js +38 -0
- package/lib/Form/Form.InputField.d.ts +10 -0
- package/lib/Form/Form.InputField.js +38 -0
- package/lib/Form/Form.MonetaryInput.d.ts +8 -0
- package/lib/Form/Form.MonetaryInput.js +27 -0
- package/lib/Form/Form.PasswordInput.d.ts +9 -0
- package/lib/Form/Form.PasswordInput.js +15 -0
- package/lib/Form/Form.QuantitySelector.d.ts +10 -0
- package/lib/Form/Form.QuantitySelector.js +36 -0
- package/lib/Form/Form.RadioButton.d.ts +7 -0
- package/lib/Form/Form.RadioButton.js +31 -0
- package/lib/Form/Form.SearchBar.d.ts +8 -0
- package/lib/Form/Form.SearchBar.js +22 -0
- package/lib/Form/Form.TextInput.d.ts +8 -0
- package/lib/Form/Form.TextInput.js +8 -0
- package/lib/Form/index.d.ts +41 -0
- package/lib/Form/index.js +42 -0
- package/lib/Navigation/Navigation.Header.d.ts +10 -0
- package/lib/Navigation/Navigation.Header.js +12 -0
- package/lib/Navigation/Navigation.HeaderToolbar.d.ts +15 -0
- package/lib/Navigation/Navigation.HeaderToolbar.js +18 -0
- package/lib/Navigation/Navigation.RowItem.d.ts +5 -0
- package/lib/Navigation/Navigation.RowItem.js +11 -0
- package/lib/Navigation/Navigation.TabIcon.d.ts +14 -0
- package/lib/Navigation/Navigation.TabIcon.js +9 -0
- package/lib/Navigation/Navigation.TabItem.d.ts +14 -0
- package/lib/Navigation/Navigation.TabItem.js +8 -0
- package/lib/Navigation/index.d.ts +11 -0
- package/lib/Navigation/index.js +13 -0
- package/lib/Typography/Typography.Heading.d.ts +12 -0
- package/lib/Typography/Typography.Heading.js +6 -0
- package/lib/Typography/Typography.Text.d.ts +27 -0
- package/lib/Typography/Typography.Text.js +21 -0
- package/lib/Typography/index.d.ts +7 -0
- package/lib/Typography/index.js +8 -0
- package/lib/icons/AddItemIcon.d.ts +4 -0
- package/lib/icons/AddItemIcon.js +4 -0
- package/lib/icons/ArrangeCircle.d.ts +4 -0
- package/lib/icons/ArrangeCircle.js +4 -0
- package/lib/icons/ArrowDownIcon.d.ts +3 -0
- package/lib/icons/ArrowDownIcon.js +6 -0
- package/lib/icons/ArrowUpIcon.d.ts +3 -0
- package/lib/icons/ArrowUpIcon.js +6 -0
- package/lib/icons/BoxIcon.d.ts +4 -0
- package/lib/icons/BoxIcon.js +4 -0
- package/lib/icons/BoxTimeIcon.d.ts +4 -0
- package/lib/icons/BoxTimeIcon.js +4 -0
- package/lib/icons/CalendarIcon.d.ts +4 -0
- package/lib/icons/CalendarIcon.js +4 -0
- package/lib/icons/CardIcon.d.ts +4 -0
- package/lib/icons/CardIcon.js +4 -0
- package/lib/icons/CashierIcon.d.ts +4 -0
- package/lib/icons/CashierIcon.js +4 -0
- package/lib/icons/CreditIcon.d.ts +7 -0
- package/lib/icons/CreditIcon.js +6 -0
- package/lib/icons/DuoIcon.d.ts +4 -0
- package/lib/icons/DuoIcon.js +4 -0
- package/lib/icons/HomeIcon.d.ts +4 -0
- package/lib/icons/HomeIcon.js +4 -0
- package/lib/icons/HomeIconOutlined.d.ts +4 -0
- package/lib/icons/HomeIconOutlined.js +4 -0
- package/lib/icons/LogoIcon.d.ts +4 -0
- package/lib/icons/LogoIcon.js +4 -0
- package/lib/icons/MoneyReceiveIcon.d.ts +4 -0
- package/lib/icons/MoneyReceiveIcon.js +4 -0
- package/lib/icons/OdooIcon.d.ts +6 -0
- package/lib/icons/OdooIcon.js +6 -0
- package/lib/icons/PinIcon.d.ts +4 -0
- package/lib/icons/PinIcon.js +4 -0
- package/lib/icons/PrinterIcon.d.ts +4 -0
- package/lib/icons/PrinterIcon.js +4 -0
- package/lib/icons/ProfileIcon.d.ts +4 -0
- package/lib/icons/ProfileIcon.js +4 -0
- package/lib/icons/SettingsIcon.d.ts +4 -0
- package/lib/icons/SettingsIcon.js +4 -0
- package/lib/icons/SinpeIcon.d.ts +4 -0
- package/lib/icons/SinpeIcon.js +4 -0
- package/lib/icons/ToggleOffIcon.d.ts +4 -0
- package/lib/icons/ToggleOffIcon.js +4 -0
- package/lib/icons/WalletMoneyIcon.d.ts +4 -0
- package/lib/icons/WalletMoneyIcon.js +4 -0
- package/lib/icons/icon_getters.d.ts +6 -0
- package/lib/icons/icon_getters.js +23 -0
- package/lib/icons/props.d.ts +4 -0
- package/lib/icons/props.js +1 -0
- package/lib/index.d.ts +20 -0
- package/lib/index.js +26 -0
- package/lib/layouts/AuthContainer.d.ts +9 -0
- package/lib/layouts/AuthContainer.js +13 -0
- package/lib/layouts/Container.d.ts +14 -0
- package/lib/layouts/Container.js +9 -0
- package/lib/layouts/GradientContainer.d.ts +8 -0
- package/lib/layouts/GradientContainer.js +8 -0
- package/lib/layouts/PlainLayout.d.ts +6 -0
- package/lib/layouts/PlainLayout.js +8 -0
- package/lib/layouts/ScrollContainer.d.ts +8 -0
- package/lib/layouts/ScrollContainer.js +8 -0
- package/lib/layouts/TabNavigatorLayout.d.ts +26 -0
- package/lib/layouts/TabNavigatorLayout.js +56 -0
- package/lib/notifications/index.d.ts +1 -0
- package/lib/notifications/index.js +1 -0
- package/lib/primitives/BaseButton.d.ts +146 -0
- package/lib/primitives/BaseButton.js +233 -0
- package/lib/primitives/Box.d.ts +7 -0
- package/lib/primitives/Box.js +8 -0
- package/lib/primitives/Row.d.ts +11 -0
- package/lib/primitives/Row.js +22 -0
- package/lib/primitives/Stack.d.ts +9 -0
- package/lib/primitives/Stack.js +14 -0
- package/lib/primitives/index.d.ts +3 -0
- package/lib/primitives/index.js +3 -0
- package/lib/providers/index.d.ts +0 -0
- package/lib/providers/index.js +2 -0
- package/lib/theme/active.d.ts +3 -0
- package/lib/theme/active.js +8 -0
- package/lib/theme/components/ThemedActivityIndicator.d.ts +21 -0
- package/lib/theme/components/ThemedActivityIndicator.js +5 -0
- package/lib/theme/components/index.d.ts +9 -0
- package/lib/theme/components/index.js +9 -0
- package/lib/theme/default.d.ts +2 -0
- package/lib/theme/default.js +79 -0
- package/lib/theme/index.d.ts +4 -0
- package/lib/theme/index.js +3 -0
- package/lib/theme/theme.d.ts +13 -0
- package/lib/theme/theme.js +14 -0
- package/lib/theme/tw.d.ts +10 -0
- package/lib/theme/tw.js +14 -0
- package/lib/theme/types.d.ts +92 -0
- package/lib/theme/types.js +9 -0
- package/lib/theme/typography.d.ts +376 -0
- package/lib/theme/typography.js +234 -0
- package/lib/theme/useTheme.d.ts +1 -0
- package/lib/theme/useTheme.js +2 -0
- package/lib/utils/date.d.ts +70 -0
- package/lib/utils/date.js +126 -0
- package/lib/utils/icon.d.ts +1 -0
- package/lib/utils/icon.js +1 -0
- package/lib/utils/monetary.d.ts +3 -0
- package/lib/utils/monetary.js +31 -0
- package/lib/utils/quantity.d.ts +11 -0
- package/lib/utils/quantity.js +44 -0
- package/lib/utils/serializer.d.ts +2 -0
- package/lib/utils/serializer.js +44 -0
- package/lib/utils/timezone.d.ts +4 -0
- package/lib/utils/timezone.js +1 -0
- package/lib/views/AuthFormView.d.ts +9 -0
- package/lib/views/AuthFormView.js +21 -0
- package/lib/views/FormViewV2.context.d.ts +32 -0
- package/lib/views/FormViewV2.context.js +28 -0
- package/lib/views/FormViewV2.d.ts +60 -0
- package/lib/views/FormViewV2.js +85 -0
- package/lib/views/ListViewV2.context.d.ts +36 -0
- package/lib/views/ListViewV2.context.js +30 -0
- package/lib/views/ListViewV2.d.ts +131 -0
- package/lib/views/ListViewV2.js +206 -0
- package/lib/views/Wizard/Wizard.context.d.ts +26 -0
- package/lib/views/Wizard/Wizard.context.js +92 -0
- package/lib/views/Wizard/Wizard.d.ts +33 -0
- package/lib/views/Wizard/Wizard.js +86 -0
- package/lib/views/Wizard/index.d.ts +4 -0
- package/lib/views/Wizard/index.js +2 -0
- package/lib/views/types/IFormView.d.ts +22 -0
- package/lib/views/types/IFormView.js +1 -0
- package/lib/views/types/IListView.d.ts +34 -0
- package/lib/views/types/IListView.js +35 -0
- package/lib/views/types/UIItem.d.ts +21 -0
- package/lib/views/types/UIItem.js +1 -0
- package/lib/widgets/CircleButton.d.ts +15 -0
- package/lib/widgets/CircleButton.js +37 -0
- package/lib/widgets/GeoPermissionCard.d.ts +8 -0
- package/lib/widgets/GeoPermissionCard.js +19 -0
- package/lib/widgets/HomeHeader.d.ts +9 -0
- package/lib/widgets/HomeHeader.js +9 -0
- package/lib/widgets/JSONViewer.d.ts +4 -0
- package/lib/widgets/JSONViewer.js +146 -0
- package/lib/widgets/MenuCard.d.ts +13 -0
- package/lib/widgets/MenuCard.js +8 -0
- package/lib/widgets/MenuGrid.d.ts +17 -0
- package/lib/widgets/MenuGrid.js +6 -0
- package/lib/widgets/ScreenHeader.d.ts +19 -0
- package/lib/widgets/ScreenHeader.js +21 -0
- package/lib/widgets/TimeZoneSelector.d.ts +7 -0
- package/lib/widgets/TimeZoneSelector.js +19 -0
- package/lib/widgets/TimeZoneSelectorModal.d.ts +9 -0
- package/lib/widgets/TimeZoneSelectorModal.js +57 -0
- package/lib/widgets/index.d.ts +7 -0
- package/lib/widgets/index.js +6 -0
- package/package.json +22 -211
- package/lib/module/Dialog/BottomSheet/BottomSheet.Root.js +0 -481
- package/lib/module/Dialog/BottomSheet/BottomSheet.Root.js.map +0 -1
- package/lib/module/Dialog/BottomSheet/index.js +0 -4
- package/lib/module/Dialog/BottomSheet/index.js.map +0 -1
- package/lib/module/Dialog/Confirmation.context.js +0 -108
- package/lib/module/Dialog/Confirmation.context.js.map +0 -1
- package/lib/module/Dialog/Dialog.Confirmation.js +0 -69
- package/lib/module/Dialog/Dialog.Confirmation.js.map +0 -1
- package/lib/module/Dialog/Dialog.EditValue.js +0 -115
- package/lib/module/Dialog/Dialog.EditValue.js.map +0 -1
- package/lib/module/Dialog/index.js +0 -14
- package/lib/module/Dialog/index.js.map +0 -1
- package/lib/module/Display/Display.Avatar.js +0 -58
- package/lib/module/Display/Display.Avatar.js.map +0 -1
- package/lib/module/Display/Display.Badge.js +0 -72
- package/lib/module/Display/Display.Badge.js.map +0 -1
- package/lib/module/Display/Display.CopyableText.js +0 -30
- package/lib/module/Display/Display.CopyableText.js.map +0 -1
- package/lib/module/Display/Display.CountRecords.js +0 -27
- package/lib/module/Display/Display.CountRecords.js.map +0 -1
- package/lib/module/Display/Display.Date.js +0 -35
- package/lib/module/Display/Display.Date.js.map +0 -1
- package/lib/module/Display/Display.Divider.js +0 -43
- package/lib/module/Display/Display.Divider.js.map +0 -1
- package/lib/module/Display/Display.Icon.js +0 -83
- package/lib/module/Display/Display.Icon.js.map +0 -1
- package/lib/module/Display/Display.Logo.js +0 -54
- package/lib/module/Display/Display.Logo.js.map +0 -1
- package/lib/module/Display/Display.MenuButton.js +0 -101
- package/lib/module/Display/Display.MenuButton.js.map +0 -1
- package/lib/module/Display/Display.Monetary.js +0 -36
- package/lib/module/Display/Display.Monetary.js.map +0 -1
- package/lib/module/Display/index.js +0 -28
- package/lib/module/Display/index.js.map +0 -1
- package/lib/module/Feedback/ErrorBoundary.js +0 -43
- package/lib/module/Feedback/ErrorBoundary.js.map +0 -1
- package/lib/module/Feedback/Feedback.DomainSplashScreen.js +0 -101
- package/lib/module/Feedback/Feedback.DomainSplashScreen.js.map +0 -1
- package/lib/module/Feedback/Feedback.Empty.js +0 -31
- package/lib/module/Feedback/Feedback.Empty.js.map +0 -1
- package/lib/module/Feedback/Feedback.Error.js +0 -53
- package/lib/module/Feedback/Feedback.Error.js.map +0 -1
- package/lib/module/Feedback/Feedback.Loading.js +0 -24
- package/lib/module/Feedback/Feedback.Loading.js.map +0 -1
- package/lib/module/Feedback/Feedback.Spinner.js +0 -28
- package/lib/module/Feedback/Feedback.Spinner.js.map +0 -1
- package/lib/module/Feedback/Feedback.Splash.js +0 -59
- package/lib/module/Feedback/Feedback.Splash.js.map +0 -1
- package/lib/module/Feedback/index.js +0 -17
- package/lib/module/Feedback/index.js.map +0 -1
- package/lib/module/Form/Form.Button.js +0 -442
- package/lib/module/Form/Form.Button.js.map +0 -1
- package/lib/module/Form/Form.Checkbox.js +0 -71
- package/lib/module/Form/Form.Checkbox.js.map +0 -1
- package/lib/module/Form/Form.ControlledCheckbox.js +0 -29
- package/lib/module/Form/Form.ControlledCheckbox.js.map +0 -1
- package/lib/module/Form/Form.ControlledDropdown.js +0 -7
- package/lib/module/Form/Form.ControlledDropdown.js.map +0 -1
- package/lib/module/Form/Form.ControlledInput.js +0 -43
- package/lib/module/Form/Form.ControlledInput.js.map +0 -1
- package/lib/module/Form/Form.ControlledMonetaryInput.js +0 -34
- package/lib/module/Form/Form.ControlledMonetaryInput.js.map +0 -1
- package/lib/module/Form/Form.ControlledRadioButton.js +0 -28
- package/lib/module/Form/Form.ControlledRadioButton.js.map +0 -1
- package/lib/module/Form/Form.Dropdown.js +0 -163
- package/lib/module/Form/Form.Dropdown.js.map +0 -1
- package/lib/module/Form/Form.FilterButton.js +0 -59
- package/lib/module/Form/Form.FilterButton.js.map +0 -1
- package/lib/module/Form/Form.FractionalQuantityInput.js +0 -166
- package/lib/module/Form/Form.FractionalQuantityInput.js.map +0 -1
- package/lib/module/Form/Form.IconButton.js +0 -97
- package/lib/module/Form/Form.IconButton.js.map +0 -1
- package/lib/module/Form/Form.Input.js +0 -77
- package/lib/module/Form/Form.Input.js.map +0 -1
- package/lib/module/Form/Form.InputField.js +0 -63
- package/lib/module/Form/Form.InputField.js.map +0 -1
- package/lib/module/Form/Form.MonetaryInput.js +0 -65
- package/lib/module/Form/Form.MonetaryInput.js.map +0 -1
- package/lib/module/Form/Form.PasswordInput.js +0 -37
- package/lib/module/Form/Form.PasswordInput.js.map +0 -1
- package/lib/module/Form/Form.QuantitySelector.js +0 -78
- package/lib/module/Form/Form.QuantitySelector.js.map +0 -1
- package/lib/module/Form/Form.RadioButton.js +0 -56
- package/lib/module/Form/Form.RadioButton.js.map +0 -1
- package/lib/module/Form/Form.SearchBar.js +0 -63
- package/lib/module/Form/Form.SearchBar.js.map +0 -1
- package/lib/module/Form/Form.TextInput.js +0 -19
- package/lib/module/Form/Form.TextInput.js.map +0 -1
- package/lib/module/Form/index.js +0 -45
- package/lib/module/Form/index.js.map +0 -1
- package/lib/module/Navigation/Navigation.Header.js +0 -46
- package/lib/module/Navigation/Navigation.Header.js.map +0 -1
- package/lib/module/Navigation/Navigation.HeaderToolbar.js +0 -79
- package/lib/module/Navigation/Navigation.HeaderToolbar.js.map +0 -1
- package/lib/module/Navigation/Navigation.RowItem.js +0 -35
- package/lib/module/Navigation/Navigation.RowItem.js.map +0 -1
- package/lib/module/Navigation/Navigation.TabIcon.js +0 -28
- package/lib/module/Navigation/Navigation.TabIcon.js.map +0 -1
- package/lib/module/Navigation/Navigation.TabItem.js +0 -27
- package/lib/module/Navigation/Navigation.TabItem.js.map +0 -1
- package/lib/module/Navigation/index.js +0 -16
- package/lib/module/Navigation/index.js.map +0 -1
- package/lib/module/Typography/Typography.Heading.js +0 -15
- package/lib/module/Typography/Typography.Heading.js.map +0 -1
- package/lib/module/Typography/Typography.Text.js +0 -51
- package/lib/module/Typography/Typography.Text.js.map +0 -1
- package/lib/module/Typography/index.js +0 -11
- package/lib/module/Typography/index.js.map +0 -1
- package/lib/module/icons/AddItemIcon.js +0 -53
- package/lib/module/icons/AddItemIcon.js.map +0 -1
- package/lib/module/icons/ArrangeCircle.js +0 -50
- package/lib/module/icons/ArrangeCircle.js.map +0 -1
- package/lib/module/icons/ArrowDownIcon.js +0 -37
- package/lib/module/icons/ArrowDownIcon.js.map +0 -1
- package/lib/module/icons/ArrowUpIcon.js +0 -37
- package/lib/module/icons/ArrowUpIcon.js.map +0 -1
- package/lib/module/icons/BoxIcon.js +0 -35
- package/lib/module/icons/BoxIcon.js.map +0 -1
- package/lib/module/icons/BoxTimeIcon.js +0 -29
- package/lib/module/icons/BoxTimeIcon.js.map +0 -1
- package/lib/module/icons/CalendarIcon.js +0 -81
- package/lib/module/icons/CalendarIcon.js.map +0 -1
- package/lib/module/icons/CardIcon.js +0 -46
- package/lib/module/icons/CardIcon.js.map +0 -1
- package/lib/module/icons/CashierIcon.js +0 -20
- package/lib/module/icons/CashierIcon.js.map +0 -1
- package/lib/module/icons/CreditIcon.js +0 -43
- package/lib/module/icons/CreditIcon.js.map +0 -1
- package/lib/module/icons/DuoIcon.js +0 -41
- package/lib/module/icons/DuoIcon.js.map +0 -1
- package/lib/module/icons/HomeIcon.js +0 -20
- package/lib/module/icons/HomeIcon.js.map +0 -1
- package/lib/module/icons/HomeIconOutlined.js +0 -29
- package/lib/module/icons/HomeIconOutlined.js.map +0 -1
- package/lib/module/icons/LogoIcon.js +0 -38
- package/lib/module/icons/LogoIcon.js.map +0 -1
- package/lib/module/icons/MoneyReceiveIcon.js +0 -47
- package/lib/module/icons/MoneyReceiveIcon.js.map +0 -1
- package/lib/module/icons/OdooIcon.js +0 -24
- package/lib/module/icons/OdooIcon.js.map +0 -1
- package/lib/module/icons/PinIcon.js +0 -20
- package/lib/module/icons/PinIcon.js.map +0 -1
- package/lib/module/icons/PrinterIcon.js +0 -48
- package/lib/module/icons/PrinterIcon.js.map +0 -1
- package/lib/module/icons/ProfileIcon.js +0 -23
- package/lib/module/icons/ProfileIcon.js.map +0 -1
- package/lib/module/icons/SettingsIcon.js +0 -65
- package/lib/module/icons/SettingsIcon.js.map +0 -1
- package/lib/module/icons/SinpeIcon.js +0 -37
- package/lib/module/icons/SinpeIcon.js.map +0 -1
- package/lib/module/icons/ToggleOffIcon.js +0 -29
- package/lib/module/icons/ToggleOffIcon.js.map +0 -1
- package/lib/module/icons/WalletMoneyIcon.js +0 -42
- package/lib/module/icons/WalletMoneyIcon.js.map +0 -1
- package/lib/module/icons/icon_getters.js +0 -53
- package/lib/module/icons/icon_getters.js.map +0 -1
- package/lib/module/icons/props.js +0 -2
- package/lib/module/icons/props.js.map +0 -1
- package/lib/module/index.js +0 -34
- package/lib/module/index.js.map +0 -1
- package/lib/module/layouts/AuthContainer.js +0 -66
- package/lib/module/layouts/AuthContainer.js.map +0 -1
- package/lib/module/layouts/Container.js +0 -31
- package/lib/module/layouts/Container.js.map +0 -1
- package/lib/module/layouts/GradientContainer.js +0 -20
- package/lib/module/layouts/GradientContainer.js.map +0 -1
- package/lib/module/layouts/PlainLayout.js +0 -16
- package/lib/module/layouts/PlainLayout.js.map +0 -1
- package/lib/module/layouts/ScrollContainer.js +0 -37
- package/lib/module/layouts/ScrollContainer.js.map +0 -1
- package/lib/module/layouts/TabNavigatorLayout.js +0 -132
- package/lib/module/layouts/TabNavigatorLayout.js.map +0 -1
- package/lib/module/lib/date.js +0 -127
- package/lib/module/lib/date.js.map +0 -1
- package/lib/module/lib/icon.js +0 -2
- package/lib/module/lib/icon.js.map +0 -1
- package/lib/module/lib/monetary.js +0 -31
- package/lib/module/lib/monetary.js.map +0 -1
- package/lib/module/lib/quantity.js +0 -46
- package/lib/module/lib/quantity.js.map +0 -1
- package/lib/module/lib/serializer.js +0 -47
- package/lib/module/lib/serializer.js.map +0 -1
- package/lib/module/lib/timezone.js +0 -2
- package/lib/module/lib/timezone.js.map +0 -1
- package/lib/module/nativewind-env.d.js +0 -3
- package/lib/module/nativewind-env.d.js.map +0 -1
- package/lib/module/notifications/index.js +0 -5
- package/lib/module/notifications/index.js.map +0 -1
- package/lib/module/package.json +0 -1
- package/lib/module/primitives/BaseButton.js +0 -391
- package/lib/module/primitives/BaseButton.js.map +0 -1
- package/lib/module/primitives/Box.js +0 -19
- package/lib/module/primitives/Box.js.map +0 -1
- package/lib/module/primitives/Row.js +0 -37
- package/lib/module/primitives/Row.js.map +0 -1
- package/lib/module/primitives/Stack.js +0 -27
- package/lib/module/primitives/Stack.js.map +0 -1
- package/lib/module/primitives/index.js +0 -6
- package/lib/module/primitives/index.js.map +0 -1
- package/lib/module/providers/index.js +0 -3
- package/lib/module/providers/index.js.map +0 -1
- package/lib/module/theme/active.js +0 -13
- package/lib/module/theme/active.js.map +0 -1
- package/lib/module/theme/components/ThemedActivityIndicator.js +0 -30
- package/lib/module/theme/components/ThemedActivityIndicator.js.map +0 -1
- package/lib/module/theme/components/index.js +0 -13
- package/lib/module/theme/components/index.js.map +0 -1
- package/lib/module/theme/default.js +0 -91
- package/lib/module/theme/default.js.map +0 -1
- package/lib/module/theme/globals.css +0 -67
- package/lib/module/theme/index.js +0 -6
- package/lib/module/theme/index.js.map +0 -1
- package/lib/module/theme/theme.js +0 -18
- package/lib/module/theme/theme.js.map +0 -1
- package/lib/module/theme/tw.js +0 -19
- package/lib/module/theme/tw.js.map +0 -1
- package/lib/module/theme/types.js +0 -2
- package/lib/module/theme/types.js.map +0 -1
- package/lib/module/theme/typography.js +0 -246
- package/lib/module/theme/typography.js.map +0 -1
- package/lib/module/theme/useTheme.js +0 -5
- package/lib/module/theme/useTheme.js.map +0 -1
- package/lib/module/views/AuthFormView.js +0 -46
- package/lib/module/views/AuthFormView.js.map +0 -1
- package/lib/module/views/FormViewV2.context.js +0 -47
- package/lib/module/views/FormViewV2.context.js.map +0 -1
- package/lib/module/views/FormViewV2.js +0 -220
- package/lib/module/views/FormViewV2.js.map +0 -1
- package/lib/module/views/ListViewV2.context.js +0 -51
- package/lib/module/views/ListViewV2.context.js.map +0 -1
- package/lib/module/views/ListViewV2.js +0 -503
- package/lib/module/views/ListViewV2.js.map +0 -1
- package/lib/module/views/Wizard/Wizard.context.js +0 -111
- package/lib/module/views/Wizard/Wizard.context.js.map +0 -1
- package/lib/module/views/Wizard/Wizard.js +0 -125
- package/lib/module/views/Wizard/Wizard.js.map +0 -1
- package/lib/module/views/Wizard/index.js +0 -5
- package/lib/module/views/Wizard/index.js.map +0 -1
- package/lib/module/views/types/IFormView.js +0 -4
- package/lib/module/views/types/IFormView.js.map +0 -1
- package/lib/module/views/types/IListView.js +0 -40
- package/lib/module/views/types/IListView.js.map +0 -1
- package/lib/module/views/types/UIItem.js +0 -2
- package/lib/module/views/types/UIItem.js.map +0 -1
- package/lib/module/widgets/CircleButton.js +0 -70
- package/lib/module/widgets/CircleButton.js.map +0 -1
- package/lib/module/widgets/GeoPermissionCard.js +0 -55
- package/lib/module/widgets/GeoPermissionCard.js.map +0 -1
- package/lib/module/widgets/HomeHeader.js +0 -42
- package/lib/module/widgets/HomeHeader.js.map +0 -1
- package/lib/module/widgets/JSONViewer.js +0 -196
- package/lib/module/widgets/JSONViewer.js.map +0 -1
- package/lib/module/widgets/MenuCard.js +0 -32
- package/lib/module/widgets/MenuCard.js.map +0 -1
- package/lib/module/widgets/MenuGrid.js +0 -20
- package/lib/module/widgets/MenuGrid.js.map +0 -1
- package/lib/module/widgets/ScreenHeader.js +0 -63
- package/lib/module/widgets/ScreenHeader.js.map +0 -1
- package/lib/module/widgets/TimeZoneSelector.js +0 -73
- package/lib/module/widgets/TimeZoneSelector.js.map +0 -1
- package/lib/module/widgets/TimeZoneSelectorModal.js +0 -187
- package/lib/module/widgets/TimeZoneSelectorModal.js.map +0 -1
- package/lib/module/widgets/index.js +0 -9
- package/lib/module/widgets/index.js.map +0 -1
- package/lib/typescript/Dialog/BottomSheet/BottomSheet.Root.d.ts +0 -321
- package/lib/typescript/Dialog/BottomSheet/BottomSheet.Root.d.ts.map +0 -1
- package/lib/typescript/Dialog/BottomSheet/index.d.ts +0 -2
- package/lib/typescript/Dialog/BottomSheet/index.d.ts.map +0 -1
- package/lib/typescript/Dialog/Confirmation.context.d.ts +0 -22
- package/lib/typescript/Dialog/Confirmation.context.d.ts.map +0 -1
- package/lib/typescript/Dialog/Dialog.Confirmation.d.ts +0 -13
- package/lib/typescript/Dialog/Dialog.Confirmation.d.ts.map +0 -1
- package/lib/typescript/Dialog/Dialog.EditValue.d.ts +0 -26
- package/lib/typescript/Dialog/Dialog.EditValue.d.ts.map +0 -1
- package/lib/typescript/Dialog/index.d.ts +0 -20
- package/lib/typescript/Dialog/index.d.ts.map +0 -1
- package/lib/typescript/Display/Display.Avatar.d.ts +0 -53
- package/lib/typescript/Display/Display.Avatar.d.ts.map +0 -1
- package/lib/typescript/Display/Display.Badge.d.ts +0 -109
- package/lib/typescript/Display/Display.Badge.d.ts.map +0 -1
- package/lib/typescript/Display/Display.CopyableText.d.ts +0 -14
- package/lib/typescript/Display/Display.CopyableText.d.ts.map +0 -1
- package/lib/typescript/Display/Display.CountRecords.d.ts +0 -9
- package/lib/typescript/Display/Display.CountRecords.d.ts.map +0 -1
- package/lib/typescript/Display/Display.Date.d.ts +0 -19
- package/lib/typescript/Display/Display.Date.d.ts.map +0 -1
- package/lib/typescript/Display/Display.Divider.d.ts +0 -45
- package/lib/typescript/Display/Display.Divider.d.ts.map +0 -1
- package/lib/typescript/Display/Display.Icon.d.ts +0 -16
- package/lib/typescript/Display/Display.Icon.d.ts.map +0 -1
- package/lib/typescript/Display/Display.Logo.d.ts +0 -56
- package/lib/typescript/Display/Display.Logo.d.ts.map +0 -1
- package/lib/typescript/Display/Display.MenuButton.d.ts +0 -104
- package/lib/typescript/Display/Display.MenuButton.d.ts.map +0 -1
- package/lib/typescript/Display/Display.Monetary.d.ts +0 -20
- package/lib/typescript/Display/Display.Monetary.d.ts.map +0 -1
- package/lib/typescript/Display/index.d.ts +0 -23
- package/lib/typescript/Display/index.d.ts.map +0 -1
- package/lib/typescript/Feedback/ErrorBoundary.d.ts +0 -19
- package/lib/typescript/Feedback/ErrorBoundary.d.ts.map +0 -1
- package/lib/typescript/Feedback/Feedback.DomainSplashScreen.d.ts +0 -12
- package/lib/typescript/Feedback/Feedback.DomainSplashScreen.d.ts.map +0 -1
- package/lib/typescript/Feedback/Feedback.Empty.d.ts +0 -7
- package/lib/typescript/Feedback/Feedback.Empty.d.ts.map +0 -1
- package/lib/typescript/Feedback/Feedback.Error.d.ts +0 -10
- package/lib/typescript/Feedback/Feedback.Error.d.ts.map +0 -1
- package/lib/typescript/Feedback/Feedback.Loading.d.ts +0 -10
- package/lib/typescript/Feedback/Feedback.Loading.d.ts.map +0 -1
- package/lib/typescript/Feedback/Feedback.Spinner.d.ts +0 -12
- package/lib/typescript/Feedback/Feedback.Spinner.d.ts.map +0 -1
- package/lib/typescript/Feedback/Feedback.Splash.d.ts +0 -12
- package/lib/typescript/Feedback/Feedback.Splash.d.ts.map +0 -1
- package/lib/typescript/Feedback/index.d.ts +0 -14
- package/lib/typescript/Feedback/index.d.ts.map +0 -1
- package/lib/typescript/Form/Form.Button.d.ts +0 -146
- package/lib/typescript/Form/Form.Button.d.ts.map +0 -1
- package/lib/typescript/Form/Form.Checkbox.d.ts +0 -14
- package/lib/typescript/Form/Form.Checkbox.d.ts.map +0 -1
- package/lib/typescript/Form/Form.ControlledCheckbox.d.ts +0 -10
- package/lib/typescript/Form/Form.ControlledCheckbox.d.ts.map +0 -1
- package/lib/typescript/Form/Form.ControlledDropdown.d.ts +0 -15
- package/lib/typescript/Form/Form.ControlledDropdown.d.ts.map +0 -1
- package/lib/typescript/Form/Form.ControlledInput.d.ts +0 -16
- package/lib/typescript/Form/Form.ControlledInput.d.ts.map +0 -1
- package/lib/typescript/Form/Form.ControlledMonetaryInput.d.ts +0 -13
- package/lib/typescript/Form/Form.ControlledMonetaryInput.d.ts.map +0 -1
- package/lib/typescript/Form/Form.ControlledRadioButton.d.ts +0 -10
- package/lib/typescript/Form/Form.ControlledRadioButton.d.ts.map +0 -1
- package/lib/typescript/Form/Form.Dropdown.d.ts +0 -15
- package/lib/typescript/Form/Form.Dropdown.d.ts.map +0 -1
- package/lib/typescript/Form/Form.FilterButton.d.ts +0 -13
- package/lib/typescript/Form/Form.FilterButton.d.ts.map +0 -1
- package/lib/typescript/Form/Form.FractionalQuantityInput.d.ts +0 -14
- package/lib/typescript/Form/Form.FractionalQuantityInput.d.ts.map +0 -1
- package/lib/typescript/Form/Form.IconButton.d.ts +0 -68
- package/lib/typescript/Form/Form.IconButton.d.ts.map +0 -1
- package/lib/typescript/Form/Form.Input.d.ts +0 -11
- package/lib/typescript/Form/Form.Input.d.ts.map +0 -1
- package/lib/typescript/Form/Form.InputField.d.ts +0 -11
- package/lib/typescript/Form/Form.InputField.d.ts.map +0 -1
- package/lib/typescript/Form/Form.MonetaryInput.d.ts +0 -9
- package/lib/typescript/Form/Form.MonetaryInput.d.ts.map +0 -1
- package/lib/typescript/Form/Form.PasswordInput.d.ts +0 -10
- package/lib/typescript/Form/Form.PasswordInput.d.ts.map +0 -1
- package/lib/typescript/Form/Form.QuantitySelector.d.ts +0 -12
- package/lib/typescript/Form/Form.QuantitySelector.d.ts.map +0 -1
- package/lib/typescript/Form/Form.RadioButton.d.ts +0 -8
- package/lib/typescript/Form/Form.RadioButton.d.ts.map +0 -1
- package/lib/typescript/Form/Form.SearchBar.d.ts +0 -10
- package/lib/typescript/Form/Form.SearchBar.d.ts.map +0 -1
- package/lib/typescript/Form/Form.TextInput.d.ts +0 -9
- package/lib/typescript/Form/Form.TextInput.d.ts.map +0 -1
- package/lib/typescript/Form/index.d.ts +0 -42
- package/lib/typescript/Form/index.d.ts.map +0 -1
- package/lib/typescript/Navigation/Navigation.Header.d.ts +0 -11
- package/lib/typescript/Navigation/Navigation.Header.d.ts.map +0 -1
- package/lib/typescript/Navigation/Navigation.HeaderToolbar.d.ts +0 -16
- package/lib/typescript/Navigation/Navigation.HeaderToolbar.d.ts.map +0 -1
- package/lib/typescript/Navigation/Navigation.RowItem.d.ts +0 -6
- package/lib/typescript/Navigation/Navigation.RowItem.d.ts.map +0 -1
- package/lib/typescript/Navigation/Navigation.TabIcon.d.ts +0 -15
- package/lib/typescript/Navigation/Navigation.TabIcon.d.ts.map +0 -1
- package/lib/typescript/Navigation/Navigation.TabItem.d.ts +0 -15
- package/lib/typescript/Navigation/Navigation.TabItem.d.ts.map +0 -1
- package/lib/typescript/Navigation/index.d.ts +0 -12
- package/lib/typescript/Navigation/index.d.ts.map +0 -1
- package/lib/typescript/Typography/Typography.Heading.d.ts +0 -13
- package/lib/typescript/Typography/Typography.Heading.d.ts.map +0 -1
- package/lib/typescript/Typography/Typography.Text.d.ts +0 -29
- package/lib/typescript/Typography/Typography.Text.d.ts.map +0 -1
- package/lib/typescript/Typography/index.d.ts +0 -8
- package/lib/typescript/Typography/index.d.ts.map +0 -1
- package/lib/typescript/icons/AddItemIcon.d.ts +0 -5
- package/lib/typescript/icons/AddItemIcon.d.ts.map +0 -1
- package/lib/typescript/icons/ArrangeCircle.d.ts +0 -5
- package/lib/typescript/icons/ArrangeCircle.d.ts.map +0 -1
- package/lib/typescript/icons/ArrowDownIcon.d.ts +0 -5
- package/lib/typescript/icons/ArrowDownIcon.d.ts.map +0 -1
- package/lib/typescript/icons/ArrowUpIcon.d.ts +0 -5
- package/lib/typescript/icons/ArrowUpIcon.d.ts.map +0 -1
- package/lib/typescript/icons/BoxIcon.d.ts +0 -5
- package/lib/typescript/icons/BoxIcon.d.ts.map +0 -1
- package/lib/typescript/icons/BoxTimeIcon.d.ts +0 -5
- package/lib/typescript/icons/BoxTimeIcon.d.ts.map +0 -1
- package/lib/typescript/icons/CalendarIcon.d.ts +0 -5
- package/lib/typescript/icons/CalendarIcon.d.ts.map +0 -1
- package/lib/typescript/icons/CardIcon.d.ts +0 -5
- package/lib/typescript/icons/CardIcon.d.ts.map +0 -1
- package/lib/typescript/icons/CashierIcon.d.ts +0 -5
- package/lib/typescript/icons/CashierIcon.d.ts.map +0 -1
- package/lib/typescript/icons/CreditIcon.d.ts +0 -8
- package/lib/typescript/icons/CreditIcon.d.ts.map +0 -1
- package/lib/typescript/icons/DuoIcon.d.ts +0 -5
- package/lib/typescript/icons/DuoIcon.d.ts.map +0 -1
- package/lib/typescript/icons/HomeIcon.d.ts +0 -5
- package/lib/typescript/icons/HomeIcon.d.ts.map +0 -1
- package/lib/typescript/icons/HomeIconOutlined.d.ts +0 -5
- package/lib/typescript/icons/HomeIconOutlined.d.ts.map +0 -1
- package/lib/typescript/icons/LogoIcon.d.ts +0 -5
- package/lib/typescript/icons/LogoIcon.d.ts.map +0 -1
- package/lib/typescript/icons/MoneyReceiveIcon.d.ts +0 -5
- package/lib/typescript/icons/MoneyReceiveIcon.d.ts.map +0 -1
- package/lib/typescript/icons/OdooIcon.d.ts +0 -7
- package/lib/typescript/icons/OdooIcon.d.ts.map +0 -1
- package/lib/typescript/icons/PinIcon.d.ts +0 -5
- package/lib/typescript/icons/PinIcon.d.ts.map +0 -1
- package/lib/typescript/icons/PrinterIcon.d.ts +0 -5
- package/lib/typescript/icons/PrinterIcon.d.ts.map +0 -1
- package/lib/typescript/icons/ProfileIcon.d.ts +0 -5
- package/lib/typescript/icons/ProfileIcon.d.ts.map +0 -1
- package/lib/typescript/icons/SettingsIcon.d.ts +0 -5
- package/lib/typescript/icons/SettingsIcon.d.ts.map +0 -1
- package/lib/typescript/icons/SinpeIcon.d.ts +0 -5
- package/lib/typescript/icons/SinpeIcon.d.ts.map +0 -1
- package/lib/typescript/icons/ToggleOffIcon.d.ts +0 -5
- package/lib/typescript/icons/ToggleOffIcon.d.ts.map +0 -1
- package/lib/typescript/icons/WalletMoneyIcon.d.ts +0 -5
- package/lib/typescript/icons/WalletMoneyIcon.d.ts.map +0 -1
- package/lib/typescript/icons/icon_getters.d.ts +0 -7
- package/lib/typescript/icons/icon_getters.d.ts.map +0 -1
- package/lib/typescript/icons/props.d.ts +0 -5
- package/lib/typescript/icons/props.d.ts.map +0 -1
- package/lib/typescript/index.d.ts +0 -21
- package/lib/typescript/index.d.ts.map +0 -1
- package/lib/typescript/layouts/AuthContainer.d.ts +0 -10
- package/lib/typescript/layouts/AuthContainer.d.ts.map +0 -1
- package/lib/typescript/layouts/Container.d.ts +0 -15
- package/lib/typescript/layouts/Container.d.ts.map +0 -1
- package/lib/typescript/layouts/GradientContainer.d.ts +0 -9
- package/lib/typescript/layouts/GradientContainer.d.ts.map +0 -1
- package/lib/typescript/layouts/PlainLayout.d.ts +0 -7
- package/lib/typescript/layouts/PlainLayout.d.ts.map +0 -1
- package/lib/typescript/layouts/ScrollContainer.d.ts +0 -9
- package/lib/typescript/layouts/ScrollContainer.d.ts.map +0 -1
- package/lib/typescript/layouts/TabNavigatorLayout.d.ts +0 -27
- package/lib/typescript/layouts/TabNavigatorLayout.d.ts.map +0 -1
- package/lib/typescript/lib/date.d.ts +0 -71
- package/lib/typescript/lib/date.d.ts.map +0 -1
- package/lib/typescript/lib/icon.d.ts +0 -2
- package/lib/typescript/lib/icon.d.ts.map +0 -1
- package/lib/typescript/lib/monetary.d.ts +0 -4
- package/lib/typescript/lib/monetary.d.ts.map +0 -1
- package/lib/typescript/lib/quantity.d.ts +0 -12
- package/lib/typescript/lib/quantity.d.ts.map +0 -1
- package/lib/typescript/lib/serializer.d.ts +0 -3
- package/lib/typescript/lib/serializer.d.ts.map +0 -1
- package/lib/typescript/lib/timezone.d.ts +0 -5
- package/lib/typescript/lib/timezone.d.ts.map +0 -1
- package/lib/typescript/notifications/index.d.ts +0 -2
- package/lib/typescript/notifications/index.d.ts.map +0 -1
- package/lib/typescript/package.json +0 -1
- package/lib/typescript/primitives/BaseButton.d.ts +0 -147
- package/lib/typescript/primitives/BaseButton.d.ts.map +0 -1
- package/lib/typescript/primitives/Box.d.ts +0 -8
- package/lib/typescript/primitives/Box.d.ts.map +0 -1
- package/lib/typescript/primitives/Row.d.ts +0 -12
- package/lib/typescript/primitives/Row.d.ts.map +0 -1
- package/lib/typescript/primitives/Stack.d.ts +0 -10
- package/lib/typescript/primitives/Stack.d.ts.map +0 -1
- package/lib/typescript/primitives/index.d.ts +0 -4
- package/lib/typescript/primitives/index.d.ts.map +0 -1
- package/lib/typescript/providers/index.d.ts +0 -1
- package/lib/typescript/providers/index.d.ts.map +0 -1
- package/lib/typescript/theme/active.d.ts +0 -4
- package/lib/typescript/theme/active.d.ts.map +0 -1
- package/lib/typescript/theme/components/ThemedActivityIndicator.d.ts +0 -22
- package/lib/typescript/theme/components/ThemedActivityIndicator.d.ts.map +0 -1
- package/lib/typescript/theme/components/index.d.ts +0 -10
- package/lib/typescript/theme/components/index.d.ts.map +0 -1
- package/lib/typescript/theme/default.d.ts +0 -3
- package/lib/typescript/theme/default.d.ts.map +0 -1
- package/lib/typescript/theme/index.d.ts +0 -5
- package/lib/typescript/theme/index.d.ts.map +0 -1
- package/lib/typescript/theme/theme.d.ts +0 -14
- package/lib/typescript/theme/theme.d.ts.map +0 -1
- package/lib/typescript/theme/tw.d.ts +0 -11
- package/lib/typescript/theme/tw.d.ts.map +0 -1
- package/lib/typescript/theme/types.d.ts +0 -93
- package/lib/typescript/theme/types.d.ts.map +0 -1
- package/lib/typescript/theme/typography.d.ts +0 -377
- package/lib/typescript/theme/typography.d.ts.map +0 -1
- package/lib/typescript/theme/useTheme.d.ts +0 -2
- package/lib/typescript/theme/useTheme.d.ts.map +0 -1
- package/lib/typescript/views/AuthFormView.d.ts +0 -10
- package/lib/typescript/views/AuthFormView.d.ts.map +0 -1
- package/lib/typescript/views/FormViewV2.context.d.ts +0 -33
- package/lib/typescript/views/FormViewV2.context.d.ts.map +0 -1
- package/lib/typescript/views/FormViewV2.d.ts +0 -61
- package/lib/typescript/views/FormViewV2.d.ts.map +0 -1
- package/lib/typescript/views/ListViewV2.context.d.ts +0 -37
- package/lib/typescript/views/ListViewV2.context.d.ts.map +0 -1
- package/lib/typescript/views/ListViewV2.d.ts +0 -132
- package/lib/typescript/views/ListViewV2.d.ts.map +0 -1
- package/lib/typescript/views/Wizard/Wizard.context.d.ts +0 -27
- package/lib/typescript/views/Wizard/Wizard.context.d.ts.map +0 -1
- package/lib/typescript/views/Wizard/Wizard.d.ts +0 -34
- package/lib/typescript/views/Wizard/Wizard.d.ts.map +0 -1
- package/lib/typescript/views/Wizard/index.d.ts +0 -5
- package/lib/typescript/views/Wizard/index.d.ts.map +0 -1
- package/lib/typescript/views/types/IFormView.d.ts +0 -23
- package/lib/typescript/views/types/IFormView.d.ts.map +0 -1
- package/lib/typescript/views/types/IListView.d.ts +0 -35
- package/lib/typescript/views/types/IListView.d.ts.map +0 -1
- package/lib/typescript/views/types/UIItem.d.ts +0 -22
- package/lib/typescript/views/types/UIItem.d.ts.map +0 -1
- package/lib/typescript/widgets/CircleButton.d.ts +0 -16
- package/lib/typescript/widgets/CircleButton.d.ts.map +0 -1
- package/lib/typescript/widgets/GeoPermissionCard.d.ts +0 -9
- package/lib/typescript/widgets/GeoPermissionCard.d.ts.map +0 -1
- package/lib/typescript/widgets/HomeHeader.d.ts +0 -10
- package/lib/typescript/widgets/HomeHeader.d.ts.map +0 -1
- package/lib/typescript/widgets/JSONViewer.d.ts +0 -6
- package/lib/typescript/widgets/JSONViewer.d.ts.map +0 -1
- package/lib/typescript/widgets/MenuCard.d.ts +0 -14
- package/lib/typescript/widgets/MenuCard.d.ts.map +0 -1
- package/lib/typescript/widgets/MenuGrid.d.ts +0 -18
- package/lib/typescript/widgets/MenuGrid.d.ts.map +0 -1
- package/lib/typescript/widgets/ScreenHeader.d.ts +0 -20
- package/lib/typescript/widgets/ScreenHeader.d.ts.map +0 -1
- package/lib/typescript/widgets/TimeZoneSelector.d.ts +0 -8
- package/lib/typescript/widgets/TimeZoneSelector.d.ts.map +0 -1
- package/lib/typescript/widgets/TimeZoneSelectorModal.d.ts +0 -10
- package/lib/typescript/widgets/TimeZoneSelectorModal.d.ts.map +0 -1
- package/lib/typescript/widgets/index.d.ts +0 -8
- package/lib/typescript/widgets/index.d.ts.map +0 -1
- package/sincpro_mobile_ui/Dialog/BottomSheet/BottomSheet.Root.tsx +0 -509
- package/sincpro_mobile_ui/Dialog/BottomSheet/index.ts +0 -1
- package/sincpro_mobile_ui/Dialog/Confirmation.context.tsx +0 -148
- package/sincpro_mobile_ui/Dialog/Dialog.Confirmation.tsx +0 -68
- package/sincpro_mobile_ui/Dialog/Dialog.EditValue.tsx +0 -134
- package/sincpro_mobile_ui/Dialog/index.ts +0 -23
- package/sincpro_mobile_ui/Display/Display.Avatar.tsx +0 -60
- package/sincpro_mobile_ui/Display/Display.Badge.tsx +0 -72
- package/sincpro_mobile_ui/Display/Display.CopyableText.tsx +0 -38
- package/sincpro_mobile_ui/Display/Display.CountRecords.tsx +0 -26
- package/sincpro_mobile_ui/Display/Display.Date.tsx +0 -59
- package/sincpro_mobile_ui/Display/Display.Divider.tsx +0 -40
- package/sincpro_mobile_ui/Display/Display.Icon.tsx +0 -69
- package/sincpro_mobile_ui/Display/Display.Logo.tsx +0 -51
- package/sincpro_mobile_ui/Display/Display.MenuButton.tsx +0 -103
- package/sincpro_mobile_ui/Display/Display.Monetary.tsx +0 -60
- package/sincpro_mobile_ui/Display/index.ts +0 -28
- package/sincpro_mobile_ui/Feedback/ErrorBoundary.tsx +0 -51
- package/sincpro_mobile_ui/Feedback/Feedback.DomainSplashScreen.tsx +0 -135
- package/sincpro_mobile_ui/Feedback/Feedback.Empty.tsx +0 -29
- package/sincpro_mobile_ui/Feedback/Feedback.Error.tsx +0 -47
- package/sincpro_mobile_ui/Feedback/Feedback.Loading.tsx +0 -27
- package/sincpro_mobile_ui/Feedback/Feedback.Spinner.tsx +0 -34
- package/sincpro_mobile_ui/Feedback/Feedback.Splash.tsx +0 -68
- package/sincpro_mobile_ui/Feedback/index.ts +0 -17
- package/sincpro_mobile_ui/Form/Form.Button.tsx +0 -461
- package/sincpro_mobile_ui/Form/Form.Checkbox.tsx +0 -89
- package/sincpro_mobile_ui/Form/Form.ControlledCheckbox.tsx +0 -34
- package/sincpro_mobile_ui/Form/Form.ControlledDropdown.tsx +0 -22
- package/sincpro_mobile_ui/Form/Form.ControlledInput.tsx +0 -53
- package/sincpro_mobile_ui/Form/Form.ControlledMonetaryInput.tsx +0 -41
- package/sincpro_mobile_ui/Form/Form.ControlledRadioButton.tsx +0 -33
- package/sincpro_mobile_ui/Form/Form.Dropdown.tsx +0 -171
- package/sincpro_mobile_ui/Form/Form.FilterButton.tsx +0 -59
- package/sincpro_mobile_ui/Form/Form.FractionalQuantityInput.tsx +0 -190
- package/sincpro_mobile_ui/Form/Form.IconButton.tsx +0 -102
- package/sincpro_mobile_ui/Form/Form.Input.tsx +0 -88
- package/sincpro_mobile_ui/Form/Form.InputField.tsx +0 -66
- package/sincpro_mobile_ui/Form/Form.MonetaryInput.tsx +0 -66
- package/sincpro_mobile_ui/Form/Form.PasswordInput.tsx +0 -42
- package/sincpro_mobile_ui/Form/Form.QuantitySelector.tsx +0 -81
- package/sincpro_mobile_ui/Form/Form.RadioButton.tsx +0 -52
- package/sincpro_mobile_ui/Form/Form.SearchBar.tsx +0 -64
- package/sincpro_mobile_ui/Form/Form.TextInput.tsx +0 -26
- package/sincpro_mobile_ui/Form/index.ts +0 -46
- package/sincpro_mobile_ui/Navigation/Navigation.Header.tsx +0 -50
- package/sincpro_mobile_ui/Navigation/Navigation.HeaderToolbar.tsx +0 -111
- package/sincpro_mobile_ui/Navigation/Navigation.RowItem.tsx +0 -33
- package/sincpro_mobile_ui/Navigation/Navigation.TabIcon.tsx +0 -45
- package/sincpro_mobile_ui/Navigation/Navigation.TabItem.tsx +0 -43
- package/sincpro_mobile_ui/Navigation/index.ts +0 -15
- package/sincpro_mobile_ui/Typography/Typography.Heading.tsx +0 -20
- package/sincpro_mobile_ui/Typography/Typography.Text.tsx +0 -78
- package/sincpro_mobile_ui/Typography/index.ts +0 -11
- package/sincpro_mobile_ui/icons/AddItemIcon.tsx +0 -46
- package/sincpro_mobile_ui/icons/ArrangeCircle.tsx +0 -50
- package/sincpro_mobile_ui/icons/ArrowDownIcon.tsx +0 -33
- package/sincpro_mobile_ui/icons/ArrowUpIcon.tsx +0 -33
- package/sincpro_mobile_ui/icons/BoxIcon.tsx +0 -32
- package/sincpro_mobile_ui/icons/BoxTimeIcon.tsx +0 -27
- package/sincpro_mobile_ui/icons/CalendarIcon.tsx +0 -85
- package/sincpro_mobile_ui/icons/CardIcon.tsx +0 -44
- package/sincpro_mobile_ui/icons/CashierIcon.tsx +0 -15
- package/sincpro_mobile_ui/icons/CreditIcon.tsx +0 -44
- package/sincpro_mobile_ui/icons/DuoIcon.tsx +0 -39
- package/sincpro_mobile_ui/icons/HomeIcon.tsx +0 -15
- package/sincpro_mobile_ui/icons/HomeIconOutlined.tsx +0 -24
- package/sincpro_mobile_ui/icons/LogoIcon.tsx +0 -39
- package/sincpro_mobile_ui/icons/MoneyReceiveIcon.tsx +0 -46
- package/sincpro_mobile_ui/icons/OdooIcon.tsx +0 -23
- package/sincpro_mobile_ui/icons/PinIcon.tsx +0 -15
- package/sincpro_mobile_ui/icons/PrinterIcon.tsx +0 -46
- package/sincpro_mobile_ui/icons/ProfileIcon.tsx +0 -19
- package/sincpro_mobile_ui/icons/SettingsIcon.tsx +0 -66
- package/sincpro_mobile_ui/icons/SinpeIcon.tsx +0 -29
- package/sincpro_mobile_ui/icons/ToggleOffIcon.tsx +0 -25
- package/sincpro_mobile_ui/icons/WalletMoneyIcon.tsx +0 -41
- package/sincpro_mobile_ui/icons/icon_getters.tsx +0 -27
- package/sincpro_mobile_ui/icons/props.ts +0 -4
- package/sincpro_mobile_ui/index.ts +0 -38
- package/sincpro_mobile_ui/layouts/AuthContainer.tsx +0 -73
- package/sincpro_mobile_ui/layouts/Container.tsx +0 -40
- package/sincpro_mobile_ui/layouts/GradientContainer.tsx +0 -22
- package/sincpro_mobile_ui/layouts/PlainLayout.tsx +0 -14
- package/sincpro_mobile_ui/layouts/ScrollContainer.tsx +0 -37
- package/sincpro_mobile_ui/layouts/TabNavigatorLayout.tsx +0 -154
- package/sincpro_mobile_ui/lib/date.ts +0 -149
- package/sincpro_mobile_ui/lib/icon.ts +0 -10
- package/sincpro_mobile_ui/lib/monetary.ts +0 -33
- package/sincpro_mobile_ui/lib/quantity.ts +0 -52
- package/sincpro_mobile_ui/lib/serializer.ts +0 -59
- package/sincpro_mobile_ui/lib/timezone.ts +0 -4
- package/sincpro_mobile_ui/nativewind-env.d.ts +0 -1
- package/sincpro_mobile_ui/notifications/index.ts +0 -2
- package/sincpro_mobile_ui/primitives/BaseButton.tsx +0 -404
- package/sincpro_mobile_ui/primitives/Box.tsx +0 -14
- package/sincpro_mobile_ui/primitives/Row.tsx +0 -55
- package/sincpro_mobile_ui/primitives/Stack.tsx +0 -29
- package/sincpro_mobile_ui/primitives/index.ts +0 -3
- package/sincpro_mobile_ui/providers/index.ts +0 -1
- package/sincpro_mobile_ui/theme/active.ts +0 -12
- package/sincpro_mobile_ui/theme/components/ThemedActivityIndicator.tsx +0 -29
- package/sincpro_mobile_ui/theme/components/index.ts +0 -10
- package/sincpro_mobile_ui/theme/default.ts +0 -81
- package/sincpro_mobile_ui/theme/globals.css +0 -67
- package/sincpro_mobile_ui/theme/index.ts +0 -4
- package/sincpro_mobile_ui/theme/theme.ts +0 -16
- package/sincpro_mobile_ui/theme/tw.ts +0 -16
- package/sincpro_mobile_ui/theme/types.ts +0 -109
- package/sincpro_mobile_ui/theme/typography.ts +0 -271
- package/sincpro_mobile_ui/theme/useTheme.ts +0 -3
- package/sincpro_mobile_ui/views/AuthFormView.tsx +0 -46
- package/sincpro_mobile_ui/views/FormViewV2.context.tsx +0 -79
- package/sincpro_mobile_ui/views/FormViewV2.tsx +0 -248
- package/sincpro_mobile_ui/views/ListViewV2.context.tsx +0 -87
- package/sincpro_mobile_ui/views/ListViewV2.tsx +0 -575
- package/sincpro_mobile_ui/views/Wizard/Wizard.context.tsx +0 -164
- package/sincpro_mobile_ui/views/Wizard/Wizard.tsx +0 -147
- package/sincpro_mobile_ui/views/Wizard/index.ts +0 -11
- package/sincpro_mobile_ui/views/types/IFormView.ts +0 -24
- package/sincpro_mobile_ui/views/types/IListView.ts +0 -78
- package/sincpro_mobile_ui/views/types/UIItem.ts +0 -23
- package/sincpro_mobile_ui/widgets/CircleButton.tsx +0 -63
- package/sincpro_mobile_ui/widgets/GeoPermissionCard.tsx +0 -62
- package/sincpro_mobile_ui/widgets/HomeHeader.tsx +0 -50
- package/sincpro_mobile_ui/widgets/JSONViewer.tsx +0 -192
- package/sincpro_mobile_ui/widgets/MenuCard.tsx +0 -37
- package/sincpro_mobile_ui/widgets/MenuGrid.tsx +0 -33
- package/sincpro_mobile_ui/widgets/ScreenHeader.tsx +0 -72
- package/sincpro_mobile_ui/widgets/TimeZoneSelector.tsx +0 -83
- package/sincpro_mobile_ui/widgets/TimeZoneSelectorModal.tsx +0 -179
- package/sincpro_mobile_ui/widgets/index.ts +0 -7
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { type VariantProps } from "../theme/tw";
|
|
2
|
+
import type React from "react";
|
|
3
|
+
declare const button: import("tailwind-variants").TVReturnType<{
|
|
4
|
+
variant: {
|
|
5
|
+
primary: string;
|
|
6
|
+
accent: string;
|
|
7
|
+
secondary: string;
|
|
8
|
+
outline: string;
|
|
9
|
+
outlineDanger: string;
|
|
10
|
+
outlineBlack: string;
|
|
11
|
+
flat: string;
|
|
12
|
+
link: string;
|
|
13
|
+
transparent: string;
|
|
14
|
+
};
|
|
15
|
+
size: {
|
|
16
|
+
small: string;
|
|
17
|
+
medium: string;
|
|
18
|
+
large: string;
|
|
19
|
+
};
|
|
20
|
+
disabled: {
|
|
21
|
+
true: string;
|
|
22
|
+
};
|
|
23
|
+
}, undefined, "rounded-lg items-center justify-center flex-row min-h-[44px]", {
|
|
24
|
+
variant: {
|
|
25
|
+
primary: string;
|
|
26
|
+
accent: string;
|
|
27
|
+
secondary: string;
|
|
28
|
+
outline: string;
|
|
29
|
+
outlineDanger: string;
|
|
30
|
+
outlineBlack: string;
|
|
31
|
+
flat: string;
|
|
32
|
+
link: string;
|
|
33
|
+
transparent: string;
|
|
34
|
+
};
|
|
35
|
+
size: {
|
|
36
|
+
small: string;
|
|
37
|
+
medium: string;
|
|
38
|
+
large: string;
|
|
39
|
+
};
|
|
40
|
+
disabled: {
|
|
41
|
+
true: string;
|
|
42
|
+
};
|
|
43
|
+
}, undefined, import("tailwind-variants").TVReturnType<{
|
|
44
|
+
variant: {
|
|
45
|
+
primary: string;
|
|
46
|
+
accent: string;
|
|
47
|
+
secondary: string;
|
|
48
|
+
outline: string;
|
|
49
|
+
outlineDanger: string;
|
|
50
|
+
outlineBlack: string;
|
|
51
|
+
flat: string;
|
|
52
|
+
link: string;
|
|
53
|
+
transparent: string;
|
|
54
|
+
};
|
|
55
|
+
size: {
|
|
56
|
+
small: string;
|
|
57
|
+
medium: string;
|
|
58
|
+
large: string;
|
|
59
|
+
};
|
|
60
|
+
disabled: {
|
|
61
|
+
true: string;
|
|
62
|
+
};
|
|
63
|
+
}, undefined, "rounded-lg items-center justify-center flex-row min-h-[44px]", unknown, unknown, undefined>>;
|
|
64
|
+
declare const buttonIcon: import("tailwind-variants").TVReturnType<{
|
|
65
|
+
variant: {
|
|
66
|
+
primary: string;
|
|
67
|
+
accent: string;
|
|
68
|
+
secondary: string;
|
|
69
|
+
outline: string;
|
|
70
|
+
outlineDanger: string;
|
|
71
|
+
outlineBlack: string;
|
|
72
|
+
flat: string;
|
|
73
|
+
link: string;
|
|
74
|
+
transparent: string;
|
|
75
|
+
};
|
|
76
|
+
size: {
|
|
77
|
+
small: string;
|
|
78
|
+
medium: string;
|
|
79
|
+
large: string;
|
|
80
|
+
};
|
|
81
|
+
disabled: {
|
|
82
|
+
true: string;
|
|
83
|
+
};
|
|
84
|
+
}, undefined, "rounded-lg items-center justify-center aspect-square", {
|
|
85
|
+
variant: {
|
|
86
|
+
primary: string;
|
|
87
|
+
accent: string;
|
|
88
|
+
secondary: string;
|
|
89
|
+
outline: string;
|
|
90
|
+
outlineDanger: string;
|
|
91
|
+
outlineBlack: string;
|
|
92
|
+
flat: string;
|
|
93
|
+
link: string;
|
|
94
|
+
transparent: string;
|
|
95
|
+
};
|
|
96
|
+
size: {
|
|
97
|
+
small: string;
|
|
98
|
+
medium: string;
|
|
99
|
+
large: string;
|
|
100
|
+
};
|
|
101
|
+
disabled: {
|
|
102
|
+
true: string;
|
|
103
|
+
};
|
|
104
|
+
}, undefined, import("tailwind-variants").TVReturnType<{
|
|
105
|
+
variant: {
|
|
106
|
+
primary: string;
|
|
107
|
+
accent: string;
|
|
108
|
+
secondary: string;
|
|
109
|
+
outline: string;
|
|
110
|
+
outlineDanger: string;
|
|
111
|
+
outlineBlack: string;
|
|
112
|
+
flat: string;
|
|
113
|
+
link: string;
|
|
114
|
+
transparent: string;
|
|
115
|
+
};
|
|
116
|
+
size: {
|
|
117
|
+
small: string;
|
|
118
|
+
medium: string;
|
|
119
|
+
large: string;
|
|
120
|
+
};
|
|
121
|
+
disabled: {
|
|
122
|
+
true: string;
|
|
123
|
+
};
|
|
124
|
+
}, undefined, "rounded-lg items-center justify-center aspect-square", unknown, unknown, undefined>>;
|
|
125
|
+
export interface ButtonProps extends VariantProps<typeof button> {
|
|
126
|
+
title: string;
|
|
127
|
+
onPress?: () => void;
|
|
128
|
+
confirm?: string;
|
|
129
|
+
loading?: boolean;
|
|
130
|
+
disabled?: boolean;
|
|
131
|
+
className?: string;
|
|
132
|
+
icon?: React.ReactNode;
|
|
133
|
+
}
|
|
134
|
+
export interface ButtonIconProps extends VariantProps<typeof buttonIcon> {
|
|
135
|
+
icon: string;
|
|
136
|
+
onPress?: () => void;
|
|
137
|
+
confirm?: string;
|
|
138
|
+
loading?: boolean;
|
|
139
|
+
disabled?: boolean;
|
|
140
|
+
className?: string;
|
|
141
|
+
}
|
|
142
|
+
declare const ButtonWithIcon: React.FC<ButtonProps> & {
|
|
143
|
+
Icon: React.FC<ButtonIconProps>;
|
|
144
|
+
};
|
|
145
|
+
export default ButtonWithIcon;
|
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useConfirmationContext } from "../Dialog/Confirmation.context";
|
|
3
|
+
import { Display } from "../Display";
|
|
4
|
+
import { theme } from "../theme";
|
|
5
|
+
import { tv } from "../theme/tw";
|
|
6
|
+
import { Typography } from "../Typography";
|
|
7
|
+
import { LinearGradient } from "expo-linear-gradient";
|
|
8
|
+
import { useCallback } from "react";
|
|
9
|
+
import { ActivityIndicator, TouchableOpacity, View } from "react-native";
|
|
10
|
+
import { runOnJS } from "react-native-reanimated";
|
|
11
|
+
// ============================================================================
|
|
12
|
+
// STYLE VARIANTS
|
|
13
|
+
// ============================================================================
|
|
14
|
+
const button = tv({
|
|
15
|
+
base: "rounded-lg items-center justify-center flex-row min-h-[44px]",
|
|
16
|
+
variants: {
|
|
17
|
+
variant: {
|
|
18
|
+
primary: "shadow-sm",
|
|
19
|
+
accent: "shadow-sm",
|
|
20
|
+
secondary: "bg-bg-card border border-primary shadow-sm",
|
|
21
|
+
outline: "bg-transparent border border-primary",
|
|
22
|
+
outlineDanger: "bg-transparent border border-danger",
|
|
23
|
+
outlineBlack: "bg-transparent border border-border-strong",
|
|
24
|
+
flat: "bg-text-primary/10",
|
|
25
|
+
link: "bg-transparent min-h-0",
|
|
26
|
+
transparent: "bg-transparent border border-border-light",
|
|
27
|
+
},
|
|
28
|
+
size: {
|
|
29
|
+
small: "py-1.5 px-3 min-h-[36px]",
|
|
30
|
+
medium: "py-2.5 px-4 min-h-[44px]",
|
|
31
|
+
large: "py-3 px-5 min-h-[48px]",
|
|
32
|
+
},
|
|
33
|
+
disabled: {
|
|
34
|
+
true: "opacity-70",
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
defaultVariants: {
|
|
38
|
+
variant: "primary",
|
|
39
|
+
size: "medium",
|
|
40
|
+
},
|
|
41
|
+
});
|
|
42
|
+
const buttonIcon = tv({
|
|
43
|
+
base: "rounded-lg items-center justify-center aspect-square",
|
|
44
|
+
variants: {
|
|
45
|
+
variant: {
|
|
46
|
+
primary: "shadow-sm",
|
|
47
|
+
accent: "shadow-sm",
|
|
48
|
+
secondary: "bg-bg-card border border-primary shadow-sm",
|
|
49
|
+
outline: "bg-transparent border border-primary",
|
|
50
|
+
outlineDanger: "bg-transparent border border-danger",
|
|
51
|
+
outlineBlack: "bg-transparent border border-border-strong",
|
|
52
|
+
flat: "bg-text-primary/10",
|
|
53
|
+
link: "bg-transparent",
|
|
54
|
+
transparent: "bg-transparent border border-border-light",
|
|
55
|
+
},
|
|
56
|
+
size: {
|
|
57
|
+
small: "w-9 h-9",
|
|
58
|
+
medium: "w-11 h-11",
|
|
59
|
+
large: "w-[52px] h-[52px]",
|
|
60
|
+
},
|
|
61
|
+
disabled: {
|
|
62
|
+
true: "opacity-70",
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
defaultVariants: {
|
|
66
|
+
variant: "primary",
|
|
67
|
+
size: "medium",
|
|
68
|
+
},
|
|
69
|
+
});
|
|
70
|
+
const textColor = tv({
|
|
71
|
+
variants: {
|
|
72
|
+
variant: {
|
|
73
|
+
primary: "text-white",
|
|
74
|
+
accent: "text-white",
|
|
75
|
+
secondary: "text-primary",
|
|
76
|
+
outline: "text-primary",
|
|
77
|
+
outlineDanger: "text-danger",
|
|
78
|
+
outlineBlack: "text-text-primary",
|
|
79
|
+
flat: "text-text-primary",
|
|
80
|
+
link: "text-primary",
|
|
81
|
+
transparent: "text-white",
|
|
82
|
+
},
|
|
83
|
+
disabled: {
|
|
84
|
+
true: "opacity-50",
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
compoundVariants: [
|
|
88
|
+
{
|
|
89
|
+
variant: "primary",
|
|
90
|
+
disabled: true,
|
|
91
|
+
className: "text-white/70",
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
variant: "accent",
|
|
95
|
+
disabled: true,
|
|
96
|
+
className: "text-white/70",
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
variant: "transparent",
|
|
100
|
+
disabled: true,
|
|
101
|
+
className: "text-white/70",
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
variant: ["secondary", "outline", "link"],
|
|
105
|
+
disabled: true,
|
|
106
|
+
className: "text-text-secondary",
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
variant: "outlineDanger",
|
|
110
|
+
disabled: true,
|
|
111
|
+
className: "text-danger/50",
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
variant: "outlineBlack",
|
|
115
|
+
disabled: true,
|
|
116
|
+
className: "text-text-primary/50",
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
variant: "flat",
|
|
120
|
+
disabled: true,
|
|
121
|
+
className: "text-text-primary/50",
|
|
122
|
+
},
|
|
123
|
+
],
|
|
124
|
+
defaultVariants: {
|
|
125
|
+
variant: "primary",
|
|
126
|
+
disabled: false,
|
|
127
|
+
},
|
|
128
|
+
});
|
|
129
|
+
// ============================================================================
|
|
130
|
+
// COLOR & SIZE MAPS (Dynamic with theme)
|
|
131
|
+
// ============================================================================
|
|
132
|
+
function getLoadingColorDynamic(variant) {
|
|
133
|
+
const map = {
|
|
134
|
+
primary: theme.text.inverse,
|
|
135
|
+
accent: theme.text.inverse,
|
|
136
|
+
secondary: theme.primary,
|
|
137
|
+
outline: theme.primary,
|
|
138
|
+
outlineDanger: theme.danger,
|
|
139
|
+
outlineBlack: theme.text.primary,
|
|
140
|
+
flat: theme.text.primary,
|
|
141
|
+
link: theme.primary,
|
|
142
|
+
transparent: theme.text.inverse,
|
|
143
|
+
};
|
|
144
|
+
return map[variant] ?? theme.text.inverse;
|
|
145
|
+
}
|
|
146
|
+
function getIconColorDynamic(variant, disabled) {
|
|
147
|
+
if (disabled) {
|
|
148
|
+
const disabledMap = {
|
|
149
|
+
primary: theme.icon.inverse + "70",
|
|
150
|
+
accent: theme.icon.inverse + "70",
|
|
151
|
+
secondary: theme.icon.disabled,
|
|
152
|
+
outline: theme.icon.disabled,
|
|
153
|
+
outlineDanger: theme.danger + "7f",
|
|
154
|
+
outlineBlack: theme.text.primary + "7f",
|
|
155
|
+
flat: theme.text.primary + "7f",
|
|
156
|
+
link: theme.icon.disabled,
|
|
157
|
+
transparent: theme.icon.inverse + "70",
|
|
158
|
+
};
|
|
159
|
+
return disabledMap[variant] ?? theme.icon.disabled;
|
|
160
|
+
}
|
|
161
|
+
const enabledMap = {
|
|
162
|
+
primary: theme.icon.inverse,
|
|
163
|
+
accent: theme.icon.inverse,
|
|
164
|
+
secondary: theme.primary,
|
|
165
|
+
outline: theme.primary,
|
|
166
|
+
outlineDanger: theme.danger,
|
|
167
|
+
outlineBlack: theme.text.primary,
|
|
168
|
+
flat: theme.text.primary,
|
|
169
|
+
link: theme.primary,
|
|
170
|
+
transparent: theme.icon.inverse,
|
|
171
|
+
};
|
|
172
|
+
return enabledMap[variant] ?? theme.icon.inverse;
|
|
173
|
+
}
|
|
174
|
+
const iconSizeMap = {
|
|
175
|
+
small: 16,
|
|
176
|
+
medium: 20,
|
|
177
|
+
large: 28,
|
|
178
|
+
};
|
|
179
|
+
const textVariantMap = {
|
|
180
|
+
small: "buttonSmall",
|
|
181
|
+
medium: "button",
|
|
182
|
+
large: "buttonLarge",
|
|
183
|
+
};
|
|
184
|
+
// ============================================================================
|
|
185
|
+
// HELPER FUNCTIONS
|
|
186
|
+
// ============================================================================
|
|
187
|
+
function getLoadingColor(variant) {
|
|
188
|
+
return getLoadingColorDynamic(variant);
|
|
189
|
+
}
|
|
190
|
+
function getIconColor(variant, disabled) {
|
|
191
|
+
return getIconColorDynamic(variant, disabled);
|
|
192
|
+
}
|
|
193
|
+
function getIconSize(size) {
|
|
194
|
+
return iconSizeMap[size] ?? 20;
|
|
195
|
+
}
|
|
196
|
+
function getTextVariant(size) {
|
|
197
|
+
return textVariantMap[size] ?? "button";
|
|
198
|
+
}
|
|
199
|
+
const Button = ({ title, onPress, confirm, variant = "primary", size = "medium", loading = false, disabled = false, className, icon, }) => {
|
|
200
|
+
const { show, hide } = useConfirmationContext();
|
|
201
|
+
const textColorClass = textColor({
|
|
202
|
+
variant: variant ?? "primary",
|
|
203
|
+
disabled,
|
|
204
|
+
});
|
|
205
|
+
const loadingColorValue = getLoadingColor(variant ?? "primary");
|
|
206
|
+
const textVariantValue = getTextVariant(size ?? "medium");
|
|
207
|
+
const handlePress = useCallback(() => {
|
|
208
|
+
if (confirm && onPress) {
|
|
209
|
+
show({
|
|
210
|
+
title: "Confirmar acción",
|
|
211
|
+
message: confirm,
|
|
212
|
+
confirmText: "Confirmar",
|
|
213
|
+
cancelText: "Cancelar",
|
|
214
|
+
onConfirm: () => {
|
|
215
|
+
hide();
|
|
216
|
+
runOnJS(onPress)();
|
|
217
|
+
},
|
|
218
|
+
onCancel: () => hide(),
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
else if (onPress) {
|
|
222
|
+
runOnJS(onPress)();
|
|
223
|
+
}
|
|
224
|
+
}, [onPress, confirm, show, hide]);
|
|
225
|
+
if (variant === "link") {
|
|
226
|
+
return (_jsx(TouchableOpacity, { activeOpacity: 0.7, className: className, disabled: disabled || loading, onPress: handlePress, children: loading ? (_jsx(ActivityIndicator, { color: loadingColorValue, size: "small" })) : (_jsx(Typography.Text, { className: textColorClass, variant: textVariantValue, children: title })) }));
|
|
227
|
+
}
|
|
228
|
+
if (variant === "primary" || variant === "accent") {
|
|
229
|
+
const gradientColors = variant === "primary" ? theme.gradient.primary : theme.gradient.accent;
|
|
230
|
+
return (_jsx(LinearGradient, { colors: gradientColors, end: { x: 1, y: 1 }, start: { x: 0, y: 0 }, style: {
|
|
231
|
+
borderRadius: 8,
|
|
232
|
+
opacity: disabled ? 0.7 : 1,
|
|
233
|
+
}, children: _jsx(TouchableOpacity, { activeOpacity: 0.8, disabled: disabled || loading, onPress: handlePress, children: _jsx(View, { className: button({ size, disabled }), style: { backgroundColor: "transparent" }, children: loading ? (_jsx(ActivityIndicator, { color: loadingColorValue, size: "small" })) : (_jsxs(_Fragment, { children: [icon ? _jsx(View, { className: "mr-2", children: icon }) : null, _jsx(Typography.Text, { allowFontScaling: false, bold: true, className: textColorClass, ellipsizeMode: "tail", numberOfLines: 1, variant: textVariantValue, children: title })] })) }) }) }));
|
|
234
|
+
}
|
|
235
|
+
return (_jsx(TouchableOpacity, { activeOpacity: 0.8, className: button({ variant, size, disabled, className }), disabled: disabled || loading, onPress: handlePress, children: loading ? (_jsx(ActivityIndicator, { color: loadingColorValue, size: "small" })) : (_jsxs(_Fragment, { children: [icon ? _jsx(View, { className: "mr-2", children: icon }) : null, _jsx(Typography.Text, { allowFontScaling: false, bold: true, className: textColorClass, ellipsizeMode: "tail", numberOfLines: 1, variant: textVariantValue, children: title })] })) }));
|
|
236
|
+
};
|
|
237
|
+
const ButtonIcon = ({ icon, onPress, confirm, variant = "primary", size = "medium", loading = false, disabled = false, className, }) => {
|
|
238
|
+
const { show, hide } = useConfirmationContext();
|
|
239
|
+
const iconColorValue = getIconColor(variant ?? "primary", disabled);
|
|
240
|
+
const iconSizeValue = getIconSize(size ?? "medium");
|
|
241
|
+
const loadingColorValue = getLoadingColor(variant ?? "primary");
|
|
242
|
+
const handlePress = useCallback(() => {
|
|
243
|
+
if (confirm && onPress) {
|
|
244
|
+
show({
|
|
245
|
+
title: "Confirmar acción",
|
|
246
|
+
message: confirm,
|
|
247
|
+
confirmText: "Confirmar",
|
|
248
|
+
cancelText: "Cancelar",
|
|
249
|
+
onConfirm: () => {
|
|
250
|
+
hide();
|
|
251
|
+
runOnJS(onPress)();
|
|
252
|
+
},
|
|
253
|
+
onCancel: () => hide(),
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
else if (onPress) {
|
|
257
|
+
runOnJS(onPress)();
|
|
258
|
+
}
|
|
259
|
+
}, [onPress, confirm, show, hide]);
|
|
260
|
+
if (variant === "primary") {
|
|
261
|
+
return (_jsx(LinearGradient, { colors: disabled ? ["#93c5fd", "#60a5fa"] : ["#2563eb", "#1d4ed8"], end: { x: 1, y: 1 }, start: { x: 0, y: 0 }, style: {
|
|
262
|
+
borderRadius: 8,
|
|
263
|
+
opacity: disabled ? 0.7 : 1,
|
|
264
|
+
}, children: _jsx(TouchableOpacity, { activeOpacity: 0.8, disabled: disabled || loading, onPress: handlePress, children: _jsx(View, { className: buttonIcon({ size, disabled }), style: { backgroundColor: "transparent" }, children: loading ? (_jsx(ActivityIndicator, { color: loadingColorValue, size: "small" })) : (_jsx(Display.Icon, { color: iconColorValue, name: icon, size: iconSizeValue })) }) }) }));
|
|
265
|
+
}
|
|
266
|
+
return (_jsx(TouchableOpacity, { activeOpacity: 0.8, className: buttonIcon({ variant, size, disabled, className }), disabled: disabled || loading, onPress: handlePress, children: loading ? (_jsx(ActivityIndicator, { color: loadingColorValue, size: "small" })) : (_jsx(Display.Icon, { color: iconColorValue, name: icon, size: iconSizeValue })) }));
|
|
267
|
+
};
|
|
268
|
+
// ============================================================================
|
|
269
|
+
// COMPOUND COMPONENT
|
|
270
|
+
// ============================================================================
|
|
271
|
+
const ButtonWithIcon = Object.assign(Button, { Icon: ButtonIcon });
|
|
272
|
+
export default ButtonWithIcon;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
interface RowCheckBoxProps {
|
|
2
|
+
mainText?: string;
|
|
3
|
+
subText?: string;
|
|
4
|
+
rightText?: string;
|
|
5
|
+
leftComponent?: React.ReactNode;
|
|
6
|
+
rightComponent?: React.ReactNode;
|
|
7
|
+
isChecked?: boolean;
|
|
8
|
+
onCheck?: (isChecked: boolean) => void;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
declare function RowCheckBox({ mainText, subText, rightText, rightComponent, leftComponent, isChecked, onCheck, disabled, className, }: RowCheckBoxProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export default RowCheckBox;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { theme } from "../theme";
|
|
3
|
+
import { cn } from "../theme/tw";
|
|
4
|
+
import { Typography } from "../Typography";
|
|
5
|
+
import { Checkbox } from "expo-checkbox";
|
|
6
|
+
import { Pressable, View } from "react-native";
|
|
7
|
+
function RowCheckBox({ mainText, subText, rightText, rightComponent, leftComponent, isChecked = false, onCheck = () => { }, disabled = false, className, }) {
|
|
8
|
+
const handlePress = () => {
|
|
9
|
+
if (!disabled) {
|
|
10
|
+
onCheck(!isChecked);
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
const renderLeftComponent = () => {
|
|
14
|
+
if (leftComponent) {
|
|
15
|
+
return leftComponent;
|
|
16
|
+
}
|
|
17
|
+
return (_jsxs(_Fragment, { children: [mainText && _jsx(Typography.Text, { semibold: true, children: mainText }), subText && (_jsx(Typography.Text, { className: "text-text-secondary", variant: "bodySmall", children: subText }))] }));
|
|
18
|
+
};
|
|
19
|
+
const renderRightComponent = () => {
|
|
20
|
+
if (rightComponent) {
|
|
21
|
+
return rightComponent;
|
|
22
|
+
}
|
|
23
|
+
if (rightText) {
|
|
24
|
+
return _jsx(Typography.Text, { variant: "body", children: rightText });
|
|
25
|
+
}
|
|
26
|
+
return null;
|
|
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.primary, disabled: disabled, pointerEvents: "none", value: isChecked })] })] }));
|
|
29
|
+
}
|
|
30
|
+
export default RowCheckBox;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Control, FieldValues, Path } from "react-hook-form";
|
|
2
|
+
interface ControlledCheckboxProps<T extends FieldValues> {
|
|
3
|
+
control: Control<T>;
|
|
4
|
+
name: Path<T>;
|
|
5
|
+
label: string;
|
|
6
|
+
subText?: string;
|
|
7
|
+
}
|
|
8
|
+
declare function ControlledCheckbox<T extends FieldValues>({ control, name, label, subText, }: ControlledCheckboxProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export default ControlledCheckbox;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import Checkbox from "../Form/Form.Checkbox";
|
|
3
|
+
import { Controller } from "react-hook-form";
|
|
4
|
+
function ControlledCheckbox({ control, name, label, subText, }) {
|
|
5
|
+
return (_jsx(Controller, { control: control, name: name, render: ({ field: { onChange, value } }) => (_jsx(Checkbox, { isChecked: value || false, mainText: label, onCheck: onChange, subText: subText })) }));
|
|
6
|
+
}
|
|
7
|
+
export default ControlledCheckbox;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Control, FieldValues, Path } from "react-hook-form";
|
|
2
|
+
export interface DropdownOption {
|
|
3
|
+
value: string;
|
|
4
|
+
label: string;
|
|
5
|
+
}
|
|
6
|
+
interface ControlledDropdownProps<T extends FieldValues> {
|
|
7
|
+
control: Control<T>;
|
|
8
|
+
name: Path<T>;
|
|
9
|
+
label: string;
|
|
10
|
+
options: DropdownOption[];
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
}
|
|
13
|
+
declare function ControlledDropdown<T extends FieldValues>(_props: ControlledDropdownProps<T>): void;
|
|
14
|
+
export default ControlledDropdown;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Control, FieldValues, Path } from "react-hook-form";
|
|
2
|
+
interface ControlledInputProps<T extends FieldValues> {
|
|
3
|
+
control: Control<T>;
|
|
4
|
+
name: Path<T>;
|
|
5
|
+
label: string;
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
keyboardType?: "default" | "numeric" | "email-address" | "phone-pad";
|
|
8
|
+
autoCapitalize?: "none" | "sentences" | "words" | "characters";
|
|
9
|
+
multiline?: boolean;
|
|
10
|
+
numberOfLines?: number;
|
|
11
|
+
rules?: any;
|
|
12
|
+
error?: string;
|
|
13
|
+
}
|
|
14
|
+
declare function ControlledInput<T extends FieldValues>({ control, name, label, placeholder, keyboardType, autoCapitalize, multiline, numberOfLines, rules, error, }: ControlledInputProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export default ControlledInput;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import Input from "../Form/Form.Input";
|
|
3
|
+
import { Controller } from "react-hook-form";
|
|
4
|
+
function ControlledInput({ control, name, label, placeholder, keyboardType, autoCapitalize, multiline, numberOfLines, rules, error, }) {
|
|
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 }));
|
|
6
|
+
}
|
|
7
|
+
export default ControlledInput;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Control, FieldValues, Path } from "react-hook-form";
|
|
2
|
+
interface ControlledMonetaryInputProps<T extends FieldValues> {
|
|
3
|
+
control: Control<T>;
|
|
4
|
+
name: Path<T>;
|
|
5
|
+
label: string;
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
currency?: string;
|
|
8
|
+
rules?: any;
|
|
9
|
+
error?: string;
|
|
10
|
+
}
|
|
11
|
+
declare function ControlledMonetaryInput<T extends FieldValues>({ control, name, label, placeholder, currency, rules, error, }: ControlledMonetaryInputProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export default ControlledMonetaryInput;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import MonetaryInput from "../Form/Form.MonetaryInput";
|
|
3
|
+
import { Controller } from "react-hook-form";
|
|
4
|
+
function ControlledMonetaryInput({ control, name, label, placeholder, currency = "CRC", rules, error, }) {
|
|
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 }));
|
|
6
|
+
}
|
|
7
|
+
export default ControlledMonetaryInput;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Control, FieldValues, Path } from "react-hook-form";
|
|
2
|
+
interface ControlledRadioButtonProps<T extends FieldValues> {
|
|
3
|
+
control: Control<T>;
|
|
4
|
+
name: Path<T>;
|
|
5
|
+
label: string;
|
|
6
|
+
value: any;
|
|
7
|
+
}
|
|
8
|
+
declare function ControlledRadioButton<T extends FieldValues>({ control, name, label, value, }: ControlledRadioButtonProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export default ControlledRadioButton;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import RadioButton from "../Form/Form.RadioButton";
|
|
3
|
+
import { Controller } from "react-hook-form";
|
|
4
|
+
function ControlledRadioButton({ control, name, label, value, }) {
|
|
5
|
+
return (_jsx(Controller, { control: control, name: name, render: ({ field: { onChange, value: selectedValue } }) => (_jsx(RadioButton, { label: label, onPress: () => onChange(value), selected: selectedValue === value })) }));
|
|
6
|
+
}
|
|
7
|
+
export default ControlledRadioButton;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface DropdownOption {
|
|
2
|
+
id: string;
|
|
3
|
+
title: string;
|
|
4
|
+
onPress: () => void;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
}
|
|
7
|
+
interface DropdownButtonProps {
|
|
8
|
+
title: string;
|
|
9
|
+
options: DropdownOption[];
|
|
10
|
+
variant?: "primary" | "secondary" | "outline";
|
|
11
|
+
size?: "xs" | "small" | "medium" | "large";
|
|
12
|
+
}
|
|
13
|
+
declare function DropdownButton({ title, options, variant, size, }: DropdownButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export default DropdownButton;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { Display } from "../Display";
|
|
3
|
+
import { theme } from "../theme";
|
|
4
|
+
import { Typography } from "../Typography";
|
|
5
|
+
import { useState } from "react";
|
|
6
|
+
import { Modal, TouchableOpacity, TouchableWithoutFeedback, View } from "react-native";
|
|
7
|
+
import { tv } from "tailwind-variants";
|
|
8
|
+
const dropdown = tv({
|
|
9
|
+
slots: {
|
|
10
|
+
button: "flex-row justify-between items-center rounded-lg px-3",
|
|
11
|
+
overlay: "flex-1 bg-black/40 justify-center items-center",
|
|
12
|
+
dropdownContainer: "rounded-xl mx-5 max-w-[320px] w-[90%] max-h-[70%]",
|
|
13
|
+
header: "flex-row justify-between items-center px-4 py-3 border-b border-border-default",
|
|
14
|
+
optionsList: "p-1",
|
|
15
|
+
option: "py-3 px-3 rounded-lg my-0.5",
|
|
16
|
+
separator: "h-[1px] bg-border-light mx-3",
|
|
17
|
+
},
|
|
18
|
+
variants: {
|
|
19
|
+
variant: {
|
|
20
|
+
primary: {
|
|
21
|
+
button: "bg-primary",
|
|
22
|
+
},
|
|
23
|
+
secondary: {
|
|
24
|
+
button: "bg-bg-card border border-primary",
|
|
25
|
+
},
|
|
26
|
+
outline: {
|
|
27
|
+
button: "bg-transparent border border-primary",
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
size: {
|
|
31
|
+
xs: {
|
|
32
|
+
button: "py-1.5 min-h-[32px]",
|
|
33
|
+
},
|
|
34
|
+
small: {
|
|
35
|
+
button: "py-2 min-h-[36px]",
|
|
36
|
+
},
|
|
37
|
+
medium: {
|
|
38
|
+
button: "py-2.5 min-h-[40px]",
|
|
39
|
+
},
|
|
40
|
+
large: {
|
|
41
|
+
button: "py-3 min-h-[44px]",
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
disabled: {
|
|
45
|
+
true: {
|
|
46
|
+
option: "opacity-50",
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
defaultVariants: {
|
|
51
|
+
variant: "secondary",
|
|
52
|
+
size: "small",
|
|
53
|
+
},
|
|
54
|
+
});
|
|
55
|
+
function DropdownButton({ title, options, variant = "secondary", size = "small", }) {
|
|
56
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
57
|
+
const handleOptionPress = (option) => {
|
|
58
|
+
if (!option.disabled) {
|
|
59
|
+
option.onPress();
|
|
60
|
+
setIsOpen(false);
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
const styles = dropdown({ variant, size });
|
|
64
|
+
const textColorClass = {
|
|
65
|
+
primary: "text-text-on-primary",
|
|
66
|
+
outline: "text-primary",
|
|
67
|
+
secondary: "text-primary",
|
|
68
|
+
}[variant];
|
|
69
|
+
const iconColor = {
|
|
70
|
+
primary: theme.text.onPrimary,
|
|
71
|
+
outline: theme.primary,
|
|
72
|
+
secondary: theme.primary,
|
|
73
|
+
}[variant];
|
|
74
|
+
const textVariant = {
|
|
75
|
+
large: "body",
|
|
76
|
+
medium: "body",
|
|
77
|
+
xs: "bodySmall",
|
|
78
|
+
small: "bodySmall",
|
|
79
|
+
}[size];
|
|
80
|
+
return (_jsxs(_Fragment, { children: [_jsxs(TouchableOpacity, { activeOpacity: 0.7, className: styles.button(), onPress: () => setIsOpen(true), children: [_jsx(Typography.Text, { className: textColorClass, variant: textVariant, children: title }), _jsx(Display.Icon, { color: iconColor, name: "chevron-down", size: 16, type: "feather" })] }), _jsx(Modal, { animationType: "fade", transparent: true, visible: isOpen, children: _jsx(TouchableWithoutFeedback, { onPress: () => setIsOpen(false), children: _jsx(View, { className: styles.overlay(), children: _jsx(TouchableWithoutFeedback, { children: _jsxs(View, { className: styles.dropdownContainer(), style: {
|
|
81
|
+
backgroundColor: theme.bg.popover,
|
|
82
|
+
...theme.shadow.lg,
|
|
83
|
+
}, children: [_jsxs(View, { className: styles.header(), children: [_jsx(Typography.Text, { className: "text-text-primary", semibold: true, variant: "bodyLarge", children: title }), _jsx(TouchableOpacity, { onPress: () => setIsOpen(false), children: _jsx(Display.Icon, { name: "x", size: 20, type: "feather" }) })] }), _jsx(View, { className: styles.optionsList(), children: options.map((option, index) => (_jsxs(View, { children: [_jsx(TouchableOpacity, { activeOpacity: 0.7, className: dropdown({ disabled: option.disabled }).option(), disabled: option.disabled, onPress: () => handleOptionPress(option), children: _jsx(Typography.Text, { className: option.disabled ? "text-text-disabled" : "text-text-primary", variant: "body", children: option.title }) }), index < options.length - 1 && _jsx(View, { className: styles.separator() })] }, option.id))) })] }) }) }) }) })] }));
|
|
84
|
+
}
|
|
85
|
+
export default DropdownButton;
|