@k8slens/element-components 3.6.1 → 3.7.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/dist/index.js +61 -33
- package/dist/src/plugins/drop-down-menu/drop-down-menu.d.ts +5 -3
- package/dist/src/plugins/drop-down-menu/drop-down-menu.d.ts.map +1 -1
- package/dist/src/plugins/focusable/_private/use-keyboard-navigation.d.ts.map +1 -1
- package/dist/src/plugins/focusable/get-focusable-context.d.ts +16 -6
- package/dist/src/plugins/focusable/get-focusable-context.d.ts.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +8 -4
|
@@ -11,9 +11,11 @@ export type DropDownMenuPluginProps = {
|
|
|
11
11
|
* The menu positions itself against the nearest anchor around it, so the element — or something
|
|
12
12
|
* enclosing it — declares `$anchor`.
|
|
13
13
|
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
14
|
+
* The menu takes focus as it opens, its first item becoming the current one — except when it
|
|
15
|
+
* opens by being hovered, where focus stays on the element: the row the pointer rests on is what
|
|
16
|
+
* the user is looking at. Focus returns to the element once the menu is gone. A menu that opens on
|
|
17
|
+
* hovering opens with ArrowRight as well, taking focus then, and closes with ArrowLeft from
|
|
18
|
+
* anywhere within it, so a menu held by a menu row is reachable without a pointer.
|
|
17
19
|
*
|
|
18
20
|
* Requires `dropDownMenuFeature` of `@lensapp/drop-down-menu` to be registered: the menu
|
|
19
21
|
* component is resolved through an injection token this package does not implement.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drop-down-menu.d.ts","sourceRoot":"","sources":["../../../../src/plugins/drop-down-menu/drop-down-menu.tsx"],"names":[],"mappings":"AACA,OAAO,EAAgB,KAAK,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAGxF,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAQ/B,MAAM,MAAM,uBAAuB,GAAG;IACpC,QAAQ,CAAC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACpC,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAE3B
|
|
1
|
+
{"version":3,"file":"drop-down-menu.d.ts","sourceRoot":"","sources":["../../../../src/plugins/drop-down-menu/drop-down-menu.tsx"],"names":[],"mappings":"AACA,OAAO,EAAgB,KAAK,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAGxF,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAQ/B,MAAM,MAAM,uBAAuB,GAAG;IACpC,QAAQ,CAAC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACpC,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAE3B;;;;;;;;;;;;;;;;OAgBG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,gBAAgB,CAAC;CAC3C,CAAC;AA4OF,eAAO,MAAM,kBAAkB;;;;;;;wBAjQT,KAAK,CAAC,SAAS;wBACf,MAAM;6BAmBD,gBAAgB;WA8Q1C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-keyboard-navigation.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/focusable/_private/use-keyboard-navigation.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,iCAAiC,EAAiC,MAAM,0BAA0B,CAAC;AAEjH,KAAK,kBAAkB,GAAG;IACxB,QAAQ,CAAC,SAAS,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,aAAa,KAAK,IAAI,CAAC;IACzD,QAAQ,CAAC,OAAO,EAAE,MAAM,IAAI,CAAC;IAC7B,QAAQ,CAAC,uBAAuB,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;CACrE,CAAC;AAQF,eAAO,MAAM,qBAAqB,YACvB,iCAAiC,CAAC,GAAG,CAAC,GAAG,SAAS,QACrD,OAAO,eACA,MAAM,GAAG,SAAS,WACtB,WAAW,GAAG,IAAI,KAC1B,
|
|
1
|
+
{"version":3,"file":"use-keyboard-navigation.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/focusable/_private/use-keyboard-navigation.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,iCAAiC,EAAiC,MAAM,0BAA0B,CAAC;AAEjH,KAAK,kBAAkB,GAAG;IACxB,QAAQ,CAAC,SAAS,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,aAAa,KAAK,IAAI,CAAC;IACzD,QAAQ,CAAC,OAAO,EAAE,MAAM,IAAI,CAAC;IAC7B,QAAQ,CAAC,uBAAuB,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;CACrE,CAAC;AAQF,eAAO,MAAM,qBAAqB,YACvB,iCAAiC,CAAC,GAAG,CAAC,GAAG,SAAS,QACrD,OAAO,eACA,MAAM,GAAG,SAAS,WACtB,WAAW,GAAG,IAAI,KAC1B,kBA+GF,CAAC"}
|
|
@@ -13,13 +13,14 @@ export type FocusableContext<FocusedItem> = {
|
|
|
13
13
|
export type KeyboardNavigationOrientation = "vertical" | "horizontal" | "both";
|
|
14
14
|
/**
|
|
15
15
|
* A focusable context whose members are also navigated with arrow keys, in the order they state.
|
|
16
|
-
* The lowest order number is focused when the members appear,
|
|
17
|
-
* context when they go away.
|
|
16
|
+
* The lowest order number is focused when the members appear, unless the context says otherwise,
|
|
17
|
+
* and focus returns to the enclosing context when they go away.
|
|
18
18
|
*/
|
|
19
19
|
export type KeyboardNavigableFocusableContext<FocusedItem> = {
|
|
20
20
|
readonly id: string;
|
|
21
21
|
readonly isKeyboardNavigable: true;
|
|
22
22
|
readonly orientation: KeyboardNavigationOrientation;
|
|
23
|
+
readonly takesFocusAsItAppears: boolean;
|
|
23
24
|
focusable: (item: FocusedItem, orderNumber: number) => $FocusableProps<FocusedItem>;
|
|
24
25
|
};
|
|
25
26
|
export type AnyFocusableContext<FocusedItem = any> = FocusableContext<FocusedItem> | KeyboardNavigableFocusableContext<FocusedItem>;
|
|
@@ -32,15 +33,24 @@ export declare const getFocusableContext: <FocusedItem>(id: string) => Focusable
|
|
|
32
33
|
export type KeyboardNavigableFocusableContextOptions = {
|
|
33
34
|
/**
|
|
34
35
|
* Which arrow keys move focus. Downwards by default, as most sets of things are laid out: the
|
|
35
|
-
* keys of the other axis are then left to whatever the members want them for, such as a
|
|
36
|
-
* opening
|
|
36
|
+
* keys of the other axis are then left to whatever the members want them for, such as a member
|
|
37
|
+
* opening something of its own with ArrowRight.
|
|
37
38
|
*/
|
|
38
39
|
readonly orientation?: KeyboardNavigationOrientation;
|
|
40
|
+
/**
|
|
41
|
+
* Whether the lowest order number is focused as the members appear. It is by default: a set of
|
|
42
|
+
* members appearing is usually something the user asked for and will go on with. Not so for a set
|
|
43
|
+
* that appears because the pointer rests on something, where what the user is looking at is what
|
|
44
|
+
* the pointer is on, and focus stays there until either the pointer or the keyboard moves it.
|
|
45
|
+
*/
|
|
46
|
+
readonly takesFocusAsItAppears?: boolean;
|
|
39
47
|
};
|
|
40
48
|
/**
|
|
41
49
|
* Declares a focusable context whose members are navigated with arrow keys. As with
|
|
42
|
-
* {@link getFocusableContext}, the same id always yields the same context —
|
|
43
|
-
*
|
|
50
|
+
* {@link getFocusableContext}, the same id always yields the same context — the same id with the
|
|
51
|
+
* same options, that is. A context with other options is a context of its own, whatever it is
|
|
52
|
+
* named, so a surface that asks for its context by the same name with other options moves its
|
|
53
|
+
* members there as they render again, and they appear anew as far as that context is concerned.
|
|
44
54
|
*/
|
|
45
55
|
export declare const getKeyboardNavigableFocusableContext: <FocusedItem>(id: string, options?: KeyboardNavigableFocusableContextOptions) => KeyboardNavigableFocusableContext<FocusedItem>;
|
|
46
56
|
//# sourceMappingURL=get-focusable-context.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-focusable-context.d.ts","sourceRoot":"","sources":["../../../../src/plugins/focusable/get-focusable-context.tsx"],"names":[],"mappings":"AAAA,OAAO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