nexus-shared 3.0.0 → 3.1.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/CHANGELOG.md +446 -262
- package/LICENSE +21 -21
- package/README.md +1084 -1000
- package/dist/Client.Index.d.ts +3 -0
- package/dist/Client.Index.js +3 -0
- package/dist/Components/Chats/ChatParts.d.ts +2 -2
- package/dist/Components/Chats/ChatParts.js +3 -7
- package/dist/Components/Chats/ChatThread.js +3 -3
- package/dist/Components/Documents/Button.d.ts +6 -1
- package/dist/Components/Documents/Button.js +2 -2
- package/dist/Components/Documents/Menu.js +21 -9
- package/dist/Components/Documents/SplitButton.d.ts +3 -1
- package/dist/Components/Documents/SplitButton.js +7 -5
- package/dist/Components/Documents/TabButtons.d.ts +5 -2
- package/dist/Components/Documents/TabButtons.js +2 -2
- package/dist/Components/Forms/ApiForm.d.ts +1 -1
- package/dist/Components/Forms/ApiForm.js +1 -1
- package/dist/Components/Forms/Crud.js +177 -58
- package/dist/Components/Forms/CrudParts.d.ts +5 -1
- package/dist/Components/Forms/CrudParts.js +37 -5
- package/dist/Components/Forms/ExcelImport.d.ts +23 -7
- package/dist/Components/Forms/ExcelImport.js +189 -60
- package/dist/Components/Forms/Form.js +5 -13
- package/dist/Components/Forms/SubmitForm.d.ts +11 -2
- package/dist/Components/Forms/SubmitForm.js +23 -12
- package/dist/Components/Inputs/DropdownParts.d.ts +1 -1
- package/dist/Components/Inputs/DropdownParts.js +4 -6
- package/dist/Components/Inputs/NumberBox.js +24 -2
- package/dist/Components/Inputs/RowsInput.js +2 -2
- package/dist/Components/Inputs/Slider.js +4 -1
- package/dist/Components/Inputs/TabularForm.js +42 -10
- package/dist/Components/Inputs/TimePanel.js +4 -3
- package/dist/Components/Layouts/Popup.js +1 -4
- package/dist/Components/Layouts/ThemePicker.d.ts +20 -3
- package/dist/Components/Layouts/ThemePicker.js +77 -6
- package/dist/Components/Layouts/ThemeScript.d.ts +4 -2
- package/dist/Components/Layouts/ThemeScript.js +4 -2
- package/dist/Components/Layouts/ThemeSwitcher.d.ts +6 -3
- package/dist/Components/Layouts/ThemeSwitcher.js +9 -8
- package/dist/Components/Viewers/Avatar.d.ts +21 -0
- package/dist/Components/Viewers/Avatar.js +21 -0
- package/dist/Components/Viewers/DataTable.js +192 -44
- package/dist/Components/Viewers/DataTableColumns.d.ts +7 -3
- package/dist/Components/Viewers/DataTableColumns.js +25 -68
- package/dist/Components/Viewers/DataTableFilters.d.ts +21 -0
- package/dist/Components/Viewers/DataTableFilters.js +68 -0
- package/dist/Components/Viewers/DataTableParts.d.ts +2 -2
- package/dist/Components/Viewers/DataTableParts.js +3 -3
- package/dist/Helpers/AnimationHelpers.d.ts +11 -0
- package/dist/Helpers/AnimationHelpers.js +20 -2
- package/dist/Helpers/CrudBackend.d.ts +7 -4
- package/dist/Helpers/CrudBackend.js +4 -2
- package/dist/Helpers/ExcelBackend.d.ts +3 -3
- package/dist/Helpers/ExcelBackend.js +8 -2
- package/dist/Helpers/ExcelHelpers.d.ts +36 -8
- package/dist/Helpers/ExcelHelpers.js +55 -13
- package/dist/Helpers/FormStore.d.ts +9 -5
- package/dist/Helpers/FormStore.js +25 -5
- package/dist/Helpers/MessageBuilder.js +1 -0
- package/dist/Helpers/NumberHelpers.d.ts +7 -1
- package/dist/Helpers/NumberHelpers.js +41 -3
- package/dist/Helpers/PopoverHelpers.d.ts +17 -5
- package/dist/Helpers/PopoverHelpers.js +52 -17
- package/dist/Helpers/PopoverHooks.d.ts +24 -0
- package/dist/Helpers/PopoverHooks.js +62 -0
- package/dist/Helpers/RowsStore.d.ts +7 -2
- package/dist/Helpers/RowsStore.js +15 -3
- package/dist/Helpers/TableExport.js +12 -12
- package/dist/Helpers/TableFilters.d.ts +25 -0
- package/dist/Helpers/TableFilters.js +162 -0
- package/dist/Helpers/TableHelpers.d.ts +6 -3
- package/dist/Helpers/TableHelpers.js +8 -4
- package/dist/Helpers/TableStore.d.ts +11 -3
- package/dist/Helpers/TableStore.js +16 -5
- package/dist/Helpers/ThemeHelpers.d.ts +21 -4
- package/dist/Helpers/ThemeHelpers.js +46 -9
- package/dist/Helpers/UserPreferences.d.ts +14 -0
- package/dist/Helpers/UserPreferences.js +99 -0
- package/dist/Interfaces/CrudInterfaces.d.ts +20 -1
- package/dist/Interfaces/ExcelInterfaces.d.ts +12 -0
- package/dist/Interfaces/FormInterfaces.d.ts +33 -5
- package/dist/Interfaces/PreferenceInterfaces.d.ts +43 -0
- package/dist/Interfaces/PreferenceInterfaces.js +28 -0
- package/dist/Interfaces/TableInterfaces.d.ts +59 -12
- package/dist/Interfaces/ThemeInterfaces.d.ts +25 -0
- package/dist/Interfaces/ThemeInterfaces.js +15 -0
- package/dist/Services/ExcelApi.d.ts +3 -1
- package/dist/Services/ExcelApi.js +1 -1
- package/dist/Services/ThemeService.d.ts +18 -2
- package/dist/Services/ThemeService.js +80 -16
- package/dist/Shared.Index.d.ts +2 -0
- package/dist/Shared.Index.js +2 -0
- package/package.json +85 -85
- package/src/Styles/Nexus.Avatar.css +79 -0
- package/src/Styles/Nexus.Base.css +117 -70
- package/src/Styles/Nexus.Button.css +180 -153
- package/src/Styles/Nexus.Calendar.css +273 -275
- package/src/Styles/Nexus.Chat.css +1443 -1489
- package/src/Styles/Nexus.Choice.css +343 -345
- package/src/Styles/Nexus.Crud.css +168 -161
- package/src/Styles/Nexus.DateTime.css +81 -81
- package/src/Styles/Nexus.Dropdown.css +725 -774
- package/src/Styles/Nexus.Editor.css +295 -297
- package/src/Styles/Nexus.Excel.css +389 -370
- package/src/Styles/Nexus.Form.css +279 -321
- package/src/Styles/Nexus.Index.css +37 -36
- package/src/Styles/Nexus.Input.css +602 -637
- package/src/Styles/Nexus.Markdown.css +237 -265
- package/src/Styles/Nexus.Menu.css +237 -259
- package/src/Styles/Nexus.Popup.css +724 -731
- package/src/Styles/Nexus.RichText.css +2 -32
- package/src/Styles/Nexus.Rows.css +637 -596
- package/src/Styles/Nexus.Slider.css +276 -278
- package/src/Styles/Nexus.Tab.Buttons.css +432 -419
- package/src/Styles/Nexus.Table.css +1386 -1296
- package/src/Styles/Nexus.Theme.Picker.css +286 -232
- package/src/Styles/Nexus.Themes.css +194 -194
- package/src/Styles/Nexus.Time.css +144 -147
- package/src/Styles/Nexus.Toast.css +263 -265
- package/src/Styles/Nexus.Tokens.css +89 -72
- package/src/Styles/Nexus.Tree.css +431 -435
|
@@ -1,637 +1,602 @@
|
|
|
1
|
-
@layer nexus.components {
|
|
2
|
-
/*
|
|
3
|
-
* Field: the frame of every input. Label, a box holding icons, the control, and buttons, then a hint or error line.
|
|
4
|
-
* Sizes, designs, and states only change the --nx-field-* variables below; the rules after them read those.
|
|
5
|
-
*/
|
|
6
|
-
.nx-field {
|
|
7
|
-
--nx-field-base: var(--nx-control-md);
|
|
8
|
-
--nx-field-extra: 0px;
|
|
9
|
-
--nx-field-height: calc(var(--nx-field-base) + var(--nx-field-extra));
|
|
10
|
-
--nx-field-pad-x: 10px;
|
|
11
|
-
--nx-field-pad-y: 7px;
|
|
12
|
-
--nx-field-font: var(--nx-text-md);
|
|
13
|
-
--nx-field-label-font: var(--nx-text-sm);
|
|
14
|
-
--nx-field-icon: 16px;
|
|
15
|
-
--nx-field-bg: var(--nx-surface);
|
|
16
|
-
--nx-field-border: var(--nx-border-strong);
|
|
17
|
-
--nx-field-border-hover: color-mix(in oklab, var(--nx-border-strong), var(--nx-text) 22%);
|
|
18
|
-
--nx-field-accent: var(--nx-primary);
|
|
19
|
-
--nx-field-ring: var(--nx-focus-ring);
|
|
20
|
-
--nx-field-label-color: var(--nx-text-muted);
|
|
21
|
-
--nx-field-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
--nx-field-
|
|
31
|
-
--nx-field-pad-
|
|
32
|
-
--nx-field-
|
|
33
|
-
--nx-field-font: var(--nx-text-
|
|
34
|
-
--nx-field-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
--nx-field-
|
|
40
|
-
--nx-field-pad-
|
|
41
|
-
--nx-field-
|
|
42
|
-
--nx-field-font: var(--nx-text-
|
|
43
|
-
--nx-field-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
--nx-field-border: var(--nx-danger);
|
|
54
|
-
--nx-field-
|
|
55
|
-
--nx-field-
|
|
56
|
-
--nx-field-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
--nx-field-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
font-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
border:
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
width:
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
border:
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
.nx-field__control::-webkit-search-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
.nx-field__control::-ms-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
.nx-
|
|
178
|
-
.nx-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
padding-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
.nx-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
align-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
padding-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
padding-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
border:
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
outline: 2px
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
*
|
|
311
|
-
*
|
|
312
|
-
*
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
border:
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
font-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
font-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
font-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
--nx-field-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
*
|
|
500
|
-
*
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
font-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
*
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
.nx-field--multiline .nx-field__control
|
|
562
|
-
|
|
563
|
-
}
|
|
564
|
-
|
|
565
|
-
.nx-field--multiline .nx-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
}
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
}
|
|
602
|
-
|
|
603
|
-
.nx-field--multiline.nx-field--inbox:is([data-raised], :focus-within, :has(.nx-field__control:not(:placeholder-shown))) .nx-field__icon {
|
|
604
|
-
padding-top: calc(var(--nx-field-pad-y) + var(--nx-field-inbox-pad) - 4px + (1.4em - var(--nx-field-icon)) / 2);
|
|
605
|
-
}
|
|
606
|
-
|
|
607
|
-
.nx-field--multiline.nx-field--inbox:is([data-raised], :focus-within, :has(.nx-field__control:not(:placeholder-shown))) .nx-field__actions {
|
|
608
|
-
padding-top: calc(var(--nx-field-pad-y) + var(--nx-field-inbox-pad) - 4px + 0.7em - (var(--nx-field-base) - 10px) / 2);
|
|
609
|
-
}
|
|
610
|
-
|
|
611
|
-
/* Grows with its text between --nx-field-rows and --nx-field-max-rows lines. */
|
|
612
|
-
.nx-field__control--auto {
|
|
613
|
-
field-sizing: content;
|
|
614
|
-
min-height: calc(var(--nx-field-rows, 3) * 1lh + 2 * var(--nx-field-pad-y));
|
|
615
|
-
max-height: calc(var(--nx-field-max-rows, 12) * 1lh + 2 * var(--nx-field-pad-y));
|
|
616
|
-
resize: none;
|
|
617
|
-
}
|
|
618
|
-
|
|
619
|
-
@supports not (field-sizing: content) {
|
|
620
|
-
.nx-field__control--auto {
|
|
621
|
-
max-height: none;
|
|
622
|
-
resize: vertical;
|
|
623
|
-
}
|
|
624
|
-
}
|
|
625
|
-
|
|
626
|
-
@media (prefers-reduced-motion: reduce) {
|
|
627
|
-
.nx-field__label,
|
|
628
|
-
.nx-field--inbox :is(.nx-field__icon, .nx-field__affix, .nx-field__actions) {
|
|
629
|
-
transition: none;
|
|
630
|
-
}
|
|
631
|
-
|
|
632
|
-
.nx-field__lock[data-nudge],
|
|
633
|
-
.nx-field-notice:popover-open {
|
|
634
|
-
animation: none;
|
|
635
|
-
}
|
|
636
|
-
}
|
|
637
|
-
}
|
|
1
|
+
@layer nexus.components {
|
|
2
|
+
/*
|
|
3
|
+
* Field: the frame of every input. Label, a box holding icons, the control, and buttons, then a hint or error line.
|
|
4
|
+
* Sizes, designs, and states only change the --nx-field-* variables below; the rules after them read those.
|
|
5
|
+
*/
|
|
6
|
+
.nx-field {
|
|
7
|
+
--nx-field-base: var(--nx-control-md);
|
|
8
|
+
--nx-field-extra: 0px;
|
|
9
|
+
--nx-field-height: calc(var(--nx-field-base) + var(--nx-field-extra));
|
|
10
|
+
--nx-field-pad-x: 10px;
|
|
11
|
+
--nx-field-pad-y: 7px;
|
|
12
|
+
--nx-field-font: var(--nx-text-md);
|
|
13
|
+
--nx-field-label-font: var(--nx-text-sm);
|
|
14
|
+
--nx-field-icon: 16px;
|
|
15
|
+
--nx-field-bg: var(--nx-surface);
|
|
16
|
+
--nx-field-border: var(--nx-border-strong);
|
|
17
|
+
--nx-field-border-hover: color-mix(in oklab, var(--nx-border-strong), var(--nx-text) 22%);
|
|
18
|
+
--nx-field-accent: var(--nx-primary);
|
|
19
|
+
--nx-field-ring: var(--nx-focus-ring);
|
|
20
|
+
--nx-field-label-color: var(--nx-text-muted);
|
|
21
|
+
--nx-field-grip: color-mix(in oklab, var(--nx-text-subtle) 75%, transparent);
|
|
22
|
+
|
|
23
|
+
display: flex;
|
|
24
|
+
flex-direction: column;
|
|
25
|
+
min-width: 0;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.nx-field--sm {
|
|
29
|
+
--nx-field-base: var(--nx-control-sm);
|
|
30
|
+
--nx-field-pad-x: var(--nx-space-2);
|
|
31
|
+
--nx-field-pad-y: 4px;
|
|
32
|
+
--nx-field-font: var(--nx-text-sm);
|
|
33
|
+
--nx-field-label-font: var(--nx-text-xs);
|
|
34
|
+
--nx-field-icon: 14px;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.nx-field--lg {
|
|
38
|
+
--nx-field-base: var(--nx-control-lg);
|
|
39
|
+
--nx-field-pad-x: var(--nx-space-3);
|
|
40
|
+
--nx-field-pad-y: 9px;
|
|
41
|
+
--nx-field-font: var(--nx-text-lg);
|
|
42
|
+
--nx-field-label-font: var(--nx-text-md);
|
|
43
|
+
--nx-field-icon: 18px;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/* States */
|
|
47
|
+
.nx-field:focus-within {
|
|
48
|
+
--nx-field-label-color: var(--nx-field-accent);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.nx-field[data-invalid] {
|
|
52
|
+
--nx-field-border: var(--nx-danger);
|
|
53
|
+
--nx-field-border-hover: var(--nx-danger);
|
|
54
|
+
--nx-field-accent: var(--nx-danger);
|
|
55
|
+
--nx-field-ring: 0 0 0 3px color-mix(in oklab, var(--nx-danger) 30%, transparent);
|
|
56
|
+
--nx-field-label-color: var(--nx-danger);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/* Read-only and disabled boxes sit lower than the panel: lighter gray in light mode, the page color in dark mode. */
|
|
60
|
+
.nx-field:is([data-readonly], [data-disabled]) {
|
|
61
|
+
--nx-field-bg: light-dark(var(--nx-surface-2), var(--nx-bg));
|
|
62
|
+
--nx-field-border-hover: var(--nx-field-border);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.nx-field:is([data-readonly], [data-disabled]) .nx-field__box {
|
|
66
|
+
box-shadow: none;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.nx-field[data-disabled] {
|
|
70
|
+
opacity: 0.6;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.nx-field[data-disabled] :is(.nx-field__label, .nx-field__box, .nx-field__control) {
|
|
74
|
+
cursor: not-allowed;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/* Label above the box */
|
|
78
|
+
.nx-field__label {
|
|
79
|
+
color: var(--nx-text);
|
|
80
|
+
font-size: var(--nx-field-label-font);
|
|
81
|
+
font-weight: 500;
|
|
82
|
+
line-height: 1.3;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.nx-field--standard > .nx-field__label {
|
|
86
|
+
align-self: flex-start;
|
|
87
|
+
margin-bottom: 6px;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.nx-field__required {
|
|
91
|
+
margin-left: 3px;
|
|
92
|
+
color: var(--nx-danger);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/* Box */
|
|
96
|
+
.nx-field__box {
|
|
97
|
+
position: relative;
|
|
98
|
+
display: flex;
|
|
99
|
+
align-items: center;
|
|
100
|
+
min-height: var(--nx-field-height);
|
|
101
|
+
border: 1px solid var(--nx-field-border);
|
|
102
|
+
border-radius: var(--nx-radius);
|
|
103
|
+
background: var(--nx-field-bg);
|
|
104
|
+
box-shadow: var(--nx-shadow-sm);
|
|
105
|
+
font-size: var(--nx-field-font);
|
|
106
|
+
transition:
|
|
107
|
+
border-color var(--nx-duration),
|
|
108
|
+
box-shadow var(--nx-duration);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.nx-field__box:hover {
|
|
112
|
+
border-color: var(--nx-field-border-hover);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.nx-field__box:focus-within {
|
|
116
|
+
border-color: var(--nx-field-accent);
|
|
117
|
+
box-shadow: var(--nx-field-ring);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.nx-field__control {
|
|
121
|
+
flex: 1 1 auto;
|
|
122
|
+
align-self: stretch;
|
|
123
|
+
width: 100%;
|
|
124
|
+
min-width: 0;
|
|
125
|
+
margin: 0;
|
|
126
|
+
padding: 0 var(--nx-field-pad-x);
|
|
127
|
+
border: 0;
|
|
128
|
+
border-radius: inherit;
|
|
129
|
+
outline: none;
|
|
130
|
+
background: transparent;
|
|
131
|
+
color: var(--nx-text);
|
|
132
|
+
font-size: var(--nx-field-font);
|
|
133
|
+
line-height: 1.4;
|
|
134
|
+
text-overflow: ellipsis;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/* Numbers line up digit under digit. */
|
|
138
|
+
.nx-field__control--number {
|
|
139
|
+
font-variant-numeric: tabular-nums;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.nx-field__control::placeholder {
|
|
143
|
+
color: var(--nx-text-subtle);
|
|
144
|
+
opacity: 1;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/* Browser extras that the field replaces with its own buttons. */
|
|
148
|
+
.nx-field__control::-webkit-search-cancel-button,
|
|
149
|
+
.nx-field__control::-webkit-search-decoration {
|
|
150
|
+
appearance: none;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.nx-field__control::-ms-reveal,
|
|
154
|
+
.nx-field__control::-ms-clear {
|
|
155
|
+
display: none;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/* Autofilled values keep the field's own colors. */
|
|
159
|
+
.nx-field__control:is(:autofill, :-webkit-autofill) {
|
|
160
|
+
-webkit-text-fill-color: var(--nx-text);
|
|
161
|
+
caret-color: var(--nx-text);
|
|
162
|
+
box-shadow: 0 0 0 100px var(--nx-field-bg) inset;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/* Icons */
|
|
166
|
+
.nx-field__icon {
|
|
167
|
+
display: flex;
|
|
168
|
+
align-items: center;
|
|
169
|
+
flex-shrink: 0;
|
|
170
|
+
padding-left: var(--nx-field-pad-x);
|
|
171
|
+
color: var(--nx-text-subtle);
|
|
172
|
+
pointer-events: none;
|
|
173
|
+
transition: color var(--nx-duration);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.nx-field__icon .nx-icon,
|
|
177
|
+
.nx-field__action .nx-icon,
|
|
178
|
+
.nx-field__lock .nx-icon {
|
|
179
|
+
width: var(--nx-field-icon);
|
|
180
|
+
height: var(--nx-field-icon);
|
|
181
|
+
vertical-align: 0;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.nx-field__icon--end {
|
|
185
|
+
padding-right: var(--nx-field-pad-x);
|
|
186
|
+
padding-left: 0;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.nx-field__box:focus-within .nx-field__icon,
|
|
190
|
+
.nx-field[data-invalid] .nx-field__icon {
|
|
191
|
+
color: var(--nx-field-accent);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.nx-field__icon:not(.nx-field__icon--end) + .nx-field__control {
|
|
195
|
+
padding-left: var(--nx-space-2);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.nx-field__control:has(~ .nx-field__actions, ~ .nx-field__icon--end) {
|
|
199
|
+
padding-right: var(--nx-space-1);
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
/* Text before and after the value: a currency, a unit, a domain. Muted, so the value reads first. */
|
|
203
|
+
.nx-field__affix {
|
|
204
|
+
display: flex;
|
|
205
|
+
align-items: center;
|
|
206
|
+
align-self: stretch;
|
|
207
|
+
flex-shrink: 0;
|
|
208
|
+
padding-left: var(--nx-field-pad-x);
|
|
209
|
+
color: var(--nx-text-muted);
|
|
210
|
+
line-height: 1.4;
|
|
211
|
+
white-space: nowrap;
|
|
212
|
+
user-select: none;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.nx-field__affix--end {
|
|
216
|
+
padding-right: var(--nx-field-pad-x);
|
|
217
|
+
padding-left: 0;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.nx-field__icon:not(.nx-field__icon--end) + .nx-field__affix {
|
|
221
|
+
padding-left: var(--nx-space-2);
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.nx-field__affix:not(.nx-field__affix--end) + .nx-field__control {
|
|
225
|
+
padding-left: 6px;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.nx-field__control:has(~ .nx-field__affix--end) {
|
|
229
|
+
padding-right: 6px;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.nx-field__affix--end:has(~ .nx-field__actions, ~ .nx-field__icon--end) {
|
|
233
|
+
padding-right: var(--nx-space-1);
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
/* Buttons inside the box: clear, show password, − and + */
|
|
237
|
+
.nx-field__actions {
|
|
238
|
+
display: flex;
|
|
239
|
+
align-items: center;
|
|
240
|
+
flex-shrink: 0;
|
|
241
|
+
gap: 2px;
|
|
242
|
+
padding-right: 4px;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
.nx-field__actions--start {
|
|
246
|
+
padding-right: 0;
|
|
247
|
+
padding-left: 4px;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
.nx-field__actions + .nx-field__icon--end {
|
|
251
|
+
padding-left: var(--nx-space-1);
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
.nx-field__action {
|
|
255
|
+
display: grid;
|
|
256
|
+
place-items: center;
|
|
257
|
+
width: calc(var(--nx-field-base) - 10px);
|
|
258
|
+
height: calc(var(--nx-field-base) - 10px);
|
|
259
|
+
padding: 0;
|
|
260
|
+
border: 0;
|
|
261
|
+
border-radius: var(--nx-radius-sm);
|
|
262
|
+
background: none;
|
|
263
|
+
color: var(--nx-text-subtle);
|
|
264
|
+
cursor: pointer;
|
|
265
|
+
transition:
|
|
266
|
+
background-color var(--nx-duration),
|
|
267
|
+
color var(--nx-duration);
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
.nx-field__action:hover:not(:disabled, [aria-disabled="true"]) {
|
|
271
|
+
background: var(--nx-surface-hover);
|
|
272
|
+
color: var(--nx-text);
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
.nx-field__action:focus-visible {
|
|
276
|
+
outline: 2px solid var(--nx-primary);
|
|
277
|
+
outline-offset: -2px;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
.nx-field__action[aria-pressed="true"] {
|
|
281
|
+
color: var(--nx-field-accent);
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
.nx-field__action:disabled {
|
|
285
|
+
cursor: not-allowed;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
/* − and +: stronger than the clear button, since they are the main way to change the value by pointer. */
|
|
289
|
+
.nx-field__action--step {
|
|
290
|
+
color: var(--nx-text-muted);
|
|
291
|
+
touch-action: manipulation;
|
|
292
|
+
user-select: none;
|
|
293
|
+
-webkit-touch-callout: none;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
/* At a limit: dimmed, and the press does nothing. Not `disabled`, which would lose the pointer while it is held. */
|
|
297
|
+
.nx-field__action[aria-disabled="true"] {
|
|
298
|
+
opacity: 0.4;
|
|
299
|
+
cursor: default;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
/* Split stepper: − before and + after a centered value, as in a guest or quantity picker. */
|
|
303
|
+
.nx-field--split .nx-field__control {
|
|
304
|
+
padding-inline: var(--nx-space-1);
|
|
305
|
+
text-align: center;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
/*
|
|
309
|
+
* Read-only lock: at the end of the box, where a button that no longer works would be (a date picker's calendar, a
|
|
310
|
+
* number box's − and +), so a click that does nothing does not look like a bug. Muted rather than subtle, since it
|
|
311
|
+
* is the only sign of the state: at least 3:1 on the box in every theme. On an attempt to change the field it turns
|
|
312
|
+
* to the text color and nudges.
|
|
313
|
+
*/
|
|
314
|
+
.nx-field__lock {
|
|
315
|
+
display: grid;
|
|
316
|
+
place-items: center;
|
|
317
|
+
width: calc(var(--nx-field-base) - 10px);
|
|
318
|
+
height: calc(var(--nx-field-base) - 10px);
|
|
319
|
+
color: var(--nx-text-muted);
|
|
320
|
+
cursor: default;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
/* After the label of a field without a box: a checkbox, a switch, a choice group, a slider. Sized to the label text. */
|
|
324
|
+
.nx-field__lock--label {
|
|
325
|
+
display: inline-block;
|
|
326
|
+
width: auto;
|
|
327
|
+
height: auto;
|
|
328
|
+
margin-left: 0.35em;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
.nx-field__lock--label .nx-icon {
|
|
332
|
+
width: 1em;
|
|
333
|
+
height: 1em;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
.nx-field__lock[data-nudge] {
|
|
337
|
+
color: var(--nx-text);
|
|
338
|
+
animation: nx-field-nudge 320ms ease-in-out;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
@keyframes nx-field-nudge {
|
|
342
|
+
20%,
|
|
343
|
+
60% {
|
|
344
|
+
transform: translateX(-2px);
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
40%,
|
|
348
|
+
80% {
|
|
349
|
+
transform: translateX(2px);
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
/* The note under a read-only box, in the top layer and placed by the component. Inverted, like a tooltip. */
|
|
354
|
+
.nx-field-notice {
|
|
355
|
+
position: fixed;
|
|
356
|
+
inset: auto;
|
|
357
|
+
display: flex;
|
|
358
|
+
align-items: center;
|
|
359
|
+
gap: 6px;
|
|
360
|
+
max-width: min(320px, calc(100vw - 16px));
|
|
361
|
+
margin: 0;
|
|
362
|
+
padding: 6px 10px 6px 8px;
|
|
363
|
+
overflow: visible;
|
|
364
|
+
border: 0;
|
|
365
|
+
border-radius: var(--nx-radius);
|
|
366
|
+
background: var(--nx-text);
|
|
367
|
+
color: var(--nx-surface);
|
|
368
|
+
box-shadow: var(--nx-shadow);
|
|
369
|
+
font-size: var(--nx-text-xs);
|
|
370
|
+
font-weight: 500;
|
|
371
|
+
line-height: 1.35;
|
|
372
|
+
pointer-events: none;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
.nx-field-notice:popover-open {
|
|
376
|
+
animation: nx-field-notice-in 120ms ease-out;
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
@keyframes nx-field-notice-in {
|
|
380
|
+
from {
|
|
381
|
+
opacity: 0;
|
|
382
|
+
transform: translateY(-4px);
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
.nx-field-notice .nx-icon {
|
|
387
|
+
flex-shrink: 0;
|
|
388
|
+
width: 14px;
|
|
389
|
+
height: 14px;
|
|
390
|
+
vertical-align: 0;
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
/* Nothing to clear in an empty field. The control always has a placeholder, so :placeholder-shown means empty. */
|
|
394
|
+
.nx-field__box:has(.nx-field__control:placeholder-shown) .nx-field__action--clear {
|
|
395
|
+
display: none;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
/* Hint, error, and count under the box */
|
|
399
|
+
.nx-field__footer {
|
|
400
|
+
display: flex;
|
|
401
|
+
align-items: flex-start;
|
|
402
|
+
gap: var(--nx-space-3);
|
|
403
|
+
margin-top: 5px;
|
|
404
|
+
font-size: var(--nx-text-xs);
|
|
405
|
+
line-height: 1.35;
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
.nx-field__message {
|
|
409
|
+
display: flex;
|
|
410
|
+
gap: 5px;
|
|
411
|
+
min-width: 0;
|
|
412
|
+
margin: 0;
|
|
413
|
+
color: var(--nx-text-muted);
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
.nx-field__message .nx-icon {
|
|
417
|
+
flex-shrink: 0;
|
|
418
|
+
width: 1.35em;
|
|
419
|
+
height: 1.35em;
|
|
420
|
+
vertical-align: 0;
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
.nx-field__message--error {
|
|
424
|
+
color: var(--nx-danger);
|
|
425
|
+
font-weight: 500;
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
.nx-field__aside {
|
|
429
|
+
margin-left: auto;
|
|
430
|
+
color: var(--nx-text-muted);
|
|
431
|
+
font-variant-numeric: tabular-nums;
|
|
432
|
+
white-space: nowrap;
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
/* Outlined and inbox: the label rests inside the box like a placeholder and rises on focus or once there is a value. */
|
|
436
|
+
:is(.nx-field--outlined, .nx-field--inbox) .nx-field__label {
|
|
437
|
+
position: absolute;
|
|
438
|
+
z-index: 1;
|
|
439
|
+
top: 50%;
|
|
440
|
+
left: var(--nx-field-pad-x);
|
|
441
|
+
max-width: calc(100% - 2 * var(--nx-field-pad-x));
|
|
442
|
+
overflow: hidden;
|
|
443
|
+
color: var(--nx-field-label-color);
|
|
444
|
+
font-size: var(--nx-field-font);
|
|
445
|
+
font-weight: 400;
|
|
446
|
+
line-height: 1.2;
|
|
447
|
+
text-overflow: ellipsis;
|
|
448
|
+
white-space: nowrap;
|
|
449
|
+
transform: translateY(-50%);
|
|
450
|
+
pointer-events: none;
|
|
451
|
+
transition:
|
|
452
|
+
top var(--nx-duration),
|
|
453
|
+
left var(--nx-duration),
|
|
454
|
+
font-size var(--nx-duration),
|
|
455
|
+
color var(--nx-duration),
|
|
456
|
+
transform var(--nx-duration);
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
/* After a start icon, the resting label lines up with the text. */
|
|
460
|
+
.nx-field__icon:not(.nx-field__icon--end) ~ .nx-field__label {
|
|
461
|
+
left: calc(var(--nx-field-pad-x) + var(--nx-field-icon) + var(--nx-space-2));
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
/* On a multi-line box, the resting label sits on the first line. */
|
|
465
|
+
.nx-field--multiline .nx-field__label {
|
|
466
|
+
top: calc(var(--nx-field-pad-y) + var(--nx-field-font) * 0.7);
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
/* Outlined: the raised label sits on the top border. Its backing covers only the lower half, so it blends with any panel. */
|
|
470
|
+
.nx-field--outlined:is([data-raised], :focus-within, :has(.nx-field__control:not(:placeholder-shown))) .nx-field__label {
|
|
471
|
+
top: 0;
|
|
472
|
+
left: calc(var(--nx-field-pad-x) - 4px);
|
|
473
|
+
padding: 0 4px;
|
|
474
|
+
background: linear-gradient(to bottom, transparent calc(50% - 1px), var(--nx-field-bg) calc(50% - 1px));
|
|
475
|
+
font-size: var(--nx-text-xs);
|
|
476
|
+
font-weight: 500;
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
/* Inbox: a taller box with the raised label inside its top edge. */
|
|
480
|
+
.nx-field--inbox {
|
|
481
|
+
--nx-field-extra: 12px;
|
|
482
|
+
--nx-field-inbox-pad: 17px;
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
.nx-field--inbox.nx-field--sm {
|
|
486
|
+
--nx-field-inbox-pad: 15px;
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
.nx-field--inbox.nx-field--lg {
|
|
490
|
+
--nx-field-inbox-pad: 19px;
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
.nx-field--inbox .nx-field__control {
|
|
494
|
+
padding-top: var(--nx-field-inbox-pad);
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
/*
|
|
498
|
+
* Beside the value: while the label rests in the middle, icons, text, and buttons line up with it. Once the label
|
|
499
|
+
* rises, the value sits low in the box, and they move down to its line. Buttons move halfway, so their hover
|
|
500
|
+
* background keeps clear of the border.
|
|
501
|
+
*/
|
|
502
|
+
.nx-field--inbox :is(.nx-field__icon, .nx-field__affix, .nx-field__actions) {
|
|
503
|
+
align-self: stretch;
|
|
504
|
+
transition: padding-top var(--nx-duration);
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
.nx-field--inbox:is([data-raised], :focus-within, :has(.nx-field__control:not(:placeholder-shown))) :is(.nx-field__icon, .nx-field__affix) {
|
|
508
|
+
padding-top: var(--nx-field-inbox-pad);
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
.nx-field--inbox:is([data-raised], :focus-within, :has(.nx-field__control:not(:placeholder-shown))) .nx-field__actions {
|
|
512
|
+
padding-top: calc(var(--nx-field-inbox-pad) / 2);
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
.nx-field--inbox:is([data-raised], :focus-within, :has(.nx-field__control:not(:placeholder-shown))) .nx-field__label {
|
|
516
|
+
top: 5px;
|
|
517
|
+
font-size: var(--nx-text-xs);
|
|
518
|
+
font-weight: 500;
|
|
519
|
+
transform: none;
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
/*
|
|
523
|
+
* Split stepper: the label sits centered over the centered value, between − and +.
|
|
524
|
+
* It must come after the raised-label rule above: both have the same specificity, so the later one wins.
|
|
525
|
+
*/
|
|
526
|
+
.nx-field--inbox.nx-field--split[data-raised] .nx-field__label {
|
|
527
|
+
left: 50%;
|
|
528
|
+
max-width: calc(100% - 2 * var(--nx-field-base));
|
|
529
|
+
transform: translateX(-50%);
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
/* Multi-line */
|
|
533
|
+
.nx-field--multiline .nx-field__box {
|
|
534
|
+
align-items: stretch;
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
.nx-field--multiline .nx-field__control {
|
|
538
|
+
padding: var(--nx-field-pad-y) var(--nx-field-pad-x);
|
|
539
|
+
font-family: inherit;
|
|
540
|
+
resize: vertical;
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
/* Buttons and the read-only lock sit at the top end, centered on the first line (line height 1.4). */
|
|
544
|
+
.nx-field--multiline .nx-field__actions {
|
|
545
|
+
align-items: flex-start;
|
|
546
|
+
padding-top: calc(var(--nx-field-pad-y) + 0.7em - (var(--nx-field-base) - 10px) / 2);
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
/* The browser's own resize grip ignores the theme (white lines in dark mode): draw two grip lines instead. */
|
|
550
|
+
.nx-field--multiline .nx-field__control::-webkit-resizer {
|
|
551
|
+
background: linear-gradient(
|
|
552
|
+
135deg,
|
|
553
|
+
transparent 0 48%,
|
|
554
|
+
var(--nx-field-grip) 48% 56%,
|
|
555
|
+
transparent 56% 70%,
|
|
556
|
+
var(--nx-field-grip) 70% 78%,
|
|
557
|
+
transparent 78%
|
|
558
|
+
);
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
.nx-field--multiline.nx-field--inbox .nx-field__control {
|
|
562
|
+
padding-top: calc(var(--nx-field-pad-y) + var(--nx-field-inbox-pad) - 4px);
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
.nx-field--multiline .nx-field__icon {
|
|
566
|
+
align-items: flex-start;
|
|
567
|
+
padding-top: calc(var(--nx-field-pad-y) + (1.4em - var(--nx-field-icon)) / 2);
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
.nx-field--multiline.nx-field--inbox:is([data-raised], :focus-within, :has(.nx-field__control:not(:placeholder-shown))) .nx-field__icon {
|
|
571
|
+
padding-top: calc(var(--nx-field-pad-y) + var(--nx-field-inbox-pad) - 4px + (1.4em - var(--nx-field-icon)) / 2);
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
.nx-field--multiline.nx-field--inbox:is([data-raised], :focus-within, :has(.nx-field__control:not(:placeholder-shown))) .nx-field__actions {
|
|
575
|
+
padding-top: calc(var(--nx-field-pad-y) + var(--nx-field-inbox-pad) - 4px + 0.7em - (var(--nx-field-base) - 10px) / 2);
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
/* Grows with its text between --nx-field-rows and --nx-field-max-rows lines. */
|
|
579
|
+
.nx-field__control--auto {
|
|
580
|
+
field-sizing: content;
|
|
581
|
+
min-height: calc(var(--nx-field-rows, 3) * 1lh + 2 * var(--nx-field-pad-y));
|
|
582
|
+
max-height: calc(var(--nx-field-max-rows, 12) * 1lh + 2 * var(--nx-field-pad-y));
|
|
583
|
+
resize: none;
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
@supports not (field-sizing: content) {
|
|
587
|
+
.nx-field__control--auto {
|
|
588
|
+
max-height: none;
|
|
589
|
+
resize: vertical;
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
[data-nx-motion="reduce"] .nx-field__label,
|
|
594
|
+
[data-nx-motion="reduce"] .nx-field--inbox :is(.nx-field__icon, .nx-field__affix, .nx-field__actions) {
|
|
595
|
+
transition: none;
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
[data-nx-motion="reduce"] .nx-field__lock[data-nudge],
|
|
599
|
+
[data-nx-motion="reduce"] .nx-field-notice:popover-open {
|
|
600
|
+
animation: none;
|
|
601
|
+
}
|
|
602
|
+
}
|