@no-gravity-elements/typography
Advanced tools
Comparing version 1.0.22 to 1.1.0
@@ -1,2 +0,2 @@ | ||
var K='.h1{font-size:calc(var(--nge-base-unit, 8px)*8);line-height:calc(var(--nge-base-unit, 8px)*8);font-weight:900}.h1,.h2,.h3{text-transform:var(--nge-typography-text-transform, uppercase)}.h2{font-size:calc(var(--nge-base-unit, 8px)*6);line-height:calc(var(--nge-base-unit, 8px)*6);font-weight:900}.h3{font-size:calc(var(--nge-base-unit, 8px)*4);line-height:calc(var(--nge-base-unit, 8px)*4.5);font-weight:800}.h4,.h5{line-height:calc(var(--nge-base-unit, 8px)*4)}.h4{font-size:calc(var(--nge-base-unit, 8px)*3);font-weight:800;text-transform:var(--nge-typography-text-transform, uppercase)}.h5{font-size:calc(var(--nge-base-unit, 8px)*2.5);font-weight:500}.h6{font-size:calc(var(--nge-base-unit, 8px)*2);line-height:calc(var(--nge-base-unit, 8px)*3)}.h6,.h7{font-weight:500}.h7,.sp{font-size:calc(var(--nge-base-unit, 8px)*1.5);line-height:calc(var(--nge-base-unit, 8px)*2.25)}.lp,.p,.sp{font-weight:200}.p{font-size:calc(var(--nge-base-unit, 8px)*2);line-height:calc(var(--nge-base-unit, 8px)*3)}.lp{font-size:calc(var(--nge-base-unit, 8px)*2.5);line-height:calc(var(--nge-base-unit, 8px)*4)}.legal{font-size:calc(var(--nge-base-unit, 8px)*1.125);line-height:calc(var(--nge-base-unit, 8px)*1.5);font-weight:500}.button{font-size:calc(var(--nge-base-unit, 8px)*1.75);line-height:calc(var(--nge-base-unit, 8px)*2);font-weight:500}:host{color:var(--color, var(--nge-primary-color, #fafafa));font-family:"Noto Sans",sans-serif;font-optical-sizing:auto;font-style:normal;font-variation-settings:"wdth"100}:host>*{margin:0}';var z,f,te,fe,w,Q,ne,W,he,D={},oe=[],de=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,$=Array.isArray;function k(e,t){for(var n in t)e[n]=t[n];return e}function re(e){var t=e.parentNode;t&&t.removeChild(e)}function b(e,t,n){var _,r,o,s={};for(o in t)o=="key"?_=t[o]:o=="ref"?r=t[o]:s[o]=t[o];if(arguments.length>2&&(s.children=arguments.length>3?z.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(o in e.defaultProps)s[o]===void 0&&(s[o]=e.defaultProps[o]);return S(e,s,_,r,null)}function S(e,t,n,_,r){var o={type:e,props:t,key:n,ref:_,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:r??++te,__i:-1,__u:0};return r==null&&f.vnode!=null&&f.vnode(o),o}function T(e){return e.children}function O(e,t){this.props=e,this.context=t}function P(e,t){if(t==null)return e.__?P(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?P(e):null}function _e(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return _e(e)}}function X(e){(!e.__d&&(e.__d=!0)&&w.push(e)&&!M.__r++||Q!==f.debounceRendering)&&((Q=f.debounceRendering)||ne)(M)}function M(){var e,t,n,_,r,o,s,l,c;for(w.sort(W);e=w.shift();)e.__d&&(t=w.length,_=void 0,o=(r=(n=e).__v).__e,l=[],c=[],(s=n.__P)&&((_=k({},r)).__v=r.__v+1,f.vnode&&f.vnode(_),I(s,_,r,n.__n,s.ownerSVGElement!==void 0,32&r.__u?[o]:null,l,o??P(r),!!(32&r.__u),c),_.__v=r.__v,_.__.__k[_.__i]=_,le(l,_,c),_.__e!=o&&_e(_)),w.length>t&&w.sort(W));M.__r=0}function ie(e,t,n,_,r,o,s,l,c,a,p){var i,v,u,d,x,g=_&&_.__k||oe,h=t.length;for(n.__d=c,ve(n,t,g),c=n.__d,i=0;i<h;i++)(u=n.__k[i])!=null&&typeof u!="boolean"&&typeof u!="function"&&(v=u.__i===-1?D:g[u.__i]||D,u.__i=i,I(e,u,v,r,o,s,l,c,a,p),d=u.__e,u.ref&&v.ref!=u.ref&&(v.ref&&R(v.ref,null,u),p.push(u.ref,u.__c||d,u)),x==null&&d!=null&&(x=d),65536&u.__u||v.__k===u.__k?(d||v.__e!=c||(c=P(v)),c=se(u,c,e)):typeof u.type=="function"&&u.__d!==void 0?c=u.__d:d&&(c=d.nextSibling),u.__d=void 0,u.__u&=-196609);n.__d=c,n.__e=x}function ve(e,t,n){var _,r,o,s,l,c=t.length,a=n.length,p=a,i=0;for(e.__k=[],_=0;_<c;_++)s=_+i,(r=e.__k[_]=(r=t[_])==null||typeof r=="boolean"||typeof r=="function"?null:typeof r=="string"||typeof r=="number"||typeof r=="bigint"||r.constructor==String?S(null,r,null,null,null):$(r)?S(T,{children:r},null,null,null):r.constructor===void 0&&r.__b>0?S(r.type,r.props,r.key,r.ref?r.ref:null,r.__v):r)!=null?(r.__=e,r.__b=e.__b+1,l=ge(r,n,s,p),r.__i=l,o=null,l!==-1&&(p--,(o=n[l])&&(o.__u|=131072)),o==null||o.__v===null?(l==-1&&i--,typeof r.type!="function"&&(r.__u|=65536)):l!==s&&(l===s+1?i++:l>s?p>c-s?i+=l-s:i--:l<s?l==s-1&&(i=l-s):i=0,l!==_+i&&(r.__u|=65536))):(o=n[s])&&o.key==null&&o.__e&&!(131072&o.__u)&&(o.__e==e.__d&&(e.__d=P(o)),j(o,o,!1),n[s]=null,p--);if(p)for(_=0;_<a;_++)(o=n[_])!=null&&!(131072&o.__u)&&(o.__e==e.__d&&(e.__d=P(o)),j(o,o))}function se(e,t,n){var _,r;if(typeof e.type=="function"){for(_=e.__k,r=0;_&&r<_.length;r++)_[r]&&(_[r].__=e,t=se(_[r],t,n));return t}e.__e!=t&&(n.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType===8);return t}function ge(e,t,n,_){var r=e.key,o=e.type,s=n-1,l=n+1,c=t[n];if(c===null||c&&r==c.key&&o===c.type&&!(131072&c.__u))return n;if(_>(c!=null&&!(131072&c.__u)?1:0))for(;s>=0||l<t.length;){if(s>=0){if((c=t[s])&&!(131072&c.__u)&&r==c.key&&o===c.type)return s;s--}if(l<t.length){if((c=t[l])&&!(131072&c.__u)&&r==c.key&&o===c.type)return l;l++}}return-1}function Y(e,t,n){t[0]==="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||de.test(t)?n:n+"px"}function F(e,t,n,_,r){var o;e:if(t==="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof _=="string"&&(e.style.cssText=_=""),_)for(t in _)n&&t in n||Y(e.style,t,"");if(n)for(t in n)_&&n[t]===_[t]||Y(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")o=t!==(t=t.replace(/(PointerCapture)$|Capture$/i,"$1")),t=t.toLowerCase()in e||t==="onFocusOut"||t==="onFocusIn"?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?_?n.u=_.u:(n.u=Date.now(),e.addEventListener(t,o?ee:Z,o)):e.removeEventListener(t,o?ee:Z,o);else{if(r)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t!=="rowSpan"&&t!=="colSpan"&&t!=="role"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,n))}}function Z(e){if(this.l){var t=this.l[e.type+!1];if(e.t){if(e.t<=t.u)return}else e.t=Date.now();return t(f.event?f.event(e):e)}}function ee(e){if(this.l)return this.l[e.type+!0](f.event?f.event(e):e)}function I(e,t,n,_,r,o,s,l,c,a){var p,i,v,u,d,x,g,h,y,C,N,E,J,U,H,m=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(c=!!(32&n.__u),o=[l=t.__e=n.__e]),(p=f.__b)&&p(t);e:if(typeof m=="function")try{if(h=t.props,y=(p=m.contextType)&&_[p.__c],C=p?y?y.props.value:p.__:_,n.__c?g=(i=t.__c=n.__c).__=i.__E:("prototype"in m&&m.prototype.render?t.__c=i=new m(h,C):(t.__c=i=new O(h,C),i.constructor=m,i.render=me),y&&y.sub(i),i.props=h,i.state||(i.state={}),i.context=C,i.__n=_,v=i.__d=!0,i.__h=[],i._sb=[]),i.__s==null&&(i.__s=i.state),m.getDerivedStateFromProps!=null&&(i.__s==i.state&&(i.__s=k({},i.__s)),k(i.__s,m.getDerivedStateFromProps(h,i.__s))),u=i.props,d=i.state,i.__v=t,v)m.getDerivedStateFromProps==null&&i.componentWillMount!=null&&i.componentWillMount(),i.componentDidMount!=null&&i.__h.push(i.componentDidMount);else{if(m.getDerivedStateFromProps==null&&h!==u&&i.componentWillReceiveProps!=null&&i.componentWillReceiveProps(h,C),!i.__e&&(i.shouldComponentUpdate!=null&&i.shouldComponentUpdate(h,i.__s,C)===!1||t.__v===n.__v)){for(t.__v!==n.__v&&(i.props=h,i.state=i.__s,i.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(A){A&&(A.__=t)}),N=0;N<i._sb.length;N++)i.__h.push(i._sb[N]);i._sb=[],i.__h.length&&s.push(i);break e}i.componentWillUpdate!=null&&i.componentWillUpdate(h,i.__s,C),i.componentDidUpdate!=null&&i.__h.push(function(){i.componentDidUpdate(u,d,x)})}if(i.context=C,i.props=h,i.__P=e,i.__e=!1,E=f.__r,J=0,"prototype"in m&&m.prototype.render){for(i.state=i.__s,i.__d=!1,E&&E(t),p=i.render(i.props,i.state,i.context),U=0;U<i._sb.length;U++)i.__h.push(i._sb[U]);i._sb=[]}else do i.__d=!1,E&&E(t),p=i.render(i.props,i.state,i.context),i.state=i.__s;while(i.__d&&++J<25);i.state=i.__s,i.getChildContext!=null&&(_=k(k({},_),i.getChildContext())),v||i.getSnapshotBeforeUpdate==null||(x=i.getSnapshotBeforeUpdate(u,d)),ie(e,$(H=p!=null&&p.type===T&&p.key==null?p.props.children:p)?H:[H],t,n,_,r,o,s,l,c,a),i.base=t.__e,t.__u&=-161,i.__h.length&&s.push(i),g&&(i.__E=i.__=null)}catch(A){t.__v=null,c||o!=null?(t.__e=l,t.__u|=c?160:32,o[o.indexOf(l)]=null):(t.__e=n.__e,t.__k=n.__k),f.__e(A,t,n)}else o==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=ye(n.__e,t,n,_,r,o,s,c,a);(p=f.diffed)&&p(t)}function le(e,t,n){t.__d=void 0;for(var _=0;_<n.length;_++)R(n[_],n[++_],n[++_]);f.__c&&f.__c(t,e),e.some(function(r){try{e=r.__h,r.__h=[],e.some(function(o){o.call(r)})}catch(o){f.__e(o,r.__v)}})}function ye(e,t,n,_,r,o,s,l,c){var a,p,i,v,u,d,x,g=n.props,h=t.props,y=t.type;if(y==="svg"&&(r=!0),o!=null){for(a=0;a<o.length;a++)if((u=o[a])&&"setAttribute"in u==!!y&&(y?u.localName===y:u.nodeType===3)){e=u,o[a]=null;break}}if(e==null){if(y===null)return document.createTextNode(h);e=r?document.createElementNS("http://www.w3.org/2000/svg",y):document.createElement(y,h.is&&h),o=null,l=!1}if(y===null)g===h||l&&e.data===h||(e.data=h);else{if(o=o&&z.call(e.childNodes),g=n.props||D,!l&&o!=null)for(g={},a=0;a<e.attributes.length;a++)g[(u=e.attributes[a]).name]=u.value;for(a in g)u=g[a],a=="children"||(a=="dangerouslySetInnerHTML"?i=u:a==="key"||a in h||F(e,a,null,u,r));for(a in h)u=h[a],a=="children"?v=u:a=="dangerouslySetInnerHTML"?p=u:a=="value"?d=u:a=="checked"?x=u:a==="key"||l&&typeof u!="function"||g[a]===u||F(e,a,u,g[a],r);if(p)l||i&&(p.__html===i.__html||p.__html===e.innerHTML)||(e.innerHTML=p.__html),t.__k=[];else if(i&&(e.innerHTML=""),ie(e,$(v)?v:[v],t,n,_,r&&y!=="foreignObject",o,s,o?o[0]:n.__k&&P(n,0),l,c),o!=null)for(a=o.length;a--;)o[a]!=null&&re(o[a]);l||(a="value",d!==void 0&&(d!==e[a]||y==="progress"&&!d||y==="option"&&d!==g[a])&&F(e,a,d,g[a],!1),a="checked",x!==void 0&&x!==e[a]&&F(e,a,x,g[a],!1))}return e}function R(e,t,n){try{typeof e=="function"?e(t):e.current=t}catch(_){f.__e(_,n)}}function j(e,t,n){var _,r;if(f.unmount&&f.unmount(e),(_=e.ref)&&(_.current&&_.current!==e.__e||R(_,null,t)),(_=e.__c)!=null){if(_.componentWillUnmount)try{_.componentWillUnmount()}catch(o){f.__e(o,t)}_.base=_.__P=null,e.__c=void 0}if(_=e.__k)for(r=0;r<_.length;r++)_[r]&&j(_[r],t,n||typeof e.type!="function");n||e.__e==null||re(e.__e),e.__=e.__e=e.__d=void 0}function me(e,t,n){return this.constructor(e,n)}function L(e,t,n){var _,r,o,s;f.__&&f.__(e,t),r=(_=typeof n=="function")?null:n&&n.__k||t.__k,o=[],s=[],I(t,e=(!_&&n||t).__k=b(T,null,[e]),r||D,D,t.ownerSVGElement!==void 0,!_&&n?[n]:r?null:t.firstChild?z.call(t.childNodes):null,o,!_&&n?n:r?r.__e:t.firstChild,_,s),le(o,e,s)}function B(e,t){L(e,t,B)}function V(e,t,n){var _,r,o,s,l=k({},e.props);for(o in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),t)o=="key"?_=t[o]:o=="ref"?r=t[o]:l[o]=t[o]===void 0&&s!==void 0?s[o]:t[o];return arguments.length>2&&(l.children=arguments.length>3?z.call(arguments,2):n),S(e.type,l,_||e.key,r||e.ref,null)}z=oe.slice,f={__e:function(e,t,n,_){for(var r,o,s;t=t.__;)if((r=t.__c)&&!r.__)try{if((o=r.constructor)&&o.getDerivedStateFromError!=null&&(r.setState(o.getDerivedStateFromError(e)),s=r.__d),r.componentDidCatch!=null&&(r.componentDidCatch(e,_||{}),s=r.__d),s)return r.__E=r}catch(l){e=l}throw e}},te=0,fe=function(e){return e!=null&&e.constructor==null},O.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=k({},this.state),typeof e=="function"&&(e=e(k({},n),this.props)),e&&k(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),X(this))},O.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),X(this))},O.prototype.render=T,w=[],ne=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,W=function(e,t){return e.__v.__b-t.__v.__b},M.__r=0,he=0;function G(){return(G=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var _ in n)Object.prototype.hasOwnProperty.call(n,_)&&(e[_]=n[_])}return e}).apply(this,arguments)}var be=["context","children"];function xe(e){this.getChildContext=function(){return e.context};var t=e.children,n=function(_,r){if(_==null)return{};var o,s,l={},c=Object.keys(_);for(s=0;s<c.length;s++)r.indexOf(o=c[s])>=0||(l[o]=_[o]);return l}(e,be);return V(t,n)}function ke(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=b(xe,G({},this._props,{context:e.detail.context}),function t(n,_){if(n.nodeType===3)return n.data;if(n.nodeType!==1)return null;var r=[],o={},s=0,l=n.attributes,c=n.childNodes;for(s=l.length;s--;)l[s].name!=="slot"&&(o[l[s].name]=l[s].value,o[ce(l[s].name)]=l[s].value);for(s=c.length;s--;){var a=t(c[s],null),p=c[s].slot;p?o[p]=b(ae,{name:p},a):r[s]=a}var i=_?b(ae,null,r):r;return b(_||n.nodeName.toLowerCase(),o,i)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?B:L)(this._vdom,this._root)}function ce(e){return e.replace(/-(\w)/g,function(t,n){return n?n.toUpperCase():""})}function Ce(e,t,n){if(this._vdom){var _={};_[e]=n=n??void 0,_[ce(e)]=n,this._vdom=V(this._vdom,_),L(this._vdom,this._root)}}function we(){L(this._vdom=null,this._root)}function ae(e,t){var n=this;return b("slot",G({},e,{ref:function(_){_?(n.ref=_,n._listener||(n._listener=function(r){r.stopPropagation(),r.detail.context=t},_.addEventListener("_preact",n._listener))):n.ref.removeEventListener("_preact",n._listener)}}))}function ue(e,t,n,_){function r(){var o=Reflect.construct(HTMLElement,[],r);return o._vdomComponent=e,o._root=_&&_.shadow?o.attachShadow({mode:_.mode||"open"}):o,o}return(r.prototype=Object.create(HTMLElement.prototype)).constructor=r,r.prototype.connectedCallback=ke,r.prototype.attributeChangedCallback=Ce,r.prototype.disconnectedCallback=we,n=n||e.observedAttributes||Object.keys(e.propTypes||{}),r.observedAttributes=n,n.forEach(function(o){Object.defineProperty(r.prototype,o,{get:function(){return this._vdom.props[o]},set:function(s){this._vdom?this.attributeChangedCallback(o,null,s):(this._props||(this._props={}),this._props[o]=s,this.connectedCallback());var l=typeof s;s!=null&&l!=="string"&&l!=="boolean"&&l!=="number"||this.setAttribute(o,s)}})}),customElements.define(t||e.tagName||e.displayName||e.name,r)}import{TypographySizes as pe}from"@no-gravity-elements/types";var q=({size:e,tag:t})=>{let n=t||"span";return b(T,null,(()=>b(n,{class:e&&pe[e]||pe.p},b("slot",null)))()," ",b("style",{type:"text/css"},K))};q.observedAttributes=["tag","size"];var Pe=e=>customElements.get(e)!==void 0;Pe("nge-typography")||ue(q,"nge-typography",q?.observedAttributes||[],{shadow:!0}); | ||
var K='.h1{font-size:calc(var(--base-unit, 8px)*8);line-height:calc(var(--base-unit, 8px)*8);font-weight:900}.h1,.h2,.h3{text-transform:var(--nge-typography-text-transform, uppercase)}.h2{font-size:calc(var(--base-unit, 8px)*6);line-height:calc(var(--base-unit, 8px)*6);font-weight:900}.h3{font-size:calc(var(--base-unit, 8px)*4);line-height:calc(var(--base-unit, 8px)*4.5);font-weight:800}.h4,.h5{line-height:calc(var(--base-unit, 8px)*4)}.h4{font-size:calc(var(--base-unit, 8px)*3);font-weight:800;text-transform:var(--nge-typography-text-transform, uppercase)}.h5{font-size:calc(var(--base-unit, 8px)*2.5);font-weight:500}.h6{font-size:calc(var(--base-unit, 8px)*2);line-height:calc(var(--base-unit, 8px)*3)}.h6,.h7{font-weight:500}.h7,.sp{font-size:calc(var(--base-unit, 8px)*1.5);line-height:calc(var(--base-unit, 8px)*2.25)}.lp,.p,.sp{font-weight:200}.p{font-size:calc(var(--base-unit, 8px)*2);line-height:calc(var(--base-unit, 8px)*3)}.lp{font-size:calc(var(--base-unit, 8px)*2.5);line-height:calc(var(--base-unit, 8px)*4)}.legal{font-size:calc(var(--base-unit, 8px)*1.125);line-height:calc(var(--base-unit, 8px)*1.5);font-weight:500}.button{font-size:calc(var(--base-unit, 8px)*1.75);line-height:calc(var(--base-unit, 8px)*2);font-weight:500}:host{color:var(--text-color, #1a1a1a);font-family:"Noto Sans",sans-serif;font-optical-sizing:auto;font-style:normal;font-variation-settings:"wdth"100}:host>*{margin:0}';var z,f,te,fe,w,Q,ne,j,he,D={},oe=[],de=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,I=Array.isArray;function k(e,t){for(var n in t)e[n]=t[n];return e}function re(e){var t=e.parentNode;t&&t.removeChild(e)}function b(e,t,n){var _,r,o,s={};for(o in t)o=="key"?_=t[o]:o=="ref"?r=t[o]:s[o]=t[o];if(arguments.length>2&&(s.children=arguments.length>3?z.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(o in e.defaultProps)s[o]===void 0&&(s[o]=e.defaultProps[o]);return S(e,s,_,r,null)}function S(e,t,n,_,r){var o={type:e,props:t,key:n,ref:_,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:r??++te,__i:-1,__u:0};return r==null&&f.vnode!=null&&f.vnode(o),o}function T(e){return e.children}function O(e,t){this.props=e,this.context=t}function P(e,t){if(t==null)return e.__?P(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?P(e):null}function _e(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return _e(e)}}function X(e){(!e.__d&&(e.__d=!0)&&w.push(e)&&!M.__r++||Q!==f.debounceRendering)&&((Q=f.debounceRendering)||ne)(M)}function M(){var e,t,n,_,r,o,s,l,c;for(w.sort(j);e=w.shift();)e.__d&&(t=w.length,_=void 0,o=(r=(n=e).__v).__e,l=[],c=[],(s=n.__P)&&((_=k({},r)).__v=r.__v+1,f.vnode&&f.vnode(_),R(s,_,r,n.__n,s.ownerSVGElement!==void 0,32&r.__u?[o]:null,l,o??P(r),!!(32&r.__u),c),_.__v=r.__v,_.__.__k[_.__i]=_,le(l,_,c),_.__e!=o&&_e(_)),w.length>t&&w.sort(j));M.__r=0}function ie(e,t,n,_,r,o,s,l,c,a,p){var i,v,u,d,x,y=_&&_.__k||oe,h=t.length;for(n.__d=c,ve(n,t,y),c=n.__d,i=0;i<h;i++)(u=n.__k[i])!=null&&typeof u!="boolean"&&typeof u!="function"&&(v=u.__i===-1?D:y[u.__i]||D,u.__i=i,R(e,u,v,r,o,s,l,c,a,p),d=u.__e,u.ref&&v.ref!=u.ref&&(v.ref&&B(v.ref,null,u),p.push(u.ref,u.__c||d,u)),x==null&&d!=null&&(x=d),65536&u.__u||v.__k===u.__k?(d||v.__e!=c||(c=P(v)),c=se(u,c,e)):typeof u.type=="function"&&u.__d!==void 0?c=u.__d:d&&(c=d.nextSibling),u.__d=void 0,u.__u&=-196609);n.__d=c,n.__e=x}function ve(e,t,n){var _,r,o,s,l,c=t.length,a=n.length,p=a,i=0;for(e.__k=[],_=0;_<c;_++)s=_+i,(r=e.__k[_]=(r=t[_])==null||typeof r=="boolean"||typeof r=="function"?null:typeof r=="string"||typeof r=="number"||typeof r=="bigint"||r.constructor==String?S(null,r,null,null,null):I(r)?S(T,{children:r},null,null,null):r.constructor===void 0&&r.__b>0?S(r.type,r.props,r.key,r.ref?r.ref:null,r.__v):r)!=null?(r.__=e,r.__b=e.__b+1,l=ye(r,n,s,p),r.__i=l,o=null,l!==-1&&(p--,(o=n[l])&&(o.__u|=131072)),o==null||o.__v===null?(l==-1&&i--,typeof r.type!="function"&&(r.__u|=65536)):l!==s&&(l===s+1?i++:l>s?p>c-s?i+=l-s:i--:l<s?l==s-1&&(i=l-s):i=0,l!==_+i&&(r.__u|=65536))):(o=n[s])&&o.key==null&&o.__e&&!(131072&o.__u)&&(o.__e==e.__d&&(e.__d=P(o)),$(o,o,!1),n[s]=null,p--);if(p)for(_=0;_<a;_++)(o=n[_])!=null&&!(131072&o.__u)&&(o.__e==e.__d&&(e.__d=P(o)),$(o,o))}function se(e,t,n){var _,r;if(typeof e.type=="function"){for(_=e.__k,r=0;_&&r<_.length;r++)_[r]&&(_[r].__=e,t=se(_[r],t,n));return t}e.__e!=t&&(n.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType===8);return t}function ye(e,t,n,_){var r=e.key,o=e.type,s=n-1,l=n+1,c=t[n];if(c===null||c&&r==c.key&&o===c.type&&!(131072&c.__u))return n;if(_>(c!=null&&!(131072&c.__u)?1:0))for(;s>=0||l<t.length;){if(s>=0){if((c=t[s])&&!(131072&c.__u)&&r==c.key&&o===c.type)return s;s--}if(l<t.length){if((c=t[l])&&!(131072&c.__u)&&r==c.key&&o===c.type)return l;l++}}return-1}function Y(e,t,n){t[0]==="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||de.test(t)?n:n+"px"}function F(e,t,n,_,r){var o;e:if(t==="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof _=="string"&&(e.style.cssText=_=""),_)for(t in _)n&&t in n||Y(e.style,t,"");if(n)for(t in n)_&&n[t]===_[t]||Y(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")o=t!==(t=t.replace(/(PointerCapture)$|Capture$/i,"$1")),t=t.toLowerCase()in e||t==="onFocusOut"||t==="onFocusIn"?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?_?n.u=_.u:(n.u=Date.now(),e.addEventListener(t,o?ee:Z,o)):e.removeEventListener(t,o?ee:Z,o);else{if(r)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t!=="rowSpan"&&t!=="colSpan"&&t!=="role"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,n))}}function Z(e){if(this.l){var t=this.l[e.type+!1];if(e.t){if(e.t<=t.u)return}else e.t=Date.now();return t(f.event?f.event(e):e)}}function ee(e){if(this.l)return this.l[e.type+!0](f.event?f.event(e):e)}function R(e,t,n,_,r,o,s,l,c,a){var p,i,v,u,d,x,y,h,m,C,N,E,J,U,W,g=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(c=!!(32&n.__u),o=[l=t.__e=n.__e]),(p=f.__b)&&p(t);e:if(typeof g=="function")try{if(h=t.props,m=(p=g.contextType)&&_[p.__c],C=p?m?m.props.value:p.__:_,n.__c?y=(i=t.__c=n.__c).__=i.__E:("prototype"in g&&g.prototype.render?t.__c=i=new g(h,C):(t.__c=i=new O(h,C),i.constructor=g,i.render=ge),m&&m.sub(i),i.props=h,i.state||(i.state={}),i.context=C,i.__n=_,v=i.__d=!0,i.__h=[],i._sb=[]),i.__s==null&&(i.__s=i.state),g.getDerivedStateFromProps!=null&&(i.__s==i.state&&(i.__s=k({},i.__s)),k(i.__s,g.getDerivedStateFromProps(h,i.__s))),u=i.props,d=i.state,i.__v=t,v)g.getDerivedStateFromProps==null&&i.componentWillMount!=null&&i.componentWillMount(),i.componentDidMount!=null&&i.__h.push(i.componentDidMount);else{if(g.getDerivedStateFromProps==null&&h!==u&&i.componentWillReceiveProps!=null&&i.componentWillReceiveProps(h,C),!i.__e&&(i.shouldComponentUpdate!=null&&i.shouldComponentUpdate(h,i.__s,C)===!1||t.__v===n.__v)){for(t.__v!==n.__v&&(i.props=h,i.state=i.__s,i.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(A){A&&(A.__=t)}),N=0;N<i._sb.length;N++)i.__h.push(i._sb[N]);i._sb=[],i.__h.length&&s.push(i);break e}i.componentWillUpdate!=null&&i.componentWillUpdate(h,i.__s,C),i.componentDidUpdate!=null&&i.__h.push(function(){i.componentDidUpdate(u,d,x)})}if(i.context=C,i.props=h,i.__P=e,i.__e=!1,E=f.__r,J=0,"prototype"in g&&g.prototype.render){for(i.state=i.__s,i.__d=!1,E&&E(t),p=i.render(i.props,i.state,i.context),U=0;U<i._sb.length;U++)i.__h.push(i._sb[U]);i._sb=[]}else do i.__d=!1,E&&E(t),p=i.render(i.props,i.state,i.context),i.state=i.__s;while(i.__d&&++J<25);i.state=i.__s,i.getChildContext!=null&&(_=k(k({},_),i.getChildContext())),v||i.getSnapshotBeforeUpdate==null||(x=i.getSnapshotBeforeUpdate(u,d)),ie(e,I(W=p!=null&&p.type===T&&p.key==null?p.props.children:p)?W:[W],t,n,_,r,o,s,l,c,a),i.base=t.__e,t.__u&=-161,i.__h.length&&s.push(i),y&&(i.__E=i.__=null)}catch(A){t.__v=null,c||o!=null?(t.__e=l,t.__u|=c?160:32,o[o.indexOf(l)]=null):(t.__e=n.__e,t.__k=n.__k),f.__e(A,t,n)}else o==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=me(n.__e,t,n,_,r,o,s,c,a);(p=f.diffed)&&p(t)}function le(e,t,n){t.__d=void 0;for(var _=0;_<n.length;_++)B(n[_],n[++_],n[++_]);f.__c&&f.__c(t,e),e.some(function(r){try{e=r.__h,r.__h=[],e.some(function(o){o.call(r)})}catch(o){f.__e(o,r.__v)}})}function me(e,t,n,_,r,o,s,l,c){var a,p,i,v,u,d,x,y=n.props,h=t.props,m=t.type;if(m==="svg"&&(r=!0),o!=null){for(a=0;a<o.length;a++)if((u=o[a])&&"setAttribute"in u==!!m&&(m?u.localName===m:u.nodeType===3)){e=u,o[a]=null;break}}if(e==null){if(m===null)return document.createTextNode(h);e=r?document.createElementNS("http://www.w3.org/2000/svg",m):document.createElement(m,h.is&&h),o=null,l=!1}if(m===null)y===h||l&&e.data===h||(e.data=h);else{if(o=o&&z.call(e.childNodes),y=n.props||D,!l&&o!=null)for(y={},a=0;a<e.attributes.length;a++)y[(u=e.attributes[a]).name]=u.value;for(a in y)u=y[a],a=="children"||(a=="dangerouslySetInnerHTML"?i=u:a==="key"||a in h||F(e,a,null,u,r));for(a in h)u=h[a],a=="children"?v=u:a=="dangerouslySetInnerHTML"?p=u:a=="value"?d=u:a=="checked"?x=u:a==="key"||l&&typeof u!="function"||y[a]===u||F(e,a,u,y[a],r);if(p)l||i&&(p.__html===i.__html||p.__html===e.innerHTML)||(e.innerHTML=p.__html),t.__k=[];else if(i&&(e.innerHTML=""),ie(e,I(v)?v:[v],t,n,_,r&&m!=="foreignObject",o,s,o?o[0]:n.__k&&P(n,0),l,c),o!=null)for(a=o.length;a--;)o[a]!=null&&re(o[a]);l||(a="value",d!==void 0&&(d!==e[a]||m==="progress"&&!d||m==="option"&&d!==y[a])&&F(e,a,d,y[a],!1),a="checked",x!==void 0&&x!==e[a]&&F(e,a,x,y[a],!1))}return e}function B(e,t,n){try{typeof e=="function"?e(t):e.current=t}catch(_){f.__e(_,n)}}function $(e,t,n){var _,r;if(f.unmount&&f.unmount(e),(_=e.ref)&&(_.current&&_.current!==e.__e||B(_,null,t)),(_=e.__c)!=null){if(_.componentWillUnmount)try{_.componentWillUnmount()}catch(o){f.__e(o,t)}_.base=_.__P=null,e.__c=void 0}if(_=e.__k)for(r=0;r<_.length;r++)_[r]&&$(_[r],t,n||typeof e.type!="function");n||e.__e==null||re(e.__e),e.__=e.__e=e.__d=void 0}function ge(e,t,n){return this.constructor(e,n)}function L(e,t,n){var _,r,o,s;f.__&&f.__(e,t),r=(_=typeof n=="function")?null:n&&n.__k||t.__k,o=[],s=[],R(t,e=(!_&&n||t).__k=b(T,null,[e]),r||D,D,t.ownerSVGElement!==void 0,!_&&n?[n]:r?null:t.firstChild?z.call(t.childNodes):null,o,!_&&n?n:r?r.__e:t.firstChild,_,s),le(o,e,s)}function V(e,t){L(e,t,V)}function G(e,t,n){var _,r,o,s,l=k({},e.props);for(o in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),t)o=="key"?_=t[o]:o=="ref"?r=t[o]:l[o]=t[o]===void 0&&s!==void 0?s[o]:t[o];return arguments.length>2&&(l.children=arguments.length>3?z.call(arguments,2):n),S(e.type,l,_||e.key,r||e.ref,null)}z=oe.slice,f={__e:function(e,t,n,_){for(var r,o,s;t=t.__;)if((r=t.__c)&&!r.__)try{if((o=r.constructor)&&o.getDerivedStateFromError!=null&&(r.setState(o.getDerivedStateFromError(e)),s=r.__d),r.componentDidCatch!=null&&(r.componentDidCatch(e,_||{}),s=r.__d),s)return r.__E=r}catch(l){e=l}throw e}},te=0,fe=function(e){return e!=null&&e.constructor==null},O.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=k({},this.state),typeof e=="function"&&(e=e(k({},n),this.props)),e&&k(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),X(this))},O.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),X(this))},O.prototype.render=T,w=[],ne=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,j=function(e,t){return e.__v.__b-t.__v.__b},M.__r=0,he=0;function q(){return(q=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var _ in n)Object.prototype.hasOwnProperty.call(n,_)&&(e[_]=n[_])}return e}).apply(this,arguments)}var be=["context","children"];function xe(e){this.getChildContext=function(){return e.context};var t=e.children,n=function(_,r){if(_==null)return{};var o,s,l={},c=Object.keys(_);for(s=0;s<c.length;s++)r.indexOf(o=c[s])>=0||(l[o]=_[o]);return l}(e,be);return G(t,n)}function ke(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=b(xe,q({},this._props,{context:e.detail.context}),function t(n,_){if(n.nodeType===3)return n.data;if(n.nodeType!==1)return null;var r=[],o={},s=0,l=n.attributes,c=n.childNodes;for(s=l.length;s--;)l[s].name!=="slot"&&(o[l[s].name]=l[s].value,o[ce(l[s].name)]=l[s].value);for(s=c.length;s--;){var a=t(c[s],null),p=c[s].slot;p?o[p]=b(ae,{name:p},a):r[s]=a}var i=_?b(ae,null,r):r;return b(_||n.nodeName.toLowerCase(),o,i)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?V:L)(this._vdom,this._root)}function ce(e){return e.replace(/-(\w)/g,function(t,n){return n?n.toUpperCase():""})}function Ce(e,t,n){if(this._vdom){var _={};_[e]=n=n??void 0,_[ce(e)]=n,this._vdom=G(this._vdom,_),L(this._vdom,this._root)}}function we(){L(this._vdom=null,this._root)}function ae(e,t){var n=this;return b("slot",q({},e,{ref:function(_){_?(n.ref=_,n._listener||(n._listener=function(r){r.stopPropagation(),r.detail.context=t},_.addEventListener("_preact",n._listener))):n.ref.removeEventListener("_preact",n._listener)}}))}function ue(e,t,n,_){function r(){var o=Reflect.construct(HTMLElement,[],r);return o._vdomComponent=e,o._root=_&&_.shadow?o.attachShadow({mode:_.mode||"open"}):o,o}return(r.prototype=Object.create(HTMLElement.prototype)).constructor=r,r.prototype.connectedCallback=ke,r.prototype.attributeChangedCallback=Ce,r.prototype.disconnectedCallback=we,n=n||e.observedAttributes||Object.keys(e.propTypes||{}),r.observedAttributes=n,n.forEach(function(o){Object.defineProperty(r.prototype,o,{get:function(){return this._vdom.props[o]},set:function(s){this._vdom?this.attributeChangedCallback(o,null,s):(this._props||(this._props={}),this._props[o]=s,this.connectedCallback());var l=typeof s;s!=null&&l!=="string"&&l!=="boolean"&&l!=="number"||this.setAttribute(o,s)}})}),customElements.define(t||e.tagName||e.displayName||e.name,r)}import{TypographySizes as pe}from"@no-gravity-elements/types";var H=({size:e,tag:t})=>{let n=t||"span";return b(T,null,(()=>b(n,{class:e&&pe[e]||pe.p},b("slot",null)))()," ",b("style",{type:"text/css"},K))};H.observedAttributes=["tag","size"];var Pe=e=>customElements.get(e)!==void 0;Pe("nge-typography")||ue(H,"nge-typography",H?.observedAttributes||[],{shadow:H?.useShadowDom??!0}); | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@no-gravity-elements/typography", | ||
"version": "1.0.22", | ||
"version": "1.1.0", | ||
"description": "No Gravity Element", | ||
@@ -29,3 +29,3 @@ "author": "No Gravity Company", | ||
}, | ||
"gitHead": "90125668b1bd5c90cf4efa266e018522c8198398" | ||
"gitHead": "9d70830460b78959c9f7d3b2e3cd0ffe6879619f" | ||
} |
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
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
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
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
114377