mautourco-components 0.2.9 → 0.2.11

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.
Files changed (72) hide show
  1. package/dist/components/atoms/Button/Button.css +28 -0
  2. package/dist/components/atoms/Button/Button.d.ts +1 -1
  3. package/dist/components/atoms/Button/Button.js +2 -1
  4. package/dist/components/atoms/Chip/Chip.css +2238 -0
  5. package/dist/components/atoms/Chip/Chip.d.ts +27 -0
  6. package/dist/components/atoms/Chip/Chip.js +37 -0
  7. package/dist/components/atoms/Divider/Divider.css +2135 -0
  8. package/dist/components/atoms/Divider/Divider.d.ts +14 -0
  9. package/dist/components/atoms/Divider/Divider.js +16 -0
  10. package/dist/components/atoms/Icon/Icon.d.ts +3 -2
  11. package/dist/components/atoms/Icon/Icon.js +3 -117
  12. package/dist/components/atoms/Icon/icons/ArrowRightOutlineIcon.d.ts +8 -0
  13. package/dist/components/atoms/Icon/icons/ArrowRightOutlineIcon.js +36 -0
  14. package/dist/components/atoms/Icon/icons/Building2OutlineIcon.d.ts +8 -0
  15. package/dist/components/atoms/Icon/icons/Building2OutlineIcon.js +36 -0
  16. package/dist/components/atoms/Icon/icons/CalendarRangeOutlineIcon.d.ts +8 -0
  17. package/dist/components/atoms/Icon/icons/CalendarRangeOutlineIcon.js +36 -0
  18. package/dist/components/atoms/Icon/icons/PlaneLandingOutlineIcon.d.ts +8 -0
  19. package/dist/components/atoms/Icon/icons/PlaneLandingOutlineIcon.js +36 -0
  20. package/dist/components/atoms/Icon/icons/PlaneTakeoffOutlineIcon.d.ts +8 -0
  21. package/dist/components/atoms/Icon/icons/PlaneTakeoffOutlineIcon.js +36 -0
  22. package/dist/components/atoms/Icon/icons/registry.d.ts +55 -0
  23. package/dist/components/atoms/Icon/icons/registry.js +99 -0
  24. package/dist/components/molecules/FeatureRow/FeatureRow.css +2130 -0
  25. package/dist/components/molecules/FeatureRow/FeatureRow.d.ts +17 -0
  26. package/dist/components/molecules/FeatureRow/FeatureRow.js +22 -0
  27. package/dist/components/molecules/LocationDropdown/LocationDropdown.d.ts +1 -0
  28. package/dist/components/molecules/LocationDropdown/LocationDropdown.js +17 -4
  29. package/dist/components/molecules/Pagination/Pagination.css +2168 -0
  30. package/dist/components/molecules/Pagination/Pagination.d.ts +16 -0
  31. package/dist/components/molecules/Pagination/Pagination.js +90 -0
  32. package/dist/components/molecules/SectionTitle/SectionTitle.css +2112 -0
  33. package/dist/components/molecules/SectionTitle/SectionTitle.d.ts +16 -0
  34. package/dist/components/molecules/SectionTitle/SectionTitle.js +21 -0
  35. package/dist/components/molecules/Stepper/Stepper.css +2144 -0
  36. package/dist/components/molecules/Stepper/Stepper.d.ts +18 -0
  37. package/dist/components/molecules/Stepper/Stepper.js +33 -0
  38. package/dist/components/organisms/CarBookingCard/CarBookingCard.css +2313 -0
  39. package/dist/components/organisms/CarBookingCard/CarBookingCard.d.ts +51 -0
  40. package/dist/components/organisms/CarBookingCard/CarBookingCard.js +39 -0
  41. package/dist/components/organisms/CarBookingCard/index.d.ts +2 -0
  42. package/dist/components/organisms/CarBookingCard/index.js +1 -0
  43. package/dist/index.d.ts +12 -0
  44. package/dist/index.js +7 -0
  45. package/dist/styles/components/molecule/location-dropdown.css +38 -0
  46. package/package.json +1 -1
  47. package/src/components/atoms/Button/Button.css +28 -0
  48. package/src/components/atoms/Button/Button.tsx +3 -2
  49. package/src/components/atoms/Chip/Chip.css +161 -0
  50. package/src/components/atoms/Chip/Chip.tsx +79 -0
  51. package/src/components/atoms/Divider/Divider.css +58 -0
  52. package/src/components/atoms/Divider/Divider.tsx +36 -0
  53. package/src/components/atoms/Icon/Icon.tsx +5 -145
  54. package/src/components/atoms/Icon/icons/ArrowRightOutlineIcon.tsx +55 -0
  55. package/src/components/atoms/Icon/icons/Building2OutlineIcon.tsx +52 -0
  56. package/src/components/atoms/Icon/icons/CalendarRangeOutlineIcon.tsx +55 -0
  57. package/src/components/atoms/Icon/icons/PlaneLandingOutlineIcon.tsx +56 -0
  58. package/src/components/atoms/Icon/icons/PlaneTakeoffOutlineIcon.tsx +52 -0
  59. package/src/components/atoms/Icon/icons/registry.tsx +105 -0
  60. package/src/components/molecules/FeatureRow/FeatureRow.css +53 -0
  61. package/src/components/molecules/FeatureRow/FeatureRow.tsx +46 -0
  62. package/src/components/molecules/LocationDropdown/LocationDropdown.tsx +67 -38
  63. package/src/components/molecules/Pagination/Pagination.css +90 -0
  64. package/src/components/molecules/Pagination/Pagination.tsx +149 -0
  65. package/src/components/molecules/SectionTitle/SectionTitle.css +35 -0
  66. package/src/components/molecules/SectionTitle/SectionTitle.tsx +43 -0
  67. package/src/components/molecules/Stepper/Stepper.css +67 -0
  68. package/src/components/molecules/Stepper/Stepper.tsx +74 -0
  69. package/src/components/organisms/CarBookingCard/CarBookingCard.css +236 -0
  70. package/src/components/organisms/CarBookingCard/CarBookingCard.tsx +238 -0
  71. package/src/components/organisms/CarBookingCard/index.ts +12 -0
  72. package/src/styles/components/molecule/location-dropdown.css +29 -0
@@ -0,0 +1,51 @@
1
+ import React from 'react';
2
+ import { ButtonProps } from '../../atoms/Button/Button';
3
+ import { FeatureRowProps } from '../../molecules/FeatureRow/FeatureRow';
4
+ import './CarBookingCard.css';
5
+ export type CarBookingCardSize = 'small' | 'large';
6
+ export type CarBookingCardState = 'default' | 'selected' | 'hover';
7
+ export type CarBookingCardType = 'default' | 'no-of-pax' | 'no-of-vehicle';
8
+ export type CarBookingCardPriceRow = {
9
+ label: string;
10
+ value: string;
11
+ };
12
+ export interface CarBookingCardProps {
13
+ /** Vehicle image url */
14
+ imageSrc: string;
15
+ /** Card title */
16
+ title: string;
17
+ /** Size variant */
18
+ size?: CarBookingCardSize;
19
+ /** Visual state (for Storybook parity with Figma variants) */
20
+ state?: CarBookingCardState;
21
+ /** Variant used in Figma: affects which breakdown row is shown (optional) */
22
+ type?: CarBookingCardType;
23
+ /** Feature rows displayed under the title */
24
+ features: FeatureRowProps[];
25
+ /** Optional info note below features */
26
+ infoText?: string;
27
+ /** Price breakdown section */
28
+ priceTitle?: string;
29
+ priceRows?: CarBookingCardPriceRow[];
30
+ /** Supplement dropdown section */
31
+ /** Whether to render the supplement section (matches Figma variants Supplement=Yes/No/-) */
32
+ showSupplement?: boolean;
33
+ /** Optional message shown in red next to the "Supplement" label (Figma: "Supplement is not available for this vehicle.") */
34
+ supplementMessage?: string;
35
+ supplementLabel?: string;
36
+ supplementPlaceholder?: string;
37
+ supplementValue?: string;
38
+ supplementState?: 'default' | 'loading' | 'selected' | 'error' | 'disabled';
39
+ supplementOptions?: string[];
40
+ onSupplementSelect?: (option: string) => void;
41
+ /** Footer price */
42
+ totalPrice: string;
43
+ totalPriceLabel?: string;
44
+ /** Footer CTA */
45
+ ctaLabel: string;
46
+ ctaButtonProps?: Omit<ButtonProps, 'children'>;
47
+ onCtaClick?: ButtonProps['onClick'];
48
+ className?: string;
49
+ }
50
+ declare const CarBookingCard: React.FC<CarBookingCardProps>;
51
+ export default CarBookingCard;
@@ -0,0 +1,39 @@
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, jsxs as _jsxs } from "react/jsx-runtime";
13
+ import Button from '../../atoms/Button/Button';
14
+ import Divider from '../../atoms/Divider/Divider';
15
+ import DropdownInput from '../../atoms/Inputs/DropdownInput/DropdownInput';
16
+ import { Heading, Text } from '../../atoms/Typography/Typography';
17
+ import FeatureRow from '../../molecules/FeatureRow/FeatureRow';
18
+ import './CarBookingCard.css';
19
+ var CarBookingCard = function (_a) {
20
+ var _b;
21
+ var imageSrc = _a.imageSrc, title = _a.title, _c = _a.size, size = _c === void 0 ? 'large' : _c, _d = _a.state, state = _d === void 0 ? 'default' : _d, _e = _a.type, type = _e === void 0 ? 'default' : _e, features = _a.features, infoText = _a.infoText, _f = _a.priceTitle, priceTitle = _f === void 0 ? 'Price breakdown' : _f, _g = _a.priceRows, priceRows = _g === void 0 ? [] : _g, showSupplement = _a.showSupplement, supplementMessage = _a.supplementMessage, _h = _a.supplementLabel, supplementLabel = _h === void 0 ? 'Supplement' : _h, _j = _a.supplementPlaceholder, supplementPlaceholder = _j === void 0 ? 'Select a supplement' : _j, supplementValue = _a.supplementValue, _k = _a.supplementState, supplementState = _k === void 0 ? 'default' : _k, _l = _a.supplementOptions, supplementOptions = _l === void 0 ? [] : _l, onSupplementSelect = _a.onSupplementSelect, totalPrice = _a.totalPrice, _m = _a.totalPriceLabel, totalPriceLabel = _m === void 0 ? 'Total price' : _m, ctaLabel = _a.ctaLabel, ctaButtonProps = _a.ctaButtonProps, onCtaClick = _a.onCtaClick, _o = _a.className, className = _o === void 0 ? '' : _o;
22
+ var resolvedShowSupplement = showSupplement !== null && showSupplement !== void 0 ? showSupplement : Boolean(supplementLabel || supplementPlaceholder || supplementOptions.length > 0);
23
+ var resolvedSupplementState = supplementMessage ? 'disabled' : supplementState;
24
+ var baseClass = 'car-booking-card';
25
+ var classes = [
26
+ baseClass,
27
+ "".concat(baseClass, "--").concat(size),
28
+ "".concat(baseClass, "--").concat(state),
29
+ "".concat(baseClass, "--").concat(type),
30
+ className,
31
+ ]
32
+ .filter(Boolean)
33
+ .join(' ');
34
+ return (_jsxs("article", __assign({ className: classes }, { children: [_jsx("div", __assign({ className: "car-booking-card__image-wrap" }, { children: _jsx("img", { className: "car-booking-card__image", src: imageSrc, alt: "" }) })), _jsx("div", { className: "car-booking-card__active-divider" }), _jsxs("div", __assign({ className: "car-booking-card__body" }, { children: [priceRows.length > 0 && (_jsxs("section", __assign({ className: "car-booking-card__section car-booking-card__section--price" }, { children: [_jsx(Divider, { variant: "dashed", className: "car-booking-card__dashed-divider" }), _jsxs("div", __assign({ className: "car-booking-card__price-content" }, { children: [_jsx(Text, __assign({ as: "h3", size: "md", variant: "bold", leading: "none", color: "default", className: "car-booking-card__section-title" }, { children: priceTitle })), _jsx("div", __assign({ className: "car-booking-card__price-rows" }, { children: priceRows.map(function (row, idx) { return (_jsxs("div", __assign({ className: "car-booking-card__price-row" }, { children: [_jsx(Text, __assign({ size: "sm", leading: "5", variant: "regular", color: "subtle", className: "car-booking-card__price-label" }, { children: row.label })), _jsx(Text, __assign({ size: "sm", leading: "5", variant: "bold", color: "subtle", className: "car-booking-card__price-value" }, { children: row.value }))] }), "".concat(row.label, "-").concat(idx))); }) }))] })), _jsx(Divider, { variant: "dashed", className: "car-booking-card__dashed-divider" })] }))), _jsxs("section", __assign({ className: "car-booking-card__section car-booking-card__section--content" }, { children: [_jsxs("div", __assign({ className: "car-booking-card__title" }, { children: [_jsx("span", { className: "car-booking-card__title-marker", "aria-hidden": "true" }), _jsx(Heading, __assign({ level: 4, variant: "bold", color: "accent", className: "car-booking-card__title-text" }, { children: title }))] })), _jsx("div", __assign({ className: "car-booking-card__features" }, { children: features.map(function (feature, idx) {
35
+ var _a;
36
+ return (_jsx(FeatureRow, __assign({}, feature, { className: "car-booking-card__feature-row ".concat((_a = feature.className) !== null && _a !== void 0 ? _a : '').trim() }), "".concat(feature.label, "-").concat(idx)));
37
+ }) })), infoText && (_jsxs("div", __assign({ className: "car-booking-card__info" }, { children: [_jsx("span", __assign({ className: "car-booking-card__info-icon", "aria-hidden": "true" }, { children: "i" })), _jsx(Text, __assign({ size: "sm", leading: "5", variant: "regular", color: "default", className: "car-booking-card__info-text" }, { children: infoText }))] })))] })), resolvedShowSupplement && (_jsxs("section", __assign({ className: "car-booking-card__section car-booking-card__section--supplement" }, { children: [_jsx(Divider, { variant: "dashed", className: "car-booking-card__dashed-divider" }), _jsxs("div", __assign({ className: "car-booking-card__supplement-header" }, { children: [_jsx(Text, __assign({ as: "h3", size: "md", variant: "bold", leading: "none", color: "default", className: "car-booking-card__section-title" }, { children: supplementLabel })), supplementMessage && (_jsx(Text, __assign({ as: "p", size: "sm", leading: "5", variant: "regular", className: "car-booking-card__supplement-message" }, { children: supplementMessage })))] })), _jsx(DropdownInput, { placeholder: supplementPlaceholder, value: supplementValue, state: resolvedSupplementState, options: supplementOptions, onSelect: onSupplementSelect })] }))), _jsxs("footer", __assign({ className: "car-booking-card__footer" }, { children: [_jsxs("div", __assign({ className: "car-booking-card__total" }, { children: [_jsx(Text, __assign({ size: "sm", variant: "bold", color: "accent", className: "car-booking-card__total-price" }, { children: totalPrice })), _jsx(Text, __assign({ size: "sm", variant: "regular", color: "subtle", className: "car-booking-card__total-label" }, { children: totalPriceLabel }))] })), _jsx(Button, __assign({ variant: "primary", size: "sm" }, ctaButtonProps, { onClick: onCtaClick, className: "car-booking-card__cta ".concat((_b = ctaButtonProps === null || ctaButtonProps === void 0 ? void 0 : ctaButtonProps.className) !== null && _b !== void 0 ? _b : '').trim() }, { children: ctaLabel }))] }))] }))] })));
38
+ };
39
+ export default CarBookingCard;
@@ -0,0 +1,2 @@
1
+ export { default } from './CarBookingCard';
2
+ export type { CarBookingCardProps, CarBookingCardPriceRow, CarBookingCardSize, CarBookingCardState, CarBookingCardType, } from './CarBookingCard';
@@ -0,0 +1 @@
1
+ export { default } from './CarBookingCard';
package/dist/index.d.ts CHANGED
@@ -1,5 +1,7 @@
1
1
  export { default as Button } from './components/atoms/Button/Button';
2
2
  export { default as Checkbox } from './components/atoms/Checkbox/Checkbox';
3
+ export { default as Chip } from './components/atoms/Chip/Chip';
4
+ export { default as Divider } from './components/atoms/Divider/Divider';
3
5
  export { default as Icon } from './components/atoms/Icon/Icon';
4
6
  export { default as DropdownInput } from './components/atoms/Inputs/DropdownInput/DropdownInput';
5
7
  export { default as Input } from './components/atoms/Inputs/Input/Input';
@@ -17,6 +19,10 @@ export { default as TimePicker } from './components/molecules/Calendar/TimePicke
17
19
  export { default as RatingTab } from './components/molecules/RatingTab/RatingTab';
18
20
  export { default as LocationDropdown } from './components/molecules/LocationDropdown/LocationDropdown';
19
21
  export { default as ServiceSelector } from './components/molecules/ServiceSelector/ServiceSelector';
22
+ export { default as Pagination } from './components/molecules/Pagination/Pagination';
23
+ export { default as Stepper } from './components/molecules/Stepper/Stepper';
24
+ export { default as FeatureRow } from './components/molecules/FeatureRow/FeatureRow';
25
+ export { default as SectionTitle } from './components/molecules/SectionTitle/SectionTitle';
20
26
  export { TopNavigation } from './components/organisms/TopNavigation/TopNavigation';
21
27
  export { Footer } from './components/organisms/Footer/Footer';
22
28
  export { Dialog } from './components/organisms/Dialog/Dialog';
@@ -27,6 +33,7 @@ export { default as DateTimePicker } from './components/organisms/DateTimePicker
27
33
  export { default as RoundTrip } from './components/organisms/RoundTrip/RoundTrip';
28
34
  export { default as TransferLine } from './components/organisms/TransferLine/TransferLine';
29
35
  export { default as SearchBarTransfer } from './components/organisms/SearchBarTransfer/SearchBarTransfer';
36
+ export { default as CarBookingCard } from './components/organisms/CarBookingCard/CarBookingCard';
30
37
  export { default as ButtonSpinner } from './components/atoms/Spinner/variants/ButtonSpinner';
31
38
  export { default as LoadingSpinner } from './components/atoms/Spinner/variants/LoadingSpinner';
32
39
  export { default as CheckIcon } from './components/atoms/Icon/icons/Check';
@@ -49,3 +56,8 @@ export type { DateTimePickerProps } from './components/organisms/DateTimePicker/
49
56
  export type { RoundTripProps, RoundTripData, RoundTripTransfer } from './components/organisms/RoundTrip/RoundTrip';
50
57
  export type { TransferLineProps, TransferLineData, TransferType } from './components/organisms/TransferLine/TransferLine';
51
58
  export type { SearchBarTransferProps, SearchBarTransferData, TransferMode } from './components/organisms/SearchBarTransfer/SearchBarTransfer';
59
+ export type { CarBookingCardProps, CarBookingCardPriceRow, CarBookingCardSize, CarBookingCardState, CarBookingCardType, } from './components/organisms/CarBookingCard/CarBookingCard';
60
+ export type { DividerProps } from './components/atoms/Divider/Divider';
61
+ export type { StepperProps } from './components/molecules/Stepper/Stepper';
62
+ export type { FeatureRowProps } from './components/molecules/FeatureRow/FeatureRow';
63
+ export type { SectionTitleProps } from './components/molecules/SectionTitle/SectionTitle';
package/dist/index.js CHANGED
@@ -1,6 +1,8 @@
1
1
  // Atoms - Base components
2
2
  export { default as Button } from './components/atoms/Button/Button';
3
3
  export { default as Checkbox } from './components/atoms/Checkbox/Checkbox';
4
+ export { default as Chip } from './components/atoms/Chip/Chip';
5
+ export { default as Divider } from './components/atoms/Divider/Divider';
4
6
  export { default as Icon } from './components/atoms/Icon/Icon';
5
7
  export { default as DropdownInput } from './components/atoms/Inputs/DropdownInput/DropdownInput';
6
8
  export { default as Input } from './components/atoms/Inputs/Input/Input';
@@ -19,6 +21,10 @@ export { default as TimePicker } from './components/molecules/Calendar/TimePicke
19
21
  export { default as RatingTab } from './components/molecules/RatingTab/RatingTab';
20
22
  export { default as LocationDropdown } from './components/molecules/LocationDropdown/LocationDropdown';
21
23
  export { default as ServiceSelector } from './components/molecules/ServiceSelector/ServiceSelector';
24
+ export { default as Pagination } from './components/molecules/Pagination/Pagination';
25
+ export { default as Stepper } from './components/molecules/Stepper/Stepper';
26
+ export { default as FeatureRow } from './components/molecules/FeatureRow/FeatureRow';
27
+ export { default as SectionTitle } from './components/molecules/SectionTitle/SectionTitle';
22
28
  // Organisms - Complex components
23
29
  export { TopNavigation } from './components/organisms/TopNavigation/TopNavigation';
24
30
  export { Footer } from './components/organisms/Footer/Footer';
@@ -30,6 +36,7 @@ export { default as DateTimePicker } from './components/organisms/DateTimePicker
30
36
  export { default as RoundTrip } from './components/organisms/RoundTrip/RoundTrip';
31
37
  export { default as TransferLine } from './components/organisms/TransferLine/TransferLine';
32
38
  export { default as SearchBarTransfer } from './components/organisms/SearchBarTransfer/SearchBarTransfer';
39
+ export { default as CarBookingCard } from './components/organisms/CarBookingCard/CarBookingCard';
33
40
  // Spinner Variants
34
41
  export { default as ButtonSpinner } from './components/atoms/Spinner/variants/ButtonSpinner';
35
42
  export { default as LoadingSpinner } from './components/atoms/Spinner/variants/LoadingSpinner';
@@ -2362,6 +2362,44 @@
2362
2362
  color: var(--color-atoll-green-800);
2363
2363
  }
2364
2364
 
2365
+ /* Skeleton Loading States */
2366
+
2367
+ .location-dropdown__option--skeleton {
2368
+ pointer-events: none;
2369
+ cursor: default;
2370
+ }
2371
+
2372
+ .location-dropdown__option--skeleton:hover {
2373
+ background-color: #ffffff00;
2374
+ }
2375
+
2376
+ .location-dropdown__skeleton-icon {
2377
+ height: 1rem;
2378
+ width: 1rem;
2379
+ flex-shrink: 0;
2380
+ border-radius: 0.25rem;
2381
+ background-color: var(--color-neutral-200);
2382
+ animation: skeleton-pulse 1.5s ease-in-out infinite;
2383
+ }
2384
+
2385
+ .location-dropdown__skeleton-text {
2386
+ height: 1rem;
2387
+ flex: 1 1 0%;
2388
+ border-radius: 0.25rem;
2389
+ background-color: var(--color-neutral-200);
2390
+ animation: skeleton-pulse 1.5s ease-in-out infinite;
2391
+ animation-delay: 0.15s;
2392
+ }
2393
+
2394
+ @keyframes skeleton-pulse {
2395
+ 0%, 100% {
2396
+ opacity: 1;
2397
+ }
2398
+ 50% {
2399
+ opacity: 0.4;
2400
+ }
2401
+ }
2402
+
2365
2403
  /* Type-specific adjustments */
2366
2404
 
2367
2405
  .location-dropdown--airport-port .location-dropdown__content {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mautourco-components",
3
- "version": "0.2.9",
3
+ "version": "0.2.11",
4
4
  "private": false,
5
5
  "description": "Bibliothèque de composants Motorco pour le redesign",
6
6
  "main": "dist/index.js",
@@ -37,6 +37,11 @@
37
37
  line-height: calc(var(--font-leading-leading-sm, 20)* 1rem);
38
38
  }
39
39
 
40
+ .button--sm.button--with-icon {
41
+ /* Figma button/md gap is 10px even when used with 14px text + icon */
42
+ gap: var(--component-button-spacing-md-gap, 10px);
43
+ }
44
+
40
45
  .button--md {
41
46
  padding: var(--component-button-spacing-md-padding-y, 10rem)
42
47
  var(--component-button-spacing-md-padding-x, 14rem);
@@ -106,6 +111,29 @@
106
111
  color: var(--color-button-brand-foreground-secondary-default, #ffffff);
107
112
  }
108
113
 
114
+ .button--destructive {
115
+ background-color: var(--color-button-destructive-background-default, #dc2626);
116
+ color: var(--color-button-destructive-foreground-default, #ffffff);
117
+ }
118
+
119
+ .button--destructive:hover:not(:disabled) {
120
+ background-color: var(--color-button-destructive-background-hover, #991b1b);
121
+ }
122
+
123
+ .button--destructive:active:not(:disabled) {
124
+ background-color: var(--color-button-destructive-background-pressed, #450a0a);
125
+ }
126
+
127
+ .button--destructive:focus-visible:not(:disabled) {
128
+ outline: none;
129
+ box-shadow: 0 0 0 2rem var(--color-button-destructive-background-hover, #991b1b);
130
+ }
131
+
132
+ .button--destructive:disabled {
133
+ background-color: var(--color-button-destructive-background-disabled, #f5f5f5);
134
+ color: var(--color-button-destructive-foreground-disabled, #a3a3a3);
135
+ }
136
+
109
137
  .button--outline-primary {
110
138
  background-color: var(--component-button-color-outline-primary-background-default, #ffffff);
111
139
  color: var(--component-button-color-outline-primary-foreground-default, #fe8839);
@@ -4,7 +4,7 @@ import './Button.css';
4
4
 
5
5
  export interface ButtonProps {
6
6
  /** Variant du bouton */
7
- variant?: 'primary' | 'secondary' | 'outline' | 'outline-primary' | 'outline-secondary';
7
+ variant?: 'primary' | 'secondary' | 'outline' | 'outline-primary' | 'outline-secondary' | 'destructive';
8
8
  /** Taille du bouton */
9
9
  size?: 'sm' | 'md' | 'lg' | 'xl';
10
10
  /** Contenu du bouton */
@@ -56,11 +56,12 @@ const Button: React.FC<ButtonProps> = ({
56
56
 
57
57
  const hasLeadingIcon = Boolean(leadingIcon);
58
58
  const hasTrailingIcon = Boolean(trailingIcon);
59
+ const withIconClass = hasLeadingIcon || hasTrailingIcon ? 'button--with-icon' : '';
59
60
 
60
61
  return (
61
62
  <button
62
63
  type={type}
63
- className={buttonClasses}
64
+ className={[buttonClasses, withIconClass].filter(Boolean).join(' ')}
64
65
  disabled={disabled}
65
66
  onClick={onClick}
66
67
  >
@@ -0,0 +1,161 @@
1
+ .chip {
2
+ display: inline-flex;
3
+ align-items: center;
4
+ justify-content: center;
5
+ gap: var(--chip-spacing-sm-gap, 4px);
6
+ border-radius: var(--chip-border-radius-pill, 9999px);
7
+ font-family: var(--font-font-family-body, "Satoshi"), "Satoshi", "Inter", "Segoe UI", "system-ui", sans-serif;
8
+ font-weight: var(--font-weight-font-medium, 500);
9
+ line-height: calc(var(--font-leading-leading-base, 16) * 1px);
10
+ white-space: nowrap;
11
+ border: var(--chip-border-width-default, 1px) solid transparent;
12
+ }
13
+
14
+ /* Sizes */
15
+ .chip--sm {
16
+ padding: var(--chip-spacing-sm-padding-y, 4px) var(--chip-spacing-sm-padding-x, 8px);
17
+ font-size: var(--font-size-text-xs, 12px);
18
+ line-height: calc(var(--font-leading-leading-sm, 20) * 1px);
19
+ gap: var(--chip-spacing-sm-gap, 4px);
20
+ }
21
+
22
+ .chip--md {
23
+ padding: var(--chip-spacing-md-padding-y, 4px) var(--chip-spacing-md-padding-x, 12px);
24
+ font-size: var(--font-size-text-sm, 14px);
25
+ line-height: calc(var(--font-leading-leading-sm, 20) * 1px);
26
+ gap: var(--chip-spacing-md-gap, 4px);
27
+ }
28
+
29
+ .chip--lg {
30
+ padding: var(--chip-spacing-lg-padding-y, 4px) var(--chip-spacing-lg-padding-x, 16px);
31
+ font-size: var(--font-size-text-base, 16px);
32
+ line-height: calc(var(--font-leading-leading-base, 16) * 1px);
33
+ gap: var(--chip-spacing-lg-gap, 4px);
34
+ }
35
+
36
+ /* Types - Filled */
37
+ .chip--filled.chip--brand {
38
+ background-color: var(--chip-color-brand-filled-background, #ed4c09);
39
+ color: var(--chip-color-brand-filled-foreground, #ffffff);
40
+ border-color: transparent;
41
+ }
42
+
43
+ .chip--filled.chip--accent {
44
+ background-color: var(--chip-color-accent-filled-background, #0f7173);
45
+ color: var(--chip-color-accent-filled-foreground, #ffffff);
46
+ border-color: transparent;
47
+ }
48
+
49
+ .chip--filled.chip--blue {
50
+ background-color: var(--chip-color-blue-filled-background, #2e4780);
51
+ color: var(--chip-color-blue-filled-foreground, #ffffff);
52
+ border-color: transparent;
53
+ }
54
+
55
+ .chip--filled.chip--green {
56
+ background-color: var(--chip-color-green-filled-background, #dde8db);
57
+ color: var(--chip-color-green-filled-foreground, #384733);
58
+ border-color: transparent;
59
+ }
60
+
61
+ .chip--filled.chip--yellow {
62
+ background-color: var(--chip-color-yellow-filled-background, #eab308);
63
+ color: var(--chip-color-yellow-filled-foreground, #ffffff);
64
+ border-color: transparent;
65
+ }
66
+
67
+ .chip--filled.chip--red {
68
+ background-color: var(--chip-color-red-filled-background, #991b1b);
69
+ color: var(--chip-color-red-filled-foreground, #ffffff);
70
+ border-color: transparent;
71
+ }
72
+
73
+ .chip--filled.chip--neutral {
74
+ background-color: var(--chip-color-neutral-filled-background, #e5e7eb);
75
+ color: var(--chip-color-neutral-filled-foreground, #262626);
76
+ border-color: transparent;
77
+ }
78
+
79
+ /* Types - Outline */
80
+ .chip--outline.chip--brand {
81
+ background-color: var(--chip-color-brand-outline-background, rgba(255, 255, 255, 0));
82
+ color: var(--chip-color-brand-outline-foreground, #ed4c09);
83
+ border-color: var(--chip-color-brand-outline-foreground, #ed4c09);
84
+ }
85
+
86
+ .chip--outline.chip--accent {
87
+ background-color: var(--chip-color-accent-outline-background, rgba(255, 255, 255, 0));
88
+ color: var(--chip-color-accent-outline-foreground, #0f7173);
89
+ border-color: var(--chip-color-accent-outline-foreground, #0f7173);
90
+ }
91
+
92
+ .chip--outline.chip--blue {
93
+ background-color: var(--chip-color-blue-outline-background, rgba(255, 255, 255, 0));
94
+ color: var(--chip-color-blue-outline-foreground, #2e4780);
95
+ border-color: var(--chip-color-blue-outline-foreground, #2e4780);
96
+ }
97
+
98
+ .chip--outline.chip--green {
99
+ background-color: var(--chip-color-green-outline-background, rgba(255, 255, 255, 0));
100
+ color: var(--chip-color-green-outline-foreground, #4a6045);
101
+ border-color: var(--chip-color-green-outline-foreground, #4a6045);
102
+ }
103
+
104
+ .chip--outline.chip--yellow {
105
+ background-color: var(--chip-color-yellow-outline-background, rgba(255, 255, 255, 0));
106
+ color: var(--chip-color-yellow-outline-foreground, #eab308);
107
+ border-color: var(--chip-color-yellow-outline-foreground, #eab308);
108
+ }
109
+
110
+ .chip--outline.chip--red {
111
+ background-color: var(--chip-color-red-outline-background, rgba(255, 255, 255, 0));
112
+ color: var(--chip-color-red-outline-foreground, #991b1b);
113
+ border-color: var(--chip-color-red-outline-foreground, #991b1b);
114
+ }
115
+
116
+ .chip--outline.chip--neutral {
117
+ background-color: var(--chip-color-neutral-outline-background, rgba(255, 255, 255, 0));
118
+ color: var(--chip-color-neutral-outline-text, #262626);
119
+ border-color: var(--chip-color-neutral-outline-foreground, #9ca3af);
120
+ }
121
+
122
+ /* Icon styles */
123
+ .chip__icon {
124
+ display: inline-flex;
125
+ align-items: center;
126
+ justify-content: center;
127
+ flex-shrink: 0;
128
+ }
129
+
130
+ .chip__icon--leading {
131
+ margin-right: 0;
132
+ }
133
+
134
+ .chip__icon--trailing {
135
+ margin-left: 0;
136
+ }
137
+
138
+ /* Label */
139
+ .chip__label {
140
+ display: inline-block;
141
+ }
142
+
143
+ /* Clickable state */
144
+ .chip--clickable {
145
+ cursor: pointer;
146
+ transition: opacity 0.2s ease;
147
+ }
148
+
149
+ .chip--clickable:hover {
150
+ opacity: 0.8;
151
+ }
152
+
153
+ .chip--clickable:active {
154
+ opacity: 0.6;
155
+ }
156
+
157
+ .chip--clickable:focus {
158
+ outline: 2px solid var(--chip-color-brand-outline-foreground, #ed4c09);
159
+ outline-offset: 2px;
160
+ }
161
+
@@ -0,0 +1,79 @@
1
+ import React from 'react';
2
+ import Icon, { IconName } from '../Icon/Icon';
3
+ import './Chip.css';
4
+
5
+ export interface ChipProps {
6
+ /** Label du chip */
7
+ label?: string;
8
+ /** Contenu du chip (alternative à label) */
9
+ children?: React.ReactNode;
10
+ /** Taille du chip */
11
+ size?: 'sm' | 'md' | 'lg';
12
+ /** Type de chip */
13
+ type?: 'filled' | 'outline';
14
+ /** Couleur du chip */
15
+ color?: 'brand' | 'accent' | 'blue' | 'green' | 'yellow' | 'red' | 'neutral';
16
+ /** Icône affichée avant le label */
17
+ leadingIcon?: IconName;
18
+ /** Icône affichée après le label */
19
+ trailingIcon?: IconName;
20
+ /** Taille des icônes */
21
+ iconSize?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
22
+ /** Classes CSS supplémentaires */
23
+ className?: string;
24
+ /** Handler de clic (optionnel, rend le chip cliquable) */
25
+ onClick?: (event: React.MouseEvent<HTMLDivElement>) => void;
26
+ }
27
+
28
+ const Chip: React.FC<ChipProps> = ({
29
+ label,
30
+ children,
31
+ size = 'sm',
32
+ type = 'filled',
33
+ color = 'brand',
34
+ leadingIcon,
35
+ trailingIcon,
36
+ iconSize = 'sm',
37
+ className = '',
38
+ onClick,
39
+ }) => {
40
+ const baseClasses = 'chip';
41
+ const sizeClass = `chip--${size}`;
42
+ const typeClass = `chip--${type}`;
43
+ const colorClass = `chip--${color}`;
44
+ const clickableClass = onClick ? 'chip--clickable' : '';
45
+
46
+ const chipClasses = [
47
+ baseClasses,
48
+ sizeClass,
49
+ typeClass,
50
+ colorClass,
51
+ clickableClass,
52
+ className,
53
+ ]
54
+ .filter(Boolean)
55
+ .join(' ');
56
+
57
+ const hasLeadingIcon = Boolean(leadingIcon);
58
+ const hasTrailingIcon = Boolean(trailingIcon);
59
+ const content = label || children;
60
+
61
+ return (
62
+ <div className={chipClasses} onClick={onClick} role={onClick ? 'button' : undefined} tabIndex={onClick ? 0 : undefined}>
63
+ {hasLeadingIcon && (
64
+ <span className="chip__icon chip__icon--leading">
65
+ <Icon name={leadingIcon!} size={iconSize} />
66
+ </span>
67
+ )}
68
+ <span className="chip__label">{content}</span>
69
+ {hasTrailingIcon && (
70
+ <span className="chip__icon chip__icon--trailing">
71
+ <Icon name={trailingIcon!} size={iconSize} />
72
+ </span>
73
+ )}
74
+ </div>
75
+ );
76
+ };
77
+
78
+ export default Chip;
79
+
@@ -0,0 +1,58 @@
1
+ .divider {
2
+ flex-shrink: 0;
3
+ background-color: var(--divider-color-default, #d9d9d9);
4
+ border: none;
5
+ }
6
+
7
+ /* Horizontal divider */
8
+ .divider--horizontal {
9
+ width: 100%;
10
+ height: var(--divider-border-width-default, 1px);
11
+ }
12
+
13
+ /* Vertical divider */
14
+ .divider--vertical {
15
+ width: var(--divider-border-width-default, 1px);
16
+ height: 100%;
17
+ }
18
+
19
+ /* Dashed variant (Figma divider) */
20
+ .divider--dashed {
21
+ background-color: transparent;
22
+ }
23
+
24
+ .divider--dashed.divider--horizontal {
25
+ height: var(--divider-dash-thickness, var(--divider-border-width-default, 1px));
26
+ border: none;
27
+ background-image: repeating-linear-gradient(
28
+ to right,
29
+ var(--divider-dash-color, var(--card-color-border-default, #a3a3a3)) 0,
30
+ var(--divider-dash-color, var(--card-color-border-default, #a3a3a3)) var(--divider-dash-length, 10px),
31
+ transparent var(--divider-dash-length, 10px),
32
+ transparent calc(var(--divider-dash-length, 10px) + var(--divider-dash-gap, 6px))
33
+ );
34
+ }
35
+
36
+ .divider--dashed.divider--vertical {
37
+ width: var(--divider-dash-thickness, var(--divider-border-width-default, 1px));
38
+ border: none;
39
+ background-image: repeating-linear-gradient(
40
+ to bottom,
41
+ var(--divider-dash-color, var(--card-color-border-default, #a3a3a3)) 0,
42
+ var(--divider-dash-color, var(--card-color-border-default, #a3a3a3)) var(--divider-dash-length, 10px),
43
+ transparent var(--divider-dash-length, 10px),
44
+ transparent calc(var(--divider-dash-length, 10px) + var(--divider-dash-gap, 6px))
45
+ );
46
+ }
47
+
48
+ /* Color bar variant (used in Car Booking Card) */
49
+ .divider--color-bar {
50
+ height: var(--dimension-height-h-1, 4px);
51
+ background-color: var(--color-border-active-default, #0f7173);
52
+ }
53
+
54
+ .divider--color-bar.divider--vertical {
55
+ width: var(--dimension-width-w-1, 4px);
56
+ height: 100%;
57
+ }
58
+
@@ -0,0 +1,36 @@
1
+ import React from 'react';
2
+ import './Divider.css';
3
+
4
+ export interface DividerProps {
5
+ /** Orientation of the divider */
6
+ orientation?: 'horizontal' | 'vertical';
7
+ /** Variant of the divider */
8
+ variant?: 'default' | 'color-bar' | 'dashed';
9
+ /** Custom color (overrides default color) */
10
+ color?: string;
11
+ /** Additional CSS classes */
12
+ className?: string;
13
+ }
14
+
15
+ const Divider: React.FC<DividerProps> = ({
16
+ orientation = 'horizontal',
17
+ variant = 'default',
18
+ color,
19
+ className = '',
20
+ }) => {
21
+ const baseClass = 'divider';
22
+ const orientationClass = `divider--${orientation}`;
23
+ const variantClass = variant !== 'default' ? `divider--${variant}` : '';
24
+ const classes = [baseClass, orientationClass, variantClass, className]
25
+ .filter(Boolean)
26
+ .join(' ');
27
+
28
+ const style: React.CSSProperties = color
29
+ ? { backgroundColor: color, borderColor: color }
30
+ : {};
31
+
32
+ return <div className={classes} style={style} role="separator" aria-orientation={orientation} />;
33
+ };
34
+
35
+ export default Divider;
36
+