Skip to content

Commit

Permalink
New Inps Logo, updated copyright, refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
matgentili committed Feb 26, 2024
1 parent 4a26098 commit ee30e7a
Show file tree
Hide file tree
Showing 158 changed files with 307 additions and 285 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ sirio-kit-iOS is a library containing the iOS implementation of the Sirio design
## Usage
1. Add the following to your Package.swift:
```swift
.package(url: "https://github.com/INPS-it/sirio-kit-iOS", .upToNextMajor(from: "7.0.1"))
.package(url: "https://github.com/INPS-it/sirio-kit-iOS", .upToNextMajor(from: "7.0.2"))
```
2. Declare `import SirioKitIOS` to use the components where you want to use them.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// AccordionData.swift
//
// SPDX-FileCopyrightText: 2023 Istituto Nazionale Previdenza Sociale
// SPDX-FileCopyrightText: 2024 Istituto Nazionale Previdenza Sociale
//
// SPDX-License-Identifier: BSD-3-Clause
//
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// AccordionStyle.swift
//
// SPDX-FileCopyrightText: 2023 Istituto Nazionale Previdenza Sociale
// SPDX-FileCopyrightText: 2024 Istituto Nazionale Previdenza Sociale
//
// SPDX-License-Identifier: BSD-3-Clause
//
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// Accordion.swift
//
// SPDX-FileCopyrightText: 2023 Istituto Nazionale Previdenza Sociale
// SPDX-FileCopyrightText: 2024 Istituto Nazionale Previdenza Sociale
//
// SPDX-License-Identifier: BSD-3-Clause
//
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// AccordionGroup.swift
//
// SPDX-FileCopyrightText: 2023 Istituto Nazionale Previdenza Sociale
// SPDX-FileCopyrightText: 2024 Istituto Nazionale Previdenza Sociale
//
// SPDX-License-Identifier: BSD-3-Clause
//
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// BaseAccordion.swift
//
// SPDX-FileCopyrightText: 2023 Istituto Nazionale Previdenza Sociale
// SPDX-FileCopyrightText: 2024 Istituto Nazionale Previdenza Sociale
//
// SPDX-License-Identifier: BSD-3-Clause
//
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// AppNavigationItemData.swift
//
// SPDX-FileCopyrightText: 2023 Istituto Nazionale Previdenza Sociale
// SPDX-FileCopyrightText: 2024 Istituto Nazionale Previdenza Sociale
//
// SPDX-License-Identifier: BSD-3-Clause
//
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// AppNavigationItemStyle.swift
//
// SPDX-FileCopyrightText: 2023 Istituto Nazionale Previdenza Sociale
// SPDX-FileCopyrightText: 2024 Istituto Nazionale Previdenza Sociale
//
// SPDX-License-Identifier: BSD-3-Clause
//
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// AppNavigationItem.swift
//
// SPDX-FileCopyrightText: 2023 Istituto Nazionale Previdenza Sociale
// SPDX-FileCopyrightText: 2024 Istituto Nazionale Previdenza Sociale
//
// SPDX-License-Identifier: BSD-3-Clause
//
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// AppNavigationItemEmpty.swift
//
// SPDX-FileCopyrightText: 2023 Istituto Nazionale Previdenza Sociale
// SPDX-FileCopyrightText: 2024 Istituto Nazionale Previdenza Sociale
//
// SPDX-License-Identifier: BSD-3-Clause
//
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// AppNavigationLogoInps.swift
//
// SPDX-FileCopyrightText: 2023 Istituto Nazionale Previdenza Sociale
// SPDX-FileCopyrightText: 2024 Istituto Nazionale Previdenza Sociale
//
// SPDX-License-Identifier: BSD-3-Clause
//
Expand All @@ -12,42 +12,18 @@ import SwiftUI
struct AppNavigationLogoInps: View {
@Environment(\.colorScheme) var colorScheme

let isDefaultLogo = false

var body: some View {

if isDefaultLogo { // Default INPS logo
Image(Assets.default.rawValue, bundle: .module)
.resizable()
.renderingMode(.template)
.foregroundColor(iconColor)
.aspectRatio(contentMode: .fit)
.frame(maxWidth: Size.AppNavigation.LogoInps.maxWidth,
maxHeight: Size.AppNavigation.LogoInps.maxHeight,
alignment: .center)
} else { // Logo INPS 125
Image(colorScheme == .light ? Assets.light.rawValue : Assets.dark.rawValue, bundle: .module)
.resizable()
.foregroundColor(.none)
.aspectRatio(contentMode: .fit)
.frame(maxWidth: Size.AppNavigation.LogoInps125.maxWidth,
maxHeight: Size.AppNavigation.LogoInps125.maxHeight,
alignment: .center)
}
Image(icon.rawValue, bundle: .module)
.resizable()
.aspectRatio(contentMode: .fill)
.padding()
.frame(maxWidth: Size.AppNavigation.LogoInps.maxWidth,
maxHeight: Size.AppNavigation.LogoInps.maxHeight,
alignment: .center)
}
}

extension AppNavigationLogoInps {

private var iconColor: Color {
switch colorScheme {
case .light:
return Color.AppNavigation.LogoInps.light
case .dark:
return Color.AppNavigation.LogoInps.dark
@unknown default:
return Color.AppNavigation.LogoInps.light
}
private var icon: Assets.Logo {
return colorScheme == .light ? Assets.Logo.light : Assets.Logo.dark
}
}

Expand All @@ -57,10 +33,11 @@ struct AppNavigationLogoInps_Previews: PreviewProvider {
AppNavigationLogoInps()
.padding()
.colorScheme(.light)

AppNavigationLogoInps()
.padding()
.colorScheme(.dark)
.background(Color.black)
.colorScheme(.dark)
}
.previewLayout(PreviewLayout.sizeThatFits)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// AppNavigationTypePreferenceKeys.swift
//
// SPDX-FileCopyrightText: 2023 Istituto Nazionale Previdenza Sociale
// SPDX-FileCopyrightText: 2024 Istituto Nazionale Previdenza Sociale
//
// SPDX-License-Identifier: BSD-3-Clause
//
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// AppNavigationLogoBarView.swift
//
// SPDX-FileCopyrightText: 2023 Istituto Nazionale Previdenza Sociale
// SPDX-FileCopyrightText: 2024 Istituto Nazionale Previdenza Sociale
//
// SPDX-License-Identifier: BSD-3-Clause
//
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// AppNavigationLogoContainerView.swift
//
// SPDX-FileCopyrightText: 2023 Istituto Nazionale Previdenza Sociale
// SPDX-FileCopyrightText: 2024 Istituto Nazionale Previdenza Sociale
//
// SPDX-License-Identifier: BSD-3-Clause
//
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// AppNavigationLogoLink.swift
//
// SPDX-FileCopyrightText: 2023 Istituto Nazionale Previdenza Sociale
// SPDX-FileCopyrightText: 2024 Istituto Nazionale Previdenza Sociale
//
// SPDX-License-Identifier: BSD-3-Clause
//
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// AppNavigationLogoView.swift
//
// SPDX-FileCopyrightText: 2023 Istituto Nazionale Previdenza Sociale
// SPDX-FileCopyrightText: 2024 Istituto Nazionale Previdenza Sociale
//
// SPDX-License-Identifier: BSD-3-Clause
//
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// AppNavigationSearchBarView.swift
//
// SPDX-FileCopyrightText: 2023 Istituto Nazionale Previdenza Sociale
// SPDX-FileCopyrightText: 2024 Istituto Nazionale Previdenza Sociale
//
// SPDX-License-Identifier: BSD-3-Clause
//
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// AppNavigationSearchContainerView.swift
//
// SPDX-FileCopyrightText: 2023 Istituto Nazionale Previdenza Sociale
// SPDX-FileCopyrightText: 2024 Istituto Nazionale Previdenza Sociale
//
// SPDX-License-Identifier: BSD-3-Clause
//
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// AppNavigationSearchLink.swift
//
// SPDX-FileCopyrightText: 2023 Istituto Nazionale Previdenza Sociale
// SPDX-FileCopyrightText: 2024 Istituto Nazionale Previdenza Sociale
//
// SPDX-License-Identifier: BSD-3-Clause
//
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// AppNavigationSearchView.swift
//
// SPDX-FileCopyrightText: 2023 Istituto Nazionale Previdenza Sociale
// SPDX-FileCopyrightText: 2024 Istituto Nazionale Previdenza Sociale
//
// SPDX-License-Identifier: BSD-3-Clause
//
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// SearchEnvironment.swift
//
// SPDX-FileCopyrightText: 2023 Istituto Nazionale Previdenza Sociale
// SPDX-FileCopyrightText: 2024 Istituto Nazionale Previdenza Sociale
//
// SPDX-License-Identifier: BSD-3-Clause
//
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// AppNavigationSelectionBarView.swift
//
// SPDX-FileCopyrightText: 2023 Istituto Nazionale Previdenza Sociale
// SPDX-FileCopyrightText: 2024 Istituto Nazionale Previdenza Sociale
//
// SPDX-License-Identifier: BSD-3-Clause
//
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// AppNavigationSelectionContainerView.swift
//
// SPDX-FileCopyrightText: 2023 Istituto Nazionale Previdenza Sociale
// SPDX-FileCopyrightText: 2024 Istituto Nazionale Previdenza Sociale
//
// SPDX-License-Identifier: BSD-3-Clause
//
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// AppNavigationSelectionLink.swift
//
// SPDX-FileCopyrightText: 2023 Istituto Nazionale Previdenza Sociale
// SPDX-FileCopyrightText: 2024 Istituto Nazionale Previdenza Sociale
//
// SPDX-License-Identifier: BSD-3-Clause
//
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// AppNavigationSelectionView.swift
//
// SPDX-FileCopyrightText: 2023 Istituto Nazionale Previdenza Sociale
// SPDX-FileCopyrightText: 2024 Istituto Nazionale Previdenza Sociale
//
// SPDX-License-Identifier: BSD-3-Clause
//
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// AppNavigationBarView.swift
//
// SPDX-FileCopyrightText: 2023 Istituto Nazionale Previdenza Sociale
// SPDX-FileCopyrightText: 2024 Istituto Nazionale Previdenza Sociale
//
// SPDX-License-Identifier: BSD-3-Clause
//
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// AppNavigationContainerView.swift
//
// SPDX-FileCopyrightText: 2023 Istituto Nazionale Previdenza Sociale
// SPDX-FileCopyrightText: 2024 Istituto Nazionale Previdenza Sociale
//
// SPDX-License-Identifier: BSD-3-Clause
//
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// AppNavigationLink.swift
//
// SPDX-FileCopyrightText: 2023 Istituto Nazionale Previdenza Sociale
// SPDX-FileCopyrightText: 2024 Istituto Nazionale Previdenza Sociale
//
// SPDX-License-Identifier: BSD-3-Clause
//
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// AppNavigationView.swift
//
// SPDX-FileCopyrightText: 2023 Istituto Nazionale Previdenza Sociale
// SPDX-FileCopyrightText: 2024 Istituto Nazionale Previdenza Sociale
//
// SPDX-License-Identifier: BSD-3-Clause
//
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// AppNavigationBigTitle.swift
//
// SPDX-FileCopyrightText: 2023 Istituto Nazionale Previdenza Sociale
// SPDX-FileCopyrightText: 2024 Istituto Nazionale Previdenza Sociale
//
// SPDX-License-Identifier: BSD-3-Clause
//
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// AppNavigationLongTitle.swift
//
// SPDX-FileCopyrightText: 2023 Istituto Nazionale Previdenza Sociale
// SPDX-FileCopyrightText: 2024 Istituto Nazionale Previdenza Sociale
//
// SPDX-License-Identifier: BSD-3-Clause
//
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// AppNavigationStandardTitle.swift
//
// SPDX-FileCopyrightText: 2023 Istituto Nazionale Previdenza Sociale
// SPDX-FileCopyrightText: 2024 Istituto Nazionale Previdenza Sociale
//
// SPDX-License-Identifier: BSD-3-Clause
//
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// AppNavigationType.swift
//
// SPDX-FileCopyrightText: 2023 Istituto Nazionale Previdenza Sociale
// SPDX-FileCopyrightText: 2024 Istituto Nazionale Previdenza Sociale
//
// SPDX-License-Identifier: BSD-3-Clause
//
Expand Down
2 changes: 1 addition & 1 deletion Sources/SirioKitIOS/Component/Base/Badge.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// Badge.swift
//
// SPDX-FileCopyrightText: 2023 Istituto Nazionale Previdenza Sociale
// SPDX-FileCopyrightText: 2024 Istituto Nazionale Previdenza Sociale
//
// SPDX-License-Identifier: BSD-3-Clause
//
Expand Down
2 changes: 1 addition & 1 deletion Sources/SirioKitIOS/Component/Base/ColorState.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// ColorState.swift
//
// SPDX-FileCopyrightText: 2023 Istituto Nazionale Previdenza Sociale
// SPDX-FileCopyrightText: 2024 Istituto Nazionale Previdenza Sociale
//
// SPDX-License-Identifier: BSD-3-Clause
//
Expand Down
2 changes: 1 addition & 1 deletion Sources/SirioKitIOS/Component/Base/FlexibleView.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// FlexibleView.swift
//
// SPDX-FileCopyrightText: 2023 Istituto Nazionale Previdenza Sociale
// SPDX-FileCopyrightText: 2024 Istituto Nazionale Previdenza Sociale
//
// SPDX-License-Identifier: BSD-3-Clause
//
Expand Down
2 changes: 1 addition & 1 deletion Sources/SirioKitIOS/Component/Base/RoundedCorner.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// RoundedCorner.swift
//
// SPDX-FileCopyrightText: 2023 Istituto Nazionale Previdenza Sociale
// SPDX-FileCopyrightText: 2024 Istituto Nazionale Previdenza Sociale
//
// SPDX-License-Identifier: BSD-3-Clause
//
Expand Down
Loading

0 comments on commit ee30e7a

Please sign in to comment.