diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..b70915f7 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2025 ComponentsKit + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index fd707200..4c080c49 100644 --- a/README.md +++ b/README.md @@ -2,16 +2,11 @@ ## Installation -Before proceeding with the installation, ensure that you are signed in to your GitHub account in Xcode, and that your account has access to the repository: - -1. From the **Xcode** menu, click on **Settings**, and access the **Account** section. -2. If you are not authorized, click on **+**, choose **GitHub**, and input your credentials. - -Once you are signed in to your GitHub account, you can add ComponentsKit to an Xcode project as a package dependency: +Add ComponentsKit to an Xcode project as a package dependency: 1. From the **File** menu, select **Add Package Dependencies...**. 2. Enter `https://github.com/componentskit/ComponentsKit` into the package repository URL text field. -3. Add **ComponentsKit** to your application. +3. Add **componentskit** to your application. ## Basic Usage diff --git a/Sources/ComponentsKit/Components/Checkbox/Models/CheckboxVM.swift b/Sources/ComponentsKit/Components/Checkbox/Models/CheckboxVM.swift index 37ffb131..56b824f4 100644 --- a/Sources/ComponentsKit/Components/Checkbox/Models/CheckboxVM.swift +++ b/Sources/ComponentsKit/Components/Checkbox/Models/CheckboxVM.swift @@ -119,7 +119,7 @@ extension CheckboxVM { func shouldUpdateSize(_ oldModel: Self) -> Bool { return self.size != oldModel.size } - func shouldUpadateLayout(_ oldModel: Self) -> Bool { + func shouldUpdateLayout(_ oldModel: Self) -> Bool { return self.size != oldModel.size || self.title.isNotNilAndEmpty && oldModel.title.isNilOrEmpty || self.title.isNilOrEmpty && oldModel.title.isNotNilAndEmpty diff --git a/Sources/ComponentsKit/Components/Checkbox/UKCheckbox.swift b/Sources/ComponentsKit/Components/Checkbox/UKCheckbox.swift index bf97064d..4a188c3f 100644 --- a/Sources/ComponentsKit/Components/Checkbox/UKCheckbox.swift +++ b/Sources/ComponentsKit/Components/Checkbox/UKCheckbox.swift @@ -155,7 +155,7 @@ open class UKCheckbox: UIView, UKComponent { self.checkboxContainerConstraints.width?.constant = self.model.checkboxSide self.setupCheckmarkLayer() } - if self.model.shouldUpadateLayout(oldModel) { + if self.model.shouldUpdateLayout(oldModel) { self.setNeedsLayout() self.invalidateIntrinsicContentSize() }