@cimplify/sdk 0.21.0 → 0.22.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/dist/react.mjs CHANGED
@@ -439,6 +439,9 @@ function buildLineKey(productId, options) {
439
439
  if (options.staffId) {
440
440
  parts.push(`st:${options.staffId}`);
441
441
  }
442
+ if (options.resourceId) {
443
+ parts.push(`r:${options.resourceId}`);
444
+ }
442
445
  return parts.join("|");
443
446
  }
444
447
  function calculateLineSubtotal(item) {
@@ -756,7 +759,8 @@ function createCartStore(params) {
756
759
  composite_selections: normalizedOptions.compositeSelections,
757
760
  scheduled_start: normalizedOptions.scheduledStart,
758
761
  scheduled_end: normalizedOptions.scheduledEnd,
759
- staff_id: normalizedOptions.staffId
762
+ staff_id: normalizedOptions.staffId,
763
+ resource_id: normalizedOptions.resourceId
760
764
  });
761
765
  if (!result.ok) {
762
766
  throw result.error;
@@ -4484,6 +4488,7 @@ function useRecommendations(options = {}) {
4484
4488
  return { recommendations, intent, isLoading, error, refetch };
4485
4489
  }
4486
4490
  var deliveryFeeCache = /* @__PURE__ */ new Map();
4491
+ var deliveryFeeInflight = /* @__PURE__ */ new Map();
4487
4492
  function buildDeliveryFeeCacheKey(client, latitude, longitude, country) {
4488
4493
  return JSON.stringify({
4489
4494
  key: client.getPublicKey(),
@@ -4527,13 +4532,26 @@ function useDeliveryFee(options) {
4527
4532
  setIsLoading(true);
4528
4533
  const currentRequestId = ++requestIdRef.current;
4529
4534
  try {
4530
- const result = await client.delivery.getFee(latitude, longitude, country);
4531
- if (currentRequestId !== requestIdRef.current) return;
4532
- if (!result.ok) {
4533
- throw result.error;
4535
+ const existing = deliveryFeeInflight.get(cacheKey);
4536
+ const promise = existing ?? (async () => {
4537
+ const result = await client.delivery.getFee(latitude, longitude, country);
4538
+ if (!result.ok) {
4539
+ throw result.error;
4540
+ }
4541
+ return result.value;
4542
+ })();
4543
+ if (!existing) {
4544
+ deliveryFeeInflight.set(
4545
+ cacheKey,
4546
+ promise.finally(() => {
4547
+ deliveryFeeInflight.delete(cacheKey);
4548
+ })
4549
+ );
4534
4550
  }
4535
- deliveryFeeCache.set(cacheKey, result.value);
4536
- setFee(result.value);
4551
+ const value = await promise;
4552
+ if (currentRequestId !== requestIdRef.current) return;
4553
+ deliveryFeeCache.set(cacheKey, value);
4554
+ setFee(value);
4537
4555
  } catch (loadError) {
4538
4556
  if (currentRequestId !== requestIdRef.current) return;
4539
4557
  setError(loadError);
@@ -6877,11 +6895,8 @@ function ProductCard({
6877
6895
  "div",
6878
6896
  {
6879
6897
  "data-cimplify-product-card-image-container": true,
6880
- className: classNames?.imageContainer,
6881
- style: {
6882
- overflow: "hidden",
6883
- ...ASPECT_STYLES2[aspectRatio]
6884
- },
6898
+ className: cn("overflow-hidden rounded-t-xl", classNames?.imageContainer),
6899
+ style: ASPECT_STYLES2[aspectRatio],
6885
6900
  children: renderImage ? renderImage({
6886
6901
  src: imageUrl,
6887
6902
  alt: product.name,
@@ -6891,8 +6906,7 @@ function ProductCard({
6891
6906
  {
6892
6907
  src: imageUrl,
6893
6908
  alt: product.name,
6894
- className: classNames?.image,
6895
- style: { width: "100%", height: "100%", objectFit: "cover" },
6909
+ className: cn("w-full h-full object-cover transition-transform duration-300 group-hover:scale-105", classNames?.image),
6896
6910
  "data-cimplify-product-card-image": true
6897
6911
  }
6898
6912
  )
@@ -6902,13 +6916,13 @@ function ProductCard({
6902
6916
  "div",
6903
6917
  {
6904
6918
  "data-cimplify-product-card-body": true,
6905
- className: classNames?.body,
6919
+ className: cn("p-4 flex flex-col gap-1", classNames?.body),
6906
6920
  children: [
6907
6921
  /* @__PURE__ */ jsx(
6908
6922
  "span",
6909
6923
  {
6910
6924
  "data-cimplify-product-card-name": true,
6911
- className: classNames?.name,
6925
+ className: cn("font-semibold text-foreground leading-tight", classNames?.name),
6912
6926
  children: product.name
6913
6927
  }
6914
6928
  ),
@@ -6916,13 +6930,7 @@ function ProductCard({
6916
6930
  "span",
6917
6931
  {
6918
6932
  "data-cimplify-product-card-description": true,
6919
- className: classNames?.description,
6920
- style: {
6921
- display: "-webkit-box",
6922
- WebkitLineClamp: 2,
6923
- WebkitBoxOrient: "vertical",
6924
- overflow: "hidden"
6925
- },
6933
+ className: cn("text-sm text-muted-foreground line-clamp-2", classNames?.description),
6926
6934
  children: product.description
6927
6935
  }
6928
6936
  ),
@@ -6930,7 +6938,7 @@ function ProductCard({
6930
6938
  Price,
6931
6939
  {
6932
6940
  amount: product.default_price,
6933
- className: classNames?.price
6941
+ className: cn("text-sm font-medium text-foreground mt-1", classNames?.price)
6934
6942
  }
6935
6943
  )
6936
6944
  ]
@@ -6939,7 +6947,7 @@ function ProductCard({
6939
6947
  ] });
6940
6948
  if (mode === "page") {
6941
6949
  const linkHref = href ?? `/menu/${product.slug}`;
6942
- const linkClassName = cn("block no-underline text-[inherit]", className, classNames?.root);
6950
+ const linkClassName = cn("group block no-underline text-[inherit] rounded-xl border border-border bg-background transition-shadow duration-200 hover:shadow-md", className, classNames?.root);
6943
6951
  if (renderLink) {
6944
6952
  return renderLink({ href: linkHref, className: linkClassName, children: cardBody });
6945
6953
  }
@@ -6962,7 +6970,7 @@ function ProductCard({
6962
6970
  "data-cimplify-product-card": true,
6963
6971
  "data-display-mode": "card",
6964
6972
  className: cn(
6965
- "block w-full text-left bg-transparent border-none p-0 cursor-pointer font-[inherit] text-[inherit]",
6973
+ "group block w-full text-left p-0 cursor-pointer font-[inherit] text-[inherit] rounded-xl border border-border bg-background transition-shadow duration-200 hover:shadow-md",
6966
6974
  className,
6967
6975
  classNames?.root
6968
6976
  ),
@@ -8296,10 +8304,14 @@ function BookingCard({
8296
8304
  {
8297
8305
  "data-cimplify-booking-card": true,
8298
8306
  "data-status": booking.status,
8299
- className: cn(className, classNames?.root),
8307
+ className: cn(
8308
+ "rounded-xl border border-border bg-background p-4 flex flex-col gap-3",
8309
+ className,
8310
+ classNames?.root
8311
+ ),
8300
8312
  children: [
8301
- /* @__PURE__ */ jsxs("div", { "data-cimplify-booking-main": true, children: [
8302
- /* @__PURE__ */ jsxs("span", { "data-cimplify-booking-service": true, className: classNames?.service, children: [
8313
+ /* @__PURE__ */ jsxs("div", { "data-cimplify-booking-main": true, className: "flex items-center justify-between gap-2", children: [
8314
+ /* @__PURE__ */ jsxs("span", { "data-cimplify-booking-service": true, className: cn("font-semibold text-foreground", classNames?.service), children: [
8303
8315
  "Booking #",
8304
8316
  booking.order_id.slice(0, 8)
8305
8317
  ] }),
@@ -8308,22 +8320,37 @@ function BookingCard({
8308
8320
  {
8309
8321
  "data-cimplify-booking-status": true,
8310
8322
  "data-status": booking.status,
8311
- className: classNames?.status,
8323
+ className: cn(
8324
+ "text-xs font-medium px-2 py-0.5 rounded-full",
8325
+ active ? "bg-primary/10 text-primary" : "bg-muted text-muted-foreground",
8326
+ classNames?.status
8327
+ ),
8312
8328
  children: STATUS_LABELS3[booking.status] ?? booking.status
8313
8329
  }
8314
8330
  )
8315
8331
  ] }),
8316
- firstItem?.confirmation_code && /* @__PURE__ */ jsx("span", { "data-cimplify-booking-code": true, className: classNames?.confirmationCode, children: firstItem.confirmation_code }),
8317
- scheduledTime && /* @__PURE__ */ jsx("time", { "data-cimplify-booking-time": true, className: classNames?.time, children: scheduledTime }),
8318
- /* @__PURE__ */ jsx("span", { "data-cimplify-booking-total": true, className: classNames?.total, children: /* @__PURE__ */ jsx(Price, { amount: booking.total_price }) }),
8319
- active && (onCancel || onReschedule) && /* @__PURE__ */ jsxs("div", { "data-cimplify-booking-actions": true, className: classNames?.actions, children: [
8332
+ firstItem?.confirmation_code && /* @__PURE__ */ jsx("span", { "data-cimplify-booking-code": true, className: cn("text-xs font-mono text-muted-foreground tracking-wide", classNames?.confirmationCode), children: firstItem.confirmation_code }),
8333
+ scheduledTime && /* @__PURE__ */ jsx(
8334
+ "time",
8335
+ {
8336
+ "data-cimplify-booking-time": true,
8337
+ dateTime: firstItem?.scheduled_start ?? void 0,
8338
+ className: cn("text-sm text-foreground", classNames?.time),
8339
+ children: scheduledTime
8340
+ }
8341
+ ),
8342
+ /* @__PURE__ */ jsx("span", { "data-cimplify-booking-total": true, className: cn("text-sm font-medium text-foreground", classNames?.total), children: /* @__PURE__ */ jsx(Price, { amount: booking.total_price }) }),
8343
+ active && (onCancel || onReschedule) && /* @__PURE__ */ jsxs("div", { "data-cimplify-booking-actions": true, className: cn("flex gap-2 pt-1 border-t border-border mt-1", classNames?.actions), children: [
8320
8344
  onReschedule && /* @__PURE__ */ jsx(
8321
8345
  "button",
8322
8346
  {
8323
8347
  type: "button",
8324
8348
  onClick: () => onReschedule(booking),
8325
8349
  "data-cimplify-booking-reschedule": true,
8326
- className: classNames?.rescheduleButton,
8350
+ className: cn(
8351
+ "flex-1 text-sm font-medium py-2 rounded-lg border border-border bg-background text-foreground transition-colors hover:bg-muted cursor-pointer",
8352
+ classNames?.rescheduleButton
8353
+ ),
8327
8354
  children: "Reschedule"
8328
8355
  }
8329
8356
  ),
@@ -8333,7 +8360,10 @@ function BookingCard({
8333
8360
  type: "button",
8334
8361
  onClick: () => onCancel(booking),
8335
8362
  "data-cimplify-booking-cancel": true,
8336
- className: classNames?.cancelButton,
8363
+ className: cn(
8364
+ "flex-1 text-sm font-medium py-2 rounded-lg border border-border bg-background text-destructive transition-colors hover:bg-destructive/10 cursor-pointer",
8365
+ classNames?.cancelButton
8366
+ ),
8337
8367
  children: "Cancel"
8338
8368
  }
8339
8369
  )
@@ -8446,11 +8476,8 @@ function ServiceCard({
8446
8476
  "div",
8447
8477
  {
8448
8478
  "data-cimplify-service-card-image-container": true,
8449
- className: classNames?.imageContainer,
8450
- style: {
8451
- overflow: "hidden",
8452
- ...ASPECT_STYLES3[aspectRatio]
8453
- },
8479
+ className: cn("overflow-hidden rounded-t-xl", classNames?.imageContainer),
8480
+ style: ASPECT_STYLES3[aspectRatio],
8454
8481
  children: renderImage ? renderImage({
8455
8482
  src: imageUrl,
8456
8483
  alt: service.name,
@@ -8460,36 +8487,35 @@ function ServiceCard({
8460
8487
  {
8461
8488
  src: imageUrl,
8462
8489
  alt: service.name,
8463
- className: classNames?.image,
8464
- style: { width: "100%", height: "100%", objectFit: "cover" },
8490
+ className: cn("w-full h-full object-cover transition-transform duration-300 group-hover:scale-105", classNames?.image),
8465
8491
  "data-cimplify-service-card-image": true
8466
8492
  }
8467
8493
  )
8468
8494
  }
8469
8495
  ),
8470
- /* @__PURE__ */ jsxs("div", { "data-cimplify-service-card-body": true, className: classNames?.body, children: [
8471
- /* @__PURE__ */ jsx("span", { "data-cimplify-service-card-name": true, className: classNames?.name, children: service.name }),
8496
+ /* @__PURE__ */ jsxs("div", { "data-cimplify-service-card-body": true, className: cn("p-4 flex flex-col gap-1.5", classNames?.body), children: [
8497
+ /* @__PURE__ */ jsx("span", { "data-cimplify-service-card-name": true, className: cn("font-semibold text-foreground leading-tight", classNames?.name), children: service.name }),
8472
8498
  service.description && /* @__PURE__ */ jsx(
8473
8499
  "span",
8474
8500
  {
8475
8501
  "data-cimplify-service-card-description": true,
8476
- className: classNames?.description,
8477
- style: {
8478
- display: "-webkit-box",
8479
- WebkitLineClamp: 2,
8480
- WebkitBoxOrient: "vertical",
8481
- overflow: "hidden"
8482
- },
8502
+ className: cn("text-sm text-muted-foreground line-clamp-2", classNames?.description),
8483
8503
  children: service.description
8484
8504
  }
8485
8505
  ),
8486
- /* @__PURE__ */ jsxs("div", { "data-cimplify-service-card-meta": true, className: classNames?.meta, children: [
8487
- /* @__PURE__ */ jsx("span", { "data-cimplify-service-card-duration": true, className: classNames?.duration, children: formatDuration2(service.duration_minutes, service.duration_unit) }),
8488
- service.price && /* @__PURE__ */ jsx("span", { "data-cimplify-service-card-price": true, className: classNames?.price, children: /* @__PURE__ */ jsx(Price, { amount: service.price }) })
8506
+ /* @__PURE__ */ jsxs("div", { "data-cimplify-service-card-meta": true, className: cn("flex items-center gap-2 mt-1 text-sm", classNames?.meta), children: [
8507
+ /* @__PURE__ */ jsx("span", { "data-cimplify-service-card-duration": true, className: cn("text-muted-foreground", classNames?.duration), children: formatDuration2(service.duration_minutes, service.duration_unit) }),
8508
+ service.price && /* @__PURE__ */ jsx("span", { "data-cimplify-service-card-price": true, className: cn("font-medium text-foreground", classNames?.price), children: /* @__PURE__ */ jsx(Price, { amount: service.price }) })
8489
8509
  ] })
8490
8510
  ] }),
8491
- !href && onBook && /* @__PURE__ */ jsx("span", { "data-cimplify-service-card-action": true, className: classNames?.action, children: actionLabel })
8511
+ !href && onBook && /* @__PURE__ */ jsx("span", { "data-cimplify-service-card-action": true, className: cn("px-4 pb-4 pt-1 text-sm font-medium text-primary", classNames?.action), children: actionLabel })
8492
8512
  ] });
8513
+ const cardClasses = cn(
8514
+ "group block w-full rounded-xl border border-border bg-background text-left transition-shadow duration-200 hover:shadow-md",
8515
+ !service.is_available && "opacity-60",
8516
+ className,
8517
+ classNames?.root
8518
+ );
8493
8519
  if (href) {
8494
8520
  return /* @__PURE__ */ jsx(
8495
8521
  "a",
@@ -8497,8 +8523,7 @@ function ServiceCard({
8497
8523
  href,
8498
8524
  "data-cimplify-service-card": true,
8499
8525
  "data-available": service.is_available || void 0,
8500
- className: cn(className, classNames?.root),
8501
- style: { display: "block", textDecoration: "none", color: "inherit" },
8526
+ className: cn(cardClasses, "no-underline text-[inherit]"),
8502
8527
  children: cardBody
8503
8528
  }
8504
8529
  );
@@ -8511,18 +8536,7 @@ function ServiceCard({
8511
8536
  disabled: !service.is_available,
8512
8537
  "data-cimplify-service-card": true,
8513
8538
  "data-available": service.is_available || void 0,
8514
- className: cn(className, classNames?.root),
8515
- style: {
8516
- display: "block",
8517
- width: "100%",
8518
- textAlign: "inherit",
8519
- background: "none",
8520
- border: "none",
8521
- padding: 0,
8522
- cursor: service.is_available ? "pointer" : "default",
8523
- font: "inherit",
8524
- color: "inherit"
8525
- },
8539
+ className: cn(cardClasses, "cursor-pointer font-[inherit] p-0 border-border"),
8526
8540
  children: cardBody
8527
8541
  }
8528
8542
  );
@@ -9258,10 +9272,114 @@ function DealsPage({
9258
9272
  isEmpty && /* @__PURE__ */ jsx("div", { "data-cimplify-deals-empty": true, className: classNames?.empty, children: /* @__PURE__ */ jsx("p", { children: "No deals available right now. Check back soon!" }) })
9259
9273
  ] });
9260
9274
  }
9275
+ var ANY_VALUE2 = "__any__";
9276
+ function roomToResource(room) {
9277
+ return {
9278
+ id: room.id,
9279
+ name: room.name,
9280
+ capacity: room.capacity,
9281
+ floor: room.floor,
9282
+ is_available: room.status === "available"
9283
+ };
9284
+ }
9285
+ function ResourcePicker({
9286
+ resources,
9287
+ selectedResourceId,
9288
+ onResourceSelect,
9289
+ showAnyOption = true,
9290
+ anyLabel = "Any available",
9291
+ renderImage,
9292
+ className,
9293
+ classNames
9294
+ }) {
9295
+ const groupValue = selectedResourceId === null ? ANY_VALUE2 : selectedResourceId ?? "";
9296
+ return /* @__PURE__ */ jsxs(
9297
+ RadioGroup,
9298
+ {
9299
+ "data-cimplify-resource-picker": true,
9300
+ className: cn("flex flex-col gap-2", className, classNames?.root),
9301
+ value: groupValue,
9302
+ onValueChange: (value) => {
9303
+ onResourceSelect?.(value === ANY_VALUE2 ? null : value);
9304
+ },
9305
+ children: [
9306
+ showAnyOption && /* @__PURE__ */ jsx(
9307
+ Radio.Root,
9308
+ {
9309
+ value: ANY_VALUE2,
9310
+ "data-cimplify-resource-option": true,
9311
+ "data-selected": selectedResourceId === null || void 0,
9312
+ "data-any": true,
9313
+ className: cn(
9314
+ "flex items-center gap-3 rounded-lg border border-border p-3 transition-colors cursor-pointer",
9315
+ "hover:bg-muted data-[checked]:border-primary data-[checked]:bg-primary/5",
9316
+ classNames?.option
9317
+ ),
9318
+ children: /* @__PURE__ */ jsx("span", { "data-cimplify-resource-name": true, className: cn("font-medium text-foreground", classNames?.name), children: anyLabel })
9319
+ }
9320
+ ),
9321
+ resources.map((resource) => {
9322
+ const unavailable = resource.is_available === false;
9323
+ return /* @__PURE__ */ jsxs(
9324
+ Radio.Root,
9325
+ {
9326
+ value: resource.id,
9327
+ disabled: unavailable,
9328
+ "data-cimplify-resource-option": true,
9329
+ "data-selected": selectedResourceId === resource.id || void 0,
9330
+ "data-unavailable": unavailable || void 0,
9331
+ className: cn(
9332
+ "flex items-center gap-3 rounded-lg border border-border p-3 transition-colors cursor-pointer",
9333
+ "hover:bg-muted data-[checked]:border-primary data-[checked]:bg-primary/5",
9334
+ unavailable && "opacity-50 cursor-not-allowed",
9335
+ classNames?.option,
9336
+ unavailable ? classNames?.unavailable : void 0
9337
+ ),
9338
+ children: [
9339
+ resource.image_url && (renderImage ? renderImage({
9340
+ src: resource.image_url,
9341
+ alt: resource.name,
9342
+ className: classNames?.image
9343
+ }) : /* @__PURE__ */ jsx(
9344
+ "img",
9345
+ {
9346
+ src: resource.image_url,
9347
+ alt: resource.name,
9348
+ "data-cimplify-resource-image": true,
9349
+ className: cn("w-10 h-10 rounded-lg object-cover", classNames?.image)
9350
+ }
9351
+ )),
9352
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-0.5 flex-1 min-w-0", children: [
9353
+ /* @__PURE__ */ jsx("span", { "data-cimplify-resource-name": true, className: cn("font-medium text-foreground", classNames?.name), children: resource.name }),
9354
+ resource.description && /* @__PURE__ */ jsx("span", { "data-cimplify-resource-description": true, className: cn("text-sm text-muted-foreground truncate", classNames?.description), children: resource.description }),
9355
+ /* @__PURE__ */ jsxs("div", { "data-cimplify-resource-meta": true, className: cn("flex items-center gap-2 text-xs text-muted-foreground", classNames?.meta), children: [
9356
+ resource.capacity !== void 0 && /* @__PURE__ */ jsxs("span", { "data-cimplify-resource-capacity": true, className: classNames?.capacity, children: [
9357
+ "Up to ",
9358
+ resource.capacity
9359
+ ] }),
9360
+ resource.floor && /* @__PURE__ */ jsx("span", { "data-cimplify-resource-floor": true, className: classNames?.floor, children: resource.floor })
9361
+ ] })
9362
+ ] })
9363
+ ]
9364
+ },
9365
+ resource.id
9366
+ );
9367
+ })
9368
+ ]
9369
+ }
9370
+ );
9371
+ }
9372
+ var STEP = {
9373
+ SELECT_SLOT: "select-slot",
9374
+ SELECT_RESOURCE: "select-resource",
9375
+ SELECT_STAFF: "select-staff",
9376
+ CONFIRM: "confirm"
9377
+ };
9261
9378
  function BookingPage({
9262
9379
  service,
9263
9380
  product,
9264
9381
  staff,
9382
+ resources,
9265
9383
  participantCount,
9266
9384
  title,
9267
9385
  onBooked,
@@ -9275,12 +9393,14 @@ function BookingPage({
9275
9393
  const { addItem } = useCart();
9276
9394
  const { client } = useCimplifyClient();
9277
9395
  const isReschedule = existingBooking !== void 0;
9278
- const [step, setStep] = useState("select-slot");
9396
+ const [step, setStep] = useState(STEP.SELECT_SLOT);
9279
9397
  const [selectedSlot, setSelectedSlot] = useState(null);
9280
9398
  const [selectedDate, setSelectedDate] = useState(null);
9281
9399
  const [selectedStaffId, setSelectedStaffId] = useState(null);
9400
+ const [selectedResourceId, setSelectedResourceId] = useState(null);
9282
9401
  const [isSubmitting, setIsSubmitting] = useState(false);
9283
9402
  const [error, setError] = useState(null);
9403
+ const hasResourceStep = resources && resources.length > 0;
9284
9404
  const hasStaffStep = staff && staff.length > 0;
9285
9405
  const depositType = product?.deposit_type;
9286
9406
  const depositAmount = product?.deposit_amount;
@@ -9292,28 +9412,45 @@ function BookingPage({
9292
9412
  setSelectedSlot(slot);
9293
9413
  setSelectedDate(date);
9294
9414
  setError(null);
9415
+ if (hasResourceStep) {
9416
+ setStep(STEP.SELECT_RESOURCE);
9417
+ } else if (hasStaffStep) {
9418
+ setStep(STEP.SELECT_STAFF);
9419
+ } else {
9420
+ setStep(STEP.CONFIRM);
9421
+ }
9422
+ },
9423
+ [hasResourceStep, hasStaffStep]
9424
+ );
9425
+ const handleResourceSelect = useCallback(
9426
+ (resourceId) => {
9427
+ setSelectedResourceId(resourceId);
9295
9428
  if (hasStaffStep) {
9296
- setStep("select-staff");
9429
+ setStep(STEP.SELECT_STAFF);
9297
9430
  } else {
9298
- setStep("confirm");
9431
+ setStep(STEP.CONFIRM);
9299
9432
  }
9300
9433
  },
9301
9434
  [hasStaffStep]
9302
9435
  );
9303
9436
  const handleStaffSelect = useCallback((staffId) => {
9304
9437
  setSelectedStaffId(staffId);
9305
- setStep("confirm");
9438
+ setStep(STEP.CONFIRM);
9306
9439
  }, []);
9307
9440
  const handleBack = useCallback(() => {
9308
9441
  setError(null);
9309
- if (step === "confirm" && hasStaffStep) {
9310
- setStep("select-staff");
9311
- } else if (step === "confirm" || step === "select-staff") {
9312
- setStep("select-slot");
9442
+ if (step === STEP.CONFIRM && hasStaffStep) {
9443
+ setStep(STEP.SELECT_STAFF);
9444
+ } else if (step === STEP.CONFIRM && hasResourceStep) {
9445
+ setStep(STEP.SELECT_RESOURCE);
9446
+ } else if (step === STEP.SELECT_STAFF && hasResourceStep) {
9447
+ setStep(STEP.SELECT_RESOURCE);
9448
+ } else if (step === STEP.CONFIRM || step === STEP.SELECT_STAFF || step === STEP.SELECT_RESOURCE) {
9449
+ setStep(STEP.SELECT_SLOT);
9313
9450
  } else {
9314
9451
  onBack?.();
9315
9452
  }
9316
- }, [step, hasStaffStep, onBack]);
9453
+ }, [step, hasStaffStep, hasResourceStep, onBack]);
9317
9454
  const handleConfirm = useCallback(async () => {
9318
9455
  if (!selectedSlot || !selectedDate) return;
9319
9456
  setIsSubmitting(true);
@@ -9353,7 +9490,8 @@ function BookingPage({
9353
9490
  await addItem(serviceProduct, 1, {
9354
9491
  scheduledStart: selectedSlot.start_time,
9355
9492
  scheduledEnd: selectedSlot.end_time,
9356
- staffId: selectedStaffId || void 0
9493
+ staffId: selectedStaffId || void 0,
9494
+ resourceId: selectedResourceId || void 0
9357
9495
  });
9358
9496
  onBooked?.(selectedSlot, selectedStaffId);
9359
9497
  }
@@ -9366,7 +9504,7 @@ function BookingPage({
9366
9504
  }, [selectedSlot, selectedDate, selectedStaffId, service, addItem, onBooked, isReschedule, existingBooking, client, onRescheduled]);
9367
9505
  return /* @__PURE__ */ jsxs("div", { "data-cimplify-booking-page": true, className: cn(className, classNames?.root), children: [
9368
9506
  /* @__PURE__ */ jsxs("div", { "data-cimplify-booking-page-header": true, className: classNames?.header, children: [
9369
- onBack && step === "select-slot" && /* @__PURE__ */ jsx(
9507
+ onBack && step === STEP.SELECT_SLOT && /* @__PURE__ */ jsx(
9370
9508
  "button",
9371
9509
  {
9372
9510
  type: "button",
@@ -9376,7 +9514,7 @@ function BookingPage({
9376
9514
  children: "Back"
9377
9515
  }
9378
9516
  ),
9379
- step !== "select-slot" && /* @__PURE__ */ jsx(
9517
+ step !== STEP.SELECT_SLOT && /* @__PURE__ */ jsx(
9380
9518
  "button",
9381
9519
  {
9382
9520
  type: "button",
@@ -9411,7 +9549,7 @@ function BookingPage({
9411
9549
  ] })
9412
9550
  ] }),
9413
9551
  error && /* @__PURE__ */ jsx("div", { "data-cimplify-booking-error": true, className: classNames?.error, children: error }),
9414
- step === "select-slot" && /* @__PURE__ */ jsxs("div", { "data-cimplify-booking-step": "select-slot", className: classNames?.step, children: [
9552
+ step === STEP.SELECT_SLOT && /* @__PURE__ */ jsxs("div", { "data-cimplify-booking-step": "select-slot", className: classNames?.step, children: [
9415
9553
  /* @__PURE__ */ jsx("h2", { "data-cimplify-booking-step-title": true, className: classNames?.stepTitle, children: "Select a date & time" }),
9416
9554
  /* @__PURE__ */ jsx(
9417
9555
  DateSlotPicker,
@@ -9424,7 +9562,18 @@ function BookingPage({
9424
9562
  }
9425
9563
  )
9426
9564
  ] }),
9427
- step === "select-staff" && staff && /* @__PURE__ */ jsxs("div", { "data-cimplify-booking-step": "select-staff", className: classNames?.step, children: [
9565
+ step === STEP.SELECT_RESOURCE && resources && /* @__PURE__ */ jsxs("div", { "data-cimplify-booking-step": "select-resource", className: cn(classNames?.step, classNames?.resourceStep), children: [
9566
+ /* @__PURE__ */ jsx("h2", { "data-cimplify-booking-step-title": true, className: classNames?.stepTitle, children: "Choose a room" }),
9567
+ /* @__PURE__ */ jsx(
9568
+ ResourcePicker,
9569
+ {
9570
+ resources,
9571
+ selectedResourceId,
9572
+ onResourceSelect: handleResourceSelect
9573
+ }
9574
+ )
9575
+ ] }),
9576
+ step === STEP.SELECT_STAFF && staff && /* @__PURE__ */ jsxs("div", { "data-cimplify-booking-step": "select-staff", className: classNames?.step, children: [
9428
9577
  /* @__PURE__ */ jsx("h2", { "data-cimplify-booking-step-title": true, className: classNames?.stepTitle, children: "Choose a provider" }),
9429
9578
  /* @__PURE__ */ jsx(
9430
9579
  StaffPicker,
@@ -9435,7 +9584,7 @@ function BookingPage({
9435
9584
  }
9436
9585
  )
9437
9586
  ] }),
9438
- step === "confirm" && selectedSlot && /* @__PURE__ */ jsxs("div", { "data-cimplify-booking-step": "confirm", className: classNames?.step, children: [
9587
+ step === STEP.CONFIRM && selectedSlot && /* @__PURE__ */ jsxs("div", { "data-cimplify-booking-step": "confirm", className: classNames?.step, children: [
9439
9588
  /* @__PURE__ */ jsx("h2", { "data-cimplify-booking-step-title": true, className: classNames?.stepTitle, children: "Confirm your booking" }),
9440
9589
  /* @__PURE__ */ jsxs("div", { "data-cimplify-booking-summary": true, className: classNames?.summary, children: [
9441
9590
  /* @__PURE__ */ jsxs("div", { "data-cimplify-booking-summary-row": true, className: classNames?.summaryRow, children: [
@@ -9457,6 +9606,10 @@ function BookingPage({
9457
9606
  /* @__PURE__ */ jsx("span", { children: "Duration" }),
9458
9607
  /* @__PURE__ */ jsx("span", { children: formatDuration2(service.duration_minutes, service.duration_unit) })
9459
9608
  ] }),
9609
+ selectedResourceId && resources && /* @__PURE__ */ jsxs("div", { "data-cimplify-booking-summary-row": true, className: classNames?.summaryRow, children: [
9610
+ /* @__PURE__ */ jsx("span", { children: "Room" }),
9611
+ /* @__PURE__ */ jsx("span", { children: resources.find((r) => r.id === selectedResourceId)?.name ?? "Selected" })
9612
+ ] }),
9460
9613
  selectedStaffId && staff && /* @__PURE__ */ jsxs("div", { "data-cimplify-booking-summary-row": true, className: classNames?.summaryRow, children: [
9461
9614
  /* @__PURE__ */ jsx("span", { children: "Provider" }),
9462
9615
  /* @__PURE__ */ jsx("span", { children: staff.find((s) => s.id === selectedStaffId)?.name ?? "Selected" })
@@ -10025,4 +10178,4 @@ function CurrencySelector({
10025
10178
  }) });
10026
10179
  }
10027
10180
 
10028
- export { Ad, AdProvider, AddOnSelector, AddressElement, AuthElement, AvailabilityBadge, BillingPlanSelector, BookingCard, BookingList, BookingPage, BookingsPage, BundleSelector, CartPage, CartSummary, CataloguePage, CategoryFilter, CategoryGrid, CheckoutPage, CimplifyCheckout, CimplifyProvider, CollectionPage, CompositeSelector, CurrencySelector, DateSlotPicker, DealBanner, DealsPage, DeliveryEstimate, DiscountInput, ElementsProvider, LocationPicker, OrderDetailPage, OrderHistory, OrderHistoryPage, OrderSummary, PaymentElement, Price, ProductCard, ProductCustomizer, ProductGrid, ProductImageGallery, ProductPage, ProductSheet, QuantitySelector, RecentlyViewed, RecommendationCarousel, SaleBadge, SearchInput, SearchPage, ServiceCard, ServiceGrid, SessionMessageBanner, SlotPicker, StaffPicker, StoreNav, VariantSelector, cn, useActivityState, useAds, useAttributeDefinitions, useAvailableSlots, useBillingPlans, useBookings, useBootstrap, useBundles, useCart, useCategories, useCheckout, useCimplify, useCimplifyClient, useCollection, useCollections, useDeals, useDeliveryFee, useElements, useElementsReady, useFxRate, useLocations, useOptionalCimplify, useOrder, useOrders, useProduct, useProductAvailability, useProductDeals, useProductPrice, useProductSchedules, useProducts, useProductsOnSale, usePropertyFacets, useQuote, useRecommendations, useSearch, useServiceAvailability, useServices, useTaxonomies, useTaxonomy, useTaxonomyPath, useValidateDiscount, useVariantSelector };
10181
+ export { Ad, AdProvider, AddOnSelector, AddressElement, AuthElement, AvailabilityBadge, BillingPlanSelector, BookingCard, BookingList, BookingPage, BookingsPage, BundleSelector, CartPage, CartSummary, CataloguePage, CategoryFilter, CategoryGrid, CheckoutPage, CimplifyCheckout, CimplifyProvider, CollectionPage, CompositeSelector, CurrencySelector, DateSlotPicker, DealBanner, DealsPage, DeliveryEstimate, DiscountInput, ElementsProvider, LocationPicker, OrderDetailPage, OrderHistory, OrderHistoryPage, OrderSummary, PaymentElement, Price, ProductCard, ProductCustomizer, ProductGrid, ProductImageGallery, ProductPage, ProductSheet, QuantitySelector, RecentlyViewed, RecommendationCarousel, ResourcePicker, SaleBadge, SearchInput, SearchPage, ServiceCard, ServiceGrid, SessionMessageBanner, SlotPicker, StaffPicker, StoreNav, VariantSelector, cn, roomToResource, useActivityState, useAds, useAttributeDefinitions, useAvailableSlots, useBillingPlans, useBookings, useBootstrap, useBundles, useCart, useCategories, useCheckout, useCimplify, useCimplifyClient, useCollection, useCollections, useDeals, useDeliveryFee, useElements, useElementsReady, useFxRate, useLocations, useOptionalCimplify, useOrder, useOrders, useProduct, useProductAvailability, useProductDeals, useProductPrice, useProductSchedules, useProducts, useProductsOnSale, usePropertyFacets, useQuote, useRecommendations, useSearch, useServiceAvailability, useServices, useTaxonomies, useTaxonomy, useTaxonomyPath, useValidateDiscount, useVariantSelector };
package/dist/styles.css CHANGED
@@ -1,2 +1,2 @@
1
1
  /*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */
2
- @layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.z-50{z-index:50}.container{width:100%}.-mt-px{margin-top:-1px}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.aspect-\[5\/2\]{aspect-ratio:5/2}.h-fit{height:fit-content}.max-h-\[85vh\]{max-height:85vh}.w-2\/5{width:40%}.w-3\/5{width:60%}.w-4\/5{width:80%}.w-full{width:100%}.flex-1{flex:1}.shrink-0{flex-shrink:0}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.cursor-pointer{cursor:pointer}.resize-none{resize:none}.\[appearance\:textfield\]{appearance:textfield}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-border>:not(:last-child)){border-color:var(--color-border,oklch(90% 0 0))}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.rounded{border-radius:var(--radius,.5rem)}.rounded-full{border-radius:3.40282e38px}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-none{--tw-border-style:none;border-style:none}.border-border{border-color:var(--color-border,oklch(90% 0 0))}.border-input{border-color:var(--color-input,oklch(90% 0 0))}.border-muted-foreground\/30{border-color:#6363634d}@supports (color:color-mix(in lab, red, red)){.border-muted-foreground\/30{border-color:color-mix(in oklab, var(--color-muted-foreground,oklch(50% 0 0)) 30%, transparent)}}.border-primary{border-color:var(--color-primary,oklch(50% .1 35))}.bg-background{background-color:var(--color-background,oklch(99% 0 0))}.bg-destructive\/10{background-color:#bb061e1a}@supports (color:color-mix(in lab, red, red)){.bg-destructive\/10{background-color:color-mix(in oklab, var(--color-destructive,oklch(50% .2 25)) 10%, transparent)}}.bg-muted{background-color:var(--color-muted,oklch(95% 0 0))}.bg-primary{background-color:var(--color-primary,oklch(50% .1 35))}.bg-primary\/10{background-color:#934c3a1a}@supports (color:color-mix(in lab, red, red)){.bg-primary\/10{background-color:color-mix(in oklab, var(--color-primary,oklch(50% .1 35)) 10%, transparent)}}.bg-transparent{background-color:#0000}.text-center{text-align:center}.text-left{text-align:left}.font-\[inherit\]{font-family:inherit}.text-\[10px\]{font-size:10px}.text-\[inherit\]{color:inherit}.text-destructive{color:var(--color-destructive,oklch(50% .2 25))}.text-foreground{color:var(--color-foreground,oklch(15% 0 0))}.text-muted-foreground{color:var(--color-muted-foreground,oklch(50% 0 0))}.text-muted-foreground\/60{color:#63636399}@supports (color:color-mix(in lab, red, red)){.text-muted-foreground\/60{color:color-mix(in oklab, var(--color-muted-foreground,oklch(50% 0 0)) 60%, transparent)}}.text-primary{color:var(--color-primary,oklch(50% .1 35))}.text-primary-foreground{color:var(--color-primary-foreground,oklch(99% 0 0))}.uppercase{text-transform:uppercase}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.no-underline{text-decoration-line:none}.underline{text-decoration-line:underline}.accent-primary{accent-color:var(--color-primary,oklch(50% .1 35))}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,ease);transition-duration:var(--tw-duration,0s)}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,ease);transition-duration:var(--tw-duration,0s)}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,ease);transition-duration:var(--tw-duration,0s)}.outline-none{--tw-outline-style:none;outline-style:none}.\[cimplify\:checkout\]{cimplify:checkout}.placeholder\:text-muted-foreground::placeholder{color:var(--color-muted-foreground,oklch(50% 0 0))}@media (hover:hover){.hover\:border-primary\/50:hover{border-color:#934c3a80}@supports (color:color-mix(in lab, red, red)){.hover\:border-primary\/50:hover{border-color:color-mix(in oklab, var(--color-primary,oklch(50% .1 35)) 50%, transparent)}}.hover\:bg-muted:hover{background-color:var(--color-muted,oklch(95% 0 0))}.hover\:bg-primary\/90:hover{background-color:#934c3ae6}@supports (color:color-mix(in lab, red, red)){.hover\:bg-primary\/90:hover{background-color:color-mix(in oklab, var(--color-primary,oklch(50% .1 35)) 90%, transparent)}}.hover\:text-primary:hover{color:var(--color-primary,oklch(50% .1 35))}}.focus\:ring-1:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus\:ring-ring:focus{--tw-ring-color:var(--color-ring,oklch(50% .1 35))}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-30:disabled{opacity:.3}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}.\[\&\:\:-webkit-inner-spin-button\]\:appearance-none::-webkit-inner-spin-button{appearance:none}.\[\&\:\:-webkit-outer-spin-button\]\:appearance-none::-webkit-outer-spin-button{appearance:none}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}
2
+ @layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.z-50{z-index:50}.container{width:100%}.-mt-px{margin-top:-1px}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.aspect-\[5\/2\]{aspect-ratio:5/2}.h-fit{height:fit-content}.h-full{height:100%}.max-h-\[85vh\]{max-height:85vh}.w-2\/5{width:40%}.w-3\/5{width:60%}.w-4\/5{width:80%}.w-full{width:100%}.flex-1{flex:1}.shrink-0{flex-shrink:0}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.resize-none{resize:none}.\[appearance\:textfield\]{appearance:textfield}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-border>:not(:last-child)){border-color:var(--color-border,oklch(90% 0 0))}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.rounded{border-radius:var(--radius,.5rem)}.rounded-full{border-radius:3.40282e38px}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-none{--tw-border-style:none;border-style:none}.border-border{border-color:var(--color-border,oklch(90% 0 0))}.border-input{border-color:var(--color-input,oklch(90% 0 0))}.border-muted-foreground\/30{border-color:#6363634d}@supports (color:color-mix(in lab, red, red)){.border-muted-foreground\/30{border-color:color-mix(in oklab, var(--color-muted-foreground,oklch(50% 0 0)) 30%, transparent)}}.border-primary{border-color:var(--color-primary,oklch(50% .1 35))}.bg-background{background-color:var(--color-background,oklch(99% 0 0))}.bg-destructive\/10{background-color:#bb061e1a}@supports (color:color-mix(in lab, red, red)){.bg-destructive\/10{background-color:color-mix(in oklab, var(--color-destructive,oklch(50% .2 25)) 10%, transparent)}}.bg-muted{background-color:var(--color-muted,oklch(95% 0 0))}.bg-primary{background-color:var(--color-primary,oklch(50% .1 35))}.bg-primary\/10{background-color:#934c3a1a}@supports (color:color-mix(in lab, red, red)){.bg-primary\/10{background-color:color-mix(in oklab, var(--color-primary,oklch(50% .1 35)) 10%, transparent)}}.bg-transparent{background-color:#0000}.object-cover{object-fit:cover}.text-center{text-align:center}.text-left{text-align:left}.font-\[inherit\]{font-family:inherit}.text-\[10px\]{font-size:10px}.text-\[inherit\]{color:inherit}.text-destructive{color:var(--color-destructive,oklch(50% .2 25))}.text-foreground{color:var(--color-foreground,oklch(15% 0 0))}.text-muted-foreground{color:var(--color-muted-foreground,oklch(50% 0 0))}.text-muted-foreground\/60{color:#63636399}@supports (color:color-mix(in lab, red, red)){.text-muted-foreground\/60{color:color-mix(in oklab, var(--color-muted-foreground,oklch(50% 0 0)) 60%, transparent)}}.text-primary{color:var(--color-primary,oklch(50% .1 35))}.text-primary-foreground{color:var(--color-primary-foreground,oklch(99% 0 0))}.uppercase{text-transform:uppercase}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.no-underline{text-decoration-line:none}.underline{text-decoration-line:underline}.accent-primary{accent-color:var(--color-primary,oklch(50% .1 35))}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,ease);transition-duration:var(--tw-duration,0s)}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,ease);transition-duration:var(--tw-duration,0s)}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,ease);transition-duration:var(--tw-duration,0s)}.transition-shadow{transition-property:box-shadow;transition-timing-function:var(--tw-ease,ease);transition-duration:var(--tw-duration,0s)}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,ease);transition-duration:var(--tw-duration,0s)}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.outline-none{--tw-outline-style:none;outline-style:none}.\[cimplify\:checkout\]{cimplify:checkout}@media (hover:hover){.group-hover\:scale-105:is(:where(.group):hover *){--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x) var(--tw-scale-y)}}.placeholder\:text-muted-foreground::placeholder{color:var(--color-muted-foreground,oklch(50% 0 0))}@media (hover:hover){.hover\:border-primary\/50:hover{border-color:#934c3a80}@supports (color:color-mix(in lab, red, red)){.hover\:border-primary\/50:hover{border-color:color-mix(in oklab, var(--color-primary,oklch(50% .1 35)) 50%, transparent)}}.hover\:bg-destructive\/10:hover{background-color:#bb061e1a}@supports (color:color-mix(in lab, red, red)){.hover\:bg-destructive\/10:hover{background-color:color-mix(in oklab, var(--color-destructive,oklch(50% .2 25)) 10%, transparent)}}.hover\:bg-muted:hover{background-color:var(--color-muted,oklch(95% 0 0))}.hover\:bg-primary\/90:hover{background-color:#934c3ae6}@supports (color:color-mix(in lab, red, red)){.hover\:bg-primary\/90:hover{background-color:color-mix(in oklab, var(--color-primary,oklch(50% .1 35)) 90%, transparent)}}.hover\:text-primary:hover{color:var(--color-primary,oklch(50% .1 35))}}.focus\:ring-1:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus\:ring-ring:focus{--tw-ring-color:var(--color-ring,oklch(50% .1 35))}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-30:disabled{opacity:.3}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}.data-\[checked\]\:border-primary[data-checked]{border-color:var(--color-primary,oklch(50% .1 35))}.data-\[checked\]\:bg-primary\/5[data-checked]{background-color:#934c3a0d}@supports (color:color-mix(in lab, red, red)){.data-\[checked\]\:bg-primary\/5[data-checked]{background-color:color-mix(in oklab, var(--color-primary,oklch(50% .1 35)) 5%, transparent)}}.\[\&\:\:-webkit-inner-spin-button\]\:appearance-none::-webkit-inner-spin-button{appearance:none}.\[\&\:\:-webkit-outer-spin-button\]\:appearance-none::-webkit-outer-spin-button{appearance:none}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}
package/dist/utils.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { M as Money, a as CurrencyCode, aS as PricePathTaxInfo, bD as PaymentErrorDetails, bB as PaymentResponse, bC as PaymentStatusResponse } from './payment-CKqMU4xT.mjs';
2
- import { P as ProductWithPrice } from './price-BqV_DjjQ.mjs';
1
+ import { M as Money, a as CurrencyCode, aS as PricePathTaxInfo, bD as PaymentErrorDetails, bB as PaymentResponse, bC as PaymentStatusResponse } from './payment-DazihbCY.mjs';
2
+ import { P as ProductWithPrice } from './price-BcHVTqqu.mjs';
3
3
  import { CountryCode } from 'libphonenumber-js';
4
4
 
5
5
  declare const CURRENCY_SYMBOLS: Record<string, string>;
package/dist/utils.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { M as Money, a as CurrencyCode, aS as PricePathTaxInfo, bD as PaymentErrorDetails, bB as PaymentResponse, bC as PaymentStatusResponse } from './payment-CKqMU4xT.js';
2
- import { P as ProductWithPrice } from './price-e4beObLZ.js';
1
+ import { M as Money, a as CurrencyCode, aS as PricePathTaxInfo, bD as PaymentErrorDetails, bB as PaymentResponse, bC as PaymentStatusResponse } from './payment-DazihbCY.js';
2
+ import { P as ProductWithPrice } from './price-5_L8WK6Q.js';
3
3
  import { CountryCode } from 'libphonenumber-js';
4
4
 
5
5
  declare const CURRENCY_SYMBOLS: Record<string, string>;