@rxdrag/website-lib-react 0.0.6 → 0.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/dist/ReactModalTrigger-9207e763.js.map +1 -1
  2. package/dist/components/ContactForm/ContactForm.d.ts +2 -1
  3. package/dist/components/Icon/index.d.ts +2 -1
  4. package/dist/forms.mjs +5 -3
  5. package/dist/forms.mjs.map +1 -1
  6. package/dist/ui.mjs.map +1 -1
  7. package/package.json +22 -23
  8. package/forms.ts +0 -1
  9. package/index.ts +0 -1
  10. package/media.ts +0 -1
  11. package/richtext.ts +0 -1
  12. package/src/components/Analytics/eventHandlers.ts +0 -173
  13. package/src/components/Analytics/index.tsx +0 -21
  14. package/src/components/Analytics/singleton.ts +0 -214
  15. package/src/components/Analytics/tracking.ts +0 -221
  16. package/src/components/Analytics/types.ts +0 -60
  17. package/src/components/Analytics/utils.ts +0 -95
  18. package/src/components/AttachmentIcon/index.tsx +0 -53
  19. package/src/components/BackgroundHlsVideoPlayer.tsx +0 -97
  20. package/src/components/BackgroundVideoPlayer.tsx +0 -32
  21. package/src/components/Bulletin.tsx +0 -30
  22. package/src/components/ContactForm/ContactForm.tsx +0 -290
  23. package/src/components/ContactForm/FileUpload2.tsx +0 -423
  24. package/src/components/ContactForm/Input.tsx +0 -48
  25. package/src/components/ContactForm/Input2.tsx +0 -59
  26. package/src/components/ContactForm/Submit.tsx +0 -48
  27. package/src/components/ContactForm/TelInput.tsx +0 -215
  28. package/src/components/ContactForm/TelInput2.tsx +0 -213
  29. package/src/components/ContactForm/Textarea.tsx +0 -48
  30. package/src/components/ContactForm/Textarea2.tsx +0 -89
  31. package/src/components/ContactForm/countryDialCodes.ts +0 -243
  32. package/src/components/ContactForm/factory.tsx +0 -60
  33. package/src/components/ContactForm/funcs.ts +0 -64
  34. package/src/components/ContactForm/hooks/useInlineLabelPadding.ts +0 -43
  35. package/src/components/ContactForm/hooks/useTelControl.ts +0 -81
  36. package/src/components/ContactForm/index.ts +0 -7
  37. package/src/components/ContactForm/types.ts +0 -68
  38. package/src/components/Icon/index.tsx +0 -20
  39. package/src/components/Medias/MainMedia.tsx +0 -257
  40. package/src/components/Medias/Thumbnail.tsx +0 -62
  41. package/src/components/Medias/VideoPlayer.tsx +0 -114
  42. package/src/components/Medias/index.tsx +0 -271
  43. package/src/components/ProductCard/ProductCard.tsx +0 -24
  44. package/src/components/ProductCard/ProductCta/index.tsx +0 -28
  45. package/src/components/ProductCard/ProductCta/style.css +0 -4
  46. package/src/components/ProductCard/ProductDescription/index.tsx +0 -13
  47. package/src/components/ProductCard/ProductDescription/style.css +0 -6
  48. package/src/components/ProductCard/ProductMedia/index.tsx +0 -35
  49. package/src/components/ProductCard/ProductMedia/style.css +0 -6
  50. package/src/components/ProductCard/ProductTitle/index.tsx +0 -7
  51. package/src/components/ProductCard/ProductTitle/style.css +0 -4
  52. package/src/components/ProductCard/ProductView.tsx +0 -36
  53. package/src/components/ProductCard/index.ts +0 -5
  54. package/src/components/ProductCard/useQueryProduct.ts +0 -32
  55. package/src/components/ReactModalTrigger.tsx +0 -28
  56. package/src/components/ReactVideoPlayer.tsx +0 -332
  57. package/src/components/RichTextOutline/index.tsx +0 -74
  58. package/src/components/RichTextOutline/parseOutline.ts +0 -63
  59. package/src/components/RichTextOutline/useAcitviedHeading.ts +0 -142
  60. package/src/components/RichTextOutline/useAnchorScroll.ts +0 -24
  61. package/src/components/Scroller.tsx +0 -39
  62. package/src/components/SearchInput.tsx +0 -21
  63. package/src/components/Share/index.tsx +0 -86
  64. package/src/components/Share/socials.tsx +0 -80
  65. package/src/components/Share//350/265/204/346/226/231.md +0 -7
  66. package/src/components/ToTop.tsx +0 -72
  67. package/src/components/VideoPlayIcon.tsx +0 -43
  68. package/src/components/all.ts +0 -25
  69. package/src/components/index.ts +0 -12
  70. package/src/forms.ts +0 -1
  71. package/src/index.ts +0 -1
  72. package/src/media.ts +0 -1
  73. package/src/richtext.ts +0 -1
  74. package/src/types/view-model.ts +0 -37
  75. package/src/ui.ts +0 -10
  76. package/src/video.ts +0 -2
  77. package/ui.ts +0 -1
  78. package/video.ts +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"ReactModalTrigger-9207e763.js","sources":["../src/components/ReactModalTrigger.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\n\nexport function ReactModalTrigger(props: {\n className?: string;\n openableKey?: string;\n callToAction?: string;\n children?: ReactNode;\n}) {\n const {\n className,\n callToAction,\n openableKey = \"enquiry-modal\",\n children,\n } = props;\n const roleProps = {\n \"data-modal-open\": openableKey,\n \"data-call-to-action\": callToAction,\n };\n return (\n <button\n {...roleProps}\n className={className}\n type=\"button\"\n >\n {children || \"Get a quote\"}\n </button>\n );\n}\n"],"names":["jsx"],"mappings":";AAEO,SAAS,kBAAkB,OAK/B;AACK,QAAA;AAAA,IACJ;AAAA,IACA;AAAA,IACA,cAAc;AAAA,IACd;AAAA,EACE,IAAA;AACJ,QAAM,YAAY;AAAA,IAChB,mBAAmB;AAAA,IACnB,uBAAuB;AAAA,EAAA;AAGvB,SAAAA,kCAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACE,GAAG;AAAA,MACJ;AAAA,MACA,MAAK;AAAA,MAEJ,UAAY,YAAA;AAAA,IAAA;AAAA,EAAA;AAGnB;"}
1
+ {"version":3,"file":"ReactModalTrigger-9207e763.js","sources":["../src/components/ReactModalTrigger.tsx"],"sourcesContent":["import React, { type ReactNode } from \"react\";\n\nexport function ReactModalTrigger(props: {\n className?: string;\n openableKey?: string;\n callToAction?: string;\n children?: ReactNode;\n}) {\n const {\n className,\n callToAction,\n openableKey = \"enquiry-modal\",\n children,\n } = props;\n const roleProps = {\n \"data-modal-open\": openableKey,\n \"data-call-to-action\": callToAction,\n };\n return (\n <button\n {...roleProps}\n className={className}\n type=\"button\"\n >\n {children || \"Get a quote\"}\n </button>\n );\n}\n"],"names":["jsx"],"mappings":";AAEO,SAAS,kBAAkB,OAK/B;AACK,QAAA;AAAA,IACJ;AAAA,IACA;AAAA,IACA,cAAc;AAAA,IACd;AAAA,EACE,IAAA;AACJ,QAAM,YAAY;AAAA,IAChB,mBAAmB;AAAA,IACnB,uBAAuB;AAAA,EAAA;AAGvB,SAAAA,kCAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACE,GAAG;AAAA,MACJ;AAAA,MACA,MAAK;AAAA,MAEJ,UAAY,YAAA;AAAA,IAAA;AAAA,EAAA;AAGnB;"}
@@ -1,3 +1,4 @@
1
+ import { default as React } from 'react';
1
2
  import { ContactFormProps } from './types';
2
3
 
3
- export declare const ContactForm: import('react').ForwardRefExoticComponent<ContactFormProps & import('react').RefAttributes<HTMLDivElement>>;
4
+ export declare const ContactForm: React.ForwardRefExoticComponent<ContactFormProps & React.RefAttributes<HTMLDivElement>>;
@@ -1,6 +1,7 @@
1
1
  import { IconProps as IconifyIconProps, IconifyIcon as IconifyIconData } from '@iconify/react';
2
+ import { default as React } from 'react';
2
3
 
3
4
  export type IconProps = Omit<IconifyIconProps, "icon"> & {
4
5
  icon?: string | IconifyIconData;
5
6
  };
6
- export declare const Icon: import('react').ForwardRefExoticComponent<Omit<IconProps, "ref"> & import('react').RefAttributes<SVGSVGElement>>;
7
+ export declare const Icon: React.ForwardRefExoticComponent<Omit<IconProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
package/dist/forms.mjs CHANGED
@@ -1422,7 +1422,7 @@ const ContactForm = forwardRef(
1422
1422
  const [submitting, setSubmitting] = useState(false);
1423
1423
  const [isUploading, setIsUploading] = useState(false);
1424
1424
  const [submitStatus, setSubmitStatus] = useState({});
1425
- const lastCta = window.lastCta;
1425
+ const lastCta = typeof window === "undefined" ? void 0 : window.lastCta;
1426
1426
  const handleChange = (e, isExtends) => {
1427
1427
  const { name, value } = e.target;
1428
1428
  if (isExtends) {
@@ -1492,7 +1492,7 @@ const ContactForm = forwardRef(
1492
1492
  encryptedField: encrypt(formData.phone, formSalt)
1493
1493
  }),
1494
1494
  headers: {
1495
- "X-Request-URL": window.location.href,
1495
+ "X-Request-URL": typeof window === "undefined" ? "" : window.location.href,
1496
1496
  "Content-Type": "application/json"
1497
1497
  }
1498
1498
  });
@@ -1513,7 +1513,9 @@ const ContactForm = forwardRef(
1513
1513
  phone: "",
1514
1514
  attachments: []
1515
1515
  });
1516
- window.location.href = "/thanks";
1516
+ if (typeof window !== "undefined") {
1517
+ window.location.href = "/thanks";
1518
+ }
1517
1519
  }
1518
1520
  } catch (error) {
1519
1521
  console.error("Form submission error:", error);