braid-design-system 31.8.0 → 31.11.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.
- package/CHANGELOG.md +149 -0
- package/README.md +2 -1
- package/codemod/dist/wrapper.js +41648 -41529
- package/lib/components/Accordion/Accordion.docs.tsx +64 -16
- package/lib/components/Accordion/Accordion.gallery.tsx +18 -0
- package/lib/components/Accordion/Accordion.screenshots.tsx +111 -1
- package/lib/components/Accordion/AccordionItem.css.ts +25 -1
- package/lib/components/Accordion/AccordionItem.playroom.tsx +2 -0
- package/lib/components/Accordion/AccordionItem.tsx +28 -9
- package/lib/components/Actions/Actions.docs.tsx +14 -73
- package/lib/components/Actions/Actions.gallery.tsx +2 -2
- package/lib/components/Actions/Actions.snippets.tsx +2 -2
- package/lib/components/Autosuggest/Autosuggest.tsx +14 -3
- package/lib/components/Badge/Badge.tsx +3 -2
- package/lib/components/Bleed/Bleed.playroom.tsx +13 -0
- package/lib/components/Bleed/Bleed.screenshots.tsx +13 -0
- package/lib/components/Bleed/Bleed.tsx +13 -1
- package/lib/components/BraidTestProvider/BraidTestProvider.docs.tsx +1 -1
- package/lib/components/Button/Button.css.ts +1 -1
- package/lib/components/Button/Button.docs.tsx +117 -62
- package/lib/components/Button/Button.gallery.tsx +4 -6
- package/lib/components/Button/Button.screenshots.tsx +54 -5
- package/lib/components/Button/Button.tsx +171 -84
- package/lib/components/{iconButtons/IconButton.css.ts → ButtonIcon/ButtonIcon.css.ts} +0 -0
- package/lib/components/ButtonIcon/ButtonIcon.docs.tsx +266 -0
- package/lib/components/ButtonIcon/ButtonIcon.gallery.tsx +144 -0
- package/lib/components/ButtonIcon/ButtonIcon.playroom.tsx +25 -0
- package/lib/components/ButtonIcon/ButtonIcon.screenshots.tsx +205 -0
- package/lib/components/ButtonIcon/ButtonIcon.snippets.tsx +57 -0
- package/lib/components/ButtonIcon/ButtonIcon.tsx +175 -0
- package/lib/components/ButtonLink/ButtonLink.docs.tsx +4 -0
- package/lib/components/ButtonLink/ButtonLink.screenshots.tsx +51 -1
- package/lib/components/ButtonLink/ButtonLink.tsx +57 -16
- package/lib/components/Divider/Divider.tsx +2 -1
- package/lib/components/MenuRenderer/MenuRenderer.tsx +10 -9
- package/lib/components/MenuRenderer/testHelper.tsx +51 -6
- package/lib/components/OverflowMenu/OverflowMenu.css.ts +1 -16
- package/lib/components/OverflowMenu/OverflowMenu.docs.tsx +2 -2
- package/lib/components/OverflowMenu/OverflowMenu.playroom.tsx +11 -0
- package/lib/components/OverflowMenu/OverflowMenu.tsx +15 -4
- package/lib/components/PasswordField/PasswordField.tsx +7 -8
- package/lib/components/Tabs/Tab.tsx +36 -4
- package/lib/components/Tabs/Tabs.css.ts +24 -0
- package/lib/components/Tabs/Tabs.docs.tsx +45 -0
- package/lib/components/Tabs/Tabs.gallery.tsx +63 -12
- package/lib/components/Tabs/Tabs.playroom.tsx +9 -0
- package/lib/components/Tabs/Tabs.screenshots.tsx +40 -1
- package/lib/components/Tabs/Tabs.tsx +2 -2
- package/lib/components/Tag/Tag.css.ts +5 -0
- package/lib/components/Tag/Tag.docs.tsx +25 -1
- package/lib/components/Tag/Tag.gallery.tsx +6 -1
- package/lib/components/Tag/Tag.playroom.tsx +14 -0
- package/lib/components/Tag/Tag.screenshots.tsx +13 -1
- package/lib/components/Tag/Tag.tsx +42 -10
- package/lib/components/TextField/TextField.tsx +3 -0
- package/lib/components/TooltipRenderer/TooltipRenderer.tsx +1 -0
- package/lib/components/index.ts +1 -0
- package/lib/components/private/Field/ClearField.tsx +7 -3
- package/lib/components/private/FieldButtonIcon/FieldButtonIcon.tsx +44 -0
- package/lib/components/private/Modal/Modal.css.ts +3 -81
- package/lib/components/private/Modal/ModalContent.tsx +26 -56
- package/lib/components/useToast/Toast.tsx +10 -3
- package/lib/components/useToast/useToast.docs.tsx +2 -1
- package/lib/components/useToast/useToast.gallery.tsx +2 -1
- package/lib/playroom/components.ts +5 -1
- package/logo-inverted.png +0 -0
- package/package.json +3 -3
- package/sku.routes.js +2 -1
- package/tsconfig.json +1 -1
- package/lib/components/iconButtons/ClearButton/ClearButton.tsx +0 -54
- package/lib/components/iconButtons/IconButton.tsx +0 -121
- package/lib/components/iconButtons/OverflowButton/OverflowButton.tsx +0 -51
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,154 @@
|
|
|
1
1
|
# braid-design-system
|
|
2
2
|
|
|
3
|
+
## 31.11.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- **Button, ButtonLink:** Improve Button `bleed` ([#1103](https://github.com/seek-oss/braid-design-system/pull/1103))
|
|
8
|
+
|
|
9
|
+
Previously the `bleedY` prop allowed the background of `Button` to bleed vertically into the surrounding layout. This worked well for all variants except `transparent`, which needed to bleed horizontally as well.
|
|
10
|
+
|
|
11
|
+
To support this we have introduced the `bleed` prop which will apply the bleed based on the `variant`. We have also deprecated `bleedY` which will be removed in a future release.
|
|
12
|
+
|
|
13
|
+
**EXAMPLE USAGE:**
|
|
14
|
+
|
|
15
|
+
```diff
|
|
16
|
+
<Button
|
|
17
|
+
- bleedY
|
|
18
|
+
+ bleed
|
|
19
|
+
{...}
|
|
20
|
+
>
|
|
21
|
+
Button
|
|
22
|
+
</Button>
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
**MIGRATION GUIDE**
|
|
26
|
+
|
|
27
|
+
Migration from `bleedY` to `bleed` can be automated by running the Braid upgrade command, passing the `v31.11` version. You must provide a glob to target your project’s source files. For example:
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
yarn braid-upgrade v31.11 "**/*.{ts,tsx}"
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
It is recommended to visually review the any `Button` usage with the `transparent` variant, to ensure the layout is as expected.
|
|
34
|
+
|
|
35
|
+
## 31.10.0
|
|
36
|
+
|
|
37
|
+
### Minor Changes
|
|
38
|
+
|
|
39
|
+
- **Bleed:** Support using span elements via component prop ([#1094](https://github.com/seek-oss/braid-design-system/pull/1094))
|
|
40
|
+
|
|
41
|
+
Setting the `component` prop to `span` will now ensure all elements controlled by `Bleed` are `span`s. This is useful when using layout components inside dom elements that should not contain `div`s from a HTML validation perspective.
|
|
42
|
+
|
|
43
|
+
**EXAMPLE USAGE:**
|
|
44
|
+
|
|
45
|
+
```jsx
|
|
46
|
+
<Bleed space="medium" component="span">
|
|
47
|
+
...
|
|
48
|
+
</Bleed>
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Patch Changes
|
|
52
|
+
|
|
53
|
+
- **Dialog, Drawer:** Prevent sticky close button container from blocking content ([#1097](https://github.com/seek-oss/braid-design-system/pull/1097))
|
|
54
|
+
|
|
55
|
+
Fix regression introduced when migrating the close action to use `ButtonIcon`. The close action container was blocking the content of the `Dialog`/`Drawer`, and when scrolling could prevent a user from interacting with the content as it went behind the container.
|
|
56
|
+
|
|
57
|
+
Additionally, re-introduced the surface coloured background behind the button to prevent the button from visually colliding with content when scrolling.
|
|
58
|
+
|
|
59
|
+
## 31.9.0
|
|
60
|
+
|
|
61
|
+
### Minor Changes
|
|
62
|
+
|
|
63
|
+
- **Tab:** Add icon support ([#1089](https://github.com/seek-oss/braid-design-system/pull/1089))
|
|
64
|
+
|
|
65
|
+
Provides a designed slot for adding an icon to a `Tab`
|
|
66
|
+
|
|
67
|
+
**EXAMPLE USAGE:**
|
|
68
|
+
|
|
69
|
+
```jsx
|
|
70
|
+
<Tab icon={<IconPromote />}>{...}</Tab>
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
- **AccordionItem:** Add icon support ([#1086](https://github.com/seek-oss/braid-design-system/pull/1086))
|
|
74
|
+
|
|
75
|
+
Provides a designed slot for adding an icon to an `AccordionItem`
|
|
76
|
+
|
|
77
|
+
**EXAMPLE USAGE:**
|
|
78
|
+
|
|
79
|
+
```jsx
|
|
80
|
+
<AccordionItem
|
|
81
|
+
icon={<IconPromote />}
|
|
82
|
+
{...}
|
|
83
|
+
/>
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
- **Tag:** Add `id` support ([#1081](https://github.com/seek-oss/braid-design-system/pull/1081))
|
|
87
|
+
|
|
88
|
+
- **Button, ButtonLink:** Add icon support ([#1090](https://github.com/seek-oss/braid-design-system/pull/1090))
|
|
89
|
+
|
|
90
|
+
Provides a designed slot for adding an icon to a `Button` or `ButtonLink`
|
|
91
|
+
|
|
92
|
+
**EXAMPLE USAGE:**
|
|
93
|
+
|
|
94
|
+
```jsx
|
|
95
|
+
<Button icon={<IconSend />}>{...}</Button>
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
- **Tag:** Add icon support ([#1087](https://github.com/seek-oss/braid-design-system/pull/1087))
|
|
99
|
+
|
|
100
|
+
Provides a designed slot for adding an icon to a `Tag`
|
|
101
|
+
|
|
102
|
+
**EXAMPLE USAGE:**
|
|
103
|
+
|
|
104
|
+
```jsx
|
|
105
|
+
<Tag
|
|
106
|
+
icon={<IconPromote />}
|
|
107
|
+
{...}
|
|
108
|
+
/>
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
- **OverflowMenu:** Add `id` support ([#1081](https://github.com/seek-oss/braid-design-system/pull/1081))
|
|
112
|
+
|
|
113
|
+
- **ButtonIcon:** Add component ([#1084](https://github.com/seek-oss/braid-design-system/pull/1084))
|
|
114
|
+
|
|
115
|
+
See [documentation](https://seek-oss.github.io/braid-design-system/components/ButtonIcon) for full feature set.
|
|
116
|
+
|
|
117
|
+
**EXAMPLE USAGE:**
|
|
118
|
+
|
|
119
|
+
```jsx
|
|
120
|
+
<ButtonIcon
|
|
121
|
+
icon={<IconShare/>}
|
|
122
|
+
label="Share"
|
|
123
|
+
id="share"
|
|
124
|
+
onClick={...}
|
|
125
|
+
/>
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
### Patch Changes
|
|
129
|
+
|
|
130
|
+
- **Divider:** Use span element ([#1089](https://github.com/seek-oss/braid-design-system/pull/1089))
|
|
131
|
+
|
|
132
|
+
As the `Divider` component is not used as a container element, we now use a `span`. This allows it to be used inside `button` elements, such as a `Tab`, without producing invalid html.
|
|
133
|
+
|
|
134
|
+
- **Badge:** Use span element ([#1086](https://github.com/seek-oss/braid-design-system/pull/1086))
|
|
135
|
+
|
|
136
|
+
As the `Badge` component is not used as a container element, we now use a `span`. This allows it to be used inside `button` elements, such as an `AccordionItem`, without producing invalid html.
|
|
137
|
+
|
|
138
|
+
- **TooltipRenderer:** Ignore pointer events on tip container ([#1082](https://github.com/seek-oss/braid-design-system/pull/1082))
|
|
139
|
+
|
|
140
|
+
Fix for the container of the tooltip interferring with pointer events of the tooltip trigger itself.
|
|
141
|
+
|
|
142
|
+
- **MenuRenderer, OverflowMenu:** Guard against open/close handlers firing incorrectly ([#1088](https://github.com/seek-oss/braid-design-system/pull/1088))
|
|
143
|
+
|
|
144
|
+
Add guard to ensure open and close handlers are not re-fired when handler instances are updated.
|
|
145
|
+
|
|
146
|
+
- **Autosuggest, PasswordField, TextField, useToast:** Add `id` to internal close/clear buttons ([#1081](https://github.com/seek-oss/braid-design-system/pull/1081))
|
|
147
|
+
|
|
148
|
+
- **Autosuggest, Dialog, Drawer, OverflowMenu, Tag, TextField, useToast:** Migrate to use ButtonIcon ([#1084](https://github.com/seek-oss/braid-design-system/pull/1084))
|
|
149
|
+
|
|
150
|
+
Adopt new `ButtonIcon` for clear/close actions in favour of custom internal buttons.
|
|
151
|
+
|
|
3
152
|
## 31.8.0
|
|
4
153
|
|
|
5
154
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<div align="center" >
|
|
2
|
-
<img src="logo.png" alt="BRAID" title="BRAID" width="186px" />
|
|
2
|
+
<img src="logo.png#gh-light-mode-only" alt="BRAID" title="BRAID" width="186px" />
|
|
3
|
+
<img src="logo-inverted.png#gh-dark-mode-only" alt="BRAID" title="BRAID" width="186px" />
|
|
3
4
|
<br/>
|
|
4
5
|
<br/>
|
|
5
6
|
Themeable design system for the SEEK Group.
|