@royaloperahouse/harmonic 0.6.1 → 0.6.2
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/components/atoms/ControlledDropdown/ControlledDropdown.d.ts +2 -2
- package/dist/components/atoms/ControlledDropdown/ControlledDropdown.style.d.ts +2 -2
- package/dist/components/atoms/Search/Search.d.ts +1 -1
- package/dist/components/atoms/Search/Search.style.d.ts +1 -1
- package/dist/components/molecules/NavTop/NavTop.d.ts +1 -1
- package/dist/components/molecules/SearchBar/SearchBar.d.ts +1 -1
- package/dist/components/molecules/SearchBar/SearchBar.style.d.ts +1 -1
- package/dist/harmonic.cjs.development.js +163 -79
- package/dist/harmonic.cjs.development.js.map +1 -1
- package/dist/harmonic.cjs.production.min.js +1 -1
- package/dist/harmonic.cjs.production.min.js.map +1 -1
- package/dist/harmonic.esm.js +164 -80
- package/dist/harmonic.esm.js.map +1 -1
- package/dist/helpers/accessibility.d.ts +1 -0
- package/dist/types/navigation.d.ts +12 -0
- package/dist/types/types.d.ts +4 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useFocusTrap(containerRef: React.RefObject<HTMLElement>, onEscape?: () => void): void;
|
|
@@ -79,6 +79,10 @@ export interface ISearchProps {
|
|
|
79
79
|
* Additional CSS class names to apply to the navigation component.
|
|
80
80
|
*/
|
|
81
81
|
className?: string;
|
|
82
|
+
/**
|
|
83
|
+
* Reference to the search icon element for focusing
|
|
84
|
+
*/
|
|
85
|
+
ref?: React.Ref<HTMLButtonElement>;
|
|
82
86
|
}
|
|
83
87
|
export interface INavigationWrapperProps {
|
|
84
88
|
/**
|
|
@@ -145,6 +149,10 @@ export interface INavTopProps {
|
|
|
145
149
|
* Additional CSS class names to apply to the navigation component.
|
|
146
150
|
*/
|
|
147
151
|
className?: string;
|
|
152
|
+
/**
|
|
153
|
+
* Search button ref for focus management
|
|
154
|
+
*/
|
|
155
|
+
searchButtonRef?: React.Ref<HTMLButtonElement>;
|
|
148
156
|
}
|
|
149
157
|
export interface IMenuOptionProps {
|
|
150
158
|
/**
|
|
@@ -205,6 +213,10 @@ export interface ISearchBarProps {
|
|
|
205
213
|
* Function to be called when is closed
|
|
206
214
|
*/
|
|
207
215
|
onClose?: (e?: React.MouseEvent) => void;
|
|
216
|
+
/**
|
|
217
|
+
* Reference to the input element for focusing
|
|
218
|
+
*/
|
|
219
|
+
inputRef?: React.RefObject<HTMLInputElement>;
|
|
208
220
|
/**
|
|
209
221
|
* Additional CSS class names to apply to the navigation component.
|
|
210
222
|
*/
|
package/dist/types/types.d.ts
CHANGED
|
@@ -285,6 +285,10 @@ export interface IControlledDropdownProps {
|
|
|
285
285
|
* Callback called when main link or option are focused
|
|
286
286
|
*/
|
|
287
287
|
onFocus?: () => void;
|
|
288
|
+
/**
|
|
289
|
+
* Callback called when focus leaves element
|
|
290
|
+
*/
|
|
291
|
+
onFocusLeave?: () => void;
|
|
288
292
|
/**
|
|
289
293
|
* Callback called when main link or last option lose focus
|
|
290
294
|
*/
|