mautourco-components 0.2.8 → 0.2.10
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/dist/components/atoms/Button/Button.css +28 -0
- package/dist/components/atoms/Button/Button.d.ts +1 -1
- package/dist/components/atoms/Button/Button.js +2 -1
- package/dist/components/atoms/Chip/Chip.css +2238 -0
- package/dist/components/atoms/Chip/Chip.d.ts +27 -0
- package/dist/components/atoms/Chip/Chip.js +37 -0
- package/dist/components/atoms/Divider/Divider.css +2135 -0
- package/dist/components/atoms/Divider/Divider.d.ts +14 -0
- package/dist/components/atoms/Divider/Divider.js +16 -0
- package/dist/components/atoms/Icon/Icon.d.ts +5 -3
- package/dist/components/atoms/Icon/Icon.js +4 -119
- package/dist/components/atoms/Icon/icons/AccomIcon.d.ts +12 -0
- package/dist/components/atoms/Icon/icons/AccomIcon.js +36 -0
- package/dist/components/atoms/Icon/icons/ArrowDownOutlineIcon.d.ts +8 -0
- package/dist/components/atoms/Icon/icons/ArrowDownOutlineIcon.js +36 -0
- package/dist/components/atoms/Icon/icons/ArrowRightOutlineIcon.d.ts +8 -0
- package/dist/components/atoms/Icon/icons/ArrowRightOutlineIcon.js +36 -0
- package/dist/components/atoms/Icon/icons/Building2OutlineIcon.d.ts +8 -0
- package/dist/components/atoms/Icon/icons/Building2OutlineIcon.js +36 -0
- package/dist/components/atoms/Icon/icons/BusIcon.d.ts +12 -0
- package/dist/components/atoms/Icon/icons/BusIcon.js +36 -0
- package/dist/components/atoms/Icon/icons/Calendar2Icon.d.ts +12 -0
- package/dist/components/atoms/Icon/icons/Calendar2Icon.js +36 -0
- package/dist/components/atoms/Icon/icons/CalendarRangeOutlineIcon.d.ts +8 -0
- package/dist/components/atoms/Icon/icons/CalendarRangeOutlineIcon.js +36 -0
- package/dist/components/atoms/Icon/icons/Chevron.d.ts +2 -0
- package/dist/components/atoms/Icon/icons/Chevron.js +10 -10
- package/dist/components/atoms/Icon/icons/MapIcon.d.ts +8 -0
- package/dist/components/atoms/Icon/icons/MapIcon.js +36 -0
- package/dist/components/atoms/Icon/icons/MicroIcon.d.ts +12 -0
- package/dist/components/atoms/Icon/icons/MicroIcon.js +36 -0
- package/dist/components/atoms/Icon/icons/MoreVerticalIcon.d.ts +12 -0
- package/dist/components/atoms/Icon/icons/MoreVerticalIcon.js +36 -0
- package/dist/components/atoms/Icon/icons/NightIcon.d.ts +12 -0
- package/dist/components/atoms/Icon/icons/NightIcon.js +36 -0
- package/dist/components/atoms/Icon/icons/PlaneLandingOutlineIcon.d.ts +8 -0
- package/dist/components/atoms/Icon/icons/PlaneLandingOutlineIcon.js +36 -0
- package/dist/components/atoms/Icon/icons/PlaneTakeoffOutlineIcon.d.ts +8 -0
- package/dist/components/atoms/Icon/icons/PlaneTakeoffOutlineIcon.js +36 -0
- package/dist/components/atoms/Icon/icons/RowExcursion.d.ts +16 -0
- package/dist/components/atoms/Icon/icons/RowExcursion.js +28 -0
- package/dist/components/atoms/Icon/icons/StopWatchIcon.d.ts +12 -0
- package/dist/components/atoms/Icon/icons/StopWatchIcon.js +36 -0
- package/dist/components/atoms/Icon/icons/Utensils.d.ts +12 -0
- package/dist/components/atoms/Icon/icons/Utensils.js +36 -0
- package/dist/components/atoms/Icon/icons/WalletIcon.d.ts +12 -0
- package/dist/components/atoms/Icon/icons/WalletIcon.js +36 -0
- package/dist/components/atoms/Icon/icons/registry.d.ts +66 -0
- package/dist/components/atoms/Icon/icons/registry.js +121 -0
- package/dist/components/atoms/Typography/Typography.d.ts +3 -1
- package/dist/components/atoms/Typography/Typography.js +3 -15
- package/dist/components/molecules/ActionDropdown/ActionDropdown.css +2119 -0
- package/dist/components/molecules/ActionDropdown/ActionDropdown.d.ts +21 -0
- package/dist/components/molecules/ActionDropdown/ActionDropdown.js +34 -0
- package/dist/components/molecules/DateDisplay/DateDisplay.d.ts +14 -0
- package/dist/components/molecules/DateDisplay/DateDisplay.js +39 -0
- package/dist/components/molecules/FeatureRow/FeatureRow.css +2130 -0
- package/dist/components/molecules/FeatureRow/FeatureRow.d.ts +17 -0
- package/dist/components/molecules/FeatureRow/FeatureRow.js +22 -0
- package/dist/components/molecules/FromTo/FromTo.d.ts +8 -0
- package/dist/components/molecules/FromTo/FromTo.js +24 -0
- package/dist/components/molecules/LocationDropdown/LocationDropdown.d.ts +1 -0
- package/dist/components/molecules/LocationDropdown/LocationDropdown.js +17 -4
- package/dist/components/molecules/Pagination/Pagination.css +2168 -0
- package/dist/components/molecules/Pagination/Pagination.d.ts +16 -0
- package/dist/components/molecules/Pagination/Pagination.js +90 -0
- package/dist/components/molecules/SectionTitle/SectionTitle.css +2112 -0
- package/dist/components/molecules/SectionTitle/SectionTitle.d.ts +16 -0
- package/dist/components/molecules/SectionTitle/SectionTitle.js +21 -0
- package/dist/components/molecules/ServiceSelector/ServiceSelector.d.ts +22 -0
- package/dist/components/molecules/ServiceSelector/ServiceSelector.js +85 -0
- package/dist/components/molecules/ServiceSelector/index.d.ts +2 -0
- package/dist/components/molecules/ServiceSelector/index.js +1 -0
- package/dist/components/molecules/Stepper/Stepper.css +2144 -0
- package/dist/components/molecules/Stepper/Stepper.d.ts +18 -0
- package/dist/components/molecules/Stepper/Stepper.js +33 -0
- package/dist/components/molecules/TableServiceItem/DetailsCol.d.ts +12 -0
- package/dist/components/molecules/TableServiceItem/DetailsCol.js +17 -0
- package/dist/components/molecules/TableServiceItem/ItemCol.d.ts +13 -0
- package/dist/components/molecules/TableServiceItem/ItemCol.js +24 -0
- package/dist/components/molecules/TableServiceItem/RowAccommodation.d.ts +16 -0
- package/dist/components/molecules/TableServiceItem/RowAccommodation.js +37 -0
- package/dist/components/molecules/TableServiceItem/RowExcursion.d.ts +16 -0
- package/dist/components/molecules/TableServiceItem/RowExcursion.js +22 -0
- package/dist/components/molecules/TableServiceItem/RowOtherServices.d.ts +9 -0
- package/dist/components/molecules/TableServiceItem/RowOtherServices.js +34 -0
- package/dist/components/molecules/TableServiceItem/RowTransfer.d.ts +15 -0
- package/dist/components/molecules/TableServiceItem/RowTransfer.js +37 -0
- package/dist/components/molecules/TableServiceItem/index.d.ts +17 -0
- package/dist/components/molecules/TableServiceItem/index.js +15 -0
- package/dist/components/molecules/TextWithIcon/TextWithIcon.d.ts +30 -0
- package/dist/components/molecules/TextWithIcon/TextWithIcon.js +31 -0
- package/dist/components/molecules/TooltipDisplay/TooltipDisplay.d.ts +13 -0
- package/dist/components/molecules/TooltipDisplay/TooltipDisplay.js +18 -0
- package/dist/components/organisms/CarBookingCard/CarBookingCard.css +2313 -0
- package/dist/components/organisms/CarBookingCard/CarBookingCard.d.ts +51 -0
- package/dist/components/organisms/CarBookingCard/CarBookingCard.js +39 -0
- package/dist/components/organisms/CarBookingCard/index.d.ts +2 -0
- package/dist/components/organisms/CarBookingCard/index.js +1 -0
- package/dist/components/organisms/Table/Table.css +2280 -0
- package/dist/components/organisms/Table/Table.d.ts +50 -0
- package/dist/components/organisms/Table/Table.js +95 -0
- package/dist/components/organisms/Table/TableCell.d.ts +15 -0
- package/dist/components/organisms/Table/TableCell.js +16 -0
- package/dist/components/organisms/Table/columns/booking-columns.d.ts +7 -0
- package/dist/components/organisms/Table/columns/booking-columns.js +83 -0
- package/dist/components/organisms/Table/columns/detail-resume-columns.d.ts +3 -0
- package/dist/components/organisms/Table/columns/detail-resume-columns.js +178 -0
- package/dist/components/organisms/Table/columns/index.d.ts +12 -0
- package/dist/components/organisms/Table/columns/index.js +9 -0
- package/dist/components/organisms/Table/columns/quotation-columns.d.ts +7 -0
- package/dist/components/organisms/Table/columns/quotation-columns.js +91 -0
- package/dist/components/organisms/Table/constant.d.ts +6 -0
- package/dist/components/organisms/Table/constant.js +24 -0
- package/dist/components/organisms/Table/index.d.ts +2 -0
- package/dist/components/organisms/Table/index.js +2 -0
- package/dist/components/ui/button.d.ts +1 -1
- package/dist/components/ui/popover.d.ts +3 -3
- package/dist/components/ui/popover.js +5 -5
- package/dist/components/ui/tooltip.d.ts +7 -0
- package/dist/components/ui/tooltip.js +42 -0
- package/dist/index.d.ts +47 -25
- package/dist/index.js +30 -16
- package/dist/styles/components/molecule/location-dropdown.css +38 -0
- package/dist/styles/components/molecule/service-selector.css +2310 -0
- package/dist/styles/components/typography.css +1 -0
- package/dist/types/table/action-dropdown-type.types.d.ts +5 -0
- package/dist/types/table/action-dropdown-type.types.js +6 -0
- package/dist/types/table/booking.types.d.ts +16 -0
- package/dist/types/table/booking.types.js +1 -0
- package/dist/types/table/detail-resume.types.d.ts +155 -0
- package/dist/types/table/detail-resume.types.js +7 -0
- package/dist/types/table/index.d.ts +3 -0
- package/dist/types/table/index.js +3 -0
- package/dist/types/table/quotation.types.d.ts +23 -0
- package/dist/types/table/quotation.types.js +1 -0
- package/package.json +6 -1
- package/src/components/atoms/Button/Button.css +28 -0
- package/src/components/atoms/Button/Button.tsx +3 -2
- package/src/components/atoms/Chip/Chip.css +161 -0
- package/src/components/atoms/Chip/Chip.tsx +79 -0
- package/src/components/atoms/Divider/Divider.css +58 -0
- package/src/components/atoms/Divider/Divider.tsx +36 -0
- package/src/components/atoms/Icon/Icon.tsx +8 -153
- package/src/components/atoms/Icon/icons/AccomIcon.tsx +45 -0
- package/src/components/atoms/Icon/icons/ArrowDownOutlineIcon.tsx +41 -0
- package/src/components/atoms/Icon/icons/ArrowRightOutlineIcon.tsx +50 -0
- package/src/components/atoms/Icon/icons/Building2OutlineIcon.tsx +52 -0
- package/src/components/atoms/Icon/icons/BusIcon.tsx +52 -0
- package/src/components/atoms/Icon/icons/Calendar2Icon.tsx +54 -0
- package/src/components/atoms/Icon/icons/CalendarRangeOutlineIcon.tsx +55 -0
- package/src/components/atoms/Icon/icons/Chevron.tsx +30 -11
- package/src/components/atoms/Icon/icons/MapIcon.tsx +48 -0
- package/src/components/atoms/Icon/icons/MicroIcon.tsx +45 -0
- package/src/components/atoms/Icon/icons/MoreVerticalIcon.tsx +53 -0
- package/src/components/atoms/Icon/icons/NightIcon.tsx +45 -0
- package/src/components/atoms/Icon/icons/PlaneLandingOutlineIcon.tsx +56 -0
- package/src/components/atoms/Icon/icons/PlaneTakeoffOutlineIcon.tsx +52 -0
- package/src/components/atoms/Icon/icons/RowExcursion.tsx +54 -0
- package/src/components/atoms/Icon/icons/StopWatchIcon.tsx +45 -0
- package/src/components/atoms/Icon/icons/Utensils.tsx +45 -0
- package/src/components/atoms/Icon/icons/WalletIcon.tsx +45 -0
- package/src/components/atoms/Icon/icons/registry.tsx +127 -0
- package/src/components/atoms/Typography/Typography.tsx +22 -30
- package/src/components/molecules/ActionDropdown/ActionDropdown.css +23 -0
- package/src/components/molecules/ActionDropdown/ActionDropdown.tsx +53 -0
- package/src/components/molecules/DateDisplay/DateDisplay.tsx +47 -0
- package/src/components/molecules/FeatureRow/FeatureRow.css +53 -0
- package/src/components/molecules/FeatureRow/FeatureRow.tsx +46 -0
- package/src/components/molecules/FromTo/FromTo.tsx +31 -0
- package/src/components/molecules/LocationDropdown/LocationDropdown.tsx +67 -38
- package/src/components/molecules/Pagination/Pagination.css +90 -0
- package/src/components/molecules/Pagination/Pagination.tsx +149 -0
- package/src/components/molecules/SectionTitle/SectionTitle.css +35 -0
- package/src/components/molecules/SectionTitle/SectionTitle.tsx +43 -0
- package/src/components/molecules/ServiceSelector/ServiceSelector.tsx +179 -0
- package/src/components/molecules/ServiceSelector/index.ts +3 -0
- package/src/components/molecules/Stepper/Stepper.css +67 -0
- package/src/components/molecules/Stepper/Stepper.tsx +74 -0
- package/src/components/molecules/TableServiceItem/DetailsCol.tsx +25 -0
- package/src/components/molecules/TableServiceItem/ItemCol.tsx +68 -0
- package/src/components/molecules/TableServiceItem/RowAccommodation.tsx +56 -0
- package/src/components/molecules/TableServiceItem/RowExcursion.tsx +40 -0
- package/src/components/molecules/TableServiceItem/RowOtherServices.tsx +50 -0
- package/src/components/molecules/TableServiceItem/RowTransfer.tsx +60 -0
- package/src/components/molecules/TableServiceItem/index.ts +24 -0
- package/src/components/molecules/TextWithIcon/TextWithIcon.tsx +62 -0
- package/src/components/molecules/TooltipDisplay/TooltipDisplay.tsx +32 -0
- package/src/components/organisms/CarBookingCard/CarBookingCard.css +236 -0
- package/src/components/organisms/CarBookingCard/CarBookingCard.tsx +238 -0
- package/src/components/organisms/CarBookingCard/index.ts +12 -0
- package/src/components/organisms/Table/Table.css +185 -0
- package/src/components/organisms/Table/Table.tsx +273 -0
- package/src/components/organisms/Table/TableCell.tsx +40 -0
- package/src/components/organisms/Table/columns/booking-columns.tsx +118 -0
- package/src/components/organisms/Table/columns/detail-resume-columns.tsx +226 -0
- package/src/components/organisms/Table/columns/index.ts +11 -0
- package/src/components/organisms/Table/columns/quotation-columns.tsx +150 -0
- package/src/components/organisms/Table/constant.ts +31 -0
- package/src/components/organisms/Table/index.ts +2 -0
- package/src/components/ui/popover.tsx +10 -10
- package/src/components/ui/tooltip.tsx +45 -0
- package/src/styles/components/molecule/location-dropdown.css +29 -0
- package/src/styles/components/molecule/service-selector.css +228 -0
- package/src/styles/components/typography.css +4 -0
- package/src/components/atoms/Icon/icons/ChevronDownIcon.tsx +0 -46
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import AccomIcon from './AccomIcon';
|
|
14
|
+
import ArrivalIcon from './ArrivalIcon';
|
|
15
|
+
import ArrowDownOutlineIcon from './ArrowDownOutlineIcon';
|
|
16
|
+
import ArrowRightOutlineIcon from './ArrowRightOutlineIcon';
|
|
17
|
+
import Building2OutlineIcon from './Building2OutlineIcon';
|
|
18
|
+
import BuildingIcon from './BuildingIcon';
|
|
19
|
+
import BusIcon from './BusIcon';
|
|
20
|
+
import Calendar2Icon from './Calendar2Icon';
|
|
21
|
+
import CalendarIcon from './CalendarIcon';
|
|
22
|
+
import CalendarOutlineIcon from './CalendarOutlineIcon';
|
|
23
|
+
import CalendarRangeOutlineIcon from './CalendarRangeOutlineIcon';
|
|
24
|
+
import CarIcon from './CarIcon';
|
|
25
|
+
import Check from './Check';
|
|
26
|
+
import CheckCircleIcon from './CheckCircleIcon';
|
|
27
|
+
import Chevron from './Chevron';
|
|
28
|
+
import Close from './Close';
|
|
29
|
+
import DeleteIcon from './DeleteIcon';
|
|
30
|
+
import DepartureIcon from './DepartureIcon';
|
|
31
|
+
import EyeIcon from './EyeIcon';
|
|
32
|
+
import FacebookIcon from './FacebookIcon';
|
|
33
|
+
import HomeIcon from './HomeIcon';
|
|
34
|
+
import InfoIcon from './InfoIcon';
|
|
35
|
+
import LinkedInIcon from './LinkedInIcon';
|
|
36
|
+
import MapIcon from './MapIcon';
|
|
37
|
+
import MapPinIcon from './MapPinIcon';
|
|
38
|
+
import MautourcoLogo from './MautoucoLogo';
|
|
39
|
+
import MenuIcon from './MenuIcon';
|
|
40
|
+
import MicroIcon from './MicroIcon';
|
|
41
|
+
import MinusIcon from './MinusIcon';
|
|
42
|
+
import MoreIcon from './MoreIcon';
|
|
43
|
+
import MoreVerticalIcon from './MoreVerticalIcon';
|
|
44
|
+
import NightIcon from './NightIcon';
|
|
45
|
+
import PlaneIcon from './PlaneIcon';
|
|
46
|
+
import PlaneLandingOutlineIcon from './PlaneLandingOutlineIcon';
|
|
47
|
+
import PlaneTakeoffOutlineIcon from './PlaneTakeoffOutlineIcon';
|
|
48
|
+
import PlusIcon from './PlusIcon';
|
|
49
|
+
import Search from './Search';
|
|
50
|
+
import Settings from './Settings';
|
|
51
|
+
import ShipIcon from './ShipIcon';
|
|
52
|
+
import StopWatchIcon from './StopWatchIcon';
|
|
53
|
+
import StrollerIcon from './StrollerIcon';
|
|
54
|
+
import TwitterIcon from './TwitterIcon';
|
|
55
|
+
import User from './User';
|
|
56
|
+
import UserIcon from './UserIcon';
|
|
57
|
+
import UtensilsIcon from './Utensils';
|
|
58
|
+
import WalletIcon from './WalletIcon';
|
|
59
|
+
import YouTubeIcon from './Youtube';
|
|
60
|
+
var ChevronDown = function (props) { return _jsx(Chevron, __assign({ direction: "down" }, props)); };
|
|
61
|
+
var ChevronUp = function (props) { return _jsx(Chevron, __assign({ direction: "up" }, props)); };
|
|
62
|
+
var ChevronLeft = function (props) { return _jsx(Chevron, __assign({ direction: "left" }, props)); };
|
|
63
|
+
var ChevronRight = function (props) { return _jsx(Chevron, __assign({ direction: "right" }, props)); };
|
|
64
|
+
var ChevronDownFilled = function (props) { return (_jsx(Chevron, __assign({ direction: "down", variant: "filled" }, props))); };
|
|
65
|
+
/**
|
|
66
|
+
* Single source of truth for supported icons.
|
|
67
|
+
* Add a new entry here and both `IconName` and Storybook will update automatically.
|
|
68
|
+
*/
|
|
69
|
+
export var ICONS = {
|
|
70
|
+
'chevron-down': ChevronDown,
|
|
71
|
+
'chevron-up': ChevronUp,
|
|
72
|
+
'chevron-left': ChevronLeft,
|
|
73
|
+
'chevron-right': ChevronRight,
|
|
74
|
+
'chevron-down-new': ChevronDownFilled,
|
|
75
|
+
check: Check,
|
|
76
|
+
close: Close,
|
|
77
|
+
search: Search,
|
|
78
|
+
user: User,
|
|
79
|
+
'user-icon': UserIcon,
|
|
80
|
+
calendar: CalendarIcon,
|
|
81
|
+
'calendar-outline': CalendarOutlineIcon,
|
|
82
|
+
'calendar-range-outline': CalendarRangeOutlineIcon,
|
|
83
|
+
'arrow-right-outline': ArrowRightOutlineIcon,
|
|
84
|
+
'arrow-down-outline': ArrowDownOutlineIcon,
|
|
85
|
+
'plane-takeoff-outline': PlaneTakeoffOutlineIcon,
|
|
86
|
+
'plane-landing-outline': PlaneLandingOutlineIcon,
|
|
87
|
+
'building-2-outline': Building2OutlineIcon,
|
|
88
|
+
arrival: ArrivalIcon,
|
|
89
|
+
departure: DepartureIcon,
|
|
90
|
+
'map-pin': MapPinIcon,
|
|
91
|
+
delete: DeleteIcon,
|
|
92
|
+
eye: EyeIcon,
|
|
93
|
+
info: InfoIcon,
|
|
94
|
+
'check-circle': CheckCircleIcon,
|
|
95
|
+
stroller: StrollerIcon,
|
|
96
|
+
car: CarIcon,
|
|
97
|
+
more: MoreIcon,
|
|
98
|
+
settings: Settings,
|
|
99
|
+
menu: MenuIcon,
|
|
100
|
+
mautourcoLogo: MautourcoLogo,
|
|
101
|
+
youtube: YouTubeIcon,
|
|
102
|
+
facebook: FacebookIcon,
|
|
103
|
+
twitter: TwitterIcon,
|
|
104
|
+
linkedin: LinkedInIcon,
|
|
105
|
+
plus: PlusIcon,
|
|
106
|
+
minus: MinusIcon,
|
|
107
|
+
home: HomeIcon,
|
|
108
|
+
plane: PlaneIcon,
|
|
109
|
+
ship: ShipIcon,
|
|
110
|
+
building: BuildingIcon,
|
|
111
|
+
calendar2: Calendar2Icon,
|
|
112
|
+
'more-vertical': MoreVerticalIcon,
|
|
113
|
+
accom: AccomIcon,
|
|
114
|
+
night: NightIcon,
|
|
115
|
+
utensils: UtensilsIcon,
|
|
116
|
+
micro: MicroIcon,
|
|
117
|
+
stopwatch: StopWatchIcon,
|
|
118
|
+
bus: BusIcon,
|
|
119
|
+
map: MapIcon,
|
|
120
|
+
wallet: WalletIcon,
|
|
121
|
+
};
|
|
@@ -4,7 +4,9 @@ type BodySizeInput = BodyTokenSize | 'base' | 'xl';
|
|
|
4
4
|
type Variant = 'light' | 'regular' | 'medium' | 'bold' | 'black';
|
|
5
5
|
type Leading = 'none' | '4' | '5' | '6' | '7';
|
|
6
6
|
type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
|
|
7
|
-
type TextColor = 'default' | 'accent' | 'subtle' | 'light' | 'brand' | 'inverted' | 'state-default' | 'state-hover' | 'state-filled' | 'state-disabled' | 'state-error' | 'state-success';
|
|
7
|
+
export type TextColor = 'default' | 'accent' | 'subtle' | 'light' | 'brand' | 'inverted' | 'state-default' | 'state-hover' | 'state-filled' | 'state-disabled' | 'state-error' | 'state-success' | 'yellow';
|
|
8
|
+
export type TextVariant = Variant;
|
|
9
|
+
export type TextLeading = Leading;
|
|
8
10
|
interface BaseProps {
|
|
9
11
|
variant?: Variant;
|
|
10
12
|
leading?: Leading;
|
|
@@ -53,9 +53,7 @@ var mapLeadingToToken = function (leading) {
|
|
|
53
53
|
var getBodyClass = function (size, leading) {
|
|
54
54
|
var availableLeadings = tokenBodyLeadings[size];
|
|
55
55
|
var desiredLeading = leading ? mapLeadingToToken(leading) : mapLeadingToToken(defaultBodyLeading[size]);
|
|
56
|
-
var resolvedLeading = availableLeadings.includes(desiredLeading)
|
|
57
|
-
? desiredLeading
|
|
58
|
-
: availableLeadings[0];
|
|
56
|
+
var resolvedLeading = availableLeadings.includes(desiredLeading) ? desiredLeading : availableLeadings[0];
|
|
59
57
|
return {
|
|
60
58
|
className: "body-".concat(size, "-").concat(resolvedLeading),
|
|
61
59
|
lineHeightHandled: desiredLeading === resolvedLeading,
|
|
@@ -79,12 +77,7 @@ export var Heading = function (_a) {
|
|
|
79
77
|
var Tag = as || "h".concat(level);
|
|
80
78
|
var baseClass = (_b = headingTokenClass[level]) !== null && _b !== void 0 ? _b : headingTokenClass[2];
|
|
81
79
|
var variantClass = buildVariantClass(baseClass, variant);
|
|
82
|
-
var classes = [
|
|
83
|
-
baseClass,
|
|
84
|
-
variantClass,
|
|
85
|
-
leading ? leadingFallback[leading] : '',
|
|
86
|
-
className,
|
|
87
|
-
]
|
|
80
|
+
var classes = [baseClass, variantClass, leading ? leadingFallback[leading] : '', className]
|
|
88
81
|
.filter(Boolean)
|
|
89
82
|
.join(' ');
|
|
90
83
|
var colorStyle = getColorStyle(color);
|
|
@@ -96,12 +89,7 @@ export var Text = function (_a) {
|
|
|
96
89
|
var normalizedSize = bodySizeAlias[size];
|
|
97
90
|
var _e = getBodyClass(normalizedSize, leading), baseClass = _e.className, lineHeightHandled = _e.lineHeightHandled;
|
|
98
91
|
var variantClass = buildVariantClass(baseClass, variant);
|
|
99
|
-
var classes = [
|
|
100
|
-
baseClass,
|
|
101
|
-
variantClass,
|
|
102
|
-
leading && !lineHeightHandled ? leadingFallback[leading] : '',
|
|
103
|
-
className,
|
|
104
|
-
]
|
|
92
|
+
var classes = [baseClass, variantClass, leading && !lineHeightHandled ? leadingFallback[leading] : '', className]
|
|
105
93
|
.filter(Boolean)
|
|
106
94
|
.join(' ');
|
|
107
95
|
var colorStyle = getColorStyle(color);
|