@tui/design-system 1.3.0 → 1.5.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/CHANGELOG.md +74 -0
- package/dist/themes/crystalski/index.css +7 -1
- package/dist/themes/crystalski/index.css.map +1 -1
- package/dist/themes/firstchoice/index.css +7 -1
- package/dist/themes/firstchoice/index.css.map +1 -1
- package/dist/themes/tui/index.css +7 -1
- package/dist/themes/tui/index.css.map +1 -1
- package/package.json +18 -34
- package/scss/lib/alert/_mixins.scss +18 -1
- package/scss/lib/button/_mixins.scss +4 -0
- package/scss/lib/price/_mixins.scss +28 -8
- package/scss/lib/price/_variables.scss +2 -1
- package/scss/lib/price-box/_index.scss +2 -0
- package/scss/lib/price-box/_mixins.scss +58 -0
- package/scss/lib/promo-tag/_mixins.scss +11 -1
- package/scss/lib/ratings-reviews/customer-review/_index.scss +3 -0
- package/scss/lib/ratings-reviews/customer-review/_mixins.scss +152 -0
- package/scss/lib/show-more-less/_mixins.scss +50 -61
- package/scss/lib/social-proofing/_index.scss +3 -0
- package/scss/lib/social-proofing/_mixins.scss +67 -0
- package/scss/lib/social-proofing/_variables.scss +8 -0
- package/scss/mixins.scss +3 -0
- package/scss/themes/crystalski/_colors.scss +2 -0
- package/scss/themes/crystalski/_overrides.scss +8 -0
- package/scss/themes/crystalski/index.scss +3 -0
- package/scss/themes/crystalski/theme.json +6 -0
- package/scss/themes/firstchoice/_colors.scss +2 -0
- package/scss/themes/firstchoice/_overrides.scss +8 -0
- package/scss/themes/firstchoice/index.scss +3 -0
- package/scss/themes/firstchoice/theme.json +6 -0
- package/scss/themes/tui/index.scss +3 -0
- package/scss/variables/_colors.scss +2 -0
- package/scss/variables/base-theme.json +45 -9
- package/scss/variables.scss +1 -0
- package/types/components.ts +43 -2
package/types/components.ts
CHANGED
|
@@ -40,7 +40,8 @@ export interface ActiveTagProps {
|
|
|
40
40
|
|
|
41
41
|
// ─── Alert ─────────────────────────────────────────────
|
|
42
42
|
export interface AlertProps {
|
|
43
|
-
variant?: 'info' | 'error' | 'warning' | 'success';
|
|
43
|
+
variant?: 'info' | 'error' | 'warning' | 'success' | 'neutral';
|
|
44
|
+
iconAsset?: string;
|
|
44
45
|
list?: boolean;
|
|
45
46
|
heading?: boolean;
|
|
46
47
|
headingText?: string;
|
|
@@ -435,9 +436,12 @@ export interface PaginationProps {
|
|
|
435
436
|
}
|
|
436
437
|
|
|
437
438
|
// ─── Price ─────────────────────────────────────────────
|
|
439
|
+
export const Currencies = ['GBP', 'EUR', 'USD', 'SEK', 'NOK', 'DKK', 'CHF'] as const;
|
|
440
|
+
export type Currency = (typeof Currencies)[number];
|
|
441
|
+
|
|
438
442
|
export interface PriceProps {
|
|
439
443
|
size?: 'small' | 'medium' | 'large';
|
|
440
|
-
currency?:
|
|
444
|
+
currency?: Currency;
|
|
441
445
|
mainUnit?: string;
|
|
442
446
|
subUnit?: string;
|
|
443
447
|
suffix?: string;
|
|
@@ -450,6 +454,18 @@ export interface PriceProps {
|
|
|
450
454
|
showDecimal?: boolean;
|
|
451
455
|
}
|
|
452
456
|
|
|
457
|
+
// ─── Price Box ──────────────────────────────────────────
|
|
458
|
+
export interface PriceBoxProps {
|
|
459
|
+
tags?: boolean;
|
|
460
|
+
currency?: Currency;
|
|
461
|
+
fullWidthButton?: boolean;
|
|
462
|
+
additionalContent?: boolean;
|
|
463
|
+
additionalContentHtml?: string;
|
|
464
|
+
divider?: boolean;
|
|
465
|
+
footer?: boolean;
|
|
466
|
+
footerHtml?: string;
|
|
467
|
+
}
|
|
468
|
+
|
|
453
469
|
// ─── Promo Tag ──────────────────────────────────────────
|
|
454
470
|
export const PromoTagSizes = ['xsmall', 'small', 'medium', 'large', 'xlarge', 'xxlarge'] as const;
|
|
455
471
|
export type PromoTagSize = (typeof PromoTagSizes)[number];
|
|
@@ -463,6 +479,20 @@ export interface PromoTagProps {
|
|
|
463
479
|
theme?: Theme;
|
|
464
480
|
}
|
|
465
481
|
|
|
482
|
+
// ─── Ratings: Customer review ─────────────────────────
|
|
483
|
+
export interface CustomerReviewProps {
|
|
484
|
+
type?: NumericalType;
|
|
485
|
+
variant?: 'brand' | 'tripadvisor';
|
|
486
|
+
score?: number;
|
|
487
|
+
name?: string;
|
|
488
|
+
date?: string;
|
|
489
|
+
reviewTitle?: string;
|
|
490
|
+
reviewContent?: string;
|
|
491
|
+
hasTag?: boolean;
|
|
492
|
+
includeRatings?: boolean;
|
|
493
|
+
theme?: Theme;
|
|
494
|
+
}
|
|
495
|
+
|
|
466
496
|
// ─── Ratings: Numerical (9/10) ─────────────────────────
|
|
467
497
|
export type NumericalType = 'rating' | 'filter';
|
|
468
498
|
export type NumericalVariant = 'brand' | 'alt';
|
|
@@ -528,6 +558,7 @@ export interface RangeIconsProps {
|
|
|
528
558
|
hasSchema?: boolean;
|
|
529
559
|
additionalSchemaProps?: SchemaProps;
|
|
530
560
|
theme?: Theme;
|
|
561
|
+
listVariant?: boolean;
|
|
531
562
|
}
|
|
532
563
|
|
|
533
564
|
// ─── Ratings: Range icons group ────────────────────────
|
|
@@ -541,6 +572,7 @@ export interface RangeIconsGroupProps {
|
|
|
541
572
|
variant?: RangeIconsVariant;
|
|
542
573
|
size?: RangeIconsSize;
|
|
543
574
|
items?: RangeIconsGroupItem[];
|
|
575
|
+
hasSchema?: boolean;
|
|
544
576
|
theme?: Theme;
|
|
545
577
|
}
|
|
546
578
|
|
|
@@ -647,3 +679,12 @@ export interface TravelAwareBannerProps {
|
|
|
647
679
|
linkAccessibilityLabel?: string;
|
|
648
680
|
isExternal?: boolean;
|
|
649
681
|
}
|
|
682
|
+
|
|
683
|
+
// ─── Social proofing ───────────────────────────────────────
|
|
684
|
+
export interface SocialProofingProps {
|
|
685
|
+
theme?: Theme;
|
|
686
|
+
iconAsset?: string;
|
|
687
|
+
iconSize?: 'small';
|
|
688
|
+
hasIcon?: boolean;
|
|
689
|
+
closeLabel?: string;
|
|
690
|
+
}
|