@grupalia/rn-ui-kit 0.18.0 → 0.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -0
- package/lib/commonjs/UIKitProvider.js +41 -0
- package/lib/commonjs/UIKitProvider.js.map +1 -0
- package/lib/commonjs/assets/illustrations/warning.svg +1 -0
- package/lib/commonjs/components/AppView.js +64 -0
- package/lib/commonjs/components/AppView.js.map +1 -0
- package/lib/commonjs/components/BaseDatesScrollView.js +13 -7
- package/lib/commonjs/components/BaseDatesScrollView.js.map +1 -1
- package/lib/commonjs/components/BaseErrorBox.js +92 -0
- package/lib/commonjs/components/BaseErrorBox.js.map +1 -0
- package/lib/commonjs/components/BaseErrorScreen.js +41 -0
- package/lib/commonjs/components/BaseErrorScreen.js.map +1 -0
- package/lib/commonjs/components/BaseStickyFooter.js +19 -0
- package/lib/commonjs/components/BaseStickyFooter.js.map +1 -0
- package/lib/commonjs/components/DateSelector.js +10 -5
- package/lib/commonjs/components/DateSelector.js.map +1 -1
- package/lib/commonjs/components/DateTimeSelector.js +56 -41
- package/lib/commonjs/components/DateTimeSelector.js.map +1 -1
- package/lib/commonjs/components/NetworkBanner.js +73 -0
- package/lib/commonjs/components/NetworkBanner.js.map +1 -0
- package/lib/commonjs/components/index.js +21 -0
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/commonjs/components/svgs/Warning.js +15 -0
- package/lib/commonjs/components/svgs/Warning.js.map +1 -0
- package/lib/commonjs/hooks/index.js +22 -13
- package/lib/commonjs/hooks/index.js.map +1 -1
- package/lib/commonjs/hooks/useInternetConnectionStatus.js +24 -14
- package/lib/commonjs/hooks/useInternetConnectionStatus.js.map +1 -1
- package/lib/commonjs/hooks/useTimezonedDate.js +73 -0
- package/lib/commonjs/hooks/useTimezonedDate.js.map +1 -0
- package/lib/commonjs/index.js +36 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/test-setup.js +11 -0
- package/lib/commonjs/test-setup.js.map +1 -0
- package/lib/commonjs/utils/filters.js +52 -0
- package/lib/commonjs/utils/filters.js.map +1 -0
- package/lib/commonjs/utils/index.js +11 -0
- package/lib/commonjs/utils/index.js.map +1 -1
- package/lib/module/UIKitProvider.js +34 -0
- package/lib/module/UIKitProvider.js.map +1 -0
- package/lib/module/assets/illustrations/warning.svg +1 -0
- package/lib/module/components/AppView.js +59 -0
- package/lib/module/components/AppView.js.map +1 -0
- package/lib/module/components/BaseDatesScrollView.js +15 -9
- package/lib/module/components/BaseDatesScrollView.js.map +1 -1
- package/lib/module/components/BaseErrorBox.js +87 -0
- package/lib/module/components/BaseErrorBox.js.map +1 -0
- package/lib/module/components/BaseErrorScreen.js +36 -0
- package/lib/module/components/BaseErrorScreen.js.map +1 -0
- package/lib/module/components/BaseStickyFooter.js +15 -0
- package/lib/module/components/BaseStickyFooter.js.map +1 -0
- package/lib/module/components/DateSelector.js +11 -6
- package/lib/module/components/DateSelector.js.map +1 -1
- package/lib/module/components/DateTimeSelector.js +57 -41
- package/lib/module/components/DateTimeSelector.js.map +1 -1
- package/lib/module/components/NetworkBanner.js +67 -0
- package/lib/module/components/NetworkBanner.js.map +1 -0
- package/lib/module/components/index.js +3 -0
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/components/svgs/Warning.js +10 -0
- package/lib/module/components/svgs/Warning.js.map +1 -0
- package/lib/module/hooks/index.js +2 -1
- package/lib/module/hooks/index.js.map +1 -1
- package/lib/module/hooks/useInternetConnectionStatus.js +23 -13
- package/lib/module/hooks/useInternetConnectionStatus.js.map +1 -1
- package/lib/module/hooks/useTimezonedDate.js +70 -0
- package/lib/module/hooks/useTimezonedDate.js.map +1 -0
- package/lib/module/index.js +3 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/test-setup.js +10 -0
- package/lib/module/test-setup.js.map +1 -0
- package/lib/module/utils/filters.js +48 -0
- package/lib/module/utils/filters.js.map +1 -0
- package/lib/module/utils/index.js +1 -0
- package/lib/module/utils/index.js.map +1 -1
- package/lib/typescript/commonjs/UIKitProvider.d.ts +15 -0
- package/lib/typescript/commonjs/UIKitProvider.d.ts.map +1 -0
- package/lib/typescript/commonjs/__tests__/smoke.test.d.ts +2 -0
- package/lib/typescript/commonjs/__tests__/smoke.test.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/AppView.d.ts +19 -0
- package/lib/typescript/commonjs/components/AppView.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/BaseDatesScrollView.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/BaseErrorBox.d.ts +14 -0
- package/lib/typescript/commonjs/components/BaseErrorBox.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/BaseErrorScreen.d.ts +13 -0
- package/lib/typescript/commonjs/components/BaseErrorScreen.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/BaseStickyFooter.d.ts +11 -0
- package/lib/typescript/commonjs/components/BaseStickyFooter.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/DateSelector.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/DateTimeSelector.d.ts +8 -3
- package/lib/typescript/commonjs/components/DateTimeSelector.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/FormikDateTimeSelector.d.ts +1 -1
- package/lib/typescript/commonjs/components/FormikDateTimeSelectorBottomSheet.d.ts +1 -1
- package/lib/typescript/commonjs/components/NetworkBanner.d.ts +10 -0
- package/lib/typescript/commonjs/components/NetworkBanner.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/svgs/Warning.d.ts +6 -0
- package/lib/typescript/commonjs/components/svgs/Warning.d.ts.map +1 -0
- package/lib/typescript/commonjs/hooks/index.d.ts +2 -1
- package/lib/typescript/commonjs/hooks/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/hooks/useInternetConnectionStatus.d.ts +4 -4
- package/lib/typescript/commonjs/hooks/useInternetConnectionStatus.d.ts.map +1 -1
- package/lib/typescript/commonjs/hooks/useTimezonedDate.d.ts +59 -0
- package/lib/typescript/commonjs/hooks/useTimezonedDate.d.ts.map +1 -0
- package/lib/typescript/commonjs/index.d.ts +3 -0
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/test-setup.d.ts +2 -0
- package/lib/typescript/commonjs/test-setup.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/filters.d.ts +4 -0
- package/lib/typescript/commonjs/utils/filters.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/index.d.ts +1 -0
- package/lib/typescript/commonjs/utils/index.d.ts.map +1 -1
- package/lib/typescript/module/UIKitProvider.d.ts +15 -0
- package/lib/typescript/module/UIKitProvider.d.ts.map +1 -0
- package/lib/typescript/module/__tests__/smoke.test.d.ts +2 -0
- package/lib/typescript/module/__tests__/smoke.test.d.ts.map +1 -0
- package/lib/typescript/module/components/AppView.d.ts +19 -0
- package/lib/typescript/module/components/AppView.d.ts.map +1 -0
- package/lib/typescript/module/components/BaseDatesScrollView.d.ts.map +1 -1
- package/lib/typescript/module/components/BaseErrorBox.d.ts +14 -0
- package/lib/typescript/module/components/BaseErrorBox.d.ts.map +1 -0
- package/lib/typescript/module/components/BaseErrorScreen.d.ts +13 -0
- package/lib/typescript/module/components/BaseErrorScreen.d.ts.map +1 -0
- package/lib/typescript/module/components/BaseStickyFooter.d.ts +11 -0
- package/lib/typescript/module/components/BaseStickyFooter.d.ts.map +1 -0
- package/lib/typescript/module/components/DateSelector.d.ts.map +1 -1
- package/lib/typescript/module/components/DateTimeSelector.d.ts +8 -3
- package/lib/typescript/module/components/DateTimeSelector.d.ts.map +1 -1
- package/lib/typescript/module/components/FormikDateTimeSelector.d.ts +1 -1
- package/lib/typescript/module/components/FormikDateTimeSelectorBottomSheet.d.ts +1 -1
- package/lib/typescript/module/components/NetworkBanner.d.ts +10 -0
- package/lib/typescript/module/components/NetworkBanner.d.ts.map +1 -0
- package/lib/typescript/module/components/index.d.ts +3 -0
- package/lib/typescript/module/components/index.d.ts.map +1 -1
- package/lib/typescript/module/components/svgs/Warning.d.ts +6 -0
- package/lib/typescript/module/components/svgs/Warning.d.ts.map +1 -0
- package/lib/typescript/module/hooks/index.d.ts +2 -1
- package/lib/typescript/module/hooks/index.d.ts.map +1 -1
- package/lib/typescript/module/hooks/useInternetConnectionStatus.d.ts +4 -4
- package/lib/typescript/module/hooks/useInternetConnectionStatus.d.ts.map +1 -1
- package/lib/typescript/module/hooks/useTimezonedDate.d.ts +59 -0
- package/lib/typescript/module/hooks/useTimezonedDate.d.ts.map +1 -0
- package/lib/typescript/module/index.d.ts +3 -0
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/test-setup.d.ts +2 -0
- package/lib/typescript/module/test-setup.d.ts.map +1 -0
- package/lib/typescript/module/utils/filters.d.ts +4 -0
- package/lib/typescript/module/utils/filters.d.ts.map +1 -0
- package/lib/typescript/module/utils/index.d.ts +1 -0
- package/lib/typescript/module/utils/index.d.ts.map +1 -1
- package/package.json +19 -9
- package/src/components/BaseAlert.tsx +0 -181
- package/src/components/BaseBadge.tsx +0 -192
- package/src/components/BaseBottomSheetModal.tsx +0 -50
- package/src/components/BaseButton.tsx +0 -317
- package/src/components/BaseConfirmationModal.tsx +0 -66
- package/src/components/BaseDateInput.tsx +0 -153
- package/src/components/BaseDatesScrollView.tsx +0 -123
- package/src/components/BaseHorizontalTabs.tsx +0 -225
- package/src/components/BaseIcon.tsx +0 -41
- package/src/components/BaseIconBox.tsx +0 -75
- package/src/components/BaseRadioGroup.tsx +0 -75
- package/src/components/BaseSelect.tsx +0 -170
- package/src/components/BaseSelectionItem.tsx +0 -85
- package/src/components/BaseSpinner.tsx +0 -21
- package/src/components/BaseStackedList.tsx +0 -146
- package/src/components/BaseSwitch.tsx +0 -48
- package/src/components/BaseText.tsx +0 -34
- package/src/components/CameraImageInput.tsx +0 -610
- package/src/components/CameraWrapperModal.tsx +0 -309
- package/src/components/DateSelector.tsx +0 -91
- package/src/components/DateTimeSelector.tsx +0 -305
- package/src/components/FormikCameraImageInput.tsx +0 -39
- package/src/components/FormikDateInput.tsx +0 -53
- package/src/components/FormikDateSelector.tsx +0 -36
- package/src/components/FormikDateTimeSelector.tsx +0 -49
- package/src/components/FormikDateTimeSelectorBottomSheet.tsx +0 -129
- package/src/components/FormikRadioGroup.tsx +0 -35
- package/src/components/FormikSelect.tsx +0 -49
- package/src/components/ImagePickerBottomSheet.tsx +0 -109
- package/src/components/PhotoPickerModal.tsx +0 -116
- package/src/components/PressableOpacity.tsx +0 -88
- package/src/components/Toasts.tsx +0 -200
- package/src/components/index.ts +0 -30
- package/src/components/svgs/Camera.tsx +0 -14
- package/src/hooks/index.ts +0 -3
- package/src/hooks/useBreakpoints.ts +0 -20
- package/src/hooks/useInternetConnectionStatus.ts +0 -221
- package/src/hooks/useIsAboveBreakpoint.ts +0 -8
- package/src/utils/clabe.ts +0 -31
- package/src/utils/date.ts +0 -1
- package/src/utils/fileDirectoryUtils.ts +0 -12
- package/src/utils/fonts.ts +0 -118
- package/src/utils/index.ts +0 -3
- package/src/utils/mx-banks.json +0 -492
- package/src/utils/mx-banks.ts +0 -9
- package/src/utils/timeConstants.ts +0 -19
package/README.md
CHANGED
|
@@ -103,6 +103,33 @@ This will copy all Inter font weights (100-900) and styles (regular and italic)
|
|
|
103
103
|
- **Scalability**: Adding/changing a palette color or semantic mapping updates the whole system.
|
|
104
104
|
- **Theming**: (Future) Enables light/dark mode and custom themes by changing semantic mappings.
|
|
105
105
|
|
|
106
|
+
## Development
|
|
107
|
+
|
|
108
|
+
### Running Tests
|
|
109
|
+
|
|
110
|
+
This project uses [Vitest](https://vitest.dev/) for testing. The following commands are available:
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
# Run tests in watch mode
|
|
114
|
+
yarn test
|
|
115
|
+
|
|
116
|
+
# Run tests once
|
|
117
|
+
yarn test:run
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
### Continuous Integration
|
|
121
|
+
|
|
122
|
+
Tests are automatically run on GitHub Actions for:
|
|
123
|
+
- Pull requests to `main` and `develop` branches
|
|
124
|
+
- Pushes to `main` and `develop` branches
|
|
125
|
+
- Multiple Node.js versions (18.x, 20.x)
|
|
126
|
+
|
|
127
|
+
The CI pipeline includes:
|
|
128
|
+
- Type checking with TypeScript
|
|
129
|
+
- Running the full test suite
|
|
130
|
+
- Building the project
|
|
131
|
+
- Coverage reporting
|
|
132
|
+
|
|
106
133
|
---
|
|
107
134
|
|
|
108
135
|
For more details, see the Figma documentation and the code in the `styles/` directory.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.UIKitProvider = UIKitProvider;
|
|
7
|
+
exports.useTimezone = useTimezone;
|
|
8
|
+
exports.useUIKitConfig = useUIKitConfig;
|
|
9
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
12
|
+
const UIKitContext = /*#__PURE__*/(0, _react.createContext)({
|
|
13
|
+
config: {
|
|
14
|
+
internetConnection: undefined,
|
|
15
|
+
timezone: 'America/Mexico_City'
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
function UIKitProvider({
|
|
19
|
+
children,
|
|
20
|
+
config
|
|
21
|
+
}) {
|
|
22
|
+
const contextValue = _react.default.useMemo(() => ({
|
|
23
|
+
config
|
|
24
|
+
}), [config]);
|
|
25
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(UIKitContext.Provider, {
|
|
26
|
+
value: contextValue,
|
|
27
|
+
children: children
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
function useUIKitConfig() {
|
|
31
|
+
const context = (0, _react.useContext)(UIKitContext);
|
|
32
|
+
if (!context) {
|
|
33
|
+
throw new Error('useUIKitConfig must be used within a UIKitProvider');
|
|
34
|
+
}
|
|
35
|
+
return context.config;
|
|
36
|
+
}
|
|
37
|
+
function useTimezone() {
|
|
38
|
+
const config = useUIKitConfig();
|
|
39
|
+
return config.timezone;
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=UIKitProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","UIKitContext","createContext","config","internetConnection","undefined","timezone","UIKitProvider","children","contextValue","React","useMemo","jsx","Provider","value","useUIKitConfig","context","useContext","Error","useTimezone"],"sourceRoot":"../../src","sources":["UIKitProvider.tsx"],"mappings":";;;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAAoE,IAAAC,WAAA,GAAAD,OAAA;AAAA,SAAAD,wBAAAG,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAL,uBAAA,YAAAA,CAAAG,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBA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M,IAAIE,KAAK,CAAC,oDAAoD,CAAC;EACvE;EACA,OAAOF,OAAO,CAACb,MAAM;AACvB;AAEO,SAASgB,WAAWA,CAAA,EAAW;EACpC,MAAMhB,MAAM,GAAGY,cAAc,CAAC,CAAC;EAE/B,OAAOZ,MAAM,CAACG,QAAQ;AACxB","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="524.67001" height="418.27099" viewBox="0 0 524.67001 418.27099" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M442.17403,400.47713c2.06599,.12871,3.20692-2.43846,1.64338-3.93389l-.1557-.61814c.0204-.04935,.04089-.09868,.06153-.14794,1.23211-2.94003,4.62545-4.33201,7.57137-3.11404,9.3142,3.85087-.51966,12.69986,.21957,18.68773,.25911,2.06671,8.35473,2.18034,7.89681,4.2086,4.30482-9.41207,6.56835-19.68889,6.56478-30.02306-.0009-2.59653-.14392-5.19297-.43543-7.78281-.23975-2.11845-.56985-4.22389-.9969-6.30999-2.30966-11.27639-7.30614-22.01572-14.51084-30.98461-3.46263-1.89129-1.35074-4.85018-3.09586-8.39544-.62694-1.27868-6.21792-1.30745-6.45092-2.70892,.25019,.03272,3.86434-3.721,2.6705-5.5767-.78555-1.22107-.54106-2.7763,.4681-3.82017,.09887-.1023,.19234-.2103,.27796-.32648,2.98093-4.04443,7.09003-3.33985,9.23695,2.15406,4.58304,2.31107,4.62871,6.14647,1.81834,9.83619-1.78798,2.34745-2.03264,5.52304-3.60129,8.03604,.16157,.20664,.32958,.40684,.49112,.61348,2.96237,3.79686,5.52482,7.87809,7.68524,12.16592-.61182-4.76599,.28705-10.50831,1.8215-14.21023,1.75933-4.24835,5.06953-7.8221,7.96883-11.49665,3.46275-4.38865,10.5104-2.39707,11.12286,3.15951,.00588,.05337,.0116,.10665,.01724,.16003-.42884,.24212-.84895,.49935-1.25929,.77094-2.33882,1.54808-1.52824,5.17442,1.24391,5.60071l.06278,.00965c-.1545,1.54372-5.63258,6.40679-6.01957,7.91187,3.70514,14.30838,.93282,16.19755-10.46624,16.43703l-.59825,.8522c1.08024,3.1058,1.94956,6.2861,2.60235,9.50743,.61462,2.99021,1.042,6.01282,1.28197,9.04845,.29847,3.82994,.27396,7.6795-.04769,11.50325l.01933-.13563c.81879-4.21143,3.1039-8.1457,6.42284-10.87249,4.94421-4.06436,11.93091-5.56281,17.2652-8.83022,2.56778-1.57285,5.85959,.45742,5.41241,3.4352l-.02177,.14262c-.79432,.32315-1.56922,.69808-2.31831,1.11814-.42921,.24237-.84965,.49978-1.26032,.77165-2.33916,1.54848-1.52796,5.1753,1.24498,5.60009l.06281,.00962c.0452,.00645,.08399,.01291,.12913,.0194-1.3617,3.23628-14.33553,7.80147-16.71149,10.39229-2.31031,12.49793-1.17531,12.12596-11.81075,8.49032h-.00647c-1.16085,5.06419-2.8578,10.01225-5.03931,14.72794l-18.0202,.00623c-.06471-.2002-.12288-.40688-.18109-.60712,1.66645,.10285,3.34571,.00534,4.98619-.29875-1.33757-1.64013-2.67509-3.29317-4.01266-4.93324-.0323-.03228-.05819-.06459-.08402-.09686l-.02036-.02517-1.85532-6.10724c.14644-1.35476,.38536-2.69828,.70958-4.02051l.00049-.00037v.00006Z" fill="#f2f2f2"/><path d="M251.74443,416.41995l-159.45702,.05516c-8.01074,.00277-15.18649-4.13684-19.19426-11.07295-2.00413-3.46855-3.00642-7.27337-3.00774-11.07904-.00132-3.80518,.99882-7.61119,3.00007-11.08063l79.67786-145.04905c4.00346-6.93937,11.17634-11.08346,19.18708-11.08623s15.18649,4.13635,19.19475,11.07295l79.78843,145.01196c1.99876,3.45927,2.99861,7.25971,2.99894,11.06293-.00015,3.80322-.99981,7.60874-3.00154,11.07868-4.00297,6.93889-11.17585,11.08346-19.1866,11.08623h.00002Zm-179.65463-22.09948c-.00026,3.46387,17.5953-4.00023,19.41817-.8451,3.64623,6.31026-6.50934,21.00225,.77874,20.99973,0,0,173.27016-3.828,176.91202-10.14078,1.82069-3.15639,2.73062-6.61911,2.72942-10.08102s-.91353-6.92351-2.73688-10.07864l-79.78845-145.01196c-3.63597-6.2922-10.16364-10.05801-17.45172-10.05549-7.28467,.00252-99.86105,161.74891-99.86132,165.21326h.00002Z" fill="#3f3d56"/><path d="M253.51521,414.41934c-1.99862,4.00069,91.61376,2.7712,92.72051,2.77082,0,0,26.3119-.58131,26.86492-1.53993,.27648-.47931,.41466-1.00515,.41448-1.53084s-.13873-1.05137-.4156-1.5305l-12.11626-22.02074c-.55215-.9555-1.54341-1.52736-2.65013-1.52698-.04608,.00002-.11394,.04093-.20168,.11933-16.16328,14.44385-36.0828,23.99237-57.75707,24.31469-23.047,.34272-46.73217,.6899-46.85919,.94416h.00002Z" fill="#3f3d56"/><path d="M0,417.0814c.00023,.66003,.53044,1.18982,1.19047,1.18959l522.28995-.18066c.65997-.00023,1.18982-.53038,1.18959-1.19041-.00023-.65997-.53044-1.18982-1.19041-1.18959l-522.28995,.18066c-.66003,.00023-1.18988,.53044-1.18965,1.19041Z" fill="#ccc"/><g><polygon points="403.87773 411.30541 394.83299 411.30765 390.51828 376.42194 403.86746 376.41823 403.87773 411.30541" fill="#a0616a"/><path d="M372.88925,411.11096h0c-.28145,.4744-.42951,2.00528-.42932,2.55685h0c.00059,1.6954,1.37542,3.06935,3.07089,3.06876l28.01047-.00969c1.15659-.0004,2.09391-.93832,2.09351-2.09496l-.0004-1.16617s1.38444-3.50542-1.46987-7.82444c0,0-3.54448,3.38386-8.84444-1.91244l-1.56336-2.82981-11.30656,8.27506-6.26838,.77377c-1.3714,.16927-2.58738-.02532-3.29241,1.16307h-.00012Z" fill="#2f2e41"/></g><g><polygon points="369.19708 381.46752 360.62951 384.36642 345.36911 352.70019 358.01396 348.42131 369.19708 381.46752" fill="#a0616a"/><path d="M339.77867,391.20807h0c-.11468,.53956,.23535,2.03724,.41217,2.5597h0c.54355,1.60589,2.28601,2.46714,3.89196,1.92358l26.53193-8.98019c1.09554-.3708,1.68312-1.55951,1.31228-2.65512l-.37389-1.10461s.18882-3.76416-3.8984-6.94155c0,0-2.27401,4.34084-8.99107,1.02096l-2.38732-2.18005-8.0607,11.46034-5.69037,2.74062c-1.24494,.59958-2.45919,.80471-2.74651,2.15628l-.00009,.00003Z" fill="#2f2e41"/></g><polygon points="355.22599 179.09003 337.68255 237.19081 316.97199 289.45207 349.76053 364.08569 361.91802 358.67731 347.37062 290.11706 377.87822 243.59436 392.11437 388.82623 404.27349 388.14652 420.76309 212.84336 423.11421 174.67566 355.22599 179.09003" fill="#2f2e41"/><path d="M408.20979,50.38513l-25.66813,4.73752-2.02258,11.48454-15.53439,7.43609-8.07702,84.4428s-13.50433,17.56819-2.69414,22.96862l68.9007-6.77904s3.37327-12.4903-.00473-13.67529-3.38832-31.01955-3.38832-31.01955l15.51573-61.36599-22.97048-8.09829-4.05664-10.13141Z" fill="#e6e6e6"/><circle cx="393.06995" cy="29.43589" r="20.7276" fill="#a0616a"/><path d="M406.79605,32.51227c-1.65401,.9055-.08471,5.22869-1.11848,5.60245-1.19492,.43202-5.55162-4.52715-5.60554-10.08176-.01633-1.68115,.37051-2.48839-.00155-4.48164-.48668-2.6073-1.98045-5.68253-3.36317-5.60089-.81965,.04839-1.62013,1.20723-1.67986,2.2414-.0837,1.44941,1.32419,2.01989,1.12139,2.80064-.38627,1.4871-6.29829,2.5138-8.40308,.00291-1.65013-1.9685-.38463-5.4247-1.12236-5.60167-.54378-.13045-1.12759,1.77241-3.35988,3.9226-.84103,.8101-2.09186,2.0149-2.80044,1.68159-1.02397-.48167-.28003-3.87624-.56157-3.92125-.23314-.03727-.37947,2.3487-1.67908,4.48223-1.66968,2.74103-5.11398,4.85374-6.72112,3.92377-.98466-.56978-1.06245-2.15606-1.12158-3.36084-.1245-2.53816-3.81308-8.37644-2.85882-11.09166,1.94221-5.5263,5.2701-1.63078,6.7752-3.47504,2.03756-2.49669,3.86572-1.15434,7.28133-3.92396,3.33668-2.70564,3.36577-5.42504,5.60011-5.604,2.01221-.16116,2.7278,1.98528,5.04242,1.67887,1.96079-.25957,2.38749-1.92436,3.92087-1.68198,1.40389,.2219,1.49646,1.68849,3.36201,2.23966,1.19101,.35188,1.45267-.15743,2.80103-.00097,2.80559,.32556,4.69002,2.88083,5.043,3.35949,1.36081,1.84526,.83282,2.62341,2.24236,4.48086,1.21555,1.6018,3.90913,.9216,4.92189,1.72162,3.30928,2.61409,4.73124,7.43497,4.75994,12.92962,.0201,3.8431-.48103,5.78482-1.59913,10.63564-.84901,3.6834-4.78175,8.44334-6.94987,10.5659-.58199,.56975-2.21351,2.167-3.36066,1.68178-1.08704-.45979-1.11995-2.52764-1.12139-2.80064-.0049-.93901,.24521-2.1009,2.23907-5.04263,2.09442-3.09006,2.92645-3.44271,2.79948-4.48262-.22445-1.83818-3.16424-3.52123-4.48263-2.79948h.00012Z" fill="#2f2e41"/><g><path d="M334.49457,225.75979c-.64513,5.40264,1.61895,10.11513,5.05699,10.52567s6.7481-3.63632,7.39324-9.03898c.28242-2.36492,.00723-4.59754-.6797-6.39504l2.44642-22.92684-10.7834-.91891-1.26717,22.69891c-1.09088,1.58522-1.88401,3.69026-2.16639,6.05519h.00003Z" fill="#a0616a"/><path d="M365.49095,73.49769s-5.58664,.07946-9.28568,7.30383c-1.96565,3.83897-12.48211,75.62767-12.48211,75.62767l-9.68742,58.80847,16.50214,.08313,12.859-55.69302,10.81723-32.30088-8.72315-53.82921Z" fill="#e6e6e6"/></g><path d="M411.92961,217.13028c-1.58023,5.20651-.17535,10.24237,3.13786,11.24797s7.28015-2.39987,8.86035-7.60638c.69172-2.27906,.81133-4.5254,.44941-6.41533l6.4191-22.14543-10.45641-2.79098-5.21815,22.12729c-1.35133,1.36996-2.50044,3.30383-3.19216,5.58289v-.00003Z" fill="#a0616a"/><path d="M423.41564,69.63219s8.10413-6.08248,14.86262,3.37246c6.75846,9.45495,9.48742,87.1388,9.48742,87.1388l-18.89796,47.96845-14.18755-4.72373,13.49008-58.7749-23.65861-44.57614,18.90403-30.40494h-.00003Z" fill="#e6e6e6"/><g><circle cx="218.47958" cy="311.43145" r="73" fill="#a855f7"/><g><circle cx="218.49274" cy="349.47878" r="6.70264" fill="#fff"/><path d="M218.4641,266.68145c-.6157,4.0912,.48747,4.94727,.49357,22.58508,.0061,17.63782,3.66579,41.28574-.47148,41.28717s-5.65047-48.80276-20.01681-53.12218c-16.89088-5.07846,21.98785-23.99409,19.99471-10.75007Z" fill="#fff"/></g></g><path d="M120.50313,348.70219l-6.59532,13.93527c7.97328-5.71745,20.42715-10.64598,30.3376-13.28567-9.23403-4.46037-20.53313-11.65189-27.2835-18.77194l3.7934,14.72434c-44.47393-9.0585-76.41138-43.17661-76.4249-82.25924l-1.60648-.5527c.01412,40.82281,31.50971,76.96121,77.7792,86.20995Z" fill="#3f3d56"/></svg>
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = AppView;
|
|
7
|
+
var _clsx = _interopRequireDefault(require("clsx"));
|
|
8
|
+
var _BaseStickyFooter = _interopRequireDefault(require("./BaseStickyFooter"));
|
|
9
|
+
var _hocComponents = require("../hoc-components");
|
|
10
|
+
var _NetworkBanner = _interopRequireDefault(require("./NetworkBanner"));
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
|
+
function AppView({
|
|
14
|
+
children,
|
|
15
|
+
scrollable = true,
|
|
16
|
+
background = 'white',
|
|
17
|
+
stickyFooterChildren = null,
|
|
18
|
+
customNetworkBanner = null,
|
|
19
|
+
banner = null,
|
|
20
|
+
...props
|
|
21
|
+
}) {
|
|
22
|
+
const backgroundColor = backgroundProp => {
|
|
23
|
+
switch (backgroundProp) {
|
|
24
|
+
case 'gray':
|
|
25
|
+
return 'bg-primary';
|
|
26
|
+
case 'white':
|
|
27
|
+
default:
|
|
28
|
+
return 'bg-white';
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
const paddingBottom = stickyFooterChildren ? 148 : 40;
|
|
32
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_hocComponents.View, {
|
|
33
|
+
className: (0, _clsx.default)('flex-1', backgroundColor(background)),
|
|
34
|
+
children: [scrollable ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_hocComponents.ScrollView, {
|
|
35
|
+
contentContainerStyle: {
|
|
36
|
+
flexGrow: 1,
|
|
37
|
+
paddingBottom
|
|
38
|
+
},
|
|
39
|
+
automaticallyAdjustKeyboardInsets: true,
|
|
40
|
+
...props,
|
|
41
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_hocComponents.View, {
|
|
42
|
+
children: [banner, customNetworkBanner || /*#__PURE__*/(0, _jsxRuntime.jsx)(_NetworkBanner.default, {})]
|
|
43
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_hocComponents.View, {
|
|
44
|
+
className: "flex-1 px-4 pt-4",
|
|
45
|
+
children: children
|
|
46
|
+
})]
|
|
47
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_hocComponents.View, {
|
|
48
|
+
className: "flex-1 grow p-6",
|
|
49
|
+
style: {
|
|
50
|
+
paddingBottom
|
|
51
|
+
},
|
|
52
|
+
...props,
|
|
53
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_hocComponents.View, {
|
|
54
|
+
children: [banner, customNetworkBanner || /*#__PURE__*/(0, _jsxRuntime.jsx)(_NetworkBanner.default, {})]
|
|
55
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_hocComponents.View, {
|
|
56
|
+
className: "flex-1 px-4 pt-4",
|
|
57
|
+
children: children
|
|
58
|
+
})]
|
|
59
|
+
}), stickyFooterChildren && /*#__PURE__*/(0, _jsxRuntime.jsx)(_BaseStickyFooter.default, {
|
|
60
|
+
children: stickyFooterChildren
|
|
61
|
+
})]
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=AppView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_clsx","_interopRequireDefault","require","_BaseStickyFooter","_hocComponents","_NetworkBanner","_jsxRuntime","e","__esModule","default","AppView","children","scrollable","background","stickyFooterChildren","customNetworkBanner","banner","props","backgroundColor","backgroundProp","paddingBottom","jsxs","View","className","clsx","ScrollView","contentContainerStyle","flexGrow","automaticallyAdjustKeyboardInsets","jsx","style"],"sourceRoot":"../../../src","sources":["components/AppView.tsx"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAGA,IAAAC,iBAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,cAAA,GAAAF,OAAA;AACA,IAAAG,cAAA,GAAAJ,sBAAA,CAAAC,OAAA;AAA4C,IAAAI,WAAA,GAAAJ,OAAA;AAAA,SAAAD,uBAAAM,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAwB7B,SAASG,OAAOA,CAAC;EAC9BC,QAAQ;EACRC,UAAU,GAAG,IAAI;EACjBC,UAAU,GAAG,OAAO;EACpBC,oBAAoB,GAAG,IAAI;EAC3BC,mBAAmB,GAAG,IAAI;EAC1BC,MAAM,GAAG,IAAI;EACb,GAAGC;AACS,CAAC,EAAE;EACf,MAAMC,eAAe,GAAIC,cAAsB,IAAK;IAClD,QAAQA,cAAc;MACpB,KAAK,MAAM;QACT,OAAO,YAAY;MACrB,KAAK,OAAO;MACZ;QACE,OAAO,UAAU;IACrB;EACF,CAAC;EAED,MAAMC,aAAa,GAAGN,oBAAoB,GAAG,GAAG,GAAG,EAAE;EAErD,oBACE,IAAAR,WAAA,CAAAe,IAAA,EAACjB,cAAA,CAAAkB,IAAI;IAACC,SAAS,EAAE,IAAAC,aAAI,EAAC,QAAQ,EA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 @@ var _nativewind = require("nativewind");
|
|
|
10
10
|
var _react = _interopRequireDefault(require("react"));
|
|
11
11
|
var _hocComponents = require("../hoc-components");
|
|
12
12
|
var _BaseText = _interopRequireDefault(require("./BaseText"));
|
|
13
|
+
var _hooks = require("../hooks");
|
|
14
|
+
var _PressableOpacity = _interopRequireDefault(require("./PressableOpacity"));
|
|
13
15
|
var _date = require("../utils/date");
|
|
14
16
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
17
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -20,6 +22,9 @@ function BaseDatesScrollView({
|
|
|
20
22
|
onDayPress,
|
|
21
23
|
...props
|
|
22
24
|
}) {
|
|
25
|
+
const {
|
|
26
|
+
tz
|
|
27
|
+
} = (0, _hooks.useTimezonedDate)();
|
|
23
28
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_hocComponents.View, {
|
|
24
29
|
className: "relative",
|
|
25
30
|
...props,
|
|
@@ -27,14 +32,15 @@ function BaseDatesScrollView({
|
|
|
27
32
|
horizontal: true,
|
|
28
33
|
showsHorizontalScrollIndicator: false,
|
|
29
34
|
children: dateRange.map(day => {
|
|
30
|
-
const
|
|
35
|
+
const tzDay = tz(day);
|
|
36
|
+
const isSelected = selectedDate && (0, _dateFns.isSameDay)(tzDay, tz(selectedDate));
|
|
31
37
|
const isDayDisabledState = isDayDisabled(day);
|
|
32
38
|
const getDayLabel = () => {
|
|
33
|
-
if ((0, _dateFns.isToday)(
|
|
34
|
-
if ((0, _dateFns.isTomorrow)(
|
|
35
|
-
return _date.WEEKDAY_NAMES[
|
|
39
|
+
if ((0, _dateFns.isToday)(tzDay)) return 'Hoy';
|
|
40
|
+
if ((0, _dateFns.isTomorrow)(tzDay)) return 'Mañana';
|
|
41
|
+
return _date.WEEKDAY_NAMES[tzDay.getDay()];
|
|
36
42
|
};
|
|
37
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(
|
|
43
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_PressableOpacity.default, {
|
|
38
44
|
onPress: () => onDayPress(day),
|
|
39
45
|
disabled: isDayDisabledState,
|
|
40
46
|
className: (0, _clsx.default)('mr-3 flex w-24 flex-col items-center rounded-lg border py-1.5', isSelected && 'border-brand bg-brand-solid', !isSelected && isDayDisabledState && 'border-disabled bg-disabled opacity-30', !isSelected && !isDayDisabledState && 'border-primary bg-primary'),
|
|
@@ -43,10 +49,10 @@ function BaseDatesScrollView({
|
|
|
43
49
|
children: getDayLabel()
|
|
44
50
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_BaseText.default, {
|
|
45
51
|
className: (0, _clsx.default)('mt-1 text-lg font-semibold', isSelected && 'text-primary_on-brand', !isSelected && isDayDisabledState && 'text-disabled', !isSelected && !isDayDisabledState && 'text-tertiary'),
|
|
46
|
-
children:
|
|
52
|
+
children: tzDay.getDate()
|
|
47
53
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_BaseText.default, {
|
|
48
54
|
className: (0, _clsx.default)('text-xs', isSelected && 'text-primary_on-brand', !isSelected && isDayDisabledState && 'text-disabled', !isSelected && !isDayDisabledState && 'text-tertiary'),
|
|
49
|
-
children: (0, _dateFns.format)(
|
|
55
|
+
children: (0, _dateFns.format)(tzDay, 'MMMM')
|
|
50
56
|
})]
|
|
51
57
|
}, day.toISOString());
|
|
52
58
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_clsx","_interopRequireDefault","require","_dateFns","_nativewind","_react","_hocComponents","_BaseText","_date","_jsxRuntime","e","__esModule","default","BaseDatesScrollView","dateRange","selectedDate","isDayDisabled","onDayPress","props","jsxs","View","className","children","jsx","GestureScrollView","horizontal","showsHorizontalScrollIndicator","map","day","isSelected","isSameDay","isDayDisabledState","getDayLabel","isToday","isTomorrow","WEEKDAY_NAMES","getDay","
|
|
1
|
+
{"version":3,"names":["_clsx","_interopRequireDefault","require","_dateFns","_nativewind","_react","_hocComponents","_BaseText","_hooks","_PressableOpacity","_date","_jsxRuntime","e","__esModule","default","BaseDatesScrollView","dateRange","selectedDate","isDayDisabled","onDayPress","props","tz","useTimezonedDate","jsxs","View","className","children","jsx","GestureScrollView","horizontal","showsHorizontalScrollIndicator","map","day","tzDay","isSelected","isSameDay","isDayDisabledState","getDayLabel","isToday","isTomorrow","WEEKDAY_NAMES","getDay","onPress","disabled","clsx","getDate","format","toISOString","length","LinearGradient","colors","start","x","y","end","style","pointerEvents","_default","exports","styled"],"sourceRoot":"../../../src","sources":["components/BaseDatesScrollView.tsx"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AAGA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAJ,sBAAA,CAAAC,OAAA;AAGA,IAAAI,cAAA,GAAAJ,OAAA;AAKA,IAAAK,SAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,MAAA,GAAAN,OAAA;AACA,IAAAO,iBAAA,GAAAR,sBAAA,CAAAC,OAAA;AACA,IAAAQ,KAAA,GAAAR,OAAA;AAA8C,IAAAS,WAAA,GAAAT,OAAA;AAAA,SAAAD,uBAAAW,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAS9C,SAASG,mBAAmBA,CAAC;EAC3BC,SAAS;EACTC,YAAY;EACZC,aAAa;EACbC,UAAU;EACV,GAAGC;AACqB,CAAC,EAAE;EAC3B,MAAM;IAAEC;EAAG,CAAC,GAAG,IAAAC,uBAAgB,EAAC,CAAC;EACjC,oBACE,IAAAX,WAAA,CAAAY,IAAA,EAACjB,cAAA,CAAAkB,IAAI;IACHC,SAAS,EAAC,UAAU;IAAA,GAChBL,KAAK;IAAAM,QAAA,gBAET,IAAAf,WAAA,CAAAgB,GAAA,EAACrB,cAAA,CAAAsB,iBAAiB;MAChBC,UAAU;MACV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-0,0 +1,92 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _nativewind = require("nativewind");
|
|
8
|
+
var _outline = require("react-native-heroicons/outline");
|
|
9
|
+
var _BaseIcon = _interopRequireDefault(require("./BaseIcon"));
|
|
10
|
+
var _BaseText = _interopRequireDefault(require("./BaseText"));
|
|
11
|
+
var _hocComponents = require("../hoc-components");
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
|
+
function BaseErrorBox({
|
|
15
|
+
title = 'Hubo un error',
|
|
16
|
+
text,
|
|
17
|
+
size = 'lg'
|
|
18
|
+
}) {
|
|
19
|
+
const allRipples = [{
|
|
20
|
+
size: 'h-[400px] w-[400px]',
|
|
21
|
+
opacity: 'border-error-primary/5'
|
|
22
|
+
}, {
|
|
23
|
+
size: 'h-[270px] w-[270px]',
|
|
24
|
+
opacity: 'border-error-primary/5'
|
|
25
|
+
}, {
|
|
26
|
+
size: 'h-[180px] w-[180px]',
|
|
27
|
+
opacity: 'border-error-primary/5'
|
|
28
|
+
}, {
|
|
29
|
+
size: 'h-[100px] w-[100px]',
|
|
30
|
+
opacity: 'border-error-primary/10'
|
|
31
|
+
}];
|
|
32
|
+
const sizeConfig = {
|
|
33
|
+
sm: {
|
|
34
|
+
rippleCount: 2,
|
|
35
|
+
iconSize: 20,
|
|
36
|
+
innerCircleSize: 'h-10 w-10',
|
|
37
|
+
titleTextSize: 'text-base',
|
|
38
|
+
bodyTextSize: 'text-sm'
|
|
39
|
+
},
|
|
40
|
+
md: {
|
|
41
|
+
rippleCount: 2,
|
|
42
|
+
iconSize: 24,
|
|
43
|
+
innerCircleSize: 'h-11 w-11',
|
|
44
|
+
titleTextSize: 'text-lg',
|
|
45
|
+
bodyTextSize: 'text-base'
|
|
46
|
+
},
|
|
47
|
+
lg: {
|
|
48
|
+
rippleCount: 3,
|
|
49
|
+
iconSize: 32,
|
|
50
|
+
innerCircleSize: 'h-12 w-12',
|
|
51
|
+
titleTextSize: 'text-lg',
|
|
52
|
+
bodyTextSize: 'text-base'
|
|
53
|
+
},
|
|
54
|
+
xl: {
|
|
55
|
+
rippleCount: 4,
|
|
56
|
+
iconSize: 36,
|
|
57
|
+
innerCircleSize: 'h-14 w-14',
|
|
58
|
+
titleTextSize: 'text-xl',
|
|
59
|
+
bodyTextSize: 'text-lg'
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
const config = sizeConfig[size];
|
|
63
|
+
const ripplesToRender = allRipples.slice(-config.rippleCount);
|
|
64
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_hocComponents.View, {
|
|
65
|
+
className: "flex w-full flex-col items-center justify-center px-6 py-12",
|
|
66
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_hocComponents.View, {
|
|
67
|
+
className: "relative mb-8 flex items-center justify-center",
|
|
68
|
+
children: [ripplesToRender.map((ripple, index) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_hocComponents.View, {
|
|
69
|
+
// eslint-disable-line react/no-array-index-key
|
|
70
|
+
className: `absolute ${ripple.size} rounded-full border ${ripple.opacity}`
|
|
71
|
+
}, index)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_hocComponents.View, {
|
|
72
|
+
className: `flex ${config.innerCircleSize} items-center justify-center rounded-xl bg-error-solid`,
|
|
73
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_BaseIcon.default, {
|
|
74
|
+
icon: _outline.ExclamationCircleIcon,
|
|
75
|
+
size: config.iconSize,
|
|
76
|
+
color: "fg-white"
|
|
77
|
+
})
|
|
78
|
+
})]
|
|
79
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_hocComponents.View, {
|
|
80
|
+
className: "flex w-full flex-col items-center text-center",
|
|
81
|
+
children: [title && /*#__PURE__*/(0, _jsxRuntime.jsx)(_BaseText.default, {
|
|
82
|
+
className: `mb-2 text-center ${config.titleTextSize} font-semibold text-primary`,
|
|
83
|
+
children: title
|
|
84
|
+
}), text && /*#__PURE__*/(0, _jsxRuntime.jsx)(_BaseText.default, {
|
|
85
|
+
className: `${config.bodyTextSize} leading-relaxed text-tertiary`,
|
|
86
|
+
children: text
|
|
87
|
+
})]
|
|
88
|
+
})]
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
var _default = exports.default = (0, _nativewind.styled)(BaseErrorBox);
|
|
92
|
+
//# sourceMappingURL=BaseErrorBox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_nativewind","require","_outline","_BaseIcon","_interopRequireDefault","_BaseText","_hocComponents","_jsxRuntime","e","__esModule","default","BaseErrorBox","title","text","size","allRipples","opacity","sizeConfig","sm","rippleCount","iconSize","innerCircleSize","titleTextSize","bodyTextSize","md","lg","xl","config","ripplesToRender","slice","jsxs","View","className","children","map","ripple","index","jsx","icon","ExclamationCircleIcon","color","_default","exports","styled"],"sourceRoot":"../../../src","sources":["components/BaseErrorBox.tsx"],"mappings":";;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AAEA,IAAAE,SAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,SAAA,GAAAD,sBAAA,CAAAH,OAAA;AACA,IAAAK,cAAA,GAAAL,OAAA;AAAyC,IAAAM,WAAA,GAAAN,OAAA;AAAA,SAAAG,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAQzC,SAASG,YAAYA,CAAC;EACpBC,KAAK,GAAG,eAAe;EACvBC,IAAI;EACJC,IAAI,GAAG;AACF,CAAC,EAAE;EACR,MAAMC,UAAU,GAAG,CACjB;IAAED,IAAI,EAAE,qBAAq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|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _nativewind = require("nativewind");
|
|
8
|
+
var _AppView = _interopRequireDefault(require("./AppView"));
|
|
9
|
+
var _hocComponents = require("../hoc-components");
|
|
10
|
+
var _BaseButton = _interopRequireDefault(require("./BaseButton"));
|
|
11
|
+
var _BaseText = _interopRequireDefault(require("./BaseText"));
|
|
12
|
+
var _Warning = _interopRequireDefault(require("./svgs/Warning"));
|
|
13
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
|
+
function BaseErrorScreen({
|
|
16
|
+
text,
|
|
17
|
+
retry
|
|
18
|
+
}) {
|
|
19
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_AppView.default, {
|
|
20
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_hocComponents.View, {
|
|
21
|
+
className: "flex w-full flex-1 flex-col items-center justify-between",
|
|
22
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_hocComponents.View, {
|
|
23
|
+
className: "flex w-full flex-col items-center px-8",
|
|
24
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Warning.default, {
|
|
25
|
+
width: "80%",
|
|
26
|
+
height: 240
|
|
27
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_BaseText.default, {
|
|
28
|
+
className: "mt-10 text-base text-tertiary",
|
|
29
|
+
children: text || 'Lo sentimos, ocurrió un error 😢'
|
|
30
|
+
})]
|
|
31
|
+
}), retry && /*#__PURE__*/(0, _jsxRuntime.jsx)(_BaseButton.default, {
|
|
32
|
+
variant: "secondary",
|
|
33
|
+
text: "Recargar app",
|
|
34
|
+
onPress: () => retry(),
|
|
35
|
+
className: "w-full"
|
|
36
|
+
})]
|
|
37
|
+
})
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
var _default = exports.default = (0, _nativewind.styled)(BaseErrorScreen);
|
|
41
|
+
//# sourceMappingURL=BaseErrorScreen.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_nativewind","require","_AppView","_interopRequireDefault","_hocComponents","_BaseButton","_BaseText","_Warning","_jsxRuntime","e","__esModule","default","BaseErrorScreen","text","retry","jsx","children","jsxs","View","className","width","height","variant","onPress","_default","exports","styled"],"sourceRoot":"../../../src","sources":["components/BaseErrorScreen.tsx"],"mappings":";;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AAEA,IAAAC,QAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,cAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,SAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,QAAA,GAAAJ,sBAAA,CAAAF,OAAA;AAAqC,IAAAO,WAAA,GAAAP,OAAA;AAAA,SAAAE,uBAAAM,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAOrC,SAASG,eAAeA,CAAC;EAAEC,IAAI;EAAEC;AAAa,CAAC,EAAE;EAC/C,oBACE,IAAAN,WAAA,CAAAO,GAAA,EAACb,QAAA,CAAAS,OAAO;IAAAK,QAAA,eACN,IAAAR,WAAA,CAAAS,IAAA,EAACb,cAAA,CAAAc,IAAI;MAACC,SAAS,EAAC,0DAA0D;MAAAH,QAAA,gBACxE,IAAAR,WAAA,CAAAS,IAAA,EAACb,cAAA,CAAAc,IAAI;QAACC,SAAS,EAAC,wCAAwC;QAAAH,QAAA,gBACtD,IAAAR,WAAA,CAAAO,GAAA,EAACR,QAAA,CAAAI,OAAO;UACNS,KAAK,EAAC,KAAK;UACXC,MAAM,EAAE;QAAI,CACb,CAAC,eACF,IAAAb,WAAA,CAAAO,GAAA,EAACT,SAAA,CAAAK,OAAQ;UAACQ,SAAS,EAAC,+BAA+B;UAAAH,QAAA,EAChDH,IAAI,IAAI;QAAkC,CACnC,CAAC;MAAA,CACP,CAAC,EACNC,KAAK,iBACJ,IAAAN,WAAA,CAAAO,GAAA,EAACV,WAAA,CAAAM,OAAU;QACTW,OAAO,EAAC,WAAW;QACnBT,IAAI,EAAC,cAAc;QACnBU,OAAO,EAAEA,CAAA,KAAMT,KAAK,CAAC,CAAE;QACvBK,SAAS,EAAC;MAAQ,CACnB,CACF;IAAA,CACG;EAAC,CACA,CAAC;AAEd;AAAC,IAAAK,QAAA,GAAAC,OAAA,CAAAd,OAAA,GAEc,IAAAe,kBAAM,EAACd,eAAe,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _nativewind = require("nativewind");
|
|
8
|
+
var _hocComponents = require("../hoc-components");
|
|
9
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
|
+
function BaseStickyFooter({
|
|
11
|
+
children
|
|
12
|
+
}) {
|
|
13
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_hocComponents.View, {
|
|
14
|
+
className: "absolute inset-x-0 bottom-0 border-t border-primary bg-primary p-6",
|
|
15
|
+
children: children
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
var _default = exports.default = (0, _nativewind.styled)(BaseStickyFooter);
|
|
19
|
+
//# sourceMappingURL=BaseStickyFooter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_nativewind","require","_hocComponents","_jsxRuntime","BaseStickyFooter","children","jsx","View","className","_default","exports","default","styled"],"sourceRoot":"../../../src","sources":["components/BaseStickyFooter.tsx"],"mappings":";;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AAEA,IAAAC,cAAA,GAAAD,OAAA;AAAyC,IAAAE,WAAA,GAAAF,OAAA;AAEzC,SAASG,gBAAgBA,CAAC;EAAEC;AAAwC,CAAC,EAAE;EACrE,oBACE,IAAAF,WAAA,CAAAG,GAAA,EAACJ,cAAA,CAAAK,IAAI;IAACC,SAAS,EAAC,oEAAoE;IAAAH,QAAA,EACjFA;EAAQ,CACL,CAAC;AAEX;AAAC,IAAAI,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEc,IAAAC,kBAAM,EAACR,gBAAgB,CAAC","ignoreList":[]}
|
|
@@ -10,6 +10,7 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
10
10
|
var _hocComponents = require("../hoc-components");
|
|
11
11
|
var _BaseDatesScrollView = _interopRequireDefault(require("./BaseDatesScrollView"));
|
|
12
12
|
var _BaseText = _interopRequireDefault(require("./BaseText"));
|
|
13
|
+
var _hooks = require("../hooks");
|
|
13
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
15
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
16
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
@@ -26,8 +27,11 @@ function DateSelector({
|
|
|
26
27
|
allowPastDates = false,
|
|
27
28
|
...props
|
|
28
29
|
}) {
|
|
29
|
-
const
|
|
30
|
-
|
|
30
|
+
const {
|
|
31
|
+
tz
|
|
32
|
+
} = (0, _hooks.useTimezonedDate)();
|
|
33
|
+
const minDateStartOfDay = (0, _react.useMemo)(() => (0, _dateFns.startOfDay)(tz(minDate || new Date())), [minDate, tz]);
|
|
34
|
+
const maxDateEndOfDay = (0, _react.useMemo)(() => maxDate ? (0, _dateFns.endOfDay)(tz(maxDate)) : null, [maxDate, tz]);
|
|
31
35
|
const dateRange = (0, _react.useMemo)(() => {
|
|
32
36
|
const startDate = minDateStartOfDay;
|
|
33
37
|
const endDate = maxDateEndOfDay || (0, _dateFns.addDays)(startDate, 7);
|
|
@@ -40,10 +44,11 @@ function DateSelector({
|
|
|
40
44
|
if (disabled) return true;
|
|
41
45
|
if (minDateStartOfDay && (0, _dateFns.isBefore)(day, minDateStartOfDay)) return true;
|
|
42
46
|
if (maxDateEndOfDay && (0, _dateFns.isAfter)(day, maxDateEndOfDay)) return true;
|
|
43
|
-
|
|
44
|
-
if (
|
|
47
|
+
const tzDay = tz(day);
|
|
48
|
+
if (disabledWeekDays.includes(tzDay.getDay())) return true;
|
|
49
|
+
if (!allowPastDates && (0, _dateFns.isBefore)(day, (0, _dateFns.startOfDay)(tz()))) return true;
|
|
45
50
|
return false;
|
|
46
|
-
}, [disabled, minDateStartOfDay, maxDateEndOfDay, disabledWeekDays, allowPastDates]);
|
|
51
|
+
}, [disabled, minDateStartOfDay, maxDateEndOfDay, disabledWeekDays, allowPastDates, tz]);
|
|
47
52
|
const handleDayPress = (0, _react.useCallback)(day => {
|
|
48
53
|
if (isDayDisabled(day)) return;
|
|
49
54
|
onChange?.(day);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_dateFns","require","_nativewind","_react","_interopRequireWildcard","_hocComponents","_BaseDatesScrollView","_interopRequireDefault","_BaseText","_jsxRuntime","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","DateSelector","value","label","description","onChange","minDate","maxDate","disabledWeekDays","disabled","error","allowPastDates","props","minDateStartOfDay","useMemo","startOfDay","Date","maxDateEndOfDay","dateRange","startDate","endDate","addDays","eachDayOfInterval","start","end","isDayDisabled","useCallback","day","isBefore","isAfter","includes","getDay","handleDayPress","jsxs","View","className","children","jsx","selectedDate","onDayPress","_default","exports","styled"],"sourceRoot":"../../../src","sources":["components/DateSelector.tsx"],"mappings":";;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AAQA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAC,uBAAA,CAAAH,OAAA;AAGA,IAAAI,cAAA,GAAAJ,OAAA;AACA,IAAAK,oBAAA,GAAAC,sBAAA,CAAAN,OAAA;AACA,IAAAO,SAAA,GAAAD,sBAAA,CAAAN,OAAA;
|
|
1
|
+
{"version":3,"names":["_dateFns","require","_nativewind","_react","_interopRequireWildcard","_hocComponents","_BaseDatesScrollView","_interopRequireDefault","_BaseText","_hooks","_jsxRuntime","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","DateSelector","value","label","description","onChange","minDate","maxDate","disabledWeekDays","disabled","error","allowPastDates","props","tz","useTimezonedDate","minDateStartOfDay","useMemo","startOfDay","Date","maxDateEndOfDay","endOfDay","dateRange","startDate","endDate","addDays","eachDayOfInterval","start","end","isDayDisabled","useCallback","day","isBefore","isAfter","tzDay","includes","getDay","handleDayPress","jsxs","View","className","children","jsx","selectedDate","onDayPress","_default","exports","styled"],"sourceRoot":"../../../src","sources":["components/DateSelector.tsx"],"mappings":";;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AAQA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAC,uBAAA,CAAAH,OAAA;AAGA,IAAAI,cAAA,GAAAJ,OAAA;AACA,IAAAK,oBAAA,GAAAC,sBAAA,CAAAN,OAAA;AACA,IAAAO,SAAA,GAAAD,sBAAA,CAAAN,OAAA;AACA,IAAAQ,MAAA,GAAAR,OAAA;AAA4C,IAAAS,WAAA,GAAAT,OAAA;AAAA,SAAAM,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD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