@anyblades/blades 3.1.0-alpha.1 → 3.1.0-beta.2
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 +78 -3
- package/css/blades.css +371 -978
- package/css/blades.min.css +74 -37
- package/css/blades.ninja.css +4057 -0
- package/css/blades.ninja.min.css +190 -0
- package/css/float-label.css +207 -0
- package/css/float-label.min.css +55 -0
- package/css/{pico.layered.css → layered/blades.layered.css} +654 -397
- package/css/layered/blades.layered.min.css +184 -0
- package/css/layered/compact.css +54 -0
- package/css/layered/components/accordion.css +85 -0
- package/css/layered/components/card.css +48 -0
- package/css/layered/components/dropdown.css +191 -0
- package/css/layered/components/group.css +208 -0
- package/css/layered/components/loading.css +43 -0
- package/css/layered/components/modal.css +158 -0
- package/css/layered/components/nav.css +117 -0
- package/css/layered/components/progress.css +76 -0
- package/css/layered/components/tooltip.css +176 -0
- package/css/layered/components.css +1082 -0
- package/css/layered/content/button.css +208 -0
- package/css/layered/content/code.css +64 -0
- package/css/layered/content/embedded-content.css +41 -0
- package/css/layered/content/figure.css +15 -0
- package/css/layered/content/link.css +84 -0
- package/css/layered/content/misc.css +22 -0
- package/css/layered/content/table.css +33 -0
- package/css/layered/content/typography.css +159 -0
- package/css/layered/content.css +611 -0
- package/css/layered/forms/basics.css +338 -0
- package/css/layered/forms/checkbox-radio-switch.css +164 -0
- package/css/layered/forms/input-color.css +20 -0
- package/css/layered/forms/input-datetime.css +57 -0
- package/css/layered/forms/input-file.css +29 -0
- package/css/layered/forms/input-range.css +121 -0
- package/css/layered/forms/input-search.css +66 -0
- package/css/layered/forms.css +778 -0
- package/css/layered/layout/container.css +42 -0
- package/css/layered/layout/document.css +48 -0
- package/css/layered/layout/grid.css +22 -0
- package/css/layered/layout/landmarks.css +12 -0
- package/css/layered/layout/overflow-auto.css +9 -0
- package/css/layered/layout/section.css +9 -0
- package/css/layered/layout.css +119 -0
- package/css/layered/utilities.css +35 -0
- package/css/layered/variables.css +365 -0
- package/css/pico.conditional.css +229 -396
- package/css/pico.conditional.min.css +42 -31
- package/css/pico.css +229 -396
- package/css/pico.min.css +42 -31
- package/package.json +24 -11
- package/src/_compact.css +51 -0
- package/src/blades/_index.css +23 -0
- package/src/blades/float-label/_index.css +2 -0
- package/src/{standalone/forms/_float-label.theme.css → blades/float-label/_theme.css} +5 -1
- package/src/blades.css +3 -2
- package/src/blades.ninja.css +3 -0
- package/src/float-label.css +1 -0
- package/src/ninja/_index.css +19 -0
- package/src/{standalone → ninja}/_theme.css +0 -2
- package/src/{ninja.css → ninja/_utilities.css} +55 -6
- package/src/pico/_variables.css +77 -386
- package/src/pico/components/_accordion.css +8 -0
- package/src/pico/components/_card.css +14 -0
- package/src/pico/components/_dropdown.css +9 -0
- package/src/pico/components/_group.css +38 -0
- package/src/pico/components/_loading.css +9 -0
- package/src/pico/components/_modal.css +13 -0
- package/src/pico/components/_nav.css +6 -0
- package/src/pico/components/_progress.css +6 -0
- package/src/pico/components/_tooltip.css +6 -0
- package/src/pico/content/_button.css +1 -1
- package/src/pico/forms/_checkbox-radio-switch.css +13 -0
- package/src/pico/forms/_input-datetime.css +6 -0
- package/src/pico/forms/_input-range.css +9 -0
- package/src/pico/forms/_input-search.css +5 -0
- package/src/pico/layout/_document.css +9 -0
- package/src/pico/layout/_index.css +0 -1
- package/src/pico/layout/_landmarks.css +1 -9
- package/src/pico.css +1 -0
- package/.github/ISSUE_TEMPLATE/bug_report.md +0 -25
- package/.github/ISSUE_TEMPLATE/config.yml +0 -8
- package/.prettierignore +0 -3
- package/CODE_OF_CONDUCT.md +0 -92
- package/context7.json +0 -4
- package/css/blades.standalone.css +0 -860
- package/css/blades.standalone.min.css +0 -37
- package/css/ninja.css +0 -83
- package/css/ninja.min.css +0 -5
- package/css/pico.layered.min.css +0 -107
- package/css/postcss.config.js +0 -23
- package/index.html +0 -63
- package/src/blades.standalone.css +0 -2
- package/src/standalone/_core.css +0 -32
- package/src/standalone/_utilities.css +0 -55
- package/src/standalone/forms/_float-label.css +0 -2
- /package/src/{standalone/content → blades}/_code.css +0 -0
- /package/src/{standalone/layout → blades}/_columns.css +0 -0
- /package/src/{standalone/components/_icon-helper.css → blades/_icon.css} +0 -0
- /package/src/{standalone/components → blades}/_timeline.css +0 -0
- /package/src/{standalone → blades}/_variables.css +0 -0
- /package/src/{standalone/forms/_float-label.core.css → blades/float-label/_core.css} +0 -0
- /package/src/{standalone/layout/_breakout.css → ninja/_container-breakout.css} +0 -0
- /package/src/{standalone/content/_typography.css → ninja/_heading-anchor.css} +0 -0
- /package/src/{standalone/content/_list.css → ninja/_list-helpers.css} +0 -0
- /package/src/{standalone/layout/_scroller.css → ninja/_page-anchors.css} +0 -0
- /package/src/{standalone/content/_table.css → ninja/_table-helpers.css} +0 -0
- /package/src/{standalone/content → ninja}/_table-responsive.css +0 -0
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
@layer blades {
|
|
2
|
+
/**
|
|
3
|
+
* Basics form elements
|
|
4
|
+
*/
|
|
5
|
+
input,
|
|
6
|
+
optgroup,
|
|
7
|
+
select,
|
|
8
|
+
textarea {
|
|
9
|
+
margin: 0;
|
|
10
|
+
font-size: 1rem;
|
|
11
|
+
line-height: var(--pico-line-height);
|
|
12
|
+
font-family: inherit;
|
|
13
|
+
letter-spacing: inherit;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
input {
|
|
17
|
+
overflow: visible;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
select {
|
|
21
|
+
text-transform: none;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
legend {
|
|
25
|
+
max-width: 100%;
|
|
26
|
+
padding: 0;
|
|
27
|
+
color: inherit;
|
|
28
|
+
white-space: normal;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
textarea {
|
|
32
|
+
overflow: auto;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
[type="checkbox"],
|
|
36
|
+
[type="radio"] {
|
|
37
|
+
padding: 0;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
::-webkit-inner-spin-button,
|
|
41
|
+
::-webkit-outer-spin-button {
|
|
42
|
+
height: auto;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
[type="search"] {
|
|
46
|
+
-webkit-appearance: textfield;
|
|
47
|
+
outline-offset: -2px;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
[type="search"]::-webkit-search-decoration {
|
|
51
|
+
-webkit-appearance: none;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
::-webkit-file-upload-button {
|
|
55
|
+
-webkit-appearance: button;
|
|
56
|
+
font: inherit;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
::-moz-focus-inner {
|
|
60
|
+
padding: 0;
|
|
61
|
+
border-style: none;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
:-moz-focusring {
|
|
65
|
+
outline: none;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
:-moz-ui-invalid {
|
|
69
|
+
box-shadow: none;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
::-ms-expand {
|
|
73
|
+
display: none;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
[type="file"],
|
|
77
|
+
[type="range"] {
|
|
78
|
+
padding: 0;
|
|
79
|
+
border-width: 0;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
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
|
+
);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
fieldset {
|
|
90
|
+
width: 100%;
|
|
91
|
+
min-width: 0;
|
|
92
|
+
margin: 0;
|
|
93
|
+
margin-bottom: var(--pico-spacing);
|
|
94
|
+
padding: 0;
|
|
95
|
+
border: 0;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
label,
|
|
99
|
+
fieldset legend {
|
|
100
|
+
display: block;
|
|
101
|
+
margin-bottom: calc(var(--pico-spacing) * 0.375);
|
|
102
|
+
color: var(--pico-color);
|
|
103
|
+
font-weight: var(--pico-form-label-font-weight, var(--pico-font-weight));
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
fieldset legend {
|
|
107
|
+
margin-bottom: calc(var(--pico-spacing) * 0.5);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
input:not([type="checkbox"], [type="radio"]),
|
|
111
|
+
button[type="submit"],
|
|
112
|
+
select,
|
|
113
|
+
textarea {
|
|
114
|
+
width: 100%;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
input:not([type="checkbox"], [type="radio"], [type="range"], [type="file"]),
|
|
118
|
+
select,
|
|
119
|
+
textarea {
|
|
120
|
+
-webkit-appearance: none;
|
|
121
|
+
-moz-appearance: none;
|
|
122
|
+
appearance: none;
|
|
123
|
+
padding: var(--pico-form-element-spacing-vertical) var(--pico-form-element-spacing-horizontal);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
input,
|
|
127
|
+
select,
|
|
128
|
+
textarea {
|
|
129
|
+
--pico-background-color: var(--pico-form-element-background-color);
|
|
130
|
+
--pico-border-color: var(--pico-form-element-border-color);
|
|
131
|
+
--pico-color: var(--pico-form-element-color);
|
|
132
|
+
--pico-box-shadow: none;
|
|
133
|
+
border: var(--pico-border-width) solid var(--pico-border-color);
|
|
134
|
+
border-radius: var(--pico-border-radius);
|
|
135
|
+
outline: none;
|
|
136
|
+
background-color: var(--pico-background-color);
|
|
137
|
+
box-shadow: var(--pico-box-shadow);
|
|
138
|
+
color: var(--pico-color);
|
|
139
|
+
font-weight: var(--pico-font-weight);
|
|
140
|
+
transition:
|
|
141
|
+
background-color var(--pico-transition),
|
|
142
|
+
border-color var(--pico-transition),
|
|
143
|
+
color var(--pico-transition),
|
|
144
|
+
box-shadow var(--pico-transition);
|
|
145
|
+
}
|
|
146
|
+
|
|
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) {
|
|
156
|
+
--pico-background-color: var(--pico-form-element-active-background-color);
|
|
157
|
+
}
|
|
158
|
+
|
|
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) {
|
|
164
|
+
--pico-border-color: var(--pico-form-element-active-border-color);
|
|
165
|
+
}
|
|
166
|
+
|
|
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 {
|
|
176
|
+
--pico-box-shadow: 0 0 0 var(--pico-outline-width) var(--pico-form-element-focus-color);
|
|
177
|
+
}
|
|
178
|
+
|
|
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) {
|
|
185
|
+
opacity: var(--pico-form-element-disabled-opacity);
|
|
186
|
+
pointer-events: none;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
label[aria-disabled="true"] input[disabled] {
|
|
190
|
+
opacity: 1;
|
|
191
|
+
}
|
|
192
|
+
|
|
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;
|
|
204
|
+
padding-left: var(--pico-form-element-spacing-horizontal);
|
|
205
|
+
padding-inline-start: var(--pico-form-element-spacing-horizontal) !important;
|
|
206
|
+
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
|
+
}
|
|
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) {
|
|
221
|
+
background-image: var(--pico-icon-valid);
|
|
222
|
+
}
|
|
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) {
|
|
233
|
+
background-image: var(--pico-icon-invalid);
|
|
234
|
+
}
|
|
235
|
+
:where(input, select, textarea)[aria-invalid="false"] {
|
|
236
|
+
--pico-border-color: var(--pico-form-element-valid-border-color);
|
|
237
|
+
}
|
|
238
|
+
:where(input, select, textarea)[aria-invalid="false"]:is(:active, :focus) {
|
|
239
|
+
--pico-border-color: var(--pico-form-element-valid-active-border-color) !important;
|
|
240
|
+
}
|
|
241
|
+
:where(input, select, textarea)[aria-invalid="false"]:is(:active, :focus):not(
|
|
242
|
+
[type="checkbox"],
|
|
243
|
+
[type="radio"]
|
|
244
|
+
) {
|
|
245
|
+
--pico-box-shadow: 0 0 0 var(--pico-outline-width) var(--pico-form-element-valid-focus-color) !important;
|
|
246
|
+
}
|
|
247
|
+
:where(input, select, textarea)[aria-invalid="true"] {
|
|
248
|
+
--pico-border-color: var(--pico-form-element-invalid-border-color);
|
|
249
|
+
}
|
|
250
|
+
:where(input, select, textarea)[aria-invalid="true"]:is(:active, :focus) {
|
|
251
|
+
--pico-border-color: var(--pico-form-element-invalid-active-border-color) !important;
|
|
252
|
+
}
|
|
253
|
+
:where(input, select, textarea)[aria-invalid="true"]:is(:active, :focus):not(
|
|
254
|
+
[type="checkbox"],
|
|
255
|
+
[type="radio"]
|
|
256
|
+
) {
|
|
257
|
+
--pico-box-shadow: 0 0 0 var(--pico-outline-width) var(--pico-form-element-invalid-focus-color) !important;
|
|
258
|
+
}
|
|
259
|
+
|
|
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;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
input::placeholder,
|
|
270
|
+
input::-webkit-input-placeholder,
|
|
271
|
+
textarea::placeholder,
|
|
272
|
+
textarea::-webkit-input-placeholder,
|
|
273
|
+
select:invalid {
|
|
274
|
+
color: var(--pico-form-element-placeholder-color);
|
|
275
|
+
opacity: 1;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
input:not([type="checkbox"], [type="radio"]),
|
|
279
|
+
select,
|
|
280
|
+
textarea {
|
|
281
|
+
margin-bottom: var(--pico-spacing);
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
select::-ms-expand {
|
|
285
|
+
border: 0;
|
|
286
|
+
background-color: transparent;
|
|
287
|
+
}
|
|
288
|
+
select:not([multiple], [size]) {
|
|
289
|
+
padding-right: calc(var(--pico-form-element-spacing-horizontal) + 1.5rem);
|
|
290
|
+
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
|
+
background-image: var(--pico-icon-chevron);
|
|
294
|
+
background-position: center right 0.75rem;
|
|
295
|
+
background-size: 1rem auto;
|
|
296
|
+
background-repeat: no-repeat;
|
|
297
|
+
}
|
|
298
|
+
select[multiple] option:checked {
|
|
299
|
+
background: var(--pico-form-element-selected-background-color);
|
|
300
|
+
color: var(--pico-form-element-color);
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
[dir="rtl"] select:not([multiple], [size]) {
|
|
304
|
+
background-position: center left 0.75rem;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
textarea {
|
|
308
|
+
display: block;
|
|
309
|
+
resize: vertical;
|
|
310
|
+
}
|
|
311
|
+
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;
|
|
317
|
+
background-size: 1rem var(--pico-icon-height) !important;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
:where(input, select, textarea, fieldset, .grid) + small {
|
|
321
|
+
display: block;
|
|
322
|
+
width: 100%;
|
|
323
|
+
margin-top: calc(var(--pico-spacing) * -0.75);
|
|
324
|
+
margin-bottom: var(--pico-spacing);
|
|
325
|
+
color: var(--pico-muted-color);
|
|
326
|
+
}
|
|
327
|
+
:where(input, select, textarea, fieldset, .grid)[aria-invalid="false"] + small {
|
|
328
|
+
color: var(--pico-ins-color);
|
|
329
|
+
}
|
|
330
|
+
:where(input, select, textarea, fieldset, .grid)[aria-invalid="true"] + small {
|
|
331
|
+
color: var(--pico-del-color);
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
label > :where(input, select, textarea) {
|
|
335
|
+
margin-top: calc(var(--pico-spacing) * 0.25);
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
}
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
@layer blades {
|
|
2
|
+
/**
|
|
3
|
+
* Checkboxes, Radios and Switches
|
|
4
|
+
*/
|
|
5
|
+
:where(:scope),
|
|
6
|
+
:host {
|
|
7
|
+
--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");
|
|
8
|
+
--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");
|
|
9
|
+
}
|
|
10
|
+
:where(:scope, [data-theme="light"], [data-theme="dark"]),
|
|
11
|
+
:host {
|
|
12
|
+
--pico-switch-background-color: light-dark(#bfc7d9, #333c4e);
|
|
13
|
+
--pico-switch-checked-background-color: var(--pico-primary-background);
|
|
14
|
+
--pico-switch-color: #fff;
|
|
15
|
+
--pico-switch-thumb-box-shadow: 0 0 0 rgba(0, 0, 0, 0);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
label:has([type="checkbox"], [type="radio"]) {
|
|
19
|
+
width: -moz-fit-content;
|
|
20
|
+
width: fit-content;
|
|
21
|
+
cursor: pointer;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
[type="checkbox"],
|
|
25
|
+
[type="radio"] {
|
|
26
|
+
-webkit-appearance: none;
|
|
27
|
+
-moz-appearance: none;
|
|
28
|
+
appearance: none;
|
|
29
|
+
width: 1.25em;
|
|
30
|
+
height: 1.25em;
|
|
31
|
+
margin-top: -0.125em;
|
|
32
|
+
margin-inline-end: 0.5em;
|
|
33
|
+
border-width: var(--pico-border-width);
|
|
34
|
+
vertical-align: middle;
|
|
35
|
+
cursor: pointer;
|
|
36
|
+
}
|
|
37
|
+
[type="checkbox"]::-ms-check,
|
|
38
|
+
[type="radio"]::-ms-check {
|
|
39
|
+
display: none;
|
|
40
|
+
}
|
|
41
|
+
[type="checkbox"]:checked,
|
|
42
|
+
[type="checkbox"]:checked:active,
|
|
43
|
+
[type="checkbox"]:checked:focus,
|
|
44
|
+
[type="radio"]:checked,
|
|
45
|
+
[type="radio"]:checked:active,
|
|
46
|
+
[type="radio"]:checked:focus {
|
|
47
|
+
--pico-background-color: var(--pico-primary-background);
|
|
48
|
+
--pico-border-color: var(--pico-primary-border);
|
|
49
|
+
background-image: var(--pico-icon-checkbox);
|
|
50
|
+
background-position: center;
|
|
51
|
+
background-size: 0.75em auto;
|
|
52
|
+
background-repeat: no-repeat;
|
|
53
|
+
}
|
|
54
|
+
[type="checkbox"] ~ label,
|
|
55
|
+
[type="radio"] ~ label {
|
|
56
|
+
display: inline-block;
|
|
57
|
+
margin-bottom: 0;
|
|
58
|
+
cursor: pointer;
|
|
59
|
+
}
|
|
60
|
+
[type="checkbox"] ~ label:not(:last-of-type),
|
|
61
|
+
[type="radio"] ~ label:not(:last-of-type) {
|
|
62
|
+
margin-inline-end: 1em;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
[type="checkbox"]:indeterminate {
|
|
66
|
+
--pico-background-color: var(--pico-primary-background);
|
|
67
|
+
--pico-border-color: var(--pico-primary-border);
|
|
68
|
+
background-image: var(--pico-icon-minus);
|
|
69
|
+
background-position: center;
|
|
70
|
+
background-size: 0.75em auto;
|
|
71
|
+
background-repeat: no-repeat;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
[type="radio"] {
|
|
75
|
+
border-radius: 50%;
|
|
76
|
+
}
|
|
77
|
+
[type="radio"]:checked,
|
|
78
|
+
[type="radio"]:checked:active,
|
|
79
|
+
[type="radio"]:checked:focus {
|
|
80
|
+
--pico-background-color: var(--pico-primary-inverse);
|
|
81
|
+
border-width: 0.35em;
|
|
82
|
+
background-image: none;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
[type="checkbox"][role="switch"] {
|
|
86
|
+
--pico-background-color: var(--pico-switch-background-color);
|
|
87
|
+
--pico-color: var(--pico-switch-color);
|
|
88
|
+
width: 2.25em;
|
|
89
|
+
height: 1.25em;
|
|
90
|
+
border: var(--pico-border-width) solid var(--pico-border-color);
|
|
91
|
+
border-radius: 1.25em;
|
|
92
|
+
background-color: var(--pico-background-color);
|
|
93
|
+
line-height: 1.25em;
|
|
94
|
+
}
|
|
95
|
+
[type="checkbox"][role="switch"]:not([aria-invalid]) {
|
|
96
|
+
--pico-border-color: var(--pico-switch-background-color);
|
|
97
|
+
}
|
|
98
|
+
[type="checkbox"][role="switch"]:before {
|
|
99
|
+
display: block;
|
|
100
|
+
aspect-ratio: 1;
|
|
101
|
+
height: 100%;
|
|
102
|
+
border-radius: 50%;
|
|
103
|
+
background-color: var(--pico-color);
|
|
104
|
+
box-shadow: var(--pico-switch-thumb-box-shadow);
|
|
105
|
+
content: "";
|
|
106
|
+
transition: margin 0.1s ease-in-out;
|
|
107
|
+
}
|
|
108
|
+
[type="checkbox"][role="switch"]:focus {
|
|
109
|
+
--pico-background-color: var(--pico-switch-background-color);
|
|
110
|
+
--pico-border-color: var(--pico-switch-background-color);
|
|
111
|
+
}
|
|
112
|
+
[type="checkbox"][role="switch"]:checked {
|
|
113
|
+
--pico-background-color: var(--pico-switch-checked-background-color);
|
|
114
|
+
--pico-border-color: var(--pico-switch-checked-background-color);
|
|
115
|
+
background-image: none;
|
|
116
|
+
}
|
|
117
|
+
[type="checkbox"][role="switch"]:checked::before {
|
|
118
|
+
margin-inline-start: calc(2.25em - 1.25em);
|
|
119
|
+
}
|
|
120
|
+
[type="checkbox"][role="switch"][disabled] {
|
|
121
|
+
--pico-background-color: var(--pico-border-color);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
[type="checkbox"][aria-invalid="false"]:checked,
|
|
125
|
+
[type="checkbox"][aria-invalid="false"]:checked:active,
|
|
126
|
+
[type="checkbox"][aria-invalid="false"]:checked:focus,
|
|
127
|
+
[type="checkbox"][role="switch"][aria-invalid="false"]:checked,
|
|
128
|
+
[type="checkbox"][role="switch"][aria-invalid="false"]:checked:active,
|
|
129
|
+
[type="checkbox"][role="switch"][aria-invalid="false"]:checked:focus {
|
|
130
|
+
--pico-background-color: var(--pico-form-element-valid-border-color);
|
|
131
|
+
}
|
|
132
|
+
[type="checkbox"]:checked[aria-invalid="true"],
|
|
133
|
+
[type="checkbox"]:checked:active[aria-invalid="true"],
|
|
134
|
+
[type="checkbox"]:checked:focus[aria-invalid="true"],
|
|
135
|
+
[type="checkbox"][role="switch"]:checked[aria-invalid="true"],
|
|
136
|
+
[type="checkbox"][role="switch"]:checked:active[aria-invalid="true"],
|
|
137
|
+
[type="checkbox"][role="switch"]:checked:focus[aria-invalid="true"] {
|
|
138
|
+
--pico-background-color: var(--pico-form-element-invalid-border-color);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
[type="checkbox"][aria-invalid="false"]:checked,
|
|
142
|
+
[type="checkbox"][aria-invalid="false"]:checked:active,
|
|
143
|
+
[type="checkbox"][aria-invalid="false"]:checked:focus,
|
|
144
|
+
[type="radio"][aria-invalid="false"]:checked,
|
|
145
|
+
[type="radio"][aria-invalid="false"]:checked:active,
|
|
146
|
+
[type="radio"][aria-invalid="false"]:checked:focus,
|
|
147
|
+
[type="checkbox"][role="switch"][aria-invalid="false"]:checked,
|
|
148
|
+
[type="checkbox"][role="switch"][aria-invalid="false"]:checked:active,
|
|
149
|
+
[type="checkbox"][role="switch"][aria-invalid="false"]:checked:focus {
|
|
150
|
+
--pico-border-color: var(--pico-form-element-valid-border-color);
|
|
151
|
+
}
|
|
152
|
+
[type="checkbox"]:checked[aria-invalid="true"],
|
|
153
|
+
[type="checkbox"]:checked:active[aria-invalid="true"],
|
|
154
|
+
[type="checkbox"]:checked:focus[aria-invalid="true"],
|
|
155
|
+
[type="radio"]:checked[aria-invalid="true"],
|
|
156
|
+
[type="radio"]:checked:active[aria-invalid="true"],
|
|
157
|
+
[type="radio"]:checked:focus[aria-invalid="true"],
|
|
158
|
+
[type="checkbox"][role="switch"]:checked[aria-invalid="true"],
|
|
159
|
+
[type="checkbox"][role="switch"]:checked:active[aria-invalid="true"],
|
|
160
|
+
[type="checkbox"][role="switch"]:checked:focus[aria-invalid="true"] {
|
|
161
|
+
--pico-border-color: var(--pico-form-element-invalid-border-color);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
@layer blades {
|
|
2
|
+
/**
|
|
3
|
+
* Input type color
|
|
4
|
+
*/
|
|
5
|
+
[type="color"]::-webkit-color-swatch-wrapper {
|
|
6
|
+
padding: 0;
|
|
7
|
+
}
|
|
8
|
+
[type="color"]::-moz-focus-inner {
|
|
9
|
+
padding: 0;
|
|
10
|
+
}
|
|
11
|
+
[type="color"]::-webkit-color-swatch {
|
|
12
|
+
border: 0;
|
|
13
|
+
border-radius: calc(var(--pico-border-radius) * 0.5);
|
|
14
|
+
}
|
|
15
|
+
[type="color"]::-moz-color-swatch {
|
|
16
|
+
border: 0;
|
|
17
|
+
border-radius: calc(var(--pico-border-radius) * 0.5);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
@layer blades {
|
|
2
|
+
/**
|
|
3
|
+
* Input type datetime
|
|
4
|
+
*/
|
|
5
|
+
:where(:scope),
|
|
6
|
+
:host {
|
|
7
|
+
--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");
|
|
8
|
+
--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");
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
input:not([type="checkbox"], [type="radio"], [type="range"], [type="file"]):is(
|
|
12
|
+
[type="date"],
|
|
13
|
+
[type="datetime-local"],
|
|
14
|
+
[type="month"],
|
|
15
|
+
[type="time"],
|
|
16
|
+
[type="week"]
|
|
17
|
+
) {
|
|
18
|
+
--pico-icon-position: 0.75rem;
|
|
19
|
+
--pico-icon-width: 1rem;
|
|
20
|
+
min-width: 0;
|
|
21
|
+
padding-right: calc(var(--pico-icon-width) + var(--pico-icon-position));
|
|
22
|
+
background-image: var(--pico-icon-date);
|
|
23
|
+
background-position: center right var(--pico-icon-position);
|
|
24
|
+
background-size: var(--pico-icon-width) auto;
|
|
25
|
+
background-repeat: no-repeat;
|
|
26
|
+
}
|
|
27
|
+
input:not([type="checkbox"], [type="radio"], [type="range"], [type="file"])[type="time"] {
|
|
28
|
+
background-image: var(--pico-icon-time);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
[type="date"]::-webkit-calendar-picker-indicator,
|
|
32
|
+
[type="datetime-local"]::-webkit-calendar-picker-indicator,
|
|
33
|
+
[type="month"]::-webkit-calendar-picker-indicator,
|
|
34
|
+
[type="time"]::-webkit-calendar-picker-indicator,
|
|
35
|
+
[type="week"]::-webkit-calendar-picker-indicator {
|
|
36
|
+
width: var(--pico-icon-width);
|
|
37
|
+
margin-right: calc(var(--pico-icon-width) * -1);
|
|
38
|
+
margin-left: var(--pico-icon-position);
|
|
39
|
+
opacity: 0;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
@-moz-document url-prefix() {
|
|
43
|
+
[type="date"],
|
|
44
|
+
[type="datetime-local"],
|
|
45
|
+
[type="month"],
|
|
46
|
+
[type="time"],
|
|
47
|
+
[type="week"] {
|
|
48
|
+
padding-right: var(--pico-form-element-spacing-horizontal) !important;
|
|
49
|
+
background-image: none !important;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
[dir="rtl"]
|
|
53
|
+
:is([type="date"], [type="datetime-local"], [type="month"], [type="time"], [type="week"]) {
|
|
54
|
+
text-align: end;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
@layer blades {
|
|
2
|
+
/**
|
|
3
|
+
* Input type file
|
|
4
|
+
*/
|
|
5
|
+
[type="file"] {
|
|
6
|
+
--pico-color: var(--pico-muted-color);
|
|
7
|
+
margin-left: calc(var(--pico-outline-width) * -1);
|
|
8
|
+
padding: calc(var(--pico-form-element-spacing-vertical) * 0.5) 0;
|
|
9
|
+
padding-left: var(--pico-outline-width);
|
|
10
|
+
border: 0;
|
|
11
|
+
border-radius: 0;
|
|
12
|
+
background: none;
|
|
13
|
+
}
|
|
14
|
+
[type="file"]::file-selector-button {
|
|
15
|
+
margin-right: calc(var(--pico-spacing) / 2);
|
|
16
|
+
padding: calc(var(--pico-form-element-spacing-vertical) * 0.5)
|
|
17
|
+
var(--pico-form-element-spacing-horizontal);
|
|
18
|
+
}
|
|
19
|
+
[type="file"]:is(:hover, :active, :focus)::file-selector-button {
|
|
20
|
+
--pico-background-color: var(--pico-secondary-hover-background);
|
|
21
|
+
--pico-border-color: var(--pico-secondary-hover-border);
|
|
22
|
+
}
|
|
23
|
+
[type="file"]:focus::file-selector-button {
|
|
24
|
+
--pico-box-shadow:
|
|
25
|
+
var(--pico-button-hover-box-shadow, 0 0 0 rgba(0, 0, 0, 0)),
|
|
26
|
+
0 0 0 var(--pico-outline-width) var(--pico-secondary-focus);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
}
|