@moni-labs/moni-ui 0.4.8 → 0.4.10

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 (90) hide show
  1. package/custom-elements.json +3 -3
  2. package/dist/browser/moni-ui.iife.min.js +25 -3
  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 +25 -0
  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-EVPcxmRq.js → class-map-DVIPqVv8.js} +1 -1
  11. package/dist/cdn/chunks/{decorate-D4jKxi6H.js → decorate-B_60A6SM.js} +22 -0
  12. package/dist/cdn/chunks/if-defined-35Uf60Gp.js +1 -0
  13. package/dist/cdn/chunks/{live-DdUrWiUp.js → live-0xU7YMoc.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 +1 -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 +1 -1
  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 +2 -2
  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 +2 -2
  58. package/dist/cdn/components/moni-textarea.js +2 -2
  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 +22 -0
  66. package/dist/components/moni-select.d.ts +2 -2
  67. package/dist/components/moni-select.d.ts.map +1 -1
  68. package/dist/components/moni-select.js +2 -1
  69. package/dist/components/moni-text-field.d.ts +2 -2
  70. package/dist/components/moni-text-field.d.ts.map +1 -1
  71. package/dist/components/moni-text-field.js +2 -1
  72. package/dist/components/moni-textarea.d.ts +2 -2
  73. package/dist/components/moni-textarea.d.ts.map +1 -1
  74. package/dist/components/moni-textarea.js +2 -1
  75. package/docs/api.json +7 -4
  76. package/docs/assets/moni-select/shape--small-round.png +0 -0
  77. package/docs/assets/moni-text-field/shape--small-round.png +0 -0
  78. package/docs/assets/moni-textarea/shape--small-round.png +0 -0
  79. package/docs/components/select.md +3 -1
  80. package/docs/components/text-field.md +3 -1
  81. package/docs/components/textarea.md +3 -1
  82. package/package.json +1 -1
  83. package/src/components/_base/field-styles.ts +22 -0
  84. package/src/components/moni-select.test.ts +8 -0
  85. package/src/components/moni-select.ts +3 -2
  86. package/src/components/moni-text-field.test.ts +8 -0
  87. package/src/components/moni-text-field.ts +3 -2
  88. package/src/components/moni-textarea.test.ts +8 -0
  89. package/src/components/moni-textarea.ts +3 -2
  90. package/dist/cdn/chunks/if-defined-DlAUOFi9.js +0 -1
@@ -1013,6 +1013,13 @@ var H = class extends Le {
1013
1013
  .field[class*='round'].extra {
1014
1014
  border-radius: 2rem;
1015
1015
  }
1016
+ /* Compact rounding for dense forms without falling back to square corners. */
1017
+ .field.small-round,
1018
+ .field.small-round.small,
1019
+ .field.small-round.large,
1020
+ .field.small-round.extra {
1021
+ border-radius: 0.5rem;
1022
+ }
1016
1023
 
1017
1024
  /* ─── Icon positioning ───────────────────────────────────────────────────── */
1018
1025
  /* Generic rule: absolutely positions any icon/image/svg inside the field. */
@@ -1273,6 +1280,11 @@ var H = class extends Le {
1273
1280
  .field.label[class*='round'] > label {
1274
1281
  inset: -0.5rem 1.9375rem 0 var(--_start);
1275
1282
  }
1283
+ /* Compact rounding keeps the label closer to the edge than pill fields. */
1284
+ .field.label.small-round > label {
1285
+ --_start: 1rem;
1286
+ inset: -0.5rem 0.9375rem 0 var(--_start);
1287
+ }
1276
1288
 
1277
1289
  /* ─── Label lift selector group ──────────────────────────────────────────── */
1278
1290
  /* The label lifts (scales down + moves up) in four conditions:
@@ -1396,6 +1408,16 @@ var H = class extends Le {
1396
1408
  clip-path: polygon(-2% -2%,1.25rem -2%,1.25rem .5rem,calc(100% - 2rem) .5rem,calc(100% - 2rem) -2%,102% -2%,102% 102%,-2% 102%);
1397
1409
  }
1398
1410
 
1411
+ /* The compact shape needs a narrower leading segment so it never crosses
1412
+ the first glyph of the floating label. */
1413
+ .field.label.border.small-round:not(.fill)
1414
+ > :is(input, textarea):is(:focus, [placeholder]:not(:placeholder-shown), .active),
1415
+ .field.label.border.small-round:not(.fill) > select,
1416
+ .field.label.border.small-round:not(.fill) > input.active,
1417
+ .field.label.border.small-round:not(.fill) > select.active {
1418
+ clip-path: polygon(-2% -2%,.75rem -2%,.75rem .5rem,calc(100% - 1rem) .5rem,calc(100% - 1rem) -2%,102% -2%,102% 102%,-2% 102%);
1419
+ }
1420
+
1399
1421
  /* ─── Label color changes ─────────────────────────────────────────────────── */
1400
1422
  /* On focus: label turns primary-colored to draw attention. */
1401
1423
  .field.label > :focus + label {
@@ -6835,6 +6857,7 @@ var K = class extends H {
6835
6857
  suffix: !0,
6836
6858
  invalid: this.error,
6837
6859
  round: this.shape === "round",
6860
+ "small-round": this.shape === "small-round",
6838
6861
  square: this.shape === "no-round"
6839
6862
  }, o = this.icon ? L`<i class="leading-icon" part="leading-icon"
6840
6863
  ><moni-icon name="${this.icon}"></moni-icon
@@ -8069,6 +8092,7 @@ var q = class extends H {
8069
8092
  suffix: t,
8070
8093
  invalid: this.error,
8071
8094
  round: this.shape === "round",
8095
+ "small-round": this.shape === "small-round",
8072
8096
  square: this.shape === "no-round"
8073
8097
  }, a = this.placeholder || (this.label ? " " : ""), o = this.icon ? L`<i class="leading-icon" part="leading-icon"
8074
8098
  ><moni-icon name="${this.icon}"></moni-icon
@@ -11311,6 +11335,7 @@ var Rt = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
11311
11335
  "suffix-action-field": !!this.suffixButtonIcon || this._hasSuffixSlot,
11312
11336
  invalid: this.error,
11313
11337
  round: this.shape === "round" && this.variant !== "underlined",
11338
+ "small-round": this.shape === "small-round" && this.variant !== "underlined",
11314
11339
  square: this.shape === "no-round"
11315
11340
  }, i = this.placeholder || (this.label ? " " : ""), a = this.icon ? L`<i class="leading-icon" part="leading-icon"
11316
11341
  ><moni-icon name="${this.icon}"></moni-icon
Binary file
Binary file