Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@spectrum-web-components/base

Package Overview
Dependencies
Maintainers
7
Versions
237
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

Comparing version 0.7.5-overlay.237 to 0.7.5-overlay.250

4

package.json
{
"name": "@spectrum-web-components/base",
"version": "0.7.5-overlay.237+d03f9a710",
"version": "0.7.5-overlay.250+e296a22f1",
"publishConfig": {

@@ -106,3 +106,3 @@ "access": "public"

],
"gitHead": "d03f9a710c8f3870f4e43f96ed279cc9cbd0e729"
"gitHead": "e296a22f1eeff7d62753caf21d2bae4ba406cbbd"
}
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __decorateClass = (decorators, target, key, kind) => {
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
for (var i = decorators.length - 1, decorator; i >= 0; i--)
if (decorator = decorators[i])
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
if (kind && result)
__defProp(target, key, result);
return result;
};
var _a, _b, _c;
import { LitElement } from "lit";
import { property } from "lit/decorators.js";
const observedForElements = /* @__PURE__ */ new Set();

@@ -30,7 +18,3 @@ const updateRTL = () => {

export function SpectrumMixin(constructor) {
class SlotTextObservingElement extends constructor {
constructor() {
super(...arguments);
this.dir = "ltr";
}
class SpectrumMixinElement extends constructor {
/**

@@ -63,7 +47,3 @@ * @private

}
const oldDir = this.dir;
this.dir = dirParent.dir === "rtl" ? dirParent.dir : this.dir || "ltr";
if (oldDir === this.dir) {
this.setAttribute("dir", this.dir);
}
if (dirParent === document.documentElement) {

@@ -101,6 +81,3 @@ observedForElements.add(this);

}
__decorateClass([
property({ reflect: true })
], SlotTextObservingElement.prototype, "dir", 2);
return SlotTextObservingElement;
return SpectrumMixinElement;
}

@@ -107,0 +84,0 @@ export class SpectrumElement extends SpectrumMixin(LitElement) {

@@ -1,2 +0,2 @@

"use strict";var c=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var l=(t,n,r,o)=>{for(var e=o>1?void 0:o?d(n,r):n,i=t.length-1,s;i>=0;i--)(s=t[i])&&(e=(o?s(n,r,e):s(e))||e);return o&&e&&c(n,r,e),e};import{LitElement as m}from"lit";import{property as u}from"lit/decorators.js";const a=new Set,g=()=>{const t=document.documentElement.dir==="rtl"?document.documentElement.dir:"ltr";a.forEach(n=>{n.setAttribute("dir",t)})},p=new MutationObserver(g);p.observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]});const w=t=>typeof t.startManagingContentDirection!="undefined"||t.tagName==="SP-THEME";export function SpectrumMixin(t){class n extends t{constructor(){super(...arguments);this.dir="ltr"}get isLTR(){return this.dir==="ltr"}hasVisibleFocusInTree(){const e=this.getRootNode().activeElement;if(!e)return!1;try{return e.matches(":focus-visible")||e.matches(".focus-visible")}catch(i){return e.matches(".focus-visible")}}connectedCallback(){if(!this.hasAttribute("dir")){let e=this.assignedSlot||this.parentNode;for(;e!==document.documentElement&&!w(e);)e=e.assignedSlot||e.parentNode||e.host;const i=this.dir;if(this.dir=e.dir==="rtl"?e.dir:this.dir||"ltr",i===this.dir&&this.setAttribute("dir",this.dir),e===document.documentElement)a.add(this);else{const{localName:s}=e;s.search("-")>-1&&!customElements.get(s)?customElements.whenDefined(s).then(()=>{e.startManagingContentDirection(this)}):e.startManagingContentDirection(this)}this._dirParent=e}super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback(),this._dirParent&&(this._dirParent===document.documentElement?a.delete(this):this._dirParent.stopManagingContentDirection(this),this.removeAttribute("dir"))}}return l([u({reflect:!0})],n.prototype,"dir",2),n}export class SpectrumElement extends SpectrumMixin(m){}
"use strict";import{LitElement as a}from"lit";const i=new Set,l=()=>{const n=document.documentElement.dir==="rtl"?document.documentElement.dir:"ltr";i.forEach(s=>{s.setAttribute("dir",n)})},c=new MutationObserver(l);c.observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]});const d=n=>typeof n.startManagingContentDirection!="undefined"||n.tagName==="SP-THEME";export function SpectrumMixin(n){class s extends n{get isLTR(){return this.dir==="ltr"}hasVisibleFocusInTree(){const e=this.getRootNode().activeElement;if(!e)return!1;try{return e.matches(":focus-visible")||e.matches(".focus-visible")}catch(t){return e.matches(".focus-visible")}}connectedCallback(){if(!this.hasAttribute("dir")){let e=this.assignedSlot||this.parentNode;for(;e!==document.documentElement&&!d(e);)e=e.assignedSlot||e.parentNode||e.host;if(this.dir=e.dir==="rtl"?e.dir:this.dir||"ltr",e===document.documentElement)i.add(this);else{const{localName:t}=e;t.search("-")>-1&&!customElements.get(t)?customElements.whenDefined(t).then(()=>{e.startManagingContentDirection(this)}):e.startManagingContentDirection(this)}this._dirParent=e}super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback(),this._dirParent&&(this._dirParent===document.documentElement?i.delete(this):this._dirParent.stopManagingContentDirection(this),this.removeAttribute("dir"))}}return s}export class SpectrumElement extends SpectrumMixin(a){}
//# sourceMappingURL=Base.js.map

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc