@ptsecurity/mosaic 15.6.0 → 15.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (217) hide show
  1. package/_theming.scss +140 -4
  2. package/_visual.scss +2 -0
  3. package/autocomplete/autocomplete-trigger.directive.d.ts +5 -15
  4. package/checkbox/_checkbox-theme.scss +4 -0
  5. package/checkbox/checkbox.scss +4 -7
  6. package/core/formatters/index.d.ts +1 -1
  7. package/core/formatters/number/formatter.d.ts +25 -0
  8. package/core/forms/_forms-theme.scss +112 -0
  9. package/core/locales/en-US.d.ts +1 -2
  10. package/core/locales/es-LA.d.ts +9 -0
  11. package/core/locales/fa-IR.d.ts +9 -0
  12. package/core/locales/index.d.ts +0 -2
  13. package/core/locales/locale-service.d.ts +39 -5
  14. package/core/locales/pt-BR.d.ts +9 -0
  15. package/core/locales/ru-RU.d.ts +1 -2
  16. package/core/locales/zh-CN.d.ts +9 -0
  17. package/core/option/option.d.ts +36 -7
  18. package/core/overlay/overlay-position-map.d.ts +7 -1
  19. package/core/pop-up/pop-up.d.ts +3 -0
  20. package/core/selection/pseudo-checkbox/pseudo-checkbox.scss +3 -5
  21. package/core/styles/_core.scss +0 -1
  22. package/core/styles/_variables.scss +1 -0
  23. package/core/styles/theming/_scrollbars.scss +9 -3
  24. package/core/styles/theming/_theming.scss +1 -0
  25. package/datepicker/calendar-header.component.d.ts +8 -2
  26. package/datepicker/calendar.component.d.ts +3 -4
  27. package/datepicker/month-view.component.d.ts +3 -4
  28. package/esm2020/autocomplete/autocomplete-trigger.directive.mjs +27 -24
  29. package/esm2020/button/button.component.mjs +6 -3
  30. package/esm2020/checkbox/checkbox.mjs +2 -2
  31. package/esm2020/code-block/actionbar.component.mjs +1 -1
  32. package/esm2020/core/formatters/index.mjs +9 -4
  33. package/esm2020/core/formatters/number/formatter.mjs +90 -1
  34. package/esm2020/core/locales/en-US.mjs +3 -4
  35. package/esm2020/core/locales/es-LA.mjs +11 -2
  36. package/esm2020/core/locales/fa-IR.mjs +11 -2
  37. package/esm2020/core/locales/index.mjs +1 -3
  38. package/esm2020/core/locales/locale-service.mjs +4 -4
  39. package/esm2020/core/locales/pt-BR.mjs +11 -2
  40. package/esm2020/core/locales/ru-RU.mjs +3 -4
  41. package/esm2020/core/locales/zh-CN.mjs +11 -2
  42. package/esm2020/core/option/option.mjs +43 -7
  43. package/esm2020/core/overlay/overlay-position-map.mjs +7 -1
  44. package/esm2020/core/pop-up/pop-up.mjs +1 -1
  45. package/esm2020/core/selection/pseudo-checkbox/pseudo-checkbox.mjs +2 -2
  46. package/esm2020/core/version.mjs +2 -2
  47. package/esm2020/datepicker/calendar-header.component.mjs +8 -7
  48. package/esm2020/datepicker/calendar.component.mjs +5 -14
  49. package/esm2020/datepicker/datepicker-input.directive.mjs +7 -6
  50. package/esm2020/datepicker/month-view.component.mjs +6 -15
  51. package/esm2020/dropdown/dropdown-trigger.directive.mjs +3 -2
  52. package/esm2020/file-upload/file-drop.mjs +40 -3
  53. package/esm2020/file-upload/file-upload.mjs +1 -1
  54. package/esm2020/file-upload/multiple-file-upload.component.mjs +11 -7
  55. package/esm2020/file-upload/single-file-upload.component.mjs +10 -6
  56. package/esm2020/form-field/form-field.mjs +2 -2
  57. package/esm2020/form-field/validate.directive.mjs +9 -3
  58. package/esm2020/loader-overlay/loader-overlay.component.mjs +2 -2
  59. package/esm2020/modal/modal.component.mjs +7 -11
  60. package/esm2020/modal/modal.module.mjs +8 -4
  61. package/esm2020/navbar/navbar.component.mjs +20 -10
  62. package/esm2020/navbar/vertical-navbar.animation.mjs +2 -2
  63. package/esm2020/navbar/vertical-navbar.component.mjs +11 -7
  64. package/esm2020/popover/popover.component.mjs +2 -2
  65. package/esm2020/select/select-option.directive.mjs +15 -3
  66. package/esm2020/select/select.component.mjs +49 -22
  67. package/esm2020/tabs/tab-group.component.mjs +1 -1
  68. package/esm2020/tabs/tab.component.mjs +13 -4
  69. package/esm2020/tags/tag-list.component.mjs +5 -4
  70. package/esm2020/timezone/timezone-select.component.mjs +3 -3
  71. package/esm2020/title/title.directive.mjs +2 -2
  72. package/esm2020/toast/toast-animations.mjs +2 -1
  73. package/esm2020/toast/toast-container.component.mjs +21 -7
  74. package/esm2020/toast/toast.component.mjs +7 -2
  75. package/esm2020/toast/toast.module.mjs +10 -4
  76. package/esm2020/toast/toast.service.mjs +2 -1
  77. package/esm2020/toggle/toggle.component.mjs +3 -3
  78. package/esm2020/tooltip/tooltip.component.mjs +16 -4
  79. package/esm2020/tree/control/base-tree-control.mjs +1 -1
  80. package/esm2020/tree/control/flat-tree-control.filters.mjs +46 -0
  81. package/esm2020/tree/control/flat-tree-control.mjs +26 -44
  82. package/esm2020/tree/control/tree-control.mjs +1 -1
  83. package/esm2020/tree/padding.directive.mjs +2 -2
  84. package/esm2020/tree/public-api.mjs +2 -1
  85. package/esm2020/tree/toggle.mjs +2 -4
  86. package/esm2020/tree/tree-option.component.mjs +6 -3
  87. package/esm2020/tree/tree-selection.component.mjs +6 -5
  88. package/esm2020/tree-select/tree-select.component.mjs +28 -12
  89. package/esm2020/tree-select/tree-select.module.mjs +6 -6
  90. package/fesm2015/ptsecurity-mosaic-autocomplete.mjs +30 -24
  91. package/fesm2015/ptsecurity-mosaic-autocomplete.mjs.map +1 -1
  92. package/fesm2015/ptsecurity-mosaic-button.mjs +5 -2
  93. package/fesm2015/ptsecurity-mosaic-button.mjs.map +1 -1
  94. package/fesm2015/ptsecurity-mosaic-checkbox.mjs +2 -2
  95. package/fesm2015/ptsecurity-mosaic-checkbox.mjs.map +1 -1
  96. package/fesm2015/ptsecurity-mosaic-code-block.mjs +1 -1
  97. package/fesm2015/ptsecurity-mosaic-code-block.mjs.map +1 -1
  98. package/fesm2015/ptsecurity-mosaic-core.mjs +196 -31
  99. package/fesm2015/ptsecurity-mosaic-core.mjs.map +1 -1
  100. package/fesm2015/ptsecurity-mosaic-datepicker.mjs +20 -36
  101. package/fesm2015/ptsecurity-mosaic-datepicker.mjs.map +1 -1
  102. package/fesm2015/ptsecurity-mosaic-dropdown.mjs +2 -1
  103. package/fesm2015/ptsecurity-mosaic-dropdown.mjs.map +1 -1
  104. package/fesm2015/ptsecurity-mosaic-file-upload.mjs +57 -11
  105. package/fesm2015/ptsecurity-mosaic-file-upload.mjs.map +1 -1
  106. package/fesm2015/ptsecurity-mosaic-form-field.mjs +10 -3
  107. package/fesm2015/ptsecurity-mosaic-form-field.mjs.map +1 -1
  108. package/fesm2015/ptsecurity-mosaic-loader-overlay.mjs +2 -2
  109. package/fesm2015/ptsecurity-mosaic-loader-overlay.mjs.map +1 -1
  110. package/fesm2015/ptsecurity-mosaic-modal.mjs +12 -12
  111. package/fesm2015/ptsecurity-mosaic-modal.mjs.map +1 -1
  112. package/fesm2015/ptsecurity-mosaic-navbar.mjs +28 -18
  113. package/fesm2015/ptsecurity-mosaic-navbar.mjs.map +1 -1
  114. package/fesm2015/ptsecurity-mosaic-popover.mjs +1 -1
  115. package/fesm2015/ptsecurity-mosaic-popover.mjs.map +1 -1
  116. package/fesm2015/ptsecurity-mosaic-select.mjs +64 -24
  117. package/fesm2015/ptsecurity-mosaic-select.mjs.map +1 -1
  118. package/fesm2015/ptsecurity-mosaic-tabs.mjs +13 -4
  119. package/fesm2015/ptsecurity-mosaic-tabs.mjs.map +1 -1
  120. package/fesm2015/ptsecurity-mosaic-tags.mjs +4 -3
  121. package/fesm2015/ptsecurity-mosaic-tags.mjs.map +1 -1
  122. package/fesm2015/ptsecurity-mosaic-timezone.mjs +2 -2
  123. package/fesm2015/ptsecurity-mosaic-timezone.mjs.map +1 -1
  124. package/fesm2015/ptsecurity-mosaic-title.mjs +1 -1
  125. package/fesm2015/ptsecurity-mosaic-title.mjs.map +1 -1
  126. package/fesm2015/ptsecurity-mosaic-toast.mjs +35 -10
  127. package/fesm2015/ptsecurity-mosaic-toast.mjs.map +1 -1
  128. package/fesm2015/ptsecurity-mosaic-toggle.mjs +2 -2
  129. package/fesm2015/ptsecurity-mosaic-toggle.mjs.map +1 -1
  130. package/fesm2015/ptsecurity-mosaic-tooltip.mjs +15 -3
  131. package/fesm2015/ptsecurity-mosaic-tooltip.mjs.map +1 -1
  132. package/fesm2015/ptsecurity-mosaic-tree-select.mjs +33 -16
  133. package/fesm2015/ptsecurity-mosaic-tree-select.mjs.map +1 -1
  134. package/fesm2015/ptsecurity-mosaic-tree.mjs +85 -54
  135. package/fesm2015/ptsecurity-mosaic-tree.mjs.map +1 -1
  136. package/fesm2020/ptsecurity-mosaic-autocomplete.mjs +27 -24
  137. package/fesm2020/ptsecurity-mosaic-autocomplete.mjs.map +1 -1
  138. package/fesm2020/ptsecurity-mosaic-button.mjs +5 -2
  139. package/fesm2020/ptsecurity-mosaic-button.mjs.map +1 -1
  140. package/fesm2020/ptsecurity-mosaic-checkbox.mjs +2 -2
  141. package/fesm2020/ptsecurity-mosaic-checkbox.mjs.map +1 -1
  142. package/fesm2020/ptsecurity-mosaic-code-block.mjs +1 -1
  143. package/fesm2020/ptsecurity-mosaic-code-block.mjs.map +1 -1
  144. package/fesm2020/ptsecurity-mosaic-core.mjs +196 -30
  145. package/fesm2020/ptsecurity-mosaic-core.mjs.map +1 -1
  146. package/fesm2020/ptsecurity-mosaic-datepicker.mjs +20 -36
  147. package/fesm2020/ptsecurity-mosaic-datepicker.mjs.map +1 -1
  148. package/fesm2020/ptsecurity-mosaic-dropdown.mjs +2 -1
  149. package/fesm2020/ptsecurity-mosaic-dropdown.mjs.map +1 -1
  150. package/fesm2020/ptsecurity-mosaic-file-upload.mjs +56 -11
  151. package/fesm2020/ptsecurity-mosaic-file-upload.mjs.map +1 -1
  152. package/fesm2020/ptsecurity-mosaic-form-field.mjs +10 -4
  153. package/fesm2020/ptsecurity-mosaic-form-field.mjs.map +1 -1
  154. package/fesm2020/ptsecurity-mosaic-loader-overlay.mjs +2 -2
  155. package/fesm2020/ptsecurity-mosaic-loader-overlay.mjs.map +1 -1
  156. package/fesm2020/ptsecurity-mosaic-modal.mjs +11 -11
  157. package/fesm2020/ptsecurity-mosaic-modal.mjs.map +1 -1
  158. package/fesm2020/ptsecurity-mosaic-navbar.mjs +28 -18
  159. package/fesm2020/ptsecurity-mosaic-navbar.mjs.map +1 -1
  160. package/fesm2020/ptsecurity-mosaic-popover.mjs +1 -1
  161. package/fesm2020/ptsecurity-mosaic-popover.mjs.map +1 -1
  162. package/fesm2020/ptsecurity-mosaic-select.mjs +62 -23
  163. package/fesm2020/ptsecurity-mosaic-select.mjs.map +1 -1
  164. package/fesm2020/ptsecurity-mosaic-tabs.mjs +13 -4
  165. package/fesm2020/ptsecurity-mosaic-tabs.mjs.map +1 -1
  166. package/fesm2020/ptsecurity-mosaic-tags.mjs +4 -3
  167. package/fesm2020/ptsecurity-mosaic-tags.mjs.map +1 -1
  168. package/fesm2020/ptsecurity-mosaic-timezone.mjs +2 -2
  169. package/fesm2020/ptsecurity-mosaic-timezone.mjs.map +1 -1
  170. package/fesm2020/ptsecurity-mosaic-title.mjs +1 -1
  171. package/fesm2020/ptsecurity-mosaic-title.mjs.map +1 -1
  172. package/fesm2020/ptsecurity-mosaic-toast.mjs +33 -10
  173. package/fesm2020/ptsecurity-mosaic-toast.mjs.map +1 -1
  174. package/fesm2020/ptsecurity-mosaic-toggle.mjs +2 -2
  175. package/fesm2020/ptsecurity-mosaic-toggle.mjs.map +1 -1
  176. package/fesm2020/ptsecurity-mosaic-tooltip.mjs +15 -3
  177. package/fesm2020/ptsecurity-mosaic-tooltip.mjs.map +1 -1
  178. package/fesm2020/ptsecurity-mosaic-tree-select.mjs +32 -16
  179. package/fesm2020/ptsecurity-mosaic-tree-select.mjs.map +1 -1
  180. package/fesm2020/ptsecurity-mosaic-tree.mjs +84 -54
  181. package/fesm2020/ptsecurity-mosaic-tree.mjs.map +1 -1
  182. package/file-upload/file-drop.d.ts +2 -1
  183. package/file-upload/file-upload.d.ts +4 -1
  184. package/file-upload/multiple-file-upload.component.d.ts +6 -5
  185. package/file-upload/single-file-upload.component.d.ts +6 -5
  186. package/form-field/_form-field-theme.scss +4 -0
  187. package/form-field/form-field.scss +0 -2
  188. package/loader-overlay/loader-overlay.scss +3 -0
  189. package/modal/modal.module.d.ts +2 -1
  190. package/modal/modal.scss +14 -2
  191. package/navbar/navbar.component.d.ts +5 -2
  192. package/navbar/vertical-navbar.component.d.ts +4 -2
  193. package/package.json +4 -7
  194. package/prebuilt-themes/dark-theme.css +1 -1
  195. package/prebuilt-themes/default-theme.css +1 -1
  196. package/prebuilt-visual/default-visual.css +1 -1
  197. package/radio/_radio-theme.scss +4 -0
  198. package/select/select-option.directive.d.ts +2 -0
  199. package/select/select.component.d.ts +15 -11
  200. package/select/select.scss +5 -1
  201. package/tags/tag-list.scss +4 -0
  202. package/toast/toast-animations.d.ts +1 -0
  203. package/toast/toast-container.component.d.ts +7 -3
  204. package/toast/toast.component.d.ts +2 -0
  205. package/toast/toast.service.d.ts +2 -0
  206. package/toggle/_toggle-theme.scss +13 -1
  207. package/toggle/toggle.scss +6 -2
  208. package/tooltip/tooltip.component.d.ts +4 -1
  209. package/tree/control/base-tree-control.d.ts +1 -1
  210. package/tree/control/flat-tree-control.d.ts +5 -3
  211. package/tree/control/flat-tree-control.filters.d.ts +26 -0
  212. package/tree/control/tree-control.d.ts +1 -1
  213. package/tree/public-api.d.ts +1 -0
  214. package/tree/tree-option.scss +4 -2
  215. package/tree-select/tree-select.component.d.ts +9 -3
  216. package/tree-select/tree-select.module.d.ts +1 -1
  217. package/core/forms/_forms.scss +0 -109
package/_theming.scss CHANGED
@@ -139,6 +139,7 @@ $light-color-scheme-foreground-text: #19252f;
139
139
  $light-color-scheme-foreground-text-less-contrast: #6d7a86;
140
140
  $light-color-scheme-foreground-text-disabled: #8c99a5;
141
141
  $light-color-scheme-foreground-text-error: #db3c55;
142
+ $light-color-scheme-foreground-text-warning: #a26e0c;
142
143
  $light-color-scheme-foreground-text-success: #016b37;
143
144
  $light-color-scheme-foreground-divider: #d7dee4;
144
145
  $light-color-scheme-foreground-border: #bdc7d1;
@@ -165,6 +166,7 @@ $dark-color-scheme-foreground-text: #d7dee4;
165
166
  $dark-color-scheme-foreground-text-less-contrast: #8c99a5;
166
167
  $dark-color-scheme-foreground-text-disabled: #6d7a86;
167
168
  $dark-color-scheme-foreground-text-error: #ee6f79;
169
+ $dark-color-scheme-foreground-text-warning: #e19f12;
168
170
  $dark-color-scheme-foreground-text-success: #4ba96c;
169
171
  $dark-color-scheme-foreground-divider: mix(#515e69, transparent, 50%);
170
172
  $dark-color-scheme-foreground-border: #515e69;
@@ -6020,6 +6022,7 @@ $light-warning: mc-palette($light-color-scheme-warning-palette, $light-color-sch
6020
6022
  text-disabled: $light-color-scheme-foreground-text-disabled,
6021
6023
  text-error: $light-color-scheme-foreground-text-error,
6022
6024
  text-success: $light-color-scheme-foreground-text-success,
6025
+ text-warning: $light-color-scheme-foreground-text-warning,
6023
6026
 
6024
6027
  divider: $light-color-scheme-foreground-divider,
6025
6028
  border: $light-color-scheme-foreground-border,
@@ -6097,6 +6100,7 @@ $dark-warning: mc-palette($dark-color-scheme-warning-palette, $dark-color-scheme
6097
6100
  text-disabled: $dark-color-scheme-foreground-text-disabled,
6098
6101
  text-error: $dark-color-scheme-foreground-text-error,
6099
6102
  text-success: $dark-color-scheme-foreground-text-success,
6103
+ text-warning: $dark-color-scheme-foreground-text-warning,
6100
6104
 
6101
6105
  divider: $dark-color-scheme-foreground-divider,
6102
6106
  border: $dark-color-scheme-foreground-border,
@@ -6140,6 +6144,8 @@ $dark-warning: mc-palette($dark-color-scheme-warning-palette, $dark-color-scheme
6140
6144
  text-disabled: map-get($tokens, '#{$scheme}-foreground-text-disabled'),
6141
6145
  text-error: map-get($tokens, '#{$scheme}-foreground-text-error'),
6142
6146
  text-success: map-get($tokens, '#{$scheme}-foreground-text-success'),
6147
+ text-warning: map-get($tokens, '#{$scheme}-foreground-text-warning'),
6148
+
6143
6149
 
6144
6150
  divider: map-get($tokens, '#{$scheme}-foreground-divider'),
6145
6151
  border: map-get($tokens, '#{$scheme}-foreground-border'),
@@ -6790,7 +6796,9 @@ $dark-warning: mc-palette($dark-color-scheme-warning-palette, $dark-color-scheme
6790
6796
 
6791
6797
  .mc-scrollbar {
6792
6798
  //firefox
6793
- scrollbar-width: auto;
6799
+ @supports not selector(::-webkit-scrollbar) {
6800
+ scrollbar-width: thin;
6801
+ }
6794
6802
 
6795
6803
  // webkit
6796
6804
  &::-webkit-scrollbar,
@@ -6803,6 +6811,7 @@ $dark-warning: mc-palette($dark-color-scheme-warning-palette, $dark-color-scheme
6803
6811
  width: var(--mc-scrollbar-size-thumb-width, $scrollbar-size-thumb-width);
6804
6812
  border-width: var(--mc-scrollbar-size-thumb-inset-border-width, $scrollbar-size-thumb-border-width);
6805
6813
  border-radius: var(--mc-scrollbar-size-thumb-inset-border-radius, $scrollbar-size-thumb-border-radius);
6814
+ min-height: 20px;
6806
6815
  }
6807
6816
 
6808
6817
  &::-webkit-scrollbar-button,
@@ -6820,9 +6829,10 @@ $dark-warning: mc-palette($dark-color-scheme-warning-palette, $dark-color-scheme
6820
6829
  $arrow: map-get($scrollbar, arrow);
6821
6830
 
6822
6831
  .mc-scrollbar {
6823
-
6824
6832
  // firefox
6825
- scrollbar-color: map-get($thumb, normal) map-get($scrollbar, track);
6833
+ @supports not selector(::-webkit-scrollbar) {
6834
+ scrollbar-color: map-get($thumb, normal) map-get($scrollbar, track);
6835
+ }
6826
6836
 
6827
6837
  // webkit
6828
6838
  &::-webkit-scrollbar,
@@ -7155,6 +7165,7 @@ $dark-warning: mc-palette($dark-color-scheme-warning-palette, $dark-color-scheme
7155
7165
  > .mc-icon-button {
7156
7166
  color: map-get($button-toggle, color);
7157
7167
  border-color: map-get($button-toggle-group, border);
7168
+ background: inherit;
7158
7169
 
7159
7170
  & .mc-icon {
7160
7171
  color: map-get($button-toggle, icon);
@@ -7334,6 +7345,10 @@ $dark-warning: mc-palette($dark-color-scheme-warning-palette, $dark-color-scheme
7334
7345
  }
7335
7346
  }
7336
7347
 
7348
+ & .mc-hint {
7349
+ color: map-get($foreground, text-less-contrast);
7350
+ }
7351
+
7337
7352
  &.mc-primary {
7338
7353
  @include mc-checkbox-color(map-get($checkbox, default));
7339
7354
 
@@ -7992,6 +8007,10 @@ $mc-datepicker-today-fade-amount: 0.2;
7992
8007
  color: map-get($hint, text-color);
7993
8008
  }
7994
8009
 
8010
+ &.mc-warning {
8011
+ color: map-get($foreground, text-warning);
8012
+ }
8013
+
7995
8014
  &.mc-error {
7996
8015
  color: map-get($foreground, text-error);
7997
8016
  }
@@ -9026,6 +9045,10 @@ button {
9026
9045
  }
9027
9046
 
9028
9047
  .mc-radio-button {
9048
+ & .mc-hint {
9049
+ color: map-get($foreground, text-less-contrast);
9050
+ }
9051
+
9029
9052
  & .mc-radio-button__outer-circle {
9030
9053
  border-color: map-get($radio, outer-circle_border);
9031
9054
  background: map-get($background, background);
@@ -9796,7 +9819,11 @@ button {
9796
9819
  color: map-get($foreground, text-disabled);
9797
9820
 
9798
9821
  & .mc-toggle__overlay {
9799
- background: mc-color($background, overlay-disabled);
9822
+ background: rgba(255, 255, 255, 0.3);
9823
+ }
9824
+
9825
+ &.mc-active .mc-toggle__circle {
9826
+ background: white;
9800
9827
  }
9801
9828
  }
9802
9829
  }
@@ -9805,10 +9832,18 @@ button {
9805
9832
  @mixin mc-toggle-typography($config) {
9806
9833
  .mc-toggle:not(.mc-toggle_small) {
9807
9834
  @include mc-typography-level-to-styles($config, $toggle-font-default);
9835
+
9836
+ .mc-toggle-bar-outer-container {
9837
+ height: mc-line-height($config, $toggle-font-default);
9838
+ }
9808
9839
  }
9809
9840
 
9810
9841
  .mc-toggle.mc-toggle_small {
9811
9842
  @include mc-typography-level-to-styles($config, $toggle-small-font-default);
9843
+
9844
+ .mc-toggle-bar-outer-container {
9845
+ height: mc-line-height($config, $toggle-small-font-default);
9846
+ }
9812
9847
  }
9813
9848
  }
9814
9849
 
@@ -10217,8 +10252,109 @@ button {
10217
10252
 
10218
10253
 
10219
10254
 
10255
+ @mixin mc-form-geometry() {
10256
+ .mc-form {
10257
+ display: flex;
10258
+ flex-direction: column;
10259
+ }
10260
+
10261
+ .mc-form__row {
10262
+ display: flex;
10263
+ flex-direction: row;
10264
+ }
10265
+
10266
+ .mc-form-horizontal {
10267
+ $config: mc-typography-config();
10268
+
10269
+ $line-height: mc-line-height($config, body);
10270
+
10271
+ $label-padding-top: calc(($form-field-size-height - $line-height) / 2);
10272
+
10273
+ & .mc-form-row_margin {
10274
+ margin-bottom: var(
10275
+ --mc-forms-size-horizontal-row-margin-bottom, $forms-size-horizontal-row-margin-bottom
10276
+ );
10277
+ }
10278
+
10279
+ & .mc-form__label {
10280
+ padding-top: var(--mc-forms-size-horizontal-label-padding-top, $label-padding-top);
10281
+
10282
+ text-align: start;
10283
+ }
10284
+
10285
+ & .mc-form__control {
10286
+ padding-left: var(
10287
+ --mc-forms-size-horizontal-control-padding-left,
10288
+ $forms-size-horizontal-control-padding-left
10289
+ );
10290
+ }
10291
+
10292
+ & .mc-form__legend {
10293
+ margin-top: var(
10294
+ --mc-forms-size-horizontal-legend-margin-top, $forms-size-horizontal-legend-margin-top
10295
+ );
10296
+ margin-bottom: var(
10297
+ --mc-forms-size-horizontal-legend-margin-bottom,
10298
+ $forms-size-horizontal-legend-margin-bottom
10299
+ );
10300
+ }
10301
+ }
10302
+
10303
+ .mc-form-vertical {
10304
+ & .mc-form__row {
10305
+ flex-direction: column;
10306
+ }
10307
+
10308
+ & .mc-form-row_margin {
10309
+ margin-bottom: var(
10310
+ --mc-forms-size-vertical-row-margin-bottom, $forms-size-vertical-row-margin-bottom
10311
+ );
10312
+ }
10313
+
10314
+ & .mc-form__label {
10315
+ padding-top: var(
10316
+ --mc-forms-size-vertical-label-padding-top, $forms-size-vertical-label-padding-top
10317
+ );
10318
+ padding-bottom: var(
10319
+ --mc-forms-size-vertical-label-padding-bottom, $forms-size-vertical-label-padding-bottom
10320
+ );
10321
+
10322
+ text-align: start;
10323
+ }
10324
+
10325
+ & .mc-form__control {
10326
+ padding-left: 0;
10327
+ }
10328
+
10329
+ & .mc-form__legend {
10330
+ margin-top: var(
10331
+ --mc-forms-size-vertical-legend-margin-top, $forms-size-vertical-legend-margin-top
10332
+ );
10333
+ margin-bottom: var(
10334
+ --mc-forms-size-vertical-legend-margin-bottom, $forms-size-vertical-legend-margin-bottom
10335
+ );
10336
+ }
10337
+ }
10338
+
10339
+ .mc-form__fieldset {
10340
+ display: flex;
10341
+ flex-direction: column;
10342
+ }
10343
+
10344
+ .mc-form__fieldset.mc-horizontal {
10345
+ flex-direction: row;
10346
+
10347
+ & .mc-form__row:not(:first-child) {
10348
+ padding-left: var(
10349
+ --mc-forms-size-vertical-control-padding-left, $forms-size-vertical-control-padding-left
10350
+ );
10351
+ }
10352
+ }
10353
+ }
10220
10354
 
10221
10355
  @mixin mc-forms-theme($theme) {
10356
+ @include mc-form-geometry();
10357
+
10222
10358
  $foreground: map-get($theme, foreground);
10223
10359
 
10224
10360
  $forms: map-get(map-get($theme, components), forms);
package/_visual.scss CHANGED
@@ -93,6 +93,7 @@ $light-color-scheme-foreground-text: #19252f;
93
93
  $light-color-scheme-foreground-text-less-contrast: #6d7a86;
94
94
  $light-color-scheme-foreground-text-disabled: #8c99a5;
95
95
  $light-color-scheme-foreground-text-error: #db3c55;
96
+ $light-color-scheme-foreground-text-warning: #a26e0c;
96
97
  $light-color-scheme-foreground-text-success: #016b37;
97
98
  $light-color-scheme-foreground-divider: #d7dee4;
98
99
  $light-color-scheme-foreground-border: #bdc7d1;
@@ -119,6 +120,7 @@ $dark-color-scheme-foreground-text: #d7dee4;
119
120
  $dark-color-scheme-foreground-text-less-contrast: #8c99a5;
120
121
  $dark-color-scheme-foreground-text-disabled: #6d7a86;
121
122
  $dark-color-scheme-foreground-text-error: #ee6f79;
123
+ $dark-color-scheme-foreground-text-warning: #e19f12;
122
124
  $dark-color-scheme-foreground-text-success: #4ba96c;
123
125
  $dark-color-scheme-foreground-divider: mix(#515e69, transparent, 50%);
124
126
  $dark-color-scheme-foreground-border: #515e69;
@@ -1,9 +1,9 @@
1
1
  import { Directionality } from '@angular/cdk/bidi';
2
2
  import { Overlay, ScrollStrategy } from '@angular/cdk/overlay';
3
3
  import { ViewportRuler } from '@angular/cdk/scrolling';
4
- import { ChangeDetectorRef, ElementRef, InjectionToken, NgZone, OnDestroy, ViewContainerRef } from '@angular/core';
4
+ import { AfterViewInit, ChangeDetectorRef, ElementRef, InjectionToken, NgZone, OnDestroy, ViewContainerRef } from '@angular/core';
5
5
  import { ControlValueAccessor } from '@angular/forms';
6
- import { McOption, McOptionSelectionChange } from '@ptsecurity/mosaic/core';
6
+ import { KeyboardNavigationHandler, McOption, McOptionSelectionChange } from '@ptsecurity/mosaic/core';
7
7
  import { McFormField } from '@ptsecurity/mosaic/form-field';
8
8
  import { Observable } from 'rxjs';
9
9
  import { McAutocompleteOrigin } from './autocomplete-origin.directive';
@@ -14,8 +14,6 @@ import * as i0 from "@angular/core";
14
14
  * to properly calculate the scrollTop of the panel. Because we are not
15
15
  * actually focusing the active item, scroll must be handled manually.
16
16
  */
17
- /** The height of each autocomplete option. */
18
- export declare const AUTOCOMPLETE_OPTION_HEIGHT = 32;
19
17
  /** The total height of the autocomplete panel. */
20
18
  export declare const AUTOCOMPLETE_PANEL_HEIGHT = 256;
21
19
  export declare const AUTOCOMPLETE_BORDER_WIDTH: number;
@@ -37,7 +35,7 @@ export declare const MAT_AUTOCOMPLETE_VALUE_ACCESSOR: any;
37
35
  * @docs-private
38
36
  */
39
37
  export declare function getMcAutocompleteMissingPanelError(): Error;
40
- export declare class McAutocompleteTrigger implements ControlValueAccessor, OnDestroy {
38
+ export declare class McAutocompleteTrigger implements AfterViewInit, ControlValueAccessor, OnDestroy, KeyboardNavigationHandler {
41
39
  private elementRef;
42
40
  private viewContainerRef;
43
41
  private changeDetectorRef;
@@ -92,6 +90,7 @@ export declare class McAutocompleteTrigger implements ControlValueAccessor, OnDe
92
90
  /** Stream of keyboard events that can close the panel. */
93
91
  private readonly closeKeyEventStream;
94
92
  constructor(elementRef: ElementRef<HTMLInputElement>, viewContainerRef: ViewContainerRef, changeDetectorRef: ChangeDetectorRef, overlay: Overlay, zone: NgZone, scrollStrategy: any, dir: Directionality, formField: McFormField, document: any, viewportRuler?: ViewportRuler | undefined);
93
+ ngAfterViewInit(): void;
95
94
  ngOnDestroy(): void;
96
95
  /** `View -> model callback called when value changes` */
97
96
  onChange: (value: any) => void;
@@ -118,6 +117,7 @@ export declare class McAutocompleteTrigger implements ControlValueAccessor, OnDe
118
117
  handleInput(event: KeyboardEvent): void;
119
118
  handleFocus(): void;
120
119
  handleClick($event: MouseEvent): void;
120
+ scrollActiveOptionIntoView(): void;
121
121
  /** Stream of clicks outside of the autocomplete panel. */
122
122
  private getOutsideClickStream;
123
123
  /**
@@ -125,16 +125,6 @@ export declare class McAutocompleteTrigger implements ControlValueAccessor, OnDe
125
125
  * arrow function in order to preserve the context.
126
126
  */
127
127
  private windowBlurHandler;
128
- /**
129
- * Given that we are not actually focusing active options, we must manually adjust scroll
130
- * to reveal options below the fold. First, we find the offset of the option from the top
131
- * of the panel. If that offset is below the fold, the new scrollTop will be the offset -
132
- * the panel height + the option height, so the active option will be just visible at the
133
- * bottom of the panel. If that offset is above the top of the visible panel, the new scrollTop
134
- * will become the offset. If that offset is visible within the panel already, the scrollTop is
135
- * not adjusted.
136
- */
137
- private scrollToOption;
138
128
  /**
139
129
  * This method listens to a stream of panel closing actions and resets the
140
130
  * stream every time the option list changes.
@@ -62,6 +62,10 @@
62
62
  }
63
63
  }
64
64
 
65
+ & .mc-hint {
66
+ color: map-get($foreground, text-less-contrast);
67
+ }
68
+
65
69
  &.mc-primary {
66
70
  @include mc-checkbox-color(map.get($checkbox, default));
67
71
 
@@ -22,18 +22,15 @@ $tokens: meta.module-variables(tokens) !default;
22
22
  .mc-checkbox-checkmark,
23
23
  .mc-checkbox-mixedmark {
24
24
  display: none;
25
-
26
- position: absolute;
27
-
28
- top: -1px;
29
- left: -1px;
30
- right: 0;
31
- bottom: 0;
32
25
  }
33
26
 
34
27
  .mc-checkbox-frame {
35
28
  @extend %mc-checkbox-outer-box;
36
29
 
30
+ display: flex;
31
+ align-items: center;
32
+ justify-content: center;
33
+
37
34
  background-color: transparent;
38
35
  border: {
39
36
  width: var(--mc-checkbox-size-border-width, map.get($tokens, checkbox-size-border-width));
@@ -3,7 +3,7 @@ import * as i1 from "./number/formatter";
3
3
  import * as i2 from "./date/formatter.pipe";
4
4
  export declare class McFormattersModule {
5
5
  static ɵfac: i0.ɵɵFactoryDeclaration<McFormattersModule, never>;
6
- static ɵmod: i0.ɵɵNgModuleDeclaration<McFormattersModule, [typeof i1.McDecimalPipe, typeof i2.AbsoluteDateFormatterPipe, typeof i2.AbsoluteDateTimeFormatterPipe, typeof i2.AbsoluteDateShortFormatterPipe, typeof i2.AbsoluteShortDateTimeFormatterPipe, typeof i2.RelativeDateFormatterPipe, typeof i2.RelativeDateTimeFormatterPipe, typeof i2.RelativeShortDateFormatterPipe, typeof i2.RelativeShortDateTimeFormatterPipe, typeof i2.RangeDateFormatterPipe, typeof i2.RangeShortDateFormatterPipe, typeof i2.RangeDateTimeFormatterPipe, typeof i2.RangeShortDateTimeFormatterPipe, typeof i2.RangeMiddleDateTimeFormatterPipe], never, [typeof i1.McDecimalPipe, typeof i2.AbsoluteDateFormatterPipe, typeof i2.AbsoluteDateTimeFormatterPipe, typeof i2.AbsoluteDateShortFormatterPipe, typeof i2.AbsoluteShortDateTimeFormatterPipe, typeof i2.RelativeDateFormatterPipe, typeof i2.RelativeDateTimeFormatterPipe, typeof i2.RelativeShortDateFormatterPipe, typeof i2.RelativeShortDateTimeFormatterPipe, typeof i2.RangeDateFormatterPipe, typeof i2.RangeShortDateFormatterPipe, typeof i2.RangeDateTimeFormatterPipe, typeof i2.RangeShortDateTimeFormatterPipe, typeof i2.RangeMiddleDateTimeFormatterPipe]>;
6
+ static ɵmod: i0.ɵɵNgModuleDeclaration<McFormattersModule, [typeof i1.McDecimalPipe, typeof i1.McTableNumberPipe, typeof i2.AbsoluteDateFormatterPipe, typeof i2.AbsoluteDateTimeFormatterPipe, typeof i2.AbsoluteDateShortFormatterPipe, typeof i2.AbsoluteShortDateTimeFormatterPipe, typeof i2.RelativeDateFormatterPipe, typeof i2.RelativeDateTimeFormatterPipe, typeof i2.RelativeShortDateFormatterPipe, typeof i2.RelativeShortDateTimeFormatterPipe, typeof i2.RangeDateFormatterPipe, typeof i2.RangeShortDateFormatterPipe, typeof i2.RangeDateTimeFormatterPipe, typeof i2.RangeShortDateTimeFormatterPipe, typeof i2.RangeMiddleDateTimeFormatterPipe], never, [typeof i1.McDecimalPipe, typeof i1.McTableNumberPipe, typeof i2.AbsoluteDateFormatterPipe, typeof i2.AbsoluteDateTimeFormatterPipe, typeof i2.AbsoluteDateShortFormatterPipe, typeof i2.AbsoluteShortDateTimeFormatterPipe, typeof i2.RelativeDateFormatterPipe, typeof i2.RelativeDateTimeFormatterPipe, typeof i2.RelativeShortDateFormatterPipe, typeof i2.RelativeShortDateTimeFormatterPipe, typeof i2.RangeDateFormatterPipe, typeof i2.RangeShortDateFormatterPipe, typeof i2.RangeDateTimeFormatterPipe, typeof i2.RangeShortDateTimeFormatterPipe, typeof i2.RangeMiddleDateTimeFormatterPipe]>;
7
7
  static ɵinj: i0.ɵɵInjectorDeclaration<McFormattersModule>;
8
8
  }
9
9
  export * from './number/formatter';
@@ -30,8 +30,33 @@ export declare class McDecimalPipe implements PipeTransform {
30
30
  * When not supplied, uses the value of `MC_LOCALE_ID`, which is `ru` by default.
31
31
  */
32
32
  transform(value: any, digitsInfo?: string, locale?: string): string | null;
33
+ isSpecialFormatForRULocale(locale: string, value: number, grouping?: boolean): boolean;
33
34
  static ɵfac: i0.ɵɵFactoryDeclaration<McDecimalPipe, [{ optional: true; }, { optional: true; }, { optional: true; }]>;
34
35
  static ɵpipe: i0.ɵɵPipeDeclaration<McDecimalPipe, "mcNumber", false>;
35
36
  static ɵprov: i0.ɵɵInjectableDeclaration<McDecimalPipe>;
36
37
  }
38
+ export declare class McTableNumberPipe implements PipeTransform {
39
+ private id;
40
+ private localeService;
41
+ private readonly options;
42
+ constructor(id: string, localeService: McLocaleService, options: ParsedDigitsInfo);
43
+ /**
44
+ * @param value The number to be formatted.
45
+ * @param digitsInfo Decimal representation options, specified by a string
46
+ * in the following format:<br>
47
+ * <code>{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}</code>.
48
+ * - `minIntegerDigits`: The minimum number of integer digits before the decimal point.
49
+ * Default is `1`.
50
+ * - `minFractionDigits`: The minimum number of digits after the decimal point.
51
+ * Default is `0`.
52
+ * - `maxFractionDigits`: The maximum number of digits after the decimal point.
53
+ * Default is `3`.
54
+ * @param locale A locale code for the locale format rules to use.
55
+ * When not supplied, uses the value of `MC_LOCALE_ID`, which is `ru` by default.
56
+ */
57
+ transform(value: any, digitsInfo?: string, locale?: string): string | null;
58
+ static ɵfac: i0.ɵɵFactoryDeclaration<McTableNumberPipe, [{ optional: true; }, { optional: true; }, { optional: true; }]>;
59
+ static ɵpipe: i0.ɵɵPipeDeclaration<McTableNumberPipe, "mcTableNumber", false>;
60
+ static ɵprov: i0.ɵɵInjectableDeclaration<McTableNumberPipe>;
61
+ }
37
62
  export {};
@@ -3,7 +3,119 @@
3
3
 
4
4
  @use '../styles/typography' as *;
5
5
 
6
+ @mixin mc-form-geometry($tokens) {
7
+ .mc-form {
8
+ display: flex;
9
+ flex-direction: column;
10
+ }
11
+
12
+ .mc-form__row {
13
+ display: flex;
14
+ flex-direction: row;
15
+ }
16
+
17
+ .mc-form-horizontal {
18
+ $config: mc-typography-config($tokens);
19
+
20
+ $line-height: mc-line-height($config, body);
21
+
22
+ $form-field-size-height: map.get($tokens, form-field-size-height);
23
+
24
+ $label-padding-top: calc(($form-field-size-height - $line-height) / 2);
25
+
26
+ & .mc-form-row_margin {
27
+ margin-bottom: var(
28
+ --mc-forms-size-horizontal-row-margin-bottom,
29
+ #{map.get($tokens, forms-size-horizontal-row-margin-bottom)}
30
+ );
31
+ }
32
+
33
+ & .mc-form__label {
34
+ padding-top: var(--mc-forms-size-horizontal-label-padding-top, #{$label-padding-top});
35
+
36
+ text-align: start;
37
+ }
38
+
39
+ & .mc-form__control {
40
+ padding-left: var(
41
+ --mc-forms-size-horizontal-control-padding-left,
42
+ #{map.get($tokens, forms-size-horizontal-control-padding-left)}
43
+ );
44
+ }
45
+
46
+ & .mc-form__legend {
47
+ margin-top: var(
48
+ --mc-forms-size-horizontal-legend-margin-top,
49
+ #{map.get($tokens, forms-size-horizontal-legend-margin-top)}
50
+ );
51
+ margin-bottom: var(
52
+ --mc-forms-size-horizontal-legend-margin-bottom,
53
+ #{map.get($tokens, forms-size-horizontal-legend-margin-bottom)}
54
+ );
55
+ }
56
+ }
57
+
58
+ .mc-form-vertical {
59
+ & .mc-form__row {
60
+ flex-direction: column;
61
+ }
62
+
63
+ & .mc-form-row_margin {
64
+ margin-bottom: var(
65
+ --mc-forms-size-vertical-row-margin-bottom,
66
+ #{map.get($tokens, forms-size-vertical-row-margin-bottom)}
67
+ );
68
+ }
69
+
70
+ & .mc-form__label {
71
+ padding-top: var(
72
+ --mc-forms-size-vertical-label-padding-top,
73
+ #{map.get($tokens, forms-size-vertical-label-padding-top)}
74
+ );
75
+ padding-bottom: var(
76
+ --mc-forms-size-vertical-label-padding-bottom,
77
+ #{map.get($tokens, forms-size-vertical-label-padding-bottom)}
78
+ );
79
+
80
+ text-align: start;
81
+ }
82
+
83
+ & .mc-form__control {
84
+ padding-left: 0;
85
+ }
86
+
87
+ & .mc-form__legend {
88
+ margin-top: var(
89
+ --mc-forms-size-vertical-legend-margin-top,
90
+ #{map.get($tokens, forms-size-vertical-legend-margin-top)}
91
+ );
92
+ margin-bottom: var(
93
+ --mc-forms-size-vertical-legend-margin-bottom,
94
+ #{map.get($tokens, forms-size-vertical-legend-margin-bottom)}
95
+ );
96
+ }
97
+ }
98
+
99
+ .mc-form__fieldset {
100
+ display: flex;
101
+ flex-direction: column;
102
+ }
103
+
104
+ .mc-form__fieldset.mc-horizontal {
105
+ flex-direction: row;
106
+
107
+ & .mc-form__row:not(:first-child) {
108
+ padding-left: var(
109
+ --mc-forms-size-vertical-control-padding-left,
110
+ #{map.get($tokens, forms-size-vertical-control-padding-left)}
111
+ );
112
+ }
113
+ }
114
+ }
115
+
6
116
  @mixin mc-forms-theme($theme) {
117
+ @include mc-form-geometry(map.get($theme, tokens));
118
+
7
119
  $foreground: map.get($theme, foreground);
8
120
 
9
121
  $forms: map.get(map.get($theme, components), forms);
@@ -1,11 +1,10 @@
1
1
  export declare const enUSLocaleData: {
2
- en: {
2
+ 'en-US': {
3
3
  select: {
4
4
  hiddenItemsText: string;
5
5
  };
6
6
  datepicker: {
7
7
  placeholder: string;
8
- dateInput: string;
9
8
  };
10
9
  };
11
10
  };
@@ -3,5 +3,14 @@ export declare const esLALocaleData: {
3
3
  select: {
4
4
  hiddenItemsText: string;
5
5
  };
6
+ datepicker: {
7
+ placeholder: string;
8
+ };
9
+ timepicker: {
10
+ placeholder: {
11
+ full: string;
12
+ short: string;
13
+ };
14
+ };
6
15
  };
7
16
  };
@@ -3,5 +3,14 @@ export declare const faIRLocaleData: {
3
3
  select: {
4
4
  hiddenItemsText: string;
5
5
  };
6
+ datepicker: {
7
+ placeholder: string;
8
+ };
9
+ timepicker: {
10
+ placeholder: {
11
+ full: string;
12
+ short: string;
13
+ };
14
+ };
6
15
  };
7
16
  };
@@ -1,4 +1,2 @@
1
- import { InjectionToken } from '@angular/core';
2
1
  export * from './locale-service';
3
2
  export * from './locale-service.module';
4
- export declare const MC_LOCALE_ID: InjectionToken<string>;
@@ -2,44 +2,78 @@ import { InjectionToken } from '@angular/core';
2
2
  import { BehaviorSubject } from 'rxjs';
3
3
  import * as i0 from "@angular/core";
4
4
  export declare const MC_LOCALE_ID: InjectionToken<string>;
5
- export declare const MC_DEFAULT_LOCALE_ID = "ru";
5
+ export declare const MC_DEFAULT_LOCALE_ID = "ru-RU";
6
6
  export declare function MC_DEFAULT_LOCALE_DATA_FACTORY(): {
7
7
  'zh-CN': {
8
8
  select: {
9
9
  hiddenItemsText: string;
10
10
  };
11
+ datepicker: {
12
+ placeholder: string;
13
+ };
14
+ timepicker: {
15
+ placeholder: {
16
+ full: string;
17
+ short: string;
18
+ };
19
+ };
11
20
  };
12
21
  'pt-BR': {
13
22
  select: {
14
23
  hiddenItemsText: string;
15
24
  };
25
+ datepicker: {
26
+ placeholder: string;
27
+ };
28
+ timepicker: {
29
+ placeholder: {
30
+ full: string;
31
+ short: string;
32
+ };
33
+ };
16
34
  };
17
35
  'fa-IR': {
18
36
  select: {
19
37
  hiddenItemsText: string;
20
38
  };
39
+ datepicker: {
40
+ placeholder: string;
41
+ };
42
+ timepicker: {
43
+ placeholder: {
44
+ full: string;
45
+ short: string;
46
+ };
47
+ };
21
48
  };
22
49
  'es-LA': {
23
50
  select: {
24
51
  hiddenItemsText: string;
25
52
  };
53
+ datepicker: {
54
+ placeholder: string;
55
+ };
56
+ timepicker: {
57
+ placeholder: {
58
+ full: string;
59
+ short: string;
60
+ };
61
+ };
26
62
  };
27
- en: {
63
+ 'en-US': {
28
64
  select: {
29
65
  hiddenItemsText: string;
30
66
  };
31
67
  datepicker: {
32
68
  placeholder: string;
33
- dateInput: string;
34
69
  };
35
70
  };
36
- ru: {
71
+ 'ru-RU': {
37
72
  select: {
38
73
  hiddenItemsText: string;
39
74
  };
40
75
  datepicker: {
41
76
  placeholder: string;
42
- dateInput: string;
43
77
  };
44
78
  };
45
79
  items: {
@@ -3,5 +3,14 @@ export declare const ptBRLocaleData: {
3
3
  select: {
4
4
  hiddenItemsText: string;
5
5
  };
6
+ datepicker: {
7
+ placeholder: string;
8
+ };
9
+ timepicker: {
10
+ placeholder: {
11
+ full: string;
12
+ short: string;
13
+ };
14
+ };
6
15
  };
7
16
  };