@wavv/ui 2.0.0-alpha.2 → 2.0.0-alpha.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/build/cjs/index.js +16 -7
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/types/assets/icons/Dash.d.ts +3 -0
- package/build/cjs/types/assets/icons/Funnel.d.ts +3 -0
- package/build/cjs/types/assets/icons/LocalArea.d.ts +3 -0
- package/build/cjs/types/assets/icons/Location.d.ts +3 -0
- package/build/cjs/types/assets/icons/Notes.d.ts +3 -0
- package/build/cjs/types/assets/icons/Shield.d.ts +3 -0
- package/build/cjs/types/assets/icons/ShieldHealth.d.ts +3 -0
- package/build/cjs/types/components/Button/Button.d.ts +1 -1
- package/build/cjs/types/components/Button/ButtonTypes.d.ts +9 -8
- package/build/cjs/types/components/Button/index.d.ts +1 -2
- package/build/cjs/types/components/Calendar.d.ts +6 -9
- package/build/cjs/types/components/CalendarParts/CalendarContainerStyles.d.ts +7 -0
- package/build/cjs/types/components/CalendarParts/CalendarContent.d.ts +7 -0
- package/build/cjs/types/components/CalendarParts/CalendarHeader.d.ts +2 -0
- package/build/cjs/types/components/CalendarParts/useMinMax.d.ts +12 -0
- package/build/cjs/types/components/CalendarParts/utils.d.ts +4 -0
- package/build/cjs/types/components/ComboBox.d.ts +17 -0
- package/build/cjs/types/components/DraftEditor.d.ts +1 -3
- package/build/cjs/types/components/Dropdown/Dropdown.d.ts +4 -4
- package/build/cjs/types/components/Dropdown/DropdownUtils.d.ts +4 -13
- package/build/cjs/types/components/Dropdown/index.d.ts +0 -1
- package/build/cjs/types/components/DropdownMenu.d.ts +16 -55
- package/build/cjs/types/components/DropdownMenuParts/Menu.d.ts +8 -0
- package/build/cjs/types/components/DropdownMenuParts/MenuItem.d.ts +5 -0
- package/build/cjs/types/components/Form.d.ts +2 -4
- package/build/cjs/types/components/Icon/icons.d.ts +7 -0
- package/build/cjs/types/components/Input.d.ts +0 -6
- package/build/cjs/types/components/InputHelpers.d.ts +0 -3
- package/build/cjs/types/components/Inputs/DatePicker.d.ts +9 -0
- package/build/cjs/types/components/Inputs/DateRangePicker.d.ts +10 -0
- package/build/cjs/types/components/Inputs/NumberInput.d.ts +5 -0
- package/build/cjs/types/components/Inputs/TextInput.d.ts +5 -0
- package/build/cjs/types/components/Inputs/helpers/AriaButton.d.ts +5 -0
- package/build/cjs/types/components/Inputs/helpers/DateSegment.d.ts +8 -0
- package/build/cjs/types/components/Inputs/helpers/Description.d.ts +6 -0
- package/build/cjs/types/components/Inputs/helpers/ErrorMessage.d.ts +6 -0
- package/build/cjs/types/components/Inputs/helpers/Input.d.ts +11 -0
- package/build/cjs/types/components/Inputs/helpers/InputContainerStyles.d.ts +13 -0
- package/build/cjs/types/components/Inputs/helpers/InputMessage.d.ts +9 -0
- package/build/cjs/types/components/Inputs/helpers/InputStyles.d.ts +11 -0
- package/build/cjs/types/components/Inputs/helpers/Label.d.ts +9 -0
- package/build/cjs/types/components/Inputs/helpers/LabelWrapper.d.ts +8 -0
- package/build/cjs/types/components/Inputs/helpers/PickerToggle.d.ts +6 -0
- package/build/cjs/types/components/Inputs/helpers/useInputFocus.d.ts +8 -0
- package/build/cjs/types/components/ListBoxParts/ListBox.d.ts +8 -0
- package/build/cjs/types/components/ListBoxParts/ListBoxItem.d.ts +5 -0
- package/build/cjs/types/components/ListHelpers/ItemHeaderBody.d.ts +7 -0
- package/build/cjs/types/components/ListHelpers/ListHeader.d.ts +6 -0
- package/build/cjs/types/components/ListHelpers/ListItemStyles.d.ts +16 -0
- package/build/cjs/types/components/ListHelpers/ListSection.d.ts +8 -0
- package/build/cjs/types/components/ListHelpers/ListStyles.d.ts +11 -0
- package/build/cjs/types/components/Modal.d.ts +3 -1
- package/build/cjs/types/components/MultiSelect.d.ts +4 -4
- package/build/cjs/types/components/OptionHelpers/Item.d.ts +2 -0
- package/build/cjs/types/components/OptionHelpers/types.d.ts +2 -0
- package/build/cjs/types/components/Options.d.ts +1 -1
- package/build/cjs/types/components/RangeCalendar.d.ts +13 -0
- package/build/cjs/types/components/Select.d.ts +12 -63
- package/build/cjs/types/components/componentTypes.d.ts +61 -0
- package/build/cjs/types/components/helpers/styledProps.d.ts +6 -26
- package/build/cjs/types/components/types.d.ts +59 -2
- package/build/cjs/types/hooks/useSelect.d.ts +3 -2
- package/build/cjs/types/index.d.ts +7 -2
- package/build/cjs/types/theme/ThemeTypes.d.ts +2 -0
- package/build/esm/index.js +16 -7
- package/build/esm/index.js.map +1 -1
- package/build/esm/types/assets/icons/Dash.d.ts +3 -0
- package/build/esm/types/assets/icons/Funnel.d.ts +3 -0
- package/build/esm/types/assets/icons/LocalArea.d.ts +3 -0
- package/build/esm/types/assets/icons/Location.d.ts +3 -0
- package/build/esm/types/assets/icons/Notes.d.ts +3 -0
- package/build/esm/types/assets/icons/Shield.d.ts +3 -0
- package/build/esm/types/assets/icons/ShieldHealth.d.ts +3 -0
- package/build/esm/types/components/Button/Button.d.ts +1 -1
- package/build/esm/types/components/Button/ButtonTypes.d.ts +9 -8
- package/build/esm/types/components/Button/index.d.ts +1 -2
- package/build/esm/types/components/Calendar.d.ts +6 -9
- package/build/esm/types/components/CalendarParts/CalendarContainerStyles.d.ts +7 -0
- package/build/esm/types/components/CalendarParts/CalendarContent.d.ts +7 -0
- package/build/esm/types/components/CalendarParts/CalendarHeader.d.ts +2 -0
- package/build/esm/types/components/CalendarParts/useMinMax.d.ts +12 -0
- package/build/esm/types/components/CalendarParts/utils.d.ts +4 -0
- package/build/esm/types/components/ComboBox.d.ts +17 -0
- package/build/esm/types/components/DraftEditor.d.ts +1 -3
- package/build/esm/types/components/Dropdown/Dropdown.d.ts +4 -4
- package/build/esm/types/components/Dropdown/DropdownUtils.d.ts +4 -13
- package/build/esm/types/components/Dropdown/index.d.ts +0 -1
- package/build/esm/types/components/DropdownMenu.d.ts +16 -55
- package/build/esm/types/components/DropdownMenuParts/Menu.d.ts +8 -0
- package/build/esm/types/components/DropdownMenuParts/MenuItem.d.ts +5 -0
- package/build/esm/types/components/Form.d.ts +2 -4
- package/build/esm/types/components/Icon/icons.d.ts +7 -0
- package/build/esm/types/components/Input.d.ts +0 -6
- package/build/esm/types/components/InputHelpers.d.ts +0 -3
- package/build/esm/types/components/Inputs/DatePicker.d.ts +9 -0
- package/build/esm/types/components/Inputs/DateRangePicker.d.ts +10 -0
- package/build/esm/types/components/Inputs/NumberInput.d.ts +5 -0
- package/build/esm/types/components/Inputs/TextInput.d.ts +5 -0
- package/build/esm/types/components/Inputs/helpers/AriaButton.d.ts +5 -0
- package/build/esm/types/components/Inputs/helpers/DateSegment.d.ts +8 -0
- package/build/esm/types/components/Inputs/helpers/Description.d.ts +6 -0
- package/build/esm/types/components/Inputs/helpers/ErrorMessage.d.ts +6 -0
- package/build/esm/types/components/Inputs/helpers/Input.d.ts +11 -0
- package/build/esm/types/components/Inputs/helpers/InputContainerStyles.d.ts +13 -0
- package/build/esm/types/components/Inputs/helpers/InputMessage.d.ts +9 -0
- package/build/esm/types/components/Inputs/helpers/InputStyles.d.ts +11 -0
- package/build/esm/types/components/Inputs/helpers/Label.d.ts +9 -0
- package/build/esm/types/components/Inputs/helpers/LabelWrapper.d.ts +8 -0
- package/build/esm/types/components/Inputs/helpers/PickerToggle.d.ts +6 -0
- package/build/esm/types/components/Inputs/helpers/useInputFocus.d.ts +8 -0
- package/build/esm/types/components/ListBoxParts/ListBox.d.ts +8 -0
- package/build/esm/types/components/ListBoxParts/ListBoxItem.d.ts +5 -0
- package/build/esm/types/components/ListHelpers/ItemHeaderBody.d.ts +7 -0
- package/build/esm/types/components/ListHelpers/ListHeader.d.ts +6 -0
- package/build/esm/types/components/ListHelpers/ListItemStyles.d.ts +16 -0
- package/build/esm/types/components/ListHelpers/ListSection.d.ts +8 -0
- package/build/esm/types/components/ListHelpers/ListStyles.d.ts +11 -0
- package/build/esm/types/components/Modal.d.ts +3 -1
- package/build/esm/types/components/MultiSelect.d.ts +4 -4
- package/build/esm/types/components/OptionHelpers/Item.d.ts +2 -0
- package/build/esm/types/components/OptionHelpers/types.d.ts +2 -0
- package/build/esm/types/components/Options.d.ts +1 -1
- package/build/esm/types/components/RangeCalendar.d.ts +13 -0
- package/build/esm/types/components/Select.d.ts +12 -63
- package/build/esm/types/components/componentTypes.d.ts +61 -0
- package/build/esm/types/components/helpers/styledProps.d.ts +6 -26
- package/build/esm/types/components/types.d.ts +59 -2
- package/build/esm/types/hooks/useSelect.d.ts +3 -2
- package/build/esm/types/index.d.ts +7 -2
- package/build/esm/types/theme/ThemeTypes.d.ts +2 -0
- package/build/index.d.ts +809 -763
- package/build/types/assets/icons/Dash.d.ts +3 -0
- package/build/types/assets/icons/Funnel.d.ts +3 -0
- package/build/types/assets/icons/LocalArea.d.ts +3 -0
- package/build/types/assets/icons/Location.d.ts +3 -0
- package/build/types/assets/icons/Notes.d.ts +3 -0
- package/build/types/assets/icons/Shield.d.ts +3 -0
- package/build/types/assets/icons/ShieldHealth.d.ts +3 -0
- package/build/types/components/Button/Button.d.ts +1 -1
- package/build/types/components/Button/ButtonTypes.d.ts +9 -8
- package/build/types/components/Button/index.d.ts +1 -2
- package/build/types/components/Calendar.d.ts +6 -9
- package/build/types/components/CalendarParts/CalendarContainerStyles.d.ts +7 -0
- package/build/types/components/CalendarParts/CalendarContent.d.ts +7 -0
- package/build/types/components/CalendarParts/CalendarHeader.d.ts +2 -0
- package/build/types/components/CalendarParts/useMinMax.d.ts +12 -0
- package/build/types/components/CalendarParts/utils.d.ts +4 -0
- package/build/types/components/ComboBox.d.ts +17 -0
- package/build/types/components/DraftEditor.d.ts +1 -3
- package/build/types/components/Dropdown/Dropdown.d.ts +4 -4
- package/build/types/components/Dropdown/DropdownUtils.d.ts +4 -13
- package/build/types/components/Dropdown/index.d.ts +0 -1
- package/build/types/components/DropdownMenu.d.ts +16 -55
- package/build/types/components/DropdownMenuParts/Menu.d.ts +8 -0
- package/build/types/components/DropdownMenuParts/MenuItem.d.ts +5 -0
- package/build/types/components/Form.d.ts +2 -4
- package/build/types/components/Icon/icons.d.ts +7 -0
- package/build/types/components/Input.d.ts +0 -6
- package/build/types/components/InputHelpers.d.ts +0 -3
- package/build/types/components/Inputs/DatePicker.d.ts +9 -0
- package/build/types/components/Inputs/DateRangePicker.d.ts +10 -0
- package/build/types/components/Inputs/NumberInput.d.ts +5 -0
- package/build/types/components/Inputs/TextInput.d.ts +5 -0
- package/build/types/components/Inputs/helpers/AriaButton.d.ts +5 -0
- package/build/types/components/Inputs/helpers/DateSegment.d.ts +8 -0
- package/build/types/components/Inputs/helpers/Description.d.ts +6 -0
- package/build/types/components/Inputs/helpers/ErrorMessage.d.ts +6 -0
- package/build/types/components/Inputs/helpers/Input.d.ts +11 -0
- package/build/types/components/Inputs/helpers/InputContainerStyles.d.ts +13 -0
- package/build/types/components/Inputs/helpers/InputMessage.d.ts +9 -0
- package/build/types/components/Inputs/helpers/InputStyles.d.ts +11 -0
- package/build/types/components/Inputs/helpers/Label.d.ts +9 -0
- package/build/types/components/Inputs/helpers/LabelWrapper.d.ts +8 -0
- package/build/types/components/Inputs/helpers/PickerToggle.d.ts +6 -0
- package/build/types/components/Inputs/helpers/useInputFocus.d.ts +8 -0
- package/build/types/components/ListBoxParts/ListBox.d.ts +8 -0
- package/build/types/components/ListBoxParts/ListBoxItem.d.ts +5 -0
- package/build/types/components/ListHelpers/ItemHeaderBody.d.ts +7 -0
- package/build/types/components/ListHelpers/ListHeader.d.ts +6 -0
- package/build/types/components/ListHelpers/ListItemStyles.d.ts +16 -0
- package/build/types/components/ListHelpers/ListSection.d.ts +8 -0
- package/build/types/components/ListHelpers/ListStyles.d.ts +11 -0
- package/build/types/components/Modal.d.ts +3 -1
- package/build/types/components/MultiSelect.d.ts +4 -4
- package/build/types/components/OptionHelpers/Item.d.ts +2 -0
- package/build/types/components/OptionHelpers/types.d.ts +2 -0
- package/build/types/components/Options.d.ts +1 -1
- package/build/types/components/RangeCalendar.d.ts +13 -0
- package/build/types/components/Select.d.ts +12 -63
- package/build/types/components/componentTypes.d.ts +61 -0
- package/build/types/components/helpers/styledProps.d.ts +6 -26
- package/build/types/components/types.d.ts +59 -2
- package/build/types/hooks/useSelect.d.ts +3 -2
- package/build/types/index.d.ts +7 -2
- package/build/types/theme/ThemeTypes.d.ts +2 -0
- package/package.json +9 -9
|
@@ -7,7 +7,7 @@ declare const Button: {
|
|
|
7
7
|
Group: ({ children, disabled, outline, size, small, large, secondary, negative, positive, caution, collapse, ...props }: ({
|
|
8
8
|
children: (import("react").ReactElement<BasicButtonProps | ButtonComponentProps, string | import("react").JSXElementConstructor<any>> | import("react").ReactElement<import("../Tooltip").TooltipProps, string | import("react").JSXElementConstructor<any>>) | (import("react").ReactElement<BasicButtonProps | ButtonComponentProps, string | import("react").JSXElementConstructor<any>> | import("react").ReactElement<import("../Tooltip").TooltipProps, string | import("react").JSXElementConstructor<any>>)[];
|
|
9
9
|
disabled?: boolean | undefined;
|
|
10
|
-
size?: "small" | "
|
|
10
|
+
size?: "small" | "medium" | "large" | undefined;
|
|
11
11
|
small?: boolean | undefined;
|
|
12
12
|
large?: boolean | undefined;
|
|
13
13
|
outline?: boolean | undefined;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { HTMLProps,
|
|
2
|
-
import {
|
|
1
|
+
import { HTMLProps, ReactNode } from 'react';
|
|
2
|
+
import type { ButtonProps, PressEvent } from 'react-aria-components';
|
|
3
3
|
import { IconNames } from '../Icon/icons';
|
|
4
|
-
import {
|
|
5
|
-
|
|
4
|
+
import { ListItem } from '../componentTypes';
|
|
5
|
+
import { AsProp, Margin } from '../types';
|
|
6
|
+
type ButtonAttributes = Omit<HTMLProps<HTMLButtonElement>, 'as' | 'type' | 'size' | 'onClick'> & {
|
|
6
7
|
type?: 'button' | 'reset' | 'submit';
|
|
7
|
-
} & AsProp;
|
|
8
|
+
} & AsProp & ButtonProps;
|
|
8
9
|
type ButtonBaseProps = {
|
|
9
10
|
children?: ReactNode;
|
|
10
11
|
joined?: 'left' | 'right' | 'middle';
|
|
@@ -36,7 +37,7 @@ type ButtonBaseProps = {
|
|
|
36
37
|
/** CSS Animation shorthand property for the icon */
|
|
37
38
|
iconAnimation?: string;
|
|
38
39
|
/** The function to be called when the button is clicked */
|
|
39
|
-
onClick?: (event:
|
|
40
|
+
onClick?: (event: PressEvent) => void;
|
|
40
41
|
/** Sets the text backgroundColor of the button */
|
|
41
42
|
backgroundColor?: string;
|
|
42
43
|
/** Sets the text color of the button */
|
|
@@ -110,7 +111,7 @@ export type DropdownProps = {
|
|
|
110
111
|
/** Adds a dropdown button to the main button, allowing for multiple button options */
|
|
111
112
|
dropdown: true;
|
|
112
113
|
/** The dropdown options array of { id: string; label: string; action: () => void; } */
|
|
113
|
-
options:
|
|
114
|
+
options: ListItem[];
|
|
114
115
|
/** The direction the options should open in relation to the button */
|
|
115
116
|
direction?: 'top' | 'bottom';
|
|
116
117
|
/** The function to be called when the options are opened */
|
|
@@ -131,7 +132,7 @@ export type DropdownProps = {
|
|
|
131
132
|
optionsDisabled?: boolean;
|
|
132
133
|
};
|
|
133
134
|
export type ButtonDropdownProps = {
|
|
134
|
-
options:
|
|
135
|
+
options: ListItem[];
|
|
135
136
|
direction?: 'top' | 'bottom';
|
|
136
137
|
afterShow?: () => void;
|
|
137
138
|
afterHide?: () => void;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export default Button;
|
|
1
|
+
export { default } from './Button';
|
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
import { CalendarDate } from '@internationalized/date';
|
|
2
|
+
import { CalendarProps } from 'react-aria-components';
|
|
3
|
+
import type { CalendarBaseProps } from './componentTypes';
|
|
4
|
+
type Props = {
|
|
2
5
|
/** Optional date the initial selected calendar day should be set to. */
|
|
3
6
|
date?: Date;
|
|
4
7
|
/** The function to be called when a date is selected */
|
|
5
8
|
onChange: (date: Date) => void;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
/** Prevents selection of dates in the future (relative to the set date or current date). */
|
|
9
|
-
preventFuture?: boolean | Date;
|
|
10
|
-
/** Removes the Calendar's boxShadow */
|
|
11
|
-
noShadow?: boolean;
|
|
12
|
-
};
|
|
13
|
-
declare const Calendar: ({ date, onChange, preventPast, preventFuture, noShadow }: CalendarProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
} & CalendarBaseProps & Omit<CalendarProps<CalendarDate>, 'onChange'>;
|
|
10
|
+
declare const Calendar: ({ date, onChange, preventPast, preventFuture, noShadow, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
14
11
|
export default Calendar;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CSSObject } from '@emotion/styled';
|
|
2
|
+
import { ThemeProp } from '../types';
|
|
3
|
+
export type CalendarContainerProps = {
|
|
4
|
+
noShadow?: boolean;
|
|
5
|
+
} & ThemeProp;
|
|
6
|
+
declare const calendarContainerStyles: (({ theme, noShadow }: CalendarContainerProps & Required<ThemeProp>) => CSSObject)[];
|
|
7
|
+
export default calendarContainerStyles;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CalendarDate } from '@internationalized/date';
|
|
2
|
+
type Props = {
|
|
3
|
+
range?: boolean;
|
|
4
|
+
initialDate?: CalendarDate;
|
|
5
|
+
};
|
|
6
|
+
declare const CalendarContent: ({ range, initialDate }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default CalendarContent;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { CalendarDate } from '@internationalized/date';
|
|
2
|
+
type PastFuture = boolean | Date;
|
|
3
|
+
type Params = {
|
|
4
|
+
past?: PastFuture;
|
|
5
|
+
future?: PastFuture;
|
|
6
|
+
rel: CalendarDate;
|
|
7
|
+
};
|
|
8
|
+
declare const useMinMax: ({ past, future, rel }: Params) => {
|
|
9
|
+
min: CalendarDate | undefined;
|
|
10
|
+
max: CalendarDate | undefined;
|
|
11
|
+
};
|
|
12
|
+
export default useMinMax;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { DateValue } from 'react-aria-components';
|
|
2
|
+
export declare const getNow: () => import("@internationalized/date").CalendarDate;
|
|
3
|
+
export declare const getDateFromObj: (val: DateValue) => Date;
|
|
4
|
+
export declare const getObjFromDate: (val: Date) => import("@internationalized/date").CalendarDate;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ComboBoxProps } from 'react-aria-components';
|
|
3
|
+
import { SelectInputProps } from './componentTypes';
|
|
4
|
+
type Props = {
|
|
5
|
+
/** The function to be called when the search input is updated */
|
|
6
|
+
onTextChange?: (text: string) => void;
|
|
7
|
+
} & SelectInputProps & Omit<ComboBoxProps<object>, 'children' | 'onSelectionChange'>;
|
|
8
|
+
declare const ComboBox: {
|
|
9
|
+
({ backgroundColor, children, fontSize, isDisabled, label, open, options, placeholder, placeholderColor, textOnly, value, width, onChange, afterShow, afterHide, onTextChange, ...props }: Props): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
Item: ({ id, value, header, body, leftElement, rightElement, inline, ...props }: import("./componentTypes").SelectItem & Omit<import("react-aria-components").ListBoxItemProps<object>, "value" | "id">) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
Section: ({ id, title, children }: {
|
|
12
|
+
id?: string | undefined;
|
|
13
|
+
title?: string | undefined;
|
|
14
|
+
children: import("react").ReactNode;
|
|
15
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
};
|
|
17
|
+
export default ComboBox;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { KeyboardEvent, CSSProperties as CSS } from 'react';
|
|
2
1
|
import { EditorChangeType } from 'draft-js';
|
|
2
|
+
import { CSSProperties as CSS, KeyboardEvent } from 'react';
|
|
3
3
|
import { DraftEditorRef, InputFocusEvent, Margin, MergeField } from './types';
|
|
4
4
|
declare const DraftEditor: import("react").ForwardRefExoticComponent<{
|
|
5
5
|
/** Controlled text value of the editor */
|
|
@@ -26,8 +26,6 @@ declare const DraftEditor: import("react").ForwardRefExoticComponent<{
|
|
|
26
26
|
height?: number | undefined;
|
|
27
27
|
/** Max Height of the editor. Editor contents will scroll after this height is reached */
|
|
28
28
|
maxHeight?: number | undefined;
|
|
29
|
-
/** Removes the border from the editor */
|
|
30
|
-
borderless?: boolean | undefined;
|
|
31
29
|
/** Removes the padding from the editor */
|
|
32
30
|
noPadding?: boolean | undefined;
|
|
33
31
|
/** Disables any editing capability of the editor */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ReactNode, RefObject } from 'react';
|
|
2
2
|
import { InputProps } from '../Input';
|
|
3
|
-
import { InputFocusEvent, InputRef, Margin, WidthHeight } from '../types';
|
|
4
|
-
import { DropdownItemProps
|
|
3
|
+
import { InputFocusEvent, InputRef, Margin, OptionItem, WidthHeight } from '../types';
|
|
4
|
+
import { DropdownItemProps } from './DropdownUtils';
|
|
5
5
|
export type RestInputProps = Omit<InputProps, 'value' | 'onChange' | 'onError'>;
|
|
6
6
|
type DropdownProps<OptionType> = {
|
|
7
7
|
children?: ReactNode;
|
|
@@ -79,7 +79,7 @@ type DropdownProps<OptionType> = {
|
|
|
79
79
|
optionsParent?: string;
|
|
80
80
|
} & WidthHeight & Margin & RestInputProps;
|
|
81
81
|
declare const Dropdown: {
|
|
82
|
-
<OptionType extends OptionItem>({ onChange, onTextChange, afterShow, afterHide, onFocus, onBlur, onError, placeholder, placeholderColor, value, options, children,
|
|
83
|
-
Item<OptionType_1 extends OptionItem>({ value, displayText, setValue, close, children, contentPosition, color, accented, onClick, id, }: DropdownItemProps<OptionType_1>): import("react/jsx-runtime").JSX.Element;
|
|
82
|
+
<OptionType extends OptionItem>({ onChange, onTextChange, afterShow, afterHide, onFocus, onBlur, onError, placeholder, placeholderColor, value, options, children, borderColor, backgroundColor, hideIcon, clearOnSelect, textOnly, width, height, isLoading, margin, marginTop, marginBottom, marginRight, marginLeft, label, id, name, trigger, centerY, centerX, offsetY, offsetX, direction, fontSize, description, disabled, invalid, search, filter, restrictInput, inputRef, optionsParent, ...props }: DropdownProps<OptionType>): import("react/jsx-runtime").JSX.Element;
|
|
83
|
+
Item<OptionType_1 extends OptionItem>({ value, displayText, setValue, close, children, contentPosition, color, accented, onClick, id, section, }: DropdownItemProps<OptionType_1>): import("react/jsx-runtime").JSX.Element;
|
|
84
84
|
};
|
|
85
85
|
export default Dropdown;
|
|
@@ -1,16 +1,5 @@
|
|
|
1
1
|
import { ChangeEvent, MouseEvent, ReactElement, ReactNode } from 'react';
|
|
2
|
-
import { FlexPosition, ThemeProp } from '../types';
|
|
3
|
-
export type OptionItem = {
|
|
4
|
-
id: number | string;
|
|
5
|
-
label: string;
|
|
6
|
-
header?: string;
|
|
7
|
-
body?: string;
|
|
8
|
-
leftElement?: ReactElement;
|
|
9
|
-
rightElement?: ReactElement;
|
|
10
|
-
onClick?: (event?: MouseEvent | Event) => void;
|
|
11
|
-
value?: unknown;
|
|
12
|
-
[key: string]: unknown;
|
|
13
|
-
};
|
|
2
|
+
import { FlexPosition, OptionItem, ThemeProp } from '../types';
|
|
14
3
|
export type DropdownItemProps<OptionType> = {
|
|
15
4
|
setValue?: (v: OptionType, event: MouseEvent | Event) => void;
|
|
16
5
|
close?: () => void;
|
|
@@ -29,6 +18,8 @@ export type DropdownItemProps<OptionType> = {
|
|
|
29
18
|
onClick?: (event: MouseEvent | Event) => void;
|
|
30
19
|
/** The id of the Item element */
|
|
31
20
|
id: number | string;
|
|
21
|
+
/** Sets the Item as a section separator */
|
|
22
|
+
section?: boolean;
|
|
32
23
|
};
|
|
33
24
|
export type SetEvent = MouseEvent | ChangeEvent | KeyboardEvent | Event;
|
|
34
25
|
export type SetValueFunc = <OptionType extends OptionItem>(selection: OptionType | string | null, event?: SetEvent) => void;
|
|
@@ -41,7 +32,7 @@ type StatePieces = {
|
|
|
41
32
|
};
|
|
42
33
|
type FilterState = Omit<StatePieces, 'selected'>;
|
|
43
34
|
export declare const getFilteredOptions: <OptionType extends OptionItem>(options: OptionType[], state: FilterState) => OptionType[];
|
|
44
|
-
export declare const getItemContentFromOption: <OptionType extends OptionItem>(option: OptionType) => import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
export declare const getItemContentFromOption: <OptionType extends OptionItem>(option: Partial<OptionType>) => import("react/jsx-runtime").JSX.Element;
|
|
45
36
|
export declare const getOptionsFromArray: <OptionType extends OptionItem>(options: OptionType[], setValue: SetValueFunc, toggle: toggleFunc, state: FilterState) => import("react/jsx-runtime").JSX.Element[];
|
|
46
37
|
export declare const getOptionsFromChildren: <OptionType extends OptionItem>(children: ReactNode, setValue: SetValueFunc, toggle: toggleFunc) => (ReactElement<DropdownItemProps<OptionType>, string | import("react").JSXElementConstructor<any>> | null)[];
|
|
47
38
|
export declare const getCombinedChildren: <OptionType extends OptionItem>(options: OptionType[], children: ReactNode, setValue: SetValueFunc, toggle: toggleFunc, state: StatePieces) => (ReactElement<any, string | import("react").JSXElementConstructor<any>> | null)[];
|
|
@@ -1,67 +1,28 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
children: ReactNode;
|
|
9
|
-
onChange?: never;
|
|
10
|
-
};
|
|
11
|
-
type WithOptions<OptionType> = {
|
|
12
|
-
options: OptionType[];
|
|
13
|
-
/** The function called after an option from the options array is selected */
|
|
14
|
-
onChange?: (option: OptionType, event: MouseEvent | Event) => void;
|
|
15
|
-
};
|
|
16
|
-
type EitherChildrenOrOptions<OptionType> = WithChildren | WithOptions<OptionType>;
|
|
17
|
-
type DropdownMenuProps<OptionType> = {
|
|
18
|
-
children?: ReactNode;
|
|
19
|
-
/** The options to be displayed */
|
|
20
|
-
options?: OptionType[];
|
|
21
|
-
/** The id of the menu container */
|
|
22
|
-
id?: string | number;
|
|
1
|
+
import type { ReactElement, ReactNode } from 'react';
|
|
2
|
+
import { ListItem, SelectInputProps } from './componentTypes';
|
|
3
|
+
import type { Placement } from './types';
|
|
4
|
+
type SelectProps = Pick<SelectInputProps, 'children' | 'open' | 'afterShow' | 'afterHide'>;
|
|
5
|
+
type DropdownMenuProps = {
|
|
6
|
+
/** The options to be displayed in the menu */
|
|
7
|
+
options?: ListItem[];
|
|
23
8
|
/** The position of the menu body and arrow in relation to the trigger */
|
|
24
|
-
position?:
|
|
9
|
+
position?: Placement;
|
|
25
10
|
/** The element that will trigger the opening of the menu */
|
|
26
|
-
trigger:
|
|
27
|
-
/** Controls the open state of the menu */
|
|
28
|
-
open?: boolean;
|
|
11
|
+
trigger: ReactElement;
|
|
29
12
|
/** Offset of the menu from the trigger */
|
|
30
13
|
offset?: number;
|
|
31
|
-
|
|
32
|
-
arrow?: boolean;
|
|
33
|
-
/** The width of the menu */
|
|
34
|
-
width?: number | string;
|
|
35
|
-
/** Overrides the default maxHeight of 200px */
|
|
36
|
-
maxHeight?: number;
|
|
37
|
-
/** Specify a container element to portal the content into */
|
|
38
|
-
container?: HTMLElement;
|
|
39
|
-
/** zIndex of the menu's portal container */
|
|
40
|
-
zIndex?: number;
|
|
41
|
-
/** Enables the page to scroll when the menu is open */
|
|
42
|
-
disableScrollLock?: boolean;
|
|
43
|
-
/** The function called after the menu opens */
|
|
44
|
-
afterShow?: () => void;
|
|
45
|
-
/** The function called after the menu closes */
|
|
46
|
-
afterHide?: () => void;
|
|
47
|
-
} & EitherChildrenOrOptions<OptionType> & DivProps;
|
|
14
|
+
} & SelectProps;
|
|
48
15
|
declare const DropdownMenu: {
|
|
49
|
-
|
|
50
|
-
Item: ({
|
|
51
|
-
Sub({ children,
|
|
16
|
+
({ children, position, trigger, open, options, offset, afterShow, afterHide, }: DropdownMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
Item: ({ id, value, header, body, leftElement, rightElement, inline, onClick, ...props }: ListItem & Omit<import("react-aria-components").MenuItemProps<object>, "value" | "id" | "onAction">) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
Sub({ children, label, isDisabled }: SubProps): import("react/jsx-runtime").JSX.Element;
|
|
52
19
|
Separator(): import("react/jsx-runtime").JSX.Element;
|
|
53
20
|
};
|
|
54
21
|
type SubProps = {
|
|
55
22
|
children?: ReactNode;
|
|
56
|
-
/** The id of the sub menu's content container */
|
|
57
|
-
id?: string;
|
|
58
23
|
/** The text or element to display as the sub menu item's trigger */
|
|
59
|
-
label: string
|
|
60
|
-
/** zIndex of the sub menu's portal container */
|
|
61
|
-
zIndex?: number;
|
|
62
|
-
/** Specify a container element to portal the sub menu content into */
|
|
63
|
-
container?: HTMLElement;
|
|
24
|
+
label: string;
|
|
64
25
|
/** Prevents the Sub menu from being triggered */
|
|
65
|
-
|
|
66
|
-
}
|
|
26
|
+
isDisabled?: boolean;
|
|
27
|
+
};
|
|
67
28
|
export default DropdownMenu;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const Menu: import("@emotion/styled").StyledComponent<import("react-aria-components").MenuProps<object> & import("react").RefAttributes<HTMLDivElement> & {
|
|
3
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
4
|
+
} & {
|
|
5
|
+
zIndex?: number | undefined;
|
|
6
|
+
autoWidth?: boolean | undefined;
|
|
7
|
+
} & import("../types").Width & import("../types").ThemeProp, {}, {}>;
|
|
8
|
+
export default Menu;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { MenuItemProps } from 'react-aria-components';
|
|
2
|
+
import { ListItem } from '../componentTypes';
|
|
3
|
+
type Props = ListItem & Omit<MenuItemProps, 'value' | 'id' | 'onAction'>;
|
|
4
|
+
declare const MenuItem: ({ id, value, header, body, leftElement, rightElement, inline, onClick, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export default MenuItem;
|
|
@@ -22,7 +22,6 @@ declare const Form: {
|
|
|
22
22
|
iconLeft?: import("./helpers/getIcon").IconType | undefined;
|
|
23
23
|
iconRight?: import("./helpers/getIcon").IconType | undefined;
|
|
24
24
|
invalid?: boolean | undefined;
|
|
25
|
-
borderless?: boolean | undefined;
|
|
26
25
|
borderRadius?: string | number | undefined;
|
|
27
26
|
borderColor?: string | undefined;
|
|
28
27
|
backgroundColor?: string | undefined;
|
|
@@ -55,7 +54,6 @@ declare const Form: {
|
|
|
55
54
|
iconLeft?: import("./helpers/getIcon").IconType | undefined;
|
|
56
55
|
iconRight?: import("./helpers/getIcon").IconType | undefined;
|
|
57
56
|
invalid?: boolean | undefined;
|
|
58
|
-
borderless?: boolean | undefined;
|
|
59
57
|
borderRadius?: string | number | undefined;
|
|
60
58
|
borderColor?: string | undefined;
|
|
61
59
|
backgroundColor?: string | undefined;
|
|
@@ -80,7 +78,7 @@ declare const Form: {
|
|
|
80
78
|
onChange?: ((event: import("react").ChangeEvent<HTMLInputElement>, formatted: string, raw: string) => void) | undefined;
|
|
81
79
|
} & Margin & import("./types").Padding, "ref">) & import("react").RefAttributes<import("./types").InputRef>>;
|
|
82
80
|
Dropdown: {
|
|
83
|
-
<OptionType extends import("./
|
|
81
|
+
<OptionType extends import("./types").OptionItem>({ onChange, onTextChange, afterShow, afterHide, onFocus, onBlur, onError, placeholder, placeholderColor, value, options, children, borderColor, backgroundColor, hideIcon, clearOnSelect, textOnly, width, height, isLoading, margin, marginTop, marginBottom, marginRight, marginLeft, label, id, name, trigger, centerY, centerX, offsetY, offsetX, direction, fontSize, description, disabled, invalid, search, filter, restrictInput, inputRef, optionsParent, ...props }: {
|
|
84
82
|
children?: ReactNode;
|
|
85
83
|
onChange?: ((item: OptionType | null) => void) | undefined;
|
|
86
84
|
onTextChange?: ((text: string) => void) | undefined;
|
|
@@ -119,7 +117,7 @@ declare const Form: {
|
|
|
119
117
|
inputRef?: import("react").RefObject<import("./types").InputRef> | undefined;
|
|
120
118
|
optionsParent?: string | undefined;
|
|
121
119
|
} & import("./types").Width & import("./types").Height & Margin & import("./Dropdown").InputProps): import("react/jsx-runtime").JSX.Element;
|
|
122
|
-
Item<OptionType_1 extends import("./
|
|
120
|
+
Item<OptionType_1 extends import("./types").OptionItem>({ value, displayText, setValue, close, children, contentPosition, color, accented, onClick, id, section, }: import("./Dropdown/DropdownUtils").DropdownItemProps<OptionType_1>): import("react/jsx-runtime").JSX.Element;
|
|
123
121
|
};
|
|
124
122
|
Radio: ({ id, label, labelPosition, checked, disabled, margin, marginTop, marginBottom, marginRight, marginLeft, ...props }: {
|
|
125
123
|
id?: string | undefined;
|
|
@@ -134,6 +134,7 @@ declare const icons: {
|
|
|
134
134
|
'close-circle-outline': typeof CloseCircleOutline;
|
|
135
135
|
copy: typeof Copy;
|
|
136
136
|
cycle: (props: import("react").SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
|
|
137
|
+
dash: (props: import("react").SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
|
|
137
138
|
devices: typeof Devices;
|
|
138
139
|
dialpad: typeof Dialpad;
|
|
139
140
|
'double-arrow-left': typeof DoubleArrowLeft;
|
|
@@ -148,6 +149,7 @@ declare const icons: {
|
|
|
148
149
|
filter: typeof Filter;
|
|
149
150
|
flag: (props: import("react").SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
|
|
150
151
|
flask: typeof Flask;
|
|
152
|
+
funnel: (props: import("react").SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
|
|
151
153
|
group: typeof Group;
|
|
152
154
|
hash: (props: import("react").SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
|
|
153
155
|
heart: typeof Heart;
|
|
@@ -161,6 +163,8 @@ declare const icons: {
|
|
|
161
163
|
link: typeof Link;
|
|
162
164
|
linkedin: typeof Linkedin;
|
|
163
165
|
loading: typeof Loading;
|
|
166
|
+
'local-area': (props: import("react").SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
|
|
167
|
+
location: (props: import("react").SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
|
|
164
168
|
logout: (props: import("react").SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
|
|
165
169
|
maximize: typeof Maximize;
|
|
166
170
|
menu: typeof Menu;
|
|
@@ -172,6 +176,7 @@ declare const icons: {
|
|
|
172
176
|
minimize: typeof Minimize;
|
|
173
177
|
mobile: typeof Mobile;
|
|
174
178
|
'not-allowed': typeof NotAllowed;
|
|
179
|
+
notes: (props: import("react").SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
|
|
175
180
|
open: typeof Open;
|
|
176
181
|
pause: typeof Pause;
|
|
177
182
|
'pause-outline': typeof PauseOutline;
|
|
@@ -200,7 +205,9 @@ declare const icons: {
|
|
|
200
205
|
search: typeof Search;
|
|
201
206
|
settings: typeof Settings;
|
|
202
207
|
share: (props: import("react").SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
|
|
208
|
+
shield: (props: import("react").SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
|
|
203
209
|
'shield-check': (props: import("react").SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
|
|
210
|
+
'shield-health': (props: import("react").SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
|
|
204
211
|
'shield-slash': (props: import("react").SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
|
|
205
212
|
sort: typeof Sort;
|
|
206
213
|
spotify: typeof Spotify;
|
|
@@ -35,8 +35,6 @@ export type InputProps = {
|
|
|
35
35
|
iconRight?: IconType;
|
|
36
36
|
/** Sets the Input's bottom border and description text to red */
|
|
37
37
|
invalid?: boolean;
|
|
38
|
-
/** Removes the input border */
|
|
39
|
-
borderless?: boolean;
|
|
40
38
|
/** Sets the input borderRadius */
|
|
41
39
|
borderRadius?: number | string;
|
|
42
40
|
/** Sets the input borderColor */
|
|
@@ -95,8 +93,6 @@ declare const Input: import("react").ForwardRefExoticComponent<(Omit<{
|
|
|
95
93
|
iconRight?: IconType | undefined;
|
|
96
94
|
/** Sets the Input's bottom border and description text to red */
|
|
97
95
|
invalid?: boolean | undefined;
|
|
98
|
-
/** Removes the input border */
|
|
99
|
-
borderless?: boolean | undefined;
|
|
100
96
|
/** Sets the input borderRadius */
|
|
101
97
|
borderRadius?: string | number | undefined;
|
|
102
98
|
/** Sets the input borderColor */
|
|
@@ -154,8 +150,6 @@ declare const Input: import("react").ForwardRefExoticComponent<(Omit<{
|
|
|
154
150
|
iconRight?: IconType | undefined;
|
|
155
151
|
/** Sets the Input's bottom border and description text to red */
|
|
156
152
|
invalid?: boolean | undefined;
|
|
157
|
-
/** Removes the input border */
|
|
158
|
-
borderless?: boolean | undefined;
|
|
159
153
|
/** Sets the input borderRadius */
|
|
160
154
|
borderRadius?: string | number | undefined;
|
|
161
155
|
/** Sets the input borderColor */
|
|
@@ -10,7 +10,6 @@ export declare const isInputFilled: (value?: string | number) => boolean;
|
|
|
10
10
|
export type InputContainerProps = {
|
|
11
11
|
backgroundColor?: string;
|
|
12
12
|
borderRadius?: number | string;
|
|
13
|
-
borderless?: boolean;
|
|
14
13
|
borderColor?: string;
|
|
15
14
|
fontSize?: number | string;
|
|
16
15
|
placeholderColor?: string;
|
|
@@ -28,7 +27,6 @@ export declare const InputContainer: import("@emotion/styled").StyledComponent<{
|
|
|
28
27
|
} & {
|
|
29
28
|
backgroundColor?: string | undefined;
|
|
30
29
|
borderRadius?: string | number | undefined;
|
|
31
|
-
borderless?: boolean | undefined;
|
|
32
30
|
borderColor?: string | undefined;
|
|
33
31
|
fontSize?: string | number | undefined;
|
|
34
32
|
placeholderColor?: string | undefined;
|
|
@@ -67,7 +65,6 @@ declare const _default: {
|
|
|
67
65
|
} & {
|
|
68
66
|
backgroundColor?: string | undefined;
|
|
69
67
|
borderRadius?: string | number | undefined;
|
|
70
|
-
borderless?: boolean | undefined;
|
|
71
68
|
borderColor?: string | undefined;
|
|
72
69
|
fontSize?: string | number | undefined;
|
|
73
70
|
placeholderColor?: string | undefined;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DatePickerProps, DateValue } from 'react-aria-components';
|
|
2
|
+
import { DateInputProps } from '../componentTypes';
|
|
3
|
+
type PickerProps = Omit<DatePickerProps<DateValue>, 'value' | 'onChange' | 'isOpen'>;
|
|
4
|
+
type Props = {
|
|
5
|
+
value?: Date;
|
|
6
|
+
onChange: (date: Date) => void;
|
|
7
|
+
} & DateInputProps & PickerProps;
|
|
8
|
+
declare const DatePicker: ({ value, label, inputRef, iconLeft, iconRight, isLoading, fontSize, placeholderColor, isDisabled, description, errorMessage, preventPast, preventFuture, open, onChange, afterShow, afterHide, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export default DatePicker;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { DateRangePickerProps, DateValue } from 'react-aria-components';
|
|
2
|
+
import { DateInputProps } from '../componentTypes';
|
|
3
|
+
type PickerProps = Omit<DateRangePickerProps<DateValue>, 'value' | 'onChange' | 'isOpen'>;
|
|
4
|
+
type Props = {
|
|
5
|
+
startValue?: Date;
|
|
6
|
+
endValue?: Date;
|
|
7
|
+
onChange: (start: Date, end: Date) => void;
|
|
8
|
+
} & DateInputProps & PickerProps;
|
|
9
|
+
declare const DateRangePicker: ({ startValue, endValue, label, inputRef, iconLeft, iconRight, isLoading, fontSize, placeholderColor, isDisabled, description, errorMessage, preventPast, preventFuture, open, onChange, afterShow, afterHide, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export default DateRangePicker;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { NumberFieldProps } from 'react-aria-components';
|
|
2
|
+
import { InputProps } from '../types';
|
|
3
|
+
type Props = InputProps & NumberFieldProps;
|
|
4
|
+
declare const NumberInput: ({ value, label, placeholder, inputRef, iconLeft, iconRight, isLoading, fontSize, placeholderColor, isDisabled, description, errorMessage, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export default NumberInput;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { TextFieldProps } from 'react-aria-components';
|
|
2
|
+
import { InputProps } from '../types';
|
|
3
|
+
type Props = InputProps & TextFieldProps;
|
|
4
|
+
declare const TextInput: ({ value, label, placeholder, inputRef, iconLeft, iconRight, isLoading, fontSize, placeholderColor, isDisabled, description, errorMessage, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export default TextInput;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const AriaButton: import("@emotion/styled").StyledComponent<import("react-aria-components").ButtonProps & import("react").RefAttributes<HTMLButtonElement> & {
|
|
3
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
4
|
+
}, {}, {}>;
|
|
5
|
+
export default AriaButton;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ThemeProp } from '../../types';
|
|
3
|
+
declare const DateSegment: import("@emotion/styled").StyledComponent<import("react-aria-components").DateSegmentProps & import("react").RefAttributes<HTMLDivElement> & {
|
|
4
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
5
|
+
} & {
|
|
6
|
+
placeholderColor?: string | undefined;
|
|
7
|
+
} & ThemeProp, {}, {}>;
|
|
8
|
+
export default DateSegment;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ThemeProp } from '../../types';
|
|
3
|
+
declare const Description: import("@emotion/styled").StyledComponent<import("react-aria-components").TextProps & import("react").RefAttributes<HTMLElement> & {
|
|
4
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
5
|
+
} & ThemeProp, {}, {}>;
|
|
6
|
+
export default Description;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ThemeProp } from '../../types';
|
|
3
|
+
declare const ErrorMessage: import("@emotion/styled").StyledComponent<import("react-aria-components").FieldErrorProps & import("react").RefAttributes<HTMLElement> & {
|
|
4
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
5
|
+
} & ThemeProp, {}, {}>;
|
|
6
|
+
export default ErrorMessage;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const Input: import("@emotion/styled").StyledComponent<import("react-aria-components").InputProps & import("react").RefAttributes<HTMLInputElement> & {
|
|
3
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
4
|
+
} & {
|
|
5
|
+
hide?: boolean | undefined;
|
|
6
|
+
} & {
|
|
7
|
+
fontSize?: string | number | undefined;
|
|
8
|
+
placeholderColor?: string | undefined;
|
|
9
|
+
isDisabled?: boolean | undefined;
|
|
10
|
+
} & import("../../types").Width & import("../../types").ThemeProp, {}, {}>;
|
|
11
|
+
export default Input;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { CSSObject } from '@emotion/styled';
|
|
2
|
+
import { InputContainerStyleProps, ThemeProp } from '../../types';
|
|
3
|
+
type StateProps = {
|
|
4
|
+
pointer?: boolean;
|
|
5
|
+
focused?: boolean;
|
|
6
|
+
hasLabel?: boolean;
|
|
7
|
+
isDisabled?: boolean;
|
|
8
|
+
isReadOnly?: boolean;
|
|
9
|
+
};
|
|
10
|
+
export type ContainerProps = InputContainerStyleProps & StateProps & ThemeProp;
|
|
11
|
+
type Props = ContainerProps & Required<ThemeProp>;
|
|
12
|
+
declare const styles: ((({ width, height }: import("../../types").WidthHeight) => CSSObject) | (({ theme: { input, accent }, backgroundColor, borderRadius, borderColor, textOnly, isDisabled, hasLabel, pointer, }: Props) => CSSObject))[];
|
|
13
|
+
export default styles;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ValidationResult } from 'react-aria-components';
|
|
2
|
+
type Props = {
|
|
3
|
+
/** Places a description message below the input */
|
|
4
|
+
description?: string;
|
|
5
|
+
/** Places an error message below the input */
|
|
6
|
+
errorMessage?: string | ((validation: ValidationResult) => string);
|
|
7
|
+
};
|
|
8
|
+
declare const InputMessage: ({ description, errorMessage }: Props) => import("react/jsx-runtime").JSX.Element | null;
|
|
9
|
+
export default InputMessage;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { CSSObject } from '@emotion/styled';
|
|
2
|
+
import { InputElementStyleProps, ThemeProp } from '../../types';
|
|
3
|
+
export declare const preventProps: {
|
|
4
|
+
shouldForwardProp: (prop: string) => boolean;
|
|
5
|
+
};
|
|
6
|
+
export type InputStyleProps = {
|
|
7
|
+
hide?: boolean;
|
|
8
|
+
} & InputElementStyleProps & ThemeProp;
|
|
9
|
+
type Props = InputStyleProps & Required<ThemeProp>;
|
|
10
|
+
declare const inputStyles: (({ theme: { font, input, size, accent }, fontSize, hide, isDisabled, width, placeholderColor, }: Props) => CSSObject)[];
|
|
11
|
+
export default inputStyles;
|