@rcarls/rc-common 0.4.1 → 0.5.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/CHANGELOG.md +17 -0
- package/dist/rc-common.js +135 -98
- package/dist/rc-common.umd.cjs +9 -9
- package/dist/types/ItemsCollectionController.d.ts +19 -0
- package/dist/types/KeyboardNavigationDirective.d.ts +4 -6
- package/package.json +1 -1
- /package/dist/types/{snapUtils.test.d.ts → snapUtils.unit.test.d.ts} +0 -0
|
@@ -52,6 +52,13 @@ export declare class ItemsCollectionController implements ReactiveController {
|
|
|
52
52
|
private _filterStrategy;
|
|
53
53
|
private _checkmark;
|
|
54
54
|
private _optionsInitialized;
|
|
55
|
+
/**
|
|
56
|
+
* Movement (in CSS pixels) beyond which a pending touch activation is
|
|
57
|
+
* treated as a scroll gesture instead of a tap.
|
|
58
|
+
*/
|
|
59
|
+
private static readonly _TOUCH_TAP_THRESHOLD;
|
|
60
|
+
/** Touch pointerdown awaiting pointerup to confirm a tap versus a scroll. */
|
|
61
|
+
private _pendingTouchActivation;
|
|
55
62
|
constructor(host: ReactiveControllerHost & Element, options: ItemsCollectionControllerOptions);
|
|
56
63
|
hostConnected(): void;
|
|
57
64
|
hostDisconnected(): void;
|
|
@@ -96,5 +103,17 @@ export declare class ItemsCollectionController implements ReactiveController {
|
|
|
96
103
|
private _syncFilterToDom;
|
|
97
104
|
private _applyFilterToLi;
|
|
98
105
|
private _isVisible;
|
|
106
|
+
private _resolveOptionLi;
|
|
107
|
+
/**
|
|
108
|
+
* Claims a pointer event as an option activation: stops it from continuing
|
|
109
|
+
* to bubble/compose past this point (left unstopped, a composed event can
|
|
110
|
+
* still be observed by ancestors outside this component — e.g. a <label>
|
|
111
|
+
* wrapping an unrelated sibling control — and be reinterpreted as an
|
|
112
|
+
* interaction with something else entirely), then activates the option.
|
|
113
|
+
*/
|
|
114
|
+
private _activateLi;
|
|
99
115
|
private _onPointerDown;
|
|
116
|
+
private _onPointerMove;
|
|
117
|
+
private _onPointerUp;
|
|
118
|
+
private _onPointerCancel;
|
|
100
119
|
}
|
|
@@ -55,15 +55,13 @@ declare class KeyboardNavigationDirective extends AsyncDirective {
|
|
|
55
55
|
protected _init(): void;
|
|
56
56
|
/**
|
|
57
57
|
* @param _cb - Callback function invoked with the navigation action
|
|
58
|
-
* @param _options -
|
|
59
|
-
* @deprecated Passing a boolean as the second parameter is deprecated.
|
|
60
|
-
* Use an options object instead.
|
|
58
|
+
* @param _options - Keyboard navigation behavior options.
|
|
61
59
|
*/
|
|
62
|
-
render(_cb: (action: KeyboardNavigationAction) => void, _options?: KeyNavigationOptions
|
|
63
|
-
update(part: ElementPart, [cb,
|
|
60
|
+
render(_cb: (action: KeyboardNavigationAction) => void, _options?: KeyNavigationOptions): symbol;
|
|
61
|
+
update(part: ElementPart, [cb, options]: Parameters<this['render']>): void;
|
|
64
62
|
disconnected(): void;
|
|
65
63
|
reconnected(): void;
|
|
66
64
|
}
|
|
67
|
-
export declare const keyNavigation: (_cb: (action: KeyboardNavigationAction) => void, _options?:
|
|
65
|
+
export declare const keyNavigation: (_cb: (action: KeyboardNavigationAction) => void, _options?: KeyNavigationOptions | undefined) => import('lit/directive.js').DirectiveResult<typeof KeyboardNavigationDirective>;
|
|
68
66
|
export type { KeyboardNavigationDirective };
|
|
69
67
|
export default keyNavigation;
|
package/package.json
CHANGED
|
File without changes
|