diff --git a/components/ButtonBar/BUILD b/components/ButtonBar/BUILD new file mode 100644 index 00000000000..1f6ac5674e6 --- /dev/null +++ b/components/ButtonBar/BUILD @@ -0,0 +1,97 @@ +# Copyright 2017-present The Material Components for iOS Authors. All Rights Reserved. +# +# 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. + +load("//:material_components_ios.bzl", + "mdc_public_objc_library", + "mdc_objc_library") +load("@build_bazel_rules_apple//apple:ios.bzl", "ios_unit_test") +load("@build_bazel_rules_apple//apple:swift.bzl", "swift_library") + +licenses(["notice"]) # Apache 2.0 + +mdc_public_objc_library( + name = "ButtonBar", + sdk_frameworks = [ + "QuartzCore", + "UIKit", + ], + deps = [ + "//components/Buttons", + "@material_internationalization_ios//:MDFInternationalization", + ], +) + +mdc_objc_library( + name = "ColorThemer", + srcs = native.glob(["src/ColorThemer/*.m"]), + hdrs = native.glob(["src/ColorThemer/*.h"]), + includes = ["src/ColorThemer"], + sdk_frameworks = [ + "UIKit", + ], + deps = [ + ":ButtonBar", + "//components/NavigationBar", + "//components/Themes", + ], + visibility = ["//visibility:public"], +) + +mdc_objc_library( + name = "private", + hdrs = native.glob(["src/private/*.h"]), + includes = ["src/private"], + visibility = ["//visibility:private"], +) + +mdc_objc_library( + name = "unit_test_sources", + testonly = 1, + srcs = native.glob([ + "tests/unit/*.m", + "tests/unit/*.h", + ]), + sdk_frameworks = [ + "UIKit", + "XCTest", + ], + deps = [ + ":ButtonBar", + ":ColorThemer", + ":private", + ], + visibility = ["//visibility:private"], +) + +swift_library( + name = "unit_test_swift_sources", + srcs = native.glob(["tests/unit/*.swift"]), + deps = [ + ":ButtonBar", + ":ColorThemer", + ":private", + ], + visibility = ["//visibility:private"], +) + +ios_unit_test( + name = "unit_tests", + deps = [ + ":unit_test_sources", + ":unit_test_swift_sources", + ], + minimum_os_version = "8.0", + visibility = ["//visibility:private"], +) diff --git a/components/ButtonBar/tests/unit/ButtonBarIssue328Tests.swift b/components/ButtonBar/tests/unit/ButtonBarIssue328Tests.swift index 26326a8a00a..863068a56fc 100644 --- a/components/ButtonBar/tests/unit/ButtonBarIssue328Tests.swift +++ b/components/ButtonBar/tests/unit/ButtonBarIssue328Tests.swift @@ -15,7 +15,8 @@ limitations under the License. */ import XCTest -import MaterialComponents +import MaterialComponents.MaterialButtonBar +import MaterialComponents.MaterialButtons // Tests confirming that the Button Bar button ink configuration is: // diff --git a/components/ButtonBar/tests/unit/ButtonBarIssue370Tests.swift b/components/ButtonBar/tests/unit/ButtonBarIssue370Tests.swift index 4eb383c06b0..bdd8df45197 100644 --- a/components/ButtonBar/tests/unit/ButtonBarIssue370Tests.swift +++ b/components/ButtonBar/tests/unit/ButtonBarIssue370Tests.swift @@ -15,7 +15,8 @@ limitations under the License. */ import XCTest -import MaterialComponents +import MaterialComponents.MaterialButtonBar +import MaterialComponents.MaterialButtons // Tests confirming that the Button Bar respects UI appearance for bar button item // titleTextAttributes on iOS 9 and above. diff --git a/components/ButtonBar/tests/unit/ButtonBarIssue516Tests.swift b/components/ButtonBar/tests/unit/ButtonBarIssue516Tests.swift index b9a2f43a944..0ea6b0d4b5a 100644 --- a/components/ButtonBar/tests/unit/ButtonBarIssue516Tests.swift +++ b/components/ButtonBar/tests/unit/ButtonBarIssue516Tests.swift @@ -15,7 +15,8 @@ limitations under the License. */ import XCTest -import MaterialComponents +import MaterialComponents.MaterialButtonBar +import MaterialComponents.MaterialButtons // Tests confirming that the Button Bar lays its buttons according to the layout position: // diff --git a/components/NavigationBar/BUILD b/components/NavigationBar/BUILD new file mode 100644 index 00000000000..9d8868a45b8 --- /dev/null +++ b/components/NavigationBar/BUILD @@ -0,0 +1,87 @@ +# Copyright 2017-present The Material Components for iOS Authors. All Rights Reserved. +# +# 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. + +load("//:material_components_ios.bzl", + "mdc_public_objc_library", + "mdc_objc_library") +load("@build_bazel_rules_apple//apple:ios.bzl", "ios_unit_test") +load("@build_bazel_rules_apple//apple:swift.bzl", "swift_library") + +licenses(["notice"]) # Apache 2.0 + +mdc_public_objc_library( + name = "NavigationBar", + sdk_frameworks = [ + "CoreGraphics", + ], + deps = [ + "//components/ButtonBar", + "//components/Typography", + "//components/private/Math", + "@material_internationalization_ios//:MDFInternationalization", + "@material_text_accessibility_ios//:MDFTextAccessibility", + ], +) + +mdc_objc_library( + name = "ColorThemer", + srcs = native.glob(["src/ColorThemer/*.m"]), + hdrs = native.glob(["src/ColorThemer/*.h"]), + includes = ["src/ColorThemer"], + deps = [ + ":NavigationBar", + "//components/Themes", + ], + visibility = ["//visibility:public"], +) + +mdc_objc_library( + name = "unit_test_sources", + testonly = 1, + srcs = native.glob([ + "tests/unit/*.m", + "tests/unit/*.h" + ]), + sdk_frameworks = [ + "UIKit", + "XCTest", + ], + deps = [ + ":NavigationBar", + ":ColorThemer", + "@material_text_accessibility_ios//:MDFTextAccessibility", + ], + visibility = ["//visibility:private"], +) + +swift_library( + name = "unit_test_swift_sources", + srcs = native.glob(["tests/unit/*.swift"]), + deps = [ + ":NavigationBar", + ":ColorThemer", + ], + visibility = ["//visibility:private"], +) + +ios_unit_test( + name = "unit_tests", + deps = [ + ":unit_test_sources", + ":unit_test_swift_sources", + ], + minimum_os_version = "8.0", + visibility = ["//visibility:private"], +) diff --git a/components/NavigationBar/tests/unit/NavigationBarAccessibilityMutatorTestColorTest.swift b/components/NavigationBar/tests/unit/NavigationBarAccessibilityMutatorTestColorTest.swift index 066edf15f14..50a4b38a0d8 100644 --- a/components/NavigationBar/tests/unit/NavigationBarAccessibilityMutatorTestColorTest.swift +++ b/components/NavigationBar/tests/unit/NavigationBarAccessibilityMutatorTestColorTest.swift @@ -15,7 +15,8 @@ */ import XCTest -import MaterialComponents +import MaterialComponents.MaterialNavigationBar + import MDFTextAccessibility // Tests confirming that the Navigation Bar Accessibility Mutator correctly changes title font