diff --git a/lib/shared/widgets/querya_icon_button.dart b/lib/shared/widgets/querya_icon_button.dart index 50f7f5e6..d3dae8f6 100644 --- a/lib/shared/widgets/querya_icon_button.dart +++ b/lib/shared/widgets/querya_icon_button.dart @@ -1,5 +1,4 @@ import 'package:flutter/material.dart' as material; -import 'package:shadcn_flutter/shadcn_flutter.dart'; import 'package:querya_desktop/core/theme/querya_theme_scope.dart'; import 'package:querya_desktop/core/ui/querya_control_tokens.dart'; import 'package:querya_desktop/core/ui/querya_tooltip.dart'; @@ -90,7 +89,7 @@ class _QueryaIconButtonState extends material.State { final isDestructive = widget.isDestructive; final color = widget.color; final activeColor = widget.activeColor; - final cs = Theme.of(context).colorScheme; + final cs = context.colors; final workbench = QueryaThemeScope.maybeOf(context)?.workbench; final radius = widget.borderRadius ?? material.BorderRadius.circular(controlSize.scaledRadius(context)); @@ -236,7 +235,7 @@ class _QueryaToolbarButtonState extends material.State { QueryaControlSize.of(context); final isActive = widget.isActive; final isDestructive = widget.isDestructive; - final cs = Theme.of(context).colorScheme; + final cs = context.colors; final workbench = QueryaThemeScope.maybeOf(context)?.workbench; final isEnabled = onPressed != null; @@ -273,7 +272,7 @@ class _QueryaToolbarButtonState extends material.State { ), child: icon, ), - Gap(controlSize.scaledIconGap(context)), + material.SizedBox(width: controlSize.scaledIconGap(context)), ], material.Text( label, @@ -284,7 +283,7 @@ class _QueryaToolbarButtonState extends material.State { ), ), if (shortcutHint != null) ...[ - const Gap(6), + const material.SizedBox(width: 6), material.Container( padding: const material.EdgeInsets.symmetric(horizontal: 4, vertical: 1), decoration: material.BoxDecoration( diff --git a/lib/shared/widgets/querya_search_field.dart b/lib/shared/widgets/querya_search_field.dart index ad9e354c..90ac78ee 100644 --- a/lib/shared/widgets/querya_search_field.dart +++ b/lib/shared/widgets/querya_search_field.dart @@ -2,7 +2,6 @@ import 'dart:async'; import 'package:flutter/material.dart' as material; import 'package:flutter/services.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; import 'package:querya_desktop/core/theme/querya_theme_scope.dart'; import 'package:querya_desktop/core/ui/querya_control_tokens.dart'; @@ -33,10 +32,10 @@ class QueryaSearchField extends material.StatefulWidget { final String placeholder; /// Callback fired after debounce duration when input text changes. - final ValueChanged? onChanged; + final material.ValueChanged? onChanged; /// Callback fired immediately upon Enter / submit. - final ValueChanged? onSubmitted; + final material.ValueChanged? onSubmitted; /// Debounce delay. Set to [Duration.zero] for immediate invocation. final Duration debounceDuration; @@ -136,7 +135,7 @@ class _QueryaSearchFieldState extends material.State { @override material.Widget build(material.BuildContext context) { - final cs = Theme.of(context).colorScheme; + final cs = context.colors; final workbench = QueryaThemeScope.maybeOf(context)?.workbench; final controlSize = widget.size ?? QueryaControlSize.of(context); final fieldHeight = widget.height ?? controlSize.scaledHeight(context); @@ -171,9 +170,9 @@ class _QueryaSearchFieldState extends material.State { ), ), material.Expanded( - child: CallbackShortcuts( + child: material.CallbackShortcuts( bindings: { - const SingleActivator(LogicalKeyboardKey.escape): () { + const material.SingleActivator(LogicalKeyboardKey.escape): () { if (_hasText) { _clear(); } else { diff --git a/lib/shared/widgets/querya_tab_strip.dart b/lib/shared/widgets/querya_tab_strip.dart index 483f5eb7..71750b75 100644 --- a/lib/shared/widgets/querya_tab_strip.dart +++ b/lib/shared/widgets/querya_tab_strip.dart @@ -6,9 +6,9 @@ import 'package:querya_desktop/core/motion/querya_motion.dart'; import 'package:querya_desktop/core/motion/querya_motion_context.dart'; import 'package:querya_desktop/core/motion/querya_spring.dart'; import 'package:querya_desktop/core/motion/querya_spring_controller.dart'; +import 'package:querya_desktop/core/theme/querya_theme_scope.dart'; import 'package:querya_desktop/core/ui/querya_control_tokens.dart'; import 'package:querya_desktop/core/ui/querya_tooltip.dart'; -import 'package:shadcn_flutter/shadcn_flutter.dart'; /// A compact, keyboard-operable tab strip using Querya's motion and theme. /// @@ -254,7 +254,7 @@ class QueryaTabStripState extends material.State @override material.Widget build(material.BuildContext context) { - final colors = Theme.of(context).colorScheme; + final colors = context.colors; final controlSize = widget.size ?? (widget.dense ? QueryaControlSize.sm @@ -320,12 +320,22 @@ class QueryaTabStripState extends material.State children: [ // The tab's own node carries the label. material.ExcludeSemantics( - child: selected - ? Text(label).small().semiBold() - : Text(label).small().muted(), + child: material.Text( + label, + style: material.TextStyle( + fontSize: 14, + height: 20 / 14, + fontWeight: selected + ? material.FontWeight.w600 + : material.FontWeight.w400, + color: selected + ? colors.foreground + : colors.mutedForeground, + ), + ), ), if (showClose) ...[ - const Gap(2), + const material.SizedBox(width: 2), material.Tooltip( message: 'Close $label tab', waitDuration: kQueryaTooltipWait, @@ -376,7 +386,7 @@ class QueryaTabStripState extends material.State ); }), if (widget.onAdd != null) ...[ - const Gap(4), + const material.SizedBox(width: 4), material.MouseRegion( cursor: material.SystemMouseCursors.click, child: material.GestureDetector( @@ -463,8 +473,8 @@ class _TabStripIndicator extends material.StatelessWidget { @override material.Widget build(material.BuildContext context) { - return ListenableBuilder( - listenable: Listenable.merge([left, width]), + return material.ListenableBuilder( + listenable: material.Listenable.merge([left, width]), builder: (context, __) { final w = width.value; if (w <= 0) return const material.SizedBox.shrink(); diff --git a/test/guards/shared_does_not_import_shadcn_test.dart b/test/guards/shared_does_not_import_shadcn_test.dart index 2ca4887e..ea65c7da 100644 --- a/test/guards/shared_does_not_import_shadcn_test.dart +++ b/test/guards/shared_does_not_import_shadcn_test.dart @@ -18,10 +18,7 @@ void main() { 'lib/shared/widgets/querya_dialog_card.dart', 'lib/shared/widgets/querya_dropdown.dart', 'lib/shared/widgets/querya_empty_state.dart', - 'lib/shared/widgets/querya_icon_button.dart', 'lib/shared/widgets/querya_modal_dialog.dart', - 'lib/shared/widgets/querya_search_field.dart', - 'lib/shared/widgets/querya_tab_strip.dart', 'lib/shared/widgets/widgets.dart', };