beercss 3.12.13 → 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 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.12.13" target="_blank"><img src="https://img.shields.io/bundlephobia/minzip/beercss@3.12.13" alt="minzipped size"></a>
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.12.13/dist/cdn/beer.min.css" rel="stylesheet" />
136
- <script type="module" src="https://cdn.jsdelivr.net/npm/beercss@3.12.13/dist/cdn/beer.min.js"></script>
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.12.13/dist/cdn/beer.scoped.min.css" rel="stylesheet" />
155
- <script type="module" src="https://cdn.jsdelivr.net/npm/beercss@3.12.13/dist/cdn/beer.min.js"></script>
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.12.13/dist/cdn/beer.custom-element.min.js"></script>
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.12.13/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):
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.12.13/dist/cdn/beer.min.css" rel="stylesheet">
210
- <script type="module" src="https://cdn.jsdelivr.net/npm/beercss@3.12.13/dist/cdn/beer.min.js"></script>
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.12.13/dist/cdn/material-symbols-outlined.woff2) format("woff2");
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.12.13/dist/cdn/material-symbols-rounded.woff2) format("woff2");
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.12.13/dist/cdn/material-symbols-sharp.woff2) format("woff2");
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.12.13/dist/cdn/material-symbols-subset.woff2) format("woff2");
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;
@@ -2144,38 +2144,33 @@ summary::-webkit-details-marker {
2144
2144
  display: none;
2145
2145
  }
2146
2146
  .field {
2147
- --_size: 3rem;
2147
+ --_input: 3rem;
2148
2148
  --_start: 1.2rem;
2149
- block-size: var(--_size);
2150
- margin-block-end: 2rem;
2149
+ --_middle: calc(var(--_input) / 2);
2151
2150
  border-radius: 0.25rem 0.25rem 0 0;
2152
- max-block-size: 12rem;
2153
- }
2154
- .grid > * > .field {
2155
- margin-block-end: 1rem;
2156
- }
2157
- .grid > * > .field + .field {
2158
- margin-block-start: 2rem;
2159
- }
2160
- .grid.no-space > * > .field + .field {
2161
- margin-block-start: 1rem;
2151
+ min-block-size: var(--_input);
2152
+ display: flex;
2153
+ flex-direction: column;
2162
2154
  }
2163
- .grid.medium-space > * > .field + .field {
2164
- margin-block-start: 2.5rem;
2155
+ .field.fill {
2156
+ --_background: var(--surface-variant);
2157
+ background-color: unset !important;
2158
+ color: unset !important;
2165
2159
  }
2166
- .grid.large-space > * > .field + .field {
2167
- margin-block-start: 3rem;
2160
+ .field.fill > :is(input, select, textarea) {
2161
+ background-color: var(--_background);
2162
+ z-index: 0;
2168
2163
  }
2169
2164
  .field.small {
2170
- --_size: 2.5rem;
2165
+ --_input: 2.5rem;
2171
2166
  --_start: 1rem;
2172
2167
  }
2173
2168
  .field.large {
2174
- --_size: 3.5rem;
2169
+ --_input: 3.5rem;
2175
2170
  --_start: 1.4rem;
2176
2171
  }
2177
2172
  .field.extra {
2178
- --_size: 4rem;
2173
+ --_input: 4rem;
2179
2174
  --_start: 1.6rem;
2180
2175
  }
2181
2176
  .field.border {
@@ -2194,37 +2189,37 @@ summary::-webkit-details-marker {
2194
2189
  border-radius: 2rem;
2195
2190
  }
2196
2191
  /* icon */
2197
- .field > :is(i, img, svg, progress, a:not(.helper, .error)) {
2192
+ .field > :is(i, img, svg, progress.circle, a) {
2198
2193
  position: absolute;
2199
- inset: 50% auto auto auto;
2200
- transform: translateY(-50%);
2194
+ inset: calc((var(--_input) / 2) - 0.75rem) auto auto auto;
2201
2195
  cursor: pointer;
2202
- z-index: 0;
2196
+ z-index: 10;
2197
+ inline-size: 1.5rem;
2198
+ block-size: 1.5rem;
2199
+ margin: auto 0;
2200
+ pointer-events: none;
2201
+ }
2202
+ .field > :is(a, .front) {
2203
+ pointer-events: all !important;
2204
+ }
2205
+ .field > a > :is(i, img, svg, progress.circle, a) {
2203
2206
  inline-size: 1.5rem;
2204
2207
  block-size: 1.5rem;
2205
2208
  }
2206
- .field > :is(i, img, svg, progress, a:not(.helper, .error)),
2207
- [dir=rtl] .field > :is(i, img, svg, progress, a:not(.helper, .error)):first-child {
2208
- inset: 50% 1rem auto auto;
2209
+ .field > :is(i, img, svg, progress.circle, a),
2210
+ [dir=rtl] .field > :is(i, img, svg, progress.circle, a):first-child {
2211
+ inset: calc(var(--_middle) - 0.75rem) 1rem auto auto;
2209
2212
  }
2210
- .field > :is(i, img, svg, progress, a:not(.helper, .error)):first-child,
2211
- [dir=rtl] .field > :is(i, img, svg, progress, a:not(.helper, .error)) {
2212
- inset: 50% auto auto 1rem;
2213
+ .field > :is(i, img, svg, progress.circle, a):first-child,
2214
+ [dir=rtl] .field > :is(i, img, svg, progress.circle, a) {
2215
+ inset: calc(var(--_middle) - 0.75rem) auto auto 1rem;
2213
2216
  }
2214
2217
  .field.invalid > i {
2215
2218
  color: var(--error);
2216
2219
  }
2217
2220
  .field > progress.circle {
2218
- inset-block-start: calc(50% - 0.75rem) !important;
2219
2221
  border-width: 0.1875rem;
2220
2222
  }
2221
- .field > a:not(.helper, .error) {
2222
- z-index: 10;
2223
- }
2224
- .field > a > :is(i, img, svg, progress, a:not(.helper, .error)) {
2225
- inline-size: 1.5rem;
2226
- block-size: 1.5rem;
2227
- }
2228
2223
  /* input, textarea and select */
2229
2224
  .field > :is(input, textarea, select) {
2230
2225
  all: unset;
@@ -2238,7 +2233,7 @@ summary::-webkit-details-marker {
2238
2233
  font-family: inherit;
2239
2234
  font-size: 1rem;
2240
2235
  inline-size: 100%;
2241
- block-size: 100%;
2236
+ min-block-size: var(--_input);
2242
2237
  outline: none;
2243
2238
  z-index: 1;
2244
2239
  background: none;
@@ -2257,10 +2252,9 @@ input::-webkit-date-and-time-value {
2257
2252
  border: 0.125rem solid transparent;
2258
2253
  padding: 0 0.875rem;
2259
2254
  }
2260
- .field.min > textarea {
2261
- overflow: hidden auto;
2262
- position: absolute;
2263
- inset: 0;
2255
+ .field > textarea:not([rows]) {
2256
+ field-sizing: content;
2257
+ max-block-size: 12rem;
2264
2258
  }
2265
2259
  input[type=file],
2266
2260
  input[type=color],
@@ -2347,18 +2341,6 @@ input[type=number] {
2347
2341
  .field > :disabled {
2348
2342
  cursor: not-allowed;
2349
2343
  }
2350
- .field.textarea.small:not(.min) {
2351
- --_size: 5rem;
2352
- }
2353
- .field.textarea:not(.min) {
2354
- --_size: 5.5rem;
2355
- }
2356
- .field.textarea.large:not(.min) {
2357
- --_size: 6rem;
2358
- }
2359
- .field.textarea.extra:not(.min) {
2360
- --_size: 6.5rem;
2361
- }
2362
2344
  .field > select {
2363
2345
  user-select: none;
2364
2346
  }
@@ -2378,27 +2360,26 @@ input[type=number] {
2378
2360
  .field > select > option {
2379
2361
  background-color: var(--surface);
2380
2362
  }
2381
- .field.label > :is(input, select) {
2363
+ .field > :is(input, select) {
2382
2364
  padding-block-start: 1rem;
2383
2365
  }
2384
- .field.label.border:not(.fill) > :is(input, select) {
2366
+ .field:not(.label) > :is(input, select),
2367
+ .field.border:not(.fill) > :is(input, select) {
2385
2368
  padding-block-start: 0;
2386
2369
  }
2387
2370
  .field > textarea {
2388
- padding-block-start: var(--_start);
2389
- white-space: pre-wrap;
2390
- overflow-wrap: break-word;
2371
+ padding-block-start: calc(var(--_start)) !important;
2391
2372
  }
2392
2373
  .field > textarea:focus {
2393
- padding-block-start: calc(var(--_start) - 0.06rem);
2374
+ padding-block-start: calc(var(--_start) - 0.01rem) !important;
2394
2375
  }
2395
2376
  .field:not(.label) > textarea,
2396
- .field.border.label:not(.fill) > textarea {
2397
- padding-block-start: calc(var(--_start) - 0.5rem);
2377
+ .field.border:not(.fill) > textarea {
2378
+ padding-block-start: calc(var(--_start) - 0.5rem) !important;
2398
2379
  }
2399
2380
  .field:not(.label) > textarea:focus,
2400
- .field.border.label:not(.fill) > textarea:focus {
2401
- padding-block-start: calc(var(--_start) - 0.56rem);
2381
+ .field.border:not(.fill) > textarea:focus {
2382
+ padding-block-start: calc(var(--_start) - 0.51rem) !important;
2402
2383
  }
2403
2384
  /* label */
2404
2385
  .field.label > label {
@@ -2406,19 +2387,22 @@ input[type=number] {
2406
2387
  position: absolute;
2407
2388
  inset: -0.5rem 1rem 0 var(--_start);
2408
2389
  display: flex;
2409
- block-size: calc(var(--_size) + 1rem);
2410
- line-height: calc(var(--_size) + 1rem);
2390
+ block-size: calc(var(--_input) + 1rem);
2391
+ line-height: calc(var(--_input) + 1rem);
2411
2392
  font-size: 1rem;
2412
2393
  transition: all 0.2s;
2413
2394
  gap: 0.25rem;
2414
2395
  white-space: nowrap;
2396
+ pointer-events: none;
2397
+ }
2398
+ [dir=rtl] .field.label > label {
2399
+ inset: -0.5rem var(--_start) 0 1rem;
2415
2400
  }
2416
2401
  .field.label.round > label {
2417
2402
  inset: -0.5rem 1.75rem 0 var(--_start);
2418
2403
  }
2419
- .field.label.textarea:not(.min) > label {
2420
- block-size: calc(var(--_size) - 1.5rem);
2421
- line-height: calc(var(--_size) - 1.5rem);
2404
+ [dir=rtl] .field.label.round > label {
2405
+ inset: -0.5rem 1.75rem 0 var(--_start);
2422
2406
  }
2423
2407
  .field.label.border.prefix:not(.fill) > :is(label.active, :focus + label, [placeholder]:not(:placeholder-shown) + label, select + label) {
2424
2408
  --_start: 1rem;
@@ -2487,27 +2471,21 @@ input[type=number] {
2487
2471
  font-size: 1rem;
2488
2472
  }
2489
2473
  /* helper */
2490
- .field > :is(.helper, .error) {
2491
- position: absolute;
2492
- inset: auto auto 0 1rem;
2493
- transform: translateY(100%);
2474
+ .field > output {
2475
+ display: inline-block;
2494
2476
  font-size: 0.75rem;
2495
2477
  background: none !important;
2496
- padding-block-start: 0.125rem;
2497
- }
2498
- [dir=rtl] .field > :is(.helper, .error) {
2499
- inset: auto 1rem 0 auto;
2500
- }
2501
- a.helper {
2502
- color: var(--primary);
2478
+ padding: 0.25rem 1rem;
2479
+ line-height: 1.25rem;
2480
+ align-self: start;
2503
2481
  }
2504
- .field > .error {
2482
+ .field > output.invalid {
2505
2483
  color: var(--error) !important;
2506
2484
  }
2507
- .field.round > :is(.helper, .error) {
2508
- inset-inline-start: 1.5rem;
2485
+ .field.round > output {
2486
+ padding: 0.25rem 1.5rem;
2509
2487
  }
2510
- .field.invalid > .helper {
2488
+ .field.invalid > output:not(.invalid) {
2511
2489
  display: none;
2512
2490
  }
2513
2491
  table td > .field {
@@ -3680,6 +3658,7 @@ progress {
3680
3658
  writing-mode: horizontal-tb;
3681
3659
  direction: ltr;
3682
3660
  -webkit-appearance: none;
3661
+ appearance: none;
3683
3662
  }
3684
3663
  .dark progress {
3685
3664
  background: var(--_dark);
@@ -3693,6 +3672,10 @@ progress.medium {
3693
3672
  progress.large {
3694
3673
  --_size: 0.45rem;
3695
3674
  }
3675
+ progress.indeterminate {
3676
+ --_value: 100;
3677
+ animation: 3.2s to-indeterminate ease infinite;
3678
+ }
3696
3679
  progress:not(.circle, [value])::after {
3697
3680
  content: "";
3698
3681
  position: absolute;
@@ -3744,29 +3727,38 @@ progress.wavy::-moz-progress-bar {
3744
3727
  mask-size: auto 100%;
3745
3728
  }
3746
3729
  progress.circle {
3747
- display: inline-block;
3730
+ --_value: attr(value type(<number>), 50);
3748
3731
  inline-size: 2.5rem;
3749
3732
  block-size: 2.5rem;
3733
+ background: conic-gradient(currentColor calc(var(--_value) * 1%), var(--active) 0%);
3750
3734
  border-radius: 50%;
3751
- border-width: 0.3rem;
3752
- border-style: solid;
3753
- border-color: currentcolor;
3754
- animation: 1.6s to-circular linear infinite;
3735
+ mask-image: radial-gradient(circle at center, transparent 57%, currentColor 60%);
3736
+ }
3737
+ progress.circle::-webkit-progress-value {
3755
3738
  background: none;
3756
- flex: none;
3757
3739
  }
3758
3740
  progress.circle::-moz-progress-bar {
3759
3741
  background: none;
3760
3742
  }
3743
+ progress.circle.wavy {
3744
+ background: conic-gradient(currentColor calc(var(--_value) * 1%), var(--active) 0);
3745
+ mask-repeat: no-repeat;
3746
+ mask-position: center;
3747
+ mask-size: contain;
3748
+ mask-image: url(wavy-circle.svg);
3749
+ }
3761
3750
  progress.circle.small {
3762
3751
  inline-size: 1.5rem;
3763
3752
  block-size: 1.5rem;
3764
- border-width: 0.2rem;
3765
3753
  }
3766
3754
  progress.circle.large {
3767
3755
  inline-size: 3.5rem;
3768
3756
  block-size: 3.5rem;
3769
- border-width: 0.4rem;
3757
+ }
3758
+ progress.circle:not([value]),
3759
+ progress.circle.indeterminate {
3760
+ --_value: 50;
3761
+ animation: to-rotate 1s infinite linear;
3770
3762
  }
3771
3763
  :is(nav, .row, .field) > progress:not(.circle, .small, .medium, .large) {
3772
3764
  flex: auto;
@@ -3787,81 +3779,45 @@ progress.max {
3787
3779
  progress.max[class*='-text'] {
3788
3780
  opacity: 1;
3789
3781
  }
3790
- progress:is(.horizontal, .vertical, .max) {
3791
- display: unset;
3792
- inline-size: 100% !important;
3793
- }
3794
- progress.vertical {
3795
- writing-mode: vertical-lr;
3796
- }
3797
- progress.max.vertical {
3798
- transform: rotate(-180deg);
3799
- }
3800
3782
  progress.max + * {
3801
3783
  margin-block-start: 0;
3802
3784
  }
3803
3785
  :is(.button, button, .chip) > progress.circle {
3804
3786
  color: inherit;
3805
3787
  }
3806
- @supports (-moz-appearance:none) {
3807
- progress.max.vertical {
3808
- transform: none;
3809
- }
3810
- }
3811
3788
  @keyframes to-linear {
3812
3789
  0% {
3813
- margin-inline-start: -100%;
3790
+ margin: 0 0 0 -100%;
3814
3791
  }
3815
3792
 
3816
3793
  50% {
3817
- margin-inline-start: 0%;
3794
+ margin: 0 0 0 0;
3818
3795
  }
3819
3796
 
3820
3797
  100% {
3821
- margin-inline-start: 100%;
3798
+ margin: 0 0 0 100%;
3822
3799
  }
3823
3800
  }
3824
- @keyframes to-circular {
3801
+ @keyframes to-indeterminate {
3825
3802
  0% {
3826
- transform: rotate(0deg);
3827
- clip-path: polygon(50% 50%, 0% 0%, 50% 0%, 50% 0%, 50% 0%, 50% 0%, 50% 0%, 50% 0%, 50% 0%);
3828
- }
3829
-
3830
- 20% {
3831
- clip-path: polygon(50% 50%, 0% 0%, 50% 0%, 100% 0%, 100% 0%, 100% 0%, 100% 0%, 100% 0%, 100% 0%);
3832
- }
3833
-
3834
- 30% {
3835
- clip-path: polygon(50% 50%, 0% 0%, 50% 0%, 100% 0%, 100% 50%, 100% 50%, 100% 50%, 100% 50%, 100% 50%);
3836
- }
3837
-
3838
- 40% {
3839
- clip-path: polygon(50% 50%, 0% 0%, 50% 0%, 100% 0%, 100% 50%, 100% 100%, 100% 100%, 100% 100%, 100% 100%);
3803
+ padding: 0 100% 0 0;
3840
3804
  }
3841
3805
 
3842
3806
  50% {
3843
- clip-path: polygon(50% 50%, 50% 0%, 50% 0%, 100% 0%, 100% 50%, 100% 100%, 50% 100%, 50% 100%, 50% 100%);
3844
- }
3845
-
3846
- 60% {
3847
- clip-path: polygon(50% 50%, 100% 50%, 100% 50%, 100% 50%, 100% 50%, 100% 100%, 50% 100%, 0% 100%, 0% 100%);
3807
+ padding: 0 0 0 0;
3848
3808
  }
3849
3809
 
3850
- 70% {
3851
- clip-path: polygon(50% 50%, 50% 100%, 50% 100%, 50% 100%, 50% 100%, 50% 100%, 50% 100%, 0% 100%, 0% 50%);
3810
+ 100% {
3811
+ padding: 0 0 0 100%;
3852
3812
  }
3853
-
3854
- 80% {
3855
- clip-path: polygon(50% 50%, 0% 100%, 0% 100%, 0% 100%, 0% 100%, 0% 100%, 0% 100%, 0% 100%, 0% 50%);
3813
+ }
3814
+ @keyframes to-rotate {
3815
+ from {
3816
+ transform: rotate(0deg);
3856
3817
  }
3857
3818
 
3858
- 90% {
3819
+ to {
3859
3820
  transform: rotate(360deg);
3860
- clip-path: polygon(50% 50%, 0% 50%, 0% 50%, 0% 50%, 0% 50%, 0% 50%, 0% 50%, 0% 50%, 0% 50%);
3861
- }
3862
-
3863
- 100% {
3864
- clip-path: polygon(50% 50%, 0% 50%, 0% 50%, 0% 50%, 0% 50%, 0% 50%, 0% 50%, 0% 50%, 0% 50%);
3865
3821
  }
3866
3822
  }
3867
3823
  .shape {
@@ -4072,7 +4028,6 @@ progress.max + * {
4072
4028
  .radio,
4073
4029
  .switch {
4074
4030
  --_size: 1.5rem;
4075
- direction: ltr;
4076
4031
  inline-size: auto;
4077
4032
  block-size: auto;
4078
4033
  line-height: normal;
@@ -4081,6 +4036,9 @@ progress.max + * {
4081
4036
  display: inline-flex;
4082
4037
  align-items: center;
4083
4038
  }
4039
+ .switch {
4040
+ direction: ltr;
4041
+ }
4084
4042
  :is(.checkbox, .radio, .switch).small {
4085
4043
  --_size: 1rem;
4086
4044
  }
@@ -4126,6 +4084,12 @@ progress.max + * {
4126
4084
  user-select: none;
4127
4085
  z-index: 1;
4128
4086
  }
4087
+ [dir=rtl] :is(.checkbox, .radio) > span::before,
4088
+ [dir=rtl] :is(.checkbox, .radio) > span > i,
4089
+ [dir=rtl] :is(.checkbox, .radio) > span::after {
4090
+ --_size: inherit;
4091
+ inset: auto calc(var(--_size) * -1) auto auto;
4092
+ }
4129
4093
  .switch > span::before,
4130
4094
  .switch.icon > span > i {
4131
4095
  position: absolute;
@@ -4208,14 +4172,26 @@ progress.max + * {
4208
4172
  background-color: var(--on-primary);
4209
4173
  transform: translate(-1.75rem, -50%) scale(1);
4210
4174
  }
4175
+ [dir=rtl] .switch > input:checked + span::before,
4176
+ [dir=rtl] .switch.icon > input:checked + span > i {
4177
+ transform: translate(-1.75rem, -50%) scale(-1);
4178
+ }
4211
4179
  .switch > input:active:not(:disabled) + span::before,
4212
4180
  .switch.icon > input:active:not(:disabled) + span > i {
4213
4181
  transform: translate(-3rem, -50%) scale(1.2);
4214
4182
  }
4183
+ [dir=rtl] .switch > input:active:not(:disabled) + span::before,
4184
+ [dir=rtl] .switch.icon > input:active:not(:disabled) + span > i {
4185
+ transform: translate(-3rem, -50%) scale(-1.2);
4186
+ }
4215
4187
  .switch > input:active:checked:not(:disabled) + span::before,
4216
4188
  .switch.icon > input:active:checked:not(:disabled) + span > i {
4217
4189
  transform: translate(-1.75rem, -50%) scale(1.2);
4218
4190
  }
4191
+ [dir=rtl] .switch > input:active:checked:not(:disabled) + span::before,
4192
+ [dir=rtl] .switch.icon > input:active:checked:not(:disabled) + span > i {
4193
+ transform: translate(-1.75rem, -50%) scale(-1.2);
4194
+ }
4219
4195
  :is(.checkbox, .radio, .switch) > input:disabled + span {
4220
4196
  opacity: 0.5;
4221
4197
  cursor: not-allowed;
@@ -4558,6 +4534,10 @@ progress.max + * {
4558
4534
  .slider > :hover ~ .tooltip.bottom {
4559
4535
  inset-block: auto -1rem !important;
4560
4536
  }
4537
+
4538
+ body:has(input[type=range]:focus) {
4539
+ overflow: hidden;
4540
+ }
4561
4541
  }
4562
4542
  .snackbar {
4563
4543
  position: fixed;
@@ -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.12.13/dist/cdn/beer.min.js");
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.12.13/dist/cdn/beer.scoped.min.css");
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.12.13/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.12.13/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;
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;