From 5f8c3b314d860f2623874410d49056b926fb828d Mon Sep 17 00:00:00 2001 From: Vladimir Kaltyrin Date: Mon, 9 Sep 2024 18:09:46 +0300 Subject: [PATCH] Release/04 09 2024 (#95) * chore: Added an initial Xcode project structure. Added license, readme. * fix(sdds-icore): Updated minimum deployment target * chore: Updated minimum deployment target * feat(sdds-icore): implemented building and archiving of XCFrameworks (#2) * feat(sdds-icore): added workflows to run SwiftLint and unit tests (#4) * Added swiftgen and added workflow to release icons (#8) * feat(sdds-icore): added workflow to publish icons release * feat(sdds-icore): added generation of assets * feat(sdds-icore): added swiftgen and added workflow to release icons (#8) * Added workflow to update icons (#5) * feat(sdds-icore): added workflows to release icons * feat(sdds-icore): added workflow to publish icons release * build: utilized ref from payload * build: added workflow to create and push release tag (#17) * build: added workflow to create and push release tag * build: set ubuntu instead of macos * build: bump version (#20) * chore: improved release name (#22) * feat(sdds-theme-builder): implemented macOS CLI utility for the tokens generation (#25) * feat(sdds-theme-builder): implemented color token generation (#26) * feat(sdds-theme-builder): shadows, shapes generation, tests, unpacking of theme (#27) * feat(sdds-theme-builder): added shadow, shapes token generation, improved color token generation, added support of light&dark theme * chore: added documentation * feat(sdds-theme-builder): improved stencil tempaltes * feat(sdds-theme-builder): implemented typography token generation * chore: updated xcodeproj * chore: added tokens to both targets * feat(sdds-theme-builder): added AdaptiveTypographyToken * chore: updated meta json naming * feat(sdds-theme-builder): implemented typography token generation * feat(sdds-theme-builder): added theme * feat(sdds-theme-builder): added stencil template to generate gradients * feat(sdds-theme-builder): added gradients generaton * feat(sdds-theme-builder): added tests for GradientContextBuilder * feat(sdds-theme-builder): added gradients to demo app * chore: rewrote bash scripts in ruby * chore: improved naming, divided stencil templates * chore: added tests for context builders * fix(sdds-theme-builder): updated scheme (#34) * feat(sdds-theme-builder): implemented gradient locations * feat(sdds-theme-builder): built themes for all the verticals * feat(sdds-theme-builder): added fallback color for colors and gradients * chore: fixed tests * feat(sdds-theme-builder): added fallback screen sizes for typography token * feat(sdds-theme-builder): implemented alpha channel parsing for colors and gradients * feat(sdds-theme-builder): improved logger * chore(sdds-theme-builder): fixed alpha channel * chore: fixed tests * Scheme validation (#42) * feat(sdds-theme-builder): implemented alpha channel parsing for colors and gradients * feat(sdds-theme-builder): improved logger * chore(sdds-theme-builder): fixed alpha channel * feat(sdds-theme-builder): added validation on stencil templates * chore: fixed code validation * feat(sdds-theme-builder): implemented meta validation * chore: clean code * chore: implemented tests * feat(sdds-theme-builder): regenerated themes, fixed templates * chore: removed default theme generation * fix(sdds-theme-builder): added two decimals format in code generation * chore: applied formatter to all stencil filter * feat(sdds-theme-builder): added github actions to release themes * chore: added script to build themes, updated themes versions * chore: fixed script * chore: updated workflow * chore: bump version * chore: create output directory automatically * Main to develop (#56) * Release SDDSIcons-v0.1.0 (#24) * chore: Added an initial Xcode project structure. Added license, readme. * fix(sdds-icore): Updated minimum deployment target * chore: Updated minimum deployment target * feat(sdds-icore): implemented building and archiving of XCFrameworks (#2) * feat(sdds-icore): added workflows to run SwiftLint and unit tests (#4) * Added swiftgen and added workflow to release icons (#8) * feat(sdds-icore): added workflow to publish icons release * feat(sdds-icore): added generation of assets * feat(sdds-icore): added swiftgen and added workflow to release icons (#8) * Added workflow to update icons (#5) * feat(sdds-icore): added workflows to release icons * feat(sdds-icore): added workflow to publish icons release * build: utilized ref from payload * build: added workflow to create and push release tag (#17) * build: added workflow to create and push release tag * build: set ubuntu instead of macos * build: bump version (#20) * chore: improved release name (#22) * feat(sdds-acore/icons): New icons were added from plasma v0.9.0 --------- Co-authored-by: Salute iOS Team * chore: bump icons versions * Release SDDSIcons-v0.2.0 (#55) * chore: Added an initial Xcode project structure. Added license, readme. * fix(sdds-icore): Updated minimum deployment target * chore: Updated minimum deployment target * feat(sdds-icore): implemented building and archiving of XCFrameworks (#2) * feat(sdds-icore): added workflows to run SwiftLint and unit tests (#4) * Added swiftgen and added workflow to release icons (#8) * feat(sdds-icore): added workflow to publish icons release * feat(sdds-icore): added generation of assets * feat(sdds-icore): added swiftgen and added workflow to release icons (#8) * Added workflow to update icons (#5) * feat(sdds-icore): added workflows to release icons * feat(sdds-icore): added workflow to publish icons release * build: utilized ref from payload * build: added workflow to create and push release tag (#17) * build: added workflow to create and push release tag * build: set ubuntu instead of macos * build: bump version (#20) * chore: improved release name (#22) * feat(sdds-theme-builder): implemented macOS CLI utility for the tokens generation (#25) * feat(sdds-theme-builder): implemented color token generation (#26) * feat(sdds-theme-builder): shadows, shapes generation, tests, unpacking of theme (#27) * feat(sdds-theme-builder): added shadow, shapes token generation, improved color token generation, added support of light&dark theme * chore: added documentation * feat(sdds-theme-builder): improved stencil tempaltes * feat(sdds-theme-builder): implemented typography token generation * chore: updated xcodeproj * chore: added tokens to both targets * feat(sdds-theme-builder): added AdaptiveTypographyToken * chore: updated meta json naming * feat(sdds-theme-builder): implemented typography token generation * feat(sdds-theme-builder): added theme * feat(sdds-theme-builder): added stencil template to generate gradients * feat(sdds-theme-builder): added gradients generaton * feat(sdds-theme-builder): added tests for GradientContextBuilder * feat(sdds-theme-builder): added gradients to demo app * chore: rewrote bash scripts in ruby * chore: improved naming, divided stencil templates * chore: added tests for context builders * fix(sdds-theme-builder): updated scheme (#34) * feat(sdds-theme-builder): implemented gradient locations * feat(sdds-theme-builder): built themes for all the verticals * feat(sdds-theme-builder): added fallback color for colors and gradients * chore: fixed tests * feat(sdds-theme-builder): added fallback screen sizes for typography token * feat(sdds-theme-builder): implemented alpha channel parsing for colors and gradients * feat(sdds-theme-builder): improved logger * chore(sdds-theme-builder): fixed alpha channel * chore: fixed tests * Scheme validation (#42) * feat(sdds-theme-builder): implemented alpha channel parsing for colors and gradients * feat(sdds-theme-builder): improved logger * chore(sdds-theme-builder): fixed alpha channel * feat(sdds-theme-builder): added validation on stencil templates * chore: fixed code validation * feat(sdds-theme-builder): implemented meta validation * chore: clean code * chore: implemented tests * feat(sdds-theme-builder): regenerated themes, fixed templates * chore: removed default theme generation * fix(sdds-theme-builder): added two decimals format in code generation * chore: applied formatter to all stencil filter * feat(sdds-theme-builder): added github actions to release themes * chore: added script to build themes, updated themes versions * chore: fixed script * chore: updated workflow * chore: bump version * feat(sdds-acore/icons): New icons were added from plasma v0.2.0 --------- Co-authored-by: Salute iOS Team * fix(sdds-icons): fixed generated icon assets --------- Co-authored-by: Salute iOS Team * fix(sdds-icons): fixed icons generation * chore: fixed tests * SDDSButton (#57) * chore: improved project structure * feat(sdds-components): added button * chore: updated previews * chore: added previews for states * chore: implemented button states * chore: added previews for circle and square buttons * chore: added comments, added basic button preview in the demo app * chore: fixed layout * chore: improved demo app * chore: added color schemes, updated docs * chore: reverted icons * chore: added ButtonTypographyConfiguration and ButtonSizeConfiguration protocols * chore: removed unused constants * feat(sdds-uikit): added iconHorizontalGap, titleHorizontalGap, fixed colors in demo app * fix(sdds-theme-builder): added count validation for colors and locations * chore: utilized GradientDictionaryKey * feat(sdds-uikit): added SDDSSwitch * chore: utilized let instead of bindings, removed `*md` from bundle * chore: added docs for SDDSButton * feat(sdds-uikit): implemented SDDSCheckbox and SDDSRadiobox * feat(sdds-uikit): implemented SDDSProgressBar * fix(sdds-theme-builder): added validations * chore: updated unit tests * feat(sdds-theme-builder): added hex validation * feat(sdds-theme-builder): added support of 3 byte hex * feat(sdds-uikit): added demo screens for switch, radiobox, checkbox, progress * feat(sdds-uikit): added Chip and ChipGroup * feat(sdds-uikit): implemented SDDSCheckboxGroup * chore: fixed padding * Added SPM support (#67) * feat(sdds-uikit): added spm support to sddsicons * feat(sdds-core): added spm * feat(sdds-uikit): added Package.swift for PlasmaB2CTheme (#69) * feat(sdds-uikit): added parent-child relationship for checkboxgroup (#68) * Feature/button accessibility (#70) * feat(sdds-uikit): added Package.swift for PlasmaB2CTheme * feat(sdds-uikit): added button accessability * feat(sdds-uikit): updated alignment (#72) * Merged main into develop (#74) * Release SDDSIcons-v0.1.0 (#24) * chore: Added an initial Xcode project structure. Added license, readme. * fix(sdds-icore): Updated minimum deployment target * chore: Updated minimum deployment target * feat(sdds-icore): implemented building and archiving of XCFrameworks (#2) * feat(sdds-icore): added workflows to run SwiftLint and unit tests (#4) * Added swiftgen and added workflow to release icons (#8) * feat(sdds-icore): added workflow to publish icons release * feat(sdds-icore): added generation of assets * feat(sdds-icore): added swiftgen and added workflow to release icons (#8) * Added workflow to update icons (#5) * feat(sdds-icore): added workflows to release icons * feat(sdds-icore): added workflow to publish icons release * build: utilized ref from payload * build: added workflow to create and push release tag (#17) * build: added workflow to create and push release tag * build: set ubuntu instead of macos * build: bump version (#20) * chore: improved release name (#22) * feat(sdds-acore/icons): New icons were added from plasma v0.9.0 --------- Co-authored-by: Salute iOS Team * chore: bump icons versions * Release SDDSIcons-v0.2.0 (#55) * chore: Added an initial Xcode project structure. Added license, readme. * fix(sdds-icore): Updated minimum deployment target * chore: Updated minimum deployment target * feat(sdds-icore): implemented building and archiving of XCFrameworks (#2) * feat(sdds-icore): added workflows to run SwiftLint and unit tests (#4) * Added swiftgen and added workflow to release icons (#8) * feat(sdds-icore): added workflow to publish icons release * feat(sdds-icore): added generation of assets * feat(sdds-icore): added swiftgen and added workflow to release icons (#8) * Added workflow to update icons (#5) * feat(sdds-icore): added workflows to release icons * feat(sdds-icore): added workflow to publish icons release * build: utilized ref from payload * build: added workflow to create and push release tag (#17) * build: added workflow to create and push release tag * build: set ubuntu instead of macos * build: bump version (#20) * chore: improved release name (#22) * feat(sdds-theme-builder): implemented macOS CLI utility for the tokens generation (#25) * feat(sdds-theme-builder): implemented color token generation (#26) * feat(sdds-theme-builder): shadows, shapes generation, tests, unpacking of theme (#27) * feat(sdds-theme-builder): added shadow, shapes token generation, improved color token generation, added support of light&dark theme * chore: added documentation * feat(sdds-theme-builder): improved stencil tempaltes * feat(sdds-theme-builder): implemented typography token generation * chore: updated xcodeproj * chore: added tokens to both targets * feat(sdds-theme-builder): added AdaptiveTypographyToken * chore: updated meta json naming * feat(sdds-theme-builder): implemented typography token generation * feat(sdds-theme-builder): added theme * feat(sdds-theme-builder): added stencil template to generate gradients * feat(sdds-theme-builder): added gradients generaton * feat(sdds-theme-builder): added tests for GradientContextBuilder * feat(sdds-theme-builder): added gradients to demo app * chore: rewrote bash scripts in ruby * chore: improved naming, divided stencil templates * chore: added tests for context builders * fix(sdds-theme-builder): updated scheme (#34) * feat(sdds-theme-builder): implemented gradient locations * feat(sdds-theme-builder): built themes for all the verticals * feat(sdds-theme-builder): added fallback color for colors and gradients * chore: fixed tests * feat(sdds-theme-builder): added fallback screen sizes for typography token * feat(sdds-theme-builder): implemented alpha channel parsing for colors and gradients * feat(sdds-theme-builder): improved logger * chore(sdds-theme-builder): fixed alpha channel * chore: fixed tests * Scheme validation (#42) * feat(sdds-theme-builder): implemented alpha channel parsing for colors and gradients * feat(sdds-theme-builder): improved logger * chore(sdds-theme-builder): fixed alpha channel * feat(sdds-theme-builder): added validation on stencil templates * chore: fixed code validation * feat(sdds-theme-builder): implemented meta validation * chore: clean code * chore: implemented tests * feat(sdds-theme-builder): regenerated themes, fixed templates * chore: removed default theme generation * fix(sdds-theme-builder): added two decimals format in code generation * chore: applied formatter to all stencil filter * feat(sdds-theme-builder): added github actions to release themes * chore: added script to build themes, updated themes versions * chore: fixed script * chore: updated workflow * chore: bump version * feat(sdds-acore/icons): New icons were added from plasma v0.2.0 --------- Co-authored-by: Salute iOS Team --------- Co-authored-by: Salute iOS Team * fix(sdds-core): fixed build script (#77) * feat(sdds-uikit): implemented radioboxgroup (#80) * Fixed chip behaviour (#81) * Feature/button previews (#78) * feat(sdds-uikit): added previews for buttons * chore: fixed checkbox icon * feat(sdds-uikit): added link preview for button * chore: added warning to indicate that font is not accessible * feat(sdds-uikit): added FillStyle to ProgressBar (#71) * feat(sdds-uikit): added FillStyle to ProgressBar * chore: clean code * chore: clean code * feat(sdds-uikit): implemented RoundedCornersMask * feat(sdds-core): improved fonts service, removed themestyle * feat(sdds-uikit): implemented radioboxgroup (#80) * fix(sdds-core): fixed project structure and versions * fix(sdds-uikit): fixed chip * chore: utilized spm, removed unused files * fix(sdds-uikit): replaced icons for raidoboxgroup * Main (#88) * SDDSComponents v.0.1.0 (#75) * chore: Added an initial Xcode project structure. Added license, readme. * fix(sdds-icore): Updated minimum deployment target * chore: Updated minimum deployment target * feat(sdds-icore): implemented building and archiving of XCFrameworks (#2) * feat(sdds-icore): added workflows to run SwiftLint and unit tests (#4) * Added swiftgen and added workflow to release icons (#8) * feat(sdds-icore): added workflow to publish icons release * feat(sdds-icore): added generation of assets * feat(sdds-icore): added swiftgen and added workflow to release icons (#8) * Added workflow to update icons (#5) * feat(sdds-icore): added workflows to release icons * feat(sdds-icore): added workflow to publish icons release * build: utilized ref from payload * build: added workflow to create and push release tag (#17) * build: added workflow to create and push release tag * build: set ubuntu instead of macos * build: bump version (#20) * chore: improved release name (#22) * feat(sdds-theme-builder): implemented macOS CLI utility for the tokens generation (#25) * feat(sdds-theme-builder): implemented color token generation (#26) * feat(sdds-theme-builder): shadows, shapes generation, tests, unpacking of theme (#27) * feat(sdds-theme-builder): added shadow, shapes token generation, improved color token generation, added support of light&dark theme * chore: added documentation * feat(sdds-theme-builder): improved stencil tempaltes * feat(sdds-theme-builder): implemented typography token generation * chore: updated xcodeproj * chore: added tokens to both targets * feat(sdds-theme-builder): added AdaptiveTypographyToken * chore: updated meta json naming * feat(sdds-theme-builder): implemented typography token generation * feat(sdds-theme-builder): added theme * feat(sdds-theme-builder): added stencil template to generate gradients * feat(sdds-theme-builder): added gradients generaton * feat(sdds-theme-builder): added tests for GradientContextBuilder * feat(sdds-theme-builder): added gradients to demo app * chore: rewrote bash scripts in ruby * chore: improved naming, divided stencil templates * chore: added tests for context builders * fix(sdds-theme-builder): updated scheme (#34) * feat(sdds-theme-builder): implemented gradient locations * feat(sdds-theme-builder): built themes for all the verticals * feat(sdds-theme-builder): added fallback color for colors and gradients * chore: fixed tests * feat(sdds-theme-builder): added fallback screen sizes for typography token * feat(sdds-theme-builder): implemented alpha channel parsing for colors and gradients * feat(sdds-theme-builder): improved logger * chore(sdds-theme-builder): fixed alpha channel * chore: fixed tests * Scheme validation (#42) * feat(sdds-theme-builder): implemented alpha channel parsing for colors and gradients * feat(sdds-theme-builder): improved logger * chore(sdds-theme-builder): fixed alpha channel * feat(sdds-theme-builder): added validation on stencil templates * chore: fixed code validation * feat(sdds-theme-builder): implemented meta validation * chore: clean code * chore: implemented tests * feat(sdds-theme-builder): regenerated themes, fixed templates * chore: removed default theme generation * fix(sdds-theme-builder): added two decimals format in code generation * chore: applied formatter to all stencil filter * feat(sdds-theme-builder): added github actions to release themes * chore: added script to build themes, updated themes versions * chore: fixed script * chore: updated workflow * chore: bump version * chore: create output directory automatically * Main to develop (#56) * Release SDDSIcons-v0.1.0 (#24) * chore: Added an initial Xcode project structure. Added license, readme. * fix(sdds-icore): Updated minimum deployment target * chore: Updated minimum deployment target * feat(sdds-icore): implemented building and archiving of XCFrameworks (#2) * feat(sdds-icore): added workflows to run SwiftLint and unit tests (#4) * Added swiftgen and added workflow to release icons (#8) * feat(sdds-icore): added workflow to publish icons release * feat(sdds-icore): added generation of assets * feat(sdds-icore): added swiftgen and added workflow to release icons (#8) * Added workflow to update icons (#5) * feat(sdds-icore): added workflows to release icons * feat(sdds-icore): added workflow to publish icons release * build: utilized ref from payload * build: added workflow to create and push release tag (#17) * build: added workflow to create and push release tag * build: set ubuntu instead of macos * build: bump version (#20) * chore: improved release name (#22) * feat(sdds-acore/icons): New icons were added from plasma v0.9.0 --------- Co-authored-by: Salute iOS Team * chore: bump icons versions * Release SDDSIcons-v0.2.0 (#55) * chore: Added an initial Xcode project structure. Added license, readme. * fix(sdds-icore): Updated minimum deployment target * chore: Updated minimum deployment target * feat(sdds-icore): implemented building and archiving of XCFrameworks (#2) * feat(sdds-icore): added workflows to run SwiftLint and unit tests (#4) * Added swiftgen and added workflow to release icons (#8) * feat(sdds-icore): added workflow to publish icons release * feat(sdds-icore): added generation of assets * feat(sdds-icore): added swiftgen and added workflow to release icons (#8) * Added workflow to update icons (#5) * feat(sdds-icore): added workflows to release icons * feat(sdds-icore): added workflow to publish icons release * build: utilized ref from payload * build: added workflow to create and push release tag (#17) * build: added workflow to create and push release tag * build: set ubuntu instead of macos * build: bump version (#20) * chore: improved release name (#22) * feat(sdds-theme-builder): implemented macOS CLI utility for the tokens generation (#25) * feat(sdds-theme-builder): implemented color token generation (#26) * feat(sdds-theme-builder): shadows, shapes generation, tests, unpacking of theme (#27) * feat(sdds-theme-builder): added shadow, shapes token generation, improved color token generation, added support of light&dark theme * chore: added documentation * feat(sdds-theme-builder): improved stencil tempaltes * feat(sdds-theme-builder): implemented typography token generation * chore: updated xcodeproj * chore: added tokens to both targets * feat(sdds-theme-builder): added AdaptiveTypographyToken * chore: updated meta json naming * feat(sdds-theme-builder): implemented typography token generation * feat(sdds-theme-builder): added theme * feat(sdds-theme-builder): added stencil template to generate gradients * feat(sdds-theme-builder): added gradients generaton * feat(sdds-theme-builder): added tests for GradientContextBuilder * feat(sdds-theme-builder): added gradients to demo app * chore: rewrote bash scripts in ruby * chore: improved naming, divided stencil templates * chore: added tests for context builders * fix(sdds-theme-builder): updated scheme (#34) * feat(sdds-theme-builder): implemented gradient locations * feat(sdds-theme-builder): built themes for all the verticals * feat(sdds-theme-builder): added fallback color for colors and gradients * chore: fixed tests * feat(sdds-theme-builder): added fallback screen sizes for typography token * feat(sdds-theme-builder): implemented alpha channel parsing for colors and gradients * feat(sdds-theme-builder): improved logger * chore(sdds-theme-builder): fixed alpha channel * chore: fixed tests * Scheme validation (#42) * feat(sdds-theme-builder): implemented alpha channel parsing for colors and gradients * feat(sdds-theme-builder): improved logger * chore(sdds-theme-builder): fixed alpha channel * feat(sdds-theme-builder): added validation on stencil templates * chore: fixed code validation * feat(sdds-theme-builder): implemented meta validation * chore: clean code * chore: implemented tests * feat(sdds-theme-builder): regenerated themes, fixed templates * chore: removed default theme generation * fix(sdds-theme-builder): added two decimals format in code generation * chore: applied formatter to all stencil filter * feat(sdds-theme-builder): added github actions to release themes * chore: added script to build themes, updated themes versions * chore: fixed script * chore: updated workflow * chore: bump version * feat(sdds-acore/icons): New icons were added from plasma v0.2.0 --------- Co-authored-by: Salute iOS Team * fix(sdds-icons): fixed generated icon assets --------- Co-authored-by: Salute iOS Team * fix(sdds-icons): fixed icons generation * chore: fixed tests * SDDSButton (#57) * chore: improved project structure * feat(sdds-components): added button * chore: updated previews * chore: added previews for states * chore: implemented button states * chore: added previews for circle and square buttons * chore: added comments, added basic button preview in the demo app * chore: fixed layout * chore: improved demo app * chore: added color schemes, updated docs * chore: reverted icons * chore: added ButtonTypographyConfiguration and ButtonSizeConfiguration protocols * chore: removed unused constants * feat(sdds-uikit): added iconHorizontalGap, titleHorizontalGap, fixed colors in demo app * fix(sdds-theme-builder): added count validation for colors and locations * chore: utilized GradientDictionaryKey * feat(sdds-uikit): added SDDSSwitch * chore: utilized let instead of bindings, removed `*md` from bundle * chore: added docs for SDDSButton * feat(sdds-uikit): implemented SDDSCheckbox and SDDSRadiobox * feat(sdds-uikit): implemented SDDSProgressBar * fix(sdds-theme-builder): added validations * chore: updated unit tests * feat(sdds-theme-builder): added hex validation * feat(sdds-theme-builder): added support of 3 byte hex * feat(sdds-uikit): added demo screens for switch, radiobox, checkbox, progress * feat(sdds-uikit): added Chip and ChipGroup * feat(sdds-uikit): implemented SDDSCheckboxGroup * chore: fixed padding * Added SPM support (#67) * feat(sdds-uikit): added spm support to sddsicons * feat(sdds-core): added spm * feat(sdds-uikit): added Package.swift for PlasmaB2CTheme (#69) * feat(sdds-uikit): added parent-child relationship for checkboxgroup (#68) * Feature/button accessibility (#70) * feat(sdds-uikit): added Package.swift for PlasmaB2CTheme * feat(sdds-uikit): added button accessability * feat(sdds-uikit): updated alignment (#72) * Merged main into develop (#74) * Release SDDSIcons-v0.1.0 (#24) * chore: Added an initial Xcode project structure. Added license, readme. * fix(sdds-icore): Updated minimum deployment target * chore: Updated minimum deployment target * feat(sdds-icore): implemented building and archiving of XCFrameworks (#2) * feat(sdds-icore): added workflows to run SwiftLint and unit tests (#4) * Added swiftgen and added workflow to release icons (#8) * feat(sdds-icore): added workflow to publish icons release * feat(sdds-icore): added generation of assets * feat(sdds-icore): added swiftgen and added workflow to release icons (#8) * Added workflow to update icons (#5) * feat(sdds-icore): added workflows to release icons * feat(sdds-icore): added workflow to publish icons release * build: utilized ref from payload * build: added workflow to create and push release tag (#17) * build: added workflow to create and push release tag * build: set ubuntu instead of macos * build: bump version (#20) * chore: improved release name (#22) * feat(sdds-acore/icons): New icons were added from plasma v0.9.0 --------- Co-authored-by: Salute iOS Team * chore: bump icons versions * Release SDDSIcons-v0.2.0 (#55) * chore: Added an initial Xcode project structure. Added license, readme. * fix(sdds-icore): Updated minimum deployment target * chore: Updated minimum deployment target * feat(sdds-icore): implemented building and archiving of XCFrameworks (#2) * feat(sdds-icore): added workflows to run SwiftLint and unit tests (#4) * Added swiftgen and added workflow to release icons (#8) * feat(sdds-icore): added workflow to publish icons release * feat(sdds-icore): added generation of assets * feat(sdds-icore): added swiftgen and added workflow to release icons (#8) * Added workflow to update icons (#5) * feat(sdds-icore): added workflows to release icons * feat(sdds-icore): added workflow to publish icons release * build: utilized ref from payload * build: added workflow to create and push release tag (#17) * build: added workflow to create and push release tag * build: set ubuntu instead of macos * build: bump version (#20) * chore: improved release name (#22) * feat(sdds-theme-builder): implemented macOS CLI utility for the tokens generation (#25) * feat(sdds-theme-builder): implemented color token generation (#26) * feat(sdds-theme-builder): shadows, shapes generation, tests, unpacking of theme (#27) * feat(sdds-theme-builder): added shadow, shapes token generation, improved color token generation, added support of light&dark theme * chore: added documentation * feat(sdds-theme-builder): improved stencil tempaltes * feat(sdds-theme-builder): implemented typography token generation * chore: updated xcodeproj * chore: added tokens to both targets * feat(sdds-theme-builder): added AdaptiveTypographyToken * chore: updated meta json naming * feat(sdds-theme-builder): implemented typography token generation * feat(sdds-theme-builder): added theme * feat(sdds-theme-builder): added stencil template to generate gradients * feat(sdds-theme-builder): added gradients generaton * feat(sdds-theme-builder): added tests for GradientContextBuilder * feat(sdds-theme-builder): added gradients to demo app * chore: rewrote bash scripts in ruby * chore: improved naming, divided stencil templates * chore: added tests for context builders * fix(sdds-theme-builder): updated scheme (#34) * feat(sdds-theme-builder): implemented gradient locations * feat(sdds-theme-builder): built themes for all the verticals * feat(sdds-theme-builder): added fallback color for colors and gradients * chore: fixed tests * feat(sdds-theme-builder): added fallback screen sizes for typography token * feat(sdds-theme-builder): implemented alpha channel parsing for colors and gradients * feat(sdds-theme-builder): improved logger * chore(sdds-theme-builder): fixed alpha channel * chore: fixed tests * Scheme validation (#42) * feat(sdds-theme-builder): implemented alpha channel parsing for colors and gradients * feat(sdds-theme-builder): improved logger * chore(sdds-theme-builder): fixed alpha channel * feat(sdds-theme-builder): added validation on stencil templates * chore: fixed code validation * feat(sdds-theme-builder): implemented meta validation * chore: clean code * chore: implemented tests * feat(sdds-theme-builder): regenerated themes, fixed templates * chore: removed default theme generation * fix(sdds-theme-builder): added two decimals format in code generation * chore: applied formatter to all stencil filter * feat(sdds-theme-builder): added github actions to release themes * chore: added script to build themes, updated themes versions * chore: fixed script * chore: updated workflow * chore: bump version * feat(sdds-acore/icons): New icons were added from plasma v0.2.0 --------- Co-authored-by: Salute iOS Team --------- Co-authored-by: Salute iOS Team * fix(sdds-core): fixed build script (#77) --------- Co-authored-by: Salute iOS Team * Release/sdds icons v0.3.0 (#84) * chore: Added an initial Xcode project structure. Added license, readme. * fix(sdds-icore): Updated minimum deployment target * chore: Updated minimum deployment target * feat(sdds-icore): implemented building and archiving of XCFrameworks (#2) * feat(sdds-icore): added workflows to run SwiftLint and unit tests (#4) * Added swiftgen and added workflow to release icons (#8) * feat(sdds-icore): added workflow to publish icons release * feat(sdds-icore): added generation of assets * feat(sdds-icore): added swiftgen and added workflow to release icons (#8) * Added workflow to update icons (#5) * feat(sdds-icore): added workflows to release icons * feat(sdds-icore): added workflow to publish icons release * build: utilized ref from payload * build: added workflow to create and push release tag (#17) * build: added workflow to create and push release tag * build: set ubuntu instead of macos * build: bump version (#20) * chore: improved release name (#22) * feat(sdds-theme-builder): implemented macOS CLI utility for the tokens generation (#25) * feat(sdds-theme-builder): implemented color token generation (#26) * feat(sdds-theme-builder): shadows, shapes generation, tests, unpacking of theme (#27) * feat(sdds-theme-builder): added shadow, shapes token generation, improved color token generation, added support of light&dark theme * chore: added documentation * feat(sdds-theme-builder): improved stencil tempaltes * feat(sdds-theme-builder): implemented typography token generation * chore: updated xcodeproj * chore: added tokens to both targets * feat(sdds-theme-builder): added AdaptiveTypographyToken * chore: updated meta json naming * feat(sdds-theme-builder): implemented typography token generation * feat(sdds-theme-builder): added theme * feat(sdds-theme-builder): added stencil template to generate gradients * feat(sdds-theme-builder): added gradients generaton * feat(sdds-theme-builder): added tests for GradientContextBuilder * feat(sdds-theme-builder): added gradients to demo app * chore: rewrote bash scripts in ruby * chore: improved naming, divided stencil templates * chore: added tests for context builders * fix(sdds-theme-builder): updated scheme (#34) * feat(sdds-theme-builder): implemented gradient locations * feat(sdds-theme-builder): built themes for all the verticals * feat(sdds-theme-builder): added fallback color for colors and gradients * chore: fixed tests * feat(sdds-theme-builder): added fallback screen sizes for typography token * feat(sdds-theme-builder): implemented alpha channel parsing for colors and gradients * feat(sdds-theme-builder): improved logger * chore(sdds-theme-builder): fixed alpha channel * chore: fixed tests * Scheme validation (#42) * feat(sdds-theme-builder): implemented alpha channel parsing for colors and gradients * feat(sdds-theme-builder): improved logger * chore(sdds-theme-builder): fixed alpha channel * feat(sdds-theme-builder): added validation on stencil templates * chore: fixed code validation * feat(sdds-theme-builder): implemented meta validation * chore: clean code * chore: implemented tests * feat(sdds-theme-builder): regenerated themes, fixed templates * chore: removed default theme generation * fix(sdds-theme-builder): added two decimals format in code generation * chore: applied formatter to all stencil filter * feat(sdds-theme-builder): added github actions to release themes * chore: added script to build themes, updated themes versions * chore: fixed script * chore: updated workflow * chore: bump version * chore: create output directory automatically * Main to develop (#56) * Release SDDSIcons-v0.1.0 (#24) * chore: Added an initial Xcode project structure. Added license, readme. * fix(sdds-icore): Updated minimum deployment target * chore: Updated minimum deployment target * feat(sdds-icore): implemented building and archiving of XCFrameworks (#2) * feat(sdds-icore): added workflows to run SwiftLint and unit tests (#4) * Added swiftgen and added workflow to release icons (#8) * feat(sdds-icore): added workflow to publish icons release * feat(sdds-icore): added generation of assets * feat(sdds-icore): added swiftgen and added workflow to release icons (#8) * Added workflow to update icons (#5) * feat(sdds-icore): added workflows to release icons * feat(sdds-icore): added workflow to publish icons release * build: utilized ref from payload * build: added workflow to create and push release tag (#17) * build: added workflow to create and push release tag * build: set ubuntu instead of macos * build: bump version (#20) * chore: improved release name (#22) * feat(sdds-acore/icons): New icons were added from plasma v0.9.0 --------- Co-authored-by: Salute iOS Team * chore: bump icons versions * Release SDDSIcons-v0.2.0 (#55) * chore: Added an initial Xcode project structure. Added license, readme. * fix(sdds-icore): Updated minimum deployment target * chore: Updated minimum deployment target * feat(sdds-icore): implemented building and archiving of XCFrameworks (#2) * feat(sdds-icore): added workflows to run SwiftLint and unit tests (#4) * Added swiftgen and added workflow to release icons (#8) * feat(sdds-icore): added workflow to publish icons release * feat(sdds-icore): added generation of assets * feat(sdds-icore): added swiftgen and added workflow to release icons (#8) * Added workflow to update icons (#5) * feat(sdds-icore): added workflows to release icons * feat(sdds-icore): added workflow to publish icons release * build: utilized ref from payload * build: added workflow to create and push release tag (#17) * build: added workflow to create and push release tag * build: set ubuntu instead of macos * build: bump version (#20) * chore: improved release name (#22) * feat(sdds-theme-builder): implemented macOS CLI utility for the tokens generation (#25) * feat(sdds-theme-builder): implemented color token generation (#26) * feat(sdds-theme-builder): shadows, shapes generation, tests, unpacking of theme (#27) * feat(sdds-theme-builder): added shadow, shapes token generation, improved color token generation, added support of light&dark theme * chore: added documentation * feat(sdds-theme-builder): improved stencil tempaltes * feat(sdds-theme-builder): implemented typography token generation * chore: updated xcodeproj * chore: added tokens to both targets * feat(sdds-theme-builder): added AdaptiveTypographyToken * chore: updated meta json naming * feat(sdds-theme-builder): implemented typography token generation * feat(sdds-theme-builder): added theme * feat(sdds-theme-builder): added stencil template to generate gradients * feat(sdds-theme-builder): added gradients generaton * feat(sdds-theme-builder): added tests for GradientContextBuilder * feat(sdds-theme-builder): added gradients to demo app * chore: rewrote bash scripts in ruby * chore: improved naming, divided stencil templates * chore: added tests for context builders * fix(sdds-theme-builder): updated scheme (#34) * feat(sdds-theme-builder): implemented gradient locations * feat(sdds-theme-builder): built themes for all the verticals * feat(sdds-theme-builder): added fallback color for colors and gradients * chore: fixed tests * feat(sdds-theme-builder): added fallback screen sizes for typography token * feat(sdds-theme-builder): implemented alpha channel parsing for colors and gradients * feat(sdds-theme-builder): improved logger * chore(sdds-theme-builder): fixed alpha channel * chore: fixed tests * Scheme validation (#42) * feat(sdds-theme-builder): implemented alpha channel parsing for colors and gradients * feat(sdds-theme-builder): improved logger * chore(sdds-theme-builder): fixed alpha channel * feat(sdds-theme-builder): added validation on stencil templates * chore: fixed code validation * feat(sdds-theme-builder): implemented meta validation * chore: clean code * chore: implemented tests * feat(sdds-theme-builder): regenerated themes, fixed templates * chore: removed default theme generation * fix(sdds-theme-builder): added two decimals format in code generation * chore: applied formatter to all stencil filter * feat(sdds-theme-builder): added github actions to release themes * chore: added script to build themes, updated themes versions * chore: fixed script * chore: updated workflow * chore: bump version * feat(sdds-acore/icons): New icons were added from plasma v0.2.0 --------- Co-authored-by: Salute iOS Team * fix(sdds-icons): fixed generated icon assets --------- Co-authored-by: Salute iOS Team * fix(sdds-icons): fixed icons generation * chore: fixed tests * SDDSButton (#57) * chore: improved project structure * feat(sdds-components): added button * chore: updated previews * chore: added previews for states * chore: implemented button states * chore: added previews for circle and square buttons * chore: added comments, added basic button preview in the demo app * chore: fixed layout * chore: improved demo app * chore: added color schemes, updated docs * chore: reverted icons * chore: added ButtonTypographyConfiguration and ButtonSizeConfiguration protocols * chore: removed unused constants * feat(sdds-uikit): added iconHorizontalGap, titleHorizontalGap, fixed colors in demo app * fix(sdds-theme-builder): added count validation for colors and locations * chore: utilized GradientDictionaryKey * feat(sdds-uikit): added SDDSSwitch * chore: utilized let instead of bindings, removed `*md` from bundle * chore: added docs for SDDSButton * feat(sdds-uikit): implemented SDDSCheckbox and SDDSRadiobox * feat(sdds-uikit): implemented SDDSProgressBar * fix(sdds-theme-builder): added validations * chore: updated unit tests * feat(sdds-theme-builder): added hex validation * feat(sdds-theme-builder): added support of 3 byte hex * feat(sdds-uikit): added demo screens for switch, radiobox, checkbox, progress * feat(sdds-uikit): added Chip and ChipGroup * feat(sdds-uikit): implemented SDDSCheckboxGroup * chore: fixed padding * Added SPM support (#67) * feat(sdds-uikit): added spm support to sddsicons * feat(sdds-core): added spm * feat(sdds-uikit): added Package.swift for PlasmaB2CTheme (#69) * feat(sdds-uikit): added parent-child relationship for checkboxgroup (#68) * Feature/button accessibility (#70) * feat(sdds-uikit): added Package.swift for PlasmaB2CTheme * feat(sdds-uikit): added button accessability * feat(sdds-uikit): updated alignment (#72) * Merged main into develop (#74) * Release SDDSIcons-v0.1.0 (#24) * chore: Added an initial Xcode project structure. Added license, readme. * fix(sdds-icore): Updated minimum deployment target * chore: Updated minimum deployment target * feat(sdds-icore): implemented building and archiving of XCFrameworks (#2) * feat(sdds-icore): added workflows to run SwiftLint and unit tests (#4) * Added swiftgen and added workflow to release icons (#8) * feat(sdds-icore): added workflow to publish icons release * feat(sdds-icore): added generation of assets * feat(sdds-icore): added swiftgen and added workflow to release icons (#8) * Added workflow to update icons (#5) * feat(sdds-icore): added workflows to release icons * feat(sdds-icore): added workflow to publish icons release * build: utilized ref from payload * build: added workflow to create and push release tag (#17) * build: added workflow to create and push release tag * build: set ubuntu instead of macos * build: bump version (#20) * chore: improved release name (#22) * feat(sdds-acore/icons): New icons were added from plasma v0.9.0 --------- Co-authored-by: Salute iOS Team * chore: bump icons versions * Release SDDSIcons-v0.2.0 (#55) * chore: Added an initial Xcode project structure. Added license, readme. * fix(sdds-icore): Updated minimum deployment target * chore: Updated minimum deployment target * feat(sdds-icore): implemented building and archiving of XCFrameworks (#2) * feat(sdds-icore): added workflows to run SwiftLint and unit tests (#4) * Added swiftgen and added workflow to release icons (#8) * feat(sdds-icore): added workflow to publish icons release * feat(sdds-icore): added generation of assets * feat(sdds-icore): added swiftgen and added workflow to release icons (#8) * Added workflow to update icons (#5) * feat(sdds-icore): added workflows to release icons * feat(sdds-icore): added workflow to publish icons release * build: utilized ref from payload * build: added workflow to create and push release tag (#17) * build: added workflow to create and push release tag * build: set ubuntu instead of macos * build: bump version (#20) * chore: improved release name (#22) * feat(sdds-theme-builder): implemented macOS CLI utility for the tokens generation (#25) * feat(sdds-theme-builder): implemented color token generation (#26) * feat(sdds-theme-builder): shadows, shapes generation, tests, unpacking of theme (#27) * feat(sdds-theme-builder): added shadow, shapes token generation, improved color token generation, added support of light&dark theme * chore: added documentation * feat(sdds-theme-builder): improved stencil tempaltes * feat(sdds-theme-builder): implemented typography token generation * chore: updated xcodeproj * chore: added tokens to both targets * feat(sdds-theme-builder): added AdaptiveTypographyToken * chore: updated meta json naming * feat(sdds-theme-builder): implemented typography token generation * feat(sdds-theme-builder): added theme * feat(sdds-theme-builder): added stencil template to generate gradients * feat(sdds-theme-builder): added gradients generaton * feat(sdds-theme-builder): added tests for GradientContextBuilder * feat(sdds-theme-builder): added gradients to demo app * chore: rewrote bash scripts in ruby * chore: improved naming, divided stencil templates * chore: added tests for context builders * fix(sdds-theme-builder): updated scheme (#34) * feat(sdds-theme-builder): implemented gradient locations * feat(sdds-theme-builder): built themes for all the verticals * feat(sdds-theme-builder): added fallback color for colors and gradients * chore: fixed tests * feat(sdds-theme-builder): added fallback screen sizes for typography token * feat(sdds-theme-builder): implemented alpha channel parsing for colors and gradients * feat(sdds-theme-builder): improved logger * chore(sdds-theme-builder): fixed alpha channel * chore: fixed tests * Scheme validation (#42) * feat(sdds-theme-builder): implemented alpha channel parsing for colors and gradients * feat(sdds-theme-builder): improved logger * chore(sdds-theme-builder): fixed alpha channel * feat(sdds-theme-builder): added validation on stencil templates * chore: fixed code validation * feat(sdds-theme-builder): implemented meta validation * chore: clean code * chore: implemented tests * feat(sdds-theme-builder): regenerated themes, fixed templates * chore: removed default theme generation * fix(sdds-theme-builder): added two decimals format in code generation * chore: applied formatter to all stencil filter * feat(sdds-theme-builder): added github actions to release themes * chore: added script to build themes, updated themes versions * chore: fixed script * chore: updated workflow * chore: bump version * feat(sdds-acore/icons): New icons were added from plasma v0.2.0 --------- Co-authored-by: Salute iOS Team --------- Co-authored-by: Salute iOS Team * fix(sdds-core): fixed build script (#77) * feat(sdds-uikit): implemented radioboxgroup (#80) * Fixed chip behaviour (#81) * Feature/button previews (#78) * feat(sdds-uikit): added previews for buttons * chore: fixed checkbox icon * feat(sdds-uikit): added link preview for button * chore: added warning to indicate that font is not accessible * feat(sdds-uikit): added FillStyle to ProgressBar (#71) * feat(sdds-uikit): added FillStyle to ProgressBar * chore: clean code * chore: clean code * feat(sdds-uikit): implemented RoundedCornersMask * feat(sdds-core): improved fonts service, removed themestyle * feat(sdds-uikit): implemented radioboxgroup (#80) * fix(sdds-core): fixed project structure and versions * fix(sdds-uikit): fixed chip * chore: utilized spm, removed unused files * fix(sdds-uikit): replaced icons for raidoboxgroup * feat(sdds-acore/icons): New icons were added from plasma v1.201.0 * chore: bump version --------- Co-authored-by: Salute iOS Team * Release/22 08 2024 (#85) * chore: Added an initial Xcode project structure. Added license, readme. * fix(sdds-icore): Updated minimum deployment target * chore: Updated minimum deployment target * feat(sdds-icore): implemented building and archiving of XCFrameworks (#2) * feat(sdds-icore): added workflows to run SwiftLint and unit tests (#4) * Added swiftgen and added workflow to release icons (#8) * feat(sdds-icore): added workflow to publish icons release * feat(sdds-icore): added generation of assets * feat(sdds-icore): added swiftgen and added workflow to release icons (#8) * Added workflow to update icons (#5) * feat(sdds-icore): added workflows to release icons * feat(sdds-icore): added workflow to publish icons release * build: utilized ref from payload * build: added workflow to create and push release tag (#17) * build: added workflow to create and push release tag * build: set ubuntu instead of macos * build: bump version (#20) * chore: improved release name (#22) * feat(sdds-theme-builder): implemented macOS CLI utility for the tokens generation (#25) * feat(sdds-theme-builder): implemented color token generation (#26) * feat(sdds-theme-builder): shadows, shapes generation, tests, unpacking of theme (#27) * feat(sdds-theme-builder): added shadow, shapes token generation, improved color token generation, added support of light&dark theme * chore: added documentation * feat(sdds-theme-builder): improved stencil tempaltes * feat(sdds-theme-builder): implemented typography token generation * chore: updated xcodeproj * chore: added tokens to both targets * feat(sdds-theme-builder): added AdaptiveTypographyToken * chore: updated meta json naming * feat(sdds-theme-builder): implemented typography token generation * feat(sdds-theme-builder): added theme * feat(sdds-theme-builder): added stencil template to generate gradients * feat(sdds-theme-builder): added gradients generaton * feat(sdds-theme-builder): added tests for GradientContextBuilder * feat(sdds-theme-builder): added gradients to demo app * chore: rewrote bash scripts in ruby * chore: improved naming, divided stencil templates * chore: added tests for context builders * fix(sdds-theme-builder): updated scheme (#34) * feat(sdds-theme-builder): implemented gradient locations * feat(sdds-theme-builder): built themes for all the verticals * feat(sdds-theme-builder): added fallback color for colors and gradients * chore: fixed tests * feat(sdds-theme-builder): added fallback screen sizes for typography token * feat(sdds-theme-builder): implemented alpha channel parsing for colors and gradients * feat(sdds-theme-builder): improved logger * chore(sdds-theme-builder): fixed alpha channel * chore: fixed tests * Scheme validation (#42) * feat(sdds-theme-builder): implemented alpha channel parsing for colors and gradients * feat(sdds-theme-builder): improved logger * chore(sdds-theme-builder): fixed alpha channel * feat(sdds-theme-builder): added validation on stencil templates * chore: fixed code validation * feat(sdds-theme-builder): implemented meta validation * chore: clean code * chore: implemented tests * feat(sdds-theme-builder): regenerated themes, fixed templates * chore: removed default theme generation * fix(sdds-theme-builder): added two decimals format in code generation * chore: applied formatter to all stencil filter * feat(sdds-theme-builder): added github actions to release themes * chore: added script to build themes, updated themes versions * chore: fixed script * chore: updated workflow * chore: bump version * chore: create output directory automatically * Main to develop (#56) * Release SDDSIcons-v0.1.0 (#24) * chore: Added an initial Xcode project structure. Added license, readme. * fix(sdds-icore): Updated minimum deployment target * chore: Updated minimum deployment target * feat(sdds-icore): implemented building and archiving of XCFrameworks (#2) * feat(sdds-icore): added workflows to run SwiftLint and unit tests (#4) * Added swiftgen and added workflow to release icons (#8) * feat(sdds-icore): added workflow to publish icons release * feat(sdds-icore): added generation of assets * feat(sdds-icore): added swiftgen and added workflow to release icons (#8) * Added workflow to update icons (#5) * feat(sdds-icore): added workflows to release icons * feat(sdds-icore): added workflow to publish icons release * build: utilized ref from payload * build: added workflow to create and push release tag (#17) * build: added workflow to create and push release tag * build: set ubuntu instead of macos * build: bump version (#20) * chore: improved release name (#22) * feat(sdds-acore/icons): New icons were added from plasma v0.9.0 --------- Co-authored-by: Salute iOS Team * chore: bump icons versions * Release SDDSIcons-v0.2.0 (#55) * chore: Added an initial Xcode project structure. Added license, readme. * fix(sdds-icore): Updated minimum deployment target * chore: Updated minimum deployment target * feat(sdds-icore): implemented building and archiving of XCFrameworks (#2) * feat(sdds-icore): added workflows to run SwiftLint and unit tests (#4) * Added swiftgen and added workflow to release icons (#8) * feat(sdds-icore): added workflow to publish icons release * feat(sdds-icore): added generation of assets * feat(sdds-icore): added swiftgen and added workflow to release icons (#8) * Added workflow to update icons (#5) * feat(sdds-icore): added workflows to release icons * feat(sdds-icore): added workflow to publish icons release * build: utilized ref from payload * build: added workflow to create and push release tag (#17) * build: added workflow to create and push release tag * build: set ubuntu instead of macos * build: bump version (#20) * chore: improved release name (#22) * feat(sdds-theme-builder): implemented macOS CLI utility for the tokens generation (#25) * feat(sdds-theme-builder): implemented color token generation (#26) * feat(sdds-theme-builder): shadows, shapes generation, tests, unpacking of theme (#27) * feat(sdds-theme-builder): added shadow, shapes token generation, improved color token generation, added support of light&dark theme * chore: added documentation * feat(sdds-theme-builder): improved stencil tempaltes * feat(sdds-theme-builder): implemented typography token generation * chore: updated xcodeproj * chore: added tokens to both targets * feat(sdds-theme-builder): added AdaptiveTypographyToken * chore: updated meta json naming * feat(sdds-theme-builder): implemented typography token generation * feat(sdds-theme-builder): added theme * feat(sdds-theme-builder): added stencil template to generate gradients * feat(sdds-theme-builder): added gradients generaton * feat(sdds-theme-builder): added tests for GradientContextBuilder * feat(sdds-theme-builder): added gradients to demo app * chore: rewrote bash scripts in ruby * chore: improved naming, divided stencil templates * chore: added tests for context builders * fix(sdds-theme-builder): updated scheme (#34) * feat(sdds-theme-builder): implemented gradient locations * feat(sdds-theme-builder): built themes for all the verticals * feat(sdds-theme-builder): added fallback color for colors and gradients * chore: fixed tests * feat(sdds-theme-builder): added fallback screen sizes for typography token * feat(sdds-theme-builder): implemented alpha channel parsing for colors and gradients * feat(sdds-theme-builder): improved logger * chore(sdds-theme-builder): fixed alpha channel * chore: fixed tests * Scheme validation (#42) * feat(sdds-theme-builder): implemented alpha channel parsing for colors and gradients * feat(sdds-theme-builder): improved logger * chore(sdds-theme-builder): fixed alpha channel * feat(sdds-theme-builder): added validation on stencil templates * chore: fixed code validation * feat(sdds-theme-builder): implemented meta validation * chore: clean code * chore: implemented tests * feat(sdds-theme-builder): regenerated themes, fixed templates * chore: removed default theme generation * fix(sdds-theme-builder): added two decimals format in code generation * chore: applied formatter to all stencil filter * feat(sdds-theme-builder): added github actions to release themes * chore: added script to build themes, updated themes versions * chore: fixed script * chore: updated workflow * chore: bump version * feat(sdds-acore/icons): New icons were added from plasma v0.2.0 --------- Co-authored-by: Salute iOS Team * fix(sdds-icons): fixed generated icon assets --------- Co-authored-by: Salute iOS Team * fix(sdds-icons): fixed icons generation * chore: fixed tests * SDDSButton (#57) * chore: improved project structure * feat(sdds-components): added button * chore: updated previews * chore: added previews for states * chore: implemented button states * chore: added previews for circle and square buttons * chore: added comments, added basic button preview in the demo app * chore: fixed layout * chore: improved demo app * chore: added color schemes, updated docs * chore: reverted icons * chore: added ButtonTypographyConfiguration and ButtonSizeConfiguration protocols * chore: removed unused constants * feat(sdds-uikit): added iconHorizontalGap, titleHorizontalGap, fixed colors in demo app * fix(sdds-theme-builder): added count validation for colors and locations * chore: utilized GradientDictionaryKey * feat(sdds-uikit): added SDDSSwitch * chore: utilized let instead of bindings, removed `*md` from bundle * chore: added docs for SDDSButton * feat(sdds-uikit): implemented SDDSCheckbox and SDDSRadiobox * feat(sdds-uikit): implemented SDDSProgressBar * fix(sdds-theme-builder): added validations * chore: updated unit tests * feat(sdds-theme-builder): added hex validation * feat(sdds-theme-builder): added support of 3 byte hex * feat(sdds-uikit): added demo screens for switch, radiobox, checkbox, progress * feat(sdds-uikit): added Chip and ChipGroup * feat(sdds-uikit): implemented SDDSCheckboxGroup * chore: fixed padding * Added SPM support (#67) * feat(sdds-uikit): added spm support to sddsicons * feat(sdds-core): added spm * feat(sdds-uikit): added Package.swift for PlasmaB2CTheme (#69) * feat(sdds-uikit): added parent-child relationship for checkboxgroup (#68) * Feature/button accessibility (#70) * feat(sdds-uikit): added Package.swift for PlasmaB2CTheme * feat(sdds-uikit): added button accessability * feat(sdds-uikit): updated alignment (#72) * Merged main into develop (#74) * Release SDDSIcons-v0.1.0 (#24) * chore: Added an initial Xcode project structure. Added license, readme. * fix(sdds-icore): Updated minimum deployment target * chore: Updated minimum deployment target * feat(sdds-icore): implemented building and archiving of XCFrameworks (#2) * feat(sdds-icore): added workflows to run SwiftLint and unit tests (#4) * Added swiftgen and added workflow to release icons (#8) * feat(sdds-icore): added workflow to publish icons release * feat(sdds-icore): added generation of assets * feat(sdds-icore): added swiftgen and added workflow to release icons (#8) * Added workflow to update icons (#5) * feat(sdds-icore): added workflows to release icons * feat(sdds-icore): added workflow to publish icons release * build: utilized ref from payload * build: added workflow to create and push release tag (#17) * build: added workflow to create and push release tag * build: set ubuntu instead of macos * build: bump version (#20) * chore: improved release name (#22) * feat(sdds-acore/icons): New icons were added from plasma v0.9.0 --------- Co-authored-by: Salute iOS Team * chore: bump icons versions * Release SDDSIcons-v0.2.0 (#55) * chore: Added an initial Xcode project structure. Added license, readme. * fix(sdds-icore): Updated minimum deployment target * chore: Updated minimum deployment target * feat(sdds-icore): implemented building and archiving of XCFrameworks (#2) * feat(sdds-icore): added workflows to run SwiftLint and unit tests (#4) * Added swiftgen and added workflow to release icons (#8) * feat(sdds-icore): added workflow to publish icons release * feat(sdds-icore): added generation of assets * feat(sdds-icore): added swiftgen and added workflow to release icons (#8) * Added workflow to update icons (#5) * feat(sdds-icore): added workflows to release icons * feat(sdds-icore): added workflow to publish icons release * build: utilized ref from payload * build: added workflow to create and push release tag (#17) * build: added workflow to create and push release tag * build: set ubuntu instead of macos * build: bump version (#20) * chore: improved release name (#22) * feat(sdds-theme-builder): implemented macOS CLI utility for the tokens generation (#25) * feat(sdds-theme-builder): implemented color token generation (#26) * feat(sdds-theme-builder): shadows, shapes generation, tests, unpacking of theme (#27) * feat(sdds-theme-builder): added shadow, shapes token generation, improved color token generation, added support of light&dark theme * chore: added documentation * feat(sdds-theme-builder): improved stencil tempaltes * feat(sdds-theme-builder): implemented typography token generation * chore: updated xcodeproj * chore: added tokens to both targets * feat(sdds-theme-builder): added AdaptiveTypographyToken * chore: updated meta json naming * feat(sdds-theme-builder): implemented typography token generation * feat(sdds-theme-builder): added theme * feat(sdds-theme-builder): added stencil template to generate gradients * feat(sdds-theme-builder): added gradients generaton * feat(sdds-theme-builder): added tests for GradientContextBuilder * feat(sdds-theme-builder): added gradients to demo app * chore: rewrote bash scripts in ruby * chore: improved naming, divided stencil templates * chore: added tests for context builders * fix(sdds-theme-builder): updated scheme (#34) * feat(sdds-theme-builder): implemented gradient locations * feat(sdds-theme-builder): built themes for all the verticals * feat(sdds-theme-builder): added fallback color for colors and gradients * chore: fixed tests * feat(sdds-theme-builder): added fallback screen sizes for typography token * feat(sdds-theme-builder): implemented alpha channel parsing for colors and gradients * feat(sdds-theme-builder): improved logger * chore(sdds-theme-builder): fixed alpha channel * chore: fixed tests * Scheme validation (#42) * feat(sdds-theme-builder): implemented alpha channel parsing for colors and gradients * feat(sdds-theme-builder): improved logger * chore(sdds-theme-builder): fixed alpha channel * feat(sdds-theme-builder): added validation on stencil templates * chore: fixed code validation * feat(sdds-theme-builder): implemented meta validation * chore: clean code * chore: implemented tests * feat(sdds-theme-builder): regenerated themes, fixed templates * chore: removed default theme generation * fix(sdds-theme-builder): added two decimals format in code generation * chore: applied formatter to all stencil filter * feat(sdds-theme-builder): added github actions to release themes * chore: added script to build themes, updated themes versions * chore: fixed script * chore: updated workflow * chore: bump version * feat(sdds-acore/icons): New icons were added from plasma v0.2.0 --------- Co-authored-by: Salute iOS Team --------- Co-authored-by: Salute iOS Team * fix(sdds-core): fixed build script (#77) * feat(sdds-uikit): implemented radioboxgroup (#80) * Fixed chip behaviour (#81) * Feature/button previews (#78) * feat(sdds-uikit): added previews for buttons * chore: fixed checkbox icon * feat(sdds-uikit): added link preview for button * chore: added warning to indicate that font is not accessible * feat(sdds-uikit): added FillStyle to ProgressBar (#71) * feat(sdds-uikit): added FillStyle to ProgressBar * chore: clean code * chore: clean code * feat(sdds-uikit): implemented RoundedCornersMask * feat(sdds-core): improved fonts service, removed themestyle * feat(sdds-uikit): implemented radioboxgroup (#80) * fix(sdds-core): fixed project structure and versions * fix(sdds-uikit): fixed chip * chore: utilized spm, removed unused files * fix(sdds-uikit): replaced icons for raidoboxgroup * feat(sdds-core): added build script * fix(sdds-uikit): fixed chipgroup layout --------- Co-authored-by: Salute iOS Team --------- Co-authored-by: Salute iOS Team chore: fixed release script * feat(sdds-uikit): implemented default theme for certain components SDDSComponents v.0.1.0 (#75) * chore: Added an initial Xcode project structure. Added license, readme. * fix(sdds-icore): Updated minimum deployment target * chore: Updated minimum deployment target * feat(sdds-icore): implemented building and archiving of XCFrameworks (#2) * feat(sdds-icore): added workflows to run SwiftLint and unit tests (#4) * Added swiftgen and added workflow to release icons (#8) * feat(sdds-icore): added workflow to publish icons release * feat(sdds-icore): added generation of assets * feat(sdds-icore): added swiftgen and added workflow to release icons (#8) * Added workflow to update icons (#5) * feat(sdds-icore): added workflows to release icons * feat(sdds-icore): added workflow to publish icons release * build: utilized ref from payload * build: added workflow to create and push release tag (#17) * build: added workflow to create and push release tag * build: set ubuntu instead of macos * build: bump version (#20) * chore: improved release name (#22) * feat(sdds-theme-builder): implemented macOS CLI utility for the tokens generation (#25) * feat(sdds-theme-builder): implemented color token generation (#26) * feat(sdds-theme-builder): shadows, shapes generation, tests, unpacking of theme (#27) * feat(sdds-theme-builder): added shadow, shapes token generation, improved color token generation, added support of light&dark theme * chore: added documentation * feat(sdds-theme-builder): improved stencil tempaltes * feat(sdds-theme-builder): implemented typography token generation * chore: updated xcodeproj * chore: added tokens to both targets * feat(sdds-theme-builder): added AdaptiveTypographyToken * chore: updated meta json naming * feat(sdds-theme-builder): implemented typography token generation * feat(sdds-theme-builder): added theme * feat(sdds-theme-builder): added stencil template to generate gradients * feat(sdds-theme-builder): added gradients generaton * feat(sdds-theme-builder): added tests for GradientContextBuilder * feat(sdds-theme-builder): added gradients to demo app * chore: rewrote bash scripts in ruby * chore: improved naming, divided stencil templates * chore: added tests for context builders * fix(sdds-theme-builder): updated scheme (#34) * feat(sdds-theme-builder): implemented gradient locations * feat(sdds-theme-builder): built themes for all the verticals * feat(sdds-theme-builder): added fallback color for colors and gradients * chore: fixed tests * feat(sdds-theme-builder): added fallback screen sizes for typography token * feat(sdds-theme-builder): implemented alpha channel parsing for colors and gradients * feat(sdds-theme-builder): improved logger * chore(sdds-theme-builder): fixed alpha channel * chore: fixed tests * Scheme validation (#42) * feat(sdds-theme-builder): implemented alpha channel parsing for colors and gradients * feat(sdds-theme-builder): improved logger * chore(sdds-theme-builder): fixed alpha channel * feat(sdds-theme-builder): added validation on stencil templates * chore: fixed code validation * feat(sdds-theme-builder): implemented meta validation * chore: clean code * chore: implemented tests * feat(sdds-theme-builder): regenerated themes, fixed templates * chore: removed default theme generation * fix(sdds-theme-builder): added two decimals format in code generation * chore: applied formatter to all stencil filter * feat(sdds-theme-builder): added github actions to release themes * chore: added script to build themes, updated themes versions * chore: fixed script * chore: updated workflow * chore: bump version * chore: create output directory automatically * Main to develop (#56) * Release SDDSIcons-v0.1.0 (#24) * chore: Added an initial Xcode project structure. Added license, readme. * fix(sdds-icore): Updated minimum deployment target * chore: Updated minimum deployment target * feat(sdds-icore): implemented building and archiving of XCFrameworks (#2) * feat(sdds-icore): added workflows to run SwiftLint and unit tests (#4) * Added swiftgen and added workflow to release icons (#8) * feat(sdds-icore): added workflow to publish icons release * feat(sdds-icore): added generation of assets * feat(sdds-icore): added swiftgen and added workflow to release icons (#8) * Added workflow to update icons (#5) * feat(sdds-icore): added workflows to release icons * feat(sdds-icore): added workflow to publish icons release * build: utilized ref from payload * build: added workflow to create and push release tag (#17) * build: added workflow to create and push release tag * build: set ubuntu instead of macos * build: bump version (#20) * chore: improved release name (#22) * feat(sdds-acore/icons): New icons were added from plasma v0.9.0 --------- Co-authored-by: Salute iOS Team * chore: bump icons versions * Release SDDSIcons-v0.2.0 (#55) * chore: Added an initial Xcode project structure. Added license, readme. * fix(sdds-icore): Updated minimum deployment target * chore: Updated minimum deployment target * feat(sdds-icore): implemented building and archiving of XCFrameworks (#2) * feat(sdds-icore): added workflows to run SwiftLint and unit tests (#4) * Added swiftgen and added workflow to release icons (#8) * feat(sdds-icore): added workflow to publish icons release * feat(sdds-icore): added generation of assets * feat(sdds-icore): added swiftgen and added workflow to release icons (#8) * Added workflow to update icons (#5) * feat(sdds-icore): added workflows to release icons * feat(sdds-icore): added workflow to publish icons release * build: utilized ref from payload * build: added workflow to create and push release tag (#17) * build: added workflow to create and push release tag * build: set ubuntu instead of macos * build: bump version (#20) * chore: improved release name (#22) * feat(sdds-theme-builder): implemented macOS CLI utility for the tokens generation (#25) * feat(sdds-theme-builder): implemented color token generation (#26) * feat(sdds-theme-builder): shadows, shapes generation, tests, unpacking of theme (#27) * feat(sdds-theme-builder): added shadow, shapes token generation, improved color token generation, added support of light&dark theme * chore: added documentation * feat(sdds-theme-builder): improved stencil tempaltes * feat(sdds-theme-builder): implemented typography token generation * chore: updated xcodeproj * chore: added tokens to both targets * feat(sdds-theme-builder): added AdaptiveTypographyToken * chore: updated meta json naming * feat(sdds-theme-builder): implemented typography token generation * feat(sdds-theme-builder): added theme * feat(sdds-theme-builder): added stencil template to generate gradients * feat(sdds-theme-builder): added gradients generaton * feat(sdds-theme-builder): added tests for GradientContextBuilder * feat(sdds-theme-builder): added gradients to demo app * chore: rewrote bash scripts in ruby * chore: improved naming, divided stencil templates * chore: added tests for context builders * fix(sdds-theme-builder): updated scheme (#34) * feat(sdds-theme-builder): implemented gradient locations * feat(sdds-theme-builder): built themes for all the verticals * feat(sdds-theme-builder): added fallback color for colors and gradients * chore: fixed tests * feat(sdds-theme-builder): added fallback screen sizes for typography token * feat(sdds-theme-builder): implemented alpha channel parsing for colors and gradients * feat(sdds-theme-builder): improved logger * chore(sdds-theme-builder): fixed alpha channel * chore: fixed tests * Scheme validation (#42) * feat(sdds-theme-builder): implemented alpha channel parsing for colors and gradients * feat(sdds-theme-builder): improved logger * chore(sdds-theme-builder): fixed alpha channel * feat(sdds-theme-builder): added validation on stencil templates * chore: fixed code validation * feat(sdds-theme-builder): implemented meta validation * chore: clean code * chore: implemented tests * feat(sdds-theme-builder): regenerated themes, fixed templates * chore: removed default theme generation * fix(sdds-theme-builder): added two decimals format in code generation * chore: applied formatter to all stencil filter * feat(sdds-theme-builder): added github actions to release themes * chore: added script to build themes, updated themes versions * chore: fixed script * chore: updated workflow * chore: bump version * feat(sdds-acore/icons): New icons were added from plasma v0.2.0 --------- Co-authored-by: Salute iOS Team * fix(sdds-icons): fixed generated icon assets --------- Co-authored-by: Salute iOS Team * fix(sdds-icons): fixed icons generation * chore: fixed tests * SDDSButton (#57) * chore: improved project structure * feat(sdds-components): added button * chore: updated previews * chore: added previews for states * chore: implemented button states * chore: added previews for circle and square buttons * chore: added comments, added basic button preview in the demo app * chore: fixed layout * chore: improved demo app * chore: added color schemes, updated docs * chore: reverted icons * chore: added ButtonTypographyConfiguration and ButtonSizeConfiguration protocols * chore: removed unused constants * feat(sdds-uikit): added iconHorizontalGap, titleHorizontalGap, fixed colors in demo app * fix(sdds-theme-builder): added count validation for colors and locations * chore: utilized GradientDictionaryKey * feat(sdds-uikit): added SDDSSwitch * chore: utilized let instead of bindings, removed `*md` from bundle * chore: added docs for SDDSButton * feat(sdds-uikit): implemented SDDSCheckbox and SDDSRadiobox * feat(sdds-uikit): implemented SDDSProgressBar * fix(sdds-theme-builder): added validations * chore: updated unit tests * feat(sdds-theme-builder): added hex validation * feat(sdds-theme-builder): added support of 3 byte hex * feat(sdds-uikit): added demo screens for switch, radiobox, checkbox, progress * feat(sdds-uikit): added Chip and ChipGroup * feat(sdds-uikit): implemented SDDSCheckboxGroup * chore: fixed padding * Added SPM support (#67) * feat(sdds-uikit): added spm support to sddsicons * feat(sdds-core): added spm * feat(sdds-uikit): added Package.swift for PlasmaB2CTheme (#69) * feat(sdds-uikit): added parent-child relationship for checkboxgroup (#68) * Feature/button accessibility (#70) * feat(sdds-uikit): added Package.swift for PlasmaB2CTheme * feat(sdds-uikit): added button accessability * feat(sdds-uikit): updated alignment (#72) * Merged main into develop (#74) * Release SDDSIcons-v0.1.0 (#24) * chore: Added an initial Xcode project structure. Added license, readme. * fix(sdds-icore): Updated minimum deployment target * chore: Updated minimum deployment target * feat(sdds-icore): implemented building and archiving of XCFrameworks (#2) * feat(sdds-icore): added workflows to run SwiftLint and unit tests (#4) * Added swiftgen and added workflow to release icons (#8) * feat(sdds-icore): added workflow to publish icons release * feat(sdds-icore): added generation of assets * feat(sdds-icore): added swiftgen and added workflow to release icons (#8) * Added workflow to update icons (#5) * feat(sdds-icore): added workflows to release icons * feat(sdds-icore): added workflow to publish icons release * build: utilized ref from payload * build: added workflow to create and push release tag (#17) * build: added workflow to create and push release tag * build: set ubuntu instead of macos * build: bump version (#20) * chore: improved release name (#22) * feat(sdds-acore/icons): New icons were added from plasma v0.9.0 --------- Co-authored-by: Salute iOS Team * chore: bump icons versions * Release SDDSIcons-v0.2.0 (#55) * chore: Added an initial Xcode project structure. Added license, readme. * fix(sdds-icore): Updated minimum deployment target * chore: Updated minimum deployment target * feat(sdds-icore): implemented building and archiving of XCFrameworks (#2) * feat(sdds-icore): added workflows to run SwiftLint and unit tests (#4) * Added swiftgen and added workflow to release icons (#8) * feat(sdds-icore): added workflow to publish icons release * feat(sdds-icore): added generation of assets * feat(sdds-icore): added swiftgen and added workflow to release icons (#8) * Added workflow to update icons (#5) * feat(sdds-icore): added workflows to release icons * feat(sdds-icore): added workflow to publish icons release * build: utilized ref from payload * build: added workflow to create and push release tag (#17) * build: added workflow to create and push release tag * build: set ubuntu instead of macos * build: bump version (#20) * chore: improved release name (#22) * feat(sdds-theme-builder): implemented macOS CLI utility for the tokens generation (#25) * feat(sdds-theme-builder): implemented color token generation (#26) * feat(sdds-theme-builder): shadows, shapes generation, tests, unpacking of theme (#27) * feat(sdds-theme-builder): added shadow, shapes token generation, improved color token generation, added support of light&dark theme * chore: added documentation * feat(sdds-theme-builder): improved stencil tempaltes * feat(sdds-theme-builder): implemented typography token generation * chore: updated xcodeproj * chore: added tokens to both targets * feat(sdds-theme-builder): added AdaptiveTypographyToken * chore: updated meta json naming * feat(sdds-theme-builder): implemented typography token generation * feat(sdds-theme-builder): added theme * feat(sdds-theme-builder): added stencil template to generate gradients * feat(sdds-theme-builder): added gradients generaton * feat(sdds-theme-builder): added tests for GradientContextBuilder * feat(sdds-theme-builder): added gradients to demo app * chore: rewrote bash scripts in ruby * chore: improved naming, divided stencil templates * chore: added tests for context builders * fix(sdds-theme-builder): updated scheme (#34) * feat(sdds-theme-builder): implemented gradient locations * feat(sdds-theme-builder): built themes for all the verticals * feat(sdds-theme-builder): added fallback color for colors and gradients * chore: fixed tests * feat(sdds-theme-builder): added fallback screen sizes for typography token * feat(sdds-theme-builder): implemented alpha channel parsing for colors and gradients * feat(sdds-theme-builder): improved logger * chore(sdds-theme-builder): fixed alpha channel * chore: fixed tests * Scheme validation (#42) * feat(sdds-theme-builder): implemented alpha channel parsing for colors and gradients * feat(sdds-theme-builder): improved logger * chore(sdds-theme-builder): fixed alpha channel * feat(sdds-theme-builder): added validation on stencil templates * chore: fixed code validation * feat(sdds-theme-builder): implemented meta validation * chore: clean code * chore: implemented tests * feat(sdds-theme-builder): regenerated themes, fixed templates * chore: removed default theme generation * fix(sdds-theme-builder): added two decimals format in code generation * chore: applied formatter to all stencil filter * feat(sdds-theme-builder): added github actions to release themes * chore: added script to build themes, updated themes versions * chore: fixed script * chore: updated workflow * chore: bump version * feat(sdds-acore/icons): New icons were added from plasma v0.2.0 --------- Co-authored-by: Salute iOS Team --------- Co-authored-by: Salute iOS Team * fix(sdds-core): fixed build script (#77) --------- Co-authored-by: Salute iOS Team Release/sdds icons v0.3.0 (#84) * chore: Added an initial Xcode project structure. Added license, readme. * fix(sdds-icore): Updated minimum deployment target * chore: Updated minimum deployment target * feat(sdds-icore): implemented building and archiving of XCFrameworks (#2) * feat(sdds-icore): added workflows to run SwiftLint and unit tests (#4) * Added swiftgen and added workflow to release icons (#8) * feat(sdds-icore): added workflow to publish icons release * feat(sdds-icore): added generation of assets * feat(sdds-icore): added swiftgen and added workflow to release icons (#8) * Added workflow to update icons (#5) * feat(sdds-icore): added workflows to release icons * feat(sdds-icore): added workflow to publish icons release * build: utilized ref from payload * build: added workflow to create and push release tag (#17) * build: added workflow to create and push release tag * build: set ubuntu instead of macos * build: bump version (#20) * chore: improved release name (#22) * feat(sdds-theme-builder): implemented macOS CLI utility for the tokens generation (#25) * feat(sdds-theme-builder): implemented color token generation (#26) * feat(sdds-theme-builder): shadows, shapes generation, tests, unpacking of theme (#27) * feat(sdds-theme-builder): added shadow, shapes token generation, improved color token generation, added support of light&dark theme * chore: added documentation * feat(sdds-theme-builder): improved stencil tempaltes * feat(sdds-theme-builder): implemented typography token generation * chore: updated xcodeproj * chore: added tokens to both targets * feat(sdds-theme-builder): added AdaptiveTypographyToken * chore: updated meta json naming * feat(sdds-theme-builder): implemented typography token generation * feat(sdds-theme-builder): added theme * feat(sdds-theme-builder): added stencil template to generate gradients * feat(sdds-theme-builder): added gradients generaton * feat(sdds-theme-builder): added tests for GradientContextBuilder * feat(sdds-theme-builder): added gradients to demo app * chore: rewrote bash scripts in ruby * chore: improved naming, divided stencil templates * chore: added tests for context builders * fix(sdds-theme-builder): updated scheme (#34) * feat(sdds-theme-builder): implemented gradient locations * feat(sdds-theme-builder): built themes for all the verticals * feat(sdds-theme-builder): added fallback color for colors and gradients * chore: fixed tests * feat(sdds-theme-builder): added fallback screen sizes for typography token * feat(sdds-theme-builder): implemented alpha channel parsing for colors and gradients * feat(sdds-theme-builder): improved logger * chore(sdds-theme-builder): fixed alpha channel * chore: fixed tests * Scheme validation (#42) * feat(sdds-theme-builder): implemented alpha channel parsing for colors and gradients * feat(sdds-theme-builder): improved logger * chore(sdds-theme-builder): fixed alpha channel * feat(sdds-theme-builder): added validation on stencil templates * chore: fixed code validation * feat(sdds-theme-builder): implemented meta validation * chore: clean code * chore: implemented tests * feat(sdds-theme-builder): regenerated themes, fixed templates * chore: removed default theme generation * fix(sdds-theme-builder): added two decimals format in code generation * chore: applied formatter to all stencil filter * feat(sdds-theme-builder): added github actions to release themes * chore: added script to build themes, updated themes versions * chore: fixed script * chore: updated workflow * chore: bump version * chore: create output directory automatically * Main to develop (#56) * Release SDDSIcons-v0.1.0 (#24) * chore: Added an initial Xcode project structure. Added license, readme. * fix(sdds-icore): Updated minimum deployment target * chore: Updated minimum deployment target * feat(sdds-icore): implemented building and archiving of XCFrameworks (#2) * feat(sdds-icore): added workflows to run SwiftLint and unit tests (#4) * Added swiftgen and added workflow to release icons (#8) * feat(sdds-icore): added workflow to publish icons release * feat(sdds-icore): added generation of assets * feat(sdds-icore): added swiftgen and added workflow to release icons (#8) * Added workflow to update icons (#5) * feat(sdds-icore): added workflows to release icons * feat(sdds-icore): added workflow to publish icons release * build: utilized ref from payload * build: added workflow to create and push release tag (#17) * build: added workflow to create and push release tag * build: set ubuntu instead of macos * build: bump version (#20) * chore: improved release name (#22) * feat(sdds-acore/icons): New icons were added from plasma v0.9.0 --------- Co-authored-by: Salute iOS Team * chore: bump icons versions * Release SDDSIcons-v0.2.0 (#55) * chore: Added an initial Xcode project structure. Added license, readme. * fix(sdds-icore): Updated minimum deployment target * chore: Updated minimum deployment target * feat(sdds-icore): implemented building and archiving of XCFrameworks (#2) * feat(sdds-icore): added workflows to run SwiftLint and unit tests (#4) * Added swiftgen and added workflow to release icons (#8) * feat(sdds-icore): added workflow to publish icons release * feat(sdds-icore): added generation of assets * feat(sdds-icore): added swiftgen and added workflow to release icons (#8) * Added workflow to update icons (#5) * feat(sdds-icore): added workflows to release icons * feat(sdds-icore): added workflow to publish icons release * build: utilized ref from payload * build: added workflow to create and push release tag (#17) * build: added workflow to create and push release tag * build: set ubuntu instead of macos * build: bump version (#20) * chore: improved release name (#22) * feat(sdds-theme-builder): implemented macOS CLI utility for the tokens generation (#25) * feat(sdds-theme-builder): implemented color token generation (#26) * feat(sdds-theme-builder): shadows, shapes generation, tests, unpacking of theme (#27) * feat(sdds-theme-builder): added shadow, shapes token generation, improved color token generation, added support of light&dark theme * chore: added documentation * feat(sdds-theme-builder): improved stencil tempaltes * feat(sdds-theme-builder): implemented typography token generation * chore: updated xcodeproj * chore: added tokens to both targets * feat(sdds-theme-builder): added AdaptiveTypographyToken * chore: updated meta json naming * feat(sdds-theme-builder): implemented typography token generation * feat(sdds-theme-builder): added theme * feat(sdds-theme-builder): added stencil template to generate gradients * feat(sdds-theme-builder): added gradients generaton * feat(sdds-theme-builder): added tests for GradientContextBuilder * feat(sdds-theme-builder): added gradients to demo app * chore: rewrote bash scripts in ruby * chore: improved naming, divided stencil templates * chore: added tests for context builders * fix(sdds-theme-builder): updated scheme (#34) * feat(sdds-theme-builder): implemented gradient locations * feat(sdds-theme-builder): built themes for all the verticals * feat(sdds-theme-builder): added fallback color for colors and gradients * chore: fixed tests * feat(sdds-theme-builder): added fallback screen sizes for typography token * feat(sdds-theme-builder): implemented alpha channel parsing for colors and gradients * feat(sdds-theme-builder): improved logger * chore(sdds-theme-builder): fixed alpha channel * chore: fixed tests * Scheme validation (#42) * feat(sdds-theme-builder): implemented alpha channel parsing for colors and gradients * feat(sdds-theme-builder): improved logger * chore(sdds-theme-builder): fixed alpha channel * feat(sdds-theme-builder): added validation on stencil templates * chore: fixed code validation * feat(sdds-theme-builder): implemented meta validation * chore: clean code * chore: implemented tests * feat(sdds-theme-builder): regenerated themes, fixed templates * chore: removed default theme generation * fix(sdds-theme-builder): added two decimals format in code generation * chore: applied formatter to all stencil filter * feat(sdds-theme-builder): added github actions to release themes * chore: added script to build themes, updated themes versions * chore: fixed script * chore: updated workflow * chore: bump version * feat(sdds-acore/icons): New icons were added from plasma v0.2.0 --------- Co-authored-by: Salute iOS Team * fix(sdds-icons): fixed generated icon assets --------- Co-authored-by: Salute iOS Team * fix(sdds-icons): fixed icons generation * chore: fixed tests * SDDSButton (#57) * chore: improved project structure * feat(sdds-components): added button * chore: updated previews * chore: added previews for states * chore: implemented button states * chore: added previews for circle and square buttons * chore: added comments, added basic button preview in the demo app * chore: fixed layout * chore: improved demo app * chore: added color schemes, updated docs * chore: reverted icons * chore: added ButtonTypographyConfiguration and ButtonSizeConfiguration protocols * chore: removed unused constants * feat(sdds-uikit): added iconHorizontalGap, titleHorizontalGap, fixed colors in demo app * fix(sdds-theme-builder): added count validation for colors and locations * chore: utilized GradientDictionaryKey * feat(sdds-uikit): added SDDSSwitch * chore: utilized let instead of bindings, removed `*md` from bundle * chore: added docs for SDDSButton * feat(sdds-uikit): implemented SDDSCheckbox and SDDSRadiobox * feat(sdds-uikit): implemented SDDSProgressBar * fix(sdds-theme-builder): added validations * chore: updated unit tests * feat(sdds-theme-builder): added hex validation * feat(sdds-theme-builder): added support of 3 byte hex * feat(sdds-uikit): added demo screens for switch, radiobox, checkbox, progress * feat(sdds-uikit): added Chip and ChipGroup * feat(sdds-uikit): implemented SDDSCheckboxGroup * chore: fixed padding * Added SPM support (#67) * feat(sdds-uikit): added spm support to sddsicons * feat(sdds-core): added spm * feat(sdds-uikit): added Package.swift for PlasmaB2CTheme (#69) * feat(sdds-uikit): added parent-child relationship for checkboxgroup (#68) * Feature/button accessibility (#70) * feat(sdds-uikit): added Package.swift for PlasmaB2CTheme * feat(sdds-uikit): added button accessability * feat(sdds-uikit): updated alignment (#72) * Merged main into develop (#74) * Release SDDSIcons-v0.1.0 (#24) * chore: Added an initial Xcode project structure. Added license, readme. * fix(sdds-icore): Updated minimum deployment target * chore: Updated minimum deployment target * feat(sdds-icore): implemented building and archiving of XCFrameworks (#2) * feat(sdds-icore): added workflows to run SwiftLint and unit tests (#4) * Added swiftgen and added workflow to release icons (#8) * feat(sdds-icore): added workflow to publish icons release * feat(sdds-icore): added generation of assets * feat(sdds-icore): added swiftgen and added workflow to release icons (#8) * Added workflow to update icons (#5) * feat(sdds-icore): added workflows to release icons * feat(sdds-icore): added workflow to publish icons release * build: utilized ref from payload * build: added workflow to create and push release tag (#17) * build: added workflow to create and push release tag * build: set ubuntu instead of macos * build: bump version (#20) * chore: improved release name (#22) * feat(sdds-acore/icons): New icons were added from plasma v0.9.0 --------- Co-authored-by: Salute iOS Team * chore: bump icons versions * Release SDDSIcons-v0.2.0 (#55) * chore: Added an initial Xcode project structure. Added license, readme. * fix(sdds-icore): Updated minimum deployment target * chore: Updated minimum deployment target * feat(sdds-icore): implemented building and archiving of XCFrameworks (#2) * feat(sdds-icore): added workflows to run SwiftLint and unit tests (#4) * Added swiftgen and added workflow to release icons (#8) * feat(sdds-icore): added workflow to publish icons release * feat(sdds-icore): added generation of assets * feat(sdds-icore): added swiftgen and added workflow to release icons (#8) * Added workflow to update icons (#5) * feat(sdds-icore): added workflows to release icons * feat(sdds-icore): added workflow to publish icons release * build: utilized ref from payload * build: added workflow to create and push release tag (#17) * build: added workflow to create and push release tag * build: set ubuntu instead of macos * build: bump version (#20) * chore: improved release name (#22) * feat(sdds-theme-builder): implemented macOS CLI utility for the tokens generation (#25) * feat(sdds-theme-builder): implemented color token generation (#26) * feat(sdds-theme-builder): shadows, shapes generation, tests, unpacking of theme (#27) * feat(sdds-theme-builder): added shadow, shapes token generation, improved color token generation, added support of light&dark theme * chore: added documentation * feat(sdds-theme-builder): improved stencil tempaltes * feat(sdds-theme-builder): implemented typography token generation * chore: updated xcodeproj * chore: added tokens to both targets * feat(sdds-theme-builder): added AdaptiveTypographyToken * chore: updated meta json naming * feat(sdds-theme-builder): implemented typography token generation * feat(sdds-theme-builder): added theme * feat(sdds-theme-builder): added stencil template to generate gradients * feat(sdds-theme-builder): added gradients generaton * feat(sdds-theme-builder): added tests for GradientContextBuilder * feat(sdds-theme-builder): added gradients to demo app * chore: rewrote bash scripts in ruby * chore: improved naming, divided stencil templates * chore: added tests for context builders * fix(sdds-theme-builder): updated scheme (#34) * feat(sdds-theme-builder): implemented gradient locations * feat(sdds-theme-builder): built themes for all the verticals * feat(sdds-theme-builder): added fallback color for colors and gradients * chore: fixed tests * feat(sdds-theme-builder): added fallback screen sizes for typography token * feat(sdds-theme-builder): implemented alpha channel parsing for colors and gradients * feat(sdds-theme-builder): improved logger * chore(sdds-theme-builder): fixed alpha channel * chore: fixed tests * Scheme validation (#42) * feat(sdds-theme-builder): implemented alpha channel parsing for colors and gradients * feat(sdds-theme-builder): improved logger * chore(sdds-theme-builder): fixed alpha channel * feat(sdds-theme-builder): added validation on stencil templates * chore: fixed code validation * feat(sdds-theme-builder): implemented meta validation * chore: clean code * chore: implemented tests * feat(sdds-theme-builder): regenerated themes, fixed templates * chore: removed default theme generation * fix(sdds-theme-builder): added two decimals format in code generation * chore: applied formatter to all stencil filter * feat(sdds-theme-builder): added github actions to release themes * chore: added script to build themes, updated themes versions * chore: fixed script * chore: updated workflow * chore: bump version * feat(sdds-acore/icons): New icons were added from plasma v0.2.0 --------- Co-authored-by: Salute iOS Team --------- Co-authored-by: Salute iOS Team * fix(sdds-core): fixed build script (#77) * feat(sdds-uikit): implemented radioboxgroup (#80) * Fixed chip behaviour (#81) * Feature/button previews (#78) * feat(sdds-uikit): added previews for buttons * chore: fixed checkbox icon * feat(sdds-uikit): added link preview for button * chore: added warning to indicate that font is not accessible * feat(sdds-uikit): added FillStyle to ProgressBar (#71) * feat(sdds-uikit): added FillStyle to ProgressBar * chore: clean code * chore: clean code * feat(sdds-uikit): implemented RoundedCornersMask * feat(sdds-core): improved fonts service, removed themestyle * feat(sdds-uikit): implemented radioboxgroup (#80) * fix(sdds-core): fixed project structure and versions * fix(sdds-uikit): fixed chip * chore: utilized spm, removed unused files * fix(sdds-uikit): replaced icons for raidoboxgroup * feat(sdds-acore/icons): New icons were added from plasma v1.201.0 * chore: bump version --------- Co-authored-by: Salute iOS Team Release/22 08 2024 (#85) * chore: Added an initial Xcode project structure. Added license, readme. * fix(sdds-icore): Updated minimum deployment target * chore: Updated minimum deployment target * feat(sdds-icore): implemented building and archiving of XCFrameworks (#2) * feat(sdds-icore): added workflows to run SwiftLint and unit tests (#4) * Added swiftgen and added workflow to release icons (#8) * feat(sdds-icore): added workflow to publish icons release * feat(sdds-icore): added generation of assets * feat(sdds-icore): added swiftgen and added workflow to release icons (#8) * Added workflow to update icons (#5) * feat(sdds-icore): added workflows to release icons * feat(sdds-icore): added workflow to publish icons release * build: utilized ref from payload * build: added workflow to create and push release tag (#17) * build: added workflow to create and push release tag * build: set ubuntu instead of macos * build: bump version (#20) * chore: improved release name (#22) * feat(sdds-theme-builder): implemented macOS CLI utility for the tokens generation (#25) * feat(sdds-theme-builder): implemented color token generation (#26) * feat(sdds-theme-builder): shadows, shapes generation, tests, unpacking of theme (#27) * feat(sdds-theme-builder): added shadow, shapes token generation, improved color token generation, added support of light&dark theme * chore: added documentation * feat(sdds-theme-builder): improved stencil tempaltes * feat(sdds-theme-builder): implemented typography token generation * chore: updated xcodeproj * chore: added tokens to both targets * feat(sdds-theme-builder): added AdaptiveTypographyToken * chore: updated meta json naming * feat(sdds-theme-builder): implemented typography token generation * feat(sdds-theme-builder): added theme * feat(sdds-theme-builder): added stencil template to generate gradients * feat(sdds-theme-builder): added gradients generaton * feat(sdds-theme-builder): added tests for GradientContextBuilder * feat(sdds-theme-builder): added gradients to demo app * chore: rewrote bash scripts in ruby * chore: improved naming, divided stencil templates * chore: added tests for context builders * fix(sdds-theme-builder): updated scheme (#34) * feat(sdds-theme-builder): implemented gradient locations * feat(sdds-theme-builder): built themes for all the verticals * feat(sdds-theme-builder): added fallback color for colors and gradients * chore: fixed tests * feat(sdds-theme-builder): added fallback screen sizes for typography token * feat(sdds-theme-builder): implemented alpha channel parsing for colors and gradients * feat(sdds-theme-builder): improved logger * chore(sdds-theme-builder): fixed alpha channel * chore: fixed tests * Scheme validation (#42) * feat(sdds-theme-builder): implemented alpha channel parsing for colors and gradients * feat(sdds-theme-builder): improved logger * chore(sdds-theme-builder): fixed alpha channel * feat(sdds-theme-builder): added validation on stencil templates * chore: fixed code validation * feat(sdds-theme-builder): implemented meta validation * chore: clean code * chore: implemented tests * feat(sdds-theme-builder): regenerated themes, fixed templates * chore: removed default theme generation * fix(sdds-theme-builder): added two decimals format in code generation * chore: applied formatter to all stencil filter * feat(sdds-theme-builder): added github actions to release themes * chore: added script to build themes, updated themes versions * chore: fixed script * chore: updated workflow * chore: bump version * chore: create output directory automatically * Main to develop (#56) * Release SDDSIcons-v0.1.0 (#24) * chore: Added an initial Xcode project structure. Added license, readme. * fix(sdds-icore): Updated minimum deployment target * chore: Updated minimum deployment target * feat(sdds-icore): implemented building and archiving of XCFrameworks (#2) * feat(sdds-icore): added workflows to run SwiftLint and unit tests (#4) * Added swiftgen and added workflow to release icons (#8) * feat(sdds-icore): added workflow to publish icons release * feat(sdds-icore): added generation of assets * feat(sdds-icore): added swiftgen and added workflow to release icons (#8) * Added workflow to update icons (#5) * feat(sdds-icore): added workflows to release icons * feat(sdds-icore): added workflow to publish icons release * build: utilized ref from payload * build: added workflow to create and push release tag (#17) * build: added workflow to create and push release tag * build: set ubuntu instead of macos * build: bump version (#20) * chore: improved release name (#22) * feat(sdds-acore/icons): New icons were added from plasma v0.9.0 --------- Co-authored-by: Salute iOS Team * chore: bump icons versions * Release SDDSIcons-v0.2.0 (#55) * chore: Added an initial Xcode project structure. Added license, readme. * fix(sdds-icore): Updated minimum deployment target * chore: Updated minimum deployment target * feat(sdds-icore): implemented building and archiving of XCFrameworks (#2) * feat(sdds-icore): added workflows to run SwiftLint and unit tests (#4) * Added swiftgen and added workflow to release icons (#8) * feat(sdds-icore): added workflow to publish icons release * feat(sdds-icore): added generation of assets * feat(sdds-icore): added swiftgen and added workflow to release icons (#8) * Added workflow to update icons (#5) * feat(sdds-icore): added workflows to release icons * feat(sdds-icore): added workflow to publish icons release * build: utilized ref from payload * build: added workflow to create and push release tag (#17) * build: added workflow to create and push release tag * build: set ubuntu instead of macos * build: bump version (#20) * chore: improved release name (#22) * feat(sdds-theme-builder): implemented macOS CLI utility for the tokens generation (#25) * feat(sdds-theme-builder): implemented color token generation (#26) * feat(sdds-theme-builder): shadows, shapes generation, tests, unpacking of theme (#27) * feat(sdds-theme-builder): added shadow, shapes token generation, improved color token generation, added support of light&dark theme * chore: added documentation * feat(sdds-theme-builder): improved stencil tempaltes * feat(sdds-theme-builder): implemented typography token generation * chore: updated xcodeproj * chore: added tokens to both targets * feat(sdds-theme-builder): added AdaptiveTypographyToken * chore: updated meta json naming * feat(sdds-theme-builder): implemented typography token generation * feat(sdds-theme-builder): added theme * feat(sdds-theme-builder): added stencil template to generate gradients * feat(sdds-theme-builder): added gradients generaton * feat(sdds-theme-builder): added tests for GradientContextBuilder * feat(sdds-theme-builder): added gradients to demo app * chore: rewrote bash scripts in ruby * chore: improved naming, divided stencil templates * chore: added tests for context builders * fix(sdds-theme-builder): updated scheme (#34) * feat(sdds-theme-builder): implemented gradient locations * feat(sdds-theme-builder): built themes for all the verticals * feat(sdds-theme-builder): added fallback color for colors and gradients * chore: fixed tests * feat(sdds-theme-builder): added fallback screen sizes for typography token * feat(sdds-theme-builder): implemented alpha channel parsing for colors and gradients * feat(sdds-theme-builder): improved logger * chore(sdds-theme-builder): fixed alpha channel * chore: fixed tests * Scheme validation (#42) * feat(sdds-theme-builder): implemented alpha channel parsing for colors and gradients * feat(sdds-theme-builder): improved logger * chore(sdds-theme-builder): fixed alpha channel * feat(sdds-theme-builder): added validation on stencil templates * chore: fixed code validation * feat(sdds-theme-builder): implemented meta validation * chore: clean code * chore: implemented tests * feat(sdds-theme-builder): regenerated themes, fixed templates * chore: removed default theme generation * fix(sdds-theme-builder): added two decimals format in code generation * chore: applied formatter to all stencil filter * feat(sdds-theme-builder): added github actions to release themes * chore: added script to build themes, updated themes versions * chore: fixed script * chore: updated workflow * chore: bump version * feat(sdds-acore/icons): New icons were added from plasma v0.2.0 --------- Co-authored-by: Salute iOS Team * fix(sdds-icons): fixed generated icon assets --------- Co-authored-by: Salute iOS Team * fix(sdds-icons): fixed icons generation * chore: fixed tests * SDDSButton (#57) * chore: improved project structure * feat(sdds-components): added button * chore: updated previews * chore: added previews for states * chore: implemented button states * chore: added previews for circle and square buttons * chore: added comments, added basic button preview in the demo app * chore: fixed layout * chore: improved demo app * chore: added color schemes, updated docs * chore: reverted icons * chore: added ButtonTypographyConfiguration and ButtonSizeConfiguration protocols * chore: removed unused constants * feat(sdds-uikit): added iconHorizontalGap, titleHorizontalGap, fixed colors in demo app * fix(sdds-theme-builder): added count validation for colors and locations * chore: utilized GradientDictionaryKey * feat(sdds-uikit): added SDDSSwitch * chore: utilized let instead of bindings, removed `*md` from bundle * chore: added docs for SDDSButton * feat(sdds-uikit): implemented SDDSCheckbox and SDDSRadiobox * feat(sdds-uikit): implemented SDDSProgressBar * fix(sdds-theme-builder): added validations * chore: updated unit tests * feat(sdds-theme-builder): added hex validation * feat(sdds-theme-builder): added support of 3 byte hex * feat(sdds-uikit): added demo screens for switch, radiobox, checkbox, progress * feat(sdds-uikit): added Chip and ChipGroup * feat(sdds-uikit): implemented SDDSCheckboxGroup * chore: fixed padding * Added SPM support (#67) * feat(sdds-uikit): added spm support to sddsicons * feat(sdds-core): added spm * feat(sdds-uikit): added Package.swift for PlasmaB2CTheme (#69) * feat(sdds-uikit): added parent-child relationship for checkboxgroup (#68) * Feature/button accessibility (#70) * feat(sdds-uikit): added Package.swift for PlasmaB2CTheme * feat(sdds-uikit): added button accessability * feat(sdds-uikit): updated alignment (#72) * Merged main into develop (#74) * Release SDDSIcons-v0.1.0 (#24) * chore: Added an initial Xcode project structure. Added license, readme. * fix(sdds-icore): Updated minimum deployment target * chore: Updated minimum deployment target * feat(sdds-icore): implemented building and archiving of XCFrameworks (#2) * feat(sdds-icore): added workflows to run SwiftLint and unit tests (#4) * Added swiftgen and added workflow to release icons (#8) * feat(sdds-icore): added workflow to publish icons release * feat(sdds-icore): added generation of assets * feat(sdds-icore): added swiftgen and added workflow to release icons (#8) * Added workflow to update icons (#5) * feat(sdds-icore): added workflows to release icons * feat(sdds-icore): added workflow to publish icons release * build: utilized ref from payload * build: added workflow to create and push release tag (#17) * build: added workflow to create and push release tag * build: set ubuntu instead of macos * build: bump version (#20) * chore: improved release name (#22) * feat(sdds-acore/icons): New icons were added from plasma v0.9.0 --------- Co-authored-by: Salute iOS Team * chore: bump icons versions * Release SDDSIcons-v0.2.0 (#55) * chore: Added an initial Xcode project structure. Added license, readme. * fix(sdds-icore): Updated minimum deployment target * chore: Updated minimum deployment target * feat(sdds-icore): implemented building and archiving of XCFrameworks (#2) * feat(sdds-icore): added workflows to run SwiftLint and unit tests (#4) * Added swiftgen and added workflow to release icons (#8) * feat(sdds-icore): added workflow to publish icons release * feat(sdds-icore): added generation of assets * feat(sdds-icore): added swiftgen and added workflow to release icons (#8) * Added workflow to update icons (#5) * feat(sdds-icore): added workflows to release icons * feat(sdds-icore): added workflow to publish icons release * build: utilized ref from payload * build: added workflow to create and push release tag (#17) * build: added workflow to create and push release tag * build: set ubuntu instead of macos * build: bump version (#20) * chore: improved release name (#22) * feat(sdds-theme-builder): implemented macOS CLI utility for the tokens generation (#25) * feat(sdds-theme-builder): implemented color token generation (#26) * feat(sdds-theme-builder): shadows, shapes generation, tests, unpacking of theme (#27) * feat(sdds-theme-builder): added shadow, shapes token generation, improved color token generation, added support of light&dark theme * chore: added documentation * feat(sdds-theme-builder): improved stencil tempaltes * feat(sdds-theme-builder): implemented typography token generation * chore: updated xcodeproj * chore: added tokens to both targets * feat(sdds-theme-builder): added AdaptiveTypographyToken * chore: updated meta json naming * feat(sdds-theme-builder): implemented typography token generation * feat(sdds-theme-builder): added theme * feat(sdds-theme-builder): added stencil template to generate gradients * feat(sdds-theme-builder): added gradients generaton * feat(sdds-theme-builder): added tests for GradientContextBuilder * feat(sdds-theme-builder): added gradients to demo app * chore: rewrote bash scripts in ruby * chore: improved naming, divided stencil templates * chore: added tests for context builders * fix(sdds-theme-builder): updated scheme (#34) * feat(sdds-theme-builder): implemented gradient locations * feat(sdds-theme-builder): built themes for all the verticals * feat(sdds-theme-builder): added fallback color for colors and gradients * chore: fixed tests * feat(sdds-theme-builder): added fallback screen sizes for typography token * feat(sdds-theme-builder): implemented alpha channel parsing for colors and gradients * feat(sdds-theme-builder): improved logger * chore(sdds-theme-builder): fixed alpha channel * chore: fixed tests * Scheme validation (#42) * feat(sdds-theme-builder): implemented alpha channel parsing for colors and gradients * feat(sdds-theme-builder): improved logger * chore(sdds-theme-builder): fixed alpha channel * feat(sdds-theme-builder): added validation on stencil templates * chore: fixed code validation * feat(sdds-theme-builder): implemented meta validation * chore: clean code * chore: implemented tests * feat(sdds-theme-builder): regenerated themes, fixed templates * chore: removed default theme generation * fix(sdds-theme-builder): added two decimals format in code generation * chore: applied formatter to all stencil filter * feat(sdds-theme-builder): added github actions to release themes * chore: added script to build themes, updated themes versions * chore: fixed script * chore: updated workflow * chore: bump version * feat(sdds-acore/icons): New icons were added from plasma v0.2.0 --------- Co-authored-by: Salute iOS Team --------- Co-authored-by: Salute iOS Team * fix(sdds-core): fixed build script (#77) * feat(sdds-uikit): implemented radioboxgroup (#80) * Fixed chip behaviour (#81) * Feature/button previews (#78) * feat(sdds-uikit): added previews for buttons * chore: fixed checkbox icon * feat(sdds-uikit): added link preview for button * chore: added warning to indicate that font is not accessible * feat(sdds-uikit): added FillStyle to ProgressBar (#71) * feat(sdds-uikit): added FillStyle to ProgressBar * chore: clean code * chore: clean code * feat(sdds-uikit): implemented RoundedCornersMask * feat(sdds-core): improved fonts service, removed themestyle * feat(sdds-uikit): implemented radioboxgroup (#80) * fix(sdds-core): fixed project structure and versions * fix(sdds-uikit): fixed chip * chore: utilized spm, removed unused files * fix(sdds-uikit): replaced icons for raidoboxgroup * feat(sdds-core): added build script * fix(sdds-uikit): fixed chipgroup layout --------- Co-authored-by: Salute iOS Team chore: updated platform in workflow chore: added missing scheme * chore: fixed xcode project after merge --------- Co-authored-by: Salute iOS Team --- .../SDDSComponents.xcodeproj/project.pbxproj | 432 +++++++++++++++++- .../SDDSButton/ButtonAppearance.swift | 295 ++++++++++++ .../ButtonSize+ButtonSizeConfiguration.swift | 114 +++++ .../SDDSButton/ButtonTypography.swift | 44 ++ .../LinkSize+ButtonSizeConfiguration.swift | 51 +++ .../SDDSButton/SDDSButton+Preview.swift | 79 ++++ .../SDDSButton/SDDSButton+SDDSServe.swift | 161 +++++++ .../SDDSButton+SDDSServeB2CStyle.swift | 50 ++ .../SDDSButton/SDDSButtonPreviewCircle.swift | 50 ++ .../SDDSButton/SDDSButtonPreviewLink.swift | 28 ++ .../SDDSButton/SDDSButtonPreviewLoading.swift | 16 + ...onPreviewTextWithLeftIconAndSubtitle.swift | 36 ++ .../SDDSButtonPreviewTextWithRightIcon.swift | 36 ++ .../SDDSButtonPreviewTextWithSubtitle.swift | 36 ++ .../SDDSCheckbox/CheckboxAppearance.swift | 17 + .../SDDSCheckbox/CheckboxTypography.swift | 40 ++ .../SDDSCheckbox/SDDSCheckbox+Preview.swift | 84 ++++ .../SDDSCheckbox/SDDSCheckboxSize.swift | 34 ++ .../SDDSCheckboxGroup+Preview.swift | 47 ++ .../Components/SDDSChip/ChipAppearance.swift | 16 + .../SDDSChip/SDDSChip+Preview.swift | 102 +++++ .../Components/SDDSChip/SDDSChipSize.swift | 105 +++++ .../SDDSChipGroup/DefaultChipGroupSize.swift | 32 ++ .../SDDSChipGroup/SDDSChipGroup+Preview.swift | 64 +++ .../Components/SDDSComponentsPreview.swift | 3 + .../DefaultProgressBarSize.swift | 27 ++ .../ProgressBarAppearance.swift | 21 + .../SDDSProgress+Preview.swift | 92 ++++ .../SDDSRadiobox/RadioboxAppearance.swift | 33 ++ .../SDDSRadiobox/RadioboxTypography.swift | 24 + .../SDDSRadiobox/SDDSRadiobox+Preview.swift | 84 ++++ .../SDDSRadiobox/SDDSRadioboxSize.swift | 33 ++ .../SDDSRadioboxGroup+Preview.swift | 26 ++ .../SDDSSwitch/SDDSSwitch+Preview.swift | 78 ++++ .../SDDSSwitch/SDDSSwitchSize.swift | 20 + .../SDDSSwitch/SwitchAppearance.swift | 34 ++ .../SDDSSwitch/SwitchTypography.swift | 19 + .../SDDSComponentsPreview.h | 18 + .../SDDSServeStyle.swift | 16 + .../Utilities/Image+Extensions.swift | 8 + .../Common/ColorToken+Extensions.swift | 11 + .../SDDSCheckbox/CheckboxAppearance.swift | 24 +- .../SDDSCheckbox/SDDSCheckbox.swift | 114 +---- .../SDDSCheckboxGroup/SDDSCheckboxGroup.swift | 43 -- .../Components/SDDSChip/SDDSChip.swift | 148 ------ .../SDDSChipGroup/SDDSChipGroup.swift | 95 +--- .../SDDSProgressBar/SDDSProgressBar.swift | 83 ---- .../SDDSRadiobox/RadioboxAppearance.swift | 22 +- .../SDDSRadiobox/SDDSRadiobox.swift | 114 +---- .../SDDSRadioboxGroup/SDDSRadioboxGroup.swift | 23 - .../Components/SDDSSwitch/SDDSSwitch.swift | 156 +------ .../SelectionControl/SelectionControl.swift | 6 +- .../SelectionControlAppearance.swift | 16 +- .../contents.xcworkspacedata | 7 + Themes/SDDSservTheme/Package.swift | 28 ++ 55 files changed, 2581 insertions(+), 814 deletions(-) create mode 100644 SDDSComponents/SDDSComponentsPreview/Components/SDDSButton/ButtonAppearance.swift create mode 100644 SDDSComponents/SDDSComponentsPreview/Components/SDDSButton/ButtonSize+ButtonSizeConfiguration.swift create mode 100644 SDDSComponents/SDDSComponentsPreview/Components/SDDSButton/ButtonTypography.swift create mode 100644 SDDSComponents/SDDSComponentsPreview/Components/SDDSButton/LinkSize+ButtonSizeConfiguration.swift create mode 100644 SDDSComponents/SDDSComponentsPreview/Components/SDDSButton/SDDSButton+Preview.swift create mode 100644 SDDSComponents/SDDSComponentsPreview/Components/SDDSButton/SDDSButton+SDDSServe.swift create mode 100644 SDDSComponents/SDDSComponentsPreview/Components/SDDSButton/SDDSButton+SDDSServeB2CStyle.swift create mode 100644 SDDSComponents/SDDSComponentsPreview/Components/SDDSButton/SDDSButtonPreviewCircle.swift create mode 100644 SDDSComponents/SDDSComponentsPreview/Components/SDDSButton/SDDSButtonPreviewLink.swift create mode 100644 SDDSComponents/SDDSComponentsPreview/Components/SDDSButton/SDDSButtonPreviewLoading.swift create mode 100644 SDDSComponents/SDDSComponentsPreview/Components/SDDSButton/SDDSButtonPreviewTextWithLeftIconAndSubtitle.swift create mode 100644 SDDSComponents/SDDSComponentsPreview/Components/SDDSButton/SDDSButtonPreviewTextWithRightIcon.swift create mode 100644 SDDSComponents/SDDSComponentsPreview/Components/SDDSButton/SDDSButtonPreviewTextWithSubtitle.swift create mode 100644 SDDSComponents/SDDSComponentsPreview/Components/SDDSCheckbox/CheckboxAppearance.swift create mode 100644 SDDSComponents/SDDSComponentsPreview/Components/SDDSCheckbox/CheckboxTypography.swift create mode 100644 SDDSComponents/SDDSComponentsPreview/Components/SDDSCheckbox/SDDSCheckbox+Preview.swift create mode 100644 SDDSComponents/SDDSComponentsPreview/Components/SDDSCheckbox/SDDSCheckboxSize.swift create mode 100644 SDDSComponents/SDDSComponentsPreview/Components/SDDSCheckboxGroup/SDDSCheckboxGroup+Preview.swift create mode 100644 SDDSComponents/SDDSComponentsPreview/Components/SDDSChip/ChipAppearance.swift create mode 100644 SDDSComponents/SDDSComponentsPreview/Components/SDDSChip/SDDSChip+Preview.swift create mode 100644 SDDSComponents/SDDSComponentsPreview/Components/SDDSChip/SDDSChipSize.swift create mode 100644 SDDSComponents/SDDSComponentsPreview/Components/SDDSChipGroup/DefaultChipGroupSize.swift create mode 100644 SDDSComponents/SDDSComponentsPreview/Components/SDDSChipGroup/SDDSChipGroup+Preview.swift create mode 100644 SDDSComponents/SDDSComponentsPreview/Components/SDDSComponentsPreview.swift create mode 100644 SDDSComponents/SDDSComponentsPreview/Components/SDDSProgressBar/DefaultProgressBarSize.swift create mode 100644 SDDSComponents/SDDSComponentsPreview/Components/SDDSProgressBar/ProgressBarAppearance.swift create mode 100644 SDDSComponents/SDDSComponentsPreview/Components/SDDSProgressBar/SDDSProgress+Preview.swift create mode 100644 SDDSComponents/SDDSComponentsPreview/Components/SDDSRadiobox/RadioboxAppearance.swift create mode 100644 SDDSComponents/SDDSComponentsPreview/Components/SDDSRadiobox/RadioboxTypography.swift create mode 100644 SDDSComponents/SDDSComponentsPreview/Components/SDDSRadiobox/SDDSRadiobox+Preview.swift create mode 100644 SDDSComponents/SDDSComponentsPreview/Components/SDDSRadiobox/SDDSRadioboxSize.swift create mode 100644 SDDSComponents/SDDSComponentsPreview/Components/SDDSRadioboxGroup/SDDSRadioboxGroup+Preview.swift create mode 100644 SDDSComponents/SDDSComponentsPreview/Components/SDDSSwitch/SDDSSwitch+Preview.swift create mode 100644 SDDSComponents/SDDSComponentsPreview/Components/SDDSSwitch/SDDSSwitchSize.swift create mode 100644 SDDSComponents/SDDSComponentsPreview/Components/SDDSSwitch/SwitchAppearance.swift create mode 100644 SDDSComponents/SDDSComponentsPreview/Components/SDDSSwitch/SwitchTypography.swift create mode 100644 SDDSComponents/SDDSComponentsPreview/SDDSComponentsPreview.h create mode 100644 SDDSComponents/SDDSComponentsPreview/SDDSServeStyle.swift create mode 100644 SDDSComponents/SDDSComponentsPreview/Utilities/Image+Extensions.swift create mode 100644 Themes/SDDSservTheme/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata create mode 100644 Themes/SDDSservTheme/Package.swift diff --git a/SDDSComponents/SDDSComponents.xcodeproj/project.pbxproj b/SDDSComponents/SDDSComponents.xcodeproj/project.pbxproj index d6c45b024..40899135b 100644 --- a/SDDSComponents/SDDSComponents.xcodeproj/project.pbxproj +++ b/SDDSComponents/SDDSComponents.xcodeproj/project.pbxproj @@ -16,7 +16,6 @@ 814185C72C33080400D8E524 /* Spacing.swift in Sources */ = {isa = PBXBuildFile; fileRef = 814185C62C33080400D8E524 /* Spacing.swift */; }; 814185CA2C34260300D8E524 /* ButtonSize.swift in Sources */ = {isa = PBXBuildFile; fileRef = 814185C92C34260300D8E524 /* ButtonSize.swift */; }; 8159F7302C5D1CFE00622836 /* FillStyle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8159F72F2C5D1CFE00622836 /* FillStyle.swift */; }; - 816846D12C6656260089E02D /* SDDSButtonPreviewLink.swift in Sources */ = {isa = PBXBuildFile; fileRef = 816846D02C6656260089E02D /* SDDSButtonPreviewLink.swift */; }; 817580E92C37E04000E45207 /* SpinnerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 817580E82C37E04000E45207 /* SpinnerView.swift */; }; 818C03B22C418A90002C6D0A /* SDDSSwitch.swift in Sources */ = {isa = PBXBuildFile; fileRef = 818C03B12C418A90002C6D0A /* SDDSSwitch.swift */; }; 818C03B52C418C50002C6D0A /* TypographyConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 818C03B42C418C50002C6D0A /* TypographyConfiguration.swift */; }; @@ -34,16 +33,53 @@ 818FE9352C3C32F100F64958 /* SDDSButton+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 818FE9342C3C32F100F64958 /* SDDSButton+Extensions.swift */; }; 818FE93F2C3C403F00F64958 /* SDDSComponentsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 818FE93E2C3C403F00F64958 /* SDDSComponentsTests.swift */; }; 818FE9402C3C403F00F64958 /* SDDSComponents.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 81D2B18D2C32B39B00CAA7FD /* SDDSComponents.framework */; platformFilter = ios; }; - 8197693C2C664E4500A4BAA1 /* SDDSButtonPreviewLoading.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8197693B2C664E4500A4BAA1 /* SDDSButtonPreviewLoading.swift */; }; - 819769412C6650B900A4BAA1 /* SDDSButton+PreviewAppearence.swift in Sources */ = {isa = PBXBuildFile; fileRef = 819769402C6650B900A4BAA1 /* SDDSButton+PreviewAppearence.swift */; }; - 819769432C6650EC00A4BAA1 /* SDDSButtonPreviewTextWithSubtitle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 819769422C6650EC00A4BAA1 /* SDDSButtonPreviewTextWithSubtitle.swift */; }; - 819769452C66510000A4BAA1 /* SDDSButtonPreviewTextWithLeftIconAndSubtitle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 819769442C66510000A4BAA1 /* SDDSButtonPreviewTextWithLeftIconAndSubtitle.swift */; }; - 819769472C66511100A4BAA1 /* SDDSButtonPreviewTextWithRightIcon.swift in Sources */ = {isa = PBXBuildFile; fileRef = 819769462C66511100A4BAA1 /* SDDSButtonPreviewTextWithRightIcon.swift */; }; - 819769492C66513700A4BAA1 /* SDDSButtonPreviewCircle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 819769482C66513700A4BAA1 /* SDDSButtonPreviewCircle.swift */; }; 81998FF42C354C7F009074B7 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 81998FF32C354C7F009074B7 /* Assets.xcassets */; }; 81998FF92C35503D009074B7 /* View+Modifiers.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81998FF82C35503D009074B7 /* View+Modifiers.swift */; }; 819990002C3555D4009074B7 /* Opacity.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81998FFF2C3555D4009074B7 /* Opacity.swift */; }; 819CB7FD2C7CC34A00B4FBF4 /* SDDSThemeCore in Frameworks */ = {isa = PBXBuildFile; productRef = 819CB7FC2C7CC34A00B4FBF4 /* SDDSThemeCore */; }; + 81BBC5752C862492009616CE /* SDDSComponentsPreview.h in Headers */ = {isa = PBXBuildFile; fileRef = 81BBC5742C862492009616CE /* SDDSComponentsPreview.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 81BBC5802C862508009616CE /* SDDSServTheme in Frameworks */ = {isa = PBXBuildFile; productRef = 81BBC57F2C862508009616CE /* SDDSServTheme */; }; + 81BBC5892C86262C009616CE /* ButtonAppearance.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81BBC5882C86262C009616CE /* ButtonAppearance.swift */; }; + 81BBC58E2C8626D9009616CE /* SDDSButtonPreviewTextWithLeftIconAndSubtitle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 819769442C66510000A4BAA1 /* SDDSButtonPreviewTextWithLeftIconAndSubtitle.swift */; }; + 81BBC58F2C8626D9009616CE /* SDDSButtonPreviewCircle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 819769482C66513700A4BAA1 /* SDDSButtonPreviewCircle.swift */; }; + 81BBC5902C8626D9009616CE /* SDDSButtonPreviewLoading.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8197693B2C664E4500A4BAA1 /* SDDSButtonPreviewLoading.swift */; }; + 81BBC5912C8626D9009616CE /* SDDSButtonPreviewTextWithRightIcon.swift in Sources */ = {isa = PBXBuildFile; fileRef = 819769462C66511100A4BAA1 /* SDDSButtonPreviewTextWithRightIcon.swift */; }; + 81BBC5922C8626D9009616CE /* SDDSButton+Preview.swift in Sources */ = {isa = PBXBuildFile; fileRef = 819769402C6650B900A4BAA1 /* SDDSButton+Preview.swift */; }; + 81BBC5932C8626D9009616CE /* SDDSButtonPreviewTextWithSubtitle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 819769422C6650EC00A4BAA1 /* SDDSButtonPreviewTextWithSubtitle.swift */; }; + 81BBC5942C8626D9009616CE /* SDDSButtonPreviewLink.swift in Sources */ = {isa = PBXBuildFile; fileRef = 816846D02C6656260089E02D /* SDDSButtonPreviewLink.swift */; }; + 81BBC5952C862764009616CE /* Spacing.swift in Sources */ = {isa = PBXBuildFile; fileRef = 814185C62C33080400D8E524 /* Spacing.swift */; }; + 81BBC5982C8627AB009616CE /* ButtonTypography.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81BBC5972C8627AB009616CE /* ButtonTypography.swift */; }; + 81BBC59A2C862817009616CE /* SDDSServeStyle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81BBC5992C862817009616CE /* SDDSServeStyle.swift */; }; + 81BBC59C2C862854009616CE /* SDDSButton+SDDSServeB2CStyle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81BBC59B2C862854009616CE /* SDDSButton+SDDSServeB2CStyle.swift */; }; + 81BBC59E2C8628D4009616CE /* ButtonSize+ButtonSizeConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81BBC59D2C8628D4009616CE /* ButtonSize+ButtonSizeConfiguration.swift */; }; + 81BBC5A02C8628F1009616CE /* LinkSize+ButtonSizeConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81BBC59F2C8628F1009616CE /* LinkSize+ButtonSizeConfiguration.swift */; }; + 81BBC5A22C86293D009616CE /* RadioboxAppearance.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81BBC5A12C86293D009616CE /* RadioboxAppearance.swift */; }; + 81BBC5A32C862957009616CE /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 81998FF32C354C7F009074B7 /* Assets.xcassets */; }; + 81BBC5A72C862BCA009616CE /* SDDSRadiobox+Preview.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81BBC5A62C862BCA009616CE /* SDDSRadiobox+Preview.swift */; }; + 81BBC5A82C862BE4009616CE /* DebugModifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = 818C03BE2C43C371002C6D0A /* DebugModifier.swift */; }; + 81BBC5AA2C862CBB009616CE /* RadioboxTypography.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81BBC5A92C862CBB009616CE /* RadioboxTypography.swift */; }; + 81BBC5AB2C8631D0009616CE /* SDDSRadioboxGroup+Preview.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81BBC5812C86251F009616CE /* SDDSRadioboxGroup+Preview.swift */; }; + 81BBC5AE2C863293009616CE /* SDDSCheckbox+Preview.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81BBC5AD2C863293009616CE /* SDDSCheckbox+Preview.swift */; }; + 81BBC5B02C8632C5009616CE /* CheckboxAppearance.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81BBC5AF2C8632C5009616CE /* CheckboxAppearance.swift */; }; + 81BBC5B22C863307009616CE /* CheckboxTypography.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81BBC5B12C863307009616CE /* CheckboxTypography.swift */; }; + 81BBC5B52C863433009616CE /* SDDSCheckboxGroup+Preview.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81BBC5B42C863433009616CE /* SDDSCheckboxGroup+Preview.swift */; }; + 81BBC5B82C86355F009616CE /* SDDSChip+Preview.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81BBC5B72C86355F009616CE /* SDDSChip+Preview.swift */; }; + 81BBC5BB2C863595009616CE /* ChipAppearance.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81BBC5BA2C863595009616CE /* ChipAppearance.swift */; }; + 81BBC5BD2C863625009616CE /* SDDSRadioboxSize.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81BBC5BC2C863625009616CE /* SDDSRadioboxSize.swift */; }; + 81BBC5BF2C863644009616CE /* SDDSCheckboxSize.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81BBC5BE2C863644009616CE /* SDDSCheckboxSize.swift */; }; + 81BBC5C12C863666009616CE /* SDDSChipSize.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81BBC5C02C863666009616CE /* SDDSChipSize.swift */; }; + 81BBC5C42C8638DC009616CE /* SDDSChipGroup+Preview.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81BBC5C32C8638DC009616CE /* SDDSChipGroup+Preview.swift */; }; + 81BBC5C62C863976009616CE /* DefaultChipGroupSize.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81BBC5C52C863976009616CE /* DefaultChipGroupSize.swift */; }; + 81BBC5C92C8639CC009616CE /* Image+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81BBC5C82C8639CC009616CE /* Image+Extensions.swift */; }; + 81BBC5CB2C8639E1009616CE /* SDDSComponentsPreview.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81BBC5CA2C8639E1009616CE /* SDDSComponentsPreview.swift */; }; + 81BBC5CE2C863A10009616CE /* SDDSSwitch+Preview.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81BBC5CD2C863A10009616CE /* SDDSSwitch+Preview.swift */; }; + 81BBC5D02C863A2D009616CE /* SDDSSwitchSize.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81BBC5CF2C863A2D009616CE /* SDDSSwitchSize.swift */; }; + 81BBC5D22C86F6BD009616CE /* SwitchAppearance.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81BBC5D12C86F6BD009616CE /* SwitchAppearance.swift */; }; + 81BBC5D42C86F71B009616CE /* SwitchTypography.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81BBC5D32C86F71B009616CE /* SwitchTypography.swift */; }; + 81BBC5D72C86FBDF009616CE /* SDDSProgress+Preview.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81BBC5D62C86FBDF009616CE /* SDDSProgress+Preview.swift */; }; + 81BBC5D92C86FC2F009616CE /* DefaultProgressBarSize.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81BBC5D82C86FC2F009616CE /* DefaultProgressBarSize.swift */; }; + 81BBC5DB2C86FC54009616CE /* ProgressBarAppearance.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81BBC5DA2C86FC54009616CE /* ProgressBarAppearance.swift */; }; + 81BBC5DD2C872C83009616CE /* SDDSButton+SDDSServe.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81BBC5DC2C872C83009616CE /* SDDSButton+SDDSServe.swift */; }; 81CF12192C6E686D0074174F /* SDDSRadioboxGroup.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81CF12182C6E686D0074174F /* SDDSRadioboxGroup.swift */; }; 81CF12202C6E74180074174F /* RoundedCornersMask.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81CF121F2C6E74180074174F /* RoundedCornersMask.swift */; }; 81D2B1912C32B39B00CAA7FD /* SDDSComponents.h in Headers */ = {isa = PBXBuildFile; fileRef = 81D2B1902C32B39B00CAA7FD /* SDDSComponents.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -58,6 +94,13 @@ remoteGlobalIDString = 81D2B18C2C32B39B00CAA7FD; remoteInfo = SDDSComponents; }; + 81BBC5792C862499009616CE /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 81D2B1842C32B39B00CAA7FD /* Project object */; + proxyType = 1; + remoteGlobalIDString = 81D2B18C2C32B39B00CAA7FD; + remoteInfo = SDDSComponents; + }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ @@ -99,7 +142,7 @@ 818FE93C2C3C403F00F64958 /* SDDSComponentsTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SDDSComponentsTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 818FE93E2C3C403F00F64958 /* SDDSComponentsTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SDDSComponentsTests.swift; sourceTree = ""; }; 8197693B2C664E4500A4BAA1 /* SDDSButtonPreviewLoading.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SDDSButtonPreviewLoading.swift; sourceTree = ""; }; - 819769402C6650B900A4BAA1 /* SDDSButton+PreviewAppearence.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "SDDSButton+PreviewAppearence.swift"; sourceTree = ""; }; + 819769402C6650B900A4BAA1 /* SDDSButton+Preview.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "SDDSButton+Preview.swift"; sourceTree = ""; }; 819769422C6650EC00A4BAA1 /* SDDSButtonPreviewTextWithSubtitle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SDDSButtonPreviewTextWithSubtitle.swift; sourceTree = ""; }; 819769442C66510000A4BAA1 /* SDDSButtonPreviewTextWithLeftIconAndSubtitle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SDDSButtonPreviewTextWithLeftIconAndSubtitle.swift; sourceTree = ""; }; 819769462C66511100A4BAA1 /* SDDSButtonPreviewTextWithRightIcon.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SDDSButtonPreviewTextWithRightIcon.swift; sourceTree = ""; }; @@ -110,6 +153,39 @@ 81998FF32C354C7F009074B7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 81998FF82C35503D009074B7 /* View+Modifiers.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "View+Modifiers.swift"; sourceTree = ""; }; 81998FFF2C3555D4009074B7 /* Opacity.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Opacity.swift; sourceTree = ""; }; + 81BBC5722C862492009616CE /* SDDSComponentsPreview.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SDDSComponentsPreview.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 81BBC5742C862492009616CE /* SDDSComponentsPreview.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDDSComponentsPreview.h; sourceTree = ""; }; + 81BBC5812C86251F009616CE /* SDDSRadioboxGroup+Preview.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "SDDSRadioboxGroup+Preview.swift"; sourceTree = ""; }; + 81BBC5882C86262C009616CE /* ButtonAppearance.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ButtonAppearance.swift; sourceTree = ""; }; + 81BBC5972C8627AB009616CE /* ButtonTypography.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ButtonTypography.swift; sourceTree = ""; }; + 81BBC5992C862817009616CE /* SDDSServeStyle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SDDSServeStyle.swift; sourceTree = ""; }; + 81BBC59B2C862854009616CE /* SDDSButton+SDDSServeB2CStyle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "SDDSButton+SDDSServeB2CStyle.swift"; sourceTree = ""; }; + 81BBC59D2C8628D4009616CE /* ButtonSize+ButtonSizeConfiguration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ButtonSize+ButtonSizeConfiguration.swift"; sourceTree = ""; }; + 81BBC59F2C8628F1009616CE /* LinkSize+ButtonSizeConfiguration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "LinkSize+ButtonSizeConfiguration.swift"; sourceTree = ""; }; + 81BBC5A12C86293D009616CE /* RadioboxAppearance.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RadioboxAppearance.swift; sourceTree = ""; }; + 81BBC5A62C862BCA009616CE /* SDDSRadiobox+Preview.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "SDDSRadiobox+Preview.swift"; sourceTree = ""; }; + 81BBC5A92C862CBB009616CE /* RadioboxTypography.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RadioboxTypography.swift; sourceTree = ""; }; + 81BBC5AD2C863293009616CE /* SDDSCheckbox+Preview.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "SDDSCheckbox+Preview.swift"; sourceTree = ""; }; + 81BBC5AF2C8632C5009616CE /* CheckboxAppearance.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CheckboxAppearance.swift; sourceTree = ""; }; + 81BBC5B12C863307009616CE /* CheckboxTypography.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CheckboxTypography.swift; sourceTree = ""; }; + 81BBC5B42C863433009616CE /* SDDSCheckboxGroup+Preview.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "SDDSCheckboxGroup+Preview.swift"; sourceTree = ""; }; + 81BBC5B72C86355F009616CE /* SDDSChip+Preview.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "SDDSChip+Preview.swift"; sourceTree = ""; }; + 81BBC5BA2C863595009616CE /* ChipAppearance.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChipAppearance.swift; sourceTree = ""; }; + 81BBC5BC2C863625009616CE /* SDDSRadioboxSize.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SDDSRadioboxSize.swift; sourceTree = ""; }; + 81BBC5BE2C863644009616CE /* SDDSCheckboxSize.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SDDSCheckboxSize.swift; sourceTree = ""; }; + 81BBC5C02C863666009616CE /* SDDSChipSize.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SDDSChipSize.swift; sourceTree = ""; }; + 81BBC5C32C8638DC009616CE /* SDDSChipGroup+Preview.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "SDDSChipGroup+Preview.swift"; sourceTree = ""; }; + 81BBC5C52C863976009616CE /* DefaultChipGroupSize.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DefaultChipGroupSize.swift; sourceTree = ""; }; + 81BBC5C82C8639CC009616CE /* Image+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Image+Extensions.swift"; sourceTree = ""; }; + 81BBC5CA2C8639E1009616CE /* SDDSComponentsPreview.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SDDSComponentsPreview.swift; sourceTree = ""; }; + 81BBC5CD2C863A10009616CE /* SDDSSwitch+Preview.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "SDDSSwitch+Preview.swift"; sourceTree = ""; }; + 81BBC5CF2C863A2D009616CE /* SDDSSwitchSize.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SDDSSwitchSize.swift; sourceTree = ""; }; + 81BBC5D12C86F6BD009616CE /* SwitchAppearance.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SwitchAppearance.swift; sourceTree = ""; }; + 81BBC5D32C86F71B009616CE /* SwitchTypography.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SwitchTypography.swift; sourceTree = ""; }; + 81BBC5D62C86FBDF009616CE /* SDDSProgress+Preview.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "SDDSProgress+Preview.swift"; sourceTree = ""; }; + 81BBC5D82C86FC2F009616CE /* DefaultProgressBarSize.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DefaultProgressBarSize.swift; sourceTree = ""; }; + 81BBC5DA2C86FC54009616CE /* ProgressBarAppearance.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProgressBarAppearance.swift; sourceTree = ""; }; + 81BBC5DC2C872C83009616CE /* SDDSButton+SDDSServe.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "SDDSButton+SDDSServe.swift"; sourceTree = ""; }; 81BC36812C591B0B00A363D0 /* Package.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Package.swift; sourceTree = ""; }; 81CF12182C6E686D0074174F /* SDDSRadioboxGroup.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SDDSRadioboxGroup.swift; sourceTree = ""; }; 81CF121A2C6E6AB40074174F /* SDDSRadioboxGroup.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = SDDSRadioboxGroup.md; sourceTree = ""; }; @@ -129,6 +205,14 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 81BBC56F2C862492009616CE /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 81BBC5802C862508009616CE /* SDDSServTheme in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 81D2B18A2C32B39B00CAA7FD /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; @@ -292,13 +376,6 @@ 8197693D2C664F0F00A4BAA1 /* Preview */ = { isa = PBXGroup; children = ( - 819769402C6650B900A4BAA1 /* SDDSButton+PreviewAppearence.swift */, - 8197693B2C664E4500A4BAA1 /* SDDSButtonPreviewLoading.swift */, - 819769422C6650EC00A4BAA1 /* SDDSButtonPreviewTextWithSubtitle.swift */, - 819769442C66510000A4BAA1 /* SDDSButtonPreviewTextWithLeftIconAndSubtitle.swift */, - 819769462C66511100A4BAA1 /* SDDSButtonPreviewTextWithRightIcon.swift */, - 819769482C66513700A4BAA1 /* SDDSButtonPreviewCircle.swift */, - 816846D02C6656260089E02D /* SDDSButtonPreviewLink.swift */, ); path = Preview; sourceTree = ""; @@ -334,6 +411,140 @@ path = Constants; sourceTree = ""; }; + 81BBC5732C862492009616CE /* SDDSComponentsPreview */ = { + isa = PBXGroup; + children = ( + 81BBC5C72C8639BB009616CE /* Utilities */, + 81BBC5992C862817009616CE /* SDDSServeStyle.swift */, + 81BBC5872C8625EE009616CE /* Components */, + 81BBC5742C862492009616CE /* SDDSComponentsPreview.h */, + ); + path = SDDSComponentsPreview; + sourceTree = ""; + }; + 81BBC5872C8625EE009616CE /* Components */ = { + isa = PBXGroup; + children = ( + 81BBC5CA2C8639E1009616CE /* SDDSComponentsPreview.swift */, + 81BBC5D52C86FBC4009616CE /* SDDSProgressBar */, + 81BBC5CC2C8639FD009616CE /* SDDSSwitch */, + 81BBC5C22C8638C2009616CE /* SDDSChipGroup */, + 81BBC5B62C863547009616CE /* SDDSChip */, + 81BBC5AC2C863227009616CE /* SDDSCheckbox */, + 81BBC5B32C863426009616CE /* SDDSCheckboxGroup */, + 81BBC5A52C862BBC009616CE /* SDDSRadiobox */, + 81BBC58C2C8626B3009616CE /* SDDSRadioboxGroup */, + 81BBC58D2C8626BC009616CE /* SDDSButton */, + ); + path = Components; + sourceTree = ""; + }; + 81BBC58C2C8626B3009616CE /* SDDSRadioboxGroup */ = { + isa = PBXGroup; + children = ( + 81BBC5812C86251F009616CE /* SDDSRadioboxGroup+Preview.swift */, + ); + path = SDDSRadioboxGroup; + sourceTree = ""; + }; + 81BBC58D2C8626BC009616CE /* SDDSButton */ = { + isa = PBXGroup; + children = ( + 81BBC5972C8627AB009616CE /* ButtonTypography.swift */, + 81BBC5882C86262C009616CE /* ButtonAppearance.swift */, + 819769402C6650B900A4BAA1 /* SDDSButton+Preview.swift */, + 8197693B2C664E4500A4BAA1 /* SDDSButtonPreviewLoading.swift */, + 819769422C6650EC00A4BAA1 /* SDDSButtonPreviewTextWithSubtitle.swift */, + 819769442C66510000A4BAA1 /* SDDSButtonPreviewTextWithLeftIconAndSubtitle.swift */, + 819769462C66511100A4BAA1 /* SDDSButtonPreviewTextWithRightIcon.swift */, + 819769482C66513700A4BAA1 /* SDDSButtonPreviewCircle.swift */, + 816846D02C6656260089E02D /* SDDSButtonPreviewLink.swift */, + 81BBC59B2C862854009616CE /* SDDSButton+SDDSServeB2CStyle.swift */, + 81BBC5DC2C872C83009616CE /* SDDSButton+SDDSServe.swift */, + 81BBC59D2C8628D4009616CE /* ButtonSize+ButtonSizeConfiguration.swift */, + 81BBC59F2C8628F1009616CE /* LinkSize+ButtonSizeConfiguration.swift */, + ); + path = SDDSButton; + sourceTree = ""; + }; + 81BBC5A52C862BBC009616CE /* SDDSRadiobox */ = { + isa = PBXGroup; + children = ( + 81BBC5A62C862BCA009616CE /* SDDSRadiobox+Preview.swift */, + 81BBC5A12C86293D009616CE /* RadioboxAppearance.swift */, + 81BBC5A92C862CBB009616CE /* RadioboxTypography.swift */, + 81BBC5BC2C863625009616CE /* SDDSRadioboxSize.swift */, + ); + path = SDDSRadiobox; + sourceTree = ""; + }; + 81BBC5AC2C863227009616CE /* SDDSCheckbox */ = { + isa = PBXGroup; + children = ( + 81BBC5AD2C863293009616CE /* SDDSCheckbox+Preview.swift */, + 81BBC5AF2C8632C5009616CE /* CheckboxAppearance.swift */, + 81BBC5B12C863307009616CE /* CheckboxTypography.swift */, + 81BBC5BE2C863644009616CE /* SDDSCheckboxSize.swift */, + ); + path = SDDSCheckbox; + sourceTree = ""; + }; + 81BBC5B32C863426009616CE /* SDDSCheckboxGroup */ = { + isa = PBXGroup; + children = ( + 81BBC5B42C863433009616CE /* SDDSCheckboxGroup+Preview.swift */, + ); + path = SDDSCheckboxGroup; + sourceTree = ""; + }; + 81BBC5B62C863547009616CE /* SDDSChip */ = { + isa = PBXGroup; + children = ( + 81BBC5B72C86355F009616CE /* SDDSChip+Preview.swift */, + 81BBC5BA2C863595009616CE /* ChipAppearance.swift */, + 81BBC5C02C863666009616CE /* SDDSChipSize.swift */, + ); + path = SDDSChip; + sourceTree = ""; + }; + 81BBC5C22C8638C2009616CE /* SDDSChipGroup */ = { + isa = PBXGroup; + children = ( + 81BBC5C32C8638DC009616CE /* SDDSChipGroup+Preview.swift */, + 81BBC5C52C863976009616CE /* DefaultChipGroupSize.swift */, + ); + path = SDDSChipGroup; + sourceTree = ""; + }; + 81BBC5C72C8639BB009616CE /* Utilities */ = { + isa = PBXGroup; + children = ( + 81BBC5C82C8639CC009616CE /* Image+Extensions.swift */, + ); + path = Utilities; + sourceTree = ""; + }; + 81BBC5CC2C8639FD009616CE /* SDDSSwitch */ = { + isa = PBXGroup; + children = ( + 81BBC5CD2C863A10009616CE /* SDDSSwitch+Preview.swift */, + 81BBC5D12C86F6BD009616CE /* SwitchAppearance.swift */, + 81BBC5D32C86F71B009616CE /* SwitchTypography.swift */, + 81BBC5CF2C863A2D009616CE /* SDDSSwitchSize.swift */, + ); + path = SDDSSwitch; + sourceTree = ""; + }; + 81BBC5D52C86FBC4009616CE /* SDDSProgressBar */ = { + isa = PBXGroup; + children = ( + 81BBC5D62C86FBDF009616CE /* SDDSProgress+Preview.swift */, + 81BBC5D82C86FC2F009616CE /* DefaultProgressBarSize.swift */, + 81BBC5DA2C86FC54009616CE /* ProgressBarAppearance.swift */, + ); + path = SDDSProgressBar; + sourceTree = ""; + }; 81BC36832C591B6800A363D0 /* Sources */ = { isa = PBXGroup; children = ( @@ -381,6 +592,7 @@ 81BC36812C591B0B00A363D0 /* Package.swift */, 81998FF32C354C7F009074B7 /* Assets.xcassets */, 818FE93D2C3C403F00F64958 /* SDDSComponentsTests */, + 81BBC5732C862492009616CE /* SDDSComponentsPreview */, 81D2B18E2C32B39B00CAA7FD /* Products */, 81998FD32C3436E1009074B7 /* Frameworks */, ); @@ -391,6 +603,7 @@ children = ( 81D2B18D2C32B39B00CAA7FD /* SDDSComponents.framework */, 818FE93C2C3C403F00F64958 /* SDDSComponentsTests.xctest */, + 81BBC5722C862492009616CE /* SDDSComponentsPreview.framework */, ); name = Products; sourceTree = ""; @@ -398,6 +611,14 @@ /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ + 81BBC56D2C862492009616CE /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 81BBC5752C862492009616CE /* SDDSComponentsPreview.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 81D2B1882C32B39B00CAA7FD /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; @@ -427,6 +648,28 @@ productReference = 818FE93C2C3C403F00F64958 /* SDDSComponentsTests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; }; + 81BBC5712C862492009616CE /* SDDSComponentsPreview */ = { + isa = PBXNativeTarget; + buildConfigurationList = 81BBC5762C862492009616CE /* Build configuration list for PBXNativeTarget "SDDSComponentsPreview" */; + buildPhases = ( + 81BBC56D2C862492009616CE /* Headers */, + 81BBC56E2C862492009616CE /* Sources */, + 81BBC56F2C862492009616CE /* Frameworks */, + 81BBC5702C862492009616CE /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 81BBC57A2C862499009616CE /* PBXTargetDependency */, + ); + name = SDDSComponentsPreview; + packageProductDependencies = ( + 81BBC57F2C862508009616CE /* SDDSServTheme */, + ); + productName = SDDSComponentsPreview; + productReference = 81BBC5722C862492009616CE /* SDDSComponentsPreview.framework */; + productType = "com.apple.product-type.framework"; + }; 81D2B18C2C32B39B00CAA7FD /* SDDSComponents */ = { isa = PBXNativeTarget; buildConfigurationList = 81D2B1942C32B39B00CAA7FD /* Build configuration list for PBXNativeTarget "SDDSComponents" */; @@ -462,6 +705,9 @@ 818FE93B2C3C403F00F64958 = { CreatedOnToolsVersion = 15.0; }; + 81BBC5712C862492009616CE = { + CreatedOnToolsVersion = 15.0; + }; 81D2B18C2C32B39B00CAA7FD = { CreatedOnToolsVersion = 15.0; LastSwiftMigration = 1500; @@ -479,6 +725,7 @@ mainGroup = 81D2B1832C32B39B00CAA7FD; packageReferences = ( 819CB7FB2C7CC34A00B4FBF4 /* XCLocalSwiftPackageReference "../SDDSThemeBuilder/SDDSThemeCore" */, + 81BBC57E2C862508009616CE /* XCLocalSwiftPackageReference "../Themes/SDDSservTheme" */, ); productRefGroup = 81D2B18E2C32B39B00CAA7FD /* Products */; projectDirPath = ""; @@ -486,6 +733,7 @@ targets = ( 81D2B18C2C32B39B00CAA7FD /* SDDSComponents */, 818FE93B2C3C403F00F64958 /* SDDSComponentsTests */, + 81BBC5712C862492009616CE /* SDDSComponentsPreview */, ); }; /* End PBXProject section */ @@ -498,6 +746,14 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 81BBC5702C862492009616CE /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 81BBC5A32C862957009616CE /* Assets.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 81D2B18B2C32B39B00CAA7FD /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; @@ -517,12 +773,57 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 81BBC56E2C862492009616CE /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 81BBC5D02C863A2D009616CE /* SDDSSwitchSize.swift in Sources */, + 81BBC5B82C86355F009616CE /* SDDSChip+Preview.swift in Sources */, + 81BBC5C92C8639CC009616CE /* Image+Extensions.swift in Sources */, + 81BBC5C62C863976009616CE /* DefaultChipGroupSize.swift in Sources */, + 81BBC5922C8626D9009616CE /* SDDSButton+Preview.swift in Sources */, + 81BBC5A02C8628F1009616CE /* LinkSize+ButtonSizeConfiguration.swift in Sources */, + 81BBC5912C8626D9009616CE /* SDDSButtonPreviewTextWithRightIcon.swift in Sources */, + 81BBC5CE2C863A10009616CE /* SDDSSwitch+Preview.swift in Sources */, + 81BBC5BD2C863625009616CE /* SDDSRadioboxSize.swift in Sources */, + 81BBC5BF2C863644009616CE /* SDDSCheckboxSize.swift in Sources */, + 81BBC5DB2C86FC54009616CE /* ProgressBarAppearance.swift in Sources */, + 81BBC5B02C8632C5009616CE /* CheckboxAppearance.swift in Sources */, + 81BBC5D92C86FC2F009616CE /* DefaultProgressBarSize.swift in Sources */, + 81BBC5DD2C872C83009616CE /* SDDSButton+SDDSServe.swift in Sources */, + 81BBC5AE2C863293009616CE /* SDDSCheckbox+Preview.swift in Sources */, + 81BBC5B22C863307009616CE /* CheckboxTypography.swift in Sources */, + 81BBC59A2C862817009616CE /* SDDSServeStyle.swift in Sources */, + 81BBC5CB2C8639E1009616CE /* SDDSComponentsPreview.swift in Sources */, + 81BBC5932C8626D9009616CE /* SDDSButtonPreviewTextWithSubtitle.swift in Sources */, + 81BBC5892C86262C009616CE /* ButtonAppearance.swift in Sources */, + 81BBC59E2C8628D4009616CE /* ButtonSize+ButtonSizeConfiguration.swift in Sources */, + 81BBC5A82C862BE4009616CE /* DebugModifier.swift in Sources */, + 81BBC5AA2C862CBB009616CE /* RadioboxTypography.swift in Sources */, + 81BBC5AB2C8631D0009616CE /* SDDSRadioboxGroup+Preview.swift in Sources */, + 81BBC59C2C862854009616CE /* SDDSButton+SDDSServeB2CStyle.swift in Sources */, + 81BBC5D42C86F71B009616CE /* SwitchTypography.swift in Sources */, + 81BBC5A72C862BCA009616CE /* SDDSRadiobox+Preview.swift in Sources */, + 81BBC5BB2C863595009616CE /* ChipAppearance.swift in Sources */, + 81BBC5C42C8638DC009616CE /* SDDSChipGroup+Preview.swift in Sources */, + 81BBC5902C8626D9009616CE /* SDDSButtonPreviewLoading.swift in Sources */, + 81BBC58F2C8626D9009616CE /* SDDSButtonPreviewCircle.swift in Sources */, + 81BBC5A22C86293D009616CE /* RadioboxAppearance.swift in Sources */, + 81BBC5D22C86F6BD009616CE /* SwitchAppearance.swift in Sources */, + 81BBC5952C862764009616CE /* Spacing.swift in Sources */, + 81BBC5942C8626D9009616CE /* SDDSButtonPreviewLink.swift in Sources */, + 81BBC5B52C863433009616CE /* SDDSCheckboxGroup+Preview.swift in Sources */, + 81BBC5D72C86FBDF009616CE /* SDDSProgress+Preview.swift in Sources */, + 81BBC58E2C8626D9009616CE /* SDDSButtonPreviewTextWithLeftIconAndSubtitle.swift in Sources */, + 81BBC5982C8627AB009616CE /* ButtonTypography.swift in Sources */, + 81BBC5C12C863666009616CE /* SDDSChipSize.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 81D2B1892C32B39B00CAA7FD /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 819769472C66511100A4BAA1 /* SDDSButtonPreviewTextWithRightIcon.swift in Sources */, - 819769412C6650B900A4BAA1 /* SDDSButton+PreviewAppearence.swift in Sources */, 818C03E62C47BCDC002C6D0A /* SDDSProgressBar.swift in Sources */, 818C03BF2C43C371002C6D0A /* DebugModifier.swift in Sources */, 818FE9312C3C1CDC00F64958 /* Components.swift in Sources */, @@ -532,22 +833,17 @@ 818C03E32C479003002C6D0A /* Image+Extensions.swift in Sources */, 81CF12192C6E686D0074174F /* SDDSRadioboxGroup.swift in Sources */, 814185CA2C34260300D8E524 /* ButtonSize.swift in Sources */, - 816846D12C6656260089E02D /* SDDSButtonPreviewLink.swift in Sources */, 81D2B1992C32B3E400CAA7FD /* SDDSButton.swift in Sources */, 818FE9352C3C32F100F64958 /* SDDSButton+Extensions.swift in Sources */, 811DE1582C5017C3000DD354 /* ProgressBarAppearance.swift in Sources */, - 819769432C6650EC00A4BAA1 /* SDDSButtonPreviewTextWithSubtitle.swift in Sources */, 811DE1562C50179F000DD354 /* ChipAppearance.swift in Sources */, 81CF12202C6E74180074174F /* RoundedCornersMask.swift in Sources */, 818C03C92C451424002C6D0A /* RadioboxAppearance.swift in Sources */, 8159F7302C5D1CFE00622836 /* FillStyle.swift in Sources */, 818C03CE2C4515ED002C6D0A /* SDDSRadiobox.swift in Sources */, 819990002C3555D4009074B7 /* Opacity.swift in Sources */, - 819769452C66510000A4BAA1 /* SDDSButtonPreviewTextWithLeftIconAndSubtitle.swift in Sources */, 81998FF92C35503D009074B7 /* View+Modifiers.swift in Sources */, 811DE1542C50098D000DD354 /* SDDSChip.swift in Sources */, - 8197693C2C664E4500A4BAA1 /* SDDSButtonPreviewLoading.swift in Sources */, - 819769492C66513700A4BAA1 /* SDDSButtonPreviewCircle.swift in Sources */, 818C03B92C43B99B002C6D0A /* ColorToken+Extensions.swift in Sources */, 811DE1712C5783B6000DD354 /* HierarchicalList.swift in Sources */, 818C03D02C451651002C6D0A /* SelectionControlAppearance.swift in Sources */, @@ -573,6 +869,11 @@ isa = PBXTargetDependency; productRef = 819CB7FE2C7CC35E00B4FBF4 /* SDDSThemeCore */; }; + 81BBC57A2C862499009616CE /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 81D2B18C2C32B39B00CAA7FD /* SDDSComponents */; + targetProxy = 81BBC5792C862499009616CE /* PBXContainerItemProxy */; + }; /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ @@ -610,6 +911,76 @@ }; name = Release; }; + 81BBC5772C862492009616CE /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = Y6QKS4Y8B9; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_MODULE_VERIFIER = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_KEY_NSHumanReadableCopyright = ""; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 14.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; + MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu17 gnu++20"; + PRODUCT_BUNDLE_IDENTIFIER = com.sdds.SDDSComponentsPreview; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SKIP_INSTALL = YES; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 81BBC5782C862492009616CE /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = Y6QKS4Y8B9; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_MODULE_VERIFIER = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_KEY_NSHumanReadableCopyright = ""; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 14.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; + MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu17 gnu++20"; + PRODUCT_BUNDLE_IDENTIFIER = com.sdds.SDDSComponentsPreview; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SKIP_INSTALL = YES; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; 81D2B1922C32B39B00CAA7FD /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -824,6 +1195,15 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; + 81BBC5762C862492009616CE /* Build configuration list for PBXNativeTarget "SDDSComponentsPreview" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 81BBC5772C862492009616CE /* Debug */, + 81BBC5782C862492009616CE /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; 81D2B1872C32B39B00CAA7FD /* Build configuration list for PBXProject "SDDSComponents" */ = { isa = XCConfigurationList; buildConfigurations = ( @@ -849,6 +1229,10 @@ isa = XCLocalSwiftPackageReference; relativePath = ../SDDSThemeBuilder/SDDSThemeCore; }; + 81BBC57E2C862508009616CE /* XCLocalSwiftPackageReference "../Themes/SDDSservTheme" */ = { + isa = XCLocalSwiftPackageReference; + relativePath = ../Themes/SDDSservTheme; + }; /* End XCLocalSwiftPackageReference section */ /* Begin XCSwiftPackageProductDependency section */ @@ -861,6 +1245,10 @@ package = 819CB7FB2C7CC34A00B4FBF4 /* XCLocalSwiftPackageReference "../SDDSThemeBuilder/SDDSThemeCore" */; productName = SDDSThemeCore; }; + 81BBC57F2C862508009616CE /* SDDSServTheme */ = { + isa = XCSwiftPackageProductDependency; + productName = SDDSServTheme; + }; /* End XCSwiftPackageProductDependency section */ }; rootObject = 81D2B1842C32B39B00CAA7FD /* Project object */; diff --git a/SDDSComponents/SDDSComponentsPreview/Components/SDDSButton/ButtonAppearance.swift b/SDDSComponents/SDDSComponentsPreview/Components/SDDSButton/ButtonAppearance.swift new file mode 100644 index 000000000..5876fffbd --- /dev/null +++ b/SDDSComponents/SDDSComponentsPreview/Components/SDDSButton/ButtonAppearance.swift @@ -0,0 +1,295 @@ +import Foundation +import SDDSServTheme +import SDDSThemeCore +import SDDSComponents + +extension ButtonAppearance { + static var `default`: Self { + return ButtonAppearance( + titleTypography: ButtonTypography.text, + titleColor: .textInversePrimary, + subtitleTypography: ButtonTypography.text, + subtitleColor: .textInverseSecondary, + iconColor: .textInversePrimary, + spinnerColor: .textInversePrimary, + backgroundColor: .surfaceDefaultSolidDefault, + disabledAlpha: 0.4, + loadingAlpha: 0.06 + ) + } + + static var accent: Self { + return ButtonAppearance( + titleTypography: ButtonTypography.text, + titleColor: .textOnDarkPrimary, + subtitleTypography: ButtonTypography.text, + subtitleColor: .textOnDarkSecondary, + iconColor: .textOnDarkPrimary, + spinnerColor: .textOnDarkPrimary, + backgroundColor: .surfaceDefaultAccent, + disabledAlpha: 0.4, + loadingAlpha: 0.06 + ) + } + + static var secondary: Self { + return ButtonAppearance( + titleTypography: ButtonTypography.text, + titleColor: .textDefaultPrimary, + subtitleTypography: ButtonTypography.text, + subtitleColor: .textDefaultSecondary, + iconColor: .textDefaultPrimary, + spinnerColor: .textDefaultPrimary, + backgroundColor: .surfaceDefaultTransparentSecondary, + disabledAlpha: 0.4, + loadingAlpha: 0.06 + ) + } + + static var clear: Self { + return ButtonAppearance( + titleTypography: ButtonTypography.text, + titleColor: .textDefaultPrimary, + subtitleTypography: ButtonTypography.text, + subtitleColor: .textDefaultSecondary, + iconColor: .textDefaultPrimary, + spinnerColor: .textDefaultPrimary, + backgroundColor: .surfaceDefaultClear, + disabledAlpha: 0.4, + loadingAlpha: 0.06 + ) + } + + static var positive: Self { + return ButtonAppearance( + titleTypography: ButtonTypography.text, + titleColor: .textOnDarkPrimary, + subtitleTypography: ButtonTypography.text, + subtitleColor: .textOnDarkSecondary, + iconColor: .textOnDarkPrimary, + spinnerColor: .textOnDarkPrimary, + backgroundColor: .surfaceDefaultPositive, + disabledAlpha: 0.4, + loadingAlpha: 0.06 + ) + } + + static var warning: Self { + return ButtonAppearance( + titleTypography: ButtonTypography.text, + titleColor: .textOnDarkPrimary, + subtitleTypography: ButtonTypography.text, + subtitleColor: .textOnDarkSecondary, + iconColor: .textOnDarkPrimary, + spinnerColor: .textOnDarkPrimary, + backgroundColor: .surfaceDefaultWarning, + disabledAlpha: 0.4, + loadingAlpha: 0.06 + ) + } + + static var negative: Self { + return ButtonAppearance( + titleTypography: ButtonTypography.text, + titleColor: .textOnDarkPrimary, + subtitleTypography: ButtonTypography.text, + subtitleColor: .textOnDarkSecondary, + iconColor: .textOnDarkPrimary, + spinnerColor: .textOnDarkPrimary, + backgroundColor: .surfaceDefaultNegative, + disabledAlpha: 0.4, + loadingAlpha: 0.06 + ) + } + + static var dark: Self { + return ButtonAppearance( + titleTypography: ButtonTypography.text, + titleColor: .textOnDarkPrimary, + subtitleTypography: ButtonTypography.text, + subtitleColor: .textOnDarkSecondary, + iconColor: .textOnDarkPrimary, + spinnerColor: .textOnDarkPrimary, + backgroundColor: .surfaceOnLightTransparentDeep, + disabledAlpha: 0.4, + loadingAlpha: 0.06 + ) + } + + static var black: Self { + return ButtonAppearance( + titleTypography: ButtonTypography.text, + titleColor: .textOnDarkPrimary, + subtitleTypography: ButtonTypography.text, + subtitleColor: .textOnDarkSecondary, + iconColor: .textOnDarkPrimary, + spinnerColor: .textOnDarkPrimary, + backgroundColor: .surfaceOnLightSolidDefault, + disabledAlpha: 0.4, + loadingAlpha: 0.06 + ) + } + + static var linkDefault: Self { + return ButtonAppearance( + titleTypography: ButtonTypography.text, + titleColor: .surfaceDefaultSolidDefault, + subtitleTypography: ButtonTypography.text, + subtitleColor: .clearColor, + iconColor: .surfaceDefaultSolidDefault, + spinnerColor: .surfaceDefaultSolidDefault, + backgroundColor: .clearColor, + disabledAlpha: 0.4, + loadingAlpha: 0.06 + ) + } + + static var linkAccent: Self { + return ButtonAppearance( + titleTypography: ButtonTypography.text, + titleColor: .surfaceDefaultAccent, + subtitleTypography: ButtonTypography.text, + subtitleColor: .clearColor, + iconColor: .surfaceDefaultAccent, + spinnerColor: .surfaceDefaultAccent, + backgroundColor: .clearColor, + disabledAlpha: 0.4, + loadingAlpha: 0.06 + ) + } + + static var linkSecondary: Self { + return ButtonAppearance( + titleTypography: ButtonTypography.text, + titleColor: .textDefaultSecondary, + subtitleTypography: ButtonTypography.text, + subtitleColor: .clearColor, + iconColor: .textDefaultSecondary, + spinnerColor: .textDefaultSecondary, + backgroundColor: .clearColor, + disabledAlpha: 0.4, + loadingAlpha: 0.06 + ) + } + + static var linkClear: Self { + return ButtonAppearance( + titleTypography: ButtonTypography.text, + titleColor: .surfaceDefaultClear, + subtitleTypography: ButtonTypography.text, + subtitleColor: .clearColor, + iconColor: .surfaceDefaultClear, + spinnerColor: .surfaceDefaultClear, + backgroundColor: .clearColor, + disabledAlpha: 0.4, + loadingAlpha: 0.06 + ) + } + + static var linkPositive: Self { + return ButtonAppearance( + titleTypography: ButtonTypography.text, + titleColor: .surfaceDefaultPositive, + subtitleTypography: ButtonTypography.text, + subtitleColor: .clearColor, + iconColor: .surfaceDefaultPositive, + spinnerColor: .surfaceDefaultPositive, + backgroundColor: .clearColor, + disabledAlpha: 0.4, + loadingAlpha: 0.06 + ) + } + + static var linkWarning: Self { + return ButtonAppearance( + titleTypography: ButtonTypography.text, + titleColor: .surfaceDefaultWarning, + subtitleTypography: ButtonTypography.text, + subtitleColor: .clearColor, + iconColor: .surfaceDefaultWarning, + spinnerColor: .surfaceDefaultWarning, + backgroundColor: .clearColor, + disabledAlpha: 0.4, + loadingAlpha: 0.06 + ) + } + + static var linkNegative: Self { + return ButtonAppearance( + titleTypography: ButtonTypography.text, + titleColor: .surfaceDefaultNegative, + subtitleTypography: ButtonTypography.text, + subtitleColor: .clearColor, + iconColor: .surfaceDefaultNegative, + spinnerColor: .surfaceDefaultNegative, + backgroundColor: .clearColor, + disabledAlpha: 0.4, + loadingAlpha: 0.06 + ) + } + + static var linkDark: Self { + return ButtonAppearance( + titleTypography: ButtonTypography.text, + titleColor: .surfaceOnLightTransparentDeep, + subtitleTypography: ButtonTypography.text, + subtitleColor: .clearColor, + iconColor: .surfaceOnLightTransparentDeep, + spinnerColor: .surfaceOnLightTransparentDeep, + backgroundColor: .clearColor, + disabledAlpha: 0.4, + loadingAlpha: 0.06 + ) + } + + static var linkBlack: Self { + return ButtonAppearance( + titleTypography: ButtonTypography.text, + titleColor: .surfaceOnLightSolidDefault, + subtitleTypography: ButtonTypography.text, + subtitleColor: .clearColor, + iconColor: .surfaceOnLightSolidDefault, + spinnerColor: .surfaceOnLightSolidDefault, + backgroundColor: .clearColor, + disabledAlpha: 0.4, + loadingAlpha: 0.06 + ) + } +} + + +extension ButtonTypography { + static var text: TypographyConfiguration { + ButtonTypography( + large: AdaptiveTypographyToken.bodyLBold.typography, + medium: AdaptiveTypographyToken.bodyMBold.typography, + small: AdaptiveTypographyToken.bodySBold.typography, + extraSmall: AdaptiveTypographyToken.bodyXsBold.typography, + extraExtraSmall: AdaptiveTypographyToken.bodyXsNormal.typography + ) + .asContainer + } +} + +public extension ButtonAppearance { + static let all: [ButtonAppearance] = [ + .default, + .accent, + .secondary, + .clear, + .positive, + .warning, + .negative, + .dark, + .black, + .linkDefault, + .linkAccent, + .linkSecondary, + .linkClear, + .linkPositive, + .linkWarning, + .linkNegative, + .linkDark, + .linkBlack + ] +} diff --git a/SDDSComponents/SDDSComponentsPreview/Components/SDDSButton/ButtonSize+ButtonSizeConfiguration.swift b/SDDSComponents/SDDSComponentsPreview/Components/SDDSButton/ButtonSize+ButtonSizeConfiguration.swift new file mode 100644 index 000000000..fbf64b71e --- /dev/null +++ b/SDDSComponents/SDDSComponentsPreview/Components/SDDSButton/ButtonSize+ButtonSizeConfiguration.swift @@ -0,0 +1,114 @@ +import Foundation +import SDDSComponents +import SwiftUI + +enum ButtonSize: String, CaseIterable { + case large + case medium + case small + case extraSmall + case extraExtraSmall +} + +extension ButtonSize: ButtonSizeConfiguration { + var height: CGFloat { + switch self { + case .large: + return Spacing.Button.Height.large + case .medium: + return Spacing.Button.Height.medium + case .small: + return Spacing.Button.Height.small + case .extraSmall: + return Spacing.Button.Height.extraSmall + case .extraExtraSmall: + return Spacing.Button.Height.extraExtraSmall + } + } + + var cornerRadius: CGFloat { + switch self { + case .large: + return Spacing.Button.CornerRadius.large + case .medium: + return Spacing.Button.CornerRadius.medium + case .small: + return Spacing.Button.CornerRadius.small + case .extraSmall: + return Spacing.Button.CornerRadius.extraSmall + case .extraExtraSmall: + return Spacing.Button.CornerRadius.extraExtraSmall + } + } + + var paddings: EdgeInsets { + switch self { + case .large: + return Spacing.Button.Padding.large + case .medium: + return Spacing.Button.Padding.medium + case .small: + return Spacing.Button.Padding.small + case .extraSmall: + return Spacing.Button.Padding.extraSmall + case .extraExtraSmall: + return Spacing.Button.Padding.extraExtraSmall + } + } + + var iconSize: CGSize { + switch self { + case .large: + return Spacing.Button.IconSize.large + case .medium: + return Spacing.Button.IconSize.medium + case .small: + return Spacing.Button.IconSize.small + case .extraSmall: + return Spacing.Button.IconSize.extraSmall + case .extraExtraSmall: + return Spacing.Button.IconSize.extraExtraSmall + } + } + + var spinnerSize: CGSize { + switch self { + case .large: + return Spacing.Button.SpinnerSize.large + case .medium: + return Spacing.Button.SpinnerSize.medium + case .small: + return Spacing.Button.SpinnerSize.small + case .extraSmall: + return Spacing.Button.SpinnerSize.extraSmall + case .extraExtraSmall: + return Spacing.Button.SpinnerSize.extraExtraSmall + } + } + + var titleHorizontalGap: CGFloat { + switch self { + case .extraSmall, .extraExtraSmall: + return Spacing.Button.Gap.small + default: + return Spacing.Button.Gap.medium + } + } + + var iconHorizontalGap: CGFloat { + switch self { + case .large: + return Spacing.Button.Gap.large + case .medium: + return Spacing.Button.Gap.medium + case .small: + return Spacing.Button.Gap.small + case .extraSmall, .extraExtraSmall: + return Spacing.Button.Gap.extraSmall + } + } + + var debugDescription: String { + return "ButtonSize" + } +} diff --git a/SDDSComponents/SDDSComponentsPreview/Components/SDDSButton/ButtonTypography.swift b/SDDSComponents/SDDSComponentsPreview/Components/SDDSButton/ButtonTypography.swift new file mode 100644 index 000000000..010429b51 --- /dev/null +++ b/SDDSComponents/SDDSComponentsPreview/Components/SDDSButton/ButtonTypography.swift @@ -0,0 +1,44 @@ +import Foundation +import SDDSServTheme +import SDDSComponents + +struct ButtonTypography: GeneralTypographyConfiguration { + typealias S = ButtonSizeConfiguration + + let large: TypographyToken? + let medium: TypographyToken? + let small: TypographyToken? + let extraSmall: TypographyToken? + let extraExtraSmall: TypographyToken? + + init(large: TypographyToken?, medium: TypographyToken?, small: TypographyToken?, extraSmall: TypographyToken?, extraExtraSmall: TypographyToken?) { + self.large = large + self.medium = medium + self.small = small + self.extraSmall = extraSmall + self.extraExtraSmall = extraExtraSmall + } + + /** + Возвращает типографику для заданного размера кнопки. + + - Parameter size: Размер кнопки. + - Returns: Типографика для заданного размера кнопки или nil, если не задана. + */ + func typography(with size: ButtonSizeConfiguration) -> TypographyToken? { + switch size as? ButtonSize { + case .large: + return large + case .medium: + return medium + case .small: + return small + case .extraSmall: + return extraSmall + case .extraExtraSmall: + return extraExtraSmall + case .none: + return medium + } + } +} diff --git a/SDDSComponents/SDDSComponentsPreview/Components/SDDSButton/LinkSize+ButtonSizeConfiguration.swift b/SDDSComponents/SDDSComponentsPreview/Components/SDDSButton/LinkSize+ButtonSizeConfiguration.swift new file mode 100644 index 000000000..c72ab9408 --- /dev/null +++ b/SDDSComponents/SDDSComponentsPreview/Components/SDDSButton/LinkSize+ButtonSizeConfiguration.swift @@ -0,0 +1,51 @@ +import Foundation +import SDDSComponents +import SwiftUI + +enum LinkSize: String, CaseIterable { + case large + case medium + case small + case extraSmall + case extraExtraSmall +} + +extension LinkSize { + var buttonSize: ButtonSize { + return ButtonSize(rawValue: self.rawValue) ?? .medium + } +} + +extension LinkSize: ButtonSizeConfiguration { + var height: CGFloat { + buttonSize.height + } + + var cornerRadius: CGFloat { + 0 + } + + var paddings: EdgeInsets { + buttonSize.paddings.zeroLateral + } + + var iconSize: CGSize { + buttonSize.iconSize + } + + var spinnerSize: CGSize { + buttonSize.spinnerSize + } + + var iconHorizontalGap: CGFloat { + buttonSize.iconHorizontalGap + } + + var titleHorizontalGap: CGFloat { + buttonSize.titleHorizontalGap + } + + var debugDescription: String { + "LinkSize" + } +} diff --git a/SDDSComponents/SDDSComponentsPreview/Components/SDDSButton/SDDSButton+Preview.swift b/SDDSComponents/SDDSComponentsPreview/Components/SDDSButton/SDDSButton+Preview.swift new file mode 100644 index 000000000..84b9e61b8 --- /dev/null +++ b/SDDSComponents/SDDSComponentsPreview/Components/SDDSButton/SDDSButton+Preview.swift @@ -0,0 +1,79 @@ +import Foundation +import SDDSComponents +import SwiftUI + +// MARK: - Extension to Generate Example Buttons +extension SDDSButton { + static func defaultTextWithSubtitle(size: ButtonSize, layoutMode: ButtonLayoutMode = .wrapContent) -> SDDSButton { + SDDSButton.basicButton( + title: "Label", + subtitle: "Value", + size: .medium, + style: .black, + isDisabled: false, + isLoading: false, + spinnerStyle: .solid, + layoutMode: layoutMode, + action: {} + ) + } + + static func textWithLeftIconAndSubtitle(size: ButtonSize, layoutMode: ButtonLayoutMode = .wrapContent) -> SDDSButton { + SDDSButton.basicButton( + title: "Label", + subtitle: "Value", + iconAttributes: ButtonIconAttributes(image: Image(systemName: "pencil.circle.fill"), alignment: .left), + size: .medium, + style: .black, + isDisabled: false, + isLoading: false, + spinnerStyle: .solid, + layoutMode: layoutMode, + action: {} + ) + } + + static func textWithRightIcon(size: ButtonSize, layoutMode: ButtonLayoutMode = .wrapContent) -> SDDSButton { + SDDSButton.basicButton( + title: "Label", + subtitle: "Value", + iconAttributes: ButtonIconAttributes(image: Image(systemName: "pencil.circle.fill"), alignment: .right), + size: .medium, + style: .black, + isDisabled: false, + isLoading: false, + spinnerStyle: .solid, + layoutMode: layoutMode, + action: {} + ) + } + + static func loadingButton(size: ButtonSize, layoutMode: ButtonLayoutMode = .wrapContent) -> SDDSButton { + SDDSButton.basicButton( + title: "Label", + subtitle: "Value", + size: .medium, + style: .black, + isDisabled: false, + isLoading: true, + spinnerStyle: .solid, + layoutMode: layoutMode, + action: {} + ) + } + + static func transparentLoadingButton(size: ButtonSize, layoutMode: ButtonLayoutMode = .wrapContent) -> SDDSButton { + SDDSButton.basicButton( + title: "Label", + subtitle: "Value", + size: .medium, + style: .black, + isDisabled: false, + isLoading: true, + spinnerStyle: .transparent, + layoutMode: layoutMode, + action: {} + ) + } +} + diff --git a/SDDSComponents/SDDSComponentsPreview/Components/SDDSButton/SDDSButton+SDDSServe.swift b/SDDSComponents/SDDSComponentsPreview/Components/SDDSButton/SDDSButton+SDDSServe.swift new file mode 100644 index 000000000..cea562caa --- /dev/null +++ b/SDDSComponents/SDDSComponentsPreview/Components/SDDSButton/SDDSButton+SDDSServe.swift @@ -0,0 +1,161 @@ +import Foundation +import SwiftUI +import SDDSComponents +import SDDSServTheme + +// swiftlint:disable function_parameter_count +extension SDDSButton { + + static func basicButton( + title: String, + subtitle: String = "", + iconAttributes: ButtonIconAttributes? = nil, + size: ButtonSize, + style: SDDSServeB2CStyle, + isDisabled: Bool = false, + isLoading: Bool = false, + spinnerImage: Image = Image("spinner", bundle: Bundle(for: SDDSComponentsPreview.self)), + spinnerStyle: SpinnerStyle = .solid, + layoutMode: ButtonLayoutMode = .wrapContent, + accessibility: ButtonAccessibility = ButtonAccessibility(), + action: @escaping () -> Void + ) -> SDDSButton { + button( + title: title, + subtitle: subtitle, + iconAttributes: iconAttributes, + size: size, + isDisabled: isDisabled, + isLoading: isLoading, + spinnerImage: spinnerImage, + spinnerStyle: spinnerStyle, + buttonStyle: .basic, + appearance: style.defaultButtonAppearance, + layoutMode: layoutMode, + accessibility: accessibility, + action: action + ) + } + + static func iconButtonCircle( + iconImage: Image, + size: ButtonSize, + style: SDDSServeB2CStyle, + isDisabled: Bool = false, + isLoading: Bool = false, + spinnerImage: Image = Image("spinner", bundle: Bundle(for: SDDSComponentsPreview.self)), + spinnerStyle: SpinnerStyle = .solid, + layoutMode: ButtonLayoutMode = .wrapContent, + accessibility: ButtonAccessibility = ButtonAccessibility(), + action: @escaping () -> Void + ) -> SDDSButton { + button( + title: "", + subtitle: "", + iconAttributes: ButtonIconAttributes(image: iconImage, alignment: .left), + size: size, + isDisabled: isDisabled, + isLoading: isLoading, + spinnerImage: spinnerImage, + spinnerStyle: spinnerStyle, + buttonStyle: .circle, + appearance: style.defaultButtonAppearance, + layoutMode: layoutMode, + accessibility: accessibility, + action: action + ) + } + + static func iconButtonSquare( + iconImage: Image, + size: ButtonSize, + style: SDDSServeB2CStyle, + isDisabled: Bool = false, + isLoading: Bool = false, + spinnerImage: Image = Image("spinner", bundle: Bundle(for: SDDSComponentsPreview.self)), + spinnerStyle: SpinnerStyle = .solid, + layoutMode: ButtonLayoutMode = .wrapContent, + accessibility: ButtonAccessibility = ButtonAccessibility(), + action: @escaping () -> Void + ) -> SDDSButton { + button( + title: "", + subtitle: "", + iconAttributes: ButtonIconAttributes(image: iconImage, alignment: .left), + size: size, + isDisabled: isDisabled, + isLoading: isLoading, + spinnerImage: spinnerImage, + spinnerStyle: spinnerStyle, + buttonStyle: .square, + appearance: style.defaultButtonAppearance, + layoutMode: layoutMode, + accessibility: accessibility, + action: action + ) + } + + static func linkButton( + title: String, + iconAttributes: ButtonIconAttributes? = nil, + size: LinkSize, + style: SDDSServeB2CStyle, + isDisabled: Bool = false, + isLoading: Bool = false, + spinnerImage: Image = Image("spinner", bundle: Bundle(for: SDDSComponentsPreview.self)), + spinnerStyle: SpinnerStyle = .solid, + accessibility: ButtonAccessibility = ButtonAccessibility(), + action: @escaping () -> Void + ) -> SDDSButton { + button( + title: title, + subtitle: "", + iconAttributes: iconAttributes, + size: size.buttonSize, + isDisabled: isDisabled, + isLoading: isLoading, + spinnerImage: spinnerImage, + spinnerStyle: spinnerStyle, + buttonStyle: .basic, + appearance: style.defaultLinkButtonAppearance, + layoutMode: .wrapContent, + accessibility: accessibility, + action: action + ) + } +} + +private extension SDDSButton { + static func button( + title: String, + subtitle: String, + iconAttributes: ButtonIconAttributes?, + size: ButtonSize, + isDisabled: Bool, + isLoading: Bool, + spinnerImage: Image, + spinnerStyle: SpinnerStyle, + buttonStyle: SDDSComponents.ButtonStyle, + appearance: ButtonAppearance, + layoutMode: ButtonLayoutMode, + accessibility: ButtonAccessibility, + action: @escaping () -> Void + ) -> SDDSButton { + return SDDSButton( + title: title, + subtitle: subtitle, + iconAttributes: iconAttributes, + size: size, + isDisabled: isDisabled, + isLoading: isLoading, + spinnerImage: spinnerImage, + spinnerStyle: spinnerStyle, + buttonStyle: buttonStyle, + appearance: appearance, + layoutMode: layoutMode, + accessibility: accessibility, + action: action + ) + } +} +// swiftlint:enable function_parameter_count diff --git a/SDDSComponents/SDDSComponentsPreview/Components/SDDSButton/SDDSButton+SDDSServeB2CStyle.swift b/SDDSComponents/SDDSComponentsPreview/Components/SDDSButton/SDDSButton+SDDSServeB2CStyle.swift new file mode 100644 index 000000000..277334eab --- /dev/null +++ b/SDDSComponents/SDDSComponentsPreview/Components/SDDSButton/SDDSButton+SDDSServeB2CStyle.swift @@ -0,0 +1,50 @@ +import Foundation +import SDDSComponents + +extension SDDSServeB2CStyle { + var defaultButtonAppearance: ButtonAppearance { + switch self { + case .default: + return .default + case .secondary: + return .secondary + case .accent: + return .accent + case .positive: + return .positive + case .negative: + return .negative + case .warning: + return .warning + case .clear: + return .clear + case .dark: + return .dark + case .black: + return .black + } + } + + var defaultLinkButtonAppearance: ButtonAppearance { + switch self { + case .default: + return .linkDefault + case .secondary: + return .linkSecondary + case .accent: + return .linkAccent + case .positive: + return .linkPositive + case .negative: + return .linkNegative + case .warning: + return .linkWarning + case .clear: + return .linkClear + case .dark: + return .linkDark + case .black: + return .linkBlack + } + } +} diff --git a/SDDSComponents/SDDSComponentsPreview/Components/SDDSButton/SDDSButtonPreviewCircle.swift b/SDDSComponents/SDDSComponentsPreview/Components/SDDSButton/SDDSButtonPreviewCircle.swift new file mode 100644 index 000000000..9fe5147db --- /dev/null +++ b/SDDSComponents/SDDSComponentsPreview/Components/SDDSButton/SDDSButtonPreviewCircle.swift @@ -0,0 +1,50 @@ +import Foundation +import SDDSComponents +import SwiftUI + +// MARK: - Preview: Circle Buttons +struct SDDSButtonPreviewCircle: PreviewProvider { + static var previews: some View { + Group { + SDDSButton.circleButton(size: .large) + .previewLayout(.sizeThatFits) + .previewDisplayName("Large circle button with icon") + + SDDSButton.circleButton(size: .large, isLoading: true) + .previewLayout(.sizeThatFits) + .previewDisplayName("Large circle button with icon and loading") + + SDDSButton.circleButton(size: .medium) + .previewLayout(.sizeThatFits) + .previewDisplayName("Medium circle button with icon") + + SDDSButton.circleButton(size: .small) + .previewLayout(.sizeThatFits) + .previewDisplayName("Small circle button with icon") + + SDDSButton.circleButton(size: .extraSmall) + .previewLayout(.sizeThatFits) + .previewDisplayName("XS circle button with icon") + + SDDSButton.circleButton(size: .extraExtraSmall) + .previewLayout(.sizeThatFits) + .previewDisplayName("XXS circle button with icon") + } + } +} + +// MARK: - Extension to Generate Circle Buttons +extension SDDSButton { + static func circleButton(size: ButtonSize, isLoading: Bool = false, layoutMode: ButtonLayoutMode = .wrapContent) -> SDDSButton { + SDDSButton.iconButtonCircle( + iconImage: Image(systemName: "pencil.circle.fill"), + size: size, + style: .default, + isDisabled: false, + isLoading: isLoading, + spinnerStyle: .solid, + layoutMode: layoutMode, + action: {} + ) + } +} diff --git a/SDDSComponents/SDDSComponentsPreview/Components/SDDSButton/SDDSButtonPreviewLink.swift b/SDDSComponents/SDDSComponentsPreview/Components/SDDSButton/SDDSButtonPreviewLink.swift new file mode 100644 index 000000000..6b02be0b3 --- /dev/null +++ b/SDDSComponents/SDDSComponentsPreview/Components/SDDSButton/SDDSButtonPreviewLink.swift @@ -0,0 +1,28 @@ +import Foundation +import SDDSComponents +import SwiftUI + +// MARK: - Preview: Link Buttons +struct SDDSButtonPreviewLink: PreviewProvider { + static var previews: some View { + Group { + SDDSButton.linkButton(size: .medium) + .previewLayout(.sizeThatFits) + .previewDisplayName("Large circle button with icon") + } + } +} + +// MARK: - Extension to Generate Circle Buttons +extension SDDSButton { + static func linkButton(size: ButtonSize, isLoading: Bool = false, layoutMode: ButtonLayoutMode = .wrapContent) -> SDDSButton { + SDDSButton.linkButton( + title: "Label", + size: .medium, + style: .accent, + isDisabled: false, + isLoading: false, + action: {} + ) + } +} diff --git a/SDDSComponents/SDDSComponentsPreview/Components/SDDSButton/SDDSButtonPreviewLoading.swift b/SDDSComponents/SDDSComponentsPreview/Components/SDDSButton/SDDSButtonPreviewLoading.swift new file mode 100644 index 000000000..2d8f8bc8a --- /dev/null +++ b/SDDSComponents/SDDSComponentsPreview/Components/SDDSButton/SDDSButtonPreviewLoading.swift @@ -0,0 +1,16 @@ +import Foundation +import SDDSComponents +import SwiftUI + +//// MARK: - Preview: Loading Buttons +struct SDDSButtonPreviewLoading: PreviewProvider { + static var previews: some View { + SDDSButton.loadingButton(size: .large) + .previewLayout(.sizeThatFits) + .previewDisplayName("Loading large button with text") + + SDDSButton.transparentLoadingButton(size: .large) + .previewLayout(.sizeThatFits) + .previewDisplayName("Transparent loading large button with text") + } +} diff --git a/SDDSComponents/SDDSComponentsPreview/Components/SDDSButton/SDDSButtonPreviewTextWithLeftIconAndSubtitle.swift b/SDDSComponents/SDDSComponentsPreview/Components/SDDSButton/SDDSButtonPreviewTextWithLeftIconAndSubtitle.swift new file mode 100644 index 000000000..d7a3c1aed --- /dev/null +++ b/SDDSComponents/SDDSComponentsPreview/Components/SDDSButton/SDDSButtonPreviewTextWithLeftIconAndSubtitle.swift @@ -0,0 +1,36 @@ +import Foundation +import SDDSComponents +import SwiftUI + +//// MARK: - Preview: Text with Left Icon and Subtitle +struct SDDSButtonPreviewTextWithLeftIconAndSubtitle: PreviewProvider { + static var previews: some View { + SDDSButton.textWithLeftIconAndSubtitle(size: .large) + .previewLayout(.sizeThatFits) + .previewDisplayName("Large button with text, subtitle, and left icon") + + SDDSButton.textWithLeftIconAndSubtitle(size: .large, layoutMode: .fixedWidth(.packed)) + .previewLayout(.fixed(width: 200, height: ButtonSize.large.height)) + .previewDisplayName("Large button with text, subtitle, left icon, fixed centered layout") + + SDDSButton.textWithLeftIconAndSubtitle(size: .large, layoutMode: .fixedWidth(.spaceBetween)) + .previewLayout(.fixed(width: 200, height: ButtonSize.large.height)) + .previewDisplayName("Large button with text, subtitle, left icon, fixed side by side layout") + + SDDSButton.textWithLeftIconAndSubtitle(size: .medium) + .previewLayout(.sizeThatFits) + .previewDisplayName("Medium button with text, subtitle, and left icon") + + SDDSButton.textWithLeftIconAndSubtitle(size: .small) + .previewLayout(.sizeThatFits) + .previewDisplayName("Small button with text, subtitle, and left icon") + + SDDSButton.textWithLeftIconAndSubtitle(size: .extraSmall) + .previewLayout(.sizeThatFits) + .previewDisplayName("XS button with text, subtitle, and left icon") + + SDDSButton.textWithLeftIconAndSubtitle(size: .extraExtraSmall) + .previewLayout(.sizeThatFits) + .previewDisplayName("XXS button with text, subtitle, and left icon") + } +} diff --git a/SDDSComponents/SDDSComponentsPreview/Components/SDDSButton/SDDSButtonPreviewTextWithRightIcon.swift b/SDDSComponents/SDDSComponentsPreview/Components/SDDSButton/SDDSButtonPreviewTextWithRightIcon.swift new file mode 100644 index 000000000..50b11b71c --- /dev/null +++ b/SDDSComponents/SDDSComponentsPreview/Components/SDDSButton/SDDSButtonPreviewTextWithRightIcon.swift @@ -0,0 +1,36 @@ +import Foundation +import SDDSComponents +import SwiftUI + +//// MARK: - Preview: Text with Right Icon +struct SDDSButtonPreviewTextWithRightIcon: PreviewProvider { + static var previews: some View { + SDDSButton.textWithRightIcon(size: .large) + .previewLayout(.sizeThatFits) + .previewDisplayName("Large button with text and right icon") + + SDDSButton.textWithRightIcon(size: .large, layoutMode: .fixedWidth(.packed)) + .previewLayout(.fixed(width: 200, height: ButtonSize.large.height)) + .previewDisplayName("Large button with text and right icon, fixed centered layout") + + SDDSButton.textWithRightIcon(size: .large, layoutMode: .fixedWidth(.spaceBetween)) + .previewLayout(.fixed(width: 200, height: ButtonSize.large.height)) + .previewDisplayName("Large button with text and right icon, fixed side by side layout") + + SDDSButton.textWithRightIcon(size: .medium) + .previewLayout(.sizeThatFits) + .previewDisplayName("Medium button with text and right icon") + + SDDSButton.textWithRightIcon(size: .small) + .previewLayout(.sizeThatFits) + .previewDisplayName("Small button with text and right icon") + + SDDSButton.textWithRightIcon(size: .extraSmall) + .previewLayout(.sizeThatFits) + .previewDisplayName("XS button with text and right icon") + + SDDSButton.textWithRightIcon(size: .extraExtraSmall) + .previewLayout(.sizeThatFits) + .previewDisplayName("XXS button with text and right icon") + } +} diff --git a/SDDSComponents/SDDSComponentsPreview/Components/SDDSButton/SDDSButtonPreviewTextWithSubtitle.swift b/SDDSComponents/SDDSComponentsPreview/Components/SDDSButton/SDDSButtonPreviewTextWithSubtitle.swift new file mode 100644 index 000000000..9dbdc4ed5 --- /dev/null +++ b/SDDSComponents/SDDSComponentsPreview/Components/SDDSButton/SDDSButtonPreviewTextWithSubtitle.swift @@ -0,0 +1,36 @@ +import Foundation +import SDDSComponents +import SwiftUI + +// MARK: - Preview: Text with Subtitle +struct SDDSButtonPreviewTextWithSubtitle: PreviewProvider { + static var previews: some View { + SDDSButton.defaultTextWithSubtitle(size: .large) + .previewLayout(.sizeThatFits) + .previewDisplayName("Large button with text and subtitle") + + SDDSButton.defaultTextWithSubtitle(size: .large, layoutMode: .fixedWidth(.packed)) + .previewLayout(.fixed(width: 200, height: ButtonSize.large.height)) + .previewDisplayName("Large button with text and subtitle, fixed centered layout") + + SDDSButton.defaultTextWithSubtitle(size: .large, layoutMode: .fixedWidth(.spaceBetween)) + .previewLayout(.fixed(width: 200, height: ButtonSize.large.height)) + .previewDisplayName("Large button with text and subtitle, fixed side by side layout") + + SDDSButton.defaultTextWithSubtitle(size: .medium) + .previewLayout(.sizeThatFits) + .previewDisplayName("Medium button with text and subtitle") + + SDDSButton.defaultTextWithSubtitle(size: .small) + .previewLayout(.sizeThatFits) + .previewDisplayName("Small button with text and subtitle") + + SDDSButton.defaultTextWithSubtitle(size: .extraSmall) + .previewLayout(.sizeThatFits) + .previewDisplayName("XS button with text and subtitle") + + SDDSButton.defaultTextWithSubtitle(size: .extraExtraSmall) + .previewLayout(.sizeThatFits) + .previewDisplayName("XXS button with text and subtitle") + } +} diff --git a/SDDSComponents/SDDSComponentsPreview/Components/SDDSCheckbox/CheckboxAppearance.swift b/SDDSComponents/SDDSComponentsPreview/Components/SDDSCheckbox/CheckboxAppearance.swift new file mode 100644 index 000000000..d52423cc1 --- /dev/null +++ b/SDDSComponents/SDDSComponentsPreview/Components/SDDSCheckbox/CheckboxAppearance.swift @@ -0,0 +1,17 @@ +import Foundation +import SwiftUI +import SDDSServTheme +import SDDSComponents + +extension CheckboxAppearance { + static var `default`: Self { + .init( + titleTypography: RadioboxTypography.label, + subtitleTypography: RadioboxTypography.description, + titleColor: .backgroundInversePrimary, + subtitleColor: .surfaceInverseSolidPrimary.withOpacity(0.56), + disabledAlpha: 0.4, + imageTintColor: .surfaceDefaultAccent + ) + } +} diff --git a/SDDSComponents/SDDSComponentsPreview/Components/SDDSCheckbox/CheckboxTypography.swift b/SDDSComponents/SDDSComponentsPreview/Components/SDDSCheckbox/CheckboxTypography.swift new file mode 100644 index 000000000..fe61c9fd9 --- /dev/null +++ b/SDDSComponents/SDDSComponentsPreview/Components/SDDSCheckbox/CheckboxTypography.swift @@ -0,0 +1,40 @@ +import Foundation +import SDDSServTheme +import SDDSComponents + +struct CheckboxTypography: GeneralTypographyConfiguration { + typealias S = SelectionControlSizeConfiguration + + let medium: TypographyToken? + let small: TypographyToken? + + init(medium: TypographyToken?, small: TypographyToken?) { + self.medium = medium + self.small = small + } + + func typography(with size: SelectionControlSizeConfiguration) -> TypographyToken? { + switch size as? SDDSRadioboxSize { + case .medium: + return medium + case .small, .none: + return small + } + } +} + +extension CheckboxTypography { + static var label: TypographyConfiguration { + RadioboxTypography( + medium: Typographies.bodyMNormal.typography, + small: Typographies.bodySNormal.typography + ).asContainer + } + + static var description: TypographyConfiguration { + RadioboxTypography( + medium: Typographies.bodyMNormal.typography, + small: Typographies.bodyXsNormal.typography + ).asContainer + } +} diff --git a/SDDSComponents/SDDSComponentsPreview/Components/SDDSCheckbox/SDDSCheckbox+Preview.swift b/SDDSComponents/SDDSComponentsPreview/Components/SDDSCheckbox/SDDSCheckbox+Preview.swift new file mode 100644 index 000000000..394d6354e --- /dev/null +++ b/SDDSComponents/SDDSComponentsPreview/Components/SDDSCheckbox/SDDSCheckbox+Preview.swift @@ -0,0 +1,84 @@ +import Foundation +import SDDSComponents +import SwiftUI + +// MARK: - Preview +struct SDDSCheckboxPreview: PreviewProvider { + static var previews: some View { + Group { + SDDSCheckbox.defaultExample + .previewLayout(PreviewLayout.sizeThatFits) + .previewDisplayName("Default") + .debug() + + SDDSCheckbox.withoutDescription + .previewLayout(PreviewLayout.sizeThatFits) + .previewDisplayName("Without Description") + .debug() + + SDDSCheckbox.withoutLabel + .previewLayout(PreviewLayout.sizeThatFits) + .previewDisplayName("Without Label") + .debug() + + SDDSCheckbox.withoutLabelAndDescription + .previewLayout(PreviewLayout.sizeThatFits) + .previewDisplayName("Without Label and Description") + .debug() + } + } +} + +extension SDDSCheckbox { + static var defaultExample: SDDSCheckbox { + .init( + state: .constant(.selected), + title: "Label", + subtitle: "Description", + isEnabled: true, + images: .checkbox, + size: SDDSCheckboxSize.medium, + appearance: .default, + accessibility: SelectionControlAccessibility() + ) + } + + static var withoutDescription: SDDSCheckbox { + .init( + state: .constant(.selected), + title: "Label", + subtitle: nil, + isEnabled: true, + images: .checkbox, + size: SDDSCheckboxSize.medium, + appearance: .default, + accessibility: SelectionControlAccessibility() + ) + } + + static var withoutLabel: SDDSCheckbox { + .init( + state: .constant(.selected), + title: "", + subtitle: "Description", + isEnabled: true, + images: .checkbox, + size: SDDSCheckboxSize.medium, + appearance: .default, + accessibility: SelectionControlAccessibility() + ) + } + + static var withoutLabelAndDescription: SDDSCheckbox { + .init( + state: .constant(.selected), + title: "", + subtitle: nil, + isEnabled: true, + images: .checkbox, + size: SDDSCheckboxSize.medium, + appearance: .default, + accessibility: SelectionControlAccessibility() + ) + } +} diff --git a/SDDSComponents/SDDSComponentsPreview/Components/SDDSCheckbox/SDDSCheckboxSize.swift b/SDDSComponents/SDDSComponentsPreview/Components/SDDSCheckbox/SDDSCheckboxSize.swift new file mode 100644 index 000000000..a7e31b70f --- /dev/null +++ b/SDDSComponents/SDDSComponentsPreview/Components/SDDSCheckbox/SDDSCheckboxSize.swift @@ -0,0 +1,34 @@ +import Foundation +import SwiftUI +import SDDSComponents + +public enum SDDSCheckboxSize: SelectionControlSizeConfiguration { + case medium + case small + + public var debugDescription: String { + String(reflecting: self) + } + + public var imageSize: CGSize { + switch self { + case .medium: + .init(width: 20, height: 20) + case .small: + .init(width: 16, height: 16) + } + } + + public var verticalGap: CGFloat { + 0.0 + } + + public var horizontalGap: CGFloat { + switch self { + case .medium: + 12.0 + case .small: + 8.0 + } + } +} diff --git a/SDDSComponents/SDDSComponentsPreview/Components/SDDSCheckboxGroup/SDDSCheckboxGroup+Preview.swift b/SDDSComponents/SDDSComponentsPreview/Components/SDDSCheckboxGroup/SDDSCheckboxGroup+Preview.swift new file mode 100644 index 000000000..01c7a8cfe --- /dev/null +++ b/SDDSComponents/SDDSComponentsPreview/Components/SDDSCheckboxGroup/SDDSCheckboxGroup+Preview.swift @@ -0,0 +1,47 @@ +import Foundation +import SwiftUI +import SDDSComponents +import SDDSServTheme + +// Пример данных и конфигурации для предварительного просмотра +struct SDDSCheckboxGroupPreview: PreviewProvider { + static var previews: some View { + let parentData = CheckboxData( + state: .constant(.deselected), + title: "Parent Label", + subtitle: "Parent Description", + isEnabled: true, + images: SelectionControlStateImages.checkbox, + size: SDDSCheckboxSize.medium, + appearance: CheckboxAppearance.default, + accessibility: SelectionControlAccessibility() + ) + + let childData = (0..<5).map { index in + CheckboxData( + state: .constant(.deselected), + title: "Label \(index + 1)", + subtitle: "Description \(index + 1)", + isEnabled: true, + images: SelectionControlStateImages.checkbox, + size: SDDSCheckboxSize.medium, + appearance: CheckboxAppearance.default, + accessibility: SelectionControlAccessibility() + ) + } + + return Group { + SDDSCheckboxGroup(behaviour: .hierarchical(parent: parentData, child: childData), horizontalIndent: 24, verticalSpacing: 8) + .previewLayout(PreviewLayout.sizeThatFits) + .previewDisplayName("SDDSCheckboxGroup with Parent") + .padding() + .debug() + + SDDSCheckboxGroup(behaviour: .default(data: childData), horizontalIndent: 24, verticalSpacing: 8) + .previewLayout(PreviewLayout.sizeThatFits) + .previewDisplayName("SDDSCheckboxGroup without Parent") + .padding() + .debug() + } + } +} diff --git a/SDDSComponents/SDDSComponentsPreview/Components/SDDSChip/ChipAppearance.swift b/SDDSComponents/SDDSComponentsPreview/Components/SDDSChip/ChipAppearance.swift new file mode 100644 index 000000000..91af31dbf --- /dev/null +++ b/SDDSComponents/SDDSComponentsPreview/Components/SDDSChip/ChipAppearance.swift @@ -0,0 +1,16 @@ +import Foundation +import SwiftUI +import SDDSServTheme +import SDDSComponents + +extension ChipAppearance { + static var `default`: ChipAppearance { + .init( + titleColor: Color.white.equalToken, + titleTypography: .semibold14, + imageTintColor: Color.white.equalToken, + buttonTintColor: Color.gray.equalToken, + disabledAlpha: 0.5 + ) + } +} diff --git a/SDDSComponents/SDDSComponentsPreview/Components/SDDSChip/SDDSChip+Preview.swift b/SDDSComponents/SDDSComponentsPreview/Components/SDDSChip/SDDSChip+Preview.swift new file mode 100644 index 000000000..f5a757098 --- /dev/null +++ b/SDDSComponents/SDDSComponentsPreview/Components/SDDSChip/SDDSChip+Preview.swift @@ -0,0 +1,102 @@ +import Foundation +import SwiftUI +import SDDSComponents + +extension SDDSChip { + static var defaultExample: SDDSChip { + SDDSChip( + title: "Label", + isEnabled: true, + iconImage: Image.image("chipIcon"), + buttonImage: Image.image("chipClose"), + appearance: .default, + size: SDDSChipSize.medium(.rounded), + removeAction: {} + ) + } + + static var defaultBorderExample: SDDSChip { + SDDSChip( + title: "Label", + isEnabled: true, + iconImage: Image.image("chipIcon"), + buttonImage: Image.image("chipClose"), + appearance: .default, + size: SDDSChipSize.medium(.rounded), + removeAction: {} + ) + } + + static var noButtonImageExample: SDDSChip { + SDDSChip( + title: "Label", + isEnabled: true, + iconImage: Image.image("chipIcon"), + buttonImage: nil, + appearance: .default, + size: SDDSChipSize.medium(.rounded), + removeAction: {} + ) + } + + static var noIconImageExample: SDDSChip { + SDDSChip( + title: "Label", + isEnabled: true, + iconImage: nil, + buttonImage: Image.image("chipClose"), + appearance: .default, + size: SDDSChipSize.medium(.rounded), + removeAction: {} + ) + } + + static var onlyTitleExample: SDDSChip { + SDDSChip( + title: "Label", + isEnabled: true, + iconImage: nil, + buttonImage: nil, + appearance: .default, + size: SDDSChipSize.medium(.rounded), + removeAction: {} + ) + } +} + +// MARK: - Preview +struct SDDSChipPreview: PreviewProvider { + static var previews: some View { + Group { + SDDSChip.defaultExample + .previewLayout(PreviewLayout.sizeThatFits) + .previewDisplayName("Default") + .padding() + .debug() + + SDDSChip.defaultBorderExample + .previewLayout(PreviewLayout.sizeThatFits) + .previewDisplayName("Default Border") + .padding() + .debug() + + SDDSChip.noButtonImageExample + .previewLayout(PreviewLayout.sizeThatFits) + .previewDisplayName("No Button Image") + .padding() + .debug() + + SDDSChip.noIconImageExample + .previewLayout(PreviewLayout.sizeThatFits) + .previewDisplayName("No Icon Image") + .padding() + .debug() + + SDDSChip.onlyTitleExample + .previewLayout(PreviewLayout.sizeThatFits) + .previewDisplayName("Only Title") + .padding() + .debug() + } + } +} diff --git a/SDDSComponents/SDDSComponentsPreview/Components/SDDSChip/SDDSChipSize.swift b/SDDSComponents/SDDSComponentsPreview/Components/SDDSChip/SDDSChipSize.swift new file mode 100644 index 000000000..b6bf75a50 --- /dev/null +++ b/SDDSComponents/SDDSComponentsPreview/Components/SDDSChip/SDDSChipSize.swift @@ -0,0 +1,105 @@ +import Foundation +import SDDSComponents + +public enum SDDSChipSize: ChipSizeConfiguration { + case large(ChipBorderStyle) + case medium(ChipBorderStyle) + case small(ChipBorderStyle) + case extraSmall(ChipBorderStyle) + + public var debugDescription: String { + String(reflecting: self) + } + + public var iconImageSize: CGSize? { + switch self { + case .large: + return CGSize(width: 24, height: 24) + case .medium: + return CGSize(width: 20, height: 20) + case .small: + return CGSize(width: 16, height: 16) + case .extraSmall: + return CGSize(width: 12, height: 12) + } + } + + public var buttonImageSize: CGSize? { + switch self { + case .large: + return CGSize(width: 24, height: 24) + case .medium: + return CGSize(width: 20, height: 20) + case .small: + return CGSize(width: 16, height: 16) + case .extraSmall: + return CGSize(width: 12, height: 12) + } + } + + public var leadingInset: CGFloat { + switch self { + case .large: + return 16 + case .medium: + return 14 + case .small: + return 12 + case .extraSmall: + return 10 + } + } + + public var trailingInset: CGFloat { + switch self { + case .large: + return 16 + case .medium: + return 14 + case .small: + return 12 + case .extraSmall: + return 10 + } + } + + public var spacing: CGFloat { + switch self { + case .large: + return 10 + case .medium: + return 8 + case .small: + return 6 + case .extraSmall: + return 4 + } + } + + public var height: CGFloat { + switch self { + case .large: + return 48 + case .medium: + return 40 + case .small: + return 32 + case .extraSmall: + return 24 + } + } + + public var borderStyle: ChipBorderStyle { + switch self { + case .large(let style): + return style + case .medium(let style): + return style + case .small(let style): + return style + case .extraSmall(let style): + return style + } + } + +} diff --git a/SDDSComponents/SDDSComponentsPreview/Components/SDDSChipGroup/DefaultChipGroupSize.swift b/SDDSComponents/SDDSComponentsPreview/Components/SDDSChipGroup/DefaultChipGroupSize.swift new file mode 100644 index 000000000..0a92b15ea --- /dev/null +++ b/SDDSComponents/SDDSComponentsPreview/Components/SDDSChipGroup/DefaultChipGroupSize.swift @@ -0,0 +1,32 @@ +import Foundation +import SwiftUI +import SDDSComponents + +/** + Стандартная конфигурация размеров группы чипов. + + - Properties: + - debugDescription: Описание для отладки. + - insets: Внутренние отступы. + - maxColumns: Максимальное количество столбцов в ряду. + - alignment: Выравнивание группы чипов. + */ +public struct DefaultChipGroupSize: ChipGroupSizeConfiguration { + public var debugDescription: String { + String(reflecting: self) + } + + public var insets: EdgeInsets { + EdgeInsets(top: 8, leading: 8, bottom: 8, trailing: 8) + } + + public var maxColumns: Int { + 8 + } + + public var alignment: ChipGroupAlignment + + public init(alignment: ChipGroupAlignment = .center) { + self.alignment = alignment + } +} diff --git a/SDDSComponents/SDDSComponentsPreview/Components/SDDSChipGroup/SDDSChipGroup+Preview.swift b/SDDSComponents/SDDSComponentsPreview/Components/SDDSChipGroup/SDDSChipGroup+Preview.swift new file mode 100644 index 000000000..9ff3ab3e3 --- /dev/null +++ b/SDDSComponents/SDDSComponentsPreview/Components/SDDSChipGroup/SDDSChipGroup+Preview.swift @@ -0,0 +1,64 @@ +import Foundation +import SDDSComponents +import SwiftUI + +// Пример данных и конфигурации для предварительного просмотра +struct SDDSChipGroupPreview: PreviewProvider { + static var previews: some View { + let chipAppearance = ChipAppearance( + titleColor: Color.white.equalToken, + titleTypography: .semibold14, + imageTintColor: Color.white.equalToken, + buttonTintColor: Color.gray.equalToken, + disabledAlpha: 0.5 + ) + + let chipSize = SDDSChipSize.medium(.rounded) + let chipAccessibility = ChipAccessibility() + + let chipData = (1...12).map { index in + ChipData( + title: "Label", + isEnabled: true, + iconImage: Image.image("chipIcon"), + buttonImage: Image.image("chipClose"), + appearance: chipAppearance, + size: chipSize, + accessibility: chipAccessibility, + removeAction: {} + ) + } + + return Group { + SDDSChipGroup(data: chipData, size: DefaultChipGroupSize(alignment: .center)) + .previewLayout(PreviewLayout.sizeThatFits) + .previewDisplayName("Standard Layout - Center") + .padding() + .debug() + + SDDSChipGroup(data: chipData, size: DefaultChipGroupSize(alignment: .left)) + .previewLayout(PreviewLayout.sizeThatFits) + .previewDisplayName("Standard Layout - Left") + .padding() + .debug() + + SDDSChipGroup(data: chipData, size: DefaultChipGroupSize(alignment: .right)) + .previewLayout(PreviewLayout.sizeThatFits) + .previewDisplayName("Standard Layout - Right") + .padding() + .debug() + + SDDSChipGroup(data: chipData, size: DefaultChipGroupSize(alignment: .decreasingLeft)) + .previewLayout(PreviewLayout.sizeThatFits) + .previewDisplayName("Decreasing Layout - Left") + .padding() + .debug() + + SDDSChipGroup(data: chipData, size: DefaultChipGroupSize(alignment: .decreasingRight)) + .previewLayout(PreviewLayout.sizeThatFits) + .previewDisplayName("Decreasing Layout - Right") + .padding() + .debug() + } + } +} diff --git a/SDDSComponents/SDDSComponentsPreview/Components/SDDSComponentsPreview.swift b/SDDSComponents/SDDSComponentsPreview/Components/SDDSComponentsPreview.swift new file mode 100644 index 000000000..01731a236 --- /dev/null +++ b/SDDSComponents/SDDSComponentsPreview/Components/SDDSComponentsPreview.swift @@ -0,0 +1,3 @@ +import Foundation + +final class SDDSComponentsPreview {} diff --git a/SDDSComponents/SDDSComponentsPreview/Components/SDDSProgressBar/DefaultProgressBarSize.swift b/SDDSComponents/SDDSComponentsPreview/Components/SDDSProgressBar/DefaultProgressBarSize.swift new file mode 100644 index 000000000..3e11ee3ad --- /dev/null +++ b/SDDSComponents/SDDSComponentsPreview/Components/SDDSProgressBar/DefaultProgressBarSize.swift @@ -0,0 +1,27 @@ +import Foundation +import SDDSComponents + +// Size configuration +public struct DefaultProgressBarSize: ProgressBarSizeConfiguration { + public var debugDescription: String { + String(reflecting: self) + } + + public var height: CGFloat { + 4.0 + } + + public var indicatorHeight: CGFloat { + 6.0 + } + + public var cornerRadius: CGFloat { + 2.0 + } + + public var indicatorCornerRadius: CGFloat { + 6.0 + } + + public init() {} +} diff --git a/SDDSComponents/SDDSComponentsPreview/Components/SDDSProgressBar/ProgressBarAppearance.swift b/SDDSComponents/SDDSComponentsPreview/Components/SDDSProgressBar/ProgressBarAppearance.swift new file mode 100644 index 000000000..92e35e29c --- /dev/null +++ b/SDDSComponents/SDDSComponentsPreview/Components/SDDSProgressBar/ProgressBarAppearance.swift @@ -0,0 +1,21 @@ +import Foundation +import SDDSComponents +import SDDSServTheme +import SwiftUI + +public extension ProgressBarAppearance { + static var accent: ProgressBarAppearance { + .init( + tintFillStyle: .color(ColorToken.surfaceDefaultAccent), + trackColor: ColorToken.surfaceDefaultTransparentSecondary + ) + } + + static var gradientAccent: ProgressBarAppearance { + .init( + tintFillStyle: .gradient(GradientToken.surfaceDefaultAccentGradient), + trackColor: ColorToken.surfaceDefaultTransparentSecondary + ) + } +} + diff --git a/SDDSComponents/SDDSComponentsPreview/Components/SDDSProgressBar/SDDSProgress+Preview.swift b/SDDSComponents/SDDSComponentsPreview/Components/SDDSProgressBar/SDDSProgress+Preview.swift new file mode 100644 index 000000000..117345cf9 --- /dev/null +++ b/SDDSComponents/SDDSComponentsPreview/Components/SDDSProgressBar/SDDSProgress+Preview.swift @@ -0,0 +1,92 @@ +import Foundation +import SwiftUI +import SDDSComponents + +// MARK: - Preview +struct SDDSProgressViewPreview: PreviewProvider { + static var previews: some View { + Group { + SDDSProgressView.accent(progress: 0) + .previewLayout(PreviewLayout.sizeThatFits) + .previewDisplayName("0%") + .padding() + .debug() + + SDDSProgressView.accent(progress: 0.3) + .previewLayout(PreviewLayout.sizeThatFits) + .previewDisplayName("30%") + .padding() + .debug() + + SDDSProgressView.accent(progress: 0.5) + .previewLayout(PreviewLayout.sizeThatFits) + .previewDisplayName("50%") + .padding() + .debug() + + SDDSProgressView.accent(progress: 0.8) + .previewLayout(PreviewLayout.sizeThatFits) + .previewDisplayName("80%") + .padding() + .debug() + + SDDSProgressView.accent(progress: 1.0) + .previewLayout(PreviewLayout.sizeThatFits) + .previewDisplayName("100%") + .padding() + .debug() + + SDDSProgressView.gradientAccent(progress: 0) + .previewLayout(PreviewLayout.sizeThatFits) + .previewDisplayName("Gradient 0%") + .padding() + .debug() + + SDDSProgressView.gradientAccent(progress: 0.3) + .previewLayout(PreviewLayout.sizeThatFits) + .previewDisplayName("Gradient 30%") + .padding() + .debug() + + SDDSProgressView.gradientAccent(progress: 0.5) + .previewLayout(PreviewLayout.sizeThatFits) + .previewDisplayName("Gradient 50%") + .padding() + .debug() + + SDDSProgressView.gradientAccent(progress: 0.8) + .previewLayout(PreviewLayout.sizeThatFits) + .previewDisplayName("Gradient 80%") + .padding() + .debug() + + SDDSProgressView.gradientAccent(progress: 1.0) + .previewLayout(PreviewLayout.sizeThatFits) + .previewDisplayName("Gradient 100%") + .padding() + .debug() + } + } +} + +extension SDDSProgressView { + static func accent(progress: CGFloat) -> SDDSProgressView { + .init( + progress: .constant(progress), + isEnabled: true, + appearance: .accent, + size: DefaultProgressBarSize(), + accessibility: ProgressBarAccessibility() + ) + } + + static func gradientAccent(progress: CGFloat) -> SDDSProgressView { + .init( + progress: .constant(progress), + isEnabled: true, + appearance: .gradientAccent, + size: DefaultProgressBarSize(), + accessibility: ProgressBarAccessibility() + ) + } +} diff --git a/SDDSComponents/SDDSComponentsPreview/Components/SDDSRadiobox/RadioboxAppearance.swift b/SDDSComponents/SDDSComponentsPreview/Components/SDDSRadiobox/RadioboxAppearance.swift new file mode 100644 index 000000000..6d41b3bad --- /dev/null +++ b/SDDSComponents/SDDSComponentsPreview/Components/SDDSRadiobox/RadioboxAppearance.swift @@ -0,0 +1,33 @@ +import Foundation +import SwiftUI +import SDDSComponents +import SDDSServTheme + +extension RadioboxAppearance { + static var `default`: Self { + .init( + titleTypography: RadioboxTypography.label, + subtitleTypography: RadioboxTypography.description, + titleColor: .backgroundInversePrimary, + subtitleColor: .surfaceInverseSolidPrimary.withOpacity(0.56), + disabledAlpha: 0.4, + imageTintColor: .surfaceDefaultAccent + ) + } +} + +extension RadioboxTypography { + static var label: TypographyConfiguration { + RadioboxTypography( + medium: Typographies.bodyMNormal.typography, + small: Typographies.bodySNormal.typography + ).asContainer + } + + static var description: TypographyConfiguration { + RadioboxTypography( + medium: Typographies.bodyMNormal.typography, + small: Typographies.bodyXsNormal.typography + ).asContainer + } +} diff --git a/SDDSComponents/SDDSComponentsPreview/Components/SDDSRadiobox/RadioboxTypography.swift b/SDDSComponents/SDDSComponentsPreview/Components/SDDSRadiobox/RadioboxTypography.swift new file mode 100644 index 000000000..9bcec9330 --- /dev/null +++ b/SDDSComponents/SDDSComponentsPreview/Components/SDDSRadiobox/RadioboxTypography.swift @@ -0,0 +1,24 @@ +import Foundation +import SDDSServTheme +import SDDSComponents + +struct RadioboxTypography: GeneralTypographyConfiguration { + typealias S = SelectionControlSizeConfiguration + + let medium: TypographyToken? + let small: TypographyToken? + + init(medium: TypographyToken?, small: TypographyToken?) { + self.medium = medium + self.small = small + } + + func typography(with size: SelectionControlSizeConfiguration) -> TypographyToken? { + switch size as? SDDSRadioboxSize { + case .medium: + return medium + case .small, .none: + return small + } + } +} diff --git a/SDDSComponents/SDDSComponentsPreview/Components/SDDSRadiobox/SDDSRadiobox+Preview.swift b/SDDSComponents/SDDSComponentsPreview/Components/SDDSRadiobox/SDDSRadiobox+Preview.swift new file mode 100644 index 000000000..20367de9c --- /dev/null +++ b/SDDSComponents/SDDSComponentsPreview/Components/SDDSRadiobox/SDDSRadiobox+Preview.swift @@ -0,0 +1,84 @@ +import Foundation +import SwiftUI +import SDDSComponents + +// MARK: - Preview +struct SDDSRadioboxPreview: PreviewProvider { + static var previews: some View { + Group { + SDDSRadiobox.defaultExample + .previewLayout(PreviewLayout.sizeThatFits) + .previewDisplayName("Default") + .debug() + + SDDSRadiobox.withoutDescription + .previewLayout(PreviewLayout.sizeThatFits) + .previewDisplayName("Without Description") + .debug() + + SDDSRadiobox.withoutLabel + .previewLayout(PreviewLayout.sizeThatFits) + .previewDisplayName("Without Label") + .debug() + + SDDSRadiobox.withoutLabelAndDescription + .previewLayout(PreviewLayout.sizeThatFits) + .previewDisplayName("Without Label and Description") + .debug() + } + } +} + +public extension SDDSRadiobox { + static var defaultExample: SDDSRadiobox { + .init( + isSelected: .constant(true), + title: "Label", + subtitle: "Description", + isEnabled: true, + images: .defaultImages, + size: SDDSRadioboxSize.medium, + appearance: .default, + accessibility: SelectionControlAccessibility() + ) + } + + static var withoutDescription: SDDSRadiobox { + .init( + isSelected: .constant(true), + title: "Label", + subtitle: nil, + isEnabled: true, + images: .defaultImages, + size: SDDSRadioboxSize.medium, + appearance: .default, + accessibility: SelectionControlAccessibility() + ) + } + + static var withoutLabel: SDDSRadiobox { + .init( + isSelected: .constant(true), + title: "", + subtitle: "Description", + isEnabled: true, + images: .defaultImages, + size: SDDSRadioboxSize.medium, + appearance: .default, + accessibility: SelectionControlAccessibility() + ) + } + + static var withoutLabelAndDescription: SDDSRadiobox { + .init( + isSelected: .constant(true), + title: "", + subtitle: nil, + isEnabled: true, + images: .defaultImages, + size: SDDSRadioboxSize.medium, + appearance: .default, + accessibility: SelectionControlAccessibility() + ) + } +} diff --git a/SDDSComponents/SDDSComponentsPreview/Components/SDDSRadiobox/SDDSRadioboxSize.swift b/SDDSComponents/SDDSComponentsPreview/Components/SDDSRadiobox/SDDSRadioboxSize.swift new file mode 100644 index 000000000..09389900b --- /dev/null +++ b/SDDSComponents/SDDSComponentsPreview/Components/SDDSRadiobox/SDDSRadioboxSize.swift @@ -0,0 +1,33 @@ +import Foundation +import SDDSComponents + +public enum SDDSRadioboxSize: SelectionControlSizeConfiguration { + case medium + case small + + public var debugDescription: String { + String(reflecting: self) + } + + public var imageSize: CGSize { + switch self { + case .medium: + .init(width: 24, height: 24) + case .small: + .init(width: 16, height: 16) + } + } + + public var verticalGap: CGFloat { + 0.0 + } + + public var horizontalGap: CGFloat { + switch self { + case .medium: + 12.0 + case .small: + 8.0 + } + } +} diff --git a/SDDSComponents/SDDSComponentsPreview/Components/SDDSRadioboxGroup/SDDSRadioboxGroup+Preview.swift b/SDDSComponents/SDDSComponentsPreview/Components/SDDSRadioboxGroup/SDDSRadioboxGroup+Preview.swift new file mode 100644 index 000000000..bed9dd451 --- /dev/null +++ b/SDDSComponents/SDDSComponentsPreview/Components/SDDSRadioboxGroup/SDDSRadioboxGroup+Preview.swift @@ -0,0 +1,26 @@ +import Foundation +import SwiftUI +import SDDSComponents + +/** + Пример для предварительного просмотра `SDDSRadioboxGroup`. + */ +struct SDDSRadioboxGroupPreview: PreviewProvider { + static var previews: some View { + let radioboxData = (0..<5).map { index in + RadioboxData( + title: "Option \(index + 1)", + subtitle: "Description \(index + 1)", + isSelected: .constant(index == 0), + images: RadioboxImages.defaultImages, + size: SDDSRadioboxSize.medium, + appearance: RadioboxAppearance.default, + accessibility: SelectionControlAccessibility() + ) + } + + return SDDSRadioboxGroup(radioboxData: radioboxData, verticalSpacing: 8) + .previewLayout(.sizeThatFits) + .previewDisplayName("SDDSRadioboxGroup Preview") + } +} diff --git a/SDDSComponents/SDDSComponentsPreview/Components/SDDSSwitch/SDDSSwitch+Preview.swift b/SDDSComponents/SDDSComponentsPreview/Components/SDDSSwitch/SDDSSwitch+Preview.swift new file mode 100644 index 000000000..62d28eded --- /dev/null +++ b/SDDSComponents/SDDSComponentsPreview/Components/SDDSSwitch/SDDSSwitch+Preview.swift @@ -0,0 +1,78 @@ +import Foundation +import SDDSComponents +import SwiftUI + +// MARK: - Preview +struct SDDSSwitchPreview: PreviewProvider { + static var previews: some View { + SDDSSwitch.defaultExample + .previewLayout(PreviewLayout.sizeThatFits) + .previewDisplayName("Default") + .debug() + + SDDSSwitch.emptyDescription + .previewLayout(PreviewLayout.sizeThatFits) + .previewDisplayName("Empty Description") + .debug() + + SDDSSwitch.emptyTitle + .previewLayout(PreviewLayout.sizeThatFits) + .previewDisplayName("Empty Title") + .debug() + + SDDSSwitch.onlyToggle + .previewLayout(PreviewLayout.sizeThatFits) + .previewDisplayName("Only Toggle") + .debug() + } +} + +extension SDDSSwitch { + static var defaultExample: SDDSSwitch { + SDDSSwitch( + title: "Title", + subtitle: "Description", + isOn: .constant(true), + isEnabled: true, + size: SDDSSwitchSize.medium, + appearance: SwitchAppearance.defaultAppearance, + switchAccessibility: SwitchAccessibility() + ) + } + + static var emptyDescription: SDDSSwitch { + SDDSSwitch( + title: "Title", + subtitle: "", + isOn: .constant(true), + isEnabled: true, + size: SDDSSwitchSize.medium, + appearance: SwitchAppearance.defaultAppearance, + switchAccessibility: SwitchAccessibility() + ) + } + + static var emptyTitle: SDDSSwitch { + SDDSSwitch( + title: "", + subtitle: "Description", + isOn: .constant(true), + isEnabled: true, + size: SDDSSwitchSize.medium, + appearance: SwitchAppearance.defaultAppearance, + switchAccessibility: SwitchAccessibility() + ) + } + + static var onlyToggle: SDDSSwitch { + SDDSSwitch( + title: "", + subtitle: "", + isOn: .constant(true), + isEnabled: true, + size: SDDSSwitchSize.medium, + appearance: SwitchAppearance.defaultAppearance, + switchAccessibility: SwitchAccessibility() + ) + } +} diff --git a/SDDSComponents/SDDSComponentsPreview/Components/SDDSSwitch/SDDSSwitchSize.swift b/SDDSComponents/SDDSComponentsPreview/Components/SDDSSwitch/SDDSSwitchSize.swift new file mode 100644 index 000000000..88a065f31 --- /dev/null +++ b/SDDSComponents/SDDSComponentsPreview/Components/SDDSSwitch/SDDSSwitchSize.swift @@ -0,0 +1,20 @@ +import Foundation +import SDDSComponents + +enum SDDSSwitchSize: SwitchSizeConfiguration { + case large + case medium + case small + + var debugDescription: String { + String(reflecting: self) + } + + var width: CGFloat? { + return 170 + } + + var verticalGap: CGFloat { + return 0 + } +} diff --git a/SDDSComponents/SDDSComponentsPreview/Components/SDDSSwitch/SwitchAppearance.swift b/SDDSComponents/SDDSComponentsPreview/Components/SDDSSwitch/SwitchAppearance.swift new file mode 100644 index 000000000..3cc190b14 --- /dev/null +++ b/SDDSComponents/SDDSComponentsPreview/Components/SDDSSwitch/SwitchAppearance.swift @@ -0,0 +1,34 @@ +import Foundation +import SDDSComponents +import SDDSServTheme + +public extension SwitchAppearance { + static var defaultAppearance: SwitchAppearance { + .init( + titleTypography: SwitchTypography.label, + subtitleTypography: SwitchTypography.description, + titleColor: .backgroundInversePrimary, + subtitleColor: .surfaceInverseSolidPrimary.withOpacity(0.56), + tintColor: .surfaceDefaultAccent, + disabledAlpha: 0.4 + ) + } +} + +extension SwitchTypography { + static var label: TypographyConfiguration { + SwitchTypography( + large: Typographies.bodyLNormal.typography, + medium: Typographies.bodyMNormal.typography, + small: Typographies.bodySNormal.typography + ).asContainer + } + + static var description: TypographyConfiguration { + SwitchTypography( + large: Typographies.bodyMNormal.typography, + medium: Typographies.bodySNormal.typography, + small: Typographies.bodyXsNormal.typography + ).asContainer + } +} diff --git a/SDDSComponents/SDDSComponentsPreview/Components/SDDSSwitch/SwitchTypography.swift b/SDDSComponents/SDDSComponentsPreview/Components/SDDSSwitch/SwitchTypography.swift new file mode 100644 index 000000000..1bbdfed65 --- /dev/null +++ b/SDDSComponents/SDDSComponentsPreview/Components/SDDSSwitch/SwitchTypography.swift @@ -0,0 +1,19 @@ +import Foundation +import SDDSComponents + +struct SwitchTypography: GeneralTypographyConfiguration { + let large: TypographyToken? + let medium: TypographyToken? + let small: TypographyToken? + + func typography(with size: SwitchSizeConfiguration) -> TypographyToken? { + switch size as? SDDSSwitchSize { + case .large: + return large + case .medium: + return medium + case .small, .none: + return small + } + } +} diff --git a/SDDSComponents/SDDSComponentsPreview/SDDSComponentsPreview.h b/SDDSComponents/SDDSComponentsPreview/SDDSComponentsPreview.h new file mode 100644 index 000000000..fad1bc432 --- /dev/null +++ b/SDDSComponents/SDDSComponentsPreview/SDDSComponentsPreview.h @@ -0,0 +1,18 @@ +// +// SDDSComponentsPreview.h +// SDDSComponentsPreview +// +// Created by Vladimir Kaltyrin on 02.09.2024. +// + +#import + +//! Project version number for SDDSComponentsPreview. +FOUNDATION_EXPORT double SDDSComponentsPreviewVersionNumber; + +//! Project version string for SDDSComponentsPreview. +FOUNDATION_EXPORT const unsigned char SDDSComponentsPreviewVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + + diff --git a/SDDSComponents/SDDSComponentsPreview/SDDSServeStyle.swift b/SDDSComponents/SDDSComponentsPreview/SDDSServeStyle.swift new file mode 100644 index 000000000..9b47395a6 --- /dev/null +++ b/SDDSComponents/SDDSComponentsPreview/SDDSServeStyle.swift @@ -0,0 +1,16 @@ +import Foundation + +/** +* Стиль отображения кнопки +*/ +public enum SDDSServeB2CStyle: String { + case `default` + case secondary + case accent + case positive + case negative + case warning + case clear + case dark + case black +} diff --git a/SDDSComponents/SDDSComponentsPreview/Utilities/Image+Extensions.swift b/SDDSComponents/SDDSComponentsPreview/Utilities/Image+Extensions.swift new file mode 100644 index 000000000..0a1a3211f --- /dev/null +++ b/SDDSComponents/SDDSComponentsPreview/Utilities/Image+Extensions.swift @@ -0,0 +1,8 @@ +import Foundation +import SwiftUI + +extension Image { + static func image(_ name: String) -> Image { + Image(name, bundle: Bundle(for: SDDSComponentsPreview.self)) + } +} diff --git a/SDDSComponents/Sources/SDDSComponents/Common/ColorToken+Extensions.swift b/SDDSComponents/Sources/SDDSComponents/Common/ColorToken+Extensions.swift index d19750be6..fc08bac1d 100644 --- a/SDDSComponents/Sources/SDDSComponents/Common/ColorToken+Extensions.swift +++ b/SDDSComponents/Sources/SDDSComponents/Common/ColorToken+Extensions.swift @@ -46,6 +46,17 @@ public extension TypographyToken { kerning: 0 ) } + + static var undefined: TypographyToken { + .init( + fontName: "SF Pro", + weight: .semibold, + style: .normal, + size: 18, + lineHeight: 22, + kerning: 0 + ) + } } public extension ColorToken { diff --git a/SDDSComponents/Sources/SDDSComponents/Components/SDDSCheckbox/CheckboxAppearance.swift b/SDDSComponents/Sources/SDDSComponents/Components/SDDSCheckbox/CheckboxAppearance.swift index 135300ac6..2628fd043 100644 --- a/SDDSComponents/Sources/SDDSComponents/Components/SDDSCheckbox/CheckboxAppearance.swift +++ b/SDDSComponents/Sources/SDDSComponents/Components/SDDSCheckbox/CheckboxAppearance.swift @@ -3,23 +3,19 @@ import SwiftUI @_exported import SDDSThemeCore public struct CheckboxAppearance: SelectionControlAppearance { - public let titleTypography: TypographyToken - public let subtitleTypography: TypographyToken - public let enabledTitleColor: ColorToken - public let enabledSubtitleColor: ColorToken - public let disabledTitleColor: ColorToken - public let disabledSubtitleColor: ColorToken - public var disabledImageAlpha: CGFloat - public var imageTintColor: ColorToken? + public let titleTypography: TypographyConfiguration + public let subtitleTypography: TypographyConfiguration + public let titleColor: ColorToken + public let subtitleColor: ColorToken + public let disabledAlpha: CGFloat + public let imageTintColor: ColorToken? - public init(titleTypography: TypographyToken, subtitleTypography: TypographyToken, enabledTitleColor: ColorToken, enabledSubtitleColor: ColorToken, disabledTitleColor: ColorToken, disabledSubtitleColor: ColorToken, disabledImageAlpha: CGFloat, imageTintColor: ColorToken? = nil) { + public init(titleTypography: TypographyConfiguration, subtitleTypography: TypographyConfiguration, titleColor: ColorToken, subtitleColor: ColorToken, disabledAlpha: CGFloat, imageTintColor: ColorToken? = nil) { self.titleTypography = titleTypography self.subtitleTypography = subtitleTypography - self.enabledTitleColor = enabledTitleColor - self.enabledSubtitleColor = enabledSubtitleColor - self.disabledTitleColor = disabledTitleColor - self.disabledSubtitleColor = disabledSubtitleColor - self.disabledImageAlpha = disabledImageAlpha + self.titleColor = titleColor + self.subtitleColor = subtitleColor + self.disabledAlpha = disabledAlpha self.imageTintColor = imageTintColor } } diff --git a/SDDSComponents/Sources/SDDSComponents/Components/SDDSCheckbox/SDDSCheckbox.swift b/SDDSComponents/Sources/SDDSComponents/Components/SDDSCheckbox/SDDSCheckbox.swift index 53cfe9d49..ff9b999e3 100644 --- a/SDDSComponents/Sources/SDDSComponents/Components/SDDSCheckbox/SDDSCheckbox.swift +++ b/SDDSComponents/Sources/SDDSComponents/Components/SDDSCheckbox/SDDSCheckbox.swift @@ -96,7 +96,7 @@ public struct SDDSCheckbox: View { subtitle: String? = nil, isEnabled: Bool, images: SelectionControlStateImages, - size: SelectionControlSizeConfiguration = SDDSCheckboxSize(), + size: SelectionControlSizeConfiguration, appearance: CheckboxAppearance, accessibility: SelectionControlAccessibility = SelectionControlAccessibility() ) { @@ -142,118 +142,6 @@ public struct SDDSCheckbox: View { } } -// MARK: - Preview -struct SDDSCheckboxPreview: PreviewProvider { - static var previews: some View { - Group { - SDDSCheckbox.defaultExample - .previewLayout(PreviewLayout.sizeThatFits) - .previewDisplayName("Default") - .debug() - - SDDSCheckbox.withoutDescription - .previewLayout(PreviewLayout.sizeThatFits) - .previewDisplayName("Without Description") - .debug() - - SDDSCheckbox.withoutLabel - .previewLayout(PreviewLayout.sizeThatFits) - .previewDisplayName("Without Label") - .debug() - - SDDSCheckbox.withoutLabelAndDescription - .previewLayout(PreviewLayout.sizeThatFits) - .previewDisplayName("Without Label and Description") - .debug() - } - } -} - -public struct SDDSCheckboxSize: SelectionControlSizeConfiguration { - public var debugDescription: String { - String(reflecting: self) - } - - public var imageSize: CGSize { - .init(width: 20, height: 20) - } - - public var verticalGap: CGFloat { - 0.0 - } - - public var horizontalGap: CGFloat { - 8.0 - } - - public init() {} -} - -extension SDDSCheckbox { - static var defaultExample: SDDSCheckbox { - .init( - state: .constant(.selected), - title: "Label", - subtitle: "Description", - isEnabled: true, - images: .checkbox, - appearance: .defaultExample, - accessibility: SelectionControlAccessibility() - ) - } - - static var withoutDescription: SDDSCheckbox { - .init( - state: .constant(.selected), - title: "Label", - subtitle: nil, - isEnabled: true, - images: .checkbox, - appearance: .defaultExample, - accessibility: SelectionControlAccessibility() - ) - } - - static var withoutLabel: SDDSCheckbox { - .init( - state: .constant(.selected), - title: "", - subtitle: "Description", - isEnabled: true, - images: .checkbox, - appearance: .defaultExample, - accessibility: SelectionControlAccessibility() - ) - } - - static var withoutLabelAndDescription: SDDSCheckbox { - .init( - state: .constant(.selected), - title: "", - subtitle: nil, - isEnabled: true, - images: .checkbox, - appearance: .defaultExample, - accessibility: SelectionControlAccessibility() - ) - } -} - -extension CheckboxAppearance { - static var defaultExample: CheckboxAppearance { - .init( - titleTypography: .semibold16, - subtitleTypography: .semibold14, - enabledTitleColor: .blackTitleColor, - enabledSubtitleColor: .subtitleColor, - disabledTitleColor: .blackTitleColor.withOpacity(0.3), - disabledSubtitleColor: .subtitleColor.withOpacity(0.3), - disabledImageAlpha: 0.3, - imageTintColor: .greenColor - ) - } -} - public extension SelectionControlStateImages { static var checkbox: SelectionControlStateImages { .init( diff --git a/SDDSComponents/Sources/SDDSComponents/Components/SDDSCheckboxGroup/SDDSCheckboxGroup.swift b/SDDSComponents/Sources/SDDSComponents/Components/SDDSCheckboxGroup/SDDSCheckboxGroup.swift index 74bc91449..d6f75531b 100644 --- a/SDDSComponents/Sources/SDDSComponents/Components/SDDSCheckboxGroup/SDDSCheckboxGroup.swift +++ b/SDDSComponents/Sources/SDDSComponents/Components/SDDSCheckboxGroup/SDDSCheckboxGroup.swift @@ -119,46 +119,3 @@ public struct SDDSCheckboxGroup: View { } } } - -// Пример данных и конфигурации для предварительного просмотра -struct SDDSCheckboxGroupPreview: PreviewProvider { - static var previews: some View { - let parentData = CheckboxData( - state: .constant(.deselected), - title: "Parent Label", - subtitle: "Parent Description", - isEnabled: true, - images: SelectionControlStateImages.checkbox, - size: SDDSCheckboxSize(), - appearance: CheckboxAppearance.defaultExample, - accessibility: SelectionControlAccessibility() - ) - - let childData = (0..<5).map { index in - CheckboxData( - state: .constant(.deselected), - title: "Label \(index + 1)", - subtitle: "Description \(index + 1)", - isEnabled: true, - images: SelectionControlStateImages.checkbox, - size: SDDSCheckboxSize(), - appearance: CheckboxAppearance.defaultExample, - accessibility: SelectionControlAccessibility() - ) - } - - return Group { - SDDSCheckboxGroup(behaviour: .hierarchical(parent: parentData, child: childData), horizontalIndent: 24, verticalSpacing: 8) - .previewLayout(PreviewLayout.sizeThatFits) - .previewDisplayName("SDDSCheckboxGroup with Parent") - .padding() - .debug() - - SDDSCheckboxGroup(behaviour: .default(data: childData), horizontalIndent: 24, verticalSpacing: 8) - .previewLayout(PreviewLayout.sizeThatFits) - .previewDisplayName("SDDSCheckboxGroup without Parent") - .padding() - .debug() - } - } -} diff --git a/SDDSComponents/Sources/SDDSComponents/Components/SDDSChip/SDDSChip.swift b/SDDSComponents/Sources/SDDSComponents/Components/SDDSChip/SDDSChip.swift index b8d4cd5ca..c10fdf08a 100644 --- a/SDDSComponents/Sources/SDDSComponents/Components/SDDSChip/SDDSChip.swift +++ b/SDDSComponents/Sources/SDDSComponents/Components/SDDSChip/SDDSChip.swift @@ -186,151 +186,3 @@ public struct SDDSChip: View { removeAction() } } - - -// MARK: - Preview -struct SDDSChipPreview: PreviewProvider { - static var previews: some View { - Group { - SDDSChip.defaultExample - .previewLayout(PreviewLayout.sizeThatFits) - .previewDisplayName("Default") - .padding() - .debug() - - SDDSChip.defaultBorderExample - .previewLayout(PreviewLayout.sizeThatFits) - .previewDisplayName("Default Border") - .padding() - .debug() - - SDDSChip.noButtonImageExample - .previewLayout(PreviewLayout.sizeThatFits) - .previewDisplayName("No Button Image") - .padding() - .debug() - - SDDSChip.noIconImageExample - .previewLayout(PreviewLayout.sizeThatFits) - .previewDisplayName("No Icon Image") - .padding() - .debug() - - SDDSChip.onlyTitleExample - .previewLayout(PreviewLayout.sizeThatFits) - .previewDisplayName("Only Title") - .padding() - .debug() - } - } -} - -public struct DefaultChipSize: ChipSizeConfiguration { - public var debugDescription: String { - String(reflecting: self) - } - - public var iconImageSize: CGSize? { - CGSize(width: 24, height: 24) - } - - public var buttonImageSize: CGSize? { - CGSize(width: 24, height: 24) - } - - public var leadingInset: CGFloat { - 12 - } - - public var trailingInset: CGFloat { - 12 - } - - public var spacing: CGFloat { - 8 - } - - public var height: CGFloat { - 48 - } - - public var borderStyle: ChipBorderStyle - - public init(borderStyle: ChipBorderStyle = .rounded) { - self.borderStyle = borderStyle - } -} - -extension SDDSChip { - static var defaultExample: SDDSChip { - SDDSChip( - title: "Label", - isEnabled: true, - iconImage: Image.image("chipIcon"), - buttonImage: Image.image("chipClose"), - appearance: .defaultAppearance, - size: DefaultChipSize(), - removeAction: {} - ) - } - - static var defaultBorderExample: SDDSChip { - SDDSChip( - title: "Label", - isEnabled: true, - iconImage: Image.image("chipIcon"), - buttonImage: Image.image("chipClose"), - appearance: .defaultAppearance, - size: DefaultChipSize(borderStyle: .default(12)), - removeAction: {} - ) - } - - static var noButtonImageExample: SDDSChip { - SDDSChip( - title: "Label", - isEnabled: true, - iconImage: Image.image("chipIcon"), - buttonImage: nil, - appearance: .defaultAppearance, - size: DefaultChipSize(), - removeAction: {} - ) - } - - static var noIconImageExample: SDDSChip { - SDDSChip( - title: "Label", - isEnabled: true, - iconImage: nil, - buttonImage: Image.image("chipClose"), - appearance: .defaultAppearance, - size: DefaultChipSize(), - removeAction: {} - ) - } - - static var onlyTitleExample: SDDSChip { - SDDSChip( - title: "Label", - isEnabled: true, - iconImage: nil, - buttonImage: nil, - appearance: .defaultAppearance, - size: DefaultChipSize(), - removeAction: {} - ) - } -} - -extension ChipAppearance { - static var defaultAppearance: ChipAppearance { - .init( - titleColor: Color.white.equalToken, - titleTypography: .semibold14, - imageTintColor: Color.white.equalToken, - buttonTintColor: Color.gray.equalToken, - disabledAlpha: 0.5 - ) - } -} diff --git a/SDDSComponents/Sources/SDDSComponents/Components/SDDSChipGroup/SDDSChipGroup.swift b/SDDSComponents/Sources/SDDSComponents/Components/SDDSChipGroup/SDDSChipGroup.swift index ce4437a99..5d4ea0613 100644 --- a/SDDSComponents/Sources/SDDSComponents/Components/SDDSChipGroup/SDDSChipGroup.swift +++ b/SDDSComponents/Sources/SDDSComponents/Components/SDDSChipGroup/SDDSChipGroup.swift @@ -78,35 +78,6 @@ public protocol ChipGroupSizeConfiguration: SizeConfiguration, CustomDebugString var alignment: ChipGroupAlignment { get } } -/** - Стандартная конфигурация размеров группы чипов. - - - Properties: - - debugDescription: Описание для отладки. - - insets: Внутренние отступы. - - maxColumns: Максимальное количество столбцов в ряду. - - alignment: Выравнивание группы чипов. - */ -public struct DefaultChipGroupSize: ChipGroupSizeConfiguration { - public var debugDescription: String { - String(reflecting: self) - } - - public var insets: EdgeInsets { - EdgeInsets(top: 8, leading: 8, bottom: 8, trailing: 8) - } - - public var maxColumns: Int { - 8 - } - - public var alignment: ChipGroupAlignment - - public init(alignment: ChipGroupAlignment = .center) { - self.alignment = alignment - } -} - /** Вью для отображения группы чипов. @@ -118,6 +89,11 @@ public struct SDDSChipGroup: View { let data: [ChipData] let size: ChipGroupSizeConfiguration + public init(data: [ChipData], size: ChipGroupSizeConfiguration) { + self.data = data + self.size = size + } + public var body: some View { GeometryReader { geometry in let maxWidth = geometry.size.width - size.insets.leading - size.insets.trailing @@ -191,64 +167,3 @@ public struct SDDSChipGroup: View { return totalWidth } } - -// Пример данных и конфигурации для предварительного просмотра -struct SDDSChipGroupPreview: PreviewProvider { - static var previews: some View { - let chipAppearance = ChipAppearance( - titleColor: Color.white.equalToken, - titleTypography: .semibold14, - imageTintColor: Color.white.equalToken, - buttonTintColor: Color.gray.equalToken, - disabledAlpha: 0.5 - ) - - let chipSize = DefaultChipSize() - let chipAccessibility = ChipAccessibility() - - let chipData = (1...12).map { index in - ChipData( - title: "Label", - isEnabled: true, - iconImage: Image.image("chipIcon"), - buttonImage: Image.image("chipClose"), - appearance: chipAppearance, - size: chipSize, - accessibility: chipAccessibility, - removeAction: {} - ) - } - - return Group { - SDDSChipGroup(data: chipData, size: DefaultChipGroupSize(alignment: .center)) - .previewLayout(PreviewLayout.sizeThatFits) - .previewDisplayName("Standard Layout - Center") - .padding() - .debug() - - SDDSChipGroup(data: chipData, size: DefaultChipGroupSize(alignment: .left)) - .previewLayout(PreviewLayout.sizeThatFits) - .previewDisplayName("Standard Layout - Left") - .padding() - .debug() - - SDDSChipGroup(data: chipData, size: DefaultChipGroupSize(alignment: .right)) - .previewLayout(PreviewLayout.sizeThatFits) - .previewDisplayName("Standard Layout - Right") - .padding() - .debug() - - SDDSChipGroup(data: chipData, size: DefaultChipGroupSize(alignment: .decreasingLeft)) - .previewLayout(PreviewLayout.sizeThatFits) - .previewDisplayName("Decreasing Layout - Left") - .padding() - .debug() - - SDDSChipGroup(data: chipData, size: DefaultChipGroupSize(alignment: .decreasingRight)) - .previewLayout(PreviewLayout.sizeThatFits) - .previewDisplayName("Decreasing Layout - Right") - .padding() - .debug() - } - } -} diff --git a/SDDSComponents/Sources/SDDSComponents/Components/SDDSProgressBar/SDDSProgressBar.swift b/SDDSComponents/Sources/SDDSComponents/Components/SDDSProgressBar/SDDSProgressBar.swift index 906fe745e..f20025d60 100644 --- a/SDDSComponents/Sources/SDDSComponents/Components/SDDSProgressBar/SDDSProgressBar.swift +++ b/SDDSComponents/Sources/SDDSComponents/Components/SDDSProgressBar/SDDSProgressBar.swift @@ -128,86 +128,3 @@ public struct SDDSProgressView: View { } } - -// MARK: - Preview -struct SDDSProgressViewPreview: PreviewProvider { - static var previews: some View { - Group { - SDDSProgressView.defaultExample(progress: 0) - .previewLayout(PreviewLayout.sizeThatFits) - .previewDisplayName("0%") - .padding() - .debug() - - SDDSProgressView.defaultExample(progress: 0.3) - .previewLayout(PreviewLayout.sizeThatFits) - .previewDisplayName("30%") - .padding() - .debug() - - SDDSProgressView.defaultExample(progress: 0.5) - .previewLayout(PreviewLayout.sizeThatFits) - .previewDisplayName("50%") - .padding() - .debug() - - SDDSProgressView.defaultExample(progress: 0.8) - .previewLayout(PreviewLayout.sizeThatFits) - .previewDisplayName("80%") - .padding() - .debug() - - SDDSProgressView.defaultExample(progress: 1.0) - .previewLayout(PreviewLayout.sizeThatFits) - .previewDisplayName("100%") - .padding() - .debug() - } - } -} - -// Size configuration -public struct DefaultProgressBarSize: ProgressBarSizeConfiguration { - public var debugDescription: String { - String(reflecting: self) - } - - public var height: CGFloat { - 4.0 - } - - public var indicatorHeight: CGFloat { - 6.0 - } - - public var cornerRadius: CGFloat { - 2.0 - } - - public var indicatorCornerRadius: CGFloat { - 6.0 - } - - public init() {} -} - -extension SDDSProgressView { - static func defaultExample(progress: CGFloat) -> SDDSProgressView { - .init( - progress: .constant(progress), - isEnabled: true, - appearance: .defaultExample, - size: DefaultProgressBarSize(), - accessibility: ProgressBarAccessibility() - ) - } -} - -public extension ProgressBarAppearance { - static var defaultExample: ProgressBarAppearance { - .init( - tintFillStyle: .color(.greenColor), - trackColor: Color.gray.opacity(0.3).equalToken - ) - } -} diff --git a/SDDSComponents/Sources/SDDSComponents/Components/SDDSRadiobox/RadioboxAppearance.swift b/SDDSComponents/Sources/SDDSComponents/Components/SDDSRadiobox/RadioboxAppearance.swift index ef98cbae7..6fa9f05f4 100644 --- a/SDDSComponents/Sources/SDDSComponents/Components/SDDSRadiobox/RadioboxAppearance.swift +++ b/SDDSComponents/Sources/SDDSComponents/Components/SDDSRadiobox/RadioboxAppearance.swift @@ -3,23 +3,19 @@ import SwiftUI @_exported import SDDSThemeCore public struct RadioboxAppearance: SelectionControlAppearance { - public let titleTypography: TypographyToken - public let subtitleTypography: TypographyToken - public let enabledTitleColor: ColorToken - public let enabledSubtitleColor: ColorToken - public let disabledTitleColor: ColorToken - public let disabledSubtitleColor: ColorToken - public var disabledImageAlpha: CGFloat + public let titleTypography: TypographyConfiguration + public let subtitleTypography: TypographyConfiguration + public let titleColor: ColorToken + public let subtitleColor: ColorToken + public let disabledAlpha: CGFloat public let imageTintColor: ColorToken? - public init(titleTypography: TypographyToken, subtitleTypography: TypographyToken, enabledTitleColor: ColorToken, enabledSubtitleColor: ColorToken, disabledTitleColor: ColorToken, disabledSubtitleColor: ColorToken, disabledImageAlpha: CGFloat, imageTintColor: ColorToken?) { + public init(titleTypography: TypographyConfiguration, subtitleTypography: TypographyConfiguration, titleColor: ColorToken, subtitleColor: ColorToken, disabledAlpha: CGFloat, imageTintColor: ColorToken?) { self.titleTypography = titleTypography self.subtitleTypography = subtitleTypography - self.enabledTitleColor = enabledTitleColor - self.enabledSubtitleColor = enabledSubtitleColor - self.disabledTitleColor = disabledTitleColor - self.disabledSubtitleColor = disabledSubtitleColor - self.disabledImageAlpha = disabledImageAlpha + self.titleColor = titleColor + self.subtitleColor = subtitleColor + self.disabledAlpha = disabledAlpha self.imageTintColor = imageTintColor } } diff --git a/SDDSComponents/Sources/SDDSComponents/Components/SDDSRadiobox/SDDSRadiobox.swift b/SDDSComponents/Sources/SDDSComponents/Components/SDDSRadiobox/SDDSRadiobox.swift index 63e9a3738..fb685959d 100644 --- a/SDDSComponents/Sources/SDDSComponents/Components/SDDSRadiobox/SDDSRadiobox.swift +++ b/SDDSComponents/Sources/SDDSComponents/Components/SDDSRadiobox/SDDSRadiobox.swift @@ -28,7 +28,7 @@ public struct SDDSRadiobox: View { subtitle: String? = nil, isEnabled: Bool, images: RadioboxImages, - size: SelectionControlSizeConfiguration = SDDSRadioboxSize(), + size: SelectionControlSizeConfiguration, appearance: RadioboxAppearance, accessibility: SelectionControlAccessibility = SelectionControlAccessibility() ) { @@ -68,118 +68,6 @@ public struct SDDSRadiobox: View { } } -// MARK: - Preview -struct SDDSRadioboxPreview: PreviewProvider { - static var previews: some View { - Group { - SDDSRadiobox.defaultExample - .previewLayout(PreviewLayout.sizeThatFits) - .previewDisplayName("Default") - .debug() - - SDDSRadiobox.withoutDescription - .previewLayout(PreviewLayout.sizeThatFits) - .previewDisplayName("Without Description") - .debug() - - SDDSRadiobox.withoutLabel - .previewLayout(PreviewLayout.sizeThatFits) - .previewDisplayName("Without Label") - .debug() - - SDDSRadiobox.withoutLabelAndDescription - .previewLayout(PreviewLayout.sizeThatFits) - .previewDisplayName("Without Label and Description") - .debug() - } - } -} - -public struct SDDSRadioboxSize: SelectionControlSizeConfiguration { - public var debugDescription: String { - String(reflecting: self) - } - - public var imageSize: CGSize { - .init(width: 20, height: 20) - } - - public var verticalGap: CGFloat { - 0.0 - } - - public var horizontalGap: CGFloat { - 8.0 - } - - public init() {} -} - -public extension SDDSRadiobox { - static var defaultExample: SDDSRadiobox { - .init( - isSelected: .constant(true), - title: "Label", - subtitle: "Description", - isEnabled: true, - images: .defaultImages, - appearance: .defaultExample, - accessibility: SelectionControlAccessibility() - ) - } - - static var withoutDescription: SDDSRadiobox { - .init( - isSelected: .constant(true), - title: "Label", - subtitle: nil, - isEnabled: true, - images: .defaultImages, - appearance: .defaultExample, - accessibility: SelectionControlAccessibility() - ) - } - - static var withoutLabel: SDDSRadiobox { - .init( - isSelected: .constant(true), - title: "", - subtitle: "Description", - isEnabled: true, - images: .defaultImages, - appearance: .defaultExample, - accessibility: SelectionControlAccessibility() - ) - } - - static var withoutLabelAndDescription: SDDSRadiobox { - .init( - isSelected: .constant(true), - title: "", - subtitle: nil, - isEnabled: true, - images: .defaultImages, - appearance: .defaultExample, - accessibility: SelectionControlAccessibility() - ) - } -} - -extension RadioboxAppearance { - static var defaultExample: RadioboxAppearance { - .init( - titleTypography: .semibold16, - subtitleTypography: .semibold14, - enabledTitleColor: .blackTitleColor, - enabledSubtitleColor: .subtitleColor, - disabledTitleColor: .blackTitleColor.withOpacity(0.3), - disabledSubtitleColor: .subtitleColor.withOpacity(0.3), - disabledImageAlpha: 0.3, - imageTintColor: .greenColor - ) - } -} - public extension RadioboxImages { static var defaultImages: RadioboxImages { .init( diff --git a/SDDSComponents/Sources/SDDSComponents/Components/SDDSRadioboxGroup/SDDSRadioboxGroup.swift b/SDDSComponents/Sources/SDDSComponents/Components/SDDSRadioboxGroup/SDDSRadioboxGroup.swift index bba5a373d..ac8628ca1 100644 --- a/SDDSComponents/Sources/SDDSComponents/Components/SDDSRadioboxGroup/SDDSRadioboxGroup.swift +++ b/SDDSComponents/Sources/SDDSComponents/Components/SDDSRadioboxGroup/SDDSRadioboxGroup.swift @@ -84,26 +84,3 @@ public struct SDDSRadioboxGroup: View { } } } - -/** - Пример для предварительного просмотра `SDDSRadioboxGroup`. - */ -struct SDDSRadioboxGroupPreview: PreviewProvider { - static var previews: some View { - let radioboxData = (0..<5).map { index in - RadioboxData( - title: "Option \(index + 1)", - subtitle: "Description \(index + 1)", - isSelected: .constant(index == 0), - images: RadioboxImages.defaultImages, - size: SDDSRadioboxSize(), - appearance: RadioboxAppearance.defaultExample, - accessibility: SelectionControlAccessibility() - ) - } - - return SDDSRadioboxGroup(radioboxData: radioboxData, verticalSpacing: 8) - .previewLayout(.sizeThatFits) - .previewDisplayName("SDDSRadioboxGroup Preview") - } -} diff --git a/SDDSComponents/Sources/SDDSComponents/Components/SDDSSwitch/SDDSSwitch.swift b/SDDSComponents/Sources/SDDSComponents/Components/SDDSSwitch/SDDSSwitch.swift index fad947b4b..84a1f2cde 100644 --- a/SDDSComponents/Sources/SDDSComponents/Components/SDDSSwitch/SDDSSwitch.swift +++ b/SDDSComponents/Sources/SDDSComponents/Components/SDDSSwitch/SDDSSwitch.swift @@ -20,33 +20,27 @@ public protocol SwitchSizeConfiguration: SizeConfiguration, CustomDebugStringCon - Properties: - titleTypography: Типографика для заголовка переключателя. - subtitleTypography: Типографика для подзаголовка переключателя. - - enabledTitleColor: Цвет заголовка, когда переключатель включен. - - enabledSubtitleColor: Цвет подзаголовка, когда переключатель включен. - - enabledTintColor: Цвет переключателя, когда он включен. - - disabledTitleColor: Цвет заголовка, когда переключатель выключен. - - disabledSubtitleColor: Цвет подзаголовка, когда переключатель выключен. - - disabledTintColor: Цвет переключателя, когда он выключен. + - titleColor: Цвет заголовка, когда переключатель включен. + - subtitleColor: Цвет подзаголовка, когда переключатель включен. + - tintColor: Цвет переключателя, когда он включен. */ public struct SwitchAppearance { public let titleTypography: TypographyConfiguration public let subtitleTypography: TypographyConfiguration - public let enabledTitleColor: ColorToken - public let enabledSubtitleColor: ColorToken - public let enabledTintColor: ColorToken - public let disabledTitleColor: ColorToken - public let disabledSubtitleColor: ColorToken - public let disabledTintColor: ColorToken + public let titleColor: ColorToken + public let subtitleColor: ColorToken + public let tintColor: ColorToken + public let disabledAlpha: CGFloat - public init(titleTypography: TypographyConfiguration, subtitleTypography: TypographyConfiguration, enabledTitleColor: ColorToken, enabledSubtitleColor: ColorToken, enabledTintColor: ColorToken, disabledTitleColor: ColorToken, disabledSubtitleColor: ColorToken, disabledTintColor: ColorToken) { + public init(titleTypography: TypographyConfiguration, subtitleTypography: TypographyConfiguration, titleColor: ColorToken, subtitleColor: ColorToken, tintColor: ColorToken, disabledAlpha: CGFloat) { self.titleTypography = titleTypography self.subtitleTypography = subtitleTypography - self.enabledTitleColor = enabledTitleColor - self.enabledSubtitleColor = enabledSubtitleColor - self.enabledTintColor = enabledTintColor - self.disabledTitleColor = disabledTitleColor - self.disabledSubtitleColor = disabledSubtitleColor - self.disabledTintColor = disabledTintColor + self.titleColor = titleColor + self.subtitleColor = subtitleColor + self.tintColor = tintColor + self.disabledAlpha = disabledAlpha } + } public extension SwitchAppearance { @@ -57,7 +51,7 @@ public extension SwitchAppearance { - Returns: Цвет переключателя. */ func tintColor(for isEnabled: Bool) -> ColorToken { - return isEnabled ? enabledTintColor : disabledTintColor + return isEnabled ? tintColor : tintColor.withOpacity(disabledAlpha) } /** @@ -67,7 +61,7 @@ public extension SwitchAppearance { - Returns: Цвет заголовка. */ func titleColor(for isEnabled: Bool) -> ColorToken { - return isEnabled ? enabledTitleColor : disabledTitleColor + return isEnabled ? titleColor : titleColor.withOpacity(disabledAlpha) } /** @@ -77,7 +71,7 @@ public extension SwitchAppearance { - Returns: Цвет подзаголовка. */ func subtitleColor(for isEnabled: Bool) -> ColorToken { - return isEnabled ? enabledSubtitleColor : disabledSubtitleColor + return isEnabled ? subtitleColor : subtitleColor.withOpacity(disabledAlpha) } } @@ -254,121 +248,3 @@ public struct SDDSSwitch: View { .accessibilityValue(Text(subtitle)) } } - -// MARK: - Preview -struct SDDSSwitchPreview: PreviewProvider { - static var previews: some View { - SDDSSwitch.defaultExample - .previewLayout(PreviewLayout.sizeThatFits) - .previewDisplayName("Default") - .debug() - - SDDSSwitch.emptyDescription - .previewLayout(PreviewLayout.sizeThatFits) - .previewDisplayName("Empty Description") - .debug() - - SDDSSwitch.emptyTitle - .previewLayout(PreviewLayout.sizeThatFits) - .previewDisplayName("Empty Title") - .debug() - - SDDSSwitch.onlyToggle - .previewLayout(PreviewLayout.sizeThatFits) - .previewDisplayName("Only Toggle") - .debug() - } -} - -struct SwitchSize: SwitchSizeConfiguration { - var debugDescription: String { - String(reflecting: self) - } - - var width: CGFloat? - var verticalGap: CGFloat - - init(width: CGFloat? = 170, verticalGap: CGFloat = 0) { - self.width = width - self.verticalGap = verticalGap - } -} - -extension SDDSSwitch { - static var defaultExample: SDDSSwitch { - SDDSSwitch( - title: "Title", - subtitle: "Description", - isOn: .constant(true), - isEnabled: true, - size: SwitchSize(), - appearance: SwitchAppearance.defaultAppearance, - switchAccessibility: SwitchAccessibility() - ) - } - - static var emptyDescription: SDDSSwitch { - SDDSSwitch( - title: "Title", - subtitle: "", - isOn: .constant(true), - isEnabled: true, - size: SwitchSize(), - appearance: SwitchAppearance.defaultAppearance, - switchAccessibility: SwitchAccessibility() - ) - } - - static var emptyTitle: SDDSSwitch { - SDDSSwitch( - title: "", - subtitle: "Description", - isOn: .constant(true), - isEnabled: true, - size: SwitchSize(), - appearance: SwitchAppearance.defaultAppearance, - switchAccessibility: SwitchAccessibility() - ) - } - - static var onlyToggle: SDDSSwitch { - SDDSSwitch( - title: "", - subtitle: "", - isOn: .constant(true), - isEnabled: true, - size: SwitchSize(width: nil), - appearance: SwitchAppearance.defaultAppearance, - switchAccessibility: SwitchAccessibility() - ) - } -} - -struct SwitchTypography: GeneralTypographyConfiguration { - let token: TypographyToken - - func typography(with size: SizeConfiguration) -> TypographyToken? { - return token - } -} - -extension SwitchTypography { - static func typography(_ token: TypographyToken) -> TypographyConfiguration { - SwitchTypography(token: token).asContainer - } -} - -public extension SwitchAppearance { - static var defaultAppearance: SwitchAppearance { - .init( - titleTypography: SwitchTypography.typography(.semibold14), - subtitleTypography: SwitchTypography.typography(.semibold12), - enabledTitleColor: .blackTitleColor, - enabledSubtitleColor: .subtitleColor, - enabledTintColor: .greenColor, - disabledTitleColor: .blackTitleColor.withOpacity(0.3), - disabledSubtitleColor: .subtitleColor.withOpacity(0.3), - disabledTintColor: .greenColor.withOpacity(0.3) - ) - } -} diff --git a/SDDSComponents/Sources/SDDSComponents/Views/SelectionControl/SelectionControl.swift b/SDDSComponents/Sources/SDDSComponents/Views/SelectionControl/SelectionControl.swift index 43ead4796..e268c42ec 100644 --- a/SDDSComponents/Sources/SDDSComponents/Views/SelectionControl/SelectionControl.swift +++ b/SDDSComponents/Sources/SDDSComponents/Views/SelectionControl/SelectionControl.swift @@ -104,7 +104,7 @@ struct SelectionControl: View { @ViewBuilder private var titleText: some View { Text(title) - .typography(appearance.titleTypography) + .typography(appearance.titleTypography.typography(with: size) ?? .undefined) .foregroundColor(appearance.titleColor(for: isEnabled).color(for: colorScheme)) .accessibilityLabel(Text(accessibility.titleLabel)) .accessibilityValue(Text(title)) @@ -114,7 +114,7 @@ struct SelectionControl: View { private var subtitleText: some View { if let subtitle = subtitle { Text(subtitle) - .typography(appearance.subtitleTypography) + .typography(appearance.subtitleTypography.typography(with: size) ?? .undefined) .foregroundColor(appearance.subtitleColor(for: isEnabled).color(for: colorScheme)) .accessibilityLabel(Text(accessibility.subtitleLabel)) .accessibilityValue(Text(subtitle)) @@ -153,7 +153,7 @@ struct SelectionControl: View { if let image = image { tintImage(image: image) .frame(width: size.imageSize.width, height: size.imageSize.height) - .applyIf(!isEnabled) { $0.opacity(appearance.disabledImageAlpha) } + .applyIf(!isEnabled) { $0.opacity(appearance.disabledAlpha) } } else { EmptyView() } diff --git a/SDDSComponents/Sources/SDDSComponents/Views/SelectionControl/SelectionControlAppearance.swift b/SDDSComponents/Sources/SDDSComponents/Views/SelectionControl/SelectionControlAppearance.swift index d163c21b8..de6233674 100644 --- a/SDDSComponents/Sources/SDDSComponents/Views/SelectionControl/SelectionControlAppearance.swift +++ b/SDDSComponents/Sources/SDDSComponents/Views/SelectionControl/SelectionControlAppearance.swift @@ -3,13 +3,11 @@ import SwiftUI @_exported import SDDSThemeCore public protocol SelectionControlAppearance { - var titleTypography: TypographyToken { get } - var subtitleTypography: TypographyToken { get } - var enabledTitleColor: ColorToken { get } - var enabledSubtitleColor: ColorToken { get } - var disabledTitleColor: ColorToken { get } - var disabledSubtitleColor: ColorToken { get } - var disabledImageAlpha: CGFloat { get } + var titleTypography: TypographyConfiguration { get } + var subtitleTypography: TypographyConfiguration { get } + var titleColor: ColorToken { get } + var subtitleColor: ColorToken { get } + var disabledAlpha: CGFloat { get } var imageTintColor: ColorToken? { get } func titleColor(for isEnabled: Bool) -> ColorToken @@ -18,10 +16,10 @@ public protocol SelectionControlAppearance { public extension SelectionControlAppearance { func titleColor(for isEnabled: Bool) -> ColorToken { - return isEnabled ? enabledTitleColor : disabledTitleColor + return isEnabled ? titleColor : titleColor.withOpacity(disabledAlpha) } func subtitleColor(for isEnabled: Bool) -> ColorToken { - return isEnabled ? enabledSubtitleColor : disabledSubtitleColor + return isEnabled ? subtitleColor : subtitleColor.withOpacity(disabledAlpha) } } diff --git a/Themes/SDDSservTheme/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata b/Themes/SDDSservTheme/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata new file mode 100644 index 000000000..919434a62 --- /dev/null +++ b/Themes/SDDSservTheme/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Themes/SDDSservTheme/Package.swift b/Themes/SDDSservTheme/Package.swift new file mode 100644 index 000000000..0e9fca60a --- /dev/null +++ b/Themes/SDDSservTheme/Package.swift @@ -0,0 +1,28 @@ +// swift-tools-version:5.3 +import PackageDescription + +let package = Package( + name: "SDDSServTheme", + platforms: [ + .iOS(.v14) + ], + products: [ + .library( + name: "SDDSServTheme", + targets: ["SDDSServTheme"]), + ], + dependencies: [ + .package(name: "SDDSThemeCore", path: "../../SDDSThemeBuilder/SDDSThemeCore") + ], + targets: [ + .target( + name: "SDDSServTheme", + dependencies: ["SDDSThemeCore"], + path: ".", + exclude: ["SDDSServTheme.xcodeproj", "SDDSTheme.h"], + resources: [ + .process("Fonts") + ] + ) + ] +)