From f051c6af7e4c6d9187c1eb69c897d9d7886bb1f2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 21 Nov 2023 12:00:13 +0000 Subject: [PATCH] Bump @skyscanner/bpk-foundations-ios from 6.5.0 to 6.6.0 (#1810) * 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/bpk-foundations-ios@6.5.0...@skyscanner/bpk-foundations-ios@6.6.0) --- updated-dependencies: - dependency-name: "@skyscanner/bpk-foundations-ios" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * add new colors * filter out private colors when not semantic * fix color generation * improve script --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Gert-Jan Vercauteren --- .../Classes/Generated/BPKInternalColors.swift | 20 ++++++++++++++++ .../Classes/Generated/BPKInternalColors.swift | 24 +++++++++++++++++++ package-lock.json | 14 +++++------ scripts/gulp/colours.js | 3 ++- scripts/gulp/dynamicColours.js | 3 ++- scripts/gulp/internalColours.js | 8 +++---- 6 files changed, 59 insertions(+), 13 deletions(-) diff --git a/Backpack-SwiftUI/Color/Classes/Generated/BPKInternalColors.swift b/Backpack-SwiftUI/Color/Classes/Generated/BPKInternalColors.swift index ed78077a5..abbc32409 100644 --- a/Backpack-SwiftUI/Color/Classes/Generated/BPKInternalColors.swift +++ b/Backpack-SwiftUI/Color/Classes/Generated/BPKInternalColors.swift @@ -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) diff --git a/Backpack/Color/Classes/Generated/BPKInternalColors.swift b/Backpack/Color/Classes/Generated/BPKInternalColors.swift index 0fe6b867e..5ecfab7a2 100644 --- a/Backpack/Color/Classes/Generated/BPKInternalColors.swift +++ b/Backpack/Color/Classes/Generated/BPKInternalColors.swift @@ -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( diff --git a/package-lock.json b/package-lock.json index 21233627b..fcf55b7a8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2153,21 +2153,21 @@ } }, "node_modules/@skyscanner/bpk-foundations-common": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@skyscanner/bpk-foundations-common/-/bpk-foundations-common-6.5.0.tgz", - "integrity": "sha512-nOk8DspPlbcAtswcQFzwaS8eg55ObJIY/pHl6ZCS3JaCZliTdEp4hJFl1Bb841z7TyMx+JwBOjIwvAN3x7lquw==", + "version": "6.6.0", + "resolved": "https://registry.npmjs.org/@skyscanner/bpk-foundations-common/-/bpk-foundations-common-6.6.0.tgz", + "integrity": "sha512-7PTx3SFkxmniuQahFHCuNYne5XI6UAa6IMPmduAmdcYqQXyLwvJLjMIz9tMGos+veXqZyCL5h5MGLzZR7yM/uQ==", "dev": true, "dependencies": { "color": "^3.0.0" } }, "node_modules/@skyscanner/bpk-foundations-ios": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@skyscanner/bpk-foundations-ios/-/bpk-foundations-ios-6.5.0.tgz", - "integrity": "sha512-guOwORB7eSxTpGvldovvAEjm47VD/2Eem6tpywQZEksBzu+5IGRgQbVT/agCKt3A9J0/OeYXFrPHCiDTkrkVzA==", + "version": "6.6.0", + "resolved": "https://registry.npmjs.org/@skyscanner/bpk-foundations-ios/-/bpk-foundations-ios-6.6.0.tgz", + "integrity": "sha512-F1RYAzghFwGQTSgBN3KDQ9VuOdbMBDltWZ5r94H+uqKYju9AJnmj5VJF4kH9Uxyj6nZ6iku1r8UzfeD4e+pXRg==", "dev": true, "dependencies": { - "@skyscanner/bpk-foundations-common": "^6.5.0", + "@skyscanner/bpk-foundations-common": "^6.6.0", "color": "^3.0.0" } }, diff --git a/scripts/gulp/colours.js b/scripts/gulp/colours.js index abe57e0cd..39f37f5b1 100644 --- a/scripts/gulp/colours.js +++ b/scripts/gulp/colours.js @@ -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 { diff --git a/scripts/gulp/dynamicColours.js b/scripts/gulp/dynamicColours.js index ffcf3c0c0..f6f19630a 100644 --- a/scripts/gulp/dynamicColours.js +++ b/scripts/gulp/dynamicColours.js @@ -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, diff --git a/scripts/gulp/internalColours.js b/scripts/gulp/internalColours.js index 405bcf7b0..0832c404a 100644 --- a/scripts/gulp/internalColours.js +++ b/scripts/gulp/internalColours.js @@ -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, @@ -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', }),