@hotelcard/ui 0.0.2 → 0.0.4

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.

Potentially problematic release.


This version of @hotelcard/ui might be problematic. Click here for more details.

package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import * as react from 'react';
2
- import { ButtonHTMLAttributes, ReactNode } from 'react';
1
+ import * as React$1 from 'react';
2
+ import React__default, { ButtonHTMLAttributes, ReactNode } from 'react';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
 
5
5
  interface ButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children'> {
@@ -37,7 +37,7 @@ interface ButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'chi
37
37
  iconOnly?: boolean;
38
38
  }
39
39
 
40
- declare const Button: react.ForwardRefExoticComponent<ButtonProps & react.RefAttributes<HTMLButtonElement>>;
40
+ declare const Button: React$1.ForwardRefExoticComponent<ButtonProps & React$1.RefAttributes<HTMLButtonElement>>;
41
41
 
42
42
  interface BadgeProps {
43
43
  /**
@@ -116,6 +116,280 @@ interface RatingProps {
116
116
 
117
117
  declare const Rating: React.FC<RatingProps>;
118
118
 
119
+ interface DividerProps {
120
+ /** Optional label to display in the middle of the divider */
121
+ label?: ReactNode;
122
+ /** Orientation of the divider */
123
+ orientation?: 'horizontal' | 'vertical';
124
+ /** Additional CSS class names */
125
+ className?: string;
126
+ }
127
+
128
+ declare const Divider: React.FC<DividerProps>;
129
+
130
+ type ChipSize = 'small' | 'medium';
131
+ type ChipState = 'idle' | 'active' | 'disabled';
132
+ interface ChipProps {
133
+ /** The label text displayed in the chip */
134
+ label: string;
135
+ /** Optional count/number displayed in a badge (for filter chips) */
136
+ count?: number | string;
137
+ /** Size variant */
138
+ size?: ChipSize;
139
+ /** State variant */
140
+ state?: ChipState;
141
+ /** Whether the chip is removable (shows X icon) */
142
+ removable?: boolean;
143
+ /** Click handler for the chip (used for selection/toggle) */
144
+ onClick?: () => void;
145
+ /** Handler called when remove button is clicked */
146
+ onRemove?: () => void;
147
+ /** Additional className for custom styling */
148
+ className?: string;
149
+ /** Disable the chip */
150
+ disabled?: boolean;
151
+ }
152
+
153
+ declare const Chip: React.FC<ChipProps>;
154
+
155
+ type CheckboxSize = 'small' | 'medium';
156
+ interface CheckboxProps {
157
+ /** Label text displayed next to checkbox */
158
+ label?: string;
159
+ /** Controlled checked state */
160
+ checked?: boolean;
161
+ /** Default checked state for uncontrolled usage */
162
+ defaultChecked?: boolean;
163
+ /** Callback when checked state changes */
164
+ onChange?: (checked: boolean) => void;
165
+ /** Disable the checkbox */
166
+ disabled?: boolean;
167
+ /** Show error state */
168
+ error?: boolean;
169
+ /** Input name attribute */
170
+ name?: string;
171
+ /** Input id attribute */
172
+ id?: string;
173
+ /** Additional className for custom styling */
174
+ className?: string;
175
+ /** Size variant */
176
+ size?: CheckboxSize;
177
+ }
178
+
179
+ declare const Checkbox: React.FC<CheckboxProps>;
180
+
181
+ interface RadioButtonProps {
182
+ /** Whether the radio button is checked */
183
+ checked: boolean;
184
+ /** Callback fired when the radio button state changes */
185
+ onChange: (checked: boolean) => void;
186
+ /** The id attribute of the radio button (used to associate the label via htmlFor) */
187
+ id?: string;
188
+ /** The name attribute of the radio button (for grouping) */
189
+ name?: string;
190
+ /** The value attribute of the radio button */
191
+ value?: string;
192
+ /** Whether the radio button is disabled */
193
+ disabled?: boolean;
194
+ /** Additional CSS class names */
195
+ className?: string;
196
+ /** Label text for the radio button */
197
+ label?: string;
198
+ /** Autocomplete attribute */
199
+ autoComplete?: string;
200
+ }
201
+
202
+ declare const RadioButton: React__default.FC<RadioButtonProps>;
203
+
204
+ interface SectionHeaderProps {
205
+ /** Title text for the section */
206
+ title: string;
207
+ /** Label for the "Show all" button (e.g., "Show all", "Alle anzeigen") */
208
+ showAllLabel?: string;
209
+ /** Click handler for the "Show all" button */
210
+ onShowAllClick?: () => void;
211
+ /** Additional className for custom styling */
212
+ className?: string;
213
+ }
214
+
215
+ declare const SectionHeader: React.FC<SectionHeaderProps>;
216
+
217
+ interface ModalProps {
218
+ /** Whether the modal is open */
219
+ isOpen: boolean;
220
+ /** Callback when modal should close */
221
+ onClose: () => void;
222
+ /** Modal content */
223
+ children: React.ReactNode;
224
+ /** Maximum width of the modal */
225
+ width?: string;
226
+ /** Additional className for custom styling */
227
+ className?: string;
228
+ /** Whether to show the close button (default: true) */
229
+ showCloseButton?: boolean;
230
+ /** Whether clicking the backdrop closes the modal (default: false) */
231
+ disableBackdropClick?: boolean;
232
+ }
233
+
234
+ declare const Modal: React__default.FC<ModalProps>;
235
+
236
+ interface CardBadge {
237
+ text: string;
238
+ variant?: 'primary' | 'secondary';
239
+ }
240
+ interface CardRatingInfo {
241
+ label: string;
242
+ value: string | number;
243
+ }
244
+ interface CardProps {
245
+ /** Image URL for the card */
246
+ image?: string;
247
+ /** Alt text for accessibility */
248
+ imageAlt?: string;
249
+ /** Main label/title text */
250
+ label?: string;
251
+ /** Price text */
252
+ price?: string;
253
+ /** Rating value (1-6, 6 = Swiss Lodge) */
254
+ stars?: number;
255
+ /** Superior hotel indicator */
256
+ isSuperior?: boolean;
257
+ /** Badge configuration */
258
+ badge?: CardBadge;
259
+ /** Click handler */
260
+ onClick?: () => void;
261
+ /** Additional CSS classes */
262
+ className?: string;
263
+ /** Card size variant - determines styling for desktop or mobile */
264
+ variant?: 'desktop' | 'mobile';
265
+ /** Whether to show rating area */
266
+ hasRating?: boolean;
267
+ /** Add padding around card */
268
+ withPadding?: boolean;
269
+ /** Fixed height (desktop only) */
270
+ withHeight?: boolean;
271
+ /** Rating info to display (e.g., { label: "Excellent", value: "4.5" }) */
272
+ ratingInfo?: CardRatingInfo;
273
+ /** Usage context for conditional styling */
274
+ context?: 'hotel-deals' | string;
275
+ /** Label for Swiss Lodge (stars = 6), e.g., "Swiss Lodge" */
276
+ swissLodgeLabel?: string;
277
+ }
278
+
279
+ declare const Card: React__default.FC<CardProps>;
280
+
281
+ interface CompactCardBadge {
282
+ text: string;
283
+ variant?: 'primary' | 'secondary';
284
+ }
285
+ interface CompactCardProps {
286
+ /** Image URL for the card */
287
+ image?: string;
288
+ /** Alt text for accessibility */
289
+ imageAlt?: string;
290
+ /** Main label/title text */
291
+ label?: string;
292
+ /** Price text */
293
+ price?: string;
294
+ /** Rating value (1-6, 6 = Swiss Lodge) */
295
+ stars?: number;
296
+ /** Superior hotel indicator */
297
+ isSuperior?: boolean;
298
+ /** Badge configuration */
299
+ badge?: CompactCardBadge;
300
+ /** Click handler */
301
+ onClick?: () => void;
302
+ /** Additional CSS classes */
303
+ className?: string;
304
+ /** Label for Swiss Lodge (rating = 6), e.g., "Swiss Lodge" */
305
+ swissLodgeLabel?: string;
306
+ }
307
+
308
+ declare const CompactCard: React__default.FC<CompactCardProps>;
309
+
310
+ interface DropdownOption {
311
+ value: string;
312
+ label: string;
313
+ }
314
+ interface DropdownProps {
315
+ /** Available options */
316
+ options?: DropdownOption[];
317
+ /** Disable the dropdown */
318
+ disabled?: boolean;
319
+ /** Show error state */
320
+ error?: boolean;
321
+ /** Default selected value */
322
+ defaultValue?: string;
323
+ /** Controlled value */
324
+ value?: string;
325
+ /** Callback when selection changes */
326
+ onChange?: (value: string) => void;
327
+ /** Additional className for custom styling */
328
+ className?: string;
329
+ /** Input name attribute */
330
+ name?: string;
331
+ /** Input id attribute */
332
+ id?: string;
333
+ /** Placeholder text when no selection */
334
+ placeholder?: string;
335
+ }
336
+
337
+ declare const Dropdown: React__default.FC<DropdownProps>;
338
+
339
+ type InputType = 'text' | 'email' | 'password' | 'tel' | 'number' | 'search' | 'url' | 'date';
340
+ interface InputProps {
341
+ /** Label text above the input */
342
+ label?: string;
343
+ /** Placeholder text */
344
+ placeholder?: string;
345
+ /** Helper text below the input */
346
+ helper?: string;
347
+ /** Controlled value */
348
+ value?: string;
349
+ /** Default value for uncontrolled usage */
350
+ defaultValue?: string;
351
+ /** Callback when value changes */
352
+ onChange?: (value: string) => void;
353
+ /** Callback when input gains focus */
354
+ onFocus?: () => void;
355
+ /** Callback when input loses focus */
356
+ onBlur?: () => void;
357
+ /** Input type */
358
+ type?: InputType;
359
+ /** Show error state */
360
+ error?: boolean;
361
+ /** Disable the input */
362
+ disabled?: boolean;
363
+ /** Icon to show on the left side */
364
+ leftIcon?: React.ReactNode;
365
+ /** Icon or element to show on the right side */
366
+ rightIcon?: React.ReactNode;
367
+ /** Prefix text (e.g., currency symbol) */
368
+ prefix?: string;
369
+ /** Additional className for container */
370
+ className?: string;
371
+ /** Additional className for input element */
372
+ inputClassName?: string;
373
+ /** Additional className for wrapper */
374
+ wrapperClassName?: string;
375
+ /** Input name attribute */
376
+ name?: string;
377
+ /** Input id attribute */
378
+ id?: string;
379
+ /** Whether the input is required */
380
+ required?: boolean;
381
+ /** Autocomplete attribute */
382
+ autoComplete?: string;
383
+ /** Auto focus the input */
384
+ autoFocus?: boolean;
385
+ /** Make the input read-only */
386
+ readOnly?: boolean;
387
+ /** Additional input props */
388
+ inputProps?: React.InputHTMLAttributes<HTMLInputElement>;
389
+ }
390
+
391
+ declare const Input: React__default.FC<InputProps>;
392
+
119
393
  interface HeartIconProps {
120
394
  filled?: boolean;
121
395
  className?: string;
@@ -163,4 +437,4 @@ declare const PinIcon: {
163
437
  displayName: string;
164
438
  };
165
439
 
166
- export { Badge, type BadgeProps, Button, type ButtonProps, ChevronLeftIcon, ChevronRightIcon, HeartIcon, PinIcon, Rating, type RatingProps, StarIcon };
440
+ export { Badge, type BadgeProps, Button, type ButtonProps, Card, type CardBadge, type CardProps, type CardRatingInfo, Checkbox, type CheckboxProps, type CheckboxSize, ChevronLeftIcon, ChevronRightIcon, Chip, type ChipProps, type ChipSize, type ChipState, CompactCard, type CompactCardBadge, type CompactCardProps, Divider, type DividerProps, Dropdown, type DropdownOption, type DropdownProps, HeartIcon, Input, type InputProps, type InputType, Modal, type ModalProps, PinIcon, RadioButton, type RadioButtonProps, Rating, type RatingProps, SectionHeader, type SectionHeaderProps, StarIcon };