@bravura/ui 5.2.4 → 6.0.1

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 (137) hide show
  1. package/CHANGELOG.md +14 -1
  2. package/README.md +1 -0
  3. package/_index.scss +5 -5
  4. package/fesm2022/bravura-ui-alert-testing.mjs.map +1 -1
  5. package/fesm2022/bravura-ui-alert.mjs +13 -13
  6. package/fesm2022/bravura-ui-alert.mjs.map +1 -1
  7. package/fesm2022/bravura-ui-behavior.mjs +25 -21
  8. package/fesm2022/bravura-ui-behavior.mjs.map +1 -1
  9. package/fesm2022/bravura-ui-clip-note.mjs +15 -14
  10. package/fesm2022/bravura-ui-clip-note.mjs.map +1 -1
  11. package/fesm2022/bravura-ui-common.mjs +5 -5
  12. package/fesm2022/bravura-ui-common.mjs.map +1 -1
  13. package/fesm2022/bravura-ui-currency-input.mjs +10 -9
  14. package/fesm2022/bravura-ui-currency-input.mjs.map +1 -1
  15. package/fesm2022/bravura-ui-decimal-input.mjs +10 -9
  16. package/fesm2022/bravura-ui-decimal-input.mjs.map +1 -1
  17. package/fesm2022/bravura-ui-discrete-input.mjs +9 -9
  18. package/fesm2022/bravura-ui-discrete-input.mjs.map +1 -1
  19. package/fesm2022/bravura-ui-file-upload.mjs +12 -12
  20. package/fesm2022/bravura-ui-file-upload.mjs.map +1 -1
  21. package/fesm2022/bravura-ui-form-field.mjs +14 -13
  22. package/fesm2022/bravura-ui-form-field.mjs.map +1 -1
  23. package/fesm2022/bravura-ui-icon-font.mjs +10 -9
  24. package/fesm2022/bravura-ui-icon-font.mjs.map +1 -1
  25. package/fesm2022/bravura-ui-panel.mjs +18 -17
  26. package/fesm2022/bravura-ui-panel.mjs.map +1 -1
  27. package/fesm2022/bravura-ui-phone-number.mjs +20 -17
  28. package/fesm2022/bravura-ui-phone-number.mjs.map +1 -1
  29. package/fesm2022/bravura-ui-radio-panel-testing.mjs.map +1 -1
  30. package/fesm2022/bravura-ui-radio-panel.mjs +14 -14
  31. package/fesm2022/bravura-ui-radio-panel.mjs.map +1 -1
  32. package/fesm2022/bravura-ui-selection-panel.mjs +14 -13
  33. package/fesm2022/bravura-ui-selection-panel.mjs.map +1 -1
  34. package/fesm2022/bravura-ui-skeletons.mjs +18 -13
  35. package/fesm2022/bravura-ui-skeletons.mjs.map +1 -1
  36. package/fesm2022/bravura-ui-stepper.mjs +22 -20
  37. package/fesm2022/bravura-ui-stepper.mjs.map +1 -1
  38. package/fesm2022/bravura-ui-tooltip.mjs +14 -13
  39. package/fesm2022/bravura-ui-tooltip.mjs.map +1 -1
  40. package/m3-theme.scss +155 -155
  41. package/package.json +15 -55
  42. package/radio-panel/_radio-panel-theme.scss +11 -11
  43. package/selection-panel/_selection-panel-theme.scss +33 -33
  44. package/stepper/_stepper-theme.scss +20 -20
  45. package/theme/_ui-theme-legacy.scss +112 -112
  46. package/theme/_ui-theme.scss +101 -101
  47. package/esm2022/alert/alert-container.component.mjs +0 -207
  48. package/esm2022/alert/alert-message.component.mjs +0 -101
  49. package/esm2022/alert/alert.module.mjs +0 -22
  50. package/esm2022/alert/bravura-ui-alert.mjs +0 -5
  51. package/esm2022/alert/public-api.mjs +0 -2
  52. package/esm2022/alert/testing/bravura-ui-alert-testing.mjs +0 -5
  53. package/esm2022/alert/testing/test-api.mjs +0 -44
  54. package/esm2022/behavior/await.directive.mjs +0 -133
  55. package/esm2022/behavior/behavior.module.mjs +0 -37
  56. package/esm2022/behavior/bravura-ui-behavior.mjs +0 -5
  57. package/esm2022/behavior/observe-content-class.directive.mjs +0 -63
  58. package/esm2022/behavior/public-api.mjs +0 -6
  59. package/esm2022/behavior/sizing-monitor.directive.mjs +0 -31
  60. package/esm2022/behavior/sizing.directive.mjs +0 -256
  61. package/esm2022/bravura-ui.mjs +0 -5
  62. package/esm2022/clip-note/bravura-ui-clip-note.mjs +0 -5
  63. package/esm2022/clip-note/clip-note.component.mjs +0 -216
  64. package/esm2022/clip-note/clip-note.directive.mjs +0 -141
  65. package/esm2022/clip-note/clip-note.module.mjs +0 -32
  66. package/esm2022/clip-note/public-api.mjs +0 -2
  67. package/esm2022/common/bravura-ui-common.mjs +0 -5
  68. package/esm2022/common/common-utils.mjs +0 -34
  69. package/esm2022/common/common.module.mjs +0 -53
  70. package/esm2022/common/public-api.mjs +0 -3
  71. package/esm2022/currency-input/bravura-ui-currency-input.mjs +0 -5
  72. package/esm2022/currency-input/currency-input.directive.mjs +0 -276
  73. package/esm2022/currency-input/currency-input.module.mjs +0 -19
  74. package/esm2022/currency-input/public-api.mjs +0 -2
  75. package/esm2022/decimal-input/bravura-ui-decimal-input.mjs +0 -5
  76. package/esm2022/decimal-input/decimal-input.directive.mjs +0 -122
  77. package/esm2022/decimal-input/decimal-input.module.mjs +0 -19
  78. package/esm2022/decimal-input/public-api.mjs +0 -2
  79. package/esm2022/discrete-input/bravura-ui-discrete-input.mjs +0 -5
  80. package/esm2022/discrete-input/discrete-input.component.mjs +0 -337
  81. package/esm2022/discrete-input/discrete-input.module.mjs +0 -21
  82. package/esm2022/discrete-input/public-api.mjs +0 -3
  83. package/esm2022/file-upload/bravura-ui-file-upload.mjs +0 -5
  84. package/esm2022/file-upload/file-upload.component.mjs +0 -400
  85. package/esm2022/file-upload/file-upload.module.mjs +0 -44
  86. package/esm2022/file-upload/file-upload.service.mjs +0 -29
  87. package/esm2022/file-upload/public-api.mjs +0 -7
  88. package/esm2022/form-field/bravura-ui-form-field.mjs +0 -5
  89. package/esm2022/form-field/form-field.component.mjs +0 -82
  90. package/esm2022/form-field/form-field.module.mjs +0 -33
  91. package/esm2022/form-field/public-api.mjs +0 -3
  92. package/esm2022/icon-font/bravura-ui-icon-font.mjs +0 -5
  93. package/esm2022/icon-font/icon-font.module.mjs +0 -22
  94. package/esm2022/icon-font/icon.directive.mjs +0 -102
  95. package/esm2022/icon-font/public-api.mjs +0 -4
  96. package/esm2022/icon-font/utilities.mjs +0 -51
  97. package/esm2022/panel/bravura-ui-panel.mjs +0 -5
  98. package/esm2022/panel/panel-section.component.mjs +0 -41
  99. package/esm2022/panel/panel.component.mjs +0 -87
  100. package/esm2022/panel/panel.module.mjs +0 -23
  101. package/esm2022/panel/public-api.mjs +0 -2
  102. package/esm2022/panel/tinted.directive.mjs +0 -60
  103. package/esm2022/phone-number/bravura-ui-phone-number.mjs +0 -5
  104. package/esm2022/phone-number/phone-number.directive.mjs +0 -188
  105. package/esm2022/phone-number/phone-number.module.mjs +0 -24
  106. package/esm2022/phone-number/phone-number.pipe.mjs +0 -47
  107. package/esm2022/phone-number/phone-number.validator.mjs +0 -64
  108. package/esm2022/phone-number/public-api.mjs +0 -2
  109. package/esm2022/public-api.mjs +0 -2
  110. package/esm2022/radio-panel/bravura-ui-radio-panel.mjs +0 -5
  111. package/esm2022/radio-panel/public-api.mjs +0 -4
  112. package/esm2022/radio-panel/radio-panel-item.component.mjs +0 -93
  113. package/esm2022/radio-panel/radio-panel.component.mjs +0 -81
  114. package/esm2022/radio-panel/radio-panel.module.mjs +0 -25
  115. package/esm2022/radio-panel/testing/bravura-ui-radio-panel-testing.mjs +0 -5
  116. package/esm2022/radio-panel/testing/test-api.mjs +0 -46
  117. package/esm2022/selection-panel/bravura-ui-selection-panel.mjs +0 -5
  118. package/esm2022/selection-panel/public-api.mjs +0 -4
  119. package/esm2022/selection-panel/selection-panel-item.component.mjs +0 -163
  120. package/esm2022/selection-panel/selection-panel.directive.mjs +0 -119
  121. package/esm2022/selection-panel/selection-panel.module.mjs +0 -23
  122. package/esm2022/skeletons/bravura-ui-skeletons.mjs +0 -5
  123. package/esm2022/skeletons/public-api.mjs +0 -4
  124. package/esm2022/skeletons/skeleton-loader-presets.directive.mjs +0 -83
  125. package/esm2022/skeletons/skeleton-loader.component.mjs +0 -76
  126. package/esm2022/skeletons/skeletons.module.mjs +0 -35
  127. package/esm2022/stepper/bravura-ui-stepper.mjs +0 -5
  128. package/esm2022/stepper/public-api.mjs +0 -4
  129. package/esm2022/stepper/step-label-top.directive.mjs +0 -40
  130. package/esm2022/stepper/stepper-animation.mjs +0 -23
  131. package/esm2022/stepper/stepper.component.mjs +0 -178
  132. package/esm2022/stepper/stepper.module.mjs +0 -53
  133. package/esm2022/tooltip/bravura-ui-tooltip.mjs +0 -5
  134. package/esm2022/tooltip/public-api.mjs +0 -4
  135. package/esm2022/tooltip/tooltip.component.mjs +0 -63
  136. package/esm2022/tooltip/tooltip.directive.mjs +0 -150
  137. package/esm2022/tooltip/tooltip.module.mjs +0 -25
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bravura/ui",
3
3
  "description": "Bravura UI Components for Angular applications",
4
- "version": "5.2.4",
4
+ "version": "6.0.1",
5
5
  "keywords": [
6
6
  "Angular",
7
7
  "Angular Material",
@@ -23,8 +23,6 @@
23
23
  ".": {
24
24
  "sass": "./_index.scss",
25
25
  "types": "./index.d.ts",
26
- "esm2022": "./esm2022/bravura-ui.mjs",
27
- "esm": "./esm2022/bravura-ui.mjs",
28
26
  "default": "./fesm2022/bravura-ui.mjs"
29
27
  },
30
28
  "./theme": {
@@ -35,116 +33,78 @@
35
33
  },
36
34
  "./alert": {
37
35
  "types": "./alert/index.d.ts",
38
- "esm2022": "./esm2022/alert/bravura-ui-alert.mjs",
39
- "esm": "./esm2022/alert/bravura-ui-alert.mjs",
40
36
  "default": "./fesm2022/bravura-ui-alert.mjs"
41
37
  },
42
38
  "./behavior": {
43
39
  "types": "./behavior/index.d.ts",
44
- "esm2022": "./esm2022/behavior/bravura-ui-behavior.mjs",
45
- "esm": "./esm2022/behavior/bravura-ui-behavior.mjs",
46
40
  "default": "./fesm2022/bravura-ui-behavior.mjs"
47
41
  },
48
42
  "./clip-note": {
49
43
  "types": "./clip-note/index.d.ts",
50
- "esm2022": "./esm2022/clip-note/bravura-ui-clip-note.mjs",
51
- "esm": "./esm2022/clip-note/bravura-ui-clip-note.mjs",
52
44
  "default": "./fesm2022/bravura-ui-clip-note.mjs"
53
45
  },
54
46
  "./common": {
55
47
  "types": "./common/index.d.ts",
56
- "esm2022": "./esm2022/common/bravura-ui-common.mjs",
57
- "esm": "./esm2022/common/bravura-ui-common.mjs",
58
48
  "default": "./fesm2022/bravura-ui-common.mjs"
59
49
  },
60
- "./decimal-input": {
61
- "types": "./decimal-input/index.d.ts",
62
- "esm2022": "./esm2022/decimal-input/bravura-ui-decimal-input.mjs",
63
- "esm": "./esm2022/decimal-input/bravura-ui-decimal-input.mjs",
64
- "default": "./fesm2022/bravura-ui-decimal-input.mjs"
50
+ "./discrete-input": {
51
+ "types": "./discrete-input/index.d.ts",
52
+ "default": "./fesm2022/bravura-ui-discrete-input.mjs"
65
53
  },
66
54
  "./currency-input": {
67
55
  "types": "./currency-input/index.d.ts",
68
- "esm2022": "./esm2022/currency-input/bravura-ui-currency-input.mjs",
69
- "esm": "./esm2022/currency-input/bravura-ui-currency-input.mjs",
70
56
  "default": "./fesm2022/bravura-ui-currency-input.mjs"
71
57
  },
72
- "./discrete-input": {
73
- "types": "./discrete-input/index.d.ts",
74
- "esm2022": "./esm2022/discrete-input/bravura-ui-discrete-input.mjs",
75
- "esm": "./esm2022/discrete-input/bravura-ui-discrete-input.mjs",
76
- "default": "./fesm2022/bravura-ui-discrete-input.mjs"
58
+ "./file-upload": {
59
+ "types": "./file-upload/index.d.ts",
60
+ "default": "./fesm2022/bravura-ui-file-upload.mjs"
61
+ },
62
+ "./decimal-input": {
63
+ "types": "./decimal-input/index.d.ts",
64
+ "default": "./fesm2022/bravura-ui-decimal-input.mjs"
77
65
  },
78
66
  "./form-field": {
79
67
  "types": "./form-field/index.d.ts",
80
- "esm2022": "./esm2022/form-field/bravura-ui-form-field.mjs",
81
- "esm": "./esm2022/form-field/bravura-ui-form-field.mjs",
82
68
  "default": "./fesm2022/bravura-ui-form-field.mjs"
83
69
  },
84
- "./file-upload": {
85
- "types": "./file-upload/index.d.ts",
86
- "esm2022": "./esm2022/file-upload/bravura-ui-file-upload.mjs",
87
- "esm": "./esm2022/file-upload/bravura-ui-file-upload.mjs",
88
- "default": "./fesm2022/bravura-ui-file-upload.mjs"
89
- },
90
70
  "./icon-font": {
91
71
  "types": "./icon-font/index.d.ts",
92
- "esm2022": "./esm2022/icon-font/bravura-ui-icon-font.mjs",
93
- "esm": "./esm2022/icon-font/bravura-ui-icon-font.mjs",
94
72
  "default": "./fesm2022/bravura-ui-icon-font.mjs"
95
73
  },
96
74
  "./panel": {
97
75
  "types": "./panel/index.d.ts",
98
- "esm2022": "./esm2022/panel/bravura-ui-panel.mjs",
99
- "esm": "./esm2022/panel/bravura-ui-panel.mjs",
100
76
  "default": "./fesm2022/bravura-ui-panel.mjs"
101
77
  },
102
- "./phone-number": {
103
- "types": "./phone-number/index.d.ts",
104
- "esm2022": "./esm2022/phone-number/bravura-ui-phone-number.mjs",
105
- "esm": "./esm2022/phone-number/bravura-ui-phone-number.mjs",
106
- "default": "./fesm2022/bravura-ui-phone-number.mjs"
107
- },
108
78
  "./radio-panel": {
109
79
  "types": "./radio-panel/index.d.ts",
110
- "esm2022": "./esm2022/radio-panel/bravura-ui-radio-panel.mjs",
111
- "esm": "./esm2022/radio-panel/bravura-ui-radio-panel.mjs",
112
80
  "default": "./fesm2022/bravura-ui-radio-panel.mjs"
113
81
  },
82
+ "./phone-number": {
83
+ "types": "./phone-number/index.d.ts",
84
+ "default": "./fesm2022/bravura-ui-phone-number.mjs"
85
+ },
114
86
  "./selection-panel": {
115
87
  "types": "./selection-panel/index.d.ts",
116
- "esm2022": "./esm2022/selection-panel/bravura-ui-selection-panel.mjs",
117
- "esm": "./esm2022/selection-panel/bravura-ui-selection-panel.mjs",
118
88
  "default": "./fesm2022/bravura-ui-selection-panel.mjs"
119
89
  },
120
90
  "./skeletons": {
121
91
  "types": "./skeletons/index.d.ts",
122
- "esm2022": "./esm2022/skeletons/bravura-ui-skeletons.mjs",
123
- "esm": "./esm2022/skeletons/bravura-ui-skeletons.mjs",
124
92
  "default": "./fesm2022/bravura-ui-skeletons.mjs"
125
93
  },
126
94
  "./stepper": {
127
95
  "types": "./stepper/index.d.ts",
128
- "esm2022": "./esm2022/stepper/bravura-ui-stepper.mjs",
129
- "esm": "./esm2022/stepper/bravura-ui-stepper.mjs",
130
96
  "default": "./fesm2022/bravura-ui-stepper.mjs"
131
97
  },
132
98
  "./tooltip": {
133
99
  "types": "./tooltip/index.d.ts",
134
- "esm2022": "./esm2022/tooltip/bravura-ui-tooltip.mjs",
135
- "esm": "./esm2022/tooltip/bravura-ui-tooltip.mjs",
136
100
  "default": "./fesm2022/bravura-ui-tooltip.mjs"
137
101
  },
138
102
  "./alert/testing": {
139
103
  "types": "./alert/testing/index.d.ts",
140
- "esm2022": "./esm2022/alert/testing/bravura-ui-alert-testing.mjs",
141
- "esm": "./esm2022/alert/testing/bravura-ui-alert-testing.mjs",
142
104
  "default": "./fesm2022/bravura-ui-alert-testing.mjs"
143
105
  },
144
106
  "./radio-panel/testing": {
145
107
  "types": "./radio-panel/testing/index.d.ts",
146
- "esm2022": "./esm2022/radio-panel/testing/bravura-ui-radio-panel-testing.mjs",
147
- "esm": "./esm2022/radio-panel/testing/bravura-ui-radio-panel-testing.mjs",
148
108
  "default": "./fesm2022/bravura-ui-radio-panel-testing.mjs"
149
109
  }
150
110
  },
@@ -1,11 +1,11 @@
1
- @use '@angular/material' as mat;
2
-
3
- @mixin color($theme) {
4
- .bui-radio-panel-checked-icon {
5
- color: mat.get-theme-color($theme, primary);
6
- }
7
- }
8
-
9
- @mixin theme($theme) {
10
- @include color($theme);
11
- }
1
+ @use '@angular/material' as mat;
2
+
3
+ @mixin color($theme) {
4
+ .bui-radio-panel-checked-icon {
5
+ color: mat.get-theme-color($theme, primary);
6
+ }
7
+ }
8
+
9
+ @mixin theme($theme) {
10
+ @include color($theme);
11
+ }
@@ -1,33 +1,33 @@
1
- @use '@angular/material' as mat;
2
- @use 'sass:map';
3
- @use 'sass:meta';
4
-
5
- @mixin color($theme, $options...) {
6
- bui-selection-panel-item {
7
- $option-map: meta.keywords($options);
8
- $color-variant: map.get($option-map, color-variant);
9
-
10
- border-color: mat.get-theme-color($theme, outline-variant);
11
-
12
- .bui-selection-checkbox {
13
- @if $color-variant {
14
- @include mat.checkbox-color($theme, $color-variant: $color-variant);
15
- }
16
- }
17
-
18
- &.bui-selection-checked,
19
- &.bui-selection-checked:not(.bui-disabled:hover, .bui-unselectable) {
20
- border-color: mat.get-theme-color($theme, $color-variant or primary);
21
- }
22
-
23
- &:not(.bui-disabled, .bui-unselectable) {
24
- &:hover {
25
- border-color: mat.get-theme-color($theme, outline);
26
- }
27
- }
28
- }
29
- }
30
-
31
- @mixin theme($theme, $options...) {
32
- @include color($theme, $options...);
33
- }
1
+ @use '@angular/material' as mat;
2
+ @use 'sass:map';
3
+ @use 'sass:meta';
4
+
5
+ @mixin color($theme, $options...) {
6
+ bui-selection-panel-item {
7
+ $option-map: meta.keywords($options);
8
+ $color-variant: map.get($option-map, color-variant);
9
+
10
+ border-color: mat.get-theme-color($theme, outline-variant);
11
+
12
+ .bui-selection-checkbox {
13
+ @if $color-variant {
14
+ @include mat.checkbox-color($theme, $color-variant: $color-variant);
15
+ }
16
+ }
17
+
18
+ &.bui-selection-checked,
19
+ &.bui-selection-checked:not(.bui-disabled:hover, .bui-unselectable) {
20
+ border-color: mat.get-theme-color($theme, $color-variant or primary);
21
+ }
22
+
23
+ &:not(.bui-disabled, .bui-unselectable) {
24
+ &:hover {
25
+ border-color: mat.get-theme-color($theme, outline);
26
+ }
27
+ }
28
+ }
29
+ }
30
+
31
+ @mixin theme($theme, $options...) {
32
+ @include color($theme, $options...);
33
+ }
@@ -1,20 +1,20 @@
1
- @use '@angular/material' as mat;
2
-
3
- @mixin color($theme) {
4
- .bui-step-progress-label {
5
- color: mat.get-theme-color($theme, on-surface-variant);
6
- }
7
-
8
- .bui-stepper-content-container {
9
- border-color: mat.get-theme-color($theme, outline-variant);
10
- background-color: mat.get-theme-color($theme, surface);
11
- }
12
-
13
- .bui-stepper-progress-indicator-section.bui-step-section-interacted {
14
- background-color: mat.get-theme-color($theme, tertiary);
15
- }
16
- }
17
-
18
- @mixin theme($theme) {
19
- @include color($theme);
20
- }
1
+ @use '@angular/material' as mat;
2
+
3
+ @mixin color($theme) {
4
+ .bui-step-progress-label {
5
+ color: mat.get-theme-color($theme, on-surface-variant);
6
+ }
7
+
8
+ .bui-stepper-content-container {
9
+ border-color: mat.get-theme-color($theme, outline-variant);
10
+ background-color: mat.get-theme-color($theme, surface);
11
+ }
12
+
13
+ .bui-stepper-progress-indicator-section.bui-step-section-interacted {
14
+ background-color: mat.get-theme-color($theme, tertiary);
15
+ }
16
+ }
17
+
18
+ @mixin theme($theme) {
19
+ @include color($theme);
20
+ }
@@ -1,112 +1,112 @@
1
- @use 'sass:map';
2
- @use '@angular/material' as mat;
3
- @use './scrollbar.scss' as scrollbar;
4
- @use './bui-card' as card;
5
-
6
- $default-border-color-transition: border-color 100ms cubic-bezier(0.55, 0, 0.55, 0.2);
7
- $mat-foreground-extract: (
8
- 'secondary-text': 'light',
9
- 'hint-text': 'muted',
10
- 'divider': 'divider',
11
- 'base': 'base',
12
- 'inactive': 'inactive'
13
- );
14
-
15
- $mat-background-extract: (
16
- 'card': 'card',
17
- 'background': 'body'
18
- );
19
-
20
- @mixin apply-color($name, $color, $border-color-transition: $default-border-color-transition) {
21
- .bui-border-#{$name} {
22
- border-color: $color !important;
23
- transition: $border-color-transition;
24
- }
25
- .bui-bg-#{$name} {
26
- background-color: $color !important;
27
- }
28
- .bui-color-#{$name} {
29
- color: $color !important;
30
- }
31
- .bui-outline-#{$name} {
32
- outline-color: $color !important;
33
- }
34
- }
35
-
36
- @mixin apply-colors($theme, $border-color-transition: $default-border-color-transition) {
37
- .bui-border-emphasis:hover {
38
- border-color: currentColor !important;
39
- transition: $border-color-transition;
40
- }
41
-
42
- $color-config: mat.m2-get-color-config($theme);
43
- @if $color-config != null {
44
- @include card.bui-card($color-config);
45
- @each $p in (primary, accent, warn) {
46
- $primary-palette: map.get($color-config, $p);
47
- $c: mat.m2-get-color-from-palette($primary-palette, text);
48
- @include apply-color($p, $c, $border-color-transition);
49
- }
50
-
51
- $fg-original: map.get($color-config, 'foreground');
52
- $fg: map.merge(
53
- $fg-original,
54
- (
55
- inactive: rgba(map.get($fg-original, base), 0.06)
56
- )
57
- );
58
-
59
- @each $key, $name in $mat-foreground-extract {
60
- $c: map.get($fg, $key);
61
- @include apply-color($name, $c, $border-color-transition);
62
- }
63
-
64
- .bui-host {
65
- @each $p in (primary, accent, warn) {
66
- $primary-palette: map.get($color-config, $p);
67
- $c: mat.m2-get-color-from-palette($primary-palette, text);
68
- --bui-color-#{$p}: #{$c};
69
- }
70
-
71
- @each $key, $name in $mat-foreground-extract {
72
- $c: map.get($fg, $key);
73
- --bui-color-#{$name}: #{$c};
74
- }
75
-
76
- @each $key, $name in $mat-background-extract {
77
- $bg: map.get($color-config, 'background');
78
- $c: map.get($bg, $key);
79
- --bui-bg-#{$name}: #{$c};
80
- }
81
-
82
- @if map.get($color-config, 'is-dark') == false {
83
- --bui-color-success: #519602;
84
- --bui-color-info: #0dcaf0;
85
- --bui-color-warning: #ffc107;
86
- --bui-color-error: #dc3545;
87
- }
88
- }
89
-
90
- $card-bg: map.get(map.get($color-config, 'background'), 'card');
91
- .iti__country-list {
92
- background-color: $card-bg;
93
- }
94
- }
95
- }
96
-
97
- @mixin theme($theme, $border-color-transition: $default-border-color-transition) {
98
- @include apply-colors($theme, $border-color-transition);
99
- @include scrollbar.bui-scrollbar;
100
-
101
- .mat-icon {
102
- &.fas,
103
- &.far,
104
- &.fab,
105
- &.fa {
106
- display: inline-flex;
107
- justify-content: center;
108
- align-items: center;
109
- font-size: 20px;
110
- }
111
- }
112
- }
1
+ @use 'sass:map';
2
+ @use '@angular/material' as mat;
3
+ @use './scrollbar.scss' as scrollbar;
4
+ @use './bui-card' as card;
5
+
6
+ $default-border-color-transition: border-color 100ms cubic-bezier(0.55, 0, 0.55, 0.2);
7
+ $mat-foreground-extract: (
8
+ 'secondary-text': 'light',
9
+ 'hint-text': 'muted',
10
+ 'divider': 'divider',
11
+ 'base': 'base',
12
+ 'inactive': 'inactive'
13
+ );
14
+
15
+ $mat-background-extract: (
16
+ 'card': 'card',
17
+ 'background': 'body'
18
+ );
19
+
20
+ @mixin apply-color($name, $color, $border-color-transition: $default-border-color-transition) {
21
+ .bui-border-#{$name} {
22
+ border-color: $color !important;
23
+ transition: $border-color-transition;
24
+ }
25
+ .bui-bg-#{$name} {
26
+ background-color: $color !important;
27
+ }
28
+ .bui-color-#{$name} {
29
+ color: $color !important;
30
+ }
31
+ .bui-outline-#{$name} {
32
+ outline-color: $color !important;
33
+ }
34
+ }
35
+
36
+ @mixin apply-colors($theme, $border-color-transition: $default-border-color-transition) {
37
+ .bui-border-emphasis:hover {
38
+ border-color: currentColor !important;
39
+ transition: $border-color-transition;
40
+ }
41
+
42
+ $color-config: mat.m2-get-color-config($theme);
43
+ @if $color-config != null {
44
+ @include card.bui-card($color-config);
45
+ @each $p in (primary, accent, warn) {
46
+ $primary-palette: map.get($color-config, $p);
47
+ $c: mat.m2-get-color-from-palette($primary-palette, text);
48
+ @include apply-color($p, $c, $border-color-transition);
49
+ }
50
+
51
+ $fg-original: map.get($color-config, 'foreground');
52
+ $fg: map.merge(
53
+ $fg-original,
54
+ (
55
+ inactive: rgba(map.get($fg-original, base), 0.06)
56
+ )
57
+ );
58
+
59
+ @each $key, $name in $mat-foreground-extract {
60
+ $c: map.get($fg, $key);
61
+ @include apply-color($name, $c, $border-color-transition);
62
+ }
63
+
64
+ .bui-host {
65
+ @each $p in (primary, accent, warn) {
66
+ $primary-palette: map.get($color-config, $p);
67
+ $c: mat.m2-get-color-from-palette($primary-palette, text);
68
+ --bui-color-#{$p}: #{$c};
69
+ }
70
+
71
+ @each $key, $name in $mat-foreground-extract {
72
+ $c: map.get($fg, $key);
73
+ --bui-color-#{$name}: #{$c};
74
+ }
75
+
76
+ @each $key, $name in $mat-background-extract {
77
+ $bg: map.get($color-config, 'background');
78
+ $c: map.get($bg, $key);
79
+ --bui-bg-#{$name}: #{$c};
80
+ }
81
+
82
+ @if map.get($color-config, 'is-dark') == false {
83
+ --bui-color-success: #519602;
84
+ --bui-color-info: #0dcaf0;
85
+ --bui-color-warning: #ffc107;
86
+ --bui-color-error: #dc3545;
87
+ }
88
+ }
89
+
90
+ $card-bg: map.get(map.get($color-config, 'background'), 'card');
91
+ .iti__country-list {
92
+ background-color: $card-bg;
93
+ }
94
+ }
95
+ }
96
+
97
+ @mixin theme($theme, $border-color-transition: $default-border-color-transition) {
98
+ @include apply-colors($theme, $border-color-transition);
99
+ @include scrollbar.bui-scrollbar;
100
+
101
+ .mat-icon {
102
+ &.fas,
103
+ &.far,
104
+ &.fab,
105
+ &.fa {
106
+ display: inline-flex;
107
+ justify-content: center;
108
+ align-items: center;
109
+ font-size: 20px;
110
+ }
111
+ }
112
+ }