@taprootio/espalier 2.3.0 → 2.3.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 +13 -0
- package/custom-elements.json +3028 -2087
- package/dist/breadcrumbs/esp-breadcrumbs.d.ts +1 -1
- package/dist/breadcrumbs/esp-breadcrumbs.js +6 -9
- package/dist/button/action-state-lightness.js +1 -0
- package/dist/button/esp-button.js +22 -10
- package/dist/image/esp-image.js +8 -8
- package/dist/image/image-dimensions.js +1 -0
- package/dist/image-upload/esp-image-upload.js +20 -22
- package/dist/lightbox/esp-lightbox.d.ts +4 -3
- package/dist/lightbox/esp-lightbox.js +250 -235
- package/dist/progress/esp-progress.d.ts +2 -1
- package/dist/progress/esp-progress.js +13 -7
- package/espalier.token-manifest.json +2 -2
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
var a=function(n,e,s,t){var o=arguments.length,i=o<3?e:t===null?t=Object.getOwnPropertyDescriptor(e,s):t,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,e,s,t);else for(var h=n.length-1;h>=0;h--)(c=n[h])&&(i=(o<3?c(i):o>3?c(e,s,i):c(e,s))||i);return o>3&&i&&Object.defineProperty(e,s,i),i};import{css as x,html as m,nothing as p,svg as
|
|
1
|
+
var a=function(n,e,s,t){var o=arguments.length,i=o<3?e:t===null?t=Object.getOwnPropertyDescriptor(e,s):t,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,e,s,t);else for(var h=n.length-1;h>=0;h--)(c=n[h])&&(i=(o<3?c(i):o>3?c(e,s,i):c(e,s))||i);return o>3&&i&&Object.defineProperty(e,s,i),i};import{css as x,html as m,nothing as p,svg as f}from"lit";import{customElement as y,property as l}from"lit/decorators.js";import{classMap as g}from"lit/directives/class-map.js";import{styleMap as b}from"lit/directives/style-map.js";import{EspalierElementBase as u}from"../shared/esp-element-base.js";const v=15.9155,d=2*Math.PI*v;let r=class extends u{constructor(){super(...arguments),this.value=null,this.max=100,this.label="",this.showValue=!1,this.size="medium",this.mode="bar"}get isIndeterminate(){return this.value===null||this.value===void 0}get clampedValue(){if(this.isIndeterminate)return 0;const e=Math.max(this.max,0);return Math.min(Math.max(this.value,0),e)}get percentage(){return this.isIndeterminate||this.max<=0?0:this.clampedValue/this.max*100}render(){return this.mode==="circle"?this.renderCircle():this.renderBar()}renderBar(){const e=this.isIndeterminate,s={track:!0,indeterminate:e},t=e?{}:{width:`${this.percentage}%`},o=this.showValue&&!e;return m`
|
|
2
2
|
<div
|
|
3
|
-
class=${
|
|
3
|
+
class=${g(s)}
|
|
4
4
|
role="progressbar"
|
|
5
5
|
aria-label=${this.label}
|
|
6
6
|
aria-valuemin="0"
|
|
@@ -11,7 +11,7 @@ var a=function(n,e,s,t){var o=arguments.length,i=o<3?e:t===null?t=Object.getOwnP
|
|
|
11
11
|
</div>
|
|
12
12
|
${o?m`<div class="value-text">${Math.round(this.percentage)}%</div>`:p}
|
|
13
13
|
`}renderCircle(){const e=this.isIndeterminate,s=e?d*.75:d-this.percentage/100*d,t=this.showValue&&!e;return m`
|
|
14
|
-
<div class=${
|
|
14
|
+
<div class=${g({"circle-container":!0,indeterminate:e})}>
|
|
15
15
|
<svg
|
|
16
16
|
viewBox="0 0 36 36"
|
|
17
17
|
class="circle-svg"
|
|
@@ -21,7 +21,7 @@ var a=function(n,e,s,t){var o=arguments.length,i=o<3?e:t===null?t=Object.getOwnP
|
|
|
21
21
|
aria-valuemax=${this.max}
|
|
22
22
|
aria-valuenow=${e?p:this.clampedValue}
|
|
23
23
|
>
|
|
24
|
-
${
|
|
24
|
+
${f`
|
|
25
25
|
<circle
|
|
26
26
|
class="circle-track"
|
|
27
27
|
cx="18" cy="18" r="${v}"
|
|
@@ -37,7 +37,7 @@ var a=function(n,e,s,t){var o=arguments.length,i=o<3?e:t===null?t=Object.getOwnP
|
|
|
37
37
|
stroke-dashoffset="${s}"
|
|
38
38
|
stroke-linecap="round"
|
|
39
39
|
/>
|
|
40
|
-
`} ${t?
|
|
40
|
+
`} ${t?f`
|
|
41
41
|
<text
|
|
42
42
|
x="18" y="18"
|
|
43
43
|
class="circle-text"
|
|
@@ -83,7 +83,10 @@ var a=function(n,e,s,t){var o=arguments.length,i=o<3?e:t===null?t=Object.getOwnP
|
|
|
83
83
|
|
|
84
84
|
.fill {
|
|
85
85
|
height: 100%;
|
|
86
|
-
background: var(
|
|
86
|
+
background: var(
|
|
87
|
+
--esp-progress-fill-color,
|
|
88
|
+
oklch(from var(--esp-color-action-background) var(--esp-l-muted) c h)
|
|
89
|
+
);
|
|
87
90
|
transition: width 0.3s ease;
|
|
88
91
|
min-width: 0;
|
|
89
92
|
}
|
|
@@ -132,7 +135,10 @@ var a=function(n,e,s,t){var o=arguments.length,i=o<3?e:t===null?t=Object.getOwnP
|
|
|
132
135
|
}
|
|
133
136
|
|
|
134
137
|
.circle-fill {
|
|
135
|
-
stroke: var(
|
|
138
|
+
stroke: var(
|
|
139
|
+
--esp-progress-fill-color,
|
|
140
|
+
oklch(from var(--esp-color-action-background) var(--esp-l-muted) c h)
|
|
141
|
+
);
|
|
136
142
|
transform: rotate(-90deg);
|
|
137
143
|
transform-origin: 50% 50%;
|
|
138
144
|
transition: stroke-dashoffset 0.3s ease;
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
"name": "--esp-breadcrumb-separator-color",
|
|
124
124
|
"category": "component",
|
|
125
125
|
"component": "esp-breadcrumbs",
|
|
126
|
-
"description": "Set the color of the separator. It defaults to
|
|
126
|
+
"description": "Set the color of the separator. It defaults to the semantic heading color so navigation structure stays visible in light and dark themes."
|
|
127
127
|
},
|
|
128
128
|
{
|
|
129
129
|
"name": "--esp-button-group-divider",
|
|
@@ -1379,7 +1379,7 @@
|
|
|
1379
1379
|
"name": "--esp-progress-fill-color",
|
|
1380
1380
|
"category": "component",
|
|
1381
1381
|
"component": "esp-progress",
|
|
1382
|
-
"description": "Color of the progress fill. Defaults to
|
|
1382
|
+
"description": "Color of the progress fill. Defaults to the active action hue at the semantic muted lightness so the filled and unfilled portions remain distinguishable in light and dark themes."
|
|
1383
1383
|
},
|
|
1384
1384
|
{
|
|
1385
1385
|
"name": "--esp-progress-font-size",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@taprootio/espalier",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.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",
|