Skip to content

Commit

Permalink
Inserted ExampleCard
Browse files Browse the repository at this point in the history
  • Loading branch information
matgentili committed Sep 12, 2023
1 parent 80b02ce commit 59c5f99
Show file tree
Hide file tree
Showing 5 changed files with 113 additions and 11 deletions.
10 changes: 7 additions & 3 deletions iOS-Example/iOS-Example.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
7E7FB606284E095A00F80FC7 /* ExampleFab.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7E7FB5FF284E095A00F80FC7 /* ExampleFab.swift */; };
7E7FB609284E099700F80FC7 /* Color+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7E7FB608284E099700F80FC7 /* Color+Extension.swift */; };
7E7FB60B284E09C100F80FC7 /* View+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7E7FB60A284E09C100F80FC7 /* View+Extension.swift */; };
7E8A11792AB09104003D26DD /* ExampleCard.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7E8A11782AB09104003D26DD /* ExampleCard.swift */; };
7E94CC1E284F488F00AEADC9 /* ExampleToggle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7E94CC1D284F488F00AEADC9 /* ExampleToggle.swift */; };
7E94CC20284F78F200AEADC9 /* ExampleSlider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7E94CC1F284F78F200AEADC9 /* ExampleSlider.swift */; };
7EA2E88328606914001FE093 /* ExampleButtons.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7EA2E88128606359001FE093 /* ExampleButtons.swift */; };
Expand Down Expand Up @@ -61,6 +62,7 @@
7E7FB5FF284E095A00F80FC7 /* ExampleFab.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ExampleFab.swift; sourceTree = "<group>"; };
7E7FB608284E099700F80FC7 /* Color+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Color+Extension.swift"; sourceTree = "<group>"; };
7E7FB60A284E09C100F80FC7 /* View+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "View+Extension.swift"; sourceTree = "<group>"; };
7E8A11782AB09104003D26DD /* ExampleCard.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExampleCard.swift; sourceTree = "<group>"; };
7E94CC1D284F488F00AEADC9 /* ExampleToggle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExampleToggle.swift; sourceTree = "<group>"; };
7E94CC1F284F78F200AEADC9 /* ExampleSlider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExampleSlider.swift; sourceTree = "<group>"; };
7EA2E88128606359001FE093 /* ExampleButtons.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExampleButtons.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -129,9 +131,11 @@
7E7FB5F8284E095A00F80FC7 /* ViewExample */ = {
isa = PBXGroup;
children = (
7E43935828F99AEC00FBE17D /* Example.swift */,
7E7FB5FB284E095A00F80FC7 /* ExampleAccordion.swift */,
7E7FB5F9284E095A00F80FC7 /* ExampleAppNavigation.swift */,
7EA2E88128606359001FE093 /* ExampleButtons.swift */,
7E8A11782AB09104003D26DD /* ExampleCard.swift */,
7ED0E580284E4CAB001574D5 /* ExampleCheckBox.swift */,
7E7FB5FA284E095A00F80FC7 /* ExampleChips.swift */,
7EE5EAF62897FDC9000EC224 /* ExampleDialog.swift */,
Expand All @@ -149,7 +153,6 @@
7ED0D0AE2881A1BB00553662 /* ExampleTextField.swift */,
7E94CC1D284F488F00AEADC9 /* ExampleToggle.swift */,
7E7FB5FC284E095A00F80FC7 /* SchemeSwitcher.swift */,
7E43935828F99AEC00FBE17D /* Example.swift */,
);
path = ViewExample;
sourceTree = "<group>";
Expand Down Expand Up @@ -250,6 +253,7 @@
7EE5EAF72897FDC9000EC224 /* ExampleDialog.swift in Sources */,
7E7FB601284E095A00F80FC7 /* ExampleChips.swift in Sources */,
7E43935928F99AEC00FBE17D /* Example.swift in Sources */,
7E8A11792AB09104003D26DD /* ExampleCard.swift in Sources */,
7ED0E57F284E4119001574D5 /* ExampleRadioButton.swift in Sources */,
7EAF97BA2861CAA500B90534 /* ExampleFileUpload.swift in Sources */,
7E1C91E82891371F008FE477 /* UIColor+Extension.swift in Sources */,
Expand Down Expand Up @@ -487,8 +491,8 @@
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/INPS-it/sirio-kit-iOS/";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 5.0.0;
branch = main;
kind = branch;
};
};
/* End XCRemoteSwiftPackageReference section */
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,39 @@
{
"pins" : [
{
"identity" : "sdwebimage",
"kind" : "remoteSourceControl",
"location" : "https://github.com/SDWebImage/SDWebImage.git",
"state" : {
"revision" : "6e844d19679c9e0833ccc363d7f5a7c5f0c5f5d7",
"version" : "5.18.1"
}
},
{
"identity" : "sdwebimagesvgcoder",
"kind" : "remoteSourceControl",
"location" : "https://github.com/SDWebImage/SDWebImageSVGCoder",
"state" : {
"revision" : "950167445ab703740569869c8b7510efc9d09a26",
"version" : "1.7.0"
}
},
{
"identity" : "sdwebimageswiftui",
"kind" : "remoteSourceControl",
"location" : "https://github.com/SDWebImage/SDWebImageSwiftUI",
"state" : {
"revision" : "e837c37d45449fbd3b4745c10c5b5274e73edead",
"version" : "2.2.3"
}
},
{
"identity" : "sirio-kit-ios",
"kind" : "remoteSourceControl",
"location" : "https://github.com/INPS-it/sirio-kit-iOS/",
"state" : {
"revision" : "a499ae6045607fc40683f9c7ed8c7cb92c88f666",
"version" : "5.0.0"
"branch" : "main",
"revision" : "80b02ce751c771d0ea21603e498615b2e1443d8d"
}
}
],
Expand Down
14 changes: 10 additions & 4 deletions iOS-Example/iOS-Example/SirioView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ struct SirioView: View {
SirioText(text: "Buttons", typography: .label_md_400)
})

NavigationLink(destination: {
ExampleCard()
}, label: {
SirioText(text: "Card", typography: .label_md_400)
})

NavigationLink(destination: {
ExampleCheckBox()
}, label: {
Expand Down Expand Up @@ -69,16 +75,16 @@ struct SirioView: View {
}, label: {
SirioText(text: "Notification", typography: .label_md_400)
})
}

Group {

NavigationLink(destination: {
ExamplePagination()
}, label: {
SirioText(text: "Pagination", typography: .label_md_400)
})
}


Group {

NavigationLink(destination: {
ExampleProgressBar()
}, label: {
Expand Down
58 changes: 58 additions & 0 deletions iOS-Example/iOS-Example/ViewExample/ExampleCard.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
//
// ExampleCard.swift
//
// SPDX-FileCopyrightText: 2022 Istituto Nazionale Previdenza Sociale
//
// SPDX-License-Identifier: BSD-3-Clause
//


import SwiftUI
import SirioKitIOS

struct ExampleCard: View {
var url = URL(string: "https://www.inps.it/content/dam/inps-site/immagini/lavoro/INPS_congedi_EX%2001.svg")!

var body: some View {
List {
NavigationLink(destination: {
ScrollView {
EditorialCard(url: url, category: "Categoria", date: "13 Nov 2023", title: "Titolo della card", subtitle: "Sottotitolo", text: .loremIpsum, signature: "Firma Autore", items: [.previewEllipsis, .previewHeart])
.padding()

EditorialCard(category: "Categoria", date: "13 Nov 2023", title: "Titolo della card", subtitle: "Sottotitolo", text: .loremIpsum, signature: "Firma Autore", items: [.previewEllipsis, .previewHeart])
.padding()
}
.navigationTitle("Editorial Card")
.background(Color.colorBackground)
}, label: {
SirioText(text: "Editorial Card", typography: .label_md_400)
})

NavigationLink(destination: {
ScrollView {

ProcessCard(schemeColor: .light, icon: .book, date: "13 Nov 2023", title: "Titolo della card molto lungo su 2 righe", text: .loremIpsum, textButton: "Text", onTapButtonAction: {}, item: .previewEllipsis)
.padding()

ProcessCard(schemeColor: .dark, icon: .book, date: "13 Nov 2023", title: "Titolo della card molto lungo su 2 righe", text: .loremIpsum, textButton: "Text", onTapButtonAction: {}, item: .previewEllipsis)
.padding()
}

.navigationTitle("Process Card")
.background(Color.colorBackground)
}, label: {
SirioText(text: "Process Card", typography: .label_md_400)
})
}
.background(Color.colorBackground)
.navigationTitle("Card")
.listStyle(GroupedListStyle())
}
}

struct ExampleCard_Previews: PreviewProvider {
static var previews: some View {
ExampleCard()
}
}
11 changes: 9 additions & 2 deletions iOS-Example/iOS-Example/iOS_ExampleApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,25 @@

import SwiftUI
import SirioKitIOS
import SDWebImageSVGCoder

@main
struct iOS_ExampleApp: App {

init() {
// Register fonts from library
Fonts.registerFonts()
setDependencies()
}

var body: some Scene {
WindowGroup {
ContentView()
}
}

func setDependencies() {
// Register fonts from library
Fonts.registerFonts()
// Svg Coder
SDImageCodersManager.shared.addCoder(SDImageSVGCoder.shared)
}
}

0 comments on commit 59c5f99

Please sign in to comment.