2021-04-30 12:59:24 +00:00
|
|
|
//
|
|
|
|
// Copyright 2021 New Vector Ltd
|
|
|
|
//
|
|
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
// you may not use this file except in compliance with the License.
|
|
|
|
// You may obtain a copy of the License at
|
|
|
|
//
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
//
|
|
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
// See the License for the specific language governing permissions and
|
|
|
|
// limitations under the License.
|
|
|
|
//
|
|
|
|
|
|
|
|
import Foundation
|
|
|
|
import UIKit
|
2021-08-27 15:26:56 +00:00
|
|
|
import SwiftUI
|
|
|
|
|
|
|
|
public protocol DesignKitColorType { }
|
|
|
|
|
|
|
|
extension UIColor: DesignKitColorType { }
|
|
|
|
|
|
|
|
extension Color : DesignKitColorType { }
|
2021-04-30 12:59:24 +00:00
|
|
|
|
|
|
|
/// Colors at https://www.figma.com/file/X4XTH9iS2KGJ2wFKDqkyed/Compound?node-id=1255%3A1104
|
2021-08-27 15:26:56 +00:00
|
|
|
public protocol Colors {
|
2021-04-30 12:59:24 +00:00
|
|
|
|
2021-04-30 13:08:44 +00:00
|
|
|
/// - Focused/Active states
|
|
|
|
/// - CTAs
|
2021-08-27 15:26:56 +00:00
|
|
|
var accent: DesignKitColorType { get }
|
2021-04-30 12:59:24 +00:00
|
|
|
|
2021-04-30 13:08:44 +00:00
|
|
|
/// - Error messages
|
|
|
|
/// - Content requiring user attention
|
|
|
|
/// - Notification, alerts
|
2021-08-27 15:26:56 +00:00
|
|
|
var alert: DesignKitColorType { get }
|
2021-04-30 12:59:24 +00:00
|
|
|
|
2021-04-30 13:08:44 +00:00
|
|
|
/// - Text
|
|
|
|
/// - Icons
|
2021-08-27 15:26:56 +00:00
|
|
|
var primaryContent: DesignKitColorType { get }
|
2021-04-30 12:59:24 +00:00
|
|
|
|
2021-04-30 13:08:44 +00:00
|
|
|
/// - Text
|
|
|
|
/// - Icons
|
2021-08-27 15:26:56 +00:00
|
|
|
var secondaryContent: DesignKitColorType { get }
|
2021-04-30 12:59:24 +00:00
|
|
|
|
2021-04-30 13:08:44 +00:00
|
|
|
/// - Text
|
|
|
|
/// - Icons
|
2021-08-27 15:26:56 +00:00
|
|
|
var tertiaryContent: DesignKitColorType { get }
|
2021-04-30 12:59:24 +00:00
|
|
|
|
2021-04-30 13:08:44 +00:00
|
|
|
/// - Text
|
|
|
|
/// - Icons
|
2021-08-27 15:26:56 +00:00
|
|
|
var quarterlyContent: DesignKitColorType { get }
|
2021-04-30 12:59:24 +00:00
|
|
|
|
2021-06-29 15:05:01 +00:00
|
|
|
/// - Text
|
|
|
|
/// - Icons
|
2021-08-27 15:26:56 +00:00
|
|
|
var quinaryContent: DesignKitColorType { get }
|
2021-06-29 15:05:01 +00:00
|
|
|
|
2021-04-30 13:08:44 +00:00
|
|
|
/// Separating line
|
2021-08-27 15:26:56 +00:00
|
|
|
var separator: DesignKitColorType { get }
|
2021-04-30 12:59:24 +00:00
|
|
|
|
2021-04-30 13:08:44 +00:00
|
|
|
// Cards, tiles
|
2021-08-27 15:26:56 +00:00
|
|
|
var tile: DesignKitColorType { get }
|
2021-04-30 12:59:24 +00:00
|
|
|
|
2021-04-30 13:08:44 +00:00
|
|
|
/// Top navigation background on iOS
|
2021-08-27 15:26:56 +00:00
|
|
|
var navigation: DesignKitColorType { get }
|
2021-04-30 12:59:24 +00:00
|
|
|
|
2021-04-30 13:08:44 +00:00
|
|
|
/// Background UI color
|
2021-08-27 15:26:56 +00:00
|
|
|
var background: DesignKitColorType { get }
|
2021-04-30 12:59:24 +00:00
|
|
|
|
2021-04-30 13:08:44 +00:00
|
|
|
/// - Names in chat timeline
|
|
|
|
/// - Avatars default states that include first name letter
|
2021-08-27 15:26:56 +00:00
|
|
|
var namesAndAvatars: [DesignKitColorType] { get }
|
2021-04-30 12:59:24 +00:00
|
|
|
|
|
|
|
}
|