@wavv/ui 2.2.4 → 2.2.5
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/components/Accordion/Accordion.d.ts +24 -3
- package/build/components/Accordion/Accordion.js +2 -1
- package/build/components/Accordion/Item.d.ts +12 -1
- package/build/components/Accordion/Item.js +12 -1
- package/build/components/Accordion/Panel.d.ts +3 -0
- package/build/components/Button/Button.d.ts +1 -1
- package/build/components/Button/Group.d.ts +1 -1
- package/build/components/Calendar.d.ts +4 -1
- package/build/components/Checkbox.d.ts +4 -3
- package/build/components/Checkbox.js +12 -20
- package/build/components/ComboBox.d.ts +2 -2
- package/build/components/DropdownMenu.d.ts +5 -5
- package/build/components/Form.d.ts +4 -2
- package/build/components/Inputs/DatePicker.d.ts +5 -1
- package/build/components/Inputs/DateRangePicker.d.ts +5 -1
- package/build/components/Inputs/NumberInput.d.ts +2 -2
- package/build/components/Inputs/PhoneInput.d.ts +2 -2
- package/build/components/Inputs/SearchInput.d.ts +2 -2
- package/build/components/Inputs/TextArea.d.ts +2 -4
- package/build/components/Inputs/TextInput.d.ts +2 -4
- package/build/components/Inputs/TimeInput.d.ts +2 -3
- package/build/components/Modal.d.ts +35 -21
- package/build/components/Modal.js +15 -3
- package/build/components/MultiSelect/SearchDropdown.d.ts +2 -2
- package/build/components/Popover.d.ts +13 -3
- package/build/components/RangeCalendar.d.ts +4 -1
- package/build/components/Select.d.ts +5 -5
- package/build/components/Table/Body.d.ts +5 -3
- package/build/components/Table/Cell.d.ts +5 -2
- package/build/components/Table/Column.d.ts +9 -2
- package/build/components/Table/Header.js +2 -2
- package/build/components/Table/Row.js +2 -2
- package/build/components/Table/Table.d.ts +34 -7
- package/build/components/Tabs.d.ts +24 -4
- package/build/components/ToggleButton/ToggleButton.d.ts +4 -0
- package/build/components/ToggleButton/ToggleButtonGroup.d.ts +9 -1
- package/build/components/Tooltip.d.ts +6 -3
- package/build/components/Tree/Tree.d.ts +25 -3
- package/build/components/Tree/TreeItem.d.ts +11 -2
- package/build/components/Tree/TreeItem.js +2 -1
- package/build/components/helpers/getIcon.d.ts +1 -1
- package/build/components/typeDefs/inputTypes.d.ts +1 -0
- package/build/components/typeDefs/reactAriaTypes.d.ts +126 -0
- package/build/components/typeDefs/reactAriaTypes.js +0 -0
- package/build/components/typeDefs/selectionTypes.d.ts +1 -0
- package/package.json +1 -1
- package/build/components/Table/Check.d.ts +0 -3
- package/build/components/Table/Check.js +0 -35
|
@@ -1,10 +1,28 @@
|
|
|
1
1
|
import { type DisclosureGroupProps } from 'react-aria-components';
|
|
2
2
|
import type { Margin, MaxHeight, Width } from '../types';
|
|
3
|
-
type Props =
|
|
3
|
+
type Props = {
|
|
4
|
+
allowsMultipleExpanded?: DisclosureGroupProps['allowsMultipleExpanded'];
|
|
5
|
+
expandedKeys?: DisclosureGroupProps['expandedKeys'];
|
|
6
|
+
defaultExpandedKeys?: DisclosureGroupProps['defaultExpandedKeys'];
|
|
7
|
+
onExpandedChange?: DisclosureGroupProps['onExpandedChange'];
|
|
8
|
+
/** Disables all items in the accordion */
|
|
9
|
+
disabled?: DisclosureGroupProps['isDisabled'];
|
|
10
|
+
className?: DisclosureGroupProps['className'];
|
|
11
|
+
style?: DisclosureGroupProps['style'];
|
|
12
|
+
} & Width & MaxHeight & Margin & Omit<DisclosureGroupProps, 'isDisabled'>;
|
|
4
13
|
declare const Accordion: {
|
|
5
|
-
({ children, maxHeight, ...props }: Props): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
({ children, maxHeight, disabled, ...props }: Props): import("react/jsx-runtime").JSX.Element;
|
|
6
15
|
Item: {
|
|
7
|
-
({ children, ...props }:
|
|
16
|
+
({ children, disabled, ...props }: {
|
|
17
|
+
id?: import("react-aria-components").DisclosureProps["id"];
|
|
18
|
+
isExpanded?: import("react-aria-components").DisclosureProps["isExpanded"];
|
|
19
|
+
defaultExpanded?: import("react-aria-components").DisclosureProps["defaultExpanded"];
|
|
20
|
+
onExpandedChange?: import("react-aria-components").DisclosureProps["onExpandedChange"];
|
|
21
|
+
disabled?: import("react-aria-components").DisclosureProps["isDisabled"];
|
|
22
|
+
children?: import("react-aria-components").DisclosureProps["children"];
|
|
23
|
+
className?: import("react-aria-components").DisclosureProps["className"];
|
|
24
|
+
style?: import("react-aria-components").DisclosureProps["style"];
|
|
25
|
+
} & Omit<import("react-aria-components").DisclosureProps, "isDisabled">): import("react/jsx-runtime").JSX.Element;
|
|
8
26
|
displayName: string;
|
|
9
27
|
};
|
|
10
28
|
Header: {
|
|
@@ -404,6 +422,9 @@ declare const Accordion: {
|
|
|
404
422
|
};
|
|
405
423
|
Panel: {
|
|
406
424
|
({ children, maxHeight, ...props }: {
|
|
425
|
+
children: import("react-aria-components").DisclosurePanelProps["children"];
|
|
426
|
+
className?: import("react-aria-components").DisclosurePanelProps["className"];
|
|
427
|
+
style?: import("react-aria-components").DisclosurePanelProps["style"];
|
|
407
428
|
background?: string;
|
|
408
429
|
} & MaxHeight & import("react-aria-components").DisclosurePanelProps): import("react/jsx-runtime").JSX.Element;
|
|
409
430
|
displayName: string;
|
|
@@ -5,10 +5,11 @@ import { marginProps, maxWidthHeightProps, widthHeightProps } from "../helpers/s
|
|
|
5
5
|
import Header from "./Header.js";
|
|
6
6
|
import Item from "./Item.js";
|
|
7
7
|
import Panel from "./Panel.js";
|
|
8
|
-
const Accordion = ({ children, maxHeight, ...props })=>/*#__PURE__*/ jsx(Container, {
|
|
8
|
+
const Accordion = ({ children, maxHeight, disabled, ...props })=>/*#__PURE__*/ jsx(Container, {
|
|
9
9
|
style: {
|
|
10
10
|
maxHeight
|
|
11
11
|
},
|
|
12
|
+
isDisabled: disabled,
|
|
12
13
|
...props,
|
|
13
14
|
children: children
|
|
14
15
|
});
|
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
import { type DisclosureProps } from 'react-aria-components';
|
|
2
|
+
type Props = {
|
|
3
|
+
id?: DisclosureProps['id'];
|
|
4
|
+
isExpanded?: DisclosureProps['isExpanded'];
|
|
5
|
+
defaultExpanded?: DisclosureProps['defaultExpanded'];
|
|
6
|
+
onExpandedChange?: DisclosureProps['onExpandedChange'];
|
|
7
|
+
/** Disables the item */
|
|
8
|
+
disabled?: DisclosureProps['isDisabled'];
|
|
9
|
+
children?: DisclosureProps['children'];
|
|
10
|
+
className?: DisclosureProps['className'];
|
|
11
|
+
style?: DisclosureProps['style'];
|
|
12
|
+
} & Omit<DisclosureProps, 'isDisabled'>;
|
|
2
13
|
declare const Item: {
|
|
3
|
-
({ children, ...props }:
|
|
14
|
+
({ children, disabled, ...props }: Props): import("react/jsx-runtime").JSX.Element;
|
|
4
15
|
displayName: string;
|
|
5
16
|
};
|
|
6
17
|
export default Item;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import styled from "@emotion/styled";
|
|
3
3
|
import { Disclosure } from "react-aria-components";
|
|
4
|
-
const Item = ({ children, ...props })=>/*#__PURE__*/ jsx(ItemContainer, {
|
|
4
|
+
const Item = ({ children, disabled, ...props })=>/*#__PURE__*/ jsx(ItemContainer, {
|
|
5
|
+
isDisabled: disabled,
|
|
5
6
|
...props,
|
|
6
7
|
children: children
|
|
7
8
|
});
|
|
@@ -18,6 +19,16 @@ const ItemContainer = styled(Disclosure)(({ theme })=>({
|
|
|
18
19
|
transform: 'rotate(90deg)'
|
|
19
20
|
}
|
|
20
21
|
}
|
|
22
|
+
},
|
|
23
|
+
'&[data-disabled="true"]': {
|
|
24
|
+
cursor: 'not-allowed',
|
|
25
|
+
'& > div:first-of-type': {
|
|
26
|
+
pointerEvents: 'none',
|
|
27
|
+
userSelect: 'none',
|
|
28
|
+
'& > *': {
|
|
29
|
+
opacity: 0.4
|
|
30
|
+
}
|
|
31
|
+
}
|
|
21
32
|
}
|
|
22
33
|
}));
|
|
23
34
|
Item.displayName = 'Accordion.Item';
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { type DisclosurePanelProps } from 'react-aria-components';
|
|
2
2
|
import type { MaxHeight } from '../types';
|
|
3
3
|
type PanelProps = {
|
|
4
|
+
children: DisclosurePanelProps['children'];
|
|
5
|
+
className?: DisclosurePanelProps['className'];
|
|
6
|
+
style?: DisclosurePanelProps['style'];
|
|
4
7
|
background?: string;
|
|
5
8
|
} & MaxHeight & DisclosurePanelProps;
|
|
6
9
|
declare const Panel: {
|
|
@@ -2,7 +2,7 @@ import type { Margin } from '../types';
|
|
|
2
2
|
import type { BasicButtonProps, ButtonComponentProps } from './ButtonTypes';
|
|
3
3
|
declare const _default: (({ content, children, dropdown, options, ref, ...rest }: ButtonComponentProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
4
4
|
Group: ({ children, disabled, outline, size, tiny, small, large, secondary, negative, positive, caution, collapse, ...props }: ({
|
|
5
|
-
children: (import("react").ReactElement<BasicButtonProps | ButtonComponentProps, string | import("react").JSXElementConstructor<any>> | import("react").ReactElement<import("../Tooltip").
|
|
5
|
+
children: (import("react").ReactElement<BasicButtonProps | ButtonComponentProps, string | import("react").JSXElementConstructor<any>> | import("react").ReactElement<import("../Tooltip").Props, string | import("react").JSXElementConstructor<any>>) | (import("react").ReactElement<BasicButtonProps | ButtonComponentProps, string | import("react").JSXElementConstructor<any>> | import("react").ReactElement<import("../Tooltip").Props, string | import("react").JSXElementConstructor<any>>)[];
|
|
6
6
|
disabled?: boolean;
|
|
7
7
|
size?: import("../types").Sizes;
|
|
8
8
|
tiny?: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ReactElement } from 'react';
|
|
2
|
-
import type { TooltipProps } from '../Tooltip';
|
|
2
|
+
import type { Props as TooltipProps } from '../Tooltip';
|
|
3
3
|
import type { Attributes } from '../typeDefs/elementTypes';
|
|
4
4
|
import type { Margin, Sizes, Width } from '../types';
|
|
5
5
|
import type { BasicButtonProps, ButtonComponentProps, ButtonStyles } from './ButtonTypes';
|
|
@@ -6,6 +6,9 @@ type Props = {
|
|
|
6
6
|
date?: Date;
|
|
7
7
|
/** The function to be called when a date is selected */
|
|
8
8
|
onChange: (date: Date) => void;
|
|
9
|
-
|
|
9
|
+
firstDayOfWeek?: CalendarProps<CalendarDate>['firstDayOfWeek'];
|
|
10
|
+
className?: CalendarProps<CalendarDate>['className'];
|
|
11
|
+
style?: CalendarProps<CalendarDate>['style'];
|
|
12
|
+
} & CalendarBaseProps & Pick<CalendarProps<CalendarDate>, 'firstDayOfWeek' | 'className' | 'style'>;
|
|
10
13
|
declare const Calendar: ({ date, onChange, preventPast, preventFuture, noShadow, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
11
14
|
export default Calendar;
|
|
@@ -17,9 +17,10 @@ type Props = {
|
|
|
17
17
|
partial?: boolean;
|
|
18
18
|
/** Sets the gap between the label and the checkbox */
|
|
19
19
|
gap?: number;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
onChange?: CheckboxProps['onChange'];
|
|
21
|
+
className?: CheckboxProps['className'];
|
|
22
|
+
style?: CheckboxProps['style'];
|
|
23
|
+
} & Margin & Omit<CheckboxProps, 'value' | 'isDisabled' | 'isReadOnly' | 'isSelected' | 'isIndeterminate'>;
|
|
23
24
|
declare const Checkbox: ({ label, labelPosition, checked, partial, disabled, readOnly, onChange, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
24
25
|
export declare const ControlContainer: import("@emotion/styled").StyledComponent<CheckboxProps & import("react").RefAttributes<HTMLLabelElement> & {
|
|
25
26
|
theme?: import("@emotion/react").Theme;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import styled from "@emotion/styled";
|
|
3
|
-
import { useEffect, useState } from "react";
|
|
4
3
|
import { Checkbox } from "react-aria-components";
|
|
5
4
|
import icons_Checkbox from "../assets/icons/Checkbox.js";
|
|
6
5
|
import CheckboxOff from "../assets/icons/CheckboxOff.js";
|
|
@@ -9,33 +8,26 @@ import { ControlLabel } from "./FormControl.js";
|
|
|
9
8
|
import { marginProps } from "./helpers/styledProps.js";
|
|
10
9
|
import Icon from "./Icon/index.js";
|
|
11
10
|
const Checkbox_Checkbox = ({ label, labelPosition, checked, partial, disabled, readOnly, onChange, ...props })=>{
|
|
12
|
-
const [on, setOn] = useState(checked || false);
|
|
13
11
|
const labelRight = 'right' === labelPosition;
|
|
14
|
-
const
|
|
15
|
-
const value = partial ? true : !on;
|
|
16
|
-
setOn(value);
|
|
17
|
-
if (onChange) onChange(value);
|
|
18
|
-
};
|
|
19
|
-
useEffect(()=>{
|
|
20
|
-
const checkedSet = 'boolean' == typeof checked;
|
|
21
|
-
const value = checkedSet ? checked : on;
|
|
22
|
-
setOn(value);
|
|
23
|
-
}, [
|
|
24
|
-
checked,
|
|
25
|
-
on
|
|
26
|
-
]);
|
|
12
|
+
const isControlled = 'boolean' == typeof checked;
|
|
27
13
|
return /*#__PURE__*/ jsx(ControlContainer, {
|
|
28
14
|
labelRight: labelRight,
|
|
29
|
-
|
|
30
|
-
|
|
15
|
+
...isControlled ? {
|
|
16
|
+
isSelected: checked
|
|
17
|
+
} : {},
|
|
18
|
+
...true === partial ? {
|
|
19
|
+
isIndeterminate: true
|
|
20
|
+
} : {},
|
|
31
21
|
isDisabled: disabled,
|
|
32
22
|
isReadOnly: readOnly,
|
|
33
|
-
onChange:
|
|
23
|
+
onChange: onChange,
|
|
34
24
|
...props,
|
|
35
25
|
children: ({ isIndeterminate, isSelected })=>{
|
|
26
|
+
const isChecked = isSelected;
|
|
27
|
+
const isPartial = partial || isIndeterminate;
|
|
36
28
|
let svg = /*#__PURE__*/ jsx(CheckboxOff, {});
|
|
37
|
-
if (
|
|
38
|
-
else if (
|
|
29
|
+
if (isPartial) svg = /*#__PURE__*/ jsx(CheckboxPartial, {});
|
|
30
|
+
else if (isChecked) svg = /*#__PURE__*/ jsx(icons_Checkbox, {});
|
|
39
31
|
return /*#__PURE__*/ jsxs(Fragment, {
|
|
40
32
|
children: [
|
|
41
33
|
label && /*#__PURE__*/ jsx(ControlLabel, {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ComboBoxProps } from './typeDefs/reactAriaTypes';
|
|
2
2
|
import type { OpenStateProps, SelectInputProps } from './typeDefs/selectionTypes';
|
|
3
3
|
type Props = {
|
|
4
4
|
/** Use when loading options asynchronously with onTextChange */
|
|
@@ -8,7 +8,7 @@ type Props = {
|
|
|
8
8
|
/** The function to be called when the input text does not match any options */
|
|
9
9
|
onCreate?: (text: string) => void;
|
|
10
10
|
ref?: React.Ref<HTMLInputElement>;
|
|
11
|
-
} & SelectInputProps & OpenStateProps &
|
|
11
|
+
} & SelectInputProps & OpenStateProps & ComboBoxProps;
|
|
12
12
|
declare const _default: (({ backgroundColor, menuBackground, children, fontSize, disabled, invalid, required, readOnly, loading, loadingResults, label, options, placeholder, placeholderColor, description, errorMessage, textOnly, value, defaultValue, width, height, maxHeight, iconLeft, leftElement, rightElement, allowRepeatSelection, allowsEmptyCollection, position, fixedPosition, open, onOpenChange, before, after, onChange, onCreate, afterShow, afterHide, onTextChange, ref, ...props }: Props) => import("react/jsx-runtime").JSX.Element) & {
|
|
13
13
|
Item: ({ id, value, header, body, leftElement, rightElement, inline, disabled, ...props }: import("..").SelectItem & Omit<import("react-aria-components").ListBoxItemProps<object>, "id" | "value" | "isDisabled">) => import("react/jsx-runtime").JSX.Element;
|
|
14
14
|
Section: ({ id, title, children }: {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { type ReactElement, type ReactNode } from 'react';
|
|
2
|
-
import { type
|
|
2
|
+
import { type ButtonProps } from 'react-aria-components';
|
|
3
|
+
import type { DropdownMenuProps } from './typeDefs/reactAriaTypes';
|
|
3
4
|
import type { ListOption, OpenStateProps, SelectInputProps } from './typeDefs/selectionTypes';
|
|
4
5
|
import type { ThemeProp } from './types';
|
|
5
6
|
type SelectProps = Pick<SelectInputProps, 'children' | 'afterShow' | 'afterHide' | 'position' | 'fixedPosition' | 'before' | 'after' | 'menuBackground'>;
|
|
6
|
-
type MenuProps = Omit<AriaMenuProps<ListOption>, 'selectionMode' | 'selectedKeys' | 'onSelectionChange'>;
|
|
7
7
|
type NoSelection = {
|
|
8
8
|
selectionMode?: never;
|
|
9
9
|
selectedKeys?: never;
|
|
@@ -23,7 +23,7 @@ type MultiSelection = {
|
|
|
23
23
|
onSelectionChange?: (items: 'all' | string[]) => void;
|
|
24
24
|
};
|
|
25
25
|
type SelectionProps = NoSelection | SingleSelection | MultiSelection;
|
|
26
|
-
type
|
|
26
|
+
type Props = {
|
|
27
27
|
/** The options to be displayed in the menu */
|
|
28
28
|
options?: ListOption[];
|
|
29
29
|
/** The element that will trigger the opening of the menu */
|
|
@@ -36,9 +36,9 @@ type DropdownMenuProps = {
|
|
|
36
36
|
offset?: number;
|
|
37
37
|
/** Opens the menu on right-click instead of left-click */
|
|
38
38
|
triggerOnContextMenu?: boolean;
|
|
39
|
-
} & SelectProps &
|
|
39
|
+
} & SelectProps & DropdownMenuProps & SelectionProps & OpenStateProps;
|
|
40
40
|
declare const DropdownMenu: {
|
|
41
|
-
({ children, position, fixedPosition, trigger, isTriggerButton, triggerProps, triggerOnContextMenu, menuBackground, options, offset, selectionMode, selectedKeys, before, after, open, afterShow, afterHide, onSelectionChange, onOpenChange, ...props }:
|
|
41
|
+
({ children, position, fixedPosition, trigger, isTriggerButton, triggerProps, triggerOnContextMenu, menuBackground, options, offset, selectionMode, selectedKeys, before, after, open, afterShow, afterHide, onSelectionChange, onOpenChange, ...props }: Props): import("react/jsx-runtime").JSX.Element;
|
|
42
42
|
Item: {
|
|
43
43
|
({ id, value, children, header, body, leftElement, rightElement, inline, disabled, checkbox, onClick, ...props }: import("./DropdownMenuParts/MenuItem").Props): import("react/jsx-runtime").JSX.Element;
|
|
44
44
|
displayName: string;
|
|
@@ -40,8 +40,10 @@ declare const Form: {
|
|
|
40
40
|
checked?: boolean;
|
|
41
41
|
partial?: boolean;
|
|
42
42
|
gap?: number;
|
|
43
|
-
onChange?: (
|
|
44
|
-
|
|
43
|
+
onChange?: import("react-aria-components").CheckboxProps["onChange"];
|
|
44
|
+
className?: import("react-aria-components").CheckboxProps["className"];
|
|
45
|
+
style?: import("react-aria-components").CheckboxProps["style"];
|
|
46
|
+
} & Margin & Omit<import("react-aria-components").CheckboxProps, "value" | "isDisabled" | "isIndeterminate" | "isSelected" | "isReadOnly">) => import("react/jsx-runtime").JSX.Element;
|
|
45
47
|
Label: ({ children, iconLeft, iconRight, disabled, pill, ...rest }: {
|
|
46
48
|
children?: ReactNode;
|
|
47
49
|
iconLeft?: import("./helpers/getIcon").IconType;
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import { type DatePickerProps, type DateValue } from 'react-aria-components';
|
|
2
2
|
import type { DateInputProps } from '../typeDefs/selectionTypes';
|
|
3
|
-
type PickerProps =
|
|
3
|
+
type PickerProps = Pick<DatePickerProps<DateValue>, 'autoFocus' | 'firstDayOfWeek' | 'className' | 'style'>;
|
|
4
4
|
type Props = {
|
|
5
5
|
value?: Date;
|
|
6
6
|
onChange: (date: Date) => void;
|
|
7
7
|
ref?: React.Ref<HTMLInputElement>;
|
|
8
|
+
autoFocus?: PickerProps['autoFocus'];
|
|
9
|
+
firstDayOfWeek?: PickerProps['firstDayOfWeek'];
|
|
10
|
+
className?: PickerProps['className'];
|
|
11
|
+
style?: PickerProps['style'];
|
|
8
12
|
} & DateInputProps & PickerProps;
|
|
9
13
|
declare const DatePicker: ({ value, label, iconLeft, iconRight, loading, fontSize, placeholderColor, disabled, readOnly, invalid, required, description, errorMessage, preventPast, preventFuture, hidePicker, onChange, afterShow, afterHide, ref, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
10
14
|
export default DatePicker;
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import { type DateRangePickerProps, type DateValue } from 'react-aria-components';
|
|
2
2
|
import type { DateInputProps } from '../typeDefs/selectionTypes';
|
|
3
|
-
type PickerProps =
|
|
3
|
+
type PickerProps = Pick<DateRangePickerProps<DateValue>, 'autoFocus' | 'firstDayOfWeek' | 'className' | 'style'>;
|
|
4
4
|
type Props = {
|
|
5
5
|
startValue?: Date;
|
|
6
6
|
endValue?: Date;
|
|
7
7
|
onChange: (start: Date, end: Date) => void;
|
|
8
8
|
ref?: React.Ref<HTMLInputElement>;
|
|
9
|
+
autoFocus?: PickerProps['autoFocus'];
|
|
10
|
+
firstDayOfWeek?: PickerProps['firstDayOfWeek'];
|
|
11
|
+
className?: PickerProps['className'];
|
|
12
|
+
style?: PickerProps['style'];
|
|
9
13
|
} & DateInputProps & PickerProps;
|
|
10
14
|
declare const DateRangePicker: ({ startValue, endValue, label, iconLeft, iconRight, loading, fontSize, placeholderColor, disabled, readOnly, invalid, required, description, errorMessage, preventPast, preventFuture, hidePicker, onChange, afterShow, afterHide, ref, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
11
15
|
export default DateRangePicker;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { type NumberFieldProps } from 'react-aria-components';
|
|
2
1
|
import type { InputProps } from '../typeDefs/inputTypes';
|
|
2
|
+
import type { NumberFieldProps } from '../typeDefs/reactAriaTypes';
|
|
3
3
|
type Props = {
|
|
4
4
|
/** Hides the increment/decrement arrow controls */
|
|
5
5
|
hideControls?: boolean;
|
|
6
6
|
/** Display a comma separator for large numbers (default true) */
|
|
7
7
|
separator?: boolean;
|
|
8
|
-
} & InputProps &
|
|
8
|
+
} & InputProps & NumberFieldProps;
|
|
9
9
|
declare const NumberInput: ({ value, label, placeholder, iconLeft, iconRight, loading, fontSize, placeholderColor, disabled, readOnly, invalid, required, description, errorMessage, hideControls, separator, onChange, ref, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
export default NumberInput;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { type TextFieldProps } from 'react-aria-components';
|
|
2
1
|
import type { InputProps } from '../typeDefs/inputTypes';
|
|
2
|
+
import type { TextFieldProps } from '../typeDefs/reactAriaTypes';
|
|
3
3
|
type Props = {
|
|
4
4
|
onChange?: (formatted: string, raw: string) => void;
|
|
5
|
-
} & InputProps & Omit<TextFieldProps, '
|
|
5
|
+
} & InputProps & Omit<TextFieldProps, 'onChange'>;
|
|
6
6
|
declare const PhoneInput: ({ value, label, placeholder, iconLeft, iconRight, leftElement, rightElement, loading, fontSize, placeholderColor, disabled, readOnly, invalid, required, description, errorMessage, onChange, ref, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
export default PhoneInput;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type SearchFieldProps } from 'react-aria-components';
|
|
2
1
|
import type { InputProps, TextInputProps } from '../typeDefs/inputTypes';
|
|
3
|
-
type
|
|
2
|
+
import type { SearchFieldProps } from '../typeDefs/reactAriaTypes';
|
|
3
|
+
type Props = TextInputProps & InputProps & SearchFieldProps;
|
|
4
4
|
declare const SearchInput: ({ value, label, placeholder, iconLeft, iconRight, leftElement, rightElement, loading, fontSize, placeholderColor, disabled, readOnly, invalid, required, description, errorMessage, accepts, onChange, onInput, ref, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
export default SearchInput;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { type TextFieldProps } from 'react-aria-components';
|
|
2
1
|
import type { InputProps, TextAreaProps } from '../typeDefs/inputTypes';
|
|
3
|
-
type
|
|
4
|
-
|
|
5
|
-
};
|
|
2
|
+
import type { TextFieldProps } from '../typeDefs/reactAriaTypes';
|
|
3
|
+
type Props = TextAreaProps & InputProps & TextFieldProps;
|
|
6
4
|
declare const TextAreaComponent: ({ value, label, placeholder, iconLeft, iconRight, loading, fontSize, placeholderColor, disabled, readOnly, invalid, required, description, errorMessage, accepts, asTrigger, height, maxHeight, onChange, onInput, ref, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
7
5
|
export default TextAreaComponent;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { type TextFieldProps } from 'react-aria-components';
|
|
2
1
|
import type { InputProps, TextInputProps } from '../typeDefs/inputTypes';
|
|
3
|
-
type
|
|
4
|
-
|
|
5
|
-
};
|
|
2
|
+
import type { TextFieldProps } from '../typeDefs/reactAriaTypes';
|
|
3
|
+
type Props = TextFieldProps & TextInputProps & InputProps;
|
|
6
4
|
declare const TextInput: ({ value, label, placeholder, iconLeft, iconRight, leftElement, rightElement, loading, fontSize, placeholderColor, disabled, readOnly, invalid, required, description, errorMessage, accepts, asTrigger, onChange, onInput, ref, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
7
5
|
export default TextInput;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { type TimeFieldProps, type TimeValue } from 'react-aria-components';
|
|
2
1
|
import type { InputProps } from '../typeDefs/inputTypes';
|
|
3
|
-
type
|
|
2
|
+
import type { TimeFieldProps } from '../typeDefs/reactAriaTypes';
|
|
4
3
|
type Props = {
|
|
5
4
|
value?: string;
|
|
6
5
|
onChange: (time: string) => void;
|
|
7
|
-
} & InputProps &
|
|
6
|
+
} & InputProps & TimeFieldProps;
|
|
8
7
|
declare const TimeInput: ({ value, label, iconLeft, iconRight, loading, fontSize, placeholderColor, disabled, readOnly, invalid, required, description, errorMessage, onChange, ref, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
9
8
|
export default TimeInput;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { type CSSProperties, type ReactNode, type RefObject } from 'react';
|
|
2
2
|
import { type HeadingProps } from 'react-aria-components';
|
|
3
|
-
import type { ThemeProp } from '../theme';
|
|
4
3
|
import type { Attributes } from './typeDefs/elementTypes';
|
|
5
4
|
import type { FlexPosition, Height, Margin, MaxWidthHeight, MinWidthHeight, Padding, PositionType, WidthHeight } from './types';
|
|
6
5
|
type ModalContainerAttributes = Attributes<HTMLDivElement>;
|
|
@@ -58,27 +57,42 @@ type ModalProps = {
|
|
|
58
57
|
declare const Modal: {
|
|
59
58
|
({ children, visible, width, height, onClose, closeIcon, preventOverlayClose, overlayBlur, overlayColor, backgroundColor, small, noOverlay, inert, drawer, drawerDirection, scopeRef, centerX, centerY, position, top, bottom, right, left, zIndex, ...props }: ModalProps): import("react/jsx-runtime").JSX.Element;
|
|
60
59
|
Header: {
|
|
61
|
-
({ children, ...props }:
|
|
60
|
+
({ children, ...props }: HeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
62
61
|
displayName: string;
|
|
63
62
|
};
|
|
64
|
-
Text:
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
63
|
+
Text: {
|
|
64
|
+
({ children, ...props }: TextProps): import("react/jsx-runtime").JSX.Element;
|
|
65
|
+
displayName: string;
|
|
66
|
+
};
|
|
67
|
+
Body: {
|
|
68
|
+
({ children, ...props }: BodyProps): import("react/jsx-runtime").JSX.Element;
|
|
69
|
+
displayName: string;
|
|
70
|
+
};
|
|
71
|
+
Footer: {
|
|
72
|
+
({ children, ...props }: FooterProps): import("react/jsx-runtime").JSX.Element;
|
|
73
|
+
displayName: string;
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
type HeaderProps = {
|
|
77
|
+
className?: HeadingProps['className'];
|
|
78
|
+
style?: HeadingProps['style'];
|
|
79
|
+
} & HeadingProps;
|
|
80
|
+
type TextProps = {
|
|
81
|
+
children: ReactNode;
|
|
82
|
+
primary?: boolean;
|
|
83
|
+
fontSize?: number | string;
|
|
84
|
+
className?: string;
|
|
85
|
+
style?: CSSProperties;
|
|
83
86
|
};
|
|
87
|
+
type BodyProps = {
|
|
88
|
+
children: ReactNode;
|
|
89
|
+
className?: string;
|
|
90
|
+
style?: CSSProperties;
|
|
91
|
+
} & Height & Margin;
|
|
92
|
+
type FooterProps = {
|
|
93
|
+
children: ReactNode;
|
|
94
|
+
justify?: FlexPosition;
|
|
95
|
+
inline?: boolean;
|
|
96
|
+
gap?: number | string;
|
|
97
|
+
} & Margin;
|
|
84
98
|
export default Modal;
|
|
@@ -88,15 +88,27 @@ const ModalHeader = styled(Heading)(({ theme })=>({
|
|
|
88
88
|
margin: 0,
|
|
89
89
|
marginBottom: 8
|
|
90
90
|
}));
|
|
91
|
-
const Text =
|
|
91
|
+
const Text = ({ children, ...props })=>/*#__PURE__*/ jsx(ModalText, {
|
|
92
|
+
...props,
|
|
93
|
+
children: children
|
|
94
|
+
});
|
|
95
|
+
const ModalText = styled.div(({ theme, primary, fontSize })=>({
|
|
92
96
|
color: primary ? theme.modal.color.header : theme.modal.color.body,
|
|
93
97
|
fontSize: fontSize || theme.font.size.lg
|
|
94
98
|
}));
|
|
95
|
-
const Body =
|
|
99
|
+
const Body = ({ children, ...props })=>/*#__PURE__*/ jsx(ModalBody, {
|
|
100
|
+
...props,
|
|
101
|
+
children: children
|
|
102
|
+
});
|
|
103
|
+
const ModalBody = styled.div(({ height })=>({
|
|
96
104
|
height,
|
|
97
105
|
overflow: height ? 'auto' : void 0
|
|
98
106
|
}), marginProps);
|
|
99
|
-
const Footer =
|
|
107
|
+
const Footer = ({ children, ...props })=>/*#__PURE__*/ jsx(ModalFooter, {
|
|
108
|
+
...props,
|
|
109
|
+
children: children
|
|
110
|
+
});
|
|
111
|
+
const ModalFooter = styled.div(({ justify = 'end', inline, gap })=>{
|
|
100
112
|
const justifyOptions = {
|
|
101
113
|
start: 'flex-start',
|
|
102
114
|
end: 'flex-end',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ComboBoxProps } from '../typeDefs/reactAriaTypes';
|
|
2
2
|
import type { MultiSelectItem, MultiSelectOption, SelectInputProps } from '../typeDefs/selectionTypes';
|
|
3
3
|
import type { TagItem } from '../typeDefs/tagTypes';
|
|
4
4
|
type Props = {
|
|
@@ -12,6 +12,6 @@ type Props = {
|
|
|
12
12
|
onTextChange?: (text: string) => void;
|
|
13
13
|
onValidChange?: (valid: boolean) => void;
|
|
14
14
|
ref?: React.Ref<HTMLInputElement>;
|
|
15
|
-
} & Omit<SelectInputProps, 'options'> &
|
|
15
|
+
} & Omit<SelectInputProps, 'options'> & ComboBoxProps;
|
|
16
16
|
declare const SearchDropdown: ({ options, items, triggerRef, placeholder, placeholderColor, fontSize, position, fixedPosition, maxHeight, disabled, accepts, addItem, removeItem, afterShow, afterHide, onTextChange, onValidChange, ref, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
17
17
|
export default SearchDropdown;
|
|
@@ -9,8 +9,18 @@ type Props = {
|
|
|
9
9
|
isTriggerButton?: boolean;
|
|
10
10
|
/** Props to pass to the trigger's container (unless isTriggerButton is true) */
|
|
11
11
|
triggerProps?: ButtonProps;
|
|
12
|
-
|
|
13
|
-
offset?:
|
|
14
|
-
|
|
12
|
+
children?: PopoverProps['children'];
|
|
13
|
+
offset?: PopoverProps['offset'];
|
|
14
|
+
crossOffset?: PopoverProps['crossOffset'];
|
|
15
|
+
isNonModal?: PopoverProps['isNonModal'];
|
|
16
|
+
isKeyboardDismissDisabled?: PopoverProps['isKeyboardDismissDisabled'];
|
|
17
|
+
shouldCloseOnInteractOutside?: PopoverProps['shouldCloseOnInteractOutside'];
|
|
18
|
+
boundaryElement?: PopoverProps['boundaryElement'];
|
|
19
|
+
scrollRef?: PopoverProps['scrollRef'];
|
|
20
|
+
shouldUpdatePosition?: PopoverProps['shouldUpdatePosition'];
|
|
21
|
+
defaultOpen?: PopoverProps['defaultOpen'];
|
|
22
|
+
className?: PopoverProps['className'];
|
|
23
|
+
style?: PopoverProps['style'];
|
|
24
|
+
} & Omit<PopoverProps, 'trigger' | 'placement' | 'isOpen' | 'onOpenChange' | 'shouldFlip'> & SelectProps & OpenStateProps;
|
|
15
25
|
declare const Popover: ({ children, position, fixedPosition, trigger, isTriggerButton, triggerProps, offset, afterShow, afterHide, open, onOpenChange, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
16
26
|
export default Popover;
|
|
@@ -8,6 +8,9 @@ type Props = {
|
|
|
8
8
|
endDate?: Date;
|
|
9
9
|
/** The function to be called when a date range is selected */
|
|
10
10
|
onChange: (start: Date, end: Date) => void;
|
|
11
|
-
|
|
11
|
+
firstDayOfWeek?: RangeCalendarProps<CalendarDate>['firstDayOfWeek'];
|
|
12
|
+
className?: RangeCalendarProps<CalendarDate>['className'];
|
|
13
|
+
style?: RangeCalendarProps<CalendarDate>['style'];
|
|
14
|
+
} & CalendarBaseProps & Pick<RangeCalendarProps<CalendarDate>, 'firstDayOfWeek' | 'className' | 'style'>;
|
|
12
15
|
declare const RangeCalendar: ({ startDate, endDate, onChange, preventPast, preventFuture, noShadow, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
13
16
|
export default RangeCalendar;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type { OpenStateProps, SelectInputProps
|
|
3
|
-
type Props =
|
|
1
|
+
import type { SelectProps } from './typeDefs/reactAriaTypes';
|
|
2
|
+
import type { OpenStateProps, SelectInputProps } from './typeDefs/selectionTypes';
|
|
3
|
+
type Props = {
|
|
4
4
|
ref?: React.Ref<HTMLButtonElement>;
|
|
5
|
-
} &
|
|
5
|
+
} & SelectInputProps & OpenStateProps & SelectProps;
|
|
6
6
|
declare const _default: (({ backgroundColor, menuBackground, children, fontSize, fontWeight, color, disabled, invalid, required, readOnly, loading, label, options, placeholder, placeholderColor, description, errorMessage, textOnly, value, defaultValue, width, height, maxHeight, allowRepeatSelection, hideCaret, position, fixedPosition, borderRadius, iconLeft, leftElement, rightElement, before, after, open, onOpenChange, onChange, afterShow, afterHide, ref, ...props }: Props) => import("react/jsx-runtime").JSX.Element) & {
|
|
7
|
-
Item: ({ id, value, header, body, leftElement, rightElement, inline, disabled, ...props }: SelectItem & Omit<import("react-aria-components").ListBoxItemProps<object>, "id" | "value" | "isDisabled">) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
Item: ({ id, value, header, body, leftElement, rightElement, inline, disabled, ...props }: import("..").SelectItem & Omit<import("react-aria-components").ListBoxItemProps<object>, "id" | "value" | "isDisabled">) => import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
Section: ({ id, title, children }: {
|
|
9
9
|
id?: string;
|
|
10
10
|
title?: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
-
import { type TableLoadMoreItemProps } from 'react-aria-components';
|
|
2
|
+
import { type TableBodyProps, type TableLoadMoreItemProps } from 'react-aria-components';
|
|
3
3
|
type Props = {
|
|
4
4
|
children?: ReactNode;
|
|
5
5
|
/** The function to be called when the end of a scrolling async table has been reached */
|
|
@@ -10,7 +10,9 @@ type Props = {
|
|
|
10
10
|
loading?: boolean;
|
|
11
11
|
/** If true, shows a loading spinner at the bottom of the body */
|
|
12
12
|
fetching?: boolean;
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
scrollOffset?: TableLoadMoreItemProps['scrollOffset'];
|
|
14
|
+
className?: TableBodyProps<unknown>['className'];
|
|
15
|
+
style?: TableBodyProps<unknown>['style'];
|
|
16
|
+
} & Pick<TableLoadMoreItemProps, 'scrollOffset'> & Pick<TableBodyProps<unknown>, 'className' | 'style'>;
|
|
15
17
|
declare const Body: ({ children, emptyFallback, fetching, loading, scrollOffset, onLoadMore, ...rest }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
16
18
|
export default Body;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
2
|
import { type CellProps } from 'react-aria-components';
|
|
3
|
-
import type { Padding } from '../types';
|
|
4
3
|
import { type ContentProps } from './contentStyles';
|
|
5
4
|
type Props = {
|
|
6
5
|
children?: ReactNode;
|
|
@@ -8,6 +7,10 @@ type Props = {
|
|
|
8
7
|
defaultValue?: string;
|
|
9
8
|
/** Number of lines to clamp */
|
|
10
9
|
clampLines?: number;
|
|
11
|
-
|
|
10
|
+
textValue?: CellProps['textValue'];
|
|
11
|
+
colSpan?: CellProps['colSpan'];
|
|
12
|
+
className?: CellProps['className'];
|
|
13
|
+
style?: CellProps['style'];
|
|
14
|
+
} & ContentProps & Omit<CellProps, 'children'>;
|
|
12
15
|
declare const Cell: ({ children, defaultValue, direction, justify, align, gap, clampLines, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
13
16
|
export default Cell;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { type MouseEvent, type ReactNode } from 'react';
|
|
2
2
|
import { type ColumnProps } from 'react-aria-components';
|
|
3
|
-
import type { Padding } from '../types';
|
|
4
3
|
import { type ContentProps } from './contentStyles';
|
|
5
4
|
import type { SortDir } from './types';
|
|
6
5
|
type Props = {
|
|
@@ -12,6 +11,14 @@ type Props = {
|
|
|
12
11
|
sorted?: SortDir;
|
|
13
12
|
/** The property of the data object to sort by */
|
|
14
13
|
sortKey?: string;
|
|
15
|
-
|
|
14
|
+
isRowHeader?: ColumnProps['isRowHeader'];
|
|
15
|
+
textValue?: ColumnProps['textValue'];
|
|
16
|
+
width?: ColumnProps['width'];
|
|
17
|
+
minWidth?: ColumnProps['minWidth'];
|
|
18
|
+
maxWidth?: ColumnProps['maxWidth'];
|
|
19
|
+
defaultWidth?: ColumnProps['defaultWidth'];
|
|
20
|
+
className?: ColumnProps['className'];
|
|
21
|
+
style?: ColumnProps['style'];
|
|
22
|
+
} & ContentProps & Omit<ColumnProps, 'children' | 'allowsSorting'>;
|
|
16
23
|
declare const Column: ({ children, sortKey, sorted, onClick, resize, direction, justify, align, gap, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
17
24
|
export default Column;
|
|
@@ -2,8 +2,8 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import styled from "@emotion/styled";
|
|
3
3
|
import { useContext, useEffect } from "react";
|
|
4
4
|
import { TableHeader } from "react-aria-components";
|
|
5
|
+
import Checkbox from "../Checkbox.js";
|
|
5
6
|
import mergePadding from "../helpers/mergePadding.js";
|
|
6
|
-
import Check from "./Check.js";
|
|
7
7
|
import Column from "./Column.js";
|
|
8
8
|
import context from "./context.js";
|
|
9
9
|
const Header = ({ children, backgroundColor, padding, paddingTop, paddingRight, paddingBottom, paddingLeft, ...rest })=>{
|
|
@@ -32,7 +32,7 @@ const Header = ({ children, backgroundColor, padding, paddingTop, paddingRight,
|
|
|
32
32
|
children: [
|
|
33
33
|
/*#__PURE__*/ jsx(Column, {
|
|
34
34
|
width: 70,
|
|
35
|
-
children: 'multiple' === selectionMode && /*#__PURE__*/ jsx(
|
|
35
|
+
children: 'multiple' === selectionMode && /*#__PURE__*/ jsx(Checkbox, {
|
|
36
36
|
slot: "selection"
|
|
37
37
|
})
|
|
38
38
|
}),
|
|
@@ -2,9 +2,9 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import styled from "@emotion/styled";
|
|
3
3
|
import { useContext, useEffect } from "react";
|
|
4
4
|
import { Row } from "react-aria-components";
|
|
5
|
+
import Checkbox from "../Checkbox.js";
|
|
5
6
|
import mergePadding from "../helpers/mergePadding.js";
|
|
6
7
|
import Cell from "./Cell.js";
|
|
7
|
-
import Check from "./Check.js";
|
|
8
8
|
import context from "./context.js";
|
|
9
9
|
const Row_Row = ({ children, onClick, disabled, padding, paddingTop, paddingRight, paddingBottom, paddingLeft, ...rest })=>{
|
|
10
10
|
const { setRowPadding, selectionMode } = useContext(context);
|
|
@@ -31,7 +31,7 @@ const Row_Row = ({ children, onClick, disabled, padding, paddingTop, paddingRigh
|
|
|
31
31
|
const cellsToRender = selectionMode ? /*#__PURE__*/ jsxs(Fragment, {
|
|
32
32
|
children: [
|
|
33
33
|
/*#__PURE__*/ jsx(Cell, {
|
|
34
|
-
children: /*#__PURE__*/ jsx(
|
|
34
|
+
children: /*#__PURE__*/ jsx(Checkbox, {
|
|
35
35
|
slot: "selection"
|
|
36
36
|
})
|
|
37
37
|
}),
|
|
@@ -9,7 +9,20 @@ type Props<T> = {
|
|
|
9
9
|
backgroundLevel?: 0 | 1 | 2 | 3 | 4 | 5;
|
|
10
10
|
/** Enabled Table.Columns to be resizable (using the `resize` prop) */
|
|
11
11
|
resizable?: boolean;
|
|
12
|
-
|
|
12
|
+
disabledBehavior?: TableProps['disabledBehavior'];
|
|
13
|
+
disabledKeys?: TableProps['disabledKeys'];
|
|
14
|
+
selectionMode?: TableProps['selectionMode'];
|
|
15
|
+
selectionBehavior?: TableProps['selectionBehavior'];
|
|
16
|
+
disallowEmptySelection?: TableProps['disallowEmptySelection'];
|
|
17
|
+
escapeKeyBehavior?: TableProps['escapeKeyBehavior'];
|
|
18
|
+
selectedKeys?: TableProps['selectedKeys'];
|
|
19
|
+
defaultSelectedKeys?: TableProps['defaultSelectedKeys'];
|
|
20
|
+
shouldSelectOnPressUp?: TableProps['shouldSelectOnPressUp'];
|
|
21
|
+
className?: TableProps['className'];
|
|
22
|
+
style?: TableProps['style'];
|
|
23
|
+
onRowAction?: TableProps['onRowAction'];
|
|
24
|
+
onSelectionChange?: TableProps['onSelectionChange'];
|
|
25
|
+
} & TableChildren<T> & MarginPadding & MaxHeight & Omit<TableProps, 'children' | 'sortDescriptor' | 'onSortChange' | 'onScroll' | 'dragAndDropHooks'>;
|
|
13
26
|
declare const Table: {
|
|
14
27
|
<DataType extends Data>({ children, data, backgroundColor, backgroundLevel, maxHeight, resizable, selectionMode, ...props }: Props<DataType>): import("react/jsx-runtime").JSX.Element;
|
|
15
28
|
Header: ({ children, backgroundColor, padding, paddingTop, paddingRight, paddingBottom, paddingLeft, ...rest }: {
|
|
@@ -23,20 +36,30 @@ declare const Table: {
|
|
|
23
36
|
onClick?: (event: import("react").MouseEvent) => void;
|
|
24
37
|
sorted?: import("./types").SortDir;
|
|
25
38
|
sortKey?: string;
|
|
26
|
-
|
|
39
|
+
isRowHeader?: import("react-aria-components").ColumnProps["isRowHeader"];
|
|
40
|
+
textValue?: import("react-aria-components").ColumnProps["textValue"];
|
|
41
|
+
width?: import("react-aria-components").ColumnProps["width"];
|
|
42
|
+
minWidth?: import("react-aria-components").ColumnProps["minWidth"];
|
|
43
|
+
maxWidth?: import("react-aria-components").ColumnProps["maxWidth"];
|
|
44
|
+
defaultWidth?: import("react-aria-components").ColumnProps["defaultWidth"];
|
|
45
|
+
className?: import("react-aria-components").ColumnProps["className"];
|
|
46
|
+
style?: import("react-aria-components").ColumnProps["style"];
|
|
47
|
+
} & {
|
|
27
48
|
direction?: import("../types").FlexDirection;
|
|
28
49
|
justify?: import("../types").FlexPosition;
|
|
29
50
|
align?: import("../types").FlexPosition;
|
|
30
51
|
gap?: number | string;
|
|
31
|
-
} & Omit<import("react-aria-components").ColumnProps, "children" | "allowsSorting">) => import("react/jsx-runtime").JSX.Element;
|
|
52
|
+
} & Padding & Omit<import("react-aria-components").ColumnProps, "children" | "allowsSorting">) => import("react/jsx-runtime").JSX.Element;
|
|
32
53
|
Body: ({ children, emptyFallback, fetching, loading, scrollOffset, onLoadMore, ...rest }: {
|
|
33
54
|
children?: ReactNode;
|
|
34
55
|
onLoadMore?: () => void;
|
|
35
56
|
emptyFallback?: ReactNode;
|
|
36
57
|
loading?: boolean;
|
|
37
58
|
fetching?: boolean;
|
|
38
|
-
|
|
39
|
-
|
|
59
|
+
scrollOffset?: import("react-aria-components").TableLoadMoreItemProps["scrollOffset"];
|
|
60
|
+
className?: import("react-aria-components").TableBodyProps<unknown>["className"];
|
|
61
|
+
style?: import("react-aria-components").TableBodyProps<unknown>["style"];
|
|
62
|
+
} & Pick<import("react-aria-components").TableLoadMoreItemProps, "scrollOffset"> & Pick<import("react-aria-components").TableBodyProps<unknown>, "className" | "style">) => import("react/jsx-runtime").JSX.Element;
|
|
40
63
|
Row: ({ children, onClick, disabled, padding, paddingTop, paddingRight, paddingBottom, paddingLeft, ...rest }: {
|
|
41
64
|
children: ReactNode;
|
|
42
65
|
id?: string;
|
|
@@ -431,11 +454,15 @@ declare const Table: {
|
|
|
431
454
|
children?: ReactNode;
|
|
432
455
|
defaultValue?: string;
|
|
433
456
|
clampLines?: number;
|
|
434
|
-
|
|
457
|
+
textValue?: import("react-aria-components").CellProps["textValue"];
|
|
458
|
+
colSpan?: import("react-aria-components").CellProps["colSpan"];
|
|
459
|
+
className?: import("react-aria-components").CellProps["className"];
|
|
460
|
+
style?: import("react-aria-components").CellProps["style"];
|
|
461
|
+
} & {
|
|
435
462
|
direction?: import("../types").FlexDirection;
|
|
436
463
|
justify?: import("../types").FlexPosition;
|
|
437
464
|
align?: import("../types").FlexPosition;
|
|
438
465
|
gap?: number | string;
|
|
439
|
-
} & Omit<import("react-aria-components").CellProps, "children">) => import("react/jsx-runtime").JSX.Element;
|
|
466
|
+
} & Padding & Omit<import("react-aria-components").CellProps, "children">) => import("react/jsx-runtime").JSX.Element;
|
|
440
467
|
};
|
|
441
468
|
export default Table;
|
|
@@ -7,7 +7,14 @@ type Props = {
|
|
|
7
7
|
detached?: boolean;
|
|
8
8
|
panelPosition?: 'top' | 'bottom';
|
|
9
9
|
disabled?: boolean;
|
|
10
|
-
|
|
10
|
+
disabledKeys?: TabsProps['disabledKeys'];
|
|
11
|
+
selectedKey?: TabsProps['selectedKey'];
|
|
12
|
+
defaultSelectedKey?: TabsProps['defaultSelectedKey'];
|
|
13
|
+
keyboardActivation?: TabsProps['keyboardActivation'];
|
|
14
|
+
className?: TabsProps['className'];
|
|
15
|
+
style?: TabsProps['style'];
|
|
16
|
+
onSelectionChange?: TabsProps['onSelectionChange'];
|
|
17
|
+
} & Omit<TabsProps, 'children' | 'isDisabled' | 'orientation'> & Margin & WidthHeight & MaxWidthHeight;
|
|
11
18
|
declare const Tabs: {
|
|
12
19
|
({ children, detached, panelPosition, disabled, ...props }: Props): import("react/jsx-runtime").JSX.Element;
|
|
13
20
|
List: {
|
|
@@ -23,12 +30,15 @@ declare const Tabs: {
|
|
|
23
30
|
displayName: string;
|
|
24
31
|
};
|
|
25
32
|
};
|
|
26
|
-
type ListProps =
|
|
33
|
+
type ListProps = {
|
|
27
34
|
/** Controls whether tabs fill the container width or fit to their content */
|
|
28
35
|
tabWidth?: 'fit' | 'fill';
|
|
29
36
|
/** Sets the border radius for the tab items */
|
|
30
37
|
borderRadius?: number;
|
|
31
|
-
|
|
38
|
+
children?: TabListProps<any>['children'];
|
|
39
|
+
className?: TabListProps<any>['className'];
|
|
40
|
+
style?: TabListProps<any>['style'];
|
|
41
|
+
} & Omit<TabListProps<any>, 'items' | 'dependencies'> & Padding;
|
|
32
42
|
export declare const List: {
|
|
33
43
|
({ tabWidth, borderRadius, padding, paddingTop, paddingBottom, paddingRight, paddingLeft, ...props }: ListProps): import("react/jsx-runtime").JSX.Element;
|
|
34
44
|
displayName: string;
|
|
@@ -48,7 +58,13 @@ type ItemProps = {
|
|
|
48
58
|
gap?: string | number;
|
|
49
59
|
/** Disables the tab from being selected */
|
|
50
60
|
disabled?: boolean;
|
|
51
|
-
|
|
61
|
+
className?: TabProps['className'];
|
|
62
|
+
style?: TabProps['style'];
|
|
63
|
+
onPress?: TabProps['onPress'];
|
|
64
|
+
onHoverChange?: TabProps['onHoverChange'];
|
|
65
|
+
onHoverStart?: TabProps['onHoverStart'];
|
|
66
|
+
onHoverEnd?: TabProps['onHoverEnd'];
|
|
67
|
+
} & Omit<TabProps, 'children' | 'isDisabled' | 'id' | 'href' | 'hrefLang' | 'rel' | 'target' | 'download' | 'ping' | 'referrerPolicy' | 'routerOptions' | 'onClick'>;
|
|
52
68
|
export declare const Item: {
|
|
53
69
|
({ children, icon, iconColor, iconPosition, disabled, ...props }: ItemProps): import("react/jsx-runtime").JSX.Element;
|
|
54
70
|
displayName: string;
|
|
@@ -56,6 +72,10 @@ export declare const Item: {
|
|
|
56
72
|
type PanelProps = {
|
|
57
73
|
/** The unique id that matches the id of the tab */
|
|
58
74
|
id: string;
|
|
75
|
+
shouldForceMount?: TabPanelProps['shouldForceMount'];
|
|
76
|
+
children?: TabPanelProps['children'];
|
|
77
|
+
className?: TabPanelProps['className'];
|
|
78
|
+
style?: TabPanelProps['style'];
|
|
59
79
|
} & Omit<TabPanelProps, 'id'>;
|
|
60
80
|
export declare const Panel: {
|
|
61
81
|
(props: PanelProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -24,6 +24,10 @@ type Props = {
|
|
|
24
24
|
iconRight?: IconName;
|
|
25
25
|
/** The border radius of the toggle button */
|
|
26
26
|
borderRadius?: string | number;
|
|
27
|
+
isSelected?: ToggleButtonProps['isSelected'];
|
|
28
|
+
defaultSelected?: ToggleButtonProps['defaultSelected'];
|
|
29
|
+
className?: ToggleButtonProps['className'];
|
|
30
|
+
style?: ToggleButtonProps['style'];
|
|
27
31
|
} & Omit<ToggleButtonProps, 'children' | 'id' | 'isDisabled'> & MarginPadding;
|
|
28
32
|
declare const ToggleButton: ({ children, disabled, size, positive, negative, caution, secondary, iconLeft, iconRight, borderRadius, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
29
33
|
export default ToggleButton;
|
|
@@ -17,6 +17,14 @@ type Props = {
|
|
|
17
17
|
joined?: boolean;
|
|
18
18
|
/** The gap between the toggle buttons */
|
|
19
19
|
gap?: string | number;
|
|
20
|
-
|
|
20
|
+
children?: ToggleButtonGroupProps['children'];
|
|
21
|
+
selectionMode?: ToggleButtonGroupProps['selectionMode'];
|
|
22
|
+
disallowEmptySelection?: ToggleButtonGroupProps['disallowEmptySelection'];
|
|
23
|
+
selectedKeys?: ToggleButtonGroupProps['selectedKeys'];
|
|
24
|
+
defaultSelectedKeys?: ToggleButtonGroupProps['defaultSelectedKeys'];
|
|
25
|
+
className?: ToggleButtonGroupProps['className'];
|
|
26
|
+
style?: ToggleButtonGroupProps['style'];
|
|
27
|
+
onSelectionChange?: ToggleButtonGroupProps['onSelectionChange'];
|
|
28
|
+
} & Omit<ToggleButtonGroupProps, 'isDisabled' | 'orientation'> & MarginPadding & WidthHeight;
|
|
21
29
|
declare const ToggleButtonGroup: ({ disabled, secondary, negative, positive, caution, joined, gap, size, height, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
22
30
|
export default ToggleButtonGroup;
|
|
@@ -2,7 +2,7 @@ import { type ReactNode } from 'react';
|
|
|
2
2
|
import { type TooltipTriggerComponentProps } from 'react-aria-components';
|
|
3
3
|
import type { Attributes } from './typeDefs/elementTypes';
|
|
4
4
|
import type { Placement, ThemeProp } from './types';
|
|
5
|
-
export type
|
|
5
|
+
export type Props = {
|
|
6
6
|
children?: ReactNode;
|
|
7
7
|
/** The element that will trigger the opening of the Tooltip */
|
|
8
8
|
trigger: ReactNode;
|
|
@@ -35,9 +35,12 @@ export type TooltipProps = {
|
|
|
35
35
|
afterShow?: () => void;
|
|
36
36
|
/** The function called after the Tooltip closes */
|
|
37
37
|
afterHide?: () => void;
|
|
38
|
-
|
|
38
|
+
delay?: TooltipTriggerComponentProps['delay'];
|
|
39
|
+
closeDelay?: TooltipTriggerComponentProps['closeDelay'];
|
|
40
|
+
defaultOpen?: TooltipTriggerComponentProps['defaultOpen'];
|
|
41
|
+
} & Pick<TooltipTriggerComponentProps, 'delay' | 'closeDelay' | 'defaultOpen'>;
|
|
39
42
|
declare const Tooltip: {
|
|
40
|
-
({ trigger, triggerProps, children, content, position, offset, zIndex, width, maxWidth, textAlign, open, disabled, bgColor, color, className, afterShow, afterHide, ...props }:
|
|
43
|
+
({ trigger, triggerProps, children, content, position, offset, zIndex, width, maxWidth, textAlign, open, disabled, bgColor, color, className, afterShow, afterHide, ...props }: Props): import("react/jsx-runtime").JSX.Element;
|
|
41
44
|
Header: import("@emotion/styled").StyledComponent<{
|
|
42
45
|
theme?: import("@emotion/react").Theme;
|
|
43
46
|
as?: React.ElementType;
|
|
@@ -7,10 +7,23 @@ type Props = {
|
|
|
7
7
|
selectedKeys?: Set<React.Key>;
|
|
8
8
|
/** Handler that is called when the selection changes */
|
|
9
9
|
onSelectionChange?: (keys: Set<React.Key>) => void;
|
|
10
|
-
|
|
10
|
+
expandedKeys?: TreeProps<object>['expandedKeys'];
|
|
11
|
+
defaultExpandedKeys?: TreeProps<object>['defaultExpandedKeys'];
|
|
12
|
+
renderEmptyState?: TreeProps<object>['renderEmptyState'];
|
|
13
|
+
disabledBehavior?: TreeProps<object>['disabledBehavior'];
|
|
14
|
+
escapeKeyBehavior?: TreeProps<object>['escapeKeyBehavior'];
|
|
15
|
+
autoFocus?: TreeProps<object>['autoFocus'];
|
|
16
|
+
shouldSelectOnPressUp?: TreeProps<object>['shouldSelectOnPressUp'];
|
|
17
|
+
disabledKeys?: TreeProps<object>['disabledKeys'];
|
|
18
|
+
children?: TreeProps<object>['children'];
|
|
19
|
+
className?: TreeProps<object>['className'];
|
|
20
|
+
style?: TreeProps<object>['style'];
|
|
21
|
+
onAction?: TreeProps<object>['onAction'];
|
|
22
|
+
onExpandedChange?: TreeProps<object>['onExpandedChange'];
|
|
23
|
+
} & WidthHeight & Padding & Omit<TreeProps<object>, 'items' | 'selectionMode' | 'selectionBehavior' | 'selectedKeys' | 'onSelectionChange' | 'disallowEmptySelection' | 'dragAndDropHooks' | 'dependencies'>;
|
|
11
24
|
declare const Tree: {
|
|
12
25
|
({ backgroundColor, expandedKeys: expandedKeysProp, onExpandedChange, defaultExpandedKeys, selectedKeys, onSelectionChange, ...props }: Props): import("react/jsx-runtime").JSX.Element;
|
|
13
|
-
Item: ({ children, title, id, iconLeft, iconRight, expandOnSelect, indent, content, ...props }: {
|
|
26
|
+
Item: ({ children, title, id, iconLeft, iconRight, expandOnSelect, indent, content, disabled, ...props }: {
|
|
14
27
|
title: string;
|
|
15
28
|
children?: import("react").ReactNode;
|
|
16
29
|
content?: import("react").ReactNode;
|
|
@@ -18,6 +31,15 @@ declare const Tree: {
|
|
|
18
31
|
iconRight?: import("../helpers/getIcon").IconType;
|
|
19
32
|
expandOnSelect?: boolean;
|
|
20
33
|
indent?: number;
|
|
21
|
-
|
|
34
|
+
disabled?: boolean;
|
|
35
|
+
id?: import("react-aria-components").TreeItemProps<string>["id"];
|
|
36
|
+
className?: import("react-aria-components").TreeItemProps<string>["className"];
|
|
37
|
+
style?: import("react-aria-components").TreeItemProps<string>["style"];
|
|
38
|
+
onAction?: import("react-aria-components").TreeItemProps<string>["onAction"];
|
|
39
|
+
onPress?: import("react-aria-components").TreeItemProps<string>["onPress"];
|
|
40
|
+
onHoverStart?: import("react-aria-components").TreeItemProps<string>["onHoverStart"];
|
|
41
|
+
onHoverEnd?: import("react-aria-components").TreeItemProps<string>["onHoverEnd"];
|
|
42
|
+
onHoverChange?: import("react-aria-components").TreeItemProps<string>["onHoverChange"];
|
|
43
|
+
} & Pick<import("react-aria-components").TreeItemProps<string>, "className" | "style" | "id" | "aria-label" | "onPress" | "onPressStart" | "onPressEnd" | "onPressChange" | "onAction" | "onHoverStart" | "onHoverEnd" | "onHoverChange">) => import("react/jsx-runtime").JSX.Element;
|
|
22
44
|
};
|
|
23
45
|
export default Tree;
|
|
@@ -16,6 +16,15 @@ type ItemProps = {
|
|
|
16
16
|
expandOnSelect?: boolean;
|
|
17
17
|
/** The indentation level of the item (default: 1 === 16px) */
|
|
18
18
|
indent?: number;
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
id?: TreeItemProps<string>['id'];
|
|
21
|
+
className?: TreeItemProps<string>['className'];
|
|
22
|
+
style?: TreeItemProps<string>['style'];
|
|
23
|
+
onAction?: TreeItemProps<string>['onAction'];
|
|
24
|
+
onPress?: TreeItemProps<string>['onPress'];
|
|
25
|
+
onHoverStart?: TreeItemProps<string>['onHoverStart'];
|
|
26
|
+
onHoverEnd?: TreeItemProps<string>['onHoverEnd'];
|
|
27
|
+
onHoverChange?: TreeItemProps<string>['onHoverChange'];
|
|
28
|
+
} & Pick<TreeItemProps<string>, 'id' | 'className' | 'style' | 'onAction' | 'onHoverStart' | 'onHoverEnd' | 'onHoverChange' | 'onPress' | 'onPressStart' | 'onPressEnd' | 'onPressChange' | 'aria-label'>;
|
|
29
|
+
declare const Item: ({ children, title, id, iconLeft, iconRight, expandOnSelect, indent, content, disabled, ...props }: ItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
21
30
|
export default Item;
|
|
@@ -6,12 +6,13 @@ import getIcon from "../helpers/getIcon.js";
|
|
|
6
6
|
import Icon from "../Icon/index.js";
|
|
7
7
|
import AriaButton from "../Inputs/helpers/AriaButton.js";
|
|
8
8
|
import { TreeContext } from "./TreeContext.js";
|
|
9
|
-
const Item = ({ children, title, id, iconLeft, iconRight, expandOnSelect, indent, content, ...props })=>{
|
|
9
|
+
const Item = ({ children, title, id, iconLeft, iconRight, expandOnSelect, indent, content, disabled, ...props })=>{
|
|
10
10
|
const { requestExpand } = useContext(TreeContext);
|
|
11
11
|
return /*#__PURE__*/ jsxs(TreeItemContainer, {
|
|
12
12
|
id: id || title,
|
|
13
13
|
textValue: title,
|
|
14
14
|
indent: indent,
|
|
15
|
+
isDisabled: disabled,
|
|
15
16
|
...expandOnSelect && children ? {
|
|
16
17
|
onPress: ()=>{
|
|
17
18
|
requestExpand?.([
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type ReactElement } from 'react';
|
|
2
2
|
import type { IconName } from '../Icon/Icon';
|
|
3
3
|
import { type IconProps } from '../Icon/Icon';
|
|
4
|
-
import type { TooltipProps } from '../Tooltip';
|
|
4
|
+
import type { Props as TooltipProps } from '../Tooltip';
|
|
5
5
|
export type IconType = IconName | IconProps | ReactElement<IconProps> | ReactElement<TooltipProps>;
|
|
6
6
|
type ReducedIconProps = Omit<IconProps, 'name' | 'svg' | 'external'>;
|
|
7
7
|
declare const getIcon: (icon: IconType, props?: ReducedIconProps) => ReactElement<IconProps | TooltipProps>;
|
|
@@ -48,6 +48,7 @@ export type InputBaseProps = {
|
|
|
48
48
|
export type TextInputProps = {
|
|
49
49
|
/** A regex string, similar to `pattern`, but prevents input outside the pattern */
|
|
50
50
|
accepts?: string;
|
|
51
|
+
asTrigger?: boolean;
|
|
51
52
|
};
|
|
52
53
|
export type TextAreaProps = TextInputProps & {
|
|
53
54
|
/** Maximum height of the textarea. Content will scroll after this height is reached */
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import type { ComboBoxProps as AriaComboBoxProps, MenuProps as AriaMenuProps, SelectProps as AriaSelectProps, NumberFieldProps as NumberProps, SearchFieldProps as SearchProps, TextFieldProps as TextProps, TimeFieldProps as TimeBaseProps, TimeValue } from 'react-aria-components';
|
|
2
|
+
import type { ListOption, SelectItem } from './selectionTypes';
|
|
3
|
+
/** INPUTS */
|
|
4
|
+
type TimeProps = TimeBaseProps<TimeValue>;
|
|
5
|
+
export type TextFieldProps = {
|
|
6
|
+
value?: TextProps['value'];
|
|
7
|
+
defaultValue?: TextProps['defaultValue'];
|
|
8
|
+
enterKeyHint?: TextProps['enterKeyHint'];
|
|
9
|
+
validate?: TextProps['validate'];
|
|
10
|
+
autoFocus?: TextProps['autoFocus'];
|
|
11
|
+
autoComplete?: TextProps['autoComplete'];
|
|
12
|
+
maxLength?: TextProps['maxLength'];
|
|
13
|
+
minLength?: TextProps['minLength'];
|
|
14
|
+
pattern?: TextProps['pattern'];
|
|
15
|
+
type?: TextProps['type'];
|
|
16
|
+
inputMode?: TextProps['inputMode'];
|
|
17
|
+
autoCorrect?: TextProps['autoCorrect'];
|
|
18
|
+
spellCheck?: TextProps['spellCheck'];
|
|
19
|
+
name?: TextProps['name'];
|
|
20
|
+
form?: TextProps['form'];
|
|
21
|
+
validationBehavior?: TextProps['validationBehavior'];
|
|
22
|
+
className?: TextProps['className'];
|
|
23
|
+
style?: TextProps['style'];
|
|
24
|
+
onChange?: TextProps['onChange'];
|
|
25
|
+
onInput?: TextProps['onInput'];
|
|
26
|
+
} & Omit<TextProps, 'isDisabled' | 'isReadOnly' | 'isInvalid' | 'isRequired' | 'children'>;
|
|
27
|
+
export type SearchFieldProps = {
|
|
28
|
+
value?: SearchProps['value'];
|
|
29
|
+
defaultValue?: SearchProps['defaultValue'];
|
|
30
|
+
enterKeyHint?: SearchProps['enterKeyHint'];
|
|
31
|
+
validate?: SearchProps['validate'];
|
|
32
|
+
autoFocus?: SearchProps['autoFocus'];
|
|
33
|
+
autoComplete?: SearchProps['autoComplete'];
|
|
34
|
+
maxLength?: SearchProps['maxLength'];
|
|
35
|
+
minLength?: SearchProps['minLength'];
|
|
36
|
+
pattern?: SearchProps['pattern'];
|
|
37
|
+
type?: SearchProps['type'];
|
|
38
|
+
inputMode?: SearchProps['inputMode'];
|
|
39
|
+
autoCorrect?: SearchProps['autoCorrect'];
|
|
40
|
+
spellCheck?: SearchProps['spellCheck'];
|
|
41
|
+
name?: SearchProps['name'];
|
|
42
|
+
form?: SearchProps['form'];
|
|
43
|
+
validationBehavior?: SearchProps['validationBehavior'];
|
|
44
|
+
className?: SearchProps['className'];
|
|
45
|
+
style?: SearchProps['style'];
|
|
46
|
+
onChange?: SearchProps['onChange'];
|
|
47
|
+
onInput?: SearchProps['onInput'];
|
|
48
|
+
} & Omit<SearchProps, 'isDisabled' | 'isReadOnly' | 'isInvalid' | 'isRequired' | 'children'>;
|
|
49
|
+
export type NumberFieldProps = {
|
|
50
|
+
value?: NumberProps['value'];
|
|
51
|
+
defaultValue?: NumberProps['defaultValue'];
|
|
52
|
+
isWheelDisabled?: NumberProps['isWheelDisabled'];
|
|
53
|
+
formatOptions?: NumberProps['formatOptions'];
|
|
54
|
+
validate?: NumberProps['validate'];
|
|
55
|
+
autoFocus?: NumberProps['autoFocus'];
|
|
56
|
+
minValue?: NumberProps['minValue'];
|
|
57
|
+
maxValue?: NumberProps['maxValue'];
|
|
58
|
+
step?: NumberProps['step'];
|
|
59
|
+
name?: NumberProps['name'];
|
|
60
|
+
form?: NumberProps['form'];
|
|
61
|
+
validationBehavior?: NumberProps['validationBehavior'];
|
|
62
|
+
className?: NumberProps['className'];
|
|
63
|
+
style?: NumberProps['style'];
|
|
64
|
+
onChange?: NumberProps['onChange'];
|
|
65
|
+
onInput?: NumberProps['onInput'];
|
|
66
|
+
} & Omit<NumberProps, 'isDisabled' | 'isReadOnly' | 'isInvalid' | 'isRequired' | 'children'>;
|
|
67
|
+
export type TimeFieldProps = {
|
|
68
|
+
hourCycle?: TimeProps['hourCycle'];
|
|
69
|
+
granularity?: TimeProps['granularity'];
|
|
70
|
+
minValue?: TimeProps['minValue'];
|
|
71
|
+
maxValue?: TimeProps['maxValue'];
|
|
72
|
+
validate?: TimeProps['validate'];
|
|
73
|
+
autoFocus?: TimeProps['autoFocus'];
|
|
74
|
+
name?: TimeProps['name'];
|
|
75
|
+
form?: TimeProps['form'];
|
|
76
|
+
validationBehavior?: TimeProps['validationBehavior'];
|
|
77
|
+
className?: TimeProps['className'];
|
|
78
|
+
style?: TimeProps['style'];
|
|
79
|
+
} & Omit<TimeProps, 'value' | 'defaultValue' | 'isDisabled' | 'isReadOnly' | 'isInvalid' | 'isRequired' | 'children' | 'onChange'>;
|
|
80
|
+
/** SELECTS */
|
|
81
|
+
type Combo = AriaComboBoxProps<object>;
|
|
82
|
+
export type ComboBoxProps = {
|
|
83
|
+
defaultFilter?: Combo['defaultFilter'];
|
|
84
|
+
formValue?: Combo['formValue'];
|
|
85
|
+
allowsEmptyCollection?: Combo['allowsEmptyCollection'];
|
|
86
|
+
shouldFocusWrap?: Combo['shouldFocusWrap'];
|
|
87
|
+
allowsCustomValue?: Combo['allowsCustomValue'];
|
|
88
|
+
menuTrigger?: Combo['menuTrigger'];
|
|
89
|
+
disabledKeys?: Combo['disabledKeys'];
|
|
90
|
+
validate?: Combo['validate'];
|
|
91
|
+
autoFocus?: Combo['autoFocus'];
|
|
92
|
+
name?: Combo['name'];
|
|
93
|
+
form?: Combo['form'];
|
|
94
|
+
validationBehavior?: Combo['validationBehavior'];
|
|
95
|
+
className?: Combo['className'];
|
|
96
|
+
style?: Combo['style'];
|
|
97
|
+
onOpenChange?: Combo['onOpenChange'];
|
|
98
|
+
} & Omit<Combo, 'children' | 'defaultItems' | 'items' | 'onSelectionChange' | 'onInputChange' | 'selectedKey' | 'defaultSelectedKey' | 'inputValue' | 'defaultInputValue' | 'isOpen' | 'isDisabled' | 'isInvalid' | 'isRequired'>;
|
|
99
|
+
type Select = AriaSelectProps<SelectItem>;
|
|
100
|
+
export type SelectProps = {
|
|
101
|
+
autoComplete?: Select['autoComplete'];
|
|
102
|
+
name?: Select['name'];
|
|
103
|
+
form?: Select['form'];
|
|
104
|
+
defaultOpen?: Select['defaultOpen'];
|
|
105
|
+
disabledKeys?: Select['disabledKeys'];
|
|
106
|
+
defaultValue?: Select['defaultValue'];
|
|
107
|
+
autoFocus?: Select['autoFocus'];
|
|
108
|
+
validationBehavior?: Select['validationBehavior'];
|
|
109
|
+
className?: Select['className'];
|
|
110
|
+
style?: Select['style'];
|
|
111
|
+
onOpenChange?: Select['onOpenChange'];
|
|
112
|
+
} & Omit<Select, 'placeholder' | 'selectionMode' | 'value' | 'children' | 'isOpen' | 'isDisabled' | 'isInvalid' | 'isRequired' | 'defaultSelectedKey' | 'selectionMode' | 'onChange' | 'validate' | 'onSelectionChange'>;
|
|
113
|
+
type MenuProps = AriaMenuProps<ListOption>;
|
|
114
|
+
export type DropdownMenuProps = {
|
|
115
|
+
renderEmptyState?: MenuProps['renderEmptyState'];
|
|
116
|
+
escapeKeyBehavior?: MenuProps['escapeKeyBehavior'];
|
|
117
|
+
autoFocus?: MenuProps['autoFocus'];
|
|
118
|
+
shouldFocusWrap?: MenuProps['shouldFocusWrap'];
|
|
119
|
+
disabledKeys?: MenuProps['disabledKeys'];
|
|
120
|
+
disallowEmptySelection?: MenuProps['disallowEmptySelection'];
|
|
121
|
+
className?: MenuProps['className'];
|
|
122
|
+
style?: MenuProps['style'];
|
|
123
|
+
onAction?: MenuProps['onAction'];
|
|
124
|
+
onClose?: MenuProps['onClose'];
|
|
125
|
+
} & Omit<MenuProps, 'items' | 'selectionMode' | 'selectedKeys' | 'defaultSelectedKeys' | 'children' | 'dependencies' | 'onSelectionChange'>;
|
|
126
|
+
export {};
|
|
File without changes
|
|
@@ -68,6 +68,7 @@ export type SelectInputProps = {
|
|
|
68
68
|
after?: ReactNode;
|
|
69
69
|
/** The function to be called when an option is selected */
|
|
70
70
|
onChange?: (key: string) => void;
|
|
71
|
+
maxHeight?: PopoverProps['maxHeight'];
|
|
71
72
|
} & Omit<InputProps, 'iconRight'> & ShowHideCallbacks & Pick<PopoverProps, 'maxHeight'>;
|
|
72
73
|
export type CalendarBaseProps = {
|
|
73
74
|
/** Prevents selection of dates in the past (relative to the set date or current date). */
|
package/package.json
CHANGED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import styled from "@emotion/styled";
|
|
3
|
-
import { Checkbox } from "react-aria-components";
|
|
4
|
-
import icons_Checkbox from "../../assets/icons/Checkbox.js";
|
|
5
|
-
import CheckboxOff from "../../assets/icons/CheckboxOff.js";
|
|
6
|
-
import CheckboxPartial from "../../assets/icons/CheckboxPartial.js";
|
|
7
|
-
import Icon from "../Icon/index.js";
|
|
8
|
-
const Check = ({ ...props })=>/*#__PURE__*/ jsx(CheckContainer, {
|
|
9
|
-
...props,
|
|
10
|
-
children: ({ isIndeterminate, isSelected, isDisabled })=>{
|
|
11
|
-
let svg = /*#__PURE__*/ jsx(CheckboxOff, {});
|
|
12
|
-
if (isIndeterminate) svg = /*#__PURE__*/ jsx(CheckboxPartial, {});
|
|
13
|
-
else if (isSelected) svg = /*#__PURE__*/ jsx(icons_Checkbox, {});
|
|
14
|
-
return /*#__PURE__*/ jsx(Icon, {
|
|
15
|
-
svg: svg,
|
|
16
|
-
pointer: !isDisabled
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
const CheckContainer = styled(Checkbox)(({ theme: { formControl }, isDisabled })=>({
|
|
21
|
-
'&[data-hovered] > div': {
|
|
22
|
-
color: isDisabled ? void 0 : formControl.color.hover
|
|
23
|
-
},
|
|
24
|
-
'&[data-selected] > div, &[data-indeterminate] > div': {
|
|
25
|
-
color: formControl.color.active
|
|
26
|
-
},
|
|
27
|
-
'&[data-hovered][data-selected] > div': {
|
|
28
|
-
color: isDisabled ? void 0 : formControl.color.activeHover
|
|
29
|
-
},
|
|
30
|
-
'&[data-disabled] > div': {
|
|
31
|
-
color: formControl.color.disabled
|
|
32
|
-
}
|
|
33
|
-
}));
|
|
34
|
-
const Table_Check = Check;
|
|
35
|
-
export { Table_Check as default };
|