@spectrum-web-components/shared
Advanced tools
Comparing version 0.4.7 to 0.4.8-alpha.38
@@ -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); |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
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
98
90637
34
981
2
+ Addedlit-element@^2.1.0
+ Addedlit-html@^1.0.0