@vtx-ui/react 0.0.1-beta.12 → 0.0.1-beta.14
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/README.md +865 -103
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/types/components/Autocomplete/Autocomplete.d.ts +173 -0
- package/dist/types/components/Autocomplete/index.d.ts +2 -0
- package/dist/types/components/DatePicker/Calendar.d.ts +15 -0
- package/dist/types/components/DatePicker/DatePicker.d.ts +99 -0
- package/dist/types/components/DatePicker/DateRangePicker.d.ts +114 -0
- package/dist/types/components/DatePicker/index.d.ts +6 -0
- package/dist/types/components/FormControl/FormControl.d.ts +77 -0
- package/dist/types/components/FormControl/index.d.ts +3 -0
- package/dist/types/components/Image/Image.d.ts +14 -0
- package/dist/types/components/Image/index.d.ts +2 -0
- package/dist/types/components/Link/Link.d.ts +5 -0
- package/dist/types/components/Navbar/Navbar.d.ts +236 -0
- package/dist/types/components/Navbar/index.d.ts +2 -0
- package/dist/types/components/RichTextEditor/RichTextEditor.d.ts +153 -0
- package/dist/types/components/RichTextEditor/index.d.ts +2 -0
- package/dist/types/components/Text/Text.d.ts +9 -3
- package/dist/types/components/Textarea/Textarea.d.ts +81 -0
- package/dist/types/components/Textarea/index.d.ts +3 -0
- package/dist/types/components/Widget/IntelligentGrid.d.ts +15 -0
- package/dist/types/components/Widget/Widget.d.ts +9 -0
- package/dist/types/components/Widget/index.d.ts +16 -0
- package/dist/types/components/Widget/renderers/CarouselWidget.d.ts +40 -0
- package/dist/types/components/Widget/renderers/ContentBlockWidget.d.ts +56 -0
- package/dist/types/components/Widget/renderers/ContentBlockWidget.stories.d.ts +24 -0
- package/dist/types/components/Widget/renderers/GridCarouselWidget.d.ts +35 -0
- package/dist/types/components/Widget/renderers/HeaderWidget.d.ts +18 -0
- package/dist/types/components/Widget/renderers/ImageWidget.d.ts +69 -0
- package/dist/types/components/Widget/renderers/ImageWidget.stories.d.ts +11 -0
- package/dist/types/components/Widget/renderers/InfoWidget.d.ts +18 -0
- package/dist/types/components/Widget/renderers/ListWidget.d.ts +18 -0
- package/dist/types/components/Widget/renderers/MetricWidget.d.ts +18 -0
- package/dist/types/components/Widget/renderers/NavbarWidget.d.ts +16 -0
- package/dist/types/components/Widget/renderers/OrderWidget.d.ts +8 -0
- package/dist/types/components/Widget/renderers/ProductWidget.d.ts +8 -0
- package/dist/types/components/Widget/renderers/TestimonialWidget.d.ts +14 -0
- package/dist/types/components/Widget/renderers/TextWidget.d.ts +18 -0
- package/dist/types/components/Widget/types.d.ts +629 -0
- package/dist/types/icons/IconComponents.d.ts +4 -0
- package/dist/types/index.d.ts +19 -5
- package/dist/types/stories/components/Autocomplete.stories.d.ts +20 -0
- package/dist/types/stories/components/CarouselWidget.stories.d.ts +11 -0
- package/dist/types/stories/components/ContentBlockWidget.stories.d.ts +24 -0
- package/dist/types/stories/components/DatePicker.stories.d.ts +69 -0
- package/dist/types/stories/components/FormControl.stories.d.ts +57 -0
- package/dist/types/stories/components/GridCarouselWidget.stories.d.ts +17 -0
- package/dist/types/stories/components/HeaderWidget.stories.d.ts +10 -0
- package/dist/types/stories/components/InfoWidget.stories.d.ts +24 -0
- package/dist/types/stories/components/ListWidget.stories.d.ts +10 -0
- package/dist/types/stories/components/MetricWidget.stories.d.ts +12 -0
- package/dist/types/stories/components/OrderWidget.stories.d.ts +12 -0
- package/dist/types/stories/components/ProductWidget.stories.d.ts +13 -0
- package/dist/types/stories/components/RichTextEditor.stories.d.ts +22 -0
- package/dist/types/stories/components/TestimonialWidget.stories.d.ts +47 -0
- package/dist/types/stories/components/TextWidget.stories.d.ts +10 -0
- package/dist/types/stories/components/Textarea.stories.d.ts +21 -0
- package/dist/types/stories/components/Toast.stories.d.ts +56 -13
- package/dist/types/stories/components/Widget.stories.d.ts +10 -0
- package/dist/types/stories/widgets/DashboardCard.stories.d.ts +58 -0
- package/dist/types/stories/widgets/InfoCard.stories.d.ts +1 -4
- package/dist/types/stories/widgets/InfoListCard.stories.d.ts +3 -15
- package/dist/types/stories/widgets/InfoText.stories.d.ts +1 -19
- package/dist/types/stories/widgets/MetricCard.stories.d.ts +27 -0
- package/dist/types/stories/widgets/OrderCard.stories.d.ts +3 -9
- package/dist/types/stories/widgets/OrderConfirmation.stories.d.ts +1 -24
- package/dist/types/stories/widgets/OrderDetails.stories.d.ts +3 -7
- package/dist/types/stories/widgets/ProductCard.stories.d.ts +1 -15
- package/dist/types/theme/ThemeProvider.d.ts +14 -0
- package/dist/types/utils/parseClass.d.ts +2 -0
- package/dist/types/widgets/DashboardCard/DashboardCard.d.ts +275 -0
- package/dist/types/widgets/DashboardCard/index.d.ts +2 -0
- package/dist/types/widgets/MetricCard/MetricCard.d.ts +106 -0
- package/dist/types/widgets/MetricCard/index.d.ts +2 -0
- package/dist/types/widgets/Navbar/Navbar.d.ts +308 -0
- package/dist/types/widgets/Navbar/Navbar.stories.d.ts +23 -0
- package/dist/types/widgets/Navbar/index.d.ts +2 -0
- package/dist/types/widgets/OrderCard/OrderCard.d.ts +1 -0
- package/package.json +2 -1
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import React, { InputHTMLAttributes } from 'react';
|
|
2
|
+
import { Size } from '../../theme';
|
|
3
|
+
import './Autocomplete.css';
|
|
4
|
+
export interface AutocompleteOption {
|
|
5
|
+
/**
|
|
6
|
+
* Value of the option
|
|
7
|
+
*/
|
|
8
|
+
value: string;
|
|
9
|
+
/**
|
|
10
|
+
* Display label for the option
|
|
11
|
+
*/
|
|
12
|
+
label: string;
|
|
13
|
+
/**
|
|
14
|
+
* Optional description or secondary text
|
|
15
|
+
*/
|
|
16
|
+
description?: string;
|
|
17
|
+
/**
|
|
18
|
+
* If true, option cannot be selected
|
|
19
|
+
* @default false
|
|
20
|
+
*/
|
|
21
|
+
disabled?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Icon to display before label
|
|
24
|
+
*/
|
|
25
|
+
icon?: React.ReactNode;
|
|
26
|
+
}
|
|
27
|
+
export interface AutocompleteProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'onChange' | 'onSelect'> {
|
|
28
|
+
/**
|
|
29
|
+
* Label text displayed above the input
|
|
30
|
+
*/
|
|
31
|
+
label?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Helper text displayed below the input
|
|
34
|
+
* Provides additional context or instructions
|
|
35
|
+
*/
|
|
36
|
+
helperText?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Error message - when provided, input is shown in error state
|
|
39
|
+
* Takes precedence over helperText when both are present
|
|
40
|
+
*/
|
|
41
|
+
error?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Success message - when provided, input is shown in success state
|
|
44
|
+
*/
|
|
45
|
+
success?: string;
|
|
46
|
+
/**
|
|
47
|
+
* Size of the input
|
|
48
|
+
* @default theme.defaultSize
|
|
49
|
+
*/
|
|
50
|
+
size?: Size;
|
|
51
|
+
/**
|
|
52
|
+
* If true, input will take full width of its container
|
|
53
|
+
* @default false
|
|
54
|
+
*/
|
|
55
|
+
fullWidth?: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Options to display in the autocomplete dropdown
|
|
58
|
+
*/
|
|
59
|
+
options: any[];
|
|
60
|
+
/**
|
|
61
|
+
* Property name or function to extract the display label from each option
|
|
62
|
+
* @default 'label'
|
|
63
|
+
* @example
|
|
64
|
+
* getOptionLabel="productName" // uses option.productName
|
|
65
|
+
* getOptionLabel={(option) => option.firstName + ' ' + option.lastName}
|
|
66
|
+
*/
|
|
67
|
+
getOptionLabel?: string | ((option: any) => string);
|
|
68
|
+
/**
|
|
69
|
+
* Property name or function to extract the value from each option
|
|
70
|
+
* @default 'value'
|
|
71
|
+
* @example
|
|
72
|
+
* getOptionValue="id" // uses option.id
|
|
73
|
+
* getOptionValue={(option) => option.uuid}
|
|
74
|
+
*/
|
|
75
|
+
getOptionValue?: string | ((option: any) => string);
|
|
76
|
+
/**
|
|
77
|
+
* Property name or function to determine if an option is disabled
|
|
78
|
+
* @default 'disabled'
|
|
79
|
+
* @example
|
|
80
|
+
* getOptionDisabled="isInactive" // uses option.isInactive
|
|
81
|
+
* getOptionDisabled={(option) => option.stock === 0}
|
|
82
|
+
*/
|
|
83
|
+
getOptionDisabled?: string | ((option: any) => boolean);
|
|
84
|
+
/**
|
|
85
|
+
* Property name or function to extract the description from each option
|
|
86
|
+
* @default 'description'
|
|
87
|
+
*/
|
|
88
|
+
getOptionDescription?: string | ((option: any) => string | undefined);
|
|
89
|
+
/**
|
|
90
|
+
* Property name or function to extract the icon from each option
|
|
91
|
+
* @default 'icon'
|
|
92
|
+
*/
|
|
93
|
+
getOptionIcon?: string | ((option: any) => React.ReactNode);
|
|
94
|
+
/**
|
|
95
|
+
* Message to display when no options are available
|
|
96
|
+
* @default 'No options'
|
|
97
|
+
*/
|
|
98
|
+
noOptionsMessage?: string;
|
|
99
|
+
/**
|
|
100
|
+
* If true, shows a loading spinner
|
|
101
|
+
* @default false
|
|
102
|
+
*/
|
|
103
|
+
loading?: boolean;
|
|
104
|
+
/**
|
|
105
|
+
* Loading message to display
|
|
106
|
+
* @default 'Loading...'
|
|
107
|
+
*/
|
|
108
|
+
loadingMessage?: string;
|
|
109
|
+
/**
|
|
110
|
+
* Callback fired when input value changes
|
|
111
|
+
*/
|
|
112
|
+
onChange?: (value: string) => void;
|
|
113
|
+
/**
|
|
114
|
+
* Callback fired when an option is selected
|
|
115
|
+
* Provides the selected option and its value
|
|
116
|
+
*/
|
|
117
|
+
onSelect?: (value: string, option: any) => void;
|
|
118
|
+
/**
|
|
119
|
+
* If true, shows search icon on the left
|
|
120
|
+
* @default false
|
|
121
|
+
*/
|
|
122
|
+
showSearchIcon?: boolean;
|
|
123
|
+
/**
|
|
124
|
+
* If true, shows a clear button when input has value
|
|
125
|
+
* @default false
|
|
126
|
+
*/
|
|
127
|
+
clearable?: boolean;
|
|
128
|
+
/**
|
|
129
|
+
* Callback fired when clear button is clicked
|
|
130
|
+
*/
|
|
131
|
+
onClear?: () => void;
|
|
132
|
+
/**
|
|
133
|
+
* Custom class name for the wrapper element
|
|
134
|
+
*/
|
|
135
|
+
wrapperClassName?: string;
|
|
136
|
+
/**
|
|
137
|
+
* Custom class name for the label element
|
|
138
|
+
*/
|
|
139
|
+
labelClassName?: string;
|
|
140
|
+
/**
|
|
141
|
+
* Custom class name for the input element itself
|
|
142
|
+
*/
|
|
143
|
+
inputClassName?: string;
|
|
144
|
+
/**
|
|
145
|
+
* Custom class name for the dropdown element
|
|
146
|
+
*/
|
|
147
|
+
dropdownClassName?: string;
|
|
148
|
+
/**
|
|
149
|
+
* Custom render function for options
|
|
150
|
+
*/
|
|
151
|
+
renderOption?: (option: any, index: number) => React.ReactNode;
|
|
152
|
+
/**
|
|
153
|
+
* Input value (controlled)
|
|
154
|
+
*/
|
|
155
|
+
value?: string;
|
|
156
|
+
/**
|
|
157
|
+
* If true, opens dropdown on focus even if input is empty
|
|
158
|
+
* @default true
|
|
159
|
+
*/
|
|
160
|
+
openOnFocus?: boolean;
|
|
161
|
+
/**
|
|
162
|
+
* Minimum characters to type before showing options
|
|
163
|
+
* @default 0
|
|
164
|
+
*/
|
|
165
|
+
minSearchLength?: number;
|
|
166
|
+
}
|
|
167
|
+
declare const AutocompleteWithParsedClasses: {
|
|
168
|
+
(props: AutocompleteProps & React.RefAttributes<HTMLInputElement>): import("react/jsx-runtime").JSX.Element;
|
|
169
|
+
displayName: string;
|
|
170
|
+
};
|
|
171
|
+
declare const _default: React.FC<AutocompleteProps & React.RefAttributes<HTMLInputElement>>;
|
|
172
|
+
export default _default;
|
|
173
|
+
export { AutocompleteWithParsedClasses as Autocomplete };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface CalendarProps {
|
|
3
|
+
value?: Date | null;
|
|
4
|
+
onChange?: (date: Date) => void;
|
|
5
|
+
minDate?: Date;
|
|
6
|
+
maxDate?: Date;
|
|
7
|
+
disabledDates?: Date[];
|
|
8
|
+
currentMonth?: Date;
|
|
9
|
+
onMonthChange?: (date: Date) => void;
|
|
10
|
+
isDateDisabled?: (date: Date) => boolean;
|
|
11
|
+
rangeValue?: [Date | null, Date | null];
|
|
12
|
+
onRangeChange?: (range: [Date | null, Date | null]) => void;
|
|
13
|
+
isRangeMode?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare const Calendar: React.FC<CalendarProps>;
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Size } from '../../theme';
|
|
3
|
+
import './DatePicker.css';
|
|
4
|
+
export interface DatePickerProps {
|
|
5
|
+
/**
|
|
6
|
+
* The selected date value
|
|
7
|
+
*/
|
|
8
|
+
value?: Date | null;
|
|
9
|
+
/**
|
|
10
|
+
* Callback fired when the date changes
|
|
11
|
+
*/
|
|
12
|
+
onChange?: (date: Date | null) => void;
|
|
13
|
+
/**
|
|
14
|
+
* Label text displayed above the input
|
|
15
|
+
*/
|
|
16
|
+
label?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Placeholder text
|
|
19
|
+
*/
|
|
20
|
+
placeholder?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Helper text displayed below the input
|
|
23
|
+
*/
|
|
24
|
+
helperText?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Error message
|
|
27
|
+
*/
|
|
28
|
+
error?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Success message
|
|
31
|
+
*/
|
|
32
|
+
success?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Size of the input
|
|
35
|
+
*/
|
|
36
|
+
size?: Size;
|
|
37
|
+
/**
|
|
38
|
+
* If true, input will take full width of its container
|
|
39
|
+
*/
|
|
40
|
+
fullWidth?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* If true, the input is disabled
|
|
43
|
+
*/
|
|
44
|
+
disabled?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* If true, the field is required
|
|
47
|
+
*/
|
|
48
|
+
required?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Minimum selectable date
|
|
51
|
+
*/
|
|
52
|
+
minDate?: Date;
|
|
53
|
+
/**
|
|
54
|
+
* Maximum selectable date
|
|
55
|
+
*/
|
|
56
|
+
maxDate?: Date;
|
|
57
|
+
/**
|
|
58
|
+
* Array of disabled dates
|
|
59
|
+
*/
|
|
60
|
+
disabledDates?: Date[];
|
|
61
|
+
/**
|
|
62
|
+
* Custom function to determine if a date should be disabled
|
|
63
|
+
*/
|
|
64
|
+
isDateDisabled?: (date: Date) => boolean;
|
|
65
|
+
/**
|
|
66
|
+
* Date format for display
|
|
67
|
+
* @default 'MM/DD/YYYY'
|
|
68
|
+
*/
|
|
69
|
+
format?: string;
|
|
70
|
+
/**
|
|
71
|
+
* Show today button in footer
|
|
72
|
+
* @default true
|
|
73
|
+
*/
|
|
74
|
+
showToday?: boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Custom class name
|
|
77
|
+
*/
|
|
78
|
+
className?: string;
|
|
79
|
+
/**
|
|
80
|
+
* Custom class name for the input
|
|
81
|
+
*/
|
|
82
|
+
inputClassName?: string;
|
|
83
|
+
/**
|
|
84
|
+
* Custom class name for the dropdown
|
|
85
|
+
*/
|
|
86
|
+
dropdownClassName?: string;
|
|
87
|
+
/**
|
|
88
|
+
* If true, shows a clear button when input has value
|
|
89
|
+
* @default false
|
|
90
|
+
*/
|
|
91
|
+
clearable?: boolean;
|
|
92
|
+
}
|
|
93
|
+
declare const DatePickerWithParsedClasses: {
|
|
94
|
+
(props: DatePickerProps & React.RefAttributes<HTMLInputElement>): import("react/jsx-runtime").JSX.Element;
|
|
95
|
+
displayName: string;
|
|
96
|
+
};
|
|
97
|
+
declare const _default: React.FC<DatePickerProps & React.RefAttributes<HTMLInputElement>>;
|
|
98
|
+
export default _default;
|
|
99
|
+
export { DatePickerWithParsedClasses as DatePicker };
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Size } from '../../theme';
|
|
3
|
+
import './DatePicker.css';
|
|
4
|
+
export interface DateRange {
|
|
5
|
+
start: Date | null;
|
|
6
|
+
end: Date | null;
|
|
7
|
+
}
|
|
8
|
+
export interface DateRangePickerProps {
|
|
9
|
+
/**
|
|
10
|
+
* The selected date range value
|
|
11
|
+
*/
|
|
12
|
+
value?: DateRange;
|
|
13
|
+
/**
|
|
14
|
+
* Callback fired when the date range changes
|
|
15
|
+
*/
|
|
16
|
+
onChange?: (range: DateRange) => void;
|
|
17
|
+
/**
|
|
18
|
+
* Label text displayed above the input
|
|
19
|
+
*/
|
|
20
|
+
label?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Placeholder text for start date
|
|
23
|
+
*/
|
|
24
|
+
startPlaceholder?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Placeholder text for end date
|
|
27
|
+
*/
|
|
28
|
+
endPlaceholder?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Helper text displayed below the input
|
|
31
|
+
*/
|
|
32
|
+
helperText?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Error message
|
|
35
|
+
*/
|
|
36
|
+
error?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Success message
|
|
39
|
+
*/
|
|
40
|
+
success?: string;
|
|
41
|
+
/**
|
|
42
|
+
* Size of the input
|
|
43
|
+
*/
|
|
44
|
+
size?: Size;
|
|
45
|
+
/**
|
|
46
|
+
* If true, input will take full width of its container
|
|
47
|
+
*/
|
|
48
|
+
fullWidth?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* If true, the input is disabled
|
|
51
|
+
*/
|
|
52
|
+
disabled?: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* If true, the field is required
|
|
55
|
+
*/
|
|
56
|
+
required?: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* Minimum selectable date
|
|
59
|
+
*/
|
|
60
|
+
minDate?: Date;
|
|
61
|
+
/**
|
|
62
|
+
* Maximum selectable date
|
|
63
|
+
*/
|
|
64
|
+
maxDate?: Date;
|
|
65
|
+
/**
|
|
66
|
+
* Array of disabled dates
|
|
67
|
+
*/
|
|
68
|
+
disabledDates?: Date[];
|
|
69
|
+
/**
|
|
70
|
+
* Custom function to determine if a date should be disabled
|
|
71
|
+
*/
|
|
72
|
+
isDateDisabled?: (date: Date) => boolean;
|
|
73
|
+
/**
|
|
74
|
+
* Date format for display
|
|
75
|
+
* @default 'MM/DD/YYYY'
|
|
76
|
+
*/
|
|
77
|
+
format?: string;
|
|
78
|
+
/**
|
|
79
|
+
* Range separator text
|
|
80
|
+
* @default 'to'
|
|
81
|
+
*/
|
|
82
|
+
separator?: string;
|
|
83
|
+
/**
|
|
84
|
+
* Preset date ranges
|
|
85
|
+
*/
|
|
86
|
+
presets?: {
|
|
87
|
+
label: string;
|
|
88
|
+
range: DateRange;
|
|
89
|
+
}[];
|
|
90
|
+
/**
|
|
91
|
+
* Custom class name
|
|
92
|
+
*/
|
|
93
|
+
className?: string;
|
|
94
|
+
/**
|
|
95
|
+
* Custom class name for the input
|
|
96
|
+
*/
|
|
97
|
+
inputClassName?: string;
|
|
98
|
+
/**
|
|
99
|
+
* Custom class name for the dropdown
|
|
100
|
+
*/
|
|
101
|
+
dropdownClassName?: string;
|
|
102
|
+
/**
|
|
103
|
+
* If true, shows a clear button when input has value
|
|
104
|
+
* @default false
|
|
105
|
+
*/
|
|
106
|
+
clearable?: boolean;
|
|
107
|
+
}
|
|
108
|
+
declare const DateRangePickerWithParsedClasses: {
|
|
109
|
+
(props: DateRangePickerProps & React.RefAttributes<HTMLInputElement>): import("react/jsx-runtime").JSX.Element;
|
|
110
|
+
displayName: string;
|
|
111
|
+
};
|
|
112
|
+
declare const _default: React.FC<DateRangePickerProps & React.RefAttributes<HTMLInputElement>>;
|
|
113
|
+
export default _default;
|
|
114
|
+
export { DateRangePickerWithParsedClasses as DateRangePicker };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { default as DatePicker } from './DatePicker';
|
|
2
|
+
export { default as DateRangePicker } from './DateRangePicker';
|
|
3
|
+
export type { DatePickerProps } from './DatePicker';
|
|
4
|
+
export type { DateRangePickerProps, DateRange } from './DateRangePicker';
|
|
5
|
+
export { Calendar } from './Calendar';
|
|
6
|
+
export type { CalendarProps } from './Calendar';
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Size } from '../../theme';
|
|
3
|
+
import './FormControl.css';
|
|
4
|
+
export interface FormControlProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
5
|
+
/**
|
|
6
|
+
* Label text displayed above the form field
|
|
7
|
+
*/
|
|
8
|
+
label?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Helper text displayed below the form field
|
|
11
|
+
* Provides additional context or instructions
|
|
12
|
+
*/
|
|
13
|
+
helperText?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Error message - when provided, field is shown in error state
|
|
16
|
+
* Takes precedence over helperText when both are present
|
|
17
|
+
*/
|
|
18
|
+
error?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Success message - when provided, field is shown in success state
|
|
21
|
+
*/
|
|
22
|
+
success?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Size of the form control
|
|
25
|
+
* Passed to child components if they support size prop
|
|
26
|
+
* @default theme.defaultSize
|
|
27
|
+
*/
|
|
28
|
+
size?: Size;
|
|
29
|
+
/**
|
|
30
|
+
* If true, form control will take full width of its container
|
|
31
|
+
* @default true
|
|
32
|
+
*/
|
|
33
|
+
fullWidth?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* If true, adds required indicator to label
|
|
36
|
+
* @default false
|
|
37
|
+
*/
|
|
38
|
+
required?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* If true, applies disabled styling
|
|
41
|
+
* @default false
|
|
42
|
+
*/
|
|
43
|
+
disabled?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Custom class name for the wrapper element
|
|
46
|
+
*/
|
|
47
|
+
wrapperClassName?: string;
|
|
48
|
+
/**
|
|
49
|
+
* Custom class name for the label element
|
|
50
|
+
*/
|
|
51
|
+
labelClassName?: string;
|
|
52
|
+
/**
|
|
53
|
+
* Spacing between form controls when stacked
|
|
54
|
+
* @default 'md'
|
|
55
|
+
*/
|
|
56
|
+
spacing?: 'none' | 'sm' | 'md' | 'lg';
|
|
57
|
+
/**
|
|
58
|
+
* Form control children (Input, Textarea, Select, etc.)
|
|
59
|
+
*/
|
|
60
|
+
children: React.ReactNode;
|
|
61
|
+
/**
|
|
62
|
+
* Custom id for accessibility
|
|
63
|
+
*/
|
|
64
|
+
id?: string;
|
|
65
|
+
/**
|
|
66
|
+
* Position of the label
|
|
67
|
+
* @default 'top'
|
|
68
|
+
*/
|
|
69
|
+
labelPosition?: 'top' | 'left';
|
|
70
|
+
}
|
|
71
|
+
declare const FormControlWithParsedClasses: {
|
|
72
|
+
(props: FormControlProps & React.RefAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
73
|
+
displayName: string;
|
|
74
|
+
};
|
|
75
|
+
declare const _default: React.FC<FormControlProps & React.RefAttributes<HTMLDivElement>>;
|
|
76
|
+
export default _default;
|
|
77
|
+
export { FormControlWithParsedClasses as FormControl };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface ImageProps extends React.ImgHTMLAttributes<HTMLImageElement> {
|
|
3
|
+
/**
|
|
4
|
+
* If true, always use native <img> even if a custom imageComponent is provided in ThemeProvider
|
|
5
|
+
* @default false
|
|
6
|
+
*/
|
|
7
|
+
forceNative?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Custom image component to use (overrides ThemeProvider)
|
|
10
|
+
*/
|
|
11
|
+
imageComponent?: React.ElementType;
|
|
12
|
+
}
|
|
13
|
+
export declare const Image: React.FC<ImageProps>;
|
|
14
|
+
export default Image;
|
|
@@ -52,6 +52,11 @@ export interface LinkProps extends Omit<AnchorHTMLAttributes<HTMLAnchorElement>,
|
|
|
52
52
|
* @default false
|
|
53
53
|
*/
|
|
54
54
|
external?: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* If true or string, triggers browser download
|
|
57
|
+
* @default false
|
|
58
|
+
*/
|
|
59
|
+
download?: boolean | string;
|
|
55
60
|
children?: React.ReactNode;
|
|
56
61
|
}
|
|
57
62
|
declare const LinkWithParsedClasses: {
|