diff --git a/.github/workflows/publish-docc.yml b/.github/workflows/publish-docc.yml index 908f313..d461258 100644 --- a/.github/workflows/publish-docc.yml +++ b/.github/workflows/publish-docc.yml @@ -14,7 +14,7 @@ jobs: environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} - runs-on: macos-12 + runs-on: macos-14 steps: - name: Checkout 🛎️ uses: actions/checkout@v3 diff --git a/Package.swift b/Package.swift index 0aefc86..9c6c4ca 100644 --- a/Package.swift +++ b/Package.swift @@ -19,17 +19,11 @@ let package = Package( targets: ["OversizeUI"] ), ], - dependencies: [ - .package(url: "https://github.com/SwiftGen/SwiftGenPlugin", .upToNextMajor(from: "6.6.2")), - ], targets: [ .target( name: "OversizeUI", dependencies: [], - resources: [.process("Resources")], - plugins: [ - .plugin(name: "SwiftGenPlugin", package: "SwiftGenPlugin"), - ] + resources: [.process("Resources")] ), .testTarget(name: "OversizeUITests", dependencies: ["OversizeUI"]), ] diff --git a/Sources/OversizeUI/Controls/Avatar/Avatar.swift b/Sources/OversizeUI/Controls/Avatar/Avatar.swift index 00cac67..9c1d2fb 100644 --- a/Sources/OversizeUI/Controls/Avatar/Avatar.swift +++ b/Sources/OversizeUI/Controls/Avatar/Avatar.swift @@ -22,7 +22,6 @@ public enum AvatarBackgroundType { /// ``` /// public struct Avatar: View { - #if !os(tvOS) @Environment(\.controlSize) var controlSize: ControlSize #endif diff --git a/Sources/OversizeUI/Controls/Background/Background.swift b/Sources/OversizeUI/Controls/Background/Background.swift index 10045de..e7197a3 100644 --- a/Sources/OversizeUI/Controls/Background/Background.swift +++ b/Sources/OversizeUI/Controls/Background/Background.swift @@ -53,20 +53,20 @@ public struct Background: View { private var paddingSize: CGFloat { switch padding { case .medium: - return Constants.paddingMedium + Constants.paddingMedium case .small: - return Constants.paddingSmall + Constants.paddingSmall } } private var backgroundColor: Color { switch background { case .primary: - return Constants.colorPrimary + Constants.colorPrimary case .secondary: - return Constants.colorSecondary + Constants.colorSecondary case .tertiary: - return Constants.colorTertiary + Constants.colorTertiary } } } diff --git a/Sources/OversizeUI/Controls/Button/BarButton.swift b/Sources/OversizeUI/Controls/Button/BarButton.swift index edae1c7..488a089 100644 --- a/Sources/OversizeUI/Controls/Button/BarButton.swift +++ b/Sources/OversizeUI/Controls/Button/BarButton.swift @@ -61,61 +61,61 @@ public struct BarButton: View { private var controlSize: ControlSize { switch type { case .close, .closeAction, .back, .backAction, .image, .icon: - return .mini + .mini default: - return .small + .small } } private var isAccent: Bool { switch type { case .accent: - return true + true default: - return false + false } } private var isDisabled: Bool { switch type { case .disabled: - return true + true default: - return false + false } } private var buttonStyle: OversizeButtonStyle { switch type { case .close, .closeAction, .back, .backAction, .image, .icon, .secondary: - return .secondary + .secondary case .accent, .primary: - return .primary + .primary case .disabled: - return .tertiary + .tertiary } } private var buttonAction: () -> Void { switch type { case .back, .close: - return { dismiss() } + { dismiss() } case let .closeAction(action: action): - return action + action case let .backAction(action: action): - return action + action case let .accent(_, action: action): - return action + action case let .primary(_, action: action): - return action + action case let .secondary(_, action: action): - return action + action case .disabled: - return {} + {} case let .image(_, action: action): - return action + action case let .icon(_, action: action): - return action + action } } diff --git a/Sources/OversizeUI/Controls/Button/Button.swift b/Sources/OversizeUI/Controls/Button/Button.swift index 01927f6..a8c64f6 100644 --- a/Sources/OversizeUI/Controls/Button/Button.swift +++ b/Sources/OversizeUI/Controls/Button/Button.swift @@ -78,21 +78,21 @@ public struct OversizeButtonStyle: ButtonStyle { switch type { case .primary: switch role { - case .some(.destructive): return Color.error - case .some(.cancel): return Color.accent + case .some(.destructive): Color.error + case .some(.cancel): Color.accent default: if isAccent { - return Color.accent + Color.accent } else { - return Color.primary + Color.primary } } case .secondary: - return Color.surfacePrimary + Color.surfacePrimary case .tertiary: - return Color.surfaceSecondary + Color.surfaceSecondary case .quaternary: - return Color.clear + Color.clear } } @@ -100,34 +100,34 @@ public struct OversizeButtonStyle: ButtonStyle { switch type { case .primary: switch role { - case .some(.destructive), .some(.cancel): return Color.onPrimaryHighEmphasis + case .some(.destructive), .some(.cancel): Color.onPrimaryHighEmphasis default: if isAccent { - return Color.onPrimaryHighEmphasis + Color.onPrimaryHighEmphasis } else { - return Color.backgroundPrimary + Color.backgroundPrimary } } case .secondary, .quaternary: switch role { - case .some(.destructive): return Color.error - case .some(.cancel): return Color.accent + case .some(.destructive): Color.error + case .some(.cancel): Color.accent default: if isAccent { - return Color.accent + Color.accent } else { - return Color.onSurfaceHighEmphasis + Color.onSurfaceHighEmphasis } } case .tertiary: switch role { - case .some(.destructive): return Color.error - case .some(.cancel): return Color.onSurfaceHighEmphasis + case .some(.destructive): Color.error + case .some(.cancel): Color.onSurfaceHighEmphasis default: if isAccent { - return Color.accent + Color.accent } else { - return Color.onSurfaceHighEmphasis + Color.onSurfaceHighEmphasis } } } diff --git a/Sources/OversizeUI/Controls/Button/FieldButtonStyle.swift b/Sources/OversizeUI/Controls/Button/FieldButtonStyle.swift index 259b72d..5121cbc 100644 --- a/Sources/OversizeUI/Controls/Button/FieldButtonStyle.swift +++ b/Sources/OversizeUI/Controls/Button/FieldButtonStyle.swift @@ -65,13 +65,13 @@ public struct FieldButtonStyle: ButtonStyle { private var backgroundShapeCorners: UIRectCorner { switch fieldPosition { case .default: - return [.allCorners] + [.allCorners] case .top: - return [.topLeft, .topRight] + [.topLeft, .topRight] case .bottom: - return [.bottomLeft, .bottomRight] + [.bottomLeft, .bottomRight] case .center: - return [] + [] } } #endif diff --git a/Sources/OversizeUI/Controls/Checkbox/Checkbox.swift b/Sources/OversizeUI/Controls/Checkbox/Checkbox.swift index 9d030a2..1683531 100644 --- a/Sources/OversizeUI/Controls/Checkbox/Checkbox.swift +++ b/Sources/OversizeUI/Controls/Checkbox/Checkbox.swift @@ -94,9 +94,9 @@ public struct Checkbox: View { private var foregroundColor: Color { if isEnabled { - return Color.onSurfaceHighEmphasis + Color.onSurfaceHighEmphasis } else { - return Color.onSurfaceDisabled + Color.onSurfaceDisabled } } } diff --git a/Sources/OversizeUI/Controls/ContentView/ContentView.swift b/Sources/OversizeUI/Controls/ContentView/ContentView.swift index 24cccde..f7290bd 100644 --- a/Sources/OversizeUI/Controls/ContentView/ContentView.swift +++ b/Sources/OversizeUI/Controls/ContentView/ContentView.swift @@ -48,7 +48,11 @@ public struct ContentView: View { .frame(width: 218, height: 218, alignment: .bottom) } - TextBox(title: title, subtitle: subtitle) + TextBox( + title: title, + subtitle: subtitle, + spacing: .xxSmall + ) primaryButtonView() @@ -59,11 +63,11 @@ public struct ContentView: View { var vStackAlignment: HorizontalAlignment { switch multilineTextAlignment { case .leading: - return .leading + .leading case .center: - return .center + .center case .trailing: - return .trailing + .trailing } } } @@ -78,59 +82,96 @@ extension ContentView { Button(action: { dismiss() }) { IconDeprecated(.xMini) } + #if os(iOS) .buttonStyle(.secondary) + #endif + #if os(macOS) + .controlSize(.large) + #endif case .back: Button(action: { dismiss() }) { IconDeprecated(.arrowLeft) } + #if os(iOS) .buttonStyle(.secondary) - + #endif + #if os(macOS) + .controlSize(.large) + #endif case let .secondary(text, action: action): Button(action: action) { Text(text) } + #if os(iOS) .buttonStyle(.secondary) - + #endif + #if os(macOS) + .controlSize(.large) + #endif case let .accent(text, action: action): Button(action: action) { Text(text) } + #if os(iOS) .buttonStyle(.primary) .accent() - + #endif + #if os(macOS) + .controlSize(.large) + .buttonStyle(.borderedProminent) + .keyboardShortcut(.defaultAction) + #endif case let .primary(text, action: action): Button(action: action) { Text(text) } + #if os(iOS) .buttonStyle(.primary) - + #endif + #if os(macOS) + .controlSize(.large) + .buttonStyle(.borderedProminent) + .keyboardShortcut(.defaultAction) + #endif case let .closeAction(action: action): Button(action: action) { IconDeprecated(.xMini) } + #if os(iOS) .buttonStyle(.secondary) - + #endif + #if os(macOS) + .controlSize(.large) + #endif case let .backAction(action: action): Button(action: action) { IconDeprecated(.arrowLeft) } + #if os(iOS) .buttonStyle(.secondary) - + #endif + #if os(macOS) + .controlSize(.large) + #endif case let .disabled(text): Button(action: {}) { Text(text) } + #if os(iOS) .buttonStyle(.quaternary) .disabled(true) - + #endif + #if os(macOS) + .controlSize(.large) + #endif case .none: EmptyView() } @@ -144,58 +185,67 @@ extension ContentView { Button(action: { dismiss() }) { IconDeprecated(.xMini) } + #if os(iOS) .buttonStyle(.secondary) - + #endif case .back: Button(action: { dismiss() }) { IconDeprecated(.arrowLeft) } + #if os(iOS) .buttonStyle(.secondary) - + #endif case let .secondary(text, action: action): Button(action: action) { Text(text) } + #if os(iOS) .buttonStyle(.secondary) - + #endif case let .accent(text, action: action): Button(action: action) { Text(text) } + #if os(iOS) .buttonStyle(.primary) .accent() - + #endif case let .primary(text, action: action): Button(action: action) { Text(text) } + #if os(iOS) .buttonStyle(.primary) .accent() - + #endif case let .closeAction(action: action): Button(action: action) { IconDeprecated(.xMini) } + #if os(iOS) .buttonStyle(.secondary) - + #endif case let .backAction(action: action): Button(action: action) { IconDeprecated(.arrowLeft) } + #if os(iOS) .buttonStyle(.secondary) - + #endif case let .disabled(text): Button(action: {}) { Text(text) } + #if os(iOS) .buttonStyle(.tertiary) + #endif .disabled(true) case .none: diff --git a/Sources/OversizeUI/Controls/Divider/Separator.swift b/Sources/OversizeUI/Controls/Divider/Separator.swift index 5ce1592..cc1f04c 100644 --- a/Sources/OversizeUI/Controls/Divider/Separator.swift +++ b/Sources/OversizeUI/Controls/Divider/Separator.swift @@ -31,15 +31,15 @@ public struct Separator: View { private func insets(_ isHorizontal: Bool) -> EdgeInsets { if isHorizontal { - return EdgeInsets(top: 0.5, - leading: padding.rawValue, - bottom: 0, - trailing: padding.rawValue) + EdgeInsets(top: 0.5, + leading: padding.rawValue, + bottom: 0, + trailing: padding.rawValue) } else { - return EdgeInsets(top: padding.rawValue, - leading: 0.5, - bottom: padding.rawValue, - trailing: 0) + EdgeInsets(top: padding.rawValue, + leading: 0.5, + bottom: padding.rawValue, + trailing: 0) } } } diff --git a/Sources/OversizeUI/Controls/IconPicker/IconPicker.swift b/Sources/OversizeUI/Controls/IconPicker/IconPicker.swift index 2fbfc25..dd1ca6d 100644 --- a/Sources/OversizeUI/Controls/IconPicker/IconPicker.swift +++ b/Sources/OversizeUI/Controls/IconPicker/IconPicker.swift @@ -11,17 +11,17 @@ import SwiftUI public struct IconPicker: View { @Environment(\.theme) private var theme: ThemeSettings @Environment(\.horizontalSizeClass) var horizontalSizeClass - + private let label: String private let icons: [Image] @Binding private var selection: Image? @State private var showModal = false @State private var isSelected = false - + @State private var selectedIndex: Int? - + @State var offset = CGPoint(x: 0, y: 0) - + private var gridPadding: CGFloat { guard let sizeClass = horizontalSizeClass else { return 40 } switch sizeClass { @@ -31,7 +31,7 @@ public struct IconPicker: View { return 72 } } - + public init(_ label: String, _ icons: [Image], selection: Binding) @@ -40,7 +40,7 @@ public struct IconPicker: View { self.icons = icons _selection = selection } - + public var body: some View { Button { showModal.toggle() @@ -48,7 +48,7 @@ public struct IconPicker: View { HStack(spacing: .xxSmall) { Text(label) .onSurfaceHighEmphasisForegroundColor() - + Spacer() if let image = selection { image @@ -61,14 +61,14 @@ public struct IconPicker: View { modal } } - + private var modal: some View { PageView(label) { ScrollView { LazyVGrid(columns: [GridItem(.adaptive(minimum: gridPadding))]) { ForEach(icons.indices, id: \.self) { index in Button( - action: { selectedIndex = index }, + action: { selectedIndex = index }, label: { if index == selectedIndex { Group { @@ -81,7 +81,7 @@ public struct IconPicker: View { .strokeBorder(Color.border, lineWidth: 1) .frame(width: 48, height: 48, alignment: .center) ) - + } else { icons[index] .resizable() diff --git a/Sources/OversizeUI/Controls/KeyboardToolbar/KeyboardToolbar.swift b/Sources/OversizeUI/Controls/KeyboardToolbar/KeyboardToolbar.swift index 3e7a5ba..6b60919 100644 --- a/Sources/OversizeUI/Controls/KeyboardToolbar/KeyboardToolbar.swift +++ b/Sources/OversizeUI/Controls/KeyboardToolbar/KeyboardToolbar.swift @@ -24,9 +24,9 @@ public struct KeyboardToolbar: View where A: View { actions .buttonStyle(.quaternary) .controlBorderShape(.capsule) - #if !os(tvOS) + #if !os(tvOS) .controlSize(.mini) - #endif + #endif } } @@ -42,7 +42,7 @@ public struct KeyboardToolbar: View where A: View { .controlBorderShape(.capsule) .accent() #if !os(tvOS) - .controlSize(.mini) + .controlSize(.mini) #endif } } diff --git a/Sources/OversizeUI/Controls/Label/MenuLabelStyle.swift b/Sources/OversizeUI/Controls/Label/MenuLabelStyle.swift index b424d78..123b34b 100644 --- a/Sources/OversizeUI/Controls/Label/MenuLabelStyle.swift +++ b/Sources/OversizeUI/Controls/Label/MenuLabelStyle.swift @@ -39,11 +39,11 @@ public struct MenuLabelStyle: LabelStyle { private var textAlignment: HorizontalAlignment { switch multilineTextAlignment { case .leading: - return .leading + .leading case .center: - return .center + .center case .trailing: - return .trailing + .trailing } } } diff --git a/Sources/OversizeUI/Controls/Label/RowLabelStyle.swift b/Sources/OversizeUI/Controls/Label/RowLabelStyle.swift index 214ee58..03d808f 100644 --- a/Sources/OversizeUI/Controls/Label/RowLabelStyle.swift +++ b/Sources/OversizeUI/Controls/Label/RowLabelStyle.swift @@ -39,11 +39,11 @@ public struct RowLabelStyle: LabelStyle { private var textAlignment: HorizontalAlignment { switch multilineTextAlignment { case .leading: - return .leading + .leading case .center: - return .center + .center case .trailing: - return .trailing + .trailing } } } diff --git a/Sources/OversizeUI/Controls/PageView/Page.swift b/Sources/OversizeUI/Controls/PageView/Page.swift index 1cf1990..9709c53 100644 --- a/Sources/OversizeUI/Controls/PageView/Page.swift +++ b/Sources/OversizeUI/Controls/PageView/Page.swift @@ -24,7 +24,7 @@ public struct Page 0 ? 0 : -5 * visibleRatio : 1) - } - } - } - #endif - #if !os(tvOS) - .toolbarBackground(.hidden) - #endif .onChange(of: focusStateSearchBar, perform: onChangeFocusSearchBar) .onChange(of: displaySearchBar, perform: onChangeDisplaySearchBar) #if os(iOS) + .toolbar { + if let title { + ToolbarItem(placement: .principal) { + Text(title) + .font(.headline) + .opacity(isLargeTitle ? 1 - visibleRatio : 1) // .opacity(isLargeTitle ? visibleRatio > 0 ? 0 : -5 * visibleRatio : 1) + } + } + } + .toolbarBackground(.hidden) .toolbar(isFocusSearchBar ? .hidden : .automatic, for: .navigationBar) .navigationBarTitleDisplayMode(.inline) #endif + #if os(macOS) + .navigationTitle(title ?? "") + #endif } var scrollView: some View { @@ -126,7 +125,6 @@ public struct Page 95, !isShowSearchBar { withAnimation(.easeOut(duration: 0.30)) { isShowSearchBar = true @@ -170,7 +170,7 @@ public struct Page 0 ? 0 : -5 * visibleRatio)) - //.fill(Material.bar.opacity(visibleRatio > 0 ? 0 : -5 * visibleRatio)) + // .fill(Material.bar.opacity(visibleRatio > 0 ? 0 : -5 * visibleRatio)) .overlay(alignment: .bottom) { Divider().opacity(visibleRatio > 0 ? 0 : -5 * visibleRatio) } @@ -215,9 +215,9 @@ public struct Page 0 ? 0 : -5 * visibleRatio) } @@ -236,9 +236,9 @@ public struct Page: View { private var foregroundColor: Color { if isEnabled { - return Color.onSurfaceHighEmphasis + Color.onSurfaceHighEmphasis } else { - return Color.onSurfaceDisabled + Color.onSurfaceDisabled } } } diff --git a/Sources/OversizeUI/Controls/Row/Row.swift b/Sources/OversizeUI/Controls/Row/Row.swift index 0526e0d..f04c98f 100644 --- a/Sources/OversizeUI/Controls/Row/Row.swift +++ b/Sources/OversizeUI/Controls/Row/Row.swift @@ -15,7 +15,6 @@ public struct Row: View where LeadingLabel: View, T @Environment(\.rowContentMargins) var controlMargins: EdgeSpaceInsets @Environment(\.multilineTextAlignment) var multilineTextAlignment @Environment(\.isPremium) var premiumStatus - @Environment(\.isAccent) var isAccent @Environment(\.isLoading) var isLoading private let title: String @@ -32,16 +31,18 @@ public struct Row: View where LeadingLabel: View, T private let action: (() -> Void)? - private var isPremiumOption: Bool = false - private var isShowArrowIcon: Bool = false + private var isPremiumOption = false + private var isShowArrowIcon = false private var iconBackgroundColor: Color? private var сlearButtonStyle: RowClearIconStyle = .default private var сlearAction: (() -> Void)? - + private var leadingSpace: Space = .small + private var textColor: Color? = nil + private var isShowSubtitle: Bool { (subtitle?.isEmpty) != nil } @@ -105,7 +106,6 @@ public struct Row: View where LeadingLabel: View, T .frame(width: leadingSize?.width, height: leadingSize?.height) .cornerRadius(leadingRadius ?? 0) .padding(.trailing, leadingSpace) - if textAlignment == .trailing || textAlignment == .center { Spacer() @@ -142,11 +142,11 @@ public struct Row: View where LeadingLabel: View, T VStack(alignment: textAlignment, spacing: .zero) { Text(title) .headline(.medium) - .foregroundColor(.onSurfaceHighEmphasis) + .foregroundColor(titleTextColor) if let subtitle, !subtitle.isEmpty { Text(subtitle) .subheadline() - .foregroundColor(.onSurfaceMediumEmphasis) + .foregroundColor(subtitleTextColor) } } .multilineTextAlignment(multilineTextAlignment) @@ -178,14 +178,30 @@ public struct Row: View where LeadingLabel: View, T } } + private var titleTextColor: Color { + if let textColor { + textColor + } else { + Color.onSurfaceHighEmphasis + } + } + + private var subtitleTextColor: Color { + if let textColor { + textColor + } else { + Color.onSurfaceMediumEmphasis + } + } + private var textAlignment: HorizontalAlignment { switch multilineTextAlignment { case .leading: - return .leading + .leading case .center: - return .center + .center case .trailing: - return .trailing + .trailing } } } @@ -217,13 +233,19 @@ public extension Row { control.сlearAction = action return control } - + func leadingContentMargin(_ margin: Space = .small) -> Row { var control = self control.leadingSpace = margin return control } + func rowTextColor(_ color: Color?) -> Row { + var control = self + control.textColor = color + return control + } + @available(*, deprecated, message: "Use leading: {} and tralling: {}") func rowLeading(_ leading: RowLeadingType?) -> Row { var control = self diff --git a/Sources/OversizeUI/Controls/SectionView/SectionView.swift b/Sources/OversizeUI/Controls/SectionView/SectionView.swift index c1a6dc4..9822275 100644 --- a/Sources/OversizeUI/Controls/SectionView/SectionView.swift +++ b/Sources/OversizeUI/Controls/SectionView/SectionView.swift @@ -97,18 +97,18 @@ public struct SectionView: View { private var titleFont: Font { switch titlePosition { case .inside: - return .title2.weight(.semibold) + .title2.weight(.semibold) case .outside: - return .headline.weight(.semibold) + .headline.weight(.semibold) } } private var titleColor: Color { switch titlePosition { case .inside: - return .onSurfaceHighEmphasis + .onSurfaceHighEmphasis case .outside: - return .onBackgroundHighEmphasis + .onBackgroundHighEmphasis } } @@ -193,9 +193,9 @@ public struct SectionView: View { private var surfaceVerticalPaddingSize: CGFloat { switch style { case .default: - return Space.small.rawValue + Space.small.rawValue case .smallIndent, .edgeToEdge: - return 2 + 2 } } } diff --git a/Sources/OversizeUI/Controls/SegmentedControl/SegmentedControl.swift b/Sources/OversizeUI/Controls/SegmentedControl/SegmentedControl.swift index 2d0e059..ae428a1 100644 --- a/Sources/OversizeUI/Controls/SegmentedControl/SegmentedControl.swift +++ b/Sources/OversizeUI/Controls/SegmentedControl/SegmentedControl.swift @@ -10,18 +10,18 @@ public struct SegmentedPickerSelector: V @Environment(\.segmentedControlStyle) private var style @Environment(\.controlRadius) var controlRadius: Radius @Environment(\.segmentedPickerMargins) var controlPadding: EdgeSpaceInsets - + public typealias Data = [Element] - + @State private var frames: [CGRect] @State private var selectedIndex: Data.Index? = 0 @Binding private var selection: Data.Element - + private let data: Data private let selectionView: () -> Selection? private let content: (Data.Element, Bool) -> Content private let action: (() -> Void)? - + public init(_ data: Data, selection: Binding, @ViewBuilder content: @escaping (Data.Element, Bool) -> Content, @@ -36,7 +36,7 @@ public struct SegmentedPickerSelector: V _frames = State(wrappedValue: Array(repeating: .zero, count: data.count)) } - + public var body: some View { style .makeBody( @@ -56,7 +56,7 @@ public struct SegmentedPickerSelector: V } } } - + @ViewBuilder private func getSegmentedControl() -> some View { switch style.isEquallySpacing { @@ -66,12 +66,12 @@ public struct SegmentedPickerSelector: V leadingSegmentedControl } } - + private var equallSegmentedControl: some View { ZStack(alignment: Alignment( horizontal: .horizontalCenterAlignment, vertical: .center - )){ + )) { if let selectedIndex { HStack(spacing: 0) { selectionView() @@ -80,7 +80,6 @@ public struct SegmentedPickerSelector: V maxWidth: .infinity, alignment: .center ) - } .frame( width: frames[selectedIndex].width, @@ -92,7 +91,7 @@ public struct SegmentedPickerSelector: V } .background(getSelection(selectionStyle: style.seletionStyle)) } - + HStack(spacing: 0) { ForEach(data.indices, id: \.self) { index in Button( @@ -105,31 +104,31 @@ public struct SegmentedPickerSelector: V HStack(spacing: 0) { content(data[index], selectedIndex == index) - .body(.semibold) - .foregroundColor(style.seletionStyle == .accentSurface && selectedIndex == index ? Color.onPrimaryHighEmphasis : Color.onSurfaceHighEmphasis) - .multilineTextAlignment(.center) - .contentShape(Rectangle()) - .frame( - maxWidth: .infinity, - alignment: .center - ) - + .body(.semibold) + .foregroundColor(style.seletionStyle == .accentSurface && selectedIndex == index ? Color.onPrimaryHighEmphasis : Color.onSurfaceHighEmphasis) + .multilineTextAlignment(.center) + .contentShape(Rectangle()) + .frame( + maxWidth: .infinity, + alignment: .center + ) } .padding(.leading, controlPadding.leading) .padding(.trailing, controlPadding.trailing) .padding(.top, controlPadding.top != Space.zero || controlPadding.top != Space.xxSmall - ? controlPadding.top.rawValue - Space.xxSmall.rawValue - : Space.zero.rawValue) + ? controlPadding.top.rawValue - Space.xxSmall.rawValue + : Space.zero.rawValue) .padding(.bottom, controlPadding.bottom != Space.zero || controlPadding.bottom != Space.xxSmall - ? controlPadding.bottom.rawValue - Space.xxSmall.rawValue - : Space.zero.rawValue) + ? controlPadding.bottom.rawValue - Space.xxSmall.rawValue + : Space.zero.rawValue) .background(selectedIndex != index - ? getUnselection(unselectionStyle: style.unseletionStyle) - : nil) - }) - + ? getUnselection(unselectionStyle: style.unseletionStyle) + : nil) + } + ) + .buttonStyle(PlainButtonStyle()) .background(GeometryReader { proxy in Color.clear.onAppear { DispatchQueue.main.asyncAfter(deadline: .now() + 0.01) { frames[index] = proxy.frame(in: .global) } } @@ -141,13 +140,12 @@ public struct SegmentedPickerSelector: V dimensions[HorizontalAlignment.center] } .padding(.trailing, style.unseletionStyle == .surface ? Space.xSmall.rawValue : 0) - } } } .animation(.easeInOut(duration: 0.3), value: selection) } - + private var leadingSegmentedControl: some View { ZStack(alignment: Alignment(horizontal: .horizontalCenterAlignment, vertical: .center)) @@ -164,7 +162,7 @@ public struct SegmentedPickerSelector: V } .background(getSelection(selectionStyle: style.seletionStyle)) } - + HStack(spacing: 0) { ForEach(data.indices, id: \.self) { index in Button( @@ -174,23 +172,24 @@ public struct SegmentedPickerSelector: V action?() }, label: { content(data[index], selectedIndex == index) - .body(.semibold) - .foregroundColor(style.seletionStyle == .accentSurface && selectedIndex == index ? Color.onPrimaryHighEmphasis : Color.onSurfaceHighEmphasis) - .multilineTextAlignment(.center) - .padding(.leading, controlPadding.leading) - .padding(.trailing, controlPadding.trailing) - .padding(.top, - controlPadding.top != Space.zero || controlPadding.top != Space.xxSmall + .body(.semibold) + .foregroundColor(style.seletionStyle == .accentSurface && selectedIndex == index ? Color.onPrimaryHighEmphasis : Color.onSurfaceHighEmphasis) + .multilineTextAlignment(.center) + .padding(.leading, controlPadding.leading) + .padding(.trailing, controlPadding.trailing) + .padding(.top, + controlPadding.top != Space.zero || controlPadding.top != Space.xxSmall ? controlPadding.top.rawValue - Space.xxSmall.rawValue : Space.zero.rawValue) - .padding(.bottom, - controlPadding.bottom != Space.zero || controlPadding.bottom != Space.xxSmall + .padding(.bottom, + controlPadding.bottom != Space.zero || controlPadding.bottom != Space.xxSmall ? controlPadding.bottom.rawValue - Space.xxSmall.rawValue : Space.zero.rawValue) - .background(selectedIndex != index - ? getUnselection(unselectionStyle: style.unseletionStyle) - : nil) - }) + .background(selectedIndex != index + ? getUnselection(unselectionStyle: style.unseletionStyle) + : nil) + } + ) .buttonStyle(PlainButtonStyle()) .background(GeometryReader { proxy in Color.clear.onAppear { frames[index] = proxy.frame(in: .global) } @@ -207,45 +206,45 @@ public struct SegmentedPickerSelector: V } .animation(.easeInOut(duration: 0.3), value: selection) } - + @ViewBuilder private func getSelection(selectionStyle: SegmentedControlSeletionStyle) -> some View { switch selectionStyle { case .shadowSurface: - + RoundedRectangle(cornerRadius: style.isShowBackground ? controlRadius.rawValue - 4 : controlRadius.rawValue, style: .continuous) - .fill(Color.surfacePrimary) - .overlay( - RoundedRectangle(cornerRadius: style.isShowBackground - ? controlRadius.rawValue - 4 - : controlRadius.rawValue, - style: .continuous) - .stroke(theme.borderControls - ? Color.border - : Color.surfaceSecondary, lineWidth: CGFloat(theme.borderSize)) - ) - .shadowElevaton(.z2) - case .graySurface: - - if style.unseletionStyle == .clean { - RoundedRectangle(cornerRadius: controlRadius, - style: .continuous) - .fill(Color.surfaceSecondary) + .fill(Color.surfacePrimary) .overlay( - RoundedRectangle(cornerRadius: controlRadius, - style: .continuous) - .stroke(theme.borderControls + RoundedRectangle(cornerRadius: style.isShowBackground + ? controlRadius.rawValue - 4 + : controlRadius.rawValue, + style: .continuous) + .stroke(theme.borderControls ? Color.border : Color.surfaceSecondary, lineWidth: CGFloat(theme.borderSize)) ) - + .shadowElevaton(.z2) + case .graySurface: + + if style.unseletionStyle == .clean { + RoundedRectangle(cornerRadius: controlRadius, + style: .continuous) + .fill(Color.surfaceSecondary) + .overlay( + RoundedRectangle(cornerRadius: controlRadius, + style: .continuous) + .stroke(theme.borderControls + ? Color.border + : Color.surfaceSecondary, lineWidth: CGFloat(theme.borderSize)) + ) + } else { RoundedRectangle(cornerRadius: style.isShowBackground - ? controlRadius.rawValue - 4 - : controlRadius.rawValue, - style: .continuous) - .strokeBorder(Color.onSurfaceMediumEmphasis, lineWidth: 2) + ? controlRadius.rawValue - 4 + : controlRadius.rawValue, + style: .continuous) + .strokeBorder(Color.onSurfaceMediumEmphasis, lineWidth: 2) } case .accentSurface: RoundedRectangle( @@ -255,24 +254,24 @@ public struct SegmentedPickerSelector: V .fill(Color.accent) } } - + @ViewBuilder private func getUnselection(unselectionStyle: SegmentedControlUnseletionStyle) -> some View { switch unselectionStyle { case .clean: EmptyView() case .surface: - + RoundedRectangle(cornerRadius: controlRadius, style: .continuous) - .fill(Color.surfaceSecondary) - .overlay( - RoundedRectangle(cornerRadius: controlRadius, - style: .continuous) - .stroke(theme.borderControls - ? Color.border - : Color.surfaceSecondary, lineWidth: CGFloat(theme.borderSize)) - ) + .fill(Color.surfaceSecondary) + .overlay( + RoundedRectangle(cornerRadius: controlRadius, + style: .continuous) + .stroke(theme.borderControls + ? Color.border + : Color.surfaceSecondary, lineWidth: CGFloat(theme.borderSize)) + ) } } } diff --git a/Sources/OversizeUI/Controls/Select/MultiSelect.swift b/Sources/OversizeUI/Controls/Select/MultiSelect.swift index ec9ba88..e9ae58f 100644 --- a/Sources/OversizeUI/Controls/Select/MultiSelect.swift +++ b/Sources/OversizeUI/Controls/Select/MultiSelect.swift @@ -22,7 +22,7 @@ public struct MultiSelect Content private let contentUnavailable: ContentUnavailable? private let selectionView: (Data) -> Selection - @State private var showModal: Bool = false + @State private var showModal = false @Binding private var showModalBinding: Bool? @State var selectedIndexes: [Int] = [] let actions: Group? diff --git a/Sources/OversizeUI/Controls/Select/MultiSelectPicker.swift b/Sources/OversizeUI/Controls/Select/MultiSelectPicker.swift index 576b3b5..cf1fcce 100644 --- a/Sources/OversizeUI/Controls/Select/MultiSelectPicker.swift +++ b/Sources/OversizeUI/Controls/Select/MultiSelectPicker.swift @@ -41,7 +41,7 @@ public struct MultiSelectPicker some View { switch selectStyle { @@ -93,7 +92,7 @@ public struct MultiSelectPicker some View { LazyVStack(alignment: .leading, spacing: .zero) { ForEach(data.indices, id: \.self) { index in diff --git a/Sources/OversizeUI/Controls/Select/Select.swift b/Sources/OversizeUI/Controls/Select/Select.swift index 4b4180d..f1a2808 100644 --- a/Sources/OversizeUI/Controls/Select/Select.swift +++ b/Sources/OversizeUI/Controls/Select/Select.swift @@ -23,7 +23,7 @@ public struct Select Selection - @State private var showModal: Bool = false + @State private var showModal = false @State private var isSelected = false let actions: Group? diff --git a/Sources/OversizeUI/Controls/Select/SelectPicker.swift b/Sources/OversizeUI/Controls/Select/SelectPicker.swift index c82e1d9..173b203 100644 --- a/Sources/OversizeUI/Controls/Select/SelectPicker.swift +++ b/Sources/OversizeUI/Controls/Select/SelectPicker.swift @@ -48,7 +48,6 @@ public struct SelectPicker some View { switch selectStyle { @@ -95,13 +94,13 @@ public struct SelectPicker some View { LazyVStack(alignment: .leading, spacing: .zero) { ForEach(data.indices, id: \.self) { index in @@ -112,13 +111,13 @@ public struct SelectPicker, - activeModal: Binding = .constant(nil), + activeModal _: Binding = .constant(nil), @ViewBuilder content: @escaping (Data.Element, Bool) -> Content, @ViewBuilder contentUnavailable: () -> ContentUnavailable ) { @@ -173,7 +172,7 @@ public extension SelectPicker where ContentUnavailable == Never, Actions == Neve _ title: String? = nil, _ data: Data, selection: Binding, - activeModal: Binding = .constant(nil), + activeModal _: Binding = .constant(nil), @ViewBuilder content: @escaping (Data.Element, Bool) -> Content ) { self.title = title diff --git a/Sources/OversizeUI/Controls/Surface/Surface.swift b/Sources/OversizeUI/Controls/Surface/Surface.swift index a0f1291..39ede1c 100644 --- a/Sources/OversizeUI/Controls/Surface/Surface.swift +++ b/Sources/OversizeUI/Controls/Surface/Surface.swift @@ -86,39 +86,39 @@ public struct Surface: View { private var strokeBorderColor: Color { if let border { - return border + border } else { if theme.borderSurface { - return Color.border + Color.border } else { - return surfaceBackgroundColor + surfaceBackgroundColor } } } private var strokeBorderLineWidth: CGFloat { if let borderWidth { - return borderWidth + borderWidth } else { - return CGFloat(theme.borderSize) + CGFloat(theme.borderSize) } } private var surfaceBackgroundColor: Color { if let backgroundColor { - return backgroundColor + backgroundColor } else if isAccent { - return Color.accent + Color.accent } else { switch background { case .primary: - return Constants.colorPrimary + Constants.colorPrimary case .secondary: - return Constants.colorSecondary + Constants.colorSecondary case .tertiary: - return Constants.colorTertiary + Constants.colorTertiary case .clear: - return Color.clear + Color.clear } } } @@ -206,7 +206,7 @@ public extension View { } } - public extension Surface where Label == VStack, Row)>> { +public extension Surface where Label == VStack, Row)>> { init(action: (() -> Void)? = nil, @ViewBuilder label: () -> Label) { @@ -214,9 +214,9 @@ public extension View { self.action = action forceContentInsets = .init(horizontal: .zero, vertical: .small) } - } +} - public extension Surface where Label == Row { +public extension Surface where Label == Row { init(action: (() -> Void)? = nil, @ViewBuilder label: () -> Label) { @@ -224,9 +224,9 @@ public extension View { self.action = action forceContentInsets = .init(horizontal: .zero, vertical: .small) } - } +} - public extension Surface where Label == Row { +public extension Surface where Label == Row { init(action: (() -> Void)? = nil, @ViewBuilder label: () -> Label) { @@ -234,7 +234,7 @@ public extension View { self.action = action forceContentInsets = .init(horizontal: .zero, vertical: .small) } - } +} struct Surface_Previews: PreviewProvider { static var previews: some View { diff --git a/Sources/OversizeUI/Controls/Switch/Switch.swift b/Sources/OversizeUI/Controls/Switch/Switch.swift index ac4e634..dac048d 100644 --- a/Sources/OversizeUI/Controls/Switch/Switch.swift +++ b/Sources/OversizeUI/Controls/Switch/Switch.swift @@ -88,9 +88,9 @@ public struct Switch: View { private var foregroundColor: Color { if isEnabled { - return Color.onSurfaceHighEmphasis + Color.onSurfaceHighEmphasis } else { - return Color.onSurfaceDisabled + Color.onSurfaceDisabled } } } diff --git a/Sources/OversizeUI/Controls/TextBox/TextBox.swift b/Sources/OversizeUI/Controls/TextBox/TextBox.swift index a677a98..77c0fb7 100644 --- a/Sources/OversizeUI/Controls/TextBox/TextBox.swift +++ b/Sources/OversizeUI/Controls/TextBox/TextBox.swift @@ -44,15 +44,15 @@ public struct TextBox: View { private var textSpacing: Space { if let spacing { - return spacing + spacing } else { switch size { case .small: - return .xxxSmall + .xxxSmall case .medium: - return .small + .small case .large: - return .medium + .medium } } } @@ -60,11 +60,11 @@ public struct TextBox: View { private var textStackAlignment: HorizontalAlignment { switch multilineTextAlignment { case .leading: - return .leading + .leading case .center: - return .center + .center case .trailing: - return .trailing + .trailing } } diff --git a/Sources/OversizeUI/Controls/TextEditor/TextEditorPlaceholderViewModifier.swift b/Sources/OversizeUI/Controls/TextEditor/TextEditorPlaceholderViewModifier.swift index 87ebf7d..8a6f9f0 100644 --- a/Sources/OversizeUI/Controls/TextEditor/TextEditorPlaceholderViewModifier.swift +++ b/Sources/OversizeUI/Controls/TextEditor/TextEditorPlaceholderViewModifier.swift @@ -56,9 +56,9 @@ public struct TextEditorPlaceholderViewModifier: ViewModifier { var topInputPadding: CGFloat { switch fieldPlaceholderPosition { case .default, .adjacent: - return 10 + 10 case .overInput: - return text.isEmpty ? 8 : 22 + text.isEmpty ? 8 : 22 } } @@ -94,11 +94,11 @@ public struct TextEditorPlaceholderViewModifier: ViewModifier { var overlayBorderColor: Color { if isFocused { - return Color.accentColor + Color.accentColor } else if theme.borderTextFields { - return Color.border + Color.border } else { - return Color.clear + Color.clear } } } diff --git a/Sources/OversizeUI/Controls/TextField/LabeledTextFieldStyle.swift b/Sources/OversizeUI/Controls/TextField/LabeledTextFieldStyle.swift index 286e963..3972a36 100644 --- a/Sources/OversizeUI/Controls/TextField/LabeledTextFieldStyle.swift +++ b/Sources/OversizeUI/Controls/TextField/LabeledTextFieldStyle.swift @@ -34,10 +34,16 @@ public struct LabeledTextFieldStyle: TextFieldStyle { configuration .headline(.medium) .foregroundColor(.onSurfaceHighEmphasis) - .padding() - .padding(.vertical, fieldPlaceholderPosition == .overInput ? .xxxSmall : .zero) .offset(y: fieldOffset) .focused($isFocused) + #if os(macOS) + .textFieldStyle(.plain) + .padding(.xxSmall) + #else + .padding(.vertical, fieldPlaceholderPosition == .overInput ? .xxxSmall : .zero) + .padding() + + #endif } .background(fieldBackground) .overlay(overlay) @@ -69,13 +75,13 @@ public struct LabeledTextFieldStyle: TextFieldStyle { private var backgroundShapeCorners: UIRectCorner { switch fieldPosition { case .default: - return [.allCorners] + [.allCorners] case .top: - return [.topLeft, .topRight] + [.topLeft, .topRight] case .bottom: - return [.bottomLeft, .bottomRight] + [.bottomLeft, .bottomRight] case .center: - return [] + [] } } #endif @@ -83,11 +89,11 @@ public struct LabeledTextFieldStyle: TextFieldStyle { private var fieldOffset: CGFloat { switch fieldPlaceholderPosition { case .default: - return 0 + 0 case .adjacent: - return 0 + 0 case .overInput: - return text.isEmpty ? 0 : 10 + text.isEmpty ? 0 : 10 } } @@ -140,11 +146,11 @@ public struct LabeledTextFieldStyle: TextFieldStyle { private var overlayBorderColor: Color { if isFocused { - return Color.accentColor + Color.accentColor } else if theme.borderTextFields { - return Color.border + Color.border } else { - return Color.clear + Color.clear } } } diff --git a/Sources/OversizeUI/Controls/TextField/TextFieldExtended.swift b/Sources/OversizeUI/Controls/TextField/TextFieldExtended.swift index 21b77de..152b1e3 100644 --- a/Sources/OversizeUI/Controls/TextField/TextFieldExtended.swift +++ b/Sources/OversizeUI/Controls/TextField/TextFieldExtended.swift @@ -35,9 +35,8 @@ public struct TextFieldExtended: View { leadingImage: IconsNames = .none, trallingImage: IconsNames = .none, placeholderPosition: TextFieldPlaceholderPosition = .overField, - secure: Bool = false - // contentType: UITextContentType = . - ) { + secure: Bool = false) + { self.placeholder = placeholder _text = text _helperText = helperText diff --git a/Sources/OversizeUI/Controls/Toast/Snackbar.swift b/Sources/OversizeUI/Controls/Toast/Snackbar.swift index e3a6c46..ffa46d4 100644 --- a/Sources/OversizeUI/Controls/Toast/Snackbar.swift +++ b/Sources/OversizeUI/Controls/Toast/Snackbar.swift @@ -48,9 +48,9 @@ public struct Snackbar: View where Label: View, Actions: View { HStack(spacing: .xxSmall) { actions .buttonStyle(.quaternary) - #if !os(tvOS) + #if !os(tvOS) .controlSize(.mini) - #endif + #endif .accent() } } diff --git a/Sources/OversizeUI/Controls/URLField/URLField.swift b/Sources/OversizeUI/Controls/URLField/URLField.swift index 1bc6c93..c3a42f3 100644 --- a/Sources/OversizeUI/Controls/URLField/URLField.swift +++ b/Sources/OversizeUI/Controls/URLField/URLField.swift @@ -5,9 +5,8 @@ import SwiftUI -#if os(iOS) +#if os(iOS) || os(macOS) @available(iOS 15.0, *) -@available(macOS, unavailable) @available(watchOS, unavailable) @available(tvOS, unavailable) public struct URLField: View { @@ -24,6 +23,7 @@ public struct URLField: View { public var body: some View { TextField(title, text: $urlString, onEditingChanged: { state in + #if os(iOS) if state { textFieldHelper = .none } else if let url = URL(string: urlString), UIApplication.shared.canOpenURL(url) { @@ -33,17 +33,41 @@ public struct URLField: View { textFieldHelper = .errorText urlString = "" } + #else + + if state { + textFieldHelper = .none + } else if let url = URL(string: urlString) { + textFieldHelper = .none + self.url = url + } else { + textFieldHelper = .errorText + urlString = "" + } + #endif + }, onCommit: { + #if os(iOS) if let url = URL(string: urlString), UIApplication.shared.canOpenURL(url) { textFieldHelper = .none self.url = url } else { textFieldHelper = .errorText } + #else + if let url = URL(string: urlString) { + textFieldHelper = .none + self.url = url + } else { + textFieldHelper = .errorText + } + #endif }) + #if os(iOS) .keyboardType(.URL) - .textContentType(.URL) .textInputAutocapitalization(.never) + .textContentType(.URL) + #endif .autocorrectionDisabled() .fieldHelper(.constant("Invalid URL"), style: $textFieldHelper) } diff --git a/Sources/OversizeUI/Core/Appearance/Appearance.swift b/Sources/OversizeUI/Core/Appearance/Appearance.swift index 0ce66cf..7eff3b9 100644 --- a/Sources/OversizeUI/Core/Appearance/Appearance.swift +++ b/Sources/OversizeUI/Core/Appearance/Appearance.swift @@ -13,33 +13,33 @@ public enum Appearance: Int { public var colorScheme: ColorScheme? { switch self { case .system: - return nil + nil case .light: - return .light + .light case .dark: - return .dark + .dark } } public var name: String { switch self { case .system: - return "System" + "System" case .light: - return "Light" + "Light" case .dark: - return "Dark" + "Dark" } } public var image: Image { switch self { case .system: - return Image("System", bundle: .module) + Image("System", bundle: .module) case .light: - return Image("Light", bundle: .module) + Image("Light", bundle: .module) case .dark: - return Image("Dark", bundle: .module) + Image("Dark", bundle: .module) } } diff --git a/Sources/OversizeUI/Core/EnvironmentKeys/MultiSelectStyleEnvironment.swift b/Sources/OversizeUI/Core/EnvironmentKeys/MultiSelectStyleEnvironment.swift index 0ba24a0..72e17fa 100644 --- a/Sources/OversizeUI/Core/EnvironmentKeys/MultiSelectStyleEnvironment.swift +++ b/Sources/OversizeUI/Core/EnvironmentKeys/MultiSelectStyleEnvironment.swift @@ -8,6 +8,7 @@ import SwiftUI public enum MultiSelectStyle { case `default`, section } + private struct MultiSelectStyleKey: EnvironmentKey { public static var defaultValue: MultiSelectStyle = .default } diff --git a/Sources/OversizeUI/Core/EnvironmentKeys/ScreenSizeEnvironment.swift b/Sources/OversizeUI/Core/EnvironmentKeys/ScreenSizeEnvironment.swift index f1d0cc0..64430d1 100644 --- a/Sources/OversizeUI/Core/EnvironmentKeys/ScreenSizeEnvironment.swift +++ b/Sources/OversizeUI/Core/EnvironmentKeys/ScreenSizeEnvironment.swift @@ -70,4 +70,8 @@ public extension View { func screenSize(_ geometry: GeometryProxy) -> some View { environment(\.screenSize, ScreenSize(geometry: geometry)) } + + func screenSize(_ screenSize: ScreenSize) -> some View { + environment(\.screenSize, screenSize) + } } diff --git a/Sources/OversizeUI/Core/EnvironmentKeys/SelectPickerStyleEnvironment.swift b/Sources/OversizeUI/Core/EnvironmentKeys/SelectPickerStyleEnvironment.swift index 7ea08e5..464cebc 100644 --- a/Sources/OversizeUI/Core/EnvironmentKeys/SelectPickerStyleEnvironment.swift +++ b/Sources/OversizeUI/Core/EnvironmentKeys/SelectPickerStyleEnvironment.swift @@ -11,6 +11,7 @@ public enum SelectStyle { @available(macOS, unavailable) case wheel } + private struct SelectStyleKey: EnvironmentKey { public static var defaultValue: SelectStyle = .default } diff --git a/Sources/OversizeUI/Core/Icons.swift b/Sources/OversizeUI/Core/Icons.swift new file mode 100644 index 0000000..bfd8577 --- /dev/null +++ b/Sources/OversizeUI/Core/Icons.swift @@ -0,0 +1,915 @@ +// swiftlint:disable all +// Generated using SwiftGen — https://github.com/SwiftGen/SwiftGen + +import SwiftUI + +// swiftlint:disable superfluous_disable_command file_length implicit_return + +// MARK: - Asset Catalogs + +// swiftlint:disable identifier_name line_length nesting type_body_length type_name +public extension SwiftUI.Image { + enum Base { + public enum Activity { + public static let fill = Image("Base/Activity/Fill", bundle: .module) + public enum TwoTone { + public static let fill = Image("Base/Activity/TwoTone/Fill", bundle: .module) + } + + public static let twoTone = Image("Base/Activity/TwoTone", bundle: .module) + } + + public static let activity = Image("Base/Activity", bundle: .module) + public enum AddUser { + public static let fill = Image("Base/AddUser/Fill", bundle: .module) + public enum TwoTone { + public static let fill = Image("Base/AddUser/TwoTone/Fill", bundle: .module) + } + + public static let twoTone = Image("Base/AddUser/TwoTone", bundle: .module) + } + + public static let addUser = Image("Base/AddUser", bundle: .module) + public enum ArrowDown { + public static let fill = Image("Base/ArrowDown/Fill", bundle: .module) + public static let square = Image("Base/ArrowDown/Square", bundle: .module) + public enum TwoTone { + public static let fill = Image("Base/ArrowDown/TwoTone/Fill", bundle: .module) + } + + public static let twoTone = Image("Base/ArrowDown/TwoTone", bundle: .module) + } + + public static let arrowDown = Image("Base/ArrowDown", bundle: .module) + public enum ArrowLeft { + public static let fill = Image("Base/ArrowLeft/Fill", bundle: .module) + public static let square = Image("Base/ArrowLeft/Square", bundle: .module) + public enum TwoTone { + public static let fill = Image("Base/ArrowLeft/TwoTone/Fill", bundle: .module) + } + + public static let twoTone = Image("Base/ArrowLeft/TwoTone", bundle: .module) + } + + public static let arrowLeft = Image("Base/ArrowLeft", bundle: .module) + public enum ArrowRight { + public static let fill = Image("Base/ArrowRight/Fill", bundle: .module) + public static let square = Image("Base/ArrowRight/Square", bundle: .module) + public enum TwoTone { + public static let fill = Image("Base/ArrowRight/TwoTone/Fill", bundle: .module) + } + + public static let twoTone = Image("Base/ArrowRight/TwoTone", bundle: .module) + } + + public static let arrowRight = Image("Base/ArrowRight", bundle: .module) + public enum ArrowUp { + public static let fill = Image("Base/ArrowUp/Fill", bundle: .module) + public static let square = Image("Base/ArrowUp/Square", bundle: .module) + public enum TwoTone { + public static let fill = Image("Base/ArrowUp/TwoTone/Fill", bundle: .module) + } + + public static let twoTone = Image("Base/ArrowUp/TwoTone", bundle: .module) + } + + public static let arrowUp = Image("Base/ArrowUp", bundle: .module) + public static let attach = Image("Base/Attach", bundle: .module) + public enum Bag { + public static let fill = Image("Base/Bag/Fill", bundle: .module) + public enum TwoTone { + public static let fill = Image("Base/Bag/TwoTone/Fill", bundle: .module) + } + + public static let twoTone = Image("Base/Bag/TwoTone", bundle: .module) + } + + public static let bag = Image("Base/Bag", bundle: .module) + public enum Bag2 { + public static let fill = Image("Base/Bag2/Fill", bundle: .module) + public enum TwoTone { + public static let fill = Image("Base/Bag2/TwoTone/Fill", bundle: .module) + } + + public static let twoTone = Image("Base/Bag2/TwoTone", bundle: .module) + } + + public static let bag2 = Image("Base/Bag2", bundle: .module) + public enum Bookmark { + public static let fill = Image("Base/Bookmark/Fill", bundle: .module) + public enum TwoTone { + public static let fill = Image("Base/Bookmark/TwoTone/Fill", bundle: .module) + } + + public static let twoTone = Image("Base/Bookmark/TwoTone", bundle: .module) + } + + public static let bookmark = Image("Base/Bookmark", bundle: .module) + public enum Buy { + public static let fill = Image("Base/Buy/Fill", bundle: .module) + public enum TwoTone { + public static let fill = Image("Base/Buy/TwoTone/Fill", bundle: .module) + } + + public static let twoTone = Image("Base/Buy/TwoTone", bundle: .module) + } + + public static let buy = Image("Base/Buy", bundle: .module) + public enum Calendar { + public static let fill = Image("Base/Calendar/Fill", bundle: .module) + public enum TwoTone { + public static let fill = Image("Base/Calendar/TwoTone/Fill", bundle: .module) + } + + public static let twoTone = Image("Base/Calendar/TwoTone", bundle: .module) + } + + public static let calendar = Image("Base/Calendar", bundle: .module) + public enum CallMissed { + public static let fill = Image("Base/CallMissed/Fill", bundle: .module) + public enum TwoTone { + public static let fill = Image("Base/CallMissed/TwoTone/Fill", bundle: .module) + } + + public static let twoTone = Image("Base/CallMissed/TwoTone", bundle: .module) + } + + public static let callMissed = Image("Base/CallMissed", bundle: .module) + public enum Calling { + public static let fill = Image("Base/Calling/Fill", bundle: .module) + public enum TwoTone { + public static let fill = Image("Base/Calling/TwoTone/Fill", bundle: .module) + } + + public static let twoTone = Image("Base/Calling/TwoTone", bundle: .module) + } + + public static let calling = Image("Base/Calling", bundle: .module) + public enum Camera { + public static let fill = Image("Base/Camera/Fill", bundle: .module) + public enum TwoTone { + public static let fill = Image("Base/Camera/TwoTone/Fill", bundle: .module) + } + + public static let twoTone = Image("Base/Camera/TwoTone", bundle: .module) + } + + public static let camera = Image("Base/Camera", bundle: .module) + public enum Category { + public static let fill = Image("Base/Category/Fill", bundle: .module) + public enum TwoTone { + public static let fill = Image("Base/Category/TwoTone/Fill", bundle: .module) + } + + public static let twoTone = Image("Base/Category/TwoTone", bundle: .module) + } + + public static let category = Image("Base/Category", bundle: .module) + public enum Chart { + public static let fill = Image("Base/Chart/Fill", bundle: .module) + public enum TwoTone { + public static let fill = Image("Base/Chart/TwoTone/Fill", bundle: .module) + } + + public static let twoTone = Image("Base/Chart/TwoTone", bundle: .module) + } + + public static let chart = Image("Base/Chart", bundle: .module) + public enum Chat { + public static let fill = Image("Base/Chat/Fill", bundle: .module) + public enum TwoTone { + public static let fill = Image("Base/Chat/TwoTone/Fill", bundle: .module) + } + + public static let twoTone = Image("Base/Chat/TwoTone", bundle: .module) + } + + public static let chat = Image("Base/Chat", bundle: .module) + public enum Check { + public static let mini = Image("Base/Check/Mini", bundle: .module) + public enum Square { + public static let fill = Image("Base/Check/Square/Fill", bundle: .module) + public enum TwoTone { + public static let fill = Image("Base/Check/Square/TwoTone/Fill", bundle: .module) + } + + public static let twoTone = Image("Base/Check/Square/TwoTone", bundle: .module) + } + + public static let square = Image("Base/Check/Square", bundle: .module) + } + + public enum ChevronDown { + public enum Circle { + public static let fill = Image("Base/ChevronDown/Circle/Fill", bundle: .module) + public enum TwoTone { + public static let fill = Image("Base/ChevronDown/Circle/TwoTone/Fill", bundle: .module) + } + + public static let twoTone = Image("Base/ChevronDown/Circle/TwoTone", bundle: .module) + } + + public static let circle = Image("Base/ChevronDown/Circle", bundle: .module) + } + + public static let chevronDown = Image("Base/ChevronDown", bundle: .module) + public enum ChevronLeft { + public enum Circle { + public static let fill = Image("Base/ChevronLeft/Circle/Fill", bundle: .module) + public enum TwoTone { + public static let fill = Image("Base/ChevronLeft/Circle/TwoTone/Fill", bundle: .module) + } + + public static let twoTone = Image("Base/ChevronLeft/Circle/TwoTone", bundle: .module) + } + + public static let circle = Image("Base/ChevronLeft/Circle", bundle: .module) + } + + public static let chevronLeft = Image("Base/ChevronLeft", bundle: .module) + public enum ChevronRight { + public enum Circle { + public static let fill = Image("Base/ChevronRight/Circle/Fill", bundle: .module) + public enum TwoTone { + public static let fill = Image("Base/ChevronRight/Circle/TwoTone/Fill", bundle: .module) + } + + public static let twoTone = Image("Base/ChevronRight/Circle/TwoTone", bundle: .module) + } + + public static let circle = Image("Base/ChevronRight/Circle", bundle: .module) + } + + public static let chevronRight = Image("Base/ChevronRight", bundle: .module) + public enum ChevronUp { + public enum Circle { + public static let fill = Image("Base/ChevronUp/Circle/Fill", bundle: .module) + public enum TwoTone { + public static let fill = Image("Base/ChevronUp/Circle/TwoTone/Fill", bundle: .module) + } + + public static let twoTone = Image("Base/ChevronUp/Circle/TwoTone", bundle: .module) + } + + public static let circle = Image("Base/ChevronUp/Circle", bundle: .module) + } + + public static let chevronUp = Image("Base/ChevronUp", bundle: .module) + public static let clear = Image("Base/Clear", bundle: .module) + public enum Clock { + public static let fill = Image("Base/Clock/Fill", bundle: .module) + public enum Square { + public static let fill = Image("Base/Clock/Square/Fill", bundle: .module) + public enum TwoTone { + public static let fill = Image("Base/Clock/Square/TwoTone/Fill", bundle: .module) + } + + public static let twoTone = Image("Base/Clock/Square/TwoTone", bundle: .module) + } + + public static let square = Image("Base/Clock/Square", bundle: .module) + public enum TwoTone { + public static let fill = Image("Base/Clock/TwoTone/Fill", bundle: .module) + } + + public static let twoTone = Image("Base/Clock/TwoTone", bundle: .module) + } + + public static let clock = Image("Base/Clock", bundle: .module) + public enum Close { + public static let mini = Image("Base/Close/Mini", bundle: .module) + public enum Square { + public static let fill = Image("Base/Close/Square/Fill", bundle: .module) + public enum TwoTone { + public static let fill = Image("Base/Close/Square/TwoTone/Fill", bundle: .module) + } + + public static let twoTone = Image("Base/Close/Square/TwoTone", bundle: .module) + } + + public static let square = Image("Base/Close/Square", bundle: .module) + } + + public static let close = Image("Base/Close", bundle: .module) + public enum Delete { + public static let fill = Image("Base/Delete/Fill", bundle: .module) + public enum TwoTone { + public static let fill = Image("Base/Delete/TwoTone/Fill", bundle: .module) + } + + public static let twoTone = Image("Base/Delete/TwoTone", bundle: .module) + } + + public static let delete = Image("Base/Delete", bundle: .module) + public enum Discovery { + public static let fill = Image("Base/Discovery/Fill", bundle: .module) + public enum TwoTone { + public static let fill = Image("Base/Discovery/TwoTone/Fill", bundle: .module) + } + + public static let twoTone = Image("Base/Discovery/TwoTone", bundle: .module) + } + + public static let discovery = Image("Base/Discovery", bundle: .module) + public enum Document { + public static let fill = Image("Base/Document/Fill", bundle: .module) + public enum TwoTone { + public static let fill = Image("Base/Document/TwoTone/Fill", bundle: .module) + } + + public static let twoTone = Image("Base/Document/TwoTone", bundle: .module) + } + + public static let document = Image("Base/Document", bundle: .module) + public enum Download { + public static let fill = Image("Base/Download/Fill", bundle: .module) + public enum TwoTone { + public static let fill = Image("Base/Download/TwoTone/Fill", bundle: .module) + } + + public static let twoTone = Image("Base/Download/TwoTone", bundle: .module) + } + + public static let download = Image("Base/Download", bundle: .module) + public enum Edit { + public static let fill = Image("Base/Edit/Fill", bundle: .module) + public enum Square { + public static let fill = Image("Base/Edit/Square/Fill", bundle: .module) + public enum TwoTone { + public static let fill = Image("Base/Edit/Square/TwoTone/Fill", bundle: .module) + } + + public static let twoTone = Image("Base/Edit/Square/TwoTone", bundle: .module) + } + + public static let square = Image("Base/Edit/Square", bundle: .module) + public enum TwoTone { + public static let fill = Image("Base/Edit/TwoTone/Fill", bundle: .module) + } + + public static let twoTone = Image("Base/Edit/TwoTone", bundle: .module) + } + + public static let edit = Image("Base/Edit", bundle: .module) + public enum Exclamationmark { + public enum Circle { + public static let fill = Image("Base/Exclamationmark/Circle/Fill", bundle: .module) + public enum TwoTone { + public static let fill = Image("Base/Exclamationmark/Circle/TwoTone/Fill", bundle: .module) + } + + public static let twoTone = Image("Base/Exclamationmark/Circle/TwoTone", bundle: .module) + } + + public static let circle = Image("Base/Exclamationmark/Circle", bundle: .module) + public enum Triangle { + public static let fill = Image("Base/Exclamationmark/Triangle/Fill", bundle: .module) + public enum TwoTone { + public static let fill = Image("Base/Exclamationmark/Triangle/TwoTone/Fill", bundle: .module) + } + + public static let twoTone = Image("Base/Exclamationmark/Triangle/TwoTone", bundle: .module) + } + + public static let triangle = Image("Base/Exclamationmark/Triangle", bundle: .module) + } + + public static let exclamationmark = Image("Base/Exclamationmark", bundle: .module) + public enum Eye { + public static let fill = Image("Base/Eye/Fill", bundle: .module) + public enum Slash { + public static let fill = Image("Base/Eye/Slash/Fill", bundle: .module) + public enum TwoTone { + public static let fill = Image("Base/Eye/Slash/TwoTone/Fill", bundle: .module) + } + + public static let twoTone = Image("Base/Eye/Slash/TwoTone", bundle: .module) + } + + public static let slash = Image("Base/Eye/Slash", bundle: .module) + public enum TwoTone { + public static let fill = Image("Base/Eye/TwoTone/Fill", bundle: .module) + } + + public static let twoTone = Image("Base/Eye/TwoTone", bundle: .module) + } + + public static let eye = Image("Base/Eye", bundle: .module) + public enum Filter { + public static let fill = Image("Base/Filter/Fill", bundle: .module) + public enum TwoTone { + public static let fill = Image("Base/Filter/TwoTone/Fill", bundle: .module) + } + } + + public static let filter = Image("Base/Filter", bundle: .module) + public enum Folder { + public static let fill = Image("Base/Folder/Fill", bundle: .module) + public enum TwoTone { + public static let fill = Image("Base/Folder/TwoTone/Fill", bundle: .module) + } + + public static let twoTone = Image("Base/Folder/TwoTone", bundle: .module) + } + + public static let folder = Image("Base/Folder", bundle: .module) + public enum Game { + public static let fill = Image("Base/Game/Fill", bundle: .module) + public enum TwoTone { + public static let fill = Image("Base/Game/TwoTone/Fill", bundle: .module) + } + + public static let twoTone = Image("Base/Game/TwoTone", bundle: .module) + } + + public static let game = Image("Base/Game", bundle: .module) + public enum Graph { + public static let fill = Image("Base/Graph/Fill", bundle: .module) + public enum TwoTone { + public static let fill = Image("Base/Graph/TwoTone/Fill", bundle: .module) + } + + public static let twoTone = Image("Base/Graph/TwoTone", bundle: .module) + } + + public static let graph = Image("Base/Graph", bundle: .module) + public enum Heart { + public static let fill = Image("Base/Heart/Fill", bundle: .module) + public enum TwoTone { + public static let fill = Image("Base/Heart/TwoTone/Fill", bundle: .module) + } + + public static let twoTone = Image("Base/Heart/TwoTone", bundle: .module) + } + + public static let heart = Image("Base/Heart", bundle: .module) + public enum Home { + public static let fill = Image("Base/Home/Fill", bundle: .module) + } + + public static let home = Image("Base/Home", bundle: .module) + public enum Info { + public enum Circle { + public static let fill = Image("Base/Info/Circle/Fill", bundle: .module) + public static let twoTone = Image("Base/Info/Circle/TwoTone", bundle: .module) + } + + public static let circle = Image("Base/Info/Circle", bundle: .module) + public enum Square { + public static let dash = Image("Base/Info/Square/Dash", bundle: .module) + public enum TwoTone { + public static let dash = Image("Base/Info/Square/TwoTone/Dash", bundle: .module) + public static let fill = Image("Base/Info/Square/TwoTone/Fill", bundle: .module) + } + + public static let twoTone = Image("Base/Info/Square/TwoTone", bundle: .module) + } + + public static let square = Image("Base/Info/Square", bundle: .module) + } + + public static let info = Image("Base/Info", bundle: .module) + public static let link = Image("Base/Link", bundle: .module) + public enum Location { + public static let fill = Image("Base/Location/Fill", bundle: .module) + public enum TwoTone { + public static let fill = Image("Base/Location/TwoTone/Fill", bundle: .module) + } + + public static let twoTone = Image("Base/Location/TwoTone", bundle: .module) + } + + public static let location = Image("Base/Location", bundle: .module) + public enum Lock { + public static let fill = Image("Base/Lock/Fill", bundle: .module) + public enum TwoTone { + public static let fill = Image("Base/Lock/TwoTone/Fill", bundle: .module) + } + + public static let twoTone = Image("Base/Lock/TwoTone", bundle: .module) + } + + public static let lock = Image("Base/Lock", bundle: .module) + public enum Login { + public static let fill = Image("Base/Login/Fill", bundle: .module) + public enum TwoTone { + public static let fill = Image("Base/Login/TwoTone/Fill", bundle: .module) + } + + public static let twoTone = Image("Base/Login/TwoTone", bundle: .module) + } + + public static let login = Image("Base/Login", bundle: .module) + public enum Logout { + public static let fill = Image("Base/Logout/Fill", bundle: .module) + public enum TwoTone { + public static let fill = Image("Base/Logout/TwoTone/Fill", bundle: .module) + } + + public static let twoTone = Image("Base/Logout/TwoTone", bundle: .module) + } + + public static let logout = Image("Base/Logout", bundle: .module) + public enum Message { + public static let fill = Image("Base/Message/Fill", bundle: .module) + public enum TwoTone { + public static let fill = Image("Base/Message/TwoTone/Fill", bundle: .module) + } + + public static let twoTone = Image("Base/Message/TwoTone", bundle: .module) + } + + public static let message = Image("Base/Message", bundle: .module) + public enum More { + public enum Circle { + public static let fill = Image("Base/More/Circle/Fill", bundle: .module) + public enum TwoTone { + public static let fill = Image("Base/More/Circle/TwoTone/Fill", bundle: .module) + } + + public static let twoTone = Image("Base/More/Circle/TwoTone", bundle: .module) + } + + public static let circle = Image("Base/More/Circle", bundle: .module) + public enum Square { + public static let fill = Image("Base/More/Square/Fill", bundle: .module) + public enum TwoTone { + public static let fill = Image("Base/More/Square/TwoTone/Fill", bundle: .module) + } + + public static let twoTone = Image("Base/More/Square/TwoTone", bundle: .module) + } + + public static let square = Image("Base/More/Square", bundle: .module) + public static let vertical = Image("Base/More/Vertical", bundle: .module) + } + + public static let more = Image("Base/More", bundle: .module) + public static let nearMe = Image("Base/NearMe", bundle: .module) + public enum Notification { + public static let fill = Image("Base/Notification/Fill", bundle: .module) + public enum TwoTone { + public static let fill = Image("Base/Notification/TwoTone/Fill", bundle: .module) + } + + public static let twoTone = Image("Base/Notification/TwoTone", bundle: .module) + } + + public static let notification = Image("Base/Notification", bundle: .module) + public enum Paper { + public static let fill = Image("Base/Paper/Fill", bundle: .module) + public enum TwoTone { + public static let fill = Image("Base/Paper/TwoTone/Fill", bundle: .module) + } + + public static let twoTone = Image("Base/Paper/TwoTone", bundle: .module) + } + + public static let paper = Image("Base/Paper", bundle: .module) + public enum PaperDownload { + public static let fill = Image("Base/PaperDownload/Fill", bundle: .module) + public enum TwoTone { + public static let fill = Image("Base/PaperDownload/TwoTone/Fill", bundle: .module) + } + + public static let twoTone = Image("Base/PaperDownload/TwoTone", bundle: .module) + } + + public static let paperDownload = Image("Base/PaperDownload", bundle: .module) + public enum PaperFail { + public static let fill = Image("Base/PaperFail/Fill", bundle: .module) + public enum TwoTone { + public static let fill = Image("Base/PaperFail/TwoTone/Fill", bundle: .module) + } + + public static let twoTone = Image("Base/PaperFail/TwoTone", bundle: .module) + } + + public static let paperFail = Image("Base/PaperFail", bundle: .module) + public enum PaperNegative { + public static let fill = Image("Base/PaperNegative/Fill", bundle: .module) + public enum TwoTone { + public static let fill = Image("Base/PaperNegative/TwoTone/Fill", bundle: .module) + } + + public static let twoTone = Image("Base/PaperNegative/TwoTone", bundle: .module) + } + + public static let paperNegative = Image("Base/PaperNegative", bundle: .module) + public enum PaperPlus { + public static let fill = Image("Base/PaperPlus/Fill", bundle: .module) + public enum TwoTone { + public static let fill = Image("Base/PaperPlus/TwoTone/Fill", bundle: .module) + } + + public static let twoTone = Image("Base/PaperPlus/TwoTone", bundle: .module) + } + + public static let paperPlus = Image("Base/PaperPlus", bundle: .module) + public enum PaperUpload { + public static let fill = Image("Base/PaperUpload/Fill", bundle: .module) + public enum TwoTone { + public static let fill = Image("Base/PaperUpload/TwoTone/Fill", bundle: .module) + } + + public static let twoTone = Image("Base/PaperUpload/TwoTone", bundle: .module) + } + + public static let paperUpload = Image("Base/PaperUpload", bundle: .module) + public enum Password { + public static let fill = Image("Base/Password/Fill", bundle: .module) + public enum TwoTone { + public static let fill = Image("Base/Password/TwoTone/Fill", bundle: .module) + } + + public static let twoTone = Image("Base/Password/TwoTone", bundle: .module) + } + + public static let password = Image("Base/Password", bundle: .module) + public enum Phone { + public static let fill = Image("Base/Phone/Fill", bundle: .module) + public enum Slach { + public static let fill = Image("Base/Phone/Slach/Fill", bundle: .module) + public enum TwoTone { + public static let fill = Image("Base/Phone/Slach/TwoTone/Fill", bundle: .module) + } + } + + public static let slash = Image("Base/Phone/Slash", bundle: .module) + } + + public static let phone = Image("Base/Phone", bundle: .module) + public enum Picture { + public static let fill = Image("Base/Picture/Fill", bundle: .module) + public enum TwoTone { + public static let fill = Image("Base/Picture/TwoTone/Fill", bundle: .module) + } + + public static let twoTone = Image("Base/Picture/TwoTone", bundle: .module) + } + + public static let picture = Image("Base/Picture", bundle: .module) + public enum Picture2 { + public static let fill = Image("Base/Picture2/Fill", bundle: .module) + public enum TwoTone { + public static let fill = Image("Base/Picture2/TwoTone/Fill", bundle: .module) + } + + public static let twoTone = Image("Base/Picture2/TwoTone", bundle: .module) + } + + public static let picture2 = Image("Base/Picture2", bundle: .module) + public enum Play { + public static let fill = Image("Base/Play/Fill", bundle: .module) + public enum TwoTone { + public static let fill = Image("Base/Play/TwoTone/Fill", bundle: .module) + } + } + + public static let play = Image("Base/Play", bundle: .module) + public enum Plus { + public static let mini = Image("Base/Plus/Mini", bundle: .module) + public enum Square { + public static let fill = Image("Base/Plus/Square/Fill", bundle: .module) + public enum TwoTone { + public static let fill = Image("Base/Plus/Square/TwoTone/Fill", bundle: .module) + } + + public static let twoTone = Image("Base/Plus/Square/TwoTone", bundle: .module) + } + + public static let square = Image("Base/Plus/Square", bundle: .module) + } + + public static let plus = Image("Base/Plus", bundle: .module) + public enum Profile { + public static let fill = Image("Base/Profile/Fill", bundle: .module) + public enum TwoTone { + public static let fill = Image("Base/Profile/TwoTone/Fill", bundle: .module) + } + + public static let twoTone = Image("Base/Profile/TwoTone", bundle: .module) + } + + public static let profile = Image("Base/Profile", bundle: .module) + public enum Scan { + public static let fill = Image("Base/Scan/Fill", bundle: .module) + public enum TwoTone { + public static let fill = Image("Base/Scan/TwoTone/Fill", bundle: .module) + } + + public static let twoTone = Image("Base/Scan/TwoTone", bundle: .module) + } + + public static let scan = Image("Base/Scan", bundle: .module) + public enum Search { + public static let fill = Image("Base/Search/Fill", bundle: .module) + public enum TwoTone { + public static let fill = Image("Base/Search/TwoTone/Fill", bundle: .module) + } + + public static let twoTone = Image("Base/Search/TwoTone", bundle: .module) + } + + public static let search = Image("Base/Search", bundle: .module) + public enum Send { + public static let fill = Image("Base/Send/Fill", bundle: .module) + public enum TwoTone { + public static let fill = Image("Base/Send/TwoTone/Fill", bundle: .module) + } + + public static let twoTone = Image("Base/Send/TwoTone", bundle: .module) + } + + public static let send = Image("Base/Send", bundle: .module) + public enum Setting { + public static let fill = Image("Base/Setting/Fill", bundle: .module) + public enum TwoTone { + public static let fill = Image("Base/Setting/TwoTone/Fill", bundle: .module) + } + + public static let twoTone = Image("Base/Setting/TwoTone", bundle: .module) + } + + public static let setting = Image("Base/Setting", bundle: .module) + public enum Setting2 { + public static let fill = Image("Base/Setting2/Fill", bundle: .module) + public enum TwoTone { + public static let fill = Image("Base/Setting2/TwoTone/Fill", bundle: .module) + } + + public static let twoTone = Image("Base/Setting2/TwoTone", bundle: .module) + } + + public static let setting2 = Image("Base/Setting2", bundle: .module) + public enum ShieldDone { + public static let fill = Image("Base/ShieldDone/Fill", bundle: .module) + public enum TwoTone { + public static let fill = Image("Base/ShieldDone/TwoTone/Fill", bundle: .module) + } + + public static let twoTone = Image("Base/ShieldDone/TwoTone", bundle: .module) + } + + public static let shieldDone = Image("Base/ShieldDone", bundle: .module) + public enum ShieldFail { + public static let fill = Image("Base/ShieldFail/Fill", bundle: .module) + public enum TwoTone { + public static let fill = Image("Base/ShieldFail/TwoTone/Fill", bundle: .module) + } + + public static let twoTone = Image("Base/ShieldFail/TwoTone", bundle: .module) + } + + public static let shieldFail = Image("Base/ShieldFail", bundle: .module) + public enum Star { + public static let fill = Image("Base/Star/Fill", bundle: .module) + public enum TwoTone { + public static let fill = Image("Base/Star/TwoTone/Fill", bundle: .module) + } + } + + public static let star = Image("Base/Star", bundle: .module) + public enum Swap { + public static let fill = Image("Base/Swap/Fill", bundle: .module) + public enum TwoTone { + public static let fill = Image("Base/Swap/TwoTone/Fill", bundle: .module) + } + + public static let twoTone = Image("Base/Swap/TwoTone", bundle: .module) + } + + public static let swap = Image("Base/Swap", bundle: .module) + public enum Ticket { + public static let fill = Image("Base/Ticket/Fill", bundle: .module) + public enum TwoTone { + public static let fill = Image("Base/Ticket/TwoTone/Fill", bundle: .module) + } + + public static let twoTone = Image("Base/Ticket/TwoTone", bundle: .module) + } + + public static let ticket = Image("Base/Ticket", bundle: .module) + public enum TicketStar { + public static let fill = Image("Base/TicketStar/Fill", bundle: .module) + public enum TwoTone { + public static let fill = Image("Base/TicketStar/TwoTone/Fill", bundle: .module) + } + + public static let twoTone = Image("Base/TicketStar/TwoTone", bundle: .module) + } + + public static let ticketStar = Image("Base/TicketStar", bundle: .module) + public enum Unlock { + public static let fill = Image("Base/Unlock/Fill", bundle: .module) + public enum TwoTone { + public static let fill = Image("Base/Unlock/TwoTone/Fill", bundle: .module) + } + + public static let twoTone = Image("Base/Unlock/TwoTone", bundle: .module) + } + + public static let unlock = Image("Base/Unlock", bundle: .module) + public enum Upload { + public static let fill = Image("Base/Upload/Fill", bundle: .module) + public enum TwoTone { + public static let fill = Image("Base/Upload/TwoTone/Fill", bundle: .module) + } + + public static let twoTone = Image("Base/Upload/TwoTone", bundle: .module) + } + + public static let upload = Image("Base/Upload", bundle: .module) + public enum User2 { + public static let fill = Image("Base/User2/Fill", bundle: .module) + public enum TwoTone { + public static let fill = Image("Base/User2/TwoTone/Fill", bundle: .module) + } + + public static let twoTone = Image("Base/User2/TwoTone", bundle: .module) + } + + public static let user2 = Image("Base/User2", bundle: .module) + public enum User3 { + public static let fill = Image("Base/User3/Fill", bundle: .module) + public enum TwoTone { + public static let fill = Image("Base/User3/TwoTone/Fill", bundle: .module) + } + + public static let twoTone = Image("Base/User3/TwoTone", bundle: .module) + } + + public static let user3 = Image("Base/User3", bundle: .module) + public enum Video { + public static let fill = Image("Base/Video/Fill", bundle: .module) + public enum TwoTone { + public static let fill = Image("Base/Video/TwoTone/Fill", bundle: .module) + } + + public static let twoTone = Image("Base/Video/TwoTone", bundle: .module) + } + + public static let video = Image("Base/Video", bundle: .module) + public enum Voice { + public static let fill = Image("Base/Voice/Fill", bundle: .module) + public enum TwoTone { + public static let fill = Image("Base/Voice/TwoTone/Fill", bundle: .module) + } + + public static let twoTone = Image("Base/Voice/TwoTone", bundle: .module) + } + + public static let voice = Image("Base/Voice", bundle: .module) + public enum VolumeDown { + public static let fill = Image("Base/VolumeDown/Fill", bundle: .module) + public enum TwoTone { + public static let fill = Image("Base/VolumeDown/TwoTone/Fill", bundle: .module) + } + + public static let twoTone = Image("Base/VolumeDown/TwoTone", bundle: .module) + } + + public static let volumeDown = Image("Base/VolumeDown", bundle: .module) + public enum VolumeOff { + public static let fill = Image("Base/VolumeOff/Fill", bundle: .module) + public enum TwoTone { + public static let fill = Image("Base/VolumeOff/TwoTone/Fill", bundle: .module) + } + + public static let twoTone = Image("Base/VolumeOff/TwoTone", bundle: .module) + } + + public static let volumeOff = Image("Base/VolumeOff", bundle: .module) + public enum VolumeUp { + public static let fill = Image("Base/VolumeUp/Fill", bundle: .module) + public enum TwoTone { + public static let fill = Image("Base/VolumeUp/TwoTone/Fill", bundle: .module) + } + + public static let twoTone = Image("Base/VolumeUp/TwoTone", bundle: .module) + } + + public static let volumeUp = Image("Base/VolumeUp", bundle: .module) + public enum Wallet { + public static let fill = Image("Base/Wallet/Fill", bundle: .module) + public enum TwoTone { + public static let fill = Image("Base/Wallet/TwoTone/Fill", bundle: .module) + } + + public static let twoTone = Image("Base/Wallet/TwoTone", bundle: .module) + } + + public static let wallet = Image("Base/Wallet", bundle: .module) + public enum Work { + public static let fill = Image("Base/Work/Fill", bundle: .module) + public enum TwoTone { + public static let fill = Image("Base/Work/TwoTone/Fill", bundle: .module) + } + + public static let twoTone = Image("Base/Work/TwoTone", bundle: .module) + } + + public static let work = Image("Base/Work", bundle: .module) + public static let check = Image("Base/check", bundle: .module) + } +} diff --git a/Sources/OversizeUI/Core/Palette.swift b/Sources/OversizeUI/Core/Palette.swift index 6b6c2a8..93a5cb9 100644 --- a/Sources/OversizeUI/Core/Palette.swift +++ b/Sources/OversizeUI/Core/Palette.swift @@ -19,23 +19,23 @@ public enum Palette: String { public var color: Color { switch self { case .red: - return Color.red + Color.red case .orange: - return Color.orange + Color.orange case .yellow: - return Color.yellow + Color.yellow case .green: - return Color.green + Color.green case .blue: - return Color.blue + Color.blue case .pink: - return Color.pink + Color.pink case .gray: - return Color.gray + Color.gray case .violet: - return Color.purple + Color.purple case .black: - return Color.black + Color.black } } diff --git a/Sources/OversizeUI/Core/Radius.swift b/Sources/OversizeUI/Core/Radius.swift index 4c8527c..947f6c4 100644 --- a/Sources/OversizeUI/Core/Radius.swift +++ b/Sources/OversizeUI/Core/Radius.swift @@ -24,15 +24,15 @@ public enum Radius { public var rawValue: CGFloat { switch self { case .zero: - return .zero + .zero case .small: - return CGFloat(theme.radius) + CGFloat(theme.radius) case .medium: - return theme.radius == .zero ?.zero : CGFloat(theme.radius) * 1.5 + theme.radius == .zero ?.zero : CGFloat(theme.radius) * 1.5 case .large: - return theme.radius == .zero ?.zero : CGFloat(theme.radius) * 2 + theme.radius == .zero ?.zero : CGFloat(theme.radius) * 2 case .xLarge: - return theme.radius == .zero ?.zero : CGFloat(theme.radius) * 3 + theme.radius == .zero ?.zero : CGFloat(theme.radius) * 3 } } } diff --git a/Sources/OversizeUI/Core/Shadow.swift b/Sources/OversizeUI/Core/Shadow.swift index 82d1e6d..aa7d7ce 100644 --- a/Sources/OversizeUI/Core/Shadow.swift +++ b/Sources/OversizeUI/Core/Shadow.swift @@ -18,31 +18,31 @@ public struct Shadow: ViewModifier { public func body(content: Content) -> some View { switch elevation { case .z0: - return content + content .shadow(color: .clear, radius: 0, x: 0, y: 0) case .z1: - return content + content .shadow(color: color.opacity(0.08), radius: 8, x: 0, y: 2) case .z2: - return content + content .shadow(color: color.opacity(0.08), radius: 16, x: 0, y: 4) case .z3: - return content + content .shadow(color: color.opacity(0.12), radius: 24, x: 0, y: 8) case .z4: - return content + content .shadow(color: color.opacity(0.16), radius: 34, x: 0, diff --git a/Sources/OversizeUI/Core/Typography.swift b/Sources/OversizeUI/Core/Typography.swift index ad9011b..818cc89 100644 --- a/Sources/OversizeUI/Core/Typography.swift +++ b/Sources/OversizeUI/Core/Typography.swift @@ -11,13 +11,13 @@ public enum FontDesignType: String, CaseIterable { public var system: Font.Design { switch self { case .default: - return .default + .default case .serif: - return .serif + .serif case .round: - return .rounded + .rounded case .mono: - return .monospaced + .monospaced } } } @@ -87,15 +87,15 @@ public struct Typography: ViewModifier { private var fontWeight: Font.Weight { if let weight { - return weight + weight } else { switch fontStyle { case .largeTitle, .title: - return isBold ?? true ? .bold : .regular + isBold ?? true ? .bold : .regular case .headline: - return isBold ?? true ? .bold : .semibold + isBold ?? true ? .bold : .semibold default: - return isBold ?? false ? .bold : .regular + isBold ?? false ? .bold : .regular } } } diff --git a/Sources/OversizeUI/Core/ViewModifier/HalfSheet/HalfSheet.swift b/Sources/OversizeUI/Core/ViewModifier/HalfSheet/HalfSheet.swift index 266ad6f..991661a 100644 --- a/Sources/OversizeUI/Core/ViewModifier/HalfSheet/HalfSheet.swift +++ b/Sources/OversizeUI/Core/ViewModifier/HalfSheet/HalfSheet.swift @@ -18,11 +18,11 @@ public enum Detents: Hashable { public var uiViewDetents: UISheetPresentationController.Detent { switch self { case .large: - return .large() + .large() case .medium: - return .medium() + .medium() case let .height(height): - return height > 560 ? .large() : .medium() + height > 560 ? .large() : .medium() } } @@ -30,11 +30,11 @@ public enum Detents: Hashable { func convertToSUI() -> PresentationDetent { switch self { case .large: - return PresentationDetent.large + PresentationDetent.large case .medium: - return PresentationDetent.medium + PresentationDetent.medium case let .height(height): - return PresentationDetent.height(height) + PresentationDetent.height(height) } } #endif diff --git a/Sources/OversizeUI/Deprecated/HUDDeprecated.swift b/Sources/OversizeUI/Deprecated/HUDDeprecated.swift index 8335b52..28defe4 100644 --- a/Sources/OversizeUI/Deprecated/HUDDeprecated.swift +++ b/Sources/OversizeUI/Deprecated/HUDDeprecated.swift @@ -129,9 +129,9 @@ public struct HUDSurfaceView: View { private func backgroundMaterial(type: HUDType) -> Material { switch type { case .hud: - return .regular + .regular case .alert: - return .ultraThinMaterial + .ultraThinMaterial } } #endif @@ -139,10 +139,10 @@ public struct HUDSurfaceView: View { private func backgroundShape(type: HUDType) -> AnyShape { switch type { case .hud: - return AnyShape(Capsule()) + AnyShape(Capsule()) case .alert: - return AnyShape(RoundedRectangle(cornerRadius: Radius.medium, style: .continuous)) + AnyShape(RoundedRectangle(cornerRadius: Radius.medium, style: .continuous)) } } @@ -163,27 +163,27 @@ public struct HUDSurfaceView: View { var horizontalPadding: Space { switch type { case .hud: - return .medium + .medium case .alert: - return .medium + .medium } } var topPadding: Space { switch type { case .hud: - return .small + .small case .alert: - return .xLarge + .xLarge } } var bottomPadding: Space { switch type { case .hud: - return .small + .small case .alert: - return .xLarge + .xLarge } } } diff --git a/Sources/OversizeUI/Deprecated/Icon.swift b/Sources/OversizeUI/Deprecated/Icon.swift index 1c717f2..e51cfec 100644 --- a/Sources/OversizeUI/Deprecated/Icon.swift +++ b/Sources/OversizeUI/Deprecated/Icon.swift @@ -14,13 +14,17 @@ public enum IconSizes: CaseIterable { public var rawValue: CGFloat { switch self { case .small: - return Space.small.rawValue + Space.small.rawValue case .medium: - return Space.medium.rawValue + #if os(macOS) + 20 + #else + Space.medium.rawValue + #endif case .large: - return Space.large.rawValue + Space.large.rawValue case .xLarge: - return Space.xLarge.rawValue + Space.xLarge.rawValue } } } @@ -71,13 +75,13 @@ public struct IconDeprecated: View { private var iconSize: CGFloat { switch size { case .medium: - return Constants.medium + Constants.medium case .small: - return Constants.small + Constants.small case .large: - return Constants.large + Constants.large case .xLarge: - return Constants.xLarge + Constants.xLarge } } diff --git a/Sources/OversizeUI/Deprecated/NavigationBar/ModalNavigationBar.swift b/Sources/OversizeUI/Deprecated/NavigationBar/ModalNavigationBar.swift index 650e6b1..7d69182 100644 --- a/Sources/OversizeUI/Deprecated/NavigationBar/ModalNavigationBar.swift +++ b/Sources/OversizeUI/Deprecated/NavigationBar/ModalNavigationBar.swift @@ -138,59 +138,59 @@ public struct ModalNavigationBar maxHeight { - return 0 + 0 } else { - return Double(1 / (offset.y * 0.01)) + Double(1 / (offset.y * 0.01)) } } private var smmallTitleOffset: CGFloat { if largeTitle || alwaysSlideSmallTile { if offset.y < 50 { - return -50 + -50 } else if offset.y > 50 * 2 { - return 0 + 0 } else { - return offset.y - (50 * 2) + offset.y - (50 * 2) } } else { - return 1 + 1 } } private var blurValue: CGFloat { if offset.y < 1 { - return 0 + 0 } else if offset.y < 70 { - return offset.y * 0.01 + offset.y * 0.01 } else { - return 0 + 0 } } diff --git a/Sources/OversizeUI/Deprecated/PageView.swift b/Sources/OversizeUI/Deprecated/PageView.swift index 912e4b4..2004381 100644 --- a/Sources/OversizeUI/Deprecated/PageView.swift +++ b/Sources/OversizeUI/Deprecated/PageView.swift @@ -12,7 +12,7 @@ public struct PageView private let content: Content private var isLargeTitle = false private var isAlwaysSlideSmallTile = false - private var isDisableScrollShadow: Bool = false + private var isDisableScrollShadow = false @State private var offset: CGPoint = .init(x: 0, y: 0) private var leadingBar: LeadingBar? @@ -26,7 +26,7 @@ public struct PageView @Binding private var searchQuery: String @Binding private var displaySearchBar: Bool - private var isShowSearchBar: Bool = false + private var isShowSearchBar = false private var searchCancelButton: PageViewSearchButtonType = .icon private var prompt: String = .init() @@ -59,7 +59,7 @@ public struct PageView } .coordinateSpace(name: "Page") } - + @ViewBuilder var header: some View { if title != nil || leadingBar != nil || trailingBar != nil || topToolbar != nil || titleLabel != nil { @@ -113,9 +113,9 @@ public struct PageView var searchCancelButtonPadding: Space { switch searchCancelButton { case .icon, .none: - return .small + .small case .label: - return .xxSmall + .xxSmall } } diff --git a/Sources/OversizeUI/Deprecated/RowDeprecated.swift b/Sources/OversizeUI/Deprecated/RowDeprecated.swift index 8b6e7b3..a6bbcf2 100644 --- a/Sources/OversizeUI/Deprecated/RowDeprecated.swift +++ b/Sources/OversizeUI/Deprecated/RowDeprecated.swift @@ -163,11 +163,11 @@ public struct RowDeprecated: View { private var textAlignment: HorizontalAlignment { switch multilineTextAlignment { case .leading: - return .leading + .leading case .center: - return .center + .center case .trailing: - return .trailing + .trailing } } } diff --git a/Sources/OversizeUI/Deprecated/TextFieldDeprecated.swift b/Sources/OversizeUI/Deprecated/TextFieldDeprecated.swift index 8bba00c..464b5b6 100644 --- a/Sources/OversizeUI/Deprecated/TextFieldDeprecated.swift +++ b/Sources/OversizeUI/Deprecated/TextFieldDeprecated.swift @@ -41,11 +41,11 @@ public struct DefaultPlaceholderTextFieldStyle: TextFieldStyle { var overlayBorderColor: Color { if isFocused { - return Color.accentColor + Color.accentColor } else if theme.borderTextFields { - return Color.border + Color.border } else { - return Color.clear + Color.clear } } } @@ -95,11 +95,11 @@ public struct OverPlaceholderTextFieldStyle: TextFieldStyle { var overlayBorderColor: Color { if isFocused { - return Color.accentColor + Color.accentColor } else if theme.borderTextFields { - return Color.border + Color.border } else { - return Color.clear + Color.clear } } } @@ -149,11 +149,11 @@ public struct InsidePlaceholderTextFieldStyle: TextFieldStyle { var overlayBorderColor: Color { if isFocused { - return Color.accentColor + Color.accentColor } else if theme.borderTextFields { - return Color.border + Color.border } else { - return Color.clear + Color.clear } } } diff --git a/Sources/OversizeUI/Extensions/Image/Image+Extensions.swift b/Sources/OversizeUI/Extensions/Image/Image+Extensions.swift index 4cd6fc1..053df9c 100644 --- a/Sources/OversizeUI/Extensions/Image/Image+Extensions.swift +++ b/Sources/OversizeUI/Extensions/Image/Image+Extensions.swift @@ -24,7 +24,7 @@ public extension Image { func icon(_ color: Color = Color.onSurfaceHighEmphasis, size: IconSizes) -> some View { renderingMode(.template) .resizable() - .foregroundColor(color) .frame(width: size.rawValue, height: size.rawValue) + .foregroundColor(color) } } diff --git a/Sources/OversizeUI/Shapes/AnyShape.swift b/Sources/OversizeUI/Shapes/AnyShape.swift index cf59ea7..5bbd56c 100644 --- a/Sources/OversizeUI/Shapes/AnyShape.swift +++ b/Sources/OversizeUI/Shapes/AnyShape.swift @@ -7,7 +7,7 @@ import SwiftUI public struct AnyShape: Shape { public var make: @Sendable (CGRect, inout Path) -> Void - + public init(_ make: @escaping @Sendable (CGRect, inout Path) -> Void) { self.make = make }