@taprootio/espalier 4.19.0 → 4.20.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/CHANGELOG.md +19 -0
- package/custom-elements.json +9178 -8922
- package/dist/image/esp-image.d.ts +17 -0
- package/dist/image/esp-image.js +46 -22
- package/dist/image/scrim-reach.js +1 -0
- package/dist/page/esp-page.d.ts +18 -2
- package/dist/page/esp-page.js +50 -33
- package/dist/section/esp-section.d.ts +23 -3
- package/dist/section/esp-section.js +4 -4
- package/espalier.css-data.json +1 -1
- package/espalier.token-manifest.json +1 -1
- package/package.json +1 -1
|
@@ -33,11 +33,13 @@ import { EspalierElementBase } from "../shared/esp-element-base.js";
|
|
|
33
33
|
*
|
|
34
34
|
* A section may also tint one raster alpha mask behind its content.
|
|
35
35
|
* The component owns clipping, no-repeat mask behavior, stacking, and
|
|
36
|
-
* interaction isolation; consumers
|
|
37
|
-
* position, size, and
|
|
36
|
+
* interaction isolation; consumers opt in with the `decoration`
|
|
37
|
+
* attribute and supply only the image, semantic tint, position, size, and
|
|
38
|
+
* opacity:
|
|
38
39
|
*
|
|
39
40
|
* ```html
|
|
40
41
|
* <esp-section
|
|
42
|
+
* decoration
|
|
41
43
|
* style="
|
|
42
44
|
* --esp-section-decoration-image: url('/assets/brand-mark.png');
|
|
43
45
|
* --esp-section-decoration-position: calc(100% + 2rem) -2rem;
|
|
@@ -49,6 +51,15 @@ import { EspalierElementBase } from "../shared/esp-element-base.js";
|
|
|
49
51
|
* </esp-section>
|
|
50
52
|
* ```
|
|
51
53
|
*
|
|
54
|
+
* Without `decoration` the section renders no decorative layer at all, and
|
|
55
|
+
* the `--esp-section-decoration-*` hooks have no effect. The attribute is
|
|
56
|
+
* what keeps an undecorated band free of painted planes: accessibility
|
|
57
|
+
* auditors such as axe-core and Lighthouse do not model `mask-image`, so a
|
|
58
|
+
* tinted plane hidden only by a mask is read as the background behind every
|
|
59
|
+
* word in the section. Set it together with the image, never on its own. A
|
|
60
|
+
* decorated band is audited as though the tint covered it everywhere, so
|
|
61
|
+
* text that passes an audit also reads where it crosses the mark.
|
|
62
|
+
*
|
|
52
63
|
* CSS image values are trusted stylesheet input. Products that accept image
|
|
53
64
|
* references from documents or users must enforce their own asset ownership
|
|
54
65
|
* and URL policy before mapping a value to this hook.
|
|
@@ -61,7 +72,7 @@ import { EspalierElementBase } from "../shared/esp-element-base.js";
|
|
|
61
72
|
* @cssprop --esp-section-max-width - The content well's cap. Defaults to `var(--esp-page-well-max-width, 72rem)`; `none` lets content span the band.
|
|
62
73
|
* @cssprop --esp-section-padding-block - Vertical rhythm above and below the well. Defaults to `var(--esp-size-section)`.
|
|
63
74
|
* @cssprop --esp-section-padding-inline - Horizontal breathing room inside the band at narrow viewports. Defaults to `var(--esp-size-medium)`.
|
|
64
|
-
* @cssprop --esp-section-decoration-image - Raster alpha mask painted behind the well. Defaults to `none`.
|
|
75
|
+
* @cssprop --esp-section-decoration-image - Raster alpha mask painted behind the well when `decoration` is set. Defaults to `none`.
|
|
65
76
|
* @cssprop --esp-section-decoration-color - Semantic tint applied through the mask. Defaults to the local `--esp-color-headings`.
|
|
66
77
|
* @cssprop --esp-section-decoration-position - Mask position, including responsive or bleeding values. Defaults to `center`.
|
|
67
78
|
* @cssprop --esp-section-decoration-size - Mask size. Defaults to `contain`.
|
|
@@ -72,6 +83,15 @@ import { EspalierElementBase } from "../shared/esp-element-base.js";
|
|
|
72
83
|
* @menuIcon layout
|
|
73
84
|
*/
|
|
74
85
|
export declare class EspalierSection extends EspalierElementBase {
|
|
86
|
+
/**
|
|
87
|
+
* Whether the section paints its decorative mask plane. Set it whenever
|
|
88
|
+
* `--esp-section-decoration-image` names an image; without it the
|
|
89
|
+
* section renders no decorative layer and the decoration hooks are
|
|
90
|
+
* inert.
|
|
91
|
+
*
|
|
92
|
+
* @type {boolean}
|
|
93
|
+
*/
|
|
94
|
+
decoration: boolean;
|
|
75
95
|
protected render(): import("lit-html").TemplateResult<1>;
|
|
76
96
|
static styles: import("lit").CSSResult[];
|
|
77
97
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
var
|
|
1
|
+
var p=function(r,t,o,n){var s=arguments.length,e=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(r,t,o,n);else for(var l=r.length-1;l>=0;l--)(a=r[l])&&(e=(s<3?a(e):s>3?a(t,o,e):a(t,o))||e);return s>3&&e&&Object.defineProperty(t,o,e),e};import{css as d,html as v,nothing as m}from"lit";import{customElement as u,property as h}from"lit/decorators.js";import{EspalierElementBase as c}from"../shared/esp-element-base.js";import{renderVisualOverlay as y,visualOverlayStyles as f}from"../shared/visual-overlay.js";let i=class extends c{constructor(){super(...arguments),this.decoration=!1}render(){return v`
|
|
2
2
|
<div class="esp-section" part="section">
|
|
3
|
-
${
|
|
3
|
+
${this.decoration?y({className:"decoration"}):m}
|
|
4
4
|
<div class="esp-section-well" part="well">
|
|
5
5
|
<slot></slot>
|
|
6
6
|
</div>
|
|
7
7
|
</div>
|
|
8
|
-
`}};
|
|
8
|
+
`}};i.styles=[...c.styles,d`
|
|
9
9
|
:host {
|
|
10
10
|
display: block;
|
|
11
11
|
}
|
|
@@ -40,4 +40,4 @@ var c=function(i,o,t,n){var a=arguments.length,e=a<3?o:n===null?n=Object.getOwnP
|
|
|
40
40
|
position: relative;
|
|
41
41
|
z-index: 1;
|
|
42
42
|
}
|
|
43
|
-
`,
|
|
43
|
+
`,f],p([h({type:Boolean,reflect:!0})],i.prototype,"decoration",void 0),i=p([u("esp-section")],i);export{i as EspalierSection};
|
package/espalier.css-data.json
CHANGED
|
@@ -1635,7 +1635,7 @@
|
|
|
1635
1635
|
},
|
|
1636
1636
|
{
|
|
1637
1637
|
"name": "--esp-section-decoration-image",
|
|
1638
|
-
"description": "Raster alpha mask painted behind the well. Defaults to `none`."
|
|
1638
|
+
"description": "Raster alpha mask painted behind the well when `decoration` is set. Defaults to `none`."
|
|
1639
1639
|
},
|
|
1640
1640
|
{
|
|
1641
1641
|
"name": "--esp-section-decoration-opacity",
|
|
@@ -2352,7 +2352,7 @@
|
|
|
2352
2352
|
"name": "--esp-section-decoration-image",
|
|
2353
2353
|
"category": "component",
|
|
2354
2354
|
"component": "esp-section",
|
|
2355
|
-
"description": "Raster alpha mask painted behind the well. Defaults to `none`."
|
|
2355
|
+
"description": "Raster alpha mask painted behind the well when `decoration` is set. Defaults to `none`."
|
|
2356
2356
|
},
|
|
2357
2357
|
{
|
|
2358
2358
|
"name": "--esp-section-decoration-opacity",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@taprootio/espalier",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.20.1",
|
|
4
4
|
"packageManager": "bun@1.3.12",
|
|
5
5
|
"description": "Espalier — a themeable, accessible, framework-agnostic, enterprise-grade design system built on web standards and love.",
|
|
6
6
|
"customElements": "custom-elements.json",
|