Socket
Socket
Sign inDemoInstall

@spectrum-web-components/shared

Package Overview
Dependencies
Maintainers
5
Versions
200
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@spectrum-web-components/shared - npm Package Compare versions

Comparing version 0.4.7 to 0.4.8-alpha.38

src/focus-visible.d.ts

23

package.json

@@ -21,10 +21,17 @@ {

],
"version": "0.4.7",
"version": "0.4.8-alpha.38+3926abb2",
"description": "",
"main": "lib/index.js",
"module": "lib/index.js",
"main": "src/index.js",
"module": "src/index.js",
"type": "module",
"exports": {
"./src/": "./src/",
"./custom-elements.json": "./custom-elements.json",
"./package.json": "./package.json"
},
"files": [
"custom-elements.json",
"/lib/",
"*.d.ts",
"*.js",
"*.js.map",
"/src/"

@@ -38,11 +45,9 @@ ],

"license": "Apache-2.0",
"peerDependencies": {
"lit-element": "^2.1.0",
"lit-html": "^1.0.0"
},
"dependencies": {
"focus-visible": "^5.0.2",
"lit-element": "^2.1.0",
"lit-html": "^1.0.0",
"tslib": "^2.0.0"
},
"gitHead": "16b57d15356859cee73278cdf796274e3245320b"
"gitHead": "3926abb2769a9bab28762bf3b3e1fab7c5f03589"
}

@@ -5,3 +5,3 @@ ## Description

### Installation
### Usage

@@ -13,7 +13,15 @@ [![See it on NPM!](https://img.shields.io/npm/v/@spectrum-web-components/shared?style=for-the-badge)](https://www.npmjs.com/package/@spectrum-web-components/shared)

npm install @spectrum-web-components/shared
```
# or
Individual base classes and mixins can be imported as follows:
yarn add @spectrum-web-components/shared
```
import {
Focusable,
FocusVisiblePolyfillMixin,
getActiveElement,
LikeAnchor,
ObserveSlotText
} from '@spectrum-web-components/shared';
```

@@ -52,2 +60,14 @@ ### Focusable

### FocusVisiblePolyfillMixin
Use this mixin if you would like to leverage `:focus-visible` based selectors in your CSS. [Learn more about the polyfill that powers this.](https://www.npmjs.com/package/focus-visible)
### getActiveElement
Use this helper to find an `activeElement` in your component. [Learn more about tracking active elements over shadow DOM boundaries.](https://dev.to/open-wc/mind-the-document-activeelement-2o9a)
### LikeAnchor
Mix `download`, `label`, `href`, and `target` properties into your element to allow it to act more like an `HTMLAnchorElement`.
### ObserverSlotText

@@ -54,0 +74,0 @@

@@ -13,2 +13,4 @@ /*

import 'focus-visible';
declare global {

@@ -36,2 +38,4 @@ interface Window {

import 'focus-visible';
/**

@@ -115,3 +119,2 @@ * This mixin function is designed to be applied to a class that inherits

super.connectedCallback && super.connectedCallback();
import('focus-visible');
if (this[$endPolyfillCoordination] == null) {

@@ -118,0 +121,0 @@ this[$endPolyfillCoordination] = coordinateWithPolyfill(this);

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc