@tasco-fe/theme 3.0.0 → 3.1.0-beta.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.
- package/dist/index.mjs +2 -2
- package/package.json +3 -3
- package/styles/base.css +46 -1
package/dist/index.mjs
CHANGED
|
@@ -268,7 +268,7 @@ const contrastPairs = [
|
|
|
268
268
|
{
|
|
269
269
|
fg: "color-primary",
|
|
270
270
|
bg: "color-surface",
|
|
271
|
-
usedBy: "CButton secondary/outline/link, m\u1EE5c \u0111ang ch\u1ECDn c\u1EE7a CTopNav, Pagination, Tabs"
|
|
271
|
+
usedBy: "CButton secondary/outline/link, m\u1EE5c \u0111ang ch\u1ECDn c\u1EE7a CTopNav, Pagination, Tabs, track/n\xFAm CSlider"
|
|
272
272
|
},
|
|
273
273
|
{ fg: "color-primary-hover", bg: "color-surface", usedBy: "CButton secondary/outline/link :hover" },
|
|
274
274
|
{ fg: "color-primary", bg: "color-surface-elevated", usedBy: "CButton trong modal/drawer/popover" },
|
|
@@ -287,7 +287,7 @@ const contrastPairs = [
|
|
|
287
287
|
{
|
|
288
288
|
fg: "#fff",
|
|
289
289
|
bg: "color-primary-active",
|
|
290
|
-
usedBy: "CChatMessage, c\u1ED9t sort header b\u1EA3ng; theme t\u1ED1i: header b\u1EA3ng, CCard primary, n\xFAt antdv, DatePicker"
|
|
290
|
+
usedBy: "CChatMessage, c\u1ED9t sort header b\u1EA3ng; theme t\u1ED1i: header b\u1EA3ng, CCard primary, n\xFAt antdv, DatePicker, Tag ch\u1ECDn \u0111\u01B0\u1EE3c, FloatButton, Tour"
|
|
291
291
|
},
|
|
292
292
|
{ fg: "#fff", bg: "gradient-primary", usedBy: "CButton primary, tab \u0111ang ch\u1ECDn c\u1EE7a drawer Thi\u1EBFt l\u1EADp CTable" },
|
|
293
293
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tasco-fe/theme",
|
|
3
|
-
"version": "3.0.0",
|
|
3
|
+
"version": "3.1.0-beta.0",
|
|
4
4
|
"description": "Design token + theme antdv (ConfigProvider) + CSS variables cho framework Tasco",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"typescript": "^5.7.3",
|
|
26
26
|
"unbuild": "^3.0.1",
|
|
27
27
|
"vitest": "^3.0.0",
|
|
28
|
-
"@tasco-fe/eslint-config": "3.0.0",
|
|
29
|
-
"@tasco-fe/tsconfig": "3.0.0"
|
|
28
|
+
"@tasco-fe/eslint-config": "3.1.0-beta.0",
|
|
29
|
+
"@tasco-fe/tsconfig": "3.1.0-beta.0"
|
|
30
30
|
},
|
|
31
31
|
"publishConfig": {
|
|
32
32
|
"access": "public",
|
package/styles/base.css
CHANGED
|
@@ -110,6 +110,23 @@ a {
|
|
|
110
110
|
padding-inline: var(--tasco-table-cell-padding-inline, 8px) !important;
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
+
/* Slider: antdv vẽ track và viền núm bằng colorPrimaryBorder — theme tối chỉ ~1.6:1 trên nền (theme sáng ~3.8:1) → dùng
|
|
114
|
+
primary để đạt 3:1 cho thành phần UI (WCAG 1.4.11) ở cả hai theme. Trạng thái disabled của antdv có !important nên giữ nguyên. */
|
|
115
|
+
.ant-slider:not(.ant-slider-disabled) .ant-slider-track {
|
|
116
|
+
background-color: var(--tasco-color-primary);
|
|
117
|
+
}
|
|
118
|
+
.ant-slider:not(.ant-slider-disabled):hover .ant-slider-track {
|
|
119
|
+
background-color: var(--tasco-color-primary-hover);
|
|
120
|
+
}
|
|
121
|
+
.ant-slider:not(.ant-slider-disabled) .ant-slider-handle::after {
|
|
122
|
+
box-shadow: 0 0 0 2px var(--tasco-color-primary);
|
|
123
|
+
}
|
|
124
|
+
.ant-slider:not(.ant-slider-disabled) .ant-slider-handle:hover::after,
|
|
125
|
+
.ant-slider:not(.ant-slider-disabled) .ant-slider-handle:active::after,
|
|
126
|
+
.ant-slider:not(.ant-slider-disabled) .ant-slider-handle:focus::after {
|
|
127
|
+
box-shadow: 0 0 0 4px var(--tasco-color-primary-hover);
|
|
128
|
+
}
|
|
129
|
+
|
|
113
130
|
/* Tab đang chọn in đậm cho dễ nhận biết. */
|
|
114
131
|
.ant-tabs-tab-active .ant-tabs-tab-btn {
|
|
115
132
|
font-weight: 700;
|
|
@@ -121,7 +138,7 @@ a {
|
|
|
121
138
|
* chữ trắng trên nền suy ra chỉ ~4:1, không seed nào đạt ≥ 4.5:1 cho cả hai vai trò → nút primary thuần antdv
|
|
122
139
|
* (Modal.confirm của useConfirm, nút Gửi của CChat…) và ô ngày đang chọn của DatePicker/RangePicker dùng primary-active.
|
|
123
140
|
* CButton có gradient riêng nên loại trừ. Chỗ antdv khác còn nền colorPrimary + chữ trắng mà core chưa dùng nên chưa phủ
|
|
124
|
-
* (vd Steps, Radio solid,
|
|
141
|
+
* (vd Steps, Radio solid, Menu theme dark, Badge.Ribbon).
|
|
125
142
|
* ───────────────────────────────────────────────────────────────────────── */
|
|
126
143
|
:root[data-theme='dark'] .ant-btn-primary:not(:disabled):not(.ant-btn-disabled):not(.ant-btn-dangerous):not(.ant-btn-background-ghost):not(.c-btn) {
|
|
127
144
|
background: var(--tasco-color-primary-active) !important;
|
|
@@ -135,6 +152,29 @@ a {
|
|
|
135
152
|
:root[data-theme='dark'] .ant-picker-cell-in-view.ant-picker-cell-range-end .ant-picker-cell-inner {
|
|
136
153
|
background: var(--tasco-color-primary-active) !important;
|
|
137
154
|
}
|
|
155
|
+
/* Tag chọn được, FloatButton primary, Tour primary: cùng lý do (chữ trắng trên colorPrimary suy ra chỉ ~4:1). */
|
|
156
|
+
:root[data-theme='dark'] .ant-tag-checkable-checked,
|
|
157
|
+
:root[data-theme='dark'] .ant-float-btn-primary,
|
|
158
|
+
:root[data-theme='dark'] .ant-float-btn-primary .ant-float-btn-body,
|
|
159
|
+
:root[data-theme='dark'] .ant-tour-primary .ant-tour-inner,
|
|
160
|
+
:root[data-theme='dark'] .ant-tour-primary .ant-tour-prev-btn:not(:hover) {
|
|
161
|
+
background: var(--tasco-color-primary-active) !important;
|
|
162
|
+
}
|
|
163
|
+
:root[data-theme='dark'] .ant-tag-checkable-checked:hover,
|
|
164
|
+
:root[data-theme='dark'] .ant-float-btn-primary .ant-float-btn-body:hover {
|
|
165
|
+
filter: brightness(1.12);
|
|
166
|
+
}
|
|
167
|
+
:root[data-theme='dark'] .ant-tour-primary {
|
|
168
|
+
--antd-arrow-background-color: var(--tasco-color-primary-active);
|
|
169
|
+
}
|
|
170
|
+
/* Nút "Tiếp" của Tour primary: chữ colorPrimary trên nền trắng → dùng tông tối của primary. */
|
|
171
|
+
:root[data-theme='dark'] .ant-tour-primary .ant-tour-next-btn {
|
|
172
|
+
color: var(--tasco-color-primary-active) !important;
|
|
173
|
+
}
|
|
174
|
+
/* Calendar toàn màn: ô đang chọn nhận nền primary-active từ rule DatePicker ở trên → số ngày phải trắng. */
|
|
175
|
+
:root[data-theme='dark'] .ant-picker-calendar-full .ant-picker-cell-in-view.ant-picker-cell-selected .ant-picker-calendar-date-value {
|
|
176
|
+
color: #fff !important;
|
|
177
|
+
}
|
|
138
178
|
|
|
139
179
|
/* ─────────────────────────────────────────────────────────────────────────
|
|
140
180
|
* Nút primary danger thuần antdv (vd `okButtonProps: { danger: true }` của Modal/Popconfirm) — cả hai theme.
|
|
@@ -174,6 +214,11 @@ a {
|
|
|
174
214
|
:root[data-theme='dark'] .ant-tabs .ant-tabs-ink-bar {
|
|
175
215
|
background: var(--tasco-color-primary) !important;
|
|
176
216
|
}
|
|
217
|
+
/* Mục đang xem của Anchor, Tag chọn được khi hover. */
|
|
218
|
+
:root[data-theme='dark'] .ant-anchor-wrapper .ant-anchor-link-active > .ant-anchor-link-title,
|
|
219
|
+
:root[data-theme='dark'] .ant-tag-checkable:not(.ant-tag-checkable-checked):hover {
|
|
220
|
+
color: var(--tasco-color-primary) !important;
|
|
221
|
+
}
|
|
177
222
|
:root[data-theme='dark'] .ant-dropdown .ant-dropdown-menu .ant-dropdown-menu-item-danger:not(.ant-dropdown-menu-item-disabled) {
|
|
178
223
|
color: var(--tasco-color-error) !important;
|
|
179
224
|
}
|