pixel-react 1.1.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,5 @@
1
+ import ReCAPTCHA from 'react-google-recaptcha';
2
+ import { RecaptchaProps } from './types';
3
+ import './Recaptcha.scss';
4
+ declare const Recaptcha: import("react").ForwardRefExoticComponent<RecaptchaProps & import("react").RefAttributes<ReCAPTCHA>>;
5
+ export default Recaptcha;
@@ -0,0 +1,8 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import Recaptcha from './Recaptcha';
3
+ declare const meta: Meta<typeof Recaptcha>;
4
+ type Story = StoryObj<typeof Recaptcha>;
5
+ export declare const Default: Story;
6
+ export declare const WithError: Story;
7
+ export declare const WithCustomTheme: Story;
8
+ export default meta;
@@ -0,0 +1,20 @@
1
+ import { ComponentProps } from 'react';
2
+ import ReCAPTCHA from 'react-google-recaptcha';
3
+ export interface RecaptchaProps extends Omit<ComponentProps<typeof ReCAPTCHA>, 'onChange'> {
4
+ /**
5
+ * Callback function that receives the verification token
6
+ */
7
+ onVerify: (token: string | null) => void;
8
+ /**
9
+ * Optional CSS class name
10
+ */
11
+ className?: string;
12
+ /**
13
+ * Optional error message to display
14
+ */
15
+ error?: string | null;
16
+ /**
17
+ * reCAPTCHA site key
18
+ */
19
+ sitekey: string;
20
+ }
package/lib/index.d.ts CHANGED
@@ -1,12 +1,13 @@
1
1
  import * as LazyLoad from 'react-window';
2
2
  export { LazyLoad };
3
3
  import * as React$1 from 'react';
4
- import React__default, { ReactNode, FC, RefObject } from 'react';
4
+ import React__default, { ReactNode, FC, RefObject, ComponentProps } from 'react';
5
5
  import * as react_jsx_runtime from 'react/jsx-runtime';
6
6
  import { FieldValues, UseFormProps, SubmitHandler, FieldPath, FieldErrors } from 'react-hook-form';
7
7
  import * as DNDCore from '@dnd-kit/core';
8
8
  import * as DNDSortable from '@dnd-kit/sortable';
9
9
  import * as DNDUtilities from '@dnd-kit/utilities';
10
+ import ReCAPTCHA from 'react-google-recaptcha';
10
11
 
11
12
  interface ButtonProps$1 {
12
13
  /**
@@ -1491,6 +1492,27 @@ interface appHeaderQuickMenuItemProps {
1491
1492
 
1492
1493
  declare const AppHeader: React.FC<AppHeaderProps>;
1493
1494
 
1495
+ interface RecaptchaProps extends Omit<ComponentProps<typeof ReCAPTCHA>, 'onChange'> {
1496
+ /**
1497
+ * Callback function that receives the verification token
1498
+ */
1499
+ onVerify: (token: string | null) => void;
1500
+ /**
1501
+ * Optional CSS class name
1502
+ */
1503
+ className?: string;
1504
+ /**
1505
+ * Optional error message to display
1506
+ */
1507
+ error?: string | null;
1508
+ /**
1509
+ * reCAPTCHA site key
1510
+ */
1511
+ sitekey: string;
1512
+ }
1513
+
1514
+ declare const Recaptcha: React$1.ForwardRefExoticComponent<RecaptchaProps & React$1.RefAttributes<ReCAPTCHA>>;
1515
+
1494
1516
  type valueType$1 = any;
1495
1517
  declare const checkEmpty: (value: valueType$1) => boolean;
1496
1518
 
@@ -1498,4 +1520,4 @@ type valueType = File | string;
1498
1520
  declare const getExtension: (value: valueType) => string | undefined;
1499
1521
  declare const getExtensionWithPeriod: (value: valueType) => string;
1500
1522
 
1501
- export { Accordion, AddButton as AddResourceButton, AllProjectsDropdown, AppHeader, Button, Checkbox, Chip, Col, Container, CustomDatePicker as DatePicker, DonutChart, DragAndDrop, Drawer, ExpandableMenu, FileDropzone, Form, HighlightText, Icon, IconButton, Input, InputWithDropdown, MenuOption, MiniModal, Modal, MultiSelect, RadialChart, RadioButton, RadioGroup, Row, Search, Select, StateDropdown, StatusButton, Table, TableTree, Tabs, Textarea as TextArea, ThemeProvider, Toaster, Toggle, Tooltip, Typography, checkEmpty, getExtension, getExtensionWithPeriod, useTheme };
1523
+ export { Accordion, AddButton as AddResourceButton, AllProjectsDropdown, AppHeader, Button, Checkbox, Chip, Col, Container, CustomDatePicker as DatePicker, DonutChart, DragAndDrop, Drawer, ExpandableMenu, FileDropzone, Form, HighlightText, Icon, IconButton, Input, InputWithDropdown, MenuOption, MiniModal, Modal, MultiSelect, RadialChart, RadioButton, RadioGroup, Recaptcha, Row, Search, Select, StateDropdown, StatusButton, Table, TableTree, Tabs, Textarea as TextArea, ThemeProvider, Toaster, Toggle, Tooltip, Typography, checkEmpty, getExtension, getExtensionWithPeriod, useTheme };