braid-design-system 30.6.0 → 31.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (198) hide show
  1. package/.eslintignore +1 -0
  2. package/.nvmrc +1 -1
  3. package/.prettierignore +1 -0
  4. package/CHANGELOG.md +428 -0
  5. package/README.md +4 -19
  6. package/codemod/dist/index.js +9252 -0
  7. package/codemod/dist/wrapper.js +418736 -0
  8. package/color-mode/index.ts +9 -0
  9. package/css/atoms.docs.tsx +36 -17
  10. package/css/colorModeStyle.docs.tsx +81 -0
  11. package/css/index.ts +5 -1
  12. package/lib/components/Actions/Actions.screenshots.tsx +2 -44
  13. package/lib/components/Actions/Actions.tsx +2 -2
  14. package/lib/components/Actions/ActionsContext.ts +2 -3
  15. package/lib/components/Alert/Alert.css.ts +19 -0
  16. package/lib/components/Alert/Alert.docs.tsx +19 -7
  17. package/lib/components/Alert/Alert.screenshots.tsx +10 -10
  18. package/lib/components/Alert/Alert.tsx +63 -31
  19. package/lib/components/Autosuggest/Autosuggest.tsx +2 -2
  20. package/lib/components/Badge/Badge.docs.tsx +2 -2
  21. package/lib/components/Badge/Badge.gallery.tsx +6 -6
  22. package/lib/components/Badge/Badge.screenshots.tsx +8 -8
  23. package/lib/components/Badge/Badge.tsx +11 -31
  24. package/lib/components/Box/BackgroundContext.tsx +35 -29
  25. package/lib/components/Box/Box.docs.tsx +126 -31
  26. package/lib/components/Box/Box.playroom.tsx +37 -0
  27. package/lib/components/Box/Box.tsx +65 -19
  28. package/lib/components/Box/BoxRenderer.tsx +63 -0
  29. package/lib/components/Box/ColoredBox.tsx +187 -0
  30. package/lib/components/BraidPortal/BraidPortal.tsx +4 -1
  31. package/lib/components/BraidProvider/BraidProvider.docs.tsx +2 -5
  32. package/lib/components/BraidProvider/BraidProvider.tsx +12 -3
  33. package/lib/components/BraidProvider/VanillaThemeContainer.tsx +24 -0
  34. package/lib/components/BraidTestProvider/BraidTestProvider.docs.tsx +2 -6
  35. package/lib/components/{ButtonRenderer/ButtonRenderer.css.ts → Button/Button.css.ts} +38 -5
  36. package/lib/components/Button/Button.docs.tsx +105 -24
  37. package/lib/components/Button/Button.gallery.tsx +18 -13
  38. package/lib/components/Button/Button.playroom.tsx +2 -7
  39. package/lib/components/Button/Button.screenshots.tsx +60 -39
  40. package/lib/components/Button/Button.snippets.tsx +28 -0
  41. package/lib/components/Button/Button.tsx +392 -33
  42. package/lib/components/ButtonLink/ButtonLink.playroom.tsx +2 -7
  43. package/lib/components/ButtonLink/ButtonLink.tsx +23 -34
  44. package/lib/components/Card/Card.tsx +3 -14
  45. package/lib/components/Checkbox/Checkbox.gallery.tsx +1 -1
  46. package/lib/components/Checkbox/Checkbox.screenshots.tsx +17 -9
  47. package/lib/components/Divider/Divider.css.ts +45 -4
  48. package/lib/components/Divider/Divider.tsx +20 -14
  49. package/lib/components/Dropdown/Dropdown.docs.tsx +0 -1
  50. package/lib/components/Dropdown/Dropdown.gallery.tsx +1 -1
  51. package/lib/components/FieldLabel/FieldLabel.docs.tsx +1 -1
  52. package/lib/components/FieldMessage/FieldMessage.screenshots.tsx +6 -0
  53. package/lib/components/Heading/Heading.docs.tsx +11 -10
  54. package/lib/components/Heading/Heading.screenshots.tsx +5 -2
  55. package/lib/components/Loader/Loader.css.ts +3 -4
  56. package/lib/components/Loader/Loader.screenshots.tsx +4 -1
  57. package/lib/components/Loader/Loader.tsx +27 -30
  58. package/lib/components/MenuItem/MenuItemLink.tsx +9 -2
  59. package/lib/components/MenuItem/useMenuItem.tsx +6 -5
  60. package/lib/components/MenuItemCheckbox/MenuItemCheckbox.gallery.tsx +1 -1
  61. package/lib/components/MenuItemCheckbox/MenuItemCheckbox.tsx +3 -1
  62. package/lib/components/MenuItemDivider/MenuItemDivider.gallery.tsx +1 -1
  63. package/lib/components/MenuRenderer/MenuRenderer.tsx +2 -2
  64. package/lib/components/MenuRenderer/testHelper.tsx +7 -9
  65. package/lib/components/MonthPicker/MonthPicker.docs.tsx +0 -1
  66. package/lib/components/MonthPicker/MonthPicker.gallery.tsx +1 -1
  67. package/lib/components/OverflowMenu/OverflowMenu.gallery.tsx +1 -1
  68. package/lib/components/OverflowMenu/OverflowMenu.screenshots.tsx +1 -1
  69. package/lib/components/Pagination/Pagination.css.ts +17 -3
  70. package/lib/components/Pagination/Pagination.gallery.tsx +1 -1
  71. package/lib/components/Pagination/Pagination.screenshots.tsx +2 -2
  72. package/lib/components/Pagination/Pagination.tsx +8 -7
  73. package/lib/components/PasswordField/PasswordField.docs.tsx +0 -1
  74. package/lib/components/PasswordField/PasswordField.gallery.tsx +1 -1
  75. package/lib/components/RadioGroup/RadioGroup.docs.tsx +3 -6
  76. package/lib/components/RadioGroup/RadioGroup.screenshots.tsx +1 -1
  77. package/lib/components/Rating/Rating.css.ts +16 -3
  78. package/lib/components/Rating/Rating.screenshots.tsx +4 -1
  79. package/lib/components/Rating/Rating.tsx +8 -1
  80. package/lib/components/Tabs/Tab.tsx +6 -2
  81. package/lib/components/Tabs/Tabs.css.ts +9 -1
  82. package/lib/components/Tabs/Tabs.tsx +4 -1
  83. package/lib/components/Tag/Tag.docs.tsx +1 -1
  84. package/lib/components/Tag/Tag.gallery.tsx +2 -2
  85. package/lib/components/Tag/Tag.screenshots.tsx +4 -4
  86. package/lib/components/Text/Text.docs.tsx +17 -11
  87. package/lib/components/Text/Text.gallery.tsx +1 -1
  88. package/lib/components/Text/Text.screenshots.tsx +14 -4
  89. package/lib/components/TextField/TextField.docs.tsx +0 -1
  90. package/lib/components/TextField/TextField.gallery.tsx +1 -1
  91. package/lib/components/TextLink/TextLink.css.ts +139 -0
  92. package/lib/components/TextLink/TextLink.docs.tsx +2 -2
  93. package/lib/components/TextLink/TextLink.screenshots.tsx +33 -46
  94. package/lib/components/TextLink/TextLink.tsx +85 -18
  95. package/lib/components/TextLinkButton/TextLinkButton.screenshots.tsx +1 -10
  96. package/lib/components/TextLinkButton/TextLinkButton.tsx +23 -28
  97. package/lib/components/Textarea/Highlight/Highlight.tsx +1 -1
  98. package/lib/components/Textarea/Textarea.docs.tsx +0 -1
  99. package/lib/components/Textarea/Textarea.gallery.tsx +1 -1
  100. package/lib/components/Tiles/Tiles.screenshots.tsx +2 -2
  101. package/lib/components/Toggle/Toggle.css.ts +34 -7
  102. package/lib/components/Toggle/Toggle.tsx +100 -92
  103. package/lib/components/TooltipRenderer/TooltipRenderer.docs.tsx +1 -1
  104. package/lib/components/TooltipRenderer/TooltipRenderer.tsx +11 -13
  105. package/lib/components/iconButtons/IconButton.css.ts +0 -32
  106. package/lib/components/iconButtons/IconButton.tsx +26 -50
  107. package/lib/components/icons/IconTip/IconTip.docs.tsx +20 -0
  108. package/lib/components/icons/IconTip/IconTip.tsx +12 -0
  109. package/lib/components/icons/IconTip/IconTipSvg.tsx +21 -0
  110. package/lib/components/icons/IconZoomIn/IconZoomIn.docs.tsx +20 -0
  111. package/lib/components/icons/IconZoomIn/IconZoomIn.tsx +12 -0
  112. package/lib/components/icons/IconZoomIn/IconZoomInSvg.tsx +20 -0
  113. package/lib/components/icons/IconZoomOut/IconZoomOut.docs.tsx +20 -0
  114. package/lib/components/icons/IconZoomOut/IconZoomOut.tsx +12 -0
  115. package/lib/components/icons/IconZoomOut/IconZoomOutSvg.tsx +20 -0
  116. package/lib/components/icons/Icons.screenshots.tsx +2 -2
  117. package/lib/components/icons/index.ts +3 -0
  118. package/lib/components/index.ts +3 -8
  119. package/lib/components/private/Field/Field.css.ts +2 -1
  120. package/lib/components/private/Field/Field.tsx +4 -6
  121. package/lib/components/private/FieldOverlay/FieldOverlay.tsx +2 -2
  122. package/lib/components/private/InlineField/InlineField.css.ts +6 -6
  123. package/lib/components/private/InlineField/StyledInput.tsx +14 -9
  124. package/lib/components/private/Keyline/Keyline.css.ts +70 -0
  125. package/lib/components/private/Keyline/Keyline.tsx +38 -0
  126. package/lib/components/private/Modal/ModalContent.tsx +2 -2
  127. package/lib/components/private/Modal/modalTestSuite.tsx +1 -1
  128. package/lib/components/private/Placeholder/Placeholder.css.ts +44 -12
  129. package/lib/components/private/Placeholder/Placeholder.tsx +7 -3
  130. package/lib/components/private/touchable/debugTouchable.ts +7 -7
  131. package/lib/components/private/touchable/virtualTouchable.css.ts +12 -12
  132. package/lib/components/useToast/Toast.tsx +4 -10
  133. package/lib/components/useToast/useToast.docs.tsx +9 -9
  134. package/lib/css/atoms/atomicProperties.ts +30 -16
  135. package/lib/css/atoms/sprinkles.css.ts +24 -0
  136. package/lib/css/colorModeStyle.ts +33 -0
  137. package/lib/css/reset/reset.css.ts +12 -8
  138. package/lib/hooks/typography/index.ts +9 -74
  139. package/lib/hooks/typography/typography.css.ts +108 -36
  140. package/lib/hooks/useIcon/index.ts +4 -2
  141. package/lib/playroom/FrameComponent.tsx +50 -17
  142. package/lib/playroom/components.ts +1 -0
  143. package/lib/playroom/useScope.ts +44 -1
  144. package/lib/stories/all.stories.tsx +61 -30
  145. package/lib/themes/apac/tokens.ts +1 -0
  146. package/lib/themes/baseTokens/apac.ts +29 -13
  147. package/lib/themes/catho/tokens.ts +53 -18
  148. package/lib/themes/docs/tokens.ts +30 -16
  149. package/lib/themes/index.ts +0 -4
  150. package/lib/themes/makeBraidTheme.ts +4 -10
  151. package/lib/themes/occ/tokens.ts +57 -19
  152. package/lib/themes/seekAnz/tokens.ts +57 -19
  153. package/lib/themes/seekBusiness/tokens.ts +3 -1
  154. package/lib/themes/tokenType.ts +22 -8
  155. package/lib/themes/wireframe/tokens.ts +55 -20
  156. package/package.json +20 -5
  157. package/sku.config.js +3 -0
  158. package/sku.routes.js +2 -0
  159. package/test/index.ts +1 -0
  160. package/tsconfig.json +4 -1
  161. package/lib/components/BackgroundProvider/BackgroundProvider.docs.tsx +0 -63
  162. package/lib/components/BackgroundProvider/BackgroundProvider.tsx +0 -18
  163. package/lib/components/Box/BoxRenderer.ts +0 -22
  164. package/lib/components/BraidLoadableProvider/BraidLoadableProvider.docs.tsx +0 -48
  165. package/lib/components/BraidLoadableProvider/BraidLoadableProvider.tsx +0 -28
  166. package/lib/components/BulletList/BulletList.docs.tsx +0 -26
  167. package/lib/components/BulletList/BulletList.screenshots.tsx +0 -89
  168. package/lib/components/BulletList/BulletList.tsx +0 -92
  169. package/lib/components/ButtonRenderer/ButtonRenderer.docs.tsx +0 -44
  170. package/lib/components/ButtonRenderer/ButtonRenderer.screenshots.tsx +0 -27
  171. package/lib/components/ButtonRenderer/ButtonRenderer.tsx +0 -443
  172. package/lib/components/Card/Card.css.ts +0 -6
  173. package/lib/components/TextLinkRenderer/TextLinkRenderer.css.ts +0 -28
  174. package/lib/components/TextLinkRenderer/TextLinkRenderer.docs.tsx +0 -47
  175. package/lib/components/TextLinkRenderer/TextLinkRenderer.screenshots.tsx +0 -25
  176. package/lib/components/TextLinkRenderer/TextLinkRenderer.tsx +0 -209
  177. package/lib/components/TextLinkRenderer/TextLinkRendererContext.ts +0 -3
  178. package/lib/themes/baseTokens/seekAsia.ts +0 -289
  179. package/lib/themes/jobStreet/index.ts +0 -7
  180. package/lib/themes/jobStreet/jobsStreetTheme.css.ts +0 -7
  181. package/lib/themes/jobStreet/theme.treat.ts +0 -4
  182. package/lib/themes/jobStreet/tokens.ts +0 -12
  183. package/lib/themes/jobStreetClassic/index.ts +0 -7
  184. package/lib/themes/jobStreetClassic/jobStreetClassicTheme.css.ts +0 -7
  185. package/lib/themes/jobStreetClassic/theme.treat.ts +0 -4
  186. package/lib/themes/jobStreetClassic/tokens.ts +0 -86
  187. package/lib/themes/jobsDb/index.ts +0 -7
  188. package/lib/themes/jobsDb/jobsDbTheme.css.ts +0 -7
  189. package/lib/themes/jobsDb/theme.treat.ts +0 -4
  190. package/lib/themes/jobsDb/tokens.ts +0 -13
  191. package/lib/themes/seekUnifiedBeta/index.ts +0 -7
  192. package/lib/themes/seekUnifiedBeta/seekUnificationBetaTheme.css.ts +0 -7
  193. package/lib/themes/seekUnifiedBeta/theme.treat.ts +0 -4
  194. package/lib/themes/seekUnifiedBeta/tokens.ts +0 -259
  195. package/themes/jobStreet.ts +0 -1
  196. package/themes/jobStreetClassic.ts +0 -1
  197. package/themes/jobsDb.ts +0 -1
  198. package/themes/seekUnifiedBeta.ts +0 -1
package/.eslintignore CHANGED
@@ -5,3 +5,4 @@ dist-storybook/
5
5
  report/
6
6
  site/dist/
7
7
  # end managed by sku
8
+ codemod/dist
package/.nvmrc CHANGED
@@ -1 +1 @@
1
- 12.14.1
1
+ 16.13.0
package/.prettierignore CHANGED
@@ -8,3 +8,4 @@ site/dist/
8
8
  CHANGELOG.md
9
9
  .changeset/*.md
10
10
  componentUpdates.json
11
+ codemod/dist
package/CHANGELOG.md CHANGED
@@ -1,5 +1,433 @@
1
1
  # braid-design-system
2
2
 
3
+ ## 31.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - **vars:** Add light variant foreground colors ([#1042](https://github.com/seek-oss/braid-design-system/pull/1042))
8
+
9
+ **New foregrounds**
10
+ The following foregrounds are now available on the `vars.foregroundColor` theme object:
11
+
12
+ - `cautionLight`
13
+ - `infoLight`
14
+ - `linkLight`
15
+ - `linkLightVisited`
16
+ - `positiveLight`
17
+ - `promoteLight`
18
+
19
+ - **Text:** Improve contrast of `caution`, `positive`, `info`, `promote` and `link` tones ([#1042](https://github.com/seek-oss/braid-design-system/pull/1042))
20
+
21
+ When using any of the above tones in a dark container, a lighter colour will be used to improve the text contrast against the background.
22
+
23
+ ### Patch Changes
24
+
25
+ - **OverflowMenu:** Use `neutral` tone button style ([#1042](https://github.com/seek-oss/braid-design-system/pull/1042))
26
+
27
+ - **Alert, Card, Toast:** Improve highlight keyline ([#1042](https://github.com/seek-oss/braid-design-system/pull/1042))
28
+
29
+ Ensures that components using a highlight keyline have the correct border radius and mask their overflow correctly.
30
+
31
+ - **Alert, Autosuggest, Tag, TextField:** Use `neutral` tone button style for clear action ([#1042](https://github.com/seek-oss/braid-design-system/pull/1042))
32
+
33
+ - **Box:** Reset background color on `input` and `select` elements ([#1042](https://github.com/seek-oss/braid-design-system/pull/1042))
34
+
35
+ When specifying a `component` of `input` or `select` the background color was not being reset, falling through to the user agent styles. Reseting it to `transparent` to ensure predicatble styles across browsers and colour modes.
36
+
37
+ - **MenuItem, MenuItemLink, MenuItemCheckbox:** Use `span` elements internally for more valid HTML. ([#1042](https://github.com/seek-oss/braid-design-system/pull/1042))
38
+
39
+ - **Loader:** Use current text color ([#1042](https://github.com/seek-oss/braid-design-system/pull/1042))
40
+
41
+ ## 31.1.0
42
+
43
+ ### Minor Changes
44
+
45
+ - **IconTip:** Add tip icon ([#1040](https://github.com/seek-oss/braid-design-system/pull/1040))
46
+
47
+ - **IconZoomIn, IconZoomOut:** Add zoom in/out icons ([#1035](https://github.com/seek-oss/braid-design-system/pull/1035))
48
+
49
+ ## 31.0.0
50
+
51
+ ### Major Changes
52
+
53
+ - **BraidTestProvider:** Move to separate entry ([#1031](https://github.com/seek-oss/braid-design-system/pull/1031))
54
+
55
+ By moving `BraidTestProvider` to it’s own entry, we can prevent importing all the themes at dev-time. This improves the developer experience when debugging the stylesheet that is output by the development server.
56
+
57
+ **MIGRATION GUIDE**
58
+
59
+ Migration can largely be automated by running the Braid upgrade command. You must provide a glob to target your project’s source files. For example:
60
+
61
+ ```
62
+ yarn braid-upgrade v31 "**/*.{ts,tsx}"
63
+ ```
64
+
65
+ ***
66
+
67
+ It may be necessary to manually migrate code in some cases, here are the affected use cases:
68
+
69
+ ```diff
70
+ - import { BraidTestProvider } from 'braid-design-system';
71
+ + import { BraidTestProvider } from 'braid-design-system/test';
72
+ ```
73
+
74
+ - **BackgroundProvider** Removed in favour of setting a `background` of `customDark`/`customLight` directly on the `Box` that has the custom background color. ([#1031](https://github.com/seek-oss/braid-design-system/pull/1031))
75
+
76
+ **MIGRATION GUIDE**
77
+
78
+ ```diff
79
+ -<Box style={{ backgroundColor: 'purple' }}>
80
+ +<Box background="customDark" style={{ backgroundColor: 'purple' }}>
81
+ - <BackgroundProvider value="UNKNOWN_DARK">
82
+ <Text>Inverted text given dark context</Text>
83
+ - </BackgroundProvider>
84
+ </Box>
85
+ ```
86
+
87
+ - Remove previously deprecated `ButtonRenderer` component in favour of [`Button`](https://seek-oss.github.io/braid-design-system/components/Button) and [`ButtonLink`](https://seek-oss.github.io/braid-design-system/components/ButtonLink). ([#1031](https://github.com/seek-oss/braid-design-system/pull/1031))
88
+
89
+ **MIGRATION GUIDE**
90
+
91
+ If you were using this to render an `a` element that visually looks like a button, you should be using [`ButtonLink`](https://seek-oss.github.io/braid-design-system/components/ButtonLink)
92
+
93
+ ```diff
94
+ - <ButtonRenderer>
95
+ - {(ButtonChildren, buttonProps) => (
96
+ - <a to="#" {...buttonProps}>
97
+ - Visually a button
98
+ - </a>
99
+ - )}
100
+ - </ButtonRenderer>
101
+ + <ButtonLink>
102
+ + Visually a button
103
+ + </ButtonLink>
104
+ ```
105
+
106
+ - **Button, ButtonLink:** Add `neutral` tone ([#1031](https://github.com/seek-oss/braid-design-system/pull/1031))
107
+
108
+ Introduces a `neutral` tone for cases where actions need to be de-emphasised. As a result, there is a breaking change to the contextual design rules that invert buttons in dark containers.
109
+
110
+ **BREAKING CHANGE:**
111
+
112
+ A `Button` with a `variant` of `ghost`, `soft`, or `transparent` and no specified `tone` would previously invert when inside a dark container. Now, instead of inverting the foreground colour, these cases will use a lighter version of the default tone, i.e. `formAccent`.
113
+
114
+ **MIGRATION GUIDE:**
115
+
116
+ To maintain previous behaviour, consumers should opt into the `neutral` tone.
117
+
118
+ ```diff
119
+ <Box background="brand" padding="gutter">
120
+ - <Button variant="ghost">Click</Button>
121
+ + <Button variant="ghost" tone="neutral">Click</Button>
122
+ </Box>
123
+ ```
124
+
125
+ - Remove legacy seekAsia themes ([#1031](https://github.com/seek-oss/braid-design-system/pull/1031))
126
+
127
+ Since the rebrand went live earlier this year, all consumers of `jobsDb`, `jobStreet`, `jobStreetClassic` and `seekUnifiedBeta` themes should now be using the `apac` theme in production.
128
+
129
+ **MIGRATION GUIDE**
130
+
131
+ ```diff
132
+ -import jobStreet from 'braid-design-system/themes/jobStreet';
133
+ +import apac from 'braid-design-system/themes/apac';
134
+
135
+ -<BraidProvider theme={jobStreet}>
136
+ +<BraidProvider theme={apac}>
137
+ ...
138
+ </BraidProvider>
139
+ ```
140
+
141
+ - **BulletList** Remove deprecated component ([#1031](https://github.com/seek-oss/braid-design-system/pull/1031))
142
+
143
+ **MIGRATION GUIDE**
144
+
145
+ ```diff
146
+ -<BulletList>
147
+ - <Bullet large>Bullet</Bullet>
148
+ - <Bullet large>Bullet</Bullet>
149
+ - <Bullet large>Bullet</Bullet>
150
+ -</BulletList>
151
+
152
+ +<List size="large">
153
+ + <Text>Bullet</Text>
154
+ + <Text>Bullet</Text>
155
+ + <Text>Bullet</Text>
156
+ +</List>
157
+ ```
158
+
159
+ - Remove previously deprecated `TextLinkRenderer` component in favour of [`TextLink`](https://seek-oss.github.io/braid-design-system/components/TextLink) and [`TextLinkButton`](https://seek-oss.github.io/braid-design-system/components/TextLinkButton). ([#1031](https://github.com/seek-oss/braid-design-system/pull/1031))
160
+
161
+ **MIGRATION GUIDE**
162
+
163
+ If you were using this to render a `button` element that visually looks like a link, you should be using [`TextLinkButton`](https://seek-oss.github.io/braid-design-system/components/TextLinkButton)
164
+
165
+ ```diff
166
+ <Text>
167
+ - <TextLinkRenderer reset={false}>
168
+ - {(textLinkProps) => (
169
+ - <Box component="button" {...textLinkProps}>
170
+ - Visually a link
171
+ - </Box>
172
+ - )}
173
+ - </TextLinkRenderer>
174
+ + <TextLinkButton>
175
+ + Visually a link
176
+ + </TextLinkButton>
177
+ , rendered as a button.
178
+ </Text>
179
+ ```
180
+
181
+ If you were using this to render an `a` element or using a client side router link component you should ensure you have configured the [`linkComponent on BraidProvider`](https://seek-oss.github.io/braid-design-system/components/BraidProvider#providing-a-custom-link-component) in your app. Once handled, migrating to [`TextLink`](https://seek-oss.github.io/braid-design-system/components/TextLink) should be straight forward.
182
+
183
+ ```diff
184
+ <Text>
185
+ - <TextLinkRenderer reset={false}>
186
+ - {(textLinkProps) => (
187
+ - <Link {...textLinkProps}>
188
+ - ...
189
+ - </Link>
190
+ - )}
191
+ - </TextLinkRenderer>
192
+ + <TextLink>
193
+ + ...
194
+ + </TextLink>
195
+ </Text>
196
+ ```
197
+
198
+ - **Button, ButtonLink:** Remove weight prop ([#1031](https://github.com/seek-oss/braid-design-system/pull/1031))
199
+
200
+ Removing support for the `weight` prop. This was deprecated back in [v29.26.0](https://seek-oss.github.io/braid-design-system/releases#29.26.0) in favour of using the [`variant`](https://seek-oss.github.io/braid-design-system/components/Button#variants) prop.
201
+
202
+ - **TextLink, TextLinkButton:** Remove support inside `Actions` component ([#1031](https://github.com/seek-oss/braid-design-system/pull/1031))
203
+
204
+ Removing support for `TextLink` and `TextLinkButton` components inside of `Actions`. This was previously deprecated back in [v29.26.0](https://seek-oss.github.io/braid-design-system/releases#29.26.0) in favour of using the `transparent` `variant` of [`ButtonLink`](https://seek-oss.github.io/braid-design-system/components/Button#variants).
205
+
206
+ **MIGRATION GUIDE**
207
+
208
+ ```diff
209
+ <Actions>
210
+ <Button>...</Button>
211
+ - <TextLink href="...">...</TextLink>
212
+ + <ButtonLink href="..." variant="transparent">...</ButtonLink>
213
+ </Actions>
214
+ ```
215
+
216
+ - Remove `BraidLoadableProvider` ([#1031](https://github.com/seek-oss/braid-design-system/pull/1031))
217
+
218
+ As most Apps should run the `apac` theme across all brands, it no longer makes sense to centralise a loadable version of the `BraidProvider`. This should simplify builds across the board and may result in a small build-speed increase.
219
+
220
+ **MIGRATION GUIDE**
221
+
222
+ If you are only using a single theme, then you should migrate your `BraidLoadableProvider` usage to `BraidProvider`.
223
+
224
+ ```diff
225
+ +import apac from 'braid-design-system/themes/apac';
226
+ +import { BraidProvider } from 'braid-design-system';
227
+ -import { BraidLoadableProvider } from 'braid-design-system';
228
+
229
+ export const App = () => (
230
+ - <BraidLoadableProvider themeName="apac">
231
+ + <BraidProvider theme={apac}>
232
+ ...
233
+ - </BraidLoadableProvider>
234
+ + </BraidProvider>
235
+ );
236
+ ```
237
+
238
+ If your app still needs to render different themes then you can replicate the `BraidLoadableProvider` functionality locally using the `loadable.lib` API.
239
+
240
+ ```tsx
241
+ import { BraidProvider } from 'braid-design-system';
242
+ import React, { ReactNode } from 'react';
243
+ import loadable from 'sku/@loadable/component';
244
+
245
+ type ThemeName = 'apac' | 'catho';
246
+
247
+ const BraidTheme = loadable.lib((props: { themeName: ThemeName }) =>
248
+ import(`braid-design-system/themes/${props.themeName}`),
249
+ );
250
+
251
+ interface AppProps {
252
+ themeName: ThemeName;
253
+ children: ReactNode;
254
+ }
255
+ export const App = ({ themeName, children }: AppProps) => (
256
+ <BraidTheme themeName={themeName}>
257
+ {({ default: theme }) => (
258
+ <BraidProvider theme={theme}>{children}</BraidProvider>
259
+ )}
260
+ </BraidTheme>
261
+ );
262
+ ```
263
+
264
+ - **Box, atoms, vars:** Update theme colour tokens with improved semantics. ([#1031](https://github.com/seek-oss/braid-design-system/pull/1031))
265
+
266
+ Simplifies the semantics of the colour-based tokens to support upcoming colour mode work. Changes to the property values on `backgroundColor` and `borderColor` has flow on affects to the apis on `Box` and `atoms`.
267
+
268
+ **TOKEN CHANGES**
269
+
270
+ **New**
271
+
272
+ - **backgroundColor:** `surface`, `neutralSoft`
273
+ - **borderColor:** `neutral`, `neutralInverted`, `neutralLight`
274
+
275
+ **Removed**
276
+
277
+ - **backgroundColor:** `card`, `formAccentDisabled`, `input`, `inputDisabled`, `selection`
278
+ - **borderColor:** `formHover`, `standard`, `standardInverted`
279
+
280
+ **MIGRATION GUIDE**
281
+
282
+ Migration can largely be automated by running the Braid upgrade command. You must provide a glob to target your project’s source files. For example:
283
+
284
+ ```
285
+ yarn braid-upgrade v31 "**/*.{ts,tsx}"
286
+ ```
287
+
288
+ ***
289
+
290
+ It may be necessary to manually migrate code in some cases, here are the affected use cases:
291
+
292
+ **`Box` backgrounds**
293
+
294
+ ```diff
295
+ - <Box background="card" />
296
+ + <Box background="surface" />
297
+
298
+ - <Box background="formAccentDisabled" />
299
+ + <Box background="neutralLight" />
300
+
301
+ - <Box background="input" />
302
+ + <Box background="surface" />
303
+
304
+ - <Box background="inputDisabled" />
305
+ + <Box background="neutralSoft" />
306
+
307
+ - <Box background="selection" />
308
+ + <Box background="formAccentSoft" />
309
+ ```
310
+
311
+ **`Box` boxShadows**
312
+
313
+ ```diff
314
+ - <Box boxShadow="borderStandard" />
315
+ + <Box boxShadow="borderNeutralLight" />
316
+
317
+ - <Box boxShadow="borderStandardInverted" />
318
+ + <Box boxShadow="borderNeutralInverted" />
319
+
320
+ - <Box boxShadow="borderStandardInvertedLarge" />
321
+ + <Box boxShadow="borderNeutralInvertedLarge" />
322
+
323
+ - <Box boxShadow="borderFormHover" />
324
+ + <Box boxShadow="borderFormAccent" />
325
+ ```
326
+
327
+ **`vars`**
328
+
329
+ ```diff
330
+ - vars.borderColor.standard
331
+ + vars.borderColor.neutralLight
332
+
333
+ - vars.borderColor.standardInverted
334
+ + vars.borderColor.neutralInverted
335
+
336
+ - vars.borderColor.formHover
337
+ + vars.borderColor.formAccent
338
+ ```
339
+
340
+ **`atoms`**
341
+
342
+ ```diff
343
+ atoms({
344
+ - boxShadow: 'borderStandard',
345
+ + boxShadow: 'borderNeutralLight',
346
+ });
347
+
348
+ atoms({
349
+ - boxShadow: 'borderStandardInverted',
350
+ + boxShadow: 'borderNeutralInverted',
351
+ });
352
+
353
+ atoms({
354
+ - boxShadow: 'borderStandardInvertedLarge',
355
+ + boxShadow: 'borderNeutralInvertedLarge',
356
+ });
357
+
358
+ atoms({
359
+ - boxShadow: 'borderFormHover',
360
+ + boxShadow: 'borderFormAccent',
361
+ });
362
+ ```
363
+
364
+ ### Minor Changes
365
+
366
+ - **Box:** Add neutral background variants and new boxShadow border variants ([#1031](https://github.com/seek-oss/braid-design-system/pull/1031))
367
+
368
+ **New backgrounds**
369
+ The following backgrounds are now available:
370
+
371
+ - `neutralActive`
372
+ - `neutralHover`
373
+ - `neutralSoftActive`
374
+ - `neutralSoftHover`
375
+
376
+ **New boxShadows**
377
+ The following box shadows are now available:
378
+
379
+ - `borderBrandAccentLightLarge`
380
+ - `borderCriticalLightLarge`
381
+ - `borderFormAccentLight`
382
+ - `borderFormAccentLightLarge`
383
+
384
+ - **atoms:** Add boxShadow border variants ([#1031](https://github.com/seek-oss/braid-design-system/pull/1031))
385
+
386
+ **New boxShadows**
387
+ The following box shadows are now available:
388
+
389
+ - `borderBrandAccentLightLarge`
390
+ - `borderCriticalLightLarge`
391
+ - `borderFormAccentLight`
392
+ - `borderFormAccentLightLarge`
393
+
394
+ - **vars:** Darken neutral background for the `occ` theme. ([#1031](https://github.com/seek-oss/braid-design-system/pull/1031))
395
+
396
+ A `neutral` background should be able to hold tone-based text. Moving from `grey700` to `grey800` as per the [Atomic Design System color palette](https://occmundial.github.io/occ-atomic/#Colors)
397
+
398
+ - **vars:** Add new backgrounds and light variant border colors ([#1031](https://github.com/seek-oss/braid-design-system/pull/1031))
399
+
400
+ **New backgrounds**
401
+ The following backgrounds are now available on the `vars.backgroundColor` theme object:
402
+
403
+ - `neutralActive`
404
+ - `neutralHover`
405
+ - `neutralSoftActive`
406
+ - `neutralSoftHover`
407
+
408
+ **New borderColors**
409
+ The following border colors are now available on the `vars.borderColor` theme object:
410
+
411
+ - `brandAccentLight`
412
+ - `criticalLight`
413
+ - `formAccentLight`
414
+
415
+ - **vars:** Darken neutral background for the `seekAnz` theme. ([#1031](https://github.com/seek-oss/braid-design-system/pull/1031))
416
+
417
+ A `neutral` background should be able to hold tone-based text. Moving from `sk-mid-gray-dark` to `sk-charcoal` as per the [Seek Style Guide color palette](https://seek-oss.github.io/seek-style-guide/palette)
418
+
419
+ ### Patch Changes
420
+
421
+ - **Text:** Improve contrast of `brandAccent`, `critical` and `formAccent` tones ([#1031](https://github.com/seek-oss/braid-design-system/pull/1031))
422
+
423
+ When using any of the above tones in a dark container, a lighter colour will be used to improve the text contrast against the background.
424
+
425
+ ## 30.7.0
426
+
427
+ ### Minor Changes
428
+
429
+ - **Toggle:** Add ref support ([#1029](https://github.com/seek-oss/braid-design-system/pull/1029))
430
+
3
431
  ## 30.6.0
4
432
 
5
433
  ### Minor Changes
package/README.md CHANGED
@@ -29,7 +29,7 @@ For example:
29
29
 
30
30
  ```js
31
31
  import 'braid-design-system/reset'; // <-- Must be first
32
- import jobStreetTheme from 'braid-design-system/themes/jobStreet';
32
+ import apacTheme from 'braid-design-system/themes/apac';
33
33
  import { BraidProvider, Text } from 'braid-design-system';
34
34
  // ...etc.
35
35
  ```
@@ -38,11 +38,11 @@ Finally, render the `BraidProvider` component, providing the imported theme via
38
38
 
39
39
  ```js
40
40
  import 'braid-design-system/reset';
41
- import jobStreetTheme from 'braid-design-system/themes/jobStreet';
41
+ import apacTheme from 'braid-design-system/themes/apac';
42
42
  import { BraidProvider, Text } from 'braid-design-system';
43
43
 
44
44
  export default () => (
45
- <BraidProvider theme={jobStreetTheme}>
45
+ <BraidProvider theme={apacTheme}>
46
46
  <Text>Hello World!</Text>
47
47
  </BraidProvider>
48
48
  );
@@ -51,7 +51,7 @@ export default () => (
51
51
  If you're rendering within the context of another application, you may want to opt out of the provided body styles, which set the background color and reset margin and padding:
52
52
 
53
53
  ```js
54
- <BraidProvider theme={jobStreetTheme} styleBody={false}>
54
+ <BraidProvider theme={apacTheme} styleBody={false}>
55
55
  <Text>Hello World!</Text>
56
56
  </BraidProvider>
57
57
  ```
@@ -81,21 +81,6 @@ export const App = () => (
81
81
  );
82
82
  ```
83
83
 
84
- ## Multi-theme setup
85
-
86
- If you require multiple themes and want to code split them, you can subsitute the `BraidProvider` with the `BraidLoadableProvider`, passing it the necessary `themeName` at runtime. Remove any explicit theme imports you may have.
87
-
88
- ```js
89
- import 'braid-design-system/reset';
90
- import { BraidLoadableProvider, Text } from 'braid-design-system';
91
-
92
- export default ({ themeName }) => (
93
- <BraidLoadableProvider themeName={themeName}>
94
- <Text>Hello World!</Text>
95
- </BraidLoadableProvider>
96
- );
97
- ```
98
-
99
84
  ## Style Guide Migration
100
85
 
101
86
  If you're migrating from an existing style guide, please refer to the [Style Guide Migration](./docs/Style%20Guide%20Migration.md) guide.