@sd-angular/core 19.0.13 → 19.0.14

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 (166) hide show
  1. package/README.md +712 -712
  2. package/assets/STYLE-GUIDE.md +601 -601
  3. package/assets/images/coming-soon.svg +22 -22
  4. package/assets/images/data-empty.svg +20 -20
  5. package/assets/images/expired.svg +21 -21
  6. package/assets/images/file-error.svg +27 -27
  7. package/assets/images/filter-empty.svg +19 -19
  8. package/assets/images/filter-required.svg +20 -20
  9. package/assets/images/forbidden.svg +14 -14
  10. package/assets/images/image-error.svg +26 -26
  11. package/assets/images/maintenance.svg +22 -22
  12. package/assets/images/not-found.svg +19 -19
  13. package/assets/images/offline.svg +19 -19
  14. package/assets/images/submitted.svg +17 -17
  15. package/assets/images/success.svg +17 -17
  16. package/assets/images/unauthorized.svg +21 -21
  17. package/assets/images/unknown-error.svg +17 -17
  18. package/assets/scss/ckeditor5.scss +88 -88
  19. package/assets/scss/core/_inline-edit.scss +105 -105
  20. package/assets/scss/core/color.scss +73 -73
  21. package/assets/scss/core/form.scss +317 -317
  22. package/assets/scss/core/image.scss +35 -35
  23. package/assets/scss/core/utilities/_base.scss +333 -333
  24. package/assets/scss/core/utilities/_border.scss +22 -22
  25. package/assets/scss/core/utilities/_display.scss +10 -10
  26. package/assets/scss/core/utilities/_elevation.scss +80 -80
  27. package/assets/scss/core/utilities/_flexbox.scss +54 -54
  28. package/assets/scss/core/utilities/_gap.scss +9 -9
  29. package/assets/scss/core/utilities/_index.scss +17 -17
  30. package/assets/scss/core/utilities/_misc.scss +20 -20
  31. package/assets/scss/core/utilities/_overflow.scss +9 -9
  32. package/assets/scss/core/utilities/_position.scss +8 -8
  33. package/assets/scss/core/utilities/_sizing.scss +28 -28
  34. package/assets/scss/core/utilities/_spacing.scss +31 -31
  35. package/assets/scss/core/utilities/_typography.scss +99 -99
  36. package/assets/scss/sd-core.scss +16 -16
  37. package/assets/scss/themes/default.scss +45 -45
  38. package/assets/scss/themes/material-theme.scss +101 -101
  39. package/components/preview/src/preview-pdf/pdf-worker-inline.generated.d.ts +7 -0
  40. package/components/table/src/services/table-export/table-export.service.d.ts +3 -1
  41. package/components/table/src/table.component.d.ts +1 -1
  42. package/fesm2022/sd-angular-core-components-anchor.mjs +6 -6
  43. package/fesm2022/sd-angular-core-components-anchor.mjs.map +1 -1
  44. package/fesm2022/sd-angular-core-components-autoid-inspector.mjs +2 -2
  45. package/fesm2022/sd-angular-core-components-autoid-inspector.mjs.map +1 -1
  46. package/fesm2022/sd-angular-core-components-badge.mjs +2 -2
  47. package/fesm2022/sd-angular-core-components-badge.mjs.map +1 -1
  48. package/fesm2022/sd-angular-core-components-base.mjs.map +1 -1
  49. package/fesm2022/sd-angular-core-components-button.mjs +2 -2
  50. package/fesm2022/sd-angular-core-components-button.mjs.map +1 -1
  51. package/fesm2022/sd-angular-core-components-chart.mjs +40 -40
  52. package/fesm2022/sd-angular-core-components-chart.mjs.map +1 -1
  53. package/fesm2022/sd-angular-core-components-ckeditor-styles.mjs.map +1 -1
  54. package/fesm2022/sd-angular-core-components-code-editor.mjs +2 -2
  55. package/fesm2022/sd-angular-core-components-code-editor.mjs.map +1 -1
  56. package/fesm2022/sd-angular-core-components-document-builder.mjs +77 -77
  57. package/fesm2022/sd-angular-core-components-document-builder.mjs.map +1 -1
  58. package/fesm2022/sd-angular-core-components-editor.mjs +2 -2
  59. package/fesm2022/sd-angular-core-components-editor.mjs.map +1 -1
  60. package/fesm2022/sd-angular-core-components-form-generic.mjs +106 -106
  61. package/fesm2022/sd-angular-core-components-form-generic.mjs.map +1 -1
  62. package/fesm2022/sd-angular-core-components-history.mjs +2 -2
  63. package/fesm2022/sd-angular-core-components-history.mjs.map +1 -1
  64. package/fesm2022/sd-angular-core-components-import-excel.mjs +2 -2
  65. package/fesm2022/sd-angular-core-components-import-excel.mjs.map +1 -1
  66. package/fesm2022/sd-angular-core-components-inform.mjs.map +1 -1
  67. package/fesm2022/sd-angular-core-components-mini-editor.mjs +2 -2
  68. package/fesm2022/sd-angular-core-components-mini-editor.mjs.map +1 -1
  69. package/fesm2022/sd-angular-core-components-modal-resizable.mjs +2 -2
  70. package/fesm2022/sd-angular-core-components-modal-resizable.mjs.map +1 -1
  71. package/fesm2022/sd-angular-core-components-modal.mjs +2 -2
  72. package/fesm2022/sd-angular-core-components-modal.mjs.map +1 -1
  73. package/fesm2022/sd-angular-core-components-operator.mjs +2 -2
  74. package/fesm2022/sd-angular-core-components-operator.mjs.map +1 -1
  75. package/fesm2022/sd-angular-core-components-org-chart.mjs +2 -2
  76. package/fesm2022/sd-angular-core-components-org-chart.mjs.map +1 -1
  77. package/fesm2022/sd-angular-core-components-preview.mjs +32 -6
  78. package/fesm2022/sd-angular-core-components-preview.mjs.map +1 -1
  79. package/fesm2022/sd-angular-core-components-query-bar.mjs +10 -10
  80. package/fesm2022/sd-angular-core-components-query-bar.mjs.map +1 -1
  81. package/fesm2022/sd-angular-core-components-query-builder.mjs +2 -2
  82. package/fesm2022/sd-angular-core-components-query-builder.mjs.map +1 -1
  83. package/fesm2022/sd-angular-core-components-section.mjs +4 -4
  84. package/fesm2022/sd-angular-core-components-section.mjs.map +1 -1
  85. package/fesm2022/sd-angular-core-components-side-drawer.mjs +2 -2
  86. package/fesm2022/sd-angular-core-components-side-drawer.mjs.map +1 -1
  87. package/fesm2022/sd-angular-core-components-stepper.mjs +2 -2
  88. package/fesm2022/sd-angular-core-components-stepper.mjs.map +1 -1
  89. package/fesm2022/sd-angular-core-components-tab-router.mjs +6 -6
  90. package/fesm2022/sd-angular-core-components-tab-router.mjs.map +1 -1
  91. package/fesm2022/sd-angular-core-components-tab.mjs +2 -2
  92. package/fesm2022/sd-angular-core-components-tab.mjs.map +1 -1
  93. package/fesm2022/sd-angular-core-components-table.mjs +32 -17
  94. package/fesm2022/sd-angular-core-components-table.mjs.map +1 -1
  95. package/fesm2022/sd-angular-core-components-upload-file.mjs +4 -4
  96. package/fesm2022/sd-angular-core-components-upload-file.mjs.map +1 -1
  97. package/fesm2022/sd-angular-core-components-view.mjs +2 -2
  98. package/fesm2022/sd-angular-core-components-view.mjs.map +1 -1
  99. package/fesm2022/sd-angular-core-configurations.mjs.map +1 -1
  100. package/fesm2022/sd-angular-core-directives.mjs +20 -20
  101. package/fesm2022/sd-angular-core-directives.mjs.map +1 -1
  102. package/fesm2022/sd-angular-core-forms-autocomplete.mjs +2 -2
  103. package/fesm2022/sd-angular-core-forms-autocomplete.mjs.map +1 -1
  104. package/fesm2022/sd-angular-core-forms-checkbox.mjs +2 -2
  105. package/fesm2022/sd-angular-core-forms-checkbox.mjs.map +1 -1
  106. package/fesm2022/sd-angular-core-forms-chip-calendar.mjs +2 -2
  107. package/fesm2022/sd-angular-core-forms-chip-calendar.mjs.map +1 -1
  108. package/fesm2022/sd-angular-core-forms-chip.mjs +2 -2
  109. package/fesm2022/sd-angular-core-forms-chip.mjs.map +1 -1
  110. package/fesm2022/sd-angular-core-forms-date-range.mjs +2 -2
  111. package/fesm2022/sd-angular-core-forms-date-range.mjs.map +1 -1
  112. package/fesm2022/sd-angular-core-forms-date.mjs +114 -35
  113. package/fesm2022/sd-angular-core-forms-date.mjs.map +1 -1
  114. package/fesm2022/sd-angular-core-forms-datetime.mjs +6 -6
  115. package/fesm2022/sd-angular-core-forms-datetime.mjs.map +1 -1
  116. package/fesm2022/sd-angular-core-forms-directives.mjs.map +1 -1
  117. package/fesm2022/sd-angular-core-forms-inline-text.mjs +2 -2
  118. package/fesm2022/sd-angular-core-forms-inline-text.mjs.map +1 -1
  119. package/fesm2022/sd-angular-core-forms-input-color.mjs +2 -2
  120. package/fesm2022/sd-angular-core-forms-input-color.mjs.map +1 -1
  121. package/fesm2022/sd-angular-core-forms-input-number.mjs.map +1 -1
  122. package/fesm2022/sd-angular-core-forms-input.mjs +2 -2
  123. package/fesm2022/sd-angular-core-forms-input.mjs.map +1 -1
  124. package/fesm2022/sd-angular-core-forms-label.mjs +2 -2
  125. package/fesm2022/sd-angular-core-forms-label.mjs.map +1 -1
  126. package/fesm2022/sd-angular-core-forms-models.mjs.map +1 -1
  127. package/fesm2022/sd-angular-core-forms-radio.mjs +2 -2
  128. package/fesm2022/sd-angular-core-forms-radio.mjs.map +1 -1
  129. package/fesm2022/sd-angular-core-forms-select.mjs +2 -2
  130. package/fesm2022/sd-angular-core-forms-select.mjs.map +1 -1
  131. package/fesm2022/sd-angular-core-forms-switch.mjs +2 -2
  132. package/fesm2022/sd-angular-core-forms-switch.mjs.map +1 -1
  133. package/fesm2022/sd-angular-core-forms-textarea.mjs +2 -2
  134. package/fesm2022/sd-angular-core-forms-textarea.mjs.map +1 -1
  135. package/fesm2022/sd-angular-core-handlers.mjs.map +1 -1
  136. package/fesm2022/sd-angular-core-i18n.mjs +20 -0
  137. package/fesm2022/sd-angular-core-i18n.mjs.map +1 -1
  138. package/fesm2022/sd-angular-core-interceptors.mjs.map +1 -1
  139. package/fesm2022/sd-angular-core-modules-auth.mjs.map +1 -1
  140. package/fesm2022/sd-angular-core-modules-authom.mjs.map +1 -1
  141. package/fesm2022/sd-angular-core-modules-keycloak.mjs.map +1 -1
  142. package/fesm2022/sd-angular-core-modules-layout.mjs +130 -43
  143. package/fesm2022/sd-angular-core-modules-layout.mjs.map +1 -1
  144. package/fesm2022/sd-angular-core-modules-permission.mjs.map +1 -1
  145. package/fesm2022/sd-angular-core-pipes.mjs.map +1 -1
  146. package/fesm2022/sd-angular-core-services-api.mjs.map +1 -1
  147. package/fesm2022/sd-angular-core-services-cache.mjs.map +1 -1
  148. package/fesm2022/sd-angular-core-services-confirm.mjs +2 -2
  149. package/fesm2022/sd-angular-core-services-confirm.mjs.map +1 -1
  150. package/fesm2022/sd-angular-core-services-docx.mjs.map +1 -1
  151. package/fesm2022/sd-angular-core-services-excel.mjs.map +1 -1
  152. package/fesm2022/sd-angular-core-services-license.mjs.map +1 -1
  153. package/fesm2022/sd-angular-core-services-loading.mjs +5 -5
  154. package/fesm2022/sd-angular-core-services-loading.mjs.map +1 -1
  155. package/fesm2022/sd-angular-core-services-notify.mjs +12 -12
  156. package/fesm2022/sd-angular-core-services-notify.mjs.map +1 -1
  157. package/fesm2022/sd-angular-core-services-storage.mjs.map +1 -1
  158. package/fesm2022/sd-angular-core-utilities-data-state.mjs.map +1 -1
  159. package/fesm2022/sd-angular-core-utilities-extensions.mjs.map +1 -1
  160. package/forms/date/src/date.component.d.ts +9 -1
  161. package/i18n/src/en.d.ts +4 -0
  162. package/modules/layout/index.d.ts +1 -0
  163. package/modules/layout/utils/index.d.ts +1 -0
  164. package/modules/layout/utils/tab-name.util.d.ts +8 -0
  165. package/package.json +73 -73
  166. package/sd-angular-core-19.0.13.tgz +0 -0
@@ -1,317 +1,317 @@
1
- @use './color.scss' as color;
2
- @use 'sass:map';
3
-
4
- // Form field
5
- .mat-mdc-form-field {
6
- font-size: 16px;
7
- width: 100%;
8
-
9
- // Xử lý tô màu required
10
- .mat-mdc-form-field-required-marker {
11
- color: map.get(color.$color_map, 'error');
12
- }
13
-
14
- // Xử lý màu border nhạt bớt
15
- .mat-mdc-notch-piece {
16
- &.mdc-notched-outline__leading {
17
- border-color: map.get(color.$color_map, 'black200') !important;
18
- }
19
- &.mdc-notched-outline__notch {
20
- border-top-color: map.get(color.$color_map, 'black200') !important;
21
- border-bottom-color: map.get(color.$color_map, 'black200') !important;
22
- }
23
- &.mdc-notched-outline__trailing {
24
- border-color: map.get(color.$color_map, 'black200') !important;
25
- }
26
- }
27
-
28
- // Xử lý icon
29
- .sd-suffix-icon {
30
- color: #757575;
31
- &:hover {
32
- color: #616161;
33
- }
34
- }
35
-
36
- // why: nút clear "thanh mảnh" dùng chung cho sd-select/sd-date/sd-datetime —
37
- // hình tròn nền trong suốt, hover mới hiện nền xám + chuyển đỏ. Icon `close`
38
- // (nét mảnh) thay cho `cancel` (tròn đặc, trông "mập"). Đồng bộ với sd-input-color.
39
- .sd-clear-btn {
40
- display: inline-flex;
41
- align-items: center;
42
- justify-content: center;
43
- width: 20px;
44
- height: 20px;
45
- border-radius: 50%;
46
- border: 0;
47
- padding: 0;
48
- background: transparent;
49
- cursor: pointer;
50
- color: #757575;
51
- transition: background-color 80ms ease, color 80ms ease;
52
-
53
- &:hover {
54
- background: rgba(0, 0, 0, 0.06);
55
- color: map.get(color.$color_map, 'error');
56
- }
57
-
58
- mat-icon {
59
- font-size: 16px;
60
- width: 16px;
61
- height: 16px;
62
- line-height: 16px;
63
- }
64
- }
65
-
66
- // why: biến thể hover-gate — nút clear ẩn cho tới khi hover (hoặc field đang
67
- // focus, để người dùng bàn phím vẫn thấy). Dùng cho sd-input/sd-input-number/
68
- // sd-input-color/sd-date/sd-datetime. KHÔNG dùng cho sd-select/sd-autocomplete
69
- // vì ở đó clear thay thế icon dropdown/search nên phải luôn hiển thị.
70
- .sd-clear-btn.sd-hover {
71
- visibility: hidden;
72
- }
73
- .mat-mdc-form-field-flex:hover .sd-clear-btn.sd-hover,
74
- .mat-mdc-form-field-flex:focus-within .sd-clear-btn.sd-hover {
75
- visibility: visible;
76
- }
77
-
78
- // sdSuffixIcon
79
- // Directive sdSuffixIcon (truyền icon từ component sử dụng vào Core)
80
- .sd-suffix-icon.sd-hover {
81
- visibility: hidden;
82
- }
83
-
84
- // Chỉ hiển thị khi được hover
85
- .mat-mdc-form-field-flex {
86
- &:hover {
87
- .sd-suffix-icon.sd-hover {
88
- visibility: visible;
89
- }
90
- }
91
- }
92
-
93
- .mat-mdc-form-field-prefix,
94
- .mat-mdc-form-field-suffix {
95
- display: inline-flex;
96
- align-items: center;
97
- }
98
-
99
- &.mat-form-field-appearance-outline {
100
- .mat-mdc-form-field-flex {
101
- align-items: center;
102
- }
103
-
104
- .mat-mdc-form-field-infix {
105
- mat-select.mat-mdc-select,
106
- mat-date-range-input.mat-mdc-date-range-input,
107
- input.mat-mdc-input-element,
108
- textarea.mat-mdc-input-element {
109
- font-size: 14px;
110
- margin-top: 10px; // Text hiển thị trong auto complete
111
- }
112
- }
113
-
114
- .mat-mdc-form-field-suffix {
115
- top: 3.5px;
116
- }
117
-
118
- &.mat-mdc-form-field-type-mat-date-range-input,
119
- &.c-form-field-date-input,
120
- &.c-form-field-datetime-input {
121
- .mdc-notched-outline__notch {
122
- max-width: calc(100% - 60px);
123
- }
124
- }
125
- }
126
-
127
- // Bỏ padding nếu hideInlineError
128
- &.hide-inline-error {
129
- .mat-mdc-form-field-subscript-wrapper {
130
- display: none;
131
- }
132
-
133
- &.mat-form-field-invalid {
134
- .mat-mdc-notch-piece {
135
- &.mdc-notched-outline__leading {
136
- border-color: map.get(color.$color_map, 'error') !important;
137
- }
138
- &.mdc-notched-outline__notch {
139
- border-top-color: map.get(color.$color_map, 'error') !important;
140
- border-bottom-color: map.get(color.$color_map, 'error') !important;
141
- }
142
- &.mdc-notched-outline__trailing {
143
- border-color: map.get(color.$color_map, 'error') !important;
144
- }
145
- }
146
- }
147
- }
148
-
149
- // Size normal`
150
- &.sd-md {
151
- --mat-form-field-container-height: 40px;
152
- --mat-form-field-container-vertical-padding: 3px;
153
-
154
- &.mat-form-field-appearance-outline {
155
- .mat-mdc-form-field-infix {
156
- padding: 0 0 8px 0 !important;
157
- border-top-width: 11.5px;
158
- min-height: 43.5px;
159
- width: auto;
160
- }
161
-
162
- .mat-mdc-form-field-label-wrapper {
163
- font-size: 14px;
164
- padding-top: 12px;
165
- top: -18px;
166
- }
167
-
168
- .mat-mdc-form-field-icon-suffix {
169
- top: 0;
170
- right: 0;
171
- padding: 0 12px;
172
- display: flex;
173
- align-items: center;
174
- gap: 8px;
175
-
176
- .sd-suffix-icon,
177
- .sd-error-icon {
178
- height: 20px;
179
- width: 20px;
180
- font-size: 20px;
181
- text-align: center;
182
- padding: 0;
183
- }
184
- }
185
-
186
- .mat-mdc-form-field-icon-prefix {
187
- top: 0;
188
- right: 0;
189
- padding: 0 8px;
190
- .sd-prefix-icon {
191
- height: 20px;
192
- width: 20px;
193
- font-size: 20px;
194
- text-align: center;
195
- padding: 0;
196
- }
197
- }
198
-
199
- &.mat-mdc-form-field-can-float {
200
- &.mat-mdc-form-field-should-float {
201
- .mat-mdc-form-field-label {
202
- transform: translateY(-18px) scale(0.75);
203
- width: 133.33333%;
204
- }
205
- }
206
- }
207
- }
208
- }
209
-
210
- // Size small
211
- &.sd-sm {
212
- --mat-form-field-container-height: 32px;
213
- --mat-form-field-container-vertical-padding: 3px;
214
-
215
- &.mat-form-field-appearance-outline {
216
- .mat-mdc-form-field-infix {
217
- border-top-width: 6px;
218
- min-height: 32px;
219
- width: auto;
220
-
221
- mat-select.mat-mdc-select,
222
- mat-date-range-input.mat-mdc-date-range-input,
223
- input.mat-mdc-input-element,
224
- textarea.mat-mdc-input-element {
225
- margin-top: 2px; // Text hiển thị trong auto complete
226
- font-size: 14px;
227
- }
228
- }
229
-
230
- .mat-mdc-form-field-label-wrapper {
231
- font-size: 14px;
232
- padding-top: 8px;
233
- top: -14px;
234
- }
235
-
236
- .mat-mdc-form-field-icon-suffix {
237
- top: 0;
238
- right: 0;
239
- padding: 0 8px;
240
- display: flex;
241
- align-items: center;
242
- gap: 4px;
243
-
244
- .sd-suffix-icon,
245
- .sd-error-icon {
246
- height: 16px;
247
- width: 16px;
248
- font-size: 16px;
249
- text-align: center;
250
- padding: 0;
251
- }
252
- }
253
-
254
- .mat-mdc-form-field-icon-prefix {
255
- top: 0;
256
- left: 0;
257
- padding: 0 4px;
258
-
259
- .sd-prefix-icon {
260
- height: 16px;
261
- width: 16px;
262
- font-size: 16px;
263
- text-align: center;
264
- padding: 0;
265
- }
266
- }
267
-
268
- &.mat-mdc-form-field-can-float {
269
- .mat-mdc-form-field-label {
270
- top: 22px;
271
- }
272
-
273
- &.mat-mdc-form-field-should-float {
274
- .mat-mdc-form-field-label {
275
- transform: translateY(-10px) scale(0.75);
276
- width: 133.33333%;
277
- }
278
- }
279
- }
280
-
281
- // Fix for date range and datetime inputs with small size
282
- &.c-form-field-date-input,
283
- &.c-form-field-datetime-input {
284
- .mdc-notched-outline__notch {
285
- max-width: calc(100% - 50px);
286
- }
287
- }
288
- }
289
- }
290
- }
291
-
292
- // Override reboot rule `label { margin-bottom: 0.5rem }` cho mat-checkbox layout
293
- mat-checkbox {
294
- label.mat-mdc-checkbox-layout {
295
- margin-bottom: 0;
296
- }
297
- }
298
-
299
- // why: selector radio của <sd-table> (.c-selection, single mode) hiện một dấu chấm tối thừa
300
- // nằm cạnh vòng radio. Nguồn gốc THẬT là state-layer padding của Material trên `.mdc-radio`
301
- // (`padding: calc((var(--mdc-radio-state-layer-size) - 20px) / 2)`): trong cột selector, .c-selection
302
- // bị scale(0.85) (xem table.component.scss) còn `.mdc-radio` có `will-change: transform` nên lên
303
- // compositing layer riêng → phần `.mdc-radio__inner-circle` (transform: scale(0), border 10px màu
304
- // tối) bị render rớt lại ~1px artifact trong dải padding đó, đọc thành "dấu chấm". Bỏ state-layer
305
- // padding cho radio selector compact là khử sạch (vòng 20px + scale 0.85 vẫn căn giữa). Scope theo
306
- // `.c-selection` nên KHÔNG ảnh hưởng radio ở nơi khác (giữ nguyên vùng hover/state-layer của chúng).
307
- //
308
- // LƯU Ý: cách trước (`label.mdc-label:empty { display:none }`) KHÔNG khử được dot — nó chỉ TÁCH dot
309
- // thành 2 dấu chấm (label rỗng vốn đang phủ chồng lên artifact). Đã thay bằng fix dưới đây.
310
- .c-selection.mat-mdc-radio-button .mdc-radio {
311
- padding: 0;
312
- }
313
-
314
- // Placeholder mặc định 1rem (16px), mong muốn nên là 14px
315
- .mat-mdc-floating-label {
316
- font-size: 14px !important;
317
- }
1
+ @use './color.scss' as color;
2
+ @use 'sass:map';
3
+
4
+ // Form field
5
+ .mat-mdc-form-field {
6
+ font-size: 16px;
7
+ width: 100%;
8
+
9
+ // Xử lý tô màu required
10
+ .mat-mdc-form-field-required-marker {
11
+ color: map.get(color.$color_map, 'error');
12
+ }
13
+
14
+ // Xử lý màu border nhạt bớt
15
+ .mat-mdc-notch-piece {
16
+ &.mdc-notched-outline__leading {
17
+ border-color: map.get(color.$color_map, 'black200') !important;
18
+ }
19
+ &.mdc-notched-outline__notch {
20
+ border-top-color: map.get(color.$color_map, 'black200') !important;
21
+ border-bottom-color: map.get(color.$color_map, 'black200') !important;
22
+ }
23
+ &.mdc-notched-outline__trailing {
24
+ border-color: map.get(color.$color_map, 'black200') !important;
25
+ }
26
+ }
27
+
28
+ // Xử lý icon
29
+ .sd-suffix-icon {
30
+ color: #757575;
31
+ &:hover {
32
+ color: #616161;
33
+ }
34
+ }
35
+
36
+ // why: nút clear "thanh mảnh" dùng chung cho sd-select/sd-date/sd-datetime —
37
+ // hình tròn nền trong suốt, hover mới hiện nền xám + chuyển đỏ. Icon `close`
38
+ // (nét mảnh) thay cho `cancel` (tròn đặc, trông "mập"). Đồng bộ với sd-input-color.
39
+ .sd-clear-btn {
40
+ display: inline-flex;
41
+ align-items: center;
42
+ justify-content: center;
43
+ width: 20px;
44
+ height: 20px;
45
+ border-radius: 50%;
46
+ border: 0;
47
+ padding: 0;
48
+ background: transparent;
49
+ cursor: pointer;
50
+ color: #757575;
51
+ transition: background-color 80ms ease, color 80ms ease;
52
+
53
+ &:hover {
54
+ background: rgba(0, 0, 0, 0.06);
55
+ color: map.get(color.$color_map, 'error');
56
+ }
57
+
58
+ mat-icon {
59
+ font-size: 16px;
60
+ width: 16px;
61
+ height: 16px;
62
+ line-height: 16px;
63
+ }
64
+ }
65
+
66
+ // why: biến thể hover-gate — nút clear ẩn cho tới khi hover (hoặc field đang
67
+ // focus, để người dùng bàn phím vẫn thấy). Dùng cho sd-input/sd-input-number/
68
+ // sd-input-color/sd-date/sd-datetime. KHÔNG dùng cho sd-select/sd-autocomplete
69
+ // vì ở đó clear thay thế icon dropdown/search nên phải luôn hiển thị.
70
+ .sd-clear-btn.sd-hover {
71
+ visibility: hidden;
72
+ }
73
+ .mat-mdc-form-field-flex:hover .sd-clear-btn.sd-hover,
74
+ .mat-mdc-form-field-flex:focus-within .sd-clear-btn.sd-hover {
75
+ visibility: visible;
76
+ }
77
+
78
+ // sdSuffixIcon
79
+ // Directive sdSuffixIcon (truyền icon từ component sử dụng vào Core)
80
+ .sd-suffix-icon.sd-hover {
81
+ visibility: hidden;
82
+ }
83
+
84
+ // Chỉ hiển thị khi được hover
85
+ .mat-mdc-form-field-flex {
86
+ &:hover {
87
+ .sd-suffix-icon.sd-hover {
88
+ visibility: visible;
89
+ }
90
+ }
91
+ }
92
+
93
+ .mat-mdc-form-field-prefix,
94
+ .mat-mdc-form-field-suffix {
95
+ display: inline-flex;
96
+ align-items: center;
97
+ }
98
+
99
+ &.mat-form-field-appearance-outline {
100
+ .mat-mdc-form-field-flex {
101
+ align-items: center;
102
+ }
103
+
104
+ .mat-mdc-form-field-infix {
105
+ mat-select.mat-mdc-select,
106
+ mat-date-range-input.mat-mdc-date-range-input,
107
+ input.mat-mdc-input-element,
108
+ textarea.mat-mdc-input-element {
109
+ font-size: 14px;
110
+ margin-top: 10px; // Text hiển thị trong auto complete
111
+ }
112
+ }
113
+
114
+ .mat-mdc-form-field-suffix {
115
+ top: 3.5px;
116
+ }
117
+
118
+ &.mat-mdc-form-field-type-mat-date-range-input,
119
+ &.c-form-field-date-input,
120
+ &.c-form-field-datetime-input {
121
+ .mdc-notched-outline__notch {
122
+ max-width: calc(100% - 60px);
123
+ }
124
+ }
125
+ }
126
+
127
+ // Bỏ padding nếu hideInlineError
128
+ &.hide-inline-error {
129
+ .mat-mdc-form-field-subscript-wrapper {
130
+ display: none;
131
+ }
132
+
133
+ &.mat-form-field-invalid {
134
+ .mat-mdc-notch-piece {
135
+ &.mdc-notched-outline__leading {
136
+ border-color: map.get(color.$color_map, 'error') !important;
137
+ }
138
+ &.mdc-notched-outline__notch {
139
+ border-top-color: map.get(color.$color_map, 'error') !important;
140
+ border-bottom-color: map.get(color.$color_map, 'error') !important;
141
+ }
142
+ &.mdc-notched-outline__trailing {
143
+ border-color: map.get(color.$color_map, 'error') !important;
144
+ }
145
+ }
146
+ }
147
+ }
148
+
149
+ // Size normal`
150
+ &.sd-md {
151
+ --mat-form-field-container-height: 40px;
152
+ --mat-form-field-container-vertical-padding: 3px;
153
+
154
+ &.mat-form-field-appearance-outline {
155
+ .mat-mdc-form-field-infix {
156
+ padding: 0 0 8px 0 !important;
157
+ border-top-width: 11.5px;
158
+ min-height: 43.5px;
159
+ width: auto;
160
+ }
161
+
162
+ .mat-mdc-form-field-label-wrapper {
163
+ font-size: 14px;
164
+ padding-top: 12px;
165
+ top: -18px;
166
+ }
167
+
168
+ .mat-mdc-form-field-icon-suffix {
169
+ top: 0;
170
+ right: 0;
171
+ padding: 0 12px;
172
+ display: flex;
173
+ align-items: center;
174
+ gap: 8px;
175
+
176
+ .sd-suffix-icon,
177
+ .sd-error-icon {
178
+ height: 20px;
179
+ width: 20px;
180
+ font-size: 20px;
181
+ text-align: center;
182
+ padding: 0;
183
+ }
184
+ }
185
+
186
+ .mat-mdc-form-field-icon-prefix {
187
+ top: 0;
188
+ right: 0;
189
+ padding: 0 8px;
190
+ .sd-prefix-icon {
191
+ height: 20px;
192
+ width: 20px;
193
+ font-size: 20px;
194
+ text-align: center;
195
+ padding: 0;
196
+ }
197
+ }
198
+
199
+ &.mat-mdc-form-field-can-float {
200
+ &.mat-mdc-form-field-should-float {
201
+ .mat-mdc-form-field-label {
202
+ transform: translateY(-18px) scale(0.75);
203
+ width: 133.33333%;
204
+ }
205
+ }
206
+ }
207
+ }
208
+ }
209
+
210
+ // Size small
211
+ &.sd-sm {
212
+ --mat-form-field-container-height: 32px;
213
+ --mat-form-field-container-vertical-padding: 3px;
214
+
215
+ &.mat-form-field-appearance-outline {
216
+ .mat-mdc-form-field-infix {
217
+ border-top-width: 6px;
218
+ min-height: 32px;
219
+ width: auto;
220
+
221
+ mat-select.mat-mdc-select,
222
+ mat-date-range-input.mat-mdc-date-range-input,
223
+ input.mat-mdc-input-element,
224
+ textarea.mat-mdc-input-element {
225
+ margin-top: 2px; // Text hiển thị trong auto complete
226
+ font-size: 14px;
227
+ }
228
+ }
229
+
230
+ .mat-mdc-form-field-label-wrapper {
231
+ font-size: 14px;
232
+ padding-top: 8px;
233
+ top: -14px;
234
+ }
235
+
236
+ .mat-mdc-form-field-icon-suffix {
237
+ top: 0;
238
+ right: 0;
239
+ padding: 0 8px;
240
+ display: flex;
241
+ align-items: center;
242
+ gap: 4px;
243
+
244
+ .sd-suffix-icon,
245
+ .sd-error-icon {
246
+ height: 16px;
247
+ width: 16px;
248
+ font-size: 16px;
249
+ text-align: center;
250
+ padding: 0;
251
+ }
252
+ }
253
+
254
+ .mat-mdc-form-field-icon-prefix {
255
+ top: 0;
256
+ left: 0;
257
+ padding: 0 4px;
258
+
259
+ .sd-prefix-icon {
260
+ height: 16px;
261
+ width: 16px;
262
+ font-size: 16px;
263
+ text-align: center;
264
+ padding: 0;
265
+ }
266
+ }
267
+
268
+ &.mat-mdc-form-field-can-float {
269
+ .mat-mdc-form-field-label {
270
+ top: 22px;
271
+ }
272
+
273
+ &.mat-mdc-form-field-should-float {
274
+ .mat-mdc-form-field-label {
275
+ transform: translateY(-10px) scale(0.75);
276
+ width: 133.33333%;
277
+ }
278
+ }
279
+ }
280
+
281
+ // Fix for date range and datetime inputs with small size
282
+ &.c-form-field-date-input,
283
+ &.c-form-field-datetime-input {
284
+ .mdc-notched-outline__notch {
285
+ max-width: calc(100% - 50px);
286
+ }
287
+ }
288
+ }
289
+ }
290
+ }
291
+
292
+ // Override reboot rule `label { margin-bottom: 0.5rem }` cho mat-checkbox layout
293
+ mat-checkbox {
294
+ label.mat-mdc-checkbox-layout {
295
+ margin-bottom: 0;
296
+ }
297
+ }
298
+
299
+ // why: selector radio của <sd-table> (.c-selection, single mode) hiện một dấu chấm tối thừa
300
+ // nằm cạnh vòng radio. Nguồn gốc THẬT là state-layer padding của Material trên `.mdc-radio`
301
+ // (`padding: calc((var(--mdc-radio-state-layer-size) - 20px) / 2)`): trong cột selector, .c-selection
302
+ // bị scale(0.85) (xem table.component.scss) còn `.mdc-radio` có `will-change: transform` nên lên
303
+ // compositing layer riêng → phần `.mdc-radio__inner-circle` (transform: scale(0), border 10px màu
304
+ // tối) bị render rớt lại ~1px artifact trong dải padding đó, đọc thành "dấu chấm". Bỏ state-layer
305
+ // padding cho radio selector compact là khử sạch (vòng 20px + scale 0.85 vẫn căn giữa). Scope theo
306
+ // `.c-selection` nên KHÔNG ảnh hưởng radio ở nơi khác (giữ nguyên vùng hover/state-layer của chúng).
307
+ //
308
+ // LƯU Ý: cách trước (`label.mdc-label:empty { display:none }`) KHÔNG khử được dot — nó chỉ TÁCH dot
309
+ // thành 2 dấu chấm (label rỗng vốn đang phủ chồng lên artifact). Đã thay bằng fix dưới đây.
310
+ .c-selection.mat-mdc-radio-button .mdc-radio {
311
+ padding: 0;
312
+ }
313
+
314
+ // Placeholder mặc định 1rem (16px), mong muốn nên là 14px
315
+ .mat-mdc-floating-label {
316
+ font-size: 14px !important;
317
+ }