beercss 3.12.13 → 3.13.0

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.0" target="_blank"><img src="https://img.shields.io/bundlephobia/minzip/beercss@3.13.0" 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.0/dist/cdn/beer.min.css" rel="stylesheet" />
136
+ <script type="module" src="https://cdn.jsdelivr.net/npm/beercss@3.13.0/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.0/dist/cdn/beer.scoped.min.css" rel="stylesheet" />
155
+ <script type="module" src="https://cdn.jsdelivr.net/npm/beercss@3.13.0/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.0/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.0/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.0/dist/cdn/beer.min.css" rel="stylesheet">
210
+ <script type="module" src="https://cdn.jsdelivr.net/npm/beercss@3.13.0/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.0/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.0/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.0/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.0/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);
@@ -3744,29 +3723,36 @@ progress.wavy::-moz-progress-bar {
3744
3723
  mask-size: auto 100%;
3745
3724
  }
3746
3725
  progress.circle {
3747
- display: inline-block;
3726
+ --_value: attr(value type(<number>), 50);
3748
3727
  inline-size: 2.5rem;
3749
3728
  block-size: 2.5rem;
3729
+ background: conic-gradient(currentColor calc(var(--_value) * 1%), var(--active) 0%);
3750
3730
  border-radius: 50%;
3751
- border-width: 0.3rem;
3752
- border-style: solid;
3753
- border-color: currentcolor;
3754
- animation: 1.6s to-circular linear infinite;
3731
+ mask-image: radial-gradient(circle at center, transparent 57%, currentColor 60%);
3732
+ }
3733
+ progress.circle::-webkit-progress-value {
3755
3734
  background: none;
3756
- flex: none;
3757
3735
  }
3758
3736
  progress.circle::-moz-progress-bar {
3759
3737
  background: none;
3760
3738
  }
3739
+ progress.circle.wavy {
3740
+ background: conic-gradient(currentColor calc(var(--_value) * 1%), var(--active) 0);
3741
+ mask-repeat: no-repeat;
3742
+ mask-position: center;
3743
+ mask-size: contain;
3744
+ mask-image: url(wavy-circle.svg);
3745
+ }
3761
3746
  progress.circle.small {
3762
3747
  inline-size: 1.5rem;
3763
3748
  block-size: 1.5rem;
3764
- border-width: 0.2rem;
3765
3749
  }
3766
3750
  progress.circle.large {
3767
3751
  inline-size: 3.5rem;
3768
3752
  block-size: 3.5rem;
3769
- border-width: 0.4rem;
3753
+ }
3754
+ progress.circle:not([value]) {
3755
+ animation: to-rotate 1s infinite linear;
3770
3756
  }
3771
3757
  :is(nav, .row, .field) > progress:not(.circle, .small, .medium, .large) {
3772
3758
  flex: auto;
@@ -3787,27 +3773,12 @@ progress.max {
3787
3773
  progress.max[class*='-text'] {
3788
3774
  opacity: 1;
3789
3775
  }
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
3776
  progress.max + * {
3801
3777
  margin-block-start: 0;
3802
3778
  }
3803
3779
  :is(.button, button, .chip) > progress.circle {
3804
3780
  color: inherit;
3805
3781
  }
3806
- @supports (-moz-appearance:none) {
3807
- progress.max.vertical {
3808
- transform: none;
3809
- }
3810
- }
3811
3782
  @keyframes to-linear {
3812
3783
  0% {
3813
3784
  margin-inline-start: -100%;
@@ -3821,47 +3792,15 @@ progress.max + * {
3821
3792
  margin-inline-start: 100%;
3822
3793
  }
3823
3794
  }
3824
- @keyframes to-circular {
3825
- 0% {
3795
+ @keyframes to-rotate {
3796
+ from {
3797
+ --_value: 50;
3826
3798
  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%);
3840
- }
3841
-
3842
- 50% {
3843
- clip-path: polygon(50% 50%, 50% 0%, 50% 0%, 100% 0%, 100% 50%, 100% 100%, 50% 100%, 50% 100%, 50% 100%);
3844
3799
  }
3845
3800
 
3846
- 60% {
3847
- clip-path: polygon(50% 50%, 100% 50%, 100% 50%, 100% 50%, 100% 50%, 100% 100%, 50% 100%, 0% 100%, 0% 100%);
3848
- }
3849
-
3850
- 70% {
3851
- clip-path: polygon(50% 50%, 50% 100%, 50% 100%, 50% 100%, 50% 100%, 50% 100%, 50% 100%, 0% 100%, 0% 50%);
3852
- }
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%);
3856
- }
3857
-
3858
- 90% {
3801
+ to {
3802
+ --_value: 50;
3859
3803
  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
3804
  }
3866
3805
  }
3867
3806
  .shape {
@@ -4072,7 +4011,6 @@ progress.max + * {
4072
4011
  .radio,
4073
4012
  .switch {
4074
4013
  --_size: 1.5rem;
4075
- direction: ltr;
4076
4014
  inline-size: auto;
4077
4015
  block-size: auto;
4078
4016
  line-height: normal;
@@ -4081,6 +4019,9 @@ progress.max + * {
4081
4019
  display: inline-flex;
4082
4020
  align-items: center;
4083
4021
  }
4022
+ .switch {
4023
+ direction: ltr;
4024
+ }
4084
4025
  :is(.checkbox, .radio, .switch).small {
4085
4026
  --_size: 1rem;
4086
4027
  }
@@ -4126,6 +4067,12 @@ progress.max + * {
4126
4067
  user-select: none;
4127
4068
  z-index: 1;
4128
4069
  }
4070
+ [dir=rtl] :is(.checkbox, .radio) > span::before,
4071
+ [dir=rtl] :is(.checkbox, .radio) > span > i,
4072
+ [dir=rtl] :is(.checkbox, .radio) > span::after {
4073
+ --_size: inherit;
4074
+ inset: auto calc(var(--_size) * -1) auto auto;
4075
+ }
4129
4076
  .switch > span::before,
4130
4077
  .switch.icon > span > i {
4131
4078
  position: absolute;
@@ -4208,14 +4155,26 @@ progress.max + * {
4208
4155
  background-color: var(--on-primary);
4209
4156
  transform: translate(-1.75rem, -50%) scale(1);
4210
4157
  }
4158
+ [dir=rtl] .switch > input:checked + span::before,
4159
+ [dir=rtl] .switch.icon > input:checked + span > i {
4160
+ transform: translate(-1.75rem, -50%) scale(-1);
4161
+ }
4211
4162
  .switch > input:active:not(:disabled) + span::before,
4212
4163
  .switch.icon > input:active:not(:disabled) + span > i {
4213
4164
  transform: translate(-3rem, -50%) scale(1.2);
4214
4165
  }
4166
+ [dir=rtl] .switch > input:active:not(:disabled) + span::before,
4167
+ [dir=rtl] .switch.icon > input:active:not(:disabled) + span > i {
4168
+ transform: translate(-3rem, -50%) scale(-1.2);
4169
+ }
4215
4170
  .switch > input:active:checked:not(:disabled) + span::before,
4216
4171
  .switch.icon > input:active:checked:not(:disabled) + span > i {
4217
4172
  transform: translate(-1.75rem, -50%) scale(1.2);
4218
4173
  }
4174
+ [dir=rtl] .switch > input:active:checked:not(:disabled) + span::before,
4175
+ [dir=rtl] .switch.icon > input:active:checked:not(:disabled) + span > i {
4176
+ transform: translate(-1.75rem, -50%) scale(-1.2);
4177
+ }
4219
4178
  :is(.checkbox, .radio, .switch) > input:disabled + span {
4220
4179
  opacity: 0.5;
4221
4180
  cursor: not-allowed;
@@ -4558,6 +4517,10 @@ progress.max + * {
4558
4517
  .slider > :hover ~ .tooltip.bottom {
4559
4518
  inset-block: auto -1rem !important;
4560
4519
  }
4520
+
4521
+ body:has(input[type=range]:focus) {
4522
+ overflow: hidden;
4523
+ }
4561
4524
  }
4562
4525
  .snackbar {
4563
4526
  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.0/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.0/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.0/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.0/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;