@xleddyl/443-components-vue 0.16.48 → 0.16.49

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.
@@ -187,7 +187,7 @@ useResizeObserver(
187
187
  );
188
188
  watch(open, (value) => {
189
189
  if (!value) return;
190
- nextTick(() => focusFirst(sidebar.value));
190
+ nextTick(() => focusFirst(sidebar.value, { preventScroll: true }));
191
191
  });
192
192
  provide(SHELL_KEY, {
193
193
  sidebarId,
@@ -2,5 +2,5 @@ export declare function activeElement(): HTMLElement | null;
2
2
  export declare function hasFocusWithin(element: Element | null | undefined): boolean;
3
3
  export declare function isFocusLost(container?: Element | null): boolean;
4
4
  export declare function focusStable(target: HTMLElement): void;
5
- export declare function focusFirst(container: Element | null | undefined): boolean;
5
+ export declare function focusFirst(container: Element | null | undefined, options?: FocusOptions): boolean;
6
6
  export declare function neighborFocusTarget(element: HTMLElement): HTMLElement | null;
@@ -31,9 +31,9 @@ export function focusStable(target) {
31
31
  if (!target.hasAttribute("tabindex")) target.setAttribute("tabindex", "-1");
32
32
  target.focus({ preventScroll: true });
33
33
  }
34
- export function focusFirst(container) {
34
+ export function focusFirst(container, options) {
35
35
  const first = container ? focusableWithin(container)[0] : void 0;
36
- first?.focus();
36
+ first?.focus(options);
37
37
  return Boolean(first);
38
38
  }
39
39
  export function neighborFocusTarget(element) {
@@ -22,7 +22,7 @@
22
22
  flex: none;
23
23
  flex-direction: column;
24
24
  gap: 1px;
25
- width: 14rem;
25
+ width: 13.25rem;
26
26
  padding: 0.625rem;
27
27
  border-right: 1px solid var(--k-line);
28
28
  background: var(--k-subtle);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xleddyl/443-components-vue",
3
- "version": "0.16.48",
3
+ "version": "0.16.49",
4
4
  "description": "Compact, scoped dashboard components for Vue and Nuxt",
5
5
  "license": "MIT",
6
6
  "author": "Edoardo Alberti (https://github.com/xleddyl)",