diff --git a/Sources/Bedrock/Views/Effects/PulsingModifier.swift b/Sources/Bedrock/Views/Effects/PulsingModifier.swift index 871b3bc..0734997 100644 --- a/Sources/Bedrock/Views/Effects/PulsingModifier.swift +++ b/Sources/Bedrock/Views/Effects/PulsingModifier.swift @@ -73,9 +73,7 @@ public extension View { .clipShape(.rect(cornerRadius: Design.CornerRadius.medium)) .pulsing(isActive: true) - Text("Pulsing highlights interactive areas") - .foregroundStyle(Color.TextColors.secondary) - .font(.caption) + StyledLabel("Pulsing highlights interactive areas", .caption, emphasis: .secondary) } } } diff --git a/Sources/Bedrock/Views/Settings/LicensesView.swift b/Sources/Bedrock/Views/Settings/LicensesView.swift index 56db7f4..047b7d2 100644 --- a/Sources/Bedrock/Views/Settings/LicensesView.swift +++ b/Sources/Bedrock/Views/Settings/LicensesView.swift @@ -75,26 +75,18 @@ public struct LicensesView: View { private func licenseCard(_ license: License) -> some View { SettingsCard(backgroundColor: cardBackgroundColor, borderColor: cardBorderColor) { VStack(alignment: .leading, spacing: Design.Spacing.small) { - Text(license.name) - .typography(.bodyEmphasis) - .foregroundStyle(.white) + StyledLabel(license.name, .bodyEmphasis, emphasis: .inverse) - Text(license.description) - .typography(.caption) - .foregroundStyle(.white.opacity(Design.Opacity.strong)) + StyledLabel(license.description, .caption, emphasis: .secondary) HStack { - Label(license.licenseType, systemImage: "doc.text") - .typography(.caption2) - .foregroundStyle(accentColor) + IconLabel("doc.text", license.licenseType, .caption2, emphasis: .custom(accentColor)) Spacer() if let linkURL = URL(string: license.url) { Link(destination: linkURL) { - Label(String(localized: "View on GitHub"), systemImage: "arrow.up.right.square") - .typography(.caption2) - .foregroundStyle(accentColor) + IconLabel("arrow.up.right.square", String(localized: "View on GitHub"), .caption2, emphasis: .custom(accentColor)) } } } diff --git a/Sources/Bedrock/Views/Settings/SegmentedPicker.swift b/Sources/Bedrock/Views/Settings/SegmentedPicker.swift index f34b72d..20ec7c6 100644 --- a/Sources/Bedrock/Views/Settings/SegmentedPicker.swift +++ b/Sources/Bedrock/Views/Settings/SegmentedPicker.swift @@ -51,9 +51,7 @@ public struct SegmentedPicker: View { public var body: some View { VStack(alignment: .leading, spacing: Design.Spacing.small) { - Text(title) - .typography(.subheadingEmphasis) - .foregroundStyle(.white) + StyledLabel(title, .subheadingEmphasis, emphasis: .inverse) HStack(spacing: Design.Spacing.small) { ForEach(options.indices, id: \.self) { index in @@ -61,9 +59,7 @@ public struct SegmentedPicker: View { Button { selection = option.1 } label: { - Text(option.0) - .typography(.subheadingEmphasis) - .foregroundStyle(selection == option.1 ? .black : .white.opacity(Design.Opacity.strong)) + StyledLabel(option.0, .subheadingEmphasis, emphasis: .custom(selection == option.1 ? .black : .white.opacity(Design.Opacity.strong))) .padding(.vertical, Design.Spacing.small) .frame(maxWidth: .infinity) .background( diff --git a/Sources/Bedrock/Views/Settings/SelectableRow.swift b/Sources/Bedrock/Views/Settings/SelectableRow.swift index 45417b6..df45f72 100644 --- a/Sources/Bedrock/Views/Settings/SelectableRow.swift +++ b/Sources/Bedrock/Views/Settings/SelectableRow.swift @@ -67,13 +67,9 @@ public struct SelectableRow: View { Button(action: action) { HStack { VStack(alignment: .leading, spacing: Design.Spacing.xxSmall) { - Text(title) - .typography(.calloutEmphasis) - .foregroundStyle(.white) + StyledLabel(title, .calloutEmphasis, emphasis: .inverse) - Text(subtitle) - .typography(.subheading) - .foregroundStyle(.white.opacity(Design.Opacity.medium)) + StyledLabel(subtitle, .subheading, emphasis: .tertiary) } Spacer() diff --git a/Sources/Bedrock/Views/Settings/SettingsSectionHeader.swift b/Sources/Bedrock/Views/Settings/SettingsSectionHeader.swift index 5c72b2e..de52816 100644 --- a/Sources/Bedrock/Views/Settings/SettingsSectionHeader.swift +++ b/Sources/Bedrock/Views/Settings/SettingsSectionHeader.swift @@ -40,8 +40,8 @@ public struct SettingsSectionHeader: View { } Text(title) - .typography(.captionEmphasis) - .foregroundStyle(.secondary) + .font(Typography.captionEmphasis.font) + .foregroundStyle(Theme.Text.secondary) .textCase(.uppercase) .tracking(0.5) diff --git a/Sources/Bedrock/Views/Settings/SettingsSegmentedPicker.swift b/Sources/Bedrock/Views/Settings/SettingsSegmentedPicker.swift index faa6eee..fd4e0ef 100644 --- a/Sources/Bedrock/Views/Settings/SettingsSegmentedPicker.swift +++ b/Sources/Bedrock/Views/Settings/SettingsSegmentedPicker.swift @@ -97,9 +97,7 @@ public struct SettingsSegmentedPicker: View { Button { selection = option.1 } label: { - Text(option.0) - .typography(.subheadingEmphasis) - .foregroundStyle(selection == option.1 ? Color.white : .primary) + StyledLabel(option.0, .subheadingEmphasis, emphasis: .custom(selection == option.1 ? Color.white : Theme.Text.primary)) .padding(.vertical, Design.Spacing.small) .frame(maxWidth: .infinity) .background( diff --git a/Sources/Bedrock/Views/Settings/iCloudSyncSettingsView.swift b/Sources/Bedrock/Views/Settings/iCloudSyncSettingsView.swift index 4614e87..5fe1686 100644 --- a/Sources/Bedrock/Views/Settings/iCloudSyncSettingsView.swift +++ b/Sources/Bedrock/Views/Settings/iCloudSyncSettingsView.swift @@ -117,18 +117,14 @@ public struct iCloudSyncSettingsView: View { HStack(spacing: Design.Spacing.small) { SymbolIcon(syncStatusIcon, size: .inline, color: syncStatusColor) - Text(syncStatusText) - .typography(.caption) - .foregroundStyle(.white.opacity(Design.Opacity.medium)) + StyledLabel(syncStatusText, .caption, emphasis: .tertiary) Spacer() Button { viewModel.forceSync() } label: { - Text(String(localized: "Sync Now")) - .typography(.captionEmphasis) - .foregroundStyle(accentColor) + StyledLabel(String(localized: "Sync Now"), .captionEmphasis, emphasis: .custom(accentColor)) } } .padding(.top, Design.Spacing.xSmall) diff --git a/Sources/Bedrock/Views/Text/StyledText.swift b/Sources/Bedrock/Views/Text/StyledText.swift index 5e64cfb..176fd7d 100644 --- a/Sources/Bedrock/Views/Text/StyledText.swift +++ b/Sources/Bedrock/Views/Text/StyledText.swift @@ -138,7 +138,7 @@ public struct SectionHeader: View { Text(title) .font(Typography.caption.font) - .foregroundStyle(Color.TextColors.secondary) + .foregroundStyle(Theme.Text.secondary) .textCase(.uppercase) .tracking(0.5) }