@hotelcard/ui 0.0.71 → 0.0.73
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 +25 -3
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +37 -2
- package/dist/index.js +2268 -2264
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -61,9 +61,10 @@ Wrap your app with `HotelCardUIProvider` to enable translations and configuratio
|
|
|
61
61
|
import { HotelCardUIProvider } from '@hotelcard/ui';
|
|
62
62
|
|
|
63
63
|
<HotelCardUIProvider
|
|
64
|
-
locale="de"
|
|
65
|
-
currency="CHF"
|
|
66
|
-
|
|
64
|
+
locale="de" // 'de' | 'en' | 'fr' | 'it'
|
|
65
|
+
currency="CHF" // Currency code
|
|
66
|
+
apiBaseUrl="https://hotelcard.ch" // API base URL (required for LocationAutocomplete)
|
|
67
|
+
isDesktop={false} // Responsive mode
|
|
67
68
|
>
|
|
68
69
|
<App />
|
|
69
70
|
</HotelCardUIProvider>
|
|
@@ -110,6 +111,7 @@ The package includes built-in translations for `de`, `en`, `fr`, and `it` locale
|
|
|
110
111
|
| `Benefits` | Benefits list with icons |
|
|
111
112
|
| `Pin` | Location pin marker |
|
|
112
113
|
| `EmptyState` | Generic empty state with icon, title, description, and optional action button |
|
|
114
|
+
| `ExperienceCard` | Experience/theme card with illustration image, label, and arrow |
|
|
113
115
|
|
|
114
116
|
### Membership Components
|
|
115
117
|
|
|
@@ -495,6 +497,25 @@ import { MembershipCard } from '@hotelcard/ui';
|
|
|
495
497
|
|
|
496
498
|
The "Valid thru" label is automatically translated via `HotelCardUIProvider` locale. Pass `validThruLabel` to override.
|
|
497
499
|
|
|
500
|
+
### ExperienceCard
|
|
501
|
+
|
|
502
|
+
```tsx
|
|
503
|
+
import { ExperienceCard } from '@hotelcard/ui';
|
|
504
|
+
|
|
505
|
+
<ExperienceCard
|
|
506
|
+
image="https://cdn.example.com/pictures/themes/1.png"
|
|
507
|
+
label="Wellness"
|
|
508
|
+
onClick={() => navigate('/search?experiences=1')}
|
|
509
|
+
/>
|
|
510
|
+
```
|
|
511
|
+
|
|
512
|
+
| Prop | Type | Required | Description |
|
|
513
|
+
|------|------|----------|-------------|
|
|
514
|
+
| `image` | `string` | Yes | URL to the experience illustration image |
|
|
515
|
+
| `label` | `string` | Yes | Experience name |
|
|
516
|
+
| `onClick` | `() => void` | No | Click handler for navigation |
|
|
517
|
+
| `className` | `string` | No | Additional CSS class |
|
|
518
|
+
|
|
498
519
|
### Modal
|
|
499
520
|
|
|
500
521
|
```tsx
|
|
@@ -906,6 +927,7 @@ import type {
|
|
|
906
927
|
BenefitItem,
|
|
907
928
|
PinProps,
|
|
908
929
|
EmptyStateProps,
|
|
930
|
+
ExperienceCardProps,
|
|
909
931
|
|
|
910
932
|
// Search Component Props
|
|
911
933
|
DateSelectorProps,
|