@opexa/portal-components 0.0.137 → 0.0.138

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.
@@ -1,9 +1,7 @@
1
1
  import type { ImageProps } from 'next/image';
2
2
  import type { ReactNode } from 'react';
3
- type DisclaimerProps = {
4
- version?: 'v1';
5
- logo: ImageProps['src'];
6
- } | {
3
+ import { type DisclaimerV1Props } from './DisclaimerV1';
4
+ type DisclaimerProps = DisclaimerV1Props | {
7
5
  version: 'v2';
8
6
  logo: ImageProps['src'];
9
7
  siteName: string;
@@ -6,5 +6,5 @@ export function Disclaimer(props) {
6
6
  if (props.version === 'v2') {
7
7
  return (_jsx(DisclaimerV2, { logo: props.logo, siteName: props.siteName, responsibleGamingContent: props.responsibleGamingContent, termsOfUseContent: props.termsOfUseContent, responsibleGamingLogo: props.responsibleGamingLogo }));
8
8
  }
9
- return _jsx(DisclaimerV1, { logo: props.logo });
9
+ return _jsx(DisclaimerV1, { ...props });
10
10
  }
@@ -1,5 +1,7 @@
1
1
  import type { ImageProps } from 'next/image';
2
- export interface DisclaimerProps {
2
+ export interface DisclaimerV1Props {
3
+ version?: 'v1';
3
4
  logo: ImageProps['src'];
5
+ termsAndConditionsUrl?: string;
4
6
  }
5
- export declare function DisclaimerV1(props: DisclaimerProps): import("react/jsx-runtime").JSX.Element;
7
+ export declare function DisclaimerV1(props: DisclaimerV1Props): import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,7 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import Image from 'next/image';
4
+ import Link from 'next/link';
4
5
  import { useRef } from 'react';
5
6
  import pagcorLogo from '../../images/pagcor.png';
6
7
  import responsibleGamingLogo from '../../images/responsible-gaming.png';
@@ -11,5 +12,5 @@ import { useDisclaimer } from './useDisclaimer.js';
11
12
  export function DisclaimerV1(props) {
12
13
  const disclaimer = useDisclaimer();
13
14
  const acceptTriggerRef = useRef(null);
14
- return (_jsx(Dialog.Root, { open: disclaimer.open, lazyMount: true, unmountOnExit: true, closeOnEscape: false, closeOnInteractOutside: false, initialFocusEl: () => acceptTriggerRef.current, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+1)]" }), _jsx(Dialog.Positioner, { className: "!z-[calc(var(--z-dialog)+2)]", children: _jsxs(Dialog.Content, { className: "flex h-full w-full flex-col items-start p-3xl lg:mx-auto lg:h-auto lg:w-[400px] lg:rounded-xl", children: [_jsx(Image, { src: props.logo, alt: "", width: 200, height: 100, className: "mx-auto h-auto w-[120px]", draggable: false }), _jsxs("div", { className: "w-full grow", children: [_jsx(Dialog.Title, { className: "mt-3xl text-center text-lg font-semibold", children: "Age Verification" }), _jsxs(Dialog.Description, { className: "text-text-tertiary-600 mt-xs text-center text-sm", children: ["By entering this website I acknowledge and confirm I am 21 years of age and I agree with the", ' ', _jsx("button", { type: "button", className: "text-brand-400 underline underline-offset-2", children: "Terms and Conditions." })] }), _jsxs("div", { className: "mt-5 flex items-center justify-center gap-3xl", children: [_jsx(Image, { src: pagcorLogo, alt: "", height: 75, width: 88, className: "h-[88px] w-auto shrink-0", draggable: false }), _jsx(Image, { src: responsibleGamingLogo, alt: "", height: 62, width: 186, className: "h-[62px] w-auto shrink-0", draggable: false })] })] }), _jsx(Button, { ref: acceptTriggerRef, type: "button", className: "mt-4xl", onClick: disclaimer.close, children: "Accept" })] }) })] }) }));
15
+ return (_jsx(Dialog.Root, { open: disclaimer.open, lazyMount: true, unmountOnExit: true, closeOnEscape: false, closeOnInteractOutside: false, initialFocusEl: () => acceptTriggerRef.current, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+1)]" }), _jsx(Dialog.Positioner, { className: "!z-[calc(var(--z-dialog)+2)]", children: _jsxs(Dialog.Content, { className: "flex h-full w-full flex-col items-start p-3xl lg:mx-auto lg:h-auto lg:w-[400px] lg:rounded-xl", children: [_jsx(Image, { src: props.logo, alt: "", width: 200, height: 100, className: "mx-auto h-auto w-[120px]", draggable: false }), _jsxs("div", { className: "w-full grow", children: [_jsx(Dialog.Title, { className: "mt-3xl text-center text-lg font-semibold", children: "Age Verification" }), _jsxs(Dialog.Description, { className: "text-text-tertiary-600 mt-xs text-center text-sm", children: ["By entering this website I acknowledge and confirm I am 21 years of age and I agree with the", ' ', _jsx(Link, { href: props.termsAndConditionsUrl ?? '/terms-and-conditions', target: "_blank", rel: "noopener noreferrer", className: "text-brand-400 whitespace-nowrap underline underline-offset-2", prefetch: false, children: "Terms and Conditions." })] }), _jsxs("div", { className: "mt-5 flex items-center justify-center gap-3xl", children: [_jsx(Image, { src: pagcorLogo, alt: "", height: 75, width: 88, className: "h-[88px] w-auto shrink-0", draggable: false }), _jsx(Image, { src: responsibleGamingLogo, alt: "", height: 62, width: 186, className: "h-[62px] w-auto shrink-0", draggable: false })] })] }), _jsx(Button, { ref: acceptTriggerRef, type: "button", className: "mt-4xl", onClick: disclaimer.close, children: "Accept" })] }) })] }) }));
15
16
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opexa/portal-components",
3
- "version": "0.0.137",
3
+ "version": "0.0.138",
4
4
  "exports": {
5
5
  "./ui/*": {
6
6
  "types": "./dist/ui/*/index.d.ts",