@adoptaunabuelo/react-components 0.3.146 → 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 +4 -4
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +835 -0
- package/package.json +1 -1
|
@@ -1,10 +1,29 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef } from "react";
|
|
2
2
|
declare const Avatar: (props: Props) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default Avatar;
|
|
4
|
+
/**
|
|
5
|
+
* Circular avatar component supporting images, initials, and file upload.
|
|
6
|
+
* Click to view full-size image or to upload new one when editable.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```tsx
|
|
10
|
+
* <Avatar
|
|
11
|
+
* icon={userImageUrl}
|
|
12
|
+
* name="John Doe"
|
|
13
|
+
* editable
|
|
14
|
+
* onChange={(file) => uploadAvatar(file)}
|
|
15
|
+
* />
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
4
18
|
export interface Props extends Omit<ComponentPropsWithoutRef<"div">, "onChange"> {
|
|
19
|
+
/** Image URL to display */
|
|
5
20
|
icon?: string;
|
|
21
|
+
/** User name (displays first letter as fallback when no icon) */
|
|
6
22
|
name?: string;
|
|
23
|
+
/** Enable file upload on click (accepts jpg, jpeg, png, gif) */
|
|
7
24
|
editable?: boolean;
|
|
25
|
+
/** Enable click to view full-size image in modal */
|
|
8
26
|
clickable?: boolean;
|
|
27
|
+
/** Callback fired when new image is selected, receives base64-encoded file */
|
|
9
28
|
onChange?: (file: string | ArrayBuffer | null) => void;
|
|
10
29
|
}
|
|
@@ -1,7 +1,18 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef } from "react";
|
|
2
2
|
declare const BreadCrumb: ({ steps, selectedStep, ...restProps }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default BreadCrumb;
|
|
4
|
+
/**
|
|
5
|
+
* Step indicator component displaying circular dots to show progress through a multi-step flow.
|
|
6
|
+
* Highlights the current active step with primary color.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```tsx
|
|
10
|
+
* <BreadCrumb steps={4} selectedStep={1} />
|
|
11
|
+
* ```
|
|
12
|
+
*/
|
|
4
13
|
export interface Props extends ComponentPropsWithoutRef<"div"> {
|
|
14
|
+
/** Current active step index (0-based) */
|
|
5
15
|
selectedStep?: number;
|
|
16
|
+
/** Total number of steps to display */
|
|
6
17
|
steps: number;
|
|
7
18
|
}
|
|
@@ -1,17 +1,36 @@
|
|
|
1
1
|
import React, { ComponentPropsWithoutRef } from "react";
|
|
2
2
|
declare const Button: ({ design, onSuccess, ...restProps }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default Button;
|
|
4
|
+
/**
|
|
5
|
+
* Button component with multiple visual variants and built-in loading/success states.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```tsx
|
|
9
|
+
* <Button design="primary" loading={isLoading}>
|
|
10
|
+
* Submit
|
|
11
|
+
* </Button>
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
4
14
|
export interface ButtonProps extends ComponentPropsWithoutRef<"button"> {
|
|
15
|
+
/** Visual variant: `primary` for main actions, `secondary` for less emphasis, `text` for minimal style, `image` for icon-only, `call-to-action` for prominent CTAs */
|
|
5
16
|
design?: "primary" | "secondary" | "text" | "image" | "call-to-action";
|
|
17
|
+
/** Button size: `normal` (default) or `small` for compact layouts */
|
|
6
18
|
size?: "small" | "normal";
|
|
7
19
|
icon?: React.ReactElement;
|
|
8
20
|
iconPosition?: "left" | "right";
|
|
21
|
+
/** Shows animated loading spinner (Lottie animation) */
|
|
9
22
|
loading?: boolean;
|
|
10
23
|
disabled?: boolean;
|
|
24
|
+
/** Triggers success animation (Lottie checkmark) */
|
|
11
25
|
success?: boolean;
|
|
26
|
+
/** Delay in milliseconds before showing loading animation */
|
|
12
27
|
animationDelay?: number;
|
|
28
|
+
/** Duration in milliseconds for success animation before callback */
|
|
13
29
|
animationTime?: number;
|
|
30
|
+
/** Time in seconds to display countdown on button */
|
|
14
31
|
countdown?: number;
|
|
32
|
+
/** Callback fired when success animation completes */
|
|
15
33
|
onSuccess?: (success: boolean) => void;
|
|
34
|
+
/** Callback fired when countdown reaches zero */
|
|
16
35
|
onCountdownEnd?: () => void;
|
|
17
36
|
}
|
|
@@ -1,20 +1,48 @@
|
|
|
1
1
|
import { CSSProperties, ReactElement } from "react";
|
|
2
2
|
declare const CellSelector: (props: Props) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default CellSelector;
|
|
4
|
+
/**
|
|
5
|
+
* Grid of selectable cells with icons, titles, and optional subtitles.
|
|
6
|
+
* Supports single or multiple selection with visual feedback and hover states.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```tsx
|
|
10
|
+
* <CellSelector
|
|
11
|
+
* type="multiple"
|
|
12
|
+
* options={[
|
|
13
|
+
* { id: "1", title: "Option 1", icon: <Icon />, subtitle: "Description" },
|
|
14
|
+
* { id: "2", title: "Option 2", icon: <Icon />, disabled: true }
|
|
15
|
+
* ]}
|
|
16
|
+
* selectedOptions={selected}
|
|
17
|
+
* onChange={(items) => setSelected(items)}
|
|
18
|
+
* />
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
4
21
|
export interface Props {
|
|
5
22
|
style?: CSSProperties;
|
|
23
|
+
/** Custom styles applied to each cell */
|
|
6
24
|
cellStyle?: CSSProperties;
|
|
25
|
+
/** Array of selectable cell options */
|
|
7
26
|
options: Array<OptionProps>;
|
|
27
|
+
/** Currently selected options (controlled component) */
|
|
8
28
|
selectedOptions?: Array<OptionProps>;
|
|
29
|
+
/** Selection mode: `single` for radio behavior, `multiple` for checkboxes */
|
|
9
30
|
type?: "single" | "multiple";
|
|
31
|
+
/** Callback fired when selection changes, receives array of selected options */
|
|
10
32
|
onChange?: (array: Array<OptionProps>) => void;
|
|
33
|
+
/** Callback fired when individual cell is clicked */
|
|
11
34
|
onClick?: (item: OptionProps) => void;
|
|
35
|
+
/** Visual design variant */
|
|
12
36
|
design?: "design1" | "design2";
|
|
13
37
|
}
|
|
14
38
|
export interface OptionProps {
|
|
15
39
|
id: string;
|
|
40
|
+
/** Main title displayed in the cell */
|
|
16
41
|
title: string;
|
|
42
|
+
/** Optional subtitle displayed below the cell */
|
|
17
43
|
subtitle?: string;
|
|
44
|
+
/** Icon displayed at the top of the cell */
|
|
18
45
|
icon?: ReactElement;
|
|
46
|
+
/** Disables cell interaction and applies opacity */
|
|
19
47
|
disabled?: boolean;
|
|
20
48
|
}
|
|
@@ -3,17 +3,36 @@ import { ChatMessageProps } from "./ChatBubble";
|
|
|
3
3
|
import "./ChatBubble.css";
|
|
4
4
|
declare const Chat: (props: ChatProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
export default Chat;
|
|
6
|
+
/**
|
|
7
|
+
* Full-featured chat interface with message history, template support, and media uploads.
|
|
8
|
+
* Automatically groups messages by date and shows template prompt when last message is > 24 hours old.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```tsx
|
|
12
|
+
* <Chat
|
|
13
|
+
* messages={chatMessages}
|
|
14
|
+
* templates={messageTemplates}
|
|
15
|
+
* loading={isSending}
|
|
16
|
+
* onSend={(data) => handleSendMessage(data)}
|
|
17
|
+
* />
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
6
20
|
export interface ChatProps {
|
|
7
21
|
style?: CSSProperties;
|
|
22
|
+
/** Array of chat messages to display, grouped automatically by date */
|
|
8
23
|
messages: ChatMessageProps[];
|
|
24
|
+
/** Shows loading spinner in input when true */
|
|
9
25
|
loading?: boolean;
|
|
26
|
+
/** Placeholder text for the input field */
|
|
10
27
|
placeholder?: string;
|
|
28
|
+
/** Available message templates shown when conversation is inactive (>24 hrs) */
|
|
11
29
|
templates: {
|
|
12
30
|
id: string;
|
|
13
31
|
title: string;
|
|
14
32
|
subtitle: string;
|
|
15
33
|
description: string;
|
|
16
34
|
}[];
|
|
35
|
+
/** Callback fired when user sends a message, template, or uploads media */
|
|
17
36
|
onSend: (data: {
|
|
18
37
|
text?: string;
|
|
19
38
|
template?: string;
|
|
@@ -9,18 +9,43 @@ export type CheckboxOption = {
|
|
|
9
9
|
error?: boolean;
|
|
10
10
|
[key: string]: string | React.ReactElement | boolean | undefined;
|
|
11
11
|
};
|
|
12
|
+
/**
|
|
13
|
+
* Checkbox list component supporting single or multiple selection modes.
|
|
14
|
+
* Renders a collection of checkboxes with optional labels, icons, and custom elements.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```tsx
|
|
18
|
+
* <CheckboxList
|
|
19
|
+
* type="multiple"
|
|
20
|
+
* options={[
|
|
21
|
+
* { id: "1", label: "Option 1" },
|
|
22
|
+
* { id: "2", label: "Option 2", sublabel: "Description" }
|
|
23
|
+
* ]}
|
|
24
|
+
* onChange={(selected) => console.log(selected)}
|
|
25
|
+
* />
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
12
28
|
export interface Props {
|
|
13
29
|
style?: CSSProperties;
|
|
30
|
+
/** Custom styles applied to each individual checkbox element */
|
|
14
31
|
elementStyle?: CSSProperties;
|
|
15
32
|
options: Array<CheckboxOption>;
|
|
33
|
+
/** Pre-selected options (controlled component pattern) */
|
|
16
34
|
selectedOptions?: Array<{
|
|
17
35
|
id: string;
|
|
18
36
|
}>;
|
|
37
|
+
/** Height in pixels for each checkbox */
|
|
19
38
|
height?: number;
|
|
39
|
+
/** Width in pixels for each checkbox */
|
|
20
40
|
width?: number;
|
|
41
|
+
/** Selection mode: `single` for radio-like behavior, `multiple` for checkboxes */
|
|
21
42
|
type: "single" | "multiple";
|
|
43
|
+
/** Callback fired when selection changes, receives array of selected options */
|
|
22
44
|
onChange?: (result: Array<CheckboxOption>) => void;
|
|
45
|
+
/** Position of the checkbox indicator relative to content */
|
|
23
46
|
position?: "left" | "right";
|
|
47
|
+
/** Show avatar-style circular checkboxes */
|
|
24
48
|
avatarEnabled?: boolean;
|
|
49
|
+
/** Visual shape of the checkbox indicator */
|
|
25
50
|
shape?: "circle" | "square";
|
|
26
51
|
}
|
|
@@ -2,8 +2,25 @@ import { ComponentPropsWithoutRef } from "react";
|
|
|
2
2
|
import "moment/locale/es";
|
|
3
3
|
declare const Countdown: (props: Props) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export default Countdown;
|
|
5
|
+
/**
|
|
6
|
+
* Countdown timer displaying human-readable time remaining or elapsed.
|
|
7
|
+
* Auto-warns with red background when less than 2 hours remain.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```tsx
|
|
11
|
+
* <Countdown
|
|
12
|
+
* toDate={new Date("2024-12-31")}
|
|
13
|
+
* color={ColorV2.surface.primary}
|
|
14
|
+
* textColor={ColorV2.text.white}
|
|
15
|
+
* />
|
|
16
|
+
* // Shows: "3 días restantes" or "2 horas de retraso"
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
5
19
|
export interface Props extends ComponentPropsWithoutRef<"div"> {
|
|
20
|
+
/** Target date to count down to (or count up from if past) */
|
|
6
21
|
toDate: Date;
|
|
22
|
+
/** Background color (overridden by warning red when <2h remain) */
|
|
7
23
|
color?: string;
|
|
24
|
+
/** Text and icon color (overridden by white when warning) */
|
|
8
25
|
textColor?: string;
|
|
9
26
|
}
|
|
@@ -1,11 +1,32 @@
|
|
|
1
1
|
declare function Counter(props: Props): import("react/jsx-runtime").JSX.Element;
|
|
2
2
|
export default Counter;
|
|
3
|
+
/**
|
|
4
|
+
* Animated flip-clock style counter that animates from zero to the target amount.
|
|
5
|
+
* Each digit flips individually with a smooth animation effect.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```tsx
|
|
9
|
+
* <Counter
|
|
10
|
+
* amount={12345}
|
|
11
|
+
* height={60}
|
|
12
|
+
* width={40}
|
|
13
|
+
* fontSize={32}
|
|
14
|
+
* />
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
3
17
|
export interface Props {
|
|
18
|
+
/** Height in pixels for each digit block */
|
|
4
19
|
height: number;
|
|
20
|
+
/** Width in pixels for each digit block */
|
|
5
21
|
width: number;
|
|
22
|
+
/** Target number to count up to (animates from amount-10 or 0) */
|
|
6
23
|
amount: number;
|
|
24
|
+
/** Text color for the digits */
|
|
7
25
|
color?: string;
|
|
26
|
+
/** Background color for each digit block */
|
|
8
27
|
backgroundColor?: string;
|
|
28
|
+
/** Border/divider color between digit segments */
|
|
9
29
|
borderColor?: string;
|
|
30
|
+
/** Font size in pixels for the numbers */
|
|
10
31
|
fontSize?: number;
|
|
11
32
|
}
|
|
@@ -1,13 +1,36 @@
|
|
|
1
1
|
declare const CurrencySelector: (props: CurrencySelectorProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
2
|
export default CurrencySelector;
|
|
3
|
+
/**
|
|
4
|
+
* Currency selector dropdown with modal for choosing from available currencies.
|
|
5
|
+
* Displays symbol and currency code (e.g., "€ EUR"). Responsive with full-screen modal on mobile.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```tsx
|
|
9
|
+
* <CurrencySelector
|
|
10
|
+
* options={[
|
|
11
|
+
* { currency: "EUR", name: "Euro", symbol: "€" },
|
|
12
|
+
* { currency: "USD", name: "US Dollar", symbol: "$" },
|
|
13
|
+
* { currency: "GBP", name: "British Pound", symbol: "£" }
|
|
14
|
+
* ]}
|
|
15
|
+
* selectedOption={{ currency: "EUR", name: "Euro", symbol: "€" }}
|
|
16
|
+
* onChange={(option) => setCurrency(option.currency)}
|
|
17
|
+
* />
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
3
20
|
export interface CurrencySelectorProps {
|
|
4
21
|
style?: React.CSSProperties;
|
|
22
|
+
/** Available currency options */
|
|
5
23
|
options: CurrencySelectorOption[];
|
|
24
|
+
/** Currently selected currency (defaults to first option) */
|
|
6
25
|
selectedOption?: CurrencySelectorOption;
|
|
26
|
+
/** Callback when currency is selected */
|
|
7
27
|
onChange?: (option: CurrencySelectorOption) => void;
|
|
8
28
|
}
|
|
9
29
|
interface CurrencySelectorOption {
|
|
30
|
+
/** ISO currency code (e.g., "EUR", "USD") */
|
|
10
31
|
currency: string;
|
|
32
|
+
/** Full currency name (e.g., "Euro") */
|
|
11
33
|
name: string;
|
|
34
|
+
/** Currency symbol (e.g., "€", "$") */
|
|
12
35
|
symbol: string;
|
|
13
36
|
}
|
|
@@ -1,21 +1,50 @@
|
|
|
1
1
|
import { CSSProperties } from "react";
|
|
2
2
|
declare const Dropdown: (props: Props) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default Dropdown;
|
|
4
|
+
/**
|
|
5
|
+
* Dropdown select with optional search, multi-select, and icon support.
|
|
6
|
+
* Auto-closes when clicking outside. Displays selected items as comma-separated text.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```tsx
|
|
10
|
+
* <Dropdown
|
|
11
|
+
* id="category-dropdown"
|
|
12
|
+
* placeholder="Select categories"
|
|
13
|
+
* type="multiple"
|
|
14
|
+
* options={categories}
|
|
15
|
+
* selectedOptions={selected}
|
|
16
|
+
* onSearchChange={(text) => filterOptions(text)}
|
|
17
|
+
* onChange={(items) => setSelected(items)}
|
|
18
|
+
* />
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
4
21
|
export interface Props {
|
|
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
|
+
/** Custom styles for individual option items */
|
|
8
28
|
optionStyle?: CSSProperties;
|
|
29
|
+
/** Array of selectable options */
|
|
9
30
|
options: Array<OptionProps>;
|
|
31
|
+
/** Placeholder text shown when nothing is selected */
|
|
10
32
|
placeholder: string;
|
|
33
|
+
/** Currently selected options (controlled component) */
|
|
11
34
|
selectedOptions?: Array<OptionProps>;
|
|
35
|
+
/** Selection mode: `single` for one item, `multiple` for checkboxes */
|
|
12
36
|
type?: "single" | "multiple";
|
|
37
|
+
/** Position of dropdown menu relative to trigger */
|
|
13
38
|
menuPosition?: "bottom" | "top";
|
|
39
|
+
/** Callback fired when selection changes */
|
|
14
40
|
onChange?: (a: Array<OptionProps>) => void;
|
|
41
|
+
/** Callback fired when search input changes, enables search functionality */
|
|
15
42
|
onSearchChange?: (text: string) => void;
|
|
16
43
|
}
|
|
17
44
|
export interface OptionProps {
|
|
18
45
|
id: string;
|
|
46
|
+
/** Display text for the option */
|
|
19
47
|
title?: string;
|
|
48
|
+
/** Optional icon displayed before title */
|
|
20
49
|
icon?: React.ReactElement;
|
|
21
50
|
}
|
|
@@ -1,12 +1,34 @@
|
|
|
1
1
|
import { CSSProperties } from "react";
|
|
2
2
|
declare const FAQs: (props: Props) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default FAQs;
|
|
4
|
+
/**
|
|
5
|
+
* FAQ accordion component with expandable/collapsible question-answer pairs.
|
|
6
|
+
* Only one question can be expanded at a time.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```tsx
|
|
10
|
+
* <FAQs
|
|
11
|
+
* options={[
|
|
12
|
+
* {
|
|
13
|
+
* id: "1",
|
|
14
|
+
* title: "How do I get started?",
|
|
15
|
+
* description: "To get started, simply..."
|
|
16
|
+
* }
|
|
17
|
+
* ]}
|
|
18
|
+
* onClick={(index) => trackFaqClick(index)}
|
|
19
|
+
* />
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
4
22
|
export interface Props {
|
|
5
23
|
style?: CSSProperties;
|
|
24
|
+
/** Array of FAQ items with question and answer */
|
|
6
25
|
options: Array<{
|
|
7
26
|
id: string;
|
|
27
|
+
/** Question text (always visible) */
|
|
8
28
|
title: string;
|
|
29
|
+
/** Answer text (visible when expanded) */
|
|
9
30
|
description: string;
|
|
10
31
|
}>;
|
|
32
|
+
/** Callback fired when FAQ item is clicked, receives item index */
|
|
11
33
|
onClick?: (index: number) => void;
|
|
12
34
|
}
|
|
@@ -1,12 +1,34 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef, ReactNode } from "react";
|
|
2
2
|
declare const FeedBack: ({ type, text, isVisible, ...props }: FeedBackProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
3
3
|
export default FeedBack;
|
|
4
|
+
/**
|
|
5
|
+
* Toast-style feedback notification with slide-in/out animation.
|
|
6
|
+
* Auto-dismisses after specified duration. Supports success, error, and custom types.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```tsx
|
|
10
|
+
* <Feedback
|
|
11
|
+
* type="success"
|
|
12
|
+
* text="Changes saved successfully"
|
|
13
|
+
* isVisible={showFeedback}
|
|
14
|
+
* closeAfter={5000}
|
|
15
|
+
* onClose={() => setShowFeedback(false)}
|
|
16
|
+
* />
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
4
19
|
export interface FeedBackProps extends ComponentPropsWithoutRef<"div"> {
|
|
20
|
+
/** Controls visibility (triggers show/hide animation) */
|
|
5
21
|
isVisible: boolean;
|
|
22
|
+
/** Visual variant: `success` (green with check), `error` (red with X), `custom` (use your own icon/color) */
|
|
6
23
|
type: "success" | "error" | "custom";
|
|
24
|
+
/** Custom icon for `type="custom"` */
|
|
7
25
|
icon?: ReactNode;
|
|
26
|
+
/** Message text to display */
|
|
8
27
|
text: string;
|
|
28
|
+
/** Auto-dismiss duration in milliseconds (default: 3000) */
|
|
9
29
|
closeAfter?: number;
|
|
30
|
+
/** Show manual close button */
|
|
10
31
|
showClose?: boolean;
|
|
32
|
+
/** Callback fired when dismissed (auto or manual) */
|
|
11
33
|
onClose?: () => void;
|
|
12
34
|
}
|
|
@@ -2,4 +2,17 @@ import { FilterCheckboxProps, FilterCheckboxRef } from "./FilterCheckbox";
|
|
|
2
2
|
import { FilterDateProps, FilterDateRef } from "./FilterDate";
|
|
3
3
|
import { FilterRatioProps, FilterRatioRef } from "./FilterRatio";
|
|
4
4
|
declare const Filter: import("react").ForwardRefExoticComponent<(FilterCheckboxProps | FilterDateProps | FilterRatioProps) & import("react").RefAttributes<FilterCheckboxRef | FilterDateRef | FilterRatioRef>>;
|
|
5
|
+
/**
|
|
6
|
+
* Filter component router supporting three types: checkbox (multi-select), ratio (range slider), and date (date picker).
|
|
7
|
+
* Each type has its own variant implementation with specific props.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```tsx
|
|
11
|
+
* <Filter
|
|
12
|
+
* type="checkbox"
|
|
13
|
+
* options={filterOptions}
|
|
14
|
+
* onChange={(selected) => applyFilters(selected)}
|
|
15
|
+
* />
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
5
18
|
export default Filter;
|
|
@@ -1,7 +1,22 @@
|
|
|
1
1
|
import { LocationFormProps } from "./LocationForm";
|
|
2
2
|
declare const Form: (props: FormProps & LocationFormProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
3
3
|
export default Form;
|
|
4
|
+
/**
|
|
5
|
+
* Form router component (currently only supports location type).
|
|
6
|
+
* Delegates to specific form implementations based on type.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```tsx
|
|
10
|
+
* <Form
|
|
11
|
+
* type="location"
|
|
12
|
+
* isLoaded={isGoogleMapsLoaded}
|
|
13
|
+
* onChange={(location) => setLocation(location)}
|
|
14
|
+
* />
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
4
17
|
export interface FormProps {
|
|
18
|
+
/** Form type to render */
|
|
5
19
|
type: "location";
|
|
20
|
+
/** Whether Google Maps API is loaded (required for location form) */
|
|
6
21
|
isLoaded: boolean;
|
|
7
22
|
}
|
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef } from "react";
|
|
2
2
|
declare const Hover: ({ children, modalProps, ...props }: HoverProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default Hover;
|
|
4
|
+
/**
|
|
5
|
+
* Hover trigger component that displays content on hover.
|
|
6
|
+
* Content appears below the trigger element with shadow and border.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```tsx
|
|
10
|
+
* <Hover modalProps={{ children: <div>Hover content here</div> }}>
|
|
11
|
+
* <button>Hover over me</button>
|
|
12
|
+
* </Hover>
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
4
15
|
export interface HoverProps extends ComponentPropsWithoutRef<"div"> {
|
|
16
|
+
/** Props for the hover content container (including children to display) */
|
|
5
17
|
modalProps: React.ComponentProps<"div">;
|
|
6
18
|
}
|
|
@@ -2,13 +2,30 @@ import { InputPrimaryProps } from "./InputPrimary";
|
|
|
2
2
|
import { InputSecondaryProps } from "./InputSecondary";
|
|
3
3
|
import { InputThirdProps } from "./InputThird";
|
|
4
4
|
declare const Input: import("react").ForwardRefExoticComponent<(Omit<InputPrimaryProps & {
|
|
5
|
+
/** Input type: determines keyboard type and validation on mobile devices */
|
|
5
6
|
type?: "text" | "email" | "date" | "password" | "time" | "number";
|
|
6
7
|
}, "ref"> | Omit<InputSecondaryProps & {
|
|
8
|
+
/** Input type: determines keyboard type and validation on mobile devices */
|
|
7
9
|
type?: "text" | "email" | "date" | "password" | "time" | "number";
|
|
8
10
|
}, "ref"> | Omit<InputThirdProps & {
|
|
11
|
+
/** Input type: determines keyboard type and validation on mobile devices */
|
|
9
12
|
type?: "text" | "email" | "date" | "password" | "time" | "number";
|
|
10
13
|
}, "ref">) & import("react").RefAttributes<HTMLInputElement>>;
|
|
11
14
|
export default Input;
|
|
15
|
+
/**
|
|
16
|
+
* Text input component with three visual design variants.
|
|
17
|
+
* Supports all native HTML input attributes plus custom styling and error handling.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```tsx
|
|
21
|
+
* <Input
|
|
22
|
+
* design="secondary"
|
|
23
|
+
* placeholder="Enter your email"
|
|
24
|
+
* error="Invalid email format"
|
|
25
|
+
* />
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
12
28
|
export type InputProps = (InputPrimaryProps | InputSecondaryProps | InputThirdProps) & {
|
|
29
|
+
/** Input type: determines keyboard type and validation on mobile devices */
|
|
13
30
|
type?: "text" | "email" | "date" | "password" | "time" | "number";
|
|
14
31
|
};
|
|
@@ -3,8 +3,11 @@ import { InputStyledProps } from "./InputStyled";
|
|
|
3
3
|
declare const InputPrimary: import("react").ForwardRefExoticComponent<Omit<InputPrimaryProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
4
4
|
export default InputPrimary;
|
|
5
5
|
export interface InputPrimaryProps extends InputStyledProps {
|
|
6
|
+
/** Custom React element to display on the left side of the input (e.g., icon, prefix) */
|
|
6
7
|
LeftContent?: ReactElement;
|
|
8
|
+
/** Custom CSS properties for the outer container wrapper */
|
|
7
9
|
containerStyle?: CSSProperties;
|
|
10
|
+
/** Error message displayed below the input in red text */
|
|
8
11
|
error?: string | undefined;
|
|
9
12
|
design?: "primary";
|
|
10
13
|
}
|
|
@@ -3,8 +3,11 @@ import { InputStyledProps } from "./InputStyled";
|
|
|
3
3
|
declare const InputSecondary: import("react").ForwardRefExoticComponent<Omit<InputSecondaryProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
4
4
|
export default InputSecondary;
|
|
5
5
|
export interface InputSecondaryProps extends InputStyledProps {
|
|
6
|
+
/** Custom React element to display on the left side of the input (e.g., icon, prefix) */
|
|
6
7
|
LeftContent?: ReactElement;
|
|
8
|
+
/** Custom CSS properties for the outer container wrapper */
|
|
7
9
|
containerStyle?: CSSProperties;
|
|
10
|
+
/** Error message displayed below the input in red text */
|
|
8
11
|
error?: string | undefined;
|
|
9
12
|
design?: "secondary";
|
|
10
13
|
}
|
|
@@ -3,8 +3,11 @@ import { InputStyledProps } from "./InputStyled";
|
|
|
3
3
|
declare const InputThird: import("react").ForwardRefExoticComponent<Omit<InputThirdProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
4
4
|
export default InputThird;
|
|
5
5
|
export interface InputThirdProps extends InputStyledProps {
|
|
6
|
+
/** Custom React element to display on the left side of the input (e.g., icon, prefix) */
|
|
6
7
|
LeftContent?: ReactElement;
|
|
8
|
+
/** Custom CSS properties for the outer container wrapper */
|
|
7
9
|
containerStyle?: CSSProperties;
|
|
10
|
+
/** Error message displayed below the input in red text */
|
|
8
11
|
error?: string | undefined;
|
|
9
12
|
design?: "third";
|
|
10
13
|
}
|
|
@@ -2,6 +2,20 @@ import { ChangeEvent } from "react";
|
|
|
2
2
|
import { InputProps } from "../Basic/Input";
|
|
3
3
|
declare const InputBirthday: ({ error, onChange, containerStyle, ...restProps }: InputBirthdayProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export default InputBirthday;
|
|
5
|
+
/**
|
|
6
|
+
* Birthday input split into three numeric fields (Day/Month/Year).
|
|
7
|
+
* Auto-focuses next field when complete, validates date with moment.js.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```tsx
|
|
11
|
+
* <InputBirthday
|
|
12
|
+
* defaultValue="1990-05-15"
|
|
13
|
+
* error={validationError}
|
|
14
|
+
* onChange={(date) => setDateOfBirth(date)}
|
|
15
|
+
* />
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
5
18
|
export type InputBirthdayProps = Omit<InputProps, 'onChange'> & {
|
|
19
|
+
/** Callback with valid Date object when all fields complete. Format for defaultValue: "YYYY-MM-DD" */
|
|
6
20
|
onChange?: (date: Date | ChangeEvent<HTMLInputElement>) => void;
|
|
7
21
|
};
|
|
@@ -1,10 +1,34 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef, ReactElement } from "react";
|
|
2
2
|
declare const InputChat: (props: InputChatProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default InputChat;
|
|
4
|
+
/**
|
|
5
|
+
* Chat input with text messaging and voice recording capabilities.
|
|
6
|
+
* Features waveform visualization during recording and optional attachment menu.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```tsx
|
|
10
|
+
* <InputChat
|
|
11
|
+
* placeholder="Type a message..."
|
|
12
|
+
* options={[
|
|
13
|
+
* { id: "photo", label: "Photo", icon: <Camera /> },
|
|
14
|
+
* { id: "file", label: "File", icon: <Paperclip /> }
|
|
15
|
+
* ]}
|
|
16
|
+
* onOptionClick={(id) => handleAttachment(id)}
|
|
17
|
+
* onSend={(data) => {
|
|
18
|
+
* if (data.text) sendTextMessage(data.text);
|
|
19
|
+
* if (data.media) sendAudioMessage(data.media.base64);
|
|
20
|
+
* }}
|
|
21
|
+
* />
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
4
24
|
export interface InputChatProps extends ComponentPropsWithoutRef<"input"> {
|
|
25
|
+
/** Shows loading animation, disables input */
|
|
5
26
|
loading?: boolean;
|
|
27
|
+
/** Attachment menu options (shows Plus icon button) */
|
|
6
28
|
options?: Array<optionType>;
|
|
29
|
+
/** Callback when attachment menu item is clicked */
|
|
7
30
|
onOptionClick?: (id: string) => void;
|
|
31
|
+
/** Callback when message is sent (Enter key or Send button). Audio is converted to base64 WAV format */
|
|
8
32
|
onSend?: (data: {
|
|
9
33
|
text?: string;
|
|
10
34
|
media?: {
|
|
@@ -1,11 +1,26 @@
|
|
|
1
1
|
import { CSSProperties } from "react";
|
|
2
2
|
declare const InputCode: (props: InputCodeProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default InputCode;
|
|
4
|
+
/**
|
|
5
|
+
* 6-digit verification code input with monospace font and letter spacing.
|
|
6
|
+
* Auto-blurs and triggers callback when all 6 digits are entered.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```tsx
|
|
10
|
+
* <InputCode
|
|
11
|
+
* autoFocus
|
|
12
|
+
* error={codeError}
|
|
13
|
+
* loading={isVerifying}
|
|
14
|
+
* onChange={(code) => verifyCode(code)}
|
|
15
|
+
* />
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
4
18
|
export interface InputCodeProps {
|
|
5
19
|
style?: CSSProperties;
|
|
6
20
|
containerStyle?: CSSProperties;
|
|
7
21
|
autoFocus?: boolean;
|
|
8
22
|
error?: string;
|
|
9
23
|
loading?: boolean;
|
|
24
|
+
/** Callback fired when 6 digits are entered (input auto-blurs) */
|
|
10
25
|
onChange?: (code: string) => void;
|
|
11
26
|
}
|