@cimplify/sdk 0.22.5 → 0.23.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
@@ -1,8 +1,8 @@
1
1
  "use client";
2
- import { getVariantDisplayName, createCimplifyClient } from './chunk-Y2BD2XFJ.mjs';
3
- export { getVariantDisplayName } from './chunk-Y2BD2XFJ.mjs';
4
- import { ELEMENT_TYPES, EVENT_TYPES } from './chunk-DNN5VN64.mjs';
5
- import { isSupportedCurrency, formatPrice, parsePrice, isOnSale, getDiscountPercentage, getBasePrice } from './chunk-4Z74TIJP.mjs';
2
+ import { getVariantDisplayName, createCimplifyClient } from './chunk-3GSXQNWV.mjs';
3
+ export { getVariantDisplayName } from './chunk-3GSXQNWV.mjs';
4
+ import { ELEMENT_TYPES, EVENT_TYPES } from './chunk-BYQPMSH2.mjs';
5
+ import { isSupportedCurrency, formatPrice, parsePrice, getUnitPriceAtQuantity, isOnSale, getDiscountPercentage, getBasePrice, getPriceRange, formatPriceRange } from './chunk-OANVYH27.mjs';
6
6
  import React3, { createContext, useRef, useState, useCallback, useEffect, useContext, useMemo, useSyncExternalStore, useId } from 'react';
7
7
  import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
8
8
  import { NumberField } from '@base-ui/react/number-field';
@@ -4486,6 +4486,195 @@ function CompositeSelector({
4486
4486
  )
4487
4487
  ] });
4488
4488
  }
4489
+ var FREQUENCY_LABELS = {
4490
+ weekly: "Weekly",
4491
+ monthly: "Monthly",
4492
+ quarterly: "Quarterly",
4493
+ annually: "Annually"
4494
+ };
4495
+ function formatMarkup(plan) {
4496
+ if (!plan.markup_type || plan.markup_amount == null) return null;
4497
+ if (plan.markup_type === "percentage") return `+${plan.markup_amount}%`;
4498
+ return null;
4499
+ }
4500
+ function BillingPlanSelector({
4501
+ productId,
4502
+ plans: plansProp,
4503
+ onPlanSelect,
4504
+ selectedPlanId,
4505
+ showOneTimePurchase = false,
4506
+ oneTimePurchaseLabel = "One-time purchase",
4507
+ renderPlan,
4508
+ className,
4509
+ classNames
4510
+ }) {
4511
+ const { plans: fetched, isLoading } = useBillingPlans(productId, {
4512
+ enabled: plansProp === void 0
4513
+ });
4514
+ const plans = plansProp ?? fetched;
4515
+ if (isLoading && plans.length === 0) {
4516
+ return /* @__PURE__ */ jsx(
4517
+ "div",
4518
+ {
4519
+ "data-cimplify-billing-plan-selector": true,
4520
+ "aria-busy": "true",
4521
+ className: cn(className, classNames?.root, classNames?.loading)
4522
+ }
4523
+ );
4524
+ }
4525
+ if (plans.length === 0 && !showOneTimePurchase) {
4526
+ return null;
4527
+ }
4528
+ const isOneTimePurchaseSelected = selectedPlanId === null;
4529
+ return /* @__PURE__ */ jsxs("div", { "data-cimplify-billing-plan-selector": true, className: cn(className, classNames?.root), children: [
4530
+ showOneTimePurchase && /* @__PURE__ */ jsx(
4531
+ "button",
4532
+ {
4533
+ type: "button",
4534
+ onClick: () => onPlanSelect?.(null),
4535
+ "data-cimplify-billing-plan": true,
4536
+ "data-plan-type": "one-time",
4537
+ "data-active": isOneTimePurchaseSelected || void 0,
4538
+ "aria-pressed": isOneTimePurchaseSelected,
4539
+ className: cn(
4540
+ classNames?.plan,
4541
+ isOneTimePurchaseSelected && classNames?.activePlan
4542
+ ),
4543
+ children: /* @__PURE__ */ jsx("span", { "data-cimplify-billing-frequency": true, className: classNames?.frequency, children: oneTimePurchaseLabel })
4544
+ }
4545
+ ),
4546
+ plans.map((plan) => {
4547
+ const isActive = selectedPlanId === plan.id;
4548
+ const markup = formatMarkup(plan);
4549
+ return /* @__PURE__ */ jsx(
4550
+ "button",
4551
+ {
4552
+ type: "button",
4553
+ onClick: () => onPlanSelect?.(plan),
4554
+ "data-cimplify-billing-plan": true,
4555
+ "data-plan-type": plan.plan_type,
4556
+ "data-active": isActive || void 0,
4557
+ "aria-pressed": isActive,
4558
+ className: cn(classNames?.plan, isActive && classNames?.activePlan),
4559
+ children: renderPlan ? renderPlan(plan, isActive) : /* @__PURE__ */ jsxs(Fragment, { children: [
4560
+ /* @__PURE__ */ jsx("span", { "data-cimplify-billing-frequency": true, className: classNames?.frequency, children: FREQUENCY_LABELS[plan.frequency] }),
4561
+ markup && /* @__PURE__ */ jsx("span", { "data-cimplify-billing-markup": true, className: classNames?.price, children: markup }),
4562
+ plan.markup_type === "fixed" && plan.markup_amount != null && /* @__PURE__ */ jsxs("span", { "data-cimplify-billing-markup": true, className: classNames?.price, children: [
4563
+ "+",
4564
+ /* @__PURE__ */ jsx(Price, { amount: plan.markup_amount })
4565
+ ] }),
4566
+ plan.trial_days > 0 && /* @__PURE__ */ jsxs("span", { "data-cimplify-billing-trial": true, className: classNames?.trialBadge, children: [
4567
+ plan.trial_days,
4568
+ "-day trial"
4569
+ ] }),
4570
+ plan.setup_fee > 0 && /* @__PURE__ */ jsxs("span", { "data-cimplify-billing-setup-fee": true, className: classNames?.setupFee, children: [
4571
+ "Setup fee: ",
4572
+ /* @__PURE__ */ jsx(Price, { amount: plan.setup_fee })
4573
+ ] }),
4574
+ plan.plan_type === "installment" && plan.installment_periods != null && /* @__PURE__ */ jsxs("span", { "data-cimplify-billing-periods": true, children: [
4575
+ plan.installment_periods,
4576
+ " payments"
4577
+ ] })
4578
+ ] })
4579
+ },
4580
+ plan.id
4581
+ );
4582
+ })
4583
+ ] });
4584
+ }
4585
+ function formatRange(tier) {
4586
+ if (tier.max_quantity != null) {
4587
+ return `${tier.min_quantity}\u2013${tier.max_quantity} units`;
4588
+ }
4589
+ return `${tier.min_quantity}+ units`;
4590
+ }
4591
+ function isActiveTier(tier, quantity) {
4592
+ if (quantity < tier.min_quantity) return false;
4593
+ if (tier.max_quantity != null && quantity > tier.max_quantity) return false;
4594
+ return true;
4595
+ }
4596
+ function VolumePricing({
4597
+ tiers,
4598
+ currentQuantity,
4599
+ defaultOpen = false,
4600
+ className,
4601
+ classNames
4602
+ }) {
4603
+ if (tiers.length < 2) return null;
4604
+ const sorted = [...tiers].sort((a, b) => a.min_quantity - b.min_quantity);
4605
+ return /* @__PURE__ */ jsxs(
4606
+ "details",
4607
+ {
4608
+ open: defaultOpen || void 0,
4609
+ "data-cimplify-volume-pricing": true,
4610
+ className: cn("border border-border", className, classNames?.root),
4611
+ children: [
4612
+ /* @__PURE__ */ jsxs(
4613
+ "summary",
4614
+ {
4615
+ "data-cimplify-volume-pricing-trigger": true,
4616
+ className: cn(
4617
+ "flex items-center justify-between px-4 py-3 cursor-pointer select-none text-sm font-medium list-none [&::-webkit-details-marker]:hidden",
4618
+ classNames?.trigger
4619
+ ),
4620
+ children: [
4621
+ "Volume pricing",
4622
+ /* @__PURE__ */ jsx(
4623
+ "svg",
4624
+ {
4625
+ viewBox: "0 0 12 12",
4626
+ fill: "none",
4627
+ "aria-hidden": "true",
4628
+ className: cn(
4629
+ "w-3.5 h-3.5 text-muted-foreground transition-transform [[open]>&]:rotate-180",
4630
+ classNames?.triggerIcon
4631
+ ),
4632
+ children: /* @__PURE__ */ jsx("path", { d: "M2 4.5l4 4 4-4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
4633
+ }
4634
+ )
4635
+ ]
4636
+ }
4637
+ ),
4638
+ /* @__PURE__ */ jsx(
4639
+ "div",
4640
+ {
4641
+ "data-cimplify-volume-pricing-panel": true,
4642
+ className: cn("border-t border-border divide-y divide-border", classNames?.panel),
4643
+ children: sorted.map((tier, i) => {
4644
+ const active = currentQuantity != null && isActiveTier(tier, currentQuantity);
4645
+ return /* @__PURE__ */ jsxs(
4646
+ "div",
4647
+ {
4648
+ "data-cimplify-volume-pricing-tier": true,
4649
+ "data-active": active || void 0,
4650
+ className: cn(
4651
+ "flex items-center justify-between px-4 py-2.5 text-sm",
4652
+ active ? cn("bg-primary/5 font-medium", classNames?.tierActive) : classNames?.tier
4653
+ ),
4654
+ children: [
4655
+ /* @__PURE__ */ jsx(
4656
+ "span",
4657
+ {
4658
+ "data-cimplify-volume-pricing-range": true,
4659
+ className: cn("text-muted-foreground", classNames?.tierRange),
4660
+ children: formatRange(tier)
4661
+ }
4662
+ ),
4663
+ /* @__PURE__ */ jsxs("span", { "data-cimplify-volume-pricing-price": true, className: classNames?.tierPrice, children: [
4664
+ /* @__PURE__ */ jsx(Price, { amount: tier.unit_price, prefix: "" }),
4665
+ " /ea"
4666
+ ] })
4667
+ ]
4668
+ },
4669
+ i
4670
+ );
4671
+ })
4672
+ }
4673
+ )
4674
+ ]
4675
+ }
4676
+ );
4677
+ }
4489
4678
  function ProductCustomizer({
4490
4679
  product,
4491
4680
  onAddToCart,
@@ -4493,7 +4682,7 @@ function ProductCustomizer({
4493
4682
  className,
4494
4683
  classNames
4495
4684
  }) {
4496
- const [quantity, setQuantity] = useState(1);
4685
+ const [quantity, setQuantity] = useState(product.min_order_quantity ?? 1);
4497
4686
  const [isAdded, setIsAdded] = useState(false);
4498
4687
  const [isSubmitting, setIsSubmitting] = useState(false);
4499
4688
  const [selectedVariantId, setSelectedVariantId] = useState();
@@ -4505,6 +4694,7 @@ function ProductCustomizer({
4505
4694
  const [bundleSelections, setBundleSelections] = useState([]);
4506
4695
  const [bundleTotalPrice, setBundleTotalPrice] = useState(null);
4507
4696
  const [bundleReady, setBundleReady] = useState(false);
4697
+ const [selectedBillingPlan, setSelectedBillingPlan] = useState(null);
4508
4698
  const [specialInstructions, setSpecialInstructions] = useState("");
4509
4699
  const cart = useCart();
4510
4700
  const productType = product.type || "product";
@@ -4516,7 +4706,7 @@ function ProductCustomizer({
4516
4706
  const hasVariants = isStandard && product.variants && product.variants.length > 0;
4517
4707
  const hasAddOns = isStandard && product.add_ons && product.add_ons.length > 0;
4518
4708
  useEffect(() => {
4519
- setQuantity(1);
4709
+ setQuantity(product.min_order_quantity ?? 1);
4520
4710
  setIsAdded(false);
4521
4711
  setIsSubmitting(false);
4522
4712
  setSelectedVariantId(void 0);
@@ -4528,8 +4718,9 @@ function ProductCustomizer({
4528
4718
  setBundleSelections([]);
4529
4719
  setBundleTotalPrice(null);
4530
4720
  setBundleReady(false);
4721
+ setSelectedBillingPlan(null);
4531
4722
  setSpecialInstructions("");
4532
- }, [product.id]);
4723
+ }, [product.id, product.min_order_quantity]);
4533
4724
  const selectedAddOnOptions = useMemo(() => {
4534
4725
  if (!product.add_ons) return [];
4535
4726
  const options = [];
@@ -4626,6 +4817,7 @@ function ProductCustomizer({
4626
4817
  })) : void 0,
4627
4818
  compositeSelections: isComposite && compositeSelections.length > 0 ? compositeSelections : void 0,
4628
4819
  bundleSelections: isBundle && bundleSelections.length > 0 ? bundleSelections : void 0,
4820
+ billingPlanId: selectedBillingPlan?.id,
4629
4821
  specialInstructions: specialInstructions.trim() || void 0
4630
4822
  };
4631
4823
  try {
@@ -4687,6 +4879,23 @@ function ProductCustomizer({
4687
4879
  onOptionsChange: setSelectedAddOnOptionIds
4688
4880
  }
4689
4881
  ),
4882
+ product.billing_plans && product.billing_plans.length > 0 && /* @__PURE__ */ jsx(
4883
+ BillingPlanSelector,
4884
+ {
4885
+ productId: product.id,
4886
+ plans: product.billing_plans,
4887
+ onPlanSelect: setSelectedBillingPlan,
4888
+ selectedPlanId: selectedBillingPlan?.id ?? null,
4889
+ showOneTimePurchase: true
4890
+ }
4891
+ ),
4892
+ product.quantity_pricing && product.quantity_pricing.length > 1 && /* @__PURE__ */ jsx(
4893
+ VolumePricing,
4894
+ {
4895
+ tiers: product.quantity_pricing,
4896
+ currentQuantity: quantity
4897
+ }
4898
+ ),
4690
4899
  product.deposit_type && product.deposit_type !== "none" && product.deposit_amount && /* @__PURE__ */ jsx("div", { "data-cimplify-customizer-deposit": true, className: cn("text-sm text-muted-foreground", classNames?.depositInfo), children: product.deposit_type === "fixed" ? /* @__PURE__ */ jsxs("span", { children: [
4691
4900
  "Deposit required: ",
4692
4901
  /* @__PURE__ */ jsx(Price, { amount: product.deposit_amount })
@@ -4740,14 +4949,24 @@ function ProductCustomizer({
4740
4949
  }
4741
4950
  ),
4742
4951
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-4", children: [
4743
- /* @__PURE__ */ jsx(
4744
- QuantitySelector,
4745
- {
4746
- value: quantity,
4747
- onChange: setQuantity,
4748
- min: 1
4749
- }
4750
- ),
4952
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1", children: [
4953
+ /* @__PURE__ */ jsx(
4954
+ QuantitySelector,
4955
+ {
4956
+ value: quantity,
4957
+ onChange: setQuantity,
4958
+ min: product.min_order_quantity ?? 1
4959
+ }
4960
+ ),
4961
+ product.min_order_quantity && product.min_order_quantity > 1 && /* @__PURE__ */ jsxs("span", { "data-cimplify-customizer-min-hint": true, className: "text-xs text-muted-foreground text-center", children: [
4962
+ "Min. ",
4963
+ product.min_order_quantity
4964
+ ] })
4965
+ ] }),
4966
+ product.quantity_pricing && product.quantity_pricing.length > 0 && /* @__PURE__ */ jsxs("div", { "data-cimplify-customizer-unit-price": true, className: "text-sm text-muted-foreground text-right shrink-0", children: [
4967
+ /* @__PURE__ */ jsx(Price, { amount: getUnitPriceAtQuantity(product.quantity_pricing, quantity, parsePrice(product.default_price)), className: "font-medium text-foreground" }),
4968
+ " ea."
4969
+ ] }),
4751
4970
  /* @__PURE__ */ jsx(
4752
4971
  Button,
4753
4972
  {
@@ -8351,101 +8570,11 @@ function RecentlyViewed({
8351
8570
  product.product_id
8352
8571
  )) });
8353
8572
  }
8354
- var FREQUENCY_LABELS = {
8355
- weekly: "Weekly",
8356
- monthly: "Monthly",
8357
- quarterly: "Quarterly",
8358
- annually: "Annually"
8359
- };
8360
- function formatMarkup(plan) {
8361
- if (!plan.markup_type || plan.markup_amount == null) return null;
8362
- if (plan.markup_type === "percentage") return `+${plan.markup_amount}%`;
8363
- return null;
8364
- }
8365
- function BillingPlanSelector({
8366
- productId,
8367
- plans: plansProp,
8368
- onPlanSelect,
8369
- selectedPlanId,
8370
- showOneTimePurchase = false,
8371
- oneTimePurchaseLabel = "One-time purchase",
8372
- renderPlan,
8373
- className,
8374
- classNames
8375
- }) {
8376
- const { plans: fetched, isLoading } = useBillingPlans(productId, {
8377
- enabled: plansProp === void 0
8378
- });
8379
- const plans = plansProp ?? fetched;
8380
- if (isLoading && plans.length === 0) {
8381
- return /* @__PURE__ */ jsx(
8382
- "div",
8383
- {
8384
- "data-cimplify-billing-plan-selector": true,
8385
- "aria-busy": "true",
8386
- className: cn(className, classNames?.root, classNames?.loading)
8387
- }
8388
- );
8389
- }
8390
- if (plans.length === 0 && !showOneTimePurchase) {
8391
- return null;
8392
- }
8393
- const isOneTimePurchaseSelected = selectedPlanId === null;
8394
- return /* @__PURE__ */ jsxs("div", { "data-cimplify-billing-plan-selector": true, className: cn(className, classNames?.root), children: [
8395
- showOneTimePurchase && /* @__PURE__ */ jsx(
8396
- "button",
8397
- {
8398
- type: "button",
8399
- onClick: () => onPlanSelect?.(null),
8400
- "data-cimplify-billing-plan": true,
8401
- "data-plan-type": "one-time",
8402
- "data-active": isOneTimePurchaseSelected || void 0,
8403
- "aria-pressed": isOneTimePurchaseSelected,
8404
- className: cn(
8405
- classNames?.plan,
8406
- isOneTimePurchaseSelected && classNames?.activePlan
8407
- ),
8408
- children: /* @__PURE__ */ jsx("span", { "data-cimplify-billing-frequency": true, className: classNames?.frequency, children: oneTimePurchaseLabel })
8409
- }
8410
- ),
8411
- plans.map((plan) => {
8412
- const isActive = selectedPlanId === plan.id;
8413
- const markup = formatMarkup(plan);
8414
- return /* @__PURE__ */ jsx(
8415
- "button",
8416
- {
8417
- type: "button",
8418
- onClick: () => onPlanSelect?.(plan),
8419
- "data-cimplify-billing-plan": true,
8420
- "data-plan-type": plan.plan_type,
8421
- "data-active": isActive || void 0,
8422
- "aria-pressed": isActive,
8423
- className: cn(classNames?.plan, isActive && classNames?.activePlan),
8424
- children: renderPlan ? renderPlan(plan, isActive) : /* @__PURE__ */ jsxs(Fragment, { children: [
8425
- /* @__PURE__ */ jsx("span", { "data-cimplify-billing-frequency": true, className: classNames?.frequency, children: FREQUENCY_LABELS[plan.frequency] }),
8426
- markup && /* @__PURE__ */ jsx("span", { "data-cimplify-billing-markup": true, className: classNames?.price, children: markup }),
8427
- plan.markup_type === "fixed" && plan.markup_amount != null && /* @__PURE__ */ jsxs("span", { "data-cimplify-billing-markup": true, className: classNames?.price, children: [
8428
- "+",
8429
- /* @__PURE__ */ jsx(Price, { amount: plan.markup_amount })
8430
- ] }),
8431
- plan.trial_days > 0 && /* @__PURE__ */ jsxs("span", { "data-cimplify-billing-trial": true, className: classNames?.trialBadge, children: [
8432
- plan.trial_days,
8433
- "-day trial"
8434
- ] }),
8435
- plan.setup_fee > 0 && /* @__PURE__ */ jsxs("span", { "data-cimplify-billing-setup-fee": true, className: classNames?.setupFee, children: [
8436
- "Setup fee: ",
8437
- /* @__PURE__ */ jsx(Price, { amount: plan.setup_fee })
8438
- ] }),
8439
- plan.plan_type === "installment" && plan.installment_periods != null && /* @__PURE__ */ jsxs("span", { "data-cimplify-billing-periods": true, children: [
8440
- plan.installment_periods,
8441
- " payments"
8442
- ] })
8443
- ] })
8444
- },
8445
- plan.id
8446
- );
8447
- })
8448
- ] });
8573
+ function PriceRange({ product, className }) {
8574
+ const { displayCurrency } = useCimplify();
8575
+ const range = getPriceRange(product);
8576
+ if (!range) return null;
8577
+ return /* @__PURE__ */ jsx("span", { "data-cimplify-price-range": true, className, children: formatPriceRange(range.min, range.max, displayCurrency) });
8449
8578
  }
8450
8579
  function DeliveryEstimate({
8451
8580
  latitude,
@@ -8594,4 +8723,4 @@ function CurrencySelector({
8594
8723
  }) });
8595
8724
  }
8596
8725
 
8597
- 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 };
8726
+ 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, PriceRange, ProductCard, ProductCustomizer, ProductGrid, ProductImageGallery, ProductPage, ProductSheet, QuantitySelector, RecentlyViewed, RecommendationCarousel, ResourcePicker, SaleBadge, SearchInput, SearchPage, ServiceCard, ServiceGrid, SessionMessageBanner, SlotPicker, StaffPicker, StoreNav, VariantSelector, VolumePricing, 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-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}
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}.list-none{list-style-type: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\/5{background-color:#934c3a0d}@supports (color:color-mix(in lab, red, red)){.bg-primary\/5{background-color:color-mix(in oklab, var(--color-primary,oklch(50% .1 35)) 5%, transparent)}}.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}.text-right{text-align:right}.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}.select-none{-webkit-user-select:none;user-select: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-details-marker\]\:hidden::-webkit-details-marker{display:none}.\[\&\:\:-webkit-inner-spin-button\]\:appearance-none::-webkit-inner-spin-button{appearance:none}.\[\&\:\:-webkit-outer-spin-button\]\:appearance-none::-webkit-outer-spin-button{appearance:none}[open]>.\[\[open\]\>\&\]\:rotate-180{rotate:180deg}@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,64 +1,4 @@
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
- import { CountryCode } from 'libphonenumber-js';
4
-
5
- declare const CURRENCY_SYMBOLS: Record<string, string>;
6
- declare function getCurrencySymbol(currencyCode: CurrencyCode): string;
7
- declare function formatNumberCompact(value: number, decimals?: number): string;
8
- declare function formatPrice(amount: number | Money, currency?: CurrencyCode, locale?: string): string;
9
- declare function formatPriceAdjustment(amount: number, currency?: CurrencyCode, locale?: string): string;
10
- declare function formatPriceCompact(amount: number | Money, currency?: CurrencyCode, decimals?: number): string;
11
- declare function formatMoney(amount: Money | number, currency?: CurrencyCode): string;
12
- declare function parsePrice(value: Money | string | number | undefined | null): number;
13
- declare function hasTaxInfo(priceInfo: {
14
- tax_info?: PricePathTaxInfo;
15
- }): boolean;
16
- declare function getTaxAmount(priceInfo: {
17
- tax_info?: PricePathTaxInfo;
18
- }): number;
19
- declare function isTaxInclusive(priceInfo: {
20
- tax_info?: PricePathTaxInfo;
21
- }): boolean;
22
- declare function formatPriceWithTax(priceInfo: {
23
- final_price: Money;
24
- tax_info?: PricePathTaxInfo;
25
- }, currency?: CurrencyCode): string;
26
- declare function getDisplayPrice(product: ProductWithPrice): number;
27
- declare function getBasePrice(product: ProductWithPrice): number;
28
- declare function isOnSale(product: ProductWithPrice): boolean;
29
- declare function getDiscountPercentage(product: ProductWithPrice): number;
30
- declare function getMarkupPercentage(product: ProductWithPrice): number;
31
- declare function getProductCurrency(product: ProductWithPrice): CurrencyCode;
32
- declare function formatProductPrice(product: ProductWithPrice, locale?: string): string;
33
-
34
- declare function categorizePaymentError(error: Error, errorCode?: string): PaymentErrorDetails;
35
- declare function normalizePaymentResponse(response: unknown): PaymentResponse;
36
- declare function isPaymentStatusSuccess(status: string | undefined): boolean;
37
- declare function isPaymentStatusFailure(status: string | undefined): boolean;
38
- declare function isPaymentStatusRequiresAction(status: string | undefined): boolean;
39
- declare function normalizeStatusResponse(response: unknown): PaymentStatusResponse;
40
- declare const MOBILE_MONEY_PROVIDERS: {
41
- readonly mtn: {
42
- readonly name: "MTN Mobile Money";
43
- readonly prefix: readonly ["024", "025", "053", "054", "055", "059"];
44
- };
45
- readonly vodafone: {
46
- readonly name: "Telecel Cash";
47
- readonly prefix: readonly ["020", "050"];
48
- };
49
- readonly airtel: {
50
- readonly name: "AirtelTigo Money";
51
- readonly prefix: readonly ["026", "027", "056", "057"];
52
- };
53
- };
54
- declare function detectMobileMoneyProvider(phoneNumber: string): "mtn" | "vodafone" | "airtel" | null;
55
-
56
- interface PhoneNormalizationOptions {
57
- country?: string | null;
58
- currency?: string | null;
59
- }
60
- declare function resolvePhoneCountryCode(options?: PhoneNormalizationOptions): CountryCode | undefined;
61
- declare function normalizePhoneToE164(raw: string, options?: PhoneNormalizationOptions): string | null;
62
- declare function isValidPhoneForContext(raw: string, options?: PhoneNormalizationOptions): boolean;
63
-
64
- export { CURRENCY_SYMBOLS, MOBILE_MONEY_PROVIDERS, categorizePaymentError, detectMobileMoneyProvider, formatMoney, formatNumberCompact, formatPrice, formatPriceAdjustment, formatPriceCompact, formatPriceWithTax, formatProductPrice, getBasePrice, getCurrencySymbol, getDiscountPercentage, getDisplayPrice, getMarkupPercentage, getProductCurrency, getTaxAmount, hasTaxInfo, isOnSale, isPaymentStatusFailure, isPaymentStatusRequiresAction, isPaymentStatusSuccess, isTaxInclusive, isValidPhoneForContext, normalizePaymentResponse, normalizePhoneToE164, normalizeStatusResponse, parsePrice, resolvePhoneCountryCode };
1
+ export { C as CURRENCY_SYMBOLS, M as MOBILE_MONEY_PROVIDERS, v as categorizePaymentError, B as detectMobileMoneyProvider, c as formatMoney, d as formatNumberCompact, f as formatPrice, a as formatPriceAdjustment, b as formatPriceCompact, j as formatPriceWithTax, e as formatProductPrice, m as getBasePrice, k as getCurrencySymbol, o as getDiscountPercentage, l as getDisplayPrice, q as getMarkupPercentage, r as getProductCurrency, g as getTaxAmount, h as hasTaxInfo, n as isOnSale, y as isPaymentStatusFailure, z as isPaymentStatusRequiresAction, A as isPaymentStatusSuccess, i as isTaxInclusive, F as isValidPhoneForContext, w as normalizePaymentResponse, D as normalizePhoneToE164, x as normalizeStatusResponse, p as parsePrice, E as resolvePhoneCountryCode } from './index-BodyCOun.mjs';
2
+ import './payment-DqiwuLma.mjs';
3
+ import './price-DVQrpE7j.mjs';
4
+ import 'libphonenumber-js';
package/dist/utils.d.ts CHANGED
@@ -1,64 +1,4 @@
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
- import { CountryCode } from 'libphonenumber-js';
4
-
5
- declare const CURRENCY_SYMBOLS: Record<string, string>;
6
- declare function getCurrencySymbol(currencyCode: CurrencyCode): string;
7
- declare function formatNumberCompact(value: number, decimals?: number): string;
8
- declare function formatPrice(amount: number | Money, currency?: CurrencyCode, locale?: string): string;
9
- declare function formatPriceAdjustment(amount: number, currency?: CurrencyCode, locale?: string): string;
10
- declare function formatPriceCompact(amount: number | Money, currency?: CurrencyCode, decimals?: number): string;
11
- declare function formatMoney(amount: Money | number, currency?: CurrencyCode): string;
12
- declare function parsePrice(value: Money | string | number | undefined | null): number;
13
- declare function hasTaxInfo(priceInfo: {
14
- tax_info?: PricePathTaxInfo;
15
- }): boolean;
16
- declare function getTaxAmount(priceInfo: {
17
- tax_info?: PricePathTaxInfo;
18
- }): number;
19
- declare function isTaxInclusive(priceInfo: {
20
- tax_info?: PricePathTaxInfo;
21
- }): boolean;
22
- declare function formatPriceWithTax(priceInfo: {
23
- final_price: Money;
24
- tax_info?: PricePathTaxInfo;
25
- }, currency?: CurrencyCode): string;
26
- declare function getDisplayPrice(product: ProductWithPrice): number;
27
- declare function getBasePrice(product: ProductWithPrice): number;
28
- declare function isOnSale(product: ProductWithPrice): boolean;
29
- declare function getDiscountPercentage(product: ProductWithPrice): number;
30
- declare function getMarkupPercentage(product: ProductWithPrice): number;
31
- declare function getProductCurrency(product: ProductWithPrice): CurrencyCode;
32
- declare function formatProductPrice(product: ProductWithPrice, locale?: string): string;
33
-
34
- declare function categorizePaymentError(error: Error, errorCode?: string): PaymentErrorDetails;
35
- declare function normalizePaymentResponse(response: unknown): PaymentResponse;
36
- declare function isPaymentStatusSuccess(status: string | undefined): boolean;
37
- declare function isPaymentStatusFailure(status: string | undefined): boolean;
38
- declare function isPaymentStatusRequiresAction(status: string | undefined): boolean;
39
- declare function normalizeStatusResponse(response: unknown): PaymentStatusResponse;
40
- declare const MOBILE_MONEY_PROVIDERS: {
41
- readonly mtn: {
42
- readonly name: "MTN Mobile Money";
43
- readonly prefix: readonly ["024", "025", "053", "054", "055", "059"];
44
- };
45
- readonly vodafone: {
46
- readonly name: "Telecel Cash";
47
- readonly prefix: readonly ["020", "050"];
48
- };
49
- readonly airtel: {
50
- readonly name: "AirtelTigo Money";
51
- readonly prefix: readonly ["026", "027", "056", "057"];
52
- };
53
- };
54
- declare function detectMobileMoneyProvider(phoneNumber: string): "mtn" | "vodafone" | "airtel" | null;
55
-
56
- interface PhoneNormalizationOptions {
57
- country?: string | null;
58
- currency?: string | null;
59
- }
60
- declare function resolvePhoneCountryCode(options?: PhoneNormalizationOptions): CountryCode | undefined;
61
- declare function normalizePhoneToE164(raw: string, options?: PhoneNormalizationOptions): string | null;
62
- declare function isValidPhoneForContext(raw: string, options?: PhoneNormalizationOptions): boolean;
63
-
64
- export { CURRENCY_SYMBOLS, MOBILE_MONEY_PROVIDERS, categorizePaymentError, detectMobileMoneyProvider, formatMoney, formatNumberCompact, formatPrice, formatPriceAdjustment, formatPriceCompact, formatPriceWithTax, formatProductPrice, getBasePrice, getCurrencySymbol, getDiscountPercentage, getDisplayPrice, getMarkupPercentage, getProductCurrency, getTaxAmount, hasTaxInfo, isOnSale, isPaymentStatusFailure, isPaymentStatusRequiresAction, isPaymentStatusSuccess, isTaxInclusive, isValidPhoneForContext, normalizePaymentResponse, normalizePhoneToE164, normalizeStatusResponse, parsePrice, resolvePhoneCountryCode };
1
+ export { C as CURRENCY_SYMBOLS, M as MOBILE_MONEY_PROVIDERS, v as categorizePaymentError, B as detectMobileMoneyProvider, c as formatMoney, d as formatNumberCompact, f as formatPrice, a as formatPriceAdjustment, b as formatPriceCompact, j as formatPriceWithTax, e as formatProductPrice, m as getBasePrice, k as getCurrencySymbol, o as getDiscountPercentage, l as getDisplayPrice, q as getMarkupPercentage, r as getProductCurrency, g as getTaxAmount, h as hasTaxInfo, n as isOnSale, y as isPaymentStatusFailure, z as isPaymentStatusRequiresAction, A as isPaymentStatusSuccess, i as isTaxInclusive, F as isValidPhoneForContext, w as normalizePaymentResponse, D as normalizePhoneToE164, x as normalizeStatusResponse, p as parsePrice, E as resolvePhoneCountryCode } from './index-IH1wOTmD.js';
2
+ import './payment-DqiwuLma.js';
3
+ import './price-BZlddg1A.js';
4
+ import 'libphonenumber-js';