@codeforamerica/marcomms-design-system 1.17.0 → 1.17.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +64 -36
- package/package.json +1 -1
- package/src/shared/common.js +56 -6
- package/src/shared/typography.js +8 -30
package/dist/index.js
CHANGED
|
@@ -1,16 +1,66 @@
|
|
|
1
1
|
/*! For license information please see index.js.LICENSE.txt */
|
|
2
2
|
(()=>{"use strict";const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,i=Symbol(),a=new WeakMap;class o{constructor(t,e,a){if(this._$cssResult$=!0,a!==i)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const i=this.t;if(e&&void 0===t){const e=void 0!==i&&1===i.length;e&&(t=a.get(i)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&a.set(i,t))}return t}toString(){return this.cssText}}const s=(t,...e)=>{const a=1===t.length?t[0]:e.reduce((e,i,a)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[a+1],t[0]);return new o(a,t,i)},r=(i,a)=>{if(e)i.adoptedStyleSheets=a.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const e of a){const a=document.createElement("style"),o=t.litNonce;void 0!==o&&a.setAttribute("nonce",o),a.textContent=e.cssText,i.appendChild(a)}},n=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(t=>new o("string"==typeof t?t:t+"",void 0,i))(e)})(t):t,{is:l,defineProperty:c,getOwnPropertyDescriptor:h,getOwnPropertyNames:d,getOwnPropertySymbols:p,getPrototypeOf:g}=Object,u=globalThis,v=u.trustedTypes,m=v?v.emptyScript:"",f=u.reactiveElementPolyfillSupport,b=(t,e)=>t,w={toAttribute(t,e){switch(e){case Boolean:t=t?m:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},y=(t,e)=>!l(t,e),x={attribute:!0,type:String,converter:w,reflect:!1,useDefault:!1,hasChanged:y};Symbol.metadata??=Symbol("metadata"),u.litPropertyMetadata??=new WeakMap;class k extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=x){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),a=this.getPropertyDescriptor(t,i,e);void 0!==a&&c(this.prototype,t,a)}}static getPropertyDescriptor(t,e,i){const{get:a,set:o}=h(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get:a,set(e){const s=a?.call(this);o?.call(this,e),this.requestUpdate(t,s,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??x}static _$Ei(){if(this.hasOwnProperty(b("elementProperties")))return;const t=g(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(b("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(b("properties"))){const t=this.properties,e=[...d(t),...p(t)];for(const i of e)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,i]of e)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const i=this._$Eu(t,e);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(n(t))}else void 0!==t&&e.push(n(t));return e}static _$Eu(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return r(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$ET(t,e){const i=this.constructor.elementProperties.get(t),a=this.constructor._$Eu(t,i);if(void 0!==a&&!0===i.reflect){const o=(void 0!==i.converter?.toAttribute?i.converter:w).toAttribute(e,i.type);this._$Em=t,null==o?this.removeAttribute(a):this.setAttribute(a,o),this._$Em=null}}_$AK(t,e){const i=this.constructor,a=i._$Eh.get(t);if(void 0!==a&&this._$Em!==a){const t=i.getPropertyOptions(a),o="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:w;this._$Em=a;const s=o.fromAttribute(e,t.type);this[a]=s??this._$Ej?.get(a)??s,this._$Em=null}}requestUpdate(t,e,i,a=!1,o){if(void 0!==t){const s=this.constructor;if(!1===a&&(o=this[t]),i??=s.getPropertyOptions(t),!((i.hasChanged??y)(o,e)||i.useDefault&&i.reflect&&o===this._$Ej?.get(t)&&!this.hasAttribute(s._$Eu(t,i))))return;this.C(t,e,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,{useDefault:i,reflect:a,wrapped:o},s){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,s??e??this[t]),!0!==o||void 0!==s)||(this._$AL.has(t)||(this.hasUpdated||i||(e=void 0),this._$AL.set(t,e)),!0===a&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,i]of t){const{wrapped:t}=i,a=this[e];!0!==t||this._$AL.has(e)||void 0===a||this.C(e,void 0,i,a)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(t=>t.hostUpdate?.()),this.update(e)):this._$EM()}catch(e){throw t=!1,this._$EM(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM()}updated(t){}firstUpdated(t){}}k.elementStyles=[],k.shadowRootOptions={mode:"open"},k[b("elementProperties")]=new Map,k[b("finalized")]=new Map,f?.({ReactiveElement:k}),(u.reactiveElementVersions??=[]).push("2.1.2");const $=globalThis,_=t=>t,E=$.trustedTypes,A=E?E.createPolicy("lit-html",{createHTML:t=>t}):void 0,z="$lit$",P=`lit$${Math.random().toFixed(9).slice(2)}$`,S="?"+P,T=`<${S}>`,C=document,L=()=>C.createComment(""),U=t=>null===t||"object"!=typeof t&&"function"!=typeof t,M=Array.isArray,I="[ \t\n\f\r]",R=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,H=/-->/g,N=/>/g,O=RegExp(`>|${I}(?:([^\\s"'>=/]+)(${I}*=${I}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),V=/'/g,q=/"/g,B=/^(?:script|style|textarea|title)$/i,F=t=>(e,...i)=>({_$litType$:t,strings:e,values:i}),D=F(1),j=F(2),W=(F(3),Symbol.for("lit-noChange")),K=Symbol.for("lit-nothing"),X=new WeakMap,Z=C.createTreeWalker(C,129);function G(t,e){if(!M(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==A?A.createHTML(e):e}const Y=(t,e)=>{const i=t.length-1,a=[];let o,s=2===e?"<svg>":3===e?"<math>":"",r=R;for(let e=0;e<i;e++){const i=t[e];let n,l,c=-1,h=0;for(;h<i.length&&(r.lastIndex=h,l=r.exec(i),null!==l);)h=r.lastIndex,r===R?"!--"===l[1]?r=H:void 0!==l[1]?r=N:void 0!==l[2]?(B.test(l[2])&&(o=RegExp("</"+l[2],"g")),r=O):void 0!==l[3]&&(r=O):r===O?">"===l[0]?(r=o??R,c=-1):void 0===l[1]?c=-2:(c=r.lastIndex-l[2].length,n=l[1],r=void 0===l[3]?O:'"'===l[3]?q:V):r===q||r===V?r=O:r===H||r===N?r=R:(r=O,o=void 0);const d=r===O&&t[e+1].startsWith("/>")?" ":"";s+=r===R?i+T:c>=0?(a.push(n),i.slice(0,c)+z+i.slice(c)+P+d):i+P+(-2===c?e:d)}return[G(t,s+(t[i]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),a]};class J{constructor({strings:t,_$litType$:e},i){let a;this.parts=[];let o=0,s=0;const r=t.length-1,n=this.parts,[l,c]=Y(t,e);if(this.el=J.createElement(l,i),Z.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(a=Z.nextNode())&&n.length<r;){if(1===a.nodeType){if(a.hasAttributes())for(const t of a.getAttributeNames())if(t.endsWith(z)){const e=c[s++],i=a.getAttribute(t).split(P),r=/([.?@])?(.*)/.exec(e);n.push({type:1,index:o,name:r[2],strings:i,ctor:"."===r[1]?at:"?"===r[1]?ot:"@"===r[1]?st:it}),a.removeAttribute(t)}else t.startsWith(P)&&(n.push({type:6,index:o}),a.removeAttribute(t));if(B.test(a.tagName)){const t=a.textContent.split(P),e=t.length-1;if(e>0){a.textContent=E?E.emptyScript:"";for(let i=0;i<e;i++)a.append(t[i],L()),Z.nextNode(),n.push({type:2,index:++o});a.append(t[e],L())}}}else if(8===a.nodeType)if(a.data===S)n.push({type:2,index:o});else{let t=-1;for(;-1!==(t=a.data.indexOf(P,t+1));)n.push({type:7,index:o}),t+=P.length-1}o++}}static createElement(t,e){const i=C.createElement("template");return i.innerHTML=t,i}}function Q(t,e,i=t,a){if(e===W)return e;let o=void 0!==a?i._$Co?.[a]:i._$Cl;const s=U(e)?void 0:e._$litDirective$;return o?.constructor!==s&&(o?._$AO?.(!1),void 0===s?o=void 0:(o=new s(t),o._$AT(t,i,a)),void 0!==a?(i._$Co??=[])[a]=o:i._$Cl=o),void 0!==o&&(e=Q(t,o._$AS(t,e.values),o,a)),e}class tt{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:i}=this._$AD,a=(t?.creationScope??C).importNode(e,!0);Z.currentNode=a;let o=Z.nextNode(),s=0,r=0,n=i[0];for(;void 0!==n;){if(s===n.index){let e;2===n.type?e=new et(o,o.nextSibling,this,t):1===n.type?e=new n.ctor(o,n.name,n.strings,this,t):6===n.type&&(e=new rt(o,this,t)),this._$AV.push(e),n=i[++r]}s!==n?.index&&(o=Z.nextNode(),s++)}return Z.currentNode=C,a}p(t){let e=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class et{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,i,a){this.type=2,this._$AH=K,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=a,this._$Cv=a?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=Q(this,t,e),U(t)?t===K||null==t||""===t?(this._$AH!==K&&this._$AR(),this._$AH=K):t!==this._$AH&&t!==W&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>M(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==K&&U(this._$AH)?this._$AA.nextSibling.data=t:this.T(C.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:i}=t,a="number"==typeof i?this._$AC(t):(void 0===i.el&&(i.el=J.createElement(G(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===a)this._$AH.p(e);else{const t=new tt(a,this),i=t.u(this.options);t.p(e),this.T(i),this._$AH=t}}_$AC(t){let e=X.get(t.strings);return void 0===e&&X.set(t.strings,e=new J(t)),e}k(t){M(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,a=0;for(const o of t)a===e.length?e.push(i=new et(this.O(L()),this.O(L()),this,this.options)):i=e[a],i._$AI(o),a++;a<e.length&&(this._$AR(i&&i._$AB.nextSibling,a),e.length=a)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){const e=_(t).nextSibling;_(t).remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class it{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,a,o){this.type=1,this._$AH=K,this._$AN=void 0,this.element=t,this.name=e,this._$AM=a,this.options=o,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=K}_$AI(t,e=this,i,a){const o=this.strings;let s=!1;if(void 0===o)t=Q(this,t,e,0),s=!U(t)||t!==this._$AH&&t!==W,s&&(this._$AH=t);else{const a=t;let r,n;for(t=o[0],r=0;r<o.length-1;r++)n=Q(this,a[i+r],e,r),n===W&&(n=this._$AH[r]),s||=!U(n)||n!==this._$AH[r],n===K?t=K:t!==K&&(t+=(n??"")+o[r+1]),this._$AH[r]=n}s&&!a&&this.j(t)}j(t){t===K?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class at extends it{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===K?void 0:t}}class ot extends it{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==K)}}class st extends it{constructor(t,e,i,a,o){super(t,e,i,a,o),this.type=5}_$AI(t,e=this){if((t=Q(this,t,e,0)??K)===W)return;const i=this._$AH,a=t===K&&i!==K||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,o=t!==K&&(i===K||a);a&&this.element.removeEventListener(this.name,this,i),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class rt{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){Q(this,t)}}const nt=$.litHtmlPolyfillSupport;nt?.(J,et),($.litHtmlVersions??=[]).push("3.3.2");const lt=globalThis;class ct extends k{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,i)=>{const a=i?.renderBefore??e;let o=a._$litPart$;if(void 0===o){const t=i?.renderBefore??null;a._$litPart$=o=new et(e.insertBefore(L(),t),t,void 0,i??{})}return o._$AI(t),o})(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return W}}ct._$litElement$=!0,ct.finalized=!0,lt.litElementHydrateSupport?.({LitElement:ct});const ht=lt.litElementPolyfillSupport;ht?.({LitElement:ct}),(lt.litElementVersions??=[]).push("4.2.2");const dt=s`
|
|
3
|
-
*,
|
|
4
|
-
*::before,
|
|
5
|
-
*::after {
|
|
6
|
-
box-sizing: border-box;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
3
|
*:focus-visible,
|
|
10
4
|
*:target {
|
|
11
5
|
outline: var(--focus-outline);
|
|
12
6
|
position: relative;
|
|
13
7
|
}
|
|
8
|
+
|
|
9
|
+
// RESET
|
|
10
|
+
|
|
11
|
+
// Use a more-intuitive box-sizing model.
|
|
12
|
+
*, *::before, *::after {
|
|
13
|
+
box-sizing: border-box;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
// Remove default margin
|
|
17
|
+
* {
|
|
18
|
+
margin: 0;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// Set default text-wrap of 'pretty'
|
|
22
|
+
* {
|
|
23
|
+
text-wrap: pretty;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// Wrap overly long words
|
|
27
|
+
* {
|
|
28
|
+
overflow-wrap: break-word;
|
|
29
|
+
text-overflow: ellipsis;
|
|
30
|
+
word-break: break-word;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// Fix Safari antialiasing for variable fonts
|
|
34
|
+
* {
|
|
35
|
+
font-synthesis: none !important;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// Improve text rendering
|
|
39
|
+
body {
|
|
40
|
+
-webkit-font-smoothing: antialiased;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// Reasonable media defaults
|
|
44
|
+
img, picture, video, canvas, svg {
|
|
45
|
+
display: block;
|
|
46
|
+
height: auto;
|
|
47
|
+
max-width: 100%;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// Remove built-in form typography styles
|
|
51
|
+
input, button, textarea, select {
|
|
52
|
+
font: inherit;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// Avoid text overflows
|
|
56
|
+
p, h1, h2, h3, h4, h5, h6 {
|
|
57
|
+
overflow-wrap: break-word;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// Create a root stacking context
|
|
61
|
+
#root, #__next {
|
|
62
|
+
isolation: isolate;
|
|
63
|
+
}
|
|
14
64
|
`;class pt extends ct{static properties={imageUrl:{},altText:{},size:{}};static styles=(()=>[dt,s`
|
|
15
65
|
:host {
|
|
16
66
|
--bg-color: var(--blue-20);
|
|
@@ -553,61 +603,39 @@
|
|
|
553
603
|
|
|
554
604
|
// Lists
|
|
555
605
|
|
|
556
|
-
.ul
|
|
557
|
-
.content ul {
|
|
606
|
+
.ul {
|
|
558
607
|
list-style-type: disc;
|
|
559
608
|
padding-left: var(--spacing-layout-1);
|
|
560
609
|
}
|
|
561
610
|
|
|
562
|
-
.ul
|
|
563
|
-
.content ul + *,
|
|
564
|
-
* + .ul,
|
|
565
|
-
* + .content ul {
|
|
566
|
-
margin-block-start: var(--spacing, var(--spacing-layout-1));
|
|
567
|
-
}
|
|
568
|
-
|
|
569
|
-
.ul > li,
|
|
570
|
-
.content ul > li {
|
|
611
|
+
.ul > li {
|
|
571
612
|
margin-inline-start: 0;
|
|
572
613
|
padding-left: var(--spacing-component-2);
|
|
573
614
|
}
|
|
574
615
|
|
|
575
|
-
.ul > li + li
|
|
576
|
-
.content ul > li + li {
|
|
616
|
+
.ul > li + li {
|
|
577
617
|
margin-block-start: var(--spacing-layout-half);
|
|
578
618
|
}
|
|
579
619
|
|
|
580
|
-
.ul > li > ul
|
|
581
|
-
.content ul > li > ul {
|
|
620
|
+
.ul > li > ul {
|
|
582
621
|
margin-block-start: var(--spacing-layout-half);
|
|
583
622
|
}
|
|
584
623
|
|
|
585
|
-
.ol
|
|
586
|
-
.content ol {
|
|
624
|
+
.ol {
|
|
587
625
|
list-style-type: decimal;
|
|
588
626
|
padding-left: var(--spacing-layout-1);
|
|
589
627
|
}
|
|
590
628
|
|
|
591
|
-
.ol
|
|
592
|
-
.content ol + *,
|
|
593
|
-
* + .ol,
|
|
594
|
-
* + .content ol {
|
|
595
|
-
margin-block-start: var(--spacing, var(--spacing-layout-1));
|
|
596
|
-
}
|
|
597
|
-
|
|
598
|
-
.ol > li,
|
|
599
|
-
.content ol > li {
|
|
629
|
+
.ol > li {
|
|
600
630
|
margin-inline-start: 0;
|
|
601
631
|
padding-inline-start: var(--spacing-component-2);
|
|
602
632
|
}
|
|
603
633
|
|
|
604
|
-
.ol > li + li
|
|
605
|
-
.content ol > li + li {
|
|
634
|
+
.ol > li + li {
|
|
606
635
|
margin-block-start: var(--spacing-layout-half);
|
|
607
636
|
}
|
|
608
637
|
|
|
609
|
-
.ol > li > ul
|
|
610
|
-
.content ol > li > ul {
|
|
638
|
+
.ol > li > ul {
|
|
611
639
|
margin-block-start: var(--spacing-layout-half);
|
|
612
640
|
}
|
|
613
641
|
|
package/package.json
CHANGED
package/src/shared/common.js
CHANGED
|
@@ -1,15 +1,65 @@
|
|
|
1
1
|
import { css } from "lit";
|
|
2
2
|
|
|
3
3
|
export const commonStyles = css`
|
|
4
|
-
*,
|
|
5
|
-
*::before,
|
|
6
|
-
*::after {
|
|
7
|
-
box-sizing: border-box;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
4
|
*:focus-visible,
|
|
11
5
|
*:target {
|
|
12
6
|
outline: var(--focus-outline);
|
|
13
7
|
position: relative;
|
|
14
8
|
}
|
|
9
|
+
|
|
10
|
+
// RESET
|
|
11
|
+
|
|
12
|
+
// Use a more-intuitive box-sizing model.
|
|
13
|
+
*, *::before, *::after {
|
|
14
|
+
box-sizing: border-box;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// Remove default margin
|
|
18
|
+
* {
|
|
19
|
+
margin: 0;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// Set default text-wrap of 'pretty'
|
|
23
|
+
* {
|
|
24
|
+
text-wrap: pretty;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// Wrap overly long words
|
|
28
|
+
* {
|
|
29
|
+
overflow-wrap: break-word;
|
|
30
|
+
text-overflow: ellipsis;
|
|
31
|
+
word-break: break-word;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// Fix Safari antialiasing for variable fonts
|
|
35
|
+
* {
|
|
36
|
+
font-synthesis: none !important;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// Improve text rendering
|
|
40
|
+
body {
|
|
41
|
+
-webkit-font-smoothing: antialiased;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// Reasonable media defaults
|
|
45
|
+
img, picture, video, canvas, svg {
|
|
46
|
+
display: block;
|
|
47
|
+
height: auto;
|
|
48
|
+
max-width: 100%;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// Remove built-in form typography styles
|
|
52
|
+
input, button, textarea, select {
|
|
53
|
+
font: inherit;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// Avoid text overflows
|
|
57
|
+
p, h1, h2, h3, h4, h5, h6 {
|
|
58
|
+
overflow-wrap: break-word;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// Create a root stacking context
|
|
62
|
+
#root, #__next {
|
|
63
|
+
isolation: isolate;
|
|
64
|
+
}
|
|
15
65
|
`;
|
package/src/shared/typography.js
CHANGED
|
@@ -250,61 +250,39 @@ export const typographyStyles = css`
|
|
|
250
250
|
|
|
251
251
|
// Lists
|
|
252
252
|
|
|
253
|
-
.ul
|
|
254
|
-
.content ul {
|
|
253
|
+
.ul {
|
|
255
254
|
list-style-type: disc;
|
|
256
255
|
padding-left: var(--spacing-layout-1);
|
|
257
256
|
}
|
|
258
257
|
|
|
259
|
-
.ul
|
|
260
|
-
.content ul + *,
|
|
261
|
-
* + .ul,
|
|
262
|
-
* + .content ul {
|
|
263
|
-
margin-block-start: var(--spacing, var(--spacing-layout-1));
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
.ul > li,
|
|
267
|
-
.content ul > li {
|
|
258
|
+
.ul > li {
|
|
268
259
|
margin-inline-start: 0;
|
|
269
260
|
padding-left: var(--spacing-component-2);
|
|
270
261
|
}
|
|
271
262
|
|
|
272
|
-
.ul > li + li
|
|
273
|
-
.content ul > li + li {
|
|
263
|
+
.ul > li + li {
|
|
274
264
|
margin-block-start: var(--spacing-layout-half);
|
|
275
265
|
}
|
|
276
266
|
|
|
277
|
-
.ul > li > ul
|
|
278
|
-
.content ul > li > ul {
|
|
267
|
+
.ul > li > ul {
|
|
279
268
|
margin-block-start: var(--spacing-layout-half);
|
|
280
269
|
}
|
|
281
270
|
|
|
282
|
-
.ol
|
|
283
|
-
.content ol {
|
|
271
|
+
.ol {
|
|
284
272
|
list-style-type: decimal;
|
|
285
273
|
padding-left: var(--spacing-layout-1);
|
|
286
274
|
}
|
|
287
275
|
|
|
288
|
-
.ol
|
|
289
|
-
.content ol + *,
|
|
290
|
-
* + .ol,
|
|
291
|
-
* + .content ol {
|
|
292
|
-
margin-block-start: var(--spacing, var(--spacing-layout-1));
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
.ol > li,
|
|
296
|
-
.content ol > li {
|
|
276
|
+
.ol > li {
|
|
297
277
|
margin-inline-start: 0;
|
|
298
278
|
padding-inline-start: var(--spacing-component-2);
|
|
299
279
|
}
|
|
300
280
|
|
|
301
|
-
.ol > li + li
|
|
302
|
-
.content ol > li + li {
|
|
281
|
+
.ol > li + li {
|
|
303
282
|
margin-block-start: var(--spacing-layout-half);
|
|
304
283
|
}
|
|
305
284
|
|
|
306
|
-
.ol > li > ul
|
|
307
|
-
.content ol > li > ul {
|
|
285
|
+
.ol > li > ul {
|
|
308
286
|
margin-block-start: var(--spacing-layout-half);
|
|
309
287
|
}
|
|
310
288
|
|