Skip to content

Commit

Permalink
Bump @skyscanner/bpk-foundations-ios from 6.5.0 to 6.6.0 (#1810)
Browse files Browse the repository at this point in the history
* Bump @skyscanner/bpk-foundations-ios from 6.5.0 to 6.6.0

Bumps [@skyscanner/bpk-foundations-ios](https://github.com/Skyscanner/backpack-foundations) from 6.5.0 to 6.6.0.
- [Changelog](https://github.com/Skyscanner/backpack-foundations/blob/main/CHANGELOG.md)
- [Commits](https://github.com/Skyscanner/backpack-foundations/compare/@skyscanner/[email protected]...@skyscanner/[email protected])

---
updated-dependencies:
- dependency-name: "@skyscanner/bpk-foundations-ios"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* add new colors

* filter out private colors when not semantic

* fix color generation

* improve script

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Gert-Jan Vercauteren <[email protected]>
  • Loading branch information
dependabot[bot] and gert-janvercauteren authored Nov 21, 2023
1 parent 26c7277 commit f051c6a
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 13 deletions.
20 changes: 20 additions & 0 deletions Backpack-SwiftUI/Color/Classes/Generated/BPKInternalColors.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,26 @@ internal extension BPKColor {
self.init(value: UIColor(red: red, green: green, blue: blue, alpha: alpha))
}

/// The `infoBannerSuccessColor` internal color.

static let infoBannerSuccessColor = BPKColor(red: 0.047, green: 0.514, blue: 0.541, alpha: 1)
.darkVariant(BPKColor(red: 0.047, green: 0.514, blue: 0.541, alpha: 1))

/// The `infoBannerWarningColor` internal color.

static let infoBannerWarningColor = BPKColor(red: 0.961, green: 0.365, blue: 0.259, alpha: 1)
.darkVariant(BPKColor(red: 0.961, green: 0.365, blue: 0.259, alpha: 1))

/// The `infoBannerErrorColor` internal color.

static let infoBannerErrorColor = BPKColor(red: 0.906, green: 0.031, blue: 0.400, alpha: 1)
.darkVariant(BPKColor(red: 0.906, green: 0.031, blue: 0.400, alpha: 1))

/// The `infoBannerInfoColor` internal color.

static let infoBannerInfoColor = BPKColor(red: 0.761, green: 0.788, blue: 0.804, alpha: 1)
.darkVariant(BPKColor(red: 0.761, green: 0.788, blue: 0.804, alpha: 1))

/// The `badgeBackgroundNormalColor` internal color.

static let badgeBackgroundNormalColor = BPKColor(red: 0.937, green: 0.945, blue: 0.949, alpha: 1)
Expand Down
24 changes: 24 additions & 0 deletions Backpack/Color/Classes/Generated/BPKInternalColors.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,30 @@ import UIKit
// swiftlint:disable identifier_name
internal extension BPKColor {

/// The `infoBannerSuccessColor` internal color.

static let infoBannerSuccessColor = BPKColor.dynamicColor(
withLightVariant: UIColor(red: 0.047, green: 0.514, blue: 0.541, alpha: 1),
darkVariant: UIColor(red: 0.047, green: 0.514, blue: 0.541, alpha: 1))

/// The `infoBannerWarningColor` internal color.

static let infoBannerWarningColor = BPKColor.dynamicColor(
withLightVariant: UIColor(red: 0.961, green: 0.365, blue: 0.259, alpha: 1),
darkVariant: UIColor(red: 0.961, green: 0.365, blue: 0.259, alpha: 1))

/// The `infoBannerErrorColor` internal color.

static let infoBannerErrorColor = BPKColor.dynamicColor(
withLightVariant: UIColor(red: 0.906, green: 0.031, blue: 0.400, alpha: 1),
darkVariant: UIColor(red: 0.906, green: 0.031, blue: 0.400, alpha: 1))

/// The `infoBannerInfoColor` internal color.

static let infoBannerInfoColor = BPKColor.dynamicColor(
withLightVariant: UIColor(red: 0.761, green: 0.788, blue: 0.804, alpha: 1),
darkVariant: UIColor(red: 0.761, green: 0.788, blue: 0.804, alpha: 1))

/// The `badgeBackgroundNormalColor` internal color.

static let badgeBackgroundNormalColor = BPKColor.dynamicColor(
Expand Down
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion scripts/gulp/colours.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,13 @@
*/

const _ = require('lodash');
const { isSemanticColor, isMarcommsColor, hasNewSemanticSuffix, parseColor } = require('./utils/formatUtils');
const { isSemanticColor, isMarcommsColor, hasNewSemanticSuffix, parseColor, isPrivateColor} = require('./utils/formatUtils');

const colors = (properties, filterColors) => {
const colors = _.chain(properties)
.filter((entity) => entity.type === 'color')
.filter(entry => !isSemanticColor(entry) && !hasNewSemanticSuffix(entry) && !isMarcommsColor(entry))
.filter((entity) => !isPrivateColor(entity))
.map(({ value, name, ...rest }) => {
const newName = name.replace('color', '');
return {
Expand Down
3 changes: 2 additions & 1 deletion scripts/gulp/dynamicColours.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ const _ = require('lodash');
const { isSemanticColor, isPrivateColor, parseColor } = require('./utils/formatUtils');

const dynamicColors = (properties) => _.chain(properties)
.filter((entity) => entity.type === 'color' && isSemanticColor(entity) && !isPrivateColor(entity))
.filter((entity) => entity.type === 'color' && isSemanticColor(entity))
.filter((entity) => !isPrivateColor(entity))
.map(
({
value,
Expand Down
8 changes: 4 additions & 4 deletions scripts/gulp/internalColours.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
*/

const _ = require('lodash');
const { isSemanticColor, isPrivateColor, parseColor } = require('./utils/formatUtils');
const { hasNewSemanticSuffix, isPrivateColor, parseColor } = require('./utils/formatUtils');

const internalColors = (properties) => _.chain(properties)
.filter((entity) => entity.type === 'color' && isSemanticColor(entity) && isPrivateColor(entity))
.filter((entity) => entity.type === 'color' && isPrivateColor(entity) && !hasNewSemanticSuffix(entity))
.map(
({
name,
Expand All @@ -38,10 +38,10 @@ const internalColors = (properties) => _.chain(properties)
...rest
}) => ({
value: parseColor(value),
darkValue: parseColor(darkValue),
darkValue: parseColor(darkValue !== undefined ? darkValue : value),
name: name[0].toLowerCase() + name.slice(1),
hex: value.toString(),
darkHex: darkValue.toString(),
darkHex: (darkValue !== undefined ? darkValue : value).toString(),
...rest,
type: 'internalColor',
}),
Expand Down

0 comments on commit f051c6a

Please sign in to comment.