@stfrigerio/sito-template 0.1.2 → 0.1.4
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/components/atoms/ArrayInput/ArrayInput.d.ts +31 -0
- package/dist/components/atoms/ArrayInput/ArrayInput.d.ts.map +1 -1
- package/dist/components/atoms/Button/Button.d.ts +51 -0
- package/dist/components/atoms/Button/Button.d.ts.map +1 -1
- package/dist/components/atoms/Card/Card.d.ts +67 -0
- package/dist/components/atoms/Card/Card.d.ts.map +1 -1
- package/dist/components/atoms/Checkbox/Checkbox.d.ts +12 -0
- package/dist/components/atoms/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/components/atoms/DateInput/DateInput.d.ts +14 -0
- package/dist/components/atoms/DateInput/DateInput.d.ts.map +1 -1
- package/dist/components/atoms/SearchableDropdown/SearchableDropdown.d.ts +13 -0
- package/dist/components/atoms/SearchableDropdown/SearchableDropdown.d.ts.map +1 -1
- package/dist/components/atoms/SelectInput/SelectInput.d.ts +14 -0
- package/dist/components/atoms/SelectInput/SelectInput.d.ts.map +1 -1
- package/dist/components/atoms/TextArea/TextArea.d.ts +16 -0
- package/dist/components/atoms/TextArea/TextArea.d.ts.map +1 -1
- package/dist/components/atoms/TextInput/TextInput.d.ts +22 -0
- package/dist/components/atoms/TextInput/TextInput.d.ts.map +1 -1
- package/dist/components/atoms/Toggle/Toggle.d.ts +51 -0
- package/dist/components/atoms/Toggle/Toggle.d.ts.map +1 -1
- package/dist/index.esm.js +131 -73
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +131 -73
- package/dist/index.js.map +1 -1
- package/dist/styles.css +2 -0
- package/dist/styles.css.map +1 -0
- package/package.json +6 -3
|
@@ -1,23 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configuration for a field in complex object arrays
|
|
3
|
+
* @interface FieldConfig
|
|
4
|
+
*/
|
|
1
5
|
export interface FieldConfig {
|
|
6
|
+
/** The property name in the object */
|
|
2
7
|
name: string;
|
|
8
|
+
/** Display label for the field */
|
|
3
9
|
label: string;
|
|
10
|
+
/** HTML input type (text, email, url, etc.) */
|
|
4
11
|
type?: string;
|
|
12
|
+
/** Placeholder text for the input */
|
|
5
13
|
placeholder?: string;
|
|
6
14
|
}
|
|
15
|
+
/**
|
|
16
|
+
* Base props that all array inputs share
|
|
17
|
+
* @interface BaseArrayInputProps
|
|
18
|
+
*/
|
|
7
19
|
interface BaseArrayInputProps {
|
|
20
|
+
/** Label text displayed above the array input */
|
|
8
21
|
label: string;
|
|
9
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* Props for simple string array input
|
|
25
|
+
* @interface SimpleArrayInputProps
|
|
26
|
+
*/
|
|
10
27
|
interface SimpleArrayInputProps extends BaseArrayInputProps {
|
|
28
|
+
/** Input type - defaults to 'simple' for string arrays */
|
|
11
29
|
type?: 'simple';
|
|
30
|
+
/** Array of string values */
|
|
12
31
|
values: string[];
|
|
32
|
+
/** Callback fired when array values change */
|
|
13
33
|
onChange: (values: string[]) => void;
|
|
34
|
+
/** Placeholder text for individual input fields */
|
|
14
35
|
placeholder?: string;
|
|
15
36
|
}
|
|
37
|
+
/**
|
|
38
|
+
* Props for complex object array input
|
|
39
|
+
* @interface ComplexArrayInputProps
|
|
40
|
+
* @template T - The type of objects in the array
|
|
41
|
+
*/
|
|
16
42
|
interface ComplexArrayInputProps<T extends Record<string, any>> extends BaseArrayInputProps {
|
|
43
|
+
/** Input type - must be 'complex' for object arrays */
|
|
17
44
|
type: 'complex';
|
|
45
|
+
/** Array of object values */
|
|
18
46
|
values: T[];
|
|
47
|
+
/** Callback fired when array values change */
|
|
19
48
|
onChange: (values: T[]) => void;
|
|
49
|
+
/** Configuration for the fields in each object */
|
|
20
50
|
fields: FieldConfig[];
|
|
51
|
+
/** Optional function to generate unique keys for React rendering */
|
|
21
52
|
getKey?: (item: T, index: number) => string;
|
|
22
53
|
}
|
|
23
54
|
export type ArrayInputProps<T extends Record<string, any> = Record<string, any>> = SimpleArrayInputProps | ComplexArrayInputProps<T>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArrayInput.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/ArrayInput/ArrayInput.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ArrayInput.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/ArrayInput/ArrayInput.tsx"],"names":[],"mappings":"AAKA;;;GAGG;AACH,MAAM,WAAW,WAAW;IACxB,sCAAsC;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,kCAAkC;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,+CAA+C;IAC/C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,qCAAqC;IACrC,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;GAGG;AACH,UAAU,mBAAmB;IACzB,iDAAiD;IACjD,KAAK,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,UAAU,qBAAsB,SAAQ,mBAAmB;IACvD,0DAA0D;IAC1D,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,6BAA6B;IAC7B,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,8CAA8C;IAC9C,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACrC,mDAAmD;IACnD,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;GAIG;AACH,UAAU,sBAAsB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAE,SAAQ,mBAAmB;IACvF,uDAAuD;IACvD,IAAI,EAAE,SAAS,CAAC;IAChB,6BAA6B;IAC7B,MAAM,EAAE,CAAC,EAAE,CAAC;IACZ,8CAA8C;IAC9C,QAAQ,EAAE,CAAC,MAAM,EAAE,CAAC,EAAE,KAAK,IAAI,CAAC;IAChC,kDAAkD;IAClD,MAAM,EAAE,WAAW,EAAE,CAAC;IACtB,oEAAoE;IACpE,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;CAC/C;AAED,MAAM,MAAM,eAAe,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,IACzE,qBAAqB,GACrB,sBAAsB,CAAC,CAAC,CAAC,CAAC;AAEhC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAgB,UAAU,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC1E,KAAK,EAAE,QAAQ,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,2CAOtC;AAoID,MAAM,WAAW,WAAW;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACf"}
|
|
@@ -1,14 +1,65 @@
|
|
|
1
1
|
import React, { ButtonHTMLAttributes, ReactNode } from 'react';
|
|
2
2
|
import { HTMLMotionProps } from 'framer-motion';
|
|
3
|
+
/**
|
|
4
|
+
* Props for the Button component
|
|
5
|
+
* @interface ButtonProps
|
|
6
|
+
*/
|
|
3
7
|
export interface ButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'onAnimationStart' | 'onDragStart' | 'onDragEnd' | 'onDrag'> {
|
|
8
|
+
/** Visual style variant of the button */
|
|
4
9
|
variant?: 'primary' | 'secondary' | 'outline' | 'ghost' | 'danger';
|
|
10
|
+
/** Size of the button */
|
|
5
11
|
size?: 'small' | 'medium' | 'large';
|
|
12
|
+
/** Whether the button should take full width of its container */
|
|
6
13
|
fullWidth?: boolean;
|
|
14
|
+
/** Whether the button is in loading state (shows spinner, disabled interaction) */
|
|
7
15
|
loading?: boolean;
|
|
16
|
+
/** Icon to display on the left side of the button text */
|
|
8
17
|
iconLeft?: ReactNode;
|
|
18
|
+
/** Icon to display on the right side of the button text */
|
|
9
19
|
iconRight?: ReactNode;
|
|
20
|
+
/** Button content (text, elements, etc.) */
|
|
10
21
|
children?: ReactNode;
|
|
22
|
+
/** Additional Framer Motion props for custom animations */
|
|
11
23
|
motionProps?: HTMLMotionProps<"button">;
|
|
12
24
|
}
|
|
25
|
+
/**
|
|
26
|
+
* Button Component
|
|
27
|
+
*
|
|
28
|
+
* @component
|
|
29
|
+
* @description
|
|
30
|
+
* A versatile, animated button component built with Framer Motion. Supports multiple
|
|
31
|
+
* variants, sizes, loading states, and icons. Includes smooth hover/tap animations
|
|
32
|
+
* and full accessibility support.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* // Basic usage
|
|
36
|
+
* <Button onClick={handleClick}>Click me</Button>
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* // With variant and size
|
|
40
|
+
* <Button variant="secondary" size="large">
|
|
41
|
+
* Large Secondary Button
|
|
42
|
+
* </Button>
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* // With icons and loading state
|
|
46
|
+
* <Button
|
|
47
|
+
* variant="primary"
|
|
48
|
+
* iconLeft={<Icon />}
|
|
49
|
+
* loading={isLoading}
|
|
50
|
+
* onClick={handleSubmit}
|
|
51
|
+
* >
|
|
52
|
+
* Submit Form
|
|
53
|
+
* </Button>
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* // Full width danger button
|
|
57
|
+
* <Button variant="danger" fullWidth>
|
|
58
|
+
* Delete Account
|
|
59
|
+
* </Button>
|
|
60
|
+
*
|
|
61
|
+
* @param {ButtonProps} props - The props for the Button component
|
|
62
|
+
* @returns {JSX.Element} The rendered Button component
|
|
63
|
+
*/
|
|
13
64
|
export declare const Button: React.FC<ButtonProps>;
|
|
14
65
|
//# sourceMappingURL=Button.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms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AAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;IACpC,iEAAiE;IACjE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,mFAAmF;IACnF,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,2DAA2D;IAC3D,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,4CAA4C;IAC5C,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,2DAA2D;IAC3D,WAAW,CAAC,EAAE,eAAe,CAAC,QAAQ,CAAC,CAAC;CACxC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAsCxC,CAAC"}
|
|
@@ -1,18 +1,85 @@
|
|
|
1
1
|
import React, { HTMLAttributes, ReactNode } from 'react';
|
|
2
2
|
import { HTMLMotionProps } from 'framer-motion';
|
|
3
|
+
/**
|
|
4
|
+
* Props for the Card component
|
|
5
|
+
* @interface CardProps
|
|
6
|
+
*/
|
|
3
7
|
export interface CardProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onAnimationStart' | 'onDragStart' | 'onDragEnd' | 'onDrag'> {
|
|
8
|
+
/** Visual style variant of the card */
|
|
4
9
|
variant?: 'elevated' | 'outlined' | 'flat';
|
|
10
|
+
/** Whether the card should have hover animations */
|
|
5
11
|
hoverable?: boolean;
|
|
12
|
+
/** Whether the card should be clickable (adds pointer cursor and click handler) */
|
|
6
13
|
clickable?: boolean;
|
|
14
|
+
/** Whether the card content should have padding */
|
|
7
15
|
padding?: boolean;
|
|
16
|
+
/** URL for an optional image at the top of the card */
|
|
8
17
|
image?: string;
|
|
18
|
+
/** Alt text for the card image */
|
|
9
19
|
imageAlt?: string;
|
|
20
|
+
/** Title text for the card header */
|
|
10
21
|
title?: string;
|
|
22
|
+
/** Subtitle text for the card header */
|
|
11
23
|
subtitle?: string;
|
|
24
|
+
/** Custom header content (overrides title/subtitle) */
|
|
12
25
|
header?: ReactNode;
|
|
26
|
+
/** Footer content for the bottom of the card */
|
|
13
27
|
footer?: ReactNode;
|
|
28
|
+
/** Main content of the card */
|
|
14
29
|
children?: ReactNode;
|
|
30
|
+
/** Additional Framer Motion props for custom animations */
|
|
15
31
|
motionProps?: HTMLMotionProps<"div">;
|
|
16
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* Card Component
|
|
35
|
+
*
|
|
36
|
+
* @component
|
|
37
|
+
* @description
|
|
38
|
+
* A flexible container component that can display content in a structured card layout.
|
|
39
|
+
* Supports multiple visual styles, optional images, headers, footers, and smooth animations
|
|
40
|
+
* powered by Framer Motion.
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* // Basic card with content
|
|
44
|
+
* <Card>
|
|
45
|
+
* <p>This is card content</p>
|
|
46
|
+
* </Card>
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* // Card with title and subtitle
|
|
50
|
+
* <Card
|
|
51
|
+
* title="Card Title"
|
|
52
|
+
* subtitle="Card subtitle"
|
|
53
|
+
* variant="outlined"
|
|
54
|
+
* >
|
|
55
|
+
* Card body content here
|
|
56
|
+
* </Card>
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* // Interactive card with image
|
|
60
|
+
* <Card
|
|
61
|
+
* image="/path/to/image.jpg"
|
|
62
|
+
* imageAlt="Description"
|
|
63
|
+
* hoverable
|
|
64
|
+
* clickable
|
|
65
|
+
* onClick={handleCardClick}
|
|
66
|
+
* >
|
|
67
|
+
* <h4>Interactive Card</h4>
|
|
68
|
+
* <p>Click me!</p>
|
|
69
|
+
* </Card>
|
|
70
|
+
*
|
|
71
|
+
* @example
|
|
72
|
+
* // Card with custom header and footer
|
|
73
|
+
* <Card
|
|
74
|
+
* header={<CustomHeader />}
|
|
75
|
+
* footer={<CustomFooter />}
|
|
76
|
+
* variant="flat"
|
|
77
|
+
* >
|
|
78
|
+
* Main content area
|
|
79
|
+
* </Card>
|
|
80
|
+
*
|
|
81
|
+
* @param {CardProps} props - The props for the Card component
|
|
82
|
+
* @returns {JSX.Element} The rendered Card component
|
|
83
|
+
*/
|
|
17
84
|
export declare const Card: React.FC<CardProps>;
|
|
18
85
|
//# sourceMappingURL=Card.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Card/Card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACzD,OAAO,EAAU,eAAe,EAAE,MAAM,eAAe,CAAC;AAGxD,MAAM,WAAW,SAAU,SAAQ,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,kBAAkB,GAAG,aAAa,GAAG,WAAW,GAAG,QAAQ,CAAC;IACnI,OAAO,CAAC,EAAE,UAAU,GAAG,UAAU,GAAG,MAAM,CAAC;IAC3C,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,WAAW,CAAC,EAAE,eAAe,CAAC,KAAK,CAAC,CAAC;CACrC;AAED,eAAO,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CA6DpC,CAAC"}
|
|
1
|
+
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Card/Card.tsx"],"names":[],"mappings":"AA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+
/** Whether the checkbox is checked */
|
|
3
8
|
checked: boolean;
|
|
9
|
+
/** Callback fired when checkbox state changes */
|
|
4
10
|
onChange: (checked: boolean) => void;
|
|
11
|
+
/** Label text to display next to the checkbox */
|
|
5
12
|
label?: string;
|
|
13
|
+
/** Whether the checkbox is disabled */
|
|
6
14
|
disabled?: boolean;
|
|
15
|
+
/** Whether the checkbox is in indeterminate state (partial selection) */
|
|
7
16
|
indeterminate?: boolean;
|
|
17
|
+
/** HTML id attribute for the checkbox input */
|
|
8
18
|
id?: string;
|
|
19
|
+
/** HTML name attribute for form submission */
|
|
9
20
|
name?: string;
|
|
21
|
+
/** HTML value attribute for form submission */
|
|
10
22
|
value?: string;
|
|
11
23
|
}
|
|
12
24
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Checkbox/Checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAGjD,MAAM,WAAW,aAAa;IAC1B,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACrC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAmC5C,CAAC"}
|
|
1
|
+
{"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Checkbox/Checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAGjD;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC1B,sCAAsC;IACtC,OAAO,EAAE,OAAO,CAAC;IACjB,iDAAiD;IACjD,QAAQ,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACrC,iDAAiD;IACjD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uCAAuC;IACvC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,yEAAyE;IACzE,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,+CAA+C;IAC/C,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,8CAA8C;IAC9C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,+CAA+C;IAC/C,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAmC5C,CAAC"}
|
|
@@ -1,13 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Props for the DateInput component
|
|
3
|
+
* @interface DateInputProps
|
|
4
|
+
*/
|
|
1
5
|
export interface DateInputProps {
|
|
6
|
+
/** Label text displayed above the input field */
|
|
2
7
|
label: string;
|
|
8
|
+
/** Current date value (ISO format or European DD/MM/YYYY format) */
|
|
3
9
|
value: string;
|
|
10
|
+
/** Callback fired when date value changes */
|
|
4
11
|
onChange: (newValue: string) => void;
|
|
12
|
+
/** Placeholder text shown in European format (e.g., "31/12/2024") */
|
|
5
13
|
placeholder?: string;
|
|
14
|
+
/** Callback fired when input receives focus */
|
|
6
15
|
onFocus?: () => void;
|
|
16
|
+
/** Callback fired when input loses focus */
|
|
7
17
|
onBlur?: () => void;
|
|
18
|
+
/** Whether to show error styling */
|
|
8
19
|
error?: boolean;
|
|
20
|
+
/** Whether to show success styling */
|
|
9
21
|
success?: boolean;
|
|
22
|
+
/** Whether the input is in loading state */
|
|
10
23
|
loading?: boolean;
|
|
24
|
+
/** Whether the input is disabled */
|
|
11
25
|
disabled?: boolean;
|
|
12
26
|
}
|
|
13
27
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateInput.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/DateInput/DateInput.tsx"],"names":[],"mappings":"AAKA,MAAM,WAAW,cAAc;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,wBAAgB,SAAS,CAAC,EACtB,KAAK,EACL,KAAK,EACL,QAAQ,EACR,WAA0B,EAC1B,OAAO,EACP,MAAM,EACN,KAAa,EACb,OAAe,EACf,OAAe,EACf,QAAgB,EACnB,EAAE,QAAQ,CAAC,cAAc,CAAC,2CAiG1B"}
|
|
1
|
+
{"version":3,"file":"DateInput.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/DateInput/DateInput.tsx"],"names":[],"mappings":"AAKA;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC3B,iDAAiD;IACjD,KAAK,EAAE,MAAM,CAAC;IACd,oEAAoE;IACpE,KAAK,EAAE,MAAM,CAAC;IACd,6CAA6C;IAC7C,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,qEAAqE;IACrE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,+CAA+C;IAC/C,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,4CAA4C;IAC5C,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,oCAAoC;IACpC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,sCAAsC;IACtC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,4CAA4C;IAC5C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,oCAAoC;IACpC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,wBAAgB,SAAS,CAAC,EACtB,KAAK,EACL,KAAK,EACL,QAAQ,EACR,WAA0B,EAC1B,OAAO,EACP,MAAM,EACN,KAAa,EACb,OAAe,EACf,OAAe,EACf,QAAgB,EACnB,EAAE,QAAQ,CAAC,cAAc,CAAC,2CAiG1B"}
|
|
@@ -2,15 +2,28 @@ type Option = {
|
|
|
2
2
|
label: string;
|
|
3
3
|
value: string;
|
|
4
4
|
};
|
|
5
|
+
/**
|
|
6
|
+
* Props for the SearchableDropdown component
|
|
7
|
+
* @interface SearchableDropdownProps
|
|
8
|
+
*/
|
|
5
9
|
export interface SearchableDropdownProps {
|
|
10
|
+
/** Label text displayed above the dropdown */
|
|
6
11
|
label: string;
|
|
12
|
+
/** Currently selected value */
|
|
7
13
|
value: string;
|
|
14
|
+
/** Callback fired when selection changes */
|
|
8
15
|
onChange: (value: string) => void;
|
|
16
|
+
/** Array of options with label and value properties */
|
|
9
17
|
options: Option[];
|
|
18
|
+
/** Placeholder text shown when no option is selected */
|
|
10
19
|
placeholder?: string;
|
|
20
|
+
/** Whether to include an empty "(none)" option */
|
|
11
21
|
allowEmpty?: boolean;
|
|
22
|
+
/** Whether the dropdown is disabled */
|
|
12
23
|
disabled?: boolean;
|
|
24
|
+
/** Whether the dropdown is in loading state */
|
|
13
25
|
loading?: boolean;
|
|
26
|
+
/** Whether to show error styling */
|
|
14
27
|
error?: boolean;
|
|
15
28
|
}
|
|
16
29
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchableDropdown.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/SearchableDropdown/SearchableDropdown.tsx"],"names":[],"mappings":"AAKA,KAAK,MAAM,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAE/C,MAAM,WAAW,uBAAuB;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,wBAAgB,kBAAkB,CAAC,EAC/B,KAAK,EACL,KAAK,EACL,QAAQ,EACR,OAAO,EACP,WAAyB,EACzB,UAAiB,EACjB,QAAgB,EAChB,OAAe,EACf,KAAa,EAChB,EAAE,QAAQ,CAAC,uBAAuB,CAAC,2CAmKnC"}
|
|
1
|
+
{"version":3,"file":"SearchableDropdown.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/SearchableDropdown/SearchableDropdown.tsx"],"names":[],"mappings":"AAKA,KAAK,MAAM,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAE/C;;;GAGG;AACH,MAAM,WAAW,uBAAuB;IACpC,8CAA8C;IAC9C,KAAK,EAAE,MAAM,CAAC;IACd,+BAA+B;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,4CAA4C;IAC5C,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,uDAAuD;IACvD,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,wDAAwD;IACxD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kDAAkD;IAClD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,uCAAuC;IACvC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,+CAA+C;IAC/C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,oCAAoC;IACpC,KAAK,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,wBAAgB,kBAAkB,CAAC,EAC/B,KAAK,EACL,KAAK,EACL,QAAQ,EACR,OAAO,EACP,WAAyB,EACzB,UAAiB,EACjB,QAAgB,EAChB,OAAe,EACf,KAAa,EAChB,EAAE,QAAQ,CAAC,uBAAuB,CAAC,2CAmKnC"}
|
|
@@ -2,16 +2,30 @@ type Option = string | {
|
|
|
2
2
|
label: string;
|
|
3
3
|
value: string;
|
|
4
4
|
};
|
|
5
|
+
/**
|
|
6
|
+
* Props for the SelectInput component
|
|
7
|
+
* @interface SelectInputProps
|
|
8
|
+
*/
|
|
5
9
|
export interface SelectInputProps {
|
|
10
|
+
/** Label text displayed above the select input */
|
|
6
11
|
label: string;
|
|
12
|
+
/** Currently selected value */
|
|
7
13
|
value: string;
|
|
14
|
+
/** Callback fired when selection changes */
|
|
8
15
|
onChange: (value: string) => void;
|
|
16
|
+
/** Array of options - can be strings or {label, value} objects */
|
|
9
17
|
options: Readonly<Option[]>;
|
|
18
|
+
/** Placeholder text shown when no option is selected */
|
|
10
19
|
placeholder?: string;
|
|
20
|
+
/** Whether the select is disabled */
|
|
11
21
|
disabled?: boolean;
|
|
22
|
+
/** Whether to show error styling */
|
|
12
23
|
error?: boolean;
|
|
24
|
+
/** Whether to show success styling */
|
|
13
25
|
success?: boolean;
|
|
26
|
+
/** Whether the select is in loading state */
|
|
14
27
|
loading?: boolean;
|
|
28
|
+
/** Whether the field is required (shows asterisk) */
|
|
15
29
|
required?: boolean;
|
|
16
30
|
}
|
|
17
31
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectInput.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/SelectInput/SelectInput.tsx"],"names":[],"mappings":"AAIA,KAAK,MAAM,GAAG,MAAM,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAExD,MAAM,WAAW,gBAAgB;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,OAAO,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAgB,WAAW,CAAC,EACxB,KAAK,EACL,KAAK,EACL,QAAQ,EACR,OAAO,EACP,WAAyB,EACzB,QAAgB,EAChB,KAAa,EACb,OAAe,EACf,OAAe,EACf,QAAgB,EACnB,EAAE,QAAQ,CAAC,gBAAgB,CAAC,2CAmC5B"}
|
|
1
|
+
{"version":3,"file":"SelectInput.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/SelectInput/SelectInput.tsx"],"names":[],"mappings":"AAIA,KAAK,MAAM,GAAG,MAAM,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAExD;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC7B,kDAAkD;IAClD,KAAK,EAAE,MAAM,CAAC;IACd,+BAA+B;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,4CAA4C;IAC5C,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,kEAAkE;IAClE,OAAO,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;IAC5B,wDAAwD;IACxD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qCAAqC;IACrC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,oCAAoC;IACpC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,sCAAsC;IACtC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,6CAA6C;IAC7C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,qDAAqD;IACrD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAgB,WAAW,CAAC,EACxB,KAAK,EACL,KAAK,EACL,QAAQ,EACR,OAAO,EACP,WAAyB,EACzB,QAAgB,EAChB,KAAa,EACb,OAAe,EACf,OAAe,EACf,QAAgB,EACnB,EAAE,QAAQ,CAAC,gBAAgB,CAAC,2CAmC5B"}
|
|
@@ -1,15 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Props for the TextArea component
|
|
3
|
+
* @interface TextAreaProps
|
|
4
|
+
*/
|
|
1
5
|
export interface TextAreaProps {
|
|
6
|
+
/** Label text displayed above the textarea */
|
|
2
7
|
label: string;
|
|
8
|
+
/** Current value of the textarea */
|
|
3
9
|
value: string;
|
|
10
|
+
/** Callback fired when textarea value changes */
|
|
4
11
|
onChange: (newValue: string) => void;
|
|
12
|
+
/** Number of visible text lines (height) */
|
|
5
13
|
rows?: number;
|
|
14
|
+
/** Placeholder text shown when textarea is empty */
|
|
6
15
|
placeholder?: string;
|
|
16
|
+
/** Whether the field is required (shows asterisk) */
|
|
7
17
|
required?: boolean;
|
|
18
|
+
/** Maximum number of characters allowed (shows counter) */
|
|
8
19
|
maxLength?: number;
|
|
20
|
+
/** Whether the textarea is disabled */
|
|
9
21
|
disabled?: boolean;
|
|
22
|
+
/** Whether to show error styling */
|
|
10
23
|
error?: boolean;
|
|
24
|
+
/** Whether to show success styling */
|
|
11
25
|
success?: boolean;
|
|
26
|
+
/** Whether the textarea is in loading state */
|
|
12
27
|
loading?: boolean;
|
|
28
|
+
/** Whether to enable focus mode styling for distraction-free writing */
|
|
13
29
|
focusMode?: boolean;
|
|
14
30
|
}
|
|
15
31
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextArea.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/TextArea/TextArea.tsx"],"names":[],"mappings":"AAGA,MAAM,WAAW,aAAa;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;CACvB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,QAAQ,CAAC,EACrB,KAAK,EACL,KAAK,EACL,QAAQ,EACR,IAAQ,EACR,WAAgB,EAChB,QAAgB,EAChB,SAAS,EACT,QAAgB,EAChB,KAAa,EACb,OAAe,EACf,OAAe,EACf,SAAiB,EACpB,EAAE,QAAQ,CAAC,aAAa,CAAC,2CAsDzB"}
|
|
1
|
+
{"version":3,"file":"TextArea.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/TextArea/TextArea.tsx"],"names":[],"mappings":"AAGA;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC1B,8CAA8C;IAC9C,KAAK,EAAE,MAAM,CAAC;IACd,oCAAoC;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,iDAAiD;IACjD,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,4CAA4C;IAC5C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,oDAAoD;IACpD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qDAAqD;IACrD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,2DAA2D;IAC3D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uCAAuC;IACvC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,oCAAoC;IACpC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,sCAAsC;IACtC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,+CAA+C;IAC/C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,wEAAwE;IACxE,SAAS,CAAC,EAAE,OAAO,CAAC;CACvB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,QAAQ,CAAC,EACrB,KAAK,EACL,KAAK,EACL,QAAQ,EACR,IAAQ,EACR,WAAgB,EAChB,QAAgB,EAChB,SAAS,EACT,QAAgB,EAChB,KAAa,EACb,OAAe,EACf,OAAe,EACf,SAAiB,EACpB,EAAE,QAAQ,CAAC,aAAa,CAAC,2CAsDzB"}
|
|
@@ -1,23 +1,45 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Props for the TextInput component
|
|
4
|
+
* @interface TextInputProps
|
|
5
|
+
*/
|
|
2
6
|
export interface TextInputProps {
|
|
7
|
+
/** Label text displayed above the input field */
|
|
3
8
|
label: string;
|
|
9
|
+
/** Current value of the input */
|
|
4
10
|
value: string;
|
|
11
|
+
/** Callback fired when input value changes */
|
|
5
12
|
onChange: (newValue: string) => void;
|
|
13
|
+
/** HTML input type (text, email, password, etc.) */
|
|
6
14
|
type?: string;
|
|
15
|
+
/** Callback fired when input receives focus */
|
|
7
16
|
onFocus?: () => void;
|
|
17
|
+
/** Callback fired when input loses focus */
|
|
8
18
|
onBlur?: () => void;
|
|
19
|
+
/** Placeholder text shown when input is empty */
|
|
9
20
|
placeholder?: string;
|
|
21
|
+
/** Error message to display below the input */
|
|
10
22
|
error?: string;
|
|
23
|
+
/** Whether the field is required (shows asterisk) */
|
|
11
24
|
required?: boolean;
|
|
25
|
+
/** Whether the input is disabled */
|
|
12
26
|
disabled?: boolean;
|
|
27
|
+
/** Whether to show success styling */
|
|
13
28
|
success?: boolean;
|
|
29
|
+
/** Whether the input is in loading state */
|
|
14
30
|
loading?: boolean;
|
|
31
|
+
/** Icon to display inside the input field */
|
|
15
32
|
icon?: ReactNode;
|
|
33
|
+
/** Optional action button displayed at the end of the input */
|
|
16
34
|
actionButton?: {
|
|
35
|
+
/** Button label text */
|
|
17
36
|
label: string;
|
|
37
|
+
/** Button click handler */
|
|
18
38
|
onClick: () => void;
|
|
19
39
|
};
|
|
40
|
+
/** Maximum number of characters allowed */
|
|
20
41
|
maxLength?: number;
|
|
42
|
+
/** HTML autocomplete attribute value */
|
|
21
43
|
autoComplete?: string;
|
|
22
44
|
}
|
|
23
45
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextInput.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/TextInput/TextInput.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGzC,MAAM,WAAW,cAAc;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,YAAY,CAAC,EAAE;QACX,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,EAAE,MAAM,IAAI,CAAC;KACvB,CAAC;IACF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,SAAS,CAAC,EACtB,KAAK,EACL,KAAK,EACL,QAAQ,EACR,IAAa,EACb,OAAO,EACP,MAAM,EACN,WAAW,EACX,KAAK,EACL,QAAQ,EACR,QAAgB,EAChB,OAAe,EACf,OAAe,EACf,IAAI,EACJ,YAAY,EACZ,SAAS,EACT,YAAY,EACf,EAAE,QAAQ,CAAC,cAAc,CAAC,2CAqD1B"}
|
|
1
|
+
{"version":3,"file":"TextInput.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/TextInput/TextInput.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGzC;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC3B,iDAAiD;IACjD,KAAK,EAAE,MAAM,CAAC;IACd,iCAAiC;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,8CAA8C;IAC9C,QAAQ,EAAE,CAAC,QAAQ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
+
*/
|
|
2
6
|
export interface ToggleProps {
|
|
7
|
+
/** Whether the toggle is in the "on" (right side) state */
|
|
3
8
|
readonly isOn: boolean;
|
|
9
|
+
/** Callback fired when toggle state changes */
|
|
4
10
|
readonly onToggle: (isOn: boolean) => void;
|
|
11
|
+
/** Label text for the left (off) option */
|
|
5
12
|
readonly leftLabel?: string;
|
|
13
|
+
/** Label text for the right (on) option */
|
|
6
14
|
readonly rightLabel?: string;
|
|
15
|
+
/** Icon to display with the left option */
|
|
7
16
|
readonly leftIcon?: React.ReactNode;
|
|
17
|
+
/** Icon to display with the right option */
|
|
8
18
|
readonly rightIcon?: React.ReactNode;
|
|
9
19
|
}
|
|
20
|
+
/**
|
|
21
|
+
* Toggle Component
|
|
22
|
+
*
|
|
23
|
+
* @component
|
|
24
|
+
* @description
|
|
25
|
+
* A two-state toggle switch component that allows users to choose between two options.
|
|
26
|
+
* Displays as a segmented control with smooth animations and hover effects.
|
|
27
|
+
* Supports both text labels and icons for each option.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* // Basic toggle with labels
|
|
31
|
+
* <Toggle
|
|
32
|
+
* isOn={darkMode}
|
|
33
|
+
* onToggle={setDarkMode}
|
|
34
|
+
* leftLabel="Light"
|
|
35
|
+
* rightLabel="Dark"
|
|
36
|
+
* />
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* // Toggle with icons
|
|
40
|
+
* <Toggle
|
|
41
|
+
* isOn={viewMode === 'grid'}
|
|
42
|
+
* onToggle={(isGrid) => setViewMode(isGrid ? 'grid' : 'list')}
|
|
43
|
+
* leftIcon={<ListIcon />}
|
|
44
|
+
* rightIcon={<GridIcon />}
|
|
45
|
+
* leftLabel="List"
|
|
46
|
+
* rightLabel="Grid"
|
|
47
|
+
* />
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* // Simple on/off toggle
|
|
51
|
+
* <Toggle
|
|
52
|
+
* isOn={notifications}
|
|
53
|
+
* onToggle={setNotifications}
|
|
54
|
+
* leftLabel="Off"
|
|
55
|
+
* rightLabel="On"
|
|
56
|
+
* />
|
|
57
|
+
*
|
|
58
|
+
* @param {ToggleProps} props - The props for the Toggle component
|
|
59
|
+
* @returns {JSX.Element} The rendered Toggle component
|
|
60
|
+
*/
|
|
10
61
|
export declare function Toggle(props: Readonly<ToggleProps>): import("react/jsx-runtime").JSX.Element;
|
|
11
62
|
//# sourceMappingURL=Toggle.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toggle.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Toggle/Toggle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,WAAW,WAAW;IACxB,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAC3C,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACpC,QAAQ,CAAC,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACxC;AAED,wBAAgB,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,WAAW,CAAC,2CAoBlD"}
|
|
1
|
+
{"version":3,"file":"Toggle.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Toggle/Toggle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B;;;GAGG;AACH,MAAM,WAAW,WAAW;IACxB,2DAA2D;IAC3D,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,+CAA+C;IAC/C,QAAQ,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAC3C,2CAA2C;IAC3C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