beercss 4.0.20 → 4.0.21
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 +24 -20
- package/dist/cdn/beer.custom-element.js +2 -2
- package/dist/cdn/beer.custom-element.min.js +1 -1
- package/dist/cdn/beer.js +571 -498
- package/dist/cdn/beer.min.css +1 -1
- package/dist/cdn/beer.min.js +1 -1
- package/dist/cdn/beer.scoped.css +24 -20
- package/dist/cdn/beer.scoped.min.css +2 -2
- package/index.d.ts +23 -5
- package/package.json +16 -32
- package/src/cdn/beer.ts +15 -13
- package/src/cdn/customElement.d.ts +12 -0
- package/src/cdn/customElement.js +2 -2
- package/src/cdn/elements/badges.css +1 -1
- package/src/cdn/elements/fields.ts +12 -4
- package/src/cdn/elements/navigations.css +7 -7
- package/src/cdn/helpers/forms.css +5 -1
- package/src/cdn/helpers/ripples.ts +22 -14
- package/src/cdn/helpers/waves.css +6 -6
- package/src/cdn/settings/fonts.css +4 -4
- package/src/cdn/settings/reset.css +1 -1
- package/src/cdn/settings/theme.ts +13 -9
- package/src/cdn/utils.ts +27 -6
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><img src="https://img.shields.io/badge/brotli_size-14.
|
|
7
|
+
<a><img src="https://img.shields.io/badge/brotli_size-14.4kb-green" alt="brotli 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>
|
|
@@ -84,8 +84,8 @@ This project was guided by the **"Germany Beer Purity Law"** or **"Reinheitsgebo
|
|
|
84
84
|
### DEFAULT VERSION
|
|
85
85
|
|
|
86
86
|
```html
|
|
87
|
-
<link href="https://cdn.jsdelivr.net/npm/beercss@4.0.
|
|
88
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/beercss@4.0.
|
|
87
|
+
<link href="https://cdn.jsdelivr.net/npm/beercss@4.0.21/dist/cdn/beer.min.css" rel="stylesheet" />
|
|
88
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/beercss@4.0.21/dist/cdn/beer.min.js"></script>
|
|
89
89
|
<script type="module" src="https://cdn.jsdelivr.net/npm/material-dynamic-colors@1.1.4/dist/cdn/material-dynamic-colors.min.js"></script>
|
|
90
90
|
```
|
|
91
91
|
|
|
@@ -103,8 +103,8 @@ import "material-dynamic-colors";
|
|
|
103
103
|
Applied on child elements of `<* class="beer">...</*>`.
|
|
104
104
|
|
|
105
105
|
```html
|
|
106
|
-
<link href="https://cdn.jsdelivr.net/npm/beercss@4.0.
|
|
107
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/beercss@4.0.
|
|
106
|
+
<link href="https://cdn.jsdelivr.net/npm/beercss@4.0.21/dist/cdn/beer.scoped.min.css" rel="stylesheet" />
|
|
107
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/beercss@4.0.21/dist/cdn/beer.min.js"></script>
|
|
108
108
|
<script type="module" src="https://cdn.jsdelivr.net/npm/material-dynamic-colors@1.1.4/dist/cdn/material-dynamic-colors.min.js"></script>
|
|
109
109
|
```
|
|
110
110
|
|
|
@@ -122,7 +122,7 @@ import "material-dynamic-colors";
|
|
|
122
122
|
Applied on child elements of `<beer-css>...</beer-css>`.
|
|
123
123
|
|
|
124
124
|
```html
|
|
125
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/beercss@4.0.
|
|
125
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/beercss@4.0.21/dist/cdn/beer.custom-element.min.js"></script>
|
|
126
126
|
<script type="module" src="https://cdn.jsdelivr.net/npm/material-dynamic-colors@1.1.4/dist/cdn/material-dynamic-colors.min.js"></script>
|
|
127
127
|
```
|
|
128
128
|
|
|
@@ -138,7 +138,7 @@ import "material-dynamic-colors";
|
|
|
138
138
|
|
|
139
139
|
### LOCAL CDN VERSION
|
|
140
140
|
|
|
141
|
-
Download all files from CDN https://cdn.jsdelivr.net/npm/beercss@4.0.
|
|
141
|
+
Download all files from CDN https://cdn.jsdelivr.net/npm/beercss@4.0.21/dist/cdn/ and https://cdn.jsdelivr.net/npm/material-dynamic-colors@1.1.4/dist/cdn/. Now put the files inside a new folder in your project (like `/beercss` for example):
|
|
142
142
|
|
|
143
143
|
```html
|
|
144
144
|
<link href="/beercss/beer.min.css" rel="stylesheet" />
|
|
@@ -159,8 +159,8 @@ You can use this html to setup your project. See on [Codepen](https://codepen.io
|
|
|
159
159
|
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
|
160
160
|
<meta name="google" content="notranslate">
|
|
161
161
|
<title>Hello world</title>
|
|
162
|
-
<link href="https://cdn.jsdelivr.net/npm/beercss@4.0.
|
|
163
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/beercss@4.0.
|
|
162
|
+
<link href="https://cdn.jsdelivr.net/npm/beercss@4.0.21/dist/cdn/beer.min.css" rel="stylesheet">
|
|
163
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/beercss@4.0.21/dist/cdn/beer.min.js"></script>
|
|
164
164
|
<script type="module" src="https://cdn.jsdelivr.net/npm/material-dynamic-colors@1.1.4/dist/cdn/material-dynamic-colors.min.js"></script>
|
|
165
165
|
</head>
|
|
166
166
|
<body class="dark">
|
package/dist/cdn/beer.css
CHANGED
|
@@ -202,7 +202,7 @@ body.dark {
|
|
|
202
202
|
font-style: normal;
|
|
203
203
|
font-weight: 400;
|
|
204
204
|
font-display: swap;
|
|
205
|
-
src: url(material-symbols-outlined.woff2) format("woff2"), url(https://cdn.jsdelivr.net/npm/beercss@4.0.
|
|
205
|
+
src: url(material-symbols-outlined.woff2) format("woff2"), url(https://cdn.jsdelivr.net/npm/beercss@4.0.21/dist/cdn/material-symbols-outlined.woff2) format("woff2");
|
|
206
206
|
}
|
|
207
207
|
|
|
208
208
|
/* rounded icons */
|
|
@@ -212,7 +212,7 @@ body.dark {
|
|
|
212
212
|
font-style: normal;
|
|
213
213
|
font-weight: 400;
|
|
214
214
|
font-display: swap;
|
|
215
|
-
src: url(material-symbols-rounded.woff2) format("woff2"), url(https://cdn.jsdelivr.net/npm/beercss@4.0.
|
|
215
|
+
src: url(material-symbols-rounded.woff2) format("woff2"), url(https://cdn.jsdelivr.net/npm/beercss@4.0.21/dist/cdn/material-symbols-rounded.woff2) format("woff2");
|
|
216
216
|
}
|
|
217
217
|
|
|
218
218
|
/* sharp icons */
|
|
@@ -222,7 +222,7 @@ body.dark {
|
|
|
222
222
|
font-style: normal;
|
|
223
223
|
font-weight: 400;
|
|
224
224
|
font-display: swap;
|
|
225
|
-
src: url(material-symbols-sharp.woff2) format("woff2"), url(https://cdn.jsdelivr.net/npm/beercss@4.0.
|
|
225
|
+
src: url(material-symbols-sharp.woff2) format("woff2"), url(https://cdn.jsdelivr.net/npm/beercss@4.0.21/dist/cdn/material-symbols-sharp.woff2) format("woff2");
|
|
226
226
|
}
|
|
227
227
|
|
|
228
228
|
/* subset of only required icons */
|
|
@@ -232,7 +232,7 @@ body.dark {
|
|
|
232
232
|
font-style: normal;
|
|
233
233
|
font-weight: 400;
|
|
234
234
|
font-display: swap;
|
|
235
|
-
src: url(material-symbols-subset.woff2) format("woff2"), url(https://cdn.jsdelivr.net/npm/beercss@4.0.
|
|
235
|
+
src: url(material-symbols-subset.woff2) format("woff2"), url(https://cdn.jsdelivr.net/npm/beercss@4.0.21/dist/cdn/material-symbols-subset.woff2) format("woff2");
|
|
236
236
|
}
|
|
237
237
|
|
|
238
238
|
/* begin scoped */
|
|
@@ -311,7 +311,7 @@ label {
|
|
|
311
311
|
pointer-events: none;
|
|
312
312
|
}
|
|
313
313
|
|
|
314
|
-
|
|
314
|
+
:is(div:not([class]), div[class=active]):has(> :not(.responsive) ~ :is(menu, .tooltip, input)) {
|
|
315
315
|
display: inline-flex;
|
|
316
316
|
}
|
|
317
317
|
|
|
@@ -456,10 +456,14 @@ div:is(:not([class]), [class=active]):has(> :not(.responsive) ~ :is(menu, .toolt
|
|
|
456
456
|
border-end-end-radius: var(--_round) !important;
|
|
457
457
|
}
|
|
458
458
|
|
|
459
|
-
.circle
|
|
459
|
+
.circle {
|
|
460
460
|
border-radius: 50%;
|
|
461
461
|
}
|
|
462
462
|
|
|
463
|
+
.circle:is(button, .button, .chip) {
|
|
464
|
+
border-radius: var(--_size);
|
|
465
|
+
}
|
|
466
|
+
|
|
463
467
|
:is(.circle, .square):is(button, .button, .chip) {
|
|
464
468
|
padding: 0;
|
|
465
469
|
block-size: var(--_size);
|
|
@@ -1035,9 +1039,9 @@ sup {
|
|
|
1035
1039
|
|
|
1036
1040
|
:is(.wave, .chip, .button, button, nav.tabbed > a, .tabs > a, nav.toolbar > a):not([class*=ripple])::after,
|
|
1037
1041
|
nav:is(.left, .right, .bottom, .top).max > a::after,
|
|
1038
|
-
nav:is(.left, .right, .bottom, .top).max > :is(ol, ul
|
|
1042
|
+
nav:is(.left, .right, .bottom, .top).max > :is(ol > li, ul > li, div:not([class]), div[class=active]) > a::after,
|
|
1039
1043
|
nav:is(.left, .right, .bottom, .top):not(.max) > a > i::after,
|
|
1040
|
-
nav:is(.left, .right, .bottom, .top):not(.max) > :is(ol, ul
|
|
1044
|
+
nav:is(.left, .right, .bottom, .top):not(.max) > :is(ol > li, ul > li, div:not([class]), div[class=active]) a > i::after {
|
|
1041
1045
|
content: "";
|
|
1042
1046
|
position: absolute;
|
|
1043
1047
|
inset: 0;
|
|
@@ -1054,9 +1058,9 @@ nav:is(.left, .right, .bottom, .top):not(.max) > :is(ol, ul) > li > a > i::after
|
|
|
1054
1058
|
|
|
1055
1059
|
:is(.wave, .chip, .button, button, nav.tabbed > a, .tabs > a, nav.toolbar > a):not([class*=ripple]):is(:focus-visible, :hover)::after,
|
|
1056
1060
|
nav:is(.left, .right, .bottom, .top).max > a:not(.button, .chip):is(:focus-visible, :hover)::after,
|
|
1057
|
-
nav:is(.left, .right, .bottom, .top).max > :is(ol, ul
|
|
1061
|
+
nav:is(.left, .right, .bottom, .top).max > :is(ol > li, ul > li, div:not([class]), div[class=active]) > a:not(.button, .chip):is(:focus-visible, :hover)::after,
|
|
1058
1062
|
nav:is(.left, .right, .bottom, .top):not(.max) > a:not(.button, .chip):is(:focus-visible, :hover) > i::after,
|
|
1059
|
-
nav:is(.left, .right, .bottom, .top):not(.max) > :is(ol, ul
|
|
1063
|
+
nav:is(.left, .right, .bottom, .top):not(.max) > :is(ol > li, ul > li, div:not([class]), div[class=active]) > a:not(.button, .chip):is(:focus-visible, :hover) > i::after {
|
|
1060
1064
|
background-size: 22500%;
|
|
1061
1065
|
opacity: 0.1;
|
|
1062
1066
|
transition: background-size var(--speed2) linear;
|
|
@@ -1064,9 +1068,9 @@ nav:is(.left, .right, .bottom, .top):not(.max) > :is(ol, ul) > li > a:not(.butto
|
|
|
1064
1068
|
|
|
1065
1069
|
:is(.wave, .chip, .button, button, nav.tabbed > a, .tabs > a, nav.toolbar > a, nav.max > a):not([class*=ripple]):active::after,
|
|
1066
1070
|
nav:is(.left, .right, .bottom, .top).max > a:active::after,
|
|
1067
|
-
nav:is(.left, .right, .bottom, .top).max > :is(ol, ul
|
|
1071
|
+
nav:is(.left, .right, .bottom, .top).max > :is(ol > li, ul > li, div:not([class]), div[class=active]) > a:active::after,
|
|
1068
1072
|
nav:is(.left, .right, .bottom, .top):not(.max) > a:active > i::after,
|
|
1069
|
-
nav:is(.left, .right, .bottom, .top):not(.max) > :is(ol, ul
|
|
1073
|
+
nav:is(.left, .right, .bottom, .top):not(.max) > :is(ol > li, ul > li, div:not([class]), div[class=active]) > a:active > i::after {
|
|
1070
1074
|
background-size: 0%;
|
|
1071
1075
|
opacity: 0;
|
|
1072
1076
|
transition: none;
|
|
@@ -1162,7 +1166,7 @@ nav:is(.left, .right, .bottom, .top):not(.max) > :is(ol, ul) > li > a:active > i
|
|
|
1162
1166
|
}
|
|
1163
1167
|
|
|
1164
1168
|
nav:is(.left, .right, .top, .bottom) > a > .badge,
|
|
1165
|
-
nav:is(.left, .right, .top, .bottom) > :is(ol, ul
|
|
1169
|
+
nav:is(.left, .right, .top, .bottom) > :is(ol > li, ul > li, div:not([class]), div[class=active]) > a > .badge {
|
|
1166
1170
|
inset: 1rem auto auto 50%;
|
|
1167
1171
|
}
|
|
1168
1172
|
|
|
@@ -3190,7 +3194,7 @@ nav.max:is(.top, .bottom) {
|
|
|
3190
3194
|
}
|
|
3191
3195
|
|
|
3192
3196
|
nav:is(.left, .right, .top, .bottom) > a:not(.button, .chip),
|
|
3193
|
-
nav:is(.left, .right, .top, .bottom) > :is(ol, ul
|
|
3197
|
+
nav:is(.left, .right, .top, .bottom) > :is(ol > li, ul > li, div:not([class]), div[class=active]) > a:not(.button, .chip) {
|
|
3194
3198
|
display: flex;
|
|
3195
3199
|
flex-direction: column;
|
|
3196
3200
|
gap: 0.25rem;
|
|
@@ -3200,14 +3204,14 @@ nav:is(.left, .right, .top, .bottom) > :is(ol, ul) > li > a:not(.button, .chip)
|
|
|
3200
3204
|
}
|
|
3201
3205
|
|
|
3202
3206
|
nav:not(.max):is(.left, .right, .top, .bottom) > a:not(.button, .chip) > i,
|
|
3203
|
-
nav:not(.max):is(.left, .right, .top, .bottom) > :is(ol, ul
|
|
3207
|
+
nav:not(.max):is(.left, .right, .top, .bottom) > :is(ol > li, ul > li, div:not([class]), div[class=active]) > a:not(.button, .chip) > i {
|
|
3204
3208
|
padding: 0.25rem 1rem;
|
|
3205
3209
|
border-radius: 2rem;
|
|
3206
3210
|
margin: 0 auto;
|
|
3207
3211
|
}
|
|
3208
3212
|
|
|
3209
3213
|
nav.max:is(.left, .right, .top, .bottom) > a:not(.button, .chip),
|
|
3210
|
-
nav.max:is(.left, .right, .top, .bottom) > :is(ol, ul
|
|
3214
|
+
nav.max:is(.left, .right, .top, .bottom) > :is(ol > li, ul > li, div:not([class]), div[class=active]) > a:not(.button, .chip) {
|
|
3211
3215
|
flex-direction: row;
|
|
3212
3216
|
gap: 0.5rem;
|
|
3213
3217
|
inline-size: auto;
|
|
@@ -3218,21 +3222,21 @@ nav.max:is(.left, .right, .top, .bottom) > :is(ol, ul) > li > a:not(.button, .ch
|
|
|
3218
3222
|
}
|
|
3219
3223
|
|
|
3220
3224
|
nav:is(.left, .right, .top, .bottom) > a.active:not(.button, .chip),
|
|
3221
|
-
nav:is(.left, .right, .top, .bottom) > :is(ol, ul
|
|
3225
|
+
nav:is(.left, .right, .top, .bottom) > :is(ol > li, ul > li, div:not([class]), div[class=active]) > a.active:not(.button, .chip) {
|
|
3222
3226
|
transition: padding var(--speed1) linear;
|
|
3223
3227
|
}
|
|
3224
3228
|
|
|
3225
3229
|
nav.max:is(.top, .bottom) > a:not(.button, .chip),
|
|
3226
|
-
nav.max:is(.top, .bottom) > :is(ol, ul
|
|
3230
|
+
nav.max:is(.top, .bottom) > :is(ol > li, ul > li, div:not([class]), div[class=active]) > a:not(.button, .chip) {
|
|
3227
3231
|
gap: 0.25rem;
|
|
3228
3232
|
block-size: 2.5rem;
|
|
3229
3233
|
font-size: 0.8rem;
|
|
3230
3234
|
}
|
|
3231
3235
|
|
|
3232
3236
|
nav.max:is(.left, .right, .top, .bottom) > a.active:not(.button, .chip),
|
|
3233
|
-
nav.max:is(.left, .right, .top, .bottom) > :is(ol, ul
|
|
3237
|
+
nav.max:is(.left, .right, .top, .bottom) > :is(ol > li, ul > li, div:not([class]), div[class=active]) > a.active:not(.button, .chip),
|
|
3234
3238
|
nav:is(.left, .right, .top, .bottom):not(.max) > a.active:not(.button, .chip) > i,
|
|
3235
|
-
nav:is(.left, .right, .top, .bottom):not(.max) > :is(ol, ul
|
|
3239
|
+
nav:is(.left, .right, .top, .bottom):not(.max) > :is(ol > li, ul > li, div:not([class]), div[class=active]) > a.active:not(.button, .chip) > i {
|
|
3236
3240
|
background-color: var(--secondary-container);
|
|
3237
3241
|
color: var(--on-secondary-container);
|
|
3238
3242
|
}
|
|
@@ -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@4.0.
|
|
15
|
+
return await import("https://cdn.jsdelivr.net/npm/beercss@4.0.21/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@4.0.
|
|
26
|
+
element.setAttribute("href", "https://cdn.jsdelivr.net/npm/beercss@4.0.21/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@4.0.
|
|
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@4.0.21/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@4.0.21/dist/cdn/beer.scoped.min.css");element.setAttribute("rel", "stylesheet");head.appendChild(element);}async run() {await Promise.all([this.addJs(), this.addCss()]);ui();}}customElements.define("beer-css", BeerCssCustomElement);export default BeerCssCustomElement;
|