@anyblades/blades 3.1.0-beta.5 → 3.1.0-beta.6

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.
Files changed (77) hide show
  1. package/.prettierrc.json +0 -7
  2. package/README.md +4 -3
  3. package/_includes/.prettierrc.json +12 -0
  4. package/_includes/package.json +10 -0
  5. package/css/blades.css +941 -1804
  6. package/css/blades.min.css +11 -1
  7. package/css/blades.ninja.css +1123 -2264
  8. package/css/blades.ninja.min.css +16 -1
  9. package/css/float-label.css +34 -187
  10. package/css/float-label.min.css +1 -1
  11. package/css/layered/blades.layered.css +941 -1804
  12. package/css/layered/blades.layered.min.css +11 -1
  13. package/css/layered/compact.css +10 -31
  14. package/css/layered/components/accordion.css +32 -21
  15. package/css/layered/components/card.css +8 -16
  16. package/css/layered/components/dropdown-popover.css +44 -59
  17. package/css/layered/components/dropdown.css +61 -61
  18. package/css/layered/components/group.css +40 -156
  19. package/css/layered/components/loading.css +28 -35
  20. package/css/layered/components/modal-modern.css +7 -15
  21. package/css/layered/components/modal.css +54 -65
  22. package/css/layered/components/nav.css +36 -36
  23. package/css/layered/components/progress.css +18 -23
  24. package/css/layered/components/timeline.css +5 -19
  25. package/css/layered/components/tooltip.css +88 -103
  26. package/css/layered/components.css +371 -517
  27. package/css/layered/content/button.css +37 -117
  28. package/css/layered/content/code-block.css +11 -23
  29. package/css/layered/content/code.css +11 -26
  30. package/css/layered/content/embedded-content.css +5 -10
  31. package/css/layered/content/figure.css +3 -5
  32. package/css/layered/content/icon.css +20 -47
  33. package/css/layered/content/link.css +18 -40
  34. package/css/layered/content/misc.css +1 -5
  35. package/css/layered/content/table.css +4 -10
  36. package/css/layered/content/typography.css +22 -41
  37. package/css/layered/content.css +102 -254
  38. package/css/layered/forms/basics.css +64 -142
  39. package/css/layered/forms/checkbox-radio-switch.css +46 -75
  40. package/css/layered/forms/float-label/core.css +13 -85
  41. package/css/layered/forms/float-label/theme.css +22 -104
  42. package/css/layered/forms/float-label.css +34 -187
  43. package/css/layered/forms/input-color.css +5 -5
  44. package/css/layered/forms/input-datetime.css +9 -26
  45. package/css/layered/forms/input-file.css +7 -8
  46. package/css/layered/forms/input-range.css +43 -50
  47. package/css/layered/forms/input-search.css +16 -47
  48. package/css/layered/forms.css +197 -355
  49. package/css/layered/layout/columns.css +4 -24
  50. package/css/layered/layout/container.css +13 -13
  51. package/css/layered/layout/document.css +4 -12
  52. package/css/layered/layout/grid.css +6 -8
  53. package/css/layered/layout/landmarks.css +1 -7
  54. package/css/layered/layout/overflow-auto.css +0 -3
  55. package/css/layered/layout/section.css +0 -3
  56. package/css/layered/layout.css +26 -39
  57. package/css/layered/utilities.css +6 -15
  58. package/css/layered/variables-blades.css +4 -16
  59. package/css/layered/variables.css +77 -181
  60. package/css/pico.conditional.css +785 -1368
  61. package/css/pico.conditional.min.css +1 -1
  62. package/css/pico.css +785 -1368
  63. package/css/pico.min.css +1 -1
  64. package/package.json +12 -25
  65. package/src/blades/_index.css +9 -9
  66. package/src/blades/forms/float-label/_index.css +2 -2
  67. package/src/blades.css +2 -2
  68. package/src/blades.ninja.css +3 -3
  69. package/src/float-label.css +1 -1
  70. package/src/ninja/_index.css +7 -8
  71. package/src/pico/_index.css +6 -6
  72. package/src/pico/components/_index.css +9 -9
  73. package/src/pico/content/_index.css +8 -8
  74. package/src/pico/forms/_index.css +7 -7
  75. package/src/pico/layout/_index.css +5 -5
  76. package/src/pico.css +2 -2
  77. package/src/ninja/_scroll-to.css +0 -10
@@ -1,16 +1,10 @@
1
1
  @layer blades {
2
- /**
3
- * Basics form elements
4
- */
5
- input,
6
- optgroup,
7
- select,
8
- textarea {
9
- margin: 0;
2
+ input, optgroup, select, textarea {
10
3
  font-size: 1rem;
11
4
  line-height: var(--pico-line-height);
12
- font-family: inherit;
13
5
  letter-spacing: inherit;
6
+ margin: 0;
7
+ font-family: inherit;
14
8
  }
15
9
 
16
10
  input {
@@ -23,22 +17,20 @@ select {
23
17
 
24
18
  legend {
25
19
  max-width: 100%;
26
- padding: 0;
27
20
  color: inherit;
28
21
  white-space: normal;
22
+ padding: 0;
29
23
  }
30
24
 
31
25
  textarea {
32
26
  overflow: auto;
33
27
  }
34
28
 
35
- [type="checkbox"],
36
- [type="radio"] {
29
+ [type="checkbox"], [type="radio"] {
37
30
  padding: 0;
38
31
  }
39
32
 
40
- ::-webkit-inner-spin-button,
41
- ::-webkit-outer-spin-button {
33
+ ::-webkit-inner-spin-button, ::-webkit-outer-spin-button {
42
34
  height: auto;
43
35
  }
44
36
 
@@ -57,8 +49,8 @@ textarea {
57
49
  }
58
50
 
59
51
  ::-moz-focus-inner {
60
- padding: 0;
61
52
  border-style: none;
53
+ padding: 0;
62
54
  }
63
55
 
64
56
  :-moz-focusring {
@@ -73,17 +65,14 @@ textarea {
73
65
  display: none;
74
66
  }
75
67
 
76
- [type="file"],
77
- [type="range"] {
78
- padding: 0;
68
+ [type="file"], [type="range"] {
79
69
  border-width: 0;
70
+ padding: 0;
80
71
  }
81
72
 
82
73
  input:not([type="checkbox"], [type="radio"], [type="range"]) {
83
- height: calc(
84
- 1rem * var(--pico-line-height) + var(--pico-form-element-spacing-vertical) * 2 +
85
- var(--pico-border-width) * 2
86
- );
74
+ height: calc(1rem * var(--pico-line-height) + var(--pico-form-element-spacing-vertical) * 2 +
75
+ var(--pico-border-width) * 2);
87
76
  }
88
77
 
89
78
  fieldset {
@@ -91,97 +80,63 @@ fieldset {
91
80
  min-width: 0;
92
81
  margin: 0;
93
82
  margin-bottom: var(--pico-spacing);
94
- padding: 0;
95
83
  border: 0;
84
+ padding: 0;
96
85
  }
97
86
 
98
- label,
99
- fieldset legend {
100
- display: block;
101
- margin-bottom: calc(var(--pico-spacing) * 0.375);
87
+ label, fieldset legend {
88
+ margin-bottom: calc(var(--pico-spacing) * .375);
102
89
  color: var(--pico-color);
103
90
  font-weight: var(--pico-form-label-font-weight, var(--pico-font-weight));
91
+ display: block;
104
92
  }
105
93
 
106
94
  fieldset legend {
107
- margin-bottom: calc(var(--pico-spacing) * 0.5);
95
+ margin-bottom: calc(var(--pico-spacing) * .5);
108
96
  }
109
97
 
110
- input:not([type="checkbox"], [type="radio"]),
111
- button[type="submit"],
112
- select,
113
- textarea {
98
+ input:not([type="checkbox"], [type="radio"]), button[type="submit"], select, textarea {
114
99
  width: 100%;
115
100
  }
116
101
 
117
- input:not([type="checkbox"], [type="radio"], [type="range"], [type="file"]),
118
- select,
119
- textarea {
102
+ input:not([type="checkbox"], [type="radio"], [type="range"], [type="file"]), select, textarea {
120
103
  -webkit-appearance: none;
121
104
  -moz-appearance: none;
122
105
  appearance: none;
123
106
  padding: var(--pico-form-element-spacing-vertical) var(--pico-form-element-spacing-horizontal);
124
107
  }
125
108
 
126
- input,
127
- select,
128
- textarea {
109
+ input, select, textarea {
129
110
  --pico-background-color: var(--pico-form-element-background-color);
130
111
  --pico-border-color: var(--pico-form-element-border-color);
131
112
  --pico-color: var(--pico-form-element-color);
132
113
  --pico-box-shadow: none;
133
114
  border: var(--pico-border-width) solid var(--pico-border-color);
134
115
  border-radius: var(--pico-border-radius);
135
- outline: none;
136
116
  background-color: var(--pico-background-color);
137
117
  box-shadow: var(--pico-box-shadow);
138
118
  color: var(--pico-color);
139
119
  font-weight: var(--pico-font-weight);
140
- transition:
141
- background-color var(--pico-transition),
120
+ transition: background-color var(--pico-transition),
142
121
  border-color var(--pico-transition),
143
122
  color var(--pico-transition),
144
123
  box-shadow var(--pico-transition);
124
+ outline: none;
145
125
  }
146
126
 
147
- input:not(
148
- [type="submit"],
149
- [type="button"],
150
- [type="reset"],
151
- [type="checkbox"],
152
- [type="radio"],
153
- [readonly]
154
- ):is(:active, :focus),
155
- :where(select, textarea):not([readonly]):is(:active, :focus) {
127
+ input:not([type="submit"], [type="button"], [type="reset"], [type="checkbox"], [type="radio"], [readonly]):is(:active, :focus), :where(select, textarea):not([readonly]):is(:active, :focus) {
156
128
  --pico-background-color: var(--pico-form-element-active-background-color);
157
129
  }
158
130
 
159
- input:not([type="submit"], [type="button"], [type="reset"], [role="switch"], [readonly]):is(
160
- :active,
161
- :focus
162
- ),
163
- :where(select, textarea):not([readonly]):is(:active, :focus) {
131
+ input:not([type="submit"], [type="button"], [type="reset"], [role="switch"], [readonly]):is(:active, :focus), :where(select, textarea):not([readonly]):is(:active, :focus) {
164
132
  --pico-border-color: var(--pico-form-element-active-border-color);
165
133
  }
166
134
 
167
- input:not(
168
- [type="submit"],
169
- [type="button"],
170
- [type="reset"],
171
- [type="range"],
172
- [type="file"],
173
- [readonly]
174
- ):focus,
175
- :where(select, textarea):not([readonly]):focus {
135
+ input:not([type="submit"], [type="button"], [type="reset"], [type="range"], [type="file"], [readonly]):focus, :where(select, textarea):not([readonly]):focus {
176
136
  --pico-box-shadow: 0 0 0 var(--pico-outline-width) var(--pico-form-element-focus-color);
177
137
  }
178
138
 
179
- input:not([type="submit"], [type="button"], [type="reset"])[disabled],
180
- select[disabled],
181
- textarea[disabled],
182
- label[aria-disabled="true"],
183
- :where(fieldset[disabled])
184
- :is(input:not([type="submit"], [type="button"], [type="reset"]), select, textarea) {
139
+ input:not([type="submit"], [type="button"], [type="reset"])[disabled], select[disabled], textarea[disabled], label[aria-disabled="true"], :where(fieldset[disabled]) :is(input:not([type="submit"], [type="button"], [type="reset"]), select, textarea) {
185
140
  opacity: var(--pico-form-element-disabled-opacity);
186
141
  pointer-events: none;
187
142
  }
@@ -190,211 +145,168 @@ label[aria-disabled="true"] input[disabled] {
190
145
  opacity: 1;
191
146
  }
192
147
 
193
- :where(input, select, textarea):not(
194
- [type="checkbox"],
195
- [type="radio"],
196
- [type="date"],
197
- [type="datetime-local"],
198
- [type="month"],
199
- [type="time"],
200
- [type="week"],
201
- [type="range"]
202
- )[aria-invalid] {
203
- padding-right: calc(var(--pico-form-element-spacing-horizontal) + 1.5rem) !important;
148
+ :where(input, select, textarea):not([type="checkbox"], [type="radio"], [type="date"], [type="datetime-local"], [type="month"], [type="time"], [type="week"], [type="range"])[aria-invalid] {
204
149
  padding-left: var(--pico-form-element-spacing-horizontal);
150
+ background-position: right .75rem center;
151
+ background-repeat: no-repeat;
152
+ background-size: 1rem;
153
+ padding-right: calc(var(--pico-form-element-spacing-horizontal) + 1.5rem) !important;
205
154
  padding-inline-start: var(--pico-form-element-spacing-horizontal) !important;
206
155
  padding-inline-end: calc(var(--pico-form-element-spacing-horizontal) + 1.5rem) !important;
207
- background-position: center right 0.75rem;
208
- background-size: 1rem auto;
209
- background-repeat: no-repeat;
210
156
  }
211
- :where(input, select, textarea):not(
212
- [type="checkbox"],
213
- [type="radio"],
214
- [type="date"],
215
- [type="datetime-local"],
216
- [type="month"],
217
- [type="time"],
218
- [type="week"],
219
- [type="range"]
220
- )[aria-invalid="false"]:not(select) {
157
+
158
+ :where(input, select, textarea):not([type="checkbox"], [type="radio"], [type="date"], [type="datetime-local"], [type="month"], [type="time"], [type="week"], [type="range"])[aria-invalid="false"]:not(select) {
221
159
  background-image: var(--pico-icon-valid);
222
160
  }
223
- :where(input, select, textarea):not(
224
- [type="checkbox"],
225
- [type="radio"],
226
- [type="date"],
227
- [type="datetime-local"],
228
- [type="month"],
229
- [type="time"],
230
- [type="week"],
231
- [type="range"]
232
- )[aria-invalid="true"]:not(select) {
161
+
162
+ :where(input, select, textarea):not([type="checkbox"], [type="radio"], [type="date"], [type="datetime-local"], [type="month"], [type="time"], [type="week"], [type="range"])[aria-invalid="true"]:not(select) {
233
163
  background-image: var(--pico-icon-invalid);
234
164
  }
165
+
235
166
  :where(input, select, textarea)[aria-invalid="false"] {
236
167
  --pico-border-color: var(--pico-form-element-valid-border-color);
237
168
  }
169
+
238
170
  :where(input, select, textarea)[aria-invalid="false"]:is(:active, :focus) {
239
171
  --pico-border-color: var(--pico-form-element-valid-active-border-color) !important;
240
172
  }
241
- :where(input, select, textarea)[aria-invalid="false"]:is(:active, :focus):not(
242
- [type="checkbox"],
243
- [type="radio"]
244
- ) {
173
+
174
+ :where(input, select, textarea)[aria-invalid="false"]:is(:active, :focus):not([type="checkbox"], [type="radio"]) {
245
175
  --pico-box-shadow: 0 0 0 var(--pico-outline-width) var(--pico-form-element-valid-focus-color) !important;
246
176
  }
177
+
247
178
  :where(input, select, textarea)[aria-invalid="true"] {
248
179
  --pico-border-color: var(--pico-form-element-invalid-border-color);
249
180
  }
181
+
250
182
  :where(input, select, textarea)[aria-invalid="true"]:is(:active, :focus) {
251
183
  --pico-border-color: var(--pico-form-element-invalid-active-border-color) !important;
252
184
  }
253
- :where(input, select, textarea)[aria-invalid="true"]:is(:active, :focus):not(
254
- [type="checkbox"],
255
- [type="radio"]
256
- ) {
185
+
186
+ :where(input, select, textarea)[aria-invalid="true"]:is(:active, :focus):not([type="checkbox"], [type="radio"]) {
257
187
  --pico-box-shadow: 0 0 0 var(--pico-outline-width) var(--pico-form-element-invalid-focus-color) !important;
258
188
  }
259
189
 
260
- [dir="rtl"]
261
- :where(input, select, textarea):not([type="checkbox"], [type="radio"]):is(
262
- [aria-invalid],
263
- [aria-invalid="true"],
264
- [aria-invalid="false"]
265
- ) {
266
- background-position: center left 0.75rem;
190
+ [dir="rtl"] :where(input, select, textarea):not([type="checkbox"], [type="radio"]):is([aria-invalid], [aria-invalid="true"], [aria-invalid="false"]) {
191
+ background-position: .75rem;
267
192
  }
268
193
 
269
- input::placeholder,
270
- input::-webkit-input-placeholder,
271
- textarea::placeholder,
272
- textarea::-webkit-input-placeholder,
273
- select:invalid {
194
+ input::placeholder, input::-webkit-input-placeholder, textarea::placeholder, textarea::-webkit-input-placeholder, select:invalid {
274
195
  color: var(--pico-form-element-placeholder-color);
275
196
  opacity: 1;
276
197
  }
277
198
 
278
- input:not([type="checkbox"], [type="radio"]),
279
- select,
280
- textarea {
199
+ input:not([type="checkbox"], [type="radio"]), select, textarea {
281
200
  margin-bottom: var(--pico-spacing);
282
201
  }
283
202
 
284
203
  select::-ms-expand {
204
+ background-color: #0000;
285
205
  border: 0;
286
- background-color: transparent;
287
206
  }
207
+
288
208
  select:not([multiple], [size]) {
289
209
  padding-right: calc(var(--pico-form-element-spacing-horizontal) + 1.5rem);
290
210
  padding-left: var(--pico-form-element-spacing-horizontal);
291
- padding-inline-start: var(--pico-form-element-spacing-horizontal);
292
- padding-inline-end: calc(var(--pico-form-element-spacing-horizontal) + 1.5rem);
293
211
  background-image: var(--pico-icon-chevron);
294
- background-position: center right 0.75rem;
295
- background-size: 1rem auto;
212
+ background-position: right .75rem center;
296
213
  background-repeat: no-repeat;
214
+ background-size: 1rem;
215
+ padding-inline-start: var(--pico-form-element-spacing-horizontal);
216
+ padding-inline-end: calc(var(--pico-form-element-spacing-horizontal) + 1.5rem);
297
217
  }
218
+
298
219
  select[multiple] option:checked {
299
220
  background: var(--pico-form-element-selected-background-color);
300
221
  color: var(--pico-form-element-color);
301
222
  }
302
223
 
303
224
  [dir="rtl"] select:not([multiple], [size]) {
304
- background-position: center left 0.75rem;
225
+ background-position: .75rem;
305
226
  }
306
227
 
307
228
  textarea {
308
- display: block;
309
229
  resize: vertical;
230
+ display: block;
310
231
  }
232
+
311
233
  textarea[aria-invalid] {
312
- --pico-icon-height: calc(
313
- 1rem * var(--pico-line-height) + var(--pico-form-element-spacing-vertical) * 2 +
314
- var(--pico-border-width) * 2
315
- );
316
- background-position: top right 0.75rem !important;
234
+ --pico-icon-height: calc(1rem * var(--pico-line-height) + var(--pico-form-element-spacing-vertical) * 2 +
235
+ var(--pico-border-width) * 2);
236
+ background-position: right .75rem top !important;
317
237
  background-size: 1rem var(--pico-icon-height) !important;
318
238
  }
319
239
 
320
240
  :where(input, select, textarea, fieldset, .grid) + small {
321
- display: block;
322
241
  width: 100%;
323
- margin-top: calc(var(--pico-spacing) * -0.75);
242
+ margin-top: calc(var(--pico-spacing) * -.75);
324
243
  margin-bottom: var(--pico-spacing);
325
244
  color: var(--pico-muted-color);
245
+ display: block;
326
246
  }
247
+
327
248
  :where(input, select, textarea, fieldset, .grid)[aria-invalid="false"] + small {
328
249
  color: var(--pico-ins-color);
329
250
  }
251
+
330
252
  :where(input, select, textarea, fieldset, .grid)[aria-invalid="true"] + small {
331
253
  color: var(--pico-del-color);
332
254
  }
333
255
 
334
256
  label > :where(input, select, textarea) {
335
- margin-top: calc(var(--pico-spacing) * 0.25);
257
+ margin-top: calc(var(--pico-spacing) * .25);
336
258
  }
337
259
 
338
- /**
339
- * Checkboxes, Radios and Switches
340
- */
341
- :where(:scope),
342
- :host {
260
+ :where(:scope), :host {
343
261
  --pico-icon-checkbox: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(255, 255, 255)' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
344
262
  --pico-icon-minus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(255, 255, 255)' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='5' y1='12' x2='19' y2='12'%3E%3C/line%3E%3C/svg%3E");
345
263
  }
346
- :where(:scope, [data-theme="light"], [data-theme="dark"]),
347
- :host {
264
+
265
+ :where(:scope, [data-theme="light"], [data-theme="dark"]), :host {
348
266
  --pico-switch-background-color: light-dark(#bfc7d9, #333c4e);
349
267
  --pico-switch-checked-background-color: var(--pico-primary-background);
350
268
  --pico-switch-color: #fff;
351
- --pico-switch-thumb-box-shadow: 0 0 0 rgba(0, 0, 0, 0);
269
+ --pico-switch-thumb-box-shadow: 0 0 0 #0000;
352
270
  }
353
271
 
354
272
  label:has([type="checkbox"], [type="radio"]) {
355
- width: -moz-fit-content;
356
- width: fit-content;
357
273
  cursor: pointer;
274
+ width: fit-content;
358
275
  }
359
276
 
360
- [type="checkbox"],
361
- [type="radio"] {
277
+ [type="checkbox"], [type="radio"] {
362
278
  -webkit-appearance: none;
363
279
  -moz-appearance: none;
364
280
  appearance: none;
365
- width: 1.25em;
366
- height: 1.25em;
367
- margin-top: -0.125em;
368
- margin-inline-end: 0.5em;
281
+ margin-top: -.125em;
369
282
  border-width: var(--pico-border-width);
370
283
  vertical-align: middle;
371
284
  cursor: pointer;
285
+ width: 1.25em;
286
+ height: 1.25em;
287
+ margin-inline-end: .5em;
372
288
  }
373
- [type="checkbox"]::-ms-check,
374
- [type="radio"]::-ms-check {
289
+
290
+ [type="checkbox"]::-ms-check, [type="radio"]::-ms-check {
375
291
  display: none;
376
292
  }
377
- [type="checkbox"]:checked,
378
- [type="checkbox"]:checked:active,
379
- [type="checkbox"]:checked:focus,
380
- [type="radio"]:checked,
381
- [type="radio"]:checked:active,
382
- [type="radio"]:checked:focus {
293
+
294
+ [type="checkbox"]:checked, [type="checkbox"]:checked:active, [type="checkbox"]:checked:focus, [type="radio"]:checked, [type="radio"]:checked:active, [type="radio"]:checked:focus {
383
295
  --pico-background-color: var(--pico-primary-background);
384
296
  --pico-border-color: var(--pico-primary-border);
385
297
  background-image: var(--pico-icon-checkbox);
386
298
  background-position: center;
387
- background-size: 0.75em auto;
388
299
  background-repeat: no-repeat;
300
+ background-size: .75em;
389
301
  }
390
- [type="checkbox"] ~ label,
391
- [type="radio"] ~ label {
392
- display: inline-block;
393
- margin-bottom: 0;
302
+
303
+ [type="checkbox"] ~ label, [type="radio"] ~ label {
394
304
  cursor: pointer;
305
+ margin-bottom: 0;
306
+ display: inline-block;
395
307
  }
396
- [type="checkbox"] ~ label:not(:last-of-type),
397
- [type="radio"] ~ label:not(:last-of-type) {
308
+
309
+ [type="checkbox"] ~ label:not(:last-of-type), [type="radio"] ~ label:not(:last-of-type) {
398
310
  margin-inline-end: 1em;
399
311
  }
400
312
 
@@ -403,150 +315,120 @@ label:has([type="checkbox"], [type="radio"]) {
403
315
  --pico-border-color: var(--pico-primary-border);
404
316
  background-image: var(--pico-icon-minus);
405
317
  background-position: center;
406
- background-size: 0.75em auto;
407
318
  background-repeat: no-repeat;
319
+ background-size: .75em;
408
320
  }
409
321
 
410
322
  [type="radio"] {
411
323
  border-radius: 50%;
412
324
  }
413
- [type="radio"]:checked,
414
- [type="radio"]:checked:active,
415
- [type="radio"]:checked:focus {
325
+
326
+ [type="radio"]:checked, [type="radio"]:checked:active, [type="radio"]:checked:focus {
416
327
  --pico-background-color: var(--pico-primary-inverse);
417
- border-width: 0.35em;
418
328
  background-image: none;
329
+ border-width: .35em;
419
330
  }
420
331
 
421
332
  [type="checkbox"][role="switch"] {
422
333
  --pico-background-color: var(--pico-switch-background-color);
423
334
  --pico-color: var(--pico-switch-color);
424
- width: 2.25em;
425
- height: 1.25em;
426
335
  border: var(--pico-border-width) solid var(--pico-border-color);
427
- border-radius: 1.25em;
428
336
  background-color: var(--pico-background-color);
337
+ border-radius: 1.25em;
338
+ width: 2.25em;
339
+ height: 1.25em;
429
340
  line-height: 1.25em;
430
341
  }
342
+
431
343
  [type="checkbox"][role="switch"]:not([aria-invalid]) {
432
344
  --pico-border-color: var(--pico-switch-background-color);
433
345
  }
346
+
434
347
  [type="checkbox"][role="switch"]:before {
435
- display: block;
436
348
  aspect-ratio: 1;
437
- height: 100%;
438
- border-radius: 50%;
439
349
  background-color: var(--pico-color);
350
+ height: 100%;
440
351
  box-shadow: var(--pico-switch-thumb-box-shadow);
441
352
  content: "";
442
- transition: margin 0.1s ease-in-out;
353
+ border-radius: 50%;
354
+ transition: margin .1s ease-in-out;
355
+ display: block;
443
356
  }
357
+
444
358
  [type="checkbox"][role="switch"]:focus {
445
359
  --pico-background-color: var(--pico-switch-background-color);
446
360
  --pico-border-color: var(--pico-switch-background-color);
447
361
  }
362
+
448
363
  [type="checkbox"][role="switch"]:checked {
449
364
  --pico-background-color: var(--pico-switch-checked-background-color);
450
365
  --pico-border-color: var(--pico-switch-checked-background-color);
451
366
  background-image: none;
452
367
  }
453
- [type="checkbox"][role="switch"]:checked::before {
454
- margin-inline-start: calc(2.25em - 1.25em);
368
+
369
+ [type="checkbox"][role="switch"]:checked:before {
370
+ margin-inline-start: 1em;
455
371
  }
372
+
456
373
  [type="checkbox"][role="switch"][disabled] {
457
374
  --pico-background-color: var(--pico-border-color);
458
375
  }
459
376
 
460
- [type="checkbox"][aria-invalid="false"]:checked,
461
- [type="checkbox"][aria-invalid="false"]:checked:active,
462
- [type="checkbox"][aria-invalid="false"]:checked:focus,
463
- [type="checkbox"][role="switch"][aria-invalid="false"]:checked,
464
- [type="checkbox"][role="switch"][aria-invalid="false"]:checked:active,
465
- [type="checkbox"][role="switch"][aria-invalid="false"]:checked:focus {
377
+ [type="checkbox"][aria-invalid="false"]:checked, [type="checkbox"][aria-invalid="false"]:checked:active, [type="checkbox"][aria-invalid="false"]:checked:focus, [type="checkbox"][role="switch"][aria-invalid="false"]:checked, [type="checkbox"][role="switch"][aria-invalid="false"]:checked:active, [type="checkbox"][role="switch"][aria-invalid="false"]:checked:focus {
466
378
  --pico-background-color: var(--pico-form-element-valid-border-color);
467
379
  }
468
- [type="checkbox"]:checked[aria-invalid="true"],
469
- [type="checkbox"]:checked:active[aria-invalid="true"],
470
- [type="checkbox"]:checked:focus[aria-invalid="true"],
471
- [type="checkbox"][role="switch"]:checked[aria-invalid="true"],
472
- [type="checkbox"][role="switch"]:checked:active[aria-invalid="true"],
473
- [type="checkbox"][role="switch"]:checked:focus[aria-invalid="true"] {
380
+
381
+ [type="checkbox"]:checked[aria-invalid="true"], [type="checkbox"]:checked:active[aria-invalid="true"], [type="checkbox"]:checked:focus[aria-invalid="true"], [type="checkbox"][role="switch"]:checked[aria-invalid="true"], [type="checkbox"][role="switch"]:checked:active[aria-invalid="true"], [type="checkbox"][role="switch"]:checked:focus[aria-invalid="true"] {
474
382
  --pico-background-color: var(--pico-form-element-invalid-border-color);
475
383
  }
476
384
 
477
- [type="checkbox"][aria-invalid="false"]:checked,
478
- [type="checkbox"][aria-invalid="false"]:checked:active,
479
- [type="checkbox"][aria-invalid="false"]:checked:focus,
480
- [type="radio"][aria-invalid="false"]:checked,
481
- [type="radio"][aria-invalid="false"]:checked:active,
482
- [type="radio"][aria-invalid="false"]:checked:focus,
483
- [type="checkbox"][role="switch"][aria-invalid="false"]:checked,
484
- [type="checkbox"][role="switch"][aria-invalid="false"]:checked:active,
485
- [type="checkbox"][role="switch"][aria-invalid="false"]:checked:focus {
385
+ [type="checkbox"][aria-invalid="false"]:checked, [type="checkbox"][aria-invalid="false"]:checked:active, [type="checkbox"][aria-invalid="false"]:checked:focus, [type="radio"][aria-invalid="false"]:checked, [type="radio"][aria-invalid="false"]:checked:active, [type="radio"][aria-invalid="false"]:checked:focus, [type="checkbox"][role="switch"][aria-invalid="false"]:checked, [type="checkbox"][role="switch"][aria-invalid="false"]:checked:active, [type="checkbox"][role="switch"][aria-invalid="false"]:checked:focus {
486
386
  --pico-border-color: var(--pico-form-element-valid-border-color);
487
387
  }
488
- [type="checkbox"]:checked[aria-invalid="true"],
489
- [type="checkbox"]:checked:active[aria-invalid="true"],
490
- [type="checkbox"]:checked:focus[aria-invalid="true"],
491
- [type="radio"]:checked[aria-invalid="true"],
492
- [type="radio"]:checked:active[aria-invalid="true"],
493
- [type="radio"]:checked:focus[aria-invalid="true"],
494
- [type="checkbox"][role="switch"]:checked[aria-invalid="true"],
495
- [type="checkbox"][role="switch"]:checked:active[aria-invalid="true"],
496
- [type="checkbox"][role="switch"]:checked:focus[aria-invalid="true"] {
388
+
389
+ [type="checkbox"]:checked[aria-invalid="true"], [type="checkbox"]:checked:active[aria-invalid="true"], [type="checkbox"]:checked:focus[aria-invalid="true"], [type="radio"]:checked[aria-invalid="true"], [type="radio"]:checked:active[aria-invalid="true"], [type="radio"]:checked:focus[aria-invalid="true"], [type="checkbox"][role="switch"]:checked[aria-invalid="true"], [type="checkbox"][role="switch"]:checked:active[aria-invalid="true"], [type="checkbox"][role="switch"]:checked:focus[aria-invalid="true"] {
497
390
  --pico-border-color: var(--pico-form-element-invalid-border-color);
498
391
  }
499
- /**
500
- * Input type color
501
- */
392
+
502
393
  [type="color"]::-webkit-color-swatch-wrapper {
503
394
  padding: 0;
504
395
  }
396
+
505
397
  [type="color"]::-moz-focus-inner {
506
398
  padding: 0;
507
399
  }
400
+
508
401
  [type="color"]::-webkit-color-swatch {
402
+ border-radius: calc(var(--pico-border-radius) * .5);
509
403
  border: 0;
510
- border-radius: calc(var(--pico-border-radius) * 0.5);
511
404
  }
405
+
512
406
  [type="color"]::-moz-color-swatch {
407
+ border-radius: calc(var(--pico-border-radius) * .5);
513
408
  border: 0;
514
- border-radius: calc(var(--pico-border-radius) * 0.5);
515
409
  }
516
- /**
517
- * Input type datetime
518
- */
519
- :where(:scope),
520
- :host {
410
+
411
+ :where(:scope), :host {
521
412
  --pico-icon-date: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(136, 145, 164)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");
522
413
  --pico-icon-time: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(136, 145, 164)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cpolyline points='12 6 12 12 16 14'%3E%3C/polyline%3E%3C/svg%3E");
523
414
  }
524
415
 
525
- input:not([type="checkbox"], [type="radio"], [type="range"], [type="file"]):is(
526
- [type="date"],
527
- [type="datetime-local"],
528
- [type="month"],
529
- [type="time"],
530
- [type="week"]
531
- ) {
532
- --pico-icon-position: 0.75rem;
416
+ input:not([type="checkbox"], [type="radio"], [type="range"], [type="file"]):is([type="date"], [type="datetime-local"], [type="month"], [type="time"], [type="week"]) {
417
+ --pico-icon-position: .75rem;
533
418
  --pico-icon-width: 1rem;
534
- min-width: 0;
535
419
  padding-right: calc(var(--pico-icon-width) + var(--pico-icon-position));
536
420
  background-image: var(--pico-icon-date);
537
421
  background-position: center right var(--pico-icon-position);
538
422
  background-size: var(--pico-icon-width) auto;
539
423
  background-repeat: no-repeat;
424
+ min-width: 0;
540
425
  }
426
+
541
427
  input:not([type="checkbox"], [type="radio"], [type="range"], [type="file"])[type="time"] {
542
428
  background-image: var(--pico-icon-time);
543
429
  }
544
430
 
545
- [type="date"]::-webkit-calendar-picker-indicator,
546
- [type="datetime-local"]::-webkit-calendar-picker-indicator,
547
- [type="month"]::-webkit-calendar-picker-indicator,
548
- [type="time"]::-webkit-calendar-picker-indicator,
549
- [type="week"]::-webkit-calendar-picker-indicator {
431
+ [type="date"]::-webkit-calendar-picker-indicator, [type="datetime-local"]::-webkit-calendar-picker-indicator, [type="month"]::-webkit-calendar-picker-indicator, [type="time"]::-webkit-calendar-picker-indicator, [type="week"]::-webkit-calendar-picker-indicator {
550
432
  width: var(--pico-icon-width);
551
433
  margin-right: calc(var(--pico-icon-width) * -1);
552
434
  margin-left: var(--pico-icon-position);
@@ -554,50 +436,43 @@ input:not([type="checkbox"], [type="radio"], [type="range"], [type="file"])[type
554
436
  }
555
437
 
556
438
  @-moz-document url-prefix() {
557
- [type="date"],
558
- [type="datetime-local"],
559
- [type="month"],
560
- [type="time"],
561
- [type="week"] {
439
+ [type="date"], [type="datetime-local"], [type="month"], [type="time"], [type="week"] {
562
440
  padding-right: var(--pico-form-element-spacing-horizontal) !important;
563
441
  background-image: none !important;
564
442
  }
565
443
  }
566
- [dir="rtl"]
567
- :is([type="date"], [type="datetime-local"], [type="month"], [type="time"], [type="week"]) {
444
+
445
+ [dir="rtl"] :is([type="date"], [type="datetime-local"], [type="month"], [type="time"], [type="week"]) {
568
446
  text-align: end;
569
447
  }
570
- /**
571
- * Input type file
572
- */
448
+
573
449
  [type="file"] {
574
450
  --pico-color: var(--pico-muted-color);
575
451
  margin-left: calc(var(--pico-outline-width) * -1);
576
- padding: calc(var(--pico-form-element-spacing-vertical) * 0.5) 0;
452
+ padding: calc(var(--pico-form-element-spacing-vertical) * .5) 0;
577
453
  padding-left: var(--pico-outline-width);
454
+ background: none;
578
455
  border: 0;
579
456
  border-radius: 0;
580
- background: none;
581
457
  }
458
+
582
459
  [type="file"]::file-selector-button {
583
460
  margin-right: calc(var(--pico-spacing) / 2);
584
- padding: calc(var(--pico-form-element-spacing-vertical) * 0.5)
461
+ padding: calc(var(--pico-form-element-spacing-vertical) * .5)
585
462
  var(--pico-form-element-spacing-horizontal);
586
463
  }
464
+
587
465
  [type="file"]:is(:hover, :active, :focus)::file-selector-button {
588
466
  --pico-background-color: var(--pico-secondary-hover-background);
589
467
  --pico-border-color: var(--pico-secondary-hover-border);
590
468
  }
469
+
591
470
  [type="file"]:focus::file-selector-button {
592
- --pico-box-shadow:
593
- var(--pico-button-hover-box-shadow, 0 0 0 rgba(0, 0, 0, 0)),
471
+ --pico-box-shadow: var(--pico-button-hover-box-shadow, 0 0 0 #0000),
594
472
  0 0 0 var(--pico-outline-width) var(--pico-secondary-focus);
595
473
  }
596
- /**
597
- * Input type range
598
- */
599
- :where(:scope, [data-theme="light"], [data-theme="dark"]),
600
- :host {
474
+
475
+ :where(:scope, [data-theme="light"], [data-theme="dark"]), :host {
601
476
  --pico-range-border-color: light-dark(#dfe3eb, #202632);
602
477
  --pico-range-active-border-color: light-dark(#bfc7d9, #2a3140);
603
478
  --pico-range-thumb-border-color: var(--pico-background-color);
@@ -609,170 +484,137 @@ input:not([type="checkbox"], [type="radio"], [type="range"], [type="file"])[type
609
484
  -webkit-appearance: none;
610
485
  -moz-appearance: none;
611
486
  appearance: none;
487
+ background: none;
612
488
  width: 100%;
613
489
  height: 1.25rem;
614
- background: none;
615
490
  }
491
+
616
492
  [type="range"]::-webkit-slider-runnable-track {
617
- width: 100%;
618
- height: 0.375rem;
619
493
  border-radius: var(--pico-border-radius);
620
494
  background-color: var(--pico-range-border-color);
621
- -webkit-transition:
622
- background-color var(--pico-transition),
495
+ width: 100%;
496
+ height: .375rem;
497
+ -webkit-transition: background-color var(--pico-transition),
623
498
  box-shadow var(--pico-transition);
624
- transition:
625
- background-color var(--pico-transition),
499
+ transition: background-color var(--pico-transition),
626
500
  box-shadow var(--pico-transition);
627
501
  }
502
+
628
503
  [type="range"]::-moz-range-track {
629
- width: 100%;
630
- height: 0.375rem;
631
504
  border-radius: var(--pico-border-radius);
632
505
  background-color: var(--pico-range-border-color);
633
- -moz-transition:
634
- background-color var(--pico-transition),
506
+ width: 100%;
507
+ height: .375rem;
508
+ -moz-transition: background-color var(--pico-transition),
635
509
  box-shadow var(--pico-transition);
636
- transition:
637
- background-color var(--pico-transition),
510
+ transition: background-color var(--pico-transition),
638
511
  box-shadow var(--pico-transition);
639
512
  }
513
+
640
514
  [type="range"]::-ms-track {
641
- width: 100%;
642
- height: 0.375rem;
643
515
  border-radius: var(--pico-border-radius);
644
516
  background-color: var(--pico-range-border-color);
645
- -ms-transition:
646
- background-color var(--pico-transition),
517
+ width: 100%;
518
+ height: .375rem;
519
+ -ms-transition: background-color var(--pico-transition),
647
520
  box-shadow var(--pico-transition);
648
- transition:
649
- background-color var(--pico-transition),
521
+ transition: background-color var(--pico-transition),
650
522
  box-shadow var(--pico-transition);
651
523
  }
524
+
652
525
  [type="range"]::-webkit-slider-thumb {
653
526
  -webkit-appearance: none;
654
- width: 1.25rem;
655
- height: 1.25rem;
656
- margin-top: -0.4375rem;
657
527
  border: 2px solid var(--pico-range-thumb-border-color);
658
- border-radius: 50%;
659
528
  background-color: var(--pico-range-thumb-color);
660
529
  cursor: pointer;
661
- -webkit-transition:
662
- background-color var(--pico-transition),
530
+ width: 1.25rem;
531
+ height: 1.25rem;
532
+ -webkit-transition: background-color var(--pico-transition),
663
533
  transform var(--pico-transition);
664
- transition:
665
- background-color var(--pico-transition),
534
+ transition: background-color var(--pico-transition),
666
535
  transform var(--pico-transition);
536
+ border-radius: 50%;
537
+ margin-top: -.4375rem;
667
538
  }
539
+
668
540
  [type="range"]::-moz-range-thumb {
669
541
  -webkit-appearance: none;
670
- width: 1.25rem;
671
- height: 1.25rem;
672
- margin-top: -0.4375rem;
673
542
  border: 2px solid var(--pico-range-thumb-border-color);
674
- border-radius: 50%;
675
543
  background-color: var(--pico-range-thumb-color);
676
544
  cursor: pointer;
677
- -moz-transition:
678
- background-color var(--pico-transition),
545
+ width: 1.25rem;
546
+ height: 1.25rem;
547
+ -moz-transition: background-color var(--pico-transition),
679
548
  transform var(--pico-transition);
680
- transition:
681
- background-color var(--pico-transition),
549
+ transition: background-color var(--pico-transition),
682
550
  transform var(--pico-transition);
551
+ border-radius: 50%;
552
+ margin-top: -.4375rem;
683
553
  }
554
+
684
555
  [type="range"]::-ms-thumb {
685
556
  -webkit-appearance: none;
686
- width: 1.25rem;
687
- height: 1.25rem;
688
- margin-top: -0.4375rem;
689
557
  border: 2px solid var(--pico-range-thumb-border-color);
690
- border-radius: 50%;
691
558
  background-color: var(--pico-range-thumb-color);
692
559
  cursor: pointer;
693
- -ms-transition:
694
- background-color var(--pico-transition),
560
+ width: 1.25rem;
561
+ height: 1.25rem;
562
+ -ms-transition: background-color var(--pico-transition),
695
563
  transform var(--pico-transition);
696
- transition:
697
- background-color var(--pico-transition),
564
+ transition: background-color var(--pico-transition),
698
565
  transform var(--pico-transition);
566
+ border-radius: 50%;
567
+ margin-top: -.4375rem;
699
568
  }
700
- [type="range"]:active,
701
- [type="range"]:focus-within {
569
+
570
+ [type="range"]:active, [type="range"]:focus-within {
702
571
  --pico-range-border-color: var(--pico-range-active-border-color);
703
572
  --pico-range-thumb-color: var(--pico-range-thumb-active-color);
704
573
  }
574
+
705
575
  [type="range"]:active::-webkit-slider-thumb {
706
576
  transform: scale(1.25);
707
577
  }
578
+
708
579
  [type="range"]:active::-moz-range-thumb {
709
580
  transform: scale(1.25);
710
581
  }
582
+
711
583
  [type="range"]:active::-ms-thumb {
712
584
  transform: scale(1.25);
713
585
  }
714
- /**
715
- * Input type search
716
- */
717
- :where(:scope),
718
- :host {
586
+
587
+ :where(:scope), :host {
719
588
  --pico-icon-search: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(136, 145, 164)' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");
720
589
  }
721
590
 
722
591
  input:not([type="checkbox"], [type="radio"], [type="range"], [type="file"])[type="search"] {
723
- padding-inline-start: calc(var(--pico-form-element-spacing-horizontal) + 1.75rem);
724
592
  background-image: var(--pico-icon-search);
725
- background-position: center left calc(var(--pico-form-element-spacing-horizontal) + 0.125rem);
726
- background-size: 1rem auto;
593
+ background-position: center left calc(var(--pico-form-element-spacing-horizontal) + .125rem);
727
594
  background-repeat: no-repeat;
595
+ background-size: 1rem;
596
+ padding-inline-start: calc(var(--pico-form-element-spacing-horizontal) + 1.75rem);
728
597
  }
729
- input:not(
730
- [type="checkbox"],
731
- [type="radio"],
732
- [type="range"],
733
- [type="file"]
734
- )[type="search"][aria-invalid] {
598
+
599
+ input:not([type="checkbox"], [type="radio"], [type="range"], [type="file"])[type="search"][aria-invalid] {
600
+ background-position: 1.125rem, right .75rem center;
735
601
  padding-inline-start: calc(var(--pico-form-element-spacing-horizontal) + 1.75rem) !important;
736
- background-position:
737
- center left 1.125rem,
738
- center right 0.75rem;
739
- }
740
- input:not(
741
- [type="checkbox"],
742
- [type="radio"],
743
- [type="range"],
744
- [type="file"]
745
- )[type="search"][aria-invalid="false"] {
602
+ }
603
+
604
+ input:not([type="checkbox"], [type="radio"], [type="range"], [type="file"])[type="search"][aria-invalid="false"] {
746
605
  background-image: var(--pico-icon-search), var(--pico-icon-valid);
747
606
  }
748
- input:not(
749
- [type="checkbox"],
750
- [type="radio"],
751
- [type="range"],
752
- [type="file"]
753
- )[type="search"][aria-invalid="true"] {
607
+
608
+ input:not([type="checkbox"], [type="radio"], [type="range"], [type="file"])[type="search"][aria-invalid="true"] {
754
609
  background-image: var(--pico-icon-search), var(--pico-icon-invalid);
755
610
  }
756
611
 
757
- [dir="rtl"]
758
- :where(input):not(
759
- [type="checkbox"],
760
- [type="radio"],
761
- [type="range"],
762
- [type="file"]
763
- )[type="search"] {
764
- background-position: center right 1.125rem;
765
- }
766
- [dir="rtl"]
767
- :where(input):not(
768
- [type="checkbox"],
769
- [type="radio"],
770
- [type="range"],
771
- [type="file"]
772
- )[type="search"][aria-invalid] {
773
- background-position:
774
- center right 1.125rem,
775
- center left 0.75rem;
612
+ [dir="rtl"] :where(input):not([type="checkbox"], [type="radio"], [type="range"], [type="file"])[type="search"] {
613
+ background-position: right 1.125rem center;
614
+ }
615
+
616
+ [dir="rtl"] :where(input):not([type="checkbox"], [type="radio"], [type="range"], [type="file"])[type="search"][aria-invalid] {
617
+ background-position: right 1.125rem center, .75rem;
776
618
  }
777
619
 
778
620
  }