Skip to content

Commit

Permalink
Merge pull request #28 from oversizedev/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
aromanov91 authored May 30, 2023
2 parents 05bb860 + 873a1d9 commit 2987a96
Show file tree
Hide file tree
Showing 846 changed files with 1,931 additions and 3,059 deletions.
2 changes: 1 addition & 1 deletion .swiftformat
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
--swiftversion 5.8
--swiftversion 5.7
--disable preferKeyPath
--ifdef no-indent
4 changes: 2 additions & 2 deletions Example/Shared/DemoPages/GridSelectDemo.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ struct GridSelectDemo: View {
GridSelect(items, selection: $selection,
content: { item, _ in
VStack {
Icon(.circle)
IconDeprecated(.circle)
Text(item)
}.padding()
})
Expand All @@ -29,7 +29,7 @@ struct GridSelectDemo: View {
GridSelect(items2, selection: $selection,
content: { item, _ in
VStack {
Icon(.circle)
IconDeprecated(.circle)
Text(item)
}.padding()
})
Expand Down
2 changes: 1 addition & 1 deletion Example/Shared/DemoPages/IconsDemo.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ struct IconsDemo: View {
PageView("Icons") {
LazyVGrid(columns: grid) {
ForEach(IconsNames.allCases, id: \.self) { icon in
Icon(icon)
IconDeprecated(icon)
.padding(.vertical)
}
}
Expand Down
2 changes: 1 addition & 1 deletion Example/Shared/DemoPages/SegmentedControlDemo.swift
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ struct SegmentedControlDemo: View {

SegmentedPickerSelector(items, selection: $selection) { item, _ in
VStack(spacing: Space.xxxSmall.rawValue) {
Icon(.circle)
IconDeprecated(.circle)
.padding(.xxSmall)
Text(item)
Text("Subtitle")
Expand Down
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Colors, Typography, Spacing and other styles in [core folder](Sources/OversizeUI
- Add `https://github.com/oversizedev/OversizeUI.git`
- Select "Up to Next Major" with "3.0.3"

### Import and use OversizeUI
#### Import and use OversizeUI
After the framework has been added you can import the module to use it:

```swift
Expand Down Expand Up @@ -92,7 +92,7 @@ var items = ["One", "Two", "Three", "Four"]
GridSelect(items, selection: $selection,
content: { item, _ in
VStack {
Icon(.circle)
IconDeprecated(.circle)
Text(item)
}.padding()
})
Expand All @@ -101,7 +101,7 @@ GridSelect(items, selection: $selection,

### Icon
```swift
Icon(.activity)
IconDeprecated(.activity)

```

Expand Down Expand Up @@ -141,12 +141,14 @@ TextField("Text", text: $placeholder))
}
```

## More

More information on in the [DocC documentation](https://oversizedev.github.io/OversizeUI/documentation/oversizeui/)

#### Swift Lint
This project uses [SwiftLint](https://github.com/realm/SwiftLint) to automatically lint our Swift code for common errors. Please install it when developing in this repo by following the [SwiftLint Installation Instructions](https://realm.github.io/SwiftLint/).


### License
#### License

OversizeUI is released under the MIT license. See LICENSE for details.
10 changes: 5 additions & 5 deletions Sources/OversizeUI/Controls/Button/BarButton.swift
Original file line number Diff line number Diff line change
Expand Up @@ -123,27 +123,27 @@ public struct BarButton: View {
private var label: some View {
switch type {
case .close:
Icon(.xMini)
IconDeprecated(.xMini)
case .back:
Icon(.arrowLeft)
IconDeprecated(.arrowLeft)
case let .secondary(text, _):
Text(text)
case let .accent(text, _):
Text(text)
case let .primary(text, _):
Text(text)
case .closeAction:
Icon(.xMini, color: .onSurfaceMediumEmphasis)
IconDeprecated(.xMini, color: .onSurfaceMediumEmphasis)
case .backAction:
Icon(.arrowLeft, color: .onSurfaceMediumEmphasis)
IconDeprecated(.arrowLeft, color: .onSurfaceMediumEmphasis)
case let .disabled(text):
Text(text)
case let .image(image, _):
image
.renderingMode(.template)
.onSurfaceHighEmphasisForegroundColor()
case let .icon(icon, _):
Icon(icon, color: .onSurfaceMediumEmphasis)
IconDeprecated(icon, color: .onSurfaceMediumEmphasis)
}
}
}
16 changes: 8 additions & 8 deletions Sources/OversizeUI/Controls/ContentView/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,14 @@ extension ContentView {
case .close:

Button(action: { dismiss() }) {
Icon(.xMini)
IconDeprecated(.xMini)
}
.buttonStyle(.secondary)

case .back:

Button(action: { dismiss() }) {
Icon(.arrowLeft)
IconDeprecated(.arrowLeft)
}
.buttonStyle(.secondary)

Expand Down Expand Up @@ -112,14 +112,14 @@ extension ContentView {
case let .closeAction(action: action):

Button(action: action) {
Icon(.xMini)
IconDeprecated(.xMini)
}
.buttonStyle(.secondary)

case let .backAction(action: action):

Button(action: action) {
Icon(.arrowLeft)
IconDeprecated(.arrowLeft)
}
.buttonStyle(.secondary)

Expand All @@ -142,14 +142,14 @@ extension ContentView {
case .close:

Button(action: { dismiss() }) {
Icon(.xMini)
IconDeprecated(.xMini)
}
.buttonStyle(.secondary)

case .back:

Button(action: { dismiss() }) {
Icon(.arrowLeft)
IconDeprecated(.arrowLeft)
}
.buttonStyle(.secondary)

Expand Down Expand Up @@ -179,14 +179,14 @@ extension ContentView {
case let .closeAction(action: action):

Button(action: action) {
Icon(.xMini)
IconDeprecated(.xMini)
}
.buttonStyle(.secondary)

case let .backAction(action: action):

Button(action: action) {
Icon(.arrowLeft)
IconDeprecated(.arrowLeft)
}
.buttonStyle(.secondary)

Expand Down
10 changes: 5 additions & 5 deletions Sources/OversizeUI/Controls/GridSelect/GridSelect.swift
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public struct GridSelect<Element: Equatable, Content, Selection>: View
private var itemBackground: some View {
ZStack {
getSelection(selectionStyle: style.seletionStyle)
getSelectionIcon(icon: style.icon)
getSelectionIconDeprecated(icon: style.icon)
selectionView()
}
}
Expand Down Expand Up @@ -151,7 +151,7 @@ public struct GridSelect<Element: Equatable, Content, Selection>: View
}

@ViewBuilder
private func getSelectionIcon(icon: GridSelectSeletionIconStyle) -> some View {
private func getSelectionIconDeprecated(icon: GridSelectSeletionIconStyle) -> some View {
switch icon {
case .none:
EmptyView()
Expand All @@ -163,7 +163,7 @@ public struct GridSelect<Element: Equatable, Content, Selection>: View
Circle()
.foregroundColor(Color.surfacePrimary)
.shadowElevaton(.z2)
Icon(.checkMini, color: .onSurfaceHighEmphasis)
IconDeprecated(.checkMini, color: .onSurfaceHighEmphasis)
}.frame(width: Space.large.rawValue, height: Space.large.rawValue)
.padding(.small)
}
Expand Down Expand Up @@ -218,7 +218,7 @@ struct GridSelect_Preview: PreviewProvider {
GridSelect(items, selection: $selection,
content: { item, _ in
VStack {
Icon(.circle)
IconDeprecated(.circle)
Text(item)
}.padding()
})
Expand All @@ -227,7 +227,7 @@ struct GridSelect_Preview: PreviewProvider {
GridSelect(items, selection: $selection,
content: { item, _ in
VStack {
Icon(.circle)
IconDeprecated(.circle)
Text(item)
}.padding()
})
Expand Down
Loading

0 comments on commit 2987a96

Please sign in to comment.