From 79a56c1c97e6ccce958535a51d90502ed03117ae Mon Sep 17 00:00:00 2001 From: Matthias Ngeo Date: Tue, 25 Jun 2024 22:00:36 +0800 Subject: [PATCH 01/11] Fix documentation bug --- forui/lib/src/widgets/switch.dart | 5 +---- samples/lib/widgets/separator.dart | 1 - 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/forui/lib/src/widgets/switch.dart b/forui/lib/src/widgets/switch.dart index 851218efe..22b6f0da5 100644 --- a/forui/lib/src/widgets/switch.dart +++ b/forui/lib/src/widgets/switch.dart @@ -153,10 +153,7 @@ final class FSwitchStyle with Diagnosticable { : checkedColor = colorScheme.primary, uncheckedColor = colorScheme.border, thumbColor = colorScheme.background, - focusColor = HSLColor.fromColor(colorScheme.primary.withOpacity(0.80)) - .withLightness(0.69) - .withSaturation(0.835) - .toColor(); + focusColor = colorScheme.primary; @override void debugFillProperties(DiagnosticPropertiesBuilder properties) { diff --git a/samples/lib/widgets/separator.dart b/samples/lib/widgets/separator.dart index 03f9cdc06..e31749d9d 100644 --- a/samples/lib/widgets/separator.dart +++ b/samples/lib/widgets/separator.dart @@ -13,7 +13,6 @@ class SeparatorPage extends SampleScaffold { @override Widget child(BuildContext context) { - final theme = context.theme; final colorScheme = theme.colorScheme; final typography = theme.typography; From d79591509a0a6898348f45a1037fe738841368a5 Mon Sep 17 00:00:00 2001 From: Matthias Ngeo Date: Tue, 25 Jun 2024 22:05:54 +0800 Subject: [PATCH 02/11] Add separator --- docs/pages/docs/separator.mdx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/pages/docs/separator.mdx b/docs/pages/docs/separator.mdx index 965a8b8dc..dc2bb4ef8 100644 --- a/docs/pages/docs/separator.mdx +++ b/docs/pages/docs/separator.mdx @@ -10,6 +10,10 @@ Visually or semantically separates content. ```dart + final theme = context.theme; + final colorScheme = theme.colorScheme; + final typography = theme.typography; + Padding( padding: const EdgeInsets.all(16), child: Column( From aa7b0d644def22f2c70bbba89a616fcaee38d6b2 Mon Sep 17 00:00:00 2001 From: Daviiddoo Date: Tue, 25 Jun 2024 22:05:58 +0800 Subject: [PATCH 03/11] fixes from david --- docs/.env.development | 2 +- docs/components/widget.tsx | 5 ++--- samples/lib/sample_scaffold.dart | 1 - samples/lib/widgets/separator.dart | 1 - 4 files changed, 3 insertions(+), 6 deletions(-) diff --git a/docs/.env.development b/docs/.env.development index e348e032b..e3549b1a8 100644 --- a/docs/.env.development +++ b/docs/.env.development @@ -1 +1 @@ -NEXT_PUBLIC_DEMO_URL=https://demo.master.forui.dev/card \ No newline at end of file +NEXT_PUBLIC_DEMO_URL=https://demo.forui.dev \ No newline at end of file diff --git a/docs/components/widget.tsx b/docs/components/widget.tsx index 667bc5b09..64681a42b 100644 --- a/docs/components/widget.tsx +++ b/docs/components/widget.tsx @@ -8,15 +8,14 @@ interface Props { export function Widget({name, variant = 'default', query}: Props) { const {resolvedTheme} = useTheme(); - query['theme'] = resolvedTheme; + query['theme'] = `zinc-${resolvedTheme}`; const url = process.env['NEXT_PUBLIC_DEMO_URL']; return (