@lime-bundles/widget 2.4.0 → 2.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/dist/index.cjs +1114 -162
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +22 -1
- package/dist/index.d.ts +22 -1
- package/dist/index.js +1041 -90
- package/dist/index.js.map +1 -1
- package/dist/lime-bundle.global.js +399 -25
- package/dist/lime-bundle.global.js.map +1 -1
- package/docs/css-variables.md +3 -0
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -62,4 +62,25 @@ declare class LimeBundleElement extends HTMLElement {
|
|
|
62
62
|
private renderError;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
|
|
65
|
+
/**
|
|
66
|
+
* Input-mode tracker — toggles `using-mouse` / `using-keyboard` classes on a
|
|
67
|
+
* target element so CSS can scope focus styles by the customer's current
|
|
68
|
+
* input device. Default is mouse; the first keyboard-navigation keypress
|
|
69
|
+
* (Tab, arrow keys, Enter, Space, Escape, Home/End/PageUp/PageDown) flips
|
|
70
|
+
* to keyboard mode, and the next pointer click flips back.
|
|
71
|
+
*
|
|
72
|
+
* Multiple targets share one pair of document-level listeners — installed
|
|
73
|
+
* on the first `trackInputMode` call, removed when the last target is
|
|
74
|
+
* released. Safe to call across every widget instance on a page without
|
|
75
|
+
* stacking listeners.
|
|
76
|
+
*
|
|
77
|
+
* CSS shape (see bundle-base.css):
|
|
78
|
+
* .using-mouse .lb-bundle-widget :focus { outline: none; }
|
|
79
|
+
*
|
|
80
|
+
* The Liquid theme mirrors this behaviour from `bundle-widget.js` against
|
|
81
|
+
* `document.documentElement` so classic and headless storefronts render the
|
|
82
|
+
* same focus rings.
|
|
83
|
+
*/
|
|
84
|
+
declare function trackInputMode(target: HTMLElement): () => void;
|
|
85
|
+
|
|
86
|
+
export { LimeBundleElement, trackInputMode };
|
package/dist/index.d.ts
CHANGED
|
@@ -62,4 +62,25 @@ declare class LimeBundleElement extends HTMLElement {
|
|
|
62
62
|
private renderError;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
|
|
65
|
+
/**
|
|
66
|
+
* Input-mode tracker — toggles `using-mouse` / `using-keyboard` classes on a
|
|
67
|
+
* target element so CSS can scope focus styles by the customer's current
|
|
68
|
+
* input device. Default is mouse; the first keyboard-navigation keypress
|
|
69
|
+
* (Tab, arrow keys, Enter, Space, Escape, Home/End/PageUp/PageDown) flips
|
|
70
|
+
* to keyboard mode, and the next pointer click flips back.
|
|
71
|
+
*
|
|
72
|
+
* Multiple targets share one pair of document-level listeners — installed
|
|
73
|
+
* on the first `trackInputMode` call, removed when the last target is
|
|
74
|
+
* released. Safe to call across every widget instance on a page without
|
|
75
|
+
* stacking listeners.
|
|
76
|
+
*
|
|
77
|
+
* CSS shape (see bundle-base.css):
|
|
78
|
+
* .using-mouse .lb-bundle-widget :focus { outline: none; }
|
|
79
|
+
*
|
|
80
|
+
* The Liquid theme mirrors this behaviour from `bundle-widget.js` against
|
|
81
|
+
* `document.documentElement` so classic and headless storefronts render the
|
|
82
|
+
* same focus rings.
|
|
83
|
+
*/
|
|
84
|
+
declare function trackInputMode(target: HTMLElement): () => void;
|
|
85
|
+
|
|
86
|
+
export { LimeBundleElement, trackInputMode };
|