@rxdrag/website-lib-react 0.0.3 → 0.0.6

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 (97) hide show
  1. package/dist/ReactModalTrigger-9207e763.js +26 -0
  2. package/dist/ReactModalTrigger-9207e763.js.map +1 -0
  3. package/dist/components/RichTextOutline/parseOutline.d.ts +5 -0
  4. package/dist/components/all.d.ts +0 -21
  5. package/dist/components/index.d.ts +0 -5
  6. package/dist/forms.d.ts +1 -0
  7. package/dist/forms.mjs +1647 -0
  8. package/dist/forms.mjs.map +1 -0
  9. package/dist/index.mjs +9 -3918
  10. package/dist/index.mjs.map +1 -1
  11. package/dist/jsx-runtime-c02cc059.js +325 -0
  12. package/dist/jsx-runtime-c02cc059.js.map +1 -0
  13. package/dist/media.d.ts +1 -0
  14. package/dist/media.mjs +613 -0
  15. package/dist/media.mjs.map +1 -0
  16. package/dist/richtext.d.ts +1 -0
  17. package/dist/richtext.mjs +191 -0
  18. package/dist/richtext.mjs.map +1 -0
  19. package/dist/ui.d.ts +10 -0
  20. package/dist/ui.mjs +687 -0
  21. package/dist/ui.mjs.map +1 -0
  22. package/dist/video.d.ts +2 -0
  23. package/dist/video.mjs +426 -0
  24. package/dist/video.mjs.map +1 -0
  25. package/forms.ts +1 -0
  26. package/index.ts +1 -0
  27. package/media.ts +1 -0
  28. package/package.json +41 -6
  29. package/richtext.ts +1 -0
  30. package/src/components/Analytics/eventHandlers.ts +173 -0
  31. package/src/components/Analytics/index.tsx +21 -0
  32. package/src/components/Analytics/singleton.ts +214 -0
  33. package/src/components/Analytics/tracking.ts +221 -0
  34. package/src/components/Analytics/types.ts +60 -0
  35. package/src/components/Analytics/utils.ts +95 -0
  36. package/src/components/AttachmentIcon/index.tsx +53 -0
  37. package/src/components/BackgroundHlsVideoPlayer.tsx +97 -0
  38. package/src/components/BackgroundVideoPlayer.tsx +32 -0
  39. package/src/components/Bulletin.tsx +30 -0
  40. package/src/components/ContactForm/ContactForm.tsx +290 -0
  41. package/src/components/ContactForm/FileUpload2.tsx +423 -0
  42. package/src/components/ContactForm/Input.tsx +48 -0
  43. package/src/components/ContactForm/Input2.tsx +59 -0
  44. package/src/components/ContactForm/Submit.tsx +48 -0
  45. package/src/components/ContactForm/TelInput.tsx +215 -0
  46. package/src/components/ContactForm/TelInput2.tsx +213 -0
  47. package/src/components/ContactForm/Textarea.tsx +48 -0
  48. package/src/components/ContactForm/Textarea2.tsx +89 -0
  49. package/src/components/ContactForm/countryDialCodes.ts +243 -0
  50. package/src/components/ContactForm/factory.tsx +60 -0
  51. package/src/components/ContactForm/funcs.ts +64 -0
  52. package/src/components/ContactForm/hooks/useInlineLabelPadding.ts +43 -0
  53. package/src/components/ContactForm/hooks/useTelControl.ts +81 -0
  54. package/src/components/ContactForm/index.ts +7 -0
  55. package/src/components/ContactForm/types.ts +68 -0
  56. package/src/components/Icon/index.tsx +20 -0
  57. package/src/components/Medias/MainMedia.tsx +257 -0
  58. package/src/components/Medias/Thumbnail.tsx +62 -0
  59. package/src/components/Medias/VideoPlayer.tsx +114 -0
  60. package/src/components/Medias/index.tsx +271 -0
  61. package/src/components/ProductCard/ProductCard.tsx +24 -0
  62. package/src/components/ProductCard/ProductCta/index.tsx +28 -0
  63. package/src/components/ProductCard/ProductCta/style.css +4 -0
  64. package/src/components/ProductCard/ProductDescription/index.tsx +13 -0
  65. package/src/components/ProductCard/ProductDescription/style.css +6 -0
  66. package/src/components/ProductCard/ProductMedia/index.tsx +35 -0
  67. package/src/components/ProductCard/ProductMedia/style.css +6 -0
  68. package/src/components/ProductCard/ProductTitle/index.tsx +7 -0
  69. package/src/components/ProductCard/ProductTitle/style.css +4 -0
  70. package/src/components/ProductCard/ProductView.tsx +36 -0
  71. package/src/components/ProductCard/index.ts +5 -0
  72. package/src/components/ProductCard/useQueryProduct.ts +32 -0
  73. package/src/components/ReactModalTrigger.tsx +28 -0
  74. package/src/components/ReactVideoPlayer.tsx +332 -0
  75. package/src/components/RichTextOutline/index.tsx +74 -0
  76. package/src/components/RichTextOutline/parseOutline.ts +63 -0
  77. package/src/components/RichTextOutline/useAcitviedHeading.ts +142 -0
  78. package/src/components/RichTextOutline/useAnchorScroll.ts +24 -0
  79. package/src/components/Scroller.tsx +39 -0
  80. package/src/components/SearchInput.tsx +21 -0
  81. package/src/components/Share/index.tsx +86 -0
  82. package/src/components/Share/socials.tsx +80 -0
  83. package/src/components/Share//350/265/204/346/226/231.md +7 -0
  84. package/src/components/ToTop.tsx +72 -0
  85. package/src/components/VideoPlayIcon.tsx +43 -0
  86. package/src/components/all.ts +25 -0
  87. package/src/components/index.ts +12 -0
  88. package/src/forms.ts +1 -0
  89. package/src/index.ts +1 -0
  90. package/src/media.ts +1 -0
  91. package/src/richtext.ts +1 -0
  92. package/src/types/view-model.ts +37 -0
  93. package/src/ui.ts +10 -0
  94. package/src/video.ts +2 -0
  95. package/ui.ts +1 -0
  96. package/video.ts +1 -0
  97. package/dist/style.css +0 -17
@@ -0,0 +1,26 @@
1
+ import { j as jsxRuntimeExports } from "./jsx-runtime-c02cc059.js";
2
+ function ReactModalTrigger(props) {
3
+ const {
4
+ className,
5
+ callToAction,
6
+ openableKey = "enquiry-modal",
7
+ children
8
+ } = props;
9
+ const roleProps = {
10
+ "data-modal-open": openableKey,
11
+ "data-call-to-action": callToAction
12
+ };
13
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
14
+ "button",
15
+ {
16
+ ...roleProps,
17
+ className,
18
+ type: "button",
19
+ children: children || "Get a quote"
20
+ }
21
+ );
22
+ }
23
+ export {
24
+ ReactModalTrigger as R
25
+ };
26
+ //# sourceMappingURL=ReactModalTrigger-9207e763.js.map
@@ -0,0 +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;"}
@@ -0,0 +1,5 @@
1
+ export type RichTextOutlineItem = {
2
+ key: string;
3
+ text: string;
4
+ };
5
+ export declare function parseOutline(value?: string): RichTextOutlineItem[];
@@ -1,38 +1,17 @@
1
1
  import { Analytics } from './Analytics';
2
- import { BackgroundHlsVideoPlayer } from './BackgroundHlsVideoPlayer';
3
2
  import { BackgroundVideoPlayer } from './BackgroundVideoPlayer';
4
3
  import { Bulletin } from './Bulletin';
5
- import { ProductCta, ProductDescription, ProductMedia, ProductTitle } from './ProductCard';
6
4
  import { ReactModalTrigger } from './ReactModalTrigger';
7
5
  import { Scroller } from './Scroller';
8
6
 
9
7
  export declare const allCoreComponents: {
10
8
  Analytics: typeof Analytics;
11
9
  AttachmentIcon: import('react').ForwardRefExoticComponent<import('./AttachmentIcon').AttachmentIconProps & import('react').RefAttributes<HTMLDivElement>>;
12
- BackgroundHlsVideoPlayer: typeof BackgroundHlsVideoPlayer;
13
10
  BackgroundVideoPlayer: typeof BackgroundVideoPlayer;
14
11
  Bulletin: typeof Bulletin;
15
12
  ContactForm: import('react').ForwardRefExoticComponent<import('./ContactForm').ContactFormProps & import('react').RefAttributes<HTMLDivElement>>;
16
13
  Icon: import('react').ForwardRefExoticComponent<Omit<import('./Icon').IconProps, "ref"> & import('react').RefAttributes<SVGSVGElement>>;
17
- Medias: import('react').ForwardRefExoticComponent<import('./Medias').MediasProps & import('react').RefAttributes<HTMLDivElement>>;
18
- ProductCard: ({ node }: import('./ProductCard').ProductCardProps) => import("react/jsx-runtime").JSX.Element;
19
- ProductCta: typeof ProductCta;
20
- ProductDescription: typeof ProductDescription;
21
- ProductMedia: typeof ProductMedia;
22
- ProductTitle: typeof ProductTitle;
23
14
  ReactModalTrigger: typeof ReactModalTrigger;
24
- ReactVideoPlayer: import('react').ForwardRefExoticComponent<{
25
- endTitle?: string;
26
- media?: import('@rxdrag/rxcms-models').Media;
27
- posterUrl?: string;
28
- eagerLoad?: boolean;
29
- classNames?: import('./ReactVideoPlayer').VideoPlayerClassNames;
30
- callToAction?: string;
31
- onToggleSelect?: (id: import('./ReactVideoPlayer').ID) => void;
32
- designMode?: boolean;
33
- children?: React.ReactNode;
34
- } & import('react').RefAttributes<HTMLDivElement>>;
35
- RichTextOutline: import('react').ForwardRefExoticComponent<import('./RichTextOutline').RichTextOutlineProps & import('react').RefAttributes<HTMLUListElement>>;
36
15
  Scroller: typeof Scroller;
37
16
  SearchInput: import('react').ForwardRefExoticComponent<import('./SearchInput').SearchProps & import('react').RefAttributes<HTMLInputElement>>;
38
17
  Share: import('react').ForwardRefExoticComponent<import('./Share').ShareProps & import('react').RefAttributes<HTMLDivElement>>;
@@ -2,16 +2,11 @@ export * from './Analytics';
2
2
  export * from './AttachmentIcon';
3
3
  export * from './ContactForm';
4
4
  export * from './Icon';
5
- export * from './Medias';
6
- export * from './ProductCard';
7
- export * from './RichTextOutline';
8
5
  export * from './Share';
9
6
  export * from './Scroller';
10
7
  export * from './SearchInput';
11
8
  export * from './ToTop';
12
9
  export * from './BackgroundVideoPlayer';
13
- export * from './BackgroundHlsVideoPlayer';
14
10
  export * from './Bulletin';
15
11
  export * from './ReactModalTrigger';
16
- export * from './ReactVideoPlayer';
17
12
  export * from './all';
@@ -0,0 +1 @@
1
+ export * from './components/ContactForm';