@grupalia/rn-ui-kit 0.14.1 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/assets/illustrations/camera.svg +87 -0
- package/lib/commonjs/components/BaseBottomSheetModal.js +1 -2
- package/lib/commonjs/components/BaseBottomSheetModal.js.map +1 -1
- package/lib/commonjs/components/BaseConfirmationModal.js +3 -1
- package/lib/commonjs/components/BaseConfirmationModal.js.map +1 -1
- package/lib/commonjs/components/BaseDateInput.js +3 -1
- package/lib/commonjs/components/BaseDateInput.js.map +1 -1
- package/lib/commonjs/components/BaseIconBox.js +29 -18
- package/lib/commonjs/components/BaseIconBox.js.map +1 -1
- package/lib/commonjs/components/BaseSpinner.js +3 -1
- package/lib/commonjs/components/BaseSpinner.js.map +1 -1
- package/lib/commonjs/components/BaseSwitch.js +2 -1
- package/lib/commonjs/components/BaseSwitch.js.map +1 -1
- package/lib/commonjs/components/CameraImageInput.js +478 -0
- package/lib/commonjs/components/CameraImageInput.js.map +1 -0
- package/lib/commonjs/components/CameraWrapperModal.js +255 -0
- package/lib/commonjs/components/CameraWrapperModal.js.map +1 -0
- package/lib/commonjs/components/FormikCameraImageInput.js +37 -0
- package/lib/commonjs/components/FormikCameraImageInput.js.map +1 -0
- package/lib/commonjs/components/FormikDateInput.js +3 -1
- package/lib/commonjs/components/FormikDateInput.js.map +1 -1
- package/lib/commonjs/components/FormikRadioGroup.js +3 -1
- package/lib/commonjs/components/FormikRadioGroup.js.map +1 -1
- package/lib/commonjs/components/ImagePickerBottomSheet.js +100 -0
- package/lib/commonjs/components/ImagePickerBottomSheet.js.map +1 -0
- package/lib/commonjs/components/PhotoPickerModal.js +98 -0
- package/lib/commonjs/components/PhotoPickerModal.js.map +1 -0
- package/lib/commonjs/components/Toasts.js +188 -0
- package/lib/commonjs/components/Toasts.js.map +1 -0
- package/lib/commonjs/components/index.js +66 -0
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/commonjs/components/svgs/Camera.js +17 -0
- package/lib/commonjs/components/svgs/Camera.js.map +1 -0
- package/lib/commonjs/hooks/index.js +41 -0
- package/lib/commonjs/hooks/index.js.map +1 -0
- package/lib/commonjs/hooks/useInternetConnectionStatus.js +182 -0
- package/lib/commonjs/hooks/useInternetConnectionStatus.js.map +1 -0
- package/lib/commonjs/types/svg.d.js +2 -0
- package/lib/commonjs/types/svg.d.js.map +1 -0
- package/lib/commonjs/utils/fileDirectoryUtils.js +19 -0
- package/lib/commonjs/utils/fileDirectoryUtils.js.map +1 -0
- package/lib/commonjs/utils/index.js +22 -0
- package/lib/commonjs/utils/index.js.map +1 -1
- package/lib/commonjs/utils/timeConstants.js +15 -0
- package/lib/commonjs/utils/timeConstants.js.map +1 -0
- package/lib/module/assets/illustrations/camera.svg +87 -0
- package/lib/module/components/BaseBottomSheetModal.js +1 -2
- package/lib/module/components/BaseBottomSheetModal.js.map +1 -1
- package/lib/module/components/BaseConfirmationModal.js +3 -1
- package/lib/module/components/BaseConfirmationModal.js.map +1 -1
- package/lib/module/components/BaseDateInput.js +3 -1
- package/lib/module/components/BaseDateInput.js.map +1 -1
- package/lib/module/components/BaseIconBox.js +28 -18
- package/lib/module/components/BaseIconBox.js.map +1 -1
- package/lib/module/components/BaseSpinner.js +3 -1
- package/lib/module/components/BaseSpinner.js.map +1 -1
- package/lib/module/components/BaseSwitch.js +2 -1
- package/lib/module/components/BaseSwitch.js.map +1 -1
- package/lib/module/components/CameraImageInput.js +471 -0
- package/lib/module/components/CameraImageInput.js.map +1 -0
- package/lib/module/components/CameraWrapperModal.js +250 -0
- package/lib/module/components/CameraWrapperModal.js.map +1 -0
- package/lib/module/components/FormikCameraImageInput.js +32 -0
- package/lib/module/components/FormikCameraImageInput.js.map +1 -0
- package/lib/module/components/FormikDateInput.js +3 -1
- package/lib/module/components/FormikDateInput.js.map +1 -1
- package/lib/module/components/FormikRadioGroup.js +3 -1
- package/lib/module/components/FormikRadioGroup.js.map +1 -1
- package/lib/module/components/ImagePickerBottomSheet.js +95 -0
- package/lib/module/components/ImagePickerBottomSheet.js.map +1 -0
- package/lib/module/components/PhotoPickerModal.js +93 -0
- package/lib/module/components/PhotoPickerModal.js.map +1 -0
- package/lib/module/components/Toasts.js +182 -0
- package/lib/module/components/Toasts.js.map +1 -0
- package/lib/module/components/index.js +6 -0
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/components/svgs/Camera.js +12 -0
- package/lib/module/components/svgs/Camera.js.map +1 -0
- package/lib/module/hooks/index.js +6 -0
- package/lib/module/hooks/index.js.map +1 -0
- package/lib/module/hooks/useInternetConnectionStatus.js +177 -0
- package/lib/module/hooks/useInternetConnectionStatus.js.map +1 -0
- package/lib/module/types/svg.d.js +2 -0
- package/lib/module/types/svg.d.js.map +1 -0
- package/lib/module/utils/fileDirectoryUtils.js +14 -0
- package/lib/module/utils/fileDirectoryUtils.js.map +1 -0
- package/lib/module/utils/index.js +2 -0
- package/lib/module/utils/index.js.map +1 -1
- package/lib/module/utils/timeConstants.js +12 -0
- package/lib/module/utils/timeConstants.js.map +1 -0
- package/lib/typescript/commonjs/components/BaseBottomSheetModal.d.ts +2 -2
- package/lib/typescript/commonjs/components/BaseBottomSheetModal.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/BaseConfirmationModal.d.ts +2 -2
- package/lib/typescript/commonjs/components/BaseConfirmationModal.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/BaseDateInput.d.ts +7 -2
- package/lib/typescript/commonjs/components/BaseDateInput.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/BaseIconBox.d.ts +9 -4
- package/lib/typescript/commonjs/components/BaseIconBox.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/BaseSpinner.d.ts +2 -2
- package/lib/typescript/commonjs/components/BaseSpinner.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/BaseSwitch.d.ts +7 -2
- package/lib/typescript/commonjs/components/BaseSwitch.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/CameraImageInput.d.ts +41 -0
- package/lib/typescript/commonjs/components/CameraImageInput.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/CameraWrapperModal.d.ts +18 -0
- package/lib/typescript/commonjs/components/CameraWrapperModal.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/FormikCameraImageInput.d.ts +14 -0
- package/lib/typescript/commonjs/components/FormikCameraImageInput.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/FormikDateInput.d.ts +7 -2
- package/lib/typescript/commonjs/components/FormikDateInput.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/FormikRadioGroup.d.ts +7 -1
- package/lib/typescript/commonjs/components/FormikRadioGroup.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/ImagePickerBottomSheet.d.ts +15 -0
- package/lib/typescript/commonjs/components/ImagePickerBottomSheet.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/PhotoPickerModal.d.ts +19 -0
- package/lib/typescript/commonjs/components/PhotoPickerModal.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Toasts.d.ts +3 -0
- package/lib/typescript/commonjs/components/Toasts.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/index.d.ts +6 -0
- package/lib/typescript/commonjs/components/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/svgs/Camera.d.ts +9 -0
- package/lib/typescript/commonjs/components/svgs/Camera.d.ts.map +1 -0
- package/lib/typescript/commonjs/hooks/index.d.ts +4 -0
- package/lib/typescript/commonjs/hooks/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/hooks/useInternetConnectionStatus.d.ts +20 -0
- package/lib/typescript/commonjs/hooks/useInternetConnectionStatus.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/fileDirectoryUtils.d.ts +3 -0
- package/lib/typescript/commonjs/utils/fileDirectoryUtils.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/index.d.ts +2 -0
- package/lib/typescript/commonjs/utils/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/utils/timeConstants.d.ts +10 -0
- package/lib/typescript/commonjs/utils/timeConstants.d.ts.map +1 -0
- package/lib/typescript/module/components/BaseBottomSheetModal.d.ts +2 -2
- package/lib/typescript/module/components/BaseBottomSheetModal.d.ts.map +1 -1
- package/lib/typescript/module/components/BaseConfirmationModal.d.ts +2 -2
- package/lib/typescript/module/components/BaseConfirmationModal.d.ts.map +1 -1
- package/lib/typescript/module/components/BaseDateInput.d.ts +7 -2
- package/lib/typescript/module/components/BaseDateInput.d.ts.map +1 -1
- package/lib/typescript/module/components/BaseIconBox.d.ts +9 -4
- package/lib/typescript/module/components/BaseIconBox.d.ts.map +1 -1
- package/lib/typescript/module/components/BaseSpinner.d.ts +2 -2
- package/lib/typescript/module/components/BaseSpinner.d.ts.map +1 -1
- package/lib/typescript/module/components/BaseSwitch.d.ts +7 -2
- package/lib/typescript/module/components/BaseSwitch.d.ts.map +1 -1
- package/lib/typescript/module/components/CameraImageInput.d.ts +41 -0
- package/lib/typescript/module/components/CameraImageInput.d.ts.map +1 -0
- package/lib/typescript/module/components/CameraWrapperModal.d.ts +18 -0
- package/lib/typescript/module/components/CameraWrapperModal.d.ts.map +1 -0
- package/lib/typescript/module/components/FormikCameraImageInput.d.ts +14 -0
- package/lib/typescript/module/components/FormikCameraImageInput.d.ts.map +1 -0
- package/lib/typescript/module/components/FormikDateInput.d.ts +7 -2
- package/lib/typescript/module/components/FormikDateInput.d.ts.map +1 -1
- package/lib/typescript/module/components/FormikRadioGroup.d.ts +7 -1
- package/lib/typescript/module/components/FormikRadioGroup.d.ts.map +1 -1
- package/lib/typescript/module/components/ImagePickerBottomSheet.d.ts +15 -0
- package/lib/typescript/module/components/ImagePickerBottomSheet.d.ts.map +1 -0
- package/lib/typescript/module/components/PhotoPickerModal.d.ts +19 -0
- package/lib/typescript/module/components/PhotoPickerModal.d.ts.map +1 -0
- package/lib/typescript/module/components/Toasts.d.ts +3 -0
- package/lib/typescript/module/components/Toasts.d.ts.map +1 -0
- package/lib/typescript/module/components/index.d.ts +6 -0
- package/lib/typescript/module/components/index.d.ts.map +1 -1
- package/lib/typescript/module/components/svgs/Camera.d.ts +9 -0
- package/lib/typescript/module/components/svgs/Camera.d.ts.map +1 -0
- package/lib/typescript/module/hooks/index.d.ts +4 -0
- package/lib/typescript/module/hooks/index.d.ts.map +1 -0
- package/lib/typescript/module/hooks/useInternetConnectionStatus.d.ts +20 -0
- package/lib/typescript/module/hooks/useInternetConnectionStatus.d.ts.map +1 -0
- package/lib/typescript/module/utils/fileDirectoryUtils.d.ts +3 -0
- package/lib/typescript/module/utils/fileDirectoryUtils.d.ts.map +1 -0
- package/lib/typescript/module/utils/index.d.ts +2 -0
- package/lib/typescript/module/utils/index.d.ts.map +1 -1
- package/lib/typescript/module/utils/timeConstants.d.ts +10 -0
- package/lib/typescript/module/utils/timeConstants.d.ts.map +1 -0
- package/package.json +27 -2
- package/src/components/BaseBottomSheetModal.tsx +1 -2
- package/src/components/BaseConfirmationModal.tsx +5 -1
- package/src/components/BaseDateInput.tsx +4 -1
- package/src/components/BaseIconBox.tsx +31 -20
- package/src/components/BaseSpinner.tsx +4 -1
- package/src/components/BaseSwitch.tsx +2 -1
- package/src/components/CameraImageInput.tsx +610 -0
- package/src/components/CameraWrapperModal.tsx +309 -0
- package/src/components/FormikCameraImageInput.tsx +39 -0
- package/src/components/FormikDateInput.tsx +4 -1
- package/src/components/FormikRadioGroup.tsx +4 -1
- package/src/components/ImagePickerBottomSheet.tsx +109 -0
- package/src/components/PhotoPickerModal.tsx +116 -0
- package/src/components/Toasts.tsx +200 -0
- package/src/components/index.ts +6 -0
- package/src/components/svgs/Camera.tsx +14 -0
- package/src/hooks/index.ts +3 -0
- package/src/hooks/useBreakpoints.ts +20 -0
- package/src/hooks/useInternetConnectionStatus.ts +221 -0
- package/src/hooks/useIsAboveBreakpoint.ts +8 -0
- package/src/utils/fileDirectoryUtils.ts +12 -0
- package/src/utils/index.ts +2 -0
- package/src/utils/timeConstants.ts +19 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PhotoPickerModal.d.ts","sourceRoot":"","sources":["../../../../src/components/PhotoPickerModal.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAuB,MAAM,OAAO,CAAC;AAE5D,OAAO,EACe,YAAY,EAAE,KAAK,EACxC,MAAM,2BAA2B,CAAC;AAInC,OAAO,EAAQ,KAAK,EAAS,MAAM,mBAAmB,CAAC;AAGvD,MAAM,MAAM,qBAAqB,GAAG,KAAK,GAAG;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC;AAE5D,UAAU,KAAM,SAAQ,cAAc,CAAC,OAAO,KAAK,CAAC;IAClD,WAAW,EAAE,CAAC,KAAK,EAAE,qBAAqB,KAAK,IAAI,CAAC;IACpD,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,YAAY,CAAC,EAAE;QACb,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,OAAO,CAAC,EAAE,YAAY,CAAC;QACvB,aAAa,CAAC,EAAE,OAAO,CAAC;KACzB,CAAC;CACH;;AA4FD,wBAAyC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Toasts.d.ts","sourceRoot":"","sources":["../../../../src/components/Toasts.tsx"],"names":[],"mappings":"AACA,OAAO,KAAsC,MAAM,OAAO,CAAC;AA6K3D,MAAM,CAAC,OAAO,UAAU,MAAM,sBAyB7B"}
|
|
@@ -17,4 +17,10 @@ export { default as FormikDateInput } from './FormikDateInput';
|
|
|
17
17
|
export { default as BaseSwitch } from './BaseSwitch';
|
|
18
18
|
export { default as PressableOpacity } from './PressableOpacity';
|
|
19
19
|
export { default as BaseText } from './BaseText';
|
|
20
|
+
export { default as Toasts } from './Toasts';
|
|
21
|
+
export { default as CameraWrapperModal, CameraWrapperModalImage } from './CameraWrapperModal';
|
|
22
|
+
export { default as ImagePickerBottomSheet, ImagePickerBottomSheetImage } from './ImagePickerBottomSheet';
|
|
23
|
+
export { default as PhotoPickerModal } from './PhotoPickerModal';
|
|
24
|
+
export { default as CameraImageInput, CameraImageInputProps, CameraImage } from './CameraImageInput';
|
|
25
|
+
export { default as FormikCameraImageInput } from './FormikCameraImageInput';
|
|
20
26
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAC1E,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAC1E,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAC9F,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,2BAA2B,EAAE,MAAM,0BAA0B,CAAC;AAC1G,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,qBAAqB,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACrG,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const _default: import("react").ForwardRefExoticComponent<import("react-native-svg").SvgProps & {
|
|
3
|
+
className?: string | undefined;
|
|
4
|
+
tw?: string | undefined;
|
|
5
|
+
baseClassName?: string | undefined;
|
|
6
|
+
baseTw?: string | undefined;
|
|
7
|
+
} & import("react").RefAttributes<unknown>>;
|
|
8
|
+
export default _default;
|
|
9
|
+
//# sourceMappingURL=Camera.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Camera.d.ts","sourceRoot":"","sources":["../../../../../src/components/svgs/Camera.tsx"],"names":[],"mappings":";;;;;;;AAaA,wBAA8B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,OAAO,EAAE,OAAO,IAAI,2BAA2B,EAAE,MAAM,+BAA+B,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface InternetConnectionStatus {
|
|
2
|
+
isConnected: boolean | null;
|
|
3
|
+
isLoading: boolean;
|
|
4
|
+
lastChecked: Date | null;
|
|
5
|
+
isWeakConnection: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface InternetConnectionStatusProps {
|
|
8
|
+
checkInterval?: number;
|
|
9
|
+
timeout?: number;
|
|
10
|
+
checkHealth: () => Promise<{
|
|
11
|
+
ok: boolean;
|
|
12
|
+
}>;
|
|
13
|
+
}
|
|
14
|
+
export default function useInternetConnectionStatus(props: InternetConnectionStatusProps): {
|
|
15
|
+
isConnected: boolean | null;
|
|
16
|
+
isLoading: boolean;
|
|
17
|
+
lastChecked: Date | null;
|
|
18
|
+
isWeakConnection: boolean | 0 | null;
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=useInternetConnectionStatus.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useInternetConnectionStatus.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useInternetConnectionStatus.ts"],"names":[],"mappings":"AAQA,MAAM,WAAW,wBAAwB;IACvC,WAAW,EAAE,OAAO,GAAG,IAAI,CAAC;IAC5B,SAAS,EAAE,OAAO,CAAC;IACnB,WAAW,EAAE,IAAI,GAAG,IAAI,CAAC;IACzB,gBAAgB,EAAE,OAAO,CAAC;CAC3B;AAED,MAAM,WAAW,6BAA6B;IAC5C,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,OAAO,CAAC;QAAE,EAAE,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;CAC7C;AA8DD,MAAM,CAAC,OAAO,UAAU,2BAA2B,CAAC,KAAK,EAAE,6BAA6B;;;;;EA2IvF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fileDirectoryUtils.d.ts","sourceRoot":"","sources":["../../../../src/utils/fileDirectoryUtils.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,eAAe,YAAmB,MAAM,oBAO7C,CAAC;AAEF,OAAO,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
declare const MS_IN_A_SECOND = 1000;
|
|
2
|
+
declare const HOURS_IN_A_DAY = 24;
|
|
3
|
+
declare const MINUTES_IN_A_HOUR = 60;
|
|
4
|
+
declare const SECONDS_IN_A_MINUTE = 60;
|
|
5
|
+
declare const DAYS_IN_A_WEEK = 7;
|
|
6
|
+
declare const MS_IN_A_DAY: number;
|
|
7
|
+
declare const MS_IN_A_MINUTE: number;
|
|
8
|
+
declare const MS_IN_A_WEEK: number;
|
|
9
|
+
export { MS_IN_A_SECOND, HOURS_IN_A_DAY, MINUTES_IN_A_HOUR, SECONDS_IN_A_MINUTE, DAYS_IN_A_WEEK, MS_IN_A_DAY, MS_IN_A_MINUTE, MS_IN_A_WEEK, };
|
|
10
|
+
//# sourceMappingURL=timeConstants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"timeConstants.d.ts","sourceRoot":"","sources":["../../../../src/utils/timeConstants.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,cAAc,OAAQ,CAAC;AAC7B,QAAA,MAAM,cAAc,KAAK,CAAC;AAC1B,QAAA,MAAM,iBAAiB,KAAK,CAAC;AAC7B,QAAA,MAAM,mBAAmB,KAAK,CAAC;AAC/B,QAAA,MAAM,cAAc,IAAI,CAAC;AACzB,QAAA,MAAM,WAAW,QAA4E,CAAC;AAC9F,QAAA,MAAM,cAAc,QAAuC,CAAC;AAC5D,QAAA,MAAM,YAAY,QAA+B,CAAC;AAElD,OAAO,EACL,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,mBAAmB,EACnB,cAAc,EACd,WAAW,EACX,cAAc,EACd,YAAY,GACb,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@grupalia/rn-ui-kit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.0",
|
|
4
4
|
"description": "Grupalia React Native UI Kit",
|
|
5
5
|
"main": "./lib/module/index.js",
|
|
6
6
|
"types": "./lib/typescript/module/index.d.ts",
|
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
"src/preset.cjs",
|
|
11
11
|
"src/styles",
|
|
12
12
|
"src/components",
|
|
13
|
-
"src/utils"
|
|
13
|
+
"src/utils",
|
|
14
|
+
"src/hooks"
|
|
14
15
|
],
|
|
15
16
|
"scripts": {
|
|
16
17
|
"dev": "chokidar \"src/**/*\" -c \"yarn bob build\"",
|
|
@@ -23,21 +24,39 @@
|
|
|
23
24
|
},
|
|
24
25
|
"peerDependencies": {
|
|
25
26
|
"@gorhom/bottom-sheet": "^5",
|
|
27
|
+
"@react-native-async-storage/async-storage": "1.23.1",
|
|
28
|
+
"@react-native-community/hooks": "^100.1.0",
|
|
29
|
+
"@react-native-community/netinfo": "11.3.1",
|
|
30
|
+
"@react-navigation/native": "^6.1.18",
|
|
31
|
+
"@sentry/react-native": "^6.9.1",
|
|
32
|
+
"@tanstack/react-query": "^5.63.0",
|
|
26
33
|
"clsx": "^2.1.1",
|
|
27
34
|
"date-fns": "^4.1.0",
|
|
35
|
+
"expo-constants": "~16.0.1",
|
|
36
|
+
"expo-file-system": "17",
|
|
28
37
|
"formik": "^2",
|
|
29
38
|
"nativewind": "^2.0.11",
|
|
30
39
|
"react": "*",
|
|
40
|
+
"react-hot-toast": "^2.5.1",
|
|
31
41
|
"react-native": "*",
|
|
32
42
|
"react-native-date-picker": "^5.0.12",
|
|
33
43
|
"react-native-gesture-handler": "2.16.1",
|
|
34
44
|
"react-native-heroicons": "^4.0.0",
|
|
45
|
+
"react-native-image-modal": "^3.0.13",
|
|
46
|
+
"react-native-image-picker": "^7.2.3",
|
|
35
47
|
"react-native-svg": "*",
|
|
48
|
+
"react-native-vision-camera": "^4.6.3",
|
|
36
49
|
"tailwindcss": "3.3.2"
|
|
37
50
|
},
|
|
38
51
|
"devDependencies": {
|
|
39
52
|
"@babel/core": "^7.20.0",
|
|
40
53
|
"@gorhom/bottom-sheet": "^5",
|
|
54
|
+
"@react-native-async-storage/async-storage": "1.23.1",
|
|
55
|
+
"@react-native-community/hooks": "^100.1.0",
|
|
56
|
+
"@react-native-community/netinfo": "11.3.1",
|
|
57
|
+
"@react-navigation/native": "^6.1.18",
|
|
58
|
+
"@sentry/react-native": "^6.9.1",
|
|
59
|
+
"@tanstack/react-query": "^5.63.0",
|
|
41
60
|
"@types/react": "~18.2.45",
|
|
42
61
|
"@typescript-eslint/eslint-plugin": "^7.10.0",
|
|
43
62
|
"@typescript-eslint/parser": "^7.10.0",
|
|
@@ -51,15 +70,21 @@
|
|
|
51
70
|
"eslint-plugin-react": "^7.34.1",
|
|
52
71
|
"eslint-plugin-react-hooks": "^4.6.2",
|
|
53
72
|
"eslint-plugin-tailwindcss": "^3.17.4",
|
|
73
|
+
"expo-constants": "~16.0.1",
|
|
74
|
+
"expo-file-system": "17",
|
|
54
75
|
"formik": "^2",
|
|
55
76
|
"nativewind": "^2.0.11",
|
|
56
77
|
"react": "18.2.0",
|
|
78
|
+
"react-hot-toast": "^2.5.1",
|
|
57
79
|
"react-native": "0.74.5",
|
|
58
80
|
"react-native-builder-bob": "^0.40.6",
|
|
59
81
|
"react-native-date-picker": "^5.0.12",
|
|
60
82
|
"react-native-gesture-handler": "2.16.1",
|
|
61
83
|
"react-native-heroicons": "^4.0.0",
|
|
84
|
+
"react-native-image-modal": "^3.0.13",
|
|
85
|
+
"react-native-image-picker": "^7.2.3",
|
|
62
86
|
"react-native-svg": "^15.11.2",
|
|
87
|
+
"react-native-vision-camera": "^4.6.3",
|
|
63
88
|
"tailwindcss": "3.3.2",
|
|
64
89
|
"typescript": "~5.3.3"
|
|
65
90
|
},
|
|
@@ -5,7 +5,6 @@ import {
|
|
|
5
5
|
BottomSheetModalProps,
|
|
6
6
|
BottomSheetView,
|
|
7
7
|
} from '@gorhom/bottom-sheet';
|
|
8
|
-
import { styled } from 'nativewind';
|
|
9
8
|
import { forwardRef, ReactNode } from 'react';
|
|
10
9
|
import { StyleSheet } from 'react-native';
|
|
11
10
|
|
|
@@ -48,4 +47,4 @@ const BaseBottomSheetModal = forwardRef<
|
|
|
48
47
|
</BottomSheetModal>
|
|
49
48
|
));
|
|
50
49
|
|
|
51
|
-
export default
|
|
50
|
+
export default BaseBottomSheetModal;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { styled } from 'nativewind';
|
|
2
|
+
|
|
1
3
|
import { View, Modal } from '../hoc-components';
|
|
2
4
|
import BaseButton from './BaseButton';
|
|
3
5
|
import BaseText from './BaseText';
|
|
@@ -14,7 +16,7 @@ interface Props extends React.ComponentProps<typeof Modal> {
|
|
|
14
16
|
loading?: boolean;
|
|
15
17
|
}
|
|
16
18
|
|
|
17
|
-
|
|
19
|
+
function BaseConfirmationModal({
|
|
18
20
|
visible,
|
|
19
21
|
title,
|
|
20
22
|
body,
|
|
@@ -60,3 +62,5 @@ export default function BaseConfirmationModal({
|
|
|
60
62
|
</Modal>
|
|
61
63
|
);
|
|
62
64
|
}
|
|
65
|
+
|
|
66
|
+
export default styled(BaseConfirmationModal);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import clsx from 'clsx';
|
|
2
2
|
import { format } from 'date-fns';
|
|
3
|
+
import { styled } from 'nativewind';
|
|
3
4
|
import React, { useState, useCallback } from 'react';
|
|
4
5
|
import { ViewProps } from 'react-native';
|
|
5
6
|
import DatePicker, { DatePickerProps } from 'react-native-date-picker';
|
|
@@ -28,7 +29,7 @@ interface BaseDateInputProps extends Omit<DatePickerProps, 'open' | 'date' | 'on
|
|
|
28
29
|
touched?: boolean;
|
|
29
30
|
}
|
|
30
31
|
|
|
31
|
-
|
|
32
|
+
function BaseDateInput({
|
|
32
33
|
value,
|
|
33
34
|
onChange,
|
|
34
35
|
label,
|
|
@@ -148,3 +149,5 @@ export default function BaseDateInput({
|
|
|
148
149
|
</View>
|
|
149
150
|
);
|
|
150
151
|
}
|
|
152
|
+
|
|
153
|
+
export default styled(BaseDateInput);
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
import clsx from 'clsx';
|
|
2
|
+
import { styled } from 'nativewind';
|
|
3
|
+
|
|
1
4
|
import { View } from '../hoc-components';
|
|
2
|
-
import {
|
|
5
|
+
import BaseIcon, { BaseIconProps } from './BaseIcon';
|
|
6
|
+
import { HeroIcon, HeroIconProps } from '../types/heroicons';
|
|
3
7
|
|
|
4
8
|
type ColorType = 'primary' | 'white' | 'light-blue' | 'green';
|
|
5
9
|
type SizeType = 'xxs' | 'xs' | 'sm' | 'md' | 'lg';
|
|
@@ -7,58 +11,65 @@ type SizeType = 'xxs' | 'xs' | 'sm' | 'md' | 'lg';
|
|
|
7
11
|
interface BaseIconBoxProps extends HeroIconProps {
|
|
8
12
|
color?: ColorType;
|
|
9
13
|
size?: SizeType;
|
|
10
|
-
Icon:
|
|
14
|
+
Icon: HeroIcon;
|
|
11
15
|
}
|
|
12
16
|
|
|
13
|
-
function getColorClasses(color: ColorType): { box: string; icon:
|
|
17
|
+
function getColorClasses(color: ColorType): { box: string; icon: BaseIconProps['color'] } {
|
|
14
18
|
switch (color) {
|
|
15
19
|
case 'primary':
|
|
16
|
-
return { box: 'bg-brand-solid', icon: '
|
|
20
|
+
return { box: 'bg-brand-solid', icon: 'fg-white' };
|
|
17
21
|
case 'light-blue':
|
|
18
|
-
return { box: 'bg-utility-blue-100', icon: '
|
|
22
|
+
return { box: 'bg-utility-blue-100', icon: 'utility-blue-700' };
|
|
19
23
|
case 'green':
|
|
20
|
-
return { box: 'bg-success-primary', icon: '
|
|
24
|
+
return { box: 'bg-success-primary', icon: 'fg-success-primary' };
|
|
21
25
|
case 'white':
|
|
22
26
|
default:
|
|
23
|
-
return { box: 'bg-transparent', icon: '
|
|
27
|
+
return { box: 'bg-transparent', icon: 'fg-primary' };
|
|
24
28
|
}
|
|
25
29
|
}
|
|
26
30
|
|
|
27
|
-
function getSizeClasses(size: SizeType): { box: string } {
|
|
31
|
+
function getSizeClasses(size: SizeType): { box: string, icon: number } {
|
|
28
32
|
switch (size) {
|
|
29
33
|
case 'xxs':
|
|
30
|
-
return { box: 'h-6 w-6' };
|
|
34
|
+
return { box: 'h-6 w-6', icon: 18 };
|
|
31
35
|
case 'xs':
|
|
32
|
-
return { box: 'w-
|
|
36
|
+
return { box: 'w-7 h-7', icon: 20 };
|
|
33
37
|
case 'sm':
|
|
34
|
-
return { box: 'w-
|
|
35
|
-
case 'lg':
|
|
36
|
-
return { box: 'w-16 h-16' };
|
|
38
|
+
return { box: 'w-8 h-8', icon: 24 };
|
|
37
39
|
case 'md':
|
|
40
|
+
return { box: 'w-9 h-9', icon: 28 };
|
|
41
|
+
case 'lg':
|
|
38
42
|
default:
|
|
39
|
-
return { box: 'w-
|
|
43
|
+
return { box: 'w-10 h-10', icon: 32 };
|
|
40
44
|
}
|
|
41
45
|
}
|
|
42
46
|
|
|
43
|
-
|
|
47
|
+
function BaseIconBox({
|
|
44
48
|
color = 'primary',
|
|
45
49
|
size = 'sm',
|
|
46
50
|
Icon,
|
|
47
51
|
style = {},
|
|
48
|
-
...iconProps
|
|
49
52
|
}: BaseIconBoxProps) {
|
|
50
53
|
const colorClasses = getColorClasses(color);
|
|
51
54
|
const sizeClasses = getSizeClasses(size);
|
|
52
55
|
|
|
53
56
|
return (
|
|
54
57
|
<View
|
|
55
|
-
className={
|
|
58
|
+
className={clsx(
|
|
59
|
+
colorClasses.box,
|
|
60
|
+
sizeClasses.box,
|
|
61
|
+
'flex shrink-0 items-center justify-center rounded-md p-1',
|
|
62
|
+
)}
|
|
56
63
|
style={style}
|
|
57
64
|
>
|
|
58
|
-
<
|
|
59
|
-
|
|
60
|
-
{
|
|
65
|
+
<BaseIcon
|
|
66
|
+
size={sizeClasses.icon}
|
|
67
|
+
strokeWidth={1.5}
|
|
68
|
+
color={colorClasses.icon}
|
|
69
|
+
icon={Icon}
|
|
61
70
|
/>
|
|
62
71
|
</View>
|
|
63
72
|
);
|
|
64
73
|
}
|
|
74
|
+
|
|
75
|
+
export default styled(BaseIconBox);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { styled } from 'nativewind';
|
|
1
2
|
import { ComponentProps } from 'react';
|
|
2
3
|
|
|
3
4
|
import { ActivityIndicator } from '../hoc-components';
|
|
@@ -7,7 +8,7 @@ interface BaseSpinnerProps extends ComponentProps<typeof ActivityIndicator> {
|
|
|
7
8
|
size?: 'small' | 'large' | number;
|
|
8
9
|
}
|
|
9
10
|
|
|
10
|
-
|
|
11
|
+
function BaseSpinner({ size = 'large', ...props }: BaseSpinnerProps) {
|
|
11
12
|
return (
|
|
12
13
|
<ActivityIndicator
|
|
13
14
|
size={size}
|
|
@@ -16,3 +17,5 @@ export default function BaseSpinner({ size = 'large', ...props }: BaseSpinnerPro
|
|
|
16
17
|
/>
|
|
17
18
|
);
|
|
18
19
|
}
|
|
20
|
+
|
|
21
|
+
export default styled(BaseSpinner);
|