diff --git a/Sources/OversizeUI/Controls/Button/Button.swift b/Sources/OversizeUI/Controls/Button/Button.swift index a411d67d..34c8c8c8 100644 --- a/Sources/OversizeUI/Controls/Button/Button.swift +++ b/Sources/OversizeUI/Controls/Button/Button.swift @@ -124,7 +124,7 @@ public struct OversizeButtonStyle: ButtonStyle { .background(background(for: configuration.role)) .overlay(loadingView(for: configuration.role)) .scaleEffect(configuration.isPressed ? 0.95 : 1) - .shadowElevaton(isEnabled ? elevation : .z0) + .shadowElevation(isEnabled ? elevation : .z0) } @ViewBuilder diff --git a/Sources/OversizeUI/Controls/Button/IconButtonStyle.swift b/Sources/OversizeUI/Controls/Button/IconButtonStyle.swift index 3698fb45..4aa4db1f 100644 --- a/Sources/OversizeUI/Controls/Button/IconButtonStyle.swift +++ b/Sources/OversizeUI/Controls/Button/IconButtonStyle.swift @@ -31,7 +31,7 @@ public struct IconButtonStyle: ButtonStyle { .background(background(for: configuration.role)) .overlay(loadingView(for: configuration.role)) .scaleEffect(configuration.isPressed ? 0.95 : 1) - .shadowElevaton(isEnabled ? elevation : .z0) + .shadowElevation(isEnabled ? elevation : .z0) } @ViewBuilder diff --git a/Sources/OversizeUI/Controls/GridSelect/GridSelect.swift b/Sources/OversizeUI/Controls/GridSelect/GridSelect.swift index cc3f99af..0e234ebc 100644 --- a/Sources/OversizeUI/Controls/GridSelect/GridSelect.swift +++ b/Sources/OversizeUI/Controls/GridSelect/GridSelect.swift @@ -129,7 +129,7 @@ public struct GridSelect: View lineWidth: CGFloat(theme.borderSize) ) ) - .shadowElevaton(.z2) + .shadowElevation(.z2) case .graySurface: RoundedRectangle( cornerRadius: radius, @@ -183,7 +183,7 @@ public struct GridSelect: View ZStack { Circle() .foregroundColor(Color.surfacePrimary) - .shadowElevaton(.z2) + .shadowElevation(.z2) IconDeprecated(.checkMini, color: .onSurfacePrimary) }.frame(width: Space.large.rawValue, height: Space.large.rawValue) .padding(.small) @@ -195,7 +195,7 @@ public struct GridSelect: View ZStack { Circle() .foregroundColor(Color.accent) - .shadowElevaton(.z2) + .shadowElevation(.z2) Circle() .frame(width: Space.small.rawValue, height: Space.small.rawValue) }.frame(width: Space.large.rawValue, height: Space.large.rawValue) diff --git a/Sources/OversizeUI/Controls/HUD/HUD.swift b/Sources/OversizeUI/Controls/HUD/HUD.swift index 81e9b21a..f897e217 100644 --- a/Sources/OversizeUI/Controls/HUD/HUD.swift +++ b/Sources/OversizeUI/Controls/HUD/HUD.swift @@ -63,13 +63,13 @@ public struct HUD: View where Title: View, Icon: View { .background( RoundedRectangle(cornerRadius: .small, style: .continuous) .foregroundColor(Color.onBackgroundPrimary) - .shadowElevaton(.z2) + .shadowElevation(.z2) ) #else .background( Capsule() .foregroundColor(Color.surfacePrimary) - .shadowElevaton(.z2) + .shadowElevation(.z2) ) #endif .padding(.small) diff --git a/Sources/OversizeUI/Controls/KeyboardToolbar/KeyboardToolbar.swift b/Sources/OversizeUI/Controls/KeyboardToolbar/KeyboardToolbar.swift index 6b609195..a60331fd 100644 --- a/Sources/OversizeUI/Controls/KeyboardToolbar/KeyboardToolbar.swift +++ b/Sources/OversizeUI/Controls/KeyboardToolbar/KeyboardToolbar.swift @@ -49,6 +49,6 @@ public struct KeyboardToolbar: View where A: View { .padding(.horizontal, .small) .padding(.vertical, .xxSmall) .background(Color.surfacePrimary) - .shadowElevaton(.z1) + .shadowElevation(.z1) } } diff --git a/Sources/OversizeUI/Controls/Menu/BarButtonMenuStyle.swift b/Sources/OversizeUI/Controls/Menu/BarButtonMenuStyle.swift index 1b6a4fe0..28778ca6 100644 --- a/Sources/OversizeUI/Controls/Menu/BarButtonMenuStyle.swift +++ b/Sources/OversizeUI/Controls/Menu/BarButtonMenuStyle.swift @@ -20,7 +20,7 @@ public struct BarButtonMenuStyle: MenuStyle { .foregroundColor(Color.onPrimary) .padding(.xxSmall) .background(background) - .shadowElevaton(.z2) + .shadowElevation(.z2) } private var background: some View { diff --git a/Sources/OversizeUI/Controls/SegmentedControl/SegmentedControl.swift b/Sources/OversizeUI/Controls/SegmentedControl/SegmentedControl.swift index c9d80dd7..f4c569bb 100644 --- a/Sources/OversizeUI/Controls/SegmentedControl/SegmentedControl.swift +++ b/Sources/OversizeUI/Controls/SegmentedControl/SegmentedControl.swift @@ -247,7 +247,7 @@ public struct SegmentedPickerSelector: V lineWidth: CGFloat(theme.borderSize) ) ) - .shadowElevaton(platform == .macOS ? .z0 : .z2) + .shadowElevation(platform == .macOS ? .z0 : .z2) case .graySurface: if style.unseletionStyle == .clean { diff --git a/Sources/OversizeUI/Controls/Surface/MaterialSurface.swift b/Sources/OversizeUI/Controls/Surface/MaterialSurface.swift index de0312ba..bfccedb8 100644 --- a/Sources/OversizeUI/Controls/Surface/MaterialSurface.swift +++ b/Sources/OversizeUI/Controls/Surface/MaterialSurface.swift @@ -56,7 +56,7 @@ public struct MaterialSurface: View { in: RoundedRectangle(cornerRadius: controlRadius, style: .continuous) ) .overlay(overlayView) - .shadowElevaton(elevation) + .shadowElevation(elevation) } @ViewBuilder diff --git a/Sources/OversizeUI/Controls/Surface/Surface.swift b/Sources/OversizeUI/Controls/Surface/Surface.swift index 8a1efb1d..5d74091f 100644 --- a/Sources/OversizeUI/Controls/Surface/Surface.swift +++ b/Sources/OversizeUI/Controls/Surface/Surface.swift @@ -84,7 +84,7 @@ public struct Surface: View { style: .continuous ) .fill(surfaceBackgroundColor) - .shadowElevaton(elevation) + .shadowElevation(elevation) if isHover { RoundedRectangle( @@ -100,7 +100,7 @@ public struct Surface: View { style: .continuous ) .fill(surfaceBackgroundColor) - .shadowElevaton(elevation) + .shadowElevation(elevation) #endif } .overlay( diff --git a/Sources/OversizeUI/Core/Shadow.swift b/Sources/OversizeUI/Core/Shadow.swift index 2371542c..097b6eb8 100644 --- a/Sources/OversizeUI/Core/Shadow.swift +++ b/Sources/OversizeUI/Core/Shadow.swift @@ -62,11 +62,21 @@ public struct Shadow: ViewModifier { } public extension View { + @available(*, deprecated, renamed: "shadowElevation") func shadowElevaton(_ elevation: Elevation) -> some View { modifier(Shadow(elevation: elevation)) } + @available(*, deprecated, renamed: "shadowElevation") func shadowElevaton(_ elevation: Elevation, color: Color) -> some View { modifier(Shadow(elevation: elevation, color: color)) } + + func shadowElevation(_ elevation: Elevation) -> some View { + modifier(Shadow(elevation: elevation)) + } + + func shadowElevation(_ elevation: Elevation, color: Color) -> some View { + modifier(Shadow(elevation: elevation, color: color)) + } } diff --git a/Sources/OversizeUI/Deprecated/PageView.swift b/Sources/OversizeUI/Deprecated/PageView.swift index a61f20e6..516eeac5 100644 --- a/Sources/OversizeUI/Deprecated/PageView.swift +++ b/Sources/OversizeUI/Deprecated/PageView.swift @@ -276,7 +276,7 @@ public struct PageView bottomToolbar() Spacer() } - .background(Color.surfacePrimary.shadowElevaton(style == .shadow ? .z2 : .z0)) + .background(Color.surfacePrimary.shadowElevation(style == .shadow ? .z2 : .z0)) } } } diff --git a/Sources/OversizeUI/Deprecated/PageView/Page.swift b/Sources/OversizeUI/Deprecated/PageView/Page.swift index 9ac62f21..f2a8e235 100644 --- a/Sources/OversizeUI/Deprecated/PageView/Page.swift +++ b/Sources/OversizeUI/Deprecated/PageView/Page.swift @@ -375,7 +375,7 @@ public struct Page