@spectrum-css/typography
Advanced tools
Comparing version
# Change Log | ||
## 7.0.0-s2-foundations.10 | ||
### Patch Changes | ||
- [#2786](https://github.com/adobe/spectrum-css/pull/2786) [`494da11`](https://github.com/adobe/spectrum-css/commit/494da118554c2ecc425564e42d25424325efc331) Thanks [@pfulton](https://github.com/pfulton)! - ## Feature [@spectrum-css/icon] | ||
Update source files to load the mappings from component-level to global tokens for size and transform values. This will allow for more consistent and predictable behavior when using the `size` and `transform` props on icons when switching between contexts for S1, S2, and Express. | ||
## Patch [@spectrum-css/typography] | ||
Remove the sourcemap footer from compiled assets. | ||
## 7.0.0-s2-foundations.9 | ||
@@ -4,0 +16,0 @@ |
@@ -5,2 +5,5 @@ { | ||
".spectrum", | ||
".spectrum .spectrum-Body", | ||
".spectrum .spectrum-Detail", | ||
".spectrum .spectrum-Heading", | ||
".spectrum--legacy", | ||
@@ -297,8 +300,4 @@ ".spectrum-Body", | ||
".spectrum-Heading:lang(zh) strong em", | ||
".spectrum-Typography", | ||
".spectrum-Typography .spectrum-Body", | ||
".spectrum-Typography .spectrum-Detail", | ||
".spectrum-Typography .spectrum-Heading", | ||
".spectrum-Typography:lang(ar)", | ||
".spectrum-Typography:lang(he)" | ||
".spectrum:lang(ar)", | ||
".spectrum:lang(he)" | ||
], | ||
@@ -305,0 +304,0 @@ "component": [], |
{ | ||
"name": "@spectrum-css/typography", | ||
"version": "7.0.0-s2-foundations.9", | ||
"version": "7.0.0-s2-foundations.10", | ||
"description": "The Spectrum CSS typography component", | ||
@@ -5,0 +5,0 @@ "license": "Apache-2.0", |
@@ -0,1 +1,2 @@ | ||
import { Variants } from "@spectrum-css/preview/decorators"; | ||
import { html } from "lit"; | ||
@@ -12,14 +13,17 @@ import { classMap } from "lit/directives/class-map.js"; | ||
export const Template = ({ | ||
rootClass = "spectrum-Typography", | ||
semantics = "body", | ||
size = "m", | ||
variant, | ||
weight, | ||
glyph = "sans-serif", | ||
id, | ||
content = [], | ||
customClasses = [], | ||
customStyles = {}, | ||
} = {}, context = {}) => { | ||
export const Template = (args, context) => { | ||
let { | ||
rootClass = "spectrum-Typography", | ||
semantics = "body", | ||
size = "m", | ||
variant, | ||
weight, | ||
glyph = "sans-serif", | ||
id, | ||
content = [], | ||
customClasses = [], | ||
customStyles = {}, | ||
} = args; | ||
// If the content is not an array, make it an array for easier processing | ||
if (!Array.isArray(content)) { | ||
@@ -38,13 +42,3 @@ content = [content]; | ||
if (typeof c !== "string" && (typeof c === "object" && !c._$litType$)) { | ||
return Template({ | ||
rootClass, | ||
semantics, | ||
size, | ||
variant, | ||
weight, | ||
glyph, | ||
id, | ||
customClasses, | ||
...c, | ||
}, context); | ||
return Template({ ...args, ...c }, context); | ||
} | ||
@@ -105,3 +99,3 @@ | ||
return html` | ||
<h2 class=${classMap(classes)} style=${ifDefined(styleMap(customStyles))} id=${ifDefined(id)}>${c}</h2> | ||
<h2 class=${classMap(classes)} style=${styleMap(customStyles)} id=${ifDefined(id)}>${c}</h2> | ||
`; | ||
@@ -111,3 +105,3 @@ | ||
return html` | ||
<p class=${classMap(classes)} style=${ifDefined(styleMap(customStyles))} id=${ifDefined(id)}>${c}</p> | ||
<p class=${classMap(classes)} style=${styleMap(customStyles)} id=${ifDefined(id)}>${c}</p> | ||
`; | ||
@@ -117,7 +111,7 @@ | ||
return html` | ||
<code class=${classMap(classes)} style=${ifDefined(styleMap(customStyles))} id=${ifDefined(id)}>${c}</code> | ||
<code class=${classMap(classes)} style=${styleMap(customStyles)} id=${ifDefined(id)}>${c}</code> | ||
`; | ||
return html` | ||
<span class=${classMap(classes)} style=${ifDefined(styleMap(customStyles))} id=${ifDefined(id)}>${c}</span> | ||
<span class=${classMap(classes)} style=${styleMap(customStyles)} id=${ifDefined(id)}>${c}</span> | ||
`; | ||
@@ -134,1 +128,3 @@ })} | ||
}; | ||
export const TypographyGroup = Variants({ Template }); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
250643
-1.03%3285
-3.18%