@spectrum-web-components/shared
Advanced tools
Comparing version 0.36.0 to 0.37.0
{ | ||
"name": "@spectrum-web-components/shared", | ||
"version": "0.36.0", | ||
"version": "0.37.0", | ||
"publishConfig": { | ||
@@ -36,2 +36,6 @@ "access": "public" | ||
}, | ||
"./src/focusable-selectors.js": { | ||
"development": "./src/focusable-selectors.dev.js", | ||
"default": "./src/focusable-selectors.js" | ||
}, | ||
"./src/focusable.js": { | ||
@@ -97,3 +101,3 @@ "development": "./src/focusable.dev.js", | ||
"@lit-labs/observers": "^2.0.0", | ||
"@spectrum-web-components/base": "^0.36.0", | ||
"@spectrum-web-components/base": "^0.37.0", | ||
"focus-visible": "^5.1.0" | ||
@@ -106,3 +110,3 @@ }, | ||
], | ||
"gitHead": "a532ff8a410abeefb54d9638a2316ae82570566e" | ||
"gitHead": "d771f62f0d8063070af43283bb0fd5e3400bad06" | ||
} |
import type { SpectrumElement } from '@spectrum-web-components/base'; | ||
export declare const firstFocusableIn: (root: HTMLElement | ShadowRoot) => SpectrumElement | null; | ||
export declare const firstFocusableSlottedIn: (root: HTMLSlotElement) => SpectrumElement | null; |
"use strict"; | ||
const firstFocusableSelector = 'button:not([tabindex="-1"]), [href]:not([tabindex="-1"]), input:not([tabindex="-1"]), select:not([tabindex="-1"]), textarea:not([tabindex="-1"]), [tabindex]:not([tabindex="-1"]), [focusable]:not([tabindex="-1"])'; | ||
import { userFocusableSelector } from "./focusable-selectors.dev.js"; | ||
export const firstFocusableIn = (root) => { | ||
const firstFocusable = root.querySelector( | ||
firstFocusableSelector | ||
userFocusableSelector | ||
); | ||
return firstFocusable; | ||
}; | ||
export const firstFocusableSlottedIn = (root) => { | ||
const firstFocusable = root.assignedElements().find( | ||
(element) => element.matches(userFocusableSelector) | ||
); | ||
return firstFocusable; | ||
}; | ||
//# sourceMappingURL=first-focusable-in.dev.js.map |
@@ -1,2 +0,2 @@ | ||
"use strict";const e='button:not([tabindex="-1"]), [href]:not([tabindex="-1"]), input:not([tabindex="-1"]), select:not([tabindex="-1"]), textarea:not([tabindex="-1"]), [tabindex]:not([tabindex="-1"]), [focusable]:not([tabindex="-1"])';export const firstFocusableIn=t=>t.querySelector(e); | ||
"use strict";import{userFocusableSelector as t}from"./focusable-selectors.js";export const firstFocusableIn=e=>e.querySelector(t),firstFocusableSlottedIn=e=>e.assignedElements().find(o=>o.matches(t)); | ||
//# sourceMappingURL=first-focusable-in.js.map |
export * from './first-focusable-in.js'; | ||
export * from './focus-visible.js'; | ||
export * from './focusable.js'; | ||
export * from './focusable-selectors.js'; | ||
export * from './get-active-element.js'; | ||
@@ -5,0 +6,0 @@ export * from './like-anchor.js'; |
@@ -5,2 +5,3 @@ "use strict"; | ||
export * from "./focusable.dev.js"; | ||
export * from "./focusable-selectors.dev.js"; | ||
export * from "./get-active-element.dev.js"; | ||
@@ -7,0 +8,0 @@ export * from "./like-anchor.dev.js"; |
@@ -1,2 +0,2 @@ | ||
"use strict";export*from"./first-focusable-in.js";export*from"./focus-visible.js";export*from"./focusable.js";export*from"./get-active-element.js";export*from"./like-anchor.js";export*from"./observe-slot-presence.js";export*from"./observe-slot-text.js";export*from"./platform.js";export*from"./reparent-children.js";export*from"./get-label-from-slot.js"; | ||
"use strict";export*from"./first-focusable-in.js";export*from"./focus-visible.js";export*from"./focusable.js";export*from"./focusable-selectors.js";export*from"./get-active-element.js";export*from"./like-anchor.js";export*from"./observe-slot-presence.js";export*from"./observe-slot-text.js";export*from"./platform.js";export*from"./reparent-children.js";export*from"./get-label-from-slot.js"; | ||
//# sourceMappingURL=index.js.map |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
203919
76
1259
+ Added@spectrum-web-components/base@0.37.0(transitive)
- Removed@spectrum-web-components/base@0.36.0(transitive)