@adoptaunabuelo/react-components 0.3.145 → 0.3.147
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.
- package/dist/esm/components/Avatar/Avatar.d.ts +19 -0
- package/dist/esm/components/BreadCrumb/BreadCrumb.d.ts +11 -0
- package/dist/esm/components/Button/Button.d.ts +19 -0
- package/dist/esm/components/CellSelector/CellSelector.d.ts +28 -0
- package/dist/esm/components/Chat/Chat.d.ts +19 -0
- package/dist/esm/components/Checkbox/CheckboxList.d.ts +25 -0
- package/dist/esm/components/Countdown/Countdown.d.ts +17 -0
- package/dist/esm/components/Counter/Counter.d.ts +21 -0
- package/dist/esm/components/CurrencySelector/CurrencySelector.d.ts +23 -0
- package/dist/esm/components/Dropdown/Dropdown.d.ts +29 -0
- package/dist/esm/components/FAQs/FAQs.d.ts +22 -0
- package/dist/esm/components/Feedback/Feedback.d.ts +22 -0
- package/dist/esm/components/Filter/Filter.d.ts +13 -0
- package/dist/esm/components/Form/Form.d.ts +15 -0
- package/dist/esm/components/Hover/Hover.d.ts +12 -0
- package/dist/esm/components/Input/Basic/Input.d.ts +17 -0
- package/dist/esm/components/Input/Basic/InputPrimary.d.ts +3 -0
- package/dist/esm/components/Input/Basic/InputSecondary.d.ts +3 -0
- package/dist/esm/components/Input/Basic/InputThird.d.ts +3 -0
- package/dist/esm/components/Input/Birthday/InputBirthday.d.ts +14 -0
- package/dist/esm/components/Input/Chat/InputChat.d.ts +24 -0
- package/dist/esm/components/Input/Code/InputCode.d.ts +15 -0
- package/dist/esm/components/Input/DateRange/InputDateRange.d.ts +19 -0
- package/dist/esm/components/Input/Image/InputImage.d.ts +19 -0
- package/dist/esm/components/Input/Location/InputLocation.d.ts +29 -0
- package/dist/esm/components/Input/Phone/InputPhone.d.ts +21 -0
- package/dist/esm/components/Input/Price/InputPrice.d.ts +30 -0
- package/dist/esm/components/Input/Range/InputRange.d.ts +31 -0
- package/dist/esm/components/Label/Label.d.ts +17 -0
- package/dist/esm/components/Menu/Menu.d.ts +28 -0
- package/dist/esm/components/Modal/Modal.d.ts +18 -0
- package/dist/esm/components/Pagination/Pagination.d.ts +18 -0
- package/dist/esm/components/Payout/Payout.d.ts +32 -0
- package/dist/esm/components/ProgressBar/ProgressBar.d.ts +20 -0
- package/dist/esm/components/RadioButton/RadioButtonList.d.ts +22 -0
- package/dist/esm/components/SearchBar/SearchBar.d.ts +16 -0
- package/dist/esm/components/Select/Select.d.ts +25 -0
- package/dist/esm/components/Stamp/Stamp.d.ts +16 -0
- package/dist/esm/components/Switch/Switch.d.ts +16 -0
- package/dist/esm/components/SwitchTag/SwitchTag.d.ts +17 -0
- package/dist/esm/components/Tabs/Tabs.d.ts +27 -0
- package/dist/esm/components/TagSelector/TagSelector.d.ts +25 -0
- package/dist/esm/components/Text/Animated.d.ts +17 -0
- package/dist/esm/components/Text/Text.d.ts +11 -0
- package/dist/esm/components/TextArea/TextArea.d.ts +19 -0
- package/dist/esm/index.js +441 -441
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +835 -0
- package/package.json +7 -3
|
@@ -5,14 +5,33 @@ import "react-dates/lib/css/_datepicker.css";
|
|
|
5
5
|
import "./react_dates_overrides.css";
|
|
6
6
|
declare const InputDateRange: (props: InputDateRangeProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
export default InputDateRange;
|
|
8
|
+
/**
|
|
9
|
+
* Date range picker powered by react-dates (Airbnb).
|
|
10
|
+
* Uses moment.js for date handling with Spanish localization.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```tsx
|
|
14
|
+
* <InputDateRange
|
|
15
|
+
* startDate={startDate}
|
|
16
|
+
* endDate={endDate}
|
|
17
|
+
* onChange={({ startDate, endDate }) => {
|
|
18
|
+
* setStartDate(startDate);
|
|
19
|
+
* setEndDate(endDate);
|
|
20
|
+
* }}
|
|
21
|
+
* isOutsideRange={(date) => date.isBefore(moment())}
|
|
22
|
+
* />
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
8
25
|
export interface InputDateRangeProps {
|
|
9
26
|
style?: CSSProperties;
|
|
10
27
|
startDate: moment.Moment | null;
|
|
11
28
|
endDate: moment.Moment | null;
|
|
12
29
|
focus?: boolean;
|
|
30
|
+
/** Callback fired when either date changes */
|
|
13
31
|
onChange: (data: {
|
|
14
32
|
startDate: moment.Moment | null;
|
|
15
33
|
endDate: moment.Moment | null;
|
|
16
34
|
}) => void;
|
|
35
|
+
/** Optional function to disable specific dates (return true to disable) */
|
|
17
36
|
isOutsideRange?: (date: moment.Moment) => boolean;
|
|
18
37
|
}
|
|
@@ -3,7 +3,22 @@ import "react-image-crop/dist/ReactCrop.css";
|
|
|
3
3
|
import "./input-image.css";
|
|
4
4
|
declare const InputImage: (props: InputImageProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
export default InputImage;
|
|
6
|
+
/**
|
|
7
|
+
* Image upload with crop, compression, and webcam capture.
|
|
8
|
+
* Uses react-image-crop for 1:1 aspect ratio cropping and compressorjs for compression.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```tsx
|
|
12
|
+
* <InputImage
|
|
13
|
+
* options={["camera", "library"]}
|
|
14
|
+
* maxHeight={1200}
|
|
15
|
+
* maxWidth={1200}
|
|
16
|
+
* onChange={(base64Image) => setProfilePhoto(base64Image)}
|
|
17
|
+
* />
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
6
20
|
export interface InputImageProps {
|
|
21
|
+
/** Image source options (shows modal on mobile if multiple). Default: ["library"] */
|
|
7
22
|
options?: Array<"camera" | "library">;
|
|
8
23
|
icon?: ReactElement;
|
|
9
24
|
style?: CSSProperties;
|
|
@@ -11,8 +26,12 @@ export interface InputImageProps {
|
|
|
11
26
|
buttonText?: string;
|
|
12
27
|
previewStyle?: CSSProperties;
|
|
13
28
|
label?: string;
|
|
29
|
+
/** Max height in pixels for compressed image */
|
|
14
30
|
maxHeight?: number;
|
|
31
|
+
/** Max width in pixels for compressed image */
|
|
15
32
|
maxWidth?: number;
|
|
33
|
+
/** Skip crop UI, immediately compress and return image */
|
|
16
34
|
hideCrop?: boolean;
|
|
35
|
+
/** Callback with base64-encoded WebP image */
|
|
17
36
|
onChange?: (image: string | ArrayBuffer | null) => void;
|
|
18
37
|
}
|
|
@@ -1,24 +1,53 @@
|
|
|
1
1
|
import { InputProps } from "../Basic/Input";
|
|
2
2
|
declare const InputLocation: ({ isLoaded, isForm, searchTypes, searchFields, onLocationChange, ...restProps }: InputLocationProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default InputLocation;
|
|
4
|
+
/**
|
|
5
|
+
* Location autocomplete input powered by Google Maps Places API.
|
|
6
|
+
* Debounced search (500ms) with structured address parsing in Spanish.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```tsx
|
|
10
|
+
* <InputLocation
|
|
11
|
+
* isLoaded={isGoogleMapsLoaded}
|
|
12
|
+
* placeholder="Introduce tu dirección"
|
|
13
|
+
* searchTypes={["address"]}
|
|
14
|
+
* searchFields={["geometry", "address_components"]}
|
|
15
|
+
* onLocationChange={(location) => {
|
|
16
|
+
* console.log(location.address);
|
|
17
|
+
* console.log(location.location); // { lat, lng }
|
|
18
|
+
* }}
|
|
19
|
+
* />
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
4
22
|
export type InputLocationProps = InputProps & {
|
|
23
|
+
/** If true, only shows route + number in input after selection */
|
|
5
24
|
isForm?: boolean;
|
|
25
|
+
/** Must be true when Google Maps API is loaded */
|
|
6
26
|
isLoaded: boolean;
|
|
27
|
+
/** Google Places API search types. Default: ["address"] */
|
|
7
28
|
searchTypes?: string[];
|
|
29
|
+
/** Google Places API fields to fetch. Default: ["geometry", "address_components"] */
|
|
8
30
|
searchFields?: string[];
|
|
31
|
+
/** Callback with parsed location data */
|
|
9
32
|
onLocationChange?: (result: LocationProps) => void;
|
|
10
33
|
};
|
|
11
34
|
export interface LocationProps {
|
|
35
|
+
/** Full formatted address string */
|
|
12
36
|
address?: string;
|
|
37
|
+
/** Short address (city, province, country) */
|
|
13
38
|
sortAddress?: string;
|
|
39
|
+
/** Street name */
|
|
14
40
|
route?: string;
|
|
41
|
+
/** Street number */
|
|
15
42
|
routeNumber?: string;
|
|
16
43
|
routeInfo?: string;
|
|
17
44
|
city?: string;
|
|
18
45
|
province?: string;
|
|
19
46
|
zipCode?: string;
|
|
20
47
|
country?: string;
|
|
48
|
+
/** ISO country code (e.g., "ES") */
|
|
21
49
|
shortCountry?: string;
|
|
50
|
+
/** Coordinates { lat, lng } */
|
|
22
51
|
location?: google.maps.LatLngLiteral;
|
|
23
52
|
timeZone?: string;
|
|
24
53
|
}
|
|
@@ -2,12 +2,33 @@ import { CountryProps } from "./SelectPhone";
|
|
|
2
2
|
import { InputProps } from "../Basic/Input";
|
|
3
3
|
declare const InputPhone: (props: InputPhoneProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export default InputPhone;
|
|
5
|
+
/**
|
|
6
|
+
* Phone input with country selector and validation using google-libphonenumber.
|
|
7
|
+
* Validates phone format for the selected country region.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```tsx
|
|
11
|
+
* <InputPhone
|
|
12
|
+
* country="ES"
|
|
13
|
+
* countryOptions={countryList}
|
|
14
|
+
* onPhoneChange={({ country, value, isValid }) => {
|
|
15
|
+
* if (isValid) setPhoneNumber(country + value);
|
|
16
|
+
* }}
|
|
17
|
+
* />
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
5
20
|
export type InputPhoneProps = InputProps & {
|
|
21
|
+
/** ISO country code (e.g., "ES") to pre-select */
|
|
6
22
|
country?: string;
|
|
23
|
+
/** Array of country options with prefix and countryCode */
|
|
7
24
|
countryOptions?: CountryProps[];
|
|
25
|
+
/** Callback fired on input change or country change with validation status */
|
|
8
26
|
onPhoneChange?: (item: {
|
|
27
|
+
/** Country prefix (e.g., "+34") */
|
|
9
28
|
country: string;
|
|
29
|
+
/** Phone number without prefix */
|
|
10
30
|
value?: string | number;
|
|
31
|
+
/** Whether phone is valid for selected country */
|
|
11
32
|
isValid: boolean;
|
|
12
33
|
}) => void;
|
|
13
34
|
};
|
|
@@ -1,21 +1,51 @@
|
|
|
1
1
|
import { CSSProperties } from "react";
|
|
2
2
|
declare const InputPrice: (props: InputPriceProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default InputPrice;
|
|
4
|
+
/**
|
|
5
|
+
* Price selector with predefined options in horizontal scroll and optional custom input.
|
|
6
|
+
* Auto-centers selected option, validates minimum price. Spanish number formatting.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```tsx
|
|
10
|
+
* <InputPrice
|
|
11
|
+
* options={[
|
|
12
|
+
* { price: 10, data: [{ title: "1 coffee", icon: "Coffee" }] },
|
|
13
|
+
* { price: 25, data: [{ title: "3 coffees", icon: "Coffee" }] },
|
|
14
|
+
* { price: 50 }
|
|
15
|
+
* ]}
|
|
16
|
+
* currency="€"
|
|
17
|
+
* label="Equivale a {{value}} cafés"
|
|
18
|
+
* labelValueConversion={0.1}
|
|
19
|
+
* defaultOption={25}
|
|
20
|
+
* onChange={(price) => setDonationAmount(price)}
|
|
21
|
+
* />
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
4
24
|
export type InputPriceProps = {
|
|
5
25
|
style?: CSSProperties;
|
|
6
26
|
containerStyle?: CSSProperties;
|
|
27
|
+
/** Predefined price options (scrollable horizontally) */
|
|
7
28
|
options: {
|
|
8
29
|
price: number;
|
|
30
|
+
/** Optional feature list shown below price with icons */
|
|
9
31
|
data?: {
|
|
10
32
|
title: string;
|
|
33
|
+
/** Lucide icon name (e.g., "Check", "Coffee") */
|
|
11
34
|
icon?: string;
|
|
12
35
|
}[];
|
|
13
36
|
}[];
|
|
37
|
+
/** Floating label above options. Use {{value}} for dynamic calculation */
|
|
14
38
|
label?: string;
|
|
39
|
+
/** Multiplier for {{value}} in label (e.g., 0.1 converts 100€ to "10 coffees") */
|
|
15
40
|
labelValueConversion?: number;
|
|
41
|
+
/** Currency symbol (e.g., "€", "$") */
|
|
16
42
|
currency: string;
|
|
43
|
+
/** Pre-select an option by price */
|
|
17
44
|
defaultOption?: number;
|
|
45
|
+
/** Hide custom amount input field */
|
|
18
46
|
hideCustomAmount?: boolean;
|
|
47
|
+
/** Custom element shown below custom amount input */
|
|
19
48
|
customAmountData?: React.ReactElement;
|
|
49
|
+
/** Callback with selected/entered price. Validates minimum from first option */
|
|
20
50
|
onChange?: (value: number) => void;
|
|
21
51
|
};
|
|
@@ -1,24 +1,55 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef } from "react";
|
|
2
2
|
declare const InputRange: (props: InputRangeProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default InputRange;
|
|
4
|
+
/**
|
|
5
|
+
* Range slider with heart icon thumb and optional milestone markers ("presents").
|
|
6
|
+
* Milestones animate with Lottie pop effect when value reaches them.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```tsx
|
|
10
|
+
* <InputRange
|
|
11
|
+
* min={0}
|
|
12
|
+
* max={100}
|
|
13
|
+
* unit="€"
|
|
14
|
+
* value={currentValue}
|
|
15
|
+
* presents={[
|
|
16
|
+
* { value: 25, icon: Gift, color: "#ccc", colorSuccess: "#0088ff", onClick: () => alert("25 reached!") },
|
|
17
|
+
* { value: 50, icon: Star, color: "#ccc", colorSuccess: "#0088ff" }
|
|
18
|
+
* ]}
|
|
19
|
+
* onChange={(e) => setValue(parseInt(e.target.value))}
|
|
20
|
+
* />
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
4
23
|
export interface InputRangeProps extends ComponentPropsWithoutRef<"input"> {
|
|
24
|
+
/** Color for filled portion of slider track */
|
|
5
25
|
lineColor?: string;
|
|
26
|
+
/** Color for unfilled portion of slider track */
|
|
6
27
|
backgroundColor?: string;
|
|
28
|
+
/** Color for heart icon thumb */
|
|
7
29
|
thumbColor?: string;
|
|
8
30
|
min?: number;
|
|
9
31
|
max?: number;
|
|
32
|
+
/** Unit label shown at min/max (e.g., "€", "kg") */
|
|
10
33
|
unit?: string;
|
|
34
|
+
/** Hide floating value tooltip above thumb */
|
|
11
35
|
hideRange?: boolean;
|
|
36
|
+
/** Hide min/max labels below slider */
|
|
12
37
|
hideLabels?: boolean;
|
|
38
|
+
/** Milestone markers with Lottie animation when reached */
|
|
13
39
|
presents?: {
|
|
40
|
+
/** Value at which to show marker */
|
|
14
41
|
value: number;
|
|
42
|
+
/** Lucide icon component */
|
|
15
43
|
icon: React.ComponentType<{
|
|
16
44
|
height?: number;
|
|
17
45
|
width?: number;
|
|
18
46
|
color?: string;
|
|
19
47
|
}>;
|
|
48
|
+
/** Color when milestone not reached */
|
|
20
49
|
color: string;
|
|
50
|
+
/** Color when milestone reached (slider value >= milestone value) */
|
|
21
51
|
colorSuccess: string;
|
|
52
|
+
/** Optional callback when marker is clicked */
|
|
22
53
|
onClick?: () => void;
|
|
23
54
|
}[];
|
|
24
55
|
}
|
|
@@ -1,12 +1,29 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef, ReactElement } from "react";
|
|
2
2
|
declare const Label: (props: Props) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default Label;
|
|
4
|
+
/**
|
|
5
|
+
* Label/badge component with status-aware coloring and two visual types.
|
|
6
|
+
* Automatically applies predefined colors for common status values (e.g., "pending", "active", "canceled").
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```tsx
|
|
10
|
+
* <Label type="label" text="active" />
|
|
11
|
+
* <Label type="chip" size="big" text="Pending" />
|
|
12
|
+
* <Label text="done" icon={<CheckIcon />} />
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
4
15
|
export interface Props extends ComponentPropsWithoutRef<"div"> {
|
|
16
|
+
/** Text to display. For predefined status values, color is automatically applied. */
|
|
5
17
|
text: string;
|
|
6
18
|
disabled?: boolean;
|
|
19
|
+
/** Visual variant: `label` for badges, `chip` for rounded buttons */
|
|
7
20
|
type?: "label" | "chip";
|
|
21
|
+
/** Size variant for chips: `big` (full text), `small` (initials only), `selector` (bordered) */
|
|
8
22
|
size?: "big" | "small" | "selector";
|
|
23
|
+
/** Optional icon displayed before the text */
|
|
9
24
|
icon?: ReactElement;
|
|
25
|
+
/** Custom background color (overrides automatic status colors) */
|
|
10
26
|
backgroundColor?: string;
|
|
27
|
+
/** Custom text color (overrides automatic status colors) */
|
|
11
28
|
color?: string;
|
|
12
29
|
}
|
|
@@ -1,24 +1,52 @@
|
|
|
1
1
|
import { CSSProperties } from 'react';
|
|
2
2
|
declare const MenuList: import("react").ForwardRefExoticComponent<MenuProps & import("react").RefAttributes<MenuRef>>;
|
|
3
3
|
export default MenuList;
|
|
4
|
+
/**
|
|
5
|
+
* Dropdown menu component with customizable positioning and icon trigger.
|
|
6
|
+
* Automatically closes when clicking outside. Supports both predefined options and custom children.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```tsx
|
|
10
|
+
* <Menu
|
|
11
|
+
* id="actions-menu"
|
|
12
|
+
* position="bottom-right"
|
|
13
|
+
* options={[
|
|
14
|
+
* { id: "edit", label: "Edit", icon: <EditIcon /> },
|
|
15
|
+
* { id: "delete", label: "Delete", labelColor: "red" }
|
|
16
|
+
* ]}
|
|
17
|
+
* onClick={(option) => handleAction(option.id)}
|
|
18
|
+
* />
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
4
21
|
export interface MenuProps {
|
|
22
|
+
/** Unique identifier required for click-outside detection */
|
|
5
23
|
id: string;
|
|
6
24
|
style?: CSSProperties;
|
|
25
|
+
/** Custom styles for the dropdown menu container */
|
|
7
26
|
menuStyle?: CSSProperties;
|
|
27
|
+
/** Icon for the button trigger (lowercase, used with Button component) */
|
|
8
28
|
icon?: React.ReactElement;
|
|
29
|
+
/** Icon element for custom trigger (uppercase, replaces Button) */
|
|
9
30
|
Icon?: React.ReactElement;
|
|
31
|
+
/** Positioning of the dropdown relative to the trigger button */
|
|
10
32
|
position: 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left';
|
|
33
|
+
/** Custom content to display in menu (alternative to options) */
|
|
11
34
|
children?: React.ReactNode;
|
|
35
|
+
/** Array of menu items with labels and icons */
|
|
12
36
|
options?: Array<OptionsProps>;
|
|
37
|
+
/** Callback fired when menu visibility changes */
|
|
13
38
|
onChange?: (visible: boolean) => void;
|
|
39
|
+
/** Callback fired when a menu option is clicked */
|
|
14
40
|
onClick?: (option: OptionsProps) => void;
|
|
15
41
|
}
|
|
16
42
|
export interface OptionsProps {
|
|
17
43
|
id: string;
|
|
18
44
|
label: string;
|
|
45
|
+
/** Custom text color for the label */
|
|
19
46
|
labelColor?: string;
|
|
20
47
|
icon?: React.ReactElement;
|
|
21
48
|
}
|
|
22
49
|
export interface MenuRef {
|
|
50
|
+
/** Programmatically close the menu */
|
|
23
51
|
close: () => void;
|
|
24
52
|
}
|
|
@@ -1,12 +1,30 @@
|
|
|
1
1
|
import { ModalPrimaryProps, ModalRef } from "./ModalPrimary";
|
|
2
2
|
declare const ModalComponent: import("react").ForwardRefExoticComponent<ModalProps & import("react").RefAttributes<ModalRef>>;
|
|
3
3
|
export default ModalComponent;
|
|
4
|
+
/**
|
|
5
|
+
* Modal dialog component with three display modes: default, form, and web.
|
|
6
|
+
* Use `type="form"` with `options` for structured form layouts, or `type="web"` with `url` to embed external content.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```tsx
|
|
10
|
+
* <Modal
|
|
11
|
+
* type="form"
|
|
12
|
+
* isVisible={isOpen}
|
|
13
|
+
* options={[
|
|
14
|
+
* { id: "name", title: "Name", Data: <Input /> },
|
|
15
|
+
* { id: "separator" }
|
|
16
|
+
* ]}
|
|
17
|
+
* />
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
4
20
|
export interface ModalProps extends ModalPrimaryProps {
|
|
21
|
+
/** Array of form field configurations for `type="form"`. Each item creates a labeled row or separator. */
|
|
5
22
|
options?: Array<{
|
|
6
23
|
id: string;
|
|
7
24
|
title?: string;
|
|
8
25
|
Data?: React.ReactElement;
|
|
9
26
|
hidden?: boolean;
|
|
10
27
|
}>;
|
|
28
|
+
/** External URL to display in an iframe when `type="web"` */
|
|
11
29
|
url?: string;
|
|
12
30
|
}
|
|
@@ -1,10 +1,28 @@
|
|
|
1
1
|
import { CSSProperties } from "react";
|
|
2
2
|
declare const Pagination: (props: Props) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default Pagination;
|
|
4
|
+
/**
|
|
5
|
+
* Pagination control with first/previous/next/last navigation buttons.
|
|
6
|
+
* Displays current page number and total pages (e.g., "1 de 5").
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```tsx
|
|
10
|
+
* <Pagination
|
|
11
|
+
* length={100}
|
|
12
|
+
* rowsPerPage={10}
|
|
13
|
+
* start={0}
|
|
14
|
+
* onChange={(page) => fetchData(page)}
|
|
15
|
+
* />
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
4
18
|
export interface Props {
|
|
5
19
|
style?: CSSProperties;
|
|
20
|
+
/** Initial/controlled page index (0-based) */
|
|
6
21
|
start?: number;
|
|
22
|
+
/** Total number of items to paginate */
|
|
7
23
|
length: number;
|
|
24
|
+
/** Number of items to display per page */
|
|
8
25
|
rowsPerPage: number;
|
|
26
|
+
/** Callback fired when page changes, receives new page index (0-based) */
|
|
9
27
|
onChange?: (page: number) => void;
|
|
10
28
|
}
|
|
@@ -2,22 +2,54 @@ import { CSSProperties } from "react";
|
|
|
2
2
|
import { PaymentMethod } from "@stripe/stripe-js";
|
|
3
3
|
declare const Payout: import("react").ForwardRefExoticComponent<PayoutProps & import("react").RefAttributes<PayoutRef>>;
|
|
4
4
|
export default Payout;
|
|
5
|
+
/**
|
|
6
|
+
* Stripe payment method setup component supporting card and SEPA direct debit.
|
|
7
|
+
* Handles 3D Secure authentication flow in modal. Requires Stripe publishable key.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```tsx
|
|
11
|
+
* const payoutRef = useRef<PayoutRef>(null);
|
|
12
|
+
*
|
|
13
|
+
* <Payout
|
|
14
|
+
* ref={payoutRef}
|
|
15
|
+
* stripeKey={process.env.STRIPE_KEY}
|
|
16
|
+
* paymentOption="card"
|
|
17
|
+
* design="secondary"
|
|
18
|
+
* onLoading={(loading) => setIsLoading(loading)}
|
|
19
|
+
* onSetupConfirmed={() => handleSuccess()}
|
|
20
|
+
* />
|
|
21
|
+
*
|
|
22
|
+
* // Get payment method
|
|
23
|
+
* const method = await payoutRef.current?.getPaymentMethod();
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
5
26
|
export interface PayoutProps {
|
|
6
27
|
style?: CSSProperties;
|
|
28
|
+
/** Stripe publishable API key (starts with pk_) */
|
|
7
29
|
stripeKey: string;
|
|
30
|
+
/** 3D Secure confirmation URL from Stripe setup intent */
|
|
8
31
|
stripeConfirmUrl?: string;
|
|
32
|
+
/** Payment method type: credit/debit card or SEPA direct debit */
|
|
9
33
|
paymentOption: "sepa_debit" | "card";
|
|
34
|
+
/** Custom styles for the card input form */
|
|
10
35
|
cardStyle?: CSSProperties;
|
|
11
36
|
error?: boolean;
|
|
37
|
+
/** Pre-filled user data (email required for SEPA) */
|
|
12
38
|
userData?: {
|
|
13
39
|
email?: string;
|
|
14
40
|
};
|
|
41
|
+
/** Visual design variant */
|
|
15
42
|
design?: "primary" | "secondary";
|
|
43
|
+
/** Custom placeholder for name input */
|
|
16
44
|
placeholderName?: string;
|
|
45
|
+
/** Custom placeholder for email input */
|
|
17
46
|
placeholderEmail?: string;
|
|
47
|
+
/** Callback fired when 3D Secure authentication completes successfully */
|
|
18
48
|
onSetupConfirmed?: () => void;
|
|
49
|
+
/** Callback fired when loading state changes */
|
|
19
50
|
onLoading?: (a: boolean) => void;
|
|
20
51
|
}
|
|
21
52
|
export interface PayoutRef {
|
|
53
|
+
/** Collects payment method from Stripe and returns payment method object */
|
|
22
54
|
getPaymentMethod: () => Promise<PaymentMethod | undefined>;
|
|
23
55
|
}
|
|
@@ -1,15 +1,35 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef } from "react";
|
|
2
2
|
declare const ProgressBar: (props: Props) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default ProgressBar;
|
|
4
|
+
/**
|
|
5
|
+
* Animated progress bar supporting single or multiple progress indicators with optional percentage display.
|
|
6
|
+
* Smoothly transitions to new values with configurable animation timing.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```tsx
|
|
10
|
+
* <ProgressBar
|
|
11
|
+
* progress={75}
|
|
12
|
+
* showPercentage
|
|
13
|
+
* animationTime={1.5}
|
|
14
|
+
* />
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
4
17
|
export interface Props extends ComponentPropsWithoutRef<"div"> {
|
|
18
|
+
/** Current progress value or array of multiple progress values with optional colors */
|
|
5
19
|
progress: number | Array<{
|
|
6
20
|
value: number;
|
|
7
21
|
color?: string;
|
|
8
22
|
}>;
|
|
23
|
+
/** Minimum value for progress calculation (default: 0) */
|
|
9
24
|
minValue?: number;
|
|
25
|
+
/** Maximum value for progress calculation (default: 100) */
|
|
10
26
|
maxValue?: number;
|
|
27
|
+
/** Bar color (overrides default primary color) */
|
|
11
28
|
color?: string;
|
|
29
|
+
/** Animation duration in seconds */
|
|
12
30
|
animationTime?: number;
|
|
31
|
+
/** Delay in seconds before animation starts */
|
|
13
32
|
animationDelay?: number;
|
|
33
|
+
/** Display percentage badge above progress bar */
|
|
14
34
|
showPercentage?: boolean;
|
|
15
35
|
}
|
|
@@ -1,15 +1,37 @@
|
|
|
1
1
|
import { CSSProperties } from "react";
|
|
2
2
|
declare const RadioButtonList: (props: Props) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default RadioButtonList;
|
|
4
|
+
/**
|
|
5
|
+
* Radio button list supporting single or multiple selection.
|
|
6
|
+
* Each option can contain any React content (text, images, custom components).
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```tsx
|
|
10
|
+
* <RadioButtonList
|
|
11
|
+
* type="single"
|
|
12
|
+
* options={[
|
|
13
|
+
* { id: "1", children: <div>Option 1</div>, selected: true },
|
|
14
|
+
* { id: "2", children: <div>Option 2</div> }
|
|
15
|
+
* ]}
|
|
16
|
+
* onChange={(selected) => console.log(selected)}
|
|
17
|
+
* />
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
4
20
|
export interface Props {
|
|
21
|
+
/** Array of radio button options with custom content */
|
|
5
22
|
options: Array<OptionProps>;
|
|
23
|
+
/** Selection mode: `single` for radio behavior, `multiple` for checkboxes */
|
|
6
24
|
type: "single" | "multiple";
|
|
7
25
|
style?: CSSProperties;
|
|
26
|
+
/** Custom styles applied to each radio button cell */
|
|
8
27
|
cellStyle?: CSSProperties;
|
|
28
|
+
/** Callback fired when selection changes, receives array of selected options */
|
|
9
29
|
onChange?: (data: Array<OptionProps>) => void;
|
|
10
30
|
}
|
|
11
31
|
interface OptionProps {
|
|
12
32
|
id: string;
|
|
33
|
+
/** Custom React content to display in the radio button */
|
|
13
34
|
children: React.ReactNode;
|
|
35
|
+
/** Initial selected state */
|
|
14
36
|
selected?: boolean;
|
|
15
37
|
}
|
|
@@ -1,7 +1,23 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef } from "react";
|
|
2
2
|
declare const SearchBar: (props: Props) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default SearchBar;
|
|
4
|
+
/**
|
|
5
|
+
* Search input with magnifying glass icon. Supports two sizes and visual designs.
|
|
6
|
+
* Auto-focuses on click and changes style on interaction.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```tsx
|
|
10
|
+
* <SearchBar
|
|
11
|
+
* type="big"
|
|
12
|
+
* design="primary"
|
|
13
|
+
* placeholder="Search..."
|
|
14
|
+
* onChange={(e) => handleSearch(e.target.value)}
|
|
15
|
+
* />
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
4
18
|
export interface Props extends ComponentPropsWithoutRef<"input"> {
|
|
19
|
+
/** Size variant: `big` (48px height) or `small` (38px height) */
|
|
5
20
|
type?: "big" | "small";
|
|
21
|
+
/** Visual design: `primary` (gray background) or `secondary` (white with border) */
|
|
6
22
|
design?: "primary" | "secondary";
|
|
7
23
|
}
|
|
@@ -1,15 +1,40 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef, CSSProperties } from "react";
|
|
2
2
|
declare const Select: (props: Props) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default Select;
|
|
4
|
+
/**
|
|
5
|
+
* Dropdown select component with icons and keyboard-friendly navigation.
|
|
6
|
+
* Auto-closes when clicking outside. Supports controlled and uncontrolled modes.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```tsx
|
|
10
|
+
* <Select
|
|
11
|
+
* id="language-select"
|
|
12
|
+
* options={[
|
|
13
|
+
* { label: "English", icon: <FlagIcon /> },
|
|
14
|
+
* { label: "Spanish", icon: <FlagIcon /> }
|
|
15
|
+
* ]}
|
|
16
|
+
* selectedItem={currentLanguage}
|
|
17
|
+
* onChange={(option) => setLanguage(option)}
|
|
18
|
+
* />
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
4
21
|
export interface Props extends Omit<ComponentPropsWithoutRef<"div">, "onChange"> {
|
|
22
|
+
/** Unique identifier required for click-outside detection */
|
|
5
23
|
id: string;
|
|
24
|
+
/** Custom styles for the dropdown options container */
|
|
6
25
|
optionStyle?: CSSProperties;
|
|
26
|
+
/** Hide the selected item label (icon-only mode) */
|
|
7
27
|
hideTitle?: boolean;
|
|
28
|
+
/** Array of selectable options */
|
|
8
29
|
options: Array<OptionProps>;
|
|
30
|
+
/** Current selected option (controlled component) */
|
|
9
31
|
selectedItem?: OptionProps;
|
|
32
|
+
/** Callback fired when selection changes */
|
|
10
33
|
onChange?: (option: OptionProps) => void;
|
|
11
34
|
}
|
|
12
35
|
interface OptionProps {
|
|
36
|
+
/** Optional icon displayed before label */
|
|
13
37
|
icon?: React.ReactElement;
|
|
38
|
+
/** Display text for the option */
|
|
14
39
|
label: string;
|
|
15
40
|
}
|
|
@@ -1,9 +1,25 @@
|
|
|
1
1
|
import { CSSProperties } from "react";
|
|
2
2
|
declare const Stamp: (props: StampProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default Stamp;
|
|
4
|
+
/**
|
|
5
|
+
* Decorative postage stamp component with perforated edges.
|
|
6
|
+
* Displays an emoji icon and title. Responsive sizing for mobile.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```tsx
|
|
10
|
+
* <Stamp
|
|
11
|
+
* icon="🎉"
|
|
12
|
+
* title="Celebration"
|
|
13
|
+
* backgroundColor={ColorV2.surface.greenSoft}
|
|
14
|
+
* />
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
4
17
|
export interface StampProps {
|
|
5
18
|
style?: CSSProperties;
|
|
19
|
+
/** Emoji or single character to display (rendered large) */
|
|
6
20
|
icon: string;
|
|
21
|
+
/** Text label below the icon (truncates with ellipsis) */
|
|
7
22
|
title: string;
|
|
23
|
+
/** Background color for the icon area */
|
|
8
24
|
backgroundColor: string;
|
|
9
25
|
}
|
|
@@ -1,7 +1,23 @@
|
|
|
1
1
|
declare const Switch: (props: SwitchProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
2
|
export default Switch;
|
|
3
|
+
/**
|
|
4
|
+
* Toggle switch component with sliding animation and checkmark indicator.
|
|
5
|
+
* Changes color and position when toggled on/off.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```tsx
|
|
9
|
+
* <Switch
|
|
10
|
+
* active={isEnabled}
|
|
11
|
+
* color={ColorV2.surface.primary}
|
|
12
|
+
* onChange={(on) => setIsEnabled(on)}
|
|
13
|
+
* />
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
3
16
|
export interface SwitchProps {
|
|
17
|
+
/** Current state (controlled component) */
|
|
4
18
|
active?: boolean;
|
|
19
|
+
/** Custom color when active (default: primary) */
|
|
5
20
|
color?: string;
|
|
21
|
+
/** Callback fired when toggled, receives new state */
|
|
6
22
|
onChange?: (on: boolean) => void;
|
|
7
23
|
}
|