@sebgroup/green-core 1.1.1 → 1.2.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.
@@ -0,0 +1,40 @@
1
+ import { LitElement } from 'lit-element';
2
+ import '../../primitives/menu/menu';
3
+ import { Placement } from '@floating-ui/dom';
4
+ /**
5
+ * @element gds-context-menu
6
+ * @status beta
7
+ *
8
+ * The context menu is presented in-context to the related data, so users don’t lose
9
+ * their place in the app. It appears upon interaction with the 3 dot button and
10
+ * displays a list of choices, one choice per line.
11
+ *
12
+ * @event gds-menu-item-click - Fired when a menu item is clicked.
13
+ * @event gds-ui-state - Fired when the menu is opened or closed.
14
+ *
15
+ * @slot - The default slot. Only `gds-menu-item` elements are accepted here.
16
+ */
17
+ export declare class GdsContextMenu extends LitElement {
18
+ #private;
19
+ static shadowRootOptions: ShadowRootInit;
20
+ /**
21
+ * Whether the context menu popover is open.
22
+ */
23
+ open: boolean;
24
+ /**
25
+ * The label for the trigger button.
26
+ */
27
+ buttonLabel: string;
28
+ /**
29
+ * The label for the popover and menu. Should describe the context of the menu.
30
+ */
31
+ label: string;
32
+ /**
33
+ * The placement of the popover relative to the trigger.
34
+ */
35
+ placement: Placement;
36
+ private elTriggerBtn;
37
+ constructor();
38
+ connectedCallback(): void;
39
+ render(): any;
40
+ }
@@ -0,0 +1,2 @@
1
+ export declare function register(): void;
2
+ export default register;
@@ -67,6 +67,10 @@ export declare class GdsDropdown<ValueT = any> extends GdsFormControlElement<Val
67
67
  * ```
68
68
  */
69
69
  searchFilter: (q: string, o: GdsOption) => boolean;
70
+ private elTriggerBtn;
71
+ private elTriggerBtnAsync;
72
+ private elListbox;
73
+ private elSearchInput;
70
74
  constructor();
71
75
  connectedCallback(): void;
72
76
  /**
@@ -1,2 +1,4 @@
1
1
  export * from './dropdown/dropdown';
2
2
  export * from '../primitives/listbox/option';
3
+ export * from './context-menu/context-menu';
4
+ export * from '../primitives/menu/menu-item';
@@ -0,0 +1,25 @@
1
+ import { LitElement, ReactiveController } from 'lit';
2
+ /**
3
+ * Components that use `ListboxKbNavController` needs to implement this interface.
4
+ */
5
+ export interface ListboxKbNavigation extends LitElement {
6
+ /**
7
+ * Should return a list of navigable HTMLElements.
8
+ */
9
+ navigableItems: HTMLElement[];
10
+ }
11
+ /**
12
+ * Controller that handles keyboard navigation for `ListboxKbNavigation` compatible components.
13
+ * @internal
14
+ *
15
+ * The purpose of this controller is to provide a reusable implementation of the keyboard
16
+ * interaction patterns decribed here:
17
+ * https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/listbox_role
18
+ */
19
+ export declare class ListboxKbNavController implements ReactiveController {
20
+ #private;
21
+ host: ListboxKbNavigation;
22
+ constructor(host: ListboxKbNavigation);
23
+ hostConnected(): void;
24
+ hostDisconnected(): void;
25
+ }