@xleddyl/443-components-vue 0.16.47 → 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) {
@@ -299,16 +299,16 @@ html.k-root body {
299
299
  .k-shell-sidebar,
300
300
  .k-shell[data-variant] .k-shell-sidebar {
301
301
  position: absolute;
302
- inset: 0 auto 0 0;
302
+ inset: 0.5rem auto 0.5rem 0.5rem;
303
303
  z-index: 70;
304
- width: min(16.5rem, 85%);
304
+ width: min(var(--k-shell-sidebar), calc(100% - 1rem));
305
305
  margin: 0;
306
+ overflow: hidden;
306
307
  border: 0;
307
- border-right: 1px solid var(--k-line);
308
- border-radius: 0;
309
- background: var(--k-canvas);
310
- box-shadow: var(--k-shadow-overlay);
311
- transform: translateX(-105%);
308
+ border-radius: var(--k-drawer-radius, var(--k-radius-xl));
309
+ background: var(--k-elevated);
310
+ box-shadow: var(--k-drawer-shadow, var(--k-shadow-overlay));
311
+ transform: translateX(calc(-100% - 1rem));
312
312
  visibility: hidden;
313
313
  transition:
314
314
  transform 340ms var(--k-ease-drawer),
@@ -391,3 +391,20 @@ html.k-root body {
391
391
  padding: 1.25rem 1rem 2rem;
392
392
  }
393
393
  }
394
+
395
+ @container k-shell (max-width: 640px) {
396
+ .k-shell-sidebar,
397
+ .k-shell[data-variant] .k-shell-sidebar {
398
+ inset: max(0.75rem, env(safe-area-inset-top)) 0 0;
399
+ width: 100%;
400
+ padding-bottom: env(safe-area-inset-bottom);
401
+ border-radius: var(--k-drawer-radius, var(--k-radius-xl))
402
+ var(--k-drawer-radius, var(--k-radius-xl)) 0 0;
403
+ transform: translateY(100%);
404
+ }
405
+
406
+ .k-shell.is-nav-open .k-shell-sidebar,
407
+ .k-shell.is-nav-open[data-variant] .k-shell-sidebar {
408
+ transform: none;
409
+ }
410
+ }
@@ -22,7 +22,7 @@
22
22
  flex: none;
23
23
  flex-direction: column;
24
24
  gap: 1px;
25
- width: 12.5rem;
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.47",
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)",