braid-design-system 32.1.1 → 32.3.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 (38) hide show
  1. package/CHANGELOG.md +214 -0
  2. package/codemod/dist/wrapper.js +1315 -21130
  3. package/dist/ToastContext.chunk.cjs +71 -99
  4. package/dist/ToastContext.chunk.mjs +117 -145
  5. package/dist/Toggle.chunk.cjs +70 -49
  6. package/dist/Toggle.chunk.mjs +80 -59
  7. package/dist/reset.d.ts +212 -95
  8. package/dist/side-effects/lib/themes/baseTokens/apac.cjs +7 -8
  9. package/dist/side-effects/lib/themes/baseTokens/apac.mjs +6 -8
  10. package/dist/side-effects/lib/themes/makeRuntimeTokens.cjs +3 -9
  11. package/dist/side-effects/lib/themes/makeRuntimeTokens.mjs +3 -8
  12. package/dist/side-effects/lib/themes/tokenType.cjs +15 -0
  13. package/dist/side-effects/lib/themes/tokenType.mjs +16 -0
  14. package/dist/styles/lib/components/Button/Button.css.cjs +24 -23
  15. package/dist/styles/lib/components/Button/Button.css.mjs +25 -24
  16. package/dist/styles/lib/components/Stepper/Stepper.css.cjs +8 -7
  17. package/dist/styles/lib/components/Stepper/Stepper.css.mjs +8 -7
  18. package/dist/styles/lib/components/Textarea/Highlight/Highlight.css.cjs +34 -3
  19. package/dist/styles/lib/components/Textarea/Highlight/Highlight.css.mjs +34 -3
  20. package/dist/styles/lib/components/TooltipRenderer/TooltipRenderer.css.cjs +1 -9
  21. package/dist/styles/lib/components/TooltipRenderer/TooltipRenderer.css.mjs +1 -9
  22. package/dist/styles/lib/components/private/Keyline/Keyline.css.cjs +4 -0
  23. package/dist/styles/lib/components/private/Keyline/Keyline.css.mjs +5 -1
  24. package/dist/styles/lib/css/atoms/atomicProperties.cjs +2 -0
  25. package/dist/styles/lib/css/atoms/atomicProperties.mjs +2 -0
  26. package/dist/styles/lib/css/negativeMargin/negativeMargin.css.cjs +4 -9
  27. package/dist/styles/lib/css/negativeMargin/negativeMargin.css.mjs +1 -6
  28. package/dist/styles/lib/css/typography.css.cjs +1 -16
  29. package/dist/styles/lib/css/typography.css.mjs +1 -16
  30. package/dist/styles/lib/themes/docs/tokens.cjs +8 -8
  31. package/dist/styles/lib/themes/docs/tokens.mjs +6 -8
  32. package/dist/styles/lib/themes/makeVanillaTheme.cjs +22 -9
  33. package/dist/styles/lib/themes/makeVanillaTheme.mjs +22 -9
  34. package/dist/styles/lib/themes/wireframe/tokens.cjs +25 -29
  35. package/dist/styles/lib/themes/wireframe/tokens.mjs +23 -29
  36. package/package.json +4 -3
  37. package/dist/styles/lib/components/Badge/Badge.css.cjs +0 -27
  38. package/dist/styles/lib/components/Badge/Badge.css.mjs +0 -28
package/CHANGELOG.md CHANGED
@@ -1,5 +1,219 @@
1
1
  # braid-design-system
2
2
 
3
+ ## 32.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - **Box, atoms:** Add `borderBrandAccent` variants to available boxShadows ([#1274](https://github.com/seek-oss/braid-design-system/pull/1274))
8
+
9
+ Add `borderBrandAccent` and `borderBrandAccentLight` to the available boxShadows, combining the `brandAccent` and `brandAccentLight` border colours with the `standard` border width token.
10
+ Previously, `brandAccent` was only available with the `large` border width.
11
+
12
+ **EXAMPLE USAGE:**
13
+
14
+ ```jsx
15
+ <Box boxShadow="borderBrandAccent" />;
16
+ {
17
+ /* or */
18
+ }
19
+ <Box boxShadow="borderBrandAccentLight" />;
20
+ ```
21
+
22
+ ```ts
23
+ import { atoms } from 'braid-design-system/css';
24
+
25
+ atoms({ boxShadow: 'borderBrandAccent' });
26
+ atoms({ boxShadow: 'borderBrandAccentLight' });
27
+ ```
28
+
29
+ - **useToast:** Design uplift with increased page contrast ([#1269](https://github.com/seek-oss/braid-design-system/pull/1269))
30
+
31
+ As a means to increase constrast against page content, the design has been updated to be presented on inverted backgrounds based on the color mode.
32
+ The design has also be refined to remove the sidebar/keyline (consistent with `Alert`), while also applying the `tone` to the provided `message`.
33
+
34
+ - **Textarea:** Add support for disabling built-in spell checker ([#1272](https://github.com/seek-oss/braid-design-system/pull/1272))
35
+
36
+ Provide support for disabling the built-in browser spell checker using the native HTML attribute `spellCheck`.
37
+
38
+ When highlighting ranges you may choose to turn spell check off to prevent colliding highlights. This can be done be setting `spellCheck` to `false`.
39
+
40
+ **EXAMPLE USAGE:**
41
+
42
+ ```jsx
43
+ <Textarea spellCheck={false} />
44
+ ```
45
+
46
+ - Add support for `caution` tone to form fields ([#1271](https://github.com/seek-oss/braid-design-system/pull/1271))
47
+
48
+ Provide support for applying a `caution` tone to form fields.
49
+ Specifying this `tone` will show the `IconCaution` alongside the provided `message`.
50
+
51
+ **EXAMPLE USAGE:**
52
+
53
+ ```jsx
54
+ <TextField tone="caution" message="Caution message" />
55
+ ```
56
+
57
+ - **Textarea:** Add support for `caution` highlightRanges ([#1272](https://github.com/seek-oss/braid-design-system/pull/1272))
58
+
59
+ Providing a `tone` of `caution` along with a set of `highlightRanges` will now apply the `caution` tone to the text being highlighted.
60
+ To complement this feature, the design has been uplifted to work consistently across both the `critical` and `caution` tones.
61
+
62
+ **EXAMPLE USAGE:**
63
+
64
+ ```jsx
65
+ <Textarea
66
+ tone="caution"
67
+ message="Caution message"
68
+ highlightRanges={...}
69
+ />
70
+ ```
71
+
72
+ - **Alert:** Design uplift ([#1269](https://github.com/seek-oss/braid-design-system/pull/1269))
73
+
74
+ Refine the design to use consistent horizontal container inset, aligning content with elements like `Card`, as well as simplifying the design by removing the sidebar/keyline (consistent with `useToast`).
75
+
76
+ ### Patch Changes
77
+
78
+ - **Button, ButtonLink:** Align `ghost` border width with field border width ([#1274](https://github.com/seek-oss/braid-design-system/pull/1274))
79
+
80
+ Align the border width of `ghost` variants with the border width of fields.
81
+ This is the final re-alignment piece to ensure all components use theme scales consistently, improving the ability of Braid themes to deliver cohesive design uplift.
82
+
83
+ - **Stepper:** Reduce size of `Step` indicators ([#1275](https://github.com/seek-oss/braid-design-system/pull/1275))
84
+
85
+ Refine the design of `Step` indicators by reducing their size.
86
+
87
+ - **TooltipRenderer:** Remove custom background ([#1268](https://github.com/seek-oss/braid-design-system/pull/1268))
88
+
89
+ Use the correct semantic token for the background of tooltips.
90
+ While there is no visual change, this is just a clean up to ensure the palette usage remains consistent.
91
+
92
+ ## 32.2.0
93
+
94
+ ### Minor Changes
95
+
96
+ - **Box, atoms, vars:** Add `small` to border radius scale ([#1253](https://github.com/seek-oss/braid-design-system/pull/1253))
97
+
98
+ Extends the border radius scale to include `small` as a step below `standard`.
99
+ This addition is to support an upcoming design uplift that requires greater fidelity in the scale.
100
+ Note, the new value is also available as a responsive property.
101
+
102
+ **EXAMPLE USAGE:**
103
+
104
+ ```jsx
105
+ <Box borderRadius="small" />;
106
+
107
+ {
108
+ /* Or responsively: */
109
+ }
110
+ <Box borderRadius={{ mobile: 'small', tablet: 'standard' }} />;
111
+ ```
112
+
113
+ ```ts
114
+ import { atoms } from 'braid-design-system/css';
115
+
116
+ atoms({ borderRadius: 'small' });
117
+ ```
118
+
119
+ ```ts
120
+ import { vars } from 'braid-design-system/css';
121
+
122
+ const radius = vars.borderRadius.small;
123
+ ```
124
+
125
+ - **theme:** Add support for defining line heights with lineGap ([#1267](https://github.com/seek-oss/braid-design-system/pull/1267))
126
+
127
+ Provide support for themes to define their typographic line heights via `lineGap`.
128
+ This allows us to reason about the white space between wrapping lines of text in the same way we think about `Stack` spacing.
129
+
130
+ For a visual preview of this mental model head over to the [Capsize website].
131
+
132
+ [Capsize website]: https://seek-oss.github.io/capsize/
133
+
134
+ - Add `xxxlarge` to the space scale ([#1262](https://github.com/seek-oss/braid-design-system/pull/1262))
135
+
136
+ Extends the range of the space scale to include `xxxlarge`.
137
+ This addition is to support an upcoming design uplift that requires greater fidelity in the scale.
138
+ Note, the new value is also available as a responsive property.
139
+
140
+ **EXAMPLE USAGE:**
141
+
142
+ ```jsx
143
+ <Stack space="xxxlarge">...</Stack>;
144
+
145
+ {
146
+ /* Or responsively: */
147
+ }
148
+ <Stack space={{ mobile: 'large', tablet: 'xxxlarge' }}>...</Stack>;
149
+ ```
150
+
151
+ ```ts
152
+ import { atoms } from 'braid-design-system/css';
153
+
154
+ atoms({ paddingY: 'xxxlarge' });
155
+ ```
156
+
157
+ ```ts
158
+ import { vars } from 'braid-design-system/css';
159
+
160
+ const space = vars.space.xxxlarge;
161
+ ```
162
+
163
+ ### Patch Changes
164
+
165
+ - **theme:** Add support for webfonts beyond Google Fonts ([#1255](https://github.com/seek-oss/braid-design-system/pull/1255))
166
+
167
+ Previously the `webFont` on the theme was the `familyName` and was being used to construct a link tag to a Google Fonts stylesheet and provide to consumers via a runtime token.
168
+ To enable fonts beyond Google Fonts, we are changing `webFont` to be a URL.
169
+
170
+ This does not impact existing themes (as there are no themes currently with a web font), and the contract of the runtime token (a constructed link tag) remains unchanged.
171
+
172
+ - **MenuRenderer:** Hide overflow on menu ([#1264](https://github.com/seek-oss/braid-design-system/pull/1264))
173
+
174
+ Fixes a bug where the selection/highlight for a `MenuItem` could extend outside of the menu itself.
175
+
176
+ - **Badge:** Adjust height to support different typographic scales ([#1257](https://github.com/seek-oss/braid-design-system/pull/1257))
177
+
178
+ Adjusts the height of `Badge` to be driven by the capHeight of `xsmall` text plus vertical padding, rather than `xsmall` line height.
179
+ This enables different typographic scales across themes, while ensuring the `Badge` height is relative.
180
+
181
+ - **RadioItem, Toggle:** Use formAccent border when selected ([#1251](https://github.com/seek-oss/braid-design-system/pull/1251))
182
+
183
+ Switch to using the `formAccent` border colour, rather than the `field` border color, when in the selected state (e.g. `checked` for `RadioItem`, `on` for `Toggle`).
184
+
185
+ - Fix error reading `standard` of undefined ([#1256](https://github.com/seek-oss/braid-design-system/pull/1256))
186
+
187
+ The use of dynamic property access left some styles exposed to being marked as unused and tree shaken away.
188
+
189
+ Refactoring these styles to be explicitly referenced to ensure this will not be the case.
190
+
191
+ - **TooltipRenderer:** Refine padding to complement radius scale ([#1263](https://github.com/seek-oss/braid-design-system/pull/1263))
192
+
193
+ Removes the custom padding on tooltips in favour of using the space scale.
194
+ Previously, a custom value was used to complement the over sized radius which has now be reduced.
195
+
196
+ - **Button, ButtonLink:** Improve support for different typographic scales ([#1259](https://github.com/seek-oss/braid-design-system/pull/1259))
197
+
198
+ Ensure the height of a `small` sized `Button` is not reliant on the text line height.
199
+
200
+ This enables different typographic scales across themes, while ensuring the `Button` height is relative.
201
+
202
+ - **Alert, Card, useToast:** Decouple keyline width from space scale ([#1266](https://github.com/seek-oss/braid-design-system/pull/1266))
203
+
204
+ Previously the keyline width on the left determined its width using the space scale.
205
+ Re-aligning this to use the grid unit to enable themes with larger space scales.
206
+
207
+ - Improve consistency of border radius usage across components ([#1253](https://github.com/seek-oss/braid-design-system/pull/1253))
208
+
209
+ Over time, individual components have reached for a larger radius in the scale, rather than increasing the scale at a theme level. This resulted in inconsistent use across the system, preventing uplift of the scale.
210
+
211
+ Re-aligning all components to use the scale consistently enables themes to apply very different radius scales — enabling an upcoming design uplift theme.
212
+
213
+ - **Dialog, Drawer:** Reduce space between title and description ([#1265](https://github.com/seek-oss/braid-design-system/pull/1265))
214
+
215
+ Reducing the space between `title` and `description` to `small` to improve association of the header block content
216
+
3
217
  ## 32.1.1
4
218
 
5
219
  ### Patch Changes