* 新增自适应数值与窗口分析工具,提升交互体验 * 优化回收站模块逻辑,增加展示与选择功能 * 引入 Macaron 主题配置文件并更新 Tailwind 配置 * 精简基础组件代码,移除冗余样式与设置项 * 完善测试用例,覆盖 UI 系统与回收站工作流 * 更新多语言配置,支持功能变更后的文案需求
201 lines
9.7 KiB
CSS
201 lines
9.7 KiB
CSS
/* Action motion is independent of transforms used for positioned icons. */
|
|
.fcb-action {
|
|
--fcb-action-bg: var(--fcb-button-secondary-bg);
|
|
--fcb-action-hover: var(--fcb-button-secondary-hover);
|
|
--fcb-action-text: var(--fcb-button-secondary-text);
|
|
--fcb-action-border: var(--fcb-button-secondary-border);
|
|
--fcb-action-shadow: -3px -3px 8px rgb(255 255 255 / 70%), 3px 4px 9px rgb(107 132 146 / 15%);
|
|
transition: translate 300ms ease, transform 300ms ease, box-shadow 300ms ease,
|
|
background-color 300ms ease, border-color 300ms ease, color 300ms ease, opacity 300ms ease !important;
|
|
touch-action: manipulation;
|
|
}
|
|
.dark .fcb-action { --fcb-action-shadow: -3px -3px 8px rgb(24 31 44 / 35%), 3px 4px 9px rgb(108 129 164 / 12%); }
|
|
@media (hover: hover) and (pointer: fine) {
|
|
.fcb-action:not(:disabled):not([aria-disabled="true"]):hover {
|
|
translate: 0 -2px;
|
|
box-shadow: var(--fcb-action-shadow) !important;
|
|
}
|
|
.fcb-action:not(:disabled):active { translate: 0 0; }
|
|
}
|
|
.fcb-action:disabled, .fcb-action[aria-disabled="true"] { translate: none; }
|
|
/* Only color roles override utility classes. Component spacing stays contextual. */
|
|
.fcb-button-primary, .fcb-action:is(.bg-indigo-500,.bg-indigo-600,.bg-blue-500,.bg-blue-600,[class*="from-indigo-"],[class*="from-purple-"],[class*="bg-[#7198a6]"],[class*="bg-[#5f8796]"]) {
|
|
--fcb-action-bg: var(--fcb-button-primary-bg); --fcb-action-hover: var(--fcb-button-primary-hover);
|
|
--fcb-action-text: var(--fcb-button-primary-text); --fcb-action-border: var(--fcb-button-primary-border);
|
|
}
|
|
.fcb-button-secondary {
|
|
--fcb-action-bg: var(--fcb-button-secondary-bg); --fcb-action-hover: var(--fcb-button-secondary-hover);
|
|
--fcb-action-text: var(--fcb-button-secondary-text); --fcb-action-border: var(--fcb-button-secondary-border);
|
|
}
|
|
.fcb-button-success, .fcb-action:is(.bg-green-50,.bg-green-100,.bg-green-500,.bg-green-600,[class*="bg-[#6f9688]"]) {
|
|
--fcb-action-bg: var(--fcb-button-success-bg); --fcb-action-hover: var(--fcb-button-success-hover);
|
|
--fcb-action-text: var(--fcb-button-success-text); --fcb-action-border: var(--fcb-button-success-border);
|
|
}
|
|
.fcb-button-danger, .fcb-action:is(.bg-red-50,.bg-red-100,.bg-red-500,.bg-red-600,.bg-red-700) {
|
|
--fcb-action-bg: var(--fcb-button-danger-bg); --fcb-action-hover: var(--fcb-button-danger-hover);
|
|
--fcb-action-text: var(--fcb-button-danger-text); --fcb-action-border: var(--fcb-button-danger-border);
|
|
}
|
|
.fcb-button-outline, .fcb-action:is(.bg-purple-50,.bg-purple-100) {
|
|
--fcb-action-bg: var(--fcb-button-outline-bg); --fcb-action-hover: var(--fcb-button-outline-hover);
|
|
--fcb-action-text: var(--fcb-button-outline-text); --fcb-action-border: var(--fcb-button-outline-border);
|
|
}
|
|
.fcb-action {
|
|
background-color: var(--fcb-action-bg) !important;
|
|
color: var(--fcb-action-text) !important;
|
|
border-color: var(--fcb-action-border) !important;
|
|
}
|
|
.fcb-action:is([class*="fcb-button-"],[class*="from-indigo-"],[class*="from-purple-"]) { background-image: none !important; }
|
|
.fcb-action:not(:disabled):hover { background-color: var(--fcb-action-hover) !important; }
|
|
.fcb-action svg { flex-shrink: 0; }
|
|
.fcb-icon-action { padding-inline: 0 !important; }
|
|
.fcb-icon-action > svg { margin-inline: 0 !important; }
|
|
|
|
@media (max-width: 639px) {
|
|
:root {
|
|
--fcb-control-size: clamp(36px, 9.5vw, 40px);
|
|
--fcb-control-font: clamp(12px, 3.35vw, 14px);
|
|
--fcb-control-px: clamp(8px, 2.5vw, 12px);
|
|
}
|
|
.fcb-action:not(.fcb-content-action) {
|
|
min-height: var(--fcb-control-size) !important;
|
|
height: auto;
|
|
padding-block: 6px !important;
|
|
padding-inline: var(--fcb-control-px) !important;
|
|
font-size: var(--fcb-control-font) !important;
|
|
line-height: 1.4;
|
|
border-radius: 14px;
|
|
}
|
|
.fcb-action:not(.fcb-content-action) svg {
|
|
width: clamp(14px, 4vw, 17px);
|
|
height: clamp(14px, 4vw, 17px);
|
|
}
|
|
.fcb-action:not(.fcb-content-action) svg[class*="mr-"] { margin-right: 5px; }
|
|
.fcb-action:not(.fcb-content-action) svg[class*="ml-"] { margin-left: 5px; }
|
|
.fcb-icon-action {
|
|
width: var(--fcb-control-size) !important;
|
|
height: var(--fcb-control-size) !important;
|
|
min-width: var(--fcb-control-size) !important;
|
|
padding: 0 !important;
|
|
}
|
|
.fcb-icon-action > svg { margin-inline: 0 !important; }
|
|
.fcb-pagination-controls { gap: 4px; }
|
|
.fcb-pagination-controls .fcb-action { min-width: 0; padding-inline: 7px !important; white-space: nowrap; }
|
|
.fcb-page-size {
|
|
min-height: var(--fcb-control-size) !important;
|
|
min-width: 0;
|
|
width: auto;
|
|
padding-inline: 5px !important;
|
|
font-size: var(--fcb-control-font);
|
|
}
|
|
.fcb-metric-card { min-width: 0; padding: 10px 8px !important; border-radius: 16px; }
|
|
.fcb-metric-card > div:first-child { flex-direction: column; align-items: flex-start; gap: 4px; font-size: 12px; }
|
|
.fcb-metric-card > p { font-size: 11px; overflow-wrap: anywhere; }
|
|
.fcb-summary-grid > div { border-radius: 16px; }
|
|
.fcb-summary-grid p { font-size: 11px; }
|
|
}
|
|
@media (prefers-reduced-motion: reduce) {
|
|
.fcb-action { transition-duration: .01ms !important; }
|
|
.fcb-action:not(:disabled):not([aria-disabled="true"]):hover { translate: none; }
|
|
}
|
|
|
|
.fcb-content-action { --fcb-action-bg: transparent; --fcb-action-hover: transparent; --fcb-action-text: inherit; }
|
|
/* Match the selected pagination item without requiring dark text on a dark fill. */
|
|
.fcb-action[aria-current="page"] { outline: 2px solid var(--fcb-button-primary-border); outline-offset: 1px; font-weight: 700; }
|
|
|
|
@media (max-width: 639px) {
|
|
.fcb-pagination-controls { column-gap: 6px; }
|
|
.fcb-page-size { justify-self: start; width: 5.1rem; border-radius: 12px; }
|
|
.fcb-pagination-controls .fcb-page-nav {
|
|
width: var(--fcb-control-size);
|
|
height: var(--fcb-control-size);
|
|
min-width: var(--fcb-control-size);
|
|
padding: 0 !important;
|
|
border: 1px solid var(--fcb-border);
|
|
border-radius: 12px;
|
|
}
|
|
.fcb-page-nav:disabled { opacity: .45; box-shadow: none; }
|
|
.fcb-page-counter { min-width: 3rem; font-size: 12px; color: var(--fcb-text); }
|
|
}
|
|
|
|
@media (max-width: 639px) {
|
|
.fcb-action:not(.fcb-content-action) :is(.text-sm, .text-base, .text-lg) { font-size: inherit; }
|
|
}
|
|
|
|
/* Button-like checkbox labels keep native multi-selection and keyboard access. */
|
|
.fcb-choice:has(input:focus-visible) .fcb-choice-face { outline: 3px solid var(--fcb-primary); outline-offset: 3px; }
|
|
.fcb-choice:has(input:disabled) .fcb-choice-face { translate: none !important; opacity: .5; cursor: not-allowed; }
|
|
|
|
/* Native semantics with theme-aware checkbox surfaces (including mixed state). */
|
|
input[type="checkbox"]:not(.sr-only) {
|
|
appearance: none;
|
|
-webkit-appearance: none;
|
|
display: inline-block;
|
|
width: 20px;
|
|
height: 20px;
|
|
min-width: 20px;
|
|
margin: 0;
|
|
vertical-align: middle;
|
|
border: 1px solid var(--fcb-button-secondary-border);
|
|
border-radius: 6px;
|
|
background-color: var(--fcb-surface);
|
|
background-position: center;
|
|
background-repeat: no-repeat;
|
|
background-size: 15px 15px;
|
|
box-shadow: inset 1px 1px 3px rgb(107 132 146 / 12%);
|
|
cursor: pointer;
|
|
transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
|
|
}
|
|
input[type="checkbox"]:not(.sr-only):is(:checked,:indeterminate) {
|
|
background-color: var(--fcb-button-primary-bg);
|
|
border-color: var(--fcb-button-primary-border);
|
|
box-shadow: none;
|
|
}
|
|
input[type="checkbox"]:not(.sr-only):checked {
|
|
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m4 10 4 4 8-8' fill='none' stroke='%23304f60' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
|
|
}
|
|
input[type="checkbox"]:not(.sr-only):indeterminate {
|
|
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M4 10h12' stroke='%23304f60' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E");
|
|
}
|
|
.dark input[type="checkbox"]:not(.sr-only):checked {
|
|
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m4 10 4 4 8-8' fill='none' stroke='%23dfedf4' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
|
|
}
|
|
.dark input[type="checkbox"]:not(.sr-only):indeterminate {
|
|
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M4 10h12' stroke='%23dfedf4' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E");
|
|
}
|
|
input[type="checkbox"]:not(.sr-only):disabled { cursor: not-allowed; opacity: .45; }
|
|
@media (forced-colors: active) { input[type="checkbox"]:not(.sr-only) { appearance: auto; background-image: none; } }
|
|
|
|
/* Input accessories stay inside the field and never act like floating cards. */
|
|
.fcb-action.fcb-input-action,
|
|
.fcb-action.fcb-input-action:not(:disabled):hover {
|
|
position: absolute;
|
|
inset-block: 4px;
|
|
right: 5px;
|
|
width: 36px;
|
|
min-width: 36px;
|
|
min-height: 0 !important;
|
|
height: auto;
|
|
padding: 0 !important;
|
|
border: 0;
|
|
border-radius: 10px;
|
|
background: transparent !important;
|
|
color: var(--fcb-text-muted) !important;
|
|
box-shadow: none !important;
|
|
translate: none !important;
|
|
transform: none !important;
|
|
}
|
|
.fcb-action.fcb-input-action:not(:disabled):hover { color: var(--fcb-text) !important; }
|
|
.fcb-filter-grid { align-items: end; }
|
|
.fcb-filter-grid :is(input,select) { height: 40px; min-height: 40px; font-size: 14px; }
|
|
.fcb-filter-grid .fcb-action { min-height: 40px; }
|
|
@media (max-width: 639px) {
|
|
.fcb-filter-grid :is(input,select), .fcb-filter-grid .fcb-action { height: var(--fcb-control-size); min-height: var(--fcb-control-size); font-size: var(--fcb-control-font); }
|
|
}
|
|
/* Clickable list content is not a floating action card. */
|
|
.fcb-action.fcb-content-action,
|
|
.fcb-action.fcb-content-action:not(:disabled):not([aria-disabled="true"]):hover {
|
|
translate: none !important;
|
|
transform: none !important;
|
|
box-shadow: none !important;
|
|
}
|