@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.
Files changed (104) hide show
  1. package/custom-elements.json +101 -81
  2. package/dist/browser/moni-ui.iife.min.js +1538 -1384
  3. package/dist/browser/moni-ui.iife.min.js.br +0 -0
  4. package/dist/browser/moni-ui.iife.min.js.gz +0 -0
  5. package/dist/browser/moni-ui.iife.min.js.map +1 -1
  6. package/dist/browser/moni-ui.min.js +2751 -2501
  7. package/dist/browser/moni-ui.min.js.br +0 -0
  8. package/dist/browser/moni-ui.min.js.gz +0 -0
  9. package/dist/browser/moni-ui.min.js.map +1 -1
  10. package/dist/cdn/chunks/{class-map-DsL1Jr2T.js → class-map-QyT9W7rZ.js} +1 -1
  11. package/dist/cdn/chunks/{decorate-DxJYS4gw.js → decorate-B7wZvwrn.js} +629 -543
  12. package/dist/cdn/chunks/if-defined-5hr_ccFw.js +1 -0
  13. package/dist/cdn/chunks/{live-D52JqeKf.js → live-Hm1Di_ND.js} +1 -1
  14. package/dist/cdn/components/moni-app-bar.js +1 -1
  15. package/dist/cdn/components/moni-badge.js +1 -1
  16. package/dist/cdn/components/moni-bottom-sheet.js +2 -1
  17. package/dist/cdn/components/moni-button-group.js +1 -1
  18. package/dist/cdn/components/moni-button-segment.js +1 -1
  19. package/dist/cdn/components/moni-button.js +1 -1
  20. package/dist/cdn/components/moni-card.js +1 -1
  21. package/dist/cdn/components/moni-carousel.js +1 -1
  22. package/dist/cdn/components/moni-checkbox.js +1 -1
  23. package/dist/cdn/components/moni-chip.js +1 -1
  24. package/dist/cdn/components/moni-color-field.js +1 -1
  25. package/dist/cdn/components/moni-context-menu.js +1 -1
  26. package/dist/cdn/components/moni-dialog.js +1 -1
  27. package/dist/cdn/components/moni-divider.js +1 -1
  28. package/dist/cdn/components/moni-expansion.js +1 -1
  29. package/dist/cdn/components/moni-fab-menu.js +1 -1
  30. package/dist/cdn/components/moni-fab.js +1 -1
  31. package/dist/cdn/components/moni-file-field.js +1 -1
  32. package/dist/cdn/components/moni-icon.js +1 -1
  33. package/dist/cdn/components/moni-list-item.js +1 -1
  34. package/dist/cdn/components/moni-list.js +1 -1
  35. package/dist/cdn/components/moni-loading-indicator.js +1 -1
  36. package/dist/cdn/components/moni-menu-item.js +1 -1
  37. package/dist/cdn/components/moni-menu.js +1 -1
  38. package/dist/cdn/components/moni-morph-modal.js +3 -2
  39. package/dist/cdn/components/moni-nav-item.js +1 -1
  40. package/dist/cdn/components/moni-nav.js +1 -1
  41. package/dist/cdn/components/moni-progress.js +1 -1
  42. package/dist/cdn/components/moni-radio.js +1 -1
  43. package/dist/cdn/components/moni-ripple.js +1 -1
  44. package/dist/cdn/components/moni-segmented-button.js +1 -1
  45. package/dist/cdn/components/moni-select-option.js +1 -1
  46. package/dist/cdn/components/moni-select.js +512 -473
  47. package/dist/cdn/components/moni-shape.js +1 -1
  48. package/dist/cdn/components/moni-side-sheet.js +1 -1
  49. package/dist/cdn/components/moni-slider.js +1 -1
  50. package/dist/cdn/components/moni-snackbar.js +1 -1
  51. package/dist/cdn/components/moni-split-button.js +1 -1
  52. package/dist/cdn/components/moni-step.js +1 -1
  53. package/dist/cdn/components/moni-stepper.js +1 -1
  54. package/dist/cdn/components/moni-switch.js +1 -1
  55. package/dist/cdn/components/moni-tab.js +1 -1
  56. package/dist/cdn/components/moni-tabs.js +1 -1
  57. package/dist/cdn/components/moni-text-field.js +122 -95
  58. package/dist/cdn/components/moni-textarea.js +52 -52
  59. package/dist/cdn/components/moni-time-picker.js +1 -1
  60. package/dist/cdn/components/moni-toolbar.js +1 -1
  61. package/dist/cdn/components/moni-tooltip.js +1 -1
  62. package/dist/cdn/components/moni-typography.js +1 -1
  63. package/dist/cdn/importmap.json +98 -98
  64. package/dist/components/_base/field-styles.d.ts.map +1 -1
  65. package/dist/components/_base/field-styles.js +662 -576
  66. package/dist/components/moni-bottom-sheet.d.ts +19 -5
  67. package/dist/components/moni-bottom-sheet.d.ts.map +1 -1
  68. package/dist/components/moni-bottom-sheet.js +111 -30
  69. package/dist/components/moni-morph-modal.d.ts +10 -0
  70. package/dist/components/moni-morph-modal.d.ts.map +1 -1
  71. package/dist/components/moni-morph-modal.js +323 -217
  72. package/dist/components/moni-select.d.ts +16 -16
  73. package/dist/components/moni-select.d.ts.map +1 -1
  74. package/dist/components/moni-select.js +797 -727
  75. package/dist/components/moni-text-field.d.ts +15 -15
  76. package/dist/components/moni-text-field.d.ts.map +1 -1
  77. package/dist/components/moni-text-field.js +224 -180
  78. package/dist/components/moni-textarea.d.ts +13 -13
  79. package/dist/components/moni-textarea.d.ts.map +1 -1
  80. package/dist/components/moni-textarea.js +127 -122
  81. package/docs/api.json +109 -89
  82. package/docs/assets/moni-color-field/shape--square.png +0 -0
  83. package/docs/assets/moni-file-field/shape--square.png +0 -0
  84. package/docs/assets/moni-morph-modal/autoHeight--false.png +0 -0
  85. package/docs/assets/moni-morph-modal/autoHeight--true.png +0 -0
  86. package/docs/components/bottom-sheet.md +2 -1
  87. package/docs/components/morph-modal.md +16 -7
  88. package/docs/components/select.md +74 -74
  89. package/docs/components/text-field.md +75 -66
  90. package/docs/components/textarea.md +51 -51
  91. package/docs/llms.txt +3 -3
  92. package/package.json +1 -1
  93. package/src/components/_base/field-styles.ts +723 -637
  94. package/src/components/moni-bottom-sheet.test.ts +331 -0
  95. package/src/components/moni-bottom-sheet.ts +117 -29
  96. package/src/components/moni-morph-modal.test.ts +490 -413
  97. package/src/components/moni-morph-modal.ts +2274 -2162
  98. package/src/components/moni-select.test.ts +489 -466
  99. package/src/components/moni-select.ts +1963 -1815
  100. package/src/components/moni-text-field.test.ts +366 -342
  101. package/src/components/moni-text-field.ts +717 -645
  102. package/src/components/moni-textarea.test.ts +201 -197
  103. package/src/components/moni-textarea.ts +476 -460
  104. 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
- :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.
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
- .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
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
- .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
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
- .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.)
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
- .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.
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
- :is(input, select, textarea):is(:-webkit-autofill, :autofill) {
409
- -webkit-background-clip: text;
410
- -webkit-text-fill-color: var(--on-surface);
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
- /* On focus, increase border width by 1px — shift padding inward by 1px
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
- .field > :is(input, textarea, select):focus {
416
- border: 0.125rem solid transparent;
417
- padding-inline: 0.875rem;
418
- }
415
+ .field > :is(input, textarea, select):focus {
416
+ border: 0.125rem solid transparent;
417
+ padding-inline: 0.875rem;
418
+ }
419
419
 
420
- /* Textareas without explicit rows grow automatically using field-sizing:content.
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
- .field > textarea:not([rows]) {
423
- field-sizing: content;
424
- max-block-size: 12rem;
425
- }
422
+ .field > textarea:not([rows]) {
423
+ field-sizing: content;
424
+ max-block-size: 12rem;
425
+ }
426
426
 
427
- /* ─── Transparent native picker controls ─────────────────────────────────── */
428
- /* File and color inputs, and date/time picker indicators are hidden so the
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
- input[type='file'],
432
- input[type='color'],
433
- :not(.field) > input:is([type^='date'], [type^='time'], [type='month'], [type='week']),
434
- input::-webkit-calendar-picker-indicator {
435
- opacity: 0;
436
- position: absolute;
437
- inset: 0;
438
- inline-size: 100%;
439
- block-size: 100%;
440
- margin: 0;
441
- padding: 0;
442
- border: 0;
443
- outline: 0;
444
- z-index: 2 !important;
445
- }
446
-
447
- /* On fine-pointer (mouse) devices, push the calendar picker indicator behind
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
- @media (pointer: fine) {
450
- .field > input::-webkit-calendar-picker-indicator {
451
- z-index: -1 !important;
452
- }
453
- }
454
-
455
- /* Remove browser-native search field decorations. */
456
- input::-webkit-search-decoration,
457
- input::-webkit-search-cancel-button,
458
- input::-webkit-search-results-button,
459
- input::-webkit-search-results-decoration,
460
- input::-webkit-inner-spin-button,
461
- input::-webkit-outer-spin-button {
462
- display: none;
463
- }
464
-
465
- /* Remove the browser spinner on number inputs — use explicit stepper UI instead. */
466
- input[type='number'] {
467
- appearance: textfield;
468
- }
469
-
470
- /* ─── Border variant: field-level border colors ──────────────────────────── */
471
- .field.border > :is(input, textarea, select) {
472
- border-color: var(--outline);
473
- }
474
- .field.border > :is(input, textarea, select):focus {
475
- border-color: var(--primary);
476
- }
477
-
478
- /* Round variants add extra inline padding to clear the curved edges. */
479
- .field[class*='round'] > :is(input, textarea, select) {
480
- padding-inline: 1.4376rem;
481
- }
482
- .field[class*='round'] > :is(input, textarea, select):focus {
483
- padding-inline: 1.375rem;
484
- }
485
-
486
- /* ─── Icon padding accommodation ─────────────────────────────────────────── */
487
- /* .prefix / .suffix shift the input's inline padding to make room for icons. */
488
- .field.prefix > :is(input, textarea, select) {
489
- padding-inline-start: 2.9375rem;
490
- }
491
- .field.prefix > :is(input, textarea, select):focus {
492
- padding-inline-start: 2.875rem;
493
- }
494
- .field.suffix > :is(input, textarea, select) {
495
- padding-inline-end: 2.9375rem;
496
- }
497
- .field.suffix > :is(input, textarea, select):focus {
498
- padding-inline-end: 2.875rem;
499
- }
500
-
501
- /* ─── Underline (non-border, non-round) bottom border ─────────────────────── */
502
- /* Default M3 filled field style: only the bottom border is visible. */
503
- .field:not(.border, [class*='round']) > :is(input, textarea, select) {
504
- border-block-end-color: var(--outline);
505
- }
506
- .field:not(.border, [class*='round']) > :is(input, textarea, select):focus {
507
- border-block-end-color: var(--primary);
508
- }
509
-
510
- /* Round non-bordered fields get a subtle elevation shadow instead of a border. */
511
- .field[class*='round']:not(.border, .fill) > :is(input, textarea, select),
512
- .field[class*='round']:not(.border) > :is(input, textarea, select):focus {
513
- box-shadow: var(--elevate1);
514
- }
515
- .field[class*='round']:not(.border, .fill) > :is(input, textarea, select):focus {
516
- box-shadow: var(--elevate2);
517
- }
518
-
519
- /* ─── Invalid / error state borders ─────────────────────────────────────── */
520
- .field.invalid:not(.border, [class*='round']) > :is(input, textarea, select),
521
- .field.invalid:not(.border, [class*='round']) > :is(input, textarea, select):focus {
522
- border-block-end-color: var(--error);
523
- }
524
- .field.invalid.border > :is(input, textarea, select),
525
- .field.invalid.border > :is(input, textarea, select):focus {
526
- border-color: var(--error);
527
- }
528
-
529
- /* ─── Disabled state ─────────────────────────────────────────────────────── */
530
- /* Reduces opacity on the entire field container when the native control is
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
- .field:has(> :disabled) {
533
- opacity: 0.5;
534
- cursor: not-allowed;
535
- }
536
- .field > :disabled {
537
- cursor: not-allowed;
538
- }
539
-
540
- /* ─── Select element ─────────────────────────────────────────────────────── */
541
- /* Remove browser-native select appearance; the component renders its own dropdown. */
542
- .field > select {
543
- user-select: none;
544
- appearance: none;
545
- -webkit-appearance: none;
546
- background-image: none;
547
- }
548
-
549
- /* ─── Block-start padding for label accommodation ────────────────────────── */
550
- /* Inputs with a floating label need top padding to create space for the
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
- .field > :is(input, select) {
553
- padding-block-start: 1rem;
554
- }
555
- /* No-label and border+fill fields: remove the top padding offset. */
556
- .field:not(.label) > :is(input, select),
557
- .field.border:not(.fill) > :is(input, select) {
558
- padding-block-start: 0;
559
- }
560
- /* Textareas use the --_start token to align with the label baseline. */
561
- .field > textarea {
562
- padding-block-start: var(--_start) !important;
563
- }
564
- .field > textarea:focus {
565
- /* 0.01rem compensates for the border width increase on focus. */
566
- padding-block-start: calc(var(--_start, 0) - 0.01rem) !important;
567
- }
568
- .field:not(.label) > textarea,
569
- .field.border:not(.fill) > textarea {
570
- padding-block-start: calc(var(--_start, 0) - 0.5rem) !important;
571
- }
572
- .field:not(.label) > textarea:focus,
573
- .field.border:not(.fill) > textarea:focus {
574
- padding-block-start: calc(var(--_start, 0) - 0.51rem) !important;
575
- }
576
-
577
- /* ─── Floating label ─────────────────────────────────────────────────────── */
578
- /* The label starts at full font-size (1rem) vertically centered in the field.
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
- .field.label > label {
582
- --_start: 1rem;
583
- position: absolute;
584
- inset: -0.5rem 0.9375rem 0 var(--_start);
585
- display: flex;
586
- /* Full height + 1rem (for label overhang) centers the label vertically. */
587
- block-size: calc(var(--_input, 0) + 1rem);
588
- line-height: calc(var(--_input, 0) + 1rem);
589
- font-size: 1rem;
590
- transition: all 0.2s;
591
- gap: 0.25rem;
592
- white-space: nowrap;
593
- /* The label is purely decorative from a layout perspective; it must never
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
- pointer-events: none;
596
- color: var(--on-surface-variant);
597
- }
598
+ pointer-events: none;
599
+ color: var(--on-surface-variant);
600
+ }
598
601
 
599
- /* Round fields: label aligns with the increased inline padding. */
600
- .field.label[class*='round'] > label {
601
- inset: -0.5rem 1.9375rem 0 var(--_start);
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
- /* ─── Label lift selector group ──────────────────────────────────────────── */
605
- /* The label lifts (scales down + moves up) in four conditions:
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
- /* Border + prefix + no-fill variant needs a reduced --_start offset. */
613
- .field.label.border.prefix:not(.fill)
614
- > :is(
615
- label.active,
616
- :focus + label,
617
- [placeholder]:not(:placeholder-shown) + label,
618
- select + label,
619
- input.active + label
620
- ) {
621
- --_start: 1rem;
622
- }
623
-
624
- /* Round field label and round border prefix field label override. */
625
- .field.label[class*='round'] > label,
626
- .field.label.border.prefix[class*='round']:not(.fill)
627
- > :is(
628
- label.active,
629
- :focus + label,
630
- [placeholder]:not(:placeholder-shown) + label,
631
- select + label,
632
- input.active + label
633
- ) {
634
- --_start: 1.5rem;
635
- }
636
- /* Compact rounding keeps the label closer to the edge than pill fields.
637
- This must follow the generic [class*='round'] rule. */
638
- .field.label.small-round > label {
639
- --_start: 1rem;
640
- inset: -0.5rem 0.9375rem 0 var(--_start);
641
- }
642
-
643
- /* Prefix fields: shift the label's inline-start to clear the leading icon. */
644
- .field.label.prefix > label {
645
- --_start: 3rem;
646
- }
647
-
648
- /* Lifted label: shrinks to 0.75rem and collapses to the top of the field. */
649
- .field.label
650
- > :is(
651
- label.active,
652
- :focus + label,
653
- [placeholder]:not(:placeholder-shown) + label,
654
- select + label,
655
- input.active + label
656
- ) {
657
- block-size: 2.5rem;
658
- line-height: 2.5rem;
659
- font-size: 0.75rem;
660
- }
661
-
662
- /* Border variant: label collapses to 1rem height with a notch cut effect. */
663
- .field.label.border:not(.fill)
664
- > :is(
665
- label.active,
666
- :focus + label,
667
- [placeholder]:not(:placeholder-shown) + label,
668
- select + label,
669
- input.active + label
670
- ) {
671
- block-size: 1rem;
672
- line-height: 1rem;
673
- }
674
-
675
- /* ─── Border notch (label gap in the top border) ─────────────────────────── */
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
- .field.label.border:not(.fill) > label::after {
679
- content: '';
680
- display: block;
681
- margin: 0.5rem 0 0 0;
682
- border-block-start: 0.0625rem solid var(--outline);
683
- block-size: 1rem;
684
- transition: none;
685
- flex: auto;
686
- }
687
- .field.label.border:not(.fill) > :focus + label::after {
688
- /* On focus, the notch line becomes primary-colored. */
689
- border-block-start: 0.125rem solid var(--primary);
690
- }
691
-
692
- /* ─── Border notch clipping (clip-path) ──────────────────────────────────── */
693
- /* When the label is lifted, a clip-path cuts a gap in the top border of the
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
- .field.label.border.square:not(.fill)
697
- > :is(input, textarea):is(:focus, [placeholder]:not(:placeholder-shown), .active),
698
- .field.label.border.square:not(.fill) > select,
699
- .field.label.border.square:not(.fill) > input.active,
700
- .field.label.border.square:not(.fill) > select.active {
701
- clip-path: polygon(-2% -2%,.75rem -2%,.75rem .5rem,calc(100% - 1rem) .5rem,calc(100% - 1rem) -2%,102% -2%,102% 102%,-2% 102%);
702
- }
703
-
704
- /* Prefix variant: clip starts further right to clear the leading icon text. */
705
- .field.label.border.prefix.square:not(.fill)
706
- > :is(input, textarea):is(:focus, [placeholder]:not(:placeholder-shown), .active),
707
- .field.label.border.prefix.square:not(.fill) > select,
708
- .field.label.border.prefix.square:not(.fill) > input.active,
709
- .field.label.border.prefix.square:not(.fill) > select.active {
710
- clip-path: polygon(-2% -2%,.75rem -2%,.75rem .5rem,calc(100% - 1rem) .5rem,calc(100% - 1rem) -2%,102% -2%,102% 102%,-2% 102%);
711
- }
712
-
713
- /* Round and square border fields use a wider notch to clear the curved border. */
714
- .field.label.border[class*='round']:not(.fill)
715
- > :is(input, textarea):is(:focus, [placeholder]:not(:placeholder-shown), .active),
716
- .field.label.border[class*='round']:not(.fill) > select,
717
- .field.label.border:not(.fill)
718
- > :is(input, textarea):is(:focus, [placeholder]:not(:placeholder-shown), .active),
719
- .field.label.border:not(.fill) > select {
720
- clip-path: polygon(-2% -2%,0.75rem -2%,0.75rem 0.5rem,calc(100% - 1rem) 0.5rem,calc(100% - 1rem) -2%,102% -2%,102% 102%,-2% 102%);
721
- }
722
-
723
- .field.label.border.prefix[class*='round']:not(.fill)
724
- > :is(input, textarea):is(:focus, [placeholder]:not(:placeholder-shown), .active),
725
- .field.label.border.prefix[class*='round']:not(.fill) > select,
726
- .field.label.border.prefix:not(.fill)
727
- > :is(input, textarea):is(:focus, [placeholder]:not(:placeholder-shown), .active),
728
- .field.label.border.prefix:not(.fill) > select {
729
- clip-path: polygon(-2% -2%,0.75rem -2%,0.75rem 0.5rem,calc(100% - 1rem) 0.5rem,calc(100% - 1rem) -2%,102% -2%,102% 102%,-2% 102%);
730
- }
731
-
732
- .field.label.border.round:not(.fill)
733
- > :is(input, textarea):is(:focus, [placeholder]:not(:placeholder-shown), .active),
734
- .field.label.border.round:not(.fill) > select,
735
- .field.label.border.round:not(.fill) > input.active,
736
- .field.label.border.round:not(.fill) > select.active {
737
- clip-path: polygon(-2% -2%,1.25rem -2%,1.25rem 0.5rem,calc(100% - 2rem) 0.5rem,calc(100% - 2rem) -2%,102% -2%,102% 102%,-2% 102%) !important;
738
- }
739
-
740
- /* The compact shape needs a narrower leading segment so it never crosses
741
- the first glyph of the floating label. */
742
- .field.label.border.small-round:not(.fill)
743
- > :is(input, textarea):is(:focus, [placeholder]:not(:placeholder-shown), .active),
744
- .field.label.border.small-round:not(.fill) > select,
745
- .field.label.border.small-round:not(.fill) > input.active,
746
- .field.label.border.small-round:not(.fill) > select.active {
747
- clip-path: polygon(-2% -2%,0.75rem -2%,0.75rem 0.5rem,calc(100% - 1rem) 0.5rem,calc(100% - 1rem) -2%,102% -2%,102% 102%,-2% 102%) !important;
748
- }
749
-
750
- /* ─── Label color changes ─────────────────────────────────────────────────── */
751
- /* On focus: label turns primary-colored to draw attention. */
752
- .field.label > :focus + label {
753
- color: var(--primary);
754
- }
755
-
756
- /* On error: label and notch line turn error-colored. */
757
- .field.label.invalid > label,
758
- .field.label.invalid > label::after {
759
- color: var(--error) !important;
760
- border-color: var(--error) !important;
761
- }
762
-
763
- /* ─── Helper / error output ──────────────────────────────────────────────── */
764
- /* The <output> element below the field shows helper text or validation errors. */
765
- .field > output {
766
- display: inline-block;
767
- font-size: 0.75rem;
768
- background: none !important;
769
- padding: 0.25rem 1rem;
770
- line-height: 1.25rem;
771
- align-self: start;
772
- color: var(--on-surface-variant);
773
- }
774
- /* Error output overrides the neutral helper color. */
775
- .field > output.invalid {
776
- color: var(--error) !important;
777
- }
778
- /* Round fields: increase horizontal padding to align with the curved edge. */
779
- .field[class*='round'] > output {
780
- padding: 0.25rem 1.5rem;
781
- }
782
- /* Show only one output at a time: helper OR error, never both. */
783
- .field.invalid > output:not(.invalid),
784
- .field:not(.invalid) > output.invalid {
785
- display: none;
786
- }
787
-
788
- /* ─── Footer wrapper (textarea & multi-line fields) ───────────────────────── */
789
- /* Lays out helper text (left) and character counter (right) on the same row,
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
- .field > .footer {
792
- display: flex;
793
- align-items: center;
794
- justify-content: space-between;
795
- gap: 1rem;
796
- padding: 0;
797
- min-block-size: 1.25rem;
798
- }
799
- .field > .footer > output {
800
- display: inline-block;
801
- font-size: 0.75rem;
802
- background: none !important;
803
- padding: 0.25rem 1rem;
804
- line-height: 1.25rem;
805
- align-self: center;
806
- color: var(--on-surface-variant);
807
- }
808
- .field > .footer > output.invalid {
809
- color: var(--error) !important;
810
- }
811
- /* Character counter — right-aligned, same typographic style as the helper. */
812
- .field > .footer > .counter {
813
- padding: 0.25rem 1rem;
814
- color: var(--on-surface-variant);
815
- }
816
- /* Spacer pushes counter to the right when there is no helper text. */
817
- .field > .footer > .spacer {
818
- flex: 1;
819
- }
820
- /* Same exclusive show logic as direct <output> elements. */
821
- .field.invalid > .footer > output:not(.invalid),
822
- .field:not(.invalid) > .footer > output.invalid {
823
- display: none;
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};