feat(client): 登录/注册页照原型重建,ds 真相源组件族统一全部屏
- 登录/注册(login.html/register.html 1:1):两栏卡片+品牌渐变面板+主题小衣服 pill(onSurface 变体)+记住我(记录并预填最近账号)+原型式 toast 校验; 登录 fidelity 1.4–2.1% 三主题全绿;注册暂不入闸(少 门店编号/兑换券 字段, 已记 CONTRACT,screens.mjs 留存根) - ds 原子补齐:DsToast(.toast 单例)/DsCheck(.check/.agree)/DsButton lg 档/ DsSelect 替换全部旧 DropdownButton/DsField label 在上/DsInput 后缀与密码形态 - 全屏统一:对话框按钮全 DsButton、盒式输入主题钉死(visualDensity.standard、 h38、InputDecorationTheme 渗漏修复)、图标全 lucide、JetBrains Mono 三端同源、 BrandMark 真相源 logo、只读模式写操作全量守卫(WriteGuard+DsToast) - 出入库列表:版式对齐原型(卡片对齐+搜索框居中)、KPI 近30天滚动、结清后 失效财务应收应付表;商品编辑抽屉介绍库改搜索下拉、图片双击全屏预览 - 删除旧 UI 死代码:DataTableCard/FormDialog/PageScaffold/SearchChip/ SelectProductDialog/tabStateProvider - golden/fidelity:stock-in/out 补注册(9%)、login 入册(8%)、goldens 全量重打; 修复 pubspec flutter_web_plugins 非法声明(CI pub get 阻断) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JJ1g8XV1YhhmHRzhwWEW7o
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
import 'package:lucide_icons_flutter/lucide_icons.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../core/theme/context_tokens.dart';
|
||||
import '../core/theme/app_dims.g.dart';
|
||||
import 'searchable_option_field.dart' show OptionItem;
|
||||
import '../core/theme/app_fonts.dart';
|
||||
|
||||
/// 搜索下拉框(对齐原型 .combo + .combo-pop):
|
||||
/// 触发器(带框 input 样式 + caret/清除)+ 锚定在下方的弹层
|
||||
@@ -15,10 +17,13 @@ class ComboSearchField extends StatefulWidget {
|
||||
final int? selectedId;
|
||||
final String hint;
|
||||
final ValueChanged<int?> onChanged;
|
||||
|
||||
/// 固定宽度;传 null 则填满父约束(用于弹窗内 Expanded 布局)。
|
||||
final double? width;
|
||||
|
||||
/// 触发器高度(工具栏 34,表单/弹窗 38,对齐原型 .combo)。
|
||||
final double height;
|
||||
|
||||
/// 触发器填充色;null=透明(工具栏用,透出底色)。弹窗内传 surface 保持不透明一致。
|
||||
final Color? fillColor;
|
||||
|
||||
@@ -147,10 +152,10 @@ class _ComboSearchFieldState extends State<ComboSearchField> {
|
||||
if (sel != null)
|
||||
GestureDetector(
|
||||
onTap: () => _pick(null),
|
||||
child: Icon(Icons.close, size: 14, color: t.muted),
|
||||
child: Icon(LucideIcons.x, size: 14, color: t.muted),
|
||||
)
|
||||
else
|
||||
Icon(Icons.keyboard_arrow_down, size: 16, color: t.faint),
|
||||
Icon(LucideIcons.chevronDown, size: 16, color: t.faint),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -198,7 +203,7 @@ class _ComboPopState extends State<_ComboPop> {
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
Icon(Icons.search, size: 14, color: t.faint),
|
||||
Icon(LucideIcons.search, size: 14, color: t.faint),
|
||||
const SizedBox(width: 8),
|
||||
Expanded(
|
||||
child: TextField(
|
||||
@@ -206,7 +211,11 @@ class _ComboPopState extends State<_ComboPop> {
|
||||
style: TextStyle(fontSize: AppDims.fsBody, color: t.text),
|
||||
decoration: InputDecoration(
|
||||
isCollapsed: true,
|
||||
contentPadding: EdgeInsets.zero,
|
||||
border: InputBorder.none,
|
||||
filled: false,
|
||||
enabledBorder: InputBorder.none,
|
||||
focusedBorder: InputBorder.none,
|
||||
hintText: '搜索${widget.hint}…',
|
||||
hintStyle:
|
||||
TextStyle(fontSize: AppDims.fsBody, color: t.faint),
|
||||
@@ -255,12 +264,14 @@ class _ComboPopState extends State<_ComboPop> {
|
||||
Text(o.code!,
|
||||
style: TextStyle(
|
||||
fontSize: AppDims.fsXs,
|
||||
fontFamily: 'monospace',
|
||||
fontFamily: AppFonts.mono,
|
||||
fontFamilyFallback: AppFonts.monoFallback,
|
||||
color: t.faint)),
|
||||
],
|
||||
if (sel) ...[
|
||||
const SizedBox(width: 8),
|
||||
Icon(Icons.check, size: 15, color: t.primary),
|
||||
Icon(LucideIcons.check,
|
||||
size: 15, color: t.primary),
|
||||
],
|
||||
],
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user