react-native-calendar-resource 1.0.0 → 1.0.1
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 +1 -98
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -30,7 +30,7 @@ yarn add react-native-calendar-resource
|
|
|
30
30
|
Ensure you have the required peer dependencies:
|
|
31
31
|
|
|
32
32
|
```bash
|
|
33
|
-
npm install
|
|
33
|
+
npm install date-fns
|
|
34
34
|
```
|
|
35
35
|
|
|
36
36
|
---
|
|
@@ -288,7 +288,6 @@ interface BookingData {
|
|
|
288
288
|
- Expo
|
|
289
289
|
- TypeScript
|
|
290
290
|
- date-fns
|
|
291
|
-
- NativeWind (optional, for default styling)
|
|
292
291
|
|
|
293
292
|
---
|
|
294
293
|
|
|
@@ -304,100 +303,4 @@ Headers are disabled at the stack level and selectively enabled per screen to ma
|
|
|
304
303
|
|
|
305
304
|
---
|
|
306
305
|
|
|
307
|
-
### Calendar Component
|
|
308
|
-
|
|
309
|
-
The booking calendar was implemented from scratch instead of relying on third-party libraries.
|
|
310
|
-
|
|
311
|
-
Reasons for this decision:
|
|
312
|
-
|
|
313
|
-
1. No third-party library was found that met the requirements of the project.
|
|
314
|
-
2. Pixel-perfect alignment with the design
|
|
315
|
-
3. Full control over a resource-based grid (events × time)
|
|
316
|
-
4. Optimized performance for the specific use case
|
|
317
|
-
5. Reduced dependency and bundle size overhead
|
|
318
|
-
|
|
319
|
-
#### Calendar Architecture
|
|
320
|
-
|
|
321
|
-
```
|
|
322
|
-
Calendar/
|
|
323
|
-
├── Calendar.tsx
|
|
324
|
-
├── CalendarHeader.tsx
|
|
325
|
-
├── TimeColumn.tsx
|
|
326
|
-
├── ResourceHeaders.tsx
|
|
327
|
-
├── GridBody.tsx
|
|
328
|
-
├── EventsLayer.tsx
|
|
329
|
-
└── UnavailableLayer.tsx
|
|
330
|
-
```
|
|
331
|
-
|
|
332
|
-
#### Key Features
|
|
333
|
-
|
|
334
|
-
- Synchronized horizontal and vertical scrolling
|
|
335
|
-
- Resource-based layout for multiple events
|
|
336
|
-
- Three slot states: available, booked, unavailable
|
|
337
|
-
- Configurable time range, slot height, and column width
|
|
338
|
-
- Cross-platform behavior parity (iOS & Android)
|
|
339
|
-
|
|
340
|
-
---
|
|
341
|
-
|
|
342
|
-
### Styling Approach
|
|
343
|
-
|
|
344
|
-
Styling is handled using NativeWind (TailwindCSS for React Native):
|
|
345
|
-
|
|
346
|
-
- Semantic color tokens (background, card, accent, muted)
|
|
347
|
-
- Consistent spacing and typography via utility classes
|
|
348
|
-
- Centralized theme configuration
|
|
349
|
-
- Custom fonts (Asap, Bebas Neue) loaded via `expo-font`
|
|
350
|
-
- A mix of @expo/vector-icons and SVG icon components was used. SVGs were introduced for icons where an exact visual match was not available in the Expo icon set.
|
|
351
|
-
|
|
352
|
-
---
|
|
353
|
-
|
|
354
|
-
### Date & Time Handling
|
|
355
|
-
|
|
356
|
-
All date and time operations use date-fns for:
|
|
357
|
-
|
|
358
|
-
- Clear and readable date manipulation
|
|
359
|
-
- Tree-shakeable imports
|
|
360
|
-
- Safer alternatives to native Date APIs
|
|
361
|
-
|
|
362
|
-
---
|
|
363
|
-
|
|
364
|
-
## Tech Stack
|
|
365
|
-
|
|
366
|
-
- Expo SDK 54
|
|
367
|
-
- TypeScript
|
|
368
|
-
- Expo Router + React Navigation Stack
|
|
369
|
-
- NativeWind (TailwindCSS)
|
|
370
|
-
- date-fns
|
|
371
|
-
- react-native-leaflet-view (Leaflet maps via WebView)
|
|
372
|
-
- expo-linear-gradient
|
|
373
|
-
- react-native-reanimated
|
|
374
|
-
|
|
375
|
-
---
|
|
376
|
-
|
|
377
|
-
## Implemented Features
|
|
378
|
-
|
|
379
|
-
- Venue details screen with image carousel
|
|
380
|
-
- Rating badges and amenity tags
|
|
381
|
-
- Coach cards with detail navigation
|
|
382
|
-
- Custom calendar grid
|
|
383
|
-
- Date shortcuts (Today / Tomorrow)
|
|
384
|
-
- Visual distinction between slot states
|
|
385
|
-
- Location card with map preview
|
|
386
|
-
- Persistent tab bar navigation
|
|
387
|
-
- Nested stack navigation within Explore
|
|
388
|
-
- Cross-platform support (iOS & Android)
|
|
389
|
-
|
|
390
|
-
---
|
|
391
|
-
|
|
392
|
-
## Additional Notes
|
|
393
|
-
|
|
394
|
-
- The Explore tab was used to display event details since no design was provided for the Home screen.
|
|
395
|
-
In a real-world application, the Explore tab would typically be used to search for or browse events, then navigate to the event details screen.
|
|
396
|
-
- Non-Explore tabs are intentionally minimal as they are outside the task scope
|
|
397
|
-
- Leaflet (via `react-native-leaflet-view`) was used for maps instead of `react-native-maps` or other Google Maps-based libraries, as those require a Google Cloud API key and billing subscription
|
|
398
|
-
- Mock data is used throughout the app
|
|
399
|
-
- Safe area insets are handled for iOS notch and home indicator
|
|
400
|
-
|
|
401
|
-
---
|
|
402
|
-
|
|
403
306
|
**Author:** Abdelrahman Sobhy
|
package/package.json
CHANGED