diff --git a/clients/macos/vellum-assistant/Features/Onboarding/FirstMeeting/JITPermissionView.swift b/clients/macos/vellum-assistant/Features/Onboarding/FirstMeeting/JITPermissionView.swift index 34f311e372f..6c7cde1abc7 100644 --- a/clients/macos/vellum-assistant/Features/Onboarding/FirstMeeting/JITPermissionView.swift +++ b/clients/macos/vellum-assistant/Features/Onboarding/FirstMeeting/JITPermissionView.swift @@ -185,22 +185,12 @@ struct JITPermissionView: View { @ViewBuilder private func permissionButton(_ title: String, isPrimary: Bool, action: @escaping () -> Void) -> some View { - Button(action: action) { - Text(title) - .font(VFont.labelDefault) - .foregroundStyle(isPrimary ? VColor.auxWhite : VColor.contentDefault.opacity(0.85)) - .frame(maxWidth: .infinity) - .padding(.horizontal, VSpacing.sm) - .padding(.vertical, VSpacing.sm + VSpacing.xxs) - .background(isPrimary ? AnyShapeStyle(VColor.primaryBase) : AnyShapeStyle(Color.clear)) - .clipShape(RoundedRectangle(cornerRadius: VRadius.md)) - .overlay( - RoundedRectangle(cornerRadius: VRadius.md) - .stroke(isPrimary ? Color.clear : VColor.contentDefault.opacity(0.2), lineWidth: 1) - ) - } - .buttonStyle(.plain) - .frame(maxWidth: .infinity) + VButton( + label: title, + style: isPrimary ? .primary : .outlined, + isFullWidth: true, + action: action + ) } private func dismiss() { diff --git a/clients/macos/vellum-assistant/Features/Onboarding/ImproveExperienceStepView.swift b/clients/macos/vellum-assistant/Features/Onboarding/ImproveExperienceStepView.swift index 3267802ba36..2fd84799dfe 100644 --- a/clients/macos/vellum-assistant/Features/Onboarding/ImproveExperienceStepView.swift +++ b/clients/macos/vellum-assistant/Features/Onboarding/ImproveExperienceStepView.swift @@ -107,7 +107,7 @@ struct ImproveExperienceStepView: View { if tosAccepted { VIconView(.check, size: 12) - .foregroundStyle(VColor.auxWhite) + .foregroundStyle(VColor.contentInset) } } .frame(width: 20, height: 20) diff --git a/clients/shared/DesignSystem/Gallery/Sections/ChatGallerySection.swift b/clients/shared/DesignSystem/Gallery/Sections/ChatGallerySection.swift index ba0f8b685c3..a27a9ae0a8b 100644 --- a/clients/shared/DesignSystem/Gallery/Sections/ChatGallerySection.swift +++ b/clients/shared/DesignSystem/Gallery/Sections/ChatGallerySection.swift @@ -525,30 +525,14 @@ struct ChatGallerySection: View { } private func surfaceActionPill(label: String, style: SurfaceActionStyle) -> some View { - Text(label) - .font(VFont.bodyMediumDefault) - .foregroundStyle(surfaceActionForeground(style)) - .padding(.horizontal, VSpacing.lg) - .padding(.vertical, VSpacing.sm) - .background( - RoundedRectangle(cornerRadius: VRadius.md) - .fill(surfaceActionBackground(style)) - ) + VButton(label: label, style: surfaceActionButtonStyle(style)) {} } - private func surfaceActionForeground(_ style: SurfaceActionStyle) -> Color { + private func surfaceActionButtonStyle(_ style: SurfaceActionStyle) -> VButton.Style { switch style { - case .primary: return VColor.auxWhite - case .destructive: return VColor.auxWhite - case .secondary: return VColor.contentDefault - } - } - - private func surfaceActionBackground(_ style: SurfaceActionStyle) -> Color { - switch style { - case .primary: return VColor.primaryBase - case .destructive: return VColor.systemNegativeStrong - case .secondary: return VColor.borderBase.opacity(0.5) + case .primary: return .primary + case .secondary: return .outlined + case .destructive: return .danger } } } diff --git a/clients/shared/Features/Chat/InlineWidgets/InlineSurfaceRouter.swift b/clients/shared/Features/Chat/InlineWidgets/InlineSurfaceRouter.swift index 495e9c858c3..987e422b7b2 100644 --- a/clients/shared/Features/Chat/InlineWidgets/InlineSurfaceRouter.swift +++ b/clients/shared/Features/Chat/InlineWidgets/InlineSurfaceRouter.swift @@ -358,9 +358,11 @@ public struct InlineSurfaceRouter: View { } else { VStack(alignment: .leading, spacing: VSpacing.sm) { ForEach(surface.actions, id: \.uniqueId) { action in - Button { + VButton( + label: action.label, + style: buttonStyle(for: action.style) + ) { clickedActionLabel = action.label - // Merge action.data (button payload) with selectionPayload (list selection) var merged = selectionPayload ?? [:] if let actionData = action.data { for (key, value) in actionData { @@ -368,36 +370,17 @@ public struct InlineSurfaceRouter: View { } } onAction(surface.id, action.id, merged.isEmpty ? nil : merged) - } label: { - Text(action.label) - .font(VFont.bodyMediumDefault) - .foregroundStyle(buttonForeground(action.style)) - .padding(.horizontal, VSpacing.lg) - .padding(.vertical, VSpacing.sm) - .background( - RoundedRectangle(cornerRadius: VRadius.md) - .fill(buttonBackground(action.style)) - ) } - .buttonStyle(.plain) } } } } - private func buttonForeground(_ style: SurfaceActionStyle) -> Color { - switch style { - case .primary: return VColor.auxWhite - case .destructive: return VColor.auxWhite - case .secondary: return VColor.contentDefault - } - } - - private func buttonBackground(_ style: SurfaceActionStyle) -> Color { + private func buttonStyle(for style: SurfaceActionStyle) -> VButton.Style { switch style { - case .primary: return VColor.primaryBase - case .destructive: return VColor.systemNegativeStrong - case .secondary: return VColor.borderBase.opacity(0.5) + case .primary: return .primary + case .secondary: return .outlined + case .destructive: return .danger } } diff --git a/clients/shared/Features/Surfaces/FileUploadSurfaceView.swift b/clients/shared/Features/Surfaces/FileUploadSurfaceView.swift index 2dc7a56abc0..75b7b505bef 100644 --- a/clients/shared/Features/Surfaces/FileUploadSurfaceView.swift +++ b/clients/shared/Features/Surfaces/FileUploadSurfaceView.swift @@ -93,32 +93,13 @@ public struct FileUploadSurfaceView: View { HStack(spacing: VSpacing.lg) { Spacer() - Button(action: { onCancel() }) { - Text("Cancel") - .font(VFont.labelDefault) - .foregroundStyle(VColor.contentSecondary) - .padding(.horizontal, VSpacing.lg) - .padding(.vertical, VSpacing.sm) - .overlay( - RoundedRectangle(cornerRadius: VRadius.sm) - .stroke(VColor.borderBase, lineWidth: 1) - ) + VButton(label: "Cancel", style: .outlined, size: .compact) { + onCancel() } - .buttonStyle(.plain) - Button(action: { submitFiles() }) { - Text("Upload") - .font(VFont.labelDefault) - .foregroundStyle(selectedFiles.isEmpty ? VColor.contentTertiary : VColor.auxWhite) - .padding(.horizontal, VSpacing.lg) - .padding(.vertical, VSpacing.sm) - .background( - RoundedRectangle(cornerRadius: VRadius.sm) - .fill(selectedFiles.isEmpty ? VColor.surfaceOverlay : VColor.primaryBase) - ) + VButton(label: "Upload", style: .primary, size: .compact, isDisabled: selectedFiles.isEmpty) { + submitFiles() } - .buttonStyle(.plain) - .disabled(selectedFiles.isEmpty) } } }