@algolia/satellite 1.10.1 → 1.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/Actions/Accordion/Accordion.d.ts +27 -18
- package/dist/cjs/Actions/Button/Button.tailwind.js +27 -42
- package/dist/cjs/Actions/Button/PolymorphicIconButton.d.ts +34 -5
- package/dist/cjs/Actions/Button/types.d.ts +30 -9
- package/dist/cjs/Actions/Button/types.js +2 -0
- package/dist/cjs/Actions/ButtonGroup/ButtonGroup.d.ts +6 -1
- package/dist/cjs/Actions/Switch/Switch.d.ts +21 -1
- package/dist/cjs/Actions/Switch/SwitchOption.d.ts +9 -0
- package/dist/cjs/Actions/Switch/types.d.ts +2 -1
- package/dist/cjs/Actions/Switch/types.js +3 -1
- package/dist/cjs/Actions/ToggleButton/ToggleButton.d.ts +9 -0
- package/dist/cjs/Actions/ToggleButton/ToggleButtonBase.d.ts +33 -2
- package/dist/cjs/Actions/ToggleButton/ToggleButtonBase.js +1 -1
- package/dist/cjs/Actions/ToggleGroup/ToggleGroup.d.ts +18 -6
- package/dist/cjs/Avatars/ApplicationAvatar/ApplicationAvatar.d.ts +10 -3
- package/dist/cjs/Avatars/UserAvatar/UserAvatar.d.ts +13 -5
- package/dist/cjs/Avatars/types.d.ts +23 -1
- package/dist/cjs/Avatars/types.js +3 -1
- package/dist/cjs/Fields/AutoComplete/components/AutoCompleteEmptyState.d.ts +6 -2
- package/dist/cjs/Fields/AutoComplete/types.d.ts +144 -5
- package/dist/cjs/Fields/Checkbox/Checkbox.d.ts +5 -2
- package/dist/cjs/Fields/DateInput/DateInput.d.ts +47 -0
- package/dist/cjs/Fields/DateInput/DateInput.js +169 -0
- package/dist/cjs/Fields/DateInput/index.d.ts +1 -0
- package/dist/cjs/Fields/DateInput/index.js +16 -0
- package/dist/cjs/Fields/DatePicker/DatePicker/DatePicker.d.ts +42 -0
- package/dist/cjs/Fields/DatePicker/DatePicker/DatePicker.js +1 -0
- package/dist/cjs/Fields/DatePicker/DateRangePicker/DateRangePicker.d.ts +36 -0
- package/dist/cjs/Fields/DatePicker/DateRangePicker/DateRangePicker.js +1 -0
- package/dist/cjs/Fields/DatePicker/components/Popover.d.ts +1 -0
- package/dist/cjs/Fields/DatePicker/components/Popover.js +5 -1
- package/dist/cjs/Fields/DatePicker/types.d.ts +21 -0
- package/dist/cjs/Fields/Dropzone/Dropzone.d.ts +85 -6
- package/dist/cjs/Fields/Field/Field.d.ts +32 -9
- package/dist/cjs/Fields/Form/stories/Complex.js +22 -12
- package/dist/cjs/Fields/Input/Input.d.ts +18 -1
- package/dist/cjs/Fields/Input/Input.js +5 -3
- package/dist/cjs/Fields/RadioGroup/RadioButton.d.ts +68 -2
- package/dist/cjs/Fields/RadioGroup/RadioGroup.d.ts +27 -10
- package/dist/cjs/Fields/RadioGroup/RadioGroup.js +20 -77
- package/dist/cjs/Fields/RadioGroup/RadioGroupItem.d.ts +20 -0
- package/dist/cjs/Fields/RadioGroup/RadioGroupItem.js +71 -0
- package/dist/cjs/Fields/RadioGroup/index.d.ts +1 -0
- package/dist/cjs/Fields/RadioGroup/index.js +11 -0
- package/dist/cjs/Fields/RangeSlider/RangeSlider.d.ts +48 -3
- package/dist/cjs/Fields/Select/Select.d.ts +3 -0
- package/dist/cjs/Fields/TextArea/TextArea.d.ts +16 -0
- package/dist/cjs/Fields/Toggle/Toggle.d.ts +51 -3
- package/dist/cjs/Fields/index.d.ts +1 -0
- package/dist/cjs/Fields/index.js +11 -0
- package/dist/cjs/Helpers/ClickAwayContainer/ClickAwayContainer.d.ts +6 -4
- package/dist/cjs/Helpers/HelpUnderline/HelpUnderline.d.ts +9 -1
- package/dist/cjs/Helpers/Medallion/Medallion.d.ts +14 -1
- package/dist/cjs/Helpers/Medallion/Medallion.js +11 -10
- package/dist/cjs/Helpers/Medallion/Medallion.tailwind.js +1 -1
- package/dist/cjs/Helpers/Medallion/types.d.ts +1 -1
- package/dist/cjs/Helpers/Separator/Separator.d.ts +10 -0
- package/dist/cjs/Helpers/TextWrap/TextWrap.d.ts +8 -2
- package/dist/cjs/Helpers/TextWrap/TextWrap.js +1 -1
- package/dist/cjs/Helpers/UserContent/UserContent.d.ts +10 -1
- package/dist/cjs/Icons/index.d.ts +1 -1
- package/dist/cjs/Icons/index.js +6 -0
- package/dist/cjs/Indicators/Badge/Badge.d.ts +6 -2
- package/dist/cjs/Indicators/Tag/Tag.tailwind.js +13 -4
- package/dist/cjs/Navigation/Stepper/Step.js +28 -25
- package/dist/cjs/Overlay/MenuButton/components/CustomTrigger.d.ts +1 -1
- package/dist/cjs/Overlay/MenuButton/components/CustomTrigger.js +12 -4
- package/dist/cjs/Overlay/Popover/types.d.ts +4 -0
- package/dist/cjs/Overlay/Tooltip/types.d.ts +3 -0
- package/dist/cjs/Satellite/locale.d.ts +2 -1
- package/dist/esm/Actions/Accordion/Accordion.d.ts +27 -18
- package/dist/esm/Actions/Button/Button.tailwind.js +27 -44
- package/dist/esm/Actions/Button/PolymorphicIconButton.d.ts +34 -5
- package/dist/esm/Actions/Button/types.d.ts +30 -9
- package/dist/esm/Actions/Button/types.js +1 -0
- package/dist/esm/Actions/ButtonGroup/ButtonGroup.d.ts +6 -1
- package/dist/esm/Actions/Switch/Switch.d.ts +21 -1
- package/dist/esm/Actions/Switch/SwitchOption.d.ts +9 -0
- package/dist/esm/Actions/Switch/types.d.ts +2 -1
- package/dist/esm/Actions/Switch/types.js +1 -1
- package/dist/esm/Actions/ToggleButton/ToggleButton.d.ts +9 -0
- package/dist/esm/Actions/ToggleButton/ToggleButtonBase.d.ts +33 -2
- package/dist/esm/Actions/ToggleButton/ToggleButtonBase.js +1 -1
- package/dist/esm/Actions/ToggleGroup/ToggleGroup.d.ts +18 -6
- package/dist/esm/Avatars/ApplicationAvatar/ApplicationAvatar.d.ts +10 -3
- package/dist/esm/Avatars/UserAvatar/UserAvatar.d.ts +13 -5
- package/dist/esm/Avatars/types.d.ts +23 -1
- package/dist/esm/Avatars/types.js +1 -1
- package/dist/esm/Fields/AutoComplete/components/AutoCompleteEmptyState.d.ts +6 -2
- package/dist/esm/Fields/AutoComplete/types.d.ts +144 -5
- package/dist/esm/Fields/Checkbox/Checkbox.d.ts +5 -2
- package/dist/esm/Fields/DateInput/DateInput.d.ts +47 -0
- package/dist/esm/Fields/DateInput/DateInput.js +162 -0
- package/dist/esm/Fields/DateInput/index.d.ts +1 -0
- package/dist/esm/Fields/DateInput/index.js +1 -0
- package/dist/esm/Fields/DatePicker/DatePicker/DatePicker.d.ts +42 -0
- package/dist/esm/Fields/DatePicker/DatePicker/DatePicker.js +1 -0
- package/dist/esm/Fields/DatePicker/DateRangePicker/DateRangePicker.d.ts +36 -0
- package/dist/esm/Fields/DatePicker/DateRangePicker/DateRangePicker.js +1 -0
- package/dist/esm/Fields/DatePicker/components/Popover.d.ts +1 -0
- package/dist/esm/Fields/DatePicker/components/Popover.js +5 -1
- package/dist/esm/Fields/DatePicker/types.d.ts +21 -0
- package/dist/esm/Fields/Dropzone/Dropzone.d.ts +85 -6
- package/dist/esm/Fields/Field/Field.d.ts +32 -9
- package/dist/esm/Fields/Form/stories/Complex.js +23 -13
- package/dist/esm/Fields/Input/Input.d.ts +18 -1
- package/dist/esm/Fields/Input/Input.js +5 -3
- package/dist/esm/Fields/RadioGroup/RadioButton.d.ts +68 -2
- package/dist/esm/Fields/RadioGroup/RadioGroup.d.ts +27 -10
- package/dist/esm/Fields/RadioGroup/RadioGroup.js +20 -77
- package/dist/esm/Fields/RadioGroup/RadioGroupItem.d.ts +20 -0
- package/dist/esm/Fields/RadioGroup/RadioGroupItem.js +64 -0
- package/dist/esm/Fields/RadioGroup/index.d.ts +1 -0
- package/dist/esm/Fields/RadioGroup/index.js +2 -1
- package/dist/esm/Fields/RangeSlider/RangeSlider.d.ts +48 -3
- package/dist/esm/Fields/Select/Select.d.ts +3 -0
- package/dist/esm/Fields/TextArea/TextArea.d.ts +16 -0
- package/dist/esm/Fields/Toggle/Toggle.d.ts +51 -3
- package/dist/esm/Fields/index.d.ts +1 -0
- package/dist/esm/Fields/index.js +1 -0
- package/dist/esm/Helpers/ClickAwayContainer/ClickAwayContainer.d.ts +6 -4
- package/dist/esm/Helpers/HelpUnderline/HelpUnderline.d.ts +9 -1
- package/dist/esm/Helpers/Medallion/Medallion.d.ts +14 -1
- package/dist/esm/Helpers/Medallion/Medallion.js +11 -10
- package/dist/esm/Helpers/Medallion/Medallion.tailwind.js +1 -1
- package/dist/esm/Helpers/Medallion/types.d.ts +1 -1
- package/dist/esm/Helpers/Separator/Separator.d.ts +10 -0
- package/dist/esm/Helpers/TextWrap/TextWrap.d.ts +8 -2
- package/dist/esm/Helpers/TextWrap/TextWrap.js +1 -1
- package/dist/esm/Helpers/UserContent/UserContent.d.ts +10 -1
- package/dist/esm/Icons/index.d.ts +1 -1
- package/dist/esm/Icons/index.js +1 -1
- package/dist/esm/Indicators/Badge/Badge.d.ts +6 -2
- package/dist/esm/Indicators/Tag/Tag.tailwind.js +13 -4
- package/dist/esm/Navigation/Stepper/Step.js +28 -25
- package/dist/esm/Overlay/MenuButton/components/CustomTrigger.d.ts +1 -1
- package/dist/esm/Overlay/MenuButton/components/CustomTrigger.js +12 -4
- package/dist/esm/Overlay/Popover/types.d.ts +4 -0
- package/dist/esm/Overlay/Tooltip/types.d.ts +3 -0
- package/dist/esm/Satellite/locale.d.ts +2 -1
- package/dist/satellite.min.css +1 -1
- package/package.json +3 -3
@@ -1,7 +1,16 @@
|
|
1
1
|
import type { ReactNode, VFC } from "react";
|
2
2
|
export interface SwitchOptionProps {
|
3
|
+
/**
|
4
|
+
* The value associated with this `SwitchOption`.
|
5
|
+
*/
|
3
6
|
value: string;
|
7
|
+
/**
|
8
|
+
* Whether this `SwitchOption` is disabled.
|
9
|
+
*/
|
4
10
|
disabled?: boolean;
|
11
|
+
/**
|
12
|
+
* The content to display for this `SwitchOption`.
|
13
|
+
*/
|
5
14
|
children: ReactNode;
|
6
15
|
}
|
7
16
|
export declare const SwitchOption: VFC<SwitchOptionProps>;
|
@@ -1,4 +1,5 @@
|
|
1
|
-
export declare
|
1
|
+
export declare const switchSizes: readonly ["small", "medium", "large"];
|
2
|
+
export declare type SwitchSize = (typeof switchSizes)[number];
|
2
3
|
export interface SwitchContextValue {
|
3
4
|
name: string;
|
4
5
|
value: string;
|
@@ -1 +1 @@
|
|
1
|
-
export
|
1
|
+
export var switchSizes = ["small", "medium", "large"];
|
@@ -2,8 +2,17 @@
|
|
2
2
|
import type { ToggleProps } from "@radix-ui/react-toggle";
|
3
3
|
import type { ToggleButtonBaseProps } from "./ToggleButtonBase";
|
4
4
|
export declare type ToggleButtonProps = {
|
5
|
+
/**
|
6
|
+
* The pressed state of the `ToggleButton`.
|
7
|
+
*/
|
5
8
|
pressed?: ToggleProps["pressed"];
|
9
|
+
/**
|
10
|
+
* The default pressed state of the `ToggleButton`.
|
11
|
+
*/
|
6
12
|
defaultPressed?: ToggleProps["defaultPressed"];
|
13
|
+
/**
|
14
|
+
* The callback function that is called when the pressed state changes.
|
15
|
+
*/
|
7
16
|
onPressedChange?: ToggleProps["onPressedChange"];
|
8
17
|
} & ToggleButtonBaseProps;
|
9
18
|
/**
|
@@ -1,15 +1,46 @@
|
|
1
|
-
import type {
|
1
|
+
import type { ReactNode } from "react";
|
2
2
|
import type { IconComponentType } from "../../Icons";
|
3
3
|
import type { ButtonSize } from "../Button/types";
|
4
4
|
declare type IconOnlyToggleButtonBaseProps = {
|
5
|
+
/**
|
6
|
+
* The icon to display for the `ToggleButton`.
|
7
|
+
*/
|
5
8
|
icon: IconComponentType;
|
9
|
+
/**
|
10
|
+
* The label to display for the `ToggleButton`.
|
11
|
+
*/
|
6
12
|
label: string;
|
7
13
|
};
|
8
14
|
declare type TextToggleButtonBaseProps = {
|
15
|
+
/**
|
16
|
+
* The icon to display for the `ToggleButton`.
|
17
|
+
*/
|
9
18
|
icon?: IconComponentType;
|
19
|
+
/**
|
20
|
+
* The content to display for the `ToggleButton`.
|
21
|
+
*/
|
10
22
|
children: ReactNode;
|
11
23
|
};
|
12
|
-
export declare type ToggleButtonBaseProps =
|
24
|
+
export declare type ToggleButtonBaseProps = {
|
25
|
+
/**
|
26
|
+
* The id of the `ToggleButton`.
|
27
|
+
*/
|
28
|
+
id?: string;
|
29
|
+
/**
|
30
|
+
* The class name of the `ToggleButton`.
|
31
|
+
*/
|
32
|
+
className?: string;
|
33
|
+
/**
|
34
|
+
* Whether the `ToggleButton` should be auto focused.
|
35
|
+
*/
|
36
|
+
autoFocus?: boolean;
|
37
|
+
/**
|
38
|
+
* Whether the `ToggleButton` should be disabled.
|
39
|
+
*/
|
40
|
+
disabled?: boolean;
|
41
|
+
/**
|
42
|
+
* The size of the `ToggleButton`.
|
43
|
+
*/
|
13
44
|
size?: ButtonSize;
|
14
45
|
} & (IconOnlyToggleButtonBaseProps | TextToggleButtonBaseProps);
|
15
46
|
export declare const ToggleButtonBase: import("react").ForwardRefExoticComponent<ToggleButtonBaseProps & import("react").RefAttributes<HTMLButtonElement>>;
|
@@ -36,7 +36,7 @@ export var ToggleButtonBase = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
36
36
|
ref: ref,
|
37
37
|
type: "button",
|
38
38
|
"aria-label": label,
|
39
|
-
className: cx(stl(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["inline-flex items-center justify-center gap-1 min-w-min whitespace-nowrap typo-display-body"]))), stl(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["group/toggle-button rounded focusable-visible disabled:cursor-not-allowed"]))), stl(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["data-[state=on]:text-accent-600 disabled:!text-grey-300"]))), stl(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["bg-white data-[state=off]:hover:bg-grey-100 data-[state=on]:bg-accent-100 disabled:!bg-grey-50"]))), stl(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["border border-grey-200 data-[state=on]:border-accent-600 disabled:!border-grey-200"]))), !isIconOnly && stl(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["px-3"]))), isIconOnly ? ICON_ONLY_CLASSNAMES[size] : BUTTON_SIZE_CLASSNAMES[size], className)
|
39
|
+
className: cx(stl(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["inline-flex items-center justify-center gap-1 min-w-min whitespace-nowrap typo-display-body"]))), stl(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["group/toggle-button rounded focusable-visible focus-visible:border-transparent disabled:cursor-not-allowed"]))), stl(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["data-[state=on]:text-accent-600 disabled:!text-grey-300"]))), stl(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["bg-white data-[state=off]:hover:bg-grey-100 data-[state=on]:bg-accent-100 disabled:!bg-grey-50"]))), stl(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["border border-grey-200 data-[state=on]:border-accent-600 disabled:!border-grey-200"]))), !isIconOnly && stl(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["px-3"]))), isIconOnly ? ICON_ONLY_CLASSNAMES[size] : BUTTON_SIZE_CLASSNAMES[size], className)
|
40
40
|
}, rest), {}, {
|
41
41
|
children: [!!Icon && /*#__PURE__*/_jsx(Icon, {
|
42
42
|
"aria-hidden": "true",
|
@@ -2,7 +2,9 @@ import type { ToggleGroupItemProps as RadixToggleGroupItemProps, ToggleGroupMult
|
|
2
2
|
import type { FC } from "react";
|
3
3
|
import type { ToggleButtonBaseProps } from "../ToggleButton/ToggleButtonBase";
|
4
4
|
declare type ToggleGroupSharedProps = {
|
5
|
-
/**
|
5
|
+
/**
|
6
|
+
* The class name of the `ToggleGroup`.
|
7
|
+
*/
|
6
8
|
className?: string;
|
7
9
|
/**
|
8
10
|
* Defines whether the `ToggleGroup` is disabled,
|
@@ -11,7 +13,9 @@ declare type ToggleGroupSharedProps = {
|
|
11
13
|
disabled?: RadixToggleGroupSharedProps["disabled"];
|
12
14
|
};
|
13
15
|
declare type ToggleGroupSingleProps = {
|
14
|
-
/**
|
16
|
+
/**
|
17
|
+
* Defines whether a single or multiple items can be pressed at a time.
|
18
|
+
*/
|
15
19
|
type: "single";
|
16
20
|
/**
|
17
21
|
* Defines the controlled value of the pressed item.
|
@@ -23,11 +27,15 @@ declare type ToggleGroupSingleProps = {
|
|
23
27
|
* Use when you do not need to control the state of the items.
|
24
28
|
*/
|
25
29
|
defaultValue?: RadixToggleGroupSingleProps["defaultValue"];
|
26
|
-
/**
|
30
|
+
/**
|
31
|
+
* Defines the event handler called when the pressed state of an item changes.
|
32
|
+
*/
|
27
33
|
onChange?: RadixToggleGroupSingleProps["onValueChange"];
|
28
34
|
};
|
29
35
|
declare type ToggleGroupMultipleProps = {
|
30
|
-
/**
|
36
|
+
/**
|
37
|
+
* Defines whether a single or multiple items can be pressed at a time.
|
38
|
+
*/
|
31
39
|
type: "multiple";
|
32
40
|
/**
|
33
41
|
* Defines the controlled value of the pressed items.
|
@@ -39,7 +47,9 @@ declare type ToggleGroupMultipleProps = {
|
|
39
47
|
* Use when you do not need to control the state of the items.
|
40
48
|
*/
|
41
49
|
defaultValue?: RadixToggleGroupMultipleProps["defaultValue"];
|
42
|
-
/**
|
50
|
+
/**
|
51
|
+
* Defines the event handler called when the pressed state of an item changes.
|
52
|
+
*/
|
43
53
|
onChange?: RadixToggleGroupMultipleProps["onValueChange"];
|
44
54
|
};
|
45
55
|
export declare type ToggleGroupProps = ToggleGroupSharedProps & (ToggleGroupSingleProps | ToggleGroupMultipleProps);
|
@@ -52,7 +62,9 @@ declare type ToggleGroupComponent = FC<ToggleGroupProps> & {
|
|
52
62
|
* See the [ToggleGroupItem documentation page](https://satellite.algolia.com/components/actions/toggle-group) for more information.
|
53
63
|
*/
|
54
64
|
export declare type ToggleGroupItemProps = ToggleButtonBaseProps & {
|
55
|
-
/**
|
65
|
+
/**
|
66
|
+
* Defines a unique value for the item.
|
67
|
+
*/
|
56
68
|
value: RadixToggleGroupItemProps["value"];
|
57
69
|
};
|
58
70
|
/**
|
@@ -1,11 +1,18 @@
|
|
1
1
|
import type { VFC } from "react";
|
2
2
|
import type { ApplicationAvatarSize, MinimalApplication } from "../types";
|
3
3
|
export interface ApplicationAvatarProps {
|
4
|
-
/**
|
4
|
+
/**
|
5
|
+
* A minimal application object containing `applicationID` and `name`.
|
6
|
+
*/
|
5
7
|
application: MinimalApplication;
|
6
|
-
/**
|
8
|
+
/**
|
9
|
+
* The size of the `ApplicationAvatar`.
|
10
|
+
* @default "medium"
|
11
|
+
*/
|
7
12
|
size?: ApplicationAvatarSize;
|
8
|
-
/**
|
13
|
+
/**
|
14
|
+
* The class name of the `ApplicationAvatar`.
|
15
|
+
*/
|
9
16
|
className?: string;
|
10
17
|
}
|
11
18
|
/**
|
@@ -4,16 +4,24 @@ export declare type UserAvatarLocale = {
|
|
4
4
|
fallbackText?: string;
|
5
5
|
};
|
6
6
|
export interface UserAvatarProps {
|
7
|
-
/**
|
7
|
+
/**
|
8
|
+
* A minimal user object containing `name`, `email` and `avatar`.
|
9
|
+
*/
|
8
10
|
user: MinimalUser;
|
9
11
|
/**
|
10
|
-
*
|
12
|
+
* The size of the `UserAvatar`.
|
11
13
|
* @default 32
|
12
|
-
|
14
|
+
*/
|
13
15
|
size?: number;
|
14
|
-
/**
|
15
|
-
|
16
|
+
/**
|
17
|
+
* The locale of the `UserAvatar`.
|
18
|
+
* @default { fallbackText: `User's avatar` }"
|
19
|
+
*/
|
16
20
|
locale?: UserAvatarLocale;
|
21
|
+
/**
|
22
|
+
* The class name of the `UserAvatar`.
|
23
|
+
*/
|
24
|
+
className?: string;
|
17
25
|
}
|
18
26
|
/**
|
19
27
|
* The `UserAvatar` component is used as a visual representation of a user.
|
@@ -1,17 +1,39 @@
|
|
1
|
-
export declare
|
1
|
+
export declare const applicationAvatarSizes: readonly ["small", "medium"];
|
2
|
+
export declare type ApplicationAvatarSize = (typeof applicationAvatarSizes)[number];
|
2
3
|
export declare type MinimalApplication = {
|
4
|
+
/**
|
5
|
+
* The application ID.
|
6
|
+
*/
|
3
7
|
applicationId: string;
|
8
|
+
/**
|
9
|
+
* The name of the application.
|
10
|
+
*/
|
4
11
|
name?: string;
|
5
12
|
};
|
6
13
|
declare type UserAvatarWithName = {
|
14
|
+
/**
|
15
|
+
* The name of the user.
|
16
|
+
*/
|
7
17
|
name: string;
|
18
|
+
/**
|
19
|
+
* The email of the user.
|
20
|
+
*/
|
8
21
|
email?: string;
|
9
22
|
};
|
10
23
|
declare type UserAvatarWithEmail = {
|
24
|
+
/**
|
25
|
+
* The email of the user.
|
26
|
+
*/
|
11
27
|
email: string;
|
28
|
+
/**
|
29
|
+
* The name of the user.
|
30
|
+
*/
|
12
31
|
name?: string;
|
13
32
|
};
|
14
33
|
export declare type MinimalUser = (UserAvatarWithName | UserAvatarWithEmail) & {
|
34
|
+
/**
|
35
|
+
* The avatar of the user.
|
36
|
+
*/
|
15
37
|
avatar?: string;
|
16
38
|
};
|
17
39
|
export {};
|
@@ -1 +1 @@
|
|
1
|
-
export
|
1
|
+
export var applicationAvatarSizes = ["small", "medium"];
|
@@ -4,9 +4,13 @@ import { type IconComponentType } from "../../../Icons";
|
|
4
4
|
export interface AutoCompleteEmptyStateProps {
|
5
5
|
icon?: IconComponentType;
|
6
6
|
variant?: MedallionVariant;
|
7
|
-
/**
|
7
|
+
/**
|
8
|
+
* Descriptive title for state
|
9
|
+
*/
|
8
10
|
title: ReactNode;
|
9
|
-
/**
|
11
|
+
/**
|
12
|
+
* Optional description to explain why the screen is empty or define next steps
|
13
|
+
*/
|
10
14
|
description?: ReactNode;
|
11
15
|
}
|
12
16
|
export declare const AutoCompleteEmptyState: VFC<AutoCompleteEmptyStateProps>;
|
@@ -10,70 +10,209 @@ export declare type AutoCompleteLocale = {
|
|
10
10
|
optionItemPrefix?: (multiple: boolean) => string;
|
11
11
|
};
|
12
12
|
export interface AutoCompleteBaseProps<T extends Option = Option> {
|
13
|
+
/**
|
14
|
+
* The id of the `AutoComplete`.
|
15
|
+
*/
|
13
16
|
id?: string;
|
17
|
+
/**
|
18
|
+
* The aria-label of the `AutoComplete`.
|
19
|
+
*/
|
14
20
|
"aria-label"?: string;
|
21
|
+
/**
|
22
|
+
* The label id of the `AutoComplete`.
|
23
|
+
*/
|
15
24
|
labelId?: string;
|
25
|
+
/**
|
26
|
+
* The icon of the `AutoComplete`.
|
27
|
+
*/
|
16
28
|
icon?: IconComponentType;
|
29
|
+
/**
|
30
|
+
* The name of the `AutoComplete`.
|
31
|
+
*/
|
17
32
|
name?: string;
|
33
|
+
/**
|
34
|
+
* Whether the `AutoComplete` is required.
|
35
|
+
* @default false
|
36
|
+
*/
|
18
37
|
required?: boolean;
|
38
|
+
/**
|
39
|
+
* The class name of the `AutoComplete`.
|
40
|
+
*/
|
19
41
|
className?: string;
|
42
|
+
/**
|
43
|
+
* The class name of the `AutoComplete` values.
|
44
|
+
*/
|
20
45
|
valuesClassName?: string;
|
46
|
+
/**
|
47
|
+
* The class name of the `AutoComplete` menu.
|
48
|
+
*/
|
21
49
|
menuClassName?: string;
|
50
|
+
/**
|
51
|
+
* The variant of the `AutoComplete`.
|
52
|
+
* @default "medium"
|
53
|
+
*/
|
22
54
|
variant?: AutoCompleteVariant;
|
55
|
+
/**
|
56
|
+
* The placeholder of the `AutoComplete`.
|
57
|
+
*/
|
23
58
|
placeholder?: string;
|
59
|
+
/**
|
60
|
+
* Whether the `AutoComplete` is disabled.
|
61
|
+
* @default false
|
62
|
+
*/
|
24
63
|
disabled?: boolean;
|
64
|
+
/**
|
65
|
+
* Whether the `AutoComplete` should be focused.
|
66
|
+
*/
|
25
67
|
autoFocus?: boolean;
|
68
|
+
/**
|
69
|
+
* The options of the `AutoComplete`.
|
70
|
+
*/
|
26
71
|
options?: T[];
|
72
|
+
/**
|
73
|
+
* The current value of the `AutoComplete`.
|
74
|
+
*/
|
27
75
|
inputValue?: string;
|
76
|
+
/**
|
77
|
+
* The callback function that is called when the text of the `AutoComplete` changes.
|
78
|
+
*/
|
28
79
|
onTextChange?: (text: string) => any;
|
80
|
+
/**
|
81
|
+
* The callback function that is called when the `AutoComplete` gains focus.
|
82
|
+
*/
|
29
83
|
onFocus?: FocusEventHandler<HTMLInputElement>;
|
84
|
+
/**
|
85
|
+
* The callback function that is called when the `AutoComplete` loses focus.
|
86
|
+
*/
|
30
87
|
onBlur?: FocusEventHandler<HTMLInputElement>;
|
88
|
+
/**
|
89
|
+
* Whether the `AutoComplete` is creatable.
|
90
|
+
*/
|
31
91
|
creatable?: boolean;
|
92
|
+
/**
|
93
|
+
* Whether the `AutoComplete` should clear the input value.
|
94
|
+
*/
|
32
95
|
clearable?: boolean;
|
96
|
+
/**
|
97
|
+
* Whether the `AutoComplete` should select the option on blur.
|
98
|
+
*/
|
33
99
|
selectOnBlur?: boolean;
|
100
|
+
/**
|
101
|
+
* The maximum number of results to display in the `AutoComplete` menu.
|
102
|
+
* @default 7
|
103
|
+
*/
|
34
104
|
maxResults?: number;
|
105
|
+
/**
|
106
|
+
* The function used to create options from the input value.
|
107
|
+
*/
|
35
108
|
createFromInputValue?: CreateFromInputValue<T>;
|
109
|
+
/**
|
110
|
+
* The keys used to split the input value into multiple options.
|
111
|
+
*/
|
36
112
|
separatorKeys?: string[];
|
113
|
+
/**
|
114
|
+
* The template used to render the value of the `AutoComplete`.
|
115
|
+
*/
|
37
116
|
renderValueTemplate?: (args: RenderValueTemplateArgs<T>) => JSX.Element;
|
117
|
+
/**
|
118
|
+
* The empty state of the `AutoComplete`.
|
119
|
+
*/
|
38
120
|
emptyState?: ReactNode;
|
121
|
+
/**
|
122
|
+
* The footer of the `AutoComplete` menu.
|
123
|
+
*/
|
39
124
|
menuFooter?: ReactNode;
|
125
|
+
/**
|
126
|
+
* The component used to render the option items.
|
127
|
+
*/
|
40
128
|
optionItemComponent?: OptionItemComponentType<T>;
|
41
|
-
/**
|
129
|
+
/**
|
130
|
+
* Whether the input should be kept on a single line.
|
131
|
+
*/
|
42
132
|
noWrap?: boolean;
|
133
|
+
/**
|
134
|
+
* The end item of the `AutoComplete`.
|
135
|
+
*/
|
43
136
|
endItem?: ReactNode;
|
44
137
|
/**
|
45
|
-
*
|
138
|
+
* The size of the `AutoComplete` menu.
|
139
|
+
* `medium` will display about 5 results in the dropdown; use `large` variant to display more.
|
46
140
|
* @default "medium"
|
47
141
|
*/
|
48
142
|
menuSize?: "medium" | "large";
|
143
|
+
/**
|
144
|
+
* The locale of the `AutoComplete`.
|
145
|
+
*/
|
49
146
|
locale?: AutoCompleteLocale;
|
50
|
-
/**
|
147
|
+
/**
|
148
|
+
* @deprecated Use of this props is discouraged and is only there for backwards compatibility.
|
149
|
+
*/
|
51
150
|
internalsRef?: ForwardedRef<AutoCompleteInternals>;
|
52
151
|
}
|
53
152
|
export interface AutoCompleteInternals {
|
54
|
-
/**
|
153
|
+
/**
|
154
|
+
* Current internal inputValue
|
155
|
+
*/
|
55
156
|
inputValue: string;
|
56
|
-
/**
|
157
|
+
/**
|
158
|
+
* RefObject containing the underlying combobox input element
|
159
|
+
*/
|
57
160
|
inputRef: RefObject<HTMLInputElement>;
|
58
161
|
}
|
59
162
|
export interface AutoCompleteSingleProps<T extends Option = Option> extends AutoCompleteBaseProps<T> {
|
163
|
+
/**
|
164
|
+
* Whether the `AutoComplete` is a multiple selection.
|
165
|
+
*/
|
60
166
|
multiple?: false;
|
167
|
+
/**
|
168
|
+
* The value of the `AutoComplete`.
|
169
|
+
*/
|
61
170
|
value?: T;
|
171
|
+
/**
|
172
|
+
* The callback function that is called when the value of the `AutoComplete` changes.
|
173
|
+
*/
|
62
174
|
onChange: (option: T | null) => void;
|
63
175
|
}
|
64
176
|
export interface AutoCompleteMultiProps<T extends Option = Option> extends AutoCompleteBaseProps<T> {
|
177
|
+
/**
|
178
|
+
* Whether the `AutoComplete` is a multiple selection.
|
179
|
+
*/
|
65
180
|
multiple: true;
|
181
|
+
/**
|
182
|
+
* The value of the `AutoComplete`.
|
183
|
+
*/
|
66
184
|
value?: T[];
|
185
|
+
/**
|
186
|
+
* The callback function that is called when the value of the `AutoComplete` changes.
|
187
|
+
*/
|
67
188
|
onChange: (option: T[] | null) => void;
|
68
189
|
}
|
69
190
|
export declare type AutoCompleteProps<T extends Option = Option> = AutoCompleteMultiProps<T> | AutoCompleteSingleProps<T>;
|
70
191
|
declare type OptionsValue = string | number | boolean;
|
71
192
|
export interface Option {
|
193
|
+
/**
|
194
|
+
* The value of the `Option`.
|
195
|
+
*/
|
72
196
|
value: OptionsValue;
|
197
|
+
/**
|
198
|
+
* The label of the `Option`.
|
199
|
+
*/
|
73
200
|
label: string;
|
201
|
+
/**
|
202
|
+
* The metadata of the `Option`.
|
203
|
+
*/
|
74
204
|
metadata?: string[];
|
205
|
+
/**
|
206
|
+
* Whether the `Option` is new.
|
207
|
+
*/
|
75
208
|
new?: boolean;
|
209
|
+
/**
|
210
|
+
* Whether the `Option` is disabled.
|
211
|
+
*/
|
76
212
|
disabled?: boolean;
|
213
|
+
/**
|
214
|
+
* Whether the `Option` should bypass the needle match.
|
215
|
+
*/
|
77
216
|
bypassNeedleMatch?: boolean;
|
78
217
|
}
|
79
218
|
export interface OptionItemProps<T extends Option = Option> {
|
@@ -1,13 +1,16 @@
|
|
1
1
|
import type { HTMLAttributes, InputHTMLAttributes } from "react";
|
2
2
|
declare type CheckboxCustomProps = {
|
3
3
|
/**
|
4
|
-
*
|
4
|
+
* The text position of the `Checkbox`.
|
5
5
|
* @default right
|
6
6
|
*/
|
7
7
|
textPosition?: "left" | "right";
|
8
|
+
/**
|
9
|
+
* Whether the `Checkbox` is indeterminate.
|
10
|
+
*/
|
8
11
|
indeterminate?: boolean;
|
9
12
|
/**
|
10
|
-
*
|
13
|
+
* The color of the `Checkbox` when it is checked.
|
11
14
|
* @default accent.600
|
12
15
|
*/
|
13
16
|
checkedColor?: string;
|
@@ -0,0 +1,47 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import type { DatePickerProps } from "../DatePicker";
|
3
|
+
import type { InputProps } from "../Input";
|
4
|
+
declare type DateValue = Date | null;
|
5
|
+
export declare type DateInputLocale = {
|
6
|
+
tooltip?: (open: boolean) => string;
|
7
|
+
};
|
8
|
+
export interface DateInputProps extends Omit<InputProps, "type" | "defaultValue" | "value" | "onChange" | "locale" | "endItem"> {
|
9
|
+
/**
|
10
|
+
* Defines the default value of the `DateInput`.
|
11
|
+
*/
|
12
|
+
defaultValue?: DateValue;
|
13
|
+
/**
|
14
|
+
* Defines the value of the `DateInput`.
|
15
|
+
*/
|
16
|
+
value?: DateValue;
|
17
|
+
/**
|
18
|
+
* Defines the function to call when the `DateInput` value changes.
|
19
|
+
*/
|
20
|
+
onChange?: (value: DateValue) => void;
|
21
|
+
/**
|
22
|
+
* Defines the format of the `DateInput` value.
|
23
|
+
* @default "MM/dd/yyyy"
|
24
|
+
*/
|
25
|
+
valueFormat?: string;
|
26
|
+
/**
|
27
|
+
* Defines the separator of the `DateInput` value.
|
28
|
+
* @default "/"
|
29
|
+
*/
|
30
|
+
separator?: string;
|
31
|
+
/**
|
32
|
+
* Defines the locale of the `DateInput`.
|
33
|
+
*/
|
34
|
+
locale?: DateInputLocale;
|
35
|
+
/**
|
36
|
+
* Defines the props to pass to the `DatePicker`.
|
37
|
+
*/
|
38
|
+
datePickerProps?: Omit<DatePickerProps, "value" | "onChange" | "renderTarget">;
|
39
|
+
}
|
40
|
+
/**
|
41
|
+
* The `DateInput` component provides a date input field with an integrated date picker.
|
42
|
+
* It allows users to either type a date manually or select one from a calendar interface.
|
43
|
+
*
|
44
|
+
* See the [DateInput documentation page](https://satellite.algolia.com/components/forms/date-input) for more information.
|
45
|
+
*/
|
46
|
+
export declare const DateInput: import("react").ForwardRefExoticComponent<DateInputProps & import("react").RefAttributes<HTMLInputElement>>;
|
47
|
+
export {};
|