@moni-labs/moni-ui 0.4.13 → 0.4.16
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/custom-elements.json +101 -81
- package/dist/browser/moni-ui.iife.min.js +1538 -1384
- package/dist/browser/moni-ui.iife.min.js.br +0 -0
- package/dist/browser/moni-ui.iife.min.js.gz +0 -0
- package/dist/browser/moni-ui.iife.min.js.map +1 -1
- package/dist/browser/moni-ui.min.js +2751 -2501
- package/dist/browser/moni-ui.min.js.br +0 -0
- package/dist/browser/moni-ui.min.js.gz +0 -0
- package/dist/browser/moni-ui.min.js.map +1 -1
- package/dist/cdn/chunks/{class-map-DsL1Jr2T.js → class-map-QyT9W7rZ.js} +1 -1
- package/dist/cdn/chunks/{decorate-DxJYS4gw.js → decorate-B7wZvwrn.js} +629 -543
- package/dist/cdn/chunks/if-defined-5hr_ccFw.js +1 -0
- package/dist/cdn/chunks/{live-D52JqeKf.js → live-Hm1Di_ND.js} +1 -1
- package/dist/cdn/components/moni-app-bar.js +1 -1
- package/dist/cdn/components/moni-badge.js +1 -1
- package/dist/cdn/components/moni-bottom-sheet.js +2 -1
- package/dist/cdn/components/moni-button-group.js +1 -1
- package/dist/cdn/components/moni-button-segment.js +1 -1
- package/dist/cdn/components/moni-button.js +1 -1
- package/dist/cdn/components/moni-card.js +1 -1
- package/dist/cdn/components/moni-carousel.js +1 -1
- package/dist/cdn/components/moni-checkbox.js +1 -1
- package/dist/cdn/components/moni-chip.js +1 -1
- package/dist/cdn/components/moni-color-field.js +1 -1
- package/dist/cdn/components/moni-context-menu.js +1 -1
- package/dist/cdn/components/moni-dialog.js +1 -1
- package/dist/cdn/components/moni-divider.js +1 -1
- package/dist/cdn/components/moni-expansion.js +1 -1
- package/dist/cdn/components/moni-fab-menu.js +1 -1
- package/dist/cdn/components/moni-fab.js +1 -1
- package/dist/cdn/components/moni-file-field.js +1 -1
- package/dist/cdn/components/moni-icon.js +1 -1
- package/dist/cdn/components/moni-list-item.js +1 -1
- package/dist/cdn/components/moni-list.js +1 -1
- package/dist/cdn/components/moni-loading-indicator.js +1 -1
- package/dist/cdn/components/moni-menu-item.js +1 -1
- package/dist/cdn/components/moni-menu.js +1 -1
- package/dist/cdn/components/moni-morph-modal.js +3 -2
- package/dist/cdn/components/moni-nav-item.js +1 -1
- package/dist/cdn/components/moni-nav.js +1 -1
- package/dist/cdn/components/moni-progress.js +1 -1
- package/dist/cdn/components/moni-radio.js +1 -1
- package/dist/cdn/components/moni-ripple.js +1 -1
- package/dist/cdn/components/moni-segmented-button.js +1 -1
- package/dist/cdn/components/moni-select-option.js +1 -1
- package/dist/cdn/components/moni-select.js +512 -473
- package/dist/cdn/components/moni-shape.js +1 -1
- package/dist/cdn/components/moni-side-sheet.js +1 -1
- package/dist/cdn/components/moni-slider.js +1 -1
- package/dist/cdn/components/moni-snackbar.js +1 -1
- package/dist/cdn/components/moni-split-button.js +1 -1
- package/dist/cdn/components/moni-step.js +1 -1
- package/dist/cdn/components/moni-stepper.js +1 -1
- package/dist/cdn/components/moni-switch.js +1 -1
- package/dist/cdn/components/moni-tab.js +1 -1
- package/dist/cdn/components/moni-tabs.js +1 -1
- package/dist/cdn/components/moni-text-field.js +122 -95
- package/dist/cdn/components/moni-textarea.js +52 -52
- package/dist/cdn/components/moni-time-picker.js +1 -1
- package/dist/cdn/components/moni-toolbar.js +1 -1
- package/dist/cdn/components/moni-tooltip.js +1 -1
- package/dist/cdn/components/moni-typography.js +1 -1
- package/dist/cdn/importmap.json +98 -98
- package/dist/components/_base/field-styles.d.ts.map +1 -1
- package/dist/components/_base/field-styles.js +662 -576
- package/dist/components/moni-bottom-sheet.d.ts +19 -5
- package/dist/components/moni-bottom-sheet.d.ts.map +1 -1
- package/dist/components/moni-bottom-sheet.js +111 -30
- package/dist/components/moni-morph-modal.d.ts +10 -0
- package/dist/components/moni-morph-modal.d.ts.map +1 -1
- package/dist/components/moni-morph-modal.js +323 -217
- package/dist/components/moni-select.d.ts +16 -16
- package/dist/components/moni-select.d.ts.map +1 -1
- package/dist/components/moni-select.js +797 -727
- package/dist/components/moni-text-field.d.ts +15 -15
- package/dist/components/moni-text-field.d.ts.map +1 -1
- package/dist/components/moni-text-field.js +224 -180
- package/dist/components/moni-textarea.d.ts +13 -13
- package/dist/components/moni-textarea.d.ts.map +1 -1
- package/dist/components/moni-textarea.js +127 -122
- package/docs/api.json +109 -89
- package/docs/assets/moni-color-field/shape--square.png +0 -0
- package/docs/assets/moni-file-field/shape--square.png +0 -0
- package/docs/assets/moni-morph-modal/autoHeight--false.png +0 -0
- package/docs/assets/moni-morph-modal/autoHeight--true.png +0 -0
- package/docs/components/bottom-sheet.md +2 -1
- package/docs/components/morph-modal.md +16 -7
- package/docs/components/select.md +74 -74
- package/docs/components/text-field.md +75 -66
- package/docs/components/textarea.md +51 -51
- package/docs/llms.txt +3 -3
- package/package.json +1 -1
- package/src/components/_base/field-styles.ts +723 -637
- package/src/components/moni-bottom-sheet.test.ts +331 -0
- package/src/components/moni-bottom-sheet.ts +117 -29
- package/src/components/moni-morph-modal.test.ts +490 -413
- package/src/components/moni-morph-modal.ts +2274 -2162
- package/src/components/moni-select.test.ts +489 -466
- package/src/components/moni-select.ts +1963 -1815
- package/src/components/moni-text-field.test.ts +366 -342
- package/src/components/moni-text-field.ts +717 -645
- package/src/components/moni-textarea.test.ts +201 -197
- package/src/components/moni-textarea.ts +476 -460
- package/dist/cdn/chunks/if-defined-DdzvcoI7.js +0 -1
|
@@ -248,578 +248,664 @@ var e=globalThis,t=e.ShadowRoot&&(e.ShadyCSS===void 0||e.ShadyCSS.nativeShadow)&
|
|
|
248
248
|
border: 0;
|
|
249
249
|
}
|
|
250
250
|
`,Ce=o`
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
251
|
+
:host {
|
|
252
|
+
display: block;
|
|
253
|
+
/* Fields are full-width by default; the parent layout controls sizing. */
|
|
254
|
+
inline-size: 100%;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
/* ─── Base field container ───────────────────────────────────────────────── */
|
|
258
|
+
.field {
|
|
259
|
+
/* Internal height token — overridden by size modifiers (.small, .large, .extra). */
|
|
260
|
+
--_input: 3rem;
|
|
261
|
+
/* Vertical start offset used for textarea padding and label positioning. */
|
|
262
|
+
--_start: 1.2rem;
|
|
263
|
+
/* Computed vertical center — used to position absolutely-placed icons. */
|
|
264
|
+
--_middle: calc(var(--_input, 0) / 2);
|
|
265
|
+
|
|
266
|
+
/* Default field shape: bottom border only (BeerCSS / MD3 "filled" style). */
|
|
267
|
+
border-radius: 0.25rem 0.25rem 0 0;
|
|
268
|
+
min-block-size: var(--_input);
|
|
269
|
+
display: flex;
|
|
270
|
+
flex-direction: column;
|
|
271
|
+
position: relative;
|
|
272
|
+
inline-size: 100%;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
/* ─── Shape overrides ────────────────────────────────────────────────────── */
|
|
276
|
+
|
|
277
|
+
/* Square: removes all border-radius regardless of other modifiers.
|
|
278
278
|
Uses !important to win specificity over .border and [class*='round']. */
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
279
|
+
.field.square,
|
|
280
|
+
.field.square.border,
|
|
281
|
+
.field.square[class*="round"] {
|
|
282
|
+
border-radius: 0 !important;
|
|
283
|
+
}
|
|
284
|
+
.field.square > :is(input, textarea, select) {
|
|
285
|
+
border-radius: 0 !important;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
/* ─── Fill variant ───────────────────────────────────────────────────────── */
|
|
289
|
+
/* Unsets background/color on the container; the background is applied
|
|
290
290
|
directly to the <input> so that the floating label overlaps it correctly. */
|
|
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
|
-
|
|
291
|
+
.field.fill {
|
|
292
|
+
--_background: var(--surface-container-highest);
|
|
293
|
+
background-color: unset !important;
|
|
294
|
+
color: unset !important;
|
|
295
|
+
}
|
|
296
|
+
.field.fill > :is(input, select, textarea) {
|
|
297
|
+
background-color: var(--_background);
|
|
298
|
+
/* z-index: 0 ensures the background renders above the ::before layer. */
|
|
299
|
+
z-index: 0;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
/* ─── Size variants ──────────────────────────────────────────────────────── */
|
|
303
|
+
.field.small {
|
|
304
|
+
--_input: 2.5rem;
|
|
305
|
+
--_start: 1rem;
|
|
306
|
+
}
|
|
307
|
+
.field.large {
|
|
308
|
+
--_input: 3.5rem;
|
|
309
|
+
--_start: 1.4rem;
|
|
310
|
+
}
|
|
311
|
+
.field.extra {
|
|
312
|
+
--_input: 4rem;
|
|
313
|
+
--_start: 1.6rem;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
/* ─── Border (outlined) variant ─────────────────────────────────────────── */
|
|
317
|
+
/* Adds full border-radius and outline-variant stroke on all four sides. */
|
|
318
|
+
.field.border {
|
|
319
|
+
border-radius: 0.25rem;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
/* ─── Round / pill variants ──────────────────────────────────────────────── */
|
|
323
|
+
/* Applied when class matches the 'round' substring (e.g. .round, .round-sm). */
|
|
324
|
+
.field[class*="round"].small {
|
|
325
|
+
border-radius: 1.25rem;
|
|
326
|
+
}
|
|
327
|
+
.field[class*="round"] {
|
|
328
|
+
border-radius: 1.5rem;
|
|
329
|
+
}
|
|
330
|
+
.field[class*="round"].large {
|
|
331
|
+
border-radius: 1.75rem;
|
|
332
|
+
}
|
|
333
|
+
.field[class*="round"].extra {
|
|
334
|
+
border-radius: 2rem;
|
|
335
|
+
}
|
|
336
|
+
/* Compact rounding for dense forms without falling back to square corners. */
|
|
337
|
+
.field.small-round,
|
|
338
|
+
.field.small-round.small,
|
|
339
|
+
.field.small-round.large,
|
|
340
|
+
.field.small-round.extra {
|
|
341
|
+
border-radius: 0.5rem;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
/* ─── Icon positioning ───────────────────────────────────────────────────── */
|
|
345
|
+
/* Generic rule: absolutely positions any icon/image/svg inside the field. */
|
|
346
|
+
.field > :is(i, img, svg) {
|
|
347
|
+
position: absolute;
|
|
348
|
+
inset: calc((var(--_input, 0) / 2) - 0.75rem) auto auto auto;
|
|
349
|
+
cursor: pointer;
|
|
350
|
+
z-index: 10;
|
|
351
|
+
inline-size: 1.5rem;
|
|
352
|
+
block-size: 1.5rem;
|
|
353
|
+
margin: auto 0;
|
|
354
|
+
pointer-events: none;
|
|
355
|
+
}
|
|
356
|
+
/* Leading icon: explicit class wins over :first-child heuristic. */
|
|
357
|
+
.field > :is(i, img, svg):first-child,
|
|
358
|
+
.field > .leading-icon {
|
|
359
|
+
inset: calc(var(--_middle, 0) - 0.75rem) auto auto 1rem;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
/* Trailing icon: BeerCSS uses :last-child:not(:first-child) which fails when
|
|
363
363
|
an <output> follows the icon. The explicit class always wins and places
|
|
364
364
|
the icon on the right edge regardless of sibling count. */
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
365
|
+
.field > :is(i, img, svg):last-child:not(:first-child),
|
|
366
|
+
.field > .trailing-icon {
|
|
367
|
+
inset: calc(var(--_middle, 0) - 0.75rem) 1rem auto auto;
|
|
368
|
+
/* Prevent the inline-start override from the generic rule above. */
|
|
369
|
+
inset-inline-start: auto !important;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
/* Error state: trailing icons inherit the error color. */
|
|
373
|
+
.field.invalid > i {
|
|
374
|
+
color: var(--error);
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
/* ─── Native form element reset ──────────────────────────────────────────── */
|
|
378
|
+
/* 'all: unset' strips browser-default styles (appearance, border, font, etc.)
|
|
379
379
|
so the field's visual design is fully controlled by Moni's CSS. */
|
|
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
|
-
|
|
380
|
+
.field > :is(input, textarea, select) {
|
|
381
|
+
all: unset;
|
|
382
|
+
position: relative;
|
|
383
|
+
display: block;
|
|
384
|
+
box-sizing: border-box;
|
|
385
|
+
border-radius: inherit;
|
|
386
|
+
/* Default border is transparent; visible only in .border and focus states. */
|
|
387
|
+
border: 0.0625rem solid transparent;
|
|
388
|
+
padding: 0 0.9375rem;
|
|
389
|
+
font-family: inherit;
|
|
390
|
+
font-size: 1rem;
|
|
391
|
+
min-block-size: var(--_input);
|
|
392
|
+
outline: none;
|
|
393
|
+
z-index: 1;
|
|
394
|
+
background: none;
|
|
395
|
+
resize: none; /* Textareas use field-sizing:content instead of manual resize. */
|
|
396
|
+
text-align: start;
|
|
397
|
+
cursor: text;
|
|
398
|
+
color: var(--on-surface);
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
/* Ensure date/time input values align to start (browser quirk on some platforms). */
|
|
402
|
+
input::-webkit-date-and-time-value {
|
|
403
|
+
text-align: start;
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
/* Autofill: preserve text color when the browser applies its autofill highlight.
|
|
407
407
|
-webkit-background-clip + -webkit-text-fill-color override the yellow tint. */
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
408
|
+
:is(input, select, textarea):is(:-webkit-autofill, :autofill) {
|
|
409
|
+
-webkit-background-clip: text;
|
|
410
|
+
-webkit-text-fill-color: var(--on-surface);
|
|
411
|
+
}
|
|
412
412
|
|
|
413
|
-
|
|
413
|
+
/* On focus, increase border width by 1px — shift padding inward by 1px
|
|
414
414
|
to prevent layout shift from the border width change. */
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
415
|
+
.field > :is(input, textarea, select):focus {
|
|
416
|
+
border: 0.125rem solid transparent;
|
|
417
|
+
padding-inline: 0.875rem;
|
|
418
|
+
}
|
|
419
419
|
|
|
420
|
-
|
|
420
|
+
/* Textareas without explicit rows grow automatically using field-sizing:content.
|
|
421
421
|
A max-height of 12rem (~8 lines) prevents uncontrolled page growth. */
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
422
|
+
.field > textarea:not([rows]) {
|
|
423
|
+
field-sizing: content;
|
|
424
|
+
max-block-size: 12rem;
|
|
425
|
+
}
|
|
426
426
|
|
|
427
|
-
|
|
428
|
-
|
|
427
|
+
/* ─── Transparent native picker controls ─────────────────────────────────── */
|
|
428
|
+
/* File and color inputs, and date/time picker indicators are hidden so the
|
|
429
429
|
component can render its own UI. The native controls are still active for
|
|
430
430
|
accessibility (click propagates through the transparent overlay). */
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
431
|
+
input[type="file"],
|
|
432
|
+
input[type="color"],
|
|
433
|
+
:not(.field)
|
|
434
|
+
> input:is([type^="date"], [type^="time"], [type="month"], [type="week"]),
|
|
435
|
+
input::-webkit-calendar-picker-indicator {
|
|
436
|
+
opacity: 0;
|
|
437
|
+
position: absolute;
|
|
438
|
+
inset: 0;
|
|
439
|
+
inline-size: 100%;
|
|
440
|
+
block-size: 100%;
|
|
441
|
+
margin: 0;
|
|
442
|
+
padding: 0;
|
|
443
|
+
border: 0;
|
|
444
|
+
outline: 0;
|
|
445
|
+
z-index: 2 !important;
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
/* On fine-pointer (mouse) devices, push the calendar picker indicator behind
|
|
448
449
|
the field content so it doesn't interfere with other clickable elements. */
|
|
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
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
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
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
450
|
+
@media (pointer: fine) {
|
|
451
|
+
.field > input::-webkit-calendar-picker-indicator {
|
|
452
|
+
z-index: -1 !important;
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
/* Remove browser-native search field decorations. */
|
|
457
|
+
input::-webkit-search-decoration,
|
|
458
|
+
input::-webkit-search-cancel-button,
|
|
459
|
+
input::-webkit-search-results-button,
|
|
460
|
+
input::-webkit-search-results-decoration,
|
|
461
|
+
input::-webkit-inner-spin-button,
|
|
462
|
+
input::-webkit-outer-spin-button {
|
|
463
|
+
display: none;
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
/* Remove the browser spinner on number inputs — use explicit stepper UI instead. */
|
|
467
|
+
input[type="number"] {
|
|
468
|
+
appearance: textfield;
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
/* ─── Border variant: field-level border colors ──────────────────────────── */
|
|
472
|
+
.field.border > :is(input, textarea, select) {
|
|
473
|
+
border-color: var(--outline);
|
|
474
|
+
}
|
|
475
|
+
.field.border > :is(input, textarea, select):focus {
|
|
476
|
+
border-color: var(--primary);
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
/* Round variants add extra inline padding to clear the curved edges. */
|
|
480
|
+
.field[class*="round"] > :is(input, textarea, select) {
|
|
481
|
+
padding-inline: 1.4376rem;
|
|
482
|
+
}
|
|
483
|
+
.field[class*="round"] > :is(input, textarea, select):focus {
|
|
484
|
+
padding-inline: 1.375rem;
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
/* ─── Icon padding accommodation ─────────────────────────────────────────── */
|
|
488
|
+
/* .prefix / .suffix shift the input's inline padding to make room for icons. */
|
|
489
|
+
.field.prefix > :is(input, textarea, select) {
|
|
490
|
+
padding-inline-start: 2.9375rem;
|
|
491
|
+
}
|
|
492
|
+
.field.prefix > :is(input, textarea, select):focus {
|
|
493
|
+
padding-inline-start: 2.875rem;
|
|
494
|
+
}
|
|
495
|
+
.field.suffix > :is(input, textarea, select) {
|
|
496
|
+
padding-inline-end: 2.9375rem;
|
|
497
|
+
}
|
|
498
|
+
.field.suffix > :is(input, textarea, select):focus {
|
|
499
|
+
padding-inline-end: 2.875rem;
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
/* ─── Underline (non-border, non-round) bottom border ─────────────────────── */
|
|
503
|
+
/* Default M3 filled field style: only the bottom border is visible. */
|
|
504
|
+
.field:not(.border, [class*="round"]) > :is(input, textarea, select) {
|
|
505
|
+
border-block-end-color: var(--outline);
|
|
506
|
+
}
|
|
507
|
+
.field:not(.border, [class*="round"]) > :is(input, textarea, select):focus {
|
|
508
|
+
border-block-end-color: var(--primary);
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
/* Round non-bordered fields get a subtle elevation shadow instead of a border. */
|
|
512
|
+
.field[class*="round"]:not(.border, .fill) > :is(input, textarea, select),
|
|
513
|
+
.field[class*="round"]:not(.border) > :is(input, textarea, select):focus {
|
|
514
|
+
box-shadow: var(--elevate1);
|
|
515
|
+
}
|
|
516
|
+
.field[class*="round"]:not(.border, .fill)
|
|
517
|
+
> :is(input, textarea, select):focus {
|
|
518
|
+
box-shadow: var(--elevate2);
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
/* ─── Invalid / error state borders ─────────────────────────────────────── */
|
|
522
|
+
.field.invalid:not(.border, [class*="round"]) > :is(input, textarea, select),
|
|
523
|
+
.field.invalid:not(.border, [class*="round"])
|
|
524
|
+
> :is(input, textarea, select):focus {
|
|
525
|
+
border-block-end-color: var(--error);
|
|
526
|
+
}
|
|
527
|
+
.field.invalid.border > :is(input, textarea, select),
|
|
528
|
+
.field.invalid.border > :is(input, textarea, select):focus {
|
|
529
|
+
border-color: var(--error);
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
/* ─── Disabled state ─────────────────────────────────────────────────────── */
|
|
533
|
+
/* Reduces opacity on the entire field container when the native control is
|
|
531
534
|
disabled, rather than applying separate rules to each child. */
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
535
|
+
.field:has(> :disabled) {
|
|
536
|
+
opacity: 0.5;
|
|
537
|
+
cursor: not-allowed;
|
|
538
|
+
}
|
|
539
|
+
.field > :disabled {
|
|
540
|
+
cursor: not-allowed;
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
/* ─── Select element ─────────────────────────────────────────────────────── */
|
|
544
|
+
/* Remove browser-native select appearance; the component renders its own dropdown. */
|
|
545
|
+
.field > select {
|
|
546
|
+
user-select: none;
|
|
547
|
+
appearance: none;
|
|
548
|
+
-webkit-appearance: none;
|
|
549
|
+
background-image: none;
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
/* ─── Block-start padding for label accommodation ────────────────────────── */
|
|
553
|
+
/* Inputs with a floating label need top padding to create space for the
|
|
551
554
|
label when it lifts above the input. Selects always lift their label. */
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
555
|
+
.field > :is(input, select) {
|
|
556
|
+
padding-block-start: 1rem;
|
|
557
|
+
}
|
|
558
|
+
/* No-label and border+fill fields: remove the top padding offset. */
|
|
559
|
+
.field:not(.label) > :is(input, select),
|
|
560
|
+
.field.border:not(.fill) > :is(input, select) {
|
|
561
|
+
padding-block-start: 0;
|
|
562
|
+
}
|
|
563
|
+
/* Textareas use the --_start token to align with the label baseline. */
|
|
564
|
+
.field > textarea {
|
|
565
|
+
padding-block-start: var(--_start) !important;
|
|
566
|
+
}
|
|
567
|
+
.field > textarea:focus {
|
|
568
|
+
/* 0.01rem compensates for the border width increase on focus. */
|
|
569
|
+
padding-block-start: calc(var(--_start, 0) - 0.01rem) !important;
|
|
570
|
+
}
|
|
571
|
+
.field:not(.label) > textarea,
|
|
572
|
+
.field.border:not(.fill) > textarea {
|
|
573
|
+
padding-block-start: calc(var(--_start, 0) - 0.5rem) !important;
|
|
574
|
+
}
|
|
575
|
+
.field:not(.label) > textarea:focus,
|
|
576
|
+
.field.border:not(.fill) > textarea:focus {
|
|
577
|
+
padding-block-start: calc(var(--_start, 0) - 0.51rem) !important;
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
/* ─── Floating label ─────────────────────────────────────────────────────── */
|
|
581
|
+
/* The label starts at full font-size (1rem) vertically centered in the field.
|
|
579
582
|
On focus or when value is present, it scales down to 0.75rem and lifts
|
|
580
583
|
to the top of the field container. */
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
584
|
+
.field.label > label {
|
|
585
|
+
--_start: 1rem;
|
|
586
|
+
position: absolute;
|
|
587
|
+
inset: -0.5rem 0.9375rem 0 var(--_start);
|
|
588
|
+
display: flex;
|
|
589
|
+
/* Full height + 1rem (for label overhang) centers the label vertically. */
|
|
590
|
+
block-size: calc(var(--_input, 0) + 1rem);
|
|
591
|
+
line-height: calc(var(--_input, 0) + 1rem);
|
|
592
|
+
font-size: 1rem;
|
|
593
|
+
transition: all 0.2s;
|
|
594
|
+
gap: 0.25rem;
|
|
595
|
+
white-space: nowrap;
|
|
596
|
+
/* The label is purely decorative from a layout perspective; it must never
|
|
594
597
|
intercept pointer events meant for the underlying input. */
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
+
pointer-events: none;
|
|
599
|
+
color: var(--on-surface-variant);
|
|
600
|
+
}
|
|
598
601
|
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
602
|
+
/* Round fields: label aligns with the increased inline padding. */
|
|
603
|
+
.field.label[class*="round"] > label {
|
|
604
|
+
inset: -0.5rem 1.9375rem 0 var(--_start);
|
|
605
|
+
}
|
|
603
606
|
|
|
604
|
-
|
|
605
|
-
|
|
607
|
+
/* ─── Label lift selector group ──────────────────────────────────────────── */
|
|
608
|
+
/* The label lifts (scales down + moves up) in four conditions:
|
|
606
609
|
1. label.active — the component sets this class directly (readonly inputs).
|
|
607
610
|
2. :focus + label — when the native control is focused.
|
|
608
611
|
3. [placeholder]:not(:placeholder-shown) + label — when a value is present.
|
|
609
612
|
4. select + label — selects always show their label lifted.
|
|
610
613
|
5. input.active + label — for programmatically activated inputs. */
|
|
611
614
|
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
/* The ::after pseudo creates the horizontal line to the right of the lifted
|
|
615
|
+
/* Border + prefix + no-fill variant needs a reduced --_start offset. */
|
|
616
|
+
.field.label.border.prefix:not(.fill)
|
|
617
|
+
> :is(
|
|
618
|
+
label.active,
|
|
619
|
+
:focus + label,
|
|
620
|
+
[placeholder]:not(:placeholder-shown) + label,
|
|
621
|
+
select + label,
|
|
622
|
+
input.active + label
|
|
623
|
+
) {
|
|
624
|
+
--_start: 1rem;
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
/* Round field label and round border prefix field label override. */
|
|
628
|
+
.field.label[class*="round"] > label,
|
|
629
|
+
.field.label.border.prefix[class*="round"]:not(.fill)
|
|
630
|
+
> :is(
|
|
631
|
+
label.active,
|
|
632
|
+
:focus + label,
|
|
633
|
+
[placeholder]:not(:placeholder-shown) + label,
|
|
634
|
+
select + label,
|
|
635
|
+
input.active + label
|
|
636
|
+
) {
|
|
637
|
+
--_start: 1.5rem;
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
.field.label.small-round > label {
|
|
641
|
+
--_start: 1rem;
|
|
642
|
+
inset: -0.5rem 0.9375rem 0 var(--_start);
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
/* Prefix fields: shift the label's inline-start to clear the leading icon. */
|
|
646
|
+
.field.label.prefix > label {
|
|
647
|
+
--_start: 3rem;
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
/* Lifted label: shrinks to 0.75rem and collapses to the top of the field. */
|
|
651
|
+
.field.label
|
|
652
|
+
> :is(
|
|
653
|
+
label.active,
|
|
654
|
+
:focus + label,
|
|
655
|
+
[placeholder]:not(:placeholder-shown) + label,
|
|
656
|
+
select + label,
|
|
657
|
+
input.active + label
|
|
658
|
+
) {
|
|
659
|
+
block-size: 2.5rem;
|
|
660
|
+
line-height: 2.5rem;
|
|
661
|
+
font-size: 0.75rem;
|
|
662
|
+
}
|
|
663
|
+
|
|
664
|
+
/* Border variant: label collapses to 1rem height with a notch cut effect. */
|
|
665
|
+
.field.label.border:not(.fill)
|
|
666
|
+
> :is(
|
|
667
|
+
label.active,
|
|
668
|
+
:focus + label,
|
|
669
|
+
[placeholder]:not(:placeholder-shown) + label,
|
|
670
|
+
select + label,
|
|
671
|
+
input.active + label
|
|
672
|
+
) {
|
|
673
|
+
block-size: 1rem;
|
|
674
|
+
line-height: 1rem;
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
/* ─── Border notch (label gap in the top border) ─────────────────────────── */
|
|
678
|
+
/* The ::after pseudo creates the horizontal line to the right of the lifted
|
|
677
679
|
label, visually cutting a notch into the top border of .field.border. */
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
680
|
+
.field.label.border:not(.fill) > label::after {
|
|
681
|
+
content: "";
|
|
682
|
+
display: block;
|
|
683
|
+
margin: 0.5rem 0 0 0;
|
|
684
|
+
border-block-start: 0.0625rem solid var(--outline);
|
|
685
|
+
block-size: 1rem;
|
|
686
|
+
transition: none;
|
|
687
|
+
flex: auto;
|
|
688
|
+
}
|
|
689
|
+
.field.label.border:not(.fill) > :focus + label::after {
|
|
690
|
+
/* On focus, the notch line becomes primary-colored. */
|
|
691
|
+
border-block-start: 0.125rem solid var(--primary);
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
/* ─── Border notch clipping (clip-path) ──────────────────────────────────── */
|
|
695
|
+
/* When the label is lifted, a clip-path cuts a gap in the top border of the
|
|
694
696
|
input element itself, creating the appearance of the label floating within
|
|
695
697
|
the border's top edge. The clip-path dimensions account for label width. */
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
698
|
+
.field.label.border.square:not(.fill)
|
|
699
|
+
> :is(input, textarea):is(
|
|
700
|
+
:focus,
|
|
701
|
+
[placeholder]:not(:placeholder-shown),
|
|
702
|
+
.active
|
|
703
|
+
),
|
|
704
|
+
.field.label.border.square:not(.fill) > select,
|
|
705
|
+
.field.label.border.square:not(.fill) > input.active,
|
|
706
|
+
.field.label.border.square:not(.fill) > select.active {
|
|
707
|
+
clip-path: polygon(
|
|
708
|
+
-2% -2%,
|
|
709
|
+
0.75rem -2%,
|
|
710
|
+
0.75rem 0.5rem,
|
|
711
|
+
calc(100% - 1rem) 0.5rem,
|
|
712
|
+
calc(100% - 1rem) -2%,
|
|
713
|
+
102% -2%,
|
|
714
|
+
102% 102%,
|
|
715
|
+
-2% 102%
|
|
716
|
+
);
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
/* Prefix variant: clip starts further right to clear the leading icon text. */
|
|
720
|
+
.field.label.border.prefix.square:not(.fill)
|
|
721
|
+
> :is(input, textarea):is(
|
|
722
|
+
:focus,
|
|
723
|
+
[placeholder]:not(:placeholder-shown),
|
|
724
|
+
.active
|
|
725
|
+
),
|
|
726
|
+
.field.label.border.prefix.square:not(.fill) > select,
|
|
727
|
+
.field.label.border.prefix.square:not(.fill) > input.active,
|
|
728
|
+
.field.label.border.prefix.square:not(.fill) > select.active {
|
|
729
|
+
clip-path: polygon(
|
|
730
|
+
-2% -2%,
|
|
731
|
+
0.75rem -2%,
|
|
732
|
+
0.75rem 0.5rem,
|
|
733
|
+
calc(100% - 1rem) 0.5rem,
|
|
734
|
+
calc(100% - 1rem) -2%,
|
|
735
|
+
102% -2%,
|
|
736
|
+
102% 102%,
|
|
737
|
+
-2% 102%
|
|
738
|
+
);
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
/* Round and square border fields use a wider notch to clear the curved border. */
|
|
742
|
+
.field.label.border[class*="round"]:not(.fill)
|
|
743
|
+
> :is(input, textarea):is(
|
|
744
|
+
:focus,
|
|
745
|
+
[placeholder]:not(:placeholder-shown),
|
|
746
|
+
.active
|
|
747
|
+
),
|
|
748
|
+
.field.label.border[class*="round"]:not(.fill) > select,
|
|
749
|
+
.field.label.border:not(.fill)
|
|
750
|
+
> :is(input, textarea):is(
|
|
751
|
+
:focus,
|
|
752
|
+
[placeholder]:not(:placeholder-shown),
|
|
753
|
+
.active
|
|
754
|
+
),
|
|
755
|
+
.field.label.border:not(.fill) > select {
|
|
756
|
+
clip-path: polygon(
|
|
757
|
+
-2% -2%,
|
|
758
|
+
0.75rem -2%,
|
|
759
|
+
0.75rem 0.5rem,
|
|
760
|
+
calc(100% - 1rem) 0.5rem,
|
|
761
|
+
calc(100% - 1rem) -2%,
|
|
762
|
+
102% -2%,
|
|
763
|
+
102% 102%,
|
|
764
|
+
-2% 102%
|
|
765
|
+
);
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
.field.label.border.prefix[class*="round"]:not(.fill)
|
|
769
|
+
> :is(input, textarea):is(
|
|
770
|
+
:focus,
|
|
771
|
+
[placeholder]:not(:placeholder-shown),
|
|
772
|
+
.active
|
|
773
|
+
),
|
|
774
|
+
.field.label.border.prefix[class*="round"]:not(.fill) > select,
|
|
775
|
+
.field.label.border.prefix:not(.fill)
|
|
776
|
+
> :is(input, textarea):is(
|
|
777
|
+
:focus,
|
|
778
|
+
[placeholder]:not(:placeholder-shown),
|
|
779
|
+
.active
|
|
780
|
+
),
|
|
781
|
+
.field.label.border.prefix:not(.fill) > select {
|
|
782
|
+
clip-path: polygon(
|
|
783
|
+
-2% -2%,
|
|
784
|
+
0.75rem -2%,
|
|
785
|
+
0.75rem 0.5rem,
|
|
786
|
+
calc(100% - 1rem) 0.5rem,
|
|
787
|
+
calc(100% - 1rem) -2%,
|
|
788
|
+
102% -2%,
|
|
789
|
+
102% 102%,
|
|
790
|
+
-2% 102%
|
|
791
|
+
);
|
|
792
|
+
}
|
|
793
|
+
|
|
794
|
+
.field.label.border.round:not(.fill)
|
|
795
|
+
> :is(input, textarea):is(
|
|
796
|
+
:focus,
|
|
797
|
+
[placeholder]:not(:placeholder-shown),
|
|
798
|
+
.active
|
|
799
|
+
),
|
|
800
|
+
.field.label.border.round:not(.fill) > select,
|
|
801
|
+
.field.label.border.round:not(.fill) > input.active,
|
|
802
|
+
.field.label.border.round:not(.fill) > select.active {
|
|
803
|
+
clip-path: polygon(
|
|
804
|
+
-2% -2%,
|
|
805
|
+
1.25rem -2%,
|
|
806
|
+
1.25rem 0.5rem,
|
|
807
|
+
calc(100% - 2rem) 0.5rem,
|
|
808
|
+
calc(100% - 2rem) -2%,
|
|
809
|
+
102% -2%,
|
|
810
|
+
102% 102%,
|
|
811
|
+
-2% 102%
|
|
812
|
+
) !important;
|
|
813
|
+
}
|
|
814
|
+
|
|
815
|
+
.field.label.border.small-round:not(.fill)
|
|
816
|
+
> :is(input, textarea):is(
|
|
817
|
+
:focus,
|
|
818
|
+
[placeholder]:not(:placeholder-shown),
|
|
819
|
+
.active
|
|
820
|
+
),
|
|
821
|
+
.field.label.border.small-round:not(.fill) > select,
|
|
822
|
+
.field.label.border.small-round:not(.fill) > input.active,
|
|
823
|
+
.field.label.border.small-round:not(.fill) > select.active {
|
|
824
|
+
clip-path: polygon(
|
|
825
|
+
-2% -2%,
|
|
826
|
+
0.75rem -2%,
|
|
827
|
+
0.75rem 0.5rem,
|
|
828
|
+
calc(100% - 1rem) 0.5rem,
|
|
829
|
+
calc(100% - 1rem) -2%,
|
|
830
|
+
102% -2%,
|
|
831
|
+
102% 102%,
|
|
832
|
+
-2% 102%
|
|
833
|
+
) !important;
|
|
834
|
+
}
|
|
835
|
+
|
|
836
|
+
/* ─── Label color changes ─────────────────────────────────────────────────── */
|
|
837
|
+
/* On focus: label turns primary-colored to draw attention. */
|
|
838
|
+
.field.label > :focus + label {
|
|
839
|
+
color: var(--primary);
|
|
840
|
+
}
|
|
841
|
+
|
|
842
|
+
/* On error: label and notch line turn error-colored. */
|
|
843
|
+
.field.label.invalid > label,
|
|
844
|
+
.field.label.invalid > label::after {
|
|
845
|
+
color: var(--error) !important;
|
|
846
|
+
border-color: var(--error) !important;
|
|
847
|
+
}
|
|
848
|
+
|
|
849
|
+
/* ─── Helper / error output ──────────────────────────────────────────────── */
|
|
850
|
+
/* The <output> element below the field shows helper text or validation errors. */
|
|
851
|
+
.field > output {
|
|
852
|
+
display: inline-block;
|
|
853
|
+
font-size: 0.75rem;
|
|
854
|
+
background: none !important;
|
|
855
|
+
padding: 0.25rem 1rem;
|
|
856
|
+
line-height: 1.25rem;
|
|
857
|
+
align-self: start;
|
|
858
|
+
color: var(--on-surface-variant);
|
|
859
|
+
}
|
|
860
|
+
/* Error output overrides the neutral helper color. */
|
|
861
|
+
.field > output.invalid {
|
|
862
|
+
color: var(--error) !important;
|
|
863
|
+
}
|
|
864
|
+
/* Round fields: increase horizontal padding to align with the curved edge. */
|
|
865
|
+
.field[class*="round"] > output {
|
|
866
|
+
padding: 0.25rem 1.5rem;
|
|
867
|
+
}
|
|
868
|
+
/* Show only one output at a time: helper OR error, never both. */
|
|
869
|
+
.field.invalid > output:not(.invalid),
|
|
870
|
+
.field:not(.invalid) > output.invalid {
|
|
871
|
+
display: none;
|
|
872
|
+
}
|
|
873
|
+
|
|
874
|
+
/* ─── Footer wrapper (textarea & multi-line fields) ───────────────────────── */
|
|
875
|
+
/* Lays out helper text (left) and character counter (right) on the same row,
|
|
790
876
|
matching the M3 spec for supporting-text + character-counter pairs. */
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
877
|
+
.field > .footer {
|
|
878
|
+
display: flex;
|
|
879
|
+
align-items: center;
|
|
880
|
+
justify-content: space-between;
|
|
881
|
+
gap: 1rem;
|
|
882
|
+
padding: 0;
|
|
883
|
+
min-block-size: 1.25rem;
|
|
884
|
+
}
|
|
885
|
+
.field > .footer > output {
|
|
886
|
+
display: inline-block;
|
|
887
|
+
font-size: 0.75rem;
|
|
888
|
+
background: none !important;
|
|
889
|
+
padding: 0.25rem 1rem;
|
|
890
|
+
line-height: 1.25rem;
|
|
891
|
+
align-self: center;
|
|
892
|
+
color: var(--on-surface-variant);
|
|
893
|
+
}
|
|
894
|
+
.field > .footer > output.invalid {
|
|
895
|
+
color: var(--error) !important;
|
|
896
|
+
}
|
|
897
|
+
/* Character counter — right-aligned, same typographic style as the helper. */
|
|
898
|
+
.field > .footer > .counter {
|
|
899
|
+
padding: 0.25rem 1rem;
|
|
900
|
+
color: var(--on-surface-variant);
|
|
901
|
+
}
|
|
902
|
+
/* Spacer pushes counter to the right when there is no helper text. */
|
|
903
|
+
.field > .footer > .spacer {
|
|
904
|
+
flex: 1;
|
|
905
|
+
}
|
|
906
|
+
/* Same exclusive show logic as direct <output> elements. */
|
|
907
|
+
.field.invalid > .footer > output:not(.invalid),
|
|
908
|
+
.field:not(.invalid) > .footer > output.invalid {
|
|
909
|
+
display: none;
|
|
910
|
+
}
|
|
825
911
|
`;function we(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}export{be as a,R as c,le as d,pe as f,a as h,xe as i,L as l,o as m,Ce as n,$ as o,ue as p,Se as r,_e as s,we as t,de as u};
|