@salesmind-ai/design-system 0.1.12 → 0.2.1

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.
@@ -5,7 +5,6 @@ var jsxRuntime = require('react/jsx-runtime');
5
5
  var React = require('react');
6
6
  var reactSlot = require('@radix-ui/react-slot');
7
7
  var clsx = require('clsx');
8
- var framerMotion = require('framer-motion');
9
8
  var lucideReact = require('lucide-react');
10
9
 
11
10
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
@@ -156,9 +155,13 @@ function createSchemaGenerators(brand, supportedLanguages = ["en", "fr", "es"])
156
155
  offers: {
157
156
  "@type": "AggregateOffer",
158
157
  priceCurrency: "USD",
159
- lowPrice: "19",
160
- highPrice: "500",
161
- offerCount: "4"
158
+ lowPrice: "0",
159
+ highPrice: "0",
160
+ offerCount: "2",
161
+ priceSpecification: {
162
+ "@type": "PriceSpecification",
163
+ description: "Custom pricing \u2014 contact sales for a tailored quote"
164
+ }
162
165
  },
163
166
  author: {
164
167
  "@type": "Organization",
@@ -413,14 +416,14 @@ function createSchemaGenerators(brand, supportedLanguages = ["en", "fr", "es"])
413
416
  };
414
417
  },
415
418
  /** Service schema — Growth motion service offerings. */
416
- service(motion2, locale = "en") {
419
+ service(motion, locale = "en") {
417
420
  return {
418
421
  "@context": "https://schema.org",
419
422
  "@type": "Service",
420
- "@id": ENTITY_IDS.service(motion2.slug),
421
- name: motion2.name,
422
- description: motion2.description,
423
- url: motion2.url.startsWith("http") ? motion2.url : `${brand.url}${motion2.url}`,
423
+ "@id": ENTITY_IDS.service(motion.slug),
424
+ name: motion.name,
425
+ description: motion.description,
426
+ url: motion.url.startsWith("http") ? motion.url : `${brand.url}${motion.url}`,
424
427
  provider: {
425
428
  "@type": "Organization",
426
429
  "@id": ENTITY_IDS.organization,
@@ -429,11 +432,11 @@ function createSchemaGenerators(brand, supportedLanguages = ["en", "fr", "es"])
429
432
  inLanguage: locale,
430
433
  availableLanguage: [...supportedLanguages],
431
434
  areaServed: "Worldwide",
432
- ...motion2.price ? {
435
+ ...motion.price ? {
433
436
  offers: {
434
437
  "@type": "Offer",
435
- price: motion2.price.replace(/[^0-9.]/g, "") || "0",
436
- priceCurrency: motion2.priceCurrency || "USD",
438
+ price: motion.price.replace(/[^0-9.]/g, "") || "0",
439
+ priceCurrency: motion.priceCurrency || "USD",
437
440
  availability: "https://schema.org/InStock"
438
441
  }
439
442
  } : {},
@@ -946,34 +949,44 @@ function CookieConsent({
946
949
  labels,
947
950
  className
948
951
  }) {
949
- const [isVisible, setIsVisible] = React.useState(false);
952
+ const [state, setState] = React.useState("idle");
950
953
  React.useEffect(() => {
951
954
  const consent = localStorage.getItem(COOKIE_CONSENT_KEY);
952
955
  if (!consent) {
953
- const timer = setTimeout(() => setIsVisible(true), delay);
956
+ const timer = setTimeout(() => setState("open"), delay);
954
957
  return () => clearTimeout(timer);
958
+ } else {
959
+ setState("closed");
955
960
  }
956
961
  }, [delay]);
962
+ const handleDismiss = React.useCallback(() => {
963
+ setState("closing");
964
+ }, []);
957
965
  const handleAccept = React.useCallback(() => {
958
966
  localStorage.setItem(COOKIE_CONSENT_KEY, "granted");
959
- setIsVisible(false);
967
+ handleDismiss();
960
968
  if (typeof window !== "undefined") {
961
969
  window.dispatchEvent(new Event(COOKIE_CONSENT_EVENT));
962
970
  }
963
971
  onAccept?.();
964
- }, [onAccept]);
972
+ }, [onAccept, handleDismiss]);
965
973
  const handleDecline = React.useCallback(() => {
966
974
  localStorage.setItem(COOKIE_CONSENT_KEY, "denied");
967
- setIsVisible(false);
975
+ handleDismiss();
968
976
  onDecline?.();
969
- }, [onDecline]);
970
- return /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { children: isVisible && /* @__PURE__ */ jsxRuntime.jsx(
971
- framerMotion.motion.div,
977
+ }, [onDecline, handleDismiss]);
978
+ const handleTransitionEnd = React.useCallback(() => {
979
+ if (state === "closing") {
980
+ setState("closed");
981
+ }
982
+ }, [state]);
983
+ if (state === "idle" || state === "closed") return null;
984
+ return /* @__PURE__ */ jsxRuntime.jsx(
985
+ "div",
972
986
  {
973
- initial: { y: 100, opacity: 0 },
974
- animate: { y: 0, opacity: 1 },
975
- exit: { y: 100, opacity: 0 },
976
987
  className: `ds-cookie-consent ${className ?? ""}`,
988
+ "data-state": state === "open" ? "open" : "closed",
989
+ onTransitionEnd: handleTransitionEnd,
977
990
  role: "dialog",
978
991
  "aria-label": labels?.title ?? "Cookie consent",
979
992
  children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ds-cookie-consent__inner", children: [
@@ -999,7 +1012,7 @@ function CookieConsent({
999
1012
  )
1000
1013
  ] })
1001
1014
  }
1002
- ) });
1015
+ );
1003
1016
  }
1004
1017
 
1005
1018
  // src/web/analytics/use-cookie-consent.ts