beercss 3.12.12 → 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.12" target="_blank"><img src="https://img.shields.io/bundlephobia/minzip/beercss@3.12.12" 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.12/dist/cdn/beer.min.css" rel="stylesheet" />
136
- <script type="module" src="https://cdn.jsdelivr.net/npm/beercss@3.12.12/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.12/dist/cdn/beer.scoped.min.css" rel="stylesheet" />
155
- <script type="module" src="https://cdn.jsdelivr.net/npm/beercss@3.12.12/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.12/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.12/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.12/dist/cdn/beer.min.css" rel="stylesheet">
210
- <script type="module" src="https://cdn.jsdelivr.net/npm/beercss@3.12.12/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.12/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.12/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.12/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.12/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;
@@ -176,16 +176,20 @@ i,
176
176
  label {
177
177
  user-select: none;
178
178
  }
179
- body ::-webkit-scrollbar,
180
- body ::-webkit-scrollbar-thumb,
181
- body ::-webkit-scrollbar-button {
182
- background: none;
183
- inline-size: 0.4rem;
184
- block-size: 0.4rem;
185
- }
186
- body ::-webkit-scrollbar-thumb {
187
- background: var(--outline);
188
- border-radius: 1rem;
179
+ @media (pointer: fine) {
180
+ body ::-webkit-scrollbar,
181
+ body ::-webkit-scrollbar-thumb,
182
+ body ::-webkit-scrollbar-button {
183
+ background: none;
184
+ inline-size: 0.4rem;
185
+ block-size: 0.4rem;
186
+ }
187
+
188
+ body :is(:focus, :hover)::-webkit-scrollbar-thumb,
189
+ body :has(:focus, :hover)::-webkit-scrollbar-thumb {
190
+ background: var(--outline);
191
+ border-radius: 1rem;
192
+ }
189
193
  }
190
194
  :not(.grid, nav, .row) > :not(progress.max) + :is(address, article, blockquote, code, .field, fieldset, form, .grid, h1, h2, h3, h4, h5, h6, nav, ol, p, pre, .row, section, aside, table, .tabs, ul):not([class*='margin'], .right, .left, .top, .bottom) {
191
195
  margin-block-start: 1rem;
@@ -2140,38 +2144,33 @@ summary::-webkit-details-marker {
2140
2144
  display: none;
2141
2145
  }
2142
2146
  .field {
2143
- --_size: 3rem;
2147
+ --_input: 3rem;
2144
2148
  --_start: 1.2rem;
2145
- block-size: var(--_size);
2146
- margin-block-end: 2rem;
2149
+ --_middle: calc(var(--_input) / 2);
2147
2150
  border-radius: 0.25rem 0.25rem 0 0;
2148
- max-block-size: 12rem;
2149
- }
2150
- .grid > * > .field {
2151
- margin-block-end: 1rem;
2152
- }
2153
- .grid > * > .field + .field {
2154
- margin-block-start: 2rem;
2155
- }
2156
- .grid.no-space > * > .field + .field {
2157
- margin-block-start: 1rem;
2151
+ min-block-size: var(--_input);
2152
+ display: flex;
2153
+ flex-direction: column;
2158
2154
  }
2159
- .grid.medium-space > * > .field + .field {
2160
- margin-block-start: 2.5rem;
2155
+ .field.fill {
2156
+ --_background: var(--surface-variant);
2157
+ background-color: unset !important;
2158
+ color: unset !important;
2161
2159
  }
2162
- .grid.large-space > * > .field + .field {
2163
- margin-block-start: 3rem;
2160
+ .field.fill > :is(input, select, textarea) {
2161
+ background-color: var(--_background);
2162
+ z-index: 0;
2164
2163
  }
2165
2164
  .field.small {
2166
- --_size: 2.5rem;
2165
+ --_input: 2.5rem;
2167
2166
  --_start: 1rem;
2168
2167
  }
2169
2168
  .field.large {
2170
- --_size: 3.5rem;
2169
+ --_input: 3.5rem;
2171
2170
  --_start: 1.4rem;
2172
2171
  }
2173
2172
  .field.extra {
2174
- --_size: 4rem;
2173
+ --_input: 4rem;
2175
2174
  --_start: 1.6rem;
2176
2175
  }
2177
2176
  .field.border {
@@ -2190,37 +2189,37 @@ summary::-webkit-details-marker {
2190
2189
  border-radius: 2rem;
2191
2190
  }
2192
2191
  /* icon */
2193
- .field > :is(i, img, svg, progress, a:not(.helper, .error)) {
2192
+ .field > :is(i, img, svg, progress.circle, a) {
2194
2193
  position: absolute;
2195
- inset: 50% auto auto auto;
2196
- transform: translateY(-50%);
2194
+ inset: calc((var(--_input) / 2) - 0.75rem) auto auto auto;
2197
2195
  cursor: pointer;
2198
- 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) {
2199
2206
  inline-size: 1.5rem;
2200
2207
  block-size: 1.5rem;
2201
2208
  }
2202
- .field > :is(i, img, svg, progress, a:not(.helper, .error)),
2203
- [dir=rtl] .field > :is(i, img, svg, progress, a:not(.helper, .error)):first-child {
2204
- 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;
2205
2212
  }
2206
- .field > :is(i, img, svg, progress, a:not(.helper, .error)):first-child,
2207
- [dir=rtl] .field > :is(i, img, svg, progress, a:not(.helper, .error)) {
2208
- 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;
2209
2216
  }
2210
2217
  .field.invalid > i {
2211
2218
  color: var(--error);
2212
2219
  }
2213
2220
  .field > progress.circle {
2214
- inset-block-start: calc(50% - 0.75rem) !important;
2215
2221
  border-width: 0.1875rem;
2216
2222
  }
2217
- .field > a:not(.helper, .error) {
2218
- z-index: 10;
2219
- }
2220
- .field > a > :is(i, img, svg, progress, a:not(.helper, .error)) {
2221
- inline-size: 1.5rem;
2222
- block-size: 1.5rem;
2223
- }
2224
2223
  /* input, textarea and select */
2225
2224
  .field > :is(input, textarea, select) {
2226
2225
  all: unset;
@@ -2234,7 +2233,7 @@ summary::-webkit-details-marker {
2234
2233
  font-family: inherit;
2235
2234
  font-size: 1rem;
2236
2235
  inline-size: 100%;
2237
- block-size: 100%;
2236
+ min-block-size: var(--_input);
2238
2237
  outline: none;
2239
2238
  z-index: 1;
2240
2239
  background: none;
@@ -2253,10 +2252,9 @@ input::-webkit-date-and-time-value {
2253
2252
  border: 0.125rem solid transparent;
2254
2253
  padding: 0 0.875rem;
2255
2254
  }
2256
- .field.min > textarea {
2257
- overflow: hidden auto;
2258
- position: absolute;
2259
- inset: 0;
2255
+ .field > textarea:not([rows]) {
2256
+ field-sizing: content;
2257
+ max-block-size: 12rem;
2260
2258
  }
2261
2259
  input[type=file],
2262
2260
  input[type=color],
@@ -2343,18 +2341,6 @@ input[type=number] {
2343
2341
  .field > :disabled {
2344
2342
  cursor: not-allowed;
2345
2343
  }
2346
- .field.textarea.small:not(.min) {
2347
- --_size: 5rem;
2348
- }
2349
- .field.textarea:not(.min) {
2350
- --_size: 5.5rem;
2351
- }
2352
- .field.textarea.large:not(.min) {
2353
- --_size: 6rem;
2354
- }
2355
- .field.textarea.extra:not(.min) {
2356
- --_size: 6.5rem;
2357
- }
2358
2344
  .field > select {
2359
2345
  user-select: none;
2360
2346
  }
@@ -2374,27 +2360,26 @@ input[type=number] {
2374
2360
  .field > select > option {
2375
2361
  background-color: var(--surface);
2376
2362
  }
2377
- .field.label > :is(input, select) {
2363
+ .field > :is(input, select) {
2378
2364
  padding-block-start: 1rem;
2379
2365
  }
2380
- .field.label.border:not(.fill) > :is(input, select) {
2366
+ .field:not(.label) > :is(input, select),
2367
+ .field.border:not(.fill) > :is(input, select) {
2381
2368
  padding-block-start: 0;
2382
2369
  }
2383
2370
  .field > textarea {
2384
- padding-block-start: var(--_start);
2385
- white-space: pre-wrap;
2386
- overflow-wrap: break-word;
2371
+ padding-block-start: calc(var(--_start)) !important;
2387
2372
  }
2388
2373
  .field > textarea:focus {
2389
- padding-block-start: calc(var(--_start) - 0.06rem);
2374
+ padding-block-start: calc(var(--_start) - 0.01rem) !important;
2390
2375
  }
2391
2376
  .field:not(.label) > textarea,
2392
- .field.border.label:not(.fill) > textarea {
2393
- padding-block-start: calc(var(--_start) - 0.5rem);
2377
+ .field.border:not(.fill) > textarea {
2378
+ padding-block-start: calc(var(--_start) - 0.5rem) !important;
2394
2379
  }
2395
2380
  .field:not(.label) > textarea:focus,
2396
- .field.border.label:not(.fill) > textarea:focus {
2397
- 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;
2398
2383
  }
2399
2384
  /* label */
2400
2385
  .field.label > label {
@@ -2402,19 +2387,22 @@ input[type=number] {
2402
2387
  position: absolute;
2403
2388
  inset: -0.5rem 1rem 0 var(--_start);
2404
2389
  display: flex;
2405
- block-size: calc(var(--_size) + 1rem);
2406
- line-height: calc(var(--_size) + 1rem);
2390
+ block-size: calc(var(--_input) + 1rem);
2391
+ line-height: calc(var(--_input) + 1rem);
2407
2392
  font-size: 1rem;
2408
2393
  transition: all 0.2s;
2409
2394
  gap: 0.25rem;
2410
2395
  white-space: nowrap;
2396
+ pointer-events: none;
2397
+ }
2398
+ [dir=rtl] .field.label > label {
2399
+ inset: -0.5rem var(--_start) 0 1rem;
2411
2400
  }
2412
2401
  .field.label.round > label {
2413
2402
  inset: -0.5rem 1.75rem 0 var(--_start);
2414
2403
  }
2415
- .field.label.textarea:not(.min) > label {
2416
- block-size: calc(var(--_size) - 1.5rem);
2417
- line-height: calc(var(--_size) - 1.5rem);
2404
+ [dir=rtl] .field.label.round > label {
2405
+ inset: -0.5rem 1.75rem 0 var(--_start);
2418
2406
  }
2419
2407
  .field.label.border.prefix:not(.fill) > :is(label.active, :focus + label, [placeholder]:not(:placeholder-shown) + label, select + label) {
2420
2408
  --_start: 1rem;
@@ -2483,27 +2471,21 @@ input[type=number] {
2483
2471
  font-size: 1rem;
2484
2472
  }
2485
2473
  /* helper */
2486
- .field > :is(.helper, .error) {
2487
- position: absolute;
2488
- inset: auto auto 0 1rem;
2489
- transform: translateY(100%);
2474
+ .field > output {
2475
+ display: inline-block;
2490
2476
  font-size: 0.75rem;
2491
2477
  background: none !important;
2492
- padding-block-start: 0.125rem;
2493
- }
2494
- [dir=rtl] .field > :is(.helper, .error) {
2495
- inset: auto 1rem 0 auto;
2496
- }
2497
- a.helper {
2498
- color: var(--primary);
2478
+ padding: 0.25rem 1rem;
2479
+ line-height: 1.25rem;
2480
+ align-self: start;
2499
2481
  }
2500
- .field > .error {
2482
+ .field > output.invalid {
2501
2483
  color: var(--error) !important;
2502
2484
  }
2503
- .field.round > :is(.helper, .error) {
2504
- inset-inline-start: 1.5rem;
2485
+ .field.round > output {
2486
+ padding: 0.25rem 1.5rem;
2505
2487
  }
2506
- .field.invalid > .helper {
2488
+ .field.invalid > output:not(.invalid) {
2507
2489
  display: none;
2508
2490
  }
2509
2491
  table td > .field {
@@ -3676,6 +3658,7 @@ progress {
3676
3658
  writing-mode: horizontal-tb;
3677
3659
  direction: ltr;
3678
3660
  -webkit-appearance: none;
3661
+ appearance: none;
3679
3662
  }
3680
3663
  .dark progress {
3681
3664
  background: var(--_dark);
@@ -3740,29 +3723,36 @@ progress.wavy::-moz-progress-bar {
3740
3723
  mask-size: auto 100%;
3741
3724
  }
3742
3725
  progress.circle {
3743
- display: inline-block;
3726
+ --_value: attr(value type(<number>), 50);
3744
3727
  inline-size: 2.5rem;
3745
3728
  block-size: 2.5rem;
3729
+ background: conic-gradient(currentColor calc(var(--_value) * 1%), var(--active) 0%);
3746
3730
  border-radius: 50%;
3747
- border-width: 0.3rem;
3748
- border-style: solid;
3749
- border-color: currentcolor;
3750
- 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 {
3751
3734
  background: none;
3752
- flex: none;
3753
3735
  }
3754
3736
  progress.circle::-moz-progress-bar {
3755
3737
  background: none;
3756
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
+ }
3757
3746
  progress.circle.small {
3758
3747
  inline-size: 1.5rem;
3759
3748
  block-size: 1.5rem;
3760
- border-width: 0.2rem;
3761
3749
  }
3762
3750
  progress.circle.large {
3763
3751
  inline-size: 3.5rem;
3764
3752
  block-size: 3.5rem;
3765
- border-width: 0.4rem;
3753
+ }
3754
+ progress.circle:not([value]) {
3755
+ animation: to-rotate 1s infinite linear;
3766
3756
  }
3767
3757
  :is(nav, .row, .field) > progress:not(.circle, .small, .medium, .large) {
3768
3758
  flex: auto;
@@ -3783,27 +3773,12 @@ progress.max {
3783
3773
  progress.max[class*='-text'] {
3784
3774
  opacity: 1;
3785
3775
  }
3786
- progress:is(.horizontal, .vertical, .max) {
3787
- display: unset;
3788
- inline-size: 100% !important;
3789
- }
3790
- progress.vertical {
3791
- writing-mode: vertical-lr;
3792
- }
3793
- progress.max.vertical {
3794
- transform: rotate(-180deg);
3795
- }
3796
3776
  progress.max + * {
3797
3777
  margin-block-start: 0;
3798
3778
  }
3799
3779
  :is(.button, button, .chip) > progress.circle {
3800
3780
  color: inherit;
3801
3781
  }
3802
- @supports (-moz-appearance:none) {
3803
- progress.max.vertical {
3804
- transform: none;
3805
- }
3806
- }
3807
3782
  @keyframes to-linear {
3808
3783
  0% {
3809
3784
  margin-inline-start: -100%;
@@ -3817,47 +3792,15 @@ progress.max + * {
3817
3792
  margin-inline-start: 100%;
3818
3793
  }
3819
3794
  }
3820
- @keyframes to-circular {
3821
- 0% {
3795
+ @keyframes to-rotate {
3796
+ from {
3797
+ --_value: 50;
3822
3798
  transform: rotate(0deg);
3823
- clip-path: polygon(50% 50%, 0% 0%, 50% 0%, 50% 0%, 50% 0%, 50% 0%, 50% 0%, 50% 0%, 50% 0%);
3824
- }
3825
-
3826
- 20% {
3827
- clip-path: polygon(50% 50%, 0% 0%, 50% 0%, 100% 0%, 100% 0%, 100% 0%, 100% 0%, 100% 0%, 100% 0%);
3828
3799
  }
3829
3800
 
3830
- 30% {
3831
- clip-path: polygon(50% 50%, 0% 0%, 50% 0%, 100% 0%, 100% 50%, 100% 50%, 100% 50%, 100% 50%, 100% 50%);
3832
- }
3833
-
3834
- 40% {
3835
- clip-path: polygon(50% 50%, 0% 0%, 50% 0%, 100% 0%, 100% 50%, 100% 100%, 100% 100%, 100% 100%, 100% 100%);
3836
- }
3837
-
3838
- 50% {
3839
- clip-path: polygon(50% 50%, 50% 0%, 50% 0%, 100% 0%, 100% 50%, 100% 100%, 50% 100%, 50% 100%, 50% 100%);
3840
- }
3841
-
3842
- 60% {
3843
- clip-path: polygon(50% 50%, 100% 50%, 100% 50%, 100% 50%, 100% 50%, 100% 100%, 50% 100%, 0% 100%, 0% 100%);
3844
- }
3845
-
3846
- 70% {
3847
- clip-path: polygon(50% 50%, 50% 100%, 50% 100%, 50% 100%, 50% 100%, 50% 100%, 50% 100%, 0% 100%, 0% 50%);
3848
- }
3849
-
3850
- 80% {
3851
- clip-path: polygon(50% 50%, 0% 100%, 0% 100%, 0% 100%, 0% 100%, 0% 100%, 0% 100%, 0% 100%, 0% 50%);
3852
- }
3853
-
3854
- 90% {
3801
+ to {
3802
+ --_value: 50;
3855
3803
  transform: rotate(360deg);
3856
- clip-path: polygon(50% 50%, 0% 50%, 0% 50%, 0% 50%, 0% 50%, 0% 50%, 0% 50%, 0% 50%, 0% 50%);
3857
- }
3858
-
3859
- 100% {
3860
- clip-path: polygon(50% 50%, 0% 50%, 0% 50%, 0% 50%, 0% 50%, 0% 50%, 0% 50%, 0% 50%, 0% 50%);
3861
3804
  }
3862
3805
  }
3863
3806
  .shape {
@@ -4068,7 +4011,6 @@ progress.max + * {
4068
4011
  .radio,
4069
4012
  .switch {
4070
4013
  --_size: 1.5rem;
4071
- direction: ltr;
4072
4014
  inline-size: auto;
4073
4015
  block-size: auto;
4074
4016
  line-height: normal;
@@ -4077,6 +4019,9 @@ progress.max + * {
4077
4019
  display: inline-flex;
4078
4020
  align-items: center;
4079
4021
  }
4022
+ .switch {
4023
+ direction: ltr;
4024
+ }
4080
4025
  :is(.checkbox, .radio, .switch).small {
4081
4026
  --_size: 1rem;
4082
4027
  }
@@ -4122,6 +4067,12 @@ progress.max + * {
4122
4067
  user-select: none;
4123
4068
  z-index: 1;
4124
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
+ }
4125
4076
  .switch > span::before,
4126
4077
  .switch.icon > span > i {
4127
4078
  position: absolute;
@@ -4204,14 +4155,26 @@ progress.max + * {
4204
4155
  background-color: var(--on-primary);
4205
4156
  transform: translate(-1.75rem, -50%) scale(1);
4206
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
+ }
4207
4162
  .switch > input:active:not(:disabled) + span::before,
4208
4163
  .switch.icon > input:active:not(:disabled) + span > i {
4209
4164
  transform: translate(-3rem, -50%) scale(1.2);
4210
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
+ }
4211
4170
  .switch > input:active:checked:not(:disabled) + span::before,
4212
4171
  .switch.icon > input:active:checked:not(:disabled) + span > i {
4213
4172
  transform: translate(-1.75rem, -50%) scale(1.2);
4214
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
+ }
4215
4178
  :is(.checkbox, .radio, .switch) > input:disabled + span {
4216
4179
  opacity: 0.5;
4217
4180
  cursor: not-allowed;
@@ -4554,6 +4517,10 @@ progress.max + * {
4554
4517
  .slider > :hover ~ .tooltip.bottom {
4555
4518
  inset-block: auto -1rem !important;
4556
4519
  }
4520
+
4521
+ body:has(input[type=range]:focus) {
4522
+ overflow: hidden;
4523
+ }
4557
4524
  }
4558
4525
  .snackbar {
4559
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.12/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.12/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.12/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.12/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;