From 2c9c2f16902c02990776253b95dd994db29d6d24 Mon Sep 17 00:00:00 2001 From: Eric Y Liu Date: Fri, 19 Mar 2021 17:03:24 -0700 Subject: [PATCH] chore(context-menu): update types --- COMPONENT_INDEX.md | 3 ++- docs/src/COMPONENT_API.json | 3 ++- types/ContextMenu/ContextMenu.d.ts | 1 + types/ContextMenu/ContextMenuOption.d.ts | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/COMPONENT_INDEX.md b/COMPONENT_INDEX.md index ab1d96a8..370a62ae 100644 --- a/COMPONENT_INDEX.md +++ b/COMPONENT_INDEX.md @@ -751,6 +751,7 @@ None. | :--------- | :--------- | :----- | | click | forwarded | -- | | keydown | forwarded | -- | +| open | dispatched | -- | | close | dispatched | -- | ## `ContextMenuDivider` @@ -800,7 +801,7 @@ None. | disabled | let | No | boolean | false | Set to `true` to enable the disabled state | | labelText | let | No | string | "" | Specify the label text
Alternatively, use the "labelText" slot (e.g., <span slot="labelText">...</span>) | | shortcutText | let | No | string | "" | Specify the shortcut text
Alternatively, use the "shortcutText" slot (e.g., <span slot="shortcutText">...</span>) | -| id | let | No | string | "ccs-" + Math.random().toString(36) | Specify the id
It's highly recommended to provide an id when using in a selectable/radio menu group | +| id | let | No | string | "ccs-" + Math.random().toString(36) | Specify the id
It's recommended to provide an id as a value to bind to within a selectable/radio menu group | ### Slots diff --git a/docs/src/COMPONENT_API.json b/docs/src/COMPONENT_API.json index 2f714f04..393b36ab 100644 --- a/docs/src/COMPONENT_API.json +++ b/docs/src/COMPONENT_API.json @@ -1605,6 +1605,7 @@ "events": [ { "type": "forwarded", "name": "click", "element": "ul" }, { "type": "forwarded", "name": "keydown", "element": "ul" }, + { "type": "dispatched", "name": "open" }, { "type": "dispatched", "name": "close" } ], "typedefs": [], @@ -1722,7 +1723,7 @@ { "name": "id", "kind": "let", - "description": "Specify the id\nIt's highly recommended to provide an id when using in a selectable/radio menu group", + "description": "Specify the id\nIt's recommended to provide an id as a value to bind to within a selectable/radio menu group", "type": "string", "value": "\"ccs-\" + Math.random().toString(36)", "isFunction": false, diff --git a/types/ContextMenu/ContextMenu.d.ts b/types/ContextMenu/ContextMenu.d.ts index 9e212b6d..17a4b547 100644 --- a/types/ContextMenu/ContextMenu.d.ts +++ b/types/ContextMenu/ContextMenu.d.ts @@ -34,6 +34,7 @@ export default class ContextMenu extends SvelteComponentTyped< { click: WindowEventMap["click"]; keydown: WindowEventMap["keydown"]; + open: CustomEvent; close: CustomEvent; }, { default: {} } diff --git a/types/ContextMenu/ContextMenuOption.d.ts b/types/ContextMenu/ContextMenuOption.d.ts index 4b086114..b6763f33 100644 --- a/types/ContextMenu/ContextMenuOption.d.ts +++ b/types/ContextMenu/ContextMenuOption.d.ts @@ -50,7 +50,7 @@ export interface ContextMenuOptionProps /** * Specify the id - * It's highly recommended to provide an id when using in a selectable/radio menu group + * It's recommended to provide an id as a value to bind to within a selectable/radio menu group * @default "ccs-" + Math.random().toString(36) */ id?: string;