braid-design-system 31.17.2 → 31.18.1
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.
- package/CHANGELOG.md +135 -0
- package/codemod/dist/wrapper.js +389 -206
- package/lib/components/Accordion/Accordion.screenshots.tsx +1 -8
- package/lib/components/Accordion/Accordion.tsx +2 -1
- package/lib/components/Accordion/AccordionItem.css.ts +1 -25
- package/lib/components/Accordion/AccordionItem.tsx +8 -20
- package/lib/components/Actions/Actions.screenshots.tsx +1 -2
- package/lib/components/Alert/Alert.tsx +2 -1
- package/lib/components/Badge/Badge.tsx +2 -1
- package/lib/components/Box/Box.docs.tsx +38 -0
- package/lib/components/Box/Box.tsx +23 -7
- package/lib/components/Box/BoxRenderer.screenshots.tsx +1 -1
- package/lib/components/Button/Button.screenshots.tsx +36 -3
- package/lib/components/Button/Button.tsx +19 -16
- package/lib/components/ButtonIcon/ButtonIcon.tsx +5 -2
- package/lib/components/ButtonLink/ButtonLink.screenshots.tsx +42 -2
- package/lib/components/ButtonLink/ButtonLink.tsx +2 -1
- package/lib/components/Card/Card.docs.tsx +1 -1
- package/lib/components/Card/Card.tsx +1 -1
- package/lib/components/Column/Column.tsx +7 -2
- package/lib/components/Columns/Columns.tsx +2 -1
- package/lib/components/ContentBlock/ContentBlock.tsx +2 -1
- package/lib/components/Disclosure/Disclosure.screenshots.tsx +1 -1
- package/lib/components/Disclosure/Disclosure.tsx +1 -1
- package/lib/components/FieldMessage/FieldMessage.tsx +11 -13
- package/lib/components/Heading/Heading.docs.tsx +25 -1
- package/lib/components/Heading/Heading.gallery.tsx +22 -1
- package/lib/components/Heading/Heading.screenshots.tsx +75 -1
- package/lib/components/Hidden/Hidden.screenshots.tsx +1 -2
- package/lib/components/Hidden/Hidden.tsx +2 -1
- package/lib/components/HiddenVisually/HiddenVisually.screenshots.tsx +1 -2
- package/lib/components/HiddenVisually/HiddenVisually.tsx +7 -2
- package/lib/components/Inline/Inline.tsx +2 -1
- package/lib/components/List/List.screenshots.tsx +2 -2
- package/lib/components/Loader/Loader.tsx +2 -1
- package/lib/components/MenuItem/MenuItem.screenshots.tsx +9 -2
- package/lib/components/MenuItem/useMenuItem.tsx +2 -1
- package/lib/components/MenuItemCheckbox/MenuItemCheckbox.tsx +4 -6
- package/lib/components/MenuRenderer/MenuRenderer.screenshots.tsx +2 -1
- package/lib/components/MenuRenderer/MenuRenderer.tsx +2 -1
- package/lib/components/Notice/Notice.tsx +18 -15
- package/lib/components/Pagination/Pagination.tsx +8 -5
- package/lib/components/RadioGroup/RadioGroup.screenshots.tsx +1 -1
- package/lib/components/Secondary/Secondary.tsx +7 -2
- package/lib/components/Stack/Stack.tsx +2 -1
- package/lib/components/Stepper/Stepper.tsx +3 -3
- package/lib/components/Strong/Strong.tsx +2 -2
- package/lib/components/Tabs/Tab.tsx +13 -23
- package/lib/components/Tabs/TabPanel.tsx +7 -2
- package/lib/components/Tabs/Tabs.css.ts +0 -24
- package/lib/components/Tabs/Tabs.screenshots.tsx +1 -1
- package/lib/components/Tabs/Tabs.tsx +2 -1
- package/lib/components/Tag/Tag.tsx +6 -13
- package/lib/components/Text/Text.docs.tsx +30 -1
- package/lib/components/Text/Text.gallery.tsx +21 -1
- package/lib/components/Text/Text.screenshots.tsx +75 -5
- package/lib/components/TextDropdown/TextDropdown.screenshots.tsx +1 -1
- package/lib/components/TextDropdown/TextDropdown.tsx +2 -1
- package/lib/components/TextLink/TextLink.tsx +3 -3
- package/lib/components/TextLinkButton/TextLinkButton.screenshots.tsx +1 -1
- package/lib/components/TextLinkButton/TextLinkButton.tsx +2 -1
- package/lib/components/Tiles/Tiles.tsx +2 -1
- package/lib/components/Toggle/Toggle.tsx +11 -2
- package/lib/components/TooltipRenderer/TooltipRenderer.screenshots.tsx +2 -2
- package/lib/components/icons/IconAdd/IconAdd.docs.tsx +2 -0
- package/lib/components/icons/IconArrow/IconArrow.docs.tsx +2 -0
- package/lib/components/icons/IconBookmark/IconBookmark.docs.tsx +2 -0
- package/lib/components/icons/IconCaution/IconCaution.docs.tsx +2 -0
- package/lib/components/icons/IconChevron/IconChevron.docs.tsx +2 -0
- package/lib/components/icons/IconClear/IconClear.docs.tsx +2 -0
- package/lib/components/icons/IconCompany/IconCompany.docs.tsx +2 -0
- package/lib/components/icons/IconCompose/IconCompose.docs.tsx +2 -0
- package/lib/components/icons/IconCopy/IconCopy.docs.tsx +2 -0
- package/lib/components/icons/IconCreditCard/IconCreditCard.docs.tsx +2 -0
- package/lib/components/icons/IconCritical/IconCritical.docs.tsx +2 -0
- package/lib/components/icons/IconDate/IconDate.docs.tsx +2 -0
- package/lib/components/icons/IconDelete/IconDelete.docs.tsx +2 -0
- package/lib/components/icons/IconDesktop/IconDesktop.docs.tsx +2 -0
- package/lib/components/icons/IconDocument/IconDocument.docs.tsx +2 -0
- package/lib/components/icons/IconDocumentBroken/IconDocumentBroken.docs.tsx +2 -0
- package/lib/components/icons/IconDownload/IconDownload.docs.tsx +2 -0
- package/lib/components/icons/IconEdit/IconEdit.docs.tsx +2 -0
- package/lib/components/icons/IconEducation/IconEducation.docs.tsx +2 -0
- package/lib/components/icons/IconFilter/IconFilter.docs.tsx +2 -0
- package/lib/components/icons/IconFlag/IconFlag.docs.tsx +2 -0
- package/lib/components/icons/IconGrid/IconGrid.docs.tsx +2 -0
- package/lib/components/icons/IconHeart/IconHeart.docs.tsx +2 -0
- package/lib/components/icons/IconHelp/IconHelp.docs.tsx +2 -0
- package/lib/components/icons/IconHistory/IconHistory.docs.tsx +2 -0
- package/lib/components/icons/IconHome/IconHome.docs.tsx +2 -0
- package/lib/components/icons/IconImage/IconImage.docs.tsx +2 -0
- package/lib/components/icons/IconInfo/IconInfo.docs.tsx +2 -0
- package/lib/components/icons/IconInvoice/IconInvoice.docs.tsx +2 -0
- package/lib/components/icons/IconLanguage/IconLanguage.docs.tsx +2 -0
- package/lib/components/icons/IconLink/IconLink.docs.tsx +2 -0
- package/lib/components/icons/IconLinkBroken/IconLinkBroken.docs.tsx +2 -0
- package/lib/components/icons/IconList/IconList.docs.tsx +2 -0
- package/lib/components/icons/IconLocation/IconLocation.docs.tsx +2 -0
- package/lib/components/icons/IconMail/IconMail.docs.tsx +2 -0
- package/lib/components/icons/IconMinus/IconMinus.docs.tsx +2 -0
- package/lib/components/icons/IconMobile/IconMobile.docs.tsx +2 -0
- package/lib/components/icons/IconMoney/IconMoney.docs.tsx +2 -0
- package/lib/components/icons/IconNewWindow/IconNewWindow.docs.tsx +2 -0
- package/lib/components/icons/IconNote/IconNote.docs.tsx +2 -0
- package/lib/components/icons/IconNotification/IconNotification.docs.tsx +2 -0
- package/lib/components/icons/IconOverflow/IconOverflow.docs.tsx +2 -0
- package/lib/components/icons/IconPeople/IconPeople.docs.tsx +2 -0
- package/lib/components/icons/IconPersonAdd/IconPersonAdd.docs.tsx +2 -0
- package/lib/components/icons/IconPersonVerified/IconPersonVerified.docs.tsx +2 -0
- package/lib/components/icons/IconPhone/IconPhone.docs.tsx +2 -0
- package/lib/components/icons/IconPlatformAndroid/IconPlatformAndroid.docs.tsx +2 -0
- package/lib/components/icons/IconPlatformApple/IconPlatformApple.docs.tsx +2 -0
- package/lib/components/icons/IconPositive/IconPositive.docs.tsx +2 -0
- package/lib/components/icons/IconPrint/IconPrint.docs.tsx +2 -0
- package/lib/components/icons/IconProfile/IconProfile.docs.tsx +2 -0
- package/lib/components/icons/IconPromote/IconPromote.docs.tsx +2 -0
- package/lib/components/icons/IconRecommended/IconRecommended.docs.tsx +2 -0
- package/lib/components/icons/IconRefresh/IconRefresh.docs.tsx +2 -0
- package/lib/components/icons/IconResume/IconResume.docs.tsx +2 -0
- package/lib/components/icons/IconSearch/IconSearch.docs.tsx +2 -0
- package/lib/components/icons/IconSecurity/IconSecurity.docs.tsx +2 -0
- package/lib/components/icons/IconSend/IconSend.docs.tsx +2 -0
- package/lib/components/icons/IconSent/IconSent.docs.tsx +2 -0
- package/lib/components/icons/IconSettings/IconSettings.docs.tsx +2 -0
- package/lib/components/icons/IconShare/IconShare.docs.tsx +2 -0
- package/lib/components/icons/IconSocialFacebook/IconSocialFacebook.docs.tsx +2 -0
- package/lib/components/icons/IconSocialGitHub/IconSocialGitHub.docs.tsx +2 -0
- package/lib/components/icons/IconSocialInstagram/IconSocialInstagram.docs.tsx +2 -0
- package/lib/components/icons/IconSocialLinkedIn/IconSocialLinkedIn.docs.tsx +2 -0
- package/lib/components/icons/IconSocialMedium/IconSocialMedium.docs.tsx +2 -0
- package/lib/components/icons/IconSocialTwitter/IconSocialTwitter.docs.tsx +2 -0
- package/lib/components/icons/IconSocialYouTube/IconSocialYouTube.docs.tsx +2 -0
- package/lib/components/icons/IconStar/IconStar.docs.tsx +2 -0
- package/lib/components/icons/IconStatistics/IconStatistics.docs.tsx +2 -0
- package/lib/components/icons/IconSubCategory/IconSubCategory.docs.tsx +2 -0
- package/lib/components/icons/IconTag/IconTag.docs.tsx +2 -0
- package/lib/components/icons/IconThumb/IconThumb.docs.tsx +2 -0
- package/lib/components/icons/IconTick/IconTick.docs.tsx +2 -0
- package/lib/components/icons/IconTime/IconTime.docs.tsx +2 -0
- package/lib/components/icons/IconTip/IconTip.docs.tsx +2 -0
- package/lib/components/icons/IconUpload/IconUpload.docs.tsx +2 -0
- package/lib/components/icons/IconVideo/IconVideo.docs.tsx +2 -0
- package/lib/components/icons/IconVisibility/IconVisibility.docs.tsx +2 -0
- package/lib/components/icons/IconWorkExperience/IconWorkExperience.docs.tsx +2 -0
- package/lib/components/icons/IconZoomIn/IconZoomIn.docs.tsx +2 -0
- package/lib/components/icons/IconZoomOut/IconZoomOut.docs.tsx +2 -0
- package/lib/components/icons/iconDocumentation.tsx +16 -0
- package/lib/components/private/Field/Field.tsx +1 -1
- package/lib/components/private/FieldGroup/FieldGroup.tsx +1 -1
- package/lib/components/private/InlineField/InlineField.tsx +2 -0
- package/lib/components/private/InlineField/StyledInput.tsx +2 -1
- package/lib/components/private/Modal/Modal.tsx +2 -2
- package/lib/components/private/Modal/ModalContent.tsx +2 -1
- package/lib/components/private/Typography/Typography.tsx +45 -13
- package/lib/components/private/buildDataAttributes.ts +63 -1
- package/lib/components/useToast/Toast.tsx +4 -0
- package/lib/components/useToast/ToastTypes.ts +3 -0
- package/lib/components/useToast/useToast.screenshots.tsx +1 -1
- package/lib/hooks/useIcon/icon.css.ts +13 -2
- package/lib/hooks/useIcon/index.ts +15 -8
- package/package.json +5 -5
- package/lib/components/MenuItemCheckbox/MenuItemCheckbox.css.ts +0 -26
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,140 @@
|
|
|
1
1
|
# braid-design-system
|
|
2
2
|
|
|
3
|
+
## 31.18.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- **Button, ButtonLink:** Improve alignment of transparent buttons with icons against Text with icons ([#1170](https://github.com/seek-oss/braid-design-system/pull/1170))
|
|
8
|
+
|
|
9
|
+
To improve optical balance of a `Button` with an `icon`, the icon container is bled to the left to balance against the larger horizontal inset of a `standard` button.
|
|
10
|
+
This alignment correction is now only applied on `standard` sized buttons that are not using the `transparent` variant.
|
|
11
|
+
|
|
12
|
+
Isolating this alignment correction enables transparent buttons to better align with other components with `icon` slots, for example:
|
|
13
|
+
|
|
14
|
+
```jsx
|
|
15
|
+
<Stack space="small">
|
|
16
|
+
<Text icon={<IconSend />}>Text</Text>
|
|
17
|
+
<Button icon={<IconSend />} variant="transparent" bleed>
|
|
18
|
+
Button
|
|
19
|
+
</Button>
|
|
20
|
+
</Stack>
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Icons and text will now be perfectly aligned between Button components and others icon slots with the same text size.
|
|
24
|
+
|
|
25
|
+
## 31.18.0
|
|
26
|
+
|
|
27
|
+
### Minor Changes
|
|
28
|
+
|
|
29
|
+
- **Box:** Support custom `data` prop format for attributes ([#1168](https://github.com/seek-oss/braid-design-system/pull/1168))
|
|
30
|
+
|
|
31
|
+
While `Box` already supports the native HTML syntax for data attributes, e.g. `data-testid="123"`, it now supports the **data** prop too. This allows data attributes to be provided consistently to all components.
|
|
32
|
+
|
|
33
|
+
**EXAMPLE USAGE:**
|
|
34
|
+
|
|
35
|
+
```diff
|
|
36
|
+
<Box
|
|
37
|
+
+ data={{ testId: 'myComponent' }}
|
|
38
|
+
/>
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
The above example results in the following HTML attribute being set on the element:
|
|
42
|
+
`data-testId="myComponent"`.
|
|
43
|
+
|
|
44
|
+
- **Text, Heading:** Add icon slots ([#1160](https://github.com/seek-oss/braid-design-system/pull/1160))
|
|
45
|
+
|
|
46
|
+
Provides a designed slot for adding an icon to `Text` and `Heading` components
|
|
47
|
+
|
|
48
|
+
**EXAMPLE USAGE:**
|
|
49
|
+
|
|
50
|
+
```jsx
|
|
51
|
+
<Text icon={<IconPromote />}>{...}</Text>
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
or with a `Heading`:
|
|
55
|
+
|
|
56
|
+
```jsx
|
|
57
|
+
<Heading level="3" icon={<IconPromote />}>{...}</Heading>
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
- **useToast:** Add `data` attribute support ([#1168](https://github.com/seek-oss/braid-design-system/pull/1168))
|
|
61
|
+
|
|
62
|
+
Support applying custom data attributes to Toast elements.
|
|
63
|
+
|
|
64
|
+
**EXAMPLE USAGE:**
|
|
65
|
+
|
|
66
|
+
```diff
|
|
67
|
+
export const Component = () => {
|
|
68
|
+
const showToast = useToast();
|
|
69
|
+
|
|
70
|
+
return (
|
|
71
|
+
<Button onClick={() =>
|
|
72
|
+
showToast({
|
|
73
|
+
+ data: { testId: 'myToastMessage' },
|
|
74
|
+
...
|
|
75
|
+
})
|
|
76
|
+
}>
|
|
77
|
+
Show
|
|
78
|
+
</Button>
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
The above example results in the following HTML attribute being set on the toast element:
|
|
84
|
+
`data-testId="myToastMessage"`.
|
|
85
|
+
|
|
86
|
+
### Patch Changes
|
|
87
|
+
|
|
88
|
+
- Provide dev time validation/warnings when the native data attribute format is provided to components that do not support it. ([#1168](https://github.com/seek-oss/braid-design-system/pull/1168))
|
|
89
|
+
This is required as TypeScript does not validate kebab cased properties, and Braid components do not spread abritrary props.
|
|
90
|
+
|
|
91
|
+
This validation will prevent silent failures where attributes are seemingly provided, but not applied.
|
|
92
|
+
|
|
93
|
+
For example:
|
|
94
|
+
|
|
95
|
+
```jsx
|
|
96
|
+
<Card data-testid={123} />
|
|
97
|
+
// => Would not be applied and TypeScript would not error.
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
However, now the following console warning will guide users to use the `data` prop:
|
|
101
|
+
|
|
102
|
+
```diff
|
|
103
|
+
Braid components do not support the native data attribute format. Use the “data” prop instead.
|
|
104
|
+
<Component
|
|
105
|
+
- data-testid={123}
|
|
106
|
+
+ data={{
|
|
107
|
+
+ testid: 123,
|
|
108
|
+
+ }}
|
|
109
|
+
/>
|
|
110
|
+
For more details, see the “Data Attributes” documentation:
|
|
111
|
+
https://seek-oss.github.io/braid-design-system/components/Box#data-attributes
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
- **Pagination:** Increase chevron spacing on prev/next links ([#1160](https://github.com/seek-oss/braid-design-system/pull/1160))
|
|
115
|
+
|
|
116
|
+
Increases the space between the "Previous" and "Next" text and their chevron icons to balance with the larger icon size.
|
|
117
|
+
|
|
118
|
+
- **MenuItemCheckbox:** Align with increased icon size ([#1160](https://github.com/seek-oss/braid-design-system/pull/1160))
|
|
119
|
+
|
|
120
|
+
Ensure menu item text has uniform spacing to the checkbox of `MenuItemCheckbox` and the `icon` slot of `MenuItem`.
|
|
121
|
+
|
|
122
|
+
- **Text, Heading:** Increase icon size inside typographic elements ([#1160](https://github.com/seek-oss/braid-design-system/pull/1160))
|
|
123
|
+
|
|
124
|
+
The size of icons has been increased by 20% when used inside of `Text` and `Heading` components. There is no layout impact expected for consumers, with only the visual ratio of icon to text size changing.
|
|
125
|
+
|
|
126
|
+
This applies to icons using the new `icon` slots, as well as inline icons within the text content.
|
|
127
|
+
|
|
128
|
+
> Icons used outside of typographic elements are not affected by this change.
|
|
129
|
+
|
|
130
|
+
- **ButtonIcon:** Increase standard icon size ([#1160](https://github.com/seek-oss/braid-design-system/pull/1160))
|
|
131
|
+
|
|
132
|
+
Adopt the increased standard icon size.
|
|
133
|
+
|
|
134
|
+
> Note this does not affect overall dimensions of `ButtonIcon`, or the layout of surrounding components.
|
|
135
|
+
|
|
136
|
+
- Removes custom icon sizing and layout in favour of new typography icon sizes and layout. ([#1162](https://github.com/seek-oss/braid-design-system/pull/1162))
|
|
137
|
+
|
|
3
138
|
## 31.17.2
|
|
4
139
|
|
|
5
140
|
### Patch Changes
|