@hotelcard/ui 0.0.5 → 0.0.7

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/index.cjs CHANGED
@@ -21,6 +21,8 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
21
21
  var index_exports = {};
22
22
  __export(index_exports, {
23
23
  Badge: () => Badge,
24
+ Benefits: () => Benefits,
25
+ Block: () => Block,
24
26
  Button: () => Button,
25
27
  Card: () => Card,
26
28
  Checkbox: () => Checkbox,
@@ -30,14 +32,22 @@ __export(index_exports, {
30
32
  CompactCard: () => CompactCard,
31
33
  Divider: () => Divider,
32
34
  Dropdown: () => Dropdown,
33
- HeartIcon: () => HeartIcon,
35
+ FAQ: () => FAQ,
36
+ HeartIcon: () => HeartIcon2,
34
37
  Input: () => Input,
35
38
  Modal: () => Modal,
39
+ Pin: () => Pin,
36
40
  PinIcon: () => PinIcon,
37
41
  RadioButton: () => RadioButton,
38
42
  Rating: () => Rating,
43
+ ReviewCard: () => ReviewCard,
39
44
  SectionHeader: () => SectionHeader,
40
- StarIcon: () => StarIcon4
45
+ StarIcon: () => StarIcon4,
46
+ calculateDiscount: () => calculateDiscount,
47
+ formatDate: () => formatDate,
48
+ formatDateRange: () => formatDateRange,
49
+ formatPrice: () => formatPrice,
50
+ useDebounce: () => useDebounce
41
51
  });
42
52
  module.exports = __toCommonJS(index_exports);
43
53
 
@@ -1071,9 +1081,297 @@ var Input = ({
1071
1081
  };
1072
1082
  Input.displayName = "Input";
1073
1083
 
1074
- // src/components/icons/HeartIcon.tsx
1084
+ // src/components/Block/Block.tsx
1075
1085
  var import_jsx_runtime14 = require("react/jsx-runtime");
1076
- var HeartIcon = ({ filled = false, className = "", size = 24 }) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1086
+ var cx14 = (className) => `hc-block-${className}`;
1087
+ var Block = ({
1088
+ variant = "icon",
1089
+ visual,
1090
+ label,
1091
+ description,
1092
+ style = "primary",
1093
+ onClick,
1094
+ showArrow = true,
1095
+ className = ""
1096
+ }) => {
1097
+ if (variant === "icon") {
1098
+ const containerClasses2 = [
1099
+ cx14("icon"),
1100
+ onClick && cx14("icon--clickable"),
1101
+ className
1102
+ ].filter(Boolean).join(" ");
1103
+ const iconContainerClass = style === "primary" ? cx14("icon-container--primary") : cx14("icon-container--secondary");
1104
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
1105
+ "div",
1106
+ {
1107
+ className: containerClasses2,
1108
+ onClick,
1109
+ role: onClick ? "button" : void 0,
1110
+ tabIndex: onClick ? 0 : void 0,
1111
+ children: [
1112
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: iconContainerClass, children: visual }),
1113
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: cx14("text-container"), children: [
1114
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: cx14("icon-label"), children: label }),
1115
+ description && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: cx14("icon-description"), children: description })
1116
+ ] })
1117
+ ]
1118
+ }
1119
+ );
1120
+ }
1121
+ const containerClasses = [
1122
+ cx14("image"),
1123
+ onClick && cx14("image--clickable"),
1124
+ className
1125
+ ].filter(Boolean).join(" ");
1126
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
1127
+ "div",
1128
+ {
1129
+ className: containerClasses,
1130
+ onClick,
1131
+ role: onClick ? "button" : void 0,
1132
+ tabIndex: onClick ? 0 : void 0,
1133
+ children: [
1134
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: cx14("image-container"), children: visual }),
1135
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: cx14("footer"), children: [
1136
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: cx14("image-label"), children: label }),
1137
+ showArrow && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: cx14("arrow"), children: "\u2192" })
1138
+ ] })
1139
+ ]
1140
+ }
1141
+ );
1142
+ };
1143
+ Block.displayName = "Block";
1144
+
1145
+ // src/components/ReviewCard/ReviewCard.tsx
1146
+ var import_jsx_runtime15 = require("react/jsx-runtime");
1147
+ var cx15 = (className) => `hc-review-${className}`;
1148
+ var ReviewCard = ({
1149
+ name,
1150
+ date,
1151
+ rating,
1152
+ quote,
1153
+ className
1154
+ }) => {
1155
+ const containerClasses = [cx15("container"), className].filter(Boolean).join(" ");
1156
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: containerClasses, children: [
1157
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: cx15("name"), children: name }),
1158
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: cx15("frame"), children: [
1159
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: cx15("stars"), children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Rating, { variant: "stars", value: rating, size: "medium" }) }),
1160
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: cx15("quote"), children: quote })
1161
+ ] }),
1162
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: cx15("date"), children: date })
1163
+ ] });
1164
+ };
1165
+ ReviewCard.displayName = "ReviewCard";
1166
+
1167
+ // src/components/FAQ/FAQ.tsx
1168
+ var import_react6 = require("react");
1169
+ var import_jsx_runtime16 = require("react/jsx-runtime");
1170
+ var cx16 = (className) => `hc-faq-${className}`;
1171
+ var ChevronIcon2 = ({ isOpen }) => {
1172
+ const iconClasses = [
1173
+ cx16("chevron"),
1174
+ isOpen && cx16("chevron--open")
1175
+ ].filter(Boolean).join(" ");
1176
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1177
+ "svg",
1178
+ {
1179
+ width: "24",
1180
+ height: "24",
1181
+ viewBox: "0 0 24 24",
1182
+ fill: "none",
1183
+ xmlns: "http://www.w3.org/2000/svg",
1184
+ className: iconClasses,
1185
+ children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1186
+ "path",
1187
+ {
1188
+ d: "M6 9L12 15L18 9",
1189
+ stroke: "currentColor",
1190
+ strokeWidth: "2",
1191
+ strokeLinecap: "round",
1192
+ strokeLinejoin: "round"
1193
+ }
1194
+ )
1195
+ }
1196
+ );
1197
+ };
1198
+ var FAQ = ({
1199
+ items,
1200
+ defaultOpenIndex = null,
1201
+ allowMultiple = false,
1202
+ className
1203
+ }) => {
1204
+ const [openIndices, setOpenIndices] = (0, import_react6.useState)(
1205
+ defaultOpenIndex !== null ? /* @__PURE__ */ new Set([defaultOpenIndex]) : /* @__PURE__ */ new Set()
1206
+ );
1207
+ const toggleItem = (index) => {
1208
+ setOpenIndices((prev) => {
1209
+ const newSet = new Set(prev);
1210
+ if (newSet.has(index)) {
1211
+ newSet.delete(index);
1212
+ } else {
1213
+ if (!allowMultiple) {
1214
+ newSet.clear();
1215
+ }
1216
+ newSet.add(index);
1217
+ }
1218
+ return newSet;
1219
+ });
1220
+ };
1221
+ const containerClasses = [cx16("container"), className].filter(Boolean).join(" ");
1222
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: containerClasses, children: items.map((item, index) => {
1223
+ const isOpen = openIndices.has(index);
1224
+ const answerClasses = isOpen ? cx16("answer--open") : cx16("answer");
1225
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: cx16("item"), children: [
1226
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1227
+ Button,
1228
+ {
1229
+ variant: "link",
1230
+ size: "medium",
1231
+ className: cx16("question-btn"),
1232
+ onClick: () => toggleItem(index),
1233
+ "aria-expanded": isOpen,
1234
+ "aria-controls": `faq-answer-${index}`,
1235
+ rightIcon: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: cx16("icon-container"), children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ChevronIcon2, { isOpen }) }),
1236
+ children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: cx16("question-text"), children: item.question })
1237
+ }
1238
+ ),
1239
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { id: `faq-answer-${index}`, className: answerClasses, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: cx16("answer-text"), children: item.answer }) })
1240
+ ] }, index);
1241
+ }) });
1242
+ };
1243
+ FAQ.displayName = "FAQ";
1244
+
1245
+ // src/components/Benefits/Benefits.tsx
1246
+ var import_jsx_runtime17 = require("react/jsx-runtime");
1247
+ var cx17 = (className) => `hc-benefits-${className}`;
1248
+ var Benefits = ({
1249
+ title = "Ihre Vorteile mit HotelCard",
1250
+ subtitle = "Mit HotelCard sparen Sie bei jedem Aufenthalt",
1251
+ benefits = [
1252
+ {
1253
+ title: "\xDCber 500 Hotels",
1254
+ description: "Grosse Auswahl in der ganzen Schweiz"
1255
+ },
1256
+ {
1257
+ title: "Bis zu 50% Rabatt",
1258
+ description: "Exklusive Mitglieder-Preise"
1259
+ },
1260
+ {
1261
+ title: "Kein Buchungszwang",
1262
+ description: "Buchen Sie, wann Sie m\xF6chten"
1263
+ },
1264
+ {
1265
+ title: "Kostenlose Stornierung",
1266
+ description: "Flexible Buchungsbedingungen"
1267
+ }
1268
+ ],
1269
+ contactTitle = "Haben Sie Fragen?",
1270
+ contactDescription = "Unser Kundenservice hilft Ihnen gerne weiter",
1271
+ contactButtonText = "Kontakt aufnehmen",
1272
+ onContactClick,
1273
+ className
1274
+ }) => {
1275
+ const sectionClasses = [cx17("section"), className].filter(Boolean).join(" ");
1276
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("section", { className: sectionClasses, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: cx17("container"), children: [
1277
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: cx17("header"), children: [
1278
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("h2", { className: cx17("title"), children: title }),
1279
+ subtitle && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: cx17("subtitle"), children: subtitle })
1280
+ ] }),
1281
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: cx17("grid"), children: benefits.map((benefit, index) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: cx17("item"), children: [
1282
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("h3", { className: cx17("item-title"), children: benefit.title }),
1283
+ benefit.description && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: cx17("item-description"), children: benefit.description })
1284
+ ] }, index)) }),
1285
+ contactTitle && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: cx17("contact-card"), children: [
1286
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("h3", { className: cx17("contact-title"), children: contactTitle }),
1287
+ contactDescription && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: cx17("contact-description"), children: contactDescription }),
1288
+ contactButtonText && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1289
+ Button,
1290
+ {
1291
+ variant: "secondary",
1292
+ size: "medium",
1293
+ onClick: onContactClick,
1294
+ className: cx17("contact-btn"),
1295
+ children: contactButtonText
1296
+ }
1297
+ )
1298
+ ] })
1299
+ ] }) });
1300
+ };
1301
+ Benefits.displayName = "Benefits";
1302
+
1303
+ // src/components/Pin/Pin.tsx
1304
+ var import_react7 = require("react");
1305
+ var import_jsx_runtime18 = require("react/jsx-runtime");
1306
+ var cx18 = (className) => `hc-pin-${className}`;
1307
+ var HeartIcon = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1308
+ "svg",
1309
+ {
1310
+ className,
1311
+ width: "16",
1312
+ height: "16",
1313
+ viewBox: "0 0 16 16",
1314
+ fill: "currentColor",
1315
+ xmlns: "http://www.w3.org/2000/svg",
1316
+ children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("path", { d: "M8 14.2333L6.96667 13.2933C3.6 10.24 1.33333 8.18667 1.33333 5.66667C1.33333 3.61333 2.94667 2 5 2C6.16 2 7.27333 2.54 8 3.39333C8.72667 2.54 9.84 2 11 2C13.0533 2 14.6667 3.61333 14.6667 5.66667C14.6667 8.18667 12.4 10.24 9.03333 13.2933L8 14.2333Z" })
1317
+ }
1318
+ );
1319
+ var HomeIcon = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1320
+ "svg",
1321
+ {
1322
+ className,
1323
+ width: "16",
1324
+ height: "16",
1325
+ viewBox: "0 0 16 16",
1326
+ fill: "currentColor",
1327
+ xmlns: "http://www.w3.org/2000/svg",
1328
+ children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("path", { d: "M6.66667 13.3333V9.33333H9.33333V13.3333H12.6667V8H14.6667L8 2L1.33333 8H3.33333V13.3333H6.66667Z" })
1329
+ }
1330
+ );
1331
+ var Pin = (0, import_react7.forwardRef)(
1332
+ ({
1333
+ variant = "price",
1334
+ viewed = false,
1335
+ currency = "CHF",
1336
+ price = 0,
1337
+ showFavorite = false,
1338
+ disabled = false,
1339
+ onClick,
1340
+ className = ""
1341
+ }, ref) => {
1342
+ const styleVariant = viewed ? "secondary" : "primary";
1343
+ const pinClasses = [
1344
+ cx18("pin"),
1345
+ cx18(styleVariant),
1346
+ variant === "hotel" && cx18("hotel"),
1347
+ className
1348
+ ].filter(Boolean).join(" ");
1349
+ const formattedPrice = typeof price === "number" ? Math.round(price).toString() : price;
1350
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
1351
+ "button",
1352
+ {
1353
+ ref,
1354
+ type: "button",
1355
+ className: pinClasses,
1356
+ disabled,
1357
+ onClick,
1358
+ children: [
1359
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: cx18("body"), children: variant === "price" ? /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
1360
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: cx18("currency"), children: currency }),
1361
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: cx18("price"), children: formattedPrice }),
1362
+ showFavorite && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: cx18("favorite-container"), children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(HeartIcon, { className: cx18("favorite-icon") }) })
1363
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(HomeIcon, { className: cx18("hotel-icon") }) }),
1364
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: cx18("pointer"), children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: cx18("pointer-inner") }) })
1365
+ ]
1366
+ }
1367
+ );
1368
+ }
1369
+ );
1370
+ Pin.displayName = "Pin";
1371
+
1372
+ // src/components/icons/HeartIcon.tsx
1373
+ var import_jsx_runtime19 = require("react/jsx-runtime");
1374
+ var HeartIcon2 = ({ filled = false, className = "", size = 24 }) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1077
1375
  "svg",
1078
1376
  {
1079
1377
  width: size,
@@ -1085,14 +1383,14 @@ var HeartIcon = ({ filled = false, className = "", size = 24 }) => /* @__PURE__
1085
1383
  strokeWidth: 2,
1086
1384
  strokeLinecap: "round",
1087
1385
  strokeLinejoin: "round",
1088
- children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("path", { d: "M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z" })
1386
+ children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("path", { d: "M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z" })
1089
1387
  }
1090
1388
  );
1091
- HeartIcon.displayName = "HeartIcon";
1389
+ HeartIcon2.displayName = "HeartIcon";
1092
1390
 
1093
1391
  // src/components/icons/StarIcon.tsx
1094
- var import_jsx_runtime15 = require("react/jsx-runtime");
1095
- var StarIcon4 = ({ filled = true, className = "", size = 9 }) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
1392
+ var import_jsx_runtime20 = require("react/jsx-runtime");
1393
+ var StarIcon4 = ({ filled = true, className = "", size = 9 }) => /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
1096
1394
  "svg",
1097
1395
  {
1098
1396
  xmlns: "http://www.w3.org/2000/svg",
@@ -1102,22 +1400,22 @@ var StarIcon4 = ({ filled = true, className = "", size = 9 }) => /* @__PURE__ */
1102
1400
  fill: "none",
1103
1401
  className,
1104
1402
  children: [
1105
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("g", { clipPath: "url(#clip0_star_icon)", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1403
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("g", { clipPath: "url(#clip0_star_icon)", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1106
1404
  "path",
1107
1405
  {
1108
1406
  d: "M4.80018 0.366577C4.93104 0.366577 5.05173 0.440968 5.11135 0.557659L6.18011 2.66102L8.50521 3.03152C8.63462 3.05194 8.74222 3.14383 8.78294 3.26927C8.82365 3.39472 8.79021 3.53183 8.6986 3.62518L7.03366 5.29533L7.40155 7.6277C7.42191 7.75752 7.3681 7.88879 7.26195 7.9661C7.15581 8.04341 7.01476 8.05508 6.89843 7.99528L4.80018 6.92463L2.70192 7.99528C2.58559 8.05508 2.44454 8.04341 2.33839 7.9661C2.23225 7.88879 2.17844 7.75898 2.1988 7.6277L2.56523 5.29533L0.901751 3.62518C0.808689 3.53183 0.776699 3.39472 0.817413 3.26927C0.858128 3.14383 0.964277 3.05194 1.09515 3.03152L3.42024 2.66102L4.49045 0.557659C4.55007 0.440968 4.67076 0.366577 4.80163 0.366577H4.80018Z",
1109
1407
  fill: filled ? "#1F2937" : "#D1D5DB"
1110
1408
  }
1111
1409
  ) }),
1112
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("clipPath", { id: "clip0_star_icon", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("rect", { width: "8", height: "8", fill: "white", transform: "translate(0.800049 0.199951)" }) }) })
1410
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("clipPath", { id: "clip0_star_icon", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("rect", { width: "8", height: "8", fill: "white", transform: "translate(0.800049 0.199951)" }) }) })
1113
1411
  ]
1114
1412
  }
1115
1413
  );
1116
1414
  StarIcon4.displayName = "StarIcon";
1117
1415
 
1118
1416
  // src/components/icons/ChevronLeftIcon.tsx
1119
- var import_jsx_runtime16 = require("react/jsx-runtime");
1120
- var ChevronLeftIcon = ({ className = "", size = 20 }) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1417
+ var import_jsx_runtime21 = require("react/jsx-runtime");
1418
+ var ChevronLeftIcon = ({ className = "", size = 20 }) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1121
1419
  "svg",
1122
1420
  {
1123
1421
  xmlns: "http://www.w3.org/2000/svg",
@@ -1130,14 +1428,14 @@ var ChevronLeftIcon = ({ className = "", size = 20 }) => /* @__PURE__ */ (0, imp
1130
1428
  strokeLinecap: "round",
1131
1429
  strokeLinejoin: "round",
1132
1430
  className,
1133
- children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("polyline", { points: "15 18 9 12 15 6" })
1431
+ children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("polyline", { points: "15 18 9 12 15 6" })
1134
1432
  }
1135
1433
  );
1136
1434
  ChevronLeftIcon.displayName = "ChevronLeftIcon";
1137
1435
 
1138
1436
  // src/components/icons/ChevronRightIcon.tsx
1139
- var import_jsx_runtime17 = require("react/jsx-runtime");
1140
- var ChevronRightIcon2 = ({ className = "", size = 20 }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1437
+ var import_jsx_runtime22 = require("react/jsx-runtime");
1438
+ var ChevronRightIcon2 = ({ className = "", size = 20 }) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1141
1439
  "svg",
1142
1440
  {
1143
1441
  xmlns: "http://www.w3.org/2000/svg",
@@ -1150,14 +1448,14 @@ var ChevronRightIcon2 = ({ className = "", size = 20 }) => /* @__PURE__ */ (0, i
1150
1448
  strokeLinecap: "round",
1151
1449
  strokeLinejoin: "round",
1152
1450
  className,
1153
- children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("polyline", { points: "9 18 15 12 9 6" })
1451
+ children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("polyline", { points: "9 18 15 12 9 6" })
1154
1452
  }
1155
1453
  );
1156
1454
  ChevronRightIcon2.displayName = "ChevronRightIcon";
1157
1455
 
1158
1456
  // src/components/icons/PinIcon.tsx
1159
- var import_jsx_runtime18 = require("react/jsx-runtime");
1160
- var PinIcon = ({ className = "", size = 16 }) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
1457
+ var import_jsx_runtime23 = require("react/jsx-runtime");
1458
+ var PinIcon = ({ className = "", size = 16 }) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
1161
1459
  "svg",
1162
1460
  {
1163
1461
  xmlns: "http://www.w3.org/2000/svg",
@@ -1167,7 +1465,7 @@ var PinIcon = ({ className = "", size = 16 }) => /* @__PURE__ */ (0, import_jsx_
1167
1465
  fill: "none",
1168
1466
  className,
1169
1467
  children: [
1170
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1468
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1171
1469
  "path",
1172
1470
  {
1173
1471
  fillRule: "evenodd",
@@ -1176,7 +1474,7 @@ var PinIcon = ({ className = "", size = 16 }) => /* @__PURE__ */ (0, import_jsx_
1176
1474
  fill: "currentColor"
1177
1475
  }
1178
1476
  ),
1179
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1477
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1180
1478
  "path",
1181
1479
  {
1182
1480
  fillRule: "evenodd",
@@ -1189,9 +1487,52 @@ var PinIcon = ({ className = "", size = 16 }) => /* @__PURE__ */ (0, import_jsx_
1189
1487
  }
1190
1488
  );
1191
1489
  PinIcon.displayName = "PinIcon";
1490
+
1491
+ // src/hooks/useDebounce.ts
1492
+ var import_react8 = require("react");
1493
+ var useDebounce = (value, delay) => {
1494
+ const [debouncedValue, setDebouncedValue] = (0, import_react8.useState)(value);
1495
+ (0, import_react8.useEffect)(() => {
1496
+ const timer = setTimeout(() => setDebouncedValue(value), delay);
1497
+ return () => clearTimeout(timer);
1498
+ }, [value, delay]);
1499
+ return debouncedValue;
1500
+ };
1501
+
1502
+ // src/utils/formatPrice.ts
1503
+ var formatPrice = (amount, currency = "CHF", locale = "de-CH") => {
1504
+ return new Intl.NumberFormat(locale, {
1505
+ style: "currency",
1506
+ currency,
1507
+ minimumFractionDigits: 0,
1508
+ maximumFractionDigits: 0
1509
+ }).format(amount);
1510
+ };
1511
+
1512
+ // src/utils/formatDate.ts
1513
+ var import_date_fns = require("date-fns");
1514
+ var import_locale = require("date-fns/locale");
1515
+ var locales = { de: import_locale.de, en: import_locale.enUS, fr: import_locale.fr, it: import_locale.it };
1516
+ var formatDate = (date, formatStr = "dd. MMM yyyy", locale = "de") => {
1517
+ const d = typeof date === "string" ? (0, import_date_fns.parseISO)(date) : date;
1518
+ return (0, import_date_fns.format)(d, formatStr, { locale: locales[locale] || import_locale.de });
1519
+ };
1520
+ var formatDateRange = (checkIn, checkOut, locale = "de") => {
1521
+ const start = formatDate(checkIn, "dd.", locale);
1522
+ const end = formatDate(checkOut, "dd. MMM yyyy", locale);
1523
+ return `${start} - ${end}`;
1524
+ };
1525
+
1526
+ // src/utils/calculateDiscount.ts
1527
+ var calculateDiscount = (originalPrice, discountedPrice) => {
1528
+ if (originalPrice <= 0) return 0;
1529
+ return Math.round((originalPrice - discountedPrice) / originalPrice * 100);
1530
+ };
1192
1531
  // Annotate the CommonJS export names for ESM import in node:
1193
1532
  0 && (module.exports = {
1194
1533
  Badge,
1534
+ Benefits,
1535
+ Block,
1195
1536
  Button,
1196
1537
  Card,
1197
1538
  Checkbox,
@@ -1201,13 +1542,21 @@ PinIcon.displayName = "PinIcon";
1201
1542
  CompactCard,
1202
1543
  Divider,
1203
1544
  Dropdown,
1545
+ FAQ,
1204
1546
  HeartIcon,
1205
1547
  Input,
1206
1548
  Modal,
1549
+ Pin,
1207
1550
  PinIcon,
1208
1551
  RadioButton,
1209
1552
  Rating,
1553
+ ReviewCard,
1210
1554
  SectionHeader,
1211
- StarIcon
1555
+ StarIcon,
1556
+ calculateDiscount,
1557
+ formatDate,
1558
+ formatDateRange,
1559
+ formatPrice,
1560
+ useDebounce
1212
1561
  });
1213
1562
  //# sourceMappingURL=index.cjs.map