@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
|
@@ -1,12 +1,29 @@
|
|
|
1
1
|
import React, { CSSProperties } from "react";
|
|
2
2
|
declare const SwitchTag: (props: Props) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default SwitchTag;
|
|
4
|
+
/**
|
|
5
|
+
* Icon-based toggle switch for switching between 2+ options.
|
|
6
|
+
* Displays icons in a pill-shaped container with active state highlighting.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```tsx
|
|
10
|
+
* <SwitchTag
|
|
11
|
+
* options={[
|
|
12
|
+
* { id: "grid", icon: <GridIcon /> },
|
|
13
|
+
* { id: "list", icon: <ListIcon /> }
|
|
14
|
+
* ]}
|
|
15
|
+
* onChange={(option) => setViewMode(option.id)}
|
|
16
|
+
* />
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
4
19
|
export interface Props {
|
|
5
20
|
style?: CSSProperties;
|
|
21
|
+
/** Array of icon options (automatically colors icons based on selection) */
|
|
6
22
|
options: Array<{
|
|
7
23
|
id: string;
|
|
8
24
|
icon: React.ReactElement;
|
|
9
25
|
}>;
|
|
26
|
+
/** Callback fired when option changes, receives selected option */
|
|
10
27
|
onChange?: (option: {
|
|
11
28
|
id: string;
|
|
12
29
|
icon: React.ReactElement;
|
|
@@ -1,19 +1,46 @@
|
|
|
1
1
|
import { CSSProperties } from "react";
|
|
2
2
|
declare const Tabs: (props: Props) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default Tabs;
|
|
4
|
+
/**
|
|
5
|
+
* Tab navigation component with two visual designs.
|
|
6
|
+
* Primary design shows underline indicator, secondary design shows rounded background.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```tsx
|
|
10
|
+
* <Tabs
|
|
11
|
+
* design="secondary"
|
|
12
|
+
* options={[
|
|
13
|
+
* { id: "1", title: "Overview" },
|
|
14
|
+
* { id: "2", title: "Details" }
|
|
15
|
+
* ]}
|
|
16
|
+
* selectedOption={currentTab}
|
|
17
|
+
* onChange={(tab) => setCurrentTab(tab)}
|
|
18
|
+
* />
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
4
21
|
export interface Props {
|
|
5
22
|
style?: CSSProperties;
|
|
23
|
+
/** Custom styles for individual tab cells */
|
|
6
24
|
cellStyle?: CSSProperties;
|
|
25
|
+
/** Custom styles for tab text labels */
|
|
7
26
|
textStyle?: CSSProperties;
|
|
27
|
+
/** Background color for selected tab (secondary design) */
|
|
8
28
|
cellColor?: string;
|
|
29
|
+
/** Text color for selected tab */
|
|
9
30
|
textColor?: string;
|
|
31
|
+
/** Background color for the entire tabs container */
|
|
10
32
|
backgroundColor?: string;
|
|
33
|
+
/** Array of tab options */
|
|
11
34
|
options: Array<OptionProps>;
|
|
35
|
+
/** Currently selected tab (controlled component) */
|
|
12
36
|
selectedOption?: OptionProps;
|
|
37
|
+
/** Visual design: `primary` (underline) or `secondary` (rounded background) */
|
|
13
38
|
design?: "primary" | "secondary";
|
|
39
|
+
/** Callback fired when tab selection changes */
|
|
14
40
|
onChange?: (option: OptionProps) => void;
|
|
15
41
|
}
|
|
16
42
|
export interface OptionProps {
|
|
17
43
|
id: string;
|
|
44
|
+
/** Display text for the tab */
|
|
18
45
|
title: string;
|
|
19
46
|
}
|
|
@@ -1,18 +1,43 @@
|
|
|
1
1
|
import React, { CSSProperties } from "react";
|
|
2
2
|
declare const TagSelector: (props: Props) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default TagSelector;
|
|
4
|
+
/**
|
|
5
|
+
* Tag selector component for single or multiple selection of options.
|
|
6
|
+
* Renders clickable tags with optional subtitles in a flex-wrap layout.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```tsx
|
|
10
|
+
* <TagSelector
|
|
11
|
+
* type="multiple"
|
|
12
|
+
* options={[
|
|
13
|
+
* { id: "1", title: "React" },
|
|
14
|
+
* { id: "2", title: "TypeScript", subtitle: "Recommended" }
|
|
15
|
+
* ]}
|
|
16
|
+
* optionsSelected={selectedTags}
|
|
17
|
+
* onChange={(tags) => setSelectedTags(tags)}
|
|
18
|
+
* />
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
4
21
|
export interface Props {
|
|
22
|
+
/** Selection mode: `single` for radio-like, `multiple` for multi-select */
|
|
5
23
|
type?: "multiple" | "single";
|
|
6
24
|
style?: CSSProperties;
|
|
25
|
+
/** Available tag options to display */
|
|
7
26
|
options: Array<OptionProps>;
|
|
27
|
+
/** Pre-selected options (controlled component pattern) */
|
|
8
28
|
optionsSelected?: Array<OptionProps>;
|
|
29
|
+
/** Callback fired when selection changes, receives array of selected options */
|
|
9
30
|
onChange?: (selection: Array<OptionProps>) => void;
|
|
31
|
+
/** When true, disables click interactions (display only) */
|
|
10
32
|
onlyVisual?: boolean;
|
|
33
|
+
/** Visual design variant */
|
|
11
34
|
design?: "design1" | "design2";
|
|
12
35
|
}
|
|
13
36
|
export interface OptionProps {
|
|
14
37
|
id: string;
|
|
38
|
+
/** Main text displayed on the tag */
|
|
15
39
|
title: string;
|
|
40
|
+
/** Optional secondary text below the title */
|
|
16
41
|
subtitle?: string;
|
|
17
42
|
style?: React.CSSProperties;
|
|
18
43
|
}
|
|
@@ -1,7 +1,24 @@
|
|
|
1
1
|
import { TextProps } from "./Text";
|
|
2
2
|
declare const TextAnimated: ({ children, ...props }: TextAnimatedProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default TextAnimated;
|
|
4
|
+
/**
|
|
5
|
+
* Text component with rotating animated words that cycle through options array.
|
|
6
|
+
* Uses {{data}} placeholder in children string for where animation appears.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```tsx
|
|
10
|
+
* <TextAnimated
|
|
11
|
+
* type="h1"
|
|
12
|
+
* options={["developers", "designers", "creators"]}
|
|
13
|
+
* interval={3000}
|
|
14
|
+
* >
|
|
15
|
+
* Built for {{data}}
|
|
16
|
+
* </TextAnimated>
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
4
19
|
export type TextAnimatedProps = TextProps & {
|
|
20
|
+
/** Array of strings to cycle through */
|
|
5
21
|
options: string[];
|
|
22
|
+
/** Time in milliseconds between transitions. Default: 2500ms */
|
|
6
23
|
interval?: number;
|
|
7
24
|
};
|
|
@@ -3,4 +3,15 @@ import { ParagraphProps } from "./Paragraph";
|
|
|
3
3
|
import { ButtonProps } from "./Button";
|
|
4
4
|
declare const Text: (props: TextProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
5
5
|
export default Text;
|
|
6
|
+
/**
|
|
7
|
+
* Unified typography component that renders headers (h1-h6, d1), paragraphs (p, p2, c1, c2, o1, o2), or button text (b1, b2, b3).
|
|
8
|
+
* Automatically chooses the correct semantic HTML element based on the `type` prop.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```tsx
|
|
12
|
+
* <Text type="h1" weight="bold">Page Title</Text>
|
|
13
|
+
* <Text type="p" color={ColorV2.text.neutralMedium}>Body text</Text>
|
|
14
|
+
* <Text type="b1">Button text</Text>
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
6
17
|
export type TextProps = HeaderProps | ParagraphProps | ButtonProps;
|
|
@@ -1,4 +1,23 @@
|
|
|
1
1
|
import { TextAreaDefaultProps } from "./TextAreaDefault";
|
|
2
2
|
import { TextAreaEditorProps } from "./TextAreaEditor";
|
|
3
3
|
declare const TextArea: (props: TextAreaDefaultProps | TextAreaEditorProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
4
|
+
/**
|
|
5
|
+
* Multi-line text input component with two modes: default (plain textarea) and edit (rich text editor with Tiptap).
|
|
6
|
+
* Use `type="edit"` for formatted text editing with bold, italic, lists, etc.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```tsx
|
|
10
|
+
* <TextArea
|
|
11
|
+
* type="default"
|
|
12
|
+
* placeholder="Enter your message..."
|
|
13
|
+
* rows={5}
|
|
14
|
+
* />
|
|
15
|
+
*
|
|
16
|
+
* <TextArea
|
|
17
|
+
* type="edit"
|
|
18
|
+
* value={richTextContent}
|
|
19
|
+
* onChange={(html) => setContent(html)}
|
|
20
|
+
* />
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
4
23
|
export default TextArea;
|