@raycast/api 1.63.0 → 1.64.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/types/index.d.ts +58 -0
package/package.json
CHANGED
package/types/index.d.ts
CHANGED
|
@@ -2500,6 +2500,12 @@ export declare namespace Form {
|
|
|
2500
2500
|
*/
|
|
2501
2501
|
export type Props = TextFieldProps;
|
|
2502
2502
|
}
|
|
2503
|
+
export namespace LinkAccessory {
|
|
2504
|
+
/**
|
|
2505
|
+
* Props of the {@link Form.LinkAccessory} React component.
|
|
2506
|
+
*/
|
|
2507
|
+
export type Props = LinkAccessoryProps;
|
|
2508
|
+
}
|
|
2503
2509
|
/**
|
|
2504
2510
|
* A Ref Type for the {@link Form.PasswordField}.
|
|
2505
2511
|
* Use refs to control your Form by calling `Form.PasswordField.focus()` or `Form.PasswordField.reset()` functions.
|
|
@@ -3856,6 +3862,38 @@ declare interface FormMembers {
|
|
|
3856
3862
|
* ```
|
|
3857
3863
|
*/
|
|
3858
3864
|
FilePicker: typeof FilePicker;
|
|
3865
|
+
/**
|
|
3866
|
+
* A link that will be shown in the right-hand-side of the navigation bar.
|
|
3867
|
+
*
|
|
3868
|
+
* @example
|
|
3869
|
+
* ```typescript
|
|
3870
|
+
* import { ActionPanel, Form, Action } from "@raycast/api";
|
|
3871
|
+
* import { useState } from "react";
|
|
3872
|
+
*
|
|
3873
|
+
* export default function Command() {
|
|
3874
|
+
* const [name, setName] = useState<string>("");
|
|
3875
|
+
*
|
|
3876
|
+
* return (
|
|
3877
|
+
* <Form
|
|
3878
|
+
* searchBarAccessory={
|
|
3879
|
+
* <Form.LinkAccessory
|
|
3880
|
+
* target="https://developers.raycast.com/api-reference/user-interface/form"
|
|
3881
|
+
* text="Open Documentation"
|
|
3882
|
+
* />
|
|
3883
|
+
* }
|
|
3884
|
+
* actions={
|
|
3885
|
+
* <ActionPanel>
|
|
3886
|
+
* <Action.SubmitForm title="Submit Name" onSubmit={(values) => console.log(values)} />
|
|
3887
|
+
* </ActionPanel>
|
|
3888
|
+
* }
|
|
3889
|
+
* >
|
|
3890
|
+
* <Form.TextField id="name" value={name} onChange={setName} />
|
|
3891
|
+
* </Form>
|
|
3892
|
+
* );
|
|
3893
|
+
* }
|
|
3894
|
+
* ```
|
|
3895
|
+
*/
|
|
3896
|
+
LinkAccessory: typeof LinkAccessory;
|
|
3859
3897
|
}
|
|
3860
3898
|
|
|
3861
3899
|
/**
|
|
@@ -3874,6 +3912,10 @@ declare interface FormProps_2 extends ActionsInterface, NavigationChildInterface
|
|
|
3874
3912
|
* @defaultValue `false`
|
|
3875
3913
|
*/
|
|
3876
3914
|
enableDrafts?: boolean;
|
|
3915
|
+
/**
|
|
3916
|
+
* {@link Form.LinkAccessory} that will be shown in the right-hand-side of the search bar.
|
|
3917
|
+
*/
|
|
3918
|
+
searchBarAccessory?: ReactElement<LinkAccessoryProps> | undefined | null;
|
|
3877
3919
|
/**
|
|
3878
3920
|
* The Form.Item elements of the form.
|
|
3879
3921
|
*/
|
|
@@ -5717,6 +5759,22 @@ declare interface LabelProps {
|
|
|
5717
5759
|
*/
|
|
5718
5760
|
declare const Link: FunctionComponent<LinkProps>;
|
|
5719
5761
|
|
|
5762
|
+
/**
|
|
5763
|
+
* See {@link Form.Link}
|
|
5764
|
+
*/
|
|
5765
|
+
declare const LinkAccessory: FunctionComponent<LinkAccessoryProps>;
|
|
5766
|
+
|
|
5767
|
+
declare interface LinkAccessoryProps {
|
|
5768
|
+
/**
|
|
5769
|
+
* The target of the link.
|
|
5770
|
+
*/
|
|
5771
|
+
target: string;
|
|
5772
|
+
/**
|
|
5773
|
+
* The text value of the item.
|
|
5774
|
+
*/
|
|
5775
|
+
text: string;
|
|
5776
|
+
}
|
|
5777
|
+
|
|
5720
5778
|
declare interface LinkProps {
|
|
5721
5779
|
/**
|
|
5722
5780
|
* The title shown above the item.
|