@povio/ui 0.0.1
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/package.json +17 -0
- package/povio-ui-0.0.1.tgz +0 -0
- package/src/assets/icons/AlignCenter.d.ts +2 -0
- package/src/assets/icons/AlignLeft.d.ts +2 -0
- package/src/assets/icons/AlignLeftRight.d.ts +2 -0
- package/src/assets/icons/AlignRight.d.ts +2 -0
- package/src/assets/icons/ArrowDropDown.d.ts +2 -0
- package/src/assets/icons/ArrowDropUp.d.ts +2 -0
- package/src/assets/icons/ArrowLeft.d.ts +2 -0
- package/src/assets/icons/ArrowRight.d.ts +2 -0
- package/src/assets/icons/Bold.d.ts +2 -0
- package/src/assets/icons/BulletedList.d.ts +2 -0
- package/src/assets/icons/Calendar.d.ts +2 -0
- package/src/assets/icons/Check.d.ts +2 -0
- package/src/assets/icons/CheckCircle.d.ts +2 -0
- package/src/assets/icons/CheckboxCheckmark.d.ts +2 -0
- package/src/assets/icons/CheckboxIndeterminate.d.ts +2 -0
- package/src/assets/icons/ChevronDown.d.ts +2 -0
- package/src/assets/icons/ChevronLeft.d.ts +2 -0
- package/src/assets/icons/ChevronRight.d.ts +2 -0
- package/src/assets/icons/ChevronUp.d.ts +2 -0
- package/src/assets/icons/ChevronsLeft.d.ts +2 -0
- package/src/assets/icons/ChevronsRight.d.ts +2 -0
- package/src/assets/icons/Clock.d.ts +2 -0
- package/src/assets/icons/Close.d.ts +2 -0
- package/src/assets/icons/DateTime.d.ts +2 -0
- package/src/assets/icons/Drag.d.ts +2 -0
- package/src/assets/icons/File.d.ts +2 -0
- package/src/assets/icons/Highlight.d.ts +2 -0
- package/src/assets/icons/HighlightOn.d.ts +6 -0
- package/src/assets/icons/Info.d.ts +2 -0
- package/src/assets/icons/Italic.d.ts +2 -0
- package/src/assets/icons/Link.d.ts +2 -0
- package/src/assets/icons/Menu.d.ts +2 -0
- package/src/assets/icons/NumberedList.d.ts +2 -0
- package/src/assets/icons/PointerHorizontal.d.ts +2 -0
- package/src/assets/icons/PointerVertical.d.ts +2 -0
- package/src/assets/icons/Send.d.ts +2 -0
- package/src/assets/icons/Strikethrough.d.ts +2 -0
- package/src/assets/icons/TextColor.d.ts +6 -0
- package/src/assets/icons/Today.d.ts +2 -0
- package/src/assets/icons/Underlined.d.ts +2 -0
- package/src/assets/icons/Upload.d.ts +2 -0
- package/src/assets/icons/View.d.ts +2 -0
- package/src/assets/icons/ViewOff.d.ts +2 -0
- package/src/assets/icons/Warningfilled.d.ts +2 -0
- package/src/components/Menu/Menu.d.ts +14 -0
- package/src/components/Menu/MenuDesktop.d.ts +2 -0
- package/src/components/Menu/MenuItem.d.ts +5 -0
- package/src/components/Menu/MenuMobile.d.ts +2 -0
- package/src/components/Menu/MenuPopover.d.ts +5 -0
- package/src/components/buttons/Button/Button.d.ts +27 -0
- package/src/components/buttons/Button/button.cva.d.ts +30 -0
- package/src/components/buttons/IconButton/IconButton.d.ts +10 -0
- package/src/components/buttons/InlineIconButton/InlineIconButton.d.ts +11 -0
- package/src/components/buttons/PillButton/PillButton.d.ts +11 -0
- package/src/components/buttons/PillButton/pillButton.cva.d.ts +14 -0
- package/src/components/buttons/SplitButton/SplitButton.d.ts +10 -0
- package/src/components/buttons/TextButton/TextButton.d.ts +11 -0
- package/src/components/buttons/ToggleButton/ToggleButton.d.ts +9 -0
- package/src/components/buttons/shared/ButtonContent.d.ts +16 -0
- package/src/components/buttons/shared/buttonContent.cva.d.ts +6 -0
- package/src/components/inputs/Checkbox/Checkbox.d.ts +17 -0
- package/src/components/inputs/Checkbox/CheckboxCheckmark.d.ts +9 -0
- package/src/components/inputs/Checkbox/checkbox.cva.d.ts +11 -0
- package/src/components/inputs/DateTime/DatePicker/DatePicker.d.ts +24 -0
- package/src/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +32 -0
- package/src/components/inputs/DateTime/DateTimePicker/DateTimePicker.d.ts +22 -0
- package/src/components/inputs/DateTime/TimePicker/TimePicker.d.ts +20 -0
- package/src/components/inputs/DateTime/shared/Calendar.d.ts +20 -0
- package/src/components/inputs/DateTime/shared/CalendarCell.d.ts +20 -0
- package/src/components/inputs/DateTime/shared/CalendarGrid.d.ts +25 -0
- package/src/components/inputs/DateTime/shared/CalendarHeader.d.ts +16 -0
- package/src/components/inputs/DateTime/shared/CalendarSelectHeader.d.ts +17 -0
- package/src/components/inputs/DateTime/shared/DateField.d.ts +12 -0
- package/src/components/inputs/DateTime/shared/DatePickerInput.d.ts +20 -0
- package/src/components/inputs/DateTime/shared/DateSegmentItem.d.ts +11 -0
- package/src/components/inputs/DateTime/shared/DateTimeDialog.d.ts +15 -0
- package/src/components/inputs/DateTime/shared/DateTimeDialogFooter.d.ts +7 -0
- package/src/components/inputs/DateTime/shared/MonthPicker.d.ts +7 -0
- package/src/components/inputs/DateTime/shared/RangeCalendar.d.ts +26 -0
- package/src/components/inputs/DateTime/shared/TimeField.d.ts +12 -0
- package/src/components/inputs/DateTime/shared/TimePickerForm.d.ts +10 -0
- package/src/components/inputs/DateTime/shared/TimePickerInput.d.ts +18 -0
- package/src/components/inputs/DateTime/shared/YearPicker.d.ts +8 -0
- package/src/components/inputs/File/FileUpload.d.ts +4 -0
- package/src/components/inputs/File/FileUploadContainer.d.ts +3 -0
- package/src/components/inputs/File/InputUpload.d.ts +4 -0
- package/src/components/inputs/File/fileUpload.types.d.ts +79 -0
- package/src/components/inputs/File/index.d.ts +9 -0
- package/src/components/inputs/File/inputUpload.types.d.ts +30 -0
- package/src/components/inputs/File/shared/FileCard.d.ts +9 -0
- package/src/components/inputs/File/shared/FileCardList.d.ts +9 -0
- package/src/components/inputs/File/shared/FileProgressBar.d.ts +3 -0
- package/src/components/inputs/File/shared/FileUploadContent.d.ts +10 -0
- package/src/components/inputs/File/shared/FileUploadContentEmpty.d.ts +9 -0
- package/src/components/inputs/File/shared/FileUploadContentError.d.ts +11 -0
- package/src/components/inputs/File/shared/FileUploadContentFilled.d.ts +11 -0
- package/src/components/inputs/File/shared/FileUploadContentLoading.d.ts +9 -0
- package/src/components/inputs/File/shared/InputUploadContent.d.ts +8 -0
- package/src/components/inputs/File/shared/InputUploadFilled.d.ts +7 -0
- package/src/components/inputs/File/shared/fileUpload.cva.d.ts +11 -0
- package/src/components/inputs/File/shared/inputUploadButton.cva.d.ts +10 -0
- package/src/components/inputs/FormField/FormField.d.ts +17 -0
- package/src/components/inputs/FormField/FormFieldError.d.ts +7 -0
- package/src/components/inputs/FormField/FormFieldHeader.d.ts +14 -0
- package/src/components/inputs/FormField/FormFieldHeaderClose.d.ts +5 -0
- package/src/components/inputs/FormField/FormFieldLabel.d.ts +11 -0
- package/src/components/inputs/Input/NumberInput/NumberInput.d.ts +18 -0
- package/src/components/inputs/Input/PasswordInput/PasswordInput.d.ts +7 -0
- package/src/components/inputs/Input/TextArea/TextArea.d.ts +17 -0
- package/src/components/inputs/Input/TextInput/TextInput.d.ts +19 -0
- package/src/components/inputs/Input/shared/InputContent.d.ts +27 -0
- package/src/components/inputs/Inputs/Form.d.ts +26 -0
- package/src/components/inputs/Inputs/InputItem.d.ts +73 -0
- package/src/components/inputs/Inputs/Inputs.d.ts +10 -0
- package/src/components/inputs/RadioGroup/RadioGroup.d.ts +18 -0
- package/src/components/inputs/RadioGroup/radio.cva.d.ts +11 -0
- package/src/components/inputs/Selection/Autocomplete/Autocomplete.d.ts +8 -0
- package/src/components/inputs/Selection/Autocomplete/QueryAutocomplete.d.ts +19 -0
- package/src/components/inputs/Selection/Select/Select.d.ts +8 -0
- package/src/components/inputs/Selection/shared/SelectBase.d.ts +24 -0
- package/src/components/inputs/Selection/shared/SelectDesktop.d.ts +5 -0
- package/src/components/inputs/Selection/shared/SelectInput.d.ts +15 -0
- package/src/components/inputs/Selection/shared/SelectListBox.d.ts +9 -0
- package/src/components/inputs/Selection/shared/SelectListBoxItem.d.ts +8 -0
- package/src/components/inputs/Selection/shared/SelectListBoxItemSelectAll.d.ts +4 -0
- package/src/components/inputs/Selection/shared/SelectListBoxLoadingItem.d.ts +6 -0
- package/src/components/inputs/Selection/shared/SelectListBoxSelectionBar.d.ts +5 -0
- package/src/components/inputs/Selection/shared/SelectMobile.d.ts +5 -0
- package/src/components/inputs/Selection/shared/select.context.d.ts +30 -0
- package/src/components/inputs/Selection/shared/select.types.d.ts +55 -0
- package/src/components/inputs/Selection/shared/useSelectItems.d.ts +23 -0
- package/src/components/inputs/Slider/Slider.d.ts +18 -0
- package/src/components/inputs/TextEditor/TextEditor.d.ts +20 -0
- package/src/components/inputs/TextEditor/Toolbar/ColorPicker.d.ts +7 -0
- package/src/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.d.ts +10 -0
- package/src/components/inputs/TextEditor/Toolbar/HyperlinkAction.d.ts +2 -0
- package/src/components/inputs/TextEditor/Toolbar/TextAlignSelect.d.ts +2 -0
- package/src/components/inputs/TextEditor/Toolbar/TextColorSelect.d.ts +2 -0
- package/src/components/inputs/TextEditor/Toolbar/TextEditorToolbar.d.ts +6 -0
- package/src/components/inputs/TextEditor/Toolbar/TextHighlightSelect.d.ts +2 -0
- package/src/components/inputs/TextEditor/Toolbar/TextListActions.d.ts +2 -0
- package/src/components/inputs/TextEditor/Toolbar/TextMarksActions.d.ts +2 -0
- package/src/components/inputs/TextEditor/Toolbar/TextStyleSelect.d.ts +2 -0
- package/src/components/inputs/TextEditor/textEditor.types.d.ts +5 -0
- package/src/components/inputs/Toggle/Toggle.d.ts +14 -0
- package/src/components/inputs/Toggle/toggle.cva.d.ts +10 -0
- package/src/components/inputs/shared/CheckContent.d.ts +7 -0
- package/src/components/inputs/shared/InputClear.d.ts +6 -0
- package/src/components/inputs/shared/form.types.d.ts +12 -0
- package/src/components/inputs/shared/input.cva.d.ts +22 -0
- package/src/components/inputs/shared/label.cva.d.ts +10 -0
- package/src/components/outline.clsx.d.ts +2 -0
- package/src/components/overlays/ActionModal/ActionModal.d.ts +19 -0
- package/src/components/overlays/BottomSheet/BottomSheet.d.ts +21 -0
- package/src/components/overlays/Drawer/Drawer.d.ts +13 -0
- package/src/components/overlays/Modal/Modal.d.ts +11 -0
- package/src/components/overlays/Modal/modal.cva.d.ts +12 -0
- package/src/components/overlays/ResponsivePopover/ResponsivePopover.d.ts +10 -0
- package/src/components/overlays/Tooltip/Tooltip.d.ts +9 -0
- package/src/components/overlays/Tooltip/TooltipEllipsis.d.ts +7 -0
- package/src/components/segment/Segment.d.ts +4 -0
- package/src/components/segment/SegmentItem.d.ts +2 -0
- package/src/components/segment/segment.types.d.ts +34 -0
- package/src/components/shared/pagination/Pagination.d.ts +9 -0
- package/src/components/shared/pagination/PaginationList.d.ts +15 -0
- package/src/components/shared/pagination/minWidth.cva.d.ts +3 -0
- package/src/components/status/Alert/Alert.d.ts +11 -0
- package/src/components/status/Alert/alert.cva.d.ts +7 -0
- package/src/components/status/Loader/Loader.d.ts +5 -0
- package/src/components/status/Loader/loader.cva.d.ts +9 -0
- package/src/components/status/Toast/Toast.d.ts +14 -0
- package/src/components/status/Toast/toast.cva.d.ts +18 -0
- package/src/components/status/Toast/useToast.d.ts +12 -0
- package/src/components/status/shared/status.cva.d.ts +8 -0
- package/src/components/table/CellText.d.ts +7 -0
- package/src/components/table/ColumnConfig.d.ts +10 -0
- package/src/components/table/HeaderText.d.ts +5 -0
- package/src/components/table/InfiniteTable.d.ts +9 -0
- package/src/components/table/PaginatedTable.d.ts +11 -0
- package/src/components/table/Table.d.ts +37 -0
- package/src/components/table/table.cva.d.ts +15 -0
- package/src/components/text/Link/Link.d.ts +7 -0
- package/src/components/text/Link/link.cva.d.ts +6 -0
- package/src/components/text/Tag/Tag.d.ts +10 -0
- package/src/components/text/Tag/tag.cva.d.ts +6 -0
- package/src/components/text/Typography/Typography.d.ts +11 -0
- package/src/components/text/Typography/typography.cva.d.ts +8 -0
- package/src/config/confirmation.context.d.ts +20 -0
- package/src/config/i18n.d.ts +315 -0
- package/src/config/router.context.d.ts +20 -0
- package/src/config/uiConfig.context.d.ts +28 -0
- package/src/config/uiStyle.context.d.ts +84 -0
- package/src/helpers/dynamicColumns.d.ts +44 -0
- package/src/helpers/dynamicInputs.d.ts +83 -0
- package/src/hooks/useAutosave.d.ts +9 -0
- package/src/hooks/useBreakpoint.d.ts +3 -0
- package/src/hooks/useDebounceCallback.d.ts +6 -0
- package/src/hooks/useDeepCompare.d.ts +4 -0
- package/src/hooks/useFilters.d.ts +7 -0
- package/src/hooks/useForm.d.ts +18 -0
- package/src/hooks/useFormAutosave.d.ts +13 -0
- package/src/hooks/useIntersectionObserver.d.ts +7 -0
- package/src/hooks/useLocalStorage.d.ts +13 -0
- package/src/hooks/useLongPressRepeat.d.ts +9 -0
- package/src/hooks/usePagination.d.ts +7 -0
- package/src/hooks/useScrollableListBox.d.ts +3 -0
- package/src/hooks/useSingletonMutation.d.ts +2 -0
- package/src/hooks/useSorting.d.ts +6 -0
- package/src/hooks/useStateAndRef.d.ts +4 -0
- package/src/hooks/useTableColumnConfig.d.ts +16 -0
- package/src/hooks/useTableNav.d.ts +84 -0
- package/src/hooks/useTranslationMemo.d.ts +4 -0
- package/src/index.d.ts +205 -0
- package/src/types/common.d.ts +12 -0
- package/src/types/react-query.d.ts +6 -0
- package/src/utils/array.utils.d.ts +3 -0
- package/src/utils/array.utils.spec.d.ts +1 -0
- package/src/utils/compoundMapper.d.ts +19 -0
- package/src/utils/compoundMapper.spec.d.ts +1 -0
- package/src/utils/date-time.utils.d.ts +14 -0
- package/src/utils/date-time.utils.spec.d.ts +1 -0
- package/src/utils/date.utils.d.ts +3 -0
- package/src/utils/date.utils.spec.d.ts +1 -0
- package/src/utils/dom.utils.d.ts +5 -0
- package/src/utils/file.utils.d.ts +9 -0
- package/src/utils/isEqual.d.ts +1 -0
- package/src/utils/logger.d.ts +7 -0
- package/src/utils/object.utils.d.ts +10 -0
- package/src/utils/queries.utils.d.ts +4 -0
- package/src/utils/rest/interceptors/logging.interceptor.d.ts +2 -0
- package/src/utils/rest/interceptors/response.interceptor.d.ts +2 -0
- package/src/utils/rest/interceptors/rest-interceptor.d.ts +8 -0
- package/src/utils/rest/rest-client.d.ts +29 -0
- package/src/utils/rest/rest.utils.d.ts +10 -0
- package/src/utils/routing.utils.d.ts +3 -0
- package/src/utils/string.utils.d.ts +4 -0
- package/src/utils/vendor/error-handling.d.ts +21 -0
- package/src/utils/zod.utils.d.ts +19 -0
- package/styles/editor.css +47 -0
- package/styles/index.css +1 -0
- package/vite.config.d.ts +2 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { AriaCalendarCellProps } from '@react-aria/calendar';
|
|
2
|
+
import { CalendarState, RangeCalendarState } from '@react-stately/calendar';
|
|
3
|
+
import { KeyboardEvent } from 'react';
|
|
4
|
+
import { DateValue } from 'react-aria';
|
|
5
|
+
interface CalendarCellProps extends AriaCalendarCellProps {
|
|
6
|
+
state: CalendarState | RangeCalendarState;
|
|
7
|
+
onApply?: () => void;
|
|
8
|
+
shouldCloseOnSelect?: boolean;
|
|
9
|
+
onDateSelection?: (date: DateValue) => void;
|
|
10
|
+
onDateHover?: (date: DateValue | null) => void;
|
|
11
|
+
rangeSelection?: {
|
|
12
|
+
start: DateValue | null;
|
|
13
|
+
end: DateValue | null;
|
|
14
|
+
isSelecting: boolean;
|
|
15
|
+
};
|
|
16
|
+
hoverDate?: DateValue | null;
|
|
17
|
+
onKeyboardNavigation?: (event: KeyboardEvent, date: DateValue) => boolean;
|
|
18
|
+
}
|
|
19
|
+
export declare const CalendarCell: ({ state, onApply, shouldCloseOnSelect, onDateSelection, onDateHover, rangeSelection, hoverDate, onKeyboardNavigation, ...props }: CalendarCellProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { AriaCalendarGridProps } from '@react-aria/calendar';
|
|
2
|
+
import { CalendarState, RangeCalendarState } from '@react-stately/calendar';
|
|
3
|
+
import { KeyboardEvent } from 'react';
|
|
4
|
+
import { DateValue } from 'react-aria';
|
|
5
|
+
interface CalendarGridProps extends AriaCalendarGridProps {
|
|
6
|
+
state: CalendarState | RangeCalendarState;
|
|
7
|
+
onApply?: () => void;
|
|
8
|
+
offset?: {
|
|
9
|
+
months?: number;
|
|
10
|
+
};
|
|
11
|
+
shouldCloseOnSelect?: boolean;
|
|
12
|
+
onDateSelection?: (date: DateValue, calendarSide?: "left" | "right") => void;
|
|
13
|
+
onDateHover?: (date: DateValue | null) => void;
|
|
14
|
+
rangeSelection?: {
|
|
15
|
+
start: DateValue | null;
|
|
16
|
+
end: DateValue | null;
|
|
17
|
+
isSelecting: boolean;
|
|
18
|
+
};
|
|
19
|
+
hoverDate?: DateValue | null;
|
|
20
|
+
className?: string;
|
|
21
|
+
onKeyboardNavigation?: (event: KeyboardEvent, date: DateValue) => boolean;
|
|
22
|
+
calendarSide?: "left" | "right";
|
|
23
|
+
}
|
|
24
|
+
export declare const CalendarGrid: ({ state, onApply, shouldCloseOnSelect, offset, onDateSelection, onDateHover, rangeSelection, hoverDate, onKeyboardNavigation, className, calendarSide, ...props }: CalendarGridProps) => import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { AriaButtonProps } from '@react-aria/button';
|
|
2
|
+
import { CalendarState } from '@react-stately/calendar';
|
|
3
|
+
import { DatePickerState } from 'react-stately';
|
|
4
|
+
import { ToggleState } from '#ui/components/inputs/DateTime/shared/Calendar';
|
|
5
|
+
interface CalendarProps {
|
|
6
|
+
calendarState: CalendarState;
|
|
7
|
+
datePickerState?: DatePickerState;
|
|
8
|
+
prevButtonProps: AriaButtonProps;
|
|
9
|
+
nextButtonProps: AriaButtonProps;
|
|
10
|
+
includesTime?: boolean;
|
|
11
|
+
hourCycle?: 12 | 24;
|
|
12
|
+
toggleState: ToggleState | null;
|
|
13
|
+
setToggleState: (state: ToggleState | null) => void;
|
|
14
|
+
}
|
|
15
|
+
export declare const CalendarHeader: ({ calendarState, datePickerState, prevButtonProps, nextButtonProps, includesTime, hourCycle, toggleState, setToggleState, }: CalendarProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { CalendarDate } from '@internationalized/date';
|
|
2
|
+
import { CalendarState, RangeCalendarState } from '@react-stately/calendar';
|
|
3
|
+
interface CalendarSelectHeaderProps {
|
|
4
|
+
state: CalendarState | RangeCalendarState;
|
|
5
|
+
isPrevMonthDisabled?: boolean;
|
|
6
|
+
isPrevYearDisabled?: boolean;
|
|
7
|
+
isNextMonthDisabled?: boolean;
|
|
8
|
+
isNextYearDisabled?: boolean;
|
|
9
|
+
offset?: {
|
|
10
|
+
months: number;
|
|
11
|
+
};
|
|
12
|
+
onNavigate?: (newDate: CalendarDate) => void;
|
|
13
|
+
maxDate?: CalendarDate;
|
|
14
|
+
minDate?: CalendarDate;
|
|
15
|
+
}
|
|
16
|
+
export declare const CalendarSelectHeader: ({ state, isPrevMonthDisabled, isPrevYearDisabled, isNextMonthDisabled, isNextYearDisabled, offset, onNavigate, maxDate, minDate, }: CalendarSelectHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { DateFieldStateOptions } from '@react-stately/datepicker';
|
|
2
|
+
import { Ref } from 'react';
|
|
3
|
+
export interface DateFieldHandle {
|
|
4
|
+
clearField: () => void;
|
|
5
|
+
}
|
|
6
|
+
interface DateFieldProps extends Omit<DateFieldStateOptions, "locale" | "createCalendar"> {
|
|
7
|
+
ref?: Ref<DateFieldHandle>;
|
|
8
|
+
onClearChange?: (canClear: boolean) => void;
|
|
9
|
+
hidePlaceholder?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare const DateField: ({ ref, onClearChange, hidePlaceholder, ...props }: DateFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Ref } from 'react';
|
|
2
|
+
import { DatePickerAria } from 'react-aria';
|
|
3
|
+
import { FormFieldHeaderProps } from '#ui/components/inputs/FormField/FormFieldHeader';
|
|
4
|
+
import { InputVariantProps } from '#ui/components/inputs/shared/input.cva';
|
|
5
|
+
interface DatePickerInputProps extends InputVariantProps {
|
|
6
|
+
ref?: Ref<HTMLDivElement>;
|
|
7
|
+
groupProps: DatePickerAria["groupProps"];
|
|
8
|
+
fieldProps: DatePickerAria["fieldProps"];
|
|
9
|
+
endFieldProps?: DatePickerAria["fieldProps"];
|
|
10
|
+
buttonProps: DatePickerAria["buttonProps"];
|
|
11
|
+
isDisabled?: boolean;
|
|
12
|
+
isInvalid?: boolean;
|
|
13
|
+
disableDropdown?: boolean;
|
|
14
|
+
isDateTime?: boolean;
|
|
15
|
+
isClearable?: boolean;
|
|
16
|
+
headerProps?: FormFieldHeaderProps;
|
|
17
|
+
todayIcon?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export declare const DatePickerInput: ({ ref, as, groupProps, fieldProps, endFieldProps, buttonProps, isDisabled, isInvalid, disableDropdown, variant, size, isDateTime, isClearable, headerProps, todayIcon, ...props }: DatePickerInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { DateFieldState, DateSegment } from '@react-stately/datepicker';
|
|
2
|
+
interface DateSegmentProps {
|
|
3
|
+
state: DateFieldState;
|
|
4
|
+
segment: DateSegment;
|
|
5
|
+
isDisabled?: boolean;
|
|
6
|
+
timePickerOnly?: boolean;
|
|
7
|
+
hidePlaceholder?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare const getPlaceholder: (segment: DateSegment) => string | null;
|
|
10
|
+
export declare const DateSegmentItem: ({ segment, state, isDisabled, timePickerOnly, hidePlaceholder }: DateSegmentProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ReactNode, RefObject } from 'react';
|
|
2
|
+
import { AriaDialogProps } from 'react-aria';
|
|
3
|
+
interface DateTimeDialogProps {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
footer: ReactNode;
|
|
6
|
+
sidebar?: ReactNode;
|
|
7
|
+
hideSidebar?: boolean;
|
|
8
|
+
label: string;
|
|
9
|
+
isOpen: boolean;
|
|
10
|
+
triggerRef?: RefObject<HTMLElement | null>;
|
|
11
|
+
dialogProps?: AriaDialogProps;
|
|
12
|
+
onOpenChange: (open: boolean) => void;
|
|
13
|
+
}
|
|
14
|
+
export declare const DateTimeDialog: ({ hideSidebar, children, footer, sidebar, label, isOpen, triggerRef, dialogProps, onOpenChange, }: DateTimeDialogProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
interface DatePickerFooterProps {
|
|
2
|
+
isValid?: boolean;
|
|
3
|
+
onTodayPress?: () => void;
|
|
4
|
+
onApply: () => void;
|
|
5
|
+
}
|
|
6
|
+
export declare const DateTimeDialogFooter: ({ isValid, onTodayPress, onApply }: DatePickerFooterProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CalendarState, RangeCalendarState } from '@react-stately/calendar';
|
|
2
|
+
import { Key } from 'react-aria-components';
|
|
3
|
+
export interface MonthPickerProps {
|
|
4
|
+
state: CalendarState | RangeCalendarState;
|
|
5
|
+
onSelectionChange: (key: Set<Key>) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const MonthPicker: ({ state, onSelectionChange }: MonthPickerProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { RangeCalendarState, RangeCalendarStateOptions } from '@react-stately/calendar';
|
|
2
|
+
import { KeyboardEvent } from 'react';
|
|
3
|
+
import { DateValue } from 'react-aria';
|
|
4
|
+
interface DateRange {
|
|
5
|
+
start: DateValue;
|
|
6
|
+
end: DateValue;
|
|
7
|
+
}
|
|
8
|
+
interface CalendarProps {
|
|
9
|
+
className?: string;
|
|
10
|
+
leftCalendarState: RangeCalendarState;
|
|
11
|
+
rightCalendarState: RangeCalendarState;
|
|
12
|
+
calendarProps: Omit<RangeCalendarStateOptions, "locale" | "createCalendar">;
|
|
13
|
+
onApply: () => void;
|
|
14
|
+
onRangeChange?: (value: DateRange | null) => void;
|
|
15
|
+
onDateSelection?: (date: DateValue, calendarSide?: "left" | "right") => void;
|
|
16
|
+
onDateHover?: (date: DateValue | null) => void;
|
|
17
|
+
rangeSelection?: {
|
|
18
|
+
start: DateValue | null;
|
|
19
|
+
end: DateValue | null;
|
|
20
|
+
isSelecting: boolean;
|
|
21
|
+
};
|
|
22
|
+
hoverDate?: DateValue | null;
|
|
23
|
+
onKeyboardNavigation?: (event: KeyboardEvent, date: DateValue, calendarSide: "left" | "right") => boolean;
|
|
24
|
+
}
|
|
25
|
+
export declare const RangeCalendar: ({ className, leftCalendarState, rightCalendarState, calendarProps, onApply, onRangeChange: _onRangeChange, onDateSelection, onDateHover, rangeSelection, hoverDate, onKeyboardNavigation, }: CalendarProps) => import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { GroupDOMAttributes } from '@react-types/shared';
|
|
2
|
+
import { Ref } from 'react';
|
|
3
|
+
import { TimeFieldState } from 'react-stately';
|
|
4
|
+
interface TimeFieldProps {
|
|
5
|
+
ref?: Ref<HTMLDivElement>;
|
|
6
|
+
fieldProps: GroupDOMAttributes;
|
|
7
|
+
state: TimeFieldState;
|
|
8
|
+
isDisabled?: boolean;
|
|
9
|
+
hidePlaceholder?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare const TimeField: ({ ref, fieldProps, state, isDisabled, hidePlaceholder }: TimeFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { DatePickerState, TimeFieldState } from '@react-stately/datepicker';
|
|
2
|
+
type TimePickerFormProps = {
|
|
3
|
+
state: TimeFieldState;
|
|
4
|
+
datePickerState?: never;
|
|
5
|
+
} | {
|
|
6
|
+
state?: never;
|
|
7
|
+
datePickerState: DatePickerState;
|
|
8
|
+
};
|
|
9
|
+
export declare const TimePickerForm: ({ state, datePickerState }: TimePickerFormProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Ref } from 'react';
|
|
2
|
+
import { DateFieldAria } from 'react-aria';
|
|
3
|
+
import { TimeFieldState } from 'react-stately';
|
|
4
|
+
import { FormFieldHeaderProps } from '#ui/components/inputs/FormField/FormFieldHeader';
|
|
5
|
+
import { InputVariantProps } from '#ui/components/inputs/shared/input.cva';
|
|
6
|
+
interface DatePickerInputProps extends InputVariantProps {
|
|
7
|
+
ref?: Ref<HTMLDivElement>;
|
|
8
|
+
fieldProps: DateFieldAria["fieldProps"];
|
|
9
|
+
state: TimeFieldState;
|
|
10
|
+
isDisabled?: boolean;
|
|
11
|
+
isInvalid?: boolean;
|
|
12
|
+
disableDropdown?: boolean;
|
|
13
|
+
headerProps?: FormFieldHeaderProps;
|
|
14
|
+
isClearable?: boolean;
|
|
15
|
+
onPress: () => void;
|
|
16
|
+
}
|
|
17
|
+
export declare const TimePickerInput: ({ ref, as, fieldProps, state, isDisabled, isInvalid, disableDropdown, variant, size, isClearable, headerProps, onPress, ...props }: DatePickerInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CalendarState, RangeCalendarState } from '@react-stately/calendar';
|
|
2
|
+
import { Key } from 'react-aria-components';
|
|
3
|
+
interface YearPickerProps {
|
|
4
|
+
state: CalendarState | RangeCalendarState;
|
|
5
|
+
onSelectionChange: (key: Set<Key>) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const YearPicker: ({ state, onSelectionChange }: YearPickerProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { FieldValues } from 'react-hook-form';
|
|
2
|
+
import { FileUploadProps } from './fileUpload.types';
|
|
3
|
+
export type { FileUploadBaseProps, FileUploadError, FileUploadProps, FileUploadRequest, FileUploadResponse, FileUploadState, } from './fileUpload.types';
|
|
4
|
+
export declare const FileUpload: <TFieldValues extends FieldValues = FieldValues>(props: FileUploadProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { FieldValues } from 'react-hook-form';
|
|
2
|
+
import { InputUploadProps } from './inputUpload.types';
|
|
3
|
+
export type { InputUploadBaseProps, InputUploadProps } from './inputUpload.types';
|
|
4
|
+
export declare const InputUpload: <TFieldValues extends FieldValues = FieldValues>(props: InputUploadProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { ReactNode, Ref } from 'react';
|
|
2
|
+
import { DropZoneProps, FileTriggerProps } from 'react-aria-components';
|
|
3
|
+
import { FieldValues } from 'react-hook-form';
|
|
4
|
+
import { FormFieldProps } from '#ui/components/inputs/FormField/FormField';
|
|
5
|
+
import { ControlProps } from '#ui/components/inputs/shared/form.types';
|
|
6
|
+
import { ApplicationException, GeneralErrorCodes } from '#ui/utils/vendor/error-handling';
|
|
7
|
+
export interface FileUploadVariant {
|
|
8
|
+
variant?: "vertical" | "horizontal";
|
|
9
|
+
}
|
|
10
|
+
export interface SingleFileUploadProps {
|
|
11
|
+
allowsMultiple?: false;
|
|
12
|
+
value?: FileUploadState | null;
|
|
13
|
+
onChange?: (file: File | null) => void;
|
|
14
|
+
defaultValue?: File | null;
|
|
15
|
+
}
|
|
16
|
+
export interface MultipleFileUploadProps {
|
|
17
|
+
allowsMultiple: true;
|
|
18
|
+
value?: FileUploadState[];
|
|
19
|
+
onChange?: (files: File[]) => void;
|
|
20
|
+
defaultValue?: File[];
|
|
21
|
+
}
|
|
22
|
+
export type GroupedFileUploadProps = MultipleFileUploadProps | SingleFileUploadProps;
|
|
23
|
+
export type GroupedFileUploadControlProps<TFieldValues extends FieldValues> = ({
|
|
24
|
+
allowsMultiple: true;
|
|
25
|
+
} & ControlProps<MultipleFileUploadProps, TFieldValues>) | ({
|
|
26
|
+
allowsMultiple?: false;
|
|
27
|
+
} & ControlProps<SingleFileUploadProps, TFieldValues>);
|
|
28
|
+
export interface FileUploadResponse {
|
|
29
|
+
id: string;
|
|
30
|
+
}
|
|
31
|
+
export interface FileUploadRequest {
|
|
32
|
+
data: {
|
|
33
|
+
resourceName: string;
|
|
34
|
+
fileName: string;
|
|
35
|
+
fileSize: number;
|
|
36
|
+
method: string;
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
export interface FileUploadCallbacks {
|
|
40
|
+
fileUpload?: (request: FileUploadRequest, file: File, options?: {
|
|
41
|
+
abortController?: AbortController;
|
|
42
|
+
onUploadProgress?: ({ loaded, total }: {
|
|
43
|
+
loaded: number;
|
|
44
|
+
total: number;
|
|
45
|
+
}) => void;
|
|
46
|
+
}) => Promise<FileUploadResponse>;
|
|
47
|
+
fileRemove?: ({ id }: {
|
|
48
|
+
id: string;
|
|
49
|
+
}) => Promise<void>;
|
|
50
|
+
}
|
|
51
|
+
export type FileUploadError = ApplicationException<GeneralErrorCodes>;
|
|
52
|
+
export interface FileUploadState {
|
|
53
|
+
state: "idle" | "uploading" | "uploaded" | "error";
|
|
54
|
+
file: File;
|
|
55
|
+
src?: string;
|
|
56
|
+
id?: string;
|
|
57
|
+
progress?: number;
|
|
58
|
+
error?: FileUploadError;
|
|
59
|
+
abortController?: AbortController;
|
|
60
|
+
}
|
|
61
|
+
export interface FileUploadContainerChildrenProps {
|
|
62
|
+
files: FileUploadState[];
|
|
63
|
+
onRemove: (id: string) => void;
|
|
64
|
+
onCancel: (index: number) => void;
|
|
65
|
+
}
|
|
66
|
+
export type FileUploadBaseProps = {
|
|
67
|
+
as?: "button" | "link";
|
|
68
|
+
ref?: Ref<HTMLElement>;
|
|
69
|
+
label?: string;
|
|
70
|
+
className?: string;
|
|
71
|
+
emptyText?: string;
|
|
72
|
+
uploadText?: string;
|
|
73
|
+
browseText?: string;
|
|
74
|
+
value?: FileUploadState[];
|
|
75
|
+
children?: (props: FileUploadContainerChildrenProps) => ReactNode;
|
|
76
|
+
listRenderer?: (props: FileUploadContainerChildrenProps) => ReactNode;
|
|
77
|
+
} & FormFieldProps & FileUploadVariant & Omit<FileTriggerProps, "children" | "onSelect" | "allowsMultiple" | "value"> & Omit<DropZoneProps, "children" | "onDrop" | "value"> & GroupedFileUploadProps & FileUploadCallbacks;
|
|
78
|
+
export type FileUploadProps<TFieldValues extends FieldValues = FieldValues> = FileUploadBaseProps & GroupedFileUploadControlProps<TFieldValues>;
|
|
79
|
+
export type FileUploadContainerProps = (Omit<FileUploadBaseProps, "label" | "hideLabel" | "variant" | "as"> & SingleFileUploadProps) | (Omit<FileUploadBaseProps, "label" | "hideLabel" | "variant" | "as"> & MultipleFileUploadProps);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type { FileUploadBaseProps, FileUploadProps } from './FileUpload';
|
|
2
|
+
export { FileUpload } from './FileUpload';
|
|
3
|
+
export type { FileUploadContainerProps } from './FileUploadContainer';
|
|
4
|
+
export { FileUploadContainer } from './FileUploadContainer';
|
|
5
|
+
export type { InputUploadBaseProps, InputUploadProps } from './InputUpload';
|
|
6
|
+
export { InputUpload } from './InputUpload';
|
|
7
|
+
export { FileCard } from './shared/FileCard';
|
|
8
|
+
export type { FileUploadDropZoneProps } from './shared/fileUpload.cva';
|
|
9
|
+
export { fileUploadDropZone } from './shared/fileUpload.cva';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Ref } from 'react';
|
|
2
|
+
import { DropZoneProps, FileTriggerProps } from 'react-aria-components';
|
|
3
|
+
import { FieldValues } from 'react-hook-form';
|
|
4
|
+
import { FormFieldProps } from '#ui/components/inputs/FormField/FormField';
|
|
5
|
+
import { ControlProps } from '#ui/components/inputs/shared/form.types';
|
|
6
|
+
import { InputUploadButtonProps } from './shared/inputUploadButton.cva';
|
|
7
|
+
export interface SingleFileUploadProps {
|
|
8
|
+
allowsMultiple?: false;
|
|
9
|
+
value?: File | null;
|
|
10
|
+
onChange?: (file: File | null) => void;
|
|
11
|
+
defaultValue?: File | null;
|
|
12
|
+
}
|
|
13
|
+
export interface MultipleFileUploadProps {
|
|
14
|
+
allowsMultiple: true;
|
|
15
|
+
value?: File[];
|
|
16
|
+
onChange?: (files: File[]) => void;
|
|
17
|
+
defaultValue?: File[];
|
|
18
|
+
}
|
|
19
|
+
export type GroupedFileUploadProps = MultipleFileUploadProps | SingleFileUploadProps;
|
|
20
|
+
export type GroupedFileUploadControlProps<TFieldValues extends FieldValues> = ({
|
|
21
|
+
allowsMultiple: true;
|
|
22
|
+
} & ControlProps<MultipleFileUploadProps, TFieldValues>) | ({
|
|
23
|
+
allowsMultiple?: false;
|
|
24
|
+
} & ControlProps<SingleFileUploadProps, TFieldValues>);
|
|
25
|
+
export type InputUploadBaseProps = {
|
|
26
|
+
ref?: Ref<HTMLElement>;
|
|
27
|
+
label?: string;
|
|
28
|
+
className?: string;
|
|
29
|
+
} & FormFieldProps & InputUploadButtonProps & Omit<FileTriggerProps, "children" | "onSelect" | "allowsMultiple"> & Omit<DropZoneProps, "children" | "onDrop"> & GroupedFileUploadProps;
|
|
30
|
+
export type InputUploadProps<TFieldValues extends FieldValues = FieldValues> = InputUploadBaseProps & GroupedFileUploadControlProps<TFieldValues>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FileUploadProps, FileUploadState } from '#ui/components/inputs/File/FileUpload';
|
|
2
|
+
interface FileCardProps extends Pick<FileUploadProps, "as" | "isDisabled"> {
|
|
3
|
+
index: number;
|
|
4
|
+
state: FileUploadState;
|
|
5
|
+
onRemove?: (id: string) => void;
|
|
6
|
+
onCancel?: (index: number) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const FileCard: ({ index, as, state, onRemove, isDisabled, onCancel }: FileCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FileUploadProps, FileUploadState } from '#ui/components/inputs/File/FileUpload';
|
|
2
|
+
interface FileCardListProps extends Pick<FileUploadProps, "isDisabled" | "as"> {
|
|
3
|
+
uploadState: FileUploadState[];
|
|
4
|
+
className?: string;
|
|
5
|
+
onRemove?: (id: string) => void;
|
|
6
|
+
onCancel?: (index: number) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const FileCardList: ({ uploadState, as, isDisabled, className, onRemove, onCancel }: FileCardListProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FileUploadBaseProps, FileUploadState } from '#ui/components/inputs/File/fileUpload.types';
|
|
2
|
+
type FileUploadContentProps = Omit<FileUploadBaseProps, "ref" | "children" | "emptyText" | "label"> & {
|
|
3
|
+
emptyText: string;
|
|
4
|
+
uploadState: FileUploadState[];
|
|
5
|
+
handleSelect: (inputFiles: FileList | null) => void;
|
|
6
|
+
handleCancelUpload: (index: number) => void;
|
|
7
|
+
handleRemove: (id: string) => void;
|
|
8
|
+
};
|
|
9
|
+
export declare const FileUploadContent: ({ variant, as, isDisabled, browseText, uploadText, emptyText, uploadState, handleCancelUpload, handleRemove, acceptedFileTypes, allowsMultiple, handleSelect, ...rest }: FileUploadContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FileUploadBaseProps } from '#ui/components/inputs/File/fileUpload.types';
|
|
2
|
+
type FileUploadContentEmptyProps = Pick<FileUploadBaseProps, "variant" | "as" | "isDisabled" | "emptyText" | "browseText" | "uploadText"> & {
|
|
3
|
+
title: string;
|
|
4
|
+
singleFile?: boolean;
|
|
5
|
+
hideButton?: boolean;
|
|
6
|
+
className?: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const FileUploadContentEmpty: ({ variant, as, isDisabled, title, browseText, uploadText, singleFile, hideButton, className, }: FileUploadContentEmptyProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FileTriggerProps } from 'react-aria-components';
|
|
2
|
+
import { FileUploadBaseProps, FileUploadState } from '#ui/components/inputs/File/fileUpload.types';
|
|
3
|
+
type FileUploadContentErrorProps = Pick<FileUploadBaseProps, "variant" | "as" | "isDisabled" | "emptyText" | "browseText"> & {
|
|
4
|
+
state: FileUploadState;
|
|
5
|
+
fileTriggerProps?: FileTriggerProps;
|
|
6
|
+
removeWithIcon?: boolean;
|
|
7
|
+
singleFile?: boolean;
|
|
8
|
+
onRemove: (id: string) => void;
|
|
9
|
+
};
|
|
10
|
+
export declare const FileUploadContentError: ({ variant, as, isDisabled, state, browseText, fileTriggerProps, removeWithIcon, singleFile, onRemove, }: FileUploadContentErrorProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FileTriggerProps } from 'react-aria-components';
|
|
2
|
+
import { FileUploadBaseProps, FileUploadState } from '#ui/components/inputs/File/fileUpload.types';
|
|
3
|
+
type FileUploadContentFilledProps = Pick<FileUploadBaseProps, "variant" | "as" | "isDisabled" | "emptyText" | "browseText"> & {
|
|
4
|
+
state: FileUploadState;
|
|
5
|
+
fileTriggerProps?: FileTriggerProps;
|
|
6
|
+
removeWithIcon?: boolean;
|
|
7
|
+
singleFile?: boolean;
|
|
8
|
+
onRemove: (id: string) => void;
|
|
9
|
+
};
|
|
10
|
+
export declare const FileUploadContentFilled: ({ variant, as, isDisabled, state, browseText, fileTriggerProps, removeWithIcon, singleFile, onRemove, }: FileUploadContentFilledProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FileUploadBaseProps, FileUploadState } from '#ui/components/inputs/File/fileUpload.types';
|
|
2
|
+
type FileUploadContentLoadingProps = Pick<FileUploadBaseProps, "variant" | "as" | "isDisabled" | "emptyText" | "browseText"> & {
|
|
3
|
+
index: number;
|
|
4
|
+
state: FileUploadState;
|
|
5
|
+
singleFile?: boolean;
|
|
6
|
+
onCancel: (index: number) => void;
|
|
7
|
+
};
|
|
8
|
+
export declare const FileUploadContentLoading: ({ index, variant, as, state, isDisabled, singleFile, onCancel, }: FileUploadContentLoadingProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { DropZoneProps, FileTriggerProps } from 'react-aria-components';
|
|
2
|
+
import { InputUploadBaseProps } from '#ui/components/inputs/File/inputUpload.types';
|
|
3
|
+
interface InputUploadContentProps extends Omit<InputUploadBaseProps, "ref"> {
|
|
4
|
+
onSelect: FileTriggerProps["onSelect"];
|
|
5
|
+
onDrop: DropZoneProps["onDrop"];
|
|
6
|
+
}
|
|
7
|
+
export declare const InputUploadContent: (props: InputUploadContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import { ClassProp } from 'class-variance-authority/types';
|
|
3
|
+
export declare const fileUploadDropZoneBase: (props?: ({
|
|
4
|
+
variant?: "horizontal" | "vertical" | null | undefined;
|
|
5
|
+
isContainer?: boolean | null | undefined;
|
|
6
|
+
} & ClassProp) | undefined) => string;
|
|
7
|
+
export type FileUploadDropZoneProps = VariantProps<typeof fileUploadDropZoneBase>;
|
|
8
|
+
export declare const fileUploadDropZone: (props: FileUploadDropZoneProps & ClassProp) => string;
|
|
9
|
+
export declare const fileCardList: (props?: ({
|
|
10
|
+
variant?: "horizontal" | "vertical" | null | undefined;
|
|
11
|
+
} & ClassProp) | undefined) => string;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import { ClassProp } from 'class-variance-authority/types';
|
|
3
|
+
export declare const inputUploadButtonBase: (props?: ({
|
|
4
|
+
variant?: "default" | "nested" | null | undefined;
|
|
5
|
+
} & ClassProp) | undefined) => string;
|
|
6
|
+
export type InputUploadButtonProps = VariantProps<typeof inputUploadButtonBase>;
|
|
7
|
+
export declare const inputUploadButton: (props: InputUploadButtonProps & ClassProp) => string;
|
|
8
|
+
export declare const inputUploadDropZone: (props?: ({
|
|
9
|
+
variant?: "default" | "nested" | null | undefined;
|
|
10
|
+
} & ClassProp) | undefined) => string;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { PropsWithChildren, Ref } from 'react';
|
|
2
|
+
import { FormFieldErrorProps } from '#ui/components/inputs/FormField/FormFieldError';
|
|
3
|
+
import { FormFieldHeaderProps } from '#ui/components/inputs/FormField/FormFieldHeader';
|
|
4
|
+
import { TextInputProps } from '#ui/components/inputs/Input/TextInput/TextInput';
|
|
5
|
+
export interface FormFieldProps extends Omit<FormFieldHeaderProps, "className" | "labelProps">, Omit<FormFieldErrorProps, "className"> {
|
|
6
|
+
hideLabel?: boolean;
|
|
7
|
+
headerClassName?: string;
|
|
8
|
+
errorClassName?: string;
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
11
|
+
interface FormFieldComponentProps extends PropsWithChildren<FormFieldProps> {
|
|
12
|
+
ref?: Ref<HTMLDivElement>;
|
|
13
|
+
labelProps?: FormFieldHeaderProps["labelProps"];
|
|
14
|
+
as?: TextInputProps["as"];
|
|
15
|
+
}
|
|
16
|
+
export declare const FormField: ({ ref, as, label, tooltipText, helperText, isRequired, rightContent, isDisabled, error, hideLabel, headerClassName, errorClassName, children, className, labelProps, isHeaderHidden, }: FormFieldComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export interface FormFieldErrorProps {
|
|
2
|
+
error?: string;
|
|
3
|
+
isDisabled?: boolean;
|
|
4
|
+
isHidden?: boolean;
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const FormFieldError: ({ error, isDisabled, isHidden, className }: FormFieldErrorProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { DOMAttributes } from '@react-types/shared';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
export interface FormFieldHeaderProps {
|
|
4
|
+
label: string;
|
|
5
|
+
tooltipText?: string;
|
|
6
|
+
helperText?: string;
|
|
7
|
+
isRequired?: boolean;
|
|
8
|
+
rightContent?: ReactNode;
|
|
9
|
+
isHeaderHidden?: boolean;
|
|
10
|
+
isDisabled?: boolean;
|
|
11
|
+
className?: string;
|
|
12
|
+
labelProps?: DOMAttributes<HTMLLabelElement>;
|
|
13
|
+
}
|
|
14
|
+
export declare const FormFieldHeader: ({ label, tooltipText, helperText, isRequired, rightContent, isHeaderHidden, isDisabled, className, labelProps, }: FormFieldHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { DOMAttributes } from '@react-types/shared';
|
|
2
|
+
import { RefCallback } from 'react';
|
|
3
|
+
import { LabelBaseProps } from '#ui/components/inputs/shared/label.cva';
|
|
4
|
+
export interface FormFieldLabelProps extends LabelBaseProps {
|
|
5
|
+
label: string;
|
|
6
|
+
isRequired?: boolean;
|
|
7
|
+
isDisabled?: boolean;
|
|
8
|
+
ref?: RefCallback<HTMLOrSVGElement>;
|
|
9
|
+
labelProps?: DOMAttributes<HTMLLabelElement>;
|
|
10
|
+
}
|
|
11
|
+
export declare const FormFieldLabel: ({ ref, as, label, isRequired, isDisabled, labelProps }: FormFieldLabelProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Ref } from 'react';
|
|
2
|
+
import { NumberFieldProps as AriaNumberFieldProps } from 'react-aria-components';
|
|
3
|
+
import { FieldValues } from 'react-hook-form';
|
|
4
|
+
import { FormFieldProps } from '#ui/components/inputs/FormField/FormField';
|
|
5
|
+
import { InputContentProps } from '#ui/components/inputs/Input/shared/InputContent';
|
|
6
|
+
import { ControlProps } from '#ui/components/inputs/shared/form.types';
|
|
7
|
+
import { InputVariantProps } from '#ui/components/inputs/shared/input.cva';
|
|
8
|
+
interface NumberInputBaseProps extends FormFieldProps, InputVariantProps, Omit<InputContentProps, "ref" | "value" | "onChange">, Omit<AriaNumberFieldProps, "value" | "onChange" | "className"> {
|
|
9
|
+
ref?: Ref<HTMLInputElement>;
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
inputClassName?: string;
|
|
12
|
+
value?: number | null;
|
|
13
|
+
onChange?: (value: number | null) => void;
|
|
14
|
+
}
|
|
15
|
+
export type NumberInputProps = NumberInputBaseProps;
|
|
16
|
+
export type ControlledNumberInputProps<TFieldValues extends FieldValues> = ControlProps<NumberInputProps, TFieldValues>;
|
|
17
|
+
export declare const NumberInput: <TFieldValues extends FieldValues>(props: ControlledNumberInputProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { FieldValues } from 'react-hook-form';
|
|
2
|
+
import { TextInputProps } from '#ui/components/inputs/Input/TextInput/TextInput';
|
|
3
|
+
import { ControlProps } from '#ui/components/inputs/shared/form.types';
|
|
4
|
+
export interface PasswordInputProps extends Omit<TextInputProps, "type" | "action" | "trailingIcon" | "unit"> {
|
|
5
|
+
}
|
|
6
|
+
export type ControlledPasswordInputProps<TFieldValues extends FieldValues> = ControlProps<PasswordInputProps, TFieldValues>;
|
|
7
|
+
export declare const PasswordInput: <TFieldValues extends FieldValues>(props: ControlledPasswordInputProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Ref } from 'react';
|
|
2
|
+
import { AriaTextFieldProps } from 'react-aria';
|
|
3
|
+
import { TextAreaProps as AriaTextAreaProps } from 'react-aria-components';
|
|
4
|
+
import { FieldValues } from 'react-hook-form';
|
|
5
|
+
import { FormFieldProps } from '#ui/components/inputs/FormField/FormField';
|
|
6
|
+
import { ControlProps } from '#ui/components/inputs/shared/form.types';
|
|
7
|
+
import { InputVariantProps } from '#ui/components/inputs/shared/input.cva';
|
|
8
|
+
interface TextAreaBaseProps extends FormFieldProps, InputVariantProps, Omit<AriaTextAreaProps, "value" | "defaultValue" | "onChange" | "disabled" | "required" | "className" | keyof AriaTextFieldProps>, Omit<AriaTextFieldProps<HTMLTextAreaElement>, "label"> {
|
|
9
|
+
ref?: Ref<HTMLTextAreaElement>;
|
|
10
|
+
isClearable?: boolean;
|
|
11
|
+
inputClassName?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface TextAreaProps extends TextAreaBaseProps {
|
|
14
|
+
}
|
|
15
|
+
export type ControlledTextAreaProps<TFieldValues extends FieldValues> = ControlProps<TextAreaProps, TFieldValues>;
|
|
16
|
+
export declare const TextArea: <TFieldValues extends FieldValues>(props: ControlledTextAreaProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export {};
|