elements-kit 0.10.2 → 0.11.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.
|
@@ -0,0 +1,403 @@
|
|
|
1
|
+
.x-text-input {
|
|
2
|
+
font-family: var(--default-font-family);
|
|
3
|
+
font-weight: var(--font-weight-regular);
|
|
4
|
+
text-align: start;
|
|
5
|
+
font-style: normal;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.x-text-input:where(input) {
|
|
9
|
+
width: 100%;
|
|
10
|
+
height: var(--text-input-height);
|
|
11
|
+
border-radius: var(--text-input-border-radius);
|
|
12
|
+
text-indent: var(--text-input-padding);
|
|
13
|
+
cursor: text;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.x-text-input:where(input):where([type="number"]) {
|
|
17
|
+
-moz-appearance: textfield;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.x-text-input:where(input)::-webkit-inner-spin-button {
|
|
21
|
+
appearance: none;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.x-text-input:where(input)::-webkit-search-cancel-button {
|
|
25
|
+
appearance: none;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.x-text-input:where(input)::selection {
|
|
29
|
+
background-color: var(--text-input-selection-color);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.x-text-input:where(input):where([type="date"], [type="datetime-local"], [type="time"], [type="week"], [type="month"]) {
|
|
33
|
+
text-indent: 0;
|
|
34
|
+
padding-left: var(--text-input-padding);
|
|
35
|
+
padding-right: var(--text-input-padding);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.x-text-input:where(input)::-webkit-calendar-picker-indicator {
|
|
39
|
+
box-sizing: content-box;
|
|
40
|
+
width: var(--text-input-native-icon-size);
|
|
41
|
+
height: var(--text-input-native-icon-size);
|
|
42
|
+
padding: var(--space-1);
|
|
43
|
+
margin-left: var(--space-1);
|
|
44
|
+
margin-right: calc(var(--space-1) * -1);
|
|
45
|
+
border-radius: calc(var(--text-input-border-radius) - 2px);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.x-text-input:where(input)::-webkit-calendar-picker-indicator:where(:hover) {
|
|
49
|
+
background-color: var(--base-color-a3);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.x-text-input:where(input)::-webkit-calendar-picker-indicator:where(:focus-visible) {
|
|
53
|
+
outline: 2px solid var(--text-input-focus-color);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.x-text-input:where(input):where(:focus-visible) {
|
|
57
|
+
outline: 2px solid var(--text-input-focus-color);
|
|
58
|
+
outline-offset: -1px;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
@supports selector(:has(*)) {
|
|
62
|
+
.x-text-input:where(input):where(:-webkit-autofill, [data-com-onepassword-filled]) {
|
|
63
|
+
-webkit-text-fill-color: var(--base-color-12);
|
|
64
|
+
-webkit-background-clip: text;
|
|
65
|
+
background-clip: text;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.x-text-input:where(input):where(:autofill, [data-com-onepassword-filled]) {
|
|
69
|
+
-webkit-text-fill-color: var(--base-color-12);
|
|
70
|
+
-webkit-background-clip: text;
|
|
71
|
+
background-clip: text;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.x-text-input:where(textarea) {
|
|
76
|
+
width: 100%;
|
|
77
|
+
min-height: var(--text-input-min-height);
|
|
78
|
+
padding: var(--text-input-padding);
|
|
79
|
+
border-radius: var(--text-input-border-radius);
|
|
80
|
+
resize: vertical;
|
|
81
|
+
cursor: text;
|
|
82
|
+
overflow: auto;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.x-text-input:where(textarea)::selection {
|
|
86
|
+
background-color: var(--text-input-selection-color);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.x-text-input:where(textarea)::-webkit-scrollbar {
|
|
90
|
+
width: var(--space-3);
|
|
91
|
+
height: var(--space-3);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.x-text-input:where(textarea)::-webkit-scrollbar-track {
|
|
95
|
+
background-color: #0000;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.x-text-input:where(textarea)::-webkit-scrollbar-thumb {
|
|
99
|
+
background-color: var(--base-color-a5);
|
|
100
|
+
border-radius: var(--space-3);
|
|
101
|
+
background-clip: padding-box;
|
|
102
|
+
border: 3px solid #0000;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.x-text-input:where(textarea)::-webkit-scrollbar-thumb:where(:hover) {
|
|
106
|
+
background-color: var(--base-color-a7);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.x-text-input:where(textarea):where(:focus-visible) {
|
|
110
|
+
outline: 2px solid var(--text-input-focus-color);
|
|
111
|
+
outline-offset: -1px;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
@supports selector(:has(*)) {
|
|
115
|
+
.x-text-input:where(textarea):where(:-webkit-autofill, [data-com-onepassword-filled]) {
|
|
116
|
+
-webkit-text-fill-color: var(--base-color-12);
|
|
117
|
+
-webkit-background-clip: text;
|
|
118
|
+
background-clip: text;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.x-text-input:where(textarea):where(:autofill, [data-com-onepassword-filled]) {
|
|
122
|
+
-webkit-text-fill-color: var(--base-color-12);
|
|
123
|
+
-webkit-background-clip: text;
|
|
124
|
+
background-clip: text;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.x-text-input:where(:has( > input)) {
|
|
129
|
+
box-sizing: border-box;
|
|
130
|
+
height: var(--text-input-height);
|
|
131
|
+
padding: var(--text-input-border-width);
|
|
132
|
+
border-radius: var(--text-input-border-radius);
|
|
133
|
+
cursor: text;
|
|
134
|
+
flex-direction: row;
|
|
135
|
+
align-items: stretch;
|
|
136
|
+
display: flex;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.x-text-input:where(:has( > input)):where(:has( > input:focus)) {
|
|
140
|
+
outline: 2px solid var(--text-input-focus-color);
|
|
141
|
+
outline-offset: -1px;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.x-text-input:where(:has( > input)) > :where(input) {
|
|
145
|
+
width: 100%;
|
|
146
|
+
min-width: 0;
|
|
147
|
+
height: 100%;
|
|
148
|
+
text-indent: var(--text-input-padding);
|
|
149
|
+
color: inherit;
|
|
150
|
+
font: inherit;
|
|
151
|
+
border-radius: calc(var(--text-input-border-radius) - var(--text-input-border-width));
|
|
152
|
+
background: none;
|
|
153
|
+
border: 0;
|
|
154
|
+
outline: 0;
|
|
155
|
+
flex: auto;
|
|
156
|
+
padding: 0;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.x-text-input:where(:has( > input)) > :where(input)::selection {
|
|
160
|
+
background-color: var(--text-input-selection-color);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.x-text-input:where(:has( > input)) > :where(input)::-webkit-search-cancel-button {
|
|
164
|
+
appearance: none;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.x-text-input:where(:has( > input)) > :where(input)::-webkit-inner-spin-button {
|
|
168
|
+
appearance: none;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.x-text-input:where(:has( > input)) > :where(:not(input, textarea)) ~ input {
|
|
172
|
+
text-indent: 0;
|
|
173
|
+
border-top-left-radius: 0;
|
|
174
|
+
border-bottom-left-radius: 0;
|
|
175
|
+
padding-left: 0;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.x-text-input:where(:has( > input)) > input:where(:has( ~ :not(input, textarea))) {
|
|
179
|
+
border-top-right-radius: 0;
|
|
180
|
+
border-bottom-right-radius: 0;
|
|
181
|
+
padding-right: 0;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.x-text-input:where(:has( > textarea)) {
|
|
185
|
+
box-sizing: border-box;
|
|
186
|
+
min-height: var(--text-input-min-height);
|
|
187
|
+
padding: var(--text-input-border-width);
|
|
188
|
+
border-radius: var(--text-input-border-radius);
|
|
189
|
+
cursor: text;
|
|
190
|
+
flex-direction: column;
|
|
191
|
+
align-items: stretch;
|
|
192
|
+
display: flex;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.x-text-input:where(:has( > textarea)):where(:has( > textarea:focus)) {
|
|
196
|
+
outline: 2px solid var(--text-input-focus-color);
|
|
197
|
+
outline-offset: -1px;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.x-text-input:where(:has( > textarea)) > :where(textarea) {
|
|
201
|
+
width: 100%;
|
|
202
|
+
min-height: 0;
|
|
203
|
+
padding: var(--text-input-padding);
|
|
204
|
+
color: inherit;
|
|
205
|
+
font: inherit;
|
|
206
|
+
resize: vertical;
|
|
207
|
+
border-radius: calc(var(--text-input-border-radius) - var(--text-input-border-width));
|
|
208
|
+
background: none;
|
|
209
|
+
border: 0;
|
|
210
|
+
outline: 0;
|
|
211
|
+
flex: auto;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.x-text-input:where(:has( > textarea)) > :where(textarea)::selection {
|
|
215
|
+
background-color: var(--text-input-selection-color);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.x-text-input:where(:has( > textarea)) > :where(:not(input, textarea)) ~ textarea {
|
|
219
|
+
border-top-left-radius: 0;
|
|
220
|
+
border-top-right-radius: 0;
|
|
221
|
+
padding-top: 0;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.x-text-input:where(:has( > textarea)) > textarea:where(:has( ~ :not(input, textarea))) {
|
|
225
|
+
border-bottom-right-radius: 0;
|
|
226
|
+
border-bottom-left-radius: 0;
|
|
227
|
+
padding-bottom: 0;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.x-text-input > :where(:not(input, textarea)) {
|
|
231
|
+
box-sizing: border-box;
|
|
232
|
+
cursor: text;
|
|
233
|
+
flex-shrink: 0;
|
|
234
|
+
align-items: center;
|
|
235
|
+
display: flex;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.x-text-input:where(:has( > input)) > :where(:not(input, textarea)):where(:has( ~ input)) {
|
|
239
|
+
margin-left: calc(var(--text-input-border-width) * -1);
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
.x-text-input:where(:has( > input)) > input ~ :where(:not(input, textarea)) {
|
|
243
|
+
margin-right: calc(var(--text-input-border-width) * -1);
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
.x-text-input:where(:has( > textarea)) > :where(:not(input, textarea)):where(:has( ~ textarea)) {
|
|
247
|
+
margin-top: calc(var(--text-input-border-width) * -1);
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
.x-text-input:where(:has( > textarea)) > textarea ~ :where(:not(input, textarea)) {
|
|
251
|
+
margin-bottom: calc(var(--text-input-border-width) * -1);
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
.x-text-input:where([data-size="1"]) {
|
|
255
|
+
--text-input-height: var(--space-5);
|
|
256
|
+
--text-input-min-height: var(--space-8);
|
|
257
|
+
--text-input-padding: calc(var(--space-1) * 1.5 - var(--text-input-border-width));
|
|
258
|
+
--text-input-border-radius: max(var(--radius-2), var(--radius-pill));
|
|
259
|
+
--text-input-native-icon-size: var(--space-3);
|
|
260
|
+
font-size: var(--font-size-1);
|
|
261
|
+
line-height: var(--line-height-1);
|
|
262
|
+
letter-spacing: var(--letter-spacing-1);
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
.x-text-input:where([data-size="1"]) > :where(:not(input, textarea)) {
|
|
266
|
+
gap: var(--space-2);
|
|
267
|
+
padding-left: var(--space-1);
|
|
268
|
+
padding-right: var(--space-1);
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
.x-text-input:where([data-size="2"]) {
|
|
272
|
+
--text-input-height: var(--space-6);
|
|
273
|
+
--text-input-min-height: var(--space-9);
|
|
274
|
+
--text-input-padding: calc(var(--space-2) - var(--text-input-border-width));
|
|
275
|
+
--text-input-border-radius: max(var(--radius-2), var(--radius-pill));
|
|
276
|
+
--text-input-native-icon-size: var(--space-4);
|
|
277
|
+
font-size: var(--font-size-2);
|
|
278
|
+
line-height: var(--line-height-2);
|
|
279
|
+
letter-spacing: var(--letter-spacing-2);
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
.x-text-input:where([data-size="2"]) > :where(:not(input, textarea)) {
|
|
283
|
+
gap: var(--space-2);
|
|
284
|
+
padding-left: var(--space-2);
|
|
285
|
+
padding-right: var(--space-2);
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
.x-text-input:where([data-size="3"]) {
|
|
289
|
+
--text-input-height: var(--space-7);
|
|
290
|
+
--text-input-min-height: 80px;
|
|
291
|
+
--text-input-padding: calc(var(--space-3) - var(--text-input-border-width));
|
|
292
|
+
--text-input-border-radius: max(var(--radius-3), var(--radius-pill));
|
|
293
|
+
--text-input-native-icon-size: var(--space-4);
|
|
294
|
+
font-size: var(--font-size-3);
|
|
295
|
+
line-height: var(--line-height-3);
|
|
296
|
+
letter-spacing: var(--letter-spacing-3);
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
.x-text-input:where([data-size="3"]) > :where(:not(input, textarea)) {
|
|
300
|
+
gap: var(--space-3);
|
|
301
|
+
padding-left: var(--space-3);
|
|
302
|
+
padding-right: var(--space-3);
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
.x-text-input:where(:not([data-size])) {
|
|
306
|
+
--text-input-height: var(--space-6);
|
|
307
|
+
--text-input-min-height: var(--space-9);
|
|
308
|
+
--text-input-padding: calc(var(--space-2) - var(--text-input-border-width));
|
|
309
|
+
--text-input-border-radius: max(var(--radius-2), var(--radius-pill));
|
|
310
|
+
--text-input-native-icon-size: var(--space-4);
|
|
311
|
+
font-size: var(--font-size-2);
|
|
312
|
+
line-height: var(--line-height-2);
|
|
313
|
+
letter-spacing: var(--letter-spacing-2);
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
.x-text-input:where(:not([data-size])) > :where(:not(input, textarea)) {
|
|
317
|
+
gap: var(--space-2);
|
|
318
|
+
padding-left: var(--space-2);
|
|
319
|
+
padding-right: var(--space-2);
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
.x-text-input:where(:not([data-variant="soft"])) {
|
|
323
|
+
--text-input-border-width: 1px;
|
|
324
|
+
--text-input-selection-color: var(--focus-a5);
|
|
325
|
+
--text-input-focus-color: var(--focus-8);
|
|
326
|
+
background-clip: content-box;
|
|
327
|
+
background-color: var(--color-surface);
|
|
328
|
+
box-shadow: inset 0 0 0 var(--text-input-border-width) var(--base-color-a7);
|
|
329
|
+
color: var(--base-color-12);
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
.x-text-input:where(:not([data-variant="soft"])):where(input)::placeholder, .x-text-input:where(:not([data-variant="soft"])):where(textarea)::placeholder, .x-text-input:where(:not([data-variant="soft"])):where(:has( > :is(input, textarea))) > :where(:is(input, textarea))::placeholder {
|
|
333
|
+
color: var(--base-color-a10);
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
.x-text-input:where(:not([data-variant="soft"])) > :where(:not(input, textarea)) {
|
|
337
|
+
color: var(--base-color-a11);
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
.x-text-input:where(:not([data-variant="soft"])) > :where(:not(input, textarea))[data-accent-color] {
|
|
341
|
+
color: var(--color-a11);
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
.x-text-input:where([data-variant="soft"]) {
|
|
345
|
+
--text-input-border-width: 0px;
|
|
346
|
+
--text-input-selection-color: var(--color-a5);
|
|
347
|
+
--text-input-focus-color: var(--color-8);
|
|
348
|
+
background-color: var(--color-a3);
|
|
349
|
+
color: var(--color-12);
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
.x-text-input:where([data-variant="soft"]):where(input)::placeholder, .x-text-input:where([data-variant="soft"]):where(textarea)::placeholder, .x-text-input:where([data-variant="soft"]):where(:has( > :is(input, textarea))) > :where(:is(input, textarea))::placeholder {
|
|
353
|
+
color: var(--color-12);
|
|
354
|
+
opacity: .6;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
.x-text-input:where([data-variant="soft"]) > :where(:not(input, textarea)) {
|
|
358
|
+
color: var(--color-12);
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
.x-text-input:where([data-variant="soft"]) > :where(:not(input, textarea))[data-accent-color] {
|
|
362
|
+
color: var(--color-a11);
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
.x-text-input:where(:is(input, textarea)):where(:disabled, :read-only) {
|
|
366
|
+
cursor: text;
|
|
367
|
+
color: var(--base-color-a11);
|
|
368
|
+
-webkit-text-fill-color: var(--base-color-a11);
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
.x-text-input:where(:is(input, textarea)):where(:disabled, :read-only)::placeholder {
|
|
372
|
+
opacity: .5;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
.x-text-input:where(:is(input, textarea)):where(:disabled, :read-only):where(:placeholder-shown) {
|
|
376
|
+
cursor: var(--cursor-disabled);
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
.x-text-input:where(:has( > :is(input, textarea):is(:disabled, :read-only))) {
|
|
380
|
+
background-color: var(--base-color-a2);
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
.x-text-input:where(:has( > :is(input, textarea):is(:disabled, :read-only))) > :where(:is(input, textarea)) {
|
|
384
|
+
cursor: text;
|
|
385
|
+
color: var(--base-color-a11);
|
|
386
|
+
-webkit-text-fill-color: var(--base-color-a11);
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
.x-text-input:where(:has( > :is(input, textarea):is(:disabled, :read-only))) > :where(:is(input, textarea))::placeholder {
|
|
390
|
+
opacity: .5;
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
.x-text-input:where(:has( > :is(input, textarea):is(:disabled, :read-only))):where(:has( > :is(input, textarea):placeholder-shown)) {
|
|
394
|
+
cursor: var(--cursor-disabled);
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
.x-text-input:where(:has( > :is(input, textarea):is(:disabled, :read-only))):where(:has( > :is(input, textarea):placeholder-shown)) > :where(:not(input, textarea)) {
|
|
398
|
+
cursor: var(--cursor-disabled);
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
.x-text-input:where(:not([data-variant="soft"])):where(:has( > :is(input, textarea):is(:disabled, :read-only))) {
|
|
402
|
+
box-shadow: inset 0 0 0 var(--text-input-border-width) var(--base-color-a6);
|
|
403
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "elements-kit",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.11.0",
|
|
5
5
|
"description": "A lightweight reactive UI library that transforms native HTMLElements into reactive components with signals. Ideal for framework-agnostic applications and web components.",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"webcomponents",
|