diff --git a/Package.swift b/Package.swift new file mode 100644 index 0000000..56f8288 --- /dev/null +++ b/Package.swift @@ -0,0 +1,25 @@ +// swift-tools-version: 6.0 +// The swift-tools-version declares the minimum version of Swift required to build this package. + +import PackageDescription + +let package = Package( + name: "UIKitComponents", + platforms: [.iOS(.v17)], + products: [ + // Products define the executables and libraries a package produces, making them visible to other packages. + .library( + name: "UIKitComponents", + targets: ["UIKitComponents"]), + ], + targets: [ + // Targets are the basic building blocks of a package, defining a module or a test suite. + // Targets can depend on other targets in this package and products from dependencies. + .target( + name: "UIKitComponents", + resources: [ + .process("Resources") + ]), + + ] +) diff --git a/Sources/.DS_Store b/Sources/.DS_Store new file mode 100644 index 0000000..60c5c22 Binary files /dev/null and b/Sources/.DS_Store differ diff --git a/Sources/UIKitComponents/.DS_Store b/Sources/UIKitComponents/.DS_Store new file mode 100644 index 0000000..8b553f7 Binary files /dev/null and b/Sources/UIKitComponents/.DS_Store differ diff --git a/Sources/UIKitComponents/Buttons/CustomMainButtonView.swift b/Sources/UIKitComponents/Buttons/CustomMainButtonView.swift new file mode 100644 index 0000000..5db6c29 --- /dev/null +++ b/Sources/UIKitComponents/Buttons/CustomMainButtonView.swift @@ -0,0 +1,125 @@ +// +// SwiftUIView.swift +// UIKitComponents +// +// Created by User on 26.05.2025. +// + +import SwiftUI + +public struct CustomMainButtonView: View { + + let title: String //Название кнопки + let fill: Bool // Закрашена ли + let size: SizeButton // размер кнопки + let tetriary: Bool // состояние кнопки + let disactive: Bool // активна ли кнопка + let action: () -> () // действие кнопки + + private var buttonSize: CGFloat { + switch size { + case .large: + return 17 + case .chips: + return 15 + case .small: + return 14 + } + } + + private var buttonHeight: CGFloat { + switch size { + case .large: + return 56 + case .chips: + return 48 + case .small: + return 40 + } + } + + private var buttonTextColor: Color { + if tetriary { + return Color("hex#2D2C2C", bundle: .module) + } else if size == .chips && disactive { + return Color("hex#7E7E9A", bundle: .module) + } + else { + return !fill ? Color.white : Color("hex#1A6FEE", bundle: .module) + } + } + + private var buttonColor: Color { + if tetriary { + return Color("hex#F5F5F9", bundle: .module) + } else if disactive { + return Color("hex#C9D4FB", bundle: .module) + } + else { + return !fill ? Color("hex#1A6FEE", bundle: .module) : Color.white + } + } + + private var buttonWeight: CGFloat { + size == .chips ? 129 : 96 + } + + public init(title: String, fill: Bool = false, size: SizeButton = .large, tetriary: Bool = false, disactive: Bool = false, action: @escaping () -> Void) { + self.title = title + self.fill = fill + self.size = size + self.tetriary = tetriary + self.disactive = disactive + self.action = action + } + + public var body: some View { + if size == .large { + Button { + action() + } label: { + Text(title) + .frame(maxWidth: .infinity) + .frame(height: buttonHeight) + .robotoFlex(size: buttonSize, font: .bold) + .foregroundStyle(buttonTextColor) + .background(buttonColor) + .cornerRadius(10) + .overlay { + if fill { + RoundedRectangle(cornerRadius: 10) + .stroke(lineWidth: 1) + .foregroundStyle(Color("hex#1A6FEE", bundle: .module)) + } + } + }.disabled(disactive) + + } else if size == .chips || size == .small { + Button { + action() + } label: { + Text(title) + .frame(width: buttonWeight) + .frame(height: buttonHeight) + .robotoFlex(size: buttonSize, font: .bold) + .foregroundStyle(buttonTextColor) + .background(buttonColor) + .cornerRadius(10) + .overlay { + if fill { + RoundedRectangle(cornerRadius: 10) + .stroke(lineWidth: 1) + .foregroundStyle(Color("hex#1A6FEE", bundle: .module)) + } + } + }.disabled(disactive) + } + + } +} + +#Preview { + CustomMainButtonView(title: "Подтвердить") { + print("jopa") + } +} diff --git a/Sources/UIKitComponents/Card/CardCartView.swift b/Sources/UIKitComponents/Card/CardCartView.swift new file mode 100644 index 0000000..fa8e254 --- /dev/null +++ b/Sources/UIKitComponents/Card/CardCartView.swift @@ -0,0 +1,94 @@ +// +// SwiftUIView.swift +// UIKitComponents +// +// Created by User on 26.05.2025. +// + +import SwiftUI + +public struct CardCartView: View { + + let title: String //Название карточки + let price: Int // цена + + + let action: () -> () + + public init(title: String, price: Int = 0, action: @escaping () -> Void) { + self.title = title + self.price = price + self.action = action + } + + public var body: some View { + ZStack(alignment: .leading) { + Color.white.ignoresSafeArea() + VStack(alignment: .leading) { + HStack { + Text(title) + .multilineTextAlignment(.leading) + .robotoFlex(size: 16, font: .medium) + .tracking(0.32) + .lineSpacing(8) + .padding(.horizontal, 16) + .padding(.top, 16) + Spacer() + Image("Delete", bundle: .module) + .padding(16) + } + Spacer() + HStack { + VStack(alignment: .leading, spacing:0){ + if price > 0 { + Text("\(price) ₽") + .robotoFlex(size: 17, font: .semibold) + } + }.padding(.horizontal, 16) + Spacer(minLength: 120) + HStack { + Text("1 штук") + .robotoFlex(size: 15) + Spacer() + ZStack { + Image("bg", bundle: .module) + HStack { + Button { + // + } label: { + Image("minus", bundle: .module) + .padding(.leading, 6) + } + Image("Divider", bundle: .module) + Button { + // + } label: { + Image("plus", bundle: .module) + .padding(.trailing, 6) + } + } + + } + + + }.padding(16) + } + + } + } + .frame(maxWidth: .infinity) + .frame(height: 138) + .cornerRadius(12) + .shadow(color: Color("hex#E4E8F599", bundle: .module), radius: 20) + .overlay { + RoundedRectangle(cornerRadius: 12) + .stroke(lineWidth: 1) + .foregroundStyle(Color("hex#F4F4F4", bundle: .module)) + } + } +} + +#Preview { + CardCartView(title: "Рубашка Воскресенье для машинного вязания", price: 10) { + } +} diff --git a/Sources/UIKitComponents/Card/CardPrimaryView.swift b/Sources/UIKitComponents/Card/CardPrimaryView.swift new file mode 100644 index 0000000..47f28a2 --- /dev/null +++ b/Sources/UIKitComponents/Card/CardPrimaryView.swift @@ -0,0 +1,78 @@ +// +// SwiftUIView.swift +// UIKitComponents +// +// Created by User on 26.05.2025. +// + +import SwiftUI + +public struct CardPrimaryView: View { + + let title: String //Название карточки + let subtitle: String // Описание + let price: Int // цена + let status: Bool // в корзине или нет + + let titleForButton: String + let action: () -> () + + public init(title: String, subtitle: String = "", price: Int = 0, status: Bool = false, titleForButton: String = "Добавить", action: @escaping () -> Void) { + self.title = title + self.subtitle = subtitle + self.price = price + self.status = status + self.titleForButton = titleForButton + self.action = action + } + + public var body: some View { + ZStack(alignment: .leading) { + Color.white.ignoresSafeArea() + VStack(alignment: .leading) { + Text(title) + .multilineTextAlignment(.leading) + .robotoFlex(size: 16, font: .medium) + .tracking(0.32) + .lineSpacing(8) + .padding(.horizontal, 16) + .padding(.top, 16) + Spacer() + HStack { + VStack(alignment: .leading, spacing:0){ + Text(subtitle) + .tracking(0) + .lineSpacing(20) + .robotoFlex(size: 14, font: .semibold) + .padding(.bottom, 4) + .foregroundStyle(Color("hex#939396", bundle: .module)) + if price > 0 { + Text("\(price) ₽") + .robotoFlex(size: 17, font: .semibold) + } + }.padding(.horizontal, 16) + Spacer() + CustomMainButtonView(title: titleForButton, fill: status, size: .small) { + print(status) + } + .padding(16) + } + + } + } .frame(maxWidth: .infinity) + .frame(height: 136) + .cornerRadius(12) + .shadow(color: Color("hex#E4E8F599", bundle: .module), radius: 20) + .overlay { + RoundedRectangle(cornerRadius: 12) + .stroke(lineWidth: 1) + .foregroundStyle(Color("hex#F4F4F4", bundle: .module)) + } + } +} + +#Preview { + CardPrimaryView(title: "Рубашка Воскресенье для машинного вязания", subtitle: "Мужская одежда", price: 10, status: true) { + + } +} diff --git a/Sources/UIKitComponents/Card/CardProjectView.swift b/Sources/UIKitComponents/Card/CardProjectView.swift new file mode 100644 index 0000000..cfbaa43 --- /dev/null +++ b/Sources/UIKitComponents/Card/CardProjectView.swift @@ -0,0 +1,67 @@ +// +// SwiftUIView.swift +// UIKitComponents +// +// Created by User on 26.05.2025. +// + +import SwiftUI + +public struct CardProjectView: View { + + let title: String //Название карточки + let subtitle: String // days + + let action: () -> () + + public init(title: String, subtitle: String = "", action: @escaping () -> Void) { + self.title = title + self.subtitle = subtitle + self.action = action + } + + public var body: some View { + ZStack(alignment: .leading) { + Color.white.ignoresSafeArea() + VStack(alignment: .leading) { + HStack { + Text(title) + .multilineTextAlignment(.leading) + .robotoFlex(size: 16, font: .medium) + .tracking(0.32) + .lineSpacing(8) + .padding(.horizontal, 16) + .padding(.top, 16) + } + Spacer() + HStack { + VStack(alignment: .leading, spacing:0){ + Text(subtitle) + .robotoFlex(size: 14, font: .bold) + .foregroundStyle(Color("hex#939396", bundle: .module)) + }.padding(.horizontal, 16) + Spacer() + CustomMainButtonView(title: "Открыть", size: .small) { + // + }.padding(16) + } + + } + } + .frame(maxWidth: .infinity) + .frame(height: 136) + .cornerRadius(12) + .shadow(color: Color("hex#E4E8F599", bundle: .module), radius: 20) + .overlay { + RoundedRectangle(cornerRadius: 12) + .stroke(lineWidth: 1) + .foregroundStyle(Color("hex#F4F4F4", bundle: .module)) + } + } +} + +#Preview { + CardProjectView(title: "Мой первый прокт", subtitle: "2 lyz") { + // + } +} diff --git a/Sources/UIKitComponents/CartButton/CartButtonView.swift b/Sources/UIKitComponents/CartButton/CartButtonView.swift new file mode 100644 index 0000000..57431a2 --- /dev/null +++ b/Sources/UIKitComponents/CartButton/CartButtonView.swift @@ -0,0 +1,50 @@ +// +// SwiftUIView.swift +// UIKitComponents +// +// Created by User on 26.05.2025. +// + +import SwiftUI + +public struct CartButtonView: View { + + let price: Int + let title: String + let action: () -> () + + public init(price: Int, title: String, action: @escaping () -> Void) { + self.price = price + self.title = title + self.action = action + } + + public var body: some View { + ZStack { + CustomMainButtonView(title: "") { + action() + } + HStack { + Image("cart", bundle: .module) + .padding(.horizontal, 16) + Text(title) + .robotoFlex(size: 17, font: .bold) + .foregroundStyle(Color.white) + .tracking(0) + .lineSpacing(24) + Spacer() + Text("\(price)") + .foregroundStyle(Color.white) + .robotoFlex(size: 17, font: .bold) + Image("Rouble", bundle: .module) + .padding(.trailing, 16) + } + } + } +} + +#Preview { + CartButtonView(price: 500, title: "В корзину") { + + } +} diff --git a/Sources/UIKitComponents/Components/Enum/CharacterButton.swift b/Sources/UIKitComponents/Components/Enum/CharacterButton.swift new file mode 100644 index 0000000..1c1e1ec --- /dev/null +++ b/Sources/UIKitComponents/Components/Enum/CharacterButton.swift @@ -0,0 +1,14 @@ +// +// File.swift +// UIKitComponents +// +// Created by User on 26.05.2025. +// + +import Foundation + +//Перечесление Размеров кнопки +public enum CharacterButton { + case main + case plusminus +} diff --git a/Sources/UIKitComponents/Components/Enum/SizeButton.swift b/Sources/UIKitComponents/Components/Enum/SizeButton.swift new file mode 100644 index 0000000..a01398d --- /dev/null +++ b/Sources/UIKitComponents/Components/Enum/SizeButton.swift @@ -0,0 +1,15 @@ +// +// File.swift +// UIKitComponents +// +// Created by User on 26.05.2025. +// + +import Foundation + +//Перечесление Размеров кнопки +public enum SizeButton { + case large + case chips + case small +} diff --git a/Sources/UIKitComponents/Components/Extensions/View.swift b/Sources/UIKitComponents/Components/Extensions/View.swift new file mode 100644 index 0000000..c42ccf4 --- /dev/null +++ b/Sources/UIKitComponents/Components/Extensions/View.swift @@ -0,0 +1,41 @@ +// +// SwiftUIView.swift +// UIKitComponents +// +// Created by User on 26.05.2025. +// + +import Foundation +import SwiftUI + +public extension View { + //MARK: Methods + //функция для шрифтов + func robotoFlex(size: CGFloat, font: Font.Weight = .regular) -> some View { + switch font { + case .bold: //bold + self + .font(.custom("Roboto-Bold", size: size)) + case .black: //ExtraBold + self + .font(.custom("Roboto-ExtraBold", size: size)) + case .medium: + self + .font(.custom("Roboto-Medium", size: size)) + case .semibold: + self + .font(.custom("Roboto-SemiBold", size: size)) + default: + self + .font(.custom("Roboto-Regular", size: size)) + } + } + + //функция для выбора item для tabbar + func tabItem(tab: String, selection: Binding) -> some View { + self + .modifier(TabbarItemModifier(tab: tab, selection: selection)) + } + +} + diff --git a/Sources/UIKitComponents/Components/FontWeightSetUp.swift b/Sources/UIKitComponents/Components/FontWeightSetUp.swift new file mode 100644 index 0000000..4fd5981 --- /dev/null +++ b/Sources/UIKitComponents/Components/FontWeightSetUp.swift @@ -0,0 +1,38 @@ +// +// File.swift +// UIKitComponents +// +// Created by User on 26.05.2025. +// + +import Foundation +import SwiftUI + +//Класс для установки шрифта в систему +public final class FontWeightSetUp { + //Перебирает нужны шрифты + static func allFonts() { + ["Roboto-Bold", "Roboto-ExtraBold", "Roboto-Medium", "Roboto-SemiBold", "Roboto-Regular"].forEach { font in + setupFonts(font) + } + } + + //Устанавливает шрифт в систему + public static func setupFonts(_ font: String) { + guard let fontURL = Bundle.module.url(forResource: font, withExtension: ".ttf"), + let fontDataProvider = CGDataProvider(url: fontURL as CFURL), + let font = CGFont(fontDataProvider) else { + print("Нет шрифта") + return + } + + var error: Unmanaged? + CTFontManagerRegisterGraphicsFont(font, &error) + + if let error = error { + print("Ошибка регистрации шрифта: \(error)") + } + + } + +} diff --git a/Sources/UIKitComponents/CustomTextField/CustomTextField.swift b/Sources/UIKitComponents/CustomTextField/CustomTextField.swift new file mode 100644 index 0000000..e2dbe1c --- /dev/null +++ b/Sources/UIKitComponents/CustomTextField/CustomTextField.swift @@ -0,0 +1,118 @@ +// +// SwiftUIView.swift +// UIKitComponents +// +// Created by User on 26.05.2025. +// + +import SwiftUI + +public struct CustomTextField: View { + + //MARK: Properties + + let title: String //Название textfield + let titleKey: String //titleKey который отображается в textfield + let error: Bool // status error + let errorText: String + let security: Bool // securityField + @FocusState var isFocused: Bool //active textfield + @Binding var text: String //text for textField + @State var eye: Bool = false //Видимость security field + + //Цвет border + private var colorStroke: String { + if isFocused { return "hex#2254F580" } + if error { return "hex#FD3535" } + if !text.isEmpty { return "hex#B8C1CC" } + else { return "hex#EBEBEB" } + } + + //MARK: Init + + public init(title: String = "", titleKey: String, error: Bool = false, errorText: String = "", security: Bool = false, text: Binding) { + self.title = title + self.titleKey = titleKey + self.error = error + self.errorText = errorText + self.security = security + self._text = text + } + + //MARK: View + + public var body: some View { + VStack(alignment: .leading){ + if !title.isEmpty { + Text(title) + .robotoFlex(size: 14) + .foregroundStyle(Color("hex#7E7E9A", bundle: .module)) + .tracking(0) + .lineSpacing(20) + } + ZStack { + if security && !eye { + SecureField("", text: $text) + .padding(.horizontal, 14) + .frame(maxWidth: .infinity) + .frame(height: 48) + .focused($isFocused) + .tracking(0.32) + .lineSpacing(20) + .background( + RoundedRectangle(cornerRadius: 10) + .foregroundStyle(Color(error ? "hex#FD3535" : "hex#F5F5F9", bundle: .module)) + .opacity(error ? 0.1 : 1) + .overlay(content: { + RoundedRectangle(cornerRadius: 10) + .stroke(lineWidth: 1) + .foregroundStyle(Color(colorStroke, bundle: .module)) + }) + ) + } else { + TextField("", text: $text) + .padding(.horizontal, 14) + .frame(maxWidth: .infinity) + .frame(height: 48) + .focused($isFocused) + .background( + RoundedRectangle(cornerRadius: 10) + .foregroundStyle(Color(error ? "hex#FD3535" : "hex#F5F5F9", bundle: .module)) + .opacity(error ? 0.1 : 1) + .overlay(content: { + RoundedRectangle(cornerRadius: 10) + .stroke(lineWidth: 1) + .foregroundStyle(Color(colorStroke, bundle: .module)) + }) + ) + } + HStack { + if text.isEmpty { + Text(titleKey) + .foregroundStyle(Color("hex#939396", bundle: .module)) + .robotoFlex(size: 15) + .tracking(0) + .lineSpacing(20) + } + Spacer() + if security { + Button { + eye.toggle() + } label: { + Image(!eye ? "EyeClose" : "EyeOpen", bundle: .module) + } + } + }.padding(.horizontal, 14) + } + if error { + Text("Введите ваше имя") + .robotoFlex(size: 14) + .foregroundStyle(Color("hex#FD3535", bundle: .module)) + } + } + } +} + +#Preview { + CustomTextField(titleKey: "",security: true , text: .constant("")) +} diff --git a/Sources/UIKitComponents/Example/ButtonChipsTest.swift b/Sources/UIKitComponents/Example/ButtonChipsTest.swift new file mode 100644 index 0000000..115bb43 --- /dev/null +++ b/Sources/UIKitComponents/Example/ButtonChipsTest.swift @@ -0,0 +1,28 @@ +// +// SwiftUIView.swift +// UIKitComponents +// +// Created by User on 26.05.2025. +// + +import SwiftUI + +struct ButtonChipsTest: View { + + init() { + FontWeightSetUp.allFonts() + } + + var body: some View { + CustomMainButtonView(title: "Chips",size: .chips, disactive: true) { + // + } + CustomMainButtonView(title: "Chips",size: .chips, disactive: false) { + // + } + } +} + +#Preview { + ButtonChipsTest() +} diff --git a/Sources/UIKitComponents/Example/PrimaryCartTest.swift b/Sources/UIKitComponents/Example/PrimaryCartTest.swift new file mode 100644 index 0000000..a7677e4 --- /dev/null +++ b/Sources/UIKitComponents/Example/PrimaryCartTest.swift @@ -0,0 +1,28 @@ +// +// SwiftUIView.swift +// UIKitComponents +// +// Created by User on 26.05.2025. +// + +import SwiftUI + +struct PrimaryCartTest: View { + + init() { + FontWeightSetUp.allFonts() + } + + var body: some View { + CardPrimaryView(title: "Рубашка Воскресенье для машинного вязания", subtitle: "Мужская одежда", price: 500, status: false, titleForButton: "Добавить") { + // + } + CardPrimaryView(title: "Рубашка Воскресенье для машинного вязания", subtitle: "Мужская одежда", price: 500, status: true, titleForButton: "Удалить") { + // + } + } +} + +#Preview { + PrimaryCartTest() +} diff --git a/Sources/UIKitComponents/Example/SelectTestView.swift b/Sources/UIKitComponents/Example/SelectTestView.swift new file mode 100644 index 0000000..3dbc7f7 --- /dev/null +++ b/Sources/UIKitComponents/Example/SelectTestView.swift @@ -0,0 +1,24 @@ +// +// SwiftUIView.swift +// UIKitComponents +// +// Created by User on 26.05.2025. +// + +import SwiftUI + +struct SelectTestView: View { + let variantds: [String] = ["Пол","Пол","Пол","Пол"] + + init() { + FontWeightSetUp.allFonts() + } + + var body: some View { + SelectView(title: "Пол", variants: variantds) + } +} + +#Preview { + SelectTestView() +} diff --git a/Sources/UIKitComponents/Example/TabbarFullTest.swift b/Sources/UIKitComponents/Example/TabbarFullTest.swift new file mode 100644 index 0000000..0f61367 --- /dev/null +++ b/Sources/UIKitComponents/Example/TabbarFullTest.swift @@ -0,0 +1,68 @@ +// +// SwiftUIView.swift +// UIKitComponents +// +// Created by User on 26.05.2025. +// + +import SwiftUI + +struct TabbarFullTest: View { + + @State var selection: String = "Главная" + + init(selection: String = "Главная") { + self.selection = selection + FontWeightSetUp.allFonts() + } + + + var body: some View { + VStack { + TabbarContainer(selection: .constant("Профиль")) { + Color.white + .tabItem(tab: "Главная", selection: $selection) + Color.blue + .tabItem(tab: "Каталог", selection: $selection) + Color.green + .tabItem(tab: "Проекты", selection: $selection) + Color.blue + .tabItem(tab: "Профиль", selection: $selection) + } + TabbarContainer(selection: .constant("Проекты")) { + Color.white + .tabItem(tab: "Главная", selection: $selection) + Color.blue + .tabItem(tab: "Каталог", selection: $selection) + Color.green + .tabItem(tab: "Проекты", selection: $selection) + Color.blue + .tabItem(tab: "Профиль", selection: $selection) + } + TabbarContainer(selection: .constant("Каталог")) { + Color.white + .tabItem(tab: "Главная", selection: $selection) + Color.blue + .tabItem(tab: "Каталог", selection: $selection) + Color.green + .tabItem(tab: "Проекты", selection: $selection) + Color.blue + .tabItem(tab: "Профиль", selection: $selection) + } + TabbarContainer(selection: .constant("Главная")) { + Color.white + .tabItem(tab: "Главная", selection: $selection) + Color.blue + .tabItem(tab: "Каталог", selection: $selection) + Color.green + .tabItem(tab: "Проекты", selection: $selection) + Color.blue + .tabItem(tab: "Профиль", selection: $selection) + } + } + } +} + +#Preview { + TabbarFullTest() +} diff --git a/Sources/UIKitComponents/Example/TabbarTest.swift b/Sources/UIKitComponents/Example/TabbarTest.swift new file mode 100644 index 0000000..42fbe58 --- /dev/null +++ b/Sources/UIKitComponents/Example/TabbarTest.swift @@ -0,0 +1,36 @@ +// +// SwiftUIView.swift +// UIKitComponents +// +// Created by User on 26.05.2025. +// + +import SwiftUI + +struct TabbarTest: View { + + @State var selection: String = "Главная" + + init() { + FontWeightSetUp.allFonts() + } + + var body: some View { + VStack { + TabbarContainer(selection: $selection) { + Color.white + .tabItem(tab: "Главная", selection: $selection) + Color.blue + .tabItem(tab: "Каталог", selection: $selection) + Color.green + .tabItem(tab: "Проекты", selection: $selection) + Color.blue + .tabItem(tab: "Профиль", selection: $selection) + } + } + } +} + +#Preview { + TabbarTest() +} diff --git a/Sources/UIKitComponents/Example/TextFieldError.swift b/Sources/UIKitComponents/Example/TextFieldError.swift new file mode 100644 index 0000000..6cddd80 --- /dev/null +++ b/Sources/UIKitComponents/Example/TextFieldError.swift @@ -0,0 +1,25 @@ +// +// SwiftUIView.swift +// UIKitComponents +// +// Created by User on 26.05.2025. +// + +import SwiftUI + +struct TextFieldError: View { + + init() { + FontWeightSetUp.allFonts() + } + + var body: some View { + VStack { + CustomTextField(titleKey: "Имя", error: true, errorText: "Имя не может быть пустым", text: .constant("")) + } + } +} + +#Preview { + TextFieldError() +} diff --git a/Sources/UIKitComponents/Header/HeaderView.swift b/Sources/UIKitComponents/Header/HeaderView.swift new file mode 100644 index 0000000..e15763f --- /dev/null +++ b/Sources/UIKitComponents/Header/HeaderView.swift @@ -0,0 +1,59 @@ +// +// SwiftUIView.swift +// UIKitComponents +// +// Created by User on 26.05.2025. +// + +import SwiftUI + +public struct HeaderView: View { + + let title: String + let center: Bool + let actionTrash: () -> () + @Environment(\.dismiss) var dismiss + + public init(title: String, center: Bool, actionTrash: @escaping () -> Void) { + self.title = title + self.center = center + self.actionTrash = actionTrash + } + public var body: some View { + VStack(alignment: .leading) { + HStack { + Button { + dismiss() + } label: { + Image("Back", bundle: .module) + } + Spacer() + if center { + Text("Корзина") + .robotoFlex(size: 20, font: .semibold) + .padding(.top, 24) + .tracking(0.38) + .offset(y: -7) + Spacer() + } + Button { + actionTrash() + } label: { + Image("Trash", bundle: .module) + } + } + if !center { + Text("Корзина") + .robotoFlex(size: 24, font: .black) + .padding(.top, 24) + .tracking(0.33) + } + } + } +} + +#Preview { + HeaderView(title: "Корзина", center: true) { + + } +} diff --git a/Sources/UIKitComponents/Media.xcassets/Back.imageset/Back.pdf b/Sources/UIKitComponents/Media.xcassets/Back.imageset/Back.pdf new file mode 100644 index 0000000..b3539eb Binary files /dev/null and b/Sources/UIKitComponents/Media.xcassets/Back.imageset/Back.pdf differ diff --git a/Sources/UIKitComponents/Media.xcassets/Back.imageset/Contents.json b/Sources/UIKitComponents/Media.xcassets/Back.imageset/Contents.json new file mode 100644 index 0000000..da3b9aa --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/Back.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "Back.pdf", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/UIKitComponents/Media.xcassets/Close.imageset/Close.pdf b/Sources/UIKitComponents/Media.xcassets/Close.imageset/Close.pdf new file mode 100644 index 0000000..175ba7b Binary files /dev/null and b/Sources/UIKitComponents/Media.xcassets/Close.imageset/Close.pdf differ diff --git a/Sources/UIKitComponents/Media.xcassets/Close.imageset/Contents.json b/Sources/UIKitComponents/Media.xcassets/Close.imageset/Contents.json new file mode 100644 index 0000000..2e21e0a --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/Close.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "Close.pdf", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/UIKitComponents/Media.xcassets/Colors/Contents.json b/Sources/UIKitComponents/Media.xcassets/Colors/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/Colors/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/UIKitComponents/Media.xcassets/Colors/hex#00B412.colorset/Contents.json b/Sources/UIKitComponents/Media.xcassets/Colors/hex#00B412.colorset/Contents.json new file mode 100644 index 0000000..8bc61a7 --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/Colors/hex#00B412.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x12", + "green" : "0xB4", + "red" : "0x00" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x12", + "green" : "0xB4", + "red" : "0x00" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/UIKitComponents/Media.xcassets/Colors/hex#1A6FEE.colorset/Contents.json b/Sources/UIKitComponents/Media.xcassets/Colors/hex#1A6FEE.colorset/Contents.json new file mode 100644 index 0000000..0547e7b --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/Colors/hex#1A6FEE.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xEE", + "green" : "0x6F", + "red" : "0x1A" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xEE", + "green" : "0x6F", + "red" : "0x1A" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/UIKitComponents/Media.xcassets/Colors/hex#2254F580.colorset/Contents.json b/Sources/UIKitComponents/Media.xcassets/Colors/hex#2254F580.colorset/Contents.json new file mode 100644 index 0000000..9861d71 --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/Colors/hex#2254F580.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "0.500", + "blue" : "0xF5", + "green" : "0x54", + "red" : "0x22" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xFF", + "green" : "0xFF", + "red" : "0xFE" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/UIKitComponents/Media.xcassets/Colors/hex#2D2C2C.colorset/Contents.json b/Sources/UIKitComponents/Media.xcassets/Colors/hex#2D2C2C.colorset/Contents.json new file mode 100644 index 0000000..e0dd848 --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/Colors/hex#2D2C2C.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x2C", + "green" : "0x2C", + "red" : "0x2D" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x2C", + "green" : "0x2C", + "red" : "0x2D" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/UIKitComponents/Media.xcassets/Colors/hex#7E7E9A.colorset/Contents.json b/Sources/UIKitComponents/Media.xcassets/Colors/hex#7E7E9A.colorset/Contents.json new file mode 100644 index 0000000..8ee8550 --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/Colors/hex#7E7E9A.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x9A", + "green" : "0x7E", + "red" : "0x7E" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xFF", + "green" : "0xFF", + "red" : "0xFE" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/UIKitComponents/Media.xcassets/Colors/hex#8787A1.colorset/Contents.json b/Sources/UIKitComponents/Media.xcassets/Colors/hex#8787A1.colorset/Contents.json new file mode 100644 index 0000000..6215a3e --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/Colors/hex#8787A1.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xA1", + "green" : "0x87", + "red" : "0x87" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xA1", + "green" : "0x87", + "red" : "0x87" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/UIKitComponents/Media.xcassets/Colors/hex#939396.colorset/Contents.json b/Sources/UIKitComponents/Media.xcassets/Colors/hex#939396.colorset/Contents.json new file mode 100644 index 0000000..ca18270 --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/Colors/hex#939396.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x96", + "green" : "0x93", + "red" : "0x93" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x96", + "green" : "0x93", + "red" : "0x93" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/UIKitComponents/Media.xcassets/Colors/hex#98989A.colorset/Contents.json b/Sources/UIKitComponents/Media.xcassets/Colors/hex#98989A.colorset/Contents.json new file mode 100644 index 0000000..a84fc12 --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/Colors/hex#98989A.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x9A", + "green" : "0x98", + "red" : "0x98" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x9A", + "green" : "0x98", + "red" : "0x98" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/UIKitComponents/Media.xcassets/Colors/hex#B8C1CC.colorset/Contents.json b/Sources/UIKitComponents/Media.xcassets/Colors/hex#B8C1CC.colorset/Contents.json new file mode 100644 index 0000000..c0d54ac --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/Colors/hex#B8C1CC.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xCC", + "green" : "0xC1", + "red" : "0xB8" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xCC", + "green" : "0xC1", + "red" : "0xB8" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/UIKitComponents/Media.xcassets/Colors/hex#BFC7D1.colorset/Contents.json b/Sources/UIKitComponents/Media.xcassets/Colors/hex#BFC7D1.colorset/Contents.json new file mode 100644 index 0000000..69d5f53 --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/Colors/hex#BFC7D1.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xD1", + "green" : "0xC7", + "red" : "0xBF" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xD1", + "green" : "0xC7", + "red" : "0xBF" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/UIKitComponents/Media.xcassets/Colors/hex#C9D4FB.colorset/Contents.json b/Sources/UIKitComponents/Media.xcassets/Colors/hex#C9D4FB.colorset/Contents.json new file mode 100644 index 0000000..0a09c53 --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/Colors/hex#C9D4FB.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xFB", + "green" : "0xD4", + "red" : "0xC9" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xFF", + "green" : "0xFF", + "red" : "0xFE" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/UIKitComponents/Media.xcassets/Colors/hex#E4E8F599.colorset/Contents.json b/Sources/UIKitComponents/Media.xcassets/Colors/hex#E4E8F599.colorset/Contents.json new file mode 100644 index 0000000..5831e59 --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/Colors/hex#E4E8F599.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xF5", + "green" : "0xE8", + "red" : "0xE4" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xF5", + "green" : "0xE8", + "red" : "0xE4" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/UIKitComponents/Media.xcassets/Colors/hex#E6E6E6.colorset/Contents.json b/Sources/UIKitComponents/Media.xcassets/Colors/hex#E6E6E6.colorset/Contents.json new file mode 100644 index 0000000..7c2fa99 --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/Colors/hex#E6E6E6.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xE6", + "green" : "0xE6", + "red" : "0xE6" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xE6", + "green" : "0xE6", + "red" : "0xE6" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/UIKitComponents/Media.xcassets/Colors/hex#EBEBEB.colorset/Contents.json b/Sources/UIKitComponents/Media.xcassets/Colors/hex#EBEBEB.colorset/Contents.json new file mode 100644 index 0000000..bb37089 --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/Colors/hex#EBEBEB.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xEB", + "green" : "0xEB", + "red" : "0xEB" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xFF", + "green" : "0xFF", + "red" : "0xFE" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/UIKitComponents/Media.xcassets/Colors/hex#F2F2F2.colorset/Contents.json b/Sources/UIKitComponents/Media.xcassets/Colors/hex#F2F2F2.colorset/Contents.json new file mode 100644 index 0000000..d2e4805 --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/Colors/hex#F2F2F2.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xF2", + "green" : "0xF2", + "red" : "0xF2" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xF2", + "green" : "0xF2", + "red" : "0xF2" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/UIKitComponents/Media.xcassets/Colors/hex#F4F4F4.colorset/Contents.json b/Sources/UIKitComponents/Media.xcassets/Colors/hex#F4F4F4.colorset/Contents.json new file mode 100644 index 0000000..4a1d12a --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/Colors/hex#F4F4F4.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xF4", + "green" : "0xF4", + "red" : "0xF4" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xFF", + "green" : "0xFF", + "red" : "0xFE" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/UIKitComponents/Media.xcassets/Colors/hex#F5F5F9.colorset/Contents.json b/Sources/UIKitComponents/Media.xcassets/Colors/hex#F5F5F9.colorset/Contents.json new file mode 100644 index 0000000..b534a8e --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/Colors/hex#F5F5F9.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xF9", + "green" : "0xF5", + "red" : "0xF5" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xF9", + "green" : "0xF5", + "red" : "0xF5" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/UIKitComponents/Media.xcassets/Colors/hex#F7F7F7.colorset/Contents.json b/Sources/UIKitComponents/Media.xcassets/Colors/hex#F7F7F7.colorset/Contents.json new file mode 100644 index 0000000..e1ce072 --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/Colors/hex#F7F7F7.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xF7", + "green" : "0xF7", + "red" : "0xF7" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xF7", + "green" : "0xF7", + "red" : "0xF7" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/UIKitComponents/Media.xcassets/Colors/hex#F7F7FA.colorset/Contents.json b/Sources/UIKitComponents/Media.xcassets/Colors/hex#F7F7FA.colorset/Contents.json new file mode 100644 index 0000000..5dfdb44 --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/Colors/hex#F7F7FA.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xFA", + "green" : "0xF7", + "red" : "0xF7" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xFA", + "green" : "0xF7", + "red" : "0xF7" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/UIKitComponents/Media.xcassets/Colors/hex#FD3535.colorset/Contents.json b/Sources/UIKitComponents/Media.xcassets/Colors/hex#FD3535.colorset/Contents.json new file mode 100644 index 0000000..8b21ecd --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/Colors/hex#FD3535.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x35", + "green" : "0x35", + "red" : "0xFD" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x35", + "green" : "0x35", + "red" : "0xFD" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/UIKitComponents/Media.xcassets/Contents.json b/Sources/UIKitComponents/Media.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/UIKitComponents/Media.xcassets/Delete.imageset/Contents.json b/Sources/UIKitComponents/Media.xcassets/Delete.imageset/Contents.json new file mode 100644 index 0000000..4c75627 --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/Delete.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "Delete.pdf", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/UIKitComponents/Media.xcassets/Delete.imageset/Delete.pdf b/Sources/UIKitComponents/Media.xcassets/Delete.imageset/Delete.pdf new file mode 100644 index 0000000..3bed358 Binary files /dev/null and b/Sources/UIKitComponents/Media.xcassets/Delete.imageset/Delete.pdf differ diff --git a/Sources/UIKitComponents/Media.xcassets/Divider.imageset/Contents.json b/Sources/UIKitComponents/Media.xcassets/Divider.imageset/Contents.json new file mode 100644 index 0000000..eacf5de --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/Divider.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "Divider.pdf", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/UIKitComponents/Media.xcassets/Divider.imageset/Divider.pdf b/Sources/UIKitComponents/Media.xcassets/Divider.imageset/Divider.pdf new file mode 100644 index 0000000..29183ee Binary files /dev/null and b/Sources/UIKitComponents/Media.xcassets/Divider.imageset/Divider.pdf differ diff --git a/Sources/UIKitComponents/Media.xcassets/EyeClose.imageset/Contents.json b/Sources/UIKitComponents/Media.xcassets/EyeClose.imageset/Contents.json new file mode 100644 index 0000000..f485f1c --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/EyeClose.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "Eye Off An Inner Journey - iconSvg.co.pdf", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/UIKitComponents/Media.xcassets/EyeClose.imageset/Eye Off An Inner Journey - iconSvg.co.pdf b/Sources/UIKitComponents/Media.xcassets/EyeClose.imageset/Eye Off An Inner Journey - iconSvg.co.pdf new file mode 100644 index 0000000..0c4779e Binary files /dev/null and b/Sources/UIKitComponents/Media.xcassets/EyeClose.imageset/Eye Off An Inner Journey - iconSvg.co.pdf differ diff --git a/Sources/UIKitComponents/Media.xcassets/EyeOpen.imageset/Contents.json b/Sources/UIKitComponents/Media.xcassets/EyeOpen.imageset/Contents.json new file mode 100644 index 0000000..93044cb --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/EyeOpen.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "Group.pdf", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/UIKitComponents/Media.xcassets/EyeOpen.imageset/Group.pdf b/Sources/UIKitComponents/Media.xcassets/EyeOpen.imageset/Group.pdf new file mode 100644 index 0000000..050bebc Binary files /dev/null and b/Sources/UIKitComponents/Media.xcassets/EyeOpen.imageset/Group.pdf differ diff --git a/Sources/UIKitComponents/Media.xcassets/Icon=check.imageset/Contents.json b/Sources/UIKitComponents/Media.xcassets/Icon=check.imageset/Contents.json new file mode 100644 index 0000000..4842232 --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/Icon=check.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "Icon=check.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/UIKitComponents/Media.xcassets/Icon=check.imageset/Icon=check.svg b/Sources/UIKitComponents/Media.xcassets/Icon=check.imageset/Icon=check.svg new file mode 100644 index 0000000..c9b377d --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/Icon=check.imageset/Icon=check.svg @@ -0,0 +1,39 @@ + + + + + + diff --git a/Sources/UIKitComponents/Media.xcassets/Icon=chevron-down.imageset/Contents.json b/Sources/UIKitComponents/Media.xcassets/Icon=chevron-down.imageset/Contents.json new file mode 100644 index 0000000..cc2eb01 --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/Icon=chevron-down.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "Icon=chevron-down.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/UIKitComponents/Media.xcassets/Icon=chevron-down.imageset/Icon=chevron-down.svg b/Sources/UIKitComponents/Media.xcassets/Icon=chevron-down.imageset/Icon=chevron-down.svg new file mode 100644 index 0000000..fcd03b7 --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/Icon=chevron-down.imageset/Icon=chevron-down.svg @@ -0,0 +1,39 @@ + + + + + + diff --git a/Sources/UIKitComponents/Media.xcassets/Icon=chevron-left.imageset/Contents.json b/Sources/UIKitComponents/Media.xcassets/Icon=chevron-left.imageset/Contents.json new file mode 100644 index 0000000..3ea7ee9 --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/Icon=chevron-left.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "Icon=chevron-left.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/UIKitComponents/Media.xcassets/Icon=chevron-left.imageset/Icon=chevron-left.svg b/Sources/UIKitComponents/Media.xcassets/Icon=chevron-left.imageset/Icon=chevron-left.svg new file mode 100644 index 0000000..b20e1e4 --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/Icon=chevron-left.imageset/Icon=chevron-left.svg @@ -0,0 +1,39 @@ + + + + + + diff --git a/Sources/UIKitComponents/Media.xcassets/Icon=chevron-right.imageset/Contents.json b/Sources/UIKitComponents/Media.xcassets/Icon=chevron-right.imageset/Contents.json new file mode 100644 index 0000000..7ba4869 --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/Icon=chevron-right.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "Icon=chevron-right.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/UIKitComponents/Media.xcassets/Icon=chevron-right.imageset/Icon=chevron-right.svg b/Sources/UIKitComponents/Media.xcassets/Icon=chevron-right.imageset/Icon=chevron-right.svg new file mode 100644 index 0000000..fdf3722 --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/Icon=chevron-right.imageset/Icon=chevron-right.svg @@ -0,0 +1,39 @@ + + + + + + diff --git a/Sources/UIKitComponents/Media.xcassets/Icon=close.imageset/Contents.json b/Sources/UIKitComponents/Media.xcassets/Icon=close.imageset/Contents.json new file mode 100644 index 0000000..e5c8d88 --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/Icon=close.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "Icon=close.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/UIKitComponents/Media.xcassets/Icon=close.imageset/Icon=close.svg b/Sources/UIKitComponents/Media.xcassets/Icon=close.imageset/Icon=close.svg new file mode 100644 index 0000000..d9d5438 --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/Icon=close.imageset/Icon=close.svg @@ -0,0 +1,39 @@ + + + + + + diff --git a/Sources/UIKitComponents/Media.xcassets/Icon=delete.imageset/Contents.json b/Sources/UIKitComponents/Media.xcassets/Icon=delete.imageset/Contents.json new file mode 100644 index 0000000..1f7c368 --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/Icon=delete.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "Icon=delete.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/UIKitComponents/Media.xcassets/Icon=delete.imageset/Icon=delete.svg b/Sources/UIKitComponents/Media.xcassets/Icon=delete.imageset/Icon=delete.svg new file mode 100644 index 0000000..15b1793 --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/Icon=delete.imageset/Icon=delete.svg @@ -0,0 +1,39 @@ + + + + + + diff --git a/Sources/UIKitComponents/Media.xcassets/Icon=dismiss.imageset/Contents.json b/Sources/UIKitComponents/Media.xcassets/Icon=dismiss.imageset/Contents.json new file mode 100644 index 0000000..5ad4ac3 --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/Icon=dismiss.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "Icon=dismiss.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/UIKitComponents/Media.xcassets/Icon=dismiss.imageset/Icon=dismiss.svg b/Sources/UIKitComponents/Media.xcassets/Icon=dismiss.imageset/Icon=dismiss.svg new file mode 100644 index 0000000..81e9d95 --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/Icon=dismiss.imageset/Icon=dismiss.svg @@ -0,0 +1,38 @@ + + + + + + diff --git a/Sources/UIKitComponents/Media.xcassets/Icon=download.imageset/Contents.json b/Sources/UIKitComponents/Media.xcassets/Icon=download.imageset/Contents.json new file mode 100644 index 0000000..9d68f39 --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/Icon=download.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "Icon=download.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/UIKitComponents/Media.xcassets/Icon=download.imageset/Icon=download.svg b/Sources/UIKitComponents/Media.xcassets/Icon=download.imageset/Icon=download.svg new file mode 100644 index 0000000..9b425f7 --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/Icon=download.imageset/Icon=download.svg @@ -0,0 +1,39 @@ + + + + + + diff --git a/Sources/UIKitComponents/Media.xcassets/Icon=file-text.imageset/Contents.json b/Sources/UIKitComponents/Media.xcassets/Icon=file-text.imageset/Contents.json new file mode 100644 index 0000000..b31724e --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/Icon=file-text.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "Icon=file-text.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/UIKitComponents/Media.xcassets/Icon=file-text.imageset/Icon=file-text.svg b/Sources/UIKitComponents/Media.xcassets/Icon=file-text.imageset/Icon=file-text.svg new file mode 100644 index 0000000..90ccc71 --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/Icon=file-text.imageset/Icon=file-text.svg @@ -0,0 +1,39 @@ + + + + + + diff --git a/Sources/UIKitComponents/Media.xcassets/Icon=filter.imageset/Contents.json b/Sources/UIKitComponents/Media.xcassets/Icon=filter.imageset/Contents.json new file mode 100644 index 0000000..4096015 --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/Icon=filter.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "Icon=filter.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/UIKitComponents/Media.xcassets/Icon=filter.imageset/Icon=filter.svg b/Sources/UIKitComponents/Media.xcassets/Icon=filter.imageset/Icon=filter.svg new file mode 100644 index 0000000..0365b57 --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/Icon=filter.imageset/Icon=filter.svg @@ -0,0 +1,39 @@ + + + + + + diff --git a/Sources/UIKitComponents/Media.xcassets/Icon=map.imageset/Contents.json b/Sources/UIKitComponents/Media.xcassets/Icon=map.imageset/Contents.json new file mode 100644 index 0000000..1e5e795 --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/Icon=map.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "Icon=map.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/UIKitComponents/Media.xcassets/Icon=map.imageset/Icon=map.svg b/Sources/UIKitComponents/Media.xcassets/Icon=map.imageset/Icon=map.svg new file mode 100644 index 0000000..f35a41c --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/Icon=map.imageset/Icon=map.svg @@ -0,0 +1,52 @@ + + + + + + + + + + + + diff --git a/Sources/UIKitComponents/Media.xcassets/Icon=message-circle.imageset/Contents.json b/Sources/UIKitComponents/Media.xcassets/Icon=message-circle.imageset/Contents.json new file mode 100644 index 0000000..2bce431 --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/Icon=message-circle.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "Icon=message-circle.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/UIKitComponents/Media.xcassets/Icon=message-circle.imageset/Icon=message-circle.svg b/Sources/UIKitComponents/Media.xcassets/Icon=message-circle.imageset/Icon=message-circle.svg new file mode 100644 index 0000000..73e8414 --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/Icon=message-circle.imageset/Icon=message-circle.svg @@ -0,0 +1,39 @@ + + + + + + diff --git a/Sources/UIKitComponents/Media.xcassets/Icon=mic.imageset/Contents.json b/Sources/UIKitComponents/Media.xcassets/Icon=mic.imageset/Contents.json new file mode 100644 index 0000000..255376e --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/Icon=mic.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "Icon=mic.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/UIKitComponents/Media.xcassets/Icon=mic.imageset/Icon=mic.svg b/Sources/UIKitComponents/Media.xcassets/Icon=mic.imageset/Icon=mic.svg new file mode 100644 index 0000000..8e24820 --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/Icon=mic.imageset/Icon=mic.svg @@ -0,0 +1,52 @@ + + + + + + + + + + + + diff --git a/Sources/UIKitComponents/Media.xcassets/Icon=minus.imageset/Contents.json b/Sources/UIKitComponents/Media.xcassets/Icon=minus.imageset/Contents.json new file mode 100644 index 0000000..100f96a --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/Icon=minus.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "Icon=minus.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/UIKitComponents/Media.xcassets/Icon=minus.imageset/Icon=minus.svg b/Sources/UIKitComponents/Media.xcassets/Icon=minus.imageset/Icon=minus.svg new file mode 100644 index 0000000..e26a25e --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/Icon=minus.imageset/Icon=minus.svg @@ -0,0 +1,39 @@ + + + + + + diff --git a/Sources/UIKitComponents/Media.xcassets/Icon=more-horizontal.imageset/Contents.json b/Sources/UIKitComponents/Media.xcassets/Icon=more-horizontal.imageset/Contents.json new file mode 100644 index 0000000..429617b --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/Icon=more-horizontal.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "Icon=more-horizontal.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/UIKitComponents/Media.xcassets/Icon=more-horizontal.imageset/Icon=more-horizontal.svg b/Sources/UIKitComponents/Media.xcassets/Icon=more-horizontal.imageset/Icon=more-horizontal.svg new file mode 100644 index 0000000..6076bdb --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/Icon=more-horizontal.imageset/Icon=more-horizontal.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/Sources/UIKitComponents/Media.xcassets/Icon=paperclip.imageset/Contents.json b/Sources/UIKitComponents/Media.xcassets/Icon=paperclip.imageset/Contents.json new file mode 100644 index 0000000..2ec9ce1 --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/Icon=paperclip.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "Icon=paperclip.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/UIKitComponents/Media.xcassets/Icon=paperclip.imageset/Icon=paperclip.svg b/Sources/UIKitComponents/Media.xcassets/Icon=paperclip.imageset/Icon=paperclip.svg new file mode 100644 index 0000000..50f4dd0 --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/Icon=paperclip.imageset/Icon=paperclip.svg @@ -0,0 +1,39 @@ + + + + + + diff --git a/Sources/UIKitComponents/Media.xcassets/Icon=plus.imageset/Contents.json b/Sources/UIKitComponents/Media.xcassets/Icon=plus.imageset/Contents.json new file mode 100644 index 0000000..533f33f --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/Icon=plus.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "Icon=plus.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/UIKitComponents/Media.xcassets/Icon=plus.imageset/Icon=plus.svg b/Sources/UIKitComponents/Media.xcassets/Icon=plus.imageset/Icon=plus.svg new file mode 100644 index 0000000..27a8b51 --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/Icon=plus.imageset/Icon=plus.svg @@ -0,0 +1,39 @@ + + + + + + diff --git a/Sources/UIKitComponents/Media.xcassets/Icon=search.imageset/Contents.json b/Sources/UIKitComponents/Media.xcassets/Icon=search.imageset/Contents.json new file mode 100644 index 0000000..9990b1f --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/Icon=search.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "Icon=search.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/UIKitComponents/Media.xcassets/Icon=search.imageset/Icon=search.svg b/Sources/UIKitComponents/Media.xcassets/Icon=search.imageset/Icon=search.svg new file mode 100644 index 0000000..3f704f7 --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/Icon=search.imageset/Icon=search.svg @@ -0,0 +1,39 @@ + + + + + + diff --git a/Sources/UIKitComponents/Media.xcassets/Icon=send.imageset/Contents.json b/Sources/UIKitComponents/Media.xcassets/Icon=send.imageset/Contents.json new file mode 100644 index 0000000..0505ee1 --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/Icon=send.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "Icon=send.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/UIKitComponents/Media.xcassets/Icon=send.imageset/Icon=send.svg b/Sources/UIKitComponents/Media.xcassets/Icon=send.imageset/Icon=send.svg new file mode 100644 index 0000000..84a71d7 --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/Icon=send.imageset/Icon=send.svg @@ -0,0 +1,52 @@ + + + + + + + + + + + + diff --git a/Sources/UIKitComponents/Media.xcassets/Icon=shopping-cart.imageset/Contents.json b/Sources/UIKitComponents/Media.xcassets/Icon=shopping-cart.imageset/Contents.json new file mode 100644 index 0000000..44b886f --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/Icon=shopping-cart.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "Icon=shopping-cart.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/UIKitComponents/Media.xcassets/Icon=shopping-cart.imageset/Icon=shopping-cart.svg b/Sources/UIKitComponents/Media.xcassets/Icon=shopping-cart.imageset/Icon=shopping-cart.svg new file mode 100644 index 0000000..6712379 --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/Icon=shopping-cart.imageset/Icon=shopping-cart.svg @@ -0,0 +1,52 @@ + + + + + + + + + + + + diff --git a/Sources/UIKitComponents/Media.xcassets/Rouble.imageset/Contents.json b/Sources/UIKitComponents/Media.xcassets/Rouble.imageset/Contents.json new file mode 100644 index 0000000..dd48e18 --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/Rouble.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "Rouble.pdf", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/UIKitComponents/Media.xcassets/Rouble.imageset/Rouble.pdf b/Sources/UIKitComponents/Media.xcassets/Rouble.imageset/Rouble.pdf new file mode 100644 index 0000000..c03a0df Binary files /dev/null and b/Sources/UIKitComponents/Media.xcassets/Rouble.imageset/Rouble.pdf differ diff --git a/Sources/UIKitComponents/Media.xcassets/Search.imageset/Contents.json b/Sources/UIKitComponents/Media.xcassets/Search.imageset/Contents.json new file mode 100644 index 0000000..faf1983 --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/Search.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "icons 1.pdf", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/UIKitComponents/Media.xcassets/Search.imageset/icons 1.pdf b/Sources/UIKitComponents/Media.xcassets/Search.imageset/icons 1.pdf new file mode 100644 index 0000000..65c323a Binary files /dev/null and b/Sources/UIKitComponents/Media.xcassets/Search.imageset/icons 1.pdf differ diff --git a/Sources/UIKitComponents/Media.xcassets/Trash.imageset/Contents.json b/Sources/UIKitComponents/Media.xcassets/Trash.imageset/Contents.json new file mode 100644 index 0000000..c199604 --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/Trash.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "icons.pdf", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/UIKitComponents/Media.xcassets/Trash.imageset/icons.pdf b/Sources/UIKitComponents/Media.xcassets/Trash.imageset/icons.pdf new file mode 100644 index 0000000..42d78ea Binary files /dev/null and b/Sources/UIKitComponents/Media.xcassets/Trash.imageset/icons.pdf differ diff --git a/Sources/UIKitComponents/Media.xcassets/bg.imageset/Contents.json b/Sources/UIKitComponents/Media.xcassets/bg.imageset/Contents.json new file mode 100644 index 0000000..d771721 --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/bg.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "bg.pdf", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/UIKitComponents/Media.xcassets/bg.imageset/bg.pdf b/Sources/UIKitComponents/Media.xcassets/bg.imageset/bg.pdf new file mode 100644 index 0000000..fb47933 Binary files /dev/null and b/Sources/UIKitComponents/Media.xcassets/bg.imageset/bg.pdf differ diff --git a/Sources/UIKitComponents/Media.xcassets/cart.imageset/Contents.json b/Sources/UIKitComponents/Media.xcassets/cart.imageset/Contents.json new file mode 100644 index 0000000..c199604 --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/cart.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "icons.pdf", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/UIKitComponents/Media.xcassets/cart.imageset/icons.pdf b/Sources/UIKitComponents/Media.xcassets/cart.imageset/icons.pdf new file mode 100644 index 0000000..ce3e8fc Binary files /dev/null and b/Sources/UIKitComponents/Media.xcassets/cart.imageset/icons.pdf differ diff --git a/Sources/UIKitComponents/Media.xcassets/down.imageset/Contents.json b/Sources/UIKitComponents/Media.xcassets/down.imageset/Contents.json new file mode 100644 index 0000000..1a7a2ba --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/down.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "Vector-4.pdf", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/UIKitComponents/Media.xcassets/down.imageset/Vector-4.pdf b/Sources/UIKitComponents/Media.xcassets/down.imageset/Vector-4.pdf new file mode 100644 index 0000000..deff085 Binary files /dev/null and b/Sources/UIKitComponents/Media.xcassets/down.imageset/Vector-4.pdf differ diff --git a/Sources/UIKitComponents/Media.xcassets/minus.imageset/Contents.json b/Sources/UIKitComponents/Media.xcassets/minus.imageset/Contents.json new file mode 100644 index 0000000..046bd94 --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/minus.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "icons.pdf", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/UIKitComponents/Media.xcassets/minus.imageset/icons.pdf b/Sources/UIKitComponents/Media.xcassets/minus.imageset/icons.pdf new file mode 100644 index 0000000..c43b402 Binary files /dev/null and b/Sources/UIKitComponents/Media.xcassets/minus.imageset/icons.pdf differ diff --git a/Sources/UIKitComponents/Media.xcassets/plus.imageset/Contents.json b/Sources/UIKitComponents/Media.xcassets/plus.imageset/Contents.json new file mode 100644 index 0000000..c199604 --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/plus.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "icons.pdf", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/UIKitComponents/Media.xcassets/plus.imageset/icons.pdf b/Sources/UIKitComponents/Media.xcassets/plus.imageset/icons.pdf new file mode 100644 index 0000000..b1a1890 Binary files /dev/null and b/Sources/UIKitComponents/Media.xcassets/plus.imageset/icons.pdf differ diff --git a/Sources/UIKitComponents/Media.xcassets/Главная.imageset/Contents.json b/Sources/UIKitComponents/Media.xcassets/Главная.imageset/Contents.json new file mode 100644 index 0000000..c07eeb5 --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/Главная.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "Vector-2.pdf", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/UIKitComponents/Media.xcassets/Главная.imageset/Vector-2.pdf b/Sources/UIKitComponents/Media.xcassets/Главная.imageset/Vector-2.pdf new file mode 100644 index 0000000..4fb2343 Binary files /dev/null and b/Sources/UIKitComponents/Media.xcassets/Главная.imageset/Vector-2.pdf differ diff --git a/Sources/UIKitComponents/Media.xcassets/ГлавнаяActive.imageset/Contents.json b/Sources/UIKitComponents/Media.xcassets/ГлавнаяActive.imageset/Contents.json new file mode 100644 index 0000000..c6f97a0 --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/ГлавнаяActive.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "Vector.pdf", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/UIKitComponents/Media.xcassets/ГлавнаяActive.imageset/Vector.pdf b/Sources/UIKitComponents/Media.xcassets/ГлавнаяActive.imageset/Vector.pdf new file mode 100644 index 0000000..64e8a56 Binary files /dev/null and b/Sources/UIKitComponents/Media.xcassets/ГлавнаяActive.imageset/Vector.pdf differ diff --git a/Sources/UIKitComponents/Media.xcassets/Каталог.imageset/Contents.json b/Sources/UIKitComponents/Media.xcassets/Каталог.imageset/Contents.json new file mode 100644 index 0000000..2a26388 --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/Каталог.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "Результаты.pdf", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/UIKitComponents/Media.xcassets/Каталог.imageset/Результаты.pdf b/Sources/UIKitComponents/Media.xcassets/Каталог.imageset/Результаты.pdf new file mode 100644 index 0000000..498ccd7 Binary files /dev/null and b/Sources/UIKitComponents/Media.xcassets/Каталог.imageset/Результаты.pdf differ diff --git a/Sources/UIKitComponents/Media.xcassets/КаталогActive.imageset/Contents.json b/Sources/UIKitComponents/Media.xcassets/КаталогActive.imageset/Contents.json new file mode 100644 index 0000000..b1120fe --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/КаталогActive.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "Результаты-2.pdf", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/UIKitComponents/Media.xcassets/КаталогActive.imageset/Результаты-2.pdf b/Sources/UIKitComponents/Media.xcassets/КаталогActive.imageset/Результаты-2.pdf new file mode 100644 index 0000000..f70b811 Binary files /dev/null and b/Sources/UIKitComponents/Media.xcassets/КаталогActive.imageset/Результаты-2.pdf differ diff --git a/Sources/UIKitComponents/Media.xcassets/Проекты.imageset/Contents.json b/Sources/UIKitComponents/Media.xcassets/Проекты.imageset/Contents.json new file mode 100644 index 0000000..93044cb --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/Проекты.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "Group.pdf", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/UIKitComponents/Media.xcassets/Проекты.imageset/Group.pdf b/Sources/UIKitComponents/Media.xcassets/Проекты.imageset/Group.pdf new file mode 100644 index 0000000..f9c0930 Binary files /dev/null and b/Sources/UIKitComponents/Media.xcassets/Проекты.imageset/Group.pdf differ diff --git a/Sources/UIKitComponents/Media.xcassets/ПроектыActive.imageset/Contents.json b/Sources/UIKitComponents/Media.xcassets/ПроектыActive.imageset/Contents.json new file mode 100644 index 0000000..d15224e --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/ПроектыActive.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "Group-2.pdf", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/UIKitComponents/Media.xcassets/ПроектыActive.imageset/Group-2.pdf b/Sources/UIKitComponents/Media.xcassets/ПроектыActive.imageset/Group-2.pdf new file mode 100644 index 0000000..97069ca Binary files /dev/null and b/Sources/UIKitComponents/Media.xcassets/ПроектыActive.imageset/Group-2.pdf differ diff --git a/Sources/UIKitComponents/Media.xcassets/Профиль.imageset/Contents.json b/Sources/UIKitComponents/Media.xcassets/Профиль.imageset/Contents.json new file mode 100644 index 0000000..5f1f705 --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/Профиль.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "Пользователь.pdf", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/UIKitComponents/Media.xcassets/Профиль.imageset/Пользователь.pdf b/Sources/UIKitComponents/Media.xcassets/Профиль.imageset/Пользователь.pdf new file mode 100644 index 0000000..62f3e81 Binary files /dev/null and b/Sources/UIKitComponents/Media.xcassets/Профиль.imageset/Пользователь.pdf differ diff --git a/Sources/UIKitComponents/Media.xcassets/ПрофильActive.imageset/Contents.json b/Sources/UIKitComponents/Media.xcassets/ПрофильActive.imageset/Contents.json new file mode 100644 index 0000000..24fd9d4 --- /dev/null +++ b/Sources/UIKitComponents/Media.xcassets/ПрофильActive.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "Пользователь-2.pdf", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/UIKitComponents/Media.xcassets/ПрофильActive.imageset/Пользователь-2.pdf b/Sources/UIKitComponents/Media.xcassets/ПрофильActive.imageset/Пользователь-2.pdf new file mode 100644 index 0000000..e716ff3 Binary files /dev/null and b/Sources/UIKitComponents/Media.xcassets/ПрофильActive.imageset/Пользователь-2.pdf differ diff --git a/Sources/UIKitComponents/Resources/.DS_Store b/Sources/UIKitComponents/Resources/.DS_Store new file mode 100644 index 0000000..22e84e1 Binary files /dev/null and b/Sources/UIKitComponents/Resources/.DS_Store differ diff --git a/Sources/UIKitComponents/Resources/Roboto-Bold.ttf b/Sources/UIKitComponents/Resources/Roboto-Bold.ttf new file mode 100644 index 0000000..9d7cf22 Binary files /dev/null and b/Sources/UIKitComponents/Resources/Roboto-Bold.ttf differ diff --git a/Sources/UIKitComponents/Resources/Roboto-ExtraBold.ttf b/Sources/UIKitComponents/Resources/Roboto-ExtraBold.ttf new file mode 100644 index 0000000..7092a88 Binary files /dev/null and b/Sources/UIKitComponents/Resources/Roboto-ExtraBold.ttf differ diff --git a/Sources/UIKitComponents/Resources/Roboto-Medium.ttf b/Sources/UIKitComponents/Resources/Roboto-Medium.ttf new file mode 100644 index 0000000..d629e98 Binary files /dev/null and b/Sources/UIKitComponents/Resources/Roboto-Medium.ttf differ diff --git a/Sources/UIKitComponents/Resources/Roboto-Regular.ttf b/Sources/UIKitComponents/Resources/Roboto-Regular.ttf new file mode 100644 index 0000000..7e3bb2f Binary files /dev/null and b/Sources/UIKitComponents/Resources/Roboto-Regular.ttf differ diff --git a/Sources/UIKitComponents/Resources/Roboto-SemiBold.ttf b/Sources/UIKitComponents/Resources/Roboto-SemiBold.ttf new file mode 100644 index 0000000..3f34834 Binary files /dev/null and b/Sources/UIKitComponents/Resources/Roboto-SemiBold.ttf differ diff --git a/Sources/UIKitComponents/SearchField/SearchFieldView.swift b/Sources/UIKitComponents/SearchField/SearchFieldView.swift new file mode 100644 index 0000000..7c1e6a2 --- /dev/null +++ b/Sources/UIKitComponents/SearchField/SearchFieldView.swift @@ -0,0 +1,62 @@ +// +// SwiftUIView.swift +// UIKitComponents +// +// Created by User on 26.05.2025. +// + +import SwiftUI + +public struct SearchFieldView: View { + + let titleKey: String //title key for textfield + @Binding var search: String //search text + @FocusState var isFocused: Bool // active field + + public init(titleKey: String, search: Binding) { + self.titleKey = titleKey + self._search = search + } + + public var body: some View { + ZStack { + TextField("", text: $search) + .padding(.horizontal, 42) + .frame(maxWidth: .infinity) + .frame(height: 48) + .focused($isFocused) + .background( + RoundedRectangle(cornerRadius: 10) + .foregroundStyle(Color("hex#F5F5F9", bundle: .module)) + .overlay(content: { + RoundedRectangle(cornerRadius: 10) + .stroke(lineWidth: 1) + .foregroundStyle(Color("hex#EBEBEB", bundle: .module)) + }) + ) + HStack { + Image("Search", bundle: .module) + .padding(.leading, 14) + .padding(.trailing, 8) + if search.isEmpty { + Text(titleKey) + .robotoFlex(size: 16) + .foregroundStyle(Color("hex#939396", bundle: .module)) + } + Spacer() + if isFocused { + Button { + search = "" + } label: { + Image("Icon=close", bundle: .module) + .padding(.trailing, 14) + } + } + } + } + } +} + +#Preview { + SearchFieldView(titleKey: "Искать описание", search: .constant("")) +} diff --git a/Sources/UIKitComponents/Select/SelectView.swift b/Sources/UIKitComponents/Select/SelectView.swift new file mode 100644 index 0000000..1110f01 --- /dev/null +++ b/Sources/UIKitComponents/Select/SelectView.swift @@ -0,0 +1,59 @@ +// +// SwiftUIView.swift +// UIKitComponents +// +// Created by User on 26.05.2025. +// + +import SwiftUI + +public struct SelectView: View { + + @State var title: String + let variants: [String] + + public init(title: String, variants: [String]) { + self.title = title + self.variants = variants + } + + public var body: some View { + ZStack { + Menu(content: { + ForEach(variants, id: \.self) { variant in + Button(variant) { + title = variant + } + } + + }, label: { + Text("") + .frame(maxWidth: .infinity) + .frame(height: 48) + .cornerRadius(10) + .background( + RoundedRectangle(cornerRadius: 10) + .foregroundStyle(Color("hex#F5F5F9", bundle: .module)) + .overlay(content: { + RoundedRectangle(cornerRadius: 10) + .stroke(lineWidth: 1) + .foregroundStyle(Color("hex#EBEBEB", bundle: .module)) + }) + ) + }) + HStack { + Text(title) + .robotoFlex(size: 16) + .foregroundStyle(variants.contains(title) ? Color.black : (Color("hex#939396", bundle: .module))) + .tracking(0.32) + .lineSpacing(20) + Spacer() + Image("down", bundle: .module) + }.padding(.horizontal, 14) + } + } +} + +#Preview { + SelectView(title: "Пол", variants: ["Male", "Female", "gay"]) +} diff --git a/Sources/UIKitComponents/Sheet/SheetView.swift b/Sources/UIKitComponents/Sheet/SheetView.swift new file mode 100644 index 0000000..8afd6b7 --- /dev/null +++ b/Sources/UIKitComponents/Sheet/SheetView.swift @@ -0,0 +1,51 @@ +// +// SwiftUIView.swift +// UIKitComponents +// +// Created by User on 26.05.2025. +// + +import SwiftUI + +public struct SheetView: View { + + let title: String // name modal window + let description: String // description + @Binding var sheet: Bool + + public init(title: String, description: String = "", sheet: Binding) { + self.title = title + self.description = description + self._sheet = sheet + } + + public var body: some View { + VStack(alignment: .leading, spacing: 0) { + HStack { + Text(title) + .robotoFlex(size: 20, font: .black) + .tracking(0.38) + .lineSpacing(10) + Spacer() + Button { + sheet = false + } label: { + Image("Close", bundle: .module) + } + }.padding(.horizontal, 20) + if description.count > 400 { + ScrollView { + Text(description) + } + } else { + Text(description) + } + + Spacer() + }.padding(.top, 24) + } +} + +#Preview { + SheetView(title: "Рубашка Воскресенье для машинного вязания", description: "" , sheet: .constant(true)) +} diff --git a/Sources/UIKitComponents/Tabbar/CustomTabbarView.swift b/Sources/UIKitComponents/Tabbar/CustomTabbarView.swift new file mode 100644 index 0000000..855051b --- /dev/null +++ b/Sources/UIKitComponents/Tabbar/CustomTabbarView.swift @@ -0,0 +1,45 @@ +// The Swift Programming Language +// https://docs.swift.org/swift-book + +import SwiftUI + +struct CustomTabbarView: View { + + let tabs: [String] //иконки + @Binding var selection: String //текущий экран + + init(tabs: [String], selection: Binding) { + self.tabs = tabs + self._selection = selection + } + + var body: some View { + VStack { + HStack { + ForEach(tabs, id: \.self) { tab in + Button { + selection = tab + print(selection) + } label: { + VStack { + Image(tab == selection ? tab+"Active" : tab , bundle: .module) + Text(tab) + .robotoFlex(size: 12) + .foregroundStyle(Color(selection == tab ? "hex#1A6FEE" : "hex#B8C1CC", bundle: .module)) + .tracking(0) + .lineSpacing(16) + }.frame(maxWidth: .infinity) + } + } + } + }.background(Color.white) + .edgesIgnoringSafeArea(.bottom) + .edgesIgnoringSafeArea(.horizontal) + } + +} + +#Preview { + CustomTabbarView(tabs: ["Главная"], selection: .constant("Главная")) + CustomTabbarView(tabs: ["Каталог"], selection: .constant("Каталог")) +} diff --git a/Sources/UIKitComponents/Tabbar/TabbarContainer.swift b/Sources/UIKitComponents/Tabbar/TabbarContainer.swift new file mode 100644 index 0000000..7383fe5 --- /dev/null +++ b/Sources/UIKitComponents/Tabbar/TabbarContainer.swift @@ -0,0 +1,48 @@ +// +// SwiftUIView.swift +// UIKitComponents +// +// Created by User on 26.05.2025. +// + +import SwiftUI + +//кастомный Таббар +public struct TabbarContainer: View { + + @State var tabs: [String] = [] + @Binding var selection: String + let content: Content + + public init(selection: Binding, @ViewBuilder content: () -> Content) { + self._selection = selection + self.content = content() + } + + public var body: some View { + VStack(spacing: 0){ + ZStack { + content + .ignoresSafeArea() + } + Divider() + CustomTabbarView(tabs: tabs, selection: $selection) + .padding(.top, 8) + }.onPreferenceChange(TabbarPreferenseKey.self) { value in + self.tabs = value + } + } +} + +#Preview { + TabbarContainer(selection: .constant("Главная")) { + Color.white + .tabItem(tab: "Главная", selection: .constant("Главная")) + Color.blue + .tabItem(tab: "Каталог", selection: .constant("Катавулог")) + Color.green + .tabItem(tab: "Проекты", selection: .constant("Каталог")) + Color.blue + .tabItem(tab: "Профиль", selection: .constant("Каталог")) + } +} diff --git a/Sources/UIKitComponents/Tabbar/TabbarItemModifier.swift b/Sources/UIKitComponents/Tabbar/TabbarItemModifier.swift new file mode 100644 index 0000000..98fb8fc --- /dev/null +++ b/Sources/UIKitComponents/Tabbar/TabbarItemModifier.swift @@ -0,0 +1,23 @@ +// +// File.swift +// UIKitComponents +// +// Created by User on 26.05.2025. +// + +import Foundation +import SwiftUI + +//Структура которая показывает основное view в зависимости от selection +public struct TabbarItemModifier: ViewModifier { + + let tab: String + @Binding var selection: String + + public func body(content: Content) -> some View { + content + .opacity(tab == selection ? 1 : 0) + .preference(key: TabbarPreferenseKey.self, value: [tab]) + } + +} diff --git a/Sources/UIKitComponents/Tabbar/TabbarPreferenseKey.swift b/Sources/UIKitComponents/Tabbar/TabbarPreferenseKey.swift new file mode 100644 index 0000000..3191aab --- /dev/null +++ b/Sources/UIKitComponents/Tabbar/TabbarPreferenseKey.swift @@ -0,0 +1,19 @@ +// +// File.swift +// UIKitComponents +// +// Created by User on 26.05.2025. +// + +import Foundation +import SwiftUICore + +public struct TabbarPreferenseKey: PreferenceKey { + public static let defaultValue: [String] = [] + + static public func reduce(value: inout [String], nextValue: () -> [String]) { + value += nextValue() + } + +} +