Skip to content

A SwiftUI components library with code examples for Orange Unified Design System

License

Notifications You must be signed in to change notification settings

julien-deramond/ouds-ios

 
 

Repository files navigation

OUDS iOS

OUDS iOS provides Orange iOS components to developers and a demo application.
Report bug · Request feature

Table of contents

Status

MIT license

Versions Still maintained

Code size Opened issues

iOS 15.0

Content

This repository contains the OUDS iOS library that provides Orange iOS components, but also a demo application showcasing these different components.

Integrate OUDS

Use Swift Package Manager

If you want to add the iOS library of Orange Unified Design System, you need to add our Swift Package into your project. To do that, add a new package dependency to your Xcode project by refering to it with https://github.com/Orange-OpenSource/ouds-ios. You are free to choose wether or not you want a branch or a specific tag, pick the solution you want.

Import the library you need

You should use one of the following imports for your needs:

import OUDSModules           // To use modules
import OUDSComponents        // To use components
import OUDSThemesOrange      // To use the default theme
import OUDSThemesCommons     // If you want to define your theme or use OUDSThemeableView
import OUDSTokensComponent   // If you need to override components tokens
import OUDSTokenSemantic     // If you need to override semantic tokens
import OUDSTokensRaw         // If you need to override raw tokens

Use themeable view

// Make imports
import OUDSThemesCommons
import OUDSThemesOrange

// Add themeable view to your root view
OUDSThemeableView(theme: OrangeTheme()) {
    YourRootView()
}

Define a custom theme if needed

class YourCustomTheme: OrangeTheme { }

extension YourCustomTheme {

    // Override components tokens if needed
    override var ftiBorderStyle: BorderStyleSemanticToken { borderStyleDrag }
    override var ftiBorderWidth: BorderWidthSemanticToken { borderWidthThickest }
    
    // Override colors semantic tokens if needed
    override var colorBackgroundDefaultPrimaryLight: ColorSemanticToken! { ColorRawTokens.colorFunctionalSun500 }
    override var colorBackgroundDefaultPrimaryDark: ColorSemanticToken! { ColorRawTokens.colorFunctionalSun800 }
    
    // Etc.
}

Bugs and feature requests

Have a bug or a feature request? Please first search for existing and closed issues. If your problem or idea is not addressed yet, please open a new issue.

Contributing

Please read through our contributing guidelines. Included are directions for opening issues, coding standards, and notes on development.

Copyright and license

Code released under the MIT License.

About

A SwiftUI components library with code examples for Orange Unified Design System

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Swift 93.9%
  • Ruby 3.8%
  • HTML 2.3%