@korsolutions/ui 0.0.53 → 0.0.55
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/babel.config.js +1 -11
- package/dist/module/components/alert/components/alert-body.js.map +1 -1
- package/dist/module/components/alert/components/alert-description.js.map +1 -1
- package/dist/module/components/alert/components/alert-icon.js.map +1 -1
- package/dist/module/components/alert/components/alert-root.js.map +1 -1
- package/dist/module/components/alert/components/alert-title.js.map +1 -1
- package/dist/module/components/alert/index.js.map +1 -1
- package/dist/module/components/alert/variants/default.js.map +1 -1
- package/dist/module/components/alert/variants/destructive.js.map +1 -1
- package/dist/module/components/alert/variants/index.js.map +1 -1
- package/dist/module/components/alert-dialog/async-alert-dialog.js.map +1 -1
- package/dist/module/components/alert-dialog/components/alert-dialog-action.js.map +1 -1
- package/dist/module/components/alert-dialog/components/alert-dialog-cancel.js.map +1 -1
- package/dist/module/components/alert-dialog/components/alert-dialog-content.js.map +1 -1
- package/dist/module/components/alert-dialog/components/alert-dialog-description.js.map +1 -1
- package/dist/module/components/alert-dialog/components/alert-dialog-footer.js.map +1 -1
- package/dist/module/components/alert-dialog/components/alert-dialog-overlay.js.map +1 -1
- package/dist/module/components/alert-dialog/components/alert-dialog-portal.js.map +1 -1
- package/dist/module/components/alert-dialog/components/alert-dialog-root.js.map +1 -1
- package/dist/module/components/alert-dialog/components/alert-dialog-title.js.map +1 -1
- package/dist/module/components/alert-dialog/components/alert-dialog-trigger.js.map +1 -1
- package/dist/module/components/alert-dialog/index.js.map +1 -1
- package/dist/module/components/alert-dialog/variants/default.js.map +1 -1
- package/dist/module/components/alert-dialog/variants/index.js.map +1 -1
- package/dist/module/components/avatar/components/avatar-fallback.js.map +1 -1
- package/dist/module/components/avatar/components/avatar-image.js.map +1 -1
- package/dist/module/components/avatar/components/avatar-root.js.map +1 -1
- package/dist/module/components/avatar/index.js.map +1 -1
- package/dist/module/components/avatar/variants/default.js.map +1 -1
- package/dist/module/components/avatar/variants/index.js.map +1 -1
- package/dist/module/components/badge/components/badge-label.js.map +1 -1
- package/dist/module/components/badge/components/badge-root.js.map +1 -1
- package/dist/module/components/badge/index.js.map +1 -1
- package/dist/module/components/badge/variants/default.js.map +1 -1
- package/dist/module/components/badge/variants/index.js.map +1 -1
- package/dist/module/components/badge/variants/secondary.js.map +1 -1
- package/dist/module/components/button/components/button-label.js.map +1 -1
- package/dist/module/components/button/components/button-root.js.map +1 -1
- package/dist/module/components/button/components/button-spinner.js.map +1 -1
- package/dist/module/components/button/index.js.map +1 -1
- package/dist/module/components/button/variants/default.js.map +1 -1
- package/dist/module/components/button/variants/index.js.map +1 -1
- package/dist/module/components/button/variants/secondary.js.map +1 -1
- package/dist/module/components/calendar/components/calendar-day.js.map +1 -1
- package/dist/module/components/calendar/components/calendar-header.js.map +1 -1
- package/dist/module/components/calendar/components/calendar-nav-button.js.map +1 -1
- package/dist/module/components/calendar/components/calendar-root.js.map +1 -1
- package/dist/module/components/calendar/components/calendar-title.js.map +1 -1
- package/dist/module/components/calendar/components/calendar-week-labels.js.map +1 -1
- package/dist/module/components/calendar/components/calendar-weeks.js.map +1 -1
- package/dist/module/components/calendar/index.js.map +1 -1
- package/dist/module/components/calendar/variants/default.js.map +1 -1
- package/dist/module/components/calendar/variants/index.js.map +1 -1
- package/dist/module/components/card/card-body.js.map +1 -1
- package/dist/module/components/card/card-footer.js.map +1 -1
- package/dist/module/components/card/card-header.js.map +1 -1
- package/dist/module/components/card/card-root.js.map +1 -1
- package/dist/module/components/card/card-title.js.map +1 -1
- package/dist/module/components/card/index.js.map +1 -1
- package/dist/module/components/card/variants/default.js.map +1 -1
- package/dist/module/components/card/variants/index.js.map +1 -1
- package/dist/module/components/checkbox/components/checkbox-content.js.map +1 -1
- package/dist/module/components/checkbox/components/checkbox-description.js.map +1 -1
- package/dist/module/components/checkbox/components/checkbox-indicator.js.map +1 -1
- package/dist/module/components/checkbox/components/checkbox-root.js.map +1 -1
- package/dist/module/components/checkbox/components/checkbox-title.js.map +1 -1
- package/dist/module/components/checkbox/index.js.map +1 -1
- package/dist/module/components/checkbox/variants/default.js.map +1 -1
- package/dist/module/components/checkbox/variants/index.js.map +1 -1
- package/dist/module/components/checkbox/variants/outlined.js.map +1 -1
- package/dist/module/components/empty/components/empty-description.js.map +1 -1
- package/dist/module/components/empty/components/empty-media.js.map +1 -1
- package/dist/module/components/empty/components/empty-root.js.map +1 -1
- package/dist/module/components/empty/components/empty-title.js.map +1 -1
- package/dist/module/components/empty/index.js.map +1 -1
- package/dist/module/components/empty/variants/default.js.map +1 -1
- package/dist/module/components/empty/variants/index.js.map +1 -1
- package/dist/module/components/field/components/field-description.js.map +1 -1
- package/dist/module/components/field/components/field-error.js.map +1 -1
- package/dist/module/components/field/components/field-label.js.map +1 -1
- package/dist/module/components/field/components/field-root.js.map +1 -1
- package/dist/module/components/field/index.js.map +1 -1
- package/dist/module/components/field/variants/default.js.map +1 -1
- package/dist/module/components/field/variants/index.js.map +1 -1
- package/dist/module/components/icon/icon.js.map +1 -1
- package/dist/module/components/icon/index.js.map +1 -1
- package/dist/module/components/icon/variants/default.js.map +1 -1
- package/dist/module/components/icon/variants/index.js.map +1 -1
- package/dist/module/components/index.js.map +1 -1
- package/dist/module/components/input/index.js.map +1 -1
- package/dist/module/components/input/input.js.map +1 -1
- package/dist/module/components/input/numeric-input.js.map +1 -1
- package/dist/module/components/input/variants/default.js.map +1 -1
- package/dist/module/components/input/variants/index.js.map +1 -1
- package/dist/module/components/input/variants/secondary.js.map +1 -1
- package/dist/module/components/link/index.js.map +1 -1
- package/dist/module/components/link/link.js.map +1 -1
- package/dist/module/components/link/variants/default.js.map +1 -1
- package/dist/module/components/link/variants/index.js.map +1 -1
- package/dist/module/components/list/index.js.map +1 -1
- package/dist/module/components/menu/components/menu-content.js.map +1 -1
- package/dist/module/components/menu/components/menu-item.js.map +1 -1
- package/dist/module/components/menu/components/menu-overlay.js.map +1 -1
- package/dist/module/components/menu/components/menu-portal.js.map +1 -1
- package/dist/module/components/menu/components/menu-root.js.map +1 -1
- package/dist/module/components/menu/components/menu-trigger.js.map +1 -1
- package/dist/module/components/menu/index.js.map +1 -1
- package/dist/module/components/menu/variants/default.js.map +1 -1
- package/dist/module/components/menu/variants/index.js.map +1 -1
- package/dist/module/components/phone-input/components/country-picker.js +101 -0
- package/dist/module/components/phone-input/components/country-picker.js.map +1 -0
- package/dist/module/components/phone-input/components/phone-input-root.js +57 -0
- package/dist/module/components/phone-input/components/phone-input-root.js.map +1 -0
- package/dist/module/components/phone-input/components/phone-input.js +31 -0
- package/dist/module/components/phone-input/components/phone-input.js.map +1 -0
- package/dist/module/components/phone-input/context.js +12 -0
- package/dist/module/components/phone-input/context.js.map +1 -0
- package/dist/module/components/phone-input/index.js +8 -1
- package/dist/module/components/phone-input/index.js.map +1 -1
- package/dist/module/components/phone-input/variants/default.js +1 -1
- package/dist/module/components/phone-input/variants/default.js.map +1 -1
- package/dist/module/components/phone-input/variants/index.js.map +1 -1
- package/dist/module/components/popover/components/popover-close.js.map +1 -1
- package/dist/module/components/popover/components/popover-content.js.map +1 -1
- package/dist/module/components/popover/components/popover-overlay.js.map +1 -1
- package/dist/module/components/popover/components/popover-portal.js.map +1 -1
- package/dist/module/components/popover/components/popover-root.js.map +1 -1
- package/dist/module/components/popover/components/popover-trigger.js.map +1 -1
- package/dist/module/components/popover/index.js.map +1 -1
- package/dist/module/components/popover/variants/default.js.map +1 -1
- package/dist/module/components/popover/variants/index.js.map +1 -1
- package/dist/module/components/popover/variants/unstyled.js.map +1 -1
- package/dist/module/components/portal/index.js.map +1 -1
- package/dist/module/components/portal/portal.js.map +1 -1
- package/dist/module/components/portal/portal.web.js.map +1 -1
- package/dist/module/components/progress/components/progress-indicator.js.map +1 -1
- package/dist/module/components/progress/components/progress-root.js.map +1 -1
- package/dist/module/components/progress/index.js.map +1 -1
- package/dist/module/components/progress/variants/default.js.map +1 -1
- package/dist/module/components/progress/variants/index.js.map +1 -1
- package/dist/module/components/scroll-bar/index.js.map +1 -1
- package/dist/module/components/scroll-bar/scroll-bar.js.map +1 -1
- package/dist/module/components/select/components/select-content.js.map +1 -1
- package/dist/module/components/select/components/select-option.js.map +1 -1
- package/dist/module/components/select/components/select-overlay.js.map +1 -1
- package/dist/module/components/select/components/select-portal.js +10 -1
- package/dist/module/components/select/components/select-portal.js.map +1 -1
- package/dist/module/components/select/components/select-root.js.map +1 -1
- package/dist/module/components/select/components/select-trigger.js +5 -4
- package/dist/module/components/select/components/select-trigger.js.map +1 -1
- package/dist/module/components/select/index.js.map +1 -1
- package/dist/module/components/select/variants/default.js.map +1 -1
- package/dist/module/components/select/variants/index.js.map +1 -1
- package/dist/module/components/tabs/components/tabs-list.js.map +1 -1
- package/dist/module/components/tabs/components/tabs-root.js.map +1 -1
- package/dist/module/components/tabs/components/tabs-trigger-text.js.map +1 -1
- package/dist/module/components/tabs/components/tabs-trigger.js.map +1 -1
- package/dist/module/components/tabs/index.js.map +1 -1
- package/dist/module/components/tabs/variants/default.js.map +1 -1
- package/dist/module/components/tabs/variants/index.js.map +1 -1
- package/dist/module/components/tabs/variants/line.js.map +1 -1
- package/dist/module/components/textarea/index.js.map +1 -1
- package/dist/module/components/textarea/textarea.js.map +1 -1
- package/dist/module/components/textarea/variants/default.js.map +1 -1
- package/dist/module/components/textarea/variants/index.js.map +1 -1
- package/dist/module/components/toast/components/toast-body.js +16 -0
- package/dist/module/components/toast/components/toast-body.js.map +1 -0
- package/dist/module/components/toast/components/toast-description.js.map +1 -1
- package/dist/module/components/toast/components/toast-icon.js.map +1 -1
- package/dist/module/components/toast/components/toast-root.js.map +1 -1
- package/dist/module/components/toast/components/toast-title.js.map +1 -1
- package/dist/module/components/toast/index.js.map +1 -1
- package/dist/module/components/toast/manager.js +15 -5
- package/dist/module/components/toast/manager.js.map +1 -1
- package/dist/module/components/toast/variants/danger.js +6 -2
- package/dist/module/components/toast/variants/danger.js.map +1 -1
- package/dist/module/components/toast/variants/default.js +6 -2
- package/dist/module/components/toast/variants/default.js.map +1 -1
- package/dist/module/components/toast/variants/index.js.map +1 -1
- package/dist/module/components/toast/variants/success.js +6 -2
- package/dist/module/components/toast/variants/success.js.map +1 -1
- package/dist/module/components/typography/index.js.map +1 -1
- package/dist/module/components/typography/typography.js.map +1 -1
- package/dist/module/components/typography/variants/body-lg.js.map +1 -1
- package/dist/module/components/typography/variants/body-md.js.map +1 -1
- package/dist/module/components/typography/variants/body-sm.js.map +1 -1
- package/dist/module/components/typography/variants/heading-lg.js.map +1 -1
- package/dist/module/components/typography/variants/heading-md.js.map +1 -1
- package/dist/module/components/typography/variants/heading-sm.js.map +1 -1
- package/dist/module/components/typography/variants/index.js.map +1 -1
- package/dist/module/data/countries.js.map +1 -1
- package/dist/module/hooks/index.js.map +1 -1
- package/dist/module/hooks/use-phone-mask.js.map +1 -1
- package/dist/module/index.js +3 -1
- package/dist/module/index.js.map +1 -1
- package/dist/module/safe-area/index.js.map +1 -1
- package/dist/module/safe-area/provider.js.map +1 -1
- package/dist/module/themes/adapters/index.js.map +1 -1
- package/dist/module/themes/adapters/react-navigation.js.map +1 -1
- package/dist/module/themes/default/index.js.map +1 -1
- package/dist/module/themes/index.js.map +1 -1
- package/dist/module/themes/provider.js +11 -2
- package/dist/module/themes/provider.js.map +1 -1
- package/dist/module/utils/use-themed-styles.js.map +1 -1
- package/dist/typescript/babel.config.d.ts +1 -6
- package/dist/typescript/babel.config.d.ts.map +1 -1
- package/dist/typescript/src/components/phone-input/components/country-picker.d.ts +3 -0
- package/dist/typescript/src/components/phone-input/components/country-picker.d.ts.map +1 -0
- package/dist/typescript/src/components/phone-input/components/phone-input-root.d.ts +17 -0
- package/dist/typescript/src/components/phone-input/components/phone-input-root.d.ts.map +1 -0
- package/dist/typescript/src/components/phone-input/components/phone-input.d.ts +8 -0
- package/dist/typescript/src/components/phone-input/components/phone-input.d.ts.map +1 -0
- package/dist/typescript/src/components/phone-input/context.d.ts +17 -0
- package/dist/typescript/src/components/phone-input/context.d.ts.map +1 -0
- package/dist/typescript/src/components/phone-input/index.d.ts +8 -1
- package/dist/typescript/src/components/phone-input/index.d.ts.map +1 -1
- package/dist/typescript/src/components/select/components/select-portal.d.ts +1 -1
- package/dist/typescript/src/components/select/components/select-portal.d.ts.map +1 -1
- package/dist/typescript/src/components/select/components/select-trigger.d.ts.map +1 -1
- package/dist/typescript/src/components/toast/components/toast-body.d.ts +9 -0
- package/dist/typescript/src/components/toast/components/toast-body.d.ts.map +1 -0
- package/dist/typescript/src/components/toast/manager.d.ts.map +1 -1
- package/dist/typescript/src/components/toast/types.d.ts +2 -0
- package/dist/typescript/src/components/toast/types.d.ts.map +1 -1
- package/dist/typescript/src/components/toast/variants/danger.d.ts.map +1 -1
- package/dist/typescript/src/components/toast/variants/default.d.ts.map +1 -1
- package/dist/typescript/src/components/toast/variants/success.d.ts.map +1 -1
- package/dist/typescript/src/data/countries.d.ts +2 -1
- package/dist/typescript/src/data/countries.d.ts.map +1 -1
- package/dist/typescript/src/hooks/use-phone-mask.d.ts +2 -2
- package/dist/typescript/src/hooks/use-phone-mask.d.ts.map +1 -1
- package/dist/typescript/src/index.d.ts +4 -3
- package/dist/typescript/src/index.d.ts.map +1 -1
- package/dist/typescript/src/themes/provider.d.ts +10 -0
- package/dist/typescript/src/themes/provider.d.ts.map +1 -1
- package/package.json +2 -7
- package/src/components/phone-input/components/country-picker.tsx +155 -0
- package/src/components/phone-input/components/phone-input-root.tsx +85 -0
- package/src/components/phone-input/components/phone-input.tsx +43 -0
- package/src/components/phone-input/context.ts +32 -0
- package/src/components/phone-input/index.ts +10 -1
- package/src/components/phone-input/variants/default.tsx +1 -1
- package/src/components/select/components/select-portal.tsx +14 -2
- package/src/components/select/components/select-trigger.tsx +5 -6
- package/src/components/toast/components/toast-body.tsx +19 -0
- package/src/components/toast/manager.tsx +15 -5
- package/src/components/toast/types.ts +2 -0
- package/src/components/toast/variants/danger.tsx +6 -2
- package/src/components/toast/variants/default.tsx +6 -2
- package/src/components/toast/variants/success.tsx +6 -2
- package/src/data/countries.ts +606 -68
- package/src/hooks/use-phone-mask.ts +2 -2
- package/src/index.tsx +9 -3
- package/src/themes/provider.tsx +22 -1
- package/dist/module/components/phone-input/phone-input.js +0 -165
- package/dist/module/components/phone-input/phone-input.js.map +0 -1
- package/dist/typescript/src/components/phone-input/phone-input.d.ts +0 -16
- package/dist/typescript/src/components/phone-input/phone-input.d.ts.map +0 -1
- package/scripts/build.sh +0 -2
- package/src/components/phone-input/phone-input.tsx +0 -220
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useTheme","useThemedStyles","callback","theme","colors","radius","fontFamily","letterSpacing","fontSize"],"sourceRoot":"../../../src","sources":["utils/use-themed-styles.ts"],"mappings":";;AAAA,SAASA,QAAQ;
|
|
1
|
+
{"version":3,"names":["useTheme","useThemedStyles","callback","theme","colors","radius","fontFamily","letterSpacing","fontSize"],"sourceRoot":"../../../src","sources":["utils/use-themed-styles.ts"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,oBAAW;AAiBpC,OAAO,MAAMC,eAAe,GAC1BC,QAAqC,IAC/B;EACN,MAAMC,KAAK,GAAGH,QAAQ,CAAC,CAAC;EACxB,OAAOE,QAAQ,CAAC;IACdE,MAAM,EAAED,KAAK,CAACC,MAAM;IACpBC,MAAM,EAAEF,KAAK,CAACE,MAAM;IACpBC,UAAU,EAAEH,KAAK,CAACG,UAAU;IAC5BC,aAAa,EAAEJ,KAAK,CAACI,aAAa;IAClCC,QAAQ,EAAEL,KAAK,CAACK;EAClB,CAAC,CAAC;AACJ,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"babel.config.d.ts","sourceRoot":"","sources":["../../babel.config.js"],"names":[],"mappings":"AAAiB
|
|
1
|
+
{"version":3,"file":"babel.config.d.ts","sourceRoot":"","sources":["../../babel.config.js"],"names":[],"mappings":"AAAiB;;;EAOhB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"country-picker.d.ts","sourceRoot":"","sources":["../../../../../../src/components/phone-input/components/country-picker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAuBxC,wBAAgB,aAAa,sBAmI5B"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { type StyleProp, type ViewStyle } from "react-native";
|
|
3
|
+
import { type CountryCode } from "../../../data/countries";
|
|
4
|
+
import { PhoneInputVariants } from "../variants";
|
|
5
|
+
export interface PhoneInputRootProps {
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
value?: string;
|
|
8
|
+
onChange?: (value: string) => void;
|
|
9
|
+
defaultCountry?: string;
|
|
10
|
+
countryCodes?: CountryCode[];
|
|
11
|
+
isDisabled?: boolean;
|
|
12
|
+
variant?: keyof typeof PhoneInputVariants;
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
style?: StyleProp<ViewStyle>;
|
|
15
|
+
}
|
|
16
|
+
export declare function PhoneInputRoot({ children, value, onChange, defaultCountry, countryCodes, isDisabled, variant, style, }: PhoneInputRootProps): React.JSX.Element;
|
|
17
|
+
//# sourceMappingURL=phone-input-root.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"phone-input-root.d.ts","sourceRoot":"","sources":["../../../../../../src/components/phone-input/components/phone-input-root.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoC,MAAM,OAAO,CAAC;AACzD,OAAO,EAAoB,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAChF,OAAO,EAAa,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAKtE,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEjD,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,WAAW,EAAE,CAAC;IAC7B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,OAAO,kBAAkB,CAAC;IAC1C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAWD,wBAAgB,cAAc,CAAC,EAC7B,QAAQ,EACR,KAAK,EACL,QAAQ,EACR,cAAqB,EACrB,YAAqB,EACrB,UAAkB,EAClB,OAAmB,EACnB,KAAK,GACN,EAAE,mBAAmB,qBA6CrB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { type StyleProp, type TextStyle } from "react-native";
|
|
3
|
+
export interface PhoneInputProps {
|
|
4
|
+
placeholder?: string;
|
|
5
|
+
style?: StyleProp<TextStyle>;
|
|
6
|
+
}
|
|
7
|
+
export declare function PhoneInput({ placeholder, style, }: PhoneInputProps): React.JSX.Element;
|
|
8
|
+
//# sourceMappingURL=phone-input.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"phone-input.d.ts","sourceRoot":"","sources":["../../../../../../src/components/phone-input/components/phone-input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,KAAK,SAAS,EAGd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAGtB,MAAM,WAAW,eAAe;IAC9B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,wBAAgB,UAAU,CAAC,EACzB,WAAkC,EAClC,KAAK,GACN,EAAE,eAAe,qBAyBjB"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { PhoneMask } from "../../hooks";
|
|
2
|
+
import type { ViewRef } from "../../types/element.types";
|
|
3
|
+
import type { PhoneInputState, PhoneInputStyles } from "./types";
|
|
4
|
+
export interface PhoneInputContext {
|
|
5
|
+
value: string | undefined;
|
|
6
|
+
onChange: ((value: string) => void) | undefined;
|
|
7
|
+
isFocused: boolean;
|
|
8
|
+
setIsFocused: (focused: boolean) => void;
|
|
9
|
+
isDisabled: boolean;
|
|
10
|
+
triggerRef: React.RefObject<ViewRef | null>;
|
|
11
|
+
phoneMask: PhoneMask;
|
|
12
|
+
state: PhoneInputState;
|
|
13
|
+
styles: PhoneInputStyles;
|
|
14
|
+
}
|
|
15
|
+
export declare const PhoneInputContext: import("react").Context<PhoneInputContext | undefined>;
|
|
16
|
+
export declare const usePhoneInput: () => PhoneInputContext;
|
|
17
|
+
//# sourceMappingURL=context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../../src/components/phone-input/context.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEjE,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,QAAQ,EAAE,CAAC,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IAEhD,SAAS,EAAE,OAAO,CAAC;IACnB,YAAY,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACzC,UAAU,EAAE,OAAO,CAAC;IAEpB,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC;IAE5C,SAAS,EAAE,SAAS,CAAC;IAErB,KAAK,EAAE,eAAe,CAAC;IACvB,MAAM,EAAE,gBAAgB,CAAC;CAC1B;AAED,eAAO,MAAM,iBAAiB,wDAE7B,CAAC;AAEF,eAAO,MAAM,aAAa,yBAMzB,CAAC"}
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
-
export { PhoneInput, type PhoneInputProps } from "./phone-input";
|
|
2
1
|
export type { PhoneInputState, PhoneInputStyles } from "./types";
|
|
2
|
+
import { CountryPicker } from "./components/country-picker";
|
|
3
|
+
import { PhoneInput as PhoneInputComponent } from "./components/phone-input";
|
|
4
|
+
import { PhoneInputRoot } from "./components/phone-input-root";
|
|
5
|
+
export declare const PhoneInput: {
|
|
6
|
+
Root: typeof PhoneInputRoot;
|
|
7
|
+
CountryPicker: typeof CountryPicker;
|
|
8
|
+
Input: typeof PhoneInputComponent;
|
|
9
|
+
};
|
|
3
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/phone-input/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/phone-input/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEjE,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,UAAU,IAAI,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC7E,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAE/D,eAAO,MAAM,UAAU;;;;CAItB,CAAC"}
|
|
@@ -2,5 +2,5 @@ import React from "react";
|
|
|
2
2
|
export interface SelectPortalProps {
|
|
3
3
|
children?: React.ReactNode;
|
|
4
4
|
}
|
|
5
|
-
export declare function SelectPortal(props: SelectPortalProps): React.JSX.Element
|
|
5
|
+
export declare function SelectPortal(props: SelectPortalProps): React.JSX.Element;
|
|
6
6
|
//# sourceMappingURL=select-portal.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select-portal.d.ts","sourceRoot":"","sources":["../../../../../../src/components/select/components/select-portal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"select-portal.d.ts","sourceRoot":"","sources":["../../../../../../src/components/select/components/select-portal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAKzC,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,qBA6BpD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select-trigger.d.ts","sourceRoot":"","sources":["../../../../../../src/components/select/components/select-trigger.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiB,MAAM,OAAO,CAAC;AACtC,OAAO,EAGL,KAAK,SAAS,EACd,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAMtB,MAAM,WAAW,kBAAkB;IACjC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,qBAgCtD;AAED,MAAM,WAAW,gBAAgB;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,
|
|
1
|
+
{"version":3,"file":"select-trigger.d.ts","sourceRoot":"","sources":["../../../../../../src/components/select/components/select-trigger.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiB,MAAM,OAAO,CAAC;AACtC,OAAO,EAGL,KAAK,SAAS,EACd,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAMtB,MAAM,WAAW,kBAAkB;IACjC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,qBAgCtD;AAED,MAAM,WAAW,gBAAgB;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,qBAoBlD"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { PropsWithRender } from "../../../types/props.types";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { type StyleProp, type ViewStyle } from "react-native";
|
|
4
|
+
export interface ToastBodyProps {
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
style?: StyleProp<ViewStyle>;
|
|
7
|
+
}
|
|
8
|
+
export declare function ToastBody(props: PropsWithRender<ToastBodyProps>): React.JSX.Element;
|
|
9
|
+
//# sourceMappingURL=toast-body.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toast-body.d.ts","sourceRoot":"","sources":["../../../../../../src/components/toast/components/toast-body.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,SAAS,EAAQ,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAGpE,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE3B,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,eAAe,CAAC,cAAc,CAAC,qBAO/D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manager.d.ts","sourceRoot":"","sources":["../../../../../src/components/toast/manager.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+B,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"manager.d.ts","sourceRoot":"","sources":["../../../../../src/components/toast/manager.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAUpD,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE3C,eAAO,MAAM,iBAAiB,iBAAiB,CAAC;AAEhD,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,OAAO,aAAa,CAAC;IACrC,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AA2BD,iBAAS,QAAQ,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,CAuB7C;AAED,iBAAS,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAGrC;AAED,eAAO,MAAM,QAAQ;;;CAGpB,CAAC;AAEF,wBAAgB,cAAc,6BAoB7B;AAED,UAAU,UAAU;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,OAAO,CAAC,EAAE,MAAM,OAAO,aAAa,CAAC;CACtC;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,UAAU,qBAgB/C"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import type { ToastBodyProps } from "./components/toast-body";
|
|
1
2
|
import type { ToastDescriptionProps } from "./components/toast-description";
|
|
2
3
|
import type { ToastIconProps } from "./components/toast-icon";
|
|
3
4
|
import type { ToastRootProps } from "./components/toast-root";
|
|
4
5
|
import type { ToastTitleProps } from "./components/toast-title";
|
|
5
6
|
export interface ToastStyles {
|
|
6
7
|
root?: ToastRootProps["style"];
|
|
8
|
+
body?: ToastBodyProps["style"];
|
|
7
9
|
icon?: ToastIconProps;
|
|
8
10
|
title?: ToastTitleProps["style"];
|
|
9
11
|
description?: ToastDescriptionProps["style"];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/toast/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAC5E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAEhE,MAAM,WAAW,WAAW;IAC1B,IAAI,CAAC,EAAE,cAAc,CAAC,OAAO,CAAC,CAAC;IAC/B,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,KAAK,CAAC,EAAE,eAAe,CAAC,OAAO,CAAC,CAAC;IACjC,WAAW,CAAC,EAAE,qBAAqB,CAAC,OAAO,CAAC,CAAC;CAC9C"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/toast/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAC5E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAEhE,MAAM,WAAW,WAAW;IAC1B,IAAI,CAAC,EAAE,cAAc,CAAC,OAAO,CAAC,CAAC;IAC/B,IAAI,CAAC,EAAE,cAAc,CAAC,OAAO,CAAC,CAAC;IAC/B,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,KAAK,CAAC,EAAE,eAAe,CAAC,OAAO,CAAC,CAAC;IACjC,WAAW,CAAC,EAAE,qBAAqB,CAAC,OAAO,CAAC,CAAC;CAC9C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"danger.d.ts","sourceRoot":"","sources":["../../../../../../src/components/toast/variants/danger.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C,eAAO,MAAM,qBAAqB,QAAO,
|
|
1
|
+
{"version":3,"file":"danger.d.ts","sourceRoot":"","sources":["../../../../../../src/components/toast/variants/danger.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C,eAAO,MAAM,qBAAqB,QAAO,WAuCxC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../../../../../../src/components/toast/variants/default.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C,eAAO,MAAM,sBAAsB,QAAO,
|
|
1
|
+
{"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../../../../../../src/components/toast/variants/default.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C,eAAO,MAAM,sBAAsB,QAAO,WAsCzC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"success.d.ts","sourceRoot":"","sources":["../../../../../../src/components/toast/variants/success.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C,eAAO,MAAM,sBAAsB,QAAO,
|
|
1
|
+
{"version":3,"file":"success.d.ts","sourceRoot":"","sources":["../../../../../../src/components/toast/variants/success.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C,eAAO,MAAM,sBAAsB,QAAO,WAuCzC,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
export type CountryCode = "AF" | "AL" | "DZ" | "AR" | "AU" | "AT" | "BD" | "BE" | "BR" | "CA" | "CL" | "CN" | "CO" | "CR" | "CZ" | "DK" | "DO" | "EC" | "EG" | "FI" | "FR" | "DE" | "GH" | "GR" | "GT" | "HK" | "HU" | "IN" | "ID" | "IE" | "IL" | "IT" | "JM" | "JP" | "KE" | "KR" | "MY" | "MX" | "MA" | "NL" | "NZ" | "NG" | "NO" | "PK" | "PA" | "PE" | "PH" | "PL" | "PT" | "PR" | "RO" | "RU" | "SA" | "SG" | "ZA" | "ES" | "SE" | "CH" | "TW" | "TH" | "TR" | "UA" | "AE" | "GB" | "US" | "VE" | "VN";
|
|
1
2
|
export interface CountryData {
|
|
2
3
|
/** ISO 3166-1 alpha-2 code */
|
|
3
|
-
code:
|
|
4
|
+
code: CountryCode;
|
|
4
5
|
/** Display name */
|
|
5
6
|
name: string;
|
|
6
7
|
/** Dial code without plus sign */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"countries.d.ts","sourceRoot":"","sources":["../../../../src/data/countries.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IAC1B,8BAA8B;IAC9B,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"countries.d.ts","sourceRoot":"","sources":["../../../../src/data/countries.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,GACnB,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,CAAC;AAET,MAAM,WAAW,WAAW;IAC1B,8BAA8B;IAC9B,IAAI,EAAE,WAAW,CAAC;IAClB,mBAAmB;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,kCAAkC;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,iBAAiB;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,wCAAwC;IACxC,MAAM,EAAE,MAAM,CAAC;IACf,0EAA0E;IAC1E,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,SAAS,EAAE,WAAW,EAyhBlC,CAAC;AAEF,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,CAEtE"}
|
|
@@ -6,7 +6,7 @@ export interface UsePhoneMaskOptions {
|
|
|
6
6
|
onCountryChange?: (country: CountryData) => void;
|
|
7
7
|
countries?: CountryData[];
|
|
8
8
|
}
|
|
9
|
-
export interface
|
|
9
|
+
export interface PhoneMask {
|
|
10
10
|
displayValue: string;
|
|
11
11
|
e164Value: string;
|
|
12
12
|
country: CountryData;
|
|
@@ -16,5 +16,5 @@ export interface UsePhoneMaskReturn {
|
|
|
16
16
|
setValue: (e164: string) => void;
|
|
17
17
|
keyboardType: "phone-pad";
|
|
18
18
|
}
|
|
19
|
-
export declare function usePhoneMask({ value: controlledValue, defaultCountry, onChange, onCountryChange, countries: customCountries, }?: UsePhoneMaskOptions):
|
|
19
|
+
export declare function usePhoneMask({ value: controlledValue, defaultCountry, onChange, onCountryChange, countries: customCountries, }?: UsePhoneMaskOptions): PhoneMask;
|
|
20
20
|
//# sourceMappingURL=use-phone-mask.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-phone-mask.d.ts","sourceRoot":"","sources":["../../../../src/hooks/use-phone-mask.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,WAAW,EAGjB,MAAM,mBAAmB,CAAC;AAE3B,MAAM,WAAW,mBAAmB;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,IAAI,CAAC;IACjD,SAAS,CAAC,EAAE,WAAW,EAAE,CAAC;CAC3B;AAED,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"use-phone-mask.d.ts","sourceRoot":"","sources":["../../../../src/hooks/use-phone-mask.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,WAAW,EAGjB,MAAM,mBAAmB,CAAC;AAE3B,MAAM,WAAW,mBAAmB;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,IAAI,CAAC;IACjD,SAAS,CAAC,EAAE,WAAW,EAAE,CAAC;CAC3B;AAED,MAAM,WAAW,SAAS;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,WAAW,CAAC;IACrB,SAAS,EAAE,WAAW,EAAE,CAAC;IACzB,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,UAAU,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,YAAY,EAAE,WAAW,CAAC;CAC3B;AAkDD,wBAAgB,YAAY,CAAC,EAC3B,KAAK,EAAE,eAAe,EACtB,cAAqB,EACrB,QAAQ,EACR,eAAe,EACf,SAAS,EAAE,eAAe,GAC3B,GAAE,mBAAwB,GAAG,SAAS,CAsGtC"}
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import { type PortalHostProps } from "./components/portal/portal.constants";
|
|
2
2
|
import { type SafeAreaInsets } from "./safe-area";
|
|
3
|
-
import { type ThemeProviderProps } from "./themes";
|
|
3
|
+
import { type ComponentsConfig, type ThemeProviderProps } from "./themes";
|
|
4
4
|
export interface ProviderProps {
|
|
5
5
|
children: React.ReactNode;
|
|
6
6
|
portalContainer?: PortalHostProps["container"];
|
|
7
7
|
theme?: ThemeProviderProps["theme"];
|
|
8
8
|
safeAreaInsets?: SafeAreaInsets;
|
|
9
|
+
components?: ComponentsConfig;
|
|
9
10
|
}
|
|
10
|
-
export declare const UIProvider: ({ children, portalContainer, theme, safeAreaInsets, }: ProviderProps) => import("react").JSX.Element;
|
|
11
|
+
export declare const UIProvider: ({ children, portalContainer, theme, safeAreaInsets, components, }: ProviderProps) => import("react").JSX.Element;
|
|
11
12
|
export * from "./hooks/use-screen-size";
|
|
12
13
|
export * from "./themes/adapters";
|
|
13
14
|
export * from "./themes/default";
|
|
14
|
-
export { useTheme } from "./themes/provider";
|
|
15
|
+
export { useTheme, type ComponentsConfig } from "./themes/provider";
|
|
15
16
|
export * from "./themes/types";
|
|
16
17
|
export * from "./components";
|
|
17
18
|
export * from "./safe-area";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAE5E,OAAO,EAAoB,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AACpE,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAE5E,OAAO,EAAoB,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AACpE,OAAO,EAEL,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACxB,MAAM,UAAU,CAAC;AAElB,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,eAAe,CAAC,EAAE,eAAe,CAAC,WAAW,CAAC,CAAC;IAC/C,KAAK,CAAC,EAAE,kBAAkB,CAAC,OAAO,CAAC,CAAC;IACpC,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,UAAU,CAAC,EAAE,gBAAgB,CAAC;CAC/B;AAED,eAAO,MAAM,UAAU,GAAI,mEAMxB,aAAa,gCAWf,CAAC;AAEF,cAAc,yBAAyB,CAAC;AAExC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,KAAK,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACpE,cAAc,gBAAgB,CAAC;AAE/B,cAAc,cAAc,CAAC;AAE7B,cAAc,aAAa,CAAC"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { type PropsWithChildren } from "react";
|
|
2
|
+
import type { ToastVariants } from "../components/toast/variants";
|
|
3
|
+
import type { SvgProps } from "../types/props.types";
|
|
2
4
|
import type { DeepPartial } from "../types/util.types";
|
|
3
5
|
import type { Colors, ColorScheme, FontFamily, FontSize, LetterSpacing, Radius, ThemeAssets } from "./types";
|
|
4
6
|
interface ThemeContext {
|
|
@@ -9,12 +11,20 @@ interface ThemeContext {
|
|
|
9
11
|
letterSpacing: LetterSpacing;
|
|
10
12
|
fontSize: FontSize;
|
|
11
13
|
setColorScheme: (scheme: ColorScheme) => void;
|
|
14
|
+
components?: ComponentsConfig;
|
|
15
|
+
}
|
|
16
|
+
export interface ComponentsConfig {
|
|
17
|
+
toast?: {
|
|
18
|
+
icons?: Partial<Record<keyof typeof ToastVariants, (props: SvgProps) => React.ReactNode>>;
|
|
19
|
+
};
|
|
12
20
|
}
|
|
13
21
|
declare const ThemeContext: import("react").Context<ThemeContext | null>;
|
|
14
22
|
export interface ThemeProviderProps extends PropsWithChildren {
|
|
15
23
|
theme?: DeepPartial<ThemeAssets>;
|
|
24
|
+
components?: ComponentsConfig;
|
|
16
25
|
}
|
|
17
26
|
export declare const ThemeProvider: (props: ThemeProviderProps) => import("react").JSX.Element;
|
|
18
27
|
export declare const useTheme: () => ThemeContext;
|
|
28
|
+
export declare const useComponentsConfig: () => ComponentsConfig | undefined;
|
|
19
29
|
export {};
|
|
20
30
|
//# sourceMappingURL=provider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../../../src/themes/provider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,iBAAiB,EAIvB,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEvD,OAAO,KAAK,EACV,MAAM,EACN,WAAW,EACX,UAAU,EACV,QAAQ,EACR,aAAa,EACb,MAAM,EACN,WAAW,EACZ,MAAM,SAAS,CAAC;AAGjB,UAAU,YAAY;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,UAAU,CAAC;IACvB,WAAW,EAAE,WAAW,CAAC;IACzB,aAAa,EAAE,aAAa,CAAC;IAC7B,QAAQ,EAAE,QAAQ,CAAC;IACnB,cAAc,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;CAC/
|
|
1
|
+
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../../../src/themes/provider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,iBAAiB,EAIvB,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEvD,OAAO,KAAK,EACV,MAAM,EACN,WAAW,EACX,UAAU,EACV,QAAQ,EACR,aAAa,EACb,MAAM,EACN,WAAW,EACZ,MAAM,SAAS,CAAC;AAGjB,UAAU,YAAY;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,UAAU,CAAC;IACvB,WAAW,EAAE,WAAW,CAAC;IACzB,aAAa,EAAE,aAAa,CAAC;IAC7B,QAAQ,EAAE,QAAQ,CAAC;IACnB,cAAc,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;IAC9C,UAAU,CAAC,EAAE,gBAAgB,CAAC;CAC/B;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,CAAC,EAAE;QACN,KAAK,CAAC,EAAE,OAAO,CACb,MAAM,CAAC,MAAM,OAAO,aAAa,EAAE,CAAC,KAAK,EAAE,QAAQ,KAAK,KAAK,CAAC,SAAS,CAAC,CACzE,CAAC;KACH,CAAC;CACH;AAED,QAAA,MAAM,YAAY,8CAA2C,CAAC;AAE9D,MAAM,WAAW,kBAAmB,SAAQ,iBAAiB;IAC3D,KAAK,CAAC,EAAE,WAAW,CAAC,WAAW,CAAC,CAAC;IACjC,UAAU,CAAC,EAAE,gBAAgB,CAAC;CAC/B;AAED,eAAO,MAAM,aAAa,GAAI,OAAO,kBAAkB,gCAoCtD,CAAC;AAEF,eAAO,MAAM,QAAQ,oBAMpB,CAAC;AAEF,eAAO,MAAM,mBAAmB,oCAM/B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@korsolutions/ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.55",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -21,19 +21,14 @@
|
|
|
21
21
|
"./package.json": "./package.json"
|
|
22
22
|
},
|
|
23
23
|
"scripts": {
|
|
24
|
-
"
|
|
25
|
-
"prepare": "./scripts/build.sh",
|
|
26
|
-
"ts-check": "tsc --noEmit",
|
|
24
|
+
"prepare": "bob build",
|
|
27
25
|
"lint": "tsc --noEmit"
|
|
28
26
|
},
|
|
29
27
|
"devDependencies": {
|
|
30
28
|
"@react-navigation/native": "^7.1.28",
|
|
31
29
|
"@types/react": "^19.2.3",
|
|
32
30
|
"@types/react-dom": "^19.2.3",
|
|
33
|
-
"babel-plugin-module-resolver": "^5.0.2",
|
|
34
|
-
"nodemon": "^3.1.11",
|
|
35
31
|
"react-native-builder-bob": "^0.40.17",
|
|
36
|
-
"tsc-alias": "^1.8.16",
|
|
37
32
|
"typescript": "^5.9.3"
|
|
38
33
|
},
|
|
39
34
|
"peerDependencies": {
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import React, { useState } from "react";
|
|
2
|
+
import {
|
|
3
|
+
Keyboard,
|
|
4
|
+
type LayoutRectangle,
|
|
5
|
+
Platform,
|
|
6
|
+
Pressable,
|
|
7
|
+
ScrollView,
|
|
8
|
+
StyleSheet,
|
|
9
|
+
Text,
|
|
10
|
+
TextInput,
|
|
11
|
+
View,
|
|
12
|
+
} from "react-native";
|
|
13
|
+
import type { CountryData } from "../../../data/countries";
|
|
14
|
+
import {
|
|
15
|
+
DEFAULT_LAYOUT,
|
|
16
|
+
DEFAULT_POSITION,
|
|
17
|
+
type LayoutPosition,
|
|
18
|
+
useRelativePosition,
|
|
19
|
+
} from "../../../hooks/use-relative-position";
|
|
20
|
+
import { measureLayoutPosition } from "../../../utils/normalize-layout";
|
|
21
|
+
import { Portal } from "../../portal";
|
|
22
|
+
import { usePhoneInput } from "../context";
|
|
23
|
+
|
|
24
|
+
export function CountryPicker() {
|
|
25
|
+
const { styles, state, phoneMask, isDisabled, triggerRef } = usePhoneInput();
|
|
26
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
27
|
+
const [searchQuery, setSearchQuery] = useState("");
|
|
28
|
+
const [triggerPosition, setTriggerPosition] =
|
|
29
|
+
useState<LayoutPosition>(DEFAULT_POSITION);
|
|
30
|
+
const [contentLayout, setContentLayout] =
|
|
31
|
+
useState<LayoutRectangle>(DEFAULT_LAYOUT);
|
|
32
|
+
|
|
33
|
+
const filteredCountries = searchQuery
|
|
34
|
+
? phoneMask.countries.filter((c) =>
|
|
35
|
+
c.name.toLowerCase().includes(searchQuery.toLowerCase()),
|
|
36
|
+
)
|
|
37
|
+
: phoneMask.countries;
|
|
38
|
+
|
|
39
|
+
const onOpen = () => {
|
|
40
|
+
if (isDisabled) return;
|
|
41
|
+
if (Platform.OS !== "web") {
|
|
42
|
+
Keyboard.dismiss();
|
|
43
|
+
}
|
|
44
|
+
measureLayoutPosition(triggerRef.current, (layout) => {
|
|
45
|
+
setTriggerPosition(layout);
|
|
46
|
+
setSearchQuery("");
|
|
47
|
+
setIsOpen(true);
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
const onClose = () => {
|
|
52
|
+
setIsOpen(false);
|
|
53
|
+
setSearchQuery("");
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
const onSelectCountry = (country: CountryData) => {
|
|
57
|
+
phoneMask.setCountry(country.code);
|
|
58
|
+
onClose();
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
const positionStyle = useRelativePosition({
|
|
62
|
+
align: "start",
|
|
63
|
+
triggerPosition,
|
|
64
|
+
contentLayout,
|
|
65
|
+
alignOffset: 0,
|
|
66
|
+
preferredSide: "bottom",
|
|
67
|
+
sideOffset: 4,
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
const countryButtonStyles = StyleSheet.flatten([
|
|
71
|
+
styles.countryButton?.default,
|
|
72
|
+
styles.countryButton?.[state],
|
|
73
|
+
]);
|
|
74
|
+
const countryButtonTextStyles = StyleSheet.flatten([
|
|
75
|
+
styles.countryButtonText?.default,
|
|
76
|
+
styles.countryButtonText?.[state],
|
|
77
|
+
]);
|
|
78
|
+
|
|
79
|
+
const overlayStyles = StyleSheet.flatten([
|
|
80
|
+
styles.pickerOverlay?.default,
|
|
81
|
+
styles.pickerOverlay?.[state],
|
|
82
|
+
]);
|
|
83
|
+
const contentStyles = StyleSheet.flatten([
|
|
84
|
+
styles.pickerContent?.default,
|
|
85
|
+
styles.pickerContent?.[state],
|
|
86
|
+
]);
|
|
87
|
+
const searchStyles = StyleSheet.flatten([
|
|
88
|
+
styles.pickerSearch?.default,
|
|
89
|
+
styles.pickerSearch?.[state],
|
|
90
|
+
]);
|
|
91
|
+
|
|
92
|
+
return (
|
|
93
|
+
<>
|
|
94
|
+
<Pressable
|
|
95
|
+
onPress={onOpen}
|
|
96
|
+
disabled={isDisabled}
|
|
97
|
+
style={countryButtonStyles}
|
|
98
|
+
>
|
|
99
|
+
<Text style={countryButtonTextStyles}>
|
|
100
|
+
{phoneMask.country.flag} +{phoneMask.country.dialCode}
|
|
101
|
+
</Text>
|
|
102
|
+
</Pressable>
|
|
103
|
+
{isOpen && (
|
|
104
|
+
<Portal name="phone-input-country-picker">
|
|
105
|
+
<Pressable
|
|
106
|
+
onPress={onClose}
|
|
107
|
+
style={[StyleSheet.absoluteFill, overlayStyles]}
|
|
108
|
+
/>
|
|
109
|
+
<View
|
|
110
|
+
style={[
|
|
111
|
+
positionStyle,
|
|
112
|
+
contentStyles,
|
|
113
|
+
{ width: triggerPosition.width },
|
|
114
|
+
]}
|
|
115
|
+
onLayout={(e) => setContentLayout(e.nativeEvent.layout)}
|
|
116
|
+
pointerEvents="box-none"
|
|
117
|
+
>
|
|
118
|
+
<TextInput
|
|
119
|
+
value={searchQuery}
|
|
120
|
+
onChangeText={setSearchQuery}
|
|
121
|
+
placeholder="Search countries..."
|
|
122
|
+
autoFocus
|
|
123
|
+
style={searchStyles}
|
|
124
|
+
/>
|
|
125
|
+
<ScrollView keyboardShouldPersistTaps="handled">
|
|
126
|
+
{filteredCountries.map((country) => {
|
|
127
|
+
const isSelected = country.code === phoneMask.country.code;
|
|
128
|
+
const optionStyles = StyleSheet.flatten([
|
|
129
|
+
styles.pickerOption?.default,
|
|
130
|
+
isSelected && styles.pickerOption?.selected,
|
|
131
|
+
]);
|
|
132
|
+
const optionTextStyles = StyleSheet.flatten([
|
|
133
|
+
styles.pickerOptionText?.default,
|
|
134
|
+
isSelected && styles.pickerOptionText?.selected,
|
|
135
|
+
]);
|
|
136
|
+
|
|
137
|
+
return (
|
|
138
|
+
<Pressable
|
|
139
|
+
key={country.code}
|
|
140
|
+
onPress={() => onSelectCountry(country)}
|
|
141
|
+
style={optionStyles}
|
|
142
|
+
>
|
|
143
|
+
<Text style={optionTextStyles}>
|
|
144
|
+
{country.flag} {country.name} +{country.dialCode}
|
|
145
|
+
</Text>
|
|
146
|
+
</Pressable>
|
|
147
|
+
);
|
|
148
|
+
})}
|
|
149
|
+
</ScrollView>
|
|
150
|
+
</View>
|
|
151
|
+
</Portal>
|
|
152
|
+
)}
|
|
153
|
+
</>
|
|
154
|
+
);
|
|
155
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import React, { useMemo, useRef, useState } from "react";
|
|
2
|
+
import { StyleSheet, View, type StyleProp, type ViewStyle } from "react-native";
|
|
3
|
+
import { COUNTRIES, type CountryCode } from "../../../data/countries";
|
|
4
|
+
import { usePhoneMask } from "../../../hooks/use-phone-mask";
|
|
5
|
+
import type { ViewRef } from "../../../types/element.types";
|
|
6
|
+
import { PhoneInputContext } from "../context";
|
|
7
|
+
import type { PhoneInputState } from "../types";
|
|
8
|
+
import { PhoneInputVariants } from "../variants";
|
|
9
|
+
|
|
10
|
+
export interface PhoneInputRootProps {
|
|
11
|
+
children?: React.ReactNode;
|
|
12
|
+
value?: string;
|
|
13
|
+
onChange?: (value: string) => void;
|
|
14
|
+
defaultCountry?: string;
|
|
15
|
+
countryCodes?: CountryCode[];
|
|
16
|
+
isDisabled?: boolean;
|
|
17
|
+
variant?: keyof typeof PhoneInputVariants;
|
|
18
|
+
placeholder?: string;
|
|
19
|
+
style?: StyleProp<ViewStyle>;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const calculateState = (
|
|
23
|
+
isDisabled: boolean,
|
|
24
|
+
isFocused: boolean,
|
|
25
|
+
): PhoneInputState => {
|
|
26
|
+
if (isDisabled) return "disabled";
|
|
27
|
+
if (isFocused) return "focused";
|
|
28
|
+
return "default";
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export function PhoneInputRoot({
|
|
32
|
+
children,
|
|
33
|
+
value,
|
|
34
|
+
onChange,
|
|
35
|
+
defaultCountry = "US",
|
|
36
|
+
countryCodes = ["US"],
|
|
37
|
+
isDisabled = false,
|
|
38
|
+
variant = "default",
|
|
39
|
+
style,
|
|
40
|
+
}: PhoneInputRootProps) {
|
|
41
|
+
const variantStyles = PhoneInputVariants[variant]();
|
|
42
|
+
const [isFocused, setIsFocused] = useState(false);
|
|
43
|
+
const triggerRef = useRef<ViewRef>(null);
|
|
44
|
+
|
|
45
|
+
const state = calculateState(isDisabled, isFocused);
|
|
46
|
+
|
|
47
|
+
const countries = COUNTRIES.filter((c) => countryCodes.includes(c.code));
|
|
48
|
+
|
|
49
|
+
const phoneMask = usePhoneMask({
|
|
50
|
+
value,
|
|
51
|
+
defaultCountry,
|
|
52
|
+
onChange,
|
|
53
|
+
countries,
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
const rootStyles = StyleSheet.flatten([
|
|
57
|
+
variantStyles.root?.default,
|
|
58
|
+
variantStyles.root?.[state],
|
|
59
|
+
style,
|
|
60
|
+
]);
|
|
61
|
+
|
|
62
|
+
const context = useMemo(
|
|
63
|
+
() =>
|
|
64
|
+
({
|
|
65
|
+
value,
|
|
66
|
+
onChange,
|
|
67
|
+
isFocused,
|
|
68
|
+
setIsFocused,
|
|
69
|
+
state,
|
|
70
|
+
phoneMask,
|
|
71
|
+
isDisabled,
|
|
72
|
+
styles: variantStyles,
|
|
73
|
+
triggerRef,
|
|
74
|
+
}) satisfies PhoneInputContext,
|
|
75
|
+
[variantStyles, state, phoneMask, isDisabled, value, isFocused],
|
|
76
|
+
);
|
|
77
|
+
|
|
78
|
+
return (
|
|
79
|
+
<PhoneInputContext.Provider value={context}>
|
|
80
|
+
<View ref={triggerRef} style={rootStyles}>
|
|
81
|
+
{children}
|
|
82
|
+
</View>
|
|
83
|
+
</PhoneInputContext.Provider>
|
|
84
|
+
);
|
|
85
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import {
|
|
3
|
+
type StyleProp,
|
|
4
|
+
StyleSheet,
|
|
5
|
+
TextInput,
|
|
6
|
+
type TextStyle,
|
|
7
|
+
} from "react-native";
|
|
8
|
+
import { usePhoneInput } from "../context";
|
|
9
|
+
|
|
10
|
+
export interface PhoneInputProps {
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
style?: StyleProp<TextStyle>;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function PhoneInput({
|
|
16
|
+
placeholder = "Enter phone number",
|
|
17
|
+
style,
|
|
18
|
+
}: PhoneInputProps) {
|
|
19
|
+
const { styles, state, setIsFocused, phoneMask, isDisabled } =
|
|
20
|
+
usePhoneInput();
|
|
21
|
+
|
|
22
|
+
const inputStyles = StyleSheet.flatten([
|
|
23
|
+
styles.input?.default,
|
|
24
|
+
styles.input?.[state],
|
|
25
|
+
style,
|
|
26
|
+
]);
|
|
27
|
+
|
|
28
|
+
return (
|
|
29
|
+
<TextInput
|
|
30
|
+
value={phoneMask.displayValue}
|
|
31
|
+
onChangeText={phoneMask.onChangeText}
|
|
32
|
+
keyboardType={phoneMask.keyboardType}
|
|
33
|
+
placeholder={placeholder}
|
|
34
|
+
placeholderTextColor={
|
|
35
|
+
StyleSheet.flatten(styles.countryButtonText?.disabled)?.color
|
|
36
|
+
}
|
|
37
|
+
readOnly={isDisabled}
|
|
38
|
+
onFocus={() => setIsFocused(true)}
|
|
39
|
+
onBlur={() => setIsFocused(false)}
|
|
40
|
+
style={inputStyles}
|
|
41
|
+
/>
|
|
42
|
+
);
|
|
43
|
+
}
|