braid-design-system 33.10.0 → 33.10.2
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 +26 -41
- package/README.md +1 -1
- package/dist/index.d.mts +18 -14
- package/dist/index.d.ts +18 -14
- package/dist/lib/components/Badge/Badge.cjs +2 -2
- package/dist/lib/components/Badge/Badge.mjs +2 -2
- package/dist/lib/components/BraidTestProvider/BraidTestProvider.cjs +13 -10
- package/dist/lib/components/BraidTestProvider/BraidTestProvider.mjs +13 -10
- package/dist/lib/components/Button/Button.css.cjs +3 -1
- package/dist/lib/components/Button/Button.css.mjs +3 -1
- package/dist/lib/components/ButtonIcon/ButtonIcon.cjs +0 -1
- package/dist/lib/components/ButtonIcon/ButtonIcon.mjs +0 -1
- package/dist/lib/components/ButtonLink/ButtonLink.cjs +1 -0
- package/dist/lib/components/ButtonLink/ButtonLink.mjs +1 -0
- package/dist/lib/components/Pagination/Pagination.cjs +6 -4
- package/dist/lib/components/Pagination/Pagination.css.cjs +12 -0
- package/dist/lib/components/Pagination/Pagination.css.mjs +12 -0
- package/dist/lib/components/Pagination/Pagination.mjs +4 -2
- package/dist/lib/components/Table/Table.css.cjs +9 -4
- package/dist/lib/components/Table/Table.css.mjs +10 -5
- package/dist/lib/components/Table/TableCell.cjs +1 -1
- package/dist/lib/components/Table/TableCell.mjs +2 -2
- package/dist/lib/components/TextLinkButton/TextLinkButton.cjs +1 -0
- package/dist/lib/components/TextLinkButton/TextLinkButton.mjs +1 -0
- package/dist/lib/components/Textarea/Textarea.cjs +1 -0
- package/dist/lib/components/Textarea/Textarea.mjs +1 -0
- package/dist/lib/components/private/Modal/ModalContent.cjs +9 -8
- package/dist/lib/components/private/Modal/ModalContent.mjs +9 -8
- package/dist/lib/components/useToast/ToastContext.cjs +1 -4
- package/dist/lib/components/useToast/ToastContext.mjs +1 -4
- package/dist/lib/components/useToast/useTimeout.cjs +1 -1
- package/dist/lib/components/useToast/useTimeout.mjs +1 -1
- package/dist/lib/utils/flattenChildren.cjs +2 -2
- package/dist/lib/utils/flattenChildren.mjs +1 -1
- package/dist/lib/utils/isFragment.cjs +13 -0
- package/dist/lib/utils/isFragment.mjs +14 -0
- package/package.json +17 -20
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# braid-design-system
|
|
2
2
|
|
|
3
|
+
## 33.10.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Expand the peer dependency range to support React 19. ([#1822](https://github.com/seek-oss/braid-design-system/pull/1822))
|
|
8
|
+
|
|
9
|
+
## 33.10.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- **useToast:** Clean up internal refactor ([#1837](https://github.com/seek-oss/braid-design-system/pull/1837))
|
|
14
|
+
|
|
15
|
+
- **Dialog, Drawer:** Refactor layout, ensure content area is the full height ([#1834](https://github.com/seek-oss/braid-design-system/pull/1834))
|
|
16
|
+
|
|
17
|
+
This change allows you to spread content to the bottom of a `Drawer`, for example with a `vertical` direction `Spread`.
|
|
18
|
+
|
|
19
|
+
- Ensure focus rings are consistent across components ([#1828](https://github.com/seek-oss/braid-design-system/pull/1828))
|
|
20
|
+
|
|
21
|
+
Aligns a few edge cases where focus rings were not consistent due to elements or aria roles not captured by the reset.
|
|
22
|
+
|
|
23
|
+
- **BraidTestProvider:** Align mock with real IntersectionObserver API ([#1837](https://github.com/seek-oss/braid-design-system/pull/1837))
|
|
24
|
+
|
|
25
|
+
- **Table:** Ensure `alignY` prop is applied consistently across browsers ([#1832](https://github.com/seek-oss/braid-design-system/pull/1832))
|
|
26
|
+
|
|
27
|
+
Fixes an issue where setting the `alignY` prop to `top` would not apply the `vertical-align` CSS property — instead falling through to our CSS reset which sets `vertical-align: baseline` (rendering inconsistently across browsers).
|
|
28
|
+
|
|
3
29
|
## 33.10.0
|
|
4
30
|
|
|
5
31
|
### Minor Changes
|
|
@@ -21,7 +47,6 @@
|
|
|
21
47
|
**MIGRATION GUIDE:**
|
|
22
48
|
|
|
23
49
|
For styling the focus ring via `Box`:
|
|
24
|
-
|
|
25
50
|
1. Remove usage of `outline="none"` and `boxShadow="outlineFocus"`
|
|
26
51
|
2. Refer to [`focus outlines`] for guidance on leveraging Braid's focus outline styles.
|
|
27
52
|
|
|
@@ -1024,7 +1049,6 @@ See full changelog below 👇
|
|
|
1024
1049
|
- Standardise `disabled` & `critical` state across form fields ([#1564](https://github.com/seek-oss/braid-design-system/pull/1564))
|
|
1025
1050
|
|
|
1026
1051
|
Improves the consistency of form fields when combining both `disabled` and `critical` tone, which includes:
|
|
1027
|
-
|
|
1028
1052
|
- Hiding `critical` borders
|
|
1029
1053
|
- Hiding `message` and not reserving space for it unless explicitly providing the `reserveMessageSpace` prop.
|
|
1030
1054
|
|
|
@@ -1656,7 +1680,6 @@ See full changelog below 👇
|
|
|
1656
1680
|
Our different approach to using colour has seen links dialled back to compete less with other messaging and CTAs.
|
|
1657
1681
|
|
|
1658
1682
|
This affects the following usages across the system:
|
|
1659
|
-
|
|
1660
1683
|
- `vars.foregroundColor.link`
|
|
1661
1684
|
- `Text` (using `tone="link"`)
|
|
1662
1685
|
- `TextLink` and (`TextLinkButton`)
|
|
@@ -2468,7 +2491,6 @@ For more detail on the specific changes in this release, please read on.
|
|
|
2468
2491
|
- **Tab, Tabs:** Updated visual design ([#1180](https://github.com/seek-oss/braid-design-system/pull/1180))
|
|
2469
2492
|
|
|
2470
2493
|
The appearance of a `Tab` has been updated. Changes include:
|
|
2471
|
-
|
|
2472
2494
|
- Tab button use `regular` text weight
|
|
2473
2495
|
- Hover state of inactive tab toggles `neutral` tone instead of underline
|
|
2474
2496
|
- Active tab indicator underlines content only, without the horizontal gutter and animates between tabs
|
|
@@ -3508,7 +3530,6 @@ For more detail on the specific changes in this release, please read on.
|
|
|
3508
3530
|
|
|
3509
3531
|
**New foregrounds**
|
|
3510
3532
|
The following foregrounds are now available on the `vars.foregroundColor` theme object:
|
|
3511
|
-
|
|
3512
3533
|
- `cautionLight`
|
|
3513
3534
|
- `infoLight`
|
|
3514
3535
|
- `linkLight`
|
|
@@ -3769,12 +3790,10 @@ For more detail on the specific changes in this release, please read on.
|
|
|
3769
3790
|
**TOKEN CHANGES**
|
|
3770
3791
|
|
|
3771
3792
|
**New**
|
|
3772
|
-
|
|
3773
3793
|
- **backgroundColor:** `surface`, `neutralSoft`
|
|
3774
3794
|
- **borderColor:** `neutral`, `neutralInverted`, `neutralLight`
|
|
3775
3795
|
|
|
3776
3796
|
**Removed**
|
|
3777
|
-
|
|
3778
3797
|
- **backgroundColor:** `card`, `formAccentDisabled`, `input`, `inputDisabled`, `selection`
|
|
3779
3798
|
- **borderColor:** `formHover`, `standard`, `standardInverted`
|
|
3780
3799
|
|
|
@@ -3868,7 +3887,6 @@ For more detail on the specific changes in this release, please read on.
|
|
|
3868
3887
|
|
|
3869
3888
|
**New backgrounds**
|
|
3870
3889
|
The following backgrounds are now available:
|
|
3871
|
-
|
|
3872
3890
|
- `neutralActive`
|
|
3873
3891
|
- `neutralHover`
|
|
3874
3892
|
- `neutralSoftActive`
|
|
@@ -3876,7 +3894,6 @@ For more detail on the specific changes in this release, please read on.
|
|
|
3876
3894
|
|
|
3877
3895
|
**New boxShadows**
|
|
3878
3896
|
The following box shadows are now available:
|
|
3879
|
-
|
|
3880
3897
|
- `borderBrandAccentLightLarge`
|
|
3881
3898
|
- `borderCriticalLightLarge`
|
|
3882
3899
|
- `borderFormAccentLight`
|
|
@@ -3886,7 +3903,6 @@ For more detail on the specific changes in this release, please read on.
|
|
|
3886
3903
|
|
|
3887
3904
|
**New boxShadows**
|
|
3888
3905
|
The following box shadows are now available:
|
|
3889
|
-
|
|
3890
3906
|
- `borderBrandAccentLightLarge`
|
|
3891
3907
|
- `borderCriticalLightLarge`
|
|
3892
3908
|
- `borderFormAccentLight`
|
|
@@ -3900,7 +3916,6 @@ For more detail on the specific changes in this release, please read on.
|
|
|
3900
3916
|
|
|
3901
3917
|
**New backgrounds**
|
|
3902
3918
|
The following backgrounds are now available on the `vars.backgroundColor` theme object:
|
|
3903
|
-
|
|
3904
3919
|
- `neutralActive`
|
|
3905
3920
|
- `neutralHover`
|
|
3906
3921
|
- `neutralSoftActive`
|
|
@@ -3908,7 +3923,6 @@ For more detail on the specific changes in this release, please read on.
|
|
|
3908
3923
|
|
|
3909
3924
|
**New borderColors**
|
|
3910
3925
|
The following border colors are now available on the `vars.borderColor` theme object:
|
|
3911
|
-
|
|
3912
3926
|
- `brandAccentLight`
|
|
3913
3927
|
- `criticalLight`
|
|
3914
3928
|
- `formAccentLight`
|
|
@@ -3996,7 +4010,6 @@ For more detail on the specific changes in this release, please read on.
|
|
|
3996
4010
|
- **Box:** Add new background and border colours ([#983](https://github.com/seek-oss/braid-design-system/pull/983))
|
|
3997
4011
|
|
|
3998
4012
|
New `background` values:
|
|
3999
|
-
|
|
4000
4013
|
- `brandAccentSoft`
|
|
4001
4014
|
- `brandAccentSoftActive`
|
|
4002
4015
|
- `brandAccentSoftHover`
|
|
@@ -4008,7 +4021,6 @@ For more detail on the specific changes in this release, please read on.
|
|
|
4008
4021
|
- `formAccentSoftHover`
|
|
4009
4022
|
|
|
4010
4023
|
New `boxShadow` values:
|
|
4011
|
-
|
|
4012
4024
|
- `borderCautionLight`
|
|
4013
4025
|
- `borderCriticalLight`
|
|
4014
4026
|
- `borderInfoLight`
|
|
@@ -4016,7 +4028,6 @@ For more detail on the specific changes in this release, please read on.
|
|
|
4016
4028
|
- `borderPromoteLight`
|
|
4017
4029
|
|
|
4018
4030
|
- **atoms:** Add new `boxShadow` values: ([#983](https://github.com/seek-oss/braid-design-system/pull/983))
|
|
4019
|
-
|
|
4020
4031
|
- `borderCautionLight`
|
|
4021
4032
|
- `borderCriticalLight`
|
|
4022
4033
|
- `borderInfoLight`
|
|
@@ -4026,7 +4037,6 @@ For more detail on the specific changes in this release, please read on.
|
|
|
4026
4037
|
- **vars:** Add new background and border colours ([#983](https://github.com/seek-oss/braid-design-system/pull/983))
|
|
4027
4038
|
|
|
4028
4039
|
New `backgroundColor` values:
|
|
4029
|
-
|
|
4030
4040
|
- `brandAccentSoft`
|
|
4031
4041
|
- `brandAccentSoftActive`
|
|
4032
4042
|
- `brandAccentSoftHover`
|
|
@@ -4038,7 +4048,6 @@ For more detail on the specific changes in this release, please read on.
|
|
|
4038
4048
|
- `formAccentSoftHover`
|
|
4039
4049
|
|
|
4040
4050
|
New `borderColor` values:
|
|
4041
|
-
|
|
4042
4051
|
- `cautionLight`
|
|
4043
4052
|
- `criticalLight`
|
|
4044
4053
|
- `infoLight`
|
|
@@ -4116,7 +4125,6 @@ For more detail on the specific changes in this release, please read on.
|
|
|
4116
4125
|
- Add `wide` breakpoint of 1200px ([#960](https://github.com/seek-oss/braid-design-system/pull/960))
|
|
4117
4126
|
|
|
4118
4127
|
This adds support for `wide` to the following touchpoints:
|
|
4119
|
-
|
|
4120
4128
|
- Responsive values, e.g.
|
|
4121
4129
|
```ts
|
|
4122
4130
|
{ mobile: 'small', wide: 'large' }
|
|
@@ -4255,7 +4263,6 @@ For more detail on the specific changes in this release, please read on.
|
|
|
4255
4263
|
- Updated minimum browser requirement to browsers that support CSS variables ([#947](https://github.com/seek-oss/braid-design-system/pull/947))
|
|
4256
4264
|
|
|
4257
4265
|
For the major browsers this includes:
|
|
4258
|
-
|
|
4259
4266
|
- Chrome 49+
|
|
4260
4267
|
- iOS 9.3+
|
|
4261
4268
|
- Safari 9.1+
|
|
@@ -4272,7 +4279,6 @@ For more detail on the specific changes in this release, please read on.
|
|
|
4272
4279
|
- Standardise breakpoints across all themes ([#947](https://github.com/seek-oss/braid-design-system/pull/947))
|
|
4273
4280
|
|
|
4274
4281
|
All themes now use the following breakpoints:
|
|
4275
|
-
|
|
4276
4282
|
- Mobile: `0px`
|
|
4277
4283
|
- Tablet: `740px`
|
|
4278
4284
|
- Desktop: `992px`
|
|
@@ -4282,16 +4288,13 @@ For more detail on the specific changes in this release, please read on.
|
|
|
4282
4288
|
This is a change for the following themes:
|
|
4283
4289
|
|
|
4284
4290
|
**jobStreet, jobStreetClassic, jobsDb, occ, wireframe**
|
|
4285
|
-
|
|
4286
4291
|
- Tablet: `768px` → `740px`
|
|
4287
4292
|
|
|
4288
4293
|
**catho**
|
|
4289
|
-
|
|
4290
4294
|
- Tablet: `600px` → `740px`
|
|
4291
4295
|
- Desktop: `1024px` → `992px`
|
|
4292
4296
|
|
|
4293
4297
|
**docs**
|
|
4294
|
-
|
|
4295
4298
|
- Tablet: `768px` → `740px`
|
|
4296
4299
|
- Desktop: `1136px` → `992px`
|
|
4297
4300
|
|
|
@@ -4495,7 +4498,6 @@ For more detail on the specific changes in this release, please read on.
|
|
|
4495
4498
|
To maintain accessibility, it is required to provide either a **aria-label** or **aria-labelledby** property, to describe the field's intent.
|
|
4496
4499
|
|
|
4497
4500
|
Given there is no visual label, the following features from a standard Checkbox cannot be supported:
|
|
4498
|
-
|
|
4499
4501
|
- description
|
|
4500
4502
|
- message
|
|
4501
4503
|
- badge
|
|
@@ -5543,13 +5545,11 @@ For more detail on the specific changes in this release, please read on.
|
|
|
5543
5545
|
The following z-index palette is now available on `Box`:
|
|
5544
5546
|
|
|
5545
5547
|
**Local stacking**
|
|
5546
|
-
|
|
5547
5548
|
- `0`
|
|
5548
5549
|
- `1`
|
|
5549
5550
|
- `2`
|
|
5550
5551
|
|
|
5551
5552
|
**Global stacking**
|
|
5552
|
-
|
|
5553
5553
|
- `"dropdownBackdrop"`
|
|
5554
5554
|
- `"dropdown"`
|
|
5555
5555
|
- `"sticky"`
|
|
@@ -5673,7 +5673,6 @@ For more detail on the specific changes in this release, please read on.
|
|
|
5673
5673
|
- Add `List` component ([#710](https://github.com/seek-oss/braid-design-system/pull/710))
|
|
5674
5674
|
|
|
5675
5675
|
`List` serves as a replacement for the `BulletList` and `Bullet` components which adds the following improvements:
|
|
5676
|
-
|
|
5677
5676
|
- Support for numbers and alpha characters as bullets
|
|
5678
5677
|
- Support for custom start positions in number/alpha lists
|
|
5679
5678
|
- Rich content support, e.g. list items with multiple paragraphs, nested lists, etc.
|
|
@@ -5738,7 +5737,6 @@ For more detail on the specific changes in this release, please read on.
|
|
|
5738
5737
|
The `_LEGACY_SPACE_` prop was provided to support consumers migrating to [`v14`](https://github.com/seek-oss/braid-design-system/releases/tag/v14.0.0) when the white space cropping and layout components were originally introduced. This has now been removed to allow us to further improve on our approach.
|
|
5739
5738
|
|
|
5740
5739
|
Migrating off this prop will require consumers to perform the following steps:
|
|
5741
|
-
|
|
5742
5740
|
- Remove the usage of `_LEGACY_SPACE_` on a component
|
|
5743
5741
|
- Conduct a visual review of the impact (component will appear closer to neighbouring elements)
|
|
5744
5742
|
- Use existing layout components, e.g. `Stack`, to define/control the reintroduction of the desired space.
|
|
@@ -5823,7 +5821,6 @@ For more detail on the specific changes in this release, please read on.
|
|
|
5823
5821
|
- **`seekBusiness` theme:** Inherit from new `apac` theme rather than the deprecated `seekAnz` theme ([#694](https://github.com/seek-oss/braid-design-system/pull/694))
|
|
5824
5822
|
|
|
5825
5823
|
Just like the migration from `seekAnz` to `apac`, the visual changes are as follows:
|
|
5826
|
-
|
|
5827
5824
|
- The body background has changed from `#eeeeee` to `#f5f6f8`.
|
|
5828
5825
|
- All grey colours now have a hint of blue.
|
|
5829
5826
|
- Buttons and form fields have decreased in height from `48px` to `44px`.
|
|
@@ -5854,7 +5851,6 @@ For more detail on the specific changes in this release, please read on.
|
|
|
5854
5851
|
This component serves as a replacement for `ToggleContent` from [SEEK Style Guide.](https://github.com/seek-oss/seek-style-guide)
|
|
5855
5852
|
|
|
5856
5853
|
**SEEK STYLE GUIDE MIGRATION GUIDE**
|
|
5857
|
-
|
|
5858
5854
|
- `ToggleContent` has been renamed to `Disclosure`.
|
|
5859
5855
|
- The `onShowMore` prop has been renamed to `onToggle`.
|
|
5860
5856
|
- The spacing around the button has changed to follow [Braid's layout guidelines.](https://seek-oss.github.io/braid-design-system/foundations/layout) Design review is recommeded.
|
|
@@ -5895,7 +5891,6 @@ For more detail on the specific changes in this release, please read on.
|
|
|
5895
5891
|
Consumers of the `seekAnz` theme are under no immediate pressure to migrate and both themes will be provided for the forseeable future. For now, this theme is aimed at those teams that are explicitly wanting to adopt newer design standards.
|
|
5896
5892
|
|
|
5897
5893
|
The visual changes to `seekAnz` are as follows:
|
|
5898
|
-
|
|
5899
5894
|
- The body background has changed from `#eeeeee` to `#f5f6f8`.
|
|
5900
5895
|
- All grey colours now have a hint of blue.
|
|
5901
5896
|
- Buttons and form fields have decreased in height from 48px to 44px.
|
|
@@ -5938,7 +5933,6 @@ For more detail on the specific changes in this release, please read on.
|
|
|
5938
5933
|
- MonthPicker: Support custom month and year labels ([#672](https://github.com/seek-oss/braid-design-system/pull/672))
|
|
5939
5934
|
|
|
5940
5935
|
To support internationalisation, you can now pass the following props to `MonthPicker`:
|
|
5941
|
-
|
|
5942
5936
|
- **monthLabel** (`string`)
|
|
5943
5937
|
- **yearLabel** (`string`)
|
|
5944
5938
|
- **monthNames** (`string[]`)
|
|
@@ -6120,7 +6114,6 @@ For more detail on the specific changes in this release, please read on.
|
|
|
6120
6114
|
- Improve field border contrast ratio ([#638](https://github.com/seek-oss/braid-design-system/pull/638))
|
|
6121
6115
|
|
|
6122
6116
|
To improve accessibility, field borders have been darkened for the following themes:
|
|
6123
|
-
|
|
6124
6117
|
- `seekAnz`
|
|
6125
6118
|
- `seekBusiness`
|
|
6126
6119
|
- `seekUnifiedBeta`
|
|
@@ -6329,7 +6322,6 @@ For more detail on the specific changes in this release, please read on.
|
|
|
6329
6322
|
The implementation of internal spacing within fields has been adjusted to better support browser extensions for password managers.
|
|
6330
6323
|
|
|
6331
6324
|
Affects the following components:
|
|
6332
|
-
|
|
6333
6325
|
- PasswordField: visibility toggle button
|
|
6334
6326
|
- TextField: clear button
|
|
6335
6327
|
- Autosuggest: clear button
|
|
@@ -6343,7 +6335,6 @@ For more detail on the specific changes in this release, please read on.
|
|
|
6343
6335
|
Field buttons, such as clear and password visibility toggle, fire on mouse down to ensure focus is retained on the relevant field. We now ensure that the button only recognises left mouse button clicks.
|
|
6344
6336
|
|
|
6345
6337
|
Affects the following components:
|
|
6346
|
-
|
|
6347
6338
|
- PasswordField: visibility toggle button
|
|
6348
6339
|
- TextField: clear button
|
|
6349
6340
|
- Autosuggest: clear button
|
|
@@ -6553,7 +6544,6 @@ For more detail on the specific changes in this release, please read on.
|
|
|
6553
6544
|
- Drop lodash usage to decrease bundle size. ([#585](https://github.com/seek-oss/braid-design-system/pull/585))
|
|
6554
6545
|
|
|
6555
6546
|
This directly affects `MonthPicker` and any components using the `data` prop:
|
|
6556
|
-
|
|
6557
6547
|
- All field components
|
|
6558
6548
|
- OverflowMenu
|
|
6559
6549
|
- MenuRenderer
|
|
@@ -6610,7 +6600,6 @@ For more detail on the specific changes in this release, please read on.
|
|
|
6610
6600
|
In order to make your custom link component available for any type of link (not just usages of `TextLink`), this release introduces a new `Link` component which renders an unstyled `a` tag by default.
|
|
6611
6601
|
|
|
6612
6602
|
**BREAKING CHANGES**
|
|
6613
|
-
|
|
6614
6603
|
- `TextLink` now requires an `href` prop. Even though this is unlikely to affect anyone (a `TextLink` without an `href` isn't terribly useful), this is still technically a breaking change.
|
|
6615
6604
|
|
|
6616
6605
|
However, if you find an instance of `TextLink` that you think _shouldn't_ have an `href`, this is a sign that it's not _actually_ a link and you should use a [`TextLinkRenderer`](https://seek-oss.github.io/braid-design-system/components/TextLinkRenderer) instead. Unfortunately, because there's no way for us to know the semantics of your usage ahead of time, we're unable to provide a migration guide, so you'll need to be mindful of how this might impact accessibility.
|
|
@@ -6737,7 +6726,6 @@ For more detail on the specific changes in this release, please read on.
|
|
|
6737
6726
|
- Add customisable `MenuRenderer` component ([#514](https://github.com/seek-oss/braid-design-system/pull/514))
|
|
6738
6727
|
|
|
6739
6728
|
**BREAKING CHANGES**
|
|
6740
|
-
|
|
6741
6729
|
- Rename `OverflowMenuItem` to `MenuItem`.
|
|
6742
6730
|
- Removed `type="link"` from `OverflowMenuItem` due to an accessibility issue with the approach (based on review of consumer usage, it did not seem to be used).
|
|
6743
6731
|
|
|
@@ -6746,7 +6734,6 @@ For more detail on the specific changes in this release, please read on.
|
|
|
6746
6734
|
**`MenuRenderer`**
|
|
6747
6735
|
|
|
6748
6736
|
Encapsulates all the behaviours of an accessible menu button, allowing consumers to define a custom `trigger` to open the menu. The trigger function receives two arguments:
|
|
6749
|
-
|
|
6750
6737
|
1. Props required for accessibility, including mouse/keyboard interactions
|
|
6751
6738
|
2. Menu state object containing the `open` state.
|
|
6752
6739
|
|
|
@@ -6807,7 +6794,6 @@ For more detail on the specific changes in this release, please read on.
|
|
|
6807
6794
|
- Only show focus rings on buttons for keyboard navigation. ([#526](https://github.com/seek-oss/braid-design-system/pull/526))
|
|
6808
6795
|
|
|
6809
6796
|
This impacts the following components:
|
|
6810
|
-
|
|
6811
6797
|
- `Button`
|
|
6812
6798
|
- `ButtonRenderer`
|
|
6813
6799
|
- `OverflowMenu`
|
|
@@ -6854,5 +6840,4 @@ For more detail on the specific changes in this release, please read on.
|
|
|
6854
6840
|
- 33139c8: Clone seekAnz theme to seekUnifiedBeta
|
|
6855
6841
|
|
|
6856
6842
|
BREAKING CHANGE
|
|
6857
|
-
|
|
6858
6843
|
- `jobsDbRebrand` theme has been removed
|
package/README.md
CHANGED
|
@@ -60,7 +60,7 @@ If you're rendering within the context of another application, you may want to o
|
|
|
60
60
|
If you'd like to customise the technical implementation of all `Link` and `TextLink` components from Braid, you can pass a custom component to the `linkComponent` prop on `BraidProvider`. For example, if you wanted to ensure that all relative links are [React Router](https://reacttraining.com/react-router/) links:
|
|
61
61
|
|
|
62
62
|
```tsx
|
|
63
|
-
import { Link as ReactRouterLink } from 'react-router
|
|
63
|
+
import { Link as ReactRouterLink } from 'react-router';
|
|
64
64
|
import { BraidProvider, makeLinkComponent } from 'braid-design-system';
|
|
65
65
|
import wireframe from 'braid-design-system/themes/wireframe';
|
|
66
66
|
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { ForwardRefRenderFunction, AnchorHTMLAttributes, ComponentType, ReactNode, ReactElement, AllHTMLAttributes, ElementType, RefAttributes, Ref, RefObject, KeyboardEvent, MouseEvent, FormEvent, RefCallback } from 'react';
|
|
2
|
+
import react__default, { ForwardRefRenderFunction, AnchorHTMLAttributes, ComponentType, ReactNode, ReactElement, AllHTMLAttributes, ElementType, RefAttributes, Ref, RefObject, KeyboardEvent, MouseEvent, FormEvent, RefCallback } from 'react';
|
|
3
3
|
import { FontMetrics } from '@capsizecss/core';
|
|
4
4
|
import * as clsx from 'clsx';
|
|
5
5
|
import { ClassValue } from 'clsx';
|
|
@@ -324,7 +324,7 @@ declare const BraidPortal: ({ children, container }: BraidPortalProps) => react.
|
|
|
324
324
|
interface ThemeNameConsumerProps {
|
|
325
325
|
children(name: string): ReactElement;
|
|
326
326
|
}
|
|
327
|
-
declare const ThemeNameConsumer: ({ children }: ThemeNameConsumerProps) => ReactElement<
|
|
327
|
+
declare const ThemeNameConsumer: ({ children }: ThemeNameConsumerProps) => ReactElement<unknown, string | react.JSXElementConstructor<any>>;
|
|
328
328
|
|
|
329
329
|
declare const useThemeName: () => string;
|
|
330
330
|
|
|
@@ -2746,7 +2746,7 @@ type Sprinkles = Parameters<typeof sprinkles>[0];
|
|
|
2746
2746
|
type Space = keyof typeof vars$1.space | 'none';
|
|
2747
2747
|
type ResponsiveSpace = RequiredResponsiveValue<Space>;
|
|
2748
2748
|
interface Atoms extends Sprinkles {
|
|
2749
|
-
reset?: keyof JSX.IntrinsicElements;
|
|
2749
|
+
reset?: keyof react__default.JSX.IntrinsicElements;
|
|
2750
2750
|
}
|
|
2751
2751
|
|
|
2752
2752
|
type BoxBackgroundVariant = Background | 'customDark' | 'customLight';
|
|
@@ -2811,10 +2811,10 @@ interface TextProps extends TypographyProps {
|
|
|
2811
2811
|
}
|
|
2812
2812
|
declare const Text: ({ size: sizeProp, tone: toneProp, weight: weightProp, maxLines: maxLinesProp, baseline, ...typographyProps }: TextProps) => react.JSX.Element;
|
|
2813
2813
|
|
|
2814
|
-
declare const validTones
|
|
2814
|
+
declare const validTones: readonly ["neutral", "secondary"];
|
|
2815
2815
|
interface AccordionContextValue {
|
|
2816
2816
|
size?: TextProps['size'];
|
|
2817
|
-
tone?: (typeof validTones
|
|
2817
|
+
tone?: (typeof validTones)[number];
|
|
2818
2818
|
weight?: TextProps['weight'];
|
|
2819
2819
|
}
|
|
2820
2820
|
|
|
@@ -2831,12 +2831,13 @@ interface AccordionProps {
|
|
|
2831
2831
|
declare const Accordion$1: ({ children, size, tone, weight, space: spaceProp, dividers, data, ...restProps }: AccordionProps) => react.JSX.Element;
|
|
2832
2832
|
|
|
2833
2833
|
type ValueOrArray<T> = T | T[];
|
|
2834
|
-
declare const
|
|
2835
|
-
type Tone$2 = (typeof
|
|
2836
|
-
|
|
2834
|
+
declare const validBadgeTones: readonly ["promote", "info", "neutral", "positive", "caution", "critical"];
|
|
2835
|
+
type Tone$2 = (typeof validBadgeTones)[number];
|
|
2836
|
+
declare const validBadgeWeights: readonly ["strong", "regular"];
|
|
2837
|
+
type Weight = (typeof validBadgeWeights)[number];
|
|
2837
2838
|
interface BadgeProps {
|
|
2838
2839
|
tone?: Tone$2;
|
|
2839
|
-
weight?:
|
|
2840
|
+
weight?: Weight;
|
|
2840
2841
|
bleedY?: boolean;
|
|
2841
2842
|
title?: string;
|
|
2842
2843
|
children: ValueOrArray<string | number>;
|
|
@@ -2872,7 +2873,8 @@ declare const AccordionItem$1: ({ id, label, children, badge, size: sizeProp, to
|
|
|
2872
2873
|
declare const buttonTones: readonly ["formAccent", "brandAccent", "critical", "neutral"];
|
|
2873
2874
|
|
|
2874
2875
|
declare const buttonVariants: readonly ["solid", "ghost", "soft", "transparent"];
|
|
2875
|
-
|
|
2876
|
+
declare const buttonSizes: readonly ["standard", "small"];
|
|
2877
|
+
type ButtonSize = (typeof buttonSizes)[number];
|
|
2876
2878
|
type ButtonTone = (typeof buttonTones)[number];
|
|
2877
2879
|
type ButtonVariant = (typeof buttonVariants)[number];
|
|
2878
2880
|
interface ButtonStyleProps {
|
|
@@ -3369,7 +3371,7 @@ interface IconRendererProps {
|
|
|
3369
3371
|
className: string;
|
|
3370
3372
|
}) => ReactElement | null;
|
|
3371
3373
|
}
|
|
3372
|
-
declare const IconRenderer: ({ children }: IconRendererProps) => ReactElement<
|
|
3374
|
+
declare const IconRenderer: ({ children }: IconRendererProps) => ReactElement<unknown, string | react.JSXElementConstructor<any>> | null;
|
|
3373
3375
|
|
|
3374
3376
|
type LinkProps = Omit<LinkComponentProps, 'className'> & {
|
|
3375
3377
|
className?: ClassValue;
|
|
@@ -3431,8 +3433,8 @@ interface PopoverProps {
|
|
|
3431
3433
|
modal?: boolean;
|
|
3432
3434
|
open: boolean;
|
|
3433
3435
|
onClose?: () => void;
|
|
3434
|
-
triggerRef: RefObject<HTMLElement>;
|
|
3435
|
-
enterFocusRef?: RefObject<HTMLElement>;
|
|
3436
|
+
triggerRef: RefObject<HTMLElement | null>;
|
|
3437
|
+
enterFocusRef?: RefObject<HTMLElement | null>;
|
|
3436
3438
|
children: ReactNode;
|
|
3437
3439
|
}
|
|
3438
3440
|
|
|
@@ -3754,10 +3756,12 @@ interface StrongProps {
|
|
|
3754
3756
|
}
|
|
3755
3757
|
declare const Strong: ({ children, data, id, ...restProps }: StrongProps) => react.JSX.Element;
|
|
3756
3758
|
|
|
3759
|
+
declare const alignY: Record<"top" | "center", string>;
|
|
3760
|
+
|
|
3757
3761
|
interface TableProps {
|
|
3758
3762
|
label: string;
|
|
3759
3763
|
children: ReactNode;
|
|
3760
|
-
alignY?:
|
|
3764
|
+
alignY?: keyof typeof alignY;
|
|
3761
3765
|
data?: DataAttributeMap;
|
|
3762
3766
|
}
|
|
3763
3767
|
declare const Table: react.ForwardRefExoticComponent<TableProps & react.RefAttributes<HTMLTableElement>>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { ForwardRefRenderFunction, AnchorHTMLAttributes, ComponentType, ReactNode, ReactElement, AllHTMLAttributes, ElementType, RefAttributes, Ref, RefObject, KeyboardEvent, MouseEvent, FormEvent, RefCallback } from 'react';
|
|
2
|
+
import react__default, { ForwardRefRenderFunction, AnchorHTMLAttributes, ComponentType, ReactNode, ReactElement, AllHTMLAttributes, ElementType, RefAttributes, Ref, RefObject, KeyboardEvent, MouseEvent, FormEvent, RefCallback } from 'react';
|
|
3
3
|
import { FontMetrics } from '@capsizecss/core';
|
|
4
4
|
import * as clsx from 'clsx';
|
|
5
5
|
import { ClassValue } from 'clsx';
|
|
@@ -324,7 +324,7 @@ declare const BraidPortal: ({ children, container }: BraidPortalProps) => react.
|
|
|
324
324
|
interface ThemeNameConsumerProps {
|
|
325
325
|
children(name: string): ReactElement;
|
|
326
326
|
}
|
|
327
|
-
declare const ThemeNameConsumer: ({ children }: ThemeNameConsumerProps) => ReactElement<
|
|
327
|
+
declare const ThemeNameConsumer: ({ children }: ThemeNameConsumerProps) => ReactElement<unknown, string | react.JSXElementConstructor<any>>;
|
|
328
328
|
|
|
329
329
|
declare const useThemeName: () => string;
|
|
330
330
|
|
|
@@ -2746,7 +2746,7 @@ type Sprinkles = Parameters<typeof sprinkles>[0];
|
|
|
2746
2746
|
type Space = keyof typeof vars$1.space | 'none';
|
|
2747
2747
|
type ResponsiveSpace = RequiredResponsiveValue<Space>;
|
|
2748
2748
|
interface Atoms extends Sprinkles {
|
|
2749
|
-
reset?: keyof JSX.IntrinsicElements;
|
|
2749
|
+
reset?: keyof react__default.JSX.IntrinsicElements;
|
|
2750
2750
|
}
|
|
2751
2751
|
|
|
2752
2752
|
type BoxBackgroundVariant = Background | 'customDark' | 'customLight';
|
|
@@ -2811,10 +2811,10 @@ interface TextProps extends TypographyProps {
|
|
|
2811
2811
|
}
|
|
2812
2812
|
declare const Text: ({ size: sizeProp, tone: toneProp, weight: weightProp, maxLines: maxLinesProp, baseline, ...typographyProps }: TextProps) => react.JSX.Element;
|
|
2813
2813
|
|
|
2814
|
-
declare const validTones
|
|
2814
|
+
declare const validTones: readonly ["neutral", "secondary"];
|
|
2815
2815
|
interface AccordionContextValue {
|
|
2816
2816
|
size?: TextProps['size'];
|
|
2817
|
-
tone?: (typeof validTones
|
|
2817
|
+
tone?: (typeof validTones)[number];
|
|
2818
2818
|
weight?: TextProps['weight'];
|
|
2819
2819
|
}
|
|
2820
2820
|
|
|
@@ -2831,12 +2831,13 @@ interface AccordionProps {
|
|
|
2831
2831
|
declare const Accordion$1: ({ children, size, tone, weight, space: spaceProp, dividers, data, ...restProps }: AccordionProps) => react.JSX.Element;
|
|
2832
2832
|
|
|
2833
2833
|
type ValueOrArray<T> = T | T[];
|
|
2834
|
-
declare const
|
|
2835
|
-
type Tone$2 = (typeof
|
|
2836
|
-
|
|
2834
|
+
declare const validBadgeTones: readonly ["promote", "info", "neutral", "positive", "caution", "critical"];
|
|
2835
|
+
type Tone$2 = (typeof validBadgeTones)[number];
|
|
2836
|
+
declare const validBadgeWeights: readonly ["strong", "regular"];
|
|
2837
|
+
type Weight = (typeof validBadgeWeights)[number];
|
|
2837
2838
|
interface BadgeProps {
|
|
2838
2839
|
tone?: Tone$2;
|
|
2839
|
-
weight?:
|
|
2840
|
+
weight?: Weight;
|
|
2840
2841
|
bleedY?: boolean;
|
|
2841
2842
|
title?: string;
|
|
2842
2843
|
children: ValueOrArray<string | number>;
|
|
@@ -2872,7 +2873,8 @@ declare const AccordionItem$1: ({ id, label, children, badge, size: sizeProp, to
|
|
|
2872
2873
|
declare const buttonTones: readonly ["formAccent", "brandAccent", "critical", "neutral"];
|
|
2873
2874
|
|
|
2874
2875
|
declare const buttonVariants: readonly ["solid", "ghost", "soft", "transparent"];
|
|
2875
|
-
|
|
2876
|
+
declare const buttonSizes: readonly ["standard", "small"];
|
|
2877
|
+
type ButtonSize = (typeof buttonSizes)[number];
|
|
2876
2878
|
type ButtonTone = (typeof buttonTones)[number];
|
|
2877
2879
|
type ButtonVariant = (typeof buttonVariants)[number];
|
|
2878
2880
|
interface ButtonStyleProps {
|
|
@@ -3369,7 +3371,7 @@ interface IconRendererProps {
|
|
|
3369
3371
|
className: string;
|
|
3370
3372
|
}) => ReactElement | null;
|
|
3371
3373
|
}
|
|
3372
|
-
declare const IconRenderer: ({ children }: IconRendererProps) => ReactElement<
|
|
3374
|
+
declare const IconRenderer: ({ children }: IconRendererProps) => ReactElement<unknown, string | react.JSXElementConstructor<any>> | null;
|
|
3373
3375
|
|
|
3374
3376
|
type LinkProps = Omit<LinkComponentProps, 'className'> & {
|
|
3375
3377
|
className?: ClassValue;
|
|
@@ -3431,8 +3433,8 @@ interface PopoverProps {
|
|
|
3431
3433
|
modal?: boolean;
|
|
3432
3434
|
open: boolean;
|
|
3433
3435
|
onClose?: () => void;
|
|
3434
|
-
triggerRef: RefObject<HTMLElement>;
|
|
3435
|
-
enterFocusRef?: RefObject<HTMLElement>;
|
|
3436
|
+
triggerRef: RefObject<HTMLElement | null>;
|
|
3437
|
+
enterFocusRef?: RefObject<HTMLElement | null>;
|
|
3436
3438
|
children: ReactNode;
|
|
3437
3439
|
}
|
|
3438
3440
|
|
|
@@ -3754,10 +3756,12 @@ interface StrongProps {
|
|
|
3754
3756
|
}
|
|
3755
3757
|
declare const Strong: ({ children, data, id, ...restProps }: StrongProps) => react.JSX.Element;
|
|
3756
3758
|
|
|
3759
|
+
declare const alignY: Record<"top" | "center", string>;
|
|
3760
|
+
|
|
3757
3761
|
interface TableProps {
|
|
3758
3762
|
label: string;
|
|
3759
3763
|
children: ReactNode;
|
|
3760
|
-
alignY?:
|
|
3764
|
+
alignY?: keyof typeof alignY;
|
|
3761
3765
|
data?: DataAttributeMap;
|
|
3762
3766
|
}
|
|
3763
3767
|
declare const Table: react.ForwardRefExoticComponent<TableProps & react.RefAttributes<HTMLTableElement>>;
|
|
@@ -13,7 +13,7 @@ const lib_components_Badge_defaultBadgeProps_cjs = require("./defaultBadgeProps.
|
|
|
13
13
|
const lib_components_Badge_Badge_css_cjs = require("./Badge.css.cjs");
|
|
14
14
|
const _interopDefaultCompat = (e) => e && typeof e === "object" && "default" in e ? e : { default: e };
|
|
15
15
|
const assert__default = /* @__PURE__ */ _interopDefaultCompat(assert);
|
|
16
|
-
const
|
|
16
|
+
const validBadgeTones = [
|
|
17
17
|
"promote",
|
|
18
18
|
"info",
|
|
19
19
|
"neutral",
|
|
@@ -52,7 +52,7 @@ const Badge = react.forwardRef(
|
|
|
52
52
|
...restProps
|
|
53
53
|
}, ref) => {
|
|
54
54
|
assert__default.default(
|
|
55
|
-
|
|
55
|
+
validBadgeTones.indexOf(tone) >= 0,
|
|
56
56
|
`Badge tone of "${tone}" is not valid.`
|
|
57
57
|
);
|
|
58
58
|
assert__default.default(
|
|
@@ -10,7 +10,7 @@ import { buildDataAttributes } from "../private/buildDataAttributes.mjs";
|
|
|
10
10
|
import { DefaultTextPropsProvider } from "../private/defaultTextProps.mjs";
|
|
11
11
|
import { useDefaultBadgeProps } from "./defaultBadgeProps.mjs";
|
|
12
12
|
import { inline, verticalPadding } from "./Badge.css.mjs";
|
|
13
|
-
const
|
|
13
|
+
const validBadgeTones = [
|
|
14
14
|
"promote",
|
|
15
15
|
"info",
|
|
16
16
|
"neutral",
|
|
@@ -49,7 +49,7 @@ const Badge = forwardRef(
|
|
|
49
49
|
...restProps
|
|
50
50
|
}, ref) => {
|
|
51
51
|
assert(
|
|
52
|
-
|
|
52
|
+
validBadgeTones.indexOf(tone) >= 0,
|
|
53
53
|
`Badge tone of "${tone}" is not valid.`
|
|
54
54
|
);
|
|
55
55
|
assert(
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
2
5
|
var _a;
|
|
3
6
|
const jsxRuntime = require("react/jsx-runtime");
|
|
4
7
|
const lib_themes_index_cjs = require("../../themes/index.cjs");
|
|
@@ -12,21 +15,21 @@ if (typeof navigator !== "undefined" && ((_a = navigator == null ? void 0 : navi
|
|
|
12
15
|
});
|
|
13
16
|
class MockResizeObserver {
|
|
14
17
|
constructor() {
|
|
15
|
-
this
|
|
16
|
-
this
|
|
17
|
-
this
|
|
18
|
+
__publicField(this, "observe", noop);
|
|
19
|
+
__publicField(this, "unobserve", noop);
|
|
20
|
+
__publicField(this, "disconnect", noop);
|
|
18
21
|
}
|
|
19
22
|
}
|
|
20
23
|
window.ResizeObserver = MockResizeObserver;
|
|
21
24
|
class MockIntersectionObserver {
|
|
22
25
|
constructor() {
|
|
23
|
-
this
|
|
24
|
-
this
|
|
25
|
-
this
|
|
26
|
-
this
|
|
27
|
-
this
|
|
28
|
-
this
|
|
29
|
-
this
|
|
26
|
+
__publicField(this, "root", null);
|
|
27
|
+
__publicField(this, "rootMargin", "");
|
|
28
|
+
__publicField(this, "thresholds", []);
|
|
29
|
+
__publicField(this, "observe", noop);
|
|
30
|
+
__publicField(this, "unobserve", noop);
|
|
31
|
+
__publicField(this, "disconnect", noop);
|
|
32
|
+
__publicField(this, "takeRecords", () => []);
|
|
30
33
|
}
|
|
31
34
|
}
|
|
32
35
|
window.IntersectionObserver = MockIntersectionObserver;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
1
4
|
var _a;
|
|
2
5
|
import { jsx } from "react/jsx-runtime";
|
|
3
6
|
import { themes } from "../../themes/index.mjs";
|
|
@@ -11,21 +14,21 @@ if (typeof navigator !== "undefined" && ((_a = navigator == null ? void 0 : navi
|
|
|
11
14
|
});
|
|
12
15
|
class MockResizeObserver {
|
|
13
16
|
constructor() {
|
|
14
|
-
this
|
|
15
|
-
this
|
|
16
|
-
this
|
|
17
|
+
__publicField(this, "observe", noop);
|
|
18
|
+
__publicField(this, "unobserve", noop);
|
|
19
|
+
__publicField(this, "disconnect", noop);
|
|
17
20
|
}
|
|
18
21
|
}
|
|
19
22
|
window.ResizeObserver = MockResizeObserver;
|
|
20
23
|
class MockIntersectionObserver {
|
|
21
24
|
constructor() {
|
|
22
|
-
this
|
|
23
|
-
this
|
|
24
|
-
this
|
|
25
|
-
this
|
|
26
|
-
this
|
|
27
|
-
this
|
|
28
|
-
this
|
|
25
|
+
__publicField(this, "root", null);
|
|
26
|
+
__publicField(this, "rootMargin", "");
|
|
27
|
+
__publicField(this, "thresholds", []);
|
|
28
|
+
__publicField(this, "observe", noop);
|
|
29
|
+
__publicField(this, "unobserve", noop);
|
|
30
|
+
__publicField(this, "disconnect", noop);
|
|
31
|
+
__publicField(this, "takeRecords", () => []);
|
|
29
32
|
}
|
|
30
33
|
}
|
|
31
34
|
window.IntersectionObserver = MockIntersectionObserver;
|