@hotelcard/ui 0.0.55 → 0.0.57
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 +37 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +63 -10
- package/dist/index.js +3298 -3195
- package/dist/index.js.map +1 -1
- package/package.json +13 -12
package/README.md
CHANGED
|
@@ -111,6 +111,12 @@ The package includes built-in translations for `de`, `en`, `fr`, and `it` locale
|
|
|
111
111
|
| `Pin` | Location pin marker |
|
|
112
112
|
| `EmptyState` | Generic empty state with icon, title, description, and optional action button |
|
|
113
113
|
|
|
114
|
+
### Membership Components
|
|
115
|
+
|
|
116
|
+
| Component | Description |
|
|
117
|
+
|-----------|-------------|
|
|
118
|
+
| `MembershipCard` | HotelCard membership card with name, number, validity dates on card background |
|
|
119
|
+
|
|
114
120
|
### Booking Components
|
|
115
121
|
|
|
116
122
|
| Component | Description |
|
|
@@ -461,6 +467,34 @@ import { EmptyState } from '@hotelcard/ui';
|
|
|
461
467
|
/>
|
|
462
468
|
```
|
|
463
469
|
|
|
470
|
+
### MembershipCard
|
|
471
|
+
|
|
472
|
+
Displays the HotelCard membership card with member name, card number, and validity dates positioned over a card background image:
|
|
473
|
+
|
|
474
|
+
```tsx
|
|
475
|
+
import { MembershipCard } from '@hotelcard/ui';
|
|
476
|
+
|
|
477
|
+
<MembershipCard
|
|
478
|
+
fullName="Max Mustermann"
|
|
479
|
+
cardNumber="1234 5678 9012"
|
|
480
|
+
validFrom="01.2025"
|
|
481
|
+
validUntil="01.2026"
|
|
482
|
+
cardImageUrl="/images/digital-HC-background_card.png"
|
|
483
|
+
/>
|
|
484
|
+
```
|
|
485
|
+
|
|
486
|
+
| Prop | Type | Required | Description |
|
|
487
|
+
|------|------|----------|-------------|
|
|
488
|
+
| `fullName` | `string` | Yes | Member's full name |
|
|
489
|
+
| `cardNumber` | `string` | Yes | Membership card number |
|
|
490
|
+
| `validFrom` | `string` | Yes | Validity start date (pre-formatted) |
|
|
491
|
+
| `validUntil` | `string` | Yes | Validity end date (pre-formatted) |
|
|
492
|
+
| `cardImageUrl` | `string` | Yes | URL to the card background image |
|
|
493
|
+
| `validThruLabel` | `string` | No | Override "Valid thru" label (uses translation by default) |
|
|
494
|
+
| `domainText` | `string` | No | Domain text shown on card (defaults to "hotelcard.ch") |
|
|
495
|
+
|
|
496
|
+
The "Valid thru" label is automatically translated via `HotelCardUIProvider` locale. Pass `validThruLabel` to override.
|
|
497
|
+
|
|
464
498
|
### Modal
|
|
465
499
|
|
|
466
500
|
```tsx
|
|
@@ -919,6 +953,9 @@ import type {
|
|
|
919
953
|
Locale,
|
|
920
954
|
TranslationKeys,
|
|
921
955
|
|
|
956
|
+
// Membership Component Props
|
|
957
|
+
MembershipCardProps,
|
|
958
|
+
|
|
922
959
|
// Booking Component Props
|
|
923
960
|
FeaturedBookingCardProps,
|
|
924
961
|
CompactBookingCardProps,
|