@sd-angular/core 19.0.12 → 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.
- package/README.md +712 -712
- package/assets/STYLE-GUIDE.md +601 -601
- package/assets/images/coming-soon.svg +22 -22
- package/assets/images/data-empty.svg +20 -20
- package/assets/images/expired.svg +21 -21
- package/assets/images/file-error.svg +27 -27
- package/assets/images/filter-empty.svg +19 -19
- package/assets/images/filter-required.svg +20 -20
- package/assets/images/forbidden.svg +14 -14
- package/assets/images/image-error.svg +26 -26
- package/assets/images/maintenance.svg +22 -22
- package/assets/images/not-found.svg +19 -19
- package/assets/images/offline.svg +19 -19
- package/assets/images/submitted.svg +17 -17
- package/assets/images/success.svg +17 -17
- package/assets/images/unauthorized.svg +21 -21
- package/assets/images/unknown-error.svg +17 -17
- package/assets/scss/ckeditor5.scss +88 -88
- package/assets/scss/core/_inline-edit.scss +105 -105
- package/assets/scss/core/color.scss +73 -73
- package/assets/scss/core/form.scss +317 -317
- package/assets/scss/core/image.scss +35 -35
- package/assets/scss/core/utilities/_base.scss +333 -333
- package/assets/scss/core/utilities/_border.scss +22 -22
- package/assets/scss/core/utilities/_display.scss +10 -10
- package/assets/scss/core/utilities/_elevation.scss +80 -80
- package/assets/scss/core/utilities/_flexbox.scss +54 -54
- package/assets/scss/core/utilities/_gap.scss +9 -9
- package/assets/scss/core/utilities/_index.scss +17 -17
- package/assets/scss/core/utilities/_misc.scss +20 -20
- package/assets/scss/core/utilities/_overflow.scss +9 -9
- package/assets/scss/core/utilities/_position.scss +8 -8
- package/assets/scss/core/utilities/_sizing.scss +28 -28
- package/assets/scss/core/utilities/_spacing.scss +31 -31
- package/assets/scss/core/utilities/_typography.scss +99 -99
- package/assets/scss/sd-core.scss +16 -16
- package/assets/scss/themes/default.scss +45 -45
- package/assets/scss/themes/material-theme.scss +101 -101
- package/components/preview/src/preview-pdf/pdf-worker-inline.generated.d.ts +7 -0
- package/components/table/src/services/table-export/table-export.service.d.ts +3 -1
- package/components/table/src/table.component.d.ts +1 -1
- package/fesm2022/sd-angular-core-components-anchor.mjs +6 -6
- package/fesm2022/sd-angular-core-components-anchor.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-autoid-inspector.mjs +2 -2
- package/fesm2022/sd-angular-core-components-autoid-inspector.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-badge.mjs +2 -2
- package/fesm2022/sd-angular-core-components-badge.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-base.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-button.mjs +2 -2
- package/fesm2022/sd-angular-core-components-button.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-chart.mjs +40 -40
- package/fesm2022/sd-angular-core-components-chart.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-ckeditor-styles.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-code-editor.mjs +2 -2
- package/fesm2022/sd-angular-core-components-code-editor.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-document-builder.mjs +77 -77
- package/fesm2022/sd-angular-core-components-document-builder.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-editor.mjs +2 -2
- package/fesm2022/sd-angular-core-components-editor.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-form-generic.mjs +106 -106
- package/fesm2022/sd-angular-core-components-form-generic.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-history.mjs +2 -2
- package/fesm2022/sd-angular-core-components-history.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-import-excel.mjs +2 -2
- package/fesm2022/sd-angular-core-components-import-excel.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-inform.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-mini-editor.mjs +2 -2
- package/fesm2022/sd-angular-core-components-mini-editor.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-modal-resizable.mjs +2 -2
- package/fesm2022/sd-angular-core-components-modal-resizable.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-modal.mjs +2 -2
- package/fesm2022/sd-angular-core-components-modal.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-operator.mjs +2 -2
- package/fesm2022/sd-angular-core-components-operator.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-org-chart.mjs +2 -2
- package/fesm2022/sd-angular-core-components-org-chart.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-preview.mjs +32 -6
- package/fesm2022/sd-angular-core-components-preview.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-query-bar.mjs +10 -10
- package/fesm2022/sd-angular-core-components-query-bar.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-query-builder.mjs +2 -2
- package/fesm2022/sd-angular-core-components-query-builder.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-section.mjs +4 -4
- package/fesm2022/sd-angular-core-components-section.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-side-drawer.mjs +2 -2
- package/fesm2022/sd-angular-core-components-side-drawer.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-stepper.mjs +2 -2
- package/fesm2022/sd-angular-core-components-stepper.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-tab-router.mjs +6 -6
- package/fesm2022/sd-angular-core-components-tab-router.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-tab.mjs +2 -2
- package/fesm2022/sd-angular-core-components-tab.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-table.mjs +32 -17
- package/fesm2022/sd-angular-core-components-table.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-upload-file.mjs +4 -4
- package/fesm2022/sd-angular-core-components-upload-file.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-view.mjs +2 -2
- package/fesm2022/sd-angular-core-components-view.mjs.map +1 -1
- package/fesm2022/sd-angular-core-configurations.mjs.map +1 -1
- package/fesm2022/sd-angular-core-directives.mjs +20 -20
- package/fesm2022/sd-angular-core-directives.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-autocomplete.mjs +2 -2
- package/fesm2022/sd-angular-core-forms-autocomplete.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-checkbox.mjs +2 -2
- package/fesm2022/sd-angular-core-forms-checkbox.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-chip-calendar.mjs +2 -2
- package/fesm2022/sd-angular-core-forms-chip-calendar.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-chip.mjs +2 -2
- package/fesm2022/sd-angular-core-forms-chip.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-date-range.mjs +2 -2
- package/fesm2022/sd-angular-core-forms-date-range.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-date.mjs +114 -35
- package/fesm2022/sd-angular-core-forms-date.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-datetime.mjs +6 -6
- package/fesm2022/sd-angular-core-forms-datetime.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-directives.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-inline-text.mjs +2 -2
- package/fesm2022/sd-angular-core-forms-inline-text.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-input-color.mjs +2 -2
- package/fesm2022/sd-angular-core-forms-input-color.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-input-number.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-input.mjs +2 -2
- package/fesm2022/sd-angular-core-forms-input.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-label.mjs +2 -2
- package/fesm2022/sd-angular-core-forms-label.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-models.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-radio.mjs +2 -2
- package/fesm2022/sd-angular-core-forms-radio.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-select.mjs +2 -2
- package/fesm2022/sd-angular-core-forms-select.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-switch.mjs +2 -2
- package/fesm2022/sd-angular-core-forms-switch.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-textarea.mjs +2 -2
- package/fesm2022/sd-angular-core-forms-textarea.mjs.map +1 -1
- package/fesm2022/sd-angular-core-handlers.mjs.map +1 -1
- package/fesm2022/sd-angular-core-i18n.mjs +20 -0
- package/fesm2022/sd-angular-core-i18n.mjs.map +1 -1
- package/fesm2022/sd-angular-core-interceptors.mjs.map +1 -1
- package/fesm2022/sd-angular-core-modules-auth.mjs.map +1 -1
- package/fesm2022/sd-angular-core-modules-authom.mjs.map +1 -1
- package/fesm2022/sd-angular-core-modules-keycloak.mjs.map +1 -1
- package/fesm2022/sd-angular-core-modules-layout.mjs +145 -46
- package/fesm2022/sd-angular-core-modules-layout.mjs.map +1 -1
- package/fesm2022/sd-angular-core-modules-permission.mjs.map +1 -1
- package/fesm2022/sd-angular-core-pipes.mjs.map +1 -1
- package/fesm2022/sd-angular-core-services-api.mjs.map +1 -1
- package/fesm2022/sd-angular-core-services-cache.mjs.map +1 -1
- package/fesm2022/sd-angular-core-services-confirm.mjs +2 -2
- package/fesm2022/sd-angular-core-services-confirm.mjs.map +1 -1
- package/fesm2022/sd-angular-core-services-docx.mjs.map +1 -1
- package/fesm2022/sd-angular-core-services-excel.mjs.map +1 -1
- package/fesm2022/sd-angular-core-services-license.mjs.map +1 -1
- package/fesm2022/sd-angular-core-services-loading.mjs +5 -5
- package/fesm2022/sd-angular-core-services-loading.mjs.map +1 -1
- package/fesm2022/sd-angular-core-services-notify.mjs +12 -12
- package/fesm2022/sd-angular-core-services-notify.mjs.map +1 -1
- package/fesm2022/sd-angular-core-services-storage.mjs.map +1 -1
- package/fesm2022/sd-angular-core-utilities-data-state.mjs.map +1 -1
- package/fesm2022/sd-angular-core-utilities-extensions.mjs.map +1 -1
- package/forms/date/src/date.component.d.ts +9 -1
- package/i18n/src/en.d.ts +4 -0
- package/modules/layout/components/sidebar-v1/main.component.d.ts +1 -0
- package/modules/layout/index.d.ts +1 -0
- package/modules/layout/utils/index.d.ts +1 -0
- package/modules/layout/utils/tab-name.util.d.ts +8 -0
- package/package.json +41 -41
- package/sd-angular-core-19.0.12.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
|
+
}
|