Skip to content

Commit 93172ed

Browse files
boosted-botpylapp
andcommitted
chore(🤖): update of tokens (library version 0.9.0) (#576)
Add tokens library v0.9.0 with Divider component tokens and update BulletList component tokens Update script updating tokens library version in files. Signed-off-by: Pierre-Yves Lapersonne <[email protected]> Co-authored-by: boosted-bot <[email protected]> Co-authored-by: Pierre-Yves Lapersonne <[email protected]>
1 parent 46ea958 commit 93172ed

File tree

55 files changed

+580
-391
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+580
-391
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88

99
### Added
1010

11+
- [Library] `Divider` component tokens (tokens library v0.9.0)
12+
- [Library] `dimension1250` raw token of dimension (tokens library v0.9.0)
1113
- [Library] Support of arabic language ([#552](https://github.com/Orange-OpenSource/ouds-ios/issues/552))
1214
- [DesignToolbox] Support of arabic language ([#552](https://github.com/Orange-OpenSource/ouds-ios/issues/552))
1315

1416
### Changed
1517

18+
- [Library] `BulletList` component tokens (tokens library v0.9.0)
19+
- [Library] `Chip` component tokens (tokens library v0.9.0)
1620
- [Library] Remove UI test cases on colored surface for radio button and checkbox ([#523](https://github.com/Orange-OpenSource/ouds-ios/issues/523))
1721
- [Library] Rafactor the interal interation state used by radio and checkbox components ([#560](https://github.com/Orange-OpenSource/ouds-ios/issues/560))
1822
- [Library] Font family, font weight semantic tokens (tokens library v0.8.0) ([#529](https://github.com/Orange-OpenSource/ouds-ios/issues/529))

DesignToolbox/DesignToolbox/Utils/Bundle+extension.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ extension Bundle {
6868
}
6969

7070
var tokensLibraryVersion: String {
71-
"Tokens version: 0.8.0"
71+
"Tokens version: 0.9.0"
7272
}
7373

7474
// MARK: Private Implementation

OUDS/Core/OUDS/Sources/OUDSTheme/OUDSTheme.swift

+68-62
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,14 @@ import OUDSTokensSemantic
3535
open class OUDSTheme: @unchecked Sendable {
3636

3737
// MARK: - Semantic tokens
38-
39-
/// All color semantic tokens exposed in one object
40-
public let colors: AllColorSemanticTokensProvider
38+
// Keep things alhabetically ordered
4139

4240
/// All border semantic tokens exposed in one object
4341
public let borders: AllBorderSemanticTokensProvider
4442

43+
/// All color semantic tokens exposed in one object
44+
public let colors: AllColorSemanticTokensProvider
45+
4546
/// All elevation semantic tokens exposed in one object
4647
public let elevations: AllElevationSemanticTokensProvider
4748

@@ -64,106 +65,111 @@ open class OUDSTheme: @unchecked Sendable {
6465
public let spaces: AllSpaceSemanticTokensProvider
6566

6667
// MARK: - Component tokens
68+
// Keep things alhabetically ordered
6769

68-
/// All components tokens related to button components like `OUDSButton`
69-
public let button: AllButtonComponentTokensProvider
70-
71-
/// All components tokens related to link components like `OUDSLink`
72-
public let link: AllLinkComponentTokensProvider
73-
74-
/// All components tokens related to select components like `OUDSSelect`
75-
public let select: AllSelectComponentTokensProvider
76-
77-
/// All components tokens related to skeleto components like `OUDSSkeleton`
78-
public let skeleton: AllSkeletonComponentTokensProvider
70+
/// All components tokens related to badge components like `OUDSBadge`
71+
public let badge: AllBadgeComponentTokensProvider
7972

80-
/// All components tokens related to tags components like `OUDSTag`
81-
public let tag: AllTagComponentTokensProvider
73+
/// All components tokens related to bullet list components like `OUDSBulletList`
74+
public let bulletList: AllBulletListComponentTokensProvider
8275

83-
/// All components tokens related to switch / toggle components like `OUDSSwitch`
84-
public let `switch`: AllSwitchComponentTokensProvider
76+
/// All components tokens related to button components like `OUDSButton`
77+
public let button: AllButtonComponentTokensProvider
8578

86-
/// All components tokens related to list item components like `OUDSListItem`
87-
public let listItem: AllListItemComponentTokensProvider
79+
/// All components tokens related to checkboxes components like `OUDSCheckbox` and `OUDSCheckboxItem`
80+
public let checkbox: AllCheckboxComponentTokensProvider
8881

8982
/// All components tokens related to chip components like `OUDSChip`
9083
public let chip: AllChipComponentTokensProvider
9184

92-
/// All components tokens related to bullet list components like `OUDSBulletList`
93-
public let bulletList: AllBulletListComponentTokensProvider
85+
/// All components tokens related to divider components like `OUDSDivider`
86+
public let divider: AllDividerComponentTokensProvider
87+
88+
/// All component tokens related to control-item-layout-based components like `OUDSSwitch`, `OUDSRadioButtonItem` and `OUDSCheckboxItem`
89+
public let controlItem: AllControlItemComponentTokensProvider
9490

9591
/// All components tokens related to bullet list components like `OUDSInputText`
9692
public let inputText: AllInputTextComponentTokensProvider
9793

98-
/// All components tokens related to badge components like `OUDSBadge`
99-
public let badge: AllBadgeComponentTokensProvider
100-
101-
/// All component tokens related to control-item-layout-based components like `OUDSSwitch`, `OUDSRadioButtonItem` and `OUDSCheckboxItem`
102-
public let controlItem: AllControlItemComponentTokensProvider
94+
/// All components tokens related to link components like `OUDSLink`
95+
public let link: AllLinkComponentTokensProvider
10396

104-
/// All components tokens related to checkboxes components like `OUDSCheckbox` and `OUDSCheckboxItem`
105-
public let checkbox: AllCheckboxComponentTokensProvider
97+
/// All components tokens related to list item components like `OUDSListItem`
98+
public let listItem: AllListItemComponentTokensProvider
10699

107100
/// All components tokens related to checkboxes components like `OUDSRadioButton` and `OUDSRadioButtonItem`
108101
public let radioButton: AllRadioButtonComponentTokensProvider
109102

110-
// NOTE: Add new component tokens provider here
103+
/// All components tokens related to select components like `OUDSSelect`
104+
public let select: AllSelectComponentTokensProvider
105+
106+
/// All components tokens related to skeleto components like `OUDSSkeleton`
107+
public let skeleton: AllSkeletonComponentTokensProvider
108+
109+
/// All components tokens related to switch / toggle components like `OUDSSwitch`
110+
public let `switch`: AllSwitchComponentTokensProvider
111+
112+
/// All components tokens related to tags components like `OUDSTag`
113+
public let tag: AllTagComponentTokensProvider
111114

112115
// MARK: - Initializers
116+
// Keep sorted by alphabetical order semantic tokens, then component tokens, then params with default values
113117

114118
/// Defines the theme to apply everywhere.
115119
///
116120
/// - Parameters:
117-
/// - colors: All semantic tokens of colors
118121
/// - borders: All semantic tokens of borders
122+
/// - colors: All semantic tokens of colors
119123
/// - elevations: All semantic tokens of elevations
120124
/// - fonts: All semantic tokens of fonts
121125
/// - grids: All semantic tokens of grids
122126
/// - opacities: All semantic tokens of opacity
123127
/// - sizes: All semantic tokens of sizes
124128
/// - spaces: All semantic tokens of spaces
129+
/// - badge: All component tokens for badge
130+
/// - bulletList: All component tokens for bullet list
125131
/// - button: All component tokens for button
132+
/// - checkbox: All component tokens for checkbox
133+
/// - chip: All component tokens for chip
134+
/// - controlItem: All component tokens for control item
135+
/// - divider: All component tokens for divider
136+
/// - inputText: All component tokens for input text
126137
/// - link: All component tokens for link
138+
/// - listItem: All component tokens for list item
139+
/// - radioButton: All component tokens for radio buttons
127140
/// - select: All component tokens for select
128141
/// - skeleton: All component tokens for skeleton
129-
/// - tag: All component tokens for tag
130142
/// - switch: All component tokens for switch
131-
/// - listItem: All component tokens for list item
132-
/// - chip: All component tokens for chip
133-
/// - bulletList: All component tokens for bullet list
134-
/// - inputText: All component tokens for input text
135-
/// - badge: All component tokens for badge
136-
/// - controlItem: All component tokens for control item
137-
/// - checkbox: All component tokens for checkbox
138-
/// - radioButton: All component tokens for radio buttons
143+
/// - tag: All component tokens for tag
139144
/// - fontFamily: Set `nil` if system font to use, otherwise use the `FontFamilySemanticToken` you want to apply
140-
public init(colors: AllColorSemanticTokensProvider,
141-
borders: AllBorderSemanticTokensProvider,
145+
public init(borders: AllBorderSemanticTokensProvider,
146+
colors: AllColorSemanticTokensProvider,
142147
elevations: AllElevationSemanticTokensProvider,
143148
fonts: AllFontSemanticTokensProvider,
144149
grids: AllGridSemanticTokensProvider,
145150
opacities: AllOpacitySemanticTokensProvider,
146151
sizes: AllSizeSemanticTokensProvider,
147152
spaces: AllSpaceSemanticTokensProvider,
153+
badge: AllBadgeComponentTokensProvider,
154+
bulletList: AllBulletListComponentTokensProvider,
148155
button: AllButtonComponentTokensProvider,
156+
checkbox: AllCheckboxComponentTokensProvider,
157+
chip: AllChipComponentTokensProvider,
158+
controlItem: AllControlItemComponentTokensProvider,
159+
divider: AllDividerComponentTokensProvider,
160+
inputText: AllInputTextComponentTokensProvider,
161+
listItem: AllListItemComponentTokensProvider,
149162
link: AllLinkComponentTokensProvider,
163+
radioButton: AllRadioButtonComponentTokensProvider,
150164
select: AllSelectComponentTokensProvider,
151165
skeleton: AllSkeletonComponentTokensProvider,
152-
tag: AllTagComponentTokensProvider,
153166
switch: AllSwitchComponentTokensProvider,
154-
listItem: AllListItemComponentTokensProvider,
155-
chip: AllChipComponentTokensProvider,
156-
bulletList: AllBulletListComponentTokensProvider,
157-
inputText: AllInputTextComponentTokensProvider,
158-
badge: AllBadgeComponentTokensProvider,
159-
controlItem: AllControlItemComponentTokensProvider,
160-
checkbox: AllCheckboxComponentTokensProvider,
161-
radioButton: AllRadioButtonComponentTokensProvider,
167+
tag: AllTagComponentTokensProvider,
162168
fontFamily: FontFamilySemanticToken? = nil) {
163169

164170
// Save semantic tokens providers
165-
self.colors = colors
166171
self.borders = borders
172+
self.colors = colors
167173
self.elevations = elevations
168174
self.fonts = fonts
169175
self.grids = grids
@@ -172,21 +178,21 @@ open class OUDSTheme: @unchecked Sendable {
172178
self.spaces = spaces
173179

174180
// Save component tokens providers
181+
self.badge = badge
175182
self.button = button
183+
self.bulletList = bulletList
184+
self.checkbox = checkbox
185+
self.chip = chip
186+
self.controlItem = controlItem
187+
self.divider = divider
188+
self.inputText = inputText
176189
self.link = link
190+
self.listItem = listItem
191+
self.radioButton = radioButton
177192
self.select = select
178193
self.skeleton = skeleton
179-
self.tag = tag
180194
self.`switch` = `switch`
181-
self.listItem = listItem
182-
self.chip = chip
183-
self.bulletList = bulletList
184-
self.inputText = inputText
185-
self.badge = badge
186-
self.controlItem = controlItem
187-
self.checkbox = checkbox
188-
self.radioButton = radioButton
189-
// NOTE: Add new component tokens provider here
195+
self.tag = tag
190196

191197
// Load other configuration elements
192198
self.fontFamily = fontFamily

OUDS/Core/OUDS/Sources/OUDSTheme/TokensProviders.swift

+29-26
Original file line numberDiff line numberDiff line change
@@ -48,46 +48,49 @@ public protocol AllSpaceSemanticTokensProvider: TokensProvider, SpaceSemanticTok
4848

4949
// MARK: - Component tokens providers
5050

51-
/// Something which provides all component tokens of button
52-
public protocol AllButtonComponentTokensProvider: TokensProvider, ButtonComponentTokens { }
51+
// Keep things alphabetically sorted
5352

54-
/// Something which provides all component tokens of link
55-
public protocol AllLinkComponentTokensProvider: TokensProvider, LinkComponentTokens { }
56-
57-
/// Something which provides all component tokens of select
58-
public protocol AllSelectComponentTokensProvider: TokensProvider, SelectComponentTokens { }
59-
60-
/// Something which provides all component tokens of skeleton
61-
public protocol AllSkeletonComponentTokensProvider: TokensProvider, SkeletonComponentTokens { }
53+
/// Something which provides all component tokens of badge
54+
public protocol AllBadgeComponentTokensProvider: TokensProvider, BadgeComponentTokens { }
6255

63-
/// Something which provides all component tokens of tag
64-
public protocol AllTagComponentTokensProvider: TokensProvider, TagComponentTokens { }
56+
/// Something which provides all component tokens of bullet list
57+
public protocol AllBulletListComponentTokensProvider: TokensProvider, BulletListComponentTokens { }
6558

66-
/// Something which provides all component tokens of switch / toggle
67-
public protocol AllSwitchComponentTokensProvider: TokensProvider, SwitchComponentTokens { }
59+
/// Something which provides all component tokens of button
60+
public protocol AllButtonComponentTokensProvider: TokensProvider, ButtonComponentTokens { }
6861

69-
/// Something which provides all component tokens of list item
70-
public protocol AllListItemComponentTokensProvider: TokensProvider, ListItemComponentTokens { }
62+
/// Something which provides all component tokens of checkboxes
63+
public protocol AllCheckboxComponentTokensProvider: TokensProvider, CheckboxComponentTokens { }
7164

7265
/// Something which provides all component tokens of chip
7366
public protocol AllChipComponentTokensProvider: TokensProvider, ChipComponentTokens { }
7467

75-
/// Something which provides all component tokens of bullet list
76-
public protocol AllBulletListComponentTokensProvider: TokensProvider, BulletListComponentTokens { }
68+
/// Something which provides all component tokens for control-item-layout-based components
69+
public protocol AllControlItemComponentTokensProvider: TokensProvider, ControlItemComponentTokens { }
70+
71+
/// Something which provides all component tokens of diviers
72+
public protocol AllDividerComponentTokensProvider: TokensProvider, DividerComponentTokens { }
7773

7874
/// Something which provides all component tokens of input text
7975
public protocol AllInputTextComponentTokensProvider: TokensProvider, InputTextComponentTokens { }
8076

81-
/// Something which provides all component tokens of badge
82-
public protocol AllBadgeComponentTokensProvider: TokensProvider, BadgeComponentTokens { }
83-
84-
/// Something which provides all component tokens for control-item-layout-based components
85-
public protocol AllControlItemComponentTokensProvider: TokensProvider, ControlItemComponentTokens { }
77+
/// Something which provides all component tokens of link
78+
public protocol AllLinkComponentTokensProvider: TokensProvider, LinkComponentTokens { }
8679

87-
/// Something which provides all component tokens of checkboxes
88-
public protocol AllCheckboxComponentTokensProvider: TokensProvider, CheckboxComponentTokens { }
80+
/// Something which provides all component tokens of list item
81+
public protocol AllListItemComponentTokensProvider: TokensProvider, ListItemComponentTokens { }
8982

9083
/// Something which provides all component tokens of radio buttons
9184
public protocol AllRadioButtonComponentTokensProvider: TokensProvider, RadioButtonComponentTokens { }
9285

93-
// NOTE: Add new definitions of protocols here
86+
/// Something which provides all component tokens of select
87+
public protocol AllSelectComponentTokensProvider: TokensProvider, SelectComponentTokens { }
88+
89+
/// Something which provides all component tokens of skeleton
90+
public protocol AllSkeletonComponentTokensProvider: TokensProvider, SkeletonComponentTokens { }
91+
92+
/// Something which provides all component tokens of switch / toggle
93+
public protocol AllSwitchComponentTokensProvider: TokensProvider, SwitchComponentTokens { }
94+
95+
/// Something which provides all component tokens of tag
96+
public protocol AllTagComponentTokensProvider: TokensProvider, TagComponentTokens { }

0 commit comments

Comments
 (0)