beercss 3.13.0 → 3.13.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/README.md +9 -9
- package/dist/cdn/beer.css +27 -10
- package/dist/cdn/beer.custom-element.js +2 -2
- package/dist/cdn/beer.custom-element.min.js +1 -1
- package/dist/cdn/beer.js +12 -5
- package/dist/cdn/beer.min.css +1 -1
- package/dist/cdn/beer.min.js +1 -1
- package/dist/cdn/beer.scoped.css +27 -10
- package/dist/cdn/beer.scoped.min.css +1 -1
- package/package.json +1 -1
- package/src/cdn/customElement.js +2 -2
- package/src/cdn/elements/progress.css +25 -6
- package/src/cdn/elements/progress.ts +10 -2
- package/src/cdn/settings/fonts.css +4 -4
- package/src/cdn/utils.ts +3 -5
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<p align="center">
|
|
5
5
|
<a href="https://github.com/beercss/beercss/blob/main/LICENSE"><img src="https://img.shields.io/github/license/beercss/beercss" alt="License"></a>
|
|
6
6
|
<a href="https://github.com/beercss/beercss"><img src="https://img.shields.io/jsdelivr/npm/hy/beercss" alt="Downloads"></a>
|
|
7
|
-
<a href="https://bundlephobia.com/package/beercss@3.13.
|
|
7
|
+
<a href="https://bundlephobia.com/package/beercss@3.13.1" target="_blank"><img src="https://img.shields.io/bundlephobia/minzip/beercss@3.13.1" alt="minzipped size"></a>
|
|
8
8
|
<a href="https://www.npmjs.com/package/beercss"><img src="https://img.shields.io/npm/v/beercss" alt="Version"></a>
|
|
9
9
|
<a href="https://github.com/beercss/beercss/pulls"><img src="https://img.shields.io/github/issues-pr/beercss/beercss" alt="Pull Request"></a>
|
|
10
10
|
<a href="https://github.com/beercss/beercss/issues"><img src="https://img.shields.io/github/issues/beercss/beercss" alt="Issues"></a>
|
|
@@ -132,8 +132,8 @@ This project was guided by the **"Germany Beer Purity Law"** or **"Reinheitsgebo
|
|
|
132
132
|
### DEFAULT VERSION
|
|
133
133
|
|
|
134
134
|
```html
|
|
135
|
-
<link href="https://cdn.jsdelivr.net/npm/beercss@3.13.
|
|
136
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/beercss@3.13.
|
|
135
|
+
<link href="https://cdn.jsdelivr.net/npm/beercss@3.13.1/dist/cdn/beer.min.css" rel="stylesheet" />
|
|
136
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/beercss@3.13.1/dist/cdn/beer.min.js"></script>
|
|
137
137
|
<script type="module" src="https://cdn.jsdelivr.net/npm/material-dynamic-colors@1.1.2/dist/cdn/material-dynamic-colors.min.js"></script>
|
|
138
138
|
```
|
|
139
139
|
|
|
@@ -151,8 +151,8 @@ import "material-dynamic-colors";
|
|
|
151
151
|
Applied on child elements of `<* class="beer">...</*>`.
|
|
152
152
|
|
|
153
153
|
```html
|
|
154
|
-
<link href="https://cdn.jsdelivr.net/npm/beercss@3.13.
|
|
155
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/beercss@3.13.
|
|
154
|
+
<link href="https://cdn.jsdelivr.net/npm/beercss@3.13.1/dist/cdn/beer.scoped.min.css" rel="stylesheet" />
|
|
155
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/beercss@3.13.1/dist/cdn/beer.min.js"></script>
|
|
156
156
|
<script type="module" src="https://cdn.jsdelivr.net/npm/material-dynamic-colors@1.1.2/dist/cdn/material-dynamic-colors.min.js"></script>
|
|
157
157
|
```
|
|
158
158
|
|
|
@@ -170,7 +170,7 @@ import "material-dynamic-colors";
|
|
|
170
170
|
Applied on child elements of `<beer-css>...</beer-css>`.
|
|
171
171
|
|
|
172
172
|
```html
|
|
173
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/beercss@3.13.
|
|
173
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/beercss@3.13.1/dist/cdn/beer.custom-element.min.js"></script>
|
|
174
174
|
<script type="module" src="https://cdn.jsdelivr.net/npm/material-dynamic-colors@1.1.2/dist/cdn/material-dynamic-colors.min.js"></script>
|
|
175
175
|
```
|
|
176
176
|
|
|
@@ -186,7 +186,7 @@ import "material-dynamic-colors";
|
|
|
186
186
|
|
|
187
187
|
### LOCAL CDN VERSION
|
|
188
188
|
|
|
189
|
-
Download all files from CDN https://cdn.jsdelivr.net/npm/beercss@3.13.
|
|
189
|
+
Download all files from CDN https://cdn.jsdelivr.net/npm/beercss@3.13.1/dist/cdn/ and https://cdn.jsdelivr.net/npm/material-dynamic-colors@1.1.2/dist/cdn/. Now put the files inside a new folder in your project (like `/beercss` for example):
|
|
190
190
|
|
|
191
191
|
```html
|
|
192
192
|
<link href="/beercss/beer.min.css" rel="stylesheet" />
|
|
@@ -206,8 +206,8 @@ You can use this html to setup your project. See on [Codepen](https://codepen.io
|
|
|
206
206
|
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
|
207
207
|
<meta name="google" content="notranslate">
|
|
208
208
|
<title>Hello world</title>
|
|
209
|
-
<link href="https://cdn.jsdelivr.net/npm/beercss@3.13.
|
|
210
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/beercss@3.13.
|
|
209
|
+
<link href="https://cdn.jsdelivr.net/npm/beercss@3.13.1/dist/cdn/beer.min.css" rel="stylesheet">
|
|
210
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/beercss@3.13.1/dist/cdn/beer.min.js"></script>
|
|
211
211
|
<script type="module" src="https://cdn.jsdelivr.net/npm/material-dynamic-colors@1.1.2/dist/cdn/material-dynamic-colors.min.js"></script>
|
|
212
212
|
</head>
|
|
213
213
|
<body class="dark">
|
package/dist/cdn/beer.css
CHANGED
|
@@ -99,7 +99,7 @@ body.dark {
|
|
|
99
99
|
font-style: normal;
|
|
100
100
|
font-weight: 400;
|
|
101
101
|
font-display: block;
|
|
102
|
-
src: url(material-symbols-outlined.woff2) format("woff2"), url(https://cdn.jsdelivr.net/npm/beercss@3.13.
|
|
102
|
+
src: url(material-symbols-outlined.woff2) format("woff2"), url(https://cdn.jsdelivr.net/npm/beercss@3.13.1/dist/cdn/material-symbols-outlined.woff2) format("woff2");
|
|
103
103
|
}
|
|
104
104
|
/* rounded icons */
|
|
105
105
|
@font-face {
|
|
@@ -107,7 +107,7 @@ body.dark {
|
|
|
107
107
|
font-style: normal;
|
|
108
108
|
font-weight: 400;
|
|
109
109
|
font-display: block;
|
|
110
|
-
src: url(material-symbols-rounded.woff2) format("woff2"), url(https://cdn.jsdelivr.net/npm/beercss@3.13.
|
|
110
|
+
src: url(material-symbols-rounded.woff2) format("woff2"), url(https://cdn.jsdelivr.net/npm/beercss@3.13.1/dist/cdn/material-symbols-rounded.woff2) format("woff2");
|
|
111
111
|
}
|
|
112
112
|
/* sharp icons */
|
|
113
113
|
@font-face {
|
|
@@ -115,7 +115,7 @@ body.dark {
|
|
|
115
115
|
font-style: normal;
|
|
116
116
|
font-weight: 400;
|
|
117
117
|
font-display: block;
|
|
118
|
-
src: url(material-symbols-sharp.woff2) format("woff2"), url(https://cdn.jsdelivr.net/npm/beercss@3.13.
|
|
118
|
+
src: url(material-symbols-sharp.woff2) format("woff2"), url(https://cdn.jsdelivr.net/npm/beercss@3.13.1/dist/cdn/material-symbols-sharp.woff2) format("woff2");
|
|
119
119
|
}
|
|
120
120
|
/* subset of only required icons */
|
|
121
121
|
@font-face {
|
|
@@ -123,7 +123,7 @@ body.dark {
|
|
|
123
123
|
font-style: normal;
|
|
124
124
|
font-weight: 400;
|
|
125
125
|
font-display: block;
|
|
126
|
-
src: url(material-symbols-subset.woff2) format("woff2"), url(https://cdn.jsdelivr.net/npm/beercss@3.13.
|
|
126
|
+
src: url(material-symbols-subset.woff2) format("woff2"), url(https://cdn.jsdelivr.net/npm/beercss@3.13.1/dist/cdn/material-symbols-subset.woff2) format("woff2");
|
|
127
127
|
}
|
|
128
128
|
* {
|
|
129
129
|
-webkit-tap-highlight-color: transparent;
|
|
@@ -3672,6 +3672,10 @@ progress.medium {
|
|
|
3672
3672
|
progress.large {
|
|
3673
3673
|
--_size: 0.45rem;
|
|
3674
3674
|
}
|
|
3675
|
+
progress.indeterminate {
|
|
3676
|
+
--_value: 100;
|
|
3677
|
+
animation: 3.2s to-indeterminate ease infinite;
|
|
3678
|
+
}
|
|
3675
3679
|
progress:not(.circle, [value])::after {
|
|
3676
3680
|
content: "";
|
|
3677
3681
|
position: absolute;
|
|
@@ -3751,7 +3755,9 @@ progress.circle.large {
|
|
|
3751
3755
|
inline-size: 3.5rem;
|
|
3752
3756
|
block-size: 3.5rem;
|
|
3753
3757
|
}
|
|
3754
|
-
progress.circle:not([value])
|
|
3758
|
+
progress.circle:not([value]),
|
|
3759
|
+
progress.circle.indeterminate {
|
|
3760
|
+
--_value: 50;
|
|
3755
3761
|
animation: to-rotate 1s infinite linear;
|
|
3756
3762
|
}
|
|
3757
3763
|
:is(nav, .row, .field) > progress:not(.circle, .small, .medium, .large) {
|
|
@@ -3781,25 +3787,36 @@ progress.max + * {
|
|
|
3781
3787
|
}
|
|
3782
3788
|
@keyframes to-linear {
|
|
3783
3789
|
0% {
|
|
3784
|
-
margin
|
|
3790
|
+
margin: 0 0 0 -100%;
|
|
3791
|
+
}
|
|
3792
|
+
|
|
3793
|
+
50% {
|
|
3794
|
+
margin: 0 0 0 0;
|
|
3795
|
+
}
|
|
3796
|
+
|
|
3797
|
+
100% {
|
|
3798
|
+
margin: 0 0 0 100%;
|
|
3799
|
+
}
|
|
3800
|
+
}
|
|
3801
|
+
@keyframes to-indeterminate {
|
|
3802
|
+
0% {
|
|
3803
|
+
padding: 0 100% 0 0;
|
|
3785
3804
|
}
|
|
3786
3805
|
|
|
3787
3806
|
50% {
|
|
3788
|
-
|
|
3807
|
+
padding: 0 0 0 0;
|
|
3789
3808
|
}
|
|
3790
3809
|
|
|
3791
3810
|
100% {
|
|
3792
|
-
|
|
3811
|
+
padding: 0 0 0 100%;
|
|
3793
3812
|
}
|
|
3794
3813
|
}
|
|
3795
3814
|
@keyframes to-rotate {
|
|
3796
3815
|
from {
|
|
3797
|
-
--_value: 50;
|
|
3798
3816
|
transform: rotate(0deg);
|
|
3799
3817
|
}
|
|
3800
3818
|
|
|
3801
3819
|
to {
|
|
3802
|
-
--_value: 50;
|
|
3803
3820
|
transform: rotate(360deg);
|
|
3804
3821
|
}
|
|
3805
3822
|
}
|
|
@@ -12,7 +12,7 @@ class BeerCssCustomElement extends HTMLElement {
|
|
|
12
12
|
BeerCssCustomElement.isJsLoaded = true;
|
|
13
13
|
|
|
14
14
|
if (window.ui) return;
|
|
15
|
-
return await import("https://cdn.jsdelivr.net/npm/beercss@3.13.
|
|
15
|
+
return await import("https://cdn.jsdelivr.net/npm/beercss@3.13.1/dist/cdn/beer.min.js");
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
async addCss() {
|
|
@@ -23,7 +23,7 @@ class BeerCssCustomElement extends HTMLElement {
|
|
|
23
23
|
|
|
24
24
|
const head = document.querySelector("head");
|
|
25
25
|
const element = document.createElement("link");
|
|
26
|
-
element.setAttribute("href", "https://cdn.jsdelivr.net/npm/beercss@3.13.
|
|
26
|
+
element.setAttribute("href", "https://cdn.jsdelivr.net/npm/beercss@3.13.1/dist/cdn/beer.scoped.min.css");
|
|
27
27
|
element.setAttribute("rel", "stylesheet");
|
|
28
28
|
head.appendChild(element);
|
|
29
29
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
class BeerCssCustomElement extends HTMLElement {static isCssLoaded = false;static isJsLoaded = false;constructor() {super();this.run();}async addJs() {if (BeerCssCustomElement.isJsLoaded) return;BeerCssCustomElement.isJsLoaded = true;if (window.ui) return;return await import("https://cdn.jsdelivr.net/npm/beercss@3.13.
|
|
1
|
+
class BeerCssCustomElement extends HTMLElement {static isCssLoaded = false;static isJsLoaded = false;constructor() {super();this.run();}async addJs() {if (BeerCssCustomElement.isJsLoaded) return;BeerCssCustomElement.isJsLoaded = true;if (window.ui) return;return await import("https://cdn.jsdelivr.net/npm/beercss@3.13.1/dist/cdn/beer.min.js");}async addCss() {if (BeerCssCustomElement.isCssLoaded) return;BeerCssCustomElement.isCssLoaded = true;const isScoped = !!getComputedStyle(document.documentElement).getPropertyValue("--scoped");if (isScoped) return;const head = document.querySelector("head");const element = document.createElement("link");element.setAttribute("href", "https://cdn.jsdelivr.net/npm/beercss@3.13.1/dist/cdn/beer.scoped.min.css");element.setAttribute("rel", "stylesheet");head.appendChild(element);}async run() {this.classList.add("beer");await Promise.all([this.addJs(), this.addCss()]);ui();}}customElements.define("beer-css", BeerCssCustomElement);export default BeerCssCustomElement;
|
package/dist/cdn/beer.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
const _emptyNodeList = [];
|
|
2
2
|
const _weakElements = /* @__PURE__ */ new WeakSet();
|
|
3
|
-
const isChrome = navigator.userAgent.includes("Chrome")
|
|
4
|
-
navigator.userAgent.includes("Firefox");
|
|
5
|
-
navigator.userAgent.includes("Safari") && !
|
|
6
|
-
navigator.userAgent.includes("Edge");
|
|
3
|
+
const isChrome = navigator.userAgent.includes("Chrome");
|
|
4
|
+
navigator.userAgent.includes("Firefox") && !isChrome;
|
|
5
|
+
navigator.userAgent.includes("Safari") && !isChrome;
|
|
7
6
|
navigator.userAgent.includes("Windows");
|
|
8
7
|
const isMac = navigator.userAgent.includes("Macintosh");
|
|
9
8
|
navigator.userAgent.includes("Linux");
|
|
@@ -525,7 +524,15 @@ function onInputDocument(e) {
|
|
|
525
524
|
}
|
|
526
525
|
}
|
|
527
526
|
function updateProgress(progress) {
|
|
528
|
-
progress.
|
|
527
|
+
if (!progress.hasAttribute("value") && !progress.hasAttribute("max")) {
|
|
528
|
+
const value = hasClass(progress, "circle") ? "50" : "100";
|
|
529
|
+
progress.style.setProperty("--_value", value);
|
|
530
|
+
progress.setAttribute("value", value);
|
|
531
|
+
progress.setAttribute("max", "100");
|
|
532
|
+
progress.classList.add("indeterminate");
|
|
533
|
+
} else {
|
|
534
|
+
progress.style.setProperty("--_value", String(progress.value));
|
|
535
|
+
}
|
|
529
536
|
}
|
|
530
537
|
function updateAllProgress() {
|
|
531
538
|
if (isChrome && !isMac && !isIOS) return;
|